diff --git a/.flake8 b/.flake8 index 75b22932c..b1c506857 100644 --- a/.flake8 +++ b/.flake8 @@ -14,7 +14,7 @@ extend-select = per-file-ignores = */__init__.py: IMP100, E402, F401, E501 # we test various import patterns - tests/test_exports.py: IMP100, IMP101, IMP102 + tests/test_exports.py: IMP100, IMP101, IMP102, F401 tests/*: IMP101, IMP102, BAN100, ASY100, E501 # backcompat with outdated import patterns stripe/api_resources/*: IMP100, E402, F401 diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 34dade188..a21c29dcc 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -2c5c64cd284682e65b0d792ea01971f01486ee74 \ No newline at end of file +2c5c64cd284682e65b0d792ea01971f01486ee74 diff --git a/README.md b/README.md index 75a7d4e39..9c84516bb 100644 --- a/README.md +++ b/README.md @@ -114,10 +114,10 @@ You can configure your `StripeClient` to use `urlfetch`, `requests`, `pycurl`, o `urllib` with the `http_client` option: ```python -client = StripeClient("sk_test_...", http_client=stripe.http_client.UrlFetchClient()) -client = StripeClient("sk_test_...", http_client=stripe.http_client.RequestsClient()) -client = StripeClient("sk_test_...", http_client=stripe.http_client.PycurlClient()) -client = StripeClient("sk_test_...", http_client=stripe.http_client.UrllibClient()) +client = StripeClient("sk_test_...", http_client=stripe.UrlFetchClient()) +client = StripeClient("sk_test_...", http_client=stripe.RequestsClient()) +client = StripeClient("sk_test_...", http_client=stripe.PycurlClient()) +client = StripeClient("sk_test_...", http_client=stripe.UrllibClient()) ``` Without a configured client, by default the library will attempt to load diff --git a/examples/charge.py b/examples/charge.py deleted file mode 100644 index 0bb8230c7..000000000 --- a/examples/charge.py +++ /dev/null @@ -1,17 +0,0 @@ -import os - -import stripe - - -stripe.api_key = os.environ.get("STRIPE_SECRET_KEY") - -print("Attempting charge...") - -resp = stripe.Charge.create( - amount=200, - currency="usd", - card="tok_visa", - description="customer@gmail.com", -) - -print("Success: %r" % (resp)) diff --git a/examples/event_notification_webhook_handler.py b/examples/event_notification_webhook_handler.py index 3e5ffc869..e877de195 100644 --- a/examples/event_notification_webhook_handler.py +++ b/examples/event_notification_webhook_handler.py @@ -13,6 +13,14 @@ import os from stripe import StripeClient +from stripe import Event +from stripe.v2.core import Event as V2Event, EventNotification +from stripe.events import ( + V2CoreEventDestinationPingEventNotification, + V1BillingMeterErrorReportTriggeredEvent, + UnknownEventNotification, + ALL_EVENT_NOTIFICATIONS, +) from flask import Flask, request, jsonify diff --git a/examples/oauth.py b/examples/oauth.py index 1d2ad31cc..b37b92aa8 100644 --- a/examples/oauth.py +++ b/examples/oauth.py @@ -1,11 +1,15 @@ import os -import stripe +from stripe import StripeClient +from stripe.oauth_error import OAuthError + from flask import Flask, request, redirect -stripe.api_key = os.environ.get("STRIPE_SECRET_KEY") -stripe.client_id = os.environ.get("STRIPE_CLIENT_ID") +client = StripeClient( + api_key=os.environ["STRIPE_SECRET_KEY"], + client_id=os.environ.get("STRIPE_CLIENT_ID"), +) app = Flask(__name__) @@ -17,7 +21,7 @@ def index(): @app.route("/authorize") def authorize(): - url = stripe.OAuth.authorize_url(scope="read_only") + url = client.oauth.authorize_url(scope="read_only") return redirect(url) @@ -25,8 +29,10 @@ def authorize(): def callback(): code = request.args.get("code") try: - resp = stripe.OAuth.token(grant_type="authorization_code", code=code) - except stripe.oauth_error.OAuthError as e: + resp = client.oauth.token( + params={"grant_type": "authorization_code", "code": code} + ) + except OAuthError as e: return "Error: " + str(e) return """ @@ -40,8 +46,8 @@ def callback(): def deauthorize(): stripe_user_id = request.args.get("stripe_user_id") try: - stripe.OAuth.deauthorize(stripe_user_id=stripe_user_id) - except stripe.oauth_error.OAuthError as e: + client.oauth.deauthorize(params={"stripe_user_id": stripe_user_id}) + except OAuthError as e: return "Error: " + str(e) return """ diff --git a/examples/proxy.py b/examples/proxy.py index a85214f1c..9b5dde00f 100644 --- a/examples/proxy.py +++ b/examples/proxy.py @@ -1,35 +1,39 @@ import os -import stripe - - -stripe.api_key = os.environ.get("STRIPE_SECRET_KEY") +from stripe import ( + StripeClient, + RequestsClient, + HTTPClient, + UrllibClient, + verify_ssl_certs, + PycurlClient, +) print("Attempting charge...") -proxy = { +proxy: HTTPClient._Proxy = { "http": "http://:@:", "https": "http://:@:", } -clients = ( - stripe.http_client.RequestsClient( - verify_ssl_certs=stripe.verify_ssl_certs, proxy=proxy - ), - stripe.http_client.PycurlClient( - verify_ssl_certs=stripe.verify_ssl_certs, proxy=proxy - ), - stripe.http_client.UrllibClient( - verify_ssl_certs=stripe.verify_ssl_certs, proxy=proxy - ), +http_clients = ( + RequestsClient(verify_ssl_certs=verify_ssl_certs, proxy=proxy), + PycurlClient(verify_ssl_certs=verify_ssl_certs, proxy=proxy), + UrllibClient(verify_ssl_certs=verify_ssl_certs, proxy=proxy), ) -for c in clients: - stripe.default_http_client = c - resp = stripe.Charge.create( - amount=200, - currency="usd", - card="tok_visa", - description="customer@gmail.com", +for http_client in http_clients: + client_with_proxy = StripeClient( + api_key=os.environ["STRIPE_SECRET_KEY"], + http_client=http_client, ) - print("Success: %s, %r" % (c.name, resp)) + + resp = client_with_proxy.v1.charges.create( + params={ + "amount": 200, + "currency": "usd", + "description": "customer@example.com", + } + ) + + print("Success: %s, %r" % (http_client.name, resp)) diff --git a/examples/webhooks.py b/examples/webhooks.py index 23ea538bd..8dcf308ca 100644 --- a/examples/webhooks.py +++ b/examples/webhooks.py @@ -1,10 +1,15 @@ import os -import stripe +from stripe import StripeClient, Webhook, SignatureVerificationError + from flask import Flask, request -stripe.api_key = os.environ.get("STRIPE_SECRET_KEY") +client = StripeClient( + api_key=os.environ["STRIPE_SECRET_KEY"], + client_id=os.environ.get("STRIPE_CLIENT_ID"), +) + webhook_secret = os.environ.get("WEBHOOK_SECRET") app = Flask(__name__) @@ -16,13 +21,11 @@ def webhooks(): received_sig = request.headers.get("Stripe-Signature", None) try: - event = stripe.Webhook.construct_event( - payload, received_sig, webhook_secret - ) + event = Webhook.construct_event(payload, received_sig, webhook_secret) except ValueError: print("Error while decoding event!") return "Bad payload", 400 - except stripe.error.SignatureVerificationError: + except SignatureVerificationError: print("Invalid signature!") return "Bad signature", 400 diff --git a/stripe/__init__.py b/stripe/__init__.py index 8a60207cb..29d24c991 100644 --- a/stripe/__init__.py +++ b/stripe/__init__.py @@ -15,10 +15,7 @@ from stripe._api_version import _ApiVersion from stripe._api_requestor import _APIRequestor -# We must import the app_info module early to populate it into -# `sys.modules`; otherwise doing `import stripe.app_info` will end up -# importing that module, and not the global `AppInfo` name from below. -import stripe.app_info + from stripe._app_info import AppInfo as AppInfo from stripe._version import VERSION as VERSION @@ -126,6 +123,7 @@ def add_beta_version( beta_name: str, beta_version: str, ): + global api_version # Validate beta_version format if not beta_version.startswith("v") or not beta_version[1:].isdigit(): raise ValueError( @@ -134,24 +132,22 @@ def add_beta_version( # Check if beta_name already exists beta_entry = f"; {beta_name}=" - if beta_entry in stripe.api_version: - start_index = stripe.api_version.index(beta_entry) + len(beta_entry) - end_index = stripe.api_version.find(";", start_index) - end_index = end_index if end_index != -1 else len(stripe.api_version) - existing_version = int( - stripe.api_version[(start_index + 1) : end_index] - ) + if beta_entry in api_version: + start_index = api_version.index(beta_entry) + len(beta_entry) + end_index = api_version.find(";", start_index) + end_index = end_index if end_index != -1 else len(api_version) + existing_version = int(api_version[(start_index + 1) : end_index]) new_version = int(beta_version[1:]) if new_version <= existing_version: return # Keep the higher version, no update needed # Remove the existing beta entry - stripe.api_version = ( - stripe.api_version[: stripe.api_version.index(beta_entry)] - + stripe.api_version[end_index:] + api_version = ( + api_version[: api_version.index(beta_entry)] + + api_version[end_index:] ) # Add the new beta version - stripe.api_version = f"{stripe.api_version}; {beta_name}={beta_version}" + api_version = f"{api_version}; {beta_name}={beta_version}" # Infrastructure types @@ -235,52 +231,13 @@ def add_beta_version( UrlFetchClient as UrlFetchClient, HTTPXClient as HTTPXClient, AIOHTTPClient as AIOHTTPClient, + UrllibClient as UrllibClient, new_default_http_client as new_default_http_client, ) # Util from stripe._util import convert_to_stripe_object as convert_to_stripe_object -# Backwards compatibility re-exports -if not TYPE_CHECKING: - from stripe import _stripe_response as stripe_response - from stripe import _stripe_object as stripe_object - from stripe import _error_object as error_object - from stripe import _error as error - from stripe import _http_client as http_client - from stripe import _util as util - from stripe import _oauth as oauth - from stripe import _webhook as webhook - from stripe import _multipart_data_generator as multipart_data_generator - from stripe import _request_metrics as request_metrics - from stripe._file import File as FileUpload - - # Python 3.7+ supports module level __getattr__ that allows us to lazy load deprecated modules - # this matters because if we pre-load all modules from api_resources while suppressing warning - # users will never see those warnings - if _sys.version_info[:2] >= (3, 7): - - def __getattr__(name): - if name == "abstract": - import stripe.api_resources.abstract as _abstract - - return _abstract - if name == "api_resources": - import stripe.api_resources as _api_resources - - return _api_resources - raise AttributeError( - f"module {__name__!r} has no attribute {name!r}" - ) - - else: - with warnings.catch_warnings(): - warnings.filterwarnings("ignore", category=DeprecationWarning) - - import stripe.api_resources.abstract as abstract - import stripe.api_resources as api_resources - - # API resources # The beginning of the section generated from our OpenAPI spec @@ -297,6 +254,7 @@ def __getattr__(name): forwarding as forwarding, identity as identity, issuing as issuing, + params as params, privacy as privacy, radar as radar, reporting as reporting, diff --git a/stripe/_account.py b/stripe/_account.py index 67c294abc..995c6c73e 100644 --- a/stripe/_account.py +++ b/stripe/_account.py @@ -8,18 +8,11 @@ from stripe._nested_resource_class_methods import nested_resource_class_methods from stripe._oauth import OAuth from stripe._person import Person -from stripe._request_options import RequestOptions from stripe._stripe_object import StripeObject from stripe._updateable_api_resource import UpdateableAPIResource from stripe._util import class_method_variant, sanitize_id from typing import ClassVar, Dict, List, Optional, Union, cast, overload -from typing_extensions import ( - Literal, - NotRequired, - TypedDict, - Unpack, - TYPE_CHECKING, -) +from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: from stripe._bank_account import BankAccount @@ -28,6 +21,53 @@ from stripe._file import File from stripe._login_link import LoginLink from stripe._tax_id import TaxId + from stripe.params._account_create_external_account_params import ( + AccountCreateExternalAccountParams, + ) + from stripe.params._account_create_login_link_params import ( + AccountCreateLoginLinkParams, + ) + from stripe.params._account_create_params import AccountCreateParams + from stripe.params._account_create_person_params import ( + AccountCreatePersonParams, + ) + from stripe.params._account_delete_external_account_params import ( + AccountDeleteExternalAccountParams, + ) + from stripe.params._account_delete_params import AccountDeleteParams + from stripe.params._account_delete_person_params import ( + AccountDeletePersonParams, + ) + from stripe.params._account_list_capabilities_params import ( + AccountListCapabilitiesParams, + ) + from stripe.params._account_list_external_accounts_params import ( + AccountListExternalAccountsParams, + ) + from stripe.params._account_list_params import AccountListParams + from stripe.params._account_list_persons_params import ( + AccountListPersonsParams, + ) + from stripe.params._account_modify_capability_params import ( + AccountModifyCapabilityParams, + ) + from stripe.params._account_modify_external_account_params import ( + AccountModifyExternalAccountParams, + ) + from stripe.params._account_modify_person_params import ( + AccountModifyPersonParams, + ) + from stripe.params._account_persons_params import AccountPersonsParams + from stripe.params._account_reject_params import AccountRejectParams + from stripe.params._account_retrieve_capability_params import ( + AccountRetrieveCapabilityParams, + ) + from stripe.params._account_retrieve_external_account_params import ( + AccountRetrieveExternalAccountParams, + ) + from stripe.params._account_retrieve_person_params import ( + AccountRetrievePersonParams, + ) @nested_resource_class_methods("capability") @@ -1503,3428 +1543,6 @@ class TosAcceptance(StripeObject): The user agent of the browser from which the account representative accepted their service agreement """ - class CreateExternalAccountParams(RequestOptions): - default_for_currency: NotRequired[bool] - """ - When set to true, or if this is the first external account added in this currency, this account becomes the default external account for its currency. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - external_account: Union[ - str, - "Account.CreateExternalAccountParamsCard", - "Account.CreateExternalAccountParamsBankAccount", - "Account.CreateExternalAccountParamsCardToken", - ] - """ - A token, like the ones returned by [Stripe.js](https://stripe.com/docs/js) or a dictionary containing a user's external account details (with the options shown below). Please refer to full [documentation](https://stripe.com/docs/api/external_accounts) instead. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - - class CreateExternalAccountParamsBankAccount(TypedDict): - object: Literal["bank_account"] - account_holder_name: NotRequired[str] - """ - The name of the person or business that owns the bank account.This field is required when attaching the bank account to a `Customer` object. - """ - account_holder_type: NotRequired[Literal["company", "individual"]] - """ - The type of entity that holds the account. It can be `company` or `individual`. This field is required when attaching the bank account to a `Customer` object. - """ - account_number: str - """ - The account number for the bank account, in string form. Must be a checking account. - """ - country: str - """ - The country in which the bank account is located. - """ - currency: NotRequired[str] - """ - The currency the bank account is in. This must be a country/currency pairing that [Stripe supports.](docs/payouts) - """ - routing_number: NotRequired[str] - """ - The routing number, sort code, or other country-appropriate institution number for the bank account. For US bank accounts, this is required and should be the ACH routing number, not the wire routing number. If you are providing an IBAN for `account_number`, this field is not required. - """ - - class CreateExternalAccountParamsCard(TypedDict): - object: Literal["card"] - address_city: NotRequired[str] - address_country: NotRequired[str] - address_line1: NotRequired[str] - address_line2: NotRequired[str] - address_state: NotRequired[str] - address_zip: NotRequired[str] - currency: NotRequired[str] - cvc: NotRequired[str] - exp_month: int - exp_year: int - name: NotRequired[str] - number: str - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. - """ - - class CreateExternalAccountParamsCardToken(TypedDict): - object: Literal["card"] - currency: NotRequired[str] - token: str - - class CreateLoginLinkParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class CreateParams(RequestOptions): - account_token: NotRequired[str] - """ - An [account token](https://stripe.com/docs/api#create_account_token), used to securely provide details to the account. - """ - business_profile: NotRequired["Account.CreateParamsBusinessProfile"] - """ - Business information about the account. - """ - business_type: NotRequired[ - Literal["company", "government_entity", "individual", "non_profit"] - ] - """ - The business type. Once you create an [Account Link](https://docs.stripe.com/api/account_links) or [Account Session](https://docs.stripe.com/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](https://docs.stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. - """ - capabilities: NotRequired["Account.CreateParamsCapabilities"] - """ - Each key of the dictionary represents a capability, and each capability - maps to its settings (for example, whether it has been requested or not). Each - capability is inactive until you have provided its specific - requirements and Stripe has verified them. An account might have some - of its requested capabilities be active and some be inactive. - - Required when [account.controller.stripe_dashboard.type](https://docs.stripe.com/api/accounts/create#create_account-controller-dashboard-type) - is `none`, which includes Custom accounts. - """ - company: NotRequired["Account.CreateParamsCompany"] - """ - Information about the company or business. This field is available for any `business_type`. Once you create an [Account Link](https://docs.stripe.com/api/account_links) or [Account Session](https://docs.stripe.com/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](https://docs.stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. - """ - controller: NotRequired["Account.CreateParamsController"] - """ - A hash of configuration describing the account controller's attributes. - """ - country: NotRequired[str] - """ - The country in which the account holder resides, or in which the business is legally established. This should be an ISO 3166-1 alpha-2 country code. For example, if you are in the United States and the business for which you're creating an account is legally represented in Canada, you would use `CA` as the country for the account being created. Available countries include [Stripe's global markets](https://stripe.com/global) as well as countries where [cross-border payouts](https://stripe.com/docs/connect/cross-border-payouts) are supported. - """ - default_currency: NotRequired[str] - """ - Three-letter ISO currency code representing the default currency for the account. This must be a currency that [Stripe supports in the account's country](https://docs.stripe.com/payouts). - """ - documents: NotRequired["Account.CreateParamsDocuments"] - """ - Documents that may be submitted to satisfy various informational requests. - """ - email: NotRequired[str] - """ - The email address of the account holder. This is only to make the account easier to identify to you. If [controller.requirement_collection](https://docs.stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts, Stripe doesn't email the account without your consent. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - external_account: NotRequired[ - "str|Account.CreateParamsBankAccount|Account.CreateParamsCard|Account.CreateParamsCardToken" - ] - """ - A card or bank account to attach to the account for receiving [payouts](https://docs.stripe.com/connect/bank-debit-card-payouts) (you won't be able to use it for top-ups). You can provide either a token, like the ones returned by [Stripe.js](https://docs.stripe.com/js), or a dictionary, as documented in the `external_account` parameter for [bank account](https://docs.stripe.com/api#account_create_bank_account) creation. - - By default, providing an external account sets it as the new default external account for its currency, and deletes the old default if one exists. To add additional external accounts without replacing the existing default for the currency, use the [bank account](https://docs.stripe.com/api#account_create_bank_account) or [card creation](https://docs.stripe.com/api#account_create_card) APIs. After you create an [Account Link](https://docs.stripe.com/api/account_links) or [Account Session](https://docs.stripe.com/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](https://docs.stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. - """ - groups: NotRequired["Account.CreateParamsGroups"] - """ - A hash of account group type to tokens. These are account groups this account should be added to. - """ - individual: NotRequired["Account.CreateParamsIndividual"] - """ - Information about the person represented by the account. This field is null unless `business_type` is set to `individual`. Once you create an [Account Link](https://docs.stripe.com/api/account_links) or [Account Session](https://docs.stripe.com/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](https://docs.stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - risk_controls: NotRequired["Account.CreateParamsRiskControls"] - """ - A hash to configure risk controls on the account. Please see [this page for more details](https://docs.stripe.com/connect/pausing-payments-or-payouts-on-connected-accounts). - """ - settings: NotRequired["Account.CreateParamsSettings"] - """ - Options for customizing how the account functions within Stripe. - """ - tos_acceptance: NotRequired["Account.CreateParamsTosAcceptance"] - """ - Details on the account's acceptance of the [Stripe Services Agreement](https://docs.stripe.com/connect/updating-accounts#tos-acceptance). This property can only be updated for accounts where [controller.requirement_collection](https://docs.stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. This property defaults to a `full` service agreement when empty. - """ - type: NotRequired[Literal["custom", "express", "standard"]] - """ - The type of Stripe account to create. May be one of `custom`, `express` or `standard`. - """ - - class CreateParamsBankAccount(TypedDict): - object: Literal["bank_account"] - account_holder_name: NotRequired[str] - """ - The name of the person or business that owns the bank account.This field is required when attaching the bank account to a `Customer` object. - """ - account_holder_type: NotRequired[Literal["company", "individual"]] - """ - The type of entity that holds the account. It can be `company` or `individual`. This field is required when attaching the bank account to a `Customer` object. - """ - account_number: str - """ - The account number for the bank account, in string form. Must be a checking account. - """ - country: str - """ - The country in which the bank account is located. - """ - currency: NotRequired[str] - """ - The currency the bank account is in. This must be a country/currency pairing that [Stripe supports.](docs/payouts) - """ - routing_number: NotRequired[str] - """ - The routing number, sort code, or other country-appropriate institution number for the bank account. For US bank accounts, this is required and should be the ACH routing number, not the wire routing number. If you are providing an IBAN for `account_number`, this field is not required. - """ - - class CreateParamsBusinessProfile(TypedDict): - annual_revenue: NotRequired[ - "Account.CreateParamsBusinessProfileAnnualRevenue" - ] - """ - The applicant's gross annual revenue for its preceding fiscal year. - """ - estimated_worker_count: NotRequired[int] - """ - An estimated upper bound of employees, contractors, vendors, etc. currently working for the business. - """ - mcc: NotRequired[str] - """ - [The merchant category code for the account](https://docs.stripe.com/connect/setting-mcc). MCCs are used to classify businesses based on the goods or services they provide. - """ - minority_owned_business_designation: NotRequired[ - List[ - Literal[ - "lgbtqi_owned_business", - "minority_owned_business", - "none_of_these_apply", - "prefer_not_to_answer", - "women_owned_business", - ] - ] - ] - """ - Whether the business is a minority-owned, women-owned, and/or LGBTQI+ -owned business. - """ - monthly_estimated_revenue: NotRequired[ - "Account.CreateParamsBusinessProfileMonthlyEstimatedRevenue" - ] - """ - An estimate of the monthly revenue of the business. Only accepted for accounts in Brazil and India. - """ - name: NotRequired[str] - """ - The customer-facing business name. - """ - product_description: NotRequired[str] - """ - Internal-only description of the product sold by, or service provided by, the business. Used by Stripe for risk and underwriting purposes. - """ - support_address: NotRequired[ - "Account.CreateParamsBusinessProfileSupportAddress" - ] - """ - A publicly available mailing address for sending support issues to. - """ - support_email: NotRequired[str] - """ - A publicly available email address for sending support issues to. - """ - support_phone: NotRequired[str] - """ - A publicly available phone number to call with support issues. - """ - support_url: NotRequired["Literal['']|str"] - """ - A publicly available website for handling support issues. - """ - url: NotRequired[str] - """ - The business's publicly available website. - """ - - class CreateParamsBusinessProfileAnnualRevenue(TypedDict): - amount: int - """ - A non-negative integer representing the amount in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal). - """ - 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). - """ - fiscal_year_end: str - """ - The close-out date of the preceding fiscal year in ISO 8601 format. E.g. 2023-12-31 for the 31st of December, 2023. - """ - - class CreateParamsBusinessProfileMonthlyEstimatedRevenue(TypedDict): - amount: int - """ - A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal). - """ - 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). - """ - - class CreateParamsBusinessProfileSupportAddress(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. - """ - - class CreateParamsCapabilities(TypedDict): - acss_debit_payments: NotRequired[ - "Account.CreateParamsCapabilitiesAcssDebitPayments" - ] - """ - The acss_debit_payments capability. - """ - affirm_payments: NotRequired[ - "Account.CreateParamsCapabilitiesAffirmPayments" - ] - """ - The affirm_payments capability. - """ - afterpay_clearpay_payments: NotRequired[ - "Account.CreateParamsCapabilitiesAfterpayClearpayPayments" - ] - """ - The afterpay_clearpay_payments capability. - """ - alma_payments: NotRequired[ - "Account.CreateParamsCapabilitiesAlmaPayments" - ] - """ - The alma_payments capability. - """ - amazon_pay_payments: NotRequired[ - "Account.CreateParamsCapabilitiesAmazonPayPayments" - ] - """ - The amazon_pay_payments capability. - """ - au_becs_debit_payments: NotRequired[ - "Account.CreateParamsCapabilitiesAuBecsDebitPayments" - ] - """ - The au_becs_debit_payments capability. - """ - automatic_indirect_tax: NotRequired[ - "Account.CreateParamsCapabilitiesAutomaticIndirectTax" - ] - """ - The automatic_indirect_tax capability. - """ - bacs_debit_payments: NotRequired[ - "Account.CreateParamsCapabilitiesBacsDebitPayments" - ] - """ - The bacs_debit_payments capability. - """ - bancontact_payments: NotRequired[ - "Account.CreateParamsCapabilitiesBancontactPayments" - ] - """ - The bancontact_payments capability. - """ - bank_transfer_payments: NotRequired[ - "Account.CreateParamsCapabilitiesBankTransferPayments" - ] - """ - The bank_transfer_payments capability. - """ - billie_payments: NotRequired[ - "Account.CreateParamsCapabilitiesBilliePayments" - ] - """ - The billie_payments capability. - """ - blik_payments: NotRequired[ - "Account.CreateParamsCapabilitiesBlikPayments" - ] - """ - The blik_payments capability. - """ - boleto_payments: NotRequired[ - "Account.CreateParamsCapabilitiesBoletoPayments" - ] - """ - The boleto_payments capability. - """ - card_issuing: NotRequired[ - "Account.CreateParamsCapabilitiesCardIssuing" - ] - """ - The card_issuing capability. - """ - card_payments: NotRequired[ - "Account.CreateParamsCapabilitiesCardPayments" - ] - """ - The card_payments capability. - """ - cartes_bancaires_payments: NotRequired[ - "Account.CreateParamsCapabilitiesCartesBancairesPayments" - ] - """ - The cartes_bancaires_payments capability. - """ - cashapp_payments: NotRequired[ - "Account.CreateParamsCapabilitiesCashappPayments" - ] - """ - The cashapp_payments capability. - """ - crypto_payments: NotRequired[ - "Account.CreateParamsCapabilitiesCryptoPayments" - ] - """ - The crypto_payments capability. - """ - eps_payments: NotRequired[ - "Account.CreateParamsCapabilitiesEpsPayments" - ] - """ - The eps_payments capability. - """ - fpx_payments: NotRequired[ - "Account.CreateParamsCapabilitiesFpxPayments" - ] - """ - The fpx_payments capability. - """ - gb_bank_transfer_payments: NotRequired[ - "Account.CreateParamsCapabilitiesGbBankTransferPayments" - ] - """ - The gb_bank_transfer_payments capability. - """ - giropay_payments: NotRequired[ - "Account.CreateParamsCapabilitiesGiropayPayments" - ] - """ - The giropay_payments capability. - """ - gopay_payments: NotRequired[ - "Account.CreateParamsCapabilitiesGopayPayments" - ] - """ - The gopay_payments capability. - """ - grabpay_payments: NotRequired[ - "Account.CreateParamsCapabilitiesGrabpayPayments" - ] - """ - The grabpay_payments capability. - """ - id_bank_transfer_payments: NotRequired[ - "Account.CreateParamsCapabilitiesIdBankTransferPayments" - ] - """ - The id_bank_transfer_payments capability. - """ - id_bank_transfer_payments_bca: NotRequired[ - "Account.CreateParamsCapabilitiesIdBankTransferPaymentsBca" - ] - """ - The id_bank_transfer_payments_bca capability. - """ - ideal_payments: NotRequired[ - "Account.CreateParamsCapabilitiesIdealPayments" - ] - """ - The ideal_payments capability. - """ - india_international_payments: NotRequired[ - "Account.CreateParamsCapabilitiesIndiaInternationalPayments" - ] - """ - The india_international_payments capability. - """ - jcb_payments: NotRequired[ - "Account.CreateParamsCapabilitiesJcbPayments" - ] - """ - The jcb_payments capability. - """ - jp_bank_transfer_payments: NotRequired[ - "Account.CreateParamsCapabilitiesJpBankTransferPayments" - ] - """ - The jp_bank_transfer_payments capability. - """ - kakao_pay_payments: NotRequired[ - "Account.CreateParamsCapabilitiesKakaoPayPayments" - ] - """ - The kakao_pay_payments capability. - """ - klarna_payments: NotRequired[ - "Account.CreateParamsCapabilitiesKlarnaPayments" - ] - """ - The klarna_payments capability. - """ - konbini_payments: NotRequired[ - "Account.CreateParamsCapabilitiesKonbiniPayments" - ] - """ - The konbini_payments capability. - """ - kr_card_payments: NotRequired[ - "Account.CreateParamsCapabilitiesKrCardPayments" - ] - """ - The kr_card_payments capability. - """ - legacy_payments: NotRequired[ - "Account.CreateParamsCapabilitiesLegacyPayments" - ] - """ - The legacy_payments capability. - """ - link_payments: NotRequired[ - "Account.CreateParamsCapabilitiesLinkPayments" - ] - """ - The link_payments capability. - """ - mb_way_payments: NotRequired[ - "Account.CreateParamsCapabilitiesMbWayPayments" - ] - """ - The mb_way_payments capability. - """ - mobilepay_payments: NotRequired[ - "Account.CreateParamsCapabilitiesMobilepayPayments" - ] - """ - The mobilepay_payments capability. - """ - multibanco_payments: NotRequired[ - "Account.CreateParamsCapabilitiesMultibancoPayments" - ] - """ - The multibanco_payments capability. - """ - mx_bank_transfer_payments: NotRequired[ - "Account.CreateParamsCapabilitiesMxBankTransferPayments" - ] - """ - The mx_bank_transfer_payments capability. - """ - naver_pay_payments: NotRequired[ - "Account.CreateParamsCapabilitiesNaverPayPayments" - ] - """ - The naver_pay_payments capability. - """ - nz_bank_account_becs_debit_payments: NotRequired[ - "Account.CreateParamsCapabilitiesNzBankAccountBecsDebitPayments" - ] - """ - The nz_bank_account_becs_debit_payments capability. - """ - oxxo_payments: NotRequired[ - "Account.CreateParamsCapabilitiesOxxoPayments" - ] - """ - The oxxo_payments capability. - """ - p24_payments: NotRequired[ - "Account.CreateParamsCapabilitiesP24Payments" - ] - """ - The p24_payments capability. - """ - pay_by_bank_payments: NotRequired[ - "Account.CreateParamsCapabilitiesPayByBankPayments" - ] - """ - The pay_by_bank_payments capability. - """ - payco_payments: NotRequired[ - "Account.CreateParamsCapabilitiesPaycoPayments" - ] - """ - The payco_payments capability. - """ - paynow_payments: NotRequired[ - "Account.CreateParamsCapabilitiesPaynowPayments" - ] - """ - The paynow_payments capability. - """ - paypal_payments: NotRequired[ - "Account.CreateParamsCapabilitiesPaypalPayments" - ] - """ - The paypal_payments capability. - """ - paypay_payments: NotRequired[ - "Account.CreateParamsCapabilitiesPaypayPayments" - ] - """ - The paypay_payments capability. - """ - payto_payments: NotRequired[ - "Account.CreateParamsCapabilitiesPaytoPayments" - ] - """ - The payto_payments capability. - """ - pix_payments: NotRequired[ - "Account.CreateParamsCapabilitiesPixPayments" - ] - """ - The pix_payments capability. - """ - promptpay_payments: NotRequired[ - "Account.CreateParamsCapabilitiesPromptpayPayments" - ] - """ - The promptpay_payments capability. - """ - qris_payments: NotRequired[ - "Account.CreateParamsCapabilitiesQrisPayments" - ] - """ - The qris_payments capability. - """ - rechnung_payments: NotRequired[ - "Account.CreateParamsCapabilitiesRechnungPayments" - ] - """ - The rechnung_payments capability. - """ - revolut_pay_payments: NotRequired[ - "Account.CreateParamsCapabilitiesRevolutPayPayments" - ] - """ - The revolut_pay_payments capability. - """ - samsung_pay_payments: NotRequired[ - "Account.CreateParamsCapabilitiesSamsungPayPayments" - ] - """ - The samsung_pay_payments capability. - """ - satispay_payments: NotRequired[ - "Account.CreateParamsCapabilitiesSatispayPayments" - ] - """ - The satispay_payments capability. - """ - sepa_bank_transfer_payments: NotRequired[ - "Account.CreateParamsCapabilitiesSepaBankTransferPayments" - ] - """ - The sepa_bank_transfer_payments capability. - """ - sepa_debit_payments: NotRequired[ - "Account.CreateParamsCapabilitiesSepaDebitPayments" - ] - """ - The sepa_debit_payments capability. - """ - shopeepay_payments: NotRequired[ - "Account.CreateParamsCapabilitiesShopeepayPayments" - ] - """ - The shopeepay_payments capability. - """ - sofort_payments: NotRequired[ - "Account.CreateParamsCapabilitiesSofortPayments" - ] - """ - The sofort_payments capability. - """ - stripe_balance_payments: NotRequired[ - "Account.CreateParamsCapabilitiesStripeBalancePayments" - ] - """ - The stripe_balance_payments capability. - """ - swish_payments: NotRequired[ - "Account.CreateParamsCapabilitiesSwishPayments" - ] - """ - The swish_payments capability. - """ - tax_reporting_us_1099_k: NotRequired[ - "Account.CreateParamsCapabilitiesTaxReportingUs1099K" - ] - """ - The tax_reporting_us_1099_k capability. - """ - tax_reporting_us_1099_misc: NotRequired[ - "Account.CreateParamsCapabilitiesTaxReportingUs1099Misc" - ] - """ - The tax_reporting_us_1099_misc capability. - """ - transfers: NotRequired["Account.CreateParamsCapabilitiesTransfers"] - """ - The transfers capability. - """ - treasury: NotRequired["Account.CreateParamsCapabilitiesTreasury"] - """ - The treasury capability. - """ - treasury_evolve: NotRequired[ - "Account.CreateParamsCapabilitiesTreasuryEvolve" - ] - """ - The treasury_evolve capability. - """ - treasury_fifth_third: NotRequired[ - "Account.CreateParamsCapabilitiesTreasuryFifthThird" - ] - """ - The treasury_fifth_third capability. - """ - treasury_goldman_sachs: NotRequired[ - "Account.CreateParamsCapabilitiesTreasuryGoldmanSachs" - ] - """ - The treasury_goldman_sachs capability. - """ - twint_payments: NotRequired[ - "Account.CreateParamsCapabilitiesTwintPayments" - ] - """ - The twint_payments capability. - """ - us_bank_account_ach_payments: NotRequired[ - "Account.CreateParamsCapabilitiesUsBankAccountAchPayments" - ] - """ - The us_bank_account_ach_payments capability. - """ - us_bank_transfer_payments: NotRequired[ - "Account.CreateParamsCapabilitiesUsBankTransferPayments" - ] - """ - The us_bank_transfer_payments capability. - """ - zip_payments: NotRequired[ - "Account.CreateParamsCapabilitiesZipPayments" - ] - """ - The zip_payments capability. - """ - - class CreateParamsCapabilitiesAcssDebitPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesAffirmPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesAfterpayClearpayPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesAlmaPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesAmazonPayPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesAuBecsDebitPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesAutomaticIndirectTax(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesBacsDebitPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesBancontactPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesBankTransferPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesBilliePayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesBlikPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesBoletoPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesCardIssuing(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesCardPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesCartesBancairesPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesCashappPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesCryptoPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesEpsPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesFpxPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesGbBankTransferPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesGiropayPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesGopayPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesGrabpayPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesIdBankTransferPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesIdBankTransferPaymentsBca(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesIdealPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesIndiaInternationalPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesJcbPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesJpBankTransferPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesKakaoPayPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesKlarnaPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesKonbiniPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesKrCardPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesLegacyPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesLinkPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesMbWayPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesMobilepayPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesMultibancoPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesMxBankTransferPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesNaverPayPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesNzBankAccountBecsDebitPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesOxxoPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesP24Payments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesPayByBankPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesPaycoPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesPaynowPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesPaypalPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesPaypayPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesPaytoPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesPixPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesPromptpayPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesQrisPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesRechnungPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesRevolutPayPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesSamsungPayPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesSatispayPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesSepaBankTransferPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesSepaDebitPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesShopeepayPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesSofortPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesStripeBalancePayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesSwishPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesTaxReportingUs1099K(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesTaxReportingUs1099Misc(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesTransfers(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesTreasury(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesTreasuryEvolve(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesTreasuryFifthThird(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesTreasuryGoldmanSachs(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesTwintPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesUsBankAccountAchPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesUsBankTransferPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesZipPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCard(TypedDict): - object: Literal["card"] - address_city: NotRequired[str] - address_country: NotRequired[str] - address_line1: NotRequired[str] - address_line2: NotRequired[str] - address_state: NotRequired[str] - address_zip: NotRequired[str] - currency: NotRequired[str] - cvc: NotRequired[str] - exp_month: int - exp_year: int - name: NotRequired[str] - number: str - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. - """ - default_for_currency: NotRequired[bool] - - class CreateParamsCardToken(TypedDict): - object: Literal["card"] - currency: NotRequired[str] - token: str - - class CreateParamsCompany(TypedDict): - address: NotRequired["Account.CreateParamsCompanyAddress"] - """ - The company's primary address. - """ - address_kana: NotRequired["Account.CreateParamsCompanyAddressKana"] - """ - The Kana variation of the company's primary address (Japan only). - """ - address_kanji: NotRequired["Account.CreateParamsCompanyAddressKanji"] - """ - The Kanji variation of the company's primary address (Japan only). - """ - directors_provided: NotRequired[bool] - """ - Whether the company's directors have been provided. Set this Boolean to `true` after creating all the company's directors with [the Persons API](https://docs.stripe.com/api/persons) for accounts with a `relationship.director` requirement. This value is not automatically set to `true` after creating directors, so it needs to be updated to indicate all directors have been provided. - """ - directorship_declaration: NotRequired[ - "Account.CreateParamsCompanyDirectorshipDeclaration" - ] - """ - This hash is used to attest that the directors information provided to Stripe is both current and correct. - """ - executives_provided: NotRequired[bool] - """ - Whether the company's executives have been provided. Set this Boolean to `true` after creating all the company's executives with [the Persons API](https://docs.stripe.com/api/persons) for accounts with a `relationship.executive` requirement. - """ - export_license_id: NotRequired[str] - """ - The export license ID number of the company, also referred as Import Export Code (India only). - """ - export_purpose_code: NotRequired[str] - """ - The purpose code to use for export transactions (India only). - """ - name: NotRequired[str] - """ - The company's legal name. - """ - name_kana: NotRequired[str] - """ - The Kana variation of the company's legal name (Japan only). - """ - name_kanji: NotRequired[str] - """ - The Kanji variation of the company's legal name (Japan only). - """ - owners_provided: NotRequired[bool] - """ - Whether the company's owners have been provided. Set this Boolean to `true` after creating all the company's owners with [the Persons API](https://docs.stripe.com/api/persons) for accounts with a `relationship.owner` requirement. - """ - ownership_declaration: NotRequired[ - "Account.CreateParamsCompanyOwnershipDeclaration" - ] - """ - This hash is used to attest that the beneficial owner information provided to Stripe is both current and correct. - """ - ownership_exemption_reason: NotRequired[ - "Literal['']|Literal['qualified_entity_exceeds_ownership_threshold', 'qualifies_as_financial_institution']" - ] - """ - This value is used to determine if a business is exempt from providing ultimate beneficial owners. See [this support article](https://support.stripe.com/questions/exemption-from-providing-ownership-details) and [changelog](https://docs.stripe.com/changelog/acacia/2025-01-27/ownership-exemption-reason-accounts-api) for more details. - """ - phone: NotRequired[str] - """ - The company's phone number (used for verification). - """ - registration_date: NotRequired[ - "Literal['']|Account.CreateParamsCompanyRegistrationDate" - ] - """ - When the business was incorporated or registered. - """ - registration_number: NotRequired[str] - """ - The identification number given to a company when it is registered or incorporated, if distinct from the identification number used for filing taxes. (Examples are the CIN for companies and LLP IN for partnerships in India, and the Company Registration Number in Hong Kong). - """ - structure: NotRequired[ - "Literal['']|Literal['free_zone_establishment', 'free_zone_llc', 'government_instrumentality', 'governmental_unit', 'incorporated_non_profit', 'incorporated_partnership', 'limited_liability_partnership', 'llc', 'multi_member_llc', 'private_company', 'private_corporation', 'private_partnership', 'public_company', 'public_corporation', 'public_partnership', 'registered_charity', 'single_member_llc', 'sole_establishment', 'sole_proprietorship', 'tax_exempt_government_instrumentality', 'unincorporated_association', 'unincorporated_non_profit', 'unincorporated_partnership']" - ] - """ - The category identifying the legal structure of the company or legal entity. See [Business structure](https://docs.stripe.com/connect/identity-verification#business-structure) for more details. Pass an empty string to unset this value. - """ - tax_id: NotRequired[str] - """ - The business ID number of the company, as appropriate for the company's country. (Examples are an Employer ID Number in the U.S., a Business Number in Canada, or a Company Number in the UK.) - """ - tax_id_registrar: NotRequired[str] - """ - The jurisdiction in which the `tax_id` is registered (Germany-based companies only). - """ - vat_id: NotRequired[str] - """ - The VAT number of the company. - """ - verification: NotRequired["Account.CreateParamsCompanyVerification"] - """ - Information on the verification state of the company. - """ - - class CreateParamsCompanyAddress(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. - """ - - class CreateParamsCompanyAddressKana(TypedDict): - city: NotRequired[str] - """ - City or ward. - """ - 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] - """ - Block or building number. - """ - line2: NotRequired[str] - """ - Building details. - """ - postal_code: NotRequired[str] - """ - Postal code. - """ - state: NotRequired[str] - """ - Prefecture. - """ - town: NotRequired[str] - """ - Town or cho-me. - """ - - class CreateParamsCompanyAddressKanji(TypedDict): - city: NotRequired[str] - """ - City or ward. - """ - 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] - """ - Block or building number. - """ - line2: NotRequired[str] - """ - Building details. - """ - postal_code: NotRequired[str] - """ - Postal code. - """ - state: NotRequired[str] - """ - Prefecture. - """ - town: NotRequired[str] - """ - Town or cho-me. - """ - - class CreateParamsCompanyDirectorshipDeclaration(TypedDict): - date: NotRequired[int] - """ - The Unix timestamp marking when the directorship declaration attestation was made. - """ - ip: NotRequired[str] - """ - The IP address from which the directorship declaration attestation was made. - """ - user_agent: NotRequired[str] - """ - The user agent of the browser from which the directorship declaration attestation was made. - """ - - class CreateParamsCompanyOwnershipDeclaration(TypedDict): - date: NotRequired[int] - """ - The Unix timestamp marking when the beneficial owner attestation was made. - """ - ip: NotRequired[str] - """ - The IP address from which the beneficial owner attestation was made. - """ - user_agent: NotRequired[str] - """ - The user agent of the browser from which the beneficial owner attestation was made. - """ - - class CreateParamsCompanyRegistrationDate(TypedDict): - day: int - """ - The day of registration, between 1 and 31. - """ - month: int - """ - The month of registration, between 1 and 12. - """ - year: int - """ - The four-digit year of registration. - """ - - class CreateParamsCompanyVerification(TypedDict): - document: NotRequired[ - "Account.CreateParamsCompanyVerificationDocument" - ] - """ - A document verifying the business. - """ - - class CreateParamsCompanyVerificationDocument(TypedDict): - back: NotRequired[str] - """ - The back of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. - """ - front: NotRequired[str] - """ - The front of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. - """ - - class CreateParamsController(TypedDict): - application: NotRequired["Account.CreateParamsControllerApplication"] - """ - A hash of configuration describing the Connect application that controls the account. - """ - dashboard: NotRequired["Account.CreateParamsControllerDashboard"] - """ - Properties of the account's dashboard. - """ - fees: NotRequired["Account.CreateParamsControllerFees"] - """ - A hash of configuration for who pays Stripe fees for product usage on this account. - """ - losses: NotRequired["Account.CreateParamsControllerLosses"] - """ - A hash of configuration for products that have negative balance liability, and whether Stripe or a Connect application is responsible for them. - """ - requirement_collection: NotRequired[Literal["application", "stripe"]] - """ - A value indicating responsibility for collecting updated information when requirements on the account are due or change. Defaults to `stripe`. - """ - stripe_dashboard: NotRequired[ - "Account.CreateParamsControllerStripeDashboard" - ] - """ - A hash of configuration for Stripe-hosted dashboards. - """ - - class CreateParamsControllerApplication(TypedDict): - loss_liable: bool - """ - Whether the controller is liable for losses on this account. For details, see [Understanding Connect Account Balances](https://stripe.com/docs/connect/account-balances). - """ - onboarding_owner: NotRequired[bool] - """ - Whether the controller owns onboarding for this account. - """ - pricing_controls: NotRequired[bool] - """ - Whether the controller has pricing controls for this account. - """ - - class CreateParamsControllerDashboard(TypedDict): - type: NotRequired[Literal["express", "full", "none"]] - """ - Whether this account should have access to the full Stripe Dashboard (`full`), to the Express Dashboard (`express`), or to no Stripe-hosted dashboard (`none`). Defaults to `full`. - """ - - class CreateParamsControllerFees(TypedDict): - payer: NotRequired[Literal["account", "application"]] - """ - A value indicating the responsible payer of Stripe fees on this account. Defaults to `account`. Learn more about [fee behavior on connected accounts](https://docs.stripe.com/connect/direct-charges-fee-payer-behavior). - """ - - class CreateParamsControllerLosses(TypedDict): - payments: NotRequired[Literal["application", "stripe"]] - """ - A value indicating who is liable when this account can't pay back negative balances resulting from payments. Defaults to `stripe`. - """ - - class CreateParamsControllerStripeDashboard(TypedDict): - type: NotRequired[Literal["express", "full", "none"]] - """ - Whether this account should have access to the full Stripe Dashboard (`full`), to the Express Dashboard (`express`), or to no Stripe-hosted dashboard (`none`). Defaults to `full`. - """ - - class CreateParamsDocuments(TypedDict): - bank_account_ownership_verification: NotRequired[ - "Account.CreateParamsDocumentsBankAccountOwnershipVerification" - ] - """ - One or more documents that support the [Bank account ownership verification](https://support.stripe.com/questions/bank-account-ownership-verification) requirement. Must be a document associated with the account's primary active bank account that displays the last 4 digits of the account number, either a statement or a check. - """ - company_license: NotRequired[ - "Account.CreateParamsDocumentsCompanyLicense" - ] - """ - One or more documents that demonstrate proof of a company's license to operate. - """ - company_memorandum_of_association: NotRequired[ - "Account.CreateParamsDocumentsCompanyMemorandumOfAssociation" - ] - """ - One or more documents showing the company's Memorandum of Association. - """ - company_ministerial_decree: NotRequired[ - "Account.CreateParamsDocumentsCompanyMinisterialDecree" - ] - """ - (Certain countries only) One or more documents showing the ministerial decree legalizing the company's establishment. - """ - company_registration_verification: NotRequired[ - "Account.CreateParamsDocumentsCompanyRegistrationVerification" - ] - """ - One or more documents that demonstrate proof of a company's registration with the appropriate local authorities. - """ - company_tax_id_verification: NotRequired[ - "Account.CreateParamsDocumentsCompanyTaxIdVerification" - ] - """ - One or more documents that demonstrate proof of a company's tax ID. - """ - proof_of_address: NotRequired[ - "Account.CreateParamsDocumentsProofOfAddress" - ] - """ - One or more documents that demonstrate proof of address. - """ - proof_of_registration: NotRequired[ - "Account.CreateParamsDocumentsProofOfRegistration" - ] - """ - One or more documents showing the company's proof of registration with the national business registry. - """ - proof_of_ultimate_beneficial_ownership: NotRequired[ - "Account.CreateParamsDocumentsProofOfUltimateBeneficialOwnership" - ] - """ - One or more documents that demonstrate proof of ultimate beneficial ownership. - """ - - class CreateParamsDocumentsBankAccountOwnershipVerification(TypedDict): - files: NotRequired[List[str]] - """ - One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. - """ - - class CreateParamsDocumentsCompanyLicense(TypedDict): - files: NotRequired[List[str]] - """ - One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. - """ - - class CreateParamsDocumentsCompanyMemorandumOfAssociation(TypedDict): - files: NotRequired[List[str]] - """ - One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. - """ - - class CreateParamsDocumentsCompanyMinisterialDecree(TypedDict): - files: NotRequired[List[str]] - """ - One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. - """ - - class CreateParamsDocumentsCompanyRegistrationVerification(TypedDict): - files: NotRequired[List[str]] - """ - One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. - """ - - class CreateParamsDocumentsCompanyTaxIdVerification(TypedDict): - files: NotRequired[List[str]] - """ - One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. - """ - - class CreateParamsDocumentsProofOfAddress(TypedDict): - files: NotRequired[List[str]] - """ - One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. - """ - - class CreateParamsDocumentsProofOfRegistration(TypedDict): - files: NotRequired[List[str]] - """ - One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. - """ - - class CreateParamsDocumentsProofOfUltimateBeneficialOwnership(TypedDict): - files: NotRequired[List[str]] - """ - One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. - """ - - class CreateParamsGroups(TypedDict): - payments_pricing: NotRequired["Literal['']|str"] - """ - The group the account is in to determine their payments pricing, and null if the account is on customized pricing. [See the Platform pricing tool documentation](https://stripe.com/docs/connect/platform-pricing-tools) for details. - """ - - class CreateParamsIndividual(TypedDict): - address: NotRequired["Account.CreateParamsIndividualAddress"] - """ - The individual's primary address. - """ - address_kana: NotRequired["Account.CreateParamsIndividualAddressKana"] - """ - The Kana variation of the individual's primary address (Japan only). - """ - address_kanji: NotRequired[ - "Account.CreateParamsIndividualAddressKanji" - ] - """ - The Kanji variation of the individual's primary address (Japan only). - """ - dob: NotRequired["Literal['']|Account.CreateParamsIndividualDob"] - """ - The individual's date of birth. - """ - email: NotRequired[str] - """ - The individual's email address. - """ - first_name: NotRequired[str] - """ - The individual's first name. - """ - first_name_kana: NotRequired[str] - """ - The Kana variation of the individual's first name (Japan only). - """ - first_name_kanji: NotRequired[str] - """ - The Kanji variation of the individual's first name (Japan only). - """ - full_name_aliases: NotRequired["Literal['']|List[str]"] - """ - A list of alternate names or aliases that the individual is known by. - """ - gender: NotRequired[str] - """ - The individual's gender - """ - id_number: NotRequired[str] - """ - The government-issued ID number of the individual, as appropriate for the representative's country. (Examples are a Social Security Number in the U.S., or a Social Insurance Number in Canada). Instead of the number itself, you can also provide a [PII token created with Stripe.js](https://docs.stripe.com/js/tokens/create_token?type=pii). - """ - id_number_secondary: NotRequired[str] - """ - The government-issued secondary ID number of the individual, as appropriate for the representative's country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token created with Stripe.js](https://docs.stripe.com/js/tokens/create_token?type=pii). - """ - last_name: NotRequired[str] - """ - The individual's last name. - """ - last_name_kana: NotRequired[str] - """ - The Kana variation of the individual's last name (Japan only). - """ - last_name_kanji: NotRequired[str] - """ - The Kanji variation of the individual's last name (Japan only). - """ - maiden_name: NotRequired[str] - """ - The individual's maiden name. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - phone: NotRequired[str] - """ - The individual's phone number. - """ - political_exposure: NotRequired[Literal["existing", "none"]] - """ - Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. - """ - registered_address: NotRequired[ - "Account.CreateParamsIndividualRegisteredAddress" - ] - """ - The individual's registered address. - """ - relationship: NotRequired["Account.CreateParamsIndividualRelationship"] - """ - Describes the person's relationship to the account. - """ - ssn_last_4: NotRequired[str] - """ - The last four digits of the individual's Social Security Number (U.S. only). - """ - verification: NotRequired["Account.CreateParamsIndividualVerification"] - """ - The individual's verification document information. - """ - - class CreateParamsIndividualAddress(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. - """ - - class CreateParamsIndividualAddressKana(TypedDict): - city: NotRequired[str] - """ - City or ward. - """ - 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] - """ - Block or building number. - """ - line2: NotRequired[str] - """ - Building details. - """ - postal_code: NotRequired[str] - """ - Postal code. - """ - state: NotRequired[str] - """ - Prefecture. - """ - town: NotRequired[str] - """ - Town or cho-me. - """ - - class CreateParamsIndividualAddressKanji(TypedDict): - city: NotRequired[str] - """ - City or ward. - """ - 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] - """ - Block or building number. - """ - line2: NotRequired[str] - """ - Building details. - """ - postal_code: NotRequired[str] - """ - Postal code. - """ - state: NotRequired[str] - """ - Prefecture. - """ - town: NotRequired[str] - """ - Town or cho-me. - """ - - class CreateParamsIndividualDob(TypedDict): - day: int - """ - The day of birth, between 1 and 31. - """ - month: int - """ - The month of birth, between 1 and 12. - """ - year: int - """ - The four-digit year of birth. - """ - - class CreateParamsIndividualRegisteredAddress(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. - """ - - class CreateParamsIndividualRelationship(TypedDict): - director: NotRequired[bool] - """ - Whether the person is a director of the account's legal entity. Directors are typically members of the governing board of the company, or responsible for ensuring the company meets its regulatory obligations. - """ - executive: NotRequired[bool] - """ - Whether the person has significant responsibility to control, manage, or direct the organization. - """ - owner: NotRequired[bool] - """ - Whether the person is an owner of the account's legal entity. - """ - percent_ownership: NotRequired["Literal['']|float"] - """ - The percent owned by the person of the account's legal entity. - """ - title: NotRequired[str] - """ - The person's title (e.g., CEO, Support Engineer). - """ - - class CreateParamsIndividualVerification(TypedDict): - additional_document: NotRequired[ - "Account.CreateParamsIndividualVerificationAdditionalDocument" - ] - """ - A document showing address, either a passport, local ID card, or utility bill from a well-known utility company. - """ - document: NotRequired[ - "Account.CreateParamsIndividualVerificationDocument" - ] - """ - An identifying document, either a passport or local ID card. - """ - - class CreateParamsIndividualVerificationAdditionalDocument(TypedDict): - back: NotRequired[str] - """ - The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. - """ - front: NotRequired[str] - """ - The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. - """ - - class CreateParamsIndividualVerificationDocument(TypedDict): - back: NotRequired[str] - """ - The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. - """ - front: NotRequired[str] - """ - The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. - """ - - class CreateParamsRiskControls(TypedDict): - charges: NotRequired["Account.CreateParamsRiskControlsCharges"] - """ - Represents the risk control status of charges. Please see [this page for more details](https://stripe.com/docs/connect/pausing-payments-or-payouts-on-connected-accounts). - """ - payouts: NotRequired["Account.CreateParamsRiskControlsPayouts"] - """ - Represents the risk control status of payouts. Please see [this page for more details](https://stripe.com/docs/connect/pausing-payments-or-payouts-on-connected-accounts). - """ - - class CreateParamsRiskControlsCharges(TypedDict): - pause_requested: NotRequired[bool] - """ - To request to pause a risk control, pass `true`. To request to unpause a risk control, pass `false`. - There can be a delay before the risk control is paused or unpaused. - """ - - class CreateParamsRiskControlsPayouts(TypedDict): - pause_requested: NotRequired[bool] - """ - To request to pause a risk control, pass `true`. To request to unpause a risk control, pass `false`. - There can be a delay before the risk control is paused or unpaused. - """ - - class CreateParamsSettings(TypedDict): - bacs_debit_payments: NotRequired[ - "Account.CreateParamsSettingsBacsDebitPayments" - ] - """ - Settings specific to Bacs Direct Debit. - """ - bank_bca_onboarding: NotRequired[ - "Account.CreateParamsSettingsBankBcaOnboarding" - ] - """ - Settings specific to bank BCA onboarding for Indonesia bank transfers payments method. - """ - branding: NotRequired["Account.CreateParamsSettingsBranding"] - """ - Settings used to apply the account's branding to email receipts, invoices, Checkout, and other products. - """ - capital: NotRequired["Account.CreateParamsSettingsCapital"] - """ - Settings specific to the account's use of the Capital product. - """ - card_issuing: NotRequired["Account.CreateParamsSettingsCardIssuing"] - """ - Settings specific to the account's use of the Card Issuing product. - """ - card_payments: NotRequired["Account.CreateParamsSettingsCardPayments"] - """ - Settings specific to card charging on the account. - """ - invoices: NotRequired["Account.CreateParamsSettingsInvoices"] - """ - Settings specific to the account's use of Invoices. - """ - payments: NotRequired["Account.CreateParamsSettingsPayments"] - """ - Settings that apply across payment methods for charging on the account. - """ - payouts: NotRequired["Account.CreateParamsSettingsPayouts"] - """ - Settings specific to the account's payouts. - """ - tax_forms: NotRequired["Account.CreateParamsSettingsTaxForms"] - """ - Settings specific to the account's tax forms. - """ - treasury: NotRequired["Account.CreateParamsSettingsTreasury"] - """ - Settings specific to the account's Treasury FinancialAccounts. - """ - - class CreateParamsSettingsBacsDebitPayments(TypedDict): - display_name: NotRequired[str] - """ - The Bacs Direct Debit Display Name for this account. For payments made with Bacs Direct Debit, this name appears on the mandate as the statement descriptor. Mobile banking apps display it as the name of the business. To use custom branding, set the Bacs Direct Debit Display Name during or right after creation. Custom branding incurs an additional monthly fee for the platform. If you don't set the display name before requesting Bacs capability, it's automatically set as "Stripe" and the account is onboarded to Stripe branding, which is free. - """ - - class CreateParamsSettingsBankBcaOnboarding(TypedDict): - account_holder_name: NotRequired[str] - """ - Bank BCA business account holder name - """ - business_account_number: NotRequired[str] - """ - Bank BCA business account number - """ - - class CreateParamsSettingsBranding(TypedDict): - icon: NotRequired[str] - """ - (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) An icon for the account. Must be square and at least 128px x 128px. - """ - logo: NotRequired[str] - """ - (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) A logo for the account that will be used in Checkout instead of the icon and without the account's name next to it if provided. Must be at least 128px x 128px. - """ - primary_color: NotRequired[str] - """ - A CSS hex color value representing the primary branding color for this account. - """ - secondary_color: NotRequired[str] - """ - A CSS hex color value representing the secondary branding color for this account. - """ - - class CreateParamsSettingsCapital(TypedDict): - payout_destination: NotRequired[Dict[str, str]] - """ - Per-currency mapping of user-selected destination accounts used to pay out loans. - """ - payout_destination_selector: NotRequired[Dict[str, List[str]]] - """ - Per-currency mapping of all destination accounts eligible to receive Capital financing payouts. - """ - - class CreateParamsSettingsCardIssuing(TypedDict): - tos_acceptance: NotRequired[ - "Account.CreateParamsSettingsCardIssuingTosAcceptance" - ] - """ - Details on the account's acceptance of the [Stripe Issuing Terms and Disclosures](https://docs.stripe.com/issuing/connect/tos_acceptance). - """ - - class CreateParamsSettingsCardIssuingTosAcceptance(TypedDict): - date: NotRequired[int] - """ - The Unix timestamp marking when the account representative accepted the service agreement. - """ - ip: NotRequired[str] - """ - The IP address from which the account representative accepted the service agreement. - """ - user_agent: NotRequired["Literal['']|str"] - """ - The user agent of the browser from which the account representative accepted the service agreement. - """ - - class CreateParamsSettingsCardPayments(TypedDict): - decline_on: NotRequired[ - "Account.CreateParamsSettingsCardPaymentsDeclineOn" - ] - """ - Automatically declines certain charge types regardless of whether the card issuer accepted or declined the charge. - """ - statement_descriptor_prefix: NotRequired[str] - """ - The default text that appears on credit card statements when a charge is made. This field prefixes any dynamic `statement_descriptor` specified on the charge. `statement_descriptor_prefix` is useful for maximizing descriptor space for the dynamic portion. - """ - statement_descriptor_prefix_kana: NotRequired["Literal['']|str"] - """ - The Kana variation of the default text that appears on credit card statements when a charge is made (Japan only). This field prefixes any dynamic `statement_descriptor_suffix_kana` specified on the charge. `statement_descriptor_prefix_kana` is useful for maximizing descriptor space for the dynamic portion. - """ - statement_descriptor_prefix_kanji: NotRequired["Literal['']|str"] - """ - The Kanji variation of the default text that appears on credit card statements when a charge is made (Japan only). This field prefixes any dynamic `statement_descriptor_suffix_kanji` specified on the charge. `statement_descriptor_prefix_kanji` is useful for maximizing descriptor space for the dynamic portion. - """ - - class CreateParamsSettingsCardPaymentsDeclineOn(TypedDict): - avs_failure: NotRequired[bool] - """ - Whether Stripe automatically declines charges with an incorrect ZIP or postal code. This setting only applies when a ZIP or postal code is provided and they fail bank verification. - """ - cvc_failure: NotRequired[bool] - """ - Whether Stripe automatically declines charges with an incorrect CVC. This setting only applies when a CVC is provided and it fails bank verification. - """ - - class CreateParamsSettingsInvoices(TypedDict): - hosted_payment_method_save: NotRequired[ - Literal["always", "never", "offer"] - ] - """ - Whether payment methods should be saved when a payment is completed for a one-time invoices on a hosted invoice page. - """ - - class CreateParamsSettingsPayments(TypedDict): - statement_descriptor: NotRequired[str] - """ - The default text that appears on statements for non-card charges outside of Japan. For card charges, if you don't set a `statement_descriptor_prefix`, this text is also used as the statement descriptor prefix. In that case, if concatenating the statement descriptor suffix causes the combined statement descriptor to exceed 22 characters, we truncate the `statement_descriptor` text to limit the full descriptor to 22 characters. For more information about statement descriptors and their requirements, see the [account settings documentation](https://docs.stripe.com/get-started/account/statement-descriptors). - """ - statement_descriptor_kana: NotRequired[str] - """ - The Kana variation of `statement_descriptor` used for charges in Japan. Japanese statement descriptors have [special requirements](https://docs.stripe.com/get-started/account/statement-descriptors#set-japanese-statement-descriptors). - """ - statement_descriptor_kanji: NotRequired[str] - """ - The Kanji variation of `statement_descriptor` used for charges in Japan. Japanese statement descriptors have [special requirements](https://docs.stripe.com/get-started/account/statement-descriptors#set-japanese-statement-descriptors). - """ - - class CreateParamsSettingsPayouts(TypedDict): - debit_negative_balances: NotRequired[bool] - """ - A Boolean indicating whether Stripe should try to reclaim negative balances from an attached bank account. For details, see [Understanding Connect Account Balances](https://docs.stripe.com/connect/account-balances). - """ - schedule: NotRequired["Account.CreateParamsSettingsPayoutsSchedule"] - """ - Details on when funds from charges are available, and when they are paid out to an external account. For details, see our [Setting Bank and Debit Card Payouts](https://docs.stripe.com/connect/bank-transfers#payout-information) documentation. - """ - statement_descriptor: NotRequired[str] - """ - The text that appears on the bank account statement for payouts. If not set, this defaults to the platform's bank descriptor as set in the Dashboard. - """ - - class CreateParamsSettingsPayoutsSchedule(TypedDict): - delay_days: NotRequired["Literal['minimum']|int"] - """ - The number of days charge funds are held before being paid out. May also be set to `minimum`, representing the lowest available value for the account country. Default is `minimum`. The `delay_days` parameter remains at the last configured value if `interval` is `manual`. [Learn more about controlling payout delay days](https://docs.stripe.com/connect/manage-payout-schedule). - """ - interval: NotRequired[Literal["daily", "manual", "monthly", "weekly"]] - """ - How frequently available funds are paid out. One of: `daily`, `manual`, `weekly`, or `monthly`. Default is `daily`. - """ - monthly_anchor: NotRequired[int] - """ - The day of the month when available funds are paid out, specified as a number between 1--31. Payouts nominally scheduled between the 29th and 31st of the month are instead sent on the last day of a shorter month. Required and applicable only if `interval` is `monthly`. - """ - monthly_payout_days: NotRequired[List[int]] - """ - The days of the month when available funds are paid out, specified as an array of numbers between 1--31. Payouts nominally scheduled between the 29th and 31st of the month are instead sent on the last day of a shorter month. Required and applicable only if `interval` is `monthly` and `monthly_anchor` is not set. - """ - weekly_anchor: NotRequired[ - Literal[ - "friday", - "monday", - "saturday", - "sunday", - "thursday", - "tuesday", - "wednesday", - ] - ] - """ - The day of the week when available funds are paid out, specified as `monday`, `tuesday`, etc. Required and applicable only if `interval` is `weekly`. - """ - weekly_payout_days: NotRequired[ - List[ - Literal["friday", "monday", "thursday", "tuesday", "wednesday"] - ] - ] - """ - The days of the week when available funds are paid out, specified as an array, e.g., [`monday`, `tuesday`]. Required and applicable only if `interval` is `weekly`. - """ - - class CreateParamsSettingsTaxForms(TypedDict): - consented_to_paperless_delivery: NotRequired[bool] - """ - Whether the account opted out of receiving their tax forms by postal delivery. - """ - - class CreateParamsSettingsTreasury(TypedDict): - tos_acceptance: NotRequired[ - "Account.CreateParamsSettingsTreasuryTosAcceptance" - ] - """ - Details on the account's acceptance of the Stripe Treasury Services Agreement. - """ - - class CreateParamsSettingsTreasuryTosAcceptance(TypedDict): - date: NotRequired[int] - """ - The Unix timestamp marking when the account representative accepted the service agreement. - """ - ip: NotRequired[str] - """ - The IP address from which the account representative accepted the service agreement. - """ - user_agent: NotRequired["Literal['']|str"] - """ - The user agent of the browser from which the account representative accepted the service agreement. - """ - - class CreateParamsTosAcceptance(TypedDict): - date: NotRequired[int] - """ - The Unix timestamp marking when the account representative accepted their service agreement. - """ - ip: NotRequired[str] - """ - The IP address from which the account representative accepted their service agreement. - """ - service_agreement: NotRequired[str] - """ - The user's service agreement type. - """ - user_agent: NotRequired[str] - """ - The user agent of the browser from which the account representative accepted their service agreement. - """ - - class CreatePersonParams(RequestOptions): - additional_tos_acceptances: NotRequired[ - "Account.CreatePersonParamsAdditionalTosAcceptances" - ] - """ - Details on the legal guardian's or authorizer's acceptance of the required Stripe agreements. - """ - address: NotRequired["Account.CreatePersonParamsAddress"] - """ - The person's address. - """ - address_kana: NotRequired["Account.CreatePersonParamsAddressKana"] - """ - The Kana variation of the person's address (Japan only). - """ - address_kanji: NotRequired["Account.CreatePersonParamsAddressKanji"] - """ - The Kanji variation of the person's address (Japan only). - """ - dob: NotRequired["Literal['']|Account.CreatePersonParamsDob"] - """ - The person's date of birth. - """ - documents: NotRequired["Account.CreatePersonParamsDocuments"] - """ - Documents that may be submitted to satisfy various informational requests. - """ - email: NotRequired[str] - """ - The person's email address. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - first_name: NotRequired[str] - """ - The person's first name. - """ - first_name_kana: NotRequired[str] - """ - The Kana variation of the person's first name (Japan only). - """ - first_name_kanji: NotRequired[str] - """ - The Kanji variation of the person's first name (Japan only). - """ - full_name_aliases: NotRequired["Literal['']|List[str]"] - """ - A list of alternate names or aliases that the person is known by. - """ - gender: NotRequired[str] - """ - The person's gender (International regulations require either "male" or "female"). - """ - id_number: NotRequired[str] - """ - The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://docs.stripe.com/js/tokens/create_token?type=pii). - """ - id_number_secondary: NotRequired[str] - """ - The person's secondary ID number, as appropriate for their country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://docs.stripe.com/js/tokens/create_token?type=pii). - """ - last_name: NotRequired[str] - """ - The person's last name. - """ - last_name_kana: NotRequired[str] - """ - The Kana variation of the person's last name (Japan only). - """ - last_name_kanji: NotRequired[str] - """ - The Kanji variation of the person's last name (Japan only). - """ - maiden_name: NotRequired[str] - """ - The person's maiden name. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - nationality: NotRequired[str] - """ - The country where the person is a national. Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)), or "XX" if unavailable. - """ - person_token: NotRequired[str] - """ - A [person token](https://docs.stripe.com/connect/account-tokens), used to securely provide details to the person. - """ - phone: NotRequired[str] - """ - The person's phone number. - """ - political_exposure: NotRequired[Literal["existing", "none"]] - """ - Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. - """ - registered_address: NotRequired[ - "Account.CreatePersonParamsRegisteredAddress" - ] - """ - The person's registered address. - """ - relationship: NotRequired["Account.CreatePersonParamsRelationship"] - """ - The relationship that this person has with the account's legal entity. - """ - ssn_last_4: NotRequired[str] - """ - The last four digits of the person's Social Security number (U.S. only). - """ - us_cfpb_data: NotRequired["Account.CreatePersonParamsUsCfpbData"] - """ - Demographic data related to the person. - """ - verification: NotRequired["Account.CreatePersonParamsVerification"] - """ - The person's verification status. - """ - - class CreatePersonParamsAdditionalTosAcceptances(TypedDict): - account: NotRequired[ - "Account.CreatePersonParamsAdditionalTosAcceptancesAccount" - ] - """ - Details on the legal guardian's acceptance of the main Stripe service agreement. - """ - - class CreatePersonParamsAdditionalTosAcceptancesAccount(TypedDict): - date: NotRequired[int] - """ - The Unix timestamp marking when the account representative accepted the service agreement. - """ - ip: NotRequired[str] - """ - The IP address from which the account representative accepted the service agreement. - """ - user_agent: NotRequired["Literal['']|str"] - """ - The user agent of the browser from which the account representative accepted the service agreement. - """ - - class CreatePersonParamsAddress(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. - """ - - class CreatePersonParamsAddressKana(TypedDict): - city: NotRequired[str] - """ - City or ward. - """ - 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] - """ - Block or building number. - """ - line2: NotRequired[str] - """ - Building details. - """ - postal_code: NotRequired[str] - """ - Postal code. - """ - state: NotRequired[str] - """ - Prefecture. - """ - town: NotRequired[str] - """ - Town or cho-me. - """ - - class CreatePersonParamsAddressKanji(TypedDict): - city: NotRequired[str] - """ - City or ward. - """ - 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] - """ - Block or building number. - """ - line2: NotRequired[str] - """ - Building details. - """ - postal_code: NotRequired[str] - """ - Postal code. - """ - state: NotRequired[str] - """ - Prefecture. - """ - town: NotRequired[str] - """ - Town or cho-me. - """ - - class CreatePersonParamsDob(TypedDict): - day: int - """ - The day of birth, between 1 and 31. - """ - month: int - """ - The month of birth, between 1 and 12. - """ - year: int - """ - The four-digit year of birth. - """ - - class CreatePersonParamsDocuments(TypedDict): - company_authorization: NotRequired[ - "Account.CreatePersonParamsDocumentsCompanyAuthorization" - ] - """ - One or more documents that demonstrate proof that this person is authorized to represent the company. - """ - passport: NotRequired["Account.CreatePersonParamsDocumentsPassport"] - """ - One or more documents showing the person's passport page with photo and personal data. - """ - visa: NotRequired["Account.CreatePersonParamsDocumentsVisa"] - """ - One or more documents showing the person's visa required for living in the country where they are residing. - """ - - class CreatePersonParamsDocumentsCompanyAuthorization(TypedDict): - files: NotRequired[List[str]] - """ - One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. - """ - - class CreatePersonParamsDocumentsPassport(TypedDict): - files: NotRequired[List[str]] - """ - One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. - """ - - class CreatePersonParamsDocumentsVisa(TypedDict): - files: NotRequired[List[str]] - """ - One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. - """ - - class CreatePersonParamsRegisteredAddress(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. - """ - - class CreatePersonParamsRelationship(TypedDict): - authorizer: NotRequired[bool] - """ - Whether the person is the authorizer of the account's representative. - """ - director: NotRequired[bool] - """ - Whether the person is a director of the account's legal entity. Directors are typically members of the governing board of the company, or responsible for ensuring the company meets its regulatory obligations. - """ - executive: NotRequired[bool] - """ - Whether the person has significant responsibility to control, manage, or direct the organization. - """ - legal_guardian: NotRequired[bool] - """ - Whether the person is the legal guardian of the account's representative. - """ - owner: NotRequired[bool] - """ - Whether the person is an owner of the account's legal entity. - """ - percent_ownership: NotRequired["Literal['']|float"] - """ - The percent owned by the person of the account's legal entity. - """ - representative: NotRequired[bool] - """ - Whether the person is authorized as the primary representative of the account. This is the person nominated by the business to provide information about themselves, and general information about the account. There can only be one representative at any given time. At the time the account is created, this person should be set to the person responsible for opening the account. - """ - title: NotRequired[str] - """ - The person's title (e.g., CEO, Support Engineer). - """ - - class CreatePersonParamsUsCfpbData(TypedDict): - ethnicity_details: NotRequired[ - "Account.CreatePersonParamsUsCfpbDataEthnicityDetails" - ] - """ - The persons ethnicity details - """ - race_details: NotRequired[ - "Account.CreatePersonParamsUsCfpbDataRaceDetails" - ] - """ - The persons race details - """ - self_identified_gender: NotRequired[str] - """ - The persons self-identified gender - """ - - class CreatePersonParamsUsCfpbDataEthnicityDetails(TypedDict): - ethnicity: NotRequired[ - List[ - Literal[ - "cuban", - "hispanic_or_latino", - "mexican", - "not_hispanic_or_latino", - "other_hispanic_or_latino", - "prefer_not_to_answer", - "puerto_rican", - ] - ] - ] - """ - The persons ethnicity - """ - ethnicity_other: NotRequired[str] - """ - Please specify your origin, when other is selected. - """ - - class CreatePersonParamsUsCfpbDataRaceDetails(TypedDict): - race: NotRequired[ - List[ - Literal[ - "african_american", - "american_indian_or_alaska_native", - "asian", - "asian_indian", - "black_or_african_american", - "chinese", - "ethiopian", - "filipino", - "guamanian_or_chamorro", - "haitian", - "jamaican", - "japanese", - "korean", - "native_hawaiian", - "native_hawaiian_or_other_pacific_islander", - "nigerian", - "other_asian", - "other_black_or_african_american", - "other_pacific_islander", - "prefer_not_to_answer", - "samoan", - "somali", - "vietnamese", - "white", - ] - ] - ] - """ - The persons race. - """ - race_other: NotRequired[str] - """ - Please specify your race, when other is selected. - """ - - class CreatePersonParamsVerification(TypedDict): - additional_document: NotRequired[ - "Account.CreatePersonParamsVerificationAdditionalDocument" - ] - """ - A document showing address, either a passport, local ID card, or utility bill from a well-known utility company. - """ - document: NotRequired["Account.CreatePersonParamsVerificationDocument"] - """ - An identifying document, either a passport or local ID card. - """ - - class CreatePersonParamsVerificationAdditionalDocument(TypedDict): - back: NotRequired[str] - """ - The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. - """ - front: NotRequired[str] - """ - The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. - """ - - class CreatePersonParamsVerificationDocument(TypedDict): - back: NotRequired[str] - """ - The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. - """ - front: NotRequired[str] - """ - The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. - """ - - class DeleteExternalAccountParams(RequestOptions): - pass - - class DeleteParams(RequestOptions): - pass - - class DeletePersonParams(RequestOptions): - pass - - class ListCapabilitiesParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class ListExternalAccountsParams(RequestOptions): - 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. - """ - object: NotRequired[Literal["bank_account", "card"]] - """ - Filter external accounts according to a particular object type. - """ - 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 ListParams(RequestOptions): - created: NotRequired["Account.ListParamsCreated|int"] - """ - Only return connected accounts that were created during the given date interval. - """ - 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 ListParamsCreated(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) - """ - - class ListPersonsParams(RequestOptions): - 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. - """ - relationship: NotRequired["Account.ListPersonsParamsRelationship"] - """ - Filters on the list of people returned based on the person's relationship to the account's company. - """ - 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 ListPersonsParamsRelationship(TypedDict): - authorizer: NotRequired[bool] - """ - A filter on the list of people returned based on whether these people are authorizers of the account's representative. - """ - director: NotRequired[bool] - """ - A filter on the list of people returned based on whether these people are directors of the account's company. - """ - executive: NotRequired[bool] - """ - A filter on the list of people returned based on whether these people are executives of the account's company. - """ - legal_guardian: NotRequired[bool] - """ - A filter on the list of people returned based on whether these people are legal guardians of the account's representative. - """ - owner: NotRequired[bool] - """ - A filter on the list of people returned based on whether these people are owners of the account's company. - """ - representative: NotRequired[bool] - """ - A filter on the list of people returned based on whether these people are the representative of the account's company. - """ - - class ModifyCapabilityParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - requested: NotRequired[bool] - """ - To request a new capability for an account, pass true. There can be a delay before the requested capability becomes active. If the capability has any activation requirements, the response includes them in the `requirements` arrays. - - If a capability isn't permanent, you can remove it from the account by passing false. Some capabilities are permanent after they've been requested. Attempting to remove a permanent capability returns an error. - """ - - class ModifyExternalAccountParams(RequestOptions): - account_holder_name: NotRequired[str] - """ - The name of the person or business that owns the bank account. - """ - account_holder_type: NotRequired[ - "Literal['']|Literal['company', 'individual']" - ] - """ - The type of entity that holds the account. This can be either `individual` or `company`. - """ - account_type: NotRequired[ - Literal["checking", "futsu", "savings", "toza"] - ] - """ - The bank account type. This can only be `checking` or `savings` in most countries. In Japan, this can only be `futsu` or `toza`. - """ - address_city: NotRequired[str] - """ - City/District/Suburb/Town/Village. - """ - address_country: NotRequired[str] - """ - Billing address country, if provided when creating card. - """ - address_line1: NotRequired[str] - """ - Address line 1 (Street address/PO Box/Company name). - """ - address_line2: NotRequired[str] - """ - Address line 2 (Apartment/Suite/Unit/Building). - """ - address_state: NotRequired[str] - """ - State/County/Province/Region. - """ - address_zip: NotRequired[str] - """ - ZIP or postal code. - """ - default_for_currency: NotRequired[bool] - """ - When set to true, this becomes the default external account for its currency. - """ - documents: NotRequired["Account.ModifyExternalAccountParamsDocuments"] - """ - Documents that may be submitted to satisfy various informational requests. - """ - exp_month: NotRequired[str] - """ - Two digit number representing the card's expiration month. - """ - exp_year: NotRequired[str] - """ - Four digit number representing the card's expiration year. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - name: NotRequired[str] - """ - Cardholder name. - """ - - class ModifyExternalAccountParamsDocuments(TypedDict): - bank_account_ownership_verification: NotRequired[ - "Account.ModifyExternalAccountParamsDocumentsBankAccountOwnershipVerification" - ] - """ - One or more documents that support the [Bank account ownership verification](https://support.stripe.com/questions/bank-account-ownership-verification) requirement. Must be a document associated with the bank account that displays the last 4 digits of the account number, either a statement or a check. - """ - - class ModifyExternalAccountParamsDocumentsBankAccountOwnershipVerification( - TypedDict, - ): - files: NotRequired[List[str]] - """ - One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. - """ - - class ModifyPersonParams(RequestOptions): - additional_tos_acceptances: NotRequired[ - "Account.ModifyPersonParamsAdditionalTosAcceptances" - ] - """ - Details on the legal guardian's or authorizer's acceptance of the required Stripe agreements. - """ - address: NotRequired["Account.ModifyPersonParamsAddress"] - """ - The person's address. - """ - address_kana: NotRequired["Account.ModifyPersonParamsAddressKana"] - """ - The Kana variation of the person's address (Japan only). - """ - address_kanji: NotRequired["Account.ModifyPersonParamsAddressKanji"] - """ - The Kanji variation of the person's address (Japan only). - """ - dob: NotRequired["Literal['']|Account.ModifyPersonParamsDob"] - """ - The person's date of birth. - """ - documents: NotRequired["Account.ModifyPersonParamsDocuments"] - """ - Documents that may be submitted to satisfy various informational requests. - """ - email: NotRequired[str] - """ - The person's email address. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - first_name: NotRequired[str] - """ - The person's first name. - """ - first_name_kana: NotRequired[str] - """ - The Kana variation of the person's first name (Japan only). - """ - first_name_kanji: NotRequired[str] - """ - The Kanji variation of the person's first name (Japan only). - """ - full_name_aliases: NotRequired["Literal['']|List[str]"] - """ - A list of alternate names or aliases that the person is known by. - """ - gender: NotRequired[str] - """ - The person's gender (International regulations require either "male" or "female"). - """ - id_number: NotRequired[str] - """ - The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://docs.stripe.com/js/tokens/create_token?type=pii). - """ - id_number_secondary: NotRequired[str] - """ - The person's secondary ID number, as appropriate for their country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://docs.stripe.com/js/tokens/create_token?type=pii). - """ - last_name: NotRequired[str] - """ - The person's last name. - """ - last_name_kana: NotRequired[str] - """ - The Kana variation of the person's last name (Japan only). - """ - last_name_kanji: NotRequired[str] - """ - The Kanji variation of the person's last name (Japan only). - """ - maiden_name: NotRequired[str] - """ - The person's maiden name. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - nationality: NotRequired[str] - """ - The country where the person is a national. Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)), or "XX" if unavailable. - """ - person_token: NotRequired[str] - """ - A [person token](https://docs.stripe.com/connect/account-tokens), used to securely provide details to the person. - """ - phone: NotRequired[str] - """ - The person's phone number. - """ - political_exposure: NotRequired[Literal["existing", "none"]] - """ - Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. - """ - registered_address: NotRequired[ - "Account.ModifyPersonParamsRegisteredAddress" - ] - """ - The person's registered address. - """ - relationship: NotRequired["Account.ModifyPersonParamsRelationship"] - """ - The relationship that this person has with the account's legal entity. - """ - ssn_last_4: NotRequired[str] - """ - The last four digits of the person's Social Security number (U.S. only). - """ - us_cfpb_data: NotRequired["Account.ModifyPersonParamsUsCfpbData"] - """ - Demographic data related to the person. - """ - verification: NotRequired["Account.ModifyPersonParamsVerification"] - """ - The person's verification status. - """ - - class ModifyPersonParamsAdditionalTosAcceptances(TypedDict): - account: NotRequired[ - "Account.ModifyPersonParamsAdditionalTosAcceptancesAccount" - ] - """ - Details on the legal guardian's acceptance of the main Stripe service agreement. - """ - - class ModifyPersonParamsAdditionalTosAcceptancesAccount(TypedDict): - date: NotRequired[int] - """ - The Unix timestamp marking when the account representative accepted the service agreement. - """ - ip: NotRequired[str] - """ - The IP address from which the account representative accepted the service agreement. - """ - user_agent: NotRequired["Literal['']|str"] - """ - The user agent of the browser from which the account representative accepted the service agreement. - """ - - class ModifyPersonParamsAddress(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. - """ - - class ModifyPersonParamsAddressKana(TypedDict): - city: NotRequired[str] - """ - City or ward. - """ - 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] - """ - Block or building number. - """ - line2: NotRequired[str] - """ - Building details. - """ - postal_code: NotRequired[str] - """ - Postal code. - """ - state: NotRequired[str] - """ - Prefecture. - """ - town: NotRequired[str] - """ - Town or cho-me. - """ - - class ModifyPersonParamsAddressKanji(TypedDict): - city: NotRequired[str] - """ - City or ward. - """ - 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] - """ - Block or building number. - """ - line2: NotRequired[str] - """ - Building details. - """ - postal_code: NotRequired[str] - """ - Postal code. - """ - state: NotRequired[str] - """ - Prefecture. - """ - town: NotRequired[str] - """ - Town or cho-me. - """ - - class ModifyPersonParamsDob(TypedDict): - day: int - """ - The day of birth, between 1 and 31. - """ - month: int - """ - The month of birth, between 1 and 12. - """ - year: int - """ - The four-digit year of birth. - """ - - class ModifyPersonParamsDocuments(TypedDict): - company_authorization: NotRequired[ - "Account.ModifyPersonParamsDocumentsCompanyAuthorization" - ] - """ - One or more documents that demonstrate proof that this person is authorized to represent the company. - """ - passport: NotRequired["Account.ModifyPersonParamsDocumentsPassport"] - """ - One or more documents showing the person's passport page with photo and personal data. - """ - visa: NotRequired["Account.ModifyPersonParamsDocumentsVisa"] - """ - One or more documents showing the person's visa required for living in the country where they are residing. - """ - - class ModifyPersonParamsDocumentsCompanyAuthorization(TypedDict): - files: NotRequired[List[str]] - """ - One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. - """ - - class ModifyPersonParamsDocumentsPassport(TypedDict): - files: NotRequired[List[str]] - """ - One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. - """ - - class ModifyPersonParamsDocumentsVisa(TypedDict): - files: NotRequired[List[str]] - """ - One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. - """ - - class ModifyPersonParamsRegisteredAddress(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. - """ - - class ModifyPersonParamsRelationship(TypedDict): - authorizer: NotRequired[bool] - """ - Whether the person is the authorizer of the account's representative. - """ - director: NotRequired[bool] - """ - Whether the person is a director of the account's legal entity. Directors are typically members of the governing board of the company, or responsible for ensuring the company meets its regulatory obligations. - """ - executive: NotRequired[bool] - """ - Whether the person has significant responsibility to control, manage, or direct the organization. - """ - legal_guardian: NotRequired[bool] - """ - Whether the person is the legal guardian of the account's representative. - """ - owner: NotRequired[bool] - """ - Whether the person is an owner of the account's legal entity. - """ - percent_ownership: NotRequired["Literal['']|float"] - """ - The percent owned by the person of the account's legal entity. - """ - representative: NotRequired[bool] - """ - Whether the person is authorized as the primary representative of the account. This is the person nominated by the business to provide information about themselves, and general information about the account. There can only be one representative at any given time. At the time the account is created, this person should be set to the person responsible for opening the account. - """ - title: NotRequired[str] - """ - The person's title (e.g., CEO, Support Engineer). - """ - - class ModifyPersonParamsUsCfpbData(TypedDict): - ethnicity_details: NotRequired[ - "Account.ModifyPersonParamsUsCfpbDataEthnicityDetails" - ] - """ - The persons ethnicity details - """ - race_details: NotRequired[ - "Account.ModifyPersonParamsUsCfpbDataRaceDetails" - ] - """ - The persons race details - """ - self_identified_gender: NotRequired[str] - """ - The persons self-identified gender - """ - - class ModifyPersonParamsUsCfpbDataEthnicityDetails(TypedDict): - ethnicity: NotRequired[ - List[ - Literal[ - "cuban", - "hispanic_or_latino", - "mexican", - "not_hispanic_or_latino", - "other_hispanic_or_latino", - "prefer_not_to_answer", - "puerto_rican", - ] - ] - ] - """ - The persons ethnicity - """ - ethnicity_other: NotRequired[str] - """ - Please specify your origin, when other is selected. - """ - - class ModifyPersonParamsUsCfpbDataRaceDetails(TypedDict): - race: NotRequired[ - List[ - Literal[ - "african_american", - "american_indian_or_alaska_native", - "asian", - "asian_indian", - "black_or_african_american", - "chinese", - "ethiopian", - "filipino", - "guamanian_or_chamorro", - "haitian", - "jamaican", - "japanese", - "korean", - "native_hawaiian", - "native_hawaiian_or_other_pacific_islander", - "nigerian", - "other_asian", - "other_black_or_african_american", - "other_pacific_islander", - "prefer_not_to_answer", - "samoan", - "somali", - "vietnamese", - "white", - ] - ] - ] - """ - The persons race. - """ - race_other: NotRequired[str] - """ - Please specify your race, when other is selected. - """ - - class ModifyPersonParamsVerification(TypedDict): - additional_document: NotRequired[ - "Account.ModifyPersonParamsVerificationAdditionalDocument" - ] - """ - A document showing address, either a passport, local ID card, or utility bill from a well-known utility company. - """ - document: NotRequired["Account.ModifyPersonParamsVerificationDocument"] - """ - An identifying document, either a passport or local ID card. - """ - - class ModifyPersonParamsVerificationAdditionalDocument(TypedDict): - back: NotRequired[str] - """ - The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. - """ - front: NotRequired[str] - """ - The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. - """ - - class ModifyPersonParamsVerificationDocument(TypedDict): - back: NotRequired[str] - """ - The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. - """ - front: NotRequired[str] - """ - The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. - """ - - class PersonsParams(RequestOptions): - 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. - """ - relationship: NotRequired["Account.PersonsParamsRelationship"] - """ - Filters on the list of people returned based on the person's relationship to the account's company. - """ - 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 PersonsParamsRelationship(TypedDict): - authorizer: NotRequired[bool] - """ - A filter on the list of people returned based on whether these people are authorizers of the account's representative. - """ - director: NotRequired[bool] - """ - A filter on the list of people returned based on whether these people are directors of the account's company. - """ - executive: NotRequired[bool] - """ - A filter on the list of people returned based on whether these people are executives of the account's company. - """ - legal_guardian: NotRequired[bool] - """ - A filter on the list of people returned based on whether these people are legal guardians of the account's representative. - """ - owner: NotRequired[bool] - """ - A filter on the list of people returned based on whether these people are owners of the account's company. - """ - representative: NotRequired[bool] - """ - A filter on the list of people returned based on whether these people are the representative of the account's company. - """ - - class RejectParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - reason: str - """ - The reason for rejecting the account. Can be `fraud`, `terms_of_service`, or `other`. - """ - - class RetrieveCapabilityParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class RetrieveExternalAccountParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class RetrievePersonParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - business_profile: Optional[BusinessProfile] """ Business information about the account. @@ -5012,7 +1630,7 @@ class RetrievePersonParams(RequestOptions): """ @classmethod - def create(cls, **params: Unpack["Account.CreateParams"]) -> "Account": + def create(cls, **params: Unpack["AccountCreateParams"]) -> "Account": """ With [Connect](https://docs.stripe.com/docs/connect), you can create Stripe accounts for your users. To do this, you'll first need to [register your platform](https://dashboard.stripe.com/account/applications/settings). @@ -5032,7 +1650,7 @@ def create(cls, **params: Unpack["Account.CreateParams"]) -> "Account": @classmethod async def create_async( - cls, **params: Unpack["Account.CreateParams"] + cls, **params: Unpack["AccountCreateParams"] ) -> "Account": """ With [Connect](https://docs.stripe.com/docs/connect), you can create Stripe accounts for your users. @@ -5053,7 +1671,7 @@ async def create_async( @classmethod def _cls_delete( - cls, sid: str, **params: Unpack["Account.DeleteParams"] + cls, sid: str, **params: Unpack["AccountDeleteParams"] ) -> "Account": """ With [Connect](https://docs.stripe.com/connect), you can delete accounts you manage. @@ -5076,9 +1694,7 @@ def _cls_delete( @overload @staticmethod - def delete( - sid: str, **params: Unpack["Account.DeleteParams"] - ) -> "Account": + def delete(sid: str, **params: Unpack["AccountDeleteParams"]) -> "Account": """ With [Connect](https://docs.stripe.com/connect), you can delete accounts you manage. @@ -5091,7 +1707,7 @@ def delete( ... @overload - def delete(self, **params: Unpack["Account.DeleteParams"]) -> "Account": + def delete(self, **params: Unpack["AccountDeleteParams"]) -> "Account": """ With [Connect](https://docs.stripe.com/connect), you can delete accounts you manage. @@ -5105,7 +1721,7 @@ def delete(self, **params: Unpack["Account.DeleteParams"]) -> "Account": @class_method_variant("_cls_delete") def delete( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Account.DeleteParams"] + self, **params: Unpack["AccountDeleteParams"] ) -> "Account": """ With [Connect](https://docs.stripe.com/connect), you can delete accounts you manage. @@ -5124,7 +1740,7 @@ def delete( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_delete_async( - cls, sid: str, **params: Unpack["Account.DeleteParams"] + cls, sid: str, **params: Unpack["AccountDeleteParams"] ) -> "Account": """ With [Connect](https://docs.stripe.com/connect), you can delete accounts you manage. @@ -5148,7 +1764,7 @@ async def _cls_delete_async( @overload @staticmethod async def delete_async( - sid: str, **params: Unpack["Account.DeleteParams"] + sid: str, **params: Unpack["AccountDeleteParams"] ) -> "Account": """ With [Connect](https://docs.stripe.com/connect), you can delete accounts you manage. @@ -5163,7 +1779,7 @@ async def delete_async( @overload async def delete_async( - self, **params: Unpack["Account.DeleteParams"] + self, **params: Unpack["AccountDeleteParams"] ) -> "Account": """ With [Connect](https://docs.stripe.com/connect), you can delete accounts you manage. @@ -5178,7 +1794,7 @@ async def delete_async( @class_method_variant("_cls_delete_async") async def delete_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Account.DeleteParams"] + self, **params: Unpack["AccountDeleteParams"] ) -> "Account": """ With [Connect](https://docs.stripe.com/connect), you can delete accounts you manage. @@ -5197,7 +1813,7 @@ async def delete_async( # pyright: ignore[reportGeneralTypeIssues] @classmethod def list( - cls, **params: Unpack["Account.ListParams"] + cls, **params: Unpack["AccountListParams"] ) -> ListObject["Account"]: """ Returns a list of accounts connected to your platform via [Connect](https://docs.stripe.com/docs/connect). If you're not a platform, the list is empty. @@ -5217,7 +1833,7 @@ def list( @classmethod async def list_async( - cls, **params: Unpack["Account.ListParams"] + cls, **params: Unpack["AccountListParams"] ) -> ListObject["Account"]: """ Returns a list of accounts connected to your platform via [Connect](https://docs.stripe.com/docs/connect). If you're not a platform, the list is empty. @@ -5237,7 +1853,7 @@ async def list_async( @classmethod def _cls_persons( - cls, account: str, **params: Unpack["Account.PersonsParams"] + cls, account: str, **params: Unpack["AccountPersonsParams"] ) -> ListObject["Person"]: """ Returns a list of people associated with the account's legal entity. The people are returned sorted by creation date, with the most recent people appearing first. @@ -5256,7 +1872,7 @@ def _cls_persons( @overload @staticmethod def persons( - account: str, **params: Unpack["Account.PersonsParams"] + account: str, **params: Unpack["AccountPersonsParams"] ) -> ListObject["Person"]: """ Returns a list of people associated with the account's legal entity. The people are returned sorted by creation date, with the most recent people appearing first. @@ -5265,7 +1881,7 @@ def persons( @overload def persons( - self, **params: Unpack["Account.PersonsParams"] + self, **params: Unpack["AccountPersonsParams"] ) -> ListObject["Person"]: """ Returns a list of people associated with the account's legal entity. The people are returned sorted by creation date, with the most recent people appearing first. @@ -5274,7 +1890,7 @@ def persons( @class_method_variant("_cls_persons") def persons( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Account.PersonsParams"] + self, **params: Unpack["AccountPersonsParams"] ) -> ListObject["Person"]: """ Returns a list of people associated with the account's legal entity. The people are returned sorted by creation date, with the most recent people appearing first. @@ -5292,7 +1908,7 @@ def persons( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_persons_async( - cls, account: str, **params: Unpack["Account.PersonsParams"] + cls, account: str, **params: Unpack["AccountPersonsParams"] ) -> ListObject["Person"]: """ Returns a list of people associated with the account's legal entity. The people are returned sorted by creation date, with the most recent people appearing first. @@ -5311,7 +1927,7 @@ async def _cls_persons_async( @overload @staticmethod async def persons_async( - account: str, **params: Unpack["Account.PersonsParams"] + account: str, **params: Unpack["AccountPersonsParams"] ) -> ListObject["Person"]: """ Returns a list of people associated with the account's legal entity. The people are returned sorted by creation date, with the most recent people appearing first. @@ -5320,7 +1936,7 @@ async def persons_async( @overload async def persons_async( - self, **params: Unpack["Account.PersonsParams"] + self, **params: Unpack["AccountPersonsParams"] ) -> ListObject["Person"]: """ Returns a list of people associated with the account's legal entity. The people are returned sorted by creation date, with the most recent people appearing first. @@ -5329,7 +1945,7 @@ async def persons_async( @class_method_variant("_cls_persons_async") async def persons_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Account.PersonsParams"] + self, **params: Unpack["AccountPersonsParams"] ) -> ListObject["Person"]: """ Returns a list of people associated with the account's legal entity. The people are returned sorted by creation date, with the most recent people appearing first. @@ -5347,7 +1963,7 @@ async def persons_async( # pyright: ignore[reportGeneralTypeIssues] @classmethod def _cls_reject( - cls, account: str, **params: Unpack["Account.RejectParams"] + cls, account: str, **params: Unpack["AccountRejectParams"] ) -> "Account": """ With [Connect](https://docs.stripe.com/connect), you can reject accounts that you have flagged as suspicious. @@ -5368,7 +1984,7 @@ def _cls_reject( @overload @staticmethod def reject( - account: str, **params: Unpack["Account.RejectParams"] + account: str, **params: Unpack["AccountRejectParams"] ) -> "Account": """ With [Connect](https://docs.stripe.com/connect), you can reject accounts that you have flagged as suspicious. @@ -5378,7 +1994,7 @@ def reject( ... @overload - def reject(self, **params: Unpack["Account.RejectParams"]) -> "Account": + def reject(self, **params: Unpack["AccountRejectParams"]) -> "Account": """ With [Connect](https://docs.stripe.com/connect), you can reject accounts that you have flagged as suspicious. @@ -5388,7 +2004,7 @@ def reject(self, **params: Unpack["Account.RejectParams"]) -> "Account": @class_method_variant("_cls_reject") def reject( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Account.RejectParams"] + self, **params: Unpack["AccountRejectParams"] ) -> "Account": """ With [Connect](https://docs.stripe.com/connect), you can reject accounts that you have flagged as suspicious. @@ -5408,7 +2024,7 @@ def reject( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_reject_async( - cls, account: str, **params: Unpack["Account.RejectParams"] + cls, account: str, **params: Unpack["AccountRejectParams"] ) -> "Account": """ With [Connect](https://docs.stripe.com/connect), you can reject accounts that you have flagged as suspicious. @@ -5429,7 +2045,7 @@ async def _cls_reject_async( @overload @staticmethod async def reject_async( - account: str, **params: Unpack["Account.RejectParams"] + account: str, **params: Unpack["AccountRejectParams"] ) -> "Account": """ With [Connect](https://docs.stripe.com/connect), you can reject accounts that you have flagged as suspicious. @@ -5440,7 +2056,7 @@ async def reject_async( @overload async def reject_async( - self, **params: Unpack["Account.RejectParams"] + self, **params: Unpack["AccountRejectParams"] ) -> "Account": """ With [Connect](https://docs.stripe.com/connect), you can reject accounts that you have flagged as suspicious. @@ -5451,7 +2067,7 @@ async def reject_async( @class_method_variant("_cls_reject_async") async def reject_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Account.RejectParams"] + self, **params: Unpack["AccountRejectParams"] ) -> "Account": """ With [Connect](https://docs.stripe.com/connect), you can reject accounts that you have flagged as suspicious. @@ -5521,7 +2137,7 @@ def serialize(self, previous): @classmethod def list_capabilities( - cls, account: str, **params: Unpack["Account.ListCapabilitiesParams"] + cls, account: str, **params: Unpack["AccountListCapabilitiesParams"] ) -> ListObject["Capability"]: """ Returns a list of capabilities associated with the account. The capabilities are returned sorted by creation date, with the most recent capability appearing first. @@ -5539,7 +2155,7 @@ def list_capabilities( @classmethod async def list_capabilities_async( - cls, account: str, **params: Unpack["Account.ListCapabilitiesParams"] + cls, account: str, **params: Unpack["AccountListCapabilitiesParams"] ) -> ListObject["Capability"]: """ Returns a list of capabilities associated with the account. The capabilities are returned sorted by creation date, with the most recent capability appearing first. @@ -5560,7 +2176,7 @@ def retrieve_capability( cls, account: str, capability: str, - **params: Unpack["Account.RetrieveCapabilityParams"], + **params: Unpack["AccountRetrieveCapabilityParams"], ) -> "Capability": """ Retrieves information about the specified Account Capability. @@ -5582,7 +2198,7 @@ async def retrieve_capability_async( cls, account: str, capability: str, - **params: Unpack["Account.RetrieveCapabilityParams"], + **params: Unpack["AccountRetrieveCapabilityParams"], ) -> "Capability": """ Retrieves information about the specified Account Capability. @@ -5604,7 +2220,7 @@ def modify_capability( cls, account: str, capability: str, - **params: Unpack["Account.ModifyCapabilityParams"], + **params: Unpack["AccountModifyCapabilityParams"], ) -> "Capability": """ Updates an existing Account Capability. Request or remove a capability by updating its requested parameter. @@ -5626,7 +2242,7 @@ async def modify_capability_async( cls, account: str, capability: str, - **params: Unpack["Account.ModifyCapabilityParams"], + **params: Unpack["AccountModifyCapabilityParams"], ) -> "Capability": """ Updates an existing Account Capability. Request or remove a capability by updating its requested parameter. @@ -5648,7 +2264,7 @@ def delete_external_account( cls, account: str, id: str, - **params: Unpack["Account.DeleteExternalAccountParams"], + **params: Unpack["AccountDeleteExternalAccountParams"], ) -> Union["BankAccount", "Card"]: """ Delete a specified external account for a given account. @@ -5669,7 +2285,7 @@ async def delete_external_account_async( cls, account: str, id: str, - **params: Unpack["Account.DeleteExternalAccountParams"], + **params: Unpack["AccountDeleteExternalAccountParams"], ) -> Union["BankAccount", "Card"]: """ Delete a specified external account for a given account. @@ -5690,7 +2306,7 @@ def retrieve_external_account( cls, account: str, id: str, - **params: Unpack["Account.RetrieveExternalAccountParams"], + **params: Unpack["AccountRetrieveExternalAccountParams"], ) -> Union["BankAccount", "Card"]: """ Retrieve a specified external account for a given account. @@ -5711,7 +2327,7 @@ async def retrieve_external_account_async( cls, account: str, id: str, - **params: Unpack["Account.RetrieveExternalAccountParams"], + **params: Unpack["AccountRetrieveExternalAccountParams"], ) -> Union["BankAccount", "Card"]: """ Retrieve a specified external account for a given account. @@ -5732,7 +2348,7 @@ def modify_external_account( cls, account: str, id: str, - **params: Unpack["Account.ModifyExternalAccountParams"], + **params: Unpack["AccountModifyExternalAccountParams"], ) -> Union["BankAccount", "Card"]: """ Updates the metadata, account holder name, account holder type of a bank account belonging to @@ -5760,7 +2376,7 @@ async def modify_external_account_async( cls, account: str, id: str, - **params: Unpack["Account.ModifyExternalAccountParams"], + **params: Unpack["AccountModifyExternalAccountParams"], ) -> Union["BankAccount", "Card"]: """ Updates the metadata, account holder name, account holder type of a bank account belonging to @@ -5787,7 +2403,7 @@ async def modify_external_account_async( def list_external_accounts( cls, account: str, - **params: Unpack["Account.ListExternalAccountsParams"], + **params: Unpack["AccountListExternalAccountsParams"], ) -> ListObject[Union["BankAccount", "Card"]]: """ List external accounts for an account. @@ -5807,7 +2423,7 @@ def list_external_accounts( async def list_external_accounts_async( cls, account: str, - **params: Unpack["Account.ListExternalAccountsParams"], + **params: Unpack["AccountListExternalAccountsParams"], ) -> ListObject[Union["BankAccount", "Card"]]: """ List external accounts for an account. @@ -5827,7 +2443,7 @@ async def list_external_accounts_async( def create_external_account( cls, account: str, - **params: Unpack["Account.CreateExternalAccountParams"], + **params: Unpack["AccountCreateExternalAccountParams"], ) -> Union["BankAccount", "Card"]: """ Create an external account for a given account. @@ -5847,7 +2463,7 @@ def create_external_account( async def create_external_account_async( cls, account: str, - **params: Unpack["Account.CreateExternalAccountParams"], + **params: Unpack["AccountCreateExternalAccountParams"], ) -> Union["BankAccount", "Card"]: """ Create an external account for a given account. @@ -5865,7 +2481,7 @@ async def create_external_account_async( @classmethod def create_login_link( - cls, account: str, **params: Unpack["Account.CreateLoginLinkParams"] + cls, account: str, **params: Unpack["AccountCreateLoginLinkParams"] ) -> "LoginLink": """ Creates a login link for a connected account to access the Express Dashboard. @@ -5885,7 +2501,7 @@ def create_login_link( @classmethod async def create_login_link_async( - cls, account: str, **params: Unpack["Account.CreateLoginLinkParams"] + cls, account: str, **params: Unpack["AccountCreateLoginLinkParams"] ) -> "LoginLink": """ Creates a login link for a connected account to access the Express Dashboard. @@ -5908,7 +2524,7 @@ def delete_person( cls, account: str, person: str, - **params: Unpack["Account.DeletePersonParams"], + **params: Unpack["AccountDeletePersonParams"], ) -> "Person": """ Deletes an existing person's relationship to the account's legal entity. Any person with a relationship for an account can be deleted through the API, except if the person is the account_opener. If your integration is using the executive parameter, you cannot delete the only verified executive on file. @@ -5929,7 +2545,7 @@ async def delete_person_async( cls, account: str, person: str, - **params: Unpack["Account.DeletePersonParams"], + **params: Unpack["AccountDeletePersonParams"], ) -> "Person": """ Deletes an existing person's relationship to the account's legal entity. Any person with a relationship for an account can be deleted through the API, except if the person is the account_opener. If your integration is using the executive parameter, you cannot delete the only verified executive on file. @@ -5950,7 +2566,7 @@ def retrieve_person( cls, account: str, person: str, - **params: Unpack["Account.RetrievePersonParams"], + **params: Unpack["AccountRetrievePersonParams"], ) -> "Person": """ Retrieves an existing person. @@ -5971,7 +2587,7 @@ async def retrieve_person_async( cls, account: str, person: str, - **params: Unpack["Account.RetrievePersonParams"], + **params: Unpack["AccountRetrievePersonParams"], ) -> "Person": """ Retrieves an existing person. @@ -5992,7 +2608,7 @@ def modify_person( cls, account: str, person: str, - **params: Unpack["Account.ModifyPersonParams"], + **params: Unpack["AccountModifyPersonParams"], ) -> "Person": """ Updates an existing person. @@ -6013,7 +2629,7 @@ async def modify_person_async( cls, account: str, person: str, - **params: Unpack["Account.ModifyPersonParams"], + **params: Unpack["AccountModifyPersonParams"], ) -> "Person": """ Updates an existing person. @@ -6031,7 +2647,7 @@ async def modify_person_async( @classmethod def list_persons( - cls, account: str, **params: Unpack["Account.ListPersonsParams"] + cls, account: str, **params: Unpack["AccountListPersonsParams"] ) -> ListObject["Person"]: """ Returns a list of people associated with the account's legal entity. The people are returned sorted by creation date, with the most recent people appearing first. @@ -6049,7 +2665,7 @@ def list_persons( @classmethod async def list_persons_async( - cls, account: str, **params: Unpack["Account.ListPersonsParams"] + cls, account: str, **params: Unpack["AccountListPersonsParams"] ) -> ListObject["Person"]: """ Returns a list of people associated with the account's legal entity. The people are returned sorted by creation date, with the most recent people appearing first. @@ -6067,7 +2683,7 @@ async def list_persons_async( @classmethod def create_person( - cls, account: str, **params: Unpack["Account.CreatePersonParams"] + cls, account: str, **params: Unpack["AccountCreatePersonParams"] ) -> "Person": """ Creates a new person. @@ -6085,7 +2701,7 @@ def create_person( @classmethod async def create_person_async( - cls, account: str, **params: Unpack["Account.CreatePersonParams"] + cls, account: str, **params: Unpack["AccountCreatePersonParams"] ) -> "Person": """ Creates a new person. diff --git a/stripe/_account_capability_service.py b/stripe/_account_capability_service.py index 56080f053..0c8b36a07 100644 --- a/stripe/_account_capability_service.py +++ b/stripe/_account_capability_service.py @@ -5,39 +5,26 @@ from stripe._request_options import RequestOptions from stripe._stripe_service import StripeService from stripe._util import sanitize_id -from typing import List, Optional, cast -from typing_extensions import NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params._account_capability_list_params import ( + AccountCapabilityListParams, + ) + from stripe.params._account_capability_retrieve_params import ( + AccountCapabilityRetrieveParams, + ) + from stripe.params._account_capability_update_params import ( + AccountCapabilityUpdateParams, + ) -class AccountCapabilityService(StripeService): - class ListParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class RetrieveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class UpdateParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - requested: NotRequired[bool] - """ - To request a new capability for an account, pass true. There can be a delay before the requested capability becomes active. If the capability has any activation requirements, the response includes them in the `requirements` arrays. - - If a capability isn't permanent, you can remove it from the account by passing false. Some capabilities are permanent after they've been requested. Attempting to remove a permanent capability returns an error. - """ +class AccountCapabilityService(StripeService): def list( self, account: str, - params: Optional["AccountCapabilityService.ListParams"] = None, + params: Optional["AccountCapabilityListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[Capability]: """ @@ -59,7 +46,7 @@ def list( async def list_async( self, account: str, - params: Optional["AccountCapabilityService.ListParams"] = None, + params: Optional["AccountCapabilityListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[Capability]: """ @@ -82,7 +69,7 @@ def retrieve( self, account: str, capability: str, - params: Optional["AccountCapabilityService.RetrieveParams"] = None, + params: Optional["AccountCapabilityRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Capability: """ @@ -106,7 +93,7 @@ async def retrieve_async( self, account: str, capability: str, - params: Optional["AccountCapabilityService.RetrieveParams"] = None, + params: Optional["AccountCapabilityRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Capability: """ @@ -130,7 +117,7 @@ def update( self, account: str, capability: str, - params: Optional["AccountCapabilityService.UpdateParams"] = None, + params: Optional["AccountCapabilityUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> Capability: """ @@ -154,7 +141,7 @@ async def update_async( self, account: str, capability: str, - params: Optional["AccountCapabilityService.UpdateParams"] = None, + params: Optional["AccountCapabilityUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> Capability: """ diff --git a/stripe/_account_external_account_service.py b/stripe/_account_external_account_service.py index d5c145e2b..0c357796a 100644 --- a/stripe/_account_external_account_service.py +++ b/stripe/_account_external_account_service.py @@ -6,207 +6,33 @@ from stripe._request_options import RequestOptions from stripe._stripe_service import StripeService from stripe._util import sanitize_id -from typing import Dict, List, Optional, Union, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, Union, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params._account_external_account_create_params import ( + AccountExternalAccountCreateParams, + ) + from stripe.params._account_external_account_delete_params import ( + AccountExternalAccountDeleteParams, + ) + from stripe.params._account_external_account_list_params import ( + AccountExternalAccountListParams, + ) + from stripe.params._account_external_account_retrieve_params import ( + AccountExternalAccountRetrieveParams, + ) + from stripe.params._account_external_account_update_params import ( + AccountExternalAccountUpdateParams, + ) -class AccountExternalAccountService(StripeService): - class CreateParams(TypedDict): - default_for_currency: NotRequired[bool] - """ - When set to true, or if this is the first external account added in this currency, this account becomes the default external account for its currency. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - external_account: Union[ - str, - "AccountExternalAccountService.CreateParamsCard", - "AccountExternalAccountService.CreateParamsBankAccount", - "AccountExternalAccountService.CreateParamsCardToken", - ] - """ - A token, like the ones returned by [Stripe.js](https://stripe.com/docs/js) or a dictionary containing a user's external account details (with the options shown below). Please refer to full [documentation](https://stripe.com/docs/api/external_accounts) instead. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - - class CreateParamsBankAccount(TypedDict): - object: Literal["bank_account"] - account_holder_name: NotRequired[str] - """ - The name of the person or business that owns the bank account.This field is required when attaching the bank account to a `Customer` object. - """ - account_holder_type: NotRequired[Literal["company", "individual"]] - """ - The type of entity that holds the account. It can be `company` or `individual`. This field is required when attaching the bank account to a `Customer` object. - """ - account_number: str - """ - The account number for the bank account, in string form. Must be a checking account. - """ - country: str - """ - The country in which the bank account is located. - """ - currency: NotRequired[str] - """ - The currency the bank account is in. This must be a country/currency pairing that [Stripe supports.](docs/payouts) - """ - routing_number: NotRequired[str] - """ - The routing number, sort code, or other country-appropriate institution number for the bank account. For US bank accounts, this is required and should be the ACH routing number, not the wire routing number. If you are providing an IBAN for `account_number`, this field is not required. - """ - - class CreateParamsCard(TypedDict): - object: Literal["card"] - address_city: NotRequired[str] - address_country: NotRequired[str] - address_line1: NotRequired[str] - address_line2: NotRequired[str] - address_state: NotRequired[str] - address_zip: NotRequired[str] - currency: NotRequired[str] - cvc: NotRequired[str] - exp_month: int - exp_year: int - name: NotRequired[str] - number: str - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. - """ - - class CreateParamsCardToken(TypedDict): - object: Literal["card"] - currency: NotRequired[str] - token: str - - class DeleteParams(TypedDict): - pass - - class ListParams(TypedDict): - 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. - """ - object: NotRequired[Literal["bank_account", "card"]] - """ - Filter external accounts according to a particular object type. - """ - 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 RetrieveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class UpdateParams(TypedDict): - account_holder_name: NotRequired[str] - """ - The name of the person or business that owns the bank account. - """ - account_holder_type: NotRequired[ - "Literal['']|Literal['company', 'individual']" - ] - """ - The type of entity that holds the account. This can be either `individual` or `company`. - """ - account_type: NotRequired[ - Literal["checking", "futsu", "savings", "toza"] - ] - """ - The bank account type. This can only be `checking` or `savings` in most countries. In Japan, this can only be `futsu` or `toza`. - """ - address_city: NotRequired[str] - """ - City/District/Suburb/Town/Village. - """ - address_country: NotRequired[str] - """ - Billing address country, if provided when creating card. - """ - address_line1: NotRequired[str] - """ - Address line 1 (Street address/PO Box/Company name). - """ - address_line2: NotRequired[str] - """ - Address line 2 (Apartment/Suite/Unit/Building). - """ - address_state: NotRequired[str] - """ - State/County/Province/Region. - """ - address_zip: NotRequired[str] - """ - ZIP or postal code. - """ - default_for_currency: NotRequired[bool] - """ - When set to true, this becomes the default external account for its currency. - """ - documents: NotRequired[ - "AccountExternalAccountService.UpdateParamsDocuments" - ] - """ - Documents that may be submitted to satisfy various informational requests. - """ - exp_month: NotRequired[str] - """ - Two digit number representing the card's expiration month. - """ - exp_year: NotRequired[str] - """ - Four digit number representing the card's expiration year. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - name: NotRequired[str] - """ - Cardholder name. - """ - - class UpdateParamsDocuments(TypedDict): - bank_account_ownership_verification: NotRequired[ - "AccountExternalAccountService.UpdateParamsDocumentsBankAccountOwnershipVerification" - ] - """ - One or more documents that support the [Bank account ownership verification](https://support.stripe.com/questions/bank-account-ownership-verification) requirement. Must be a document associated with the bank account that displays the last 4 digits of the account number, either a statement or a check. - """ - - class UpdateParamsDocumentsBankAccountOwnershipVerification(TypedDict): - files: NotRequired[List[str]] - """ - One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. - """ +class AccountExternalAccountService(StripeService): def delete( self, account: str, id: str, - params: Optional["AccountExternalAccountService.DeleteParams"] = None, + params: Optional["AccountExternalAccountDeleteParams"] = None, options: Optional[RequestOptions] = None, ) -> Union[BankAccount, Card]: """ @@ -230,7 +56,7 @@ async def delete_async( self, account: str, id: str, - params: Optional["AccountExternalAccountService.DeleteParams"] = None, + params: Optional["AccountExternalAccountDeleteParams"] = None, options: Optional[RequestOptions] = None, ) -> Union[BankAccount, Card]: """ @@ -254,9 +80,7 @@ def retrieve( self, account: str, id: str, - params: Optional[ - "AccountExternalAccountService.RetrieveParams" - ] = None, + params: Optional["AccountExternalAccountRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Union[BankAccount, Card]: """ @@ -280,9 +104,7 @@ async def retrieve_async( self, account: str, id: str, - params: Optional[ - "AccountExternalAccountService.RetrieveParams" - ] = None, + params: Optional["AccountExternalAccountRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Union[BankAccount, Card]: """ @@ -306,7 +128,7 @@ def update( self, account: str, id: str, - params: Optional["AccountExternalAccountService.UpdateParams"] = None, + params: Optional["AccountExternalAccountUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> Union[BankAccount, Card]: """ @@ -337,7 +159,7 @@ async def update_async( self, account: str, id: str, - params: Optional["AccountExternalAccountService.UpdateParams"] = None, + params: Optional["AccountExternalAccountUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> Union[BankAccount, Card]: """ @@ -367,7 +189,7 @@ async def update_async( def list( self, account: str, - params: Optional["AccountExternalAccountService.ListParams"] = None, + params: Optional["AccountExternalAccountListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[Union[BankAccount, Card]]: """ @@ -389,7 +211,7 @@ def list( async def list_async( self, account: str, - params: Optional["AccountExternalAccountService.ListParams"] = None, + params: Optional["AccountExternalAccountListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[Union[BankAccount, Card]]: """ @@ -411,7 +233,7 @@ async def list_async( def create( self, account: str, - params: "AccountExternalAccountService.CreateParams", + params: "AccountExternalAccountCreateParams", options: Optional[RequestOptions] = None, ) -> Union[BankAccount, Card]: """ @@ -433,7 +255,7 @@ def create( async def create_async( self, account: str, - params: "AccountExternalAccountService.CreateParams", + params: "AccountExternalAccountCreateParams", options: Optional[RequestOptions] = None, ) -> Union[BankAccount, Card]: """ diff --git a/stripe/_account_link.py b/stripe/_account_link.py index 03e7e0dcf..15043e9ee 100644 --- a/stripe/_account_link.py +++ b/stripe/_account_link.py @@ -1,9 +1,13 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._createable_api_resource import CreateableAPIResource -from stripe._request_options import RequestOptions -from typing import ClassVar, List, cast -from typing_extensions import Literal, NotRequired, TypedDict, Unpack +from typing import ClassVar, cast +from typing_extensions import Literal, Unpack, TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params._account_link_create_params import ( + AccountLinkCreateParams, + ) class AccountLink(CreateableAPIResource["AccountLink"]): @@ -15,56 +19,6 @@ class AccountLink(CreateableAPIResource["AccountLink"]): """ OBJECT_NAME: ClassVar[Literal["account_link"]] = "account_link" - - class CreateParams(RequestOptions): - account: str - """ - The identifier of the account to create an account link for. - """ - collect: NotRequired[Literal["currently_due", "eventually_due"]] - """ - The collect parameter is deprecated. Use `collection_options` instead. - """ - collection_options: NotRequired[ - "AccountLink.CreateParamsCollectionOptions" - ] - """ - Specifies the requirements that Stripe collects from connected accounts in the Connect Onboarding flow. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - refresh_url: NotRequired[str] - """ - The URL the user will be redirected to if the account link is expired, has been previously-visited, or is otherwise invalid. The URL you specify should attempt to generate a new account link with the same parameters used to create the original account link, then redirect the user to the new account link's URL so they can continue with Connect Onboarding. If a new account link cannot be generated or the redirect fails you should display a useful error to the user. - """ - return_url: NotRequired[str] - """ - The URL that the user will be redirected to upon leaving or completing the linked flow. - """ - type: Literal[ - "account_onboarding", - "account_update", - "capital_financing_offer", - "capital_financing_reporting", - ] - """ - The type of account link the user is requesting. - - You can create Account Links of type `account_update` only for connected accounts where your platform is responsible for collecting requirements, including Custom accounts. You can't create them for accounts that have access to a Stripe-hosted Dashboard. If you use [Connect embedded components](https://docs.stripe.com/connect/get-started-connect-embedded-components), you can include components that allow your connected accounts to update their own information. For an account without Stripe-hosted Dashboard access where Stripe is liable for negative balances, you must use embedded components. - """ - - class CreateParamsCollectionOptions(TypedDict): - fields: NotRequired[Literal["currently_due", "eventually_due"]] - """ - Specifies whether the platform collects only currently_due requirements (`currently_due`) or both currently_due and eventually_due requirements (`eventually_due`). If you don't specify `collection_options`, the default value is `currently_due`. - """ - future_requirements: NotRequired[Literal["include", "omit"]] - """ - Specifies whether the platform collects future_requirements in addition to requirements in Connect Onboarding. The default value is `omit`. - """ - created: int """ Time at which the object was created. Measured in seconds since the Unix epoch. @@ -84,7 +38,7 @@ class CreateParamsCollectionOptions(TypedDict): @classmethod def create( - cls, **params: Unpack["AccountLink.CreateParams"] + cls, **params: Unpack["AccountLinkCreateParams"] ) -> "AccountLink": """ Creates an AccountLink object that includes a single-use Stripe URL that the platform can redirect their user to in order to take them through the Connect Onboarding flow. @@ -100,7 +54,7 @@ def create( @classmethod async def create_async( - cls, **params: Unpack["AccountLink.CreateParams"] + cls, **params: Unpack["AccountLinkCreateParams"] ) -> "AccountLink": """ Creates an AccountLink object that includes a single-use Stripe URL that the platform can redirect their user to in order to take them through the Connect Onboarding flow. diff --git a/stripe/_account_link_service.py b/stripe/_account_link_service.py index 0aa0fc2ae..58bdf3321 100644 --- a/stripe/_account_link_service.py +++ b/stripe/_account_link_service.py @@ -3,63 +3,19 @@ from stripe._account_link import AccountLink from stripe._request_options import RequestOptions from stripe._stripe_service import StripeService -from typing import List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params._account_link_create_params import ( + AccountLinkCreateParams, + ) -class AccountLinkService(StripeService): - class CreateParams(TypedDict): - account: str - """ - The identifier of the account to create an account link for. - """ - collect: NotRequired[Literal["currently_due", "eventually_due"]] - """ - The collect parameter is deprecated. Use `collection_options` instead. - """ - collection_options: NotRequired[ - "AccountLinkService.CreateParamsCollectionOptions" - ] - """ - Specifies the requirements that Stripe collects from connected accounts in the Connect Onboarding flow. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - refresh_url: NotRequired[str] - """ - The URL the user will be redirected to if the account link is expired, has been previously-visited, or is otherwise invalid. The URL you specify should attempt to generate a new account link with the same parameters used to create the original account link, then redirect the user to the new account link's URL so they can continue with Connect Onboarding. If a new account link cannot be generated or the redirect fails you should display a useful error to the user. - """ - return_url: NotRequired[str] - """ - The URL that the user will be redirected to upon leaving or completing the linked flow. - """ - type: Literal[ - "account_onboarding", - "account_update", - "capital_financing_offer", - "capital_financing_reporting", - ] - """ - The type of account link the user is requesting. - - You can create Account Links of type `account_update` only for connected accounts where your platform is responsible for collecting requirements, including Custom accounts. You can't create them for accounts that have access to a Stripe-hosted Dashboard. If you use [Connect embedded components](https://docs.stripe.com/connect/get-started-connect-embedded-components), you can include components that allow your connected accounts to update their own information. For an account without Stripe-hosted Dashboard access where Stripe is liable for negative balances, you must use embedded components. - """ - - class CreateParamsCollectionOptions(TypedDict): - fields: NotRequired[Literal["currently_due", "eventually_due"]] - """ - Specifies whether the platform collects only currently_due requirements (`currently_due`) or both currently_due and eventually_due requirements (`eventually_due`). If you don't specify `collection_options`, the default value is `currently_due`. - """ - future_requirements: NotRequired[Literal["include", "omit"]] - """ - Specifies whether the platform collects future_requirements in addition to requirements in Connect Onboarding. The default value is `omit`. - """ +class AccountLinkService(StripeService): def create( self, - params: "AccountLinkService.CreateParams", + params: "AccountLinkCreateParams", options: Optional[RequestOptions] = None, ) -> AccountLink: """ @@ -78,7 +34,7 @@ def create( async def create_async( self, - params: "AccountLinkService.CreateParams", + params: "AccountLinkCreateParams", options: Optional[RequestOptions] = None, ) -> AccountLink: """ diff --git a/stripe/_account_login_link_service.py b/stripe/_account_login_link_service.py index 5a17f9369..d0019a683 100644 --- a/stripe/_account_login_link_service.py +++ b/stripe/_account_login_link_service.py @@ -4,21 +4,20 @@ from stripe._request_options import RequestOptions from stripe._stripe_service import StripeService from stripe._util import sanitize_id -from typing import List, Optional, cast -from typing_extensions import NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params._account_login_link_create_params import ( + AccountLoginLinkCreateParams, + ) -class AccountLoginLinkService(StripeService): - class CreateParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ +class AccountLoginLinkService(StripeService): def create( self, account: str, - params: Optional["AccountLoginLinkService.CreateParams"] = None, + params: Optional["AccountLoginLinkCreateParams"] = None, options: Optional[RequestOptions] = None, ) -> LoginLink: """ @@ -42,7 +41,7 @@ def create( async def create_async( self, account: str, - params: Optional["AccountLoginLinkService.CreateParams"] = None, + params: Optional["AccountLoginLinkCreateParams"] = None, options: Optional[RequestOptions] = None, ) -> LoginLink: """ diff --git a/stripe/_account_notice.py b/stripe/_account_notice.py index 182420add..92687e375 100644 --- a/stripe/_account_notice.py +++ b/stripe/_account_notice.py @@ -2,12 +2,22 @@ # File generated from our OpenAPI spec from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource -from stripe._request_options import RequestOptions from stripe._stripe_object import StripeObject from stripe._updateable_api_resource import UpdateableAPIResource from stripe._util import sanitize_id -from typing import ClassVar, Dict, List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict, Unpack +from typing import ClassVar, Dict, Optional, cast +from typing_extensions import Literal, Unpack, TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params._account_notice_list_params import ( + AccountNoticeListParams, + ) + from stripe.params._account_notice_modify_params import ( + AccountNoticeModifyParams, + ) + from stripe.params._account_notice_retrieve_params import ( + AccountNoticeRetrieveParams, + ) class AccountNotice( @@ -50,66 +60,6 @@ class LinkedObjects(StripeObject): Associated [Issuing Dispute](https://stripe.com/docs/api/issuing/disputes) """ - class ListParams(RequestOptions): - 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. - """ - sent: NotRequired[bool] - """ - Set to false to only return unsent AccountNotices. - """ - 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 ModifyParams(RequestOptions): - email: "AccountNotice.ModifyParamsEmail" - """ - Information about the email you sent. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - sent_at: int - """ - Date when you sent the notice. - """ - - class ModifyParamsEmail(TypedDict): - plain_text: str - """ - Content of the email in plain text. The copy must match exactly the language that Stripe Compliance has approved for use. - """ - recipient: str - """ - Email address of the recipient. - """ - subject: str - """ - Subject of the email. - """ - - class RetrieveParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - created: int """ Time at which the object was created. Measured in seconds since the Unix epoch. @@ -167,7 +117,7 @@ class RetrieveParams(RequestOptions): @classmethod def list( - cls, **params: Unpack["AccountNotice.ListParams"] + cls, **params: Unpack["AccountNoticeListParams"] ) -> ListObject["AccountNotice"]: """ Retrieves a list of AccountNotice objects. The objects are sorted in descending order by creation date, with the most-recently-created object appearing first. @@ -187,7 +137,7 @@ def list( @classmethod async def list_async( - cls, **params: Unpack["AccountNotice.ListParams"] + cls, **params: Unpack["AccountNoticeListParams"] ) -> ListObject["AccountNotice"]: """ Retrieves a list of AccountNotice objects. The objects are sorted in descending order by creation date, with the most-recently-created object appearing first. @@ -207,7 +157,7 @@ async def list_async( @classmethod def modify( - cls, id: str, **params: Unpack["AccountNotice.ModifyParams"] + cls, id: str, **params: Unpack["AccountNoticeModifyParams"] ) -> "AccountNotice": """ Updates an AccountNotice object. @@ -224,7 +174,7 @@ def modify( @classmethod async def modify_async( - cls, id: str, **params: Unpack["AccountNotice.ModifyParams"] + cls, id: str, **params: Unpack["AccountNoticeModifyParams"] ) -> "AccountNotice": """ Updates an AccountNotice object. @@ -241,7 +191,7 @@ async def modify_async( @classmethod def retrieve( - cls, id: str, **params: Unpack["AccountNotice.RetrieveParams"] + cls, id: str, **params: Unpack["AccountNoticeRetrieveParams"] ) -> "AccountNotice": """ Retrieves an AccountNotice object. @@ -252,7 +202,7 @@ def retrieve( @classmethod async def retrieve_async( - cls, id: str, **params: Unpack["AccountNotice.RetrieveParams"] + cls, id: str, **params: Unpack["AccountNoticeRetrieveParams"] ) -> "AccountNotice": """ Retrieves an AccountNotice object. diff --git a/stripe/_account_notice_service.py b/stripe/_account_notice_service.py index b2ea4de81..f979f8c77 100644 --- a/stripe/_account_notice_service.py +++ b/stripe/_account_notice_service.py @@ -5,74 +5,25 @@ from stripe._request_options import RequestOptions from stripe._stripe_service import StripeService from stripe._util import sanitize_id -from typing import Dict, List, Optional, cast -from typing_extensions import NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params._account_notice_list_params import ( + AccountNoticeListParams, + ) + from stripe.params._account_notice_retrieve_params import ( + AccountNoticeRetrieveParams, + ) + from stripe.params._account_notice_update_params import ( + AccountNoticeUpdateParams, + ) -class AccountNoticeService(StripeService): - class ListParams(TypedDict): - 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. - """ - sent: NotRequired[bool] - """ - Set to false to only return unsent AccountNotices. - """ - 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 RetrieveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class UpdateParams(TypedDict): - email: "AccountNoticeService.UpdateParamsEmail" - """ - Information about the email you sent. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - sent_at: int - """ - Date when you sent the notice. - """ - - class UpdateParamsEmail(TypedDict): - plain_text: str - """ - Content of the email in plain text. The copy must match exactly the language that Stripe Compliance has approved for use. - """ - recipient: str - """ - Email address of the recipient. - """ - subject: str - """ - Subject of the email. - """ +class AccountNoticeService(StripeService): def list( self, - params: Optional["AccountNoticeService.ListParams"] = None, + params: Optional["AccountNoticeListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[AccountNotice]: """ @@ -91,7 +42,7 @@ def list( async def list_async( self, - params: Optional["AccountNoticeService.ListParams"] = None, + params: Optional["AccountNoticeListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[AccountNotice]: """ @@ -111,7 +62,7 @@ async def list_async( def retrieve( self, account_notice: str, - params: Optional["AccountNoticeService.RetrieveParams"] = None, + params: Optional["AccountNoticeRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> AccountNotice: """ @@ -133,7 +84,7 @@ def retrieve( async def retrieve_async( self, account_notice: str, - params: Optional["AccountNoticeService.RetrieveParams"] = None, + params: Optional["AccountNoticeRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> AccountNotice: """ @@ -155,7 +106,7 @@ async def retrieve_async( def update( self, account_notice: str, - params: "AccountNoticeService.UpdateParams", + params: "AccountNoticeUpdateParams", options: Optional[RequestOptions] = None, ) -> AccountNotice: """ @@ -177,7 +128,7 @@ def update( async def update_async( self, account_notice: str, - params: "AccountNoticeService.UpdateParams", + params: "AccountNoticeUpdateParams", options: Optional[RequestOptions] = None, ) -> AccountNotice: """ diff --git a/stripe/_account_person_service.py b/stripe/_account_person_service.py index 563336706..9cb020b61 100644 --- a/stripe/_account_person_service.py +++ b/stripe/_account_person_service.py @@ -5,1001 +5,33 @@ from stripe._request_options import RequestOptions from stripe._stripe_service import StripeService from stripe._util import sanitize_id -from typing import Dict, List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params._account_person_create_params import ( + AccountPersonCreateParams, + ) + from stripe.params._account_person_delete_params import ( + AccountPersonDeleteParams, + ) + from stripe.params._account_person_list_params import ( + AccountPersonListParams, + ) + from stripe.params._account_person_retrieve_params import ( + AccountPersonRetrieveParams, + ) + from stripe.params._account_person_update_params import ( + AccountPersonUpdateParams, + ) class AccountPersonService(StripeService): - class CreateParams(TypedDict): - additional_tos_acceptances: NotRequired[ - "AccountPersonService.CreateParamsAdditionalTosAcceptances" - ] - """ - Details on the legal guardian's or authorizer's acceptance of the required Stripe agreements. - """ - address: NotRequired["AccountPersonService.CreateParamsAddress"] - """ - The person's address. - """ - address_kana: NotRequired[ - "AccountPersonService.CreateParamsAddressKana" - ] - """ - The Kana variation of the person's address (Japan only). - """ - address_kanji: NotRequired[ - "AccountPersonService.CreateParamsAddressKanji" - ] - """ - The Kanji variation of the person's address (Japan only). - """ - dob: NotRequired["Literal['']|AccountPersonService.CreateParamsDob"] - """ - The person's date of birth. - """ - documents: NotRequired["AccountPersonService.CreateParamsDocuments"] - """ - Documents that may be submitted to satisfy various informational requests. - """ - email: NotRequired[str] - """ - The person's email address. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - first_name: NotRequired[str] - """ - The person's first name. - """ - first_name_kana: NotRequired[str] - """ - The Kana variation of the person's first name (Japan only). - """ - first_name_kanji: NotRequired[str] - """ - The Kanji variation of the person's first name (Japan only). - """ - full_name_aliases: NotRequired["Literal['']|List[str]"] - """ - A list of alternate names or aliases that the person is known by. - """ - gender: NotRequired[str] - """ - The person's gender (International regulations require either "male" or "female"). - """ - id_number: NotRequired[str] - """ - The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://docs.stripe.com/js/tokens/create_token?type=pii). - """ - id_number_secondary: NotRequired[str] - """ - The person's secondary ID number, as appropriate for their country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://docs.stripe.com/js/tokens/create_token?type=pii). - """ - last_name: NotRequired[str] - """ - The person's last name. - """ - last_name_kana: NotRequired[str] - """ - The Kana variation of the person's last name (Japan only). - """ - last_name_kanji: NotRequired[str] - """ - The Kanji variation of the person's last name (Japan only). - """ - maiden_name: NotRequired[str] - """ - The person's maiden name. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - nationality: NotRequired[str] - """ - The country where the person is a national. Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)), or "XX" if unavailable. - """ - person_token: NotRequired[str] - """ - A [person token](https://docs.stripe.com/connect/account-tokens), used to securely provide details to the person. - """ - phone: NotRequired[str] - """ - The person's phone number. - """ - political_exposure: NotRequired[Literal["existing", "none"]] - """ - Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. - """ - registered_address: NotRequired[ - "AccountPersonService.CreateParamsRegisteredAddress" - ] - """ - The person's registered address. - """ - relationship: NotRequired[ - "AccountPersonService.CreateParamsRelationship" - ] - """ - The relationship that this person has with the account's legal entity. - """ - ssn_last_4: NotRequired[str] - """ - The last four digits of the person's Social Security number (U.S. only). - """ - us_cfpb_data: NotRequired[ - "AccountPersonService.CreateParamsUsCfpbData" - ] - """ - Demographic data related to the person. - """ - verification: NotRequired[ - "AccountPersonService.CreateParamsVerification" - ] - """ - The person's verification status. - """ - - class CreateParamsAdditionalTosAcceptances(TypedDict): - account: NotRequired[ - "AccountPersonService.CreateParamsAdditionalTosAcceptancesAccount" - ] - """ - Details on the legal guardian's acceptance of the main Stripe service agreement. - """ - - class CreateParamsAdditionalTosAcceptancesAccount(TypedDict): - date: NotRequired[int] - """ - The Unix timestamp marking when the account representative accepted the service agreement. - """ - ip: NotRequired[str] - """ - The IP address from which the account representative accepted the service agreement. - """ - user_agent: NotRequired["Literal['']|str"] - """ - The user agent of the browser from which the account representative accepted the service agreement. - """ - - class CreateParamsAddress(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. - """ - - class CreateParamsAddressKana(TypedDict): - city: NotRequired[str] - """ - City or ward. - """ - 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] - """ - Block or building number. - """ - line2: NotRequired[str] - """ - Building details. - """ - postal_code: NotRequired[str] - """ - Postal code. - """ - state: NotRequired[str] - """ - Prefecture. - """ - town: NotRequired[str] - """ - Town or cho-me. - """ - - class CreateParamsAddressKanji(TypedDict): - city: NotRequired[str] - """ - City or ward. - """ - 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] - """ - Block or building number. - """ - line2: NotRequired[str] - """ - Building details. - """ - postal_code: NotRequired[str] - """ - Postal code. - """ - state: NotRequired[str] - """ - Prefecture. - """ - town: NotRequired[str] - """ - Town or cho-me. - """ - - class CreateParamsDob(TypedDict): - day: int - """ - The day of birth, between 1 and 31. - """ - month: int - """ - The month of birth, between 1 and 12. - """ - year: int - """ - The four-digit year of birth. - """ - - class CreateParamsDocuments(TypedDict): - company_authorization: NotRequired[ - "AccountPersonService.CreateParamsDocumentsCompanyAuthorization" - ] - """ - One or more documents that demonstrate proof that this person is authorized to represent the company. - """ - passport: NotRequired[ - "AccountPersonService.CreateParamsDocumentsPassport" - ] - """ - One or more documents showing the person's passport page with photo and personal data. - """ - visa: NotRequired["AccountPersonService.CreateParamsDocumentsVisa"] - """ - One or more documents showing the person's visa required for living in the country where they are residing. - """ - - class CreateParamsDocumentsCompanyAuthorization(TypedDict): - files: NotRequired[List[str]] - """ - One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. - """ - - class CreateParamsDocumentsPassport(TypedDict): - files: NotRequired[List[str]] - """ - One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. - """ - - class CreateParamsDocumentsVisa(TypedDict): - files: NotRequired[List[str]] - """ - One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. - """ - - class CreateParamsRegisteredAddress(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. - """ - - class CreateParamsRelationship(TypedDict): - authorizer: NotRequired[bool] - """ - Whether the person is the authorizer of the account's representative. - """ - director: NotRequired[bool] - """ - Whether the person is a director of the account's legal entity. Directors are typically members of the governing board of the company, or responsible for ensuring the company meets its regulatory obligations. - """ - executive: NotRequired[bool] - """ - Whether the person has significant responsibility to control, manage, or direct the organization. - """ - legal_guardian: NotRequired[bool] - """ - Whether the person is the legal guardian of the account's representative. - """ - owner: NotRequired[bool] - """ - Whether the person is an owner of the account's legal entity. - """ - percent_ownership: NotRequired["Literal['']|float"] - """ - The percent owned by the person of the account's legal entity. - """ - representative: NotRequired[bool] - """ - Whether the person is authorized as the primary representative of the account. This is the person nominated by the business to provide information about themselves, and general information about the account. There can only be one representative at any given time. At the time the account is created, this person should be set to the person responsible for opening the account. - """ - title: NotRequired[str] - """ - The person's title (e.g., CEO, Support Engineer). - """ - - class CreateParamsUsCfpbData(TypedDict): - ethnicity_details: NotRequired[ - "AccountPersonService.CreateParamsUsCfpbDataEthnicityDetails" - ] - """ - The persons ethnicity details - """ - race_details: NotRequired[ - "AccountPersonService.CreateParamsUsCfpbDataRaceDetails" - ] - """ - The persons race details - """ - self_identified_gender: NotRequired[str] - """ - The persons self-identified gender - """ - - class CreateParamsUsCfpbDataEthnicityDetails(TypedDict): - ethnicity: NotRequired[ - List[ - Literal[ - "cuban", - "hispanic_or_latino", - "mexican", - "not_hispanic_or_latino", - "other_hispanic_or_latino", - "prefer_not_to_answer", - "puerto_rican", - ] - ] - ] - """ - The persons ethnicity - """ - ethnicity_other: NotRequired[str] - """ - Please specify your origin, when other is selected. - """ - - class CreateParamsUsCfpbDataRaceDetails(TypedDict): - race: NotRequired[ - List[ - Literal[ - "african_american", - "american_indian_or_alaska_native", - "asian", - "asian_indian", - "black_or_african_american", - "chinese", - "ethiopian", - "filipino", - "guamanian_or_chamorro", - "haitian", - "jamaican", - "japanese", - "korean", - "native_hawaiian", - "native_hawaiian_or_other_pacific_islander", - "nigerian", - "other_asian", - "other_black_or_african_american", - "other_pacific_islander", - "prefer_not_to_answer", - "samoan", - "somali", - "vietnamese", - "white", - ] - ] - ] - """ - The persons race. - """ - race_other: NotRequired[str] - """ - Please specify your race, when other is selected. - """ - - class CreateParamsVerification(TypedDict): - additional_document: NotRequired[ - "AccountPersonService.CreateParamsVerificationAdditionalDocument" - ] - """ - A document showing address, either a passport, local ID card, or utility bill from a well-known utility company. - """ - document: NotRequired[ - "AccountPersonService.CreateParamsVerificationDocument" - ] - """ - An identifying document, either a passport or local ID card. - """ - - class CreateParamsVerificationAdditionalDocument(TypedDict): - back: NotRequired[str] - """ - The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. - """ - front: NotRequired[str] - """ - The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. - """ - - class CreateParamsVerificationDocument(TypedDict): - back: NotRequired[str] - """ - The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. - """ - front: NotRequired[str] - """ - The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. - """ - - class DeleteParams(TypedDict): - pass - - class ListParams(TypedDict): - 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. - """ - relationship: NotRequired[ - "AccountPersonService.ListParamsRelationship" - ] - """ - Filters on the list of people returned based on the person's relationship to the account's company. - """ - 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 ListParamsRelationship(TypedDict): - authorizer: NotRequired[bool] - """ - A filter on the list of people returned based on whether these people are authorizers of the account's representative. - """ - director: NotRequired[bool] - """ - A filter on the list of people returned based on whether these people are directors of the account's company. - """ - executive: NotRequired[bool] - """ - A filter on the list of people returned based on whether these people are executives of the account's company. - """ - legal_guardian: NotRequired[bool] - """ - A filter on the list of people returned based on whether these people are legal guardians of the account's representative. - """ - owner: NotRequired[bool] - """ - A filter on the list of people returned based on whether these people are owners of the account's company. - """ - representative: NotRequired[bool] - """ - A filter on the list of people returned based on whether these people are the representative of the account's company. - """ - - class RetrieveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class UpdateParams(TypedDict): - additional_tos_acceptances: NotRequired[ - "AccountPersonService.UpdateParamsAdditionalTosAcceptances" - ] - """ - Details on the legal guardian's or authorizer's acceptance of the required Stripe agreements. - """ - address: NotRequired["AccountPersonService.UpdateParamsAddress"] - """ - The person's address. - """ - address_kana: NotRequired[ - "AccountPersonService.UpdateParamsAddressKana" - ] - """ - The Kana variation of the person's address (Japan only). - """ - address_kanji: NotRequired[ - "AccountPersonService.UpdateParamsAddressKanji" - ] - """ - The Kanji variation of the person's address (Japan only). - """ - dob: NotRequired["Literal['']|AccountPersonService.UpdateParamsDob"] - """ - The person's date of birth. - """ - documents: NotRequired["AccountPersonService.UpdateParamsDocuments"] - """ - Documents that may be submitted to satisfy various informational requests. - """ - email: NotRequired[str] - """ - The person's email address. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - first_name: NotRequired[str] - """ - The person's first name. - """ - first_name_kana: NotRequired[str] - """ - The Kana variation of the person's first name (Japan only). - """ - first_name_kanji: NotRequired[str] - """ - The Kanji variation of the person's first name (Japan only). - """ - full_name_aliases: NotRequired["Literal['']|List[str]"] - """ - A list of alternate names or aliases that the person is known by. - """ - gender: NotRequired[str] - """ - The person's gender (International regulations require either "male" or "female"). - """ - id_number: NotRequired[str] - """ - The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://docs.stripe.com/js/tokens/create_token?type=pii). - """ - id_number_secondary: NotRequired[str] - """ - The person's secondary ID number, as appropriate for their country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://docs.stripe.com/js/tokens/create_token?type=pii). - """ - last_name: NotRequired[str] - """ - The person's last name. - """ - last_name_kana: NotRequired[str] - """ - The Kana variation of the person's last name (Japan only). - """ - last_name_kanji: NotRequired[str] - """ - The Kanji variation of the person's last name (Japan only). - """ - maiden_name: NotRequired[str] - """ - The person's maiden name. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - nationality: NotRequired[str] - """ - The country where the person is a national. Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)), or "XX" if unavailable. - """ - person_token: NotRequired[str] - """ - A [person token](https://docs.stripe.com/connect/account-tokens), used to securely provide details to the person. - """ - phone: NotRequired[str] - """ - The person's phone number. - """ - political_exposure: NotRequired[Literal["existing", "none"]] - """ - Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. - """ - registered_address: NotRequired[ - "AccountPersonService.UpdateParamsRegisteredAddress" - ] - """ - The person's registered address. - """ - relationship: NotRequired[ - "AccountPersonService.UpdateParamsRelationship" - ] - """ - The relationship that this person has with the account's legal entity. - """ - ssn_last_4: NotRequired[str] - """ - The last four digits of the person's Social Security number (U.S. only). - """ - us_cfpb_data: NotRequired[ - "AccountPersonService.UpdateParamsUsCfpbData" - ] - """ - Demographic data related to the person. - """ - verification: NotRequired[ - "AccountPersonService.UpdateParamsVerification" - ] - """ - The person's verification status. - """ - - class UpdateParamsAdditionalTosAcceptances(TypedDict): - account: NotRequired[ - "AccountPersonService.UpdateParamsAdditionalTosAcceptancesAccount" - ] - """ - Details on the legal guardian's acceptance of the main Stripe service agreement. - """ - - class UpdateParamsAdditionalTosAcceptancesAccount(TypedDict): - date: NotRequired[int] - """ - The Unix timestamp marking when the account representative accepted the service agreement. - """ - ip: NotRequired[str] - """ - The IP address from which the account representative accepted the service agreement. - """ - user_agent: NotRequired["Literal['']|str"] - """ - The user agent of the browser from which the account representative accepted the service agreement. - """ - - class UpdateParamsAddress(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. - """ - - class UpdateParamsAddressKana(TypedDict): - city: NotRequired[str] - """ - City or ward. - """ - 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] - """ - Block or building number. - """ - line2: NotRequired[str] - """ - Building details. - """ - postal_code: NotRequired[str] - """ - Postal code. - """ - state: NotRequired[str] - """ - Prefecture. - """ - town: NotRequired[str] - """ - Town or cho-me. - """ - - class UpdateParamsAddressKanji(TypedDict): - city: NotRequired[str] - """ - City or ward. - """ - 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] - """ - Block or building number. - """ - line2: NotRequired[str] - """ - Building details. - """ - postal_code: NotRequired[str] - """ - Postal code. - """ - state: NotRequired[str] - """ - Prefecture. - """ - town: NotRequired[str] - """ - Town or cho-me. - """ - - class UpdateParamsDob(TypedDict): - day: int - """ - The day of birth, between 1 and 31. - """ - month: int - """ - The month of birth, between 1 and 12. - """ - year: int - """ - The four-digit year of birth. - """ - - class UpdateParamsDocuments(TypedDict): - company_authorization: NotRequired[ - "AccountPersonService.UpdateParamsDocumentsCompanyAuthorization" - ] - """ - One or more documents that demonstrate proof that this person is authorized to represent the company. - """ - passport: NotRequired[ - "AccountPersonService.UpdateParamsDocumentsPassport" - ] - """ - One or more documents showing the person's passport page with photo and personal data. - """ - visa: NotRequired["AccountPersonService.UpdateParamsDocumentsVisa"] - """ - One or more documents showing the person's visa required for living in the country where they are residing. - """ - - class UpdateParamsDocumentsCompanyAuthorization(TypedDict): - files: NotRequired[List[str]] - """ - One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. - """ - - class UpdateParamsDocumentsPassport(TypedDict): - files: NotRequired[List[str]] - """ - One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. - """ - - class UpdateParamsDocumentsVisa(TypedDict): - files: NotRequired[List[str]] - """ - One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. - """ - - class UpdateParamsRegisteredAddress(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. - """ - - class UpdateParamsRelationship(TypedDict): - authorizer: NotRequired[bool] - """ - Whether the person is the authorizer of the account's representative. - """ - director: NotRequired[bool] - """ - Whether the person is a director of the account's legal entity. Directors are typically members of the governing board of the company, or responsible for ensuring the company meets its regulatory obligations. - """ - executive: NotRequired[bool] - """ - Whether the person has significant responsibility to control, manage, or direct the organization. - """ - legal_guardian: NotRequired[bool] - """ - Whether the person is the legal guardian of the account's representative. - """ - owner: NotRequired[bool] - """ - Whether the person is an owner of the account's legal entity. - """ - percent_ownership: NotRequired["Literal['']|float"] - """ - The percent owned by the person of the account's legal entity. - """ - representative: NotRequired[bool] - """ - Whether the person is authorized as the primary representative of the account. This is the person nominated by the business to provide information about themselves, and general information about the account. There can only be one representative at any given time. At the time the account is created, this person should be set to the person responsible for opening the account. - """ - title: NotRequired[str] - """ - The person's title (e.g., CEO, Support Engineer). - """ - - class UpdateParamsUsCfpbData(TypedDict): - ethnicity_details: NotRequired[ - "AccountPersonService.UpdateParamsUsCfpbDataEthnicityDetails" - ] - """ - The persons ethnicity details - """ - race_details: NotRequired[ - "AccountPersonService.UpdateParamsUsCfpbDataRaceDetails" - ] - """ - The persons race details - """ - self_identified_gender: NotRequired[str] - """ - The persons self-identified gender - """ - - class UpdateParamsUsCfpbDataEthnicityDetails(TypedDict): - ethnicity: NotRequired[ - List[ - Literal[ - "cuban", - "hispanic_or_latino", - "mexican", - "not_hispanic_or_latino", - "other_hispanic_or_latino", - "prefer_not_to_answer", - "puerto_rican", - ] - ] - ] - """ - The persons ethnicity - """ - ethnicity_other: NotRequired[str] - """ - Please specify your origin, when other is selected. - """ - - class UpdateParamsUsCfpbDataRaceDetails(TypedDict): - race: NotRequired[ - List[ - Literal[ - "african_american", - "american_indian_or_alaska_native", - "asian", - "asian_indian", - "black_or_african_american", - "chinese", - "ethiopian", - "filipino", - "guamanian_or_chamorro", - "haitian", - "jamaican", - "japanese", - "korean", - "native_hawaiian", - "native_hawaiian_or_other_pacific_islander", - "nigerian", - "other_asian", - "other_black_or_african_american", - "other_pacific_islander", - "prefer_not_to_answer", - "samoan", - "somali", - "vietnamese", - "white", - ] - ] - ] - """ - The persons race. - """ - race_other: NotRequired[str] - """ - Please specify your race, when other is selected. - """ - - class UpdateParamsVerification(TypedDict): - additional_document: NotRequired[ - "AccountPersonService.UpdateParamsVerificationAdditionalDocument" - ] - """ - A document showing address, either a passport, local ID card, or utility bill from a well-known utility company. - """ - document: NotRequired[ - "AccountPersonService.UpdateParamsVerificationDocument" - ] - """ - An identifying document, either a passport or local ID card. - """ - - class UpdateParamsVerificationAdditionalDocument(TypedDict): - back: NotRequired[str] - """ - The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. - """ - front: NotRequired[str] - """ - The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. - """ - - class UpdateParamsVerificationDocument(TypedDict): - back: NotRequired[str] - """ - The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. - """ - front: NotRequired[str] - """ - The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. - """ - def delete( self, account: str, person: str, - params: Optional["AccountPersonService.DeleteParams"] = None, + params: Optional["AccountPersonDeleteParams"] = None, options: Optional[RequestOptions] = None, ) -> Person: """ @@ -1023,7 +55,7 @@ async def delete_async( self, account: str, person: str, - params: Optional["AccountPersonService.DeleteParams"] = None, + params: Optional["AccountPersonDeleteParams"] = None, options: Optional[RequestOptions] = None, ) -> Person: """ @@ -1047,7 +79,7 @@ def retrieve( self, account: str, person: str, - params: Optional["AccountPersonService.RetrieveParams"] = None, + params: Optional["AccountPersonRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Person: """ @@ -1071,7 +103,7 @@ async def retrieve_async( self, account: str, person: str, - params: Optional["AccountPersonService.RetrieveParams"] = None, + params: Optional["AccountPersonRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Person: """ @@ -1095,7 +127,7 @@ def update( self, account: str, person: str, - params: Optional["AccountPersonService.UpdateParams"] = None, + params: Optional["AccountPersonUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> Person: """ @@ -1119,7 +151,7 @@ async def update_async( self, account: str, person: str, - params: Optional["AccountPersonService.UpdateParams"] = None, + params: Optional["AccountPersonUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> Person: """ @@ -1142,7 +174,7 @@ async def update_async( def list( self, account: str, - params: Optional["AccountPersonService.ListParams"] = None, + params: Optional["AccountPersonListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[Person]: """ @@ -1164,7 +196,7 @@ def list( async def list_async( self, account: str, - params: Optional["AccountPersonService.ListParams"] = None, + params: Optional["AccountPersonListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[Person]: """ @@ -1186,7 +218,7 @@ async def list_async( def create( self, account: str, - params: Optional["AccountPersonService.CreateParams"] = None, + params: Optional["AccountPersonCreateParams"] = None, options: Optional[RequestOptions] = None, ) -> Person: """ @@ -1208,7 +240,7 @@ def create( async def create_async( self, account: str, - params: Optional["AccountPersonService.CreateParams"] = None, + params: Optional["AccountPersonCreateParams"] = None, options: Optional[RequestOptions] = None, ) -> Person: """ diff --git a/stripe/_account_service.py b/stripe/_account_service.py index b2baafd4a..526056251 100644 --- a/stripe/_account_service.py +++ b/stripe/_account_service.py @@ -11,8 +11,19 @@ from stripe._request_options import RequestOptions from stripe._stripe_service import StripeService from stripe._util import sanitize_id -from typing import Dict, List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params._account_create_params import AccountCreateParams + from stripe.params._account_delete_params import AccountDeleteParams + from stripe.params._account_list_params import AccountListParams + from stripe.params._account_reject_params import AccountRejectParams + from stripe.params._account_retrieve_current_params import ( + AccountRetrieveCurrentParams, + ) + from stripe.params._account_retrieve_params import AccountRetrieveParams + from stripe.params._account_update_params import AccountUpdateParams class AccountService(StripeService): @@ -23,4344 +34,10 @@ def __init__(self, requestor): self.login_links = AccountLoginLinkService(self._requestor) self.persons = AccountPersonService(self._requestor) - class CreateParams(TypedDict): - account_token: NotRequired[str] - """ - An [account token](https://stripe.com/docs/api#create_account_token), used to securely provide details to the account. - """ - business_profile: NotRequired[ - "AccountService.CreateParamsBusinessProfile" - ] - """ - Business information about the account. - """ - business_type: NotRequired[ - Literal["company", "government_entity", "individual", "non_profit"] - ] - """ - The business type. Once you create an [Account Link](https://docs.stripe.com/api/account_links) or [Account Session](https://docs.stripe.com/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](https://docs.stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. - """ - capabilities: NotRequired["AccountService.CreateParamsCapabilities"] - """ - Each key of the dictionary represents a capability, and each capability - maps to its settings (for example, whether it has been requested or not). Each - capability is inactive until you have provided its specific - requirements and Stripe has verified them. An account might have some - of its requested capabilities be active and some be inactive. - - Required when [account.controller.stripe_dashboard.type](https://docs.stripe.com/api/accounts/create#create_account-controller-dashboard-type) - is `none`, which includes Custom accounts. - """ - company: NotRequired["AccountService.CreateParamsCompany"] - """ - Information about the company or business. This field is available for any `business_type`. Once you create an [Account Link](https://docs.stripe.com/api/account_links) or [Account Session](https://docs.stripe.com/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](https://docs.stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. - """ - controller: NotRequired["AccountService.CreateParamsController"] - """ - A hash of configuration describing the account controller's attributes. - """ - country: NotRequired[str] - """ - The country in which the account holder resides, or in which the business is legally established. This should be an ISO 3166-1 alpha-2 country code. For example, if you are in the United States and the business for which you're creating an account is legally represented in Canada, you would use `CA` as the country for the account being created. Available countries include [Stripe's global markets](https://stripe.com/global) as well as countries where [cross-border payouts](https://stripe.com/docs/connect/cross-border-payouts) are supported. - """ - default_currency: NotRequired[str] - """ - Three-letter ISO currency code representing the default currency for the account. This must be a currency that [Stripe supports in the account's country](https://docs.stripe.com/payouts). - """ - documents: NotRequired["AccountService.CreateParamsDocuments"] - """ - Documents that may be submitted to satisfy various informational requests. - """ - email: NotRequired[str] - """ - The email address of the account holder. This is only to make the account easier to identify to you. If [controller.requirement_collection](https://docs.stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts, Stripe doesn't email the account without your consent. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - external_account: NotRequired[ - "str|AccountService.CreateParamsBankAccount|AccountService.CreateParamsCard|AccountService.CreateParamsCardToken" - ] - """ - A card or bank account to attach to the account for receiving [payouts](https://docs.stripe.com/connect/bank-debit-card-payouts) (you won't be able to use it for top-ups). You can provide either a token, like the ones returned by [Stripe.js](https://docs.stripe.com/js), or a dictionary, as documented in the `external_account` parameter for [bank account](https://docs.stripe.com/api#account_create_bank_account) creation. - - By default, providing an external account sets it as the new default external account for its currency, and deletes the old default if one exists. To add additional external accounts without replacing the existing default for the currency, use the [bank account](https://docs.stripe.com/api#account_create_bank_account) or [card creation](https://docs.stripe.com/api#account_create_card) APIs. After you create an [Account Link](https://docs.stripe.com/api/account_links) or [Account Session](https://docs.stripe.com/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](https://docs.stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. - """ - groups: NotRequired["AccountService.CreateParamsGroups"] - """ - A hash of account group type to tokens. These are account groups this account should be added to. - """ - individual: NotRequired["AccountService.CreateParamsIndividual"] - """ - Information about the person represented by the account. This field is null unless `business_type` is set to `individual`. Once you create an [Account Link](https://docs.stripe.com/api/account_links) or [Account Session](https://docs.stripe.com/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](https://docs.stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - risk_controls: NotRequired["AccountService.CreateParamsRiskControls"] - """ - A hash to configure risk controls on the account. Please see [this page for more details](https://docs.stripe.com/connect/pausing-payments-or-payouts-on-connected-accounts). - """ - settings: NotRequired["AccountService.CreateParamsSettings"] - """ - Options for customizing how the account functions within Stripe. - """ - tos_acceptance: NotRequired["AccountService.CreateParamsTosAcceptance"] - """ - Details on the account's acceptance of the [Stripe Services Agreement](https://docs.stripe.com/connect/updating-accounts#tos-acceptance). This property can only be updated for accounts where [controller.requirement_collection](https://docs.stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. This property defaults to a `full` service agreement when empty. - """ - type: NotRequired[Literal["custom", "express", "standard"]] - """ - The type of Stripe account to create. May be one of `custom`, `express` or `standard`. - """ - - class CreateParamsBankAccount(TypedDict): - object: Literal["bank_account"] - account_holder_name: NotRequired[str] - """ - The name of the person or business that owns the bank account.This field is required when attaching the bank account to a `Customer` object. - """ - account_holder_type: NotRequired[Literal["company", "individual"]] - """ - The type of entity that holds the account. It can be `company` or `individual`. This field is required when attaching the bank account to a `Customer` object. - """ - account_number: str - """ - The account number for the bank account, in string form. Must be a checking account. - """ - country: str - """ - The country in which the bank account is located. - """ - currency: NotRequired[str] - """ - The currency the bank account is in. This must be a country/currency pairing that [Stripe supports.](docs/payouts) - """ - routing_number: NotRequired[str] - """ - The routing number, sort code, or other country-appropriate institution number for the bank account. For US bank accounts, this is required and should be the ACH routing number, not the wire routing number. If you are providing an IBAN for `account_number`, this field is not required. - """ - - class CreateParamsBusinessProfile(TypedDict): - annual_revenue: NotRequired[ - "AccountService.CreateParamsBusinessProfileAnnualRevenue" - ] - """ - The applicant's gross annual revenue for its preceding fiscal year. - """ - estimated_worker_count: NotRequired[int] - """ - An estimated upper bound of employees, contractors, vendors, etc. currently working for the business. - """ - mcc: NotRequired[str] - """ - [The merchant category code for the account](https://docs.stripe.com/connect/setting-mcc). MCCs are used to classify businesses based on the goods or services they provide. - """ - minority_owned_business_designation: NotRequired[ - List[ - Literal[ - "lgbtqi_owned_business", - "minority_owned_business", - "none_of_these_apply", - "prefer_not_to_answer", - "women_owned_business", - ] - ] - ] - """ - Whether the business is a minority-owned, women-owned, and/or LGBTQI+ -owned business. - """ - monthly_estimated_revenue: NotRequired[ - "AccountService.CreateParamsBusinessProfileMonthlyEstimatedRevenue" - ] - """ - An estimate of the monthly revenue of the business. Only accepted for accounts in Brazil and India. - """ - name: NotRequired[str] - """ - The customer-facing business name. - """ - product_description: NotRequired[str] - """ - Internal-only description of the product sold by, or service provided by, the business. Used by Stripe for risk and underwriting purposes. - """ - support_address: NotRequired[ - "AccountService.CreateParamsBusinessProfileSupportAddress" - ] - """ - A publicly available mailing address for sending support issues to. - """ - support_email: NotRequired[str] - """ - A publicly available email address for sending support issues to. - """ - support_phone: NotRequired[str] - """ - A publicly available phone number to call with support issues. - """ - support_url: NotRequired["Literal['']|str"] - """ - A publicly available website for handling support issues. - """ - url: NotRequired[str] - """ - The business's publicly available website. - """ - - class CreateParamsBusinessProfileAnnualRevenue(TypedDict): - amount: int - """ - A non-negative integer representing the amount in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal). - """ - 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). - """ - fiscal_year_end: str - """ - The close-out date of the preceding fiscal year in ISO 8601 format. E.g. 2023-12-31 for the 31st of December, 2023. - """ - - class CreateParamsBusinessProfileMonthlyEstimatedRevenue(TypedDict): - amount: int - """ - A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal). - """ - 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). - """ - - class CreateParamsBusinessProfileSupportAddress(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. - """ - - class CreateParamsCapabilities(TypedDict): - acss_debit_payments: NotRequired[ - "AccountService.CreateParamsCapabilitiesAcssDebitPayments" - ] - """ - The acss_debit_payments capability. - """ - affirm_payments: NotRequired[ - "AccountService.CreateParamsCapabilitiesAffirmPayments" - ] - """ - The affirm_payments capability. - """ - afterpay_clearpay_payments: NotRequired[ - "AccountService.CreateParamsCapabilitiesAfterpayClearpayPayments" - ] - """ - The afterpay_clearpay_payments capability. - """ - alma_payments: NotRequired[ - "AccountService.CreateParamsCapabilitiesAlmaPayments" - ] - """ - The alma_payments capability. - """ - amazon_pay_payments: NotRequired[ - "AccountService.CreateParamsCapabilitiesAmazonPayPayments" - ] - """ - The amazon_pay_payments capability. - """ - au_becs_debit_payments: NotRequired[ - "AccountService.CreateParamsCapabilitiesAuBecsDebitPayments" - ] - """ - The au_becs_debit_payments capability. - """ - automatic_indirect_tax: NotRequired[ - "AccountService.CreateParamsCapabilitiesAutomaticIndirectTax" - ] - """ - The automatic_indirect_tax capability. - """ - bacs_debit_payments: NotRequired[ - "AccountService.CreateParamsCapabilitiesBacsDebitPayments" - ] - """ - The bacs_debit_payments capability. - """ - bancontact_payments: NotRequired[ - "AccountService.CreateParamsCapabilitiesBancontactPayments" - ] - """ - The bancontact_payments capability. - """ - bank_transfer_payments: NotRequired[ - "AccountService.CreateParamsCapabilitiesBankTransferPayments" - ] - """ - The bank_transfer_payments capability. - """ - billie_payments: NotRequired[ - "AccountService.CreateParamsCapabilitiesBilliePayments" - ] - """ - The billie_payments capability. - """ - blik_payments: NotRequired[ - "AccountService.CreateParamsCapabilitiesBlikPayments" - ] - """ - The blik_payments capability. - """ - boleto_payments: NotRequired[ - "AccountService.CreateParamsCapabilitiesBoletoPayments" - ] - """ - The boleto_payments capability. - """ - card_issuing: NotRequired[ - "AccountService.CreateParamsCapabilitiesCardIssuing" - ] - """ - The card_issuing capability. - """ - card_payments: NotRequired[ - "AccountService.CreateParamsCapabilitiesCardPayments" - ] - """ - The card_payments capability. - """ - cartes_bancaires_payments: NotRequired[ - "AccountService.CreateParamsCapabilitiesCartesBancairesPayments" - ] - """ - The cartes_bancaires_payments capability. - """ - cashapp_payments: NotRequired[ - "AccountService.CreateParamsCapabilitiesCashappPayments" - ] - """ - The cashapp_payments capability. - """ - crypto_payments: NotRequired[ - "AccountService.CreateParamsCapabilitiesCryptoPayments" - ] - """ - The crypto_payments capability. - """ - eps_payments: NotRequired[ - "AccountService.CreateParamsCapabilitiesEpsPayments" - ] - """ - The eps_payments capability. - """ - fpx_payments: NotRequired[ - "AccountService.CreateParamsCapabilitiesFpxPayments" - ] - """ - The fpx_payments capability. - """ - gb_bank_transfer_payments: NotRequired[ - "AccountService.CreateParamsCapabilitiesGbBankTransferPayments" - ] - """ - The gb_bank_transfer_payments capability. - """ - giropay_payments: NotRequired[ - "AccountService.CreateParamsCapabilitiesGiropayPayments" - ] - """ - The giropay_payments capability. - """ - gopay_payments: NotRequired[ - "AccountService.CreateParamsCapabilitiesGopayPayments" - ] - """ - The gopay_payments capability. - """ - grabpay_payments: NotRequired[ - "AccountService.CreateParamsCapabilitiesGrabpayPayments" - ] - """ - The grabpay_payments capability. - """ - id_bank_transfer_payments: NotRequired[ - "AccountService.CreateParamsCapabilitiesIdBankTransferPayments" - ] - """ - The id_bank_transfer_payments capability. - """ - id_bank_transfer_payments_bca: NotRequired[ - "AccountService.CreateParamsCapabilitiesIdBankTransferPaymentsBca" - ] - """ - The id_bank_transfer_payments_bca capability. - """ - ideal_payments: NotRequired[ - "AccountService.CreateParamsCapabilitiesIdealPayments" - ] - """ - The ideal_payments capability. - """ - india_international_payments: NotRequired[ - "AccountService.CreateParamsCapabilitiesIndiaInternationalPayments" - ] - """ - The india_international_payments capability. - """ - jcb_payments: NotRequired[ - "AccountService.CreateParamsCapabilitiesJcbPayments" - ] - """ - The jcb_payments capability. - """ - jp_bank_transfer_payments: NotRequired[ - "AccountService.CreateParamsCapabilitiesJpBankTransferPayments" - ] - """ - The jp_bank_transfer_payments capability. - """ - kakao_pay_payments: NotRequired[ - "AccountService.CreateParamsCapabilitiesKakaoPayPayments" - ] - """ - The kakao_pay_payments capability. - """ - klarna_payments: NotRequired[ - "AccountService.CreateParamsCapabilitiesKlarnaPayments" - ] - """ - The klarna_payments capability. - """ - konbini_payments: NotRequired[ - "AccountService.CreateParamsCapabilitiesKonbiniPayments" - ] - """ - The konbini_payments capability. - """ - kr_card_payments: NotRequired[ - "AccountService.CreateParamsCapabilitiesKrCardPayments" - ] - """ - The kr_card_payments capability. - """ - legacy_payments: NotRequired[ - "AccountService.CreateParamsCapabilitiesLegacyPayments" - ] - """ - The legacy_payments capability. - """ - link_payments: NotRequired[ - "AccountService.CreateParamsCapabilitiesLinkPayments" - ] - """ - The link_payments capability. - """ - mb_way_payments: NotRequired[ - "AccountService.CreateParamsCapabilitiesMbWayPayments" - ] - """ - The mb_way_payments capability. - """ - mobilepay_payments: NotRequired[ - "AccountService.CreateParamsCapabilitiesMobilepayPayments" - ] - """ - The mobilepay_payments capability. - """ - multibanco_payments: NotRequired[ - "AccountService.CreateParamsCapabilitiesMultibancoPayments" - ] - """ - The multibanco_payments capability. - """ - mx_bank_transfer_payments: NotRequired[ - "AccountService.CreateParamsCapabilitiesMxBankTransferPayments" - ] - """ - The mx_bank_transfer_payments capability. - """ - naver_pay_payments: NotRequired[ - "AccountService.CreateParamsCapabilitiesNaverPayPayments" - ] - """ - The naver_pay_payments capability. - """ - nz_bank_account_becs_debit_payments: NotRequired[ - "AccountService.CreateParamsCapabilitiesNzBankAccountBecsDebitPayments" - ] - """ - The nz_bank_account_becs_debit_payments capability. - """ - oxxo_payments: NotRequired[ - "AccountService.CreateParamsCapabilitiesOxxoPayments" - ] - """ - The oxxo_payments capability. - """ - p24_payments: NotRequired[ - "AccountService.CreateParamsCapabilitiesP24Payments" - ] - """ - The p24_payments capability. - """ - pay_by_bank_payments: NotRequired[ - "AccountService.CreateParamsCapabilitiesPayByBankPayments" - ] - """ - The pay_by_bank_payments capability. - """ - payco_payments: NotRequired[ - "AccountService.CreateParamsCapabilitiesPaycoPayments" - ] - """ - The payco_payments capability. - """ - paynow_payments: NotRequired[ - "AccountService.CreateParamsCapabilitiesPaynowPayments" - ] - """ - The paynow_payments capability. - """ - paypal_payments: NotRequired[ - "AccountService.CreateParamsCapabilitiesPaypalPayments" - ] - """ - The paypal_payments capability. - """ - paypay_payments: NotRequired[ - "AccountService.CreateParamsCapabilitiesPaypayPayments" - ] - """ - The paypay_payments capability. - """ - payto_payments: NotRequired[ - "AccountService.CreateParamsCapabilitiesPaytoPayments" - ] - """ - The payto_payments capability. - """ - pix_payments: NotRequired[ - "AccountService.CreateParamsCapabilitiesPixPayments" - ] - """ - The pix_payments capability. - """ - promptpay_payments: NotRequired[ - "AccountService.CreateParamsCapabilitiesPromptpayPayments" - ] - """ - The promptpay_payments capability. - """ - qris_payments: NotRequired[ - "AccountService.CreateParamsCapabilitiesQrisPayments" - ] - """ - The qris_payments capability. - """ - rechnung_payments: NotRequired[ - "AccountService.CreateParamsCapabilitiesRechnungPayments" - ] - """ - The rechnung_payments capability. - """ - revolut_pay_payments: NotRequired[ - "AccountService.CreateParamsCapabilitiesRevolutPayPayments" - ] - """ - The revolut_pay_payments capability. - """ - samsung_pay_payments: NotRequired[ - "AccountService.CreateParamsCapabilitiesSamsungPayPayments" - ] - """ - The samsung_pay_payments capability. - """ - satispay_payments: NotRequired[ - "AccountService.CreateParamsCapabilitiesSatispayPayments" - ] - """ - The satispay_payments capability. - """ - sepa_bank_transfer_payments: NotRequired[ - "AccountService.CreateParamsCapabilitiesSepaBankTransferPayments" - ] - """ - The sepa_bank_transfer_payments capability. - """ - sepa_debit_payments: NotRequired[ - "AccountService.CreateParamsCapabilitiesSepaDebitPayments" - ] - """ - The sepa_debit_payments capability. - """ - shopeepay_payments: NotRequired[ - "AccountService.CreateParamsCapabilitiesShopeepayPayments" - ] - """ - The shopeepay_payments capability. - """ - sofort_payments: NotRequired[ - "AccountService.CreateParamsCapabilitiesSofortPayments" - ] - """ - The sofort_payments capability. - """ - stripe_balance_payments: NotRequired[ - "AccountService.CreateParamsCapabilitiesStripeBalancePayments" - ] - """ - The stripe_balance_payments capability. - """ - swish_payments: NotRequired[ - "AccountService.CreateParamsCapabilitiesSwishPayments" - ] - """ - The swish_payments capability. - """ - tax_reporting_us_1099_k: NotRequired[ - "AccountService.CreateParamsCapabilitiesTaxReportingUs1099K" - ] - """ - The tax_reporting_us_1099_k capability. - """ - tax_reporting_us_1099_misc: NotRequired[ - "AccountService.CreateParamsCapabilitiesTaxReportingUs1099Misc" - ] - """ - The tax_reporting_us_1099_misc capability. - """ - transfers: NotRequired[ - "AccountService.CreateParamsCapabilitiesTransfers" - ] - """ - The transfers capability. - """ - treasury: NotRequired[ - "AccountService.CreateParamsCapabilitiesTreasury" - ] - """ - The treasury capability. - """ - treasury_evolve: NotRequired[ - "AccountService.CreateParamsCapabilitiesTreasuryEvolve" - ] - """ - The treasury_evolve capability. - """ - treasury_fifth_third: NotRequired[ - "AccountService.CreateParamsCapabilitiesTreasuryFifthThird" - ] - """ - The treasury_fifth_third capability. - """ - treasury_goldman_sachs: NotRequired[ - "AccountService.CreateParamsCapabilitiesTreasuryGoldmanSachs" - ] - """ - The treasury_goldman_sachs capability. - """ - twint_payments: NotRequired[ - "AccountService.CreateParamsCapabilitiesTwintPayments" - ] - """ - The twint_payments capability. - """ - us_bank_account_ach_payments: NotRequired[ - "AccountService.CreateParamsCapabilitiesUsBankAccountAchPayments" - ] - """ - The us_bank_account_ach_payments capability. - """ - us_bank_transfer_payments: NotRequired[ - "AccountService.CreateParamsCapabilitiesUsBankTransferPayments" - ] - """ - The us_bank_transfer_payments capability. - """ - zip_payments: NotRequired[ - "AccountService.CreateParamsCapabilitiesZipPayments" - ] - """ - The zip_payments capability. - """ - - class CreateParamsCapabilitiesAcssDebitPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesAffirmPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesAfterpayClearpayPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesAlmaPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesAmazonPayPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesAuBecsDebitPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesAutomaticIndirectTax(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesBacsDebitPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesBancontactPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesBankTransferPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesBilliePayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesBlikPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesBoletoPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesCardIssuing(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesCardPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesCartesBancairesPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesCashappPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesCryptoPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesEpsPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesFpxPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesGbBankTransferPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesGiropayPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesGopayPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesGrabpayPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesIdBankTransferPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesIdBankTransferPaymentsBca(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesIdealPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesIndiaInternationalPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesJcbPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesJpBankTransferPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesKakaoPayPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesKlarnaPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesKonbiniPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesKrCardPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesLegacyPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesLinkPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesMbWayPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesMobilepayPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesMultibancoPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesMxBankTransferPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesNaverPayPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesNzBankAccountBecsDebitPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesOxxoPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesP24Payments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesPayByBankPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesPaycoPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesPaynowPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesPaypalPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesPaypayPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesPaytoPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesPixPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesPromptpayPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesQrisPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesRechnungPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesRevolutPayPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesSamsungPayPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesSatispayPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesSepaBankTransferPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesSepaDebitPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesShopeepayPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesSofortPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesStripeBalancePayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesSwishPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesTaxReportingUs1099K(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesTaxReportingUs1099Misc(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesTransfers(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesTreasury(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesTreasuryEvolve(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesTreasuryFifthThird(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesTreasuryGoldmanSachs(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesTwintPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesUsBankAccountAchPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesUsBankTransferPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCapabilitiesZipPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class CreateParamsCard(TypedDict): - object: Literal["card"] - address_city: NotRequired[str] - address_country: NotRequired[str] - address_line1: NotRequired[str] - address_line2: NotRequired[str] - address_state: NotRequired[str] - address_zip: NotRequired[str] - currency: NotRequired[str] - cvc: NotRequired[str] - exp_month: int - exp_year: int - name: NotRequired[str] - number: str - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. - """ - default_for_currency: NotRequired[bool] - - class CreateParamsCardToken(TypedDict): - object: Literal["card"] - currency: NotRequired[str] - token: str - - class CreateParamsCompany(TypedDict): - address: NotRequired["AccountService.CreateParamsCompanyAddress"] - """ - The company's primary address. - """ - address_kana: NotRequired[ - "AccountService.CreateParamsCompanyAddressKana" - ] - """ - The Kana variation of the company's primary address (Japan only). - """ - address_kanji: NotRequired[ - "AccountService.CreateParamsCompanyAddressKanji" - ] - """ - The Kanji variation of the company's primary address (Japan only). - """ - directors_provided: NotRequired[bool] - """ - Whether the company's directors have been provided. Set this Boolean to `true` after creating all the company's directors with [the Persons API](https://docs.stripe.com/api/persons) for accounts with a `relationship.director` requirement. This value is not automatically set to `true` after creating directors, so it needs to be updated to indicate all directors have been provided. - """ - directorship_declaration: NotRequired[ - "AccountService.CreateParamsCompanyDirectorshipDeclaration" - ] - """ - This hash is used to attest that the directors information provided to Stripe is both current and correct. - """ - executives_provided: NotRequired[bool] - """ - Whether the company's executives have been provided. Set this Boolean to `true` after creating all the company's executives with [the Persons API](https://docs.stripe.com/api/persons) for accounts with a `relationship.executive` requirement. - """ - export_license_id: NotRequired[str] - """ - The export license ID number of the company, also referred as Import Export Code (India only). - """ - export_purpose_code: NotRequired[str] - """ - The purpose code to use for export transactions (India only). - """ - name: NotRequired[str] - """ - The company's legal name. - """ - name_kana: NotRequired[str] - """ - The Kana variation of the company's legal name (Japan only). - """ - name_kanji: NotRequired[str] - """ - The Kanji variation of the company's legal name (Japan only). - """ - owners_provided: NotRequired[bool] - """ - Whether the company's owners have been provided. Set this Boolean to `true` after creating all the company's owners with [the Persons API](https://docs.stripe.com/api/persons) for accounts with a `relationship.owner` requirement. - """ - ownership_declaration: NotRequired[ - "AccountService.CreateParamsCompanyOwnershipDeclaration" - ] - """ - This hash is used to attest that the beneficial owner information provided to Stripe is both current and correct. - """ - ownership_exemption_reason: NotRequired[ - "Literal['']|Literal['qualified_entity_exceeds_ownership_threshold', 'qualifies_as_financial_institution']" - ] - """ - This value is used to determine if a business is exempt from providing ultimate beneficial owners. See [this support article](https://support.stripe.com/questions/exemption-from-providing-ownership-details) and [changelog](https://docs.stripe.com/changelog/acacia/2025-01-27/ownership-exemption-reason-accounts-api) for more details. - """ - phone: NotRequired[str] - """ - The company's phone number (used for verification). - """ - registration_date: NotRequired[ - "Literal['']|AccountService.CreateParamsCompanyRegistrationDate" - ] - """ - When the business was incorporated or registered. - """ - registration_number: NotRequired[str] - """ - The identification number given to a company when it is registered or incorporated, if distinct from the identification number used for filing taxes. (Examples are the CIN for companies and LLP IN for partnerships in India, and the Company Registration Number in Hong Kong). - """ - structure: NotRequired[ - "Literal['']|Literal['free_zone_establishment', 'free_zone_llc', 'government_instrumentality', 'governmental_unit', 'incorporated_non_profit', 'incorporated_partnership', 'limited_liability_partnership', 'llc', 'multi_member_llc', 'private_company', 'private_corporation', 'private_partnership', 'public_company', 'public_corporation', 'public_partnership', 'registered_charity', 'single_member_llc', 'sole_establishment', 'sole_proprietorship', 'tax_exempt_government_instrumentality', 'unincorporated_association', 'unincorporated_non_profit', 'unincorporated_partnership']" - ] - """ - The category identifying the legal structure of the company or legal entity. See [Business structure](https://docs.stripe.com/connect/identity-verification#business-structure) for more details. Pass an empty string to unset this value. - """ - tax_id: NotRequired[str] - """ - The business ID number of the company, as appropriate for the company's country. (Examples are an Employer ID Number in the U.S., a Business Number in Canada, or a Company Number in the UK.) - """ - tax_id_registrar: NotRequired[str] - """ - The jurisdiction in which the `tax_id` is registered (Germany-based companies only). - """ - vat_id: NotRequired[str] - """ - The VAT number of the company. - """ - verification: NotRequired[ - "AccountService.CreateParamsCompanyVerification" - ] - """ - Information on the verification state of the company. - """ - - class CreateParamsCompanyAddress(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. - """ - - class CreateParamsCompanyAddressKana(TypedDict): - city: NotRequired[str] - """ - City or ward. - """ - 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] - """ - Block or building number. - """ - line2: NotRequired[str] - """ - Building details. - """ - postal_code: NotRequired[str] - """ - Postal code. - """ - state: NotRequired[str] - """ - Prefecture. - """ - town: NotRequired[str] - """ - Town or cho-me. - """ - - class CreateParamsCompanyAddressKanji(TypedDict): - city: NotRequired[str] - """ - City or ward. - """ - 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] - """ - Block or building number. - """ - line2: NotRequired[str] - """ - Building details. - """ - postal_code: NotRequired[str] - """ - Postal code. - """ - state: NotRequired[str] - """ - Prefecture. - """ - town: NotRequired[str] - """ - Town or cho-me. - """ - - class CreateParamsCompanyDirectorshipDeclaration(TypedDict): - date: NotRequired[int] - """ - The Unix timestamp marking when the directorship declaration attestation was made. - """ - ip: NotRequired[str] - """ - The IP address from which the directorship declaration attestation was made. - """ - user_agent: NotRequired[str] - """ - The user agent of the browser from which the directorship declaration attestation was made. - """ - - class CreateParamsCompanyOwnershipDeclaration(TypedDict): - date: NotRequired[int] - """ - The Unix timestamp marking when the beneficial owner attestation was made. - """ - ip: NotRequired[str] - """ - The IP address from which the beneficial owner attestation was made. - """ - user_agent: NotRequired[str] - """ - The user agent of the browser from which the beneficial owner attestation was made. - """ - - class CreateParamsCompanyRegistrationDate(TypedDict): - day: int - """ - The day of registration, between 1 and 31. - """ - month: int - """ - The month of registration, between 1 and 12. - """ - year: int - """ - The four-digit year of registration. - """ - - class CreateParamsCompanyVerification(TypedDict): - document: NotRequired[ - "AccountService.CreateParamsCompanyVerificationDocument" - ] - """ - A document verifying the business. - """ - - class CreateParamsCompanyVerificationDocument(TypedDict): - back: NotRequired[str] - """ - The back of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. - """ - front: NotRequired[str] - """ - The front of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. - """ - - class CreateParamsController(TypedDict): - application: NotRequired[ - "AccountService.CreateParamsControllerApplication" - ] - """ - A hash of configuration describing the Connect application that controls the account. - """ - dashboard: NotRequired[ - "AccountService.CreateParamsControllerDashboard" - ] - """ - Properties of the account's dashboard. - """ - fees: NotRequired["AccountService.CreateParamsControllerFees"] - """ - A hash of configuration for who pays Stripe fees for product usage on this account. - """ - losses: NotRequired["AccountService.CreateParamsControllerLosses"] - """ - A hash of configuration for products that have negative balance liability, and whether Stripe or a Connect application is responsible for them. - """ - requirement_collection: NotRequired[Literal["application", "stripe"]] - """ - A value indicating responsibility for collecting updated information when requirements on the account are due or change. Defaults to `stripe`. - """ - stripe_dashboard: NotRequired[ - "AccountService.CreateParamsControllerStripeDashboard" - ] - """ - A hash of configuration for Stripe-hosted dashboards. - """ - - class CreateParamsControllerApplication(TypedDict): - loss_liable: bool - """ - Whether the controller is liable for losses on this account. For details, see [Understanding Connect Account Balances](https://stripe.com/docs/connect/account-balances). - """ - onboarding_owner: NotRequired[bool] - """ - Whether the controller owns onboarding for this account. - """ - pricing_controls: NotRequired[bool] - """ - Whether the controller has pricing controls for this account. - """ - - class CreateParamsControllerDashboard(TypedDict): - type: NotRequired[Literal["express", "full", "none"]] - """ - Whether this account should have access to the full Stripe Dashboard (`full`), to the Express Dashboard (`express`), or to no Stripe-hosted dashboard (`none`). Defaults to `full`. - """ - - class CreateParamsControllerFees(TypedDict): - payer: NotRequired[Literal["account", "application"]] - """ - A value indicating the responsible payer of Stripe fees on this account. Defaults to `account`. Learn more about [fee behavior on connected accounts](https://docs.stripe.com/connect/direct-charges-fee-payer-behavior). - """ - - class CreateParamsControllerLosses(TypedDict): - payments: NotRequired[Literal["application", "stripe"]] - """ - A value indicating who is liable when this account can't pay back negative balances resulting from payments. Defaults to `stripe`. - """ - - class CreateParamsControllerStripeDashboard(TypedDict): - type: NotRequired[Literal["express", "full", "none"]] - """ - Whether this account should have access to the full Stripe Dashboard (`full`), to the Express Dashboard (`express`), or to no Stripe-hosted dashboard (`none`). Defaults to `full`. - """ - - class CreateParamsDocuments(TypedDict): - bank_account_ownership_verification: NotRequired[ - "AccountService.CreateParamsDocumentsBankAccountOwnershipVerification" - ] - """ - One or more documents that support the [Bank account ownership verification](https://support.stripe.com/questions/bank-account-ownership-verification) requirement. Must be a document associated with the account's primary active bank account that displays the last 4 digits of the account number, either a statement or a check. - """ - company_license: NotRequired[ - "AccountService.CreateParamsDocumentsCompanyLicense" - ] - """ - One or more documents that demonstrate proof of a company's license to operate. - """ - company_memorandum_of_association: NotRequired[ - "AccountService.CreateParamsDocumentsCompanyMemorandumOfAssociation" - ] - """ - One or more documents showing the company's Memorandum of Association. - """ - company_ministerial_decree: NotRequired[ - "AccountService.CreateParamsDocumentsCompanyMinisterialDecree" - ] - """ - (Certain countries only) One or more documents showing the ministerial decree legalizing the company's establishment. - """ - company_registration_verification: NotRequired[ - "AccountService.CreateParamsDocumentsCompanyRegistrationVerification" - ] - """ - One or more documents that demonstrate proof of a company's registration with the appropriate local authorities. - """ - company_tax_id_verification: NotRequired[ - "AccountService.CreateParamsDocumentsCompanyTaxIdVerification" - ] - """ - One or more documents that demonstrate proof of a company's tax ID. - """ - proof_of_address: NotRequired[ - "AccountService.CreateParamsDocumentsProofOfAddress" - ] - """ - One or more documents that demonstrate proof of address. - """ - proof_of_registration: NotRequired[ - "AccountService.CreateParamsDocumentsProofOfRegistration" - ] - """ - One or more documents showing the company's proof of registration with the national business registry. - """ - proof_of_ultimate_beneficial_ownership: NotRequired[ - "AccountService.CreateParamsDocumentsProofOfUltimateBeneficialOwnership" - ] - """ - One or more documents that demonstrate proof of ultimate beneficial ownership. - """ - - class CreateParamsDocumentsBankAccountOwnershipVerification(TypedDict): - files: NotRequired[List[str]] - """ - One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. - """ - - class CreateParamsDocumentsCompanyLicense(TypedDict): - files: NotRequired[List[str]] - """ - One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. - """ - - class CreateParamsDocumentsCompanyMemorandumOfAssociation(TypedDict): - files: NotRequired[List[str]] - """ - One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. - """ - - class CreateParamsDocumentsCompanyMinisterialDecree(TypedDict): - files: NotRequired[List[str]] - """ - One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. - """ - - class CreateParamsDocumentsCompanyRegistrationVerification(TypedDict): - files: NotRequired[List[str]] - """ - One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. - """ - - class CreateParamsDocumentsCompanyTaxIdVerification(TypedDict): - files: NotRequired[List[str]] - """ - One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. - """ - - class CreateParamsDocumentsProofOfAddress(TypedDict): - files: NotRequired[List[str]] - """ - One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. - """ - - class CreateParamsDocumentsProofOfRegistration(TypedDict): - files: NotRequired[List[str]] - """ - One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. - """ - - class CreateParamsDocumentsProofOfUltimateBeneficialOwnership(TypedDict): - files: NotRequired[List[str]] - """ - One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. - """ - - class CreateParamsGroups(TypedDict): - payments_pricing: NotRequired["Literal['']|str"] - """ - The group the account is in to determine their payments pricing, and null if the account is on customized pricing. [See the Platform pricing tool documentation](https://stripe.com/docs/connect/platform-pricing-tools) for details. - """ - - class CreateParamsIndividual(TypedDict): - address: NotRequired["AccountService.CreateParamsIndividualAddress"] - """ - The individual's primary address. - """ - address_kana: NotRequired[ - "AccountService.CreateParamsIndividualAddressKana" - ] - """ - The Kana variation of the individual's primary address (Japan only). - """ - address_kanji: NotRequired[ - "AccountService.CreateParamsIndividualAddressKanji" - ] - """ - The Kanji variation of the individual's primary address (Japan only). - """ - dob: NotRequired[ - "Literal['']|AccountService.CreateParamsIndividualDob" - ] - """ - The individual's date of birth. - """ - email: NotRequired[str] - """ - The individual's email address. - """ - first_name: NotRequired[str] - """ - The individual's first name. - """ - first_name_kana: NotRequired[str] - """ - The Kana variation of the individual's first name (Japan only). - """ - first_name_kanji: NotRequired[str] - """ - The Kanji variation of the individual's first name (Japan only). - """ - full_name_aliases: NotRequired["Literal['']|List[str]"] - """ - A list of alternate names or aliases that the individual is known by. - """ - gender: NotRequired[str] - """ - The individual's gender - """ - id_number: NotRequired[str] - """ - The government-issued ID number of the individual, as appropriate for the representative's country. (Examples are a Social Security Number in the U.S., or a Social Insurance Number in Canada). Instead of the number itself, you can also provide a [PII token created with Stripe.js](https://docs.stripe.com/js/tokens/create_token?type=pii). - """ - id_number_secondary: NotRequired[str] - """ - The government-issued secondary ID number of the individual, as appropriate for the representative's country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token created with Stripe.js](https://docs.stripe.com/js/tokens/create_token?type=pii). - """ - last_name: NotRequired[str] - """ - The individual's last name. - """ - last_name_kana: NotRequired[str] - """ - The Kana variation of the individual's last name (Japan only). - """ - last_name_kanji: NotRequired[str] - """ - The Kanji variation of the individual's last name (Japan only). - """ - maiden_name: NotRequired[str] - """ - The individual's maiden name. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - phone: NotRequired[str] - """ - The individual's phone number. - """ - political_exposure: NotRequired[Literal["existing", "none"]] - """ - Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. - """ - registered_address: NotRequired[ - "AccountService.CreateParamsIndividualRegisteredAddress" - ] - """ - The individual's registered address. - """ - relationship: NotRequired[ - "AccountService.CreateParamsIndividualRelationship" - ] - """ - Describes the person's relationship to the account. - """ - ssn_last_4: NotRequired[str] - """ - The last four digits of the individual's Social Security Number (U.S. only). - """ - verification: NotRequired[ - "AccountService.CreateParamsIndividualVerification" - ] - """ - The individual's verification document information. - """ - - class CreateParamsIndividualAddress(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. - """ - - class CreateParamsIndividualAddressKana(TypedDict): - city: NotRequired[str] - """ - City or ward. - """ - 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] - """ - Block or building number. - """ - line2: NotRequired[str] - """ - Building details. - """ - postal_code: NotRequired[str] - """ - Postal code. - """ - state: NotRequired[str] - """ - Prefecture. - """ - town: NotRequired[str] - """ - Town or cho-me. - """ - - class CreateParamsIndividualAddressKanji(TypedDict): - city: NotRequired[str] - """ - City or ward. - """ - 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] - """ - Block or building number. - """ - line2: NotRequired[str] - """ - Building details. - """ - postal_code: NotRequired[str] - """ - Postal code. - """ - state: NotRequired[str] - """ - Prefecture. - """ - town: NotRequired[str] - """ - Town or cho-me. - """ - - class CreateParamsIndividualDob(TypedDict): - day: int - """ - The day of birth, between 1 and 31. - """ - month: int - """ - The month of birth, between 1 and 12. - """ - year: int - """ - The four-digit year of birth. - """ - - class CreateParamsIndividualRegisteredAddress(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. - """ - - class CreateParamsIndividualRelationship(TypedDict): - director: NotRequired[bool] - """ - Whether the person is a director of the account's legal entity. Directors are typically members of the governing board of the company, or responsible for ensuring the company meets its regulatory obligations. - """ - executive: NotRequired[bool] - """ - Whether the person has significant responsibility to control, manage, or direct the organization. - """ - owner: NotRequired[bool] - """ - Whether the person is an owner of the account's legal entity. - """ - percent_ownership: NotRequired["Literal['']|float"] - """ - The percent owned by the person of the account's legal entity. - """ - title: NotRequired[str] - """ - The person's title (e.g., CEO, Support Engineer). - """ - - class CreateParamsIndividualVerification(TypedDict): - additional_document: NotRequired[ - "AccountService.CreateParamsIndividualVerificationAdditionalDocument" - ] - """ - A document showing address, either a passport, local ID card, or utility bill from a well-known utility company. - """ - document: NotRequired[ - "AccountService.CreateParamsIndividualVerificationDocument" - ] - """ - An identifying document, either a passport or local ID card. - """ - - class CreateParamsIndividualVerificationAdditionalDocument(TypedDict): - back: NotRequired[str] - """ - The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. - """ - front: NotRequired[str] - """ - The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. - """ - - class CreateParamsIndividualVerificationDocument(TypedDict): - back: NotRequired[str] - """ - The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. - """ - front: NotRequired[str] - """ - The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. - """ - - class CreateParamsRiskControls(TypedDict): - charges: NotRequired["AccountService.CreateParamsRiskControlsCharges"] - """ - Represents the risk control status of charges. Please see [this page for more details](https://stripe.com/docs/connect/pausing-payments-or-payouts-on-connected-accounts). - """ - payouts: NotRequired["AccountService.CreateParamsRiskControlsPayouts"] - """ - Represents the risk control status of payouts. Please see [this page for more details](https://stripe.com/docs/connect/pausing-payments-or-payouts-on-connected-accounts). - """ - - class CreateParamsRiskControlsCharges(TypedDict): - pause_requested: NotRequired[bool] - """ - To request to pause a risk control, pass `true`. To request to unpause a risk control, pass `false`. - There can be a delay before the risk control is paused or unpaused. - """ - - class CreateParamsRiskControlsPayouts(TypedDict): - pause_requested: NotRequired[bool] - """ - To request to pause a risk control, pass `true`. To request to unpause a risk control, pass `false`. - There can be a delay before the risk control is paused or unpaused. - """ - - class CreateParamsSettings(TypedDict): - bacs_debit_payments: NotRequired[ - "AccountService.CreateParamsSettingsBacsDebitPayments" - ] - """ - Settings specific to Bacs Direct Debit. - """ - bank_bca_onboarding: NotRequired[ - "AccountService.CreateParamsSettingsBankBcaOnboarding" - ] - """ - Settings specific to bank BCA onboarding for Indonesia bank transfers payments method. - """ - branding: NotRequired["AccountService.CreateParamsSettingsBranding"] - """ - Settings used to apply the account's branding to email receipts, invoices, Checkout, and other products. - """ - capital: NotRequired["AccountService.CreateParamsSettingsCapital"] - """ - Settings specific to the account's use of the Capital product. - """ - card_issuing: NotRequired[ - "AccountService.CreateParamsSettingsCardIssuing" - ] - """ - Settings specific to the account's use of the Card Issuing product. - """ - card_payments: NotRequired[ - "AccountService.CreateParamsSettingsCardPayments" - ] - """ - Settings specific to card charging on the account. - """ - invoices: NotRequired["AccountService.CreateParamsSettingsInvoices"] - """ - Settings specific to the account's use of Invoices. - """ - payments: NotRequired["AccountService.CreateParamsSettingsPayments"] - """ - Settings that apply across payment methods for charging on the account. - """ - payouts: NotRequired["AccountService.CreateParamsSettingsPayouts"] - """ - Settings specific to the account's payouts. - """ - tax_forms: NotRequired["AccountService.CreateParamsSettingsTaxForms"] - """ - Settings specific to the account's tax forms. - """ - treasury: NotRequired["AccountService.CreateParamsSettingsTreasury"] - """ - Settings specific to the account's Treasury FinancialAccounts. - """ - - class CreateParamsSettingsBacsDebitPayments(TypedDict): - display_name: NotRequired[str] - """ - The Bacs Direct Debit Display Name for this account. For payments made with Bacs Direct Debit, this name appears on the mandate as the statement descriptor. Mobile banking apps display it as the name of the business. To use custom branding, set the Bacs Direct Debit Display Name during or right after creation. Custom branding incurs an additional monthly fee for the platform. If you don't set the display name before requesting Bacs capability, it's automatically set as "Stripe" and the account is onboarded to Stripe branding, which is free. - """ - - class CreateParamsSettingsBankBcaOnboarding(TypedDict): - account_holder_name: NotRequired[str] - """ - Bank BCA business account holder name - """ - business_account_number: NotRequired[str] - """ - Bank BCA business account number - """ - - class CreateParamsSettingsBranding(TypedDict): - icon: NotRequired[str] - """ - (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) An icon for the account. Must be square and at least 128px x 128px. - """ - logo: NotRequired[str] - """ - (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) A logo for the account that will be used in Checkout instead of the icon and without the account's name next to it if provided. Must be at least 128px x 128px. - """ - primary_color: NotRequired[str] - """ - A CSS hex color value representing the primary branding color for this account. - """ - secondary_color: NotRequired[str] - """ - A CSS hex color value representing the secondary branding color for this account. - """ - - class CreateParamsSettingsCapital(TypedDict): - payout_destination: NotRequired[Dict[str, str]] - """ - Per-currency mapping of user-selected destination accounts used to pay out loans. - """ - payout_destination_selector: NotRequired[Dict[str, List[str]]] - """ - Per-currency mapping of all destination accounts eligible to receive Capital financing payouts. - """ - - class CreateParamsSettingsCardIssuing(TypedDict): - tos_acceptance: NotRequired[ - "AccountService.CreateParamsSettingsCardIssuingTosAcceptance" - ] - """ - Details on the account's acceptance of the [Stripe Issuing Terms and Disclosures](https://docs.stripe.com/issuing/connect/tos_acceptance). - """ - - class CreateParamsSettingsCardIssuingTosAcceptance(TypedDict): - date: NotRequired[int] - """ - The Unix timestamp marking when the account representative accepted the service agreement. - """ - ip: NotRequired[str] - """ - The IP address from which the account representative accepted the service agreement. - """ - user_agent: NotRequired["Literal['']|str"] - """ - The user agent of the browser from which the account representative accepted the service agreement. - """ - - class CreateParamsSettingsCardPayments(TypedDict): - decline_on: NotRequired[ - "AccountService.CreateParamsSettingsCardPaymentsDeclineOn" - ] - """ - Automatically declines certain charge types regardless of whether the card issuer accepted or declined the charge. - """ - statement_descriptor_prefix: NotRequired[str] - """ - The default text that appears on credit card statements when a charge is made. This field prefixes any dynamic `statement_descriptor` specified on the charge. `statement_descriptor_prefix` is useful for maximizing descriptor space for the dynamic portion. - """ - statement_descriptor_prefix_kana: NotRequired["Literal['']|str"] - """ - The Kana variation of the default text that appears on credit card statements when a charge is made (Japan only). This field prefixes any dynamic `statement_descriptor_suffix_kana` specified on the charge. `statement_descriptor_prefix_kana` is useful for maximizing descriptor space for the dynamic portion. - """ - statement_descriptor_prefix_kanji: NotRequired["Literal['']|str"] - """ - The Kanji variation of the default text that appears on credit card statements when a charge is made (Japan only). This field prefixes any dynamic `statement_descriptor_suffix_kanji` specified on the charge. `statement_descriptor_prefix_kanji` is useful for maximizing descriptor space for the dynamic portion. - """ - - class CreateParamsSettingsCardPaymentsDeclineOn(TypedDict): - avs_failure: NotRequired[bool] - """ - Whether Stripe automatically declines charges with an incorrect ZIP or postal code. This setting only applies when a ZIP or postal code is provided and they fail bank verification. - """ - cvc_failure: NotRequired[bool] - """ - Whether Stripe automatically declines charges with an incorrect CVC. This setting only applies when a CVC is provided and it fails bank verification. - """ - - class CreateParamsSettingsInvoices(TypedDict): - hosted_payment_method_save: NotRequired[ - Literal["always", "never", "offer"] - ] - """ - Whether payment methods should be saved when a payment is completed for a one-time invoices on a hosted invoice page. - """ - - class CreateParamsSettingsPayments(TypedDict): - statement_descriptor: NotRequired[str] - """ - The default text that appears on statements for non-card charges outside of Japan. For card charges, if you don't set a `statement_descriptor_prefix`, this text is also used as the statement descriptor prefix. In that case, if concatenating the statement descriptor suffix causes the combined statement descriptor to exceed 22 characters, we truncate the `statement_descriptor` text to limit the full descriptor to 22 characters. For more information about statement descriptors and their requirements, see the [account settings documentation](https://docs.stripe.com/get-started/account/statement-descriptors). - """ - statement_descriptor_kana: NotRequired[str] - """ - The Kana variation of `statement_descriptor` used for charges in Japan. Japanese statement descriptors have [special requirements](https://docs.stripe.com/get-started/account/statement-descriptors#set-japanese-statement-descriptors). - """ - statement_descriptor_kanji: NotRequired[str] - """ - The Kanji variation of `statement_descriptor` used for charges in Japan. Japanese statement descriptors have [special requirements](https://docs.stripe.com/get-started/account/statement-descriptors#set-japanese-statement-descriptors). - """ - - class CreateParamsSettingsPayouts(TypedDict): - debit_negative_balances: NotRequired[bool] - """ - A Boolean indicating whether Stripe should try to reclaim negative balances from an attached bank account. For details, see [Understanding Connect Account Balances](https://docs.stripe.com/connect/account-balances). - """ - schedule: NotRequired[ - "AccountService.CreateParamsSettingsPayoutsSchedule" - ] - """ - Details on when funds from charges are available, and when they are paid out to an external account. For details, see our [Setting Bank and Debit Card Payouts](https://docs.stripe.com/connect/bank-transfers#payout-information) documentation. - """ - statement_descriptor: NotRequired[str] - """ - The text that appears on the bank account statement for payouts. If not set, this defaults to the platform's bank descriptor as set in the Dashboard. - """ - - class CreateParamsSettingsPayoutsSchedule(TypedDict): - delay_days: NotRequired["Literal['minimum']|int"] - """ - The number of days charge funds are held before being paid out. May also be set to `minimum`, representing the lowest available value for the account country. Default is `minimum`. The `delay_days` parameter remains at the last configured value if `interval` is `manual`. [Learn more about controlling payout delay days](https://docs.stripe.com/connect/manage-payout-schedule). - """ - interval: NotRequired[Literal["daily", "manual", "monthly", "weekly"]] - """ - How frequently available funds are paid out. One of: `daily`, `manual`, `weekly`, or `monthly`. Default is `daily`. - """ - monthly_anchor: NotRequired[int] - """ - The day of the month when available funds are paid out, specified as a number between 1--31. Payouts nominally scheduled between the 29th and 31st of the month are instead sent on the last day of a shorter month. Required and applicable only if `interval` is `monthly`. - """ - monthly_payout_days: NotRequired[List[int]] - """ - The days of the month when available funds are paid out, specified as an array of numbers between 1--31. Payouts nominally scheduled between the 29th and 31st of the month are instead sent on the last day of a shorter month. Required and applicable only if `interval` is `monthly` and `monthly_anchor` is not set. - """ - weekly_anchor: NotRequired[ - Literal[ - "friday", - "monday", - "saturday", - "sunday", - "thursday", - "tuesday", - "wednesday", - ] - ] - """ - The day of the week when available funds are paid out, specified as `monday`, `tuesday`, etc. Required and applicable only if `interval` is `weekly`. - """ - weekly_payout_days: NotRequired[ - List[ - Literal["friday", "monday", "thursday", "tuesday", "wednesday"] - ] - ] - """ - The days of the week when available funds are paid out, specified as an array, e.g., [`monday`, `tuesday`]. Required and applicable only if `interval` is `weekly`. - """ - - class CreateParamsSettingsTaxForms(TypedDict): - consented_to_paperless_delivery: NotRequired[bool] - """ - Whether the account opted out of receiving their tax forms by postal delivery. - """ - - class CreateParamsSettingsTreasury(TypedDict): - tos_acceptance: NotRequired[ - "AccountService.CreateParamsSettingsTreasuryTosAcceptance" - ] - """ - Details on the account's acceptance of the Stripe Treasury Services Agreement. - """ - - class CreateParamsSettingsTreasuryTosAcceptance(TypedDict): - date: NotRequired[int] - """ - The Unix timestamp marking when the account representative accepted the service agreement. - """ - ip: NotRequired[str] - """ - The IP address from which the account representative accepted the service agreement. - """ - user_agent: NotRequired["Literal['']|str"] - """ - The user agent of the browser from which the account representative accepted the service agreement. - """ - - class CreateParamsTosAcceptance(TypedDict): - date: NotRequired[int] - """ - The Unix timestamp marking when the account representative accepted their service agreement. - """ - ip: NotRequired[str] - """ - The IP address from which the account representative accepted their service agreement. - """ - service_agreement: NotRequired[str] - """ - The user's service agreement type. - """ - user_agent: NotRequired[str] - """ - The user agent of the browser from which the account representative accepted their service agreement. - """ - - class DeleteParams(TypedDict): - pass - - class ListParams(TypedDict): - created: NotRequired["AccountService.ListParamsCreated|int"] - """ - Only return connected accounts that were created during the given date interval. - """ - 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 ListParamsCreated(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) - """ - - class RejectParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - reason: str - """ - The reason for rejecting the account. Can be `fraud`, `terms_of_service`, or `other`. - """ - - class RetrieveCurrentParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class RetrieveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class UpdateParams(TypedDict): - account_token: NotRequired[str] - """ - An [account token](https://stripe.com/docs/api#create_account_token), used to securely provide details to the account. - """ - business_profile: NotRequired[ - "AccountService.UpdateParamsBusinessProfile" - ] - """ - Business information about the account. - """ - business_type: NotRequired[ - Literal["company", "government_entity", "individual", "non_profit"] - ] - """ - The business type. Once you create an [Account Link](https://docs.stripe.com/api/account_links) or [Account Session](https://docs.stripe.com/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](https://docs.stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. - """ - capabilities: NotRequired["AccountService.UpdateParamsCapabilities"] - """ - Each key of the dictionary represents a capability, and each capability - maps to its settings (for example, whether it has been requested or not). Each - capability is inactive until you have provided its specific - requirements and Stripe has verified them. An account might have some - of its requested capabilities be active and some be inactive. - - Required when [account.controller.stripe_dashboard.type](https://docs.stripe.com/api/accounts/create#create_account-controller-dashboard-type) - is `none`, which includes Custom accounts. - """ - company: NotRequired["AccountService.UpdateParamsCompany"] - """ - Information about the company or business. This field is available for any `business_type`. Once you create an [Account Link](https://docs.stripe.com/api/account_links) or [Account Session](https://docs.stripe.com/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](https://docs.stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. - """ - default_currency: NotRequired[str] - """ - Three-letter ISO currency code representing the default currency for the account. This must be a currency that [Stripe supports in the account's country](https://docs.stripe.com/payouts). - """ - documents: NotRequired["AccountService.UpdateParamsDocuments"] - """ - Documents that may be submitted to satisfy various informational requests. - """ - email: NotRequired[str] - """ - The email address of the account holder. This is only to make the account easier to identify to you. If [controller.requirement_collection](https://docs.stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts, Stripe doesn't email the account without your consent. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - external_account: NotRequired[ - "Literal['']|str|AccountService.UpdateParamsBankAccount|AccountService.UpdateParamsCard|AccountService.UpdateParamsCardToken" - ] - """ - A card or bank account to attach to the account for receiving [payouts](https://docs.stripe.com/connect/bank-debit-card-payouts) (you won't be able to use it for top-ups). You can provide either a token, like the ones returned by [Stripe.js](https://docs.stripe.com/js), or a dictionary, as documented in the `external_account` parameter for [bank account](https://docs.stripe.com/api#account_create_bank_account) creation. - - By default, providing an external account sets it as the new default external account for its currency, and deletes the old default if one exists. To add additional external accounts without replacing the existing default for the currency, use the [bank account](https://docs.stripe.com/api#account_create_bank_account) or [card creation](https://docs.stripe.com/api#account_create_card) APIs. After you create an [Account Link](https://docs.stripe.com/api/account_links) or [Account Session](https://docs.stripe.com/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](https://docs.stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. - """ - groups: NotRequired["AccountService.UpdateParamsGroups"] - """ - A hash of account group type to tokens. These are account groups this account should be added to. - """ - individual: NotRequired["AccountService.UpdateParamsIndividual"] - """ - Information about the person represented by the account. This field is null unless `business_type` is set to `individual`. Once you create an [Account Link](https://docs.stripe.com/api/account_links) or [Account Session](https://docs.stripe.com/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](https://docs.stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - risk_controls: NotRequired["AccountService.UpdateParamsRiskControls"] - """ - A hash to configure risk controls on the account. Please see [this page for more details](https://docs.stripe.com/connect/pausing-payments-or-payouts-on-connected-accounts). - """ - settings: NotRequired["AccountService.UpdateParamsSettings"] - """ - Options for customizing how the account functions within Stripe. - """ - tos_acceptance: NotRequired["AccountService.UpdateParamsTosAcceptance"] - """ - Details on the account's acceptance of the [Stripe Services Agreement](https://docs.stripe.com/connect/updating-accounts#tos-acceptance). This property can only be updated for accounts where [controller.requirement_collection](https://docs.stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. This property defaults to a `full` service agreement when empty. - """ - - class UpdateParamsBankAccount(TypedDict): - object: Literal["bank_account"] - account_holder_name: NotRequired[str] - """ - The name of the person or business that owns the bank account.This field is required when attaching the bank account to a `Customer` object. - """ - account_holder_type: NotRequired[Literal["company", "individual"]] - """ - The type of entity that holds the account. It can be `company` or `individual`. This field is required when attaching the bank account to a `Customer` object. - """ - account_number: str - """ - The account number for the bank account, in string form. Must be a checking account. - """ - country: str - """ - The country in which the bank account is located. - """ - currency: NotRequired[str] - """ - The currency the bank account is in. This must be a country/currency pairing that [Stripe supports.](docs/payouts) - """ - routing_number: NotRequired[str] - """ - The routing number, sort code, or other country-appropriate institution number for the bank account. For US bank accounts, this is required and should be the ACH routing number, not the wire routing number. If you are providing an IBAN for `account_number`, this field is not required. - """ - - class UpdateParamsBusinessProfile(TypedDict): - annual_revenue: NotRequired[ - "AccountService.UpdateParamsBusinessProfileAnnualRevenue" - ] - """ - The applicant's gross annual revenue for its preceding fiscal year. - """ - estimated_worker_count: NotRequired[int] - """ - An estimated upper bound of employees, contractors, vendors, etc. currently working for the business. - """ - mcc: NotRequired[str] - """ - [The merchant category code for the account](https://docs.stripe.com/connect/setting-mcc). MCCs are used to classify businesses based on the goods or services they provide. - """ - minority_owned_business_designation: NotRequired[ - List[ - Literal[ - "lgbtqi_owned_business", - "minority_owned_business", - "none_of_these_apply", - "prefer_not_to_answer", - "women_owned_business", - ] - ] - ] - """ - Whether the business is a minority-owned, women-owned, and/or LGBTQI+ -owned business. - """ - monthly_estimated_revenue: NotRequired[ - "AccountService.UpdateParamsBusinessProfileMonthlyEstimatedRevenue" - ] - """ - An estimate of the monthly revenue of the business. Only accepted for accounts in Brazil and India. - """ - name: NotRequired[str] - """ - The customer-facing business name. - """ - product_description: NotRequired[str] - """ - Internal-only description of the product sold by, or service provided by, the business. Used by Stripe for risk and underwriting purposes. - """ - support_address: NotRequired[ - "AccountService.UpdateParamsBusinessProfileSupportAddress" - ] - """ - A publicly available mailing address for sending support issues to. - """ - support_email: NotRequired[str] - """ - A publicly available email address for sending support issues to. - """ - support_phone: NotRequired[str] - """ - A publicly available phone number to call with support issues. - """ - support_url: NotRequired["Literal['']|str"] - """ - A publicly available website for handling support issues. - """ - url: NotRequired[str] - """ - The business's publicly available website. - """ - - class UpdateParamsBusinessProfileAnnualRevenue(TypedDict): - amount: int - """ - A non-negative integer representing the amount in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal). - """ - 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). - """ - fiscal_year_end: str - """ - The close-out date of the preceding fiscal year in ISO 8601 format. E.g. 2023-12-31 for the 31st of December, 2023. - """ - - class UpdateParamsBusinessProfileMonthlyEstimatedRevenue(TypedDict): - amount: int - """ - A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal). - """ - 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). - """ - - class UpdateParamsBusinessProfileSupportAddress(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. - """ - - class UpdateParamsCapabilities(TypedDict): - acss_debit_payments: NotRequired[ - "AccountService.UpdateParamsCapabilitiesAcssDebitPayments" - ] - """ - The acss_debit_payments capability. - """ - affirm_payments: NotRequired[ - "AccountService.UpdateParamsCapabilitiesAffirmPayments" - ] - """ - The affirm_payments capability. - """ - afterpay_clearpay_payments: NotRequired[ - "AccountService.UpdateParamsCapabilitiesAfterpayClearpayPayments" - ] - """ - The afterpay_clearpay_payments capability. - """ - alma_payments: NotRequired[ - "AccountService.UpdateParamsCapabilitiesAlmaPayments" - ] - """ - The alma_payments capability. - """ - amazon_pay_payments: NotRequired[ - "AccountService.UpdateParamsCapabilitiesAmazonPayPayments" - ] - """ - The amazon_pay_payments capability. - """ - au_becs_debit_payments: NotRequired[ - "AccountService.UpdateParamsCapabilitiesAuBecsDebitPayments" - ] - """ - The au_becs_debit_payments capability. - """ - automatic_indirect_tax: NotRequired[ - "AccountService.UpdateParamsCapabilitiesAutomaticIndirectTax" - ] - """ - The automatic_indirect_tax capability. - """ - bacs_debit_payments: NotRequired[ - "AccountService.UpdateParamsCapabilitiesBacsDebitPayments" - ] - """ - The bacs_debit_payments capability. - """ - bancontact_payments: NotRequired[ - "AccountService.UpdateParamsCapabilitiesBancontactPayments" - ] - """ - The bancontact_payments capability. - """ - bank_transfer_payments: NotRequired[ - "AccountService.UpdateParamsCapabilitiesBankTransferPayments" - ] - """ - The bank_transfer_payments capability. - """ - billie_payments: NotRequired[ - "AccountService.UpdateParamsCapabilitiesBilliePayments" - ] - """ - The billie_payments capability. - """ - blik_payments: NotRequired[ - "AccountService.UpdateParamsCapabilitiesBlikPayments" - ] - """ - The blik_payments capability. - """ - boleto_payments: NotRequired[ - "AccountService.UpdateParamsCapabilitiesBoletoPayments" - ] - """ - The boleto_payments capability. - """ - card_issuing: NotRequired[ - "AccountService.UpdateParamsCapabilitiesCardIssuing" - ] - """ - The card_issuing capability. - """ - card_payments: NotRequired[ - "AccountService.UpdateParamsCapabilitiesCardPayments" - ] - """ - The card_payments capability. - """ - cartes_bancaires_payments: NotRequired[ - "AccountService.UpdateParamsCapabilitiesCartesBancairesPayments" - ] - """ - The cartes_bancaires_payments capability. - """ - cashapp_payments: NotRequired[ - "AccountService.UpdateParamsCapabilitiesCashappPayments" - ] - """ - The cashapp_payments capability. - """ - crypto_payments: NotRequired[ - "AccountService.UpdateParamsCapabilitiesCryptoPayments" - ] - """ - The crypto_payments capability. - """ - eps_payments: NotRequired[ - "AccountService.UpdateParamsCapabilitiesEpsPayments" - ] - """ - The eps_payments capability. - """ - fpx_payments: NotRequired[ - "AccountService.UpdateParamsCapabilitiesFpxPayments" - ] - """ - The fpx_payments capability. - """ - gb_bank_transfer_payments: NotRequired[ - "AccountService.UpdateParamsCapabilitiesGbBankTransferPayments" - ] - """ - The gb_bank_transfer_payments capability. - """ - giropay_payments: NotRequired[ - "AccountService.UpdateParamsCapabilitiesGiropayPayments" - ] - """ - The giropay_payments capability. - """ - gopay_payments: NotRequired[ - "AccountService.UpdateParamsCapabilitiesGopayPayments" - ] - """ - The gopay_payments capability. - """ - grabpay_payments: NotRequired[ - "AccountService.UpdateParamsCapabilitiesGrabpayPayments" - ] - """ - The grabpay_payments capability. - """ - id_bank_transfer_payments: NotRequired[ - "AccountService.UpdateParamsCapabilitiesIdBankTransferPayments" - ] - """ - The id_bank_transfer_payments capability. - """ - id_bank_transfer_payments_bca: NotRequired[ - "AccountService.UpdateParamsCapabilitiesIdBankTransferPaymentsBca" - ] - """ - The id_bank_transfer_payments_bca capability. - """ - ideal_payments: NotRequired[ - "AccountService.UpdateParamsCapabilitiesIdealPayments" - ] - """ - The ideal_payments capability. - """ - india_international_payments: NotRequired[ - "AccountService.UpdateParamsCapabilitiesIndiaInternationalPayments" - ] - """ - The india_international_payments capability. - """ - jcb_payments: NotRequired[ - "AccountService.UpdateParamsCapabilitiesJcbPayments" - ] - """ - The jcb_payments capability. - """ - jp_bank_transfer_payments: NotRequired[ - "AccountService.UpdateParamsCapabilitiesJpBankTransferPayments" - ] - """ - The jp_bank_transfer_payments capability. - """ - kakao_pay_payments: NotRequired[ - "AccountService.UpdateParamsCapabilitiesKakaoPayPayments" - ] - """ - The kakao_pay_payments capability. - """ - klarna_payments: NotRequired[ - "AccountService.UpdateParamsCapabilitiesKlarnaPayments" - ] - """ - The klarna_payments capability. - """ - konbini_payments: NotRequired[ - "AccountService.UpdateParamsCapabilitiesKonbiniPayments" - ] - """ - The konbini_payments capability. - """ - kr_card_payments: NotRequired[ - "AccountService.UpdateParamsCapabilitiesKrCardPayments" - ] - """ - The kr_card_payments capability. - """ - legacy_payments: NotRequired[ - "AccountService.UpdateParamsCapabilitiesLegacyPayments" - ] - """ - The legacy_payments capability. - """ - link_payments: NotRequired[ - "AccountService.UpdateParamsCapabilitiesLinkPayments" - ] - """ - The link_payments capability. - """ - mb_way_payments: NotRequired[ - "AccountService.UpdateParamsCapabilitiesMbWayPayments" - ] - """ - The mb_way_payments capability. - """ - mobilepay_payments: NotRequired[ - "AccountService.UpdateParamsCapabilitiesMobilepayPayments" - ] - """ - The mobilepay_payments capability. - """ - multibanco_payments: NotRequired[ - "AccountService.UpdateParamsCapabilitiesMultibancoPayments" - ] - """ - The multibanco_payments capability. - """ - mx_bank_transfer_payments: NotRequired[ - "AccountService.UpdateParamsCapabilitiesMxBankTransferPayments" - ] - """ - The mx_bank_transfer_payments capability. - """ - naver_pay_payments: NotRequired[ - "AccountService.UpdateParamsCapabilitiesNaverPayPayments" - ] - """ - The naver_pay_payments capability. - """ - nz_bank_account_becs_debit_payments: NotRequired[ - "AccountService.UpdateParamsCapabilitiesNzBankAccountBecsDebitPayments" - ] - """ - The nz_bank_account_becs_debit_payments capability. - """ - oxxo_payments: NotRequired[ - "AccountService.UpdateParamsCapabilitiesOxxoPayments" - ] - """ - The oxxo_payments capability. - """ - p24_payments: NotRequired[ - "AccountService.UpdateParamsCapabilitiesP24Payments" - ] - """ - The p24_payments capability. - """ - pay_by_bank_payments: NotRequired[ - "AccountService.UpdateParamsCapabilitiesPayByBankPayments" - ] - """ - The pay_by_bank_payments capability. - """ - payco_payments: NotRequired[ - "AccountService.UpdateParamsCapabilitiesPaycoPayments" - ] - """ - The payco_payments capability. - """ - paynow_payments: NotRequired[ - "AccountService.UpdateParamsCapabilitiesPaynowPayments" - ] - """ - The paynow_payments capability. - """ - paypal_payments: NotRequired[ - "AccountService.UpdateParamsCapabilitiesPaypalPayments" - ] - """ - The paypal_payments capability. - """ - paypay_payments: NotRequired[ - "AccountService.UpdateParamsCapabilitiesPaypayPayments" - ] - """ - The paypay_payments capability. - """ - payto_payments: NotRequired[ - "AccountService.UpdateParamsCapabilitiesPaytoPayments" - ] - """ - The payto_payments capability. - """ - pix_payments: NotRequired[ - "AccountService.UpdateParamsCapabilitiesPixPayments" - ] - """ - The pix_payments capability. - """ - promptpay_payments: NotRequired[ - "AccountService.UpdateParamsCapabilitiesPromptpayPayments" - ] - """ - The promptpay_payments capability. - """ - qris_payments: NotRequired[ - "AccountService.UpdateParamsCapabilitiesQrisPayments" - ] - """ - The qris_payments capability. - """ - rechnung_payments: NotRequired[ - "AccountService.UpdateParamsCapabilitiesRechnungPayments" - ] - """ - The rechnung_payments capability. - """ - revolut_pay_payments: NotRequired[ - "AccountService.UpdateParamsCapabilitiesRevolutPayPayments" - ] - """ - The revolut_pay_payments capability. - """ - samsung_pay_payments: NotRequired[ - "AccountService.UpdateParamsCapabilitiesSamsungPayPayments" - ] - """ - The samsung_pay_payments capability. - """ - satispay_payments: NotRequired[ - "AccountService.UpdateParamsCapabilitiesSatispayPayments" - ] - """ - The satispay_payments capability. - """ - sepa_bank_transfer_payments: NotRequired[ - "AccountService.UpdateParamsCapabilitiesSepaBankTransferPayments" - ] - """ - The sepa_bank_transfer_payments capability. - """ - sepa_debit_payments: NotRequired[ - "AccountService.UpdateParamsCapabilitiesSepaDebitPayments" - ] - """ - The sepa_debit_payments capability. - """ - shopeepay_payments: NotRequired[ - "AccountService.UpdateParamsCapabilitiesShopeepayPayments" - ] - """ - The shopeepay_payments capability. - """ - sofort_payments: NotRequired[ - "AccountService.UpdateParamsCapabilitiesSofortPayments" - ] - """ - The sofort_payments capability. - """ - stripe_balance_payments: NotRequired[ - "AccountService.UpdateParamsCapabilitiesStripeBalancePayments" - ] - """ - The stripe_balance_payments capability. - """ - swish_payments: NotRequired[ - "AccountService.UpdateParamsCapabilitiesSwishPayments" - ] - """ - The swish_payments capability. - """ - tax_reporting_us_1099_k: NotRequired[ - "AccountService.UpdateParamsCapabilitiesTaxReportingUs1099K" - ] - """ - The tax_reporting_us_1099_k capability. - """ - tax_reporting_us_1099_misc: NotRequired[ - "AccountService.UpdateParamsCapabilitiesTaxReportingUs1099Misc" - ] - """ - The tax_reporting_us_1099_misc capability. - """ - transfers: NotRequired[ - "AccountService.UpdateParamsCapabilitiesTransfers" - ] - """ - The transfers capability. - """ - treasury: NotRequired[ - "AccountService.UpdateParamsCapabilitiesTreasury" - ] - """ - The treasury capability. - """ - treasury_evolve: NotRequired[ - "AccountService.UpdateParamsCapabilitiesTreasuryEvolve" - ] - """ - The treasury_evolve capability. - """ - treasury_fifth_third: NotRequired[ - "AccountService.UpdateParamsCapabilitiesTreasuryFifthThird" - ] - """ - The treasury_fifth_third capability. - """ - treasury_goldman_sachs: NotRequired[ - "AccountService.UpdateParamsCapabilitiesTreasuryGoldmanSachs" - ] - """ - The treasury_goldman_sachs capability. - """ - twint_payments: NotRequired[ - "AccountService.UpdateParamsCapabilitiesTwintPayments" - ] - """ - The twint_payments capability. - """ - us_bank_account_ach_payments: NotRequired[ - "AccountService.UpdateParamsCapabilitiesUsBankAccountAchPayments" - ] - """ - The us_bank_account_ach_payments capability. - """ - us_bank_transfer_payments: NotRequired[ - "AccountService.UpdateParamsCapabilitiesUsBankTransferPayments" - ] - """ - The us_bank_transfer_payments capability. - """ - zip_payments: NotRequired[ - "AccountService.UpdateParamsCapabilitiesZipPayments" - ] - """ - The zip_payments capability. - """ - - class UpdateParamsCapabilitiesAcssDebitPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class UpdateParamsCapabilitiesAffirmPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class UpdateParamsCapabilitiesAfterpayClearpayPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class UpdateParamsCapabilitiesAlmaPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class UpdateParamsCapabilitiesAmazonPayPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class UpdateParamsCapabilitiesAuBecsDebitPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class UpdateParamsCapabilitiesAutomaticIndirectTax(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class UpdateParamsCapabilitiesBacsDebitPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class UpdateParamsCapabilitiesBancontactPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class UpdateParamsCapabilitiesBankTransferPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class UpdateParamsCapabilitiesBilliePayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class UpdateParamsCapabilitiesBlikPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class UpdateParamsCapabilitiesBoletoPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class UpdateParamsCapabilitiesCardIssuing(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class UpdateParamsCapabilitiesCardPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class UpdateParamsCapabilitiesCartesBancairesPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class UpdateParamsCapabilitiesCashappPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class UpdateParamsCapabilitiesCryptoPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class UpdateParamsCapabilitiesEpsPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class UpdateParamsCapabilitiesFpxPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class UpdateParamsCapabilitiesGbBankTransferPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class UpdateParamsCapabilitiesGiropayPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class UpdateParamsCapabilitiesGopayPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class UpdateParamsCapabilitiesGrabpayPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class UpdateParamsCapabilitiesIdBankTransferPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class UpdateParamsCapabilitiesIdBankTransferPaymentsBca(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class UpdateParamsCapabilitiesIdealPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class UpdateParamsCapabilitiesIndiaInternationalPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class UpdateParamsCapabilitiesJcbPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class UpdateParamsCapabilitiesJpBankTransferPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class UpdateParamsCapabilitiesKakaoPayPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class UpdateParamsCapabilitiesKlarnaPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class UpdateParamsCapabilitiesKonbiniPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class UpdateParamsCapabilitiesKrCardPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class UpdateParamsCapabilitiesLegacyPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class UpdateParamsCapabilitiesLinkPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class UpdateParamsCapabilitiesMbWayPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class UpdateParamsCapabilitiesMobilepayPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class UpdateParamsCapabilitiesMultibancoPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class UpdateParamsCapabilitiesMxBankTransferPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class UpdateParamsCapabilitiesNaverPayPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class UpdateParamsCapabilitiesNzBankAccountBecsDebitPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class UpdateParamsCapabilitiesOxxoPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class UpdateParamsCapabilitiesP24Payments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class UpdateParamsCapabilitiesPayByBankPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class UpdateParamsCapabilitiesPaycoPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class UpdateParamsCapabilitiesPaynowPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class UpdateParamsCapabilitiesPaypalPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class UpdateParamsCapabilitiesPaypayPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class UpdateParamsCapabilitiesPaytoPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class UpdateParamsCapabilitiesPixPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class UpdateParamsCapabilitiesPromptpayPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class UpdateParamsCapabilitiesQrisPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class UpdateParamsCapabilitiesRechnungPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class UpdateParamsCapabilitiesRevolutPayPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class UpdateParamsCapabilitiesSamsungPayPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class UpdateParamsCapabilitiesSatispayPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class UpdateParamsCapabilitiesSepaBankTransferPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class UpdateParamsCapabilitiesSepaDebitPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class UpdateParamsCapabilitiesShopeepayPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class UpdateParamsCapabilitiesSofortPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class UpdateParamsCapabilitiesStripeBalancePayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class UpdateParamsCapabilitiesSwishPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class UpdateParamsCapabilitiesTaxReportingUs1099K(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class UpdateParamsCapabilitiesTaxReportingUs1099Misc(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class UpdateParamsCapabilitiesTransfers(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class UpdateParamsCapabilitiesTreasury(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class UpdateParamsCapabilitiesTreasuryEvolve(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class UpdateParamsCapabilitiesTreasuryFifthThird(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class UpdateParamsCapabilitiesTreasuryGoldmanSachs(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class UpdateParamsCapabilitiesTwintPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class UpdateParamsCapabilitiesUsBankAccountAchPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class UpdateParamsCapabilitiesUsBankTransferPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class UpdateParamsCapabilitiesZipPayments(TypedDict): - requested: NotRequired[bool] - """ - Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. - """ - - class UpdateParamsCard(TypedDict): - object: Literal["card"] - address_city: NotRequired[str] - address_country: NotRequired[str] - address_line1: NotRequired[str] - address_line2: NotRequired[str] - address_state: NotRequired[str] - address_zip: NotRequired[str] - currency: NotRequired[str] - cvc: NotRequired[str] - exp_month: int - exp_year: int - name: NotRequired[str] - number: str - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. - """ - default_for_currency: NotRequired[bool] - - class UpdateParamsCardToken(TypedDict): - object: Literal["card"] - currency: NotRequired[str] - token: str - - class UpdateParamsCompany(TypedDict): - address: NotRequired["AccountService.UpdateParamsCompanyAddress"] - """ - The company's primary address. - """ - address_kana: NotRequired[ - "AccountService.UpdateParamsCompanyAddressKana" - ] - """ - The Kana variation of the company's primary address (Japan only). - """ - address_kanji: NotRequired[ - "AccountService.UpdateParamsCompanyAddressKanji" - ] - """ - The Kanji variation of the company's primary address (Japan only). - """ - directors_provided: NotRequired[bool] - """ - Whether the company's directors have been provided. Set this Boolean to `true` after creating all the company's directors with [the Persons API](https://docs.stripe.com/api/persons) for accounts with a `relationship.director` requirement. This value is not automatically set to `true` after creating directors, so it needs to be updated to indicate all directors have been provided. - """ - directorship_declaration: NotRequired[ - "AccountService.UpdateParamsCompanyDirectorshipDeclaration" - ] - """ - This hash is used to attest that the directors information provided to Stripe is both current and correct. - """ - executives_provided: NotRequired[bool] - """ - Whether the company's executives have been provided. Set this Boolean to `true` after creating all the company's executives with [the Persons API](https://docs.stripe.com/api/persons) for accounts with a `relationship.executive` requirement. - """ - export_license_id: NotRequired[str] - """ - The export license ID number of the company, also referred as Import Export Code (India only). - """ - export_purpose_code: NotRequired[str] - """ - The purpose code to use for export transactions (India only). - """ - name: NotRequired[str] - """ - The company's legal name. - """ - name_kana: NotRequired[str] - """ - The Kana variation of the company's legal name (Japan only). - """ - name_kanji: NotRequired[str] - """ - The Kanji variation of the company's legal name (Japan only). - """ - owners_provided: NotRequired[bool] - """ - Whether the company's owners have been provided. Set this Boolean to `true` after creating all the company's owners with [the Persons API](https://docs.stripe.com/api/persons) for accounts with a `relationship.owner` requirement. - """ - ownership_declaration: NotRequired[ - "AccountService.UpdateParamsCompanyOwnershipDeclaration" - ] - """ - This hash is used to attest that the beneficial owner information provided to Stripe is both current and correct. - """ - ownership_exemption_reason: NotRequired[ - "Literal['']|Literal['qualified_entity_exceeds_ownership_threshold', 'qualifies_as_financial_institution']" - ] - """ - This value is used to determine if a business is exempt from providing ultimate beneficial owners. See [this support article](https://support.stripe.com/questions/exemption-from-providing-ownership-details) and [changelog](https://docs.stripe.com/changelog/acacia/2025-01-27/ownership-exemption-reason-accounts-api) for more details. - """ - phone: NotRequired[str] - """ - The company's phone number (used for verification). - """ - registration_date: NotRequired[ - "Literal['']|AccountService.UpdateParamsCompanyRegistrationDate" - ] - registration_number: NotRequired[str] - """ - The identification number given to a company when it is registered or incorporated, if distinct from the identification number used for filing taxes. (Examples are the CIN for companies and LLP IN for partnerships in India, and the Company Registration Number in Hong Kong). - """ - structure: NotRequired[ - "Literal['']|Literal['free_zone_establishment', 'free_zone_llc', 'government_instrumentality', 'governmental_unit', 'incorporated_non_profit', 'incorporated_partnership', 'limited_liability_partnership', 'llc', 'multi_member_llc', 'private_company', 'private_corporation', 'private_partnership', 'public_company', 'public_corporation', 'public_partnership', 'registered_charity', 'single_member_llc', 'sole_establishment', 'sole_proprietorship', 'tax_exempt_government_instrumentality', 'unincorporated_association', 'unincorporated_non_profit', 'unincorporated_partnership']" - ] - """ - The category identifying the legal structure of the company or legal entity. See [Business structure](https://docs.stripe.com/connect/identity-verification#business-structure) for more details. Pass an empty string to unset this value. - """ - tax_id: NotRequired[str] - """ - The business ID number of the company, as appropriate for the company's country. (Examples are an Employer ID Number in the U.S., a Business Number in Canada, or a Company Number in the UK.) - """ - tax_id_registrar: NotRequired[str] - """ - The jurisdiction in which the `tax_id` is registered (Germany-based companies only). - """ - vat_id: NotRequired[str] - """ - The VAT number of the company. - """ - verification: NotRequired[ - "AccountService.UpdateParamsCompanyVerification" - ] - """ - Information on the verification state of the company. - """ - - class UpdateParamsCompanyAddress(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. - """ - - class UpdateParamsCompanyAddressKana(TypedDict): - city: NotRequired[str] - """ - City or ward. - """ - 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] - """ - Block or building number. - """ - line2: NotRequired[str] - """ - Building details. - """ - postal_code: NotRequired[str] - """ - Postal code. - """ - state: NotRequired[str] - """ - Prefecture. - """ - town: NotRequired[str] - """ - Town or cho-me. - """ - - class UpdateParamsCompanyAddressKanji(TypedDict): - city: NotRequired[str] - """ - City or ward. - """ - 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] - """ - Block or building number. - """ - line2: NotRequired[str] - """ - Building details. - """ - postal_code: NotRequired[str] - """ - Postal code. - """ - state: NotRequired[str] - """ - Prefecture. - """ - town: NotRequired[str] - """ - Town or cho-me. - """ - - class UpdateParamsCompanyDirectorshipDeclaration(TypedDict): - date: NotRequired[int] - """ - The Unix timestamp marking when the directorship declaration attestation was made. - """ - ip: NotRequired[str] - """ - The IP address from which the directorship declaration attestation was made. - """ - user_agent: NotRequired[str] - """ - The user agent of the browser from which the directorship declaration attestation was made. - """ - - class UpdateParamsCompanyOwnershipDeclaration(TypedDict): - date: NotRequired[int] - """ - The Unix timestamp marking when the beneficial owner attestation was made. - """ - ip: NotRequired[str] - """ - The IP address from which the beneficial owner attestation was made. - """ - user_agent: NotRequired[str] - """ - The user agent of the browser from which the beneficial owner attestation was made. - """ - - class UpdateParamsCompanyRegistrationDate(TypedDict): - day: int - """ - The day of registration, between 1 and 31. - """ - month: int - """ - The month of registration, between 1 and 12. - """ - year: int - """ - The four-digit year of registration. - """ - - class UpdateParamsCompanyVerification(TypedDict): - document: NotRequired[ - "AccountService.UpdateParamsCompanyVerificationDocument" - ] - """ - A document verifying the business. - """ - - class UpdateParamsCompanyVerificationDocument(TypedDict): - back: NotRequired[str] - """ - The back of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. - """ - front: NotRequired[str] - """ - The front of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. - """ - - class UpdateParamsDocuments(TypedDict): - bank_account_ownership_verification: NotRequired[ - "AccountService.UpdateParamsDocumentsBankAccountOwnershipVerification" - ] - """ - One or more documents that support the [Bank account ownership verification](https://support.stripe.com/questions/bank-account-ownership-verification) requirement. Must be a document associated with the account's primary active bank account that displays the last 4 digits of the account number, either a statement or a check. - """ - company_license: NotRequired[ - "AccountService.UpdateParamsDocumentsCompanyLicense" - ] - """ - One or more documents that demonstrate proof of a company's license to operate. - """ - company_memorandum_of_association: NotRequired[ - "AccountService.UpdateParamsDocumentsCompanyMemorandumOfAssociation" - ] - """ - One or more documents showing the company's Memorandum of Association. - """ - company_ministerial_decree: NotRequired[ - "AccountService.UpdateParamsDocumentsCompanyMinisterialDecree" - ] - """ - (Certain countries only) One or more documents showing the ministerial decree legalizing the company's establishment. - """ - company_registration_verification: NotRequired[ - "AccountService.UpdateParamsDocumentsCompanyRegistrationVerification" - ] - """ - One or more documents that demonstrate proof of a company's registration with the appropriate local authorities. - """ - company_tax_id_verification: NotRequired[ - "AccountService.UpdateParamsDocumentsCompanyTaxIdVerification" - ] - """ - One or more documents that demonstrate proof of a company's tax ID. - """ - proof_of_address: NotRequired[ - "AccountService.UpdateParamsDocumentsProofOfAddress" - ] - """ - One or more documents that demonstrate proof of address. - """ - proof_of_registration: NotRequired[ - "AccountService.UpdateParamsDocumentsProofOfRegistration" - ] - """ - One or more documents showing the company's proof of registration with the national business registry. - """ - proof_of_ultimate_beneficial_ownership: NotRequired[ - "AccountService.UpdateParamsDocumentsProofOfUltimateBeneficialOwnership" - ] - """ - One or more documents that demonstrate proof of ultimate beneficial ownership. - """ - - class UpdateParamsDocumentsBankAccountOwnershipVerification(TypedDict): - files: NotRequired[List[str]] - """ - One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. - """ - - class UpdateParamsDocumentsCompanyLicense(TypedDict): - files: NotRequired[List[str]] - """ - One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. - """ - - class UpdateParamsDocumentsCompanyMemorandumOfAssociation(TypedDict): - files: NotRequired[List[str]] - """ - One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. - """ - - class UpdateParamsDocumentsCompanyMinisterialDecree(TypedDict): - files: NotRequired[List[str]] - """ - One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. - """ - - class UpdateParamsDocumentsCompanyRegistrationVerification(TypedDict): - files: NotRequired[List[str]] - """ - One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. - """ - - class UpdateParamsDocumentsCompanyTaxIdVerification(TypedDict): - files: NotRequired[List[str]] - """ - One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. - """ - - class UpdateParamsDocumentsProofOfAddress(TypedDict): - files: NotRequired[List[str]] - """ - One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. - """ - - class UpdateParamsDocumentsProofOfRegistration(TypedDict): - files: NotRequired[List[str]] - """ - One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. - """ - - class UpdateParamsDocumentsProofOfUltimateBeneficialOwnership(TypedDict): - files: NotRequired[List[str]] - """ - One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. - """ - - class UpdateParamsGroups(TypedDict): - payments_pricing: NotRequired["Literal['']|str"] - """ - The group the account is in to determine their payments pricing, and null if the account is on customized pricing. [See the Platform pricing tool documentation](https://stripe.com/docs/connect/platform-pricing-tools) for details. - """ - - class UpdateParamsIndividual(TypedDict): - address: NotRequired["AccountService.UpdateParamsIndividualAddress"] - """ - The individual's primary address. - """ - address_kana: NotRequired[ - "AccountService.UpdateParamsIndividualAddressKana" - ] - """ - The Kana variation of the individual's primary address (Japan only). - """ - address_kanji: NotRequired[ - "AccountService.UpdateParamsIndividualAddressKanji" - ] - """ - The Kanji variation of the individual's primary address (Japan only). - """ - dob: NotRequired[ - "Literal['']|AccountService.UpdateParamsIndividualDob" - ] - """ - The individual's date of birth. - """ - email: NotRequired[str] - """ - The individual's email address. - """ - first_name: NotRequired[str] - """ - The individual's first name. - """ - first_name_kana: NotRequired[str] - """ - The Kana variation of the individual's first name (Japan only). - """ - first_name_kanji: NotRequired[str] - """ - The Kanji variation of the individual's first name (Japan only). - """ - full_name_aliases: NotRequired["Literal['']|List[str]"] - """ - A list of alternate names or aliases that the individual is known by. - """ - gender: NotRequired[str] - """ - The individual's gender - """ - id_number: NotRequired[str] - """ - The government-issued ID number of the individual, as appropriate for the representative's country. (Examples are a Social Security Number in the U.S., or a Social Insurance Number in Canada). Instead of the number itself, you can also provide a [PII token created with Stripe.js](https://docs.stripe.com/js/tokens/create_token?type=pii). - """ - id_number_secondary: NotRequired[str] - """ - The government-issued secondary ID number of the individual, as appropriate for the representative's country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token created with Stripe.js](https://docs.stripe.com/js/tokens/create_token?type=pii). - """ - last_name: NotRequired[str] - """ - The individual's last name. - """ - last_name_kana: NotRequired[str] - """ - The Kana variation of the individual's last name (Japan only). - """ - last_name_kanji: NotRequired[str] - """ - The Kanji variation of the individual's last name (Japan only). - """ - maiden_name: NotRequired[str] - """ - The individual's maiden name. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - phone: NotRequired[str] - """ - The individual's phone number. - """ - political_exposure: NotRequired[Literal["existing", "none"]] - """ - Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. - """ - registered_address: NotRequired[ - "AccountService.UpdateParamsIndividualRegisteredAddress" - ] - """ - The individual's registered address. - """ - relationship: NotRequired[ - "AccountService.UpdateParamsIndividualRelationship" - ] - """ - Describes the person's relationship to the account. - """ - ssn_last_4: NotRequired[str] - """ - The last four digits of the individual's Social Security Number (U.S. only). - """ - verification: NotRequired[ - "AccountService.UpdateParamsIndividualVerification" - ] - """ - The individual's verification document information. - """ - - class UpdateParamsIndividualAddress(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. - """ - - class UpdateParamsIndividualAddressKana(TypedDict): - city: NotRequired[str] - """ - City or ward. - """ - 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] - """ - Block or building number. - """ - line2: NotRequired[str] - """ - Building details. - """ - postal_code: NotRequired[str] - """ - Postal code. - """ - state: NotRequired[str] - """ - Prefecture. - """ - town: NotRequired[str] - """ - Town or cho-me. - """ - - class UpdateParamsIndividualAddressKanji(TypedDict): - city: NotRequired[str] - """ - City or ward. - """ - 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] - """ - Block or building number. - """ - line2: NotRequired[str] - """ - Building details. - """ - postal_code: NotRequired[str] - """ - Postal code. - """ - state: NotRequired[str] - """ - Prefecture. - """ - town: NotRequired[str] - """ - Town or cho-me. - """ - - class UpdateParamsIndividualDob(TypedDict): - day: int - """ - The day of birth, between 1 and 31. - """ - month: int - """ - The month of birth, between 1 and 12. - """ - year: int - """ - The four-digit year of birth. - """ - - class UpdateParamsIndividualRegisteredAddress(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. - """ - - class UpdateParamsIndividualRelationship(TypedDict): - director: NotRequired[bool] - """ - Whether the person is a director of the account's legal entity. Directors are typically members of the governing board of the company, or responsible for ensuring the company meets its regulatory obligations. - """ - executive: NotRequired[bool] - """ - Whether the person has significant responsibility to control, manage, or direct the organization. - """ - owner: NotRequired[bool] - """ - Whether the person is an owner of the account's legal entity. - """ - percent_ownership: NotRequired["Literal['']|float"] - """ - The percent owned by the person of the account's legal entity. - """ - title: NotRequired[str] - """ - The person's title (e.g., CEO, Support Engineer). - """ - - class UpdateParamsIndividualVerification(TypedDict): - additional_document: NotRequired[ - "AccountService.UpdateParamsIndividualVerificationAdditionalDocument" - ] - """ - A document showing address, either a passport, local ID card, or utility bill from a well-known utility company. - """ - document: NotRequired[ - "AccountService.UpdateParamsIndividualVerificationDocument" - ] - """ - An identifying document, either a passport or local ID card. - """ - - class UpdateParamsIndividualVerificationAdditionalDocument(TypedDict): - back: NotRequired[str] - """ - The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. - """ - front: NotRequired[str] - """ - The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. - """ - - class UpdateParamsIndividualVerificationDocument(TypedDict): - back: NotRequired[str] - """ - The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. - """ - front: NotRequired[str] - """ - The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. - """ - - class UpdateParamsRiskControls(TypedDict): - charges: NotRequired["AccountService.UpdateParamsRiskControlsCharges"] - """ - Represents the risk control status of charges. Please see [this page for more details](https://stripe.com/docs/connect/pausing-payments-or-payouts-on-connected-accounts). - """ - payouts: NotRequired["AccountService.UpdateParamsRiskControlsPayouts"] - """ - Represents the risk control status of payouts. Please see [this page for more details](https://stripe.com/docs/connect/pausing-payments-or-payouts-on-connected-accounts). - """ - - class UpdateParamsRiskControlsCharges(TypedDict): - pause_requested: NotRequired[bool] - """ - To request to pause a risk control, pass `true`. To request to unpause a risk control, pass `false`. - There can be a delay before the risk control is paused or unpaused. - """ - - class UpdateParamsRiskControlsPayouts(TypedDict): - pause_requested: NotRequired[bool] - """ - To request to pause a risk control, pass `true`. To request to unpause a risk control, pass `false`. - There can be a delay before the risk control is paused or unpaused. - """ - - class UpdateParamsSettings(TypedDict): - bacs_debit_payments: NotRequired[ - "AccountService.UpdateParamsSettingsBacsDebitPayments" - ] - """ - Settings specific to Bacs Direct Debit payments. - """ - bank_bca_onboarding: NotRequired[ - "AccountService.UpdateParamsSettingsBankBcaOnboarding" - ] - """ - Settings specific to bank BCA onboarding for Indonesia bank transfers payments method. - """ - branding: NotRequired["AccountService.UpdateParamsSettingsBranding"] - """ - Settings used to apply the account's branding to email receipts, invoices, Checkout, and other products. - """ - capital: NotRequired["AccountService.UpdateParamsSettingsCapital"] - """ - Settings specific to the account's use of the Capital product. - """ - card_issuing: NotRequired[ - "AccountService.UpdateParamsSettingsCardIssuing" - ] - """ - Settings specific to the account's use of the Card Issuing product. - """ - card_payments: NotRequired[ - "AccountService.UpdateParamsSettingsCardPayments" - ] - """ - Settings specific to card charging on the account. - """ - invoices: NotRequired["AccountService.UpdateParamsSettingsInvoices"] - """ - Settings specific to the account's use of Invoices. - """ - payments: NotRequired["AccountService.UpdateParamsSettingsPayments"] - """ - Settings that apply across payment methods for charging on the account. - """ - payouts: NotRequired["AccountService.UpdateParamsSettingsPayouts"] - """ - Settings specific to the account's payouts. - """ - tax_forms: NotRequired["AccountService.UpdateParamsSettingsTaxForms"] - """ - Settings specific to the account's tax forms. - """ - treasury: NotRequired["AccountService.UpdateParamsSettingsTreasury"] - """ - Settings specific to the account's Treasury FinancialAccounts. - """ - - class UpdateParamsSettingsBacsDebitPayments(TypedDict): - display_name: NotRequired[str] - """ - The Bacs Direct Debit Display Name for this account. For payments made with Bacs Direct Debit, this name appears on the mandate as the statement descriptor. Mobile banking apps display it as the name of the business. To use custom branding, set the Bacs Direct Debit Display Name during or right after creation. Custom branding incurs an additional monthly fee for the platform. If you don't set the display name before requesting Bacs capability, it's automatically set as "Stripe" and the account is onboarded to Stripe branding, which is free. - """ - - class UpdateParamsSettingsBankBcaOnboarding(TypedDict): - account_holder_name: NotRequired[str] - """ - Bank BCA business account holder name - """ - business_account_number: NotRequired[str] - """ - Bank BCA business account number - """ - - class UpdateParamsSettingsBranding(TypedDict): - icon: NotRequired[str] - """ - (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) An icon for the account. Must be square and at least 128px x 128px. - """ - logo: NotRequired[str] - """ - (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) A logo for the account that will be used in Checkout instead of the icon and without the account's name next to it if provided. Must be at least 128px x 128px. - """ - primary_color: NotRequired[str] - """ - A CSS hex color value representing the primary branding color for this account. - """ - secondary_color: NotRequired[str] - """ - A CSS hex color value representing the secondary branding color for this account. - """ - - class UpdateParamsSettingsCapital(TypedDict): - payout_destination: NotRequired[Dict[str, str]] - """ - Per-currency mapping of user-selected destination accounts used to pay out loans. - """ - payout_destination_selector: NotRequired[Dict[str, List[str]]] - """ - Per-currency mapping of all destination accounts eligible to receive Capital financing payouts. - """ - - class UpdateParamsSettingsCardIssuing(TypedDict): - tos_acceptance: NotRequired[ - "AccountService.UpdateParamsSettingsCardIssuingTosAcceptance" - ] - """ - Details on the account's acceptance of the [Stripe Issuing Terms and Disclosures](https://docs.stripe.com/issuing/connect/tos_acceptance). - """ - - class UpdateParamsSettingsCardIssuingTosAcceptance(TypedDict): - date: NotRequired[int] - """ - The Unix timestamp marking when the account representative accepted the service agreement. - """ - ip: NotRequired[str] - """ - The IP address from which the account representative accepted the service agreement. - """ - user_agent: NotRequired["Literal['']|str"] - """ - The user agent of the browser from which the account representative accepted the service agreement. - """ - - class UpdateParamsSettingsCardPayments(TypedDict): - decline_on: NotRequired[ - "AccountService.UpdateParamsSettingsCardPaymentsDeclineOn" - ] - """ - Automatically declines certain charge types regardless of whether the card issuer accepted or declined the charge. - """ - statement_descriptor_prefix: NotRequired[str] - """ - The default text that appears on credit card statements when a charge is made. This field prefixes any dynamic `statement_descriptor` specified on the charge. `statement_descriptor_prefix` is useful for maximizing descriptor space for the dynamic portion. - """ - statement_descriptor_prefix_kana: NotRequired["Literal['']|str"] - """ - The Kana variation of the default text that appears on credit card statements when a charge is made (Japan only). This field prefixes any dynamic `statement_descriptor_suffix_kana` specified on the charge. `statement_descriptor_prefix_kana` is useful for maximizing descriptor space for the dynamic portion. - """ - statement_descriptor_prefix_kanji: NotRequired["Literal['']|str"] - """ - The Kanji variation of the default text that appears on credit card statements when a charge is made (Japan only). This field prefixes any dynamic `statement_descriptor_suffix_kanji` specified on the charge. `statement_descriptor_prefix_kanji` is useful for maximizing descriptor space for the dynamic portion. - """ - - class UpdateParamsSettingsCardPaymentsDeclineOn(TypedDict): - avs_failure: NotRequired[bool] - """ - Whether Stripe automatically declines charges with an incorrect ZIP or postal code. This setting only applies when a ZIP or postal code is provided and they fail bank verification. - """ - cvc_failure: NotRequired[bool] - """ - Whether Stripe automatically declines charges with an incorrect CVC. This setting only applies when a CVC is provided and it fails bank verification. - """ - - class UpdateParamsSettingsInvoices(TypedDict): - default_account_tax_ids: NotRequired["Literal['']|List[str]"] - """ - The list of default Account Tax IDs to automatically include on invoices. Account Tax IDs get added when an invoice is finalized. - """ - hosted_payment_method_save: NotRequired[ - Literal["always", "never", "offer"] - ] - """ - Whether payment methods should be saved when a payment is completed for a one-time invoices on a hosted invoice page. - """ - - class UpdateParamsSettingsPayments(TypedDict): - statement_descriptor: NotRequired[str] - """ - The default text that appears on statements for non-card charges outside of Japan. For card charges, if you don't set a `statement_descriptor_prefix`, this text is also used as the statement descriptor prefix. In that case, if concatenating the statement descriptor suffix causes the combined statement descriptor to exceed 22 characters, we truncate the `statement_descriptor` text to limit the full descriptor to 22 characters. For more information about statement descriptors and their requirements, see the [account settings documentation](https://docs.stripe.com/get-started/account/statement-descriptors). - """ - statement_descriptor_kana: NotRequired[str] - """ - The Kana variation of `statement_descriptor` used for charges in Japan. Japanese statement descriptors have [special requirements](https://docs.stripe.com/get-started/account/statement-descriptors#set-japanese-statement-descriptors). - """ - statement_descriptor_kanji: NotRequired[str] - """ - The Kanji variation of `statement_descriptor` used for charges in Japan. Japanese statement descriptors have [special requirements](https://docs.stripe.com/get-started/account/statement-descriptors#set-japanese-statement-descriptors). - """ - - class UpdateParamsSettingsPayouts(TypedDict): - debit_negative_balances: NotRequired[bool] - """ - A Boolean indicating whether Stripe should try to reclaim negative balances from an attached bank account. For details, see [Understanding Connect Account Balances](https://docs.stripe.com/connect/account-balances). - """ - schedule: NotRequired[ - "AccountService.UpdateParamsSettingsPayoutsSchedule" - ] - """ - Details on when funds from charges are available, and when they are paid out to an external account. For details, see our [Setting Bank and Debit Card Payouts](https://docs.stripe.com/connect/bank-transfers#payout-information) documentation. - """ - statement_descriptor: NotRequired[str] - """ - The text that appears on the bank account statement for payouts. If not set, this defaults to the platform's bank descriptor as set in the Dashboard. - """ - - class UpdateParamsSettingsPayoutsSchedule(TypedDict): - delay_days: NotRequired["Literal['minimum']|int"] - """ - The number of days charge funds are held before being paid out. May also be set to `minimum`, representing the lowest available value for the account country. Default is `minimum`. The `delay_days` parameter remains at the last configured value if `interval` is `manual`. [Learn more about controlling payout delay days](https://docs.stripe.com/connect/manage-payout-schedule). - """ - interval: NotRequired[Literal["daily", "manual", "monthly", "weekly"]] - """ - How frequently available funds are paid out. One of: `daily`, `manual`, `weekly`, or `monthly`. Default is `daily`. - """ - monthly_anchor: NotRequired[int] - """ - The day of the month when available funds are paid out, specified as a number between 1--31. Payouts nominally scheduled between the 29th and 31st of the month are instead sent on the last day of a shorter month. Required and applicable only if `interval` is `monthly`. - """ - monthly_payout_days: NotRequired[List[int]] - """ - The days of the month when available funds are paid out, specified as an array of numbers between 1--31. Payouts nominally scheduled between the 29th and 31st of the month are instead sent on the last day of a shorter month. Required and applicable only if `interval` is `monthly` and `monthly_anchor` is not set. - """ - weekly_anchor: NotRequired[ - Literal[ - "friday", - "monday", - "saturday", - "sunday", - "thursday", - "tuesday", - "wednesday", - ] - ] - """ - The day of the week when available funds are paid out, specified as `monday`, `tuesday`, etc. Required and applicable only if `interval` is `weekly`. - """ - weekly_payout_days: NotRequired[ - List[ - Literal["friday", "monday", "thursday", "tuesday", "wednesday"] - ] - ] - """ - The days of the week when available funds are paid out, specified as an array, e.g., [`monday`, `tuesday`]. Required and applicable only if `interval` is `weekly`. - """ - - class UpdateParamsSettingsTaxForms(TypedDict): - consented_to_paperless_delivery: NotRequired[bool] - """ - Whether the account opted out of receiving their tax forms by postal delivery. - """ - - class UpdateParamsSettingsTreasury(TypedDict): - tos_acceptance: NotRequired[ - "AccountService.UpdateParamsSettingsTreasuryTosAcceptance" - ] - """ - Details on the account's acceptance of the Stripe Treasury Services Agreement. - """ - - class UpdateParamsSettingsTreasuryTosAcceptance(TypedDict): - date: NotRequired[int] - """ - The Unix timestamp marking when the account representative accepted the service agreement. - """ - ip: NotRequired[str] - """ - The IP address from which the account representative accepted the service agreement. - """ - user_agent: NotRequired["Literal['']|str"] - """ - The user agent of the browser from which the account representative accepted the service agreement. - """ - - class UpdateParamsTosAcceptance(TypedDict): - date: NotRequired[int] - """ - The Unix timestamp marking when the account representative accepted their service agreement. - """ - ip: NotRequired[str] - """ - The IP address from which the account representative accepted their service agreement. - """ - service_agreement: NotRequired[str] - """ - The user's service agreement type. - """ - user_agent: NotRequired[str] - """ - The user agent of the browser from which the account representative accepted their service agreement. - """ - def delete( self, account: str, - params: Optional["AccountService.DeleteParams"] = None, + params: Optional["AccountDeleteParams"] = None, options: Optional[RequestOptions] = None, ) -> Account: """ @@ -4386,7 +63,7 @@ def delete( async def delete_async( self, account: str, - params: Optional["AccountService.DeleteParams"] = None, + params: Optional["AccountDeleteParams"] = None, options: Optional[RequestOptions] = None, ) -> Account: """ @@ -4412,7 +89,7 @@ async def delete_async( def retrieve( self, account: str, - params: Optional["AccountService.RetrieveParams"] = None, + params: Optional["AccountRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Account: """ @@ -4432,7 +109,7 @@ def retrieve( async def retrieve_async( self, account: str, - params: Optional["AccountService.RetrieveParams"] = None, + params: Optional["AccountRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Account: """ @@ -4452,7 +129,7 @@ async def retrieve_async( def update( self, account: str, - params: Optional["AccountService.UpdateParams"] = None, + params: Optional["AccountUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> Account: """ @@ -4484,7 +161,7 @@ def update( async def update_async( self, account: str, - params: Optional["AccountService.UpdateParams"] = None, + params: Optional["AccountUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> Account: """ @@ -4515,7 +192,7 @@ async def update_async( def retrieve_current( self, - params: Optional["AccountService.RetrieveCurrentParams"] = None, + params: Optional["AccountRetrieveCurrentParams"] = None, options: Optional[RequestOptions] = None, ) -> Account: """ @@ -4534,7 +211,7 @@ def retrieve_current( async def retrieve_current_async( self, - params: Optional["AccountService.RetrieveCurrentParams"] = None, + params: Optional["AccountRetrieveCurrentParams"] = None, options: Optional[RequestOptions] = None, ) -> Account: """ @@ -4553,7 +230,7 @@ async def retrieve_current_async( def list( self, - params: Optional["AccountService.ListParams"] = None, + params: Optional["AccountListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[Account]: """ @@ -4572,7 +249,7 @@ def list( async def list_async( self, - params: Optional["AccountService.ListParams"] = None, + params: Optional["AccountListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[Account]: """ @@ -4591,7 +268,7 @@ async def list_async( def create( self, - params: Optional["AccountService.CreateParams"] = None, + params: Optional["AccountCreateParams"] = None, options: Optional[RequestOptions] = None, ) -> Account: """ @@ -4615,7 +292,7 @@ def create( async def create_async( self, - params: Optional["AccountService.CreateParams"] = None, + params: Optional["AccountCreateParams"] = None, options: Optional[RequestOptions] = None, ) -> Account: """ @@ -4640,7 +317,7 @@ async def create_async( def reject( self, account: str, - params: "AccountService.RejectParams", + params: "AccountRejectParams", options: Optional[RequestOptions] = None, ) -> Account: """ @@ -4664,7 +341,7 @@ def reject( async def reject_async( self, account: str, - params: "AccountService.RejectParams", + params: "AccountRejectParams", options: Optional[RequestOptions] = None, ) -> Account: """ diff --git a/stripe/_account_session.py b/stripe/_account_session.py index 2f36a012f..b8fdcf10b 100644 --- a/stripe/_account_session.py +++ b/stripe/_account_session.py @@ -1,10 +1,14 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._createable_api_resource import CreateableAPIResource -from stripe._request_options import RequestOptions from stripe._stripe_object import StripeObject -from typing import ClassVar, List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict, Unpack +from typing import ClassVar, Optional, cast +from typing_extensions import Literal, Unpack, TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params._account_session_create_params import ( + AccountSessionCreateParams, + ) class AccountSession(CreateableAPIResource["AccountSession"]): @@ -514,895 +518,6 @@ class Features(StripeObject): "tax_settings": TaxSettings, } - class CreateParams(RequestOptions): - account: str - """ - The identifier of the account to create an Account Session for. - """ - components: "AccountSession.CreateParamsComponents" - """ - Each key of the dictionary represents an embedded component, and each embedded component maps to its configuration (e.g. whether it has been enabled or not). - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class CreateParamsComponents(TypedDict): - account_management: NotRequired[ - "AccountSession.CreateParamsComponentsAccountManagement" - ] - """ - Configuration for the [account management](https://docs.stripe.com/connect/supported-embedded-components/account-management/) embedded component. - """ - account_onboarding: NotRequired[ - "AccountSession.CreateParamsComponentsAccountOnboarding" - ] - """ - Configuration for the [account onboarding](https://docs.stripe.com/connect/supported-embedded-components/account-onboarding/) embedded component. - """ - app_install: NotRequired[ - "AccountSession.CreateParamsComponentsAppInstall" - ] - """ - Configuration for the [app install](https://docs.stripe.com/connect/supported-embedded-components/app-install/) embedded component. - """ - app_viewport: NotRequired[ - "AccountSession.CreateParamsComponentsAppViewport" - ] - """ - Configuration for the [app viewport](https://docs.stripe.com/connect/supported-embedded-components/app-viewport/) embedded component. - """ - balance_report: NotRequired[ - "AccountSession.CreateParamsComponentsBalanceReport" - ] - """ - Configuration for the [balance report](https://docs.stripe.com/connect/supported-embedded-components/financial-reports#balance-report) embedded component. - """ - balances: NotRequired["AccountSession.CreateParamsComponentsBalances"] - """ - Configuration for the [balances](https://docs.stripe.com/connect/supported-embedded-components/balances/) embedded component. - """ - capital_financing: NotRequired[ - "AccountSession.CreateParamsComponentsCapitalFinancing" - ] - """ - Configuration for the [Capital financing](https://docs.stripe.com/connect/supported-embedded-components/capital-financing/) embedded component. - """ - capital_financing_application: NotRequired[ - "AccountSession.CreateParamsComponentsCapitalFinancingApplication" - ] - """ - Configuration for the [Capital financing application](https://docs.stripe.com/connect/supported-embedded-components/capital-financing-application/) embedded component. - """ - capital_financing_promotion: NotRequired[ - "AccountSession.CreateParamsComponentsCapitalFinancingPromotion" - ] - """ - Configuration for the [Capital financing promotion](https://docs.stripe.com/connect/supported-embedded-components/capital-financing-promotion/) embedded component. - """ - capital_overview: NotRequired[ - "AccountSession.CreateParamsComponentsCapitalOverview" - ] - """ - Configuration for the [Capital overview](https://docs.stripe.com/connect/supported-embedded-components/capital-overview/) embedded component. - """ - disputes_list: NotRequired[ - "AccountSession.CreateParamsComponentsDisputesList" - ] - """ - Configuration for the [disputes list](https://docs.stripe.com/connect/supported-embedded-components/disputes-list/) embedded component. - """ - documents: NotRequired[ - "AccountSession.CreateParamsComponentsDocuments" - ] - """ - Configuration for the [documents](https://docs.stripe.com/connect/supported-embedded-components/documents/) embedded component. - """ - export_tax_transactions: NotRequired[ - "AccountSession.CreateParamsComponentsExportTaxTransactions" - ] - """ - Configuration for the [export tax transactions](https://docs.stripe.com/connect/supported-embedded-components/export-tax-transactions/) embedded component. - """ - financial_account: NotRequired[ - "AccountSession.CreateParamsComponentsFinancialAccount" - ] - """ - Configuration for the [financial account](https://docs.stripe.com/connect/supported-embedded-components/financial-account/) embedded component. - """ - financial_account_transactions: NotRequired[ - "AccountSession.CreateParamsComponentsFinancialAccountTransactions" - ] - """ - Configuration for the [financial account transactions](https://docs.stripe.com/connect/supported-embedded-components/financial-account-transactions/) embedded component. - """ - instant_payouts_promotion: NotRequired[ - "AccountSession.CreateParamsComponentsInstantPayoutsPromotion" - ] - """ - Configuration for the [instant payouts promotion](https://docs.stripe.com/connect/supported-embedded-components/instant-payouts-promotion/) embedded component. - """ - issuing_card: NotRequired[ - "AccountSession.CreateParamsComponentsIssuingCard" - ] - """ - Configuration for the [issuing card](https://docs.stripe.com/connect/supported-embedded-components/issuing-card/) embedded component. - """ - issuing_cards_list: NotRequired[ - "AccountSession.CreateParamsComponentsIssuingCardsList" - ] - """ - Configuration for the [issuing cards list](https://docs.stripe.com/connect/supported-embedded-components/issuing-cards-list/) embedded component. - """ - notification_banner: NotRequired[ - "AccountSession.CreateParamsComponentsNotificationBanner" - ] - """ - Configuration for the [notification banner](https://docs.stripe.com/connect/supported-embedded-components/notification-banner/) embedded component. - """ - payment_details: NotRequired[ - "AccountSession.CreateParamsComponentsPaymentDetails" - ] - """ - Configuration for the [payment details](https://docs.stripe.com/connect/supported-embedded-components/payment-details/) embedded component. - """ - payment_disputes: NotRequired[ - "AccountSession.CreateParamsComponentsPaymentDisputes" - ] - """ - Configuration for the [payment disputes](https://docs.stripe.com/connect/supported-embedded-components/payment-disputes/) embedded component. - """ - payment_method_settings: NotRequired[ - "AccountSession.CreateParamsComponentsPaymentMethodSettings" - ] - """ - Configuration for the [payment method settings](https://docs.stripe.com/connect/supported-embedded-components/payment-method-settings/) embedded component. - """ - payments: NotRequired["AccountSession.CreateParamsComponentsPayments"] - """ - Configuration for the [payments](https://docs.stripe.com/connect/supported-embedded-components/payments/) embedded component. - """ - payout_details: NotRequired[ - "AccountSession.CreateParamsComponentsPayoutDetails" - ] - """ - Configuration for the [payout details](https://docs.stripe.com/connect/supported-embedded-components/payout-details/) embedded component. - """ - payout_reconciliation_report: NotRequired[ - "AccountSession.CreateParamsComponentsPayoutReconciliationReport" - ] - """ - Configuration for the [payout reconciliation report](https://docs.stripe.com/connect/supported-embedded-components/financial-reports#payout-reconciliation-report) embedded component. - """ - payouts: NotRequired["AccountSession.CreateParamsComponentsPayouts"] - """ - Configuration for the [payouts](https://docs.stripe.com/connect/supported-embedded-components/payouts/) embedded component. - """ - payouts_list: NotRequired[ - "AccountSession.CreateParamsComponentsPayoutsList" - ] - """ - Configuration for the [payouts list](https://docs.stripe.com/connect/supported-embedded-components/payouts-list/) embedded component. - """ - product_tax_code_selector: NotRequired[ - "AccountSession.CreateParamsComponentsProductTaxCodeSelector" - ] - """ - Configuration for the [product tax code selector](https://docs.stripe.com/connect/supported-embedded-components/product-tax-code-selector/) embedded component. - """ - recipients: NotRequired[ - "AccountSession.CreateParamsComponentsRecipients" - ] - """ - Configuration for the [recipients](https://docs.stripe.com/connect/supported-embedded-components/recipients/) embedded component. - """ - reporting_chart: NotRequired[ - "AccountSession.CreateParamsComponentsReportingChart" - ] - """ - Configuration for the [reporting chart](https://docs.stripe.com/connect/supported-embedded-components/reporting-chart/) embedded component. - """ - tax_registrations: NotRequired[ - "AccountSession.CreateParamsComponentsTaxRegistrations" - ] - """ - Configuration for the [tax registrations](https://docs.stripe.com/connect/supported-embedded-components/tax-registrations/) embedded component. - """ - tax_settings: NotRequired[ - "AccountSession.CreateParamsComponentsTaxSettings" - ] - """ - Configuration for the [tax settings](https://docs.stripe.com/connect/supported-embedded-components/tax-settings/) embedded component. - """ - tax_threshold_monitoring: NotRequired[ - "AccountSession.CreateParamsComponentsTaxThresholdMonitoring" - ] - """ - Configuration for the [tax threshold monitoring](https://docs.stripe.com/connect/supported-embedded-components/tax-threshold-monitoring/) embedded component. - """ - - class CreateParamsComponentsAccountManagement(TypedDict): - enabled: bool - """ - Whether the embedded component is enabled. - """ - features: NotRequired[ - "AccountSession.CreateParamsComponentsAccountManagementFeatures" - ] - """ - The list of features enabled in the embedded component. - """ - - class CreateParamsComponentsAccountManagementFeatures(TypedDict): - disable_stripe_user_authentication: NotRequired[bool] - """ - Whether Stripe user authentication is disabled. This value can only be `true` for accounts where `controller.requirement_collection` is `application` for the account. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to `true` and `disable_stripe_user_authentication` defaults to `false`. - """ - external_account_collection: NotRequired[bool] - """ - Whether external account collection is enabled. This feature can only be `false` for accounts where you're responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `true`. - """ - - class CreateParamsComponentsAccountOnboarding(TypedDict): - enabled: bool - """ - Whether the embedded component is enabled. - """ - features: NotRequired[ - "AccountSession.CreateParamsComponentsAccountOnboardingFeatures" - ] - """ - The list of features enabled in the embedded component. - """ - - class CreateParamsComponentsAccountOnboardingFeatures(TypedDict): - disable_stripe_user_authentication: NotRequired[bool] - """ - Whether Stripe user authentication is disabled. This value can only be `true` for accounts where `controller.requirement_collection` is `application` for the account. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to `true` and `disable_stripe_user_authentication` defaults to `false`. - """ - external_account_collection: NotRequired[bool] - """ - Whether external account collection is enabled. This feature can only be `false` for accounts where you're responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `true`. - """ - - class CreateParamsComponentsAppInstall(TypedDict): - enabled: bool - """ - Whether the embedded component is enabled. - """ - features: NotRequired[ - "AccountSession.CreateParamsComponentsAppInstallFeatures" - ] - """ - The list of features enabled in the embedded component. - """ - - class CreateParamsComponentsAppInstallFeatures(TypedDict): - allowed_apps: NotRequired["Literal['']|List[str]"] - """ - The list of apps allowed to be enabled in the embedded component. - """ - - class CreateParamsComponentsAppViewport(TypedDict): - enabled: bool - """ - Whether the embedded component is enabled. - """ - features: NotRequired[ - "AccountSession.CreateParamsComponentsAppViewportFeatures" - ] - """ - The list of features enabled in the embedded component. - """ - - class CreateParamsComponentsAppViewportFeatures(TypedDict): - allowed_apps: NotRequired["Literal['']|List[str]"] - """ - The list of apps allowed to be enabled in the embedded component. - """ - - class CreateParamsComponentsBalanceReport(TypedDict): - enabled: bool - """ - Whether the embedded component is enabled. - """ - features: NotRequired[ - "AccountSession.CreateParamsComponentsBalanceReportFeatures" - ] - """ - An empty list, because this embedded component has no features. - """ - - class CreateParamsComponentsBalanceReportFeatures(TypedDict): - pass - - class CreateParamsComponentsBalances(TypedDict): - enabled: bool - """ - Whether the embedded component is enabled. - """ - features: NotRequired[ - "AccountSession.CreateParamsComponentsBalancesFeatures" - ] - """ - The list of features enabled in the embedded component. - """ - - class CreateParamsComponentsBalancesFeatures(TypedDict): - disable_stripe_user_authentication: NotRequired[bool] - """ - Whether Stripe user authentication is disabled. This value can only be `true` for accounts where `controller.requirement_collection` is `application` for the account. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to `true` and `disable_stripe_user_authentication` defaults to `false`. - """ - edit_payout_schedule: NotRequired[bool] - """ - Whether to allow payout schedule to be changed. Defaults to `true` when `controller.losses.payments` is set to `stripe` for the account, otherwise `false`. - """ - external_account_collection: NotRequired[bool] - """ - Whether external account collection is enabled. This feature can only be `false` for accounts where you're responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `true`. - """ - instant_payouts: NotRequired[bool] - """ - Whether to allow creation of instant payouts. Defaults to `true` when `controller.losses.payments` is set to `stripe` for the account, otherwise `false`. - """ - standard_payouts: NotRequired[bool] - """ - Whether to allow creation of standard payouts. Defaults to `true` when `controller.losses.payments` is set to `stripe` for the account, otherwise `false`. - """ - - class CreateParamsComponentsCapitalFinancing(TypedDict): - enabled: bool - """ - Whether the embedded component is enabled. - """ - features: NotRequired[ - "AccountSession.CreateParamsComponentsCapitalFinancingFeatures" - ] - """ - An empty list, because this embedded component has no features. - """ - - class CreateParamsComponentsCapitalFinancingApplication(TypedDict): - enabled: bool - """ - Whether the embedded component is enabled. - """ - features: NotRequired[ - "AccountSession.CreateParamsComponentsCapitalFinancingApplicationFeatures" - ] - """ - An empty list, because this embedded component has no features. - """ - - class CreateParamsComponentsCapitalFinancingApplicationFeatures(TypedDict): - pass - - class CreateParamsComponentsCapitalFinancingFeatures(TypedDict): - pass - - class CreateParamsComponentsCapitalFinancingPromotion(TypedDict): - enabled: bool - """ - Whether the embedded component is enabled. - """ - features: NotRequired[ - "AccountSession.CreateParamsComponentsCapitalFinancingPromotionFeatures" - ] - """ - An empty list, because this embedded component has no features. - """ - - class CreateParamsComponentsCapitalFinancingPromotionFeatures(TypedDict): - pass - - class CreateParamsComponentsCapitalOverview(TypedDict): - enabled: bool - """ - Whether the embedded component is enabled. - """ - features: NotRequired[ - "AccountSession.CreateParamsComponentsCapitalOverviewFeatures" - ] - """ - An empty list, because this embedded component has no features. - """ - - class CreateParamsComponentsCapitalOverviewFeatures(TypedDict): - pass - - class CreateParamsComponentsDisputesList(TypedDict): - enabled: bool - """ - Whether the embedded component is enabled. - """ - features: NotRequired[ - "AccountSession.CreateParamsComponentsDisputesListFeatures" - ] - """ - The list of features enabled in the embedded component. - """ - - class CreateParamsComponentsDisputesListFeatures(TypedDict): - capture_payments: NotRequired[bool] - """ - Whether to allow capturing and cancelling payment intents. This is `true` by default. - """ - destination_on_behalf_of_charge_management: NotRequired[bool] - """ - Whether connected accounts can manage destination charges that are created on behalf of them. This is `false` by default. - """ - dispute_management: NotRequired[bool] - """ - Whether responding to disputes is enabled, including submitting evidence and accepting disputes. This is `true` by default. - """ - refund_management: NotRequired[bool] - """ - Whether sending refunds is enabled. This is `true` by default. - """ - - class CreateParamsComponentsDocuments(TypedDict): - enabled: bool - """ - Whether the embedded component is enabled. - """ - features: NotRequired[ - "AccountSession.CreateParamsComponentsDocumentsFeatures" - ] - """ - An empty list, because this embedded component has no features. - """ - - class CreateParamsComponentsDocumentsFeatures(TypedDict): - pass - - class CreateParamsComponentsExportTaxTransactions(TypedDict): - enabled: bool - """ - Whether the embedded component is enabled. - """ - features: NotRequired[ - "AccountSession.CreateParamsComponentsExportTaxTransactionsFeatures" - ] - """ - An empty list, because this embedded component has no features. - """ - - class CreateParamsComponentsExportTaxTransactionsFeatures(TypedDict): - pass - - class CreateParamsComponentsFinancialAccount(TypedDict): - enabled: bool - """ - Whether the embedded component is enabled. - """ - features: NotRequired[ - "AccountSession.CreateParamsComponentsFinancialAccountFeatures" - ] - """ - The list of features enabled in the embedded component. - """ - - class CreateParamsComponentsFinancialAccountFeatures(TypedDict): - disable_stripe_user_authentication: NotRequired[bool] - """ - Whether Stripe user authentication is disabled. This value can only be `true` for accounts where `controller.requirement_collection` is `application` for the account. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to `true` and `disable_stripe_user_authentication` defaults to `false`. - """ - external_account_collection: NotRequired[bool] - """ - Whether external account collection is enabled. This feature can only be `false` for accounts where you're responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `true`. - """ - send_money: NotRequired[bool] - """ - Whether to allow sending money. - """ - transfer_balance: NotRequired[bool] - """ - Whether to allow transferring balance. - """ - - class CreateParamsComponentsFinancialAccountTransactions(TypedDict): - enabled: bool - """ - Whether the embedded component is enabled. - """ - features: NotRequired[ - "AccountSession.CreateParamsComponentsFinancialAccountTransactionsFeatures" - ] - """ - The list of features enabled in the embedded component. - """ - - class CreateParamsComponentsFinancialAccountTransactionsFeatures( - TypedDict - ): - card_spend_dispute_management: NotRequired[bool] - """ - Whether to allow card spend dispute management features. - """ - - class CreateParamsComponentsInstantPayoutsPromotion(TypedDict): - enabled: bool - """ - Whether the embedded component is enabled. - """ - features: NotRequired[ - "AccountSession.CreateParamsComponentsInstantPayoutsPromotionFeatures" - ] - """ - The list of features enabled in the embedded component. - """ - - class CreateParamsComponentsInstantPayoutsPromotionFeatures(TypedDict): - disable_stripe_user_authentication: NotRequired[bool] - """ - Whether Stripe user authentication is disabled. This value can only be `true` for accounts where `controller.requirement_collection` is `application` for the account. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to `true` and `disable_stripe_user_authentication` defaults to `false`. - """ - external_account_collection: NotRequired[bool] - """ - Whether external account collection is enabled. This feature can only be `false` for accounts where you're responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `true`. - """ - instant_payouts: NotRequired[bool] - """ - Whether to allow creation of instant payouts. Defaults to `true` when `controller.losses.payments` is set to `stripe` for the account, otherwise `false`. - """ - - class CreateParamsComponentsIssuingCard(TypedDict): - enabled: bool - """ - Whether the embedded component is enabled. - """ - features: NotRequired[ - "AccountSession.CreateParamsComponentsIssuingCardFeatures" - ] - """ - The list of features enabled in the embedded component. - """ - - class CreateParamsComponentsIssuingCardFeatures(TypedDict): - card_management: NotRequired[bool] - """ - Whether to allow card management features. - """ - card_spend_dispute_management: NotRequired[bool] - """ - Whether to allow card spend dispute management features. - """ - cardholder_management: NotRequired[bool] - """ - Whether to allow cardholder management features. - """ - spend_control_management: NotRequired[bool] - """ - Whether to allow spend control management features. - """ - - class CreateParamsComponentsIssuingCardsList(TypedDict): - enabled: bool - """ - Whether the embedded component is enabled. - """ - features: NotRequired[ - "AccountSession.CreateParamsComponentsIssuingCardsListFeatures" - ] - """ - The list of features enabled in the embedded component. - """ - - class CreateParamsComponentsIssuingCardsListFeatures(TypedDict): - card_management: NotRequired[bool] - """ - Whether to allow card management features. - """ - card_spend_dispute_management: NotRequired[bool] - """ - Whether to allow card spend dispute management features. - """ - cardholder_management: NotRequired[bool] - """ - Whether to allow cardholder management features. - """ - disable_stripe_user_authentication: NotRequired[bool] - """ - Whether Stripe user authentication is disabled. This value can only be `true` for accounts where `controller.requirement_collection` is `application` for the account. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to `true` and `disable_stripe_user_authentication` defaults to `false`. - """ - spend_control_management: NotRequired[bool] - """ - Whether to allow spend control management features. - """ - - class CreateParamsComponentsNotificationBanner(TypedDict): - enabled: bool - """ - Whether the embedded component is enabled. - """ - features: NotRequired[ - "AccountSession.CreateParamsComponentsNotificationBannerFeatures" - ] - """ - The list of features enabled in the embedded component. - """ - - class CreateParamsComponentsNotificationBannerFeatures(TypedDict): - disable_stripe_user_authentication: NotRequired[bool] - """ - Whether Stripe user authentication is disabled. This value can only be `true` for accounts where `controller.requirement_collection` is `application` for the account. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to `true` and `disable_stripe_user_authentication` defaults to `false`. - """ - external_account_collection: NotRequired[bool] - """ - Whether external account collection is enabled. This feature can only be `false` for accounts where you're responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `true`. - """ - - class CreateParamsComponentsPaymentDetails(TypedDict): - enabled: bool - """ - Whether the embedded component is enabled. - """ - features: NotRequired[ - "AccountSession.CreateParamsComponentsPaymentDetailsFeatures" - ] - """ - The list of features enabled in the embedded component. - """ - - class CreateParamsComponentsPaymentDetailsFeatures(TypedDict): - capture_payments: NotRequired[bool] - """ - Whether to allow capturing and cancelling payment intents. This is `true` by default. - """ - destination_on_behalf_of_charge_management: NotRequired[bool] - """ - Whether connected accounts can manage destination charges that are created on behalf of them. This is `false` by default. - """ - dispute_management: NotRequired[bool] - """ - Whether responding to disputes is enabled, including submitting evidence and accepting disputes. This is `true` by default. - """ - refund_management: NotRequired[bool] - """ - Whether sending refunds is enabled. This is `true` by default. - """ - - class CreateParamsComponentsPaymentDisputes(TypedDict): - enabled: bool - """ - Whether the embedded component is enabled. - """ - features: NotRequired[ - "AccountSession.CreateParamsComponentsPaymentDisputesFeatures" - ] - """ - The list of features enabled in the embedded component. - """ - - class CreateParamsComponentsPaymentDisputesFeatures(TypedDict): - destination_on_behalf_of_charge_management: NotRequired[bool] - """ - Whether connected accounts can manage destination charges that are created on behalf of them. This is `false` by default. - """ - dispute_management: NotRequired[bool] - """ - Whether responding to disputes is enabled, including submitting evidence and accepting disputes. This is `true` by default. - """ - refund_management: NotRequired[bool] - """ - Whether sending refunds is enabled. This is `true` by default. - """ - - class CreateParamsComponentsPaymentMethodSettings(TypedDict): - enabled: bool - """ - Whether the embedded component is enabled. - """ - features: NotRequired[ - "AccountSession.CreateParamsComponentsPaymentMethodSettingsFeatures" - ] - """ - An empty list, because this embedded component has no features. - """ - - class CreateParamsComponentsPaymentMethodSettingsFeatures(TypedDict): - pass - - class CreateParamsComponentsPayments(TypedDict): - enabled: bool - """ - Whether the embedded component is enabled. - """ - features: NotRequired[ - "AccountSession.CreateParamsComponentsPaymentsFeatures" - ] - """ - The list of features enabled in the embedded component. - """ - - class CreateParamsComponentsPaymentsFeatures(TypedDict): - capture_payments: NotRequired[bool] - """ - Whether to allow capturing and cancelling payment intents. This is `true` by default. - """ - destination_on_behalf_of_charge_management: NotRequired[bool] - """ - Whether connected accounts can manage destination charges that are created on behalf of them. This is `false` by default. - """ - dispute_management: NotRequired[bool] - """ - Whether responding to disputes is enabled, including submitting evidence and accepting disputes. This is `true` by default. - """ - refund_management: NotRequired[bool] - """ - Whether sending refunds is enabled. This is `true` by default. - """ - - class CreateParamsComponentsPayoutDetails(TypedDict): - enabled: bool - """ - Whether the embedded component is enabled. - """ - features: NotRequired[ - "AccountSession.CreateParamsComponentsPayoutDetailsFeatures" - ] - """ - An empty list, because this embedded component has no features. - """ - - class CreateParamsComponentsPayoutDetailsFeatures(TypedDict): - pass - - class CreateParamsComponentsPayoutReconciliationReport(TypedDict): - enabled: bool - """ - Whether the embedded component is enabled. - """ - features: NotRequired[ - "AccountSession.CreateParamsComponentsPayoutReconciliationReportFeatures" - ] - """ - An empty list, because this embedded component has no features. - """ - - class CreateParamsComponentsPayoutReconciliationReportFeatures(TypedDict): - pass - - class CreateParamsComponentsPayouts(TypedDict): - enabled: bool - """ - Whether the embedded component is enabled. - """ - features: NotRequired[ - "AccountSession.CreateParamsComponentsPayoutsFeatures" - ] - """ - The list of features enabled in the embedded component. - """ - - class CreateParamsComponentsPayoutsFeatures(TypedDict): - disable_stripe_user_authentication: NotRequired[bool] - """ - Whether Stripe user authentication is disabled. This value can only be `true` for accounts where `controller.requirement_collection` is `application` for the account. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to `true` and `disable_stripe_user_authentication` defaults to `false`. - """ - edit_payout_schedule: NotRequired[bool] - """ - Whether to allow payout schedule to be changed. Defaults to `true` when `controller.losses.payments` is set to `stripe` for the account, otherwise `false`. - """ - external_account_collection: NotRequired[bool] - """ - Whether external account collection is enabled. This feature can only be `false` for accounts where you're responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `true`. - """ - instant_payouts: NotRequired[bool] - """ - Whether to allow creation of instant payouts. Defaults to `true` when `controller.losses.payments` is set to `stripe` for the account, otherwise `false`. - """ - standard_payouts: NotRequired[bool] - """ - Whether to allow creation of standard payouts. Defaults to `true` when `controller.losses.payments` is set to `stripe` for the account, otherwise `false`. - """ - - class CreateParamsComponentsPayoutsList(TypedDict): - enabled: bool - """ - Whether the embedded component is enabled. - """ - features: NotRequired[ - "AccountSession.CreateParamsComponentsPayoutsListFeatures" - ] - """ - An empty list, because this embedded component has no features. - """ - - class CreateParamsComponentsPayoutsListFeatures(TypedDict): - pass - - class CreateParamsComponentsProductTaxCodeSelector(TypedDict): - enabled: bool - """ - Whether the embedded component is enabled. - """ - features: NotRequired[ - "AccountSession.CreateParamsComponentsProductTaxCodeSelectorFeatures" - ] - """ - An empty list, because this embedded component has no features. - """ - - class CreateParamsComponentsProductTaxCodeSelectorFeatures(TypedDict): - pass - - class CreateParamsComponentsRecipients(TypedDict): - enabled: bool - """ - Whether the embedded component is enabled. - """ - features: NotRequired[ - "AccountSession.CreateParamsComponentsRecipientsFeatures" - ] - - class CreateParamsComponentsRecipientsFeatures(TypedDict): - send_money: NotRequired[bool] - """ - Whether to allow sending money. - """ - - class CreateParamsComponentsReportingChart(TypedDict): - enabled: bool - """ - Whether the embedded component is enabled. - """ - features: NotRequired[ - "AccountSession.CreateParamsComponentsReportingChartFeatures" - ] - """ - An empty list, because this embedded component has no features. - """ - - class CreateParamsComponentsReportingChartFeatures(TypedDict): - pass - - class CreateParamsComponentsTaxRegistrations(TypedDict): - enabled: bool - """ - Whether the embedded component is enabled. - """ - features: NotRequired[ - "AccountSession.CreateParamsComponentsTaxRegistrationsFeatures" - ] - """ - An empty list, because this embedded component has no features. - """ - - class CreateParamsComponentsTaxRegistrationsFeatures(TypedDict): - pass - - class CreateParamsComponentsTaxSettings(TypedDict): - enabled: bool - """ - Whether the embedded component is enabled. - """ - features: NotRequired[ - "AccountSession.CreateParamsComponentsTaxSettingsFeatures" - ] - """ - An empty list, because this embedded component has no features. - """ - - class CreateParamsComponentsTaxSettingsFeatures(TypedDict): - pass - - class CreateParamsComponentsTaxThresholdMonitoring(TypedDict): - enabled: bool - """ - Whether the embedded component is enabled. - """ - features: NotRequired[ - "AccountSession.CreateParamsComponentsTaxThresholdMonitoringFeatures" - ] - """ - An empty list, because this embedded component has no features. - """ - - class CreateParamsComponentsTaxThresholdMonitoringFeatures(TypedDict): - pass - account: str """ The ID of the account the AccountSession was created for @@ -1431,7 +546,7 @@ class CreateParamsComponentsTaxThresholdMonitoringFeatures(TypedDict): @classmethod def create( - cls, **params: Unpack["AccountSession.CreateParams"] + cls, **params: Unpack["AccountSessionCreateParams"] ) -> "AccountSession": """ Creates a AccountSession object that includes a single-use token that the platform can use on their front-end to grant client-side API access. @@ -1447,7 +562,7 @@ def create( @classmethod async def create_async( - cls, **params: Unpack["AccountSession.CreateParams"] + cls, **params: Unpack["AccountSessionCreateParams"] ) -> "AccountSession": """ Creates a AccountSession object that includes a single-use token that the platform can use on their front-end to grant client-side API access. diff --git a/stripe/_account_session_service.py b/stripe/_account_session_service.py index 156db4014..9411936d6 100644 --- a/stripe/_account_session_service.py +++ b/stripe/_account_session_service.py @@ -3,909 +3,19 @@ from stripe._account_session import AccountSession from stripe._request_options import RequestOptions from stripe._stripe_service import StripeService -from typing import List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params._account_session_create_params import ( + AccountSessionCreateParams, + ) -class AccountSessionService(StripeService): - class CreateParams(TypedDict): - account: str - """ - The identifier of the account to create an Account Session for. - """ - components: "AccountSessionService.CreateParamsComponents" - """ - Each key of the dictionary represents an embedded component, and each embedded component maps to its configuration (e.g. whether it has been enabled or not). - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class CreateParamsComponents(TypedDict): - account_management: NotRequired[ - "AccountSessionService.CreateParamsComponentsAccountManagement" - ] - """ - Configuration for the [account management](https://docs.stripe.com/connect/supported-embedded-components/account-management/) embedded component. - """ - account_onboarding: NotRequired[ - "AccountSessionService.CreateParamsComponentsAccountOnboarding" - ] - """ - Configuration for the [account onboarding](https://docs.stripe.com/connect/supported-embedded-components/account-onboarding/) embedded component. - """ - app_install: NotRequired[ - "AccountSessionService.CreateParamsComponentsAppInstall" - ] - """ - Configuration for the [app install](https://docs.stripe.com/connect/supported-embedded-components/app-install/) embedded component. - """ - app_viewport: NotRequired[ - "AccountSessionService.CreateParamsComponentsAppViewport" - ] - """ - Configuration for the [app viewport](https://docs.stripe.com/connect/supported-embedded-components/app-viewport/) embedded component. - """ - balance_report: NotRequired[ - "AccountSessionService.CreateParamsComponentsBalanceReport" - ] - """ - Configuration for the [balance report](https://docs.stripe.com/connect/supported-embedded-components/financial-reports#balance-report) embedded component. - """ - balances: NotRequired[ - "AccountSessionService.CreateParamsComponentsBalances" - ] - """ - Configuration for the [balances](https://docs.stripe.com/connect/supported-embedded-components/balances/) embedded component. - """ - capital_financing: NotRequired[ - "AccountSessionService.CreateParamsComponentsCapitalFinancing" - ] - """ - Configuration for the [Capital financing](https://docs.stripe.com/connect/supported-embedded-components/capital-financing/) embedded component. - """ - capital_financing_application: NotRequired[ - "AccountSessionService.CreateParamsComponentsCapitalFinancingApplication" - ] - """ - Configuration for the [Capital financing application](https://docs.stripe.com/connect/supported-embedded-components/capital-financing-application/) embedded component. - """ - capital_financing_promotion: NotRequired[ - "AccountSessionService.CreateParamsComponentsCapitalFinancingPromotion" - ] - """ - Configuration for the [Capital financing promotion](https://docs.stripe.com/connect/supported-embedded-components/capital-financing-promotion/) embedded component. - """ - capital_overview: NotRequired[ - "AccountSessionService.CreateParamsComponentsCapitalOverview" - ] - """ - Configuration for the [Capital overview](https://docs.stripe.com/connect/supported-embedded-components/capital-overview/) embedded component. - """ - disputes_list: NotRequired[ - "AccountSessionService.CreateParamsComponentsDisputesList" - ] - """ - Configuration for the [disputes list](https://docs.stripe.com/connect/supported-embedded-components/disputes-list/) embedded component. - """ - documents: NotRequired[ - "AccountSessionService.CreateParamsComponentsDocuments" - ] - """ - Configuration for the [documents](https://docs.stripe.com/connect/supported-embedded-components/documents/) embedded component. - """ - export_tax_transactions: NotRequired[ - "AccountSessionService.CreateParamsComponentsExportTaxTransactions" - ] - """ - Configuration for the [export tax transactions](https://docs.stripe.com/connect/supported-embedded-components/export-tax-transactions/) embedded component. - """ - financial_account: NotRequired[ - "AccountSessionService.CreateParamsComponentsFinancialAccount" - ] - """ - Configuration for the [financial account](https://docs.stripe.com/connect/supported-embedded-components/financial-account/) embedded component. - """ - financial_account_transactions: NotRequired[ - "AccountSessionService.CreateParamsComponentsFinancialAccountTransactions" - ] - """ - Configuration for the [financial account transactions](https://docs.stripe.com/connect/supported-embedded-components/financial-account-transactions/) embedded component. - """ - instant_payouts_promotion: NotRequired[ - "AccountSessionService.CreateParamsComponentsInstantPayoutsPromotion" - ] - """ - Configuration for the [instant payouts promotion](https://docs.stripe.com/connect/supported-embedded-components/instant-payouts-promotion/) embedded component. - """ - issuing_card: NotRequired[ - "AccountSessionService.CreateParamsComponentsIssuingCard" - ] - """ - Configuration for the [issuing card](https://docs.stripe.com/connect/supported-embedded-components/issuing-card/) embedded component. - """ - issuing_cards_list: NotRequired[ - "AccountSessionService.CreateParamsComponentsIssuingCardsList" - ] - """ - Configuration for the [issuing cards list](https://docs.stripe.com/connect/supported-embedded-components/issuing-cards-list/) embedded component. - """ - notification_banner: NotRequired[ - "AccountSessionService.CreateParamsComponentsNotificationBanner" - ] - """ - Configuration for the [notification banner](https://docs.stripe.com/connect/supported-embedded-components/notification-banner/) embedded component. - """ - payment_details: NotRequired[ - "AccountSessionService.CreateParamsComponentsPaymentDetails" - ] - """ - Configuration for the [payment details](https://docs.stripe.com/connect/supported-embedded-components/payment-details/) embedded component. - """ - payment_disputes: NotRequired[ - "AccountSessionService.CreateParamsComponentsPaymentDisputes" - ] - """ - Configuration for the [payment disputes](https://docs.stripe.com/connect/supported-embedded-components/payment-disputes/) embedded component. - """ - payment_method_settings: NotRequired[ - "AccountSessionService.CreateParamsComponentsPaymentMethodSettings" - ] - """ - Configuration for the [payment method settings](https://docs.stripe.com/connect/supported-embedded-components/payment-method-settings/) embedded component. - """ - payments: NotRequired[ - "AccountSessionService.CreateParamsComponentsPayments" - ] - """ - Configuration for the [payments](https://docs.stripe.com/connect/supported-embedded-components/payments/) embedded component. - """ - payout_details: NotRequired[ - "AccountSessionService.CreateParamsComponentsPayoutDetails" - ] - """ - Configuration for the [payout details](https://docs.stripe.com/connect/supported-embedded-components/payout-details/) embedded component. - """ - payout_reconciliation_report: NotRequired[ - "AccountSessionService.CreateParamsComponentsPayoutReconciliationReport" - ] - """ - Configuration for the [payout reconciliation report](https://docs.stripe.com/connect/supported-embedded-components/financial-reports#payout-reconciliation-report) embedded component. - """ - payouts: NotRequired[ - "AccountSessionService.CreateParamsComponentsPayouts" - ] - """ - Configuration for the [payouts](https://docs.stripe.com/connect/supported-embedded-components/payouts/) embedded component. - """ - payouts_list: NotRequired[ - "AccountSessionService.CreateParamsComponentsPayoutsList" - ] - """ - Configuration for the [payouts list](https://docs.stripe.com/connect/supported-embedded-components/payouts-list/) embedded component. - """ - product_tax_code_selector: NotRequired[ - "AccountSessionService.CreateParamsComponentsProductTaxCodeSelector" - ] - """ - Configuration for the [product tax code selector](https://docs.stripe.com/connect/supported-embedded-components/product-tax-code-selector/) embedded component. - """ - recipients: NotRequired[ - "AccountSessionService.CreateParamsComponentsRecipients" - ] - """ - Configuration for the [recipients](https://docs.stripe.com/connect/supported-embedded-components/recipients/) embedded component. - """ - reporting_chart: NotRequired[ - "AccountSessionService.CreateParamsComponentsReportingChart" - ] - """ - Configuration for the [reporting chart](https://docs.stripe.com/connect/supported-embedded-components/reporting-chart/) embedded component. - """ - tax_registrations: NotRequired[ - "AccountSessionService.CreateParamsComponentsTaxRegistrations" - ] - """ - Configuration for the [tax registrations](https://docs.stripe.com/connect/supported-embedded-components/tax-registrations/) embedded component. - """ - tax_settings: NotRequired[ - "AccountSessionService.CreateParamsComponentsTaxSettings" - ] - """ - Configuration for the [tax settings](https://docs.stripe.com/connect/supported-embedded-components/tax-settings/) embedded component. - """ - tax_threshold_monitoring: NotRequired[ - "AccountSessionService.CreateParamsComponentsTaxThresholdMonitoring" - ] - """ - Configuration for the [tax threshold monitoring](https://docs.stripe.com/connect/supported-embedded-components/tax-threshold-monitoring/) embedded component. - """ - - class CreateParamsComponentsAccountManagement(TypedDict): - enabled: bool - """ - Whether the embedded component is enabled. - """ - features: NotRequired[ - "AccountSessionService.CreateParamsComponentsAccountManagementFeatures" - ] - """ - The list of features enabled in the embedded component. - """ - - class CreateParamsComponentsAccountManagementFeatures(TypedDict): - disable_stripe_user_authentication: NotRequired[bool] - """ - Whether Stripe user authentication is disabled. This value can only be `true` for accounts where `controller.requirement_collection` is `application` for the account. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to `true` and `disable_stripe_user_authentication` defaults to `false`. - """ - external_account_collection: NotRequired[bool] - """ - Whether external account collection is enabled. This feature can only be `false` for accounts where you're responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `true`. - """ - - class CreateParamsComponentsAccountOnboarding(TypedDict): - enabled: bool - """ - Whether the embedded component is enabled. - """ - features: NotRequired[ - "AccountSessionService.CreateParamsComponentsAccountOnboardingFeatures" - ] - """ - The list of features enabled in the embedded component. - """ - - class CreateParamsComponentsAccountOnboardingFeatures(TypedDict): - disable_stripe_user_authentication: NotRequired[bool] - """ - Whether Stripe user authentication is disabled. This value can only be `true` for accounts where `controller.requirement_collection` is `application` for the account. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to `true` and `disable_stripe_user_authentication` defaults to `false`. - """ - external_account_collection: NotRequired[bool] - """ - Whether external account collection is enabled. This feature can only be `false` for accounts where you're responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `true`. - """ - - class CreateParamsComponentsAppInstall(TypedDict): - enabled: bool - """ - Whether the embedded component is enabled. - """ - features: NotRequired[ - "AccountSessionService.CreateParamsComponentsAppInstallFeatures" - ] - """ - The list of features enabled in the embedded component. - """ - - class CreateParamsComponentsAppInstallFeatures(TypedDict): - allowed_apps: NotRequired["Literal['']|List[str]"] - """ - The list of apps allowed to be enabled in the embedded component. - """ - - class CreateParamsComponentsAppViewport(TypedDict): - enabled: bool - """ - Whether the embedded component is enabled. - """ - features: NotRequired[ - "AccountSessionService.CreateParamsComponentsAppViewportFeatures" - ] - """ - The list of features enabled in the embedded component. - """ - - class CreateParamsComponentsAppViewportFeatures(TypedDict): - allowed_apps: NotRequired["Literal['']|List[str]"] - """ - The list of apps allowed to be enabled in the embedded component. - """ - - class CreateParamsComponentsBalanceReport(TypedDict): - enabled: bool - """ - Whether the embedded component is enabled. - """ - features: NotRequired[ - "AccountSessionService.CreateParamsComponentsBalanceReportFeatures" - ] - """ - An empty list, because this embedded component has no features. - """ - - class CreateParamsComponentsBalanceReportFeatures(TypedDict): - pass - - class CreateParamsComponentsBalances(TypedDict): - enabled: bool - """ - Whether the embedded component is enabled. - """ - features: NotRequired[ - "AccountSessionService.CreateParamsComponentsBalancesFeatures" - ] - """ - The list of features enabled in the embedded component. - """ - - class CreateParamsComponentsBalancesFeatures(TypedDict): - disable_stripe_user_authentication: NotRequired[bool] - """ - Whether Stripe user authentication is disabled. This value can only be `true` for accounts where `controller.requirement_collection` is `application` for the account. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to `true` and `disable_stripe_user_authentication` defaults to `false`. - """ - edit_payout_schedule: NotRequired[bool] - """ - Whether to allow payout schedule to be changed. Defaults to `true` when `controller.losses.payments` is set to `stripe` for the account, otherwise `false`. - """ - external_account_collection: NotRequired[bool] - """ - Whether external account collection is enabled. This feature can only be `false` for accounts where you're responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `true`. - """ - instant_payouts: NotRequired[bool] - """ - Whether to allow creation of instant payouts. Defaults to `true` when `controller.losses.payments` is set to `stripe` for the account, otherwise `false`. - """ - standard_payouts: NotRequired[bool] - """ - Whether to allow creation of standard payouts. Defaults to `true` when `controller.losses.payments` is set to `stripe` for the account, otherwise `false`. - """ - - class CreateParamsComponentsCapitalFinancing(TypedDict): - enabled: bool - """ - Whether the embedded component is enabled. - """ - features: NotRequired[ - "AccountSessionService.CreateParamsComponentsCapitalFinancingFeatures" - ] - """ - An empty list, because this embedded component has no features. - """ - - class CreateParamsComponentsCapitalFinancingApplication(TypedDict): - enabled: bool - """ - Whether the embedded component is enabled. - """ - features: NotRequired[ - "AccountSessionService.CreateParamsComponentsCapitalFinancingApplicationFeatures" - ] - """ - An empty list, because this embedded component has no features. - """ - - class CreateParamsComponentsCapitalFinancingApplicationFeatures(TypedDict): - pass - - class CreateParamsComponentsCapitalFinancingFeatures(TypedDict): - pass - - class CreateParamsComponentsCapitalFinancingPromotion(TypedDict): - enabled: bool - """ - Whether the embedded component is enabled. - """ - features: NotRequired[ - "AccountSessionService.CreateParamsComponentsCapitalFinancingPromotionFeatures" - ] - """ - An empty list, because this embedded component has no features. - """ - - class CreateParamsComponentsCapitalFinancingPromotionFeatures(TypedDict): - pass - - class CreateParamsComponentsCapitalOverview(TypedDict): - enabled: bool - """ - Whether the embedded component is enabled. - """ - features: NotRequired[ - "AccountSessionService.CreateParamsComponentsCapitalOverviewFeatures" - ] - """ - An empty list, because this embedded component has no features. - """ - - class CreateParamsComponentsCapitalOverviewFeatures(TypedDict): - pass - - class CreateParamsComponentsDisputesList(TypedDict): - enabled: bool - """ - Whether the embedded component is enabled. - """ - features: NotRequired[ - "AccountSessionService.CreateParamsComponentsDisputesListFeatures" - ] - """ - The list of features enabled in the embedded component. - """ - - class CreateParamsComponentsDisputesListFeatures(TypedDict): - capture_payments: NotRequired[bool] - """ - Whether to allow capturing and cancelling payment intents. This is `true` by default. - """ - destination_on_behalf_of_charge_management: NotRequired[bool] - """ - Whether connected accounts can manage destination charges that are created on behalf of them. This is `false` by default. - """ - dispute_management: NotRequired[bool] - """ - Whether responding to disputes is enabled, including submitting evidence and accepting disputes. This is `true` by default. - """ - refund_management: NotRequired[bool] - """ - Whether sending refunds is enabled. This is `true` by default. - """ - - class CreateParamsComponentsDocuments(TypedDict): - enabled: bool - """ - Whether the embedded component is enabled. - """ - features: NotRequired[ - "AccountSessionService.CreateParamsComponentsDocumentsFeatures" - ] - """ - An empty list, because this embedded component has no features. - """ - - class CreateParamsComponentsDocumentsFeatures(TypedDict): - pass - - class CreateParamsComponentsExportTaxTransactions(TypedDict): - enabled: bool - """ - Whether the embedded component is enabled. - """ - features: NotRequired[ - "AccountSessionService.CreateParamsComponentsExportTaxTransactionsFeatures" - ] - """ - An empty list, because this embedded component has no features. - """ - - class CreateParamsComponentsExportTaxTransactionsFeatures(TypedDict): - pass - - class CreateParamsComponentsFinancialAccount(TypedDict): - enabled: bool - """ - Whether the embedded component is enabled. - """ - features: NotRequired[ - "AccountSessionService.CreateParamsComponentsFinancialAccountFeatures" - ] - """ - The list of features enabled in the embedded component. - """ - - class CreateParamsComponentsFinancialAccountFeatures(TypedDict): - disable_stripe_user_authentication: NotRequired[bool] - """ - Whether Stripe user authentication is disabled. This value can only be `true` for accounts where `controller.requirement_collection` is `application` for the account. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to `true` and `disable_stripe_user_authentication` defaults to `false`. - """ - external_account_collection: NotRequired[bool] - """ - Whether external account collection is enabled. This feature can only be `false` for accounts where you're responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `true`. - """ - send_money: NotRequired[bool] - """ - Whether to allow sending money. - """ - transfer_balance: NotRequired[bool] - """ - Whether to allow transferring balance. - """ - - class CreateParamsComponentsFinancialAccountTransactions(TypedDict): - enabled: bool - """ - Whether the embedded component is enabled. - """ - features: NotRequired[ - "AccountSessionService.CreateParamsComponentsFinancialAccountTransactionsFeatures" - ] - """ - The list of features enabled in the embedded component. - """ - - class CreateParamsComponentsFinancialAccountTransactionsFeatures( - TypedDict - ): - card_spend_dispute_management: NotRequired[bool] - """ - Whether to allow card spend dispute management features. - """ - - class CreateParamsComponentsInstantPayoutsPromotion(TypedDict): - enabled: bool - """ - Whether the embedded component is enabled. - """ - features: NotRequired[ - "AccountSessionService.CreateParamsComponentsInstantPayoutsPromotionFeatures" - ] - """ - The list of features enabled in the embedded component. - """ - - class CreateParamsComponentsInstantPayoutsPromotionFeatures(TypedDict): - disable_stripe_user_authentication: NotRequired[bool] - """ - Whether Stripe user authentication is disabled. This value can only be `true` for accounts where `controller.requirement_collection` is `application` for the account. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to `true` and `disable_stripe_user_authentication` defaults to `false`. - """ - external_account_collection: NotRequired[bool] - """ - Whether external account collection is enabled. This feature can only be `false` for accounts where you're responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `true`. - """ - instant_payouts: NotRequired[bool] - """ - Whether to allow creation of instant payouts. Defaults to `true` when `controller.losses.payments` is set to `stripe` for the account, otherwise `false`. - """ - - class CreateParamsComponentsIssuingCard(TypedDict): - enabled: bool - """ - Whether the embedded component is enabled. - """ - features: NotRequired[ - "AccountSessionService.CreateParamsComponentsIssuingCardFeatures" - ] - """ - The list of features enabled in the embedded component. - """ - - class CreateParamsComponentsIssuingCardFeatures(TypedDict): - card_management: NotRequired[bool] - """ - Whether to allow card management features. - """ - card_spend_dispute_management: NotRequired[bool] - """ - Whether to allow card spend dispute management features. - """ - cardholder_management: NotRequired[bool] - """ - Whether to allow cardholder management features. - """ - spend_control_management: NotRequired[bool] - """ - Whether to allow spend control management features. - """ - - class CreateParamsComponentsIssuingCardsList(TypedDict): - enabled: bool - """ - Whether the embedded component is enabled. - """ - features: NotRequired[ - "AccountSessionService.CreateParamsComponentsIssuingCardsListFeatures" - ] - """ - The list of features enabled in the embedded component. - """ - - class CreateParamsComponentsIssuingCardsListFeatures(TypedDict): - card_management: NotRequired[bool] - """ - Whether to allow card management features. - """ - card_spend_dispute_management: NotRequired[bool] - """ - Whether to allow card spend dispute management features. - """ - cardholder_management: NotRequired[bool] - """ - Whether to allow cardholder management features. - """ - disable_stripe_user_authentication: NotRequired[bool] - """ - Whether Stripe user authentication is disabled. This value can only be `true` for accounts where `controller.requirement_collection` is `application` for the account. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to `true` and `disable_stripe_user_authentication` defaults to `false`. - """ - spend_control_management: NotRequired[bool] - """ - Whether to allow spend control management features. - """ - - class CreateParamsComponentsNotificationBanner(TypedDict): - enabled: bool - """ - Whether the embedded component is enabled. - """ - features: NotRequired[ - "AccountSessionService.CreateParamsComponentsNotificationBannerFeatures" - ] - """ - The list of features enabled in the embedded component. - """ - - class CreateParamsComponentsNotificationBannerFeatures(TypedDict): - disable_stripe_user_authentication: NotRequired[bool] - """ - Whether Stripe user authentication is disabled. This value can only be `true` for accounts where `controller.requirement_collection` is `application` for the account. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to `true` and `disable_stripe_user_authentication` defaults to `false`. - """ - external_account_collection: NotRequired[bool] - """ - Whether external account collection is enabled. This feature can only be `false` for accounts where you're responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `true`. - """ - - class CreateParamsComponentsPaymentDetails(TypedDict): - enabled: bool - """ - Whether the embedded component is enabled. - """ - features: NotRequired[ - "AccountSessionService.CreateParamsComponentsPaymentDetailsFeatures" - ] - """ - The list of features enabled in the embedded component. - """ - - class CreateParamsComponentsPaymentDetailsFeatures(TypedDict): - capture_payments: NotRequired[bool] - """ - Whether to allow capturing and cancelling payment intents. This is `true` by default. - """ - destination_on_behalf_of_charge_management: NotRequired[bool] - """ - Whether connected accounts can manage destination charges that are created on behalf of them. This is `false` by default. - """ - dispute_management: NotRequired[bool] - """ - Whether responding to disputes is enabled, including submitting evidence and accepting disputes. This is `true` by default. - """ - refund_management: NotRequired[bool] - """ - Whether sending refunds is enabled. This is `true` by default. - """ - - class CreateParamsComponentsPaymentDisputes(TypedDict): - enabled: bool - """ - Whether the embedded component is enabled. - """ - features: NotRequired[ - "AccountSessionService.CreateParamsComponentsPaymentDisputesFeatures" - ] - """ - The list of features enabled in the embedded component. - """ - - class CreateParamsComponentsPaymentDisputesFeatures(TypedDict): - destination_on_behalf_of_charge_management: NotRequired[bool] - """ - Whether connected accounts can manage destination charges that are created on behalf of them. This is `false` by default. - """ - dispute_management: NotRequired[bool] - """ - Whether responding to disputes is enabled, including submitting evidence and accepting disputes. This is `true` by default. - """ - refund_management: NotRequired[bool] - """ - Whether sending refunds is enabled. This is `true` by default. - """ - - class CreateParamsComponentsPaymentMethodSettings(TypedDict): - enabled: bool - """ - Whether the embedded component is enabled. - """ - features: NotRequired[ - "AccountSessionService.CreateParamsComponentsPaymentMethodSettingsFeatures" - ] - """ - An empty list, because this embedded component has no features. - """ - - class CreateParamsComponentsPaymentMethodSettingsFeatures(TypedDict): - pass - - class CreateParamsComponentsPayments(TypedDict): - enabled: bool - """ - Whether the embedded component is enabled. - """ - features: NotRequired[ - "AccountSessionService.CreateParamsComponentsPaymentsFeatures" - ] - """ - The list of features enabled in the embedded component. - """ - - class CreateParamsComponentsPaymentsFeatures(TypedDict): - capture_payments: NotRequired[bool] - """ - Whether to allow capturing and cancelling payment intents. This is `true` by default. - """ - destination_on_behalf_of_charge_management: NotRequired[bool] - """ - Whether connected accounts can manage destination charges that are created on behalf of them. This is `false` by default. - """ - dispute_management: NotRequired[bool] - """ - Whether responding to disputes is enabled, including submitting evidence and accepting disputes. This is `true` by default. - """ - refund_management: NotRequired[bool] - """ - Whether sending refunds is enabled. This is `true` by default. - """ - - class CreateParamsComponentsPayoutDetails(TypedDict): - enabled: bool - """ - Whether the embedded component is enabled. - """ - features: NotRequired[ - "AccountSessionService.CreateParamsComponentsPayoutDetailsFeatures" - ] - """ - An empty list, because this embedded component has no features. - """ - - class CreateParamsComponentsPayoutDetailsFeatures(TypedDict): - pass - - class CreateParamsComponentsPayoutReconciliationReport(TypedDict): - enabled: bool - """ - Whether the embedded component is enabled. - """ - features: NotRequired[ - "AccountSessionService.CreateParamsComponentsPayoutReconciliationReportFeatures" - ] - """ - An empty list, because this embedded component has no features. - """ - - class CreateParamsComponentsPayoutReconciliationReportFeatures(TypedDict): - pass - - class CreateParamsComponentsPayouts(TypedDict): - enabled: bool - """ - Whether the embedded component is enabled. - """ - features: NotRequired[ - "AccountSessionService.CreateParamsComponentsPayoutsFeatures" - ] - """ - The list of features enabled in the embedded component. - """ - - class CreateParamsComponentsPayoutsFeatures(TypedDict): - disable_stripe_user_authentication: NotRequired[bool] - """ - Whether Stripe user authentication is disabled. This value can only be `true` for accounts where `controller.requirement_collection` is `application` for the account. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to `true` and `disable_stripe_user_authentication` defaults to `false`. - """ - edit_payout_schedule: NotRequired[bool] - """ - Whether to allow payout schedule to be changed. Defaults to `true` when `controller.losses.payments` is set to `stripe` for the account, otherwise `false`. - """ - external_account_collection: NotRequired[bool] - """ - Whether external account collection is enabled. This feature can only be `false` for accounts where you're responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `true`. - """ - instant_payouts: NotRequired[bool] - """ - Whether to allow creation of instant payouts. Defaults to `true` when `controller.losses.payments` is set to `stripe` for the account, otherwise `false`. - """ - standard_payouts: NotRequired[bool] - """ - Whether to allow creation of standard payouts. Defaults to `true` when `controller.losses.payments` is set to `stripe` for the account, otherwise `false`. - """ - - class CreateParamsComponentsPayoutsList(TypedDict): - enabled: bool - """ - Whether the embedded component is enabled. - """ - features: NotRequired[ - "AccountSessionService.CreateParamsComponentsPayoutsListFeatures" - ] - """ - An empty list, because this embedded component has no features. - """ - - class CreateParamsComponentsPayoutsListFeatures(TypedDict): - pass - - class CreateParamsComponentsProductTaxCodeSelector(TypedDict): - enabled: bool - """ - Whether the embedded component is enabled. - """ - features: NotRequired[ - "AccountSessionService.CreateParamsComponentsProductTaxCodeSelectorFeatures" - ] - """ - An empty list, because this embedded component has no features. - """ - - class CreateParamsComponentsProductTaxCodeSelectorFeatures(TypedDict): - pass - - class CreateParamsComponentsRecipients(TypedDict): - enabled: bool - """ - Whether the embedded component is enabled. - """ - features: NotRequired[ - "AccountSessionService.CreateParamsComponentsRecipientsFeatures" - ] - - class CreateParamsComponentsRecipientsFeatures(TypedDict): - send_money: NotRequired[bool] - """ - Whether to allow sending money. - """ - - class CreateParamsComponentsReportingChart(TypedDict): - enabled: bool - """ - Whether the embedded component is enabled. - """ - features: NotRequired[ - "AccountSessionService.CreateParamsComponentsReportingChartFeatures" - ] - """ - An empty list, because this embedded component has no features. - """ - - class CreateParamsComponentsReportingChartFeatures(TypedDict): - pass - - class CreateParamsComponentsTaxRegistrations(TypedDict): - enabled: bool - """ - Whether the embedded component is enabled. - """ - features: NotRequired[ - "AccountSessionService.CreateParamsComponentsTaxRegistrationsFeatures" - ] - """ - An empty list, because this embedded component has no features. - """ - - class CreateParamsComponentsTaxRegistrationsFeatures(TypedDict): - pass - - class CreateParamsComponentsTaxSettings(TypedDict): - enabled: bool - """ - Whether the embedded component is enabled. - """ - features: NotRequired[ - "AccountSessionService.CreateParamsComponentsTaxSettingsFeatures" - ] - """ - An empty list, because this embedded component has no features. - """ - - class CreateParamsComponentsTaxSettingsFeatures(TypedDict): - pass - - class CreateParamsComponentsTaxThresholdMonitoring(TypedDict): - enabled: bool - """ - Whether the embedded component is enabled. - """ - features: NotRequired[ - "AccountSessionService.CreateParamsComponentsTaxThresholdMonitoringFeatures" - ] - """ - An empty list, because this embedded component has no features. - """ - - class CreateParamsComponentsTaxThresholdMonitoringFeatures(TypedDict): - pass +class AccountSessionService(StripeService): def create( self, - params: "AccountSessionService.CreateParams", + params: "AccountSessionCreateParams", options: Optional[RequestOptions] = None, ) -> AccountSession: """ @@ -924,7 +34,7 @@ def create( async def create_async( self, - params: "AccountSessionService.CreateParams", + params: "AccountSessionCreateParams", options: Optional[RequestOptions] = None, ) -> AccountSession: """ diff --git a/stripe/_apple_pay_domain.py b/stripe/_apple_pay_domain.py index 1961b46ea..3ed5195a9 100644 --- a/stripe/_apple_pay_domain.py +++ b/stripe/_apple_pay_domain.py @@ -4,10 +4,23 @@ from stripe._deletable_api_resource import DeletableAPIResource from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource -from stripe._request_options import RequestOptions from stripe._util import class_method_variant, sanitize_id -from typing import ClassVar, List, Optional, cast, overload -from typing_extensions import Literal, NotRequired, Unpack +from typing import ClassVar, Optional, cast, overload +from typing_extensions import Literal, Unpack, TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params._apple_pay_domain_create_params import ( + ApplePayDomainCreateParams, + ) + from stripe.params._apple_pay_domain_delete_params import ( + ApplePayDomainDeleteParams, + ) + from stripe.params._apple_pay_domain_list_params import ( + ApplePayDomainListParams, + ) + from stripe.params._apple_pay_domain_retrieve_params import ( + ApplePayDomainRetrieveParams, + ) class ApplePayDomain( @@ -16,42 +29,6 @@ class ApplePayDomain( ListableAPIResource["ApplePayDomain"], ): OBJECT_NAME: ClassVar[Literal["apple_pay_domain"]] = "apple_pay_domain" - - class CreateParams(RequestOptions): - domain_name: str - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class DeleteParams(RequestOptions): - pass - - class ListParams(RequestOptions): - domain_name: NotRequired[str] - 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 RetrieveParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - created: int """ Time at which the object was created. Measured in seconds since the Unix epoch. @@ -76,7 +53,7 @@ class RetrieveParams(RequestOptions): @classmethod def create( - cls, **params: Unpack["ApplePayDomain.CreateParams"] + cls, **params: Unpack["ApplePayDomainCreateParams"] ) -> "ApplePayDomain": """ Create an apple pay domain. @@ -92,7 +69,7 @@ def create( @classmethod async def create_async( - cls, **params: Unpack["ApplePayDomain.CreateParams"] + cls, **params: Unpack["ApplePayDomainCreateParams"] ) -> "ApplePayDomain": """ Create an apple pay domain. @@ -108,7 +85,7 @@ async def create_async( @classmethod def _cls_delete( - cls, sid: str, **params: Unpack["ApplePayDomain.DeleteParams"] + cls, sid: str, **params: Unpack["ApplePayDomainDeleteParams"] ) -> "ApplePayDomain": """ Delete an apple pay domain. @@ -126,7 +103,7 @@ def _cls_delete( @overload @staticmethod def delete( - sid: str, **params: Unpack["ApplePayDomain.DeleteParams"] + sid: str, **params: Unpack["ApplePayDomainDeleteParams"] ) -> "ApplePayDomain": """ Delete an apple pay domain. @@ -135,7 +112,7 @@ def delete( @overload def delete( - self, **params: Unpack["ApplePayDomain.DeleteParams"] + self, **params: Unpack["ApplePayDomainDeleteParams"] ) -> "ApplePayDomain": """ Delete an apple pay domain. @@ -144,7 +121,7 @@ def delete( @class_method_variant("_cls_delete") def delete( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["ApplePayDomain.DeleteParams"] + self, **params: Unpack["ApplePayDomainDeleteParams"] ) -> "ApplePayDomain": """ Delete an apple pay domain. @@ -157,7 +134,7 @@ def delete( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_delete_async( - cls, sid: str, **params: Unpack["ApplePayDomain.DeleteParams"] + cls, sid: str, **params: Unpack["ApplePayDomainDeleteParams"] ) -> "ApplePayDomain": """ Delete an apple pay domain. @@ -175,7 +152,7 @@ async def _cls_delete_async( @overload @staticmethod async def delete_async( - sid: str, **params: Unpack["ApplePayDomain.DeleteParams"] + sid: str, **params: Unpack["ApplePayDomainDeleteParams"] ) -> "ApplePayDomain": """ Delete an apple pay domain. @@ -184,7 +161,7 @@ async def delete_async( @overload async def delete_async( - self, **params: Unpack["ApplePayDomain.DeleteParams"] + self, **params: Unpack["ApplePayDomainDeleteParams"] ) -> "ApplePayDomain": """ Delete an apple pay domain. @@ -193,7 +170,7 @@ async def delete_async( @class_method_variant("_cls_delete_async") async def delete_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["ApplePayDomain.DeleteParams"] + self, **params: Unpack["ApplePayDomainDeleteParams"] ) -> "ApplePayDomain": """ Delete an apple pay domain. @@ -206,7 +183,7 @@ async def delete_async( # pyright: ignore[reportGeneralTypeIssues] @classmethod def list( - cls, **params: Unpack["ApplePayDomain.ListParams"] + cls, **params: Unpack["ApplePayDomainListParams"] ) -> ListObject["ApplePayDomain"]: """ List apple pay domains. @@ -226,7 +203,7 @@ def list( @classmethod async def list_async( - cls, **params: Unpack["ApplePayDomain.ListParams"] + cls, **params: Unpack["ApplePayDomainListParams"] ) -> ListObject["ApplePayDomain"]: """ List apple pay domains. @@ -246,7 +223,7 @@ async def list_async( @classmethod def retrieve( - cls, id: str, **params: Unpack["ApplePayDomain.RetrieveParams"] + cls, id: str, **params: Unpack["ApplePayDomainRetrieveParams"] ) -> "ApplePayDomain": """ Retrieve an apple pay domain. @@ -257,7 +234,7 @@ def retrieve( @classmethod async def retrieve_async( - cls, id: str, **params: Unpack["ApplePayDomain.RetrieveParams"] + cls, id: str, **params: Unpack["ApplePayDomainRetrieveParams"] ) -> "ApplePayDomain": """ Retrieve an apple pay domain. diff --git a/stripe/_apple_pay_domain_service.py b/stripe/_apple_pay_domain_service.py index 750c7b781..a18d0ff0b 100644 --- a/stripe/_apple_pay_domain_service.py +++ b/stripe/_apple_pay_domain_service.py @@ -5,50 +5,29 @@ from stripe._request_options import RequestOptions from stripe._stripe_service import StripeService from stripe._util import sanitize_id -from typing import List, Optional, cast -from typing_extensions import NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params._apple_pay_domain_create_params import ( + ApplePayDomainCreateParams, + ) + from stripe.params._apple_pay_domain_delete_params import ( + ApplePayDomainDeleteParams, + ) + from stripe.params._apple_pay_domain_list_params import ( + ApplePayDomainListParams, + ) + from stripe.params._apple_pay_domain_retrieve_params import ( + ApplePayDomainRetrieveParams, + ) -class ApplePayDomainService(StripeService): - class CreateParams(TypedDict): - domain_name: str - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class DeleteParams(TypedDict): - pass - - class ListParams(TypedDict): - domain_name: NotRequired[str] - 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 RetrieveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ +class ApplePayDomainService(StripeService): def delete( self, domain: str, - params: Optional["ApplePayDomainService.DeleteParams"] = None, + params: Optional["ApplePayDomainDeleteParams"] = None, options: Optional[RequestOptions] = None, ) -> ApplePayDomain: """ @@ -70,7 +49,7 @@ def delete( async def delete_async( self, domain: str, - params: Optional["ApplePayDomainService.DeleteParams"] = None, + params: Optional["ApplePayDomainDeleteParams"] = None, options: Optional[RequestOptions] = None, ) -> ApplePayDomain: """ @@ -92,7 +71,7 @@ async def delete_async( def retrieve( self, domain: str, - params: Optional["ApplePayDomainService.RetrieveParams"] = None, + params: Optional["ApplePayDomainRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> ApplePayDomain: """ @@ -114,7 +93,7 @@ def retrieve( async def retrieve_async( self, domain: str, - params: Optional["ApplePayDomainService.RetrieveParams"] = None, + params: Optional["ApplePayDomainRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> ApplePayDomain: """ @@ -135,7 +114,7 @@ async def retrieve_async( def list( self, - params: Optional["ApplePayDomainService.ListParams"] = None, + params: Optional["ApplePayDomainListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[ApplePayDomain]: """ @@ -154,7 +133,7 @@ def list( async def list_async( self, - params: Optional["ApplePayDomainService.ListParams"] = None, + params: Optional["ApplePayDomainListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[ApplePayDomain]: """ @@ -173,7 +152,7 @@ async def list_async( def create( self, - params: "ApplePayDomainService.CreateParams", + params: "ApplePayDomainCreateParams", options: Optional[RequestOptions] = None, ) -> ApplePayDomain: """ @@ -192,7 +171,7 @@ def create( async def create_async( self, - params: "ApplePayDomainService.CreateParams", + params: "ApplePayDomainCreateParams", options: Optional[RequestOptions] = None, ) -> ApplePayDomain: """ diff --git a/stripe/_application_fee.py b/stripe/_application_fee.py index aef0ada43..f83ab1ead 100644 --- a/stripe/_application_fee.py +++ b/stripe/_application_fee.py @@ -4,17 +4,10 @@ from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource from stripe._nested_resource_class_methods import nested_resource_class_methods -from stripe._request_options import RequestOptions from stripe._stripe_object import StripeObject from stripe._util import class_method_variant, sanitize_id -from typing import ClassVar, Dict, List, Optional, cast, overload -from typing_extensions import ( - Literal, - NotRequired, - TypedDict, - Unpack, - TYPE_CHECKING, -) +from typing import ClassVar, Optional, cast, overload +from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: from stripe._account import Account @@ -22,6 +15,27 @@ from stripe._application_fee_refund import ApplicationFeeRefund from stripe._balance_transaction import BalanceTransaction from stripe._charge import Charge + from stripe.params._application_fee_create_refund_params import ( + ApplicationFeeCreateRefundParams, + ) + from stripe.params._application_fee_list_params import ( + ApplicationFeeListParams, + ) + from stripe.params._application_fee_list_refunds_params import ( + ApplicationFeeListRefundsParams, + ) + from stripe.params._application_fee_modify_refund_params import ( + ApplicationFeeModifyRefundParams, + ) + from stripe.params._application_fee_refund_params import ( + ApplicationFeeRefundParams, + ) + from stripe.params._application_fee_retrieve_params import ( + ApplicationFeeRetrieveParams, + ) + from stripe.params._application_fee_retrieve_refund_params import ( + ApplicationFeeRetrieveRefundParams, + ) @nested_resource_class_methods("refund") @@ -42,118 +56,6 @@ class FeeSource(StripeObject): Type of object that created the application fee. """ - class CreateRefundParams(RequestOptions): - amount: NotRequired[int] - """ - A positive integer, in _cents (or local equivalent)_, representing how much of this fee to refund. Can refund only up to the remaining unrefunded amount of the fee. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - - class ListParams(RequestOptions): - charge: NotRequired[str] - """ - Only return application fees for the charge specified by this charge ID. - """ - created: NotRequired["ApplicationFee.ListParamsCreated|int"] - """ - Only return applications fees that were created during the given date interval. - """ - 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 ListParamsCreated(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) - """ - - class ListRefundsParams(RequestOptions): - 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 ModifyRefundParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - - class RefundParams(RequestOptions): - amount: NotRequired[int] - """ - A positive integer, in _cents (or local equivalent)_, representing how much of this fee to refund. Can refund only up to the remaining unrefunded amount of the fee. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - - class RetrieveParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class RetrieveRefundParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - account: ExpandableField["Account"] """ ID of the Stripe account this fee was taken from. @@ -217,7 +119,7 @@ class RetrieveRefundParams(RequestOptions): @classmethod def list( - cls, **params: Unpack["ApplicationFee.ListParams"] + cls, **params: Unpack["ApplicationFeeListParams"] ) -> ListObject["ApplicationFee"]: """ Returns a list of application fees you've previously collected. The application fees are returned in sorted order, with the most recent fees appearing first. @@ -237,7 +139,7 @@ def list( @classmethod async def list_async( - cls, **params: Unpack["ApplicationFee.ListParams"] + cls, **params: Unpack["ApplicationFeeListParams"] ) -> ListObject["ApplicationFee"]: """ Returns a list of application fees you've previously collected. The application fees are returned in sorted order, with the most recent fees appearing first. @@ -257,7 +159,7 @@ async def list_async( @classmethod def _cls_refund( - cls, id: str, **params: Unpack["ApplicationFee.RefundParams"] + cls, id: str, **params: Unpack["ApplicationFeeRefundParams"] ) -> "ApplicationFeeRefund": """ Refunds an application fee that has previously been collected but not yet refunded. @@ -282,7 +184,7 @@ def _cls_refund( @overload @staticmethod def refund( - id: str, **params: Unpack["ApplicationFee.RefundParams"] + id: str, **params: Unpack["ApplicationFeeRefundParams"] ) -> "ApplicationFeeRefund": """ Refunds an application fee that has previously been collected but not yet refunded. @@ -299,7 +201,7 @@ def refund( @overload def refund( - self, **params: Unpack["ApplicationFee.RefundParams"] + self, **params: Unpack["ApplicationFeeRefundParams"] ) -> "ApplicationFeeRefund": """ Refunds an application fee that has previously been collected but not yet refunded. @@ -316,7 +218,7 @@ def refund( @class_method_variant("_cls_refund") def refund( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["ApplicationFee.RefundParams"] + self, **params: Unpack["ApplicationFeeRefundParams"] ) -> "ApplicationFeeRefund": """ Refunds an application fee that has previously been collected but not yet refunded. @@ -342,7 +244,7 @@ def refund( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_refund_async( - cls, id: str, **params: Unpack["ApplicationFee.RefundParams"] + cls, id: str, **params: Unpack["ApplicationFeeRefundParams"] ) -> "ApplicationFeeRefund": """ Refunds an application fee that has previously been collected but not yet refunded. @@ -367,7 +269,7 @@ async def _cls_refund_async( @overload @staticmethod async def refund_async( - id: str, **params: Unpack["ApplicationFee.RefundParams"] + id: str, **params: Unpack["ApplicationFeeRefundParams"] ) -> "ApplicationFeeRefund": """ Refunds an application fee that has previously been collected but not yet refunded. @@ -384,7 +286,7 @@ async def refund_async( @overload async def refund_async( - self, **params: Unpack["ApplicationFee.RefundParams"] + self, **params: Unpack["ApplicationFeeRefundParams"] ) -> "ApplicationFeeRefund": """ Refunds an application fee that has previously been collected but not yet refunded. @@ -401,7 +303,7 @@ async def refund_async( @class_method_variant("_cls_refund_async") async def refund_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["ApplicationFee.RefundParams"] + self, **params: Unpack["ApplicationFeeRefundParams"] ) -> "ApplicationFeeRefund": """ Refunds an application fee that has previously been collected but not yet refunded. @@ -427,7 +329,7 @@ async def refund_async( # pyright: ignore[reportGeneralTypeIssues] @classmethod def retrieve( - cls, id: str, **params: Unpack["ApplicationFee.RetrieveParams"] + cls, id: str, **params: Unpack["ApplicationFeeRetrieveParams"] ) -> "ApplicationFee": """ Retrieves the details of an application fee that your account has collected. The same information is returned when refunding the application fee. @@ -438,7 +340,7 @@ def retrieve( @classmethod async def retrieve_async( - cls, id: str, **params: Unpack["ApplicationFee.RetrieveParams"] + cls, id: str, **params: Unpack["ApplicationFeeRetrieveParams"] ) -> "ApplicationFee": """ Retrieves the details of an application fee that your account has collected. The same information is returned when refunding the application fee. @@ -452,7 +354,7 @@ def retrieve_refund( cls, fee: str, id: str, - **params: Unpack["ApplicationFee.RetrieveRefundParams"], + **params: Unpack["ApplicationFeeRetrieveRefundParams"], ) -> "ApplicationFeeRefund": """ By default, you can see the 10 most recent refunds stored directly on the application fee object, but you can also retrieve details about a specific refund stored on the application fee. @@ -473,7 +375,7 @@ async def retrieve_refund_async( cls, fee: str, id: str, - **params: Unpack["ApplicationFee.RetrieveRefundParams"], + **params: Unpack["ApplicationFeeRetrieveRefundParams"], ) -> "ApplicationFeeRefund": """ By default, you can see the 10 most recent refunds stored directly on the application fee object, but you can also retrieve details about a specific refund stored on the application fee. @@ -494,7 +396,7 @@ def modify_refund( cls, fee: str, id: str, - **params: Unpack["ApplicationFee.ModifyRefundParams"], + **params: Unpack["ApplicationFeeModifyRefundParams"], ) -> "ApplicationFeeRefund": """ Updates the specified application fee refund by setting the values of the parameters passed. Any parameters not provided will be left unchanged. @@ -517,7 +419,7 @@ async def modify_refund_async( cls, fee: str, id: str, - **params: Unpack["ApplicationFee.ModifyRefundParams"], + **params: Unpack["ApplicationFeeModifyRefundParams"], ) -> "ApplicationFeeRefund": """ Updates the specified application fee refund by setting the values of the parameters passed. Any parameters not provided will be left unchanged. @@ -537,7 +439,7 @@ async def modify_refund_async( @classmethod def list_refunds( - cls, id: str, **params: Unpack["ApplicationFee.ListRefundsParams"] + cls, id: str, **params: Unpack["ApplicationFeeListRefundsParams"] ) -> ListObject["ApplicationFeeRefund"]: """ You can see a list of the refunds belonging to a specific application fee. Note that the 10 most recent refunds are always available by default on the application fee object. If you need more than those 10, you can use this API method and the limit and starting_after parameters to page through additional refunds. @@ -553,7 +455,7 @@ def list_refunds( @classmethod async def list_refunds_async( - cls, id: str, **params: Unpack["ApplicationFee.ListRefundsParams"] + cls, id: str, **params: Unpack["ApplicationFeeListRefundsParams"] ) -> ListObject["ApplicationFeeRefund"]: """ You can see a list of the refunds belonging to a specific application fee. Note that the 10 most recent refunds are always available by default on the application fee object. If you need more than those 10, you can use this API method and the limit and starting_after parameters to page through additional refunds. @@ -569,7 +471,7 @@ async def list_refunds_async( @classmethod def create_refund( - cls, id: str, **params: Unpack["ApplicationFee.CreateRefundParams"] + cls, id: str, **params: Unpack["ApplicationFeeCreateRefundParams"] ) -> "ApplicationFeeRefund": """ Refunds an application fee that has previously been collected but not yet refunded. @@ -593,7 +495,7 @@ def create_refund( @classmethod async def create_refund_async( - cls, id: str, **params: Unpack["ApplicationFee.CreateRefundParams"] + cls, id: str, **params: Unpack["ApplicationFeeCreateRefundParams"] ) -> "ApplicationFeeRefund": """ Refunds an application fee that has previously been collected but not yet refunded. diff --git a/stripe/_application_fee_refund_service.py b/stripe/_application_fee_refund_service.py index 74cb58839..e165ab3ef 100644 --- a/stripe/_application_fee_refund_service.py +++ b/stripe/_application_fee_refund_service.py @@ -5,64 +5,30 @@ from stripe._request_options import RequestOptions from stripe._stripe_service import StripeService from stripe._util import sanitize_id -from typing import Dict, List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params._application_fee_refund_create_params import ( + ApplicationFeeRefundCreateParams, + ) + from stripe.params._application_fee_refund_list_params import ( + ApplicationFeeRefundListParams, + ) + from stripe.params._application_fee_refund_retrieve_params import ( + ApplicationFeeRefundRetrieveParams, + ) + from stripe.params._application_fee_refund_update_params import ( + ApplicationFeeRefundUpdateParams, + ) class ApplicationFeeRefundService(StripeService): - class CreateParams(TypedDict): - amount: NotRequired[int] - """ - A positive integer, in _cents (or local equivalent)_, representing how much of this fee to refund. Can refund only up to the remaining unrefunded amount of the fee. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - - class ListParams(TypedDict): - 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 RetrieveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class UpdateParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - def retrieve( self, fee: str, id: str, - params: Optional["ApplicationFeeRefundService.RetrieveParams"] = None, + params: Optional["ApplicationFeeRefundRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> ApplicationFeeRefund: """ @@ -86,7 +52,7 @@ async def retrieve_async( self, fee: str, id: str, - params: Optional["ApplicationFeeRefundService.RetrieveParams"] = None, + params: Optional["ApplicationFeeRefundRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> ApplicationFeeRefund: """ @@ -110,7 +76,7 @@ def update( self, fee: str, id: str, - params: Optional["ApplicationFeeRefundService.UpdateParams"] = None, + params: Optional["ApplicationFeeRefundUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> ApplicationFeeRefund: """ @@ -136,7 +102,7 @@ async def update_async( self, fee: str, id: str, - params: Optional["ApplicationFeeRefundService.UpdateParams"] = None, + params: Optional["ApplicationFeeRefundUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> ApplicationFeeRefund: """ @@ -161,7 +127,7 @@ async def update_async( def list( self, id: str, - params: Optional["ApplicationFeeRefundService.ListParams"] = None, + params: Optional["ApplicationFeeRefundListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[ApplicationFeeRefund]: """ @@ -181,7 +147,7 @@ def list( async def list_async( self, id: str, - params: Optional["ApplicationFeeRefundService.ListParams"] = None, + params: Optional["ApplicationFeeRefundListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[ApplicationFeeRefund]: """ @@ -201,7 +167,7 @@ async def list_async( def create( self, id: str, - params: Optional["ApplicationFeeRefundService.CreateParams"] = None, + params: Optional["ApplicationFeeRefundCreateParams"] = None, options: Optional[RequestOptions] = None, ) -> ApplicationFeeRefund: """ @@ -229,7 +195,7 @@ def create( async def create_async( self, id: str, - params: Optional["ApplicationFeeRefundService.CreateParams"] = None, + params: Optional["ApplicationFeeRefundCreateParams"] = None, options: Optional[RequestOptions] = None, ) -> ApplicationFeeRefund: """ diff --git a/stripe/_application_fee_service.py b/stripe/_application_fee_service.py index acd2122ba..975361c7f 100644 --- a/stripe/_application_fee_service.py +++ b/stripe/_application_fee_service.py @@ -6,8 +6,16 @@ from stripe._request_options import RequestOptions from stripe._stripe_service import StripeService from stripe._util import sanitize_id -from typing import List, Optional, cast -from typing_extensions import NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params._application_fee_list_params import ( + ApplicationFeeListParams, + ) + from stripe.params._application_fee_retrieve_params import ( + ApplicationFeeRetrieveParams, + ) class ApplicationFeeService(StripeService): @@ -15,59 +23,9 @@ def __init__(self, requestor): super().__init__(requestor) self.refunds = ApplicationFeeRefundService(self._requestor) - class ListParams(TypedDict): - charge: NotRequired[str] - """ - Only return application fees for the charge specified by this charge ID. - """ - created: NotRequired["ApplicationFeeService.ListParamsCreated|int"] - """ - Only return applications fees that were created during the given date interval. - """ - 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 ListParamsCreated(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) - """ - - class RetrieveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - def list( self, - params: Optional["ApplicationFeeService.ListParams"] = None, + params: Optional["ApplicationFeeListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[ApplicationFee]: """ @@ -86,7 +44,7 @@ def list( async def list_async( self, - params: Optional["ApplicationFeeService.ListParams"] = None, + params: Optional["ApplicationFeeListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[ApplicationFee]: """ @@ -106,7 +64,7 @@ async def list_async( def retrieve( self, id: str, - params: Optional["ApplicationFeeService.RetrieveParams"] = None, + params: Optional["ApplicationFeeRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> ApplicationFee: """ @@ -126,7 +84,7 @@ def retrieve( async def retrieve_async( self, id: str, - params: Optional["ApplicationFeeService.RetrieveParams"] = None, + params: Optional["ApplicationFeeRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> ApplicationFee: """ diff --git a/stripe/_balance.py b/stripe/_balance.py index da5c027db..e3a5e8475 100644 --- a/stripe/_balance.py +++ b/stripe/_balance.py @@ -1,10 +1,12 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec -from stripe._request_options import RequestOptions from stripe._singleton_api_resource import SingletonAPIResource from stripe._stripe_object import StripeObject from typing import ClassVar, List, Optional -from typing_extensions import Literal, NotRequired, Unpack +from typing_extensions import Literal, Unpack, TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params._balance_retrieve_params import BalanceRetrieveParams class Balance(SingletonAPIResource["Balance"]): @@ -252,12 +254,6 @@ class SourceTypes(StripeObject): """ _inner_class_types = {"available": Available, "pending": Pending} - class RetrieveParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - available: List[Available] """ Available funds that you can transfer or pay out automatically by Stripe or explicitly through the [Transfers API](https://stripe.com/docs/api#transfers) or [Payouts API](https://stripe.com/docs/api#payouts). You can find the available balance for each currency and payment type in the `source_types` property. @@ -286,7 +282,7 @@ class RetrieveParams(RequestOptions): refund_and_dispute_prefunding: Optional[RefundAndDisputePrefunding] @classmethod - def retrieve(cls, **params: Unpack["Balance.RetrieveParams"]) -> "Balance": + def retrieve(cls, **params: Unpack["BalanceRetrieveParams"]) -> "Balance": """ Retrieves the current account balance, based on the authentication that was used to make the request. For a sample request, see [Accounting for negative balances](https://docs.stripe.com/docs/connect/account-balances#accounting-for-negative-balances). @@ -297,7 +293,7 @@ def retrieve(cls, **params: Unpack["Balance.RetrieveParams"]) -> "Balance": @classmethod async def retrieve_async( - cls, **params: Unpack["Balance.RetrieveParams"] + cls, **params: Unpack["BalanceRetrieveParams"] ) -> "Balance": """ Retrieves the current account balance, based on the authentication that was used to make the request. diff --git a/stripe/_balance_service.py b/stripe/_balance_service.py index 853093966..71356a8bf 100644 --- a/stripe/_balance_service.py +++ b/stripe/_balance_service.py @@ -3,20 +3,17 @@ from stripe._balance import Balance from stripe._request_options import RequestOptions from stripe._stripe_service import StripeService -from typing import List, Optional, cast -from typing_extensions import NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params._balance_retrieve_params import BalanceRetrieveParams -class BalanceService(StripeService): - class RetrieveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ +class BalanceService(StripeService): def retrieve( self, - params: Optional["BalanceService.RetrieveParams"] = None, + params: Optional["BalanceRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Balance: """ @@ -36,7 +33,7 @@ def retrieve( async def retrieve_async( self, - params: Optional["BalanceService.RetrieveParams"] = None, + params: Optional["BalanceRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Balance: """ diff --git a/stripe/_balance_settings.py b/stripe/_balance_settings.py index 3e9414af9..bda6ce9b4 100644 --- a/stripe/_balance_settings.py +++ b/stripe/_balance_settings.py @@ -1,11 +1,18 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec -from stripe._request_options import RequestOptions from stripe._singleton_api_resource import SingletonAPIResource from stripe._stripe_object import StripeObject from stripe._updateable_api_resource import UpdateableAPIResource -from typing import ClassVar, Dict, List, Optional, Union, cast -from typing_extensions import Literal, NotRequired, TypedDict, Unpack +from typing import ClassVar, Dict, List, Optional, cast +from typing_extensions import Literal, Unpack, TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params._balance_settings_modify_params import ( + BalanceSettingsModifyParams, + ) + from stripe.params._balance_settings_retrieve_params import ( + BalanceSettingsRetrieveParams, + ) class BalanceSettings( @@ -88,80 +95,6 @@ class SettlementTiming(StripeObject): "settlement_timing": SettlementTiming, } - class ModifyParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - payments: NotRequired["BalanceSettings.ModifyParamsPayments"] - """ - Settings that apply to the [Payments Balance](https://docs.stripe.com/api/balance). - """ - - class ModifyParamsPayments(TypedDict): - debit_negative_balances: NotRequired[bool] - """ - A Boolean indicating whether Stripe should try to reclaim negative balances from an attached bank account. For details, see [Understanding Connect Account Balances](https://docs.stripe.com/connect/account-balances). - """ - payouts: NotRequired["BalanceSettings.ModifyParamsPaymentsPayouts"] - """ - Settings specific to the account's payouts. - """ - settlement_timing: NotRequired[ - "BalanceSettings.ModifyParamsPaymentsSettlementTiming" - ] - """ - Settings related to the account's balance settlement timing. - """ - - class ModifyParamsPaymentsPayouts(TypedDict): - minimum_balance_by_currency: NotRequired[ - "Literal['']|Dict[str, Union[Literal[''], int]]" - ] - """ - The minimum balance amount to retain per currency after automatic payouts. Only funds that exceed these amounts are paid out. Learn more about the [minimum balances for automatic payouts](https://docs.stripe.com/payouts/minimum-balances-for-automatic-payouts). - """ - schedule: NotRequired[ - "BalanceSettings.ModifyParamsPaymentsPayoutsSchedule" - ] - """ - Details on when funds from charges are available, and when they are paid out to an external account. For details, see our [Setting Bank and Debit Card Payouts](https://docs.stripe.com/connect/bank-transfers#payout-information) documentation. - """ - statement_descriptor: NotRequired[str] - """ - The text that appears on the bank account statement for payouts. If not set, this defaults to the platform's bank descriptor as set in the Dashboard. - """ - - class ModifyParamsPaymentsPayoutsSchedule(TypedDict): - interval: NotRequired[Literal["daily", "manual", "monthly", "weekly"]] - """ - How frequently available funds are paid out. One of: `daily`, `manual`, `weekly`, or `monthly`. Default is `daily`. - """ - monthly_payout_days: NotRequired[List[int]] - """ - The days of the month when available funds are paid out, specified as an array of numbers between 1--31. Payouts nominally scheduled between the 29th and 31st of the month are instead sent on the last day of a shorter month. Required and applicable only if `interval` is `monthly`. - """ - weekly_payout_days: NotRequired[ - List[ - Literal["friday", "monday", "thursday", "tuesday", "wednesday"] - ] - ] - """ - The days of the week when available funds are paid out, specified as an array, e.g., [`monday`, `tuesday`]. Required and applicable only if `interval` is `weekly`. - """ - - class ModifyParamsPaymentsSettlementTiming(TypedDict): - delay_days_override: NotRequired["Literal['']|int"] - """ - Change `delay_days` for this account, which determines the number of days charge funds are held before becoming available. The maximum value is 31. Passing an empty string to `delay_days_override` will return `delay_days` to the default, which is the lowest available value for the account. [Learn more about controlling delay days](https://docs.stripe.com/connect/manage-payout-schedule). - """ - - class RetrieveParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - object: Literal["balance_settings"] """ String representing the object's type. Objects of the same type share the same value. @@ -170,7 +103,7 @@ class RetrieveParams(RequestOptions): @classmethod def modify( - cls, **params: Unpack["BalanceSettings.ModifyParams"] + cls, **params: Unpack["BalanceSettingsModifyParams"] ) -> "BalanceSettings": """ Updates balance settings for a given connected account. @@ -187,7 +120,7 @@ def modify( @classmethod async def modify_async( - cls, **params: Unpack["BalanceSettings.ModifyParams"] + cls, **params: Unpack["BalanceSettingsModifyParams"] ) -> "BalanceSettings": """ Updates balance settings for a given connected account. @@ -204,7 +137,7 @@ async def modify_async( @classmethod def retrieve( - cls, **params: Unpack["BalanceSettings.RetrieveParams"] + cls, **params: Unpack["BalanceSettingsRetrieveParams"] ) -> "BalanceSettings": """ Retrieves balance settings for a given connected account. @@ -216,7 +149,7 @@ def retrieve( @classmethod async def retrieve_async( - cls, **params: Unpack["BalanceSettings.RetrieveParams"] + cls, **params: Unpack["BalanceSettingsRetrieveParams"] ) -> "BalanceSettings": """ Retrieves balance settings for a given connected account. diff --git a/stripe/_balance_settings_service.py b/stripe/_balance_settings_service.py index 180e0abd0..a4a238183 100644 --- a/stripe/_balance_settings_service.py +++ b/stripe/_balance_settings_service.py @@ -3,90 +3,22 @@ from stripe._balance_settings import BalanceSettings from stripe._request_options import RequestOptions from stripe._stripe_service import StripeService -from typing import Dict, List, Optional, Union, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params._balance_settings_retrieve_params import ( + BalanceSettingsRetrieveParams, + ) + from stripe.params._balance_settings_update_params import ( + BalanceSettingsUpdateParams, + ) -class BalanceSettingsService(StripeService): - class RetrieveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class UpdateParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - payments: NotRequired["BalanceSettingsService.UpdateParamsPayments"] - """ - Settings that apply to the [Payments Balance](https://docs.stripe.com/api/balance). - """ - - class UpdateParamsPayments(TypedDict): - debit_negative_balances: NotRequired[bool] - """ - A Boolean indicating whether Stripe should try to reclaim negative balances from an attached bank account. For details, see [Understanding Connect Account Balances](https://docs.stripe.com/connect/account-balances). - """ - payouts: NotRequired[ - "BalanceSettingsService.UpdateParamsPaymentsPayouts" - ] - """ - Settings specific to the account's payouts. - """ - settlement_timing: NotRequired[ - "BalanceSettingsService.UpdateParamsPaymentsSettlementTiming" - ] - """ - Settings related to the account's balance settlement timing. - """ - - class UpdateParamsPaymentsPayouts(TypedDict): - minimum_balance_by_currency: NotRequired[ - "Literal['']|Dict[str, Union[Literal[''], int]]" - ] - """ - The minimum balance amount to retain per currency after automatic payouts. Only funds that exceed these amounts are paid out. Learn more about the [minimum balances for automatic payouts](https://docs.stripe.com/payouts/minimum-balances-for-automatic-payouts). - """ - schedule: NotRequired[ - "BalanceSettingsService.UpdateParamsPaymentsPayoutsSchedule" - ] - """ - Details on when funds from charges are available, and when they are paid out to an external account. For details, see our [Setting Bank and Debit Card Payouts](https://docs.stripe.com/connect/bank-transfers#payout-information) documentation. - """ - statement_descriptor: NotRequired[str] - """ - The text that appears on the bank account statement for payouts. If not set, this defaults to the platform's bank descriptor as set in the Dashboard. - """ - - class UpdateParamsPaymentsPayoutsSchedule(TypedDict): - interval: NotRequired[Literal["daily", "manual", "monthly", "weekly"]] - """ - How frequently available funds are paid out. One of: `daily`, `manual`, `weekly`, or `monthly`. Default is `daily`. - """ - monthly_payout_days: NotRequired[List[int]] - """ - The days of the month when available funds are paid out, specified as an array of numbers between 1--31. Payouts nominally scheduled between the 29th and 31st of the month are instead sent on the last day of a shorter month. Required and applicable only if `interval` is `monthly`. - """ - weekly_payout_days: NotRequired[ - List[ - Literal["friday", "monday", "thursday", "tuesday", "wednesday"] - ] - ] - """ - The days of the week when available funds are paid out, specified as an array, e.g., [`monday`, `tuesday`]. Required and applicable only if `interval` is `weekly`. - """ - - class UpdateParamsPaymentsSettlementTiming(TypedDict): - delay_days_override: NotRequired["Literal['']|int"] - """ - Change `delay_days` for this account, which determines the number of days charge funds are held before becoming available. The maximum value is 31. Passing an empty string to `delay_days_override` will return `delay_days` to the default, which is the lowest available value for the account. [Learn more about controlling delay days](https://docs.stripe.com/connect/manage-payout-schedule). - """ +class BalanceSettingsService(StripeService): def retrieve( self, - params: Optional["BalanceSettingsService.RetrieveParams"] = None, + params: Optional["BalanceSettingsRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> BalanceSettings: """ @@ -106,7 +38,7 @@ def retrieve( async def retrieve_async( self, - params: Optional["BalanceSettingsService.RetrieveParams"] = None, + params: Optional["BalanceSettingsRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> BalanceSettings: """ @@ -126,7 +58,7 @@ async def retrieve_async( def update( self, - params: Optional["BalanceSettingsService.UpdateParams"] = None, + params: Optional["BalanceSettingsUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> BalanceSettings: """ @@ -146,7 +78,7 @@ def update( async def update_async( self, - params: Optional["BalanceSettingsService.UpdateParams"] = None, + params: Optional["BalanceSettingsUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> BalanceSettings: """ diff --git a/stripe/_balance_transaction.py b/stripe/_balance_transaction.py index af4cf03a4..e8393984c 100644 --- a/stripe/_balance_transaction.py +++ b/stripe/_balance_transaction.py @@ -3,16 +3,9 @@ from stripe._expandable_field import ExpandableField from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource -from stripe._request_options import RequestOptions from stripe._stripe_object import StripeObject from typing import ClassVar, List, Optional, Union -from typing_extensions import ( - Literal, - NotRequired, - TypedDict, - Unpack, - TYPE_CHECKING, -) +from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: from stripe._application_fee import ApplicationFee @@ -33,6 +26,12 @@ from stripe.issuing._authorization import Authorization from stripe.issuing._dispute import Dispute as IssuingDisputeResource from stripe.issuing._transaction import Transaction + from stripe.params._balance_transaction_list_params import ( + BalanceTransactionListParams, + ) + from stripe.params._balance_transaction_retrieve_params import ( + BalanceTransactionRetrieveParams, + ) class BalanceTransaction(ListableAPIResource["BalanceTransaction"]): @@ -69,68 +68,6 @@ class FeeDetail(StripeObject): Type of the fee, one of: `application_fee`, `payment_method_passthrough_fee`, `stripe_fee` or `tax`. """ - class ListParams(RequestOptions): - created: NotRequired["BalanceTransaction.ListParamsCreated|int"] - """ - Only return transactions that were created during the given date interval. - """ - currency: NotRequired[str] - """ - Only return transactions in a certain currency. 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). - """ - 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. - """ - payout: NotRequired[str] - """ - For automatic Stripe payouts only, only returns transactions that were paid out on the specified payout ID. - """ - source: NotRequired[str] - """ - Only returns the original transaction. - """ - 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. - """ - type: NotRequired[str] - """ - Only returns transactions of the given type. One of: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `climate_order_purchase`, `climate_order_refund`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `obligation_outbound`, `obligation_reversal_inbound`, `payment`, `payment_failure_refund`, `payment_network_reserve_hold`, `payment_network_reserve_release`, `payment_refund`, `payment_reversal`, `payment_unreconciled`, `payout`, `payout_cancel`, `payout_failure`, `payout_minimum_balance_hold`, `payout_minimum_balance_release`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `stripe_fee`, `stripe_fx_fee`, `stripe_balance_payment_debit`, `stripe_balance_payment_debit_reversal`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`. - """ - - class ListParamsCreated(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) - """ - - class RetrieveParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - amount: int """ Gross amount of this transaction (in cents (or local equivalent)). A positive value represents funds charged to another party, and a negative value represents funds sent to another party. @@ -266,7 +203,7 @@ class RetrieveParams(RequestOptions): @classmethod def list( - cls, **params: Unpack["BalanceTransaction.ListParams"] + cls, **params: Unpack["BalanceTransactionListParams"] ) -> ListObject["BalanceTransaction"]: """ Returns a list of transactions that have contributed to the Stripe account balance (e.g., charges, transfers, and so forth). The transactions are returned in sorted order, with the most recent transactions appearing first. @@ -288,7 +225,7 @@ def list( @classmethod async def list_async( - cls, **params: Unpack["BalanceTransaction.ListParams"] + cls, **params: Unpack["BalanceTransactionListParams"] ) -> ListObject["BalanceTransaction"]: """ Returns a list of transactions that have contributed to the Stripe account balance (e.g., charges, transfers, and so forth). The transactions are returned in sorted order, with the most recent transactions appearing first. @@ -310,7 +247,7 @@ async def list_async( @classmethod def retrieve( - cls, id: str, **params: Unpack["BalanceTransaction.RetrieveParams"] + cls, id: str, **params: Unpack["BalanceTransactionRetrieveParams"] ) -> "BalanceTransaction": """ Retrieves the balance transaction with the given ID. @@ -323,7 +260,7 @@ def retrieve( @classmethod async def retrieve_async( - cls, id: str, **params: Unpack["BalanceTransaction.RetrieveParams"] + cls, id: str, **params: Unpack["BalanceTransactionRetrieveParams"] ) -> "BalanceTransaction": """ Retrieves the balance transaction with the given ID. diff --git a/stripe/_balance_transaction_service.py b/stripe/_balance_transaction_service.py index 0ff6ee052..3a8deb243 100644 --- a/stripe/_balance_transaction_service.py +++ b/stripe/_balance_transaction_service.py @@ -5,76 +5,22 @@ from stripe._request_options import RequestOptions from stripe._stripe_service import StripeService from stripe._util import sanitize_id -from typing import List, Optional, cast -from typing_extensions import NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params._balance_transaction_list_params import ( + BalanceTransactionListParams, + ) + from stripe.params._balance_transaction_retrieve_params import ( + BalanceTransactionRetrieveParams, + ) -class BalanceTransactionService(StripeService): - class ListParams(TypedDict): - created: NotRequired["BalanceTransactionService.ListParamsCreated|int"] - """ - Only return transactions that were created during the given date interval. - """ - currency: NotRequired[str] - """ - Only return transactions in a certain currency. 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). - """ - 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. - """ - payout: NotRequired[str] - """ - For automatic Stripe payouts only, only returns transactions that were paid out on the specified payout ID. - """ - source: NotRequired[str] - """ - Only returns the original transaction. - """ - 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. - """ - type: NotRequired[str] - """ - Only returns transactions of the given type. One of: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `climate_order_purchase`, `climate_order_refund`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `obligation_outbound`, `obligation_reversal_inbound`, `payment`, `payment_failure_refund`, `payment_network_reserve_hold`, `payment_network_reserve_release`, `payment_refund`, `payment_reversal`, `payment_unreconciled`, `payout`, `payout_cancel`, `payout_failure`, `payout_minimum_balance_hold`, `payout_minimum_balance_release`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `stripe_fee`, `stripe_fx_fee`, `stripe_balance_payment_debit`, `stripe_balance_payment_debit_reversal`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`. - """ - - class ListParamsCreated(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) - """ - - class RetrieveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ +class BalanceTransactionService(StripeService): def list( self, - params: Optional["BalanceTransactionService.ListParams"] = None, + params: Optional["BalanceTransactionListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[BalanceTransaction]: """ @@ -95,7 +41,7 @@ def list( async def list_async( self, - params: Optional["BalanceTransactionService.ListParams"] = None, + params: Optional["BalanceTransactionListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[BalanceTransaction]: """ @@ -117,7 +63,7 @@ async def list_async( def retrieve( self, id: str, - params: Optional["BalanceTransactionService.RetrieveParams"] = None, + params: Optional["BalanceTransactionRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> BalanceTransaction: """ @@ -139,7 +85,7 @@ def retrieve( async def retrieve_async( self, id: str, - params: Optional["BalanceTransactionService.RetrieveParams"] = None, + params: Optional["BalanceTransactionRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> BalanceTransaction: """ diff --git a/stripe/_bank_account.py b/stripe/_bank_account.py index e03b816ca..068e8cccd 100644 --- a/stripe/_bank_account.py +++ b/stripe/_bank_account.py @@ -5,7 +5,6 @@ from stripe._deletable_api_resource import DeletableAPIResource from stripe._error import InvalidRequestError from stripe._expandable_field import ExpandableField -from stripe._request_options import RequestOptions from stripe._stripe_object import StripeObject from stripe._updateable_api_resource import UpdateableAPIResource from stripe._util import class_method_variant, sanitize_id @@ -15,6 +14,9 @@ if TYPE_CHECKING: from stripe._card import Card + from stripe.params._bank_account_delete_params import ( + BankAccountDeleteParams, + ) class BankAccount( @@ -296,9 +298,6 @@ class Error(StripeObject): """ _inner_class_types = {"errors": Error} - class DeleteParams(RequestOptions): - pass - account: Optional[ExpandableField["Account"]] """ The account this bank account belongs to. Only applicable on Accounts (not customers or recipients) This property is only available when returned as an [External Account](https://docs.stripe.com/api/external_account_bank_accounts/object) where [controller.is_controller](https://docs.stripe.com/api/accounts/object#account_object-controller-is_controller) is `true`. @@ -384,7 +383,7 @@ class DeleteParams(RequestOptions): @classmethod def _cls_delete( - cls, sid: str, **params: Unpack["BankAccount.DeleteParams"] + cls, sid: str, **params: Unpack["BankAccountDeleteParams"] ) -> Union["BankAccount", "Card"]: """ Delete a specified external account for a given account. @@ -402,7 +401,7 @@ def _cls_delete( @overload @staticmethod def delete( - sid: str, **params: Unpack["BankAccount.DeleteParams"] + sid: str, **params: Unpack["BankAccountDeleteParams"] ) -> Union["BankAccount", "Card"]: """ Delete a specified external account for a given account. @@ -411,7 +410,7 @@ def delete( @overload def delete( - self, **params: Unpack["BankAccount.DeleteParams"] + self, **params: Unpack["BankAccountDeleteParams"] ) -> Union["BankAccount", "Card"]: """ Delete a specified external account for a given account. @@ -420,7 +419,7 @@ def delete( @class_method_variant("_cls_delete") def delete( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["BankAccount.DeleteParams"] + self, **params: Unpack["BankAccountDeleteParams"] ) -> Union["BankAccount", "Card"]: """ Delete a specified external account for a given account. @@ -433,7 +432,7 @@ def delete( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_delete_async( - cls, sid: str, **params: Unpack["BankAccount.DeleteParams"] + cls, sid: str, **params: Unpack["BankAccountDeleteParams"] ) -> Union["BankAccount", "Card"]: """ Delete a specified external account for a given account. @@ -451,7 +450,7 @@ async def _cls_delete_async( @overload @staticmethod async def delete_async( - sid: str, **params: Unpack["BankAccount.DeleteParams"] + sid: str, **params: Unpack["BankAccountDeleteParams"] ) -> Union["BankAccount", "Card"]: """ Delete a specified external account for a given account. @@ -460,7 +459,7 @@ async def delete_async( @overload async def delete_async( - self, **params: Unpack["BankAccount.DeleteParams"] + self, **params: Unpack["BankAccountDeleteParams"] ) -> Union["BankAccount", "Card"]: """ Delete a specified external account for a given account. @@ -469,7 +468,7 @@ async def delete_async( @class_method_variant("_cls_delete_async") async def delete_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["BankAccount.DeleteParams"] + self, **params: Unpack["BankAccountDeleteParams"] ) -> Union["BankAccount", "Card"]: """ Delete a specified external account for a given account. diff --git a/stripe/_card.py b/stripe/_card.py index 192119717..cc999fc82 100644 --- a/stripe/_card.py +++ b/stripe/_card.py @@ -5,7 +5,6 @@ from stripe._deletable_api_resource import DeletableAPIResource from stripe._error import InvalidRequestError from stripe._expandable_field import ExpandableField -from stripe._request_options import RequestOptions from stripe._stripe_object import StripeObject from stripe._updateable_api_resource import UpdateableAPIResource from stripe._util import class_method_variant, sanitize_id @@ -14,6 +13,7 @@ if TYPE_CHECKING: from stripe._bank_account import BankAccount + from stripe.params._card_delete_params import CardDeleteParams class Card(DeletableAPIResource["Card"], UpdateableAPIResource["Card"]): @@ -33,9 +33,6 @@ class Networks(StripeObject): The preferred network for co-branded cards. Can be `cartes_bancaires`, `mastercard`, `visa` or `invalid_preference` if requested network is not valid for the card. """ - class DeleteParams(RequestOptions): - pass - account: Optional[ExpandableField["Account"]] address_city: Optional[str] """ @@ -179,7 +176,7 @@ class DeleteParams(RequestOptions): @classmethod def _cls_delete( - cls, sid: str, **params: Unpack["Card.DeleteParams"] + cls, sid: str, **params: Unpack["CardDeleteParams"] ) -> Union["BankAccount", "Card"]: """ Delete a specified external account for a given account. @@ -197,7 +194,7 @@ def _cls_delete( @overload @staticmethod def delete( - sid: str, **params: Unpack["Card.DeleteParams"] + sid: str, **params: Unpack["CardDeleteParams"] ) -> Union["BankAccount", "Card"]: """ Delete a specified external account for a given account. @@ -206,7 +203,7 @@ def delete( @overload def delete( - self, **params: Unpack["Card.DeleteParams"] + self, **params: Unpack["CardDeleteParams"] ) -> Union["BankAccount", "Card"]: """ Delete a specified external account for a given account. @@ -215,7 +212,7 @@ def delete( @class_method_variant("_cls_delete") def delete( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Card.DeleteParams"] + self, **params: Unpack["CardDeleteParams"] ) -> Union["BankAccount", "Card"]: """ Delete a specified external account for a given account. @@ -228,7 +225,7 @@ def delete( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_delete_async( - cls, sid: str, **params: Unpack["Card.DeleteParams"] + cls, sid: str, **params: Unpack["CardDeleteParams"] ) -> Union["BankAccount", "Card"]: """ Delete a specified external account for a given account. @@ -246,7 +243,7 @@ async def _cls_delete_async( @overload @staticmethod async def delete_async( - sid: str, **params: Unpack["Card.DeleteParams"] + sid: str, **params: Unpack["CardDeleteParams"] ) -> Union["BankAccount", "Card"]: """ Delete a specified external account for a given account. @@ -255,7 +252,7 @@ async def delete_async( @overload async def delete_async( - self, **params: Unpack["Card.DeleteParams"] + self, **params: Unpack["CardDeleteParams"] ) -> Union["BankAccount", "Card"]: """ Delete a specified external account for a given account. @@ -264,7 +261,7 @@ async def delete_async( @class_method_variant("_cls_delete_async") async def delete_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Card.DeleteParams"] + self, **params: Unpack["CardDeleteParams"] ) -> Union["BankAccount", "Card"]: """ Delete a specified external account for a given account. diff --git a/stripe/_charge.py b/stripe/_charge.py index 703341b8d..f6c9757c8 100644 --- a/stripe/_charge.py +++ b/stripe/_charge.py @@ -5,7 +5,6 @@ from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource from stripe._nested_resource_class_methods import nested_resource_class_methods -from stripe._request_options import RequestOptions from stripe._search_result_object import SearchResultObject from stripe._searchable_api_resource import SearchableAPIResource from stripe._stripe_object import StripeObject @@ -22,13 +21,7 @@ cast, overload, ) -from typing_extensions import ( - Literal, - NotRequired, - TypedDict, - Unpack, - TYPE_CHECKING, -) +from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: from stripe._account import Account @@ -45,6 +38,18 @@ from stripe._review import Review from stripe._source import Source from stripe._transfer import Transfer + from stripe.params._charge_capture_params import ChargeCaptureParams + from stripe.params._charge_create_params import ChargeCreateParams + from stripe.params._charge_list_params import ChargeListParams + from stripe.params._charge_list_refunds_params import ( + ChargeListRefundsParams, + ) + from stripe.params._charge_modify_params import ChargeModifyParams + from stripe.params._charge_retrieve_params import ChargeRetrieveParams + from stripe.params._charge_retrieve_refund_params import ( + ChargeRetrieveRefundParams, + ) + from stripe.params._charge_search_params import ChargeSearchParams @nested_resource_class_methods("refund") @@ -2323,1780 +2328,6 @@ class TransferData(StripeObject): ID of an existing, connected Stripe account to transfer funds to if `transfer_data` was specified in the charge request. """ - class CaptureParams(RequestOptions): - amount: NotRequired[int] - """ - The amount to capture, which must be less than or equal to the original amount. - """ - application_fee: NotRequired[int] - """ - An application fee to add on to this charge. - """ - application_fee_amount: NotRequired[int] - """ - An application fee amount to add on to this charge, which must be less than or equal to the original amount. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - payment_details: NotRequired["Charge.CaptureParamsPaymentDetails"] - """ - Provides industry-specific information about the charge. - """ - receipt_email: NotRequired[str] - """ - The email address to send this charge's receipt to. This will override the previously-specified email address for this charge, if one was set. Receipts will not be sent in test mode. - """ - statement_descriptor: NotRequired[str] - """ - For a non-card charge, text that appears on the customer's statement as the statement descriptor. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see [the Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors). - - For a card charge, this value is ignored unless you don't specify a `statement_descriptor_suffix`, in which case this value is used as the suffix. - """ - statement_descriptor_suffix: NotRequired[str] - """ - Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. If the account has no prefix value, the suffix is concatenated to the account's statement descriptor. - """ - transfer_data: NotRequired["Charge.CaptureParamsTransferData"] - """ - An optional dictionary including the account to automatically transfer to as part of a destination charge. [See the Connect documentation](https://stripe.com/docs/connect/destination-charges) for details. - """ - transfer_group: NotRequired[str] - """ - A string that identifies this transaction as part of a group. `transfer_group` may only be provided if it has not been set. See the [Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-options) for details. - """ - - class CaptureParamsPaymentDetails(TypedDict): - car_rental: NotRequired["Charge.CaptureParamsPaymentDetailsCarRental"] - """ - Car rental details for this PaymentIntent. - """ - customer_reference: NotRequired["Literal['']|str"] - """ - Some customers might be required by their company or organization to provide this information. If so, provide this value. Otherwise you can ignore this field. - """ - event_details: NotRequired[ - "Charge.CaptureParamsPaymentDetailsEventDetails" - ] - """ - Event details for this PaymentIntent - """ - flight: NotRequired["Charge.CaptureParamsPaymentDetailsFlight"] - """ - Flight reservation details for this PaymentIntent - """ - lodging: NotRequired["Charge.CaptureParamsPaymentDetailsLodging"] - """ - Lodging reservation details for this PaymentIntent - """ - order_reference: NotRequired["Literal['']|str"] - """ - A unique value assigned by the business to identify the transaction. - """ - subscription: NotRequired[ - "Charge.CaptureParamsPaymentDetailsSubscription" - ] - """ - Subscription details for this PaymentIntent - """ - - class CaptureParamsPaymentDetailsCarRental(TypedDict): - affiliate: NotRequired[ - "Charge.CaptureParamsPaymentDetailsCarRentalAffiliate" - ] - """ - Affiliate details for this purchase. - """ - booking_number: str - """ - The booking number associated with the car rental. - """ - car_class_code: NotRequired[str] - """ - Class code of the car. - """ - car_make: NotRequired[str] - """ - Make of the car. - """ - car_model: NotRequired[str] - """ - Model of the car. - """ - company: NotRequired[str] - """ - The name of the rental car company. - """ - customer_service_phone_number: NotRequired[str] - """ - The customer service phone number of the car rental company. - """ - days_rented: int - """ - Number of days the car is being rented. - """ - delivery: NotRequired[ - "Charge.CaptureParamsPaymentDetailsCarRentalDelivery" - ] - """ - Delivery details for this purchase. - """ - distance: NotRequired[ - "Charge.CaptureParamsPaymentDetailsCarRentalDistance" - ] - """ - The details of the distance traveled during the rental period. - """ - drivers: NotRequired[ - List["Charge.CaptureParamsPaymentDetailsCarRentalDriver"] - ] - """ - The details of the passengers in the travel reservation - """ - extra_charges: NotRequired[ - List[ - Literal[ - "extra_mileage", - "gas", - "late_return", - "one_way_service", - "parking_violation", - ] - ] - ] - """ - List of additional charges being billed. - """ - no_show: NotRequired[bool] - """ - Indicates if the customer did not keep nor cancel their booking. - """ - pickup_address: NotRequired[ - "Charge.CaptureParamsPaymentDetailsCarRentalPickupAddress" - ] - """ - Car pick-up address. - """ - pickup_at: int - """ - Car pick-up time. Measured in seconds since the Unix epoch. - """ - pickup_location_name: NotRequired[str] - """ - Name of the pickup location. - """ - rate_amount: NotRequired[int] - """ - Rental rate. - """ - rate_interval: NotRequired[Literal["day", "month", "week"]] - """ - The frequency at which the rate amount is applied. One of `day`, `week` or `month` - """ - renter_name: NotRequired[str] - """ - The name of the person or entity renting the car. - """ - return_address: NotRequired[ - "Charge.CaptureParamsPaymentDetailsCarRentalReturnAddress" - ] - """ - Car return address. - """ - return_at: int - """ - Car return time. Measured in seconds since the Unix epoch. - """ - return_location_name: NotRequired[str] - """ - Name of the return location. - """ - tax_exempt: NotRequired[bool] - """ - Indicates whether the goods or services are tax-exempt or tax is not collected. - """ - vehicle_identification_number: NotRequired[str] - """ - The vehicle identification number. - """ - - class CaptureParamsPaymentDetailsCarRentalAffiliate(TypedDict): - name: str - """ - The name of the affiliate that originated the purchase. - """ - - class CaptureParamsPaymentDetailsCarRentalDelivery(TypedDict): - mode: NotRequired[Literal["email", "phone", "pickup", "post"]] - """ - The delivery method for the payment - """ - recipient: NotRequired[ - "Charge.CaptureParamsPaymentDetailsCarRentalDeliveryRecipient" - ] - """ - Details of the recipient. - """ - - class CaptureParamsPaymentDetailsCarRentalDeliveryRecipient(TypedDict): - email: NotRequired[str] - """ - The email of the recipient the ticket is delivered to. - """ - name: NotRequired[str] - """ - The name of the recipient the ticket is delivered to. - """ - phone: NotRequired[str] - """ - The phone number of the recipient the ticket is delivered to. - """ - - class CaptureParamsPaymentDetailsCarRentalDistance(TypedDict): - amount: NotRequired[int] - """ - Distance traveled. - """ - unit: NotRequired[Literal["kilometers", "miles"]] - """ - Unit of measurement for the distance traveled. One of `miles` or `kilometers`. - """ - - class CaptureParamsPaymentDetailsCarRentalDriver(TypedDict): - driver_identification_number: NotRequired[str] - """ - Driver's identification number. - """ - driver_tax_number: NotRequired[str] - """ - Driver's tax number. - """ - name: str - """ - Full name of the person or entity on the car reservation. - """ - - class CaptureParamsPaymentDetailsCarRentalPickupAddress(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. - """ - - class CaptureParamsPaymentDetailsCarRentalReturnAddress(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. - """ - - class CaptureParamsPaymentDetailsEventDetails(TypedDict): - access_controlled_venue: NotRequired[bool] - """ - Indicates if the tickets are digitally checked when entering the venue. - """ - address: NotRequired[ - "Charge.CaptureParamsPaymentDetailsEventDetailsAddress" - ] - """ - The event location's address. - """ - affiliate: NotRequired[ - "Charge.CaptureParamsPaymentDetailsEventDetailsAffiliate" - ] - """ - Affiliate details for this purchase. - """ - company: NotRequired[str] - """ - The name of the company - """ - delivery: NotRequired[ - "Charge.CaptureParamsPaymentDetailsEventDetailsDelivery" - ] - """ - Delivery details for this purchase. - """ - ends_at: NotRequired[int] - """ - Event end time. Measured in seconds since the Unix epoch. - """ - genre: NotRequired[str] - """ - Type of the event entertainment (concert, sports event etc) - """ - name: str - """ - The name of the event. - """ - starts_at: NotRequired[int] - """ - Event start time. Measured in seconds since the Unix epoch. - """ - - class CaptureParamsPaymentDetailsEventDetailsAddress(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. - """ - - class CaptureParamsPaymentDetailsEventDetailsAffiliate(TypedDict): - name: str - """ - The name of the affiliate that originated the purchase. - """ - - class CaptureParamsPaymentDetailsEventDetailsDelivery(TypedDict): - mode: NotRequired[Literal["email", "phone", "pickup", "post"]] - """ - The delivery method for the payment - """ - recipient: NotRequired[ - "Charge.CaptureParamsPaymentDetailsEventDetailsDeliveryRecipient" - ] - """ - Details of the recipient. - """ - - class CaptureParamsPaymentDetailsEventDetailsDeliveryRecipient(TypedDict): - email: NotRequired[str] - """ - The email of the recipient the ticket is delivered to. - """ - name: NotRequired[str] - """ - The name of the recipient the ticket is delivered to. - """ - phone: NotRequired[str] - """ - The phone number of the recipient the ticket is delivered to. - """ - - class CaptureParamsPaymentDetailsFlight(TypedDict): - affiliate: NotRequired[ - "Charge.CaptureParamsPaymentDetailsFlightAffiliate" - ] - """ - Affiliate details for this purchase. - """ - agency_number: NotRequired[str] - """ - The agency number (i.e. International Air Transport Association (IATA) agency number) of the travel agency that made the booking. - """ - carrier: NotRequired[str] - """ - The International Air Transport Association (IATA) carrier code of the carrier that issued the ticket. - """ - delivery: NotRequired[ - "Charge.CaptureParamsPaymentDetailsFlightDelivery" - ] - """ - Delivery details for this purchase. - """ - passenger_name: NotRequired[str] - """ - The name of the person or entity on the reservation. - """ - passengers: NotRequired[ - List["Charge.CaptureParamsPaymentDetailsFlightPassenger"] - ] - """ - The details of the passengers in the travel reservation. - """ - segments: List["Charge.CaptureParamsPaymentDetailsFlightSegment"] - """ - The individual flight segments associated with the trip. - """ - ticket_number: NotRequired[str] - """ - The ticket number associated with the travel reservation. - """ - - class CaptureParamsPaymentDetailsFlightAffiliate(TypedDict): - name: str - """ - The name of the affiliate that originated the purchase. - """ - - class CaptureParamsPaymentDetailsFlightDelivery(TypedDict): - mode: NotRequired[Literal["email", "phone", "pickup", "post"]] - """ - The delivery method for the payment - """ - recipient: NotRequired[ - "Charge.CaptureParamsPaymentDetailsFlightDeliveryRecipient" - ] - """ - Details of the recipient. - """ - - class CaptureParamsPaymentDetailsFlightDeliveryRecipient(TypedDict): - email: NotRequired[str] - """ - The email of the recipient the ticket is delivered to. - """ - name: NotRequired[str] - """ - The name of the recipient the ticket is delivered to. - """ - phone: NotRequired[str] - """ - The phone number of the recipient the ticket is delivered to. - """ - - class CaptureParamsPaymentDetailsFlightPassenger(TypedDict): - name: str - """ - Full name of the person or entity on the flight reservation. - """ - - class CaptureParamsPaymentDetailsFlightSegment(TypedDict): - amount: NotRequired[int] - """ - The flight segment amount. - """ - arrival_airport: NotRequired[str] - """ - The International Air Transport Association (IATA) airport code for the arrival airport. - """ - arrives_at: NotRequired[int] - """ - The arrival time for the flight segment. Measured in seconds since the Unix epoch. - """ - carrier: NotRequired[str] - """ - The International Air Transport Association (IATA) carrier code of the carrier operating the flight segment. - """ - departs_at: int - """ - The departure time for the flight segment. Measured in seconds since the Unix epoch. - """ - departure_airport: NotRequired[str] - """ - The International Air Transport Association (IATA) airport code for the departure airport. - """ - flight_number: NotRequired[str] - """ - The flight number associated with the segment - """ - service_class: NotRequired[ - Literal["business", "economy", "first", "premium_economy"] - ] - """ - The fare class for the segment. - """ - - class CaptureParamsPaymentDetailsLodging(TypedDict): - address: NotRequired[ - "Charge.CaptureParamsPaymentDetailsLodgingAddress" - ] - """ - The lodging location's address. - """ - adults: NotRequired[int] - """ - The number of adults on the booking - """ - affiliate: NotRequired[ - "Charge.CaptureParamsPaymentDetailsLodgingAffiliate" - ] - """ - Affiliate details for this purchase. - """ - booking_number: NotRequired[str] - """ - The booking number associated with the lodging reservation. - """ - category: NotRequired[Literal["hotel", "vacation_rental"]] - """ - The lodging category - """ - checkin_at: int - """ - Lodging check-in time. Measured in seconds since the Unix epoch. - """ - checkout_at: int - """ - Lodging check-out time. Measured in seconds since the Unix epoch. - """ - customer_service_phone_number: NotRequired[str] - """ - The customer service phone number of the lodging company. - """ - daily_room_rate_amount: NotRequired[int] - """ - The daily lodging room rate. - """ - delivery: NotRequired[ - "Charge.CaptureParamsPaymentDetailsLodgingDelivery" - ] - """ - Delivery details for this purchase. - """ - extra_charges: NotRequired[ - List[ - Literal[ - "gift_shop", - "laundry", - "mini_bar", - "other", - "restaurant", - "telephone", - ] - ] - ] - """ - List of additional charges being billed. - """ - fire_safety_act_compliance: NotRequired[bool] - """ - Indicates whether the lodging location is compliant with the Fire Safety Act. - """ - name: NotRequired[str] - """ - The name of the lodging location. - """ - no_show: NotRequired[bool] - """ - Indicates if the customer did not keep their booking while failing to cancel the reservation. - """ - number_of_rooms: NotRequired[int] - """ - The number of rooms on the booking - """ - passengers: NotRequired[ - List["Charge.CaptureParamsPaymentDetailsLodgingPassenger"] - ] - """ - The details of the passengers in the travel reservation - """ - property_phone_number: NotRequired[str] - """ - The phone number of the lodging location. - """ - room_class: NotRequired[str] - """ - The room class for this purchase. - """ - room_nights: NotRequired[int] - """ - The number of room nights - """ - total_room_tax_amount: NotRequired[int] - """ - The total tax amount associating with the room reservation. - """ - total_tax_amount: NotRequired[int] - """ - The total tax amount - """ - - class CaptureParamsPaymentDetailsLodgingAddress(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. - """ - - class CaptureParamsPaymentDetailsLodgingAffiliate(TypedDict): - name: str - """ - The name of the affiliate that originated the purchase. - """ - - class CaptureParamsPaymentDetailsLodgingDelivery(TypedDict): - mode: NotRequired[Literal["email", "phone", "pickup", "post"]] - """ - The delivery method for the payment - """ - recipient: NotRequired[ - "Charge.CaptureParamsPaymentDetailsLodgingDeliveryRecipient" - ] - """ - Details of the recipient. - """ - - class CaptureParamsPaymentDetailsLodgingDeliveryRecipient(TypedDict): - email: NotRequired[str] - """ - The email of the recipient the ticket is delivered to. - """ - name: NotRequired[str] - """ - The name of the recipient the ticket is delivered to. - """ - phone: NotRequired[str] - """ - The phone number of the recipient the ticket is delivered to. - """ - - class CaptureParamsPaymentDetailsLodgingPassenger(TypedDict): - name: str - """ - Full name of the person or entity on the lodging reservation. - """ - - class CaptureParamsPaymentDetailsSubscription(TypedDict): - affiliate: NotRequired[ - "Charge.CaptureParamsPaymentDetailsSubscriptionAffiliate" - ] - """ - Affiliate details for this purchase. - """ - auto_renewal: NotRequired[bool] - """ - Info whether the subscription will be auto renewed upon expiry. - """ - billing_interval: NotRequired[ - "Charge.CaptureParamsPaymentDetailsSubscriptionBillingInterval" - ] - """ - Subscription billing details for this purchase. - """ - ends_at: NotRequired[int] - """ - Subscription end time. Measured in seconds since the Unix epoch. - """ - name: str - """ - Name of the product on subscription. e.g. Apple Music Subscription - """ - starts_at: NotRequired[int] - """ - Subscription start time. Measured in seconds since the Unix epoch. - """ - - class CaptureParamsPaymentDetailsSubscriptionAffiliate(TypedDict): - name: str - """ - The name of the affiliate that originated the purchase. - """ - - class CaptureParamsPaymentDetailsSubscriptionBillingInterval(TypedDict): - count: int - """ - The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. - """ - interval: Literal["day", "month", "week", "year"] - """ - Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. - """ - - class CaptureParamsTransferData(TypedDict): - amount: NotRequired[int] - """ - The amount transferred to the destination account, if specified. By default, the entire charge amount is transferred to the destination account. - """ - - class CreateParams(RequestOptions): - amount: NotRequired[int] - """ - Amount intended to be collected by this payment. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). - """ - application_fee: NotRequired[int] - application_fee_amount: NotRequired[int] - """ - A fee in cents (or local equivalent) that will be applied to the charge and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the `Stripe-Account` header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/connect/direct-charges#collect-fees). - """ - capture: NotRequired[bool] - """ - Whether to immediately capture the charge. Defaults to `true`. When `false`, the charge issues an authorization (or pre-authorization), and will need to be [captured](https://stripe.com/docs/api#capture_charge) later. Uncaptured charges expire after a set number of days (7 by default). For more information, see the [authorizing charges and settling later](https://stripe.com/docs/charges/placing-a-hold) documentation. - """ - currency: NotRequired[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). - """ - customer: NotRequired[str] - """ - The ID of an existing customer that will be charged in this request. - """ - description: NotRequired[str] - """ - An arbitrary string which you can attach to a `Charge` object. It is displayed when in the web interface alongside the charge. Note that if you use Stripe to send automatic email receipts to your customers, your receipt emails will include the `description` of the charge(s) that they are describing. - """ - destination: NotRequired["Charge.CreateParamsDestination"] - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - on_behalf_of: NotRequired[str] - """ - The Stripe account ID for which these funds are intended. Automatically set if you use the `destination` parameter. For details, see [Creating Separate Charges and Transfers](https://stripe.com/docs/connect/separate-charges-and-transfers#settlement-merchant). - """ - radar_options: NotRequired["Charge.CreateParamsRadarOptions"] - """ - Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. - """ - receipt_email: NotRequired[str] - """ - The email address to which this charge's [receipt](https://stripe.com/docs/dashboard/receipts) will be sent. The receipt will not be sent until the charge is paid, and no receipts will be sent for test mode charges. If this charge is for a [Customer](https://stripe.com/docs/api/customers/object), the email address specified here will override the customer's email address. If `receipt_email` is specified for a charge in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). - """ - shipping: NotRequired["Charge.CreateParamsShipping"] - """ - Shipping information for the charge. Helps prevent fraud on charges for physical goods. - """ - source: NotRequired[str] - """ - A payment source to be charged. This can be the ID of a [card](https://stripe.com/docs/api#cards) (i.e., credit or debit card), a [bank account](https://stripe.com/docs/api#bank_accounts), a [source](https://stripe.com/docs/api#sources), a [token](https://stripe.com/docs/api#tokens), or a [connected account](https://stripe.com/docs/connect/account-debits#charging-a-connected-account). For certain sources---namely, [cards](https://stripe.com/docs/api#cards), [bank accounts](https://stripe.com/docs/api#bank_accounts), and attached [sources](https://stripe.com/docs/api#sources)---you must also pass the ID of the associated customer. - """ - statement_descriptor: NotRequired[str] - """ - For a non-card charge, text that appears on the customer's statement as the statement descriptor. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see [the Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors). - - For a card charge, this value is ignored unless you don't specify a `statement_descriptor_suffix`, in which case this value is used as the suffix. - """ - statement_descriptor_suffix: NotRequired[str] - """ - Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. If the account has no prefix value, the suffix is concatenated to the account's statement descriptor. - """ - transfer_data: NotRequired["Charge.CreateParamsTransferData"] - """ - An optional dictionary including the account to automatically transfer to as part of a destination charge. [See the Connect documentation](https://stripe.com/docs/connect/destination-charges) for details. - """ - transfer_group: NotRequired[str] - """ - A string that identifies this transaction as part of a group. For details, see [Grouping transactions](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-options). - """ - - class CreateParamsDestination(TypedDict): - account: str - """ - ID of an existing, connected Stripe account. - """ - amount: NotRequired[int] - """ - The amount to transfer to the destination account without creating an `Application Fee` object. Cannot be combined with the `application_fee` parameter. Must be less than or equal to the charge amount. - """ - - class CreateParamsRadarOptions(TypedDict): - session: NotRequired[str] - """ - A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. - """ - - class CreateParamsShipping(TypedDict): - address: "Charge.CreateParamsShippingAddress" - """ - Shipping address. - """ - carrier: NotRequired[str] - """ - The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. - """ - name: str - """ - Recipient name. - """ - phone: NotRequired[str] - """ - Recipient phone (including extension). - """ - tracking_number: NotRequired[str] - """ - The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. - """ - - class CreateParamsShippingAddress(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. - """ - - class CreateParamsTransferData(TypedDict): - amount: NotRequired[int] - """ - The amount transferred to the destination account, if specified. By default, the entire charge amount is transferred to the destination account. - """ - destination: str - """ - ID of an existing, connected Stripe account. - """ - - class ListParams(RequestOptions): - created: NotRequired["Charge.ListParamsCreated|int"] - """ - Only return charges that were created during the given date interval. - """ - customer: NotRequired[str] - """ - Only return charges for the customer specified by this customer ID. - """ - 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. - """ - payment_intent: NotRequired[str] - """ - Only return charges that were created by the PaymentIntent specified by this PaymentIntent ID. - """ - 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. - """ - transfer_group: NotRequired[str] - """ - Only return charges for this transfer group, limited to 100. - """ - - class ListParamsCreated(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) - """ - - class ListRefundsParams(RequestOptions): - 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 ModifyParams(RequestOptions): - customer: NotRequired[str] - """ - The ID of an existing customer that will be associated with this request. This field may only be updated if there is no existing associated customer with this charge. - """ - description: NotRequired[str] - """ - An arbitrary string which you can attach to a charge object. It is displayed when in the web interface alongside the charge. Note that if you use Stripe to send automatic email receipts to your customers, your receipt emails will include the `description` of the charge(s) that they are describing. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - fraud_details: NotRequired["Charge.ModifyParamsFraudDetails"] - """ - A set of key-value pairs you can attach to a charge giving information about its riskiness. If you believe a charge is fraudulent, include a `user_report` key with a value of `fraudulent`. If you believe a charge is safe, include a `user_report` key with a value of `safe`. Stripe will use the information you send to improve our fraud detection algorithms. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - payment_details: NotRequired["Charge.ModifyParamsPaymentDetails"] - """ - Provides industry-specific information about the charge. - """ - receipt_email: NotRequired[str] - """ - This is the email address that the receipt for this charge will be sent to. If this field is updated, then a new email receipt will be sent to the updated address. - """ - shipping: NotRequired["Charge.ModifyParamsShipping"] - """ - Shipping information for the charge. Helps prevent fraud on charges for physical goods. - """ - transfer_group: NotRequired[str] - """ - A string that identifies this transaction as part of a group. `transfer_group` may only be provided if it has not been set. See the [Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-options) for details. - """ - - class ModifyParamsFraudDetails(TypedDict): - user_report: Union[Literal[""], Literal["fraudulent", "safe"]] - """ - Either `safe` or `fraudulent`. - """ - - class ModifyParamsPaymentDetails(TypedDict): - car_rental: NotRequired["Charge.ModifyParamsPaymentDetailsCarRental"] - """ - Car rental details for this PaymentIntent. - """ - customer_reference: NotRequired["Literal['']|str"] - """ - Some customers might be required by their company or organization to provide this information. If so, provide this value. Otherwise you can ignore this field. - """ - event_details: NotRequired[ - "Charge.ModifyParamsPaymentDetailsEventDetails" - ] - """ - Event details for this PaymentIntent - """ - flight: NotRequired["Charge.ModifyParamsPaymentDetailsFlight"] - """ - Flight reservation details for this PaymentIntent - """ - lodging: NotRequired["Charge.ModifyParamsPaymentDetailsLodging"] - """ - Lodging reservation details for this PaymentIntent - """ - order_reference: NotRequired["Literal['']|str"] - """ - A unique value assigned by the business to identify the transaction. - """ - subscription: NotRequired[ - "Charge.ModifyParamsPaymentDetailsSubscription" - ] - """ - Subscription details for this PaymentIntent - """ - - class ModifyParamsPaymentDetailsCarRental(TypedDict): - affiliate: NotRequired[ - "Charge.ModifyParamsPaymentDetailsCarRentalAffiliate" - ] - """ - Affiliate details for this purchase. - """ - booking_number: str - """ - The booking number associated with the car rental. - """ - car_class_code: NotRequired[str] - """ - Class code of the car. - """ - car_make: NotRequired[str] - """ - Make of the car. - """ - car_model: NotRequired[str] - """ - Model of the car. - """ - company: NotRequired[str] - """ - The name of the rental car company. - """ - customer_service_phone_number: NotRequired[str] - """ - The customer service phone number of the car rental company. - """ - days_rented: int - """ - Number of days the car is being rented. - """ - delivery: NotRequired[ - "Charge.ModifyParamsPaymentDetailsCarRentalDelivery" - ] - """ - Delivery details for this purchase. - """ - distance: NotRequired[ - "Charge.ModifyParamsPaymentDetailsCarRentalDistance" - ] - """ - The details of the distance traveled during the rental period. - """ - drivers: NotRequired[ - List["Charge.ModifyParamsPaymentDetailsCarRentalDriver"] - ] - """ - The details of the passengers in the travel reservation - """ - extra_charges: NotRequired[ - List[ - Literal[ - "extra_mileage", - "gas", - "late_return", - "one_way_service", - "parking_violation", - ] - ] - ] - """ - List of additional charges being billed. - """ - no_show: NotRequired[bool] - """ - Indicates if the customer did not keep nor cancel their booking. - """ - pickup_address: NotRequired[ - "Charge.ModifyParamsPaymentDetailsCarRentalPickupAddress" - ] - """ - Car pick-up address. - """ - pickup_at: int - """ - Car pick-up time. Measured in seconds since the Unix epoch. - """ - pickup_location_name: NotRequired[str] - """ - Name of the pickup location. - """ - rate_amount: NotRequired[int] - """ - Rental rate. - """ - rate_interval: NotRequired[Literal["day", "month", "week"]] - """ - The frequency at which the rate amount is applied. One of `day`, `week` or `month` - """ - renter_name: NotRequired[str] - """ - The name of the person or entity renting the car. - """ - return_address: NotRequired[ - "Charge.ModifyParamsPaymentDetailsCarRentalReturnAddress" - ] - """ - Car return address. - """ - return_at: int - """ - Car return time. Measured in seconds since the Unix epoch. - """ - return_location_name: NotRequired[str] - """ - Name of the return location. - """ - tax_exempt: NotRequired[bool] - """ - Indicates whether the goods or services are tax-exempt or tax is not collected. - """ - vehicle_identification_number: NotRequired[str] - """ - The vehicle identification number. - """ - - class ModifyParamsPaymentDetailsCarRentalAffiliate(TypedDict): - name: str - """ - The name of the affiliate that originated the purchase. - """ - - class ModifyParamsPaymentDetailsCarRentalDelivery(TypedDict): - mode: NotRequired[Literal["email", "phone", "pickup", "post"]] - """ - The delivery method for the payment - """ - recipient: NotRequired[ - "Charge.ModifyParamsPaymentDetailsCarRentalDeliveryRecipient" - ] - """ - Details of the recipient. - """ - - class ModifyParamsPaymentDetailsCarRentalDeliveryRecipient(TypedDict): - email: NotRequired[str] - """ - The email of the recipient the ticket is delivered to. - """ - name: NotRequired[str] - """ - The name of the recipient the ticket is delivered to. - """ - phone: NotRequired[str] - """ - The phone number of the recipient the ticket is delivered to. - """ - - class ModifyParamsPaymentDetailsCarRentalDistance(TypedDict): - amount: NotRequired[int] - """ - Distance traveled. - """ - unit: NotRequired[Literal["kilometers", "miles"]] - """ - Unit of measurement for the distance traveled. One of `miles` or `kilometers`. - """ - - class ModifyParamsPaymentDetailsCarRentalDriver(TypedDict): - driver_identification_number: NotRequired[str] - """ - Driver's identification number. - """ - driver_tax_number: NotRequired[str] - """ - Driver's tax number. - """ - name: str - """ - Full name of the person or entity on the car reservation. - """ - - class ModifyParamsPaymentDetailsCarRentalPickupAddress(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. - """ - - class ModifyParamsPaymentDetailsCarRentalReturnAddress(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. - """ - - class ModifyParamsPaymentDetailsEventDetails(TypedDict): - access_controlled_venue: NotRequired[bool] - """ - Indicates if the tickets are digitally checked when entering the venue. - """ - address: NotRequired[ - "Charge.ModifyParamsPaymentDetailsEventDetailsAddress" - ] - """ - The event location's address. - """ - affiliate: NotRequired[ - "Charge.ModifyParamsPaymentDetailsEventDetailsAffiliate" - ] - """ - Affiliate details for this purchase. - """ - company: NotRequired[str] - """ - The name of the company - """ - delivery: NotRequired[ - "Charge.ModifyParamsPaymentDetailsEventDetailsDelivery" - ] - """ - Delivery details for this purchase. - """ - ends_at: NotRequired[int] - """ - Event end time. Measured in seconds since the Unix epoch. - """ - genre: NotRequired[str] - """ - Type of the event entertainment (concert, sports event etc) - """ - name: str - """ - The name of the event. - """ - starts_at: NotRequired[int] - """ - Event start time. Measured in seconds since the Unix epoch. - """ - - class ModifyParamsPaymentDetailsEventDetailsAddress(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. - """ - - class ModifyParamsPaymentDetailsEventDetailsAffiliate(TypedDict): - name: str - """ - The name of the affiliate that originated the purchase. - """ - - class ModifyParamsPaymentDetailsEventDetailsDelivery(TypedDict): - mode: NotRequired[Literal["email", "phone", "pickup", "post"]] - """ - The delivery method for the payment - """ - recipient: NotRequired[ - "Charge.ModifyParamsPaymentDetailsEventDetailsDeliveryRecipient" - ] - """ - Details of the recipient. - """ - - class ModifyParamsPaymentDetailsEventDetailsDeliveryRecipient(TypedDict): - email: NotRequired[str] - """ - The email of the recipient the ticket is delivered to. - """ - name: NotRequired[str] - """ - The name of the recipient the ticket is delivered to. - """ - phone: NotRequired[str] - """ - The phone number of the recipient the ticket is delivered to. - """ - - class ModifyParamsPaymentDetailsFlight(TypedDict): - affiliate: NotRequired[ - "Charge.ModifyParamsPaymentDetailsFlightAffiliate" - ] - """ - Affiliate details for this purchase. - """ - agency_number: NotRequired[str] - """ - The agency number (i.e. International Air Transport Association (IATA) agency number) of the travel agency that made the booking. - """ - carrier: NotRequired[str] - """ - The International Air Transport Association (IATA) carrier code of the carrier that issued the ticket. - """ - delivery: NotRequired[ - "Charge.ModifyParamsPaymentDetailsFlightDelivery" - ] - """ - Delivery details for this purchase. - """ - passenger_name: NotRequired[str] - """ - The name of the person or entity on the reservation. - """ - passengers: NotRequired[ - List["Charge.ModifyParamsPaymentDetailsFlightPassenger"] - ] - """ - The details of the passengers in the travel reservation. - """ - segments: List["Charge.ModifyParamsPaymentDetailsFlightSegment"] - """ - The individual flight segments associated with the trip. - """ - ticket_number: NotRequired[str] - """ - The ticket number associated with the travel reservation. - """ - - class ModifyParamsPaymentDetailsFlightAffiliate(TypedDict): - name: str - """ - The name of the affiliate that originated the purchase. - """ - - class ModifyParamsPaymentDetailsFlightDelivery(TypedDict): - mode: NotRequired[Literal["email", "phone", "pickup", "post"]] - """ - The delivery method for the payment - """ - recipient: NotRequired[ - "Charge.ModifyParamsPaymentDetailsFlightDeliveryRecipient" - ] - """ - Details of the recipient. - """ - - class ModifyParamsPaymentDetailsFlightDeliveryRecipient(TypedDict): - email: NotRequired[str] - """ - The email of the recipient the ticket is delivered to. - """ - name: NotRequired[str] - """ - The name of the recipient the ticket is delivered to. - """ - phone: NotRequired[str] - """ - The phone number of the recipient the ticket is delivered to. - """ - - class ModifyParamsPaymentDetailsFlightPassenger(TypedDict): - name: str - """ - Full name of the person or entity on the flight reservation. - """ - - class ModifyParamsPaymentDetailsFlightSegment(TypedDict): - amount: NotRequired[int] - """ - The flight segment amount. - """ - arrival_airport: NotRequired[str] - """ - The International Air Transport Association (IATA) airport code for the arrival airport. - """ - arrives_at: NotRequired[int] - """ - The arrival time for the flight segment. Measured in seconds since the Unix epoch. - """ - carrier: NotRequired[str] - """ - The International Air Transport Association (IATA) carrier code of the carrier operating the flight segment. - """ - departs_at: int - """ - The departure time for the flight segment. Measured in seconds since the Unix epoch. - """ - departure_airport: NotRequired[str] - """ - The International Air Transport Association (IATA) airport code for the departure airport. - """ - flight_number: NotRequired[str] - """ - The flight number associated with the segment - """ - service_class: NotRequired[ - Literal["business", "economy", "first", "premium_economy"] - ] - """ - The fare class for the segment. - """ - - class ModifyParamsPaymentDetailsLodging(TypedDict): - address: NotRequired["Charge.ModifyParamsPaymentDetailsLodgingAddress"] - """ - The lodging location's address. - """ - adults: NotRequired[int] - """ - The number of adults on the booking - """ - affiliate: NotRequired[ - "Charge.ModifyParamsPaymentDetailsLodgingAffiliate" - ] - """ - Affiliate details for this purchase. - """ - booking_number: NotRequired[str] - """ - The booking number associated with the lodging reservation. - """ - category: NotRequired[Literal["hotel", "vacation_rental"]] - """ - The lodging category - """ - checkin_at: int - """ - Lodging check-in time. Measured in seconds since the Unix epoch. - """ - checkout_at: int - """ - Lodging check-out time. Measured in seconds since the Unix epoch. - """ - customer_service_phone_number: NotRequired[str] - """ - The customer service phone number of the lodging company. - """ - daily_room_rate_amount: NotRequired[int] - """ - The daily lodging room rate. - """ - delivery: NotRequired[ - "Charge.ModifyParamsPaymentDetailsLodgingDelivery" - ] - """ - Delivery details for this purchase. - """ - extra_charges: NotRequired[ - List[ - Literal[ - "gift_shop", - "laundry", - "mini_bar", - "other", - "restaurant", - "telephone", - ] - ] - ] - """ - List of additional charges being billed. - """ - fire_safety_act_compliance: NotRequired[bool] - """ - Indicates whether the lodging location is compliant with the Fire Safety Act. - """ - name: NotRequired[str] - """ - The name of the lodging location. - """ - no_show: NotRequired[bool] - """ - Indicates if the customer did not keep their booking while failing to cancel the reservation. - """ - number_of_rooms: NotRequired[int] - """ - The number of rooms on the booking - """ - passengers: NotRequired[ - List["Charge.ModifyParamsPaymentDetailsLodgingPassenger"] - ] - """ - The details of the passengers in the travel reservation - """ - property_phone_number: NotRequired[str] - """ - The phone number of the lodging location. - """ - room_class: NotRequired[str] - """ - The room class for this purchase. - """ - room_nights: NotRequired[int] - """ - The number of room nights - """ - total_room_tax_amount: NotRequired[int] - """ - The total tax amount associating with the room reservation. - """ - total_tax_amount: NotRequired[int] - """ - The total tax amount - """ - - class ModifyParamsPaymentDetailsLodgingAddress(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. - """ - - class ModifyParamsPaymentDetailsLodgingAffiliate(TypedDict): - name: str - """ - The name of the affiliate that originated the purchase. - """ - - class ModifyParamsPaymentDetailsLodgingDelivery(TypedDict): - mode: NotRequired[Literal["email", "phone", "pickup", "post"]] - """ - The delivery method for the payment - """ - recipient: NotRequired[ - "Charge.ModifyParamsPaymentDetailsLodgingDeliveryRecipient" - ] - """ - Details of the recipient. - """ - - class ModifyParamsPaymentDetailsLodgingDeliveryRecipient(TypedDict): - email: NotRequired[str] - """ - The email of the recipient the ticket is delivered to. - """ - name: NotRequired[str] - """ - The name of the recipient the ticket is delivered to. - """ - phone: NotRequired[str] - """ - The phone number of the recipient the ticket is delivered to. - """ - - class ModifyParamsPaymentDetailsLodgingPassenger(TypedDict): - name: str - """ - Full name of the person or entity on the lodging reservation. - """ - - class ModifyParamsPaymentDetailsSubscription(TypedDict): - affiliate: NotRequired[ - "Charge.ModifyParamsPaymentDetailsSubscriptionAffiliate" - ] - """ - Affiliate details for this purchase. - """ - auto_renewal: NotRequired[bool] - """ - Info whether the subscription will be auto renewed upon expiry. - """ - billing_interval: NotRequired[ - "Charge.ModifyParamsPaymentDetailsSubscriptionBillingInterval" - ] - """ - Subscription billing details for this purchase. - """ - ends_at: NotRequired[int] - """ - Subscription end time. Measured in seconds since the Unix epoch. - """ - name: str - """ - Name of the product on subscription. e.g. Apple Music Subscription - """ - starts_at: NotRequired[int] - """ - Subscription start time. Measured in seconds since the Unix epoch. - """ - - class ModifyParamsPaymentDetailsSubscriptionAffiliate(TypedDict): - name: str - """ - The name of the affiliate that originated the purchase. - """ - - class ModifyParamsPaymentDetailsSubscriptionBillingInterval(TypedDict): - count: int - """ - The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. - """ - interval: Literal["day", "month", "week", "year"] - """ - Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. - """ - - class ModifyParamsShipping(TypedDict): - address: "Charge.ModifyParamsShippingAddress" - """ - Shipping address. - """ - carrier: NotRequired[str] - """ - The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. - """ - name: str - """ - Recipient name. - """ - phone: NotRequired[str] - """ - Recipient phone (including extension). - """ - tracking_number: NotRequired[str] - """ - The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. - """ - - class ModifyParamsShippingAddress(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. - """ - - class RetrieveParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class RetrieveRefundParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class SearchParams(RequestOptions): - 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. - """ - page: NotRequired[str] - """ - A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. - """ - query: str - """ - The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for charges](https://stripe.com/docs/search#query-fields-for-charges). - """ - amount: int """ Amount intended to be collected by this payment. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). @@ -4287,7 +2518,7 @@ class SearchParams(RequestOptions): @classmethod def _cls_capture( - cls, charge: str, **params: Unpack["Charge.CaptureParams"] + cls, charge: str, **params: Unpack["ChargeCaptureParams"] ) -> "Charge": """ Capture the payment of an existing, uncaptured charge that was created with the capture option set to false. @@ -4310,7 +2541,7 @@ def _cls_capture( @overload @staticmethod def capture( - charge: str, **params: Unpack["Charge.CaptureParams"] + charge: str, **params: Unpack["ChargeCaptureParams"] ) -> "Charge": """ Capture the payment of an existing, uncaptured charge that was created with the capture option set to false. @@ -4322,7 +2553,7 @@ def capture( ... @overload - def capture(self, **params: Unpack["Charge.CaptureParams"]) -> "Charge": + def capture(self, **params: Unpack["ChargeCaptureParams"]) -> "Charge": """ Capture the payment of an existing, uncaptured charge that was created with the capture option set to false. @@ -4334,7 +2565,7 @@ def capture(self, **params: Unpack["Charge.CaptureParams"]) -> "Charge": @class_method_variant("_cls_capture") def capture( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Charge.CaptureParams"] + self, **params: Unpack["ChargeCaptureParams"] ) -> "Charge": """ Capture the payment of an existing, uncaptured charge that was created with the capture option set to false. @@ -4356,7 +2587,7 @@ def capture( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_capture_async( - cls, charge: str, **params: Unpack["Charge.CaptureParams"] + cls, charge: str, **params: Unpack["ChargeCaptureParams"] ) -> "Charge": """ Capture the payment of an existing, uncaptured charge that was created with the capture option set to false. @@ -4379,7 +2610,7 @@ async def _cls_capture_async( @overload @staticmethod async def capture_async( - charge: str, **params: Unpack["Charge.CaptureParams"] + charge: str, **params: Unpack["ChargeCaptureParams"] ) -> "Charge": """ Capture the payment of an existing, uncaptured charge that was created with the capture option set to false. @@ -4392,7 +2623,7 @@ async def capture_async( @overload async def capture_async( - self, **params: Unpack["Charge.CaptureParams"] + self, **params: Unpack["ChargeCaptureParams"] ) -> "Charge": """ Capture the payment of an existing, uncaptured charge that was created with the capture option set to false. @@ -4405,7 +2636,7 @@ async def capture_async( @class_method_variant("_cls_capture_async") async def capture_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Charge.CaptureParams"] + self, **params: Unpack["ChargeCaptureParams"] ) -> "Charge": """ Capture the payment of an existing, uncaptured charge that was created with the capture option set to false. @@ -4426,7 +2657,7 @@ async def capture_async( # pyright: ignore[reportGeneralTypeIssues] ) @classmethod - def create(cls, **params: Unpack["Charge.CreateParams"]) -> "Charge": + def create(cls, **params: Unpack["ChargeCreateParams"]) -> "Charge": """ This method is no longer recommended—use the [Payment Intents API](https://docs.stripe.com/docs/api/payment_intents) to initiate a new payment instead. Confirmation of the PaymentIntent creates the Charge @@ -4443,7 +2674,7 @@ def create(cls, **params: Unpack["Charge.CreateParams"]) -> "Charge": @classmethod async def create_async( - cls, **params: Unpack["Charge.CreateParams"] + cls, **params: Unpack["ChargeCreateParams"] ) -> "Charge": """ This method is no longer recommended—use the [Payment Intents API](https://docs.stripe.com/docs/api/payment_intents) @@ -4461,7 +2692,7 @@ async def create_async( @classmethod def list( - cls, **params: Unpack["Charge.ListParams"] + cls, **params: Unpack["ChargeListParams"] ) -> ListObject["Charge"]: """ Returns a list of charges you've previously created. The charges are returned in sorted order, with the most recent charges appearing first. @@ -4481,7 +2712,7 @@ def list( @classmethod async def list_async( - cls, **params: Unpack["Charge.ListParams"] + cls, **params: Unpack["ChargeListParams"] ) -> ListObject["Charge"]: """ Returns a list of charges you've previously created. The charges are returned in sorted order, with the most recent charges appearing first. @@ -4501,7 +2732,7 @@ async def list_async( @classmethod def modify( - cls, id: str, **params: Unpack["Charge.ModifyParams"] + cls, id: str, **params: Unpack["ChargeModifyParams"] ) -> "Charge": """ Updates the specified charge by setting the values of the parameters passed. Any parameters not provided will be left unchanged. @@ -4518,7 +2749,7 @@ def modify( @classmethod async def modify_async( - cls, id: str, **params: Unpack["Charge.ModifyParams"] + cls, id: str, **params: Unpack["ChargeModifyParams"] ) -> "Charge": """ Updates the specified charge by setting the values of the parameters passed. Any parameters not provided will be left unchanged. @@ -4535,7 +2766,7 @@ async def modify_async( @classmethod def retrieve( - cls, id: str, **params: Unpack["Charge.RetrieveParams"] + cls, id: str, **params: Unpack["ChargeRetrieveParams"] ) -> "Charge": """ Retrieves the details of a charge that has previously been created. Supply the unique charge ID that was returned from your previous request, and Stripe will return the corresponding charge information. The same information is returned when creating or refunding the charge. @@ -4546,7 +2777,7 @@ def retrieve( @classmethod async def retrieve_async( - cls, id: str, **params: Unpack["Charge.RetrieveParams"] + cls, id: str, **params: Unpack["ChargeRetrieveParams"] ) -> "Charge": """ Retrieves the details of a charge that has previously been created. Supply the unique charge ID that was returned from your previous request, and Stripe will return the corresponding charge information. The same information is returned when creating or refunding the charge. @@ -4557,7 +2788,7 @@ async def retrieve_async( @classmethod def search( - cls, *args, **kwargs: Unpack["Charge.SearchParams"] + cls, *args, **kwargs: Unpack["ChargeSearchParams"] ) -> SearchResultObject["Charge"]: """ Search for charges you've previously created using Stripe's [Search Query Language](https://docs.stripe.com/docs/search#search-query-language). @@ -4569,7 +2800,7 @@ def search( @classmethod async def search_async( - cls, *args, **kwargs: Unpack["Charge.SearchParams"] + cls, *args, **kwargs: Unpack["ChargeSearchParams"] ) -> SearchResultObject["Charge"]: """ Search for charges you've previously created using Stripe's [Search Query Language](https://docs.stripe.com/docs/search#search-query-language). @@ -4583,13 +2814,13 @@ async def search_async( @classmethod def search_auto_paging_iter( - cls, *args, **kwargs: Unpack["Charge.SearchParams"] + cls, *args, **kwargs: Unpack["ChargeSearchParams"] ) -> Iterator["Charge"]: return cls.search(*args, **kwargs).auto_paging_iter() @classmethod async def search_auto_paging_iter_async( - cls, *args, **kwargs: Unpack["Charge.SearchParams"] + cls, *args, **kwargs: Unpack["ChargeSearchParams"] ) -> AsyncIterator["Charge"]: return (await cls.search_async(*args, **kwargs)).auto_paging_iter() @@ -4616,7 +2847,7 @@ def retrieve_refund( cls, charge: str, refund: str, - **params: Unpack["Charge.RetrieveRefundParams"], + **params: Unpack["ChargeRetrieveRefundParams"], ) -> "Refund": """ Retrieves the details of an existing refund. @@ -4637,7 +2868,7 @@ async def retrieve_refund_async( cls, charge: str, refund: str, - **params: Unpack["Charge.RetrieveRefundParams"], + **params: Unpack["ChargeRetrieveRefundParams"], ) -> "Refund": """ Retrieves the details of an existing refund. @@ -4655,7 +2886,7 @@ async def retrieve_refund_async( @classmethod def list_refunds( - cls, charge: str, **params: Unpack["Charge.ListRefundsParams"] + cls, charge: str, **params: Unpack["ChargeListRefundsParams"] ) -> ListObject["Refund"]: """ You can see a list of the refunds belonging to a specific charge. Note that the 10 most recent refunds are always available by default on the charge object. If you need more than those 10, you can use this API method and the limit and starting_after parameters to page through additional refunds. @@ -4673,7 +2904,7 @@ def list_refunds( @classmethod async def list_refunds_async( - cls, charge: str, **params: Unpack["Charge.ListRefundsParams"] + cls, charge: str, **params: Unpack["ChargeListRefundsParams"] ) -> ListObject["Refund"]: """ You can see a list of the refunds belonging to a specific charge. Note that the 10 most recent refunds are always available by default on the charge object. If you need more than those 10, you can use this API method and the limit and starting_after parameters to page through additional refunds. diff --git a/stripe/_charge_service.py b/stripe/_charge_service.py index 44a8d02d6..03a6da2ba 100644 --- a/stripe/_charge_service.py +++ b/stripe/_charge_service.py @@ -6,1778 +6,22 @@ from stripe._search_result_object import SearchResultObject from stripe._stripe_service import StripeService from stripe._util import sanitize_id -from typing import Dict, List, Optional, Union, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params._charge_capture_params import ChargeCaptureParams + from stripe.params._charge_create_params import ChargeCreateParams + from stripe.params._charge_list_params import ChargeListParams + from stripe.params._charge_retrieve_params import ChargeRetrieveParams + from stripe.params._charge_search_params import ChargeSearchParams + from stripe.params._charge_update_params import ChargeUpdateParams -class ChargeService(StripeService): - class CaptureParams(TypedDict): - amount: NotRequired[int] - """ - The amount to capture, which must be less than or equal to the original amount. - """ - application_fee: NotRequired[int] - """ - An application fee to add on to this charge. - """ - application_fee_amount: NotRequired[int] - """ - An application fee amount to add on to this charge, which must be less than or equal to the original amount. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - payment_details: NotRequired[ - "ChargeService.CaptureParamsPaymentDetails" - ] - """ - Provides industry-specific information about the charge. - """ - receipt_email: NotRequired[str] - """ - The email address to send this charge's receipt to. This will override the previously-specified email address for this charge, if one was set. Receipts will not be sent in test mode. - """ - statement_descriptor: NotRequired[str] - """ - For a non-card charge, text that appears on the customer's statement as the statement descriptor. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see [the Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors). - - For a card charge, this value is ignored unless you don't specify a `statement_descriptor_suffix`, in which case this value is used as the suffix. - """ - statement_descriptor_suffix: NotRequired[str] - """ - Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. If the account has no prefix value, the suffix is concatenated to the account's statement descriptor. - """ - transfer_data: NotRequired["ChargeService.CaptureParamsTransferData"] - """ - An optional dictionary including the account to automatically transfer to as part of a destination charge. [See the Connect documentation](https://stripe.com/docs/connect/destination-charges) for details. - """ - transfer_group: NotRequired[str] - """ - A string that identifies this transaction as part of a group. `transfer_group` may only be provided if it has not been set. See the [Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-options) for details. - """ - - class CaptureParamsPaymentDetails(TypedDict): - car_rental: NotRequired[ - "ChargeService.CaptureParamsPaymentDetailsCarRental" - ] - """ - Car rental details for this PaymentIntent. - """ - customer_reference: NotRequired["Literal['']|str"] - """ - Some customers might be required by their company or organization to provide this information. If so, provide this value. Otherwise you can ignore this field. - """ - event_details: NotRequired[ - "ChargeService.CaptureParamsPaymentDetailsEventDetails" - ] - """ - Event details for this PaymentIntent - """ - flight: NotRequired["ChargeService.CaptureParamsPaymentDetailsFlight"] - """ - Flight reservation details for this PaymentIntent - """ - lodging: NotRequired[ - "ChargeService.CaptureParamsPaymentDetailsLodging" - ] - """ - Lodging reservation details for this PaymentIntent - """ - order_reference: NotRequired["Literal['']|str"] - """ - A unique value assigned by the business to identify the transaction. - """ - subscription: NotRequired[ - "ChargeService.CaptureParamsPaymentDetailsSubscription" - ] - """ - Subscription details for this PaymentIntent - """ - - class CaptureParamsPaymentDetailsCarRental(TypedDict): - affiliate: NotRequired[ - "ChargeService.CaptureParamsPaymentDetailsCarRentalAffiliate" - ] - """ - Affiliate details for this purchase. - """ - booking_number: str - """ - The booking number associated with the car rental. - """ - car_class_code: NotRequired[str] - """ - Class code of the car. - """ - car_make: NotRequired[str] - """ - Make of the car. - """ - car_model: NotRequired[str] - """ - Model of the car. - """ - company: NotRequired[str] - """ - The name of the rental car company. - """ - customer_service_phone_number: NotRequired[str] - """ - The customer service phone number of the car rental company. - """ - days_rented: int - """ - Number of days the car is being rented. - """ - delivery: NotRequired[ - "ChargeService.CaptureParamsPaymentDetailsCarRentalDelivery" - ] - """ - Delivery details for this purchase. - """ - distance: NotRequired[ - "ChargeService.CaptureParamsPaymentDetailsCarRentalDistance" - ] - """ - The details of the distance traveled during the rental period. - """ - drivers: NotRequired[ - List["ChargeService.CaptureParamsPaymentDetailsCarRentalDriver"] - ] - """ - The details of the passengers in the travel reservation - """ - extra_charges: NotRequired[ - List[ - Literal[ - "extra_mileage", - "gas", - "late_return", - "one_way_service", - "parking_violation", - ] - ] - ] - """ - List of additional charges being billed. - """ - no_show: NotRequired[bool] - """ - Indicates if the customer did not keep nor cancel their booking. - """ - pickup_address: NotRequired[ - "ChargeService.CaptureParamsPaymentDetailsCarRentalPickupAddress" - ] - """ - Car pick-up address. - """ - pickup_at: int - """ - Car pick-up time. Measured in seconds since the Unix epoch. - """ - pickup_location_name: NotRequired[str] - """ - Name of the pickup location. - """ - rate_amount: NotRequired[int] - """ - Rental rate. - """ - rate_interval: NotRequired[Literal["day", "month", "week"]] - """ - The frequency at which the rate amount is applied. One of `day`, `week` or `month` - """ - renter_name: NotRequired[str] - """ - The name of the person or entity renting the car. - """ - return_address: NotRequired[ - "ChargeService.CaptureParamsPaymentDetailsCarRentalReturnAddress" - ] - """ - Car return address. - """ - return_at: int - """ - Car return time. Measured in seconds since the Unix epoch. - """ - return_location_name: NotRequired[str] - """ - Name of the return location. - """ - tax_exempt: NotRequired[bool] - """ - Indicates whether the goods or services are tax-exempt or tax is not collected. - """ - vehicle_identification_number: NotRequired[str] - """ - The vehicle identification number. - """ - - class CaptureParamsPaymentDetailsCarRentalAffiliate(TypedDict): - name: str - """ - The name of the affiliate that originated the purchase. - """ - - class CaptureParamsPaymentDetailsCarRentalDelivery(TypedDict): - mode: NotRequired[Literal["email", "phone", "pickup", "post"]] - """ - The delivery method for the payment - """ - recipient: NotRequired[ - "ChargeService.CaptureParamsPaymentDetailsCarRentalDeliveryRecipient" - ] - """ - Details of the recipient. - """ - - class CaptureParamsPaymentDetailsCarRentalDeliveryRecipient(TypedDict): - email: NotRequired[str] - """ - The email of the recipient the ticket is delivered to. - """ - name: NotRequired[str] - """ - The name of the recipient the ticket is delivered to. - """ - phone: NotRequired[str] - """ - The phone number of the recipient the ticket is delivered to. - """ - - class CaptureParamsPaymentDetailsCarRentalDistance(TypedDict): - amount: NotRequired[int] - """ - Distance traveled. - """ - unit: NotRequired[Literal["kilometers", "miles"]] - """ - Unit of measurement for the distance traveled. One of `miles` or `kilometers`. - """ - - class CaptureParamsPaymentDetailsCarRentalDriver(TypedDict): - driver_identification_number: NotRequired[str] - """ - Driver's identification number. - """ - driver_tax_number: NotRequired[str] - """ - Driver's tax number. - """ - name: str - """ - Full name of the person or entity on the car reservation. - """ - - class CaptureParamsPaymentDetailsCarRentalPickupAddress(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. - """ - - class CaptureParamsPaymentDetailsCarRentalReturnAddress(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. - """ - - class CaptureParamsPaymentDetailsEventDetails(TypedDict): - access_controlled_venue: NotRequired[bool] - """ - Indicates if the tickets are digitally checked when entering the venue. - """ - address: NotRequired[ - "ChargeService.CaptureParamsPaymentDetailsEventDetailsAddress" - ] - """ - The event location's address. - """ - affiliate: NotRequired[ - "ChargeService.CaptureParamsPaymentDetailsEventDetailsAffiliate" - ] - """ - Affiliate details for this purchase. - """ - company: NotRequired[str] - """ - The name of the company - """ - delivery: NotRequired[ - "ChargeService.CaptureParamsPaymentDetailsEventDetailsDelivery" - ] - """ - Delivery details for this purchase. - """ - ends_at: NotRequired[int] - """ - Event end time. Measured in seconds since the Unix epoch. - """ - genre: NotRequired[str] - """ - Type of the event entertainment (concert, sports event etc) - """ - name: str - """ - The name of the event. - """ - starts_at: NotRequired[int] - """ - Event start time. Measured in seconds since the Unix epoch. - """ - - class CaptureParamsPaymentDetailsEventDetailsAddress(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. - """ - - class CaptureParamsPaymentDetailsEventDetailsAffiliate(TypedDict): - name: str - """ - The name of the affiliate that originated the purchase. - """ - - class CaptureParamsPaymentDetailsEventDetailsDelivery(TypedDict): - mode: NotRequired[Literal["email", "phone", "pickup", "post"]] - """ - The delivery method for the payment - """ - recipient: NotRequired[ - "ChargeService.CaptureParamsPaymentDetailsEventDetailsDeliveryRecipient" - ] - """ - Details of the recipient. - """ - - class CaptureParamsPaymentDetailsEventDetailsDeliveryRecipient(TypedDict): - email: NotRequired[str] - """ - The email of the recipient the ticket is delivered to. - """ - name: NotRequired[str] - """ - The name of the recipient the ticket is delivered to. - """ - phone: NotRequired[str] - """ - The phone number of the recipient the ticket is delivered to. - """ - - class CaptureParamsPaymentDetailsFlight(TypedDict): - affiliate: NotRequired[ - "ChargeService.CaptureParamsPaymentDetailsFlightAffiliate" - ] - """ - Affiliate details for this purchase. - """ - agency_number: NotRequired[str] - """ - The agency number (i.e. International Air Transport Association (IATA) agency number) of the travel agency that made the booking. - """ - carrier: NotRequired[str] - """ - The International Air Transport Association (IATA) carrier code of the carrier that issued the ticket. - """ - delivery: NotRequired[ - "ChargeService.CaptureParamsPaymentDetailsFlightDelivery" - ] - """ - Delivery details for this purchase. - """ - passenger_name: NotRequired[str] - """ - The name of the person or entity on the reservation. - """ - passengers: NotRequired[ - List["ChargeService.CaptureParamsPaymentDetailsFlightPassenger"] - ] - """ - The details of the passengers in the travel reservation. - """ - segments: List[ - "ChargeService.CaptureParamsPaymentDetailsFlightSegment" - ] - """ - The individual flight segments associated with the trip. - """ - ticket_number: NotRequired[str] - """ - The ticket number associated with the travel reservation. - """ - - class CaptureParamsPaymentDetailsFlightAffiliate(TypedDict): - name: str - """ - The name of the affiliate that originated the purchase. - """ - - class CaptureParamsPaymentDetailsFlightDelivery(TypedDict): - mode: NotRequired[Literal["email", "phone", "pickup", "post"]] - """ - The delivery method for the payment - """ - recipient: NotRequired[ - "ChargeService.CaptureParamsPaymentDetailsFlightDeliveryRecipient" - ] - """ - Details of the recipient. - """ - - class CaptureParamsPaymentDetailsFlightDeliveryRecipient(TypedDict): - email: NotRequired[str] - """ - The email of the recipient the ticket is delivered to. - """ - name: NotRequired[str] - """ - The name of the recipient the ticket is delivered to. - """ - phone: NotRequired[str] - """ - The phone number of the recipient the ticket is delivered to. - """ - - class CaptureParamsPaymentDetailsFlightPassenger(TypedDict): - name: str - """ - Full name of the person or entity on the flight reservation. - """ - - class CaptureParamsPaymentDetailsFlightSegment(TypedDict): - amount: NotRequired[int] - """ - The flight segment amount. - """ - arrival_airport: NotRequired[str] - """ - The International Air Transport Association (IATA) airport code for the arrival airport. - """ - arrives_at: NotRequired[int] - """ - The arrival time for the flight segment. Measured in seconds since the Unix epoch. - """ - carrier: NotRequired[str] - """ - The International Air Transport Association (IATA) carrier code of the carrier operating the flight segment. - """ - departs_at: int - """ - The departure time for the flight segment. Measured in seconds since the Unix epoch. - """ - departure_airport: NotRequired[str] - """ - The International Air Transport Association (IATA) airport code for the departure airport. - """ - flight_number: NotRequired[str] - """ - The flight number associated with the segment - """ - service_class: NotRequired[ - Literal["business", "economy", "first", "premium_economy"] - ] - """ - The fare class for the segment. - """ - - class CaptureParamsPaymentDetailsLodging(TypedDict): - address: NotRequired[ - "ChargeService.CaptureParamsPaymentDetailsLodgingAddress" - ] - """ - The lodging location's address. - """ - adults: NotRequired[int] - """ - The number of adults on the booking - """ - affiliate: NotRequired[ - "ChargeService.CaptureParamsPaymentDetailsLodgingAffiliate" - ] - """ - Affiliate details for this purchase. - """ - booking_number: NotRequired[str] - """ - The booking number associated with the lodging reservation. - """ - category: NotRequired[Literal["hotel", "vacation_rental"]] - """ - The lodging category - """ - checkin_at: int - """ - Lodging check-in time. Measured in seconds since the Unix epoch. - """ - checkout_at: int - """ - Lodging check-out time. Measured in seconds since the Unix epoch. - """ - customer_service_phone_number: NotRequired[str] - """ - The customer service phone number of the lodging company. - """ - daily_room_rate_amount: NotRequired[int] - """ - The daily lodging room rate. - """ - delivery: NotRequired[ - "ChargeService.CaptureParamsPaymentDetailsLodgingDelivery" - ] - """ - Delivery details for this purchase. - """ - extra_charges: NotRequired[ - List[ - Literal[ - "gift_shop", - "laundry", - "mini_bar", - "other", - "restaurant", - "telephone", - ] - ] - ] - """ - List of additional charges being billed. - """ - fire_safety_act_compliance: NotRequired[bool] - """ - Indicates whether the lodging location is compliant with the Fire Safety Act. - """ - name: NotRequired[str] - """ - The name of the lodging location. - """ - no_show: NotRequired[bool] - """ - Indicates if the customer did not keep their booking while failing to cancel the reservation. - """ - number_of_rooms: NotRequired[int] - """ - The number of rooms on the booking - """ - passengers: NotRequired[ - List["ChargeService.CaptureParamsPaymentDetailsLodgingPassenger"] - ] - """ - The details of the passengers in the travel reservation - """ - property_phone_number: NotRequired[str] - """ - The phone number of the lodging location. - """ - room_class: NotRequired[str] - """ - The room class for this purchase. - """ - room_nights: NotRequired[int] - """ - The number of room nights - """ - total_room_tax_amount: NotRequired[int] - """ - The total tax amount associating with the room reservation. - """ - total_tax_amount: NotRequired[int] - """ - The total tax amount - """ - - class CaptureParamsPaymentDetailsLodgingAddress(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. - """ - - class CaptureParamsPaymentDetailsLodgingAffiliate(TypedDict): - name: str - """ - The name of the affiliate that originated the purchase. - """ - - class CaptureParamsPaymentDetailsLodgingDelivery(TypedDict): - mode: NotRequired[Literal["email", "phone", "pickup", "post"]] - """ - The delivery method for the payment - """ - recipient: NotRequired[ - "ChargeService.CaptureParamsPaymentDetailsLodgingDeliveryRecipient" - ] - """ - Details of the recipient. - """ - - class CaptureParamsPaymentDetailsLodgingDeliveryRecipient(TypedDict): - email: NotRequired[str] - """ - The email of the recipient the ticket is delivered to. - """ - name: NotRequired[str] - """ - The name of the recipient the ticket is delivered to. - """ - phone: NotRequired[str] - """ - The phone number of the recipient the ticket is delivered to. - """ - - class CaptureParamsPaymentDetailsLodgingPassenger(TypedDict): - name: str - """ - Full name of the person or entity on the lodging reservation. - """ - - class CaptureParamsPaymentDetailsSubscription(TypedDict): - affiliate: NotRequired[ - "ChargeService.CaptureParamsPaymentDetailsSubscriptionAffiliate" - ] - """ - Affiliate details for this purchase. - """ - auto_renewal: NotRequired[bool] - """ - Info whether the subscription will be auto renewed upon expiry. - """ - billing_interval: NotRequired[ - "ChargeService.CaptureParamsPaymentDetailsSubscriptionBillingInterval" - ] - """ - Subscription billing details for this purchase. - """ - ends_at: NotRequired[int] - """ - Subscription end time. Measured in seconds since the Unix epoch. - """ - name: str - """ - Name of the product on subscription. e.g. Apple Music Subscription - """ - starts_at: NotRequired[int] - """ - Subscription start time. Measured in seconds since the Unix epoch. - """ - - class CaptureParamsPaymentDetailsSubscriptionAffiliate(TypedDict): - name: str - """ - The name of the affiliate that originated the purchase. - """ - - class CaptureParamsPaymentDetailsSubscriptionBillingInterval(TypedDict): - count: int - """ - The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. - """ - interval: Literal["day", "month", "week", "year"] - """ - Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. - """ - - class CaptureParamsTransferData(TypedDict): - amount: NotRequired[int] - """ - The amount transferred to the destination account, if specified. By default, the entire charge amount is transferred to the destination account. - """ - - class CreateParams(TypedDict): - amount: NotRequired[int] - """ - Amount intended to be collected by this payment. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). - """ - application_fee: NotRequired[int] - application_fee_amount: NotRequired[int] - """ - A fee in cents (or local equivalent) that will be applied to the charge and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the `Stripe-Account` header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/connect/direct-charges#collect-fees). - """ - capture: NotRequired[bool] - """ - Whether to immediately capture the charge. Defaults to `true`. When `false`, the charge issues an authorization (or pre-authorization), and will need to be [captured](https://stripe.com/docs/api#capture_charge) later. Uncaptured charges expire after a set number of days (7 by default). For more information, see the [authorizing charges and settling later](https://stripe.com/docs/charges/placing-a-hold) documentation. - """ - currency: NotRequired[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). - """ - customer: NotRequired[str] - """ - The ID of an existing customer that will be charged in this request. - """ - description: NotRequired[str] - """ - An arbitrary string which you can attach to a `Charge` object. It is displayed when in the web interface alongside the charge. Note that if you use Stripe to send automatic email receipts to your customers, your receipt emails will include the `description` of the charge(s) that they are describing. - """ - destination: NotRequired["ChargeService.CreateParamsDestination"] - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - on_behalf_of: NotRequired[str] - """ - The Stripe account ID for which these funds are intended. Automatically set if you use the `destination` parameter. For details, see [Creating Separate Charges and Transfers](https://stripe.com/docs/connect/separate-charges-and-transfers#settlement-merchant). - """ - radar_options: NotRequired["ChargeService.CreateParamsRadarOptions"] - """ - Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. - """ - receipt_email: NotRequired[str] - """ - The email address to which this charge's [receipt](https://stripe.com/docs/dashboard/receipts) will be sent. The receipt will not be sent until the charge is paid, and no receipts will be sent for test mode charges. If this charge is for a [Customer](https://stripe.com/docs/api/customers/object), the email address specified here will override the customer's email address. If `receipt_email` is specified for a charge in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). - """ - shipping: NotRequired["ChargeService.CreateParamsShipping"] - """ - Shipping information for the charge. Helps prevent fraud on charges for physical goods. - """ - source: NotRequired[str] - """ - A payment source to be charged. This can be the ID of a [card](https://stripe.com/docs/api#cards) (i.e., credit or debit card), a [bank account](https://stripe.com/docs/api#bank_accounts), a [source](https://stripe.com/docs/api#sources), a [token](https://stripe.com/docs/api#tokens), or a [connected account](https://stripe.com/docs/connect/account-debits#charging-a-connected-account). For certain sources---namely, [cards](https://stripe.com/docs/api#cards), [bank accounts](https://stripe.com/docs/api#bank_accounts), and attached [sources](https://stripe.com/docs/api#sources)---you must also pass the ID of the associated customer. - """ - statement_descriptor: NotRequired[str] - """ - For a non-card charge, text that appears on the customer's statement as the statement descriptor. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see [the Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors). - - For a card charge, this value is ignored unless you don't specify a `statement_descriptor_suffix`, in which case this value is used as the suffix. - """ - statement_descriptor_suffix: NotRequired[str] - """ - Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. If the account has no prefix value, the suffix is concatenated to the account's statement descriptor. - """ - transfer_data: NotRequired["ChargeService.CreateParamsTransferData"] - """ - An optional dictionary including the account to automatically transfer to as part of a destination charge. [See the Connect documentation](https://stripe.com/docs/connect/destination-charges) for details. - """ - transfer_group: NotRequired[str] - """ - A string that identifies this transaction as part of a group. For details, see [Grouping transactions](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-options). - """ - - class CreateParamsDestination(TypedDict): - account: str - """ - ID of an existing, connected Stripe account. - """ - amount: NotRequired[int] - """ - The amount to transfer to the destination account without creating an `Application Fee` object. Cannot be combined with the `application_fee` parameter. Must be less than or equal to the charge amount. - """ - - class CreateParamsRadarOptions(TypedDict): - session: NotRequired[str] - """ - A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. - """ - - class CreateParamsShipping(TypedDict): - address: "ChargeService.CreateParamsShippingAddress" - """ - Shipping address. - """ - carrier: NotRequired[str] - """ - The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. - """ - name: str - """ - Recipient name. - """ - phone: NotRequired[str] - """ - Recipient phone (including extension). - """ - tracking_number: NotRequired[str] - """ - The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. - """ - - class CreateParamsShippingAddress(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. - """ - - class CreateParamsTransferData(TypedDict): - amount: NotRequired[int] - """ - The amount transferred to the destination account, if specified. By default, the entire charge amount is transferred to the destination account. - """ - destination: str - """ - ID of an existing, connected Stripe account. - """ - - class ListParams(TypedDict): - created: NotRequired["ChargeService.ListParamsCreated|int"] - """ - Only return charges that were created during the given date interval. - """ - customer: NotRequired[str] - """ - Only return charges for the customer specified by this customer ID. - """ - 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. - """ - payment_intent: NotRequired[str] - """ - Only return charges that were created by the PaymentIntent specified by this PaymentIntent ID. - """ - 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. - """ - transfer_group: NotRequired[str] - """ - Only return charges for this transfer group, limited to 100. - """ - - class ListParamsCreated(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) - """ - - class RetrieveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class SearchParams(TypedDict): - 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. - """ - page: NotRequired[str] - """ - A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. - """ - query: str - """ - The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for charges](https://stripe.com/docs/search#query-fields-for-charges). - """ - - class UpdateParams(TypedDict): - customer: NotRequired[str] - """ - The ID of an existing customer that will be associated with this request. This field may only be updated if there is no existing associated customer with this charge. - """ - description: NotRequired[str] - """ - An arbitrary string which you can attach to a charge object. It is displayed when in the web interface alongside the charge. Note that if you use Stripe to send automatic email receipts to your customers, your receipt emails will include the `description` of the charge(s) that they are describing. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - fraud_details: NotRequired["ChargeService.UpdateParamsFraudDetails"] - """ - A set of key-value pairs you can attach to a charge giving information about its riskiness. If you believe a charge is fraudulent, include a `user_report` key with a value of `fraudulent`. If you believe a charge is safe, include a `user_report` key with a value of `safe`. Stripe will use the information you send to improve our fraud detection algorithms. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - payment_details: NotRequired[ - "ChargeService.UpdateParamsPaymentDetails" - ] - """ - Provides industry-specific information about the charge. - """ - receipt_email: NotRequired[str] - """ - This is the email address that the receipt for this charge will be sent to. If this field is updated, then a new email receipt will be sent to the updated address. - """ - shipping: NotRequired["ChargeService.UpdateParamsShipping"] - """ - Shipping information for the charge. Helps prevent fraud on charges for physical goods. - """ - transfer_group: NotRequired[str] - """ - A string that identifies this transaction as part of a group. `transfer_group` may only be provided if it has not been set. See the [Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-options) for details. - """ - - class UpdateParamsFraudDetails(TypedDict): - user_report: Union[Literal[""], Literal["fraudulent", "safe"]] - """ - Either `safe` or `fraudulent`. - """ - - class UpdateParamsPaymentDetails(TypedDict): - car_rental: NotRequired[ - "ChargeService.UpdateParamsPaymentDetailsCarRental" - ] - """ - Car rental details for this PaymentIntent. - """ - customer_reference: NotRequired["Literal['']|str"] - """ - Some customers might be required by their company or organization to provide this information. If so, provide this value. Otherwise you can ignore this field. - """ - event_details: NotRequired[ - "ChargeService.UpdateParamsPaymentDetailsEventDetails" - ] - """ - Event details for this PaymentIntent - """ - flight: NotRequired["ChargeService.UpdateParamsPaymentDetailsFlight"] - """ - Flight reservation details for this PaymentIntent - """ - lodging: NotRequired["ChargeService.UpdateParamsPaymentDetailsLodging"] - """ - Lodging reservation details for this PaymentIntent - """ - order_reference: NotRequired["Literal['']|str"] - """ - A unique value assigned by the business to identify the transaction. - """ - subscription: NotRequired[ - "ChargeService.UpdateParamsPaymentDetailsSubscription" - ] - """ - Subscription details for this PaymentIntent - """ - - class UpdateParamsPaymentDetailsCarRental(TypedDict): - affiliate: NotRequired[ - "ChargeService.UpdateParamsPaymentDetailsCarRentalAffiliate" - ] - """ - Affiliate details for this purchase. - """ - booking_number: str - """ - The booking number associated with the car rental. - """ - car_class_code: NotRequired[str] - """ - Class code of the car. - """ - car_make: NotRequired[str] - """ - Make of the car. - """ - car_model: NotRequired[str] - """ - Model of the car. - """ - company: NotRequired[str] - """ - The name of the rental car company. - """ - customer_service_phone_number: NotRequired[str] - """ - The customer service phone number of the car rental company. - """ - days_rented: int - """ - Number of days the car is being rented. - """ - delivery: NotRequired[ - "ChargeService.UpdateParamsPaymentDetailsCarRentalDelivery" - ] - """ - Delivery details for this purchase. - """ - distance: NotRequired[ - "ChargeService.UpdateParamsPaymentDetailsCarRentalDistance" - ] - """ - The details of the distance traveled during the rental period. - """ - drivers: NotRequired[ - List["ChargeService.UpdateParamsPaymentDetailsCarRentalDriver"] - ] - """ - The details of the passengers in the travel reservation - """ - extra_charges: NotRequired[ - List[ - Literal[ - "extra_mileage", - "gas", - "late_return", - "one_way_service", - "parking_violation", - ] - ] - ] - """ - List of additional charges being billed. - """ - no_show: NotRequired[bool] - """ - Indicates if the customer did not keep nor cancel their booking. - """ - pickup_address: NotRequired[ - "ChargeService.UpdateParamsPaymentDetailsCarRentalPickupAddress" - ] - """ - Car pick-up address. - """ - pickup_at: int - """ - Car pick-up time. Measured in seconds since the Unix epoch. - """ - pickup_location_name: NotRequired[str] - """ - Name of the pickup location. - """ - rate_amount: NotRequired[int] - """ - Rental rate. - """ - rate_interval: NotRequired[Literal["day", "month", "week"]] - """ - The frequency at which the rate amount is applied. One of `day`, `week` or `month` - """ - renter_name: NotRequired[str] - """ - The name of the person or entity renting the car. - """ - return_address: NotRequired[ - "ChargeService.UpdateParamsPaymentDetailsCarRentalReturnAddress" - ] - """ - Car return address. - """ - return_at: int - """ - Car return time. Measured in seconds since the Unix epoch. - """ - return_location_name: NotRequired[str] - """ - Name of the return location. - """ - tax_exempt: NotRequired[bool] - """ - Indicates whether the goods or services are tax-exempt or tax is not collected. - """ - vehicle_identification_number: NotRequired[str] - """ - The vehicle identification number. - """ - - class UpdateParamsPaymentDetailsCarRentalAffiliate(TypedDict): - name: str - """ - The name of the affiliate that originated the purchase. - """ - - class UpdateParamsPaymentDetailsCarRentalDelivery(TypedDict): - mode: NotRequired[Literal["email", "phone", "pickup", "post"]] - """ - The delivery method for the payment - """ - recipient: NotRequired[ - "ChargeService.UpdateParamsPaymentDetailsCarRentalDeliveryRecipient" - ] - """ - Details of the recipient. - """ - - class UpdateParamsPaymentDetailsCarRentalDeliveryRecipient(TypedDict): - email: NotRequired[str] - """ - The email of the recipient the ticket is delivered to. - """ - name: NotRequired[str] - """ - The name of the recipient the ticket is delivered to. - """ - phone: NotRequired[str] - """ - The phone number of the recipient the ticket is delivered to. - """ - - class UpdateParamsPaymentDetailsCarRentalDistance(TypedDict): - amount: NotRequired[int] - """ - Distance traveled. - """ - unit: NotRequired[Literal["kilometers", "miles"]] - """ - Unit of measurement for the distance traveled. One of `miles` or `kilometers`. - """ - - class UpdateParamsPaymentDetailsCarRentalDriver(TypedDict): - driver_identification_number: NotRequired[str] - """ - Driver's identification number. - """ - driver_tax_number: NotRequired[str] - """ - Driver's tax number. - """ - name: str - """ - Full name of the person or entity on the car reservation. - """ - - class UpdateParamsPaymentDetailsCarRentalPickupAddress(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. - """ - - class UpdateParamsPaymentDetailsCarRentalReturnAddress(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. - """ - - class UpdateParamsPaymentDetailsEventDetails(TypedDict): - access_controlled_venue: NotRequired[bool] - """ - Indicates if the tickets are digitally checked when entering the venue. - """ - address: NotRequired[ - "ChargeService.UpdateParamsPaymentDetailsEventDetailsAddress" - ] - """ - The event location's address. - """ - affiliate: NotRequired[ - "ChargeService.UpdateParamsPaymentDetailsEventDetailsAffiliate" - ] - """ - Affiliate details for this purchase. - """ - company: NotRequired[str] - """ - The name of the company - """ - delivery: NotRequired[ - "ChargeService.UpdateParamsPaymentDetailsEventDetailsDelivery" - ] - """ - Delivery details for this purchase. - """ - ends_at: NotRequired[int] - """ - Event end time. Measured in seconds since the Unix epoch. - """ - genre: NotRequired[str] - """ - Type of the event entertainment (concert, sports event etc) - """ - name: str - """ - The name of the event. - """ - starts_at: NotRequired[int] - """ - Event start time. Measured in seconds since the Unix epoch. - """ - - class UpdateParamsPaymentDetailsEventDetailsAddress(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. - """ - - class UpdateParamsPaymentDetailsEventDetailsAffiliate(TypedDict): - name: str - """ - The name of the affiliate that originated the purchase. - """ - - class UpdateParamsPaymentDetailsEventDetailsDelivery(TypedDict): - mode: NotRequired[Literal["email", "phone", "pickup", "post"]] - """ - The delivery method for the payment - """ - recipient: NotRequired[ - "ChargeService.UpdateParamsPaymentDetailsEventDetailsDeliveryRecipient" - ] - """ - Details of the recipient. - """ - - class UpdateParamsPaymentDetailsEventDetailsDeliveryRecipient(TypedDict): - email: NotRequired[str] - """ - The email of the recipient the ticket is delivered to. - """ - name: NotRequired[str] - """ - The name of the recipient the ticket is delivered to. - """ - phone: NotRequired[str] - """ - The phone number of the recipient the ticket is delivered to. - """ - - class UpdateParamsPaymentDetailsFlight(TypedDict): - affiliate: NotRequired[ - "ChargeService.UpdateParamsPaymentDetailsFlightAffiliate" - ] - """ - Affiliate details for this purchase. - """ - agency_number: NotRequired[str] - """ - The agency number (i.e. International Air Transport Association (IATA) agency number) of the travel agency that made the booking. - """ - carrier: NotRequired[str] - """ - The International Air Transport Association (IATA) carrier code of the carrier that issued the ticket. - """ - delivery: NotRequired[ - "ChargeService.UpdateParamsPaymentDetailsFlightDelivery" - ] - """ - Delivery details for this purchase. - """ - passenger_name: NotRequired[str] - """ - The name of the person or entity on the reservation. - """ - passengers: NotRequired[ - List["ChargeService.UpdateParamsPaymentDetailsFlightPassenger"] - ] - """ - The details of the passengers in the travel reservation. - """ - segments: List["ChargeService.UpdateParamsPaymentDetailsFlightSegment"] - """ - The individual flight segments associated with the trip. - """ - ticket_number: NotRequired[str] - """ - The ticket number associated with the travel reservation. - """ - - class UpdateParamsPaymentDetailsFlightAffiliate(TypedDict): - name: str - """ - The name of the affiliate that originated the purchase. - """ - - class UpdateParamsPaymentDetailsFlightDelivery(TypedDict): - mode: NotRequired[Literal["email", "phone", "pickup", "post"]] - """ - The delivery method for the payment - """ - recipient: NotRequired[ - "ChargeService.UpdateParamsPaymentDetailsFlightDeliveryRecipient" - ] - """ - Details of the recipient. - """ - - class UpdateParamsPaymentDetailsFlightDeliveryRecipient(TypedDict): - email: NotRequired[str] - """ - The email of the recipient the ticket is delivered to. - """ - name: NotRequired[str] - """ - The name of the recipient the ticket is delivered to. - """ - phone: NotRequired[str] - """ - The phone number of the recipient the ticket is delivered to. - """ - - class UpdateParamsPaymentDetailsFlightPassenger(TypedDict): - name: str - """ - Full name of the person or entity on the flight reservation. - """ - - class UpdateParamsPaymentDetailsFlightSegment(TypedDict): - amount: NotRequired[int] - """ - The flight segment amount. - """ - arrival_airport: NotRequired[str] - """ - The International Air Transport Association (IATA) airport code for the arrival airport. - """ - arrives_at: NotRequired[int] - """ - The arrival time for the flight segment. Measured in seconds since the Unix epoch. - """ - carrier: NotRequired[str] - """ - The International Air Transport Association (IATA) carrier code of the carrier operating the flight segment. - """ - departs_at: int - """ - The departure time for the flight segment. Measured in seconds since the Unix epoch. - """ - departure_airport: NotRequired[str] - """ - The International Air Transport Association (IATA) airport code for the departure airport. - """ - flight_number: NotRequired[str] - """ - The flight number associated with the segment - """ - service_class: NotRequired[ - Literal["business", "economy", "first", "premium_economy"] - ] - """ - The fare class for the segment. - """ - - class UpdateParamsPaymentDetailsLodging(TypedDict): - address: NotRequired[ - "ChargeService.UpdateParamsPaymentDetailsLodgingAddress" - ] - """ - The lodging location's address. - """ - adults: NotRequired[int] - """ - The number of adults on the booking - """ - affiliate: NotRequired[ - "ChargeService.UpdateParamsPaymentDetailsLodgingAffiliate" - ] - """ - Affiliate details for this purchase. - """ - booking_number: NotRequired[str] - """ - The booking number associated with the lodging reservation. - """ - category: NotRequired[Literal["hotel", "vacation_rental"]] - """ - The lodging category - """ - checkin_at: int - """ - Lodging check-in time. Measured in seconds since the Unix epoch. - """ - checkout_at: int - """ - Lodging check-out time. Measured in seconds since the Unix epoch. - """ - customer_service_phone_number: NotRequired[str] - """ - The customer service phone number of the lodging company. - """ - daily_room_rate_amount: NotRequired[int] - """ - The daily lodging room rate. - """ - delivery: NotRequired[ - "ChargeService.UpdateParamsPaymentDetailsLodgingDelivery" - ] - """ - Delivery details for this purchase. - """ - extra_charges: NotRequired[ - List[ - Literal[ - "gift_shop", - "laundry", - "mini_bar", - "other", - "restaurant", - "telephone", - ] - ] - ] - """ - List of additional charges being billed. - """ - fire_safety_act_compliance: NotRequired[bool] - """ - Indicates whether the lodging location is compliant with the Fire Safety Act. - """ - name: NotRequired[str] - """ - The name of the lodging location. - """ - no_show: NotRequired[bool] - """ - Indicates if the customer did not keep their booking while failing to cancel the reservation. - """ - number_of_rooms: NotRequired[int] - """ - The number of rooms on the booking - """ - passengers: NotRequired[ - List["ChargeService.UpdateParamsPaymentDetailsLodgingPassenger"] - ] - """ - The details of the passengers in the travel reservation - """ - property_phone_number: NotRequired[str] - """ - The phone number of the lodging location. - """ - room_class: NotRequired[str] - """ - The room class for this purchase. - """ - room_nights: NotRequired[int] - """ - The number of room nights - """ - total_room_tax_amount: NotRequired[int] - """ - The total tax amount associating with the room reservation. - """ - total_tax_amount: NotRequired[int] - """ - The total tax amount - """ - - class UpdateParamsPaymentDetailsLodgingAddress(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. - """ - - class UpdateParamsPaymentDetailsLodgingAffiliate(TypedDict): - name: str - """ - The name of the affiliate that originated the purchase. - """ - - class UpdateParamsPaymentDetailsLodgingDelivery(TypedDict): - mode: NotRequired[Literal["email", "phone", "pickup", "post"]] - """ - The delivery method for the payment - """ - recipient: NotRequired[ - "ChargeService.UpdateParamsPaymentDetailsLodgingDeliveryRecipient" - ] - """ - Details of the recipient. - """ - - class UpdateParamsPaymentDetailsLodgingDeliveryRecipient(TypedDict): - email: NotRequired[str] - """ - The email of the recipient the ticket is delivered to. - """ - name: NotRequired[str] - """ - The name of the recipient the ticket is delivered to. - """ - phone: NotRequired[str] - """ - The phone number of the recipient the ticket is delivered to. - """ - - class UpdateParamsPaymentDetailsLodgingPassenger(TypedDict): - name: str - """ - Full name of the person or entity on the lodging reservation. - """ - - class UpdateParamsPaymentDetailsSubscription(TypedDict): - affiliate: NotRequired[ - "ChargeService.UpdateParamsPaymentDetailsSubscriptionAffiliate" - ] - """ - Affiliate details for this purchase. - """ - auto_renewal: NotRequired[bool] - """ - Info whether the subscription will be auto renewed upon expiry. - """ - billing_interval: NotRequired[ - "ChargeService.UpdateParamsPaymentDetailsSubscriptionBillingInterval" - ] - """ - Subscription billing details for this purchase. - """ - ends_at: NotRequired[int] - """ - Subscription end time. Measured in seconds since the Unix epoch. - """ - name: str - """ - Name of the product on subscription. e.g. Apple Music Subscription - """ - starts_at: NotRequired[int] - """ - Subscription start time. Measured in seconds since the Unix epoch. - """ - - class UpdateParamsPaymentDetailsSubscriptionAffiliate(TypedDict): - name: str - """ - The name of the affiliate that originated the purchase. - """ - - class UpdateParamsPaymentDetailsSubscriptionBillingInterval(TypedDict): - count: int - """ - The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. - """ - interval: Literal["day", "month", "week", "year"] - """ - Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. - """ - - class UpdateParamsShipping(TypedDict): - address: "ChargeService.UpdateParamsShippingAddress" - """ - Shipping address. - """ - carrier: NotRequired[str] - """ - The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. - """ - name: str - """ - Recipient name. - """ - phone: NotRequired[str] - """ - Recipient phone (including extension). - """ - tracking_number: NotRequired[str] - """ - The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. - """ - - class UpdateParamsShippingAddress(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. - """ +class ChargeService(StripeService): def list( self, - params: Optional["ChargeService.ListParams"] = None, + params: Optional["ChargeListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[Charge]: """ @@ -1796,7 +40,7 @@ def list( async def list_async( self, - params: Optional["ChargeService.ListParams"] = None, + params: Optional["ChargeListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[Charge]: """ @@ -1815,7 +59,7 @@ async def list_async( def create( self, - params: Optional["ChargeService.CreateParams"] = None, + params: Optional["ChargeCreateParams"] = None, options: Optional[RequestOptions] = None, ) -> Charge: """ @@ -1836,7 +80,7 @@ def create( async def create_async( self, - params: Optional["ChargeService.CreateParams"] = None, + params: Optional["ChargeCreateParams"] = None, options: Optional[RequestOptions] = None, ) -> Charge: """ @@ -1858,7 +102,7 @@ async def create_async( def retrieve( self, charge: str, - params: Optional["ChargeService.RetrieveParams"] = None, + params: Optional["ChargeRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Charge: """ @@ -1878,7 +122,7 @@ def retrieve( async def retrieve_async( self, charge: str, - params: Optional["ChargeService.RetrieveParams"] = None, + params: Optional["ChargeRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Charge: """ @@ -1898,7 +142,7 @@ async def retrieve_async( def update( self, charge: str, - params: Optional["ChargeService.UpdateParams"] = None, + params: Optional["ChargeUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> Charge: """ @@ -1918,7 +162,7 @@ def update( async def update_async( self, charge: str, - params: Optional["ChargeService.UpdateParams"] = None, + params: Optional["ChargeUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> Charge: """ @@ -1937,7 +181,7 @@ async def update_async( def search( self, - params: "ChargeService.SearchParams", + params: "ChargeSearchParams", options: Optional[RequestOptions] = None, ) -> SearchResultObject[Charge]: """ @@ -1959,7 +203,7 @@ def search( async def search_async( self, - params: "ChargeService.SearchParams", + params: "ChargeSearchParams", options: Optional[RequestOptions] = None, ) -> SearchResultObject[Charge]: """ @@ -1982,7 +226,7 @@ async def search_async( def capture( self, charge: str, - params: Optional["ChargeService.CaptureParams"] = None, + params: Optional["ChargeCaptureParams"] = None, options: Optional[RequestOptions] = None, ) -> Charge: """ @@ -2008,7 +252,7 @@ def capture( async def capture_async( self, charge: str, - params: Optional["ChargeService.CaptureParams"] = None, + params: Optional["ChargeCaptureParams"] = None, options: Optional[RequestOptions] = None, ) -> Charge: """ diff --git a/stripe/_confirmation_token.py b/stripe/_confirmation_token.py index 4d62076aa..8ae96dd7f 100644 --- a/stripe/_confirmation_token.py +++ b/stripe/_confirmation_token.py @@ -2,23 +2,21 @@ # File generated from our OpenAPI spec from stripe._api_resource import APIResource from stripe._expandable_field import ExpandableField -from stripe._request_options import RequestOptions from stripe._stripe_object import StripeObject from stripe._test_helpers import APIResourceTestHelpers -from typing import ClassVar, Dict, List, Optional, cast -from typing_extensions import ( - Literal, - NotRequired, - Type, - TypedDict, - Unpack, - TYPE_CHECKING, -) +from typing import ClassVar, List, Optional, cast +from typing_extensions import Literal, Type, Unpack, TYPE_CHECKING if TYPE_CHECKING: from stripe._charge import Charge from stripe._customer import Customer from stripe._setup_attempt import SetupAttempt + from stripe.params._confirmation_token_create_params import ( + ConfirmationTokenCreateParams, + ) + from stripe.params._confirmation_token_retrieve_params import ( + ConfirmationTokenRetrieveParams, + ) class ConfirmationToken(APIResource["ConfirmationToken"]): @@ -1719,1022 +1717,6 @@ class Address(StripeObject): """ _inner_class_types = {"address": Address} - class CreateParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - payment_method: NotRequired[str] - """ - ID of an existing PaymentMethod. - """ - payment_method_data: NotRequired[ - "ConfirmationToken.CreateParamsPaymentMethodData" - ] - """ - If provided, this hash will be used to create a PaymentMethod. - """ - payment_method_options: NotRequired[ - "ConfirmationToken.CreateParamsPaymentMethodOptions" - ] - """ - Payment-method-specific configuration for this ConfirmationToken. - """ - return_url: NotRequired[str] - """ - Return URL used to confirm the Intent. - """ - setup_future_usage: NotRequired[Literal["off_session", "on_session"]] - """ - Indicates that you intend to make future payments with this ConfirmationToken's payment method. - - The presence of this property will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. - """ - shipping: NotRequired["ConfirmationToken.CreateParamsShipping"] - """ - Shipping information for this ConfirmationToken. - """ - - class CreateParamsPaymentMethodData(TypedDict): - acss_debit: NotRequired[ - "ConfirmationToken.CreateParamsPaymentMethodDataAcssDebit" - ] - """ - If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method. - """ - affirm: NotRequired[ - "ConfirmationToken.CreateParamsPaymentMethodDataAffirm" - ] - """ - If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method. - """ - afterpay_clearpay: NotRequired[ - "ConfirmationToken.CreateParamsPaymentMethodDataAfterpayClearpay" - ] - """ - If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method. - """ - alipay: NotRequired[ - "ConfirmationToken.CreateParamsPaymentMethodDataAlipay" - ] - """ - If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. - """ - allow_redisplay: NotRequired[ - Literal["always", "limited", "unspecified"] - ] - """ - This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`. - """ - alma: NotRequired[ - "ConfirmationToken.CreateParamsPaymentMethodDataAlma" - ] - """ - If this is a Alma PaymentMethod, this hash contains details about the Alma payment method. - """ - amazon_pay: NotRequired[ - "ConfirmationToken.CreateParamsPaymentMethodDataAmazonPay" - ] - """ - If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method. - """ - au_becs_debit: NotRequired[ - "ConfirmationToken.CreateParamsPaymentMethodDataAuBecsDebit" - ] - """ - If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. - """ - bacs_debit: NotRequired[ - "ConfirmationToken.CreateParamsPaymentMethodDataBacsDebit" - ] - """ - If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account. - """ - bancontact: NotRequired[ - "ConfirmationToken.CreateParamsPaymentMethodDataBancontact" - ] - """ - If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method. - """ - billie: NotRequired[ - "ConfirmationToken.CreateParamsPaymentMethodDataBillie" - ] - """ - If this is a `billie` PaymentMethod, this hash contains details about the Billie payment method. - """ - billing_details: NotRequired[ - "ConfirmationToken.CreateParamsPaymentMethodDataBillingDetails" - ] - """ - Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. - """ - blik: NotRequired[ - "ConfirmationToken.CreateParamsPaymentMethodDataBlik" - ] - """ - If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method. - """ - boleto: NotRequired[ - "ConfirmationToken.CreateParamsPaymentMethodDataBoleto" - ] - """ - If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method. - """ - cashapp: NotRequired[ - "ConfirmationToken.CreateParamsPaymentMethodDataCashapp" - ] - """ - If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. - """ - crypto: NotRequired[ - "ConfirmationToken.CreateParamsPaymentMethodDataCrypto" - ] - """ - If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment method. - """ - customer_balance: NotRequired[ - "ConfirmationToken.CreateParamsPaymentMethodDataCustomerBalance" - ] - """ - If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. - """ - eps: NotRequired["ConfirmationToken.CreateParamsPaymentMethodDataEps"] - """ - If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. - """ - fpx: NotRequired["ConfirmationToken.CreateParamsPaymentMethodDataFpx"] - """ - If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method. - """ - giropay: NotRequired[ - "ConfirmationToken.CreateParamsPaymentMethodDataGiropay" - ] - """ - If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method. - """ - gopay: NotRequired[ - "ConfirmationToken.CreateParamsPaymentMethodDataGopay" - ] - """ - If this is a Gopay PaymentMethod, this hash contains details about the Gopay payment method. - """ - grabpay: NotRequired[ - "ConfirmationToken.CreateParamsPaymentMethodDataGrabpay" - ] - """ - If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method. - """ - id_bank_transfer: NotRequired[ - "ConfirmationToken.CreateParamsPaymentMethodDataIdBankTransfer" - ] - """ - If this is an `IdBankTransfer` PaymentMethod, this hash contains details about the IdBankTransfer payment method. - """ - ideal: NotRequired[ - "ConfirmationToken.CreateParamsPaymentMethodDataIdeal" - ] - """ - If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. - """ - interac_present: NotRequired[ - "ConfirmationToken.CreateParamsPaymentMethodDataInteracPresent" - ] - """ - If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. - """ - kakao_pay: NotRequired[ - "ConfirmationToken.CreateParamsPaymentMethodDataKakaoPay" - ] - """ - If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method. - """ - klarna: NotRequired[ - "ConfirmationToken.CreateParamsPaymentMethodDataKlarna" - ] - """ - If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method. - """ - konbini: NotRequired[ - "ConfirmationToken.CreateParamsPaymentMethodDataKonbini" - ] - """ - If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. - """ - kr_card: NotRequired[ - "ConfirmationToken.CreateParamsPaymentMethodDataKrCard" - ] - """ - If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method. - """ - link: NotRequired[ - "ConfirmationToken.CreateParamsPaymentMethodDataLink" - ] - """ - If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. - """ - mb_way: NotRequired[ - "ConfirmationToken.CreateParamsPaymentMethodDataMbWay" - ] - """ - If this is a MB WAY PaymentMethod, this hash contains details about the MB WAY payment method. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - mobilepay: NotRequired[ - "ConfirmationToken.CreateParamsPaymentMethodDataMobilepay" - ] - """ - If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method. - """ - multibanco: NotRequired[ - "ConfirmationToken.CreateParamsPaymentMethodDataMultibanco" - ] - """ - If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method. - """ - naver_pay: NotRequired[ - "ConfirmationToken.CreateParamsPaymentMethodDataNaverPay" - ] - """ - If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method. - """ - nz_bank_account: NotRequired[ - "ConfirmationToken.CreateParamsPaymentMethodDataNzBankAccount" - ] - """ - If this is an nz_bank_account PaymentMethod, this hash contains details about the nz_bank_account payment method. - """ - oxxo: NotRequired[ - "ConfirmationToken.CreateParamsPaymentMethodDataOxxo" - ] - """ - If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. - """ - p24: NotRequired["ConfirmationToken.CreateParamsPaymentMethodDataP24"] - """ - If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. - """ - pay_by_bank: NotRequired[ - "ConfirmationToken.CreateParamsPaymentMethodDataPayByBank" - ] - """ - If this is a `pay_by_bank` PaymentMethod, this hash contains details about the PayByBank payment method. - """ - payco: NotRequired[ - "ConfirmationToken.CreateParamsPaymentMethodDataPayco" - ] - """ - If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method. - """ - paynow: NotRequired[ - "ConfirmationToken.CreateParamsPaymentMethodDataPaynow" - ] - """ - If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method. - """ - paypal: NotRequired[ - "ConfirmationToken.CreateParamsPaymentMethodDataPaypal" - ] - """ - If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method. - """ - paypay: NotRequired[ - "ConfirmationToken.CreateParamsPaymentMethodDataPaypay" - ] - """ - If this is a `paypay` PaymentMethod, this hash contains details about the PayPay payment method. - """ - payto: NotRequired[ - "ConfirmationToken.CreateParamsPaymentMethodDataPayto" - ] - """ - If this is a `payto` PaymentMethod, this hash contains details about the PayTo payment method. - """ - pix: NotRequired["ConfirmationToken.CreateParamsPaymentMethodDataPix"] - """ - If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method. - """ - promptpay: NotRequired[ - "ConfirmationToken.CreateParamsPaymentMethodDataPromptpay" - ] - """ - If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method. - """ - qris: NotRequired[ - "ConfirmationToken.CreateParamsPaymentMethodDataQris" - ] - """ - If this is a `qris` PaymentMethod, this hash contains details about the QRIS payment method. - """ - radar_options: NotRequired[ - "ConfirmationToken.CreateParamsPaymentMethodDataRadarOptions" - ] - """ - Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. - """ - rechnung: NotRequired[ - "ConfirmationToken.CreateParamsPaymentMethodDataRechnung" - ] - """ - If this is a `rechnung` PaymentMethod, this hash contains details about the Rechnung payment method. - """ - revolut_pay: NotRequired[ - "ConfirmationToken.CreateParamsPaymentMethodDataRevolutPay" - ] - """ - If this is a `revolut_pay` PaymentMethod, this hash contains details about the Revolut Pay payment method. - """ - samsung_pay: NotRequired[ - "ConfirmationToken.CreateParamsPaymentMethodDataSamsungPay" - ] - """ - If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method. - """ - satispay: NotRequired[ - "ConfirmationToken.CreateParamsPaymentMethodDataSatispay" - ] - """ - If this is a `satispay` PaymentMethod, this hash contains details about the Satispay payment method. - """ - sepa_debit: NotRequired[ - "ConfirmationToken.CreateParamsPaymentMethodDataSepaDebit" - ] - """ - If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. - """ - shopeepay: NotRequired[ - "ConfirmationToken.CreateParamsPaymentMethodDataShopeepay" - ] - """ - If this is a Shopeepay PaymentMethod, this hash contains details about the Shopeepay payment method. - """ - sofort: NotRequired[ - "ConfirmationToken.CreateParamsPaymentMethodDataSofort" - ] - """ - If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. - """ - stripe_balance: NotRequired[ - "ConfirmationToken.CreateParamsPaymentMethodDataStripeBalance" - ] - """ - This hash contains details about the Stripe balance payment method. - """ - swish: NotRequired[ - "ConfirmationToken.CreateParamsPaymentMethodDataSwish" - ] - """ - If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method. - """ - twint: NotRequired[ - "ConfirmationToken.CreateParamsPaymentMethodDataTwint" - ] - """ - If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method. - """ - type: Literal[ - "acss_debit", - "affirm", - "afterpay_clearpay", - "alipay", - "alma", - "amazon_pay", - "au_becs_debit", - "bacs_debit", - "bancontact", - "billie", - "blik", - "boleto", - "cashapp", - "crypto", - "customer_balance", - "eps", - "fpx", - "giropay", - "gopay", - "grabpay", - "id_bank_transfer", - "ideal", - "kakao_pay", - "klarna", - "konbini", - "kr_card", - "link", - "mb_way", - "mobilepay", - "multibanco", - "naver_pay", - "nz_bank_account", - "oxxo", - "p24", - "pay_by_bank", - "payco", - "paynow", - "paypal", - "paypay", - "payto", - "pix", - "promptpay", - "qris", - "rechnung", - "revolut_pay", - "samsung_pay", - "satispay", - "sepa_debit", - "shopeepay", - "sofort", - "stripe_balance", - "swish", - "twint", - "us_bank_account", - "wechat_pay", - "zip", - ] - """ - The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. - """ - us_bank_account: NotRequired[ - "ConfirmationToken.CreateParamsPaymentMethodDataUsBankAccount" - ] - """ - If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. - """ - wechat_pay: NotRequired[ - "ConfirmationToken.CreateParamsPaymentMethodDataWechatPay" - ] - """ - If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method. - """ - zip: NotRequired["ConfirmationToken.CreateParamsPaymentMethodDataZip"] - """ - If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method. - """ - - class CreateParamsPaymentMethodDataAcssDebit(TypedDict): - account_number: str - """ - Customer's bank account number. - """ - institution_number: str - """ - Institution number of the customer's bank. - """ - transit_number: str - """ - Transit number of the customer's bank. - """ - - class CreateParamsPaymentMethodDataAffirm(TypedDict): - pass - - class CreateParamsPaymentMethodDataAfterpayClearpay(TypedDict): - pass - - class CreateParamsPaymentMethodDataAlipay(TypedDict): - pass - - class CreateParamsPaymentMethodDataAlma(TypedDict): - pass - - class CreateParamsPaymentMethodDataAmazonPay(TypedDict): - pass - - class CreateParamsPaymentMethodDataAuBecsDebit(TypedDict): - account_number: str - """ - The account number for the bank account. - """ - bsb_number: str - """ - Bank-State-Branch number of the bank account. - """ - - class CreateParamsPaymentMethodDataBacsDebit(TypedDict): - account_number: NotRequired[str] - """ - Account number of the bank account that the funds will be debited from. - """ - sort_code: NotRequired[str] - """ - Sort code of the bank account. (e.g., `10-20-30`) - """ - - class CreateParamsPaymentMethodDataBancontact(TypedDict): - pass - - class CreateParamsPaymentMethodDataBillie(TypedDict): - pass - - class CreateParamsPaymentMethodDataBillingDetails(TypedDict): - address: NotRequired[ - "Literal['']|ConfirmationToken.CreateParamsPaymentMethodDataBillingDetailsAddress" - ] - """ - Billing address. - """ - email: NotRequired["Literal['']|str"] - """ - Email address. - """ - name: NotRequired["Literal['']|str"] - """ - Full name. - """ - phone: NotRequired["Literal['']|str"] - """ - Billing phone number (including extension). - """ - tax_id: NotRequired[str] - """ - Taxpayer identification number. Used only for transactions between LATAM buyers and non-LATAM sellers. - """ - - class CreateParamsPaymentMethodDataBillingDetailsAddress(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. - """ - - class CreateParamsPaymentMethodDataBlik(TypedDict): - pass - - class CreateParamsPaymentMethodDataBoleto(TypedDict): - tax_id: str - """ - The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers) - """ - - class CreateParamsPaymentMethodDataCashapp(TypedDict): - pass - - class CreateParamsPaymentMethodDataCrypto(TypedDict): - pass - - class CreateParamsPaymentMethodDataCustomerBalance(TypedDict): - pass - - class CreateParamsPaymentMethodDataEps(TypedDict): - bank: NotRequired[ - Literal[ - "arzte_und_apotheker_bank", - "austrian_anadi_bank_ag", - "bank_austria", - "bankhaus_carl_spangler", - "bankhaus_schelhammer_und_schattera_ag", - "bawag_psk_ag", - "bks_bank_ag", - "brull_kallmus_bank_ag", - "btv_vier_lander_bank", - "capital_bank_grawe_gruppe_ag", - "deutsche_bank_ag", - "dolomitenbank", - "easybank_ag", - "erste_bank_und_sparkassen", - "hypo_alpeadriabank_international_ag", - "hypo_bank_burgenland_aktiengesellschaft", - "hypo_noe_lb_fur_niederosterreich_u_wien", - "hypo_oberosterreich_salzburg_steiermark", - "hypo_tirol_bank_ag", - "hypo_vorarlberg_bank_ag", - "marchfelder_bank", - "oberbank_ag", - "raiffeisen_bankengruppe_osterreich", - "schoellerbank_ag", - "sparda_bank_wien", - "volksbank_gruppe", - "volkskreditbank_ag", - "vr_bank_braunau", - ] - ] - """ - The customer's bank. - """ - - class CreateParamsPaymentMethodDataFpx(TypedDict): - account_holder_type: NotRequired[Literal["company", "individual"]] - """ - Account holder type for FPX transaction - """ - bank: Literal[ - "affin_bank", - "agrobank", - "alliance_bank", - "ambank", - "bank_islam", - "bank_muamalat", - "bank_of_china", - "bank_rakyat", - "bsn", - "cimb", - "deutsche_bank", - "hong_leong_bank", - "hsbc", - "kfh", - "maybank2e", - "maybank2u", - "ocbc", - "pb_enterprise", - "public_bank", - "rhb", - "standard_chartered", - "uob", - ] - """ - The customer's bank. - """ - - class CreateParamsPaymentMethodDataGiropay(TypedDict): - pass - - class CreateParamsPaymentMethodDataGopay(TypedDict): - pass - - class CreateParamsPaymentMethodDataGrabpay(TypedDict): - pass - - class CreateParamsPaymentMethodDataIdBankTransfer(TypedDict): - bank: NotRequired[Literal["bca", "bni", "bri", "cimb", "permata"]] - """ - Bank where the account is held. - """ - - class CreateParamsPaymentMethodDataIdeal(TypedDict): - bank: NotRequired[ - Literal[ - "abn_amro", - "asn_bank", - "bunq", - "buut", - "handelsbanken", - "ing", - "knab", - "moneyou", - "n26", - "nn", - "rabobank", - "regiobank", - "revolut", - "sns_bank", - "triodos_bank", - "van_lanschot", - "yoursafe", - ] - ] - """ - The customer's bank. Only use this parameter for existing customers. Don't use it for new customers. - """ - - class CreateParamsPaymentMethodDataInteracPresent(TypedDict): - pass - - class CreateParamsPaymentMethodDataKakaoPay(TypedDict): - pass - - class CreateParamsPaymentMethodDataKlarna(TypedDict): - dob: NotRequired[ - "ConfirmationToken.CreateParamsPaymentMethodDataKlarnaDob" - ] - """ - Customer's date of birth - """ - - class CreateParamsPaymentMethodDataKlarnaDob(TypedDict): - day: int - """ - The day of birth, between 1 and 31. - """ - month: int - """ - The month of birth, between 1 and 12. - """ - year: int - """ - The four-digit year of birth. - """ - - class CreateParamsPaymentMethodDataKonbini(TypedDict): - pass - - class CreateParamsPaymentMethodDataKrCard(TypedDict): - pass - - class CreateParamsPaymentMethodDataLink(TypedDict): - pass - - class CreateParamsPaymentMethodDataMbWay(TypedDict): - pass - - class CreateParamsPaymentMethodDataMobilepay(TypedDict): - pass - - class CreateParamsPaymentMethodDataMultibanco(TypedDict): - pass - - class CreateParamsPaymentMethodDataNaverPay(TypedDict): - funding: NotRequired[Literal["card", "points"]] - """ - Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`. - """ - - class CreateParamsPaymentMethodDataNzBankAccount(TypedDict): - account_holder_name: NotRequired[str] - """ - The name on the bank account. Only required if the account holder name is different from the name of the authorized signatory collected in the PaymentMethod's billing details. - """ - account_number: str - """ - The account number for the bank account. - """ - bank_code: str - """ - The numeric code for the bank account's bank. - """ - branch_code: str - """ - The numeric code for the bank account's bank branch. - """ - reference: NotRequired[str] - suffix: str - """ - The suffix of the bank account number. - """ - - class CreateParamsPaymentMethodDataOxxo(TypedDict): - pass - - class CreateParamsPaymentMethodDataP24(TypedDict): - bank: NotRequired[ - Literal[ - "alior_bank", - "bank_millennium", - "bank_nowy_bfg_sa", - "bank_pekao_sa", - "banki_spbdzielcze", - "blik", - "bnp_paribas", - "boz", - "citi_handlowy", - "credit_agricole", - "envelobank", - "etransfer_pocztowy24", - "getin_bank", - "ideabank", - "ing", - "inteligo", - "mbank_mtransfer", - "nest_przelew", - "noble_pay", - "pbac_z_ipko", - "plus_bank", - "santander_przelew24", - "tmobile_usbugi_bankowe", - "toyota_bank", - "velobank", - "volkswagen_bank", - ] - ] - """ - The customer's bank. - """ - - class CreateParamsPaymentMethodDataPayByBank(TypedDict): - pass - - class CreateParamsPaymentMethodDataPayco(TypedDict): - pass - - class CreateParamsPaymentMethodDataPaynow(TypedDict): - pass - - class CreateParamsPaymentMethodDataPaypal(TypedDict): - pass - - class CreateParamsPaymentMethodDataPaypay(TypedDict): - pass - - class CreateParamsPaymentMethodDataPayto(TypedDict): - account_number: NotRequired[str] - """ - The account number for the bank account. - """ - bsb_number: NotRequired[str] - """ - Bank-State-Branch number of the bank account. - """ - pay_id: NotRequired[str] - """ - The PayID alias for the bank account. - """ - - class CreateParamsPaymentMethodDataPix(TypedDict): - pass - - class CreateParamsPaymentMethodDataPromptpay(TypedDict): - pass - - class CreateParamsPaymentMethodDataQris(TypedDict): - pass - - class CreateParamsPaymentMethodDataRadarOptions(TypedDict): - session: NotRequired[str] - """ - A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. - """ - - class CreateParamsPaymentMethodDataRechnung(TypedDict): - dob: "ConfirmationToken.CreateParamsPaymentMethodDataRechnungDob" - """ - Customer's date of birth - """ - - class CreateParamsPaymentMethodDataRechnungDob(TypedDict): - day: int - """ - The day of birth, between 1 and 31. - """ - month: int - """ - The month of birth, between 1 and 12. - """ - year: int - """ - The four-digit year of birth. - """ - - class CreateParamsPaymentMethodDataRevolutPay(TypedDict): - pass - - class CreateParamsPaymentMethodDataSamsungPay(TypedDict): - pass - - class CreateParamsPaymentMethodDataSatispay(TypedDict): - pass - - class CreateParamsPaymentMethodDataSepaDebit(TypedDict): - iban: str - """ - IBAN of the bank account. - """ - - class CreateParamsPaymentMethodDataShopeepay(TypedDict): - pass - - class CreateParamsPaymentMethodDataSofort(TypedDict): - country: Literal["AT", "BE", "DE", "ES", "IT", "NL"] - """ - Two-letter ISO code representing the country the bank account is located in. - """ - - class CreateParamsPaymentMethodDataStripeBalance(TypedDict): - account: NotRequired[str] - """ - The connected account ID whose Stripe balance to use as the source of payment - """ - source_type: NotRequired[Literal["bank_account", "card", "fpx"]] - """ - The [source_type](https://docs.stripe.com/api/balance/balance_object#balance_object-available-source_types) of the balance - """ - - class CreateParamsPaymentMethodDataSwish(TypedDict): - pass - - class CreateParamsPaymentMethodDataTwint(TypedDict): - pass - - class CreateParamsPaymentMethodDataUsBankAccount(TypedDict): - account_holder_type: NotRequired[Literal["company", "individual"]] - """ - Account holder type: individual or company. - """ - account_number: NotRequired[str] - """ - Account number of the bank account. - """ - account_type: NotRequired[Literal["checking", "savings"]] - """ - Account type: checkings or savings. Defaults to checking if omitted. - """ - financial_connections_account: NotRequired[str] - """ - The ID of a Financial Connections Account to use as a payment method. - """ - routing_number: NotRequired[str] - """ - Routing number of the bank account. - """ - - class CreateParamsPaymentMethodDataWechatPay(TypedDict): - pass - - class CreateParamsPaymentMethodDataZip(TypedDict): - pass - - class CreateParamsPaymentMethodOptions(TypedDict): - card: NotRequired[ - "ConfirmationToken.CreateParamsPaymentMethodOptionsCard" - ] - """ - Configuration for any card payments confirmed using this ConfirmationToken. - """ - - class CreateParamsPaymentMethodOptionsCard(TypedDict): - installments: NotRequired[ - "ConfirmationToken.CreateParamsPaymentMethodOptionsCardInstallments" - ] - """ - Installment configuration for payments confirmed using this ConfirmationToken. - """ - - class CreateParamsPaymentMethodOptionsCardInstallments(TypedDict): - plan: "ConfirmationToken.CreateParamsPaymentMethodOptionsCardInstallmentsPlan" - """ - The selected installment plan to use for this payment attempt. - This parameter can only be provided during confirmation. - """ - - class CreateParamsPaymentMethodOptionsCardInstallmentsPlan(TypedDict): - count: NotRequired[int] - """ - For `fixed_count` installment plans, this is required. It represents the number of installment payments your customer will make to their credit card. - """ - interval: NotRequired[Literal["month"]] - """ - For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card. - One of `month`. - """ - type: Literal["bonus", "fixed_count", "revolving"] - """ - Type of installment plan, one of `fixed_count`, `bonus`, or `revolving`. - """ - - class CreateParamsShipping(TypedDict): - address: "ConfirmationToken.CreateParamsShippingAddress" - """ - Shipping address - """ - name: str - """ - Recipient name. - """ - phone: NotRequired["Literal['']|str"] - """ - Recipient phone (including extension) - """ - - class CreateParamsShippingAddress(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. - """ - - class RetrieveParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - created: int """ Time at which the object was created. Measured in seconds since the Unix epoch. @@ -2796,7 +1778,7 @@ class RetrieveParams(RequestOptions): @classmethod def retrieve( - cls, id: str, **params: Unpack["ConfirmationToken.RetrieveParams"] + cls, id: str, **params: Unpack["ConfirmationTokenRetrieveParams"] ) -> "ConfirmationToken": """ Retrieves an existing ConfirmationToken object @@ -2807,7 +1789,7 @@ def retrieve( @classmethod async def retrieve_async( - cls, id: str, **params: Unpack["ConfirmationToken.RetrieveParams"] + cls, id: str, **params: Unpack["ConfirmationTokenRetrieveParams"] ) -> "ConfirmationToken": """ Retrieves an existing ConfirmationToken object @@ -2821,7 +1803,7 @@ class TestHelpers(APIResourceTestHelpers["ConfirmationToken"]): @classmethod def create( - cls, **params: Unpack["ConfirmationToken.CreateParams"] + cls, **params: Unpack["ConfirmationTokenCreateParams"] ) -> "ConfirmationToken": """ Creates a test mode Confirmation Token server side for your integration tests. @@ -2837,7 +1819,7 @@ def create( @classmethod async def create_async( - cls, **params: Unpack["ConfirmationToken.CreateParams"] + cls, **params: Unpack["ConfirmationTokenCreateParams"] ) -> "ConfirmationToken": """ Creates a test mode Confirmation Token server side for your integration tests. diff --git a/stripe/_confirmation_token_service.py b/stripe/_confirmation_token_service.py index 4084329d2..b1cdeb633 100644 --- a/stripe/_confirmation_token_service.py +++ b/stripe/_confirmation_token_service.py @@ -4,21 +4,20 @@ from stripe._request_options import RequestOptions from stripe._stripe_service import StripeService from stripe._util import sanitize_id -from typing import List, Optional, cast -from typing_extensions import NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params._confirmation_token_retrieve_params import ( + ConfirmationTokenRetrieveParams, + ) -class ConfirmationTokenService(StripeService): - class RetrieveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ +class ConfirmationTokenService(StripeService): def retrieve( self, confirmation_token: str, - params: Optional["ConfirmationTokenService.RetrieveParams"] = None, + params: Optional["ConfirmationTokenRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> ConfirmationToken: """ @@ -40,7 +39,7 @@ def retrieve( async def retrieve_async( self, confirmation_token: str, - params: Optional["ConfirmationTokenService.RetrieveParams"] = None, + params: Optional["ConfirmationTokenRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> ConfirmationToken: """ diff --git a/stripe/_country_spec.py b/stripe/_country_spec.py index 04dc662ce..2b7f67ff5 100644 --- a/stripe/_country_spec.py +++ b/stripe/_country_spec.py @@ -2,10 +2,15 @@ # File generated from our OpenAPI spec from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource -from stripe._request_options import RequestOptions from stripe._stripe_object import StripeObject from typing import ClassVar, Dict, List -from typing_extensions import Literal, NotRequired, Unpack +from typing_extensions import Literal, Unpack, TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params._country_spec_list_params import CountrySpecListParams + from stripe.params._country_spec_retrieve_params import ( + CountrySpecRetrieveParams, + ) class CountrySpec(ListableAPIResource["CountrySpec"]): @@ -45,30 +50,6 @@ class Individual(StripeObject): individual: Individual _inner_class_types = {"company": Company, "individual": Individual} - class ListParams(RequestOptions): - 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 RetrieveParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - default_currency: str """ The default currency for this country. This applies to both payment methods and bank accounts. @@ -101,7 +82,7 @@ class RetrieveParams(RequestOptions): @classmethod def list( - cls, **params: Unpack["CountrySpec.ListParams"] + cls, **params: Unpack["CountrySpecListParams"] ) -> ListObject["CountrySpec"]: """ Lists all Country Spec objects available in the API. @@ -121,7 +102,7 @@ def list( @classmethod async def list_async( - cls, **params: Unpack["CountrySpec.ListParams"] + cls, **params: Unpack["CountrySpecListParams"] ) -> ListObject["CountrySpec"]: """ Lists all Country Spec objects available in the API. @@ -141,7 +122,7 @@ async def list_async( @classmethod def retrieve( - cls, id: str, **params: Unpack["CountrySpec.RetrieveParams"] + cls, id: str, **params: Unpack["CountrySpecRetrieveParams"] ) -> "CountrySpec": """ Returns a Country Spec for a given Country code. @@ -152,7 +133,7 @@ def retrieve( @classmethod async def retrieve_async( - cls, id: str, **params: Unpack["CountrySpec.RetrieveParams"] + cls, id: str, **params: Unpack["CountrySpecRetrieveParams"] ) -> "CountrySpec": """ Returns a Country Spec for a given Country code. diff --git a/stripe/_country_spec_service.py b/stripe/_country_spec_service.py index 581dbb41a..0e629d8fb 100644 --- a/stripe/_country_spec_service.py +++ b/stripe/_country_spec_service.py @@ -5,38 +5,20 @@ from stripe._request_options import RequestOptions from stripe._stripe_service import StripeService from stripe._util import sanitize_id -from typing import List, Optional, cast -from typing_extensions import NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params._country_spec_list_params import CountrySpecListParams + from stripe.params._country_spec_retrieve_params import ( + CountrySpecRetrieveParams, + ) -class CountrySpecService(StripeService): - class ListParams(TypedDict): - 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 RetrieveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ +class CountrySpecService(StripeService): def list( self, - params: Optional["CountrySpecService.ListParams"] = None, + params: Optional["CountrySpecListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[CountrySpec]: """ @@ -55,7 +37,7 @@ def list( async def list_async( self, - params: Optional["CountrySpecService.ListParams"] = None, + params: Optional["CountrySpecListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[CountrySpec]: """ @@ -75,7 +57,7 @@ async def list_async( def retrieve( self, country: str, - params: Optional["CountrySpecService.RetrieveParams"] = None, + params: Optional["CountrySpecRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> CountrySpec: """ @@ -97,7 +79,7 @@ def retrieve( async def retrieve_async( self, country: str, - params: Optional["CountrySpecService.RetrieveParams"] = None, + params: Optional["CountrySpecRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> CountrySpec: """ diff --git a/stripe/_coupon.py b/stripe/_coupon.py index 4c300c04e..d6d4a1e35 100644 --- a/stripe/_coupon.py +++ b/stripe/_coupon.py @@ -4,12 +4,18 @@ from stripe._deletable_api_resource import DeletableAPIResource from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource -from stripe._request_options import RequestOptions from stripe._stripe_object import StripeObject from stripe._updateable_api_resource import UpdateableAPIResource from stripe._util import class_method_variant, sanitize_id from typing import Any, ClassVar, Dict, List, Optional, cast, overload -from typing_extensions import Literal, NotRequired, TypedDict, Unpack +from typing_extensions import Literal, Unpack, TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params._coupon_create_params import CouponCreateParams + from stripe.params._coupon_delete_params import CouponDeleteParams + from stripe.params._coupon_list_params import CouponListParams + from stripe.params._coupon_modify_params import CouponModifyParams + from stripe.params._coupon_retrieve_params import CouponRetrieveParams class Coupon( @@ -52,163 +58,6 @@ class Script(StripeObject): The script implementation ID for this coupon. """ - class CreateParams(RequestOptions): - amount_off: NotRequired[int] - """ - A positive integer representing the amount to subtract from an invoice total (required if `percent_off` is not passed). - """ - applies_to: NotRequired["Coupon.CreateParamsAppliesTo"] - """ - A hash containing directions for what this Coupon will apply discounts to. - """ - currency: NotRequired[str] - """ - Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) of the `amount_off` parameter (required if `amount_off` is passed). - """ - currency_options: NotRequired[ - Dict[str, "Coupon.CreateParamsCurrencyOptions"] - ] - """ - Coupons defined in each available currency option (only supported if `amount_off` is passed). Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). - """ - duration: NotRequired[Literal["forever", "once", "repeating"]] - """ - Specifies how long the discount will be in effect if used on a subscription. Defaults to `once`. - """ - duration_in_months: NotRequired[int] - """ - Required only if `duration` is `repeating`, in which case it must be a positive integer that specifies the number of months the discount will be in effect. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - id: NotRequired[str] - """ - Unique string of your choice that will be used to identify this coupon when applying it to a customer. If you don't want to specify a particular code, you can leave the ID blank and we'll generate a random code for you. - """ - max_redemptions: NotRequired[int] - """ - A positive integer specifying the number of times the coupon can be redeemed before it's no longer valid. For example, you might have a 50% off coupon that the first 20 readers of your blog can use. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - name: NotRequired[str] - """ - Name of the coupon displayed to customers on, for instance invoices, or receipts. By default the `id` is shown if `name` is not set. - """ - percent_off: NotRequired[float] - """ - A positive float larger than 0, and smaller or equal to 100, that represents the discount the coupon will apply (required if `amount_off` is not passed). - """ - redeem_by: NotRequired[int] - """ - Unix timestamp specifying the last time at which the coupon can be redeemed. After the redeem_by date, the coupon can no longer be applied to new customers. - """ - script: NotRequired["Coupon.CreateParamsScript"] - """ - Configuration of the [script](https://docs.stripe.com/billing/subscriptions/script-coupons) used to calculate the discount. - """ - - class CreateParamsAppliesTo(TypedDict): - products: NotRequired[List[str]] - """ - An array of Product IDs that this Coupon will apply to. - """ - - class CreateParamsCurrencyOptions(TypedDict): - amount_off: int - """ - A positive integer representing the amount to subtract from an invoice total. - """ - - class CreateParamsScript(TypedDict): - configuration: Dict[str, Any] - """ - The configuration values of the script. The keys and values are specific to the script implementation. - """ - id: str - """ - The script implementation ID for this coupon. - """ - - class DeleteParams(RequestOptions): - pass - - class ListParams(RequestOptions): - created: NotRequired["Coupon.ListParamsCreated|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 ListParamsCreated(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) - """ - - class ModifyParams(RequestOptions): - currency_options: NotRequired[ - Dict[str, "Coupon.ModifyParamsCurrencyOptions"] - ] - """ - Coupons defined in each available currency option (only supported if the coupon is amount-based). Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - name: NotRequired[str] - """ - Name of the coupon displayed to customers on, for instance invoices, or receipts. By default the `id` is shown if `name` is not set. - """ - - class ModifyParamsCurrencyOptions(TypedDict): - amount_off: int - """ - A positive integer representing the amount to subtract from an invoice total. - """ - - class RetrieveParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - amount_off: Optional[int] """ Amount (in the `currency` specified) that will be taken off the subtotal of any invoices for this customer. @@ -288,7 +137,7 @@ class RetrieveParams(RequestOptions): """ @classmethod - def create(cls, **params: Unpack["Coupon.CreateParams"]) -> "Coupon": + def create(cls, **params: Unpack["CouponCreateParams"]) -> "Coupon": """ You can create coupons easily via the [coupon management](https://dashboard.stripe.com/coupons) page of the Stripe dashboard. Coupon creation is also accessible via the API if you need to create coupons on the fly. @@ -305,7 +154,7 @@ def create(cls, **params: Unpack["Coupon.CreateParams"]) -> "Coupon": @classmethod async def create_async( - cls, **params: Unpack["Coupon.CreateParams"] + cls, **params: Unpack["CouponCreateParams"] ) -> "Coupon": """ You can create coupons easily via the [coupon management](https://dashboard.stripe.com/coupons) page of the Stripe dashboard. Coupon creation is also accessible via the API if you need to create coupons on the fly. @@ -323,7 +172,7 @@ async def create_async( @classmethod def _cls_delete( - cls, sid: str, **params: Unpack["Coupon.DeleteParams"] + cls, sid: str, **params: Unpack["CouponDeleteParams"] ) -> "Coupon": """ You can delete coupons via the [coupon management](https://dashboard.stripe.com/coupons) page of the Stripe dashboard. However, deleting a coupon does not affect any customers who have already applied the coupon; it means that new customers can't redeem the coupon. You can also delete coupons via the API. @@ -340,14 +189,14 @@ def _cls_delete( @overload @staticmethod - def delete(sid: str, **params: Unpack["Coupon.DeleteParams"]) -> "Coupon": + def delete(sid: str, **params: Unpack["CouponDeleteParams"]) -> "Coupon": """ You can delete coupons via the [coupon management](https://dashboard.stripe.com/coupons) page of the Stripe dashboard. However, deleting a coupon does not affect any customers who have already applied the coupon; it means that new customers can't redeem the coupon. You can also delete coupons via the API. """ ... @overload - def delete(self, **params: Unpack["Coupon.DeleteParams"]) -> "Coupon": + def delete(self, **params: Unpack["CouponDeleteParams"]) -> "Coupon": """ You can delete coupons via the [coupon management](https://dashboard.stripe.com/coupons) page of the Stripe dashboard. However, deleting a coupon does not affect any customers who have already applied the coupon; it means that new customers can't redeem the coupon. You can also delete coupons via the API. """ @@ -355,7 +204,7 @@ def delete(self, **params: Unpack["Coupon.DeleteParams"]) -> "Coupon": @class_method_variant("_cls_delete") def delete( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Coupon.DeleteParams"] + self, **params: Unpack["CouponDeleteParams"] ) -> "Coupon": """ You can delete coupons via the [coupon management](https://dashboard.stripe.com/coupons) page of the Stripe dashboard. However, deleting a coupon does not affect any customers who have already applied the coupon; it means that new customers can't redeem the coupon. You can also delete coupons via the API. @@ -368,7 +217,7 @@ def delete( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_delete_async( - cls, sid: str, **params: Unpack["Coupon.DeleteParams"] + cls, sid: str, **params: Unpack["CouponDeleteParams"] ) -> "Coupon": """ You can delete coupons via the [coupon management](https://dashboard.stripe.com/coupons) page of the Stripe dashboard. However, deleting a coupon does not affect any customers who have already applied the coupon; it means that new customers can't redeem the coupon. You can also delete coupons via the API. @@ -386,7 +235,7 @@ async def _cls_delete_async( @overload @staticmethod async def delete_async( - sid: str, **params: Unpack["Coupon.DeleteParams"] + sid: str, **params: Unpack["CouponDeleteParams"] ) -> "Coupon": """ You can delete coupons via the [coupon management](https://dashboard.stripe.com/coupons) page of the Stripe dashboard. However, deleting a coupon does not affect any customers who have already applied the coupon; it means that new customers can't redeem the coupon. You can also delete coupons via the API. @@ -395,7 +244,7 @@ async def delete_async( @overload async def delete_async( - self, **params: Unpack["Coupon.DeleteParams"] + self, **params: Unpack["CouponDeleteParams"] ) -> "Coupon": """ You can delete coupons via the [coupon management](https://dashboard.stripe.com/coupons) page of the Stripe dashboard. However, deleting a coupon does not affect any customers who have already applied the coupon; it means that new customers can't redeem the coupon. You can also delete coupons via the API. @@ -404,7 +253,7 @@ async def delete_async( @class_method_variant("_cls_delete_async") async def delete_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Coupon.DeleteParams"] + self, **params: Unpack["CouponDeleteParams"] ) -> "Coupon": """ You can delete coupons via the [coupon management](https://dashboard.stripe.com/coupons) page of the Stripe dashboard. However, deleting a coupon does not affect any customers who have already applied the coupon; it means that new customers can't redeem the coupon. You can also delete coupons via the API. @@ -417,7 +266,7 @@ async def delete_async( # pyright: ignore[reportGeneralTypeIssues] @classmethod def list( - cls, **params: Unpack["Coupon.ListParams"] + cls, **params: Unpack["CouponListParams"] ) -> ListObject["Coupon"]: """ Returns a list of your coupons. @@ -437,7 +286,7 @@ def list( @classmethod async def list_async( - cls, **params: Unpack["Coupon.ListParams"] + cls, **params: Unpack["CouponListParams"] ) -> ListObject["Coupon"]: """ Returns a list of your coupons. @@ -457,7 +306,7 @@ async def list_async( @classmethod def modify( - cls, id: str, **params: Unpack["Coupon.ModifyParams"] + cls, id: str, **params: Unpack["CouponModifyParams"] ) -> "Coupon": """ Updates the metadata of a coupon. Other coupon details (currency, duration, amount_off) are, by design, not editable. @@ -474,7 +323,7 @@ def modify( @classmethod async def modify_async( - cls, id: str, **params: Unpack["Coupon.ModifyParams"] + cls, id: str, **params: Unpack["CouponModifyParams"] ) -> "Coupon": """ Updates the metadata of a coupon. Other coupon details (currency, duration, amount_off) are, by design, not editable. @@ -491,7 +340,7 @@ async def modify_async( @classmethod def retrieve( - cls, id: str, **params: Unpack["Coupon.RetrieveParams"] + cls, id: str, **params: Unpack["CouponRetrieveParams"] ) -> "Coupon": """ Retrieves the coupon with the given ID. @@ -502,7 +351,7 @@ def retrieve( @classmethod async def retrieve_async( - cls, id: str, **params: Unpack["Coupon.RetrieveParams"] + cls, id: str, **params: Unpack["CouponRetrieveParams"] ) -> "Coupon": """ Retrieves the coupon with the given ID. diff --git a/stripe/_coupon_service.py b/stripe/_coupon_service.py index 1abb8c1c4..f6df47979 100644 --- a/stripe/_coupon_service.py +++ b/stripe/_coupon_service.py @@ -5,172 +5,22 @@ from stripe._request_options import RequestOptions from stripe._stripe_service import StripeService from stripe._util import sanitize_id -from typing import Any, Dict, List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params._coupon_create_params import CouponCreateParams + from stripe.params._coupon_delete_params import CouponDeleteParams + from stripe.params._coupon_list_params import CouponListParams + from stripe.params._coupon_retrieve_params import CouponRetrieveParams + from stripe.params._coupon_update_params import CouponUpdateParams -class CouponService(StripeService): - class CreateParams(TypedDict): - amount_off: NotRequired[int] - """ - A positive integer representing the amount to subtract from an invoice total (required if `percent_off` is not passed). - """ - applies_to: NotRequired["CouponService.CreateParamsAppliesTo"] - """ - A hash containing directions for what this Coupon will apply discounts to. - """ - currency: NotRequired[str] - """ - Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) of the `amount_off` parameter (required if `amount_off` is passed). - """ - currency_options: NotRequired[ - Dict[str, "CouponService.CreateParamsCurrencyOptions"] - ] - """ - Coupons defined in each available currency option (only supported if `amount_off` is passed). Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). - """ - duration: NotRequired[Literal["forever", "once", "repeating"]] - """ - Specifies how long the discount will be in effect if used on a subscription. Defaults to `once`. - """ - duration_in_months: NotRequired[int] - """ - Required only if `duration` is `repeating`, in which case it must be a positive integer that specifies the number of months the discount will be in effect. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - id: NotRequired[str] - """ - Unique string of your choice that will be used to identify this coupon when applying it to a customer. If you don't want to specify a particular code, you can leave the ID blank and we'll generate a random code for you. - """ - max_redemptions: NotRequired[int] - """ - A positive integer specifying the number of times the coupon can be redeemed before it's no longer valid. For example, you might have a 50% off coupon that the first 20 readers of your blog can use. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - name: NotRequired[str] - """ - Name of the coupon displayed to customers on, for instance invoices, or receipts. By default the `id` is shown if `name` is not set. - """ - percent_off: NotRequired[float] - """ - A positive float larger than 0, and smaller or equal to 100, that represents the discount the coupon will apply (required if `amount_off` is not passed). - """ - redeem_by: NotRequired[int] - """ - Unix timestamp specifying the last time at which the coupon can be redeemed. After the redeem_by date, the coupon can no longer be applied to new customers. - """ - script: NotRequired["CouponService.CreateParamsScript"] - """ - Configuration of the [script](https://docs.stripe.com/billing/subscriptions/script-coupons) used to calculate the discount. - """ - - class CreateParamsAppliesTo(TypedDict): - products: NotRequired[List[str]] - """ - An array of Product IDs that this Coupon will apply to. - """ - - class CreateParamsCurrencyOptions(TypedDict): - amount_off: int - """ - A positive integer representing the amount to subtract from an invoice total. - """ - - class CreateParamsScript(TypedDict): - configuration: Dict[str, Any] - """ - The configuration values of the script. The keys and values are specific to the script implementation. - """ - id: str - """ - The script implementation ID for this coupon. - """ - - class DeleteParams(TypedDict): - pass - - class ListParams(TypedDict): - created: NotRequired["CouponService.ListParamsCreated|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 ListParamsCreated(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) - """ - - class RetrieveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class UpdateParams(TypedDict): - currency_options: NotRequired[ - Dict[str, "CouponService.UpdateParamsCurrencyOptions"] - ] - """ - Coupons defined in each available currency option (only supported if the coupon is amount-based). Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - name: NotRequired[str] - """ - Name of the coupon displayed to customers on, for instance invoices, or receipts. By default the `id` is shown if `name` is not set. - """ - - class UpdateParamsCurrencyOptions(TypedDict): - amount_off: int - """ - A positive integer representing the amount to subtract from an invoice total. - """ +class CouponService(StripeService): def delete( self, coupon: str, - params: Optional["CouponService.DeleteParams"] = None, + params: Optional["CouponDeleteParams"] = None, options: Optional[RequestOptions] = None, ) -> Coupon: """ @@ -190,7 +40,7 @@ def delete( async def delete_async( self, coupon: str, - params: Optional["CouponService.DeleteParams"] = None, + params: Optional["CouponDeleteParams"] = None, options: Optional[RequestOptions] = None, ) -> Coupon: """ @@ -210,7 +60,7 @@ async def delete_async( def retrieve( self, coupon: str, - params: Optional["CouponService.RetrieveParams"] = None, + params: Optional["CouponRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Coupon: """ @@ -230,7 +80,7 @@ def retrieve( async def retrieve_async( self, coupon: str, - params: Optional["CouponService.RetrieveParams"] = None, + params: Optional["CouponRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Coupon: """ @@ -250,7 +100,7 @@ async def retrieve_async( def update( self, coupon: str, - params: Optional["CouponService.UpdateParams"] = None, + params: Optional["CouponUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> Coupon: """ @@ -270,7 +120,7 @@ def update( async def update_async( self, coupon: str, - params: Optional["CouponService.UpdateParams"] = None, + params: Optional["CouponUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> Coupon: """ @@ -289,7 +139,7 @@ async def update_async( def list( self, - params: Optional["CouponService.ListParams"] = None, + params: Optional["CouponListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[Coupon]: """ @@ -308,7 +158,7 @@ def list( async def list_async( self, - params: Optional["CouponService.ListParams"] = None, + params: Optional["CouponListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[Coupon]: """ @@ -327,7 +177,7 @@ async def list_async( def create( self, - params: Optional["CouponService.CreateParams"] = None, + params: Optional["CouponCreateParams"] = None, options: Optional[RequestOptions] = None, ) -> Coupon: """ @@ -348,7 +198,7 @@ def create( async def create_async( self, - params: Optional["CouponService.CreateParams"] = None, + params: Optional["CouponCreateParams"] = None, options: Optional[RequestOptions] = None, ) -> Coupon: """ diff --git a/stripe/_credit_note.py b/stripe/_credit_note.py index 79e79f7c9..631acc50b 100644 --- a/stripe/_credit_note.py +++ b/stripe/_credit_note.py @@ -5,18 +5,11 @@ from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource from stripe._nested_resource_class_methods import nested_resource_class_methods -from stripe._request_options import RequestOptions from stripe._stripe_object import StripeObject from stripe._updateable_api_resource import UpdateableAPIResource from stripe._util import class_method_variant, sanitize_id from typing import ClassVar, Dict, List, Optional, cast, overload -from typing_extensions import ( - Literal, - NotRequired, - TypedDict, - Unpack, - TYPE_CHECKING, -) +from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: from stripe._credit_note_line_item import CreditNoteLineItem @@ -30,6 +23,24 @@ from stripe.billing._credit_balance_transaction import ( CreditBalanceTransaction, ) + from stripe.params._credit_note_create_params import CreditNoteCreateParams + from stripe.params._credit_note_list_lines_params import ( + CreditNoteListLinesParams, + ) + from stripe.params._credit_note_list_params import CreditNoteListParams + from stripe.params._credit_note_modify_params import CreditNoteModifyParams + from stripe.params._credit_note_preview_lines_params import ( + CreditNotePreviewLinesParams, + ) + from stripe.params._credit_note_preview_params import ( + CreditNotePreviewParams, + ) + from stripe.params._credit_note_retrieve_params import ( + CreditNoteRetrieveParams, + ) + from stripe.params._credit_note_void_credit_note_params import ( + CreditNoteVoidCreditNoteParams, + ) @nested_resource_class_methods("line") @@ -213,579 +224,6 @@ class TaxRateDetails(StripeObject): """ _inner_class_types = {"tax_rate_details": TaxRateDetails} - class CreateParams(RequestOptions): - amount: NotRequired[int] - """ - The integer amount in cents (or local equivalent) representing the total amount of the credit note. One of `amount`, `lines`, or `shipping_cost` must be provided. - """ - credit_amount: NotRequired[int] - """ - The integer amount in cents (or local equivalent) representing the amount to credit the customer's balance, which will be automatically applied to their next invoice. - """ - effective_at: NotRequired[int] - """ - The date when this credit note is in effect. Same as `created` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the credit note PDF. - """ - email_type: NotRequired[Literal["credit_note", "none"]] - """ - Type of email to send to the customer, one of `credit_note` or `none` and the default is `credit_note`. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - invoice: str - """ - ID of the invoice. - """ - lines: NotRequired[List["CreditNote.CreateParamsLine"]] - """ - Line items that make up the credit note. One of `amount`, `lines`, or `shipping_cost` must be provided. - """ - memo: NotRequired[str] - """ - The credit note's memo appears on the credit note PDF. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - out_of_band_amount: NotRequired[int] - """ - The integer amount in cents (or local equivalent) representing the amount that is credited outside of Stripe. - """ - reason: NotRequired[ - Literal[ - "duplicate", - "fraudulent", - "order_change", - "product_unsatisfactory", - ] - ] - """ - Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory` - """ - refund_amount: NotRequired[int] - """ - The integer amount in cents (or local equivalent) representing the amount to refund. If set, a refund will be created for the charge associated with the invoice. - """ - refunds: NotRequired[List["CreditNote.CreateParamsRefund"]] - """ - Refunds to link to this credit note. - """ - shipping_cost: NotRequired["CreditNote.CreateParamsShippingCost"] - """ - When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note. One of `amount`, `lines`, or `shipping_cost` must be provided. - """ - - class CreateParamsLine(TypedDict): - amount: NotRequired[int] - """ - The line item amount to credit. Only valid when `type` is `invoice_line_item`. If invoice is set up with `automatic_tax[enabled]=true`, this amount is tax exclusive - """ - description: NotRequired[str] - """ - The description of the credit note line item. Only valid when the `type` is `custom_line_item`. - """ - invoice_line_item: NotRequired[str] - """ - The invoice line item to credit. Only valid when the `type` is `invoice_line_item`. - """ - quantity: NotRequired[int] - """ - The line item quantity to credit. - """ - tax_amounts: NotRequired[ - "Literal['']|List[CreditNote.CreateParamsLineTaxAmount]" - ] - """ - A list of up to 10 tax amounts for the credit note line item. Cannot be mixed with `tax_rates`. - """ - tax_rates: NotRequired["Literal['']|List[str]"] - """ - The tax rates which apply to the credit note line item. Only valid when the `type` is `custom_line_item` and cannot be mixed with `tax_amounts`. - """ - type: Literal["custom_line_item", "invoice_line_item"] - """ - Type of the credit note line item, one of `invoice_line_item` or `custom_line_item` - """ - unit_amount: NotRequired[int] - """ - The integer unit amount in cents (or local equivalent) of the credit note line item. This `unit_amount` will be multiplied by the quantity to get the full amount to credit for this line item. Only valid when `type` is `custom_line_item`. - """ - unit_amount_decimal: NotRequired[str] - """ - Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - """ - - class CreateParamsLineTaxAmount(TypedDict): - amount: int - """ - The amount, in cents (or local equivalent), of the tax. - """ - tax_rate: str - """ - The id of the tax rate for this tax amount. The tax rate must have been automatically created by Stripe. - """ - taxable_amount: int - """ - The amount on which tax is calculated, in cents (or local equivalent). - """ - - class CreateParamsRefund(TypedDict): - amount_refunded: NotRequired[int] - """ - Amount of the refund that applies to this credit note, in cents (or local equivalent). Defaults to the entire refund amount. - """ - payment_record_refund: NotRequired[ - "CreditNote.CreateParamsRefundPaymentRecordRefund" - ] - """ - The PaymentRecord refund details to link to this credit note. Required when `type` is `payment_record_refund`. - """ - refund: NotRequired[str] - """ - ID of an existing refund to link this credit note to. Required when `type` is `refund`. - """ - type: NotRequired[Literal["payment_record_refund", "refund"]] - """ - Type of the refund, one of `refund` or `payment_record_refund`. Defaults to `refund`. - """ - - class CreateParamsRefundPaymentRecordRefund(TypedDict): - payment_record: str - """ - The ID of the PaymentRecord with the refund to link to this credit note. - """ - refund_group: str - """ - The PaymentRecord refund group to link to this credit note. For refunds processed off-Stripe, this will correspond to the `processor_details.custom.refund_reference` field provided when reporting the refund on the PaymentRecord. - """ - - class CreateParamsShippingCost(TypedDict): - shipping_rate: NotRequired[str] - """ - The ID of the shipping rate to use for this order. - """ - - class ListLinesParams(RequestOptions): - 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 ListParams(RequestOptions): - created: NotRequired["CreditNote.ListParamsCreated|int"] - """ - Only return credit notes that were created during the given date interval. - """ - customer: NotRequired[str] - """ - Only return credit notes for the customer specified by this customer ID. - """ - customer_account: NotRequired[str] - """ - Only return credit notes for the account specified by this account ID. - """ - 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. - """ - invoice: NotRequired[str] - """ - Only return credit notes for the invoice specified by this invoice ID. - """ - 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 ListParamsCreated(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) - """ - - class ModifyParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - memo: NotRequired[str] - """ - Credit note memo. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - - class PreviewLinesParams(RequestOptions): - amount: NotRequired[int] - """ - The integer amount in cents (or local equivalent) representing the total amount of the credit note. One of `amount`, `lines`, or `shipping_cost` must be provided. - """ - credit_amount: NotRequired[int] - """ - The integer amount in cents (or local equivalent) representing the amount to credit the customer's balance, which will be automatically applied to their next invoice. - """ - effective_at: NotRequired[int] - """ - The date when this credit note is in effect. Same as `created` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the credit note PDF. - """ - email_type: NotRequired[Literal["credit_note", "none"]] - """ - Type of email to send to the customer, one of `credit_note` or `none` and the default is `credit_note`. - """ - 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. - """ - invoice: str - """ - ID of the invoice. - """ - 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. - """ - lines: NotRequired[List["CreditNote.PreviewLinesParamsLine"]] - """ - Line items that make up the credit note. One of `amount`, `lines`, or `shipping_cost` must be provided. - """ - memo: NotRequired[str] - """ - The credit note's memo appears on the credit note PDF. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - out_of_band_amount: NotRequired[int] - """ - The integer amount in cents (or local equivalent) representing the amount that is credited outside of Stripe. - """ - reason: NotRequired[ - Literal[ - "duplicate", - "fraudulent", - "order_change", - "product_unsatisfactory", - ] - ] - """ - Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory` - """ - refund_amount: NotRequired[int] - """ - The integer amount in cents (or local equivalent) representing the amount to refund. If set, a refund will be created for the charge associated with the invoice. - """ - refunds: NotRequired[List["CreditNote.PreviewLinesParamsRefund"]] - """ - Refunds to link to this credit note. - """ - shipping_cost: NotRequired["CreditNote.PreviewLinesParamsShippingCost"] - """ - When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note. One of `amount`, `lines`, or `shipping_cost` must be provided. - """ - 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 PreviewLinesParamsLine(TypedDict): - amount: NotRequired[int] - """ - The line item amount to credit. Only valid when `type` is `invoice_line_item`. If invoice is set up with `automatic_tax[enabled]=true`, this amount is tax exclusive - """ - description: NotRequired[str] - """ - The description of the credit note line item. Only valid when the `type` is `custom_line_item`. - """ - invoice_line_item: NotRequired[str] - """ - The invoice line item to credit. Only valid when the `type` is `invoice_line_item`. - """ - quantity: NotRequired[int] - """ - The line item quantity to credit. - """ - tax_amounts: NotRequired[ - "Literal['']|List[CreditNote.PreviewLinesParamsLineTaxAmount]" - ] - """ - A list of up to 10 tax amounts for the credit note line item. Cannot be mixed with `tax_rates`. - """ - tax_rates: NotRequired["Literal['']|List[str]"] - """ - The tax rates which apply to the credit note line item. Only valid when the `type` is `custom_line_item` and cannot be mixed with `tax_amounts`. - """ - type: Literal["custom_line_item", "invoice_line_item"] - """ - Type of the credit note line item, one of `invoice_line_item` or `custom_line_item` - """ - unit_amount: NotRequired[int] - """ - The integer unit amount in cents (or local equivalent) of the credit note line item. This `unit_amount` will be multiplied by the quantity to get the full amount to credit for this line item. Only valid when `type` is `custom_line_item`. - """ - unit_amount_decimal: NotRequired[str] - """ - Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - """ - - class PreviewLinesParamsLineTaxAmount(TypedDict): - amount: int - """ - The amount, in cents (or local equivalent), of the tax. - """ - tax_rate: str - """ - The id of the tax rate for this tax amount. The tax rate must have been automatically created by Stripe. - """ - taxable_amount: int - """ - The amount on which tax is calculated, in cents (or local equivalent). - """ - - class PreviewLinesParamsRefund(TypedDict): - amount_refunded: NotRequired[int] - """ - Amount of the refund that applies to this credit note, in cents (or local equivalent). Defaults to the entire refund amount. - """ - payment_record_refund: NotRequired[ - "CreditNote.PreviewLinesParamsRefundPaymentRecordRefund" - ] - """ - The PaymentRecord refund details to link to this credit note. Required when `type` is `payment_record_refund`. - """ - refund: NotRequired[str] - """ - ID of an existing refund to link this credit note to. Required when `type` is `refund`. - """ - type: NotRequired[Literal["payment_record_refund", "refund"]] - """ - Type of the refund, one of `refund` or `payment_record_refund`. Defaults to `refund`. - """ - - class PreviewLinesParamsRefundPaymentRecordRefund(TypedDict): - payment_record: str - """ - The ID of the PaymentRecord with the refund to link to this credit note. - """ - refund_group: str - """ - The PaymentRecord refund group to link to this credit note. For refunds processed off-Stripe, this will correspond to the `processor_details.custom.refund_reference` field provided when reporting the refund on the PaymentRecord. - """ - - class PreviewLinesParamsShippingCost(TypedDict): - shipping_rate: NotRequired[str] - """ - The ID of the shipping rate to use for this order. - """ - - class PreviewParams(RequestOptions): - amount: NotRequired[int] - """ - The integer amount in cents (or local equivalent) representing the total amount of the credit note. One of `amount`, `lines`, or `shipping_cost` must be provided. - """ - credit_amount: NotRequired[int] - """ - The integer amount in cents (or local equivalent) representing the amount to credit the customer's balance, which will be automatically applied to their next invoice. - """ - effective_at: NotRequired[int] - """ - The date when this credit note is in effect. Same as `created` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the credit note PDF. - """ - email_type: NotRequired[Literal["credit_note", "none"]] - """ - Type of email to send to the customer, one of `credit_note` or `none` and the default is `credit_note`. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - invoice: str - """ - ID of the invoice. - """ - lines: NotRequired[List["CreditNote.PreviewParamsLine"]] - """ - Line items that make up the credit note. One of `amount`, `lines`, or `shipping_cost` must be provided. - """ - memo: NotRequired[str] - """ - The credit note's memo appears on the credit note PDF. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - out_of_band_amount: NotRequired[int] - """ - The integer amount in cents (or local equivalent) representing the amount that is credited outside of Stripe. - """ - reason: NotRequired[ - Literal[ - "duplicate", - "fraudulent", - "order_change", - "product_unsatisfactory", - ] - ] - """ - Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory` - """ - refund_amount: NotRequired[int] - """ - The integer amount in cents (or local equivalent) representing the amount to refund. If set, a refund will be created for the charge associated with the invoice. - """ - refunds: NotRequired[List["CreditNote.PreviewParamsRefund"]] - """ - Refunds to link to this credit note. - """ - shipping_cost: NotRequired["CreditNote.PreviewParamsShippingCost"] - """ - When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note. One of `amount`, `lines`, or `shipping_cost` must be provided. - """ - - class PreviewParamsLine(TypedDict): - amount: NotRequired[int] - """ - The line item amount to credit. Only valid when `type` is `invoice_line_item`. If invoice is set up with `automatic_tax[enabled]=true`, this amount is tax exclusive - """ - description: NotRequired[str] - """ - The description of the credit note line item. Only valid when the `type` is `custom_line_item`. - """ - invoice_line_item: NotRequired[str] - """ - The invoice line item to credit. Only valid when the `type` is `invoice_line_item`. - """ - quantity: NotRequired[int] - """ - The line item quantity to credit. - """ - tax_amounts: NotRequired[ - "Literal['']|List[CreditNote.PreviewParamsLineTaxAmount]" - ] - """ - A list of up to 10 tax amounts for the credit note line item. Cannot be mixed with `tax_rates`. - """ - tax_rates: NotRequired["Literal['']|List[str]"] - """ - The tax rates which apply to the credit note line item. Only valid when the `type` is `custom_line_item` and cannot be mixed with `tax_amounts`. - """ - type: Literal["custom_line_item", "invoice_line_item"] - """ - Type of the credit note line item, one of `invoice_line_item` or `custom_line_item` - """ - unit_amount: NotRequired[int] - """ - The integer unit amount in cents (or local equivalent) of the credit note line item. This `unit_amount` will be multiplied by the quantity to get the full amount to credit for this line item. Only valid when `type` is `custom_line_item`. - """ - unit_amount_decimal: NotRequired[str] - """ - Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - """ - - class PreviewParamsLineTaxAmount(TypedDict): - amount: int - """ - The amount, in cents (or local equivalent), of the tax. - """ - tax_rate: str - """ - The id of the tax rate for this tax amount. The tax rate must have been automatically created by Stripe. - """ - taxable_amount: int - """ - The amount on which tax is calculated, in cents (or local equivalent). - """ - - class PreviewParamsRefund(TypedDict): - amount_refunded: NotRequired[int] - """ - Amount of the refund that applies to this credit note, in cents (or local equivalent). Defaults to the entire refund amount. - """ - payment_record_refund: NotRequired[ - "CreditNote.PreviewParamsRefundPaymentRecordRefund" - ] - """ - The PaymentRecord refund details to link to this credit note. Required when `type` is `payment_record_refund`. - """ - refund: NotRequired[str] - """ - ID of an existing refund to link this credit note to. Required when `type` is `refund`. - """ - type: NotRequired[Literal["payment_record_refund", "refund"]] - """ - Type of the refund, one of `refund` or `payment_record_refund`. Defaults to `refund`. - """ - - class PreviewParamsRefundPaymentRecordRefund(TypedDict): - payment_record: str - """ - The ID of the PaymentRecord with the refund to link to this credit note. - """ - refund_group: str - """ - The PaymentRecord refund group to link to this credit note. For refunds processed off-Stripe, this will correspond to the `processor_details.custom.refund_reference` field provided when reporting the refund on the PaymentRecord. - """ - - class PreviewParamsShippingCost(TypedDict): - shipping_rate: NotRequired[str] - """ - The ID of the shipping rate to use for this order. - """ - - class RetrieveParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class VoidCreditNoteParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - amount: int """ The integer amount in cents (or local equivalent) representing the total amount of the credit note, including tax. @@ -931,7 +369,7 @@ class VoidCreditNoteParams(RequestOptions): @classmethod def create( - cls, **params: Unpack["CreditNote.CreateParams"] + cls, **params: Unpack["CreditNoteCreateParams"] ) -> "CreditNote": """ Issue a credit note to adjust the amount of a finalized invoice. A credit note will first reduce the invoice's amount_remaining (and amount_due), but not below zero. @@ -959,7 +397,7 @@ def create( @classmethod async def create_async( - cls, **params: Unpack["CreditNote.CreateParams"] + cls, **params: Unpack["CreditNoteCreateParams"] ) -> "CreditNote": """ Issue a credit note to adjust the amount of a finalized invoice. A credit note will first reduce the invoice's amount_remaining (and amount_due), but not below zero. @@ -987,7 +425,7 @@ async def create_async( @classmethod def list( - cls, **params: Unpack["CreditNote.ListParams"] + cls, **params: Unpack["CreditNoteListParams"] ) -> ListObject["CreditNote"]: """ Returns a list of credit notes. @@ -1007,7 +445,7 @@ def list( @classmethod async def list_async( - cls, **params: Unpack["CreditNote.ListParams"] + cls, **params: Unpack["CreditNoteListParams"] ) -> ListObject["CreditNote"]: """ Returns a list of credit notes. @@ -1027,7 +465,7 @@ async def list_async( @classmethod def modify( - cls, id: str, **params: Unpack["CreditNote.ModifyParams"] + cls, id: str, **params: Unpack["CreditNoteModifyParams"] ) -> "CreditNote": """ Updates an existing credit note. @@ -1044,7 +482,7 @@ def modify( @classmethod async def modify_async( - cls, id: str, **params: Unpack["CreditNote.ModifyParams"] + cls, id: str, **params: Unpack["CreditNoteModifyParams"] ) -> "CreditNote": """ Updates an existing credit note. @@ -1061,7 +499,7 @@ async def modify_async( @classmethod def preview( - cls, **params: Unpack["CreditNote.PreviewParams"] + cls, **params: Unpack["CreditNotePreviewParams"] ) -> "CreditNote": """ Get a preview of a credit note without creating it. @@ -1077,7 +515,7 @@ def preview( @classmethod async def preview_async( - cls, **params: Unpack["CreditNote.PreviewParams"] + cls, **params: Unpack["CreditNotePreviewParams"] ) -> "CreditNote": """ Get a preview of a credit note without creating it. @@ -1093,7 +531,7 @@ async def preview_async( @classmethod def preview_lines( - cls, **params: Unpack["CreditNote.PreviewLinesParams"] + cls, **params: Unpack["CreditNotePreviewLinesParams"] ) -> ListObject["CreditNoteLineItem"]: """ When retrieving a credit note preview, you'll get a lines property containing the first handful of those items. This URL you can retrieve the full (paginated) list of line items. @@ -1109,7 +547,7 @@ def preview_lines( @classmethod async def preview_lines_async( - cls, **params: Unpack["CreditNote.PreviewLinesParams"] + cls, **params: Unpack["CreditNotePreviewLinesParams"] ) -> ListObject["CreditNoteLineItem"]: """ When retrieving a credit note preview, you'll get a lines property containing the first handful of those items. This URL you can retrieve the full (paginated) list of line items. @@ -1125,7 +563,7 @@ async def preview_lines_async( @classmethod def retrieve( - cls, id: str, **params: Unpack["CreditNote.RetrieveParams"] + cls, id: str, **params: Unpack["CreditNoteRetrieveParams"] ) -> "CreditNote": """ Retrieves the credit note object with the given identifier. @@ -1136,7 +574,7 @@ def retrieve( @classmethod async def retrieve_async( - cls, id: str, **params: Unpack["CreditNote.RetrieveParams"] + cls, id: str, **params: Unpack["CreditNoteRetrieveParams"] ) -> "CreditNote": """ Retrieves the credit note object with the given identifier. @@ -1147,7 +585,7 @@ async def retrieve_async( @classmethod def _cls_void_credit_note( - cls, id: str, **params: Unpack["CreditNote.VoidCreditNoteParams"] + cls, id: str, **params: Unpack["CreditNoteVoidCreditNoteParams"] ) -> "CreditNote": """ Marks a credit note as void. Learn more about [voiding credit notes](https://docs.stripe.com/docs/billing/invoices/credit-notes#voiding). @@ -1164,7 +602,7 @@ def _cls_void_credit_note( @overload @staticmethod def void_credit_note( - id: str, **params: Unpack["CreditNote.VoidCreditNoteParams"] + id: str, **params: Unpack["CreditNoteVoidCreditNoteParams"] ) -> "CreditNote": """ Marks a credit note as void. Learn more about [voiding credit notes](https://docs.stripe.com/docs/billing/invoices/credit-notes#voiding). @@ -1173,7 +611,7 @@ def void_credit_note( @overload def void_credit_note( - self, **params: Unpack["CreditNote.VoidCreditNoteParams"] + self, **params: Unpack["CreditNoteVoidCreditNoteParams"] ) -> "CreditNote": """ Marks a credit note as void. Learn more about [voiding credit notes](https://docs.stripe.com/docs/billing/invoices/credit-notes#voiding). @@ -1182,7 +620,7 @@ def void_credit_note( @class_method_variant("_cls_void_credit_note") def void_credit_note( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["CreditNote.VoidCreditNoteParams"] + self, **params: Unpack["CreditNoteVoidCreditNoteParams"] ) -> "CreditNote": """ Marks a credit note as void. Learn more about [voiding credit notes](https://docs.stripe.com/docs/billing/invoices/credit-notes#voiding). @@ -1200,7 +638,7 @@ def void_credit_note( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_void_credit_note_async( - cls, id: str, **params: Unpack["CreditNote.VoidCreditNoteParams"] + cls, id: str, **params: Unpack["CreditNoteVoidCreditNoteParams"] ) -> "CreditNote": """ Marks a credit note as void. Learn more about [voiding credit notes](https://docs.stripe.com/docs/billing/invoices/credit-notes#voiding). @@ -1217,7 +655,7 @@ async def _cls_void_credit_note_async( @overload @staticmethod async def void_credit_note_async( - id: str, **params: Unpack["CreditNote.VoidCreditNoteParams"] + id: str, **params: Unpack["CreditNoteVoidCreditNoteParams"] ) -> "CreditNote": """ Marks a credit note as void. Learn more about [voiding credit notes](https://docs.stripe.com/docs/billing/invoices/credit-notes#voiding). @@ -1226,7 +664,7 @@ async def void_credit_note_async( @overload async def void_credit_note_async( - self, **params: Unpack["CreditNote.VoidCreditNoteParams"] + self, **params: Unpack["CreditNoteVoidCreditNoteParams"] ) -> "CreditNote": """ Marks a credit note as void. Learn more about [voiding credit notes](https://docs.stripe.com/docs/billing/invoices/credit-notes#voiding). @@ -1235,7 +673,7 @@ async def void_credit_note_async( @class_method_variant("_cls_void_credit_note_async") async def void_credit_note_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["CreditNote.VoidCreditNoteParams"] + self, **params: Unpack["CreditNoteVoidCreditNoteParams"] ) -> "CreditNote": """ Marks a credit note as void. Learn more about [voiding credit notes](https://docs.stripe.com/docs/billing/invoices/credit-notes#voiding). @@ -1253,7 +691,7 @@ async def void_credit_note_async( # pyright: ignore[reportGeneralTypeIssues] @classmethod def list_lines( - cls, credit_note: str, **params: Unpack["CreditNote.ListLinesParams"] + cls, credit_note: str, **params: Unpack["CreditNoteListLinesParams"] ) -> ListObject["CreditNoteLineItem"]: """ When retrieving a credit note, you'll get a lines property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items. @@ -1271,7 +709,7 @@ def list_lines( @classmethod async def list_lines_async( - cls, credit_note: str, **params: Unpack["CreditNote.ListLinesParams"] + cls, credit_note: str, **params: Unpack["CreditNoteListLinesParams"] ) -> ListObject["CreditNoteLineItem"]: """ When retrieving a credit note, you'll get a lines property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items. diff --git a/stripe/_credit_note_line_item_service.py b/stripe/_credit_note_line_item_service.py index 49341fb25..3ebb79fa8 100644 --- a/stripe/_credit_note_line_item_service.py +++ b/stripe/_credit_note_line_item_service.py @@ -5,33 +5,20 @@ from stripe._request_options import RequestOptions from stripe._stripe_service import StripeService from stripe._util import sanitize_id -from typing import List, Optional, cast -from typing_extensions import NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params._credit_note_line_item_list_params import ( + CreditNoteLineItemListParams, + ) -class CreditNoteLineItemService(StripeService): - class ListParams(TypedDict): - 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 CreditNoteLineItemService(StripeService): def list( self, credit_note: str, - params: Optional["CreditNoteLineItemService.ListParams"] = None, + params: Optional["CreditNoteLineItemListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[CreditNoteLineItem]: """ @@ -53,7 +40,7 @@ def list( async def list_async( self, credit_note: str, - params: Optional["CreditNoteLineItemService.ListParams"] = None, + params: Optional["CreditNoteLineItemListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[CreditNoteLineItem]: """ diff --git a/stripe/_credit_note_preview_lines_service.py b/stripe/_credit_note_preview_lines_service.py index 8726a0c9c..262c3e047 100644 --- a/stripe/_credit_note_preview_lines_service.py +++ b/stripe/_credit_note_preview_lines_service.py @@ -4,187 +4,19 @@ from stripe._list_object import ListObject from stripe._request_options import RequestOptions from stripe._stripe_service import StripeService -from typing import Dict, List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params._credit_note_preview_lines_list_params import ( + CreditNotePreviewLinesListParams, + ) -class CreditNotePreviewLinesService(StripeService): - class ListParams(TypedDict): - amount: NotRequired[int] - """ - The integer amount in cents (or local equivalent) representing the total amount of the credit note. One of `amount`, `lines`, or `shipping_cost` must be provided. - """ - credit_amount: NotRequired[int] - """ - The integer amount in cents (or local equivalent) representing the amount to credit the customer's balance, which will be automatically applied to their next invoice. - """ - effective_at: NotRequired[int] - """ - The date when this credit note is in effect. Same as `created` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the credit note PDF. - """ - email_type: NotRequired[Literal["credit_note", "none"]] - """ - Type of email to send to the customer, one of `credit_note` or `none` and the default is `credit_note`. - """ - 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. - """ - invoice: str - """ - ID of the invoice. - """ - 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. - """ - lines: NotRequired[ - List["CreditNotePreviewLinesService.ListParamsLine"] - ] - """ - Line items that make up the credit note. One of `amount`, `lines`, or `shipping_cost` must be provided. - """ - memo: NotRequired[str] - """ - The credit note's memo appears on the credit note PDF. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - out_of_band_amount: NotRequired[int] - """ - The integer amount in cents (or local equivalent) representing the amount that is credited outside of Stripe. - """ - reason: NotRequired[ - Literal[ - "duplicate", - "fraudulent", - "order_change", - "product_unsatisfactory", - ] - ] - """ - Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory` - """ - refund_amount: NotRequired[int] - """ - The integer amount in cents (or local equivalent) representing the amount to refund. If set, a refund will be created for the charge associated with the invoice. - """ - refunds: NotRequired[ - List["CreditNotePreviewLinesService.ListParamsRefund"] - ] - """ - Refunds to link to this credit note. - """ - shipping_cost: NotRequired[ - "CreditNotePreviewLinesService.ListParamsShippingCost" - ] - """ - When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note. One of `amount`, `lines`, or `shipping_cost` must be provided. - """ - 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 ListParamsLine(TypedDict): - amount: NotRequired[int] - """ - The line item amount to credit. Only valid when `type` is `invoice_line_item`. If invoice is set up with `automatic_tax[enabled]=true`, this amount is tax exclusive - """ - description: NotRequired[str] - """ - The description of the credit note line item. Only valid when the `type` is `custom_line_item`. - """ - invoice_line_item: NotRequired[str] - """ - The invoice line item to credit. Only valid when the `type` is `invoice_line_item`. - """ - quantity: NotRequired[int] - """ - The line item quantity to credit. - """ - tax_amounts: NotRequired[ - "Literal['']|List[CreditNotePreviewLinesService.ListParamsLineTaxAmount]" - ] - """ - A list of up to 10 tax amounts for the credit note line item. Cannot be mixed with `tax_rates`. - """ - tax_rates: NotRequired["Literal['']|List[str]"] - """ - The tax rates which apply to the credit note line item. Only valid when the `type` is `custom_line_item` and cannot be mixed with `tax_amounts`. - """ - type: Literal["custom_line_item", "invoice_line_item"] - """ - Type of the credit note line item, one of `invoice_line_item` or `custom_line_item` - """ - unit_amount: NotRequired[int] - """ - The integer unit amount in cents (or local equivalent) of the credit note line item. This `unit_amount` will be multiplied by the quantity to get the full amount to credit for this line item. Only valid when `type` is `custom_line_item`. - """ - unit_amount_decimal: NotRequired[str] - """ - Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - """ - - class ListParamsLineTaxAmount(TypedDict): - amount: int - """ - The amount, in cents (or local equivalent), of the tax. - """ - tax_rate: str - """ - The id of the tax rate for this tax amount. The tax rate must have been automatically created by Stripe. - """ - taxable_amount: int - """ - The amount on which tax is calculated, in cents (or local equivalent). - """ - - class ListParamsRefund(TypedDict): - amount_refunded: NotRequired[int] - """ - Amount of the refund that applies to this credit note, in cents (or local equivalent). Defaults to the entire refund amount. - """ - payment_record_refund: NotRequired[ - "CreditNotePreviewLinesService.ListParamsRefundPaymentRecordRefund" - ] - """ - The PaymentRecord refund details to link to this credit note. Required when `type` is `payment_record_refund`. - """ - refund: NotRequired[str] - """ - ID of an existing refund to link this credit note to. Required when `type` is `refund`. - """ - type: NotRequired[Literal["payment_record_refund", "refund"]] - """ - Type of the refund, one of `refund` or `payment_record_refund`. Defaults to `refund`. - """ - - class ListParamsRefundPaymentRecordRefund(TypedDict): - payment_record: str - """ - The ID of the PaymentRecord with the refund to link to this credit note. - """ - refund_group: str - """ - The PaymentRecord refund group to link to this credit note. For refunds processed off-Stripe, this will correspond to the `processor_details.custom.refund_reference` field provided when reporting the refund on the PaymentRecord. - """ - - class ListParamsShippingCost(TypedDict): - shipping_rate: NotRequired[str] - """ - The ID of the shipping rate to use for this order. - """ +class CreditNotePreviewLinesService(StripeService): def list( self, - params: "CreditNotePreviewLinesService.ListParams", + params: "CreditNotePreviewLinesListParams", options: Optional[RequestOptions] = None, ) -> ListObject[CreditNoteLineItem]: """ @@ -203,7 +35,7 @@ def list( async def list_async( self, - params: "CreditNotePreviewLinesService.ListParams", + params: "CreditNotePreviewLinesListParams", options: Optional[RequestOptions] = None, ) -> ListObject[CreditNoteLineItem]: """ diff --git a/stripe/_credit_note_service.py b/stripe/_credit_note_service.py index f82f6f9b5..474365638 100644 --- a/stripe/_credit_note_service.py +++ b/stripe/_credit_note_service.py @@ -9,8 +9,22 @@ from stripe._request_options import RequestOptions from stripe._stripe_service import StripeService from stripe._util import sanitize_id -from typing import Dict, List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params._credit_note_create_params import CreditNoteCreateParams + from stripe.params._credit_note_list_params import CreditNoteListParams + from stripe.params._credit_note_preview_params import ( + CreditNotePreviewParams, + ) + from stripe.params._credit_note_retrieve_params import ( + CreditNoteRetrieveParams, + ) + from stripe.params._credit_note_update_params import CreditNoteUpdateParams + from stripe.params._credit_note_void_credit_note_params import ( + CreditNoteVoidCreditNoteParams, + ) class CreditNoteService(StripeService): @@ -19,401 +33,9 @@ def __init__(self, requestor): self.line_items = CreditNoteLineItemService(self._requestor) self.preview_lines = CreditNotePreviewLinesService(self._requestor) - class CreateParams(TypedDict): - amount: NotRequired[int] - """ - The integer amount in cents (or local equivalent) representing the total amount of the credit note. One of `amount`, `lines`, or `shipping_cost` must be provided. - """ - credit_amount: NotRequired[int] - """ - The integer amount in cents (or local equivalent) representing the amount to credit the customer's balance, which will be automatically applied to their next invoice. - """ - effective_at: NotRequired[int] - """ - The date when this credit note is in effect. Same as `created` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the credit note PDF. - """ - email_type: NotRequired[Literal["credit_note", "none"]] - """ - Type of email to send to the customer, one of `credit_note` or `none` and the default is `credit_note`. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - invoice: str - """ - ID of the invoice. - """ - lines: NotRequired[List["CreditNoteService.CreateParamsLine"]] - """ - Line items that make up the credit note. One of `amount`, `lines`, or `shipping_cost` must be provided. - """ - memo: NotRequired[str] - """ - The credit note's memo appears on the credit note PDF. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - out_of_band_amount: NotRequired[int] - """ - The integer amount in cents (or local equivalent) representing the amount that is credited outside of Stripe. - """ - reason: NotRequired[ - Literal[ - "duplicate", - "fraudulent", - "order_change", - "product_unsatisfactory", - ] - ] - """ - Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory` - """ - refund_amount: NotRequired[int] - """ - The integer amount in cents (or local equivalent) representing the amount to refund. If set, a refund will be created for the charge associated with the invoice. - """ - refunds: NotRequired[List["CreditNoteService.CreateParamsRefund"]] - """ - Refunds to link to this credit note. - """ - shipping_cost: NotRequired[ - "CreditNoteService.CreateParamsShippingCost" - ] - """ - When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note. One of `amount`, `lines`, or `shipping_cost` must be provided. - """ - - class CreateParamsLine(TypedDict): - amount: NotRequired[int] - """ - The line item amount to credit. Only valid when `type` is `invoice_line_item`. If invoice is set up with `automatic_tax[enabled]=true`, this amount is tax exclusive - """ - description: NotRequired[str] - """ - The description of the credit note line item. Only valid when the `type` is `custom_line_item`. - """ - invoice_line_item: NotRequired[str] - """ - The invoice line item to credit. Only valid when the `type` is `invoice_line_item`. - """ - quantity: NotRequired[int] - """ - The line item quantity to credit. - """ - tax_amounts: NotRequired[ - "Literal['']|List[CreditNoteService.CreateParamsLineTaxAmount]" - ] - """ - A list of up to 10 tax amounts for the credit note line item. Cannot be mixed with `tax_rates`. - """ - tax_rates: NotRequired["Literal['']|List[str]"] - """ - The tax rates which apply to the credit note line item. Only valid when the `type` is `custom_line_item` and cannot be mixed with `tax_amounts`. - """ - type: Literal["custom_line_item", "invoice_line_item"] - """ - Type of the credit note line item, one of `invoice_line_item` or `custom_line_item` - """ - unit_amount: NotRequired[int] - """ - The integer unit amount in cents (or local equivalent) of the credit note line item. This `unit_amount` will be multiplied by the quantity to get the full amount to credit for this line item. Only valid when `type` is `custom_line_item`. - """ - unit_amount_decimal: NotRequired[str] - """ - Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - """ - - class CreateParamsLineTaxAmount(TypedDict): - amount: int - """ - The amount, in cents (or local equivalent), of the tax. - """ - tax_rate: str - """ - The id of the tax rate for this tax amount. The tax rate must have been automatically created by Stripe. - """ - taxable_amount: int - """ - The amount on which tax is calculated, in cents (or local equivalent). - """ - - class CreateParamsRefund(TypedDict): - amount_refunded: NotRequired[int] - """ - Amount of the refund that applies to this credit note, in cents (or local equivalent). Defaults to the entire refund amount. - """ - payment_record_refund: NotRequired[ - "CreditNoteService.CreateParamsRefundPaymentRecordRefund" - ] - """ - The PaymentRecord refund details to link to this credit note. Required when `type` is `payment_record_refund`. - """ - refund: NotRequired[str] - """ - ID of an existing refund to link this credit note to. Required when `type` is `refund`. - """ - type: NotRequired[Literal["payment_record_refund", "refund"]] - """ - Type of the refund, one of `refund` or `payment_record_refund`. Defaults to `refund`. - """ - - class CreateParamsRefundPaymentRecordRefund(TypedDict): - payment_record: str - """ - The ID of the PaymentRecord with the refund to link to this credit note. - """ - refund_group: str - """ - The PaymentRecord refund group to link to this credit note. For refunds processed off-Stripe, this will correspond to the `processor_details.custom.refund_reference` field provided when reporting the refund on the PaymentRecord. - """ - - class CreateParamsShippingCost(TypedDict): - shipping_rate: NotRequired[str] - """ - The ID of the shipping rate to use for this order. - """ - - class ListParams(TypedDict): - created: NotRequired["CreditNoteService.ListParamsCreated|int"] - """ - Only return credit notes that were created during the given date interval. - """ - customer: NotRequired[str] - """ - Only return credit notes for the customer specified by this customer ID. - """ - customer_account: NotRequired[str] - """ - Only return credit notes for the account specified by this account ID. - """ - 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. - """ - invoice: NotRequired[str] - """ - Only return credit notes for the invoice specified by this invoice ID. - """ - 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 ListParamsCreated(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) - """ - - class PreviewParams(TypedDict): - amount: NotRequired[int] - """ - The integer amount in cents (or local equivalent) representing the total amount of the credit note. One of `amount`, `lines`, or `shipping_cost` must be provided. - """ - credit_amount: NotRequired[int] - """ - The integer amount in cents (or local equivalent) representing the amount to credit the customer's balance, which will be automatically applied to their next invoice. - """ - effective_at: NotRequired[int] - """ - The date when this credit note is in effect. Same as `created` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the credit note PDF. - """ - email_type: NotRequired[Literal["credit_note", "none"]] - """ - Type of email to send to the customer, one of `credit_note` or `none` and the default is `credit_note`. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - invoice: str - """ - ID of the invoice. - """ - lines: NotRequired[List["CreditNoteService.PreviewParamsLine"]] - """ - Line items that make up the credit note. One of `amount`, `lines`, or `shipping_cost` must be provided. - """ - memo: NotRequired[str] - """ - The credit note's memo appears on the credit note PDF. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - out_of_band_amount: NotRequired[int] - """ - The integer amount in cents (or local equivalent) representing the amount that is credited outside of Stripe. - """ - reason: NotRequired[ - Literal[ - "duplicate", - "fraudulent", - "order_change", - "product_unsatisfactory", - ] - ] - """ - Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory` - """ - refund_amount: NotRequired[int] - """ - The integer amount in cents (or local equivalent) representing the amount to refund. If set, a refund will be created for the charge associated with the invoice. - """ - refunds: NotRequired[List["CreditNoteService.PreviewParamsRefund"]] - """ - Refunds to link to this credit note. - """ - shipping_cost: NotRequired[ - "CreditNoteService.PreviewParamsShippingCost" - ] - """ - When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note. One of `amount`, `lines`, or `shipping_cost` must be provided. - """ - - class PreviewParamsLine(TypedDict): - amount: NotRequired[int] - """ - The line item amount to credit. Only valid when `type` is `invoice_line_item`. If invoice is set up with `automatic_tax[enabled]=true`, this amount is tax exclusive - """ - description: NotRequired[str] - """ - The description of the credit note line item. Only valid when the `type` is `custom_line_item`. - """ - invoice_line_item: NotRequired[str] - """ - The invoice line item to credit. Only valid when the `type` is `invoice_line_item`. - """ - quantity: NotRequired[int] - """ - The line item quantity to credit. - """ - tax_amounts: NotRequired[ - "Literal['']|List[CreditNoteService.PreviewParamsLineTaxAmount]" - ] - """ - A list of up to 10 tax amounts for the credit note line item. Cannot be mixed with `tax_rates`. - """ - tax_rates: NotRequired["Literal['']|List[str]"] - """ - The tax rates which apply to the credit note line item. Only valid when the `type` is `custom_line_item` and cannot be mixed with `tax_amounts`. - """ - type: Literal["custom_line_item", "invoice_line_item"] - """ - Type of the credit note line item, one of `invoice_line_item` or `custom_line_item` - """ - unit_amount: NotRequired[int] - """ - The integer unit amount in cents (or local equivalent) of the credit note line item. This `unit_amount` will be multiplied by the quantity to get the full amount to credit for this line item. Only valid when `type` is `custom_line_item`. - """ - unit_amount_decimal: NotRequired[str] - """ - Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - """ - - class PreviewParamsLineTaxAmount(TypedDict): - amount: int - """ - The amount, in cents (or local equivalent), of the tax. - """ - tax_rate: str - """ - The id of the tax rate for this tax amount. The tax rate must have been automatically created by Stripe. - """ - taxable_amount: int - """ - The amount on which tax is calculated, in cents (or local equivalent). - """ - - class PreviewParamsRefund(TypedDict): - amount_refunded: NotRequired[int] - """ - Amount of the refund that applies to this credit note, in cents (or local equivalent). Defaults to the entire refund amount. - """ - payment_record_refund: NotRequired[ - "CreditNoteService.PreviewParamsRefundPaymentRecordRefund" - ] - """ - The PaymentRecord refund details to link to this credit note. Required when `type` is `payment_record_refund`. - """ - refund: NotRequired[str] - """ - ID of an existing refund to link this credit note to. Required when `type` is `refund`. - """ - type: NotRequired[Literal["payment_record_refund", "refund"]] - """ - Type of the refund, one of `refund` or `payment_record_refund`. Defaults to `refund`. - """ - - class PreviewParamsRefundPaymentRecordRefund(TypedDict): - payment_record: str - """ - The ID of the PaymentRecord with the refund to link to this credit note. - """ - refund_group: str - """ - The PaymentRecord refund group to link to this credit note. For refunds processed off-Stripe, this will correspond to the `processor_details.custom.refund_reference` field provided when reporting the refund on the PaymentRecord. - """ - - class PreviewParamsShippingCost(TypedDict): - shipping_rate: NotRequired[str] - """ - The ID of the shipping rate to use for this order. - """ - - class RetrieveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class UpdateParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - memo: NotRequired[str] - """ - Credit note memo. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - - class VoidCreditNoteParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - def list( self, - params: Optional["CreditNoteService.ListParams"] = None, + params: Optional["CreditNoteListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[CreditNote]: """ @@ -432,7 +54,7 @@ def list( async def list_async( self, - params: Optional["CreditNoteService.ListParams"] = None, + params: Optional["CreditNoteListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[CreditNote]: """ @@ -451,7 +73,7 @@ async def list_async( def create( self, - params: "CreditNoteService.CreateParams", + params: "CreditNoteCreateParams", options: Optional[RequestOptions] = None, ) -> CreditNote: """ @@ -482,7 +104,7 @@ def create( async def create_async( self, - params: "CreditNoteService.CreateParams", + params: "CreditNoteCreateParams", options: Optional[RequestOptions] = None, ) -> CreditNote: """ @@ -514,7 +136,7 @@ async def create_async( def retrieve( self, id: str, - params: Optional["CreditNoteService.RetrieveParams"] = None, + params: Optional["CreditNoteRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> CreditNote: """ @@ -534,7 +156,7 @@ def retrieve( async def retrieve_async( self, id: str, - params: Optional["CreditNoteService.RetrieveParams"] = None, + params: Optional["CreditNoteRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> CreditNote: """ @@ -554,7 +176,7 @@ async def retrieve_async( def update( self, id: str, - params: Optional["CreditNoteService.UpdateParams"] = None, + params: Optional["CreditNoteUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> CreditNote: """ @@ -574,7 +196,7 @@ def update( async def update_async( self, id: str, - params: Optional["CreditNoteService.UpdateParams"] = None, + params: Optional["CreditNoteUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> CreditNote: """ @@ -593,7 +215,7 @@ async def update_async( def preview( self, - params: "CreditNoteService.PreviewParams", + params: "CreditNotePreviewParams", options: Optional[RequestOptions] = None, ) -> CreditNote: """ @@ -612,7 +234,7 @@ def preview( async def preview_async( self, - params: "CreditNoteService.PreviewParams", + params: "CreditNotePreviewParams", options: Optional[RequestOptions] = None, ) -> CreditNote: """ @@ -632,7 +254,7 @@ async def preview_async( def void_credit_note( self, id: str, - params: Optional["CreditNoteService.VoidCreditNoteParams"] = None, + params: Optional["CreditNoteVoidCreditNoteParams"] = None, options: Optional[RequestOptions] = None, ) -> CreditNote: """ @@ -652,7 +274,7 @@ def void_credit_note( async def void_credit_note_async( self, id: str, - params: Optional["CreditNoteService.VoidCreditNoteParams"] = None, + params: Optional["CreditNoteVoidCreditNoteParams"] = None, options: Optional[RequestOptions] = None, ) -> CreditNote: """ diff --git a/stripe/_customer.py b/stripe/_customer.py index 499ab104a..38f213be8 100644 --- a/stripe/_customer.py +++ b/stripe/_customer.py @@ -6,7 +6,6 @@ from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource from stripe._nested_resource_class_methods import nested_resource_class_methods -from stripe._request_options import RequestOptions from stripe._search_result_object import SearchResultObject from stripe._searchable_api_resource import SearchableAPIResource from stripe._stripe_object import StripeObject @@ -24,14 +23,7 @@ cast, overload, ) -from typing_extensions import ( - Literal, - NotRequired, - Type, - TypedDict, - Unpack, - TYPE_CHECKING, -) +from typing_extensions import Literal, Type, Unpack, TYPE_CHECKING if TYPE_CHECKING: from stripe._account import Account @@ -48,6 +40,78 @@ from stripe._source import Source from stripe._subscription import Subscription from stripe._tax_id import TaxId + from stripe.params._customer_create_balance_transaction_params import ( + CustomerCreateBalanceTransactionParams, + ) + from stripe.params._customer_create_funding_instructions_params import ( + CustomerCreateFundingInstructionsParams, + ) + from stripe.params._customer_create_params import CustomerCreateParams + from stripe.params._customer_create_source_params import ( + CustomerCreateSourceParams, + ) + from stripe.params._customer_create_tax_id_params import ( + CustomerCreateTaxIdParams, + ) + from stripe.params._customer_delete_discount_params import ( + CustomerDeleteDiscountParams, + ) + from stripe.params._customer_delete_params import CustomerDeleteParams + from stripe.params._customer_delete_source_params import ( + CustomerDeleteSourceParams, + ) + from stripe.params._customer_delete_tax_id_params import ( + CustomerDeleteTaxIdParams, + ) + from stripe.params._customer_fund_cash_balance_params import ( + CustomerFundCashBalanceParams, + ) + from stripe.params._customer_list_balance_transactions_params import ( + CustomerListBalanceTransactionsParams, + ) + from stripe.params._customer_list_cash_balance_transactions_params import ( + CustomerListCashBalanceTransactionsParams, + ) + from stripe.params._customer_list_params import CustomerListParams + from stripe.params._customer_list_payment_methods_params import ( + CustomerListPaymentMethodsParams, + ) + from stripe.params._customer_list_sources_params import ( + CustomerListSourcesParams, + ) + from stripe.params._customer_list_tax_ids_params import ( + CustomerListTaxIdsParams, + ) + from stripe.params._customer_modify_balance_transaction_params import ( + CustomerModifyBalanceTransactionParams, + ) + from stripe.params._customer_modify_cash_balance_params import ( + CustomerModifyCashBalanceParams, + ) + from stripe.params._customer_modify_params import CustomerModifyParams + from stripe.params._customer_modify_source_params import ( + CustomerModifySourceParams, + ) + from stripe.params._customer_retrieve_balance_transaction_params import ( + CustomerRetrieveBalanceTransactionParams, + ) + from stripe.params._customer_retrieve_cash_balance_params import ( + CustomerRetrieveCashBalanceParams, + ) + from stripe.params._customer_retrieve_cash_balance_transaction_params import ( + CustomerRetrieveCashBalanceTransactionParams, + ) + from stripe.params._customer_retrieve_params import CustomerRetrieveParams + from stripe.params._customer_retrieve_payment_method_params import ( + CustomerRetrievePaymentMethodParams, + ) + from stripe.params._customer_retrieve_source_params import ( + CustomerRetrieveSourceParams, + ) + from stripe.params._customer_retrieve_tax_id_params import ( + CustomerRetrieveTaxIdParams, + ) + from stripe.params._customer_search_params import CustomerSearchParams from stripe.test_helpers._test_clock import TestClock @@ -219,1220 +283,6 @@ class Location(StripeObject): """ _inner_class_types = {"location": Location} - class CreateBalanceTransactionParams(RequestOptions): - amount: int - """ - The integer amount in **cents (or local equivalent)** to apply to the customer's credit balance. - """ - 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). Specifies the [`invoice_credit_balance`](https://stripe.com/docs/api/customers/object#customer_object-invoice_credit_balance) that this transaction will apply to. If the customer's `currency` is not set, it will be updated to this value. - """ - description: NotRequired[str] - """ - An arbitrary string attached to the object. Often useful for displaying to users. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - - class CreateFundingInstructionsParams(RequestOptions): - bank_transfer: "Customer.CreateFundingInstructionsParamsBankTransfer" - """ - Additional parameters for `bank_transfer` funding types - """ - 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. - """ - funding_type: Literal["bank_transfer"] - """ - The `funding_type` to get the instructions for. - """ - - class CreateFundingInstructionsParamsBankTransfer(TypedDict): - eu_bank_transfer: NotRequired[ - "Customer.CreateFundingInstructionsParamsBankTransferEuBankTransfer" - ] - """ - Configuration for eu_bank_transfer funding type. - """ - requested_address_types: NotRequired[ - List[Literal["iban", "sort_code", "spei", "zengin"]] - ] - """ - List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned. - - Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`. - """ - type: Literal[ - "eu_bank_transfer", - "gb_bank_transfer", - "jp_bank_transfer", - "mx_bank_transfer", - "us_bank_transfer", - ] - """ - The type of the `bank_transfer` - """ - - class CreateFundingInstructionsParamsBankTransferEuBankTransfer(TypedDict): - country: str - """ - The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. - """ - - class CreateParams(RequestOptions): - address: NotRequired["Literal['']|Customer.CreateParamsAddress"] - """ - The customer's address. - """ - balance: NotRequired[int] - """ - An integer amount in cents (or local equivalent) that represents the customer's current balance, which affect the customer's future invoices. A negative amount represents a credit that decreases the amount due on an invoice; a positive amount increases the amount due on an invoice. - """ - business_name: NotRequired["Literal['']|str"] - """ - The customer's business name. This may be up to *150 characters*. - """ - cash_balance: NotRequired["Customer.CreateParamsCashBalance"] - """ - Balance information and default balance settings for this customer. - """ - description: NotRequired[str] - """ - An arbitrary string that you can attach to a customer object. It is displayed alongside the customer in the dashboard. - """ - email: NotRequired[str] - """ - Customer's email address. It's displayed alongside the customer in your dashboard and can be useful for searching and tracking. This may be up to *512 characters*. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - individual_name: NotRequired["Literal['']|str"] - """ - The customer's full name. This may be up to *150 characters*. - """ - invoice_prefix: NotRequired[str] - """ - The prefix for the customer used to generate unique invoice numbers. Must be 3–12 uppercase letters or numbers. - """ - invoice_settings: NotRequired["Customer.CreateParamsInvoiceSettings"] - """ - Default invoice settings for this customer. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - name: NotRequired[str] - """ - The customer's full name or business name. - """ - next_invoice_sequence: NotRequired[int] - """ - The sequence to be used on the customer's next invoice. Defaults to 1. - """ - payment_method: NotRequired[str] - phone: NotRequired[str] - """ - The customer's phone number. - """ - preferred_locales: NotRequired[List[str]] - """ - Customer's preferred languages, ordered by preference. - """ - shipping: NotRequired["Literal['']|Customer.CreateParamsShipping"] - """ - The customer's shipping information. Appears on invoices emailed to this customer. - """ - source: NotRequired[str] - tax: NotRequired["Customer.CreateParamsTax"] - """ - Tax details about the customer. - """ - tax_exempt: NotRequired[ - "Literal['']|Literal['exempt', 'none', 'reverse']" - ] - """ - The customer's tax exemption. One of `none`, `exempt`, or `reverse`. - """ - tax_id_data: NotRequired[List["Customer.CreateParamsTaxIdDatum"]] - """ - The customer's tax IDs. - """ - test_clock: NotRequired[str] - """ - ID of the test clock to attach to the customer. - """ - validate: NotRequired[bool] - - class CreateParamsAddress(TypedDict): - city: NotRequired[str] - """ - City, district, suburb, town, or village. - """ - country: NotRequired[str] - """ - A freeform text field for the country. However, in order to activate some tax features, the format should be a 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. - """ - - class CreateParamsCashBalance(TypedDict): - settings: NotRequired["Customer.CreateParamsCashBalanceSettings"] - """ - Settings controlling the behavior of the customer's cash balance, - such as reconciliation of funds received. - """ - - class CreateParamsCashBalanceSettings(TypedDict): - reconciliation_mode: NotRequired[ - Literal["automatic", "manual", "merchant_default"] - ] - """ - Controls how funds transferred by the customer are applied to payment intents and invoices. Valid options are `automatic`, `manual`, or `merchant_default`. For more information about these reconciliation modes, see [Reconciliation](https://stripe.com/docs/payments/customer-balance/reconciliation). - """ - - class CreateParamsInvoiceSettings(TypedDict): - custom_fields: NotRequired[ - "Literal['']|List[Customer.CreateParamsInvoiceSettingsCustomField]" - ] - """ - The list of up to 4 default custom fields to be displayed on invoices for this customer. When updating, pass an empty string to remove previously-defined fields. - """ - default_payment_method: NotRequired[str] - """ - ID of a payment method that's attached to the customer, to be used as the customer's default payment method for subscriptions and invoices. - """ - footer: NotRequired[str] - """ - Default footer to be displayed on invoices for this customer. - """ - rendering_options: NotRequired[ - "Literal['']|Customer.CreateParamsInvoiceSettingsRenderingOptions" - ] - """ - Default options for invoice PDF rendering for this customer. - """ - - class CreateParamsInvoiceSettingsCustomField(TypedDict): - name: str - """ - The name of the custom field. This may be up to 40 characters. - """ - value: str - """ - The value of the custom field. This may be up to 140 characters. - """ - - class CreateParamsInvoiceSettingsRenderingOptions(TypedDict): - amount_tax_display: NotRequired[ - "Literal['']|Literal['exclude_tax', 'include_inclusive_tax']" - ] - """ - How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One of `exclude_tax` or `include_inclusive_tax`. `include_inclusive_tax` will include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. `exclude_tax` will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts. - """ - template: NotRequired[str] - """ - ID of the invoice rendering template to use for future invoices. - """ - - class CreateParamsShipping(TypedDict): - address: "Customer.CreateParamsShippingAddress" - """ - Customer shipping address. - """ - name: str - """ - Customer name. - """ - phone: NotRequired[str] - """ - Customer phone (including extension). - """ - - class CreateParamsShippingAddress(TypedDict): - city: NotRequired[str] - """ - City, district, suburb, town, or village. - """ - country: NotRequired[str] - """ - A freeform text field for the country. However, in order to activate some tax features, the format should be a 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. - """ - - class CreateParamsTax(TypedDict): - ip_address: NotRequired["Literal['']|str"] - """ - A recent IP address of the customer used for tax reporting and tax location inference. Stripe recommends updating the IP address when a new PaymentMethod is attached or the address field on the customer is updated. We recommend against updating this field more frequently since it could result in unexpected tax location/reporting outcomes. - """ - validate_location: NotRequired[Literal["deferred", "immediately"]] - """ - A flag that indicates when Stripe should validate the customer tax location. Defaults to `deferred`. - """ - - class CreateParamsTaxIdDatum(TypedDict): - type: Literal[ - "ad_nrt", - "ae_trn", - "al_tin", - "am_tin", - "ao_tin", - "ar_cuit", - "au_abn", - "au_arn", - "aw_tin", - "az_tin", - "ba_tin", - "bb_tin", - "bd_bin", - "bf_ifu", - "bg_uic", - "bh_vat", - "bj_ifu", - "bo_tin", - "br_cnpj", - "br_cpf", - "bs_tin", - "by_tin", - "ca_bn", - "ca_gst_hst", - "ca_pst_bc", - "ca_pst_mb", - "ca_pst_sk", - "ca_qst", - "cd_nif", - "ch_uid", - "ch_vat", - "cl_tin", - "cm_niu", - "cn_tin", - "co_nit", - "cr_tin", - "cv_nif", - "de_stn", - "do_rcn", - "ec_ruc", - "eg_tin", - "es_cif", - "et_tin", - "eu_oss_vat", - "eu_vat", - "gb_vat", - "ge_vat", - "gn_nif", - "hk_br", - "hr_oib", - "hu_tin", - "id_npwp", - "il_vat", - "in_gst", - "is_vat", - "jp_cn", - "jp_rn", - "jp_trn", - "ke_pin", - "kg_tin", - "kh_tin", - "kr_brn", - "kz_bin", - "la_tin", - "li_uid", - "li_vat", - "ma_vat", - "md_vat", - "me_pib", - "mk_vat", - "mr_nif", - "mx_rfc", - "my_frp", - "my_itn", - "my_sst", - "ng_tin", - "no_vat", - "no_voec", - "np_pan", - "nz_gst", - "om_vat", - "pe_ruc", - "ph_tin", - "ro_tin", - "rs_pib", - "ru_inn", - "ru_kpp", - "sa_vat", - "sg_gst", - "sg_uen", - "si_tin", - "sn_ninea", - "sr_fin", - "sv_nit", - "th_vat", - "tj_tin", - "tr_tin", - "tw_vat", - "tz_vat", - "ua_vat", - "ug_tin", - "us_ein", - "uy_ruc", - "uz_tin", - "uz_vat", - "ve_rif", - "vn_tin", - "za_vat", - "zm_tin", - "zw_tin", - ] - """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `al_tin`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `aw_tin`, `az_tin`, `ba_tin`, `bb_tin`, `bd_bin`, `bf_ifu`, `bg_uic`, `bh_vat`, `bj_ifu`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cm_niu`, `cn_tin`, `co_nit`, `cr_tin`, `cv_nif`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `et_tin`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kg_tin`, `kh_tin`, `kr_brn`, `kz_bin`, `la_tin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin` - """ - value: str - """ - Value of the tax ID. - """ - - class CreateSourceParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - source: str - """ - Please refer to full [documentation](https://stripe.com/docs/api) instead. - """ - validate: NotRequired[bool] - - class CreateTaxIdParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - type: Literal[ - "ad_nrt", - "ae_trn", - "al_tin", - "am_tin", - "ao_tin", - "ar_cuit", - "au_abn", - "au_arn", - "aw_tin", - "az_tin", - "ba_tin", - "bb_tin", - "bd_bin", - "bf_ifu", - "bg_uic", - "bh_vat", - "bj_ifu", - "bo_tin", - "br_cnpj", - "br_cpf", - "bs_tin", - "by_tin", - "ca_bn", - "ca_gst_hst", - "ca_pst_bc", - "ca_pst_mb", - "ca_pst_sk", - "ca_qst", - "cd_nif", - "ch_uid", - "ch_vat", - "cl_tin", - "cm_niu", - "cn_tin", - "co_nit", - "cr_tin", - "cv_nif", - "de_stn", - "do_rcn", - "ec_ruc", - "eg_tin", - "es_cif", - "et_tin", - "eu_oss_vat", - "eu_vat", - "gb_vat", - "ge_vat", - "gn_nif", - "hk_br", - "hr_oib", - "hu_tin", - "id_npwp", - "il_vat", - "in_gst", - "is_vat", - "jp_cn", - "jp_rn", - "jp_trn", - "ke_pin", - "kg_tin", - "kh_tin", - "kr_brn", - "kz_bin", - "la_tin", - "li_uid", - "li_vat", - "ma_vat", - "md_vat", - "me_pib", - "mk_vat", - "mr_nif", - "mx_rfc", - "my_frp", - "my_itn", - "my_sst", - "ng_tin", - "no_vat", - "no_voec", - "np_pan", - "nz_gst", - "om_vat", - "pe_ruc", - "ph_tin", - "ro_tin", - "rs_pib", - "ru_inn", - "ru_kpp", - "sa_vat", - "sg_gst", - "sg_uen", - "si_tin", - "sn_ninea", - "sr_fin", - "sv_nit", - "th_vat", - "tj_tin", - "tr_tin", - "tw_vat", - "tz_vat", - "ua_vat", - "ug_tin", - "us_ein", - "uy_ruc", - "uz_tin", - "uz_vat", - "ve_rif", - "vn_tin", - "za_vat", - "zm_tin", - "zw_tin", - ] - """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `al_tin`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `aw_tin`, `az_tin`, `ba_tin`, `bb_tin`, `bd_bin`, `bf_ifu`, `bg_uic`, `bh_vat`, `bj_ifu`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cm_niu`, `cn_tin`, `co_nit`, `cr_tin`, `cv_nif`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `et_tin`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kg_tin`, `kh_tin`, `kr_brn`, `kz_bin`, `la_tin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin` - """ - value: str - """ - Value of the tax ID. - """ - - class DeleteDiscountParams(RequestOptions): - pass - - class DeleteParams(RequestOptions): - pass - - class DeleteSourceParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class DeleteTaxIdParams(RequestOptions): - pass - - class FundCashBalanceParams(RequestOptions): - amount: int - """ - Amount to be used for this test cash balance transaction. A positive integer representing how much to fund in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to fund $1.00 or 100 to fund ¥100, a zero-decimal currency). - """ - 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. - """ - reference: NotRequired[str] - """ - A description of the test funding. This simulates free-text references supplied by customers when making bank transfers to their cash balance. You can use this to test how Stripe's [reconciliation algorithm](https://stripe.com/docs/payments/customer-balance/reconciliation) applies to different user inputs. - """ - - class ListBalanceTransactionsParams(RequestOptions): - 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 ListCashBalanceTransactionsParams(RequestOptions): - 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 ListParams(RequestOptions): - created: NotRequired["Customer.ListParamsCreated|int"] - """ - Only return customers that were created during the given date interval. - """ - email: NotRequired[str] - """ - A case-sensitive filter on the list based on the customer's `email` field. The value must be a string. - """ - 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. - """ - test_clock: NotRequired[str] - """ - Provides a list of customers that are associated with the specified test clock. The response will not include customers with test clocks if this parameter is not set. - """ - - class ListParamsCreated(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) - """ - - class ListPaymentMethodsParams(RequestOptions): - allow_redisplay: NotRequired[ - Literal["always", "limited", "unspecified"] - ] - """ - This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. - """ - 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. - """ - type: NotRequired[ - Literal[ - "acss_debit", - "affirm", - "afterpay_clearpay", - "alipay", - "alma", - "amazon_pay", - "au_becs_debit", - "bacs_debit", - "bancontact", - "billie", - "blik", - "boleto", - "card", - "cashapp", - "crypto", - "customer_balance", - "eps", - "fpx", - "giropay", - "gopay", - "grabpay", - "id_bank_transfer", - "ideal", - "kakao_pay", - "klarna", - "konbini", - "kr_card", - "link", - "mb_way", - "mobilepay", - "multibanco", - "naver_pay", - "nz_bank_account", - "oxxo", - "p24", - "pay_by_bank", - "payco", - "paynow", - "paypal", - "paypay", - "payto", - "pix", - "promptpay", - "qris", - "rechnung", - "revolut_pay", - "samsung_pay", - "satispay", - "sepa_debit", - "shopeepay", - "sofort", - "stripe_balance", - "swish", - "twint", - "us_bank_account", - "wechat_pay", - "zip", - ] - ] - """ - An optional filter on the list, based on the object `type` field. Without the filter, the list includes all current and future payment method types. If your integration expects only one type of payment method in the response, make sure to provide a type value in the request. - """ - - class ListSourcesParams(RequestOptions): - 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. - """ - object: NotRequired[str] - """ - Filter sources according to a particular object type. - """ - 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 ListTaxIdsParams(RequestOptions): - 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 ModifyBalanceTransactionParams(RequestOptions): - description: NotRequired[str] - """ - An arbitrary string attached to the object. Often useful for displaying to users. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - - class ModifyCashBalanceParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - settings: NotRequired["Customer.ModifyCashBalanceParamsSettings"] - """ - A hash of settings for this cash balance. - """ - - class ModifyCashBalanceParamsSettings(TypedDict): - reconciliation_mode: NotRequired[ - Literal["automatic", "manual", "merchant_default"] - ] - """ - Controls how funds transferred by the customer are applied to payment intents and invoices. Valid options are `automatic`, `manual`, or `merchant_default`. For more information about these reconciliation modes, see [Reconciliation](https://stripe.com/docs/payments/customer-balance/reconciliation). - """ - - class ModifyParams(RequestOptions): - address: NotRequired["Literal['']|Customer.ModifyParamsAddress"] - """ - The customer's address. - """ - balance: NotRequired[int] - """ - An integer amount in cents (or local equivalent) that represents the customer's current balance, which affect the customer's future invoices. A negative amount represents a credit that decreases the amount due on an invoice; a positive amount increases the amount due on an invoice. - """ - business_name: NotRequired["Literal['']|str"] - """ - The customer's business name. This may be up to *150 characters*. - """ - cash_balance: NotRequired["Customer.ModifyParamsCashBalance"] - """ - Balance information and default balance settings for this customer. - """ - default_source: NotRequired[str] - """ - If you are using payment methods created via the PaymentMethods API, see the [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/update#update_customer-invoice_settings-default_payment_method) parameter. - - Provide the ID of a payment source already attached to this customer to make it this customer's default payment source. - - If you want to add a new payment source and make it the default, see the [source](https://stripe.com/docs/api/customers/update#update_customer-source) property. - """ - description: NotRequired[str] - """ - An arbitrary string that you can attach to a customer object. It is displayed alongside the customer in the dashboard. - """ - email: NotRequired[str] - """ - Customer's email address. It's displayed alongside the customer in your dashboard and can be useful for searching and tracking. This may be up to *512 characters*. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - individual_name: NotRequired["Literal['']|str"] - """ - The customer's full name. This may be up to *150 characters*. - """ - invoice_prefix: NotRequired[str] - """ - The prefix for the customer used to generate unique invoice numbers. Must be 3–12 uppercase letters or numbers. - """ - invoice_settings: NotRequired["Customer.ModifyParamsInvoiceSettings"] - """ - Default invoice settings for this customer. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - name: NotRequired[str] - """ - The customer's full name or business name. - """ - next_invoice_sequence: NotRequired[int] - """ - The sequence to be used on the customer's next invoice. Defaults to 1. - """ - phone: NotRequired[str] - """ - The customer's phone number. - """ - preferred_locales: NotRequired[List[str]] - """ - Customer's preferred languages, ordered by preference. - """ - shipping: NotRequired["Literal['']|Customer.ModifyParamsShipping"] - """ - The customer's shipping information. Appears on invoices emailed to this customer. - """ - source: NotRequired[str] - tax: NotRequired["Customer.ModifyParamsTax"] - """ - Tax details about the customer. - """ - tax_exempt: NotRequired[ - "Literal['']|Literal['exempt', 'none', 'reverse']" - ] - """ - The customer's tax exemption. One of `none`, `exempt`, or `reverse`. - """ - validate: NotRequired[bool] - - class ModifyParamsAddress(TypedDict): - city: NotRequired[str] - """ - City, district, suburb, town, or village. - """ - country: NotRequired[str] - """ - A freeform text field for the country. However, in order to activate some tax features, the format should be a 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. - """ - - class ModifyParamsCashBalance(TypedDict): - settings: NotRequired["Customer.ModifyParamsCashBalanceSettings"] - """ - Settings controlling the behavior of the customer's cash balance, - such as reconciliation of funds received. - """ - - class ModifyParamsCashBalanceSettings(TypedDict): - reconciliation_mode: NotRequired[ - Literal["automatic", "manual", "merchant_default"] - ] - """ - Controls how funds transferred by the customer are applied to payment intents and invoices. Valid options are `automatic`, `manual`, or `merchant_default`. For more information about these reconciliation modes, see [Reconciliation](https://stripe.com/docs/payments/customer-balance/reconciliation). - """ - - class ModifyParamsInvoiceSettings(TypedDict): - custom_fields: NotRequired[ - "Literal['']|List[Customer.ModifyParamsInvoiceSettingsCustomField]" - ] - """ - The list of up to 4 default custom fields to be displayed on invoices for this customer. When updating, pass an empty string to remove previously-defined fields. - """ - default_payment_method: NotRequired[str] - """ - ID of a payment method that's attached to the customer, to be used as the customer's default payment method for subscriptions and invoices. - """ - footer: NotRequired[str] - """ - Default footer to be displayed on invoices for this customer. - """ - rendering_options: NotRequired[ - "Literal['']|Customer.ModifyParamsInvoiceSettingsRenderingOptions" - ] - """ - Default options for invoice PDF rendering for this customer. - """ - - class ModifyParamsInvoiceSettingsCustomField(TypedDict): - name: str - """ - The name of the custom field. This may be up to 40 characters. - """ - value: str - """ - The value of the custom field. This may be up to 140 characters. - """ - - class ModifyParamsInvoiceSettingsRenderingOptions(TypedDict): - amount_tax_display: NotRequired[ - "Literal['']|Literal['exclude_tax', 'include_inclusive_tax']" - ] - """ - How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One of `exclude_tax` or `include_inclusive_tax`. `include_inclusive_tax` will include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. `exclude_tax` will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts. - """ - template: NotRequired[str] - """ - ID of the invoice rendering template to use for future invoices. - """ - - class ModifyParamsShipping(TypedDict): - address: "Customer.ModifyParamsShippingAddress" - """ - Customer shipping address. - """ - name: str - """ - Customer name. - """ - phone: NotRequired[str] - """ - Customer phone (including extension). - """ - - class ModifyParamsShippingAddress(TypedDict): - city: NotRequired[str] - """ - City, district, suburb, town, or village. - """ - country: NotRequired[str] - """ - A freeform text field for the country. However, in order to activate some tax features, the format should be a 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. - """ - - class ModifyParamsTax(TypedDict): - ip_address: NotRequired["Literal['']|str"] - """ - A recent IP address of the customer used for tax reporting and tax location inference. Stripe recommends updating the IP address when a new PaymentMethod is attached or the address field on the customer is updated. We recommend against updating this field more frequently since it could result in unexpected tax location/reporting outcomes. - """ - validate_location: NotRequired[ - Literal["auto", "deferred", "immediately"] - ] - """ - A flag that indicates when Stripe should validate the customer tax location. Defaults to `auto`. - """ - - class ModifySourceParams(RequestOptions): - account_holder_name: NotRequired[str] - """ - The name of the person or business that owns the bank account. - """ - account_holder_type: NotRequired[Literal["company", "individual"]] - """ - The type of entity that holds the account. This can be either `individual` or `company`. - """ - address_city: NotRequired[str] - """ - City/District/Suburb/Town/Village. - """ - address_country: NotRequired[str] - """ - Billing address country, if provided when creating card. - """ - address_line1: NotRequired[str] - """ - Address line 1 (Street address/PO Box/Company name). - """ - address_line2: NotRequired[str] - """ - Address line 2 (Apartment/Suite/Unit/Building). - """ - address_state: NotRequired[str] - """ - State/County/Province/Region. - """ - address_zip: NotRequired[str] - """ - ZIP or postal code. - """ - exp_month: NotRequired[str] - """ - Two digit number representing the card's expiration month. - """ - exp_year: NotRequired[str] - """ - Four digit number representing the card's expiration year. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - name: NotRequired[str] - """ - Cardholder name. - """ - owner: NotRequired["Customer.ModifySourceParamsOwner"] - - class ModifySourceParamsOwner(TypedDict): - address: NotRequired["Customer.ModifySourceParamsOwnerAddress"] - """ - Owner's address. - """ - email: NotRequired[str] - """ - Owner's email address. - """ - name: NotRequired[str] - """ - Owner's full name. - """ - phone: NotRequired[str] - """ - Owner's phone number. - """ - - class ModifySourceParamsOwnerAddress(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. - """ - - class RetrieveBalanceTransactionParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class RetrieveCashBalanceParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class RetrieveCashBalanceTransactionParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class RetrieveParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class RetrievePaymentMethodParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class RetrieveSourceParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class RetrieveTaxIdParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class SearchParams(RequestOptions): - 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. - """ - page: NotRequired[str] - """ - A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. - """ - query: str - """ - The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for customers](https://stripe.com/docs/search#query-fields-for-customers). - """ - address: Optional[Address] """ The customer's address. @@ -1564,7 +414,7 @@ class SearchParams(RequestOptions): """ @classmethod - def create(cls, **params: Unpack["Customer.CreateParams"]) -> "Customer": + def create(cls, **params: Unpack["CustomerCreateParams"]) -> "Customer": """ Creates a new customer object. """ @@ -1579,7 +429,7 @@ def create(cls, **params: Unpack["Customer.CreateParams"]) -> "Customer": @classmethod async def create_async( - cls, **params: Unpack["Customer.CreateParams"] + cls, **params: Unpack["CustomerCreateParams"] ) -> "Customer": """ Creates a new customer object. @@ -1597,7 +447,7 @@ async def create_async( def _cls_create_funding_instructions( cls, customer: str, - **params: Unpack["Customer.CreateFundingInstructionsParams"], + **params: Unpack["CustomerCreateFundingInstructionsParams"], ) -> "FundingInstructions": """ Retrieve funding instructions for a customer cash balance. If funding instructions do not yet exist for the customer, new @@ -1619,7 +469,7 @@ def _cls_create_funding_instructions( @staticmethod def create_funding_instructions( customer: str, - **params: Unpack["Customer.CreateFundingInstructionsParams"], + **params: Unpack["CustomerCreateFundingInstructionsParams"], ) -> "FundingInstructions": """ Retrieve funding instructions for a customer cash balance. If funding instructions do not yet exist for the customer, new @@ -1630,7 +480,7 @@ def create_funding_instructions( @overload def create_funding_instructions( - self, **params: Unpack["Customer.CreateFundingInstructionsParams"] + self, **params: Unpack["CustomerCreateFundingInstructionsParams"] ) -> "FundingInstructions": """ Retrieve funding instructions for a customer cash balance. If funding instructions do not yet exist for the customer, new @@ -1641,7 +491,7 @@ def create_funding_instructions( @class_method_variant("_cls_create_funding_instructions") def create_funding_instructions( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Customer.CreateFundingInstructionsParams"] + self, **params: Unpack["CustomerCreateFundingInstructionsParams"] ) -> "FundingInstructions": """ Retrieve funding instructions for a customer cash balance. If funding instructions do not yet exist for the customer, new @@ -1663,7 +513,7 @@ def create_funding_instructions( # pyright: ignore[reportGeneralTypeIssues] async def _cls_create_funding_instructions_async( cls, customer: str, - **params: Unpack["Customer.CreateFundingInstructionsParams"], + **params: Unpack["CustomerCreateFundingInstructionsParams"], ) -> "FundingInstructions": """ Retrieve funding instructions for a customer cash balance. If funding instructions do not yet exist for the customer, new @@ -1685,7 +535,7 @@ async def _cls_create_funding_instructions_async( @staticmethod async def create_funding_instructions_async( customer: str, - **params: Unpack["Customer.CreateFundingInstructionsParams"], + **params: Unpack["CustomerCreateFundingInstructionsParams"], ) -> "FundingInstructions": """ Retrieve funding instructions for a customer cash balance. If funding instructions do not yet exist for the customer, new @@ -1696,7 +546,7 @@ async def create_funding_instructions_async( @overload async def create_funding_instructions_async( - self, **params: Unpack["Customer.CreateFundingInstructionsParams"] + self, **params: Unpack["CustomerCreateFundingInstructionsParams"] ) -> "FundingInstructions": """ Retrieve funding instructions for a customer cash balance. If funding instructions do not yet exist for the customer, new @@ -1707,7 +557,7 @@ async def create_funding_instructions_async( @class_method_variant("_cls_create_funding_instructions_async") async def create_funding_instructions_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Customer.CreateFundingInstructionsParams"] + self, **params: Unpack["CustomerCreateFundingInstructionsParams"] ) -> "FundingInstructions": """ Retrieve funding instructions for a customer cash balance. If funding instructions do not yet exist for the customer, new @@ -1727,7 +577,7 @@ async def create_funding_instructions_async( # pyright: ignore[reportGeneralTyp @classmethod def _cls_delete( - cls, sid: str, **params: Unpack["Customer.DeleteParams"] + cls, sid: str, **params: Unpack["CustomerDeleteParams"] ) -> "Customer": """ Permanently deletes a customer. It cannot be undone. Also immediately cancels any active subscriptions on the customer. @@ -1745,7 +595,7 @@ def _cls_delete( @overload @staticmethod def delete( - sid: str, **params: Unpack["Customer.DeleteParams"] + sid: str, **params: Unpack["CustomerDeleteParams"] ) -> "Customer": """ Permanently deletes a customer. It cannot be undone. Also immediately cancels any active subscriptions on the customer. @@ -1753,7 +603,7 @@ def delete( ... @overload - def delete(self, **params: Unpack["Customer.DeleteParams"]) -> "Customer": + def delete(self, **params: Unpack["CustomerDeleteParams"]) -> "Customer": """ Permanently deletes a customer. It cannot be undone. Also immediately cancels any active subscriptions on the customer. """ @@ -1761,7 +611,7 @@ def delete(self, **params: Unpack["Customer.DeleteParams"]) -> "Customer": @class_method_variant("_cls_delete") def delete( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Customer.DeleteParams"] + self, **params: Unpack["CustomerDeleteParams"] ) -> "Customer": """ Permanently deletes a customer. It cannot be undone. Also immediately cancels any active subscriptions on the customer. @@ -1774,7 +624,7 @@ def delete( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_delete_async( - cls, sid: str, **params: Unpack["Customer.DeleteParams"] + cls, sid: str, **params: Unpack["CustomerDeleteParams"] ) -> "Customer": """ Permanently deletes a customer. It cannot be undone. Also immediately cancels any active subscriptions on the customer. @@ -1792,7 +642,7 @@ async def _cls_delete_async( @overload @staticmethod async def delete_async( - sid: str, **params: Unpack["Customer.DeleteParams"] + sid: str, **params: Unpack["CustomerDeleteParams"] ) -> "Customer": """ Permanently deletes a customer. It cannot be undone. Also immediately cancels any active subscriptions on the customer. @@ -1801,7 +651,7 @@ async def delete_async( @overload async def delete_async( - self, **params: Unpack["Customer.DeleteParams"] + self, **params: Unpack["CustomerDeleteParams"] ) -> "Customer": """ Permanently deletes a customer. It cannot be undone. Also immediately cancels any active subscriptions on the customer. @@ -1810,7 +660,7 @@ async def delete_async( @class_method_variant("_cls_delete_async") async def delete_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Customer.DeleteParams"] + self, **params: Unpack["CustomerDeleteParams"] ) -> "Customer": """ Permanently deletes a customer. It cannot be undone. Also immediately cancels any active subscriptions on the customer. @@ -1823,7 +673,7 @@ async def delete_async( # pyright: ignore[reportGeneralTypeIssues] @classmethod def _cls_delete_discount( - cls, customer: str, **params: Unpack["Customer.DeleteDiscountParams"] + cls, customer: str, **params: Unpack["CustomerDeleteDiscountParams"] ) -> "Discount": """ Removes the currently applied discount on a customer. @@ -1842,7 +692,7 @@ def _cls_delete_discount( @overload @staticmethod def delete_discount( - customer: str, **params: Unpack["Customer.DeleteDiscountParams"] + customer: str, **params: Unpack["CustomerDeleteDiscountParams"] ) -> "Discount": """ Removes the currently applied discount on a customer. @@ -1851,7 +701,7 @@ def delete_discount( @overload def delete_discount( - self, **params: Unpack["Customer.DeleteDiscountParams"] + self, **params: Unpack["CustomerDeleteDiscountParams"] ) -> "Discount": """ Removes the currently applied discount on a customer. @@ -1860,7 +710,7 @@ def delete_discount( @class_method_variant("_cls_delete_discount") def delete_discount( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Customer.DeleteDiscountParams"] + self, **params: Unpack["CustomerDeleteDiscountParams"] ) -> "Discount": """ Removes the currently applied discount on a customer. @@ -1878,7 +728,7 @@ def delete_discount( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_delete_discount_async( - cls, customer: str, **params: Unpack["Customer.DeleteDiscountParams"] + cls, customer: str, **params: Unpack["CustomerDeleteDiscountParams"] ) -> "Discount": """ Removes the currently applied discount on a customer. @@ -1897,7 +747,7 @@ async def _cls_delete_discount_async( @overload @staticmethod async def delete_discount_async( - customer: str, **params: Unpack["Customer.DeleteDiscountParams"] + customer: str, **params: Unpack["CustomerDeleteDiscountParams"] ) -> "Discount": """ Removes the currently applied discount on a customer. @@ -1906,7 +756,7 @@ async def delete_discount_async( @overload async def delete_discount_async( - self, **params: Unpack["Customer.DeleteDiscountParams"] + self, **params: Unpack["CustomerDeleteDiscountParams"] ) -> "Discount": """ Removes the currently applied discount on a customer. @@ -1915,7 +765,7 @@ async def delete_discount_async( @class_method_variant("_cls_delete_discount_async") async def delete_discount_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Customer.DeleteDiscountParams"] + self, **params: Unpack["CustomerDeleteDiscountParams"] ) -> "Discount": """ Removes the currently applied discount on a customer. @@ -1933,7 +783,7 @@ async def delete_discount_async( # pyright: ignore[reportGeneralTypeIssues] @classmethod def list( - cls, **params: Unpack["Customer.ListParams"] + cls, **params: Unpack["CustomerListParams"] ) -> ListObject["Customer"]: """ Returns a list of your customers. The customers are returned sorted by creation date, with the most recent customers appearing first. @@ -1953,7 +803,7 @@ def list( @classmethod async def list_async( - cls, **params: Unpack["Customer.ListParams"] + cls, **params: Unpack["CustomerListParams"] ) -> ListObject["Customer"]: """ Returns a list of your customers. The customers are returned sorted by creation date, with the most recent customers appearing first. @@ -1975,7 +825,7 @@ async def list_async( def _cls_list_payment_methods( cls, customer: str, - **params: Unpack["Customer.ListPaymentMethodsParams"], + **params: Unpack["CustomerListPaymentMethodsParams"], ) -> ListObject["PaymentMethod"]: """ Returns a list of PaymentMethods for a given Customer @@ -1994,7 +844,7 @@ def _cls_list_payment_methods( @overload @staticmethod def list_payment_methods( - customer: str, **params: Unpack["Customer.ListPaymentMethodsParams"] + customer: str, **params: Unpack["CustomerListPaymentMethodsParams"] ) -> ListObject["PaymentMethod"]: """ Returns a list of PaymentMethods for a given Customer @@ -2003,7 +853,7 @@ def list_payment_methods( @overload def list_payment_methods( - self, **params: Unpack["Customer.ListPaymentMethodsParams"] + self, **params: Unpack["CustomerListPaymentMethodsParams"] ) -> ListObject["PaymentMethod"]: """ Returns a list of PaymentMethods for a given Customer @@ -2012,7 +862,7 @@ def list_payment_methods( @class_method_variant("_cls_list_payment_methods") def list_payment_methods( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Customer.ListPaymentMethodsParams"] + self, **params: Unpack["CustomerListPaymentMethodsParams"] ) -> ListObject["PaymentMethod"]: """ Returns a list of PaymentMethods for a given Customer @@ -2032,7 +882,7 @@ def list_payment_methods( # pyright: ignore[reportGeneralTypeIssues] async def _cls_list_payment_methods_async( cls, customer: str, - **params: Unpack["Customer.ListPaymentMethodsParams"], + **params: Unpack["CustomerListPaymentMethodsParams"], ) -> ListObject["PaymentMethod"]: """ Returns a list of PaymentMethods for a given Customer @@ -2051,7 +901,7 @@ async def _cls_list_payment_methods_async( @overload @staticmethod async def list_payment_methods_async( - customer: str, **params: Unpack["Customer.ListPaymentMethodsParams"] + customer: str, **params: Unpack["CustomerListPaymentMethodsParams"] ) -> ListObject["PaymentMethod"]: """ Returns a list of PaymentMethods for a given Customer @@ -2060,7 +910,7 @@ async def list_payment_methods_async( @overload async def list_payment_methods_async( - self, **params: Unpack["Customer.ListPaymentMethodsParams"] + self, **params: Unpack["CustomerListPaymentMethodsParams"] ) -> ListObject["PaymentMethod"]: """ Returns a list of PaymentMethods for a given Customer @@ -2069,7 +919,7 @@ async def list_payment_methods_async( @class_method_variant("_cls_list_payment_methods_async") async def list_payment_methods_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Customer.ListPaymentMethodsParams"] + self, **params: Unpack["CustomerListPaymentMethodsParams"] ) -> ListObject["PaymentMethod"]: """ Returns a list of PaymentMethods for a given Customer @@ -2087,7 +937,7 @@ async def list_payment_methods_async( # pyright: ignore[reportGeneralTypeIssues @classmethod def modify( - cls, id: str, **params: Unpack["Customer.ModifyParams"] + cls, id: str, **params: Unpack["CustomerModifyParams"] ) -> "Customer": """ Updates the specified customer by setting the values of the parameters passed. Any parameters not provided will be left unchanged. For example, if you pass the source parameter, that becomes the customer's active source (e.g., a card) to be used for all charges in the future. When you update a customer to a new valid card source by passing the source parameter: for each of the customer's current subscriptions, if the subscription bills automatically and is in the past_due state, then the latest open invoice for the subscription with automatic collection enabled will be retried. This retry will not count as an automatic retry, and will not affect the next regularly scheduled payment for the invoice. Changing the default_source for a customer will not trigger this behavior. @@ -2106,7 +956,7 @@ def modify( @classmethod async def modify_async( - cls, id: str, **params: Unpack["Customer.ModifyParams"] + cls, id: str, **params: Unpack["CustomerModifyParams"] ) -> "Customer": """ Updates the specified customer by setting the values of the parameters passed. Any parameters not provided will be left unchanged. For example, if you pass the source parameter, that becomes the customer's active source (e.g., a card) to be used for all charges in the future. When you update a customer to a new valid card source by passing the source parameter: for each of the customer's current subscriptions, if the subscription bills automatically and is in the past_due state, then the latest open invoice for the subscription with automatic collection enabled will be retried. This retry will not count as an automatic retry, and will not affect the next regularly scheduled payment for the invoice. Changing the default_source for a customer will not trigger this behavior. @@ -2125,7 +975,7 @@ async def modify_async( @classmethod def retrieve( - cls, id: str, **params: Unpack["Customer.RetrieveParams"] + cls, id: str, **params: Unpack["CustomerRetrieveParams"] ) -> "Customer": """ Retrieves a Customer object. @@ -2136,7 +986,7 @@ def retrieve( @classmethod async def retrieve_async( - cls, id: str, **params: Unpack["Customer.RetrieveParams"] + cls, id: str, **params: Unpack["CustomerRetrieveParams"] ) -> "Customer": """ Retrieves a Customer object. @@ -2150,7 +1000,7 @@ def _cls_retrieve_payment_method( cls, customer: str, payment_method: str, - **params: Unpack["Customer.RetrievePaymentMethodParams"], + **params: Unpack["CustomerRetrievePaymentMethodParams"], ) -> "PaymentMethod": """ Retrieves a PaymentMethod object for a given Customer. @@ -2172,7 +1022,7 @@ def _cls_retrieve_payment_method( def retrieve_payment_method( customer: str, payment_method: str, - **params: Unpack["Customer.RetrievePaymentMethodParams"], + **params: Unpack["CustomerRetrievePaymentMethodParams"], ) -> "PaymentMethod": """ Retrieves a PaymentMethod object for a given Customer. @@ -2183,7 +1033,7 @@ def retrieve_payment_method( def retrieve_payment_method( self, payment_method: str, - **params: Unpack["Customer.RetrievePaymentMethodParams"], + **params: Unpack["CustomerRetrievePaymentMethodParams"], ) -> "PaymentMethod": """ Retrieves a PaymentMethod object for a given Customer. @@ -2194,7 +1044,7 @@ def retrieve_payment_method( def retrieve_payment_method( # pyright: ignore[reportGeneralTypeIssues] self, payment_method: str, - **params: Unpack["Customer.RetrievePaymentMethodParams"], + **params: Unpack["CustomerRetrievePaymentMethodParams"], ) -> "PaymentMethod": """ Retrieves a PaymentMethod object for a given Customer. @@ -2216,7 +1066,7 @@ async def _cls_retrieve_payment_method_async( cls, customer: str, payment_method: str, - **params: Unpack["Customer.RetrievePaymentMethodParams"], + **params: Unpack["CustomerRetrievePaymentMethodParams"], ) -> "PaymentMethod": """ Retrieves a PaymentMethod object for a given Customer. @@ -2238,7 +1088,7 @@ async def _cls_retrieve_payment_method_async( async def retrieve_payment_method_async( customer: str, payment_method: str, - **params: Unpack["Customer.RetrievePaymentMethodParams"], + **params: Unpack["CustomerRetrievePaymentMethodParams"], ) -> "PaymentMethod": """ Retrieves a PaymentMethod object for a given Customer. @@ -2249,7 +1099,7 @@ async def retrieve_payment_method_async( async def retrieve_payment_method_async( self, payment_method: str, - **params: Unpack["Customer.RetrievePaymentMethodParams"], + **params: Unpack["CustomerRetrievePaymentMethodParams"], ) -> "PaymentMethod": """ Retrieves a PaymentMethod object for a given Customer. @@ -2260,7 +1110,7 @@ async def retrieve_payment_method_async( async def retrieve_payment_method_async( # pyright: ignore[reportGeneralTypeIssues] self, payment_method: str, - **params: Unpack["Customer.RetrievePaymentMethodParams"], + **params: Unpack["CustomerRetrievePaymentMethodParams"], ) -> "PaymentMethod": """ Retrieves a PaymentMethod object for a given Customer. @@ -2279,7 +1129,7 @@ async def retrieve_payment_method_async( # pyright: ignore[reportGeneralTypeIss @classmethod def search( - cls, *args, **kwargs: Unpack["Customer.SearchParams"] + cls, *args, **kwargs: Unpack["CustomerSearchParams"] ) -> SearchResultObject["Customer"]: """ Search for customers you've previously created using Stripe's [Search Query Language](https://docs.stripe.com/docs/search#search-query-language). @@ -2291,7 +1141,7 @@ def search( @classmethod async def search_async( - cls, *args, **kwargs: Unpack["Customer.SearchParams"] + cls, *args, **kwargs: Unpack["CustomerSearchParams"] ) -> SearchResultObject["Customer"]: """ Search for customers you've previously created using Stripe's [Search Query Language](https://docs.stripe.com/docs/search#search-query-language). @@ -2305,13 +1155,13 @@ async def search_async( @classmethod def search_auto_paging_iter( - cls, *args, **kwargs: Unpack["Customer.SearchParams"] + cls, *args, **kwargs: Unpack["CustomerSearchParams"] ) -> Iterator["Customer"]: return cls.search(*args, **kwargs).auto_paging_iter() @classmethod async def search_auto_paging_iter_async( - cls, *args, **kwargs: Unpack["Customer.SearchParams"] + cls, *args, **kwargs: Unpack["CustomerSearchParams"] ) -> AsyncIterator["Customer"]: return (await cls.search_async(*args, **kwargs)).auto_paging_iter() @@ -2319,7 +1169,7 @@ async def search_auto_paging_iter_async( def list_balance_transactions( cls, customer: str, - **params: Unpack["Customer.ListBalanceTransactionsParams"], + **params: Unpack["CustomerListBalanceTransactionsParams"], ) -> ListObject["CustomerBalanceTransaction"]: """ Returns a list of transactions that updated the customer's [balances](https://docs.stripe.com/docs/billing/customer/balance). @@ -2339,7 +1189,7 @@ def list_balance_transactions( async def list_balance_transactions_async( cls, customer: str, - **params: Unpack["Customer.ListBalanceTransactionsParams"], + **params: Unpack["CustomerListBalanceTransactionsParams"], ) -> ListObject["CustomerBalanceTransaction"]: """ Returns a list of transactions that updated the customer's [balances](https://docs.stripe.com/docs/billing/customer/balance). @@ -2359,7 +1209,7 @@ async def list_balance_transactions_async( def create_balance_transaction( cls, customer: str, - **params: Unpack["Customer.CreateBalanceTransactionParams"], + **params: Unpack["CustomerCreateBalanceTransactionParams"], ) -> "CustomerBalanceTransaction": """ Creates an immutable transaction that updates the customer's credit [balance](https://docs.stripe.com/docs/billing/customer/balance). @@ -2379,7 +1229,7 @@ def create_balance_transaction( async def create_balance_transaction_async( cls, customer: str, - **params: Unpack["Customer.CreateBalanceTransactionParams"], + **params: Unpack["CustomerCreateBalanceTransactionParams"], ) -> "CustomerBalanceTransaction": """ Creates an immutable transaction that updates the customer's credit [balance](https://docs.stripe.com/docs/billing/customer/balance). @@ -2400,7 +1250,7 @@ def retrieve_balance_transaction( cls, customer: str, transaction: str, - **params: Unpack["Customer.RetrieveBalanceTransactionParams"], + **params: Unpack["CustomerRetrieveBalanceTransactionParams"], ) -> "CustomerBalanceTransaction": """ Retrieves a specific customer balance transaction that updated the customer's [balances](https://docs.stripe.com/docs/billing/customer/balance). @@ -2422,7 +1272,7 @@ async def retrieve_balance_transaction_async( cls, customer: str, transaction: str, - **params: Unpack["Customer.RetrieveBalanceTransactionParams"], + **params: Unpack["CustomerRetrieveBalanceTransactionParams"], ) -> "CustomerBalanceTransaction": """ Retrieves a specific customer balance transaction that updated the customer's [balances](https://docs.stripe.com/docs/billing/customer/balance). @@ -2444,7 +1294,7 @@ def modify_balance_transaction( cls, customer: str, transaction: str, - **params: Unpack["Customer.ModifyBalanceTransactionParams"], + **params: Unpack["CustomerModifyBalanceTransactionParams"], ) -> "CustomerBalanceTransaction": """ Most credit balance transaction fields are immutable, but you may update its description and metadata. @@ -2466,7 +1316,7 @@ async def modify_balance_transaction_async( cls, customer: str, transaction: str, - **params: Unpack["Customer.ModifyBalanceTransactionParams"], + **params: Unpack["CustomerModifyBalanceTransactionParams"], ) -> "CustomerBalanceTransaction": """ Most credit balance transaction fields are immutable, but you may update its description and metadata. @@ -2487,7 +1337,7 @@ async def modify_balance_transaction_async( def list_cash_balance_transactions( cls, customer: str, - **params: Unpack["Customer.ListCashBalanceTransactionsParams"], + **params: Unpack["CustomerListCashBalanceTransactionsParams"], ) -> ListObject["CustomerCashBalanceTransaction"]: """ Returns a list of transactions that modified the customer's [cash balance](https://docs.stripe.com/docs/payments/customer-balance). @@ -2507,7 +1357,7 @@ def list_cash_balance_transactions( async def list_cash_balance_transactions_async( cls, customer: str, - **params: Unpack["Customer.ListCashBalanceTransactionsParams"], + **params: Unpack["CustomerListCashBalanceTransactionsParams"], ) -> ListObject["CustomerCashBalanceTransaction"]: """ Returns a list of transactions that modified the customer's [cash balance](https://docs.stripe.com/docs/payments/customer-balance). @@ -2528,7 +1378,7 @@ def retrieve_cash_balance_transaction( cls, customer: str, transaction: str, - **params: Unpack["Customer.RetrieveCashBalanceTransactionParams"], + **params: Unpack["CustomerRetrieveCashBalanceTransactionParams"], ) -> "CustomerCashBalanceTransaction": """ Retrieves a specific cash balance transaction, which updated the customer's [cash balance](https://docs.stripe.com/docs/payments/customer-balance). @@ -2550,7 +1400,7 @@ async def retrieve_cash_balance_transaction_async( cls, customer: str, transaction: str, - **params: Unpack["Customer.RetrieveCashBalanceTransactionParams"], + **params: Unpack["CustomerRetrieveCashBalanceTransactionParams"], ) -> "CustomerCashBalanceTransaction": """ Retrieves a specific cash balance transaction, which updated the customer's [cash balance](https://docs.stripe.com/docs/payments/customer-balance). @@ -2569,7 +1419,7 @@ async def retrieve_cash_balance_transaction_async( @classmethod def list_sources( - cls, customer: str, **params: Unpack["Customer.ListSourcesParams"] + cls, customer: str, **params: Unpack["CustomerListSourcesParams"] ) -> ListObject[Union["Account", "BankAccount", "Card", "Source"]]: """ List sources for a specified customer. @@ -2587,7 +1437,7 @@ def list_sources( @classmethod async def list_sources_async( - cls, customer: str, **params: Unpack["Customer.ListSourcesParams"] + cls, customer: str, **params: Unpack["CustomerListSourcesParams"] ) -> ListObject[Union["Account", "BankAccount", "Card", "Source"]]: """ List sources for a specified customer. @@ -2605,7 +1455,7 @@ async def list_sources_async( @classmethod def create_source( - cls, customer: str, **params: Unpack["Customer.CreateSourceParams"] + cls, customer: str, **params: Unpack["CustomerCreateSourceParams"] ) -> Union["Account", "BankAccount", "Card", "Source"]: """ When you create a new credit card, you must specify a customer or recipient on which to create it. @@ -2627,7 +1477,7 @@ def create_source( @classmethod async def create_source_async( - cls, customer: str, **params: Unpack["Customer.CreateSourceParams"] + cls, customer: str, **params: Unpack["CustomerCreateSourceParams"] ) -> Union["Account", "BankAccount", "Card", "Source"]: """ When you create a new credit card, you must specify a customer or recipient on which to create it. @@ -2652,7 +1502,7 @@ def retrieve_source( cls, customer: str, id: str, - **params: Unpack["Customer.RetrieveSourceParams"], + **params: Unpack["CustomerRetrieveSourceParams"], ) -> Union["Account", "BankAccount", "Card", "Source"]: """ Retrieve a specified source for a given customer. @@ -2673,7 +1523,7 @@ async def retrieve_source_async( cls, customer: str, id: str, - **params: Unpack["Customer.RetrieveSourceParams"], + **params: Unpack["CustomerRetrieveSourceParams"], ) -> Union["Account", "BankAccount", "Card", "Source"]: """ Retrieve a specified source for a given customer. @@ -2694,7 +1544,7 @@ def modify_source( cls, customer: str, id: str, - **params: Unpack["Customer.ModifySourceParams"], + **params: Unpack["CustomerModifySourceParams"], ) -> Union["Account", "BankAccount", "Card", "Source"]: """ Update a specified source for a given customer. @@ -2715,7 +1565,7 @@ async def modify_source_async( cls, customer: str, id: str, - **params: Unpack["Customer.ModifySourceParams"], + **params: Unpack["CustomerModifySourceParams"], ) -> Union["Account", "BankAccount", "Card", "Source"]: """ Update a specified source for a given customer. @@ -2736,7 +1586,7 @@ def delete_source( cls, customer: str, id: str, - **params: Unpack["Customer.DeleteSourceParams"], + **params: Unpack["CustomerDeleteSourceParams"], ) -> Union["Account", "BankAccount", "Card", "Source"]: """ Delete a specified source for a given customer. @@ -2757,7 +1607,7 @@ async def delete_source_async( cls, customer: str, id: str, - **params: Unpack["Customer.DeleteSourceParams"], + **params: Unpack["CustomerDeleteSourceParams"], ) -> Union["Account", "BankAccount", "Card", "Source"]: """ Delete a specified source for a given customer. @@ -2775,7 +1625,7 @@ async def delete_source_async( @classmethod def create_tax_id( - cls, customer: str, **params: Unpack["Customer.CreateTaxIdParams"] + cls, customer: str, **params: Unpack["CustomerCreateTaxIdParams"] ) -> "TaxId": """ Creates a new tax_id object for a customer. @@ -2793,7 +1643,7 @@ def create_tax_id( @classmethod async def create_tax_id_async( - cls, customer: str, **params: Unpack["Customer.CreateTaxIdParams"] + cls, customer: str, **params: Unpack["CustomerCreateTaxIdParams"] ) -> "TaxId": """ Creates a new tax_id object for a customer. @@ -2814,7 +1664,7 @@ def retrieve_tax_id( cls, customer: str, id: str, - **params: Unpack["Customer.RetrieveTaxIdParams"], + **params: Unpack["CustomerRetrieveTaxIdParams"], ) -> "TaxId": """ Retrieves the tax_id object with the given identifier. @@ -2835,7 +1685,7 @@ async def retrieve_tax_id_async( cls, customer: str, id: str, - **params: Unpack["Customer.RetrieveTaxIdParams"], + **params: Unpack["CustomerRetrieveTaxIdParams"], ) -> "TaxId": """ Retrieves the tax_id object with the given identifier. @@ -2856,7 +1706,7 @@ def delete_tax_id( cls, customer: str, id: str, - **params: Unpack["Customer.DeleteTaxIdParams"], + **params: Unpack["CustomerDeleteTaxIdParams"], ) -> "TaxId": """ Deletes an existing tax_id object. @@ -2877,7 +1727,7 @@ async def delete_tax_id_async( cls, customer: str, id: str, - **params: Unpack["Customer.DeleteTaxIdParams"], + **params: Unpack["CustomerDeleteTaxIdParams"], ) -> "TaxId": """ Deletes an existing tax_id object. @@ -2895,7 +1745,7 @@ async def delete_tax_id_async( @classmethod def list_tax_ids( - cls, customer: str, **params: Unpack["Customer.ListTaxIdsParams"] + cls, customer: str, **params: Unpack["CustomerListTaxIdsParams"] ) -> ListObject["TaxId"]: """ Returns a list of tax IDs for a customer. @@ -2913,7 +1763,7 @@ def list_tax_ids( @classmethod async def list_tax_ids_async( - cls, customer: str, **params: Unpack["Customer.ListTaxIdsParams"] + cls, customer: str, **params: Unpack["CustomerListTaxIdsParams"] ) -> ListObject["TaxId"]: """ Returns a list of tax IDs for a customer. @@ -2933,7 +1783,7 @@ async def list_tax_ids_async( def retrieve_cash_balance( cls, customer: str, - **params: Unpack["Customer.RetrieveCashBalanceParams"], + **params: Unpack["CustomerRetrieveCashBalanceParams"], ) -> "CashBalance": """ Retrieves a customer's cash balance. @@ -2953,7 +1803,7 @@ def retrieve_cash_balance( async def retrieve_cash_balance_async( cls, customer: str, - **params: Unpack["Customer.RetrieveCashBalanceParams"], + **params: Unpack["CustomerRetrieveCashBalanceParams"], ) -> "CashBalance": """ Retrieves a customer's cash balance. @@ -2971,9 +1821,7 @@ async def retrieve_cash_balance_async( @classmethod def modify_cash_balance( - cls, - customer: str, - **params: Unpack["Customer.ModifyCashBalanceParams"], + cls, customer: str, **params: Unpack["CustomerModifyCashBalanceParams"] ) -> "CashBalance": """ Changes the settings on a customer's cash balance. @@ -2991,9 +1839,7 @@ def modify_cash_balance( @classmethod async def modify_cash_balance_async( - cls, - customer: str, - **params: Unpack["Customer.ModifyCashBalanceParams"], + cls, customer: str, **params: Unpack["CustomerModifyCashBalanceParams"] ) -> "CashBalance": """ Changes the settings on a customer's cash balance. @@ -3016,7 +1862,7 @@ class TestHelpers(APIResourceTestHelpers["Customer"]): def _cls_fund_cash_balance( cls, customer: str, - **params: Unpack["Customer.FundCashBalanceParams"], + **params: Unpack["CustomerFundCashBalanceParams"], ) -> "CustomerCashBalanceTransaction": """ Create an incoming testmode bank transfer @@ -3035,7 +1881,7 @@ def _cls_fund_cash_balance( @overload @staticmethod def fund_cash_balance( - customer: str, **params: Unpack["Customer.FundCashBalanceParams"] + customer: str, **params: Unpack["CustomerFundCashBalanceParams"] ) -> "CustomerCashBalanceTransaction": """ Create an incoming testmode bank transfer @@ -3044,7 +1890,7 @@ def fund_cash_balance( @overload def fund_cash_balance( - self, **params: Unpack["Customer.FundCashBalanceParams"] + self, **params: Unpack["CustomerFundCashBalanceParams"] ) -> "CustomerCashBalanceTransaction": """ Create an incoming testmode bank transfer @@ -3053,7 +1899,7 @@ def fund_cash_balance( @class_method_variant("_cls_fund_cash_balance") def fund_cash_balance( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Customer.FundCashBalanceParams"] + self, **params: Unpack["CustomerFundCashBalanceParams"] ) -> "CustomerCashBalanceTransaction": """ Create an incoming testmode bank transfer @@ -3073,7 +1919,7 @@ def fund_cash_balance( # pyright: ignore[reportGeneralTypeIssues] async def _cls_fund_cash_balance_async( cls, customer: str, - **params: Unpack["Customer.FundCashBalanceParams"], + **params: Unpack["CustomerFundCashBalanceParams"], ) -> "CustomerCashBalanceTransaction": """ Create an incoming testmode bank transfer @@ -3092,7 +1938,7 @@ async def _cls_fund_cash_balance_async( @overload @staticmethod async def fund_cash_balance_async( - customer: str, **params: Unpack["Customer.FundCashBalanceParams"] + customer: str, **params: Unpack["CustomerFundCashBalanceParams"] ) -> "CustomerCashBalanceTransaction": """ Create an incoming testmode bank transfer @@ -3101,7 +1947,7 @@ async def fund_cash_balance_async( @overload async def fund_cash_balance_async( - self, **params: Unpack["Customer.FundCashBalanceParams"] + self, **params: Unpack["CustomerFundCashBalanceParams"] ) -> "CustomerCashBalanceTransaction": """ Create an incoming testmode bank transfer @@ -3110,7 +1956,7 @@ async def fund_cash_balance_async( @class_method_variant("_cls_fund_cash_balance_async") async def fund_cash_balance_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Customer.FundCashBalanceParams"] + self, **params: Unpack["CustomerFundCashBalanceParams"] ) -> "CustomerCashBalanceTransaction": """ Create an incoming testmode bank transfer diff --git a/stripe/_customer_balance_transaction_service.py b/stripe/_customer_balance_transaction_service.py index e8b04b420..154fedb02 100644 --- a/stripe/_customer_balance_transaction_service.py +++ b/stripe/_customer_balance_transaction_service.py @@ -5,77 +5,29 @@ from stripe._request_options import RequestOptions from stripe._stripe_service import StripeService from stripe._util import sanitize_id -from typing import Dict, List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params._customer_balance_transaction_create_params import ( + CustomerBalanceTransactionCreateParams, + ) + from stripe.params._customer_balance_transaction_list_params import ( + CustomerBalanceTransactionListParams, + ) + from stripe.params._customer_balance_transaction_retrieve_params import ( + CustomerBalanceTransactionRetrieveParams, + ) + from stripe.params._customer_balance_transaction_update_params import ( + CustomerBalanceTransactionUpdateParams, + ) -class CustomerBalanceTransactionService(StripeService): - class CreateParams(TypedDict): - amount: int - """ - The integer amount in **cents (or local equivalent)** to apply to the customer's credit balance. - """ - 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). Specifies the [`invoice_credit_balance`](https://stripe.com/docs/api/customers/object#customer_object-invoice_credit_balance) that this transaction will apply to. If the customer's `currency` is not set, it will be updated to this value. - """ - description: NotRequired[str] - """ - An arbitrary string attached to the object. Often useful for displaying to users. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - - class ListParams(TypedDict): - 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 RetrieveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class UpdateParams(TypedDict): - description: NotRequired[str] - """ - An arbitrary string attached to the object. Often useful for displaying to users. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ +class CustomerBalanceTransactionService(StripeService): def list( self, customer: str, - params: Optional[ - "CustomerBalanceTransactionService.ListParams" - ] = None, + params: Optional["CustomerBalanceTransactionListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[CustomerBalanceTransaction]: """ @@ -97,9 +49,7 @@ def list( async def list_async( self, customer: str, - params: Optional[ - "CustomerBalanceTransactionService.ListParams" - ] = None, + params: Optional["CustomerBalanceTransactionListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[CustomerBalanceTransaction]: """ @@ -121,7 +71,7 @@ async def list_async( def create( self, customer: str, - params: "CustomerBalanceTransactionService.CreateParams", + params: "CustomerBalanceTransactionCreateParams", options: Optional[RequestOptions] = None, ) -> CustomerBalanceTransaction: """ @@ -143,7 +93,7 @@ def create( async def create_async( self, customer: str, - params: "CustomerBalanceTransactionService.CreateParams", + params: "CustomerBalanceTransactionCreateParams", options: Optional[RequestOptions] = None, ) -> CustomerBalanceTransaction: """ @@ -166,9 +116,7 @@ def retrieve( self, customer: str, transaction: str, - params: Optional[ - "CustomerBalanceTransactionService.RetrieveParams" - ] = None, + params: Optional["CustomerBalanceTransactionRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> CustomerBalanceTransaction: """ @@ -192,9 +140,7 @@ async def retrieve_async( self, customer: str, transaction: str, - params: Optional[ - "CustomerBalanceTransactionService.RetrieveParams" - ] = None, + params: Optional["CustomerBalanceTransactionRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> CustomerBalanceTransaction: """ @@ -218,9 +164,7 @@ def update( self, customer: str, transaction: str, - params: Optional[ - "CustomerBalanceTransactionService.UpdateParams" - ] = None, + params: Optional["CustomerBalanceTransactionUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> CustomerBalanceTransaction: """ @@ -244,9 +188,7 @@ async def update_async( self, customer: str, transaction: str, - params: Optional[ - "CustomerBalanceTransactionService.UpdateParams" - ] = None, + params: Optional["CustomerBalanceTransactionUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> CustomerBalanceTransaction: """ diff --git a/stripe/_customer_cash_balance_service.py b/stripe/_customer_cash_balance_service.py index 9d6f55fd4..14e21c57d 100644 --- a/stripe/_customer_cash_balance_service.py +++ b/stripe/_customer_cash_balance_service.py @@ -4,41 +4,23 @@ from stripe._request_options import RequestOptions from stripe._stripe_service import StripeService from stripe._util import sanitize_id -from typing import List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params._customer_cash_balance_retrieve_params import ( + CustomerCashBalanceRetrieveParams, + ) + from stripe.params._customer_cash_balance_update_params import ( + CustomerCashBalanceUpdateParams, + ) -class CustomerCashBalanceService(StripeService): - class RetrieveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class UpdateParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - settings: NotRequired[ - "CustomerCashBalanceService.UpdateParamsSettings" - ] - """ - A hash of settings for this cash balance. - """ - - class UpdateParamsSettings(TypedDict): - reconciliation_mode: NotRequired[ - Literal["automatic", "manual", "merchant_default"] - ] - """ - Controls how funds transferred by the customer are applied to payment intents and invoices. Valid options are `automatic`, `manual`, or `merchant_default`. For more information about these reconciliation modes, see [Reconciliation](https://stripe.com/docs/payments/customer-balance/reconciliation). - """ +class CustomerCashBalanceService(StripeService): def retrieve( self, customer: str, - params: Optional["CustomerCashBalanceService.RetrieveParams"] = None, + params: Optional["CustomerCashBalanceRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> CashBalance: """ @@ -60,7 +42,7 @@ def retrieve( async def retrieve_async( self, customer: str, - params: Optional["CustomerCashBalanceService.RetrieveParams"] = None, + params: Optional["CustomerCashBalanceRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> CashBalance: """ @@ -82,7 +64,7 @@ async def retrieve_async( def update( self, customer: str, - params: Optional["CustomerCashBalanceService.UpdateParams"] = None, + params: Optional["CustomerCashBalanceUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> CashBalance: """ @@ -104,7 +86,7 @@ def update( async def update_async( self, customer: str, - params: Optional["CustomerCashBalanceService.UpdateParams"] = None, + params: Optional["CustomerCashBalanceUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> CashBalance: """ diff --git a/stripe/_customer_cash_balance_transaction_service.py b/stripe/_customer_cash_balance_transaction_service.py index 13d83f227..861f9dd1d 100644 --- a/stripe/_customer_cash_balance_transaction_service.py +++ b/stripe/_customer_cash_balance_transaction_service.py @@ -7,41 +7,23 @@ from stripe._request_options import RequestOptions from stripe._stripe_service import StripeService from stripe._util import sanitize_id -from typing import List, Optional, cast -from typing_extensions import NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params._customer_cash_balance_transaction_list_params import ( + CustomerCashBalanceTransactionListParams, + ) + from stripe.params._customer_cash_balance_transaction_retrieve_params import ( + CustomerCashBalanceTransactionRetrieveParams, + ) -class CustomerCashBalanceTransactionService(StripeService): - class ListParams(TypedDict): - 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 RetrieveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ +class CustomerCashBalanceTransactionService(StripeService): def list( self, customer: str, - params: Optional[ - "CustomerCashBalanceTransactionService.ListParams" - ] = None, + params: Optional["CustomerCashBalanceTransactionListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[CustomerCashBalanceTransaction]: """ @@ -63,9 +45,7 @@ def list( async def list_async( self, customer: str, - params: Optional[ - "CustomerCashBalanceTransactionService.ListParams" - ] = None, + params: Optional["CustomerCashBalanceTransactionListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[CustomerCashBalanceTransaction]: """ @@ -89,7 +69,7 @@ def retrieve( customer: str, transaction: str, params: Optional[ - "CustomerCashBalanceTransactionService.RetrieveParams" + "CustomerCashBalanceTransactionRetrieveParams" ] = None, options: Optional[RequestOptions] = None, ) -> CustomerCashBalanceTransaction: @@ -115,7 +95,7 @@ async def retrieve_async( customer: str, transaction: str, params: Optional[ - "CustomerCashBalanceTransactionService.RetrieveParams" + "CustomerCashBalanceTransactionRetrieveParams" ] = None, options: Optional[RequestOptions] = None, ) -> CustomerCashBalanceTransaction: diff --git a/stripe/_customer_funding_instructions_service.py b/stripe/_customer_funding_instructions_service.py index cfdd185b6..7df3a4ba8 100644 --- a/stripe/_customer_funding_instructions_service.py +++ b/stripe/_customer_funding_instructions_service.py @@ -4,67 +4,20 @@ from stripe._request_options import RequestOptions from stripe._stripe_service import StripeService from stripe._util import sanitize_id -from typing import List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params._customer_funding_instructions_create_params import ( + CustomerFundingInstructionsCreateParams, + ) -class CustomerFundingInstructionsService(StripeService): - class CreateParams(TypedDict): - bank_transfer: ( - "CustomerFundingInstructionsService.CreateParamsBankTransfer" - ) - """ - Additional parameters for `bank_transfer` funding types - """ - 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. - """ - funding_type: Literal["bank_transfer"] - """ - The `funding_type` to get the instructions for. - """ - - class CreateParamsBankTransfer(TypedDict): - eu_bank_transfer: NotRequired[ - "CustomerFundingInstructionsService.CreateParamsBankTransferEuBankTransfer" - ] - """ - Configuration for eu_bank_transfer funding type. - """ - requested_address_types: NotRequired[ - List[Literal["iban", "sort_code", "spei", "zengin"]] - ] - """ - List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned. - - Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`. - """ - type: Literal[ - "eu_bank_transfer", - "gb_bank_transfer", - "jp_bank_transfer", - "mx_bank_transfer", - "us_bank_transfer", - ] - """ - The type of the `bank_transfer` - """ - - class CreateParamsBankTransferEuBankTransfer(TypedDict): - country: str - """ - The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. - """ +class CustomerFundingInstructionsService(StripeService): def create( self, customer: str, - params: "CustomerFundingInstructionsService.CreateParams", + params: "CustomerFundingInstructionsCreateParams", options: Optional[RequestOptions] = None, ) -> FundingInstructions: """ @@ -88,7 +41,7 @@ def create( async def create_async( self, customer: str, - params: "CustomerFundingInstructionsService.CreateParams", + params: "CustomerFundingInstructionsCreateParams", options: Optional[RequestOptions] = None, ) -> FundingInstructions: """ diff --git a/stripe/_customer_payment_method_service.py b/stripe/_customer_payment_method_service.py index 8b74ac950..02b9e188e 100644 --- a/stripe/_customer_payment_method_service.py +++ b/stripe/_customer_payment_method_service.py @@ -5,109 +5,23 @@ from stripe._request_options import RequestOptions from stripe._stripe_service import StripeService from stripe._util import sanitize_id -from typing import List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params._customer_payment_method_list_params import ( + CustomerPaymentMethodListParams, + ) + from stripe.params._customer_payment_method_retrieve_params import ( + CustomerPaymentMethodRetrieveParams, + ) -class CustomerPaymentMethodService(StripeService): - class ListParams(TypedDict): - allow_redisplay: NotRequired[ - Literal["always", "limited", "unspecified"] - ] - """ - This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. - """ - 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. - """ - type: NotRequired[ - Literal[ - "acss_debit", - "affirm", - "afterpay_clearpay", - "alipay", - "alma", - "amazon_pay", - "au_becs_debit", - "bacs_debit", - "bancontact", - "billie", - "blik", - "boleto", - "card", - "cashapp", - "crypto", - "customer_balance", - "eps", - "fpx", - "giropay", - "gopay", - "grabpay", - "id_bank_transfer", - "ideal", - "kakao_pay", - "klarna", - "konbini", - "kr_card", - "link", - "mb_way", - "mobilepay", - "multibanco", - "naver_pay", - "nz_bank_account", - "oxxo", - "p24", - "pay_by_bank", - "payco", - "paynow", - "paypal", - "paypay", - "payto", - "pix", - "promptpay", - "qris", - "rechnung", - "revolut_pay", - "samsung_pay", - "satispay", - "sepa_debit", - "shopeepay", - "sofort", - "stripe_balance", - "swish", - "twint", - "us_bank_account", - "wechat_pay", - "zip", - ] - ] - """ - An optional filter on the list, based on the object `type` field. Without the filter, the list includes all current and future payment method types. If your integration expects only one type of payment method in the response, make sure to provide a type value in the request. - """ - - class RetrieveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ +class CustomerPaymentMethodService(StripeService): def list( self, customer: str, - params: Optional["CustomerPaymentMethodService.ListParams"] = None, + params: Optional["CustomerPaymentMethodListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[PaymentMethod]: """ @@ -129,7 +43,7 @@ def list( async def list_async( self, customer: str, - params: Optional["CustomerPaymentMethodService.ListParams"] = None, + params: Optional["CustomerPaymentMethodListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[PaymentMethod]: """ @@ -152,7 +66,7 @@ def retrieve( self, customer: str, payment_method: str, - params: Optional["CustomerPaymentMethodService.RetrieveParams"] = None, + params: Optional["CustomerPaymentMethodRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> PaymentMethod: """ @@ -176,7 +90,7 @@ async def retrieve_async( self, customer: str, payment_method: str, - params: Optional["CustomerPaymentMethodService.RetrieveParams"] = None, + params: Optional["CustomerPaymentMethodRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> PaymentMethod: """ diff --git a/stripe/_customer_payment_source_service.py b/stripe/_customer_payment_source_service.py index 7fad95914..7d865a4c2 100644 --- a/stripe/_customer_payment_source_service.py +++ b/stripe/_customer_payment_source_service.py @@ -8,175 +8,35 @@ from stripe._source import Source from stripe._stripe_service import StripeService from stripe._util import sanitize_id -from typing import Dict, List, Optional, Union, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, Union, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params._customer_payment_source_create_params import ( + CustomerPaymentSourceCreateParams, + ) + from stripe.params._customer_payment_source_delete_params import ( + CustomerPaymentSourceDeleteParams, + ) + from stripe.params._customer_payment_source_list_params import ( + CustomerPaymentSourceListParams, + ) + from stripe.params._customer_payment_source_retrieve_params import ( + CustomerPaymentSourceRetrieveParams, + ) + from stripe.params._customer_payment_source_update_params import ( + CustomerPaymentSourceUpdateParams, + ) + from stripe.params._customer_payment_source_verify_params import ( + CustomerPaymentSourceVerifyParams, + ) -class CustomerPaymentSourceService(StripeService): - class CreateParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - source: str - """ - Please refer to full [documentation](https://stripe.com/docs/api) instead. - """ - validate: NotRequired[bool] - - class DeleteParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class ListParams(TypedDict): - 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. - """ - object: NotRequired[str] - """ - Filter sources according to a particular object type. - """ - 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 RetrieveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class UpdateParams(TypedDict): - account_holder_name: NotRequired[str] - """ - The name of the person or business that owns the bank account. - """ - account_holder_type: NotRequired[Literal["company", "individual"]] - """ - The type of entity that holds the account. This can be either `individual` or `company`. - """ - address_city: NotRequired[str] - """ - City/District/Suburb/Town/Village. - """ - address_country: NotRequired[str] - """ - Billing address country, if provided when creating card. - """ - address_line1: NotRequired[str] - """ - Address line 1 (Street address/PO Box/Company name). - """ - address_line2: NotRequired[str] - """ - Address line 2 (Apartment/Suite/Unit/Building). - """ - address_state: NotRequired[str] - """ - State/County/Province/Region. - """ - address_zip: NotRequired[str] - """ - ZIP or postal code. - """ - exp_month: NotRequired[str] - """ - Two digit number representing the card's expiration month. - """ - exp_year: NotRequired[str] - """ - Four digit number representing the card's expiration year. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - name: NotRequired[str] - """ - Cardholder name. - """ - owner: NotRequired["CustomerPaymentSourceService.UpdateParamsOwner"] - - class UpdateParamsOwner(TypedDict): - address: NotRequired[ - "CustomerPaymentSourceService.UpdateParamsOwnerAddress" - ] - """ - Owner's address. - """ - email: NotRequired[str] - """ - Owner's email address. - """ - name: NotRequired[str] - """ - Owner's full name. - """ - phone: NotRequired[str] - """ - Owner's phone number. - """ - - class UpdateParamsOwnerAddress(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. - """ - - class VerifyParams(TypedDict): - amounts: NotRequired[List[int]] - """ - Two positive integers, in *cents*, equal to the values of the microdeposits sent to the bank account. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ +class CustomerPaymentSourceService(StripeService): def list( self, customer: str, - params: Optional["CustomerPaymentSourceService.ListParams"] = None, + params: Optional["CustomerPaymentSourceListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[Union[Account, BankAccount, Card, Source]]: """ @@ -198,7 +58,7 @@ def list( async def list_async( self, customer: str, - params: Optional["CustomerPaymentSourceService.ListParams"] = None, + params: Optional["CustomerPaymentSourceListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[Union[Account, BankAccount, Card, Source]]: """ @@ -220,7 +80,7 @@ async def list_async( def create( self, customer: str, - params: "CustomerPaymentSourceService.CreateParams", + params: "CustomerPaymentSourceCreateParams", options: Optional[RequestOptions] = None, ) -> Union[Account, BankAccount, Card, Source]: """ @@ -246,7 +106,7 @@ def create( async def create_async( self, customer: str, - params: "CustomerPaymentSourceService.CreateParams", + params: "CustomerPaymentSourceCreateParams", options: Optional[RequestOptions] = None, ) -> Union[Account, BankAccount, Card, Source]: """ @@ -273,7 +133,7 @@ def retrieve( self, customer: str, id: str, - params: Optional["CustomerPaymentSourceService.RetrieveParams"] = None, + params: Optional["CustomerPaymentSourceRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Union[Account, BankAccount, Card, Source]: """ @@ -297,7 +157,7 @@ async def retrieve_async( self, customer: str, id: str, - params: Optional["CustomerPaymentSourceService.RetrieveParams"] = None, + params: Optional["CustomerPaymentSourceRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Union[Account, BankAccount, Card, Source]: """ @@ -321,7 +181,7 @@ def update( self, customer: str, id: str, - params: Optional["CustomerPaymentSourceService.UpdateParams"] = None, + params: Optional["CustomerPaymentSourceUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> Union[Account, BankAccount, Card, Source]: """ @@ -345,7 +205,7 @@ async def update_async( self, customer: str, id: str, - params: Optional["CustomerPaymentSourceService.UpdateParams"] = None, + params: Optional["CustomerPaymentSourceUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> Union[Account, BankAccount, Card, Source]: """ @@ -369,7 +229,7 @@ def delete( self, customer: str, id: str, - params: Optional["CustomerPaymentSourceService.DeleteParams"] = None, + params: Optional["CustomerPaymentSourceDeleteParams"] = None, options: Optional[RequestOptions] = None, ) -> Union[Account, BankAccount, Card, Source]: """ @@ -393,7 +253,7 @@ async def delete_async( self, customer: str, id: str, - params: Optional["CustomerPaymentSourceService.DeleteParams"] = None, + params: Optional["CustomerPaymentSourceDeleteParams"] = None, options: Optional[RequestOptions] = None, ) -> Union[Account, BankAccount, Card, Source]: """ @@ -417,7 +277,7 @@ def verify( self, customer: str, id: str, - params: Optional["CustomerPaymentSourceService.VerifyParams"] = None, + params: Optional["CustomerPaymentSourceVerifyParams"] = None, options: Optional[RequestOptions] = None, ) -> BankAccount: """ @@ -441,7 +301,7 @@ async def verify_async( self, customer: str, id: str, - params: Optional["CustomerPaymentSourceService.VerifyParams"] = None, + params: Optional["CustomerPaymentSourceVerifyParams"] = None, options: Optional[RequestOptions] = None, ) -> BankAccount: """ diff --git a/stripe/_customer_service.py b/stripe/_customer_service.py index cbd6f6655..987f31db4 100644 --- a/stripe/_customer_service.py +++ b/stripe/_customer_service.py @@ -24,8 +24,19 @@ from stripe._search_result_object import SearchResultObject from stripe._stripe_service import StripeService from stripe._util import sanitize_id -from typing import Dict, List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params._customer_create_params import CustomerCreateParams + from stripe.params._customer_delete_discount_params import ( + CustomerDeleteDiscountParams, + ) + from stripe.params._customer_delete_params import CustomerDeleteParams + from stripe.params._customer_list_params import CustomerListParams + from stripe.params._customer_retrieve_params import CustomerRetrieveParams + from stripe.params._customer_search_params import CustomerSearchParams + from stripe.params._customer_update_params import CustomerUpdateParams class CustomerService(StripeService): @@ -45,668 +56,10 @@ def __init__(self, requestor): self.payment_sources = CustomerPaymentSourceService(self._requestor) self.tax_ids = CustomerTaxIdService(self._requestor) - class CreateParams(TypedDict): - address: NotRequired["Literal['']|CustomerService.CreateParamsAddress"] - """ - The customer's address. - """ - balance: NotRequired[int] - """ - An integer amount in cents (or local equivalent) that represents the customer's current balance, which affect the customer's future invoices. A negative amount represents a credit that decreases the amount due on an invoice; a positive amount increases the amount due on an invoice. - """ - business_name: NotRequired["Literal['']|str"] - """ - The customer's business name. This may be up to *150 characters*. - """ - cash_balance: NotRequired["CustomerService.CreateParamsCashBalance"] - """ - Balance information and default balance settings for this customer. - """ - description: NotRequired[str] - """ - An arbitrary string that you can attach to a customer object. It is displayed alongside the customer in the dashboard. - """ - email: NotRequired[str] - """ - Customer's email address. It's displayed alongside the customer in your dashboard and can be useful for searching and tracking. This may be up to *512 characters*. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - individual_name: NotRequired["Literal['']|str"] - """ - The customer's full name. This may be up to *150 characters*. - """ - invoice_prefix: NotRequired[str] - """ - The prefix for the customer used to generate unique invoice numbers. Must be 3–12 uppercase letters or numbers. - """ - invoice_settings: NotRequired[ - "CustomerService.CreateParamsInvoiceSettings" - ] - """ - Default invoice settings for this customer. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - name: NotRequired[str] - """ - The customer's full name or business name. - """ - next_invoice_sequence: NotRequired[int] - """ - The sequence to be used on the customer's next invoice. Defaults to 1. - """ - payment_method: NotRequired[str] - phone: NotRequired[str] - """ - The customer's phone number. - """ - preferred_locales: NotRequired[List[str]] - """ - Customer's preferred languages, ordered by preference. - """ - shipping: NotRequired[ - "Literal['']|CustomerService.CreateParamsShipping" - ] - """ - The customer's shipping information. Appears on invoices emailed to this customer. - """ - source: NotRequired[str] - tax: NotRequired["CustomerService.CreateParamsTax"] - """ - Tax details about the customer. - """ - tax_exempt: NotRequired[ - "Literal['']|Literal['exempt', 'none', 'reverse']" - ] - """ - The customer's tax exemption. One of `none`, `exempt`, or `reverse`. - """ - tax_id_data: NotRequired[ - List["CustomerService.CreateParamsTaxIdDatum"] - ] - """ - The customer's tax IDs. - """ - test_clock: NotRequired[str] - """ - ID of the test clock to attach to the customer. - """ - validate: NotRequired[bool] - - class CreateParamsAddress(TypedDict): - city: NotRequired[str] - """ - City, district, suburb, town, or village. - """ - country: NotRequired[str] - """ - A freeform text field for the country. However, in order to activate some tax features, the format should be a 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. - """ - - class CreateParamsCashBalance(TypedDict): - settings: NotRequired[ - "CustomerService.CreateParamsCashBalanceSettings" - ] - """ - Settings controlling the behavior of the customer's cash balance, - such as reconciliation of funds received. - """ - - class CreateParamsCashBalanceSettings(TypedDict): - reconciliation_mode: NotRequired[ - Literal["automatic", "manual", "merchant_default"] - ] - """ - Controls how funds transferred by the customer are applied to payment intents and invoices. Valid options are `automatic`, `manual`, or `merchant_default`. For more information about these reconciliation modes, see [Reconciliation](https://stripe.com/docs/payments/customer-balance/reconciliation). - """ - - class CreateParamsInvoiceSettings(TypedDict): - custom_fields: NotRequired[ - "Literal['']|List[CustomerService.CreateParamsInvoiceSettingsCustomField]" - ] - """ - The list of up to 4 default custom fields to be displayed on invoices for this customer. When updating, pass an empty string to remove previously-defined fields. - """ - default_payment_method: NotRequired[str] - """ - ID of a payment method that's attached to the customer, to be used as the customer's default payment method for subscriptions and invoices. - """ - footer: NotRequired[str] - """ - Default footer to be displayed on invoices for this customer. - """ - rendering_options: NotRequired[ - "Literal['']|CustomerService.CreateParamsInvoiceSettingsRenderingOptions" - ] - """ - Default options for invoice PDF rendering for this customer. - """ - - class CreateParamsInvoiceSettingsCustomField(TypedDict): - name: str - """ - The name of the custom field. This may be up to 40 characters. - """ - value: str - """ - The value of the custom field. This may be up to 140 characters. - """ - - class CreateParamsInvoiceSettingsRenderingOptions(TypedDict): - amount_tax_display: NotRequired[ - "Literal['']|Literal['exclude_tax', 'include_inclusive_tax']" - ] - """ - How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One of `exclude_tax` or `include_inclusive_tax`. `include_inclusive_tax` will include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. `exclude_tax` will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts. - """ - template: NotRequired[str] - """ - ID of the invoice rendering template to use for future invoices. - """ - - class CreateParamsShipping(TypedDict): - address: "CustomerService.CreateParamsShippingAddress" - """ - Customer shipping address. - """ - name: str - """ - Customer name. - """ - phone: NotRequired[str] - """ - Customer phone (including extension). - """ - - class CreateParamsShippingAddress(TypedDict): - city: NotRequired[str] - """ - City, district, suburb, town, or village. - """ - country: NotRequired[str] - """ - A freeform text field for the country. However, in order to activate some tax features, the format should be a 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. - """ - - class CreateParamsTax(TypedDict): - ip_address: NotRequired["Literal['']|str"] - """ - A recent IP address of the customer used for tax reporting and tax location inference. Stripe recommends updating the IP address when a new PaymentMethod is attached or the address field on the customer is updated. We recommend against updating this field more frequently since it could result in unexpected tax location/reporting outcomes. - """ - validate_location: NotRequired[Literal["deferred", "immediately"]] - """ - A flag that indicates when Stripe should validate the customer tax location. Defaults to `deferred`. - """ - - class CreateParamsTaxIdDatum(TypedDict): - type: Literal[ - "ad_nrt", - "ae_trn", - "al_tin", - "am_tin", - "ao_tin", - "ar_cuit", - "au_abn", - "au_arn", - "aw_tin", - "az_tin", - "ba_tin", - "bb_tin", - "bd_bin", - "bf_ifu", - "bg_uic", - "bh_vat", - "bj_ifu", - "bo_tin", - "br_cnpj", - "br_cpf", - "bs_tin", - "by_tin", - "ca_bn", - "ca_gst_hst", - "ca_pst_bc", - "ca_pst_mb", - "ca_pst_sk", - "ca_qst", - "cd_nif", - "ch_uid", - "ch_vat", - "cl_tin", - "cm_niu", - "cn_tin", - "co_nit", - "cr_tin", - "cv_nif", - "de_stn", - "do_rcn", - "ec_ruc", - "eg_tin", - "es_cif", - "et_tin", - "eu_oss_vat", - "eu_vat", - "gb_vat", - "ge_vat", - "gn_nif", - "hk_br", - "hr_oib", - "hu_tin", - "id_npwp", - "il_vat", - "in_gst", - "is_vat", - "jp_cn", - "jp_rn", - "jp_trn", - "ke_pin", - "kg_tin", - "kh_tin", - "kr_brn", - "kz_bin", - "la_tin", - "li_uid", - "li_vat", - "ma_vat", - "md_vat", - "me_pib", - "mk_vat", - "mr_nif", - "mx_rfc", - "my_frp", - "my_itn", - "my_sst", - "ng_tin", - "no_vat", - "no_voec", - "np_pan", - "nz_gst", - "om_vat", - "pe_ruc", - "ph_tin", - "ro_tin", - "rs_pib", - "ru_inn", - "ru_kpp", - "sa_vat", - "sg_gst", - "sg_uen", - "si_tin", - "sn_ninea", - "sr_fin", - "sv_nit", - "th_vat", - "tj_tin", - "tr_tin", - "tw_vat", - "tz_vat", - "ua_vat", - "ug_tin", - "us_ein", - "uy_ruc", - "uz_tin", - "uz_vat", - "ve_rif", - "vn_tin", - "za_vat", - "zm_tin", - "zw_tin", - ] - """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `al_tin`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `aw_tin`, `az_tin`, `ba_tin`, `bb_tin`, `bd_bin`, `bf_ifu`, `bg_uic`, `bh_vat`, `bj_ifu`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cm_niu`, `cn_tin`, `co_nit`, `cr_tin`, `cv_nif`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `et_tin`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kg_tin`, `kh_tin`, `kr_brn`, `kz_bin`, `la_tin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin` - """ - value: str - """ - Value of the tax ID. - """ - - class DeleteDiscountParams(TypedDict): - pass - - class DeleteParams(TypedDict): - pass - - class ListParams(TypedDict): - created: NotRequired["CustomerService.ListParamsCreated|int"] - """ - Only return customers that were created during the given date interval. - """ - email: NotRequired[str] - """ - A case-sensitive filter on the list based on the customer's `email` field. The value must be a string. - """ - 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. - """ - test_clock: NotRequired[str] - """ - Provides a list of customers that are associated with the specified test clock. The response will not include customers with test clocks if this parameter is not set. - """ - - class ListParamsCreated(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) - """ - - class RetrieveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class SearchParams(TypedDict): - 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. - """ - page: NotRequired[str] - """ - A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. - """ - query: str - """ - The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for customers](https://stripe.com/docs/search#query-fields-for-customers). - """ - - class UpdateParams(TypedDict): - address: NotRequired["Literal['']|CustomerService.UpdateParamsAddress"] - """ - The customer's address. - """ - balance: NotRequired[int] - """ - An integer amount in cents (or local equivalent) that represents the customer's current balance, which affect the customer's future invoices. A negative amount represents a credit that decreases the amount due on an invoice; a positive amount increases the amount due on an invoice. - """ - business_name: NotRequired["Literal['']|str"] - """ - The customer's business name. This may be up to *150 characters*. - """ - cash_balance: NotRequired["CustomerService.UpdateParamsCashBalance"] - """ - Balance information and default balance settings for this customer. - """ - default_source: NotRequired[str] - """ - If you are using payment methods created via the PaymentMethods API, see the [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/update#update_customer-invoice_settings-default_payment_method) parameter. - - Provide the ID of a payment source already attached to this customer to make it this customer's default payment source. - - If you want to add a new payment source and make it the default, see the [source](https://stripe.com/docs/api/customers/update#update_customer-source) property. - """ - description: NotRequired[str] - """ - An arbitrary string that you can attach to a customer object. It is displayed alongside the customer in the dashboard. - """ - email: NotRequired[str] - """ - Customer's email address. It's displayed alongside the customer in your dashboard and can be useful for searching and tracking. This may be up to *512 characters*. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - individual_name: NotRequired["Literal['']|str"] - """ - The customer's full name. This may be up to *150 characters*. - """ - invoice_prefix: NotRequired[str] - """ - The prefix for the customer used to generate unique invoice numbers. Must be 3–12 uppercase letters or numbers. - """ - invoice_settings: NotRequired[ - "CustomerService.UpdateParamsInvoiceSettings" - ] - """ - Default invoice settings for this customer. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - name: NotRequired[str] - """ - The customer's full name or business name. - """ - next_invoice_sequence: NotRequired[int] - """ - The sequence to be used on the customer's next invoice. Defaults to 1. - """ - phone: NotRequired[str] - """ - The customer's phone number. - """ - preferred_locales: NotRequired[List[str]] - """ - Customer's preferred languages, ordered by preference. - """ - shipping: NotRequired[ - "Literal['']|CustomerService.UpdateParamsShipping" - ] - """ - The customer's shipping information. Appears on invoices emailed to this customer. - """ - source: NotRequired[str] - tax: NotRequired["CustomerService.UpdateParamsTax"] - """ - Tax details about the customer. - """ - tax_exempt: NotRequired[ - "Literal['']|Literal['exempt', 'none', 'reverse']" - ] - """ - The customer's tax exemption. One of `none`, `exempt`, or `reverse`. - """ - validate: NotRequired[bool] - - class UpdateParamsAddress(TypedDict): - city: NotRequired[str] - """ - City, district, suburb, town, or village. - """ - country: NotRequired[str] - """ - A freeform text field for the country. However, in order to activate some tax features, the format should be a 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. - """ - - class UpdateParamsCashBalance(TypedDict): - settings: NotRequired[ - "CustomerService.UpdateParamsCashBalanceSettings" - ] - """ - Settings controlling the behavior of the customer's cash balance, - such as reconciliation of funds received. - """ - - class UpdateParamsCashBalanceSettings(TypedDict): - reconciliation_mode: NotRequired[ - Literal["automatic", "manual", "merchant_default"] - ] - """ - Controls how funds transferred by the customer are applied to payment intents and invoices. Valid options are `automatic`, `manual`, or `merchant_default`. For more information about these reconciliation modes, see [Reconciliation](https://stripe.com/docs/payments/customer-balance/reconciliation). - """ - - class UpdateParamsInvoiceSettings(TypedDict): - custom_fields: NotRequired[ - "Literal['']|List[CustomerService.UpdateParamsInvoiceSettingsCustomField]" - ] - """ - The list of up to 4 default custom fields to be displayed on invoices for this customer. When updating, pass an empty string to remove previously-defined fields. - """ - default_payment_method: NotRequired[str] - """ - ID of a payment method that's attached to the customer, to be used as the customer's default payment method for subscriptions and invoices. - """ - footer: NotRequired[str] - """ - Default footer to be displayed on invoices for this customer. - """ - rendering_options: NotRequired[ - "Literal['']|CustomerService.UpdateParamsInvoiceSettingsRenderingOptions" - ] - """ - Default options for invoice PDF rendering for this customer. - """ - - class UpdateParamsInvoiceSettingsCustomField(TypedDict): - name: str - """ - The name of the custom field. This may be up to 40 characters. - """ - value: str - """ - The value of the custom field. This may be up to 140 characters. - """ - - class UpdateParamsInvoiceSettingsRenderingOptions(TypedDict): - amount_tax_display: NotRequired[ - "Literal['']|Literal['exclude_tax', 'include_inclusive_tax']" - ] - """ - How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One of `exclude_tax` or `include_inclusive_tax`. `include_inclusive_tax` will include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. `exclude_tax` will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts. - """ - template: NotRequired[str] - """ - ID of the invoice rendering template to use for future invoices. - """ - - class UpdateParamsShipping(TypedDict): - address: "CustomerService.UpdateParamsShippingAddress" - """ - Customer shipping address. - """ - name: str - """ - Customer name. - """ - phone: NotRequired[str] - """ - Customer phone (including extension). - """ - - class UpdateParamsShippingAddress(TypedDict): - city: NotRequired[str] - """ - City, district, suburb, town, or village. - """ - country: NotRequired[str] - """ - A freeform text field for the country. However, in order to activate some tax features, the format should be a 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. - """ - - class UpdateParamsTax(TypedDict): - ip_address: NotRequired["Literal['']|str"] - """ - A recent IP address of the customer used for tax reporting and tax location inference. Stripe recommends updating the IP address when a new PaymentMethod is attached or the address field on the customer is updated. We recommend against updating this field more frequently since it could result in unexpected tax location/reporting outcomes. - """ - validate_location: NotRequired[ - Literal["auto", "deferred", "immediately"] - ] - """ - A flag that indicates when Stripe should validate the customer tax location. Defaults to `auto`. - """ - def delete( self, customer: str, - params: Optional["CustomerService.DeleteParams"] = None, + params: Optional["CustomerDeleteParams"] = None, options: Optional[RequestOptions] = None, ) -> Customer: """ @@ -728,7 +81,7 @@ def delete( async def delete_async( self, customer: str, - params: Optional["CustomerService.DeleteParams"] = None, + params: Optional["CustomerDeleteParams"] = None, options: Optional[RequestOptions] = None, ) -> Customer: """ @@ -750,7 +103,7 @@ async def delete_async( def retrieve( self, customer: str, - params: Optional["CustomerService.RetrieveParams"] = None, + params: Optional["CustomerRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Customer: """ @@ -772,7 +125,7 @@ def retrieve( async def retrieve_async( self, customer: str, - params: Optional["CustomerService.RetrieveParams"] = None, + params: Optional["CustomerRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Customer: """ @@ -794,7 +147,7 @@ async def retrieve_async( def update( self, customer: str, - params: Optional["CustomerService.UpdateParams"] = None, + params: Optional["CustomerUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> Customer: """ @@ -818,7 +171,7 @@ def update( async def update_async( self, customer: str, - params: Optional["CustomerService.UpdateParams"] = None, + params: Optional["CustomerUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> Customer: """ @@ -842,7 +195,7 @@ async def update_async( def delete_discount( self, customer: str, - params: Optional["CustomerService.DeleteDiscountParams"] = None, + params: Optional["CustomerDeleteDiscountParams"] = None, options: Optional[RequestOptions] = None, ) -> Discount: """ @@ -864,7 +217,7 @@ def delete_discount( async def delete_discount_async( self, customer: str, - params: Optional["CustomerService.DeleteDiscountParams"] = None, + params: Optional["CustomerDeleteDiscountParams"] = None, options: Optional[RequestOptions] = None, ) -> Discount: """ @@ -885,7 +238,7 @@ async def delete_discount_async( def list( self, - params: Optional["CustomerService.ListParams"] = None, + params: Optional["CustomerListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[Customer]: """ @@ -904,7 +257,7 @@ def list( async def list_async( self, - params: Optional["CustomerService.ListParams"] = None, + params: Optional["CustomerListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[Customer]: """ @@ -923,7 +276,7 @@ async def list_async( def create( self, - params: Optional["CustomerService.CreateParams"] = None, + params: Optional["CustomerCreateParams"] = None, options: Optional[RequestOptions] = None, ) -> Customer: """ @@ -942,7 +295,7 @@ def create( async def create_async( self, - params: Optional["CustomerService.CreateParams"] = None, + params: Optional["CustomerCreateParams"] = None, options: Optional[RequestOptions] = None, ) -> Customer: """ @@ -961,7 +314,7 @@ async def create_async( def search( self, - params: "CustomerService.SearchParams", + params: "CustomerSearchParams", options: Optional[RequestOptions] = None, ) -> SearchResultObject[Customer]: """ @@ -983,7 +336,7 @@ def search( async def search_async( self, - params: "CustomerService.SearchParams", + params: "CustomerSearchParams", options: Optional[RequestOptions] = None, ) -> SearchResultObject[Customer]: """ diff --git a/stripe/_customer_session.py b/stripe/_customer_session.py index d0b4b6c4a..79e2e1891 100644 --- a/stripe/_customer_session.py +++ b/stripe/_customer_session.py @@ -2,19 +2,15 @@ # File generated from our OpenAPI spec from stripe._createable_api_resource import CreateableAPIResource from stripe._expandable_field import ExpandableField -from stripe._request_options import RequestOptions from stripe._stripe_object import StripeObject from typing import ClassVar, List, Optional, cast -from typing_extensions import ( - Literal, - NotRequired, - TypedDict, - Unpack, - TYPE_CHECKING, -) +from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: from stripe._customer import Customer + from stripe.params._customer_session_create_params import ( + CustomerSessionCreateParams, + ) class CustomerSession(CreateableAPIResource["CustomerSession"]): @@ -109,106 +105,6 @@ class PricingTable(StripeObject): "pricing_table": PricingTable, } - class CreateParams(RequestOptions): - components: "CustomerSession.CreateParamsComponents" - """ - Configuration for each component. Exactly 1 component must be enabled. - """ - customer: NotRequired[str] - """ - The ID of an existing customer for which to create the Customer Session. - """ - customer_account: NotRequired[str] - """ - The ID of an existing Account for which to create the Customer Session. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class CreateParamsComponents(TypedDict): - buy_button: NotRequired[ - "CustomerSession.CreateParamsComponentsBuyButton" - ] - """ - Configuration for buy button. - """ - payment_element: NotRequired[ - "CustomerSession.CreateParamsComponentsPaymentElement" - ] - """ - Configuration for the Payment Element. - """ - pricing_table: NotRequired[ - "CustomerSession.CreateParamsComponentsPricingTable" - ] - """ - Configuration for the pricing table. - """ - - class CreateParamsComponentsBuyButton(TypedDict): - enabled: bool - """ - Whether the buy button is enabled. - """ - - class CreateParamsComponentsPaymentElement(TypedDict): - enabled: bool - """ - Whether the Payment Element is enabled. - """ - features: NotRequired[ - "CustomerSession.CreateParamsComponentsPaymentElementFeatures" - ] - """ - This hash defines whether the Payment Element supports certain features. - """ - - class CreateParamsComponentsPaymentElementFeatures(TypedDict): - payment_method_allow_redisplay_filters: NotRequired[ - List[Literal["always", "limited", "unspecified"]] - ] - """ - A list of [`allow_redisplay`](https://docs.stripe.com/api/payment_methods/object#payment_method_object-allow_redisplay) values that controls which saved payment methods the Payment Element displays by filtering to only show payment methods with an `allow_redisplay` value that is present in this list. - - If not specified, defaults to ["always"]. In order to display all saved payment methods, specify ["always", "limited", "unspecified"]. - """ - payment_method_redisplay: NotRequired[Literal["disabled", "enabled"]] - """ - Controls whether or not the Payment Element shows saved payment methods. This parameter defaults to `disabled`. - """ - payment_method_redisplay_limit: NotRequired[int] - """ - Determines the max number of saved payment methods for the Payment Element to display. This parameter defaults to `3`. The maximum redisplay limit is `10`. - """ - payment_method_remove: NotRequired[Literal["disabled", "enabled"]] - """ - Controls whether the Payment Element displays the option to remove a saved payment method. This parameter defaults to `disabled`. - - Allowing buyers to remove their saved payment methods impacts subscriptions that depend on that payment method. Removing the payment method detaches the [`customer` object](https://docs.stripe.com/api/payment_methods/object#payment_method_object-customer) from that [PaymentMethod](https://docs.stripe.com/api/payment_methods). - """ - payment_method_save: NotRequired[Literal["disabled", "enabled"]] - """ - Controls whether the Payment Element displays a checkbox offering to save a new payment method. This parameter defaults to `disabled`. - - If a customer checks the box, the [`allow_redisplay`](https://docs.stripe.com/api/payment_methods/object#payment_method_object-allow_redisplay) value on the PaymentMethod is set to `'always'` at confirmation time. For PaymentIntents, the [`setup_future_usage`](https://docs.stripe.com/api/payment_intents/object#payment_intent_object-setup_future_usage) value is also set to the value defined in `payment_method_save_usage`. - """ - payment_method_save_usage: NotRequired[ - Literal["off_session", "on_session"] - ] - """ - When using PaymentIntents and the customer checks the save checkbox, this field determines the [`setup_future_usage`](https://docs.stripe.com/api/payment_intents/object#payment_intent_object-setup_future_usage) value used to confirm the PaymentIntent. - - When using SetupIntents, directly configure the [`usage`](https://docs.stripe.com/api/setup_intents/object#setup_intent_object-usage) value on SetupIntent creation. - """ - - class CreateParamsComponentsPricingTable(TypedDict): - enabled: bool - """ - Whether the pricing table is enabled. - """ - client_secret: str """ The client secret of this Customer Session. Used on the client to set up secure access to the given `customer`. @@ -246,7 +142,7 @@ class CreateParamsComponentsPricingTable(TypedDict): @classmethod def create( - cls, **params: Unpack["CustomerSession.CreateParams"] + cls, **params: Unpack["CustomerSessionCreateParams"] ) -> "CustomerSession": """ Creates a Customer Session object that includes a single-use client secret that you can use on your front-end to grant client-side API access for certain customer resources. @@ -262,7 +158,7 @@ def create( @classmethod async def create_async( - cls, **params: Unpack["CustomerSession.CreateParams"] + cls, **params: Unpack["CustomerSessionCreateParams"] ) -> "CustomerSession": """ Creates a Customer Session object that includes a single-use client secret that you can use on your front-end to grant client-side API access for certain customer resources. diff --git a/stripe/_customer_session_service.py b/stripe/_customer_session_service.py index 433aecf48..61d8e9cc1 100644 --- a/stripe/_customer_session_service.py +++ b/stripe/_customer_session_service.py @@ -3,114 +3,19 @@ from stripe._customer_session import CustomerSession from stripe._request_options import RequestOptions from stripe._stripe_service import StripeService -from typing import List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params._customer_session_create_params import ( + CustomerSessionCreateParams, + ) -class CustomerSessionService(StripeService): - class CreateParams(TypedDict): - components: "CustomerSessionService.CreateParamsComponents" - """ - Configuration for each component. Exactly 1 component must be enabled. - """ - customer: NotRequired[str] - """ - The ID of an existing customer for which to create the Customer Session. - """ - customer_account: NotRequired[str] - """ - The ID of an existing Account for which to create the Customer Session. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class CreateParamsComponents(TypedDict): - buy_button: NotRequired[ - "CustomerSessionService.CreateParamsComponentsBuyButton" - ] - """ - Configuration for buy button. - """ - payment_element: NotRequired[ - "CustomerSessionService.CreateParamsComponentsPaymentElement" - ] - """ - Configuration for the Payment Element. - """ - pricing_table: NotRequired[ - "CustomerSessionService.CreateParamsComponentsPricingTable" - ] - """ - Configuration for the pricing table. - """ - - class CreateParamsComponentsBuyButton(TypedDict): - enabled: bool - """ - Whether the buy button is enabled. - """ - - class CreateParamsComponentsPaymentElement(TypedDict): - enabled: bool - """ - Whether the Payment Element is enabled. - """ - features: NotRequired[ - "CustomerSessionService.CreateParamsComponentsPaymentElementFeatures" - ] - """ - This hash defines whether the Payment Element supports certain features. - """ - - class CreateParamsComponentsPaymentElementFeatures(TypedDict): - payment_method_allow_redisplay_filters: NotRequired[ - List[Literal["always", "limited", "unspecified"]] - ] - """ - A list of [`allow_redisplay`](https://docs.stripe.com/api/payment_methods/object#payment_method_object-allow_redisplay) values that controls which saved payment methods the Payment Element displays by filtering to only show payment methods with an `allow_redisplay` value that is present in this list. - - If not specified, defaults to ["always"]. In order to display all saved payment methods, specify ["always", "limited", "unspecified"]. - """ - payment_method_redisplay: NotRequired[Literal["disabled", "enabled"]] - """ - Controls whether or not the Payment Element shows saved payment methods. This parameter defaults to `disabled`. - """ - payment_method_redisplay_limit: NotRequired[int] - """ - Determines the max number of saved payment methods for the Payment Element to display. This parameter defaults to `3`. The maximum redisplay limit is `10`. - """ - payment_method_remove: NotRequired[Literal["disabled", "enabled"]] - """ - Controls whether the Payment Element displays the option to remove a saved payment method. This parameter defaults to `disabled`. - - Allowing buyers to remove their saved payment methods impacts subscriptions that depend on that payment method. Removing the payment method detaches the [`customer` object](https://docs.stripe.com/api/payment_methods/object#payment_method_object-customer) from that [PaymentMethod](https://docs.stripe.com/api/payment_methods). - """ - payment_method_save: NotRequired[Literal["disabled", "enabled"]] - """ - Controls whether the Payment Element displays a checkbox offering to save a new payment method. This parameter defaults to `disabled`. - - If a customer checks the box, the [`allow_redisplay`](https://docs.stripe.com/api/payment_methods/object#payment_method_object-allow_redisplay) value on the PaymentMethod is set to `'always'` at confirmation time. For PaymentIntents, the [`setup_future_usage`](https://docs.stripe.com/api/payment_intents/object#payment_intent_object-setup_future_usage) value is also set to the value defined in `payment_method_save_usage`. - """ - payment_method_save_usage: NotRequired[ - Literal["off_session", "on_session"] - ] - """ - When using PaymentIntents and the customer checks the save checkbox, this field determines the [`setup_future_usage`](https://docs.stripe.com/api/payment_intents/object#payment_intent_object-setup_future_usage) value used to confirm the PaymentIntent. - - When using SetupIntents, directly configure the [`usage`](https://docs.stripe.com/api/setup_intents/object#setup_intent_object-usage) value on SetupIntent creation. - """ - - class CreateParamsComponentsPricingTable(TypedDict): - enabled: bool - """ - Whether the pricing table is enabled. - """ +class CustomerSessionService(StripeService): def create( self, - params: "CustomerSessionService.CreateParams", + params: "CustomerSessionCreateParams", options: Optional[RequestOptions] = None, ) -> CustomerSession: """ @@ -129,7 +34,7 @@ def create( async def create_async( self, - params: "CustomerSessionService.CreateParams", + params: "CustomerSessionCreateParams", options: Optional[RequestOptions] = None, ) -> CustomerSession: """ diff --git a/stripe/_customer_tax_id_service.py b/stripe/_customer_tax_id_service.py index 215f8c386..99c5088c7 100644 --- a/stripe/_customer_tax_id_service.py +++ b/stripe/_customer_tax_id_service.py @@ -5,168 +5,30 @@ from stripe._stripe_service import StripeService from stripe._tax_id import TaxId from stripe._util import sanitize_id -from typing import List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params._customer_tax_id_create_params import ( + CustomerTaxIdCreateParams, + ) + from stripe.params._customer_tax_id_delete_params import ( + CustomerTaxIdDeleteParams, + ) + from stripe.params._customer_tax_id_list_params import ( + CustomerTaxIdListParams, + ) + from stripe.params._customer_tax_id_retrieve_params import ( + CustomerTaxIdRetrieveParams, + ) -class CustomerTaxIdService(StripeService): - class CreateParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - type: Literal[ - "ad_nrt", - "ae_trn", - "al_tin", - "am_tin", - "ao_tin", - "ar_cuit", - "au_abn", - "au_arn", - "aw_tin", - "az_tin", - "ba_tin", - "bb_tin", - "bd_bin", - "bf_ifu", - "bg_uic", - "bh_vat", - "bj_ifu", - "bo_tin", - "br_cnpj", - "br_cpf", - "bs_tin", - "by_tin", - "ca_bn", - "ca_gst_hst", - "ca_pst_bc", - "ca_pst_mb", - "ca_pst_sk", - "ca_qst", - "cd_nif", - "ch_uid", - "ch_vat", - "cl_tin", - "cm_niu", - "cn_tin", - "co_nit", - "cr_tin", - "cv_nif", - "de_stn", - "do_rcn", - "ec_ruc", - "eg_tin", - "es_cif", - "et_tin", - "eu_oss_vat", - "eu_vat", - "gb_vat", - "ge_vat", - "gn_nif", - "hk_br", - "hr_oib", - "hu_tin", - "id_npwp", - "il_vat", - "in_gst", - "is_vat", - "jp_cn", - "jp_rn", - "jp_trn", - "ke_pin", - "kg_tin", - "kh_tin", - "kr_brn", - "kz_bin", - "la_tin", - "li_uid", - "li_vat", - "ma_vat", - "md_vat", - "me_pib", - "mk_vat", - "mr_nif", - "mx_rfc", - "my_frp", - "my_itn", - "my_sst", - "ng_tin", - "no_vat", - "no_voec", - "np_pan", - "nz_gst", - "om_vat", - "pe_ruc", - "ph_tin", - "ro_tin", - "rs_pib", - "ru_inn", - "ru_kpp", - "sa_vat", - "sg_gst", - "sg_uen", - "si_tin", - "sn_ninea", - "sr_fin", - "sv_nit", - "th_vat", - "tj_tin", - "tr_tin", - "tw_vat", - "tz_vat", - "ua_vat", - "ug_tin", - "us_ein", - "uy_ruc", - "uz_tin", - "uz_vat", - "ve_rif", - "vn_tin", - "za_vat", - "zm_tin", - "zw_tin", - ] - """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `al_tin`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `aw_tin`, `az_tin`, `ba_tin`, `bb_tin`, `bd_bin`, `bf_ifu`, `bg_uic`, `bh_vat`, `bj_ifu`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cm_niu`, `cn_tin`, `co_nit`, `cr_tin`, `cv_nif`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `et_tin`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kg_tin`, `kh_tin`, `kr_brn`, `kz_bin`, `la_tin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin` - """ - value: str - """ - Value of the tax ID. - """ - - class DeleteParams(TypedDict): - pass - - class ListParams(TypedDict): - 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 RetrieveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ +class CustomerTaxIdService(StripeService): def delete( self, customer: str, id: str, - params: Optional["CustomerTaxIdService.DeleteParams"] = None, + params: Optional["CustomerTaxIdDeleteParams"] = None, options: Optional[RequestOptions] = None, ) -> TaxId: """ @@ -190,7 +52,7 @@ async def delete_async( self, customer: str, id: str, - params: Optional["CustomerTaxIdService.DeleteParams"] = None, + params: Optional["CustomerTaxIdDeleteParams"] = None, options: Optional[RequestOptions] = None, ) -> TaxId: """ @@ -214,7 +76,7 @@ def retrieve( self, customer: str, id: str, - params: Optional["CustomerTaxIdService.RetrieveParams"] = None, + params: Optional["CustomerTaxIdRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> TaxId: """ @@ -238,7 +100,7 @@ async def retrieve_async( self, customer: str, id: str, - params: Optional["CustomerTaxIdService.RetrieveParams"] = None, + params: Optional["CustomerTaxIdRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> TaxId: """ @@ -261,7 +123,7 @@ async def retrieve_async( def list( self, customer: str, - params: Optional["CustomerTaxIdService.ListParams"] = None, + params: Optional["CustomerTaxIdListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[TaxId]: """ @@ -283,7 +145,7 @@ def list( async def list_async( self, customer: str, - params: Optional["CustomerTaxIdService.ListParams"] = None, + params: Optional["CustomerTaxIdListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[TaxId]: """ @@ -305,7 +167,7 @@ async def list_async( def create( self, customer: str, - params: "CustomerTaxIdService.CreateParams", + params: "CustomerTaxIdCreateParams", options: Optional[RequestOptions] = None, ) -> TaxId: """ @@ -327,7 +189,7 @@ def create( async def create_async( self, customer: str, - params: "CustomerTaxIdService.CreateParams", + params: "CustomerTaxIdCreateParams", options: Optional[RequestOptions] = None, ) -> TaxId: """ diff --git a/stripe/_dispute.py b/stripe/_dispute.py index 44566682d..3a88f8922 100644 --- a/stripe/_dispute.py +++ b/stripe/_dispute.py @@ -3,24 +3,21 @@ from stripe._expandable_field import ExpandableField from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource -from stripe._request_options import RequestOptions from stripe._stripe_object import StripeObject from stripe._updateable_api_resource import UpdateableAPIResource from stripe._util import class_method_variant, sanitize_id from typing import ClassVar, Dict, List, Optional, cast, overload -from typing_extensions import ( - Literal, - NotRequired, - TypedDict, - Unpack, - TYPE_CHECKING, -) +from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: from stripe._balance_transaction import BalanceTransaction from stripe._charge import Charge from stripe._file import File from stripe._payment_intent import PaymentIntent + from stripe.params._dispute_close_params import DisputeCloseParams + from stripe.params._dispute_list_params import DisputeListParams + from stripe.params._dispute_modify_params import DisputeModifyParams + from stripe.params._dispute_retrieve_params import DisputeRetrieveParams class Dispute( @@ -432,383 +429,6 @@ class SmartDisputes(StripeObject): Smart Disputes auto representment packet availability status. """ - class CloseParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class ListParams(RequestOptions): - charge: NotRequired[str] - """ - Only return disputes associated to the charge specified by this charge ID. - """ - created: NotRequired["Dispute.ListParamsCreated|int"] - """ - Only return disputes that were created during the given date interval. - """ - 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. - """ - payment_intent: NotRequired[str] - """ - Only return disputes associated to the PaymentIntent specified by this PaymentIntent ID. - """ - 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 ListParamsCreated(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) - """ - - class ModifyParams(RequestOptions): - evidence: NotRequired["Dispute.ModifyParamsEvidence"] - """ - Evidence to upload, to respond to a dispute. Updating any field in the hash will submit all fields in the hash for review. The combined character count of all fields is limited to 150,000. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - intended_submission_method: NotRequired[ - Literal[ - "manual", - "prefer_manual", - "prefer_smart_disputes", - "smart_disputes", - ] - ] - """ - Intended submission method for the dispute. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - submit: NotRequired[bool] - """ - Whether to immediately submit evidence to the bank. If `false`, evidence is staged on the dispute. Staged evidence is visible in the API and Dashboard, and can be submitted to the bank by making another request with this attribute set to `true` (the default). - """ - - class ModifyParamsEvidence(TypedDict): - access_activity_log: NotRequired[str] - """ - Any server or activity logs showing proof that the customer accessed or downloaded the purchased digital product. This information should include IP addresses, corresponding timestamps, and any detailed recorded activity. Has a maximum character count of 20,000. - """ - billing_address: NotRequired[str] - """ - The billing address provided by the customer. - """ - cancellation_policy: NotRequired[str] - """ - (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Your subscription cancellation policy, as shown to the customer. - """ - cancellation_policy_disclosure: NotRequired[str] - """ - An explanation of how and when the customer was shown your refund policy prior to purchase. Has a maximum character count of 20,000. - """ - cancellation_rebuttal: NotRequired[str] - """ - A justification for why the customer's subscription was not canceled. Has a maximum character count of 20,000. - """ - customer_communication: NotRequired[str] - """ - (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any communication with the customer that you feel is relevant to your case. Examples include emails proving that the customer received the product or service, or demonstrating their use of or satisfaction with the product or service. - """ - customer_email_address: NotRequired[str] - """ - The email address of the customer. - """ - customer_name: NotRequired[str] - """ - The name of the customer. - """ - customer_purchase_ip: NotRequired[str] - """ - The IP address that the customer used when making the purchase. - """ - customer_signature: NotRequired[str] - """ - (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) A relevant document or contract showing the customer's signature. - """ - duplicate_charge_documentation: NotRequired[str] - """ - (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Documentation for the prior charge that can uniquely identify the charge, such as a receipt, shipping label, work order, etc. This document should be paired with a similar document from the disputed payment that proves the two payments are separate. - """ - duplicate_charge_explanation: NotRequired[str] - """ - An explanation of the difference between the disputed charge versus the prior charge that appears to be a duplicate. Has a maximum character count of 20,000. - """ - duplicate_charge_id: NotRequired[str] - """ - The Stripe ID for the prior charge which appears to be a duplicate of the disputed charge. - """ - enhanced_evidence: NotRequired[ - "Literal['']|Dispute.ModifyParamsEvidenceEnhancedEvidence" - ] - """ - Additional evidence for qualifying evidence programs. - """ - product_description: NotRequired[str] - """ - A description of the product or service that was sold. Has a maximum character count of 20,000. - """ - receipt: NotRequired[str] - """ - (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any receipt or message sent to the customer notifying them of the charge. - """ - refund_policy: NotRequired[str] - """ - (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Your refund policy, as shown to the customer. - """ - refund_policy_disclosure: NotRequired[str] - """ - Documentation demonstrating that the customer was shown your refund policy prior to purchase. Has a maximum character count of 20,000. - """ - refund_refusal_explanation: NotRequired[str] - """ - A justification for why the customer is not entitled to a refund. Has a maximum character count of 20,000. - """ - service_date: NotRequired[str] - """ - The date on which the customer received or began receiving the purchased service, in a clear human-readable format. - """ - service_documentation: NotRequired[str] - """ - (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Documentation showing proof that a service was provided to the customer. This could include a copy of a signed contract, work order, or other form of written agreement. - """ - shipping_address: NotRequired[str] - """ - The address to which a physical product was shipped. You should try to include as complete address information as possible. - """ - shipping_carrier: NotRequired[str] - """ - The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. If multiple carriers were used for this purchase, please separate them with commas. - """ - shipping_date: NotRequired[str] - """ - The date on which a physical product began its route to the shipping address, in a clear human-readable format. - """ - shipping_documentation: NotRequired[str] - """ - (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Documentation showing proof that a product was shipped to the customer at the same address the customer provided to you. This could include a copy of the shipment receipt, shipping label, etc. It should show the customer's full shipping address, if possible. - """ - shipping_tracking_number: NotRequired[str] - """ - The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. - """ - uncategorized_file: NotRequired[str] - """ - (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any additional evidence or statements. - """ - uncategorized_text: NotRequired[str] - """ - Any additional evidence or statements. Has a maximum character count of 20,000. - """ - - class ModifyParamsEvidenceEnhancedEvidence(TypedDict): - visa_compelling_evidence_3: NotRequired[ - "Dispute.ModifyParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3" - ] - """ - Evidence provided for Visa Compelling Evidence 3.0 evidence submission. - """ - visa_compliance: NotRequired[ - "Dispute.ModifyParamsEvidenceEnhancedEvidenceVisaCompliance" - ] - """ - Evidence provided for Visa compliance evidence submission. - """ - - class ModifyParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3( - TypedDict, - ): - disputed_transaction: NotRequired[ - "Dispute.ModifyParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3DisputedTransaction" - ] - """ - Disputed transaction details for Visa Compelling Evidence 3.0 evidence submission. - """ - prior_undisputed_transactions: NotRequired[ - List[ - "Dispute.ModifyParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3PriorUndisputedTransaction" - ] - ] - """ - List of exactly two prior undisputed transaction objects for Visa Compelling Evidence 3.0 evidence submission. - """ - - class ModifyParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3DisputedTransaction( - TypedDict, - ): - customer_account_id: NotRequired["Literal['']|str"] - """ - User Account ID used to log into business platform. Must be recognizable by the user. - """ - customer_device_fingerprint: NotRequired["Literal['']|str"] - """ - Unique identifier of the cardholder's device derived from a combination of at least two hardware and software attributes. Must be at least 20 characters. - """ - customer_device_id: NotRequired["Literal['']|str"] - """ - Unique identifier of the cardholder's device such as a device serial number (e.g., International Mobile Equipment Identity [IMEI]). Must be at least 15 characters. - """ - customer_email_address: NotRequired["Literal['']|str"] - """ - The email address of the customer. - """ - customer_purchase_ip: NotRequired["Literal['']|str"] - """ - The IP address that the customer used when making the purchase. - """ - merchandise_or_services: NotRequired[ - Literal["merchandise", "services"] - ] - """ - Categorization of disputed payment. - """ - product_description: NotRequired["Literal['']|str"] - """ - A description of the product or service that was sold. - """ - shipping_address: NotRequired[ - "Dispute.ModifyParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3DisputedTransactionShippingAddress" - ] - """ - The address to which a physical product was shipped. All fields are required for Visa Compelling Evidence 3.0 evidence submission. - """ - - class ModifyParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3DisputedTransactionShippingAddress( - TypedDict, - ): - city: NotRequired["Literal['']|str"] - """ - City, district, suburb, town, or village. - """ - country: NotRequired["Literal['']|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, county, province, or region. - """ - - class ModifyParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3PriorUndisputedTransaction( - TypedDict, - ): - charge: str - """ - Stripe charge ID for the Visa Compelling Evidence 3.0 eligible prior charge. - """ - customer_account_id: NotRequired["Literal['']|str"] - """ - User Account ID used to log into business platform. Must be recognizable by the user. - """ - customer_device_fingerprint: NotRequired["Literal['']|str"] - """ - Unique identifier of the cardholder's device derived from a combination of at least two hardware and software attributes. Must be at least 20 characters. - """ - customer_device_id: NotRequired["Literal['']|str"] - """ - Unique identifier of the cardholder's device such as a device serial number (e.g., International Mobile Equipment Identity [IMEI]). Must be at least 15 characters. - """ - customer_email_address: NotRequired["Literal['']|str"] - """ - The email address of the customer. - """ - customer_purchase_ip: NotRequired["Literal['']|str"] - """ - The IP address that the customer used when making the purchase. - """ - product_description: NotRequired["Literal['']|str"] - """ - A description of the product or service that was sold. - """ - shipping_address: NotRequired[ - "Dispute.ModifyParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3PriorUndisputedTransactionShippingAddress" - ] - """ - The address to which a physical product was shipped. All fields are required for Visa Compelling Evidence 3.0 evidence submission. - """ - - class ModifyParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3PriorUndisputedTransactionShippingAddress( - TypedDict, - ): - city: NotRequired["Literal['']|str"] - """ - City, district, suburb, town, or village. - """ - country: NotRequired["Literal['']|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, county, province, or region. - """ - - class ModifyParamsEvidenceEnhancedEvidenceVisaCompliance(TypedDict): - fee_acknowledged: NotRequired[bool] - """ - A field acknowledging the fee incurred when countering a Visa compliance dispute. If this field is set to true, evidence can be submitted for the compliance dispute. Stripe collects a 500 USD (or local equivalent) amount to cover the network costs associated with resolving compliance disputes. Stripe refunds the 500 USD network fee if you win the dispute. - """ - - class RetrieveParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - amount: int """ Disputed amount. Usually the amount of the charge, but it can differ (usually because of currency fluctuation or because only part of the order is disputed). @@ -898,7 +518,7 @@ class RetrieveParams(RequestOptions): @classmethod def _cls_close( - cls, dispute: str, **params: Unpack["Dispute.CloseParams"] + cls, dispute: str, **params: Unpack["DisputeCloseParams"] ) -> "Dispute": """ Closing the dispute for a charge indicates that you do not have any evidence to submit and are essentially dismissing the dispute, acknowledging it as lost. @@ -919,7 +539,7 @@ def _cls_close( @overload @staticmethod def close( - dispute: str, **params: Unpack["Dispute.CloseParams"] + dispute: str, **params: Unpack["DisputeCloseParams"] ) -> "Dispute": """ Closing the dispute for a charge indicates that you do not have any evidence to submit and are essentially dismissing the dispute, acknowledging it as lost. @@ -929,7 +549,7 @@ def close( ... @overload - def close(self, **params: Unpack["Dispute.CloseParams"]) -> "Dispute": + def close(self, **params: Unpack["DisputeCloseParams"]) -> "Dispute": """ Closing the dispute for a charge indicates that you do not have any evidence to submit and are essentially dismissing the dispute, acknowledging it as lost. @@ -939,7 +559,7 @@ def close(self, **params: Unpack["Dispute.CloseParams"]) -> "Dispute": @class_method_variant("_cls_close") def close( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Dispute.CloseParams"] + self, **params: Unpack["DisputeCloseParams"] ) -> "Dispute": """ Closing the dispute for a charge indicates that you do not have any evidence to submit and are essentially dismissing the dispute, acknowledging it as lost. @@ -959,7 +579,7 @@ def close( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_close_async( - cls, dispute: str, **params: Unpack["Dispute.CloseParams"] + cls, dispute: str, **params: Unpack["DisputeCloseParams"] ) -> "Dispute": """ Closing the dispute for a charge indicates that you do not have any evidence to submit and are essentially dismissing the dispute, acknowledging it as lost. @@ -980,7 +600,7 @@ async def _cls_close_async( @overload @staticmethod async def close_async( - dispute: str, **params: Unpack["Dispute.CloseParams"] + dispute: str, **params: Unpack["DisputeCloseParams"] ) -> "Dispute": """ Closing the dispute for a charge indicates that you do not have any evidence to submit and are essentially dismissing the dispute, acknowledging it as lost. @@ -991,7 +611,7 @@ async def close_async( @overload async def close_async( - self, **params: Unpack["Dispute.CloseParams"] + self, **params: Unpack["DisputeCloseParams"] ) -> "Dispute": """ Closing the dispute for a charge indicates that you do not have any evidence to submit and are essentially dismissing the dispute, acknowledging it as lost. @@ -1002,7 +622,7 @@ async def close_async( @class_method_variant("_cls_close_async") async def close_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Dispute.CloseParams"] + self, **params: Unpack["DisputeCloseParams"] ) -> "Dispute": """ Closing the dispute for a charge indicates that you do not have any evidence to submit and are essentially dismissing the dispute, acknowledging it as lost. @@ -1022,7 +642,7 @@ async def close_async( # pyright: ignore[reportGeneralTypeIssues] @classmethod def list( - cls, **params: Unpack["Dispute.ListParams"] + cls, **params: Unpack["DisputeListParams"] ) -> ListObject["Dispute"]: """ Returns a list of your disputes. @@ -1042,7 +662,7 @@ def list( @classmethod async def list_async( - cls, **params: Unpack["Dispute.ListParams"] + cls, **params: Unpack["DisputeListParams"] ) -> ListObject["Dispute"]: """ Returns a list of your disputes. @@ -1062,7 +682,7 @@ async def list_async( @classmethod def modify( - cls, id: str, **params: Unpack["Dispute.ModifyParams"] + cls, id: str, **params: Unpack["DisputeModifyParams"] ) -> "Dispute": """ When you get a dispute, contacting your customer is always the best first step. If that doesn't work, you can submit evidence to help us resolve the dispute in your favor. You can do this in your [dashboard](https://dashboard.stripe.com/disputes), but if you prefer, you can use the API to submit evidence programmatically. @@ -1081,7 +701,7 @@ def modify( @classmethod async def modify_async( - cls, id: str, **params: Unpack["Dispute.ModifyParams"] + cls, id: str, **params: Unpack["DisputeModifyParams"] ) -> "Dispute": """ When you get a dispute, contacting your customer is always the best first step. If that doesn't work, you can submit evidence to help us resolve the dispute in your favor. You can do this in your [dashboard](https://dashboard.stripe.com/disputes), but if you prefer, you can use the API to submit evidence programmatically. @@ -1100,7 +720,7 @@ async def modify_async( @classmethod def retrieve( - cls, id: str, **params: Unpack["Dispute.RetrieveParams"] + cls, id: str, **params: Unpack["DisputeRetrieveParams"] ) -> "Dispute": """ Retrieves the dispute with the given ID. @@ -1111,7 +731,7 @@ def retrieve( @classmethod async def retrieve_async( - cls, id: str, **params: Unpack["Dispute.RetrieveParams"] + cls, id: str, **params: Unpack["DisputeRetrieveParams"] ) -> "Dispute": """ Retrieves the dispute with the given ID. diff --git a/stripe/_dispute_service.py b/stripe/_dispute_service.py index 0ea495c0b..706140dc3 100644 --- a/stripe/_dispute_service.py +++ b/stripe/_dispute_service.py @@ -5,391 +5,20 @@ from stripe._request_options import RequestOptions from stripe._stripe_service import StripeService from stripe._util import sanitize_id -from typing import Dict, List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params._dispute_close_params import DisputeCloseParams + from stripe.params._dispute_list_params import DisputeListParams + from stripe.params._dispute_retrieve_params import DisputeRetrieveParams + from stripe.params._dispute_update_params import DisputeUpdateParams -class DisputeService(StripeService): - class CloseParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class ListParams(TypedDict): - charge: NotRequired[str] - """ - Only return disputes associated to the charge specified by this charge ID. - """ - created: NotRequired["DisputeService.ListParamsCreated|int"] - """ - Only return disputes that were created during the given date interval. - """ - 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. - """ - payment_intent: NotRequired[str] - """ - Only return disputes associated to the PaymentIntent specified by this PaymentIntent ID. - """ - 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 ListParamsCreated(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) - """ - - class RetrieveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class UpdateParams(TypedDict): - evidence: NotRequired["DisputeService.UpdateParamsEvidence"] - """ - Evidence to upload, to respond to a dispute. Updating any field in the hash will submit all fields in the hash for review. The combined character count of all fields is limited to 150,000. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - intended_submission_method: NotRequired[ - Literal[ - "manual", - "prefer_manual", - "prefer_smart_disputes", - "smart_disputes", - ] - ] - """ - Intended submission method for the dispute. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - submit: NotRequired[bool] - """ - Whether to immediately submit evidence to the bank. If `false`, evidence is staged on the dispute. Staged evidence is visible in the API and Dashboard, and can be submitted to the bank by making another request with this attribute set to `true` (the default). - """ - - class UpdateParamsEvidence(TypedDict): - access_activity_log: NotRequired[str] - """ - Any server or activity logs showing proof that the customer accessed or downloaded the purchased digital product. This information should include IP addresses, corresponding timestamps, and any detailed recorded activity. Has a maximum character count of 20,000. - """ - billing_address: NotRequired[str] - """ - The billing address provided by the customer. - """ - cancellation_policy: NotRequired[str] - """ - (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Your subscription cancellation policy, as shown to the customer. - """ - cancellation_policy_disclosure: NotRequired[str] - """ - An explanation of how and when the customer was shown your refund policy prior to purchase. Has a maximum character count of 20,000. - """ - cancellation_rebuttal: NotRequired[str] - """ - A justification for why the customer's subscription was not canceled. Has a maximum character count of 20,000. - """ - customer_communication: NotRequired[str] - """ - (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any communication with the customer that you feel is relevant to your case. Examples include emails proving that the customer received the product or service, or demonstrating their use of or satisfaction with the product or service. - """ - customer_email_address: NotRequired[str] - """ - The email address of the customer. - """ - customer_name: NotRequired[str] - """ - The name of the customer. - """ - customer_purchase_ip: NotRequired[str] - """ - The IP address that the customer used when making the purchase. - """ - customer_signature: NotRequired[str] - """ - (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) A relevant document or contract showing the customer's signature. - """ - duplicate_charge_documentation: NotRequired[str] - """ - (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Documentation for the prior charge that can uniquely identify the charge, such as a receipt, shipping label, work order, etc. This document should be paired with a similar document from the disputed payment that proves the two payments are separate. - """ - duplicate_charge_explanation: NotRequired[str] - """ - An explanation of the difference between the disputed charge versus the prior charge that appears to be a duplicate. Has a maximum character count of 20,000. - """ - duplicate_charge_id: NotRequired[str] - """ - The Stripe ID for the prior charge which appears to be a duplicate of the disputed charge. - """ - enhanced_evidence: NotRequired[ - "Literal['']|DisputeService.UpdateParamsEvidenceEnhancedEvidence" - ] - """ - Additional evidence for qualifying evidence programs. - """ - product_description: NotRequired[str] - """ - A description of the product or service that was sold. Has a maximum character count of 20,000. - """ - receipt: NotRequired[str] - """ - (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any receipt or message sent to the customer notifying them of the charge. - """ - refund_policy: NotRequired[str] - """ - (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Your refund policy, as shown to the customer. - """ - refund_policy_disclosure: NotRequired[str] - """ - Documentation demonstrating that the customer was shown your refund policy prior to purchase. Has a maximum character count of 20,000. - """ - refund_refusal_explanation: NotRequired[str] - """ - A justification for why the customer is not entitled to a refund. Has a maximum character count of 20,000. - """ - service_date: NotRequired[str] - """ - The date on which the customer received or began receiving the purchased service, in a clear human-readable format. - """ - service_documentation: NotRequired[str] - """ - (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Documentation showing proof that a service was provided to the customer. This could include a copy of a signed contract, work order, or other form of written agreement. - """ - shipping_address: NotRequired[str] - """ - The address to which a physical product was shipped. You should try to include as complete address information as possible. - """ - shipping_carrier: NotRequired[str] - """ - The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. If multiple carriers were used for this purchase, please separate them with commas. - """ - shipping_date: NotRequired[str] - """ - The date on which a physical product began its route to the shipping address, in a clear human-readable format. - """ - shipping_documentation: NotRequired[str] - """ - (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Documentation showing proof that a product was shipped to the customer at the same address the customer provided to you. This could include a copy of the shipment receipt, shipping label, etc. It should show the customer's full shipping address, if possible. - """ - shipping_tracking_number: NotRequired[str] - """ - The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. - """ - uncategorized_file: NotRequired[str] - """ - (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any additional evidence or statements. - """ - uncategorized_text: NotRequired[str] - """ - Any additional evidence or statements. Has a maximum character count of 20,000. - """ - - class UpdateParamsEvidenceEnhancedEvidence(TypedDict): - visa_compelling_evidence_3: NotRequired[ - "DisputeService.UpdateParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3" - ] - """ - Evidence provided for Visa Compelling Evidence 3.0 evidence submission. - """ - visa_compliance: NotRequired[ - "DisputeService.UpdateParamsEvidenceEnhancedEvidenceVisaCompliance" - ] - """ - Evidence provided for Visa compliance evidence submission. - """ - - class UpdateParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3( - TypedDict, - ): - disputed_transaction: NotRequired[ - "DisputeService.UpdateParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3DisputedTransaction" - ] - """ - Disputed transaction details for Visa Compelling Evidence 3.0 evidence submission. - """ - prior_undisputed_transactions: NotRequired[ - List[ - "DisputeService.UpdateParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3PriorUndisputedTransaction" - ] - ] - """ - List of exactly two prior undisputed transaction objects for Visa Compelling Evidence 3.0 evidence submission. - """ - - class UpdateParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3DisputedTransaction( - TypedDict, - ): - customer_account_id: NotRequired["Literal['']|str"] - """ - User Account ID used to log into business platform. Must be recognizable by the user. - """ - customer_device_fingerprint: NotRequired["Literal['']|str"] - """ - Unique identifier of the cardholder's device derived from a combination of at least two hardware and software attributes. Must be at least 20 characters. - """ - customer_device_id: NotRequired["Literal['']|str"] - """ - Unique identifier of the cardholder's device such as a device serial number (e.g., International Mobile Equipment Identity [IMEI]). Must be at least 15 characters. - """ - customer_email_address: NotRequired["Literal['']|str"] - """ - The email address of the customer. - """ - customer_purchase_ip: NotRequired["Literal['']|str"] - """ - The IP address that the customer used when making the purchase. - """ - merchandise_or_services: NotRequired[ - Literal["merchandise", "services"] - ] - """ - Categorization of disputed payment. - """ - product_description: NotRequired["Literal['']|str"] - """ - A description of the product or service that was sold. - """ - shipping_address: NotRequired[ - "DisputeService.UpdateParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3DisputedTransactionShippingAddress" - ] - """ - The address to which a physical product was shipped. All fields are required for Visa Compelling Evidence 3.0 evidence submission. - """ - - class UpdateParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3DisputedTransactionShippingAddress( - TypedDict, - ): - city: NotRequired["Literal['']|str"] - """ - City, district, suburb, town, or village. - """ - country: NotRequired["Literal['']|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, county, province, or region. - """ - - class UpdateParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3PriorUndisputedTransaction( - TypedDict, - ): - charge: str - """ - Stripe charge ID for the Visa Compelling Evidence 3.0 eligible prior charge. - """ - customer_account_id: NotRequired["Literal['']|str"] - """ - User Account ID used to log into business platform. Must be recognizable by the user. - """ - customer_device_fingerprint: NotRequired["Literal['']|str"] - """ - Unique identifier of the cardholder's device derived from a combination of at least two hardware and software attributes. Must be at least 20 characters. - """ - customer_device_id: NotRequired["Literal['']|str"] - """ - Unique identifier of the cardholder's device such as a device serial number (e.g., International Mobile Equipment Identity [IMEI]). Must be at least 15 characters. - """ - customer_email_address: NotRequired["Literal['']|str"] - """ - The email address of the customer. - """ - customer_purchase_ip: NotRequired["Literal['']|str"] - """ - The IP address that the customer used when making the purchase. - """ - product_description: NotRequired["Literal['']|str"] - """ - A description of the product or service that was sold. - """ - shipping_address: NotRequired[ - "DisputeService.UpdateParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3PriorUndisputedTransactionShippingAddress" - ] - """ - The address to which a physical product was shipped. All fields are required for Visa Compelling Evidence 3.0 evidence submission. - """ - - class UpdateParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3PriorUndisputedTransactionShippingAddress( - TypedDict, - ): - city: NotRequired["Literal['']|str"] - """ - City, district, suburb, town, or village. - """ - country: NotRequired["Literal['']|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, county, province, or region. - """ - - class UpdateParamsEvidenceEnhancedEvidenceVisaCompliance(TypedDict): - fee_acknowledged: NotRequired[bool] - """ - A field acknowledging the fee incurred when countering a Visa compliance dispute. If this field is set to true, evidence can be submitted for the compliance dispute. Stripe collects a 500 USD (or local equivalent) amount to cover the network costs associated with resolving compliance disputes. Stripe refunds the 500 USD network fee if you win the dispute. - """ +class DisputeService(StripeService): def list( self, - params: Optional["DisputeService.ListParams"] = None, + params: Optional["DisputeListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[Dispute]: """ @@ -408,7 +37,7 @@ def list( async def list_async( self, - params: Optional["DisputeService.ListParams"] = None, + params: Optional["DisputeListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[Dispute]: """ @@ -428,7 +57,7 @@ async def list_async( def retrieve( self, dispute: str, - params: Optional["DisputeService.RetrieveParams"] = None, + params: Optional["DisputeRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Dispute: """ @@ -448,7 +77,7 @@ def retrieve( async def retrieve_async( self, dispute: str, - params: Optional["DisputeService.RetrieveParams"] = None, + params: Optional["DisputeRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Dispute: """ @@ -468,7 +97,7 @@ async def retrieve_async( def update( self, dispute: str, - params: Optional["DisputeService.UpdateParams"] = None, + params: Optional["DisputeUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> Dispute: """ @@ -490,7 +119,7 @@ def update( async def update_async( self, dispute: str, - params: Optional["DisputeService.UpdateParams"] = None, + params: Optional["DisputeUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> Dispute: """ @@ -512,7 +141,7 @@ async def update_async( def close( self, dispute: str, - params: Optional["DisputeService.CloseParams"] = None, + params: Optional["DisputeCloseParams"] = None, options: Optional[RequestOptions] = None, ) -> Dispute: """ @@ -536,7 +165,7 @@ def close( async def close_async( self, dispute: str, - params: Optional["DisputeService.CloseParams"] = None, + params: Optional["DisputeCloseParams"] = None, options: Optional[RequestOptions] = None, ) -> Dispute: """ diff --git a/stripe/_ephemeral_key.py b/stripe/_ephemeral_key.py index 8347402a4..830e86b51 100644 --- a/stripe/_ephemeral_key.py +++ b/stripe/_ephemeral_key.py @@ -2,10 +2,14 @@ # File generated from our OpenAPI spec from stripe._createable_api_resource import CreateableAPIResource from stripe._deletable_api_resource import DeletableAPIResource -from stripe._request_options import RequestOptions from stripe._util import class_method_variant, sanitize_id -from typing import ClassVar, List, Optional, cast, overload -from typing_extensions import Literal, NotRequired, Unpack +from typing import ClassVar, Optional, cast, overload +from typing_extensions import Literal, Unpack, TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params._ephemeral_key_delete_params import ( + EphemeralKeyDeleteParams, + ) class EphemeralKey( @@ -13,13 +17,6 @@ class EphemeralKey( DeletableAPIResource["EphemeralKey"], ): OBJECT_NAME: ClassVar[Literal["ephemeral_key"]] = "ephemeral_key" - - class DeleteParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - created: int """ Time at which the object was created. Measured in seconds since the Unix epoch. @@ -47,7 +44,7 @@ class DeleteParams(RequestOptions): @classmethod def _cls_delete( - cls, sid: str, **params: Unpack["EphemeralKey.DeleteParams"] + cls, sid: str, **params: Unpack["EphemeralKeyDeleteParams"] ) -> "EphemeralKey": """ Invalidates a short-lived API key for a given resource. @@ -65,7 +62,7 @@ def _cls_delete( @overload @staticmethod def delete( - sid: str, **params: Unpack["EphemeralKey.DeleteParams"] + sid: str, **params: Unpack["EphemeralKeyDeleteParams"] ) -> "EphemeralKey": """ Invalidates a short-lived API key for a given resource. @@ -74,7 +71,7 @@ def delete( @overload def delete( - self, **params: Unpack["EphemeralKey.DeleteParams"] + self, **params: Unpack["EphemeralKeyDeleteParams"] ) -> "EphemeralKey": """ Invalidates a short-lived API key for a given resource. @@ -83,7 +80,7 @@ def delete( @class_method_variant("_cls_delete") def delete( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["EphemeralKey.DeleteParams"] + self, **params: Unpack["EphemeralKeyDeleteParams"] ) -> "EphemeralKey": """ Invalidates a short-lived API key for a given resource. @@ -96,7 +93,7 @@ def delete( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_delete_async( - cls, sid: str, **params: Unpack["EphemeralKey.DeleteParams"] + cls, sid: str, **params: Unpack["EphemeralKeyDeleteParams"] ) -> "EphemeralKey": """ Invalidates a short-lived API key for a given resource. @@ -114,7 +111,7 @@ async def _cls_delete_async( @overload @staticmethod async def delete_async( - sid: str, **params: Unpack["EphemeralKey.DeleteParams"] + sid: str, **params: Unpack["EphemeralKeyDeleteParams"] ) -> "EphemeralKey": """ Invalidates a short-lived API key for a given resource. @@ -123,7 +120,7 @@ async def delete_async( @overload async def delete_async( - self, **params: Unpack["EphemeralKey.DeleteParams"] + self, **params: Unpack["EphemeralKeyDeleteParams"] ) -> "EphemeralKey": """ Invalidates a short-lived API key for a given resource. @@ -132,7 +129,7 @@ async def delete_async( @class_method_variant("_cls_delete_async") async def delete_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["EphemeralKey.DeleteParams"] + self, **params: Unpack["EphemeralKeyDeleteParams"] ) -> "EphemeralKey": """ Invalidates a short-lived API key for a given resource. diff --git a/stripe/_ephemeral_key_service.py b/stripe/_ephemeral_key_service.py index 9b37ff8e7..96ac943a1 100644 --- a/stripe/_ephemeral_key_service.py +++ b/stripe/_ephemeral_key_service.py @@ -4,43 +4,23 @@ from stripe._request_options import RequestOptions from stripe._stripe_service import StripeService from stripe._util import sanitize_id -from typing import List, Optional, cast -from typing_extensions import NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params._ephemeral_key_create_params import ( + EphemeralKeyCreateParams, + ) + from stripe.params._ephemeral_key_delete_params import ( + EphemeralKeyDeleteParams, + ) -class EphemeralKeyService(StripeService): - class CreateParams(TypedDict): - customer: NotRequired[str] - """ - The ID of the Customer you'd like to modify using the resulting ephemeral key. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - issuing_card: NotRequired[str] - """ - The ID of the Issuing Card you'd like to access using the resulting ephemeral key. - """ - nonce: NotRequired[str] - """ - A single-use token, created by Stripe.js, used for creating ephemeral keys for Issuing Cards without exchanging sensitive information. - """ - verification_session: NotRequired[str] - """ - The ID of the Identity VerificationSession you'd like to access using the resulting ephemeral key - """ - - class DeleteParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ +class EphemeralKeyService(StripeService): def delete( self, key: str, - params: Optional["EphemeralKeyService.DeleteParams"] = None, + params: Optional["EphemeralKeyDeleteParams"] = None, options: Optional[RequestOptions] = None, ) -> EphemeralKey: """ @@ -60,7 +40,7 @@ def delete( async def delete_async( self, key: str, - params: Optional["EphemeralKeyService.DeleteParams"] = None, + params: Optional["EphemeralKeyDeleteParams"] = None, options: Optional[RequestOptions] = None, ) -> EphemeralKey: """ @@ -79,7 +59,7 @@ async def delete_async( def create( self, - params: Optional["EphemeralKeyService.CreateParams"] = None, + params: Optional["EphemeralKeyCreateParams"] = None, options: Optional[RequestOptions] = None, ) -> EphemeralKey: """ @@ -98,7 +78,7 @@ def create( async def create_async( self, - params: Optional["EphemeralKeyService.CreateParams"] = None, + params: Optional["EphemeralKeyCreateParams"] = None, options: Optional[RequestOptions] = None, ) -> EphemeralKey: """ diff --git a/stripe/_event.py b/stripe/_event.py index cd532a5d4..73690a620 100644 --- a/stripe/_event.py +++ b/stripe/_event.py @@ -2,10 +2,13 @@ # File generated from our OpenAPI spec from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource -from stripe._request_options import RequestOptions from stripe._stripe_object import StripeObject -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Literal, NotRequired, TypedDict, Unpack +from typing import Any, ClassVar, Dict, Optional +from typing_extensions import Literal, Unpack, TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params._event_list_params import EventListParams + from stripe.params._event_retrieve_params import EventRetrieveParams class Event(ListableAPIResource["Event"]): @@ -97,64 +100,6 @@ class Request(StripeObject): The idempotency key transmitted during the request, if any. *Note: This property is populated only for events on or after May 23, 2017*. """ - class ListParams(RequestOptions): - created: NotRequired["Event.ListParamsCreated|int"] - """ - Only return events that were created during the given date interval. - """ - delivery_success: NotRequired[bool] - """ - Filter events by whether all webhooks were successfully delivered. If false, events which are still pending or have failed all delivery attempts to a webhook endpoint will be returned. - """ - 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. - """ - type: NotRequired[str] - """ - A string containing a specific event name, or group of events using * as a wildcard. The list will be filtered to include only events with a matching event property. - """ - types: NotRequired[List[str]] - """ - An array of up to 20 strings containing specific event names. The list will be filtered to include only events with a matching event property. You may pass either `type` or `types`, but not both. - """ - - class ListParamsCreated(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) - """ - - class RetrieveParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - account: Optional[str] """ The connected account that originates the event. @@ -491,7 +436,7 @@ class RetrieveParams(RequestOptions): """ @classmethod - def list(cls, **params: Unpack["Event.ListParams"]) -> ListObject["Event"]: + def list(cls, **params: Unpack["EventListParams"]) -> ListObject["Event"]: """ List events, going back up to 30 days. Each event data is rendered according to Stripe API version at its creation time, specified in [event object](https://docs.stripe.com/api/events/object) api_version attribute (not according to your current Stripe API version or Stripe-Version header). """ @@ -510,7 +455,7 @@ def list(cls, **params: Unpack["Event.ListParams"]) -> ListObject["Event"]: @classmethod async def list_async( - cls, **params: Unpack["Event.ListParams"] + cls, **params: Unpack["EventListParams"] ) -> ListObject["Event"]: """ List events, going back up to 30 days. Each event data is rendered according to Stripe API version at its creation time, specified in [event object](https://docs.stripe.com/api/events/object) api_version attribute (not according to your current Stripe API version or Stripe-Version header). @@ -530,7 +475,7 @@ async def list_async( @classmethod def retrieve( - cls, id: str, **params: Unpack["Event.RetrieveParams"] + cls, id: str, **params: Unpack["EventRetrieveParams"] ) -> "Event": """ Retrieves the details of an event if it was created in the last 30 days. Supply the unique identifier of the event, which you might have received in a webhook. @@ -541,7 +486,7 @@ def retrieve( @classmethod async def retrieve_async( - cls, id: str, **params: Unpack["Event.RetrieveParams"] + cls, id: str, **params: Unpack["EventRetrieveParams"] ) -> "Event": """ Retrieves the details of an event if it was created in the last 30 days. Supply the unique identifier of the event, which you might have received in a webhook. diff --git a/stripe/_event_service.py b/stripe/_event_service.py index 6034a062e..ede795857 100644 --- a/stripe/_event_service.py +++ b/stripe/_event_service.py @@ -5,72 +5,18 @@ from stripe._request_options import RequestOptions from stripe._stripe_service import StripeService from stripe._util import sanitize_id -from typing import List, Optional, cast -from typing_extensions import NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params._event_list_params import EventListParams + from stripe.params._event_retrieve_params import EventRetrieveParams -class EventService(StripeService): - class ListParams(TypedDict): - created: NotRequired["EventService.ListParamsCreated|int"] - """ - Only return events that were created during the given date interval. - """ - delivery_success: NotRequired[bool] - """ - Filter events by whether all webhooks were successfully delivered. If false, events which are still pending or have failed all delivery attempts to a webhook endpoint will be returned. - """ - 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. - """ - type: NotRequired[str] - """ - A string containing a specific event name, or group of events using * as a wildcard. The list will be filtered to include only events with a matching event property. - """ - types: NotRequired[List[str]] - """ - An array of up to 20 strings containing specific event names. The list will be filtered to include only events with a matching event property. You may pass either `type` or `types`, but not both. - """ - - class ListParamsCreated(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) - """ - - class RetrieveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ +class EventService(StripeService): def list( self, - params: Optional["EventService.ListParams"] = None, + params: Optional["EventListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[Event]: """ @@ -89,7 +35,7 @@ def list( async def list_async( self, - params: Optional["EventService.ListParams"] = None, + params: Optional["EventListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[Event]: """ @@ -109,7 +55,7 @@ async def list_async( def retrieve( self, id: str, - params: Optional["EventService.RetrieveParams"] = None, + params: Optional["EventRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Event: """ @@ -129,7 +75,7 @@ def retrieve( async def retrieve_async( self, id: str, - params: Optional["EventService.RetrieveParams"] = None, + params: Optional["EventRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Event: """ diff --git a/stripe/_exchange_rate.py b/stripe/_exchange_rate.py index 83ec43d65..4e7bdfff4 100644 --- a/stripe/_exchange_rate.py +++ b/stripe/_exchange_rate.py @@ -2,10 +2,15 @@ # File generated from our OpenAPI spec from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource -from stripe._request_options import RequestOptions from stripe._util import deprecated -from typing import ClassVar, Dict, List -from typing_extensions import Literal, NotRequired, Unpack +from typing import ClassVar, Dict +from typing_extensions import Literal, Unpack, TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params._exchange_rate_list_params import ExchangeRateListParams + from stripe.params._exchange_rate_retrieve_params import ( + ExchangeRateRetrieveParams, + ) class ExchangeRate(ListableAPIResource["ExchangeRate"]): @@ -41,31 +46,6 @@ class ExchangeRate(ListableAPIResource["ExchangeRate"]): """ OBJECT_NAME: ClassVar[Literal["exchange_rate"]] = "exchange_rate" - - class ListParams(RequestOptions): - ending_before: NotRequired[str] - """ - A cursor for use in pagination. `ending_before` is the currency that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with the exchange rate for currency X 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 total number of supported payout currencies, and the default is the max. - """ - starting_after: NotRequired[str] - """ - A cursor for use in pagination. `starting_after` is the currency that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with the exchange rate for currency X, your subsequent call can include `starting_after=X` in order to fetch the next page of the list. - """ - - class RetrieveParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - id: str """ Unique identifier for the object. Represented as the three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) in lowercase. @@ -84,7 +64,7 @@ class RetrieveParams(RequestOptions): "This method is deprecated, please refer to the description for details.", ) def list( - cls, **params: Unpack["ExchangeRate.ListParams"] + cls, **params: Unpack["ExchangeRateListParams"] ) -> ListObject["ExchangeRate"]: """ [Deprecated] The ExchangeRate APIs are deprecated. Please use the [FX Quotes API](https://docs.stripe.com/payments/currencies/localize-prices/fx-quotes-api) instead. @@ -109,7 +89,7 @@ def list( "This method is deprecated, please refer to the description for details.", ) async def list_async( - cls, **params: Unpack["ExchangeRate.ListParams"] + cls, **params: Unpack["ExchangeRateListParams"] ) -> ListObject["ExchangeRate"]: """ [Deprecated] The ExchangeRate APIs are deprecated. Please use the [FX Quotes API](https://docs.stripe.com/payments/currencies/localize-prices/fx-quotes-api) instead. @@ -134,7 +114,7 @@ async def list_async( "This method is deprecated, please refer to the description for details.", ) def retrieve( - cls, id: str, **params: Unpack["ExchangeRate.RetrieveParams"] + cls, id: str, **params: Unpack["ExchangeRateRetrieveParams"] ) -> "ExchangeRate": """ [Deprecated] The ExchangeRate APIs are deprecated. Please use the [FX Quotes API](https://docs.stripe.com/payments/currencies/localize-prices/fx-quotes-api) instead. @@ -150,7 +130,7 @@ def retrieve( "This method is deprecated, please refer to the description for details.", ) async def retrieve_async( - cls, id: str, **params: Unpack["ExchangeRate.RetrieveParams"] + cls, id: str, **params: Unpack["ExchangeRateRetrieveParams"] ) -> "ExchangeRate": """ [Deprecated] The ExchangeRate APIs are deprecated. Please use the [FX Quotes API](https://docs.stripe.com/payments/currencies/localize-prices/fx-quotes-api) instead. diff --git a/stripe/_exchange_rate_service.py b/stripe/_exchange_rate_service.py index 027971300..70c8f3870 100644 --- a/stripe/_exchange_rate_service.py +++ b/stripe/_exchange_rate_service.py @@ -5,38 +5,20 @@ from stripe._request_options import RequestOptions from stripe._stripe_service import StripeService from stripe._util import sanitize_id -from typing import List, Optional, cast -from typing_extensions import NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params._exchange_rate_list_params import ExchangeRateListParams + from stripe.params._exchange_rate_retrieve_params import ( + ExchangeRateRetrieveParams, + ) -class ExchangeRateService(StripeService): - class ListParams(TypedDict): - ending_before: NotRequired[str] - """ - A cursor for use in pagination. `ending_before` is the currency that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with the exchange rate for currency X 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 total number of supported payout currencies, and the default is the max. - """ - starting_after: NotRequired[str] - """ - A cursor for use in pagination. `starting_after` is the currency that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with the exchange rate for currency X, your subsequent call can include `starting_after=X` in order to fetch the next page of the list. - """ - - class RetrieveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ +class ExchangeRateService(StripeService): def list( self, - params: Optional["ExchangeRateService.ListParams"] = None, + params: Optional["ExchangeRateListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[ExchangeRate]: """ @@ -57,7 +39,7 @@ def list( async def list_async( self, - params: Optional["ExchangeRateService.ListParams"] = None, + params: Optional["ExchangeRateListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[ExchangeRate]: """ @@ -79,7 +61,7 @@ async def list_async( def retrieve( self, rate_id: str, - params: Optional["ExchangeRateService.RetrieveParams"] = None, + params: Optional["ExchangeRateRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> ExchangeRate: """ @@ -103,7 +85,7 @@ def retrieve( async def retrieve_async( self, rate_id: str, - params: Optional["ExchangeRateService.RetrieveParams"] = None, + params: Optional["ExchangeRateRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> ExchangeRate: """ diff --git a/stripe/_external_account_service.py b/stripe/_external_account_service.py index a9c2e5ae6..40081e518 100644 --- a/stripe/_external_account_service.py +++ b/stripe/_external_account_service.py @@ -6,204 +6,32 @@ from stripe._request_options import RequestOptions from stripe._stripe_service import StripeService from stripe._util import sanitize_id -from typing import Dict, List, Optional, Union, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, Union, cast +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params._external_account_create_params import ( + ExternalAccountCreateParams, + ) + from stripe.params._external_account_delete_params import ( + ExternalAccountDeleteParams, + ) + from stripe.params._external_account_list_params import ( + ExternalAccountListParams, + ) + from stripe.params._external_account_retrieve_params import ( + ExternalAccountRetrieveParams, + ) + from stripe.params._external_account_update_params import ( + ExternalAccountUpdateParams, + ) class ExternalAccountService(StripeService): - class CreateParams(TypedDict): - default_for_currency: NotRequired[bool] - """ - When set to true, or if this is the first external account added in this currency, this account becomes the default external account for its currency. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - external_account: Union[ - str, - "ExternalAccountService.CreateParamsCard", - "ExternalAccountService.CreateParamsBankAccount", - "ExternalAccountService.CreateParamsCardToken", - ] - """ - Either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary containing a user's external account details (with the options shown below). - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - - class CreateParamsBankAccount(TypedDict): - object: Literal["bank_account"] - account_holder_name: NotRequired[str] - """ - The name of the person or business that owns the bank account.This field is required when attaching the bank account to a `Customer` object. - """ - account_holder_type: NotRequired[Literal["company", "individual"]] - """ - The type of entity that holds the account. It can be `company` or `individual`. This field is required when attaching the bank account to a `Customer` object. - """ - account_number: str - """ - The account number for the bank account, in string form. Must be a checking account. - """ - country: str - """ - The country in which the bank account is located. - """ - currency: NotRequired[str] - """ - The currency the bank account is in. This must be a country/currency pairing that [Stripe supports.](docs/payouts) - """ - routing_number: NotRequired[str] - """ - The routing number, sort code, or other country-appropriate institution number for the bank account. For US bank accounts, this is required and should be the ACH routing number, not the wire routing number. If you are providing an IBAN for `account_number`, this field is not required. - """ - - class CreateParamsCard(TypedDict): - object: Literal["card"] - address_city: NotRequired[str] - address_country: NotRequired[str] - address_line1: NotRequired[str] - address_line2: NotRequired[str] - address_state: NotRequired[str] - address_zip: NotRequired[str] - currency: NotRequired[str] - cvc: NotRequired[str] - exp_month: int - exp_year: int - name: NotRequired[str] - number: str - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. - """ - - class CreateParamsCardToken(TypedDict): - object: Literal["card"] - currency: NotRequired[str] - token: str - - class DeleteParams(TypedDict): - pass - - class ListParams(TypedDict): - 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. - """ - object: NotRequired[Literal["bank_account", "card"]] - """ - Filter external accounts according to a particular object type. - """ - 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 RetrieveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class UpdateParams(TypedDict): - account_holder_name: NotRequired[str] - """ - The name of the person or business that owns the bank account. - """ - account_holder_type: NotRequired[ - "Literal['']|Literal['company', 'individual']" - ] - """ - The type of entity that holds the account. This can be either `individual` or `company`. - """ - account_type: NotRequired[ - Literal["checking", "futsu", "savings", "toza"] - ] - """ - The bank account type. This can only be `checking` or `savings` in most countries. In Japan, this can only be `futsu` or `toza`. - """ - address_city: NotRequired[str] - """ - City/District/Suburb/Town/Village. - """ - address_country: NotRequired[str] - """ - Billing address country, if provided when creating card. - """ - address_line1: NotRequired[str] - """ - Address line 1 (Street address/PO Box/Company name). - """ - address_line2: NotRequired[str] - """ - Address line 2 (Apartment/Suite/Unit/Building). - """ - address_state: NotRequired[str] - """ - State/County/Province/Region. - """ - address_zip: NotRequired[str] - """ - ZIP or postal code. - """ - default_for_currency: NotRequired[bool] - """ - When set to true, this becomes the default external account for its currency. - """ - documents: NotRequired["ExternalAccountService.UpdateParamsDocuments"] - """ - Documents that may be submitted to satisfy various informational requests. - """ - exp_month: NotRequired[str] - """ - Two digit number representing the card's expiration month. - """ - exp_year: NotRequired[str] - """ - Four digit number representing the card's expiration year. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - name: NotRequired[str] - """ - Cardholder name. - """ - - class UpdateParamsDocuments(TypedDict): - bank_account_ownership_verification: NotRequired[ - "ExternalAccountService.UpdateParamsDocumentsBankAccountOwnershipVerification" - ] - """ - One or more documents that support the [Bank account ownership verification](https://support.stripe.com/questions/bank-account-ownership-verification) requirement. Must be a document associated with the bank account that displays the last 4 digits of the account number, either a statement or a check. - """ - - class UpdateParamsDocumentsBankAccountOwnershipVerification(TypedDict): - files: NotRequired[List[str]] - """ - One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. - """ - def delete( self, id: str, - params: Optional["ExternalAccountService.DeleteParams"] = None, + params: Optional["ExternalAccountDeleteParams"] = None, options: Optional[RequestOptions] = None, ) -> Union[BankAccount, Card]: """ @@ -223,7 +51,7 @@ def delete( async def delete_async( self, id: str, - params: Optional["ExternalAccountService.DeleteParams"] = None, + params: Optional["ExternalAccountDeleteParams"] = None, options: Optional[RequestOptions] = None, ) -> Union[BankAccount, Card]: """ @@ -243,7 +71,7 @@ async def delete_async( def retrieve( self, id: str, - params: Optional["ExternalAccountService.RetrieveParams"] = None, + params: Optional["ExternalAccountRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Union[BankAccount, Card]: """ @@ -263,7 +91,7 @@ def retrieve( async def retrieve_async( self, id: str, - params: Optional["ExternalAccountService.RetrieveParams"] = None, + params: Optional["ExternalAccountRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Union[BankAccount, Card]: """ @@ -283,7 +111,7 @@ async def retrieve_async( def update( self, id: str, - params: Optional["ExternalAccountService.UpdateParams"] = None, + params: Optional["ExternalAccountUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> Union[BankAccount, Card]: """ @@ -310,7 +138,7 @@ def update( async def update_async( self, id: str, - params: Optional["ExternalAccountService.UpdateParams"] = None, + params: Optional["ExternalAccountUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> Union[BankAccount, Card]: """ @@ -336,7 +164,7 @@ async def update_async( def list( self, - params: Optional["ExternalAccountService.ListParams"] = None, + params: Optional["ExternalAccountListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[Union[BankAccount, Card]]: """ @@ -355,7 +183,7 @@ def list( async def list_async( self, - params: Optional["ExternalAccountService.ListParams"] = None, + params: Optional["ExternalAccountListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[Union[BankAccount, Card]]: """ @@ -374,7 +202,7 @@ async def list_async( def create( self, - params: "ExternalAccountService.CreateParams", + params: "ExternalAccountCreateParams", options: Optional[RequestOptions] = None, ) -> Union[BankAccount, Card]: """ @@ -393,7 +221,7 @@ def create( async def create_async( self, - params: "ExternalAccountService.CreateParams", + params: "ExternalAccountCreateParams", options: Optional[RequestOptions] = None, ) -> Union[BankAccount, Card]: """ diff --git a/stripe/_file.py b/stripe/_file.py index 87bf9cdc4..c20c2b016 100644 --- a/stripe/_file.py +++ b/stripe/_file.py @@ -3,18 +3,14 @@ from stripe._createable_api_resource import CreateableAPIResource from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource -from stripe._request_options import RequestOptions -from typing import Any, ClassVar, Dict, List, Optional, cast -from typing_extensions import ( - Literal, - NotRequired, - TypedDict, - Unpack, - TYPE_CHECKING, -) +from typing import ClassVar, Optional, cast +from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: from stripe._file_link import FileLink + from stripe.params._file_create_params import FileCreateParams + from stripe.params._file_list_params import FileListParams + from stripe.params._file_retrieve_params import FileRetrieveParams class File(CreateableAPIResource["File"], ListableAPIResource["File"]): @@ -29,123 +25,6 @@ class File(CreateableAPIResource["File"], ListableAPIResource["File"]): """ OBJECT_NAME: ClassVar[Literal["file"]] = "file" - - class CreateParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - file: Any - """ - A file to upload. Make sure that the specifications follow RFC 2388, which defines file transfers for the `multipart/form-data` protocol. - """ - file_link_data: NotRequired["File.CreateParamsFileLinkData"] - """ - Optional parameters that automatically create a [file link](https://stripe.com/docs/api#file_links) for the newly created file. - """ - purpose: Literal[ - "account_requirement", - "additional_verification", - "business_icon", - "business_logo", - "customer_signature", - "dispute_evidence", - "identity_document", - "issuing_regulatory_reporting", - "pci_document", - "tax_document_user_upload", - "terminal_android_apk", - "terminal_reader_splashscreen", - ] - """ - The [purpose](https://stripe.com/docs/file-upload#uploading-a-file) of the uploaded file. - """ - - class CreateParamsFileLinkData(TypedDict): - create: bool - """ - Set this to `true` to create a file link for the newly created file. Creating a link is only possible when the file's `purpose` is one of the following: `business_icon`, `business_logo`, `customer_signature`, `dispute_evidence`, `issuing_regulatory_reporting`, `pci_document`, `tax_document_user_upload`, `terminal_android_apk`, or `terminal_reader_splashscreen`. - """ - expires_at: NotRequired[int] - """ - The link isn't available after this future timestamp. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - - class ListParams(RequestOptions): - created: NotRequired["File.ListParamsCreated|int"] - """ - Only return files that were created during the given date interval. - """ - 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. - """ - purpose: NotRequired[ - Literal[ - "account_requirement", - "additional_verification", - "business_icon", - "business_logo", - "customer_signature", - "dispute_evidence", - "document_provider_identity_document", - "finance_report_run", - "financial_account_statement", - "identity_document", - "identity_document_downloadable", - "issuing_regulatory_reporting", - "pci_document", - "selfie", - "sigma_scheduled_query", - "tax_document_user_upload", - "terminal_android_apk", - "terminal_reader_splashscreen", - ] - ] - """ - Filter queries by the file purpose. If you don't provide a purpose, the queries return unfiltered files. - """ - 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 ListParamsCreated(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) - """ - - class RetrieveParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - created: int """ Time at which the object was created. Measured in seconds since the Unix epoch. @@ -211,7 +90,7 @@ class RetrieveParams(RequestOptions): """ @classmethod - def create(cls, **params: Unpack["File.CreateParams"]) -> "File": + def create(cls, **params: Unpack["FileCreateParams"]) -> "File": """ To upload a file to Stripe, you need to send a request of type multipart/form-data. Include the file you want to upload in the request, and the parameters for creating a file. @@ -231,7 +110,7 @@ def create(cls, **params: Unpack["File.CreateParams"]) -> "File": @classmethod async def create_async( - cls, **params: Unpack["File.CreateParams"] + cls, **params: Unpack["FileCreateParams"] ) -> "File": """ To upload a file to Stripe, you need to send a request of type multipart/form-data. Include the file you want to upload in the request, and the parameters for creating a file. @@ -251,7 +130,7 @@ async def create_async( ) @classmethod - def list(cls, **params: Unpack["File.ListParams"]) -> ListObject["File"]: + def list(cls, **params: Unpack["FileListParams"]) -> ListObject["File"]: """ Returns a list of the files that your account has access to. Stripe sorts and returns the files by their creation dates, placing the most recently created files at the top. """ @@ -270,7 +149,7 @@ def list(cls, **params: Unpack["File.ListParams"]) -> ListObject["File"]: @classmethod async def list_async( - cls, **params: Unpack["File.ListParams"] + cls, **params: Unpack["FileListParams"] ) -> ListObject["File"]: """ Returns a list of the files that your account has access to. Stripe sorts and returns the files by their creation dates, placing the most recently created files at the top. @@ -290,7 +169,7 @@ async def list_async( @classmethod def retrieve( - cls, id: str, **params: Unpack["File.RetrieveParams"] + cls, id: str, **params: Unpack["FileRetrieveParams"] ) -> "File": """ Retrieves the details of an existing file object. After you supply a unique file ID, Stripe returns the corresponding file object. Learn how to [access file contents](https://docs.stripe.com/docs/file-upload#download-file-contents). @@ -301,7 +180,7 @@ def retrieve( @classmethod async def retrieve_async( - cls, id: str, **params: Unpack["File.RetrieveParams"] + cls, id: str, **params: Unpack["FileRetrieveParams"] ) -> "File": """ Retrieves the details of an existing file object. After you supply a unique file ID, Stripe returns the corresponding file object. Learn how to [access file contents](https://docs.stripe.com/docs/file-upload#download-file-contents). diff --git a/stripe/_file_link.py b/stripe/_file_link.py index b1e5a103d..d72e14894 100644 --- a/stripe/_file_link.py +++ b/stripe/_file_link.py @@ -4,20 +4,17 @@ from stripe._expandable_field import ExpandableField from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource -from stripe._request_options import RequestOptions from stripe._updateable_api_resource import UpdateableAPIResource from stripe._util import sanitize_id -from typing import ClassVar, Dict, List, Optional, cast -from typing_extensions import ( - Literal, - NotRequired, - TypedDict, - Unpack, - TYPE_CHECKING, -) +from typing import ClassVar, Dict, Optional, cast +from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: from stripe._file import File + from stripe.params._file_link_create_params import FileLinkCreateParams + from stripe.params._file_link_list_params import FileLinkListParams + from stripe.params._file_link_modify_params import FileLinkModifyParams + from stripe.params._file_link_retrieve_params import FileLinkRetrieveParams class FileLink( @@ -32,93 +29,6 @@ class FileLink( """ OBJECT_NAME: ClassVar[Literal["file_link"]] = "file_link" - - class CreateParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - expires_at: NotRequired[int] - """ - The link isn't usable after this future timestamp. - """ - file: str - """ - The ID of the file. The file's `purpose` must be one of the following: `business_icon`, `business_logo`, `customer_signature`, `dispute_evidence`, `finance_report_run`, `financial_account_statement`, `identity_document_downloadable`, `issuing_regulatory_reporting`, `pci_document`, `selfie`, `sigma_scheduled_query`, `tax_document_user_upload`, `terminal_android_apk`, or `terminal_reader_splashscreen`. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - - class ListParams(RequestOptions): - created: NotRequired["FileLink.ListParamsCreated|int"] - """ - Only return links that were created during the given date interval. - """ - 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. - """ - expired: NotRequired[bool] - """ - Filter links by their expiration status. By default, Stripe returns all links. - """ - file: NotRequired[str] - """ - Only return links for the given file. - """ - 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 ListParamsCreated(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) - """ - - class ModifyParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - expires_at: NotRequired["Literal['']|Literal['now']|int"] - """ - A future timestamp after which the link will no longer be usable, or `now` to expire the link immediately. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - - class RetrieveParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - created: int """ Time at which the object was created. Measured in seconds since the Unix epoch. @@ -157,7 +67,7 @@ class RetrieveParams(RequestOptions): """ @classmethod - def create(cls, **params: Unpack["FileLink.CreateParams"]) -> "FileLink": + def create(cls, **params: Unpack["FileLinkCreateParams"]) -> "FileLink": """ Creates a new file link object. """ @@ -172,7 +82,7 @@ def create(cls, **params: Unpack["FileLink.CreateParams"]) -> "FileLink": @classmethod async def create_async( - cls, **params: Unpack["FileLink.CreateParams"] + cls, **params: Unpack["FileLinkCreateParams"] ) -> "FileLink": """ Creates a new file link object. @@ -188,7 +98,7 @@ async def create_async( @classmethod def list( - cls, **params: Unpack["FileLink.ListParams"] + cls, **params: Unpack["FileLinkListParams"] ) -> ListObject["FileLink"]: """ Returns a list of file links. @@ -208,7 +118,7 @@ def list( @classmethod async def list_async( - cls, **params: Unpack["FileLink.ListParams"] + cls, **params: Unpack["FileLinkListParams"] ) -> ListObject["FileLink"]: """ Returns a list of file links. @@ -228,7 +138,7 @@ async def list_async( @classmethod def modify( - cls, id: str, **params: Unpack["FileLink.ModifyParams"] + cls, id: str, **params: Unpack["FileLinkModifyParams"] ) -> "FileLink": """ Updates an existing file link object. Expired links can no longer be updated. @@ -245,7 +155,7 @@ def modify( @classmethod async def modify_async( - cls, id: str, **params: Unpack["FileLink.ModifyParams"] + cls, id: str, **params: Unpack["FileLinkModifyParams"] ) -> "FileLink": """ Updates an existing file link object. Expired links can no longer be updated. @@ -262,7 +172,7 @@ async def modify_async( @classmethod def retrieve( - cls, id: str, **params: Unpack["FileLink.RetrieveParams"] + cls, id: str, **params: Unpack["FileLinkRetrieveParams"] ) -> "FileLink": """ Retrieves the file link with the given ID. @@ -273,7 +183,7 @@ def retrieve( @classmethod async def retrieve_async( - cls, id: str, **params: Unpack["FileLink.RetrieveParams"] + cls, id: str, **params: Unpack["FileLinkRetrieveParams"] ) -> "FileLink": """ Retrieves the file link with the given ID. diff --git a/stripe/_file_link_service.py b/stripe/_file_link_service.py index 5aa6dbf05..96398a3b7 100644 --- a/stripe/_file_link_service.py +++ b/stripe/_file_link_service.py @@ -5,100 +5,20 @@ from stripe._request_options import RequestOptions from stripe._stripe_service import StripeService from stripe._util import sanitize_id -from typing import Dict, List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params._file_link_create_params import FileLinkCreateParams + from stripe.params._file_link_list_params import FileLinkListParams + from stripe.params._file_link_retrieve_params import FileLinkRetrieveParams + from stripe.params._file_link_update_params import FileLinkUpdateParams -class FileLinkService(StripeService): - class CreateParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - expires_at: NotRequired[int] - """ - The link isn't usable after this future timestamp. - """ - file: str - """ - The ID of the file. The file's `purpose` must be one of the following: `business_icon`, `business_logo`, `customer_signature`, `dispute_evidence`, `finance_report_run`, `financial_account_statement`, `identity_document_downloadable`, `issuing_regulatory_reporting`, `pci_document`, `selfie`, `sigma_scheduled_query`, `tax_document_user_upload`, `terminal_android_apk`, or `terminal_reader_splashscreen`. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - - class ListParams(TypedDict): - created: NotRequired["FileLinkService.ListParamsCreated|int"] - """ - Only return links that were created during the given date interval. - """ - 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. - """ - expired: NotRequired[bool] - """ - Filter links by their expiration status. By default, Stripe returns all links. - """ - file: NotRequired[str] - """ - Only return links for the given file. - """ - 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 ListParamsCreated(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) - """ - - class RetrieveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class UpdateParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - expires_at: NotRequired["Literal['']|Literal['now']|int"] - """ - A future timestamp after which the link will no longer be usable, or `now` to expire the link immediately. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ +class FileLinkService(StripeService): def list( self, - params: Optional["FileLinkService.ListParams"] = None, + params: Optional["FileLinkListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[FileLink]: """ @@ -117,7 +37,7 @@ def list( async def list_async( self, - params: Optional["FileLinkService.ListParams"] = None, + params: Optional["FileLinkListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[FileLink]: """ @@ -136,7 +56,7 @@ async def list_async( def create( self, - params: "FileLinkService.CreateParams", + params: "FileLinkCreateParams", options: Optional[RequestOptions] = None, ) -> FileLink: """ @@ -155,7 +75,7 @@ def create( async def create_async( self, - params: "FileLinkService.CreateParams", + params: "FileLinkCreateParams", options: Optional[RequestOptions] = None, ) -> FileLink: """ @@ -175,7 +95,7 @@ async def create_async( def retrieve( self, link: str, - params: Optional["FileLinkService.RetrieveParams"] = None, + params: Optional["FileLinkRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> FileLink: """ @@ -195,7 +115,7 @@ def retrieve( async def retrieve_async( self, link: str, - params: Optional["FileLinkService.RetrieveParams"] = None, + params: Optional["FileLinkRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> FileLink: """ @@ -215,7 +135,7 @@ async def retrieve_async( def update( self, link: str, - params: Optional["FileLinkService.UpdateParams"] = None, + params: Optional["FileLinkUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> FileLink: """ @@ -235,7 +155,7 @@ def update( async def update_async( self, link: str, - params: Optional["FileLinkService.UpdateParams"] = None, + params: Optional["FileLinkUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> FileLink: """ diff --git a/stripe/_file_service.py b/stripe/_file_service.py index 12ca02ef4..48416e5fc 100644 --- a/stripe/_file_service.py +++ b/stripe/_file_service.py @@ -5,130 +5,19 @@ from stripe._request_options import RequestOptions from stripe._stripe_service import StripeService from stripe._util import sanitize_id -from typing import Any, Dict, List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params._file_create_params import FileCreateParams + from stripe.params._file_list_params import FileListParams + from stripe.params._file_retrieve_params import FileRetrieveParams -class FileService(StripeService): - class CreateParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - file: Any - """ - A file to upload. Make sure that the specifications follow RFC 2388, which defines file transfers for the `multipart/form-data` protocol. - """ - file_link_data: NotRequired["FileService.CreateParamsFileLinkData"] - """ - Optional parameters that automatically create a [file link](https://stripe.com/docs/api#file_links) for the newly created file. - """ - purpose: Literal[ - "account_requirement", - "additional_verification", - "business_icon", - "business_logo", - "customer_signature", - "dispute_evidence", - "identity_document", - "issuing_regulatory_reporting", - "pci_document", - "tax_document_user_upload", - "terminal_android_apk", - "terminal_reader_splashscreen", - ] - """ - The [purpose](https://stripe.com/docs/file-upload#uploading-a-file) of the uploaded file. - """ - - class CreateParamsFileLinkData(TypedDict): - create: bool - """ - Set this to `true` to create a file link for the newly created file. Creating a link is only possible when the file's `purpose` is one of the following: `business_icon`, `business_logo`, `customer_signature`, `dispute_evidence`, `issuing_regulatory_reporting`, `pci_document`, `tax_document_user_upload`, `terminal_android_apk`, or `terminal_reader_splashscreen`. - """ - expires_at: NotRequired[int] - """ - The link isn't available after this future timestamp. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - - class ListParams(TypedDict): - created: NotRequired["FileService.ListParamsCreated|int"] - """ - Only return files that were created during the given date interval. - """ - 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. - """ - purpose: NotRequired[ - Literal[ - "account_requirement", - "additional_verification", - "business_icon", - "business_logo", - "customer_signature", - "dispute_evidence", - "document_provider_identity_document", - "finance_report_run", - "financial_account_statement", - "identity_document", - "identity_document_downloadable", - "issuing_regulatory_reporting", - "pci_document", - "selfie", - "sigma_scheduled_query", - "tax_document_user_upload", - "terminal_android_apk", - "terminal_reader_splashscreen", - ] - ] - """ - Filter queries by the file purpose. If you don't provide a purpose, the queries return unfiltered files. - """ - 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 ListParamsCreated(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) - """ - - class RetrieveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ +class FileService(StripeService): def list( self, - params: Optional["FileService.ListParams"] = None, + params: Optional["FileListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[File]: """ @@ -147,7 +36,7 @@ def list( async def list_async( self, - params: Optional["FileService.ListParams"] = None, + params: Optional["FileListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[File]: """ @@ -166,7 +55,7 @@ async def list_async( def create( self, - params: "FileService.CreateParams", + params: "FileCreateParams", options: Optional[RequestOptions] = None, ) -> File: """ @@ -190,7 +79,7 @@ def create( async def create_async( self, - params: "FileService.CreateParams", + params: "FileCreateParams", options: Optional[RequestOptions] = None, ) -> File: """ @@ -215,7 +104,7 @@ async def create_async( def retrieve( self, file: str, - params: Optional["FileService.RetrieveParams"] = None, + params: Optional["FileRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> File: """ @@ -235,7 +124,7 @@ def retrieve( async def retrieve_async( self, file: str, - params: Optional["FileService.RetrieveParams"] = None, + params: Optional["FileRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> File: """ diff --git a/stripe/_fx_quote.py b/stripe/_fx_quote.py index b85ebc20b..b3e270478 100644 --- a/stripe/_fx_quote.py +++ b/stripe/_fx_quote.py @@ -3,10 +3,14 @@ from stripe._createable_api_resource import CreateableAPIResource from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource -from stripe._request_options import RequestOptions from stripe._stripe_object import StripeObject -from typing import ClassVar, Dict, List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict, Unpack +from typing import ClassVar, Dict, Optional, cast +from typing_extensions import Literal, Unpack, TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params._fx_quote_create_params import FxQuoteCreateParams + from stripe.params._fx_quote_list_params import FxQuoteListParams + from stripe.params._fx_quote_retrieve_params import FxQuoteRetrieveParams class FxQuote( @@ -92,90 +96,6 @@ class Transfer(StripeObject): """ _inner_class_types = {"payment": Payment, "transfer": Transfer} - class CreateParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - from_currencies: List[str] - """ - A list of three letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be [supported currencies](https://stripe.com/docs/currencies). - """ - lock_duration: Literal["day", "five_minutes", "hour", "none"] - """ - The duration that you wish the quote to be locked for. The quote will be usable for the duration specified. The default is `none`. The maximum is 1 day. - """ - to_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). - """ - usage: NotRequired["FxQuote.CreateParamsUsage"] - """ - The usage specific information for the quote. - """ - - class CreateParamsUsage(TypedDict): - payment: NotRequired["FxQuote.CreateParamsUsagePayment"] - """ - The payment transaction details that are intended for the FX Quote. - """ - transfer: NotRequired["FxQuote.CreateParamsUsageTransfer"] - """ - The transfer transaction details that are intended for the FX Quote. - """ - type: Literal["payment", "transfer"] - """ - Which transaction the FX Quote will be used for - - Can be “payment” | “transfer” - """ - - class CreateParamsUsagePayment(TypedDict): - destination: NotRequired[str] - """ - The Stripe account ID that the funds will be transferred to. - - This field should match the account ID that would be used in the PaymentIntent's transfer_data[destination] field. - """ - on_behalf_of: NotRequired[str] - """ - The Stripe account ID that these funds are intended for. - - This field should match the account ID that would be used in the PaymentIntent's on_behalf_of field. - """ - - class CreateParamsUsageTransfer(TypedDict): - destination: str - """ - The Stripe account ID that the funds will be transferred to. - - This field should match the account ID that would be used in the Transfer's destination field. - """ - - class ListParams(RequestOptions): - 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 RetrieveParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - created: int """ Time at which the quote was created, measured in seconds since the Unix epoch. @@ -215,7 +135,7 @@ class RetrieveParams(RequestOptions): usage: Usage @classmethod - def create(cls, **params: Unpack["FxQuote.CreateParams"]) -> "FxQuote": + def create(cls, **params: Unpack["FxQuoteCreateParams"]) -> "FxQuote": """ Creates an FX Quote object """ @@ -230,7 +150,7 @@ def create(cls, **params: Unpack["FxQuote.CreateParams"]) -> "FxQuote": @classmethod async def create_async( - cls, **params: Unpack["FxQuote.CreateParams"] + cls, **params: Unpack["FxQuoteCreateParams"] ) -> "FxQuote": """ Creates an FX Quote object @@ -246,7 +166,7 @@ async def create_async( @classmethod def list( - cls, **params: Unpack["FxQuote.ListParams"] + cls, **params: Unpack["FxQuoteListParams"] ) -> ListObject["FxQuote"]: """ Returns a list of FX quotes that have been issued. The FX quotes are returned in sorted order, with the most recent FX quotes appearing first. @@ -266,7 +186,7 @@ def list( @classmethod async def list_async( - cls, **params: Unpack["FxQuote.ListParams"] + cls, **params: Unpack["FxQuoteListParams"] ) -> ListObject["FxQuote"]: """ Returns a list of FX quotes that have been issued. The FX quotes are returned in sorted order, with the most recent FX quotes appearing first. @@ -286,7 +206,7 @@ async def list_async( @classmethod def retrieve( - cls, id: str, **params: Unpack["FxQuote.RetrieveParams"] + cls, id: str, **params: Unpack["FxQuoteRetrieveParams"] ) -> "FxQuote": """ Retrieve an FX Quote object @@ -297,7 +217,7 @@ def retrieve( @classmethod async def retrieve_async( - cls, id: str, **params: Unpack["FxQuote.RetrieveParams"] + cls, id: str, **params: Unpack["FxQuoteRetrieveParams"] ) -> "FxQuote": """ Retrieve an FX Quote object diff --git a/stripe/_fx_quote_service.py b/stripe/_fx_quote_service.py index 34283482f..44fee1e12 100644 --- a/stripe/_fx_quote_service.py +++ b/stripe/_fx_quote_service.py @@ -5,98 +5,19 @@ from stripe._request_options import RequestOptions from stripe._stripe_service import StripeService from stripe._util import sanitize_id -from typing import List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params._fx_quote_create_params import FxQuoteCreateParams + from stripe.params._fx_quote_list_params import FxQuoteListParams + from stripe.params._fx_quote_retrieve_params import FxQuoteRetrieveParams -class FxQuoteService(StripeService): - class CreateParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - from_currencies: List[str] - """ - A list of three letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be [supported currencies](https://stripe.com/docs/currencies). - """ - lock_duration: Literal["day", "five_minutes", "hour", "none"] - """ - The duration that you wish the quote to be locked for. The quote will be usable for the duration specified. The default is `none`. The maximum is 1 day. - """ - to_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). - """ - usage: NotRequired["FxQuoteService.CreateParamsUsage"] - """ - The usage specific information for the quote. - """ - - class CreateParamsUsage(TypedDict): - payment: NotRequired["FxQuoteService.CreateParamsUsagePayment"] - """ - The payment transaction details that are intended for the FX Quote. - """ - transfer: NotRequired["FxQuoteService.CreateParamsUsageTransfer"] - """ - The transfer transaction details that are intended for the FX Quote. - """ - type: Literal["payment", "transfer"] - """ - Which transaction the FX Quote will be used for - - Can be “payment” | “transfer” - """ - - class CreateParamsUsagePayment(TypedDict): - destination: NotRequired[str] - """ - The Stripe account ID that the funds will be transferred to. - - This field should match the account ID that would be used in the PaymentIntent's transfer_data[destination] field. - """ - on_behalf_of: NotRequired[str] - """ - The Stripe account ID that these funds are intended for. - - This field should match the account ID that would be used in the PaymentIntent's on_behalf_of field. - """ - - class CreateParamsUsageTransfer(TypedDict): - destination: str - """ - The Stripe account ID that the funds will be transferred to. - - This field should match the account ID that would be used in the Transfer's destination field. - """ - - class ListParams(TypedDict): - 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 RetrieveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ +class FxQuoteService(StripeService): def list( self, - params: Optional["FxQuoteService.ListParams"] = None, + params: Optional["FxQuoteListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[FxQuote]: """ @@ -115,7 +36,7 @@ def list( async def list_async( self, - params: Optional["FxQuoteService.ListParams"] = None, + params: Optional["FxQuoteListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[FxQuote]: """ @@ -134,7 +55,7 @@ async def list_async( def create( self, - params: "FxQuoteService.CreateParams", + params: "FxQuoteCreateParams", options: Optional[RequestOptions] = None, ) -> FxQuote: """ @@ -153,7 +74,7 @@ def create( async def create_async( self, - params: "FxQuoteService.CreateParams", + params: "FxQuoteCreateParams", options: Optional[RequestOptions] = None, ) -> FxQuote: """ @@ -173,7 +94,7 @@ async def create_async( def retrieve( self, id: str, - params: Optional["FxQuoteService.RetrieveParams"] = None, + params: Optional["FxQuoteRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> FxQuote: """ @@ -193,7 +114,7 @@ def retrieve( async def retrieve_async( self, id: str, - params: Optional["FxQuoteService.RetrieveParams"] = None, + params: Optional["FxQuoteRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> FxQuote: """ diff --git a/stripe/_http_client.py b/stripe/_http_client.py index 06c88c643..62fae3eb9 100644 --- a/stripe/_http_client.py +++ b/stripe/_http_client.py @@ -123,6 +123,10 @@ def new_http_client_async_fallback(*args: Any, **kwargs: Any) -> "HTTPClient": class HTTPClient(object): + """ + Base HTTP client that custom clients can inherit from. + """ + name: ClassVar[str] class _Proxy(TypedDict): @@ -860,7 +864,7 @@ def _request_internal( if is_streaming: # This doesn't really stream. - content = _util.io.BytesIO(str.encode(result.content)) + content = BytesIO(str.encode(result.content)) else: content = result.content @@ -991,8 +995,8 @@ def _request_internal( post_data, is_streaming, ) -> Tuple[Union[str, BytesIO], int, Mapping[str, str]]: - b = _util.io.BytesIO() - rheaders = _util.io.BytesIO() + b = BytesIO() + rheaders = BytesIO() # Pycurl's design is a little weird: although we set per-request # options on this object, it's also capable of maintaining established diff --git a/stripe/_invoice.py b/stripe/_invoice.py index 1b2298c4e..178dad5ca 100644 --- a/stripe/_invoice.py +++ b/stripe/_invoice.py @@ -6,7 +6,6 @@ from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource from stripe._nested_resource_class_methods import nested_resource_class_methods -from stripe._request_options import RequestOptions from stripe._search_result_object import SearchResultObject from stripe._searchable_api_resource import SearchableAPIResource from stripe._stripe_object import StripeObject @@ -23,13 +22,7 @@ cast, overload, ) -from typing_extensions import ( - Literal, - NotRequired, - TypedDict, - Unpack, - TYPE_CHECKING, -) +from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: from stripe._account import Account @@ -52,6 +45,39 @@ from stripe.billing._credit_balance_transaction import ( CreditBalanceTransaction, ) + from stripe.params._invoice_add_lines_params import InvoiceAddLinesParams + from stripe.params._invoice_attach_payment_params import ( + InvoiceAttachPaymentParams, + ) + from stripe.params._invoice_create_params import InvoiceCreateParams + from stripe.params._invoice_create_preview_params import ( + InvoiceCreatePreviewParams, + ) + from stripe.params._invoice_delete_params import InvoiceDeleteParams + from stripe.params._invoice_finalize_invoice_params import ( + InvoiceFinalizeInvoiceParams, + ) + from stripe.params._invoice_list_lines_params import InvoiceListLinesParams + from stripe.params._invoice_list_params import InvoiceListParams + from stripe.params._invoice_mark_uncollectible_params import ( + InvoiceMarkUncollectibleParams, + ) + from stripe.params._invoice_modify_params import InvoiceModifyParams + from stripe.params._invoice_pay_params import InvoicePayParams + from stripe.params._invoice_remove_lines_params import ( + InvoiceRemoveLinesParams, + ) + from stripe.params._invoice_retrieve_params import InvoiceRetrieveParams + from stripe.params._invoice_search_params import InvoiceSearchParams + from stripe.params._invoice_send_invoice_params import ( + InvoiceSendInvoiceParams, + ) + from stripe.params._invoice_update_lines_params import ( + InvoiceUpdateLinesParams, + ) + from stripe.params._invoice_void_invoice_params import ( + InvoiceVoidInvoiceParams, + ) from stripe.test_helpers._test_clock import TestClock @@ -1300,4556 +1326,154 @@ class TaxRateDetails(StripeObject): """ _inner_class_types = {"tax_rate_details": TaxRateDetails} - class AddLinesParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - invoice_metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - lines: List["Invoice.AddLinesParamsLine"] - """ - The line items to add. - """ - - class AddLinesParamsLine(TypedDict): - amount: NotRequired[int] - """ - The integer amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. If you want to apply a credit to the customer's account, pass a negative amount. - """ - description: NotRequired[str] - """ - An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking. - """ - discountable: NotRequired[bool] - """ - Controls whether discounts apply to this line item. Defaults to false for prorations or negative line items, and true for all other line items. Cannot be set to true for prorations. - """ - discounts: NotRequired[ - "Literal['']|List[Invoice.AddLinesParamsLineDiscount]" - ] - """ - The coupons, promotion codes & existing discounts which apply to the line item. Item discounts are applied before invoice discounts. Pass an empty string to remove previously-defined discounts. - """ - invoice_item: NotRequired[str] - """ - ID of an unassigned invoice item to assign to this invoice. If not provided, a new item will be created. - """ - margins: NotRequired["Literal['']|List[str]"] - """ - The IDs of the margins to apply to the line item. When set, the `default_margins` on the invoice do not apply to this line item. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - period: NotRequired["Invoice.AddLinesParamsLinePeriod"] - """ - The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details. - """ - price_data: NotRequired["Invoice.AddLinesParamsLinePriceData"] - """ - Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. - """ - pricing: NotRequired["Invoice.AddLinesParamsLinePricing"] - """ - The pricing information for the invoice item. - """ - quantity: NotRequired[int] - """ - Non-negative integer. The quantity of units for the line item. - """ - tax_amounts: NotRequired[ - "Literal['']|List[Invoice.AddLinesParamsLineTaxAmount]" - ] - """ - A list of up to 10 tax amounts for this line item. This can be useful if you calculate taxes on your own or use a third-party to calculate them. You cannot set tax amounts if any line item has [tax_rates](https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-tax_rates) or if the invoice has [default_tax_rates](https://stripe.com/docs/api/invoices/object#invoice_object-default_tax_rates) or uses [automatic tax](https://stripe.com/docs/tax/invoicing). Pass an empty string to remove previously defined tax amounts. - """ - tax_rates: NotRequired["Literal['']|List[str]"] - """ - The tax rates which apply to the line item. When set, the `default_tax_rates` on the invoice do not apply to this line item. Pass an empty string to remove previously-defined tax rates. - """ - - class AddLinesParamsLineDiscount(TypedDict): - coupon: NotRequired[str] - """ - ID of the coupon to create a new discount for. - """ - discount: NotRequired[str] - """ - ID of an existing discount on the object (or one of its ancestors) to reuse. - """ - discount_end: NotRequired[ - "Invoice.AddLinesParamsLineDiscountDiscountEnd" - ] - """ - Details to determine how long the discount should be applied for. - """ - promotion_code: NotRequired[str] - """ - ID of the promotion code to create a new discount for. - """ - - class AddLinesParamsLineDiscountDiscountEnd(TypedDict): - duration: NotRequired[ - "Invoice.AddLinesParamsLineDiscountDiscountEndDuration" + account_country: Optional[str] + """ + The country of the business associated with this invoice, most often the business creating the invoice. + """ + account_name: Optional[str] + """ + The public name of the business associated with this invoice, most often the business creating the invoice. + """ + account_tax_ids: Optional[List[ExpandableField["TaxId"]]] + """ + The account tax IDs associated with the invoice. Only editable when the invoice is a draft. + """ + amount_due: int + """ + Final amount due at this time for this invoice. If the invoice's total is smaller than the minimum charge amount, for example, or if there is account credit that can be applied to the invoice, the `amount_due` may be 0. If there is a positive `starting_balance` for the invoice (the customer owes money), the `amount_due` will also take that into account. The charge that gets generated for the invoice will be for the amount specified in `amount_due`. + """ + amount_overpaid: int + """ + Amount that was overpaid on the invoice. The amount overpaid is credited to the customer's credit balance. + """ + amount_paid: int + """ + The amount, in cents (or local equivalent), that was paid. + """ + amount_remaining: int + """ + The difference between amount_due and amount_paid, in cents (or local equivalent). + """ + amount_shipping: int + """ + This is the sum of all the shipping amounts. + """ + amounts_due: Optional[List[AmountsDue]] + """ + List of expected payments and corresponding due dates. This value will be null for invoices where collection_method=charge_automatically. + """ + application: Optional[ExpandableField["Application"]] + """ + ID of the Connect Application that created the invoice. + """ + attempt_count: int + """ + Number of payment attempts made for this invoice, from the perspective of the payment retry schedule. Any payment attempt counts as the first attempt, and subsequently only automatic retries increment the attempt count. In other words, manual payment attempts after the first attempt do not affect the retry schedule. If a failure is returned with a non-retryable return code, the invoice can no longer be retried unless a new payment method is obtained. Retries will continue to be scheduled, and attempt_count will continue to increment, but retries will only be executed if a new payment method is obtained. + """ + attempted: bool + """ + Whether an attempt has been made to pay the invoice. An invoice is not attempted until 1 hour after the `invoice.created` webhook, for example, so you might not want to display that invoice as unpaid to your users. + """ + auto_advance: Optional[bool] + """ + Controls whether Stripe performs [automatic collection](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection) of the invoice. If `false`, the invoice's state doesn't automatically advance without an explicit action. + """ + automatic_tax: AutomaticTax + automatically_finalizes_at: Optional[int] + """ + The time when this invoice is currently scheduled to be automatically finalized. The field will be `null` if the invoice is not scheduled to finalize in the future. If the invoice is not in the draft state, this field will always be `null` - see `finalized_at` for the time when an already-finalized invoice was finalized. + """ + billing_reason: Optional[ + Literal[ + "automatic_pending_invoice_item_invoice", + "manual", + "quote_accept", + "subscription", + "subscription_create", + "subscription_cycle", + "subscription_threshold", + "subscription_update", + "upcoming", ] - """ - Time span for the redeemed discount. - """ - timestamp: NotRequired[int] - """ - A precise Unix timestamp for the discount to end. Must be in the future. - """ - type: Literal["duration", "timestamp"] - """ - The type of calculation made to determine when the discount ends. - """ - - class AddLinesParamsLineDiscountDiscountEndDuration(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. - """ - interval_count: int - """ - The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. - """ - - class AddLinesParamsLinePeriod(TypedDict): - end: int - """ - The end of the period, which must be greater than or equal to the start. This value is inclusive. - """ - start: int - """ - The start of the period. This value is inclusive. - """ + ] + """ + Indicates the reason why the invoice was created. - class AddLinesParamsLinePriceData(TypedDict): - 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). - """ - product: NotRequired[str] - """ - The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to. One of `product` or `product_data` is required. - """ - product_data: NotRequired[ - "Invoice.AddLinesParamsLinePriceDataProductData" - ] - """ - Data used to generate a new [Product](https://docs.stripe.com/api/products) object inline. One of `product` or `product_data` is required. - """ - tax_behavior: NotRequired[ - Literal["exclusive", "inclusive", "unspecified"] - ] - """ - Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. - """ - unit_amount: NotRequired[int] - """ - A non-negative integer in cents (or local equivalent) representing how much to charge. One of `unit_amount` or `unit_amount_decimal` is required. - """ - unit_amount_decimal: NotRequired[str] - """ - Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - """ - - class AddLinesParamsLinePriceDataProductData(TypedDict): - description: NotRequired[str] - """ - The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. - """ - images: NotRequired[List[str]] - """ - A list of up to 8 URLs of images for this product, meant to be displayable to the customer. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - name: str - """ - The product's name, meant to be displayable to the customer. - """ - tax_code: NotRequired[str] - """ - A [tax code](https://stripe.com/docs/tax/tax-categories) ID. - """ - unit_label: NotRequired[str] - """ - A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal. - """ - - class AddLinesParamsLinePricing(TypedDict): - price: NotRequired[str] - """ - The ID of the price object. - """ - - class AddLinesParamsLineTaxAmount(TypedDict): - amount: int - """ - The amount, in cents (or local equivalent), of the tax. - """ - tax_rate_data: "Invoice.AddLinesParamsLineTaxAmountTaxRateData" - """ - Data to find or create a TaxRate object. - - Stripe automatically creates or reuses a TaxRate object for each tax amount. If the `tax_rate_data` exactly matches a previous value, Stripe will reuse the TaxRate object. TaxRate objects created automatically by Stripe are immediately archived, do not appear in the line item's `tax_rates`, and cannot be directly added to invoices, payments, or line items. - """ - taxability_reason: NotRequired[ - Literal[ - "customer_exempt", - "not_collecting", - "not_subject_to_tax", - "not_supported", - "portion_product_exempt", - "portion_reduced_rated", - "portion_standard_rated", - "product_exempt", - "product_exempt_holiday", - "proportionally_rated", - "reduced_rated", - "reverse_charge", - "standard_rated", - "taxable_basis_reduced", - "zero_rated", - ] - ] - """ - The reasoning behind this tax, for example, if the product is tax exempt. - """ - taxable_amount: int - """ - The amount on which tax is calculated, in cents (or local equivalent). - """ - - class AddLinesParamsLineTaxAmountTaxRateData(TypedDict): - country: NotRequired[str] - """ - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - """ - description: NotRequired[str] - """ - An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers. - """ - display_name: str - """ - The display name of the tax rate, which will be shown to users. - """ - inclusive: bool - """ - This specifies if the tax rate is inclusive or exclusive. - """ - jurisdiction: NotRequired[str] - """ - The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer's invoice. - """ - jurisdiction_level: NotRequired[ - Literal[ - "city", "country", "county", "district", "multiple", "state" - ] - ] - """ - The level of the jurisdiction that imposes this tax rate. - """ - percentage: float - """ - The statutory tax rate percent. This field accepts decimal values between 0 and 100 inclusive with at most 4 decimal places. To accommodate fixed-amount taxes, set the percentage to zero. Stripe will not display zero percentages on the invoice unless the `amount` of the tax is also zero. - """ - state: NotRequired[str] - """ - [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States. - """ - tax_type: NotRequired[ - Literal[ - "amusement_tax", - "communications_tax", - "gst", - "hst", - "igst", - "jct", - "lease_tax", - "pst", - "qst", - "retail_delivery_fee", - "rst", - "sales_tax", - "service_tax", - "vat", - ] - ] - """ - The high-level tax type, such as `vat` or `sales_tax`. - """ - - class AttachPaymentParams(RequestOptions): - amount_requested: NotRequired[int] - """ - The portion of the `amount` on the PaymentIntent or out of band payment to apply to this invoice. It defaults to the entire amount. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - payment_intent: NotRequired[str] - """ - The ID of the PaymentIntent to attach to the invoice. - """ - payment_record: NotRequired[str] - """ - The ID of the PaymentRecord to attach to the invoice. - """ - payment_record_data: NotRequired[ - "Invoice.AttachPaymentParamsPaymentRecordData" - ] - """ - The PaymentRecord data for attaching an out of band payment to the invoice. - """ - - class AttachPaymentParamsPaymentRecordData(TypedDict): - amount: int - """ - The amount that was paid out of band. - """ - currency: str - """ - The currency that was paid out of band. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - money_movement_type: str - """ - The type of money movement for this out of band payment record. - """ - paid_at: NotRequired[int] - """ - The timestamp when this out of band payment was paid. - """ - payment_reference: NotRequired[str] - """ - The reference for this out of band payment record. - """ - - class CreateParams(RequestOptions): - account_tax_ids: NotRequired["Literal['']|List[str]"] - """ - The account tax IDs associated with the invoice. Only editable when the invoice is a draft. - """ - amounts_due: NotRequired[ - "Literal['']|List[Invoice.CreateParamsAmountsDue]" - ] - """ - List of expected payments and corresponding due dates. Valid only for invoices where `collection_method=send_invoice`. - """ - application_fee_amount: NotRequired[int] - """ - A fee in cents (or local equivalent) that will be applied to the invoice and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/billing/invoices/connect#collecting-fees). - """ - auto_advance: NotRequired[bool] - """ - Controls whether Stripe performs [automatic collection](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection) of the invoice. If `false`, the invoice's state doesn't automatically advance without an explicit action. Defaults to false. - """ - automatic_tax: NotRequired["Invoice.CreateParamsAutomaticTax"] - """ - Settings for automatic tax lookup for this invoice. - """ - automatically_finalizes_at: NotRequired[int] - """ - The time when this invoice should be scheduled to finalize (up to 5 years in the future). The invoice is finalized at this time if it's still in draft state. - """ - collection_method: NotRequired[ - Literal["charge_automatically", "send_invoice"] - ] - """ - Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this invoice using the default source attached to the customer. When sending an invoice, Stripe will email this invoice to the customer with payment instructions. Defaults to `charge_automatically`. - """ - currency: NotRequired[str] - """ - The currency to create this invoice in. Defaults to that of `customer` if not specified. - """ - custom_fields: NotRequired[ - "Literal['']|List[Invoice.CreateParamsCustomField]" - ] - """ - A list of up to 4 custom fields to be displayed on the invoice. - """ - customer: NotRequired[str] - """ - The ID of the customer who will be billed. - """ - customer_account: NotRequired[str] - """ - The ID of the account who will be billed. - """ - days_until_due: NotRequired[int] - """ - The number of days from when the invoice is created until it is due. Valid only for invoices where `collection_method=send_invoice`. - """ - default_margins: NotRequired[List[str]] - """ - The ids of the margins to apply to the invoice. Can be overridden by line item `margins`. - """ - default_payment_method: NotRequired[str] - """ - ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings. - """ - default_source: NotRequired[str] - """ - ID of the default payment source for the invoice. It must belong to the customer associated with the invoice and be in a chargeable state. If not set, defaults to the subscription's default source, if any, or to the customer's default source. - """ - default_tax_rates: NotRequired[List[str]] - """ - The tax rates that will apply to any line item that does not have `tax_rates` set. - """ - description: NotRequired[str] - """ - An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard. - """ - discounts: NotRequired[ - "Literal['']|List[Invoice.CreateParamsDiscount]" - ] - """ - The coupons and promotion codes to redeem into discounts for the invoice. If not specified, inherits the discount from the invoice's customer. Pass an empty string to avoid inheriting any discounts. - """ - due_date: NotRequired[int] - """ - The date on which payment for this invoice is due. Valid only for invoices where `collection_method=send_invoice`. - """ - effective_at: NotRequired[int] - """ - The date when this invoice is in effect. Same as `finalized_at` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the invoice PDF and receipt. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - footer: NotRequired[str] - """ - Footer to be displayed on the invoice. - """ - from_invoice: NotRequired["Invoice.CreateParamsFromInvoice"] - """ - Revise an existing invoice. The new invoice will be created in `status=draft`. See the [revision documentation](https://stripe.com/docs/invoicing/invoice-revisions) for more details. - """ - issuer: NotRequired["Invoice.CreateParamsIssuer"] - """ - The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - number: NotRequired[str] - """ - Set the number for this invoice. If no number is present then a number will be assigned automatically when the invoice is finalized. In many markets, regulations require invoices to be unique, sequential and / or gapless. You are responsible for ensuring this is true across all your different invoicing systems in the event that you edit the invoice number using our API. If you use only Stripe for your invoices and do not change invoice numbers, Stripe handles this aspect of compliance for you automatically. - """ - on_behalf_of: NotRequired[str] - """ - The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the [Invoices with Connect](https://stripe.com/docs/billing/invoices/connect) documentation for details. - """ - payment_settings: NotRequired["Invoice.CreateParamsPaymentSettings"] - """ - Configuration settings for the PaymentIntent that is generated when the invoice is finalized. - """ - pending_invoice_items_behavior: NotRequired[ - Literal["exclude", "include"] - ] - """ - How to handle pending invoice items on invoice creation. Defaults to `exclude` if the parameter is omitted. - """ - rendering: NotRequired["Invoice.CreateParamsRendering"] - """ - The rendering-related settings that control how the invoice is displayed on customer-facing surfaces such as PDF and Hosted Invoice Page. - """ - shipping_cost: NotRequired["Invoice.CreateParamsShippingCost"] - """ - Settings for the cost of shipping for this invoice. - """ - shipping_details: NotRequired["Invoice.CreateParamsShippingDetails"] - """ - Shipping details for the invoice. The Invoice PDF will use the `shipping_details` value if it is set, otherwise the PDF will render the shipping address from the customer. - """ - statement_descriptor: NotRequired[str] - """ - Extra information about a charge for the customer's credit card statement. It must contain at least one letter. If not specified and this invoice is part of a subscription, the default `statement_descriptor` will be set to the first subscription item's product's `statement_descriptor`. - """ - subscription: NotRequired[str] - """ - The ID of the subscription to invoice, if any. If set, the created invoice will only include pending invoice items for that subscription. The subscription's billing cycle and regular subscription events won't be affected. - """ - transfer_data: NotRequired["Invoice.CreateParamsTransferData"] - """ - If specified, the funds from the invoice will be transferred to the destination and the ID of the resulting transfer will be found on the invoice's charge. - """ - - class CreateParamsAmountsDue(TypedDict): - amount: int - """ - The amount in cents (or local equivalent). - """ - days_until_due: NotRequired[int] - """ - Number of days from when invoice is finalized until the payment is due. - """ - description: str - """ - An arbitrary string attached to the object. Often useful for displaying to users. - """ - due_date: NotRequired[int] - """ - Date on which a payment plan's payment is due. - """ - - class CreateParamsAutomaticTax(TypedDict): - enabled: bool - """ - Whether Stripe automatically computes tax on this invoice. Note that incompatible invoice items (invoice items with manually specified [tax rates](https://stripe.com/docs/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices. - """ - liability: NotRequired["Invoice.CreateParamsAutomaticTaxLiability"] - """ - The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. - """ - - class CreateParamsAutomaticTaxLiability(TypedDict): - account: NotRequired[str] - """ - The connected account being referenced when `type` is `account`. - """ - type: Literal["account", "self"] - """ - Type of the account referenced in the request. - """ - - class CreateParamsCustomField(TypedDict): - name: str - """ - The name of the custom field. This may be up to 40 characters. - """ - value: str - """ - The value of the custom field. This may be up to 140 characters. - """ - - class CreateParamsDiscount(TypedDict): - coupon: NotRequired[str] - """ - ID of the coupon to create a new discount for. - """ - discount: NotRequired[str] - """ - ID of an existing discount on the object (or one of its ancestors) to reuse. - """ - discount_end: NotRequired["Invoice.CreateParamsDiscountDiscountEnd"] - """ - Details to determine how long the discount should be applied for. - """ - promotion_code: NotRequired[str] - """ - ID of the promotion code to create a new discount for. - """ - - class CreateParamsDiscountDiscountEnd(TypedDict): - duration: NotRequired[ - "Invoice.CreateParamsDiscountDiscountEndDuration" - ] - """ - Time span for the redeemed discount. - """ - timestamp: NotRequired[int] - """ - A precise Unix timestamp for the discount to end. Must be in the future. - """ - type: Literal["duration", "timestamp"] - """ - The type of calculation made to determine when the discount ends. - """ - - class CreateParamsDiscountDiscountEndDuration(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. - """ - interval_count: int - """ - The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. - """ - - class CreateParamsFromInvoice(TypedDict): - action: Literal["revision"] - """ - The relation between the new invoice and the original invoice. Currently, only 'revision' is permitted - """ - invoice: str - """ - The `id` of the invoice that will be cloned. - """ - - class CreateParamsIssuer(TypedDict): - account: NotRequired[str] - """ - The connected account being referenced when `type` is `account`. - """ - type: Literal["account", "self"] - """ - Type of the account referenced in the request. - """ - - class CreateParamsPaymentSettings(TypedDict): - default_mandate: NotRequired["Literal['']|str"] - """ - ID of the mandate to be used for this invoice. It must correspond to the payment method used to pay the invoice, including the invoice's default_payment_method or default_source, if set. - """ - payment_method_options: NotRequired[ - "Invoice.CreateParamsPaymentSettingsPaymentMethodOptions" - ] - """ - Payment-method-specific configuration to provide to the invoice's PaymentIntent. - """ - payment_method_types: NotRequired[ - "Literal['']|List[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'affirm', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'boleto', 'card', 'cashapp', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'id_bank_transfer', 'ideal', 'jp_credit_transfer', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'multibanco', 'naver_pay', 'nz_bank_account', 'p24', 'payco', 'paynow', 'paypal', 'pix', 'promptpay', 'revolut_pay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'stripe_balance', 'swish', 'upi', 'us_bank_account', 'wechat_pay']]" - ] - """ - The list of payment method types (e.g. card) to provide to the invoice's PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice's default payment method, the subscription's default payment method, the customer's default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). - """ - - class CreateParamsPaymentSettingsPaymentMethodOptions(TypedDict): - acss_debit: NotRequired[ - "Literal['']|Invoice.CreateParamsPaymentSettingsPaymentMethodOptionsAcssDebit" - ] - """ - If paying by `acss_debit`, this sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice's PaymentIntent. - """ - bancontact: NotRequired[ - "Literal['']|Invoice.CreateParamsPaymentSettingsPaymentMethodOptionsBancontact" - ] - """ - If paying by `bancontact`, this sub-hash contains details about the Bancontact payment method options to pass to the invoice's PaymentIntent. - """ - card: NotRequired[ - "Literal['']|Invoice.CreateParamsPaymentSettingsPaymentMethodOptionsCard" - ] - """ - If paying by `card`, this sub-hash contains details about the Card payment method options to pass to the invoice's PaymentIntent. - """ - customer_balance: NotRequired[ - "Literal['']|Invoice.CreateParamsPaymentSettingsPaymentMethodOptionsCustomerBalance" - ] - """ - If paying by `customer_balance`, this sub-hash contains details about the Bank transfer payment method options to pass to the invoice's PaymentIntent. - """ - id_bank_transfer: NotRequired[ - "Literal['']|Invoice.CreateParamsPaymentSettingsPaymentMethodOptionsIdBankTransfer" - ] - """ - If paying by `id_bank_transfer`, this sub-hash contains details about the Indonesia bank transfer payment method options to pass to the invoice's PaymentIntent. - """ - konbini: NotRequired[ - "Literal['']|Invoice.CreateParamsPaymentSettingsPaymentMethodOptionsKonbini" - ] - """ - If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice's PaymentIntent. - """ - pix: NotRequired[ - "Literal['']|Invoice.CreateParamsPaymentSettingsPaymentMethodOptionsPix" - ] - """ - If paying by `pix`, this sub-hash contains details about the Pix payment method options to pass to the invoice's PaymentIntent. - """ - sepa_debit: NotRequired[ - "Literal['']|Invoice.CreateParamsPaymentSettingsPaymentMethodOptionsSepaDebit" - ] - """ - If paying by `sepa_debit`, this sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice's PaymentIntent. - """ - upi: NotRequired[ - "Literal['']|Invoice.CreateParamsPaymentSettingsPaymentMethodOptionsUpi" - ] - """ - If paying by `upi`, this sub-hash contains details about the UPI payment method options to pass to the invoice's PaymentIntent. - """ - us_bank_account: NotRequired[ - "Literal['']|Invoice.CreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccount" - ] - """ - If paying by `us_bank_account`, this sub-hash contains details about the ACH direct debit payment method options to pass to the invoice's PaymentIntent. - """ - - class CreateParamsPaymentSettingsPaymentMethodOptionsAcssDebit(TypedDict): - mandate_options: NotRequired[ - "Invoice.CreateParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions" - ] - """ - Additional fields for Mandate creation - """ - verification_method: NotRequired[ - Literal["automatic", "instant", "microdeposits"] - ] - """ - Verification method for the intent - """ - - class CreateParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions( - TypedDict, - ): - transaction_type: NotRequired[Literal["business", "personal"]] - """ - Transaction type of the mandate. - """ - - class CreateParamsPaymentSettingsPaymentMethodOptionsBancontact(TypedDict): - preferred_language: NotRequired[Literal["de", "en", "fr", "nl"]] - """ - Preferred language of the Bancontact authorization page that the customer is redirected to. - """ - - class CreateParamsPaymentSettingsPaymentMethodOptionsCard(TypedDict): - installments: NotRequired[ - "Invoice.CreateParamsPaymentSettingsPaymentMethodOptionsCardInstallments" - ] - """ - Installment configuration for payments attempted on this invoice. - - For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments). - """ - request_three_d_secure: NotRequired[ - Literal["any", "automatic", "challenge"] - ] - """ - We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. - """ - - class CreateParamsPaymentSettingsPaymentMethodOptionsCardInstallments( - TypedDict, - ): - enabled: NotRequired[bool] - """ - Setting to true enables installments for this invoice. - Setting to false will prevent any selected plan from applying to a payment. - """ - plan: NotRequired[ - "Literal['']|Invoice.CreateParamsPaymentSettingsPaymentMethodOptionsCardInstallmentsPlan" - ] - """ - The selected installment plan to use for this invoice. - """ - - class CreateParamsPaymentSettingsPaymentMethodOptionsCardInstallmentsPlan( - TypedDict, - ): - count: NotRequired[int] - """ - For `fixed_count` installment plans, this is required. It represents the number of installment payments your customer will make to their credit card. - """ - interval: NotRequired[Literal["month"]] - """ - For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card. - One of `month`. - """ - type: Literal["bonus", "fixed_count", "revolving"] - """ - Type of installment plan, one of `fixed_count`, `bonus`, or `revolving`. - """ - - class CreateParamsPaymentSettingsPaymentMethodOptionsCustomerBalance( - TypedDict, - ): - bank_transfer: NotRequired[ - "Invoice.CreateParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransfer" - ] - """ - Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. - """ - funding_type: NotRequired[str] - """ - The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. - """ - - class CreateParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransfer( - TypedDict, - ): - eu_bank_transfer: NotRequired[ - "Invoice.CreateParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer" - ] - """ - Configuration for eu_bank_transfer funding type. - """ - type: NotRequired[str] - """ - The bank transfer type that can be used for funding. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. - """ - - class CreateParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer( - TypedDict, - ): - country: str - """ - The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. - """ - - class CreateParamsPaymentSettingsPaymentMethodOptionsIdBankTransfer( - TypedDict, - ): - pass - - class CreateParamsPaymentSettingsPaymentMethodOptionsKonbini(TypedDict): - pass - - class CreateParamsPaymentSettingsPaymentMethodOptionsPix(TypedDict): - amount_includes_iof: NotRequired[Literal["always", "never"]] - """ - Determines if the amount includes the IOF tax. Defaults to `never`. - """ - - class CreateParamsPaymentSettingsPaymentMethodOptionsSepaDebit(TypedDict): - pass - - class CreateParamsPaymentSettingsPaymentMethodOptionsUpi(TypedDict): - mandate_options: NotRequired[ - "Invoice.CreateParamsPaymentSettingsPaymentMethodOptionsUpiMandateOptions" - ] - """ - Configuration options for setting up an eMandate - """ - - class CreateParamsPaymentSettingsPaymentMethodOptionsUpiMandateOptions( - TypedDict, - ): - amount: NotRequired[int] - """ - Amount to be charged for future payments. - """ - amount_type: NotRequired[Literal["fixed", "maximum"]] - """ - One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. - """ - description: NotRequired[str] - """ - A description of the mandate or subscription that is meant to be displayed to the customer. - """ - end_date: NotRequired[int] - """ - End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. - """ - - class CreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccount( - TypedDict, - ): - financial_connections: NotRequired[ - "Invoice.CreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections" - ] - """ - Additional fields for Financial Connections Session creation - """ - verification_method: NotRequired[ - Literal["automatic", "instant", "microdeposits"] - ] - """ - Verification method for the intent - """ - - class CreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections( - TypedDict, - ): - filters: NotRequired[ - "Invoice.CreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters" - ] - """ - Provide filters for the linked accounts that the customer can select for the payment method. - """ - permissions: NotRequired[ - List[ - Literal[ - "balances", "ownership", "payment_method", "transactions" - ] - ] - ] - """ - The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. - """ - prefetch: NotRequired[ - List[ - Literal[ - "balances", - "inferred_balances", - "ownership", - "transactions", - ] - ] - ] - """ - List of data features that you would like to retrieve upon account creation. - """ - - class CreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters( - TypedDict, - ): - account_subcategories: NotRequired[ - List[Literal["checking", "savings"]] - ] - """ - The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`. - """ - institution: NotRequired[str] - """ - ID of the institution to use to filter for selectable accounts. - """ - - class CreateParamsRendering(TypedDict): - amount_tax_display: NotRequired[ - "Literal['']|Literal['exclude_tax', 'include_inclusive_tax']" - ] - """ - How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One of `exclude_tax` or `include_inclusive_tax`. `include_inclusive_tax` will include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. `exclude_tax` will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts. - """ - pdf: NotRequired["Invoice.CreateParamsRenderingPdf"] - """ - Invoice pdf rendering options - """ - template: NotRequired[str] - """ - ID of the invoice rendering template to use for this invoice. - """ - template_version: NotRequired["Literal['']|int"] - """ - The specific version of invoice rendering template to use for this invoice. - """ - - class CreateParamsRenderingPdf(TypedDict): - page_size: NotRequired[Literal["a4", "auto", "letter"]] - """ - Page size for invoice PDF. Can be set to `a4`, `letter`, or `auto`. - If set to `auto`, invoice PDF page size defaults to `a4` for customers with - Japanese locale and `letter` for customers with other locales. - """ - - class CreateParamsShippingCost(TypedDict): - shipping_rate: NotRequired[str] - """ - The ID of the shipping rate to use for this order. - """ - shipping_rate_data: NotRequired[ - "Invoice.CreateParamsShippingCostShippingRateData" - ] - """ - Parameters to create a new ad-hoc shipping rate for this order. - """ - - class CreateParamsShippingCostShippingRateData(TypedDict): - delivery_estimate: NotRequired[ - "Invoice.CreateParamsShippingCostShippingRateDataDeliveryEstimate" - ] - """ - The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions. - """ - display_name: str - """ - The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions. - """ - fixed_amount: NotRequired[ - "Invoice.CreateParamsShippingCostShippingRateDataFixedAmount" - ] - """ - Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - tax_behavior: NotRequired[ - Literal["exclusive", "inclusive", "unspecified"] - ] - """ - Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. - """ - tax_code: NotRequired[str] - """ - A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`. - """ - type: NotRequired[Literal["fixed_amount"]] - """ - The type of calculation to use on the shipping rate. - """ - - class CreateParamsShippingCostShippingRateDataDeliveryEstimate(TypedDict): - maximum: NotRequired[ - "Invoice.CreateParamsShippingCostShippingRateDataDeliveryEstimateMaximum" - ] - """ - The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite. - """ - minimum: NotRequired[ - "Invoice.CreateParamsShippingCostShippingRateDataDeliveryEstimateMinimum" - ] - """ - The lower bound of the estimated range. If empty, represents no lower bound. - """ - - class CreateParamsShippingCostShippingRateDataDeliveryEstimateMaximum( - TypedDict, - ): - unit: Literal["business_day", "day", "hour", "month", "week"] - """ - A unit of time. - """ - value: int - """ - Must be greater than 0. - """ - - class CreateParamsShippingCostShippingRateDataDeliveryEstimateMinimum( - TypedDict, - ): - unit: Literal["business_day", "day", "hour", "month", "week"] - """ - A unit of time. - """ - value: int - """ - Must be greater than 0. - """ - - class CreateParamsShippingCostShippingRateDataFixedAmount(TypedDict): - amount: int - """ - A non-negative integer in cents representing how much to charge. - """ - 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). - """ - currency_options: NotRequired[ - Dict[ - str, - "Invoice.CreateParamsShippingCostShippingRateDataFixedAmountCurrencyOptions", - ] - ] - """ - Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). - """ - - class CreateParamsShippingCostShippingRateDataFixedAmountCurrencyOptions( - TypedDict, - ): - amount: int - """ - A non-negative integer in cents representing how much to charge. - """ - tax_behavior: NotRequired[ - Literal["exclusive", "inclusive", "unspecified"] - ] - """ - Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. - """ - - class CreateParamsShippingDetails(TypedDict): - address: "Invoice.CreateParamsShippingDetailsAddress" - """ - Shipping address - """ - name: str - """ - Recipient name. - """ - phone: NotRequired["Literal['']|str"] - """ - Recipient phone (including extension) - """ - - class CreateParamsShippingDetailsAddress(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. - """ - - class CreateParamsTransferData(TypedDict): - amount: NotRequired[int] - """ - The amount that will be transferred automatically when the invoice is paid. If no amount is set, the full amount is transferred. - """ - destination: str - """ - ID of an existing, connected Stripe account. - """ - - class CreatePreviewParams(RequestOptions): - automatic_tax: NotRequired["Invoice.CreatePreviewParamsAutomaticTax"] - """ - Settings for automatic tax lookup for this invoice preview. - """ - billing_cadence: NotRequired[str] - """ - The identifier of the billing cadence for which you'd like to retrieve the upcoming invoice.Cannot be provided when `subscription`, `schedule`, `subscription_details` or `schedule_details` are provided. - """ - currency: NotRequired[str] - """ - The currency to preview this invoice in. Defaults to that of `customer` if not specified. - """ - customer: NotRequired[str] - """ - The identifier of the customer whose upcoming invoice you'd like to retrieve. If `automatic_tax` is enabled then one of `customer`, `customer_details`, `subscription`, or `schedule` must be set. - """ - customer_account: NotRequired[str] - """ - The identifier of the account whose upcoming invoice you'd like to retrieve. If `automatic_tax` is enabled then one of `customer`, `customer_account`, `customer_details`, `subscription`, or `schedule` must be set. - """ - customer_details: NotRequired[ - "Invoice.CreatePreviewParamsCustomerDetails" - ] - """ - Details about the customer you want to invoice or overrides for an existing customer. If `automatic_tax` is enabled then one of `customer`, `customer_details`, `subscription`, or `schedule` must be set. - """ - discounts: NotRequired[ - "Literal['']|List[Invoice.CreatePreviewParamsDiscount]" - ] - """ - The coupons to redeem into discounts for the invoice preview. If not specified, inherits the discount from the subscription or customer. This works for both coupons directly applied to an invoice and coupons applied to a subscription. Pass an empty string to avoid inheriting any discounts. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - invoice_items: NotRequired[ - List["Invoice.CreatePreviewParamsInvoiceItem"] - ] - """ - List of invoice items to add or update in the upcoming invoice preview (up to 250). - """ - issuer: NotRequired["Invoice.CreatePreviewParamsIssuer"] - """ - The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. - """ - on_behalf_of: NotRequired["Literal['']|str"] - """ - The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the [Invoices with Connect](https://stripe.com/docs/billing/invoices/connect) documentation for details. - """ - preview_mode: NotRequired[Literal["next", "recurring"]] - """ - Customizes the types of values to include when calculating the invoice. Defaults to `next` if unspecified. - """ - schedule: NotRequired[str] - """ - The identifier of the schedule whose upcoming invoice you'd like to retrieve. Cannot be used with subscription or subscription fields. - """ - schedule_details: NotRequired[ - "Invoice.CreatePreviewParamsScheduleDetails" - ] - """ - The schedule creation or modification params to apply as a preview. Cannot be used with `subscription` or `subscription_` prefixed fields. - """ - subscription: NotRequired[str] - """ - The identifier of the subscription for which you'd like to retrieve the upcoming invoice. If not provided, but a `subscription_details.items` is provided, you will preview creating a subscription with those items. If neither `subscription` nor `subscription_details.items` is provided, you will retrieve the next upcoming invoice from among the customer's subscriptions. - """ - subscription_details: NotRequired[ - "Invoice.CreatePreviewParamsSubscriptionDetails" - ] - """ - The subscription creation or modification params to apply as a preview. Cannot be used with `schedule` or `schedule_details` fields. - """ - - class CreatePreviewParamsAutomaticTax(TypedDict): - enabled: bool - """ - Whether Stripe automatically computes tax on this invoice. Note that incompatible invoice items (invoice items with manually specified [tax rates](https://stripe.com/docs/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices. - """ - liability: NotRequired[ - "Invoice.CreatePreviewParamsAutomaticTaxLiability" - ] - """ - The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. - """ - - class CreatePreviewParamsAutomaticTaxLiability(TypedDict): - account: NotRequired[str] - """ - The connected account being referenced when `type` is `account`. - """ - type: Literal["account", "self"] - """ - Type of the account referenced in the request. - """ - - class CreatePreviewParamsCustomerDetails(TypedDict): - address: NotRequired[ - "Literal['']|Invoice.CreatePreviewParamsCustomerDetailsAddress" - ] - """ - The customer's address. - """ - shipping: NotRequired[ - "Literal['']|Invoice.CreatePreviewParamsCustomerDetailsShipping" - ] - """ - The customer's shipping information. Appears on invoices emailed to this customer. - """ - tax: NotRequired["Invoice.CreatePreviewParamsCustomerDetailsTax"] - """ - Tax details about the customer. - """ - tax_exempt: NotRequired[ - "Literal['']|Literal['exempt', 'none', 'reverse']" - ] - """ - The customer's tax exemption. One of `none`, `exempt`, or `reverse`. - """ - tax_ids: NotRequired[ - List["Invoice.CreatePreviewParamsCustomerDetailsTaxId"] - ] - """ - The customer's tax IDs. - """ - - class CreatePreviewParamsCustomerDetailsAddress(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. - """ - - class CreatePreviewParamsCustomerDetailsShipping(TypedDict): - address: "Invoice.CreatePreviewParamsCustomerDetailsShippingAddress" - """ - Customer shipping address. - """ - name: str - """ - Customer name. - """ - phone: NotRequired[str] - """ - Customer phone (including extension). - """ - - class CreatePreviewParamsCustomerDetailsShippingAddress(TypedDict): - city: NotRequired[str] - """ - City, district, suburb, town, or village. - """ - country: NotRequired[str] - """ - A freeform text field for the country. However, in order to activate some tax features, the format should be a 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. - """ - - class CreatePreviewParamsCustomerDetailsTax(TypedDict): - ip_address: NotRequired["Literal['']|str"] - """ - A recent IP address of the customer used for tax reporting and tax location inference. Stripe recommends updating the IP address when a new PaymentMethod is attached or the address field on the customer is updated. We recommend against updating this field more frequently since it could result in unexpected tax location/reporting outcomes. - """ - - class CreatePreviewParamsCustomerDetailsTaxId(TypedDict): - type: Literal[ - "ad_nrt", - "ae_trn", - "al_tin", - "am_tin", - "ao_tin", - "ar_cuit", - "au_abn", - "au_arn", - "aw_tin", - "az_tin", - "ba_tin", - "bb_tin", - "bd_bin", - "bf_ifu", - "bg_uic", - "bh_vat", - "bj_ifu", - "bo_tin", - "br_cnpj", - "br_cpf", - "bs_tin", - "by_tin", - "ca_bn", - "ca_gst_hst", - "ca_pst_bc", - "ca_pst_mb", - "ca_pst_sk", - "ca_qst", - "cd_nif", - "ch_uid", - "ch_vat", - "cl_tin", - "cm_niu", - "cn_tin", - "co_nit", - "cr_tin", - "cv_nif", - "de_stn", - "do_rcn", - "ec_ruc", - "eg_tin", - "es_cif", - "et_tin", - "eu_oss_vat", - "eu_vat", - "gb_vat", - "ge_vat", - "gn_nif", - "hk_br", - "hr_oib", - "hu_tin", - "id_npwp", - "il_vat", - "in_gst", - "is_vat", - "jp_cn", - "jp_rn", - "jp_trn", - "ke_pin", - "kg_tin", - "kh_tin", - "kr_brn", - "kz_bin", - "la_tin", - "li_uid", - "li_vat", - "ma_vat", - "md_vat", - "me_pib", - "mk_vat", - "mr_nif", - "mx_rfc", - "my_frp", - "my_itn", - "my_sst", - "ng_tin", - "no_vat", - "no_voec", - "np_pan", - "nz_gst", - "om_vat", - "pe_ruc", - "ph_tin", - "ro_tin", - "rs_pib", - "ru_inn", - "ru_kpp", - "sa_vat", - "sg_gst", - "sg_uen", - "si_tin", - "sn_ninea", - "sr_fin", - "sv_nit", - "th_vat", - "tj_tin", - "tr_tin", - "tw_vat", - "tz_vat", - "ua_vat", - "ug_tin", - "us_ein", - "uy_ruc", - "uz_tin", - "uz_vat", - "ve_rif", - "vn_tin", - "za_vat", - "zm_tin", - "zw_tin", - ] - """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `al_tin`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `aw_tin`, `az_tin`, `ba_tin`, `bb_tin`, `bd_bin`, `bf_ifu`, `bg_uic`, `bh_vat`, `bj_ifu`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cm_niu`, `cn_tin`, `co_nit`, `cr_tin`, `cv_nif`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `et_tin`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kg_tin`, `kh_tin`, `kr_brn`, `kz_bin`, `la_tin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin` - """ - value: str - """ - Value of the tax ID. - """ - - class CreatePreviewParamsDiscount(TypedDict): - coupon: NotRequired[str] - """ - ID of the coupon to create a new discount for. - """ - discount: NotRequired[str] - """ - ID of an existing discount on the object (or one of its ancestors) to reuse. - """ - discount_end: NotRequired[ - "Invoice.CreatePreviewParamsDiscountDiscountEnd" - ] - """ - Details to determine how long the discount should be applied for. - """ - promotion_code: NotRequired[str] - """ - ID of the promotion code to create a new discount for. - """ - - class CreatePreviewParamsDiscountDiscountEnd(TypedDict): - duration: NotRequired[ - "Invoice.CreatePreviewParamsDiscountDiscountEndDuration" - ] - """ - Time span for the redeemed discount. - """ - timestamp: NotRequired[int] - """ - A precise Unix timestamp for the discount to end. Must be in the future. - """ - type: Literal["duration", "timestamp"] - """ - The type of calculation made to determine when the discount ends. - """ - - class CreatePreviewParamsDiscountDiscountEndDuration(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. - """ - interval_count: int - """ - The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. - """ - - class CreatePreviewParamsInvoiceItem(TypedDict): - amount: NotRequired[int] - """ - The integer amount in cents (or local equivalent) of previewed invoice item. - """ - currency: NotRequired[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). Only applicable to new invoice items. - """ - description: NotRequired[str] - """ - An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking. - """ - discountable: NotRequired[bool] - """ - Explicitly controls whether discounts apply to this invoice item. Defaults to true, except for negative invoice items. - """ - discounts: NotRequired[ - "Literal['']|List[Invoice.CreatePreviewParamsInvoiceItemDiscount]" - ] - """ - The coupons to redeem into discounts for the invoice item in the preview. - """ - invoiceitem: NotRequired[str] - """ - The ID of the invoice item to update in preview. If not specified, a new invoice item will be added to the preview of the upcoming invoice. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - period: NotRequired["Invoice.CreatePreviewParamsInvoiceItemPeriod"] - """ - The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details. - """ - price: NotRequired[str] - """ - The ID of the price object. One of `price` or `price_data` is required. - """ - price_data: NotRequired[ - "Invoice.CreatePreviewParamsInvoiceItemPriceData" - ] - """ - Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. - """ - quantity: NotRequired[int] - """ - Non-negative integer. The quantity of units for the invoice item. - """ - tax_behavior: NotRequired[ - Literal["exclusive", "inclusive", "unspecified"] - ] - """ - Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. - """ - tax_code: NotRequired["Literal['']|str"] - """ - A [tax code](https://stripe.com/docs/tax/tax-categories) ID. - """ - tax_rates: NotRequired["Literal['']|List[str]"] - """ - The tax rates that apply to the item. When set, any `default_tax_rates` do not apply to this item. - """ - unit_amount: NotRequired[int] - """ - The integer unit amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. This unit_amount will be multiplied by the quantity to get the full amount. If you want to apply a credit to the customer's account, pass a negative unit_amount. - """ - unit_amount_decimal: NotRequired[str] - """ - Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - """ - - class CreatePreviewParamsInvoiceItemDiscount(TypedDict): - coupon: NotRequired[str] - """ - ID of the coupon to create a new discount for. - """ - discount: NotRequired[str] - """ - ID of an existing discount on the object (or one of its ancestors) to reuse. - """ - discount_end: NotRequired[ - "Invoice.CreatePreviewParamsInvoiceItemDiscountDiscountEnd" - ] - """ - Details to determine how long the discount should be applied for. - """ - promotion_code: NotRequired[str] - """ - ID of the promotion code to create a new discount for. - """ - - class CreatePreviewParamsInvoiceItemDiscountDiscountEnd(TypedDict): - duration: NotRequired[ - "Invoice.CreatePreviewParamsInvoiceItemDiscountDiscountEndDuration" - ] - """ - Time span for the redeemed discount. - """ - timestamp: NotRequired[int] - """ - A precise Unix timestamp for the discount to end. Must be in the future. - """ - type: Literal["duration", "timestamp"] - """ - The type of calculation made to determine when the discount ends. - """ - - class CreatePreviewParamsInvoiceItemDiscountDiscountEndDuration(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. - """ - interval_count: int - """ - The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. - """ - - class CreatePreviewParamsInvoiceItemPeriod(TypedDict): - end: int - """ - The end of the period, which must be greater than or equal to the start. This value is inclusive. - """ - start: int - """ - The start of the period. This value is inclusive. - """ - - class CreatePreviewParamsInvoiceItemPriceData(TypedDict): - 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). - """ - product: str - """ - The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to. - """ - tax_behavior: NotRequired[ - Literal["exclusive", "inclusive", "unspecified"] - ] - """ - Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. - """ - unit_amount: NotRequired[int] - """ - A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. - """ - unit_amount_decimal: NotRequired[str] - """ - Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - """ - - class CreatePreviewParamsIssuer(TypedDict): - account: NotRequired[str] - """ - The connected account being referenced when `type` is `account`. - """ - type: Literal["account", "self"] - """ - Type of the account referenced in the request. - """ - - class CreatePreviewParamsScheduleDetails(TypedDict): - amendments: NotRequired[ - List["Invoice.CreatePreviewParamsScheduleDetailsAmendment"] - ] - """ - Changes to apply to the phases of the subscription schedule, in the order provided. - """ - billing_behavior: NotRequired[ - Literal["prorate_on_next_phase", "prorate_up_front"] - ] - """ - Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front. - """ - billing_mode: NotRequired[ - "Invoice.CreatePreviewParamsScheduleDetailsBillingMode" - ] - """ - Controls how prorations and invoices for subscriptions are calculated and orchestrated. - """ - end_behavior: NotRequired[Literal["cancel", "release"]] - """ - Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running. `cancel` will end the subscription schedule and cancel the underlying subscription. - """ - phases: NotRequired[ - List["Invoice.CreatePreviewParamsScheduleDetailsPhase"] - ] - """ - List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase. - """ - prebilling: NotRequired[ - "Literal['']|List[Invoice.CreatePreviewParamsScheduleDetailsPrebilling]" - ] - """ - Provide any time periods to bill in advance. - """ - proration_behavior: NotRequired[ - Literal["always_invoice", "create_prorations", "none"] - ] - """ - In cases where the `schedule_details` params update the currently active phase, specifies if and how to prorate at the time of the request. - """ - - class CreatePreviewParamsScheduleDetailsAmendment(TypedDict): - amendment_end: NotRequired[ - "Invoice.CreatePreviewParamsScheduleDetailsAmendmentAmendmentEnd" - ] - """ - Details to identify the end of the time range modified by the proposed change. If not supplied, the amendment is considered a point-in-time operation that only affects the exact timestamp at `amendment_start`, and a restricted set of attributes is supported on the amendment. - """ - amendment_start: ( - "Invoice.CreatePreviewParamsScheduleDetailsAmendmentAmendmentStart" - ) - """ - Details to identify the earliest timestamp where the proposed change should take effect. - """ - billing_cycle_anchor: NotRequired[ - Literal["amendment_start", "automatic"] - ] - """ - For point-in-time amendments (having no `amendment_end`), this attribute lets you set or remove whether the subscription's billing cycle anchor is reset at the `amendment_start` timestamp.For time-span based amendments (having both `amendment_start` and `amendment_end`), the only value valid is `automatic`, which removes any previously configured billing cycle anchor resets scheduled to occur during the window of time spanned by the amendment. - """ - discount_actions: NotRequired[ - List[ - "Invoice.CreatePreviewParamsScheduleDetailsAmendmentDiscountAction" - ] - ] - """ - Changes to the coupons being redeemed or discounts being applied during the amendment time span. - """ - item_actions: NotRequired[ - List[ - "Invoice.CreatePreviewParamsScheduleDetailsAmendmentItemAction" - ] - ] - """ - Changes to the subscription items during the amendment time span. - """ - metadata_actions: NotRequired[ - List[ - "Invoice.CreatePreviewParamsScheduleDetailsAmendmentMetadataAction" - ] - ] - """ - Instructions for how to modify phase metadata - """ - proration_behavior: NotRequired[ - Literal["always_invoice", "create_prorations", "none"] - ] - """ - Changes to how Stripe handles prorations during the amendment time span. Affects if and how prorations are created when a future phase starts. In cases where the amendment changes the currently active phase, it is used to determine whether or how to prorate now, at the time of the request. Also supported as a point-in-time operation when `amendment_end` is `null`. - """ - set_pause_collection: NotRequired[ - "Invoice.CreatePreviewParamsScheduleDetailsAmendmentSetPauseCollection" - ] - """ - Defines how to pause collection for the underlying subscription throughout the duration of the amendment. - """ - set_schedule_end: NotRequired[ - Literal["amendment_end", "amendment_start"] - ] - """ - Ends the subscription schedule early as dictated by either the accompanying amendment's start or end. - """ - trial_settings: NotRequired[ - "Invoice.CreatePreviewParamsScheduleDetailsAmendmentTrialSettings" - ] - """ - Settings related to subscription trials. - """ - - class CreatePreviewParamsScheduleDetailsAmendmentAmendmentEnd(TypedDict): - discount_end: NotRequired[ - "Invoice.CreatePreviewParamsScheduleDetailsAmendmentAmendmentEndDiscountEnd" - ] - """ - Use the `end` time of a given discount. - """ - duration: NotRequired[ - "Invoice.CreatePreviewParamsScheduleDetailsAmendmentAmendmentEndDuration" - ] - """ - Time span for the amendment starting from the `amendment_start`. - """ - timestamp: NotRequired[int] - """ - A precise Unix timestamp for the amendment to end. Must be after the `amendment_start`. - """ - type: Literal[ - "discount_end", - "duration", - "schedule_end", - "timestamp", - "trial_end", - "trial_start", - "upcoming_invoice", - ] - """ - Select one of three ways to pass the `amendment_end`. - """ - - class CreatePreviewParamsScheduleDetailsAmendmentAmendmentEndDiscountEnd( - TypedDict, - ): - discount: str - """ - The ID of a specific discount. - """ - - class CreatePreviewParamsScheduleDetailsAmendmentAmendmentEndDuration( - TypedDict, - ): - interval: Literal["day", "month", "week", "year"] - """ - Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. - """ - interval_count: int - """ - The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. - """ - - class CreatePreviewParamsScheduleDetailsAmendmentAmendmentStart(TypedDict): - amendment_end: NotRequired[ - "Invoice.CreatePreviewParamsScheduleDetailsAmendmentAmendmentStartAmendmentEnd" - ] - """ - Details of another amendment in the same array, immediately after which this amendment should begin. - """ - discount_end: NotRequired[ - "Invoice.CreatePreviewParamsScheduleDetailsAmendmentAmendmentStartDiscountEnd" - ] - """ - Use the `end` time of a given discount. - """ - timestamp: NotRequired[int] - """ - A precise Unix timestamp for the amendment to start. - """ - type: Literal[ - "amendment_end", - "discount_end", - "now", - "schedule_end", - "timestamp", - "trial_end", - "trial_start", - "upcoming_invoice", - ] - """ - Select one of three ways to pass the `amendment_start`. - """ - - class CreatePreviewParamsScheduleDetailsAmendmentAmendmentStartAmendmentEnd( - TypedDict, - ): - index: int - """ - The position of the previous amendment in the `amendments` array after which this amendment should begin. Indexes start from 0 and must be less than the index of the current amendment in the array. - """ - - class CreatePreviewParamsScheduleDetailsAmendmentAmendmentStartDiscountEnd( - TypedDict, - ): - discount: str - """ - The ID of a specific discount. - """ - - class CreatePreviewParamsScheduleDetailsAmendmentDiscountAction(TypedDict): - add: NotRequired[ - "Invoice.CreatePreviewParamsScheduleDetailsAmendmentDiscountActionAdd" - ] - """ - Details of the discount to add. - """ - remove: NotRequired[ - "Invoice.CreatePreviewParamsScheduleDetailsAmendmentDiscountActionRemove" - ] - """ - Details of the discount to remove. - """ - set: NotRequired[ - "Invoice.CreatePreviewParamsScheduleDetailsAmendmentDiscountActionSet" - ] - """ - Details of the discount to replace the existing discounts with. - """ - type: Literal["add", "remove", "set"] - """ - Determines the type of discount action. - """ - - class CreatePreviewParamsScheduleDetailsAmendmentDiscountActionAdd( - TypedDict, - ): - coupon: NotRequired[str] - """ - The coupon code to redeem. - """ - discount: NotRequired[str] - """ - An ID of an existing discount for a coupon that was already redeemed. - """ - discount_end: NotRequired[ - "Invoice.CreatePreviewParamsScheduleDetailsAmendmentDiscountActionAddDiscountEnd" - ] - """ - Details to determine how long the discount should be applied for. - """ - index: NotRequired[int] - """ - The index, starting at 0, at which to position the new discount. When not supplied, Stripe defaults to appending the discount to the end of the `discounts` array. - """ - promotion_code: NotRequired[str] - """ - The promotion code to redeem. - """ - - class CreatePreviewParamsScheduleDetailsAmendmentDiscountActionAddDiscountEnd( - TypedDict, - ): - type: Literal["amendment_end"] - """ - The type of calculation made to determine when the discount ends. - """ - - class CreatePreviewParamsScheduleDetailsAmendmentDiscountActionRemove( - TypedDict, - ): - coupon: NotRequired[str] - """ - The coupon code to remove from the `discounts` array. - """ - discount: NotRequired[str] - """ - The ID of a discount to remove from the `discounts` array. - """ - promotion_code: NotRequired[str] - """ - The ID of a promotion code to remove from the `discounts` array. - """ - - class CreatePreviewParamsScheduleDetailsAmendmentDiscountActionSet( - TypedDict, - ): - coupon: NotRequired[str] - """ - The coupon code to replace the `discounts` array with. - """ - discount: NotRequired[str] - """ - An ID of an existing discount to replace the `discounts` array with. - """ - promotion_code: NotRequired[str] - """ - An ID of an existing promotion code to replace the `discounts` array with. - """ - - class CreatePreviewParamsScheduleDetailsAmendmentItemAction(TypedDict): - add: NotRequired[ - "Invoice.CreatePreviewParamsScheduleDetailsAmendmentItemActionAdd" - ] - """ - Details of the subscription item to add. If an item with the same `price` exists, it will be replaced by this new item. Otherwise, it adds the new item. - """ - remove: NotRequired[ - "Invoice.CreatePreviewParamsScheduleDetailsAmendmentItemActionRemove" - ] - """ - Details of the subscription item to remove. - """ - set: NotRequired[ - "Invoice.CreatePreviewParamsScheduleDetailsAmendmentItemActionSet" - ] - """ - Details of the subscription item to replace the existing items with. If an item with the `set[price]` already exists, the `items` array is not cleared. Instead, all of the other `set` properties that are passed in this request will replace the existing values for the configuration item. - """ - type: Literal["add", "remove", "set"] - """ - Determines the type of item action. - """ - - class CreatePreviewParamsScheduleDetailsAmendmentItemActionAdd(TypedDict): - discounts: NotRequired[ - List[ - "Invoice.CreatePreviewParamsScheduleDetailsAmendmentItemActionAddDiscount" - ] - ] - """ - The discounts applied to the item. Subscription item discounts are applied before subscription discounts. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - price: str - """ - The ID of the price object. - """ - quantity: NotRequired[int] - """ - Quantity for this item. - """ - tax_rates: NotRequired[List[str]] - """ - The tax rates that apply to this subscription item. When set, the `default_tax_rates` on the subscription do not apply to this `subscription_item`. - """ - trial: NotRequired[ - "Invoice.CreatePreviewParamsScheduleDetailsAmendmentItemActionAddTrial" - ] - """ - Options that configure the trial on the subscription item. - """ - - class CreatePreviewParamsScheduleDetailsAmendmentItemActionAddDiscount( - TypedDict, - ): - coupon: NotRequired[str] - """ - ID of the coupon to create a new discount for. - """ - discount: NotRequired[str] - """ - ID of an existing discount on the object (or one of its ancestors) to reuse. - """ - discount_end: NotRequired[ - "Invoice.CreatePreviewParamsScheduleDetailsAmendmentItemActionAddDiscountDiscountEnd" - ] - """ - Details to determine how long the discount should be applied for. - """ - promotion_code: NotRequired[str] - """ - ID of the promotion code to create a new discount for. - """ - - class CreatePreviewParamsScheduleDetailsAmendmentItemActionAddDiscountDiscountEnd( - TypedDict, - ): - duration: NotRequired[ - "Invoice.CreatePreviewParamsScheduleDetailsAmendmentItemActionAddDiscountDiscountEndDuration" - ] - """ - Time span for the redeemed discount. - """ - timestamp: NotRequired[int] - """ - A precise Unix timestamp for the discount to end. Must be in the future. - """ - type: Literal["duration", "timestamp"] - """ - The type of calculation made to determine when the discount ends. - """ - - class CreatePreviewParamsScheduleDetailsAmendmentItemActionAddDiscountDiscountEndDuration( - TypedDict, - ): - interval: Literal["day", "month", "week", "year"] - """ - Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. - """ - interval_count: int - """ - The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. - """ - - class CreatePreviewParamsScheduleDetailsAmendmentItemActionAddTrial( - TypedDict, - ): - converts_to: NotRequired[List[str]] - """ - List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. - """ - type: Literal["free", "paid"] - """ - Determines the type of trial for this item. - """ - - class CreatePreviewParamsScheduleDetailsAmendmentItemActionRemove( - TypedDict, - ): - price: str - """ - ID of a price to remove. - """ - - class CreatePreviewParamsScheduleDetailsAmendmentItemActionSet(TypedDict): - discounts: NotRequired[ - List[ - "Invoice.CreatePreviewParamsScheduleDetailsAmendmentItemActionSetDiscount" - ] - ] - """ - If an item with the `price` already exists, passing this will override the `discounts` array on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `discounts`. - """ - metadata: NotRequired[Dict[str, str]] - """ - If an item with the `price` already exists, passing this will override the `metadata` on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `metadata`. - """ - price: str - """ - The ID of the price object. - """ - quantity: NotRequired[int] - """ - If an item with the `price` already exists, passing this will override the quantity on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `quantity`. - """ - tax_rates: NotRequired[List[str]] - """ - If an item with the `price` already exists, passing this will override the `tax_rates` array on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `tax_rates`. - """ - trial: NotRequired[ - "Invoice.CreatePreviewParamsScheduleDetailsAmendmentItemActionSetTrial" - ] - """ - If an item with the `price` already exists, passing this will override the `trial` configuration on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `trial`. - """ - - class CreatePreviewParamsScheduleDetailsAmendmentItemActionSetDiscount( - TypedDict, - ): - coupon: NotRequired[str] - """ - ID of the coupon to create a new discount for. - """ - discount: NotRequired[str] - """ - ID of an existing discount on the object (or one of its ancestors) to reuse. - """ - discount_end: NotRequired[ - "Invoice.CreatePreviewParamsScheduleDetailsAmendmentItemActionSetDiscountDiscountEnd" - ] - """ - Details to determine how long the discount should be applied for. - """ - promotion_code: NotRequired[str] - """ - ID of the promotion code to create a new discount for. - """ - - class CreatePreviewParamsScheduleDetailsAmendmentItemActionSetDiscountDiscountEnd( - TypedDict, - ): - duration: NotRequired[ - "Invoice.CreatePreviewParamsScheduleDetailsAmendmentItemActionSetDiscountDiscountEndDuration" - ] - """ - Time span for the redeemed discount. - """ - timestamp: NotRequired[int] - """ - A precise Unix timestamp for the discount to end. Must be in the future. - """ - type: Literal["duration", "timestamp"] - """ - The type of calculation made to determine when the discount ends. - """ - - class CreatePreviewParamsScheduleDetailsAmendmentItemActionSetDiscountDiscountEndDuration( - TypedDict, - ): - interval: Literal["day", "month", "week", "year"] - """ - Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. - """ - interval_count: int - """ - The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. - """ - - class CreatePreviewParamsScheduleDetailsAmendmentItemActionSetTrial( - TypedDict, - ): - converts_to: NotRequired[List[str]] - """ - List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. - """ - type: Literal["free", "paid"] - """ - Determines the type of trial for this item. - """ - - class CreatePreviewParamsScheduleDetailsAmendmentMetadataAction(TypedDict): - add: NotRequired[Dict[str, str]] - """ - Key-value pairs to add to schedule phase metadata. These values will merge with existing schedule phase metadata. - """ - remove: NotRequired[List[str]] - """ - Keys to remove from schedule phase metadata. - """ - set: NotRequired["Literal['']|Dict[str, str]"] - """ - Key-value pairs to set as schedule phase metadata. Existing schedule phase metadata will be overwritten. - """ - type: Literal["add", "remove", "set"] - """ - Select one of three ways to update phase-level `metadata` on subscription schedules. - """ - - class CreatePreviewParamsScheduleDetailsAmendmentSetPauseCollection( - TypedDict, - ): - set: NotRequired[ - "Invoice.CreatePreviewParamsScheduleDetailsAmendmentSetPauseCollectionSet" - ] - """ - Details of the pause_collection behavior to apply to the amendment. - """ - type: Literal["remove", "set"] - """ - Determines the type of the pause_collection amendment. - """ - - class CreatePreviewParamsScheduleDetailsAmendmentSetPauseCollectionSet( - TypedDict, - ): - behavior: Literal["keep_as_draft", "mark_uncollectible", "void"] - """ - The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. - """ - - class CreatePreviewParamsScheduleDetailsAmendmentTrialSettings(TypedDict): - end_behavior: NotRequired[ - "Invoice.CreatePreviewParamsScheduleDetailsAmendmentTrialSettingsEndBehavior" - ] - """ - Defines how the subscription should behave when a trial ends. - """ - - class CreatePreviewParamsScheduleDetailsAmendmentTrialSettingsEndBehavior( - TypedDict, - ): - prorate_up_front: NotRequired[Literal["defer", "include"]] - """ - Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`. - """ - - class CreatePreviewParamsScheduleDetailsBillingMode(TypedDict): - flexible: NotRequired[ - "Invoice.CreatePreviewParamsScheduleDetailsBillingModeFlexible" - ] - """ - Configure behavior for flexible billing mode. - """ - type: Literal["classic", "flexible"] - """ - Controls the calculation and orchestration of prorations and invoices for subscriptions. If no value is passed, the default is `flexible`. - """ - - class CreatePreviewParamsScheduleDetailsBillingModeFlexible(TypedDict): - proration_discounts: NotRequired[Literal["included", "itemized"]] - """ - Controls how invoices and invoice items display proration amounts and discount amounts. - """ - - class CreatePreviewParamsScheduleDetailsPhase(TypedDict): - add_invoice_items: NotRequired[ - List[ - "Invoice.CreatePreviewParamsScheduleDetailsPhaseAddInvoiceItem" - ] - ] - """ - A list of prices and quantities that will generate invoice items appended to the next invoice for this phase. You may pass up to 20 items. - """ - application_fee_percent: NotRequired[float] - """ - A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). - """ - automatic_tax: NotRequired[ - "Invoice.CreatePreviewParamsScheduleDetailsPhaseAutomaticTax" - ] - """ - Automatic tax settings for this phase. - """ - billing_cycle_anchor: NotRequired[Literal["automatic", "phase_start"]] - """ - Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). - """ - billing_thresholds: NotRequired[ - "Literal['']|Invoice.CreatePreviewParamsScheduleDetailsPhaseBillingThresholds" - ] - """ - Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. - """ - collection_method: NotRequired[ - Literal["charge_automatically", "send_invoice"] - ] - """ - Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically` on creation. - """ - currency: NotRequired[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). - """ - default_payment_method: NotRequired[str] - """ - ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings. - """ - default_tax_rates: NotRequired["Literal['']|List[str]"] - """ - A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will set the Subscription's [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates), which means they will be the Invoice's [`default_tax_rates`](https://stripe.com/docs/api/invoices/create#create_invoice-default_tax_rates) for any Invoices issued by the Subscription during this Phase. - """ - description: NotRequired["Literal['']|str"] - """ - Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. - """ - discounts: NotRequired[ - "Literal['']|List[Invoice.CreatePreviewParamsScheduleDetailsPhaseDiscount]" - ] - """ - The coupons to redeem into discounts for the schedule phase. If not specified, inherits the discount from the subscription's customer. Pass an empty string to avoid inheriting any discounts. - """ - duration: NotRequired[ - "Invoice.CreatePreviewParamsScheduleDetailsPhaseDuration" - ] - """ - The number of intervals the phase should last. If set, `end_date` must not be set. - """ - end_date: NotRequired["int|Literal['now']"] - """ - The date at which this phase of the subscription schedule ends. If set, `iterations` must not be set. - """ - invoice_settings: NotRequired[ - "Invoice.CreatePreviewParamsScheduleDetailsPhaseInvoiceSettings" - ] - """ - All invoices will be billed using the specified settings. - """ - items: List["Invoice.CreatePreviewParamsScheduleDetailsPhaseItem"] - """ - List of configuration items, each with an attached price, to apply during this phase of the subscription schedule. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a phase. Metadata on a schedule's phase will update the underlying subscription's `metadata` when the phase is entered, adding new keys and replacing existing keys in the subscription's `metadata`. Individual keys in the subscription's `metadata` can be unset by posting an empty value to them in the phase's `metadata`. To unset all keys in the subscription's `metadata`, update the subscription directly or unset every key individually from the phase's `metadata`. - """ - on_behalf_of: NotRequired[str] - """ - The account on behalf of which to charge, for each of the associated subscription's invoices. - """ - pause_collection: NotRequired[ - "Invoice.CreatePreviewParamsScheduleDetailsPhasePauseCollection" - ] - """ - If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment). - """ - proration_behavior: NotRequired[ - Literal["always_invoice", "create_prorations", "none"] - ] - """ - Controls whether the subscription schedule should create [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when transitioning to this phase if there is a difference in billing configuration. It's different from the request-level [proration_behavior](https://stripe.com/docs/api/subscription_schedules/update#update_subscription_schedule-proration_behavior) parameter which controls what happens if the update request affects the billing configuration (item price, quantity, etc.) of the current phase. - """ - start_date: NotRequired["int|Literal['now']"] - """ - The date at which this phase of the subscription schedule starts or `now`. Must be set on the first phase. - """ - transfer_data: NotRequired[ - "Invoice.CreatePreviewParamsScheduleDetailsPhaseTransferData" - ] - """ - The data with which to automatically create a Transfer for each of the associated subscription's invoices. - """ - trial: NotRequired[bool] - """ - If set to true the entire phase is counted as a trial and the customer will not be charged for any fees. - """ - trial_continuation: NotRequired[Literal["continue", "none"]] - """ - Specify trial behavior when crossing phase boundaries - """ - trial_end: NotRequired["int|Literal['now']"] - """ - Sets the phase to trialing from the start date to this date. Must be before the phase end date, can not be combined with `trial` - """ - trial_settings: NotRequired[ - "Invoice.CreatePreviewParamsScheduleDetailsPhaseTrialSettings" - ] - """ - Settings related to subscription trials. - """ - - class CreatePreviewParamsScheduleDetailsPhaseAddInvoiceItem(TypedDict): - discounts: NotRequired[ - List[ - "Invoice.CreatePreviewParamsScheduleDetailsPhaseAddInvoiceItemDiscount" - ] - ] - """ - The coupons to redeem into discounts for the item. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - period: NotRequired[ - "Invoice.CreatePreviewParamsScheduleDetailsPhaseAddInvoiceItemPeriod" - ] - """ - The period associated with this invoice item. If not set, `period.start.type` defaults to `max_item_period_start` and `period.end.type` defaults to `min_item_period_end`. - """ - price: NotRequired[str] - """ - The ID of the price object. One of `price` or `price_data` is required. - """ - price_data: NotRequired[ - "Invoice.CreatePreviewParamsScheduleDetailsPhaseAddInvoiceItemPriceData" - ] - """ - Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. - """ - quantity: NotRequired[int] - """ - Quantity for this item. Defaults to 1. - """ - tax_rates: NotRequired["Literal['']|List[str]"] - """ - The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item. - """ - - class CreatePreviewParamsScheduleDetailsPhaseAddInvoiceItemDiscount( - TypedDict, - ): - coupon: NotRequired[str] - """ - ID of the coupon to create a new discount for. - """ - discount: NotRequired[str] - """ - ID of an existing discount on the object (or one of its ancestors) to reuse. - """ - discount_end: NotRequired[ - "Invoice.CreatePreviewParamsScheduleDetailsPhaseAddInvoiceItemDiscountDiscountEnd" - ] - """ - Details to determine how long the discount should be applied for. - """ - promotion_code: NotRequired[str] - """ - ID of the promotion code to create a new discount for. - """ - - class CreatePreviewParamsScheduleDetailsPhaseAddInvoiceItemDiscountDiscountEnd( - TypedDict, - ): - duration: NotRequired[ - "Invoice.CreatePreviewParamsScheduleDetailsPhaseAddInvoiceItemDiscountDiscountEndDuration" - ] - """ - Time span for the redeemed discount. - """ - timestamp: NotRequired[int] - """ - A precise Unix timestamp for the discount to end. Must be in the future. - """ - type: Literal["duration", "timestamp"] - """ - The type of calculation made to determine when the discount ends. - """ - - class CreatePreviewParamsScheduleDetailsPhaseAddInvoiceItemDiscountDiscountEndDuration( - TypedDict, - ): - interval: Literal["day", "month", "week", "year"] - """ - Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. - """ - interval_count: int - """ - The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. - """ - - class CreatePreviewParamsScheduleDetailsPhaseAddInvoiceItemPeriod( - TypedDict, - ): - end: "Invoice.CreatePreviewParamsScheduleDetailsPhaseAddInvoiceItemPeriodEnd" - """ - End of the invoice item period. - """ - start: "Invoice.CreatePreviewParamsScheduleDetailsPhaseAddInvoiceItemPeriodStart" - """ - Start of the invoice item period. - """ - - class CreatePreviewParamsScheduleDetailsPhaseAddInvoiceItemPeriodEnd( - TypedDict, - ): - timestamp: NotRequired[int] - """ - A precise Unix timestamp for the end of the invoice item period. Must be greater than or equal to `period.start`. - """ - type: Literal["min_item_period_end", "phase_end", "timestamp"] - """ - Select how to calculate the end of the invoice item period. - """ - - class CreatePreviewParamsScheduleDetailsPhaseAddInvoiceItemPeriodStart( - TypedDict, - ): - timestamp: NotRequired[int] - """ - A precise Unix timestamp for the start of the invoice item period. Must be less than or equal to `period.end`. - """ - type: Literal["max_item_period_start", "phase_start", "timestamp"] - """ - Select how to calculate the start of the invoice item period. - """ - - class CreatePreviewParamsScheduleDetailsPhaseAddInvoiceItemPriceData( - TypedDict, - ): - 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). - """ - product: str - """ - The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to. - """ - tax_behavior: NotRequired[ - Literal["exclusive", "inclusive", "unspecified"] - ] - """ - Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. - """ - unit_amount: NotRequired[int] - """ - A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge or a negative integer representing the amount to credit to the customer. - """ - unit_amount_decimal: NotRequired[str] - """ - Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - """ - - class CreatePreviewParamsScheduleDetailsPhaseAutomaticTax(TypedDict): - enabled: bool - """ - Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription. - """ - liability: NotRequired[ - "Invoice.CreatePreviewParamsScheduleDetailsPhaseAutomaticTaxLiability" - ] - """ - The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. - """ - - class CreatePreviewParamsScheduleDetailsPhaseAutomaticTaxLiability( - TypedDict, - ): - account: NotRequired[str] - """ - The connected account being referenced when `type` is `account`. - """ - type: Literal["account", "self"] - """ - Type of the account referenced in the request. - """ - - class CreatePreviewParamsScheduleDetailsPhaseBillingThresholds(TypedDict): - amount_gte: NotRequired[int] - """ - Monetary threshold that triggers the subscription to advance to a new billing period - """ - reset_billing_cycle_anchor: NotRequired[bool] - """ - Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. - """ - - class CreatePreviewParamsScheduleDetailsPhaseDiscount(TypedDict): - coupon: NotRequired[str] - """ - ID of the coupon to create a new discount for. - """ - discount: NotRequired[str] - """ - ID of an existing discount on the object (or one of its ancestors) to reuse. - """ - discount_end: NotRequired[ - "Invoice.CreatePreviewParamsScheduleDetailsPhaseDiscountDiscountEnd" - ] - """ - Details to determine how long the discount should be applied for. - """ - promotion_code: NotRequired[str] - """ - ID of the promotion code to create a new discount for. - """ - - class CreatePreviewParamsScheduleDetailsPhaseDiscountDiscountEnd( - TypedDict - ): - duration: NotRequired[ - "Invoice.CreatePreviewParamsScheduleDetailsPhaseDiscountDiscountEndDuration" - ] - """ - Time span for the redeemed discount. - """ - timestamp: NotRequired[int] - """ - A precise Unix timestamp for the discount to end. Must be in the future. - """ - type: Literal["duration", "timestamp"] - """ - The type of calculation made to determine when the discount ends. - """ - - class CreatePreviewParamsScheduleDetailsPhaseDiscountDiscountEndDuration( - TypedDict, - ): - interval: Literal["day", "month", "week", "year"] - """ - Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. - """ - interval_count: int - """ - The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. - """ - - class CreatePreviewParamsScheduleDetailsPhaseDuration(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Specifies phase duration. Either `day`, `week`, `month` or `year`. - """ - interval_count: NotRequired[int] - """ - The multiplier applied to the interval. - """ - - class CreatePreviewParamsScheduleDetailsPhaseInvoiceSettings(TypedDict): - account_tax_ids: NotRequired["Literal['']|List[str]"] - """ - The account tax IDs associated with this phase of the subscription schedule. Will be set on invoices generated by this phase of the subscription schedule. - """ - days_until_due: NotRequired[int] - """ - Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `billing=charge_automatically`. - """ - issuer: NotRequired[ - "Invoice.CreatePreviewParamsScheduleDetailsPhaseInvoiceSettingsIssuer" - ] - """ - The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. - """ - - class CreatePreviewParamsScheduleDetailsPhaseInvoiceSettingsIssuer( - TypedDict, - ): - account: NotRequired[str] - """ - The connected account being referenced when `type` is `account`. - """ - type: Literal["account", "self"] - """ - Type of the account referenced in the request. - """ - - class CreatePreviewParamsScheduleDetailsPhaseItem(TypedDict): - billing_thresholds: NotRequired[ - "Literal['']|Invoice.CreatePreviewParamsScheduleDetailsPhaseItemBillingThresholds" - ] - """ - Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. - """ - discounts: NotRequired[ - "Literal['']|List[Invoice.CreatePreviewParamsScheduleDetailsPhaseItemDiscount]" - ] - """ - The coupons to redeem into discounts for the subscription item. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a configuration item. Metadata on a configuration item will update the underlying subscription item's `metadata` when the phase is entered, adding new keys and replacing existing keys. Individual keys in the subscription item's `metadata` can be unset by posting an empty value to them in the configuration item's `metadata`. To unset all keys in the subscription item's `metadata`, update the subscription item directly or unset every key individually from the configuration item's `metadata`. - """ - plan: NotRequired[str] - """ - The plan ID to subscribe to. You may specify the same ID in `plan` and `price`. - """ - price: NotRequired[str] - """ - The ID of the price object. - """ - price_data: NotRequired[ - "Invoice.CreatePreviewParamsScheduleDetailsPhaseItemPriceData" - ] - """ - Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. - """ - quantity: NotRequired[int] - """ - Quantity for the given price. Can be set only if the price's `usage_type` is `licensed` and not `metered`. - """ - tax_rates: NotRequired["Literal['']|List[str]"] - """ - A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. - """ - trial: NotRequired[ - "Invoice.CreatePreviewParamsScheduleDetailsPhaseItemTrial" - ] - """ - Options that configure the trial on the subscription item. - """ - - class CreatePreviewParamsScheduleDetailsPhaseItemBillingThresholds( - TypedDict, - ): - usage_gte: int - """ - Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)) - """ - - class CreatePreviewParamsScheduleDetailsPhaseItemDiscount(TypedDict): - coupon: NotRequired[str] - """ - ID of the coupon to create a new discount for. - """ - discount: NotRequired[str] - """ - ID of an existing discount on the object (or one of its ancestors) to reuse. - """ - discount_end: NotRequired[ - "Invoice.CreatePreviewParamsScheduleDetailsPhaseItemDiscountDiscountEnd" - ] - """ - Details to determine how long the discount should be applied for. - """ - promotion_code: NotRequired[str] - """ - ID of the promotion code to create a new discount for. - """ - - class CreatePreviewParamsScheduleDetailsPhaseItemDiscountDiscountEnd( - TypedDict, - ): - duration: NotRequired[ - "Invoice.CreatePreviewParamsScheduleDetailsPhaseItemDiscountDiscountEndDuration" - ] - """ - Time span for the redeemed discount. - """ - timestamp: NotRequired[int] - """ - A precise Unix timestamp for the discount to end. Must be in the future. - """ - type: Literal["duration", "timestamp"] - """ - The type of calculation made to determine when the discount ends. - """ - - class CreatePreviewParamsScheduleDetailsPhaseItemDiscountDiscountEndDuration( - TypedDict, - ): - interval: Literal["day", "month", "week", "year"] - """ - Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. - """ - interval_count: int - """ - The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. - """ - - class CreatePreviewParamsScheduleDetailsPhaseItemPriceData(TypedDict): - 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). - """ - product: str - """ - The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to. - """ - recurring: "Invoice.CreatePreviewParamsScheduleDetailsPhaseItemPriceDataRecurring" - """ - The recurring components of a price such as `interval` and `interval_count`. - """ - tax_behavior: NotRequired[ - Literal["exclusive", "inclusive", "unspecified"] - ] - """ - Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. - """ - unit_amount: NotRequired[int] - """ - A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. - """ - unit_amount_decimal: NotRequired[str] - """ - Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - """ - - class CreatePreviewParamsScheduleDetailsPhaseItemPriceDataRecurring( - TypedDict, - ): - interval: Literal["day", "month", "week", "year"] - """ - Specifies billing frequency. Either `day`, `week`, `month` or `year`. - """ - interval_count: NotRequired[int] - """ - The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). - """ - - class CreatePreviewParamsScheduleDetailsPhaseItemTrial(TypedDict): - converts_to: NotRequired[List[str]] - """ - List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. - """ - type: Literal["free", "paid"] - """ - Determines the type of trial for this item. - """ - - class CreatePreviewParamsScheduleDetailsPhasePauseCollection(TypedDict): - behavior: Literal["keep_as_draft", "mark_uncollectible", "void"] - """ - The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. - """ - - class CreatePreviewParamsScheduleDetailsPhaseTransferData(TypedDict): - amount_percent: NotRequired[float] - """ - A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. - """ - destination: str - """ - ID of an existing, connected Stripe account. - """ - - class CreatePreviewParamsScheduleDetailsPhaseTrialSettings(TypedDict): - end_behavior: NotRequired[ - "Invoice.CreatePreviewParamsScheduleDetailsPhaseTrialSettingsEndBehavior" - ] - """ - Defines how the subscription should behave when a trial ends. - """ - - class CreatePreviewParamsScheduleDetailsPhaseTrialSettingsEndBehavior( - TypedDict, - ): - prorate_up_front: NotRequired[Literal["defer", "include"]] - """ - Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`. - """ - - class CreatePreviewParamsScheduleDetailsPrebilling(TypedDict): - bill_until: NotRequired[ - "Invoice.CreatePreviewParamsScheduleDetailsPrebillingBillUntil" - ] - """ - The end of the prebilled time period. - """ - iterations: NotRequired[int] - """ - This is used to determine the number of billing cycles to prebill. - """ - - class CreatePreviewParamsScheduleDetailsPrebillingBillUntil(TypedDict): - amendment_end: NotRequired[ - "Invoice.CreatePreviewParamsScheduleDetailsPrebillingBillUntilAmendmentEnd" - ] - """ - End the prebilled period when a specified amendment ends. - """ - duration: NotRequired[ - "Invoice.CreatePreviewParamsScheduleDetailsPrebillingBillUntilDuration" - ] - """ - Time span for prebilling, starting from `bill_from`. - """ - timestamp: NotRequired[int] - """ - End the prebilled period at a precise integer timestamp, starting from the Unix epoch. - """ - type: Literal["amendment_end", "duration", "schedule_end", "timestamp"] - """ - Select one of several ways to pass the `bill_until` value. - """ - - class CreatePreviewParamsScheduleDetailsPrebillingBillUntilAmendmentEnd( - TypedDict, - ): - index: int - """ - The position of the amendment in the `amendments` array at which prebilling should end. Indexes start from 0 and must be less than the total number of supplied amendments. - """ - - class CreatePreviewParamsScheduleDetailsPrebillingBillUntilDuration( - TypedDict, - ): - interval: Literal["day", "month", "week", "year"] - """ - Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. - """ - interval_count: int - """ - The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. - """ - - class CreatePreviewParamsSubscriptionDetails(TypedDict): - billing_cycle_anchor: NotRequired["Literal['now', 'unchanged']|int"] - """ - For new subscriptions, a future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. For existing subscriptions, the value can only be set to `now` or `unchanged`. - """ - billing_mode: NotRequired[ - "Invoice.CreatePreviewParamsSubscriptionDetailsBillingMode" - ] - """ - Controls how prorations and invoices for subscriptions are calculated and orchestrated. - """ - billing_schedules: NotRequired[ - "Literal['']|List[Invoice.CreatePreviewParamsSubscriptionDetailsBillingSchedule]" - ] - """ - Sets the billing schedules for the subscription. - """ - cancel_at: NotRequired[ - "Literal['']|int|Literal['max_period_end', 'min_period_end']" - ] - """ - A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period. - """ - cancel_at_period_end: NotRequired[bool] - """ - Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. - """ - cancel_now: NotRequired[bool] - """ - This simulates the subscription being canceled or expired immediately. - """ - default_tax_rates: NotRequired["Literal['']|List[str]"] - """ - If provided, the invoice returned will preview updating or creating a subscription with these default tax rates. The default tax rates will apply to any line item that does not have `tax_rates` set. - """ - items: NotRequired[ - List["Invoice.CreatePreviewParamsSubscriptionDetailsItem"] - ] - """ - A list of up to 20 subscription items, each with an attached price. - """ - prebilling: NotRequired[ - "Invoice.CreatePreviewParamsSubscriptionDetailsPrebilling" - ] - """ - The pre-billing to apply to the subscription as a preview. - """ - proration_behavior: NotRequired[ - Literal["always_invoice", "create_prorations", "none"] - ] - """ - Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`. - """ - proration_date: NotRequired[int] - """ - If previewing an update to a subscription, and doing proration, `subscription_details.proration_date` forces the proration to be calculated as though the update was done at the specified time. The time given must be within the current subscription period and within the current phase of the schedule backing this subscription, if the schedule exists. If set, `subscription`, and one of `subscription_details.items`, or `subscription_details.trial_end` are required. Also, `subscription_details.proration_behavior` cannot be set to 'none'. - """ - resume_at: NotRequired[Literal["now"]] - """ - For paused subscriptions, setting `subscription_details.resume_at` to `now` will preview the invoice that will be generated if the subscription is resumed. - """ - start_date: NotRequired[int] - """ - Date a subscription is intended to start (can be future or past). - """ - trial_end: NotRequired["Literal['now']|int"] - """ - If provided, the invoice returned will preview updating or creating a subscription with that trial end. If set, one of `subscription_details.items` or `subscription` is required. - """ - - class CreatePreviewParamsSubscriptionDetailsBillingMode(TypedDict): - flexible: NotRequired[ - "Invoice.CreatePreviewParamsSubscriptionDetailsBillingModeFlexible" - ] - """ - Configure behavior for flexible billing mode. - """ - type: Literal["classic", "flexible"] - """ - Controls the calculation and orchestration of prorations and invoices for subscriptions. If no value is passed, the default is `flexible`. - """ - - class CreatePreviewParamsSubscriptionDetailsBillingModeFlexible(TypedDict): - proration_discounts: NotRequired[Literal["included", "itemized"]] - """ - Controls how invoices and invoice items display proration amounts and discount amounts. - """ - - class CreatePreviewParamsSubscriptionDetailsBillingSchedule(TypedDict): - applies_to: NotRequired[ - List[ - "Invoice.CreatePreviewParamsSubscriptionDetailsBillingScheduleAppliesTo" - ] - ] - """ - Configure billing schedule differently for individual subscription items. - """ - bill_until: NotRequired[ - "Invoice.CreatePreviewParamsSubscriptionDetailsBillingScheduleBillUntil" - ] - """ - The end date for the billing schedule. - """ - key: NotRequired[str] - """ - Specify a key for the billing schedule. Must be unique to this field, alphanumeric, and up to 200 characters. If not provided, a unique key will be generated. - """ - - class CreatePreviewParamsSubscriptionDetailsBillingScheduleAppliesTo( - TypedDict, - ): - price: NotRequired[str] - """ - The ID of the price object. - """ - type: Literal["price"] - """ - Controls which subscription items the billing schedule applies to. - """ - - class CreatePreviewParamsSubscriptionDetailsBillingScheduleBillUntil( - TypedDict, - ): - duration: NotRequired[ - "Invoice.CreatePreviewParamsSubscriptionDetailsBillingScheduleBillUntilDuration" - ] - """ - Specifies the billing period. - """ - timestamp: NotRequired[int] - """ - The end date of the billing schedule. - """ - type: Literal["duration", "timestamp"] - """ - Describes how the billing schedule will determine the end date. Either `duration` or `timestamp`. - """ - - class CreatePreviewParamsSubscriptionDetailsBillingScheduleBillUntilDuration( - TypedDict, - ): - interval: Literal["day", "month", "week", "year"] - """ - Specifies billing duration. Either `day`, `week`, `month` or `year`. - """ - interval_count: NotRequired[int] - """ - The multiplier applied to the interval. - """ - - class CreatePreviewParamsSubscriptionDetailsItem(TypedDict): - billing_thresholds: NotRequired[ - "Literal['']|Invoice.CreatePreviewParamsSubscriptionDetailsItemBillingThresholds" - ] - """ - Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. - """ - clear_usage: NotRequired[bool] - """ - Delete all usage for a given subscription item. You must pass this when deleting a usage records subscription item. `clear_usage` has no effect if the plan has a billing meter attached. - """ - deleted: NotRequired[bool] - """ - A flag that, if set to `true`, will delete the specified item. - """ - discounts: NotRequired[ - "Literal['']|List[Invoice.CreatePreviewParamsSubscriptionDetailsItemDiscount]" - ] - """ - The coupons to redeem into discounts for the subscription item. - """ - id: NotRequired[str] - """ - Subscription item to update. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - plan: NotRequired[str] - """ - Plan ID for this item, as a string. - """ - price: NotRequired[str] - """ - The ID of the price object. One of `price` or `price_data` is required. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided. - """ - price_data: NotRequired[ - "Invoice.CreatePreviewParamsSubscriptionDetailsItemPriceData" - ] - """ - Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. - """ - quantity: NotRequired[int] - """ - Quantity for this item. - """ - tax_rates: NotRequired["Literal['']|List[str]"] - """ - A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. - """ - - class CreatePreviewParamsSubscriptionDetailsItemBillingThresholds( - TypedDict, - ): - usage_gte: int - """ - Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)) - """ - - class CreatePreviewParamsSubscriptionDetailsItemDiscount(TypedDict): - coupon: NotRequired[str] - """ - ID of the coupon to create a new discount for. - """ - discount: NotRequired[str] - """ - ID of an existing discount on the object (or one of its ancestors) to reuse. - """ - discount_end: NotRequired[ - "Invoice.CreatePreviewParamsSubscriptionDetailsItemDiscountDiscountEnd" - ] - """ - Details to determine how long the discount should be applied for. - """ - promotion_code: NotRequired[str] - """ - ID of the promotion code to create a new discount for. - """ - - class CreatePreviewParamsSubscriptionDetailsItemDiscountDiscountEnd( - TypedDict, - ): - duration: NotRequired[ - "Invoice.CreatePreviewParamsSubscriptionDetailsItemDiscountDiscountEndDuration" - ] - """ - Time span for the redeemed discount. - """ - timestamp: NotRequired[int] - """ - A precise Unix timestamp for the discount to end. Must be in the future. - """ - type: Literal["duration", "timestamp"] - """ - The type of calculation made to determine when the discount ends. - """ - - class CreatePreviewParamsSubscriptionDetailsItemDiscountDiscountEndDuration( - TypedDict, - ): - interval: Literal["day", "month", "week", "year"] - """ - Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. - """ - interval_count: int - """ - The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. - """ - - class CreatePreviewParamsSubscriptionDetailsItemPriceData(TypedDict): - 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). - """ - product: str - """ - The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to. - """ - recurring: "Invoice.CreatePreviewParamsSubscriptionDetailsItemPriceDataRecurring" - """ - The recurring components of a price such as `interval` and `interval_count`. - """ - tax_behavior: NotRequired[ - Literal["exclusive", "inclusive", "unspecified"] - ] - """ - Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. - """ - unit_amount: NotRequired[int] - """ - A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. - """ - unit_amount_decimal: NotRequired[str] - """ - Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - """ - - class CreatePreviewParamsSubscriptionDetailsItemPriceDataRecurring( - TypedDict, - ): - interval: Literal["day", "month", "week", "year"] - """ - Specifies billing frequency. Either `day`, `week`, `month` or `year`. - """ - interval_count: NotRequired[int] - """ - The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). - """ - - class CreatePreviewParamsSubscriptionDetailsPrebilling(TypedDict): - iterations: int - """ - This is used to determine the number of billing cycles to prebill. - """ - - class DeleteParams(RequestOptions): - pass - - class FinalizeInvoiceParams(RequestOptions): - auto_advance: NotRequired[bool] - """ - Controls whether Stripe performs [automatic collection](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection) of the invoice. If `false`, the invoice's state doesn't automatically advance without an explicit action. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class ListLinesParams(RequestOptions): - 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 ListParams(RequestOptions): - billing_cadence: NotRequired[str] - """ - Only return invoices for the cadence specified by this billing cadence ID. - """ - collection_method: NotRequired[ - Literal["charge_automatically", "send_invoice"] - ] - """ - The collection method of the invoice to retrieve. Either `charge_automatically` or `send_invoice`. - """ - created: NotRequired["Invoice.ListParamsCreated|int"] - """ - Only return invoices that were created during the given date interval. - """ - customer: NotRequired[str] - """ - Only return invoices for the customer specified by this customer ID. - """ - customer_account: NotRequired[str] - """ - Only return invoices for the account specified by this account ID. - """ - due_date: NotRequired["Invoice.ListParamsDueDate|int"] - 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. - """ - status: NotRequired[ - Literal["draft", "open", "paid", "uncollectible", "void"] - ] - """ - The status of the invoice, one of `draft`, `open`, `paid`, `uncollectible`, or `void`. [Learn more](https://stripe.com/docs/billing/invoices/workflow#workflow-overview) - """ - subscription: NotRequired[str] - """ - Only return invoices for the subscription specified by this subscription ID. - """ - - class ListParamsCreated(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) - """ - - class ListParamsDueDate(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) - """ - - class MarkUncollectibleParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class ModifyParams(RequestOptions): - account_tax_ids: NotRequired["Literal['']|List[str]"] - """ - The account tax IDs associated with the invoice. Only editable when the invoice is a draft. - """ - amounts_due: NotRequired[ - "Literal['']|List[Invoice.ModifyParamsAmountsDue]" - ] - """ - List of expected payments and corresponding due dates. Valid only for invoices where `collection_method=send_invoice`. - """ - application_fee_amount: NotRequired[int] - """ - A fee in cents (or local equivalent) that will be applied to the invoice and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/billing/invoices/connect#collecting-fees). - """ - auto_advance: NotRequired[bool] - """ - Controls whether Stripe performs [automatic collection](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection) of the invoice. - """ - automatic_tax: NotRequired["Invoice.ModifyParamsAutomaticTax"] - """ - Settings for automatic tax lookup for this invoice. - """ - automatically_finalizes_at: NotRequired[int] - """ - The time when this invoice should be scheduled to finalize (up to 5 years in the future). The invoice is finalized at this time if it's still in draft state. To turn off automatic finalization, set `auto_advance` to false. - """ - collection_method: NotRequired[ - Literal["charge_automatically", "send_invoice"] - ] - """ - Either `charge_automatically` or `send_invoice`. This field can be updated only on `draft` invoices. - """ - custom_fields: NotRequired[ - "Literal['']|List[Invoice.ModifyParamsCustomField]" - ] - """ - A list of up to 4 custom fields to be displayed on the invoice. If a value for `custom_fields` is specified, the list specified will replace the existing custom field list on this invoice. Pass an empty string to remove previously-defined fields. - """ - days_until_due: NotRequired[int] - """ - The number of days from which the invoice is created until it is due. Only valid for invoices where `collection_method=send_invoice`. This field can only be updated on `draft` invoices. - """ - default_margins: NotRequired["Literal['']|List[str]"] - """ - The ids of the margins to apply to the invoice. Can be overridden by line item `margins`. - """ - default_payment_method: NotRequired[str] - """ - ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings. - """ - default_source: NotRequired["Literal['']|str"] - """ - ID of the default payment source for the invoice. It must belong to the customer associated with the invoice and be in a chargeable state. If not set, defaults to the subscription's default source, if any, or to the customer's default source. - """ - default_tax_rates: NotRequired["Literal['']|List[str]"] - """ - The tax rates that will apply to any line item that does not have `tax_rates` set. Pass an empty string to remove previously-defined tax rates. - """ - description: NotRequired[str] - """ - An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard. - """ - discounts: NotRequired[ - "Literal['']|List[Invoice.ModifyParamsDiscount]" - ] - """ - The discounts that will apply to the invoice. Pass an empty string to remove previously-defined discounts. - """ - due_date: NotRequired[int] - """ - The date on which payment for this invoice is due. Only valid for invoices where `collection_method=send_invoice`. This field can only be updated on `draft` invoices. - """ - effective_at: NotRequired["Literal['']|int"] - """ - The date when this invoice is in effect. Same as `finalized_at` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the invoice PDF and receipt. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - footer: NotRequired[str] - """ - Footer to be displayed on the invoice. - """ - issuer: NotRequired["Invoice.ModifyParamsIssuer"] - """ - The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - number: NotRequired["Literal['']|str"] - """ - Set the number for this invoice. If no number is present then a number will be assigned automatically when the invoice is finalized. In many markets, regulations require invoices to be unique, sequential and / or gapless. You are responsible for ensuring this is true across all your different invoicing systems in the event that you edit the invoice number using our API. If you use only Stripe for your invoices and do not change invoice numbers, Stripe handles this aspect of compliance for you automatically. - """ - on_behalf_of: NotRequired["Literal['']|str"] - """ - The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the [Invoices with Connect](https://stripe.com/docs/billing/invoices/connect) documentation for details. - """ - payment_settings: NotRequired["Invoice.ModifyParamsPaymentSettings"] - """ - Configuration settings for the PaymentIntent that is generated when the invoice is finalized. - """ - rendering: NotRequired["Invoice.ModifyParamsRendering"] - """ - The rendering-related settings that control how the invoice is displayed on customer-facing surfaces such as PDF and Hosted Invoice Page. - """ - shipping_cost: NotRequired[ - "Literal['']|Invoice.ModifyParamsShippingCost" - ] - """ - Settings for the cost of shipping for this invoice. - """ - shipping_details: NotRequired[ - "Literal['']|Invoice.ModifyParamsShippingDetails" - ] - """ - Shipping details for the invoice. The Invoice PDF will use the `shipping_details` value if it is set, otherwise the PDF will render the shipping address from the customer. - """ - statement_descriptor: NotRequired[str] - """ - Extra information about a charge for the customer's credit card statement. It must contain at least one letter. If not specified and this invoice is part of a subscription, the default `statement_descriptor` will be set to the first subscription item's product's `statement_descriptor`. - """ - transfer_data: NotRequired[ - "Literal['']|Invoice.ModifyParamsTransferData" - ] - """ - If specified, the funds from the invoice will be transferred to the destination and the ID of the resulting transfer will be found on the invoice's charge. This will be unset if you POST an empty value. - """ - - class ModifyParamsAmountsDue(TypedDict): - amount: int - """ - The amount in cents (or local equivalent). - """ - days_until_due: NotRequired[int] - """ - Number of days from when invoice is finalized until the payment is due. - """ - description: str - """ - An arbitrary string attached to the object. Often useful for displaying to users. - """ - due_date: NotRequired[int] - """ - Date on which a payment plan's payment is due. - """ - - class ModifyParamsAutomaticTax(TypedDict): - enabled: bool - """ - Whether Stripe automatically computes tax on this invoice. Note that incompatible invoice items (invoice items with manually specified [tax rates](https://stripe.com/docs/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices. - """ - liability: NotRequired["Invoice.ModifyParamsAutomaticTaxLiability"] - """ - The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. - """ - - class ModifyParamsAutomaticTaxLiability(TypedDict): - account: NotRequired[str] - """ - The connected account being referenced when `type` is `account`. - """ - type: Literal["account", "self"] - """ - Type of the account referenced in the request. - """ - - class ModifyParamsCustomField(TypedDict): - name: str - """ - The name of the custom field. This may be up to 40 characters. - """ - value: str - """ - The value of the custom field. This may be up to 140 characters. - """ - - class ModifyParamsDiscount(TypedDict): - coupon: NotRequired[str] - """ - ID of the coupon to create a new discount for. - """ - discount: NotRequired[str] - """ - ID of an existing discount on the object (or one of its ancestors) to reuse. - """ - discount_end: NotRequired["Invoice.ModifyParamsDiscountDiscountEnd"] - """ - Details to determine how long the discount should be applied for. - """ - promotion_code: NotRequired[str] - """ - ID of the promotion code to create a new discount for. - """ - - class ModifyParamsDiscountDiscountEnd(TypedDict): - duration: NotRequired[ - "Invoice.ModifyParamsDiscountDiscountEndDuration" - ] - """ - Time span for the redeemed discount. - """ - timestamp: NotRequired[int] - """ - A precise Unix timestamp for the discount to end. Must be in the future. - """ - type: Literal["duration", "timestamp"] - """ - The type of calculation made to determine when the discount ends. - """ - - class ModifyParamsDiscountDiscountEndDuration(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. - """ - interval_count: int - """ - The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. - """ - - class ModifyParamsIssuer(TypedDict): - account: NotRequired[str] - """ - The connected account being referenced when `type` is `account`. - """ - type: Literal["account", "self"] - """ - Type of the account referenced in the request. - """ - - class ModifyParamsPaymentSettings(TypedDict): - default_mandate: NotRequired["Literal['']|str"] - """ - ID of the mandate to be used for this invoice. It must correspond to the payment method used to pay the invoice, including the invoice's default_payment_method or default_source, if set. - """ - payment_method_options: NotRequired[ - "Invoice.ModifyParamsPaymentSettingsPaymentMethodOptions" - ] - """ - Payment-method-specific configuration to provide to the invoice's PaymentIntent. - """ - payment_method_types: NotRequired[ - "Literal['']|List[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'affirm', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'boleto', 'card', 'cashapp', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'id_bank_transfer', 'ideal', 'jp_credit_transfer', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'multibanco', 'naver_pay', 'nz_bank_account', 'p24', 'payco', 'paynow', 'paypal', 'pix', 'promptpay', 'revolut_pay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'stripe_balance', 'swish', 'upi', 'us_bank_account', 'wechat_pay']]" - ] - """ - The list of payment method types (e.g. card) to provide to the invoice's PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice's default payment method, the subscription's default payment method, the customer's default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). - """ - - class ModifyParamsPaymentSettingsPaymentMethodOptions(TypedDict): - acss_debit: NotRequired[ - "Literal['']|Invoice.ModifyParamsPaymentSettingsPaymentMethodOptionsAcssDebit" - ] - """ - If paying by `acss_debit`, this sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice's PaymentIntent. - """ - bancontact: NotRequired[ - "Literal['']|Invoice.ModifyParamsPaymentSettingsPaymentMethodOptionsBancontact" - ] - """ - If paying by `bancontact`, this sub-hash contains details about the Bancontact payment method options to pass to the invoice's PaymentIntent. - """ - card: NotRequired[ - "Literal['']|Invoice.ModifyParamsPaymentSettingsPaymentMethodOptionsCard" - ] - """ - If paying by `card`, this sub-hash contains details about the Card payment method options to pass to the invoice's PaymentIntent. - """ - customer_balance: NotRequired[ - "Literal['']|Invoice.ModifyParamsPaymentSettingsPaymentMethodOptionsCustomerBalance" - ] - """ - If paying by `customer_balance`, this sub-hash contains details about the Bank transfer payment method options to pass to the invoice's PaymentIntent. - """ - id_bank_transfer: NotRequired[ - "Literal['']|Invoice.ModifyParamsPaymentSettingsPaymentMethodOptionsIdBankTransfer" - ] - """ - If paying by `id_bank_transfer`, this sub-hash contains details about the Indonesia bank transfer payment method options to pass to the invoice's PaymentIntent. - """ - konbini: NotRequired[ - "Literal['']|Invoice.ModifyParamsPaymentSettingsPaymentMethodOptionsKonbini" - ] - """ - If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice's PaymentIntent. - """ - pix: NotRequired[ - "Literal['']|Invoice.ModifyParamsPaymentSettingsPaymentMethodOptionsPix" - ] - """ - If paying by `pix`, this sub-hash contains details about the Pix payment method options to pass to the invoice's PaymentIntent. - """ - sepa_debit: NotRequired[ - "Literal['']|Invoice.ModifyParamsPaymentSettingsPaymentMethodOptionsSepaDebit" - ] - """ - If paying by `sepa_debit`, this sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice's PaymentIntent. - """ - upi: NotRequired[ - "Literal['']|Invoice.ModifyParamsPaymentSettingsPaymentMethodOptionsUpi" - ] - """ - If paying by `upi`, this sub-hash contains details about the UPI payment method options to pass to the invoice's PaymentIntent. - """ - us_bank_account: NotRequired[ - "Literal['']|Invoice.ModifyParamsPaymentSettingsPaymentMethodOptionsUsBankAccount" - ] - """ - If paying by `us_bank_account`, this sub-hash contains details about the ACH direct debit payment method options to pass to the invoice's PaymentIntent. - """ - - class ModifyParamsPaymentSettingsPaymentMethodOptionsAcssDebit(TypedDict): - mandate_options: NotRequired[ - "Invoice.ModifyParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions" - ] - """ - Additional fields for Mandate creation - """ - verification_method: NotRequired[ - Literal["automatic", "instant", "microdeposits"] - ] - """ - Verification method for the intent - """ - - class ModifyParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions( - TypedDict, - ): - transaction_type: NotRequired[Literal["business", "personal"]] - """ - Transaction type of the mandate. - """ - - class ModifyParamsPaymentSettingsPaymentMethodOptionsBancontact(TypedDict): - preferred_language: NotRequired[Literal["de", "en", "fr", "nl"]] - """ - Preferred language of the Bancontact authorization page that the customer is redirected to. - """ - - class ModifyParamsPaymentSettingsPaymentMethodOptionsCard(TypedDict): - installments: NotRequired[ - "Invoice.ModifyParamsPaymentSettingsPaymentMethodOptionsCardInstallments" - ] - """ - Installment configuration for payments attempted on this invoice. - - For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments). - """ - request_three_d_secure: NotRequired[ - Literal["any", "automatic", "challenge"] - ] - """ - We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. - """ - - class ModifyParamsPaymentSettingsPaymentMethodOptionsCardInstallments( - TypedDict, - ): - enabled: NotRequired[bool] - """ - Setting to true enables installments for this invoice. - Setting to false will prevent any selected plan from applying to a payment. - """ - plan: NotRequired[ - "Literal['']|Invoice.ModifyParamsPaymentSettingsPaymentMethodOptionsCardInstallmentsPlan" - ] - """ - The selected installment plan to use for this invoice. - """ - - class ModifyParamsPaymentSettingsPaymentMethodOptionsCardInstallmentsPlan( - TypedDict, - ): - count: NotRequired[int] - """ - For `fixed_count` installment plans, this is required. It represents the number of installment payments your customer will make to their credit card. - """ - interval: NotRequired[Literal["month"]] - """ - For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card. - One of `month`. - """ - type: Literal["bonus", "fixed_count", "revolving"] - """ - Type of installment plan, one of `fixed_count`, `bonus`, or `revolving`. - """ - - class ModifyParamsPaymentSettingsPaymentMethodOptionsCustomerBalance( - TypedDict, - ): - bank_transfer: NotRequired[ - "Invoice.ModifyParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransfer" - ] - """ - Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. - """ - funding_type: NotRequired[str] - """ - The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. - """ - - class ModifyParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransfer( - TypedDict, - ): - eu_bank_transfer: NotRequired[ - "Invoice.ModifyParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer" - ] - """ - Configuration for eu_bank_transfer funding type. - """ - type: NotRequired[str] - """ - The bank transfer type that can be used for funding. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. - """ - - class ModifyParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer( - TypedDict, - ): - country: str - """ - The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. - """ - - class ModifyParamsPaymentSettingsPaymentMethodOptionsIdBankTransfer( - TypedDict, - ): - pass - - class ModifyParamsPaymentSettingsPaymentMethodOptionsKonbini(TypedDict): - pass - - class ModifyParamsPaymentSettingsPaymentMethodOptionsPix(TypedDict): - amount_includes_iof: NotRequired[Literal["always", "never"]] - """ - Determines if the amount includes the IOF tax. Defaults to `never`. - """ - - class ModifyParamsPaymentSettingsPaymentMethodOptionsSepaDebit(TypedDict): - pass - - class ModifyParamsPaymentSettingsPaymentMethodOptionsUpi(TypedDict): - mandate_options: NotRequired[ - "Invoice.ModifyParamsPaymentSettingsPaymentMethodOptionsUpiMandateOptions" - ] - """ - Configuration options for setting up an eMandate - """ - - class ModifyParamsPaymentSettingsPaymentMethodOptionsUpiMandateOptions( - TypedDict, - ): - amount: NotRequired[int] - """ - Amount to be charged for future payments. - """ - amount_type: NotRequired[Literal["fixed", "maximum"]] - """ - One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. - """ - description: NotRequired[str] - """ - A description of the mandate or subscription that is meant to be displayed to the customer. - """ - end_date: NotRequired[int] - """ - End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. - """ - - class ModifyParamsPaymentSettingsPaymentMethodOptionsUsBankAccount( - TypedDict, - ): - financial_connections: NotRequired[ - "Invoice.ModifyParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections" - ] - """ - Additional fields for Financial Connections Session creation - """ - verification_method: NotRequired[ - Literal["automatic", "instant", "microdeposits"] - ] - """ - Verification method for the intent - """ - - class ModifyParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections( - TypedDict, - ): - filters: NotRequired[ - "Invoice.ModifyParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters" - ] - """ - Provide filters for the linked accounts that the customer can select for the payment method. - """ - permissions: NotRequired[ - List[ - Literal[ - "balances", "ownership", "payment_method", "transactions" - ] - ] - ] - """ - The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. - """ - prefetch: NotRequired[ - List[ - Literal[ - "balances", - "inferred_balances", - "ownership", - "transactions", - ] - ] - ] - """ - List of data features that you would like to retrieve upon account creation. - """ - - class ModifyParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters( - TypedDict, - ): - account_subcategories: NotRequired[ - List[Literal["checking", "savings"]] - ] - """ - The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`. - """ - institution: NotRequired[str] - """ - ID of the institution to use to filter for selectable accounts. - """ - - class ModifyParamsRendering(TypedDict): - amount_tax_display: NotRequired[ - "Literal['']|Literal['exclude_tax', 'include_inclusive_tax']" - ] - """ - How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One of `exclude_tax` or `include_inclusive_tax`. `include_inclusive_tax` will include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. `exclude_tax` will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts. - """ - pdf: NotRequired["Invoice.ModifyParamsRenderingPdf"] - """ - Invoice pdf rendering options - """ - template: NotRequired[str] - """ - ID of the invoice rendering template to use for this invoice. - """ - template_version: NotRequired["Literal['']|int"] - """ - The specific version of invoice rendering template to use for this invoice. - """ - - class ModifyParamsRenderingPdf(TypedDict): - page_size: NotRequired[Literal["a4", "auto", "letter"]] - """ - Page size for invoice PDF. Can be set to `a4`, `letter`, or `auto`. - If set to `auto`, invoice PDF page size defaults to `a4` for customers with - Japanese locale and `letter` for customers with other locales. - """ - - class ModifyParamsShippingCost(TypedDict): - shipping_rate: NotRequired[str] - """ - The ID of the shipping rate to use for this order. - """ - shipping_rate_data: NotRequired[ - "Invoice.ModifyParamsShippingCostShippingRateData" - ] - """ - Parameters to create a new ad-hoc shipping rate for this order. - """ - - class ModifyParamsShippingCostShippingRateData(TypedDict): - delivery_estimate: NotRequired[ - "Invoice.ModifyParamsShippingCostShippingRateDataDeliveryEstimate" - ] - """ - The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions. - """ - display_name: str - """ - The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions. - """ - fixed_amount: NotRequired[ - "Invoice.ModifyParamsShippingCostShippingRateDataFixedAmount" - ] - """ - Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - tax_behavior: NotRequired[ - Literal["exclusive", "inclusive", "unspecified"] - ] - """ - Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. - """ - tax_code: NotRequired[str] - """ - A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`. - """ - type: NotRequired[Literal["fixed_amount"]] - """ - The type of calculation to use on the shipping rate. - """ - - class ModifyParamsShippingCostShippingRateDataDeliveryEstimate(TypedDict): - maximum: NotRequired[ - "Invoice.ModifyParamsShippingCostShippingRateDataDeliveryEstimateMaximum" - ] - """ - The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite. - """ - minimum: NotRequired[ - "Invoice.ModifyParamsShippingCostShippingRateDataDeliveryEstimateMinimum" - ] - """ - The lower bound of the estimated range. If empty, represents no lower bound. - """ - - class ModifyParamsShippingCostShippingRateDataDeliveryEstimateMaximum( - TypedDict, - ): - unit: Literal["business_day", "day", "hour", "month", "week"] - """ - A unit of time. - """ - value: int - """ - Must be greater than 0. - """ - - class ModifyParamsShippingCostShippingRateDataDeliveryEstimateMinimum( - TypedDict, - ): - unit: Literal["business_day", "day", "hour", "month", "week"] - """ - A unit of time. - """ - value: int - """ - Must be greater than 0. - """ - - class ModifyParamsShippingCostShippingRateDataFixedAmount(TypedDict): - amount: int - """ - A non-negative integer in cents representing how much to charge. - """ - 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). - """ - currency_options: NotRequired[ - Dict[ - str, - "Invoice.ModifyParamsShippingCostShippingRateDataFixedAmountCurrencyOptions", - ] - ] - """ - Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). - """ - - class ModifyParamsShippingCostShippingRateDataFixedAmountCurrencyOptions( - TypedDict, - ): - amount: int - """ - A non-negative integer in cents representing how much to charge. - """ - tax_behavior: NotRequired[ - Literal["exclusive", "inclusive", "unspecified"] - ] - """ - Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. - """ - - class ModifyParamsShippingDetails(TypedDict): - address: "Invoice.ModifyParamsShippingDetailsAddress" - """ - Shipping address - """ - name: str - """ - Recipient name. - """ - phone: NotRequired["Literal['']|str"] - """ - Recipient phone (including extension) - """ - - class ModifyParamsShippingDetailsAddress(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. - """ - - class ModifyParamsTransferData(TypedDict): - amount: NotRequired[int] - """ - The amount that will be transferred automatically when the invoice is paid. If no amount is set, the full amount is transferred. - """ - destination: str - """ - ID of an existing, connected Stripe account. - """ - - class PayParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - forgive: NotRequired[bool] - """ - In cases where the source used to pay the invoice has insufficient funds, passing `forgive=true` controls whether a charge should be attempted for the full amount available on the source, up to the amount to fully pay the invoice. This effectively forgives the difference between the amount available on the source and the amount due. - - Passing `forgive=false` will fail the charge if the source hasn't been pre-funded with the right amount. An example for this case is with ACH Credit Transfers and wires: if the amount wired is less than the amount due by a small amount, you might want to forgive the difference. Defaults to `false`. - """ - mandate: NotRequired["Literal['']|str"] - """ - ID of the mandate to be used for this invoice. It must correspond to the payment method used to pay the invoice, including the payment_method param or the invoice's default_payment_method or default_source, if set. - """ - off_session: NotRequired[bool] - """ - Indicates if a customer is on or off-session while an invoice payment is attempted. Defaults to `true` (off-session). - """ - paid_out_of_band: NotRequired[bool] - """ - Boolean representing whether an invoice is paid outside of Stripe. This will result in no charge being made. Defaults to `false`. - """ - payment_method: NotRequired[str] - """ - A PaymentMethod to be charged. The PaymentMethod must be the ID of a PaymentMethod belonging to the customer associated with the invoice being paid. - """ - source: NotRequired[str] - """ - A payment source to be charged. The source must be the ID of a source belonging to the customer associated with the invoice being paid. - """ - - class RemoveLinesParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - invoice_metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - lines: List["Invoice.RemoveLinesParamsLine"] - """ - The line items to remove. - """ - - class RemoveLinesParamsLine(TypedDict): - behavior: Literal["delete", "unassign"] - """ - Either `delete` or `unassign`. Deleted line items are permanently deleted. Unassigned line items can be reassigned to an invoice. - """ - id: str - """ - ID of an existing line item to remove from this invoice. - """ - - class RetrieveParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class SearchParams(RequestOptions): - 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. - """ - page: NotRequired[str] - """ - A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. - """ - query: str - """ - The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for invoices](https://stripe.com/docs/search#query-fields-for-invoices). - """ - - class SendInvoiceParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class UpdateLinesParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - invoice_metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. For [type=subscription](https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-type) line items, the incoming metadata specified on the request is directly used to set this value, in contrast to [type=invoiceitem](api/invoices/line_item#invoice_line_item_object-type) line items, where any existing metadata on the invoice line is merged with the incoming data. - """ - lines: List["Invoice.UpdateLinesParamsLine"] - """ - The line items to update. - """ - - class UpdateLinesParamsLine(TypedDict): - amount: NotRequired[int] - """ - The integer amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. If you want to apply a credit to the customer's account, pass a negative amount. - """ - description: NotRequired[str] - """ - An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking. - """ - discountable: NotRequired[bool] - """ - Controls whether discounts apply to this line item. Defaults to false for prorations or negative line items, and true for all other line items. Cannot be set to true for prorations. - """ - discounts: NotRequired[ - "Literal['']|List[Invoice.UpdateLinesParamsLineDiscount]" - ] - """ - The coupons, promotion codes & existing discounts which apply to the line item. Item discounts are applied before invoice discounts. Pass an empty string to remove previously-defined discounts. - """ - id: str - """ - ID of an existing line item on the invoice. - """ - margins: NotRequired["Literal['']|List[str]"] - """ - The IDs of the margins to apply to the line item. When set, the `default_margins` on the invoice do not apply to this line item. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. For [type=subscription](https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-type) line items, the incoming metadata specified on the request is directly used to set this value, in contrast to [type=invoiceitem](api/invoices/line_item#invoice_line_item_object-type) line items, where any existing metadata on the invoice line is merged with the incoming data. - """ - period: NotRequired["Invoice.UpdateLinesParamsLinePeriod"] - """ - The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details. - """ - price_data: NotRequired["Invoice.UpdateLinesParamsLinePriceData"] - """ - Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. - """ - pricing: NotRequired["Invoice.UpdateLinesParamsLinePricing"] - """ - The pricing information for the invoice item. - """ - quantity: NotRequired[int] - """ - Non-negative integer. The quantity of units for the line item. - """ - tax_amounts: NotRequired[ - "Literal['']|List[Invoice.UpdateLinesParamsLineTaxAmount]" - ] - """ - A list of up to 10 tax amounts for this line item. This can be useful if you calculate taxes on your own or use a third-party to calculate them. You cannot set tax amounts if any line item has [tax_rates](https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-tax_rates) or if the invoice has [default_tax_rates](https://stripe.com/docs/api/invoices/object#invoice_object-default_tax_rates) or uses [automatic tax](https://stripe.com/docs/tax/invoicing). Pass an empty string to remove previously defined tax amounts. - """ - tax_rates: NotRequired["Literal['']|List[str]"] - """ - The tax rates which apply to the line item. When set, the `default_tax_rates` on the invoice do not apply to this line item. Pass an empty string to remove previously-defined tax rates. - """ - - class UpdateLinesParamsLineDiscount(TypedDict): - coupon: NotRequired[str] - """ - ID of the coupon to create a new discount for. - """ - discount: NotRequired[str] - """ - ID of an existing discount on the object (or one of its ancestors) to reuse. - """ - discount_end: NotRequired[ - "Invoice.UpdateLinesParamsLineDiscountDiscountEnd" - ] - """ - Details to determine how long the discount should be applied for. - """ - promotion_code: NotRequired[str] - """ - ID of the promotion code to create a new discount for. - """ - - class UpdateLinesParamsLineDiscountDiscountEnd(TypedDict): - duration: NotRequired[ - "Invoice.UpdateLinesParamsLineDiscountDiscountEndDuration" - ] - """ - Time span for the redeemed discount. - """ - timestamp: NotRequired[int] - """ - A precise Unix timestamp for the discount to end. Must be in the future. - """ - type: Literal["duration", "timestamp"] - """ - The type of calculation made to determine when the discount ends. - """ - - class UpdateLinesParamsLineDiscountDiscountEndDuration(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. - """ - interval_count: int - """ - The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. - """ - - class UpdateLinesParamsLinePeriod(TypedDict): - end: int - """ - The end of the period, which must be greater than or equal to the start. This value is inclusive. - """ - start: int - """ - The start of the period. This value is inclusive. - """ - - class UpdateLinesParamsLinePriceData(TypedDict): - 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). - """ - product: NotRequired[str] - """ - The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to. One of `product` or `product_data` is required. - """ - product_data: NotRequired[ - "Invoice.UpdateLinesParamsLinePriceDataProductData" - ] - """ - Data used to generate a new [Product](https://docs.stripe.com/api/products) object inline. One of `product` or `product_data` is required. - """ - tax_behavior: NotRequired[ - Literal["exclusive", "inclusive", "unspecified"] - ] - """ - Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. - """ - unit_amount: NotRequired[int] - """ - A non-negative integer in cents (or local equivalent) representing how much to charge. One of `unit_amount` or `unit_amount_decimal` is required. - """ - unit_amount_decimal: NotRequired[str] - """ - Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - """ - - class UpdateLinesParamsLinePriceDataProductData(TypedDict): - description: NotRequired[str] - """ - The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. - """ - images: NotRequired[List[str]] - """ - A list of up to 8 URLs of images for this product, meant to be displayable to the customer. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - name: str - """ - The product's name, meant to be displayable to the customer. - """ - tax_code: NotRequired[str] - """ - A [tax code](https://stripe.com/docs/tax/tax-categories) ID. - """ - unit_label: NotRequired[str] - """ - A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal. - """ - - class UpdateLinesParamsLinePricing(TypedDict): - price: NotRequired[str] - """ - The ID of the price object. - """ - - class UpdateLinesParamsLineTaxAmount(TypedDict): - amount: int - """ - The amount, in cents (or local equivalent), of the tax. - """ - tax_rate_data: "Invoice.UpdateLinesParamsLineTaxAmountTaxRateData" - """ - Data to find or create a TaxRate object. - - Stripe automatically creates or reuses a TaxRate object for each tax amount. If the `tax_rate_data` exactly matches a previous value, Stripe will reuse the TaxRate object. TaxRate objects created automatically by Stripe are immediately archived, do not appear in the line item's `tax_rates`, and cannot be directly added to invoices, payments, or line items. - """ - taxability_reason: NotRequired[ - Literal[ - "customer_exempt", - "not_collecting", - "not_subject_to_tax", - "not_supported", - "portion_product_exempt", - "portion_reduced_rated", - "portion_standard_rated", - "product_exempt", - "product_exempt_holiday", - "proportionally_rated", - "reduced_rated", - "reverse_charge", - "standard_rated", - "taxable_basis_reduced", - "zero_rated", - ] - ] - """ - The reasoning behind this tax, for example, if the product is tax exempt. - """ - taxable_amount: int - """ - The amount on which tax is calculated, in cents (or local equivalent). - """ - - class UpdateLinesParamsLineTaxAmountTaxRateData(TypedDict): - country: NotRequired[str] - """ - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - """ - description: NotRequired[str] - """ - An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers. - """ - display_name: str - """ - The display name of the tax rate, which will be shown to users. - """ - inclusive: bool - """ - This specifies if the tax rate is inclusive or exclusive. - """ - jurisdiction: NotRequired[str] - """ - The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer's invoice. - """ - jurisdiction_level: NotRequired[ - Literal[ - "city", "country", "county", "district", "multiple", "state" - ] - ] - """ - The level of the jurisdiction that imposes this tax rate. - """ - percentage: float - """ - The statutory tax rate percent. This field accepts decimal values between 0 and 100 inclusive with at most 4 decimal places. To accommodate fixed-amount taxes, set the percentage to zero. Stripe will not display zero percentages on the invoice unless the `amount` of the tax is also zero. - """ - state: NotRequired[str] - """ - [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States. - """ - tax_type: NotRequired[ - Literal[ - "amusement_tax", - "communications_tax", - "gst", - "hst", - "igst", - "jct", - "lease_tax", - "pst", - "qst", - "retail_delivery_fee", - "rst", - "sales_tax", - "service_tax", - "vat", - ] - ] - """ - The high-level tax type, such as `vat` or `sales_tax`. - """ - - class VoidInvoiceParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - account_country: Optional[str] - """ - The country of the business associated with this invoice, most often the business creating the invoice. - """ - account_name: Optional[str] - """ - The public name of the business associated with this invoice, most often the business creating the invoice. - """ - account_tax_ids: Optional[List[ExpandableField["TaxId"]]] - """ - The account tax IDs associated with the invoice. Only editable when the invoice is a draft. - """ - amount_due: int - """ - Final amount due at this time for this invoice. If the invoice's total is smaller than the minimum charge amount, for example, or if there is account credit that can be applied to the invoice, the `amount_due` may be 0. If there is a positive `starting_balance` for the invoice (the customer owes money), the `amount_due` will also take that into account. The charge that gets generated for the invoice will be for the amount specified in `amount_due`. - """ - amount_overpaid: int - """ - Amount that was overpaid on the invoice. The amount overpaid is credited to the customer's credit balance. - """ - amount_paid: int - """ - The amount, in cents (or local equivalent), that was paid. - """ - amount_remaining: int - """ - The difference between amount_due and amount_paid, in cents (or local equivalent). - """ - amount_shipping: int - """ - This is the sum of all the shipping amounts. - """ - amounts_due: Optional[List[AmountsDue]] - """ - List of expected payments and corresponding due dates. This value will be null for invoices where collection_method=charge_automatically. - """ - application: Optional[ExpandableField["Application"]] - """ - ID of the Connect Application that created the invoice. - """ - attempt_count: int - """ - Number of payment attempts made for this invoice, from the perspective of the payment retry schedule. Any payment attempt counts as the first attempt, and subsequently only automatic retries increment the attempt count. In other words, manual payment attempts after the first attempt do not affect the retry schedule. If a failure is returned with a non-retryable return code, the invoice can no longer be retried unless a new payment method is obtained. Retries will continue to be scheduled, and attempt_count will continue to increment, but retries will only be executed if a new payment method is obtained. - """ - attempted: bool - """ - Whether an attempt has been made to pay the invoice. An invoice is not attempted until 1 hour after the `invoice.created` webhook, for example, so you might not want to display that invoice as unpaid to your users. - """ - auto_advance: Optional[bool] - """ - Controls whether Stripe performs [automatic collection](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection) of the invoice. If `false`, the invoice's state doesn't automatically advance without an explicit action. - """ - automatic_tax: AutomaticTax - automatically_finalizes_at: Optional[int] - """ - The time when this invoice is currently scheduled to be automatically finalized. The field will be `null` if the invoice is not scheduled to finalize in the future. If the invoice is not in the draft state, this field will always be `null` - see `finalized_at` for the time when an already-finalized invoice was finalized. - """ - billing_reason: Optional[ - Literal[ - "automatic_pending_invoice_item_invoice", - "manual", - "quote_accept", - "subscription", - "subscription_create", - "subscription_cycle", - "subscription_threshold", - "subscription_update", - "upcoming", - ] - ] - """ - Indicates the reason why the invoice was created. - - * `manual`: Unrelated to a subscription, for example, created via the invoice editor. - * `subscription`: No longer in use. Applies to subscriptions from before May 2018 where no distinction was made between updates, cycles, and thresholds. - * `subscription_create`: A new subscription was created. - * `subscription_cycle`: A subscription advanced into a new period. - * `subscription_threshold`: A subscription reached a billing threshold. - * `subscription_update`: A subscription was updated. - * `upcoming`: Reserved for simulated invoices, per the upcoming invoice endpoint. - """ - collection_method: Literal["charge_automatically", "send_invoice"] - """ - Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this invoice using the default source attached to the customer. When sending an invoice, Stripe will email this invoice to the customer with payment instructions. - """ - confirmation_secret: Optional[ConfirmationSecret] - """ - The confirmation secret associated with this invoice. Currently, this contains the client_secret of the PaymentIntent that Stripe creates during invoice finalization. - """ - 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). - """ - custom_fields: Optional[List[CustomField]] - """ - Custom fields displayed on the invoice. - """ - customer: Optional[ExpandableField["Customer"]] - """ - The ID of the customer who will be billed. - """ - customer_account: Optional[str] - """ - The ID of the account who will be billed. - """ - customer_address: Optional[CustomerAddress] - """ - The customer's address. Until the invoice is finalized, this field will equal `customer.address`. Once the invoice is finalized, this field will no longer be updated. - """ - customer_email: Optional[str] - """ - The customer's email. Until the invoice is finalized, this field will equal `customer.email`. Once the invoice is finalized, this field will no longer be updated. - """ - customer_name: Optional[str] - """ - The customer's name. Until the invoice is finalized, this field will equal `customer.name`. Once the invoice is finalized, this field will no longer be updated. - """ - customer_phone: Optional[str] - """ - The customer's phone number. Until the invoice is finalized, this field will equal `customer.phone`. Once the invoice is finalized, this field will no longer be updated. - """ - customer_shipping: Optional[CustomerShipping] - """ - The customer's shipping information. Until the invoice is finalized, this field will equal `customer.shipping`. Once the invoice is finalized, this field will no longer be updated. - """ - customer_tax_exempt: Optional[Literal["exempt", "none", "reverse"]] - """ - The customer's tax exempt status. Until the invoice is finalized, this field will equal `customer.tax_exempt`. Once the invoice is finalized, this field will no longer be updated. - """ - customer_tax_ids: Optional[List[CustomerTaxId]] - """ - The customer's tax IDs. Until the invoice is finalized, this field will contain the same tax IDs as `customer.tax_ids`. Once the invoice is finalized, this field will no longer be updated. - """ - default_margins: Optional[List[ExpandableField["Margin"]]] - """ - The margins applied to the invoice. Can be overridden by line item `margins`. Use `expand[]=default_margins` to expand each margin. - """ - default_payment_method: Optional[ExpandableField["PaymentMethod"]] - """ - ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings. - """ - default_source: Optional[ - ExpandableField[ - Union["Account", "BankAccount", "CardResource", "Source"] + * `manual`: Unrelated to a subscription, for example, created via the invoice editor. + * `subscription`: No longer in use. Applies to subscriptions from before May 2018 where no distinction was made between updates, cycles, and thresholds. + * `subscription_create`: A new subscription was created. + * `subscription_cycle`: A subscription advanced into a new period. + * `subscription_threshold`: A subscription reached a billing threshold. + * `subscription_update`: A subscription was updated. + * `upcoming`: Reserved for simulated invoices, per the upcoming invoice endpoint. + """ + collection_method: Literal["charge_automatically", "send_invoice"] + """ + Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this invoice using the default source attached to the customer. When sending an invoice, Stripe will email this invoice to the customer with payment instructions. + """ + confirmation_secret: Optional[ConfirmationSecret] + """ + The confirmation secret associated with this invoice. Currently, this contains the client_secret of the PaymentIntent that Stripe creates during invoice finalization. + """ + 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). + """ + custom_fields: Optional[List[CustomField]] + """ + Custom fields displayed on the invoice. + """ + customer: Optional[ExpandableField["Customer"]] + """ + The ID of the customer who will be billed. + """ + customer_account: Optional[str] + """ + The ID of the account who will be billed. + """ + customer_address: Optional[CustomerAddress] + """ + The customer's address. Until the invoice is finalized, this field will equal `customer.address`. Once the invoice is finalized, this field will no longer be updated. + """ + customer_email: Optional[str] + """ + The customer's email. Until the invoice is finalized, this field will equal `customer.email`. Once the invoice is finalized, this field will no longer be updated. + """ + customer_name: Optional[str] + """ + The customer's name. Until the invoice is finalized, this field will equal `customer.name`. Once the invoice is finalized, this field will no longer be updated. + """ + customer_phone: Optional[str] + """ + The customer's phone number. Until the invoice is finalized, this field will equal `customer.phone`. Once the invoice is finalized, this field will no longer be updated. + """ + customer_shipping: Optional[CustomerShipping] + """ + The customer's shipping information. Until the invoice is finalized, this field will equal `customer.shipping`. Once the invoice is finalized, this field will no longer be updated. + """ + customer_tax_exempt: Optional[Literal["exempt", "none", "reverse"]] + """ + The customer's tax exempt status. Until the invoice is finalized, this field will equal `customer.tax_exempt`. Once the invoice is finalized, this field will no longer be updated. + """ + customer_tax_ids: Optional[List[CustomerTaxId]] + """ + The customer's tax IDs. Until the invoice is finalized, this field will contain the same tax IDs as `customer.tax_ids`. Once the invoice is finalized, this field will no longer be updated. + """ + default_margins: Optional[List[ExpandableField["Margin"]]] + """ + The margins applied to the invoice. Can be overridden by line item `margins`. Use `expand[]=default_margins` to expand each margin. + """ + default_payment_method: Optional[ExpandableField["PaymentMethod"]] + """ + ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings. + """ + default_source: Optional[ + ExpandableField[ + Union["Account", "BankAccount", "CardResource", "Source"] ] ] """ @@ -5895,7 +1519,7 @@ class VoidInvoiceParams(RequestOptions): """ The URL for the hosted invoice page, which allows customers to view and pay an invoice. If the invoice has not been finalized yet, this will be null. """ - id: Optional[str] + id: str """ Unique identifier for the object. For preview invoices created using the [create preview](https://stripe.com/docs/api/invoices/create_preview) endpoint, this id will be prefixed with `upcoming_in`. """ @@ -6038,7 +1662,7 @@ class VoidInvoiceParams(RequestOptions): @classmethod def _cls_add_lines( - cls, invoice: str, **params: Unpack["Invoice.AddLinesParams"] + cls, invoice: str, **params: Unpack["InvoiceAddLinesParams"] ) -> "Invoice": """ Adds multiple line items to an invoice. This is only possible when an invoice is still a draft. @@ -6057,7 +1681,7 @@ def _cls_add_lines( @overload @staticmethod def add_lines( - invoice: str, **params: Unpack["Invoice.AddLinesParams"] + invoice: str, **params: Unpack["InvoiceAddLinesParams"] ) -> "Invoice": """ Adds multiple line items to an invoice. This is only possible when an invoice is still a draft. @@ -6066,7 +1690,7 @@ def add_lines( @overload def add_lines( - self, **params: Unpack["Invoice.AddLinesParams"] + self, **params: Unpack["InvoiceAddLinesParams"] ) -> "Invoice": """ Adds multiple line items to an invoice. This is only possible when an invoice is still a draft. @@ -6075,7 +1699,7 @@ def add_lines( @class_method_variant("_cls_add_lines") def add_lines( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Invoice.AddLinesParams"] + self, **params: Unpack["InvoiceAddLinesParams"] ) -> "Invoice": """ Adds multiple line items to an invoice. This is only possible when an invoice is still a draft. @@ -6093,7 +1717,7 @@ def add_lines( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_add_lines_async( - cls, invoice: str, **params: Unpack["Invoice.AddLinesParams"] + cls, invoice: str, **params: Unpack["InvoiceAddLinesParams"] ) -> "Invoice": """ Adds multiple line items to an invoice. This is only possible when an invoice is still a draft. @@ -6112,7 +1736,7 @@ async def _cls_add_lines_async( @overload @staticmethod async def add_lines_async( - invoice: str, **params: Unpack["Invoice.AddLinesParams"] + invoice: str, **params: Unpack["InvoiceAddLinesParams"] ) -> "Invoice": """ Adds multiple line items to an invoice. This is only possible when an invoice is still a draft. @@ -6121,7 +1745,7 @@ async def add_lines_async( @overload async def add_lines_async( - self, **params: Unpack["Invoice.AddLinesParams"] + self, **params: Unpack["InvoiceAddLinesParams"] ) -> "Invoice": """ Adds multiple line items to an invoice. This is only possible when an invoice is still a draft. @@ -6130,7 +1754,7 @@ async def add_lines_async( @class_method_variant("_cls_add_lines_async") async def add_lines_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Invoice.AddLinesParams"] + self, **params: Unpack["InvoiceAddLinesParams"] ) -> "Invoice": """ Adds multiple line items to an invoice. This is only possible when an invoice is still a draft. @@ -6148,7 +1772,7 @@ async def add_lines_async( # pyright: ignore[reportGeneralTypeIssues] @classmethod def _cls_attach_payment( - cls, invoice: str, **params: Unpack["Invoice.AttachPaymentParams"] + cls, invoice: str, **params: Unpack["InvoiceAttachPaymentParams"] ) -> "Invoice": """ Attaches a PaymentIntent or an Out of Band Payment to the invoice, adding it to the list of payments. @@ -6176,7 +1800,7 @@ def _cls_attach_payment( @overload @staticmethod def attach_payment( - invoice: str, **params: Unpack["Invoice.AttachPaymentParams"] + invoice: str, **params: Unpack["InvoiceAttachPaymentParams"] ) -> "Invoice": """ Attaches a PaymentIntent or an Out of Band Payment to the invoice, adding it to the list of payments. @@ -6194,7 +1818,7 @@ def attach_payment( @overload def attach_payment( - self, **params: Unpack["Invoice.AttachPaymentParams"] + self, **params: Unpack["InvoiceAttachPaymentParams"] ) -> "Invoice": """ Attaches a PaymentIntent or an Out of Band Payment to the invoice, adding it to the list of payments. @@ -6212,7 +1836,7 @@ def attach_payment( @class_method_variant("_cls_attach_payment") def attach_payment( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Invoice.AttachPaymentParams"] + self, **params: Unpack["InvoiceAttachPaymentParams"] ) -> "Invoice": """ Attaches a PaymentIntent or an Out of Band Payment to the invoice, adding it to the list of payments. @@ -6239,7 +1863,7 @@ def attach_payment( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_attach_payment_async( - cls, invoice: str, **params: Unpack["Invoice.AttachPaymentParams"] + cls, invoice: str, **params: Unpack["InvoiceAttachPaymentParams"] ) -> "Invoice": """ Attaches a PaymentIntent or an Out of Band Payment to the invoice, adding it to the list of payments. @@ -6267,7 +1891,7 @@ async def _cls_attach_payment_async( @overload @staticmethod async def attach_payment_async( - invoice: str, **params: Unpack["Invoice.AttachPaymentParams"] + invoice: str, **params: Unpack["InvoiceAttachPaymentParams"] ) -> "Invoice": """ Attaches a PaymentIntent or an Out of Band Payment to the invoice, adding it to the list of payments. @@ -6285,7 +1909,7 @@ async def attach_payment_async( @overload async def attach_payment_async( - self, **params: Unpack["Invoice.AttachPaymentParams"] + self, **params: Unpack["InvoiceAttachPaymentParams"] ) -> "Invoice": """ Attaches a PaymentIntent or an Out of Band Payment to the invoice, adding it to the list of payments. @@ -6303,7 +1927,7 @@ async def attach_payment_async( @class_method_variant("_cls_attach_payment_async") async def attach_payment_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Invoice.AttachPaymentParams"] + self, **params: Unpack["InvoiceAttachPaymentParams"] ) -> "Invoice": """ Attaches a PaymentIntent or an Out of Band Payment to the invoice, adding it to the list of payments. @@ -6329,7 +1953,7 @@ async def attach_payment_async( # pyright: ignore[reportGeneralTypeIssues] ) @classmethod - def create(cls, **params: Unpack["Invoice.CreateParams"]) -> "Invoice": + def create(cls, **params: Unpack["InvoiceCreateParams"]) -> "Invoice": """ This endpoint creates a draft invoice for a given customer. The invoice remains a draft until you [finalize the invoice, which allows you to [pay](#pay_invoice) or send](https://docs.stripe.com/api#finalize_invoice) the invoice to your customers. """ @@ -6344,7 +1968,7 @@ def create(cls, **params: Unpack["Invoice.CreateParams"]) -> "Invoice": @classmethod async def create_async( - cls, **params: Unpack["Invoice.CreateParams"] + cls, **params: Unpack["InvoiceCreateParams"] ) -> "Invoice": """ This endpoint creates a draft invoice for a given customer. The invoice remains a draft until you [finalize the invoice, which allows you to [pay](#pay_invoice) or send](https://docs.stripe.com/api#finalize_invoice) the invoice to your customers. @@ -6360,7 +1984,7 @@ async def create_async( @classmethod def create_preview( - cls, **params: Unpack["Invoice.CreatePreviewParams"] + cls, **params: Unpack["InvoiceCreatePreviewParams"] ) -> "Invoice": """ At any time, you can preview the upcoming invoice for a subscription or subscription schedule. This will show you all the charges that are pending, including subscription renewal charges, invoice item charges, etc. It will also show you any discounts that are applicable to the invoice. @@ -6384,7 +2008,7 @@ def create_preview( @classmethod async def create_preview_async( - cls, **params: Unpack["Invoice.CreatePreviewParams"] + cls, **params: Unpack["InvoiceCreatePreviewParams"] ) -> "Invoice": """ At any time, you can preview the upcoming invoice for a subscription or subscription schedule. This will show you all the charges that are pending, including subscription renewal charges, invoice item charges, etc. It will also show you any discounts that are applicable to the invoice. @@ -6408,7 +2032,7 @@ async def create_preview_async( @classmethod def _cls_delete( - cls, sid: str, **params: Unpack["Invoice.DeleteParams"] + cls, sid: str, **params: Unpack["InvoiceDeleteParams"] ) -> "Invoice": """ Permanently deletes a one-off invoice draft. This cannot be undone. Attempts to delete invoices that are no longer in a draft state will fail; once an invoice has been finalized or if an invoice is for a subscription, it must be [voided](https://docs.stripe.com/api#void_invoice). @@ -6425,16 +2049,14 @@ def _cls_delete( @overload @staticmethod - def delete( - sid: str, **params: Unpack["Invoice.DeleteParams"] - ) -> "Invoice": + def delete(sid: str, **params: Unpack["InvoiceDeleteParams"]) -> "Invoice": """ Permanently deletes a one-off invoice draft. This cannot be undone. Attempts to delete invoices that are no longer in a draft state will fail; once an invoice has been finalized or if an invoice is for a subscription, it must be [voided](https://docs.stripe.com/api#void_invoice). """ ... @overload - def delete(self, **params: Unpack["Invoice.DeleteParams"]) -> "Invoice": + def delete(self, **params: Unpack["InvoiceDeleteParams"]) -> "Invoice": """ Permanently deletes a one-off invoice draft. This cannot be undone. Attempts to delete invoices that are no longer in a draft state will fail; once an invoice has been finalized or if an invoice is for a subscription, it must be [voided](https://docs.stripe.com/api#void_invoice). """ @@ -6442,7 +2064,7 @@ def delete(self, **params: Unpack["Invoice.DeleteParams"]) -> "Invoice": @class_method_variant("_cls_delete") def delete( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Invoice.DeleteParams"] + self, **params: Unpack["InvoiceDeleteParams"] ) -> "Invoice": """ Permanently deletes a one-off invoice draft. This cannot be undone. Attempts to delete invoices that are no longer in a draft state will fail; once an invoice has been finalized or if an invoice is for a subscription, it must be [voided](https://docs.stripe.com/api#void_invoice). @@ -6455,7 +2077,7 @@ def delete( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_delete_async( - cls, sid: str, **params: Unpack["Invoice.DeleteParams"] + cls, sid: str, **params: Unpack["InvoiceDeleteParams"] ) -> "Invoice": """ Permanently deletes a one-off invoice draft. This cannot be undone. Attempts to delete invoices that are no longer in a draft state will fail; once an invoice has been finalized or if an invoice is for a subscription, it must be [voided](https://docs.stripe.com/api#void_invoice). @@ -6473,7 +2095,7 @@ async def _cls_delete_async( @overload @staticmethod async def delete_async( - sid: str, **params: Unpack["Invoice.DeleteParams"] + sid: str, **params: Unpack["InvoiceDeleteParams"] ) -> "Invoice": """ Permanently deletes a one-off invoice draft. This cannot be undone. Attempts to delete invoices that are no longer in a draft state will fail; once an invoice has been finalized or if an invoice is for a subscription, it must be [voided](https://docs.stripe.com/api#void_invoice). @@ -6482,7 +2104,7 @@ async def delete_async( @overload async def delete_async( - self, **params: Unpack["Invoice.DeleteParams"] + self, **params: Unpack["InvoiceDeleteParams"] ) -> "Invoice": """ Permanently deletes a one-off invoice draft. This cannot be undone. Attempts to delete invoices that are no longer in a draft state will fail; once an invoice has been finalized or if an invoice is for a subscription, it must be [voided](https://docs.stripe.com/api#void_invoice). @@ -6491,7 +2113,7 @@ async def delete_async( @class_method_variant("_cls_delete_async") async def delete_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Invoice.DeleteParams"] + self, **params: Unpack["InvoiceDeleteParams"] ) -> "Invoice": """ Permanently deletes a one-off invoice draft. This cannot be undone. Attempts to delete invoices that are no longer in a draft state will fail; once an invoice has been finalized or if an invoice is for a subscription, it must be [voided](https://docs.stripe.com/api#void_invoice). @@ -6504,7 +2126,7 @@ async def delete_async( # pyright: ignore[reportGeneralTypeIssues] @classmethod def _cls_finalize_invoice( - cls, invoice: str, **params: Unpack["Invoice.FinalizeInvoiceParams"] + cls, invoice: str, **params: Unpack["InvoiceFinalizeInvoiceParams"] ) -> "Invoice": """ Stripe automatically finalizes drafts before sending and attempting payment on invoices. However, if you'd like to finalize a draft invoice manually, you can do so using this method. @@ -6523,7 +2145,7 @@ def _cls_finalize_invoice( @overload @staticmethod def finalize_invoice( - invoice: str, **params: Unpack["Invoice.FinalizeInvoiceParams"] + invoice: str, **params: Unpack["InvoiceFinalizeInvoiceParams"] ) -> "Invoice": """ Stripe automatically finalizes drafts before sending and attempting payment on invoices. However, if you'd like to finalize a draft invoice manually, you can do so using this method. @@ -6532,7 +2154,7 @@ def finalize_invoice( @overload def finalize_invoice( - self, **params: Unpack["Invoice.FinalizeInvoiceParams"] + self, **params: Unpack["InvoiceFinalizeInvoiceParams"] ) -> "Invoice": """ Stripe automatically finalizes drafts before sending and attempting payment on invoices. However, if you'd like to finalize a draft invoice manually, you can do so using this method. @@ -6541,7 +2163,7 @@ def finalize_invoice( @class_method_variant("_cls_finalize_invoice") def finalize_invoice( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Invoice.FinalizeInvoiceParams"] + self, **params: Unpack["InvoiceFinalizeInvoiceParams"] ) -> "Invoice": """ Stripe automatically finalizes drafts before sending and attempting payment on invoices. However, if you'd like to finalize a draft invoice manually, you can do so using this method. @@ -6559,7 +2181,7 @@ def finalize_invoice( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_finalize_invoice_async( - cls, invoice: str, **params: Unpack["Invoice.FinalizeInvoiceParams"] + cls, invoice: str, **params: Unpack["InvoiceFinalizeInvoiceParams"] ) -> "Invoice": """ Stripe automatically finalizes drafts before sending and attempting payment on invoices. However, if you'd like to finalize a draft invoice manually, you can do so using this method. @@ -6578,7 +2200,7 @@ async def _cls_finalize_invoice_async( @overload @staticmethod async def finalize_invoice_async( - invoice: str, **params: Unpack["Invoice.FinalizeInvoiceParams"] + invoice: str, **params: Unpack["InvoiceFinalizeInvoiceParams"] ) -> "Invoice": """ Stripe automatically finalizes drafts before sending and attempting payment on invoices. However, if you'd like to finalize a draft invoice manually, you can do so using this method. @@ -6587,7 +2209,7 @@ async def finalize_invoice_async( @overload async def finalize_invoice_async( - self, **params: Unpack["Invoice.FinalizeInvoiceParams"] + self, **params: Unpack["InvoiceFinalizeInvoiceParams"] ) -> "Invoice": """ Stripe automatically finalizes drafts before sending and attempting payment on invoices. However, if you'd like to finalize a draft invoice manually, you can do so using this method. @@ -6596,7 +2218,7 @@ async def finalize_invoice_async( @class_method_variant("_cls_finalize_invoice_async") async def finalize_invoice_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Invoice.FinalizeInvoiceParams"] + self, **params: Unpack["InvoiceFinalizeInvoiceParams"] ) -> "Invoice": """ Stripe automatically finalizes drafts before sending and attempting payment on invoices. However, if you'd like to finalize a draft invoice manually, you can do so using this method. @@ -6614,7 +2236,7 @@ async def finalize_invoice_async( # pyright: ignore[reportGeneralTypeIssues] @classmethod def list( - cls, **params: Unpack["Invoice.ListParams"] + cls, **params: Unpack["InvoiceListParams"] ) -> ListObject["Invoice"]: """ You can list all invoices, or list the invoices for a specific customer. The invoices are returned sorted by creation date, with the most recently created invoices appearing first. @@ -6634,7 +2256,7 @@ def list( @classmethod async def list_async( - cls, **params: Unpack["Invoice.ListParams"] + cls, **params: Unpack["InvoiceListParams"] ) -> ListObject["Invoice"]: """ You can list all invoices, or list the invoices for a specific customer. The invoices are returned sorted by creation date, with the most recently created invoices appearing first. @@ -6654,7 +2276,7 @@ async def list_async( @classmethod def _cls_mark_uncollectible( - cls, invoice: str, **params: Unpack["Invoice.MarkUncollectibleParams"] + cls, invoice: str, **params: Unpack["InvoiceMarkUncollectibleParams"] ) -> "Invoice": """ Marking an invoice as uncollectible is useful for keeping track of bad debts that can be written off for accounting purposes. @@ -6673,7 +2295,7 @@ def _cls_mark_uncollectible( @overload @staticmethod def mark_uncollectible( - invoice: str, **params: Unpack["Invoice.MarkUncollectibleParams"] + invoice: str, **params: Unpack["InvoiceMarkUncollectibleParams"] ) -> "Invoice": """ Marking an invoice as uncollectible is useful for keeping track of bad debts that can be written off for accounting purposes. @@ -6682,7 +2304,7 @@ def mark_uncollectible( @overload def mark_uncollectible( - self, **params: Unpack["Invoice.MarkUncollectibleParams"] + self, **params: Unpack["InvoiceMarkUncollectibleParams"] ) -> "Invoice": """ Marking an invoice as uncollectible is useful for keeping track of bad debts that can be written off for accounting purposes. @@ -6691,7 +2313,7 @@ def mark_uncollectible( @class_method_variant("_cls_mark_uncollectible") def mark_uncollectible( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Invoice.MarkUncollectibleParams"] + self, **params: Unpack["InvoiceMarkUncollectibleParams"] ) -> "Invoice": """ Marking an invoice as uncollectible is useful for keeping track of bad debts that can be written off for accounting purposes. @@ -6709,7 +2331,7 @@ def mark_uncollectible( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_mark_uncollectible_async( - cls, invoice: str, **params: Unpack["Invoice.MarkUncollectibleParams"] + cls, invoice: str, **params: Unpack["InvoiceMarkUncollectibleParams"] ) -> "Invoice": """ Marking an invoice as uncollectible is useful for keeping track of bad debts that can be written off for accounting purposes. @@ -6728,7 +2350,7 @@ async def _cls_mark_uncollectible_async( @overload @staticmethod async def mark_uncollectible_async( - invoice: str, **params: Unpack["Invoice.MarkUncollectibleParams"] + invoice: str, **params: Unpack["InvoiceMarkUncollectibleParams"] ) -> "Invoice": """ Marking an invoice as uncollectible is useful for keeping track of bad debts that can be written off for accounting purposes. @@ -6737,7 +2359,7 @@ async def mark_uncollectible_async( @overload async def mark_uncollectible_async( - self, **params: Unpack["Invoice.MarkUncollectibleParams"] + self, **params: Unpack["InvoiceMarkUncollectibleParams"] ) -> "Invoice": """ Marking an invoice as uncollectible is useful for keeping track of bad debts that can be written off for accounting purposes. @@ -6746,7 +2368,7 @@ async def mark_uncollectible_async( @class_method_variant("_cls_mark_uncollectible_async") async def mark_uncollectible_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Invoice.MarkUncollectibleParams"] + self, **params: Unpack["InvoiceMarkUncollectibleParams"] ) -> "Invoice": """ Marking an invoice as uncollectible is useful for keeping track of bad debts that can be written off for accounting purposes. @@ -6764,7 +2386,7 @@ async def mark_uncollectible_async( # pyright: ignore[reportGeneralTypeIssues] @classmethod def modify( - cls, id: str, **params: Unpack["Invoice.ModifyParams"] + cls, id: str, **params: Unpack["InvoiceModifyParams"] ) -> "Invoice": """ Draft invoices are fully editable. Once an invoice is [finalized](https://docs.stripe.com/docs/billing/invoices/workflow#finalized), @@ -6786,7 +2408,7 @@ def modify( @classmethod async def modify_async( - cls, id: str, **params: Unpack["Invoice.ModifyParams"] + cls, id: str, **params: Unpack["InvoiceModifyParams"] ) -> "Invoice": """ Draft invoices are fully editable. Once an invoice is [finalized](https://docs.stripe.com/docs/billing/invoices/workflow#finalized), @@ -6808,7 +2430,7 @@ async def modify_async( @classmethod def _cls_pay( - cls, invoice: str, **params: Unpack["Invoice.PayParams"] + cls, invoice: str, **params: Unpack["InvoicePayParams"] ) -> "Invoice": """ Stripe automatically creates and then attempts to collect payment on invoices for customers on subscriptions according to your [subscriptions settings](https://dashboard.stripe.com/account/billing/automatic). However, if you'd like to attempt payment on an invoice out of the normal collection schedule or for some other reason, you can do so. @@ -6826,14 +2448,14 @@ def _cls_pay( @overload @staticmethod - def pay(invoice: str, **params: Unpack["Invoice.PayParams"]) -> "Invoice": + def pay(invoice: str, **params: Unpack["InvoicePayParams"]) -> "Invoice": """ Stripe automatically creates and then attempts to collect payment on invoices for customers on subscriptions according to your [subscriptions settings](https://dashboard.stripe.com/account/billing/automatic). However, if you'd like to attempt payment on an invoice out of the normal collection schedule or for some other reason, you can do so. """ ... @overload - def pay(self, **params: Unpack["Invoice.PayParams"]) -> "Invoice": + def pay(self, **params: Unpack["InvoicePayParams"]) -> "Invoice": """ Stripe automatically creates and then attempts to collect payment on invoices for customers on subscriptions according to your [subscriptions settings](https://dashboard.stripe.com/account/billing/automatic). However, if you'd like to attempt payment on an invoice out of the normal collection schedule or for some other reason, you can do so. """ @@ -6841,7 +2463,7 @@ def pay(self, **params: Unpack["Invoice.PayParams"]) -> "Invoice": @class_method_variant("_cls_pay") def pay( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Invoice.PayParams"] + self, **params: Unpack["InvoicePayParams"] ) -> "Invoice": """ Stripe automatically creates and then attempts to collect payment on invoices for customers on subscriptions according to your [subscriptions settings](https://dashboard.stripe.com/account/billing/automatic). However, if you'd like to attempt payment on an invoice out of the normal collection schedule or for some other reason, you can do so. @@ -6859,7 +2481,7 @@ def pay( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_pay_async( - cls, invoice: str, **params: Unpack["Invoice.PayParams"] + cls, invoice: str, **params: Unpack["InvoicePayParams"] ) -> "Invoice": """ Stripe automatically creates and then attempts to collect payment on invoices for customers on subscriptions according to your [subscriptions settings](https://dashboard.stripe.com/account/billing/automatic). However, if you'd like to attempt payment on an invoice out of the normal collection schedule or for some other reason, you can do so. @@ -6878,7 +2500,7 @@ async def _cls_pay_async( @overload @staticmethod async def pay_async( - invoice: str, **params: Unpack["Invoice.PayParams"] + invoice: str, **params: Unpack["InvoicePayParams"] ) -> "Invoice": """ Stripe automatically creates and then attempts to collect payment on invoices for customers on subscriptions according to your [subscriptions settings](https://dashboard.stripe.com/account/billing/automatic). However, if you'd like to attempt payment on an invoice out of the normal collection schedule or for some other reason, you can do so. @@ -6887,7 +2509,7 @@ async def pay_async( @overload async def pay_async( - self, **params: Unpack["Invoice.PayParams"] + self, **params: Unpack["InvoicePayParams"] ) -> "Invoice": """ Stripe automatically creates and then attempts to collect payment on invoices for customers on subscriptions according to your [subscriptions settings](https://dashboard.stripe.com/account/billing/automatic). However, if you'd like to attempt payment on an invoice out of the normal collection schedule or for some other reason, you can do so. @@ -6896,7 +2518,7 @@ async def pay_async( @class_method_variant("_cls_pay_async") async def pay_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Invoice.PayParams"] + self, **params: Unpack["InvoicePayParams"] ) -> "Invoice": """ Stripe automatically creates and then attempts to collect payment on invoices for customers on subscriptions according to your [subscriptions settings](https://dashboard.stripe.com/account/billing/automatic). However, if you'd like to attempt payment on an invoice out of the normal collection schedule or for some other reason, you can do so. @@ -6914,7 +2536,7 @@ async def pay_async( # pyright: ignore[reportGeneralTypeIssues] @classmethod def _cls_remove_lines( - cls, invoice: str, **params: Unpack["Invoice.RemoveLinesParams"] + cls, invoice: str, **params: Unpack["InvoiceRemoveLinesParams"] ) -> "Invoice": """ Removes multiple line items from an invoice. This is only possible when an invoice is still a draft. @@ -6933,7 +2555,7 @@ def _cls_remove_lines( @overload @staticmethod def remove_lines( - invoice: str, **params: Unpack["Invoice.RemoveLinesParams"] + invoice: str, **params: Unpack["InvoiceRemoveLinesParams"] ) -> "Invoice": """ Removes multiple line items from an invoice. This is only possible when an invoice is still a draft. @@ -6942,7 +2564,7 @@ def remove_lines( @overload def remove_lines( - self, **params: Unpack["Invoice.RemoveLinesParams"] + self, **params: Unpack["InvoiceRemoveLinesParams"] ) -> "Invoice": """ Removes multiple line items from an invoice. This is only possible when an invoice is still a draft. @@ -6951,7 +2573,7 @@ def remove_lines( @class_method_variant("_cls_remove_lines") def remove_lines( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Invoice.RemoveLinesParams"] + self, **params: Unpack["InvoiceRemoveLinesParams"] ) -> "Invoice": """ Removes multiple line items from an invoice. This is only possible when an invoice is still a draft. @@ -6969,7 +2591,7 @@ def remove_lines( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_remove_lines_async( - cls, invoice: str, **params: Unpack["Invoice.RemoveLinesParams"] + cls, invoice: str, **params: Unpack["InvoiceRemoveLinesParams"] ) -> "Invoice": """ Removes multiple line items from an invoice. This is only possible when an invoice is still a draft. @@ -6988,7 +2610,7 @@ async def _cls_remove_lines_async( @overload @staticmethod async def remove_lines_async( - invoice: str, **params: Unpack["Invoice.RemoveLinesParams"] + invoice: str, **params: Unpack["InvoiceRemoveLinesParams"] ) -> "Invoice": """ Removes multiple line items from an invoice. This is only possible when an invoice is still a draft. @@ -6997,7 +2619,7 @@ async def remove_lines_async( @overload async def remove_lines_async( - self, **params: Unpack["Invoice.RemoveLinesParams"] + self, **params: Unpack["InvoiceRemoveLinesParams"] ) -> "Invoice": """ Removes multiple line items from an invoice. This is only possible when an invoice is still a draft. @@ -7006,7 +2628,7 @@ async def remove_lines_async( @class_method_variant("_cls_remove_lines_async") async def remove_lines_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Invoice.RemoveLinesParams"] + self, **params: Unpack["InvoiceRemoveLinesParams"] ) -> "Invoice": """ Removes multiple line items from an invoice. This is only possible when an invoice is still a draft. @@ -7024,7 +2646,7 @@ async def remove_lines_async( # pyright: ignore[reportGeneralTypeIssues] @classmethod def retrieve( - cls, id: str, **params: Unpack["Invoice.RetrieveParams"] + cls, id: str, **params: Unpack["InvoiceRetrieveParams"] ) -> "Invoice": """ Retrieves the invoice with the given ID. @@ -7035,7 +2657,7 @@ def retrieve( @classmethod async def retrieve_async( - cls, id: str, **params: Unpack["Invoice.RetrieveParams"] + cls, id: str, **params: Unpack["InvoiceRetrieveParams"] ) -> "Invoice": """ Retrieves the invoice with the given ID. @@ -7046,7 +2668,7 @@ async def retrieve_async( @classmethod def _cls_send_invoice( - cls, invoice: str, **params: Unpack["Invoice.SendInvoiceParams"] + cls, invoice: str, **params: Unpack["InvoiceSendInvoiceParams"] ) -> "Invoice": """ Stripe will automatically send invoices to customers according to your [subscriptions settings](https://dashboard.stripe.com/account/billing/automatic). However, if you'd like to manually send an invoice to your customer out of the normal schedule, you can do so. When sending invoices that have already been paid, there will be no reference to the payment in the email. @@ -7067,7 +2689,7 @@ def _cls_send_invoice( @overload @staticmethod def send_invoice( - invoice: str, **params: Unpack["Invoice.SendInvoiceParams"] + invoice: str, **params: Unpack["InvoiceSendInvoiceParams"] ) -> "Invoice": """ Stripe will automatically send invoices to customers according to your [subscriptions settings](https://dashboard.stripe.com/account/billing/automatic). However, if you'd like to manually send an invoice to your customer out of the normal schedule, you can do so. When sending invoices that have already been paid, there will be no reference to the payment in the email. @@ -7078,7 +2700,7 @@ def send_invoice( @overload def send_invoice( - self, **params: Unpack["Invoice.SendInvoiceParams"] + self, **params: Unpack["InvoiceSendInvoiceParams"] ) -> "Invoice": """ Stripe will automatically send invoices to customers according to your [subscriptions settings](https://dashboard.stripe.com/account/billing/automatic). However, if you'd like to manually send an invoice to your customer out of the normal schedule, you can do so. When sending invoices that have already been paid, there will be no reference to the payment in the email. @@ -7089,7 +2711,7 @@ def send_invoice( @class_method_variant("_cls_send_invoice") def send_invoice( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Invoice.SendInvoiceParams"] + self, **params: Unpack["InvoiceSendInvoiceParams"] ) -> "Invoice": """ Stripe will automatically send invoices to customers according to your [subscriptions settings](https://dashboard.stripe.com/account/billing/automatic). However, if you'd like to manually send an invoice to your customer out of the normal schedule, you can do so. When sending invoices that have already been paid, there will be no reference to the payment in the email. @@ -7109,7 +2731,7 @@ def send_invoice( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_send_invoice_async( - cls, invoice: str, **params: Unpack["Invoice.SendInvoiceParams"] + cls, invoice: str, **params: Unpack["InvoiceSendInvoiceParams"] ) -> "Invoice": """ Stripe will automatically send invoices to customers according to your [subscriptions settings](https://dashboard.stripe.com/account/billing/automatic). However, if you'd like to manually send an invoice to your customer out of the normal schedule, you can do so. When sending invoices that have already been paid, there will be no reference to the payment in the email. @@ -7130,7 +2752,7 @@ async def _cls_send_invoice_async( @overload @staticmethod async def send_invoice_async( - invoice: str, **params: Unpack["Invoice.SendInvoiceParams"] + invoice: str, **params: Unpack["InvoiceSendInvoiceParams"] ) -> "Invoice": """ Stripe will automatically send invoices to customers according to your [subscriptions settings](https://dashboard.stripe.com/account/billing/automatic). However, if you'd like to manually send an invoice to your customer out of the normal schedule, you can do so. When sending invoices that have already been paid, there will be no reference to the payment in the email. @@ -7141,7 +2763,7 @@ async def send_invoice_async( @overload async def send_invoice_async( - self, **params: Unpack["Invoice.SendInvoiceParams"] + self, **params: Unpack["InvoiceSendInvoiceParams"] ) -> "Invoice": """ Stripe will automatically send invoices to customers according to your [subscriptions settings](https://dashboard.stripe.com/account/billing/automatic). However, if you'd like to manually send an invoice to your customer out of the normal schedule, you can do so. When sending invoices that have already been paid, there will be no reference to the payment in the email. @@ -7152,7 +2774,7 @@ async def send_invoice_async( @class_method_variant("_cls_send_invoice_async") async def send_invoice_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Invoice.SendInvoiceParams"] + self, **params: Unpack["InvoiceSendInvoiceParams"] ) -> "Invoice": """ Stripe will automatically send invoices to customers according to your [subscriptions settings](https://dashboard.stripe.com/account/billing/automatic). However, if you'd like to manually send an invoice to your customer out of the normal schedule, you can do so. When sending invoices that have already been paid, there will be no reference to the payment in the email. @@ -7172,7 +2794,7 @@ async def send_invoice_async( # pyright: ignore[reportGeneralTypeIssues] @classmethod def _cls_update_lines( - cls, invoice: str, **params: Unpack["Invoice.UpdateLinesParams"] + cls, invoice: str, **params: Unpack["InvoiceUpdateLinesParams"] ) -> "Invoice": """ Updates multiple line items on an invoice. This is only possible when an invoice is still a draft. @@ -7191,7 +2813,7 @@ def _cls_update_lines( @overload @staticmethod def update_lines( - invoice: str, **params: Unpack["Invoice.UpdateLinesParams"] + invoice: str, **params: Unpack["InvoiceUpdateLinesParams"] ) -> "Invoice": """ Updates multiple line items on an invoice. This is only possible when an invoice is still a draft. @@ -7200,7 +2822,7 @@ def update_lines( @overload def update_lines( - self, **params: Unpack["Invoice.UpdateLinesParams"] + self, **params: Unpack["InvoiceUpdateLinesParams"] ) -> "Invoice": """ Updates multiple line items on an invoice. This is only possible when an invoice is still a draft. @@ -7209,7 +2831,7 @@ def update_lines( @class_method_variant("_cls_update_lines") def update_lines( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Invoice.UpdateLinesParams"] + self, **params: Unpack["InvoiceUpdateLinesParams"] ) -> "Invoice": """ Updates multiple line items on an invoice. This is only possible when an invoice is still a draft. @@ -7227,7 +2849,7 @@ def update_lines( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_update_lines_async( - cls, invoice: str, **params: Unpack["Invoice.UpdateLinesParams"] + cls, invoice: str, **params: Unpack["InvoiceUpdateLinesParams"] ) -> "Invoice": """ Updates multiple line items on an invoice. This is only possible when an invoice is still a draft. @@ -7246,7 +2868,7 @@ async def _cls_update_lines_async( @overload @staticmethod async def update_lines_async( - invoice: str, **params: Unpack["Invoice.UpdateLinesParams"] + invoice: str, **params: Unpack["InvoiceUpdateLinesParams"] ) -> "Invoice": """ Updates multiple line items on an invoice. This is only possible when an invoice is still a draft. @@ -7255,7 +2877,7 @@ async def update_lines_async( @overload async def update_lines_async( - self, **params: Unpack["Invoice.UpdateLinesParams"] + self, **params: Unpack["InvoiceUpdateLinesParams"] ) -> "Invoice": """ Updates multiple line items on an invoice. This is only possible when an invoice is still a draft. @@ -7264,7 +2886,7 @@ async def update_lines_async( @class_method_variant("_cls_update_lines_async") async def update_lines_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Invoice.UpdateLinesParams"] + self, **params: Unpack["InvoiceUpdateLinesParams"] ) -> "Invoice": """ Updates multiple line items on an invoice. This is only possible when an invoice is still a draft. @@ -7282,7 +2904,7 @@ async def update_lines_async( # pyright: ignore[reportGeneralTypeIssues] @classmethod def _cls_void_invoice( - cls, invoice: str, **params: Unpack["Invoice.VoidInvoiceParams"] + cls, invoice: str, **params: Unpack["InvoiceVoidInvoiceParams"] ) -> "Invoice": """ Mark a finalized invoice as void. This cannot be undone. Voiding an invoice is similar to [deletion](https://docs.stripe.com/api#delete_invoice), however it only applies to finalized invoices and maintains a papertrail where the invoice can still be found. @@ -7303,7 +2925,7 @@ def _cls_void_invoice( @overload @staticmethod def void_invoice( - invoice: str, **params: Unpack["Invoice.VoidInvoiceParams"] + invoice: str, **params: Unpack["InvoiceVoidInvoiceParams"] ) -> "Invoice": """ Mark a finalized invoice as void. This cannot be undone. Voiding an invoice is similar to [deletion](https://docs.stripe.com/api#delete_invoice), however it only applies to finalized invoices and maintains a papertrail where the invoice can still be found. @@ -7314,7 +2936,7 @@ def void_invoice( @overload def void_invoice( - self, **params: Unpack["Invoice.VoidInvoiceParams"] + self, **params: Unpack["InvoiceVoidInvoiceParams"] ) -> "Invoice": """ Mark a finalized invoice as void. This cannot be undone. Voiding an invoice is similar to [deletion](https://docs.stripe.com/api#delete_invoice), however it only applies to finalized invoices and maintains a papertrail where the invoice can still be found. @@ -7325,7 +2947,7 @@ def void_invoice( @class_method_variant("_cls_void_invoice") def void_invoice( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Invoice.VoidInvoiceParams"] + self, **params: Unpack["InvoiceVoidInvoiceParams"] ) -> "Invoice": """ Mark a finalized invoice as void. This cannot be undone. Voiding an invoice is similar to [deletion](https://docs.stripe.com/api#delete_invoice), however it only applies to finalized invoices and maintains a papertrail where the invoice can still be found. @@ -7345,7 +2967,7 @@ def void_invoice( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_void_invoice_async( - cls, invoice: str, **params: Unpack["Invoice.VoidInvoiceParams"] + cls, invoice: str, **params: Unpack["InvoiceVoidInvoiceParams"] ) -> "Invoice": """ Mark a finalized invoice as void. This cannot be undone. Voiding an invoice is similar to [deletion](https://docs.stripe.com/api#delete_invoice), however it only applies to finalized invoices and maintains a papertrail where the invoice can still be found. @@ -7366,7 +2988,7 @@ async def _cls_void_invoice_async( @overload @staticmethod async def void_invoice_async( - invoice: str, **params: Unpack["Invoice.VoidInvoiceParams"] + invoice: str, **params: Unpack["InvoiceVoidInvoiceParams"] ) -> "Invoice": """ Mark a finalized invoice as void. This cannot be undone. Voiding an invoice is similar to [deletion](https://docs.stripe.com/api#delete_invoice), however it only applies to finalized invoices and maintains a papertrail where the invoice can still be found. @@ -7377,7 +2999,7 @@ async def void_invoice_async( @overload async def void_invoice_async( - self, **params: Unpack["Invoice.VoidInvoiceParams"] + self, **params: Unpack["InvoiceVoidInvoiceParams"] ) -> "Invoice": """ Mark a finalized invoice as void. This cannot be undone. Voiding an invoice is similar to [deletion](https://docs.stripe.com/api#delete_invoice), however it only applies to finalized invoices and maintains a papertrail where the invoice can still be found. @@ -7388,7 +3010,7 @@ async def void_invoice_async( @class_method_variant("_cls_void_invoice_async") async def void_invoice_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Invoice.VoidInvoiceParams"] + self, **params: Unpack["InvoiceVoidInvoiceParams"] ) -> "Invoice": """ Mark a finalized invoice as void. This cannot be undone. Voiding an invoice is similar to [deletion](https://docs.stripe.com/api#delete_invoice), however it only applies to finalized invoices and maintains a papertrail where the invoice can still be found. @@ -7408,7 +3030,7 @@ async def void_invoice_async( # pyright: ignore[reportGeneralTypeIssues] @classmethod def search( - cls, *args, **kwargs: Unpack["Invoice.SearchParams"] + cls, *args, **kwargs: Unpack["InvoiceSearchParams"] ) -> SearchResultObject["Invoice"]: """ Search for invoices you've previously created using Stripe's [Search Query Language](https://docs.stripe.com/docs/search#search-query-language). @@ -7420,7 +3042,7 @@ def search( @classmethod async def search_async( - cls, *args, **kwargs: Unpack["Invoice.SearchParams"] + cls, *args, **kwargs: Unpack["InvoiceSearchParams"] ) -> SearchResultObject["Invoice"]: """ Search for invoices you've previously created using Stripe's [Search Query Language](https://docs.stripe.com/docs/search#search-query-language). @@ -7434,19 +3056,19 @@ async def search_async( @classmethod def search_auto_paging_iter( - cls, *args, **kwargs: Unpack["Invoice.SearchParams"] + cls, *args, **kwargs: Unpack["InvoiceSearchParams"] ) -> Iterator["Invoice"]: return cls.search(*args, **kwargs).auto_paging_iter() @classmethod async def search_auto_paging_iter_async( - cls, *args, **kwargs: Unpack["Invoice.SearchParams"] + cls, *args, **kwargs: Unpack["InvoiceSearchParams"] ) -> AsyncIterator["Invoice"]: return (await cls.search_async(*args, **kwargs)).auto_paging_iter() @classmethod def list_lines( - cls, invoice: str, **params: Unpack["Invoice.ListLinesParams"] + cls, invoice: str, **params: Unpack["InvoiceListLinesParams"] ) -> ListObject["InvoiceLineItem"]: """ When retrieving an invoice, you'll get a lines property containing the total count of line items and the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items. @@ -7464,7 +3086,7 @@ def list_lines( @classmethod async def list_lines_async( - cls, invoice: str, **params: Unpack["Invoice.ListLinesParams"] + cls, invoice: str, **params: Unpack["InvoiceListLinesParams"] ) -> ListObject["InvoiceLineItem"]: """ When retrieving an invoice, you'll get a lines property containing the total count of line items and the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items. diff --git a/stripe/_invoice_item.py b/stripe/_invoice_item.py index 89bfc957e..d36ea5cac 100644 --- a/stripe/_invoice_item.py +++ b/stripe/_invoice_item.py @@ -5,18 +5,11 @@ from stripe._expandable_field import ExpandableField from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource -from stripe._request_options import RequestOptions from stripe._stripe_object import StripeObject from stripe._updateable_api_resource import UpdateableAPIResource from stripe._util import class_method_variant, sanitize_id from typing import ClassVar, Dict, List, Optional, cast, overload -from typing_extensions import ( - Literal, - NotRequired, - TypedDict, - Unpack, - TYPE_CHECKING, -) +from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: from stripe._customer import Customer @@ -24,6 +17,19 @@ from stripe._invoice import Invoice from stripe._margin import Margin from stripe._tax_rate import TaxRate + from stripe.params._invoice_item_create_params import ( + InvoiceItemCreateParams, + ) + from stripe.params._invoice_item_delete_params import ( + InvoiceItemDeleteParams, + ) + from stripe.params._invoice_item_list_params import InvoiceItemListParams + from stripe.params._invoice_item_modify_params import ( + InvoiceItemModifyParams, + ) + from stripe.params._invoice_item_retrieve_params import ( + InvoiceItemRetrieveParams, + ) from stripe.test_helpers._test_clock import TestClock @@ -206,395 +212,6 @@ class DiscountAmount(StripeObject): """ _inner_class_types = {"discount_amounts": DiscountAmount} - class CreateParams(RequestOptions): - amount: NotRequired[int] - """ - The integer amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. Passing in a negative `amount` will reduce the `amount_due` on the invoice. - """ - currency: NotRequired[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). - """ - customer: NotRequired[str] - """ - The ID of the customer who will be billed when this invoice item is billed. - """ - customer_account: NotRequired[str] - """ - The ID of the account who will be billed when this invoice item is billed. - """ - description: NotRequired[str] - """ - An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking. - """ - discountable: NotRequired[bool] - """ - Controls whether discounts apply to this invoice item. Defaults to false for prorations or negative invoice items, and true for all other invoice items. - """ - discounts: NotRequired[ - "Literal['']|List[InvoiceItem.CreateParamsDiscount]" - ] - """ - The coupons and promotion codes to redeem into discounts for the invoice item or invoice line item. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - invoice: NotRequired[str] - """ - The ID of an existing invoice to add this invoice item to. For subscription invoices, when left blank, the invoice item will be added to the next upcoming scheduled invoice. For standalone invoices, the invoice item won't be automatically added unless you pass `pending_invoice_item_behavior: 'include'` when creating the invoice. This is useful when adding invoice items in response to an invoice.created webhook. You can only add invoice items to draft invoices and there is a maximum of 250 items per invoice. - """ - margins: NotRequired[List[str]] - """ - The ids of the margins to apply to the invoice item. When set, the `default_margins` on the invoice do not apply to this invoice item. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - period: NotRequired["InvoiceItem.CreateParamsPeriod"] - """ - The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details. - """ - price_data: NotRequired["InvoiceItem.CreateParamsPriceData"] - """ - Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. - """ - pricing: NotRequired["InvoiceItem.CreateParamsPricing"] - """ - The pricing information for the invoice item. - """ - quantity: NotRequired[int] - """ - Non-negative integer. The quantity of units for the invoice item. - """ - subscription: NotRequired[str] - """ - The ID of a subscription to add this invoice item to. When left blank, the invoice item is added to the next upcoming scheduled invoice. When set, scheduled invoices for subscriptions other than the specified subscription will ignore the invoice item. Use this when you want to express that an invoice item has been accrued within the context of a particular subscription. - """ - tax_behavior: NotRequired[ - Literal["exclusive", "inclusive", "unspecified"] - ] - """ - Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. - """ - tax_code: NotRequired["Literal['']|str"] - """ - A [tax code](https://stripe.com/docs/tax/tax-categories) ID. - """ - tax_rates: NotRequired[List[str]] - """ - The tax rates which apply to the invoice item. When set, the `default_tax_rates` on the invoice do not apply to this invoice item. - """ - unit_amount_decimal: NotRequired[str] - """ - The decimal unit amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. This `unit_amount_decimal` will be multiplied by the quantity to get the full amount. Passing in a negative `unit_amount_decimal` will reduce the `amount_due` on the invoice. Accepts at most 12 decimal places. - """ - - class CreateParamsDiscount(TypedDict): - coupon: NotRequired[str] - """ - ID of the coupon to create a new discount for. - """ - discount: NotRequired[str] - """ - ID of an existing discount on the object (or one of its ancestors) to reuse. - """ - discount_end: NotRequired[ - "InvoiceItem.CreateParamsDiscountDiscountEnd" - ] - """ - Details to determine how long the discount should be applied for. - """ - promotion_code: NotRequired[str] - """ - ID of the promotion code to create a new discount for. - """ - - class CreateParamsDiscountDiscountEnd(TypedDict): - duration: NotRequired[ - "InvoiceItem.CreateParamsDiscountDiscountEndDuration" - ] - """ - Time span for the redeemed discount. - """ - timestamp: NotRequired[int] - """ - A precise Unix timestamp for the discount to end. Must be in the future. - """ - type: Literal["duration", "timestamp"] - """ - The type of calculation made to determine when the discount ends. - """ - - class CreateParamsDiscountDiscountEndDuration(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. - """ - interval_count: int - """ - The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. - """ - - class CreateParamsPeriod(TypedDict): - end: int - """ - The end of the period, which must be greater than or equal to the start. This value is inclusive. - """ - start: int - """ - The start of the period. This value is inclusive. - """ - - class CreateParamsPriceData(TypedDict): - 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). - """ - product: str - """ - The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to. - """ - tax_behavior: NotRequired[ - Literal["exclusive", "inclusive", "unspecified"] - ] - """ - Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. - """ - unit_amount: NotRequired[int] - """ - A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. - """ - unit_amount_decimal: NotRequired[str] - """ - Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - """ - - class CreateParamsPricing(TypedDict): - price: NotRequired[str] - """ - The ID of the price object. - """ - - class DeleteParams(RequestOptions): - pass - - class ListParams(RequestOptions): - created: NotRequired["InvoiceItem.ListParamsCreated|int"] - """ - Only return invoice items that were created during the given date interval. - """ - customer: NotRequired[str] - """ - The identifier of the customer whose invoice items to return. If none is provided, all invoice items will be returned. - """ - customer_account: NotRequired[str] - """ - The identifier of the account whose invoice items to return. If none is provided, all invoice items will be returned. - """ - 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. - """ - invoice: NotRequired[str] - """ - Only return invoice items belonging to this invoice. If none is provided, all invoice items will be returned. If specifying an invoice, no customer identifier is needed. - """ - 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. - """ - pending: NotRequired[bool] - """ - Set to `true` to only show pending invoice items, which are not yet attached to any invoices. Set to `false` to only show invoice items already attached to invoices. If unspecified, no filter is applied. - """ - 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 ListParamsCreated(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) - """ - - class ModifyParams(RequestOptions): - amount: NotRequired[int] - """ - The integer amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. If you want to apply a credit to the customer's account, pass a negative amount. - """ - description: NotRequired[str] - """ - An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking. - """ - discountable: NotRequired[bool] - """ - Controls whether discounts apply to this invoice item. Defaults to false for prorations or negative invoice items, and true for all other invoice items. Cannot be set to true for prorations. - """ - discounts: NotRequired[ - "Literal['']|List[InvoiceItem.ModifyParamsDiscount]" - ] - """ - The coupons, promotion codes & existing discounts which apply to the invoice item or invoice line item. Item discounts are applied before invoice discounts. Pass an empty string to remove previously-defined discounts. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - margins: NotRequired["Literal['']|List[str]"] - """ - The ids of the margins to apply to the invoice item. When set, the `default_margins` on the invoice do not apply to this invoice item. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - period: NotRequired["InvoiceItem.ModifyParamsPeriod"] - """ - The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details. - """ - price_data: NotRequired["InvoiceItem.ModifyParamsPriceData"] - """ - Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. - """ - pricing: NotRequired["InvoiceItem.ModifyParamsPricing"] - """ - The pricing information for the invoice item. - """ - quantity: NotRequired[int] - """ - Non-negative integer. The quantity of units for the invoice item. - """ - tax_behavior: NotRequired[ - Literal["exclusive", "inclusive", "unspecified"] - ] - """ - Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. - """ - tax_code: NotRequired["Literal['']|str"] - """ - A [tax code](https://stripe.com/docs/tax/tax-categories) ID. - """ - tax_rates: NotRequired["Literal['']|List[str]"] - """ - The tax rates which apply to the invoice item. When set, the `default_tax_rates` on the invoice do not apply to this invoice item. Pass an empty string to remove previously-defined tax rates. - """ - unit_amount_decimal: NotRequired[str] - """ - The decimal unit amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. This `unit_amount_decimal` will be multiplied by the quantity to get the full amount. Passing in a negative `unit_amount_decimal` will reduce the `amount_due` on the invoice. Accepts at most 12 decimal places. - """ - - class ModifyParamsDiscount(TypedDict): - coupon: NotRequired[str] - """ - ID of the coupon to create a new discount for. - """ - discount: NotRequired[str] - """ - ID of an existing discount on the object (or one of its ancestors) to reuse. - """ - discount_end: NotRequired[ - "InvoiceItem.ModifyParamsDiscountDiscountEnd" - ] - """ - Details to determine how long the discount should be applied for. - """ - promotion_code: NotRequired[str] - """ - ID of the promotion code to create a new discount for. - """ - - class ModifyParamsDiscountDiscountEnd(TypedDict): - duration: NotRequired[ - "InvoiceItem.ModifyParamsDiscountDiscountEndDuration" - ] - """ - Time span for the redeemed discount. - """ - timestamp: NotRequired[int] - """ - A precise Unix timestamp for the discount to end. Must be in the future. - """ - type: Literal["duration", "timestamp"] - """ - The type of calculation made to determine when the discount ends. - """ - - class ModifyParamsDiscountDiscountEndDuration(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. - """ - interval_count: int - """ - The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. - """ - - class ModifyParamsPeriod(TypedDict): - end: int - """ - The end of the period, which must be greater than or equal to the start. This value is inclusive. - """ - start: int - """ - The start of the period. This value is inclusive. - """ - - class ModifyParamsPriceData(TypedDict): - 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). - """ - product: str - """ - The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to. - """ - tax_behavior: NotRequired[ - Literal["exclusive", "inclusive", "unspecified"] - ] - """ - Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. - """ - unit_amount: NotRequired[int] - """ - A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. - """ - unit_amount_decimal: NotRequired[str] - """ - Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - """ - - class ModifyParamsPricing(TypedDict): - price: NotRequired[str] - """ - The ID of the price object. - """ - - class RetrieveParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - amount: int """ Amount (in the `currency` specified) of the invoice item. This should always be equal to `unit_amount * quantity`. @@ -688,7 +305,7 @@ class RetrieveParams(RequestOptions): @classmethod def create( - cls, **params: Unpack["InvoiceItem.CreateParams"] + cls, **params: Unpack["InvoiceItemCreateParams"] ) -> "InvoiceItem": """ Creates an item to be added to a draft invoice (up to 250 items per invoice). If no invoice is specified, the item will be on the next invoice created for the customer specified. @@ -704,7 +321,7 @@ def create( @classmethod async def create_async( - cls, **params: Unpack["InvoiceItem.CreateParams"] + cls, **params: Unpack["InvoiceItemCreateParams"] ) -> "InvoiceItem": """ Creates an item to be added to a draft invoice (up to 250 items per invoice). If no invoice is specified, the item will be on the next invoice created for the customer specified. @@ -720,7 +337,7 @@ async def create_async( @classmethod def _cls_delete( - cls, sid: str, **params: Unpack["InvoiceItem.DeleteParams"] + cls, sid: str, **params: Unpack["InvoiceItemDeleteParams"] ) -> "InvoiceItem": """ Deletes an invoice item, removing it from an invoice. Deleting invoice items is only possible when they're not attached to invoices, or if it's attached to a draft invoice. @@ -738,7 +355,7 @@ def _cls_delete( @overload @staticmethod def delete( - sid: str, **params: Unpack["InvoiceItem.DeleteParams"] + sid: str, **params: Unpack["InvoiceItemDeleteParams"] ) -> "InvoiceItem": """ Deletes an invoice item, removing it from an invoice. Deleting invoice items is only possible when they're not attached to invoices, or if it's attached to a draft invoice. @@ -747,7 +364,7 @@ def delete( @overload def delete( - self, **params: Unpack["InvoiceItem.DeleteParams"] + self, **params: Unpack["InvoiceItemDeleteParams"] ) -> "InvoiceItem": """ Deletes an invoice item, removing it from an invoice. Deleting invoice items is only possible when they're not attached to invoices, or if it's attached to a draft invoice. @@ -756,7 +373,7 @@ def delete( @class_method_variant("_cls_delete") def delete( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["InvoiceItem.DeleteParams"] + self, **params: Unpack["InvoiceItemDeleteParams"] ) -> "InvoiceItem": """ Deletes an invoice item, removing it from an invoice. Deleting invoice items is only possible when they're not attached to invoices, or if it's attached to a draft invoice. @@ -769,7 +386,7 @@ def delete( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_delete_async( - cls, sid: str, **params: Unpack["InvoiceItem.DeleteParams"] + cls, sid: str, **params: Unpack["InvoiceItemDeleteParams"] ) -> "InvoiceItem": """ Deletes an invoice item, removing it from an invoice. Deleting invoice items is only possible when they're not attached to invoices, or if it's attached to a draft invoice. @@ -787,7 +404,7 @@ async def _cls_delete_async( @overload @staticmethod async def delete_async( - sid: str, **params: Unpack["InvoiceItem.DeleteParams"] + sid: str, **params: Unpack["InvoiceItemDeleteParams"] ) -> "InvoiceItem": """ Deletes an invoice item, removing it from an invoice. Deleting invoice items is only possible when they're not attached to invoices, or if it's attached to a draft invoice. @@ -796,7 +413,7 @@ async def delete_async( @overload async def delete_async( - self, **params: Unpack["InvoiceItem.DeleteParams"] + self, **params: Unpack["InvoiceItemDeleteParams"] ) -> "InvoiceItem": """ Deletes an invoice item, removing it from an invoice. Deleting invoice items is only possible when they're not attached to invoices, or if it's attached to a draft invoice. @@ -805,7 +422,7 @@ async def delete_async( @class_method_variant("_cls_delete_async") async def delete_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["InvoiceItem.DeleteParams"] + self, **params: Unpack["InvoiceItemDeleteParams"] ) -> "InvoiceItem": """ Deletes an invoice item, removing it from an invoice. Deleting invoice items is only possible when they're not attached to invoices, or if it's attached to a draft invoice. @@ -818,7 +435,7 @@ async def delete_async( # pyright: ignore[reportGeneralTypeIssues] @classmethod def list( - cls, **params: Unpack["InvoiceItem.ListParams"] + cls, **params: Unpack["InvoiceItemListParams"] ) -> ListObject["InvoiceItem"]: """ Returns a list of your invoice items. Invoice items are returned sorted by creation date, with the most recently created invoice items appearing first. @@ -838,7 +455,7 @@ def list( @classmethod async def list_async( - cls, **params: Unpack["InvoiceItem.ListParams"] + cls, **params: Unpack["InvoiceItemListParams"] ) -> ListObject["InvoiceItem"]: """ Returns a list of your invoice items. Invoice items are returned sorted by creation date, with the most recently created invoice items appearing first. @@ -858,7 +475,7 @@ async def list_async( @classmethod def modify( - cls, id: str, **params: Unpack["InvoiceItem.ModifyParams"] + cls, id: str, **params: Unpack["InvoiceItemModifyParams"] ) -> "InvoiceItem": """ Updates the amount or description of an invoice item on an upcoming invoice. Updating an invoice item is only possible before the invoice it's attached to is closed. @@ -875,7 +492,7 @@ def modify( @classmethod async def modify_async( - cls, id: str, **params: Unpack["InvoiceItem.ModifyParams"] + cls, id: str, **params: Unpack["InvoiceItemModifyParams"] ) -> "InvoiceItem": """ Updates the amount or description of an invoice item on an upcoming invoice. Updating an invoice item is only possible before the invoice it's attached to is closed. @@ -892,7 +509,7 @@ async def modify_async( @classmethod def retrieve( - cls, id: str, **params: Unpack["InvoiceItem.RetrieveParams"] + cls, id: str, **params: Unpack["InvoiceItemRetrieveParams"] ) -> "InvoiceItem": """ Retrieves the invoice item with the given ID. @@ -903,7 +520,7 @@ def retrieve( @classmethod async def retrieve_async( - cls, id: str, **params: Unpack["InvoiceItem.RetrieveParams"] + cls, id: str, **params: Unpack["InvoiceItemRetrieveParams"] ) -> "InvoiceItem": """ Retrieves the invoice item with the given ID. diff --git a/stripe/_invoice_item_service.py b/stripe/_invoice_item_service.py index f8fa27ae2..d0e173b1b 100644 --- a/stripe/_invoice_item_service.py +++ b/stripe/_invoice_item_service.py @@ -5,404 +5,30 @@ from stripe._request_options import RequestOptions from stripe._stripe_service import StripeService from stripe._util import sanitize_id -from typing import Dict, List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params._invoice_item_create_params import ( + InvoiceItemCreateParams, + ) + from stripe.params._invoice_item_delete_params import ( + InvoiceItemDeleteParams, + ) + from stripe.params._invoice_item_list_params import InvoiceItemListParams + from stripe.params._invoice_item_retrieve_params import ( + InvoiceItemRetrieveParams, + ) + from stripe.params._invoice_item_update_params import ( + InvoiceItemUpdateParams, + ) class InvoiceItemService(StripeService): - class CreateParams(TypedDict): - amount: NotRequired[int] - """ - The integer amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. Passing in a negative `amount` will reduce the `amount_due` on the invoice. - """ - currency: NotRequired[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). - """ - customer: NotRequired[str] - """ - The ID of the customer who will be billed when this invoice item is billed. - """ - customer_account: NotRequired[str] - """ - The ID of the account who will be billed when this invoice item is billed. - """ - description: NotRequired[str] - """ - An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking. - """ - discountable: NotRequired[bool] - """ - Controls whether discounts apply to this invoice item. Defaults to false for prorations or negative invoice items, and true for all other invoice items. - """ - discounts: NotRequired[ - "Literal['']|List[InvoiceItemService.CreateParamsDiscount]" - ] - """ - The coupons and promotion codes to redeem into discounts for the invoice item or invoice line item. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - invoice: NotRequired[str] - """ - The ID of an existing invoice to add this invoice item to. For subscription invoices, when left blank, the invoice item will be added to the next upcoming scheduled invoice. For standalone invoices, the invoice item won't be automatically added unless you pass `pending_invoice_item_behavior: 'include'` when creating the invoice. This is useful when adding invoice items in response to an invoice.created webhook. You can only add invoice items to draft invoices and there is a maximum of 250 items per invoice. - """ - margins: NotRequired[List[str]] - """ - The ids of the margins to apply to the invoice item. When set, the `default_margins` on the invoice do not apply to this invoice item. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - period: NotRequired["InvoiceItemService.CreateParamsPeriod"] - """ - The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details. - """ - price_data: NotRequired["InvoiceItemService.CreateParamsPriceData"] - """ - Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. - """ - pricing: NotRequired["InvoiceItemService.CreateParamsPricing"] - """ - The pricing information for the invoice item. - """ - quantity: NotRequired[int] - """ - Non-negative integer. The quantity of units for the invoice item. - """ - subscription: NotRequired[str] - """ - The ID of a subscription to add this invoice item to. When left blank, the invoice item is added to the next upcoming scheduled invoice. When set, scheduled invoices for subscriptions other than the specified subscription will ignore the invoice item. Use this when you want to express that an invoice item has been accrued within the context of a particular subscription. - """ - tax_behavior: NotRequired[ - Literal["exclusive", "inclusive", "unspecified"] - ] - """ - Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. - """ - tax_code: NotRequired["Literal['']|str"] - """ - A [tax code](https://stripe.com/docs/tax/tax-categories) ID. - """ - tax_rates: NotRequired[List[str]] - """ - The tax rates which apply to the invoice item. When set, the `default_tax_rates` on the invoice do not apply to this invoice item. - """ - unit_amount_decimal: NotRequired[str] - """ - The decimal unit amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. This `unit_amount_decimal` will be multiplied by the quantity to get the full amount. Passing in a negative `unit_amount_decimal` will reduce the `amount_due` on the invoice. Accepts at most 12 decimal places. - """ - - class CreateParamsDiscount(TypedDict): - coupon: NotRequired[str] - """ - ID of the coupon to create a new discount for. - """ - discount: NotRequired[str] - """ - ID of an existing discount on the object (or one of its ancestors) to reuse. - """ - discount_end: NotRequired[ - "InvoiceItemService.CreateParamsDiscountDiscountEnd" - ] - """ - Details to determine how long the discount should be applied for. - """ - promotion_code: NotRequired[str] - """ - ID of the promotion code to create a new discount for. - """ - - class CreateParamsDiscountDiscountEnd(TypedDict): - duration: NotRequired[ - "InvoiceItemService.CreateParamsDiscountDiscountEndDuration" - ] - """ - Time span for the redeemed discount. - """ - timestamp: NotRequired[int] - """ - A precise Unix timestamp for the discount to end. Must be in the future. - """ - type: Literal["duration", "timestamp"] - """ - The type of calculation made to determine when the discount ends. - """ - - class CreateParamsDiscountDiscountEndDuration(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. - """ - interval_count: int - """ - The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. - """ - - class CreateParamsPeriod(TypedDict): - end: int - """ - The end of the period, which must be greater than or equal to the start. This value is inclusive. - """ - start: int - """ - The start of the period. This value is inclusive. - """ - - class CreateParamsPriceData(TypedDict): - 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). - """ - product: str - """ - The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to. - """ - tax_behavior: NotRequired[ - Literal["exclusive", "inclusive", "unspecified"] - ] - """ - Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. - """ - unit_amount: NotRequired[int] - """ - A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. - """ - unit_amount_decimal: NotRequired[str] - """ - Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - """ - - class CreateParamsPricing(TypedDict): - price: NotRequired[str] - """ - The ID of the price object. - """ - - class DeleteParams(TypedDict): - pass - - class ListParams(TypedDict): - created: NotRequired["InvoiceItemService.ListParamsCreated|int"] - """ - Only return invoice items that were created during the given date interval. - """ - customer: NotRequired[str] - """ - The identifier of the customer whose invoice items to return. If none is provided, all invoice items will be returned. - """ - customer_account: NotRequired[str] - """ - The identifier of the account whose invoice items to return. If none is provided, all invoice items will be returned. - """ - 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. - """ - invoice: NotRequired[str] - """ - Only return invoice items belonging to this invoice. If none is provided, all invoice items will be returned. If specifying an invoice, no customer identifier is needed. - """ - 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. - """ - pending: NotRequired[bool] - """ - Set to `true` to only show pending invoice items, which are not yet attached to any invoices. Set to `false` to only show invoice items already attached to invoices. If unspecified, no filter is applied. - """ - 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 ListParamsCreated(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) - """ - - class RetrieveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class UpdateParams(TypedDict): - amount: NotRequired[int] - """ - The integer amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. If you want to apply a credit to the customer's account, pass a negative amount. - """ - description: NotRequired[str] - """ - An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking. - """ - discountable: NotRequired[bool] - """ - Controls whether discounts apply to this invoice item. Defaults to false for prorations or negative invoice items, and true for all other invoice items. Cannot be set to true for prorations. - """ - discounts: NotRequired[ - "Literal['']|List[InvoiceItemService.UpdateParamsDiscount]" - ] - """ - The coupons, promotion codes & existing discounts which apply to the invoice item or invoice line item. Item discounts are applied before invoice discounts. Pass an empty string to remove previously-defined discounts. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - margins: NotRequired["Literal['']|List[str]"] - """ - The ids of the margins to apply to the invoice item. When set, the `default_margins` on the invoice do not apply to this invoice item. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - period: NotRequired["InvoiceItemService.UpdateParamsPeriod"] - """ - The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details. - """ - price_data: NotRequired["InvoiceItemService.UpdateParamsPriceData"] - """ - Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. - """ - pricing: NotRequired["InvoiceItemService.UpdateParamsPricing"] - """ - The pricing information for the invoice item. - """ - quantity: NotRequired[int] - """ - Non-negative integer. The quantity of units for the invoice item. - """ - tax_behavior: NotRequired[ - Literal["exclusive", "inclusive", "unspecified"] - ] - """ - Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. - """ - tax_code: NotRequired["Literal['']|str"] - """ - A [tax code](https://stripe.com/docs/tax/tax-categories) ID. - """ - tax_rates: NotRequired["Literal['']|List[str]"] - """ - The tax rates which apply to the invoice item. When set, the `default_tax_rates` on the invoice do not apply to this invoice item. Pass an empty string to remove previously-defined tax rates. - """ - unit_amount_decimal: NotRequired[str] - """ - The decimal unit amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. This `unit_amount_decimal` will be multiplied by the quantity to get the full amount. Passing in a negative `unit_amount_decimal` will reduce the `amount_due` on the invoice. Accepts at most 12 decimal places. - """ - - class UpdateParamsDiscount(TypedDict): - coupon: NotRequired[str] - """ - ID of the coupon to create a new discount for. - """ - discount: NotRequired[str] - """ - ID of an existing discount on the object (or one of its ancestors) to reuse. - """ - discount_end: NotRequired[ - "InvoiceItemService.UpdateParamsDiscountDiscountEnd" - ] - """ - Details to determine how long the discount should be applied for. - """ - promotion_code: NotRequired[str] - """ - ID of the promotion code to create a new discount for. - """ - - class UpdateParamsDiscountDiscountEnd(TypedDict): - duration: NotRequired[ - "InvoiceItemService.UpdateParamsDiscountDiscountEndDuration" - ] - """ - Time span for the redeemed discount. - """ - timestamp: NotRequired[int] - """ - A precise Unix timestamp for the discount to end. Must be in the future. - """ - type: Literal["duration", "timestamp"] - """ - The type of calculation made to determine when the discount ends. - """ - - class UpdateParamsDiscountDiscountEndDuration(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. - """ - interval_count: int - """ - The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. - """ - - class UpdateParamsPeriod(TypedDict): - end: int - """ - The end of the period, which must be greater than or equal to the start. This value is inclusive. - """ - start: int - """ - The start of the period. This value is inclusive. - """ - - class UpdateParamsPriceData(TypedDict): - 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). - """ - product: str - """ - The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to. - """ - tax_behavior: NotRequired[ - Literal["exclusive", "inclusive", "unspecified"] - ] - """ - Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. - """ - unit_amount: NotRequired[int] - """ - A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. - """ - unit_amount_decimal: NotRequired[str] - """ - Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - """ - - class UpdateParamsPricing(TypedDict): - price: NotRequired[str] - """ - The ID of the price object. - """ - def delete( self, invoiceitem: str, - params: Optional["InvoiceItemService.DeleteParams"] = None, + params: Optional["InvoiceItemDeleteParams"] = None, options: Optional[RequestOptions] = None, ) -> InvoiceItem: """ @@ -424,7 +50,7 @@ def delete( async def delete_async( self, invoiceitem: str, - params: Optional["InvoiceItemService.DeleteParams"] = None, + params: Optional["InvoiceItemDeleteParams"] = None, options: Optional[RequestOptions] = None, ) -> InvoiceItem: """ @@ -446,7 +72,7 @@ async def delete_async( def retrieve( self, invoiceitem: str, - params: Optional["InvoiceItemService.RetrieveParams"] = None, + params: Optional["InvoiceItemRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> InvoiceItem: """ @@ -468,7 +94,7 @@ def retrieve( async def retrieve_async( self, invoiceitem: str, - params: Optional["InvoiceItemService.RetrieveParams"] = None, + params: Optional["InvoiceItemRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> InvoiceItem: """ @@ -490,7 +116,7 @@ async def retrieve_async( def update( self, invoiceitem: str, - params: Optional["InvoiceItemService.UpdateParams"] = None, + params: Optional["InvoiceItemUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> InvoiceItem: """ @@ -512,7 +138,7 @@ def update( async def update_async( self, invoiceitem: str, - params: Optional["InvoiceItemService.UpdateParams"] = None, + params: Optional["InvoiceItemUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> InvoiceItem: """ @@ -533,7 +159,7 @@ async def update_async( def list( self, - params: Optional["InvoiceItemService.ListParams"] = None, + params: Optional["InvoiceItemListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[InvoiceItem]: """ @@ -552,7 +178,7 @@ def list( async def list_async( self, - params: Optional["InvoiceItemService.ListParams"] = None, + params: Optional["InvoiceItemListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[InvoiceItem]: """ @@ -571,7 +197,7 @@ async def list_async( def create( self, - params: Optional["InvoiceItemService.CreateParams"] = None, + params: Optional["InvoiceItemCreateParams"] = None, options: Optional[RequestOptions] = None, ) -> InvoiceItem: """ @@ -590,7 +216,7 @@ def create( async def create_async( self, - params: Optional["InvoiceItemService.CreateParams"] = None, + params: Optional["InvoiceItemCreateParams"] = None, options: Optional[RequestOptions] = None, ) -> InvoiceItem: """ diff --git a/stripe/_invoice_line_item.py b/stripe/_invoice_line_item.py index 7e5145fc5..acf5463f2 100644 --- a/stripe/_invoice_line_item.py +++ b/stripe/_invoice_line_item.py @@ -1,18 +1,11 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._expandable_field import ExpandableField -from stripe._request_options import RequestOptions from stripe._stripe_object import StripeObject from stripe._updateable_api_resource import UpdateableAPIResource from stripe._util import sanitize_id from typing import ClassVar, Dict, List, Optional, cast -from typing_extensions import ( - Literal, - NotRequired, - TypedDict, - Unpack, - TYPE_CHECKING, -) +from typing_extensions import Literal, TYPE_CHECKING if TYPE_CHECKING: from stripe._discount import Discount @@ -356,279 +349,6 @@ class TaxRateDetails(StripeObject): """ _inner_class_types = {"tax_rate_details": TaxRateDetails} - class ModifyParams(RequestOptions): - amount: NotRequired[int] - """ - The integer amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. If you want to apply a credit to the customer's account, pass a negative amount. - """ - description: NotRequired[str] - """ - An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking. - """ - discountable: NotRequired[bool] - """ - Controls whether discounts apply to this line item. Defaults to false for prorations or negative line items, and true for all other line items. Cannot be set to true for prorations. - """ - discounts: NotRequired[ - "Literal['']|List[InvoiceLineItem.ModifyParamsDiscount]" - ] - """ - The coupons, promotion codes & existing discounts which apply to the line item. Item discounts are applied before invoice discounts. Pass an empty string to remove previously-defined discounts. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - margins: NotRequired["Literal['']|List[str]"] - """ - The IDs of the margins to apply to the line item. When set, the `default_margins` on the invoice do not apply to this line item. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. For [type=subscription](https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-type) line items, the incoming metadata specified on the request is directly used to set this value, in contrast to [type=invoiceitem](api/invoices/line_item#invoice_line_item_object-type) line items, where any existing metadata on the invoice line is merged with the incoming data. - """ - period: NotRequired["InvoiceLineItem.ModifyParamsPeriod"] - """ - The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details. - """ - price_data: NotRequired["InvoiceLineItem.ModifyParamsPriceData"] - """ - Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. - """ - pricing: NotRequired["InvoiceLineItem.ModifyParamsPricing"] - """ - The pricing information for the invoice item. - """ - quantity: NotRequired[int] - """ - Non-negative integer. The quantity of units for the line item. - """ - tax_amounts: NotRequired[ - "Literal['']|List[InvoiceLineItem.ModifyParamsTaxAmount]" - ] - """ - A list of up to 10 tax amounts for this line item. This can be useful if you calculate taxes on your own or use a third-party to calculate them. You cannot set tax amounts if any line item has [tax_rates](https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-tax_rates) or if the invoice has [default_tax_rates](https://stripe.com/docs/api/invoices/object#invoice_object-default_tax_rates) or uses [automatic tax](https://stripe.com/docs/tax/invoicing). Pass an empty string to remove previously defined tax amounts. - """ - tax_rates: NotRequired["Literal['']|List[str]"] - """ - The tax rates which apply to the line item. When set, the `default_tax_rates` on the invoice do not apply to this line item. Pass an empty string to remove previously-defined tax rates. - """ - - class ModifyParamsDiscount(TypedDict): - coupon: NotRequired[str] - """ - ID of the coupon to create a new discount for. - """ - discount: NotRequired[str] - """ - ID of an existing discount on the object (or one of its ancestors) to reuse. - """ - discount_end: NotRequired[ - "InvoiceLineItem.ModifyParamsDiscountDiscountEnd" - ] - """ - Details to determine how long the discount should be applied for. - """ - promotion_code: NotRequired[str] - """ - ID of the promotion code to create a new discount for. - """ - - class ModifyParamsDiscountDiscountEnd(TypedDict): - duration: NotRequired[ - "InvoiceLineItem.ModifyParamsDiscountDiscountEndDuration" - ] - """ - Time span for the redeemed discount. - """ - timestamp: NotRequired[int] - """ - A precise Unix timestamp for the discount to end. Must be in the future. - """ - type: Literal["duration", "timestamp"] - """ - The type of calculation made to determine when the discount ends. - """ - - class ModifyParamsDiscountDiscountEndDuration(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. - """ - interval_count: int - """ - The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. - """ - - class ModifyParamsPeriod(TypedDict): - end: int - """ - The end of the period, which must be greater than or equal to the start. This value is inclusive. - """ - start: int - """ - The start of the period. This value is inclusive. - """ - - class ModifyParamsPriceData(TypedDict): - 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). - """ - product: NotRequired[str] - """ - The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to. One of `product` or `product_data` is required. - """ - product_data: NotRequired[ - "InvoiceLineItem.ModifyParamsPriceDataProductData" - ] - """ - Data used to generate a new [Product](https://docs.stripe.com/api/products) object inline. One of `product` or `product_data` is required. - """ - tax_behavior: NotRequired[ - Literal["exclusive", "inclusive", "unspecified"] - ] - """ - Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. - """ - unit_amount: NotRequired[int] - """ - A non-negative integer in cents (or local equivalent) representing how much to charge. One of `unit_amount` or `unit_amount_decimal` is required. - """ - unit_amount_decimal: NotRequired[str] - """ - Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - """ - - class ModifyParamsPriceDataProductData(TypedDict): - description: NotRequired[str] - """ - The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. - """ - images: NotRequired[List[str]] - """ - A list of up to 8 URLs of images for this product, meant to be displayable to the customer. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - name: str - """ - The product's name, meant to be displayable to the customer. - """ - tax_code: NotRequired[str] - """ - A [tax code](https://stripe.com/docs/tax/tax-categories) ID. - """ - unit_label: NotRequired[str] - """ - A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal. - """ - - class ModifyParamsPricing(TypedDict): - price: NotRequired[str] - """ - The ID of the price object. - """ - - class ModifyParamsTaxAmount(TypedDict): - amount: int - """ - The amount, in cents (or local equivalent), of the tax. - """ - tax_rate_data: "InvoiceLineItem.ModifyParamsTaxAmountTaxRateData" - """ - Data to find or create a TaxRate object. - - Stripe automatically creates or reuses a TaxRate object for each tax amount. If the `tax_rate_data` exactly matches a previous value, Stripe will reuse the TaxRate object. TaxRate objects created automatically by Stripe are immediately archived, do not appear in the line item's `tax_rates`, and cannot be directly added to invoices, payments, or line items. - """ - taxability_reason: NotRequired[ - Literal[ - "customer_exempt", - "not_collecting", - "not_subject_to_tax", - "not_supported", - "portion_product_exempt", - "portion_reduced_rated", - "portion_standard_rated", - "product_exempt", - "product_exempt_holiday", - "proportionally_rated", - "reduced_rated", - "reverse_charge", - "standard_rated", - "taxable_basis_reduced", - "zero_rated", - ] - ] - """ - The reasoning behind this tax, for example, if the product is tax exempt. - """ - taxable_amount: int - """ - The amount on which tax is calculated, in cents (or local equivalent). - """ - - class ModifyParamsTaxAmountTaxRateData(TypedDict): - country: NotRequired[str] - """ - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - """ - description: NotRequired[str] - """ - An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers. - """ - display_name: str - """ - The display name of the tax rate, which will be shown to users. - """ - inclusive: bool - """ - This specifies if the tax rate is inclusive or exclusive. - """ - jurisdiction: NotRequired[str] - """ - The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer's invoice. - """ - jurisdiction_level: NotRequired[ - Literal[ - "city", "country", "county", "district", "multiple", "state" - ] - ] - """ - The level of the jurisdiction that imposes this tax rate. - """ - percentage: float - """ - The statutory tax rate percent. This field accepts decimal values between 0 and 100 inclusive with at most 4 decimal places. To accommodate fixed-amount taxes, set the percentage to zero. Stripe will not display zero percentages on the invoice unless the `amount` of the tax is also zero. - """ - state: NotRequired[str] - """ - [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States. - """ - tax_type: NotRequired[ - Literal[ - "amusement_tax", - "communications_tax", - "gst", - "hst", - "igst", - "jct", - "lease_tax", - "pst", - "qst", - "retail_delivery_fee", - "rst", - "sales_tax", - "service_tax", - "vat", - ] - ] - """ - The high-level tax type, such as `vat` or `sales_tax`. - """ - amount: int """ The amount, in cents (or local equivalent). @@ -710,7 +430,7 @@ class ModifyParamsTaxAmountTaxRateData(TypedDict): @classmethod def modify( - cls, id: str, **params: Unpack["InvoiceLineItem.ModifyParams"] + cls, invoice: str, line_item_id: str, **params ) -> "InvoiceLineItem": """ Updates an invoice's line item. Some fields, such as tax_amounts, only live on the invoice line item, @@ -718,7 +438,10 @@ def modify( item and the invoice line item, so updates on this endpoint will propagate to the invoice item as well. Updating an invoice's line item is only possible before the invoice is finalized. """ - url = "%s/%s" % (cls.class_url(), sanitize_id(id)) + url = "/v1/invoices/%s/lines/%s" % ( + sanitize_id(invoice), + sanitize_id(line_item_id), + ) return cast( "InvoiceLineItem", cls._static_request( @@ -730,7 +453,7 @@ def modify( @classmethod async def modify_async( - cls, id: str, **params: Unpack["InvoiceLineItem.ModifyParams"] + cls, invoice: str, line_item_id: str, **params ) -> "InvoiceLineItem": """ Updates an invoice's line item. Some fields, such as tax_amounts, only live on the invoice line item, @@ -738,7 +461,10 @@ async def modify_async( item and the invoice line item, so updates on this endpoint will propagate to the invoice item as well. Updating an invoice's line item is only possible before the invoice is finalized. """ - url = "%s/%s" % (cls.class_url(), sanitize_id(id)) + url = "/v1/invoices/%s/lines/%s" % ( + sanitize_id(invoice), + sanitize_id(line_item_id), + ) return cast( "InvoiceLineItem", await cls._static_request_async( diff --git a/stripe/_invoice_line_item_service.py b/stripe/_invoice_line_item_service.py index 229cf7164..b5d2c43b8 100644 --- a/stripe/_invoice_line_item_service.py +++ b/stripe/_invoice_line_item_service.py @@ -5,308 +5,23 @@ from stripe._request_options import RequestOptions from stripe._stripe_service import StripeService from stripe._util import sanitize_id -from typing import Dict, List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params._invoice_line_item_list_params import ( + InvoiceLineItemListParams, + ) + from stripe.params._invoice_line_item_update_params import ( + InvoiceLineItemUpdateParams, + ) -class InvoiceLineItemService(StripeService): - class ListParams(TypedDict): - 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 UpdateParams(TypedDict): - amount: NotRequired[int] - """ - The integer amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. If you want to apply a credit to the customer's account, pass a negative amount. - """ - description: NotRequired[str] - """ - An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking. - """ - discountable: NotRequired[bool] - """ - Controls whether discounts apply to this line item. Defaults to false for prorations or negative line items, and true for all other line items. Cannot be set to true for prorations. - """ - discounts: NotRequired[ - "Literal['']|List[InvoiceLineItemService.UpdateParamsDiscount]" - ] - """ - The coupons, promotion codes & existing discounts which apply to the line item. Item discounts are applied before invoice discounts. Pass an empty string to remove previously-defined discounts. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - margins: NotRequired["Literal['']|List[str]"] - """ - The IDs of the margins to apply to the line item. When set, the `default_margins` on the invoice do not apply to this line item. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. For [type=subscription](https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-type) line items, the incoming metadata specified on the request is directly used to set this value, in contrast to [type=invoiceitem](api/invoices/line_item#invoice_line_item_object-type) line items, where any existing metadata on the invoice line is merged with the incoming data. - """ - period: NotRequired["InvoiceLineItemService.UpdateParamsPeriod"] - """ - The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details. - """ - price_data: NotRequired["InvoiceLineItemService.UpdateParamsPriceData"] - """ - Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. - """ - pricing: NotRequired["InvoiceLineItemService.UpdateParamsPricing"] - """ - The pricing information for the invoice item. - """ - quantity: NotRequired[int] - """ - Non-negative integer. The quantity of units for the line item. - """ - tax_amounts: NotRequired[ - "Literal['']|List[InvoiceLineItemService.UpdateParamsTaxAmount]" - ] - """ - A list of up to 10 tax amounts for this line item. This can be useful if you calculate taxes on your own or use a third-party to calculate them. You cannot set tax amounts if any line item has [tax_rates](https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-tax_rates) or if the invoice has [default_tax_rates](https://stripe.com/docs/api/invoices/object#invoice_object-default_tax_rates) or uses [automatic tax](https://stripe.com/docs/tax/invoicing). Pass an empty string to remove previously defined tax amounts. - """ - tax_rates: NotRequired["Literal['']|List[str]"] - """ - The tax rates which apply to the line item. When set, the `default_tax_rates` on the invoice do not apply to this line item. Pass an empty string to remove previously-defined tax rates. - """ - - class UpdateParamsDiscount(TypedDict): - coupon: NotRequired[str] - """ - ID of the coupon to create a new discount for. - """ - discount: NotRequired[str] - """ - ID of an existing discount on the object (or one of its ancestors) to reuse. - """ - discount_end: NotRequired[ - "InvoiceLineItemService.UpdateParamsDiscountDiscountEnd" - ] - """ - Details to determine how long the discount should be applied for. - """ - promotion_code: NotRequired[str] - """ - ID of the promotion code to create a new discount for. - """ - - class UpdateParamsDiscountDiscountEnd(TypedDict): - duration: NotRequired[ - "InvoiceLineItemService.UpdateParamsDiscountDiscountEndDuration" - ] - """ - Time span for the redeemed discount. - """ - timestamp: NotRequired[int] - """ - A precise Unix timestamp for the discount to end. Must be in the future. - """ - type: Literal["duration", "timestamp"] - """ - The type of calculation made to determine when the discount ends. - """ - - class UpdateParamsDiscountDiscountEndDuration(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. - """ - interval_count: int - """ - The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. - """ - - class UpdateParamsPeriod(TypedDict): - end: int - """ - The end of the period, which must be greater than or equal to the start. This value is inclusive. - """ - start: int - """ - The start of the period. This value is inclusive. - """ - - class UpdateParamsPriceData(TypedDict): - 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). - """ - product: NotRequired[str] - """ - The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to. One of `product` or `product_data` is required. - """ - product_data: NotRequired[ - "InvoiceLineItemService.UpdateParamsPriceDataProductData" - ] - """ - Data used to generate a new [Product](https://docs.stripe.com/api/products) object inline. One of `product` or `product_data` is required. - """ - tax_behavior: NotRequired[ - Literal["exclusive", "inclusive", "unspecified"] - ] - """ - Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. - """ - unit_amount: NotRequired[int] - """ - A non-negative integer in cents (or local equivalent) representing how much to charge. One of `unit_amount` or `unit_amount_decimal` is required. - """ - unit_amount_decimal: NotRequired[str] - """ - Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - """ - - class UpdateParamsPriceDataProductData(TypedDict): - description: NotRequired[str] - """ - The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. - """ - images: NotRequired[List[str]] - """ - A list of up to 8 URLs of images for this product, meant to be displayable to the customer. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - name: str - """ - The product's name, meant to be displayable to the customer. - """ - tax_code: NotRequired[str] - """ - A [tax code](https://stripe.com/docs/tax/tax-categories) ID. - """ - unit_label: NotRequired[str] - """ - A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal. - """ - - class UpdateParamsPricing(TypedDict): - price: NotRequired[str] - """ - The ID of the price object. - """ - - class UpdateParamsTaxAmount(TypedDict): - amount: int - """ - The amount, in cents (or local equivalent), of the tax. - """ - tax_rate_data: ( - "InvoiceLineItemService.UpdateParamsTaxAmountTaxRateData" - ) - """ - Data to find or create a TaxRate object. - - Stripe automatically creates or reuses a TaxRate object for each tax amount. If the `tax_rate_data` exactly matches a previous value, Stripe will reuse the TaxRate object. TaxRate objects created automatically by Stripe are immediately archived, do not appear in the line item's `tax_rates`, and cannot be directly added to invoices, payments, or line items. - """ - taxability_reason: NotRequired[ - Literal[ - "customer_exempt", - "not_collecting", - "not_subject_to_tax", - "not_supported", - "portion_product_exempt", - "portion_reduced_rated", - "portion_standard_rated", - "product_exempt", - "product_exempt_holiday", - "proportionally_rated", - "reduced_rated", - "reverse_charge", - "standard_rated", - "taxable_basis_reduced", - "zero_rated", - ] - ] - """ - The reasoning behind this tax, for example, if the product is tax exempt. - """ - taxable_amount: int - """ - The amount on which tax is calculated, in cents (or local equivalent). - """ - - class UpdateParamsTaxAmountTaxRateData(TypedDict): - country: NotRequired[str] - """ - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - """ - description: NotRequired[str] - """ - An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers. - """ - display_name: str - """ - The display name of the tax rate, which will be shown to users. - """ - inclusive: bool - """ - This specifies if the tax rate is inclusive or exclusive. - """ - jurisdiction: NotRequired[str] - """ - The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer's invoice. - """ - jurisdiction_level: NotRequired[ - Literal[ - "city", "country", "county", "district", "multiple", "state" - ] - ] - """ - The level of the jurisdiction that imposes this tax rate. - """ - percentage: float - """ - The statutory tax rate percent. This field accepts decimal values between 0 and 100 inclusive with at most 4 decimal places. To accommodate fixed-amount taxes, set the percentage to zero. Stripe will not display zero percentages on the invoice unless the `amount` of the tax is also zero. - """ - state: NotRequired[str] - """ - [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States. - """ - tax_type: NotRequired[ - Literal[ - "amusement_tax", - "communications_tax", - "gst", - "hst", - "igst", - "jct", - "lease_tax", - "pst", - "qst", - "retail_delivery_fee", - "rst", - "sales_tax", - "service_tax", - "vat", - ] - ] - """ - The high-level tax type, such as `vat` or `sales_tax`. - """ +class InvoiceLineItemService(StripeService): def list( self, invoice: str, - params: Optional["InvoiceLineItemService.ListParams"] = None, + params: Optional["InvoiceLineItemListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[InvoiceLineItem]: """ @@ -328,7 +43,7 @@ def list( async def list_async( self, invoice: str, - params: Optional["InvoiceLineItemService.ListParams"] = None, + params: Optional["InvoiceLineItemListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[InvoiceLineItem]: """ @@ -351,7 +66,7 @@ def update( self, invoice: str, line_item_id: str, - params: Optional["InvoiceLineItemService.UpdateParams"] = None, + params: Optional["InvoiceLineItemUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> InvoiceLineItem: """ @@ -378,7 +93,7 @@ async def update_async( self, invoice: str, line_item_id: str, - params: Optional["InvoiceLineItemService.UpdateParams"] = None, + params: Optional["InvoiceLineItemUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> InvoiceLineItem: """ diff --git a/stripe/_invoice_payment.py b/stripe/_invoice_payment.py index ca94beb09..203fec916 100644 --- a/stripe/_invoice_payment.py +++ b/stripe/_invoice_payment.py @@ -3,22 +3,21 @@ from stripe._expandable_field import ExpandableField from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource -from stripe._request_options import RequestOptions from stripe._stripe_object import StripeObject -from typing import ClassVar, List, Optional -from typing_extensions import ( - Literal, - NotRequired, - TypedDict, - Unpack, - TYPE_CHECKING, -) +from typing import ClassVar, Optional +from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: from stripe._charge import Charge from stripe._invoice import Invoice from stripe._payment_intent import PaymentIntent from stripe._payment_record import PaymentRecord + from stripe.params._invoice_payment_list_params import ( + InvoicePaymentListParams, + ) + from stripe.params._invoice_payment_retrieve_params import ( + InvoicePaymentRetrieveParams, + ) class InvoicePayment(ListableAPIResource["InvoicePayment"]): @@ -63,56 +62,6 @@ class StatusTransitions(StripeObject): The time that the payment succeeded. """ - class ListParams(RequestOptions): - 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. - """ - invoice: NotRequired[str] - """ - The identifier of the invoice whose payments to return. - """ - 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. - """ - payment: NotRequired["InvoicePayment.ListParamsPayment"] - """ - The payment details of the invoice payments to return. - """ - 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. - """ - status: NotRequired[Literal["canceled", "open", "paid"]] - """ - The status of the invoice payments to return. - """ - - class ListParamsPayment(TypedDict): - payment_intent: NotRequired[str] - """ - Only return invoice payments associated by this payment intent ID. - """ - payment_record: NotRequired[str] - """ - Only return invoice payments associated by this payment record ID. - """ - type: Literal["payment_intent", "payment_record"] - """ - Only return invoice payments associated by this payment type. - """ - - class RetrieveParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - amount_paid: Optional[int] """ Amount that was actually paid for this invoice, in cents (or local equivalent). This field is null until the payment is `paid`. This amount can be less than the `amount_requested` if the PaymentIntent's `amount_received` is not sufficient to pay all of the invoices that it is attached to. @@ -158,7 +107,7 @@ class RetrieveParams(RequestOptions): @classmethod def list( - cls, **params: Unpack["InvoicePayment.ListParams"] + cls, **params: Unpack["InvoicePaymentListParams"] ) -> ListObject["InvoicePayment"]: """ When retrieving an invoice, there is an includable payments property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of payments. @@ -178,7 +127,7 @@ def list( @classmethod async def list_async( - cls, **params: Unpack["InvoicePayment.ListParams"] + cls, **params: Unpack["InvoicePaymentListParams"] ) -> ListObject["InvoicePayment"]: """ When retrieving an invoice, there is an includable payments property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of payments. @@ -198,7 +147,7 @@ async def list_async( @classmethod def retrieve( - cls, id: str, **params: Unpack["InvoicePayment.RetrieveParams"] + cls, id: str, **params: Unpack["InvoicePaymentRetrieveParams"] ) -> "InvoicePayment": """ Retrieves the invoice payment with the given ID. @@ -209,7 +158,7 @@ def retrieve( @classmethod async def retrieve_async( - cls, id: str, **params: Unpack["InvoicePayment.RetrieveParams"] + cls, id: str, **params: Unpack["InvoicePaymentRetrieveParams"] ) -> "InvoicePayment": """ Retrieves the invoice payment with the given ID. diff --git a/stripe/_invoice_payment_service.py b/stripe/_invoice_payment_service.py index 6af4af5a1..2db3c93a7 100644 --- a/stripe/_invoice_payment_service.py +++ b/stripe/_invoice_payment_service.py @@ -5,64 +5,22 @@ from stripe._request_options import RequestOptions from stripe._stripe_service import StripeService from stripe._util import sanitize_id -from typing import List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params._invoice_payment_list_params import ( + InvoicePaymentListParams, + ) + from stripe.params._invoice_payment_retrieve_params import ( + InvoicePaymentRetrieveParams, + ) -class InvoicePaymentService(StripeService): - class ListParams(TypedDict): - 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. - """ - invoice: NotRequired[str] - """ - The identifier of the invoice whose payments to return. - """ - 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. - """ - payment: NotRequired["InvoicePaymentService.ListParamsPayment"] - """ - The payment details of the invoice payments to return. - """ - 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. - """ - status: NotRequired[Literal["canceled", "open", "paid"]] - """ - The status of the invoice payments to return. - """ - - class ListParamsPayment(TypedDict): - payment_intent: NotRequired[str] - """ - Only return invoice payments associated by this payment intent ID. - """ - payment_record: NotRequired[str] - """ - Only return invoice payments associated by this payment record ID. - """ - type: Literal["payment_intent", "payment_record"] - """ - Only return invoice payments associated by this payment type. - """ - - class RetrieveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ +class InvoicePaymentService(StripeService): def list( self, - params: Optional["InvoicePaymentService.ListParams"] = None, + params: Optional["InvoicePaymentListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[InvoicePayment]: """ @@ -81,7 +39,7 @@ def list( async def list_async( self, - params: Optional["InvoicePaymentService.ListParams"] = None, + params: Optional["InvoicePaymentListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[InvoicePayment]: """ @@ -101,7 +59,7 @@ async def list_async( def retrieve( self, invoice_payment: str, - params: Optional["InvoicePaymentService.RetrieveParams"] = None, + params: Optional["InvoicePaymentRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> InvoicePayment: """ @@ -123,7 +81,7 @@ def retrieve( async def retrieve_async( self, invoice_payment: str, - params: Optional["InvoicePaymentService.RetrieveParams"] = None, + params: Optional["InvoicePaymentRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> InvoicePayment: """ diff --git a/stripe/_invoice_rendering_template.py b/stripe/_invoice_rendering_template.py index 5d7dc7e2f..93965201c 100644 --- a/stripe/_invoice_rendering_template.py +++ b/stripe/_invoice_rendering_template.py @@ -2,10 +2,23 @@ # File generated from our OpenAPI spec from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource -from stripe._request_options import RequestOptions from stripe._util import class_method_variant, sanitize_id -from typing import ClassVar, Dict, List, Optional, cast, overload -from typing_extensions import Literal, NotRequired, Unpack +from typing import ClassVar, Dict, Optional, cast, overload +from typing_extensions import Literal, Unpack, TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params._invoice_rendering_template_archive_params import ( + InvoiceRenderingTemplateArchiveParams, + ) + from stripe.params._invoice_rendering_template_list_params import ( + InvoiceRenderingTemplateListParams, + ) + from stripe.params._invoice_rendering_template_retrieve_params import ( + InvoiceRenderingTemplateRetrieveParams, + ) + from stripe.params._invoice_rendering_template_unarchive_params import ( + InvoiceRenderingTemplateUnarchiveParams, + ) class InvoiceRenderingTemplate( @@ -19,45 +32,6 @@ class InvoiceRenderingTemplate( OBJECT_NAME: ClassVar[Literal["invoice_rendering_template"]] = ( "invoice_rendering_template" ) - - class ArchiveParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class ListParams(RequestOptions): - 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. - """ - status: NotRequired[Literal["active", "archived"]] - - class RetrieveParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - version: NotRequired[int] - - class UnarchiveParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - created: int """ Time at which the object was created. Measured in seconds since the Unix epoch. @@ -95,7 +69,7 @@ class UnarchiveParams(RequestOptions): def _cls_archive( cls, template: str, - **params: Unpack["InvoiceRenderingTemplate.ArchiveParams"], + **params: Unpack["InvoiceRenderingTemplateArchiveParams"], ) -> "InvoiceRenderingTemplate": """ Updates the status of an invoice rendering template to ‘archived' so no new Stripe objects (customers, invoices, etc.) can reference it. The template can also no longer be updated. However, if the template is already set on a Stripe object, it will continue to be applied on invoices generated by it. @@ -115,7 +89,7 @@ def _cls_archive( @staticmethod def archive( template: str, - **params: Unpack["InvoiceRenderingTemplate.ArchiveParams"], + **params: Unpack["InvoiceRenderingTemplateArchiveParams"], ) -> "InvoiceRenderingTemplate": """ Updates the status of an invoice rendering template to ‘archived' so no new Stripe objects (customers, invoices, etc.) can reference it. The template can also no longer be updated. However, if the template is already set on a Stripe object, it will continue to be applied on invoices generated by it. @@ -124,7 +98,7 @@ def archive( @overload def archive( - self, **params: Unpack["InvoiceRenderingTemplate.ArchiveParams"] + self, **params: Unpack["InvoiceRenderingTemplateArchiveParams"] ) -> "InvoiceRenderingTemplate": """ Updates the status of an invoice rendering template to ‘archived' so no new Stripe objects (customers, invoices, etc.) can reference it. The template can also no longer be updated. However, if the template is already set on a Stripe object, it will continue to be applied on invoices generated by it. @@ -133,7 +107,7 @@ def archive( @class_method_variant("_cls_archive") def archive( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["InvoiceRenderingTemplate.ArchiveParams"] + self, **params: Unpack["InvoiceRenderingTemplateArchiveParams"] ) -> "InvoiceRenderingTemplate": """ Updates the status of an invoice rendering template to ‘archived' so no new Stripe objects (customers, invoices, etc.) can reference it. The template can also no longer be updated. However, if the template is already set on a Stripe object, it will continue to be applied on invoices generated by it. @@ -153,7 +127,7 @@ def archive( # pyright: ignore[reportGeneralTypeIssues] async def _cls_archive_async( cls, template: str, - **params: Unpack["InvoiceRenderingTemplate.ArchiveParams"], + **params: Unpack["InvoiceRenderingTemplateArchiveParams"], ) -> "InvoiceRenderingTemplate": """ Updates the status of an invoice rendering template to ‘archived' so no new Stripe objects (customers, invoices, etc.) can reference it. The template can also no longer be updated. However, if the template is already set on a Stripe object, it will continue to be applied on invoices generated by it. @@ -173,7 +147,7 @@ async def _cls_archive_async( @staticmethod async def archive_async( template: str, - **params: Unpack["InvoiceRenderingTemplate.ArchiveParams"], + **params: Unpack["InvoiceRenderingTemplateArchiveParams"], ) -> "InvoiceRenderingTemplate": """ Updates the status of an invoice rendering template to ‘archived' so no new Stripe objects (customers, invoices, etc.) can reference it. The template can also no longer be updated. However, if the template is already set on a Stripe object, it will continue to be applied on invoices generated by it. @@ -182,7 +156,7 @@ async def archive_async( @overload async def archive_async( - self, **params: Unpack["InvoiceRenderingTemplate.ArchiveParams"] + self, **params: Unpack["InvoiceRenderingTemplateArchiveParams"] ) -> "InvoiceRenderingTemplate": """ Updates the status of an invoice rendering template to ‘archived' so no new Stripe objects (customers, invoices, etc.) can reference it. The template can also no longer be updated. However, if the template is already set on a Stripe object, it will continue to be applied on invoices generated by it. @@ -191,7 +165,7 @@ async def archive_async( @class_method_variant("_cls_archive_async") async def archive_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["InvoiceRenderingTemplate.ArchiveParams"] + self, **params: Unpack["InvoiceRenderingTemplateArchiveParams"] ) -> "InvoiceRenderingTemplate": """ Updates the status of an invoice rendering template to ‘archived' so no new Stripe objects (customers, invoices, etc.) can reference it. The template can also no longer be updated. However, if the template is already set on a Stripe object, it will continue to be applied on invoices generated by it. @@ -209,7 +183,7 @@ async def archive_async( # pyright: ignore[reportGeneralTypeIssues] @classmethod def list( - cls, **params: Unpack["InvoiceRenderingTemplate.ListParams"] + cls, **params: Unpack["InvoiceRenderingTemplateListParams"] ) -> ListObject["InvoiceRenderingTemplate"]: """ List all templates, ordered by creation date, with the most recently created template appearing first. @@ -229,7 +203,7 @@ def list( @classmethod async def list_async( - cls, **params: Unpack["InvoiceRenderingTemplate.ListParams"] + cls, **params: Unpack["InvoiceRenderingTemplateListParams"] ) -> ListObject["InvoiceRenderingTemplate"]: """ List all templates, ordered by creation date, with the most recently created template appearing first. @@ -251,7 +225,7 @@ async def list_async( def retrieve( cls, id: str, - **params: Unpack["InvoiceRenderingTemplate.RetrieveParams"], + **params: Unpack["InvoiceRenderingTemplateRetrieveParams"], ) -> "InvoiceRenderingTemplate": """ Retrieves an invoice rendering template with the given ID. It by default returns the latest version of the template. Optionally, specify a version to see previous versions. @@ -264,7 +238,7 @@ def retrieve( async def retrieve_async( cls, id: str, - **params: Unpack["InvoiceRenderingTemplate.RetrieveParams"], + **params: Unpack["InvoiceRenderingTemplateRetrieveParams"], ) -> "InvoiceRenderingTemplate": """ Retrieves an invoice rendering template with the given ID. It by default returns the latest version of the template. Optionally, specify a version to see previous versions. @@ -277,7 +251,7 @@ async def retrieve_async( def _cls_unarchive( cls, template: str, - **params: Unpack["InvoiceRenderingTemplate.UnarchiveParams"], + **params: Unpack["InvoiceRenderingTemplateUnarchiveParams"], ) -> "InvoiceRenderingTemplate": """ Unarchive an invoice rendering template so it can be used on new Stripe objects again. @@ -297,7 +271,7 @@ def _cls_unarchive( @staticmethod def unarchive( template: str, - **params: Unpack["InvoiceRenderingTemplate.UnarchiveParams"], + **params: Unpack["InvoiceRenderingTemplateUnarchiveParams"], ) -> "InvoiceRenderingTemplate": """ Unarchive an invoice rendering template so it can be used on new Stripe objects again. @@ -306,7 +280,7 @@ def unarchive( @overload def unarchive( - self, **params: Unpack["InvoiceRenderingTemplate.UnarchiveParams"] + self, **params: Unpack["InvoiceRenderingTemplateUnarchiveParams"] ) -> "InvoiceRenderingTemplate": """ Unarchive an invoice rendering template so it can be used on new Stripe objects again. @@ -315,7 +289,7 @@ def unarchive( @class_method_variant("_cls_unarchive") def unarchive( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["InvoiceRenderingTemplate.UnarchiveParams"] + self, **params: Unpack["InvoiceRenderingTemplateUnarchiveParams"] ) -> "InvoiceRenderingTemplate": """ Unarchive an invoice rendering template so it can be used on new Stripe objects again. @@ -335,7 +309,7 @@ def unarchive( # pyright: ignore[reportGeneralTypeIssues] async def _cls_unarchive_async( cls, template: str, - **params: Unpack["InvoiceRenderingTemplate.UnarchiveParams"], + **params: Unpack["InvoiceRenderingTemplateUnarchiveParams"], ) -> "InvoiceRenderingTemplate": """ Unarchive an invoice rendering template so it can be used on new Stripe objects again. @@ -355,7 +329,7 @@ async def _cls_unarchive_async( @staticmethod async def unarchive_async( template: str, - **params: Unpack["InvoiceRenderingTemplate.UnarchiveParams"], + **params: Unpack["InvoiceRenderingTemplateUnarchiveParams"], ) -> "InvoiceRenderingTemplate": """ Unarchive an invoice rendering template so it can be used on new Stripe objects again. @@ -364,7 +338,7 @@ async def unarchive_async( @overload async def unarchive_async( - self, **params: Unpack["InvoiceRenderingTemplate.UnarchiveParams"] + self, **params: Unpack["InvoiceRenderingTemplateUnarchiveParams"] ) -> "InvoiceRenderingTemplate": """ Unarchive an invoice rendering template so it can be used on new Stripe objects again. @@ -373,7 +347,7 @@ async def unarchive_async( @class_method_variant("_cls_unarchive_async") async def unarchive_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["InvoiceRenderingTemplate.UnarchiveParams"] + self, **params: Unpack["InvoiceRenderingTemplateUnarchiveParams"] ) -> "InvoiceRenderingTemplate": """ Unarchive an invoice rendering template so it can be used on new Stripe objects again. diff --git a/stripe/_invoice_rendering_template_service.py b/stripe/_invoice_rendering_template_service.py index 71a738c9e..b61ef1067 100644 --- a/stripe/_invoice_rendering_template_service.py +++ b/stripe/_invoice_rendering_template_service.py @@ -5,52 +5,28 @@ from stripe._request_options import RequestOptions from stripe._stripe_service import StripeService from stripe._util import sanitize_id -from typing import List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params._invoice_rendering_template_archive_params import ( + InvoiceRenderingTemplateArchiveParams, + ) + from stripe.params._invoice_rendering_template_list_params import ( + InvoiceRenderingTemplateListParams, + ) + from stripe.params._invoice_rendering_template_retrieve_params import ( + InvoiceRenderingTemplateRetrieveParams, + ) + from stripe.params._invoice_rendering_template_unarchive_params import ( + InvoiceRenderingTemplateUnarchiveParams, + ) -class InvoiceRenderingTemplateService(StripeService): - class ArchiveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class ListParams(TypedDict): - 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. - """ - status: NotRequired[Literal["active", "archived"]] - - class RetrieveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - version: NotRequired[int] - - class UnarchiveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ +class InvoiceRenderingTemplateService(StripeService): def list( self, - params: Optional["InvoiceRenderingTemplateService.ListParams"] = None, + params: Optional["InvoiceRenderingTemplateListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[InvoiceRenderingTemplate]: """ @@ -69,7 +45,7 @@ def list( async def list_async( self, - params: Optional["InvoiceRenderingTemplateService.ListParams"] = None, + params: Optional["InvoiceRenderingTemplateListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[InvoiceRenderingTemplate]: """ @@ -89,9 +65,7 @@ async def list_async( def retrieve( self, template: str, - params: Optional[ - "InvoiceRenderingTemplateService.RetrieveParams" - ] = None, + params: Optional["InvoiceRenderingTemplateRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> InvoiceRenderingTemplate: """ @@ -113,9 +87,7 @@ def retrieve( async def retrieve_async( self, template: str, - params: Optional[ - "InvoiceRenderingTemplateService.RetrieveParams" - ] = None, + params: Optional["InvoiceRenderingTemplateRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> InvoiceRenderingTemplate: """ @@ -137,9 +109,7 @@ async def retrieve_async( def archive( self, template: str, - params: Optional[ - "InvoiceRenderingTemplateService.ArchiveParams" - ] = None, + params: Optional["InvoiceRenderingTemplateArchiveParams"] = None, options: Optional[RequestOptions] = None, ) -> InvoiceRenderingTemplate: """ @@ -161,9 +131,7 @@ def archive( async def archive_async( self, template: str, - params: Optional[ - "InvoiceRenderingTemplateService.ArchiveParams" - ] = None, + params: Optional["InvoiceRenderingTemplateArchiveParams"] = None, options: Optional[RequestOptions] = None, ) -> InvoiceRenderingTemplate: """ @@ -185,9 +153,7 @@ async def archive_async( def unarchive( self, template: str, - params: Optional[ - "InvoiceRenderingTemplateService.UnarchiveParams" - ] = None, + params: Optional["InvoiceRenderingTemplateUnarchiveParams"] = None, options: Optional[RequestOptions] = None, ) -> InvoiceRenderingTemplate: """ @@ -209,9 +175,7 @@ def unarchive( async def unarchive_async( self, template: str, - params: Optional[ - "InvoiceRenderingTemplateService.UnarchiveParams" - ] = None, + params: Optional["InvoiceRenderingTemplateUnarchiveParams"] = None, options: Optional[RequestOptions] = None, ) -> InvoiceRenderingTemplate: """ diff --git a/stripe/_invoice_service.py b/stripe/_invoice_service.py index b02f425b1..19798e728 100644 --- a/stripe/_invoice_service.py +++ b/stripe/_invoice_service.py @@ -7,8 +7,42 @@ from stripe._search_result_object import SearchResultObject from stripe._stripe_service import StripeService from stripe._util import sanitize_id -from typing import Dict, List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params._invoice_add_lines_params import InvoiceAddLinesParams + from stripe.params._invoice_attach_payment_params import ( + InvoiceAttachPaymentParams, + ) + from stripe.params._invoice_create_params import InvoiceCreateParams + from stripe.params._invoice_create_preview_params import ( + InvoiceCreatePreviewParams, + ) + from stripe.params._invoice_delete_params import InvoiceDeleteParams + from stripe.params._invoice_finalize_invoice_params import ( + InvoiceFinalizeInvoiceParams, + ) + from stripe.params._invoice_list_params import InvoiceListParams + from stripe.params._invoice_mark_uncollectible_params import ( + InvoiceMarkUncollectibleParams, + ) + from stripe.params._invoice_pay_params import InvoicePayParams + from stripe.params._invoice_remove_lines_params import ( + InvoiceRemoveLinesParams, + ) + from stripe.params._invoice_retrieve_params import InvoiceRetrieveParams + from stripe.params._invoice_search_params import InvoiceSearchParams + from stripe.params._invoice_send_invoice_params import ( + InvoiceSendInvoiceParams, + ) + from stripe.params._invoice_update_lines_params import ( + InvoiceUpdateLinesParams, + ) + from stripe.params._invoice_update_params import InvoiceUpdateParams + from stripe.params._invoice_void_invoice_params import ( + InvoiceVoidInvoiceParams, + ) class InvoiceService(StripeService): @@ -16,4420 +50,10 @@ def __init__(self, requestor): super().__init__(requestor) self.line_items = InvoiceLineItemService(self._requestor) - class AddLinesParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - invoice_metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - lines: List["InvoiceService.AddLinesParamsLine"] - """ - The line items to add. - """ - - class AddLinesParamsLine(TypedDict): - amount: NotRequired[int] - """ - The integer amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. If you want to apply a credit to the customer's account, pass a negative amount. - """ - description: NotRequired[str] - """ - An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking. - """ - discountable: NotRequired[bool] - """ - Controls whether discounts apply to this line item. Defaults to false for prorations or negative line items, and true for all other line items. Cannot be set to true for prorations. - """ - discounts: NotRequired[ - "Literal['']|List[InvoiceService.AddLinesParamsLineDiscount]" - ] - """ - The coupons, promotion codes & existing discounts which apply to the line item. Item discounts are applied before invoice discounts. Pass an empty string to remove previously-defined discounts. - """ - invoice_item: NotRequired[str] - """ - ID of an unassigned invoice item to assign to this invoice. If not provided, a new item will be created. - """ - margins: NotRequired["Literal['']|List[str]"] - """ - The IDs of the margins to apply to the line item. When set, the `default_margins` on the invoice do not apply to this line item. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - period: NotRequired["InvoiceService.AddLinesParamsLinePeriod"] - """ - The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details. - """ - price_data: NotRequired["InvoiceService.AddLinesParamsLinePriceData"] - """ - Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. - """ - pricing: NotRequired["InvoiceService.AddLinesParamsLinePricing"] - """ - The pricing information for the invoice item. - """ - quantity: NotRequired[int] - """ - Non-negative integer. The quantity of units for the line item. - """ - tax_amounts: NotRequired[ - "Literal['']|List[InvoiceService.AddLinesParamsLineTaxAmount]" - ] - """ - A list of up to 10 tax amounts for this line item. This can be useful if you calculate taxes on your own or use a third-party to calculate them. You cannot set tax amounts if any line item has [tax_rates](https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-tax_rates) or if the invoice has [default_tax_rates](https://stripe.com/docs/api/invoices/object#invoice_object-default_tax_rates) or uses [automatic tax](https://stripe.com/docs/tax/invoicing). Pass an empty string to remove previously defined tax amounts. - """ - tax_rates: NotRequired["Literal['']|List[str]"] - """ - The tax rates which apply to the line item. When set, the `default_tax_rates` on the invoice do not apply to this line item. Pass an empty string to remove previously-defined tax rates. - """ - - class AddLinesParamsLineDiscount(TypedDict): - coupon: NotRequired[str] - """ - ID of the coupon to create a new discount for. - """ - discount: NotRequired[str] - """ - ID of an existing discount on the object (or one of its ancestors) to reuse. - """ - discount_end: NotRequired[ - "InvoiceService.AddLinesParamsLineDiscountDiscountEnd" - ] - """ - Details to determine how long the discount should be applied for. - """ - promotion_code: NotRequired[str] - """ - ID of the promotion code to create a new discount for. - """ - - class AddLinesParamsLineDiscountDiscountEnd(TypedDict): - duration: NotRequired[ - "InvoiceService.AddLinesParamsLineDiscountDiscountEndDuration" - ] - """ - Time span for the redeemed discount. - """ - timestamp: NotRequired[int] - """ - A precise Unix timestamp for the discount to end. Must be in the future. - """ - type: Literal["duration", "timestamp"] - """ - The type of calculation made to determine when the discount ends. - """ - - class AddLinesParamsLineDiscountDiscountEndDuration(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. - """ - interval_count: int - """ - The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. - """ - - class AddLinesParamsLinePeriod(TypedDict): - end: int - """ - The end of the period, which must be greater than or equal to the start. This value is inclusive. - """ - start: int - """ - The start of the period. This value is inclusive. - """ - - class AddLinesParamsLinePriceData(TypedDict): - 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). - """ - product: NotRequired[str] - """ - The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to. One of `product` or `product_data` is required. - """ - product_data: NotRequired[ - "InvoiceService.AddLinesParamsLinePriceDataProductData" - ] - """ - Data used to generate a new [Product](https://docs.stripe.com/api/products) object inline. One of `product` or `product_data` is required. - """ - tax_behavior: NotRequired[ - Literal["exclusive", "inclusive", "unspecified"] - ] - """ - Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. - """ - unit_amount: NotRequired[int] - """ - A non-negative integer in cents (or local equivalent) representing how much to charge. One of `unit_amount` or `unit_amount_decimal` is required. - """ - unit_amount_decimal: NotRequired[str] - """ - Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - """ - - class AddLinesParamsLinePriceDataProductData(TypedDict): - description: NotRequired[str] - """ - The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. - """ - images: NotRequired[List[str]] - """ - A list of up to 8 URLs of images for this product, meant to be displayable to the customer. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - name: str - """ - The product's name, meant to be displayable to the customer. - """ - tax_code: NotRequired[str] - """ - A [tax code](https://stripe.com/docs/tax/tax-categories) ID. - """ - unit_label: NotRequired[str] - """ - A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal. - """ - - class AddLinesParamsLinePricing(TypedDict): - price: NotRequired[str] - """ - The ID of the price object. - """ - - class AddLinesParamsLineTaxAmount(TypedDict): - amount: int - """ - The amount, in cents (or local equivalent), of the tax. - """ - tax_rate_data: "InvoiceService.AddLinesParamsLineTaxAmountTaxRateData" - """ - Data to find or create a TaxRate object. - - Stripe automatically creates or reuses a TaxRate object for each tax amount. If the `tax_rate_data` exactly matches a previous value, Stripe will reuse the TaxRate object. TaxRate objects created automatically by Stripe are immediately archived, do not appear in the line item's `tax_rates`, and cannot be directly added to invoices, payments, or line items. - """ - taxability_reason: NotRequired[ - Literal[ - "customer_exempt", - "not_collecting", - "not_subject_to_tax", - "not_supported", - "portion_product_exempt", - "portion_reduced_rated", - "portion_standard_rated", - "product_exempt", - "product_exempt_holiday", - "proportionally_rated", - "reduced_rated", - "reverse_charge", - "standard_rated", - "taxable_basis_reduced", - "zero_rated", - ] - ] - """ - The reasoning behind this tax, for example, if the product is tax exempt. - """ - taxable_amount: int - """ - The amount on which tax is calculated, in cents (or local equivalent). - """ - - class AddLinesParamsLineTaxAmountTaxRateData(TypedDict): - country: NotRequired[str] - """ - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - """ - description: NotRequired[str] - """ - An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers. - """ - display_name: str - """ - The display name of the tax rate, which will be shown to users. - """ - inclusive: bool - """ - This specifies if the tax rate is inclusive or exclusive. - """ - jurisdiction: NotRequired[str] - """ - The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer's invoice. - """ - jurisdiction_level: NotRequired[ - Literal[ - "city", "country", "county", "district", "multiple", "state" - ] - ] - """ - The level of the jurisdiction that imposes this tax rate. - """ - percentage: float - """ - The statutory tax rate percent. This field accepts decimal values between 0 and 100 inclusive with at most 4 decimal places. To accommodate fixed-amount taxes, set the percentage to zero. Stripe will not display zero percentages on the invoice unless the `amount` of the tax is also zero. - """ - state: NotRequired[str] - """ - [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States. - """ - tax_type: NotRequired[ - Literal[ - "amusement_tax", - "communications_tax", - "gst", - "hst", - "igst", - "jct", - "lease_tax", - "pst", - "qst", - "retail_delivery_fee", - "rst", - "sales_tax", - "service_tax", - "vat", - ] - ] - """ - The high-level tax type, such as `vat` or `sales_tax`. - """ - - class AttachPaymentParams(TypedDict): - amount_requested: NotRequired[int] - """ - The portion of the `amount` on the PaymentIntent or out of band payment to apply to this invoice. It defaults to the entire amount. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - payment_intent: NotRequired[str] - """ - The ID of the PaymentIntent to attach to the invoice. - """ - payment_record: NotRequired[str] - """ - The ID of the PaymentRecord to attach to the invoice. - """ - payment_record_data: NotRequired[ - "InvoiceService.AttachPaymentParamsPaymentRecordData" - ] - """ - The PaymentRecord data for attaching an out of band payment to the invoice. - """ - - class AttachPaymentParamsPaymentRecordData(TypedDict): - amount: int - """ - The amount that was paid out of band. - """ - currency: str - """ - The currency that was paid out of band. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - money_movement_type: str - """ - The type of money movement for this out of band payment record. - """ - paid_at: NotRequired[int] - """ - The timestamp when this out of band payment was paid. - """ - payment_reference: NotRequired[str] - """ - The reference for this out of band payment record. - """ - - class CreateParams(TypedDict): - account_tax_ids: NotRequired["Literal['']|List[str]"] - """ - The account tax IDs associated with the invoice. Only editable when the invoice is a draft. - """ - amounts_due: NotRequired[ - "Literal['']|List[InvoiceService.CreateParamsAmountsDue]" - ] - """ - List of expected payments and corresponding due dates. Valid only for invoices where `collection_method=send_invoice`. - """ - application_fee_amount: NotRequired[int] - """ - A fee in cents (or local equivalent) that will be applied to the invoice and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/billing/invoices/connect#collecting-fees). - """ - auto_advance: NotRequired[bool] - """ - Controls whether Stripe performs [automatic collection](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection) of the invoice. If `false`, the invoice's state doesn't automatically advance without an explicit action. Defaults to false. - """ - automatic_tax: NotRequired["InvoiceService.CreateParamsAutomaticTax"] - """ - Settings for automatic tax lookup for this invoice. - """ - automatically_finalizes_at: NotRequired[int] - """ - The time when this invoice should be scheduled to finalize (up to 5 years in the future). The invoice is finalized at this time if it's still in draft state. - """ - collection_method: NotRequired[ - Literal["charge_automatically", "send_invoice"] - ] - """ - Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this invoice using the default source attached to the customer. When sending an invoice, Stripe will email this invoice to the customer with payment instructions. Defaults to `charge_automatically`. - """ - currency: NotRequired[str] - """ - The currency to create this invoice in. Defaults to that of `customer` if not specified. - """ - custom_fields: NotRequired[ - "Literal['']|List[InvoiceService.CreateParamsCustomField]" - ] - """ - A list of up to 4 custom fields to be displayed on the invoice. - """ - customer: NotRequired[str] - """ - The ID of the customer who will be billed. - """ - customer_account: NotRequired[str] - """ - The ID of the account who will be billed. - """ - days_until_due: NotRequired[int] - """ - The number of days from when the invoice is created until it is due. Valid only for invoices where `collection_method=send_invoice`. - """ - default_margins: NotRequired[List[str]] - """ - The ids of the margins to apply to the invoice. Can be overridden by line item `margins`. - """ - default_payment_method: NotRequired[str] - """ - ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings. - """ - default_source: NotRequired[str] - """ - ID of the default payment source for the invoice. It must belong to the customer associated with the invoice and be in a chargeable state. If not set, defaults to the subscription's default source, if any, or to the customer's default source. - """ - default_tax_rates: NotRequired[List[str]] - """ - The tax rates that will apply to any line item that does not have `tax_rates` set. - """ - description: NotRequired[str] - """ - An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard. - """ - discounts: NotRequired[ - "Literal['']|List[InvoiceService.CreateParamsDiscount]" - ] - """ - The coupons and promotion codes to redeem into discounts for the invoice. If not specified, inherits the discount from the invoice's customer. Pass an empty string to avoid inheriting any discounts. - """ - due_date: NotRequired[int] - """ - The date on which payment for this invoice is due. Valid only for invoices where `collection_method=send_invoice`. - """ - effective_at: NotRequired[int] - """ - The date when this invoice is in effect. Same as `finalized_at` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the invoice PDF and receipt. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - footer: NotRequired[str] - """ - Footer to be displayed on the invoice. - """ - from_invoice: NotRequired["InvoiceService.CreateParamsFromInvoice"] - """ - Revise an existing invoice. The new invoice will be created in `status=draft`. See the [revision documentation](https://stripe.com/docs/invoicing/invoice-revisions) for more details. - """ - issuer: NotRequired["InvoiceService.CreateParamsIssuer"] - """ - The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - number: NotRequired[str] - """ - Set the number for this invoice. If no number is present then a number will be assigned automatically when the invoice is finalized. In many markets, regulations require invoices to be unique, sequential and / or gapless. You are responsible for ensuring this is true across all your different invoicing systems in the event that you edit the invoice number using our API. If you use only Stripe for your invoices and do not change invoice numbers, Stripe handles this aspect of compliance for you automatically. - """ - on_behalf_of: NotRequired[str] - """ - The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the [Invoices with Connect](https://stripe.com/docs/billing/invoices/connect) documentation for details. - """ - payment_settings: NotRequired[ - "InvoiceService.CreateParamsPaymentSettings" - ] - """ - Configuration settings for the PaymentIntent that is generated when the invoice is finalized. - """ - pending_invoice_items_behavior: NotRequired[ - Literal["exclude", "include"] - ] - """ - How to handle pending invoice items on invoice creation. Defaults to `exclude` if the parameter is omitted. - """ - rendering: NotRequired["InvoiceService.CreateParamsRendering"] - """ - The rendering-related settings that control how the invoice is displayed on customer-facing surfaces such as PDF and Hosted Invoice Page. - """ - shipping_cost: NotRequired["InvoiceService.CreateParamsShippingCost"] - """ - Settings for the cost of shipping for this invoice. - """ - shipping_details: NotRequired[ - "InvoiceService.CreateParamsShippingDetails" - ] - """ - Shipping details for the invoice. The Invoice PDF will use the `shipping_details` value if it is set, otherwise the PDF will render the shipping address from the customer. - """ - statement_descriptor: NotRequired[str] - """ - Extra information about a charge for the customer's credit card statement. It must contain at least one letter. If not specified and this invoice is part of a subscription, the default `statement_descriptor` will be set to the first subscription item's product's `statement_descriptor`. - """ - subscription: NotRequired[str] - """ - The ID of the subscription to invoice, if any. If set, the created invoice will only include pending invoice items for that subscription. The subscription's billing cycle and regular subscription events won't be affected. - """ - transfer_data: NotRequired["InvoiceService.CreateParamsTransferData"] - """ - If specified, the funds from the invoice will be transferred to the destination and the ID of the resulting transfer will be found on the invoice's charge. - """ - - class CreateParamsAmountsDue(TypedDict): - amount: int - """ - The amount in cents (or local equivalent). - """ - days_until_due: NotRequired[int] - """ - Number of days from when invoice is finalized until the payment is due. - """ - description: str - """ - An arbitrary string attached to the object. Often useful for displaying to users. - """ - due_date: NotRequired[int] - """ - Date on which a payment plan's payment is due. - """ - - class CreateParamsAutomaticTax(TypedDict): - enabled: bool - """ - Whether Stripe automatically computes tax on this invoice. Note that incompatible invoice items (invoice items with manually specified [tax rates](https://stripe.com/docs/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices. - """ - liability: NotRequired[ - "InvoiceService.CreateParamsAutomaticTaxLiability" - ] - """ - The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. - """ - - class CreateParamsAutomaticTaxLiability(TypedDict): - account: NotRequired[str] - """ - The connected account being referenced when `type` is `account`. - """ - type: Literal["account", "self"] - """ - Type of the account referenced in the request. - """ - - class CreateParamsCustomField(TypedDict): - name: str - """ - The name of the custom field. This may be up to 40 characters. - """ - value: str - """ - The value of the custom field. This may be up to 140 characters. - """ - - class CreateParamsDiscount(TypedDict): - coupon: NotRequired[str] - """ - ID of the coupon to create a new discount for. - """ - discount: NotRequired[str] - """ - ID of an existing discount on the object (or one of its ancestors) to reuse. - """ - discount_end: NotRequired[ - "InvoiceService.CreateParamsDiscountDiscountEnd" - ] - """ - Details to determine how long the discount should be applied for. - """ - promotion_code: NotRequired[str] - """ - ID of the promotion code to create a new discount for. - """ - - class CreateParamsDiscountDiscountEnd(TypedDict): - duration: NotRequired[ - "InvoiceService.CreateParamsDiscountDiscountEndDuration" - ] - """ - Time span for the redeemed discount. - """ - timestamp: NotRequired[int] - """ - A precise Unix timestamp for the discount to end. Must be in the future. - """ - type: Literal["duration", "timestamp"] - """ - The type of calculation made to determine when the discount ends. - """ - - class CreateParamsDiscountDiscountEndDuration(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. - """ - interval_count: int - """ - The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. - """ - - class CreateParamsFromInvoice(TypedDict): - action: Literal["revision"] - """ - The relation between the new invoice and the original invoice. Currently, only 'revision' is permitted - """ - invoice: str - """ - The `id` of the invoice that will be cloned. - """ - - class CreateParamsIssuer(TypedDict): - account: NotRequired[str] - """ - The connected account being referenced when `type` is `account`. - """ - type: Literal["account", "self"] - """ - Type of the account referenced in the request. - """ - - class CreateParamsPaymentSettings(TypedDict): - default_mandate: NotRequired["Literal['']|str"] - """ - ID of the mandate to be used for this invoice. It must correspond to the payment method used to pay the invoice, including the invoice's default_payment_method or default_source, if set. - """ - payment_method_options: NotRequired[ - "InvoiceService.CreateParamsPaymentSettingsPaymentMethodOptions" - ] - """ - Payment-method-specific configuration to provide to the invoice's PaymentIntent. - """ - payment_method_types: NotRequired[ - "Literal['']|List[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'affirm', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'boleto', 'card', 'cashapp', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'id_bank_transfer', 'ideal', 'jp_credit_transfer', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'multibanco', 'naver_pay', 'nz_bank_account', 'p24', 'payco', 'paynow', 'paypal', 'pix', 'promptpay', 'revolut_pay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'stripe_balance', 'swish', 'upi', 'us_bank_account', 'wechat_pay']]" - ] - """ - The list of payment method types (e.g. card) to provide to the invoice's PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice's default payment method, the subscription's default payment method, the customer's default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). - """ - - class CreateParamsPaymentSettingsPaymentMethodOptions(TypedDict): - acss_debit: NotRequired[ - "Literal['']|InvoiceService.CreateParamsPaymentSettingsPaymentMethodOptionsAcssDebit" - ] - """ - If paying by `acss_debit`, this sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice's PaymentIntent. - """ - bancontact: NotRequired[ - "Literal['']|InvoiceService.CreateParamsPaymentSettingsPaymentMethodOptionsBancontact" - ] - """ - If paying by `bancontact`, this sub-hash contains details about the Bancontact payment method options to pass to the invoice's PaymentIntent. - """ - card: NotRequired[ - "Literal['']|InvoiceService.CreateParamsPaymentSettingsPaymentMethodOptionsCard" - ] - """ - If paying by `card`, this sub-hash contains details about the Card payment method options to pass to the invoice's PaymentIntent. - """ - customer_balance: NotRequired[ - "Literal['']|InvoiceService.CreateParamsPaymentSettingsPaymentMethodOptionsCustomerBalance" - ] - """ - If paying by `customer_balance`, this sub-hash contains details about the Bank transfer payment method options to pass to the invoice's PaymentIntent. - """ - id_bank_transfer: NotRequired[ - "Literal['']|InvoiceService.CreateParamsPaymentSettingsPaymentMethodOptionsIdBankTransfer" - ] - """ - If paying by `id_bank_transfer`, this sub-hash contains details about the Indonesia bank transfer payment method options to pass to the invoice's PaymentIntent. - """ - konbini: NotRequired[ - "Literal['']|InvoiceService.CreateParamsPaymentSettingsPaymentMethodOptionsKonbini" - ] - """ - If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice's PaymentIntent. - """ - pix: NotRequired[ - "Literal['']|InvoiceService.CreateParamsPaymentSettingsPaymentMethodOptionsPix" - ] - """ - If paying by `pix`, this sub-hash contains details about the Pix payment method options to pass to the invoice's PaymentIntent. - """ - sepa_debit: NotRequired[ - "Literal['']|InvoiceService.CreateParamsPaymentSettingsPaymentMethodOptionsSepaDebit" - ] - """ - If paying by `sepa_debit`, this sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice's PaymentIntent. - """ - upi: NotRequired[ - "Literal['']|InvoiceService.CreateParamsPaymentSettingsPaymentMethodOptionsUpi" - ] - """ - If paying by `upi`, this sub-hash contains details about the UPI payment method options to pass to the invoice's PaymentIntent. - """ - us_bank_account: NotRequired[ - "Literal['']|InvoiceService.CreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccount" - ] - """ - If paying by `us_bank_account`, this sub-hash contains details about the ACH direct debit payment method options to pass to the invoice's PaymentIntent. - """ - - class CreateParamsPaymentSettingsPaymentMethodOptionsAcssDebit(TypedDict): - mandate_options: NotRequired[ - "InvoiceService.CreateParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions" - ] - """ - Additional fields for Mandate creation - """ - verification_method: NotRequired[ - Literal["automatic", "instant", "microdeposits"] - ] - """ - Verification method for the intent - """ - - class CreateParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions( - TypedDict, - ): - transaction_type: NotRequired[Literal["business", "personal"]] - """ - Transaction type of the mandate. - """ - - class CreateParamsPaymentSettingsPaymentMethodOptionsBancontact(TypedDict): - preferred_language: NotRequired[Literal["de", "en", "fr", "nl"]] - """ - Preferred language of the Bancontact authorization page that the customer is redirected to. - """ - - class CreateParamsPaymentSettingsPaymentMethodOptionsCard(TypedDict): - installments: NotRequired[ - "InvoiceService.CreateParamsPaymentSettingsPaymentMethodOptionsCardInstallments" - ] - """ - Installment configuration for payments attempted on this invoice. - - For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments). - """ - request_three_d_secure: NotRequired[ - Literal["any", "automatic", "challenge"] - ] - """ - We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. - """ - - class CreateParamsPaymentSettingsPaymentMethodOptionsCardInstallments( - TypedDict, - ): - enabled: NotRequired[bool] - """ - Setting to true enables installments for this invoice. - Setting to false will prevent any selected plan from applying to a payment. - """ - plan: NotRequired[ - "Literal['']|InvoiceService.CreateParamsPaymentSettingsPaymentMethodOptionsCardInstallmentsPlan" - ] - """ - The selected installment plan to use for this invoice. - """ - - class CreateParamsPaymentSettingsPaymentMethodOptionsCardInstallmentsPlan( - TypedDict, - ): - count: NotRequired[int] - """ - For `fixed_count` installment plans, this is required. It represents the number of installment payments your customer will make to their credit card. - """ - interval: NotRequired[Literal["month"]] - """ - For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card. - One of `month`. - """ - type: Literal["bonus", "fixed_count", "revolving"] - """ - Type of installment plan, one of `fixed_count`, `bonus`, or `revolving`. - """ - - class CreateParamsPaymentSettingsPaymentMethodOptionsCustomerBalance( - TypedDict, - ): - bank_transfer: NotRequired[ - "InvoiceService.CreateParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransfer" - ] - """ - Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. - """ - funding_type: NotRequired[str] - """ - The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. - """ - - class CreateParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransfer( - TypedDict, - ): - eu_bank_transfer: NotRequired[ - "InvoiceService.CreateParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer" - ] - """ - Configuration for eu_bank_transfer funding type. - """ - type: NotRequired[str] - """ - The bank transfer type that can be used for funding. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. - """ - - class CreateParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer( - TypedDict, - ): - country: str - """ - The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. - """ - - class CreateParamsPaymentSettingsPaymentMethodOptionsIdBankTransfer( - TypedDict, - ): - pass - - class CreateParamsPaymentSettingsPaymentMethodOptionsKonbini(TypedDict): - pass - - class CreateParamsPaymentSettingsPaymentMethodOptionsPix(TypedDict): - amount_includes_iof: NotRequired[Literal["always", "never"]] - """ - Determines if the amount includes the IOF tax. Defaults to `never`. - """ - - class CreateParamsPaymentSettingsPaymentMethodOptionsSepaDebit(TypedDict): - pass - - class CreateParamsPaymentSettingsPaymentMethodOptionsUpi(TypedDict): - mandate_options: NotRequired[ - "InvoiceService.CreateParamsPaymentSettingsPaymentMethodOptionsUpiMandateOptions" - ] - """ - Configuration options for setting up an eMandate - """ - - class CreateParamsPaymentSettingsPaymentMethodOptionsUpiMandateOptions( - TypedDict, - ): - amount: NotRequired[int] - """ - Amount to be charged for future payments. - """ - amount_type: NotRequired[Literal["fixed", "maximum"]] - """ - One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. - """ - description: NotRequired[str] - """ - A description of the mandate or subscription that is meant to be displayed to the customer. - """ - end_date: NotRequired[int] - """ - End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. - """ - - class CreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccount( - TypedDict, - ): - financial_connections: NotRequired[ - "InvoiceService.CreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections" - ] - """ - Additional fields for Financial Connections Session creation - """ - verification_method: NotRequired[ - Literal["automatic", "instant", "microdeposits"] - ] - """ - Verification method for the intent - """ - - class CreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections( - TypedDict, - ): - filters: NotRequired[ - "InvoiceService.CreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters" - ] - """ - Provide filters for the linked accounts that the customer can select for the payment method. - """ - permissions: NotRequired[ - List[ - Literal[ - "balances", "ownership", "payment_method", "transactions" - ] - ] - ] - """ - The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. - """ - prefetch: NotRequired[ - List[ - Literal[ - "balances", - "inferred_balances", - "ownership", - "transactions", - ] - ] - ] - """ - List of data features that you would like to retrieve upon account creation. - """ - - class CreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters( - TypedDict, - ): - account_subcategories: NotRequired[ - List[Literal["checking", "savings"]] - ] - """ - The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`. - """ - institution: NotRequired[str] - """ - ID of the institution to use to filter for selectable accounts. - """ - - class CreateParamsRendering(TypedDict): - amount_tax_display: NotRequired[ - "Literal['']|Literal['exclude_tax', 'include_inclusive_tax']" - ] - """ - How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One of `exclude_tax` or `include_inclusive_tax`. `include_inclusive_tax` will include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. `exclude_tax` will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts. - """ - pdf: NotRequired["InvoiceService.CreateParamsRenderingPdf"] - """ - Invoice pdf rendering options - """ - template: NotRequired[str] - """ - ID of the invoice rendering template to use for this invoice. - """ - template_version: NotRequired["Literal['']|int"] - """ - The specific version of invoice rendering template to use for this invoice. - """ - - class CreateParamsRenderingPdf(TypedDict): - page_size: NotRequired[Literal["a4", "auto", "letter"]] - """ - Page size for invoice PDF. Can be set to `a4`, `letter`, or `auto`. - If set to `auto`, invoice PDF page size defaults to `a4` for customers with - Japanese locale and `letter` for customers with other locales. - """ - - class CreateParamsShippingCost(TypedDict): - shipping_rate: NotRequired[str] - """ - The ID of the shipping rate to use for this order. - """ - shipping_rate_data: NotRequired[ - "InvoiceService.CreateParamsShippingCostShippingRateData" - ] - """ - Parameters to create a new ad-hoc shipping rate for this order. - """ - - class CreateParamsShippingCostShippingRateData(TypedDict): - delivery_estimate: NotRequired[ - "InvoiceService.CreateParamsShippingCostShippingRateDataDeliveryEstimate" - ] - """ - The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions. - """ - display_name: str - """ - The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions. - """ - fixed_amount: NotRequired[ - "InvoiceService.CreateParamsShippingCostShippingRateDataFixedAmount" - ] - """ - Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - tax_behavior: NotRequired[ - Literal["exclusive", "inclusive", "unspecified"] - ] - """ - Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. - """ - tax_code: NotRequired[str] - """ - A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`. - """ - type: NotRequired[Literal["fixed_amount"]] - """ - The type of calculation to use on the shipping rate. - """ - - class CreateParamsShippingCostShippingRateDataDeliveryEstimate(TypedDict): - maximum: NotRequired[ - "InvoiceService.CreateParamsShippingCostShippingRateDataDeliveryEstimateMaximum" - ] - """ - The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite. - """ - minimum: NotRequired[ - "InvoiceService.CreateParamsShippingCostShippingRateDataDeliveryEstimateMinimum" - ] - """ - The lower bound of the estimated range. If empty, represents no lower bound. - """ - - class CreateParamsShippingCostShippingRateDataDeliveryEstimateMaximum( - TypedDict, - ): - unit: Literal["business_day", "day", "hour", "month", "week"] - """ - A unit of time. - """ - value: int - """ - Must be greater than 0. - """ - - class CreateParamsShippingCostShippingRateDataDeliveryEstimateMinimum( - TypedDict, - ): - unit: Literal["business_day", "day", "hour", "month", "week"] - """ - A unit of time. - """ - value: int - """ - Must be greater than 0. - """ - - class CreateParamsShippingCostShippingRateDataFixedAmount(TypedDict): - amount: int - """ - A non-negative integer in cents representing how much to charge. - """ - 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). - """ - currency_options: NotRequired[ - Dict[ - str, - "InvoiceService.CreateParamsShippingCostShippingRateDataFixedAmountCurrencyOptions", - ] - ] - """ - Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). - """ - - class CreateParamsShippingCostShippingRateDataFixedAmountCurrencyOptions( - TypedDict, - ): - amount: int - """ - A non-negative integer in cents representing how much to charge. - """ - tax_behavior: NotRequired[ - Literal["exclusive", "inclusive", "unspecified"] - ] - """ - Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. - """ - - class CreateParamsShippingDetails(TypedDict): - address: "InvoiceService.CreateParamsShippingDetailsAddress" - """ - Shipping address - """ - name: str - """ - Recipient name. - """ - phone: NotRequired["Literal['']|str"] - """ - Recipient phone (including extension) - """ - - class CreateParamsShippingDetailsAddress(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. - """ - - class CreateParamsTransferData(TypedDict): - amount: NotRequired[int] - """ - The amount that will be transferred automatically when the invoice is paid. If no amount is set, the full amount is transferred. - """ - destination: str - """ - ID of an existing, connected Stripe account. - """ - - class CreatePreviewParams(TypedDict): - automatic_tax: NotRequired[ - "InvoiceService.CreatePreviewParamsAutomaticTax" - ] - """ - Settings for automatic tax lookup for this invoice preview. - """ - billing_cadence: NotRequired[str] - """ - The identifier of the billing cadence for which you'd like to retrieve the upcoming invoice.Cannot be provided when `subscription`, `schedule`, `subscription_details` or `schedule_details` are provided. - """ - currency: NotRequired[str] - """ - The currency to preview this invoice in. Defaults to that of `customer` if not specified. - """ - customer: NotRequired[str] - """ - The identifier of the customer whose upcoming invoice you'd like to retrieve. If `automatic_tax` is enabled then one of `customer`, `customer_details`, `subscription`, or `schedule` must be set. - """ - customer_account: NotRequired[str] - """ - The identifier of the account whose upcoming invoice you'd like to retrieve. If `automatic_tax` is enabled then one of `customer`, `customer_account`, `customer_details`, `subscription`, or `schedule` must be set. - """ - customer_details: NotRequired[ - "InvoiceService.CreatePreviewParamsCustomerDetails" - ] - """ - Details about the customer you want to invoice or overrides for an existing customer. If `automatic_tax` is enabled then one of `customer`, `customer_details`, `subscription`, or `schedule` must be set. - """ - discounts: NotRequired[ - "Literal['']|List[InvoiceService.CreatePreviewParamsDiscount]" - ] - """ - The coupons to redeem into discounts for the invoice preview. If not specified, inherits the discount from the subscription or customer. This works for both coupons directly applied to an invoice and coupons applied to a subscription. Pass an empty string to avoid inheriting any discounts. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - invoice_items: NotRequired[ - List["InvoiceService.CreatePreviewParamsInvoiceItem"] - ] - """ - List of invoice items to add or update in the upcoming invoice preview (up to 250). - """ - issuer: NotRequired["InvoiceService.CreatePreviewParamsIssuer"] - """ - The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. - """ - on_behalf_of: NotRequired["Literal['']|str"] - """ - The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the [Invoices with Connect](https://stripe.com/docs/billing/invoices/connect) documentation for details. - """ - preview_mode: NotRequired[Literal["next", "recurring"]] - """ - Customizes the types of values to include when calculating the invoice. Defaults to `next` if unspecified. - """ - schedule: NotRequired[str] - """ - The identifier of the schedule whose upcoming invoice you'd like to retrieve. Cannot be used with subscription or subscription fields. - """ - schedule_details: NotRequired[ - "InvoiceService.CreatePreviewParamsScheduleDetails" - ] - """ - The schedule creation or modification params to apply as a preview. Cannot be used with `subscription` or `subscription_` prefixed fields. - """ - subscription: NotRequired[str] - """ - The identifier of the subscription for which you'd like to retrieve the upcoming invoice. If not provided, but a `subscription_details.items` is provided, you will preview creating a subscription with those items. If neither `subscription` nor `subscription_details.items` is provided, you will retrieve the next upcoming invoice from among the customer's subscriptions. - """ - subscription_details: NotRequired[ - "InvoiceService.CreatePreviewParamsSubscriptionDetails" - ] - """ - The subscription creation or modification params to apply as a preview. Cannot be used with `schedule` or `schedule_details` fields. - """ - - class CreatePreviewParamsAutomaticTax(TypedDict): - enabled: bool - """ - Whether Stripe automatically computes tax on this invoice. Note that incompatible invoice items (invoice items with manually specified [tax rates](https://stripe.com/docs/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices. - """ - liability: NotRequired[ - "InvoiceService.CreatePreviewParamsAutomaticTaxLiability" - ] - """ - The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. - """ - - class CreatePreviewParamsAutomaticTaxLiability(TypedDict): - account: NotRequired[str] - """ - The connected account being referenced when `type` is `account`. - """ - type: Literal["account", "self"] - """ - Type of the account referenced in the request. - """ - - class CreatePreviewParamsCustomerDetails(TypedDict): - address: NotRequired[ - "Literal['']|InvoiceService.CreatePreviewParamsCustomerDetailsAddress" - ] - """ - The customer's address. - """ - shipping: NotRequired[ - "Literal['']|InvoiceService.CreatePreviewParamsCustomerDetailsShipping" - ] - """ - The customer's shipping information. Appears on invoices emailed to this customer. - """ - tax: NotRequired[ - "InvoiceService.CreatePreviewParamsCustomerDetailsTax" - ] - """ - Tax details about the customer. - """ - tax_exempt: NotRequired[ - "Literal['']|Literal['exempt', 'none', 'reverse']" - ] - """ - The customer's tax exemption. One of `none`, `exempt`, or `reverse`. - """ - tax_ids: NotRequired[ - List["InvoiceService.CreatePreviewParamsCustomerDetailsTaxId"] - ] - """ - The customer's tax IDs. - """ - - class CreatePreviewParamsCustomerDetailsAddress(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. - """ - - class CreatePreviewParamsCustomerDetailsShipping(TypedDict): - address: ( - "InvoiceService.CreatePreviewParamsCustomerDetailsShippingAddress" - ) - """ - Customer shipping address. - """ - name: str - """ - Customer name. - """ - phone: NotRequired[str] - """ - Customer phone (including extension). - """ - - class CreatePreviewParamsCustomerDetailsShippingAddress(TypedDict): - city: NotRequired[str] - """ - City, district, suburb, town, or village. - """ - country: NotRequired[str] - """ - A freeform text field for the country. However, in order to activate some tax features, the format should be a 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. - """ - - class CreatePreviewParamsCustomerDetailsTax(TypedDict): - ip_address: NotRequired["Literal['']|str"] - """ - A recent IP address of the customer used for tax reporting and tax location inference. Stripe recommends updating the IP address when a new PaymentMethod is attached or the address field on the customer is updated. We recommend against updating this field more frequently since it could result in unexpected tax location/reporting outcomes. - """ - - class CreatePreviewParamsCustomerDetailsTaxId(TypedDict): - type: Literal[ - "ad_nrt", - "ae_trn", - "al_tin", - "am_tin", - "ao_tin", - "ar_cuit", - "au_abn", - "au_arn", - "aw_tin", - "az_tin", - "ba_tin", - "bb_tin", - "bd_bin", - "bf_ifu", - "bg_uic", - "bh_vat", - "bj_ifu", - "bo_tin", - "br_cnpj", - "br_cpf", - "bs_tin", - "by_tin", - "ca_bn", - "ca_gst_hst", - "ca_pst_bc", - "ca_pst_mb", - "ca_pst_sk", - "ca_qst", - "cd_nif", - "ch_uid", - "ch_vat", - "cl_tin", - "cm_niu", - "cn_tin", - "co_nit", - "cr_tin", - "cv_nif", - "de_stn", - "do_rcn", - "ec_ruc", - "eg_tin", - "es_cif", - "et_tin", - "eu_oss_vat", - "eu_vat", - "gb_vat", - "ge_vat", - "gn_nif", - "hk_br", - "hr_oib", - "hu_tin", - "id_npwp", - "il_vat", - "in_gst", - "is_vat", - "jp_cn", - "jp_rn", - "jp_trn", - "ke_pin", - "kg_tin", - "kh_tin", - "kr_brn", - "kz_bin", - "la_tin", - "li_uid", - "li_vat", - "ma_vat", - "md_vat", - "me_pib", - "mk_vat", - "mr_nif", - "mx_rfc", - "my_frp", - "my_itn", - "my_sst", - "ng_tin", - "no_vat", - "no_voec", - "np_pan", - "nz_gst", - "om_vat", - "pe_ruc", - "ph_tin", - "ro_tin", - "rs_pib", - "ru_inn", - "ru_kpp", - "sa_vat", - "sg_gst", - "sg_uen", - "si_tin", - "sn_ninea", - "sr_fin", - "sv_nit", - "th_vat", - "tj_tin", - "tr_tin", - "tw_vat", - "tz_vat", - "ua_vat", - "ug_tin", - "us_ein", - "uy_ruc", - "uz_tin", - "uz_vat", - "ve_rif", - "vn_tin", - "za_vat", - "zm_tin", - "zw_tin", - ] - """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `al_tin`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `aw_tin`, `az_tin`, `ba_tin`, `bb_tin`, `bd_bin`, `bf_ifu`, `bg_uic`, `bh_vat`, `bj_ifu`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cm_niu`, `cn_tin`, `co_nit`, `cr_tin`, `cv_nif`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `et_tin`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kg_tin`, `kh_tin`, `kr_brn`, `kz_bin`, `la_tin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin` - """ - value: str - """ - Value of the tax ID. - """ - - class CreatePreviewParamsDiscount(TypedDict): - coupon: NotRequired[str] - """ - ID of the coupon to create a new discount for. - """ - discount: NotRequired[str] - """ - ID of an existing discount on the object (or one of its ancestors) to reuse. - """ - discount_end: NotRequired[ - "InvoiceService.CreatePreviewParamsDiscountDiscountEnd" - ] - """ - Details to determine how long the discount should be applied for. - """ - promotion_code: NotRequired[str] - """ - ID of the promotion code to create a new discount for. - """ - - class CreatePreviewParamsDiscountDiscountEnd(TypedDict): - duration: NotRequired[ - "InvoiceService.CreatePreviewParamsDiscountDiscountEndDuration" - ] - """ - Time span for the redeemed discount. - """ - timestamp: NotRequired[int] - """ - A precise Unix timestamp for the discount to end. Must be in the future. - """ - type: Literal["duration", "timestamp"] - """ - The type of calculation made to determine when the discount ends. - """ - - class CreatePreviewParamsDiscountDiscountEndDuration(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. - """ - interval_count: int - """ - The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. - """ - - class CreatePreviewParamsInvoiceItem(TypedDict): - amount: NotRequired[int] - """ - The integer amount in cents (or local equivalent) of previewed invoice item. - """ - currency: NotRequired[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). Only applicable to new invoice items. - """ - description: NotRequired[str] - """ - An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking. - """ - discountable: NotRequired[bool] - """ - Explicitly controls whether discounts apply to this invoice item. Defaults to true, except for negative invoice items. - """ - discounts: NotRequired[ - "Literal['']|List[InvoiceService.CreatePreviewParamsInvoiceItemDiscount]" - ] - """ - The coupons to redeem into discounts for the invoice item in the preview. - """ - invoiceitem: NotRequired[str] - """ - The ID of the invoice item to update in preview. If not specified, a new invoice item will be added to the preview of the upcoming invoice. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - period: NotRequired[ - "InvoiceService.CreatePreviewParamsInvoiceItemPeriod" - ] - """ - The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details. - """ - price: NotRequired[str] - """ - The ID of the price object. One of `price` or `price_data` is required. - """ - price_data: NotRequired[ - "InvoiceService.CreatePreviewParamsInvoiceItemPriceData" - ] - """ - Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. - """ - quantity: NotRequired[int] - """ - Non-negative integer. The quantity of units for the invoice item. - """ - tax_behavior: NotRequired[ - Literal["exclusive", "inclusive", "unspecified"] - ] - """ - Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. - """ - tax_code: NotRequired["Literal['']|str"] - """ - A [tax code](https://stripe.com/docs/tax/tax-categories) ID. - """ - tax_rates: NotRequired["Literal['']|List[str]"] - """ - The tax rates that apply to the item. When set, any `default_tax_rates` do not apply to this item. - """ - unit_amount: NotRequired[int] - """ - The integer unit amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. This unit_amount will be multiplied by the quantity to get the full amount. If you want to apply a credit to the customer's account, pass a negative unit_amount. - """ - unit_amount_decimal: NotRequired[str] - """ - Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - """ - - class CreatePreviewParamsInvoiceItemDiscount(TypedDict): - coupon: NotRequired[str] - """ - ID of the coupon to create a new discount for. - """ - discount: NotRequired[str] - """ - ID of an existing discount on the object (or one of its ancestors) to reuse. - """ - discount_end: NotRequired[ - "InvoiceService.CreatePreviewParamsInvoiceItemDiscountDiscountEnd" - ] - """ - Details to determine how long the discount should be applied for. - """ - promotion_code: NotRequired[str] - """ - ID of the promotion code to create a new discount for. - """ - - class CreatePreviewParamsInvoiceItemDiscountDiscountEnd(TypedDict): - duration: NotRequired[ - "InvoiceService.CreatePreviewParamsInvoiceItemDiscountDiscountEndDuration" - ] - """ - Time span for the redeemed discount. - """ - timestamp: NotRequired[int] - """ - A precise Unix timestamp for the discount to end. Must be in the future. - """ - type: Literal["duration", "timestamp"] - """ - The type of calculation made to determine when the discount ends. - """ - - class CreatePreviewParamsInvoiceItemDiscountDiscountEndDuration(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. - """ - interval_count: int - """ - The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. - """ - - class CreatePreviewParamsInvoiceItemPeriod(TypedDict): - end: int - """ - The end of the period, which must be greater than or equal to the start. This value is inclusive. - """ - start: int - """ - The start of the period. This value is inclusive. - """ - - class CreatePreviewParamsInvoiceItemPriceData(TypedDict): - 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). - """ - product: str - """ - The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to. - """ - tax_behavior: NotRequired[ - Literal["exclusive", "inclusive", "unspecified"] - ] - """ - Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. - """ - unit_amount: NotRequired[int] - """ - A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. - """ - unit_amount_decimal: NotRequired[str] - """ - Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - """ - - class CreatePreviewParamsIssuer(TypedDict): - account: NotRequired[str] - """ - The connected account being referenced when `type` is `account`. - """ - type: Literal["account", "self"] - """ - Type of the account referenced in the request. - """ - - class CreatePreviewParamsScheduleDetails(TypedDict): - amendments: NotRequired[ - List["InvoiceService.CreatePreviewParamsScheduleDetailsAmendment"] - ] - """ - Changes to apply to the phases of the subscription schedule, in the order provided. - """ - billing_behavior: NotRequired[ - Literal["prorate_on_next_phase", "prorate_up_front"] - ] - """ - Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front. - """ - billing_mode: NotRequired[ - "InvoiceService.CreatePreviewParamsScheduleDetailsBillingMode" - ] - """ - Controls how prorations and invoices for subscriptions are calculated and orchestrated. - """ - end_behavior: NotRequired[Literal["cancel", "release"]] - """ - Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running. `cancel` will end the subscription schedule and cancel the underlying subscription. - """ - phases: NotRequired[ - List["InvoiceService.CreatePreviewParamsScheduleDetailsPhase"] - ] - """ - List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase. - """ - prebilling: NotRequired[ - "Literal['']|List[InvoiceService.CreatePreviewParamsScheduleDetailsPrebilling]" - ] - """ - Provide any time periods to bill in advance. - """ - proration_behavior: NotRequired[ - Literal["always_invoice", "create_prorations", "none"] - ] - """ - In cases where the `schedule_details` params update the currently active phase, specifies if and how to prorate at the time of the request. - """ - - class CreatePreviewParamsScheduleDetailsAmendment(TypedDict): - amendment_end: NotRequired[ - "InvoiceService.CreatePreviewParamsScheduleDetailsAmendmentAmendmentEnd" - ] - """ - Details to identify the end of the time range modified by the proposed change. If not supplied, the amendment is considered a point-in-time operation that only affects the exact timestamp at `amendment_start`, and a restricted set of attributes is supported on the amendment. - """ - amendment_start: "InvoiceService.CreatePreviewParamsScheduleDetailsAmendmentAmendmentStart" - """ - Details to identify the earliest timestamp where the proposed change should take effect. - """ - billing_cycle_anchor: NotRequired[ - Literal["amendment_start", "automatic"] - ] - """ - For point-in-time amendments (having no `amendment_end`), this attribute lets you set or remove whether the subscription's billing cycle anchor is reset at the `amendment_start` timestamp.For time-span based amendments (having both `amendment_start` and `amendment_end`), the only value valid is `automatic`, which removes any previously configured billing cycle anchor resets scheduled to occur during the window of time spanned by the amendment. - """ - discount_actions: NotRequired[ - List[ - "InvoiceService.CreatePreviewParamsScheduleDetailsAmendmentDiscountAction" - ] - ] - """ - Changes to the coupons being redeemed or discounts being applied during the amendment time span. - """ - item_actions: NotRequired[ - List[ - "InvoiceService.CreatePreviewParamsScheduleDetailsAmendmentItemAction" - ] - ] - """ - Changes to the subscription items during the amendment time span. - """ - metadata_actions: NotRequired[ - List[ - "InvoiceService.CreatePreviewParamsScheduleDetailsAmendmentMetadataAction" - ] - ] - """ - Instructions for how to modify phase metadata - """ - proration_behavior: NotRequired[ - Literal["always_invoice", "create_prorations", "none"] - ] - """ - Changes to how Stripe handles prorations during the amendment time span. Affects if and how prorations are created when a future phase starts. In cases where the amendment changes the currently active phase, it is used to determine whether or how to prorate now, at the time of the request. Also supported as a point-in-time operation when `amendment_end` is `null`. - """ - set_pause_collection: NotRequired[ - "InvoiceService.CreatePreviewParamsScheduleDetailsAmendmentSetPauseCollection" - ] - """ - Defines how to pause collection for the underlying subscription throughout the duration of the amendment. - """ - set_schedule_end: NotRequired[ - Literal["amendment_end", "amendment_start"] - ] - """ - Ends the subscription schedule early as dictated by either the accompanying amendment's start or end. - """ - trial_settings: NotRequired[ - "InvoiceService.CreatePreviewParamsScheduleDetailsAmendmentTrialSettings" - ] - """ - Settings related to subscription trials. - """ - - class CreatePreviewParamsScheduleDetailsAmendmentAmendmentEnd(TypedDict): - discount_end: NotRequired[ - "InvoiceService.CreatePreviewParamsScheduleDetailsAmendmentAmendmentEndDiscountEnd" - ] - """ - Use the `end` time of a given discount. - """ - duration: NotRequired[ - "InvoiceService.CreatePreviewParamsScheduleDetailsAmendmentAmendmentEndDuration" - ] - """ - Time span for the amendment starting from the `amendment_start`. - """ - timestamp: NotRequired[int] - """ - A precise Unix timestamp for the amendment to end. Must be after the `amendment_start`. - """ - type: Literal[ - "discount_end", - "duration", - "schedule_end", - "timestamp", - "trial_end", - "trial_start", - "upcoming_invoice", - ] - """ - Select one of three ways to pass the `amendment_end`. - """ - - class CreatePreviewParamsScheduleDetailsAmendmentAmendmentEndDiscountEnd( - TypedDict, - ): - discount: str - """ - The ID of a specific discount. - """ - - class CreatePreviewParamsScheduleDetailsAmendmentAmendmentEndDuration( - TypedDict, - ): - interval: Literal["day", "month", "week", "year"] - """ - Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. - """ - interval_count: int - """ - The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. - """ - - class CreatePreviewParamsScheduleDetailsAmendmentAmendmentStart(TypedDict): - amendment_end: NotRequired[ - "InvoiceService.CreatePreviewParamsScheduleDetailsAmendmentAmendmentStartAmendmentEnd" - ] - """ - Details of another amendment in the same array, immediately after which this amendment should begin. - """ - discount_end: NotRequired[ - "InvoiceService.CreatePreviewParamsScheduleDetailsAmendmentAmendmentStartDiscountEnd" - ] - """ - Use the `end` time of a given discount. - """ - timestamp: NotRequired[int] - """ - A precise Unix timestamp for the amendment to start. - """ - type: Literal[ - "amendment_end", - "discount_end", - "now", - "schedule_end", - "timestamp", - "trial_end", - "trial_start", - "upcoming_invoice", - ] - """ - Select one of three ways to pass the `amendment_start`. - """ - - class CreatePreviewParamsScheduleDetailsAmendmentAmendmentStartAmendmentEnd( - TypedDict, - ): - index: int - """ - The position of the previous amendment in the `amendments` array after which this amendment should begin. Indexes start from 0 and must be less than the index of the current amendment in the array. - """ - - class CreatePreviewParamsScheduleDetailsAmendmentAmendmentStartDiscountEnd( - TypedDict, - ): - discount: str - """ - The ID of a specific discount. - """ - - class CreatePreviewParamsScheduleDetailsAmendmentDiscountAction(TypedDict): - add: NotRequired[ - "InvoiceService.CreatePreviewParamsScheduleDetailsAmendmentDiscountActionAdd" - ] - """ - Details of the discount to add. - """ - remove: NotRequired[ - "InvoiceService.CreatePreviewParamsScheduleDetailsAmendmentDiscountActionRemove" - ] - """ - Details of the discount to remove. - """ - set: NotRequired[ - "InvoiceService.CreatePreviewParamsScheduleDetailsAmendmentDiscountActionSet" - ] - """ - Details of the discount to replace the existing discounts with. - """ - type: Literal["add", "remove", "set"] - """ - Determines the type of discount action. - """ - - class CreatePreviewParamsScheduleDetailsAmendmentDiscountActionAdd( - TypedDict, - ): - coupon: NotRequired[str] - """ - The coupon code to redeem. - """ - discount: NotRequired[str] - """ - An ID of an existing discount for a coupon that was already redeemed. - """ - discount_end: NotRequired[ - "InvoiceService.CreatePreviewParamsScheduleDetailsAmendmentDiscountActionAddDiscountEnd" - ] - """ - Details to determine how long the discount should be applied for. - """ - index: NotRequired[int] - """ - The index, starting at 0, at which to position the new discount. When not supplied, Stripe defaults to appending the discount to the end of the `discounts` array. - """ - promotion_code: NotRequired[str] - """ - The promotion code to redeem. - """ - - class CreatePreviewParamsScheduleDetailsAmendmentDiscountActionAddDiscountEnd( - TypedDict, - ): - type: Literal["amendment_end"] - """ - The type of calculation made to determine when the discount ends. - """ - - class CreatePreviewParamsScheduleDetailsAmendmentDiscountActionRemove( - TypedDict, - ): - coupon: NotRequired[str] - """ - The coupon code to remove from the `discounts` array. - """ - discount: NotRequired[str] - """ - The ID of a discount to remove from the `discounts` array. - """ - promotion_code: NotRequired[str] - """ - The ID of a promotion code to remove from the `discounts` array. - """ - - class CreatePreviewParamsScheduleDetailsAmendmentDiscountActionSet( - TypedDict, - ): - coupon: NotRequired[str] - """ - The coupon code to replace the `discounts` array with. - """ - discount: NotRequired[str] - """ - An ID of an existing discount to replace the `discounts` array with. - """ - promotion_code: NotRequired[str] - """ - An ID of an existing promotion code to replace the `discounts` array with. - """ - - class CreatePreviewParamsScheduleDetailsAmendmentItemAction(TypedDict): - add: NotRequired[ - "InvoiceService.CreatePreviewParamsScheduleDetailsAmendmentItemActionAdd" - ] - """ - Details of the subscription item to add. If an item with the same `price` exists, it will be replaced by this new item. Otherwise, it adds the new item. - """ - remove: NotRequired[ - "InvoiceService.CreatePreviewParamsScheduleDetailsAmendmentItemActionRemove" - ] - """ - Details of the subscription item to remove. - """ - set: NotRequired[ - "InvoiceService.CreatePreviewParamsScheduleDetailsAmendmentItemActionSet" - ] - """ - Details of the subscription item to replace the existing items with. If an item with the `set[price]` already exists, the `items` array is not cleared. Instead, all of the other `set` properties that are passed in this request will replace the existing values for the configuration item. - """ - type: Literal["add", "remove", "set"] - """ - Determines the type of item action. - """ - - class CreatePreviewParamsScheduleDetailsAmendmentItemActionAdd(TypedDict): - discounts: NotRequired[ - List[ - "InvoiceService.CreatePreviewParamsScheduleDetailsAmendmentItemActionAddDiscount" - ] - ] - """ - The discounts applied to the item. Subscription item discounts are applied before subscription discounts. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - price: str - """ - The ID of the price object. - """ - quantity: NotRequired[int] - """ - Quantity for this item. - """ - tax_rates: NotRequired[List[str]] - """ - The tax rates that apply to this subscription item. When set, the `default_tax_rates` on the subscription do not apply to this `subscription_item`. - """ - trial: NotRequired[ - "InvoiceService.CreatePreviewParamsScheduleDetailsAmendmentItemActionAddTrial" - ] - """ - Options that configure the trial on the subscription item. - """ - - class CreatePreviewParamsScheduleDetailsAmendmentItemActionAddDiscount( - TypedDict, - ): - coupon: NotRequired[str] - """ - ID of the coupon to create a new discount for. - """ - discount: NotRequired[str] - """ - ID of an existing discount on the object (or one of its ancestors) to reuse. - """ - discount_end: NotRequired[ - "InvoiceService.CreatePreviewParamsScheduleDetailsAmendmentItemActionAddDiscountDiscountEnd" - ] - """ - Details to determine how long the discount should be applied for. - """ - promotion_code: NotRequired[str] - """ - ID of the promotion code to create a new discount for. - """ - - class CreatePreviewParamsScheduleDetailsAmendmentItemActionAddDiscountDiscountEnd( - TypedDict, - ): - duration: NotRequired[ - "InvoiceService.CreatePreviewParamsScheduleDetailsAmendmentItemActionAddDiscountDiscountEndDuration" - ] - """ - Time span for the redeemed discount. - """ - timestamp: NotRequired[int] - """ - A precise Unix timestamp for the discount to end. Must be in the future. - """ - type: Literal["duration", "timestamp"] - """ - The type of calculation made to determine when the discount ends. - """ - - class CreatePreviewParamsScheduleDetailsAmendmentItemActionAddDiscountDiscountEndDuration( - TypedDict, - ): - interval: Literal["day", "month", "week", "year"] - """ - Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. - """ - interval_count: int - """ - The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. - """ - - class CreatePreviewParamsScheduleDetailsAmendmentItemActionAddTrial( - TypedDict, - ): - converts_to: NotRequired[List[str]] - """ - List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. - """ - type: Literal["free", "paid"] - """ - Determines the type of trial for this item. - """ - - class CreatePreviewParamsScheduleDetailsAmendmentItemActionRemove( - TypedDict, - ): - price: str - """ - ID of a price to remove. - """ - - class CreatePreviewParamsScheduleDetailsAmendmentItemActionSet(TypedDict): - discounts: NotRequired[ - List[ - "InvoiceService.CreatePreviewParamsScheduleDetailsAmendmentItemActionSetDiscount" - ] - ] - """ - If an item with the `price` already exists, passing this will override the `discounts` array on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `discounts`. - """ - metadata: NotRequired[Dict[str, str]] - """ - If an item with the `price` already exists, passing this will override the `metadata` on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `metadata`. - """ - price: str - """ - The ID of the price object. - """ - quantity: NotRequired[int] - """ - If an item with the `price` already exists, passing this will override the quantity on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `quantity`. - """ - tax_rates: NotRequired[List[str]] - """ - If an item with the `price` already exists, passing this will override the `tax_rates` array on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `tax_rates`. - """ - trial: NotRequired[ - "InvoiceService.CreatePreviewParamsScheduleDetailsAmendmentItemActionSetTrial" - ] - """ - If an item with the `price` already exists, passing this will override the `trial` configuration on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `trial`. - """ - - class CreatePreviewParamsScheduleDetailsAmendmentItemActionSetDiscount( - TypedDict, - ): - coupon: NotRequired[str] - """ - ID of the coupon to create a new discount for. - """ - discount: NotRequired[str] - """ - ID of an existing discount on the object (or one of its ancestors) to reuse. - """ - discount_end: NotRequired[ - "InvoiceService.CreatePreviewParamsScheduleDetailsAmendmentItemActionSetDiscountDiscountEnd" - ] - """ - Details to determine how long the discount should be applied for. - """ - promotion_code: NotRequired[str] - """ - ID of the promotion code to create a new discount for. - """ - - class CreatePreviewParamsScheduleDetailsAmendmentItemActionSetDiscountDiscountEnd( - TypedDict, - ): - duration: NotRequired[ - "InvoiceService.CreatePreviewParamsScheduleDetailsAmendmentItemActionSetDiscountDiscountEndDuration" - ] - """ - Time span for the redeemed discount. - """ - timestamp: NotRequired[int] - """ - A precise Unix timestamp for the discount to end. Must be in the future. - """ - type: Literal["duration", "timestamp"] - """ - The type of calculation made to determine when the discount ends. - """ - - class CreatePreviewParamsScheduleDetailsAmendmentItemActionSetDiscountDiscountEndDuration( - TypedDict, - ): - interval: Literal["day", "month", "week", "year"] - """ - Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. - """ - interval_count: int - """ - The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. - """ - - class CreatePreviewParamsScheduleDetailsAmendmentItemActionSetTrial( - TypedDict, - ): - converts_to: NotRequired[List[str]] - """ - List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. - """ - type: Literal["free", "paid"] - """ - Determines the type of trial for this item. - """ - - class CreatePreviewParamsScheduleDetailsAmendmentMetadataAction(TypedDict): - add: NotRequired[Dict[str, str]] - """ - Key-value pairs to add to schedule phase metadata. These values will merge with existing schedule phase metadata. - """ - remove: NotRequired[List[str]] - """ - Keys to remove from schedule phase metadata. - """ - set: NotRequired["Literal['']|Dict[str, str]"] - """ - Key-value pairs to set as schedule phase metadata. Existing schedule phase metadata will be overwritten. - """ - type: Literal["add", "remove", "set"] - """ - Select one of three ways to update phase-level `metadata` on subscription schedules. - """ - - class CreatePreviewParamsScheduleDetailsAmendmentSetPauseCollection( - TypedDict, - ): - set: NotRequired[ - "InvoiceService.CreatePreviewParamsScheduleDetailsAmendmentSetPauseCollectionSet" - ] - """ - Details of the pause_collection behavior to apply to the amendment. - """ - type: Literal["remove", "set"] - """ - Determines the type of the pause_collection amendment. - """ - - class CreatePreviewParamsScheduleDetailsAmendmentSetPauseCollectionSet( - TypedDict, - ): - behavior: Literal["keep_as_draft", "mark_uncollectible", "void"] - """ - The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. - """ - - class CreatePreviewParamsScheduleDetailsAmendmentTrialSettings(TypedDict): - end_behavior: NotRequired[ - "InvoiceService.CreatePreviewParamsScheduleDetailsAmendmentTrialSettingsEndBehavior" - ] - """ - Defines how the subscription should behave when a trial ends. - """ - - class CreatePreviewParamsScheduleDetailsAmendmentTrialSettingsEndBehavior( - TypedDict, - ): - prorate_up_front: NotRequired[Literal["defer", "include"]] - """ - Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`. - """ - - class CreatePreviewParamsScheduleDetailsBillingMode(TypedDict): - flexible: NotRequired[ - "InvoiceService.CreatePreviewParamsScheduleDetailsBillingModeFlexible" - ] - """ - Configure behavior for flexible billing mode. - """ - type: Literal["classic", "flexible"] - """ - Controls the calculation and orchestration of prorations and invoices for subscriptions. If no value is passed, the default is `flexible`. - """ - - class CreatePreviewParamsScheduleDetailsBillingModeFlexible(TypedDict): - proration_discounts: NotRequired[Literal["included", "itemized"]] - """ - Controls how invoices and invoice items display proration amounts and discount amounts. - """ - - class CreatePreviewParamsScheduleDetailsPhase(TypedDict): - add_invoice_items: NotRequired[ - List[ - "InvoiceService.CreatePreviewParamsScheduleDetailsPhaseAddInvoiceItem" - ] - ] - """ - A list of prices and quantities that will generate invoice items appended to the next invoice for this phase. You may pass up to 20 items. - """ - application_fee_percent: NotRequired[float] - """ - A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). - """ - automatic_tax: NotRequired[ - "InvoiceService.CreatePreviewParamsScheduleDetailsPhaseAutomaticTax" - ] - """ - Automatic tax settings for this phase. - """ - billing_cycle_anchor: NotRequired[Literal["automatic", "phase_start"]] - """ - Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). - """ - billing_thresholds: NotRequired[ - "Literal['']|InvoiceService.CreatePreviewParamsScheduleDetailsPhaseBillingThresholds" - ] - """ - Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. - """ - collection_method: NotRequired[ - Literal["charge_automatically", "send_invoice"] - ] - """ - Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically` on creation. - """ - currency: NotRequired[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). - """ - default_payment_method: NotRequired[str] - """ - ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings. - """ - default_tax_rates: NotRequired["Literal['']|List[str]"] - """ - A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will set the Subscription's [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates), which means they will be the Invoice's [`default_tax_rates`](https://stripe.com/docs/api/invoices/create#create_invoice-default_tax_rates) for any Invoices issued by the Subscription during this Phase. - """ - description: NotRequired["Literal['']|str"] - """ - Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. - """ - discounts: NotRequired[ - "Literal['']|List[InvoiceService.CreatePreviewParamsScheduleDetailsPhaseDiscount]" - ] - """ - The coupons to redeem into discounts for the schedule phase. If not specified, inherits the discount from the subscription's customer. Pass an empty string to avoid inheriting any discounts. - """ - duration: NotRequired[ - "InvoiceService.CreatePreviewParamsScheduleDetailsPhaseDuration" - ] - """ - The number of intervals the phase should last. If set, `end_date` must not be set. - """ - end_date: NotRequired["int|Literal['now']"] - """ - The date at which this phase of the subscription schedule ends. If set, `iterations` must not be set. - """ - invoice_settings: NotRequired[ - "InvoiceService.CreatePreviewParamsScheduleDetailsPhaseInvoiceSettings" - ] - """ - All invoices will be billed using the specified settings. - """ - items: List[ - "InvoiceService.CreatePreviewParamsScheduleDetailsPhaseItem" - ] - """ - List of configuration items, each with an attached price, to apply during this phase of the subscription schedule. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a phase. Metadata on a schedule's phase will update the underlying subscription's `metadata` when the phase is entered, adding new keys and replacing existing keys in the subscription's `metadata`. Individual keys in the subscription's `metadata` can be unset by posting an empty value to them in the phase's `metadata`. To unset all keys in the subscription's `metadata`, update the subscription directly or unset every key individually from the phase's `metadata`. - """ - on_behalf_of: NotRequired[str] - """ - The account on behalf of which to charge, for each of the associated subscription's invoices. - """ - pause_collection: NotRequired[ - "InvoiceService.CreatePreviewParamsScheduleDetailsPhasePauseCollection" - ] - """ - If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment). - """ - proration_behavior: NotRequired[ - Literal["always_invoice", "create_prorations", "none"] - ] - """ - Controls whether the subscription schedule should create [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when transitioning to this phase if there is a difference in billing configuration. It's different from the request-level [proration_behavior](https://stripe.com/docs/api/subscription_schedules/update#update_subscription_schedule-proration_behavior) parameter which controls what happens if the update request affects the billing configuration (item price, quantity, etc.) of the current phase. - """ - start_date: NotRequired["int|Literal['now']"] - """ - The date at which this phase of the subscription schedule starts or `now`. Must be set on the first phase. - """ - transfer_data: NotRequired[ - "InvoiceService.CreatePreviewParamsScheduleDetailsPhaseTransferData" - ] - """ - The data with which to automatically create a Transfer for each of the associated subscription's invoices. - """ - trial: NotRequired[bool] - """ - If set to true the entire phase is counted as a trial and the customer will not be charged for any fees. - """ - trial_continuation: NotRequired[Literal["continue", "none"]] - """ - Specify trial behavior when crossing phase boundaries - """ - trial_end: NotRequired["int|Literal['now']"] - """ - Sets the phase to trialing from the start date to this date. Must be before the phase end date, can not be combined with `trial` - """ - trial_settings: NotRequired[ - "InvoiceService.CreatePreviewParamsScheduleDetailsPhaseTrialSettings" - ] - """ - Settings related to subscription trials. - """ - - class CreatePreviewParamsScheduleDetailsPhaseAddInvoiceItem(TypedDict): - discounts: NotRequired[ - List[ - "InvoiceService.CreatePreviewParamsScheduleDetailsPhaseAddInvoiceItemDiscount" - ] - ] - """ - The coupons to redeem into discounts for the item. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - period: NotRequired[ - "InvoiceService.CreatePreviewParamsScheduleDetailsPhaseAddInvoiceItemPeriod" - ] - """ - The period associated with this invoice item. If not set, `period.start.type` defaults to `max_item_period_start` and `period.end.type` defaults to `min_item_period_end`. - """ - price: NotRequired[str] - """ - The ID of the price object. One of `price` or `price_data` is required. - """ - price_data: NotRequired[ - "InvoiceService.CreatePreviewParamsScheduleDetailsPhaseAddInvoiceItemPriceData" - ] - """ - Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. - """ - quantity: NotRequired[int] - """ - Quantity for this item. Defaults to 1. - """ - tax_rates: NotRequired["Literal['']|List[str]"] - """ - The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item. - """ - - class CreatePreviewParamsScheduleDetailsPhaseAddInvoiceItemDiscount( - TypedDict, - ): - coupon: NotRequired[str] - """ - ID of the coupon to create a new discount for. - """ - discount: NotRequired[str] - """ - ID of an existing discount on the object (or one of its ancestors) to reuse. - """ - discount_end: NotRequired[ - "InvoiceService.CreatePreviewParamsScheduleDetailsPhaseAddInvoiceItemDiscountDiscountEnd" - ] - """ - Details to determine how long the discount should be applied for. - """ - promotion_code: NotRequired[str] - """ - ID of the promotion code to create a new discount for. - """ - - class CreatePreviewParamsScheduleDetailsPhaseAddInvoiceItemDiscountDiscountEnd( - TypedDict, - ): - duration: NotRequired[ - "InvoiceService.CreatePreviewParamsScheduleDetailsPhaseAddInvoiceItemDiscountDiscountEndDuration" - ] - """ - Time span for the redeemed discount. - """ - timestamp: NotRequired[int] - """ - A precise Unix timestamp for the discount to end. Must be in the future. - """ - type: Literal["duration", "timestamp"] - """ - The type of calculation made to determine when the discount ends. - """ - - class CreatePreviewParamsScheduleDetailsPhaseAddInvoiceItemDiscountDiscountEndDuration( - TypedDict, - ): - interval: Literal["day", "month", "week", "year"] - """ - Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. - """ - interval_count: int - """ - The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. - """ - - class CreatePreviewParamsScheduleDetailsPhaseAddInvoiceItemPeriod( - TypedDict, - ): - end: "InvoiceService.CreatePreviewParamsScheduleDetailsPhaseAddInvoiceItemPeriodEnd" - """ - End of the invoice item period. - """ - start: "InvoiceService.CreatePreviewParamsScheduleDetailsPhaseAddInvoiceItemPeriodStart" - """ - Start of the invoice item period. - """ - - class CreatePreviewParamsScheduleDetailsPhaseAddInvoiceItemPeriodEnd( - TypedDict, - ): - timestamp: NotRequired[int] - """ - A precise Unix timestamp for the end of the invoice item period. Must be greater than or equal to `period.start`. - """ - type: Literal["min_item_period_end", "phase_end", "timestamp"] - """ - Select how to calculate the end of the invoice item period. - """ - - class CreatePreviewParamsScheduleDetailsPhaseAddInvoiceItemPeriodStart( - TypedDict, - ): - timestamp: NotRequired[int] - """ - A precise Unix timestamp for the start of the invoice item period. Must be less than or equal to `period.end`. - """ - type: Literal["max_item_period_start", "phase_start", "timestamp"] - """ - Select how to calculate the start of the invoice item period. - """ - - class CreatePreviewParamsScheduleDetailsPhaseAddInvoiceItemPriceData( - TypedDict, - ): - 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). - """ - product: str - """ - The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to. - """ - tax_behavior: NotRequired[ - Literal["exclusive", "inclusive", "unspecified"] - ] - """ - Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. - """ - unit_amount: NotRequired[int] - """ - A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge or a negative integer representing the amount to credit to the customer. - """ - unit_amount_decimal: NotRequired[str] - """ - Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - """ - - class CreatePreviewParamsScheduleDetailsPhaseAutomaticTax(TypedDict): - enabled: bool - """ - Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription. - """ - liability: NotRequired[ - "InvoiceService.CreatePreviewParamsScheduleDetailsPhaseAutomaticTaxLiability" - ] - """ - The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. - """ - - class CreatePreviewParamsScheduleDetailsPhaseAutomaticTaxLiability( - TypedDict, - ): - account: NotRequired[str] - """ - The connected account being referenced when `type` is `account`. - """ - type: Literal["account", "self"] - """ - Type of the account referenced in the request. - """ - - class CreatePreviewParamsScheduleDetailsPhaseBillingThresholds(TypedDict): - amount_gte: NotRequired[int] - """ - Monetary threshold that triggers the subscription to advance to a new billing period - """ - reset_billing_cycle_anchor: NotRequired[bool] - """ - Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. - """ - - class CreatePreviewParamsScheduleDetailsPhaseDiscount(TypedDict): - coupon: NotRequired[str] - """ - ID of the coupon to create a new discount for. - """ - discount: NotRequired[str] - """ - ID of an existing discount on the object (or one of its ancestors) to reuse. - """ - discount_end: NotRequired[ - "InvoiceService.CreatePreviewParamsScheduleDetailsPhaseDiscountDiscountEnd" - ] - """ - Details to determine how long the discount should be applied for. - """ - promotion_code: NotRequired[str] - """ - ID of the promotion code to create a new discount for. - """ - - class CreatePreviewParamsScheduleDetailsPhaseDiscountDiscountEnd( - TypedDict - ): - duration: NotRequired[ - "InvoiceService.CreatePreviewParamsScheduleDetailsPhaseDiscountDiscountEndDuration" - ] - """ - Time span for the redeemed discount. - """ - timestamp: NotRequired[int] - """ - A precise Unix timestamp for the discount to end. Must be in the future. - """ - type: Literal["duration", "timestamp"] - """ - The type of calculation made to determine when the discount ends. - """ - - class CreatePreviewParamsScheduleDetailsPhaseDiscountDiscountEndDuration( - TypedDict, - ): - interval: Literal["day", "month", "week", "year"] - """ - Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. - """ - interval_count: int - """ - The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. - """ - - class CreatePreviewParamsScheduleDetailsPhaseDuration(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Specifies phase duration. Either `day`, `week`, `month` or `year`. - """ - interval_count: NotRequired[int] - """ - The multiplier applied to the interval. - """ - - class CreatePreviewParamsScheduleDetailsPhaseInvoiceSettings(TypedDict): - account_tax_ids: NotRequired["Literal['']|List[str]"] - """ - The account tax IDs associated with this phase of the subscription schedule. Will be set on invoices generated by this phase of the subscription schedule. - """ - days_until_due: NotRequired[int] - """ - Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `billing=charge_automatically`. - """ - issuer: NotRequired[ - "InvoiceService.CreatePreviewParamsScheduleDetailsPhaseInvoiceSettingsIssuer" - ] - """ - The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. - """ - - class CreatePreviewParamsScheduleDetailsPhaseInvoiceSettingsIssuer( - TypedDict, - ): - account: NotRequired[str] - """ - The connected account being referenced when `type` is `account`. - """ - type: Literal["account", "self"] - """ - Type of the account referenced in the request. - """ - - class CreatePreviewParamsScheduleDetailsPhaseItem(TypedDict): - billing_thresholds: NotRequired[ - "Literal['']|InvoiceService.CreatePreviewParamsScheduleDetailsPhaseItemBillingThresholds" - ] - """ - Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. - """ - discounts: NotRequired[ - "Literal['']|List[InvoiceService.CreatePreviewParamsScheduleDetailsPhaseItemDiscount]" - ] - """ - The coupons to redeem into discounts for the subscription item. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a configuration item. Metadata on a configuration item will update the underlying subscription item's `metadata` when the phase is entered, adding new keys and replacing existing keys. Individual keys in the subscription item's `metadata` can be unset by posting an empty value to them in the configuration item's `metadata`. To unset all keys in the subscription item's `metadata`, update the subscription item directly or unset every key individually from the configuration item's `metadata`. - """ - plan: NotRequired[str] - """ - The plan ID to subscribe to. You may specify the same ID in `plan` and `price`. - """ - price: NotRequired[str] - """ - The ID of the price object. - """ - price_data: NotRequired[ - "InvoiceService.CreatePreviewParamsScheduleDetailsPhaseItemPriceData" - ] - """ - Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. - """ - quantity: NotRequired[int] - """ - Quantity for the given price. Can be set only if the price's `usage_type` is `licensed` and not `metered`. - """ - tax_rates: NotRequired["Literal['']|List[str]"] - """ - A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. - """ - trial: NotRequired[ - "InvoiceService.CreatePreviewParamsScheduleDetailsPhaseItemTrial" - ] - """ - Options that configure the trial on the subscription item. - """ - - class CreatePreviewParamsScheduleDetailsPhaseItemBillingThresholds( - TypedDict, - ): - usage_gte: int - """ - Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)) - """ - - class CreatePreviewParamsScheduleDetailsPhaseItemDiscount(TypedDict): - coupon: NotRequired[str] - """ - ID of the coupon to create a new discount for. - """ - discount: NotRequired[str] - """ - ID of an existing discount on the object (or one of its ancestors) to reuse. - """ - discount_end: NotRequired[ - "InvoiceService.CreatePreviewParamsScheduleDetailsPhaseItemDiscountDiscountEnd" - ] - """ - Details to determine how long the discount should be applied for. - """ - promotion_code: NotRequired[str] - """ - ID of the promotion code to create a new discount for. - """ - - class CreatePreviewParamsScheduleDetailsPhaseItemDiscountDiscountEnd( - TypedDict, - ): - duration: NotRequired[ - "InvoiceService.CreatePreviewParamsScheduleDetailsPhaseItemDiscountDiscountEndDuration" - ] - """ - Time span for the redeemed discount. - """ - timestamp: NotRequired[int] - """ - A precise Unix timestamp for the discount to end. Must be in the future. - """ - type: Literal["duration", "timestamp"] - """ - The type of calculation made to determine when the discount ends. - """ - - class CreatePreviewParamsScheduleDetailsPhaseItemDiscountDiscountEndDuration( - TypedDict, - ): - interval: Literal["day", "month", "week", "year"] - """ - Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. - """ - interval_count: int - """ - The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. - """ - - class CreatePreviewParamsScheduleDetailsPhaseItemPriceData(TypedDict): - 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). - """ - product: str - """ - The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to. - """ - recurring: "InvoiceService.CreatePreviewParamsScheduleDetailsPhaseItemPriceDataRecurring" - """ - The recurring components of a price such as `interval` and `interval_count`. - """ - tax_behavior: NotRequired[ - Literal["exclusive", "inclusive", "unspecified"] - ] - """ - Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. - """ - unit_amount: NotRequired[int] - """ - A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. - """ - unit_amount_decimal: NotRequired[str] - """ - Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - """ - - class CreatePreviewParamsScheduleDetailsPhaseItemPriceDataRecurring( - TypedDict, - ): - interval: Literal["day", "month", "week", "year"] - """ - Specifies billing frequency. Either `day`, `week`, `month` or `year`. - """ - interval_count: NotRequired[int] - """ - The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). - """ - - class CreatePreviewParamsScheduleDetailsPhaseItemTrial(TypedDict): - converts_to: NotRequired[List[str]] - """ - List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. - """ - type: Literal["free", "paid"] - """ - Determines the type of trial for this item. - """ - - class CreatePreviewParamsScheduleDetailsPhasePauseCollection(TypedDict): - behavior: Literal["keep_as_draft", "mark_uncollectible", "void"] - """ - The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. - """ - - class CreatePreviewParamsScheduleDetailsPhaseTransferData(TypedDict): - amount_percent: NotRequired[float] - """ - A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. - """ - destination: str - """ - ID of an existing, connected Stripe account. - """ - - class CreatePreviewParamsScheduleDetailsPhaseTrialSettings(TypedDict): - end_behavior: NotRequired[ - "InvoiceService.CreatePreviewParamsScheduleDetailsPhaseTrialSettingsEndBehavior" - ] - """ - Defines how the subscription should behave when a trial ends. - """ - - class CreatePreviewParamsScheduleDetailsPhaseTrialSettingsEndBehavior( - TypedDict, - ): - prorate_up_front: NotRequired[Literal["defer", "include"]] - """ - Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`. - """ - - class CreatePreviewParamsScheduleDetailsPrebilling(TypedDict): - bill_until: NotRequired[ - "InvoiceService.CreatePreviewParamsScheduleDetailsPrebillingBillUntil" - ] - """ - The end of the prebilled time period. - """ - iterations: NotRequired[int] - """ - This is used to determine the number of billing cycles to prebill. - """ - - class CreatePreviewParamsScheduleDetailsPrebillingBillUntil(TypedDict): - amendment_end: NotRequired[ - "InvoiceService.CreatePreviewParamsScheduleDetailsPrebillingBillUntilAmendmentEnd" - ] - """ - End the prebilled period when a specified amendment ends. - """ - duration: NotRequired[ - "InvoiceService.CreatePreviewParamsScheduleDetailsPrebillingBillUntilDuration" - ] - """ - Time span for prebilling, starting from `bill_from`. - """ - timestamp: NotRequired[int] - """ - End the prebilled period at a precise integer timestamp, starting from the Unix epoch. - """ - type: Literal["amendment_end", "duration", "schedule_end", "timestamp"] - """ - Select one of several ways to pass the `bill_until` value. - """ - - class CreatePreviewParamsScheduleDetailsPrebillingBillUntilAmendmentEnd( - TypedDict, - ): - index: int - """ - The position of the amendment in the `amendments` array at which prebilling should end. Indexes start from 0 and must be less than the total number of supplied amendments. - """ - - class CreatePreviewParamsScheduleDetailsPrebillingBillUntilDuration( - TypedDict, - ): - interval: Literal["day", "month", "week", "year"] - """ - Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. - """ - interval_count: int - """ - The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. - """ - - class CreatePreviewParamsSubscriptionDetails(TypedDict): - billing_cycle_anchor: NotRequired["Literal['now', 'unchanged']|int"] - """ - For new subscriptions, a future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. For existing subscriptions, the value can only be set to `now` or `unchanged`. - """ - billing_mode: NotRequired[ - "InvoiceService.CreatePreviewParamsSubscriptionDetailsBillingMode" - ] - """ - Controls how prorations and invoices for subscriptions are calculated and orchestrated. - """ - billing_schedules: NotRequired[ - "Literal['']|List[InvoiceService.CreatePreviewParamsSubscriptionDetailsBillingSchedule]" - ] - """ - Sets the billing schedules for the subscription. - """ - cancel_at: NotRequired[ - "Literal['']|int|Literal['max_period_end', 'min_period_end']" - ] - """ - A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period. - """ - cancel_at_period_end: NotRequired[bool] - """ - Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. - """ - cancel_now: NotRequired[bool] - """ - This simulates the subscription being canceled or expired immediately. - """ - default_tax_rates: NotRequired["Literal['']|List[str]"] - """ - If provided, the invoice returned will preview updating or creating a subscription with these default tax rates. The default tax rates will apply to any line item that does not have `tax_rates` set. - """ - items: NotRequired[ - List["InvoiceService.CreatePreviewParamsSubscriptionDetailsItem"] - ] - """ - A list of up to 20 subscription items, each with an attached price. - """ - prebilling: NotRequired[ - "InvoiceService.CreatePreviewParamsSubscriptionDetailsPrebilling" - ] - """ - The pre-billing to apply to the subscription as a preview. - """ - proration_behavior: NotRequired[ - Literal["always_invoice", "create_prorations", "none"] - ] - """ - Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`. - """ - proration_date: NotRequired[int] - """ - If previewing an update to a subscription, and doing proration, `subscription_details.proration_date` forces the proration to be calculated as though the update was done at the specified time. The time given must be within the current subscription period and within the current phase of the schedule backing this subscription, if the schedule exists. If set, `subscription`, and one of `subscription_details.items`, or `subscription_details.trial_end` are required. Also, `subscription_details.proration_behavior` cannot be set to 'none'. - """ - resume_at: NotRequired[Literal["now"]] - """ - For paused subscriptions, setting `subscription_details.resume_at` to `now` will preview the invoice that will be generated if the subscription is resumed. - """ - start_date: NotRequired[int] - """ - Date a subscription is intended to start (can be future or past). - """ - trial_end: NotRequired["Literal['now']|int"] - """ - If provided, the invoice returned will preview updating or creating a subscription with that trial end. If set, one of `subscription_details.items` or `subscription` is required. - """ - - class CreatePreviewParamsSubscriptionDetailsBillingMode(TypedDict): - flexible: NotRequired[ - "InvoiceService.CreatePreviewParamsSubscriptionDetailsBillingModeFlexible" - ] - """ - Configure behavior for flexible billing mode. - """ - type: Literal["classic", "flexible"] - """ - Controls the calculation and orchestration of prorations and invoices for subscriptions. If no value is passed, the default is `flexible`. - """ - - class CreatePreviewParamsSubscriptionDetailsBillingModeFlexible(TypedDict): - proration_discounts: NotRequired[Literal["included", "itemized"]] - """ - Controls how invoices and invoice items display proration amounts and discount amounts. - """ - - class CreatePreviewParamsSubscriptionDetailsBillingSchedule(TypedDict): - applies_to: NotRequired[ - List[ - "InvoiceService.CreatePreviewParamsSubscriptionDetailsBillingScheduleAppliesTo" - ] - ] - """ - Configure billing schedule differently for individual subscription items. - """ - bill_until: NotRequired[ - "InvoiceService.CreatePreviewParamsSubscriptionDetailsBillingScheduleBillUntil" - ] - """ - The end date for the billing schedule. - """ - key: NotRequired[str] - """ - Specify a key for the billing schedule. Must be unique to this field, alphanumeric, and up to 200 characters. If not provided, a unique key will be generated. - """ - - class CreatePreviewParamsSubscriptionDetailsBillingScheduleAppliesTo( - TypedDict, - ): - price: NotRequired[str] - """ - The ID of the price object. - """ - type: Literal["price"] - """ - Controls which subscription items the billing schedule applies to. - """ - - class CreatePreviewParamsSubscriptionDetailsBillingScheduleBillUntil( - TypedDict, - ): - duration: NotRequired[ - "InvoiceService.CreatePreviewParamsSubscriptionDetailsBillingScheduleBillUntilDuration" - ] - """ - Specifies the billing period. - """ - timestamp: NotRequired[int] - """ - The end date of the billing schedule. - """ - type: Literal["duration", "timestamp"] - """ - Describes how the billing schedule will determine the end date. Either `duration` or `timestamp`. - """ - - class CreatePreviewParamsSubscriptionDetailsBillingScheduleBillUntilDuration( - TypedDict, - ): - interval: Literal["day", "month", "week", "year"] - """ - Specifies billing duration. Either `day`, `week`, `month` or `year`. - """ - interval_count: NotRequired[int] - """ - The multiplier applied to the interval. - """ - - class CreatePreviewParamsSubscriptionDetailsItem(TypedDict): - billing_thresholds: NotRequired[ - "Literal['']|InvoiceService.CreatePreviewParamsSubscriptionDetailsItemBillingThresholds" - ] - """ - Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. - """ - clear_usage: NotRequired[bool] - """ - Delete all usage for a given subscription item. You must pass this when deleting a usage records subscription item. `clear_usage` has no effect if the plan has a billing meter attached. - """ - deleted: NotRequired[bool] - """ - A flag that, if set to `true`, will delete the specified item. - """ - discounts: NotRequired[ - "Literal['']|List[InvoiceService.CreatePreviewParamsSubscriptionDetailsItemDiscount]" - ] - """ - The coupons to redeem into discounts for the subscription item. - """ - id: NotRequired[str] - """ - Subscription item to update. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - plan: NotRequired[str] - """ - Plan ID for this item, as a string. - """ - price: NotRequired[str] - """ - The ID of the price object. One of `price` or `price_data` is required. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided. - """ - price_data: NotRequired[ - "InvoiceService.CreatePreviewParamsSubscriptionDetailsItemPriceData" - ] - """ - Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. - """ - quantity: NotRequired[int] - """ - Quantity for this item. - """ - tax_rates: NotRequired["Literal['']|List[str]"] - """ - A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. - """ - - class CreatePreviewParamsSubscriptionDetailsItemBillingThresholds( - TypedDict, - ): - usage_gte: int - """ - Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)) - """ - - class CreatePreviewParamsSubscriptionDetailsItemDiscount(TypedDict): - coupon: NotRequired[str] - """ - ID of the coupon to create a new discount for. - """ - discount: NotRequired[str] - """ - ID of an existing discount on the object (or one of its ancestors) to reuse. - """ - discount_end: NotRequired[ - "InvoiceService.CreatePreviewParamsSubscriptionDetailsItemDiscountDiscountEnd" - ] - """ - Details to determine how long the discount should be applied for. - """ - promotion_code: NotRequired[str] - """ - ID of the promotion code to create a new discount for. - """ - - class CreatePreviewParamsSubscriptionDetailsItemDiscountDiscountEnd( - TypedDict, - ): - duration: NotRequired[ - "InvoiceService.CreatePreviewParamsSubscriptionDetailsItemDiscountDiscountEndDuration" - ] - """ - Time span for the redeemed discount. - """ - timestamp: NotRequired[int] - """ - A precise Unix timestamp for the discount to end. Must be in the future. - """ - type: Literal["duration", "timestamp"] - """ - The type of calculation made to determine when the discount ends. - """ - - class CreatePreviewParamsSubscriptionDetailsItemDiscountDiscountEndDuration( - TypedDict, - ): - interval: Literal["day", "month", "week", "year"] - """ - Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. - """ - interval_count: int - """ - The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. - """ - - class CreatePreviewParamsSubscriptionDetailsItemPriceData(TypedDict): - 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). - """ - product: str - """ - The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to. - """ - recurring: "InvoiceService.CreatePreviewParamsSubscriptionDetailsItemPriceDataRecurring" - """ - The recurring components of a price such as `interval` and `interval_count`. - """ - tax_behavior: NotRequired[ - Literal["exclusive", "inclusive", "unspecified"] - ] - """ - Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. - """ - unit_amount: NotRequired[int] - """ - A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. - """ - unit_amount_decimal: NotRequired[str] - """ - Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - """ - - class CreatePreviewParamsSubscriptionDetailsItemPriceDataRecurring( - TypedDict, - ): - interval: Literal["day", "month", "week", "year"] - """ - Specifies billing frequency. Either `day`, `week`, `month` or `year`. - """ - interval_count: NotRequired[int] - """ - The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). - """ - - class CreatePreviewParamsSubscriptionDetailsPrebilling(TypedDict): - iterations: int - """ - This is used to determine the number of billing cycles to prebill. - """ - - class DeleteParams(TypedDict): - pass - - class FinalizeInvoiceParams(TypedDict): - auto_advance: NotRequired[bool] - """ - Controls whether Stripe performs [automatic collection](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection) of the invoice. If `false`, the invoice's state doesn't automatically advance without an explicit action. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class ListParams(TypedDict): - billing_cadence: NotRequired[str] - """ - Only return invoices for the cadence specified by this billing cadence ID. - """ - collection_method: NotRequired[ - Literal["charge_automatically", "send_invoice"] - ] - """ - The collection method of the invoice to retrieve. Either `charge_automatically` or `send_invoice`. - """ - created: NotRequired["InvoiceService.ListParamsCreated|int"] - """ - Only return invoices that were created during the given date interval. - """ - customer: NotRequired[str] - """ - Only return invoices for the customer specified by this customer ID. - """ - customer_account: NotRequired[str] - """ - Only return invoices for the account specified by this account ID. - """ - due_date: NotRequired["InvoiceService.ListParamsDueDate|int"] - 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. - """ - status: NotRequired[ - Literal["draft", "open", "paid", "uncollectible", "void"] - ] - """ - The status of the invoice, one of `draft`, `open`, `paid`, `uncollectible`, or `void`. [Learn more](https://stripe.com/docs/billing/invoices/workflow#workflow-overview) - """ - subscription: NotRequired[str] - """ - Only return invoices for the subscription specified by this subscription ID. - """ - - class ListParamsCreated(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) - """ - - class ListParamsDueDate(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) - """ - - class MarkUncollectibleParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class PayParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - forgive: NotRequired[bool] - """ - In cases where the source used to pay the invoice has insufficient funds, passing `forgive=true` controls whether a charge should be attempted for the full amount available on the source, up to the amount to fully pay the invoice. This effectively forgives the difference between the amount available on the source and the amount due. - - Passing `forgive=false` will fail the charge if the source hasn't been pre-funded with the right amount. An example for this case is with ACH Credit Transfers and wires: if the amount wired is less than the amount due by a small amount, you might want to forgive the difference. Defaults to `false`. - """ - mandate: NotRequired["Literal['']|str"] - """ - ID of the mandate to be used for this invoice. It must correspond to the payment method used to pay the invoice, including the payment_method param or the invoice's default_payment_method or default_source, if set. - """ - off_session: NotRequired[bool] - """ - Indicates if a customer is on or off-session while an invoice payment is attempted. Defaults to `true` (off-session). - """ - paid_out_of_band: NotRequired[bool] - """ - Boolean representing whether an invoice is paid outside of Stripe. This will result in no charge being made. Defaults to `false`. - """ - payment_method: NotRequired[str] - """ - A PaymentMethod to be charged. The PaymentMethod must be the ID of a PaymentMethod belonging to the customer associated with the invoice being paid. - """ - source: NotRequired[str] - """ - A payment source to be charged. The source must be the ID of a source belonging to the customer associated with the invoice being paid. - """ - - class RemoveLinesParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - invoice_metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - lines: List["InvoiceService.RemoveLinesParamsLine"] - """ - The line items to remove. - """ - - class RemoveLinesParamsLine(TypedDict): - behavior: Literal["delete", "unassign"] - """ - Either `delete` or `unassign`. Deleted line items are permanently deleted. Unassigned line items can be reassigned to an invoice. - """ - id: str - """ - ID of an existing line item to remove from this invoice. - """ - - class RetrieveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class SearchParams(TypedDict): - 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. - """ - page: NotRequired[str] - """ - A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. - """ - query: str - """ - The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for invoices](https://stripe.com/docs/search#query-fields-for-invoices). - """ - - class SendInvoiceParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class UpdateLinesParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - invoice_metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. For [type=subscription](https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-type) line items, the incoming metadata specified on the request is directly used to set this value, in contrast to [type=invoiceitem](api/invoices/line_item#invoice_line_item_object-type) line items, where any existing metadata on the invoice line is merged with the incoming data. - """ - lines: List["InvoiceService.UpdateLinesParamsLine"] - """ - The line items to update. - """ - - class UpdateLinesParamsLine(TypedDict): - amount: NotRequired[int] - """ - The integer amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. If you want to apply a credit to the customer's account, pass a negative amount. - """ - description: NotRequired[str] - """ - An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking. - """ - discountable: NotRequired[bool] - """ - Controls whether discounts apply to this line item. Defaults to false for prorations or negative line items, and true for all other line items. Cannot be set to true for prorations. - """ - discounts: NotRequired[ - "Literal['']|List[InvoiceService.UpdateLinesParamsLineDiscount]" - ] - """ - The coupons, promotion codes & existing discounts which apply to the line item. Item discounts are applied before invoice discounts. Pass an empty string to remove previously-defined discounts. - """ - id: str - """ - ID of an existing line item on the invoice. - """ - margins: NotRequired["Literal['']|List[str]"] - """ - The IDs of the margins to apply to the line item. When set, the `default_margins` on the invoice do not apply to this line item. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. For [type=subscription](https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-type) line items, the incoming metadata specified on the request is directly used to set this value, in contrast to [type=invoiceitem](api/invoices/line_item#invoice_line_item_object-type) line items, where any existing metadata on the invoice line is merged with the incoming data. - """ - period: NotRequired["InvoiceService.UpdateLinesParamsLinePeriod"] - """ - The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details. - """ - price_data: NotRequired[ - "InvoiceService.UpdateLinesParamsLinePriceData" - ] - """ - Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. - """ - pricing: NotRequired["InvoiceService.UpdateLinesParamsLinePricing"] - """ - The pricing information for the invoice item. - """ - quantity: NotRequired[int] - """ - Non-negative integer. The quantity of units for the line item. - """ - tax_amounts: NotRequired[ - "Literal['']|List[InvoiceService.UpdateLinesParamsLineTaxAmount]" - ] - """ - A list of up to 10 tax amounts for this line item. This can be useful if you calculate taxes on your own or use a third-party to calculate them. You cannot set tax amounts if any line item has [tax_rates](https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-tax_rates) or if the invoice has [default_tax_rates](https://stripe.com/docs/api/invoices/object#invoice_object-default_tax_rates) or uses [automatic tax](https://stripe.com/docs/tax/invoicing). Pass an empty string to remove previously defined tax amounts. - """ - tax_rates: NotRequired["Literal['']|List[str]"] - """ - The tax rates which apply to the line item. When set, the `default_tax_rates` on the invoice do not apply to this line item. Pass an empty string to remove previously-defined tax rates. - """ - - class UpdateLinesParamsLineDiscount(TypedDict): - coupon: NotRequired[str] - """ - ID of the coupon to create a new discount for. - """ - discount: NotRequired[str] - """ - ID of an existing discount on the object (or one of its ancestors) to reuse. - """ - discount_end: NotRequired[ - "InvoiceService.UpdateLinesParamsLineDiscountDiscountEnd" - ] - """ - Details to determine how long the discount should be applied for. - """ - promotion_code: NotRequired[str] - """ - ID of the promotion code to create a new discount for. - """ - - class UpdateLinesParamsLineDiscountDiscountEnd(TypedDict): - duration: NotRequired[ - "InvoiceService.UpdateLinesParamsLineDiscountDiscountEndDuration" - ] - """ - Time span for the redeemed discount. - """ - timestamp: NotRequired[int] - """ - A precise Unix timestamp for the discount to end. Must be in the future. - """ - type: Literal["duration", "timestamp"] - """ - The type of calculation made to determine when the discount ends. - """ - - class UpdateLinesParamsLineDiscountDiscountEndDuration(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. - """ - interval_count: int - """ - The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. - """ - - class UpdateLinesParamsLinePeriod(TypedDict): - end: int - """ - The end of the period, which must be greater than or equal to the start. This value is inclusive. - """ - start: int - """ - The start of the period. This value is inclusive. - """ - - class UpdateLinesParamsLinePriceData(TypedDict): - 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). - """ - product: NotRequired[str] - """ - The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to. One of `product` or `product_data` is required. - """ - product_data: NotRequired[ - "InvoiceService.UpdateLinesParamsLinePriceDataProductData" - ] - """ - Data used to generate a new [Product](https://docs.stripe.com/api/products) object inline. One of `product` or `product_data` is required. - """ - tax_behavior: NotRequired[ - Literal["exclusive", "inclusive", "unspecified"] - ] - """ - Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. - """ - unit_amount: NotRequired[int] - """ - A non-negative integer in cents (or local equivalent) representing how much to charge. One of `unit_amount` or `unit_amount_decimal` is required. - """ - unit_amount_decimal: NotRequired[str] - """ - Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - """ - - class UpdateLinesParamsLinePriceDataProductData(TypedDict): - description: NotRequired[str] - """ - The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. - """ - images: NotRequired[List[str]] - """ - A list of up to 8 URLs of images for this product, meant to be displayable to the customer. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - name: str - """ - The product's name, meant to be displayable to the customer. - """ - tax_code: NotRequired[str] - """ - A [tax code](https://stripe.com/docs/tax/tax-categories) ID. - """ - unit_label: NotRequired[str] - """ - A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal. - """ - - class UpdateLinesParamsLinePricing(TypedDict): - price: NotRequired[str] - """ - The ID of the price object. - """ - - class UpdateLinesParamsLineTaxAmount(TypedDict): - amount: int - """ - The amount, in cents (or local equivalent), of the tax. - """ - tax_rate_data: ( - "InvoiceService.UpdateLinesParamsLineTaxAmountTaxRateData" - ) - """ - Data to find or create a TaxRate object. - - Stripe automatically creates or reuses a TaxRate object for each tax amount. If the `tax_rate_data` exactly matches a previous value, Stripe will reuse the TaxRate object. TaxRate objects created automatically by Stripe are immediately archived, do not appear in the line item's `tax_rates`, and cannot be directly added to invoices, payments, or line items. - """ - taxability_reason: NotRequired[ - Literal[ - "customer_exempt", - "not_collecting", - "not_subject_to_tax", - "not_supported", - "portion_product_exempt", - "portion_reduced_rated", - "portion_standard_rated", - "product_exempt", - "product_exempt_holiday", - "proportionally_rated", - "reduced_rated", - "reverse_charge", - "standard_rated", - "taxable_basis_reduced", - "zero_rated", - ] - ] - """ - The reasoning behind this tax, for example, if the product is tax exempt. - """ - taxable_amount: int - """ - The amount on which tax is calculated, in cents (or local equivalent). - """ - - class UpdateLinesParamsLineTaxAmountTaxRateData(TypedDict): - country: NotRequired[str] - """ - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - """ - description: NotRequired[str] - """ - An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers. - """ - display_name: str - """ - The display name of the tax rate, which will be shown to users. - """ - inclusive: bool - """ - This specifies if the tax rate is inclusive or exclusive. - """ - jurisdiction: NotRequired[str] - """ - The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer's invoice. - """ - jurisdiction_level: NotRequired[ - Literal[ - "city", "country", "county", "district", "multiple", "state" - ] - ] - """ - The level of the jurisdiction that imposes this tax rate. - """ - percentage: float - """ - The statutory tax rate percent. This field accepts decimal values between 0 and 100 inclusive with at most 4 decimal places. To accommodate fixed-amount taxes, set the percentage to zero. Stripe will not display zero percentages on the invoice unless the `amount` of the tax is also zero. - """ - state: NotRequired[str] - """ - [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States. - """ - tax_type: NotRequired[ - Literal[ - "amusement_tax", - "communications_tax", - "gst", - "hst", - "igst", - "jct", - "lease_tax", - "pst", - "qst", - "retail_delivery_fee", - "rst", - "sales_tax", - "service_tax", - "vat", - ] - ] - """ - The high-level tax type, such as `vat` or `sales_tax`. - """ - - class UpdateParams(TypedDict): - account_tax_ids: NotRequired["Literal['']|List[str]"] - """ - The account tax IDs associated with the invoice. Only editable when the invoice is a draft. - """ - amounts_due: NotRequired[ - "Literal['']|List[InvoiceService.UpdateParamsAmountsDue]" - ] - """ - List of expected payments and corresponding due dates. Valid only for invoices where `collection_method=send_invoice`. - """ - application_fee_amount: NotRequired[int] - """ - A fee in cents (or local equivalent) that will be applied to the invoice and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/billing/invoices/connect#collecting-fees). - """ - auto_advance: NotRequired[bool] - """ - Controls whether Stripe performs [automatic collection](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection) of the invoice. - """ - automatic_tax: NotRequired["InvoiceService.UpdateParamsAutomaticTax"] - """ - Settings for automatic tax lookup for this invoice. - """ - automatically_finalizes_at: NotRequired[int] - """ - The time when this invoice should be scheduled to finalize (up to 5 years in the future). The invoice is finalized at this time if it's still in draft state. To turn off automatic finalization, set `auto_advance` to false. - """ - collection_method: NotRequired[ - Literal["charge_automatically", "send_invoice"] - ] - """ - Either `charge_automatically` or `send_invoice`. This field can be updated only on `draft` invoices. - """ - custom_fields: NotRequired[ - "Literal['']|List[InvoiceService.UpdateParamsCustomField]" - ] - """ - A list of up to 4 custom fields to be displayed on the invoice. If a value for `custom_fields` is specified, the list specified will replace the existing custom field list on this invoice. Pass an empty string to remove previously-defined fields. - """ - days_until_due: NotRequired[int] - """ - The number of days from which the invoice is created until it is due. Only valid for invoices where `collection_method=send_invoice`. This field can only be updated on `draft` invoices. - """ - default_margins: NotRequired["Literal['']|List[str]"] - """ - The ids of the margins to apply to the invoice. Can be overridden by line item `margins`. - """ - default_payment_method: NotRequired[str] - """ - ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings. - """ - default_source: NotRequired["Literal['']|str"] - """ - ID of the default payment source for the invoice. It must belong to the customer associated with the invoice and be in a chargeable state. If not set, defaults to the subscription's default source, if any, or to the customer's default source. - """ - default_tax_rates: NotRequired["Literal['']|List[str]"] - """ - The tax rates that will apply to any line item that does not have `tax_rates` set. Pass an empty string to remove previously-defined tax rates. - """ - description: NotRequired[str] - """ - An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard. - """ - discounts: NotRequired[ - "Literal['']|List[InvoiceService.UpdateParamsDiscount]" - ] - """ - The discounts that will apply to the invoice. Pass an empty string to remove previously-defined discounts. - """ - due_date: NotRequired[int] - """ - The date on which payment for this invoice is due. Only valid for invoices where `collection_method=send_invoice`. This field can only be updated on `draft` invoices. - """ - effective_at: NotRequired["Literal['']|int"] - """ - The date when this invoice is in effect. Same as `finalized_at` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the invoice PDF and receipt. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - footer: NotRequired[str] - """ - Footer to be displayed on the invoice. - """ - issuer: NotRequired["InvoiceService.UpdateParamsIssuer"] - """ - The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - number: NotRequired["Literal['']|str"] - """ - Set the number for this invoice. If no number is present then a number will be assigned automatically when the invoice is finalized. In many markets, regulations require invoices to be unique, sequential and / or gapless. You are responsible for ensuring this is true across all your different invoicing systems in the event that you edit the invoice number using our API. If you use only Stripe for your invoices and do not change invoice numbers, Stripe handles this aspect of compliance for you automatically. - """ - on_behalf_of: NotRequired["Literal['']|str"] - """ - The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the [Invoices with Connect](https://stripe.com/docs/billing/invoices/connect) documentation for details. - """ - payment_settings: NotRequired[ - "InvoiceService.UpdateParamsPaymentSettings" - ] - """ - Configuration settings for the PaymentIntent that is generated when the invoice is finalized. - """ - rendering: NotRequired["InvoiceService.UpdateParamsRendering"] - """ - The rendering-related settings that control how the invoice is displayed on customer-facing surfaces such as PDF and Hosted Invoice Page. - """ - shipping_cost: NotRequired[ - "Literal['']|InvoiceService.UpdateParamsShippingCost" - ] - """ - Settings for the cost of shipping for this invoice. - """ - shipping_details: NotRequired[ - "Literal['']|InvoiceService.UpdateParamsShippingDetails" - ] - """ - Shipping details for the invoice. The Invoice PDF will use the `shipping_details` value if it is set, otherwise the PDF will render the shipping address from the customer. - """ - statement_descriptor: NotRequired[str] - """ - Extra information about a charge for the customer's credit card statement. It must contain at least one letter. If not specified and this invoice is part of a subscription, the default `statement_descriptor` will be set to the first subscription item's product's `statement_descriptor`. - """ - transfer_data: NotRequired[ - "Literal['']|InvoiceService.UpdateParamsTransferData" - ] - """ - If specified, the funds from the invoice will be transferred to the destination and the ID of the resulting transfer will be found on the invoice's charge. This will be unset if you POST an empty value. - """ - - class UpdateParamsAmountsDue(TypedDict): - amount: int - """ - The amount in cents (or local equivalent). - """ - days_until_due: NotRequired[int] - """ - Number of days from when invoice is finalized until the payment is due. - """ - description: str - """ - An arbitrary string attached to the object. Often useful for displaying to users. - """ - due_date: NotRequired[int] - """ - Date on which a payment plan's payment is due. - """ - - class UpdateParamsAutomaticTax(TypedDict): - enabled: bool - """ - Whether Stripe automatically computes tax on this invoice. Note that incompatible invoice items (invoice items with manually specified [tax rates](https://stripe.com/docs/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices. - """ - liability: NotRequired[ - "InvoiceService.UpdateParamsAutomaticTaxLiability" - ] - """ - The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. - """ - - class UpdateParamsAutomaticTaxLiability(TypedDict): - account: NotRequired[str] - """ - The connected account being referenced when `type` is `account`. - """ - type: Literal["account", "self"] - """ - Type of the account referenced in the request. - """ - - class UpdateParamsCustomField(TypedDict): - name: str - """ - The name of the custom field. This may be up to 40 characters. - """ - value: str - """ - The value of the custom field. This may be up to 140 characters. - """ - - class UpdateParamsDiscount(TypedDict): - coupon: NotRequired[str] - """ - ID of the coupon to create a new discount for. - """ - discount: NotRequired[str] - """ - ID of an existing discount on the object (or one of its ancestors) to reuse. - """ - discount_end: NotRequired[ - "InvoiceService.UpdateParamsDiscountDiscountEnd" - ] - """ - Details to determine how long the discount should be applied for. - """ - promotion_code: NotRequired[str] - """ - ID of the promotion code to create a new discount for. - """ - - class UpdateParamsDiscountDiscountEnd(TypedDict): - duration: NotRequired[ - "InvoiceService.UpdateParamsDiscountDiscountEndDuration" - ] - """ - Time span for the redeemed discount. - """ - timestamp: NotRequired[int] - """ - A precise Unix timestamp for the discount to end. Must be in the future. - """ - type: Literal["duration", "timestamp"] - """ - The type of calculation made to determine when the discount ends. - """ - - class UpdateParamsDiscountDiscountEndDuration(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. - """ - interval_count: int - """ - The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. - """ - - class UpdateParamsIssuer(TypedDict): - account: NotRequired[str] - """ - The connected account being referenced when `type` is `account`. - """ - type: Literal["account", "self"] - """ - Type of the account referenced in the request. - """ - - class UpdateParamsPaymentSettings(TypedDict): - default_mandate: NotRequired["Literal['']|str"] - """ - ID of the mandate to be used for this invoice. It must correspond to the payment method used to pay the invoice, including the invoice's default_payment_method or default_source, if set. - """ - payment_method_options: NotRequired[ - "InvoiceService.UpdateParamsPaymentSettingsPaymentMethodOptions" - ] - """ - Payment-method-specific configuration to provide to the invoice's PaymentIntent. - """ - payment_method_types: NotRequired[ - "Literal['']|List[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'affirm', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'boleto', 'card', 'cashapp', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'id_bank_transfer', 'ideal', 'jp_credit_transfer', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'multibanco', 'naver_pay', 'nz_bank_account', 'p24', 'payco', 'paynow', 'paypal', 'pix', 'promptpay', 'revolut_pay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'stripe_balance', 'swish', 'upi', 'us_bank_account', 'wechat_pay']]" - ] - """ - The list of payment method types (e.g. card) to provide to the invoice's PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice's default payment method, the subscription's default payment method, the customer's default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). - """ - - class UpdateParamsPaymentSettingsPaymentMethodOptions(TypedDict): - acss_debit: NotRequired[ - "Literal['']|InvoiceService.UpdateParamsPaymentSettingsPaymentMethodOptionsAcssDebit" - ] - """ - If paying by `acss_debit`, this sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice's PaymentIntent. - """ - bancontact: NotRequired[ - "Literal['']|InvoiceService.UpdateParamsPaymentSettingsPaymentMethodOptionsBancontact" - ] - """ - If paying by `bancontact`, this sub-hash contains details about the Bancontact payment method options to pass to the invoice's PaymentIntent. - """ - card: NotRequired[ - "Literal['']|InvoiceService.UpdateParamsPaymentSettingsPaymentMethodOptionsCard" - ] - """ - If paying by `card`, this sub-hash contains details about the Card payment method options to pass to the invoice's PaymentIntent. - """ - customer_balance: NotRequired[ - "Literal['']|InvoiceService.UpdateParamsPaymentSettingsPaymentMethodOptionsCustomerBalance" - ] - """ - If paying by `customer_balance`, this sub-hash contains details about the Bank transfer payment method options to pass to the invoice's PaymentIntent. - """ - id_bank_transfer: NotRequired[ - "Literal['']|InvoiceService.UpdateParamsPaymentSettingsPaymentMethodOptionsIdBankTransfer" - ] - """ - If paying by `id_bank_transfer`, this sub-hash contains details about the Indonesia bank transfer payment method options to pass to the invoice's PaymentIntent. - """ - konbini: NotRequired[ - "Literal['']|InvoiceService.UpdateParamsPaymentSettingsPaymentMethodOptionsKonbini" - ] - """ - If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice's PaymentIntent. - """ - pix: NotRequired[ - "Literal['']|InvoiceService.UpdateParamsPaymentSettingsPaymentMethodOptionsPix" - ] - """ - If paying by `pix`, this sub-hash contains details about the Pix payment method options to pass to the invoice's PaymentIntent. - """ - sepa_debit: NotRequired[ - "Literal['']|InvoiceService.UpdateParamsPaymentSettingsPaymentMethodOptionsSepaDebit" - ] - """ - If paying by `sepa_debit`, this sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice's PaymentIntent. - """ - upi: NotRequired[ - "Literal['']|InvoiceService.UpdateParamsPaymentSettingsPaymentMethodOptionsUpi" - ] - """ - If paying by `upi`, this sub-hash contains details about the UPI payment method options to pass to the invoice's PaymentIntent. - """ - us_bank_account: NotRequired[ - "Literal['']|InvoiceService.UpdateParamsPaymentSettingsPaymentMethodOptionsUsBankAccount" - ] - """ - If paying by `us_bank_account`, this sub-hash contains details about the ACH direct debit payment method options to pass to the invoice's PaymentIntent. - """ - - class UpdateParamsPaymentSettingsPaymentMethodOptionsAcssDebit(TypedDict): - mandate_options: NotRequired[ - "InvoiceService.UpdateParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions" - ] - """ - Additional fields for Mandate creation - """ - verification_method: NotRequired[ - Literal["automatic", "instant", "microdeposits"] - ] - """ - Verification method for the intent - """ - - class UpdateParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions( - TypedDict, - ): - transaction_type: NotRequired[Literal["business", "personal"]] - """ - Transaction type of the mandate. - """ - - class UpdateParamsPaymentSettingsPaymentMethodOptionsBancontact(TypedDict): - preferred_language: NotRequired[Literal["de", "en", "fr", "nl"]] - """ - Preferred language of the Bancontact authorization page that the customer is redirected to. - """ - - class UpdateParamsPaymentSettingsPaymentMethodOptionsCard(TypedDict): - installments: NotRequired[ - "InvoiceService.UpdateParamsPaymentSettingsPaymentMethodOptionsCardInstallments" - ] - """ - Installment configuration for payments attempted on this invoice. - - For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments). - """ - request_three_d_secure: NotRequired[ - Literal["any", "automatic", "challenge"] - ] - """ - We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. - """ - - class UpdateParamsPaymentSettingsPaymentMethodOptionsCardInstallments( - TypedDict, - ): - enabled: NotRequired[bool] - """ - Setting to true enables installments for this invoice. - Setting to false will prevent any selected plan from applying to a payment. - """ - plan: NotRequired[ - "Literal['']|InvoiceService.UpdateParamsPaymentSettingsPaymentMethodOptionsCardInstallmentsPlan" - ] - """ - The selected installment plan to use for this invoice. - """ - - class UpdateParamsPaymentSettingsPaymentMethodOptionsCardInstallmentsPlan( - TypedDict, - ): - count: NotRequired[int] - """ - For `fixed_count` installment plans, this is required. It represents the number of installment payments your customer will make to their credit card. - """ - interval: NotRequired[Literal["month"]] - """ - For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card. - One of `month`. - """ - type: Literal["bonus", "fixed_count", "revolving"] - """ - Type of installment plan, one of `fixed_count`, `bonus`, or `revolving`. - """ - - class UpdateParamsPaymentSettingsPaymentMethodOptionsCustomerBalance( - TypedDict, - ): - bank_transfer: NotRequired[ - "InvoiceService.UpdateParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransfer" - ] - """ - Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. - """ - funding_type: NotRequired[str] - """ - The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. - """ - - class UpdateParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransfer( - TypedDict, - ): - eu_bank_transfer: NotRequired[ - "InvoiceService.UpdateParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer" - ] - """ - Configuration for eu_bank_transfer funding type. - """ - type: NotRequired[str] - """ - The bank transfer type that can be used for funding. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. - """ - - class UpdateParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer( - TypedDict, - ): - country: str - """ - The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. - """ - - class UpdateParamsPaymentSettingsPaymentMethodOptionsIdBankTransfer( - TypedDict, - ): - pass - - class UpdateParamsPaymentSettingsPaymentMethodOptionsKonbini(TypedDict): - pass - - class UpdateParamsPaymentSettingsPaymentMethodOptionsPix(TypedDict): - amount_includes_iof: NotRequired[Literal["always", "never"]] - """ - Determines if the amount includes the IOF tax. Defaults to `never`. - """ - - class UpdateParamsPaymentSettingsPaymentMethodOptionsSepaDebit(TypedDict): - pass - - class UpdateParamsPaymentSettingsPaymentMethodOptionsUpi(TypedDict): - mandate_options: NotRequired[ - "InvoiceService.UpdateParamsPaymentSettingsPaymentMethodOptionsUpiMandateOptions" - ] - """ - Configuration options for setting up an eMandate - """ - - class UpdateParamsPaymentSettingsPaymentMethodOptionsUpiMandateOptions( - TypedDict, - ): - amount: NotRequired[int] - """ - Amount to be charged for future payments. - """ - amount_type: NotRequired[Literal["fixed", "maximum"]] - """ - One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. - """ - description: NotRequired[str] - """ - A description of the mandate or subscription that is meant to be displayed to the customer. - """ - end_date: NotRequired[int] - """ - End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. - """ - - class UpdateParamsPaymentSettingsPaymentMethodOptionsUsBankAccount( - TypedDict, - ): - financial_connections: NotRequired[ - "InvoiceService.UpdateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections" - ] - """ - Additional fields for Financial Connections Session creation - """ - verification_method: NotRequired[ - Literal["automatic", "instant", "microdeposits"] - ] - """ - Verification method for the intent - """ - - class UpdateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections( - TypedDict, - ): - filters: NotRequired[ - "InvoiceService.UpdateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters" - ] - """ - Provide filters for the linked accounts that the customer can select for the payment method. - """ - permissions: NotRequired[ - List[ - Literal[ - "balances", "ownership", "payment_method", "transactions" - ] - ] - ] - """ - The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. - """ - prefetch: NotRequired[ - List[ - Literal[ - "balances", - "inferred_balances", - "ownership", - "transactions", - ] - ] - ] - """ - List of data features that you would like to retrieve upon account creation. - """ - - class UpdateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters( - TypedDict, - ): - account_subcategories: NotRequired[ - List[Literal["checking", "savings"]] - ] - """ - The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`. - """ - institution: NotRequired[str] - """ - ID of the institution to use to filter for selectable accounts. - """ - - class UpdateParamsRendering(TypedDict): - amount_tax_display: NotRequired[ - "Literal['']|Literal['exclude_tax', 'include_inclusive_tax']" - ] - """ - How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One of `exclude_tax` or `include_inclusive_tax`. `include_inclusive_tax` will include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. `exclude_tax` will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts. - """ - pdf: NotRequired["InvoiceService.UpdateParamsRenderingPdf"] - """ - Invoice pdf rendering options - """ - template: NotRequired[str] - """ - ID of the invoice rendering template to use for this invoice. - """ - template_version: NotRequired["Literal['']|int"] - """ - The specific version of invoice rendering template to use for this invoice. - """ - - class UpdateParamsRenderingPdf(TypedDict): - page_size: NotRequired[Literal["a4", "auto", "letter"]] - """ - Page size for invoice PDF. Can be set to `a4`, `letter`, or `auto`. - If set to `auto`, invoice PDF page size defaults to `a4` for customers with - Japanese locale and `letter` for customers with other locales. - """ - - class UpdateParamsShippingCost(TypedDict): - shipping_rate: NotRequired[str] - """ - The ID of the shipping rate to use for this order. - """ - shipping_rate_data: NotRequired[ - "InvoiceService.UpdateParamsShippingCostShippingRateData" - ] - """ - Parameters to create a new ad-hoc shipping rate for this order. - """ - - class UpdateParamsShippingCostShippingRateData(TypedDict): - delivery_estimate: NotRequired[ - "InvoiceService.UpdateParamsShippingCostShippingRateDataDeliveryEstimate" - ] - """ - The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions. - """ - display_name: str - """ - The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions. - """ - fixed_amount: NotRequired[ - "InvoiceService.UpdateParamsShippingCostShippingRateDataFixedAmount" - ] - """ - Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - tax_behavior: NotRequired[ - Literal["exclusive", "inclusive", "unspecified"] - ] - """ - Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. - """ - tax_code: NotRequired[str] - """ - A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`. - """ - type: NotRequired[Literal["fixed_amount"]] - """ - The type of calculation to use on the shipping rate. - """ - - class UpdateParamsShippingCostShippingRateDataDeliveryEstimate(TypedDict): - maximum: NotRequired[ - "InvoiceService.UpdateParamsShippingCostShippingRateDataDeliveryEstimateMaximum" - ] - """ - The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite. - """ - minimum: NotRequired[ - "InvoiceService.UpdateParamsShippingCostShippingRateDataDeliveryEstimateMinimum" - ] - """ - The lower bound of the estimated range. If empty, represents no lower bound. - """ - - class UpdateParamsShippingCostShippingRateDataDeliveryEstimateMaximum( - TypedDict, - ): - unit: Literal["business_day", "day", "hour", "month", "week"] - """ - A unit of time. - """ - value: int - """ - Must be greater than 0. - """ - - class UpdateParamsShippingCostShippingRateDataDeliveryEstimateMinimum( - TypedDict, - ): - unit: Literal["business_day", "day", "hour", "month", "week"] - """ - A unit of time. - """ - value: int - """ - Must be greater than 0. - """ - - class UpdateParamsShippingCostShippingRateDataFixedAmount(TypedDict): - amount: int - """ - A non-negative integer in cents representing how much to charge. - """ - 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). - """ - currency_options: NotRequired[ - Dict[ - str, - "InvoiceService.UpdateParamsShippingCostShippingRateDataFixedAmountCurrencyOptions", - ] - ] - """ - Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). - """ - - class UpdateParamsShippingCostShippingRateDataFixedAmountCurrencyOptions( - TypedDict, - ): - amount: int - """ - A non-negative integer in cents representing how much to charge. - """ - tax_behavior: NotRequired[ - Literal["exclusive", "inclusive", "unspecified"] - ] - """ - Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. - """ - - class UpdateParamsShippingDetails(TypedDict): - address: "InvoiceService.UpdateParamsShippingDetailsAddress" - """ - Shipping address - """ - name: str - """ - Recipient name. - """ - phone: NotRequired["Literal['']|str"] - """ - Recipient phone (including extension) - """ - - class UpdateParamsShippingDetailsAddress(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. - """ - - class UpdateParamsTransferData(TypedDict): - amount: NotRequired[int] - """ - The amount that will be transferred automatically when the invoice is paid. If no amount is set, the full amount is transferred. - """ - destination: str - """ - ID of an existing, connected Stripe account. - """ - - class VoidInvoiceParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - def delete( self, invoice: str, - params: Optional["InvoiceService.DeleteParams"] = None, + params: Optional["InvoiceDeleteParams"] = None, options: Optional[RequestOptions] = None, ) -> Invoice: """ @@ -4449,7 +73,7 @@ def delete( async def delete_async( self, invoice: str, - params: Optional["InvoiceService.DeleteParams"] = None, + params: Optional["InvoiceDeleteParams"] = None, options: Optional[RequestOptions] = None, ) -> Invoice: """ @@ -4469,7 +93,7 @@ async def delete_async( def retrieve( self, invoice: str, - params: Optional["InvoiceService.RetrieveParams"] = None, + params: Optional["InvoiceRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Invoice: """ @@ -4489,7 +113,7 @@ def retrieve( async def retrieve_async( self, invoice: str, - params: Optional["InvoiceService.RetrieveParams"] = None, + params: Optional["InvoiceRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Invoice: """ @@ -4509,7 +133,7 @@ async def retrieve_async( def update( self, invoice: str, - params: Optional["InvoiceService.UpdateParams"] = None, + params: Optional["InvoiceUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> Invoice: """ @@ -4534,7 +158,7 @@ def update( async def update_async( self, invoice: str, - params: Optional["InvoiceService.UpdateParams"] = None, + params: Optional["InvoiceUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> Invoice: """ @@ -4558,7 +182,7 @@ async def update_async( def list( self, - params: Optional["InvoiceService.ListParams"] = None, + params: Optional["InvoiceListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[Invoice]: """ @@ -4577,7 +201,7 @@ def list( async def list_async( self, - params: Optional["InvoiceService.ListParams"] = None, + params: Optional["InvoiceListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[Invoice]: """ @@ -4596,7 +220,7 @@ async def list_async( def create( self, - params: Optional["InvoiceService.CreateParams"] = None, + params: Optional["InvoiceCreateParams"] = None, options: Optional[RequestOptions] = None, ) -> Invoice: """ @@ -4615,7 +239,7 @@ def create( async def create_async( self, - params: Optional["InvoiceService.CreateParams"] = None, + params: Optional["InvoiceCreateParams"] = None, options: Optional[RequestOptions] = None, ) -> Invoice: """ @@ -4634,7 +258,7 @@ async def create_async( def search( self, - params: "InvoiceService.SearchParams", + params: "InvoiceSearchParams", options: Optional[RequestOptions] = None, ) -> SearchResultObject[Invoice]: """ @@ -4656,7 +280,7 @@ def search( async def search_async( self, - params: "InvoiceService.SearchParams", + params: "InvoiceSearchParams", options: Optional[RequestOptions] = None, ) -> SearchResultObject[Invoice]: """ @@ -4679,7 +303,7 @@ async def search_async( def add_lines( self, invoice: str, - params: "InvoiceService.AddLinesParams", + params: "InvoiceAddLinesParams", options: Optional[RequestOptions] = None, ) -> Invoice: """ @@ -4701,7 +325,7 @@ def add_lines( async def add_lines_async( self, invoice: str, - params: "InvoiceService.AddLinesParams", + params: "InvoiceAddLinesParams", options: Optional[RequestOptions] = None, ) -> Invoice: """ @@ -4723,7 +347,7 @@ async def add_lines_async( def attach_payment( self, invoice: str, - params: Optional["InvoiceService.AttachPaymentParams"] = None, + params: Optional["InvoiceAttachPaymentParams"] = None, options: Optional[RequestOptions] = None, ) -> Invoice: """ @@ -4754,7 +378,7 @@ def attach_payment( async def attach_payment_async( self, invoice: str, - params: Optional["InvoiceService.AttachPaymentParams"] = None, + params: Optional["InvoiceAttachPaymentParams"] = None, options: Optional[RequestOptions] = None, ) -> Invoice: """ @@ -4785,7 +409,7 @@ async def attach_payment_async( def finalize_invoice( self, invoice: str, - params: Optional["InvoiceService.FinalizeInvoiceParams"] = None, + params: Optional["InvoiceFinalizeInvoiceParams"] = None, options: Optional[RequestOptions] = None, ) -> Invoice: """ @@ -4807,7 +431,7 @@ def finalize_invoice( async def finalize_invoice_async( self, invoice: str, - params: Optional["InvoiceService.FinalizeInvoiceParams"] = None, + params: Optional["InvoiceFinalizeInvoiceParams"] = None, options: Optional[RequestOptions] = None, ) -> Invoice: """ @@ -4829,7 +453,7 @@ async def finalize_invoice_async( def mark_uncollectible( self, invoice: str, - params: Optional["InvoiceService.MarkUncollectibleParams"] = None, + params: Optional["InvoiceMarkUncollectibleParams"] = None, options: Optional[RequestOptions] = None, ) -> Invoice: """ @@ -4851,7 +475,7 @@ def mark_uncollectible( async def mark_uncollectible_async( self, invoice: str, - params: Optional["InvoiceService.MarkUncollectibleParams"] = None, + params: Optional["InvoiceMarkUncollectibleParams"] = None, options: Optional[RequestOptions] = None, ) -> Invoice: """ @@ -4873,7 +497,7 @@ async def mark_uncollectible_async( def pay( self, invoice: str, - params: Optional["InvoiceService.PayParams"] = None, + params: Optional["InvoicePayParams"] = None, options: Optional[RequestOptions] = None, ) -> Invoice: """ @@ -4895,7 +519,7 @@ def pay( async def pay_async( self, invoice: str, - params: Optional["InvoiceService.PayParams"] = None, + params: Optional["InvoicePayParams"] = None, options: Optional[RequestOptions] = None, ) -> Invoice: """ @@ -4917,7 +541,7 @@ async def pay_async( def remove_lines( self, invoice: str, - params: "InvoiceService.RemoveLinesParams", + params: "InvoiceRemoveLinesParams", options: Optional[RequestOptions] = None, ) -> Invoice: """ @@ -4939,7 +563,7 @@ def remove_lines( async def remove_lines_async( self, invoice: str, - params: "InvoiceService.RemoveLinesParams", + params: "InvoiceRemoveLinesParams", options: Optional[RequestOptions] = None, ) -> Invoice: """ @@ -4961,7 +585,7 @@ async def remove_lines_async( def send_invoice( self, invoice: str, - params: Optional["InvoiceService.SendInvoiceParams"] = None, + params: Optional["InvoiceSendInvoiceParams"] = None, options: Optional[RequestOptions] = None, ) -> Invoice: """ @@ -4985,7 +609,7 @@ def send_invoice( async def send_invoice_async( self, invoice: str, - params: Optional["InvoiceService.SendInvoiceParams"] = None, + params: Optional["InvoiceSendInvoiceParams"] = None, options: Optional[RequestOptions] = None, ) -> Invoice: """ @@ -5009,7 +633,7 @@ async def send_invoice_async( def update_lines( self, invoice: str, - params: "InvoiceService.UpdateLinesParams", + params: "InvoiceUpdateLinesParams", options: Optional[RequestOptions] = None, ) -> Invoice: """ @@ -5031,7 +655,7 @@ def update_lines( async def update_lines_async( self, invoice: str, - params: "InvoiceService.UpdateLinesParams", + params: "InvoiceUpdateLinesParams", options: Optional[RequestOptions] = None, ) -> Invoice: """ @@ -5053,7 +677,7 @@ async def update_lines_async( def void_invoice( self, invoice: str, - params: Optional["InvoiceService.VoidInvoiceParams"] = None, + params: Optional["InvoiceVoidInvoiceParams"] = None, options: Optional[RequestOptions] = None, ) -> Invoice: """ @@ -5077,7 +701,7 @@ def void_invoice( async def void_invoice_async( self, invoice: str, - params: Optional["InvoiceService.VoidInvoiceParams"] = None, + params: Optional["InvoiceVoidInvoiceParams"] = None, options: Optional[RequestOptions] = None, ) -> Invoice: """ @@ -5100,7 +724,7 @@ async def void_invoice_async( def create_preview( self, - params: Optional["InvoiceService.CreatePreviewParams"] = None, + params: Optional["InvoiceCreatePreviewParams"] = None, options: Optional[RequestOptions] = None, ) -> Invoice: """ @@ -5127,7 +751,7 @@ def create_preview( async def create_preview_async( self, - params: Optional["InvoiceService.CreatePreviewParams"] = None, + params: Optional["InvoiceCreatePreviewParams"] = None, options: Optional[RequestOptions] = None, ) -> Invoice: """ diff --git a/stripe/_mandate.py b/stripe/_mandate.py index f2ba85c22..a02b82012 100644 --- a/stripe/_mandate.py +++ b/stripe/_mandate.py @@ -3,13 +3,14 @@ from stripe._expandable_field import ExpandableField from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource -from stripe._request_options import RequestOptions from stripe._stripe_object import StripeObject from typing import ClassVar, List, Optional -from typing_extensions import Literal, NotRequired, Unpack, TYPE_CHECKING +from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: from stripe._payment_method import PaymentMethod + from stripe.params._mandate_list_params import MandateListParams + from stripe.params._mandate_retrieve_params import MandateRetrieveParams class Mandate(ListableAPIResource["Mandate"]): @@ -309,39 +310,6 @@ class SingleUse(StripeObject): The currency of the payment on a single use mandate. """ - class ListParams(RequestOptions): - 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. - """ - on_behalf_of: NotRequired[str] - """ - The Stripe account ID that the mandates are intended for. Learn more about the [use case for connected accounts payments](https://stripe.com/docs/payments/connected-accounts). - """ - payment_method: str - 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. - """ - status: Literal["active", "inactive", "pending"] - """ - The status of the mandates to retrieve. Status indicates whether or not you can use it to initiate a payment, and can have a value of `active`, `pending`, or `inactive`. - """ - - class RetrieveParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - customer_acceptance: CustomerAcceptance id: str """ @@ -377,7 +345,7 @@ class RetrieveParams(RequestOptions): @classmethod def list( - cls, **params: Unpack["Mandate.ListParams"] + cls, **params: Unpack["MandateListParams"] ) -> ListObject["Mandate"]: """ Retrieves a list of Mandates for a given PaymentMethod. @@ -397,7 +365,7 @@ def list( @classmethod async def list_async( - cls, **params: Unpack["Mandate.ListParams"] + cls, **params: Unpack["MandateListParams"] ) -> ListObject["Mandate"]: """ Retrieves a list of Mandates for a given PaymentMethod. @@ -417,7 +385,7 @@ async def list_async( @classmethod def retrieve( - cls, id: str, **params: Unpack["Mandate.RetrieveParams"] + cls, id: str, **params: Unpack["MandateRetrieveParams"] ) -> "Mandate": """ Retrieves a Mandate object. @@ -428,7 +396,7 @@ def retrieve( @classmethod async def retrieve_async( - cls, id: str, **params: Unpack["Mandate.RetrieveParams"] + cls, id: str, **params: Unpack["MandateRetrieveParams"] ) -> "Mandate": """ Retrieves a Mandate object. diff --git a/stripe/_mandate_service.py b/stripe/_mandate_service.py index a7cc3521f..e8e8c721b 100644 --- a/stripe/_mandate_service.py +++ b/stripe/_mandate_service.py @@ -5,47 +5,18 @@ from stripe._request_options import RequestOptions from stripe._stripe_service import StripeService from stripe._util import sanitize_id -from typing import List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params._mandate_list_params import MandateListParams + from stripe.params._mandate_retrieve_params import MandateRetrieveParams -class MandateService(StripeService): - class ListParams(TypedDict): - 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. - """ - on_behalf_of: NotRequired[str] - """ - The Stripe account ID that the mandates are intended for. Learn more about the [use case for connected accounts payments](https://stripe.com/docs/payments/connected-accounts). - """ - payment_method: str - 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. - """ - status: Literal["active", "inactive", "pending"] - """ - The status of the mandates to retrieve. Status indicates whether or not you can use it to initiate a payment, and can have a value of `active`, `pending`, or `inactive`. - """ - - class RetrieveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ +class MandateService(StripeService): def list( self, - params: "MandateService.ListParams", + params: "MandateListParams", options: Optional[RequestOptions] = None, ) -> ListObject[Mandate]: """ @@ -64,7 +35,7 @@ def list( async def list_async( self, - params: "MandateService.ListParams", + params: "MandateListParams", options: Optional[RequestOptions] = None, ) -> ListObject[Mandate]: """ @@ -84,7 +55,7 @@ async def list_async( def retrieve( self, mandate: str, - params: Optional["MandateService.RetrieveParams"] = None, + params: Optional["MandateRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Mandate: """ @@ -104,7 +75,7 @@ def retrieve( async def retrieve_async( self, mandate: str, - params: Optional["MandateService.RetrieveParams"] = None, + params: Optional["MandateRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Mandate: """ diff --git a/stripe/_margin.py b/stripe/_margin.py index d3563029b..d9b2e14ea 100644 --- a/stripe/_margin.py +++ b/stripe/_margin.py @@ -3,11 +3,16 @@ from stripe._createable_api_resource import CreateableAPIResource from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource -from stripe._request_options import RequestOptions from stripe._updateable_api_resource import UpdateableAPIResource from stripe._util import sanitize_id -from typing import ClassVar, Dict, List, Optional, cast -from typing_extensions import Literal, NotRequired, Unpack +from typing import ClassVar, Dict, Optional, cast +from typing_extensions import Literal, Unpack, TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params._margin_create_params import MarginCreateParams + from stripe.params._margin_list_params import MarginListParams + from stripe.params._margin_modify_params import MarginModifyParams + from stripe.params._margin_retrieve_params import MarginRetrieveParams class Margin( @@ -21,75 +26,6 @@ class Margin( """ OBJECT_NAME: ClassVar[Literal["margin"]] = "margin" - - class CreateParams(RequestOptions): - active: NotRequired[bool] - """ - Whether the margin can be applied to invoices, invoice items, or invoice line items or not. Defaults to `true`. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - name: NotRequired[str] - """ - Name of the margin, which is displayed to customers, such as on invoices. - """ - percent_off: float - """ - Percent that will be taken off the subtotal before tax (after all other discounts and promotions) of any invoice to which the margin is applied. - """ - - class ListParams(RequestOptions): - active: NotRequired[bool] - """ - Only return margins that are active or inactive. For example, pass `true` to only list active margins. - """ - 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 ModifyParams(RequestOptions): - active: NotRequired[bool] - """ - Whether the margin can be applied to invoices, invoice items, or invoice line items or not. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - name: NotRequired[str] - """ - Name of the margin, which is displayed to customers, such as on invoices. - """ - - class RetrieveParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - active: bool """ Whether the margin can be applied to invoices, invoice items, or invoice line items. Defaults to `true`. @@ -128,7 +64,7 @@ class RetrieveParams(RequestOptions): """ @classmethod - def create(cls, **params: Unpack["Margin.CreateParams"]) -> "Margin": + def create(cls, **params: Unpack["MarginCreateParams"]) -> "Margin": """ Create a margin object to be used with invoices, invoice items, and invoice line items for a customer to represent a partner discount. A margin has a percent_off which is the percent that will be taken off the subtotal after all items and other discounts and promotions) of any invoices for a customer. Calculation of prorations do not include any partner margins applied on the original invoice item. """ @@ -143,7 +79,7 @@ def create(cls, **params: Unpack["Margin.CreateParams"]) -> "Margin": @classmethod async def create_async( - cls, **params: Unpack["Margin.CreateParams"] + cls, **params: Unpack["MarginCreateParams"] ) -> "Margin": """ Create a margin object to be used with invoices, invoice items, and invoice line items for a customer to represent a partner discount. A margin has a percent_off which is the percent that will be taken off the subtotal after all items and other discounts and promotions) of any invoices for a customer. Calculation of prorations do not include any partner margins applied on the original invoice item. @@ -159,7 +95,7 @@ async def create_async( @classmethod def list( - cls, **params: Unpack["Margin.ListParams"] + cls, **params: Unpack["MarginListParams"] ) -> ListObject["Margin"]: """ Retrieve a list of your margins. @@ -179,7 +115,7 @@ def list( @classmethod async def list_async( - cls, **params: Unpack["Margin.ListParams"] + cls, **params: Unpack["MarginListParams"] ) -> ListObject["Margin"]: """ Retrieve a list of your margins. @@ -199,7 +135,7 @@ async def list_async( @classmethod def modify( - cls, id: str, **params: Unpack["Margin.ModifyParams"] + cls, id: str, **params: Unpack["MarginModifyParams"] ) -> "Margin": """ Update the specified margin object. Certain fields of the margin object are not editable. @@ -216,7 +152,7 @@ def modify( @classmethod async def modify_async( - cls, id: str, **params: Unpack["Margin.ModifyParams"] + cls, id: str, **params: Unpack["MarginModifyParams"] ) -> "Margin": """ Update the specified margin object. Certain fields of the margin object are not editable. @@ -233,7 +169,7 @@ async def modify_async( @classmethod def retrieve( - cls, id: str, **params: Unpack["Margin.RetrieveParams"] + cls, id: str, **params: Unpack["MarginRetrieveParams"] ) -> "Margin": """ Retrieve a margin object with the given ID. @@ -244,7 +180,7 @@ def retrieve( @classmethod async def retrieve_async( - cls, id: str, **params: Unpack["Margin.RetrieveParams"] + cls, id: str, **params: Unpack["MarginRetrieveParams"] ) -> "Margin": """ Retrieve a margin object with the given ID. diff --git a/stripe/_margin_service.py b/stripe/_margin_service.py index d4e5a732f..a2cfbaba1 100644 --- a/stripe/_margin_service.py +++ b/stripe/_margin_service.py @@ -5,82 +5,20 @@ from stripe._request_options import RequestOptions from stripe._stripe_service import StripeService from stripe._util import sanitize_id -from typing import Dict, List, Optional, cast -from typing_extensions import NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params._margin_create_params import MarginCreateParams + from stripe.params._margin_list_params import MarginListParams + from stripe.params._margin_retrieve_params import MarginRetrieveParams + from stripe.params._margin_update_params import MarginUpdateParams -class MarginService(StripeService): - class CreateParams(TypedDict): - active: NotRequired[bool] - """ - Whether the margin can be applied to invoices, invoice items, or invoice line items or not. Defaults to `true`. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - name: NotRequired[str] - """ - Name of the margin, which is displayed to customers, such as on invoices. - """ - percent_off: float - """ - Percent that will be taken off the subtotal before tax (after all other discounts and promotions) of any invoice to which the margin is applied. - """ - - class ListParams(TypedDict): - active: NotRequired[bool] - """ - Only return margins that are active or inactive. For example, pass `true` to only list active margins. - """ - 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 RetrieveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class UpdateParams(TypedDict): - active: NotRequired[bool] - """ - Whether the margin can be applied to invoices, invoice items, or invoice line items or not. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - name: NotRequired[str] - """ - Name of the margin, which is displayed to customers, such as on invoices. - """ +class MarginService(StripeService): def list( self, - params: Optional["MarginService.ListParams"] = None, + params: Optional["MarginListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[Margin]: """ @@ -99,7 +37,7 @@ def list( async def list_async( self, - params: Optional["MarginService.ListParams"] = None, + params: Optional["MarginListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[Margin]: """ @@ -118,7 +56,7 @@ async def list_async( def create( self, - params: "MarginService.CreateParams", + params: "MarginCreateParams", options: Optional[RequestOptions] = None, ) -> Margin: """ @@ -137,7 +75,7 @@ def create( async def create_async( self, - params: "MarginService.CreateParams", + params: "MarginCreateParams", options: Optional[RequestOptions] = None, ) -> Margin: """ @@ -157,7 +95,7 @@ async def create_async( def retrieve( self, margin: str, - params: Optional["MarginService.RetrieveParams"] = None, + params: Optional["MarginRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Margin: """ @@ -179,7 +117,7 @@ def retrieve( async def retrieve_async( self, margin: str, - params: Optional["MarginService.RetrieveParams"] = None, + params: Optional["MarginRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Margin: """ @@ -201,7 +139,7 @@ async def retrieve_async( def update( self, margin: str, - params: Optional["MarginService.UpdateParams"] = None, + params: Optional["MarginUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> Margin: """ @@ -223,7 +161,7 @@ def update( async def update_async( self, margin: str, - params: Optional["MarginService.UpdateParams"] = None, + params: Optional["MarginUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> Margin: """ diff --git a/stripe/_object_classes.py b/stripe/_object_classes.py index 316086a98..dd82c7bee 100644 --- a/stripe/_object_classes.py +++ b/stripe/_object_classes.py @@ -207,10 +207,10 @@ stripe.v2.core.AccountLink.OBJECT_NAME: stripe.v2.core.AccountLink, stripe.v2.core.AccountPerson.OBJECT_NAME: stripe.v2.core.AccountPerson, stripe.v2.core.ClaimableSandbox.OBJECT_NAME: stripe.v2.core.ClaimableSandbox, + stripe.v2.core.Event.OBJECT_NAME: stripe.v2.core.Event, + stripe.v2.core.EventDestination.OBJECT_NAME: stripe.v2.core.EventDestination, stripe.v2.core.vault.GbBankAccount.OBJECT_NAME: stripe.v2.core.vault.GbBankAccount, stripe.v2.core.vault.UsBankAccount.OBJECT_NAME: stripe.v2.core.vault.UsBankAccount, - stripe.v2.Event.OBJECT_NAME: stripe.v2.Event, - stripe.v2.EventDestination.OBJECT_NAME: stripe.v2.EventDestination, stripe.v2.FinancialAddressCreditSimulation.OBJECT_NAME: stripe.v2.FinancialAddressCreditSimulation, stripe.v2.FinancialAddressGeneratedMicrodeposits.OBJECT_NAME: stripe.v2.FinancialAddressGeneratedMicrodeposits, stripe.v2.money_management.Adjustment.OBJECT_NAME: stripe.v2.money_management.Adjustment, diff --git a/stripe/_order.py b/stripe/_order.py index 0e9d3b19d..0dbf7f649 100644 --- a/stripe/_order.py +++ b/stripe/_order.py @@ -4,18 +4,11 @@ from stripe._expandable_field import ExpandableField from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource -from stripe._request_options import RequestOptions from stripe._stripe_object import StripeObject from stripe._updateable_api_resource import UpdateableAPIResource from stripe._util import class_method_variant, sanitize_id from typing import ClassVar, Dict, List, Optional, cast, overload -from typing_extensions import ( - Literal, - NotRequired, - TypedDict, - Unpack, - TYPE_CHECKING, -) +from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: from stripe._account import Account @@ -26,6 +19,16 @@ from stripe._payment_intent import PaymentIntent from stripe._shipping_rate import ShippingRate from stripe._tax_rate import TaxRate + from stripe.params._order_cancel_params import OrderCancelParams + from stripe.params._order_create_params import OrderCreateParams + from stripe.params._order_list_line_items_params import ( + OrderListLineItemsParams, + ) + from stripe.params._order_list_params import OrderListParams + from stripe.params._order_modify_params import OrderModifyParams + from stripe.params._order_reopen_params import OrderReopenParams + from stripe.params._order_retrieve_params import OrderRetrieveParams + from stripe.params._order_submit_params import OrderSubmitParams class Order( @@ -975,2832 +978,6 @@ class Tax(StripeObject): breakdown: Optional[Breakdown] _inner_class_types = {"breakdown": Breakdown} - class CancelParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class CreateParams(RequestOptions): - automatic_tax: NotRequired["Order.CreateParamsAutomaticTax"] - """ - Settings for automatic tax calculation for this order. - """ - billing_details: NotRequired[ - "Literal['']|Order.CreateParamsBillingDetails" - ] - """ - Billing details for the customer. If a customer is provided, this will be automatically populated with values from that customer if override values are not provided. - """ - 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). - """ - customer: NotRequired[str] - """ - The customer associated with this order. - """ - description: NotRequired[str] - """ - An arbitrary string attached to the object. Often useful for displaying to users. - """ - discounts: NotRequired["Literal['']|List[Order.CreateParamsDiscount]"] - """ - The coupons, promotion codes, and/or discounts to apply to the order. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - ip_address: NotRequired[str] - """ - The IP address of the purchaser for this order. - """ - line_items: List["Order.CreateParamsLineItem"] - """ - A list of line items the customer is ordering. Each line item includes information about the product, the quantity, and the resulting cost. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - payment: NotRequired["Order.CreateParamsPayment"] - """ - Payment information associated with the order, including payment settings. - """ - shipping_cost: NotRequired[ - "Literal['']|Order.CreateParamsShippingCost" - ] - """ - Settings for the customer cost of shipping for this order. - """ - shipping_details: NotRequired[ - "Literal['']|Order.CreateParamsShippingDetails" - ] - """ - Shipping details for the order. - """ - tax_details: NotRequired["Order.CreateParamsTaxDetails"] - """ - Additional tax details about the purchaser to be used for this order. - """ - - class CreateParamsAutomaticTax(TypedDict): - enabled: bool - """ - Enable automatic tax calculation which will automatically compute tax rates on this order. - """ - - class CreateParamsBillingDetails(TypedDict): - address: NotRequired["Order.CreateParamsBillingDetailsAddress"] - """ - The billing address provided by the customer. - """ - email: NotRequired[str] - """ - The billing email provided by the customer. - """ - name: NotRequired[str] - """ - The billing name provided by the customer. - """ - phone: NotRequired[str] - """ - The billing phone number provided by the customer. - """ - - class CreateParamsBillingDetailsAddress(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/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 CreateParamsDiscount(TypedDict): - coupon: NotRequired[str] - """ - ID of the coupon to create a new discount for. - """ - discount: NotRequired[str] - """ - ID of an existing discount on the object (or one of its ancestors) to reuse. - """ - promotion_code: NotRequired[str] - """ - ID of the promotion code to create a new discount for. - """ - - class CreateParamsLineItem(TypedDict): - description: NotRequired[str] - """ - The description for the line item. Will default to the name of the associated product. - """ - discounts: NotRequired[ - "Literal['']|List[Order.CreateParamsLineItemDiscount]" - ] - """ - The discounts applied to this line item. - """ - price: NotRequired[str] - """ - The ID of a [Price](https://docs.stripe.com/api/prices) to add to the Order. - - The `price` parameter is an alternative to using the `product` parameter. If each of your products are sold at a single price, you can set `Product.default_price` and then pass the `product` parameter when creating a line item. If your products are sold at several possible prices, use the `price` parameter to explicitly specify which one to use. - """ - price_data: NotRequired["Order.CreateParamsLineItemPriceData"] - """ - Data used to generate a new Price object inline. - - The `price_data` parameter is an alternative to using the `product` or `price` parameters. If you create a Product upfront and configure a `Product.default_price`, pass the `product` parameter when creating a line item. If you prefer not to define Products upfront, or if you charge variable prices, pass the `price_data` parameter to describe the price for this line item. - - Each time you pass `price_data` we create a Price for the Product. This Price is hidden in both the Dashboard and API lists and cannot be reused. - """ - product: NotRequired[str] - """ - The ID of a [Product](https://docs.stripe.com/api/products) to add to the Order. - - The Product must have a `default_price` specified. Otherwise, specify the price by passing the `price` or `price_data` parameter. - """ - product_data: NotRequired["Order.CreateParamsLineItemProductData"] - """ - Defines a [Product](https://docs.stripe.com/api/products) inline and adds it to the Order. - - `product_data` is an alternative to the `product` parameter. If you created a Product upfront, use the `product` parameter to refer to the existing Product. But if you prefer not to create Products upfront, pass the `product_data` parameter to define a Product inline as part of configuring the Order. - - `product_data` automatically creates a Product, just as if you had manually created the Product. If a Product with the same ID already exists, then `product_data` re-uses it to avoid duplicates. - """ - quantity: NotRequired[int] - """ - The quantity of the line item. - """ - tax_rates: NotRequired["Literal['']|List[str]"] - """ - The tax rates applied to this line item. - """ - - class CreateParamsLineItemDiscount(TypedDict): - coupon: NotRequired[str] - """ - ID of the coupon to create a new discount for. - """ - discount: NotRequired[str] - """ - ID of an existing discount on the object (or one of its ancestors) to reuse. - """ - - class CreateParamsLineItemPriceData(TypedDict): - currency: NotRequired[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). - """ - product: NotRequired[str] - """ - ID of the [Product](https://docs.stripe.com/api/products) this [Price](https://docs.stripe.com/api/prices) belongs to. - - Use this to implement a variable-pricing model in your integration. This is required if `product_data` is not specified. - """ - tax_behavior: NotRequired[ - Literal["exclusive", "inclusive", "unspecified"] - ] - """ - Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. - """ - unit_amount: NotRequired[int] - """ - A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. - """ - unit_amount_decimal: NotRequired[str] - """ - Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - """ - - class CreateParamsLineItemProductData(TypedDict): - description: NotRequired["Literal['']|str"] - """ - The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. - """ - id: str - """ - A unique identifier for this product. - - `product_data` automatically creates a Product with this ID. If a Product with the same ID already exists, then `product_data` re-uses it to avoid duplicates. If any of the fields in the existing Product are different from the values in `product_data`, `product_data` updates the existing Product with the new information. So set `product_data[id]` to the same string every time you sell the same product, but don't re-use the same string for different products. - """ - images: NotRequired["Literal['']|List[str]"] - """ - A list of up to 8 URLs of images for this product, meant to be displayable to the customer. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - name: str - """ - The product's name, meant to be displayable to the customer. - """ - package_dimensions: NotRequired[ - "Literal['']|Order.CreateParamsLineItemProductDataPackageDimensions" - ] - """ - The dimensions of this product for shipping purposes. - """ - shippable: NotRequired[bool] - """ - Whether this product is shipped (i.e., physical goods). - """ - tax_code: NotRequired["Literal['']|str"] - """ - A [tax code](https://stripe.com/docs/tax/tax-categories) ID. - """ - url: NotRequired["Literal['']|str"] - """ - A URL of a publicly-accessible webpage for this product. - """ - - class CreateParamsLineItemProductDataPackageDimensions(TypedDict): - height: float - """ - Height, in inches. Maximum precision is 2 decimal places. - """ - length: float - """ - Length, in inches. Maximum precision is 2 decimal places. - """ - weight: float - """ - Weight, in ounces. Maximum precision is 2 decimal places. - """ - width: float - """ - Width, in inches. Maximum precision is 2 decimal places. - """ - - class CreateParamsPayment(TypedDict): - settings: "Order.CreateParamsPaymentSettings" - """ - Settings describing how the order should configure generated PaymentIntents. - """ - - class CreateParamsPaymentSettings(TypedDict): - application_fee_amount: NotRequired[int] - """ - The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. - """ - payment_method_options: NotRequired[ - "Order.CreateParamsPaymentSettingsPaymentMethodOptions" - ] - """ - PaymentMethod-specific configuration to provide to the order's PaymentIntent. - """ - payment_method_types: NotRequired[ - List[ - Literal[ - "acss_debit", - "afterpay_clearpay", - "alipay", - "au_becs_debit", - "bacs_debit", - "bancontact", - "card", - "customer_balance", - "eps", - "fpx", - "giropay", - "grabpay", - "ideal", - "klarna", - "link", - "oxxo", - "p24", - "paypal", - "sepa_debit", - "sofort", - "wechat_pay", - ] - ] - ] - """ - The list of [payment method types](https://stripe.com/docs/payments/payment-methods/overview) to provide to the order's PaymentIntent. Do not include this attribute if you prefer to manage your payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). - """ - return_url: NotRequired[str] - """ - The URL to redirect the customer to after they authenticate their payment. - """ - statement_descriptor: NotRequired[str] - """ - For non-card charges, you can use this value as the complete description that appears on your customers' statements. Must contain at least one letter, maximum 22 characters. - """ - statement_descriptor_suffix: NotRequired[str] - """ - Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that's set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. - """ - transfer_data: NotRequired[ - "Order.CreateParamsPaymentSettingsTransferData" - ] - """ - Provides configuration for completing a transfer for the order after it is paid. - """ - - class CreateParamsPaymentSettingsPaymentMethodOptions(TypedDict): - acss_debit: NotRequired[ - "Order.CreateParamsPaymentSettingsPaymentMethodOptionsAcssDebit" - ] - """ - If paying by `acss_debit`, this sub-hash contains details about the ACSS Debit payment method options to pass to the order's PaymentIntent. - """ - afterpay_clearpay: NotRequired[ - "Order.CreateParamsPaymentSettingsPaymentMethodOptionsAfterpayClearpay" - ] - """ - If paying by `afterpay_clearpay`, this sub-hash contains details about the AfterpayClearpay payment method options to pass to the order's PaymentIntent. - """ - alipay: NotRequired[ - "Order.CreateParamsPaymentSettingsPaymentMethodOptionsAlipay" - ] - """ - If paying by `alipay`, this sub-hash contains details about the Alipay payment method options to pass to the order's PaymentIntent. - """ - bancontact: NotRequired[ - "Order.CreateParamsPaymentSettingsPaymentMethodOptionsBancontact" - ] - """ - If paying by `bancontact`, this sub-hash contains details about the Bancontact payment method options to pass to the order's PaymentIntent. - """ - card: NotRequired[ - "Order.CreateParamsPaymentSettingsPaymentMethodOptionsCard" - ] - """ - If paying by `card`, this sub-hash contains details about the Card payment method options to pass to the order's PaymentIntent. - """ - customer_balance: NotRequired[ - "Order.CreateParamsPaymentSettingsPaymentMethodOptionsCustomerBalance" - ] - """ - If paying by `customer_balance`, this sub-hash contains details about the Customer Balance payment method options to pass to the order's PaymentIntent. - """ - ideal: NotRequired[ - "Order.CreateParamsPaymentSettingsPaymentMethodOptionsIdeal" - ] - """ - If paying by `ideal`, this sub-hash contains details about the iDEAL payment method options to pass to the order's PaymentIntent. - """ - klarna: NotRequired[ - "Order.CreateParamsPaymentSettingsPaymentMethodOptionsKlarna" - ] - """ - If paying by `klarna`, this sub-hash contains details about the Klarna payment method options to pass to the order's PaymentIntent. - """ - link: NotRequired[ - "Order.CreateParamsPaymentSettingsPaymentMethodOptionsLink" - ] - """ - If paying by `link`, this sub-hash contains details about the Link payment method options to pass to the order's PaymentIntent. - """ - oxxo: NotRequired[ - "Order.CreateParamsPaymentSettingsPaymentMethodOptionsOxxo" - ] - """ - If paying by `oxxo`, this sub-hash contains details about the OXXO payment method options to pass to the order's PaymentIntent. - """ - p24: NotRequired[ - "Order.CreateParamsPaymentSettingsPaymentMethodOptionsP24" - ] - """ - If paying by `p24`, this sub-hash contains details about the P24 payment method options to pass to the order's PaymentIntent. - """ - paypal: NotRequired[ - "Order.CreateParamsPaymentSettingsPaymentMethodOptionsPaypal" - ] - """ - If paying by `paypal`, this sub-hash contains details about the PayPal payment method options to pass to the order's PaymentIntent. - """ - sepa_debit: NotRequired[ - "Order.CreateParamsPaymentSettingsPaymentMethodOptionsSepaDebit" - ] - """ - If paying by `sepa_debit`, this sub-hash contains details about the SEPA Debit payment method options to pass to the order's PaymentIntent. - """ - sofort: NotRequired[ - "Order.CreateParamsPaymentSettingsPaymentMethodOptionsSofort" - ] - """ - If paying by `sofort`, this sub-hash contains details about the Sofort payment method options to pass to the order's PaymentIntent. - """ - wechat_pay: NotRequired[ - "Order.CreateParamsPaymentSettingsPaymentMethodOptionsWechatPay" - ] - """ - If paying by `wechat_pay`, this sub-hash contains details about the WeChat Pay payment method options to pass to the order's PaymentIntent. - """ - - class CreateParamsPaymentSettingsPaymentMethodOptionsAcssDebit(TypedDict): - mandate_options: NotRequired[ - "Order.CreateParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions" - ] - """ - Additional fields for Mandate creation - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - target_date: NotRequired[str] - """ - Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. - """ - verification_method: NotRequired[ - Literal["automatic", "instant", "microdeposits"] - ] - """ - Bank account verification method. - """ - - class CreateParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions( - TypedDict, - ): - custom_mandate_url: NotRequired["Literal['']|str"] - """ - A URL for custom mandate text to render during confirmation step. - The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent, - or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent. - """ - interval_description: NotRequired[str] - """ - Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'. - """ - payment_schedule: NotRequired[ - Literal["combined", "interval", "sporadic"] - ] - """ - Payment schedule for the mandate. - """ - transaction_type: NotRequired[Literal["business", "personal"]] - """ - Transaction type of the mandate. - """ - - class CreateParamsPaymentSettingsPaymentMethodOptionsAfterpayClearpay( - TypedDict, - ): - capture_method: NotRequired[ - Literal["automatic", "automatic_async", "manual"] - ] - """ - Controls when the funds are captured from the customer's account. - - If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. - """ - reference: NotRequired[str] - """ - An internal identifier or reference this payment corresponds to. The identifier is limited to 128 characters and may contain only letters, digits, underscores, backslashes and dashes. - """ - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with the payment method. - - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the order's Customer, if present, after the order's PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - - When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). - - If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. - """ - - class CreateParamsPaymentSettingsPaymentMethodOptionsAlipay(TypedDict): - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class CreateParamsPaymentSettingsPaymentMethodOptionsBancontact(TypedDict): - preferred_language: NotRequired[Literal["de", "en", "fr", "nl"]] - """ - Preferred language of the Bancontact authorization page that the customer is redirected to. - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class CreateParamsPaymentSettingsPaymentMethodOptionsCard(TypedDict): - capture_method: NotRequired[ - Literal["automatic", "automatic_async", "manual"] - ] - """ - Controls when the funds will be captured from the customer's account. - """ - setup_future_usage: NotRequired[ - Literal["none", "off_session", "on_session"] - ] - """ - Indicates that you intend to make future payments with the payment method. - - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the order's Customer, if present, after the order's PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - - When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). - - If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. - """ - - class CreateParamsPaymentSettingsPaymentMethodOptionsCustomerBalance( - TypedDict, - ): - bank_transfer: NotRequired[ - "Order.CreateParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransfer" - ] - """ - Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. - """ - funding_type: NotRequired[Literal["bank_transfer"]] - """ - The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. - """ - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class CreateParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransfer( - TypedDict, - ): - eu_bank_transfer: NotRequired[ - "Order.CreateParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer" - ] - """ - Configuration for the eu_bank_transfer funding type. - """ - requested_address_types: NotRequired[ - List[ - Literal[ - "aba", - "iban", - "sepa", - "sort_code", - "spei", - "swift", - "zengin", - ] - ] - ] - """ - List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned. - - Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`. - """ - type: Literal[ - "eu_bank_transfer", - "gb_bank_transfer", - "jp_bank_transfer", - "mx_bank_transfer", - "us_bank_transfer", - ] - """ - The list of bank transfer types that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. - """ - - class CreateParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer( - TypedDict, - ): - country: str - """ - The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. - """ - - class CreateParamsPaymentSettingsPaymentMethodOptionsIdeal(TypedDict): - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class CreateParamsPaymentSettingsPaymentMethodOptionsKlarna(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds are captured from the customer's account. - - If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. - """ - on_demand: NotRequired[ - "Order.CreateParamsPaymentSettingsPaymentMethodOptionsKlarnaOnDemand" - ] - """ - On-demand details if setting up or charging an on-demand payment. - """ - preferred_locale: NotRequired[ - Literal[ - "cs-CZ", - "da-DK", - "de-AT", - "de-CH", - "de-DE", - "el-GR", - "en-AT", - "en-AU", - "en-BE", - "en-CA", - "en-CH", - "en-CZ", - "en-DE", - "en-DK", - "en-ES", - "en-FI", - "en-FR", - "en-GB", - "en-GR", - "en-IE", - "en-IT", - "en-NL", - "en-NO", - "en-NZ", - "en-PL", - "en-PT", - "en-RO", - "en-SE", - "en-US", - "es-ES", - "es-US", - "fi-FI", - "fr-BE", - "fr-CA", - "fr-CH", - "fr-FR", - "it-CH", - "it-IT", - "nb-NO", - "nl-BE", - "nl-NL", - "pl-PL", - "pt-PT", - "ro-RO", - "sv-FI", - "sv-SE", - ] - ] - """ - Preferred language of the Klarna authorization page that the customer is redirected to - """ - setup_future_usage: NotRequired[ - Literal["none", "off_session", "on_session"] - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - subscriptions: NotRequired[ - "Literal['']|List[Order.CreateParamsPaymentSettingsPaymentMethodOptionsKlarnaSubscription]" - ] - """ - Subscription details if setting up or charging a subscription. - """ - - class CreateParamsPaymentSettingsPaymentMethodOptionsKlarnaOnDemand( - TypedDict, - ): - average_amount: NotRequired[int] - """ - Your average amount value. You can use a value across your customer base, or segment based on customer type, country, etc. - """ - maximum_amount: NotRequired[int] - """ - The maximum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. - """ - minimum_amount: NotRequired[int] - """ - The lowest or minimum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. - """ - purchase_interval: NotRequired[Literal["day", "month", "week", "year"]] - """ - Interval at which the customer is making purchases - """ - purchase_interval_count: NotRequired[int] - """ - The number of `purchase_interval` between charges - """ - - class CreateParamsPaymentSettingsPaymentMethodOptionsKlarnaSubscription( - TypedDict, - ): - interval: Literal["day", "month", "week", "year"] - """ - Unit of time between subscription charges. - """ - interval_count: NotRequired[int] - """ - The number of intervals (specified in the `interval` attribute) between subscription charges. For example, `interval=month` and `interval_count=3` charges every 3 months. - """ - name: NotRequired[str] - """ - Name for subscription. - """ - next_billing: NotRequired[ - "Order.CreateParamsPaymentSettingsPaymentMethodOptionsKlarnaSubscriptionNextBilling" - ] - """ - Describes the upcoming charge for this subscription. - """ - reference: str - """ - A non-customer-facing reference to correlate subscription charges in the Klarna app. Use a value that persists across subscription charges. - """ - - class CreateParamsPaymentSettingsPaymentMethodOptionsKlarnaSubscriptionNextBilling( - TypedDict, - ): - amount: int - """ - The amount of the next charge for the subscription. - """ - date: str - """ - The date of the next charge for the subscription in YYYY-MM-DD format. - """ - - class CreateParamsPaymentSettingsPaymentMethodOptionsLink(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds are captured from the customer's account. - - If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. - """ - persistent_token: NotRequired[str] - """ - [Deprecated] This is a legacy parameter that no longer has any function. - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class CreateParamsPaymentSettingsPaymentMethodOptionsOxxo(TypedDict): - expires_after_days: NotRequired[int] - """ - The number of calendar days before an OXXO voucher expires. For example, if you create an OXXO voucher on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time. - """ - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class CreateParamsPaymentSettingsPaymentMethodOptionsP24(TypedDict): - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - tos_shown_and_accepted: NotRequired[bool] - """ - Confirm that the payer has accepted the P24 terms and conditions. - """ - - class CreateParamsPaymentSettingsPaymentMethodOptionsPaypal(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds will be captured from the customer's account. - """ - line_items: NotRequired[ - List[ - "Order.CreateParamsPaymentSettingsPaymentMethodOptionsPaypalLineItem" - ] - ] - """ - The line items purchased by the customer. - """ - preferred_locale: NotRequired[ - Literal[ - "cs-CZ", - "da-DK", - "de-AT", - "de-DE", - "de-LU", - "el-GR", - "en-GB", - "en-US", - "es-ES", - "fi-FI", - "fr-BE", - "fr-FR", - "fr-LU", - "hu-HU", - "it-IT", - "nl-BE", - "nl-NL", - "pl-PL", - "pt-PT", - "sk-SK", - "sv-SE", - ] - ] - """ - [Preferred locale](https://stripe.com/docs/payments/paypal/supported-locales) of the PayPal checkout page that the customer is redirected to. - """ - reference: NotRequired[str] - """ - A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. - """ - reference_id: NotRequired[str] - """ - A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. - """ - risk_correlation_id: NotRequired[str] - """ - The risk correlation ID for an on-session payment using a saved PayPal payment method. - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - subsellers: NotRequired[List[str]] - """ - The Stripe connected account IDs of the sellers on the platform for this transaction (optional). Only allowed when [separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) are used. - """ - - class CreateParamsPaymentSettingsPaymentMethodOptionsPaypalLineItem( - TypedDict, - ): - category: NotRequired[ - Literal["digital_goods", "donation", "physical_goods"] - ] - """ - Type of the line item. - """ - description: NotRequired[str] - """ - Description of the line item. - """ - name: str - """ - Descriptive name of the line item. - """ - quantity: int - """ - Quantity of the line item. Must be a positive number. - """ - sku: NotRequired[str] - """ - Client facing stock keeping unit, article number or similar. - """ - sold_by: NotRequired[str] - """ - The Stripe account ID of the connected account that sells the item. - """ - tax: NotRequired[ - "Order.CreateParamsPaymentSettingsPaymentMethodOptionsPaypalLineItemTax" - ] - """ - The tax information for the line item. - """ - unit_amount: int - """ - Price for a single unit of the line item in minor units. Cannot be a negative number. - """ - - class CreateParamsPaymentSettingsPaymentMethodOptionsPaypalLineItemTax( - TypedDict, - ): - amount: int - """ - The tax for a single unit of the line item in minor units. Cannot be a negative number. - """ - behavior: Literal["exclusive", "inclusive"] - """ - The tax behavior for the line item. - """ - - class CreateParamsPaymentSettingsPaymentMethodOptionsSepaDebit(TypedDict): - mandate_options: NotRequired[ - "Order.CreateParamsPaymentSettingsPaymentMethodOptionsSepaDebitMandateOptions" - ] - """ - Additional fields for Mandate creation - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - target_date: NotRequired[str] - """ - Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. - """ - - class CreateParamsPaymentSettingsPaymentMethodOptionsSepaDebitMandateOptions( - TypedDict, - ): - reference_prefix: NotRequired["Literal['']|str"] - """ - Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'. - """ - - class CreateParamsPaymentSettingsPaymentMethodOptionsSofort(TypedDict): - preferred_language: NotRequired[ - "Literal['']|Literal['de', 'en', 'es', 'fr', 'it', 'nl', 'pl']" - ] - """ - Language shown to the payer on redirect. - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class CreateParamsPaymentSettingsPaymentMethodOptionsWechatPay(TypedDict): - app_id: NotRequired[str] - """ - The app ID registered with WeChat Pay. Only required when client is ios or android. - """ - client: NotRequired[Literal["android", "ios", "web"]] - """ - The client type that the end customer will pay from - """ - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class CreateParamsPaymentSettingsTransferData(TypedDict): - amount: NotRequired[int] - """ - The amount that will be transferred automatically when the order is paid. If no amount is set, the full amount is transferred. There cannot be any line items with recurring prices when using this field. - """ - destination: str - """ - ID of the Connected account receiving the transfer. - """ - - class CreateParamsShippingCost(TypedDict): - shipping_rate: NotRequired[str] - """ - The ID of the shipping rate to use for this order. - """ - shipping_rate_data: NotRequired[ - "Order.CreateParamsShippingCostShippingRateData" - ] - """ - Parameters to create a new ad-hoc shipping rate for this order. - """ - - class CreateParamsShippingCostShippingRateData(TypedDict): - delivery_estimate: NotRequired[ - "Order.CreateParamsShippingCostShippingRateDataDeliveryEstimate" - ] - """ - The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions. - """ - display_name: str - """ - The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions. - """ - fixed_amount: NotRequired[ - "Order.CreateParamsShippingCostShippingRateDataFixedAmount" - ] - """ - Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - tax_behavior: NotRequired[ - Literal["exclusive", "inclusive", "unspecified"] - ] - """ - Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. - """ - tax_code: NotRequired[str] - """ - A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`. - """ - type: NotRequired[Literal["fixed_amount"]] - """ - The type of calculation to use on the shipping rate. - """ - - class CreateParamsShippingCostShippingRateDataDeliveryEstimate(TypedDict): - maximum: NotRequired[ - "Order.CreateParamsShippingCostShippingRateDataDeliveryEstimateMaximum" - ] - """ - The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite. - """ - minimum: NotRequired[ - "Order.CreateParamsShippingCostShippingRateDataDeliveryEstimateMinimum" - ] - """ - The lower bound of the estimated range. If empty, represents no lower bound. - """ - - class CreateParamsShippingCostShippingRateDataDeliveryEstimateMaximum( - TypedDict, - ): - unit: Literal["business_day", "day", "hour", "month", "week"] - """ - A unit of time. - """ - value: int - """ - Must be greater than 0. - """ - - class CreateParamsShippingCostShippingRateDataDeliveryEstimateMinimum( - TypedDict, - ): - unit: Literal["business_day", "day", "hour", "month", "week"] - """ - A unit of time. - """ - value: int - """ - Must be greater than 0. - """ - - class CreateParamsShippingCostShippingRateDataFixedAmount(TypedDict): - amount: int - """ - A non-negative integer in cents representing how much to charge. - """ - 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). - """ - currency_options: NotRequired[ - Dict[ - str, - "Order.CreateParamsShippingCostShippingRateDataFixedAmountCurrencyOptions", - ] - ] - """ - Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). - """ - - class CreateParamsShippingCostShippingRateDataFixedAmountCurrencyOptions( - TypedDict, - ): - amount: int - """ - A non-negative integer in cents representing how much to charge. - """ - tax_behavior: NotRequired[ - Literal["exclusive", "inclusive", "unspecified"] - ] - """ - Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. - """ - - class CreateParamsShippingDetails(TypedDict): - address: "Order.CreateParamsShippingDetailsAddress" - """ - The shipping address for the order. - """ - name: str - """ - The name of the recipient of the order. - """ - phone: NotRequired["Literal['']|str"] - """ - The phone number (including extension) for the recipient of the order. - """ - - class CreateParamsShippingDetailsAddress(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/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 CreateParamsTaxDetails(TypedDict): - tax_exempt: NotRequired[ - "Literal['']|Literal['exempt', 'none', 'reverse']" - ] - """ - The purchaser's tax exemption status. One of `none`, `exempt`, or `reverse`. - """ - tax_ids: NotRequired[List["Order.CreateParamsTaxDetailsTaxId"]] - """ - The purchaser's tax IDs to be used for this order. - """ - - class CreateParamsTaxDetailsTaxId(TypedDict): - type: Literal[ - "ad_nrt", - "ae_trn", - "al_tin", - "am_tin", - "ao_tin", - "ar_cuit", - "au_abn", - "au_arn", - "aw_tin", - "az_tin", - "ba_tin", - "bb_tin", - "bd_bin", - "bf_ifu", - "bg_uic", - "bh_vat", - "bj_ifu", - "bo_tin", - "br_cnpj", - "br_cpf", - "bs_tin", - "by_tin", - "ca_bn", - "ca_gst_hst", - "ca_pst_bc", - "ca_pst_mb", - "ca_pst_sk", - "ca_qst", - "cd_nif", - "ch_uid", - "ch_vat", - "cl_tin", - "cm_niu", - "cn_tin", - "co_nit", - "cr_tin", - "cv_nif", - "de_stn", - "do_rcn", - "ec_ruc", - "eg_tin", - "es_cif", - "et_tin", - "eu_oss_vat", - "eu_vat", - "gb_vat", - "ge_vat", - "gn_nif", - "hk_br", - "hr_oib", - "hu_tin", - "id_npwp", - "il_vat", - "in_gst", - "is_vat", - "jp_cn", - "jp_rn", - "jp_trn", - "ke_pin", - "kg_tin", - "kh_tin", - "kr_brn", - "kz_bin", - "la_tin", - "li_uid", - "li_vat", - "ma_vat", - "md_vat", - "me_pib", - "mk_vat", - "mr_nif", - "mx_rfc", - "my_frp", - "my_itn", - "my_sst", - "ng_tin", - "no_vat", - "no_voec", - "np_pan", - "nz_gst", - "om_vat", - "pe_ruc", - "ph_tin", - "ro_tin", - "rs_pib", - "ru_inn", - "ru_kpp", - "sa_vat", - "sg_gst", - "sg_uen", - "si_tin", - "sn_ninea", - "sr_fin", - "sv_nit", - "th_vat", - "tj_tin", - "tr_tin", - "tw_vat", - "tz_vat", - "ua_vat", - "ug_tin", - "us_ein", - "uy_ruc", - "uz_tin", - "uz_vat", - "ve_rif", - "vn_tin", - "za_vat", - "zm_tin", - "zw_tin", - ] - """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `al_tin`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `aw_tin`, `az_tin`, `ba_tin`, `bb_tin`, `bd_bin`, `bf_ifu`, `bg_uic`, `bh_vat`, `bj_ifu`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cm_niu`, `cn_tin`, `co_nit`, `cr_tin`, `cv_nif`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `et_tin`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kg_tin`, `kh_tin`, `kr_brn`, `kz_bin`, `la_tin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin` - """ - value: str - """ - Value of the tax ID. - """ - - class ListLineItemsParams(RequestOptions): - 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 ListParams(RequestOptions): - customer: NotRequired[str] - """ - Only return orders for the given customer. - """ - 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 ModifyParams(RequestOptions): - automatic_tax: NotRequired["Order.ModifyParamsAutomaticTax"] - """ - Settings for automatic tax calculation for this order. - """ - billing_details: NotRequired[ - "Literal['']|Order.ModifyParamsBillingDetails" - ] - """ - Billing details for the customer. If a customer is provided, this will be automatically populated with values from that customer if override values are not provided. - """ - currency: NotRequired[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). - """ - customer: NotRequired[str] - """ - The customer associated with this order. - """ - description: NotRequired["Literal['']|str"] - """ - An arbitrary string attached to the object. Often useful for displaying to users. - """ - discounts: NotRequired["Literal['']|List[Order.ModifyParamsDiscount]"] - """ - The coupons, promotion codes, and/or discounts to apply to the order. Pass the empty string `""` to unset this field. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - ip_address: NotRequired[str] - """ - The IP address of the purchaser for this order. - """ - line_items: NotRequired[List["Order.ModifyParamsLineItem"]] - """ - A list of line items the customer is ordering. Each line item includes information about the product, the quantity, and the resulting cost. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - payment: NotRequired["Order.ModifyParamsPayment"] - """ - Payment information associated with the order, including payment settings. - """ - shipping_cost: NotRequired[ - "Literal['']|Order.ModifyParamsShippingCost" - ] - """ - Settings for the customer cost of shipping for this order. - """ - shipping_details: NotRequired[ - "Literal['']|Order.ModifyParamsShippingDetails" - ] - """ - Shipping details for the order. - """ - tax_details: NotRequired["Order.ModifyParamsTaxDetails"] - """ - Additional tax details about the purchaser to be used for this order. - """ - - class ModifyParamsAutomaticTax(TypedDict): - enabled: bool - """ - Enable automatic tax calculation which will automatically compute tax rates on this order. - """ - - class ModifyParamsBillingDetails(TypedDict): - address: NotRequired["Order.ModifyParamsBillingDetailsAddress"] - """ - The billing address provided by the customer. - """ - email: NotRequired[str] - """ - The billing email provided by the customer. - """ - name: NotRequired[str] - """ - The billing name provided by the customer. - """ - phone: NotRequired[str] - """ - The billing phone number provided by the customer. - """ - - class ModifyParamsBillingDetailsAddress(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/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 ModifyParamsDiscount(TypedDict): - coupon: NotRequired[str] - """ - ID of the coupon to create a new discount for. - """ - discount: NotRequired[str] - """ - ID of an existing discount on the object (or one of its ancestors) to reuse. - """ - promotion_code: NotRequired[str] - """ - ID of the promotion code to create a new discount for. - """ - - class ModifyParamsLineItem(TypedDict): - description: NotRequired[str] - """ - The description for the line item. Will default to the name of the associated product. - """ - discounts: NotRequired[ - "Literal['']|List[Order.ModifyParamsLineItemDiscount]" - ] - """ - The discounts applied to this line item. - """ - id: NotRequired[str] - """ - The ID of an existing line item on the order. - """ - price: NotRequired[str] - """ - The ID of a [Price](https://docs.stripe.com/api/prices) to add to the Order. - - The `price` parameter is an alternative to using the `product` parameter. If each of your products are sold at a single price, you can set `Product.default_price` and then pass the `product` parameter when creating a line item. If your products are sold at several possible prices, use the `price` parameter to explicitly specify which one to use. - """ - price_data: NotRequired["Order.ModifyParamsLineItemPriceData"] - """ - Data used to generate a new Price object inline. - - The `price_data` parameter is an alternative to using the `product` or `price` parameters. If you create a Product upfront and configure a `Product.default_price`, pass the `product` parameter when creating a line item. If you prefer not to define Products upfront, or if you charge variable prices, pass the `price_data` parameter to describe the price for this line item. - - Each time you pass `price_data` we create a Price for the Product. This Price is hidden in both the Dashboard and API lists and cannot be reused. - """ - product: NotRequired[str] - """ - The ID of a [Product](https://docs.stripe.com/api/products) to add to the Order. - - The Product must have a `default_price` specified. Otherwise, specify the price by passing the `price` or `price_data` parameter. - """ - product_data: NotRequired["Order.ModifyParamsLineItemProductData"] - """ - Defines a [Product](https://docs.stripe.com/api/products) inline and adds it to the Order. - - `product_data` is an alternative to the `product` parameter. If you created a Product upfront, use the `product` parameter to refer to the existing Product. But if you prefer not to create Products upfront, pass the `product_data` parameter to define a Product inline as part of configuring the Order. - - `product_data` automatically creates a Product, just as if you had manually created the Product. If a Product with the same ID already exists, then `product_data` re-uses it to avoid duplicates. - """ - quantity: NotRequired[int] - """ - The quantity of the line item. - """ - tax_rates: NotRequired["Literal['']|List[str]"] - """ - The tax rates applied to this line item. - """ - - class ModifyParamsLineItemDiscount(TypedDict): - coupon: NotRequired[str] - """ - ID of the coupon to create a new discount for. - """ - discount: NotRequired[str] - """ - ID of an existing discount on the object (or one of its ancestors) to reuse. - """ - - class ModifyParamsLineItemPriceData(TypedDict): - currency: NotRequired[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). - """ - product: NotRequired[str] - """ - ID of the [Product](https://docs.stripe.com/api/products) this [Price](https://docs.stripe.com/api/prices) belongs to. - - Use this to implement a variable-pricing model in your integration. This is required if `product_data` is not specified. - """ - tax_behavior: NotRequired[ - Literal["exclusive", "inclusive", "unspecified"] - ] - """ - Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. - """ - unit_amount: NotRequired[int] - """ - A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. - """ - unit_amount_decimal: NotRequired[str] - """ - Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - """ - - class ModifyParamsLineItemProductData(TypedDict): - description: NotRequired["Literal['']|str"] - """ - The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. - """ - id: str - """ - A unique identifier for this product. - - `product_data` automatically creates a Product with this ID. If a Product with the same ID already exists, then `product_data` re-uses it to avoid duplicates. If any of the fields in the existing Product are different from the values in `product_data`, `product_data` updates the existing Product with the new information. So set `product_data[id]` to the same string every time you sell the same product, but don't re-use the same string for different products. - """ - images: NotRequired["Literal['']|List[str]"] - """ - A list of up to 8 URLs of images for this product, meant to be displayable to the customer. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - name: str - """ - The product's name, meant to be displayable to the customer. - """ - package_dimensions: NotRequired[ - "Literal['']|Order.ModifyParamsLineItemProductDataPackageDimensions" - ] - """ - The dimensions of this product for shipping purposes. - """ - shippable: NotRequired[bool] - """ - Whether this product is shipped (i.e., physical goods). - """ - tax_code: NotRequired["Literal['']|str"] - """ - A [tax code](https://stripe.com/docs/tax/tax-categories) ID. - """ - url: NotRequired["Literal['']|str"] - """ - A URL of a publicly-accessible webpage for this product. - """ - - class ModifyParamsLineItemProductDataPackageDimensions(TypedDict): - height: float - """ - Height, in inches. Maximum precision is 2 decimal places. - """ - length: float - """ - Length, in inches. Maximum precision is 2 decimal places. - """ - weight: float - """ - Weight, in ounces. Maximum precision is 2 decimal places. - """ - width: float - """ - Width, in inches. Maximum precision is 2 decimal places. - """ - - class ModifyParamsPayment(TypedDict): - settings: "Order.ModifyParamsPaymentSettings" - """ - Settings describing how the order should configure generated PaymentIntents. - """ - - class ModifyParamsPaymentSettings(TypedDict): - application_fee_amount: NotRequired["Literal['']|int"] - """ - The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. - """ - payment_method_options: NotRequired[ - "Order.ModifyParamsPaymentSettingsPaymentMethodOptions" - ] - """ - PaymentMethod-specific configuration to provide to the order's PaymentIntent. - """ - payment_method_types: NotRequired[ - List[ - Literal[ - "acss_debit", - "afterpay_clearpay", - "alipay", - "au_becs_debit", - "bacs_debit", - "bancontact", - "card", - "customer_balance", - "eps", - "fpx", - "giropay", - "grabpay", - "ideal", - "klarna", - "link", - "oxxo", - "p24", - "paypal", - "sepa_debit", - "sofort", - "wechat_pay", - ] - ] - ] - """ - The list of [payment method types](https://stripe.com/docs/payments/payment-methods/overview) to provide to the order's PaymentIntent. Do not include this attribute if you prefer to manage your payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). - """ - return_url: NotRequired["Literal['']|str"] - """ - The URL to redirect the customer to after they authenticate their payment. - """ - statement_descriptor: NotRequired[str] - """ - For non-card charges, you can use this value as the complete description that appears on your customers' statements. Must contain at least one letter, maximum 22 characters. - """ - statement_descriptor_suffix: NotRequired[str] - """ - Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that's set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. - """ - transfer_data: NotRequired[ - "Literal['']|Order.ModifyParamsPaymentSettingsTransferData" - ] - """ - Provides configuration for completing a transfer for the order after it is paid. - """ - - class ModifyParamsPaymentSettingsPaymentMethodOptions(TypedDict): - acss_debit: NotRequired[ - "Literal['']|Order.ModifyParamsPaymentSettingsPaymentMethodOptionsAcssDebit" - ] - """ - If paying by `acss_debit`, this sub-hash contains details about the ACSS Debit payment method options to pass to the order's PaymentIntent. - """ - afterpay_clearpay: NotRequired[ - "Literal['']|Order.ModifyParamsPaymentSettingsPaymentMethodOptionsAfterpayClearpay" - ] - """ - If paying by `afterpay_clearpay`, this sub-hash contains details about the AfterpayClearpay payment method options to pass to the order's PaymentIntent. - """ - alipay: NotRequired[ - "Literal['']|Order.ModifyParamsPaymentSettingsPaymentMethodOptionsAlipay" - ] - """ - If paying by `alipay`, this sub-hash contains details about the Alipay payment method options to pass to the order's PaymentIntent. - """ - bancontact: NotRequired[ - "Literal['']|Order.ModifyParamsPaymentSettingsPaymentMethodOptionsBancontact" - ] - """ - If paying by `bancontact`, this sub-hash contains details about the Bancontact payment method options to pass to the order's PaymentIntent. - """ - card: NotRequired[ - "Literal['']|Order.ModifyParamsPaymentSettingsPaymentMethodOptionsCard" - ] - """ - If paying by `card`, this sub-hash contains details about the Card payment method options to pass to the order's PaymentIntent. - """ - customer_balance: NotRequired[ - "Literal['']|Order.ModifyParamsPaymentSettingsPaymentMethodOptionsCustomerBalance" - ] - """ - If paying by `customer_balance`, this sub-hash contains details about the Customer Balance payment method options to pass to the order's PaymentIntent. - """ - ideal: NotRequired[ - "Literal['']|Order.ModifyParamsPaymentSettingsPaymentMethodOptionsIdeal" - ] - """ - If paying by `ideal`, this sub-hash contains details about the iDEAL payment method options to pass to the order's PaymentIntent. - """ - klarna: NotRequired[ - "Literal['']|Order.ModifyParamsPaymentSettingsPaymentMethodOptionsKlarna" - ] - """ - If paying by `klarna`, this sub-hash contains details about the Klarna payment method options to pass to the order's PaymentIntent. - """ - link: NotRequired[ - "Literal['']|Order.ModifyParamsPaymentSettingsPaymentMethodOptionsLink" - ] - """ - If paying by `link`, this sub-hash contains details about the Link payment method options to pass to the order's PaymentIntent. - """ - oxxo: NotRequired[ - "Literal['']|Order.ModifyParamsPaymentSettingsPaymentMethodOptionsOxxo" - ] - """ - If paying by `oxxo`, this sub-hash contains details about the OXXO payment method options to pass to the order's PaymentIntent. - """ - p24: NotRequired[ - "Literal['']|Order.ModifyParamsPaymentSettingsPaymentMethodOptionsP24" - ] - """ - If paying by `p24`, this sub-hash contains details about the P24 payment method options to pass to the order's PaymentIntent. - """ - paypal: NotRequired[ - "Literal['']|Order.ModifyParamsPaymentSettingsPaymentMethodOptionsPaypal" - ] - """ - If paying by `paypal`, this sub-hash contains details about the PayPal payment method options to pass to the order's PaymentIntent. - """ - sepa_debit: NotRequired[ - "Literal['']|Order.ModifyParamsPaymentSettingsPaymentMethodOptionsSepaDebit" - ] - """ - If paying by `sepa_debit`, this sub-hash contains details about the SEPA Debit payment method options to pass to the order's PaymentIntent. - """ - sofort: NotRequired[ - "Literal['']|Order.ModifyParamsPaymentSettingsPaymentMethodOptionsSofort" - ] - """ - If paying by `sofort`, this sub-hash contains details about the Sofort payment method options to pass to the order's PaymentIntent. - """ - wechat_pay: NotRequired[ - "Literal['']|Order.ModifyParamsPaymentSettingsPaymentMethodOptionsWechatPay" - ] - """ - If paying by `wechat_pay`, this sub-hash contains details about the WeChat Pay payment method options to pass to the order's PaymentIntent. - """ - - class ModifyParamsPaymentSettingsPaymentMethodOptionsAcssDebit(TypedDict): - mandate_options: NotRequired[ - "Order.ModifyParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions" - ] - """ - Additional fields for Mandate creation - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - target_date: NotRequired[str] - """ - Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. - """ - verification_method: NotRequired[ - Literal["automatic", "instant", "microdeposits"] - ] - """ - Bank account verification method. - """ - - class ModifyParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions( - TypedDict, - ): - custom_mandate_url: NotRequired["Literal['']|str"] - """ - A URL for custom mandate text to render during confirmation step. - The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent, - or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent. - """ - interval_description: NotRequired[str] - """ - Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'. - """ - payment_schedule: NotRequired[ - Literal["combined", "interval", "sporadic"] - ] - """ - Payment schedule for the mandate. - """ - transaction_type: NotRequired[Literal["business", "personal"]] - """ - Transaction type of the mandate. - """ - - class ModifyParamsPaymentSettingsPaymentMethodOptionsAfterpayClearpay( - TypedDict, - ): - capture_method: NotRequired[ - Literal["automatic", "automatic_async", "manual"] - ] - """ - Controls when the funds are captured from the customer's account. - - If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. - """ - reference: NotRequired[str] - """ - An internal identifier or reference this payment corresponds to. The identifier is limited to 128 characters and may contain only letters, digits, underscores, backslashes and dashes. - """ - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with the payment method. - - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the order's Customer, if present, after the order's PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - - When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). - - If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. - """ - - class ModifyParamsPaymentSettingsPaymentMethodOptionsAlipay(TypedDict): - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class ModifyParamsPaymentSettingsPaymentMethodOptionsBancontact(TypedDict): - preferred_language: NotRequired[Literal["de", "en", "fr", "nl"]] - """ - Preferred language of the Bancontact authorization page that the customer is redirected to. - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class ModifyParamsPaymentSettingsPaymentMethodOptionsCard(TypedDict): - capture_method: NotRequired[ - Literal["automatic", "automatic_async", "manual"] - ] - """ - Controls when the funds will be captured from the customer's account. - """ - setup_future_usage: NotRequired[ - Literal["none", "off_session", "on_session"] - ] - """ - Indicates that you intend to make future payments with the payment method. - - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the order's Customer, if present, after the order's PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - - When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). - - If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. - """ - - class ModifyParamsPaymentSettingsPaymentMethodOptionsCustomerBalance( - TypedDict, - ): - bank_transfer: NotRequired[ - "Order.ModifyParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransfer" - ] - """ - Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. - """ - funding_type: NotRequired[Literal["bank_transfer"]] - """ - The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. - """ - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class ModifyParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransfer( - TypedDict, - ): - eu_bank_transfer: NotRequired[ - "Order.ModifyParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer" - ] - """ - Configuration for the eu_bank_transfer funding type. - """ - requested_address_types: NotRequired[ - List[ - Literal[ - "aba", - "iban", - "sepa", - "sort_code", - "spei", - "swift", - "zengin", - ] - ] - ] - """ - List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned. - - Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`. - """ - type: Literal[ - "eu_bank_transfer", - "gb_bank_transfer", - "jp_bank_transfer", - "mx_bank_transfer", - "us_bank_transfer", - ] - """ - The list of bank transfer types that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. - """ - - class ModifyParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer( - TypedDict, - ): - country: str - """ - The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. - """ - - class ModifyParamsPaymentSettingsPaymentMethodOptionsIdeal(TypedDict): - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class ModifyParamsPaymentSettingsPaymentMethodOptionsKlarna(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds are captured from the customer's account. - - If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. - """ - on_demand: NotRequired[ - "Order.ModifyParamsPaymentSettingsPaymentMethodOptionsKlarnaOnDemand" - ] - """ - On-demand details if setting up or charging an on-demand payment. - """ - preferred_locale: NotRequired[ - Literal[ - "cs-CZ", - "da-DK", - "de-AT", - "de-CH", - "de-DE", - "el-GR", - "en-AT", - "en-AU", - "en-BE", - "en-CA", - "en-CH", - "en-CZ", - "en-DE", - "en-DK", - "en-ES", - "en-FI", - "en-FR", - "en-GB", - "en-GR", - "en-IE", - "en-IT", - "en-NL", - "en-NO", - "en-NZ", - "en-PL", - "en-PT", - "en-RO", - "en-SE", - "en-US", - "es-ES", - "es-US", - "fi-FI", - "fr-BE", - "fr-CA", - "fr-CH", - "fr-FR", - "it-CH", - "it-IT", - "nb-NO", - "nl-BE", - "nl-NL", - "pl-PL", - "pt-PT", - "ro-RO", - "sv-FI", - "sv-SE", - ] - ] - """ - Preferred language of the Klarna authorization page that the customer is redirected to - """ - setup_future_usage: NotRequired[ - Literal["none", "off_session", "on_session"] - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - subscriptions: NotRequired[ - "Literal['']|List[Order.ModifyParamsPaymentSettingsPaymentMethodOptionsKlarnaSubscription]" - ] - """ - Subscription details if setting up or charging a subscription. - """ - - class ModifyParamsPaymentSettingsPaymentMethodOptionsKlarnaOnDemand( - TypedDict, - ): - average_amount: NotRequired[int] - """ - Your average amount value. You can use a value across your customer base, or segment based on customer type, country, etc. - """ - maximum_amount: NotRequired[int] - """ - The maximum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. - """ - minimum_amount: NotRequired[int] - """ - The lowest or minimum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. - """ - purchase_interval: NotRequired[Literal["day", "month", "week", "year"]] - """ - Interval at which the customer is making purchases - """ - purchase_interval_count: NotRequired[int] - """ - The number of `purchase_interval` between charges - """ - - class ModifyParamsPaymentSettingsPaymentMethodOptionsKlarnaSubscription( - TypedDict, - ): - interval: Literal["day", "month", "week", "year"] - """ - Unit of time between subscription charges. - """ - interval_count: NotRequired[int] - """ - The number of intervals (specified in the `interval` attribute) between subscription charges. For example, `interval=month` and `interval_count=3` charges every 3 months. - """ - name: NotRequired[str] - """ - Name for subscription. - """ - next_billing: NotRequired[ - "Order.ModifyParamsPaymentSettingsPaymentMethodOptionsKlarnaSubscriptionNextBilling" - ] - """ - Describes the upcoming charge for this subscription. - """ - reference: str - """ - A non-customer-facing reference to correlate subscription charges in the Klarna app. Use a value that persists across subscription charges. - """ - - class ModifyParamsPaymentSettingsPaymentMethodOptionsKlarnaSubscriptionNextBilling( - TypedDict, - ): - amount: int - """ - The amount of the next charge for the subscription. - """ - date: str - """ - The date of the next charge for the subscription in YYYY-MM-DD format. - """ - - class ModifyParamsPaymentSettingsPaymentMethodOptionsLink(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds are captured from the customer's account. - - If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. - """ - persistent_token: NotRequired[str] - """ - [Deprecated] This is a legacy parameter that no longer has any function. - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class ModifyParamsPaymentSettingsPaymentMethodOptionsOxxo(TypedDict): - expires_after_days: NotRequired[int] - """ - The number of calendar days before an OXXO voucher expires. For example, if you create an OXXO voucher on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time. - """ - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class ModifyParamsPaymentSettingsPaymentMethodOptionsP24(TypedDict): - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - tos_shown_and_accepted: NotRequired[bool] - """ - Confirm that the payer has accepted the P24 terms and conditions. - """ - - class ModifyParamsPaymentSettingsPaymentMethodOptionsPaypal(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds will be captured from the customer's account. - """ - line_items: NotRequired[ - List[ - "Order.ModifyParamsPaymentSettingsPaymentMethodOptionsPaypalLineItem" - ] - ] - """ - The line items purchased by the customer. - """ - preferred_locale: NotRequired[ - Literal[ - "cs-CZ", - "da-DK", - "de-AT", - "de-DE", - "de-LU", - "el-GR", - "en-GB", - "en-US", - "es-ES", - "fi-FI", - "fr-BE", - "fr-FR", - "fr-LU", - "hu-HU", - "it-IT", - "nl-BE", - "nl-NL", - "pl-PL", - "pt-PT", - "sk-SK", - "sv-SE", - ] - ] - """ - [Preferred locale](https://stripe.com/docs/payments/paypal/supported-locales) of the PayPal checkout page that the customer is redirected to. - """ - reference: NotRequired[str] - """ - A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. - """ - reference_id: NotRequired[str] - """ - A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. - """ - risk_correlation_id: NotRequired[str] - """ - The risk correlation ID for an on-session payment using a saved PayPal payment method. - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - subsellers: NotRequired[List[str]] - """ - The Stripe connected account IDs of the sellers on the platform for this transaction (optional). Only allowed when [separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) are used. - """ - - class ModifyParamsPaymentSettingsPaymentMethodOptionsPaypalLineItem( - TypedDict, - ): - category: NotRequired[ - Literal["digital_goods", "donation", "physical_goods"] - ] - """ - Type of the line item. - """ - description: NotRequired[str] - """ - Description of the line item. - """ - name: str - """ - Descriptive name of the line item. - """ - quantity: int - """ - Quantity of the line item. Must be a positive number. - """ - sku: NotRequired[str] - """ - Client facing stock keeping unit, article number or similar. - """ - sold_by: NotRequired[str] - """ - The Stripe account ID of the connected account that sells the item. - """ - tax: NotRequired[ - "Order.ModifyParamsPaymentSettingsPaymentMethodOptionsPaypalLineItemTax" - ] - """ - The tax information for the line item. - """ - unit_amount: int - """ - Price for a single unit of the line item in minor units. Cannot be a negative number. - """ - - class ModifyParamsPaymentSettingsPaymentMethodOptionsPaypalLineItemTax( - TypedDict, - ): - amount: int - """ - The tax for a single unit of the line item in minor units. Cannot be a negative number. - """ - behavior: Literal["exclusive", "inclusive"] - """ - The tax behavior for the line item. - """ - - class ModifyParamsPaymentSettingsPaymentMethodOptionsSepaDebit(TypedDict): - mandate_options: NotRequired[ - "Order.ModifyParamsPaymentSettingsPaymentMethodOptionsSepaDebitMandateOptions" - ] - """ - Additional fields for Mandate creation - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - target_date: NotRequired[str] - """ - Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. - """ - - class ModifyParamsPaymentSettingsPaymentMethodOptionsSepaDebitMandateOptions( - TypedDict, - ): - reference_prefix: NotRequired["Literal['']|str"] - """ - Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'. - """ - - class ModifyParamsPaymentSettingsPaymentMethodOptionsSofort(TypedDict): - preferred_language: NotRequired[ - "Literal['']|Literal['de', 'en', 'es', 'fr', 'it', 'nl', 'pl']" - ] - """ - Language shown to the payer on redirect. - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class ModifyParamsPaymentSettingsPaymentMethodOptionsWechatPay(TypedDict): - app_id: NotRequired[str] - """ - The app ID registered with WeChat Pay. Only required when client is ios or android. - """ - client: NotRequired[Literal["android", "ios", "web"]] - """ - The client type that the end customer will pay from - """ - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class ModifyParamsPaymentSettingsTransferData(TypedDict): - amount: NotRequired[int] - """ - The amount that will be transferred automatically when the order is paid. If no amount is set, the full amount is transferred. There cannot be any line items with recurring prices when using this field. - """ - destination: str - """ - ID of the Connected account receiving the transfer. - """ - - class ModifyParamsShippingCost(TypedDict): - shipping_rate: NotRequired[str] - """ - The ID of the shipping rate to use for this order. - """ - shipping_rate_data: NotRequired[ - "Order.ModifyParamsShippingCostShippingRateData" - ] - """ - Parameters to create a new ad-hoc shipping rate for this order. - """ - - class ModifyParamsShippingCostShippingRateData(TypedDict): - delivery_estimate: NotRequired[ - "Order.ModifyParamsShippingCostShippingRateDataDeliveryEstimate" - ] - """ - The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions. - """ - display_name: str - """ - The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions. - """ - fixed_amount: NotRequired[ - "Order.ModifyParamsShippingCostShippingRateDataFixedAmount" - ] - """ - Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - tax_behavior: NotRequired[ - Literal["exclusive", "inclusive", "unspecified"] - ] - """ - Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. - """ - tax_code: NotRequired[str] - """ - A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`. - """ - type: NotRequired[Literal["fixed_amount"]] - """ - The type of calculation to use on the shipping rate. - """ - - class ModifyParamsShippingCostShippingRateDataDeliveryEstimate(TypedDict): - maximum: NotRequired[ - "Order.ModifyParamsShippingCostShippingRateDataDeliveryEstimateMaximum" - ] - """ - The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite. - """ - minimum: NotRequired[ - "Order.ModifyParamsShippingCostShippingRateDataDeliveryEstimateMinimum" - ] - """ - The lower bound of the estimated range. If empty, represents no lower bound. - """ - - class ModifyParamsShippingCostShippingRateDataDeliveryEstimateMaximum( - TypedDict, - ): - unit: Literal["business_day", "day", "hour", "month", "week"] - """ - A unit of time. - """ - value: int - """ - Must be greater than 0. - """ - - class ModifyParamsShippingCostShippingRateDataDeliveryEstimateMinimum( - TypedDict, - ): - unit: Literal["business_day", "day", "hour", "month", "week"] - """ - A unit of time. - """ - value: int - """ - Must be greater than 0. - """ - - class ModifyParamsShippingCostShippingRateDataFixedAmount(TypedDict): - amount: int - """ - A non-negative integer in cents representing how much to charge. - """ - 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). - """ - currency_options: NotRequired[ - Dict[ - str, - "Order.ModifyParamsShippingCostShippingRateDataFixedAmountCurrencyOptions", - ] - ] - """ - Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). - """ - - class ModifyParamsShippingCostShippingRateDataFixedAmountCurrencyOptions( - TypedDict, - ): - amount: int - """ - A non-negative integer in cents representing how much to charge. - """ - tax_behavior: NotRequired[ - Literal["exclusive", "inclusive", "unspecified"] - ] - """ - Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. - """ - - class ModifyParamsShippingDetails(TypedDict): - address: "Order.ModifyParamsShippingDetailsAddress" - """ - The shipping address for the order. - """ - name: str - """ - The name of the recipient of the order. - """ - phone: NotRequired["Literal['']|str"] - """ - The phone number (including extension) for the recipient of the order. - """ - - class ModifyParamsShippingDetailsAddress(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/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 ModifyParamsTaxDetails(TypedDict): - tax_exempt: NotRequired[ - "Literal['']|Literal['exempt', 'none', 'reverse']" - ] - """ - The purchaser's tax exemption status. One of `none`, `exempt`, or `reverse`. - """ - tax_ids: NotRequired[List["Order.ModifyParamsTaxDetailsTaxId"]] - """ - The purchaser's tax IDs to be used for this order. - """ - - class ModifyParamsTaxDetailsTaxId(TypedDict): - type: Literal[ - "ad_nrt", - "ae_trn", - "al_tin", - "am_tin", - "ao_tin", - "ar_cuit", - "au_abn", - "au_arn", - "aw_tin", - "az_tin", - "ba_tin", - "bb_tin", - "bd_bin", - "bf_ifu", - "bg_uic", - "bh_vat", - "bj_ifu", - "bo_tin", - "br_cnpj", - "br_cpf", - "bs_tin", - "by_tin", - "ca_bn", - "ca_gst_hst", - "ca_pst_bc", - "ca_pst_mb", - "ca_pst_sk", - "ca_qst", - "cd_nif", - "ch_uid", - "ch_vat", - "cl_tin", - "cm_niu", - "cn_tin", - "co_nit", - "cr_tin", - "cv_nif", - "de_stn", - "do_rcn", - "ec_ruc", - "eg_tin", - "es_cif", - "et_tin", - "eu_oss_vat", - "eu_vat", - "gb_vat", - "ge_vat", - "gn_nif", - "hk_br", - "hr_oib", - "hu_tin", - "id_npwp", - "il_vat", - "in_gst", - "is_vat", - "jp_cn", - "jp_rn", - "jp_trn", - "ke_pin", - "kg_tin", - "kh_tin", - "kr_brn", - "kz_bin", - "la_tin", - "li_uid", - "li_vat", - "ma_vat", - "md_vat", - "me_pib", - "mk_vat", - "mr_nif", - "mx_rfc", - "my_frp", - "my_itn", - "my_sst", - "ng_tin", - "no_vat", - "no_voec", - "np_pan", - "nz_gst", - "om_vat", - "pe_ruc", - "ph_tin", - "ro_tin", - "rs_pib", - "ru_inn", - "ru_kpp", - "sa_vat", - "sg_gst", - "sg_uen", - "si_tin", - "sn_ninea", - "sr_fin", - "sv_nit", - "th_vat", - "tj_tin", - "tr_tin", - "tw_vat", - "tz_vat", - "ua_vat", - "ug_tin", - "us_ein", - "uy_ruc", - "uz_tin", - "uz_vat", - "ve_rif", - "vn_tin", - "za_vat", - "zm_tin", - "zw_tin", - ] - """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `al_tin`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `aw_tin`, `az_tin`, `ba_tin`, `bb_tin`, `bd_bin`, `bf_ifu`, `bg_uic`, `bh_vat`, `bj_ifu`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cm_niu`, `cn_tin`, `co_nit`, `cr_tin`, `cv_nif`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `et_tin`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kg_tin`, `kh_tin`, `kr_brn`, `kz_bin`, `la_tin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin` - """ - value: str - """ - Value of the tax ID. - """ - - class ReopenParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class RetrieveParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class SubmitParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - expected_total: int - """ - `expected_total` should always be set to the order's `amount_total` field. If they don't match, submitting the order will fail. This helps detect race conditions where something else concurrently modifies the order. - """ - amount_subtotal: int """ Order cost before any discounts or taxes are applied. A positive integer representing the subtotal of the order in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). @@ -3888,7 +1065,7 @@ class SubmitParams(RequestOptions): @classmethod def _cls_cancel( - cls, id: str, **params: Unpack["Order.CancelParams"] + cls, id: str, **params: Unpack["OrderCancelParams"] ) -> "Order": """ Cancels the order as well as the payment intent if one is attached. @@ -3904,14 +1081,14 @@ def _cls_cancel( @overload @staticmethod - def cancel(id: str, **params: Unpack["Order.CancelParams"]) -> "Order": + def cancel(id: str, **params: Unpack["OrderCancelParams"]) -> "Order": """ Cancels the order as well as the payment intent if one is attached. """ ... @overload - def cancel(self, **params: Unpack["Order.CancelParams"]) -> "Order": + def cancel(self, **params: Unpack["OrderCancelParams"]) -> "Order": """ Cancels the order as well as the payment intent if one is attached. """ @@ -3919,7 +1096,7 @@ def cancel(self, **params: Unpack["Order.CancelParams"]) -> "Order": @class_method_variant("_cls_cancel") def cancel( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Order.CancelParams"] + self, **params: Unpack["OrderCancelParams"] ) -> "Order": """ Cancels the order as well as the payment intent if one is attached. @@ -3937,7 +1114,7 @@ def cancel( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_cancel_async( - cls, id: str, **params: Unpack["Order.CancelParams"] + cls, id: str, **params: Unpack["OrderCancelParams"] ) -> "Order": """ Cancels the order as well as the payment intent if one is attached. @@ -3954,7 +1131,7 @@ async def _cls_cancel_async( @overload @staticmethod async def cancel_async( - id: str, **params: Unpack["Order.CancelParams"] + id: str, **params: Unpack["OrderCancelParams"] ) -> "Order": """ Cancels the order as well as the payment intent if one is attached. @@ -3963,7 +1140,7 @@ async def cancel_async( @overload async def cancel_async( - self, **params: Unpack["Order.CancelParams"] + self, **params: Unpack["OrderCancelParams"] ) -> "Order": """ Cancels the order as well as the payment intent if one is attached. @@ -3972,7 +1149,7 @@ async def cancel_async( @class_method_variant("_cls_cancel_async") async def cancel_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Order.CancelParams"] + self, **params: Unpack["OrderCancelParams"] ) -> "Order": """ Cancels the order as well as the payment intent if one is attached. @@ -3989,7 +1166,7 @@ async def cancel_async( # pyright: ignore[reportGeneralTypeIssues] ) @classmethod - def create(cls, **params: Unpack["Order.CreateParams"]) -> "Order": + def create(cls, **params: Unpack["OrderCreateParams"]) -> "Order": """ Creates a new open order object. """ @@ -4004,7 +1181,7 @@ def create(cls, **params: Unpack["Order.CreateParams"]) -> "Order": @classmethod async def create_async( - cls, **params: Unpack["Order.CreateParams"] + cls, **params: Unpack["OrderCreateParams"] ) -> "Order": """ Creates a new open order object. @@ -4019,7 +1196,7 @@ async def create_async( ) @classmethod - def list(cls, **params: Unpack["Order.ListParams"]) -> ListObject["Order"]: + def list(cls, **params: Unpack["OrderListParams"]) -> ListObject["Order"]: """ Returns a list of your orders. The orders are returned sorted by creation date, with the most recently created orders appearing first. """ @@ -4038,7 +1215,7 @@ def list(cls, **params: Unpack["Order.ListParams"]) -> ListObject["Order"]: @classmethod async def list_async( - cls, **params: Unpack["Order.ListParams"] + cls, **params: Unpack["OrderListParams"] ) -> ListObject["Order"]: """ Returns a list of your orders. The orders are returned sorted by creation date, with the most recently created orders appearing first. @@ -4058,7 +1235,7 @@ async def list_async( @classmethod def _cls_list_line_items( - cls, id: str, **params: Unpack["Order.ListLineItemsParams"] + cls, id: str, **params: Unpack["OrderListLineItemsParams"] ) -> ListObject["LineItemResource"]: """ When retrieving an order, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items. @@ -4075,7 +1252,7 @@ def _cls_list_line_items( @overload @staticmethod def list_line_items( - id: str, **params: Unpack["Order.ListLineItemsParams"] + id: str, **params: Unpack["OrderListLineItemsParams"] ) -> ListObject["LineItemResource"]: """ When retrieving an order, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items. @@ -4084,7 +1261,7 @@ def list_line_items( @overload def list_line_items( - self, **params: Unpack["Order.ListLineItemsParams"] + self, **params: Unpack["OrderListLineItemsParams"] ) -> ListObject["LineItemResource"]: """ When retrieving an order, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items. @@ -4093,7 +1270,7 @@ def list_line_items( @class_method_variant("_cls_list_line_items") def list_line_items( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Order.ListLineItemsParams"] + self, **params: Unpack["OrderListLineItemsParams"] ) -> ListObject["LineItemResource"]: """ When retrieving an order, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items. @@ -4111,7 +1288,7 @@ def list_line_items( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_list_line_items_async( - cls, id: str, **params: Unpack["Order.ListLineItemsParams"] + cls, id: str, **params: Unpack["OrderListLineItemsParams"] ) -> ListObject["LineItemResource"]: """ When retrieving an order, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items. @@ -4128,7 +1305,7 @@ async def _cls_list_line_items_async( @overload @staticmethod async def list_line_items_async( - id: str, **params: Unpack["Order.ListLineItemsParams"] + id: str, **params: Unpack["OrderListLineItemsParams"] ) -> ListObject["LineItemResource"]: """ When retrieving an order, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items. @@ -4137,7 +1314,7 @@ async def list_line_items_async( @overload async def list_line_items_async( - self, **params: Unpack["Order.ListLineItemsParams"] + self, **params: Unpack["OrderListLineItemsParams"] ) -> ListObject["LineItemResource"]: """ When retrieving an order, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items. @@ -4146,7 +1323,7 @@ async def list_line_items_async( @class_method_variant("_cls_list_line_items_async") async def list_line_items_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Order.ListLineItemsParams"] + self, **params: Unpack["OrderListLineItemsParams"] ) -> ListObject["LineItemResource"]: """ When retrieving an order, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items. @@ -4163,9 +1340,7 @@ async def list_line_items_async( # pyright: ignore[reportGeneralTypeIssues] ) @classmethod - def modify( - cls, id: str, **params: Unpack["Order.ModifyParams"] - ) -> "Order": + def modify(cls, id: str, **params: Unpack["OrderModifyParams"]) -> "Order": """ Updates the specific order by setting the values of the parameters passed. Any parameters not provided will be left unchanged. """ @@ -4181,7 +1356,7 @@ def modify( @classmethod async def modify_async( - cls, id: str, **params: Unpack["Order.ModifyParams"] + cls, id: str, **params: Unpack["OrderModifyParams"] ) -> "Order": """ Updates the specific order by setting the values of the parameters passed. Any parameters not provided will be left unchanged. @@ -4198,7 +1373,7 @@ async def modify_async( @classmethod def _cls_reopen( - cls, id: str, **params: Unpack["Order.ReopenParams"] + cls, id: str, **params: Unpack["OrderReopenParams"] ) -> "Order": """ Reopens a submitted order. @@ -4214,14 +1389,14 @@ def _cls_reopen( @overload @staticmethod - def reopen(id: str, **params: Unpack["Order.ReopenParams"]) -> "Order": + def reopen(id: str, **params: Unpack["OrderReopenParams"]) -> "Order": """ Reopens a submitted order. """ ... @overload - def reopen(self, **params: Unpack["Order.ReopenParams"]) -> "Order": + def reopen(self, **params: Unpack["OrderReopenParams"]) -> "Order": """ Reopens a submitted order. """ @@ -4229,7 +1404,7 @@ def reopen(self, **params: Unpack["Order.ReopenParams"]) -> "Order": @class_method_variant("_cls_reopen") def reopen( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Order.ReopenParams"] + self, **params: Unpack["OrderReopenParams"] ) -> "Order": """ Reopens a submitted order. @@ -4247,7 +1422,7 @@ def reopen( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_reopen_async( - cls, id: str, **params: Unpack["Order.ReopenParams"] + cls, id: str, **params: Unpack["OrderReopenParams"] ) -> "Order": """ Reopens a submitted order. @@ -4264,7 +1439,7 @@ async def _cls_reopen_async( @overload @staticmethod async def reopen_async( - id: str, **params: Unpack["Order.ReopenParams"] + id: str, **params: Unpack["OrderReopenParams"] ) -> "Order": """ Reopens a submitted order. @@ -4273,7 +1448,7 @@ async def reopen_async( @overload async def reopen_async( - self, **params: Unpack["Order.ReopenParams"] + self, **params: Unpack["OrderReopenParams"] ) -> "Order": """ Reopens a submitted order. @@ -4282,7 +1457,7 @@ async def reopen_async( @class_method_variant("_cls_reopen_async") async def reopen_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Order.ReopenParams"] + self, **params: Unpack["OrderReopenParams"] ) -> "Order": """ Reopens a submitted order. @@ -4300,7 +1475,7 @@ async def reopen_async( # pyright: ignore[reportGeneralTypeIssues] @classmethod def retrieve( - cls, id: str, **params: Unpack["Order.RetrieveParams"] + cls, id: str, **params: Unpack["OrderRetrieveParams"] ) -> "Order": """ Retrieves the details of an existing order. Supply the unique order ID from either an order creation request or the order list, and Stripe will return the corresponding order information. @@ -4311,7 +1486,7 @@ def retrieve( @classmethod async def retrieve_async( - cls, id: str, **params: Unpack["Order.RetrieveParams"] + cls, id: str, **params: Unpack["OrderRetrieveParams"] ) -> "Order": """ Retrieves the details of an existing order. Supply the unique order ID from either an order creation request or the order list, and Stripe will return the corresponding order information. @@ -4322,7 +1497,7 @@ async def retrieve_async( @classmethod def _cls_submit( - cls, id: str, **params: Unpack["Order.SubmitParams"] + cls, id: str, **params: Unpack["OrderSubmitParams"] ) -> "Order": """ Submitting an Order transitions the status to processing and creates a PaymentIntent object so the order can be paid. If the Order has an amount_total of 0, no PaymentIntent object will be created. Once the order is submitted, its contents cannot be changed, unless the [reopen](https://docs.stripe.com/api#reopen_order) method is called. @@ -4338,14 +1513,14 @@ def _cls_submit( @overload @staticmethod - def submit(id: str, **params: Unpack["Order.SubmitParams"]) -> "Order": + def submit(id: str, **params: Unpack["OrderSubmitParams"]) -> "Order": """ Submitting an Order transitions the status to processing and creates a PaymentIntent object so the order can be paid. If the Order has an amount_total of 0, no PaymentIntent object will be created. Once the order is submitted, its contents cannot be changed, unless the [reopen](https://docs.stripe.com/api#reopen_order) method is called. """ ... @overload - def submit(self, **params: Unpack["Order.SubmitParams"]) -> "Order": + def submit(self, **params: Unpack["OrderSubmitParams"]) -> "Order": """ Submitting an Order transitions the status to processing and creates a PaymentIntent object so the order can be paid. If the Order has an amount_total of 0, no PaymentIntent object will be created. Once the order is submitted, its contents cannot be changed, unless the [reopen](https://docs.stripe.com/api#reopen_order) method is called. """ @@ -4353,7 +1528,7 @@ def submit(self, **params: Unpack["Order.SubmitParams"]) -> "Order": @class_method_variant("_cls_submit") def submit( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Order.SubmitParams"] + self, **params: Unpack["OrderSubmitParams"] ) -> "Order": """ Submitting an Order transitions the status to processing and creates a PaymentIntent object so the order can be paid. If the Order has an amount_total of 0, no PaymentIntent object will be created. Once the order is submitted, its contents cannot be changed, unless the [reopen](https://docs.stripe.com/api#reopen_order) method is called. @@ -4371,7 +1546,7 @@ def submit( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_submit_async( - cls, id: str, **params: Unpack["Order.SubmitParams"] + cls, id: str, **params: Unpack["OrderSubmitParams"] ) -> "Order": """ Submitting an Order transitions the status to processing and creates a PaymentIntent object so the order can be paid. If the Order has an amount_total of 0, no PaymentIntent object will be created. Once the order is submitted, its contents cannot be changed, unless the [reopen](https://docs.stripe.com/api#reopen_order) method is called. @@ -4388,7 +1563,7 @@ async def _cls_submit_async( @overload @staticmethod async def submit_async( - id: str, **params: Unpack["Order.SubmitParams"] + id: str, **params: Unpack["OrderSubmitParams"] ) -> "Order": """ Submitting an Order transitions the status to processing and creates a PaymentIntent object so the order can be paid. If the Order has an amount_total of 0, no PaymentIntent object will be created. Once the order is submitted, its contents cannot be changed, unless the [reopen](https://docs.stripe.com/api#reopen_order) method is called. @@ -4397,7 +1572,7 @@ async def submit_async( @overload async def submit_async( - self, **params: Unpack["Order.SubmitParams"] + self, **params: Unpack["OrderSubmitParams"] ) -> "Order": """ Submitting an Order transitions the status to processing and creates a PaymentIntent object so the order can be paid. If the Order has an amount_total of 0, no PaymentIntent object will be created. Once the order is submitted, its contents cannot be changed, unless the [reopen](https://docs.stripe.com/api#reopen_order) method is called. @@ -4406,7 +1581,7 @@ async def submit_async( @class_method_variant("_cls_submit_async") async def submit_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Order.SubmitParams"] + self, **params: Unpack["OrderSubmitParams"] ) -> "Order": """ Submitting an Order transitions the status to processing and creates a PaymentIntent object so the order can be paid. If the Order has an amount_total of 0, no PaymentIntent object will be created. Once the order is submitted, its contents cannot be changed, unless the [reopen](https://docs.stripe.com/api#reopen_order) method is called. diff --git a/stripe/_order_line_item_service.py b/stripe/_order_line_item_service.py index 7e22fc71e..89c21bfd8 100644 --- a/stripe/_order_line_item_service.py +++ b/stripe/_order_line_item_service.py @@ -5,33 +5,20 @@ from stripe._request_options import RequestOptions from stripe._stripe_service import StripeService from stripe._util import sanitize_id -from typing import List, Optional, cast -from typing_extensions import NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params._order_line_item_list_params import ( + OrderLineItemListParams, + ) -class OrderLineItemService(StripeService): - class ListParams(TypedDict): - 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 OrderLineItemService(StripeService): def list( self, id: str, - params: Optional["OrderLineItemService.ListParams"] = None, + params: Optional["OrderLineItemListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[LineItem]: """ @@ -51,7 +38,7 @@ def list( async def list_async( self, id: str, - params: Optional["OrderLineItemService.ListParams"] = None, + params: Optional["OrderLineItemListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[LineItem]: """ diff --git a/stripe/_order_service.py b/stripe/_order_service.py index c00d6496b..54a4cd6c9 100644 --- a/stripe/_order_service.py +++ b/stripe/_order_service.py @@ -6,8 +6,17 @@ from stripe._request_options import RequestOptions from stripe._stripe_service import StripeService from stripe._util import sanitize_id -from typing import Dict, List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params._order_cancel_params import OrderCancelParams + from stripe.params._order_create_params import OrderCreateParams + from stripe.params._order_list_params import OrderListParams + from stripe.params._order_reopen_params import OrderReopenParams + from stripe.params._order_retrieve_params import OrderRetrieveParams + from stripe.params._order_submit_params import OrderSubmitParams + from stripe.params._order_update_params import OrderUpdateParams class OrderService(StripeService): @@ -15,2825 +24,9 @@ def __init__(self, requestor): super().__init__(requestor) self.line_items = OrderLineItemService(self._requestor) - class CancelParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class CreateParams(TypedDict): - automatic_tax: NotRequired["OrderService.CreateParamsAutomaticTax"] - """ - Settings for automatic tax calculation for this order. - """ - billing_details: NotRequired[ - "Literal['']|OrderService.CreateParamsBillingDetails" - ] - """ - Billing details for the customer. If a customer is provided, this will be automatically populated with values from that customer if override values are not provided. - """ - 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). - """ - customer: NotRequired[str] - """ - The customer associated with this order. - """ - description: NotRequired[str] - """ - An arbitrary string attached to the object. Often useful for displaying to users. - """ - discounts: NotRequired[ - "Literal['']|List[OrderService.CreateParamsDiscount]" - ] - """ - The coupons, promotion codes, and/or discounts to apply to the order. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - ip_address: NotRequired[str] - """ - The IP address of the purchaser for this order. - """ - line_items: List["OrderService.CreateParamsLineItem"] - """ - A list of line items the customer is ordering. Each line item includes information about the product, the quantity, and the resulting cost. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - payment: NotRequired["OrderService.CreateParamsPayment"] - """ - Payment information associated with the order, including payment settings. - """ - shipping_cost: NotRequired[ - "Literal['']|OrderService.CreateParamsShippingCost" - ] - """ - Settings for the customer cost of shipping for this order. - """ - shipping_details: NotRequired[ - "Literal['']|OrderService.CreateParamsShippingDetails" - ] - """ - Shipping details for the order. - """ - tax_details: NotRequired["OrderService.CreateParamsTaxDetails"] - """ - Additional tax details about the purchaser to be used for this order. - """ - - class CreateParamsAutomaticTax(TypedDict): - enabled: bool - """ - Enable automatic tax calculation which will automatically compute tax rates on this order. - """ - - class CreateParamsBillingDetails(TypedDict): - address: NotRequired["OrderService.CreateParamsBillingDetailsAddress"] - """ - The billing address provided by the customer. - """ - email: NotRequired[str] - """ - The billing email provided by the customer. - """ - name: NotRequired[str] - """ - The billing name provided by the customer. - """ - phone: NotRequired[str] - """ - The billing phone number provided by the customer. - """ - - class CreateParamsBillingDetailsAddress(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/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 CreateParamsDiscount(TypedDict): - coupon: NotRequired[str] - """ - ID of the coupon to create a new discount for. - """ - discount: NotRequired[str] - """ - ID of an existing discount on the object (or one of its ancestors) to reuse. - """ - promotion_code: NotRequired[str] - """ - ID of the promotion code to create a new discount for. - """ - - class CreateParamsLineItem(TypedDict): - description: NotRequired[str] - """ - The description for the line item. Will default to the name of the associated product. - """ - discounts: NotRequired[ - "Literal['']|List[OrderService.CreateParamsLineItemDiscount]" - ] - """ - The discounts applied to this line item. - """ - price: NotRequired[str] - """ - The ID of a [Price](https://docs.stripe.com/api/prices) to add to the Order. - - The `price` parameter is an alternative to using the `product` parameter. If each of your products are sold at a single price, you can set `Product.default_price` and then pass the `product` parameter when creating a line item. If your products are sold at several possible prices, use the `price` parameter to explicitly specify which one to use. - """ - price_data: NotRequired["OrderService.CreateParamsLineItemPriceData"] - """ - Data used to generate a new Price object inline. - - The `price_data` parameter is an alternative to using the `product` or `price` parameters. If you create a Product upfront and configure a `Product.default_price`, pass the `product` parameter when creating a line item. If you prefer not to define Products upfront, or if you charge variable prices, pass the `price_data` parameter to describe the price for this line item. - - Each time you pass `price_data` we create a Price for the Product. This Price is hidden in both the Dashboard and API lists and cannot be reused. - """ - product: NotRequired[str] - """ - The ID of a [Product](https://docs.stripe.com/api/products) to add to the Order. - - The Product must have a `default_price` specified. Otherwise, specify the price by passing the `price` or `price_data` parameter. - """ - product_data: NotRequired[ - "OrderService.CreateParamsLineItemProductData" - ] - """ - Defines a [Product](https://docs.stripe.com/api/products) inline and adds it to the Order. - - `product_data` is an alternative to the `product` parameter. If you created a Product upfront, use the `product` parameter to refer to the existing Product. But if you prefer not to create Products upfront, pass the `product_data` parameter to define a Product inline as part of configuring the Order. - - `product_data` automatically creates a Product, just as if you had manually created the Product. If a Product with the same ID already exists, then `product_data` re-uses it to avoid duplicates. - """ - quantity: NotRequired[int] - """ - The quantity of the line item. - """ - tax_rates: NotRequired["Literal['']|List[str]"] - """ - The tax rates applied to this line item. - """ - - class CreateParamsLineItemDiscount(TypedDict): - coupon: NotRequired[str] - """ - ID of the coupon to create a new discount for. - """ - discount: NotRequired[str] - """ - ID of an existing discount on the object (or one of its ancestors) to reuse. - """ - - class CreateParamsLineItemPriceData(TypedDict): - currency: NotRequired[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). - """ - product: NotRequired[str] - """ - ID of the [Product](https://docs.stripe.com/api/products) this [Price](https://docs.stripe.com/api/prices) belongs to. - - Use this to implement a variable-pricing model in your integration. This is required if `product_data` is not specified. - """ - tax_behavior: NotRequired[ - Literal["exclusive", "inclusive", "unspecified"] - ] - """ - Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. - """ - unit_amount: NotRequired[int] - """ - A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. - """ - unit_amount_decimal: NotRequired[str] - """ - Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - """ - - class CreateParamsLineItemProductData(TypedDict): - description: NotRequired["Literal['']|str"] - """ - The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. - """ - id: str - """ - A unique identifier for this product. - - `product_data` automatically creates a Product with this ID. If a Product with the same ID already exists, then `product_data` re-uses it to avoid duplicates. If any of the fields in the existing Product are different from the values in `product_data`, `product_data` updates the existing Product with the new information. So set `product_data[id]` to the same string every time you sell the same product, but don't re-use the same string for different products. - """ - images: NotRequired["Literal['']|List[str]"] - """ - A list of up to 8 URLs of images for this product, meant to be displayable to the customer. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - name: str - """ - The product's name, meant to be displayable to the customer. - """ - package_dimensions: NotRequired[ - "Literal['']|OrderService.CreateParamsLineItemProductDataPackageDimensions" - ] - """ - The dimensions of this product for shipping purposes. - """ - shippable: NotRequired[bool] - """ - Whether this product is shipped (i.e., physical goods). - """ - tax_code: NotRequired["Literal['']|str"] - """ - A [tax code](https://stripe.com/docs/tax/tax-categories) ID. - """ - url: NotRequired["Literal['']|str"] - """ - A URL of a publicly-accessible webpage for this product. - """ - - class CreateParamsLineItemProductDataPackageDimensions(TypedDict): - height: float - """ - Height, in inches. Maximum precision is 2 decimal places. - """ - length: float - """ - Length, in inches. Maximum precision is 2 decimal places. - """ - weight: float - """ - Weight, in ounces. Maximum precision is 2 decimal places. - """ - width: float - """ - Width, in inches. Maximum precision is 2 decimal places. - """ - - class CreateParamsPayment(TypedDict): - settings: "OrderService.CreateParamsPaymentSettings" - """ - Settings describing how the order should configure generated PaymentIntents. - """ - - class CreateParamsPaymentSettings(TypedDict): - application_fee_amount: NotRequired[int] - """ - The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. - """ - payment_method_options: NotRequired[ - "OrderService.CreateParamsPaymentSettingsPaymentMethodOptions" - ] - """ - PaymentMethod-specific configuration to provide to the order's PaymentIntent. - """ - payment_method_types: NotRequired[ - List[ - Literal[ - "acss_debit", - "afterpay_clearpay", - "alipay", - "au_becs_debit", - "bacs_debit", - "bancontact", - "card", - "customer_balance", - "eps", - "fpx", - "giropay", - "grabpay", - "ideal", - "klarna", - "link", - "oxxo", - "p24", - "paypal", - "sepa_debit", - "sofort", - "wechat_pay", - ] - ] - ] - """ - The list of [payment method types](https://stripe.com/docs/payments/payment-methods/overview) to provide to the order's PaymentIntent. Do not include this attribute if you prefer to manage your payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). - """ - return_url: NotRequired[str] - """ - The URL to redirect the customer to after they authenticate their payment. - """ - statement_descriptor: NotRequired[str] - """ - For non-card charges, you can use this value as the complete description that appears on your customers' statements. Must contain at least one letter, maximum 22 characters. - """ - statement_descriptor_suffix: NotRequired[str] - """ - Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that's set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. - """ - transfer_data: NotRequired[ - "OrderService.CreateParamsPaymentSettingsTransferData" - ] - """ - Provides configuration for completing a transfer for the order after it is paid. - """ - - class CreateParamsPaymentSettingsPaymentMethodOptions(TypedDict): - acss_debit: NotRequired[ - "OrderService.CreateParamsPaymentSettingsPaymentMethodOptionsAcssDebit" - ] - """ - If paying by `acss_debit`, this sub-hash contains details about the ACSS Debit payment method options to pass to the order's PaymentIntent. - """ - afterpay_clearpay: NotRequired[ - "OrderService.CreateParamsPaymentSettingsPaymentMethodOptionsAfterpayClearpay" - ] - """ - If paying by `afterpay_clearpay`, this sub-hash contains details about the AfterpayClearpay payment method options to pass to the order's PaymentIntent. - """ - alipay: NotRequired[ - "OrderService.CreateParamsPaymentSettingsPaymentMethodOptionsAlipay" - ] - """ - If paying by `alipay`, this sub-hash contains details about the Alipay payment method options to pass to the order's PaymentIntent. - """ - bancontact: NotRequired[ - "OrderService.CreateParamsPaymentSettingsPaymentMethodOptionsBancontact" - ] - """ - If paying by `bancontact`, this sub-hash contains details about the Bancontact payment method options to pass to the order's PaymentIntent. - """ - card: NotRequired[ - "OrderService.CreateParamsPaymentSettingsPaymentMethodOptionsCard" - ] - """ - If paying by `card`, this sub-hash contains details about the Card payment method options to pass to the order's PaymentIntent. - """ - customer_balance: NotRequired[ - "OrderService.CreateParamsPaymentSettingsPaymentMethodOptionsCustomerBalance" - ] - """ - If paying by `customer_balance`, this sub-hash contains details about the Customer Balance payment method options to pass to the order's PaymentIntent. - """ - ideal: NotRequired[ - "OrderService.CreateParamsPaymentSettingsPaymentMethodOptionsIdeal" - ] - """ - If paying by `ideal`, this sub-hash contains details about the iDEAL payment method options to pass to the order's PaymentIntent. - """ - klarna: NotRequired[ - "OrderService.CreateParamsPaymentSettingsPaymentMethodOptionsKlarna" - ] - """ - If paying by `klarna`, this sub-hash contains details about the Klarna payment method options to pass to the order's PaymentIntent. - """ - link: NotRequired[ - "OrderService.CreateParamsPaymentSettingsPaymentMethodOptionsLink" - ] - """ - If paying by `link`, this sub-hash contains details about the Link payment method options to pass to the order's PaymentIntent. - """ - oxxo: NotRequired[ - "OrderService.CreateParamsPaymentSettingsPaymentMethodOptionsOxxo" - ] - """ - If paying by `oxxo`, this sub-hash contains details about the OXXO payment method options to pass to the order's PaymentIntent. - """ - p24: NotRequired[ - "OrderService.CreateParamsPaymentSettingsPaymentMethodOptionsP24" - ] - """ - If paying by `p24`, this sub-hash contains details about the P24 payment method options to pass to the order's PaymentIntent. - """ - paypal: NotRequired[ - "OrderService.CreateParamsPaymentSettingsPaymentMethodOptionsPaypal" - ] - """ - If paying by `paypal`, this sub-hash contains details about the PayPal payment method options to pass to the order's PaymentIntent. - """ - sepa_debit: NotRequired[ - "OrderService.CreateParamsPaymentSettingsPaymentMethodOptionsSepaDebit" - ] - """ - If paying by `sepa_debit`, this sub-hash contains details about the SEPA Debit payment method options to pass to the order's PaymentIntent. - """ - sofort: NotRequired[ - "OrderService.CreateParamsPaymentSettingsPaymentMethodOptionsSofort" - ] - """ - If paying by `sofort`, this sub-hash contains details about the Sofort payment method options to pass to the order's PaymentIntent. - """ - wechat_pay: NotRequired[ - "OrderService.CreateParamsPaymentSettingsPaymentMethodOptionsWechatPay" - ] - """ - If paying by `wechat_pay`, this sub-hash contains details about the WeChat Pay payment method options to pass to the order's PaymentIntent. - """ - - class CreateParamsPaymentSettingsPaymentMethodOptionsAcssDebit(TypedDict): - mandate_options: NotRequired[ - "OrderService.CreateParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions" - ] - """ - Additional fields for Mandate creation - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - target_date: NotRequired[str] - """ - Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. - """ - verification_method: NotRequired[ - Literal["automatic", "instant", "microdeposits"] - ] - """ - Bank account verification method. - """ - - class CreateParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions( - TypedDict, - ): - custom_mandate_url: NotRequired["Literal['']|str"] - """ - A URL for custom mandate text to render during confirmation step. - The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent, - or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent. - """ - interval_description: NotRequired[str] - """ - Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'. - """ - payment_schedule: NotRequired[ - Literal["combined", "interval", "sporadic"] - ] - """ - Payment schedule for the mandate. - """ - transaction_type: NotRequired[Literal["business", "personal"]] - """ - Transaction type of the mandate. - """ - - class CreateParamsPaymentSettingsPaymentMethodOptionsAfterpayClearpay( - TypedDict, - ): - capture_method: NotRequired[ - Literal["automatic", "automatic_async", "manual"] - ] - """ - Controls when the funds are captured from the customer's account. - - If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. - """ - reference: NotRequired[str] - """ - An internal identifier or reference this payment corresponds to. The identifier is limited to 128 characters and may contain only letters, digits, underscores, backslashes and dashes. - """ - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with the payment method. - - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the order's Customer, if present, after the order's PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - - When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). - - If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. - """ - - class CreateParamsPaymentSettingsPaymentMethodOptionsAlipay(TypedDict): - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class CreateParamsPaymentSettingsPaymentMethodOptionsBancontact(TypedDict): - preferred_language: NotRequired[Literal["de", "en", "fr", "nl"]] - """ - Preferred language of the Bancontact authorization page that the customer is redirected to. - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class CreateParamsPaymentSettingsPaymentMethodOptionsCard(TypedDict): - capture_method: NotRequired[ - Literal["automatic", "automatic_async", "manual"] - ] - """ - Controls when the funds will be captured from the customer's account. - """ - setup_future_usage: NotRequired[ - Literal["none", "off_session", "on_session"] - ] - """ - Indicates that you intend to make future payments with the payment method. - - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the order's Customer, if present, after the order's PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - - When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). - - If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. - """ - - class CreateParamsPaymentSettingsPaymentMethodOptionsCustomerBalance( - TypedDict, - ): - bank_transfer: NotRequired[ - "OrderService.CreateParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransfer" - ] - """ - Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. - """ - funding_type: NotRequired[Literal["bank_transfer"]] - """ - The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. - """ - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class CreateParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransfer( - TypedDict, - ): - eu_bank_transfer: NotRequired[ - "OrderService.CreateParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer" - ] - """ - Configuration for the eu_bank_transfer funding type. - """ - requested_address_types: NotRequired[ - List[ - Literal[ - "aba", - "iban", - "sepa", - "sort_code", - "spei", - "swift", - "zengin", - ] - ] - ] - """ - List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned. - - Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`. - """ - type: Literal[ - "eu_bank_transfer", - "gb_bank_transfer", - "jp_bank_transfer", - "mx_bank_transfer", - "us_bank_transfer", - ] - """ - The list of bank transfer types that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. - """ - - class CreateParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer( - TypedDict, - ): - country: str - """ - The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. - """ - - class CreateParamsPaymentSettingsPaymentMethodOptionsIdeal(TypedDict): - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class CreateParamsPaymentSettingsPaymentMethodOptionsKlarna(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds are captured from the customer's account. - - If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. - """ - on_demand: NotRequired[ - "OrderService.CreateParamsPaymentSettingsPaymentMethodOptionsKlarnaOnDemand" - ] - """ - On-demand details if setting up or charging an on-demand payment. - """ - preferred_locale: NotRequired[ - Literal[ - "cs-CZ", - "da-DK", - "de-AT", - "de-CH", - "de-DE", - "el-GR", - "en-AT", - "en-AU", - "en-BE", - "en-CA", - "en-CH", - "en-CZ", - "en-DE", - "en-DK", - "en-ES", - "en-FI", - "en-FR", - "en-GB", - "en-GR", - "en-IE", - "en-IT", - "en-NL", - "en-NO", - "en-NZ", - "en-PL", - "en-PT", - "en-RO", - "en-SE", - "en-US", - "es-ES", - "es-US", - "fi-FI", - "fr-BE", - "fr-CA", - "fr-CH", - "fr-FR", - "it-CH", - "it-IT", - "nb-NO", - "nl-BE", - "nl-NL", - "pl-PL", - "pt-PT", - "ro-RO", - "sv-FI", - "sv-SE", - ] - ] - """ - Preferred language of the Klarna authorization page that the customer is redirected to - """ - setup_future_usage: NotRequired[ - Literal["none", "off_session", "on_session"] - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - subscriptions: NotRequired[ - "Literal['']|List[OrderService.CreateParamsPaymentSettingsPaymentMethodOptionsKlarnaSubscription]" - ] - """ - Subscription details if setting up or charging a subscription. - """ - - class CreateParamsPaymentSettingsPaymentMethodOptionsKlarnaOnDemand( - TypedDict, - ): - average_amount: NotRequired[int] - """ - Your average amount value. You can use a value across your customer base, or segment based on customer type, country, etc. - """ - maximum_amount: NotRequired[int] - """ - The maximum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. - """ - minimum_amount: NotRequired[int] - """ - The lowest or minimum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. - """ - purchase_interval: NotRequired[Literal["day", "month", "week", "year"]] - """ - Interval at which the customer is making purchases - """ - purchase_interval_count: NotRequired[int] - """ - The number of `purchase_interval` between charges - """ - - class CreateParamsPaymentSettingsPaymentMethodOptionsKlarnaSubscription( - TypedDict, - ): - interval: Literal["day", "month", "week", "year"] - """ - Unit of time between subscription charges. - """ - interval_count: NotRequired[int] - """ - The number of intervals (specified in the `interval` attribute) between subscription charges. For example, `interval=month` and `interval_count=3` charges every 3 months. - """ - name: NotRequired[str] - """ - Name for subscription. - """ - next_billing: NotRequired[ - "OrderService.CreateParamsPaymentSettingsPaymentMethodOptionsKlarnaSubscriptionNextBilling" - ] - """ - Describes the upcoming charge for this subscription. - """ - reference: str - """ - A non-customer-facing reference to correlate subscription charges in the Klarna app. Use a value that persists across subscription charges. - """ - - class CreateParamsPaymentSettingsPaymentMethodOptionsKlarnaSubscriptionNextBilling( - TypedDict, - ): - amount: int - """ - The amount of the next charge for the subscription. - """ - date: str - """ - The date of the next charge for the subscription in YYYY-MM-DD format. - """ - - class CreateParamsPaymentSettingsPaymentMethodOptionsLink(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds are captured from the customer's account. - - If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. - """ - persistent_token: NotRequired[str] - """ - [Deprecated] This is a legacy parameter that no longer has any function. - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class CreateParamsPaymentSettingsPaymentMethodOptionsOxxo(TypedDict): - expires_after_days: NotRequired[int] - """ - The number of calendar days before an OXXO voucher expires. For example, if you create an OXXO voucher on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time. - """ - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class CreateParamsPaymentSettingsPaymentMethodOptionsP24(TypedDict): - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - tos_shown_and_accepted: NotRequired[bool] - """ - Confirm that the payer has accepted the P24 terms and conditions. - """ - - class CreateParamsPaymentSettingsPaymentMethodOptionsPaypal(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds will be captured from the customer's account. - """ - line_items: NotRequired[ - List[ - "OrderService.CreateParamsPaymentSettingsPaymentMethodOptionsPaypalLineItem" - ] - ] - """ - The line items purchased by the customer. - """ - preferred_locale: NotRequired[ - Literal[ - "cs-CZ", - "da-DK", - "de-AT", - "de-DE", - "de-LU", - "el-GR", - "en-GB", - "en-US", - "es-ES", - "fi-FI", - "fr-BE", - "fr-FR", - "fr-LU", - "hu-HU", - "it-IT", - "nl-BE", - "nl-NL", - "pl-PL", - "pt-PT", - "sk-SK", - "sv-SE", - ] - ] - """ - [Preferred locale](https://stripe.com/docs/payments/paypal/supported-locales) of the PayPal checkout page that the customer is redirected to. - """ - reference: NotRequired[str] - """ - A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. - """ - reference_id: NotRequired[str] - """ - A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. - """ - risk_correlation_id: NotRequired[str] - """ - The risk correlation ID for an on-session payment using a saved PayPal payment method. - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - subsellers: NotRequired[List[str]] - """ - The Stripe connected account IDs of the sellers on the platform for this transaction (optional). Only allowed when [separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) are used. - """ - - class CreateParamsPaymentSettingsPaymentMethodOptionsPaypalLineItem( - TypedDict, - ): - category: NotRequired[ - Literal["digital_goods", "donation", "physical_goods"] - ] - """ - Type of the line item. - """ - description: NotRequired[str] - """ - Description of the line item. - """ - name: str - """ - Descriptive name of the line item. - """ - quantity: int - """ - Quantity of the line item. Must be a positive number. - """ - sku: NotRequired[str] - """ - Client facing stock keeping unit, article number or similar. - """ - sold_by: NotRequired[str] - """ - The Stripe account ID of the connected account that sells the item. - """ - tax: NotRequired[ - "OrderService.CreateParamsPaymentSettingsPaymentMethodOptionsPaypalLineItemTax" - ] - """ - The tax information for the line item. - """ - unit_amount: int - """ - Price for a single unit of the line item in minor units. Cannot be a negative number. - """ - - class CreateParamsPaymentSettingsPaymentMethodOptionsPaypalLineItemTax( - TypedDict, - ): - amount: int - """ - The tax for a single unit of the line item in minor units. Cannot be a negative number. - """ - behavior: Literal["exclusive", "inclusive"] - """ - The tax behavior for the line item. - """ - - class CreateParamsPaymentSettingsPaymentMethodOptionsSepaDebit(TypedDict): - mandate_options: NotRequired[ - "OrderService.CreateParamsPaymentSettingsPaymentMethodOptionsSepaDebitMandateOptions" - ] - """ - Additional fields for Mandate creation - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - target_date: NotRequired[str] - """ - Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. - """ - - class CreateParamsPaymentSettingsPaymentMethodOptionsSepaDebitMandateOptions( - TypedDict, - ): - reference_prefix: NotRequired["Literal['']|str"] - """ - Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'. - """ - - class CreateParamsPaymentSettingsPaymentMethodOptionsSofort(TypedDict): - preferred_language: NotRequired[ - "Literal['']|Literal['de', 'en', 'es', 'fr', 'it', 'nl', 'pl']" - ] - """ - Language shown to the payer on redirect. - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class CreateParamsPaymentSettingsPaymentMethodOptionsWechatPay(TypedDict): - app_id: NotRequired[str] - """ - The app ID registered with WeChat Pay. Only required when client is ios or android. - """ - client: NotRequired[Literal["android", "ios", "web"]] - """ - The client type that the end customer will pay from - """ - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class CreateParamsPaymentSettingsTransferData(TypedDict): - amount: NotRequired[int] - """ - The amount that will be transferred automatically when the order is paid. If no amount is set, the full amount is transferred. There cannot be any line items with recurring prices when using this field. - """ - destination: str - """ - ID of the Connected account receiving the transfer. - """ - - class CreateParamsShippingCost(TypedDict): - shipping_rate: NotRequired[str] - """ - The ID of the shipping rate to use for this order. - """ - shipping_rate_data: NotRequired[ - "OrderService.CreateParamsShippingCostShippingRateData" - ] - """ - Parameters to create a new ad-hoc shipping rate for this order. - """ - - class CreateParamsShippingCostShippingRateData(TypedDict): - delivery_estimate: NotRequired[ - "OrderService.CreateParamsShippingCostShippingRateDataDeliveryEstimate" - ] - """ - The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions. - """ - display_name: str - """ - The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions. - """ - fixed_amount: NotRequired[ - "OrderService.CreateParamsShippingCostShippingRateDataFixedAmount" - ] - """ - Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - tax_behavior: NotRequired[ - Literal["exclusive", "inclusive", "unspecified"] - ] - """ - Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. - """ - tax_code: NotRequired[str] - """ - A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`. - """ - type: NotRequired[Literal["fixed_amount"]] - """ - The type of calculation to use on the shipping rate. - """ - - class CreateParamsShippingCostShippingRateDataDeliveryEstimate(TypedDict): - maximum: NotRequired[ - "OrderService.CreateParamsShippingCostShippingRateDataDeliveryEstimateMaximum" - ] - """ - The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite. - """ - minimum: NotRequired[ - "OrderService.CreateParamsShippingCostShippingRateDataDeliveryEstimateMinimum" - ] - """ - The lower bound of the estimated range. If empty, represents no lower bound. - """ - - class CreateParamsShippingCostShippingRateDataDeliveryEstimateMaximum( - TypedDict, - ): - unit: Literal["business_day", "day", "hour", "month", "week"] - """ - A unit of time. - """ - value: int - """ - Must be greater than 0. - """ - - class CreateParamsShippingCostShippingRateDataDeliveryEstimateMinimum( - TypedDict, - ): - unit: Literal["business_day", "day", "hour", "month", "week"] - """ - A unit of time. - """ - value: int - """ - Must be greater than 0. - """ - - class CreateParamsShippingCostShippingRateDataFixedAmount(TypedDict): - amount: int - """ - A non-negative integer in cents representing how much to charge. - """ - 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). - """ - currency_options: NotRequired[ - Dict[ - str, - "OrderService.CreateParamsShippingCostShippingRateDataFixedAmountCurrencyOptions", - ] - ] - """ - Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). - """ - - class CreateParamsShippingCostShippingRateDataFixedAmountCurrencyOptions( - TypedDict, - ): - amount: int - """ - A non-negative integer in cents representing how much to charge. - """ - tax_behavior: NotRequired[ - Literal["exclusive", "inclusive", "unspecified"] - ] - """ - Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. - """ - - class CreateParamsShippingDetails(TypedDict): - address: "OrderService.CreateParamsShippingDetailsAddress" - """ - The shipping address for the order. - """ - name: str - """ - The name of the recipient of the order. - """ - phone: NotRequired["Literal['']|str"] - """ - The phone number (including extension) for the recipient of the order. - """ - - class CreateParamsShippingDetailsAddress(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/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 CreateParamsTaxDetails(TypedDict): - tax_exempt: NotRequired[ - "Literal['']|Literal['exempt', 'none', 'reverse']" - ] - """ - The purchaser's tax exemption status. One of `none`, `exempt`, or `reverse`. - """ - tax_ids: NotRequired[List["OrderService.CreateParamsTaxDetailsTaxId"]] - """ - The purchaser's tax IDs to be used for this order. - """ - - class CreateParamsTaxDetailsTaxId(TypedDict): - type: Literal[ - "ad_nrt", - "ae_trn", - "al_tin", - "am_tin", - "ao_tin", - "ar_cuit", - "au_abn", - "au_arn", - "aw_tin", - "az_tin", - "ba_tin", - "bb_tin", - "bd_bin", - "bf_ifu", - "bg_uic", - "bh_vat", - "bj_ifu", - "bo_tin", - "br_cnpj", - "br_cpf", - "bs_tin", - "by_tin", - "ca_bn", - "ca_gst_hst", - "ca_pst_bc", - "ca_pst_mb", - "ca_pst_sk", - "ca_qst", - "cd_nif", - "ch_uid", - "ch_vat", - "cl_tin", - "cm_niu", - "cn_tin", - "co_nit", - "cr_tin", - "cv_nif", - "de_stn", - "do_rcn", - "ec_ruc", - "eg_tin", - "es_cif", - "et_tin", - "eu_oss_vat", - "eu_vat", - "gb_vat", - "ge_vat", - "gn_nif", - "hk_br", - "hr_oib", - "hu_tin", - "id_npwp", - "il_vat", - "in_gst", - "is_vat", - "jp_cn", - "jp_rn", - "jp_trn", - "ke_pin", - "kg_tin", - "kh_tin", - "kr_brn", - "kz_bin", - "la_tin", - "li_uid", - "li_vat", - "ma_vat", - "md_vat", - "me_pib", - "mk_vat", - "mr_nif", - "mx_rfc", - "my_frp", - "my_itn", - "my_sst", - "ng_tin", - "no_vat", - "no_voec", - "np_pan", - "nz_gst", - "om_vat", - "pe_ruc", - "ph_tin", - "ro_tin", - "rs_pib", - "ru_inn", - "ru_kpp", - "sa_vat", - "sg_gst", - "sg_uen", - "si_tin", - "sn_ninea", - "sr_fin", - "sv_nit", - "th_vat", - "tj_tin", - "tr_tin", - "tw_vat", - "tz_vat", - "ua_vat", - "ug_tin", - "us_ein", - "uy_ruc", - "uz_tin", - "uz_vat", - "ve_rif", - "vn_tin", - "za_vat", - "zm_tin", - "zw_tin", - ] - """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `al_tin`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `aw_tin`, `az_tin`, `ba_tin`, `bb_tin`, `bd_bin`, `bf_ifu`, `bg_uic`, `bh_vat`, `bj_ifu`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cm_niu`, `cn_tin`, `co_nit`, `cr_tin`, `cv_nif`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `et_tin`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kg_tin`, `kh_tin`, `kr_brn`, `kz_bin`, `la_tin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin` - """ - value: str - """ - Value of the tax ID. - """ - - class ListParams(TypedDict): - customer: NotRequired[str] - """ - Only return orders for the given customer. - """ - 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 ReopenParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class RetrieveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class SubmitParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - expected_total: int - """ - `expected_total` should always be set to the order's `amount_total` field. If they don't match, submitting the order will fail. This helps detect race conditions where something else concurrently modifies the order. - """ - - class UpdateParams(TypedDict): - automatic_tax: NotRequired["OrderService.UpdateParamsAutomaticTax"] - """ - Settings for automatic tax calculation for this order. - """ - billing_details: NotRequired[ - "Literal['']|OrderService.UpdateParamsBillingDetails" - ] - """ - Billing details for the customer. If a customer is provided, this will be automatically populated with values from that customer if override values are not provided. - """ - currency: NotRequired[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). - """ - customer: NotRequired[str] - """ - The customer associated with this order. - """ - description: NotRequired["Literal['']|str"] - """ - An arbitrary string attached to the object. Often useful for displaying to users. - """ - discounts: NotRequired[ - "Literal['']|List[OrderService.UpdateParamsDiscount]" - ] - """ - The coupons, promotion codes, and/or discounts to apply to the order. Pass the empty string `""` to unset this field. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - ip_address: NotRequired[str] - """ - The IP address of the purchaser for this order. - """ - line_items: NotRequired[List["OrderService.UpdateParamsLineItem"]] - """ - A list of line items the customer is ordering. Each line item includes information about the product, the quantity, and the resulting cost. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - payment: NotRequired["OrderService.UpdateParamsPayment"] - """ - Payment information associated with the order, including payment settings. - """ - shipping_cost: NotRequired[ - "Literal['']|OrderService.UpdateParamsShippingCost" - ] - """ - Settings for the customer cost of shipping for this order. - """ - shipping_details: NotRequired[ - "Literal['']|OrderService.UpdateParamsShippingDetails" - ] - """ - Shipping details for the order. - """ - tax_details: NotRequired["OrderService.UpdateParamsTaxDetails"] - """ - Additional tax details about the purchaser to be used for this order. - """ - - class UpdateParamsAutomaticTax(TypedDict): - enabled: bool - """ - Enable automatic tax calculation which will automatically compute tax rates on this order. - """ - - class UpdateParamsBillingDetails(TypedDict): - address: NotRequired["OrderService.UpdateParamsBillingDetailsAddress"] - """ - The billing address provided by the customer. - """ - email: NotRequired[str] - """ - The billing email provided by the customer. - """ - name: NotRequired[str] - """ - The billing name provided by the customer. - """ - phone: NotRequired[str] - """ - The billing phone number provided by the customer. - """ - - class UpdateParamsBillingDetailsAddress(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/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 UpdateParamsDiscount(TypedDict): - coupon: NotRequired[str] - """ - ID of the coupon to create a new discount for. - """ - discount: NotRequired[str] - """ - ID of an existing discount on the object (or one of its ancestors) to reuse. - """ - promotion_code: NotRequired[str] - """ - ID of the promotion code to create a new discount for. - """ - - class UpdateParamsLineItem(TypedDict): - description: NotRequired[str] - """ - The description for the line item. Will default to the name of the associated product. - """ - discounts: NotRequired[ - "Literal['']|List[OrderService.UpdateParamsLineItemDiscount]" - ] - """ - The discounts applied to this line item. - """ - id: NotRequired[str] - """ - The ID of an existing line item on the order. - """ - price: NotRequired[str] - """ - The ID of a [Price](https://docs.stripe.com/api/prices) to add to the Order. - - The `price` parameter is an alternative to using the `product` parameter. If each of your products are sold at a single price, you can set `Product.default_price` and then pass the `product` parameter when creating a line item. If your products are sold at several possible prices, use the `price` parameter to explicitly specify which one to use. - """ - price_data: NotRequired["OrderService.UpdateParamsLineItemPriceData"] - """ - Data used to generate a new Price object inline. - - The `price_data` parameter is an alternative to using the `product` or `price` parameters. If you create a Product upfront and configure a `Product.default_price`, pass the `product` parameter when creating a line item. If you prefer not to define Products upfront, or if you charge variable prices, pass the `price_data` parameter to describe the price for this line item. - - Each time you pass `price_data` we create a Price for the Product. This Price is hidden in both the Dashboard and API lists and cannot be reused. - """ - product: NotRequired[str] - """ - The ID of a [Product](https://docs.stripe.com/api/products) to add to the Order. - - The Product must have a `default_price` specified. Otherwise, specify the price by passing the `price` or `price_data` parameter. - """ - product_data: NotRequired[ - "OrderService.UpdateParamsLineItemProductData" - ] - """ - Defines a [Product](https://docs.stripe.com/api/products) inline and adds it to the Order. - - `product_data` is an alternative to the `product` parameter. If you created a Product upfront, use the `product` parameter to refer to the existing Product. But if you prefer not to create Products upfront, pass the `product_data` parameter to define a Product inline as part of configuring the Order. - - `product_data` automatically creates a Product, just as if you had manually created the Product. If a Product with the same ID already exists, then `product_data` re-uses it to avoid duplicates. - """ - quantity: NotRequired[int] - """ - The quantity of the line item. - """ - tax_rates: NotRequired["Literal['']|List[str]"] - """ - The tax rates applied to this line item. - """ - - class UpdateParamsLineItemDiscount(TypedDict): - coupon: NotRequired[str] - """ - ID of the coupon to create a new discount for. - """ - discount: NotRequired[str] - """ - ID of an existing discount on the object (or one of its ancestors) to reuse. - """ - - class UpdateParamsLineItemPriceData(TypedDict): - currency: NotRequired[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). - """ - product: NotRequired[str] - """ - ID of the [Product](https://docs.stripe.com/api/products) this [Price](https://docs.stripe.com/api/prices) belongs to. - - Use this to implement a variable-pricing model in your integration. This is required if `product_data` is not specified. - """ - tax_behavior: NotRequired[ - Literal["exclusive", "inclusive", "unspecified"] - ] - """ - Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. - """ - unit_amount: NotRequired[int] - """ - A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. - """ - unit_amount_decimal: NotRequired[str] - """ - Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - """ - - class UpdateParamsLineItemProductData(TypedDict): - description: NotRequired["Literal['']|str"] - """ - The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. - """ - id: str - """ - A unique identifier for this product. - - `product_data` automatically creates a Product with this ID. If a Product with the same ID already exists, then `product_data` re-uses it to avoid duplicates. If any of the fields in the existing Product are different from the values in `product_data`, `product_data` updates the existing Product with the new information. So set `product_data[id]` to the same string every time you sell the same product, but don't re-use the same string for different products. - """ - images: NotRequired["Literal['']|List[str]"] - """ - A list of up to 8 URLs of images for this product, meant to be displayable to the customer. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - name: str - """ - The product's name, meant to be displayable to the customer. - """ - package_dimensions: NotRequired[ - "Literal['']|OrderService.UpdateParamsLineItemProductDataPackageDimensions" - ] - """ - The dimensions of this product for shipping purposes. - """ - shippable: NotRequired[bool] - """ - Whether this product is shipped (i.e., physical goods). - """ - tax_code: NotRequired["Literal['']|str"] - """ - A [tax code](https://stripe.com/docs/tax/tax-categories) ID. - """ - url: NotRequired["Literal['']|str"] - """ - A URL of a publicly-accessible webpage for this product. - """ - - class UpdateParamsLineItemProductDataPackageDimensions(TypedDict): - height: float - """ - Height, in inches. Maximum precision is 2 decimal places. - """ - length: float - """ - Length, in inches. Maximum precision is 2 decimal places. - """ - weight: float - """ - Weight, in ounces. Maximum precision is 2 decimal places. - """ - width: float - """ - Width, in inches. Maximum precision is 2 decimal places. - """ - - class UpdateParamsPayment(TypedDict): - settings: "OrderService.UpdateParamsPaymentSettings" - """ - Settings describing how the order should configure generated PaymentIntents. - """ - - class UpdateParamsPaymentSettings(TypedDict): - application_fee_amount: NotRequired["Literal['']|int"] - """ - The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. - """ - payment_method_options: NotRequired[ - "OrderService.UpdateParamsPaymentSettingsPaymentMethodOptions" - ] - """ - PaymentMethod-specific configuration to provide to the order's PaymentIntent. - """ - payment_method_types: NotRequired[ - List[ - Literal[ - "acss_debit", - "afterpay_clearpay", - "alipay", - "au_becs_debit", - "bacs_debit", - "bancontact", - "card", - "customer_balance", - "eps", - "fpx", - "giropay", - "grabpay", - "ideal", - "klarna", - "link", - "oxxo", - "p24", - "paypal", - "sepa_debit", - "sofort", - "wechat_pay", - ] - ] - ] - """ - The list of [payment method types](https://stripe.com/docs/payments/payment-methods/overview) to provide to the order's PaymentIntent. Do not include this attribute if you prefer to manage your payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). - """ - return_url: NotRequired["Literal['']|str"] - """ - The URL to redirect the customer to after they authenticate their payment. - """ - statement_descriptor: NotRequired[str] - """ - For non-card charges, you can use this value as the complete description that appears on your customers' statements. Must contain at least one letter, maximum 22 characters. - """ - statement_descriptor_suffix: NotRequired[str] - """ - Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that's set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. - """ - transfer_data: NotRequired[ - "Literal['']|OrderService.UpdateParamsPaymentSettingsTransferData" - ] - """ - Provides configuration for completing a transfer for the order after it is paid. - """ - - class UpdateParamsPaymentSettingsPaymentMethodOptions(TypedDict): - acss_debit: NotRequired[ - "Literal['']|OrderService.UpdateParamsPaymentSettingsPaymentMethodOptionsAcssDebit" - ] - """ - If paying by `acss_debit`, this sub-hash contains details about the ACSS Debit payment method options to pass to the order's PaymentIntent. - """ - afterpay_clearpay: NotRequired[ - "Literal['']|OrderService.UpdateParamsPaymentSettingsPaymentMethodOptionsAfterpayClearpay" - ] - """ - If paying by `afterpay_clearpay`, this sub-hash contains details about the AfterpayClearpay payment method options to pass to the order's PaymentIntent. - """ - alipay: NotRequired[ - "Literal['']|OrderService.UpdateParamsPaymentSettingsPaymentMethodOptionsAlipay" - ] - """ - If paying by `alipay`, this sub-hash contains details about the Alipay payment method options to pass to the order's PaymentIntent. - """ - bancontact: NotRequired[ - "Literal['']|OrderService.UpdateParamsPaymentSettingsPaymentMethodOptionsBancontact" - ] - """ - If paying by `bancontact`, this sub-hash contains details about the Bancontact payment method options to pass to the order's PaymentIntent. - """ - card: NotRequired[ - "Literal['']|OrderService.UpdateParamsPaymentSettingsPaymentMethodOptionsCard" - ] - """ - If paying by `card`, this sub-hash contains details about the Card payment method options to pass to the order's PaymentIntent. - """ - customer_balance: NotRequired[ - "Literal['']|OrderService.UpdateParamsPaymentSettingsPaymentMethodOptionsCustomerBalance" - ] - """ - If paying by `customer_balance`, this sub-hash contains details about the Customer Balance payment method options to pass to the order's PaymentIntent. - """ - ideal: NotRequired[ - "Literal['']|OrderService.UpdateParamsPaymentSettingsPaymentMethodOptionsIdeal" - ] - """ - If paying by `ideal`, this sub-hash contains details about the iDEAL payment method options to pass to the order's PaymentIntent. - """ - klarna: NotRequired[ - "Literal['']|OrderService.UpdateParamsPaymentSettingsPaymentMethodOptionsKlarna" - ] - """ - If paying by `klarna`, this sub-hash contains details about the Klarna payment method options to pass to the order's PaymentIntent. - """ - link: NotRequired[ - "Literal['']|OrderService.UpdateParamsPaymentSettingsPaymentMethodOptionsLink" - ] - """ - If paying by `link`, this sub-hash contains details about the Link payment method options to pass to the order's PaymentIntent. - """ - oxxo: NotRequired[ - "Literal['']|OrderService.UpdateParamsPaymentSettingsPaymentMethodOptionsOxxo" - ] - """ - If paying by `oxxo`, this sub-hash contains details about the OXXO payment method options to pass to the order's PaymentIntent. - """ - p24: NotRequired[ - "Literal['']|OrderService.UpdateParamsPaymentSettingsPaymentMethodOptionsP24" - ] - """ - If paying by `p24`, this sub-hash contains details about the P24 payment method options to pass to the order's PaymentIntent. - """ - paypal: NotRequired[ - "Literal['']|OrderService.UpdateParamsPaymentSettingsPaymentMethodOptionsPaypal" - ] - """ - If paying by `paypal`, this sub-hash contains details about the PayPal payment method options to pass to the order's PaymentIntent. - """ - sepa_debit: NotRequired[ - "Literal['']|OrderService.UpdateParamsPaymentSettingsPaymentMethodOptionsSepaDebit" - ] - """ - If paying by `sepa_debit`, this sub-hash contains details about the SEPA Debit payment method options to pass to the order's PaymentIntent. - """ - sofort: NotRequired[ - "Literal['']|OrderService.UpdateParamsPaymentSettingsPaymentMethodOptionsSofort" - ] - """ - If paying by `sofort`, this sub-hash contains details about the Sofort payment method options to pass to the order's PaymentIntent. - """ - wechat_pay: NotRequired[ - "Literal['']|OrderService.UpdateParamsPaymentSettingsPaymentMethodOptionsWechatPay" - ] - """ - If paying by `wechat_pay`, this sub-hash contains details about the WeChat Pay payment method options to pass to the order's PaymentIntent. - """ - - class UpdateParamsPaymentSettingsPaymentMethodOptionsAcssDebit(TypedDict): - mandate_options: NotRequired[ - "OrderService.UpdateParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions" - ] - """ - Additional fields for Mandate creation - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - target_date: NotRequired[str] - """ - Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. - """ - verification_method: NotRequired[ - Literal["automatic", "instant", "microdeposits"] - ] - """ - Bank account verification method. - """ - - class UpdateParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions( - TypedDict, - ): - custom_mandate_url: NotRequired["Literal['']|str"] - """ - A URL for custom mandate text to render during confirmation step. - The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent, - or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent. - """ - interval_description: NotRequired[str] - """ - Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'. - """ - payment_schedule: NotRequired[ - Literal["combined", "interval", "sporadic"] - ] - """ - Payment schedule for the mandate. - """ - transaction_type: NotRequired[Literal["business", "personal"]] - """ - Transaction type of the mandate. - """ - - class UpdateParamsPaymentSettingsPaymentMethodOptionsAfterpayClearpay( - TypedDict, - ): - capture_method: NotRequired[ - Literal["automatic", "automatic_async", "manual"] - ] - """ - Controls when the funds are captured from the customer's account. - - If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. - """ - reference: NotRequired[str] - """ - An internal identifier or reference this payment corresponds to. The identifier is limited to 128 characters and may contain only letters, digits, underscores, backslashes and dashes. - """ - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with the payment method. - - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the order's Customer, if present, after the order's PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - - When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). - - If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. - """ - - class UpdateParamsPaymentSettingsPaymentMethodOptionsAlipay(TypedDict): - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class UpdateParamsPaymentSettingsPaymentMethodOptionsBancontact(TypedDict): - preferred_language: NotRequired[Literal["de", "en", "fr", "nl"]] - """ - Preferred language of the Bancontact authorization page that the customer is redirected to. - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class UpdateParamsPaymentSettingsPaymentMethodOptionsCard(TypedDict): - capture_method: NotRequired[ - Literal["automatic", "automatic_async", "manual"] - ] - """ - Controls when the funds will be captured from the customer's account. - """ - setup_future_usage: NotRequired[ - Literal["none", "off_session", "on_session"] - ] - """ - Indicates that you intend to make future payments with the payment method. - - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the order's Customer, if present, after the order's PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - - When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). - - If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. - """ - - class UpdateParamsPaymentSettingsPaymentMethodOptionsCustomerBalance( - TypedDict, - ): - bank_transfer: NotRequired[ - "OrderService.UpdateParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransfer" - ] - """ - Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. - """ - funding_type: NotRequired[Literal["bank_transfer"]] - """ - The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. - """ - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class UpdateParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransfer( - TypedDict, - ): - eu_bank_transfer: NotRequired[ - "OrderService.UpdateParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer" - ] - """ - Configuration for the eu_bank_transfer funding type. - """ - requested_address_types: NotRequired[ - List[ - Literal[ - "aba", - "iban", - "sepa", - "sort_code", - "spei", - "swift", - "zengin", - ] - ] - ] - """ - List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned. - - Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`. - """ - type: Literal[ - "eu_bank_transfer", - "gb_bank_transfer", - "jp_bank_transfer", - "mx_bank_transfer", - "us_bank_transfer", - ] - """ - The list of bank transfer types that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. - """ - - class UpdateParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer( - TypedDict, - ): - country: str - """ - The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. - """ - - class UpdateParamsPaymentSettingsPaymentMethodOptionsIdeal(TypedDict): - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class UpdateParamsPaymentSettingsPaymentMethodOptionsKlarna(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds are captured from the customer's account. - - If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. - """ - on_demand: NotRequired[ - "OrderService.UpdateParamsPaymentSettingsPaymentMethodOptionsKlarnaOnDemand" - ] - """ - On-demand details if setting up or charging an on-demand payment. - """ - preferred_locale: NotRequired[ - Literal[ - "cs-CZ", - "da-DK", - "de-AT", - "de-CH", - "de-DE", - "el-GR", - "en-AT", - "en-AU", - "en-BE", - "en-CA", - "en-CH", - "en-CZ", - "en-DE", - "en-DK", - "en-ES", - "en-FI", - "en-FR", - "en-GB", - "en-GR", - "en-IE", - "en-IT", - "en-NL", - "en-NO", - "en-NZ", - "en-PL", - "en-PT", - "en-RO", - "en-SE", - "en-US", - "es-ES", - "es-US", - "fi-FI", - "fr-BE", - "fr-CA", - "fr-CH", - "fr-FR", - "it-CH", - "it-IT", - "nb-NO", - "nl-BE", - "nl-NL", - "pl-PL", - "pt-PT", - "ro-RO", - "sv-FI", - "sv-SE", - ] - ] - """ - Preferred language of the Klarna authorization page that the customer is redirected to - """ - setup_future_usage: NotRequired[ - Literal["none", "off_session", "on_session"] - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - subscriptions: NotRequired[ - "Literal['']|List[OrderService.UpdateParamsPaymentSettingsPaymentMethodOptionsKlarnaSubscription]" - ] - """ - Subscription details if setting up or charging a subscription. - """ - - class UpdateParamsPaymentSettingsPaymentMethodOptionsKlarnaOnDemand( - TypedDict, - ): - average_amount: NotRequired[int] - """ - Your average amount value. You can use a value across your customer base, or segment based on customer type, country, etc. - """ - maximum_amount: NotRequired[int] - """ - The maximum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. - """ - minimum_amount: NotRequired[int] - """ - The lowest or minimum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. - """ - purchase_interval: NotRequired[Literal["day", "month", "week", "year"]] - """ - Interval at which the customer is making purchases - """ - purchase_interval_count: NotRequired[int] - """ - The number of `purchase_interval` between charges - """ - - class UpdateParamsPaymentSettingsPaymentMethodOptionsKlarnaSubscription( - TypedDict, - ): - interval: Literal["day", "month", "week", "year"] - """ - Unit of time between subscription charges. - """ - interval_count: NotRequired[int] - """ - The number of intervals (specified in the `interval` attribute) between subscription charges. For example, `interval=month` and `interval_count=3` charges every 3 months. - """ - name: NotRequired[str] - """ - Name for subscription. - """ - next_billing: NotRequired[ - "OrderService.UpdateParamsPaymentSettingsPaymentMethodOptionsKlarnaSubscriptionNextBilling" - ] - """ - Describes the upcoming charge for this subscription. - """ - reference: str - """ - A non-customer-facing reference to correlate subscription charges in the Klarna app. Use a value that persists across subscription charges. - """ - - class UpdateParamsPaymentSettingsPaymentMethodOptionsKlarnaSubscriptionNextBilling( - TypedDict, - ): - amount: int - """ - The amount of the next charge for the subscription. - """ - date: str - """ - The date of the next charge for the subscription in YYYY-MM-DD format. - """ - - class UpdateParamsPaymentSettingsPaymentMethodOptionsLink(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds are captured from the customer's account. - - If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. - """ - persistent_token: NotRequired[str] - """ - [Deprecated] This is a legacy parameter that no longer has any function. - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class UpdateParamsPaymentSettingsPaymentMethodOptionsOxxo(TypedDict): - expires_after_days: NotRequired[int] - """ - The number of calendar days before an OXXO voucher expires. For example, if you create an OXXO voucher on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time. - """ - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class UpdateParamsPaymentSettingsPaymentMethodOptionsP24(TypedDict): - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - tos_shown_and_accepted: NotRequired[bool] - """ - Confirm that the payer has accepted the P24 terms and conditions. - """ - - class UpdateParamsPaymentSettingsPaymentMethodOptionsPaypal(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds will be captured from the customer's account. - """ - line_items: NotRequired[ - List[ - "OrderService.UpdateParamsPaymentSettingsPaymentMethodOptionsPaypalLineItem" - ] - ] - """ - The line items purchased by the customer. - """ - preferred_locale: NotRequired[ - Literal[ - "cs-CZ", - "da-DK", - "de-AT", - "de-DE", - "de-LU", - "el-GR", - "en-GB", - "en-US", - "es-ES", - "fi-FI", - "fr-BE", - "fr-FR", - "fr-LU", - "hu-HU", - "it-IT", - "nl-BE", - "nl-NL", - "pl-PL", - "pt-PT", - "sk-SK", - "sv-SE", - ] - ] - """ - [Preferred locale](https://stripe.com/docs/payments/paypal/supported-locales) of the PayPal checkout page that the customer is redirected to. - """ - reference: NotRequired[str] - """ - A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. - """ - reference_id: NotRequired[str] - """ - A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. - """ - risk_correlation_id: NotRequired[str] - """ - The risk correlation ID for an on-session payment using a saved PayPal payment method. - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - subsellers: NotRequired[List[str]] - """ - The Stripe connected account IDs of the sellers on the platform for this transaction (optional). Only allowed when [separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) are used. - """ - - class UpdateParamsPaymentSettingsPaymentMethodOptionsPaypalLineItem( - TypedDict, - ): - category: NotRequired[ - Literal["digital_goods", "donation", "physical_goods"] - ] - """ - Type of the line item. - """ - description: NotRequired[str] - """ - Description of the line item. - """ - name: str - """ - Descriptive name of the line item. - """ - quantity: int - """ - Quantity of the line item. Must be a positive number. - """ - sku: NotRequired[str] - """ - Client facing stock keeping unit, article number or similar. - """ - sold_by: NotRequired[str] - """ - The Stripe account ID of the connected account that sells the item. - """ - tax: NotRequired[ - "OrderService.UpdateParamsPaymentSettingsPaymentMethodOptionsPaypalLineItemTax" - ] - """ - The tax information for the line item. - """ - unit_amount: int - """ - Price for a single unit of the line item in minor units. Cannot be a negative number. - """ - - class UpdateParamsPaymentSettingsPaymentMethodOptionsPaypalLineItemTax( - TypedDict, - ): - amount: int - """ - The tax for a single unit of the line item in minor units. Cannot be a negative number. - """ - behavior: Literal["exclusive", "inclusive"] - """ - The tax behavior for the line item. - """ - - class UpdateParamsPaymentSettingsPaymentMethodOptionsSepaDebit(TypedDict): - mandate_options: NotRequired[ - "OrderService.UpdateParamsPaymentSettingsPaymentMethodOptionsSepaDebitMandateOptions" - ] - """ - Additional fields for Mandate creation - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - target_date: NotRequired[str] - """ - Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. - """ - - class UpdateParamsPaymentSettingsPaymentMethodOptionsSepaDebitMandateOptions( - TypedDict, - ): - reference_prefix: NotRequired["Literal['']|str"] - """ - Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'. - """ - - class UpdateParamsPaymentSettingsPaymentMethodOptionsSofort(TypedDict): - preferred_language: NotRequired[ - "Literal['']|Literal['de', 'en', 'es', 'fr', 'it', 'nl', 'pl']" - ] - """ - Language shown to the payer on redirect. - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class UpdateParamsPaymentSettingsPaymentMethodOptionsWechatPay(TypedDict): - app_id: NotRequired[str] - """ - The app ID registered with WeChat Pay. Only required when client is ios or android. - """ - client: NotRequired[Literal["android", "ios", "web"]] - """ - The client type that the end customer will pay from - """ - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class UpdateParamsPaymentSettingsTransferData(TypedDict): - amount: NotRequired[int] - """ - The amount that will be transferred automatically when the order is paid. If no amount is set, the full amount is transferred. There cannot be any line items with recurring prices when using this field. - """ - destination: str - """ - ID of the Connected account receiving the transfer. - """ - - class UpdateParamsShippingCost(TypedDict): - shipping_rate: NotRequired[str] - """ - The ID of the shipping rate to use for this order. - """ - shipping_rate_data: NotRequired[ - "OrderService.UpdateParamsShippingCostShippingRateData" - ] - """ - Parameters to create a new ad-hoc shipping rate for this order. - """ - - class UpdateParamsShippingCostShippingRateData(TypedDict): - delivery_estimate: NotRequired[ - "OrderService.UpdateParamsShippingCostShippingRateDataDeliveryEstimate" - ] - """ - The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions. - """ - display_name: str - """ - The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions. - """ - fixed_amount: NotRequired[ - "OrderService.UpdateParamsShippingCostShippingRateDataFixedAmount" - ] - """ - Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - tax_behavior: NotRequired[ - Literal["exclusive", "inclusive", "unspecified"] - ] - """ - Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. - """ - tax_code: NotRequired[str] - """ - A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`. - """ - type: NotRequired[Literal["fixed_amount"]] - """ - The type of calculation to use on the shipping rate. - """ - - class UpdateParamsShippingCostShippingRateDataDeliveryEstimate(TypedDict): - maximum: NotRequired[ - "OrderService.UpdateParamsShippingCostShippingRateDataDeliveryEstimateMaximum" - ] - """ - The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite. - """ - minimum: NotRequired[ - "OrderService.UpdateParamsShippingCostShippingRateDataDeliveryEstimateMinimum" - ] - """ - The lower bound of the estimated range. If empty, represents no lower bound. - """ - - class UpdateParamsShippingCostShippingRateDataDeliveryEstimateMaximum( - TypedDict, - ): - unit: Literal["business_day", "day", "hour", "month", "week"] - """ - A unit of time. - """ - value: int - """ - Must be greater than 0. - """ - - class UpdateParamsShippingCostShippingRateDataDeliveryEstimateMinimum( - TypedDict, - ): - unit: Literal["business_day", "day", "hour", "month", "week"] - """ - A unit of time. - """ - value: int - """ - Must be greater than 0. - """ - - class UpdateParamsShippingCostShippingRateDataFixedAmount(TypedDict): - amount: int - """ - A non-negative integer in cents representing how much to charge. - """ - 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). - """ - currency_options: NotRequired[ - Dict[ - str, - "OrderService.UpdateParamsShippingCostShippingRateDataFixedAmountCurrencyOptions", - ] - ] - """ - Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). - """ - - class UpdateParamsShippingCostShippingRateDataFixedAmountCurrencyOptions( - TypedDict, - ): - amount: int - """ - A non-negative integer in cents representing how much to charge. - """ - tax_behavior: NotRequired[ - Literal["exclusive", "inclusive", "unspecified"] - ] - """ - Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. - """ - - class UpdateParamsShippingDetails(TypedDict): - address: "OrderService.UpdateParamsShippingDetailsAddress" - """ - The shipping address for the order. - """ - name: str - """ - The name of the recipient of the order. - """ - phone: NotRequired["Literal['']|str"] - """ - The phone number (including extension) for the recipient of the order. - """ - - class UpdateParamsShippingDetailsAddress(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/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 UpdateParamsTaxDetails(TypedDict): - tax_exempt: NotRequired[ - "Literal['']|Literal['exempt', 'none', 'reverse']" - ] - """ - The purchaser's tax exemption status. One of `none`, `exempt`, or `reverse`. - """ - tax_ids: NotRequired[List["OrderService.UpdateParamsTaxDetailsTaxId"]] - """ - The purchaser's tax IDs to be used for this order. - """ - - class UpdateParamsTaxDetailsTaxId(TypedDict): - type: Literal[ - "ad_nrt", - "ae_trn", - "al_tin", - "am_tin", - "ao_tin", - "ar_cuit", - "au_abn", - "au_arn", - "aw_tin", - "az_tin", - "ba_tin", - "bb_tin", - "bd_bin", - "bf_ifu", - "bg_uic", - "bh_vat", - "bj_ifu", - "bo_tin", - "br_cnpj", - "br_cpf", - "bs_tin", - "by_tin", - "ca_bn", - "ca_gst_hst", - "ca_pst_bc", - "ca_pst_mb", - "ca_pst_sk", - "ca_qst", - "cd_nif", - "ch_uid", - "ch_vat", - "cl_tin", - "cm_niu", - "cn_tin", - "co_nit", - "cr_tin", - "cv_nif", - "de_stn", - "do_rcn", - "ec_ruc", - "eg_tin", - "es_cif", - "et_tin", - "eu_oss_vat", - "eu_vat", - "gb_vat", - "ge_vat", - "gn_nif", - "hk_br", - "hr_oib", - "hu_tin", - "id_npwp", - "il_vat", - "in_gst", - "is_vat", - "jp_cn", - "jp_rn", - "jp_trn", - "ke_pin", - "kg_tin", - "kh_tin", - "kr_brn", - "kz_bin", - "la_tin", - "li_uid", - "li_vat", - "ma_vat", - "md_vat", - "me_pib", - "mk_vat", - "mr_nif", - "mx_rfc", - "my_frp", - "my_itn", - "my_sst", - "ng_tin", - "no_vat", - "no_voec", - "np_pan", - "nz_gst", - "om_vat", - "pe_ruc", - "ph_tin", - "ro_tin", - "rs_pib", - "ru_inn", - "ru_kpp", - "sa_vat", - "sg_gst", - "sg_uen", - "si_tin", - "sn_ninea", - "sr_fin", - "sv_nit", - "th_vat", - "tj_tin", - "tr_tin", - "tw_vat", - "tz_vat", - "ua_vat", - "ug_tin", - "us_ein", - "uy_ruc", - "uz_tin", - "uz_vat", - "ve_rif", - "vn_tin", - "za_vat", - "zm_tin", - "zw_tin", - ] - """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `al_tin`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `aw_tin`, `az_tin`, `ba_tin`, `bb_tin`, `bd_bin`, `bf_ifu`, `bg_uic`, `bh_vat`, `bj_ifu`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cm_niu`, `cn_tin`, `co_nit`, `cr_tin`, `cv_nif`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `et_tin`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kg_tin`, `kh_tin`, `kr_brn`, `kz_bin`, `la_tin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin` - """ - value: str - """ - Value of the tax ID. - """ - def list( self, - params: Optional["OrderService.ListParams"] = None, + params: Optional["OrderListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[Order]: """ @@ -2852,7 +45,7 @@ def list( async def list_async( self, - params: Optional["OrderService.ListParams"] = None, + params: Optional["OrderListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[Order]: """ @@ -2871,7 +64,7 @@ async def list_async( def create( self, - params: "OrderService.CreateParams", + params: "OrderCreateParams", options: Optional[RequestOptions] = None, ) -> Order: """ @@ -2890,7 +83,7 @@ def create( async def create_async( self, - params: "OrderService.CreateParams", + params: "OrderCreateParams", options: Optional[RequestOptions] = None, ) -> Order: """ @@ -2910,7 +103,7 @@ async def create_async( def retrieve( self, id: str, - params: Optional["OrderService.RetrieveParams"] = None, + params: Optional["OrderRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Order: """ @@ -2930,7 +123,7 @@ def retrieve( async def retrieve_async( self, id: str, - params: Optional["OrderService.RetrieveParams"] = None, + params: Optional["OrderRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Order: """ @@ -2950,7 +143,7 @@ async def retrieve_async( def update( self, id: str, - params: Optional["OrderService.UpdateParams"] = None, + params: Optional["OrderUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> Order: """ @@ -2970,7 +163,7 @@ def update( async def update_async( self, id: str, - params: Optional["OrderService.UpdateParams"] = None, + params: Optional["OrderUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> Order: """ @@ -2990,7 +183,7 @@ async def update_async( def cancel( self, id: str, - params: Optional["OrderService.CancelParams"] = None, + params: Optional["OrderCancelParams"] = None, options: Optional[RequestOptions] = None, ) -> Order: """ @@ -3010,7 +203,7 @@ def cancel( async def cancel_async( self, id: str, - params: Optional["OrderService.CancelParams"] = None, + params: Optional["OrderCancelParams"] = None, options: Optional[RequestOptions] = None, ) -> Order: """ @@ -3030,7 +223,7 @@ async def cancel_async( def reopen( self, id: str, - params: Optional["OrderService.ReopenParams"] = None, + params: Optional["OrderReopenParams"] = None, options: Optional[RequestOptions] = None, ) -> Order: """ @@ -3050,7 +243,7 @@ def reopen( async def reopen_async( self, id: str, - params: Optional["OrderService.ReopenParams"] = None, + params: Optional["OrderReopenParams"] = None, options: Optional[RequestOptions] = None, ) -> Order: """ @@ -3070,7 +263,7 @@ async def reopen_async( def submit( self, id: str, - params: "OrderService.SubmitParams", + params: "OrderSubmitParams", options: Optional[RequestOptions] = None, ) -> Order: """ @@ -3090,7 +283,7 @@ def submit( async def submit_async( self, id: str, - params: "OrderService.SubmitParams", + params: "OrderSubmitParams", options: Optional[RequestOptions] = None, ) -> Order: """ diff --git a/stripe/_payment_attempt_record.py b/stripe/_payment_attempt_record.py index 69a2e2bce..6187e36d1 100644 --- a/stripe/_payment_attempt_record.py +++ b/stripe/_payment_attempt_record.py @@ -3,14 +3,19 @@ from stripe._expandable_field import ExpandableField from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource -from stripe._request_options import RequestOptions from stripe._stripe_object import StripeObject from typing import ClassVar, Dict, List, Optional -from typing_extensions import Literal, NotRequired, Unpack, TYPE_CHECKING +from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: from stripe._mandate import Mandate from stripe._payment_method import PaymentMethod + from stripe.params._payment_attempt_record_list_params import ( + PaymentAttemptRecordListParams, + ) + from stripe.params._payment_attempt_record_retrieve_params import ( + PaymentAttemptRecordRetrieveParams, + ) class PaymentAttemptRecord(ListableAPIResource["PaymentAttemptRecord"]): @@ -1998,26 +2003,6 @@ class Address(StripeObject): """ _inner_class_types = {"address": Address} - class ListParams(RequestOptions): - 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. - """ - payment_record: str - """ - The ID of the Payment Record. - """ - - class RetrieveParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - amount: Amount """ A representation of an amount of money, consisting of an amount and a currency. @@ -2105,7 +2090,7 @@ class RetrieveParams(RequestOptions): @classmethod def list( - cls, **params: Unpack["PaymentAttemptRecord.ListParams"] + cls, **params: Unpack["PaymentAttemptRecordListParams"] ) -> ListObject["PaymentAttemptRecord"]: """ List all the Payment Attempt Records attached to the specified Payment Record. @@ -2125,7 +2110,7 @@ def list( @classmethod async def list_async( - cls, **params: Unpack["PaymentAttemptRecord.ListParams"] + cls, **params: Unpack["PaymentAttemptRecordListParams"] ) -> ListObject["PaymentAttemptRecord"]: """ List all the Payment Attempt Records attached to the specified Payment Record. @@ -2145,7 +2130,7 @@ async def list_async( @classmethod def retrieve( - cls, id: str, **params: Unpack["PaymentAttemptRecord.RetrieveParams"] + cls, id: str, **params: Unpack["PaymentAttemptRecordRetrieveParams"] ) -> "PaymentAttemptRecord": """ Retrieves a Payment Attempt Record with the given ID @@ -2156,7 +2141,7 @@ def retrieve( @classmethod async def retrieve_async( - cls, id: str, **params: Unpack["PaymentAttemptRecord.RetrieveParams"] + cls, id: str, **params: Unpack["PaymentAttemptRecordRetrieveParams"] ) -> "PaymentAttemptRecord": """ Retrieves a Payment Attempt Record with the given ID diff --git a/stripe/_payment_attempt_record_service.py b/stripe/_payment_attempt_record_service.py index f4ab290de..e379abab8 100644 --- a/stripe/_payment_attempt_record_service.py +++ b/stripe/_payment_attempt_record_service.py @@ -5,34 +5,22 @@ from stripe._request_options import RequestOptions from stripe._stripe_service import StripeService from stripe._util import sanitize_id -from typing import List, Optional, cast -from typing_extensions import NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params._payment_attempt_record_list_params import ( + PaymentAttemptRecordListParams, + ) + from stripe.params._payment_attempt_record_retrieve_params import ( + PaymentAttemptRecordRetrieveParams, + ) -class PaymentAttemptRecordService(StripeService): - class ListParams(TypedDict): - 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. - """ - payment_record: str - """ - The ID of the Payment Record. - """ - - class RetrieveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ +class PaymentAttemptRecordService(StripeService): def list( self, - params: "PaymentAttemptRecordService.ListParams", + params: "PaymentAttemptRecordListParams", options: Optional[RequestOptions] = None, ) -> ListObject[PaymentAttemptRecord]: """ @@ -51,7 +39,7 @@ def list( async def list_async( self, - params: "PaymentAttemptRecordService.ListParams", + params: "PaymentAttemptRecordListParams", options: Optional[RequestOptions] = None, ) -> ListObject[PaymentAttemptRecord]: """ @@ -71,7 +59,7 @@ async def list_async( def retrieve( self, id: str, - params: Optional["PaymentAttemptRecordService.RetrieveParams"] = None, + params: Optional["PaymentAttemptRecordRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> PaymentAttemptRecord: """ @@ -91,7 +79,7 @@ def retrieve( async def retrieve_async( self, id: str, - params: Optional["PaymentAttemptRecordService.RetrieveParams"] = None, + params: Optional["PaymentAttemptRecordRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> PaymentAttemptRecord: """ diff --git a/stripe/_payment_intent.py b/stripe/_payment_intent.py index fe8befc67..9f81c0869 100644 --- a/stripe/_payment_intent.py +++ b/stripe/_payment_intent.py @@ -5,7 +5,6 @@ from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource from stripe._nested_resource_class_methods import nested_resource_class_methods -from stripe._request_options import RequestOptions from stripe._search_result_object import SearchResultObject from stripe._searchable_api_resource import SearchableAPIResource from stripe._stripe_object import StripeObject @@ -23,13 +22,7 @@ cast, overload, ) -from typing_extensions import ( - Literal, - NotRequired, - TypedDict, - Unpack, - TYPE_CHECKING, -) +from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: from stripe._account import Account @@ -45,6 +38,48 @@ from stripe._review import Review from stripe._setup_intent import SetupIntent from stripe._source import Source + from stripe.params._payment_intent_apply_customer_balance_params import ( + PaymentIntentApplyCustomerBalanceParams, + ) + from stripe.params._payment_intent_cancel_params import ( + PaymentIntentCancelParams, + ) + from stripe.params._payment_intent_capture_params import ( + PaymentIntentCaptureParams, + ) + from stripe.params._payment_intent_confirm_params import ( + PaymentIntentConfirmParams, + ) + from stripe.params._payment_intent_create_params import ( + PaymentIntentCreateParams, + ) + from stripe.params._payment_intent_decrement_authorization_params import ( + PaymentIntentDecrementAuthorizationParams, + ) + from stripe.params._payment_intent_increment_authorization_params import ( + PaymentIntentIncrementAuthorizationParams, + ) + from stripe.params._payment_intent_list_amount_details_line_items_params import ( + PaymentIntentListAmountDetailsLineItemsParams, + ) + from stripe.params._payment_intent_list_params import ( + PaymentIntentListParams, + ) + from stripe.params._payment_intent_modify_params import ( + PaymentIntentModifyParams, + ) + from stripe.params._payment_intent_retrieve_params import ( + PaymentIntentRetrieveParams, + ) + from stripe.params._payment_intent_search_params import ( + PaymentIntentSearchParams, + ) + from stripe.params._payment_intent_trigger_action_params import ( + PaymentIntentTriggerActionParams, + ) + from stripe.params._payment_intent_verify_microdeposits_params import ( + PaymentIntentVerifyMicrodepositsParams, + ) @nested_resource_class_methods("amount_details_line_item") @@ -3332,14319 +3367,154 @@ class TransferData(StripeObject): The account (if any) that the payment is attributed to for tax reporting, and where funds from the payment are transferred to after payment success. """ - class ApplyCustomerBalanceParams(RequestOptions): - amount: NotRequired[int] - """ - Amount that you intend to apply to this PaymentIntent from the customer's cash balance. If the PaymentIntent was created by an Invoice, the full amount of the PaymentIntent is applied regardless of this parameter. - - A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (for example, 100 cents to charge 1 USD or 100 to charge 100 JPY, a zero-decimal currency). The maximum amount is the amount of the PaymentIntent. - - When you omit the amount, it defaults to the remaining amount requested on the PaymentIntent. - """ - currency: NotRequired[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. - """ - - class CancelParams(RequestOptions): - cancellation_reason: NotRequired[ - Literal[ - "abandoned", "duplicate", "fraudulent", "requested_by_customer" - ] - ] - """ - Reason for canceling this PaymentIntent. Possible values are: `duplicate`, `fraudulent`, `requested_by_customer`, or `abandoned` - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class CaptureParams(RequestOptions): - amount_details: NotRequired["PaymentIntent.CaptureParamsAmountDetails"] - """ - Provides industry-specific information about the amount. - """ - amount_to_capture: NotRequired[int] - """ - The amount to capture from the PaymentIntent, which must be less than or equal to the original amount. Defaults to the full `amount_capturable` if it's not provided. - """ - application_fee_amount: NotRequired[int] - """ - The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total amount captured. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - final_capture: NotRequired[bool] - """ - Defaults to `true`. When capturing a PaymentIntent, setting `final_capture` to `false` notifies Stripe to not release the remaining uncaptured funds to make sure that they're captured in future requests. You can only use this setting when [multicapture](https://stripe.com/docs/payments/multicapture) is available for PaymentIntents. - """ - hooks: NotRequired["PaymentIntent.CaptureParamsHooks"] - """ - Automations to be run during the PaymentIntent lifecycle - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - payment_details: NotRequired[ - "Literal['']|PaymentIntent.CaptureParamsPaymentDetails" - ] - """ - Provides industry-specific information about the charge. - """ - statement_descriptor: NotRequired[str] - """ - Text that appears on the customer's statement as the statement descriptor for a non-card charge. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see [the Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors). - - Setting this value for a card charge returns an error. For card charges, set the [statement_descriptor_suffix](https://docs.stripe.com/get-started/account/statement-descriptors#dynamic) instead. - """ - statement_descriptor_suffix: NotRequired[str] - """ - Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. - """ - transfer_data: NotRequired["PaymentIntent.CaptureParamsTransferData"] - """ - The parameters that you can use to automatically create a transfer after the payment - is captured. Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). - """ - - class CaptureParamsAmountDetails(TypedDict): - discount_amount: NotRequired["Literal['']|int"] - """ - The total discount applied on the transaction. - """ - line_items: NotRequired[ - "Literal['']|List[PaymentIntent.CaptureParamsAmountDetailsLineItem]" - ] - """ - A list of line items, each containing information about a product in the PaymentIntent. There is a maximum of 100 line items. - """ - shipping: NotRequired[ - "Literal['']|PaymentIntent.CaptureParamsAmountDetailsShipping" - ] - """ - Contains information about the shipping portion of the amount. - """ - tax: NotRequired[ - "Literal['']|PaymentIntent.CaptureParamsAmountDetailsTax" + amount: int + """ + Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). + """ + amount_capturable: int + """ + Amount that can be captured from this PaymentIntent. + """ + amount_details: Optional[AmountDetails] + amount_received: int + """ + Amount that this PaymentIntent collects. + """ + application: Optional[ExpandableField["Application"]] + """ + ID of the Connect application that created the PaymentIntent. + """ + application_fee_amount: Optional[int] + """ + The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total amount captured. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + """ + automatic_payment_methods: Optional[AutomaticPaymentMethods] + """ + Settings to configure compatible payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods) + """ + canceled_at: Optional[int] + """ + Populated when `status` is `canceled`, this is the time at which the PaymentIntent was canceled. Measured in seconds since the Unix epoch. + """ + cancellation_reason: Optional[ + Literal[ + "abandoned", + "automatic", + "duplicate", + "expired", + "failed_invoice", + "fraudulent", + "requested_by_customer", + "void_invoice", ] - """ - Contains information about the tax portion of the amount. - """ + ] + """ + Reason for cancellation of this PaymentIntent, either user-provided (`duplicate`, `fraudulent`, `requested_by_customer`, or `abandoned`) or generated by Stripe internally (`failed_invoice`, `void_invoice`, `automatic`, or `expired`). + """ + capture_method: Literal["automatic", "automatic_async", "manual"] + """ + Controls when the funds will be captured from the customer's account. + """ + client_secret: Optional[str] + """ + The client secret of this PaymentIntent. Used for client-side retrieval using a publishable key. - class CaptureParamsAmountDetailsLineItem(TypedDict): - discount_amount: NotRequired[int] - """ - The amount an item was discounted for. Positive integer. - """ - payment_method_options: NotRequired[ - "PaymentIntent.CaptureParamsAmountDetailsLineItemPaymentMethodOptions" - ] - """ - Payment method-specific information for line items. - """ - product_code: NotRequired[str] - """ - Unique identifier of the product. At most 12 characters long. - """ - product_name: str - """ - Name of the product. At most 100 characters long. - """ - quantity: int - """ - Number of items of the product. Positive integer. - """ - tax: NotRequired["PaymentIntent.CaptureParamsAmountDetailsLineItemTax"] - """ - Contains information about the tax on the item. - """ - unit_cost: int - """ - Cost of the product. Non-negative integer. - """ - unit_of_measure: NotRequired[str] - """ - A unit of measure for the line item, such as gallons, feet, meters, etc. - """ + The client secret can be used to complete a payment from your frontend. It should not be stored, logged, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret. - class CaptureParamsAmountDetailsLineItemPaymentMethodOptions(TypedDict): - card: NotRequired[ - "PaymentIntent.CaptureParamsAmountDetailsLineItemPaymentMethodOptionsCard" - ] - """ - This sub-hash contains line item details that are specific to `card` payment method." - """ - card_present: NotRequired[ - "PaymentIntent.CaptureParamsAmountDetailsLineItemPaymentMethodOptionsCardPresent" - ] - """ - This sub-hash contains line item details that are specific to `card_present` payment method." - """ - klarna: NotRequired[ - "PaymentIntent.CaptureParamsAmountDetailsLineItemPaymentMethodOptionsKlarna" - ] - """ - This sub-hash contains line item details that are specific to `klarna` payment method." - """ - paypal: NotRequired[ - "PaymentIntent.CaptureParamsAmountDetailsLineItemPaymentMethodOptionsPaypal" - ] - """ - This sub-hash contains line item details that are specific to `paypal` payment method." - """ + Refer to our docs to [accept a payment](https://stripe.com/docs/payments/accept-a-payment?ui=elements) and learn about how `client_secret` should be handled. + """ + confirmation_method: Literal["automatic", "manual"] + """ + Describes whether we can confirm this PaymentIntent automatically, or if it requires customer action to confirm the payment. + """ + 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). + """ + customer: Optional[ExpandableField["Customer"]] + """ + ID of the Customer this PaymentIntent belongs to, if one exists. - class CaptureParamsAmountDetailsLineItemPaymentMethodOptionsCard( - TypedDict - ): - commodity_code: NotRequired[str] - """ - Identifier that categorizes the items being purchased using a standardized commodity scheme such as (but not limited to) UNSPSC, NAICS, NAPCS, etc. - """ + Payment methods attached to other Customers cannot be used with this PaymentIntent. - class CaptureParamsAmountDetailsLineItemPaymentMethodOptionsCardPresent( - TypedDict, - ): - commodity_code: NotRequired[str] - """ - Identifier that categorizes the items being purchased using a standardized commodity scheme such as (but not limited to) UNSPSC, NAICS, NAPCS, etc. - """ + If [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) is set and this PaymentIntent's payment method is not `card_present`, then the payment method attaches to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + """ + customer_account: Optional[str] + """ + ID of the Account this PaymentIntent belongs to, if one exists. - class CaptureParamsAmountDetailsLineItemPaymentMethodOptionsKlarna( - TypedDict, - ): - image_url: NotRequired[str] - """ - URL to an image for the product. Max length, 4096 characters. - """ - product_url: NotRequired[str] - """ - URL to the product page. Max length, 4096 characters. - """ - subscription_reference: NotRequired[str] - """ - Reference for the subscription this line item is for. - """ + Payment methods attached to other Accounts cannot be used with this PaymentIntent. - class CaptureParamsAmountDetailsLineItemPaymentMethodOptionsPaypal( - TypedDict, - ): - category: NotRequired[ - Literal["digital_goods", "donation", "physical_goods"] - ] - """ - Type of the line item. - """ - description: NotRequired[str] - """ - Description of the line item. - """ - sold_by: NotRequired[str] - """ - The Stripe account ID of the connected account that sells the item. - """ - - class CaptureParamsAmountDetailsLineItemTax(TypedDict): - total_tax_amount: int - """ - The total tax on an item. Non-negative integer. - """ - - class CaptureParamsAmountDetailsShipping(TypedDict): - amount: NotRequired["Literal['']|int"] - """ - Portion of the amount that is for shipping. - """ - from_postal_code: NotRequired["Literal['']|str"] - """ - The postal code that represents the shipping source. - """ - to_postal_code: NotRequired["Literal['']|str"] - """ - The postal code that represents the shipping destination. - """ - - class CaptureParamsAmountDetailsTax(TypedDict): - total_tax_amount: int - """ - Total portion of the amount that is for tax. - """ - - class CaptureParamsHooks(TypedDict): - inputs: NotRequired["PaymentIntent.CaptureParamsHooksInputs"] - """ - Arguments passed in automations - """ - - class CaptureParamsHooksInputs(TypedDict): - tax: NotRequired["PaymentIntent.CaptureParamsHooksInputsTax"] - """ - Tax arguments for automations - """ - - class CaptureParamsHooksInputsTax(TypedDict): - calculation: Union[Literal[""], str] - """ - The [TaxCalculation](https://stripe.com/docs/api/tax/calculations) id - """ - - class CaptureParamsPaymentDetails(TypedDict): - car_rental: NotRequired[ - "PaymentIntent.CaptureParamsPaymentDetailsCarRental" - ] - """ - Car rental details for this PaymentIntent. - """ - customer_reference: NotRequired["Literal['']|str"] - """ - Some customers might be required by their company or organization to provide this information. If so, provide this value. Otherwise you can ignore this field. - """ - event_details: NotRequired[ - "PaymentIntent.CaptureParamsPaymentDetailsEventDetails" - ] - """ - Event details for this PaymentIntent - """ - flight: NotRequired["PaymentIntent.CaptureParamsPaymentDetailsFlight"] - """ - Flight reservation details for this PaymentIntent - """ - lodging: NotRequired[ - "PaymentIntent.CaptureParamsPaymentDetailsLodging" - ] - """ - Lodging reservation details for this PaymentIntent - """ - order_reference: NotRequired["Literal['']|str"] - """ - A unique value assigned by the business to identify the transaction. - """ - subscription: NotRequired[ - "PaymentIntent.CaptureParamsPaymentDetailsSubscription" - ] - """ - Subscription details for this PaymentIntent - """ - - class CaptureParamsPaymentDetailsCarRental(TypedDict): - affiliate: NotRequired[ - "PaymentIntent.CaptureParamsPaymentDetailsCarRentalAffiliate" - ] - """ - Affiliate details for this purchase. - """ - booking_number: str - """ - The booking number associated with the car rental. - """ - car_class_code: NotRequired[str] - """ - Class code of the car. - """ - car_make: NotRequired[str] - """ - Make of the car. - """ - car_model: NotRequired[str] - """ - Model of the car. - """ - company: NotRequired[str] - """ - The name of the rental car company. - """ - customer_service_phone_number: NotRequired[str] - """ - The customer service phone number of the car rental company. - """ - days_rented: int - """ - Number of days the car is being rented. - """ - delivery: NotRequired[ - "PaymentIntent.CaptureParamsPaymentDetailsCarRentalDelivery" - ] - """ - Delivery details for this purchase. - """ - distance: NotRequired[ - "PaymentIntent.CaptureParamsPaymentDetailsCarRentalDistance" - ] - """ - The details of the distance traveled during the rental period. - """ - drivers: NotRequired[ - List["PaymentIntent.CaptureParamsPaymentDetailsCarRentalDriver"] - ] - """ - The details of the passengers in the travel reservation - """ - extra_charges: NotRequired[ - List[ - Literal[ - "extra_mileage", - "gas", - "late_return", - "one_way_service", - "parking_violation", - ] - ] - ] - """ - List of additional charges being billed. - """ - no_show: NotRequired[bool] - """ - Indicates if the customer did not keep nor cancel their booking. - """ - pickup_address: NotRequired[ - "PaymentIntent.CaptureParamsPaymentDetailsCarRentalPickupAddress" - ] - """ - Car pick-up address. - """ - pickup_at: int - """ - Car pick-up time. Measured in seconds since the Unix epoch. - """ - pickup_location_name: NotRequired[str] - """ - Name of the pickup location. - """ - rate_amount: NotRequired[int] - """ - Rental rate. - """ - rate_interval: NotRequired[Literal["day", "month", "week"]] - """ - The frequency at which the rate amount is applied. One of `day`, `week` or `month` - """ - renter_name: NotRequired[str] - """ - The name of the person or entity renting the car. - """ - return_address: NotRequired[ - "PaymentIntent.CaptureParamsPaymentDetailsCarRentalReturnAddress" - ] - """ - Car return address. - """ - return_at: int - """ - Car return time. Measured in seconds since the Unix epoch. - """ - return_location_name: NotRequired[str] - """ - Name of the return location. - """ - tax_exempt: NotRequired[bool] - """ - Indicates whether the goods or services are tax-exempt or tax is not collected. - """ - vehicle_identification_number: NotRequired[str] - """ - The vehicle identification number. - """ - - class CaptureParamsPaymentDetailsCarRentalAffiliate(TypedDict): - name: str - """ - The name of the affiliate that originated the purchase. - """ - - class CaptureParamsPaymentDetailsCarRentalDelivery(TypedDict): - mode: NotRequired[Literal["email", "phone", "pickup", "post"]] - """ - The delivery method for the payment - """ - recipient: NotRequired[ - "PaymentIntent.CaptureParamsPaymentDetailsCarRentalDeliveryRecipient" - ] - """ - Details of the recipient. - """ - - class CaptureParamsPaymentDetailsCarRentalDeliveryRecipient(TypedDict): - email: NotRequired[str] - """ - The email of the recipient the ticket is delivered to. - """ - name: NotRequired[str] - """ - The name of the recipient the ticket is delivered to. - """ - phone: NotRequired[str] - """ - The phone number of the recipient the ticket is delivered to. - """ - - class CaptureParamsPaymentDetailsCarRentalDistance(TypedDict): - amount: NotRequired[int] - """ - Distance traveled. - """ - unit: NotRequired[Literal["kilometers", "miles"]] - """ - Unit of measurement for the distance traveled. One of `miles` or `kilometers`. - """ - - class CaptureParamsPaymentDetailsCarRentalDriver(TypedDict): - driver_identification_number: NotRequired[str] - """ - Driver's identification number. - """ - driver_tax_number: NotRequired[str] - """ - Driver's tax number. - """ - name: str - """ - Full name of the person or entity on the car reservation. - """ - - class CaptureParamsPaymentDetailsCarRentalPickupAddress(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. - """ - - class CaptureParamsPaymentDetailsCarRentalReturnAddress(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. - """ - - class CaptureParamsPaymentDetailsEventDetails(TypedDict): - access_controlled_venue: NotRequired[bool] - """ - Indicates if the tickets are digitally checked when entering the venue. - """ - address: NotRequired[ - "PaymentIntent.CaptureParamsPaymentDetailsEventDetailsAddress" - ] - """ - The event location's address. - """ - affiliate: NotRequired[ - "PaymentIntent.CaptureParamsPaymentDetailsEventDetailsAffiliate" - ] - """ - Affiliate details for this purchase. - """ - company: NotRequired[str] - """ - The name of the company - """ - delivery: NotRequired[ - "PaymentIntent.CaptureParamsPaymentDetailsEventDetailsDelivery" - ] - """ - Delivery details for this purchase. - """ - ends_at: NotRequired[int] - """ - Event end time. Measured in seconds since the Unix epoch. - """ - genre: NotRequired[str] - """ - Type of the event entertainment (concert, sports event etc) - """ - name: str - """ - The name of the event. - """ - starts_at: NotRequired[int] - """ - Event start time. Measured in seconds since the Unix epoch. - """ - - class CaptureParamsPaymentDetailsEventDetailsAddress(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. - """ - - class CaptureParamsPaymentDetailsEventDetailsAffiliate(TypedDict): - name: str - """ - The name of the affiliate that originated the purchase. - """ - - class CaptureParamsPaymentDetailsEventDetailsDelivery(TypedDict): - mode: NotRequired[Literal["email", "phone", "pickup", "post"]] - """ - The delivery method for the payment - """ - recipient: NotRequired[ - "PaymentIntent.CaptureParamsPaymentDetailsEventDetailsDeliveryRecipient" - ] - """ - Details of the recipient. - """ - - class CaptureParamsPaymentDetailsEventDetailsDeliveryRecipient(TypedDict): - email: NotRequired[str] - """ - The email of the recipient the ticket is delivered to. - """ - name: NotRequired[str] - """ - The name of the recipient the ticket is delivered to. - """ - phone: NotRequired[str] - """ - The phone number of the recipient the ticket is delivered to. - """ - - class CaptureParamsPaymentDetailsFlight(TypedDict): - affiliate: NotRequired[ - "PaymentIntent.CaptureParamsPaymentDetailsFlightAffiliate" - ] - """ - Affiliate details for this purchase. - """ - agency_number: NotRequired[str] - """ - The agency number (i.e. International Air Transport Association (IATA) agency number) of the travel agency that made the booking. - """ - carrier: NotRequired[str] - """ - The International Air Transport Association (IATA) carrier code of the carrier that issued the ticket. - """ - delivery: NotRequired[ - "PaymentIntent.CaptureParamsPaymentDetailsFlightDelivery" - ] - """ - Delivery details for this purchase. - """ - passenger_name: NotRequired[str] - """ - The name of the person or entity on the reservation. - """ - passengers: NotRequired[ - List["PaymentIntent.CaptureParamsPaymentDetailsFlightPassenger"] - ] - """ - The details of the passengers in the travel reservation. - """ - segments: List[ - "PaymentIntent.CaptureParamsPaymentDetailsFlightSegment" - ] - """ - The individual flight segments associated with the trip. - """ - ticket_number: NotRequired[str] - """ - The ticket number associated with the travel reservation. - """ - - class CaptureParamsPaymentDetailsFlightAffiliate(TypedDict): - name: str - """ - The name of the affiliate that originated the purchase. - """ - - class CaptureParamsPaymentDetailsFlightDelivery(TypedDict): - mode: NotRequired[Literal["email", "phone", "pickup", "post"]] - """ - The delivery method for the payment - """ - recipient: NotRequired[ - "PaymentIntent.CaptureParamsPaymentDetailsFlightDeliveryRecipient" - ] - """ - Details of the recipient. - """ - - class CaptureParamsPaymentDetailsFlightDeliveryRecipient(TypedDict): - email: NotRequired[str] - """ - The email of the recipient the ticket is delivered to. - """ - name: NotRequired[str] - """ - The name of the recipient the ticket is delivered to. - """ - phone: NotRequired[str] - """ - The phone number of the recipient the ticket is delivered to. - """ - - class CaptureParamsPaymentDetailsFlightPassenger(TypedDict): - name: str - """ - Full name of the person or entity on the flight reservation. - """ - - class CaptureParamsPaymentDetailsFlightSegment(TypedDict): - amount: NotRequired[int] - """ - The flight segment amount. - """ - arrival_airport: NotRequired[str] - """ - The International Air Transport Association (IATA) airport code for the arrival airport. - """ - arrives_at: NotRequired[int] - """ - The arrival time for the flight segment. Measured in seconds since the Unix epoch. - """ - carrier: NotRequired[str] - """ - The International Air Transport Association (IATA) carrier code of the carrier operating the flight segment. - """ - departs_at: int - """ - The departure time for the flight segment. Measured in seconds since the Unix epoch. - """ - departure_airport: NotRequired[str] - """ - The International Air Transport Association (IATA) airport code for the departure airport. - """ - flight_number: NotRequired[str] - """ - The flight number associated with the segment - """ - service_class: NotRequired[ - Literal["business", "economy", "first", "premium_economy"] - ] - """ - The fare class for the segment. - """ - - class CaptureParamsPaymentDetailsLodging(TypedDict): - address: NotRequired[ - "PaymentIntent.CaptureParamsPaymentDetailsLodgingAddress" - ] - """ - The lodging location's address. - """ - adults: NotRequired[int] - """ - The number of adults on the booking - """ - affiliate: NotRequired[ - "PaymentIntent.CaptureParamsPaymentDetailsLodgingAffiliate" - ] - """ - Affiliate details for this purchase. - """ - booking_number: NotRequired[str] - """ - The booking number associated with the lodging reservation. - """ - category: NotRequired[Literal["hotel", "vacation_rental"]] - """ - The lodging category - """ - checkin_at: int - """ - Lodging check-in time. Measured in seconds since the Unix epoch. - """ - checkout_at: int - """ - Lodging check-out time. Measured in seconds since the Unix epoch. - """ - customer_service_phone_number: NotRequired[str] - """ - The customer service phone number of the lodging company. - """ - daily_room_rate_amount: NotRequired[int] - """ - The daily lodging room rate. - """ - delivery: NotRequired[ - "PaymentIntent.CaptureParamsPaymentDetailsLodgingDelivery" - ] - """ - Delivery details for this purchase. - """ - extra_charges: NotRequired[ - List[ - Literal[ - "gift_shop", - "laundry", - "mini_bar", - "other", - "restaurant", - "telephone", - ] - ] - ] - """ - List of additional charges being billed. - """ - fire_safety_act_compliance: NotRequired[bool] - """ - Indicates whether the lodging location is compliant with the Fire Safety Act. - """ - name: NotRequired[str] - """ - The name of the lodging location. - """ - no_show: NotRequired[bool] - """ - Indicates if the customer did not keep their booking while failing to cancel the reservation. - """ - number_of_rooms: NotRequired[int] - """ - The number of rooms on the booking - """ - passengers: NotRequired[ - List["PaymentIntent.CaptureParamsPaymentDetailsLodgingPassenger"] - ] - """ - The details of the passengers in the travel reservation - """ - property_phone_number: NotRequired[str] - """ - The phone number of the lodging location. - """ - room_class: NotRequired[str] - """ - The room class for this purchase. - """ - room_nights: NotRequired[int] - """ - The number of room nights - """ - total_room_tax_amount: NotRequired[int] - """ - The total tax amount associating with the room reservation. - """ - total_tax_amount: NotRequired[int] - """ - The total tax amount - """ - - class CaptureParamsPaymentDetailsLodgingAddress(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. - """ - - class CaptureParamsPaymentDetailsLodgingAffiliate(TypedDict): - name: str - """ - The name of the affiliate that originated the purchase. - """ - - class CaptureParamsPaymentDetailsLodgingDelivery(TypedDict): - mode: NotRequired[Literal["email", "phone", "pickup", "post"]] - """ - The delivery method for the payment - """ - recipient: NotRequired[ - "PaymentIntent.CaptureParamsPaymentDetailsLodgingDeliveryRecipient" - ] - """ - Details of the recipient. - """ - - class CaptureParamsPaymentDetailsLodgingDeliveryRecipient(TypedDict): - email: NotRequired[str] - """ - The email of the recipient the ticket is delivered to. - """ - name: NotRequired[str] - """ - The name of the recipient the ticket is delivered to. - """ - phone: NotRequired[str] - """ - The phone number of the recipient the ticket is delivered to. - """ - - class CaptureParamsPaymentDetailsLodgingPassenger(TypedDict): - name: str - """ - Full name of the person or entity on the lodging reservation. - """ - - class CaptureParamsPaymentDetailsSubscription(TypedDict): - affiliate: NotRequired[ - "PaymentIntent.CaptureParamsPaymentDetailsSubscriptionAffiliate" - ] - """ - Affiliate details for this purchase. - """ - auto_renewal: NotRequired[bool] - """ - Info whether the subscription will be auto renewed upon expiry. - """ - billing_interval: NotRequired[ - "PaymentIntent.CaptureParamsPaymentDetailsSubscriptionBillingInterval" - ] - """ - Subscription billing details for this purchase. - """ - ends_at: NotRequired[int] - """ - Subscription end time. Measured in seconds since the Unix epoch. - """ - name: str - """ - Name of the product on subscription. e.g. Apple Music Subscription - """ - starts_at: NotRequired[int] - """ - Subscription start time. Measured in seconds since the Unix epoch. - """ - - class CaptureParamsPaymentDetailsSubscriptionAffiliate(TypedDict): - name: str - """ - The name of the affiliate that originated the purchase. - """ - - class CaptureParamsPaymentDetailsSubscriptionBillingInterval(TypedDict): - count: int - """ - The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. - """ - interval: Literal["day", "month", "week", "year"] - """ - Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. - """ - - class CaptureParamsTransferData(TypedDict): - amount: NotRequired[int] - """ - The amount that will be transferred automatically when a charge succeeds. - """ - - class ConfirmParams(RequestOptions): - amount_details: NotRequired[ - "Literal['']|PaymentIntent.ConfirmParamsAmountDetails" - ] - """ - Provides industry-specific information about the amount. - """ - application_fee_amount: NotRequired["Literal['']|int"] - """ - The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total amount captured. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). - """ - capture_method: NotRequired[ - Literal["automatic", "automatic_async", "manual"] - ] - """ - Controls when the funds will be captured from the customer's account. - """ - confirmation_token: NotRequired[str] - """ - ID of the ConfirmationToken used to confirm this PaymentIntent. - - If the provided ConfirmationToken contains properties that are also being provided in this request, such as `payment_method`, then the values in this request will take precedence. - """ - error_on_requires_action: NotRequired[bool] - """ - Set to `true` to fail the payment attempt if the PaymentIntent transitions into `requires_action`. This parameter is intended for simpler integrations that do not handle customer actions, like [saving cards without authentication](https://stripe.com/docs/payments/save-card-without-authentication). - """ - excluded_payment_method_types: NotRequired[ - "Literal['']|List[Literal['acss_debit', 'affirm', 'afterpay_clearpay', 'alipay', 'alma', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'billie', 'blik', 'boleto', 'card', 'cashapp', 'crypto', 'customer_balance', 'eps', 'fpx', 'giropay', 'gopay', 'grabpay', 'id_bank_transfer', 'ideal', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'mb_way', 'mobilepay', 'multibanco', 'naver_pay', 'nz_bank_account', 'oxxo', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'paypay', 'payto', 'pix', 'promptpay', 'qris', 'rechnung', 'revolut_pay', 'samsung_pay', 'satispay', 'sepa_debit', 'shopeepay', 'sofort', 'stripe_balance', 'swish', 'twint', 'us_bank_account', 'wechat_pay', 'zip']]" - ] - """ - The list of payment method types to exclude from use with this payment. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - fx_quote: NotRequired[str] - """ - The FX rate in the quote is validated and used to convert the presentment amount to the settlement amount. - """ - hooks: NotRequired["PaymentIntent.ConfirmParamsHooks"] - """ - Automations to be run during the PaymentIntent lifecycle - """ - mandate: NotRequired[str] - """ - ID of the mandate that's used for this payment. - """ - mandate_data: NotRequired[ - "Literal['']|PaymentIntent.ConfirmParamsMandateData" - ] - off_session: NotRequired["bool|Literal['one_off', 'recurring']"] - """ - Set to `true` to indicate that the customer isn't in your checkout flow during this payment attempt and can't authenticate. Use this parameter in scenarios where you collect card details and [charge them later](https://stripe.com/docs/payments/cards/charging-saved-cards). - """ - payment_details: NotRequired[ - "Literal['']|PaymentIntent.ConfirmParamsPaymentDetails" - ] - """ - Provides industry-specific information about the charge. - """ - payment_method: NotRequired[str] - """ - ID of the payment method (a PaymentMethod, Card, or [compatible Source](https://stripe.com/docs/payments/payment-methods/transitioning#compatibility) object) to attach to this PaymentIntent. - If the payment method is attached to a Customer, it must match the [customer](https://stripe.com/docs/api#create_payment_intent-customer) that is set on this PaymentIntent. - """ - payment_method_data: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentMethodData" - ] - """ - If provided, this hash will be used to create a PaymentMethod. The new PaymentMethod will appear - in the [payment_method](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-payment_method) - property on the PaymentIntent. - """ - payment_method_options: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentMethodOptions" - ] - """ - Payment method-specific configuration for this PaymentIntent. - """ - payment_method_types: NotRequired[List[str]] - """ - The list of payment method types (for example, a card) that this PaymentIntent can use. Use `automatic_payment_methods` to manage payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). A list of valid payment method types can be found [here](https://docs.stripe.com/api/payment_methods/object#payment_method_object-type). - """ - radar_options: NotRequired["PaymentIntent.ConfirmParamsRadarOptions"] - """ - Options to configure Radar. Learn more about [Radar Sessions](https://stripe.com/docs/radar/radar-session). - """ - receipt_email: NotRequired["Literal['']|str"] - """ - Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). - """ - return_url: NotRequired[str] - """ - The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. - If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. - This parameter is only used for cards and other redirect-based payment methods. - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['off_session', 'on_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - shipping: NotRequired[ - "Literal['']|PaymentIntent.ConfirmParamsShipping" - ] - """ - Shipping information for this PaymentIntent. - """ - use_stripe_sdk: NotRequired[bool] - """ - Set to `true` when confirming server-side and using Stripe.js, iOS, or Android client-side SDKs to handle the next actions. - """ - - class ConfirmParamsAmountDetails(TypedDict): - discount_amount: NotRequired["Literal['']|int"] - """ - The total discount applied on the transaction. - """ - line_items: NotRequired[ - "Literal['']|List[PaymentIntent.ConfirmParamsAmountDetailsLineItem]" - ] - """ - A list of line items, each containing information about a product in the PaymentIntent. There is a maximum of 100 line items. - """ - shipping: NotRequired[ - "Literal['']|PaymentIntent.ConfirmParamsAmountDetailsShipping" - ] - """ - Contains information about the shipping portion of the amount. - """ - tax: NotRequired[ - "Literal['']|PaymentIntent.ConfirmParamsAmountDetailsTax" - ] - """ - Contains information about the tax portion of the amount. - """ - - class ConfirmParamsAmountDetailsLineItem(TypedDict): - discount_amount: NotRequired[int] - """ - The amount an item was discounted for. Positive integer. - """ - payment_method_options: NotRequired[ - "PaymentIntent.ConfirmParamsAmountDetailsLineItemPaymentMethodOptions" - ] - """ - Payment method-specific information for line items. - """ - product_code: NotRequired[str] - """ - Unique identifier of the product. At most 12 characters long. - """ - product_name: str - """ - Name of the product. At most 100 characters long. - """ - quantity: int - """ - Number of items of the product. Positive integer. - """ - tax: NotRequired["PaymentIntent.ConfirmParamsAmountDetailsLineItemTax"] - """ - Contains information about the tax on the item. - """ - unit_cost: int - """ - Cost of the product. Non-negative integer. - """ - unit_of_measure: NotRequired[str] - """ - A unit of measure for the line item, such as gallons, feet, meters, etc. - """ - - class ConfirmParamsAmountDetailsLineItemPaymentMethodOptions(TypedDict): - card: NotRequired[ - "PaymentIntent.ConfirmParamsAmountDetailsLineItemPaymentMethodOptionsCard" - ] - """ - This sub-hash contains line item details that are specific to `card` payment method." - """ - card_present: NotRequired[ - "PaymentIntent.ConfirmParamsAmountDetailsLineItemPaymentMethodOptionsCardPresent" - ] - """ - This sub-hash contains line item details that are specific to `card_present` payment method." - """ - klarna: NotRequired[ - "PaymentIntent.ConfirmParamsAmountDetailsLineItemPaymentMethodOptionsKlarna" - ] - """ - This sub-hash contains line item details that are specific to `klarna` payment method." - """ - paypal: NotRequired[ - "PaymentIntent.ConfirmParamsAmountDetailsLineItemPaymentMethodOptionsPaypal" - ] - """ - This sub-hash contains line item details that are specific to `paypal` payment method." - """ - - class ConfirmParamsAmountDetailsLineItemPaymentMethodOptionsCard( - TypedDict - ): - commodity_code: NotRequired[str] - """ - Identifier that categorizes the items being purchased using a standardized commodity scheme such as (but not limited to) UNSPSC, NAICS, NAPCS, etc. - """ - - class ConfirmParamsAmountDetailsLineItemPaymentMethodOptionsCardPresent( - TypedDict, - ): - commodity_code: NotRequired[str] - """ - Identifier that categorizes the items being purchased using a standardized commodity scheme such as (but not limited to) UNSPSC, NAICS, NAPCS, etc. - """ - - class ConfirmParamsAmountDetailsLineItemPaymentMethodOptionsKlarna( - TypedDict, - ): - image_url: NotRequired[str] - """ - URL to an image for the product. Max length, 4096 characters. - """ - product_url: NotRequired[str] - """ - URL to the product page. Max length, 4096 characters. - """ - subscription_reference: NotRequired[str] - """ - Reference for the subscription this line item is for. - """ - - class ConfirmParamsAmountDetailsLineItemPaymentMethodOptionsPaypal( - TypedDict, - ): - category: NotRequired[ - Literal["digital_goods", "donation", "physical_goods"] - ] - """ - Type of the line item. - """ - description: NotRequired[str] - """ - Description of the line item. - """ - sold_by: NotRequired[str] - """ - The Stripe account ID of the connected account that sells the item. - """ - - class ConfirmParamsAmountDetailsLineItemTax(TypedDict): - total_tax_amount: int - """ - The total tax on an item. Non-negative integer. - """ - - class ConfirmParamsAmountDetailsShipping(TypedDict): - amount: NotRequired["Literal['']|int"] - """ - Portion of the amount that is for shipping. - """ - from_postal_code: NotRequired["Literal['']|str"] - """ - The postal code that represents the shipping source. - """ - to_postal_code: NotRequired["Literal['']|str"] - """ - The postal code that represents the shipping destination. - """ - - class ConfirmParamsAmountDetailsTax(TypedDict): - total_tax_amount: int - """ - Total portion of the amount that is for tax. - """ - - class ConfirmParamsHooks(TypedDict): - inputs: NotRequired["PaymentIntent.ConfirmParamsHooksInputs"] - """ - Arguments passed in automations - """ - - class ConfirmParamsHooksInputs(TypedDict): - tax: NotRequired["PaymentIntent.ConfirmParamsHooksInputsTax"] - """ - Tax arguments for automations - """ - - class ConfirmParamsHooksInputsTax(TypedDict): - calculation: Union[Literal[""], str] - """ - The [TaxCalculation](https://stripe.com/docs/api/tax/calculations) id - """ - - class ConfirmParamsMandateData(TypedDict): - customer_acceptance: NotRequired[ - "PaymentIntent.ConfirmParamsMandateDataCustomerAcceptance" - ] - """ - This hash contains details about the customer acceptance of the Mandate. - """ - - class ConfirmParamsMandateDataCustomerAcceptance(TypedDict): - accepted_at: NotRequired[int] - """ - The time at which the customer accepted the Mandate. - """ - offline: NotRequired[ - "PaymentIntent.ConfirmParamsMandateDataCustomerAcceptanceOffline" - ] - """ - If this is a Mandate accepted offline, this hash contains details about the offline acceptance. - """ - online: NotRequired[ - "PaymentIntent.ConfirmParamsMandateDataCustomerAcceptanceOnline" - ] - """ - If this is a Mandate accepted online, this hash contains details about the online acceptance. - """ - type: Literal["offline", "online"] - """ - The type of customer acceptance information included with the Mandate. One of `online` or `offline`. - """ - - class ConfirmParamsMandateDataCustomerAcceptanceOffline(TypedDict): - pass - - class ConfirmParamsMandateDataCustomerAcceptanceOnline(TypedDict): - ip_address: NotRequired[str] - """ - The IP address from which the Mandate was accepted by the customer. - """ - user_agent: NotRequired[str] - """ - The user agent of the browser from which the Mandate was accepted by the customer. - """ - - class ConfirmParamsPaymentDetails(TypedDict): - car_rental: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentDetailsCarRental" - ] - """ - Car rental details for this PaymentIntent. - """ - customer_reference: NotRequired["Literal['']|str"] - """ - Some customers might be required by their company or organization to provide this information. If so, provide this value. Otherwise you can ignore this field. - """ - event_details: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentDetailsEventDetails" - ] - """ - Event details for this PaymentIntent - """ - flight: NotRequired["PaymentIntent.ConfirmParamsPaymentDetailsFlight"] - """ - Flight reservation details for this PaymentIntent - """ - lodging: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentDetailsLodging" - ] - """ - Lodging reservation details for this PaymentIntent - """ - order_reference: NotRequired["Literal['']|str"] - """ - A unique value assigned by the business to identify the transaction. - """ - subscription: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentDetailsSubscription" - ] - """ - Subscription details for this PaymentIntent - """ - - class ConfirmParamsPaymentDetailsCarRental(TypedDict): - affiliate: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentDetailsCarRentalAffiliate" - ] - """ - Affiliate details for this purchase. - """ - booking_number: str - """ - The booking number associated with the car rental. - """ - car_class_code: NotRequired[str] - """ - Class code of the car. - """ - car_make: NotRequired[str] - """ - Make of the car. - """ - car_model: NotRequired[str] - """ - Model of the car. - """ - company: NotRequired[str] - """ - The name of the rental car company. - """ - customer_service_phone_number: NotRequired[str] - """ - The customer service phone number of the car rental company. - """ - days_rented: int - """ - Number of days the car is being rented. - """ - delivery: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentDetailsCarRentalDelivery" - ] - """ - Delivery details for this purchase. - """ - distance: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentDetailsCarRentalDistance" - ] - """ - The details of the distance traveled during the rental period. - """ - drivers: NotRequired[ - List["PaymentIntent.ConfirmParamsPaymentDetailsCarRentalDriver"] - ] - """ - The details of the passengers in the travel reservation - """ - extra_charges: NotRequired[ - List[ - Literal[ - "extra_mileage", - "gas", - "late_return", - "one_way_service", - "parking_violation", - ] - ] - ] - """ - List of additional charges being billed. - """ - no_show: NotRequired[bool] - """ - Indicates if the customer did not keep nor cancel their booking. - """ - pickup_address: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentDetailsCarRentalPickupAddress" - ] - """ - Car pick-up address. - """ - pickup_at: int - """ - Car pick-up time. Measured in seconds since the Unix epoch. - """ - pickup_location_name: NotRequired[str] - """ - Name of the pickup location. - """ - rate_amount: NotRequired[int] - """ - Rental rate. - """ - rate_interval: NotRequired[Literal["day", "month", "week"]] - """ - The frequency at which the rate amount is applied. One of `day`, `week` or `month` - """ - renter_name: NotRequired[str] - """ - The name of the person or entity renting the car. - """ - return_address: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentDetailsCarRentalReturnAddress" - ] - """ - Car return address. - """ - return_at: int - """ - Car return time. Measured in seconds since the Unix epoch. - """ - return_location_name: NotRequired[str] - """ - Name of the return location. - """ - tax_exempt: NotRequired[bool] - """ - Indicates whether the goods or services are tax-exempt or tax is not collected. - """ - vehicle_identification_number: NotRequired[str] - """ - The vehicle identification number. - """ - - class ConfirmParamsPaymentDetailsCarRentalAffiliate(TypedDict): - name: str - """ - The name of the affiliate that originated the purchase. - """ - - class ConfirmParamsPaymentDetailsCarRentalDelivery(TypedDict): - mode: NotRequired[Literal["email", "phone", "pickup", "post"]] - """ - The delivery method for the payment - """ - recipient: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentDetailsCarRentalDeliveryRecipient" - ] - """ - Details of the recipient. - """ - - class ConfirmParamsPaymentDetailsCarRentalDeliveryRecipient(TypedDict): - email: NotRequired[str] - """ - The email of the recipient the ticket is delivered to. - """ - name: NotRequired[str] - """ - The name of the recipient the ticket is delivered to. - """ - phone: NotRequired[str] - """ - The phone number of the recipient the ticket is delivered to. - """ - - class ConfirmParamsPaymentDetailsCarRentalDistance(TypedDict): - amount: NotRequired[int] - """ - Distance traveled. - """ - unit: NotRequired[Literal["kilometers", "miles"]] - """ - Unit of measurement for the distance traveled. One of `miles` or `kilometers`. - """ - - class ConfirmParamsPaymentDetailsCarRentalDriver(TypedDict): - driver_identification_number: NotRequired[str] - """ - Driver's identification number. - """ - driver_tax_number: NotRequired[str] - """ - Driver's tax number. - """ - name: str - """ - Full name of the person or entity on the car reservation. - """ - - class ConfirmParamsPaymentDetailsCarRentalPickupAddress(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. - """ - - class ConfirmParamsPaymentDetailsCarRentalReturnAddress(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. - """ - - class ConfirmParamsPaymentDetailsEventDetails(TypedDict): - access_controlled_venue: NotRequired[bool] - """ - Indicates if the tickets are digitally checked when entering the venue. - """ - address: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentDetailsEventDetailsAddress" - ] - """ - The event location's address. - """ - affiliate: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentDetailsEventDetailsAffiliate" - ] - """ - Affiliate details for this purchase. - """ - company: NotRequired[str] - """ - The name of the company - """ - delivery: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentDetailsEventDetailsDelivery" - ] - """ - Delivery details for this purchase. - """ - ends_at: NotRequired[int] - """ - Event end time. Measured in seconds since the Unix epoch. - """ - genre: NotRequired[str] - """ - Type of the event entertainment (concert, sports event etc) - """ - name: str - """ - The name of the event. - """ - starts_at: NotRequired[int] - """ - Event start time. Measured in seconds since the Unix epoch. - """ - - class ConfirmParamsPaymentDetailsEventDetailsAddress(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. - """ - - class ConfirmParamsPaymentDetailsEventDetailsAffiliate(TypedDict): - name: str - """ - The name of the affiliate that originated the purchase. - """ - - class ConfirmParamsPaymentDetailsEventDetailsDelivery(TypedDict): - mode: NotRequired[Literal["email", "phone", "pickup", "post"]] - """ - The delivery method for the payment - """ - recipient: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentDetailsEventDetailsDeliveryRecipient" - ] - """ - Details of the recipient. - """ - - class ConfirmParamsPaymentDetailsEventDetailsDeliveryRecipient(TypedDict): - email: NotRequired[str] - """ - The email of the recipient the ticket is delivered to. - """ - name: NotRequired[str] - """ - The name of the recipient the ticket is delivered to. - """ - phone: NotRequired[str] - """ - The phone number of the recipient the ticket is delivered to. - """ - - class ConfirmParamsPaymentDetailsFlight(TypedDict): - affiliate: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentDetailsFlightAffiliate" - ] - """ - Affiliate details for this purchase. - """ - agency_number: NotRequired[str] - """ - The agency number (i.e. International Air Transport Association (IATA) agency number) of the travel agency that made the booking. - """ - carrier: NotRequired[str] - """ - The International Air Transport Association (IATA) carrier code of the carrier that issued the ticket. - """ - delivery: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentDetailsFlightDelivery" - ] - """ - Delivery details for this purchase. - """ - passenger_name: NotRequired[str] - """ - The name of the person or entity on the reservation. - """ - passengers: NotRequired[ - List["PaymentIntent.ConfirmParamsPaymentDetailsFlightPassenger"] - ] - """ - The details of the passengers in the travel reservation. - """ - segments: List[ - "PaymentIntent.ConfirmParamsPaymentDetailsFlightSegment" - ] - """ - The individual flight segments associated with the trip. - """ - ticket_number: NotRequired[str] - """ - The ticket number associated with the travel reservation. - """ - - class ConfirmParamsPaymentDetailsFlightAffiliate(TypedDict): - name: str - """ - The name of the affiliate that originated the purchase. - """ - - class ConfirmParamsPaymentDetailsFlightDelivery(TypedDict): - mode: NotRequired[Literal["email", "phone", "pickup", "post"]] - """ - The delivery method for the payment - """ - recipient: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentDetailsFlightDeliveryRecipient" - ] - """ - Details of the recipient. - """ - - class ConfirmParamsPaymentDetailsFlightDeliveryRecipient(TypedDict): - email: NotRequired[str] - """ - The email of the recipient the ticket is delivered to. - """ - name: NotRequired[str] - """ - The name of the recipient the ticket is delivered to. - """ - phone: NotRequired[str] - """ - The phone number of the recipient the ticket is delivered to. - """ - - class ConfirmParamsPaymentDetailsFlightPassenger(TypedDict): - name: str - """ - Full name of the person or entity on the flight reservation. - """ - - class ConfirmParamsPaymentDetailsFlightSegment(TypedDict): - amount: NotRequired[int] - """ - The flight segment amount. - """ - arrival_airport: NotRequired[str] - """ - The International Air Transport Association (IATA) airport code for the arrival airport. - """ - arrives_at: NotRequired[int] - """ - The arrival time for the flight segment. Measured in seconds since the Unix epoch. - """ - carrier: NotRequired[str] - """ - The International Air Transport Association (IATA) carrier code of the carrier operating the flight segment. - """ - departs_at: int - """ - The departure time for the flight segment. Measured in seconds since the Unix epoch. - """ - departure_airport: NotRequired[str] - """ - The International Air Transport Association (IATA) airport code for the departure airport. - """ - flight_number: NotRequired[str] - """ - The flight number associated with the segment - """ - service_class: NotRequired[ - Literal["business", "economy", "first", "premium_economy"] - ] - """ - The fare class for the segment. - """ - - class ConfirmParamsPaymentDetailsLodging(TypedDict): - address: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentDetailsLodgingAddress" - ] - """ - The lodging location's address. - """ - adults: NotRequired[int] - """ - The number of adults on the booking - """ - affiliate: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentDetailsLodgingAffiliate" - ] - """ - Affiliate details for this purchase. - """ - booking_number: NotRequired[str] - """ - The booking number associated with the lodging reservation. - """ - category: NotRequired[Literal["hotel", "vacation_rental"]] - """ - The lodging category - """ - checkin_at: int - """ - Lodging check-in time. Measured in seconds since the Unix epoch. - """ - checkout_at: int - """ - Lodging check-out time. Measured in seconds since the Unix epoch. - """ - customer_service_phone_number: NotRequired[str] - """ - The customer service phone number of the lodging company. - """ - daily_room_rate_amount: NotRequired[int] - """ - The daily lodging room rate. - """ - delivery: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentDetailsLodgingDelivery" - ] - """ - Delivery details for this purchase. - """ - extra_charges: NotRequired[ - List[ - Literal[ - "gift_shop", - "laundry", - "mini_bar", - "other", - "restaurant", - "telephone", - ] - ] - ] - """ - List of additional charges being billed. - """ - fire_safety_act_compliance: NotRequired[bool] - """ - Indicates whether the lodging location is compliant with the Fire Safety Act. - """ - name: NotRequired[str] - """ - The name of the lodging location. - """ - no_show: NotRequired[bool] - """ - Indicates if the customer did not keep their booking while failing to cancel the reservation. - """ - number_of_rooms: NotRequired[int] - """ - The number of rooms on the booking - """ - passengers: NotRequired[ - List["PaymentIntent.ConfirmParamsPaymentDetailsLodgingPassenger"] - ] - """ - The details of the passengers in the travel reservation - """ - property_phone_number: NotRequired[str] - """ - The phone number of the lodging location. - """ - room_class: NotRequired[str] - """ - The room class for this purchase. - """ - room_nights: NotRequired[int] - """ - The number of room nights - """ - total_room_tax_amount: NotRequired[int] - """ - The total tax amount associating with the room reservation. - """ - total_tax_amount: NotRequired[int] - """ - The total tax amount - """ - - class ConfirmParamsPaymentDetailsLodgingAddress(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. - """ - - class ConfirmParamsPaymentDetailsLodgingAffiliate(TypedDict): - name: str - """ - The name of the affiliate that originated the purchase. - """ - - class ConfirmParamsPaymentDetailsLodgingDelivery(TypedDict): - mode: NotRequired[Literal["email", "phone", "pickup", "post"]] - """ - The delivery method for the payment - """ - recipient: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentDetailsLodgingDeliveryRecipient" - ] - """ - Details of the recipient. - """ - - class ConfirmParamsPaymentDetailsLodgingDeliveryRecipient(TypedDict): - email: NotRequired[str] - """ - The email of the recipient the ticket is delivered to. - """ - name: NotRequired[str] - """ - The name of the recipient the ticket is delivered to. - """ - phone: NotRequired[str] - """ - The phone number of the recipient the ticket is delivered to. - """ - - class ConfirmParamsPaymentDetailsLodgingPassenger(TypedDict): - name: str - """ - Full name of the person or entity on the lodging reservation. - """ - - class ConfirmParamsPaymentDetailsSubscription(TypedDict): - affiliate: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentDetailsSubscriptionAffiliate" - ] - """ - Affiliate details for this purchase. - """ - auto_renewal: NotRequired[bool] - """ - Info whether the subscription will be auto renewed upon expiry. - """ - billing_interval: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentDetailsSubscriptionBillingInterval" - ] - """ - Subscription billing details for this purchase. - """ - ends_at: NotRequired[int] - """ - Subscription end time. Measured in seconds since the Unix epoch. - """ - name: str - """ - Name of the product on subscription. e.g. Apple Music Subscription - """ - starts_at: NotRequired[int] - """ - Subscription start time. Measured in seconds since the Unix epoch. - """ - - class ConfirmParamsPaymentDetailsSubscriptionAffiliate(TypedDict): - name: str - """ - The name of the affiliate that originated the purchase. - """ - - class ConfirmParamsPaymentDetailsSubscriptionBillingInterval(TypedDict): - count: int - """ - The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. - """ - interval: Literal["day", "month", "week", "year"] - """ - Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. - """ - - class ConfirmParamsPaymentMethodData(TypedDict): - acss_debit: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentMethodDataAcssDebit" - ] - """ - If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method. - """ - affirm: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentMethodDataAffirm" - ] - """ - If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method. - """ - afterpay_clearpay: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentMethodDataAfterpayClearpay" - ] - """ - If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method. - """ - alipay: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentMethodDataAlipay" - ] - """ - If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. - """ - allow_redisplay: NotRequired[ - Literal["always", "limited", "unspecified"] - ] - """ - This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`. - """ - alma: NotRequired["PaymentIntent.ConfirmParamsPaymentMethodDataAlma"] - """ - If this is a Alma PaymentMethod, this hash contains details about the Alma payment method. - """ - amazon_pay: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentMethodDataAmazonPay" - ] - """ - If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method. - """ - au_becs_debit: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentMethodDataAuBecsDebit" - ] - """ - If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. - """ - bacs_debit: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentMethodDataBacsDebit" - ] - """ - If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account. - """ - bancontact: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentMethodDataBancontact" - ] - """ - If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method. - """ - billie: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentMethodDataBillie" - ] - """ - If this is a `billie` PaymentMethod, this hash contains details about the Billie payment method. - """ - billing_details: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentMethodDataBillingDetails" - ] - """ - Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. - """ - blik: NotRequired["PaymentIntent.ConfirmParamsPaymentMethodDataBlik"] - """ - If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method. - """ - boleto: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentMethodDataBoleto" - ] - """ - If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method. - """ - cashapp: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentMethodDataCashapp" - ] - """ - If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. - """ - crypto: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentMethodDataCrypto" - ] - """ - If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment method. - """ - customer_balance: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentMethodDataCustomerBalance" - ] - """ - If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. - """ - eps: NotRequired["PaymentIntent.ConfirmParamsPaymentMethodDataEps"] - """ - If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. - """ - fpx: NotRequired["PaymentIntent.ConfirmParamsPaymentMethodDataFpx"] - """ - If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method. - """ - giropay: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentMethodDataGiropay" - ] - """ - If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method. - """ - gopay: NotRequired["PaymentIntent.ConfirmParamsPaymentMethodDataGopay"] - """ - If this is a Gopay PaymentMethod, this hash contains details about the Gopay payment method. - """ - grabpay: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentMethodDataGrabpay" - ] - """ - If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method. - """ - id_bank_transfer: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentMethodDataIdBankTransfer" - ] - """ - If this is an `IdBankTransfer` PaymentMethod, this hash contains details about the IdBankTransfer payment method. - """ - ideal: NotRequired["PaymentIntent.ConfirmParamsPaymentMethodDataIdeal"] - """ - If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. - """ - interac_present: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentMethodDataInteracPresent" - ] - """ - If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. - """ - kakao_pay: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentMethodDataKakaoPay" - ] - """ - If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method. - """ - klarna: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentMethodDataKlarna" - ] - """ - If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method. - """ - konbini: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentMethodDataKonbini" - ] - """ - If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. - """ - kr_card: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentMethodDataKrCard" - ] - """ - If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method. - """ - link: NotRequired["PaymentIntent.ConfirmParamsPaymentMethodDataLink"] - """ - If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. - """ - mb_way: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentMethodDataMbWay" - ] - """ - If this is a MB WAY PaymentMethod, this hash contains details about the MB WAY payment method. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - mobilepay: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentMethodDataMobilepay" - ] - """ - If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method. - """ - multibanco: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentMethodDataMultibanco" - ] - """ - If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method. - """ - naver_pay: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentMethodDataNaverPay" - ] - """ - If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method. - """ - nz_bank_account: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentMethodDataNzBankAccount" - ] - """ - If this is an nz_bank_account PaymentMethod, this hash contains details about the nz_bank_account payment method. - """ - oxxo: NotRequired["PaymentIntent.ConfirmParamsPaymentMethodDataOxxo"] - """ - If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. - """ - p24: NotRequired["PaymentIntent.ConfirmParamsPaymentMethodDataP24"] - """ - If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. - """ - pay_by_bank: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentMethodDataPayByBank" - ] - """ - If this is a `pay_by_bank` PaymentMethod, this hash contains details about the PayByBank payment method. - """ - payco: NotRequired["PaymentIntent.ConfirmParamsPaymentMethodDataPayco"] - """ - If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method. - """ - paynow: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentMethodDataPaynow" - ] - """ - If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method. - """ - paypal: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentMethodDataPaypal" - ] - """ - If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method. - """ - paypay: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentMethodDataPaypay" - ] - """ - If this is a `paypay` PaymentMethod, this hash contains details about the PayPay payment method. - """ - payto: NotRequired["PaymentIntent.ConfirmParamsPaymentMethodDataPayto"] - """ - If this is a `payto` PaymentMethod, this hash contains details about the PayTo payment method. - """ - pix: NotRequired["PaymentIntent.ConfirmParamsPaymentMethodDataPix"] - """ - If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method. - """ - promptpay: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentMethodDataPromptpay" - ] - """ - If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method. - """ - qris: NotRequired["PaymentIntent.ConfirmParamsPaymentMethodDataQris"] - """ - If this is a `qris` PaymentMethod, this hash contains details about the QRIS payment method. - """ - radar_options: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentMethodDataRadarOptions" - ] - """ - Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. - """ - rechnung: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentMethodDataRechnung" - ] - """ - If this is a `rechnung` PaymentMethod, this hash contains details about the Rechnung payment method. - """ - revolut_pay: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentMethodDataRevolutPay" - ] - """ - If this is a `revolut_pay` PaymentMethod, this hash contains details about the Revolut Pay payment method. - """ - samsung_pay: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentMethodDataSamsungPay" - ] - """ - If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method. - """ - satispay: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentMethodDataSatispay" - ] - """ - If this is a `satispay` PaymentMethod, this hash contains details about the Satispay payment method. - """ - sepa_debit: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentMethodDataSepaDebit" - ] - """ - If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. - """ - shopeepay: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentMethodDataShopeepay" - ] - """ - If this is a Shopeepay PaymentMethod, this hash contains details about the Shopeepay payment method. - """ - sofort: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentMethodDataSofort" - ] - """ - If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. - """ - stripe_balance: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentMethodDataStripeBalance" - ] - """ - This hash contains details about the Stripe balance payment method. - """ - swish: NotRequired["PaymentIntent.ConfirmParamsPaymentMethodDataSwish"] - """ - If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method. - """ - twint: NotRequired["PaymentIntent.ConfirmParamsPaymentMethodDataTwint"] - """ - If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method. - """ - type: Literal[ - "acss_debit", - "affirm", - "afterpay_clearpay", - "alipay", - "alma", - "amazon_pay", - "au_becs_debit", - "bacs_debit", - "bancontact", - "billie", - "blik", - "boleto", - "cashapp", - "crypto", - "customer_balance", - "eps", - "fpx", - "giropay", - "gopay", - "grabpay", - "id_bank_transfer", - "ideal", - "kakao_pay", - "klarna", - "konbini", - "kr_card", - "link", - "mb_way", - "mobilepay", - "multibanco", - "naver_pay", - "nz_bank_account", - "oxxo", - "p24", - "pay_by_bank", - "payco", - "paynow", - "paypal", - "paypay", - "payto", - "pix", - "promptpay", - "qris", - "rechnung", - "revolut_pay", - "samsung_pay", - "satispay", - "sepa_debit", - "shopeepay", - "sofort", - "stripe_balance", - "swish", - "twint", - "us_bank_account", - "wechat_pay", - "zip", - ] - """ - The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. - """ - us_bank_account: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentMethodDataUsBankAccount" - ] - """ - If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. - """ - wechat_pay: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentMethodDataWechatPay" - ] - """ - If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method. - """ - zip: NotRequired["PaymentIntent.ConfirmParamsPaymentMethodDataZip"] - """ - If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method. - """ - - class ConfirmParamsPaymentMethodDataAcssDebit(TypedDict): - account_number: str - """ - Customer's bank account number. - """ - institution_number: str - """ - Institution number of the customer's bank. - """ - transit_number: str - """ - Transit number of the customer's bank. - """ - - class ConfirmParamsPaymentMethodDataAffirm(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataAfterpayClearpay(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataAlipay(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataAlma(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataAmazonPay(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataAuBecsDebit(TypedDict): - account_number: str - """ - The account number for the bank account. - """ - bsb_number: str - """ - Bank-State-Branch number of the bank account. - """ - - class ConfirmParamsPaymentMethodDataBacsDebit(TypedDict): - account_number: NotRequired[str] - """ - Account number of the bank account that the funds will be debited from. - """ - sort_code: NotRequired[str] - """ - Sort code of the bank account. (e.g., `10-20-30`) - """ - - class ConfirmParamsPaymentMethodDataBancontact(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataBillie(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataBillingDetails(TypedDict): - address: NotRequired[ - "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodDataBillingDetailsAddress" - ] - """ - Billing address. - """ - email: NotRequired["Literal['']|str"] - """ - Email address. - """ - name: NotRequired["Literal['']|str"] - """ - Full name. - """ - phone: NotRequired["Literal['']|str"] - """ - Billing phone number (including extension). - """ - tax_id: NotRequired[str] - """ - Taxpayer identification number. Used only for transactions between LATAM buyers and non-LATAM sellers. - """ - - class ConfirmParamsPaymentMethodDataBillingDetailsAddress(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. - """ - - class ConfirmParamsPaymentMethodDataBlik(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataBoleto(TypedDict): - tax_id: str - """ - The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers) - """ - - class ConfirmParamsPaymentMethodDataCashapp(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataCrypto(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataCustomerBalance(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataEps(TypedDict): - bank: NotRequired[ - Literal[ - "arzte_und_apotheker_bank", - "austrian_anadi_bank_ag", - "bank_austria", - "bankhaus_carl_spangler", - "bankhaus_schelhammer_und_schattera_ag", - "bawag_psk_ag", - "bks_bank_ag", - "brull_kallmus_bank_ag", - "btv_vier_lander_bank", - "capital_bank_grawe_gruppe_ag", - "deutsche_bank_ag", - "dolomitenbank", - "easybank_ag", - "erste_bank_und_sparkassen", - "hypo_alpeadriabank_international_ag", - "hypo_bank_burgenland_aktiengesellschaft", - "hypo_noe_lb_fur_niederosterreich_u_wien", - "hypo_oberosterreich_salzburg_steiermark", - "hypo_tirol_bank_ag", - "hypo_vorarlberg_bank_ag", - "marchfelder_bank", - "oberbank_ag", - "raiffeisen_bankengruppe_osterreich", - "schoellerbank_ag", - "sparda_bank_wien", - "volksbank_gruppe", - "volkskreditbank_ag", - "vr_bank_braunau", - ] - ] - """ - The customer's bank. - """ - - class ConfirmParamsPaymentMethodDataFpx(TypedDict): - account_holder_type: NotRequired[Literal["company", "individual"]] - """ - Account holder type for FPX transaction - """ - bank: Literal[ - "affin_bank", - "agrobank", - "alliance_bank", - "ambank", - "bank_islam", - "bank_muamalat", - "bank_of_china", - "bank_rakyat", - "bsn", - "cimb", - "deutsche_bank", - "hong_leong_bank", - "hsbc", - "kfh", - "maybank2e", - "maybank2u", - "ocbc", - "pb_enterprise", - "public_bank", - "rhb", - "standard_chartered", - "uob", - ] - """ - The customer's bank. - """ - - class ConfirmParamsPaymentMethodDataGiropay(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataGopay(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataGrabpay(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataIdBankTransfer(TypedDict): - bank: NotRequired[Literal["bca", "bni", "bri", "cimb", "permata"]] - """ - Bank where the account is held. - """ - - class ConfirmParamsPaymentMethodDataIdeal(TypedDict): - bank: NotRequired[ - Literal[ - "abn_amro", - "asn_bank", - "bunq", - "buut", - "handelsbanken", - "ing", - "knab", - "moneyou", - "n26", - "nn", - "rabobank", - "regiobank", - "revolut", - "sns_bank", - "triodos_bank", - "van_lanschot", - "yoursafe", - ] - ] - """ - The customer's bank. Only use this parameter for existing customers. Don't use it for new customers. - """ - - class ConfirmParamsPaymentMethodDataInteracPresent(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataKakaoPay(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataKlarna(TypedDict): - dob: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentMethodDataKlarnaDob" - ] - """ - Customer's date of birth - """ - - class ConfirmParamsPaymentMethodDataKlarnaDob(TypedDict): - day: int - """ - The day of birth, between 1 and 31. - """ - month: int - """ - The month of birth, between 1 and 12. - """ - year: int - """ - The four-digit year of birth. - """ - - class ConfirmParamsPaymentMethodDataKonbini(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataKrCard(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataLink(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataMbWay(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataMobilepay(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataMultibanco(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataNaverPay(TypedDict): - funding: NotRequired[Literal["card", "points"]] - """ - Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`. - """ - - class ConfirmParamsPaymentMethodDataNzBankAccount(TypedDict): - account_holder_name: NotRequired[str] - """ - The name on the bank account. Only required if the account holder name is different from the name of the authorized signatory collected in the PaymentMethod's billing details. - """ - account_number: str - """ - The account number for the bank account. - """ - bank_code: str - """ - The numeric code for the bank account's bank. - """ - branch_code: str - """ - The numeric code for the bank account's bank branch. - """ - reference: NotRequired[str] - suffix: str - """ - The suffix of the bank account number. - """ - - class ConfirmParamsPaymentMethodDataOxxo(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataP24(TypedDict): - bank: NotRequired[ - Literal[ - "alior_bank", - "bank_millennium", - "bank_nowy_bfg_sa", - "bank_pekao_sa", - "banki_spbdzielcze", - "blik", - "bnp_paribas", - "boz", - "citi_handlowy", - "credit_agricole", - "envelobank", - "etransfer_pocztowy24", - "getin_bank", - "ideabank", - "ing", - "inteligo", - "mbank_mtransfer", - "nest_przelew", - "noble_pay", - "pbac_z_ipko", - "plus_bank", - "santander_przelew24", - "tmobile_usbugi_bankowe", - "toyota_bank", - "velobank", - "volkswagen_bank", - ] - ] - """ - The customer's bank. - """ - - class ConfirmParamsPaymentMethodDataPayByBank(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataPayco(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataPaynow(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataPaypal(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataPaypay(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataPayto(TypedDict): - account_number: NotRequired[str] - """ - The account number for the bank account. - """ - bsb_number: NotRequired[str] - """ - Bank-State-Branch number of the bank account. - """ - pay_id: NotRequired[str] - """ - The PayID alias for the bank account. - """ - - class ConfirmParamsPaymentMethodDataPix(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataPromptpay(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataQris(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataRadarOptions(TypedDict): - session: NotRequired[str] - """ - A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. - """ - - class ConfirmParamsPaymentMethodDataRechnung(TypedDict): - dob: "PaymentIntent.ConfirmParamsPaymentMethodDataRechnungDob" - """ - Customer's date of birth - """ - - class ConfirmParamsPaymentMethodDataRechnungDob(TypedDict): - day: int - """ - The day of birth, between 1 and 31. - """ - month: int - """ - The month of birth, between 1 and 12. - """ - year: int - """ - The four-digit year of birth. - """ - - class ConfirmParamsPaymentMethodDataRevolutPay(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataSamsungPay(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataSatispay(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataSepaDebit(TypedDict): - iban: str - """ - IBAN of the bank account. - """ - - class ConfirmParamsPaymentMethodDataShopeepay(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataSofort(TypedDict): - country: Literal["AT", "BE", "DE", "ES", "IT", "NL"] - """ - Two-letter ISO code representing the country the bank account is located in. - """ - - class ConfirmParamsPaymentMethodDataStripeBalance(TypedDict): - account: NotRequired[str] - """ - The connected account ID whose Stripe balance to use as the source of payment - """ - source_type: NotRequired[Literal["bank_account", "card", "fpx"]] - """ - The [source_type](https://docs.stripe.com/api/balance/balance_object#balance_object-available-source_types) of the balance - """ - - class ConfirmParamsPaymentMethodDataSwish(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataTwint(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataUsBankAccount(TypedDict): - account_holder_type: NotRequired[Literal["company", "individual"]] - """ - Account holder type: individual or company. - """ - account_number: NotRequired[str] - """ - Account number of the bank account. - """ - account_type: NotRequired[Literal["checking", "savings"]] - """ - Account type: checkings or savings. Defaults to checking if omitted. - """ - financial_connections_account: NotRequired[str] - """ - The ID of a Financial Connections Account to use as a payment method. - """ - routing_number: NotRequired[str] - """ - Routing number of the bank account. - """ - - class ConfirmParamsPaymentMethodDataWechatPay(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataZip(TypedDict): - pass - - class ConfirmParamsPaymentMethodOptions(TypedDict): - acss_debit: NotRequired[ - "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsAcssDebit" - ] - """ - If this is a `acss_debit` PaymentMethod, this sub-hash contains details about the ACSS Debit payment method options. - """ - affirm: NotRequired[ - "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsAffirm" - ] - """ - If this is an `affirm` PaymentMethod, this sub-hash contains details about the Affirm payment method options. - """ - afterpay_clearpay: NotRequired[ - "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsAfterpayClearpay" - ] - """ - If this is a `afterpay_clearpay` PaymentMethod, this sub-hash contains details about the Afterpay Clearpay payment method options. - """ - alipay: NotRequired[ - "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsAlipay" - ] - """ - If this is a `alipay` PaymentMethod, this sub-hash contains details about the Alipay payment method options. - """ - alma: NotRequired[ - "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsAlma" - ] - """ - If this is a `alma` PaymentMethod, this sub-hash contains details about the Alma payment method options. - """ - amazon_pay: NotRequired[ - "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsAmazonPay" - ] - """ - If this is a `amazon_pay` PaymentMethod, this sub-hash contains details about the Amazon Pay payment method options. - """ - au_becs_debit: NotRequired[ - "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsAuBecsDebit" - ] - """ - If this is a `au_becs_debit` PaymentMethod, this sub-hash contains details about the AU BECS Direct Debit payment method options. - """ - bacs_debit: NotRequired[ - "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsBacsDebit" - ] - """ - If this is a `bacs_debit` PaymentMethod, this sub-hash contains details about the BACS Debit payment method options. - """ - bancontact: NotRequired[ - "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsBancontact" - ] - """ - If this is a `bancontact` PaymentMethod, this sub-hash contains details about the Bancontact payment method options. - """ - billie: NotRequired[ - "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsBillie" - ] - """ - If this is a `billie` PaymentMethod, this sub-hash contains details about the Billie payment method options. - """ - blik: NotRequired[ - "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsBlik" - ] - """ - If this is a `blik` PaymentMethod, this sub-hash contains details about the BLIK payment method options. - """ - boleto: NotRequired[ - "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsBoleto" - ] - """ - If this is a `boleto` PaymentMethod, this sub-hash contains details about the Boleto payment method options. - """ - card: NotRequired[ - "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsCard" - ] - """ - Configuration for any card payments attempted on this PaymentIntent. - """ - card_present: NotRequired[ - "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsCardPresent" - ] - """ - If this is a `card_present` PaymentMethod, this sub-hash contains details about the Card Present payment method options. - """ - cashapp: NotRequired[ - "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsCashapp" - ] - """ - If this is a `cashapp` PaymentMethod, this sub-hash contains details about the Cash App Pay payment method options. - """ - crypto: NotRequired[ - "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsCrypto" - ] - """ - If this is a `crypto` PaymentMethod, this sub-hash contains details about the Crypto payment method options. - """ - customer_balance: NotRequired[ - "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsCustomerBalance" - ] - """ - If this is a `customer balance` PaymentMethod, this sub-hash contains details about the customer balance payment method options. - """ - eps: NotRequired[ - "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsEps" - ] - """ - If this is a `eps` PaymentMethod, this sub-hash contains details about the EPS payment method options. - """ - fpx: NotRequired[ - "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsFpx" - ] - """ - If this is a `fpx` PaymentMethod, this sub-hash contains details about the FPX payment method options. - """ - giropay: NotRequired[ - "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsGiropay" - ] - """ - If this is a `giropay` PaymentMethod, this sub-hash contains details about the Giropay payment method options. - """ - gopay: NotRequired[ - "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsGopay" - ] - """ - If this is a `gopay` PaymentMethod, this sub-hash contains details about the Gopay payment method options. - """ - grabpay: NotRequired[ - "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsGrabpay" - ] - """ - If this is a `grabpay` PaymentMethod, this sub-hash contains details about the Grabpay payment method options. - """ - id_bank_transfer: NotRequired[ - "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsIdBankTransfer" - ] - """ - If this is a `id_bank_transfer` PaymentMethod, this sub-hash contains details about the Indonesia Bank Transfer payment method options. - """ - ideal: NotRequired[ - "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsIdeal" - ] - """ - If this is a `ideal` PaymentMethod, this sub-hash contains details about the Ideal payment method options. - """ - interac_present: NotRequired[ - "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsInteracPresent" - ] - """ - If this is a `interac_present` PaymentMethod, this sub-hash contains details about the Card Present payment method options. - """ - kakao_pay: NotRequired[ - "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsKakaoPay" - ] - """ - If this is a `kakao_pay` PaymentMethod, this sub-hash contains details about the Kakao Pay payment method options. - """ - klarna: NotRequired[ - "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsKlarna" - ] - """ - If this is a `klarna` PaymentMethod, this sub-hash contains details about the Klarna payment method options. - """ - konbini: NotRequired[ - "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsKonbini" - ] - """ - If this is a `konbini` PaymentMethod, this sub-hash contains details about the Konbini payment method options. - """ - kr_card: NotRequired[ - "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsKrCard" - ] - """ - If this is a `kr_card` PaymentMethod, this sub-hash contains details about the KR Card payment method options. - """ - link: NotRequired[ - "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsLink" - ] - """ - If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options. - """ - mb_way: NotRequired[ - "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsMbWay" - ] - """ - If this is a `mb_way` PaymentMethod, this sub-hash contains details about the MB WAY payment method options. - """ - mobilepay: NotRequired[ - "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsMobilepay" - ] - """ - If this is a `MobilePay` PaymentMethod, this sub-hash contains details about the MobilePay payment method options. - """ - multibanco: NotRequired[ - "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsMultibanco" - ] - """ - If this is a `multibanco` PaymentMethod, this sub-hash contains details about the Multibanco payment method options. - """ - naver_pay: NotRequired[ - "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsNaverPay" - ] - """ - If this is a `naver_pay` PaymentMethod, this sub-hash contains details about the Naver Pay payment method options. - """ - nz_bank_account: NotRequired[ - "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsNzBankAccount" - ] - """ - If this is a `nz_bank_account` PaymentMethod, this sub-hash contains details about the NZ BECS Direct Debit payment method options. - """ - oxxo: NotRequired[ - "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsOxxo" - ] - """ - If this is a `oxxo` PaymentMethod, this sub-hash contains details about the OXXO payment method options. - """ - p24: NotRequired[ - "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsP24" - ] - """ - If this is a `p24` PaymentMethod, this sub-hash contains details about the Przelewy24 payment method options. - """ - pay_by_bank: NotRequired[ - "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsPayByBank" - ] - """ - If this is a `pay_by_bank` PaymentMethod, this sub-hash contains details about the PayByBank payment method options. - """ - payco: NotRequired[ - "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsPayco" - ] - """ - If this is a `payco` PaymentMethod, this sub-hash contains details about the PAYCO payment method options. - """ - paynow: NotRequired[ - "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsPaynow" - ] - """ - If this is a `paynow` PaymentMethod, this sub-hash contains details about the PayNow payment method options. - """ - paypal: NotRequired[ - "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsPaypal" - ] - """ - If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options. - """ - paypay: NotRequired[ - "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsPaypay" - ] - """ - If this is a `paypay` PaymentMethod, this sub-hash contains details about the PayPay payment method options. - """ - payto: NotRequired[ - "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsPayto" - ] - """ - If this is a `payto` PaymentMethod, this sub-hash contains details about the PayTo payment method options. - """ - pix: NotRequired[ - "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsPix" - ] - """ - If this is a `pix` PaymentMethod, this sub-hash contains details about the Pix payment method options. - """ - promptpay: NotRequired[ - "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsPromptpay" - ] - """ - If this is a `promptpay` PaymentMethod, this sub-hash contains details about the PromptPay payment method options. - """ - qris: NotRequired[ - "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsQris" - ] - """ - If this is a `qris` PaymentMethod, this sub-hash contains details about the QRIS payment method options. - """ - rechnung: NotRequired[ - "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsRechnung" - ] - """ - If this is a `rechnung` PaymentMethod, this sub-hash contains details about the Rechnung payment method options. - """ - revolut_pay: NotRequired[ - "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsRevolutPay" - ] - """ - If this is a `revolut_pay` PaymentMethod, this sub-hash contains details about the Revolut Pay payment method options. - """ - samsung_pay: NotRequired[ - "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsSamsungPay" - ] - """ - If this is a `samsung_pay` PaymentMethod, this sub-hash contains details about the Samsung Pay payment method options. - """ - satispay: NotRequired[ - "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsSatispay" - ] - """ - If this is a `satispay` PaymentMethod, this sub-hash contains details about the Satispay payment method options. - """ - sepa_debit: NotRequired[ - "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsSepaDebit" - ] - """ - If this is a `sepa_debit` PaymentIntent, this sub-hash contains details about the SEPA Debit payment method options. - """ - shopeepay: NotRequired[ - "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsShopeepay" - ] - """ - If this is a `shopeepay` PaymentMethod, this sub-hash contains details about the ShopeePay payment method options. - """ - sofort: NotRequired[ - "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsSofort" - ] - """ - If this is a `sofort` PaymentMethod, this sub-hash contains details about the SOFORT payment method options. - """ - stripe_balance: NotRequired[ - "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsStripeBalance" - ] - """ - If this is a `stripe_balance` PaymentMethod, this sub-hash contains details about the Stripe Balance payment method options. - """ - swish: NotRequired[ - "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsSwish" - ] - """ - If this is a `Swish` PaymentMethod, this sub-hash contains details about the Swish payment method options. - """ - twint: NotRequired[ - "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsTwint" - ] - """ - If this is a `twint` PaymentMethod, this sub-hash contains details about the TWINT payment method options. - """ - us_bank_account: NotRequired[ - "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsUsBankAccount" - ] - """ - If this is a `us_bank_account` PaymentMethod, this sub-hash contains details about the US bank account payment method options. - """ - wechat_pay: NotRequired[ - "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsWechatPay" - ] - """ - If this is a `wechat_pay` PaymentMethod, this sub-hash contains details about the WeChat Pay payment method options. - """ - zip: NotRequired[ - "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsZip" - ] - """ - If this is a `zip` PaymentMethod, this sub-hash contains details about the Zip payment method options. - """ - - class ConfirmParamsPaymentMethodOptionsAcssDebit(TypedDict): - mandate_options: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentMethodOptionsAcssDebitMandateOptions" - ] - """ - Additional fields for Mandate creation - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - target_date: NotRequired[str] - """ - Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. - """ - verification_method: NotRequired[ - Literal["automatic", "instant", "microdeposits"] - ] - """ - Bank account verification method. - """ - - class ConfirmParamsPaymentMethodOptionsAcssDebitMandateOptions(TypedDict): - custom_mandate_url: NotRequired["Literal['']|str"] - """ - A URL for custom mandate text to render during confirmation step. - The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent, - or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent. - """ - interval_description: NotRequired[str] - """ - Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'. - """ - payment_schedule: NotRequired[ - Literal["combined", "interval", "sporadic"] - ] - """ - Payment schedule for the mandate. - """ - transaction_type: NotRequired[Literal["business", "personal"]] - """ - Transaction type of the mandate. - """ - - class ConfirmParamsPaymentMethodOptionsAffirm(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds are captured from the customer's account. - - If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. - """ - preferred_locale: NotRequired[str] - """ - Preferred language of the Affirm authorization page that the customer is redirected to. - """ - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class ConfirmParamsPaymentMethodOptionsAfterpayClearpay(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds are captured from the customer's account. - - If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. - """ - reference: NotRequired[str] - """ - An internal identifier or reference that this payment corresponds to. You must limit the identifier to 128 characters, and it can only contain letters, numbers, underscores, backslashes, and dashes. - This field differs from the statement descriptor and item name. - """ - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class ConfirmParamsPaymentMethodOptionsAlipay(TypedDict): - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class ConfirmParamsPaymentMethodOptionsAlma(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds are captured from the customer's account. - - If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. - """ - - class ConfirmParamsPaymentMethodOptionsAmazonPay(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds are captured from the customer's account. - - If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - """ - - class ConfirmParamsPaymentMethodOptionsAuBecsDebit(TypedDict): - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - target_date: NotRequired[str] - """ - Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. - """ - - class ConfirmParamsPaymentMethodOptionsBacsDebit(TypedDict): - mandate_options: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentMethodOptionsBacsDebitMandateOptions" - ] - """ - Additional fields for Mandate creation - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - target_date: NotRequired[str] - """ - Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. - """ - - class ConfirmParamsPaymentMethodOptionsBacsDebitMandateOptions(TypedDict): - reference_prefix: NotRequired["Literal['']|str"] - """ - Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'. - """ - - class ConfirmParamsPaymentMethodOptionsBancontact(TypedDict): - preferred_language: NotRequired[Literal["de", "en", "fr", "nl"]] - """ - Preferred language of the Bancontact authorization page that the customer is redirected to. - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class ConfirmParamsPaymentMethodOptionsBillie(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds are captured from the customer's account. - - If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. - """ - - class ConfirmParamsPaymentMethodOptionsBlik(TypedDict): - code: NotRequired[str] - """ - The 6-digit BLIK code that a customer has generated using their banking application. Can only be set on confirmation. - """ - setup_future_usage: NotRequired["Literal['']|Literal['none']"] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class ConfirmParamsPaymentMethodOptionsBoleto(TypedDict): - expires_after_days: NotRequired[int] - """ - The number of calendar days before a Boleto voucher expires. For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto invoice will expire on Wednesday at 23:59 America/Sao_Paulo time. - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class ConfirmParamsPaymentMethodOptionsCard(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds are captured from the customer's account. - - If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. - """ - cvc_token: NotRequired[str] - """ - A single-use `cvc_update` Token that represents a card CVC value. When provided, the CVC value will be verified during the card payment attempt. This parameter can only be provided during confirmation. - """ - installments: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentMethodOptionsCardInstallments" - ] - """ - Installment configuration for payments attempted on this PaymentIntent. - - For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments). - """ - mandate_options: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentMethodOptionsCardMandateOptions" - ] - """ - Configuration options for setting up an eMandate for cards issued in India. - """ - moto: NotRequired[bool] - """ - When specified, this parameter indicates that a transaction will be marked - as MOTO (Mail Order Telephone Order) and thus out of scope for SCA. This - parameter can only be provided during confirmation. - """ - network: NotRequired[ - Literal[ - "amex", - "cartes_bancaires", - "diners", - "discover", - "eftpos_au", - "girocard", - "interac", - "jcb", - "link", - "mastercard", - "unionpay", - "unknown", - "visa", - ] - ] - """ - Selected network to process this PaymentIntent on. Depends on the available networks of the card attached to the PaymentIntent. Can be only set confirm-time. - """ - request_decremental_authorization: NotRequired[ - Literal["if_available", "never"] - ] - """ - Request ability to [decrement the authorization](https://stripe.com/docs/payments/decremental-authorization) for this PaymentIntent. - """ - request_extended_authorization: NotRequired[ - Literal["if_available", "never"] - ] - """ - Request ability to [capture beyond the standard authorization validity window](https://stripe.com/docs/payments/extended-authorization) for this PaymentIntent. - """ - request_incremental_authorization: NotRequired[ - Literal["if_available", "never"] - ] - """ - Request ability to [increment the authorization](https://stripe.com/docs/payments/incremental-authorization) for this PaymentIntent. - """ - request_multicapture: NotRequired[Literal["if_available", "never"]] - """ - Request ability to make [multiple captures](https://stripe.com/docs/payments/multicapture) for this PaymentIntent. - """ - request_overcapture: NotRequired[Literal["if_available", "never"]] - """ - Request ability to [overcapture](https://stripe.com/docs/payments/overcapture) for this PaymentIntent. - """ - request_partial_authorization: NotRequired[ - Literal["if_available", "never"] - ] - """ - Request partial authorization on this PaymentIntent. - """ - request_three_d_secure: NotRequired[ - Literal["any", "automatic", "challenge"] - ] - """ - We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. - """ - require_cvc_recollection: NotRequired[bool] - """ - When enabled, using a card that is attached to a customer will require the CVC to be provided again (i.e. using the cvc_token parameter). - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - statement_descriptor_suffix_kana: NotRequired["Literal['']|str"] - """ - Provides information about a card payment that customers see on their statements. Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor that's set on the account to form the complete statement descriptor. Maximum 22 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 22 characters. - """ - statement_descriptor_suffix_kanji: NotRequired["Literal['']|str"] - """ - Provides information about a card payment that customers see on their statements. Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement descriptor that's set on the account to form the complete statement descriptor. Maximum 17 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 17 characters. - """ - statement_details: NotRequired[ - "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsCardStatementDetails" - ] - """ - Statement details for this payment intent. You can use this to override the merchant details shown on your customers' statements. - """ - three_d_secure: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentMethodOptionsCardThreeDSecure" - ] - """ - If 3D Secure authentication was performed with a third-party provider, - the authentication details to use for this payment. - """ - - class ConfirmParamsPaymentMethodOptionsCardInstallments(TypedDict): - enabled: NotRequired[bool] - """ - Setting to true enables installments for this PaymentIntent. - This will cause the response to contain a list of available installment plans. - Setting to false will prevent any selected plan from applying to a charge. - """ - plan: NotRequired[ - "Literal['']|PaymentIntent.ConfirmParamsPaymentMethodOptionsCardInstallmentsPlan" - ] - """ - The selected installment plan to use for this payment attempt. - This parameter can only be provided during confirmation. - """ - - class ConfirmParamsPaymentMethodOptionsCardInstallmentsPlan(TypedDict): - count: NotRequired[int] - """ - For `fixed_count` installment plans, this is required. It represents the number of installment payments your customer will make to their credit card. - """ - interval: NotRequired[Literal["month"]] - """ - For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card. - One of `month`. - """ - type: Literal["bonus", "fixed_count", "revolving"] - """ - Type of installment plan, one of `fixed_count`, `bonus`, or `revolving`. - """ - - class ConfirmParamsPaymentMethodOptionsCardMandateOptions(TypedDict): - amount: int - """ - Amount to be charged for future payments. - """ - amount_type: Literal["fixed", "maximum"] - """ - One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. - """ - description: NotRequired[str] - """ - A description of the mandate or subscription that is meant to be displayed to the customer. - """ - end_date: NotRequired[int] - """ - End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. - """ - interval: Literal["day", "month", "sporadic", "week", "year"] - """ - Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`. - """ - interval_count: NotRequired[int] - """ - The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`. - """ - reference: str - """ - Unique identifier for the mandate or subscription. - """ - start_date: int - """ - Start date of the mandate or subscription. Start date should not be lesser than yesterday. - """ - supported_types: NotRequired[List[Literal["india"]]] - """ - Specifies the type of mandates supported. Possible values are `india`. - """ - - class ConfirmParamsPaymentMethodOptionsCardPresent(TypedDict): - request_extended_authorization: NotRequired[bool] - """ - Request ability to capture this payment beyond the standard [authorization validity window](https://stripe.com/docs/terminal/features/extended-authorizations#authorization-validity) - """ - request_incremental_authorization_support: NotRequired[bool] - """ - Request ability to [increment](https://stripe.com/docs/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://stripe.com/docs/api/payment_intents/confirm) response to verify support. - """ - routing: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentMethodOptionsCardPresentRouting" - ] - """ - Network routing priority on co-branded EMV cards supporting domestic debit and international card schemes. - """ - - class ConfirmParamsPaymentMethodOptionsCardPresentRouting(TypedDict): - requested_priority: NotRequired[Literal["domestic", "international"]] - """ - Routing requested priority - """ - - class ConfirmParamsPaymentMethodOptionsCardStatementDetails(TypedDict): - address: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentMethodOptionsCardStatementDetailsAddress" - ] - """ - Please pass in an address that is within your Stripe user account country - """ - phone: NotRequired[str] - """ - Phone number (e.g., a toll-free number that customers can call) - """ - - class ConfirmParamsPaymentMethodOptionsCardStatementDetailsAddress( - 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. - """ - - class ConfirmParamsPaymentMethodOptionsCardThreeDSecure(TypedDict): - ares_trans_status: NotRequired[ - Literal["A", "C", "I", "N", "R", "U", "Y"] - ] - """ - The `transStatus` returned from the card Issuer's ACS in the ARes. - """ - cryptogram: str - """ - The cryptogram, also known as the "authentication value" (AAV, CAVV or - AEVV). This value is 20 bytes, base64-encoded into a 28-character string. - (Most 3D Secure providers will return the base64-encoded version, which - is what you should specify here.) - """ - electronic_commerce_indicator: NotRequired[ - Literal["01", "02", "05", "06", "07"] - ] - """ - The Electronic Commerce Indicator (ECI) is returned by your 3D Secure - provider and indicates what degree of authentication was performed. - """ - exemption_indicator: NotRequired[Literal["low_risk", "none"]] - """ - The exemption requested via 3DS and accepted by the issuer at authentication time. - """ - network_options: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentMethodOptionsCardThreeDSecureNetworkOptions" - ] - """ - Network specific 3DS fields. Network specific arguments require an - explicit card brand choice. The parameter `payment_method_options.card.network`` - must be populated accordingly - """ - requestor_challenge_indicator: NotRequired[str] - """ - The challenge indicator (`threeDSRequestorChallengeInd`) which was requested in the - AReq sent to the card Issuer's ACS. A string containing 2 digits from 01-99. - """ - transaction_id: str - """ - For 3D Secure 1, the XID. For 3D Secure 2, the Directory Server - Transaction ID (dsTransID). - """ - version: Literal["1.0.2", "2.1.0", "2.2.0"] - """ - The version of 3D Secure that was performed. - """ - - class ConfirmParamsPaymentMethodOptionsCardThreeDSecureNetworkOptions( - TypedDict, - ): - cartes_bancaires: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancaires" - ] - """ - Cartes Bancaires-specific 3DS fields. - """ - - class ConfirmParamsPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancaires( - TypedDict, - ): - cb_avalgo: Literal["0", "1", "2", "3", "4", "A"] - """ - The cryptogram calculation algorithm used by the card Issuer's ACS - to calculate the Authentication cryptogram. Also known as `cavvAlgorithm`. - messageExtension: CB-AVALGO - """ - cb_exemption: NotRequired[str] - """ - The exemption indicator returned from Cartes Bancaires in the ARes. - message extension: CB-EXEMPTION; string (4 characters) - This is a 3 byte bitmap (low significant byte first and most significant - bit first) that has been Base64 encoded - """ - cb_score: NotRequired[int] - """ - The risk score returned from Cartes Bancaires in the ARes. - message extension: CB-SCORE; numeric value 0-99 - """ - - class ConfirmParamsPaymentMethodOptionsCashapp(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds are captured from the customer's account. - - If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class ConfirmParamsPaymentMethodOptionsCrypto(TypedDict): - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class ConfirmParamsPaymentMethodOptionsCustomerBalance(TypedDict): - bank_transfer: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentMethodOptionsCustomerBalanceBankTransfer" - ] - """ - Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. - """ - funding_type: NotRequired[Literal["bank_transfer"]] - """ - The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. - """ - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class ConfirmParamsPaymentMethodOptionsCustomerBalanceBankTransfer( - TypedDict, - ): - eu_bank_transfer: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer" - ] - """ - Configuration for the eu_bank_transfer funding type. - """ - requested_address_types: NotRequired[ - List[ - Literal[ - "aba", - "iban", - "sepa", - "sort_code", - "spei", - "swift", - "zengin", - ] - ] - ] - """ - List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned. - - Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`. - """ - type: Literal[ - "eu_bank_transfer", - "gb_bank_transfer", - "jp_bank_transfer", - "mx_bank_transfer", - "us_bank_transfer", - ] - """ - The list of bank transfer types that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. - """ - - class ConfirmParamsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer( - TypedDict, - ): - country: str - """ - The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. - """ - - class ConfirmParamsPaymentMethodOptionsEps(TypedDict): - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class ConfirmParamsPaymentMethodOptionsFpx(TypedDict): - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class ConfirmParamsPaymentMethodOptionsGiropay(TypedDict): - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class ConfirmParamsPaymentMethodOptionsGopay(TypedDict): - setup_future_usage: NotRequired[Literal["none", "off_session"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class ConfirmParamsPaymentMethodOptionsGrabpay(TypedDict): - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class ConfirmParamsPaymentMethodOptionsIdBankTransfer(TypedDict): - expires_after: NotRequired[int] - """ - The UNIX timestamp until which the virtual bank account is valid. Permitted range is from 5 minutes from now until 31 days from now. If unset, it defaults to 3 days from now. - """ - expires_at: NotRequired[int] - """ - The UNIX timestamp until which the virtual bank account is valid. Permitted range is from now until 30 days from now. If unset, it defaults to 1 days from now. - """ - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class ConfirmParamsPaymentMethodOptionsIdeal(TypedDict): - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class ConfirmParamsPaymentMethodOptionsInteracPresent(TypedDict): - pass - - class ConfirmParamsPaymentMethodOptionsKakaoPay(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds are captured from the customer's account. - - If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - """ - - class ConfirmParamsPaymentMethodOptionsKlarna(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds are captured from the customer's account. - - If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. - """ - on_demand: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentMethodOptionsKlarnaOnDemand" - ] - """ - On-demand details if setting up or charging an on-demand payment. - """ - preferred_locale: NotRequired[ - Literal[ - "cs-CZ", - "da-DK", - "de-AT", - "de-CH", - "de-DE", - "el-GR", - "en-AT", - "en-AU", - "en-BE", - "en-CA", - "en-CH", - "en-CZ", - "en-DE", - "en-DK", - "en-ES", - "en-FI", - "en-FR", - "en-GB", - "en-GR", - "en-IE", - "en-IT", - "en-NL", - "en-NO", - "en-NZ", - "en-PL", - "en-PT", - "en-RO", - "en-SE", - "en-US", - "es-ES", - "es-US", - "fi-FI", - "fr-BE", - "fr-CA", - "fr-CH", - "fr-FR", - "it-CH", - "it-IT", - "nb-NO", - "nl-BE", - "nl-NL", - "pl-PL", - "pt-PT", - "ro-RO", - "sv-FI", - "sv-SE", - ] - ] - """ - Preferred language of the Klarna authorization page that the customer is redirected to - """ - setup_future_usage: NotRequired[ - Literal["none", "off_session", "on_session"] - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - subscriptions: NotRequired[ - "Literal['']|List[PaymentIntent.ConfirmParamsPaymentMethodOptionsKlarnaSubscription]" - ] - """ - Subscription details if setting up or charging a subscription. - """ - - class ConfirmParamsPaymentMethodOptionsKlarnaOnDemand(TypedDict): - average_amount: NotRequired[int] - """ - Your average amount value. You can use a value across your customer base, or segment based on customer type, country, etc. - """ - maximum_amount: NotRequired[int] - """ - The maximum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. - """ - minimum_amount: NotRequired[int] - """ - The lowest or minimum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. - """ - purchase_interval: NotRequired[Literal["day", "month", "week", "year"]] - """ - Interval at which the customer is making purchases - """ - purchase_interval_count: NotRequired[int] - """ - The number of `purchase_interval` between charges - """ - - class ConfirmParamsPaymentMethodOptionsKlarnaSubscription(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Unit of time between subscription charges. - """ - interval_count: NotRequired[int] - """ - The number of intervals (specified in the `interval` attribute) between subscription charges. For example, `interval=month` and `interval_count=3` charges every 3 months. - """ - name: NotRequired[str] - """ - Name for subscription. - """ - next_billing: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentMethodOptionsKlarnaSubscriptionNextBilling" - ] - """ - Describes the upcoming charge for this subscription. - """ - reference: str - """ - A non-customer-facing reference to correlate subscription charges in the Klarna app. Use a value that persists across subscription charges. - """ - - class ConfirmParamsPaymentMethodOptionsKlarnaSubscriptionNextBilling( - TypedDict, - ): - amount: int - """ - The amount of the next charge for the subscription. - """ - date: str - """ - The date of the next charge for the subscription in YYYY-MM-DD format. - """ - - class ConfirmParamsPaymentMethodOptionsKonbini(TypedDict): - confirmation_number: NotRequired["Literal['']|str"] - """ - An optional 10 to 11 digit numeric-only string determining the confirmation code at applicable convenience stores. Must not consist of only zeroes and could be rejected in case of insufficient uniqueness. We recommend to use the customer's phone number. - """ - expires_after_days: NotRequired["Literal['']|int"] - """ - The number of calendar days (between 1 and 60) after which Konbini payment instructions will expire. For example, if a PaymentIntent is confirmed with Konbini and `expires_after_days` set to 2 on Monday JST, the instructions will expire on Wednesday 23:59:59 JST. Defaults to 3 days. - """ - expires_at: NotRequired["Literal['']|int"] - """ - The timestamp at which the Konbini payment instructions will expire. Only one of `expires_after_days` or `expires_at` may be set. - """ - product_description: NotRequired["Literal['']|str"] - """ - A product descriptor of up to 22 characters, which will appear to customers at the convenience store. - """ - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class ConfirmParamsPaymentMethodOptionsKrCard(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds are captured from the customer's account. - - If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - """ - - class ConfirmParamsPaymentMethodOptionsLink(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds are captured from the customer's account. - - If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. - """ - persistent_token: NotRequired[str] - """ - [Deprecated] This is a legacy parameter that no longer has any function. - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class ConfirmParamsPaymentMethodOptionsMbWay(TypedDict): - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class ConfirmParamsPaymentMethodOptionsMobilepay(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds are captured from the customer's account. - - If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. - """ - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class ConfirmParamsPaymentMethodOptionsMultibanco(TypedDict): - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class ConfirmParamsPaymentMethodOptionsNaverPay(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds are captured from the customer's account. - - If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - """ - - class ConfirmParamsPaymentMethodOptionsNzBankAccount(TypedDict): - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - target_date: NotRequired[str] - """ - Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. - """ - - class ConfirmParamsPaymentMethodOptionsOxxo(TypedDict): - expires_after_days: NotRequired[int] - """ - The number of calendar days before an OXXO voucher expires. For example, if you create an OXXO voucher on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time. - """ - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class ConfirmParamsPaymentMethodOptionsP24(TypedDict): - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - tos_shown_and_accepted: NotRequired[bool] - """ - Confirm that the payer has accepted the P24 terms and conditions. - """ - - class ConfirmParamsPaymentMethodOptionsPayByBank(TypedDict): - pass - - class ConfirmParamsPaymentMethodOptionsPayco(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds are captured from the customer's account. - - If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. - """ - - class ConfirmParamsPaymentMethodOptionsPaynow(TypedDict): - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class ConfirmParamsPaymentMethodOptionsPaypal(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds will be captured from the customer's account. - """ - line_items: NotRequired[ - List[ - "PaymentIntent.ConfirmParamsPaymentMethodOptionsPaypalLineItem" - ] - ] - """ - The line items purchased by the customer. - """ - preferred_locale: NotRequired[ - Literal[ - "cs-CZ", - "da-DK", - "de-AT", - "de-DE", - "de-LU", - "el-GR", - "en-GB", - "en-US", - "es-ES", - "fi-FI", - "fr-BE", - "fr-FR", - "fr-LU", - "hu-HU", - "it-IT", - "nl-BE", - "nl-NL", - "pl-PL", - "pt-PT", - "sk-SK", - "sv-SE", - ] - ] - """ - [Preferred locale](https://stripe.com/docs/payments/paypal/supported-locales) of the PayPal checkout page that the customer is redirected to. - """ - reference: NotRequired[str] - """ - A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. - """ - reference_id: NotRequired[str] - """ - A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. - """ - risk_correlation_id: NotRequired[str] - """ - The risk correlation ID for an on-session payment using a saved PayPal payment method. - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - subsellers: NotRequired[List[str]] - """ - The Stripe connected account IDs of the sellers on the platform for this transaction (optional). Only allowed when [separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) are used. - """ - - class ConfirmParamsPaymentMethodOptionsPaypalLineItem(TypedDict): - category: NotRequired[ - Literal["digital_goods", "donation", "physical_goods"] - ] - """ - Type of the line item. - """ - description: NotRequired[str] - """ - Description of the line item. - """ - name: str - """ - Descriptive name of the line item. - """ - quantity: int - """ - Quantity of the line item. Must be a positive number. - """ - sku: NotRequired[str] - """ - Client facing stock keeping unit, article number or similar. - """ - sold_by: NotRequired[str] - """ - The Stripe account ID of the connected account that sells the item. - """ - tax: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentMethodOptionsPaypalLineItemTax" - ] - """ - The tax information for the line item. - """ - unit_amount: int - """ - Price for a single unit of the line item in minor units. Cannot be a negative number. - """ - - class ConfirmParamsPaymentMethodOptionsPaypalLineItemTax(TypedDict): - amount: int - """ - The tax for a single unit of the line item in minor units. Cannot be a negative number. - """ - behavior: Literal["exclusive", "inclusive"] - """ - The tax behavior for the line item. - """ - - class ConfirmParamsPaymentMethodOptionsPaypay(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds are captured from the customer's account. - - If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. - """ - - class ConfirmParamsPaymentMethodOptionsPayto(TypedDict): - mandate_options: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentMethodOptionsPaytoMandateOptions" - ] - """ - Additional fields for Mandate creation. Only `purpose` field is configurable for PayTo PaymentIntent with `setup_future_usage=none`. Other fields are only applicable to PayTo PaymentIntent with `setup_future_usage=off_session` - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class ConfirmParamsPaymentMethodOptionsPaytoMandateOptions(TypedDict): - amount: NotRequired[int] - """ - Amount that will be collected. It is required when `amount_type` is `fixed`. - """ - amount_type: NotRequired[Literal["fixed", "maximum"]] - """ - The type of amount that will be collected. The amount charged must be exact or up to the value of `amount` param for `fixed` or `maximum` type respectively. - """ - end_date: NotRequired[str] - """ - Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no end date. - """ - payment_schedule: NotRequired[ - Literal[ - "adhoc", - "annual", - "daily", - "fortnightly", - "monthly", - "quarterly", - "semi_annual", - "weekly", - ] - ] - """ - The periodicity at which payments will be collected. - """ - payments_per_period: NotRequired[int] - """ - The number of payments that will be made during a payment period. Defaults to 1 except for when `payment_schedule` is `adhoc`. In that case, it defaults to no limit. - """ - purpose: NotRequired[ - Literal[ - "dependant_support", - "government", - "loan", - "mortgage", - "other", - "pension", - "personal", - "retail", - "salary", - "tax", - "utility", - ] - ] - """ - The purpose for which payments are made. Defaults to retail. - """ - - class ConfirmParamsPaymentMethodOptionsPix(TypedDict): - amount_includes_iof: NotRequired[Literal["always", "never"]] - """ - Determines if the amount includes the IOF tax. Defaults to `never`. - """ - expires_after_seconds: NotRequired[int] - """ - The number of seconds (between 10 and 1209600) after which Pix payment will expire. Defaults to 86400 seconds. - """ - expires_at: NotRequired[int] - """ - The timestamp at which the Pix expires (between 10 and 1209600 seconds in the future). Defaults to 1 day in the future. - """ - mandate_options: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentMethodOptionsPixMandateOptions" - ] - """ - Additional fields for mandate creation. Only applicable when `setup_future_usage=off_session`. - """ - setup_future_usage: NotRequired[Literal["none", "off_session"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class ConfirmParamsPaymentMethodOptionsPixMandateOptions(TypedDict): - amount: NotRequired[int] - """ - Amount to be charged for future payments. Required when `amount_type=fixed`. If not provided for `amount_type=maximum`, defaults to 40000. - """ - amount_includes_iof: NotRequired[Literal["always", "never"]] - """ - Determines if the amount includes the IOF tax. Defaults to `never`. - """ - amount_type: NotRequired[Literal["fixed", "maximum"]] - """ - Type of amount. Defaults to `maximum`. - """ - currency: NotRequired[str] - """ - Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Only `brl` is supported currently. - """ - end_date: NotRequired[str] - """ - Date when the mandate expires and no further payments will be charged, in `YYYY-MM-DD`. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. - """ - payment_schedule: NotRequired[ - Literal["halfyearly", "monthly", "quarterly", "weekly", "yearly"] - ] - """ - Schedule at which the future payments will be charged. Defaults to `weekly`. - """ - reference: NotRequired[str] - """ - Subscription name displayed to buyers in their bank app. Defaults to the displayable business name. - """ - start_date: NotRequired[str] - """ - Start date of the mandate, in `YYYY-MM-DD`. Start date should be at least 3 days in the future. Defaults to 3 days after the current date. - """ - - class ConfirmParamsPaymentMethodOptionsPromptpay(TypedDict): - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class ConfirmParamsPaymentMethodOptionsQris(TypedDict): - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class ConfirmParamsPaymentMethodOptionsRechnung(TypedDict): - pass - - class ConfirmParamsPaymentMethodOptionsRevolutPay(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds are captured from the customer's account. - - If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - """ - - class ConfirmParamsPaymentMethodOptionsSamsungPay(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds are captured from the customer's account. - - If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. - """ - - class ConfirmParamsPaymentMethodOptionsSatispay(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds are captured from the customer's account. - - If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. - """ - - class ConfirmParamsPaymentMethodOptionsSepaDebit(TypedDict): - mandate_options: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentMethodOptionsSepaDebitMandateOptions" - ] - """ - Additional fields for Mandate creation - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - target_date: NotRequired[str] - """ - Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. - """ - - class ConfirmParamsPaymentMethodOptionsSepaDebitMandateOptions(TypedDict): - reference_prefix: NotRequired["Literal['']|str"] - """ - Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'. - """ - - class ConfirmParamsPaymentMethodOptionsShopeepay(TypedDict): - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class ConfirmParamsPaymentMethodOptionsSofort(TypedDict): - preferred_language: NotRequired[ - "Literal['']|Literal['de', 'en', 'es', 'fr', 'it', 'nl', 'pl']" - ] - """ - Language shown to the payer on redirect. - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class ConfirmParamsPaymentMethodOptionsStripeBalance(TypedDict): - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class ConfirmParamsPaymentMethodOptionsSwish(TypedDict): - reference: NotRequired["Literal['']|str"] - """ - A reference for this payment to be displayed in the Swish app. - """ - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class ConfirmParamsPaymentMethodOptionsTwint(TypedDict): - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class ConfirmParamsPaymentMethodOptionsUsBankAccount(TypedDict): - financial_connections: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentMethodOptionsUsBankAccountFinancialConnections" - ] - """ - Additional fields for Financial Connections Session creation - """ - mandate_options: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentMethodOptionsUsBankAccountMandateOptions" - ] - """ - Additional fields for Mandate creation - """ - networks: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentMethodOptionsUsBankAccountNetworks" - ] - """ - Additional fields for network related functions - """ - preferred_settlement_speed: NotRequired[ - "Literal['']|Literal['fastest', 'standard']" - ] - """ - Preferred transaction settlement speed - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - target_date: NotRequired[str] - """ - Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. - """ - verification_method: NotRequired[ - Literal["automatic", "instant", "microdeposits"] - ] - """ - Bank account verification method. - """ - - class ConfirmParamsPaymentMethodOptionsUsBankAccountFinancialConnections( - TypedDict, - ): - filters: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters" - ] - """ - Provide filters for the linked accounts that the customer can select for the payment method. - """ - manual_entry: NotRequired[ - "PaymentIntent.ConfirmParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsManualEntry" - ] - """ - Customize manual entry behavior - """ - permissions: NotRequired[ - List[ - Literal[ - "balances", "ownership", "payment_method", "transactions" - ] - ] - ] - """ - The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. - """ - prefetch: NotRequired[ - List[ - Literal[ - "balances", - "inferred_balances", - "ownership", - "transactions", - ] - ] - ] - """ - List of data features that you would like to retrieve upon account creation. - """ - return_url: NotRequired[str] - """ - For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. - """ - - class ConfirmParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters( - TypedDict, - ): - account_subcategories: NotRequired[ - List[Literal["checking", "savings"]] - ] - """ - The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`. - """ - institution: NotRequired[str] - """ - ID of the institution to use to filter for selectable accounts. - """ - - class ConfirmParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsManualEntry( - TypedDict, - ): - mode: Literal["automatic", "custom"] - """ - Settings for configuring manual entry of account details. - """ - - class ConfirmParamsPaymentMethodOptionsUsBankAccountMandateOptions( - TypedDict, - ): - collection_method: NotRequired["Literal['']|Literal['paper']"] - """ - The method used to collect offline mandate customer acceptance. - """ - - class ConfirmParamsPaymentMethodOptionsUsBankAccountNetworks(TypedDict): - requested: NotRequired[List[Literal["ach", "us_domestic_wire"]]] - """ - Triggers validations to run across the selected networks - """ - - class ConfirmParamsPaymentMethodOptionsWechatPay(TypedDict): - app_id: NotRequired[str] - """ - The app ID registered with WeChat Pay. Only required when client is ios or android. - """ - client: NotRequired[Literal["android", "ios", "web"]] - """ - The client type that the end customer will pay from - """ - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class ConfirmParamsPaymentMethodOptionsZip(TypedDict): - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class ConfirmParamsRadarOptions(TypedDict): - session: NotRequired[str] - """ - A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. - """ - - class ConfirmParamsShipping(TypedDict): - address: "PaymentIntent.ConfirmParamsShippingAddress" - """ - Shipping address. - """ - carrier: NotRequired[str] - """ - The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. - """ - name: str - """ - Recipient name. - """ - phone: NotRequired[str] - """ - Recipient phone (including extension). - """ - tracking_number: NotRequired[str] - """ - The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. - """ - - class ConfirmParamsShippingAddress(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. - """ - - class CreateParams(RequestOptions): - amount: int - """ - Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). - """ - amount_details: NotRequired["PaymentIntent.CreateParamsAmountDetails"] - """ - Provides industry-specific information about the amount. - """ - application_fee_amount: NotRequired[int] - """ - The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total amount captured. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). - """ - automatic_payment_methods: NotRequired[ - "PaymentIntent.CreateParamsAutomaticPaymentMethods" - ] - """ - When you enable this parameter, this PaymentIntent accepts payment methods that you enable in the Dashboard and that are compatible with this PaymentIntent's other parameters. - """ - capture_method: NotRequired[ - Literal["automatic", "automatic_async", "manual"] - ] - """ - Controls when the funds will be captured from the customer's account. - """ - confirm: NotRequired[bool] - """ - Set to `true` to attempt to [confirm this PaymentIntent](https://stripe.com/docs/api/payment_intents/confirm) immediately. This parameter defaults to `false`. When creating and confirming a PaymentIntent at the same time, you can also provide the parameters available in the [Confirm API](https://stripe.com/docs/api/payment_intents/confirm). - """ - confirmation_method: NotRequired[Literal["automatic", "manual"]] - """ - Describes whether we can confirm this PaymentIntent automatically, or if it requires customer action to confirm the payment. - """ - confirmation_token: NotRequired[str] - """ - ID of the ConfirmationToken used to confirm this PaymentIntent. - - If the provided ConfirmationToken contains properties that are also being provided in this request, such as `payment_method`, then the values in this request will take precedence. - """ - 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). - """ - customer: NotRequired[str] - """ - ID of the Customer this PaymentIntent belongs to, if one exists. - - Payment methods attached to other Customers cannot be used with this PaymentIntent. - - If [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) is set and this PaymentIntent's payment method is not `card_present`, then the payment method attaches to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. - """ - customer_account: NotRequired[str] - """ - ID of the Account this PaymentIntent belongs to, if one exists. - - Payment methods attached to other Accounts cannot be used with this PaymentIntent. - - If [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) is set and this PaymentIntent's payment method is not `card_present`, then the payment method attaches to the Account after the PaymentIntent has been confirmed and any required actions from the user are complete. If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Account instead. - """ - description: NotRequired[str] - """ - An arbitrary string attached to the object. Often useful for displaying to users. - """ - error_on_requires_action: NotRequired[bool] - """ - Set to `true` to fail the payment attempt if the PaymentIntent transitions into `requires_action`. Use this parameter for simpler integrations that don't handle customer actions, such as [saving cards without authentication](https://stripe.com/docs/payments/save-card-without-authentication). This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). - """ - excluded_payment_method_types: NotRequired[ - List[ - Literal[ - "acss_debit", - "affirm", - "afterpay_clearpay", - "alipay", - "alma", - "amazon_pay", - "au_becs_debit", - "bacs_debit", - "bancontact", - "billie", - "blik", - "boleto", - "card", - "cashapp", - "crypto", - "customer_balance", - "eps", - "fpx", - "giropay", - "gopay", - "grabpay", - "id_bank_transfer", - "ideal", - "kakao_pay", - "klarna", - "konbini", - "kr_card", - "mb_way", - "mobilepay", - "multibanco", - "naver_pay", - "nz_bank_account", - "oxxo", - "p24", - "pay_by_bank", - "payco", - "paynow", - "paypal", - "paypay", - "payto", - "pix", - "promptpay", - "qris", - "rechnung", - "revolut_pay", - "samsung_pay", - "satispay", - "sepa_debit", - "shopeepay", - "sofort", - "stripe_balance", - "swish", - "twint", - "us_bank_account", - "wechat_pay", - "zip", - ] - ] - ] - """ - The list of payment method types to exclude from use with this payment. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - fx_quote: NotRequired[str] - """ - The FX rate in the quote is validated and used to convert the presentment amount to the settlement amount. - """ - hooks: NotRequired["PaymentIntent.CreateParamsHooks"] - """ - Automations to be run during the PaymentIntent lifecycle - """ - mandate: NotRequired[str] - """ - ID of the mandate that's used for this payment. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). - """ - mandate_data: NotRequired[ - "Literal['']|PaymentIntent.CreateParamsMandateData" - ] - """ - This hash contains details about the Mandate to create. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - off_session: NotRequired["bool|Literal['one_off', 'recurring']"] - """ - Set to `true` to indicate that the customer isn't in your checkout flow during this payment attempt and can't authenticate. Use this parameter in scenarios where you collect card details and [charge them later](https://stripe.com/docs/payments/cards/charging-saved-cards). This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). - """ - on_behalf_of: NotRequired[str] - """ - The Stripe account ID that these funds are intended for. Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). - """ - payment_details: NotRequired[ - "PaymentIntent.CreateParamsPaymentDetails" - ] - """ - Provides industry-specific information about the charge. - """ - payment_method: NotRequired[str] - """ - ID of the payment method (a PaymentMethod, Card, or [compatible Source](https://stripe.com/docs/payments/payment-methods#compatibility) object) to attach to this PaymentIntent. - - If you don't provide the `payment_method` parameter or the `source` parameter with `confirm=true`, `source` automatically populates with `customer.default_source` to improve migration for users of the Charges API. We recommend that you explicitly provide the `payment_method` moving forward. - If the payment method is attached to a Customer, you must also provide the ID of that Customer as the [customer](https://stripe.com/docs/api#create_payment_intent-customer) parameter of this PaymentIntent. - end - """ - payment_method_configuration: NotRequired[str] - """ - The ID of the [payment method configuration](https://stripe.com/docs/api/payment_method_configurations) to use with this PaymentIntent. - """ - payment_method_data: NotRequired[ - "PaymentIntent.CreateParamsPaymentMethodData" - ] - """ - If provided, this hash will be used to create a PaymentMethod. The new PaymentMethod will appear - in the [payment_method](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-payment_method) - property on the PaymentIntent. - """ - payment_method_options: NotRequired[ - "PaymentIntent.CreateParamsPaymentMethodOptions" - ] - """ - Payment method-specific configuration for this PaymentIntent. - """ - payment_method_types: NotRequired[List[str]] - """ - The list of payment method types (for example, a card) that this PaymentIntent can use. If you don't provide this, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). A list of valid payment method types can be found [here](https://docs.stripe.com/api/payment_methods/object#payment_method_object-type). - """ - radar_options: NotRequired["PaymentIntent.CreateParamsRadarOptions"] - """ - Options to configure Radar. Learn more about [Radar Sessions](https://stripe.com/docs/radar/radar-session). - """ - receipt_email: NotRequired[str] - """ - Email address to send the receipt to. If you specify `receipt_email` for a payment in live mode, you send a receipt regardless of your [email settings](https://dashboard.stripe.com/account/emails). - """ - return_url: NotRequired[str] - """ - The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). - """ - secret_key_confirmation: NotRequired[Literal["optional", "required"]] - """ - Indicates whether confirmation for this PaymentIntent using a secret key is `required` or `optional`. - """ - setup_future_usage: NotRequired[Literal["off_session", "on_session"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - """ - shipping: NotRequired["PaymentIntent.CreateParamsShipping"] - """ - Shipping information for this PaymentIntent. - """ - statement_descriptor: NotRequired[str] - """ - Text that appears on the customer's statement as the statement descriptor for a non-card charge. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see [the Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors). - - Setting this value for a card charge returns an error. For card charges, set the [statement_descriptor_suffix](https://docs.stripe.com/get-started/account/statement-descriptors#dynamic) instead. - """ - statement_descriptor_suffix: NotRequired[str] - """ - Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. - """ - transfer_data: NotRequired["PaymentIntent.CreateParamsTransferData"] - """ - The parameters that you can use to automatically create a Transfer. - Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). - """ - transfer_group: NotRequired[str] - """ - A string that identifies the resulting payment as part of a group. Learn more about the [use case for connected accounts](https://stripe.com/docs/connect/separate-charges-and-transfers). - """ - use_stripe_sdk: NotRequired[bool] - """ - Set to `true` when confirming server-side and using Stripe.js, iOS, or Android client-side SDKs to handle the next actions. - """ - - class CreateParamsAmountDetails(TypedDict): - discount_amount: NotRequired["Literal['']|int"] - """ - The total discount applied on the transaction. - """ - line_items: NotRequired[ - "Literal['']|List[PaymentIntent.CreateParamsAmountDetailsLineItem]" - ] - """ - A list of line items, each containing information about a product in the PaymentIntent. There is a maximum of 100 line items. - """ - shipping: NotRequired[ - "Literal['']|PaymentIntent.CreateParamsAmountDetailsShipping" - ] - """ - Contains information about the shipping portion of the amount. - """ - tax: NotRequired[ - "Literal['']|PaymentIntent.CreateParamsAmountDetailsTax" - ] - """ - Contains information about the tax portion of the amount. - """ - - class CreateParamsAmountDetailsLineItem(TypedDict): - discount_amount: NotRequired[int] - """ - The amount an item was discounted for. Positive integer. - """ - payment_method_options: NotRequired[ - "PaymentIntent.CreateParamsAmountDetailsLineItemPaymentMethodOptions" - ] - """ - Payment method-specific information for line items. - """ - product_code: NotRequired[str] - """ - Unique identifier of the product. At most 12 characters long. - """ - product_name: str - """ - Name of the product. At most 100 characters long. - """ - quantity: int - """ - Number of items of the product. Positive integer. - """ - tax: NotRequired["PaymentIntent.CreateParamsAmountDetailsLineItemTax"] - """ - Contains information about the tax on the item. - """ - unit_cost: int - """ - Cost of the product. Non-negative integer. - """ - unit_of_measure: NotRequired[str] - """ - A unit of measure for the line item, such as gallons, feet, meters, etc. - """ - - class CreateParamsAmountDetailsLineItemPaymentMethodOptions(TypedDict): - card: NotRequired[ - "PaymentIntent.CreateParamsAmountDetailsLineItemPaymentMethodOptionsCard" - ] - """ - This sub-hash contains line item details that are specific to `card` payment method." - """ - card_present: NotRequired[ - "PaymentIntent.CreateParamsAmountDetailsLineItemPaymentMethodOptionsCardPresent" - ] - """ - This sub-hash contains line item details that are specific to `card_present` payment method." - """ - klarna: NotRequired[ - "PaymentIntent.CreateParamsAmountDetailsLineItemPaymentMethodOptionsKlarna" - ] - """ - This sub-hash contains line item details that are specific to `klarna` payment method." - """ - paypal: NotRequired[ - "PaymentIntent.CreateParamsAmountDetailsLineItemPaymentMethodOptionsPaypal" - ] - """ - This sub-hash contains line item details that are specific to `paypal` payment method." - """ - - class CreateParamsAmountDetailsLineItemPaymentMethodOptionsCard(TypedDict): - commodity_code: NotRequired[str] - """ - Identifier that categorizes the items being purchased using a standardized commodity scheme such as (but not limited to) UNSPSC, NAICS, NAPCS, etc. - """ - - class CreateParamsAmountDetailsLineItemPaymentMethodOptionsCardPresent( - TypedDict, - ): - commodity_code: NotRequired[str] - """ - Identifier that categorizes the items being purchased using a standardized commodity scheme such as (but not limited to) UNSPSC, NAICS, NAPCS, etc. - """ - - class CreateParamsAmountDetailsLineItemPaymentMethodOptionsKlarna( - TypedDict, - ): - image_url: NotRequired[str] - """ - URL to an image for the product. Max length, 4096 characters. - """ - product_url: NotRequired[str] - """ - URL to the product page. Max length, 4096 characters. - """ - subscription_reference: NotRequired[str] - """ - Reference for the subscription this line item is for. - """ - - class CreateParamsAmountDetailsLineItemPaymentMethodOptionsPaypal( - TypedDict, - ): - category: NotRequired[ - Literal["digital_goods", "donation", "physical_goods"] - ] - """ - Type of the line item. - """ - description: NotRequired[str] - """ - Description of the line item. - """ - sold_by: NotRequired[str] - """ - The Stripe account ID of the connected account that sells the item. - """ - - class CreateParamsAmountDetailsLineItemTax(TypedDict): - total_tax_amount: int - """ - The total tax on an item. Non-negative integer. - """ - - class CreateParamsAmountDetailsShipping(TypedDict): - amount: NotRequired["Literal['']|int"] - """ - Portion of the amount that is for shipping. - """ - from_postal_code: NotRequired["Literal['']|str"] - """ - The postal code that represents the shipping source. - """ - to_postal_code: NotRequired["Literal['']|str"] - """ - The postal code that represents the shipping destination. - """ - - class CreateParamsAmountDetailsTax(TypedDict): - total_tax_amount: int - """ - Total portion of the amount that is for tax. - """ - - class CreateParamsAutomaticPaymentMethods(TypedDict): - allow_redirects: NotRequired[Literal["always", "never"]] - """ - Controls whether this PaymentIntent will accept redirect-based payment methods. - - Redirect-based payment methods may require your customer to be redirected to a payment method's app or site for authentication or additional steps. To [confirm](https://stripe.com/docs/api/payment_intents/confirm) this PaymentIntent, you may be required to provide a `return_url` to redirect customers back to your site after they authenticate or complete the payment. - """ - enabled: bool - """ - Whether this feature is enabled. - """ - - class CreateParamsHooks(TypedDict): - inputs: NotRequired["PaymentIntent.CreateParamsHooksInputs"] - """ - Arguments passed in automations - """ - - class CreateParamsHooksInputs(TypedDict): - tax: NotRequired["PaymentIntent.CreateParamsHooksInputsTax"] - """ - Tax arguments for automations - """ - - class CreateParamsHooksInputsTax(TypedDict): - calculation: Union[Literal[""], str] - """ - The [TaxCalculation](https://stripe.com/docs/api/tax/calculations) id - """ - - class CreateParamsMandateData(TypedDict): - customer_acceptance: ( - "PaymentIntent.CreateParamsMandateDataCustomerAcceptance" - ) - """ - This hash contains details about the customer acceptance of the Mandate. - """ - - class CreateParamsMandateDataCustomerAcceptance(TypedDict): - accepted_at: NotRequired[int] - """ - The time at which the customer accepted the Mandate. - """ - offline: NotRequired[ - "PaymentIntent.CreateParamsMandateDataCustomerAcceptanceOffline" - ] - """ - If this is a Mandate accepted offline, this hash contains details about the offline acceptance. - """ - online: NotRequired[ - "PaymentIntent.CreateParamsMandateDataCustomerAcceptanceOnline" - ] - """ - If this is a Mandate accepted online, this hash contains details about the online acceptance. - """ - type: Literal["offline", "online"] - """ - The type of customer acceptance information included with the Mandate. One of `online` or `offline`. - """ - - class CreateParamsMandateDataCustomerAcceptanceOffline(TypedDict): - pass - - class CreateParamsMandateDataCustomerAcceptanceOnline(TypedDict): - ip_address: str - """ - The IP address from which the Mandate was accepted by the customer. - """ - user_agent: str - """ - The user agent of the browser from which the Mandate was accepted by the customer. - """ - - class CreateParamsPaymentDetails(TypedDict): - car_rental: NotRequired[ - "PaymentIntent.CreateParamsPaymentDetailsCarRental" - ] - """ - Car rental details for this PaymentIntent. - """ - customer_reference: NotRequired["Literal['']|str"] - """ - Some customers might be required by their company or organization to provide this information. If so, provide this value. Otherwise you can ignore this field. - """ - event_details: NotRequired[ - "PaymentIntent.CreateParamsPaymentDetailsEventDetails" - ] - """ - Event details for this PaymentIntent - """ - flight: NotRequired["PaymentIntent.CreateParamsPaymentDetailsFlight"] - """ - Flight reservation details for this PaymentIntent - """ - lodging: NotRequired["PaymentIntent.CreateParamsPaymentDetailsLodging"] - """ - Lodging reservation details for this PaymentIntent - """ - order_reference: NotRequired["Literal['']|str"] - """ - A unique value assigned by the business to identify the transaction. - """ - subscription: NotRequired[ - "PaymentIntent.CreateParamsPaymentDetailsSubscription" - ] - """ - Subscription details for this PaymentIntent - """ - - class CreateParamsPaymentDetailsCarRental(TypedDict): - affiliate: NotRequired[ - "PaymentIntent.CreateParamsPaymentDetailsCarRentalAffiliate" - ] - """ - Affiliate details for this purchase. - """ - booking_number: str - """ - The booking number associated with the car rental. - """ - car_class_code: NotRequired[str] - """ - Class code of the car. - """ - car_make: NotRequired[str] - """ - Make of the car. - """ - car_model: NotRequired[str] - """ - Model of the car. - """ - company: NotRequired[str] - """ - The name of the rental car company. - """ - customer_service_phone_number: NotRequired[str] - """ - The customer service phone number of the car rental company. - """ - days_rented: int - """ - Number of days the car is being rented. - """ - delivery: NotRequired[ - "PaymentIntent.CreateParamsPaymentDetailsCarRentalDelivery" - ] - """ - Delivery details for this purchase. - """ - distance: NotRequired[ - "PaymentIntent.CreateParamsPaymentDetailsCarRentalDistance" - ] - """ - The details of the distance traveled during the rental period. - """ - drivers: NotRequired[ - List["PaymentIntent.CreateParamsPaymentDetailsCarRentalDriver"] - ] - """ - The details of the passengers in the travel reservation - """ - extra_charges: NotRequired[ - List[ - Literal[ - "extra_mileage", - "gas", - "late_return", - "one_way_service", - "parking_violation", - ] - ] - ] - """ - List of additional charges being billed. - """ - no_show: NotRequired[bool] - """ - Indicates if the customer did not keep nor cancel their booking. - """ - pickup_address: NotRequired[ - "PaymentIntent.CreateParamsPaymentDetailsCarRentalPickupAddress" - ] - """ - Car pick-up address. - """ - pickup_at: int - """ - Car pick-up time. Measured in seconds since the Unix epoch. - """ - pickup_location_name: NotRequired[str] - """ - Name of the pickup location. - """ - rate_amount: NotRequired[int] - """ - Rental rate. - """ - rate_interval: NotRequired[Literal["day", "month", "week"]] - """ - The frequency at which the rate amount is applied. One of `day`, `week` or `month` - """ - renter_name: NotRequired[str] - """ - The name of the person or entity renting the car. - """ - return_address: NotRequired[ - "PaymentIntent.CreateParamsPaymentDetailsCarRentalReturnAddress" - ] - """ - Car return address. - """ - return_at: int - """ - Car return time. Measured in seconds since the Unix epoch. - """ - return_location_name: NotRequired[str] - """ - Name of the return location. - """ - tax_exempt: NotRequired[bool] - """ - Indicates whether the goods or services are tax-exempt or tax is not collected. - """ - vehicle_identification_number: NotRequired[str] - """ - The vehicle identification number. - """ - - class CreateParamsPaymentDetailsCarRentalAffiliate(TypedDict): - name: str - """ - The name of the affiliate that originated the purchase. - """ - - class CreateParamsPaymentDetailsCarRentalDelivery(TypedDict): - mode: NotRequired[Literal["email", "phone", "pickup", "post"]] - """ - The delivery method for the payment - """ - recipient: NotRequired[ - "PaymentIntent.CreateParamsPaymentDetailsCarRentalDeliveryRecipient" - ] - """ - Details of the recipient. - """ - - class CreateParamsPaymentDetailsCarRentalDeliveryRecipient(TypedDict): - email: NotRequired[str] - """ - The email of the recipient the ticket is delivered to. - """ - name: NotRequired[str] - """ - The name of the recipient the ticket is delivered to. - """ - phone: NotRequired[str] - """ - The phone number of the recipient the ticket is delivered to. - """ - - class CreateParamsPaymentDetailsCarRentalDistance(TypedDict): - amount: NotRequired[int] - """ - Distance traveled. - """ - unit: NotRequired[Literal["kilometers", "miles"]] - """ - Unit of measurement for the distance traveled. One of `miles` or `kilometers`. - """ - - class CreateParamsPaymentDetailsCarRentalDriver(TypedDict): - driver_identification_number: NotRequired[str] - """ - Driver's identification number. - """ - driver_tax_number: NotRequired[str] - """ - Driver's tax number. - """ - name: str - """ - Full name of the person or entity on the car reservation. - """ - - class CreateParamsPaymentDetailsCarRentalPickupAddress(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. - """ - - class CreateParamsPaymentDetailsCarRentalReturnAddress(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. - """ - - class CreateParamsPaymentDetailsEventDetails(TypedDict): - access_controlled_venue: NotRequired[bool] - """ - Indicates if the tickets are digitally checked when entering the venue. - """ - address: NotRequired[ - "PaymentIntent.CreateParamsPaymentDetailsEventDetailsAddress" - ] - """ - The event location's address. - """ - affiliate: NotRequired[ - "PaymentIntent.CreateParamsPaymentDetailsEventDetailsAffiliate" - ] - """ - Affiliate details for this purchase. - """ - company: NotRequired[str] - """ - The name of the company - """ - delivery: NotRequired[ - "PaymentIntent.CreateParamsPaymentDetailsEventDetailsDelivery" - ] - """ - Delivery details for this purchase. - """ - ends_at: NotRequired[int] - """ - Event end time. Measured in seconds since the Unix epoch. - """ - genre: NotRequired[str] - """ - Type of the event entertainment (concert, sports event etc) - """ - name: str - """ - The name of the event. - """ - starts_at: NotRequired[int] - """ - Event start time. Measured in seconds since the Unix epoch. - """ - - class CreateParamsPaymentDetailsEventDetailsAddress(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. - """ - - class CreateParamsPaymentDetailsEventDetailsAffiliate(TypedDict): - name: str - """ - The name of the affiliate that originated the purchase. - """ - - class CreateParamsPaymentDetailsEventDetailsDelivery(TypedDict): - mode: NotRequired[Literal["email", "phone", "pickup", "post"]] - """ - The delivery method for the payment - """ - recipient: NotRequired[ - "PaymentIntent.CreateParamsPaymentDetailsEventDetailsDeliveryRecipient" - ] - """ - Details of the recipient. - """ - - class CreateParamsPaymentDetailsEventDetailsDeliveryRecipient(TypedDict): - email: NotRequired[str] - """ - The email of the recipient the ticket is delivered to. - """ - name: NotRequired[str] - """ - The name of the recipient the ticket is delivered to. - """ - phone: NotRequired[str] - """ - The phone number of the recipient the ticket is delivered to. - """ - - class CreateParamsPaymentDetailsFlight(TypedDict): - affiliate: NotRequired[ - "PaymentIntent.CreateParamsPaymentDetailsFlightAffiliate" - ] - """ - Affiliate details for this purchase. - """ - agency_number: NotRequired[str] - """ - The agency number (i.e. International Air Transport Association (IATA) agency number) of the travel agency that made the booking. - """ - carrier: NotRequired[str] - """ - The International Air Transport Association (IATA) carrier code of the carrier that issued the ticket. - """ - delivery: NotRequired[ - "PaymentIntent.CreateParamsPaymentDetailsFlightDelivery" - ] - """ - Delivery details for this purchase. - """ - passenger_name: NotRequired[str] - """ - The name of the person or entity on the reservation. - """ - passengers: NotRequired[ - List["PaymentIntent.CreateParamsPaymentDetailsFlightPassenger"] - ] - """ - The details of the passengers in the travel reservation. - """ - segments: List["PaymentIntent.CreateParamsPaymentDetailsFlightSegment"] - """ - The individual flight segments associated with the trip. - """ - ticket_number: NotRequired[str] - """ - The ticket number associated with the travel reservation. - """ - - class CreateParamsPaymentDetailsFlightAffiliate(TypedDict): - name: str - """ - The name of the affiliate that originated the purchase. - """ - - class CreateParamsPaymentDetailsFlightDelivery(TypedDict): - mode: NotRequired[Literal["email", "phone", "pickup", "post"]] - """ - The delivery method for the payment - """ - recipient: NotRequired[ - "PaymentIntent.CreateParamsPaymentDetailsFlightDeliveryRecipient" - ] - """ - Details of the recipient. - """ - - class CreateParamsPaymentDetailsFlightDeliveryRecipient(TypedDict): - email: NotRequired[str] - """ - The email of the recipient the ticket is delivered to. - """ - name: NotRequired[str] - """ - The name of the recipient the ticket is delivered to. - """ - phone: NotRequired[str] - """ - The phone number of the recipient the ticket is delivered to. - """ - - class CreateParamsPaymentDetailsFlightPassenger(TypedDict): - name: str - """ - Full name of the person or entity on the flight reservation. - """ - - class CreateParamsPaymentDetailsFlightSegment(TypedDict): - amount: NotRequired[int] - """ - The flight segment amount. - """ - arrival_airport: NotRequired[str] - """ - The International Air Transport Association (IATA) airport code for the arrival airport. - """ - arrives_at: NotRequired[int] - """ - The arrival time for the flight segment. Measured in seconds since the Unix epoch. - """ - carrier: NotRequired[str] - """ - The International Air Transport Association (IATA) carrier code of the carrier operating the flight segment. - """ - departs_at: int - """ - The departure time for the flight segment. Measured in seconds since the Unix epoch. - """ - departure_airport: NotRequired[str] - """ - The International Air Transport Association (IATA) airport code for the departure airport. - """ - flight_number: NotRequired[str] - """ - The flight number associated with the segment - """ - service_class: NotRequired[ - Literal["business", "economy", "first", "premium_economy"] - ] - """ - The fare class for the segment. - """ - - class CreateParamsPaymentDetailsLodging(TypedDict): - address: NotRequired[ - "PaymentIntent.CreateParamsPaymentDetailsLodgingAddress" - ] - """ - The lodging location's address. - """ - adults: NotRequired[int] - """ - The number of adults on the booking - """ - affiliate: NotRequired[ - "PaymentIntent.CreateParamsPaymentDetailsLodgingAffiliate" - ] - """ - Affiliate details for this purchase. - """ - booking_number: NotRequired[str] - """ - The booking number associated with the lodging reservation. - """ - category: NotRequired[Literal["hotel", "vacation_rental"]] - """ - The lodging category - """ - checkin_at: int - """ - Lodging check-in time. Measured in seconds since the Unix epoch. - """ - checkout_at: int - """ - Lodging check-out time. Measured in seconds since the Unix epoch. - """ - customer_service_phone_number: NotRequired[str] - """ - The customer service phone number of the lodging company. - """ - daily_room_rate_amount: NotRequired[int] - """ - The daily lodging room rate. - """ - delivery: NotRequired[ - "PaymentIntent.CreateParamsPaymentDetailsLodgingDelivery" - ] - """ - Delivery details for this purchase. - """ - extra_charges: NotRequired[ - List[ - Literal[ - "gift_shop", - "laundry", - "mini_bar", - "other", - "restaurant", - "telephone", - ] - ] - ] - """ - List of additional charges being billed. - """ - fire_safety_act_compliance: NotRequired[bool] - """ - Indicates whether the lodging location is compliant with the Fire Safety Act. - """ - name: NotRequired[str] - """ - The name of the lodging location. - """ - no_show: NotRequired[bool] - """ - Indicates if the customer did not keep their booking while failing to cancel the reservation. - """ - number_of_rooms: NotRequired[int] - """ - The number of rooms on the booking - """ - passengers: NotRequired[ - List["PaymentIntent.CreateParamsPaymentDetailsLodgingPassenger"] - ] - """ - The details of the passengers in the travel reservation - """ - property_phone_number: NotRequired[str] - """ - The phone number of the lodging location. - """ - room_class: NotRequired[str] - """ - The room class for this purchase. - """ - room_nights: NotRequired[int] - """ - The number of room nights - """ - total_room_tax_amount: NotRequired[int] - """ - The total tax amount associating with the room reservation. - """ - total_tax_amount: NotRequired[int] - """ - The total tax amount - """ - - class CreateParamsPaymentDetailsLodgingAddress(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. - """ - - class CreateParamsPaymentDetailsLodgingAffiliate(TypedDict): - name: str - """ - The name of the affiliate that originated the purchase. - """ - - class CreateParamsPaymentDetailsLodgingDelivery(TypedDict): - mode: NotRequired[Literal["email", "phone", "pickup", "post"]] - """ - The delivery method for the payment - """ - recipient: NotRequired[ - "PaymentIntent.CreateParamsPaymentDetailsLodgingDeliveryRecipient" - ] - """ - Details of the recipient. - """ - - class CreateParamsPaymentDetailsLodgingDeliveryRecipient(TypedDict): - email: NotRequired[str] - """ - The email of the recipient the ticket is delivered to. - """ - name: NotRequired[str] - """ - The name of the recipient the ticket is delivered to. - """ - phone: NotRequired[str] - """ - The phone number of the recipient the ticket is delivered to. - """ - - class CreateParamsPaymentDetailsLodgingPassenger(TypedDict): - name: str - """ - Full name of the person or entity on the lodging reservation. - """ - - class CreateParamsPaymentDetailsSubscription(TypedDict): - affiliate: NotRequired[ - "PaymentIntent.CreateParamsPaymentDetailsSubscriptionAffiliate" - ] - """ - Affiliate details for this purchase. - """ - auto_renewal: NotRequired[bool] - """ - Info whether the subscription will be auto renewed upon expiry. - """ - billing_interval: NotRequired[ - "PaymentIntent.CreateParamsPaymentDetailsSubscriptionBillingInterval" - ] - """ - Subscription billing details for this purchase. - """ - ends_at: NotRequired[int] - """ - Subscription end time. Measured in seconds since the Unix epoch. - """ - name: str - """ - Name of the product on subscription. e.g. Apple Music Subscription - """ - starts_at: NotRequired[int] - """ - Subscription start time. Measured in seconds since the Unix epoch. - """ - - class CreateParamsPaymentDetailsSubscriptionAffiliate(TypedDict): - name: str - """ - The name of the affiliate that originated the purchase. - """ - - class CreateParamsPaymentDetailsSubscriptionBillingInterval(TypedDict): - count: int - """ - The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. - """ - interval: Literal["day", "month", "week", "year"] - """ - Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. - """ - - class CreateParamsPaymentMethodData(TypedDict): - acss_debit: NotRequired[ - "PaymentIntent.CreateParamsPaymentMethodDataAcssDebit" - ] - """ - If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method. - """ - affirm: NotRequired[ - "PaymentIntent.CreateParamsPaymentMethodDataAffirm" - ] - """ - If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method. - """ - afterpay_clearpay: NotRequired[ - "PaymentIntent.CreateParamsPaymentMethodDataAfterpayClearpay" - ] - """ - If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method. - """ - alipay: NotRequired[ - "PaymentIntent.CreateParamsPaymentMethodDataAlipay" - ] - """ - If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. - """ - allow_redisplay: NotRequired[ - Literal["always", "limited", "unspecified"] - ] - """ - This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`. - """ - alma: NotRequired["PaymentIntent.CreateParamsPaymentMethodDataAlma"] - """ - If this is a Alma PaymentMethod, this hash contains details about the Alma payment method. - """ - amazon_pay: NotRequired[ - "PaymentIntent.CreateParamsPaymentMethodDataAmazonPay" - ] - """ - If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method. - """ - au_becs_debit: NotRequired[ - "PaymentIntent.CreateParamsPaymentMethodDataAuBecsDebit" - ] - """ - If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. - """ - bacs_debit: NotRequired[ - "PaymentIntent.CreateParamsPaymentMethodDataBacsDebit" - ] - """ - If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account. - """ - bancontact: NotRequired[ - "PaymentIntent.CreateParamsPaymentMethodDataBancontact" - ] - """ - If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method. - """ - billie: NotRequired[ - "PaymentIntent.CreateParamsPaymentMethodDataBillie" - ] - """ - If this is a `billie` PaymentMethod, this hash contains details about the Billie payment method. - """ - billing_details: NotRequired[ - "PaymentIntent.CreateParamsPaymentMethodDataBillingDetails" - ] - """ - Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. - """ - blik: NotRequired["PaymentIntent.CreateParamsPaymentMethodDataBlik"] - """ - If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method. - """ - boleto: NotRequired[ - "PaymentIntent.CreateParamsPaymentMethodDataBoleto" - ] - """ - If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method. - """ - cashapp: NotRequired[ - "PaymentIntent.CreateParamsPaymentMethodDataCashapp" - ] - """ - If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. - """ - crypto: NotRequired[ - "PaymentIntent.CreateParamsPaymentMethodDataCrypto" - ] - """ - If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment method. - """ - customer_balance: NotRequired[ - "PaymentIntent.CreateParamsPaymentMethodDataCustomerBalance" - ] - """ - If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. - """ - eps: NotRequired["PaymentIntent.CreateParamsPaymentMethodDataEps"] - """ - If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. - """ - fpx: NotRequired["PaymentIntent.CreateParamsPaymentMethodDataFpx"] - """ - If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method. - """ - giropay: NotRequired[ - "PaymentIntent.CreateParamsPaymentMethodDataGiropay" - ] - """ - If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method. - """ - gopay: NotRequired["PaymentIntent.CreateParamsPaymentMethodDataGopay"] - """ - If this is a Gopay PaymentMethod, this hash contains details about the Gopay payment method. - """ - grabpay: NotRequired[ - "PaymentIntent.CreateParamsPaymentMethodDataGrabpay" - ] - """ - If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method. - """ - id_bank_transfer: NotRequired[ - "PaymentIntent.CreateParamsPaymentMethodDataIdBankTransfer" - ] - """ - If this is an `IdBankTransfer` PaymentMethod, this hash contains details about the IdBankTransfer payment method. - """ - ideal: NotRequired["PaymentIntent.CreateParamsPaymentMethodDataIdeal"] - """ - If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. - """ - interac_present: NotRequired[ - "PaymentIntent.CreateParamsPaymentMethodDataInteracPresent" - ] - """ - If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. - """ - kakao_pay: NotRequired[ - "PaymentIntent.CreateParamsPaymentMethodDataKakaoPay" - ] - """ - If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method. - """ - klarna: NotRequired[ - "PaymentIntent.CreateParamsPaymentMethodDataKlarna" - ] - """ - If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method. - """ - konbini: NotRequired[ - "PaymentIntent.CreateParamsPaymentMethodDataKonbini" - ] - """ - If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. - """ - kr_card: NotRequired[ - "PaymentIntent.CreateParamsPaymentMethodDataKrCard" - ] - """ - If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method. - """ - link: NotRequired["PaymentIntent.CreateParamsPaymentMethodDataLink"] - """ - If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. - """ - mb_way: NotRequired["PaymentIntent.CreateParamsPaymentMethodDataMbWay"] - """ - If this is a MB WAY PaymentMethod, this hash contains details about the MB WAY payment method. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - mobilepay: NotRequired[ - "PaymentIntent.CreateParamsPaymentMethodDataMobilepay" - ] - """ - If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method. - """ - multibanco: NotRequired[ - "PaymentIntent.CreateParamsPaymentMethodDataMultibanco" - ] - """ - If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method. - """ - naver_pay: NotRequired[ - "PaymentIntent.CreateParamsPaymentMethodDataNaverPay" - ] - """ - If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method. - """ - nz_bank_account: NotRequired[ - "PaymentIntent.CreateParamsPaymentMethodDataNzBankAccount" - ] - """ - If this is an nz_bank_account PaymentMethod, this hash contains details about the nz_bank_account payment method. - """ - oxxo: NotRequired["PaymentIntent.CreateParamsPaymentMethodDataOxxo"] - """ - If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. - """ - p24: NotRequired["PaymentIntent.CreateParamsPaymentMethodDataP24"] - """ - If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. - """ - pay_by_bank: NotRequired[ - "PaymentIntent.CreateParamsPaymentMethodDataPayByBank" - ] - """ - If this is a `pay_by_bank` PaymentMethod, this hash contains details about the PayByBank payment method. - """ - payco: NotRequired["PaymentIntent.CreateParamsPaymentMethodDataPayco"] - """ - If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method. - """ - paynow: NotRequired[ - "PaymentIntent.CreateParamsPaymentMethodDataPaynow" - ] - """ - If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method. - """ - paypal: NotRequired[ - "PaymentIntent.CreateParamsPaymentMethodDataPaypal" - ] - """ - If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method. - """ - paypay: NotRequired[ - "PaymentIntent.CreateParamsPaymentMethodDataPaypay" - ] - """ - If this is a `paypay` PaymentMethod, this hash contains details about the PayPay payment method. - """ - payto: NotRequired["PaymentIntent.CreateParamsPaymentMethodDataPayto"] - """ - If this is a `payto` PaymentMethod, this hash contains details about the PayTo payment method. - """ - pix: NotRequired["PaymentIntent.CreateParamsPaymentMethodDataPix"] - """ - If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method. - """ - promptpay: NotRequired[ - "PaymentIntent.CreateParamsPaymentMethodDataPromptpay" - ] - """ - If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method. - """ - qris: NotRequired["PaymentIntent.CreateParamsPaymentMethodDataQris"] - """ - If this is a `qris` PaymentMethod, this hash contains details about the QRIS payment method. - """ - radar_options: NotRequired[ - "PaymentIntent.CreateParamsPaymentMethodDataRadarOptions" - ] - """ - Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. - """ - rechnung: NotRequired[ - "PaymentIntent.CreateParamsPaymentMethodDataRechnung" - ] - """ - If this is a `rechnung` PaymentMethod, this hash contains details about the Rechnung payment method. - """ - revolut_pay: NotRequired[ - "PaymentIntent.CreateParamsPaymentMethodDataRevolutPay" - ] - """ - If this is a `revolut_pay` PaymentMethod, this hash contains details about the Revolut Pay payment method. - """ - samsung_pay: NotRequired[ - "PaymentIntent.CreateParamsPaymentMethodDataSamsungPay" - ] - """ - If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method. - """ - satispay: NotRequired[ - "PaymentIntent.CreateParamsPaymentMethodDataSatispay" - ] - """ - If this is a `satispay` PaymentMethod, this hash contains details about the Satispay payment method. - """ - sepa_debit: NotRequired[ - "PaymentIntent.CreateParamsPaymentMethodDataSepaDebit" - ] - """ - If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. - """ - shopeepay: NotRequired[ - "PaymentIntent.CreateParamsPaymentMethodDataShopeepay" - ] - """ - If this is a Shopeepay PaymentMethod, this hash contains details about the Shopeepay payment method. - """ - sofort: NotRequired[ - "PaymentIntent.CreateParamsPaymentMethodDataSofort" - ] - """ - If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. - """ - stripe_balance: NotRequired[ - "PaymentIntent.CreateParamsPaymentMethodDataStripeBalance" - ] - """ - This hash contains details about the Stripe balance payment method. - """ - swish: NotRequired["PaymentIntent.CreateParamsPaymentMethodDataSwish"] - """ - If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method. - """ - twint: NotRequired["PaymentIntent.CreateParamsPaymentMethodDataTwint"] - """ - If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method. - """ - type: Literal[ - "acss_debit", - "affirm", - "afterpay_clearpay", - "alipay", - "alma", - "amazon_pay", - "au_becs_debit", - "bacs_debit", - "bancontact", - "billie", - "blik", - "boleto", - "cashapp", - "crypto", - "customer_balance", - "eps", - "fpx", - "giropay", - "gopay", - "grabpay", - "id_bank_transfer", - "ideal", - "kakao_pay", - "klarna", - "konbini", - "kr_card", - "link", - "mb_way", - "mobilepay", - "multibanco", - "naver_pay", - "nz_bank_account", - "oxxo", - "p24", - "pay_by_bank", - "payco", - "paynow", - "paypal", - "paypay", - "payto", - "pix", - "promptpay", - "qris", - "rechnung", - "revolut_pay", - "samsung_pay", - "satispay", - "sepa_debit", - "shopeepay", - "sofort", - "stripe_balance", - "swish", - "twint", - "us_bank_account", - "wechat_pay", - "zip", - ] - """ - The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. - """ - us_bank_account: NotRequired[ - "PaymentIntent.CreateParamsPaymentMethodDataUsBankAccount" - ] - """ - If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. - """ - wechat_pay: NotRequired[ - "PaymentIntent.CreateParamsPaymentMethodDataWechatPay" - ] - """ - If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method. - """ - zip: NotRequired["PaymentIntent.CreateParamsPaymentMethodDataZip"] - """ - If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method. - """ - - class CreateParamsPaymentMethodDataAcssDebit(TypedDict): - account_number: str - """ - Customer's bank account number. - """ - institution_number: str - """ - Institution number of the customer's bank. - """ - transit_number: str - """ - Transit number of the customer's bank. - """ - - class CreateParamsPaymentMethodDataAffirm(TypedDict): - pass - - class CreateParamsPaymentMethodDataAfterpayClearpay(TypedDict): - pass - - class CreateParamsPaymentMethodDataAlipay(TypedDict): - pass - - class CreateParamsPaymentMethodDataAlma(TypedDict): - pass - - class CreateParamsPaymentMethodDataAmazonPay(TypedDict): - pass - - class CreateParamsPaymentMethodDataAuBecsDebit(TypedDict): - account_number: str - """ - The account number for the bank account. - """ - bsb_number: str - """ - Bank-State-Branch number of the bank account. - """ - - class CreateParamsPaymentMethodDataBacsDebit(TypedDict): - account_number: NotRequired[str] - """ - Account number of the bank account that the funds will be debited from. - """ - sort_code: NotRequired[str] - """ - Sort code of the bank account. (e.g., `10-20-30`) - """ - - class CreateParamsPaymentMethodDataBancontact(TypedDict): - pass - - class CreateParamsPaymentMethodDataBillie(TypedDict): - pass - - class CreateParamsPaymentMethodDataBillingDetails(TypedDict): - address: NotRequired[ - "Literal['']|PaymentIntent.CreateParamsPaymentMethodDataBillingDetailsAddress" - ] - """ - Billing address. - """ - email: NotRequired["Literal['']|str"] - """ - Email address. - """ - name: NotRequired["Literal['']|str"] - """ - Full name. - """ - phone: NotRequired["Literal['']|str"] - """ - Billing phone number (including extension). - """ - tax_id: NotRequired[str] - """ - Taxpayer identification number. Used only for transactions between LATAM buyers and non-LATAM sellers. - """ - - class CreateParamsPaymentMethodDataBillingDetailsAddress(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. - """ - - class CreateParamsPaymentMethodDataBlik(TypedDict): - pass - - class CreateParamsPaymentMethodDataBoleto(TypedDict): - tax_id: str - """ - The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers) - """ - - class CreateParamsPaymentMethodDataCashapp(TypedDict): - pass - - class CreateParamsPaymentMethodDataCrypto(TypedDict): - pass - - class CreateParamsPaymentMethodDataCustomerBalance(TypedDict): - pass - - class CreateParamsPaymentMethodDataEps(TypedDict): - bank: NotRequired[ - Literal[ - "arzte_und_apotheker_bank", - "austrian_anadi_bank_ag", - "bank_austria", - "bankhaus_carl_spangler", - "bankhaus_schelhammer_und_schattera_ag", - "bawag_psk_ag", - "bks_bank_ag", - "brull_kallmus_bank_ag", - "btv_vier_lander_bank", - "capital_bank_grawe_gruppe_ag", - "deutsche_bank_ag", - "dolomitenbank", - "easybank_ag", - "erste_bank_und_sparkassen", - "hypo_alpeadriabank_international_ag", - "hypo_bank_burgenland_aktiengesellschaft", - "hypo_noe_lb_fur_niederosterreich_u_wien", - "hypo_oberosterreich_salzburg_steiermark", - "hypo_tirol_bank_ag", - "hypo_vorarlberg_bank_ag", - "marchfelder_bank", - "oberbank_ag", - "raiffeisen_bankengruppe_osterreich", - "schoellerbank_ag", - "sparda_bank_wien", - "volksbank_gruppe", - "volkskreditbank_ag", - "vr_bank_braunau", - ] - ] - """ - The customer's bank. - """ - - class CreateParamsPaymentMethodDataFpx(TypedDict): - account_holder_type: NotRequired[Literal["company", "individual"]] - """ - Account holder type for FPX transaction - """ - bank: Literal[ - "affin_bank", - "agrobank", - "alliance_bank", - "ambank", - "bank_islam", - "bank_muamalat", - "bank_of_china", - "bank_rakyat", - "bsn", - "cimb", - "deutsche_bank", - "hong_leong_bank", - "hsbc", - "kfh", - "maybank2e", - "maybank2u", - "ocbc", - "pb_enterprise", - "public_bank", - "rhb", - "standard_chartered", - "uob", - ] - """ - The customer's bank. - """ - - class CreateParamsPaymentMethodDataGiropay(TypedDict): - pass - - class CreateParamsPaymentMethodDataGopay(TypedDict): - pass - - class CreateParamsPaymentMethodDataGrabpay(TypedDict): - pass - - class CreateParamsPaymentMethodDataIdBankTransfer(TypedDict): - bank: NotRequired[Literal["bca", "bni", "bri", "cimb", "permata"]] - """ - Bank where the account is held. - """ - - class CreateParamsPaymentMethodDataIdeal(TypedDict): - bank: NotRequired[ - Literal[ - "abn_amro", - "asn_bank", - "bunq", - "buut", - "handelsbanken", - "ing", - "knab", - "moneyou", - "n26", - "nn", - "rabobank", - "regiobank", - "revolut", - "sns_bank", - "triodos_bank", - "van_lanschot", - "yoursafe", - ] - ] - """ - The customer's bank. Only use this parameter for existing customers. Don't use it for new customers. - """ - - class CreateParamsPaymentMethodDataInteracPresent(TypedDict): - pass - - class CreateParamsPaymentMethodDataKakaoPay(TypedDict): - pass - - class CreateParamsPaymentMethodDataKlarna(TypedDict): - dob: NotRequired[ - "PaymentIntent.CreateParamsPaymentMethodDataKlarnaDob" - ] - """ - Customer's date of birth - """ - - class CreateParamsPaymentMethodDataKlarnaDob(TypedDict): - day: int - """ - The day of birth, between 1 and 31. - """ - month: int - """ - The month of birth, between 1 and 12. - """ - year: int - """ - The four-digit year of birth. - """ - - class CreateParamsPaymentMethodDataKonbini(TypedDict): - pass - - class CreateParamsPaymentMethodDataKrCard(TypedDict): - pass - - class CreateParamsPaymentMethodDataLink(TypedDict): - pass - - class CreateParamsPaymentMethodDataMbWay(TypedDict): - pass - - class CreateParamsPaymentMethodDataMobilepay(TypedDict): - pass - - class CreateParamsPaymentMethodDataMultibanco(TypedDict): - pass - - class CreateParamsPaymentMethodDataNaverPay(TypedDict): - funding: NotRequired[Literal["card", "points"]] - """ - Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`. - """ - - class CreateParamsPaymentMethodDataNzBankAccount(TypedDict): - account_holder_name: NotRequired[str] - """ - The name on the bank account. Only required if the account holder name is different from the name of the authorized signatory collected in the PaymentMethod's billing details. - """ - account_number: str - """ - The account number for the bank account. - """ - bank_code: str - """ - The numeric code for the bank account's bank. - """ - branch_code: str - """ - The numeric code for the bank account's bank branch. - """ - reference: NotRequired[str] - suffix: str - """ - The suffix of the bank account number. - """ - - class CreateParamsPaymentMethodDataOxxo(TypedDict): - pass - - class CreateParamsPaymentMethodDataP24(TypedDict): - bank: NotRequired[ - Literal[ - "alior_bank", - "bank_millennium", - "bank_nowy_bfg_sa", - "bank_pekao_sa", - "banki_spbdzielcze", - "blik", - "bnp_paribas", - "boz", - "citi_handlowy", - "credit_agricole", - "envelobank", - "etransfer_pocztowy24", - "getin_bank", - "ideabank", - "ing", - "inteligo", - "mbank_mtransfer", - "nest_przelew", - "noble_pay", - "pbac_z_ipko", - "plus_bank", - "santander_przelew24", - "tmobile_usbugi_bankowe", - "toyota_bank", - "velobank", - "volkswagen_bank", - ] - ] - """ - The customer's bank. - """ - - class CreateParamsPaymentMethodDataPayByBank(TypedDict): - pass - - class CreateParamsPaymentMethodDataPayco(TypedDict): - pass - - class CreateParamsPaymentMethodDataPaynow(TypedDict): - pass - - class CreateParamsPaymentMethodDataPaypal(TypedDict): - pass - - class CreateParamsPaymentMethodDataPaypay(TypedDict): - pass - - class CreateParamsPaymentMethodDataPayto(TypedDict): - account_number: NotRequired[str] - """ - The account number for the bank account. - """ - bsb_number: NotRequired[str] - """ - Bank-State-Branch number of the bank account. - """ - pay_id: NotRequired[str] - """ - The PayID alias for the bank account. - """ - - class CreateParamsPaymentMethodDataPix(TypedDict): - pass - - class CreateParamsPaymentMethodDataPromptpay(TypedDict): - pass - - class CreateParamsPaymentMethodDataQris(TypedDict): - pass - - class CreateParamsPaymentMethodDataRadarOptions(TypedDict): - session: NotRequired[str] - """ - A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. - """ - - class CreateParamsPaymentMethodDataRechnung(TypedDict): - dob: "PaymentIntent.CreateParamsPaymentMethodDataRechnungDob" - """ - Customer's date of birth - """ - - class CreateParamsPaymentMethodDataRechnungDob(TypedDict): - day: int - """ - The day of birth, between 1 and 31. - """ - month: int - """ - The month of birth, between 1 and 12. - """ - year: int - """ - The four-digit year of birth. - """ - - class CreateParamsPaymentMethodDataRevolutPay(TypedDict): - pass - - class CreateParamsPaymentMethodDataSamsungPay(TypedDict): - pass - - class CreateParamsPaymentMethodDataSatispay(TypedDict): - pass - - class CreateParamsPaymentMethodDataSepaDebit(TypedDict): - iban: str - """ - IBAN of the bank account. - """ - - class CreateParamsPaymentMethodDataShopeepay(TypedDict): - pass - - class CreateParamsPaymentMethodDataSofort(TypedDict): - country: Literal["AT", "BE", "DE", "ES", "IT", "NL"] - """ - Two-letter ISO code representing the country the bank account is located in. - """ - - class CreateParamsPaymentMethodDataStripeBalance(TypedDict): - account: NotRequired[str] - """ - The connected account ID whose Stripe balance to use as the source of payment - """ - source_type: NotRequired[Literal["bank_account", "card", "fpx"]] - """ - The [source_type](https://docs.stripe.com/api/balance/balance_object#balance_object-available-source_types) of the balance - """ - - class CreateParamsPaymentMethodDataSwish(TypedDict): - pass - - class CreateParamsPaymentMethodDataTwint(TypedDict): - pass - - class CreateParamsPaymentMethodDataUsBankAccount(TypedDict): - account_holder_type: NotRequired[Literal["company", "individual"]] - """ - Account holder type: individual or company. - """ - account_number: NotRequired[str] - """ - Account number of the bank account. - """ - account_type: NotRequired[Literal["checking", "savings"]] - """ - Account type: checkings or savings. Defaults to checking if omitted. - """ - financial_connections_account: NotRequired[str] - """ - The ID of a Financial Connections Account to use as a payment method. - """ - routing_number: NotRequired[str] - """ - Routing number of the bank account. - """ - - class CreateParamsPaymentMethodDataWechatPay(TypedDict): - pass - - class CreateParamsPaymentMethodDataZip(TypedDict): - pass - - class CreateParamsPaymentMethodOptions(TypedDict): - acss_debit: NotRequired[ - "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsAcssDebit" - ] - """ - If this is a `acss_debit` PaymentMethod, this sub-hash contains details about the ACSS Debit payment method options. - """ - affirm: NotRequired[ - "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsAffirm" - ] - """ - If this is an `affirm` PaymentMethod, this sub-hash contains details about the Affirm payment method options. - """ - afterpay_clearpay: NotRequired[ - "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsAfterpayClearpay" - ] - """ - If this is a `afterpay_clearpay` PaymentMethod, this sub-hash contains details about the Afterpay Clearpay payment method options. - """ - alipay: NotRequired[ - "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsAlipay" - ] - """ - If this is a `alipay` PaymentMethod, this sub-hash contains details about the Alipay payment method options. - """ - alma: NotRequired[ - "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsAlma" - ] - """ - If this is a `alma` PaymentMethod, this sub-hash contains details about the Alma payment method options. - """ - amazon_pay: NotRequired[ - "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsAmazonPay" - ] - """ - If this is a `amazon_pay` PaymentMethod, this sub-hash contains details about the Amazon Pay payment method options. - """ - au_becs_debit: NotRequired[ - "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsAuBecsDebit" - ] - """ - If this is a `au_becs_debit` PaymentMethod, this sub-hash contains details about the AU BECS Direct Debit payment method options. - """ - bacs_debit: NotRequired[ - "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsBacsDebit" - ] - """ - If this is a `bacs_debit` PaymentMethod, this sub-hash contains details about the BACS Debit payment method options. - """ - bancontact: NotRequired[ - "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsBancontact" - ] - """ - If this is a `bancontact` PaymentMethod, this sub-hash contains details about the Bancontact payment method options. - """ - billie: NotRequired[ - "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsBillie" - ] - """ - If this is a `billie` PaymentMethod, this sub-hash contains details about the Billie payment method options. - """ - blik: NotRequired[ - "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsBlik" - ] - """ - If this is a `blik` PaymentMethod, this sub-hash contains details about the BLIK payment method options. - """ - boleto: NotRequired[ - "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsBoleto" - ] - """ - If this is a `boleto` PaymentMethod, this sub-hash contains details about the Boleto payment method options. - """ - card: NotRequired[ - "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsCard" - ] - """ - Configuration for any card payments attempted on this PaymentIntent. - """ - card_present: NotRequired[ - "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsCardPresent" - ] - """ - If this is a `card_present` PaymentMethod, this sub-hash contains details about the Card Present payment method options. - """ - cashapp: NotRequired[ - "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsCashapp" - ] - """ - If this is a `cashapp` PaymentMethod, this sub-hash contains details about the Cash App Pay payment method options. - """ - crypto: NotRequired[ - "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsCrypto" - ] - """ - If this is a `crypto` PaymentMethod, this sub-hash contains details about the Crypto payment method options. - """ - customer_balance: NotRequired[ - "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsCustomerBalance" - ] - """ - If this is a `customer balance` PaymentMethod, this sub-hash contains details about the customer balance payment method options. - """ - eps: NotRequired[ - "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsEps" - ] - """ - If this is a `eps` PaymentMethod, this sub-hash contains details about the EPS payment method options. - """ - fpx: NotRequired[ - "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsFpx" - ] - """ - If this is a `fpx` PaymentMethod, this sub-hash contains details about the FPX payment method options. - """ - giropay: NotRequired[ - "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsGiropay" - ] - """ - If this is a `giropay` PaymentMethod, this sub-hash contains details about the Giropay payment method options. - """ - gopay: NotRequired[ - "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsGopay" - ] - """ - If this is a `gopay` PaymentMethod, this sub-hash contains details about the Gopay payment method options. - """ - grabpay: NotRequired[ - "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsGrabpay" - ] - """ - If this is a `grabpay` PaymentMethod, this sub-hash contains details about the Grabpay payment method options. - """ - id_bank_transfer: NotRequired[ - "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsIdBankTransfer" - ] - """ - If this is a `id_bank_transfer` PaymentMethod, this sub-hash contains details about the Indonesia Bank Transfer payment method options. - """ - ideal: NotRequired[ - "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsIdeal" - ] - """ - If this is a `ideal` PaymentMethod, this sub-hash contains details about the Ideal payment method options. - """ - interac_present: NotRequired[ - "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsInteracPresent" - ] - """ - If this is a `interac_present` PaymentMethod, this sub-hash contains details about the Card Present payment method options. - """ - kakao_pay: NotRequired[ - "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsKakaoPay" - ] - """ - If this is a `kakao_pay` PaymentMethod, this sub-hash contains details about the Kakao Pay payment method options. - """ - klarna: NotRequired[ - "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsKlarna" - ] - """ - If this is a `klarna` PaymentMethod, this sub-hash contains details about the Klarna payment method options. - """ - konbini: NotRequired[ - "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsKonbini" - ] - """ - If this is a `konbini` PaymentMethod, this sub-hash contains details about the Konbini payment method options. - """ - kr_card: NotRequired[ - "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsKrCard" - ] - """ - If this is a `kr_card` PaymentMethod, this sub-hash contains details about the KR Card payment method options. - """ - link: NotRequired[ - "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsLink" - ] - """ - If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options. - """ - mb_way: NotRequired[ - "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsMbWay" - ] - """ - If this is a `mb_way` PaymentMethod, this sub-hash contains details about the MB WAY payment method options. - """ - mobilepay: NotRequired[ - "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsMobilepay" - ] - """ - If this is a `MobilePay` PaymentMethod, this sub-hash contains details about the MobilePay payment method options. - """ - multibanco: NotRequired[ - "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsMultibanco" - ] - """ - If this is a `multibanco` PaymentMethod, this sub-hash contains details about the Multibanco payment method options. - """ - naver_pay: NotRequired[ - "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsNaverPay" - ] - """ - If this is a `naver_pay` PaymentMethod, this sub-hash contains details about the Naver Pay payment method options. - """ - nz_bank_account: NotRequired[ - "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsNzBankAccount" - ] - """ - If this is a `nz_bank_account` PaymentMethod, this sub-hash contains details about the NZ BECS Direct Debit payment method options. - """ - oxxo: NotRequired[ - "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsOxxo" - ] - """ - If this is a `oxxo` PaymentMethod, this sub-hash contains details about the OXXO payment method options. - """ - p24: NotRequired[ - "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsP24" - ] - """ - If this is a `p24` PaymentMethod, this sub-hash contains details about the Przelewy24 payment method options. - """ - pay_by_bank: NotRequired[ - "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsPayByBank" - ] - """ - If this is a `pay_by_bank` PaymentMethod, this sub-hash contains details about the PayByBank payment method options. - """ - payco: NotRequired[ - "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsPayco" - ] - """ - If this is a `payco` PaymentMethod, this sub-hash contains details about the PAYCO payment method options. - """ - paynow: NotRequired[ - "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsPaynow" - ] - """ - If this is a `paynow` PaymentMethod, this sub-hash contains details about the PayNow payment method options. - """ - paypal: NotRequired[ - "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsPaypal" - ] - """ - If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options. - """ - paypay: NotRequired[ - "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsPaypay" - ] - """ - If this is a `paypay` PaymentMethod, this sub-hash contains details about the PayPay payment method options. - """ - payto: NotRequired[ - "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsPayto" - ] - """ - If this is a `payto` PaymentMethod, this sub-hash contains details about the PayTo payment method options. - """ - pix: NotRequired[ - "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsPix" - ] - """ - If this is a `pix` PaymentMethod, this sub-hash contains details about the Pix payment method options. - """ - promptpay: NotRequired[ - "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsPromptpay" - ] - """ - If this is a `promptpay` PaymentMethod, this sub-hash contains details about the PromptPay payment method options. - """ - qris: NotRequired[ - "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsQris" - ] - """ - If this is a `qris` PaymentMethod, this sub-hash contains details about the QRIS payment method options. - """ - rechnung: NotRequired[ - "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsRechnung" - ] - """ - If this is a `rechnung` PaymentMethod, this sub-hash contains details about the Rechnung payment method options. - """ - revolut_pay: NotRequired[ - "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsRevolutPay" - ] - """ - If this is a `revolut_pay` PaymentMethod, this sub-hash contains details about the Revolut Pay payment method options. - """ - samsung_pay: NotRequired[ - "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsSamsungPay" - ] - """ - If this is a `samsung_pay` PaymentMethod, this sub-hash contains details about the Samsung Pay payment method options. - """ - satispay: NotRequired[ - "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsSatispay" - ] - """ - If this is a `satispay` PaymentMethod, this sub-hash contains details about the Satispay payment method options. - """ - sepa_debit: NotRequired[ - "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsSepaDebit" - ] - """ - If this is a `sepa_debit` PaymentIntent, this sub-hash contains details about the SEPA Debit payment method options. - """ - shopeepay: NotRequired[ - "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsShopeepay" - ] - """ - If this is a `shopeepay` PaymentMethod, this sub-hash contains details about the ShopeePay payment method options. - """ - sofort: NotRequired[ - "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsSofort" - ] - """ - If this is a `sofort` PaymentMethod, this sub-hash contains details about the SOFORT payment method options. - """ - stripe_balance: NotRequired[ - "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsStripeBalance" - ] - """ - If this is a `stripe_balance` PaymentMethod, this sub-hash contains details about the Stripe Balance payment method options. - """ - swish: NotRequired[ - "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsSwish" - ] - """ - If this is a `Swish` PaymentMethod, this sub-hash contains details about the Swish payment method options. - """ - twint: NotRequired[ - "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsTwint" - ] - """ - If this is a `twint` PaymentMethod, this sub-hash contains details about the TWINT payment method options. - """ - us_bank_account: NotRequired[ - "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsUsBankAccount" - ] - """ - If this is a `us_bank_account` PaymentMethod, this sub-hash contains details about the US bank account payment method options. - """ - wechat_pay: NotRequired[ - "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsWechatPay" - ] - """ - If this is a `wechat_pay` PaymentMethod, this sub-hash contains details about the WeChat Pay payment method options. - """ - zip: NotRequired[ - "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsZip" - ] - """ - If this is a `zip` PaymentMethod, this sub-hash contains details about the Zip payment method options. - """ - - class CreateParamsPaymentMethodOptionsAcssDebit(TypedDict): - mandate_options: NotRequired[ - "PaymentIntent.CreateParamsPaymentMethodOptionsAcssDebitMandateOptions" - ] - """ - Additional fields for Mandate creation - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - target_date: NotRequired[str] - """ - Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. - """ - verification_method: NotRequired[ - Literal["automatic", "instant", "microdeposits"] - ] - """ - Bank account verification method. - """ - - class CreateParamsPaymentMethodOptionsAcssDebitMandateOptions(TypedDict): - custom_mandate_url: NotRequired["Literal['']|str"] - """ - A URL for custom mandate text to render during confirmation step. - The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent, - or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent. - """ - interval_description: NotRequired[str] - """ - Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'. - """ - payment_schedule: NotRequired[ - Literal["combined", "interval", "sporadic"] - ] - """ - Payment schedule for the mandate. - """ - transaction_type: NotRequired[Literal["business", "personal"]] - """ - Transaction type of the mandate. - """ - - class CreateParamsPaymentMethodOptionsAffirm(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds are captured from the customer's account. - - If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. - """ - preferred_locale: NotRequired[str] - """ - Preferred language of the Affirm authorization page that the customer is redirected to. - """ - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class CreateParamsPaymentMethodOptionsAfterpayClearpay(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds are captured from the customer's account. - - If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. - """ - reference: NotRequired[str] - """ - An internal identifier or reference that this payment corresponds to. You must limit the identifier to 128 characters, and it can only contain letters, numbers, underscores, backslashes, and dashes. - This field differs from the statement descriptor and item name. - """ - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class CreateParamsPaymentMethodOptionsAlipay(TypedDict): - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class CreateParamsPaymentMethodOptionsAlma(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds are captured from the customer's account. - - If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. - """ - - class CreateParamsPaymentMethodOptionsAmazonPay(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds are captured from the customer's account. - - If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - """ - - class CreateParamsPaymentMethodOptionsAuBecsDebit(TypedDict): - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - target_date: NotRequired[str] - """ - Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. - """ - - class CreateParamsPaymentMethodOptionsBacsDebit(TypedDict): - mandate_options: NotRequired[ - "PaymentIntent.CreateParamsPaymentMethodOptionsBacsDebitMandateOptions" - ] - """ - Additional fields for Mandate creation - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - target_date: NotRequired[str] - """ - Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. - """ - - class CreateParamsPaymentMethodOptionsBacsDebitMandateOptions(TypedDict): - reference_prefix: NotRequired["Literal['']|str"] - """ - Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'. - """ - - class CreateParamsPaymentMethodOptionsBancontact(TypedDict): - preferred_language: NotRequired[Literal["de", "en", "fr", "nl"]] - """ - Preferred language of the Bancontact authorization page that the customer is redirected to. - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class CreateParamsPaymentMethodOptionsBillie(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds are captured from the customer's account. - - If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. - """ - - class CreateParamsPaymentMethodOptionsBlik(TypedDict): - code: NotRequired[str] - """ - The 6-digit BLIK code that a customer has generated using their banking application. Can only be set on confirmation. - """ - setup_future_usage: NotRequired["Literal['']|Literal['none']"] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class CreateParamsPaymentMethodOptionsBoleto(TypedDict): - expires_after_days: NotRequired[int] - """ - The number of calendar days before a Boleto voucher expires. For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto invoice will expire on Wednesday at 23:59 America/Sao_Paulo time. - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class CreateParamsPaymentMethodOptionsCard(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds are captured from the customer's account. - - If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. - """ - cvc_token: NotRequired[str] - """ - A single-use `cvc_update` Token that represents a card CVC value. When provided, the CVC value will be verified during the card payment attempt. This parameter can only be provided during confirmation. - """ - installments: NotRequired[ - "PaymentIntent.CreateParamsPaymentMethodOptionsCardInstallments" - ] - """ - Installment configuration for payments attempted on this PaymentIntent. - - For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments). - """ - mandate_options: NotRequired[ - "PaymentIntent.CreateParamsPaymentMethodOptionsCardMandateOptions" - ] - """ - Configuration options for setting up an eMandate for cards issued in India. - """ - moto: NotRequired[bool] - """ - When specified, this parameter indicates that a transaction will be marked - as MOTO (Mail Order Telephone Order) and thus out of scope for SCA. This - parameter can only be provided during confirmation. - """ - network: NotRequired[ - Literal[ - "amex", - "cartes_bancaires", - "diners", - "discover", - "eftpos_au", - "girocard", - "interac", - "jcb", - "link", - "mastercard", - "unionpay", - "unknown", - "visa", - ] - ] - """ - Selected network to process this PaymentIntent on. Depends on the available networks of the card attached to the PaymentIntent. Can be only set confirm-time. - """ - request_decremental_authorization: NotRequired[ - Literal["if_available", "never"] - ] - """ - Request ability to [decrement the authorization](https://stripe.com/docs/payments/decremental-authorization) for this PaymentIntent. - """ - request_extended_authorization: NotRequired[ - Literal["if_available", "never"] - ] - """ - Request ability to [capture beyond the standard authorization validity window](https://stripe.com/docs/payments/extended-authorization) for this PaymentIntent. - """ - request_incremental_authorization: NotRequired[ - Literal["if_available", "never"] - ] - """ - Request ability to [increment the authorization](https://stripe.com/docs/payments/incremental-authorization) for this PaymentIntent. - """ - request_multicapture: NotRequired[Literal["if_available", "never"]] - """ - Request ability to make [multiple captures](https://stripe.com/docs/payments/multicapture) for this PaymentIntent. - """ - request_overcapture: NotRequired[Literal["if_available", "never"]] - """ - Request ability to [overcapture](https://stripe.com/docs/payments/overcapture) for this PaymentIntent. - """ - request_partial_authorization: NotRequired[ - Literal["if_available", "never"] - ] - """ - Request partial authorization on this PaymentIntent. - """ - request_three_d_secure: NotRequired[ - Literal["any", "automatic", "challenge"] - ] - """ - We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. - """ - require_cvc_recollection: NotRequired[bool] - """ - When enabled, using a card that is attached to a customer will require the CVC to be provided again (i.e. using the cvc_token parameter). - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - statement_descriptor_suffix_kana: NotRequired["Literal['']|str"] - """ - Provides information about a card payment that customers see on their statements. Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor that's set on the account to form the complete statement descriptor. Maximum 22 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 22 characters. - """ - statement_descriptor_suffix_kanji: NotRequired["Literal['']|str"] - """ - Provides information about a card payment that customers see on their statements. Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement descriptor that's set on the account to form the complete statement descriptor. Maximum 17 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 17 characters. - """ - statement_details: NotRequired[ - "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsCardStatementDetails" - ] - """ - Statement details for this payment intent. You can use this to override the merchant details shown on your customers' statements. - """ - three_d_secure: NotRequired[ - "PaymentIntent.CreateParamsPaymentMethodOptionsCardThreeDSecure" - ] - """ - If 3D Secure authentication was performed with a third-party provider, - the authentication details to use for this payment. - """ - - class CreateParamsPaymentMethodOptionsCardInstallments(TypedDict): - enabled: NotRequired[bool] - """ - Setting to true enables installments for this PaymentIntent. - This will cause the response to contain a list of available installment plans. - Setting to false will prevent any selected plan from applying to a charge. - """ - plan: NotRequired[ - "Literal['']|PaymentIntent.CreateParamsPaymentMethodOptionsCardInstallmentsPlan" - ] - """ - The selected installment plan to use for this payment attempt. - This parameter can only be provided during confirmation. - """ - - class CreateParamsPaymentMethodOptionsCardInstallmentsPlan(TypedDict): - count: NotRequired[int] - """ - For `fixed_count` installment plans, this is required. It represents the number of installment payments your customer will make to their credit card. - """ - interval: NotRequired[Literal["month"]] - """ - For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card. - One of `month`. - """ - type: Literal["bonus", "fixed_count", "revolving"] - """ - Type of installment plan, one of `fixed_count`, `bonus`, or `revolving`. - """ - - class CreateParamsPaymentMethodOptionsCardMandateOptions(TypedDict): - amount: int - """ - Amount to be charged for future payments. - """ - amount_type: Literal["fixed", "maximum"] - """ - One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. - """ - description: NotRequired[str] - """ - A description of the mandate or subscription that is meant to be displayed to the customer. - """ - end_date: NotRequired[int] - """ - End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. - """ - interval: Literal["day", "month", "sporadic", "week", "year"] - """ - Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`. - """ - interval_count: NotRequired[int] - """ - The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`. - """ - reference: str - """ - Unique identifier for the mandate or subscription. - """ - start_date: int - """ - Start date of the mandate or subscription. Start date should not be lesser than yesterday. - """ - supported_types: NotRequired[List[Literal["india"]]] - """ - Specifies the type of mandates supported. Possible values are `india`. - """ - - class CreateParamsPaymentMethodOptionsCardPresent(TypedDict): - request_extended_authorization: NotRequired[bool] - """ - Request ability to capture this payment beyond the standard [authorization validity window](https://stripe.com/docs/terminal/features/extended-authorizations#authorization-validity) - """ - request_incremental_authorization_support: NotRequired[bool] - """ - Request ability to [increment](https://stripe.com/docs/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://stripe.com/docs/api/payment_intents/confirm) response to verify support. - """ - routing: NotRequired[ - "PaymentIntent.CreateParamsPaymentMethodOptionsCardPresentRouting" - ] - """ - Network routing priority on co-branded EMV cards supporting domestic debit and international card schemes. - """ - - class CreateParamsPaymentMethodOptionsCardPresentRouting(TypedDict): - requested_priority: NotRequired[Literal["domestic", "international"]] - """ - Routing requested priority - """ - - class CreateParamsPaymentMethodOptionsCardStatementDetails(TypedDict): - address: NotRequired[ - "PaymentIntent.CreateParamsPaymentMethodOptionsCardStatementDetailsAddress" - ] - """ - Please pass in an address that is within your Stripe user account country - """ - phone: NotRequired[str] - """ - Phone number (e.g., a toll-free number that customers can call) - """ - - class CreateParamsPaymentMethodOptionsCardStatementDetailsAddress( - 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. - """ - - class CreateParamsPaymentMethodOptionsCardThreeDSecure(TypedDict): - ares_trans_status: NotRequired[ - Literal["A", "C", "I", "N", "R", "U", "Y"] - ] - """ - The `transStatus` returned from the card Issuer's ACS in the ARes. - """ - cryptogram: str - """ - The cryptogram, also known as the "authentication value" (AAV, CAVV or - AEVV). This value is 20 bytes, base64-encoded into a 28-character string. - (Most 3D Secure providers will return the base64-encoded version, which - is what you should specify here.) - """ - electronic_commerce_indicator: NotRequired[ - Literal["01", "02", "05", "06", "07"] - ] - """ - The Electronic Commerce Indicator (ECI) is returned by your 3D Secure - provider and indicates what degree of authentication was performed. - """ - exemption_indicator: NotRequired[Literal["low_risk", "none"]] - """ - The exemption requested via 3DS and accepted by the issuer at authentication time. - """ - network_options: NotRequired[ - "PaymentIntent.CreateParamsPaymentMethodOptionsCardThreeDSecureNetworkOptions" - ] - """ - Network specific 3DS fields. Network specific arguments require an - explicit card brand choice. The parameter `payment_method_options.card.network`` - must be populated accordingly - """ - requestor_challenge_indicator: NotRequired[str] - """ - The challenge indicator (`threeDSRequestorChallengeInd`) which was requested in the - AReq sent to the card Issuer's ACS. A string containing 2 digits from 01-99. - """ - transaction_id: str - """ - For 3D Secure 1, the XID. For 3D Secure 2, the Directory Server - Transaction ID (dsTransID). - """ - version: Literal["1.0.2", "2.1.0", "2.2.0"] - """ - The version of 3D Secure that was performed. - """ - - class CreateParamsPaymentMethodOptionsCardThreeDSecureNetworkOptions( - TypedDict, - ): - cartes_bancaires: NotRequired[ - "PaymentIntent.CreateParamsPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancaires" - ] - """ - Cartes Bancaires-specific 3DS fields. - """ - - class CreateParamsPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancaires( - TypedDict, - ): - cb_avalgo: Literal["0", "1", "2", "3", "4", "A"] - """ - The cryptogram calculation algorithm used by the card Issuer's ACS - to calculate the Authentication cryptogram. Also known as `cavvAlgorithm`. - messageExtension: CB-AVALGO - """ - cb_exemption: NotRequired[str] - """ - The exemption indicator returned from Cartes Bancaires in the ARes. - message extension: CB-EXEMPTION; string (4 characters) - This is a 3 byte bitmap (low significant byte first and most significant - bit first) that has been Base64 encoded - """ - cb_score: NotRequired[int] - """ - The risk score returned from Cartes Bancaires in the ARes. - message extension: CB-SCORE; numeric value 0-99 - """ - - class CreateParamsPaymentMethodOptionsCashapp(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds are captured from the customer's account. - - If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class CreateParamsPaymentMethodOptionsCrypto(TypedDict): - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class CreateParamsPaymentMethodOptionsCustomerBalance(TypedDict): - bank_transfer: NotRequired[ - "PaymentIntent.CreateParamsPaymentMethodOptionsCustomerBalanceBankTransfer" - ] - """ - Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. - """ - funding_type: NotRequired[Literal["bank_transfer"]] - """ - The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. - """ - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class CreateParamsPaymentMethodOptionsCustomerBalanceBankTransfer( - TypedDict, - ): - eu_bank_transfer: NotRequired[ - "PaymentIntent.CreateParamsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer" - ] - """ - Configuration for the eu_bank_transfer funding type. - """ - requested_address_types: NotRequired[ - List[ - Literal[ - "aba", - "iban", - "sepa", - "sort_code", - "spei", - "swift", - "zengin", - ] - ] - ] - """ - List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned. - - Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`. - """ - type: Literal[ - "eu_bank_transfer", - "gb_bank_transfer", - "jp_bank_transfer", - "mx_bank_transfer", - "us_bank_transfer", - ] - """ - The list of bank transfer types that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. - """ - - class CreateParamsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer( - TypedDict, - ): - country: str - """ - The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. - """ - - class CreateParamsPaymentMethodOptionsEps(TypedDict): - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class CreateParamsPaymentMethodOptionsFpx(TypedDict): - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class CreateParamsPaymentMethodOptionsGiropay(TypedDict): - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class CreateParamsPaymentMethodOptionsGopay(TypedDict): - setup_future_usage: NotRequired[Literal["none", "off_session"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class CreateParamsPaymentMethodOptionsGrabpay(TypedDict): - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class CreateParamsPaymentMethodOptionsIdBankTransfer(TypedDict): - expires_after: NotRequired[int] - """ - The UNIX timestamp until which the virtual bank account is valid. Permitted range is from 5 minutes from now until 31 days from now. If unset, it defaults to 3 days from now. - """ - expires_at: NotRequired[int] - """ - The UNIX timestamp until which the virtual bank account is valid. Permitted range is from now until 30 days from now. If unset, it defaults to 1 days from now. - """ - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class CreateParamsPaymentMethodOptionsIdeal(TypedDict): - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class CreateParamsPaymentMethodOptionsInteracPresent(TypedDict): - pass - - class CreateParamsPaymentMethodOptionsKakaoPay(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds are captured from the customer's account. - - If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - """ - - class CreateParamsPaymentMethodOptionsKlarna(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds are captured from the customer's account. - - If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. - """ - on_demand: NotRequired[ - "PaymentIntent.CreateParamsPaymentMethodOptionsKlarnaOnDemand" - ] - """ - On-demand details if setting up or charging an on-demand payment. - """ - preferred_locale: NotRequired[ - Literal[ - "cs-CZ", - "da-DK", - "de-AT", - "de-CH", - "de-DE", - "el-GR", - "en-AT", - "en-AU", - "en-BE", - "en-CA", - "en-CH", - "en-CZ", - "en-DE", - "en-DK", - "en-ES", - "en-FI", - "en-FR", - "en-GB", - "en-GR", - "en-IE", - "en-IT", - "en-NL", - "en-NO", - "en-NZ", - "en-PL", - "en-PT", - "en-RO", - "en-SE", - "en-US", - "es-ES", - "es-US", - "fi-FI", - "fr-BE", - "fr-CA", - "fr-CH", - "fr-FR", - "it-CH", - "it-IT", - "nb-NO", - "nl-BE", - "nl-NL", - "pl-PL", - "pt-PT", - "ro-RO", - "sv-FI", - "sv-SE", - ] - ] - """ - Preferred language of the Klarna authorization page that the customer is redirected to - """ - setup_future_usage: NotRequired[ - Literal["none", "off_session", "on_session"] - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - subscriptions: NotRequired[ - "Literal['']|List[PaymentIntent.CreateParamsPaymentMethodOptionsKlarnaSubscription]" - ] - """ - Subscription details if setting up or charging a subscription. - """ - - class CreateParamsPaymentMethodOptionsKlarnaOnDemand(TypedDict): - average_amount: NotRequired[int] - """ - Your average amount value. You can use a value across your customer base, or segment based on customer type, country, etc. - """ - maximum_amount: NotRequired[int] - """ - The maximum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. - """ - minimum_amount: NotRequired[int] - """ - The lowest or minimum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. - """ - purchase_interval: NotRequired[Literal["day", "month", "week", "year"]] - """ - Interval at which the customer is making purchases - """ - purchase_interval_count: NotRequired[int] - """ - The number of `purchase_interval` between charges - """ - - class CreateParamsPaymentMethodOptionsKlarnaSubscription(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Unit of time between subscription charges. - """ - interval_count: NotRequired[int] - """ - The number of intervals (specified in the `interval` attribute) between subscription charges. For example, `interval=month` and `interval_count=3` charges every 3 months. - """ - name: NotRequired[str] - """ - Name for subscription. - """ - next_billing: NotRequired[ - "PaymentIntent.CreateParamsPaymentMethodOptionsKlarnaSubscriptionNextBilling" - ] - """ - Describes the upcoming charge for this subscription. - """ - reference: str - """ - A non-customer-facing reference to correlate subscription charges in the Klarna app. Use a value that persists across subscription charges. - """ - - class CreateParamsPaymentMethodOptionsKlarnaSubscriptionNextBilling( - TypedDict, - ): - amount: int - """ - The amount of the next charge for the subscription. - """ - date: str - """ - The date of the next charge for the subscription in YYYY-MM-DD format. - """ - - class CreateParamsPaymentMethodOptionsKonbini(TypedDict): - confirmation_number: NotRequired["Literal['']|str"] - """ - An optional 10 to 11 digit numeric-only string determining the confirmation code at applicable convenience stores. Must not consist of only zeroes and could be rejected in case of insufficient uniqueness. We recommend to use the customer's phone number. - """ - expires_after_days: NotRequired["Literal['']|int"] - """ - The number of calendar days (between 1 and 60) after which Konbini payment instructions will expire. For example, if a PaymentIntent is confirmed with Konbini and `expires_after_days` set to 2 on Monday JST, the instructions will expire on Wednesday 23:59:59 JST. Defaults to 3 days. - """ - expires_at: NotRequired["Literal['']|int"] - """ - The timestamp at which the Konbini payment instructions will expire. Only one of `expires_after_days` or `expires_at` may be set. - """ - product_description: NotRequired["Literal['']|str"] - """ - A product descriptor of up to 22 characters, which will appear to customers at the convenience store. - """ - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class CreateParamsPaymentMethodOptionsKrCard(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds are captured from the customer's account. - - If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - """ - - class CreateParamsPaymentMethodOptionsLink(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds are captured from the customer's account. - - If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. - """ - persistent_token: NotRequired[str] - """ - [Deprecated] This is a legacy parameter that no longer has any function. - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class CreateParamsPaymentMethodOptionsMbWay(TypedDict): - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class CreateParamsPaymentMethodOptionsMobilepay(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds are captured from the customer's account. - - If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. - """ - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class CreateParamsPaymentMethodOptionsMultibanco(TypedDict): - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class CreateParamsPaymentMethodOptionsNaverPay(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds are captured from the customer's account. - - If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - """ - - class CreateParamsPaymentMethodOptionsNzBankAccount(TypedDict): - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - target_date: NotRequired[str] - """ - Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. - """ - - class CreateParamsPaymentMethodOptionsOxxo(TypedDict): - expires_after_days: NotRequired[int] - """ - The number of calendar days before an OXXO voucher expires. For example, if you create an OXXO voucher on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time. - """ - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class CreateParamsPaymentMethodOptionsP24(TypedDict): - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - tos_shown_and_accepted: NotRequired[bool] - """ - Confirm that the payer has accepted the P24 terms and conditions. - """ - - class CreateParamsPaymentMethodOptionsPayByBank(TypedDict): - pass - - class CreateParamsPaymentMethodOptionsPayco(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds are captured from the customer's account. - - If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. - """ - - class CreateParamsPaymentMethodOptionsPaynow(TypedDict): - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class CreateParamsPaymentMethodOptionsPaypal(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds will be captured from the customer's account. - """ - line_items: NotRequired[ - List[ - "PaymentIntent.CreateParamsPaymentMethodOptionsPaypalLineItem" - ] - ] - """ - The line items purchased by the customer. - """ - preferred_locale: NotRequired[ - Literal[ - "cs-CZ", - "da-DK", - "de-AT", - "de-DE", - "de-LU", - "el-GR", - "en-GB", - "en-US", - "es-ES", - "fi-FI", - "fr-BE", - "fr-FR", - "fr-LU", - "hu-HU", - "it-IT", - "nl-BE", - "nl-NL", - "pl-PL", - "pt-PT", - "sk-SK", - "sv-SE", - ] - ] - """ - [Preferred locale](https://stripe.com/docs/payments/paypal/supported-locales) of the PayPal checkout page that the customer is redirected to. - """ - reference: NotRequired[str] - """ - A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. - """ - reference_id: NotRequired[str] - """ - A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. - """ - risk_correlation_id: NotRequired[str] - """ - The risk correlation ID for an on-session payment using a saved PayPal payment method. - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - subsellers: NotRequired[List[str]] - """ - The Stripe connected account IDs of the sellers on the platform for this transaction (optional). Only allowed when [separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) are used. - """ - - class CreateParamsPaymentMethodOptionsPaypalLineItem(TypedDict): - category: NotRequired[ - Literal["digital_goods", "donation", "physical_goods"] - ] - """ - Type of the line item. - """ - description: NotRequired[str] - """ - Description of the line item. - """ - name: str - """ - Descriptive name of the line item. - """ - quantity: int - """ - Quantity of the line item. Must be a positive number. - """ - sku: NotRequired[str] - """ - Client facing stock keeping unit, article number or similar. - """ - sold_by: NotRequired[str] - """ - The Stripe account ID of the connected account that sells the item. - """ - tax: NotRequired[ - "PaymentIntent.CreateParamsPaymentMethodOptionsPaypalLineItemTax" - ] - """ - The tax information for the line item. - """ - unit_amount: int - """ - Price for a single unit of the line item in minor units. Cannot be a negative number. - """ - - class CreateParamsPaymentMethodOptionsPaypalLineItemTax(TypedDict): - amount: int - """ - The tax for a single unit of the line item in minor units. Cannot be a negative number. - """ - behavior: Literal["exclusive", "inclusive"] - """ - The tax behavior for the line item. - """ - - class CreateParamsPaymentMethodOptionsPaypay(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds are captured from the customer's account. - - If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. - """ - - class CreateParamsPaymentMethodOptionsPayto(TypedDict): - mandate_options: NotRequired[ - "PaymentIntent.CreateParamsPaymentMethodOptionsPaytoMandateOptions" - ] - """ - Additional fields for Mandate creation. Only `purpose` field is configurable for PayTo PaymentIntent with `setup_future_usage=none`. Other fields are only applicable to PayTo PaymentIntent with `setup_future_usage=off_session` - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class CreateParamsPaymentMethodOptionsPaytoMandateOptions(TypedDict): - amount: NotRequired[int] - """ - Amount that will be collected. It is required when `amount_type` is `fixed`. - """ - amount_type: NotRequired[Literal["fixed", "maximum"]] - """ - The type of amount that will be collected. The amount charged must be exact or up to the value of `amount` param for `fixed` or `maximum` type respectively. - """ - end_date: NotRequired[str] - """ - Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no end date. - """ - payment_schedule: NotRequired[ - Literal[ - "adhoc", - "annual", - "daily", - "fortnightly", - "monthly", - "quarterly", - "semi_annual", - "weekly", - ] - ] - """ - The periodicity at which payments will be collected. - """ - payments_per_period: NotRequired[int] - """ - The number of payments that will be made during a payment period. Defaults to 1 except for when `payment_schedule` is `adhoc`. In that case, it defaults to no limit. - """ - purpose: NotRequired[ - Literal[ - "dependant_support", - "government", - "loan", - "mortgage", - "other", - "pension", - "personal", - "retail", - "salary", - "tax", - "utility", - ] - ] - """ - The purpose for which payments are made. Defaults to retail. - """ - - class CreateParamsPaymentMethodOptionsPix(TypedDict): - amount_includes_iof: NotRequired[Literal["always", "never"]] - """ - Determines if the amount includes the IOF tax. Defaults to `never`. - """ - expires_after_seconds: NotRequired[int] - """ - The number of seconds (between 10 and 1209600) after which Pix payment will expire. Defaults to 86400 seconds. - """ - expires_at: NotRequired[int] - """ - The timestamp at which the Pix expires (between 10 and 1209600 seconds in the future). Defaults to 1 day in the future. - """ - mandate_options: NotRequired[ - "PaymentIntent.CreateParamsPaymentMethodOptionsPixMandateOptions" - ] - """ - Additional fields for mandate creation. Only applicable when `setup_future_usage=off_session`. - """ - setup_future_usage: NotRequired[Literal["none", "off_session"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class CreateParamsPaymentMethodOptionsPixMandateOptions(TypedDict): - amount: NotRequired[int] - """ - Amount to be charged for future payments. Required when `amount_type=fixed`. If not provided for `amount_type=maximum`, defaults to 40000. - """ - amount_includes_iof: NotRequired[Literal["always", "never"]] - """ - Determines if the amount includes the IOF tax. Defaults to `never`. - """ - amount_type: NotRequired[Literal["fixed", "maximum"]] - """ - Type of amount. Defaults to `maximum`. - """ - currency: NotRequired[str] - """ - Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Only `brl` is supported currently. - """ - end_date: NotRequired[str] - """ - Date when the mandate expires and no further payments will be charged, in `YYYY-MM-DD`. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. - """ - payment_schedule: NotRequired[ - Literal["halfyearly", "monthly", "quarterly", "weekly", "yearly"] - ] - """ - Schedule at which the future payments will be charged. Defaults to `weekly`. - """ - reference: NotRequired[str] - """ - Subscription name displayed to buyers in their bank app. Defaults to the displayable business name. - """ - start_date: NotRequired[str] - """ - Start date of the mandate, in `YYYY-MM-DD`. Start date should be at least 3 days in the future. Defaults to 3 days after the current date. - """ - - class CreateParamsPaymentMethodOptionsPromptpay(TypedDict): - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class CreateParamsPaymentMethodOptionsQris(TypedDict): - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class CreateParamsPaymentMethodOptionsRechnung(TypedDict): - pass - - class CreateParamsPaymentMethodOptionsRevolutPay(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds are captured from the customer's account. - - If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - """ - - class CreateParamsPaymentMethodOptionsSamsungPay(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds are captured from the customer's account. - - If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. - """ - - class CreateParamsPaymentMethodOptionsSatispay(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds are captured from the customer's account. - - If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. - """ - - class CreateParamsPaymentMethodOptionsSepaDebit(TypedDict): - mandate_options: NotRequired[ - "PaymentIntent.CreateParamsPaymentMethodOptionsSepaDebitMandateOptions" - ] - """ - Additional fields for Mandate creation - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - target_date: NotRequired[str] - """ - Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. - """ - - class CreateParamsPaymentMethodOptionsSepaDebitMandateOptions(TypedDict): - reference_prefix: NotRequired["Literal['']|str"] - """ - Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'. - """ - - class CreateParamsPaymentMethodOptionsShopeepay(TypedDict): - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class CreateParamsPaymentMethodOptionsSofort(TypedDict): - preferred_language: NotRequired[ - "Literal['']|Literal['de', 'en', 'es', 'fr', 'it', 'nl', 'pl']" - ] - """ - Language shown to the payer on redirect. - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class CreateParamsPaymentMethodOptionsStripeBalance(TypedDict): - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class CreateParamsPaymentMethodOptionsSwish(TypedDict): - reference: NotRequired["Literal['']|str"] - """ - A reference for this payment to be displayed in the Swish app. - """ - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class CreateParamsPaymentMethodOptionsTwint(TypedDict): - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class CreateParamsPaymentMethodOptionsUsBankAccount(TypedDict): - financial_connections: NotRequired[ - "PaymentIntent.CreateParamsPaymentMethodOptionsUsBankAccountFinancialConnections" - ] - """ - Additional fields for Financial Connections Session creation - """ - mandate_options: NotRequired[ - "PaymentIntent.CreateParamsPaymentMethodOptionsUsBankAccountMandateOptions" - ] - """ - Additional fields for Mandate creation - """ - networks: NotRequired[ - "PaymentIntent.CreateParamsPaymentMethodOptionsUsBankAccountNetworks" - ] - """ - Additional fields for network related functions - """ - preferred_settlement_speed: NotRequired[ - "Literal['']|Literal['fastest', 'standard']" - ] - """ - Preferred transaction settlement speed - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - target_date: NotRequired[str] - """ - Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. - """ - verification_method: NotRequired[ - Literal["automatic", "instant", "microdeposits"] - ] - """ - Bank account verification method. - """ - - class CreateParamsPaymentMethodOptionsUsBankAccountFinancialConnections( - TypedDict, - ): - filters: NotRequired[ - "PaymentIntent.CreateParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters" - ] - """ - Provide filters for the linked accounts that the customer can select for the payment method. - """ - manual_entry: NotRequired[ - "PaymentIntent.CreateParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsManualEntry" - ] - """ - Customize manual entry behavior - """ - permissions: NotRequired[ - List[ - Literal[ - "balances", "ownership", "payment_method", "transactions" - ] - ] - ] - """ - The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. - """ - prefetch: NotRequired[ - List[ - Literal[ - "balances", - "inferred_balances", - "ownership", - "transactions", - ] - ] - ] - """ - List of data features that you would like to retrieve upon account creation. - """ - return_url: NotRequired[str] - """ - For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. - """ - - class CreateParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters( - TypedDict, - ): - account_subcategories: NotRequired[ - List[Literal["checking", "savings"]] - ] - """ - The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`. - """ - institution: NotRequired[str] - """ - ID of the institution to use to filter for selectable accounts. - """ - - class CreateParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsManualEntry( - TypedDict, - ): - mode: Literal["automatic", "custom"] - """ - Settings for configuring manual entry of account details. - """ - - class CreateParamsPaymentMethodOptionsUsBankAccountMandateOptions( - TypedDict, - ): - collection_method: NotRequired["Literal['']|Literal['paper']"] - """ - The method used to collect offline mandate customer acceptance. - """ - - class CreateParamsPaymentMethodOptionsUsBankAccountNetworks(TypedDict): - requested: NotRequired[List[Literal["ach", "us_domestic_wire"]]] - """ - Triggers validations to run across the selected networks - """ - - class CreateParamsPaymentMethodOptionsWechatPay(TypedDict): - app_id: NotRequired[str] - """ - The app ID registered with WeChat Pay. Only required when client is ios or android. - """ - client: NotRequired[Literal["android", "ios", "web"]] - """ - The client type that the end customer will pay from - """ - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class CreateParamsPaymentMethodOptionsZip(TypedDict): - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class CreateParamsRadarOptions(TypedDict): - session: NotRequired[str] - """ - A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. - """ - - class CreateParamsShipping(TypedDict): - address: "PaymentIntent.CreateParamsShippingAddress" - """ - Shipping address. - """ - carrier: NotRequired[str] - """ - The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. - """ - name: str - """ - Recipient name. - """ - phone: NotRequired[str] - """ - Recipient phone (including extension). - """ - tracking_number: NotRequired[str] - """ - The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. - """ - - class CreateParamsShippingAddress(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. - """ - - class CreateParamsTransferData(TypedDict): - amount: NotRequired[int] - """ - The amount that will be transferred automatically when a charge succeeds. - The amount is capped at the total transaction amount and if no amount is set, - the full amount is transferred. - - If you intend to collect a fee and you need a more robust reporting experience, using - [application_fee_amount](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-application_fee_amount) - might be a better fit for your integration. - """ - destination: str - """ - If specified, successful charges will be attributed to the destination - account for tax reporting, and the funds from charges will be transferred - to the destination account. The ID of the resulting transfer will be - returned on the successful charge's `transfer` field. - """ - - class DecrementAuthorizationParams(RequestOptions): - amount: int - """ - The updated total amount that you intend to collect from the cardholder. This amount must be smaller than the currently authorized amount and greater than the already captured amount. - """ - application_fee_amount: NotRequired[int] - """ - The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total amount captured. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). - """ - description: NotRequired[str] - """ - An arbitrary string attached to the object. Often useful for displaying to users. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - hooks: NotRequired["PaymentIntent.DecrementAuthorizationParamsHooks"] - """ - Automations to be run during the PaymentIntent lifecycle - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - transfer_data: NotRequired[ - "PaymentIntent.DecrementAuthorizationParamsTransferData" - ] - """ - The parameters used to automatically create a transfer after the payment is captured. - Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). - """ - - class DecrementAuthorizationParamsHooks(TypedDict): - inputs: NotRequired[ - "PaymentIntent.DecrementAuthorizationParamsHooksInputs" - ] - """ - Arguments passed in automations - """ - - class DecrementAuthorizationParamsHooksInputs(TypedDict): - tax: NotRequired[ - "PaymentIntent.DecrementAuthorizationParamsHooksInputsTax" - ] - """ - Tax arguments for automations - """ - - class DecrementAuthorizationParamsHooksInputsTax(TypedDict): - calculation: Union[Literal[""], str] - """ - The [TaxCalculation](https://stripe.com/docs/api/tax/calculations) id - """ - - class DecrementAuthorizationParamsTransferData(TypedDict): - amount: NotRequired[int] - """ - The amount that will be transferred automatically when a charge succeeds. - """ - - class IncrementAuthorizationParams(RequestOptions): - amount: int - """ - The updated total amount that you intend to collect from the cardholder. This amount must be greater than the currently authorized amount. - """ - amount_details: NotRequired[ - "PaymentIntent.IncrementAuthorizationParamsAmountDetails" - ] - """ - Provides industry-specific information about the amount. - """ - application_fee_amount: NotRequired[int] - """ - The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total amount captured. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). - """ - description: NotRequired[str] - """ - An arbitrary string attached to the object. Often useful for displaying to users. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - hooks: NotRequired["PaymentIntent.IncrementAuthorizationParamsHooks"] - """ - Automations to be run during the PaymentIntent lifecycle - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - payment_details: NotRequired[ - "PaymentIntent.IncrementAuthorizationParamsPaymentDetails" - ] - """ - Provides industry-specific information about the charge. - """ - payment_method_options: NotRequired[ - "PaymentIntent.IncrementAuthorizationParamsPaymentMethodOptions" - ] - """ - Payment method-specific configuration for this PaymentIntent. - """ - statement_descriptor: NotRequired[str] - """ - Text that appears on the customer's statement as the statement descriptor for a non-card or card charge. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see [the Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors). - """ - transfer_data: NotRequired[ - "PaymentIntent.IncrementAuthorizationParamsTransferData" - ] - """ - The parameters used to automatically create a transfer after the payment is captured. - Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). - """ - - class IncrementAuthorizationParamsAmountDetails(TypedDict): - discount_amount: NotRequired["Literal['']|int"] - """ - The total discount applied on the transaction. - """ - line_items: NotRequired[ - "Literal['']|List[PaymentIntent.IncrementAuthorizationParamsAmountDetailsLineItem]" - ] - """ - A list of line items, each containing information about a product in the PaymentIntent. There is a maximum of 100 line items. - """ - shipping: NotRequired[ - "Literal['']|PaymentIntent.IncrementAuthorizationParamsAmountDetailsShipping" - ] - """ - Contains information about the shipping portion of the amount. - """ - tax: NotRequired[ - "Literal['']|PaymentIntent.IncrementAuthorizationParamsAmountDetailsTax" - ] - """ - Contains information about the tax portion of the amount. - """ - - class IncrementAuthorizationParamsAmountDetailsLineItem(TypedDict): - discount_amount: NotRequired[int] - """ - The amount an item was discounted for. Positive integer. - """ - payment_method_options: NotRequired[ - "PaymentIntent.IncrementAuthorizationParamsAmountDetailsLineItemPaymentMethodOptions" - ] - """ - Payment method-specific information for line items. - """ - product_code: NotRequired[str] - """ - Unique identifier of the product. At most 12 characters long. - """ - product_name: str - """ - Name of the product. At most 100 characters long. - """ - quantity: int - """ - Number of items of the product. Positive integer. - """ - tax: NotRequired[ - "PaymentIntent.IncrementAuthorizationParamsAmountDetailsLineItemTax" - ] - """ - Contains information about the tax on the item. - """ - unit_cost: int - """ - Cost of the product. Non-negative integer. - """ - unit_of_measure: NotRequired[str] - """ - A unit of measure for the line item, such as gallons, feet, meters, etc. - """ - - class IncrementAuthorizationParamsAmountDetailsLineItemPaymentMethodOptions( - TypedDict, - ): - card: NotRequired[ - "PaymentIntent.IncrementAuthorizationParamsAmountDetailsLineItemPaymentMethodOptionsCard" - ] - """ - This sub-hash contains line item details that are specific to `card` payment method." - """ - card_present: NotRequired[ - "PaymentIntent.IncrementAuthorizationParamsAmountDetailsLineItemPaymentMethodOptionsCardPresent" - ] - """ - This sub-hash contains line item details that are specific to `card_present` payment method." - """ - klarna: NotRequired[ - "PaymentIntent.IncrementAuthorizationParamsAmountDetailsLineItemPaymentMethodOptionsKlarna" - ] - """ - This sub-hash contains line item details that are specific to `klarna` payment method." - """ - paypal: NotRequired[ - "PaymentIntent.IncrementAuthorizationParamsAmountDetailsLineItemPaymentMethodOptionsPaypal" - ] - """ - This sub-hash contains line item details that are specific to `paypal` payment method." - """ - - class IncrementAuthorizationParamsAmountDetailsLineItemPaymentMethodOptionsCard( - TypedDict, - ): - commodity_code: NotRequired[str] - """ - Identifier that categorizes the items being purchased using a standardized commodity scheme such as (but not limited to) UNSPSC, NAICS, NAPCS, etc. - """ - - class IncrementAuthorizationParamsAmountDetailsLineItemPaymentMethodOptionsCardPresent( - TypedDict, - ): - commodity_code: NotRequired[str] - """ - Identifier that categorizes the items being purchased using a standardized commodity scheme such as (but not limited to) UNSPSC, NAICS, NAPCS, etc. - """ - - class IncrementAuthorizationParamsAmountDetailsLineItemPaymentMethodOptionsKlarna( - TypedDict, - ): - image_url: NotRequired[str] - """ - URL to an image for the product. Max length, 4096 characters. - """ - product_url: NotRequired[str] - """ - URL to the product page. Max length, 4096 characters. - """ - subscription_reference: NotRequired[str] - """ - Reference for the subscription this line item is for. - """ - - class IncrementAuthorizationParamsAmountDetailsLineItemPaymentMethodOptionsPaypal( - TypedDict, - ): - category: NotRequired[ - Literal["digital_goods", "donation", "physical_goods"] - ] - """ - Type of the line item. - """ - description: NotRequired[str] - """ - Description of the line item. - """ - sold_by: NotRequired[str] - """ - The Stripe account ID of the connected account that sells the item. - """ - - class IncrementAuthorizationParamsAmountDetailsLineItemTax(TypedDict): - total_tax_amount: int - """ - The total tax on an item. Non-negative integer. - """ - - class IncrementAuthorizationParamsAmountDetailsShipping(TypedDict): - amount: NotRequired["Literal['']|int"] - """ - Portion of the amount that is for shipping. - """ - from_postal_code: NotRequired["Literal['']|str"] - """ - The postal code that represents the shipping source. - """ - to_postal_code: NotRequired["Literal['']|str"] - """ - The postal code that represents the shipping destination. - """ - - class IncrementAuthorizationParamsAmountDetailsTax(TypedDict): - total_tax_amount: int - """ - Total portion of the amount that is for tax. - """ - - class IncrementAuthorizationParamsHooks(TypedDict): - inputs: NotRequired[ - "PaymentIntent.IncrementAuthorizationParamsHooksInputs" - ] - """ - Arguments passed in automations - """ - - class IncrementAuthorizationParamsHooksInputs(TypedDict): - tax: NotRequired[ - "PaymentIntent.IncrementAuthorizationParamsHooksInputsTax" - ] - """ - Tax arguments for automations - """ - - class IncrementAuthorizationParamsHooksInputsTax(TypedDict): - calculation: Union[Literal[""], str] - """ - The [TaxCalculation](https://stripe.com/docs/api/tax/calculations) id - """ - - class IncrementAuthorizationParamsPaymentDetails(TypedDict): - customer_reference: NotRequired["Literal['']|str"] - """ - Some customers might be required by their company or organization to provide this information. If so, provide this value. Otherwise you can ignore this field. - """ - order_reference: NotRequired["Literal['']|str"] - """ - A unique value assigned by the business to identify the transaction. - """ - - class IncrementAuthorizationParamsPaymentMethodOptions(TypedDict): - card: NotRequired[ - "PaymentIntent.IncrementAuthorizationParamsPaymentMethodOptionsCard" - ] - """ - Configuration for any card payments attempted on this PaymentIntent. - """ - - class IncrementAuthorizationParamsPaymentMethodOptionsCard(TypedDict): - request_partial_authorization: NotRequired[ - Literal["if_available", "never"] - ] - """ - Request partial authorization on this PaymentIntent. - """ - - class IncrementAuthorizationParamsTransferData(TypedDict): - amount: NotRequired[int] - """ - The amount that will be transferred automatically when a charge succeeds. - """ - - class ListAmountDetailsLineItemsParams(RequestOptions): - 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 ListParams(RequestOptions): - created: NotRequired["PaymentIntent.ListParamsCreated|int"] - """ - A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp or a dictionary with a number of different query options. - """ - customer: NotRequired[str] - """ - Only return PaymentIntents for the customer that this customer ID specifies. - """ - customer_account: NotRequired[str] - """ - Only return PaymentIntents for the account that this ID specifies. - """ - 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 ListParamsCreated(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) - """ - - class ModifyParams(RequestOptions): - amount: NotRequired[int] - """ - Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). - """ - amount_details: NotRequired[ - "Literal['']|PaymentIntent.ModifyParamsAmountDetails" - ] - """ - Provides industry-specific information about the amount. - """ - application_fee_amount: NotRequired["Literal['']|int"] - """ - The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total amount captured. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). - """ - capture_method: NotRequired[ - Literal["automatic", "automatic_async", "manual"] - ] - """ - Controls when the funds will be captured from the customer's account. - """ - currency: NotRequired[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). - """ - customer: NotRequired[str] - """ - ID of the Customer this PaymentIntent belongs to, if one exists. - - Payment methods attached to other Customers cannot be used with this PaymentIntent. - - If [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) is set and this PaymentIntent's payment method is not `card_present`, then the payment method attaches to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. - """ - customer_account: NotRequired[str] - """ - ID of the Account this PaymentIntent belongs to, if one exists. - - Payment methods attached to other Accounts cannot be used with this PaymentIntent. - - If [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) is set and this PaymentIntent's payment method is not `card_present`, then the payment method attaches to the Account after the PaymentIntent has been confirmed and any required actions from the user are complete. If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Account instead. - """ - description: NotRequired[str] - """ - An arbitrary string attached to the object. Often useful for displaying to users. - """ - excluded_payment_method_types: NotRequired[ - "Literal['']|List[Literal['acss_debit', 'affirm', 'afterpay_clearpay', 'alipay', 'alma', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'billie', 'blik', 'boleto', 'card', 'cashapp', 'crypto', 'customer_balance', 'eps', 'fpx', 'giropay', 'gopay', 'grabpay', 'id_bank_transfer', 'ideal', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'mb_way', 'mobilepay', 'multibanco', 'naver_pay', 'nz_bank_account', 'oxxo', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'paypay', 'payto', 'pix', 'promptpay', 'qris', 'rechnung', 'revolut_pay', 'samsung_pay', 'satispay', 'sepa_debit', 'shopeepay', 'sofort', 'stripe_balance', 'swish', 'twint', 'us_bank_account', 'wechat_pay', 'zip']]" - ] - """ - The list of payment method types to exclude from use with this payment. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - fx_quote: NotRequired[str] - """ - The FX rate in the quote is validated and used to convert the presentment amount to the settlement amount. - """ - hooks: NotRequired["PaymentIntent.ModifyParamsHooks"] - """ - Automations to be run during the PaymentIntent lifecycle - """ - mandate_data: NotRequired["PaymentIntent.ModifyParamsMandateData"] - """ - This hash contains details about the Mandate to create. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - payment_details: NotRequired[ - "Literal['']|PaymentIntent.ModifyParamsPaymentDetails" - ] - """ - Provides industry-specific information about the charge. - """ - payment_method: NotRequired[str] - payment_method_configuration: NotRequired[str] - """ - The ID of the [payment method configuration](https://stripe.com/docs/api/payment_method_configurations) to use with this PaymentIntent. - """ - payment_method_data: NotRequired[ - "PaymentIntent.ModifyParamsPaymentMethodData" - ] - """ - If provided, this hash will be used to create a PaymentMethod. The new PaymentMethod will appear - in the [payment_method](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-payment_method) - property on the PaymentIntent. - """ - payment_method_options: NotRequired[ - "PaymentIntent.ModifyParamsPaymentMethodOptions" - ] - """ - Payment-method-specific configuration for this PaymentIntent. - """ - payment_method_types: NotRequired[List[str]] - """ - The list of payment method types (for example, card) that this PaymentIntent can use. Use `automatic_payment_methods` to manage payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). A list of valid payment method types can be found [here](https://docs.stripe.com/api/payment_methods/object#payment_method_object-type). - """ - receipt_email: NotRequired["Literal['']|str"] - """ - Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['off_session', 'on_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - shipping: NotRequired["Literal['']|PaymentIntent.ModifyParamsShipping"] - """ - Shipping information for this PaymentIntent. - """ - statement_descriptor: NotRequired[str] - """ - Text that appears on the customer's statement as the statement descriptor for a non-card charge. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see [the Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors). - - Setting this value for a card charge returns an error. For card charges, set the [statement_descriptor_suffix](https://docs.stripe.com/get-started/account/statement-descriptors#dynamic) instead. - """ - statement_descriptor_suffix: NotRequired[str] - """ - Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. - """ - transfer_data: NotRequired["PaymentIntent.ModifyParamsTransferData"] - """ - Use this parameter to automatically create a Transfer when the payment succeeds. Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). - """ - transfer_group: NotRequired[str] - """ - A string that identifies the resulting payment as part of a group. You can only provide `transfer_group` if it hasn't been set. Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). - """ - - class ModifyParamsAmountDetails(TypedDict): - discount_amount: NotRequired["Literal['']|int"] - """ - The total discount applied on the transaction. - """ - line_items: NotRequired[ - "Literal['']|List[PaymentIntent.ModifyParamsAmountDetailsLineItem]" - ] - """ - A list of line items, each containing information about a product in the PaymentIntent. There is a maximum of 100 line items. - """ - shipping: NotRequired[ - "Literal['']|PaymentIntent.ModifyParamsAmountDetailsShipping" - ] - """ - Contains information about the shipping portion of the amount. - """ - tax: NotRequired[ - "Literal['']|PaymentIntent.ModifyParamsAmountDetailsTax" - ] - """ - Contains information about the tax portion of the amount. - """ - - class ModifyParamsAmountDetailsLineItem(TypedDict): - discount_amount: NotRequired[int] - """ - The amount an item was discounted for. Positive integer. - """ - payment_method_options: NotRequired[ - "PaymentIntent.ModifyParamsAmountDetailsLineItemPaymentMethodOptions" - ] - """ - Payment method-specific information for line items. - """ - product_code: NotRequired[str] - """ - Unique identifier of the product. At most 12 characters long. - """ - product_name: str - """ - Name of the product. At most 100 characters long. - """ - quantity: int - """ - Number of items of the product. Positive integer. - """ - tax: NotRequired["PaymentIntent.ModifyParamsAmountDetailsLineItemTax"] - """ - Contains information about the tax on the item. - """ - unit_cost: int - """ - Cost of the product. Non-negative integer. - """ - unit_of_measure: NotRequired[str] - """ - A unit of measure for the line item, such as gallons, feet, meters, etc. - """ - - class ModifyParamsAmountDetailsLineItemPaymentMethodOptions(TypedDict): - card: NotRequired[ - "PaymentIntent.ModifyParamsAmountDetailsLineItemPaymentMethodOptionsCard" - ] - """ - This sub-hash contains line item details that are specific to `card` payment method." - """ - card_present: NotRequired[ - "PaymentIntent.ModifyParamsAmountDetailsLineItemPaymentMethodOptionsCardPresent" - ] - """ - This sub-hash contains line item details that are specific to `card_present` payment method." - """ - klarna: NotRequired[ - "PaymentIntent.ModifyParamsAmountDetailsLineItemPaymentMethodOptionsKlarna" - ] - """ - This sub-hash contains line item details that are specific to `klarna` payment method." - """ - paypal: NotRequired[ - "PaymentIntent.ModifyParamsAmountDetailsLineItemPaymentMethodOptionsPaypal" - ] - """ - This sub-hash contains line item details that are specific to `paypal` payment method." - """ - - class ModifyParamsAmountDetailsLineItemPaymentMethodOptionsCard(TypedDict): - commodity_code: NotRequired[str] - """ - Identifier that categorizes the items being purchased using a standardized commodity scheme such as (but not limited to) UNSPSC, NAICS, NAPCS, etc. - """ - - class ModifyParamsAmountDetailsLineItemPaymentMethodOptionsCardPresent( - TypedDict, - ): - commodity_code: NotRequired[str] - """ - Identifier that categorizes the items being purchased using a standardized commodity scheme such as (but not limited to) UNSPSC, NAICS, NAPCS, etc. - """ - - class ModifyParamsAmountDetailsLineItemPaymentMethodOptionsKlarna( - TypedDict, - ): - image_url: NotRequired[str] - """ - URL to an image for the product. Max length, 4096 characters. - """ - product_url: NotRequired[str] - """ - URL to the product page. Max length, 4096 characters. - """ - subscription_reference: NotRequired[str] - """ - Reference for the subscription this line item is for. - """ - - class ModifyParamsAmountDetailsLineItemPaymentMethodOptionsPaypal( - TypedDict, - ): - category: NotRequired[ - Literal["digital_goods", "donation", "physical_goods"] - ] - """ - Type of the line item. - """ - description: NotRequired[str] - """ - Description of the line item. - """ - sold_by: NotRequired[str] - """ - The Stripe account ID of the connected account that sells the item. - """ - - class ModifyParamsAmountDetailsLineItemTax(TypedDict): - total_tax_amount: int - """ - The total tax on an item. Non-negative integer. - """ - - class ModifyParamsAmountDetailsShipping(TypedDict): - amount: NotRequired["Literal['']|int"] - """ - Portion of the amount that is for shipping. - """ - from_postal_code: NotRequired["Literal['']|str"] - """ - The postal code that represents the shipping source. - """ - to_postal_code: NotRequired["Literal['']|str"] - """ - The postal code that represents the shipping destination. - """ - - class ModifyParamsAmountDetailsTax(TypedDict): - total_tax_amount: int - """ - Total portion of the amount that is for tax. - """ - - class ModifyParamsHooks(TypedDict): - inputs: NotRequired["PaymentIntent.ModifyParamsHooksInputs"] - """ - Arguments passed in automations - """ - - class ModifyParamsHooksInputs(TypedDict): - tax: NotRequired["PaymentIntent.ModifyParamsHooksInputsTax"] - """ - Tax arguments for automations - """ - - class ModifyParamsHooksInputsTax(TypedDict): - calculation: Union[Literal[""], str] - """ - The [TaxCalculation](https://stripe.com/docs/api/tax/calculations) id - """ - - class ModifyParamsMandateData(TypedDict): - customer_acceptance: ( - "PaymentIntent.ModifyParamsMandateDataCustomerAcceptance" - ) - """ - This hash contains details about the customer acceptance of the Mandate. - """ - - class ModifyParamsMandateDataCustomerAcceptance(TypedDict): - online: "PaymentIntent.ModifyParamsMandateDataCustomerAcceptanceOnline" - """ - If this is a Mandate accepted online, this hash contains details about the online acceptance. - """ - type: Literal["online"] - """ - The type of customer acceptance information included with the Mandate. - """ - - class ModifyParamsMandateDataCustomerAcceptanceOnline(TypedDict): - ip_address: NotRequired[str] - """ - The IP address from which the Mandate was accepted by the customer. - """ - user_agent: NotRequired[str] - """ - The user agent of the browser from which the Mandate was accepted by the customer. - """ - - class ModifyParamsPaymentDetails(TypedDict): - car_rental: NotRequired[ - "PaymentIntent.ModifyParamsPaymentDetailsCarRental" - ] - """ - Car rental details for this PaymentIntent. - """ - customer_reference: NotRequired["Literal['']|str"] - """ - Some customers might be required by their company or organization to provide this information. If so, provide this value. Otherwise you can ignore this field. - """ - event_details: NotRequired[ - "PaymentIntent.ModifyParamsPaymentDetailsEventDetails" - ] - """ - Event details for this PaymentIntent - """ - flight: NotRequired["PaymentIntent.ModifyParamsPaymentDetailsFlight"] - """ - Flight reservation details for this PaymentIntent - """ - lodging: NotRequired["PaymentIntent.ModifyParamsPaymentDetailsLodging"] - """ - Lodging reservation details for this PaymentIntent - """ - order_reference: NotRequired["Literal['']|str"] - """ - A unique value assigned by the business to identify the transaction. - """ - subscription: NotRequired[ - "PaymentIntent.ModifyParamsPaymentDetailsSubscription" - ] - """ - Subscription details for this PaymentIntent - """ - - class ModifyParamsPaymentDetailsCarRental(TypedDict): - affiliate: NotRequired[ - "PaymentIntent.ModifyParamsPaymentDetailsCarRentalAffiliate" - ] - """ - Affiliate details for this purchase. - """ - booking_number: str - """ - The booking number associated with the car rental. - """ - car_class_code: NotRequired[str] - """ - Class code of the car. - """ - car_make: NotRequired[str] - """ - Make of the car. - """ - car_model: NotRequired[str] - """ - Model of the car. - """ - company: NotRequired[str] - """ - The name of the rental car company. - """ - customer_service_phone_number: NotRequired[str] - """ - The customer service phone number of the car rental company. - """ - days_rented: int - """ - Number of days the car is being rented. - """ - delivery: NotRequired[ - "PaymentIntent.ModifyParamsPaymentDetailsCarRentalDelivery" - ] - """ - Delivery details for this purchase. - """ - distance: NotRequired[ - "PaymentIntent.ModifyParamsPaymentDetailsCarRentalDistance" - ] - """ - The details of the distance traveled during the rental period. - """ - drivers: NotRequired[ - List["PaymentIntent.ModifyParamsPaymentDetailsCarRentalDriver"] - ] - """ - The details of the passengers in the travel reservation - """ - extra_charges: NotRequired[ - List[ - Literal[ - "extra_mileage", - "gas", - "late_return", - "one_way_service", - "parking_violation", - ] - ] - ] - """ - List of additional charges being billed. - """ - no_show: NotRequired[bool] - """ - Indicates if the customer did not keep nor cancel their booking. - """ - pickup_address: NotRequired[ - "PaymentIntent.ModifyParamsPaymentDetailsCarRentalPickupAddress" - ] - """ - Car pick-up address. - """ - pickup_at: int - """ - Car pick-up time. Measured in seconds since the Unix epoch. - """ - pickup_location_name: NotRequired[str] - """ - Name of the pickup location. - """ - rate_amount: NotRequired[int] - """ - Rental rate. - """ - rate_interval: NotRequired[Literal["day", "month", "week"]] - """ - The frequency at which the rate amount is applied. One of `day`, `week` or `month` - """ - renter_name: NotRequired[str] - """ - The name of the person or entity renting the car. - """ - return_address: NotRequired[ - "PaymentIntent.ModifyParamsPaymentDetailsCarRentalReturnAddress" - ] - """ - Car return address. - """ - return_at: int - """ - Car return time. Measured in seconds since the Unix epoch. - """ - return_location_name: NotRequired[str] - """ - Name of the return location. - """ - tax_exempt: NotRequired[bool] - """ - Indicates whether the goods or services are tax-exempt or tax is not collected. - """ - vehicle_identification_number: NotRequired[str] - """ - The vehicle identification number. - """ - - class ModifyParamsPaymentDetailsCarRentalAffiliate(TypedDict): - name: str - """ - The name of the affiliate that originated the purchase. - """ - - class ModifyParamsPaymentDetailsCarRentalDelivery(TypedDict): - mode: NotRequired[Literal["email", "phone", "pickup", "post"]] - """ - The delivery method for the payment - """ - recipient: NotRequired[ - "PaymentIntent.ModifyParamsPaymentDetailsCarRentalDeliveryRecipient" - ] - """ - Details of the recipient. - """ - - class ModifyParamsPaymentDetailsCarRentalDeliveryRecipient(TypedDict): - email: NotRequired[str] - """ - The email of the recipient the ticket is delivered to. - """ - name: NotRequired[str] - """ - The name of the recipient the ticket is delivered to. - """ - phone: NotRequired[str] - """ - The phone number of the recipient the ticket is delivered to. - """ - - class ModifyParamsPaymentDetailsCarRentalDistance(TypedDict): - amount: NotRequired[int] - """ - Distance traveled. - """ - unit: NotRequired[Literal["kilometers", "miles"]] - """ - Unit of measurement for the distance traveled. One of `miles` or `kilometers`. - """ - - class ModifyParamsPaymentDetailsCarRentalDriver(TypedDict): - driver_identification_number: NotRequired[str] - """ - Driver's identification number. - """ - driver_tax_number: NotRequired[str] - """ - Driver's tax number. - """ - name: str - """ - Full name of the person or entity on the car reservation. - """ - - class ModifyParamsPaymentDetailsCarRentalPickupAddress(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. - """ - - class ModifyParamsPaymentDetailsCarRentalReturnAddress(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. - """ - - class ModifyParamsPaymentDetailsEventDetails(TypedDict): - access_controlled_venue: NotRequired[bool] - """ - Indicates if the tickets are digitally checked when entering the venue. - """ - address: NotRequired[ - "PaymentIntent.ModifyParamsPaymentDetailsEventDetailsAddress" - ] - """ - The event location's address. - """ - affiliate: NotRequired[ - "PaymentIntent.ModifyParamsPaymentDetailsEventDetailsAffiliate" - ] - """ - Affiliate details for this purchase. - """ - company: NotRequired[str] - """ - The name of the company - """ - delivery: NotRequired[ - "PaymentIntent.ModifyParamsPaymentDetailsEventDetailsDelivery" - ] - """ - Delivery details for this purchase. - """ - ends_at: NotRequired[int] - """ - Event end time. Measured in seconds since the Unix epoch. - """ - genre: NotRequired[str] - """ - Type of the event entertainment (concert, sports event etc) - """ - name: str - """ - The name of the event. - """ - starts_at: NotRequired[int] - """ - Event start time. Measured in seconds since the Unix epoch. - """ - - class ModifyParamsPaymentDetailsEventDetailsAddress(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. - """ - - class ModifyParamsPaymentDetailsEventDetailsAffiliate(TypedDict): - name: str - """ - The name of the affiliate that originated the purchase. - """ - - class ModifyParamsPaymentDetailsEventDetailsDelivery(TypedDict): - mode: NotRequired[Literal["email", "phone", "pickup", "post"]] - """ - The delivery method for the payment - """ - recipient: NotRequired[ - "PaymentIntent.ModifyParamsPaymentDetailsEventDetailsDeliveryRecipient" - ] - """ - Details of the recipient. - """ - - class ModifyParamsPaymentDetailsEventDetailsDeliveryRecipient(TypedDict): - email: NotRequired[str] - """ - The email of the recipient the ticket is delivered to. - """ - name: NotRequired[str] - """ - The name of the recipient the ticket is delivered to. - """ - phone: NotRequired[str] - """ - The phone number of the recipient the ticket is delivered to. - """ - - class ModifyParamsPaymentDetailsFlight(TypedDict): - affiliate: NotRequired[ - "PaymentIntent.ModifyParamsPaymentDetailsFlightAffiliate" - ] - """ - Affiliate details for this purchase. - """ - agency_number: NotRequired[str] - """ - The agency number (i.e. International Air Transport Association (IATA) agency number) of the travel agency that made the booking. - """ - carrier: NotRequired[str] - """ - The International Air Transport Association (IATA) carrier code of the carrier that issued the ticket. - """ - delivery: NotRequired[ - "PaymentIntent.ModifyParamsPaymentDetailsFlightDelivery" - ] - """ - Delivery details for this purchase. - """ - passenger_name: NotRequired[str] - """ - The name of the person or entity on the reservation. - """ - passengers: NotRequired[ - List["PaymentIntent.ModifyParamsPaymentDetailsFlightPassenger"] - ] - """ - The details of the passengers in the travel reservation. - """ - segments: List["PaymentIntent.ModifyParamsPaymentDetailsFlightSegment"] - """ - The individual flight segments associated with the trip. - """ - ticket_number: NotRequired[str] - """ - The ticket number associated with the travel reservation. - """ - - class ModifyParamsPaymentDetailsFlightAffiliate(TypedDict): - name: str - """ - The name of the affiliate that originated the purchase. - """ - - class ModifyParamsPaymentDetailsFlightDelivery(TypedDict): - mode: NotRequired[Literal["email", "phone", "pickup", "post"]] - """ - The delivery method for the payment - """ - recipient: NotRequired[ - "PaymentIntent.ModifyParamsPaymentDetailsFlightDeliveryRecipient" - ] - """ - Details of the recipient. - """ - - class ModifyParamsPaymentDetailsFlightDeliveryRecipient(TypedDict): - email: NotRequired[str] - """ - The email of the recipient the ticket is delivered to. - """ - name: NotRequired[str] - """ - The name of the recipient the ticket is delivered to. - """ - phone: NotRequired[str] - """ - The phone number of the recipient the ticket is delivered to. - """ - - class ModifyParamsPaymentDetailsFlightPassenger(TypedDict): - name: str - """ - Full name of the person or entity on the flight reservation. - """ - - class ModifyParamsPaymentDetailsFlightSegment(TypedDict): - amount: NotRequired[int] - """ - The flight segment amount. - """ - arrival_airport: NotRequired[str] - """ - The International Air Transport Association (IATA) airport code for the arrival airport. - """ - arrives_at: NotRequired[int] - """ - The arrival time for the flight segment. Measured in seconds since the Unix epoch. - """ - carrier: NotRequired[str] - """ - The International Air Transport Association (IATA) carrier code of the carrier operating the flight segment. - """ - departs_at: int - """ - The departure time for the flight segment. Measured in seconds since the Unix epoch. - """ - departure_airport: NotRequired[str] - """ - The International Air Transport Association (IATA) airport code for the departure airport. - """ - flight_number: NotRequired[str] - """ - The flight number associated with the segment - """ - service_class: NotRequired[ - Literal["business", "economy", "first", "premium_economy"] - ] - """ - The fare class for the segment. - """ - - class ModifyParamsPaymentDetailsLodging(TypedDict): - address: NotRequired[ - "PaymentIntent.ModifyParamsPaymentDetailsLodgingAddress" - ] - """ - The lodging location's address. - """ - adults: NotRequired[int] - """ - The number of adults on the booking - """ - affiliate: NotRequired[ - "PaymentIntent.ModifyParamsPaymentDetailsLodgingAffiliate" - ] - """ - Affiliate details for this purchase. - """ - booking_number: NotRequired[str] - """ - The booking number associated with the lodging reservation. - """ - category: NotRequired[Literal["hotel", "vacation_rental"]] - """ - The lodging category - """ - checkin_at: int - """ - Lodging check-in time. Measured in seconds since the Unix epoch. - """ - checkout_at: int - """ - Lodging check-out time. Measured in seconds since the Unix epoch. - """ - customer_service_phone_number: NotRequired[str] - """ - The customer service phone number of the lodging company. - """ - daily_room_rate_amount: NotRequired[int] - """ - The daily lodging room rate. - """ - delivery: NotRequired[ - "PaymentIntent.ModifyParamsPaymentDetailsLodgingDelivery" - ] - """ - Delivery details for this purchase. - """ - extra_charges: NotRequired[ - List[ - Literal[ - "gift_shop", - "laundry", - "mini_bar", - "other", - "restaurant", - "telephone", - ] - ] - ] - """ - List of additional charges being billed. - """ - fire_safety_act_compliance: NotRequired[bool] - """ - Indicates whether the lodging location is compliant with the Fire Safety Act. - """ - name: NotRequired[str] - """ - The name of the lodging location. - """ - no_show: NotRequired[bool] - """ - Indicates if the customer did not keep their booking while failing to cancel the reservation. - """ - number_of_rooms: NotRequired[int] - """ - The number of rooms on the booking - """ - passengers: NotRequired[ - List["PaymentIntent.ModifyParamsPaymentDetailsLodgingPassenger"] - ] - """ - The details of the passengers in the travel reservation - """ - property_phone_number: NotRequired[str] - """ - The phone number of the lodging location. - """ - room_class: NotRequired[str] - """ - The room class for this purchase. - """ - room_nights: NotRequired[int] - """ - The number of room nights - """ - total_room_tax_amount: NotRequired[int] - """ - The total tax amount associating with the room reservation. - """ - total_tax_amount: NotRequired[int] - """ - The total tax amount - """ - - class ModifyParamsPaymentDetailsLodgingAddress(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. - """ - - class ModifyParamsPaymentDetailsLodgingAffiliate(TypedDict): - name: str - """ - The name of the affiliate that originated the purchase. - """ - - class ModifyParamsPaymentDetailsLodgingDelivery(TypedDict): - mode: NotRequired[Literal["email", "phone", "pickup", "post"]] - """ - The delivery method for the payment - """ - recipient: NotRequired[ - "PaymentIntent.ModifyParamsPaymentDetailsLodgingDeliveryRecipient" - ] - """ - Details of the recipient. - """ - - class ModifyParamsPaymentDetailsLodgingDeliveryRecipient(TypedDict): - email: NotRequired[str] - """ - The email of the recipient the ticket is delivered to. - """ - name: NotRequired[str] - """ - The name of the recipient the ticket is delivered to. - """ - phone: NotRequired[str] - """ - The phone number of the recipient the ticket is delivered to. - """ - - class ModifyParamsPaymentDetailsLodgingPassenger(TypedDict): - name: str - """ - Full name of the person or entity on the lodging reservation. - """ - - class ModifyParamsPaymentDetailsSubscription(TypedDict): - affiliate: NotRequired[ - "PaymentIntent.ModifyParamsPaymentDetailsSubscriptionAffiliate" - ] - """ - Affiliate details for this purchase. - """ - auto_renewal: NotRequired[bool] - """ - Info whether the subscription will be auto renewed upon expiry. - """ - billing_interval: NotRequired[ - "PaymentIntent.ModifyParamsPaymentDetailsSubscriptionBillingInterval" - ] - """ - Subscription billing details for this purchase. - """ - ends_at: NotRequired[int] - """ - Subscription end time. Measured in seconds since the Unix epoch. - """ - name: str - """ - Name of the product on subscription. e.g. Apple Music Subscription - """ - starts_at: NotRequired[int] - """ - Subscription start time. Measured in seconds since the Unix epoch. - """ - - class ModifyParamsPaymentDetailsSubscriptionAffiliate(TypedDict): - name: str - """ - The name of the affiliate that originated the purchase. - """ - - class ModifyParamsPaymentDetailsSubscriptionBillingInterval(TypedDict): - count: int - """ - The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. - """ - interval: Literal["day", "month", "week", "year"] - """ - Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. - """ - - class ModifyParamsPaymentMethodData(TypedDict): - acss_debit: NotRequired[ - "PaymentIntent.ModifyParamsPaymentMethodDataAcssDebit" - ] - """ - If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method. - """ - affirm: NotRequired[ - "PaymentIntent.ModifyParamsPaymentMethodDataAffirm" - ] - """ - If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method. - """ - afterpay_clearpay: NotRequired[ - "PaymentIntent.ModifyParamsPaymentMethodDataAfterpayClearpay" - ] - """ - If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method. - """ - alipay: NotRequired[ - "PaymentIntent.ModifyParamsPaymentMethodDataAlipay" - ] - """ - If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. - """ - allow_redisplay: NotRequired[ - Literal["always", "limited", "unspecified"] - ] - """ - This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`. - """ - alma: NotRequired["PaymentIntent.ModifyParamsPaymentMethodDataAlma"] - """ - If this is a Alma PaymentMethod, this hash contains details about the Alma payment method. - """ - amazon_pay: NotRequired[ - "PaymentIntent.ModifyParamsPaymentMethodDataAmazonPay" - ] - """ - If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method. - """ - au_becs_debit: NotRequired[ - "PaymentIntent.ModifyParamsPaymentMethodDataAuBecsDebit" - ] - """ - If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. - """ - bacs_debit: NotRequired[ - "PaymentIntent.ModifyParamsPaymentMethodDataBacsDebit" - ] - """ - If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account. - """ - bancontact: NotRequired[ - "PaymentIntent.ModifyParamsPaymentMethodDataBancontact" - ] - """ - If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method. - """ - billie: NotRequired[ - "PaymentIntent.ModifyParamsPaymentMethodDataBillie" - ] - """ - If this is a `billie` PaymentMethod, this hash contains details about the Billie payment method. - """ - billing_details: NotRequired[ - "PaymentIntent.ModifyParamsPaymentMethodDataBillingDetails" - ] - """ - Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. - """ - blik: NotRequired["PaymentIntent.ModifyParamsPaymentMethodDataBlik"] - """ - If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method. - """ - boleto: NotRequired[ - "PaymentIntent.ModifyParamsPaymentMethodDataBoleto" - ] - """ - If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method. - """ - cashapp: NotRequired[ - "PaymentIntent.ModifyParamsPaymentMethodDataCashapp" - ] - """ - If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. - """ - crypto: NotRequired[ - "PaymentIntent.ModifyParamsPaymentMethodDataCrypto" - ] - """ - If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment method. - """ - customer_balance: NotRequired[ - "PaymentIntent.ModifyParamsPaymentMethodDataCustomerBalance" - ] - """ - If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. - """ - eps: NotRequired["PaymentIntent.ModifyParamsPaymentMethodDataEps"] - """ - If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. - """ - fpx: NotRequired["PaymentIntent.ModifyParamsPaymentMethodDataFpx"] - """ - If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method. - """ - giropay: NotRequired[ - "PaymentIntent.ModifyParamsPaymentMethodDataGiropay" - ] - """ - If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method. - """ - gopay: NotRequired["PaymentIntent.ModifyParamsPaymentMethodDataGopay"] - """ - If this is a Gopay PaymentMethod, this hash contains details about the Gopay payment method. - """ - grabpay: NotRequired[ - "PaymentIntent.ModifyParamsPaymentMethodDataGrabpay" - ] - """ - If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method. - """ - id_bank_transfer: NotRequired[ - "PaymentIntent.ModifyParamsPaymentMethodDataIdBankTransfer" - ] - """ - If this is an `IdBankTransfer` PaymentMethod, this hash contains details about the IdBankTransfer payment method. - """ - ideal: NotRequired["PaymentIntent.ModifyParamsPaymentMethodDataIdeal"] - """ - If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. - """ - interac_present: NotRequired[ - "PaymentIntent.ModifyParamsPaymentMethodDataInteracPresent" - ] - """ - If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. - """ - kakao_pay: NotRequired[ - "PaymentIntent.ModifyParamsPaymentMethodDataKakaoPay" - ] - """ - If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method. - """ - klarna: NotRequired[ - "PaymentIntent.ModifyParamsPaymentMethodDataKlarna" - ] - """ - If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method. - """ - konbini: NotRequired[ - "PaymentIntent.ModifyParamsPaymentMethodDataKonbini" - ] - """ - If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. - """ - kr_card: NotRequired[ - "PaymentIntent.ModifyParamsPaymentMethodDataKrCard" - ] - """ - If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method. - """ - link: NotRequired["PaymentIntent.ModifyParamsPaymentMethodDataLink"] - """ - If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. - """ - mb_way: NotRequired["PaymentIntent.ModifyParamsPaymentMethodDataMbWay"] - """ - If this is a MB WAY PaymentMethod, this hash contains details about the MB WAY payment method. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - mobilepay: NotRequired[ - "PaymentIntent.ModifyParamsPaymentMethodDataMobilepay" - ] - """ - If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method. - """ - multibanco: NotRequired[ - "PaymentIntent.ModifyParamsPaymentMethodDataMultibanco" - ] - """ - If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method. - """ - naver_pay: NotRequired[ - "PaymentIntent.ModifyParamsPaymentMethodDataNaverPay" - ] - """ - If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method. - """ - nz_bank_account: NotRequired[ - "PaymentIntent.ModifyParamsPaymentMethodDataNzBankAccount" - ] - """ - If this is an nz_bank_account PaymentMethod, this hash contains details about the nz_bank_account payment method. - """ - oxxo: NotRequired["PaymentIntent.ModifyParamsPaymentMethodDataOxxo"] - """ - If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. - """ - p24: NotRequired["PaymentIntent.ModifyParamsPaymentMethodDataP24"] - """ - If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. - """ - pay_by_bank: NotRequired[ - "PaymentIntent.ModifyParamsPaymentMethodDataPayByBank" - ] - """ - If this is a `pay_by_bank` PaymentMethod, this hash contains details about the PayByBank payment method. - """ - payco: NotRequired["PaymentIntent.ModifyParamsPaymentMethodDataPayco"] - """ - If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method. - """ - paynow: NotRequired[ - "PaymentIntent.ModifyParamsPaymentMethodDataPaynow" - ] - """ - If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method. - """ - paypal: NotRequired[ - "PaymentIntent.ModifyParamsPaymentMethodDataPaypal" - ] - """ - If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method. - """ - paypay: NotRequired[ - "PaymentIntent.ModifyParamsPaymentMethodDataPaypay" - ] - """ - If this is a `paypay` PaymentMethod, this hash contains details about the PayPay payment method. - """ - payto: NotRequired["PaymentIntent.ModifyParamsPaymentMethodDataPayto"] - """ - If this is a `payto` PaymentMethod, this hash contains details about the PayTo payment method. - """ - pix: NotRequired["PaymentIntent.ModifyParamsPaymentMethodDataPix"] - """ - If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method. - """ - promptpay: NotRequired[ - "PaymentIntent.ModifyParamsPaymentMethodDataPromptpay" - ] - """ - If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method. - """ - qris: NotRequired["PaymentIntent.ModifyParamsPaymentMethodDataQris"] - """ - If this is a `qris` PaymentMethod, this hash contains details about the QRIS payment method. - """ - radar_options: NotRequired[ - "PaymentIntent.ModifyParamsPaymentMethodDataRadarOptions" - ] - """ - Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. - """ - rechnung: NotRequired[ - "PaymentIntent.ModifyParamsPaymentMethodDataRechnung" - ] - """ - If this is a `rechnung` PaymentMethod, this hash contains details about the Rechnung payment method. - """ - revolut_pay: NotRequired[ - "PaymentIntent.ModifyParamsPaymentMethodDataRevolutPay" - ] - """ - If this is a `revolut_pay` PaymentMethod, this hash contains details about the Revolut Pay payment method. - """ - samsung_pay: NotRequired[ - "PaymentIntent.ModifyParamsPaymentMethodDataSamsungPay" - ] - """ - If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method. - """ - satispay: NotRequired[ - "PaymentIntent.ModifyParamsPaymentMethodDataSatispay" - ] - """ - If this is a `satispay` PaymentMethod, this hash contains details about the Satispay payment method. - """ - sepa_debit: NotRequired[ - "PaymentIntent.ModifyParamsPaymentMethodDataSepaDebit" - ] - """ - If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. - """ - shopeepay: NotRequired[ - "PaymentIntent.ModifyParamsPaymentMethodDataShopeepay" - ] - """ - If this is a Shopeepay PaymentMethod, this hash contains details about the Shopeepay payment method. - """ - sofort: NotRequired[ - "PaymentIntent.ModifyParamsPaymentMethodDataSofort" - ] - """ - If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. - """ - stripe_balance: NotRequired[ - "PaymentIntent.ModifyParamsPaymentMethodDataStripeBalance" - ] - """ - This hash contains details about the Stripe balance payment method. - """ - swish: NotRequired["PaymentIntent.ModifyParamsPaymentMethodDataSwish"] - """ - If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method. - """ - twint: NotRequired["PaymentIntent.ModifyParamsPaymentMethodDataTwint"] - """ - If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method. - """ - type: Literal[ - "acss_debit", - "affirm", - "afterpay_clearpay", - "alipay", - "alma", - "amazon_pay", - "au_becs_debit", - "bacs_debit", - "bancontact", - "billie", - "blik", - "boleto", - "cashapp", - "crypto", - "customer_balance", - "eps", - "fpx", - "giropay", - "gopay", - "grabpay", - "id_bank_transfer", - "ideal", - "kakao_pay", - "klarna", - "konbini", - "kr_card", - "link", - "mb_way", - "mobilepay", - "multibanco", - "naver_pay", - "nz_bank_account", - "oxxo", - "p24", - "pay_by_bank", - "payco", - "paynow", - "paypal", - "paypay", - "payto", - "pix", - "promptpay", - "qris", - "rechnung", - "revolut_pay", - "samsung_pay", - "satispay", - "sepa_debit", - "shopeepay", - "sofort", - "stripe_balance", - "swish", - "twint", - "us_bank_account", - "wechat_pay", - "zip", - ] - """ - The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. - """ - us_bank_account: NotRequired[ - "PaymentIntent.ModifyParamsPaymentMethodDataUsBankAccount" - ] - """ - If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. - """ - wechat_pay: NotRequired[ - "PaymentIntent.ModifyParamsPaymentMethodDataWechatPay" - ] - """ - If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method. - """ - zip: NotRequired["PaymentIntent.ModifyParamsPaymentMethodDataZip"] - """ - If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method. - """ - - class ModifyParamsPaymentMethodDataAcssDebit(TypedDict): - account_number: str - """ - Customer's bank account number. - """ - institution_number: str - """ - Institution number of the customer's bank. - """ - transit_number: str - """ - Transit number of the customer's bank. - """ - - class ModifyParamsPaymentMethodDataAffirm(TypedDict): - pass - - class ModifyParamsPaymentMethodDataAfterpayClearpay(TypedDict): - pass - - class ModifyParamsPaymentMethodDataAlipay(TypedDict): - pass - - class ModifyParamsPaymentMethodDataAlma(TypedDict): - pass - - class ModifyParamsPaymentMethodDataAmazonPay(TypedDict): - pass - - class ModifyParamsPaymentMethodDataAuBecsDebit(TypedDict): - account_number: str - """ - The account number for the bank account. - """ - bsb_number: str - """ - Bank-State-Branch number of the bank account. - """ - - class ModifyParamsPaymentMethodDataBacsDebit(TypedDict): - account_number: NotRequired[str] - """ - Account number of the bank account that the funds will be debited from. - """ - sort_code: NotRequired[str] - """ - Sort code of the bank account. (e.g., `10-20-30`) - """ - - class ModifyParamsPaymentMethodDataBancontact(TypedDict): - pass - - class ModifyParamsPaymentMethodDataBillie(TypedDict): - pass - - class ModifyParamsPaymentMethodDataBillingDetails(TypedDict): - address: NotRequired[ - "Literal['']|PaymentIntent.ModifyParamsPaymentMethodDataBillingDetailsAddress" - ] - """ - Billing address. - """ - email: NotRequired["Literal['']|str"] - """ - Email address. - """ - name: NotRequired["Literal['']|str"] - """ - Full name. - """ - phone: NotRequired["Literal['']|str"] - """ - Billing phone number (including extension). - """ - tax_id: NotRequired[str] - """ - Taxpayer identification number. Used only for transactions between LATAM buyers and non-LATAM sellers. - """ - - class ModifyParamsPaymentMethodDataBillingDetailsAddress(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. - """ - - class ModifyParamsPaymentMethodDataBlik(TypedDict): - pass - - class ModifyParamsPaymentMethodDataBoleto(TypedDict): - tax_id: str - """ - The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers) - """ - - class ModifyParamsPaymentMethodDataCashapp(TypedDict): - pass - - class ModifyParamsPaymentMethodDataCrypto(TypedDict): - pass - - class ModifyParamsPaymentMethodDataCustomerBalance(TypedDict): - pass - - class ModifyParamsPaymentMethodDataEps(TypedDict): - bank: NotRequired[ - Literal[ - "arzte_und_apotheker_bank", - "austrian_anadi_bank_ag", - "bank_austria", - "bankhaus_carl_spangler", - "bankhaus_schelhammer_und_schattera_ag", - "bawag_psk_ag", - "bks_bank_ag", - "brull_kallmus_bank_ag", - "btv_vier_lander_bank", - "capital_bank_grawe_gruppe_ag", - "deutsche_bank_ag", - "dolomitenbank", - "easybank_ag", - "erste_bank_und_sparkassen", - "hypo_alpeadriabank_international_ag", - "hypo_bank_burgenland_aktiengesellschaft", - "hypo_noe_lb_fur_niederosterreich_u_wien", - "hypo_oberosterreich_salzburg_steiermark", - "hypo_tirol_bank_ag", - "hypo_vorarlberg_bank_ag", - "marchfelder_bank", - "oberbank_ag", - "raiffeisen_bankengruppe_osterreich", - "schoellerbank_ag", - "sparda_bank_wien", - "volksbank_gruppe", - "volkskreditbank_ag", - "vr_bank_braunau", - ] - ] - """ - The customer's bank. - """ - - class ModifyParamsPaymentMethodDataFpx(TypedDict): - account_holder_type: NotRequired[Literal["company", "individual"]] - """ - Account holder type for FPX transaction - """ - bank: Literal[ - "affin_bank", - "agrobank", - "alliance_bank", - "ambank", - "bank_islam", - "bank_muamalat", - "bank_of_china", - "bank_rakyat", - "bsn", - "cimb", - "deutsche_bank", - "hong_leong_bank", - "hsbc", - "kfh", - "maybank2e", - "maybank2u", - "ocbc", - "pb_enterprise", - "public_bank", - "rhb", - "standard_chartered", - "uob", - ] - """ - The customer's bank. - """ - - class ModifyParamsPaymentMethodDataGiropay(TypedDict): - pass - - class ModifyParamsPaymentMethodDataGopay(TypedDict): - pass - - class ModifyParamsPaymentMethodDataGrabpay(TypedDict): - pass - - class ModifyParamsPaymentMethodDataIdBankTransfer(TypedDict): - bank: NotRequired[Literal["bca", "bni", "bri", "cimb", "permata"]] - """ - Bank where the account is held. - """ - - class ModifyParamsPaymentMethodDataIdeal(TypedDict): - bank: NotRequired[ - Literal[ - "abn_amro", - "asn_bank", - "bunq", - "buut", - "handelsbanken", - "ing", - "knab", - "moneyou", - "n26", - "nn", - "rabobank", - "regiobank", - "revolut", - "sns_bank", - "triodos_bank", - "van_lanschot", - "yoursafe", - ] - ] - """ - The customer's bank. Only use this parameter for existing customers. Don't use it for new customers. - """ - - class ModifyParamsPaymentMethodDataInteracPresent(TypedDict): - pass - - class ModifyParamsPaymentMethodDataKakaoPay(TypedDict): - pass - - class ModifyParamsPaymentMethodDataKlarna(TypedDict): - dob: NotRequired[ - "PaymentIntent.ModifyParamsPaymentMethodDataKlarnaDob" - ] - """ - Customer's date of birth - """ - - class ModifyParamsPaymentMethodDataKlarnaDob(TypedDict): - day: int - """ - The day of birth, between 1 and 31. - """ - month: int - """ - The month of birth, between 1 and 12. - """ - year: int - """ - The four-digit year of birth. - """ - - class ModifyParamsPaymentMethodDataKonbini(TypedDict): - pass - - class ModifyParamsPaymentMethodDataKrCard(TypedDict): - pass - - class ModifyParamsPaymentMethodDataLink(TypedDict): - pass - - class ModifyParamsPaymentMethodDataMbWay(TypedDict): - pass - - class ModifyParamsPaymentMethodDataMobilepay(TypedDict): - pass - - class ModifyParamsPaymentMethodDataMultibanco(TypedDict): - pass - - class ModifyParamsPaymentMethodDataNaverPay(TypedDict): - funding: NotRequired[Literal["card", "points"]] - """ - Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`. - """ - - class ModifyParamsPaymentMethodDataNzBankAccount(TypedDict): - account_holder_name: NotRequired[str] - """ - The name on the bank account. Only required if the account holder name is different from the name of the authorized signatory collected in the PaymentMethod's billing details. - """ - account_number: str - """ - The account number for the bank account. - """ - bank_code: str - """ - The numeric code for the bank account's bank. - """ - branch_code: str - """ - The numeric code for the bank account's bank branch. - """ - reference: NotRequired[str] - suffix: str - """ - The suffix of the bank account number. - """ - - class ModifyParamsPaymentMethodDataOxxo(TypedDict): - pass - - class ModifyParamsPaymentMethodDataP24(TypedDict): - bank: NotRequired[ - Literal[ - "alior_bank", - "bank_millennium", - "bank_nowy_bfg_sa", - "bank_pekao_sa", - "banki_spbdzielcze", - "blik", - "bnp_paribas", - "boz", - "citi_handlowy", - "credit_agricole", - "envelobank", - "etransfer_pocztowy24", - "getin_bank", - "ideabank", - "ing", - "inteligo", - "mbank_mtransfer", - "nest_przelew", - "noble_pay", - "pbac_z_ipko", - "plus_bank", - "santander_przelew24", - "tmobile_usbugi_bankowe", - "toyota_bank", - "velobank", - "volkswagen_bank", - ] - ] - """ - The customer's bank. - """ - - class ModifyParamsPaymentMethodDataPayByBank(TypedDict): - pass - - class ModifyParamsPaymentMethodDataPayco(TypedDict): - pass - - class ModifyParamsPaymentMethodDataPaynow(TypedDict): - pass - - class ModifyParamsPaymentMethodDataPaypal(TypedDict): - pass - - class ModifyParamsPaymentMethodDataPaypay(TypedDict): - pass - - class ModifyParamsPaymentMethodDataPayto(TypedDict): - account_number: NotRequired[str] - """ - The account number for the bank account. - """ - bsb_number: NotRequired[str] - """ - Bank-State-Branch number of the bank account. - """ - pay_id: NotRequired[str] - """ - The PayID alias for the bank account. - """ - - class ModifyParamsPaymentMethodDataPix(TypedDict): - pass - - class ModifyParamsPaymentMethodDataPromptpay(TypedDict): - pass - - class ModifyParamsPaymentMethodDataQris(TypedDict): - pass - - class ModifyParamsPaymentMethodDataRadarOptions(TypedDict): - session: NotRequired[str] - """ - A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. - """ - - class ModifyParamsPaymentMethodDataRechnung(TypedDict): - dob: "PaymentIntent.ModifyParamsPaymentMethodDataRechnungDob" - """ - Customer's date of birth - """ - - class ModifyParamsPaymentMethodDataRechnungDob(TypedDict): - day: int - """ - The day of birth, between 1 and 31. - """ - month: int - """ - The month of birth, between 1 and 12. - """ - year: int - """ - The four-digit year of birth. - """ - - class ModifyParamsPaymentMethodDataRevolutPay(TypedDict): - pass - - class ModifyParamsPaymentMethodDataSamsungPay(TypedDict): - pass - - class ModifyParamsPaymentMethodDataSatispay(TypedDict): - pass - - class ModifyParamsPaymentMethodDataSepaDebit(TypedDict): - iban: str - """ - IBAN of the bank account. - """ - - class ModifyParamsPaymentMethodDataShopeepay(TypedDict): - pass - - class ModifyParamsPaymentMethodDataSofort(TypedDict): - country: Literal["AT", "BE", "DE", "ES", "IT", "NL"] - """ - Two-letter ISO code representing the country the bank account is located in. - """ - - class ModifyParamsPaymentMethodDataStripeBalance(TypedDict): - account: NotRequired[str] - """ - The connected account ID whose Stripe balance to use as the source of payment - """ - source_type: NotRequired[Literal["bank_account", "card", "fpx"]] - """ - The [source_type](https://docs.stripe.com/api/balance/balance_object#balance_object-available-source_types) of the balance - """ - - class ModifyParamsPaymentMethodDataSwish(TypedDict): - pass - - class ModifyParamsPaymentMethodDataTwint(TypedDict): - pass - - class ModifyParamsPaymentMethodDataUsBankAccount(TypedDict): - account_holder_type: NotRequired[Literal["company", "individual"]] - """ - Account holder type: individual or company. - """ - account_number: NotRequired[str] - """ - Account number of the bank account. - """ - account_type: NotRequired[Literal["checking", "savings"]] - """ - Account type: checkings or savings. Defaults to checking if omitted. - """ - financial_connections_account: NotRequired[str] - """ - The ID of a Financial Connections Account to use as a payment method. - """ - routing_number: NotRequired[str] - """ - Routing number of the bank account. - """ - - class ModifyParamsPaymentMethodDataWechatPay(TypedDict): - pass - - class ModifyParamsPaymentMethodDataZip(TypedDict): - pass - - class ModifyParamsPaymentMethodOptions(TypedDict): - acss_debit: NotRequired[ - "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsAcssDebit" - ] - """ - If this is a `acss_debit` PaymentMethod, this sub-hash contains details about the ACSS Debit payment method options. - """ - affirm: NotRequired[ - "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsAffirm" - ] - """ - If this is an `affirm` PaymentMethod, this sub-hash contains details about the Affirm payment method options. - """ - afterpay_clearpay: NotRequired[ - "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsAfterpayClearpay" - ] - """ - If this is a `afterpay_clearpay` PaymentMethod, this sub-hash contains details about the Afterpay Clearpay payment method options. - """ - alipay: NotRequired[ - "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsAlipay" - ] - """ - If this is a `alipay` PaymentMethod, this sub-hash contains details about the Alipay payment method options. - """ - alma: NotRequired[ - "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsAlma" - ] - """ - If this is a `alma` PaymentMethod, this sub-hash contains details about the Alma payment method options. - """ - amazon_pay: NotRequired[ - "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsAmazonPay" - ] - """ - If this is a `amazon_pay` PaymentMethod, this sub-hash contains details about the Amazon Pay payment method options. - """ - au_becs_debit: NotRequired[ - "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsAuBecsDebit" - ] - """ - If this is a `au_becs_debit` PaymentMethod, this sub-hash contains details about the AU BECS Direct Debit payment method options. - """ - bacs_debit: NotRequired[ - "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsBacsDebit" - ] - """ - If this is a `bacs_debit` PaymentMethod, this sub-hash contains details about the BACS Debit payment method options. - """ - bancontact: NotRequired[ - "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsBancontact" - ] - """ - If this is a `bancontact` PaymentMethod, this sub-hash contains details about the Bancontact payment method options. - """ - billie: NotRequired[ - "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsBillie" - ] - """ - If this is a `billie` PaymentMethod, this sub-hash contains details about the Billie payment method options. - """ - blik: NotRequired[ - "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsBlik" - ] - """ - If this is a `blik` PaymentMethod, this sub-hash contains details about the BLIK payment method options. - """ - boleto: NotRequired[ - "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsBoleto" - ] - """ - If this is a `boleto` PaymentMethod, this sub-hash contains details about the Boleto payment method options. - """ - card: NotRequired[ - "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsCard" - ] - """ - Configuration for any card payments attempted on this PaymentIntent. - """ - card_present: NotRequired[ - "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsCardPresent" - ] - """ - If this is a `card_present` PaymentMethod, this sub-hash contains details about the Card Present payment method options. - """ - cashapp: NotRequired[ - "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsCashapp" - ] - """ - If this is a `cashapp` PaymentMethod, this sub-hash contains details about the Cash App Pay payment method options. - """ - crypto: NotRequired[ - "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsCrypto" - ] - """ - If this is a `crypto` PaymentMethod, this sub-hash contains details about the Crypto payment method options. - """ - customer_balance: NotRequired[ - "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsCustomerBalance" - ] - """ - If this is a `customer balance` PaymentMethod, this sub-hash contains details about the customer balance payment method options. - """ - eps: NotRequired[ - "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsEps" - ] - """ - If this is a `eps` PaymentMethod, this sub-hash contains details about the EPS payment method options. - """ - fpx: NotRequired[ - "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsFpx" - ] - """ - If this is a `fpx` PaymentMethod, this sub-hash contains details about the FPX payment method options. - """ - giropay: NotRequired[ - "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsGiropay" - ] - """ - If this is a `giropay` PaymentMethod, this sub-hash contains details about the Giropay payment method options. - """ - gopay: NotRequired[ - "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsGopay" - ] - """ - If this is a `gopay` PaymentMethod, this sub-hash contains details about the Gopay payment method options. - """ - grabpay: NotRequired[ - "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsGrabpay" - ] - """ - If this is a `grabpay` PaymentMethod, this sub-hash contains details about the Grabpay payment method options. - """ - id_bank_transfer: NotRequired[ - "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsIdBankTransfer" - ] - """ - If this is a `id_bank_transfer` PaymentMethod, this sub-hash contains details about the Indonesia Bank Transfer payment method options. - """ - ideal: NotRequired[ - "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsIdeal" - ] - """ - If this is a `ideal` PaymentMethod, this sub-hash contains details about the Ideal payment method options. - """ - interac_present: NotRequired[ - "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsInteracPresent" - ] - """ - If this is a `interac_present` PaymentMethod, this sub-hash contains details about the Card Present payment method options. - """ - kakao_pay: NotRequired[ - "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsKakaoPay" - ] - """ - If this is a `kakao_pay` PaymentMethod, this sub-hash contains details about the Kakao Pay payment method options. - """ - klarna: NotRequired[ - "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsKlarna" - ] - """ - If this is a `klarna` PaymentMethod, this sub-hash contains details about the Klarna payment method options. - """ - konbini: NotRequired[ - "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsKonbini" - ] - """ - If this is a `konbini` PaymentMethod, this sub-hash contains details about the Konbini payment method options. - """ - kr_card: NotRequired[ - "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsKrCard" - ] - """ - If this is a `kr_card` PaymentMethod, this sub-hash contains details about the KR Card payment method options. - """ - link: NotRequired[ - "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsLink" - ] - """ - If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options. - """ - mb_way: NotRequired[ - "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsMbWay" - ] - """ - If this is a `mb_way` PaymentMethod, this sub-hash contains details about the MB WAY payment method options. - """ - mobilepay: NotRequired[ - "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsMobilepay" - ] - """ - If this is a `MobilePay` PaymentMethod, this sub-hash contains details about the MobilePay payment method options. - """ - multibanco: NotRequired[ - "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsMultibanco" - ] - """ - If this is a `multibanco` PaymentMethod, this sub-hash contains details about the Multibanco payment method options. - """ - naver_pay: NotRequired[ - "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsNaverPay" - ] - """ - If this is a `naver_pay` PaymentMethod, this sub-hash contains details about the Naver Pay payment method options. - """ - nz_bank_account: NotRequired[ - "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsNzBankAccount" - ] - """ - If this is a `nz_bank_account` PaymentMethod, this sub-hash contains details about the NZ BECS Direct Debit payment method options. - """ - oxxo: NotRequired[ - "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsOxxo" - ] - """ - If this is a `oxxo` PaymentMethod, this sub-hash contains details about the OXXO payment method options. - """ - p24: NotRequired[ - "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsP24" - ] - """ - If this is a `p24` PaymentMethod, this sub-hash contains details about the Przelewy24 payment method options. - """ - pay_by_bank: NotRequired[ - "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsPayByBank" - ] - """ - If this is a `pay_by_bank` PaymentMethod, this sub-hash contains details about the PayByBank payment method options. - """ - payco: NotRequired[ - "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsPayco" - ] - """ - If this is a `payco` PaymentMethod, this sub-hash contains details about the PAYCO payment method options. - """ - paynow: NotRequired[ - "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsPaynow" - ] - """ - If this is a `paynow` PaymentMethod, this sub-hash contains details about the PayNow payment method options. - """ - paypal: NotRequired[ - "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsPaypal" - ] - """ - If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options. - """ - paypay: NotRequired[ - "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsPaypay" - ] - """ - If this is a `paypay` PaymentMethod, this sub-hash contains details about the PayPay payment method options. - """ - payto: NotRequired[ - "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsPayto" - ] - """ - If this is a `payto` PaymentMethod, this sub-hash contains details about the PayTo payment method options. - """ - pix: NotRequired[ - "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsPix" - ] - """ - If this is a `pix` PaymentMethod, this sub-hash contains details about the Pix payment method options. - """ - promptpay: NotRequired[ - "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsPromptpay" - ] - """ - If this is a `promptpay` PaymentMethod, this sub-hash contains details about the PromptPay payment method options. - """ - qris: NotRequired[ - "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsQris" - ] - """ - If this is a `qris` PaymentMethod, this sub-hash contains details about the QRIS payment method options. - """ - rechnung: NotRequired[ - "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsRechnung" - ] - """ - If this is a `rechnung` PaymentMethod, this sub-hash contains details about the Rechnung payment method options. - """ - revolut_pay: NotRequired[ - "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsRevolutPay" - ] - """ - If this is a `revolut_pay` PaymentMethod, this sub-hash contains details about the Revolut Pay payment method options. - """ - samsung_pay: NotRequired[ - "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsSamsungPay" - ] - """ - If this is a `samsung_pay` PaymentMethod, this sub-hash contains details about the Samsung Pay payment method options. - """ - satispay: NotRequired[ - "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsSatispay" - ] - """ - If this is a `satispay` PaymentMethod, this sub-hash contains details about the Satispay payment method options. - """ - sepa_debit: NotRequired[ - "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsSepaDebit" - ] - """ - If this is a `sepa_debit` PaymentIntent, this sub-hash contains details about the SEPA Debit payment method options. - """ - shopeepay: NotRequired[ - "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsShopeepay" - ] - """ - If this is a `shopeepay` PaymentMethod, this sub-hash contains details about the ShopeePay payment method options. - """ - sofort: NotRequired[ - "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsSofort" - ] - """ - If this is a `sofort` PaymentMethod, this sub-hash contains details about the SOFORT payment method options. - """ - stripe_balance: NotRequired[ - "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsStripeBalance" - ] - """ - If this is a `stripe_balance` PaymentMethod, this sub-hash contains details about the Stripe Balance payment method options. - """ - swish: NotRequired[ - "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsSwish" - ] - """ - If this is a `Swish` PaymentMethod, this sub-hash contains details about the Swish payment method options. - """ - twint: NotRequired[ - "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsTwint" - ] - """ - If this is a `twint` PaymentMethod, this sub-hash contains details about the TWINT payment method options. - """ - us_bank_account: NotRequired[ - "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsUsBankAccount" - ] - """ - If this is a `us_bank_account` PaymentMethod, this sub-hash contains details about the US bank account payment method options. - """ - wechat_pay: NotRequired[ - "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsWechatPay" - ] - """ - If this is a `wechat_pay` PaymentMethod, this sub-hash contains details about the WeChat Pay payment method options. - """ - zip: NotRequired[ - "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsZip" - ] - """ - If this is a `zip` PaymentMethod, this sub-hash contains details about the Zip payment method options. - """ - - class ModifyParamsPaymentMethodOptionsAcssDebit(TypedDict): - mandate_options: NotRequired[ - "PaymentIntent.ModifyParamsPaymentMethodOptionsAcssDebitMandateOptions" - ] - """ - Additional fields for Mandate creation - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - target_date: NotRequired[str] - """ - Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. - """ - verification_method: NotRequired[ - Literal["automatic", "instant", "microdeposits"] - ] - """ - Bank account verification method. - """ - - class ModifyParamsPaymentMethodOptionsAcssDebitMandateOptions(TypedDict): - custom_mandate_url: NotRequired["Literal['']|str"] - """ - A URL for custom mandate text to render during confirmation step. - The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent, - or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent. - """ - interval_description: NotRequired[str] - """ - Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'. - """ - payment_schedule: NotRequired[ - Literal["combined", "interval", "sporadic"] - ] - """ - Payment schedule for the mandate. - """ - transaction_type: NotRequired[Literal["business", "personal"]] - """ - Transaction type of the mandate. - """ - - class ModifyParamsPaymentMethodOptionsAffirm(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds are captured from the customer's account. - - If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. - """ - preferred_locale: NotRequired[str] - """ - Preferred language of the Affirm authorization page that the customer is redirected to. - """ - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class ModifyParamsPaymentMethodOptionsAfterpayClearpay(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds are captured from the customer's account. - - If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. - """ - reference: NotRequired[str] - """ - An internal identifier or reference that this payment corresponds to. You must limit the identifier to 128 characters, and it can only contain letters, numbers, underscores, backslashes, and dashes. - This field differs from the statement descriptor and item name. - """ - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class ModifyParamsPaymentMethodOptionsAlipay(TypedDict): - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class ModifyParamsPaymentMethodOptionsAlma(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds are captured from the customer's account. - - If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. - """ - - class ModifyParamsPaymentMethodOptionsAmazonPay(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds are captured from the customer's account. - - If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - """ - - class ModifyParamsPaymentMethodOptionsAuBecsDebit(TypedDict): - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - target_date: NotRequired[str] - """ - Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. - """ - - class ModifyParamsPaymentMethodOptionsBacsDebit(TypedDict): - mandate_options: NotRequired[ - "PaymentIntent.ModifyParamsPaymentMethodOptionsBacsDebitMandateOptions" - ] - """ - Additional fields for Mandate creation - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - target_date: NotRequired[str] - """ - Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. - """ - - class ModifyParamsPaymentMethodOptionsBacsDebitMandateOptions(TypedDict): - reference_prefix: NotRequired["Literal['']|str"] - """ - Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'. - """ - - class ModifyParamsPaymentMethodOptionsBancontact(TypedDict): - preferred_language: NotRequired[Literal["de", "en", "fr", "nl"]] - """ - Preferred language of the Bancontact authorization page that the customer is redirected to. - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class ModifyParamsPaymentMethodOptionsBillie(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds are captured from the customer's account. - - If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. - """ - - class ModifyParamsPaymentMethodOptionsBlik(TypedDict): - code: NotRequired[str] - """ - The 6-digit BLIK code that a customer has generated using their banking application. Can only be set on confirmation. - """ - setup_future_usage: NotRequired["Literal['']|Literal['none']"] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class ModifyParamsPaymentMethodOptionsBoleto(TypedDict): - expires_after_days: NotRequired[int] - """ - The number of calendar days before a Boleto voucher expires. For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto invoice will expire on Wednesday at 23:59 America/Sao_Paulo time. - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class ModifyParamsPaymentMethodOptionsCard(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds are captured from the customer's account. - - If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. - """ - cvc_token: NotRequired[str] - """ - A single-use `cvc_update` Token that represents a card CVC value. When provided, the CVC value will be verified during the card payment attempt. This parameter can only be provided during confirmation. - """ - installments: NotRequired[ - "PaymentIntent.ModifyParamsPaymentMethodOptionsCardInstallments" - ] - """ - Installment configuration for payments attempted on this PaymentIntent. - - For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments). - """ - mandate_options: NotRequired[ - "PaymentIntent.ModifyParamsPaymentMethodOptionsCardMandateOptions" - ] - """ - Configuration options for setting up an eMandate for cards issued in India. - """ - moto: NotRequired[bool] - """ - When specified, this parameter indicates that a transaction will be marked - as MOTO (Mail Order Telephone Order) and thus out of scope for SCA. This - parameter can only be provided during confirmation. - """ - network: NotRequired[ - Literal[ - "amex", - "cartes_bancaires", - "diners", - "discover", - "eftpos_au", - "girocard", - "interac", - "jcb", - "link", - "mastercard", - "unionpay", - "unknown", - "visa", - ] - ] - """ - Selected network to process this PaymentIntent on. Depends on the available networks of the card attached to the PaymentIntent. Can be only set confirm-time. - """ - request_decremental_authorization: NotRequired[ - Literal["if_available", "never"] - ] - """ - Request ability to [decrement the authorization](https://stripe.com/docs/payments/decremental-authorization) for this PaymentIntent. - """ - request_extended_authorization: NotRequired[ - Literal["if_available", "never"] - ] - """ - Request ability to [capture beyond the standard authorization validity window](https://stripe.com/docs/payments/extended-authorization) for this PaymentIntent. - """ - request_incremental_authorization: NotRequired[ - Literal["if_available", "never"] - ] - """ - Request ability to [increment the authorization](https://stripe.com/docs/payments/incremental-authorization) for this PaymentIntent. - """ - request_multicapture: NotRequired[Literal["if_available", "never"]] - """ - Request ability to make [multiple captures](https://stripe.com/docs/payments/multicapture) for this PaymentIntent. - """ - request_overcapture: NotRequired[Literal["if_available", "never"]] - """ - Request ability to [overcapture](https://stripe.com/docs/payments/overcapture) for this PaymentIntent. - """ - request_partial_authorization: NotRequired[ - Literal["if_available", "never"] - ] - """ - Request partial authorization on this PaymentIntent. - """ - request_three_d_secure: NotRequired[ - Literal["any", "automatic", "challenge"] - ] - """ - We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. - """ - require_cvc_recollection: NotRequired[bool] - """ - When enabled, using a card that is attached to a customer will require the CVC to be provided again (i.e. using the cvc_token parameter). - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - statement_descriptor_suffix_kana: NotRequired["Literal['']|str"] - """ - Provides information about a card payment that customers see on their statements. Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor that's set on the account to form the complete statement descriptor. Maximum 22 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 22 characters. - """ - statement_descriptor_suffix_kanji: NotRequired["Literal['']|str"] - """ - Provides information about a card payment that customers see on their statements. Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement descriptor that's set on the account to form the complete statement descriptor. Maximum 17 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 17 characters. - """ - statement_details: NotRequired[ - "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsCardStatementDetails" - ] - """ - Statement details for this payment intent. You can use this to override the merchant details shown on your customers' statements. - """ - three_d_secure: NotRequired[ - "PaymentIntent.ModifyParamsPaymentMethodOptionsCardThreeDSecure" - ] - """ - If 3D Secure authentication was performed with a third-party provider, - the authentication details to use for this payment. - """ - - class ModifyParamsPaymentMethodOptionsCardInstallments(TypedDict): - enabled: NotRequired[bool] - """ - Setting to true enables installments for this PaymentIntent. - This will cause the response to contain a list of available installment plans. - Setting to false will prevent any selected plan from applying to a charge. - """ - plan: NotRequired[ - "Literal['']|PaymentIntent.ModifyParamsPaymentMethodOptionsCardInstallmentsPlan" - ] - """ - The selected installment plan to use for this payment attempt. - This parameter can only be provided during confirmation. - """ - - class ModifyParamsPaymentMethodOptionsCardInstallmentsPlan(TypedDict): - count: NotRequired[int] - """ - For `fixed_count` installment plans, this is required. It represents the number of installment payments your customer will make to their credit card. - """ - interval: NotRequired[Literal["month"]] - """ - For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card. - One of `month`. - """ - type: Literal["bonus", "fixed_count", "revolving"] - """ - Type of installment plan, one of `fixed_count`, `bonus`, or `revolving`. - """ - - class ModifyParamsPaymentMethodOptionsCardMandateOptions(TypedDict): - amount: int - """ - Amount to be charged for future payments. - """ - amount_type: Literal["fixed", "maximum"] - """ - One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. - """ - description: NotRequired[str] - """ - A description of the mandate or subscription that is meant to be displayed to the customer. - """ - end_date: NotRequired[int] - """ - End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. - """ - interval: Literal["day", "month", "sporadic", "week", "year"] - """ - Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`. - """ - interval_count: NotRequired[int] - """ - The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`. - """ - reference: str - """ - Unique identifier for the mandate or subscription. - """ - start_date: int - """ - Start date of the mandate or subscription. Start date should not be lesser than yesterday. - """ - supported_types: NotRequired[List[Literal["india"]]] - """ - Specifies the type of mandates supported. Possible values are `india`. - """ - - class ModifyParamsPaymentMethodOptionsCardPresent(TypedDict): - request_extended_authorization: NotRequired[bool] - """ - Request ability to capture this payment beyond the standard [authorization validity window](https://stripe.com/docs/terminal/features/extended-authorizations#authorization-validity) - """ - request_incremental_authorization_support: NotRequired[bool] - """ - Request ability to [increment](https://stripe.com/docs/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://stripe.com/docs/api/payment_intents/confirm) response to verify support. - """ - routing: NotRequired[ - "PaymentIntent.ModifyParamsPaymentMethodOptionsCardPresentRouting" - ] - """ - Network routing priority on co-branded EMV cards supporting domestic debit and international card schemes. - """ - - class ModifyParamsPaymentMethodOptionsCardPresentRouting(TypedDict): - requested_priority: NotRequired[Literal["domestic", "international"]] - """ - Routing requested priority - """ - - class ModifyParamsPaymentMethodOptionsCardStatementDetails(TypedDict): - address: NotRequired[ - "PaymentIntent.ModifyParamsPaymentMethodOptionsCardStatementDetailsAddress" - ] - """ - Please pass in an address that is within your Stripe user account country - """ - phone: NotRequired[str] - """ - Phone number (e.g., a toll-free number that customers can call) - """ - - class ModifyParamsPaymentMethodOptionsCardStatementDetailsAddress( - 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. - """ - - class ModifyParamsPaymentMethodOptionsCardThreeDSecure(TypedDict): - ares_trans_status: NotRequired[ - Literal["A", "C", "I", "N", "R", "U", "Y"] - ] - """ - The `transStatus` returned from the card Issuer's ACS in the ARes. - """ - cryptogram: str - """ - The cryptogram, also known as the "authentication value" (AAV, CAVV or - AEVV). This value is 20 bytes, base64-encoded into a 28-character string. - (Most 3D Secure providers will return the base64-encoded version, which - is what you should specify here.) - """ - electronic_commerce_indicator: NotRequired[ - Literal["01", "02", "05", "06", "07"] - ] - """ - The Electronic Commerce Indicator (ECI) is returned by your 3D Secure - provider and indicates what degree of authentication was performed. - """ - exemption_indicator: NotRequired[Literal["low_risk", "none"]] - """ - The exemption requested via 3DS and accepted by the issuer at authentication time. - """ - network_options: NotRequired[ - "PaymentIntent.ModifyParamsPaymentMethodOptionsCardThreeDSecureNetworkOptions" - ] - """ - Network specific 3DS fields. Network specific arguments require an - explicit card brand choice. The parameter `payment_method_options.card.network`` - must be populated accordingly - """ - requestor_challenge_indicator: NotRequired[str] - """ - The challenge indicator (`threeDSRequestorChallengeInd`) which was requested in the - AReq sent to the card Issuer's ACS. A string containing 2 digits from 01-99. - """ - transaction_id: str - """ - For 3D Secure 1, the XID. For 3D Secure 2, the Directory Server - Transaction ID (dsTransID). - """ - version: Literal["1.0.2", "2.1.0", "2.2.0"] - """ - The version of 3D Secure that was performed. - """ - - class ModifyParamsPaymentMethodOptionsCardThreeDSecureNetworkOptions( - TypedDict, - ): - cartes_bancaires: NotRequired[ - "PaymentIntent.ModifyParamsPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancaires" - ] - """ - Cartes Bancaires-specific 3DS fields. - """ - - class ModifyParamsPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancaires( - TypedDict, - ): - cb_avalgo: Literal["0", "1", "2", "3", "4", "A"] - """ - The cryptogram calculation algorithm used by the card Issuer's ACS - to calculate the Authentication cryptogram. Also known as `cavvAlgorithm`. - messageExtension: CB-AVALGO - """ - cb_exemption: NotRequired[str] - """ - The exemption indicator returned from Cartes Bancaires in the ARes. - message extension: CB-EXEMPTION; string (4 characters) - This is a 3 byte bitmap (low significant byte first and most significant - bit first) that has been Base64 encoded - """ - cb_score: NotRequired[int] - """ - The risk score returned from Cartes Bancaires in the ARes. - message extension: CB-SCORE; numeric value 0-99 - """ - - class ModifyParamsPaymentMethodOptionsCashapp(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds are captured from the customer's account. - - If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class ModifyParamsPaymentMethodOptionsCrypto(TypedDict): - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class ModifyParamsPaymentMethodOptionsCustomerBalance(TypedDict): - bank_transfer: NotRequired[ - "PaymentIntent.ModifyParamsPaymentMethodOptionsCustomerBalanceBankTransfer" - ] - """ - Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. - """ - funding_type: NotRequired[Literal["bank_transfer"]] - """ - The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. - """ - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class ModifyParamsPaymentMethodOptionsCustomerBalanceBankTransfer( - TypedDict, - ): - eu_bank_transfer: NotRequired[ - "PaymentIntent.ModifyParamsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer" - ] - """ - Configuration for the eu_bank_transfer funding type. - """ - requested_address_types: NotRequired[ - List[ - Literal[ - "aba", - "iban", - "sepa", - "sort_code", - "spei", - "swift", - "zengin", - ] - ] - ] - """ - List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned. - - Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`. - """ - type: Literal[ - "eu_bank_transfer", - "gb_bank_transfer", - "jp_bank_transfer", - "mx_bank_transfer", - "us_bank_transfer", - ] - """ - The list of bank transfer types that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. - """ - - class ModifyParamsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer( - TypedDict, - ): - country: str - """ - The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. - """ - - class ModifyParamsPaymentMethodOptionsEps(TypedDict): - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class ModifyParamsPaymentMethodOptionsFpx(TypedDict): - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class ModifyParamsPaymentMethodOptionsGiropay(TypedDict): - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class ModifyParamsPaymentMethodOptionsGopay(TypedDict): - setup_future_usage: NotRequired[Literal["none", "off_session"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class ModifyParamsPaymentMethodOptionsGrabpay(TypedDict): - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class ModifyParamsPaymentMethodOptionsIdBankTransfer(TypedDict): - expires_after: NotRequired[int] - """ - The UNIX timestamp until which the virtual bank account is valid. Permitted range is from 5 minutes from now until 31 days from now. If unset, it defaults to 3 days from now. - """ - expires_at: NotRequired[int] - """ - The UNIX timestamp until which the virtual bank account is valid. Permitted range is from now until 30 days from now. If unset, it defaults to 1 days from now. - """ - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class ModifyParamsPaymentMethodOptionsIdeal(TypedDict): - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class ModifyParamsPaymentMethodOptionsInteracPresent(TypedDict): - pass - - class ModifyParamsPaymentMethodOptionsKakaoPay(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds are captured from the customer's account. - - If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - """ - - class ModifyParamsPaymentMethodOptionsKlarna(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds are captured from the customer's account. - - If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. - """ - on_demand: NotRequired[ - "PaymentIntent.ModifyParamsPaymentMethodOptionsKlarnaOnDemand" - ] - """ - On-demand details if setting up or charging an on-demand payment. - """ - preferred_locale: NotRequired[ - Literal[ - "cs-CZ", - "da-DK", - "de-AT", - "de-CH", - "de-DE", - "el-GR", - "en-AT", - "en-AU", - "en-BE", - "en-CA", - "en-CH", - "en-CZ", - "en-DE", - "en-DK", - "en-ES", - "en-FI", - "en-FR", - "en-GB", - "en-GR", - "en-IE", - "en-IT", - "en-NL", - "en-NO", - "en-NZ", - "en-PL", - "en-PT", - "en-RO", - "en-SE", - "en-US", - "es-ES", - "es-US", - "fi-FI", - "fr-BE", - "fr-CA", - "fr-CH", - "fr-FR", - "it-CH", - "it-IT", - "nb-NO", - "nl-BE", - "nl-NL", - "pl-PL", - "pt-PT", - "ro-RO", - "sv-FI", - "sv-SE", - ] - ] - """ - Preferred language of the Klarna authorization page that the customer is redirected to - """ - setup_future_usage: NotRequired[ - Literal["none", "off_session", "on_session"] - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - subscriptions: NotRequired[ - "Literal['']|List[PaymentIntent.ModifyParamsPaymentMethodOptionsKlarnaSubscription]" - ] - """ - Subscription details if setting up or charging a subscription. - """ - - class ModifyParamsPaymentMethodOptionsKlarnaOnDemand(TypedDict): - average_amount: NotRequired[int] - """ - Your average amount value. You can use a value across your customer base, or segment based on customer type, country, etc. - """ - maximum_amount: NotRequired[int] - """ - The maximum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. - """ - minimum_amount: NotRequired[int] - """ - The lowest or minimum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. - """ - purchase_interval: NotRequired[Literal["day", "month", "week", "year"]] - """ - Interval at which the customer is making purchases - """ - purchase_interval_count: NotRequired[int] - """ - The number of `purchase_interval` between charges - """ - - class ModifyParamsPaymentMethodOptionsKlarnaSubscription(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Unit of time between subscription charges. - """ - interval_count: NotRequired[int] - """ - The number of intervals (specified in the `interval` attribute) between subscription charges. For example, `interval=month` and `interval_count=3` charges every 3 months. - """ - name: NotRequired[str] - """ - Name for subscription. - """ - next_billing: NotRequired[ - "PaymentIntent.ModifyParamsPaymentMethodOptionsKlarnaSubscriptionNextBilling" - ] - """ - Describes the upcoming charge for this subscription. - """ - reference: str - """ - A non-customer-facing reference to correlate subscription charges in the Klarna app. Use a value that persists across subscription charges. - """ - - class ModifyParamsPaymentMethodOptionsKlarnaSubscriptionNextBilling( - TypedDict, - ): - amount: int - """ - The amount of the next charge for the subscription. - """ - date: str - """ - The date of the next charge for the subscription in YYYY-MM-DD format. - """ - - class ModifyParamsPaymentMethodOptionsKonbini(TypedDict): - confirmation_number: NotRequired["Literal['']|str"] - """ - An optional 10 to 11 digit numeric-only string determining the confirmation code at applicable convenience stores. Must not consist of only zeroes and could be rejected in case of insufficient uniqueness. We recommend to use the customer's phone number. - """ - expires_after_days: NotRequired["Literal['']|int"] - """ - The number of calendar days (between 1 and 60) after which Konbini payment instructions will expire. For example, if a PaymentIntent is confirmed with Konbini and `expires_after_days` set to 2 on Monday JST, the instructions will expire on Wednesday 23:59:59 JST. Defaults to 3 days. - """ - expires_at: NotRequired["Literal['']|int"] - """ - The timestamp at which the Konbini payment instructions will expire. Only one of `expires_after_days` or `expires_at` may be set. - """ - product_description: NotRequired["Literal['']|str"] - """ - A product descriptor of up to 22 characters, which will appear to customers at the convenience store. - """ - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class ModifyParamsPaymentMethodOptionsKrCard(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds are captured from the customer's account. - - If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - """ - - class ModifyParamsPaymentMethodOptionsLink(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds are captured from the customer's account. - - If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. - """ - persistent_token: NotRequired[str] - """ - [Deprecated] This is a legacy parameter that no longer has any function. - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class ModifyParamsPaymentMethodOptionsMbWay(TypedDict): - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class ModifyParamsPaymentMethodOptionsMobilepay(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds are captured from the customer's account. - - If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. - """ - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class ModifyParamsPaymentMethodOptionsMultibanco(TypedDict): - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class ModifyParamsPaymentMethodOptionsNaverPay(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds are captured from the customer's account. - - If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - """ - - class ModifyParamsPaymentMethodOptionsNzBankAccount(TypedDict): - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - target_date: NotRequired[str] - """ - Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. - """ - - class ModifyParamsPaymentMethodOptionsOxxo(TypedDict): - expires_after_days: NotRequired[int] - """ - The number of calendar days before an OXXO voucher expires. For example, if you create an OXXO voucher on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time. - """ - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class ModifyParamsPaymentMethodOptionsP24(TypedDict): - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - tos_shown_and_accepted: NotRequired[bool] - """ - Confirm that the payer has accepted the P24 terms and conditions. - """ - - class ModifyParamsPaymentMethodOptionsPayByBank(TypedDict): - pass - - class ModifyParamsPaymentMethodOptionsPayco(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds are captured from the customer's account. - - If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. - """ - - class ModifyParamsPaymentMethodOptionsPaynow(TypedDict): - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class ModifyParamsPaymentMethodOptionsPaypal(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds will be captured from the customer's account. - """ - line_items: NotRequired[ - List[ - "PaymentIntent.ModifyParamsPaymentMethodOptionsPaypalLineItem" - ] - ] - """ - The line items purchased by the customer. - """ - preferred_locale: NotRequired[ - Literal[ - "cs-CZ", - "da-DK", - "de-AT", - "de-DE", - "de-LU", - "el-GR", - "en-GB", - "en-US", - "es-ES", - "fi-FI", - "fr-BE", - "fr-FR", - "fr-LU", - "hu-HU", - "it-IT", - "nl-BE", - "nl-NL", - "pl-PL", - "pt-PT", - "sk-SK", - "sv-SE", - ] - ] - """ - [Preferred locale](https://stripe.com/docs/payments/paypal/supported-locales) of the PayPal checkout page that the customer is redirected to. - """ - reference: NotRequired[str] - """ - A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. - """ - reference_id: NotRequired[str] - """ - A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. - """ - risk_correlation_id: NotRequired[str] - """ - The risk correlation ID for an on-session payment using a saved PayPal payment method. - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - subsellers: NotRequired[List[str]] - """ - The Stripe connected account IDs of the sellers on the platform for this transaction (optional). Only allowed when [separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) are used. - """ - - class ModifyParamsPaymentMethodOptionsPaypalLineItem(TypedDict): - category: NotRequired[ - Literal["digital_goods", "donation", "physical_goods"] - ] - """ - Type of the line item. - """ - description: NotRequired[str] - """ - Description of the line item. - """ - name: str - """ - Descriptive name of the line item. - """ - quantity: int - """ - Quantity of the line item. Must be a positive number. - """ - sku: NotRequired[str] - """ - Client facing stock keeping unit, article number or similar. - """ - sold_by: NotRequired[str] - """ - The Stripe account ID of the connected account that sells the item. - """ - tax: NotRequired[ - "PaymentIntent.ModifyParamsPaymentMethodOptionsPaypalLineItemTax" - ] - """ - The tax information for the line item. - """ - unit_amount: int - """ - Price for a single unit of the line item in minor units. Cannot be a negative number. - """ - - class ModifyParamsPaymentMethodOptionsPaypalLineItemTax(TypedDict): - amount: int - """ - The tax for a single unit of the line item in minor units. Cannot be a negative number. - """ - behavior: Literal["exclusive", "inclusive"] - """ - The tax behavior for the line item. - """ - - class ModifyParamsPaymentMethodOptionsPaypay(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds are captured from the customer's account. - - If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. - """ - - class ModifyParamsPaymentMethodOptionsPayto(TypedDict): - mandate_options: NotRequired[ - "PaymentIntent.ModifyParamsPaymentMethodOptionsPaytoMandateOptions" - ] - """ - Additional fields for Mandate creation. Only `purpose` field is configurable for PayTo PaymentIntent with `setup_future_usage=none`. Other fields are only applicable to PayTo PaymentIntent with `setup_future_usage=off_session` - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class ModifyParamsPaymentMethodOptionsPaytoMandateOptions(TypedDict): - amount: NotRequired[int] - """ - Amount that will be collected. It is required when `amount_type` is `fixed`. - """ - amount_type: NotRequired[Literal["fixed", "maximum"]] - """ - The type of amount that will be collected. The amount charged must be exact or up to the value of `amount` param for `fixed` or `maximum` type respectively. - """ - end_date: NotRequired[str] - """ - Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no end date. - """ - payment_schedule: NotRequired[ - Literal[ - "adhoc", - "annual", - "daily", - "fortnightly", - "monthly", - "quarterly", - "semi_annual", - "weekly", - ] - ] - """ - The periodicity at which payments will be collected. - """ - payments_per_period: NotRequired[int] - """ - The number of payments that will be made during a payment period. Defaults to 1 except for when `payment_schedule` is `adhoc`. In that case, it defaults to no limit. - """ - purpose: NotRequired[ - Literal[ - "dependant_support", - "government", - "loan", - "mortgage", - "other", - "pension", - "personal", - "retail", - "salary", - "tax", - "utility", - ] - ] - """ - The purpose for which payments are made. Defaults to retail. - """ - - class ModifyParamsPaymentMethodOptionsPix(TypedDict): - amount_includes_iof: NotRequired[Literal["always", "never"]] - """ - Determines if the amount includes the IOF tax. Defaults to `never`. - """ - expires_after_seconds: NotRequired[int] - """ - The number of seconds (between 10 and 1209600) after which Pix payment will expire. Defaults to 86400 seconds. - """ - expires_at: NotRequired[int] - """ - The timestamp at which the Pix expires (between 10 and 1209600 seconds in the future). Defaults to 1 day in the future. - """ - mandate_options: NotRequired[ - "PaymentIntent.ModifyParamsPaymentMethodOptionsPixMandateOptions" - ] - """ - Additional fields for mandate creation. Only applicable when `setup_future_usage=off_session`. - """ - setup_future_usage: NotRequired[Literal["none", "off_session"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class ModifyParamsPaymentMethodOptionsPixMandateOptions(TypedDict): - amount: NotRequired[int] - """ - Amount to be charged for future payments. Required when `amount_type=fixed`. If not provided for `amount_type=maximum`, defaults to 40000. - """ - amount_includes_iof: NotRequired[Literal["always", "never"]] - """ - Determines if the amount includes the IOF tax. Defaults to `never`. - """ - amount_type: NotRequired[Literal["fixed", "maximum"]] - """ - Type of amount. Defaults to `maximum`. - """ - currency: NotRequired[str] - """ - Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Only `brl` is supported currently. - """ - end_date: NotRequired[str] - """ - Date when the mandate expires and no further payments will be charged, in `YYYY-MM-DD`. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. - """ - payment_schedule: NotRequired[ - Literal["halfyearly", "monthly", "quarterly", "weekly", "yearly"] - ] - """ - Schedule at which the future payments will be charged. Defaults to `weekly`. - """ - reference: NotRequired[str] - """ - Subscription name displayed to buyers in their bank app. Defaults to the displayable business name. - """ - start_date: NotRequired[str] - """ - Start date of the mandate, in `YYYY-MM-DD`. Start date should be at least 3 days in the future. Defaults to 3 days after the current date. - """ - - class ModifyParamsPaymentMethodOptionsPromptpay(TypedDict): - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class ModifyParamsPaymentMethodOptionsQris(TypedDict): - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class ModifyParamsPaymentMethodOptionsRechnung(TypedDict): - pass - - class ModifyParamsPaymentMethodOptionsRevolutPay(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds are captured from the customer's account. - - If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - """ - - class ModifyParamsPaymentMethodOptionsSamsungPay(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds are captured from the customer's account. - - If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. - """ - - class ModifyParamsPaymentMethodOptionsSatispay(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds are captured from the customer's account. - - If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. - """ - - class ModifyParamsPaymentMethodOptionsSepaDebit(TypedDict): - mandate_options: NotRequired[ - "PaymentIntent.ModifyParamsPaymentMethodOptionsSepaDebitMandateOptions" - ] - """ - Additional fields for Mandate creation - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - target_date: NotRequired[str] - """ - Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. - """ - - class ModifyParamsPaymentMethodOptionsSepaDebitMandateOptions(TypedDict): - reference_prefix: NotRequired["Literal['']|str"] - """ - Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'. - """ - - class ModifyParamsPaymentMethodOptionsShopeepay(TypedDict): - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class ModifyParamsPaymentMethodOptionsSofort(TypedDict): - preferred_language: NotRequired[ - "Literal['']|Literal['de', 'en', 'es', 'fr', 'it', 'nl', 'pl']" - ] - """ - Language shown to the payer on redirect. - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class ModifyParamsPaymentMethodOptionsStripeBalance(TypedDict): - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class ModifyParamsPaymentMethodOptionsSwish(TypedDict): - reference: NotRequired["Literal['']|str"] - """ - A reference for this payment to be displayed in the Swish app. - """ - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class ModifyParamsPaymentMethodOptionsTwint(TypedDict): - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class ModifyParamsPaymentMethodOptionsUsBankAccount(TypedDict): - financial_connections: NotRequired[ - "PaymentIntent.ModifyParamsPaymentMethodOptionsUsBankAccountFinancialConnections" - ] - """ - Additional fields for Financial Connections Session creation - """ - mandate_options: NotRequired[ - "PaymentIntent.ModifyParamsPaymentMethodOptionsUsBankAccountMandateOptions" - ] - """ - Additional fields for Mandate creation - """ - networks: NotRequired[ - "PaymentIntent.ModifyParamsPaymentMethodOptionsUsBankAccountNetworks" - ] - """ - Additional fields for network related functions - """ - preferred_settlement_speed: NotRequired[ - "Literal['']|Literal['fastest', 'standard']" - ] - """ - Preferred transaction settlement speed - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - target_date: NotRequired[str] - """ - Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. - """ - verification_method: NotRequired[ - Literal["automatic", "instant", "microdeposits"] - ] - """ - Bank account verification method. - """ - - class ModifyParamsPaymentMethodOptionsUsBankAccountFinancialConnections( - TypedDict, - ): - filters: NotRequired[ - "PaymentIntent.ModifyParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters" - ] - """ - Provide filters for the linked accounts that the customer can select for the payment method. - """ - manual_entry: NotRequired[ - "PaymentIntent.ModifyParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsManualEntry" - ] - """ - Customize manual entry behavior - """ - permissions: NotRequired[ - List[ - Literal[ - "balances", "ownership", "payment_method", "transactions" - ] - ] - ] - """ - The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. - """ - prefetch: NotRequired[ - List[ - Literal[ - "balances", - "inferred_balances", - "ownership", - "transactions", - ] - ] - ] - """ - List of data features that you would like to retrieve upon account creation. - """ - return_url: NotRequired[str] - """ - For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. - """ - - class ModifyParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters( - TypedDict, - ): - account_subcategories: NotRequired[ - List[Literal["checking", "savings"]] - ] - """ - The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`. - """ - institution: NotRequired[str] - """ - ID of the institution to use to filter for selectable accounts. - """ - - class ModifyParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsManualEntry( - TypedDict, - ): - mode: Literal["automatic", "custom"] - """ - Settings for configuring manual entry of account details. - """ - - class ModifyParamsPaymentMethodOptionsUsBankAccountMandateOptions( - TypedDict, - ): - collection_method: NotRequired["Literal['']|Literal['paper']"] - """ - The method used to collect offline mandate customer acceptance. - """ - - class ModifyParamsPaymentMethodOptionsUsBankAccountNetworks(TypedDict): - requested: NotRequired[List[Literal["ach", "us_domestic_wire"]]] - """ - Triggers validations to run across the selected networks - """ - - class ModifyParamsPaymentMethodOptionsWechatPay(TypedDict): - app_id: NotRequired[str] - """ - The app ID registered with WeChat Pay. Only required when client is ios or android. - """ - client: NotRequired[Literal["android", "ios", "web"]] - """ - The client type that the end customer will pay from - """ - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class ModifyParamsPaymentMethodOptionsZip(TypedDict): - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class ModifyParamsShipping(TypedDict): - address: "PaymentIntent.ModifyParamsShippingAddress" - """ - Shipping address. - """ - carrier: NotRequired[str] - """ - The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. - """ - name: str - """ - Recipient name. - """ - phone: NotRequired[str] - """ - Recipient phone (including extension). - """ - tracking_number: NotRequired[str] - """ - The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. - """ - - class ModifyParamsShippingAddress(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. - """ - - class ModifyParamsTransferData(TypedDict): - amount: NotRequired[int] - """ - The amount that will be transferred automatically when a charge succeeds. - """ - - class RetrieveParams(RequestOptions): - client_secret: NotRequired[str] - """ - The client secret of the PaymentIntent. We require it if you use a publishable key to retrieve the source. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class SearchParams(RequestOptions): - 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. - """ - page: NotRequired[str] - """ - A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. - """ - query: str - """ - The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for payment intents](https://stripe.com/docs/search#query-fields-for-payment-intents). - """ - - class TriggerActionParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - scan_qr_code: NotRequired[ - "PaymentIntent.TriggerActionParamsScanQrCode" - ] - """ - True to simulate success, false to simulate failure. - """ - type: Literal["expire", "fund"] - """ - The type of action to be simulated. - """ - - class TriggerActionParamsScanQrCode(TypedDict): - result: NotRequired[Literal["failure", "success"]] - """ - Whether the QR Code scan's payment should succeed or fail. - """ - - class VerifyMicrodepositsParams(RequestOptions): - amounts: NotRequired[List[int]] - """ - Two positive integers, in *cents*, equal to the values of the microdeposits sent to the bank account. - """ - descriptor_code: NotRequired[str] - """ - A six-character code starting with SM present in the microdeposit sent to the bank account. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - amount: int - """ - Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). - """ - amount_capturable: int - """ - Amount that can be captured from this PaymentIntent. - """ - amount_details: Optional[AmountDetails] - amount_received: int - """ - Amount that this PaymentIntent collects. - """ - application: Optional[ExpandableField["Application"]] - """ - ID of the Connect application that created the PaymentIntent. - """ - application_fee_amount: Optional[int] - """ - The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total amount captured. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). - """ - automatic_payment_methods: Optional[AutomaticPaymentMethods] - """ - Settings to configure compatible payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods) - """ - canceled_at: Optional[int] - """ - Populated when `status` is `canceled`, this is the time at which the PaymentIntent was canceled. Measured in seconds since the Unix epoch. - """ - cancellation_reason: Optional[ - Literal[ - "abandoned", - "automatic", - "duplicate", - "expired", - "failed_invoice", - "fraudulent", - "requested_by_customer", - "void_invoice", - ] - ] - """ - Reason for cancellation of this PaymentIntent, either user-provided (`duplicate`, `fraudulent`, `requested_by_customer`, or `abandoned`) or generated by Stripe internally (`failed_invoice`, `void_invoice`, `automatic`, or `expired`). - """ - capture_method: Literal["automatic", "automatic_async", "manual"] - """ - Controls when the funds will be captured from the customer's account. - """ - client_secret: Optional[str] - """ - The client secret of this PaymentIntent. Used for client-side retrieval using a publishable key. - - The client secret can be used to complete a payment from your frontend. It should not be stored, logged, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret. - - Refer to our docs to [accept a payment](https://stripe.com/docs/payments/accept-a-payment?ui=elements) and learn about how `client_secret` should be handled. - """ - confirmation_method: Literal["automatic", "manual"] - """ - Describes whether we can confirm this PaymentIntent automatically, or if it requires customer action to confirm the payment. - """ - 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). - """ - customer: Optional[ExpandableField["Customer"]] - """ - ID of the Customer this PaymentIntent belongs to, if one exists. - - Payment methods attached to other Customers cannot be used with this PaymentIntent. - - If [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) is set and this PaymentIntent's payment method is not `card_present`, then the payment method attaches to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. - """ - customer_account: Optional[str] - """ - ID of the Account this PaymentIntent belongs to, if one exists. - - Payment methods attached to other Accounts cannot be used with this PaymentIntent. - - If [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) is set and this PaymentIntent's payment method is not `card_present`, then the payment method attaches to the Account after the PaymentIntent has been confirmed and any required actions from the user are complete. If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Account instead. - """ - description: Optional[str] - """ - An arbitrary string attached to the object. Often useful for displaying to users. - """ - excluded_payment_method_types: Optional[ - List[ - Literal[ - "acss_debit", - "affirm", - "afterpay_clearpay", - "alipay", - "alma", - "amazon_pay", - "au_becs_debit", - "bacs_debit", - "bancontact", - "billie", - "blik", - "boleto", - "card", - "cashapp", - "crypto", - "customer_balance", - "eps", - "fpx", - "giropay", - "gopay", - "grabpay", - "id_bank_transfer", - "ideal", - "kakao_pay", - "klarna", - "konbini", - "kr_card", - "mb_way", - "mobilepay", - "multibanco", - "naver_pay", - "nz_bank_account", - "oxxo", - "p24", - "pay_by_bank", - "payco", - "paynow", - "paypal", - "paypay", - "payto", - "pix", - "promptpay", - "qris", - "rechnung", - "revolut_pay", - "samsung_pay", - "satispay", - "sepa_debit", - "shopeepay", - "sofort", - "stripe_balance", - "swish", - "twint", - "us_bank_account", - "wechat_pay", - "zip", - ] + If [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) is set and this PaymentIntent's payment method is not `card_present`, then the payment method attaches to the Account after the PaymentIntent has been confirmed and any required actions from the user are complete. If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Account instead. + """ + description: Optional[str] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ + excluded_payment_method_types: Optional[ + List[ + Literal[ + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "alma", + "amazon_pay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "billie", + "blik", + "boleto", + "card", + "cashapp", + "crypto", + "customer_balance", + "eps", + "fpx", + "giropay", + "gopay", + "grabpay", + "id_bank_transfer", + "ideal", + "kakao_pay", + "klarna", + "konbini", + "kr_card", + "mb_way", + "mobilepay", + "multibanco", + "naver_pay", + "nz_bank_account", + "oxxo", + "p24", + "pay_by_bank", + "payco", + "paynow", + "paypal", + "paypay", + "payto", + "pix", + "promptpay", + "qris", + "rechnung", + "revolut_pay", + "samsung_pay", + "satispay", + "sepa_debit", + "shopeepay", + "sofort", + "stripe_balance", + "swish", + "twint", + "us_bank_account", + "wechat_pay", + "zip", + ] ] ] """ @@ -17780,7 +3650,7 @@ class VerifyMicrodepositsParams(RequestOptions): def _cls_apply_customer_balance( cls, intent: str, - **params: Unpack["PaymentIntent.ApplyCustomerBalanceParams"], + **params: Unpack["PaymentIntentApplyCustomerBalanceParams"], ) -> "PaymentIntent": """ Manually reconcile the remaining amount for a customer_balance PaymentIntent. @@ -17800,7 +3670,7 @@ def _cls_apply_customer_balance( @staticmethod def apply_customer_balance( intent: str, - **params: Unpack["PaymentIntent.ApplyCustomerBalanceParams"], + **params: Unpack["PaymentIntentApplyCustomerBalanceParams"], ) -> "PaymentIntent": """ Manually reconcile the remaining amount for a customer_balance PaymentIntent. @@ -17809,7 +3679,7 @@ def apply_customer_balance( @overload def apply_customer_balance( - self, **params: Unpack["PaymentIntent.ApplyCustomerBalanceParams"] + self, **params: Unpack["PaymentIntentApplyCustomerBalanceParams"] ) -> "PaymentIntent": """ Manually reconcile the remaining amount for a customer_balance PaymentIntent. @@ -17818,7 +3688,7 @@ def apply_customer_balance( @class_method_variant("_cls_apply_customer_balance") def apply_customer_balance( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["PaymentIntent.ApplyCustomerBalanceParams"] + self, **params: Unpack["PaymentIntentApplyCustomerBalanceParams"] ) -> "PaymentIntent": """ Manually reconcile the remaining amount for a customer_balance PaymentIntent. @@ -17838,7 +3708,7 @@ def apply_customer_balance( # pyright: ignore[reportGeneralTypeIssues] async def _cls_apply_customer_balance_async( cls, intent: str, - **params: Unpack["PaymentIntent.ApplyCustomerBalanceParams"], + **params: Unpack["PaymentIntentApplyCustomerBalanceParams"], ) -> "PaymentIntent": """ Manually reconcile the remaining amount for a customer_balance PaymentIntent. @@ -17858,7 +3728,7 @@ async def _cls_apply_customer_balance_async( @staticmethod async def apply_customer_balance_async( intent: str, - **params: Unpack["PaymentIntent.ApplyCustomerBalanceParams"], + **params: Unpack["PaymentIntentApplyCustomerBalanceParams"], ) -> "PaymentIntent": """ Manually reconcile the remaining amount for a customer_balance PaymentIntent. @@ -17867,7 +3737,7 @@ async def apply_customer_balance_async( @overload async def apply_customer_balance_async( - self, **params: Unpack["PaymentIntent.ApplyCustomerBalanceParams"] + self, **params: Unpack["PaymentIntentApplyCustomerBalanceParams"] ) -> "PaymentIntent": """ Manually reconcile the remaining amount for a customer_balance PaymentIntent. @@ -17876,7 +3746,7 @@ async def apply_customer_balance_async( @class_method_variant("_cls_apply_customer_balance_async") async def apply_customer_balance_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["PaymentIntent.ApplyCustomerBalanceParams"] + self, **params: Unpack["PaymentIntentApplyCustomerBalanceParams"] ) -> "PaymentIntent": """ Manually reconcile the remaining amount for a customer_balance PaymentIntent. @@ -17894,7 +3764,7 @@ async def apply_customer_balance_async( # pyright: ignore[reportGeneralTypeIssu @classmethod def _cls_cancel( - cls, intent: str, **params: Unpack["PaymentIntent.CancelParams"] + cls, intent: str, **params: Unpack["PaymentIntentCancelParams"] ) -> "PaymentIntent": """ You can cancel a PaymentIntent object when it's in one of these statuses: requires_payment_method, requires_capture, requires_confirmation, requires_action or, [in rare cases](https://docs.stripe.com/docs/payments/intents), processing. @@ -17917,7 +3787,7 @@ def _cls_cancel( @overload @staticmethod def cancel( - intent: str, **params: Unpack["PaymentIntent.CancelParams"] + intent: str, **params: Unpack["PaymentIntentCancelParams"] ) -> "PaymentIntent": """ You can cancel a PaymentIntent object when it's in one of these statuses: requires_payment_method, requires_capture, requires_confirmation, requires_action or, [in rare cases](https://docs.stripe.com/docs/payments/intents), processing. @@ -17930,7 +3800,7 @@ def cancel( @overload def cancel( - self, **params: Unpack["PaymentIntent.CancelParams"] + self, **params: Unpack["PaymentIntentCancelParams"] ) -> "PaymentIntent": """ You can cancel a PaymentIntent object when it's in one of these statuses: requires_payment_method, requires_capture, requires_confirmation, requires_action or, [in rare cases](https://docs.stripe.com/docs/payments/intents), processing. @@ -17943,7 +3813,7 @@ def cancel( @class_method_variant("_cls_cancel") def cancel( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["PaymentIntent.CancelParams"] + self, **params: Unpack["PaymentIntentCancelParams"] ) -> "PaymentIntent": """ You can cancel a PaymentIntent object when it's in one of these statuses: requires_payment_method, requires_capture, requires_confirmation, requires_action or, [in rare cases](https://docs.stripe.com/docs/payments/intents), processing. @@ -17965,7 +3835,7 @@ def cancel( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_cancel_async( - cls, intent: str, **params: Unpack["PaymentIntent.CancelParams"] + cls, intent: str, **params: Unpack["PaymentIntentCancelParams"] ) -> "PaymentIntent": """ You can cancel a PaymentIntent object when it's in one of these statuses: requires_payment_method, requires_capture, requires_confirmation, requires_action or, [in rare cases](https://docs.stripe.com/docs/payments/intents), processing. @@ -17988,7 +3858,7 @@ async def _cls_cancel_async( @overload @staticmethod async def cancel_async( - intent: str, **params: Unpack["PaymentIntent.CancelParams"] + intent: str, **params: Unpack["PaymentIntentCancelParams"] ) -> "PaymentIntent": """ You can cancel a PaymentIntent object when it's in one of these statuses: requires_payment_method, requires_capture, requires_confirmation, requires_action or, [in rare cases](https://docs.stripe.com/docs/payments/intents), processing. @@ -18001,7 +3871,7 @@ async def cancel_async( @overload async def cancel_async( - self, **params: Unpack["PaymentIntent.CancelParams"] + self, **params: Unpack["PaymentIntentCancelParams"] ) -> "PaymentIntent": """ You can cancel a PaymentIntent object when it's in one of these statuses: requires_payment_method, requires_capture, requires_confirmation, requires_action or, [in rare cases](https://docs.stripe.com/docs/payments/intents), processing. @@ -18014,7 +3884,7 @@ async def cancel_async( @class_method_variant("_cls_cancel_async") async def cancel_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["PaymentIntent.CancelParams"] + self, **params: Unpack["PaymentIntentCancelParams"] ) -> "PaymentIntent": """ You can cancel a PaymentIntent object when it's in one of these statuses: requires_payment_method, requires_capture, requires_confirmation, requires_action or, [in rare cases](https://docs.stripe.com/docs/payments/intents), processing. @@ -18036,7 +3906,7 @@ async def cancel_async( # pyright: ignore[reportGeneralTypeIssues] @classmethod def _cls_capture( - cls, intent: str, **params: Unpack["PaymentIntent.CaptureParams"] + cls, intent: str, **params: Unpack["PaymentIntentCaptureParams"] ) -> "PaymentIntent": """ Capture the funds of an existing uncaptured PaymentIntent when its status is requires_capture. @@ -18059,7 +3929,7 @@ def _cls_capture( @overload @staticmethod def capture( - intent: str, **params: Unpack["PaymentIntent.CaptureParams"] + intent: str, **params: Unpack["PaymentIntentCaptureParams"] ) -> "PaymentIntent": """ Capture the funds of an existing uncaptured PaymentIntent when its status is requires_capture. @@ -18072,7 +3942,7 @@ def capture( @overload def capture( - self, **params: Unpack["PaymentIntent.CaptureParams"] + self, **params: Unpack["PaymentIntentCaptureParams"] ) -> "PaymentIntent": """ Capture the funds of an existing uncaptured PaymentIntent when its status is requires_capture. @@ -18085,7 +3955,7 @@ def capture( @class_method_variant("_cls_capture") def capture( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["PaymentIntent.CaptureParams"] + self, **params: Unpack["PaymentIntentCaptureParams"] ) -> "PaymentIntent": """ Capture the funds of an existing uncaptured PaymentIntent when its status is requires_capture. @@ -18107,7 +3977,7 @@ def capture( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_capture_async( - cls, intent: str, **params: Unpack["PaymentIntent.CaptureParams"] + cls, intent: str, **params: Unpack["PaymentIntentCaptureParams"] ) -> "PaymentIntent": """ Capture the funds of an existing uncaptured PaymentIntent when its status is requires_capture. @@ -18130,7 +4000,7 @@ async def _cls_capture_async( @overload @staticmethod async def capture_async( - intent: str, **params: Unpack["PaymentIntent.CaptureParams"] + intent: str, **params: Unpack["PaymentIntentCaptureParams"] ) -> "PaymentIntent": """ Capture the funds of an existing uncaptured PaymentIntent when its status is requires_capture. @@ -18143,7 +4013,7 @@ async def capture_async( @overload async def capture_async( - self, **params: Unpack["PaymentIntent.CaptureParams"] + self, **params: Unpack["PaymentIntentCaptureParams"] ) -> "PaymentIntent": """ Capture the funds of an existing uncaptured PaymentIntent when its status is requires_capture. @@ -18156,7 +4026,7 @@ async def capture_async( @class_method_variant("_cls_capture_async") async def capture_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["PaymentIntent.CaptureParams"] + self, **params: Unpack["PaymentIntentCaptureParams"] ) -> "PaymentIntent": """ Capture the funds of an existing uncaptured PaymentIntent when its status is requires_capture. @@ -18178,7 +4048,7 @@ async def capture_async( # pyright: ignore[reportGeneralTypeIssues] @classmethod def _cls_confirm( - cls, intent: str, **params: Unpack["PaymentIntent.ConfirmParams"] + cls, intent: str, **params: Unpack["PaymentIntentConfirmParams"] ) -> "PaymentIntent": """ Confirm that your customer intends to pay with current or provided @@ -18226,7 +4096,7 @@ def _cls_confirm( @overload @staticmethod def confirm( - intent: str, **params: Unpack["PaymentIntent.ConfirmParams"] + intent: str, **params: Unpack["PaymentIntentConfirmParams"] ) -> "PaymentIntent": """ Confirm that your customer intends to pay with current or provided @@ -18264,7 +4134,7 @@ def confirm( @overload def confirm( - self, **params: Unpack["PaymentIntent.ConfirmParams"] + self, **params: Unpack["PaymentIntentConfirmParams"] ) -> "PaymentIntent": """ Confirm that your customer intends to pay with current or provided @@ -18302,7 +4172,7 @@ def confirm( @class_method_variant("_cls_confirm") def confirm( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["PaymentIntent.ConfirmParams"] + self, **params: Unpack["PaymentIntentConfirmParams"] ) -> "PaymentIntent": """ Confirm that your customer intends to pay with current or provided @@ -18349,7 +4219,7 @@ def confirm( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_confirm_async( - cls, intent: str, **params: Unpack["PaymentIntent.ConfirmParams"] + cls, intent: str, **params: Unpack["PaymentIntentConfirmParams"] ) -> "PaymentIntent": """ Confirm that your customer intends to pay with current or provided @@ -18397,7 +4267,7 @@ async def _cls_confirm_async( @overload @staticmethod async def confirm_async( - intent: str, **params: Unpack["PaymentIntent.ConfirmParams"] + intent: str, **params: Unpack["PaymentIntentConfirmParams"] ) -> "PaymentIntent": """ Confirm that your customer intends to pay with current or provided @@ -18435,7 +4305,7 @@ async def confirm_async( @overload async def confirm_async( - self, **params: Unpack["PaymentIntent.ConfirmParams"] + self, **params: Unpack["PaymentIntentConfirmParams"] ) -> "PaymentIntent": """ Confirm that your customer intends to pay with current or provided @@ -18473,7 +4343,7 @@ async def confirm_async( @class_method_variant("_cls_confirm_async") async def confirm_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["PaymentIntent.ConfirmParams"] + self, **params: Unpack["PaymentIntentConfirmParams"] ) -> "PaymentIntent": """ Confirm that your customer intends to pay with current or provided @@ -18520,7 +4390,7 @@ async def confirm_async( # pyright: ignore[reportGeneralTypeIssues] @classmethod def create( - cls, **params: Unpack["PaymentIntent.CreateParams"] + cls, **params: Unpack["PaymentIntentCreateParams"] ) -> "PaymentIntent": """ Creates a PaymentIntent object. @@ -18545,7 +4415,7 @@ def create( @classmethod async def create_async( - cls, **params: Unpack["PaymentIntent.CreateParams"] + cls, **params: Unpack["PaymentIntentCreateParams"] ) -> "PaymentIntent": """ Creates a PaymentIntent object. @@ -18572,7 +4442,7 @@ async def create_async( def _cls_decrement_authorization( cls, intent: str, - **params: Unpack["PaymentIntent.DecrementAuthorizationParams"], + **params: Unpack["PaymentIntentDecrementAuthorizationParams"], ) -> "PaymentIntent": """ Perform a decremental authorization on an eligible @@ -18607,7 +4477,7 @@ def _cls_decrement_authorization( @staticmethod def decrement_authorization( intent: str, - **params: Unpack["PaymentIntent.DecrementAuthorizationParams"], + **params: Unpack["PaymentIntentDecrementAuthorizationParams"], ) -> "PaymentIntent": """ Perform a decremental authorization on an eligible @@ -18631,7 +4501,7 @@ def decrement_authorization( @overload def decrement_authorization( - self, **params: Unpack["PaymentIntent.DecrementAuthorizationParams"] + self, **params: Unpack["PaymentIntentDecrementAuthorizationParams"] ) -> "PaymentIntent": """ Perform a decremental authorization on an eligible @@ -18655,7 +4525,7 @@ def decrement_authorization( @class_method_variant("_cls_decrement_authorization") def decrement_authorization( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["PaymentIntent.DecrementAuthorizationParams"] + self, **params: Unpack["PaymentIntentDecrementAuthorizationParams"] ) -> "PaymentIntent": """ Perform a decremental authorization on an eligible @@ -18690,7 +4560,7 @@ def decrement_authorization( # pyright: ignore[reportGeneralTypeIssues] async def _cls_decrement_authorization_async( cls, intent: str, - **params: Unpack["PaymentIntent.DecrementAuthorizationParams"], + **params: Unpack["PaymentIntentDecrementAuthorizationParams"], ) -> "PaymentIntent": """ Perform a decremental authorization on an eligible @@ -18725,7 +4595,7 @@ async def _cls_decrement_authorization_async( @staticmethod async def decrement_authorization_async( intent: str, - **params: Unpack["PaymentIntent.DecrementAuthorizationParams"], + **params: Unpack["PaymentIntentDecrementAuthorizationParams"], ) -> "PaymentIntent": """ Perform a decremental authorization on an eligible @@ -18749,7 +4619,7 @@ async def decrement_authorization_async( @overload async def decrement_authorization_async( - self, **params: Unpack["PaymentIntent.DecrementAuthorizationParams"] + self, **params: Unpack["PaymentIntentDecrementAuthorizationParams"] ) -> "PaymentIntent": """ Perform a decremental authorization on an eligible @@ -18773,7 +4643,7 @@ async def decrement_authorization_async( @class_method_variant("_cls_decrement_authorization_async") async def decrement_authorization_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["PaymentIntent.DecrementAuthorizationParams"] + self, **params: Unpack["PaymentIntentDecrementAuthorizationParams"] ) -> "PaymentIntent": """ Perform a decremental authorization on an eligible @@ -18808,7 +4678,7 @@ async def decrement_authorization_async( # pyright: ignore[reportGeneralTypeIss def _cls_increment_authorization( cls, intent: str, - **params: Unpack["PaymentIntent.IncrementAuthorizationParams"], + **params: Unpack["PaymentIntentIncrementAuthorizationParams"], ) -> "PaymentIntent": """ Perform an incremental authorization on an eligible @@ -18851,7 +4721,7 @@ def _cls_increment_authorization( @staticmethod def increment_authorization( intent: str, - **params: Unpack["PaymentIntent.IncrementAuthorizationParams"], + **params: Unpack["PaymentIntentIncrementAuthorizationParams"], ) -> "PaymentIntent": """ Perform an incremental authorization on an eligible @@ -18883,7 +4753,7 @@ def increment_authorization( @overload def increment_authorization( - self, **params: Unpack["PaymentIntent.IncrementAuthorizationParams"] + self, **params: Unpack["PaymentIntentIncrementAuthorizationParams"] ) -> "PaymentIntent": """ Perform an incremental authorization on an eligible @@ -18915,7 +4785,7 @@ def increment_authorization( @class_method_variant("_cls_increment_authorization") def increment_authorization( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["PaymentIntent.IncrementAuthorizationParams"] + self, **params: Unpack["PaymentIntentIncrementAuthorizationParams"] ) -> "PaymentIntent": """ Perform an incremental authorization on an eligible @@ -18958,7 +4828,7 @@ def increment_authorization( # pyright: ignore[reportGeneralTypeIssues] async def _cls_increment_authorization_async( cls, intent: str, - **params: Unpack["PaymentIntent.IncrementAuthorizationParams"], + **params: Unpack["PaymentIntentIncrementAuthorizationParams"], ) -> "PaymentIntent": """ Perform an incremental authorization on an eligible @@ -19001,7 +4871,7 @@ async def _cls_increment_authorization_async( @staticmethod async def increment_authorization_async( intent: str, - **params: Unpack["PaymentIntent.IncrementAuthorizationParams"], + **params: Unpack["PaymentIntentIncrementAuthorizationParams"], ) -> "PaymentIntent": """ Perform an incremental authorization on an eligible @@ -19033,7 +4903,7 @@ async def increment_authorization_async( @overload async def increment_authorization_async( - self, **params: Unpack["PaymentIntent.IncrementAuthorizationParams"] + self, **params: Unpack["PaymentIntentIncrementAuthorizationParams"] ) -> "PaymentIntent": """ Perform an incremental authorization on an eligible @@ -19065,7 +4935,7 @@ async def increment_authorization_async( @class_method_variant("_cls_increment_authorization_async") async def increment_authorization_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["PaymentIntent.IncrementAuthorizationParams"] + self, **params: Unpack["PaymentIntentIncrementAuthorizationParams"] ) -> "PaymentIntent": """ Perform an incremental authorization on an eligible @@ -19106,7 +4976,7 @@ async def increment_authorization_async( # pyright: ignore[reportGeneralTypeIss @classmethod def list( - cls, **params: Unpack["PaymentIntent.ListParams"] + cls, **params: Unpack["PaymentIntentListParams"] ) -> ListObject["PaymentIntent"]: """ Returns a list of PaymentIntents. @@ -19126,7 +4996,7 @@ def list( @classmethod async def list_async( - cls, **params: Unpack["PaymentIntent.ListParams"] + cls, **params: Unpack["PaymentIntentListParams"] ) -> ListObject["PaymentIntent"]: """ Returns a list of PaymentIntents. @@ -19146,7 +5016,7 @@ async def list_async( @classmethod def modify( - cls, id: str, **params: Unpack["PaymentIntent.ModifyParams"] + cls, id: str, **params: Unpack["PaymentIntentModifyParams"] ) -> "PaymentIntent": """ Updates properties on a PaymentIntent object without confirming. @@ -19169,7 +5039,7 @@ def modify( @classmethod async def modify_async( - cls, id: str, **params: Unpack["PaymentIntent.ModifyParams"] + cls, id: str, **params: Unpack["PaymentIntentModifyParams"] ) -> "PaymentIntent": """ Updates properties on a PaymentIntent object without confirming. @@ -19192,7 +5062,7 @@ async def modify_async( @classmethod def retrieve( - cls, id: str, **params: Unpack["PaymentIntent.RetrieveParams"] + cls, id: str, **params: Unpack["PaymentIntentRetrieveParams"] ) -> "PaymentIntent": """ Retrieves the details of a PaymentIntent that has previously been created. @@ -19207,7 +5077,7 @@ def retrieve( @classmethod async def retrieve_async( - cls, id: str, **params: Unpack["PaymentIntent.RetrieveParams"] + cls, id: str, **params: Unpack["PaymentIntentRetrieveParams"] ) -> "PaymentIntent": """ Retrieves the details of a PaymentIntent that has previously been created. @@ -19222,7 +5092,7 @@ async def retrieve_async( @classmethod def _cls_trigger_action( - cls, intent: str, **params: Unpack["PaymentIntent.TriggerActionParams"] + cls, intent: str, **params: Unpack["PaymentIntentTriggerActionParams"] ) -> "PaymentIntent": """ Trigger an external action on a PaymentIntent. @@ -19241,7 +5111,7 @@ def _cls_trigger_action( @overload @staticmethod def trigger_action( - intent: str, **params: Unpack["PaymentIntent.TriggerActionParams"] + intent: str, **params: Unpack["PaymentIntentTriggerActionParams"] ) -> "PaymentIntent": """ Trigger an external action on a PaymentIntent. @@ -19250,7 +5120,7 @@ def trigger_action( @overload def trigger_action( - self, **params: Unpack["PaymentIntent.TriggerActionParams"] + self, **params: Unpack["PaymentIntentTriggerActionParams"] ) -> "PaymentIntent": """ Trigger an external action on a PaymentIntent. @@ -19259,7 +5129,7 @@ def trigger_action( @class_method_variant("_cls_trigger_action") def trigger_action( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["PaymentIntent.TriggerActionParams"] + self, **params: Unpack["PaymentIntentTriggerActionParams"] ) -> "PaymentIntent": """ Trigger an external action on a PaymentIntent. @@ -19277,7 +5147,7 @@ def trigger_action( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_trigger_action_async( - cls, intent: str, **params: Unpack["PaymentIntent.TriggerActionParams"] + cls, intent: str, **params: Unpack["PaymentIntentTriggerActionParams"] ) -> "PaymentIntent": """ Trigger an external action on a PaymentIntent. @@ -19296,7 +5166,7 @@ async def _cls_trigger_action_async( @overload @staticmethod async def trigger_action_async( - intent: str, **params: Unpack["PaymentIntent.TriggerActionParams"] + intent: str, **params: Unpack["PaymentIntentTriggerActionParams"] ) -> "PaymentIntent": """ Trigger an external action on a PaymentIntent. @@ -19305,7 +5175,7 @@ async def trigger_action_async( @overload async def trigger_action_async( - self, **params: Unpack["PaymentIntent.TriggerActionParams"] + self, **params: Unpack["PaymentIntentTriggerActionParams"] ) -> "PaymentIntent": """ Trigger an external action on a PaymentIntent. @@ -19314,7 +5184,7 @@ async def trigger_action_async( @class_method_variant("_cls_trigger_action_async") async def trigger_action_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["PaymentIntent.TriggerActionParams"] + self, **params: Unpack["PaymentIntentTriggerActionParams"] ) -> "PaymentIntent": """ Trigger an external action on a PaymentIntent. @@ -19334,7 +5204,7 @@ async def trigger_action_async( # pyright: ignore[reportGeneralTypeIssues] def _cls_verify_microdeposits( cls, intent: str, - **params: Unpack["PaymentIntent.VerifyMicrodepositsParams"], + **params: Unpack["PaymentIntentVerifyMicrodepositsParams"], ) -> "PaymentIntent": """ Verifies microdeposits on a PaymentIntent object. @@ -19353,8 +5223,7 @@ def _cls_verify_microdeposits( @overload @staticmethod def verify_microdeposits( - intent: str, - **params: Unpack["PaymentIntent.VerifyMicrodepositsParams"], + intent: str, **params: Unpack["PaymentIntentVerifyMicrodepositsParams"] ) -> "PaymentIntent": """ Verifies microdeposits on a PaymentIntent object. @@ -19363,7 +5232,7 @@ def verify_microdeposits( @overload def verify_microdeposits( - self, **params: Unpack["PaymentIntent.VerifyMicrodepositsParams"] + self, **params: Unpack["PaymentIntentVerifyMicrodepositsParams"] ) -> "PaymentIntent": """ Verifies microdeposits on a PaymentIntent object. @@ -19372,7 +5241,7 @@ def verify_microdeposits( @class_method_variant("_cls_verify_microdeposits") def verify_microdeposits( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["PaymentIntent.VerifyMicrodepositsParams"] + self, **params: Unpack["PaymentIntentVerifyMicrodepositsParams"] ) -> "PaymentIntent": """ Verifies microdeposits on a PaymentIntent object. @@ -19392,7 +5261,7 @@ def verify_microdeposits( # pyright: ignore[reportGeneralTypeIssues] async def _cls_verify_microdeposits_async( cls, intent: str, - **params: Unpack["PaymentIntent.VerifyMicrodepositsParams"], + **params: Unpack["PaymentIntentVerifyMicrodepositsParams"], ) -> "PaymentIntent": """ Verifies microdeposits on a PaymentIntent object. @@ -19411,8 +5280,7 @@ async def _cls_verify_microdeposits_async( @overload @staticmethod async def verify_microdeposits_async( - intent: str, - **params: Unpack["PaymentIntent.VerifyMicrodepositsParams"], + intent: str, **params: Unpack["PaymentIntentVerifyMicrodepositsParams"] ) -> "PaymentIntent": """ Verifies microdeposits on a PaymentIntent object. @@ -19421,7 +5289,7 @@ async def verify_microdeposits_async( @overload async def verify_microdeposits_async( - self, **params: Unpack["PaymentIntent.VerifyMicrodepositsParams"] + self, **params: Unpack["PaymentIntentVerifyMicrodepositsParams"] ) -> "PaymentIntent": """ Verifies microdeposits on a PaymentIntent object. @@ -19430,7 +5298,7 @@ async def verify_microdeposits_async( @class_method_variant("_cls_verify_microdeposits_async") async def verify_microdeposits_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["PaymentIntent.VerifyMicrodepositsParams"] + self, **params: Unpack["PaymentIntentVerifyMicrodepositsParams"] ) -> "PaymentIntent": """ Verifies microdeposits on a PaymentIntent object. @@ -19448,7 +5316,7 @@ async def verify_microdeposits_async( # pyright: ignore[reportGeneralTypeIssues @classmethod def search( - cls, *args, **kwargs: Unpack["PaymentIntent.SearchParams"] + cls, *args, **kwargs: Unpack["PaymentIntentSearchParams"] ) -> SearchResultObject["PaymentIntent"]: """ Search for PaymentIntents you've previously created using Stripe's [Search Query Language](https://docs.stripe.com/docs/search#search-query-language). @@ -19462,7 +5330,7 @@ def search( @classmethod async def search_async( - cls, *args, **kwargs: Unpack["PaymentIntent.SearchParams"] + cls, *args, **kwargs: Unpack["PaymentIntentSearchParams"] ) -> SearchResultObject["PaymentIntent"]: """ Search for PaymentIntents you've previously created using Stripe's [Search Query Language](https://docs.stripe.com/docs/search#search-query-language). @@ -19476,13 +5344,13 @@ async def search_async( @classmethod def search_auto_paging_iter( - cls, *args, **kwargs: Unpack["PaymentIntent.SearchParams"] + cls, *args, **kwargs: Unpack["PaymentIntentSearchParams"] ) -> Iterator["PaymentIntent"]: return cls.search(*args, **kwargs).auto_paging_iter() @classmethod async def search_auto_paging_iter_async( - cls, *args, **kwargs: Unpack["PaymentIntent.SearchParams"] + cls, *args, **kwargs: Unpack["PaymentIntentSearchParams"] ) -> AsyncIterator["PaymentIntent"]: return (await cls.search_async(*args, **kwargs)).auto_paging_iter() @@ -19490,7 +5358,7 @@ async def search_auto_paging_iter_async( def list_amount_details_line_items( cls, intent: str, - **params: Unpack["PaymentIntent.ListAmountDetailsLineItemsParams"], + **params: Unpack["PaymentIntentListAmountDetailsLineItemsParams"], ) -> ListObject["PaymentIntentAmountDetailsLineItem"]: """ Lists all LineItems of a given PaymentIntent. @@ -19510,7 +5378,7 @@ def list_amount_details_line_items( async def list_amount_details_line_items_async( cls, intent: str, - **params: Unpack["PaymentIntent.ListAmountDetailsLineItemsParams"], + **params: Unpack["PaymentIntentListAmountDetailsLineItemsParams"], ) -> ListObject["PaymentIntentAmountDetailsLineItem"]: """ Lists all LineItems of a given PaymentIntent. diff --git a/stripe/_payment_intent_amount_details_line_item_service.py b/stripe/_payment_intent_amount_details_line_item_service.py index b98f5060d..429aeb91e 100644 --- a/stripe/_payment_intent_amount_details_line_item_service.py +++ b/stripe/_payment_intent_amount_details_line_item_service.py @@ -7,34 +7,21 @@ from stripe._request_options import RequestOptions from stripe._stripe_service import StripeService from stripe._util import sanitize_id -from typing import List, Optional, cast -from typing_extensions import NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params._payment_intent_amount_details_line_item_list_params import ( + PaymentIntentAmountDetailsLineItemListParams, + ) -class PaymentIntentAmountDetailsLineItemService(StripeService): - class ListParams(TypedDict): - 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 PaymentIntentAmountDetailsLineItemService(StripeService): def list( self, intent: str, params: Optional[ - "PaymentIntentAmountDetailsLineItemService.ListParams" + "PaymentIntentAmountDetailsLineItemListParams" ] = None, options: Optional[RequestOptions] = None, ) -> ListObject[PaymentIntentAmountDetailsLineItem]: @@ -58,7 +45,7 @@ async def list_async( self, intent: str, params: Optional[ - "PaymentIntentAmountDetailsLineItemService.ListParams" + "PaymentIntentAmountDetailsLineItemListParams" ] = None, options: Optional[RequestOptions] = None, ) -> ListObject[PaymentIntentAmountDetailsLineItem]: diff --git a/stripe/_payment_intent_service.py b/stripe/_payment_intent_service.py index dbb9ff6cf..e944c30c8 100644 --- a/stripe/_payment_intent_service.py +++ b/stripe/_payment_intent_service.py @@ -9,8 +9,49 @@ from stripe._search_result_object import SearchResultObject from stripe._stripe_service import StripeService from stripe._util import sanitize_id -from typing import Dict, List, Optional, Union, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params._payment_intent_apply_customer_balance_params import ( + PaymentIntentApplyCustomerBalanceParams, + ) + from stripe.params._payment_intent_cancel_params import ( + PaymentIntentCancelParams, + ) + from stripe.params._payment_intent_capture_params import ( + PaymentIntentCaptureParams, + ) + from stripe.params._payment_intent_confirm_params import ( + PaymentIntentConfirmParams, + ) + from stripe.params._payment_intent_create_params import ( + PaymentIntentCreateParams, + ) + from stripe.params._payment_intent_decrement_authorization_params import ( + PaymentIntentDecrementAuthorizationParams, + ) + from stripe.params._payment_intent_increment_authorization_params import ( + PaymentIntentIncrementAuthorizationParams, + ) + from stripe.params._payment_intent_list_params import ( + PaymentIntentListParams, + ) + from stripe.params._payment_intent_retrieve_params import ( + PaymentIntentRetrieveParams, + ) + from stripe.params._payment_intent_search_params import ( + PaymentIntentSearchParams, + ) + from stripe.params._payment_intent_trigger_action_params import ( + PaymentIntentTriggerActionParams, + ) + from stripe.params._payment_intent_update_params import ( + PaymentIntentUpdateParams, + ) + from stripe.params._payment_intent_verify_microdeposits_params import ( + PaymentIntentVerifyMicrodepositsParams, + ) class PaymentIntentService(StripeService): @@ -22,14326 +63,9 @@ def __init__(self, requestor): ) ) - class ApplyCustomerBalanceParams(TypedDict): - amount: NotRequired[int] - """ - Amount that you intend to apply to this PaymentIntent from the customer's cash balance. If the PaymentIntent was created by an Invoice, the full amount of the PaymentIntent is applied regardless of this parameter. - - A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (for example, 100 cents to charge 1 USD or 100 to charge 100 JPY, a zero-decimal currency). The maximum amount is the amount of the PaymentIntent. - - When you omit the amount, it defaults to the remaining amount requested on the PaymentIntent. - """ - currency: NotRequired[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. - """ - - class CancelParams(TypedDict): - cancellation_reason: NotRequired[ - Literal[ - "abandoned", "duplicate", "fraudulent", "requested_by_customer" - ] - ] - """ - Reason for canceling this PaymentIntent. Possible values are: `duplicate`, `fraudulent`, `requested_by_customer`, or `abandoned` - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class CaptureParams(TypedDict): - amount_details: NotRequired[ - "PaymentIntentService.CaptureParamsAmountDetails" - ] - """ - Provides industry-specific information about the amount. - """ - amount_to_capture: NotRequired[int] - """ - The amount to capture from the PaymentIntent, which must be less than or equal to the original amount. Defaults to the full `amount_capturable` if it's not provided. - """ - application_fee_amount: NotRequired[int] - """ - The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total amount captured. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - final_capture: NotRequired[bool] - """ - Defaults to `true`. When capturing a PaymentIntent, setting `final_capture` to `false` notifies Stripe to not release the remaining uncaptured funds to make sure that they're captured in future requests. You can only use this setting when [multicapture](https://stripe.com/docs/payments/multicapture) is available for PaymentIntents. - """ - hooks: NotRequired["PaymentIntentService.CaptureParamsHooks"] - """ - Automations to be run during the PaymentIntent lifecycle - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - payment_details: NotRequired[ - "Literal['']|PaymentIntentService.CaptureParamsPaymentDetails" - ] - """ - Provides industry-specific information about the charge. - """ - statement_descriptor: NotRequired[str] - """ - Text that appears on the customer's statement as the statement descriptor for a non-card charge. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see [the Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors). - - Setting this value for a card charge returns an error. For card charges, set the [statement_descriptor_suffix](https://docs.stripe.com/get-started/account/statement-descriptors#dynamic) instead. - """ - statement_descriptor_suffix: NotRequired[str] - """ - Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. - """ - transfer_data: NotRequired[ - "PaymentIntentService.CaptureParamsTransferData" - ] - """ - The parameters that you can use to automatically create a transfer after the payment - is captured. Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). - """ - - class CaptureParamsAmountDetails(TypedDict): - discount_amount: NotRequired["Literal['']|int"] - """ - The total discount applied on the transaction. - """ - line_items: NotRequired[ - "Literal['']|List[PaymentIntentService.CaptureParamsAmountDetailsLineItem]" - ] - """ - A list of line items, each containing information about a product in the PaymentIntent. There is a maximum of 100 line items. - """ - shipping: NotRequired[ - "Literal['']|PaymentIntentService.CaptureParamsAmountDetailsShipping" - ] - """ - Contains information about the shipping portion of the amount. - """ - tax: NotRequired[ - "Literal['']|PaymentIntentService.CaptureParamsAmountDetailsTax" - ] - """ - Contains information about the tax portion of the amount. - """ - - class CaptureParamsAmountDetailsLineItem(TypedDict): - discount_amount: NotRequired[int] - """ - The amount an item was discounted for. Positive integer. - """ - payment_method_options: NotRequired[ - "PaymentIntentService.CaptureParamsAmountDetailsLineItemPaymentMethodOptions" - ] - """ - Payment method-specific information for line items. - """ - product_code: NotRequired[str] - """ - Unique identifier of the product. At most 12 characters long. - """ - product_name: str - """ - Name of the product. At most 100 characters long. - """ - quantity: int - """ - Number of items of the product. Positive integer. - """ - tax: NotRequired[ - "PaymentIntentService.CaptureParamsAmountDetailsLineItemTax" - ] - """ - Contains information about the tax on the item. - """ - unit_cost: int - """ - Cost of the product. Non-negative integer. - """ - unit_of_measure: NotRequired[str] - """ - A unit of measure for the line item, such as gallons, feet, meters, etc. - """ - - class CaptureParamsAmountDetailsLineItemPaymentMethodOptions(TypedDict): - card: NotRequired[ - "PaymentIntentService.CaptureParamsAmountDetailsLineItemPaymentMethodOptionsCard" - ] - """ - This sub-hash contains line item details that are specific to `card` payment method." - """ - card_present: NotRequired[ - "PaymentIntentService.CaptureParamsAmountDetailsLineItemPaymentMethodOptionsCardPresent" - ] - """ - This sub-hash contains line item details that are specific to `card_present` payment method." - """ - klarna: NotRequired[ - "PaymentIntentService.CaptureParamsAmountDetailsLineItemPaymentMethodOptionsKlarna" - ] - """ - This sub-hash contains line item details that are specific to `klarna` payment method." - """ - paypal: NotRequired[ - "PaymentIntentService.CaptureParamsAmountDetailsLineItemPaymentMethodOptionsPaypal" - ] - """ - This sub-hash contains line item details that are specific to `paypal` payment method." - """ - - class CaptureParamsAmountDetailsLineItemPaymentMethodOptionsCard( - TypedDict - ): - commodity_code: NotRequired[str] - """ - Identifier that categorizes the items being purchased using a standardized commodity scheme such as (but not limited to) UNSPSC, NAICS, NAPCS, etc. - """ - - class CaptureParamsAmountDetailsLineItemPaymentMethodOptionsCardPresent( - TypedDict, - ): - commodity_code: NotRequired[str] - """ - Identifier that categorizes the items being purchased using a standardized commodity scheme such as (but not limited to) UNSPSC, NAICS, NAPCS, etc. - """ - - class CaptureParamsAmountDetailsLineItemPaymentMethodOptionsKlarna( - TypedDict, - ): - image_url: NotRequired[str] - """ - URL to an image for the product. Max length, 4096 characters. - """ - product_url: NotRequired[str] - """ - URL to the product page. Max length, 4096 characters. - """ - subscription_reference: NotRequired[str] - """ - Reference for the subscription this line item is for. - """ - - class CaptureParamsAmountDetailsLineItemPaymentMethodOptionsPaypal( - TypedDict, - ): - category: NotRequired[ - Literal["digital_goods", "donation", "physical_goods"] - ] - """ - Type of the line item. - """ - description: NotRequired[str] - """ - Description of the line item. - """ - sold_by: NotRequired[str] - """ - The Stripe account ID of the connected account that sells the item. - """ - - class CaptureParamsAmountDetailsLineItemTax(TypedDict): - total_tax_amount: int - """ - The total tax on an item. Non-negative integer. - """ - - class CaptureParamsAmountDetailsShipping(TypedDict): - amount: NotRequired["Literal['']|int"] - """ - Portion of the amount that is for shipping. - """ - from_postal_code: NotRequired["Literal['']|str"] - """ - The postal code that represents the shipping source. - """ - to_postal_code: NotRequired["Literal['']|str"] - """ - The postal code that represents the shipping destination. - """ - - class CaptureParamsAmountDetailsTax(TypedDict): - total_tax_amount: int - """ - Total portion of the amount that is for tax. - """ - - class CaptureParamsHooks(TypedDict): - inputs: NotRequired["PaymentIntentService.CaptureParamsHooksInputs"] - """ - Arguments passed in automations - """ - - class CaptureParamsHooksInputs(TypedDict): - tax: NotRequired["PaymentIntentService.CaptureParamsHooksInputsTax"] - """ - Tax arguments for automations - """ - - class CaptureParamsHooksInputsTax(TypedDict): - calculation: Union[Literal[""], str] - """ - The [TaxCalculation](https://stripe.com/docs/api/tax/calculations) id - """ - - class CaptureParamsPaymentDetails(TypedDict): - car_rental: NotRequired[ - "PaymentIntentService.CaptureParamsPaymentDetailsCarRental" - ] - """ - Car rental details for this PaymentIntent. - """ - customer_reference: NotRequired["Literal['']|str"] - """ - Some customers might be required by their company or organization to provide this information. If so, provide this value. Otherwise you can ignore this field. - """ - event_details: NotRequired[ - "PaymentIntentService.CaptureParamsPaymentDetailsEventDetails" - ] - """ - Event details for this PaymentIntent - """ - flight: NotRequired[ - "PaymentIntentService.CaptureParamsPaymentDetailsFlight" - ] - """ - Flight reservation details for this PaymentIntent - """ - lodging: NotRequired[ - "PaymentIntentService.CaptureParamsPaymentDetailsLodging" - ] - """ - Lodging reservation details for this PaymentIntent - """ - order_reference: NotRequired["Literal['']|str"] - """ - A unique value assigned by the business to identify the transaction. - """ - subscription: NotRequired[ - "PaymentIntentService.CaptureParamsPaymentDetailsSubscription" - ] - """ - Subscription details for this PaymentIntent - """ - - class CaptureParamsPaymentDetailsCarRental(TypedDict): - affiliate: NotRequired[ - "PaymentIntentService.CaptureParamsPaymentDetailsCarRentalAffiliate" - ] - """ - Affiliate details for this purchase. - """ - booking_number: str - """ - The booking number associated with the car rental. - """ - car_class_code: NotRequired[str] - """ - Class code of the car. - """ - car_make: NotRequired[str] - """ - Make of the car. - """ - car_model: NotRequired[str] - """ - Model of the car. - """ - company: NotRequired[str] - """ - The name of the rental car company. - """ - customer_service_phone_number: NotRequired[str] - """ - The customer service phone number of the car rental company. - """ - days_rented: int - """ - Number of days the car is being rented. - """ - delivery: NotRequired[ - "PaymentIntentService.CaptureParamsPaymentDetailsCarRentalDelivery" - ] - """ - Delivery details for this purchase. - """ - distance: NotRequired[ - "PaymentIntentService.CaptureParamsPaymentDetailsCarRentalDistance" - ] - """ - The details of the distance traveled during the rental period. - """ - drivers: NotRequired[ - List[ - "PaymentIntentService.CaptureParamsPaymentDetailsCarRentalDriver" - ] - ] - """ - The details of the passengers in the travel reservation - """ - extra_charges: NotRequired[ - List[ - Literal[ - "extra_mileage", - "gas", - "late_return", - "one_way_service", - "parking_violation", - ] - ] - ] - """ - List of additional charges being billed. - """ - no_show: NotRequired[bool] - """ - Indicates if the customer did not keep nor cancel their booking. - """ - pickup_address: NotRequired[ - "PaymentIntentService.CaptureParamsPaymentDetailsCarRentalPickupAddress" - ] - """ - Car pick-up address. - """ - pickup_at: int - """ - Car pick-up time. Measured in seconds since the Unix epoch. - """ - pickup_location_name: NotRequired[str] - """ - Name of the pickup location. - """ - rate_amount: NotRequired[int] - """ - Rental rate. - """ - rate_interval: NotRequired[Literal["day", "month", "week"]] - """ - The frequency at which the rate amount is applied. One of `day`, `week` or `month` - """ - renter_name: NotRequired[str] - """ - The name of the person or entity renting the car. - """ - return_address: NotRequired[ - "PaymentIntentService.CaptureParamsPaymentDetailsCarRentalReturnAddress" - ] - """ - Car return address. - """ - return_at: int - """ - Car return time. Measured in seconds since the Unix epoch. - """ - return_location_name: NotRequired[str] - """ - Name of the return location. - """ - tax_exempt: NotRequired[bool] - """ - Indicates whether the goods or services are tax-exempt or tax is not collected. - """ - vehicle_identification_number: NotRequired[str] - """ - The vehicle identification number. - """ - - class CaptureParamsPaymentDetailsCarRentalAffiliate(TypedDict): - name: str - """ - The name of the affiliate that originated the purchase. - """ - - class CaptureParamsPaymentDetailsCarRentalDelivery(TypedDict): - mode: NotRequired[Literal["email", "phone", "pickup", "post"]] - """ - The delivery method for the payment - """ - recipient: NotRequired[ - "PaymentIntentService.CaptureParamsPaymentDetailsCarRentalDeliveryRecipient" - ] - """ - Details of the recipient. - """ - - class CaptureParamsPaymentDetailsCarRentalDeliveryRecipient(TypedDict): - email: NotRequired[str] - """ - The email of the recipient the ticket is delivered to. - """ - name: NotRequired[str] - """ - The name of the recipient the ticket is delivered to. - """ - phone: NotRequired[str] - """ - The phone number of the recipient the ticket is delivered to. - """ - - class CaptureParamsPaymentDetailsCarRentalDistance(TypedDict): - amount: NotRequired[int] - """ - Distance traveled. - """ - unit: NotRequired[Literal["kilometers", "miles"]] - """ - Unit of measurement for the distance traveled. One of `miles` or `kilometers`. - """ - - class CaptureParamsPaymentDetailsCarRentalDriver(TypedDict): - driver_identification_number: NotRequired[str] - """ - Driver's identification number. - """ - driver_tax_number: NotRequired[str] - """ - Driver's tax number. - """ - name: str - """ - Full name of the person or entity on the car reservation. - """ - - class CaptureParamsPaymentDetailsCarRentalPickupAddress(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. - """ - - class CaptureParamsPaymentDetailsCarRentalReturnAddress(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. - """ - - class CaptureParamsPaymentDetailsEventDetails(TypedDict): - access_controlled_venue: NotRequired[bool] - """ - Indicates if the tickets are digitally checked when entering the venue. - """ - address: NotRequired[ - "PaymentIntentService.CaptureParamsPaymentDetailsEventDetailsAddress" - ] - """ - The event location's address. - """ - affiliate: NotRequired[ - "PaymentIntentService.CaptureParamsPaymentDetailsEventDetailsAffiliate" - ] - """ - Affiliate details for this purchase. - """ - company: NotRequired[str] - """ - The name of the company - """ - delivery: NotRequired[ - "PaymentIntentService.CaptureParamsPaymentDetailsEventDetailsDelivery" - ] - """ - Delivery details for this purchase. - """ - ends_at: NotRequired[int] - """ - Event end time. Measured in seconds since the Unix epoch. - """ - genre: NotRequired[str] - """ - Type of the event entertainment (concert, sports event etc) - """ - name: str - """ - The name of the event. - """ - starts_at: NotRequired[int] - """ - Event start time. Measured in seconds since the Unix epoch. - """ - - class CaptureParamsPaymentDetailsEventDetailsAddress(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. - """ - - class CaptureParamsPaymentDetailsEventDetailsAffiliate(TypedDict): - name: str - """ - The name of the affiliate that originated the purchase. - """ - - class CaptureParamsPaymentDetailsEventDetailsDelivery(TypedDict): - mode: NotRequired[Literal["email", "phone", "pickup", "post"]] - """ - The delivery method for the payment - """ - recipient: NotRequired[ - "PaymentIntentService.CaptureParamsPaymentDetailsEventDetailsDeliveryRecipient" - ] - """ - Details of the recipient. - """ - - class CaptureParamsPaymentDetailsEventDetailsDeliveryRecipient(TypedDict): - email: NotRequired[str] - """ - The email of the recipient the ticket is delivered to. - """ - name: NotRequired[str] - """ - The name of the recipient the ticket is delivered to. - """ - phone: NotRequired[str] - """ - The phone number of the recipient the ticket is delivered to. - """ - - class CaptureParamsPaymentDetailsFlight(TypedDict): - affiliate: NotRequired[ - "PaymentIntentService.CaptureParamsPaymentDetailsFlightAffiliate" - ] - """ - Affiliate details for this purchase. - """ - agency_number: NotRequired[str] - """ - The agency number (i.e. International Air Transport Association (IATA) agency number) of the travel agency that made the booking. - """ - carrier: NotRequired[str] - """ - The International Air Transport Association (IATA) carrier code of the carrier that issued the ticket. - """ - delivery: NotRequired[ - "PaymentIntentService.CaptureParamsPaymentDetailsFlightDelivery" - ] - """ - Delivery details for this purchase. - """ - passenger_name: NotRequired[str] - """ - The name of the person or entity on the reservation. - """ - passengers: NotRequired[ - List[ - "PaymentIntentService.CaptureParamsPaymentDetailsFlightPassenger" - ] - ] - """ - The details of the passengers in the travel reservation. - """ - segments: List[ - "PaymentIntentService.CaptureParamsPaymentDetailsFlightSegment" - ] - """ - The individual flight segments associated with the trip. - """ - ticket_number: NotRequired[str] - """ - The ticket number associated with the travel reservation. - """ - - class CaptureParamsPaymentDetailsFlightAffiliate(TypedDict): - name: str - """ - The name of the affiliate that originated the purchase. - """ - - class CaptureParamsPaymentDetailsFlightDelivery(TypedDict): - mode: NotRequired[Literal["email", "phone", "pickup", "post"]] - """ - The delivery method for the payment - """ - recipient: NotRequired[ - "PaymentIntentService.CaptureParamsPaymentDetailsFlightDeliveryRecipient" - ] - """ - Details of the recipient. - """ - - class CaptureParamsPaymentDetailsFlightDeliveryRecipient(TypedDict): - email: NotRequired[str] - """ - The email of the recipient the ticket is delivered to. - """ - name: NotRequired[str] - """ - The name of the recipient the ticket is delivered to. - """ - phone: NotRequired[str] - """ - The phone number of the recipient the ticket is delivered to. - """ - - class CaptureParamsPaymentDetailsFlightPassenger(TypedDict): - name: str - """ - Full name of the person or entity on the flight reservation. - """ - - class CaptureParamsPaymentDetailsFlightSegment(TypedDict): - amount: NotRequired[int] - """ - The flight segment amount. - """ - arrival_airport: NotRequired[str] - """ - The International Air Transport Association (IATA) airport code for the arrival airport. - """ - arrives_at: NotRequired[int] - """ - The arrival time for the flight segment. Measured in seconds since the Unix epoch. - """ - carrier: NotRequired[str] - """ - The International Air Transport Association (IATA) carrier code of the carrier operating the flight segment. - """ - departs_at: int - """ - The departure time for the flight segment. Measured in seconds since the Unix epoch. - """ - departure_airport: NotRequired[str] - """ - The International Air Transport Association (IATA) airport code for the departure airport. - """ - flight_number: NotRequired[str] - """ - The flight number associated with the segment - """ - service_class: NotRequired[ - Literal["business", "economy", "first", "premium_economy"] - ] - """ - The fare class for the segment. - """ - - class CaptureParamsPaymentDetailsLodging(TypedDict): - address: NotRequired[ - "PaymentIntentService.CaptureParamsPaymentDetailsLodgingAddress" - ] - """ - The lodging location's address. - """ - adults: NotRequired[int] - """ - The number of adults on the booking - """ - affiliate: NotRequired[ - "PaymentIntentService.CaptureParamsPaymentDetailsLodgingAffiliate" - ] - """ - Affiliate details for this purchase. - """ - booking_number: NotRequired[str] - """ - The booking number associated with the lodging reservation. - """ - category: NotRequired[Literal["hotel", "vacation_rental"]] - """ - The lodging category - """ - checkin_at: int - """ - Lodging check-in time. Measured in seconds since the Unix epoch. - """ - checkout_at: int - """ - Lodging check-out time. Measured in seconds since the Unix epoch. - """ - customer_service_phone_number: NotRequired[str] - """ - The customer service phone number of the lodging company. - """ - daily_room_rate_amount: NotRequired[int] - """ - The daily lodging room rate. - """ - delivery: NotRequired[ - "PaymentIntentService.CaptureParamsPaymentDetailsLodgingDelivery" - ] - """ - Delivery details for this purchase. - """ - extra_charges: NotRequired[ - List[ - Literal[ - "gift_shop", - "laundry", - "mini_bar", - "other", - "restaurant", - "telephone", - ] - ] - ] - """ - List of additional charges being billed. - """ - fire_safety_act_compliance: NotRequired[bool] - """ - Indicates whether the lodging location is compliant with the Fire Safety Act. - """ - name: NotRequired[str] - """ - The name of the lodging location. - """ - no_show: NotRequired[bool] - """ - Indicates if the customer did not keep their booking while failing to cancel the reservation. - """ - number_of_rooms: NotRequired[int] - """ - The number of rooms on the booking - """ - passengers: NotRequired[ - List[ - "PaymentIntentService.CaptureParamsPaymentDetailsLodgingPassenger" - ] - ] - """ - The details of the passengers in the travel reservation - """ - property_phone_number: NotRequired[str] - """ - The phone number of the lodging location. - """ - room_class: NotRequired[str] - """ - The room class for this purchase. - """ - room_nights: NotRequired[int] - """ - The number of room nights - """ - total_room_tax_amount: NotRequired[int] - """ - The total tax amount associating with the room reservation. - """ - total_tax_amount: NotRequired[int] - """ - The total tax amount - """ - - class CaptureParamsPaymentDetailsLodgingAddress(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. - """ - - class CaptureParamsPaymentDetailsLodgingAffiliate(TypedDict): - name: str - """ - The name of the affiliate that originated the purchase. - """ - - class CaptureParamsPaymentDetailsLodgingDelivery(TypedDict): - mode: NotRequired[Literal["email", "phone", "pickup", "post"]] - """ - The delivery method for the payment - """ - recipient: NotRequired[ - "PaymentIntentService.CaptureParamsPaymentDetailsLodgingDeliveryRecipient" - ] - """ - Details of the recipient. - """ - - class CaptureParamsPaymentDetailsLodgingDeliveryRecipient(TypedDict): - email: NotRequired[str] - """ - The email of the recipient the ticket is delivered to. - """ - name: NotRequired[str] - """ - The name of the recipient the ticket is delivered to. - """ - phone: NotRequired[str] - """ - The phone number of the recipient the ticket is delivered to. - """ - - class CaptureParamsPaymentDetailsLodgingPassenger(TypedDict): - name: str - """ - Full name of the person or entity on the lodging reservation. - """ - - class CaptureParamsPaymentDetailsSubscription(TypedDict): - affiliate: NotRequired[ - "PaymentIntentService.CaptureParamsPaymentDetailsSubscriptionAffiliate" - ] - """ - Affiliate details for this purchase. - """ - auto_renewal: NotRequired[bool] - """ - Info whether the subscription will be auto renewed upon expiry. - """ - billing_interval: NotRequired[ - "PaymentIntentService.CaptureParamsPaymentDetailsSubscriptionBillingInterval" - ] - """ - Subscription billing details for this purchase. - """ - ends_at: NotRequired[int] - """ - Subscription end time. Measured in seconds since the Unix epoch. - """ - name: str - """ - Name of the product on subscription. e.g. Apple Music Subscription - """ - starts_at: NotRequired[int] - """ - Subscription start time. Measured in seconds since the Unix epoch. - """ - - class CaptureParamsPaymentDetailsSubscriptionAffiliate(TypedDict): - name: str - """ - The name of the affiliate that originated the purchase. - """ - - class CaptureParamsPaymentDetailsSubscriptionBillingInterval(TypedDict): - count: int - """ - The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. - """ - interval: Literal["day", "month", "week", "year"] - """ - Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. - """ - - class CaptureParamsTransferData(TypedDict): - amount: NotRequired[int] - """ - The amount that will be transferred automatically when a charge succeeds. - """ - - class ConfirmParams(TypedDict): - amount_details: NotRequired[ - "Literal['']|PaymentIntentService.ConfirmParamsAmountDetails" - ] - """ - Provides industry-specific information about the amount. - """ - application_fee_amount: NotRequired["Literal['']|int"] - """ - The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total amount captured. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). - """ - capture_method: NotRequired[ - Literal["automatic", "automatic_async", "manual"] - ] - """ - Controls when the funds will be captured from the customer's account. - """ - confirmation_token: NotRequired[str] - """ - ID of the ConfirmationToken used to confirm this PaymentIntent. - - If the provided ConfirmationToken contains properties that are also being provided in this request, such as `payment_method`, then the values in this request will take precedence. - """ - error_on_requires_action: NotRequired[bool] - """ - Set to `true` to fail the payment attempt if the PaymentIntent transitions into `requires_action`. This parameter is intended for simpler integrations that do not handle customer actions, like [saving cards without authentication](https://stripe.com/docs/payments/save-card-without-authentication). - """ - excluded_payment_method_types: NotRequired[ - "Literal['']|List[Literal['acss_debit', 'affirm', 'afterpay_clearpay', 'alipay', 'alma', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'billie', 'blik', 'boleto', 'card', 'cashapp', 'crypto', 'customer_balance', 'eps', 'fpx', 'giropay', 'gopay', 'grabpay', 'id_bank_transfer', 'ideal', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'mb_way', 'mobilepay', 'multibanco', 'naver_pay', 'nz_bank_account', 'oxxo', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'paypay', 'payto', 'pix', 'promptpay', 'qris', 'rechnung', 'revolut_pay', 'samsung_pay', 'satispay', 'sepa_debit', 'shopeepay', 'sofort', 'stripe_balance', 'swish', 'twint', 'us_bank_account', 'wechat_pay', 'zip']]" - ] - """ - The list of payment method types to exclude from use with this payment. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - fx_quote: NotRequired[str] - """ - The FX rate in the quote is validated and used to convert the presentment amount to the settlement amount. - """ - hooks: NotRequired["PaymentIntentService.ConfirmParamsHooks"] - """ - Automations to be run during the PaymentIntent lifecycle - """ - mandate: NotRequired[str] - """ - ID of the mandate that's used for this payment. - """ - mandate_data: NotRequired[ - "Literal['']|PaymentIntentService.ConfirmParamsMandateData" - ] - off_session: NotRequired["bool|Literal['one_off', 'recurring']"] - """ - Set to `true` to indicate that the customer isn't in your checkout flow during this payment attempt and can't authenticate. Use this parameter in scenarios where you collect card details and [charge them later](https://stripe.com/docs/payments/cards/charging-saved-cards). - """ - payment_details: NotRequired[ - "Literal['']|PaymentIntentService.ConfirmParamsPaymentDetails" - ] - """ - Provides industry-specific information about the charge. - """ - payment_method: NotRequired[str] - """ - ID of the payment method (a PaymentMethod, Card, or [compatible Source](https://stripe.com/docs/payments/payment-methods/transitioning#compatibility) object) to attach to this PaymentIntent. - If the payment method is attached to a Customer, it must match the [customer](https://stripe.com/docs/api#create_payment_intent-customer) that is set on this PaymentIntent. - """ - payment_method_data: NotRequired[ - "PaymentIntentService.ConfirmParamsPaymentMethodData" - ] - """ - If provided, this hash will be used to create a PaymentMethod. The new PaymentMethod will appear - in the [payment_method](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-payment_method) - property on the PaymentIntent. - """ - payment_method_options: NotRequired[ - "PaymentIntentService.ConfirmParamsPaymentMethodOptions" - ] - """ - Payment method-specific configuration for this PaymentIntent. - """ - payment_method_types: NotRequired[List[str]] - """ - The list of payment method types (for example, a card) that this PaymentIntent can use. Use `automatic_payment_methods` to manage payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). A list of valid payment method types can be found [here](https://docs.stripe.com/api/payment_methods/object#payment_method_object-type). - """ - radar_options: NotRequired[ - "PaymentIntentService.ConfirmParamsRadarOptions" - ] - """ - Options to configure Radar. Learn more about [Radar Sessions](https://stripe.com/docs/radar/radar-session). - """ - receipt_email: NotRequired["Literal['']|str"] - """ - Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). - """ - return_url: NotRequired[str] - """ - The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. - If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. - This parameter is only used for cards and other redirect-based payment methods. - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['off_session', 'on_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - shipping: NotRequired[ - "Literal['']|PaymentIntentService.ConfirmParamsShipping" - ] - """ - Shipping information for this PaymentIntent. - """ - use_stripe_sdk: NotRequired[bool] - """ - Set to `true` when confirming server-side and using Stripe.js, iOS, or Android client-side SDKs to handle the next actions. - """ - - class ConfirmParamsAmountDetails(TypedDict): - discount_amount: NotRequired["Literal['']|int"] - """ - The total discount applied on the transaction. - """ - line_items: NotRequired[ - "Literal['']|List[PaymentIntentService.ConfirmParamsAmountDetailsLineItem]" - ] - """ - A list of line items, each containing information about a product in the PaymentIntent. There is a maximum of 100 line items. - """ - shipping: NotRequired[ - "Literal['']|PaymentIntentService.ConfirmParamsAmountDetailsShipping" - ] - """ - Contains information about the shipping portion of the amount. - """ - tax: NotRequired[ - "Literal['']|PaymentIntentService.ConfirmParamsAmountDetailsTax" - ] - """ - Contains information about the tax portion of the amount. - """ - - class ConfirmParamsAmountDetailsLineItem(TypedDict): - discount_amount: NotRequired[int] - """ - The amount an item was discounted for. Positive integer. - """ - payment_method_options: NotRequired[ - "PaymentIntentService.ConfirmParamsAmountDetailsLineItemPaymentMethodOptions" - ] - """ - Payment method-specific information for line items. - """ - product_code: NotRequired[str] - """ - Unique identifier of the product. At most 12 characters long. - """ - product_name: str - """ - Name of the product. At most 100 characters long. - """ - quantity: int - """ - Number of items of the product. Positive integer. - """ - tax: NotRequired[ - "PaymentIntentService.ConfirmParamsAmountDetailsLineItemTax" - ] - """ - Contains information about the tax on the item. - """ - unit_cost: int - """ - Cost of the product. Non-negative integer. - """ - unit_of_measure: NotRequired[str] - """ - A unit of measure for the line item, such as gallons, feet, meters, etc. - """ - - class ConfirmParamsAmountDetailsLineItemPaymentMethodOptions(TypedDict): - card: NotRequired[ - "PaymentIntentService.ConfirmParamsAmountDetailsLineItemPaymentMethodOptionsCard" - ] - """ - This sub-hash contains line item details that are specific to `card` payment method." - """ - card_present: NotRequired[ - "PaymentIntentService.ConfirmParamsAmountDetailsLineItemPaymentMethodOptionsCardPresent" - ] - """ - This sub-hash contains line item details that are specific to `card_present` payment method." - """ - klarna: NotRequired[ - "PaymentIntentService.ConfirmParamsAmountDetailsLineItemPaymentMethodOptionsKlarna" - ] - """ - This sub-hash contains line item details that are specific to `klarna` payment method." - """ - paypal: NotRequired[ - "PaymentIntentService.ConfirmParamsAmountDetailsLineItemPaymentMethodOptionsPaypal" - ] - """ - This sub-hash contains line item details that are specific to `paypal` payment method." - """ - - class ConfirmParamsAmountDetailsLineItemPaymentMethodOptionsCard( - TypedDict - ): - commodity_code: NotRequired[str] - """ - Identifier that categorizes the items being purchased using a standardized commodity scheme such as (but not limited to) UNSPSC, NAICS, NAPCS, etc. - """ - - class ConfirmParamsAmountDetailsLineItemPaymentMethodOptionsCardPresent( - TypedDict, - ): - commodity_code: NotRequired[str] - """ - Identifier that categorizes the items being purchased using a standardized commodity scheme such as (but not limited to) UNSPSC, NAICS, NAPCS, etc. - """ - - class ConfirmParamsAmountDetailsLineItemPaymentMethodOptionsKlarna( - TypedDict, - ): - image_url: NotRequired[str] - """ - URL to an image for the product. Max length, 4096 characters. - """ - product_url: NotRequired[str] - """ - URL to the product page. Max length, 4096 characters. - """ - subscription_reference: NotRequired[str] - """ - Reference for the subscription this line item is for. - """ - - class ConfirmParamsAmountDetailsLineItemPaymentMethodOptionsPaypal( - TypedDict, - ): - category: NotRequired[ - Literal["digital_goods", "donation", "physical_goods"] - ] - """ - Type of the line item. - """ - description: NotRequired[str] - """ - Description of the line item. - """ - sold_by: NotRequired[str] - """ - The Stripe account ID of the connected account that sells the item. - """ - - class ConfirmParamsAmountDetailsLineItemTax(TypedDict): - total_tax_amount: int - """ - The total tax on an item. Non-negative integer. - """ - - class ConfirmParamsAmountDetailsShipping(TypedDict): - amount: NotRequired["Literal['']|int"] - """ - Portion of the amount that is for shipping. - """ - from_postal_code: NotRequired["Literal['']|str"] - """ - The postal code that represents the shipping source. - """ - to_postal_code: NotRequired["Literal['']|str"] - """ - The postal code that represents the shipping destination. - """ - - class ConfirmParamsAmountDetailsTax(TypedDict): - total_tax_amount: int - """ - Total portion of the amount that is for tax. - """ - - class ConfirmParamsHooks(TypedDict): - inputs: NotRequired["PaymentIntentService.ConfirmParamsHooksInputs"] - """ - Arguments passed in automations - """ - - class ConfirmParamsHooksInputs(TypedDict): - tax: NotRequired["PaymentIntentService.ConfirmParamsHooksInputsTax"] - """ - Tax arguments for automations - """ - - class ConfirmParamsHooksInputsTax(TypedDict): - calculation: Union[Literal[""], str] - """ - The [TaxCalculation](https://stripe.com/docs/api/tax/calculations) id - """ - - class ConfirmParamsMandateData(TypedDict): - customer_acceptance: NotRequired[ - "PaymentIntentService.ConfirmParamsMandateDataCustomerAcceptance" - ] - """ - This hash contains details about the customer acceptance of the Mandate. - """ - - class ConfirmParamsMandateDataCustomerAcceptance(TypedDict): - accepted_at: NotRequired[int] - """ - The time at which the customer accepted the Mandate. - """ - offline: NotRequired[ - "PaymentIntentService.ConfirmParamsMandateDataCustomerAcceptanceOffline" - ] - """ - If this is a Mandate accepted offline, this hash contains details about the offline acceptance. - """ - online: NotRequired[ - "PaymentIntentService.ConfirmParamsMandateDataCustomerAcceptanceOnline" - ] - """ - If this is a Mandate accepted online, this hash contains details about the online acceptance. - """ - type: Literal["offline", "online"] - """ - The type of customer acceptance information included with the Mandate. One of `online` or `offline`. - """ - - class ConfirmParamsMandateDataCustomerAcceptanceOffline(TypedDict): - pass - - class ConfirmParamsMandateDataCustomerAcceptanceOnline(TypedDict): - ip_address: NotRequired[str] - """ - The IP address from which the Mandate was accepted by the customer. - """ - user_agent: NotRequired[str] - """ - The user agent of the browser from which the Mandate was accepted by the customer. - """ - - class ConfirmParamsPaymentDetails(TypedDict): - car_rental: NotRequired[ - "PaymentIntentService.ConfirmParamsPaymentDetailsCarRental" - ] - """ - Car rental details for this PaymentIntent. - """ - customer_reference: NotRequired["Literal['']|str"] - """ - Some customers might be required by their company or organization to provide this information. If so, provide this value. Otherwise you can ignore this field. - """ - event_details: NotRequired[ - "PaymentIntentService.ConfirmParamsPaymentDetailsEventDetails" - ] - """ - Event details for this PaymentIntent - """ - flight: NotRequired[ - "PaymentIntentService.ConfirmParamsPaymentDetailsFlight" - ] - """ - Flight reservation details for this PaymentIntent - """ - lodging: NotRequired[ - "PaymentIntentService.ConfirmParamsPaymentDetailsLodging" - ] - """ - Lodging reservation details for this PaymentIntent - """ - order_reference: NotRequired["Literal['']|str"] - """ - A unique value assigned by the business to identify the transaction. - """ - subscription: NotRequired[ - "PaymentIntentService.ConfirmParamsPaymentDetailsSubscription" - ] - """ - Subscription details for this PaymentIntent - """ - - class ConfirmParamsPaymentDetailsCarRental(TypedDict): - affiliate: NotRequired[ - "PaymentIntentService.ConfirmParamsPaymentDetailsCarRentalAffiliate" - ] - """ - Affiliate details for this purchase. - """ - booking_number: str - """ - The booking number associated with the car rental. - """ - car_class_code: NotRequired[str] - """ - Class code of the car. - """ - car_make: NotRequired[str] - """ - Make of the car. - """ - car_model: NotRequired[str] - """ - Model of the car. - """ - company: NotRequired[str] - """ - The name of the rental car company. - """ - customer_service_phone_number: NotRequired[str] - """ - The customer service phone number of the car rental company. - """ - days_rented: int - """ - Number of days the car is being rented. - """ - delivery: NotRequired[ - "PaymentIntentService.ConfirmParamsPaymentDetailsCarRentalDelivery" - ] - """ - Delivery details for this purchase. - """ - distance: NotRequired[ - "PaymentIntentService.ConfirmParamsPaymentDetailsCarRentalDistance" - ] - """ - The details of the distance traveled during the rental period. - """ - drivers: NotRequired[ - List[ - "PaymentIntentService.ConfirmParamsPaymentDetailsCarRentalDriver" - ] - ] - """ - The details of the passengers in the travel reservation - """ - extra_charges: NotRequired[ - List[ - Literal[ - "extra_mileage", - "gas", - "late_return", - "one_way_service", - "parking_violation", - ] - ] - ] - """ - List of additional charges being billed. - """ - no_show: NotRequired[bool] - """ - Indicates if the customer did not keep nor cancel their booking. - """ - pickup_address: NotRequired[ - "PaymentIntentService.ConfirmParamsPaymentDetailsCarRentalPickupAddress" - ] - """ - Car pick-up address. - """ - pickup_at: int - """ - Car pick-up time. Measured in seconds since the Unix epoch. - """ - pickup_location_name: NotRequired[str] - """ - Name of the pickup location. - """ - rate_amount: NotRequired[int] - """ - Rental rate. - """ - rate_interval: NotRequired[Literal["day", "month", "week"]] - """ - The frequency at which the rate amount is applied. One of `day`, `week` or `month` - """ - renter_name: NotRequired[str] - """ - The name of the person or entity renting the car. - """ - return_address: NotRequired[ - "PaymentIntentService.ConfirmParamsPaymentDetailsCarRentalReturnAddress" - ] - """ - Car return address. - """ - return_at: int - """ - Car return time. Measured in seconds since the Unix epoch. - """ - return_location_name: NotRequired[str] - """ - Name of the return location. - """ - tax_exempt: NotRequired[bool] - """ - Indicates whether the goods or services are tax-exempt or tax is not collected. - """ - vehicle_identification_number: NotRequired[str] - """ - The vehicle identification number. - """ - - class ConfirmParamsPaymentDetailsCarRentalAffiliate(TypedDict): - name: str - """ - The name of the affiliate that originated the purchase. - """ - - class ConfirmParamsPaymentDetailsCarRentalDelivery(TypedDict): - mode: NotRequired[Literal["email", "phone", "pickup", "post"]] - """ - The delivery method for the payment - """ - recipient: NotRequired[ - "PaymentIntentService.ConfirmParamsPaymentDetailsCarRentalDeliveryRecipient" - ] - """ - Details of the recipient. - """ - - class ConfirmParamsPaymentDetailsCarRentalDeliveryRecipient(TypedDict): - email: NotRequired[str] - """ - The email of the recipient the ticket is delivered to. - """ - name: NotRequired[str] - """ - The name of the recipient the ticket is delivered to. - """ - phone: NotRequired[str] - """ - The phone number of the recipient the ticket is delivered to. - """ - - class ConfirmParamsPaymentDetailsCarRentalDistance(TypedDict): - amount: NotRequired[int] - """ - Distance traveled. - """ - unit: NotRequired[Literal["kilometers", "miles"]] - """ - Unit of measurement for the distance traveled. One of `miles` or `kilometers`. - """ - - class ConfirmParamsPaymentDetailsCarRentalDriver(TypedDict): - driver_identification_number: NotRequired[str] - """ - Driver's identification number. - """ - driver_tax_number: NotRequired[str] - """ - Driver's tax number. - """ - name: str - """ - Full name of the person or entity on the car reservation. - """ - - class ConfirmParamsPaymentDetailsCarRentalPickupAddress(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. - """ - - class ConfirmParamsPaymentDetailsCarRentalReturnAddress(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. - """ - - class ConfirmParamsPaymentDetailsEventDetails(TypedDict): - access_controlled_venue: NotRequired[bool] - """ - Indicates if the tickets are digitally checked when entering the venue. - """ - address: NotRequired[ - "PaymentIntentService.ConfirmParamsPaymentDetailsEventDetailsAddress" - ] - """ - The event location's address. - """ - affiliate: NotRequired[ - "PaymentIntentService.ConfirmParamsPaymentDetailsEventDetailsAffiliate" - ] - """ - Affiliate details for this purchase. - """ - company: NotRequired[str] - """ - The name of the company - """ - delivery: NotRequired[ - "PaymentIntentService.ConfirmParamsPaymentDetailsEventDetailsDelivery" - ] - """ - Delivery details for this purchase. - """ - ends_at: NotRequired[int] - """ - Event end time. Measured in seconds since the Unix epoch. - """ - genre: NotRequired[str] - """ - Type of the event entertainment (concert, sports event etc) - """ - name: str - """ - The name of the event. - """ - starts_at: NotRequired[int] - """ - Event start time. Measured in seconds since the Unix epoch. - """ - - class ConfirmParamsPaymentDetailsEventDetailsAddress(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. - """ - - class ConfirmParamsPaymentDetailsEventDetailsAffiliate(TypedDict): - name: str - """ - The name of the affiliate that originated the purchase. - """ - - class ConfirmParamsPaymentDetailsEventDetailsDelivery(TypedDict): - mode: NotRequired[Literal["email", "phone", "pickup", "post"]] - """ - The delivery method for the payment - """ - recipient: NotRequired[ - "PaymentIntentService.ConfirmParamsPaymentDetailsEventDetailsDeliveryRecipient" - ] - """ - Details of the recipient. - """ - - class ConfirmParamsPaymentDetailsEventDetailsDeliveryRecipient(TypedDict): - email: NotRequired[str] - """ - The email of the recipient the ticket is delivered to. - """ - name: NotRequired[str] - """ - The name of the recipient the ticket is delivered to. - """ - phone: NotRequired[str] - """ - The phone number of the recipient the ticket is delivered to. - """ - - class ConfirmParamsPaymentDetailsFlight(TypedDict): - affiliate: NotRequired[ - "PaymentIntentService.ConfirmParamsPaymentDetailsFlightAffiliate" - ] - """ - Affiliate details for this purchase. - """ - agency_number: NotRequired[str] - """ - The agency number (i.e. International Air Transport Association (IATA) agency number) of the travel agency that made the booking. - """ - carrier: NotRequired[str] - """ - The International Air Transport Association (IATA) carrier code of the carrier that issued the ticket. - """ - delivery: NotRequired[ - "PaymentIntentService.ConfirmParamsPaymentDetailsFlightDelivery" - ] - """ - Delivery details for this purchase. - """ - passenger_name: NotRequired[str] - """ - The name of the person or entity on the reservation. - """ - passengers: NotRequired[ - List[ - "PaymentIntentService.ConfirmParamsPaymentDetailsFlightPassenger" - ] - ] - """ - The details of the passengers in the travel reservation. - """ - segments: List[ - "PaymentIntentService.ConfirmParamsPaymentDetailsFlightSegment" - ] - """ - The individual flight segments associated with the trip. - """ - ticket_number: NotRequired[str] - """ - The ticket number associated with the travel reservation. - """ - - class ConfirmParamsPaymentDetailsFlightAffiliate(TypedDict): - name: str - """ - The name of the affiliate that originated the purchase. - """ - - class ConfirmParamsPaymentDetailsFlightDelivery(TypedDict): - mode: NotRequired[Literal["email", "phone", "pickup", "post"]] - """ - The delivery method for the payment - """ - recipient: NotRequired[ - "PaymentIntentService.ConfirmParamsPaymentDetailsFlightDeliveryRecipient" - ] - """ - Details of the recipient. - """ - - class ConfirmParamsPaymentDetailsFlightDeliveryRecipient(TypedDict): - email: NotRequired[str] - """ - The email of the recipient the ticket is delivered to. - """ - name: NotRequired[str] - """ - The name of the recipient the ticket is delivered to. - """ - phone: NotRequired[str] - """ - The phone number of the recipient the ticket is delivered to. - """ - - class ConfirmParamsPaymentDetailsFlightPassenger(TypedDict): - name: str - """ - Full name of the person or entity on the flight reservation. - """ - - class ConfirmParamsPaymentDetailsFlightSegment(TypedDict): - amount: NotRequired[int] - """ - The flight segment amount. - """ - arrival_airport: NotRequired[str] - """ - The International Air Transport Association (IATA) airport code for the arrival airport. - """ - arrives_at: NotRequired[int] - """ - The arrival time for the flight segment. Measured in seconds since the Unix epoch. - """ - carrier: NotRequired[str] - """ - The International Air Transport Association (IATA) carrier code of the carrier operating the flight segment. - """ - departs_at: int - """ - The departure time for the flight segment. Measured in seconds since the Unix epoch. - """ - departure_airport: NotRequired[str] - """ - The International Air Transport Association (IATA) airport code for the departure airport. - """ - flight_number: NotRequired[str] - """ - The flight number associated with the segment - """ - service_class: NotRequired[ - Literal["business", "economy", "first", "premium_economy"] - ] - """ - The fare class for the segment. - """ - - class ConfirmParamsPaymentDetailsLodging(TypedDict): - address: NotRequired[ - "PaymentIntentService.ConfirmParamsPaymentDetailsLodgingAddress" - ] - """ - The lodging location's address. - """ - adults: NotRequired[int] - """ - The number of adults on the booking - """ - affiliate: NotRequired[ - "PaymentIntentService.ConfirmParamsPaymentDetailsLodgingAffiliate" - ] - """ - Affiliate details for this purchase. - """ - booking_number: NotRequired[str] - """ - The booking number associated with the lodging reservation. - """ - category: NotRequired[Literal["hotel", "vacation_rental"]] - """ - The lodging category - """ - checkin_at: int - """ - Lodging check-in time. Measured in seconds since the Unix epoch. - """ - checkout_at: int - """ - Lodging check-out time. Measured in seconds since the Unix epoch. - """ - customer_service_phone_number: NotRequired[str] - """ - The customer service phone number of the lodging company. - """ - daily_room_rate_amount: NotRequired[int] - """ - The daily lodging room rate. - """ - delivery: NotRequired[ - "PaymentIntentService.ConfirmParamsPaymentDetailsLodgingDelivery" - ] - """ - Delivery details for this purchase. - """ - extra_charges: NotRequired[ - List[ - Literal[ - "gift_shop", - "laundry", - "mini_bar", - "other", - "restaurant", - "telephone", - ] - ] - ] - """ - List of additional charges being billed. - """ - fire_safety_act_compliance: NotRequired[bool] - """ - Indicates whether the lodging location is compliant with the Fire Safety Act. - """ - name: NotRequired[str] - """ - The name of the lodging location. - """ - no_show: NotRequired[bool] - """ - Indicates if the customer did not keep their booking while failing to cancel the reservation. - """ - number_of_rooms: NotRequired[int] - """ - The number of rooms on the booking - """ - passengers: NotRequired[ - List[ - "PaymentIntentService.ConfirmParamsPaymentDetailsLodgingPassenger" - ] - ] - """ - The details of the passengers in the travel reservation - """ - property_phone_number: NotRequired[str] - """ - The phone number of the lodging location. - """ - room_class: NotRequired[str] - """ - The room class for this purchase. - """ - room_nights: NotRequired[int] - """ - The number of room nights - """ - total_room_tax_amount: NotRequired[int] - """ - The total tax amount associating with the room reservation. - """ - total_tax_amount: NotRequired[int] - """ - The total tax amount - """ - - class ConfirmParamsPaymentDetailsLodgingAddress(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. - """ - - class ConfirmParamsPaymentDetailsLodgingAffiliate(TypedDict): - name: str - """ - The name of the affiliate that originated the purchase. - """ - - class ConfirmParamsPaymentDetailsLodgingDelivery(TypedDict): - mode: NotRequired[Literal["email", "phone", "pickup", "post"]] - """ - The delivery method for the payment - """ - recipient: NotRequired[ - "PaymentIntentService.ConfirmParamsPaymentDetailsLodgingDeliveryRecipient" - ] - """ - Details of the recipient. - """ - - class ConfirmParamsPaymentDetailsLodgingDeliveryRecipient(TypedDict): - email: NotRequired[str] - """ - The email of the recipient the ticket is delivered to. - """ - name: NotRequired[str] - """ - The name of the recipient the ticket is delivered to. - """ - phone: NotRequired[str] - """ - The phone number of the recipient the ticket is delivered to. - """ - - class ConfirmParamsPaymentDetailsLodgingPassenger(TypedDict): - name: str - """ - Full name of the person or entity on the lodging reservation. - """ - - class ConfirmParamsPaymentDetailsSubscription(TypedDict): - affiliate: NotRequired[ - "PaymentIntentService.ConfirmParamsPaymentDetailsSubscriptionAffiliate" - ] - """ - Affiliate details for this purchase. - """ - auto_renewal: NotRequired[bool] - """ - Info whether the subscription will be auto renewed upon expiry. - """ - billing_interval: NotRequired[ - "PaymentIntentService.ConfirmParamsPaymentDetailsSubscriptionBillingInterval" - ] - """ - Subscription billing details for this purchase. - """ - ends_at: NotRequired[int] - """ - Subscription end time. Measured in seconds since the Unix epoch. - """ - name: str - """ - Name of the product on subscription. e.g. Apple Music Subscription - """ - starts_at: NotRequired[int] - """ - Subscription start time. Measured in seconds since the Unix epoch. - """ - - class ConfirmParamsPaymentDetailsSubscriptionAffiliate(TypedDict): - name: str - """ - The name of the affiliate that originated the purchase. - """ - - class ConfirmParamsPaymentDetailsSubscriptionBillingInterval(TypedDict): - count: int - """ - The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. - """ - interval: Literal["day", "month", "week", "year"] - """ - Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. - """ - - class ConfirmParamsPaymentMethodData(TypedDict): - acss_debit: NotRequired[ - "PaymentIntentService.ConfirmParamsPaymentMethodDataAcssDebit" - ] - """ - If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method. - """ - affirm: NotRequired[ - "PaymentIntentService.ConfirmParamsPaymentMethodDataAffirm" - ] - """ - If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method. - """ - afterpay_clearpay: NotRequired[ - "PaymentIntentService.ConfirmParamsPaymentMethodDataAfterpayClearpay" - ] - """ - If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method. - """ - alipay: NotRequired[ - "PaymentIntentService.ConfirmParamsPaymentMethodDataAlipay" - ] - """ - If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. - """ - allow_redisplay: NotRequired[ - Literal["always", "limited", "unspecified"] - ] - """ - This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`. - """ - alma: NotRequired[ - "PaymentIntentService.ConfirmParamsPaymentMethodDataAlma" - ] - """ - If this is a Alma PaymentMethod, this hash contains details about the Alma payment method. - """ - amazon_pay: NotRequired[ - "PaymentIntentService.ConfirmParamsPaymentMethodDataAmazonPay" - ] - """ - If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method. - """ - au_becs_debit: NotRequired[ - "PaymentIntentService.ConfirmParamsPaymentMethodDataAuBecsDebit" - ] - """ - If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. - """ - bacs_debit: NotRequired[ - "PaymentIntentService.ConfirmParamsPaymentMethodDataBacsDebit" - ] - """ - If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account. - """ - bancontact: NotRequired[ - "PaymentIntentService.ConfirmParamsPaymentMethodDataBancontact" - ] - """ - If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method. - """ - billie: NotRequired[ - "PaymentIntentService.ConfirmParamsPaymentMethodDataBillie" - ] - """ - If this is a `billie` PaymentMethod, this hash contains details about the Billie payment method. - """ - billing_details: NotRequired[ - "PaymentIntentService.ConfirmParamsPaymentMethodDataBillingDetails" - ] - """ - Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. - """ - blik: NotRequired[ - "PaymentIntentService.ConfirmParamsPaymentMethodDataBlik" - ] - """ - If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method. - """ - boleto: NotRequired[ - "PaymentIntentService.ConfirmParamsPaymentMethodDataBoleto" - ] - """ - If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method. - """ - cashapp: NotRequired[ - "PaymentIntentService.ConfirmParamsPaymentMethodDataCashapp" - ] - """ - If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. - """ - crypto: NotRequired[ - "PaymentIntentService.ConfirmParamsPaymentMethodDataCrypto" - ] - """ - If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment method. - """ - customer_balance: NotRequired[ - "PaymentIntentService.ConfirmParamsPaymentMethodDataCustomerBalance" - ] - """ - If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. - """ - eps: NotRequired[ - "PaymentIntentService.ConfirmParamsPaymentMethodDataEps" - ] - """ - If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. - """ - fpx: NotRequired[ - "PaymentIntentService.ConfirmParamsPaymentMethodDataFpx" - ] - """ - If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method. - """ - giropay: NotRequired[ - "PaymentIntentService.ConfirmParamsPaymentMethodDataGiropay" - ] - """ - If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method. - """ - gopay: NotRequired[ - "PaymentIntentService.ConfirmParamsPaymentMethodDataGopay" - ] - """ - If this is a Gopay PaymentMethod, this hash contains details about the Gopay payment method. - """ - grabpay: NotRequired[ - "PaymentIntentService.ConfirmParamsPaymentMethodDataGrabpay" - ] - """ - If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method. - """ - id_bank_transfer: NotRequired[ - "PaymentIntentService.ConfirmParamsPaymentMethodDataIdBankTransfer" - ] - """ - If this is an `IdBankTransfer` PaymentMethod, this hash contains details about the IdBankTransfer payment method. - """ - ideal: NotRequired[ - "PaymentIntentService.ConfirmParamsPaymentMethodDataIdeal" - ] - """ - If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. - """ - interac_present: NotRequired[ - "PaymentIntentService.ConfirmParamsPaymentMethodDataInteracPresent" - ] - """ - If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. - """ - kakao_pay: NotRequired[ - "PaymentIntentService.ConfirmParamsPaymentMethodDataKakaoPay" - ] - """ - If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method. - """ - klarna: NotRequired[ - "PaymentIntentService.ConfirmParamsPaymentMethodDataKlarna" - ] - """ - If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method. - """ - konbini: NotRequired[ - "PaymentIntentService.ConfirmParamsPaymentMethodDataKonbini" - ] - """ - If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. - """ - kr_card: NotRequired[ - "PaymentIntentService.ConfirmParamsPaymentMethodDataKrCard" - ] - """ - If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method. - """ - link: NotRequired[ - "PaymentIntentService.ConfirmParamsPaymentMethodDataLink" - ] - """ - If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. - """ - mb_way: NotRequired[ - "PaymentIntentService.ConfirmParamsPaymentMethodDataMbWay" - ] - """ - If this is a MB WAY PaymentMethod, this hash contains details about the MB WAY payment method. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - mobilepay: NotRequired[ - "PaymentIntentService.ConfirmParamsPaymentMethodDataMobilepay" - ] - """ - If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method. - """ - multibanco: NotRequired[ - "PaymentIntentService.ConfirmParamsPaymentMethodDataMultibanco" - ] - """ - If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method. - """ - naver_pay: NotRequired[ - "PaymentIntentService.ConfirmParamsPaymentMethodDataNaverPay" - ] - """ - If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method. - """ - nz_bank_account: NotRequired[ - "PaymentIntentService.ConfirmParamsPaymentMethodDataNzBankAccount" - ] - """ - If this is an nz_bank_account PaymentMethod, this hash contains details about the nz_bank_account payment method. - """ - oxxo: NotRequired[ - "PaymentIntentService.ConfirmParamsPaymentMethodDataOxxo" - ] - """ - If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. - """ - p24: NotRequired[ - "PaymentIntentService.ConfirmParamsPaymentMethodDataP24" - ] - """ - If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. - """ - pay_by_bank: NotRequired[ - "PaymentIntentService.ConfirmParamsPaymentMethodDataPayByBank" - ] - """ - If this is a `pay_by_bank` PaymentMethod, this hash contains details about the PayByBank payment method. - """ - payco: NotRequired[ - "PaymentIntentService.ConfirmParamsPaymentMethodDataPayco" - ] - """ - If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method. - """ - paynow: NotRequired[ - "PaymentIntentService.ConfirmParamsPaymentMethodDataPaynow" - ] - """ - If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method. - """ - paypal: NotRequired[ - "PaymentIntentService.ConfirmParamsPaymentMethodDataPaypal" - ] - """ - If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method. - """ - paypay: NotRequired[ - "PaymentIntentService.ConfirmParamsPaymentMethodDataPaypay" - ] - """ - If this is a `paypay` PaymentMethod, this hash contains details about the PayPay payment method. - """ - payto: NotRequired[ - "PaymentIntentService.ConfirmParamsPaymentMethodDataPayto" - ] - """ - If this is a `payto` PaymentMethod, this hash contains details about the PayTo payment method. - """ - pix: NotRequired[ - "PaymentIntentService.ConfirmParamsPaymentMethodDataPix" - ] - """ - If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method. - """ - promptpay: NotRequired[ - "PaymentIntentService.ConfirmParamsPaymentMethodDataPromptpay" - ] - """ - If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method. - """ - qris: NotRequired[ - "PaymentIntentService.ConfirmParamsPaymentMethodDataQris" - ] - """ - If this is a `qris` PaymentMethod, this hash contains details about the QRIS payment method. - """ - radar_options: NotRequired[ - "PaymentIntentService.ConfirmParamsPaymentMethodDataRadarOptions" - ] - """ - Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. - """ - rechnung: NotRequired[ - "PaymentIntentService.ConfirmParamsPaymentMethodDataRechnung" - ] - """ - If this is a `rechnung` PaymentMethod, this hash contains details about the Rechnung payment method. - """ - revolut_pay: NotRequired[ - "PaymentIntentService.ConfirmParamsPaymentMethodDataRevolutPay" - ] - """ - If this is a `revolut_pay` PaymentMethod, this hash contains details about the Revolut Pay payment method. - """ - samsung_pay: NotRequired[ - "PaymentIntentService.ConfirmParamsPaymentMethodDataSamsungPay" - ] - """ - If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method. - """ - satispay: NotRequired[ - "PaymentIntentService.ConfirmParamsPaymentMethodDataSatispay" - ] - """ - If this is a `satispay` PaymentMethod, this hash contains details about the Satispay payment method. - """ - sepa_debit: NotRequired[ - "PaymentIntentService.ConfirmParamsPaymentMethodDataSepaDebit" - ] - """ - If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. - """ - shopeepay: NotRequired[ - "PaymentIntentService.ConfirmParamsPaymentMethodDataShopeepay" - ] - """ - If this is a Shopeepay PaymentMethod, this hash contains details about the Shopeepay payment method. - """ - sofort: NotRequired[ - "PaymentIntentService.ConfirmParamsPaymentMethodDataSofort" - ] - """ - If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. - """ - stripe_balance: NotRequired[ - "PaymentIntentService.ConfirmParamsPaymentMethodDataStripeBalance" - ] - """ - This hash contains details about the Stripe balance payment method. - """ - swish: NotRequired[ - "PaymentIntentService.ConfirmParamsPaymentMethodDataSwish" - ] - """ - If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method. - """ - twint: NotRequired[ - "PaymentIntentService.ConfirmParamsPaymentMethodDataTwint" - ] - """ - If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method. - """ - type: Literal[ - "acss_debit", - "affirm", - "afterpay_clearpay", - "alipay", - "alma", - "amazon_pay", - "au_becs_debit", - "bacs_debit", - "bancontact", - "billie", - "blik", - "boleto", - "cashapp", - "crypto", - "customer_balance", - "eps", - "fpx", - "giropay", - "gopay", - "grabpay", - "id_bank_transfer", - "ideal", - "kakao_pay", - "klarna", - "konbini", - "kr_card", - "link", - "mb_way", - "mobilepay", - "multibanco", - "naver_pay", - "nz_bank_account", - "oxxo", - "p24", - "pay_by_bank", - "payco", - "paynow", - "paypal", - "paypay", - "payto", - "pix", - "promptpay", - "qris", - "rechnung", - "revolut_pay", - "samsung_pay", - "satispay", - "sepa_debit", - "shopeepay", - "sofort", - "stripe_balance", - "swish", - "twint", - "us_bank_account", - "wechat_pay", - "zip", - ] - """ - The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. - """ - us_bank_account: NotRequired[ - "PaymentIntentService.ConfirmParamsPaymentMethodDataUsBankAccount" - ] - """ - If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. - """ - wechat_pay: NotRequired[ - "PaymentIntentService.ConfirmParamsPaymentMethodDataWechatPay" - ] - """ - If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method. - """ - zip: NotRequired[ - "PaymentIntentService.ConfirmParamsPaymentMethodDataZip" - ] - """ - If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method. - """ - - class ConfirmParamsPaymentMethodDataAcssDebit(TypedDict): - account_number: str - """ - Customer's bank account number. - """ - institution_number: str - """ - Institution number of the customer's bank. - """ - transit_number: str - """ - Transit number of the customer's bank. - """ - - class ConfirmParamsPaymentMethodDataAffirm(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataAfterpayClearpay(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataAlipay(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataAlma(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataAmazonPay(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataAuBecsDebit(TypedDict): - account_number: str - """ - The account number for the bank account. - """ - bsb_number: str - """ - Bank-State-Branch number of the bank account. - """ - - class ConfirmParamsPaymentMethodDataBacsDebit(TypedDict): - account_number: NotRequired[str] - """ - Account number of the bank account that the funds will be debited from. - """ - sort_code: NotRequired[str] - """ - Sort code of the bank account. (e.g., `10-20-30`) - """ - - class ConfirmParamsPaymentMethodDataBancontact(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataBillie(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataBillingDetails(TypedDict): - address: NotRequired[ - "Literal['']|PaymentIntentService.ConfirmParamsPaymentMethodDataBillingDetailsAddress" - ] - """ - Billing address. - """ - email: NotRequired["Literal['']|str"] - """ - Email address. - """ - name: NotRequired["Literal['']|str"] - """ - Full name. - """ - phone: NotRequired["Literal['']|str"] - """ - Billing phone number (including extension). - """ - tax_id: NotRequired[str] - """ - Taxpayer identification number. Used only for transactions between LATAM buyers and non-LATAM sellers. - """ - - class ConfirmParamsPaymentMethodDataBillingDetailsAddress(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. - """ - - class ConfirmParamsPaymentMethodDataBlik(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataBoleto(TypedDict): - tax_id: str - """ - The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers) - """ - - class ConfirmParamsPaymentMethodDataCashapp(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataCrypto(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataCustomerBalance(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataEps(TypedDict): - bank: NotRequired[ - Literal[ - "arzte_und_apotheker_bank", - "austrian_anadi_bank_ag", - "bank_austria", - "bankhaus_carl_spangler", - "bankhaus_schelhammer_und_schattera_ag", - "bawag_psk_ag", - "bks_bank_ag", - "brull_kallmus_bank_ag", - "btv_vier_lander_bank", - "capital_bank_grawe_gruppe_ag", - "deutsche_bank_ag", - "dolomitenbank", - "easybank_ag", - "erste_bank_und_sparkassen", - "hypo_alpeadriabank_international_ag", - "hypo_bank_burgenland_aktiengesellschaft", - "hypo_noe_lb_fur_niederosterreich_u_wien", - "hypo_oberosterreich_salzburg_steiermark", - "hypo_tirol_bank_ag", - "hypo_vorarlberg_bank_ag", - "marchfelder_bank", - "oberbank_ag", - "raiffeisen_bankengruppe_osterreich", - "schoellerbank_ag", - "sparda_bank_wien", - "volksbank_gruppe", - "volkskreditbank_ag", - "vr_bank_braunau", - ] - ] - """ - The customer's bank. - """ - - class ConfirmParamsPaymentMethodDataFpx(TypedDict): - account_holder_type: NotRequired[Literal["company", "individual"]] - """ - Account holder type for FPX transaction - """ - bank: Literal[ - "affin_bank", - "agrobank", - "alliance_bank", - "ambank", - "bank_islam", - "bank_muamalat", - "bank_of_china", - "bank_rakyat", - "bsn", - "cimb", - "deutsche_bank", - "hong_leong_bank", - "hsbc", - "kfh", - "maybank2e", - "maybank2u", - "ocbc", - "pb_enterprise", - "public_bank", - "rhb", - "standard_chartered", - "uob", - ] - """ - The customer's bank. - """ - - class ConfirmParamsPaymentMethodDataGiropay(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataGopay(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataGrabpay(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataIdBankTransfer(TypedDict): - bank: NotRequired[Literal["bca", "bni", "bri", "cimb", "permata"]] - """ - Bank where the account is held. - """ - - class ConfirmParamsPaymentMethodDataIdeal(TypedDict): - bank: NotRequired[ - Literal[ - "abn_amro", - "asn_bank", - "bunq", - "buut", - "handelsbanken", - "ing", - "knab", - "moneyou", - "n26", - "nn", - "rabobank", - "regiobank", - "revolut", - "sns_bank", - "triodos_bank", - "van_lanschot", - "yoursafe", - ] - ] - """ - The customer's bank. Only use this parameter for existing customers. Don't use it for new customers. - """ - - class ConfirmParamsPaymentMethodDataInteracPresent(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataKakaoPay(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataKlarna(TypedDict): - dob: NotRequired[ - "PaymentIntentService.ConfirmParamsPaymentMethodDataKlarnaDob" - ] - """ - Customer's date of birth - """ - - class ConfirmParamsPaymentMethodDataKlarnaDob(TypedDict): - day: int - """ - The day of birth, between 1 and 31. - """ - month: int - """ - The month of birth, between 1 and 12. - """ - year: int - """ - The four-digit year of birth. - """ - - class ConfirmParamsPaymentMethodDataKonbini(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataKrCard(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataLink(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataMbWay(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataMobilepay(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataMultibanco(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataNaverPay(TypedDict): - funding: NotRequired[Literal["card", "points"]] - """ - Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`. - """ - - class ConfirmParamsPaymentMethodDataNzBankAccount(TypedDict): - account_holder_name: NotRequired[str] - """ - The name on the bank account. Only required if the account holder name is different from the name of the authorized signatory collected in the PaymentMethod's billing details. - """ - account_number: str - """ - The account number for the bank account. - """ - bank_code: str - """ - The numeric code for the bank account's bank. - """ - branch_code: str - """ - The numeric code for the bank account's bank branch. - """ - reference: NotRequired[str] - suffix: str - """ - The suffix of the bank account number. - """ - - class ConfirmParamsPaymentMethodDataOxxo(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataP24(TypedDict): - bank: NotRequired[ - Literal[ - "alior_bank", - "bank_millennium", - "bank_nowy_bfg_sa", - "bank_pekao_sa", - "banki_spbdzielcze", - "blik", - "bnp_paribas", - "boz", - "citi_handlowy", - "credit_agricole", - "envelobank", - "etransfer_pocztowy24", - "getin_bank", - "ideabank", - "ing", - "inteligo", - "mbank_mtransfer", - "nest_przelew", - "noble_pay", - "pbac_z_ipko", - "plus_bank", - "santander_przelew24", - "tmobile_usbugi_bankowe", - "toyota_bank", - "velobank", - "volkswagen_bank", - ] - ] - """ - The customer's bank. - """ - - class ConfirmParamsPaymentMethodDataPayByBank(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataPayco(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataPaynow(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataPaypal(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataPaypay(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataPayto(TypedDict): - account_number: NotRequired[str] - """ - The account number for the bank account. - """ - bsb_number: NotRequired[str] - """ - Bank-State-Branch number of the bank account. - """ - pay_id: NotRequired[str] - """ - The PayID alias for the bank account. - """ - - class ConfirmParamsPaymentMethodDataPix(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataPromptpay(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataQris(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataRadarOptions(TypedDict): - session: NotRequired[str] - """ - A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. - """ - - class ConfirmParamsPaymentMethodDataRechnung(TypedDict): - dob: "PaymentIntentService.ConfirmParamsPaymentMethodDataRechnungDob" - """ - Customer's date of birth - """ - - class ConfirmParamsPaymentMethodDataRechnungDob(TypedDict): - day: int - """ - The day of birth, between 1 and 31. - """ - month: int - """ - The month of birth, between 1 and 12. - """ - year: int - """ - The four-digit year of birth. - """ - - class ConfirmParamsPaymentMethodDataRevolutPay(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataSamsungPay(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataSatispay(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataSepaDebit(TypedDict): - iban: str - """ - IBAN of the bank account. - """ - - class ConfirmParamsPaymentMethodDataShopeepay(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataSofort(TypedDict): - country: Literal["AT", "BE", "DE", "ES", "IT", "NL"] - """ - Two-letter ISO code representing the country the bank account is located in. - """ - - class ConfirmParamsPaymentMethodDataStripeBalance(TypedDict): - account: NotRequired[str] - """ - The connected account ID whose Stripe balance to use as the source of payment - """ - source_type: NotRequired[Literal["bank_account", "card", "fpx"]] - """ - The [source_type](https://docs.stripe.com/api/balance/balance_object#balance_object-available-source_types) of the balance - """ - - class ConfirmParamsPaymentMethodDataSwish(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataTwint(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataUsBankAccount(TypedDict): - account_holder_type: NotRequired[Literal["company", "individual"]] - """ - Account holder type: individual or company. - """ - account_number: NotRequired[str] - """ - Account number of the bank account. - """ - account_type: NotRequired[Literal["checking", "savings"]] - """ - Account type: checkings or savings. Defaults to checking if omitted. - """ - financial_connections_account: NotRequired[str] - """ - The ID of a Financial Connections Account to use as a payment method. - """ - routing_number: NotRequired[str] - """ - Routing number of the bank account. - """ - - class ConfirmParamsPaymentMethodDataWechatPay(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataZip(TypedDict): - pass - - class ConfirmParamsPaymentMethodOptions(TypedDict): - acss_debit: NotRequired[ - "Literal['']|PaymentIntentService.ConfirmParamsPaymentMethodOptionsAcssDebit" - ] - """ - If this is a `acss_debit` PaymentMethod, this sub-hash contains details about the ACSS Debit payment method options. - """ - affirm: NotRequired[ - "Literal['']|PaymentIntentService.ConfirmParamsPaymentMethodOptionsAffirm" - ] - """ - If this is an `affirm` PaymentMethod, this sub-hash contains details about the Affirm payment method options. - """ - afterpay_clearpay: NotRequired[ - "Literal['']|PaymentIntentService.ConfirmParamsPaymentMethodOptionsAfterpayClearpay" - ] - """ - If this is a `afterpay_clearpay` PaymentMethod, this sub-hash contains details about the Afterpay Clearpay payment method options. - """ - alipay: NotRequired[ - "Literal['']|PaymentIntentService.ConfirmParamsPaymentMethodOptionsAlipay" - ] - """ - If this is a `alipay` PaymentMethod, this sub-hash contains details about the Alipay payment method options. - """ - alma: NotRequired[ - "Literal['']|PaymentIntentService.ConfirmParamsPaymentMethodOptionsAlma" - ] - """ - If this is a `alma` PaymentMethod, this sub-hash contains details about the Alma payment method options. - """ - amazon_pay: NotRequired[ - "Literal['']|PaymentIntentService.ConfirmParamsPaymentMethodOptionsAmazonPay" - ] - """ - If this is a `amazon_pay` PaymentMethod, this sub-hash contains details about the Amazon Pay payment method options. - """ - au_becs_debit: NotRequired[ - "Literal['']|PaymentIntentService.ConfirmParamsPaymentMethodOptionsAuBecsDebit" - ] - """ - If this is a `au_becs_debit` PaymentMethod, this sub-hash contains details about the AU BECS Direct Debit payment method options. - """ - bacs_debit: NotRequired[ - "Literal['']|PaymentIntentService.ConfirmParamsPaymentMethodOptionsBacsDebit" - ] - """ - If this is a `bacs_debit` PaymentMethod, this sub-hash contains details about the BACS Debit payment method options. - """ - bancontact: NotRequired[ - "Literal['']|PaymentIntentService.ConfirmParamsPaymentMethodOptionsBancontact" - ] - """ - If this is a `bancontact` PaymentMethod, this sub-hash contains details about the Bancontact payment method options. - """ - billie: NotRequired[ - "Literal['']|PaymentIntentService.ConfirmParamsPaymentMethodOptionsBillie" - ] - """ - If this is a `billie` PaymentMethod, this sub-hash contains details about the Billie payment method options. - """ - blik: NotRequired[ - "Literal['']|PaymentIntentService.ConfirmParamsPaymentMethodOptionsBlik" - ] - """ - If this is a `blik` PaymentMethod, this sub-hash contains details about the BLIK payment method options. - """ - boleto: NotRequired[ - "Literal['']|PaymentIntentService.ConfirmParamsPaymentMethodOptionsBoleto" - ] - """ - If this is a `boleto` PaymentMethod, this sub-hash contains details about the Boleto payment method options. - """ - card: NotRequired[ - "Literal['']|PaymentIntentService.ConfirmParamsPaymentMethodOptionsCard" - ] - """ - Configuration for any card payments attempted on this PaymentIntent. - """ - card_present: NotRequired[ - "Literal['']|PaymentIntentService.ConfirmParamsPaymentMethodOptionsCardPresent" - ] - """ - If this is a `card_present` PaymentMethod, this sub-hash contains details about the Card Present payment method options. - """ - cashapp: NotRequired[ - "Literal['']|PaymentIntentService.ConfirmParamsPaymentMethodOptionsCashapp" - ] - """ - If this is a `cashapp` PaymentMethod, this sub-hash contains details about the Cash App Pay payment method options. - """ - crypto: NotRequired[ - "Literal['']|PaymentIntentService.ConfirmParamsPaymentMethodOptionsCrypto" - ] - """ - If this is a `crypto` PaymentMethod, this sub-hash contains details about the Crypto payment method options. - """ - customer_balance: NotRequired[ - "Literal['']|PaymentIntentService.ConfirmParamsPaymentMethodOptionsCustomerBalance" - ] - """ - If this is a `customer balance` PaymentMethod, this sub-hash contains details about the customer balance payment method options. - """ - eps: NotRequired[ - "Literal['']|PaymentIntentService.ConfirmParamsPaymentMethodOptionsEps" - ] - """ - If this is a `eps` PaymentMethod, this sub-hash contains details about the EPS payment method options. - """ - fpx: NotRequired[ - "Literal['']|PaymentIntentService.ConfirmParamsPaymentMethodOptionsFpx" - ] - """ - If this is a `fpx` PaymentMethod, this sub-hash contains details about the FPX payment method options. - """ - giropay: NotRequired[ - "Literal['']|PaymentIntentService.ConfirmParamsPaymentMethodOptionsGiropay" - ] - """ - If this is a `giropay` PaymentMethod, this sub-hash contains details about the Giropay payment method options. - """ - gopay: NotRequired[ - "Literal['']|PaymentIntentService.ConfirmParamsPaymentMethodOptionsGopay" - ] - """ - If this is a `gopay` PaymentMethod, this sub-hash contains details about the Gopay payment method options. - """ - grabpay: NotRequired[ - "Literal['']|PaymentIntentService.ConfirmParamsPaymentMethodOptionsGrabpay" - ] - """ - If this is a `grabpay` PaymentMethod, this sub-hash contains details about the Grabpay payment method options. - """ - id_bank_transfer: NotRequired[ - "Literal['']|PaymentIntentService.ConfirmParamsPaymentMethodOptionsIdBankTransfer" - ] - """ - If this is a `id_bank_transfer` PaymentMethod, this sub-hash contains details about the Indonesia Bank Transfer payment method options. - """ - ideal: NotRequired[ - "Literal['']|PaymentIntentService.ConfirmParamsPaymentMethodOptionsIdeal" - ] - """ - If this is a `ideal` PaymentMethod, this sub-hash contains details about the Ideal payment method options. - """ - interac_present: NotRequired[ - "Literal['']|PaymentIntentService.ConfirmParamsPaymentMethodOptionsInteracPresent" - ] - """ - If this is a `interac_present` PaymentMethod, this sub-hash contains details about the Card Present payment method options. - """ - kakao_pay: NotRequired[ - "Literal['']|PaymentIntentService.ConfirmParamsPaymentMethodOptionsKakaoPay" - ] - """ - If this is a `kakao_pay` PaymentMethod, this sub-hash contains details about the Kakao Pay payment method options. - """ - klarna: NotRequired[ - "Literal['']|PaymentIntentService.ConfirmParamsPaymentMethodOptionsKlarna" - ] - """ - If this is a `klarna` PaymentMethod, this sub-hash contains details about the Klarna payment method options. - """ - konbini: NotRequired[ - "Literal['']|PaymentIntentService.ConfirmParamsPaymentMethodOptionsKonbini" - ] - """ - If this is a `konbini` PaymentMethod, this sub-hash contains details about the Konbini payment method options. - """ - kr_card: NotRequired[ - "Literal['']|PaymentIntentService.ConfirmParamsPaymentMethodOptionsKrCard" - ] - """ - If this is a `kr_card` PaymentMethod, this sub-hash contains details about the KR Card payment method options. - """ - link: NotRequired[ - "Literal['']|PaymentIntentService.ConfirmParamsPaymentMethodOptionsLink" - ] - """ - If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options. - """ - mb_way: NotRequired[ - "Literal['']|PaymentIntentService.ConfirmParamsPaymentMethodOptionsMbWay" - ] - """ - If this is a `mb_way` PaymentMethod, this sub-hash contains details about the MB WAY payment method options. - """ - mobilepay: NotRequired[ - "Literal['']|PaymentIntentService.ConfirmParamsPaymentMethodOptionsMobilepay" - ] - """ - If this is a `MobilePay` PaymentMethod, this sub-hash contains details about the MobilePay payment method options. - """ - multibanco: NotRequired[ - "Literal['']|PaymentIntentService.ConfirmParamsPaymentMethodOptionsMultibanco" - ] - """ - If this is a `multibanco` PaymentMethod, this sub-hash contains details about the Multibanco payment method options. - """ - naver_pay: NotRequired[ - "Literal['']|PaymentIntentService.ConfirmParamsPaymentMethodOptionsNaverPay" - ] - """ - If this is a `naver_pay` PaymentMethod, this sub-hash contains details about the Naver Pay payment method options. - """ - nz_bank_account: NotRequired[ - "Literal['']|PaymentIntentService.ConfirmParamsPaymentMethodOptionsNzBankAccount" - ] - """ - If this is a `nz_bank_account` PaymentMethod, this sub-hash contains details about the NZ BECS Direct Debit payment method options. - """ - oxxo: NotRequired[ - "Literal['']|PaymentIntentService.ConfirmParamsPaymentMethodOptionsOxxo" - ] - """ - If this is a `oxxo` PaymentMethod, this sub-hash contains details about the OXXO payment method options. - """ - p24: NotRequired[ - "Literal['']|PaymentIntentService.ConfirmParamsPaymentMethodOptionsP24" - ] - """ - If this is a `p24` PaymentMethod, this sub-hash contains details about the Przelewy24 payment method options. - """ - pay_by_bank: NotRequired[ - "Literal['']|PaymentIntentService.ConfirmParamsPaymentMethodOptionsPayByBank" - ] - """ - If this is a `pay_by_bank` PaymentMethod, this sub-hash contains details about the PayByBank payment method options. - """ - payco: NotRequired[ - "Literal['']|PaymentIntentService.ConfirmParamsPaymentMethodOptionsPayco" - ] - """ - If this is a `payco` PaymentMethod, this sub-hash contains details about the PAYCO payment method options. - """ - paynow: NotRequired[ - "Literal['']|PaymentIntentService.ConfirmParamsPaymentMethodOptionsPaynow" - ] - """ - If this is a `paynow` PaymentMethod, this sub-hash contains details about the PayNow payment method options. - """ - paypal: NotRequired[ - "Literal['']|PaymentIntentService.ConfirmParamsPaymentMethodOptionsPaypal" - ] - """ - If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options. - """ - paypay: NotRequired[ - "Literal['']|PaymentIntentService.ConfirmParamsPaymentMethodOptionsPaypay" - ] - """ - If this is a `paypay` PaymentMethod, this sub-hash contains details about the PayPay payment method options. - """ - payto: NotRequired[ - "Literal['']|PaymentIntentService.ConfirmParamsPaymentMethodOptionsPayto" - ] - """ - If this is a `payto` PaymentMethod, this sub-hash contains details about the PayTo payment method options. - """ - pix: NotRequired[ - "Literal['']|PaymentIntentService.ConfirmParamsPaymentMethodOptionsPix" - ] - """ - If this is a `pix` PaymentMethod, this sub-hash contains details about the Pix payment method options. - """ - promptpay: NotRequired[ - "Literal['']|PaymentIntentService.ConfirmParamsPaymentMethodOptionsPromptpay" - ] - """ - If this is a `promptpay` PaymentMethod, this sub-hash contains details about the PromptPay payment method options. - """ - qris: NotRequired[ - "Literal['']|PaymentIntentService.ConfirmParamsPaymentMethodOptionsQris" - ] - """ - If this is a `qris` PaymentMethod, this sub-hash contains details about the QRIS payment method options. - """ - rechnung: NotRequired[ - "Literal['']|PaymentIntentService.ConfirmParamsPaymentMethodOptionsRechnung" - ] - """ - If this is a `rechnung` PaymentMethod, this sub-hash contains details about the Rechnung payment method options. - """ - revolut_pay: NotRequired[ - "Literal['']|PaymentIntentService.ConfirmParamsPaymentMethodOptionsRevolutPay" - ] - """ - If this is a `revolut_pay` PaymentMethod, this sub-hash contains details about the Revolut Pay payment method options. - """ - samsung_pay: NotRequired[ - "Literal['']|PaymentIntentService.ConfirmParamsPaymentMethodOptionsSamsungPay" - ] - """ - If this is a `samsung_pay` PaymentMethod, this sub-hash contains details about the Samsung Pay payment method options. - """ - satispay: NotRequired[ - "Literal['']|PaymentIntentService.ConfirmParamsPaymentMethodOptionsSatispay" - ] - """ - If this is a `satispay` PaymentMethod, this sub-hash contains details about the Satispay payment method options. - """ - sepa_debit: NotRequired[ - "Literal['']|PaymentIntentService.ConfirmParamsPaymentMethodOptionsSepaDebit" - ] - """ - If this is a `sepa_debit` PaymentIntent, this sub-hash contains details about the SEPA Debit payment method options. - """ - shopeepay: NotRequired[ - "Literal['']|PaymentIntentService.ConfirmParamsPaymentMethodOptionsShopeepay" - ] - """ - If this is a `shopeepay` PaymentMethod, this sub-hash contains details about the ShopeePay payment method options. - """ - sofort: NotRequired[ - "Literal['']|PaymentIntentService.ConfirmParamsPaymentMethodOptionsSofort" - ] - """ - If this is a `sofort` PaymentMethod, this sub-hash contains details about the SOFORT payment method options. - """ - stripe_balance: NotRequired[ - "Literal['']|PaymentIntentService.ConfirmParamsPaymentMethodOptionsStripeBalance" - ] - """ - If this is a `stripe_balance` PaymentMethod, this sub-hash contains details about the Stripe Balance payment method options. - """ - swish: NotRequired[ - "Literal['']|PaymentIntentService.ConfirmParamsPaymentMethodOptionsSwish" - ] - """ - If this is a `Swish` PaymentMethod, this sub-hash contains details about the Swish payment method options. - """ - twint: NotRequired[ - "Literal['']|PaymentIntentService.ConfirmParamsPaymentMethodOptionsTwint" - ] - """ - If this is a `twint` PaymentMethod, this sub-hash contains details about the TWINT payment method options. - """ - us_bank_account: NotRequired[ - "Literal['']|PaymentIntentService.ConfirmParamsPaymentMethodOptionsUsBankAccount" - ] - """ - If this is a `us_bank_account` PaymentMethod, this sub-hash contains details about the US bank account payment method options. - """ - wechat_pay: NotRequired[ - "Literal['']|PaymentIntentService.ConfirmParamsPaymentMethodOptionsWechatPay" - ] - """ - If this is a `wechat_pay` PaymentMethod, this sub-hash contains details about the WeChat Pay payment method options. - """ - zip: NotRequired[ - "Literal['']|PaymentIntentService.ConfirmParamsPaymentMethodOptionsZip" - ] - """ - If this is a `zip` PaymentMethod, this sub-hash contains details about the Zip payment method options. - """ - - class ConfirmParamsPaymentMethodOptionsAcssDebit(TypedDict): - mandate_options: NotRequired[ - "PaymentIntentService.ConfirmParamsPaymentMethodOptionsAcssDebitMandateOptions" - ] - """ - Additional fields for Mandate creation - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - target_date: NotRequired[str] - """ - Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. - """ - verification_method: NotRequired[ - Literal["automatic", "instant", "microdeposits"] - ] - """ - Bank account verification method. - """ - - class ConfirmParamsPaymentMethodOptionsAcssDebitMandateOptions(TypedDict): - custom_mandate_url: NotRequired["Literal['']|str"] - """ - A URL for custom mandate text to render during confirmation step. - The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent, - or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent. - """ - interval_description: NotRequired[str] - """ - Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'. - """ - payment_schedule: NotRequired[ - Literal["combined", "interval", "sporadic"] - ] - """ - Payment schedule for the mandate. - """ - transaction_type: NotRequired[Literal["business", "personal"]] - """ - Transaction type of the mandate. - """ - - class ConfirmParamsPaymentMethodOptionsAffirm(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds are captured from the customer's account. - - If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. - """ - preferred_locale: NotRequired[str] - """ - Preferred language of the Affirm authorization page that the customer is redirected to. - """ - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class ConfirmParamsPaymentMethodOptionsAfterpayClearpay(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds are captured from the customer's account. - - If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. - """ - reference: NotRequired[str] - """ - An internal identifier or reference that this payment corresponds to. You must limit the identifier to 128 characters, and it can only contain letters, numbers, underscores, backslashes, and dashes. - This field differs from the statement descriptor and item name. - """ - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class ConfirmParamsPaymentMethodOptionsAlipay(TypedDict): - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class ConfirmParamsPaymentMethodOptionsAlma(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds are captured from the customer's account. - - If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. - """ - - class ConfirmParamsPaymentMethodOptionsAmazonPay(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds are captured from the customer's account. - - If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - """ - - class ConfirmParamsPaymentMethodOptionsAuBecsDebit(TypedDict): - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - target_date: NotRequired[str] - """ - Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. - """ - - class ConfirmParamsPaymentMethodOptionsBacsDebit(TypedDict): - mandate_options: NotRequired[ - "PaymentIntentService.ConfirmParamsPaymentMethodOptionsBacsDebitMandateOptions" - ] - """ - Additional fields for Mandate creation - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - target_date: NotRequired[str] - """ - Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. - """ - - class ConfirmParamsPaymentMethodOptionsBacsDebitMandateOptions(TypedDict): - reference_prefix: NotRequired["Literal['']|str"] - """ - Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'. - """ - - class ConfirmParamsPaymentMethodOptionsBancontact(TypedDict): - preferred_language: NotRequired[Literal["de", "en", "fr", "nl"]] - """ - Preferred language of the Bancontact authorization page that the customer is redirected to. - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class ConfirmParamsPaymentMethodOptionsBillie(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds are captured from the customer's account. - - If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. - """ - - class ConfirmParamsPaymentMethodOptionsBlik(TypedDict): - code: NotRequired[str] - """ - The 6-digit BLIK code that a customer has generated using their banking application. Can only be set on confirmation. - """ - setup_future_usage: NotRequired["Literal['']|Literal['none']"] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class ConfirmParamsPaymentMethodOptionsBoleto(TypedDict): - expires_after_days: NotRequired[int] - """ - The number of calendar days before a Boleto voucher expires. For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto invoice will expire on Wednesday at 23:59 America/Sao_Paulo time. - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class ConfirmParamsPaymentMethodOptionsCard(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds are captured from the customer's account. - - If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. - """ - cvc_token: NotRequired[str] - """ - A single-use `cvc_update` Token that represents a card CVC value. When provided, the CVC value will be verified during the card payment attempt. This parameter can only be provided during confirmation. - """ - installments: NotRequired[ - "PaymentIntentService.ConfirmParamsPaymentMethodOptionsCardInstallments" - ] - """ - Installment configuration for payments attempted on this PaymentIntent. - - For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments). - """ - mandate_options: NotRequired[ - "PaymentIntentService.ConfirmParamsPaymentMethodOptionsCardMandateOptions" - ] - """ - Configuration options for setting up an eMandate for cards issued in India. - """ - moto: NotRequired[bool] - """ - When specified, this parameter indicates that a transaction will be marked - as MOTO (Mail Order Telephone Order) and thus out of scope for SCA. This - parameter can only be provided during confirmation. - """ - network: NotRequired[ - Literal[ - "amex", - "cartes_bancaires", - "diners", - "discover", - "eftpos_au", - "girocard", - "interac", - "jcb", - "link", - "mastercard", - "unionpay", - "unknown", - "visa", - ] - ] - """ - Selected network to process this PaymentIntent on. Depends on the available networks of the card attached to the PaymentIntent. Can be only set confirm-time. - """ - request_decremental_authorization: NotRequired[ - Literal["if_available", "never"] - ] - """ - Request ability to [decrement the authorization](https://stripe.com/docs/payments/decremental-authorization) for this PaymentIntent. - """ - request_extended_authorization: NotRequired[ - Literal["if_available", "never"] - ] - """ - Request ability to [capture beyond the standard authorization validity window](https://stripe.com/docs/payments/extended-authorization) for this PaymentIntent. - """ - request_incremental_authorization: NotRequired[ - Literal["if_available", "never"] - ] - """ - Request ability to [increment the authorization](https://stripe.com/docs/payments/incremental-authorization) for this PaymentIntent. - """ - request_multicapture: NotRequired[Literal["if_available", "never"]] - """ - Request ability to make [multiple captures](https://stripe.com/docs/payments/multicapture) for this PaymentIntent. - """ - request_overcapture: NotRequired[Literal["if_available", "never"]] - """ - Request ability to [overcapture](https://stripe.com/docs/payments/overcapture) for this PaymentIntent. - """ - request_partial_authorization: NotRequired[ - Literal["if_available", "never"] - ] - """ - Request partial authorization on this PaymentIntent. - """ - request_three_d_secure: NotRequired[ - Literal["any", "automatic", "challenge"] - ] - """ - We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. - """ - require_cvc_recollection: NotRequired[bool] - """ - When enabled, using a card that is attached to a customer will require the CVC to be provided again (i.e. using the cvc_token parameter). - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - statement_descriptor_suffix_kana: NotRequired["Literal['']|str"] - """ - Provides information about a card payment that customers see on their statements. Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor that's set on the account to form the complete statement descriptor. Maximum 22 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 22 characters. - """ - statement_descriptor_suffix_kanji: NotRequired["Literal['']|str"] - """ - Provides information about a card payment that customers see on their statements. Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement descriptor that's set on the account to form the complete statement descriptor. Maximum 17 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 17 characters. - """ - statement_details: NotRequired[ - "Literal['']|PaymentIntentService.ConfirmParamsPaymentMethodOptionsCardStatementDetails" - ] - """ - Statement details for this payment intent. You can use this to override the merchant details shown on your customers' statements. - """ - three_d_secure: NotRequired[ - "PaymentIntentService.ConfirmParamsPaymentMethodOptionsCardThreeDSecure" - ] - """ - If 3D Secure authentication was performed with a third-party provider, - the authentication details to use for this payment. - """ - - class ConfirmParamsPaymentMethodOptionsCardInstallments(TypedDict): - enabled: NotRequired[bool] - """ - Setting to true enables installments for this PaymentIntent. - This will cause the response to contain a list of available installment plans. - Setting to false will prevent any selected plan from applying to a charge. - """ - plan: NotRequired[ - "Literal['']|PaymentIntentService.ConfirmParamsPaymentMethodOptionsCardInstallmentsPlan" - ] - """ - The selected installment plan to use for this payment attempt. - This parameter can only be provided during confirmation. - """ - - class ConfirmParamsPaymentMethodOptionsCardInstallmentsPlan(TypedDict): - count: NotRequired[int] - """ - For `fixed_count` installment plans, this is required. It represents the number of installment payments your customer will make to their credit card. - """ - interval: NotRequired[Literal["month"]] - """ - For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card. - One of `month`. - """ - type: Literal["bonus", "fixed_count", "revolving"] - """ - Type of installment plan, one of `fixed_count`, `bonus`, or `revolving`. - """ - - class ConfirmParamsPaymentMethodOptionsCardMandateOptions(TypedDict): - amount: int - """ - Amount to be charged for future payments. - """ - amount_type: Literal["fixed", "maximum"] - """ - One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. - """ - description: NotRequired[str] - """ - A description of the mandate or subscription that is meant to be displayed to the customer. - """ - end_date: NotRequired[int] - """ - End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. - """ - interval: Literal["day", "month", "sporadic", "week", "year"] - """ - Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`. - """ - interval_count: NotRequired[int] - """ - The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`. - """ - reference: str - """ - Unique identifier for the mandate or subscription. - """ - start_date: int - """ - Start date of the mandate or subscription. Start date should not be lesser than yesterday. - """ - supported_types: NotRequired[List[Literal["india"]]] - """ - Specifies the type of mandates supported. Possible values are `india`. - """ - - class ConfirmParamsPaymentMethodOptionsCardPresent(TypedDict): - request_extended_authorization: NotRequired[bool] - """ - Request ability to capture this payment beyond the standard [authorization validity window](https://stripe.com/docs/terminal/features/extended-authorizations#authorization-validity) - """ - request_incremental_authorization_support: NotRequired[bool] - """ - Request ability to [increment](https://stripe.com/docs/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://stripe.com/docs/api/payment_intents/confirm) response to verify support. - """ - routing: NotRequired[ - "PaymentIntentService.ConfirmParamsPaymentMethodOptionsCardPresentRouting" - ] - """ - Network routing priority on co-branded EMV cards supporting domestic debit and international card schemes. - """ - - class ConfirmParamsPaymentMethodOptionsCardPresentRouting(TypedDict): - requested_priority: NotRequired[Literal["domestic", "international"]] - """ - Routing requested priority - """ - - class ConfirmParamsPaymentMethodOptionsCardStatementDetails(TypedDict): - address: NotRequired[ - "PaymentIntentService.ConfirmParamsPaymentMethodOptionsCardStatementDetailsAddress" - ] - """ - Please pass in an address that is within your Stripe user account country - """ - phone: NotRequired[str] - """ - Phone number (e.g., a toll-free number that customers can call) - """ - - class ConfirmParamsPaymentMethodOptionsCardStatementDetailsAddress( - 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. - """ - - class ConfirmParamsPaymentMethodOptionsCardThreeDSecure(TypedDict): - ares_trans_status: NotRequired[ - Literal["A", "C", "I", "N", "R", "U", "Y"] - ] - """ - The `transStatus` returned from the card Issuer's ACS in the ARes. - """ - cryptogram: str - """ - The cryptogram, also known as the "authentication value" (AAV, CAVV or - AEVV). This value is 20 bytes, base64-encoded into a 28-character string. - (Most 3D Secure providers will return the base64-encoded version, which - is what you should specify here.) - """ - electronic_commerce_indicator: NotRequired[ - Literal["01", "02", "05", "06", "07"] - ] - """ - The Electronic Commerce Indicator (ECI) is returned by your 3D Secure - provider and indicates what degree of authentication was performed. - """ - exemption_indicator: NotRequired[Literal["low_risk", "none"]] - """ - The exemption requested via 3DS and accepted by the issuer at authentication time. - """ - network_options: NotRequired[ - "PaymentIntentService.ConfirmParamsPaymentMethodOptionsCardThreeDSecureNetworkOptions" - ] - """ - Network specific 3DS fields. Network specific arguments require an - explicit card brand choice. The parameter `payment_method_options.card.network`` - must be populated accordingly - """ - requestor_challenge_indicator: NotRequired[str] - """ - The challenge indicator (`threeDSRequestorChallengeInd`) which was requested in the - AReq sent to the card Issuer's ACS. A string containing 2 digits from 01-99. - """ - transaction_id: str - """ - For 3D Secure 1, the XID. For 3D Secure 2, the Directory Server - Transaction ID (dsTransID). - """ - version: Literal["1.0.2", "2.1.0", "2.2.0"] - """ - The version of 3D Secure that was performed. - """ - - class ConfirmParamsPaymentMethodOptionsCardThreeDSecureNetworkOptions( - TypedDict, - ): - cartes_bancaires: NotRequired[ - "PaymentIntentService.ConfirmParamsPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancaires" - ] - """ - Cartes Bancaires-specific 3DS fields. - """ - - class ConfirmParamsPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancaires( - TypedDict, - ): - cb_avalgo: Literal["0", "1", "2", "3", "4", "A"] - """ - The cryptogram calculation algorithm used by the card Issuer's ACS - to calculate the Authentication cryptogram. Also known as `cavvAlgorithm`. - messageExtension: CB-AVALGO - """ - cb_exemption: NotRequired[str] - """ - The exemption indicator returned from Cartes Bancaires in the ARes. - message extension: CB-EXEMPTION; string (4 characters) - This is a 3 byte bitmap (low significant byte first and most significant - bit first) that has been Base64 encoded - """ - cb_score: NotRequired[int] - """ - The risk score returned from Cartes Bancaires in the ARes. - message extension: CB-SCORE; numeric value 0-99 - """ - - class ConfirmParamsPaymentMethodOptionsCashapp(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds are captured from the customer's account. - - If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class ConfirmParamsPaymentMethodOptionsCrypto(TypedDict): - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class ConfirmParamsPaymentMethodOptionsCustomerBalance(TypedDict): - bank_transfer: NotRequired[ - "PaymentIntentService.ConfirmParamsPaymentMethodOptionsCustomerBalanceBankTransfer" - ] - """ - Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. - """ - funding_type: NotRequired[Literal["bank_transfer"]] - """ - The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. - """ - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class ConfirmParamsPaymentMethodOptionsCustomerBalanceBankTransfer( - TypedDict, - ): - eu_bank_transfer: NotRequired[ - "PaymentIntentService.ConfirmParamsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer" - ] - """ - Configuration for the eu_bank_transfer funding type. - """ - requested_address_types: NotRequired[ - List[ - Literal[ - "aba", - "iban", - "sepa", - "sort_code", - "spei", - "swift", - "zengin", - ] - ] - ] - """ - List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned. - - Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`. - """ - type: Literal[ - "eu_bank_transfer", - "gb_bank_transfer", - "jp_bank_transfer", - "mx_bank_transfer", - "us_bank_transfer", - ] - """ - The list of bank transfer types that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. - """ - - class ConfirmParamsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer( - TypedDict, - ): - country: str - """ - The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. - """ - - class ConfirmParamsPaymentMethodOptionsEps(TypedDict): - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class ConfirmParamsPaymentMethodOptionsFpx(TypedDict): - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class ConfirmParamsPaymentMethodOptionsGiropay(TypedDict): - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class ConfirmParamsPaymentMethodOptionsGopay(TypedDict): - setup_future_usage: NotRequired[Literal["none", "off_session"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class ConfirmParamsPaymentMethodOptionsGrabpay(TypedDict): - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class ConfirmParamsPaymentMethodOptionsIdBankTransfer(TypedDict): - expires_after: NotRequired[int] - """ - The UNIX timestamp until which the virtual bank account is valid. Permitted range is from 5 minutes from now until 31 days from now. If unset, it defaults to 3 days from now. - """ - expires_at: NotRequired[int] - """ - The UNIX timestamp until which the virtual bank account is valid. Permitted range is from now until 30 days from now. If unset, it defaults to 1 days from now. - """ - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class ConfirmParamsPaymentMethodOptionsIdeal(TypedDict): - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class ConfirmParamsPaymentMethodOptionsInteracPresent(TypedDict): - pass - - class ConfirmParamsPaymentMethodOptionsKakaoPay(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds are captured from the customer's account. - - If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - """ - - class ConfirmParamsPaymentMethodOptionsKlarna(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds are captured from the customer's account. - - If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. - """ - on_demand: NotRequired[ - "PaymentIntentService.ConfirmParamsPaymentMethodOptionsKlarnaOnDemand" - ] - """ - On-demand details if setting up or charging an on-demand payment. - """ - preferred_locale: NotRequired[ - Literal[ - "cs-CZ", - "da-DK", - "de-AT", - "de-CH", - "de-DE", - "el-GR", - "en-AT", - "en-AU", - "en-BE", - "en-CA", - "en-CH", - "en-CZ", - "en-DE", - "en-DK", - "en-ES", - "en-FI", - "en-FR", - "en-GB", - "en-GR", - "en-IE", - "en-IT", - "en-NL", - "en-NO", - "en-NZ", - "en-PL", - "en-PT", - "en-RO", - "en-SE", - "en-US", - "es-ES", - "es-US", - "fi-FI", - "fr-BE", - "fr-CA", - "fr-CH", - "fr-FR", - "it-CH", - "it-IT", - "nb-NO", - "nl-BE", - "nl-NL", - "pl-PL", - "pt-PT", - "ro-RO", - "sv-FI", - "sv-SE", - ] - ] - """ - Preferred language of the Klarna authorization page that the customer is redirected to - """ - setup_future_usage: NotRequired[ - Literal["none", "off_session", "on_session"] - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - subscriptions: NotRequired[ - "Literal['']|List[PaymentIntentService.ConfirmParamsPaymentMethodOptionsKlarnaSubscription]" - ] - """ - Subscription details if setting up or charging a subscription. - """ - - class ConfirmParamsPaymentMethodOptionsKlarnaOnDemand(TypedDict): - average_amount: NotRequired[int] - """ - Your average amount value. You can use a value across your customer base, or segment based on customer type, country, etc. - """ - maximum_amount: NotRequired[int] - """ - The maximum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. - """ - minimum_amount: NotRequired[int] - """ - The lowest or minimum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. - """ - purchase_interval: NotRequired[Literal["day", "month", "week", "year"]] - """ - Interval at which the customer is making purchases - """ - purchase_interval_count: NotRequired[int] - """ - The number of `purchase_interval` between charges - """ - - class ConfirmParamsPaymentMethodOptionsKlarnaSubscription(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Unit of time between subscription charges. - """ - interval_count: NotRequired[int] - """ - The number of intervals (specified in the `interval` attribute) between subscription charges. For example, `interval=month` and `interval_count=3` charges every 3 months. - """ - name: NotRequired[str] - """ - Name for subscription. - """ - next_billing: NotRequired[ - "PaymentIntentService.ConfirmParamsPaymentMethodOptionsKlarnaSubscriptionNextBilling" - ] - """ - Describes the upcoming charge for this subscription. - """ - reference: str - """ - A non-customer-facing reference to correlate subscription charges in the Klarna app. Use a value that persists across subscription charges. - """ - - class ConfirmParamsPaymentMethodOptionsKlarnaSubscriptionNextBilling( - TypedDict, - ): - amount: int - """ - The amount of the next charge for the subscription. - """ - date: str - """ - The date of the next charge for the subscription in YYYY-MM-DD format. - """ - - class ConfirmParamsPaymentMethodOptionsKonbini(TypedDict): - confirmation_number: NotRequired["Literal['']|str"] - """ - An optional 10 to 11 digit numeric-only string determining the confirmation code at applicable convenience stores. Must not consist of only zeroes and could be rejected in case of insufficient uniqueness. We recommend to use the customer's phone number. - """ - expires_after_days: NotRequired["Literal['']|int"] - """ - The number of calendar days (between 1 and 60) after which Konbini payment instructions will expire. For example, if a PaymentIntent is confirmed with Konbini and `expires_after_days` set to 2 on Monday JST, the instructions will expire on Wednesday 23:59:59 JST. Defaults to 3 days. - """ - expires_at: NotRequired["Literal['']|int"] - """ - The timestamp at which the Konbini payment instructions will expire. Only one of `expires_after_days` or `expires_at` may be set. - """ - product_description: NotRequired["Literal['']|str"] - """ - A product descriptor of up to 22 characters, which will appear to customers at the convenience store. - """ - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class ConfirmParamsPaymentMethodOptionsKrCard(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds are captured from the customer's account. - - If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - """ - - class ConfirmParamsPaymentMethodOptionsLink(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds are captured from the customer's account. - - If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. - """ - persistent_token: NotRequired[str] - """ - [Deprecated] This is a legacy parameter that no longer has any function. - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class ConfirmParamsPaymentMethodOptionsMbWay(TypedDict): - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class ConfirmParamsPaymentMethodOptionsMobilepay(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds are captured from the customer's account. - - If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. - """ - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class ConfirmParamsPaymentMethodOptionsMultibanco(TypedDict): - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class ConfirmParamsPaymentMethodOptionsNaverPay(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds are captured from the customer's account. - - If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - """ - - class ConfirmParamsPaymentMethodOptionsNzBankAccount(TypedDict): - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - target_date: NotRequired[str] - """ - Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. - """ - - class ConfirmParamsPaymentMethodOptionsOxxo(TypedDict): - expires_after_days: NotRequired[int] - """ - The number of calendar days before an OXXO voucher expires. For example, if you create an OXXO voucher on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time. - """ - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class ConfirmParamsPaymentMethodOptionsP24(TypedDict): - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - tos_shown_and_accepted: NotRequired[bool] - """ - Confirm that the payer has accepted the P24 terms and conditions. - """ - - class ConfirmParamsPaymentMethodOptionsPayByBank(TypedDict): - pass - - class ConfirmParamsPaymentMethodOptionsPayco(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds are captured from the customer's account. - - If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. - """ - - class ConfirmParamsPaymentMethodOptionsPaynow(TypedDict): - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class ConfirmParamsPaymentMethodOptionsPaypal(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds will be captured from the customer's account. - """ - line_items: NotRequired[ - List[ - "PaymentIntentService.ConfirmParamsPaymentMethodOptionsPaypalLineItem" - ] - ] - """ - The line items purchased by the customer. - """ - preferred_locale: NotRequired[ - Literal[ - "cs-CZ", - "da-DK", - "de-AT", - "de-DE", - "de-LU", - "el-GR", - "en-GB", - "en-US", - "es-ES", - "fi-FI", - "fr-BE", - "fr-FR", - "fr-LU", - "hu-HU", - "it-IT", - "nl-BE", - "nl-NL", - "pl-PL", - "pt-PT", - "sk-SK", - "sv-SE", - ] - ] - """ - [Preferred locale](https://stripe.com/docs/payments/paypal/supported-locales) of the PayPal checkout page that the customer is redirected to. - """ - reference: NotRequired[str] - """ - A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. - """ - reference_id: NotRequired[str] - """ - A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. - """ - risk_correlation_id: NotRequired[str] - """ - The risk correlation ID for an on-session payment using a saved PayPal payment method. - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - subsellers: NotRequired[List[str]] - """ - The Stripe connected account IDs of the sellers on the platform for this transaction (optional). Only allowed when [separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) are used. - """ - - class ConfirmParamsPaymentMethodOptionsPaypalLineItem(TypedDict): - category: NotRequired[ - Literal["digital_goods", "donation", "physical_goods"] - ] - """ - Type of the line item. - """ - description: NotRequired[str] - """ - Description of the line item. - """ - name: str - """ - Descriptive name of the line item. - """ - quantity: int - """ - Quantity of the line item. Must be a positive number. - """ - sku: NotRequired[str] - """ - Client facing stock keeping unit, article number or similar. - """ - sold_by: NotRequired[str] - """ - The Stripe account ID of the connected account that sells the item. - """ - tax: NotRequired[ - "PaymentIntentService.ConfirmParamsPaymentMethodOptionsPaypalLineItemTax" - ] - """ - The tax information for the line item. - """ - unit_amount: int - """ - Price for a single unit of the line item in minor units. Cannot be a negative number. - """ - - class ConfirmParamsPaymentMethodOptionsPaypalLineItemTax(TypedDict): - amount: int - """ - The tax for a single unit of the line item in minor units. Cannot be a negative number. - """ - behavior: Literal["exclusive", "inclusive"] - """ - The tax behavior for the line item. - """ - - class ConfirmParamsPaymentMethodOptionsPaypay(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds are captured from the customer's account. - - If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. - """ - - class ConfirmParamsPaymentMethodOptionsPayto(TypedDict): - mandate_options: NotRequired[ - "PaymentIntentService.ConfirmParamsPaymentMethodOptionsPaytoMandateOptions" - ] - """ - Additional fields for Mandate creation. Only `purpose` field is configurable for PayTo PaymentIntent with `setup_future_usage=none`. Other fields are only applicable to PayTo PaymentIntent with `setup_future_usage=off_session` - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class ConfirmParamsPaymentMethodOptionsPaytoMandateOptions(TypedDict): - amount: NotRequired[int] - """ - Amount that will be collected. It is required when `amount_type` is `fixed`. - """ - amount_type: NotRequired[Literal["fixed", "maximum"]] - """ - The type of amount that will be collected. The amount charged must be exact or up to the value of `amount` param for `fixed` or `maximum` type respectively. - """ - end_date: NotRequired[str] - """ - Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no end date. - """ - payment_schedule: NotRequired[ - Literal[ - "adhoc", - "annual", - "daily", - "fortnightly", - "monthly", - "quarterly", - "semi_annual", - "weekly", - ] - ] - """ - The periodicity at which payments will be collected. - """ - payments_per_period: NotRequired[int] - """ - The number of payments that will be made during a payment period. Defaults to 1 except for when `payment_schedule` is `adhoc`. In that case, it defaults to no limit. - """ - purpose: NotRequired[ - Literal[ - "dependant_support", - "government", - "loan", - "mortgage", - "other", - "pension", - "personal", - "retail", - "salary", - "tax", - "utility", - ] - ] - """ - The purpose for which payments are made. Defaults to retail. - """ - - class ConfirmParamsPaymentMethodOptionsPix(TypedDict): - amount_includes_iof: NotRequired[Literal["always", "never"]] - """ - Determines if the amount includes the IOF tax. Defaults to `never`. - """ - expires_after_seconds: NotRequired[int] - """ - The number of seconds (between 10 and 1209600) after which Pix payment will expire. Defaults to 86400 seconds. - """ - expires_at: NotRequired[int] - """ - The timestamp at which the Pix expires (between 10 and 1209600 seconds in the future). Defaults to 1 day in the future. - """ - mandate_options: NotRequired[ - "PaymentIntentService.ConfirmParamsPaymentMethodOptionsPixMandateOptions" - ] - """ - Additional fields for mandate creation. Only applicable when `setup_future_usage=off_session`. - """ - setup_future_usage: NotRequired[Literal["none", "off_session"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class ConfirmParamsPaymentMethodOptionsPixMandateOptions(TypedDict): - amount: NotRequired[int] - """ - Amount to be charged for future payments. Required when `amount_type=fixed`. If not provided for `amount_type=maximum`, defaults to 40000. - """ - amount_includes_iof: NotRequired[Literal["always", "never"]] - """ - Determines if the amount includes the IOF tax. Defaults to `never`. - """ - amount_type: NotRequired[Literal["fixed", "maximum"]] - """ - Type of amount. Defaults to `maximum`. - """ - currency: NotRequired[str] - """ - Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Only `brl` is supported currently. - """ - end_date: NotRequired[str] - """ - Date when the mandate expires and no further payments will be charged, in `YYYY-MM-DD`. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. - """ - payment_schedule: NotRequired[ - Literal["halfyearly", "monthly", "quarterly", "weekly", "yearly"] - ] - """ - Schedule at which the future payments will be charged. Defaults to `weekly`. - """ - reference: NotRequired[str] - """ - Subscription name displayed to buyers in their bank app. Defaults to the displayable business name. - """ - start_date: NotRequired[str] - """ - Start date of the mandate, in `YYYY-MM-DD`. Start date should be at least 3 days in the future. Defaults to 3 days after the current date. - """ - - class ConfirmParamsPaymentMethodOptionsPromptpay(TypedDict): - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class ConfirmParamsPaymentMethodOptionsQris(TypedDict): - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class ConfirmParamsPaymentMethodOptionsRechnung(TypedDict): - pass - - class ConfirmParamsPaymentMethodOptionsRevolutPay(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds are captured from the customer's account. - - If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - """ - - class ConfirmParamsPaymentMethodOptionsSamsungPay(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds are captured from the customer's account. - - If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. - """ - - class ConfirmParamsPaymentMethodOptionsSatispay(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds are captured from the customer's account. - - If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. - """ - - class ConfirmParamsPaymentMethodOptionsSepaDebit(TypedDict): - mandate_options: NotRequired[ - "PaymentIntentService.ConfirmParamsPaymentMethodOptionsSepaDebitMandateOptions" - ] - """ - Additional fields for Mandate creation - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - target_date: NotRequired[str] - """ - Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. - """ - - class ConfirmParamsPaymentMethodOptionsSepaDebitMandateOptions(TypedDict): - reference_prefix: NotRequired["Literal['']|str"] - """ - Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'. - """ - - class ConfirmParamsPaymentMethodOptionsShopeepay(TypedDict): - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class ConfirmParamsPaymentMethodOptionsSofort(TypedDict): - preferred_language: NotRequired[ - "Literal['']|Literal['de', 'en', 'es', 'fr', 'it', 'nl', 'pl']" - ] - """ - Language shown to the payer on redirect. - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class ConfirmParamsPaymentMethodOptionsStripeBalance(TypedDict): - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class ConfirmParamsPaymentMethodOptionsSwish(TypedDict): - reference: NotRequired["Literal['']|str"] - """ - A reference for this payment to be displayed in the Swish app. - """ - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class ConfirmParamsPaymentMethodOptionsTwint(TypedDict): - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class ConfirmParamsPaymentMethodOptionsUsBankAccount(TypedDict): - financial_connections: NotRequired[ - "PaymentIntentService.ConfirmParamsPaymentMethodOptionsUsBankAccountFinancialConnections" - ] - """ - Additional fields for Financial Connections Session creation - """ - mandate_options: NotRequired[ - "PaymentIntentService.ConfirmParamsPaymentMethodOptionsUsBankAccountMandateOptions" - ] - """ - Additional fields for Mandate creation - """ - networks: NotRequired[ - "PaymentIntentService.ConfirmParamsPaymentMethodOptionsUsBankAccountNetworks" - ] - """ - Additional fields for network related functions - """ - preferred_settlement_speed: NotRequired[ - "Literal['']|Literal['fastest', 'standard']" - ] - """ - Preferred transaction settlement speed - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - target_date: NotRequired[str] - """ - Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. - """ - verification_method: NotRequired[ - Literal["automatic", "instant", "microdeposits"] - ] - """ - Bank account verification method. - """ - - class ConfirmParamsPaymentMethodOptionsUsBankAccountFinancialConnections( - TypedDict, - ): - filters: NotRequired[ - "PaymentIntentService.ConfirmParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters" - ] - """ - Provide filters for the linked accounts that the customer can select for the payment method. - """ - manual_entry: NotRequired[ - "PaymentIntentService.ConfirmParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsManualEntry" - ] - """ - Customize manual entry behavior - """ - permissions: NotRequired[ - List[ - Literal[ - "balances", "ownership", "payment_method", "transactions" - ] - ] - ] - """ - The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. - """ - prefetch: NotRequired[ - List[ - Literal[ - "balances", - "inferred_balances", - "ownership", - "transactions", - ] - ] - ] - """ - List of data features that you would like to retrieve upon account creation. - """ - return_url: NotRequired[str] - """ - For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. - """ - - class ConfirmParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters( - TypedDict, - ): - account_subcategories: NotRequired[ - List[Literal["checking", "savings"]] - ] - """ - The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`. - """ - institution: NotRequired[str] - """ - ID of the institution to use to filter for selectable accounts. - """ - - class ConfirmParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsManualEntry( - TypedDict, - ): - mode: Literal["automatic", "custom"] - """ - Settings for configuring manual entry of account details. - """ - - class ConfirmParamsPaymentMethodOptionsUsBankAccountMandateOptions( - TypedDict, - ): - collection_method: NotRequired["Literal['']|Literal['paper']"] - """ - The method used to collect offline mandate customer acceptance. - """ - - class ConfirmParamsPaymentMethodOptionsUsBankAccountNetworks(TypedDict): - requested: NotRequired[List[Literal["ach", "us_domestic_wire"]]] - """ - Triggers validations to run across the selected networks - """ - - class ConfirmParamsPaymentMethodOptionsWechatPay(TypedDict): - app_id: NotRequired[str] - """ - The app ID registered with WeChat Pay. Only required when client is ios or android. - """ - client: NotRequired[Literal["android", "ios", "web"]] - """ - The client type that the end customer will pay from - """ - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class ConfirmParamsPaymentMethodOptionsZip(TypedDict): - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class ConfirmParamsRadarOptions(TypedDict): - session: NotRequired[str] - """ - A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. - """ - - class ConfirmParamsShipping(TypedDict): - address: "PaymentIntentService.ConfirmParamsShippingAddress" - """ - Shipping address. - """ - carrier: NotRequired[str] - """ - The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. - """ - name: str - """ - Recipient name. - """ - phone: NotRequired[str] - """ - Recipient phone (including extension). - """ - tracking_number: NotRequired[str] - """ - The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. - """ - - class ConfirmParamsShippingAddress(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. - """ - - class CreateParams(TypedDict): - amount: int - """ - Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). - """ - amount_details: NotRequired[ - "PaymentIntentService.CreateParamsAmountDetails" - ] - """ - Provides industry-specific information about the amount. - """ - application_fee_amount: NotRequired[int] - """ - The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total amount captured. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). - """ - automatic_payment_methods: NotRequired[ - "PaymentIntentService.CreateParamsAutomaticPaymentMethods" - ] - """ - When you enable this parameter, this PaymentIntent accepts payment methods that you enable in the Dashboard and that are compatible with this PaymentIntent's other parameters. - """ - capture_method: NotRequired[ - Literal["automatic", "automatic_async", "manual"] - ] - """ - Controls when the funds will be captured from the customer's account. - """ - confirm: NotRequired[bool] - """ - Set to `true` to attempt to [confirm this PaymentIntent](https://stripe.com/docs/api/payment_intents/confirm) immediately. This parameter defaults to `false`. When creating and confirming a PaymentIntent at the same time, you can also provide the parameters available in the [Confirm API](https://stripe.com/docs/api/payment_intents/confirm). - """ - confirmation_method: NotRequired[Literal["automatic", "manual"]] - """ - Describes whether we can confirm this PaymentIntent automatically, or if it requires customer action to confirm the payment. - """ - confirmation_token: NotRequired[str] - """ - ID of the ConfirmationToken used to confirm this PaymentIntent. - - If the provided ConfirmationToken contains properties that are also being provided in this request, such as `payment_method`, then the values in this request will take precedence. - """ - 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). - """ - customer: NotRequired[str] - """ - ID of the Customer this PaymentIntent belongs to, if one exists. - - Payment methods attached to other Customers cannot be used with this PaymentIntent. - - If [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) is set and this PaymentIntent's payment method is not `card_present`, then the payment method attaches to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. - """ - customer_account: NotRequired[str] - """ - ID of the Account this PaymentIntent belongs to, if one exists. - - Payment methods attached to other Accounts cannot be used with this PaymentIntent. - - If [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) is set and this PaymentIntent's payment method is not `card_present`, then the payment method attaches to the Account after the PaymentIntent has been confirmed and any required actions from the user are complete. If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Account instead. - """ - description: NotRequired[str] - """ - An arbitrary string attached to the object. Often useful for displaying to users. - """ - error_on_requires_action: NotRequired[bool] - """ - Set to `true` to fail the payment attempt if the PaymentIntent transitions into `requires_action`. Use this parameter for simpler integrations that don't handle customer actions, such as [saving cards without authentication](https://stripe.com/docs/payments/save-card-without-authentication). This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). - """ - excluded_payment_method_types: NotRequired[ - List[ - Literal[ - "acss_debit", - "affirm", - "afterpay_clearpay", - "alipay", - "alma", - "amazon_pay", - "au_becs_debit", - "bacs_debit", - "bancontact", - "billie", - "blik", - "boleto", - "card", - "cashapp", - "crypto", - "customer_balance", - "eps", - "fpx", - "giropay", - "gopay", - "grabpay", - "id_bank_transfer", - "ideal", - "kakao_pay", - "klarna", - "konbini", - "kr_card", - "mb_way", - "mobilepay", - "multibanco", - "naver_pay", - "nz_bank_account", - "oxxo", - "p24", - "pay_by_bank", - "payco", - "paynow", - "paypal", - "paypay", - "payto", - "pix", - "promptpay", - "qris", - "rechnung", - "revolut_pay", - "samsung_pay", - "satispay", - "sepa_debit", - "shopeepay", - "sofort", - "stripe_balance", - "swish", - "twint", - "us_bank_account", - "wechat_pay", - "zip", - ] - ] - ] - """ - The list of payment method types to exclude from use with this payment. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - fx_quote: NotRequired[str] - """ - The FX rate in the quote is validated and used to convert the presentment amount to the settlement amount. - """ - hooks: NotRequired["PaymentIntentService.CreateParamsHooks"] - """ - Automations to be run during the PaymentIntent lifecycle - """ - mandate: NotRequired[str] - """ - ID of the mandate that's used for this payment. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). - """ - mandate_data: NotRequired[ - "Literal['']|PaymentIntentService.CreateParamsMandateData" - ] - """ - This hash contains details about the Mandate to create. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - off_session: NotRequired["bool|Literal['one_off', 'recurring']"] - """ - Set to `true` to indicate that the customer isn't in your checkout flow during this payment attempt and can't authenticate. Use this parameter in scenarios where you collect card details and [charge them later](https://stripe.com/docs/payments/cards/charging-saved-cards). This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). - """ - on_behalf_of: NotRequired[str] - """ - The Stripe account ID that these funds are intended for. Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). - """ - payment_details: NotRequired[ - "PaymentIntentService.CreateParamsPaymentDetails" - ] - """ - Provides industry-specific information about the charge. - """ - payment_method: NotRequired[str] - """ - ID of the payment method (a PaymentMethod, Card, or [compatible Source](https://stripe.com/docs/payments/payment-methods#compatibility) object) to attach to this PaymentIntent. - - If you don't provide the `payment_method` parameter or the `source` parameter with `confirm=true`, `source` automatically populates with `customer.default_source` to improve migration for users of the Charges API. We recommend that you explicitly provide the `payment_method` moving forward. - If the payment method is attached to a Customer, you must also provide the ID of that Customer as the [customer](https://stripe.com/docs/api#create_payment_intent-customer) parameter of this PaymentIntent. - end - """ - payment_method_configuration: NotRequired[str] - """ - The ID of the [payment method configuration](https://stripe.com/docs/api/payment_method_configurations) to use with this PaymentIntent. - """ - payment_method_data: NotRequired[ - "PaymentIntentService.CreateParamsPaymentMethodData" - ] - """ - If provided, this hash will be used to create a PaymentMethod. The new PaymentMethod will appear - in the [payment_method](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-payment_method) - property on the PaymentIntent. - """ - payment_method_options: NotRequired[ - "PaymentIntentService.CreateParamsPaymentMethodOptions" - ] - """ - Payment method-specific configuration for this PaymentIntent. - """ - payment_method_types: NotRequired[List[str]] - """ - The list of payment method types (for example, a card) that this PaymentIntent can use. If you don't provide this, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). A list of valid payment method types can be found [here](https://docs.stripe.com/api/payment_methods/object#payment_method_object-type). - """ - radar_options: NotRequired[ - "PaymentIntentService.CreateParamsRadarOptions" - ] - """ - Options to configure Radar. Learn more about [Radar Sessions](https://stripe.com/docs/radar/radar-session). - """ - receipt_email: NotRequired[str] - """ - Email address to send the receipt to. If you specify `receipt_email` for a payment in live mode, you send a receipt regardless of your [email settings](https://dashboard.stripe.com/account/emails). - """ - return_url: NotRequired[str] - """ - The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). - """ - secret_key_confirmation: NotRequired[Literal["optional", "required"]] - """ - Indicates whether confirmation for this PaymentIntent using a secret key is `required` or `optional`. - """ - setup_future_usage: NotRequired[Literal["off_session", "on_session"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - """ - shipping: NotRequired["PaymentIntentService.CreateParamsShipping"] - """ - Shipping information for this PaymentIntent. - """ - statement_descriptor: NotRequired[str] - """ - Text that appears on the customer's statement as the statement descriptor for a non-card charge. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see [the Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors). - - Setting this value for a card charge returns an error. For card charges, set the [statement_descriptor_suffix](https://docs.stripe.com/get-started/account/statement-descriptors#dynamic) instead. - """ - statement_descriptor_suffix: NotRequired[str] - """ - Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. - """ - transfer_data: NotRequired[ - "PaymentIntentService.CreateParamsTransferData" - ] - """ - The parameters that you can use to automatically create a Transfer. - Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). - """ - transfer_group: NotRequired[str] - """ - A string that identifies the resulting payment as part of a group. Learn more about the [use case for connected accounts](https://stripe.com/docs/connect/separate-charges-and-transfers). - """ - use_stripe_sdk: NotRequired[bool] - """ - Set to `true` when confirming server-side and using Stripe.js, iOS, or Android client-side SDKs to handle the next actions. - """ - - class CreateParamsAmountDetails(TypedDict): - discount_amount: NotRequired["Literal['']|int"] - """ - The total discount applied on the transaction. - """ - line_items: NotRequired[ - "Literal['']|List[PaymentIntentService.CreateParamsAmountDetailsLineItem]" - ] - """ - A list of line items, each containing information about a product in the PaymentIntent. There is a maximum of 100 line items. - """ - shipping: NotRequired[ - "Literal['']|PaymentIntentService.CreateParamsAmountDetailsShipping" - ] - """ - Contains information about the shipping portion of the amount. - """ - tax: NotRequired[ - "Literal['']|PaymentIntentService.CreateParamsAmountDetailsTax" - ] - """ - Contains information about the tax portion of the amount. - """ - - class CreateParamsAmountDetailsLineItem(TypedDict): - discount_amount: NotRequired[int] - """ - The amount an item was discounted for. Positive integer. - """ - payment_method_options: NotRequired[ - "PaymentIntentService.CreateParamsAmountDetailsLineItemPaymentMethodOptions" - ] - """ - Payment method-specific information for line items. - """ - product_code: NotRequired[str] - """ - Unique identifier of the product. At most 12 characters long. - """ - product_name: str - """ - Name of the product. At most 100 characters long. - """ - quantity: int - """ - Number of items of the product. Positive integer. - """ - tax: NotRequired[ - "PaymentIntentService.CreateParamsAmountDetailsLineItemTax" - ] - """ - Contains information about the tax on the item. - """ - unit_cost: int - """ - Cost of the product. Non-negative integer. - """ - unit_of_measure: NotRequired[str] - """ - A unit of measure for the line item, such as gallons, feet, meters, etc. - """ - - class CreateParamsAmountDetailsLineItemPaymentMethodOptions(TypedDict): - card: NotRequired[ - "PaymentIntentService.CreateParamsAmountDetailsLineItemPaymentMethodOptionsCard" - ] - """ - This sub-hash contains line item details that are specific to `card` payment method." - """ - card_present: NotRequired[ - "PaymentIntentService.CreateParamsAmountDetailsLineItemPaymentMethodOptionsCardPresent" - ] - """ - This sub-hash contains line item details that are specific to `card_present` payment method." - """ - klarna: NotRequired[ - "PaymentIntentService.CreateParamsAmountDetailsLineItemPaymentMethodOptionsKlarna" - ] - """ - This sub-hash contains line item details that are specific to `klarna` payment method." - """ - paypal: NotRequired[ - "PaymentIntentService.CreateParamsAmountDetailsLineItemPaymentMethodOptionsPaypal" - ] - """ - This sub-hash contains line item details that are specific to `paypal` payment method." - """ - - class CreateParamsAmountDetailsLineItemPaymentMethodOptionsCard(TypedDict): - commodity_code: NotRequired[str] - """ - Identifier that categorizes the items being purchased using a standardized commodity scheme such as (but not limited to) UNSPSC, NAICS, NAPCS, etc. - """ - - class CreateParamsAmountDetailsLineItemPaymentMethodOptionsCardPresent( - TypedDict, - ): - commodity_code: NotRequired[str] - """ - Identifier that categorizes the items being purchased using a standardized commodity scheme such as (but not limited to) UNSPSC, NAICS, NAPCS, etc. - """ - - class CreateParamsAmountDetailsLineItemPaymentMethodOptionsKlarna( - TypedDict, - ): - image_url: NotRequired[str] - """ - URL to an image for the product. Max length, 4096 characters. - """ - product_url: NotRequired[str] - """ - URL to the product page. Max length, 4096 characters. - """ - subscription_reference: NotRequired[str] - """ - Reference for the subscription this line item is for. - """ - - class CreateParamsAmountDetailsLineItemPaymentMethodOptionsPaypal( - TypedDict, - ): - category: NotRequired[ - Literal["digital_goods", "donation", "physical_goods"] - ] - """ - Type of the line item. - """ - description: NotRequired[str] - """ - Description of the line item. - """ - sold_by: NotRequired[str] - """ - The Stripe account ID of the connected account that sells the item. - """ - - class CreateParamsAmountDetailsLineItemTax(TypedDict): - total_tax_amount: int - """ - The total tax on an item. Non-negative integer. - """ - - class CreateParamsAmountDetailsShipping(TypedDict): - amount: NotRequired["Literal['']|int"] - """ - Portion of the amount that is for shipping. - """ - from_postal_code: NotRequired["Literal['']|str"] - """ - The postal code that represents the shipping source. - """ - to_postal_code: NotRequired["Literal['']|str"] - """ - The postal code that represents the shipping destination. - """ - - class CreateParamsAmountDetailsTax(TypedDict): - total_tax_amount: int - """ - Total portion of the amount that is for tax. - """ - - class CreateParamsAutomaticPaymentMethods(TypedDict): - allow_redirects: NotRequired[Literal["always", "never"]] - """ - Controls whether this PaymentIntent will accept redirect-based payment methods. - - Redirect-based payment methods may require your customer to be redirected to a payment method's app or site for authentication or additional steps. To [confirm](https://stripe.com/docs/api/payment_intents/confirm) this PaymentIntent, you may be required to provide a `return_url` to redirect customers back to your site after they authenticate or complete the payment. - """ - enabled: bool - """ - Whether this feature is enabled. - """ - - class CreateParamsHooks(TypedDict): - inputs: NotRequired["PaymentIntentService.CreateParamsHooksInputs"] - """ - Arguments passed in automations - """ - - class CreateParamsHooksInputs(TypedDict): - tax: NotRequired["PaymentIntentService.CreateParamsHooksInputsTax"] - """ - Tax arguments for automations - """ - - class CreateParamsHooksInputsTax(TypedDict): - calculation: Union[Literal[""], str] - """ - The [TaxCalculation](https://stripe.com/docs/api/tax/calculations) id - """ - - class CreateParamsMandateData(TypedDict): - customer_acceptance: ( - "PaymentIntentService.CreateParamsMandateDataCustomerAcceptance" - ) - """ - This hash contains details about the customer acceptance of the Mandate. - """ - - class CreateParamsMandateDataCustomerAcceptance(TypedDict): - accepted_at: NotRequired[int] - """ - The time at which the customer accepted the Mandate. - """ - offline: NotRequired[ - "PaymentIntentService.CreateParamsMandateDataCustomerAcceptanceOffline" - ] - """ - If this is a Mandate accepted offline, this hash contains details about the offline acceptance. - """ - online: NotRequired[ - "PaymentIntentService.CreateParamsMandateDataCustomerAcceptanceOnline" - ] - """ - If this is a Mandate accepted online, this hash contains details about the online acceptance. - """ - type: Literal["offline", "online"] - """ - The type of customer acceptance information included with the Mandate. One of `online` or `offline`. - """ - - class CreateParamsMandateDataCustomerAcceptanceOffline(TypedDict): - pass - - class CreateParamsMandateDataCustomerAcceptanceOnline(TypedDict): - ip_address: str - """ - The IP address from which the Mandate was accepted by the customer. - """ - user_agent: str - """ - The user agent of the browser from which the Mandate was accepted by the customer. - """ - - class CreateParamsPaymentDetails(TypedDict): - car_rental: NotRequired[ - "PaymentIntentService.CreateParamsPaymentDetailsCarRental" - ] - """ - Car rental details for this PaymentIntent. - """ - customer_reference: NotRequired["Literal['']|str"] - """ - Some customers might be required by their company or organization to provide this information. If so, provide this value. Otherwise you can ignore this field. - """ - event_details: NotRequired[ - "PaymentIntentService.CreateParamsPaymentDetailsEventDetails" - ] - """ - Event details for this PaymentIntent - """ - flight: NotRequired[ - "PaymentIntentService.CreateParamsPaymentDetailsFlight" - ] - """ - Flight reservation details for this PaymentIntent - """ - lodging: NotRequired[ - "PaymentIntentService.CreateParamsPaymentDetailsLodging" - ] - """ - Lodging reservation details for this PaymentIntent - """ - order_reference: NotRequired["Literal['']|str"] - """ - A unique value assigned by the business to identify the transaction. - """ - subscription: NotRequired[ - "PaymentIntentService.CreateParamsPaymentDetailsSubscription" - ] - """ - Subscription details for this PaymentIntent - """ - - class CreateParamsPaymentDetailsCarRental(TypedDict): - affiliate: NotRequired[ - "PaymentIntentService.CreateParamsPaymentDetailsCarRentalAffiliate" - ] - """ - Affiliate details for this purchase. - """ - booking_number: str - """ - The booking number associated with the car rental. - """ - car_class_code: NotRequired[str] - """ - Class code of the car. - """ - car_make: NotRequired[str] - """ - Make of the car. - """ - car_model: NotRequired[str] - """ - Model of the car. - """ - company: NotRequired[str] - """ - The name of the rental car company. - """ - customer_service_phone_number: NotRequired[str] - """ - The customer service phone number of the car rental company. - """ - days_rented: int - """ - Number of days the car is being rented. - """ - delivery: NotRequired[ - "PaymentIntentService.CreateParamsPaymentDetailsCarRentalDelivery" - ] - """ - Delivery details for this purchase. - """ - distance: NotRequired[ - "PaymentIntentService.CreateParamsPaymentDetailsCarRentalDistance" - ] - """ - The details of the distance traveled during the rental period. - """ - drivers: NotRequired[ - List[ - "PaymentIntentService.CreateParamsPaymentDetailsCarRentalDriver" - ] - ] - """ - The details of the passengers in the travel reservation - """ - extra_charges: NotRequired[ - List[ - Literal[ - "extra_mileage", - "gas", - "late_return", - "one_way_service", - "parking_violation", - ] - ] - ] - """ - List of additional charges being billed. - """ - no_show: NotRequired[bool] - """ - Indicates if the customer did not keep nor cancel their booking. - """ - pickup_address: NotRequired[ - "PaymentIntentService.CreateParamsPaymentDetailsCarRentalPickupAddress" - ] - """ - Car pick-up address. - """ - pickup_at: int - """ - Car pick-up time. Measured in seconds since the Unix epoch. - """ - pickup_location_name: NotRequired[str] - """ - Name of the pickup location. - """ - rate_amount: NotRequired[int] - """ - Rental rate. - """ - rate_interval: NotRequired[Literal["day", "month", "week"]] - """ - The frequency at which the rate amount is applied. One of `day`, `week` or `month` - """ - renter_name: NotRequired[str] - """ - The name of the person or entity renting the car. - """ - return_address: NotRequired[ - "PaymentIntentService.CreateParamsPaymentDetailsCarRentalReturnAddress" - ] - """ - Car return address. - """ - return_at: int - """ - Car return time. Measured in seconds since the Unix epoch. - """ - return_location_name: NotRequired[str] - """ - Name of the return location. - """ - tax_exempt: NotRequired[bool] - """ - Indicates whether the goods or services are tax-exempt or tax is not collected. - """ - vehicle_identification_number: NotRequired[str] - """ - The vehicle identification number. - """ - - class CreateParamsPaymentDetailsCarRentalAffiliate(TypedDict): - name: str - """ - The name of the affiliate that originated the purchase. - """ - - class CreateParamsPaymentDetailsCarRentalDelivery(TypedDict): - mode: NotRequired[Literal["email", "phone", "pickup", "post"]] - """ - The delivery method for the payment - """ - recipient: NotRequired[ - "PaymentIntentService.CreateParamsPaymentDetailsCarRentalDeliveryRecipient" - ] - """ - Details of the recipient. - """ - - class CreateParamsPaymentDetailsCarRentalDeliveryRecipient(TypedDict): - email: NotRequired[str] - """ - The email of the recipient the ticket is delivered to. - """ - name: NotRequired[str] - """ - The name of the recipient the ticket is delivered to. - """ - phone: NotRequired[str] - """ - The phone number of the recipient the ticket is delivered to. - """ - - class CreateParamsPaymentDetailsCarRentalDistance(TypedDict): - amount: NotRequired[int] - """ - Distance traveled. - """ - unit: NotRequired[Literal["kilometers", "miles"]] - """ - Unit of measurement for the distance traveled. One of `miles` or `kilometers`. - """ - - class CreateParamsPaymentDetailsCarRentalDriver(TypedDict): - driver_identification_number: NotRequired[str] - """ - Driver's identification number. - """ - driver_tax_number: NotRequired[str] - """ - Driver's tax number. - """ - name: str - """ - Full name of the person or entity on the car reservation. - """ - - class CreateParamsPaymentDetailsCarRentalPickupAddress(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. - """ - - class CreateParamsPaymentDetailsCarRentalReturnAddress(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. - """ - - class CreateParamsPaymentDetailsEventDetails(TypedDict): - access_controlled_venue: NotRequired[bool] - """ - Indicates if the tickets are digitally checked when entering the venue. - """ - address: NotRequired[ - "PaymentIntentService.CreateParamsPaymentDetailsEventDetailsAddress" - ] - """ - The event location's address. - """ - affiliate: NotRequired[ - "PaymentIntentService.CreateParamsPaymentDetailsEventDetailsAffiliate" - ] - """ - Affiliate details for this purchase. - """ - company: NotRequired[str] - """ - The name of the company - """ - delivery: NotRequired[ - "PaymentIntentService.CreateParamsPaymentDetailsEventDetailsDelivery" - ] - """ - Delivery details for this purchase. - """ - ends_at: NotRequired[int] - """ - Event end time. Measured in seconds since the Unix epoch. - """ - genre: NotRequired[str] - """ - Type of the event entertainment (concert, sports event etc) - """ - name: str - """ - The name of the event. - """ - starts_at: NotRequired[int] - """ - Event start time. Measured in seconds since the Unix epoch. - """ - - class CreateParamsPaymentDetailsEventDetailsAddress(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. - """ - - class CreateParamsPaymentDetailsEventDetailsAffiliate(TypedDict): - name: str - """ - The name of the affiliate that originated the purchase. - """ - - class CreateParamsPaymentDetailsEventDetailsDelivery(TypedDict): - mode: NotRequired[Literal["email", "phone", "pickup", "post"]] - """ - The delivery method for the payment - """ - recipient: NotRequired[ - "PaymentIntentService.CreateParamsPaymentDetailsEventDetailsDeliveryRecipient" - ] - """ - Details of the recipient. - """ - - class CreateParamsPaymentDetailsEventDetailsDeliveryRecipient(TypedDict): - email: NotRequired[str] - """ - The email of the recipient the ticket is delivered to. - """ - name: NotRequired[str] - """ - The name of the recipient the ticket is delivered to. - """ - phone: NotRequired[str] - """ - The phone number of the recipient the ticket is delivered to. - """ - - class CreateParamsPaymentDetailsFlight(TypedDict): - affiliate: NotRequired[ - "PaymentIntentService.CreateParamsPaymentDetailsFlightAffiliate" - ] - """ - Affiliate details for this purchase. - """ - agency_number: NotRequired[str] - """ - The agency number (i.e. International Air Transport Association (IATA) agency number) of the travel agency that made the booking. - """ - carrier: NotRequired[str] - """ - The International Air Transport Association (IATA) carrier code of the carrier that issued the ticket. - """ - delivery: NotRequired[ - "PaymentIntentService.CreateParamsPaymentDetailsFlightDelivery" - ] - """ - Delivery details for this purchase. - """ - passenger_name: NotRequired[str] - """ - The name of the person or entity on the reservation. - """ - passengers: NotRequired[ - List[ - "PaymentIntentService.CreateParamsPaymentDetailsFlightPassenger" - ] - ] - """ - The details of the passengers in the travel reservation. - """ - segments: List[ - "PaymentIntentService.CreateParamsPaymentDetailsFlightSegment" - ] - """ - The individual flight segments associated with the trip. - """ - ticket_number: NotRequired[str] - """ - The ticket number associated with the travel reservation. - """ - - class CreateParamsPaymentDetailsFlightAffiliate(TypedDict): - name: str - """ - The name of the affiliate that originated the purchase. - """ - - class CreateParamsPaymentDetailsFlightDelivery(TypedDict): - mode: NotRequired[Literal["email", "phone", "pickup", "post"]] - """ - The delivery method for the payment - """ - recipient: NotRequired[ - "PaymentIntentService.CreateParamsPaymentDetailsFlightDeliveryRecipient" - ] - """ - Details of the recipient. - """ - - class CreateParamsPaymentDetailsFlightDeliveryRecipient(TypedDict): - email: NotRequired[str] - """ - The email of the recipient the ticket is delivered to. - """ - name: NotRequired[str] - """ - The name of the recipient the ticket is delivered to. - """ - phone: NotRequired[str] - """ - The phone number of the recipient the ticket is delivered to. - """ - - class CreateParamsPaymentDetailsFlightPassenger(TypedDict): - name: str - """ - Full name of the person or entity on the flight reservation. - """ - - class CreateParamsPaymentDetailsFlightSegment(TypedDict): - amount: NotRequired[int] - """ - The flight segment amount. - """ - arrival_airport: NotRequired[str] - """ - The International Air Transport Association (IATA) airport code for the arrival airport. - """ - arrives_at: NotRequired[int] - """ - The arrival time for the flight segment. Measured in seconds since the Unix epoch. - """ - carrier: NotRequired[str] - """ - The International Air Transport Association (IATA) carrier code of the carrier operating the flight segment. - """ - departs_at: int - """ - The departure time for the flight segment. Measured in seconds since the Unix epoch. - """ - departure_airport: NotRequired[str] - """ - The International Air Transport Association (IATA) airport code for the departure airport. - """ - flight_number: NotRequired[str] - """ - The flight number associated with the segment - """ - service_class: NotRequired[ - Literal["business", "economy", "first", "premium_economy"] - ] - """ - The fare class for the segment. - """ - - class CreateParamsPaymentDetailsLodging(TypedDict): - address: NotRequired[ - "PaymentIntentService.CreateParamsPaymentDetailsLodgingAddress" - ] - """ - The lodging location's address. - """ - adults: NotRequired[int] - """ - The number of adults on the booking - """ - affiliate: NotRequired[ - "PaymentIntentService.CreateParamsPaymentDetailsLodgingAffiliate" - ] - """ - Affiliate details for this purchase. - """ - booking_number: NotRequired[str] - """ - The booking number associated with the lodging reservation. - """ - category: NotRequired[Literal["hotel", "vacation_rental"]] - """ - The lodging category - """ - checkin_at: int - """ - Lodging check-in time. Measured in seconds since the Unix epoch. - """ - checkout_at: int - """ - Lodging check-out time. Measured in seconds since the Unix epoch. - """ - customer_service_phone_number: NotRequired[str] - """ - The customer service phone number of the lodging company. - """ - daily_room_rate_amount: NotRequired[int] - """ - The daily lodging room rate. - """ - delivery: NotRequired[ - "PaymentIntentService.CreateParamsPaymentDetailsLodgingDelivery" - ] - """ - Delivery details for this purchase. - """ - extra_charges: NotRequired[ - List[ - Literal[ - "gift_shop", - "laundry", - "mini_bar", - "other", - "restaurant", - "telephone", - ] - ] - ] - """ - List of additional charges being billed. - """ - fire_safety_act_compliance: NotRequired[bool] - """ - Indicates whether the lodging location is compliant with the Fire Safety Act. - """ - name: NotRequired[str] - """ - The name of the lodging location. - """ - no_show: NotRequired[bool] - """ - Indicates if the customer did not keep their booking while failing to cancel the reservation. - """ - number_of_rooms: NotRequired[int] - """ - The number of rooms on the booking - """ - passengers: NotRequired[ - List[ - "PaymentIntentService.CreateParamsPaymentDetailsLodgingPassenger" - ] - ] - """ - The details of the passengers in the travel reservation - """ - property_phone_number: NotRequired[str] - """ - The phone number of the lodging location. - """ - room_class: NotRequired[str] - """ - The room class for this purchase. - """ - room_nights: NotRequired[int] - """ - The number of room nights - """ - total_room_tax_amount: NotRequired[int] - """ - The total tax amount associating with the room reservation. - """ - total_tax_amount: NotRequired[int] - """ - The total tax amount - """ - - class CreateParamsPaymentDetailsLodgingAddress(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. - """ - - class CreateParamsPaymentDetailsLodgingAffiliate(TypedDict): - name: str - """ - The name of the affiliate that originated the purchase. - """ - - class CreateParamsPaymentDetailsLodgingDelivery(TypedDict): - mode: NotRequired[Literal["email", "phone", "pickup", "post"]] - """ - The delivery method for the payment - """ - recipient: NotRequired[ - "PaymentIntentService.CreateParamsPaymentDetailsLodgingDeliveryRecipient" - ] - """ - Details of the recipient. - """ - - class CreateParamsPaymentDetailsLodgingDeliveryRecipient(TypedDict): - email: NotRequired[str] - """ - The email of the recipient the ticket is delivered to. - """ - name: NotRequired[str] - """ - The name of the recipient the ticket is delivered to. - """ - phone: NotRequired[str] - """ - The phone number of the recipient the ticket is delivered to. - """ - - class CreateParamsPaymentDetailsLodgingPassenger(TypedDict): - name: str - """ - Full name of the person or entity on the lodging reservation. - """ - - class CreateParamsPaymentDetailsSubscription(TypedDict): - affiliate: NotRequired[ - "PaymentIntentService.CreateParamsPaymentDetailsSubscriptionAffiliate" - ] - """ - Affiliate details for this purchase. - """ - auto_renewal: NotRequired[bool] - """ - Info whether the subscription will be auto renewed upon expiry. - """ - billing_interval: NotRequired[ - "PaymentIntentService.CreateParamsPaymentDetailsSubscriptionBillingInterval" - ] - """ - Subscription billing details for this purchase. - """ - ends_at: NotRequired[int] - """ - Subscription end time. Measured in seconds since the Unix epoch. - """ - name: str - """ - Name of the product on subscription. e.g. Apple Music Subscription - """ - starts_at: NotRequired[int] - """ - Subscription start time. Measured in seconds since the Unix epoch. - """ - - class CreateParamsPaymentDetailsSubscriptionAffiliate(TypedDict): - name: str - """ - The name of the affiliate that originated the purchase. - """ - - class CreateParamsPaymentDetailsSubscriptionBillingInterval(TypedDict): - count: int - """ - The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. - """ - interval: Literal["day", "month", "week", "year"] - """ - Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. - """ - - class CreateParamsPaymentMethodData(TypedDict): - acss_debit: NotRequired[ - "PaymentIntentService.CreateParamsPaymentMethodDataAcssDebit" - ] - """ - If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method. - """ - affirm: NotRequired[ - "PaymentIntentService.CreateParamsPaymentMethodDataAffirm" - ] - """ - If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method. - """ - afterpay_clearpay: NotRequired[ - "PaymentIntentService.CreateParamsPaymentMethodDataAfterpayClearpay" - ] - """ - If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method. - """ - alipay: NotRequired[ - "PaymentIntentService.CreateParamsPaymentMethodDataAlipay" - ] - """ - If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. - """ - allow_redisplay: NotRequired[ - Literal["always", "limited", "unspecified"] - ] - """ - This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`. - """ - alma: NotRequired[ - "PaymentIntentService.CreateParamsPaymentMethodDataAlma" - ] - """ - If this is a Alma PaymentMethod, this hash contains details about the Alma payment method. - """ - amazon_pay: NotRequired[ - "PaymentIntentService.CreateParamsPaymentMethodDataAmazonPay" - ] - """ - If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method. - """ - au_becs_debit: NotRequired[ - "PaymentIntentService.CreateParamsPaymentMethodDataAuBecsDebit" - ] - """ - If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. - """ - bacs_debit: NotRequired[ - "PaymentIntentService.CreateParamsPaymentMethodDataBacsDebit" - ] - """ - If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account. - """ - bancontact: NotRequired[ - "PaymentIntentService.CreateParamsPaymentMethodDataBancontact" - ] - """ - If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method. - """ - billie: NotRequired[ - "PaymentIntentService.CreateParamsPaymentMethodDataBillie" - ] - """ - If this is a `billie` PaymentMethod, this hash contains details about the Billie payment method. - """ - billing_details: NotRequired[ - "PaymentIntentService.CreateParamsPaymentMethodDataBillingDetails" - ] - """ - Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. - """ - blik: NotRequired[ - "PaymentIntentService.CreateParamsPaymentMethodDataBlik" - ] - """ - If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method. - """ - boleto: NotRequired[ - "PaymentIntentService.CreateParamsPaymentMethodDataBoleto" - ] - """ - If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method. - """ - cashapp: NotRequired[ - "PaymentIntentService.CreateParamsPaymentMethodDataCashapp" - ] - """ - If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. - """ - crypto: NotRequired[ - "PaymentIntentService.CreateParamsPaymentMethodDataCrypto" - ] - """ - If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment method. - """ - customer_balance: NotRequired[ - "PaymentIntentService.CreateParamsPaymentMethodDataCustomerBalance" - ] - """ - If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. - """ - eps: NotRequired[ - "PaymentIntentService.CreateParamsPaymentMethodDataEps" - ] - """ - If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. - """ - fpx: NotRequired[ - "PaymentIntentService.CreateParamsPaymentMethodDataFpx" - ] - """ - If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method. - """ - giropay: NotRequired[ - "PaymentIntentService.CreateParamsPaymentMethodDataGiropay" - ] - """ - If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method. - """ - gopay: NotRequired[ - "PaymentIntentService.CreateParamsPaymentMethodDataGopay" - ] - """ - If this is a Gopay PaymentMethod, this hash contains details about the Gopay payment method. - """ - grabpay: NotRequired[ - "PaymentIntentService.CreateParamsPaymentMethodDataGrabpay" - ] - """ - If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method. - """ - id_bank_transfer: NotRequired[ - "PaymentIntentService.CreateParamsPaymentMethodDataIdBankTransfer" - ] - """ - If this is an `IdBankTransfer` PaymentMethod, this hash contains details about the IdBankTransfer payment method. - """ - ideal: NotRequired[ - "PaymentIntentService.CreateParamsPaymentMethodDataIdeal" - ] - """ - If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. - """ - interac_present: NotRequired[ - "PaymentIntentService.CreateParamsPaymentMethodDataInteracPresent" - ] - """ - If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. - """ - kakao_pay: NotRequired[ - "PaymentIntentService.CreateParamsPaymentMethodDataKakaoPay" - ] - """ - If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method. - """ - klarna: NotRequired[ - "PaymentIntentService.CreateParamsPaymentMethodDataKlarna" - ] - """ - If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method. - """ - konbini: NotRequired[ - "PaymentIntentService.CreateParamsPaymentMethodDataKonbini" - ] - """ - If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. - """ - kr_card: NotRequired[ - "PaymentIntentService.CreateParamsPaymentMethodDataKrCard" - ] - """ - If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method. - """ - link: NotRequired[ - "PaymentIntentService.CreateParamsPaymentMethodDataLink" - ] - """ - If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. - """ - mb_way: NotRequired[ - "PaymentIntentService.CreateParamsPaymentMethodDataMbWay" - ] - """ - If this is a MB WAY PaymentMethod, this hash contains details about the MB WAY payment method. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - mobilepay: NotRequired[ - "PaymentIntentService.CreateParamsPaymentMethodDataMobilepay" - ] - """ - If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method. - """ - multibanco: NotRequired[ - "PaymentIntentService.CreateParamsPaymentMethodDataMultibanco" - ] - """ - If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method. - """ - naver_pay: NotRequired[ - "PaymentIntentService.CreateParamsPaymentMethodDataNaverPay" - ] - """ - If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method. - """ - nz_bank_account: NotRequired[ - "PaymentIntentService.CreateParamsPaymentMethodDataNzBankAccount" - ] - """ - If this is an nz_bank_account PaymentMethod, this hash contains details about the nz_bank_account payment method. - """ - oxxo: NotRequired[ - "PaymentIntentService.CreateParamsPaymentMethodDataOxxo" - ] - """ - If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. - """ - p24: NotRequired[ - "PaymentIntentService.CreateParamsPaymentMethodDataP24" - ] - """ - If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. - """ - pay_by_bank: NotRequired[ - "PaymentIntentService.CreateParamsPaymentMethodDataPayByBank" - ] - """ - If this is a `pay_by_bank` PaymentMethod, this hash contains details about the PayByBank payment method. - """ - payco: NotRequired[ - "PaymentIntentService.CreateParamsPaymentMethodDataPayco" - ] - """ - If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method. - """ - paynow: NotRequired[ - "PaymentIntentService.CreateParamsPaymentMethodDataPaynow" - ] - """ - If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method. - """ - paypal: NotRequired[ - "PaymentIntentService.CreateParamsPaymentMethodDataPaypal" - ] - """ - If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method. - """ - paypay: NotRequired[ - "PaymentIntentService.CreateParamsPaymentMethodDataPaypay" - ] - """ - If this is a `paypay` PaymentMethod, this hash contains details about the PayPay payment method. - """ - payto: NotRequired[ - "PaymentIntentService.CreateParamsPaymentMethodDataPayto" - ] - """ - If this is a `payto` PaymentMethod, this hash contains details about the PayTo payment method. - """ - pix: NotRequired[ - "PaymentIntentService.CreateParamsPaymentMethodDataPix" - ] - """ - If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method. - """ - promptpay: NotRequired[ - "PaymentIntentService.CreateParamsPaymentMethodDataPromptpay" - ] - """ - If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method. - """ - qris: NotRequired[ - "PaymentIntentService.CreateParamsPaymentMethodDataQris" - ] - """ - If this is a `qris` PaymentMethod, this hash contains details about the QRIS payment method. - """ - radar_options: NotRequired[ - "PaymentIntentService.CreateParamsPaymentMethodDataRadarOptions" - ] - """ - Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. - """ - rechnung: NotRequired[ - "PaymentIntentService.CreateParamsPaymentMethodDataRechnung" - ] - """ - If this is a `rechnung` PaymentMethod, this hash contains details about the Rechnung payment method. - """ - revolut_pay: NotRequired[ - "PaymentIntentService.CreateParamsPaymentMethodDataRevolutPay" - ] - """ - If this is a `revolut_pay` PaymentMethod, this hash contains details about the Revolut Pay payment method. - """ - samsung_pay: NotRequired[ - "PaymentIntentService.CreateParamsPaymentMethodDataSamsungPay" - ] - """ - If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method. - """ - satispay: NotRequired[ - "PaymentIntentService.CreateParamsPaymentMethodDataSatispay" - ] - """ - If this is a `satispay` PaymentMethod, this hash contains details about the Satispay payment method. - """ - sepa_debit: NotRequired[ - "PaymentIntentService.CreateParamsPaymentMethodDataSepaDebit" - ] - """ - If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. - """ - shopeepay: NotRequired[ - "PaymentIntentService.CreateParamsPaymentMethodDataShopeepay" - ] - """ - If this is a Shopeepay PaymentMethod, this hash contains details about the Shopeepay payment method. - """ - sofort: NotRequired[ - "PaymentIntentService.CreateParamsPaymentMethodDataSofort" - ] - """ - If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. - """ - stripe_balance: NotRequired[ - "PaymentIntentService.CreateParamsPaymentMethodDataStripeBalance" - ] - """ - This hash contains details about the Stripe balance payment method. - """ - swish: NotRequired[ - "PaymentIntentService.CreateParamsPaymentMethodDataSwish" - ] - """ - If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method. - """ - twint: NotRequired[ - "PaymentIntentService.CreateParamsPaymentMethodDataTwint" - ] - """ - If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method. - """ - type: Literal[ - "acss_debit", - "affirm", - "afterpay_clearpay", - "alipay", - "alma", - "amazon_pay", - "au_becs_debit", - "bacs_debit", - "bancontact", - "billie", - "blik", - "boleto", - "cashapp", - "crypto", - "customer_balance", - "eps", - "fpx", - "giropay", - "gopay", - "grabpay", - "id_bank_transfer", - "ideal", - "kakao_pay", - "klarna", - "konbini", - "kr_card", - "link", - "mb_way", - "mobilepay", - "multibanco", - "naver_pay", - "nz_bank_account", - "oxxo", - "p24", - "pay_by_bank", - "payco", - "paynow", - "paypal", - "paypay", - "payto", - "pix", - "promptpay", - "qris", - "rechnung", - "revolut_pay", - "samsung_pay", - "satispay", - "sepa_debit", - "shopeepay", - "sofort", - "stripe_balance", - "swish", - "twint", - "us_bank_account", - "wechat_pay", - "zip", - ] - """ - The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. - """ - us_bank_account: NotRequired[ - "PaymentIntentService.CreateParamsPaymentMethodDataUsBankAccount" - ] - """ - If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. - """ - wechat_pay: NotRequired[ - "PaymentIntentService.CreateParamsPaymentMethodDataWechatPay" - ] - """ - If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method. - """ - zip: NotRequired[ - "PaymentIntentService.CreateParamsPaymentMethodDataZip" - ] - """ - If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method. - """ - - class CreateParamsPaymentMethodDataAcssDebit(TypedDict): - account_number: str - """ - Customer's bank account number. - """ - institution_number: str - """ - Institution number of the customer's bank. - """ - transit_number: str - """ - Transit number of the customer's bank. - """ - - class CreateParamsPaymentMethodDataAffirm(TypedDict): - pass - - class CreateParamsPaymentMethodDataAfterpayClearpay(TypedDict): - pass - - class CreateParamsPaymentMethodDataAlipay(TypedDict): - pass - - class CreateParamsPaymentMethodDataAlma(TypedDict): - pass - - class CreateParamsPaymentMethodDataAmazonPay(TypedDict): - pass - - class CreateParamsPaymentMethodDataAuBecsDebit(TypedDict): - account_number: str - """ - The account number for the bank account. - """ - bsb_number: str - """ - Bank-State-Branch number of the bank account. - """ - - class CreateParamsPaymentMethodDataBacsDebit(TypedDict): - account_number: NotRequired[str] - """ - Account number of the bank account that the funds will be debited from. - """ - sort_code: NotRequired[str] - """ - Sort code of the bank account. (e.g., `10-20-30`) - """ - - class CreateParamsPaymentMethodDataBancontact(TypedDict): - pass - - class CreateParamsPaymentMethodDataBillie(TypedDict): - pass - - class CreateParamsPaymentMethodDataBillingDetails(TypedDict): - address: NotRequired[ - "Literal['']|PaymentIntentService.CreateParamsPaymentMethodDataBillingDetailsAddress" - ] - """ - Billing address. - """ - email: NotRequired["Literal['']|str"] - """ - Email address. - """ - name: NotRequired["Literal['']|str"] - """ - Full name. - """ - phone: NotRequired["Literal['']|str"] - """ - Billing phone number (including extension). - """ - tax_id: NotRequired[str] - """ - Taxpayer identification number. Used only for transactions between LATAM buyers and non-LATAM sellers. - """ - - class CreateParamsPaymentMethodDataBillingDetailsAddress(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. - """ - - class CreateParamsPaymentMethodDataBlik(TypedDict): - pass - - class CreateParamsPaymentMethodDataBoleto(TypedDict): - tax_id: str - """ - The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers) - """ - - class CreateParamsPaymentMethodDataCashapp(TypedDict): - pass - - class CreateParamsPaymentMethodDataCrypto(TypedDict): - pass - - class CreateParamsPaymentMethodDataCustomerBalance(TypedDict): - pass - - class CreateParamsPaymentMethodDataEps(TypedDict): - bank: NotRequired[ - Literal[ - "arzte_und_apotheker_bank", - "austrian_anadi_bank_ag", - "bank_austria", - "bankhaus_carl_spangler", - "bankhaus_schelhammer_und_schattera_ag", - "bawag_psk_ag", - "bks_bank_ag", - "brull_kallmus_bank_ag", - "btv_vier_lander_bank", - "capital_bank_grawe_gruppe_ag", - "deutsche_bank_ag", - "dolomitenbank", - "easybank_ag", - "erste_bank_und_sparkassen", - "hypo_alpeadriabank_international_ag", - "hypo_bank_burgenland_aktiengesellschaft", - "hypo_noe_lb_fur_niederosterreich_u_wien", - "hypo_oberosterreich_salzburg_steiermark", - "hypo_tirol_bank_ag", - "hypo_vorarlberg_bank_ag", - "marchfelder_bank", - "oberbank_ag", - "raiffeisen_bankengruppe_osterreich", - "schoellerbank_ag", - "sparda_bank_wien", - "volksbank_gruppe", - "volkskreditbank_ag", - "vr_bank_braunau", - ] - ] - """ - The customer's bank. - """ - - class CreateParamsPaymentMethodDataFpx(TypedDict): - account_holder_type: NotRequired[Literal["company", "individual"]] - """ - Account holder type for FPX transaction - """ - bank: Literal[ - "affin_bank", - "agrobank", - "alliance_bank", - "ambank", - "bank_islam", - "bank_muamalat", - "bank_of_china", - "bank_rakyat", - "bsn", - "cimb", - "deutsche_bank", - "hong_leong_bank", - "hsbc", - "kfh", - "maybank2e", - "maybank2u", - "ocbc", - "pb_enterprise", - "public_bank", - "rhb", - "standard_chartered", - "uob", - ] - """ - The customer's bank. - """ - - class CreateParamsPaymentMethodDataGiropay(TypedDict): - pass - - class CreateParamsPaymentMethodDataGopay(TypedDict): - pass - - class CreateParamsPaymentMethodDataGrabpay(TypedDict): - pass - - class CreateParamsPaymentMethodDataIdBankTransfer(TypedDict): - bank: NotRequired[Literal["bca", "bni", "bri", "cimb", "permata"]] - """ - Bank where the account is held. - """ - - class CreateParamsPaymentMethodDataIdeal(TypedDict): - bank: NotRequired[ - Literal[ - "abn_amro", - "asn_bank", - "bunq", - "buut", - "handelsbanken", - "ing", - "knab", - "moneyou", - "n26", - "nn", - "rabobank", - "regiobank", - "revolut", - "sns_bank", - "triodos_bank", - "van_lanschot", - "yoursafe", - ] - ] - """ - The customer's bank. Only use this parameter for existing customers. Don't use it for new customers. - """ - - class CreateParamsPaymentMethodDataInteracPresent(TypedDict): - pass - - class CreateParamsPaymentMethodDataKakaoPay(TypedDict): - pass - - class CreateParamsPaymentMethodDataKlarna(TypedDict): - dob: NotRequired[ - "PaymentIntentService.CreateParamsPaymentMethodDataKlarnaDob" - ] - """ - Customer's date of birth - """ - - class CreateParamsPaymentMethodDataKlarnaDob(TypedDict): - day: int - """ - The day of birth, between 1 and 31. - """ - month: int - """ - The month of birth, between 1 and 12. - """ - year: int - """ - The four-digit year of birth. - """ - - class CreateParamsPaymentMethodDataKonbini(TypedDict): - pass - - class CreateParamsPaymentMethodDataKrCard(TypedDict): - pass - - class CreateParamsPaymentMethodDataLink(TypedDict): - pass - - class CreateParamsPaymentMethodDataMbWay(TypedDict): - pass - - class CreateParamsPaymentMethodDataMobilepay(TypedDict): - pass - - class CreateParamsPaymentMethodDataMultibanco(TypedDict): - pass - - class CreateParamsPaymentMethodDataNaverPay(TypedDict): - funding: NotRequired[Literal["card", "points"]] - """ - Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`. - """ - - class CreateParamsPaymentMethodDataNzBankAccount(TypedDict): - account_holder_name: NotRequired[str] - """ - The name on the bank account. Only required if the account holder name is different from the name of the authorized signatory collected in the PaymentMethod's billing details. - """ - account_number: str - """ - The account number for the bank account. - """ - bank_code: str - """ - The numeric code for the bank account's bank. - """ - branch_code: str - """ - The numeric code for the bank account's bank branch. - """ - reference: NotRequired[str] - suffix: str - """ - The suffix of the bank account number. - """ - - class CreateParamsPaymentMethodDataOxxo(TypedDict): - pass - - class CreateParamsPaymentMethodDataP24(TypedDict): - bank: NotRequired[ - Literal[ - "alior_bank", - "bank_millennium", - "bank_nowy_bfg_sa", - "bank_pekao_sa", - "banki_spbdzielcze", - "blik", - "bnp_paribas", - "boz", - "citi_handlowy", - "credit_agricole", - "envelobank", - "etransfer_pocztowy24", - "getin_bank", - "ideabank", - "ing", - "inteligo", - "mbank_mtransfer", - "nest_przelew", - "noble_pay", - "pbac_z_ipko", - "plus_bank", - "santander_przelew24", - "tmobile_usbugi_bankowe", - "toyota_bank", - "velobank", - "volkswagen_bank", - ] - ] - """ - The customer's bank. - """ - - class CreateParamsPaymentMethodDataPayByBank(TypedDict): - pass - - class CreateParamsPaymentMethodDataPayco(TypedDict): - pass - - class CreateParamsPaymentMethodDataPaynow(TypedDict): - pass - - class CreateParamsPaymentMethodDataPaypal(TypedDict): - pass - - class CreateParamsPaymentMethodDataPaypay(TypedDict): - pass - - class CreateParamsPaymentMethodDataPayto(TypedDict): - account_number: NotRequired[str] - """ - The account number for the bank account. - """ - bsb_number: NotRequired[str] - """ - Bank-State-Branch number of the bank account. - """ - pay_id: NotRequired[str] - """ - The PayID alias for the bank account. - """ - - class CreateParamsPaymentMethodDataPix(TypedDict): - pass - - class CreateParamsPaymentMethodDataPromptpay(TypedDict): - pass - - class CreateParamsPaymentMethodDataQris(TypedDict): - pass - - class CreateParamsPaymentMethodDataRadarOptions(TypedDict): - session: NotRequired[str] - """ - A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. - """ - - class CreateParamsPaymentMethodDataRechnung(TypedDict): - dob: "PaymentIntentService.CreateParamsPaymentMethodDataRechnungDob" - """ - Customer's date of birth - """ - - class CreateParamsPaymentMethodDataRechnungDob(TypedDict): - day: int - """ - The day of birth, between 1 and 31. - """ - month: int - """ - The month of birth, between 1 and 12. - """ - year: int - """ - The four-digit year of birth. - """ - - class CreateParamsPaymentMethodDataRevolutPay(TypedDict): - pass - - class CreateParamsPaymentMethodDataSamsungPay(TypedDict): - pass - - class CreateParamsPaymentMethodDataSatispay(TypedDict): - pass - - class CreateParamsPaymentMethodDataSepaDebit(TypedDict): - iban: str - """ - IBAN of the bank account. - """ - - class CreateParamsPaymentMethodDataShopeepay(TypedDict): - pass - - class CreateParamsPaymentMethodDataSofort(TypedDict): - country: Literal["AT", "BE", "DE", "ES", "IT", "NL"] - """ - Two-letter ISO code representing the country the bank account is located in. - """ - - class CreateParamsPaymentMethodDataStripeBalance(TypedDict): - account: NotRequired[str] - """ - The connected account ID whose Stripe balance to use as the source of payment - """ - source_type: NotRequired[Literal["bank_account", "card", "fpx"]] - """ - The [source_type](https://docs.stripe.com/api/balance/balance_object#balance_object-available-source_types) of the balance - """ - - class CreateParamsPaymentMethodDataSwish(TypedDict): - pass - - class CreateParamsPaymentMethodDataTwint(TypedDict): - pass - - class CreateParamsPaymentMethodDataUsBankAccount(TypedDict): - account_holder_type: NotRequired[Literal["company", "individual"]] - """ - Account holder type: individual or company. - """ - account_number: NotRequired[str] - """ - Account number of the bank account. - """ - account_type: NotRequired[Literal["checking", "savings"]] - """ - Account type: checkings or savings. Defaults to checking if omitted. - """ - financial_connections_account: NotRequired[str] - """ - The ID of a Financial Connections Account to use as a payment method. - """ - routing_number: NotRequired[str] - """ - Routing number of the bank account. - """ - - class CreateParamsPaymentMethodDataWechatPay(TypedDict): - pass - - class CreateParamsPaymentMethodDataZip(TypedDict): - pass - - class CreateParamsPaymentMethodOptions(TypedDict): - acss_debit: NotRequired[ - "Literal['']|PaymentIntentService.CreateParamsPaymentMethodOptionsAcssDebit" - ] - """ - If this is a `acss_debit` PaymentMethod, this sub-hash contains details about the ACSS Debit payment method options. - """ - affirm: NotRequired[ - "Literal['']|PaymentIntentService.CreateParamsPaymentMethodOptionsAffirm" - ] - """ - If this is an `affirm` PaymentMethod, this sub-hash contains details about the Affirm payment method options. - """ - afterpay_clearpay: NotRequired[ - "Literal['']|PaymentIntentService.CreateParamsPaymentMethodOptionsAfterpayClearpay" - ] - """ - If this is a `afterpay_clearpay` PaymentMethod, this sub-hash contains details about the Afterpay Clearpay payment method options. - """ - alipay: NotRequired[ - "Literal['']|PaymentIntentService.CreateParamsPaymentMethodOptionsAlipay" - ] - """ - If this is a `alipay` PaymentMethod, this sub-hash contains details about the Alipay payment method options. - """ - alma: NotRequired[ - "Literal['']|PaymentIntentService.CreateParamsPaymentMethodOptionsAlma" - ] - """ - If this is a `alma` PaymentMethod, this sub-hash contains details about the Alma payment method options. - """ - amazon_pay: NotRequired[ - "Literal['']|PaymentIntentService.CreateParamsPaymentMethodOptionsAmazonPay" - ] - """ - If this is a `amazon_pay` PaymentMethod, this sub-hash contains details about the Amazon Pay payment method options. - """ - au_becs_debit: NotRequired[ - "Literal['']|PaymentIntentService.CreateParamsPaymentMethodOptionsAuBecsDebit" - ] - """ - If this is a `au_becs_debit` PaymentMethod, this sub-hash contains details about the AU BECS Direct Debit payment method options. - """ - bacs_debit: NotRequired[ - "Literal['']|PaymentIntentService.CreateParamsPaymentMethodOptionsBacsDebit" - ] - """ - If this is a `bacs_debit` PaymentMethod, this sub-hash contains details about the BACS Debit payment method options. - """ - bancontact: NotRequired[ - "Literal['']|PaymentIntentService.CreateParamsPaymentMethodOptionsBancontact" - ] - """ - If this is a `bancontact` PaymentMethod, this sub-hash contains details about the Bancontact payment method options. - """ - billie: NotRequired[ - "Literal['']|PaymentIntentService.CreateParamsPaymentMethodOptionsBillie" - ] - """ - If this is a `billie` PaymentMethod, this sub-hash contains details about the Billie payment method options. - """ - blik: NotRequired[ - "Literal['']|PaymentIntentService.CreateParamsPaymentMethodOptionsBlik" - ] - """ - If this is a `blik` PaymentMethod, this sub-hash contains details about the BLIK payment method options. - """ - boleto: NotRequired[ - "Literal['']|PaymentIntentService.CreateParamsPaymentMethodOptionsBoleto" - ] - """ - If this is a `boleto` PaymentMethod, this sub-hash contains details about the Boleto payment method options. - """ - card: NotRequired[ - "Literal['']|PaymentIntentService.CreateParamsPaymentMethodOptionsCard" - ] - """ - Configuration for any card payments attempted on this PaymentIntent. - """ - card_present: NotRequired[ - "Literal['']|PaymentIntentService.CreateParamsPaymentMethodOptionsCardPresent" - ] - """ - If this is a `card_present` PaymentMethod, this sub-hash contains details about the Card Present payment method options. - """ - cashapp: NotRequired[ - "Literal['']|PaymentIntentService.CreateParamsPaymentMethodOptionsCashapp" - ] - """ - If this is a `cashapp` PaymentMethod, this sub-hash contains details about the Cash App Pay payment method options. - """ - crypto: NotRequired[ - "Literal['']|PaymentIntentService.CreateParamsPaymentMethodOptionsCrypto" - ] - """ - If this is a `crypto` PaymentMethod, this sub-hash contains details about the Crypto payment method options. - """ - customer_balance: NotRequired[ - "Literal['']|PaymentIntentService.CreateParamsPaymentMethodOptionsCustomerBalance" - ] - """ - If this is a `customer balance` PaymentMethod, this sub-hash contains details about the customer balance payment method options. - """ - eps: NotRequired[ - "Literal['']|PaymentIntentService.CreateParamsPaymentMethodOptionsEps" - ] - """ - If this is a `eps` PaymentMethod, this sub-hash contains details about the EPS payment method options. - """ - fpx: NotRequired[ - "Literal['']|PaymentIntentService.CreateParamsPaymentMethodOptionsFpx" - ] - """ - If this is a `fpx` PaymentMethod, this sub-hash contains details about the FPX payment method options. - """ - giropay: NotRequired[ - "Literal['']|PaymentIntentService.CreateParamsPaymentMethodOptionsGiropay" - ] - """ - If this is a `giropay` PaymentMethod, this sub-hash contains details about the Giropay payment method options. - """ - gopay: NotRequired[ - "Literal['']|PaymentIntentService.CreateParamsPaymentMethodOptionsGopay" - ] - """ - If this is a `gopay` PaymentMethod, this sub-hash contains details about the Gopay payment method options. - """ - grabpay: NotRequired[ - "Literal['']|PaymentIntentService.CreateParamsPaymentMethodOptionsGrabpay" - ] - """ - If this is a `grabpay` PaymentMethod, this sub-hash contains details about the Grabpay payment method options. - """ - id_bank_transfer: NotRequired[ - "Literal['']|PaymentIntentService.CreateParamsPaymentMethodOptionsIdBankTransfer" - ] - """ - If this is a `id_bank_transfer` PaymentMethod, this sub-hash contains details about the Indonesia Bank Transfer payment method options. - """ - ideal: NotRequired[ - "Literal['']|PaymentIntentService.CreateParamsPaymentMethodOptionsIdeal" - ] - """ - If this is a `ideal` PaymentMethod, this sub-hash contains details about the Ideal payment method options. - """ - interac_present: NotRequired[ - "Literal['']|PaymentIntentService.CreateParamsPaymentMethodOptionsInteracPresent" - ] - """ - If this is a `interac_present` PaymentMethod, this sub-hash contains details about the Card Present payment method options. - """ - kakao_pay: NotRequired[ - "Literal['']|PaymentIntentService.CreateParamsPaymentMethodOptionsKakaoPay" - ] - """ - If this is a `kakao_pay` PaymentMethod, this sub-hash contains details about the Kakao Pay payment method options. - """ - klarna: NotRequired[ - "Literal['']|PaymentIntentService.CreateParamsPaymentMethodOptionsKlarna" - ] - """ - If this is a `klarna` PaymentMethod, this sub-hash contains details about the Klarna payment method options. - """ - konbini: NotRequired[ - "Literal['']|PaymentIntentService.CreateParamsPaymentMethodOptionsKonbini" - ] - """ - If this is a `konbini` PaymentMethod, this sub-hash contains details about the Konbini payment method options. - """ - kr_card: NotRequired[ - "Literal['']|PaymentIntentService.CreateParamsPaymentMethodOptionsKrCard" - ] - """ - If this is a `kr_card` PaymentMethod, this sub-hash contains details about the KR Card payment method options. - """ - link: NotRequired[ - "Literal['']|PaymentIntentService.CreateParamsPaymentMethodOptionsLink" - ] - """ - If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options. - """ - mb_way: NotRequired[ - "Literal['']|PaymentIntentService.CreateParamsPaymentMethodOptionsMbWay" - ] - """ - If this is a `mb_way` PaymentMethod, this sub-hash contains details about the MB WAY payment method options. - """ - mobilepay: NotRequired[ - "Literal['']|PaymentIntentService.CreateParamsPaymentMethodOptionsMobilepay" - ] - """ - If this is a `MobilePay` PaymentMethod, this sub-hash contains details about the MobilePay payment method options. - """ - multibanco: NotRequired[ - "Literal['']|PaymentIntentService.CreateParamsPaymentMethodOptionsMultibanco" - ] - """ - If this is a `multibanco` PaymentMethod, this sub-hash contains details about the Multibanco payment method options. - """ - naver_pay: NotRequired[ - "Literal['']|PaymentIntentService.CreateParamsPaymentMethodOptionsNaverPay" - ] - """ - If this is a `naver_pay` PaymentMethod, this sub-hash contains details about the Naver Pay payment method options. - """ - nz_bank_account: NotRequired[ - "Literal['']|PaymentIntentService.CreateParamsPaymentMethodOptionsNzBankAccount" - ] - """ - If this is a `nz_bank_account` PaymentMethod, this sub-hash contains details about the NZ BECS Direct Debit payment method options. - """ - oxxo: NotRequired[ - "Literal['']|PaymentIntentService.CreateParamsPaymentMethodOptionsOxxo" - ] - """ - If this is a `oxxo` PaymentMethod, this sub-hash contains details about the OXXO payment method options. - """ - p24: NotRequired[ - "Literal['']|PaymentIntentService.CreateParamsPaymentMethodOptionsP24" - ] - """ - If this is a `p24` PaymentMethod, this sub-hash contains details about the Przelewy24 payment method options. - """ - pay_by_bank: NotRequired[ - "Literal['']|PaymentIntentService.CreateParamsPaymentMethodOptionsPayByBank" - ] - """ - If this is a `pay_by_bank` PaymentMethod, this sub-hash contains details about the PayByBank payment method options. - """ - payco: NotRequired[ - "Literal['']|PaymentIntentService.CreateParamsPaymentMethodOptionsPayco" - ] - """ - If this is a `payco` PaymentMethod, this sub-hash contains details about the PAYCO payment method options. - """ - paynow: NotRequired[ - "Literal['']|PaymentIntentService.CreateParamsPaymentMethodOptionsPaynow" - ] - """ - If this is a `paynow` PaymentMethod, this sub-hash contains details about the PayNow payment method options. - """ - paypal: NotRequired[ - "Literal['']|PaymentIntentService.CreateParamsPaymentMethodOptionsPaypal" - ] - """ - If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options. - """ - paypay: NotRequired[ - "Literal['']|PaymentIntentService.CreateParamsPaymentMethodOptionsPaypay" - ] - """ - If this is a `paypay` PaymentMethod, this sub-hash contains details about the PayPay payment method options. - """ - payto: NotRequired[ - "Literal['']|PaymentIntentService.CreateParamsPaymentMethodOptionsPayto" - ] - """ - If this is a `payto` PaymentMethod, this sub-hash contains details about the PayTo payment method options. - """ - pix: NotRequired[ - "Literal['']|PaymentIntentService.CreateParamsPaymentMethodOptionsPix" - ] - """ - If this is a `pix` PaymentMethod, this sub-hash contains details about the Pix payment method options. - """ - promptpay: NotRequired[ - "Literal['']|PaymentIntentService.CreateParamsPaymentMethodOptionsPromptpay" - ] - """ - If this is a `promptpay` PaymentMethod, this sub-hash contains details about the PromptPay payment method options. - """ - qris: NotRequired[ - "Literal['']|PaymentIntentService.CreateParamsPaymentMethodOptionsQris" - ] - """ - If this is a `qris` PaymentMethod, this sub-hash contains details about the QRIS payment method options. - """ - rechnung: NotRequired[ - "Literal['']|PaymentIntentService.CreateParamsPaymentMethodOptionsRechnung" - ] - """ - If this is a `rechnung` PaymentMethod, this sub-hash contains details about the Rechnung payment method options. - """ - revolut_pay: NotRequired[ - "Literal['']|PaymentIntentService.CreateParamsPaymentMethodOptionsRevolutPay" - ] - """ - If this is a `revolut_pay` PaymentMethod, this sub-hash contains details about the Revolut Pay payment method options. - """ - samsung_pay: NotRequired[ - "Literal['']|PaymentIntentService.CreateParamsPaymentMethodOptionsSamsungPay" - ] - """ - If this is a `samsung_pay` PaymentMethod, this sub-hash contains details about the Samsung Pay payment method options. - """ - satispay: NotRequired[ - "Literal['']|PaymentIntentService.CreateParamsPaymentMethodOptionsSatispay" - ] - """ - If this is a `satispay` PaymentMethod, this sub-hash contains details about the Satispay payment method options. - """ - sepa_debit: NotRequired[ - "Literal['']|PaymentIntentService.CreateParamsPaymentMethodOptionsSepaDebit" - ] - """ - If this is a `sepa_debit` PaymentIntent, this sub-hash contains details about the SEPA Debit payment method options. - """ - shopeepay: NotRequired[ - "Literal['']|PaymentIntentService.CreateParamsPaymentMethodOptionsShopeepay" - ] - """ - If this is a `shopeepay` PaymentMethod, this sub-hash contains details about the ShopeePay payment method options. - """ - sofort: NotRequired[ - "Literal['']|PaymentIntentService.CreateParamsPaymentMethodOptionsSofort" - ] - """ - If this is a `sofort` PaymentMethod, this sub-hash contains details about the SOFORT payment method options. - """ - stripe_balance: NotRequired[ - "Literal['']|PaymentIntentService.CreateParamsPaymentMethodOptionsStripeBalance" - ] - """ - If this is a `stripe_balance` PaymentMethod, this sub-hash contains details about the Stripe Balance payment method options. - """ - swish: NotRequired[ - "Literal['']|PaymentIntentService.CreateParamsPaymentMethodOptionsSwish" - ] - """ - If this is a `Swish` PaymentMethod, this sub-hash contains details about the Swish payment method options. - """ - twint: NotRequired[ - "Literal['']|PaymentIntentService.CreateParamsPaymentMethodOptionsTwint" - ] - """ - If this is a `twint` PaymentMethod, this sub-hash contains details about the TWINT payment method options. - """ - us_bank_account: NotRequired[ - "Literal['']|PaymentIntentService.CreateParamsPaymentMethodOptionsUsBankAccount" - ] - """ - If this is a `us_bank_account` PaymentMethod, this sub-hash contains details about the US bank account payment method options. - """ - wechat_pay: NotRequired[ - "Literal['']|PaymentIntentService.CreateParamsPaymentMethodOptionsWechatPay" - ] - """ - If this is a `wechat_pay` PaymentMethod, this sub-hash contains details about the WeChat Pay payment method options. - """ - zip: NotRequired[ - "Literal['']|PaymentIntentService.CreateParamsPaymentMethodOptionsZip" - ] - """ - If this is a `zip` PaymentMethod, this sub-hash contains details about the Zip payment method options. - """ - - class CreateParamsPaymentMethodOptionsAcssDebit(TypedDict): - mandate_options: NotRequired[ - "PaymentIntentService.CreateParamsPaymentMethodOptionsAcssDebitMandateOptions" - ] - """ - Additional fields for Mandate creation - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - target_date: NotRequired[str] - """ - Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. - """ - verification_method: NotRequired[ - Literal["automatic", "instant", "microdeposits"] - ] - """ - Bank account verification method. - """ - - class CreateParamsPaymentMethodOptionsAcssDebitMandateOptions(TypedDict): - custom_mandate_url: NotRequired["Literal['']|str"] - """ - A URL for custom mandate text to render during confirmation step. - The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent, - or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent. - """ - interval_description: NotRequired[str] - """ - Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'. - """ - payment_schedule: NotRequired[ - Literal["combined", "interval", "sporadic"] - ] - """ - Payment schedule for the mandate. - """ - transaction_type: NotRequired[Literal["business", "personal"]] - """ - Transaction type of the mandate. - """ - - class CreateParamsPaymentMethodOptionsAffirm(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds are captured from the customer's account. - - If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. - """ - preferred_locale: NotRequired[str] - """ - Preferred language of the Affirm authorization page that the customer is redirected to. - """ - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class CreateParamsPaymentMethodOptionsAfterpayClearpay(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds are captured from the customer's account. - - If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. - """ - reference: NotRequired[str] - """ - An internal identifier or reference that this payment corresponds to. You must limit the identifier to 128 characters, and it can only contain letters, numbers, underscores, backslashes, and dashes. - This field differs from the statement descriptor and item name. - """ - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class CreateParamsPaymentMethodOptionsAlipay(TypedDict): - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class CreateParamsPaymentMethodOptionsAlma(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds are captured from the customer's account. - - If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. - """ - - class CreateParamsPaymentMethodOptionsAmazonPay(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds are captured from the customer's account. - - If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - """ - - class CreateParamsPaymentMethodOptionsAuBecsDebit(TypedDict): - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - target_date: NotRequired[str] - """ - Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. - """ - - class CreateParamsPaymentMethodOptionsBacsDebit(TypedDict): - mandate_options: NotRequired[ - "PaymentIntentService.CreateParamsPaymentMethodOptionsBacsDebitMandateOptions" - ] - """ - Additional fields for Mandate creation - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - target_date: NotRequired[str] - """ - Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. - """ - - class CreateParamsPaymentMethodOptionsBacsDebitMandateOptions(TypedDict): - reference_prefix: NotRequired["Literal['']|str"] - """ - Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'. - """ - - class CreateParamsPaymentMethodOptionsBancontact(TypedDict): - preferred_language: NotRequired[Literal["de", "en", "fr", "nl"]] - """ - Preferred language of the Bancontact authorization page that the customer is redirected to. - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class CreateParamsPaymentMethodOptionsBillie(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds are captured from the customer's account. - - If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. - """ - - class CreateParamsPaymentMethodOptionsBlik(TypedDict): - code: NotRequired[str] - """ - The 6-digit BLIK code that a customer has generated using their banking application. Can only be set on confirmation. - """ - setup_future_usage: NotRequired["Literal['']|Literal['none']"] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class CreateParamsPaymentMethodOptionsBoleto(TypedDict): - expires_after_days: NotRequired[int] - """ - The number of calendar days before a Boleto voucher expires. For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto invoice will expire on Wednesday at 23:59 America/Sao_Paulo time. - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class CreateParamsPaymentMethodOptionsCard(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds are captured from the customer's account. - - If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. - """ - cvc_token: NotRequired[str] - """ - A single-use `cvc_update` Token that represents a card CVC value. When provided, the CVC value will be verified during the card payment attempt. This parameter can only be provided during confirmation. - """ - installments: NotRequired[ - "PaymentIntentService.CreateParamsPaymentMethodOptionsCardInstallments" - ] - """ - Installment configuration for payments attempted on this PaymentIntent. - - For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments). - """ - mandate_options: NotRequired[ - "PaymentIntentService.CreateParamsPaymentMethodOptionsCardMandateOptions" - ] - """ - Configuration options for setting up an eMandate for cards issued in India. - """ - moto: NotRequired[bool] - """ - When specified, this parameter indicates that a transaction will be marked - as MOTO (Mail Order Telephone Order) and thus out of scope for SCA. This - parameter can only be provided during confirmation. - """ - network: NotRequired[ - Literal[ - "amex", - "cartes_bancaires", - "diners", - "discover", - "eftpos_au", - "girocard", - "interac", - "jcb", - "link", - "mastercard", - "unionpay", - "unknown", - "visa", - ] - ] - """ - Selected network to process this PaymentIntent on. Depends on the available networks of the card attached to the PaymentIntent. Can be only set confirm-time. - """ - request_decremental_authorization: NotRequired[ - Literal["if_available", "never"] - ] - """ - Request ability to [decrement the authorization](https://stripe.com/docs/payments/decremental-authorization) for this PaymentIntent. - """ - request_extended_authorization: NotRequired[ - Literal["if_available", "never"] - ] - """ - Request ability to [capture beyond the standard authorization validity window](https://stripe.com/docs/payments/extended-authorization) for this PaymentIntent. - """ - request_incremental_authorization: NotRequired[ - Literal["if_available", "never"] - ] - """ - Request ability to [increment the authorization](https://stripe.com/docs/payments/incremental-authorization) for this PaymentIntent. - """ - request_multicapture: NotRequired[Literal["if_available", "never"]] - """ - Request ability to make [multiple captures](https://stripe.com/docs/payments/multicapture) for this PaymentIntent. - """ - request_overcapture: NotRequired[Literal["if_available", "never"]] - """ - Request ability to [overcapture](https://stripe.com/docs/payments/overcapture) for this PaymentIntent. - """ - request_partial_authorization: NotRequired[ - Literal["if_available", "never"] - ] - """ - Request partial authorization on this PaymentIntent. - """ - request_three_d_secure: NotRequired[ - Literal["any", "automatic", "challenge"] - ] - """ - We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. - """ - require_cvc_recollection: NotRequired[bool] - """ - When enabled, using a card that is attached to a customer will require the CVC to be provided again (i.e. using the cvc_token parameter). - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - statement_descriptor_suffix_kana: NotRequired["Literal['']|str"] - """ - Provides information about a card payment that customers see on their statements. Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor that's set on the account to form the complete statement descriptor. Maximum 22 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 22 characters. - """ - statement_descriptor_suffix_kanji: NotRequired["Literal['']|str"] - """ - Provides information about a card payment that customers see on their statements. Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement descriptor that's set on the account to form the complete statement descriptor. Maximum 17 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 17 characters. - """ - statement_details: NotRequired[ - "Literal['']|PaymentIntentService.CreateParamsPaymentMethodOptionsCardStatementDetails" - ] - """ - Statement details for this payment intent. You can use this to override the merchant details shown on your customers' statements. - """ - three_d_secure: NotRequired[ - "PaymentIntentService.CreateParamsPaymentMethodOptionsCardThreeDSecure" - ] - """ - If 3D Secure authentication was performed with a third-party provider, - the authentication details to use for this payment. - """ - - class CreateParamsPaymentMethodOptionsCardInstallments(TypedDict): - enabled: NotRequired[bool] - """ - Setting to true enables installments for this PaymentIntent. - This will cause the response to contain a list of available installment plans. - Setting to false will prevent any selected plan from applying to a charge. - """ - plan: NotRequired[ - "Literal['']|PaymentIntentService.CreateParamsPaymentMethodOptionsCardInstallmentsPlan" - ] - """ - The selected installment plan to use for this payment attempt. - This parameter can only be provided during confirmation. - """ - - class CreateParamsPaymentMethodOptionsCardInstallmentsPlan(TypedDict): - count: NotRequired[int] - """ - For `fixed_count` installment plans, this is required. It represents the number of installment payments your customer will make to their credit card. - """ - interval: NotRequired[Literal["month"]] - """ - For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card. - One of `month`. - """ - type: Literal["bonus", "fixed_count", "revolving"] - """ - Type of installment plan, one of `fixed_count`, `bonus`, or `revolving`. - """ - - class CreateParamsPaymentMethodOptionsCardMandateOptions(TypedDict): - amount: int - """ - Amount to be charged for future payments. - """ - amount_type: Literal["fixed", "maximum"] - """ - One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. - """ - description: NotRequired[str] - """ - A description of the mandate or subscription that is meant to be displayed to the customer. - """ - end_date: NotRequired[int] - """ - End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. - """ - interval: Literal["day", "month", "sporadic", "week", "year"] - """ - Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`. - """ - interval_count: NotRequired[int] - """ - The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`. - """ - reference: str - """ - Unique identifier for the mandate or subscription. - """ - start_date: int - """ - Start date of the mandate or subscription. Start date should not be lesser than yesterday. - """ - supported_types: NotRequired[List[Literal["india"]]] - """ - Specifies the type of mandates supported. Possible values are `india`. - """ - - class CreateParamsPaymentMethodOptionsCardPresent(TypedDict): - request_extended_authorization: NotRequired[bool] - """ - Request ability to capture this payment beyond the standard [authorization validity window](https://stripe.com/docs/terminal/features/extended-authorizations#authorization-validity) - """ - request_incremental_authorization_support: NotRequired[bool] - """ - Request ability to [increment](https://stripe.com/docs/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://stripe.com/docs/api/payment_intents/confirm) response to verify support. - """ - routing: NotRequired[ - "PaymentIntentService.CreateParamsPaymentMethodOptionsCardPresentRouting" - ] - """ - Network routing priority on co-branded EMV cards supporting domestic debit and international card schemes. - """ - - class CreateParamsPaymentMethodOptionsCardPresentRouting(TypedDict): - requested_priority: NotRequired[Literal["domestic", "international"]] - """ - Routing requested priority - """ - - class CreateParamsPaymentMethodOptionsCardStatementDetails(TypedDict): - address: NotRequired[ - "PaymentIntentService.CreateParamsPaymentMethodOptionsCardStatementDetailsAddress" - ] - """ - Please pass in an address that is within your Stripe user account country - """ - phone: NotRequired[str] - """ - Phone number (e.g., a toll-free number that customers can call) - """ - - class CreateParamsPaymentMethodOptionsCardStatementDetailsAddress( - 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. - """ - - class CreateParamsPaymentMethodOptionsCardThreeDSecure(TypedDict): - ares_trans_status: NotRequired[ - Literal["A", "C", "I", "N", "R", "U", "Y"] - ] - """ - The `transStatus` returned from the card Issuer's ACS in the ARes. - """ - cryptogram: str - """ - The cryptogram, also known as the "authentication value" (AAV, CAVV or - AEVV). This value is 20 bytes, base64-encoded into a 28-character string. - (Most 3D Secure providers will return the base64-encoded version, which - is what you should specify here.) - """ - electronic_commerce_indicator: NotRequired[ - Literal["01", "02", "05", "06", "07"] - ] - """ - The Electronic Commerce Indicator (ECI) is returned by your 3D Secure - provider and indicates what degree of authentication was performed. - """ - exemption_indicator: NotRequired[Literal["low_risk", "none"]] - """ - The exemption requested via 3DS and accepted by the issuer at authentication time. - """ - network_options: NotRequired[ - "PaymentIntentService.CreateParamsPaymentMethodOptionsCardThreeDSecureNetworkOptions" - ] - """ - Network specific 3DS fields. Network specific arguments require an - explicit card brand choice. The parameter `payment_method_options.card.network`` - must be populated accordingly - """ - requestor_challenge_indicator: NotRequired[str] - """ - The challenge indicator (`threeDSRequestorChallengeInd`) which was requested in the - AReq sent to the card Issuer's ACS. A string containing 2 digits from 01-99. - """ - transaction_id: str - """ - For 3D Secure 1, the XID. For 3D Secure 2, the Directory Server - Transaction ID (dsTransID). - """ - version: Literal["1.0.2", "2.1.0", "2.2.0"] - """ - The version of 3D Secure that was performed. - """ - - class CreateParamsPaymentMethodOptionsCardThreeDSecureNetworkOptions( - TypedDict, - ): - cartes_bancaires: NotRequired[ - "PaymentIntentService.CreateParamsPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancaires" - ] - """ - Cartes Bancaires-specific 3DS fields. - """ - - class CreateParamsPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancaires( - TypedDict, - ): - cb_avalgo: Literal["0", "1", "2", "3", "4", "A"] - """ - The cryptogram calculation algorithm used by the card Issuer's ACS - to calculate the Authentication cryptogram. Also known as `cavvAlgorithm`. - messageExtension: CB-AVALGO - """ - cb_exemption: NotRequired[str] - """ - The exemption indicator returned from Cartes Bancaires in the ARes. - message extension: CB-EXEMPTION; string (4 characters) - This is a 3 byte bitmap (low significant byte first and most significant - bit first) that has been Base64 encoded - """ - cb_score: NotRequired[int] - """ - The risk score returned from Cartes Bancaires in the ARes. - message extension: CB-SCORE; numeric value 0-99 - """ - - class CreateParamsPaymentMethodOptionsCashapp(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds are captured from the customer's account. - - If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class CreateParamsPaymentMethodOptionsCrypto(TypedDict): - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class CreateParamsPaymentMethodOptionsCustomerBalance(TypedDict): - bank_transfer: NotRequired[ - "PaymentIntentService.CreateParamsPaymentMethodOptionsCustomerBalanceBankTransfer" - ] - """ - Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. - """ - funding_type: NotRequired[Literal["bank_transfer"]] - """ - The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. - """ - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class CreateParamsPaymentMethodOptionsCustomerBalanceBankTransfer( - TypedDict, - ): - eu_bank_transfer: NotRequired[ - "PaymentIntentService.CreateParamsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer" - ] - """ - Configuration for the eu_bank_transfer funding type. - """ - requested_address_types: NotRequired[ - List[ - Literal[ - "aba", - "iban", - "sepa", - "sort_code", - "spei", - "swift", - "zengin", - ] - ] - ] - """ - List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned. - - Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`. - """ - type: Literal[ - "eu_bank_transfer", - "gb_bank_transfer", - "jp_bank_transfer", - "mx_bank_transfer", - "us_bank_transfer", - ] - """ - The list of bank transfer types that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. - """ - - class CreateParamsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer( - TypedDict, - ): - country: str - """ - The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. - """ - - class CreateParamsPaymentMethodOptionsEps(TypedDict): - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class CreateParamsPaymentMethodOptionsFpx(TypedDict): - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class CreateParamsPaymentMethodOptionsGiropay(TypedDict): - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class CreateParamsPaymentMethodOptionsGopay(TypedDict): - setup_future_usage: NotRequired[Literal["none", "off_session"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class CreateParamsPaymentMethodOptionsGrabpay(TypedDict): - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class CreateParamsPaymentMethodOptionsIdBankTransfer(TypedDict): - expires_after: NotRequired[int] - """ - The UNIX timestamp until which the virtual bank account is valid. Permitted range is from 5 minutes from now until 31 days from now. If unset, it defaults to 3 days from now. - """ - expires_at: NotRequired[int] - """ - The UNIX timestamp until which the virtual bank account is valid. Permitted range is from now until 30 days from now. If unset, it defaults to 1 days from now. - """ - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class CreateParamsPaymentMethodOptionsIdeal(TypedDict): - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class CreateParamsPaymentMethodOptionsInteracPresent(TypedDict): - pass - - class CreateParamsPaymentMethodOptionsKakaoPay(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds are captured from the customer's account. - - If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - """ - - class CreateParamsPaymentMethodOptionsKlarna(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds are captured from the customer's account. - - If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. - """ - on_demand: NotRequired[ - "PaymentIntentService.CreateParamsPaymentMethodOptionsKlarnaOnDemand" - ] - """ - On-demand details if setting up or charging an on-demand payment. - """ - preferred_locale: NotRequired[ - Literal[ - "cs-CZ", - "da-DK", - "de-AT", - "de-CH", - "de-DE", - "el-GR", - "en-AT", - "en-AU", - "en-BE", - "en-CA", - "en-CH", - "en-CZ", - "en-DE", - "en-DK", - "en-ES", - "en-FI", - "en-FR", - "en-GB", - "en-GR", - "en-IE", - "en-IT", - "en-NL", - "en-NO", - "en-NZ", - "en-PL", - "en-PT", - "en-RO", - "en-SE", - "en-US", - "es-ES", - "es-US", - "fi-FI", - "fr-BE", - "fr-CA", - "fr-CH", - "fr-FR", - "it-CH", - "it-IT", - "nb-NO", - "nl-BE", - "nl-NL", - "pl-PL", - "pt-PT", - "ro-RO", - "sv-FI", - "sv-SE", - ] - ] - """ - Preferred language of the Klarna authorization page that the customer is redirected to - """ - setup_future_usage: NotRequired[ - Literal["none", "off_session", "on_session"] - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - subscriptions: NotRequired[ - "Literal['']|List[PaymentIntentService.CreateParamsPaymentMethodOptionsKlarnaSubscription]" - ] - """ - Subscription details if setting up or charging a subscription. - """ - - class CreateParamsPaymentMethodOptionsKlarnaOnDemand(TypedDict): - average_amount: NotRequired[int] - """ - Your average amount value. You can use a value across your customer base, or segment based on customer type, country, etc. - """ - maximum_amount: NotRequired[int] - """ - The maximum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. - """ - minimum_amount: NotRequired[int] - """ - The lowest or minimum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. - """ - purchase_interval: NotRequired[Literal["day", "month", "week", "year"]] - """ - Interval at which the customer is making purchases - """ - purchase_interval_count: NotRequired[int] - """ - The number of `purchase_interval` between charges - """ - - class CreateParamsPaymentMethodOptionsKlarnaSubscription(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Unit of time between subscription charges. - """ - interval_count: NotRequired[int] - """ - The number of intervals (specified in the `interval` attribute) between subscription charges. For example, `interval=month` and `interval_count=3` charges every 3 months. - """ - name: NotRequired[str] - """ - Name for subscription. - """ - next_billing: NotRequired[ - "PaymentIntentService.CreateParamsPaymentMethodOptionsKlarnaSubscriptionNextBilling" - ] - """ - Describes the upcoming charge for this subscription. - """ - reference: str - """ - A non-customer-facing reference to correlate subscription charges in the Klarna app. Use a value that persists across subscription charges. - """ - - class CreateParamsPaymentMethodOptionsKlarnaSubscriptionNextBilling( - TypedDict, - ): - amount: int - """ - The amount of the next charge for the subscription. - """ - date: str - """ - The date of the next charge for the subscription in YYYY-MM-DD format. - """ - - class CreateParamsPaymentMethodOptionsKonbini(TypedDict): - confirmation_number: NotRequired["Literal['']|str"] - """ - An optional 10 to 11 digit numeric-only string determining the confirmation code at applicable convenience stores. Must not consist of only zeroes and could be rejected in case of insufficient uniqueness. We recommend to use the customer's phone number. - """ - expires_after_days: NotRequired["Literal['']|int"] - """ - The number of calendar days (between 1 and 60) after which Konbini payment instructions will expire. For example, if a PaymentIntent is confirmed with Konbini and `expires_after_days` set to 2 on Monday JST, the instructions will expire on Wednesday 23:59:59 JST. Defaults to 3 days. - """ - expires_at: NotRequired["Literal['']|int"] - """ - The timestamp at which the Konbini payment instructions will expire. Only one of `expires_after_days` or `expires_at` may be set. - """ - product_description: NotRequired["Literal['']|str"] - """ - A product descriptor of up to 22 characters, which will appear to customers at the convenience store. - """ - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class CreateParamsPaymentMethodOptionsKrCard(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds are captured from the customer's account. - - If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - """ - - class CreateParamsPaymentMethodOptionsLink(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds are captured from the customer's account. - - If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. - """ - persistent_token: NotRequired[str] - """ - [Deprecated] This is a legacy parameter that no longer has any function. - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class CreateParamsPaymentMethodOptionsMbWay(TypedDict): - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class CreateParamsPaymentMethodOptionsMobilepay(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds are captured from the customer's account. - - If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. - """ - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class CreateParamsPaymentMethodOptionsMultibanco(TypedDict): - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class CreateParamsPaymentMethodOptionsNaverPay(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds are captured from the customer's account. - - If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - """ - - class CreateParamsPaymentMethodOptionsNzBankAccount(TypedDict): - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - target_date: NotRequired[str] - """ - Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. - """ - - class CreateParamsPaymentMethodOptionsOxxo(TypedDict): - expires_after_days: NotRequired[int] - """ - The number of calendar days before an OXXO voucher expires. For example, if you create an OXXO voucher on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time. - """ - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class CreateParamsPaymentMethodOptionsP24(TypedDict): - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - tos_shown_and_accepted: NotRequired[bool] - """ - Confirm that the payer has accepted the P24 terms and conditions. - """ - - class CreateParamsPaymentMethodOptionsPayByBank(TypedDict): - pass - - class CreateParamsPaymentMethodOptionsPayco(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds are captured from the customer's account. - - If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. - """ - - class CreateParamsPaymentMethodOptionsPaynow(TypedDict): - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class CreateParamsPaymentMethodOptionsPaypal(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds will be captured from the customer's account. - """ - line_items: NotRequired[ - List[ - "PaymentIntentService.CreateParamsPaymentMethodOptionsPaypalLineItem" - ] - ] - """ - The line items purchased by the customer. - """ - preferred_locale: NotRequired[ - Literal[ - "cs-CZ", - "da-DK", - "de-AT", - "de-DE", - "de-LU", - "el-GR", - "en-GB", - "en-US", - "es-ES", - "fi-FI", - "fr-BE", - "fr-FR", - "fr-LU", - "hu-HU", - "it-IT", - "nl-BE", - "nl-NL", - "pl-PL", - "pt-PT", - "sk-SK", - "sv-SE", - ] - ] - """ - [Preferred locale](https://stripe.com/docs/payments/paypal/supported-locales) of the PayPal checkout page that the customer is redirected to. - """ - reference: NotRequired[str] - """ - A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. - """ - reference_id: NotRequired[str] - """ - A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. - """ - risk_correlation_id: NotRequired[str] - """ - The risk correlation ID for an on-session payment using a saved PayPal payment method. - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - subsellers: NotRequired[List[str]] - """ - The Stripe connected account IDs of the sellers on the platform for this transaction (optional). Only allowed when [separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) are used. - """ - - class CreateParamsPaymentMethodOptionsPaypalLineItem(TypedDict): - category: NotRequired[ - Literal["digital_goods", "donation", "physical_goods"] - ] - """ - Type of the line item. - """ - description: NotRequired[str] - """ - Description of the line item. - """ - name: str - """ - Descriptive name of the line item. - """ - quantity: int - """ - Quantity of the line item. Must be a positive number. - """ - sku: NotRequired[str] - """ - Client facing stock keeping unit, article number or similar. - """ - sold_by: NotRequired[str] - """ - The Stripe account ID of the connected account that sells the item. - """ - tax: NotRequired[ - "PaymentIntentService.CreateParamsPaymentMethodOptionsPaypalLineItemTax" - ] - """ - The tax information for the line item. - """ - unit_amount: int - """ - Price for a single unit of the line item in minor units. Cannot be a negative number. - """ - - class CreateParamsPaymentMethodOptionsPaypalLineItemTax(TypedDict): - amount: int - """ - The tax for a single unit of the line item in minor units. Cannot be a negative number. - """ - behavior: Literal["exclusive", "inclusive"] - """ - The tax behavior for the line item. - """ - - class CreateParamsPaymentMethodOptionsPaypay(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds are captured from the customer's account. - - If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. - """ - - class CreateParamsPaymentMethodOptionsPayto(TypedDict): - mandate_options: NotRequired[ - "PaymentIntentService.CreateParamsPaymentMethodOptionsPaytoMandateOptions" - ] - """ - Additional fields for Mandate creation. Only `purpose` field is configurable for PayTo PaymentIntent with `setup_future_usage=none`. Other fields are only applicable to PayTo PaymentIntent with `setup_future_usage=off_session` - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class CreateParamsPaymentMethodOptionsPaytoMandateOptions(TypedDict): - amount: NotRequired[int] - """ - Amount that will be collected. It is required when `amount_type` is `fixed`. - """ - amount_type: NotRequired[Literal["fixed", "maximum"]] - """ - The type of amount that will be collected. The amount charged must be exact or up to the value of `amount` param for `fixed` or `maximum` type respectively. - """ - end_date: NotRequired[str] - """ - Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no end date. - """ - payment_schedule: NotRequired[ - Literal[ - "adhoc", - "annual", - "daily", - "fortnightly", - "monthly", - "quarterly", - "semi_annual", - "weekly", - ] - ] - """ - The periodicity at which payments will be collected. - """ - payments_per_period: NotRequired[int] - """ - The number of payments that will be made during a payment period. Defaults to 1 except for when `payment_schedule` is `adhoc`. In that case, it defaults to no limit. - """ - purpose: NotRequired[ - Literal[ - "dependant_support", - "government", - "loan", - "mortgage", - "other", - "pension", - "personal", - "retail", - "salary", - "tax", - "utility", - ] - ] - """ - The purpose for which payments are made. Defaults to retail. - """ - - class CreateParamsPaymentMethodOptionsPix(TypedDict): - amount_includes_iof: NotRequired[Literal["always", "never"]] - """ - Determines if the amount includes the IOF tax. Defaults to `never`. - """ - expires_after_seconds: NotRequired[int] - """ - The number of seconds (between 10 and 1209600) after which Pix payment will expire. Defaults to 86400 seconds. - """ - expires_at: NotRequired[int] - """ - The timestamp at which the Pix expires (between 10 and 1209600 seconds in the future). Defaults to 1 day in the future. - """ - mandate_options: NotRequired[ - "PaymentIntentService.CreateParamsPaymentMethodOptionsPixMandateOptions" - ] - """ - Additional fields for mandate creation. Only applicable when `setup_future_usage=off_session`. - """ - setup_future_usage: NotRequired[Literal["none", "off_session"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class CreateParamsPaymentMethodOptionsPixMandateOptions(TypedDict): - amount: NotRequired[int] - """ - Amount to be charged for future payments. Required when `amount_type=fixed`. If not provided for `amount_type=maximum`, defaults to 40000. - """ - amount_includes_iof: NotRequired[Literal["always", "never"]] - """ - Determines if the amount includes the IOF tax. Defaults to `never`. - """ - amount_type: NotRequired[Literal["fixed", "maximum"]] - """ - Type of amount. Defaults to `maximum`. - """ - currency: NotRequired[str] - """ - Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Only `brl` is supported currently. - """ - end_date: NotRequired[str] - """ - Date when the mandate expires and no further payments will be charged, in `YYYY-MM-DD`. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. - """ - payment_schedule: NotRequired[ - Literal["halfyearly", "monthly", "quarterly", "weekly", "yearly"] - ] - """ - Schedule at which the future payments will be charged. Defaults to `weekly`. - """ - reference: NotRequired[str] - """ - Subscription name displayed to buyers in their bank app. Defaults to the displayable business name. - """ - start_date: NotRequired[str] - """ - Start date of the mandate, in `YYYY-MM-DD`. Start date should be at least 3 days in the future. Defaults to 3 days after the current date. - """ - - class CreateParamsPaymentMethodOptionsPromptpay(TypedDict): - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class CreateParamsPaymentMethodOptionsQris(TypedDict): - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class CreateParamsPaymentMethodOptionsRechnung(TypedDict): - pass - - class CreateParamsPaymentMethodOptionsRevolutPay(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds are captured from the customer's account. - - If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - """ - - class CreateParamsPaymentMethodOptionsSamsungPay(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds are captured from the customer's account. - - If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. - """ - - class CreateParamsPaymentMethodOptionsSatispay(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds are captured from the customer's account. - - If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. - """ - - class CreateParamsPaymentMethodOptionsSepaDebit(TypedDict): - mandate_options: NotRequired[ - "PaymentIntentService.CreateParamsPaymentMethodOptionsSepaDebitMandateOptions" - ] - """ - Additional fields for Mandate creation - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - target_date: NotRequired[str] - """ - Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. - """ - - class CreateParamsPaymentMethodOptionsSepaDebitMandateOptions(TypedDict): - reference_prefix: NotRequired["Literal['']|str"] - """ - Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'. - """ - - class CreateParamsPaymentMethodOptionsShopeepay(TypedDict): - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class CreateParamsPaymentMethodOptionsSofort(TypedDict): - preferred_language: NotRequired[ - "Literal['']|Literal['de', 'en', 'es', 'fr', 'it', 'nl', 'pl']" - ] - """ - Language shown to the payer on redirect. - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class CreateParamsPaymentMethodOptionsStripeBalance(TypedDict): - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class CreateParamsPaymentMethodOptionsSwish(TypedDict): - reference: NotRequired["Literal['']|str"] - """ - A reference for this payment to be displayed in the Swish app. - """ - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class CreateParamsPaymentMethodOptionsTwint(TypedDict): - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class CreateParamsPaymentMethodOptionsUsBankAccount(TypedDict): - financial_connections: NotRequired[ - "PaymentIntentService.CreateParamsPaymentMethodOptionsUsBankAccountFinancialConnections" - ] - """ - Additional fields for Financial Connections Session creation - """ - mandate_options: NotRequired[ - "PaymentIntentService.CreateParamsPaymentMethodOptionsUsBankAccountMandateOptions" - ] - """ - Additional fields for Mandate creation - """ - networks: NotRequired[ - "PaymentIntentService.CreateParamsPaymentMethodOptionsUsBankAccountNetworks" - ] - """ - Additional fields for network related functions - """ - preferred_settlement_speed: NotRequired[ - "Literal['']|Literal['fastest', 'standard']" - ] - """ - Preferred transaction settlement speed - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - target_date: NotRequired[str] - """ - Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. - """ - verification_method: NotRequired[ - Literal["automatic", "instant", "microdeposits"] - ] - """ - Bank account verification method. - """ - - class CreateParamsPaymentMethodOptionsUsBankAccountFinancialConnections( - TypedDict, - ): - filters: NotRequired[ - "PaymentIntentService.CreateParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters" - ] - """ - Provide filters for the linked accounts that the customer can select for the payment method. - """ - manual_entry: NotRequired[ - "PaymentIntentService.CreateParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsManualEntry" - ] - """ - Customize manual entry behavior - """ - permissions: NotRequired[ - List[ - Literal[ - "balances", "ownership", "payment_method", "transactions" - ] - ] - ] - """ - The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. - """ - prefetch: NotRequired[ - List[ - Literal[ - "balances", - "inferred_balances", - "ownership", - "transactions", - ] - ] - ] - """ - List of data features that you would like to retrieve upon account creation. - """ - return_url: NotRequired[str] - """ - For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. - """ - - class CreateParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters( - TypedDict, - ): - account_subcategories: NotRequired[ - List[Literal["checking", "savings"]] - ] - """ - The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`. - """ - institution: NotRequired[str] - """ - ID of the institution to use to filter for selectable accounts. - """ - - class CreateParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsManualEntry( - TypedDict, - ): - mode: Literal["automatic", "custom"] - """ - Settings for configuring manual entry of account details. - """ - - class CreateParamsPaymentMethodOptionsUsBankAccountMandateOptions( - TypedDict, - ): - collection_method: NotRequired["Literal['']|Literal['paper']"] - """ - The method used to collect offline mandate customer acceptance. - """ - - class CreateParamsPaymentMethodOptionsUsBankAccountNetworks(TypedDict): - requested: NotRequired[List[Literal["ach", "us_domestic_wire"]]] - """ - Triggers validations to run across the selected networks - """ - - class CreateParamsPaymentMethodOptionsWechatPay(TypedDict): - app_id: NotRequired[str] - """ - The app ID registered with WeChat Pay. Only required when client is ios or android. - """ - client: NotRequired[Literal["android", "ios", "web"]] - """ - The client type that the end customer will pay from - """ - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class CreateParamsPaymentMethodOptionsZip(TypedDict): - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class CreateParamsRadarOptions(TypedDict): - session: NotRequired[str] - """ - A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. - """ - - class CreateParamsShipping(TypedDict): - address: "PaymentIntentService.CreateParamsShippingAddress" - """ - Shipping address. - """ - carrier: NotRequired[str] - """ - The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. - """ - name: str - """ - Recipient name. - """ - phone: NotRequired[str] - """ - Recipient phone (including extension). - """ - tracking_number: NotRequired[str] - """ - The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. - """ - - class CreateParamsShippingAddress(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. - """ - - class CreateParamsTransferData(TypedDict): - amount: NotRequired[int] - """ - The amount that will be transferred automatically when a charge succeeds. - The amount is capped at the total transaction amount and if no amount is set, - the full amount is transferred. - - If you intend to collect a fee and you need a more robust reporting experience, using - [application_fee_amount](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-application_fee_amount) - might be a better fit for your integration. - """ - destination: str - """ - If specified, successful charges will be attributed to the destination - account for tax reporting, and the funds from charges will be transferred - to the destination account. The ID of the resulting transfer will be - returned on the successful charge's `transfer` field. - """ - - class DecrementAuthorizationParams(TypedDict): - amount: int - """ - The updated total amount that you intend to collect from the cardholder. This amount must be smaller than the currently authorized amount and greater than the already captured amount. - """ - application_fee_amount: NotRequired[int] - """ - The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total amount captured. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). - """ - description: NotRequired[str] - """ - An arbitrary string attached to the object. Often useful for displaying to users. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - hooks: NotRequired[ - "PaymentIntentService.DecrementAuthorizationParamsHooks" - ] - """ - Automations to be run during the PaymentIntent lifecycle - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - transfer_data: NotRequired[ - "PaymentIntentService.DecrementAuthorizationParamsTransferData" - ] - """ - The parameters used to automatically create a transfer after the payment is captured. - Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). - """ - - class DecrementAuthorizationParamsHooks(TypedDict): - inputs: NotRequired[ - "PaymentIntentService.DecrementAuthorizationParamsHooksInputs" - ] - """ - Arguments passed in automations - """ - - class DecrementAuthorizationParamsHooksInputs(TypedDict): - tax: NotRequired[ - "PaymentIntentService.DecrementAuthorizationParamsHooksInputsTax" - ] - """ - Tax arguments for automations - """ - - class DecrementAuthorizationParamsHooksInputsTax(TypedDict): - calculation: Union[Literal[""], str] - """ - The [TaxCalculation](https://stripe.com/docs/api/tax/calculations) id - """ - - class DecrementAuthorizationParamsTransferData(TypedDict): - amount: NotRequired[int] - """ - The amount that will be transferred automatically when a charge succeeds. - """ - - class IncrementAuthorizationParams(TypedDict): - amount: int - """ - The updated total amount that you intend to collect from the cardholder. This amount must be greater than the currently authorized amount. - """ - amount_details: NotRequired[ - "PaymentIntentService.IncrementAuthorizationParamsAmountDetails" - ] - """ - Provides industry-specific information about the amount. - """ - application_fee_amount: NotRequired[int] - """ - The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total amount captured. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). - """ - description: NotRequired[str] - """ - An arbitrary string attached to the object. Often useful for displaying to users. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - hooks: NotRequired[ - "PaymentIntentService.IncrementAuthorizationParamsHooks" - ] - """ - Automations to be run during the PaymentIntent lifecycle - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - payment_details: NotRequired[ - "PaymentIntentService.IncrementAuthorizationParamsPaymentDetails" - ] - """ - Provides industry-specific information about the charge. - """ - payment_method_options: NotRequired[ - "PaymentIntentService.IncrementAuthorizationParamsPaymentMethodOptions" - ] - """ - Payment method-specific configuration for this PaymentIntent. - """ - statement_descriptor: NotRequired[str] - """ - Text that appears on the customer's statement as the statement descriptor for a non-card or card charge. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see [the Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors). - """ - transfer_data: NotRequired[ - "PaymentIntentService.IncrementAuthorizationParamsTransferData" - ] - """ - The parameters used to automatically create a transfer after the payment is captured. - Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). - """ - - class IncrementAuthorizationParamsAmountDetails(TypedDict): - discount_amount: NotRequired["Literal['']|int"] - """ - The total discount applied on the transaction. - """ - line_items: NotRequired[ - "Literal['']|List[PaymentIntentService.IncrementAuthorizationParamsAmountDetailsLineItem]" - ] - """ - A list of line items, each containing information about a product in the PaymentIntent. There is a maximum of 100 line items. - """ - shipping: NotRequired[ - "Literal['']|PaymentIntentService.IncrementAuthorizationParamsAmountDetailsShipping" - ] - """ - Contains information about the shipping portion of the amount. - """ - tax: NotRequired[ - "Literal['']|PaymentIntentService.IncrementAuthorizationParamsAmountDetailsTax" - ] - """ - Contains information about the tax portion of the amount. - """ - - class IncrementAuthorizationParamsAmountDetailsLineItem(TypedDict): - discount_amount: NotRequired[int] - """ - The amount an item was discounted for. Positive integer. - """ - payment_method_options: NotRequired[ - "PaymentIntentService.IncrementAuthorizationParamsAmountDetailsLineItemPaymentMethodOptions" - ] - """ - Payment method-specific information for line items. - """ - product_code: NotRequired[str] - """ - Unique identifier of the product. At most 12 characters long. - """ - product_name: str - """ - Name of the product. At most 100 characters long. - """ - quantity: int - """ - Number of items of the product. Positive integer. - """ - tax: NotRequired[ - "PaymentIntentService.IncrementAuthorizationParamsAmountDetailsLineItemTax" - ] - """ - Contains information about the tax on the item. - """ - unit_cost: int - """ - Cost of the product. Non-negative integer. - """ - unit_of_measure: NotRequired[str] - """ - A unit of measure for the line item, such as gallons, feet, meters, etc. - """ - - class IncrementAuthorizationParamsAmountDetailsLineItemPaymentMethodOptions( - TypedDict, - ): - card: NotRequired[ - "PaymentIntentService.IncrementAuthorizationParamsAmountDetailsLineItemPaymentMethodOptionsCard" - ] - """ - This sub-hash contains line item details that are specific to `card` payment method." - """ - card_present: NotRequired[ - "PaymentIntentService.IncrementAuthorizationParamsAmountDetailsLineItemPaymentMethodOptionsCardPresent" - ] - """ - This sub-hash contains line item details that are specific to `card_present` payment method." - """ - klarna: NotRequired[ - "PaymentIntentService.IncrementAuthorizationParamsAmountDetailsLineItemPaymentMethodOptionsKlarna" - ] - """ - This sub-hash contains line item details that are specific to `klarna` payment method." - """ - paypal: NotRequired[ - "PaymentIntentService.IncrementAuthorizationParamsAmountDetailsLineItemPaymentMethodOptionsPaypal" - ] - """ - This sub-hash contains line item details that are specific to `paypal` payment method." - """ - - class IncrementAuthorizationParamsAmountDetailsLineItemPaymentMethodOptionsCard( - TypedDict, - ): - commodity_code: NotRequired[str] - """ - Identifier that categorizes the items being purchased using a standardized commodity scheme such as (but not limited to) UNSPSC, NAICS, NAPCS, etc. - """ - - class IncrementAuthorizationParamsAmountDetailsLineItemPaymentMethodOptionsCardPresent( - TypedDict, - ): - commodity_code: NotRequired[str] - """ - Identifier that categorizes the items being purchased using a standardized commodity scheme such as (but not limited to) UNSPSC, NAICS, NAPCS, etc. - """ - - class IncrementAuthorizationParamsAmountDetailsLineItemPaymentMethodOptionsKlarna( - TypedDict, - ): - image_url: NotRequired[str] - """ - URL to an image for the product. Max length, 4096 characters. - """ - product_url: NotRequired[str] - """ - URL to the product page. Max length, 4096 characters. - """ - subscription_reference: NotRequired[str] - """ - Reference for the subscription this line item is for. - """ - - class IncrementAuthorizationParamsAmountDetailsLineItemPaymentMethodOptionsPaypal( - TypedDict, - ): - category: NotRequired[ - Literal["digital_goods", "donation", "physical_goods"] - ] - """ - Type of the line item. - """ - description: NotRequired[str] - """ - Description of the line item. - """ - sold_by: NotRequired[str] - """ - The Stripe account ID of the connected account that sells the item. - """ - - class IncrementAuthorizationParamsAmountDetailsLineItemTax(TypedDict): - total_tax_amount: int - """ - The total tax on an item. Non-negative integer. - """ - - class IncrementAuthorizationParamsAmountDetailsShipping(TypedDict): - amount: NotRequired["Literal['']|int"] - """ - Portion of the amount that is for shipping. - """ - from_postal_code: NotRequired["Literal['']|str"] - """ - The postal code that represents the shipping source. - """ - to_postal_code: NotRequired["Literal['']|str"] - """ - The postal code that represents the shipping destination. - """ - - class IncrementAuthorizationParamsAmountDetailsTax(TypedDict): - total_tax_amount: int - """ - Total portion of the amount that is for tax. - """ - - class IncrementAuthorizationParamsHooks(TypedDict): - inputs: NotRequired[ - "PaymentIntentService.IncrementAuthorizationParamsHooksInputs" - ] - """ - Arguments passed in automations - """ - - class IncrementAuthorizationParamsHooksInputs(TypedDict): - tax: NotRequired[ - "PaymentIntentService.IncrementAuthorizationParamsHooksInputsTax" - ] - """ - Tax arguments for automations - """ - - class IncrementAuthorizationParamsHooksInputsTax(TypedDict): - calculation: Union[Literal[""], str] - """ - The [TaxCalculation](https://stripe.com/docs/api/tax/calculations) id - """ - - class IncrementAuthorizationParamsPaymentDetails(TypedDict): - customer_reference: NotRequired["Literal['']|str"] - """ - Some customers might be required by their company or organization to provide this information. If so, provide this value. Otherwise you can ignore this field. - """ - order_reference: NotRequired["Literal['']|str"] - """ - A unique value assigned by the business to identify the transaction. - """ - - class IncrementAuthorizationParamsPaymentMethodOptions(TypedDict): - card: NotRequired[ - "PaymentIntentService.IncrementAuthorizationParamsPaymentMethodOptionsCard" - ] - """ - Configuration for any card payments attempted on this PaymentIntent. - """ - - class IncrementAuthorizationParamsPaymentMethodOptionsCard(TypedDict): - request_partial_authorization: NotRequired[ - Literal["if_available", "never"] - ] - """ - Request partial authorization on this PaymentIntent. - """ - - class IncrementAuthorizationParamsTransferData(TypedDict): - amount: NotRequired[int] - """ - The amount that will be transferred automatically when a charge succeeds. - """ - - class ListParams(TypedDict): - created: NotRequired["PaymentIntentService.ListParamsCreated|int"] - """ - A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp or a dictionary with a number of different query options. - """ - customer: NotRequired[str] - """ - Only return PaymentIntents for the customer that this customer ID specifies. - """ - customer_account: NotRequired[str] - """ - Only return PaymentIntents for the account that this ID specifies. - """ - 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 ListParamsCreated(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) - """ - - class RetrieveParams(TypedDict): - client_secret: NotRequired[str] - """ - The client secret of the PaymentIntent. We require it if you use a publishable key to retrieve the source. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class SearchParams(TypedDict): - 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. - """ - page: NotRequired[str] - """ - A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. - """ - query: str - """ - The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for payment intents](https://stripe.com/docs/search#query-fields-for-payment-intents). - """ - - class TriggerActionParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - scan_qr_code: NotRequired[ - "PaymentIntentService.TriggerActionParamsScanQrCode" - ] - """ - True to simulate success, false to simulate failure. - """ - type: Literal["expire", "fund"] - """ - The type of action to be simulated. - """ - - class TriggerActionParamsScanQrCode(TypedDict): - result: NotRequired[Literal["failure", "success"]] - """ - Whether the QR Code scan's payment should succeed or fail. - """ - - class UpdateParams(TypedDict): - amount: NotRequired[int] - """ - Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). - """ - amount_details: NotRequired[ - "Literal['']|PaymentIntentService.UpdateParamsAmountDetails" - ] - """ - Provides industry-specific information about the amount. - """ - application_fee_amount: NotRequired["Literal['']|int"] - """ - The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total amount captured. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). - """ - capture_method: NotRequired[ - Literal["automatic", "automatic_async", "manual"] - ] - """ - Controls when the funds will be captured from the customer's account. - """ - currency: NotRequired[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). - """ - customer: NotRequired[str] - """ - ID of the Customer this PaymentIntent belongs to, if one exists. - - Payment methods attached to other Customers cannot be used with this PaymentIntent. - - If [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) is set and this PaymentIntent's payment method is not `card_present`, then the payment method attaches to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. - """ - customer_account: NotRequired[str] - """ - ID of the Account this PaymentIntent belongs to, if one exists. - - Payment methods attached to other Accounts cannot be used with this PaymentIntent. - - If [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) is set and this PaymentIntent's payment method is not `card_present`, then the payment method attaches to the Account after the PaymentIntent has been confirmed and any required actions from the user are complete. If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Account instead. - """ - description: NotRequired[str] - """ - An arbitrary string attached to the object. Often useful for displaying to users. - """ - excluded_payment_method_types: NotRequired[ - "Literal['']|List[Literal['acss_debit', 'affirm', 'afterpay_clearpay', 'alipay', 'alma', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'billie', 'blik', 'boleto', 'card', 'cashapp', 'crypto', 'customer_balance', 'eps', 'fpx', 'giropay', 'gopay', 'grabpay', 'id_bank_transfer', 'ideal', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'mb_way', 'mobilepay', 'multibanco', 'naver_pay', 'nz_bank_account', 'oxxo', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'paypay', 'payto', 'pix', 'promptpay', 'qris', 'rechnung', 'revolut_pay', 'samsung_pay', 'satispay', 'sepa_debit', 'shopeepay', 'sofort', 'stripe_balance', 'swish', 'twint', 'us_bank_account', 'wechat_pay', 'zip']]" - ] - """ - The list of payment method types to exclude from use with this payment. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - fx_quote: NotRequired[str] - """ - The FX rate in the quote is validated and used to convert the presentment amount to the settlement amount. - """ - hooks: NotRequired["PaymentIntentService.UpdateParamsHooks"] - """ - Automations to be run during the PaymentIntent lifecycle - """ - mandate_data: NotRequired[ - "PaymentIntentService.UpdateParamsMandateData" - ] - """ - This hash contains details about the Mandate to create. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - payment_details: NotRequired[ - "Literal['']|PaymentIntentService.UpdateParamsPaymentDetails" - ] - """ - Provides industry-specific information about the charge. - """ - payment_method: NotRequired[str] - payment_method_configuration: NotRequired[str] - """ - The ID of the [payment method configuration](https://stripe.com/docs/api/payment_method_configurations) to use with this PaymentIntent. - """ - payment_method_data: NotRequired[ - "PaymentIntentService.UpdateParamsPaymentMethodData" - ] - """ - If provided, this hash will be used to create a PaymentMethod. The new PaymentMethod will appear - in the [payment_method](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-payment_method) - property on the PaymentIntent. - """ - payment_method_options: NotRequired[ - "PaymentIntentService.UpdateParamsPaymentMethodOptions" - ] - """ - Payment-method-specific configuration for this PaymentIntent. - """ - payment_method_types: NotRequired[List[str]] - """ - The list of payment method types (for example, card) that this PaymentIntent can use. Use `automatic_payment_methods` to manage payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). A list of valid payment method types can be found [here](https://docs.stripe.com/api/payment_methods/object#payment_method_object-type). - """ - receipt_email: NotRequired["Literal['']|str"] - """ - Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['off_session', 'on_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - shipping: NotRequired[ - "Literal['']|PaymentIntentService.UpdateParamsShipping" - ] - """ - Shipping information for this PaymentIntent. - """ - statement_descriptor: NotRequired[str] - """ - Text that appears on the customer's statement as the statement descriptor for a non-card charge. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see [the Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors). - - Setting this value for a card charge returns an error. For card charges, set the [statement_descriptor_suffix](https://docs.stripe.com/get-started/account/statement-descriptors#dynamic) instead. - """ - statement_descriptor_suffix: NotRequired[str] - """ - Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. - """ - transfer_data: NotRequired[ - "PaymentIntentService.UpdateParamsTransferData" - ] - """ - Use this parameter to automatically create a Transfer when the payment succeeds. Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). - """ - transfer_group: NotRequired[str] - """ - A string that identifies the resulting payment as part of a group. You can only provide `transfer_group` if it hasn't been set. Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). - """ - - class UpdateParamsAmountDetails(TypedDict): - discount_amount: NotRequired["Literal['']|int"] - """ - The total discount applied on the transaction. - """ - line_items: NotRequired[ - "Literal['']|List[PaymentIntentService.UpdateParamsAmountDetailsLineItem]" - ] - """ - A list of line items, each containing information about a product in the PaymentIntent. There is a maximum of 100 line items. - """ - shipping: NotRequired[ - "Literal['']|PaymentIntentService.UpdateParamsAmountDetailsShipping" - ] - """ - Contains information about the shipping portion of the amount. - """ - tax: NotRequired[ - "Literal['']|PaymentIntentService.UpdateParamsAmountDetailsTax" - ] - """ - Contains information about the tax portion of the amount. - """ - - class UpdateParamsAmountDetailsLineItem(TypedDict): - discount_amount: NotRequired[int] - """ - The amount an item was discounted for. Positive integer. - """ - payment_method_options: NotRequired[ - "PaymentIntentService.UpdateParamsAmountDetailsLineItemPaymentMethodOptions" - ] - """ - Payment method-specific information for line items. - """ - product_code: NotRequired[str] - """ - Unique identifier of the product. At most 12 characters long. - """ - product_name: str - """ - Name of the product. At most 100 characters long. - """ - quantity: int - """ - Number of items of the product. Positive integer. - """ - tax: NotRequired[ - "PaymentIntentService.UpdateParamsAmountDetailsLineItemTax" - ] - """ - Contains information about the tax on the item. - """ - unit_cost: int - """ - Cost of the product. Non-negative integer. - """ - unit_of_measure: NotRequired[str] - """ - A unit of measure for the line item, such as gallons, feet, meters, etc. - """ - - class UpdateParamsAmountDetailsLineItemPaymentMethodOptions(TypedDict): - card: NotRequired[ - "PaymentIntentService.UpdateParamsAmountDetailsLineItemPaymentMethodOptionsCard" - ] - """ - This sub-hash contains line item details that are specific to `card` payment method." - """ - card_present: NotRequired[ - "PaymentIntentService.UpdateParamsAmountDetailsLineItemPaymentMethodOptionsCardPresent" - ] - """ - This sub-hash contains line item details that are specific to `card_present` payment method." - """ - klarna: NotRequired[ - "PaymentIntentService.UpdateParamsAmountDetailsLineItemPaymentMethodOptionsKlarna" - ] - """ - This sub-hash contains line item details that are specific to `klarna` payment method." - """ - paypal: NotRequired[ - "PaymentIntentService.UpdateParamsAmountDetailsLineItemPaymentMethodOptionsPaypal" - ] - """ - This sub-hash contains line item details that are specific to `paypal` payment method." - """ - - class UpdateParamsAmountDetailsLineItemPaymentMethodOptionsCard(TypedDict): - commodity_code: NotRequired[str] - """ - Identifier that categorizes the items being purchased using a standardized commodity scheme such as (but not limited to) UNSPSC, NAICS, NAPCS, etc. - """ - - class UpdateParamsAmountDetailsLineItemPaymentMethodOptionsCardPresent( - TypedDict, - ): - commodity_code: NotRequired[str] - """ - Identifier that categorizes the items being purchased using a standardized commodity scheme such as (but not limited to) UNSPSC, NAICS, NAPCS, etc. - """ - - class UpdateParamsAmountDetailsLineItemPaymentMethodOptionsKlarna( - TypedDict, - ): - image_url: NotRequired[str] - """ - URL to an image for the product. Max length, 4096 characters. - """ - product_url: NotRequired[str] - """ - URL to the product page. Max length, 4096 characters. - """ - subscription_reference: NotRequired[str] - """ - Reference for the subscription this line item is for. - """ - - class UpdateParamsAmountDetailsLineItemPaymentMethodOptionsPaypal( - TypedDict, - ): - category: NotRequired[ - Literal["digital_goods", "donation", "physical_goods"] - ] - """ - Type of the line item. - """ - description: NotRequired[str] - """ - Description of the line item. - """ - sold_by: NotRequired[str] - """ - The Stripe account ID of the connected account that sells the item. - """ - - class UpdateParamsAmountDetailsLineItemTax(TypedDict): - total_tax_amount: int - """ - The total tax on an item. Non-negative integer. - """ - - class UpdateParamsAmountDetailsShipping(TypedDict): - amount: NotRequired["Literal['']|int"] - """ - Portion of the amount that is for shipping. - """ - from_postal_code: NotRequired["Literal['']|str"] - """ - The postal code that represents the shipping source. - """ - to_postal_code: NotRequired["Literal['']|str"] - """ - The postal code that represents the shipping destination. - """ - - class UpdateParamsAmountDetailsTax(TypedDict): - total_tax_amount: int - """ - Total portion of the amount that is for tax. - """ - - class UpdateParamsHooks(TypedDict): - inputs: NotRequired["PaymentIntentService.UpdateParamsHooksInputs"] - """ - Arguments passed in automations - """ - - class UpdateParamsHooksInputs(TypedDict): - tax: NotRequired["PaymentIntentService.UpdateParamsHooksInputsTax"] - """ - Tax arguments for automations - """ - - class UpdateParamsHooksInputsTax(TypedDict): - calculation: Union[Literal[""], str] - """ - The [TaxCalculation](https://stripe.com/docs/api/tax/calculations) id - """ - - class UpdateParamsMandateData(TypedDict): - customer_acceptance: ( - "PaymentIntentService.UpdateParamsMandateDataCustomerAcceptance" - ) - """ - This hash contains details about the customer acceptance of the Mandate. - """ - - class UpdateParamsMandateDataCustomerAcceptance(TypedDict): - online: "PaymentIntentService.UpdateParamsMandateDataCustomerAcceptanceOnline" - """ - If this is a Mandate accepted online, this hash contains details about the online acceptance. - """ - type: Literal["online"] - """ - The type of customer acceptance information included with the Mandate. - """ - - class UpdateParamsMandateDataCustomerAcceptanceOnline(TypedDict): - ip_address: NotRequired[str] - """ - The IP address from which the Mandate was accepted by the customer. - """ - user_agent: NotRequired[str] - """ - The user agent of the browser from which the Mandate was accepted by the customer. - """ - - class UpdateParamsPaymentDetails(TypedDict): - car_rental: NotRequired[ - "PaymentIntentService.UpdateParamsPaymentDetailsCarRental" - ] - """ - Car rental details for this PaymentIntent. - """ - customer_reference: NotRequired["Literal['']|str"] - """ - Some customers might be required by their company or organization to provide this information. If so, provide this value. Otherwise you can ignore this field. - """ - event_details: NotRequired[ - "PaymentIntentService.UpdateParamsPaymentDetailsEventDetails" - ] - """ - Event details for this PaymentIntent - """ - flight: NotRequired[ - "PaymentIntentService.UpdateParamsPaymentDetailsFlight" - ] - """ - Flight reservation details for this PaymentIntent - """ - lodging: NotRequired[ - "PaymentIntentService.UpdateParamsPaymentDetailsLodging" - ] - """ - Lodging reservation details for this PaymentIntent - """ - order_reference: NotRequired["Literal['']|str"] - """ - A unique value assigned by the business to identify the transaction. - """ - subscription: NotRequired[ - "PaymentIntentService.UpdateParamsPaymentDetailsSubscription" - ] - """ - Subscription details for this PaymentIntent - """ - - class UpdateParamsPaymentDetailsCarRental(TypedDict): - affiliate: NotRequired[ - "PaymentIntentService.UpdateParamsPaymentDetailsCarRentalAffiliate" - ] - """ - Affiliate details for this purchase. - """ - booking_number: str - """ - The booking number associated with the car rental. - """ - car_class_code: NotRequired[str] - """ - Class code of the car. - """ - car_make: NotRequired[str] - """ - Make of the car. - """ - car_model: NotRequired[str] - """ - Model of the car. - """ - company: NotRequired[str] - """ - The name of the rental car company. - """ - customer_service_phone_number: NotRequired[str] - """ - The customer service phone number of the car rental company. - """ - days_rented: int - """ - Number of days the car is being rented. - """ - delivery: NotRequired[ - "PaymentIntentService.UpdateParamsPaymentDetailsCarRentalDelivery" - ] - """ - Delivery details for this purchase. - """ - distance: NotRequired[ - "PaymentIntentService.UpdateParamsPaymentDetailsCarRentalDistance" - ] - """ - The details of the distance traveled during the rental period. - """ - drivers: NotRequired[ - List[ - "PaymentIntentService.UpdateParamsPaymentDetailsCarRentalDriver" - ] - ] - """ - The details of the passengers in the travel reservation - """ - extra_charges: NotRequired[ - List[ - Literal[ - "extra_mileage", - "gas", - "late_return", - "one_way_service", - "parking_violation", - ] - ] - ] - """ - List of additional charges being billed. - """ - no_show: NotRequired[bool] - """ - Indicates if the customer did not keep nor cancel their booking. - """ - pickup_address: NotRequired[ - "PaymentIntentService.UpdateParamsPaymentDetailsCarRentalPickupAddress" - ] - """ - Car pick-up address. - """ - pickup_at: int - """ - Car pick-up time. Measured in seconds since the Unix epoch. - """ - pickup_location_name: NotRequired[str] - """ - Name of the pickup location. - """ - rate_amount: NotRequired[int] - """ - Rental rate. - """ - rate_interval: NotRequired[Literal["day", "month", "week"]] - """ - The frequency at which the rate amount is applied. One of `day`, `week` or `month` - """ - renter_name: NotRequired[str] - """ - The name of the person or entity renting the car. - """ - return_address: NotRequired[ - "PaymentIntentService.UpdateParamsPaymentDetailsCarRentalReturnAddress" - ] - """ - Car return address. - """ - return_at: int - """ - Car return time. Measured in seconds since the Unix epoch. - """ - return_location_name: NotRequired[str] - """ - Name of the return location. - """ - tax_exempt: NotRequired[bool] - """ - Indicates whether the goods or services are tax-exempt or tax is not collected. - """ - vehicle_identification_number: NotRequired[str] - """ - The vehicle identification number. - """ - - class UpdateParamsPaymentDetailsCarRentalAffiliate(TypedDict): - name: str - """ - The name of the affiliate that originated the purchase. - """ - - class UpdateParamsPaymentDetailsCarRentalDelivery(TypedDict): - mode: NotRequired[Literal["email", "phone", "pickup", "post"]] - """ - The delivery method for the payment - """ - recipient: NotRequired[ - "PaymentIntentService.UpdateParamsPaymentDetailsCarRentalDeliveryRecipient" - ] - """ - Details of the recipient. - """ - - class UpdateParamsPaymentDetailsCarRentalDeliveryRecipient(TypedDict): - email: NotRequired[str] - """ - The email of the recipient the ticket is delivered to. - """ - name: NotRequired[str] - """ - The name of the recipient the ticket is delivered to. - """ - phone: NotRequired[str] - """ - The phone number of the recipient the ticket is delivered to. - """ - - class UpdateParamsPaymentDetailsCarRentalDistance(TypedDict): - amount: NotRequired[int] - """ - Distance traveled. - """ - unit: NotRequired[Literal["kilometers", "miles"]] - """ - Unit of measurement for the distance traveled. One of `miles` or `kilometers`. - """ - - class UpdateParamsPaymentDetailsCarRentalDriver(TypedDict): - driver_identification_number: NotRequired[str] - """ - Driver's identification number. - """ - driver_tax_number: NotRequired[str] - """ - Driver's tax number. - """ - name: str - """ - Full name of the person or entity on the car reservation. - """ - - class UpdateParamsPaymentDetailsCarRentalPickupAddress(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. - """ - - class UpdateParamsPaymentDetailsCarRentalReturnAddress(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. - """ - - class UpdateParamsPaymentDetailsEventDetails(TypedDict): - access_controlled_venue: NotRequired[bool] - """ - Indicates if the tickets are digitally checked when entering the venue. - """ - address: NotRequired[ - "PaymentIntentService.UpdateParamsPaymentDetailsEventDetailsAddress" - ] - """ - The event location's address. - """ - affiliate: NotRequired[ - "PaymentIntentService.UpdateParamsPaymentDetailsEventDetailsAffiliate" - ] - """ - Affiliate details for this purchase. - """ - company: NotRequired[str] - """ - The name of the company - """ - delivery: NotRequired[ - "PaymentIntentService.UpdateParamsPaymentDetailsEventDetailsDelivery" - ] - """ - Delivery details for this purchase. - """ - ends_at: NotRequired[int] - """ - Event end time. Measured in seconds since the Unix epoch. - """ - genre: NotRequired[str] - """ - Type of the event entertainment (concert, sports event etc) - """ - name: str - """ - The name of the event. - """ - starts_at: NotRequired[int] - """ - Event start time. Measured in seconds since the Unix epoch. - """ - - class UpdateParamsPaymentDetailsEventDetailsAddress(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. - """ - - class UpdateParamsPaymentDetailsEventDetailsAffiliate(TypedDict): - name: str - """ - The name of the affiliate that originated the purchase. - """ - - class UpdateParamsPaymentDetailsEventDetailsDelivery(TypedDict): - mode: NotRequired[Literal["email", "phone", "pickup", "post"]] - """ - The delivery method for the payment - """ - recipient: NotRequired[ - "PaymentIntentService.UpdateParamsPaymentDetailsEventDetailsDeliveryRecipient" - ] - """ - Details of the recipient. - """ - - class UpdateParamsPaymentDetailsEventDetailsDeliveryRecipient(TypedDict): - email: NotRequired[str] - """ - The email of the recipient the ticket is delivered to. - """ - name: NotRequired[str] - """ - The name of the recipient the ticket is delivered to. - """ - phone: NotRequired[str] - """ - The phone number of the recipient the ticket is delivered to. - """ - - class UpdateParamsPaymentDetailsFlight(TypedDict): - affiliate: NotRequired[ - "PaymentIntentService.UpdateParamsPaymentDetailsFlightAffiliate" - ] - """ - Affiliate details for this purchase. - """ - agency_number: NotRequired[str] - """ - The agency number (i.e. International Air Transport Association (IATA) agency number) of the travel agency that made the booking. - """ - carrier: NotRequired[str] - """ - The International Air Transport Association (IATA) carrier code of the carrier that issued the ticket. - """ - delivery: NotRequired[ - "PaymentIntentService.UpdateParamsPaymentDetailsFlightDelivery" - ] - """ - Delivery details for this purchase. - """ - passenger_name: NotRequired[str] - """ - The name of the person or entity on the reservation. - """ - passengers: NotRequired[ - List[ - "PaymentIntentService.UpdateParamsPaymentDetailsFlightPassenger" - ] - ] - """ - The details of the passengers in the travel reservation. - """ - segments: List[ - "PaymentIntentService.UpdateParamsPaymentDetailsFlightSegment" - ] - """ - The individual flight segments associated with the trip. - """ - ticket_number: NotRequired[str] - """ - The ticket number associated with the travel reservation. - """ - - class UpdateParamsPaymentDetailsFlightAffiliate(TypedDict): - name: str - """ - The name of the affiliate that originated the purchase. - """ - - class UpdateParamsPaymentDetailsFlightDelivery(TypedDict): - mode: NotRequired[Literal["email", "phone", "pickup", "post"]] - """ - The delivery method for the payment - """ - recipient: NotRequired[ - "PaymentIntentService.UpdateParamsPaymentDetailsFlightDeliveryRecipient" - ] - """ - Details of the recipient. - """ - - class UpdateParamsPaymentDetailsFlightDeliveryRecipient(TypedDict): - email: NotRequired[str] - """ - The email of the recipient the ticket is delivered to. - """ - name: NotRequired[str] - """ - The name of the recipient the ticket is delivered to. - """ - phone: NotRequired[str] - """ - The phone number of the recipient the ticket is delivered to. - """ - - class UpdateParamsPaymentDetailsFlightPassenger(TypedDict): - name: str - """ - Full name of the person or entity on the flight reservation. - """ - - class UpdateParamsPaymentDetailsFlightSegment(TypedDict): - amount: NotRequired[int] - """ - The flight segment amount. - """ - arrival_airport: NotRequired[str] - """ - The International Air Transport Association (IATA) airport code for the arrival airport. - """ - arrives_at: NotRequired[int] - """ - The arrival time for the flight segment. Measured in seconds since the Unix epoch. - """ - carrier: NotRequired[str] - """ - The International Air Transport Association (IATA) carrier code of the carrier operating the flight segment. - """ - departs_at: int - """ - The departure time for the flight segment. Measured in seconds since the Unix epoch. - """ - departure_airport: NotRequired[str] - """ - The International Air Transport Association (IATA) airport code for the departure airport. - """ - flight_number: NotRequired[str] - """ - The flight number associated with the segment - """ - service_class: NotRequired[ - Literal["business", "economy", "first", "premium_economy"] - ] - """ - The fare class for the segment. - """ - - class UpdateParamsPaymentDetailsLodging(TypedDict): - address: NotRequired[ - "PaymentIntentService.UpdateParamsPaymentDetailsLodgingAddress" - ] - """ - The lodging location's address. - """ - adults: NotRequired[int] - """ - The number of adults on the booking - """ - affiliate: NotRequired[ - "PaymentIntentService.UpdateParamsPaymentDetailsLodgingAffiliate" - ] - """ - Affiliate details for this purchase. - """ - booking_number: NotRequired[str] - """ - The booking number associated with the lodging reservation. - """ - category: NotRequired[Literal["hotel", "vacation_rental"]] - """ - The lodging category - """ - checkin_at: int - """ - Lodging check-in time. Measured in seconds since the Unix epoch. - """ - checkout_at: int - """ - Lodging check-out time. Measured in seconds since the Unix epoch. - """ - customer_service_phone_number: NotRequired[str] - """ - The customer service phone number of the lodging company. - """ - daily_room_rate_amount: NotRequired[int] - """ - The daily lodging room rate. - """ - delivery: NotRequired[ - "PaymentIntentService.UpdateParamsPaymentDetailsLodgingDelivery" - ] - """ - Delivery details for this purchase. - """ - extra_charges: NotRequired[ - List[ - Literal[ - "gift_shop", - "laundry", - "mini_bar", - "other", - "restaurant", - "telephone", - ] - ] - ] - """ - List of additional charges being billed. - """ - fire_safety_act_compliance: NotRequired[bool] - """ - Indicates whether the lodging location is compliant with the Fire Safety Act. - """ - name: NotRequired[str] - """ - The name of the lodging location. - """ - no_show: NotRequired[bool] - """ - Indicates if the customer did not keep their booking while failing to cancel the reservation. - """ - number_of_rooms: NotRequired[int] - """ - The number of rooms on the booking - """ - passengers: NotRequired[ - List[ - "PaymentIntentService.UpdateParamsPaymentDetailsLodgingPassenger" - ] - ] - """ - The details of the passengers in the travel reservation - """ - property_phone_number: NotRequired[str] - """ - The phone number of the lodging location. - """ - room_class: NotRequired[str] - """ - The room class for this purchase. - """ - room_nights: NotRequired[int] - """ - The number of room nights - """ - total_room_tax_amount: NotRequired[int] - """ - The total tax amount associating with the room reservation. - """ - total_tax_amount: NotRequired[int] - """ - The total tax amount - """ - - class UpdateParamsPaymentDetailsLodgingAddress(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. - """ - - class UpdateParamsPaymentDetailsLodgingAffiliate(TypedDict): - name: str - """ - The name of the affiliate that originated the purchase. - """ - - class UpdateParamsPaymentDetailsLodgingDelivery(TypedDict): - mode: NotRequired[Literal["email", "phone", "pickup", "post"]] - """ - The delivery method for the payment - """ - recipient: NotRequired[ - "PaymentIntentService.UpdateParamsPaymentDetailsLodgingDeliveryRecipient" - ] - """ - Details of the recipient. - """ - - class UpdateParamsPaymentDetailsLodgingDeliveryRecipient(TypedDict): - email: NotRequired[str] - """ - The email of the recipient the ticket is delivered to. - """ - name: NotRequired[str] - """ - The name of the recipient the ticket is delivered to. - """ - phone: NotRequired[str] - """ - The phone number of the recipient the ticket is delivered to. - """ - - class UpdateParamsPaymentDetailsLodgingPassenger(TypedDict): - name: str - """ - Full name of the person or entity on the lodging reservation. - """ - - class UpdateParamsPaymentDetailsSubscription(TypedDict): - affiliate: NotRequired[ - "PaymentIntentService.UpdateParamsPaymentDetailsSubscriptionAffiliate" - ] - """ - Affiliate details for this purchase. - """ - auto_renewal: NotRequired[bool] - """ - Info whether the subscription will be auto renewed upon expiry. - """ - billing_interval: NotRequired[ - "PaymentIntentService.UpdateParamsPaymentDetailsSubscriptionBillingInterval" - ] - """ - Subscription billing details for this purchase. - """ - ends_at: NotRequired[int] - """ - Subscription end time. Measured in seconds since the Unix epoch. - """ - name: str - """ - Name of the product on subscription. e.g. Apple Music Subscription - """ - starts_at: NotRequired[int] - """ - Subscription start time. Measured in seconds since the Unix epoch. - """ - - class UpdateParamsPaymentDetailsSubscriptionAffiliate(TypedDict): - name: str - """ - The name of the affiliate that originated the purchase. - """ - - class UpdateParamsPaymentDetailsSubscriptionBillingInterval(TypedDict): - count: int - """ - The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. - """ - interval: Literal["day", "month", "week", "year"] - """ - Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. - """ - - class UpdateParamsPaymentMethodData(TypedDict): - acss_debit: NotRequired[ - "PaymentIntentService.UpdateParamsPaymentMethodDataAcssDebit" - ] - """ - If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method. - """ - affirm: NotRequired[ - "PaymentIntentService.UpdateParamsPaymentMethodDataAffirm" - ] - """ - If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method. - """ - afterpay_clearpay: NotRequired[ - "PaymentIntentService.UpdateParamsPaymentMethodDataAfterpayClearpay" - ] - """ - If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method. - """ - alipay: NotRequired[ - "PaymentIntentService.UpdateParamsPaymentMethodDataAlipay" - ] - """ - If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. - """ - allow_redisplay: NotRequired[ - Literal["always", "limited", "unspecified"] - ] - """ - This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`. - """ - alma: NotRequired[ - "PaymentIntentService.UpdateParamsPaymentMethodDataAlma" - ] - """ - If this is a Alma PaymentMethod, this hash contains details about the Alma payment method. - """ - amazon_pay: NotRequired[ - "PaymentIntentService.UpdateParamsPaymentMethodDataAmazonPay" - ] - """ - If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method. - """ - au_becs_debit: NotRequired[ - "PaymentIntentService.UpdateParamsPaymentMethodDataAuBecsDebit" - ] - """ - If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. - """ - bacs_debit: NotRequired[ - "PaymentIntentService.UpdateParamsPaymentMethodDataBacsDebit" - ] - """ - If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account. - """ - bancontact: NotRequired[ - "PaymentIntentService.UpdateParamsPaymentMethodDataBancontact" - ] - """ - If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method. - """ - billie: NotRequired[ - "PaymentIntentService.UpdateParamsPaymentMethodDataBillie" - ] - """ - If this is a `billie` PaymentMethod, this hash contains details about the Billie payment method. - """ - billing_details: NotRequired[ - "PaymentIntentService.UpdateParamsPaymentMethodDataBillingDetails" - ] - """ - Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. - """ - blik: NotRequired[ - "PaymentIntentService.UpdateParamsPaymentMethodDataBlik" - ] - """ - If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method. - """ - boleto: NotRequired[ - "PaymentIntentService.UpdateParamsPaymentMethodDataBoleto" - ] - """ - If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method. - """ - cashapp: NotRequired[ - "PaymentIntentService.UpdateParamsPaymentMethodDataCashapp" - ] - """ - If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. - """ - crypto: NotRequired[ - "PaymentIntentService.UpdateParamsPaymentMethodDataCrypto" - ] - """ - If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment method. - """ - customer_balance: NotRequired[ - "PaymentIntentService.UpdateParamsPaymentMethodDataCustomerBalance" - ] - """ - If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. - """ - eps: NotRequired[ - "PaymentIntentService.UpdateParamsPaymentMethodDataEps" - ] - """ - If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. - """ - fpx: NotRequired[ - "PaymentIntentService.UpdateParamsPaymentMethodDataFpx" - ] - """ - If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method. - """ - giropay: NotRequired[ - "PaymentIntentService.UpdateParamsPaymentMethodDataGiropay" - ] - """ - If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method. - """ - gopay: NotRequired[ - "PaymentIntentService.UpdateParamsPaymentMethodDataGopay" - ] - """ - If this is a Gopay PaymentMethod, this hash contains details about the Gopay payment method. - """ - grabpay: NotRequired[ - "PaymentIntentService.UpdateParamsPaymentMethodDataGrabpay" - ] - """ - If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method. - """ - id_bank_transfer: NotRequired[ - "PaymentIntentService.UpdateParamsPaymentMethodDataIdBankTransfer" - ] - """ - If this is an `IdBankTransfer` PaymentMethod, this hash contains details about the IdBankTransfer payment method. - """ - ideal: NotRequired[ - "PaymentIntentService.UpdateParamsPaymentMethodDataIdeal" - ] - """ - If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. - """ - interac_present: NotRequired[ - "PaymentIntentService.UpdateParamsPaymentMethodDataInteracPresent" - ] - """ - If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. - """ - kakao_pay: NotRequired[ - "PaymentIntentService.UpdateParamsPaymentMethodDataKakaoPay" - ] - """ - If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method. - """ - klarna: NotRequired[ - "PaymentIntentService.UpdateParamsPaymentMethodDataKlarna" - ] - """ - If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method. - """ - konbini: NotRequired[ - "PaymentIntentService.UpdateParamsPaymentMethodDataKonbini" - ] - """ - If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. - """ - kr_card: NotRequired[ - "PaymentIntentService.UpdateParamsPaymentMethodDataKrCard" - ] - """ - If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method. - """ - link: NotRequired[ - "PaymentIntentService.UpdateParamsPaymentMethodDataLink" - ] - """ - If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. - """ - mb_way: NotRequired[ - "PaymentIntentService.UpdateParamsPaymentMethodDataMbWay" - ] - """ - If this is a MB WAY PaymentMethod, this hash contains details about the MB WAY payment method. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - mobilepay: NotRequired[ - "PaymentIntentService.UpdateParamsPaymentMethodDataMobilepay" - ] - """ - If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method. - """ - multibanco: NotRequired[ - "PaymentIntentService.UpdateParamsPaymentMethodDataMultibanco" - ] - """ - If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method. - """ - naver_pay: NotRequired[ - "PaymentIntentService.UpdateParamsPaymentMethodDataNaverPay" - ] - """ - If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method. - """ - nz_bank_account: NotRequired[ - "PaymentIntentService.UpdateParamsPaymentMethodDataNzBankAccount" - ] - """ - If this is an nz_bank_account PaymentMethod, this hash contains details about the nz_bank_account payment method. - """ - oxxo: NotRequired[ - "PaymentIntentService.UpdateParamsPaymentMethodDataOxxo" - ] - """ - If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. - """ - p24: NotRequired[ - "PaymentIntentService.UpdateParamsPaymentMethodDataP24" - ] - """ - If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. - """ - pay_by_bank: NotRequired[ - "PaymentIntentService.UpdateParamsPaymentMethodDataPayByBank" - ] - """ - If this is a `pay_by_bank` PaymentMethod, this hash contains details about the PayByBank payment method. - """ - payco: NotRequired[ - "PaymentIntentService.UpdateParamsPaymentMethodDataPayco" - ] - """ - If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method. - """ - paynow: NotRequired[ - "PaymentIntentService.UpdateParamsPaymentMethodDataPaynow" - ] - """ - If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method. - """ - paypal: NotRequired[ - "PaymentIntentService.UpdateParamsPaymentMethodDataPaypal" - ] - """ - If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method. - """ - paypay: NotRequired[ - "PaymentIntentService.UpdateParamsPaymentMethodDataPaypay" - ] - """ - If this is a `paypay` PaymentMethod, this hash contains details about the PayPay payment method. - """ - payto: NotRequired[ - "PaymentIntentService.UpdateParamsPaymentMethodDataPayto" - ] - """ - If this is a `payto` PaymentMethod, this hash contains details about the PayTo payment method. - """ - pix: NotRequired[ - "PaymentIntentService.UpdateParamsPaymentMethodDataPix" - ] - """ - If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method. - """ - promptpay: NotRequired[ - "PaymentIntentService.UpdateParamsPaymentMethodDataPromptpay" - ] - """ - If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method. - """ - qris: NotRequired[ - "PaymentIntentService.UpdateParamsPaymentMethodDataQris" - ] - """ - If this is a `qris` PaymentMethod, this hash contains details about the QRIS payment method. - """ - radar_options: NotRequired[ - "PaymentIntentService.UpdateParamsPaymentMethodDataRadarOptions" - ] - """ - Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. - """ - rechnung: NotRequired[ - "PaymentIntentService.UpdateParamsPaymentMethodDataRechnung" - ] - """ - If this is a `rechnung` PaymentMethod, this hash contains details about the Rechnung payment method. - """ - revolut_pay: NotRequired[ - "PaymentIntentService.UpdateParamsPaymentMethodDataRevolutPay" - ] - """ - If this is a `revolut_pay` PaymentMethod, this hash contains details about the Revolut Pay payment method. - """ - samsung_pay: NotRequired[ - "PaymentIntentService.UpdateParamsPaymentMethodDataSamsungPay" - ] - """ - If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method. - """ - satispay: NotRequired[ - "PaymentIntentService.UpdateParamsPaymentMethodDataSatispay" - ] - """ - If this is a `satispay` PaymentMethod, this hash contains details about the Satispay payment method. - """ - sepa_debit: NotRequired[ - "PaymentIntentService.UpdateParamsPaymentMethodDataSepaDebit" - ] - """ - If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. - """ - shopeepay: NotRequired[ - "PaymentIntentService.UpdateParamsPaymentMethodDataShopeepay" - ] - """ - If this is a Shopeepay PaymentMethod, this hash contains details about the Shopeepay payment method. - """ - sofort: NotRequired[ - "PaymentIntentService.UpdateParamsPaymentMethodDataSofort" - ] - """ - If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. - """ - stripe_balance: NotRequired[ - "PaymentIntentService.UpdateParamsPaymentMethodDataStripeBalance" - ] - """ - This hash contains details about the Stripe balance payment method. - """ - swish: NotRequired[ - "PaymentIntentService.UpdateParamsPaymentMethodDataSwish" - ] - """ - If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method. - """ - twint: NotRequired[ - "PaymentIntentService.UpdateParamsPaymentMethodDataTwint" - ] - """ - If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method. - """ - type: Literal[ - "acss_debit", - "affirm", - "afterpay_clearpay", - "alipay", - "alma", - "amazon_pay", - "au_becs_debit", - "bacs_debit", - "bancontact", - "billie", - "blik", - "boleto", - "cashapp", - "crypto", - "customer_balance", - "eps", - "fpx", - "giropay", - "gopay", - "grabpay", - "id_bank_transfer", - "ideal", - "kakao_pay", - "klarna", - "konbini", - "kr_card", - "link", - "mb_way", - "mobilepay", - "multibanco", - "naver_pay", - "nz_bank_account", - "oxxo", - "p24", - "pay_by_bank", - "payco", - "paynow", - "paypal", - "paypay", - "payto", - "pix", - "promptpay", - "qris", - "rechnung", - "revolut_pay", - "samsung_pay", - "satispay", - "sepa_debit", - "shopeepay", - "sofort", - "stripe_balance", - "swish", - "twint", - "us_bank_account", - "wechat_pay", - "zip", - ] - """ - The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. - """ - us_bank_account: NotRequired[ - "PaymentIntentService.UpdateParamsPaymentMethodDataUsBankAccount" - ] - """ - If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. - """ - wechat_pay: NotRequired[ - "PaymentIntentService.UpdateParamsPaymentMethodDataWechatPay" - ] - """ - If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method. - """ - zip: NotRequired[ - "PaymentIntentService.UpdateParamsPaymentMethodDataZip" - ] - """ - If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method. - """ - - class UpdateParamsPaymentMethodDataAcssDebit(TypedDict): - account_number: str - """ - Customer's bank account number. - """ - institution_number: str - """ - Institution number of the customer's bank. - """ - transit_number: str - """ - Transit number of the customer's bank. - """ - - class UpdateParamsPaymentMethodDataAffirm(TypedDict): - pass - - class UpdateParamsPaymentMethodDataAfterpayClearpay(TypedDict): - pass - - class UpdateParamsPaymentMethodDataAlipay(TypedDict): - pass - - class UpdateParamsPaymentMethodDataAlma(TypedDict): - pass - - class UpdateParamsPaymentMethodDataAmazonPay(TypedDict): - pass - - class UpdateParamsPaymentMethodDataAuBecsDebit(TypedDict): - account_number: str - """ - The account number for the bank account. - """ - bsb_number: str - """ - Bank-State-Branch number of the bank account. - """ - - class UpdateParamsPaymentMethodDataBacsDebit(TypedDict): - account_number: NotRequired[str] - """ - Account number of the bank account that the funds will be debited from. - """ - sort_code: NotRequired[str] - """ - Sort code of the bank account. (e.g., `10-20-30`) - """ - - class UpdateParamsPaymentMethodDataBancontact(TypedDict): - pass - - class UpdateParamsPaymentMethodDataBillie(TypedDict): - pass - - class UpdateParamsPaymentMethodDataBillingDetails(TypedDict): - address: NotRequired[ - "Literal['']|PaymentIntentService.UpdateParamsPaymentMethodDataBillingDetailsAddress" - ] - """ - Billing address. - """ - email: NotRequired["Literal['']|str"] - """ - Email address. - """ - name: NotRequired["Literal['']|str"] - """ - Full name. - """ - phone: NotRequired["Literal['']|str"] - """ - Billing phone number (including extension). - """ - tax_id: NotRequired[str] - """ - Taxpayer identification number. Used only for transactions between LATAM buyers and non-LATAM sellers. - """ - - class UpdateParamsPaymentMethodDataBillingDetailsAddress(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. - """ - - class UpdateParamsPaymentMethodDataBlik(TypedDict): - pass - - class UpdateParamsPaymentMethodDataBoleto(TypedDict): - tax_id: str - """ - The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers) - """ - - class UpdateParamsPaymentMethodDataCashapp(TypedDict): - pass - - class UpdateParamsPaymentMethodDataCrypto(TypedDict): - pass - - class UpdateParamsPaymentMethodDataCustomerBalance(TypedDict): - pass - - class UpdateParamsPaymentMethodDataEps(TypedDict): - bank: NotRequired[ - Literal[ - "arzte_und_apotheker_bank", - "austrian_anadi_bank_ag", - "bank_austria", - "bankhaus_carl_spangler", - "bankhaus_schelhammer_und_schattera_ag", - "bawag_psk_ag", - "bks_bank_ag", - "brull_kallmus_bank_ag", - "btv_vier_lander_bank", - "capital_bank_grawe_gruppe_ag", - "deutsche_bank_ag", - "dolomitenbank", - "easybank_ag", - "erste_bank_und_sparkassen", - "hypo_alpeadriabank_international_ag", - "hypo_bank_burgenland_aktiengesellschaft", - "hypo_noe_lb_fur_niederosterreich_u_wien", - "hypo_oberosterreich_salzburg_steiermark", - "hypo_tirol_bank_ag", - "hypo_vorarlberg_bank_ag", - "marchfelder_bank", - "oberbank_ag", - "raiffeisen_bankengruppe_osterreich", - "schoellerbank_ag", - "sparda_bank_wien", - "volksbank_gruppe", - "volkskreditbank_ag", - "vr_bank_braunau", - ] - ] - """ - The customer's bank. - """ - - class UpdateParamsPaymentMethodDataFpx(TypedDict): - account_holder_type: NotRequired[Literal["company", "individual"]] - """ - Account holder type for FPX transaction - """ - bank: Literal[ - "affin_bank", - "agrobank", - "alliance_bank", - "ambank", - "bank_islam", - "bank_muamalat", - "bank_of_china", - "bank_rakyat", - "bsn", - "cimb", - "deutsche_bank", - "hong_leong_bank", - "hsbc", - "kfh", - "maybank2e", - "maybank2u", - "ocbc", - "pb_enterprise", - "public_bank", - "rhb", - "standard_chartered", - "uob", - ] - """ - The customer's bank. - """ - - class UpdateParamsPaymentMethodDataGiropay(TypedDict): - pass - - class UpdateParamsPaymentMethodDataGopay(TypedDict): - pass - - class UpdateParamsPaymentMethodDataGrabpay(TypedDict): - pass - - class UpdateParamsPaymentMethodDataIdBankTransfer(TypedDict): - bank: NotRequired[Literal["bca", "bni", "bri", "cimb", "permata"]] - """ - Bank where the account is held. - """ - - class UpdateParamsPaymentMethodDataIdeal(TypedDict): - bank: NotRequired[ - Literal[ - "abn_amro", - "asn_bank", - "bunq", - "buut", - "handelsbanken", - "ing", - "knab", - "moneyou", - "n26", - "nn", - "rabobank", - "regiobank", - "revolut", - "sns_bank", - "triodos_bank", - "van_lanschot", - "yoursafe", - ] - ] - """ - The customer's bank. Only use this parameter for existing customers. Don't use it for new customers. - """ - - class UpdateParamsPaymentMethodDataInteracPresent(TypedDict): - pass - - class UpdateParamsPaymentMethodDataKakaoPay(TypedDict): - pass - - class UpdateParamsPaymentMethodDataKlarna(TypedDict): - dob: NotRequired[ - "PaymentIntentService.UpdateParamsPaymentMethodDataKlarnaDob" - ] - """ - Customer's date of birth - """ - - class UpdateParamsPaymentMethodDataKlarnaDob(TypedDict): - day: int - """ - The day of birth, between 1 and 31. - """ - month: int - """ - The month of birth, between 1 and 12. - """ - year: int - """ - The four-digit year of birth. - """ - - class UpdateParamsPaymentMethodDataKonbini(TypedDict): - pass - - class UpdateParamsPaymentMethodDataKrCard(TypedDict): - pass - - class UpdateParamsPaymentMethodDataLink(TypedDict): - pass - - class UpdateParamsPaymentMethodDataMbWay(TypedDict): - pass - - class UpdateParamsPaymentMethodDataMobilepay(TypedDict): - pass - - class UpdateParamsPaymentMethodDataMultibanco(TypedDict): - pass - - class UpdateParamsPaymentMethodDataNaverPay(TypedDict): - funding: NotRequired[Literal["card", "points"]] - """ - Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`. - """ - - class UpdateParamsPaymentMethodDataNzBankAccount(TypedDict): - account_holder_name: NotRequired[str] - """ - The name on the bank account. Only required if the account holder name is different from the name of the authorized signatory collected in the PaymentMethod's billing details. - """ - account_number: str - """ - The account number for the bank account. - """ - bank_code: str - """ - The numeric code for the bank account's bank. - """ - branch_code: str - """ - The numeric code for the bank account's bank branch. - """ - reference: NotRequired[str] - suffix: str - """ - The suffix of the bank account number. - """ - - class UpdateParamsPaymentMethodDataOxxo(TypedDict): - pass - - class UpdateParamsPaymentMethodDataP24(TypedDict): - bank: NotRequired[ - Literal[ - "alior_bank", - "bank_millennium", - "bank_nowy_bfg_sa", - "bank_pekao_sa", - "banki_spbdzielcze", - "blik", - "bnp_paribas", - "boz", - "citi_handlowy", - "credit_agricole", - "envelobank", - "etransfer_pocztowy24", - "getin_bank", - "ideabank", - "ing", - "inteligo", - "mbank_mtransfer", - "nest_przelew", - "noble_pay", - "pbac_z_ipko", - "plus_bank", - "santander_przelew24", - "tmobile_usbugi_bankowe", - "toyota_bank", - "velobank", - "volkswagen_bank", - ] - ] - """ - The customer's bank. - """ - - class UpdateParamsPaymentMethodDataPayByBank(TypedDict): - pass - - class UpdateParamsPaymentMethodDataPayco(TypedDict): - pass - - class UpdateParamsPaymentMethodDataPaynow(TypedDict): - pass - - class UpdateParamsPaymentMethodDataPaypal(TypedDict): - pass - - class UpdateParamsPaymentMethodDataPaypay(TypedDict): - pass - - class UpdateParamsPaymentMethodDataPayto(TypedDict): - account_number: NotRequired[str] - """ - The account number for the bank account. - """ - bsb_number: NotRequired[str] - """ - Bank-State-Branch number of the bank account. - """ - pay_id: NotRequired[str] - """ - The PayID alias for the bank account. - """ - - class UpdateParamsPaymentMethodDataPix(TypedDict): - pass - - class UpdateParamsPaymentMethodDataPromptpay(TypedDict): - pass - - class UpdateParamsPaymentMethodDataQris(TypedDict): - pass - - class UpdateParamsPaymentMethodDataRadarOptions(TypedDict): - session: NotRequired[str] - """ - A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. - """ - - class UpdateParamsPaymentMethodDataRechnung(TypedDict): - dob: "PaymentIntentService.UpdateParamsPaymentMethodDataRechnungDob" - """ - Customer's date of birth - """ - - class UpdateParamsPaymentMethodDataRechnungDob(TypedDict): - day: int - """ - The day of birth, between 1 and 31. - """ - month: int - """ - The month of birth, between 1 and 12. - """ - year: int - """ - The four-digit year of birth. - """ - - class UpdateParamsPaymentMethodDataRevolutPay(TypedDict): - pass - - class UpdateParamsPaymentMethodDataSamsungPay(TypedDict): - pass - - class UpdateParamsPaymentMethodDataSatispay(TypedDict): - pass - - class UpdateParamsPaymentMethodDataSepaDebit(TypedDict): - iban: str - """ - IBAN of the bank account. - """ - - class UpdateParamsPaymentMethodDataShopeepay(TypedDict): - pass - - class UpdateParamsPaymentMethodDataSofort(TypedDict): - country: Literal["AT", "BE", "DE", "ES", "IT", "NL"] - """ - Two-letter ISO code representing the country the bank account is located in. - """ - - class UpdateParamsPaymentMethodDataStripeBalance(TypedDict): - account: NotRequired[str] - """ - The connected account ID whose Stripe balance to use as the source of payment - """ - source_type: NotRequired[Literal["bank_account", "card", "fpx"]] - """ - The [source_type](https://docs.stripe.com/api/balance/balance_object#balance_object-available-source_types) of the balance - """ - - class UpdateParamsPaymentMethodDataSwish(TypedDict): - pass - - class UpdateParamsPaymentMethodDataTwint(TypedDict): - pass - - class UpdateParamsPaymentMethodDataUsBankAccount(TypedDict): - account_holder_type: NotRequired[Literal["company", "individual"]] - """ - Account holder type: individual or company. - """ - account_number: NotRequired[str] - """ - Account number of the bank account. - """ - account_type: NotRequired[Literal["checking", "savings"]] - """ - Account type: checkings or savings. Defaults to checking if omitted. - """ - financial_connections_account: NotRequired[str] - """ - The ID of a Financial Connections Account to use as a payment method. - """ - routing_number: NotRequired[str] - """ - Routing number of the bank account. - """ - - class UpdateParamsPaymentMethodDataWechatPay(TypedDict): - pass - - class UpdateParamsPaymentMethodDataZip(TypedDict): - pass - - class UpdateParamsPaymentMethodOptions(TypedDict): - acss_debit: NotRequired[ - "Literal['']|PaymentIntentService.UpdateParamsPaymentMethodOptionsAcssDebit" - ] - """ - If this is a `acss_debit` PaymentMethod, this sub-hash contains details about the ACSS Debit payment method options. - """ - affirm: NotRequired[ - "Literal['']|PaymentIntentService.UpdateParamsPaymentMethodOptionsAffirm" - ] - """ - If this is an `affirm` PaymentMethod, this sub-hash contains details about the Affirm payment method options. - """ - afterpay_clearpay: NotRequired[ - "Literal['']|PaymentIntentService.UpdateParamsPaymentMethodOptionsAfterpayClearpay" - ] - """ - If this is a `afterpay_clearpay` PaymentMethod, this sub-hash contains details about the Afterpay Clearpay payment method options. - """ - alipay: NotRequired[ - "Literal['']|PaymentIntentService.UpdateParamsPaymentMethodOptionsAlipay" - ] - """ - If this is a `alipay` PaymentMethod, this sub-hash contains details about the Alipay payment method options. - """ - alma: NotRequired[ - "Literal['']|PaymentIntentService.UpdateParamsPaymentMethodOptionsAlma" - ] - """ - If this is a `alma` PaymentMethod, this sub-hash contains details about the Alma payment method options. - """ - amazon_pay: NotRequired[ - "Literal['']|PaymentIntentService.UpdateParamsPaymentMethodOptionsAmazonPay" - ] - """ - If this is a `amazon_pay` PaymentMethod, this sub-hash contains details about the Amazon Pay payment method options. - """ - au_becs_debit: NotRequired[ - "Literal['']|PaymentIntentService.UpdateParamsPaymentMethodOptionsAuBecsDebit" - ] - """ - If this is a `au_becs_debit` PaymentMethod, this sub-hash contains details about the AU BECS Direct Debit payment method options. - """ - bacs_debit: NotRequired[ - "Literal['']|PaymentIntentService.UpdateParamsPaymentMethodOptionsBacsDebit" - ] - """ - If this is a `bacs_debit` PaymentMethod, this sub-hash contains details about the BACS Debit payment method options. - """ - bancontact: NotRequired[ - "Literal['']|PaymentIntentService.UpdateParamsPaymentMethodOptionsBancontact" - ] - """ - If this is a `bancontact` PaymentMethod, this sub-hash contains details about the Bancontact payment method options. - """ - billie: NotRequired[ - "Literal['']|PaymentIntentService.UpdateParamsPaymentMethodOptionsBillie" - ] - """ - If this is a `billie` PaymentMethod, this sub-hash contains details about the Billie payment method options. - """ - blik: NotRequired[ - "Literal['']|PaymentIntentService.UpdateParamsPaymentMethodOptionsBlik" - ] - """ - If this is a `blik` PaymentMethod, this sub-hash contains details about the BLIK payment method options. - """ - boleto: NotRequired[ - "Literal['']|PaymentIntentService.UpdateParamsPaymentMethodOptionsBoleto" - ] - """ - If this is a `boleto` PaymentMethod, this sub-hash contains details about the Boleto payment method options. - """ - card: NotRequired[ - "Literal['']|PaymentIntentService.UpdateParamsPaymentMethodOptionsCard" - ] - """ - Configuration for any card payments attempted on this PaymentIntent. - """ - card_present: NotRequired[ - "Literal['']|PaymentIntentService.UpdateParamsPaymentMethodOptionsCardPresent" - ] - """ - If this is a `card_present` PaymentMethod, this sub-hash contains details about the Card Present payment method options. - """ - cashapp: NotRequired[ - "Literal['']|PaymentIntentService.UpdateParamsPaymentMethodOptionsCashapp" - ] - """ - If this is a `cashapp` PaymentMethod, this sub-hash contains details about the Cash App Pay payment method options. - """ - crypto: NotRequired[ - "Literal['']|PaymentIntentService.UpdateParamsPaymentMethodOptionsCrypto" - ] - """ - If this is a `crypto` PaymentMethod, this sub-hash contains details about the Crypto payment method options. - """ - customer_balance: NotRequired[ - "Literal['']|PaymentIntentService.UpdateParamsPaymentMethodOptionsCustomerBalance" - ] - """ - If this is a `customer balance` PaymentMethod, this sub-hash contains details about the customer balance payment method options. - """ - eps: NotRequired[ - "Literal['']|PaymentIntentService.UpdateParamsPaymentMethodOptionsEps" - ] - """ - If this is a `eps` PaymentMethod, this sub-hash contains details about the EPS payment method options. - """ - fpx: NotRequired[ - "Literal['']|PaymentIntentService.UpdateParamsPaymentMethodOptionsFpx" - ] - """ - If this is a `fpx` PaymentMethod, this sub-hash contains details about the FPX payment method options. - """ - giropay: NotRequired[ - "Literal['']|PaymentIntentService.UpdateParamsPaymentMethodOptionsGiropay" - ] - """ - If this is a `giropay` PaymentMethod, this sub-hash contains details about the Giropay payment method options. - """ - gopay: NotRequired[ - "Literal['']|PaymentIntentService.UpdateParamsPaymentMethodOptionsGopay" - ] - """ - If this is a `gopay` PaymentMethod, this sub-hash contains details about the Gopay payment method options. - """ - grabpay: NotRequired[ - "Literal['']|PaymentIntentService.UpdateParamsPaymentMethodOptionsGrabpay" - ] - """ - If this is a `grabpay` PaymentMethod, this sub-hash contains details about the Grabpay payment method options. - """ - id_bank_transfer: NotRequired[ - "Literal['']|PaymentIntentService.UpdateParamsPaymentMethodOptionsIdBankTransfer" - ] - """ - If this is a `id_bank_transfer` PaymentMethod, this sub-hash contains details about the Indonesia Bank Transfer payment method options. - """ - ideal: NotRequired[ - "Literal['']|PaymentIntentService.UpdateParamsPaymentMethodOptionsIdeal" - ] - """ - If this is a `ideal` PaymentMethod, this sub-hash contains details about the Ideal payment method options. - """ - interac_present: NotRequired[ - "Literal['']|PaymentIntentService.UpdateParamsPaymentMethodOptionsInteracPresent" - ] - """ - If this is a `interac_present` PaymentMethod, this sub-hash contains details about the Card Present payment method options. - """ - kakao_pay: NotRequired[ - "Literal['']|PaymentIntentService.UpdateParamsPaymentMethodOptionsKakaoPay" - ] - """ - If this is a `kakao_pay` PaymentMethod, this sub-hash contains details about the Kakao Pay payment method options. - """ - klarna: NotRequired[ - "Literal['']|PaymentIntentService.UpdateParamsPaymentMethodOptionsKlarna" - ] - """ - If this is a `klarna` PaymentMethod, this sub-hash contains details about the Klarna payment method options. - """ - konbini: NotRequired[ - "Literal['']|PaymentIntentService.UpdateParamsPaymentMethodOptionsKonbini" - ] - """ - If this is a `konbini` PaymentMethod, this sub-hash contains details about the Konbini payment method options. - """ - kr_card: NotRequired[ - "Literal['']|PaymentIntentService.UpdateParamsPaymentMethodOptionsKrCard" - ] - """ - If this is a `kr_card` PaymentMethod, this sub-hash contains details about the KR Card payment method options. - """ - link: NotRequired[ - "Literal['']|PaymentIntentService.UpdateParamsPaymentMethodOptionsLink" - ] - """ - If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options. - """ - mb_way: NotRequired[ - "Literal['']|PaymentIntentService.UpdateParamsPaymentMethodOptionsMbWay" - ] - """ - If this is a `mb_way` PaymentMethod, this sub-hash contains details about the MB WAY payment method options. - """ - mobilepay: NotRequired[ - "Literal['']|PaymentIntentService.UpdateParamsPaymentMethodOptionsMobilepay" - ] - """ - If this is a `MobilePay` PaymentMethod, this sub-hash contains details about the MobilePay payment method options. - """ - multibanco: NotRequired[ - "Literal['']|PaymentIntentService.UpdateParamsPaymentMethodOptionsMultibanco" - ] - """ - If this is a `multibanco` PaymentMethod, this sub-hash contains details about the Multibanco payment method options. - """ - naver_pay: NotRequired[ - "Literal['']|PaymentIntentService.UpdateParamsPaymentMethodOptionsNaverPay" - ] - """ - If this is a `naver_pay` PaymentMethod, this sub-hash contains details about the Naver Pay payment method options. - """ - nz_bank_account: NotRequired[ - "Literal['']|PaymentIntentService.UpdateParamsPaymentMethodOptionsNzBankAccount" - ] - """ - If this is a `nz_bank_account` PaymentMethod, this sub-hash contains details about the NZ BECS Direct Debit payment method options. - """ - oxxo: NotRequired[ - "Literal['']|PaymentIntentService.UpdateParamsPaymentMethodOptionsOxxo" - ] - """ - If this is a `oxxo` PaymentMethod, this sub-hash contains details about the OXXO payment method options. - """ - p24: NotRequired[ - "Literal['']|PaymentIntentService.UpdateParamsPaymentMethodOptionsP24" - ] - """ - If this is a `p24` PaymentMethod, this sub-hash contains details about the Przelewy24 payment method options. - """ - pay_by_bank: NotRequired[ - "Literal['']|PaymentIntentService.UpdateParamsPaymentMethodOptionsPayByBank" - ] - """ - If this is a `pay_by_bank` PaymentMethod, this sub-hash contains details about the PayByBank payment method options. - """ - payco: NotRequired[ - "Literal['']|PaymentIntentService.UpdateParamsPaymentMethodOptionsPayco" - ] - """ - If this is a `payco` PaymentMethod, this sub-hash contains details about the PAYCO payment method options. - """ - paynow: NotRequired[ - "Literal['']|PaymentIntentService.UpdateParamsPaymentMethodOptionsPaynow" - ] - """ - If this is a `paynow` PaymentMethod, this sub-hash contains details about the PayNow payment method options. - """ - paypal: NotRequired[ - "Literal['']|PaymentIntentService.UpdateParamsPaymentMethodOptionsPaypal" - ] - """ - If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options. - """ - paypay: NotRequired[ - "Literal['']|PaymentIntentService.UpdateParamsPaymentMethodOptionsPaypay" - ] - """ - If this is a `paypay` PaymentMethod, this sub-hash contains details about the PayPay payment method options. - """ - payto: NotRequired[ - "Literal['']|PaymentIntentService.UpdateParamsPaymentMethodOptionsPayto" - ] - """ - If this is a `payto` PaymentMethod, this sub-hash contains details about the PayTo payment method options. - """ - pix: NotRequired[ - "Literal['']|PaymentIntentService.UpdateParamsPaymentMethodOptionsPix" - ] - """ - If this is a `pix` PaymentMethod, this sub-hash contains details about the Pix payment method options. - """ - promptpay: NotRequired[ - "Literal['']|PaymentIntentService.UpdateParamsPaymentMethodOptionsPromptpay" - ] - """ - If this is a `promptpay` PaymentMethod, this sub-hash contains details about the PromptPay payment method options. - """ - qris: NotRequired[ - "Literal['']|PaymentIntentService.UpdateParamsPaymentMethodOptionsQris" - ] - """ - If this is a `qris` PaymentMethod, this sub-hash contains details about the QRIS payment method options. - """ - rechnung: NotRequired[ - "Literal['']|PaymentIntentService.UpdateParamsPaymentMethodOptionsRechnung" - ] - """ - If this is a `rechnung` PaymentMethod, this sub-hash contains details about the Rechnung payment method options. - """ - revolut_pay: NotRequired[ - "Literal['']|PaymentIntentService.UpdateParamsPaymentMethodOptionsRevolutPay" - ] - """ - If this is a `revolut_pay` PaymentMethod, this sub-hash contains details about the Revolut Pay payment method options. - """ - samsung_pay: NotRequired[ - "Literal['']|PaymentIntentService.UpdateParamsPaymentMethodOptionsSamsungPay" - ] - """ - If this is a `samsung_pay` PaymentMethod, this sub-hash contains details about the Samsung Pay payment method options. - """ - satispay: NotRequired[ - "Literal['']|PaymentIntentService.UpdateParamsPaymentMethodOptionsSatispay" - ] - """ - If this is a `satispay` PaymentMethod, this sub-hash contains details about the Satispay payment method options. - """ - sepa_debit: NotRequired[ - "Literal['']|PaymentIntentService.UpdateParamsPaymentMethodOptionsSepaDebit" - ] - """ - If this is a `sepa_debit` PaymentIntent, this sub-hash contains details about the SEPA Debit payment method options. - """ - shopeepay: NotRequired[ - "Literal['']|PaymentIntentService.UpdateParamsPaymentMethodOptionsShopeepay" - ] - """ - If this is a `shopeepay` PaymentMethod, this sub-hash contains details about the ShopeePay payment method options. - """ - sofort: NotRequired[ - "Literal['']|PaymentIntentService.UpdateParamsPaymentMethodOptionsSofort" - ] - """ - If this is a `sofort` PaymentMethod, this sub-hash contains details about the SOFORT payment method options. - """ - stripe_balance: NotRequired[ - "Literal['']|PaymentIntentService.UpdateParamsPaymentMethodOptionsStripeBalance" - ] - """ - If this is a `stripe_balance` PaymentMethod, this sub-hash contains details about the Stripe Balance payment method options. - """ - swish: NotRequired[ - "Literal['']|PaymentIntentService.UpdateParamsPaymentMethodOptionsSwish" - ] - """ - If this is a `Swish` PaymentMethod, this sub-hash contains details about the Swish payment method options. - """ - twint: NotRequired[ - "Literal['']|PaymentIntentService.UpdateParamsPaymentMethodOptionsTwint" - ] - """ - If this is a `twint` PaymentMethod, this sub-hash contains details about the TWINT payment method options. - """ - us_bank_account: NotRequired[ - "Literal['']|PaymentIntentService.UpdateParamsPaymentMethodOptionsUsBankAccount" - ] - """ - If this is a `us_bank_account` PaymentMethod, this sub-hash contains details about the US bank account payment method options. - """ - wechat_pay: NotRequired[ - "Literal['']|PaymentIntentService.UpdateParamsPaymentMethodOptionsWechatPay" - ] - """ - If this is a `wechat_pay` PaymentMethod, this sub-hash contains details about the WeChat Pay payment method options. - """ - zip: NotRequired[ - "Literal['']|PaymentIntentService.UpdateParamsPaymentMethodOptionsZip" - ] - """ - If this is a `zip` PaymentMethod, this sub-hash contains details about the Zip payment method options. - """ - - class UpdateParamsPaymentMethodOptionsAcssDebit(TypedDict): - mandate_options: NotRequired[ - "PaymentIntentService.UpdateParamsPaymentMethodOptionsAcssDebitMandateOptions" - ] - """ - Additional fields for Mandate creation - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - target_date: NotRequired[str] - """ - Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. - """ - verification_method: NotRequired[ - Literal["automatic", "instant", "microdeposits"] - ] - """ - Bank account verification method. - """ - - class UpdateParamsPaymentMethodOptionsAcssDebitMandateOptions(TypedDict): - custom_mandate_url: NotRequired["Literal['']|str"] - """ - A URL for custom mandate text to render during confirmation step. - The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent, - or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent. - """ - interval_description: NotRequired[str] - """ - Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'. - """ - payment_schedule: NotRequired[ - Literal["combined", "interval", "sporadic"] - ] - """ - Payment schedule for the mandate. - """ - transaction_type: NotRequired[Literal["business", "personal"]] - """ - Transaction type of the mandate. - """ - - class UpdateParamsPaymentMethodOptionsAffirm(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds are captured from the customer's account. - - If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. - """ - preferred_locale: NotRequired[str] - """ - Preferred language of the Affirm authorization page that the customer is redirected to. - """ - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class UpdateParamsPaymentMethodOptionsAfterpayClearpay(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds are captured from the customer's account. - - If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. - """ - reference: NotRequired[str] - """ - An internal identifier or reference that this payment corresponds to. You must limit the identifier to 128 characters, and it can only contain letters, numbers, underscores, backslashes, and dashes. - This field differs from the statement descriptor and item name. - """ - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class UpdateParamsPaymentMethodOptionsAlipay(TypedDict): - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class UpdateParamsPaymentMethodOptionsAlma(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds are captured from the customer's account. - - If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. - """ - - class UpdateParamsPaymentMethodOptionsAmazonPay(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds are captured from the customer's account. - - If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - """ - - class UpdateParamsPaymentMethodOptionsAuBecsDebit(TypedDict): - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - target_date: NotRequired[str] - """ - Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. - """ - - class UpdateParamsPaymentMethodOptionsBacsDebit(TypedDict): - mandate_options: NotRequired[ - "PaymentIntentService.UpdateParamsPaymentMethodOptionsBacsDebitMandateOptions" - ] - """ - Additional fields for Mandate creation - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - target_date: NotRequired[str] - """ - Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. - """ - - class UpdateParamsPaymentMethodOptionsBacsDebitMandateOptions(TypedDict): - reference_prefix: NotRequired["Literal['']|str"] - """ - Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'. - """ - - class UpdateParamsPaymentMethodOptionsBancontact(TypedDict): - preferred_language: NotRequired[Literal["de", "en", "fr", "nl"]] - """ - Preferred language of the Bancontact authorization page that the customer is redirected to. - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class UpdateParamsPaymentMethodOptionsBillie(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds are captured from the customer's account. - - If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. - """ - - class UpdateParamsPaymentMethodOptionsBlik(TypedDict): - code: NotRequired[str] - """ - The 6-digit BLIK code that a customer has generated using their banking application. Can only be set on confirmation. - """ - setup_future_usage: NotRequired["Literal['']|Literal['none']"] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class UpdateParamsPaymentMethodOptionsBoleto(TypedDict): - expires_after_days: NotRequired[int] - """ - The number of calendar days before a Boleto voucher expires. For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto invoice will expire on Wednesday at 23:59 America/Sao_Paulo time. - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class UpdateParamsPaymentMethodOptionsCard(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds are captured from the customer's account. - - If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. - """ - cvc_token: NotRequired[str] - """ - A single-use `cvc_update` Token that represents a card CVC value. When provided, the CVC value will be verified during the card payment attempt. This parameter can only be provided during confirmation. - """ - installments: NotRequired[ - "PaymentIntentService.UpdateParamsPaymentMethodOptionsCardInstallments" - ] - """ - Installment configuration for payments attempted on this PaymentIntent. - - For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments). - """ - mandate_options: NotRequired[ - "PaymentIntentService.UpdateParamsPaymentMethodOptionsCardMandateOptions" - ] - """ - Configuration options for setting up an eMandate for cards issued in India. - """ - moto: NotRequired[bool] - """ - When specified, this parameter indicates that a transaction will be marked - as MOTO (Mail Order Telephone Order) and thus out of scope for SCA. This - parameter can only be provided during confirmation. - """ - network: NotRequired[ - Literal[ - "amex", - "cartes_bancaires", - "diners", - "discover", - "eftpos_au", - "girocard", - "interac", - "jcb", - "link", - "mastercard", - "unionpay", - "unknown", - "visa", - ] - ] - """ - Selected network to process this PaymentIntent on. Depends on the available networks of the card attached to the PaymentIntent. Can be only set confirm-time. - """ - request_decremental_authorization: NotRequired[ - Literal["if_available", "never"] - ] - """ - Request ability to [decrement the authorization](https://stripe.com/docs/payments/decremental-authorization) for this PaymentIntent. - """ - request_extended_authorization: NotRequired[ - Literal["if_available", "never"] - ] - """ - Request ability to [capture beyond the standard authorization validity window](https://stripe.com/docs/payments/extended-authorization) for this PaymentIntent. - """ - request_incremental_authorization: NotRequired[ - Literal["if_available", "never"] - ] - """ - Request ability to [increment the authorization](https://stripe.com/docs/payments/incremental-authorization) for this PaymentIntent. - """ - request_multicapture: NotRequired[Literal["if_available", "never"]] - """ - Request ability to make [multiple captures](https://stripe.com/docs/payments/multicapture) for this PaymentIntent. - """ - request_overcapture: NotRequired[Literal["if_available", "never"]] - """ - Request ability to [overcapture](https://stripe.com/docs/payments/overcapture) for this PaymentIntent. - """ - request_partial_authorization: NotRequired[ - Literal["if_available", "never"] - ] - """ - Request partial authorization on this PaymentIntent. - """ - request_three_d_secure: NotRequired[ - Literal["any", "automatic", "challenge"] - ] - """ - We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. - """ - require_cvc_recollection: NotRequired[bool] - """ - When enabled, using a card that is attached to a customer will require the CVC to be provided again (i.e. using the cvc_token parameter). - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - statement_descriptor_suffix_kana: NotRequired["Literal['']|str"] - """ - Provides information about a card payment that customers see on their statements. Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor that's set on the account to form the complete statement descriptor. Maximum 22 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 22 characters. - """ - statement_descriptor_suffix_kanji: NotRequired["Literal['']|str"] - """ - Provides information about a card payment that customers see on their statements. Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement descriptor that's set on the account to form the complete statement descriptor. Maximum 17 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 17 characters. - """ - statement_details: NotRequired[ - "Literal['']|PaymentIntentService.UpdateParamsPaymentMethodOptionsCardStatementDetails" - ] - """ - Statement details for this payment intent. You can use this to override the merchant details shown on your customers' statements. - """ - three_d_secure: NotRequired[ - "PaymentIntentService.UpdateParamsPaymentMethodOptionsCardThreeDSecure" - ] - """ - If 3D Secure authentication was performed with a third-party provider, - the authentication details to use for this payment. - """ - - class UpdateParamsPaymentMethodOptionsCardInstallments(TypedDict): - enabled: NotRequired[bool] - """ - Setting to true enables installments for this PaymentIntent. - This will cause the response to contain a list of available installment plans. - Setting to false will prevent any selected plan from applying to a charge. - """ - plan: NotRequired[ - "Literal['']|PaymentIntentService.UpdateParamsPaymentMethodOptionsCardInstallmentsPlan" - ] - """ - The selected installment plan to use for this payment attempt. - This parameter can only be provided during confirmation. - """ - - class UpdateParamsPaymentMethodOptionsCardInstallmentsPlan(TypedDict): - count: NotRequired[int] - """ - For `fixed_count` installment plans, this is required. It represents the number of installment payments your customer will make to their credit card. - """ - interval: NotRequired[Literal["month"]] - """ - For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card. - One of `month`. - """ - type: Literal["bonus", "fixed_count", "revolving"] - """ - Type of installment plan, one of `fixed_count`, `bonus`, or `revolving`. - """ - - class UpdateParamsPaymentMethodOptionsCardMandateOptions(TypedDict): - amount: int - """ - Amount to be charged for future payments. - """ - amount_type: Literal["fixed", "maximum"] - """ - One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. - """ - description: NotRequired[str] - """ - A description of the mandate or subscription that is meant to be displayed to the customer. - """ - end_date: NotRequired[int] - """ - End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. - """ - interval: Literal["day", "month", "sporadic", "week", "year"] - """ - Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`. - """ - interval_count: NotRequired[int] - """ - The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`. - """ - reference: str - """ - Unique identifier for the mandate or subscription. - """ - start_date: int - """ - Start date of the mandate or subscription. Start date should not be lesser than yesterday. - """ - supported_types: NotRequired[List[Literal["india"]]] - """ - Specifies the type of mandates supported. Possible values are `india`. - """ - - class UpdateParamsPaymentMethodOptionsCardPresent(TypedDict): - request_extended_authorization: NotRequired[bool] - """ - Request ability to capture this payment beyond the standard [authorization validity window](https://stripe.com/docs/terminal/features/extended-authorizations#authorization-validity) - """ - request_incremental_authorization_support: NotRequired[bool] - """ - Request ability to [increment](https://stripe.com/docs/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://stripe.com/docs/api/payment_intents/confirm) response to verify support. - """ - routing: NotRequired[ - "PaymentIntentService.UpdateParamsPaymentMethodOptionsCardPresentRouting" - ] - """ - Network routing priority on co-branded EMV cards supporting domestic debit and international card schemes. - """ - - class UpdateParamsPaymentMethodOptionsCardPresentRouting(TypedDict): - requested_priority: NotRequired[Literal["domestic", "international"]] - """ - Routing requested priority - """ - - class UpdateParamsPaymentMethodOptionsCardStatementDetails(TypedDict): - address: NotRequired[ - "PaymentIntentService.UpdateParamsPaymentMethodOptionsCardStatementDetailsAddress" - ] - """ - Please pass in an address that is within your Stripe user account country - """ - phone: NotRequired[str] - """ - Phone number (e.g., a toll-free number that customers can call) - """ - - class UpdateParamsPaymentMethodOptionsCardStatementDetailsAddress( - 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. - """ - - class UpdateParamsPaymentMethodOptionsCardThreeDSecure(TypedDict): - ares_trans_status: NotRequired[ - Literal["A", "C", "I", "N", "R", "U", "Y"] - ] - """ - The `transStatus` returned from the card Issuer's ACS in the ARes. - """ - cryptogram: str - """ - The cryptogram, also known as the "authentication value" (AAV, CAVV or - AEVV). This value is 20 bytes, base64-encoded into a 28-character string. - (Most 3D Secure providers will return the base64-encoded version, which - is what you should specify here.) - """ - electronic_commerce_indicator: NotRequired[ - Literal["01", "02", "05", "06", "07"] - ] - """ - The Electronic Commerce Indicator (ECI) is returned by your 3D Secure - provider and indicates what degree of authentication was performed. - """ - exemption_indicator: NotRequired[Literal["low_risk", "none"]] - """ - The exemption requested via 3DS and accepted by the issuer at authentication time. - """ - network_options: NotRequired[ - "PaymentIntentService.UpdateParamsPaymentMethodOptionsCardThreeDSecureNetworkOptions" - ] - """ - Network specific 3DS fields. Network specific arguments require an - explicit card brand choice. The parameter `payment_method_options.card.network`` - must be populated accordingly - """ - requestor_challenge_indicator: NotRequired[str] - """ - The challenge indicator (`threeDSRequestorChallengeInd`) which was requested in the - AReq sent to the card Issuer's ACS. A string containing 2 digits from 01-99. - """ - transaction_id: str - """ - For 3D Secure 1, the XID. For 3D Secure 2, the Directory Server - Transaction ID (dsTransID). - """ - version: Literal["1.0.2", "2.1.0", "2.2.0"] - """ - The version of 3D Secure that was performed. - """ - - class UpdateParamsPaymentMethodOptionsCardThreeDSecureNetworkOptions( - TypedDict, - ): - cartes_bancaires: NotRequired[ - "PaymentIntentService.UpdateParamsPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancaires" - ] - """ - Cartes Bancaires-specific 3DS fields. - """ - - class UpdateParamsPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancaires( - TypedDict, - ): - cb_avalgo: Literal["0", "1", "2", "3", "4", "A"] - """ - The cryptogram calculation algorithm used by the card Issuer's ACS - to calculate the Authentication cryptogram. Also known as `cavvAlgorithm`. - messageExtension: CB-AVALGO - """ - cb_exemption: NotRequired[str] - """ - The exemption indicator returned from Cartes Bancaires in the ARes. - message extension: CB-EXEMPTION; string (4 characters) - This is a 3 byte bitmap (low significant byte first and most significant - bit first) that has been Base64 encoded - """ - cb_score: NotRequired[int] - """ - The risk score returned from Cartes Bancaires in the ARes. - message extension: CB-SCORE; numeric value 0-99 - """ - - class UpdateParamsPaymentMethodOptionsCashapp(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds are captured from the customer's account. - - If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class UpdateParamsPaymentMethodOptionsCrypto(TypedDict): - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class UpdateParamsPaymentMethodOptionsCustomerBalance(TypedDict): - bank_transfer: NotRequired[ - "PaymentIntentService.UpdateParamsPaymentMethodOptionsCustomerBalanceBankTransfer" - ] - """ - Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. - """ - funding_type: NotRequired[Literal["bank_transfer"]] - """ - The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. - """ - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class UpdateParamsPaymentMethodOptionsCustomerBalanceBankTransfer( - TypedDict, - ): - eu_bank_transfer: NotRequired[ - "PaymentIntentService.UpdateParamsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer" - ] - """ - Configuration for the eu_bank_transfer funding type. - """ - requested_address_types: NotRequired[ - List[ - Literal[ - "aba", - "iban", - "sepa", - "sort_code", - "spei", - "swift", - "zengin", - ] - ] - ] - """ - List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned. - - Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`. - """ - type: Literal[ - "eu_bank_transfer", - "gb_bank_transfer", - "jp_bank_transfer", - "mx_bank_transfer", - "us_bank_transfer", - ] - """ - The list of bank transfer types that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. - """ - - class UpdateParamsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer( - TypedDict, - ): - country: str - """ - The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. - """ - - class UpdateParamsPaymentMethodOptionsEps(TypedDict): - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class UpdateParamsPaymentMethodOptionsFpx(TypedDict): - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class UpdateParamsPaymentMethodOptionsGiropay(TypedDict): - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class UpdateParamsPaymentMethodOptionsGopay(TypedDict): - setup_future_usage: NotRequired[Literal["none", "off_session"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class UpdateParamsPaymentMethodOptionsGrabpay(TypedDict): - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class UpdateParamsPaymentMethodOptionsIdBankTransfer(TypedDict): - expires_after: NotRequired[int] - """ - The UNIX timestamp until which the virtual bank account is valid. Permitted range is from 5 minutes from now until 31 days from now. If unset, it defaults to 3 days from now. - """ - expires_at: NotRequired[int] - """ - The UNIX timestamp until which the virtual bank account is valid. Permitted range is from now until 30 days from now. If unset, it defaults to 1 days from now. - """ - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class UpdateParamsPaymentMethodOptionsIdeal(TypedDict): - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class UpdateParamsPaymentMethodOptionsInteracPresent(TypedDict): - pass - - class UpdateParamsPaymentMethodOptionsKakaoPay(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds are captured from the customer's account. - - If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - """ - - class UpdateParamsPaymentMethodOptionsKlarna(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds are captured from the customer's account. - - If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. - """ - on_demand: NotRequired[ - "PaymentIntentService.UpdateParamsPaymentMethodOptionsKlarnaOnDemand" - ] - """ - On-demand details if setting up or charging an on-demand payment. - """ - preferred_locale: NotRequired[ - Literal[ - "cs-CZ", - "da-DK", - "de-AT", - "de-CH", - "de-DE", - "el-GR", - "en-AT", - "en-AU", - "en-BE", - "en-CA", - "en-CH", - "en-CZ", - "en-DE", - "en-DK", - "en-ES", - "en-FI", - "en-FR", - "en-GB", - "en-GR", - "en-IE", - "en-IT", - "en-NL", - "en-NO", - "en-NZ", - "en-PL", - "en-PT", - "en-RO", - "en-SE", - "en-US", - "es-ES", - "es-US", - "fi-FI", - "fr-BE", - "fr-CA", - "fr-CH", - "fr-FR", - "it-CH", - "it-IT", - "nb-NO", - "nl-BE", - "nl-NL", - "pl-PL", - "pt-PT", - "ro-RO", - "sv-FI", - "sv-SE", - ] - ] - """ - Preferred language of the Klarna authorization page that the customer is redirected to - """ - setup_future_usage: NotRequired[ - Literal["none", "off_session", "on_session"] - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - subscriptions: NotRequired[ - "Literal['']|List[PaymentIntentService.UpdateParamsPaymentMethodOptionsKlarnaSubscription]" - ] - """ - Subscription details if setting up or charging a subscription. - """ - - class UpdateParamsPaymentMethodOptionsKlarnaOnDemand(TypedDict): - average_amount: NotRequired[int] - """ - Your average amount value. You can use a value across your customer base, or segment based on customer type, country, etc. - """ - maximum_amount: NotRequired[int] - """ - The maximum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. - """ - minimum_amount: NotRequired[int] - """ - The lowest or minimum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. - """ - purchase_interval: NotRequired[Literal["day", "month", "week", "year"]] - """ - Interval at which the customer is making purchases - """ - purchase_interval_count: NotRequired[int] - """ - The number of `purchase_interval` between charges - """ - - class UpdateParamsPaymentMethodOptionsKlarnaSubscription(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Unit of time between subscription charges. - """ - interval_count: NotRequired[int] - """ - The number of intervals (specified in the `interval` attribute) between subscription charges. For example, `interval=month` and `interval_count=3` charges every 3 months. - """ - name: NotRequired[str] - """ - Name for subscription. - """ - next_billing: NotRequired[ - "PaymentIntentService.UpdateParamsPaymentMethodOptionsKlarnaSubscriptionNextBilling" - ] - """ - Describes the upcoming charge for this subscription. - """ - reference: str - """ - A non-customer-facing reference to correlate subscription charges in the Klarna app. Use a value that persists across subscription charges. - """ - - class UpdateParamsPaymentMethodOptionsKlarnaSubscriptionNextBilling( - TypedDict, - ): - amount: int - """ - The amount of the next charge for the subscription. - """ - date: str - """ - The date of the next charge for the subscription in YYYY-MM-DD format. - """ - - class UpdateParamsPaymentMethodOptionsKonbini(TypedDict): - confirmation_number: NotRequired["Literal['']|str"] - """ - An optional 10 to 11 digit numeric-only string determining the confirmation code at applicable convenience stores. Must not consist of only zeroes and could be rejected in case of insufficient uniqueness. We recommend to use the customer's phone number. - """ - expires_after_days: NotRequired["Literal['']|int"] - """ - The number of calendar days (between 1 and 60) after which Konbini payment instructions will expire. For example, if a PaymentIntent is confirmed with Konbini and `expires_after_days` set to 2 on Monday JST, the instructions will expire on Wednesday 23:59:59 JST. Defaults to 3 days. - """ - expires_at: NotRequired["Literal['']|int"] - """ - The timestamp at which the Konbini payment instructions will expire. Only one of `expires_after_days` or `expires_at` may be set. - """ - product_description: NotRequired["Literal['']|str"] - """ - A product descriptor of up to 22 characters, which will appear to customers at the convenience store. - """ - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class UpdateParamsPaymentMethodOptionsKrCard(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds are captured from the customer's account. - - If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - """ - - class UpdateParamsPaymentMethodOptionsLink(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds are captured from the customer's account. - - If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. - """ - persistent_token: NotRequired[str] - """ - [Deprecated] This is a legacy parameter that no longer has any function. - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class UpdateParamsPaymentMethodOptionsMbWay(TypedDict): - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class UpdateParamsPaymentMethodOptionsMobilepay(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds are captured from the customer's account. - - If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. - """ - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class UpdateParamsPaymentMethodOptionsMultibanco(TypedDict): - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class UpdateParamsPaymentMethodOptionsNaverPay(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds are captured from the customer's account. - - If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - """ - - class UpdateParamsPaymentMethodOptionsNzBankAccount(TypedDict): - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - target_date: NotRequired[str] - """ - Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. - """ - - class UpdateParamsPaymentMethodOptionsOxxo(TypedDict): - expires_after_days: NotRequired[int] - """ - The number of calendar days before an OXXO voucher expires. For example, if you create an OXXO voucher on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time. - """ - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class UpdateParamsPaymentMethodOptionsP24(TypedDict): - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - tos_shown_and_accepted: NotRequired[bool] - """ - Confirm that the payer has accepted the P24 terms and conditions. - """ - - class UpdateParamsPaymentMethodOptionsPayByBank(TypedDict): - pass - - class UpdateParamsPaymentMethodOptionsPayco(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds are captured from the customer's account. - - If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. - """ - - class UpdateParamsPaymentMethodOptionsPaynow(TypedDict): - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class UpdateParamsPaymentMethodOptionsPaypal(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds will be captured from the customer's account. - """ - line_items: NotRequired[ - List[ - "PaymentIntentService.UpdateParamsPaymentMethodOptionsPaypalLineItem" - ] - ] - """ - The line items purchased by the customer. - """ - preferred_locale: NotRequired[ - Literal[ - "cs-CZ", - "da-DK", - "de-AT", - "de-DE", - "de-LU", - "el-GR", - "en-GB", - "en-US", - "es-ES", - "fi-FI", - "fr-BE", - "fr-FR", - "fr-LU", - "hu-HU", - "it-IT", - "nl-BE", - "nl-NL", - "pl-PL", - "pt-PT", - "sk-SK", - "sv-SE", - ] - ] - """ - [Preferred locale](https://stripe.com/docs/payments/paypal/supported-locales) of the PayPal checkout page that the customer is redirected to. - """ - reference: NotRequired[str] - """ - A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. - """ - reference_id: NotRequired[str] - """ - A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. - """ - risk_correlation_id: NotRequired[str] - """ - The risk correlation ID for an on-session payment using a saved PayPal payment method. - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - subsellers: NotRequired[List[str]] - """ - The Stripe connected account IDs of the sellers on the platform for this transaction (optional). Only allowed when [separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) are used. - """ - - class UpdateParamsPaymentMethodOptionsPaypalLineItem(TypedDict): - category: NotRequired[ - Literal["digital_goods", "donation", "physical_goods"] - ] - """ - Type of the line item. - """ - description: NotRequired[str] - """ - Description of the line item. - """ - name: str - """ - Descriptive name of the line item. - """ - quantity: int - """ - Quantity of the line item. Must be a positive number. - """ - sku: NotRequired[str] - """ - Client facing stock keeping unit, article number or similar. - """ - sold_by: NotRequired[str] - """ - The Stripe account ID of the connected account that sells the item. - """ - tax: NotRequired[ - "PaymentIntentService.UpdateParamsPaymentMethodOptionsPaypalLineItemTax" - ] - """ - The tax information for the line item. - """ - unit_amount: int - """ - Price for a single unit of the line item in minor units. Cannot be a negative number. - """ - - class UpdateParamsPaymentMethodOptionsPaypalLineItemTax(TypedDict): - amount: int - """ - The tax for a single unit of the line item in minor units. Cannot be a negative number. - """ - behavior: Literal["exclusive", "inclusive"] - """ - The tax behavior for the line item. - """ - - class UpdateParamsPaymentMethodOptionsPaypay(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds are captured from the customer's account. - - If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. - """ - - class UpdateParamsPaymentMethodOptionsPayto(TypedDict): - mandate_options: NotRequired[ - "PaymentIntentService.UpdateParamsPaymentMethodOptionsPaytoMandateOptions" - ] - """ - Additional fields for Mandate creation. Only `purpose` field is configurable for PayTo PaymentIntent with `setup_future_usage=none`. Other fields are only applicable to PayTo PaymentIntent with `setup_future_usage=off_session` - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class UpdateParamsPaymentMethodOptionsPaytoMandateOptions(TypedDict): - amount: NotRequired[int] - """ - Amount that will be collected. It is required when `amount_type` is `fixed`. - """ - amount_type: NotRequired[Literal["fixed", "maximum"]] - """ - The type of amount that will be collected. The amount charged must be exact or up to the value of `amount` param for `fixed` or `maximum` type respectively. - """ - end_date: NotRequired[str] - """ - Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no end date. - """ - payment_schedule: NotRequired[ - Literal[ - "adhoc", - "annual", - "daily", - "fortnightly", - "monthly", - "quarterly", - "semi_annual", - "weekly", - ] - ] - """ - The periodicity at which payments will be collected. - """ - payments_per_period: NotRequired[int] - """ - The number of payments that will be made during a payment period. Defaults to 1 except for when `payment_schedule` is `adhoc`. In that case, it defaults to no limit. - """ - purpose: NotRequired[ - Literal[ - "dependant_support", - "government", - "loan", - "mortgage", - "other", - "pension", - "personal", - "retail", - "salary", - "tax", - "utility", - ] - ] - """ - The purpose for which payments are made. Defaults to retail. - """ - - class UpdateParamsPaymentMethodOptionsPix(TypedDict): - amount_includes_iof: NotRequired[Literal["always", "never"]] - """ - Determines if the amount includes the IOF tax. Defaults to `never`. - """ - expires_after_seconds: NotRequired[int] - """ - The number of seconds (between 10 and 1209600) after which Pix payment will expire. Defaults to 86400 seconds. - """ - expires_at: NotRequired[int] - """ - The timestamp at which the Pix expires (between 10 and 1209600 seconds in the future). Defaults to 1 day in the future. - """ - mandate_options: NotRequired[ - "PaymentIntentService.UpdateParamsPaymentMethodOptionsPixMandateOptions" - ] - """ - Additional fields for mandate creation. Only applicable when `setup_future_usage=off_session`. - """ - setup_future_usage: NotRequired[Literal["none", "off_session"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class UpdateParamsPaymentMethodOptionsPixMandateOptions(TypedDict): - amount: NotRequired[int] - """ - Amount to be charged for future payments. Required when `amount_type=fixed`. If not provided for `amount_type=maximum`, defaults to 40000. - """ - amount_includes_iof: NotRequired[Literal["always", "never"]] - """ - Determines if the amount includes the IOF tax. Defaults to `never`. - """ - amount_type: NotRequired[Literal["fixed", "maximum"]] - """ - Type of amount. Defaults to `maximum`. - """ - currency: NotRequired[str] - """ - Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Only `brl` is supported currently. - """ - end_date: NotRequired[str] - """ - Date when the mandate expires and no further payments will be charged, in `YYYY-MM-DD`. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. - """ - payment_schedule: NotRequired[ - Literal["halfyearly", "monthly", "quarterly", "weekly", "yearly"] - ] - """ - Schedule at which the future payments will be charged. Defaults to `weekly`. - """ - reference: NotRequired[str] - """ - Subscription name displayed to buyers in their bank app. Defaults to the displayable business name. - """ - start_date: NotRequired[str] - """ - Start date of the mandate, in `YYYY-MM-DD`. Start date should be at least 3 days in the future. Defaults to 3 days after the current date. - """ - - class UpdateParamsPaymentMethodOptionsPromptpay(TypedDict): - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class UpdateParamsPaymentMethodOptionsQris(TypedDict): - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class UpdateParamsPaymentMethodOptionsRechnung(TypedDict): - pass - - class UpdateParamsPaymentMethodOptionsRevolutPay(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds are captured from the customer's account. - - If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - """ - - class UpdateParamsPaymentMethodOptionsSamsungPay(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds are captured from the customer's account. - - If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. - """ - - class UpdateParamsPaymentMethodOptionsSatispay(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds are captured from the customer's account. - - If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. - - If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. - """ - - class UpdateParamsPaymentMethodOptionsSepaDebit(TypedDict): - mandate_options: NotRequired[ - "PaymentIntentService.UpdateParamsPaymentMethodOptionsSepaDebitMandateOptions" - ] - """ - Additional fields for Mandate creation - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - target_date: NotRequired[str] - """ - Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. - """ - - class UpdateParamsPaymentMethodOptionsSepaDebitMandateOptions(TypedDict): - reference_prefix: NotRequired["Literal['']|str"] - """ - Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'. - """ - - class UpdateParamsPaymentMethodOptionsShopeepay(TypedDict): - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class UpdateParamsPaymentMethodOptionsSofort(TypedDict): - preferred_language: NotRequired[ - "Literal['']|Literal['de', 'en', 'es', 'fr', 'it', 'nl', 'pl']" - ] - """ - Language shown to the payer on redirect. - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class UpdateParamsPaymentMethodOptionsStripeBalance(TypedDict): - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class UpdateParamsPaymentMethodOptionsSwish(TypedDict): - reference: NotRequired["Literal['']|str"] - """ - A reference for this payment to be displayed in the Swish app. - """ - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class UpdateParamsPaymentMethodOptionsTwint(TypedDict): - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class UpdateParamsPaymentMethodOptionsUsBankAccount(TypedDict): - financial_connections: NotRequired[ - "PaymentIntentService.UpdateParamsPaymentMethodOptionsUsBankAccountFinancialConnections" - ] - """ - Additional fields for Financial Connections Session creation - """ - mandate_options: NotRequired[ - "PaymentIntentService.UpdateParamsPaymentMethodOptionsUsBankAccountMandateOptions" - ] - """ - Additional fields for Mandate creation - """ - networks: NotRequired[ - "PaymentIntentService.UpdateParamsPaymentMethodOptionsUsBankAccountNetworks" - ] - """ - Additional fields for network related functions - """ - preferred_settlement_speed: NotRequired[ - "Literal['']|Literal['fastest', 'standard']" - ] - """ - Preferred transaction settlement speed - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session', 'on_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - target_date: NotRequired[str] - """ - Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. - """ - verification_method: NotRequired[ - Literal["automatic", "instant", "microdeposits"] - ] - """ - Bank account verification method. - """ - - class UpdateParamsPaymentMethodOptionsUsBankAccountFinancialConnections( - TypedDict, - ): - filters: NotRequired[ - "PaymentIntentService.UpdateParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters" - ] - """ - Provide filters for the linked accounts that the customer can select for the payment method. - """ - manual_entry: NotRequired[ - "PaymentIntentService.UpdateParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsManualEntry" - ] - """ - Customize manual entry behavior - """ - permissions: NotRequired[ - List[ - Literal[ - "balances", "ownership", "payment_method", "transactions" - ] - ] - ] - """ - The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. - """ - prefetch: NotRequired[ - List[ - Literal[ - "balances", - "inferred_balances", - "ownership", - "transactions", - ] - ] - ] - """ - List of data features that you would like to retrieve upon account creation. - """ - return_url: NotRequired[str] - """ - For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. - """ - - class UpdateParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters( - TypedDict, - ): - account_subcategories: NotRequired[ - List[Literal["checking", "savings"]] - ] - """ - The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`. - """ - institution: NotRequired[str] - """ - ID of the institution to use to filter for selectable accounts. - """ - - class UpdateParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsManualEntry( - TypedDict, - ): - mode: Literal["automatic", "custom"] - """ - Settings for configuring manual entry of account details. - """ - - class UpdateParamsPaymentMethodOptionsUsBankAccountMandateOptions( - TypedDict, - ): - collection_method: NotRequired["Literal['']|Literal['paper']"] - """ - The method used to collect offline mandate customer acceptance. - """ - - class UpdateParamsPaymentMethodOptionsUsBankAccountNetworks(TypedDict): - requested: NotRequired[List[Literal["ach", "us_domestic_wire"]]] - """ - Triggers validations to run across the selected networks - """ - - class UpdateParamsPaymentMethodOptionsWechatPay(TypedDict): - app_id: NotRequired[str] - """ - The app ID registered with WeChat Pay. Only required when client is ios or android. - """ - client: NotRequired[Literal["android", "ios", "web"]] - """ - The client type that the end customer will pay from - """ - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class UpdateParamsPaymentMethodOptionsZip(TypedDict): - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - - class UpdateParamsShipping(TypedDict): - address: "PaymentIntentService.UpdateParamsShippingAddress" - """ - Shipping address. - """ - carrier: NotRequired[str] - """ - The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. - """ - name: str - """ - Recipient name. - """ - phone: NotRequired[str] - """ - Recipient phone (including extension). - """ - tracking_number: NotRequired[str] - """ - The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. - """ - - class UpdateParamsShippingAddress(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. - """ - - class UpdateParamsTransferData(TypedDict): - amount: NotRequired[int] - """ - The amount that will be transferred automatically when a charge succeeds. - """ - - class VerifyMicrodepositsParams(TypedDict): - amounts: NotRequired[List[int]] - """ - Two positive integers, in *cents*, equal to the values of the microdeposits sent to the bank account. - """ - descriptor_code: NotRequired[str] - """ - A six-character code starting with SM present in the microdeposit sent to the bank account. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - def list( self, - params: Optional["PaymentIntentService.ListParams"] = None, + params: Optional["PaymentIntentListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[PaymentIntent]: """ @@ -14360,7 +84,7 @@ def list( async def list_async( self, - params: Optional["PaymentIntentService.ListParams"] = None, + params: Optional["PaymentIntentListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[PaymentIntent]: """ @@ -14379,7 +103,7 @@ async def list_async( def create( self, - params: "PaymentIntentService.CreateParams", + params: "PaymentIntentCreateParams", options: Optional[RequestOptions] = None, ) -> PaymentIntent: """ @@ -14407,7 +131,7 @@ def create( async def create_async( self, - params: "PaymentIntentService.CreateParams", + params: "PaymentIntentCreateParams", options: Optional[RequestOptions] = None, ) -> PaymentIntent: """ @@ -14436,7 +160,7 @@ async def create_async( def retrieve( self, intent: str, - params: Optional["PaymentIntentService.RetrieveParams"] = None, + params: Optional["PaymentIntentRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> PaymentIntent: """ @@ -14462,7 +186,7 @@ def retrieve( async def retrieve_async( self, intent: str, - params: Optional["PaymentIntentService.RetrieveParams"] = None, + params: Optional["PaymentIntentRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> PaymentIntent: """ @@ -14488,7 +212,7 @@ async def retrieve_async( def update( self, intent: str, - params: Optional["PaymentIntentService.UpdateParams"] = None, + params: Optional["PaymentIntentUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> PaymentIntent: """ @@ -14516,7 +240,7 @@ def update( async def update_async( self, intent: str, - params: Optional["PaymentIntentService.UpdateParams"] = None, + params: Optional["PaymentIntentUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> PaymentIntent: """ @@ -14543,7 +267,7 @@ async def update_async( def search( self, - params: "PaymentIntentService.SearchParams", + params: "PaymentIntentSearchParams", options: Optional[RequestOptions] = None, ) -> SearchResultObject[PaymentIntent]: """ @@ -14565,7 +289,7 @@ def search( async def search_async( self, - params: "PaymentIntentService.SearchParams", + params: "PaymentIntentSearchParams", options: Optional[RequestOptions] = None, ) -> SearchResultObject[PaymentIntent]: """ @@ -14588,9 +312,7 @@ async def search_async( def apply_customer_balance( self, intent: str, - params: Optional[ - "PaymentIntentService.ApplyCustomerBalanceParams" - ] = None, + params: Optional["PaymentIntentApplyCustomerBalanceParams"] = None, options: Optional[RequestOptions] = None, ) -> PaymentIntent: """ @@ -14612,9 +334,7 @@ def apply_customer_balance( async def apply_customer_balance_async( self, intent: str, - params: Optional[ - "PaymentIntentService.ApplyCustomerBalanceParams" - ] = None, + params: Optional["PaymentIntentApplyCustomerBalanceParams"] = None, options: Optional[RequestOptions] = None, ) -> PaymentIntent: """ @@ -14636,7 +356,7 @@ async def apply_customer_balance_async( def cancel( self, intent: str, - params: Optional["PaymentIntentService.CancelParams"] = None, + params: Optional["PaymentIntentCancelParams"] = None, options: Optional[RequestOptions] = None, ) -> PaymentIntent: """ @@ -14662,7 +382,7 @@ def cancel( async def cancel_async( self, intent: str, - params: Optional["PaymentIntentService.CancelParams"] = None, + params: Optional["PaymentIntentCancelParams"] = None, options: Optional[RequestOptions] = None, ) -> PaymentIntent: """ @@ -14688,7 +408,7 @@ async def cancel_async( def capture( self, intent: str, - params: Optional["PaymentIntentService.CaptureParams"] = None, + params: Optional["PaymentIntentCaptureParams"] = None, options: Optional[RequestOptions] = None, ) -> PaymentIntent: """ @@ -14714,7 +434,7 @@ def capture( async def capture_async( self, intent: str, - params: Optional["PaymentIntentService.CaptureParams"] = None, + params: Optional["PaymentIntentCaptureParams"] = None, options: Optional[RequestOptions] = None, ) -> PaymentIntent: """ @@ -14740,7 +460,7 @@ async def capture_async( def confirm( self, intent: str, - params: Optional["PaymentIntentService.ConfirmParams"] = None, + params: Optional["PaymentIntentConfirmParams"] = None, options: Optional[RequestOptions] = None, ) -> PaymentIntent: """ @@ -14791,7 +511,7 @@ def confirm( async def confirm_async( self, intent: str, - params: Optional["PaymentIntentService.ConfirmParams"] = None, + params: Optional["PaymentIntentConfirmParams"] = None, options: Optional[RequestOptions] = None, ) -> PaymentIntent: """ @@ -14842,7 +562,7 @@ async def confirm_async( def decrement_authorization( self, intent: str, - params: "PaymentIntentService.DecrementAuthorizationParams", + params: "PaymentIntentDecrementAuthorizationParams", options: Optional[RequestOptions] = None, ) -> PaymentIntent: """ @@ -14879,7 +599,7 @@ def decrement_authorization( async def decrement_authorization_async( self, intent: str, - params: "PaymentIntentService.DecrementAuthorizationParams", + params: "PaymentIntentDecrementAuthorizationParams", options: Optional[RequestOptions] = None, ) -> PaymentIntent: """ @@ -14916,7 +636,7 @@ async def decrement_authorization_async( def increment_authorization( self, intent: str, - params: "PaymentIntentService.IncrementAuthorizationParams", + params: "PaymentIntentIncrementAuthorizationParams", options: Optional[RequestOptions] = None, ) -> PaymentIntent: """ @@ -14961,7 +681,7 @@ def increment_authorization( async def increment_authorization_async( self, intent: str, - params: "PaymentIntentService.IncrementAuthorizationParams", + params: "PaymentIntentIncrementAuthorizationParams", options: Optional[RequestOptions] = None, ) -> PaymentIntent: """ @@ -15006,9 +726,7 @@ async def increment_authorization_async( def verify_microdeposits( self, intent: str, - params: Optional[ - "PaymentIntentService.VerifyMicrodepositsParams" - ] = None, + params: Optional["PaymentIntentVerifyMicrodepositsParams"] = None, options: Optional[RequestOptions] = None, ) -> PaymentIntent: """ @@ -15030,9 +748,7 @@ def verify_microdeposits( async def verify_microdeposits_async( self, intent: str, - params: Optional[ - "PaymentIntentService.VerifyMicrodepositsParams" - ] = None, + params: Optional["PaymentIntentVerifyMicrodepositsParams"] = None, options: Optional[RequestOptions] = None, ) -> PaymentIntent: """ @@ -15054,7 +770,7 @@ async def verify_microdeposits_async( def trigger_action( self, intent: str, - params: "PaymentIntentService.TriggerActionParams", + params: "PaymentIntentTriggerActionParams", options: Optional[RequestOptions] = None, ) -> PaymentIntent: """ @@ -15076,7 +792,7 @@ def trigger_action( async def trigger_action_async( self, intent: str, - params: "PaymentIntentService.TriggerActionParams", + params: "PaymentIntentTriggerActionParams", options: Optional[RequestOptions] = None, ) -> PaymentIntent: """ diff --git a/stripe/_payment_link.py b/stripe/_payment_link.py index f50d486b8..84c174ad6 100644 --- a/stripe/_payment_link.py +++ b/stripe/_payment_link.py @@ -4,18 +4,11 @@ from stripe._expandable_field import ExpandableField from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource -from stripe._request_options import RequestOptions from stripe._stripe_object import StripeObject from stripe._updateable_api_resource import UpdateableAPIResource from stripe._util import class_method_variant, sanitize_id from typing import ClassVar, Dict, List, Optional, cast, overload -from typing_extensions import ( - Literal, - NotRequired, - TypedDict, - Unpack, - TYPE_CHECKING, -) +from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: from stripe._account import Account @@ -23,6 +16,19 @@ from stripe._line_item import LineItem from stripe._shipping_rate import ShippingRate from stripe._tax_id import TaxId + from stripe.params._payment_link_create_params import ( + PaymentLinkCreateParams, + ) + from stripe.params._payment_link_list_line_items_params import ( + PaymentLinkListLineItemsParams, + ) + from stripe.params._payment_link_list_params import PaymentLinkListParams + from stripe.params._payment_link_modify_params import ( + PaymentLinkModifyParams, + ) + from stripe.params._payment_link_retrieve_params import ( + PaymentLinkRetrieveParams, + ) class PaymentLink( @@ -715,1858 +721,6 @@ class TransferData(StripeObject): The connected account receiving the transfer. """ - class CreateParams(RequestOptions): - after_completion: NotRequired[ - "PaymentLink.CreateParamsAfterCompletion" - ] - """ - Behavior after the purchase is complete. - """ - allow_promotion_codes: NotRequired[bool] - """ - Enables user redeemable promotion codes. - """ - application_fee_amount: NotRequired[int] - """ - The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. Can only be applied when there are no line items with recurring prices. - """ - application_fee_percent: NotRequired[float] - """ - A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. There must be at least 1 line item with a recurring price to use this field. - """ - automatic_tax: NotRequired["PaymentLink.CreateParamsAutomaticTax"] - """ - Configuration for automatic tax collection. - """ - billing_address_collection: NotRequired[Literal["auto", "required"]] - """ - Configuration for collecting the customer's billing address. Defaults to `auto`. - """ - consent_collection: NotRequired[ - "PaymentLink.CreateParamsConsentCollection" - ] - """ - Configure fields to gather active consent from customers. - """ - currency: NotRequired[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) and supported by each line item's price. - """ - custom_fields: NotRequired[List["PaymentLink.CreateParamsCustomField"]] - """ - Collect additional information from your customer using custom fields. Up to 3 fields are supported. - """ - custom_text: NotRequired["PaymentLink.CreateParamsCustomText"] - """ - Display additional text for your customers using custom text. - """ - customer_creation: NotRequired[Literal["always", "if_required"]] - """ - Configures whether [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link create a [Customer](https://stripe.com/docs/api/customers). - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - inactive_message: NotRequired[str] - """ - The custom message to be displayed to a customer when a payment link is no longer active. - """ - invoice_creation: NotRequired[ - "PaymentLink.CreateParamsInvoiceCreation" - ] - """ - Generate a post-purchase Invoice for one-time payments. - """ - line_items: List["PaymentLink.CreateParamsLineItem"] - """ - The line items representing what is being sold. Each line item represents an item being sold. Up to 20 line items are supported. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. Metadata associated with this Payment Link will automatically be copied to [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link. - """ - on_behalf_of: NotRequired[str] - """ - The account on behalf of which to charge. - """ - optional_items: NotRequired[ - List["PaymentLink.CreateParamsOptionalItem"] - ] - """ - A list of optional items the customer can add to their order at checkout. Use this parameter to pass one-time or recurring [Prices](https://stripe.com/docs/api/prices). - There is a maximum of 10 optional items allowed on a payment link, and the existing limits on the number of line items allowed on a payment link apply to the combined number of line items and optional items. - There is a maximum of 20 combined line items and optional items. - """ - payment_intent_data: NotRequired[ - "PaymentLink.CreateParamsPaymentIntentData" - ] - """ - A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in `payment` mode. - """ - payment_method_collection: NotRequired[ - Literal["always", "if_required"] - ] - """ - Specify whether Checkout should collect a payment method. When set to `if_required`, Checkout will not collect a payment method when the total due for the session is 0.This may occur if the Checkout Session includes a free trial or a discount. - - Can only be set in `subscription` mode. Defaults to `always`. - - If you'd like information on how to collect a payment method outside of Checkout, read the guide on [configuring subscriptions with a free trial](https://stripe.com/docs/payments/checkout/free-trials). - """ - payment_method_types: NotRequired[ - List[ - Literal[ - "affirm", - "afterpay_clearpay", - "alipay", - "alma", - "au_becs_debit", - "bacs_debit", - "bancontact", - "billie", - "blik", - "boleto", - "card", - "cashapp", - "eps", - "fpx", - "giropay", - "gopay", - "grabpay", - "ideal", - "klarna", - "konbini", - "link", - "mb_way", - "mobilepay", - "multibanco", - "oxxo", - "p24", - "pay_by_bank", - "paynow", - "paypal", - "paypay", - "payto", - "pix", - "promptpay", - "qris", - "rechnung", - "satispay", - "sepa_debit", - "shopeepay", - "sofort", - "swish", - "twint", - "us_bank_account", - "wechat_pay", - "zip", - ] - ] - ] - """ - The list of payment method types that customers can use. If no value is passed, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods) (20+ payment methods [supported](https://stripe.com/docs/payments/payment-methods/integration-options#payment-method-product-support)). - """ - phone_number_collection: NotRequired[ - "PaymentLink.CreateParamsPhoneNumberCollection" - ] - """ - Controls phone number collection settings during checkout. - - We recommend that you review your privacy policy and check with your legal contacts. - """ - restrictions: NotRequired["PaymentLink.CreateParamsRestrictions"] - """ - Settings that restrict the usage of a payment link. - """ - shipping_address_collection: NotRequired[ - "PaymentLink.CreateParamsShippingAddressCollection" - ] - """ - Configuration for collecting the customer's shipping address. - """ - shipping_options: NotRequired[ - List["PaymentLink.CreateParamsShippingOption"] - ] - """ - The shipping rate options to apply to [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link. - """ - submit_type: NotRequired[ - Literal["auto", "book", "donate", "pay", "subscribe"] - ] - """ - Describes the type of transaction being performed in order to customize relevant text on the page, such as the submit button. Changing this value will also affect the hostname in the [url](https://stripe.com/docs/api/payment_links/payment_links/object#url) property (example: `donate.stripe.com`). - """ - subscription_data: NotRequired[ - "PaymentLink.CreateParamsSubscriptionData" - ] - """ - When creating a subscription, the specified configuration data will be used. There must be at least one line item with a recurring price to use `subscription_data`. - """ - tax_id_collection: NotRequired[ - "PaymentLink.CreateParamsTaxIdCollection" - ] - """ - Controls tax ID collection during checkout. - """ - transfer_data: NotRequired["PaymentLink.CreateParamsTransferData"] - """ - The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to. - """ - - class CreateParamsAfterCompletion(TypedDict): - hosted_confirmation: NotRequired[ - "PaymentLink.CreateParamsAfterCompletionHostedConfirmation" - ] - """ - Configuration when `type=hosted_confirmation`. - """ - redirect: NotRequired[ - "PaymentLink.CreateParamsAfterCompletionRedirect" - ] - """ - Configuration when `type=redirect`. - """ - type: Literal["hosted_confirmation", "redirect"] - """ - The specified behavior after the purchase is complete. Either `redirect` or `hosted_confirmation`. - """ - - class CreateParamsAfterCompletionHostedConfirmation(TypedDict): - custom_message: NotRequired[str] - """ - A custom message to display to the customer after the purchase is complete. - """ - - class CreateParamsAfterCompletionRedirect(TypedDict): - url: str - """ - The URL the customer will be redirected to after the purchase is complete. You can embed `{CHECKOUT_SESSION_ID}` into the URL to have the `id` of the completed [checkout session](https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-id) included. - """ - - class CreateParamsAutomaticTax(TypedDict): - enabled: bool - """ - Set to `true` to [calculate tax automatically](https://docs.stripe.com/tax) using the customer's location. - - Enabling this parameter causes the payment link to collect any billing address information necessary for tax calculation. - """ - liability: NotRequired["PaymentLink.CreateParamsAutomaticTaxLiability"] - """ - The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. - """ - - class CreateParamsAutomaticTaxLiability(TypedDict): - account: NotRequired[str] - """ - The connected account being referenced when `type` is `account`. - """ - type: Literal["account", "self"] - """ - Type of the account referenced in the request. - """ - - class CreateParamsConsentCollection(TypedDict): - payment_method_reuse_agreement: NotRequired[ - "PaymentLink.CreateParamsConsentCollectionPaymentMethodReuseAgreement" - ] - """ - Determines the display of payment method reuse agreement text in the UI. If set to `hidden`, it will hide legal text related to the reuse of a payment method. - """ - promotions: NotRequired[Literal["auto", "none"]] - """ - If set to `auto`, enables the collection of customer consent for promotional communications. The Checkout - Session will determine whether to display an option to opt into promotional communication - from the merchant depending on the customer's locale. Only available to US merchants. - """ - terms_of_service: NotRequired[Literal["none", "required"]] - """ - If set to `required`, it requires customers to check a terms of service checkbox before being able to pay. - There must be a valid terms of service URL set in your [Dashboard settings](https://dashboard.stripe.com/settings/public). - """ - - class CreateParamsConsentCollectionPaymentMethodReuseAgreement(TypedDict): - position: Literal["auto", "hidden"] - """ - Determines the position and visibility of the payment method reuse agreement in the UI. When set to `auto`, Stripe's - defaults will be used. When set to `hidden`, the payment method reuse agreement text will always be hidden in the UI. - """ - - class CreateParamsCustomField(TypedDict): - dropdown: NotRequired["PaymentLink.CreateParamsCustomFieldDropdown"] - """ - Configuration for `type=dropdown` fields. - """ - key: str - """ - String of your choice that your integration can use to reconcile this field. Must be unique to this field, alphanumeric, and up to 200 characters. - """ - label: "PaymentLink.CreateParamsCustomFieldLabel" - """ - The label for the field, displayed to the customer. - """ - numeric: NotRequired["PaymentLink.CreateParamsCustomFieldNumeric"] - """ - Configuration for `type=numeric` fields. - """ - optional: NotRequired[bool] - """ - Whether the customer is required to complete the field before completing the Checkout Session. Defaults to `false`. - """ - text: NotRequired["PaymentLink.CreateParamsCustomFieldText"] - """ - Configuration for `type=text` fields. - """ - type: Literal["dropdown", "numeric", "text"] - """ - The type of the field. - """ - - class CreateParamsCustomFieldDropdown(TypedDict): - default_value: NotRequired[str] - """ - The value that will pre-fill the field on the payment page.Must match a `value` in the `options` array. - """ - options: List["PaymentLink.CreateParamsCustomFieldDropdownOption"] - """ - The options available for the customer to select. Up to 200 options allowed. - """ - - class CreateParamsCustomFieldDropdownOption(TypedDict): - label: str - """ - The label for the option, displayed to the customer. Up to 100 characters. - """ - value: str - """ - The value for this option, not displayed to the customer, used by your integration to reconcile the option selected by the customer. Must be unique to this option, alphanumeric, and up to 100 characters. - """ - - class CreateParamsCustomFieldLabel(TypedDict): - custom: str - """ - Custom text for the label, displayed to the customer. Up to 50 characters. - """ - type: Literal["custom"] - """ - The type of the label. - """ - - class CreateParamsCustomFieldNumeric(TypedDict): - default_value: NotRequired[str] - """ - The value that will pre-fill the field on the payment page. - """ - maximum_length: NotRequired[int] - """ - The maximum character length constraint for the customer's input. - """ - minimum_length: NotRequired[int] - """ - The minimum character length requirement for the customer's input. - """ - - class CreateParamsCustomFieldText(TypedDict): - default_value: NotRequired[str] - """ - The value that will pre-fill the field on the payment page. - """ - maximum_length: NotRequired[int] - """ - The maximum character length constraint for the customer's input. - """ - minimum_length: NotRequired[int] - """ - The minimum character length requirement for the customer's input. - """ - - class CreateParamsCustomText(TypedDict): - after_submit: NotRequired[ - "Literal['']|PaymentLink.CreateParamsCustomTextAfterSubmit" - ] - """ - Custom text that should be displayed after the payment confirmation button. - """ - shipping_address: NotRequired[ - "Literal['']|PaymentLink.CreateParamsCustomTextShippingAddress" - ] - """ - Custom text that should be displayed alongside shipping address collection. - """ - submit: NotRequired[ - "Literal['']|PaymentLink.CreateParamsCustomTextSubmit" - ] - """ - Custom text that should be displayed alongside the payment confirmation button. - """ - terms_of_service_acceptance: NotRequired[ - "Literal['']|PaymentLink.CreateParamsCustomTextTermsOfServiceAcceptance" - ] - """ - Custom text that should be displayed in place of the default terms of service agreement text. - """ - - class CreateParamsCustomTextAfterSubmit(TypedDict): - message: str - """ - Text may be up to 1200 characters in length. - """ - - class CreateParamsCustomTextShippingAddress(TypedDict): - message: str - """ - Text may be up to 1200 characters in length. - """ - - class CreateParamsCustomTextSubmit(TypedDict): - message: str - """ - Text may be up to 1200 characters in length. - """ - - class CreateParamsCustomTextTermsOfServiceAcceptance(TypedDict): - message: str - """ - Text may be up to 1200 characters in length. - """ - - class CreateParamsInvoiceCreation(TypedDict): - enabled: bool - """ - Whether the feature is enabled - """ - invoice_data: NotRequired[ - "PaymentLink.CreateParamsInvoiceCreationInvoiceData" - ] - """ - Invoice PDF configuration. - """ - - class CreateParamsInvoiceCreationInvoiceData(TypedDict): - account_tax_ids: NotRequired["Literal['']|List[str]"] - """ - The account tax IDs associated with the invoice. - """ - custom_fields: NotRequired[ - "Literal['']|List[PaymentLink.CreateParamsInvoiceCreationInvoiceDataCustomField]" - ] - """ - Default custom fields to be displayed on invoices for this customer. - """ - description: NotRequired[str] - """ - An arbitrary string attached to the object. Often useful for displaying to users. - """ - footer: NotRequired[str] - """ - Default footer to be displayed on invoices for this customer. - """ - issuer: NotRequired[ - "PaymentLink.CreateParamsInvoiceCreationInvoiceDataIssuer" - ] - """ - The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - rendering_options: NotRequired[ - "Literal['']|PaymentLink.CreateParamsInvoiceCreationInvoiceDataRenderingOptions" - ] - """ - Default options for invoice PDF rendering for this customer. - """ - - class CreateParamsInvoiceCreationInvoiceDataCustomField(TypedDict): - name: str - """ - The name of the custom field. This may be up to 40 characters. - """ - value: str - """ - The value of the custom field. This may be up to 140 characters. - """ - - class CreateParamsInvoiceCreationInvoiceDataIssuer(TypedDict): - account: NotRequired[str] - """ - The connected account being referenced when `type` is `account`. - """ - type: Literal["account", "self"] - """ - Type of the account referenced in the request. - """ - - class CreateParamsInvoiceCreationInvoiceDataRenderingOptions(TypedDict): - amount_tax_display: NotRequired[ - "Literal['']|Literal['exclude_tax', 'include_inclusive_tax']" - ] - """ - How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One of `exclude_tax` or `include_inclusive_tax`. `include_inclusive_tax` will include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. `exclude_tax` will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts. - """ - template: NotRequired[str] - """ - ID of the invoice rendering template to use for this invoice. - """ - - class CreateParamsLineItem(TypedDict): - adjustable_quantity: NotRequired[ - "PaymentLink.CreateParamsLineItemAdjustableQuantity" - ] - """ - When set, provides configuration for this item's quantity to be adjusted by the customer during checkout. - """ - price: NotRequired[str] - """ - The ID of the [Price](https://stripe.com/docs/api/prices) or [Plan](https://stripe.com/docs/api/plans) object. One of `price` or `price_data` is required. - """ - price_data: NotRequired["PaymentLink.CreateParamsLineItemPriceData"] - """ - Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. - """ - quantity: int - """ - The quantity of the line item being purchased. - """ - - class CreateParamsLineItemAdjustableQuantity(TypedDict): - enabled: bool - """ - Set to true if the quantity can be adjusted to any non-negative Integer. - """ - maximum: NotRequired[int] - """ - The maximum quantity the customer can purchase. By default this value is 99. You can specify a value up to 999999. - """ - minimum: NotRequired[int] - """ - The minimum quantity the customer can purchase. By default this value is 0. If there is only one item in the cart then that item's quantity cannot go down to 0. - """ - - class CreateParamsLineItemPriceData(TypedDict): - 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). - """ - product: NotRequired[str] - """ - The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to. One of `product` or `product_data` is required. - """ - product_data: NotRequired[ - "PaymentLink.CreateParamsLineItemPriceDataProductData" - ] - """ - Data used to generate a new [Product](https://docs.stripe.com/api/products) object inline. One of `product` or `product_data` is required. - """ - recurring: NotRequired[ - "PaymentLink.CreateParamsLineItemPriceDataRecurring" - ] - """ - The recurring components of a price such as `interval` and `interval_count`. - """ - tax_behavior: NotRequired[ - Literal["exclusive", "inclusive", "unspecified"] - ] - """ - Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. - """ - unit_amount: NotRequired[int] - """ - A non-negative integer in cents (or local equivalent) representing how much to charge. One of `unit_amount` or `unit_amount_decimal` is required. - """ - unit_amount_decimal: NotRequired[str] - """ - Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - """ - - class CreateParamsLineItemPriceDataProductData(TypedDict): - description: NotRequired[str] - """ - The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. - """ - images: NotRequired[List[str]] - """ - A list of up to 8 URLs of images for this product, meant to be displayable to the customer. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - name: str - """ - The product's name, meant to be displayable to the customer. - """ - tax_code: NotRequired[str] - """ - A [tax code](https://stripe.com/docs/tax/tax-categories) ID. - """ - unit_label: NotRequired[str] - """ - A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal. - """ - - class CreateParamsLineItemPriceDataRecurring(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Specifies billing frequency. Either `day`, `week`, `month` or `year`. - """ - interval_count: NotRequired[int] - """ - The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). - """ - - class CreateParamsOptionalItem(TypedDict): - adjustable_quantity: NotRequired[ - "PaymentLink.CreateParamsOptionalItemAdjustableQuantity" - ] - """ - When set, provides configuration for the customer to adjust the quantity of the line item created when a customer chooses to add this optional item to their order. - """ - price: str - """ - The ID of the [Price](https://stripe.com/docs/api/prices) or [Plan](https://stripe.com/docs/api/plans) object. - """ - quantity: int - """ - The initial quantity of the line item created when a customer chooses to add this optional item to their order. - """ - - class CreateParamsOptionalItemAdjustableQuantity(TypedDict): - enabled: bool - """ - Set to true if the quantity can be adjusted to any non-negative integer. - """ - maximum: NotRequired[int] - """ - The maximum quantity of this item the customer can purchase. By default this value is 99. - """ - minimum: NotRequired[int] - """ - The minimum quantity of this item the customer must purchase, if they choose to purchase it. Because this item is optional, the customer will always be able to remove it from their order, even if the `minimum` configured here is greater than 0. By default this value is 0. - """ - - class CreateParamsPaymentIntentData(TypedDict): - capture_method: NotRequired[ - Literal["automatic", "automatic_async", "manual"] - ] - """ - Controls when the funds will be captured from the customer's account. - """ - description: NotRequired[str] - """ - An arbitrary string attached to the object. Often useful for displaying to users. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will declaratively set metadata on [Payment Intents](https://stripe.com/docs/api/payment_intents) generated from this payment link. Unlike object-level metadata, this field is declarative. Updates will clear prior values. - """ - setup_future_usage: NotRequired[Literal["off_session", "on_session"]] - """ - Indicates that you intend to [make future payments](https://stripe.com/docs/payments/payment-intents#future-usage) with the payment method collected by this Checkout Session. - - When setting this to `on_session`, Checkout will show a notice to the customer that their payment details will be saved. - - When setting this to `off_session`, Checkout will show a notice to the customer that their payment details will be saved and used for future payments. - - If a Customer has been provided or Checkout creates a new Customer,Checkout will attach the payment method to the Customer. - - If Checkout does not create a Customer, the payment method is not attached to a Customer. To reuse the payment method, you can retrieve it from the Checkout Session's PaymentIntent. - - When processing card payments, Checkout also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as SCA. - """ - statement_descriptor: NotRequired[str] - """ - Text that appears on the customer's statement as the statement descriptor for a non-card charge. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see [the Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors). - - Setting this value for a card charge returns an error. For card charges, set the [statement_descriptor_suffix](https://docs.stripe.com/get-started/account/statement-descriptors#dynamic) instead. - """ - statement_descriptor_suffix: NotRequired[str] - """ - Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. - """ - transfer_group: NotRequired[str] - """ - A string that identifies the resulting payment as part of a group. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/connect/separate-charges-and-transfers) for details. - """ - - class CreateParamsPhoneNumberCollection(TypedDict): - enabled: bool - """ - Set to `true` to enable phone number collection. - """ - - class CreateParamsRestrictions(TypedDict): - completed_sessions: ( - "PaymentLink.CreateParamsRestrictionsCompletedSessions" - ) - """ - Configuration for the `completed_sessions` restriction type. - """ - - class CreateParamsRestrictionsCompletedSessions(TypedDict): - limit: int - """ - The maximum number of checkout sessions that can be completed for the `completed_sessions` restriction to be met. - """ - - class CreateParamsShippingAddressCollection(TypedDict): - allowed_countries: List[ - Literal[ - "AC", - "AD", - "AE", - "AF", - "AG", - "AI", - "AL", - "AM", - "AO", - "AQ", - "AR", - "AT", - "AU", - "AW", - "AX", - "AZ", - "BA", - "BB", - "BD", - "BE", - "BF", - "BG", - "BH", - "BI", - "BJ", - "BL", - "BM", - "BN", - "BO", - "BQ", - "BR", - "BS", - "BT", - "BV", - "BW", - "BY", - "BZ", - "CA", - "CD", - "CF", - "CG", - "CH", - "CI", - "CK", - "CL", - "CM", - "CN", - "CO", - "CR", - "CV", - "CW", - "CY", - "CZ", - "DE", - "DJ", - "DK", - "DM", - "DO", - "DZ", - "EC", - "EE", - "EG", - "EH", - "ER", - "ES", - "ET", - "FI", - "FJ", - "FK", - "FO", - "FR", - "GA", - "GB", - "GD", - "GE", - "GF", - "GG", - "GH", - "GI", - "GL", - "GM", - "GN", - "GP", - "GQ", - "GR", - "GS", - "GT", - "GU", - "GW", - "GY", - "HK", - "HN", - "HR", - "HT", - "HU", - "ID", - "IE", - "IL", - "IM", - "IN", - "IO", - "IQ", - "IS", - "IT", - "JE", - "JM", - "JO", - "JP", - "KE", - "KG", - "KH", - "KI", - "KM", - "KN", - "KR", - "KW", - "KY", - "KZ", - "LA", - "LB", - "LC", - "LI", - "LK", - "LR", - "LS", - "LT", - "LU", - "LV", - "LY", - "MA", - "MC", - "MD", - "ME", - "MF", - "MG", - "MK", - "ML", - "MM", - "MN", - "MO", - "MQ", - "MR", - "MS", - "MT", - "MU", - "MV", - "MW", - "MX", - "MY", - "MZ", - "NA", - "NC", - "NE", - "NG", - "NI", - "NL", - "NO", - "NP", - "NR", - "NU", - "NZ", - "OM", - "PA", - "PE", - "PF", - "PG", - "PH", - "PK", - "PL", - "PM", - "PN", - "PR", - "PS", - "PT", - "PY", - "QA", - "RE", - "RO", - "RS", - "RU", - "RW", - "SA", - "SB", - "SC", - "SD", - "SE", - "SG", - "SH", - "SI", - "SJ", - "SK", - "SL", - "SM", - "SN", - "SO", - "SR", - "SS", - "ST", - "SV", - "SX", - "SZ", - "TA", - "TC", - "TD", - "TF", - "TG", - "TH", - "TJ", - "TK", - "TL", - "TM", - "TN", - "TO", - "TR", - "TT", - "TV", - "TW", - "TZ", - "UA", - "UG", - "US", - "UY", - "UZ", - "VA", - "VC", - "VE", - "VG", - "VN", - "VU", - "WF", - "WS", - "XK", - "YE", - "YT", - "ZA", - "ZM", - "ZW", - "ZZ", - ] - ] - """ - An array of two-letter ISO country codes representing which countries Checkout should provide as options for - shipping locations. - """ - - class CreateParamsShippingOption(TypedDict): - shipping_rate: NotRequired[str] - """ - The ID of the Shipping Rate to use for this shipping option. - """ - - class CreateParamsSubscriptionData(TypedDict): - description: NotRequired[str] - """ - The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. - """ - invoice_settings: NotRequired[ - "PaymentLink.CreateParamsSubscriptionDataInvoiceSettings" - ] - """ - All invoices will be billed using the specified settings. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will declaratively set metadata on [Subscriptions](https://stripe.com/docs/api/subscriptions) generated from this payment link. Unlike object-level metadata, this field is declarative. Updates will clear prior values. - """ - trial_period_days: NotRequired[int] - """ - Integer representing the number of trial period days before the customer is charged for the first time. Has to be at least 1. - """ - trial_settings: NotRequired[ - "PaymentLink.CreateParamsSubscriptionDataTrialSettings" - ] - """ - Settings related to subscription trials. - """ - - class CreateParamsSubscriptionDataInvoiceSettings(TypedDict): - issuer: NotRequired[ - "PaymentLink.CreateParamsSubscriptionDataInvoiceSettingsIssuer" - ] - """ - The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. - """ - - class CreateParamsSubscriptionDataInvoiceSettingsIssuer(TypedDict): - account: NotRequired[str] - """ - The connected account being referenced when `type` is `account`. - """ - type: Literal["account", "self"] - """ - Type of the account referenced in the request. - """ - - class CreateParamsSubscriptionDataTrialSettings(TypedDict): - end_behavior: ( - "PaymentLink.CreateParamsSubscriptionDataTrialSettingsEndBehavior" - ) - """ - Defines how the subscription should behave when the user's free trial ends. - """ - - class CreateParamsSubscriptionDataTrialSettingsEndBehavior(TypedDict): - missing_payment_method: Literal["cancel", "create_invoice", "pause"] - """ - Indicates how the subscription should change when the trial ends if the user did not provide a payment method. - """ - - class CreateParamsTaxIdCollection(TypedDict): - enabled: bool - """ - Enable tax ID collection during checkout. Defaults to `false`. - """ - required: NotRequired[Literal["if_supported", "never"]] - """ - Describes whether a tax ID is required during checkout. Defaults to `never`. - """ - - class CreateParamsTransferData(TypedDict): - amount: NotRequired[int] - """ - The amount that will be transferred automatically when a charge succeeds. - """ - destination: str - """ - If specified, successful charges will be attributed to the destination - account for tax reporting, and the funds from charges will be transferred - to the destination account. The ID of the resulting transfer will be - returned on the successful charge's `transfer` field. - """ - - class ListLineItemsParams(RequestOptions): - 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 ListParams(RequestOptions): - active: NotRequired[bool] - """ - Only return payment links that are active or inactive (e.g., pass `false` to list all inactive payment links). - """ - 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 ModifyParams(RequestOptions): - active: NotRequired[bool] - """ - Whether the payment link's `url` is active. If `false`, customers visiting the URL will be shown a page saying that the link has been deactivated. - """ - after_completion: NotRequired[ - "PaymentLink.ModifyParamsAfterCompletion" - ] - """ - Behavior after the purchase is complete. - """ - allow_promotion_codes: NotRequired[bool] - """ - Enables user redeemable promotion codes. - """ - automatic_tax: NotRequired["PaymentLink.ModifyParamsAutomaticTax"] - """ - Configuration for automatic tax collection. - """ - billing_address_collection: NotRequired[Literal["auto", "required"]] - """ - Configuration for collecting the customer's billing address. Defaults to `auto`. - """ - custom_fields: NotRequired[ - "Literal['']|List[PaymentLink.ModifyParamsCustomField]" - ] - """ - Collect additional information from your customer using custom fields. Up to 3 fields are supported. - """ - custom_text: NotRequired["PaymentLink.ModifyParamsCustomText"] - """ - Display additional text for your customers using custom text. - """ - customer_creation: NotRequired[Literal["always", "if_required"]] - """ - Configures whether [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link create a [Customer](https://stripe.com/docs/api/customers). - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - inactive_message: NotRequired["Literal['']|str"] - """ - The custom message to be displayed to a customer when a payment link is no longer active. - """ - invoice_creation: NotRequired[ - "PaymentLink.ModifyParamsInvoiceCreation" - ] - """ - Generate a post-purchase Invoice for one-time payments. - """ - line_items: NotRequired[List["PaymentLink.ModifyParamsLineItem"]] - """ - The line items representing what is being sold. Each line item represents an item being sold. Up to 20 line items are supported. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. Metadata associated with this Payment Link will automatically be copied to [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link. - """ - payment_intent_data: NotRequired[ - "PaymentLink.ModifyParamsPaymentIntentData" - ] - """ - A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in `payment` mode. - """ - payment_method_collection: NotRequired[ - Literal["always", "if_required"] - ] - """ - Specify whether Checkout should collect a payment method. When set to `if_required`, Checkout will not collect a payment method when the total due for the session is 0.This may occur if the Checkout Session includes a free trial or a discount. - - Can only be set in `subscription` mode. Defaults to `always`. - - If you'd like information on how to collect a payment method outside of Checkout, read the guide on [configuring subscriptions with a free trial](https://stripe.com/docs/payments/checkout/free-trials). - """ - payment_method_types: NotRequired[ - "Literal['']|List[Literal['affirm', 'afterpay_clearpay', 'alipay', 'alma', 'au_becs_debit', 'bacs_debit', 'bancontact', 'billie', 'blik', 'boleto', 'card', 'cashapp', 'eps', 'fpx', 'giropay', 'gopay', 'grabpay', 'ideal', 'klarna', 'konbini', 'link', 'mb_way', 'mobilepay', 'multibanco', 'oxxo', 'p24', 'pay_by_bank', 'paynow', 'paypal', 'paypay', 'payto', 'pix', 'promptpay', 'qris', 'rechnung', 'satispay', 'sepa_debit', 'shopeepay', 'sofort', 'swish', 'twint', 'us_bank_account', 'wechat_pay', 'zip']]" - ] - """ - The list of payment method types that customers can use. Pass an empty string to enable dynamic payment methods that use your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). - """ - phone_number_collection: NotRequired[ - "PaymentLink.ModifyParamsPhoneNumberCollection" - ] - """ - Controls phone number collection settings during checkout. - - We recommend that you review your privacy policy and check with your legal contacts. - """ - restrictions: NotRequired[ - "Literal['']|PaymentLink.ModifyParamsRestrictions" - ] - """ - Settings that restrict the usage of a payment link. - """ - shipping_address_collection: NotRequired[ - "Literal['']|PaymentLink.ModifyParamsShippingAddressCollection" - ] - """ - Configuration for collecting the customer's shipping address. - """ - submit_type: NotRequired[ - Literal["auto", "book", "donate", "pay", "subscribe"] - ] - """ - Describes the type of transaction being performed in order to customize relevant text on the page, such as the submit button. Changing this value will also affect the hostname in the [url](https://stripe.com/docs/api/payment_links/payment_links/object#url) property (example: `donate.stripe.com`). - """ - subscription_data: NotRequired[ - "PaymentLink.ModifyParamsSubscriptionData" - ] - """ - When creating a subscription, the specified configuration data will be used. There must be at least one line item with a recurring price to use `subscription_data`. - """ - tax_id_collection: NotRequired[ - "PaymentLink.ModifyParamsTaxIdCollection" - ] - """ - Controls tax ID collection during checkout. - """ - - class ModifyParamsAfterCompletion(TypedDict): - hosted_confirmation: NotRequired[ - "PaymentLink.ModifyParamsAfterCompletionHostedConfirmation" - ] - """ - Configuration when `type=hosted_confirmation`. - """ - redirect: NotRequired[ - "PaymentLink.ModifyParamsAfterCompletionRedirect" - ] - """ - Configuration when `type=redirect`. - """ - type: Literal["hosted_confirmation", "redirect"] - """ - The specified behavior after the purchase is complete. Either `redirect` or `hosted_confirmation`. - """ - - class ModifyParamsAfterCompletionHostedConfirmation(TypedDict): - custom_message: NotRequired[str] - """ - A custom message to display to the customer after the purchase is complete. - """ - - class ModifyParamsAfterCompletionRedirect(TypedDict): - url: str - """ - The URL the customer will be redirected to after the purchase is complete. You can embed `{CHECKOUT_SESSION_ID}` into the URL to have the `id` of the completed [checkout session](https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-id) included. - """ - - class ModifyParamsAutomaticTax(TypedDict): - enabled: bool - """ - Set to `true` to [calculate tax automatically](https://docs.stripe.com/tax) using the customer's location. - - Enabling this parameter causes the payment link to collect any billing address information necessary for tax calculation. - """ - liability: NotRequired["PaymentLink.ModifyParamsAutomaticTaxLiability"] - """ - The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. - """ - - class ModifyParamsAutomaticTaxLiability(TypedDict): - account: NotRequired[str] - """ - The connected account being referenced when `type` is `account`. - """ - type: Literal["account", "self"] - """ - Type of the account referenced in the request. - """ - - class ModifyParamsCustomField(TypedDict): - dropdown: NotRequired["PaymentLink.ModifyParamsCustomFieldDropdown"] - """ - Configuration for `type=dropdown` fields. - """ - key: str - """ - String of your choice that your integration can use to reconcile this field. Must be unique to this field, alphanumeric, and up to 200 characters. - """ - label: "PaymentLink.ModifyParamsCustomFieldLabel" - """ - The label for the field, displayed to the customer. - """ - numeric: NotRequired["PaymentLink.ModifyParamsCustomFieldNumeric"] - """ - Configuration for `type=numeric` fields. - """ - optional: NotRequired[bool] - """ - Whether the customer is required to complete the field before completing the Checkout Session. Defaults to `false`. - """ - text: NotRequired["PaymentLink.ModifyParamsCustomFieldText"] - """ - Configuration for `type=text` fields. - """ - type: Literal["dropdown", "numeric", "text"] - """ - The type of the field. - """ - - class ModifyParamsCustomFieldDropdown(TypedDict): - default_value: NotRequired[str] - """ - The value that will pre-fill the field on the payment page.Must match a `value` in the `options` array. - """ - options: List["PaymentLink.ModifyParamsCustomFieldDropdownOption"] - """ - The options available for the customer to select. Up to 200 options allowed. - """ - - class ModifyParamsCustomFieldDropdownOption(TypedDict): - label: str - """ - The label for the option, displayed to the customer. Up to 100 characters. - """ - value: str - """ - The value for this option, not displayed to the customer, used by your integration to reconcile the option selected by the customer. Must be unique to this option, alphanumeric, and up to 100 characters. - """ - - class ModifyParamsCustomFieldLabel(TypedDict): - custom: str - """ - Custom text for the label, displayed to the customer. Up to 50 characters. - """ - type: Literal["custom"] - """ - The type of the label. - """ - - class ModifyParamsCustomFieldNumeric(TypedDict): - default_value: NotRequired[str] - """ - The value that will pre-fill the field on the payment page. - """ - maximum_length: NotRequired[int] - """ - The maximum character length constraint for the customer's input. - """ - minimum_length: NotRequired[int] - """ - The minimum character length requirement for the customer's input. - """ - - class ModifyParamsCustomFieldText(TypedDict): - default_value: NotRequired[str] - """ - The value that will pre-fill the field on the payment page. - """ - maximum_length: NotRequired[int] - """ - The maximum character length constraint for the customer's input. - """ - minimum_length: NotRequired[int] - """ - The minimum character length requirement for the customer's input. - """ - - class ModifyParamsCustomText(TypedDict): - after_submit: NotRequired[ - "Literal['']|PaymentLink.ModifyParamsCustomTextAfterSubmit" - ] - """ - Custom text that should be displayed after the payment confirmation button. - """ - shipping_address: NotRequired[ - "Literal['']|PaymentLink.ModifyParamsCustomTextShippingAddress" - ] - """ - Custom text that should be displayed alongside shipping address collection. - """ - submit: NotRequired[ - "Literal['']|PaymentLink.ModifyParamsCustomTextSubmit" - ] - """ - Custom text that should be displayed alongside the payment confirmation button. - """ - terms_of_service_acceptance: NotRequired[ - "Literal['']|PaymentLink.ModifyParamsCustomTextTermsOfServiceAcceptance" - ] - """ - Custom text that should be displayed in place of the default terms of service agreement text. - """ - - class ModifyParamsCustomTextAfterSubmit(TypedDict): - message: str - """ - Text may be up to 1200 characters in length. - """ - - class ModifyParamsCustomTextShippingAddress(TypedDict): - message: str - """ - Text may be up to 1200 characters in length. - """ - - class ModifyParamsCustomTextSubmit(TypedDict): - message: str - """ - Text may be up to 1200 characters in length. - """ - - class ModifyParamsCustomTextTermsOfServiceAcceptance(TypedDict): - message: str - """ - Text may be up to 1200 characters in length. - """ - - class ModifyParamsInvoiceCreation(TypedDict): - enabled: bool - """ - Whether the feature is enabled - """ - invoice_data: NotRequired[ - "PaymentLink.ModifyParamsInvoiceCreationInvoiceData" - ] - """ - Invoice PDF configuration. - """ - - class ModifyParamsInvoiceCreationInvoiceData(TypedDict): - account_tax_ids: NotRequired["Literal['']|List[str]"] - """ - The account tax IDs associated with the invoice. - """ - custom_fields: NotRequired[ - "Literal['']|List[PaymentLink.ModifyParamsInvoiceCreationInvoiceDataCustomField]" - ] - """ - Default custom fields to be displayed on invoices for this customer. - """ - description: NotRequired[str] - """ - An arbitrary string attached to the object. Often useful for displaying to users. - """ - footer: NotRequired[str] - """ - Default footer to be displayed on invoices for this customer. - """ - issuer: NotRequired[ - "PaymentLink.ModifyParamsInvoiceCreationInvoiceDataIssuer" - ] - """ - The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - rendering_options: NotRequired[ - "Literal['']|PaymentLink.ModifyParamsInvoiceCreationInvoiceDataRenderingOptions" - ] - """ - Default options for invoice PDF rendering for this customer. - """ - - class ModifyParamsInvoiceCreationInvoiceDataCustomField(TypedDict): - name: str - """ - The name of the custom field. This may be up to 40 characters. - """ - value: str - """ - The value of the custom field. This may be up to 140 characters. - """ - - class ModifyParamsInvoiceCreationInvoiceDataIssuer(TypedDict): - account: NotRequired[str] - """ - The connected account being referenced when `type` is `account`. - """ - type: Literal["account", "self"] - """ - Type of the account referenced in the request. - """ - - class ModifyParamsInvoiceCreationInvoiceDataRenderingOptions(TypedDict): - amount_tax_display: NotRequired[ - "Literal['']|Literal['exclude_tax', 'include_inclusive_tax']" - ] - """ - How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One of `exclude_tax` or `include_inclusive_tax`. `include_inclusive_tax` will include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. `exclude_tax` will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts. - """ - template: NotRequired[str] - """ - ID of the invoice rendering template to use for this invoice. - """ - - class ModifyParamsLineItem(TypedDict): - adjustable_quantity: NotRequired[ - "PaymentLink.ModifyParamsLineItemAdjustableQuantity" - ] - """ - When set, provides configuration for this item's quantity to be adjusted by the customer during checkout. - """ - id: str - """ - The ID of an existing line item on the payment link. - """ - quantity: NotRequired[int] - """ - The quantity of the line item being purchased. - """ - - class ModifyParamsLineItemAdjustableQuantity(TypedDict): - enabled: bool - """ - Set to true if the quantity can be adjusted to any non-negative Integer. - """ - maximum: NotRequired[int] - """ - The maximum quantity the customer can purchase. By default this value is 99. You can specify a value up to 999999. - """ - minimum: NotRequired[int] - """ - The minimum quantity the customer can purchase. By default this value is 0. If there is only one item in the cart then that item's quantity cannot go down to 0. - """ - - class ModifyParamsPaymentIntentData(TypedDict): - description: NotRequired["Literal['']|str"] - """ - An arbitrary string attached to the object. Often useful for displaying to users. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will declaratively set metadata on [Payment Intents](https://stripe.com/docs/api/payment_intents) generated from this payment link. Unlike object-level metadata, this field is declarative. Updates will clear prior values. - """ - statement_descriptor: NotRequired["Literal['']|str"] - """ - Text that appears on the customer's statement as the statement descriptor for a non-card charge. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see [the Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors). - - Setting this value for a card charge returns an error. For card charges, set the [statement_descriptor_suffix](https://docs.stripe.com/get-started/account/statement-descriptors#dynamic) instead. - """ - statement_descriptor_suffix: NotRequired["Literal['']|str"] - """ - Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. - """ - transfer_group: NotRequired["Literal['']|str"] - """ - A string that identifies the resulting payment as part of a group. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/connect/separate-charges-and-transfers) for details. - """ - - class ModifyParamsPhoneNumberCollection(TypedDict): - enabled: bool - """ - Set to `true` to enable phone number collection. - """ - - class ModifyParamsRestrictions(TypedDict): - completed_sessions: ( - "PaymentLink.ModifyParamsRestrictionsCompletedSessions" - ) - """ - Configuration for the `completed_sessions` restriction type. - """ - - class ModifyParamsRestrictionsCompletedSessions(TypedDict): - limit: int - """ - The maximum number of checkout sessions that can be completed for the `completed_sessions` restriction to be met. - """ - - class ModifyParamsShippingAddressCollection(TypedDict): - allowed_countries: List[ - Literal[ - "AC", - "AD", - "AE", - "AF", - "AG", - "AI", - "AL", - "AM", - "AO", - "AQ", - "AR", - "AT", - "AU", - "AW", - "AX", - "AZ", - "BA", - "BB", - "BD", - "BE", - "BF", - "BG", - "BH", - "BI", - "BJ", - "BL", - "BM", - "BN", - "BO", - "BQ", - "BR", - "BS", - "BT", - "BV", - "BW", - "BY", - "BZ", - "CA", - "CD", - "CF", - "CG", - "CH", - "CI", - "CK", - "CL", - "CM", - "CN", - "CO", - "CR", - "CV", - "CW", - "CY", - "CZ", - "DE", - "DJ", - "DK", - "DM", - "DO", - "DZ", - "EC", - "EE", - "EG", - "EH", - "ER", - "ES", - "ET", - "FI", - "FJ", - "FK", - "FO", - "FR", - "GA", - "GB", - "GD", - "GE", - "GF", - "GG", - "GH", - "GI", - "GL", - "GM", - "GN", - "GP", - "GQ", - "GR", - "GS", - "GT", - "GU", - "GW", - "GY", - "HK", - "HN", - "HR", - "HT", - "HU", - "ID", - "IE", - "IL", - "IM", - "IN", - "IO", - "IQ", - "IS", - "IT", - "JE", - "JM", - "JO", - "JP", - "KE", - "KG", - "KH", - "KI", - "KM", - "KN", - "KR", - "KW", - "KY", - "KZ", - "LA", - "LB", - "LC", - "LI", - "LK", - "LR", - "LS", - "LT", - "LU", - "LV", - "LY", - "MA", - "MC", - "MD", - "ME", - "MF", - "MG", - "MK", - "ML", - "MM", - "MN", - "MO", - "MQ", - "MR", - "MS", - "MT", - "MU", - "MV", - "MW", - "MX", - "MY", - "MZ", - "NA", - "NC", - "NE", - "NG", - "NI", - "NL", - "NO", - "NP", - "NR", - "NU", - "NZ", - "OM", - "PA", - "PE", - "PF", - "PG", - "PH", - "PK", - "PL", - "PM", - "PN", - "PR", - "PS", - "PT", - "PY", - "QA", - "RE", - "RO", - "RS", - "RU", - "RW", - "SA", - "SB", - "SC", - "SD", - "SE", - "SG", - "SH", - "SI", - "SJ", - "SK", - "SL", - "SM", - "SN", - "SO", - "SR", - "SS", - "ST", - "SV", - "SX", - "SZ", - "TA", - "TC", - "TD", - "TF", - "TG", - "TH", - "TJ", - "TK", - "TL", - "TM", - "TN", - "TO", - "TR", - "TT", - "TV", - "TW", - "TZ", - "UA", - "UG", - "US", - "UY", - "UZ", - "VA", - "VC", - "VE", - "VG", - "VN", - "VU", - "WF", - "WS", - "XK", - "YE", - "YT", - "ZA", - "ZM", - "ZW", - "ZZ", - ] - ] - """ - An array of two-letter ISO country codes representing which countries Checkout should provide as options for - shipping locations. - """ - - class ModifyParamsSubscriptionData(TypedDict): - invoice_settings: NotRequired[ - "PaymentLink.ModifyParamsSubscriptionDataInvoiceSettings" - ] - """ - All invoices will be billed using the specified settings. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will declaratively set metadata on [Subscriptions](https://stripe.com/docs/api/subscriptions) generated from this payment link. Unlike object-level metadata, this field is declarative. Updates will clear prior values. - """ - trial_period_days: NotRequired["Literal['']|int"] - """ - Integer representing the number of trial period days before the customer is charged for the first time. Has to be at least 1. - """ - trial_settings: NotRequired[ - "Literal['']|PaymentLink.ModifyParamsSubscriptionDataTrialSettings" - ] - """ - Settings related to subscription trials. - """ - - class ModifyParamsSubscriptionDataInvoiceSettings(TypedDict): - issuer: NotRequired[ - "PaymentLink.ModifyParamsSubscriptionDataInvoiceSettingsIssuer" - ] - """ - The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. - """ - - class ModifyParamsSubscriptionDataInvoiceSettingsIssuer(TypedDict): - account: NotRequired[str] - """ - The connected account being referenced when `type` is `account`. - """ - type: Literal["account", "self"] - """ - Type of the account referenced in the request. - """ - - class ModifyParamsSubscriptionDataTrialSettings(TypedDict): - end_behavior: ( - "PaymentLink.ModifyParamsSubscriptionDataTrialSettingsEndBehavior" - ) - """ - Defines how the subscription should behave when the user's free trial ends. - """ - - class ModifyParamsSubscriptionDataTrialSettingsEndBehavior(TypedDict): - missing_payment_method: Literal["cancel", "create_invoice", "pause"] - """ - Indicates how the subscription should change when the trial ends if the user did not provide a payment method. - """ - - class ModifyParamsTaxIdCollection(TypedDict): - enabled: bool - """ - Enable tax ID collection during checkout. Defaults to `false`. - """ - required: NotRequired[Literal["if_supported", "never"]] - """ - Describes whether a tax ID is required during checkout. Defaults to `never`. - """ - - class RetrieveParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - active: bool """ Whether the payment link's `url` is active. If `false`, customers visiting the URL will be shown a page saying that the link has been deactivated. @@ -2740,7 +894,7 @@ class RetrieveParams(RequestOptions): @classmethod def create( - cls, **params: Unpack["PaymentLink.CreateParams"] + cls, **params: Unpack["PaymentLinkCreateParams"] ) -> "PaymentLink": """ Creates a payment link. @@ -2756,7 +910,7 @@ def create( @classmethod async def create_async( - cls, **params: Unpack["PaymentLink.CreateParams"] + cls, **params: Unpack["PaymentLinkCreateParams"] ) -> "PaymentLink": """ Creates a payment link. @@ -2772,7 +926,7 @@ async def create_async( @classmethod def list( - cls, **params: Unpack["PaymentLink.ListParams"] + cls, **params: Unpack["PaymentLinkListParams"] ) -> ListObject["PaymentLink"]: """ Returns a list of your payment links. @@ -2792,7 +946,7 @@ def list( @classmethod async def list_async( - cls, **params: Unpack["PaymentLink.ListParams"] + cls, **params: Unpack["PaymentLinkListParams"] ) -> ListObject["PaymentLink"]: """ Returns a list of your payment links. @@ -2814,7 +968,7 @@ async def list_async( def _cls_list_line_items( cls, payment_link: str, - **params: Unpack["PaymentLink.ListLineItemsParams"], + **params: Unpack["PaymentLinkListLineItemsParams"], ) -> ListObject["LineItem"]: """ When retrieving a payment link, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items. @@ -2833,7 +987,7 @@ def _cls_list_line_items( @overload @staticmethod def list_line_items( - payment_link: str, **params: Unpack["PaymentLink.ListLineItemsParams"] + payment_link: str, **params: Unpack["PaymentLinkListLineItemsParams"] ) -> ListObject["LineItem"]: """ When retrieving a payment link, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items. @@ -2842,7 +996,7 @@ def list_line_items( @overload def list_line_items( - self, **params: Unpack["PaymentLink.ListLineItemsParams"] + self, **params: Unpack["PaymentLinkListLineItemsParams"] ) -> ListObject["LineItem"]: """ When retrieving a payment link, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items. @@ -2851,7 +1005,7 @@ def list_line_items( @class_method_variant("_cls_list_line_items") def list_line_items( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["PaymentLink.ListLineItemsParams"] + self, **params: Unpack["PaymentLinkListLineItemsParams"] ) -> ListObject["LineItem"]: """ When retrieving a payment link, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items. @@ -2871,7 +1025,7 @@ def list_line_items( # pyright: ignore[reportGeneralTypeIssues] async def _cls_list_line_items_async( cls, payment_link: str, - **params: Unpack["PaymentLink.ListLineItemsParams"], + **params: Unpack["PaymentLinkListLineItemsParams"], ) -> ListObject["LineItem"]: """ When retrieving a payment link, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items. @@ -2890,7 +1044,7 @@ async def _cls_list_line_items_async( @overload @staticmethod async def list_line_items_async( - payment_link: str, **params: Unpack["PaymentLink.ListLineItemsParams"] + payment_link: str, **params: Unpack["PaymentLinkListLineItemsParams"] ) -> ListObject["LineItem"]: """ When retrieving a payment link, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items. @@ -2899,7 +1053,7 @@ async def list_line_items_async( @overload async def list_line_items_async( - self, **params: Unpack["PaymentLink.ListLineItemsParams"] + self, **params: Unpack["PaymentLinkListLineItemsParams"] ) -> ListObject["LineItem"]: """ When retrieving a payment link, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items. @@ -2908,7 +1062,7 @@ async def list_line_items_async( @class_method_variant("_cls_list_line_items_async") async def list_line_items_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["PaymentLink.ListLineItemsParams"] + self, **params: Unpack["PaymentLinkListLineItemsParams"] ) -> ListObject["LineItem"]: """ When retrieving a payment link, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items. @@ -2926,7 +1080,7 @@ async def list_line_items_async( # pyright: ignore[reportGeneralTypeIssues] @classmethod def modify( - cls, id: str, **params: Unpack["PaymentLink.ModifyParams"] + cls, id: str, **params: Unpack["PaymentLinkModifyParams"] ) -> "PaymentLink": """ Updates a payment link. @@ -2943,7 +1097,7 @@ def modify( @classmethod async def modify_async( - cls, id: str, **params: Unpack["PaymentLink.ModifyParams"] + cls, id: str, **params: Unpack["PaymentLinkModifyParams"] ) -> "PaymentLink": """ Updates a payment link. @@ -2960,7 +1114,7 @@ async def modify_async( @classmethod def retrieve( - cls, id: str, **params: Unpack["PaymentLink.RetrieveParams"] + cls, id: str, **params: Unpack["PaymentLinkRetrieveParams"] ) -> "PaymentLink": """ Retrieve a payment link. @@ -2971,7 +1125,7 @@ def retrieve( @classmethod async def retrieve_async( - cls, id: str, **params: Unpack["PaymentLink.RetrieveParams"] + cls, id: str, **params: Unpack["PaymentLinkRetrieveParams"] ) -> "PaymentLink": """ Retrieve a payment link. diff --git a/stripe/_payment_link_line_item_service.py b/stripe/_payment_link_line_item_service.py index 5a659bc5f..83c1cb28f 100644 --- a/stripe/_payment_link_line_item_service.py +++ b/stripe/_payment_link_line_item_service.py @@ -5,33 +5,20 @@ from stripe._request_options import RequestOptions from stripe._stripe_service import StripeService from stripe._util import sanitize_id -from typing import List, Optional, cast -from typing_extensions import NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params._payment_link_line_item_list_params import ( + PaymentLinkLineItemListParams, + ) -class PaymentLinkLineItemService(StripeService): - class ListParams(TypedDict): - 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 PaymentLinkLineItemService(StripeService): def list( self, payment_link: str, - params: Optional["PaymentLinkLineItemService.ListParams"] = None, + params: Optional["PaymentLinkLineItemListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[LineItem]: """ @@ -53,7 +40,7 @@ def list( async def list_async( self, payment_link: str, - params: Optional["PaymentLinkLineItemService.ListParams"] = None, + params: Optional["PaymentLinkLineItemListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[LineItem]: """ diff --git a/stripe/_payment_link_service.py b/stripe/_payment_link_service.py index 12e5d2632..8352eaab6 100644 --- a/stripe/_payment_link_service.py +++ b/stripe/_payment_link_service.py @@ -6,8 +6,20 @@ from stripe._request_options import RequestOptions from stripe._stripe_service import StripeService from stripe._util import sanitize_id -from typing import Dict, List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params._payment_link_create_params import ( + PaymentLinkCreateParams, + ) + from stripe.params._payment_link_list_params import PaymentLinkListParams + from stripe.params._payment_link_retrieve_params import ( + PaymentLinkRetrieveParams, + ) + from stripe.params._payment_link_update_params import ( + PaymentLinkUpdateParams, + ) class PaymentLinkService(StripeService): @@ -15,1869 +27,9 @@ def __init__(self, requestor): super().__init__(requestor) self.line_items = PaymentLinkLineItemService(self._requestor) - class CreateParams(TypedDict): - after_completion: NotRequired[ - "PaymentLinkService.CreateParamsAfterCompletion" - ] - """ - Behavior after the purchase is complete. - """ - allow_promotion_codes: NotRequired[bool] - """ - Enables user redeemable promotion codes. - """ - application_fee_amount: NotRequired[int] - """ - The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. Can only be applied when there are no line items with recurring prices. - """ - application_fee_percent: NotRequired[float] - """ - A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. There must be at least 1 line item with a recurring price to use this field. - """ - automatic_tax: NotRequired[ - "PaymentLinkService.CreateParamsAutomaticTax" - ] - """ - Configuration for automatic tax collection. - """ - billing_address_collection: NotRequired[Literal["auto", "required"]] - """ - Configuration for collecting the customer's billing address. Defaults to `auto`. - """ - consent_collection: NotRequired[ - "PaymentLinkService.CreateParamsConsentCollection" - ] - """ - Configure fields to gather active consent from customers. - """ - currency: NotRequired[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) and supported by each line item's price. - """ - custom_fields: NotRequired[ - List["PaymentLinkService.CreateParamsCustomField"] - ] - """ - Collect additional information from your customer using custom fields. Up to 3 fields are supported. - """ - custom_text: NotRequired["PaymentLinkService.CreateParamsCustomText"] - """ - Display additional text for your customers using custom text. - """ - customer_creation: NotRequired[Literal["always", "if_required"]] - """ - Configures whether [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link create a [Customer](https://stripe.com/docs/api/customers). - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - inactive_message: NotRequired[str] - """ - The custom message to be displayed to a customer when a payment link is no longer active. - """ - invoice_creation: NotRequired[ - "PaymentLinkService.CreateParamsInvoiceCreation" - ] - """ - Generate a post-purchase Invoice for one-time payments. - """ - line_items: List["PaymentLinkService.CreateParamsLineItem"] - """ - The line items representing what is being sold. Each line item represents an item being sold. Up to 20 line items are supported. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. Metadata associated with this Payment Link will automatically be copied to [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link. - """ - on_behalf_of: NotRequired[str] - """ - The account on behalf of which to charge. - """ - optional_items: NotRequired[ - List["PaymentLinkService.CreateParamsOptionalItem"] - ] - """ - A list of optional items the customer can add to their order at checkout. Use this parameter to pass one-time or recurring [Prices](https://stripe.com/docs/api/prices). - There is a maximum of 10 optional items allowed on a payment link, and the existing limits on the number of line items allowed on a payment link apply to the combined number of line items and optional items. - There is a maximum of 20 combined line items and optional items. - """ - payment_intent_data: NotRequired[ - "PaymentLinkService.CreateParamsPaymentIntentData" - ] - """ - A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in `payment` mode. - """ - payment_method_collection: NotRequired[ - Literal["always", "if_required"] - ] - """ - Specify whether Checkout should collect a payment method. When set to `if_required`, Checkout will not collect a payment method when the total due for the session is 0.This may occur if the Checkout Session includes a free trial or a discount. - - Can only be set in `subscription` mode. Defaults to `always`. - - If you'd like information on how to collect a payment method outside of Checkout, read the guide on [configuring subscriptions with a free trial](https://stripe.com/docs/payments/checkout/free-trials). - """ - payment_method_types: NotRequired[ - List[ - Literal[ - "affirm", - "afterpay_clearpay", - "alipay", - "alma", - "au_becs_debit", - "bacs_debit", - "bancontact", - "billie", - "blik", - "boleto", - "card", - "cashapp", - "eps", - "fpx", - "giropay", - "gopay", - "grabpay", - "ideal", - "klarna", - "konbini", - "link", - "mb_way", - "mobilepay", - "multibanco", - "oxxo", - "p24", - "pay_by_bank", - "paynow", - "paypal", - "paypay", - "payto", - "pix", - "promptpay", - "qris", - "rechnung", - "satispay", - "sepa_debit", - "shopeepay", - "sofort", - "swish", - "twint", - "us_bank_account", - "wechat_pay", - "zip", - ] - ] - ] - """ - The list of payment method types that customers can use. If no value is passed, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods) (20+ payment methods [supported](https://stripe.com/docs/payments/payment-methods/integration-options#payment-method-product-support)). - """ - phone_number_collection: NotRequired[ - "PaymentLinkService.CreateParamsPhoneNumberCollection" - ] - """ - Controls phone number collection settings during checkout. - - We recommend that you review your privacy policy and check with your legal contacts. - """ - restrictions: NotRequired[ - "PaymentLinkService.CreateParamsRestrictions" - ] - """ - Settings that restrict the usage of a payment link. - """ - shipping_address_collection: NotRequired[ - "PaymentLinkService.CreateParamsShippingAddressCollection" - ] - """ - Configuration for collecting the customer's shipping address. - """ - shipping_options: NotRequired[ - List["PaymentLinkService.CreateParamsShippingOption"] - ] - """ - The shipping rate options to apply to [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link. - """ - submit_type: NotRequired[ - Literal["auto", "book", "donate", "pay", "subscribe"] - ] - """ - Describes the type of transaction being performed in order to customize relevant text on the page, such as the submit button. Changing this value will also affect the hostname in the [url](https://stripe.com/docs/api/payment_links/payment_links/object#url) property (example: `donate.stripe.com`). - """ - subscription_data: NotRequired[ - "PaymentLinkService.CreateParamsSubscriptionData" - ] - """ - When creating a subscription, the specified configuration data will be used. There must be at least one line item with a recurring price to use `subscription_data`. - """ - tax_id_collection: NotRequired[ - "PaymentLinkService.CreateParamsTaxIdCollection" - ] - """ - Controls tax ID collection during checkout. - """ - transfer_data: NotRequired[ - "PaymentLinkService.CreateParamsTransferData" - ] - """ - The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to. - """ - - class CreateParamsAfterCompletion(TypedDict): - hosted_confirmation: NotRequired[ - "PaymentLinkService.CreateParamsAfterCompletionHostedConfirmation" - ] - """ - Configuration when `type=hosted_confirmation`. - """ - redirect: NotRequired[ - "PaymentLinkService.CreateParamsAfterCompletionRedirect" - ] - """ - Configuration when `type=redirect`. - """ - type: Literal["hosted_confirmation", "redirect"] - """ - The specified behavior after the purchase is complete. Either `redirect` or `hosted_confirmation`. - """ - - class CreateParamsAfterCompletionHostedConfirmation(TypedDict): - custom_message: NotRequired[str] - """ - A custom message to display to the customer after the purchase is complete. - """ - - class CreateParamsAfterCompletionRedirect(TypedDict): - url: str - """ - The URL the customer will be redirected to after the purchase is complete. You can embed `{CHECKOUT_SESSION_ID}` into the URL to have the `id` of the completed [checkout session](https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-id) included. - """ - - class CreateParamsAutomaticTax(TypedDict): - enabled: bool - """ - Set to `true` to [calculate tax automatically](https://docs.stripe.com/tax) using the customer's location. - - Enabling this parameter causes the payment link to collect any billing address information necessary for tax calculation. - """ - liability: NotRequired[ - "PaymentLinkService.CreateParamsAutomaticTaxLiability" - ] - """ - The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. - """ - - class CreateParamsAutomaticTaxLiability(TypedDict): - account: NotRequired[str] - """ - The connected account being referenced when `type` is `account`. - """ - type: Literal["account", "self"] - """ - Type of the account referenced in the request. - """ - - class CreateParamsConsentCollection(TypedDict): - payment_method_reuse_agreement: NotRequired[ - "PaymentLinkService.CreateParamsConsentCollectionPaymentMethodReuseAgreement" - ] - """ - Determines the display of payment method reuse agreement text in the UI. If set to `hidden`, it will hide legal text related to the reuse of a payment method. - """ - promotions: NotRequired[Literal["auto", "none"]] - """ - If set to `auto`, enables the collection of customer consent for promotional communications. The Checkout - Session will determine whether to display an option to opt into promotional communication - from the merchant depending on the customer's locale. Only available to US merchants. - """ - terms_of_service: NotRequired[Literal["none", "required"]] - """ - If set to `required`, it requires customers to check a terms of service checkbox before being able to pay. - There must be a valid terms of service URL set in your [Dashboard settings](https://dashboard.stripe.com/settings/public). - """ - - class CreateParamsConsentCollectionPaymentMethodReuseAgreement(TypedDict): - position: Literal["auto", "hidden"] - """ - Determines the position and visibility of the payment method reuse agreement in the UI. When set to `auto`, Stripe's - defaults will be used. When set to `hidden`, the payment method reuse agreement text will always be hidden in the UI. - """ - - class CreateParamsCustomField(TypedDict): - dropdown: NotRequired[ - "PaymentLinkService.CreateParamsCustomFieldDropdown" - ] - """ - Configuration for `type=dropdown` fields. - """ - key: str - """ - String of your choice that your integration can use to reconcile this field. Must be unique to this field, alphanumeric, and up to 200 characters. - """ - label: "PaymentLinkService.CreateParamsCustomFieldLabel" - """ - The label for the field, displayed to the customer. - """ - numeric: NotRequired[ - "PaymentLinkService.CreateParamsCustomFieldNumeric" - ] - """ - Configuration for `type=numeric` fields. - """ - optional: NotRequired[bool] - """ - Whether the customer is required to complete the field before completing the Checkout Session. Defaults to `false`. - """ - text: NotRequired["PaymentLinkService.CreateParamsCustomFieldText"] - """ - Configuration for `type=text` fields. - """ - type: Literal["dropdown", "numeric", "text"] - """ - The type of the field. - """ - - class CreateParamsCustomFieldDropdown(TypedDict): - default_value: NotRequired[str] - """ - The value that will pre-fill the field on the payment page.Must match a `value` in the `options` array. - """ - options: List[ - "PaymentLinkService.CreateParamsCustomFieldDropdownOption" - ] - """ - The options available for the customer to select. Up to 200 options allowed. - """ - - class CreateParamsCustomFieldDropdownOption(TypedDict): - label: str - """ - The label for the option, displayed to the customer. Up to 100 characters. - """ - value: str - """ - The value for this option, not displayed to the customer, used by your integration to reconcile the option selected by the customer. Must be unique to this option, alphanumeric, and up to 100 characters. - """ - - class CreateParamsCustomFieldLabel(TypedDict): - custom: str - """ - Custom text for the label, displayed to the customer. Up to 50 characters. - """ - type: Literal["custom"] - """ - The type of the label. - """ - - class CreateParamsCustomFieldNumeric(TypedDict): - default_value: NotRequired[str] - """ - The value that will pre-fill the field on the payment page. - """ - maximum_length: NotRequired[int] - """ - The maximum character length constraint for the customer's input. - """ - minimum_length: NotRequired[int] - """ - The minimum character length requirement for the customer's input. - """ - - class CreateParamsCustomFieldText(TypedDict): - default_value: NotRequired[str] - """ - The value that will pre-fill the field on the payment page. - """ - maximum_length: NotRequired[int] - """ - The maximum character length constraint for the customer's input. - """ - minimum_length: NotRequired[int] - """ - The minimum character length requirement for the customer's input. - """ - - class CreateParamsCustomText(TypedDict): - after_submit: NotRequired[ - "Literal['']|PaymentLinkService.CreateParamsCustomTextAfterSubmit" - ] - """ - Custom text that should be displayed after the payment confirmation button. - """ - shipping_address: NotRequired[ - "Literal['']|PaymentLinkService.CreateParamsCustomTextShippingAddress" - ] - """ - Custom text that should be displayed alongside shipping address collection. - """ - submit: NotRequired[ - "Literal['']|PaymentLinkService.CreateParamsCustomTextSubmit" - ] - """ - Custom text that should be displayed alongside the payment confirmation button. - """ - terms_of_service_acceptance: NotRequired[ - "Literal['']|PaymentLinkService.CreateParamsCustomTextTermsOfServiceAcceptance" - ] - """ - Custom text that should be displayed in place of the default terms of service agreement text. - """ - - class CreateParamsCustomTextAfterSubmit(TypedDict): - message: str - """ - Text may be up to 1200 characters in length. - """ - - class CreateParamsCustomTextShippingAddress(TypedDict): - message: str - """ - Text may be up to 1200 characters in length. - """ - - class CreateParamsCustomTextSubmit(TypedDict): - message: str - """ - Text may be up to 1200 characters in length. - """ - - class CreateParamsCustomTextTermsOfServiceAcceptance(TypedDict): - message: str - """ - Text may be up to 1200 characters in length. - """ - - class CreateParamsInvoiceCreation(TypedDict): - enabled: bool - """ - Whether the feature is enabled - """ - invoice_data: NotRequired[ - "PaymentLinkService.CreateParamsInvoiceCreationInvoiceData" - ] - """ - Invoice PDF configuration. - """ - - class CreateParamsInvoiceCreationInvoiceData(TypedDict): - account_tax_ids: NotRequired["Literal['']|List[str]"] - """ - The account tax IDs associated with the invoice. - """ - custom_fields: NotRequired[ - "Literal['']|List[PaymentLinkService.CreateParamsInvoiceCreationInvoiceDataCustomField]" - ] - """ - Default custom fields to be displayed on invoices for this customer. - """ - description: NotRequired[str] - """ - An arbitrary string attached to the object. Often useful for displaying to users. - """ - footer: NotRequired[str] - """ - Default footer to be displayed on invoices for this customer. - """ - issuer: NotRequired[ - "PaymentLinkService.CreateParamsInvoiceCreationInvoiceDataIssuer" - ] - """ - The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - rendering_options: NotRequired[ - "Literal['']|PaymentLinkService.CreateParamsInvoiceCreationInvoiceDataRenderingOptions" - ] - """ - Default options for invoice PDF rendering for this customer. - """ - - class CreateParamsInvoiceCreationInvoiceDataCustomField(TypedDict): - name: str - """ - The name of the custom field. This may be up to 40 characters. - """ - value: str - """ - The value of the custom field. This may be up to 140 characters. - """ - - class CreateParamsInvoiceCreationInvoiceDataIssuer(TypedDict): - account: NotRequired[str] - """ - The connected account being referenced when `type` is `account`. - """ - type: Literal["account", "self"] - """ - Type of the account referenced in the request. - """ - - class CreateParamsInvoiceCreationInvoiceDataRenderingOptions(TypedDict): - amount_tax_display: NotRequired[ - "Literal['']|Literal['exclude_tax', 'include_inclusive_tax']" - ] - """ - How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One of `exclude_tax` or `include_inclusive_tax`. `include_inclusive_tax` will include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. `exclude_tax` will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts. - """ - template: NotRequired[str] - """ - ID of the invoice rendering template to use for this invoice. - """ - - class CreateParamsLineItem(TypedDict): - adjustable_quantity: NotRequired[ - "PaymentLinkService.CreateParamsLineItemAdjustableQuantity" - ] - """ - When set, provides configuration for this item's quantity to be adjusted by the customer during checkout. - """ - price: NotRequired[str] - """ - The ID of the [Price](https://stripe.com/docs/api/prices) or [Plan](https://stripe.com/docs/api/plans) object. One of `price` or `price_data` is required. - """ - price_data: NotRequired[ - "PaymentLinkService.CreateParamsLineItemPriceData" - ] - """ - Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. - """ - quantity: int - """ - The quantity of the line item being purchased. - """ - - class CreateParamsLineItemAdjustableQuantity(TypedDict): - enabled: bool - """ - Set to true if the quantity can be adjusted to any non-negative Integer. - """ - maximum: NotRequired[int] - """ - The maximum quantity the customer can purchase. By default this value is 99. You can specify a value up to 999999. - """ - minimum: NotRequired[int] - """ - The minimum quantity the customer can purchase. By default this value is 0. If there is only one item in the cart then that item's quantity cannot go down to 0. - """ - - class CreateParamsLineItemPriceData(TypedDict): - 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). - """ - product: NotRequired[str] - """ - The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to. One of `product` or `product_data` is required. - """ - product_data: NotRequired[ - "PaymentLinkService.CreateParamsLineItemPriceDataProductData" - ] - """ - Data used to generate a new [Product](https://docs.stripe.com/api/products) object inline. One of `product` or `product_data` is required. - """ - recurring: NotRequired[ - "PaymentLinkService.CreateParamsLineItemPriceDataRecurring" - ] - """ - The recurring components of a price such as `interval` and `interval_count`. - """ - tax_behavior: NotRequired[ - Literal["exclusive", "inclusive", "unspecified"] - ] - """ - Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. - """ - unit_amount: NotRequired[int] - """ - A non-negative integer in cents (or local equivalent) representing how much to charge. One of `unit_amount` or `unit_amount_decimal` is required. - """ - unit_amount_decimal: NotRequired[str] - """ - Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - """ - - class CreateParamsLineItemPriceDataProductData(TypedDict): - description: NotRequired[str] - """ - The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. - """ - images: NotRequired[List[str]] - """ - A list of up to 8 URLs of images for this product, meant to be displayable to the customer. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - name: str - """ - The product's name, meant to be displayable to the customer. - """ - tax_code: NotRequired[str] - """ - A [tax code](https://stripe.com/docs/tax/tax-categories) ID. - """ - unit_label: NotRequired[str] - """ - A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal. - """ - - class CreateParamsLineItemPriceDataRecurring(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Specifies billing frequency. Either `day`, `week`, `month` or `year`. - """ - interval_count: NotRequired[int] - """ - The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). - """ - - class CreateParamsOptionalItem(TypedDict): - adjustable_quantity: NotRequired[ - "PaymentLinkService.CreateParamsOptionalItemAdjustableQuantity" - ] - """ - When set, provides configuration for the customer to adjust the quantity of the line item created when a customer chooses to add this optional item to their order. - """ - price: str - """ - The ID of the [Price](https://stripe.com/docs/api/prices) or [Plan](https://stripe.com/docs/api/plans) object. - """ - quantity: int - """ - The initial quantity of the line item created when a customer chooses to add this optional item to their order. - """ - - class CreateParamsOptionalItemAdjustableQuantity(TypedDict): - enabled: bool - """ - Set to true if the quantity can be adjusted to any non-negative integer. - """ - maximum: NotRequired[int] - """ - The maximum quantity of this item the customer can purchase. By default this value is 99. - """ - minimum: NotRequired[int] - """ - The minimum quantity of this item the customer must purchase, if they choose to purchase it. Because this item is optional, the customer will always be able to remove it from their order, even if the `minimum` configured here is greater than 0. By default this value is 0. - """ - - class CreateParamsPaymentIntentData(TypedDict): - capture_method: NotRequired[ - Literal["automatic", "automatic_async", "manual"] - ] - """ - Controls when the funds will be captured from the customer's account. - """ - description: NotRequired[str] - """ - An arbitrary string attached to the object. Often useful for displaying to users. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will declaratively set metadata on [Payment Intents](https://stripe.com/docs/api/payment_intents) generated from this payment link. Unlike object-level metadata, this field is declarative. Updates will clear prior values. - """ - setup_future_usage: NotRequired[Literal["off_session", "on_session"]] - """ - Indicates that you intend to [make future payments](https://stripe.com/docs/payments/payment-intents#future-usage) with the payment method collected by this Checkout Session. - - When setting this to `on_session`, Checkout will show a notice to the customer that their payment details will be saved. - - When setting this to `off_session`, Checkout will show a notice to the customer that their payment details will be saved and used for future payments. - - If a Customer has been provided or Checkout creates a new Customer,Checkout will attach the payment method to the Customer. - - If Checkout does not create a Customer, the payment method is not attached to a Customer. To reuse the payment method, you can retrieve it from the Checkout Session's PaymentIntent. - - When processing card payments, Checkout also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as SCA. - """ - statement_descriptor: NotRequired[str] - """ - Text that appears on the customer's statement as the statement descriptor for a non-card charge. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see [the Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors). - - Setting this value for a card charge returns an error. For card charges, set the [statement_descriptor_suffix](https://docs.stripe.com/get-started/account/statement-descriptors#dynamic) instead. - """ - statement_descriptor_suffix: NotRequired[str] - """ - Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. - """ - transfer_group: NotRequired[str] - """ - A string that identifies the resulting payment as part of a group. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/connect/separate-charges-and-transfers) for details. - """ - - class CreateParamsPhoneNumberCollection(TypedDict): - enabled: bool - """ - Set to `true` to enable phone number collection. - """ - - class CreateParamsRestrictions(TypedDict): - completed_sessions: ( - "PaymentLinkService.CreateParamsRestrictionsCompletedSessions" - ) - """ - Configuration for the `completed_sessions` restriction type. - """ - - class CreateParamsRestrictionsCompletedSessions(TypedDict): - limit: int - """ - The maximum number of checkout sessions that can be completed for the `completed_sessions` restriction to be met. - """ - - class CreateParamsShippingAddressCollection(TypedDict): - allowed_countries: List[ - Literal[ - "AC", - "AD", - "AE", - "AF", - "AG", - "AI", - "AL", - "AM", - "AO", - "AQ", - "AR", - "AT", - "AU", - "AW", - "AX", - "AZ", - "BA", - "BB", - "BD", - "BE", - "BF", - "BG", - "BH", - "BI", - "BJ", - "BL", - "BM", - "BN", - "BO", - "BQ", - "BR", - "BS", - "BT", - "BV", - "BW", - "BY", - "BZ", - "CA", - "CD", - "CF", - "CG", - "CH", - "CI", - "CK", - "CL", - "CM", - "CN", - "CO", - "CR", - "CV", - "CW", - "CY", - "CZ", - "DE", - "DJ", - "DK", - "DM", - "DO", - "DZ", - "EC", - "EE", - "EG", - "EH", - "ER", - "ES", - "ET", - "FI", - "FJ", - "FK", - "FO", - "FR", - "GA", - "GB", - "GD", - "GE", - "GF", - "GG", - "GH", - "GI", - "GL", - "GM", - "GN", - "GP", - "GQ", - "GR", - "GS", - "GT", - "GU", - "GW", - "GY", - "HK", - "HN", - "HR", - "HT", - "HU", - "ID", - "IE", - "IL", - "IM", - "IN", - "IO", - "IQ", - "IS", - "IT", - "JE", - "JM", - "JO", - "JP", - "KE", - "KG", - "KH", - "KI", - "KM", - "KN", - "KR", - "KW", - "KY", - "KZ", - "LA", - "LB", - "LC", - "LI", - "LK", - "LR", - "LS", - "LT", - "LU", - "LV", - "LY", - "MA", - "MC", - "MD", - "ME", - "MF", - "MG", - "MK", - "ML", - "MM", - "MN", - "MO", - "MQ", - "MR", - "MS", - "MT", - "MU", - "MV", - "MW", - "MX", - "MY", - "MZ", - "NA", - "NC", - "NE", - "NG", - "NI", - "NL", - "NO", - "NP", - "NR", - "NU", - "NZ", - "OM", - "PA", - "PE", - "PF", - "PG", - "PH", - "PK", - "PL", - "PM", - "PN", - "PR", - "PS", - "PT", - "PY", - "QA", - "RE", - "RO", - "RS", - "RU", - "RW", - "SA", - "SB", - "SC", - "SD", - "SE", - "SG", - "SH", - "SI", - "SJ", - "SK", - "SL", - "SM", - "SN", - "SO", - "SR", - "SS", - "ST", - "SV", - "SX", - "SZ", - "TA", - "TC", - "TD", - "TF", - "TG", - "TH", - "TJ", - "TK", - "TL", - "TM", - "TN", - "TO", - "TR", - "TT", - "TV", - "TW", - "TZ", - "UA", - "UG", - "US", - "UY", - "UZ", - "VA", - "VC", - "VE", - "VG", - "VN", - "VU", - "WF", - "WS", - "XK", - "YE", - "YT", - "ZA", - "ZM", - "ZW", - "ZZ", - ] - ] - """ - An array of two-letter ISO country codes representing which countries Checkout should provide as options for - shipping locations. - """ - - class CreateParamsShippingOption(TypedDict): - shipping_rate: NotRequired[str] - """ - The ID of the Shipping Rate to use for this shipping option. - """ - - class CreateParamsSubscriptionData(TypedDict): - description: NotRequired[str] - """ - The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. - """ - invoice_settings: NotRequired[ - "PaymentLinkService.CreateParamsSubscriptionDataInvoiceSettings" - ] - """ - All invoices will be billed using the specified settings. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will declaratively set metadata on [Subscriptions](https://stripe.com/docs/api/subscriptions) generated from this payment link. Unlike object-level metadata, this field is declarative. Updates will clear prior values. - """ - trial_period_days: NotRequired[int] - """ - Integer representing the number of trial period days before the customer is charged for the first time. Has to be at least 1. - """ - trial_settings: NotRequired[ - "PaymentLinkService.CreateParamsSubscriptionDataTrialSettings" - ] - """ - Settings related to subscription trials. - """ - - class CreateParamsSubscriptionDataInvoiceSettings(TypedDict): - issuer: NotRequired[ - "PaymentLinkService.CreateParamsSubscriptionDataInvoiceSettingsIssuer" - ] - """ - The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. - """ - - class CreateParamsSubscriptionDataInvoiceSettingsIssuer(TypedDict): - account: NotRequired[str] - """ - The connected account being referenced when `type` is `account`. - """ - type: Literal["account", "self"] - """ - Type of the account referenced in the request. - """ - - class CreateParamsSubscriptionDataTrialSettings(TypedDict): - end_behavior: "PaymentLinkService.CreateParamsSubscriptionDataTrialSettingsEndBehavior" - """ - Defines how the subscription should behave when the user's free trial ends. - """ - - class CreateParamsSubscriptionDataTrialSettingsEndBehavior(TypedDict): - missing_payment_method: Literal["cancel", "create_invoice", "pause"] - """ - Indicates how the subscription should change when the trial ends if the user did not provide a payment method. - """ - - class CreateParamsTaxIdCollection(TypedDict): - enabled: bool - """ - Enable tax ID collection during checkout. Defaults to `false`. - """ - required: NotRequired[Literal["if_supported", "never"]] - """ - Describes whether a tax ID is required during checkout. Defaults to `never`. - """ - - class CreateParamsTransferData(TypedDict): - amount: NotRequired[int] - """ - The amount that will be transferred automatically when a charge succeeds. - """ - destination: str - """ - If specified, successful charges will be attributed to the destination - account for tax reporting, and the funds from charges will be transferred - to the destination account. The ID of the resulting transfer will be - returned on the successful charge's `transfer` field. - """ - - class ListParams(TypedDict): - active: NotRequired[bool] - """ - Only return payment links that are active or inactive (e.g., pass `false` to list all inactive payment links). - """ - 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 RetrieveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class UpdateParams(TypedDict): - active: NotRequired[bool] - """ - Whether the payment link's `url` is active. If `false`, customers visiting the URL will be shown a page saying that the link has been deactivated. - """ - after_completion: NotRequired[ - "PaymentLinkService.UpdateParamsAfterCompletion" - ] - """ - Behavior after the purchase is complete. - """ - allow_promotion_codes: NotRequired[bool] - """ - Enables user redeemable promotion codes. - """ - automatic_tax: NotRequired[ - "PaymentLinkService.UpdateParamsAutomaticTax" - ] - """ - Configuration for automatic tax collection. - """ - billing_address_collection: NotRequired[Literal["auto", "required"]] - """ - Configuration for collecting the customer's billing address. Defaults to `auto`. - """ - custom_fields: NotRequired[ - "Literal['']|List[PaymentLinkService.UpdateParamsCustomField]" - ] - """ - Collect additional information from your customer using custom fields. Up to 3 fields are supported. - """ - custom_text: NotRequired["PaymentLinkService.UpdateParamsCustomText"] - """ - Display additional text for your customers using custom text. - """ - customer_creation: NotRequired[Literal["always", "if_required"]] - """ - Configures whether [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link create a [Customer](https://stripe.com/docs/api/customers). - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - inactive_message: NotRequired["Literal['']|str"] - """ - The custom message to be displayed to a customer when a payment link is no longer active. - """ - invoice_creation: NotRequired[ - "PaymentLinkService.UpdateParamsInvoiceCreation" - ] - """ - Generate a post-purchase Invoice for one-time payments. - """ - line_items: NotRequired[ - List["PaymentLinkService.UpdateParamsLineItem"] - ] - """ - The line items representing what is being sold. Each line item represents an item being sold. Up to 20 line items are supported. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. Metadata associated with this Payment Link will automatically be copied to [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link. - """ - payment_intent_data: NotRequired[ - "PaymentLinkService.UpdateParamsPaymentIntentData" - ] - """ - A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in `payment` mode. - """ - payment_method_collection: NotRequired[ - Literal["always", "if_required"] - ] - """ - Specify whether Checkout should collect a payment method. When set to `if_required`, Checkout will not collect a payment method when the total due for the session is 0.This may occur if the Checkout Session includes a free trial or a discount. - - Can only be set in `subscription` mode. Defaults to `always`. - - If you'd like information on how to collect a payment method outside of Checkout, read the guide on [configuring subscriptions with a free trial](https://stripe.com/docs/payments/checkout/free-trials). - """ - payment_method_types: NotRequired[ - "Literal['']|List[Literal['affirm', 'afterpay_clearpay', 'alipay', 'alma', 'au_becs_debit', 'bacs_debit', 'bancontact', 'billie', 'blik', 'boleto', 'card', 'cashapp', 'eps', 'fpx', 'giropay', 'gopay', 'grabpay', 'ideal', 'klarna', 'konbini', 'link', 'mb_way', 'mobilepay', 'multibanco', 'oxxo', 'p24', 'pay_by_bank', 'paynow', 'paypal', 'paypay', 'payto', 'pix', 'promptpay', 'qris', 'rechnung', 'satispay', 'sepa_debit', 'shopeepay', 'sofort', 'swish', 'twint', 'us_bank_account', 'wechat_pay', 'zip']]" - ] - """ - The list of payment method types that customers can use. Pass an empty string to enable dynamic payment methods that use your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). - """ - phone_number_collection: NotRequired[ - "PaymentLinkService.UpdateParamsPhoneNumberCollection" - ] - """ - Controls phone number collection settings during checkout. - - We recommend that you review your privacy policy and check with your legal contacts. - """ - restrictions: NotRequired[ - "Literal['']|PaymentLinkService.UpdateParamsRestrictions" - ] - """ - Settings that restrict the usage of a payment link. - """ - shipping_address_collection: NotRequired[ - "Literal['']|PaymentLinkService.UpdateParamsShippingAddressCollection" - ] - """ - Configuration for collecting the customer's shipping address. - """ - submit_type: NotRequired[ - Literal["auto", "book", "donate", "pay", "subscribe"] - ] - """ - Describes the type of transaction being performed in order to customize relevant text on the page, such as the submit button. Changing this value will also affect the hostname in the [url](https://stripe.com/docs/api/payment_links/payment_links/object#url) property (example: `donate.stripe.com`). - """ - subscription_data: NotRequired[ - "PaymentLinkService.UpdateParamsSubscriptionData" - ] - """ - When creating a subscription, the specified configuration data will be used. There must be at least one line item with a recurring price to use `subscription_data`. - """ - tax_id_collection: NotRequired[ - "PaymentLinkService.UpdateParamsTaxIdCollection" - ] - """ - Controls tax ID collection during checkout. - """ - - class UpdateParamsAfterCompletion(TypedDict): - hosted_confirmation: NotRequired[ - "PaymentLinkService.UpdateParamsAfterCompletionHostedConfirmation" - ] - """ - Configuration when `type=hosted_confirmation`. - """ - redirect: NotRequired[ - "PaymentLinkService.UpdateParamsAfterCompletionRedirect" - ] - """ - Configuration when `type=redirect`. - """ - type: Literal["hosted_confirmation", "redirect"] - """ - The specified behavior after the purchase is complete. Either `redirect` or `hosted_confirmation`. - """ - - class UpdateParamsAfterCompletionHostedConfirmation(TypedDict): - custom_message: NotRequired[str] - """ - A custom message to display to the customer after the purchase is complete. - """ - - class UpdateParamsAfterCompletionRedirect(TypedDict): - url: str - """ - The URL the customer will be redirected to after the purchase is complete. You can embed `{CHECKOUT_SESSION_ID}` into the URL to have the `id` of the completed [checkout session](https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-id) included. - """ - - class UpdateParamsAutomaticTax(TypedDict): - enabled: bool - """ - Set to `true` to [calculate tax automatically](https://docs.stripe.com/tax) using the customer's location. - - Enabling this parameter causes the payment link to collect any billing address information necessary for tax calculation. - """ - liability: NotRequired[ - "PaymentLinkService.UpdateParamsAutomaticTaxLiability" - ] - """ - The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. - """ - - class UpdateParamsAutomaticTaxLiability(TypedDict): - account: NotRequired[str] - """ - The connected account being referenced when `type` is `account`. - """ - type: Literal["account", "self"] - """ - Type of the account referenced in the request. - """ - - class UpdateParamsCustomField(TypedDict): - dropdown: NotRequired[ - "PaymentLinkService.UpdateParamsCustomFieldDropdown" - ] - """ - Configuration for `type=dropdown` fields. - """ - key: str - """ - String of your choice that your integration can use to reconcile this field. Must be unique to this field, alphanumeric, and up to 200 characters. - """ - label: "PaymentLinkService.UpdateParamsCustomFieldLabel" - """ - The label for the field, displayed to the customer. - """ - numeric: NotRequired[ - "PaymentLinkService.UpdateParamsCustomFieldNumeric" - ] - """ - Configuration for `type=numeric` fields. - """ - optional: NotRequired[bool] - """ - Whether the customer is required to complete the field before completing the Checkout Session. Defaults to `false`. - """ - text: NotRequired["PaymentLinkService.UpdateParamsCustomFieldText"] - """ - Configuration for `type=text` fields. - """ - type: Literal["dropdown", "numeric", "text"] - """ - The type of the field. - """ - - class UpdateParamsCustomFieldDropdown(TypedDict): - default_value: NotRequired[str] - """ - The value that will pre-fill the field on the payment page.Must match a `value` in the `options` array. - """ - options: List[ - "PaymentLinkService.UpdateParamsCustomFieldDropdownOption" - ] - """ - The options available for the customer to select. Up to 200 options allowed. - """ - - class UpdateParamsCustomFieldDropdownOption(TypedDict): - label: str - """ - The label for the option, displayed to the customer. Up to 100 characters. - """ - value: str - """ - The value for this option, not displayed to the customer, used by your integration to reconcile the option selected by the customer. Must be unique to this option, alphanumeric, and up to 100 characters. - """ - - class UpdateParamsCustomFieldLabel(TypedDict): - custom: str - """ - Custom text for the label, displayed to the customer. Up to 50 characters. - """ - type: Literal["custom"] - """ - The type of the label. - """ - - class UpdateParamsCustomFieldNumeric(TypedDict): - default_value: NotRequired[str] - """ - The value that will pre-fill the field on the payment page. - """ - maximum_length: NotRequired[int] - """ - The maximum character length constraint for the customer's input. - """ - minimum_length: NotRequired[int] - """ - The minimum character length requirement for the customer's input. - """ - - class UpdateParamsCustomFieldText(TypedDict): - default_value: NotRequired[str] - """ - The value that will pre-fill the field on the payment page. - """ - maximum_length: NotRequired[int] - """ - The maximum character length constraint for the customer's input. - """ - minimum_length: NotRequired[int] - """ - The minimum character length requirement for the customer's input. - """ - - class UpdateParamsCustomText(TypedDict): - after_submit: NotRequired[ - "Literal['']|PaymentLinkService.UpdateParamsCustomTextAfterSubmit" - ] - """ - Custom text that should be displayed after the payment confirmation button. - """ - shipping_address: NotRequired[ - "Literal['']|PaymentLinkService.UpdateParamsCustomTextShippingAddress" - ] - """ - Custom text that should be displayed alongside shipping address collection. - """ - submit: NotRequired[ - "Literal['']|PaymentLinkService.UpdateParamsCustomTextSubmit" - ] - """ - Custom text that should be displayed alongside the payment confirmation button. - """ - terms_of_service_acceptance: NotRequired[ - "Literal['']|PaymentLinkService.UpdateParamsCustomTextTermsOfServiceAcceptance" - ] - """ - Custom text that should be displayed in place of the default terms of service agreement text. - """ - - class UpdateParamsCustomTextAfterSubmit(TypedDict): - message: str - """ - Text may be up to 1200 characters in length. - """ - - class UpdateParamsCustomTextShippingAddress(TypedDict): - message: str - """ - Text may be up to 1200 characters in length. - """ - - class UpdateParamsCustomTextSubmit(TypedDict): - message: str - """ - Text may be up to 1200 characters in length. - """ - - class UpdateParamsCustomTextTermsOfServiceAcceptance(TypedDict): - message: str - """ - Text may be up to 1200 characters in length. - """ - - class UpdateParamsInvoiceCreation(TypedDict): - enabled: bool - """ - Whether the feature is enabled - """ - invoice_data: NotRequired[ - "PaymentLinkService.UpdateParamsInvoiceCreationInvoiceData" - ] - """ - Invoice PDF configuration. - """ - - class UpdateParamsInvoiceCreationInvoiceData(TypedDict): - account_tax_ids: NotRequired["Literal['']|List[str]"] - """ - The account tax IDs associated with the invoice. - """ - custom_fields: NotRequired[ - "Literal['']|List[PaymentLinkService.UpdateParamsInvoiceCreationInvoiceDataCustomField]" - ] - """ - Default custom fields to be displayed on invoices for this customer. - """ - description: NotRequired[str] - """ - An arbitrary string attached to the object. Often useful for displaying to users. - """ - footer: NotRequired[str] - """ - Default footer to be displayed on invoices for this customer. - """ - issuer: NotRequired[ - "PaymentLinkService.UpdateParamsInvoiceCreationInvoiceDataIssuer" - ] - """ - The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - rendering_options: NotRequired[ - "Literal['']|PaymentLinkService.UpdateParamsInvoiceCreationInvoiceDataRenderingOptions" - ] - """ - Default options for invoice PDF rendering for this customer. - """ - - class UpdateParamsInvoiceCreationInvoiceDataCustomField(TypedDict): - name: str - """ - The name of the custom field. This may be up to 40 characters. - """ - value: str - """ - The value of the custom field. This may be up to 140 characters. - """ - - class UpdateParamsInvoiceCreationInvoiceDataIssuer(TypedDict): - account: NotRequired[str] - """ - The connected account being referenced when `type` is `account`. - """ - type: Literal["account", "self"] - """ - Type of the account referenced in the request. - """ - - class UpdateParamsInvoiceCreationInvoiceDataRenderingOptions(TypedDict): - amount_tax_display: NotRequired[ - "Literal['']|Literal['exclude_tax', 'include_inclusive_tax']" - ] - """ - How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One of `exclude_tax` or `include_inclusive_tax`. `include_inclusive_tax` will include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. `exclude_tax` will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts. - """ - template: NotRequired[str] - """ - ID of the invoice rendering template to use for this invoice. - """ - - class UpdateParamsLineItem(TypedDict): - adjustable_quantity: NotRequired[ - "PaymentLinkService.UpdateParamsLineItemAdjustableQuantity" - ] - """ - When set, provides configuration for this item's quantity to be adjusted by the customer during checkout. - """ - id: str - """ - The ID of an existing line item on the payment link. - """ - quantity: NotRequired[int] - """ - The quantity of the line item being purchased. - """ - - class UpdateParamsLineItemAdjustableQuantity(TypedDict): - enabled: bool - """ - Set to true if the quantity can be adjusted to any non-negative Integer. - """ - maximum: NotRequired[int] - """ - The maximum quantity the customer can purchase. By default this value is 99. You can specify a value up to 999999. - """ - minimum: NotRequired[int] - """ - The minimum quantity the customer can purchase. By default this value is 0. If there is only one item in the cart then that item's quantity cannot go down to 0. - """ - - class UpdateParamsPaymentIntentData(TypedDict): - description: NotRequired["Literal['']|str"] - """ - An arbitrary string attached to the object. Often useful for displaying to users. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will declaratively set metadata on [Payment Intents](https://stripe.com/docs/api/payment_intents) generated from this payment link. Unlike object-level metadata, this field is declarative. Updates will clear prior values. - """ - statement_descriptor: NotRequired["Literal['']|str"] - """ - Text that appears on the customer's statement as the statement descriptor for a non-card charge. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see [the Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors). - - Setting this value for a card charge returns an error. For card charges, set the [statement_descriptor_suffix](https://docs.stripe.com/get-started/account/statement-descriptors#dynamic) instead. - """ - statement_descriptor_suffix: NotRequired["Literal['']|str"] - """ - Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. - """ - transfer_group: NotRequired["Literal['']|str"] - """ - A string that identifies the resulting payment as part of a group. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/connect/separate-charges-and-transfers) for details. - """ - - class UpdateParamsPhoneNumberCollection(TypedDict): - enabled: bool - """ - Set to `true` to enable phone number collection. - """ - - class UpdateParamsRestrictions(TypedDict): - completed_sessions: ( - "PaymentLinkService.UpdateParamsRestrictionsCompletedSessions" - ) - """ - Configuration for the `completed_sessions` restriction type. - """ - - class UpdateParamsRestrictionsCompletedSessions(TypedDict): - limit: int - """ - The maximum number of checkout sessions that can be completed for the `completed_sessions` restriction to be met. - """ - - class UpdateParamsShippingAddressCollection(TypedDict): - allowed_countries: List[ - Literal[ - "AC", - "AD", - "AE", - "AF", - "AG", - "AI", - "AL", - "AM", - "AO", - "AQ", - "AR", - "AT", - "AU", - "AW", - "AX", - "AZ", - "BA", - "BB", - "BD", - "BE", - "BF", - "BG", - "BH", - "BI", - "BJ", - "BL", - "BM", - "BN", - "BO", - "BQ", - "BR", - "BS", - "BT", - "BV", - "BW", - "BY", - "BZ", - "CA", - "CD", - "CF", - "CG", - "CH", - "CI", - "CK", - "CL", - "CM", - "CN", - "CO", - "CR", - "CV", - "CW", - "CY", - "CZ", - "DE", - "DJ", - "DK", - "DM", - "DO", - "DZ", - "EC", - "EE", - "EG", - "EH", - "ER", - "ES", - "ET", - "FI", - "FJ", - "FK", - "FO", - "FR", - "GA", - "GB", - "GD", - "GE", - "GF", - "GG", - "GH", - "GI", - "GL", - "GM", - "GN", - "GP", - "GQ", - "GR", - "GS", - "GT", - "GU", - "GW", - "GY", - "HK", - "HN", - "HR", - "HT", - "HU", - "ID", - "IE", - "IL", - "IM", - "IN", - "IO", - "IQ", - "IS", - "IT", - "JE", - "JM", - "JO", - "JP", - "KE", - "KG", - "KH", - "KI", - "KM", - "KN", - "KR", - "KW", - "KY", - "KZ", - "LA", - "LB", - "LC", - "LI", - "LK", - "LR", - "LS", - "LT", - "LU", - "LV", - "LY", - "MA", - "MC", - "MD", - "ME", - "MF", - "MG", - "MK", - "ML", - "MM", - "MN", - "MO", - "MQ", - "MR", - "MS", - "MT", - "MU", - "MV", - "MW", - "MX", - "MY", - "MZ", - "NA", - "NC", - "NE", - "NG", - "NI", - "NL", - "NO", - "NP", - "NR", - "NU", - "NZ", - "OM", - "PA", - "PE", - "PF", - "PG", - "PH", - "PK", - "PL", - "PM", - "PN", - "PR", - "PS", - "PT", - "PY", - "QA", - "RE", - "RO", - "RS", - "RU", - "RW", - "SA", - "SB", - "SC", - "SD", - "SE", - "SG", - "SH", - "SI", - "SJ", - "SK", - "SL", - "SM", - "SN", - "SO", - "SR", - "SS", - "ST", - "SV", - "SX", - "SZ", - "TA", - "TC", - "TD", - "TF", - "TG", - "TH", - "TJ", - "TK", - "TL", - "TM", - "TN", - "TO", - "TR", - "TT", - "TV", - "TW", - "TZ", - "UA", - "UG", - "US", - "UY", - "UZ", - "VA", - "VC", - "VE", - "VG", - "VN", - "VU", - "WF", - "WS", - "XK", - "YE", - "YT", - "ZA", - "ZM", - "ZW", - "ZZ", - ] - ] - """ - An array of two-letter ISO country codes representing which countries Checkout should provide as options for - shipping locations. - """ - - class UpdateParamsSubscriptionData(TypedDict): - invoice_settings: NotRequired[ - "PaymentLinkService.UpdateParamsSubscriptionDataInvoiceSettings" - ] - """ - All invoices will be billed using the specified settings. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will declaratively set metadata on [Subscriptions](https://stripe.com/docs/api/subscriptions) generated from this payment link. Unlike object-level metadata, this field is declarative. Updates will clear prior values. - """ - trial_period_days: NotRequired["Literal['']|int"] - """ - Integer representing the number of trial period days before the customer is charged for the first time. Has to be at least 1. - """ - trial_settings: NotRequired[ - "Literal['']|PaymentLinkService.UpdateParamsSubscriptionDataTrialSettings" - ] - """ - Settings related to subscription trials. - """ - - class UpdateParamsSubscriptionDataInvoiceSettings(TypedDict): - issuer: NotRequired[ - "PaymentLinkService.UpdateParamsSubscriptionDataInvoiceSettingsIssuer" - ] - """ - The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. - """ - - class UpdateParamsSubscriptionDataInvoiceSettingsIssuer(TypedDict): - account: NotRequired[str] - """ - The connected account being referenced when `type` is `account`. - """ - type: Literal["account", "self"] - """ - Type of the account referenced in the request. - """ - - class UpdateParamsSubscriptionDataTrialSettings(TypedDict): - end_behavior: "PaymentLinkService.UpdateParamsSubscriptionDataTrialSettingsEndBehavior" - """ - Defines how the subscription should behave when the user's free trial ends. - """ - - class UpdateParamsSubscriptionDataTrialSettingsEndBehavior(TypedDict): - missing_payment_method: Literal["cancel", "create_invoice", "pause"] - """ - Indicates how the subscription should change when the trial ends if the user did not provide a payment method. - """ - - class UpdateParamsTaxIdCollection(TypedDict): - enabled: bool - """ - Enable tax ID collection during checkout. Defaults to `false`. - """ - required: NotRequired[Literal["if_supported", "never"]] - """ - Describes whether a tax ID is required during checkout. Defaults to `never`. - """ - def list( self, - params: Optional["PaymentLinkService.ListParams"] = None, + params: Optional["PaymentLinkListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[PaymentLink]: """ @@ -1896,7 +48,7 @@ def list( async def list_async( self, - params: Optional["PaymentLinkService.ListParams"] = None, + params: Optional["PaymentLinkListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[PaymentLink]: """ @@ -1915,7 +67,7 @@ async def list_async( def create( self, - params: "PaymentLinkService.CreateParams", + params: "PaymentLinkCreateParams", options: Optional[RequestOptions] = None, ) -> PaymentLink: """ @@ -1934,7 +86,7 @@ def create( async def create_async( self, - params: "PaymentLinkService.CreateParams", + params: "PaymentLinkCreateParams", options: Optional[RequestOptions] = None, ) -> PaymentLink: """ @@ -1954,7 +106,7 @@ async def create_async( def retrieve( self, payment_link: str, - params: Optional["PaymentLinkService.RetrieveParams"] = None, + params: Optional["PaymentLinkRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> PaymentLink: """ @@ -1976,7 +128,7 @@ def retrieve( async def retrieve_async( self, payment_link: str, - params: Optional["PaymentLinkService.RetrieveParams"] = None, + params: Optional["PaymentLinkRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> PaymentLink: """ @@ -1998,7 +150,7 @@ async def retrieve_async( def update( self, payment_link: str, - params: Optional["PaymentLinkService.UpdateParams"] = None, + params: Optional["PaymentLinkUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> PaymentLink: """ @@ -2020,7 +172,7 @@ def update( async def update_async( self, payment_link: str, - params: Optional["PaymentLinkService.UpdateParams"] = None, + params: Optional["PaymentLinkUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> PaymentLink: """ diff --git a/stripe/_payment_method.py b/stripe/_payment_method.py index 0a6c3f99a..effcdd387 100644 --- a/stripe/_payment_method.py +++ b/stripe/_payment_method.py @@ -4,24 +4,35 @@ from stripe._expandable_field import ExpandableField from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource -from stripe._request_options import RequestOptions from stripe._stripe_object import StripeObject from stripe._updateable_api_resource import UpdateableAPIResource from stripe._util import class_method_variant, sanitize_id from typing import ClassVar, Dict, List, Optional, cast, overload -from typing_extensions import ( - Literal, - NotRequired, - TypedDict, - Unpack, - TYPE_CHECKING, -) +from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: from stripe._charge import Charge from stripe._customer import Customer from stripe._mandate import Mandate from stripe._setup_attempt import SetupAttempt + from stripe.params._payment_method_attach_params import ( + PaymentMethodAttachParams, + ) + from stripe.params._payment_method_create_params import ( + PaymentMethodCreateParams, + ) + from stripe.params._payment_method_detach_params import ( + PaymentMethodDetachParams, + ) + from stripe.params._payment_method_list_params import ( + PaymentMethodListParams, + ) + from stripe.params._payment_method_modify_params import ( + PaymentMethodModifyParams, + ) + from stripe.params._payment_method_retrieve_params import ( + PaymentMethodRetrieveParams, + ) class PaymentMethod( @@ -1423,1097 +1434,6 @@ class WechatPay(StripeObject): class Zip(StripeObject): pass - class AttachParams(RequestOptions): - customer: NotRequired[str] - """ - The ID of the customer to which to attach the PaymentMethod. - """ - customer_account: NotRequired[str] - """ - The ID of the account to which to attach the PaymentMethod. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class CreateParams(RequestOptions): - acss_debit: NotRequired["PaymentMethod.CreateParamsAcssDebit"] - """ - If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method. - """ - affirm: NotRequired["PaymentMethod.CreateParamsAffirm"] - """ - If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method. - """ - afterpay_clearpay: NotRequired[ - "PaymentMethod.CreateParamsAfterpayClearpay" - ] - """ - If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method. - """ - alipay: NotRequired["PaymentMethod.CreateParamsAlipay"] - """ - If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. - """ - allow_redisplay: NotRequired[ - Literal["always", "limited", "unspecified"] - ] - """ - This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`. - """ - alma: NotRequired["PaymentMethod.CreateParamsAlma"] - """ - If this is a Alma PaymentMethod, this hash contains details about the Alma payment method. - """ - amazon_pay: NotRequired["PaymentMethod.CreateParamsAmazonPay"] - """ - If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method. - """ - au_becs_debit: NotRequired["PaymentMethod.CreateParamsAuBecsDebit"] - """ - If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. - """ - bacs_debit: NotRequired["PaymentMethod.CreateParamsBacsDebit"] - """ - If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account. - """ - bancontact: NotRequired["PaymentMethod.CreateParamsBancontact"] - """ - If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method. - """ - billie: NotRequired["PaymentMethod.CreateParamsBillie"] - """ - If this is a `billie` PaymentMethod, this hash contains details about the Billie payment method. - """ - billing_details: NotRequired[ - "PaymentMethod.CreateParamsBillingDetails" - ] - """ - Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. - """ - blik: NotRequired["PaymentMethod.CreateParamsBlik"] - """ - If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method. - """ - boleto: NotRequired["PaymentMethod.CreateParamsBoleto"] - """ - If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method. - """ - card: NotRequired["PaymentMethod.CreateParamsCard"] - """ - If this is a `card` PaymentMethod, this hash contains the user's card details. For backwards compatibility, you can alternatively provide a Stripe token (e.g., for Apple Pay, Amex Express Checkout, or legacy Checkout) into the card hash with format `card: {token: "tok_visa"}`. When providing a card number, you must meet the requirements for [PCI compliance](https://stripe.com/docs/security#validating-pci-compliance). We strongly recommend using Stripe.js instead of interacting with this API directly. - """ - cashapp: NotRequired["PaymentMethod.CreateParamsCashapp"] - """ - If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. - """ - crypto: NotRequired["PaymentMethod.CreateParamsCrypto"] - """ - If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment method. - """ - customer: NotRequired[str] - """ - The `Customer` to whom the original PaymentMethod is attached. - """ - customer_balance: NotRequired[ - "PaymentMethod.CreateParamsCustomerBalance" - ] - """ - If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. - """ - eps: NotRequired["PaymentMethod.CreateParamsEps"] - """ - If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - fpx: NotRequired["PaymentMethod.CreateParamsFpx"] - """ - If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method. - """ - giropay: NotRequired["PaymentMethod.CreateParamsGiropay"] - """ - If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method. - """ - gopay: NotRequired["PaymentMethod.CreateParamsGopay"] - """ - If this is a Gopay PaymentMethod, this hash contains details about the Gopay payment method. - """ - grabpay: NotRequired["PaymentMethod.CreateParamsGrabpay"] - """ - If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method. - """ - id_bank_transfer: NotRequired[ - "PaymentMethod.CreateParamsIdBankTransfer" - ] - """ - If this is an `IdBankTransfer` PaymentMethod, this hash contains details about the IdBankTransfer payment method. - """ - ideal: NotRequired["PaymentMethod.CreateParamsIdeal"] - """ - If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. - """ - interac_present: NotRequired[ - "PaymentMethod.CreateParamsInteracPresent" - ] - """ - If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. - """ - kakao_pay: NotRequired["PaymentMethod.CreateParamsKakaoPay"] - """ - If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method. - """ - klarna: NotRequired["PaymentMethod.CreateParamsKlarna"] - """ - If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method. - """ - konbini: NotRequired["PaymentMethod.CreateParamsKonbini"] - """ - If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. - """ - kr_card: NotRequired["PaymentMethod.CreateParamsKrCard"] - """ - If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method. - """ - link: NotRequired["PaymentMethod.CreateParamsLink"] - """ - If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. - """ - mb_way: NotRequired["PaymentMethod.CreateParamsMbWay"] - """ - If this is a MB WAY PaymentMethod, this hash contains details about the MB WAY payment method. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - mobilepay: NotRequired["PaymentMethod.CreateParamsMobilepay"] - """ - If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method. - """ - multibanco: NotRequired["PaymentMethod.CreateParamsMultibanco"] - """ - If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method. - """ - naver_pay: NotRequired["PaymentMethod.CreateParamsNaverPay"] - """ - If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method. - """ - nz_bank_account: NotRequired["PaymentMethod.CreateParamsNzBankAccount"] - """ - If this is an nz_bank_account PaymentMethod, this hash contains details about the nz_bank_account payment method. - """ - oxxo: NotRequired["PaymentMethod.CreateParamsOxxo"] - """ - If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. - """ - p24: NotRequired["PaymentMethod.CreateParamsP24"] - """ - If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. - """ - pay_by_bank: NotRequired["PaymentMethod.CreateParamsPayByBank"] - """ - If this is a `pay_by_bank` PaymentMethod, this hash contains details about the PayByBank payment method. - """ - payco: NotRequired["PaymentMethod.CreateParamsPayco"] - """ - If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method. - """ - payment_method: NotRequired[str] - """ - The PaymentMethod to share. - """ - paynow: NotRequired["PaymentMethod.CreateParamsPaynow"] - """ - If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method. - """ - paypal: NotRequired["PaymentMethod.CreateParamsPaypal"] - """ - If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method. - """ - paypay: NotRequired["PaymentMethod.CreateParamsPaypay"] - """ - If this is a `paypay` PaymentMethod, this hash contains details about the PayPay payment method. - """ - payto: NotRequired["PaymentMethod.CreateParamsPayto"] - """ - If this is a `payto` PaymentMethod, this hash contains details about the PayTo payment method. - """ - pix: NotRequired["PaymentMethod.CreateParamsPix"] - """ - If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method. - """ - promptpay: NotRequired["PaymentMethod.CreateParamsPromptpay"] - """ - If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method. - """ - qris: NotRequired["PaymentMethod.CreateParamsQris"] - """ - If this is a `qris` PaymentMethod, this hash contains details about the QRIS payment method. - """ - radar_options: NotRequired["PaymentMethod.CreateParamsRadarOptions"] - """ - Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. - """ - rechnung: NotRequired["PaymentMethod.CreateParamsRechnung"] - """ - If this is a `rechnung` PaymentMethod, this hash contains details about the Rechnung payment method. - """ - revolut_pay: NotRequired["PaymentMethod.CreateParamsRevolutPay"] - """ - If this is a `revolut_pay` PaymentMethod, this hash contains details about the Revolut Pay payment method. - """ - samsung_pay: NotRequired["PaymentMethod.CreateParamsSamsungPay"] - """ - If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method. - """ - satispay: NotRequired["PaymentMethod.CreateParamsSatispay"] - """ - If this is a `satispay` PaymentMethod, this hash contains details about the Satispay payment method. - """ - sepa_debit: NotRequired["PaymentMethod.CreateParamsSepaDebit"] - """ - If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. - """ - shopeepay: NotRequired["PaymentMethod.CreateParamsShopeepay"] - """ - If this is a Shopeepay PaymentMethod, this hash contains details about the Shopeepay payment method. - """ - sofort: NotRequired["PaymentMethod.CreateParamsSofort"] - """ - If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. - """ - stripe_balance: NotRequired["PaymentMethod.CreateParamsStripeBalance"] - """ - This hash contains details about the Stripe balance payment method. - """ - swish: NotRequired["PaymentMethod.CreateParamsSwish"] - """ - If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method. - """ - twint: NotRequired["PaymentMethod.CreateParamsTwint"] - """ - If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method. - """ - type: NotRequired[ - Literal[ - "acss_debit", - "affirm", - "afterpay_clearpay", - "alipay", - "alma", - "amazon_pay", - "au_becs_debit", - "bacs_debit", - "bancontact", - "billie", - "blik", - "boleto", - "card", - "cashapp", - "crypto", - "customer_balance", - "eps", - "fpx", - "giropay", - "gopay", - "grabpay", - "id_bank_transfer", - "ideal", - "kakao_pay", - "klarna", - "konbini", - "kr_card", - "link", - "mb_way", - "mobilepay", - "multibanco", - "naver_pay", - "nz_bank_account", - "oxxo", - "p24", - "pay_by_bank", - "payco", - "paynow", - "paypal", - "paypay", - "payto", - "pix", - "promptpay", - "qris", - "rechnung", - "revolut_pay", - "samsung_pay", - "satispay", - "sepa_debit", - "shopeepay", - "sofort", - "stripe_balance", - "swish", - "twint", - "us_bank_account", - "wechat_pay", - "zip", - ] - ] - """ - The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. - """ - us_bank_account: NotRequired["PaymentMethod.CreateParamsUsBankAccount"] - """ - If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. - """ - wechat_pay: NotRequired["PaymentMethod.CreateParamsWechatPay"] - """ - If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method. - """ - zip: NotRequired["PaymentMethod.CreateParamsZip"] - """ - If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method. - """ - - class CreateParamsAcssDebit(TypedDict): - account_number: str - """ - Customer's bank account number. - """ - institution_number: str - """ - Institution number of the customer's bank. - """ - transit_number: str - """ - Transit number of the customer's bank. - """ - - class CreateParamsAffirm(TypedDict): - pass - - class CreateParamsAfterpayClearpay(TypedDict): - pass - - class CreateParamsAlipay(TypedDict): - pass - - class CreateParamsAlma(TypedDict): - pass - - class CreateParamsAmazonPay(TypedDict): - pass - - class CreateParamsAuBecsDebit(TypedDict): - account_number: str - """ - The account number for the bank account. - """ - bsb_number: str - """ - Bank-State-Branch number of the bank account. - """ - - class CreateParamsBacsDebit(TypedDict): - account_number: NotRequired[str] - """ - Account number of the bank account that the funds will be debited from. - """ - sort_code: NotRequired[str] - """ - Sort code of the bank account. (e.g., `10-20-30`) - """ - - class CreateParamsBancontact(TypedDict): - pass - - class CreateParamsBillie(TypedDict): - pass - - class CreateParamsBillingDetails(TypedDict): - address: NotRequired[ - "Literal['']|PaymentMethod.CreateParamsBillingDetailsAddress" - ] - """ - Billing address. - """ - email: NotRequired["Literal['']|str"] - """ - Email address. - """ - name: NotRequired["Literal['']|str"] - """ - Full name. - """ - phone: NotRequired["Literal['']|str"] - """ - Billing phone number (including extension). - """ - tax_id: NotRequired[str] - """ - Taxpayer identification number. Used only for transactions between LATAM buyers and non-LATAM sellers. - """ - - class CreateParamsBillingDetailsAddress(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. - """ - - class CreateParamsBlik(TypedDict): - pass - - class CreateParamsBoleto(TypedDict): - tax_id: str - """ - The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers) - """ - - class CreateParamsCard(TypedDict): - cvc: NotRequired[str] - """ - The card's CVC. It is highly recommended to always include this value. - """ - exp_month: NotRequired[int] - """ - Two-digit number representing the card's expiration month. - """ - exp_year: NotRequired[int] - """ - Four-digit number representing the card's expiration year. - """ - networks: NotRequired["PaymentMethod.CreateParamsCardNetworks"] - """ - Contains information about card networks used to process the payment. - """ - number: NotRequired[str] - """ - The card number, as a string without any separators. - """ - token: NotRequired[str] - """ - For backwards compatibility, you can alternatively provide a Stripe token (e.g., for Apple Pay, Amex Express Checkout, or legacy Checkout) into the card hash with format card: {token: "tok_visa"}. - """ - - class CreateParamsCardNetworks(TypedDict): - preferred: NotRequired[ - Literal["cartes_bancaires", "mastercard", "visa"] - ] - """ - The customer's preferred card network for co-branded cards. Supports `cartes_bancaires`, `mastercard`, or `visa`. Selection of a network that does not apply to the card will be stored as `invalid_preference` on the card. - """ - - class CreateParamsCashapp(TypedDict): - pass - - class CreateParamsCrypto(TypedDict): - pass - - class CreateParamsCustomerBalance(TypedDict): - pass - - class CreateParamsEps(TypedDict): - bank: NotRequired[ - Literal[ - "arzte_und_apotheker_bank", - "austrian_anadi_bank_ag", - "bank_austria", - "bankhaus_carl_spangler", - "bankhaus_schelhammer_und_schattera_ag", - "bawag_psk_ag", - "bks_bank_ag", - "brull_kallmus_bank_ag", - "btv_vier_lander_bank", - "capital_bank_grawe_gruppe_ag", - "deutsche_bank_ag", - "dolomitenbank", - "easybank_ag", - "erste_bank_und_sparkassen", - "hypo_alpeadriabank_international_ag", - "hypo_bank_burgenland_aktiengesellschaft", - "hypo_noe_lb_fur_niederosterreich_u_wien", - "hypo_oberosterreich_salzburg_steiermark", - "hypo_tirol_bank_ag", - "hypo_vorarlberg_bank_ag", - "marchfelder_bank", - "oberbank_ag", - "raiffeisen_bankengruppe_osterreich", - "schoellerbank_ag", - "sparda_bank_wien", - "volksbank_gruppe", - "volkskreditbank_ag", - "vr_bank_braunau", - ] - ] - """ - The customer's bank. - """ - - class CreateParamsFpx(TypedDict): - account_holder_type: NotRequired[Literal["company", "individual"]] - """ - Account holder type for FPX transaction - """ - bank: Literal[ - "affin_bank", - "agrobank", - "alliance_bank", - "ambank", - "bank_islam", - "bank_muamalat", - "bank_of_china", - "bank_rakyat", - "bsn", - "cimb", - "deutsche_bank", - "hong_leong_bank", - "hsbc", - "kfh", - "maybank2e", - "maybank2u", - "ocbc", - "pb_enterprise", - "public_bank", - "rhb", - "standard_chartered", - "uob", - ] - """ - The customer's bank. - """ - - class CreateParamsGiropay(TypedDict): - pass - - class CreateParamsGopay(TypedDict): - pass - - class CreateParamsGrabpay(TypedDict): - pass - - class CreateParamsIdBankTransfer(TypedDict): - bank: NotRequired[Literal["bca", "bni", "bri", "cimb", "permata"]] - """ - Bank where the account is held. - """ - - class CreateParamsIdeal(TypedDict): - bank: NotRequired[ - Literal[ - "abn_amro", - "asn_bank", - "bunq", - "buut", - "handelsbanken", - "ing", - "knab", - "moneyou", - "n26", - "nn", - "rabobank", - "regiobank", - "revolut", - "sns_bank", - "triodos_bank", - "van_lanschot", - "yoursafe", - ] - ] - """ - The customer's bank. Only use this parameter for existing customers. Don't use it for new customers. - """ - - class CreateParamsInteracPresent(TypedDict): - pass - - class CreateParamsKakaoPay(TypedDict): - pass - - class CreateParamsKlarna(TypedDict): - dob: NotRequired["PaymentMethod.CreateParamsKlarnaDob"] - """ - Customer's date of birth - """ - - class CreateParamsKlarnaDob(TypedDict): - day: int - """ - The day of birth, between 1 and 31. - """ - month: int - """ - The month of birth, between 1 and 12. - """ - year: int - """ - The four-digit year of birth. - """ - - class CreateParamsKonbini(TypedDict): - pass - - class CreateParamsKrCard(TypedDict): - pass - - class CreateParamsLink(TypedDict): - pass - - class CreateParamsMbWay(TypedDict): - pass - - class CreateParamsMobilepay(TypedDict): - pass - - class CreateParamsMultibanco(TypedDict): - pass - - class CreateParamsNaverPay(TypedDict): - funding: NotRequired[Literal["card", "points"]] - """ - Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`. - """ - - class CreateParamsNzBankAccount(TypedDict): - account_holder_name: NotRequired[str] - """ - The name on the bank account. Only required if the account holder name is different from the name of the authorized signatory collected in the PaymentMethod's billing details. - """ - account_number: str - """ - The account number for the bank account. - """ - bank_code: str - """ - The numeric code for the bank account's bank. - """ - branch_code: str - """ - The numeric code for the bank account's bank branch. - """ - reference: NotRequired[str] - suffix: str - """ - The suffix of the bank account number. - """ - - class CreateParamsOxxo(TypedDict): - pass - - class CreateParamsP24(TypedDict): - bank: NotRequired[ - Literal[ - "alior_bank", - "bank_millennium", - "bank_nowy_bfg_sa", - "bank_pekao_sa", - "banki_spbdzielcze", - "blik", - "bnp_paribas", - "boz", - "citi_handlowy", - "credit_agricole", - "envelobank", - "etransfer_pocztowy24", - "getin_bank", - "ideabank", - "ing", - "inteligo", - "mbank_mtransfer", - "nest_przelew", - "noble_pay", - "pbac_z_ipko", - "plus_bank", - "santander_przelew24", - "tmobile_usbugi_bankowe", - "toyota_bank", - "velobank", - "volkswagen_bank", - ] - ] - """ - The customer's bank. - """ - - class CreateParamsPayByBank(TypedDict): - pass - - class CreateParamsPayco(TypedDict): - pass - - class CreateParamsPaynow(TypedDict): - pass - - class CreateParamsPaypal(TypedDict): - pass - - class CreateParamsPaypay(TypedDict): - pass - - class CreateParamsPayto(TypedDict): - account_number: NotRequired[str] - """ - The account number for the bank account. - """ - bsb_number: NotRequired[str] - """ - Bank-State-Branch number of the bank account. - """ - pay_id: NotRequired[str] - """ - The PayID alias for the bank account. - """ - - class CreateParamsPix(TypedDict): - pass - - class CreateParamsPromptpay(TypedDict): - pass - - class CreateParamsQris(TypedDict): - pass - - class CreateParamsRadarOptions(TypedDict): - session: NotRequired[str] - """ - A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. - """ - - class CreateParamsRechnung(TypedDict): - dob: "PaymentMethod.CreateParamsRechnungDob" - """ - Customer's date of birth - """ - - class CreateParamsRechnungDob(TypedDict): - day: int - """ - The day of birth, between 1 and 31. - """ - month: int - """ - The month of birth, between 1 and 12. - """ - year: int - """ - The four-digit year of birth. - """ - - class CreateParamsRevolutPay(TypedDict): - pass - - class CreateParamsSamsungPay(TypedDict): - pass - - class CreateParamsSatispay(TypedDict): - pass - - class CreateParamsSepaDebit(TypedDict): - iban: str - """ - IBAN of the bank account. - """ - - class CreateParamsShopeepay(TypedDict): - pass - - class CreateParamsSofort(TypedDict): - country: Literal["AT", "BE", "DE", "ES", "IT", "NL"] - """ - Two-letter ISO code representing the country the bank account is located in. - """ - - class CreateParamsStripeBalance(TypedDict): - account: NotRequired[str] - """ - The connected account ID whose Stripe balance to use as the source of payment - """ - source_type: NotRequired[Literal["bank_account", "card", "fpx"]] - """ - The [source_type](https://docs.stripe.com/api/balance/balance_object#balance_object-available-source_types) of the balance - """ - - class CreateParamsSwish(TypedDict): - pass - - class CreateParamsTwint(TypedDict): - pass - - class CreateParamsUsBankAccount(TypedDict): - account_holder_type: NotRequired[Literal["company", "individual"]] - """ - Account holder type: individual or company. - """ - account_number: NotRequired[str] - """ - Account number of the bank account. - """ - account_type: NotRequired[Literal["checking", "savings"]] - """ - Account type: checkings or savings. Defaults to checking if omitted. - """ - financial_connections_account: NotRequired[str] - """ - The ID of a Financial Connections Account to use as a payment method. - """ - routing_number: NotRequired[str] - """ - Routing number of the bank account. - """ - - class CreateParamsWechatPay(TypedDict): - pass - - class CreateParamsZip(TypedDict): - pass - - class DetachParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class ListParams(RequestOptions): - customer: NotRequired[str] - """ - The ID of the customer whose PaymentMethods will be retrieved. - """ - 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. - """ - type: NotRequired[ - Literal[ - "acss_debit", - "affirm", - "afterpay_clearpay", - "alipay", - "alma", - "amazon_pay", - "au_becs_debit", - "bacs_debit", - "bancontact", - "billie", - "blik", - "boleto", - "card", - "cashapp", - "crypto", - "customer_balance", - "eps", - "fpx", - "giropay", - "gopay", - "grabpay", - "id_bank_transfer", - "ideal", - "kakao_pay", - "klarna", - "konbini", - "kr_card", - "link", - "mb_way", - "mobilepay", - "multibanco", - "naver_pay", - "nz_bank_account", - "oxxo", - "p24", - "pay_by_bank", - "payco", - "paynow", - "paypal", - "paypay", - "payto", - "pix", - "promptpay", - "qris", - "rechnung", - "revolut_pay", - "samsung_pay", - "satispay", - "sepa_debit", - "shopeepay", - "sofort", - "stripe_balance", - "swish", - "twint", - "us_bank_account", - "wechat_pay", - "zip", - ] - ] - """ - An optional filter on the list, based on the object `type` field. Without the filter, the list includes all current and future payment method types. If your integration expects only one type of payment method in the response, make sure to provide a type value in the request. - """ - - class ModifyParams(RequestOptions): - allow_redisplay: NotRequired[ - Literal["always", "limited", "unspecified"] - ] - """ - This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`. - """ - billing_details: NotRequired[ - "PaymentMethod.ModifyParamsBillingDetails" - ] - """ - Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. - """ - card: NotRequired["PaymentMethod.ModifyParamsCard"] - """ - If this is a `card` PaymentMethod, this hash contains the user's card details. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - payto: NotRequired["PaymentMethod.ModifyParamsPayto"] - """ - If this is a `payto` PaymentMethod, this hash contains details about the PayTo payment method. - """ - us_bank_account: NotRequired["PaymentMethod.ModifyParamsUsBankAccount"] - """ - If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. - """ - - class ModifyParamsBillingDetails(TypedDict): - address: NotRequired[ - "Literal['']|PaymentMethod.ModifyParamsBillingDetailsAddress" - ] - """ - Billing address. - """ - email: NotRequired["Literal['']|str"] - """ - Email address. - """ - name: NotRequired["Literal['']|str"] - """ - Full name. - """ - phone: NotRequired["Literal['']|str"] - """ - Billing phone number (including extension). - """ - tax_id: NotRequired[str] - """ - Taxpayer identification number. Used only for transactions between LATAM buyers and non-LATAM sellers. - """ - - class ModifyParamsBillingDetailsAddress(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. - """ - - class ModifyParamsCard(TypedDict): - exp_month: NotRequired[int] - """ - Two-digit number representing the card's expiration month. - """ - exp_year: NotRequired[int] - """ - Four-digit number representing the card's expiration year. - """ - networks: NotRequired["PaymentMethod.ModifyParamsCardNetworks"] - """ - Contains information about card networks used to process the payment. - """ - - class ModifyParamsCardNetworks(TypedDict): - preferred: NotRequired[ - "Literal['']|Literal['cartes_bancaires', 'mastercard', 'visa']" - ] - """ - The customer's preferred card network for co-branded cards. Supports `cartes_bancaires`, `mastercard`, or `visa`. Selection of a network that does not apply to the card will be stored as `invalid_preference` on the card. - """ - - class ModifyParamsPayto(TypedDict): - account_number: NotRequired[str] - """ - The account number for the bank account. - """ - bsb_number: NotRequired[str] - """ - Bank-State-Branch number of the bank account. - """ - pay_id: NotRequired[str] - """ - The PayID alias for the bank account. - """ - - class ModifyParamsUsBankAccount(TypedDict): - account_holder_type: NotRequired[Literal["company", "individual"]] - """ - Bank account holder type. - """ - account_type: NotRequired[Literal["checking", "savings"]] - """ - Bank account type. - """ - - class RetrieveParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - acss_debit: Optional[AcssDebit] affirm: Optional[Affirm] afterpay_clearpay: Optional[AfterpayClearpay] @@ -2678,9 +1598,7 @@ class RetrieveParams(RequestOptions): @classmethod def _cls_attach( - cls, - payment_method: str, - **params: Unpack["PaymentMethod.AttachParams"], + cls, payment_method: str, **params: Unpack["PaymentMethodAttachParams"] ) -> "PaymentMethod": """ Attaches a PaymentMethod object to a Customer. @@ -2711,7 +1629,7 @@ def _cls_attach( @overload @staticmethod def attach( - payment_method: str, **params: Unpack["PaymentMethod.AttachParams"] + payment_method: str, **params: Unpack["PaymentMethodAttachParams"] ) -> "PaymentMethod": """ Attaches a PaymentMethod object to a Customer. @@ -2732,7 +1650,7 @@ def attach( @overload def attach( - self, **params: Unpack["PaymentMethod.AttachParams"] + self, **params: Unpack["PaymentMethodAttachParams"] ) -> "PaymentMethod": """ Attaches a PaymentMethod object to a Customer. @@ -2753,7 +1671,7 @@ def attach( @class_method_variant("_cls_attach") def attach( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["PaymentMethod.AttachParams"] + self, **params: Unpack["PaymentMethodAttachParams"] ) -> "PaymentMethod": """ Attaches a PaymentMethod object to a Customer. @@ -2783,9 +1701,7 @@ def attach( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_attach_async( - cls, - payment_method: str, - **params: Unpack["PaymentMethod.AttachParams"], + cls, payment_method: str, **params: Unpack["PaymentMethodAttachParams"] ) -> "PaymentMethod": """ Attaches a PaymentMethod object to a Customer. @@ -2816,7 +1732,7 @@ async def _cls_attach_async( @overload @staticmethod async def attach_async( - payment_method: str, **params: Unpack["PaymentMethod.AttachParams"] + payment_method: str, **params: Unpack["PaymentMethodAttachParams"] ) -> "PaymentMethod": """ Attaches a PaymentMethod object to a Customer. @@ -2837,7 +1753,7 @@ async def attach_async( @overload async def attach_async( - self, **params: Unpack["PaymentMethod.AttachParams"] + self, **params: Unpack["PaymentMethodAttachParams"] ) -> "PaymentMethod": """ Attaches a PaymentMethod object to a Customer. @@ -2858,7 +1774,7 @@ async def attach_async( @class_method_variant("_cls_attach_async") async def attach_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["PaymentMethod.AttachParams"] + self, **params: Unpack["PaymentMethodAttachParams"] ) -> "PaymentMethod": """ Attaches a PaymentMethod object to a Customer. @@ -2888,7 +1804,7 @@ async def attach_async( # pyright: ignore[reportGeneralTypeIssues] @classmethod def create( - cls, **params: Unpack["PaymentMethod.CreateParams"] + cls, **params: Unpack["PaymentMethodCreateParams"] ) -> "PaymentMethod": """ Creates a PaymentMethod object. Read the [Stripe.js reference](https://docs.stripe.com/docs/stripe-js/reference#stripe-create-payment-method) to learn how to create PaymentMethods via Stripe.js. @@ -2906,7 +1822,7 @@ def create( @classmethod async def create_async( - cls, **params: Unpack["PaymentMethod.CreateParams"] + cls, **params: Unpack["PaymentMethodCreateParams"] ) -> "PaymentMethod": """ Creates a PaymentMethod object. Read the [Stripe.js reference](https://docs.stripe.com/docs/stripe-js/reference#stripe-create-payment-method) to learn how to create PaymentMethods via Stripe.js. @@ -2924,9 +1840,7 @@ async def create_async( @classmethod def _cls_detach( - cls, - payment_method: str, - **params: Unpack["PaymentMethod.DetachParams"], + cls, payment_method: str, **params: Unpack["PaymentMethodDetachParams"] ) -> "PaymentMethod": """ Detaches a PaymentMethod object from a Customer. After a PaymentMethod is detached, it can no longer be used for a payment or re-attached to a Customer. @@ -2945,7 +1859,7 @@ def _cls_detach( @overload @staticmethod def detach( - payment_method: str, **params: Unpack["PaymentMethod.DetachParams"] + payment_method: str, **params: Unpack["PaymentMethodDetachParams"] ) -> "PaymentMethod": """ Detaches a PaymentMethod object from a Customer. After a PaymentMethod is detached, it can no longer be used for a payment or re-attached to a Customer. @@ -2954,7 +1868,7 @@ def detach( @overload def detach( - self, **params: Unpack["PaymentMethod.DetachParams"] + self, **params: Unpack["PaymentMethodDetachParams"] ) -> "PaymentMethod": """ Detaches a PaymentMethod object from a Customer. After a PaymentMethod is detached, it can no longer be used for a payment or re-attached to a Customer. @@ -2963,7 +1877,7 @@ def detach( @class_method_variant("_cls_detach") def detach( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["PaymentMethod.DetachParams"] + self, **params: Unpack["PaymentMethodDetachParams"] ) -> "PaymentMethod": """ Detaches a PaymentMethod object from a Customer. After a PaymentMethod is detached, it can no longer be used for a payment or re-attached to a Customer. @@ -2981,9 +1895,7 @@ def detach( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_detach_async( - cls, - payment_method: str, - **params: Unpack["PaymentMethod.DetachParams"], + cls, payment_method: str, **params: Unpack["PaymentMethodDetachParams"] ) -> "PaymentMethod": """ Detaches a PaymentMethod object from a Customer. After a PaymentMethod is detached, it can no longer be used for a payment or re-attached to a Customer. @@ -3002,7 +1914,7 @@ async def _cls_detach_async( @overload @staticmethod async def detach_async( - payment_method: str, **params: Unpack["PaymentMethod.DetachParams"] + payment_method: str, **params: Unpack["PaymentMethodDetachParams"] ) -> "PaymentMethod": """ Detaches a PaymentMethod object from a Customer. After a PaymentMethod is detached, it can no longer be used for a payment or re-attached to a Customer. @@ -3011,7 +1923,7 @@ async def detach_async( @overload async def detach_async( - self, **params: Unpack["PaymentMethod.DetachParams"] + self, **params: Unpack["PaymentMethodDetachParams"] ) -> "PaymentMethod": """ Detaches a PaymentMethod object from a Customer. After a PaymentMethod is detached, it can no longer be used for a payment or re-attached to a Customer. @@ -3020,7 +1932,7 @@ async def detach_async( @class_method_variant("_cls_detach_async") async def detach_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["PaymentMethod.DetachParams"] + self, **params: Unpack["PaymentMethodDetachParams"] ) -> "PaymentMethod": """ Detaches a PaymentMethod object from a Customer. After a PaymentMethod is detached, it can no longer be used for a payment or re-attached to a Customer. @@ -3038,7 +1950,7 @@ async def detach_async( # pyright: ignore[reportGeneralTypeIssues] @classmethod def list( - cls, **params: Unpack["PaymentMethod.ListParams"] + cls, **params: Unpack["PaymentMethodListParams"] ) -> ListObject["PaymentMethod"]: """ Returns a list of PaymentMethods for Treasury flows. If you want to list the PaymentMethods attached to a Customer for payments, you should use the [List a Customer's PaymentMethods](https://docs.stripe.com/docs/api/payment_methods/customer_list) API instead. @@ -3058,7 +1970,7 @@ def list( @classmethod async def list_async( - cls, **params: Unpack["PaymentMethod.ListParams"] + cls, **params: Unpack["PaymentMethodListParams"] ) -> ListObject["PaymentMethod"]: """ Returns a list of PaymentMethods for Treasury flows. If you want to list the PaymentMethods attached to a Customer for payments, you should use the [List a Customer's PaymentMethods](https://docs.stripe.com/docs/api/payment_methods/customer_list) API instead. @@ -3078,7 +1990,7 @@ async def list_async( @classmethod def modify( - cls, id: str, **params: Unpack["PaymentMethod.ModifyParams"] + cls, id: str, **params: Unpack["PaymentMethodModifyParams"] ) -> "PaymentMethod": """ Updates a PaymentMethod object. A PaymentMethod must be attached to a customer to be updated. @@ -3095,7 +2007,7 @@ def modify( @classmethod async def modify_async( - cls, id: str, **params: Unpack["PaymentMethod.ModifyParams"] + cls, id: str, **params: Unpack["PaymentMethodModifyParams"] ) -> "PaymentMethod": """ Updates a PaymentMethod object. A PaymentMethod must be attached to a customer to be updated. @@ -3112,7 +2024,7 @@ async def modify_async( @classmethod def retrieve( - cls, id: str, **params: Unpack["PaymentMethod.RetrieveParams"] + cls, id: str, **params: Unpack["PaymentMethodRetrieveParams"] ) -> "PaymentMethod": """ Retrieves a PaymentMethod object attached to the StripeAccount. To retrieve a payment method attached to a Customer, you should use [Retrieve a Customer's PaymentMethods](https://docs.stripe.com/docs/api/payment_methods/customer) @@ -3123,7 +2035,7 @@ def retrieve( @classmethod async def retrieve_async( - cls, id: str, **params: Unpack["PaymentMethod.RetrieveParams"] + cls, id: str, **params: Unpack["PaymentMethodRetrieveParams"] ) -> "PaymentMethod": """ Retrieves a PaymentMethod object attached to the StripeAccount. To retrieve a payment method attached to a Customer, you should use [Retrieve a Customer's PaymentMethods](https://docs.stripe.com/docs/api/payment_methods/customer) diff --git a/stripe/_payment_method_configuration.py b/stripe/_payment_method_configuration.py index c5bca983d..5435dfd4e 100644 --- a/stripe/_payment_method_configuration.py +++ b/stripe/_payment_method_configuration.py @@ -3,12 +3,25 @@ from stripe._createable_api_resource import CreateableAPIResource from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource -from stripe._request_options import RequestOptions from stripe._stripe_object import StripeObject from stripe._updateable_api_resource import UpdateableAPIResource from stripe._util import sanitize_id -from typing import ClassVar, List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict, Unpack +from typing import ClassVar, Optional, cast +from typing_extensions import Literal, Unpack, TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params._payment_method_configuration_create_params import ( + PaymentMethodConfigurationCreateParams, + ) + from stripe.params._payment_method_configuration_list_params import ( + PaymentMethodConfigurationListParams, + ) + from stripe.params._payment_method_configuration_modify_params import ( + PaymentMethodConfigurationModifyParams, + ) + from stripe.params._payment_method_configuration_retrieve_params import ( + PaymentMethodConfigurationRetrieveParams, + ) class PaymentMethodConfiguration( @@ -1291,2294 +1304,6 @@ class DisplayPreference(StripeObject): display_preference: DisplayPreference _inner_class_types = {"display_preference": DisplayPreference} - class CreateParams(RequestOptions): - acss_debit: NotRequired[ - "PaymentMethodConfiguration.CreateParamsAcssDebit" - ] - """ - Canadian pre-authorized debit payments, check this [page](https://stripe.com/docs/payments/acss-debit) for more details like country availability. - """ - affirm: NotRequired["PaymentMethodConfiguration.CreateParamsAffirm"] - """ - [Affirm](https://www.affirm.com/) gives your customers a way to split purchases over a series of payments. Depending on the purchase, they can pay with four interest-free payments (Split Pay) or pay over a longer term (Installments), which might include interest. Check this [page](https://stripe.com/docs/payments/affirm) for more details like country availability. - """ - afterpay_clearpay: NotRequired[ - "PaymentMethodConfiguration.CreateParamsAfterpayClearpay" - ] - """ - Afterpay gives your customers a way to pay for purchases in installments, check this [page](https://stripe.com/docs/payments/afterpay-clearpay) for more details like country availability. Afterpay is particularly popular among businesses selling fashion, beauty, and sports products. - """ - alipay: NotRequired["PaymentMethodConfiguration.CreateParamsAlipay"] - """ - Alipay is a digital wallet in China that has more than a billion active users worldwide. Alipay users can pay on the web or on a mobile device using login credentials or their Alipay app. Alipay has a low dispute rate and reduces fraud by authenticating payments using the customer's login credentials. Check this [page](https://stripe.com/docs/payments/alipay) for more details. - """ - alma: NotRequired["PaymentMethodConfiguration.CreateParamsAlma"] - """ - Alma is a Buy Now, Pay Later payment method that offers customers the ability to pay in 2, 3, or 4 installments. - """ - amazon_pay: NotRequired[ - "PaymentMethodConfiguration.CreateParamsAmazonPay" - ] - """ - Amazon Pay is a wallet payment method that lets your customers check out the same way as on Amazon. - """ - apple_pay: NotRequired[ - "PaymentMethodConfiguration.CreateParamsApplePay" - ] - """ - Stripe users can accept [Apple Pay](https://stripe.com/payments/apple-pay) in iOS applications in iOS 9 and later, and on the web in Safari starting with iOS 10 or macOS Sierra. There are no additional fees to process Apple Pay payments, and the [pricing](https://stripe.com/pricing) is the same as other card transactions. Check this [page](https://stripe.com/docs/apple-pay) for more details. - """ - apple_pay_later: NotRequired[ - "PaymentMethodConfiguration.CreateParamsApplePayLater" - ] - """ - Apple Pay Later, a payment method for customers to buy now and pay later, gives your customers a way to split purchases into four installments across six weeks. - """ - au_becs_debit: NotRequired[ - "PaymentMethodConfiguration.CreateParamsAuBecsDebit" - ] - """ - Stripe users in Australia can accept Bulk Electronic Clearing System (BECS) direct debit payments from customers with an Australian bank account. Check this [page](https://stripe.com/docs/payments/au-becs-debit) for more details. - """ - bacs_debit: NotRequired[ - "PaymentMethodConfiguration.CreateParamsBacsDebit" - ] - """ - Stripe users in the UK can accept Bacs Direct Debit payments from customers with a UK bank account, check this [page](https://stripe.com/docs/payments/payment-methods/bacs-debit) for more details. - """ - bancontact: NotRequired[ - "PaymentMethodConfiguration.CreateParamsBancontact" - ] - """ - Bancontact is the most popular online payment method in Belgium, with over 15 million cards in circulation. [Customers](https://stripe.com/docs/api/customers) use a Bancontact card or mobile app linked to a Belgian bank account to make online payments that are secure, guaranteed, and confirmed immediately. Check this [page](https://stripe.com/docs/payments/bancontact) for more details. - """ - billie: NotRequired["PaymentMethodConfiguration.CreateParamsBillie"] - """ - Billie is a [single-use](https://docs.stripe.com/payments/payment-methods#usage) payment method that offers businesses Pay by Invoice where they offer payment terms ranging from 7-120 days. Customers are redirected from your website or app, authorize the payment with Billie, then return to your website or app. You get [immediate notification](https://docs.stripe.com/payments/payment-methods#payment-notification) of whether the payment succeeded or failed. - """ - blik: NotRequired["PaymentMethodConfiguration.CreateParamsBlik"] - """ - BLIK is a [single use](https://stripe.com/docs/payments/payment-methods#usage) payment method that requires customers to authenticate their payments. When customers want to pay online using BLIK, they request a six-digit code from their banking application and enter it into the payment collection form. Check this [page](https://stripe.com/docs/payments/blik) for more details. - """ - boleto: NotRequired["PaymentMethodConfiguration.CreateParamsBoleto"] - """ - Boleto is an official (regulated by the Central Bank of Brazil) payment method in Brazil. Check this [page](https://stripe.com/docs/payments/boleto) for more details. - """ - card: NotRequired["PaymentMethodConfiguration.CreateParamsCard"] - """ - Cards are a popular way for consumers and businesses to pay online or in person. Stripe supports global and local card networks. - """ - cartes_bancaires: NotRequired[ - "PaymentMethodConfiguration.CreateParamsCartesBancaires" - ] - """ - Cartes Bancaires is France's local card network. More than 95% of these cards are co-branded with either Visa or Mastercard, meaning you can process these cards over either Cartes Bancaires or the Visa or Mastercard networks. Check this [page](https://stripe.com/docs/payments/cartes-bancaires) for more details. - """ - cashapp: NotRequired["PaymentMethodConfiguration.CreateParamsCashapp"] - """ - Cash App is a popular consumer app in the US that allows customers to bank, invest, send, and receive money using their digital wallet. Check this [page](https://stripe.com/docs/payments/cash-app-pay) for more details. - """ - customer_balance: NotRequired[ - "PaymentMethodConfiguration.CreateParamsCustomerBalance" - ] - """ - Uses a customer's [cash balance](https://stripe.com/docs/payments/customer-balance) for the payment. The cash balance can be funded via a bank transfer. Check this [page](https://stripe.com/docs/payments/bank-transfers) for more details. - """ - eps: NotRequired["PaymentMethodConfiguration.CreateParamsEps"] - """ - EPS is an Austria-based payment method that allows customers to complete transactions online using their bank credentials. EPS is supported by all Austrian banks and is accepted by over 80% of Austrian online retailers. Check this [page](https://stripe.com/docs/payments/eps) for more details. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - fpx: NotRequired["PaymentMethodConfiguration.CreateParamsFpx"] - """ - Financial Process Exchange (FPX) is a Malaysia-based payment method that allows customers to complete transactions online using their bank credentials. Bank Negara Malaysia (BNM), the Central Bank of Malaysia, and eleven other major Malaysian financial institutions are members of the PayNet Group, which owns and operates FPX. It is one of the most popular online payment methods in Malaysia, with nearly 90 million transactions in 2018 according to BNM. Check this [page](https://stripe.com/docs/payments/fpx) for more details. - """ - fr_meal_voucher_conecs: NotRequired[ - "PaymentMethodConfiguration.CreateParamsFrMealVoucherConecs" - ] - """ - Meal vouchers in France, or “titres-restaurant”, is a local benefits program commonly offered by employers for their employees to purchase prepared food and beverages on working days. Check this [page](https://stripe.com/docs/payments/benefits/fr-meal-vouchers) for more details. - """ - giropay: NotRequired["PaymentMethodConfiguration.CreateParamsGiropay"] - """ - giropay is a German payment method based on online banking, introduced in 2006. It allows customers to complete transactions online using their online banking environment, with funds debited from their bank account. Depending on their bank, customers confirm payments on giropay using a second factor of authentication or a PIN. giropay accounts for 10% of online checkouts in Germany. Check this [page](https://stripe.com/docs/payments/giropay) for more details. - """ - google_pay: NotRequired[ - "PaymentMethodConfiguration.CreateParamsGooglePay" - ] - """ - Google Pay allows customers to make payments in your app or website using any credit or debit card saved to their Google Account, including those from Google Play, YouTube, Chrome, or an Android device. Use the Google Pay API to request any credit or debit card stored in your customer's Google account. Check this [page](https://stripe.com/docs/google-pay) for more details. - """ - gopay: NotRequired["PaymentMethodConfiguration.CreateParamsGopay"] - """ - GoPay is a [single use](https://stripe.com/docs/payments/payment-methods#usage) digital wallet payment method popular in Indonesia. When paying with GoPay, customers authenticate and approve payments using the Gojek app. Desktop checkout is performed by scanning a QR code. When checking out on mobile, customers are redirected to the Gojek app to confirm payment. - """ - grabpay: NotRequired["PaymentMethodConfiguration.CreateParamsGrabpay"] - """ - GrabPay is a payment method developed by [Grab](https://www.grab.com/sg/consumer/finance/pay/). GrabPay is a digital wallet - customers maintain a balance in their wallets that they pay out with. Check this [page](https://stripe.com/docs/payments/grabpay) for more details. - """ - id_bank_transfer: NotRequired[ - "PaymentMethodConfiguration.CreateParamsIdBankTransfer" - ] - """ - Stripe users in Indonesia can receive bank transfers from customers in Indonesia. Bank transfers are a popular B2C and B2B payment method in Indonesia. - """ - ideal: NotRequired["PaymentMethodConfiguration.CreateParamsIdeal"] - """ - iDEAL is a Netherlands-based payment method that allows customers to complete transactions online using their bank credentials. All major Dutch banks are members of Currence, the scheme that operates iDEAL, making it the most popular online payment method in the Netherlands with a share of online transactions close to 55%. Check this [page](https://stripe.com/docs/payments/ideal) for more details. - """ - jcb: NotRequired["PaymentMethodConfiguration.CreateParamsJcb"] - """ - JCB is a credit card company based in Japan. JCB is currently available in Japan to businesses approved by JCB, and available to all businesses in Australia, Canada, Hong Kong, Japan, New Zealand, Singapore, Switzerland, United Kingdom, United States, and all countries in the European Economic Area except Iceland. Check this [page](https://support.stripe.com/questions/accepting-japan-credit-bureau-%28jcb%29-payments) for more details. - """ - kakao_pay: NotRequired[ - "PaymentMethodConfiguration.CreateParamsKakaoPay" - ] - """ - Kakao Pay is a popular local wallet available in South Korea. - """ - klarna: NotRequired["PaymentMethodConfiguration.CreateParamsKlarna"] - """ - Klarna gives customers a range of [payment options](https://stripe.com/docs/payments/klarna#payment-options) during checkout. Available payment options vary depending on the customer's billing address and the transaction amount. These payment options make it convenient for customers to purchase items in all price ranges. Check this [page](https://stripe.com/docs/payments/klarna) for more details. - """ - konbini: NotRequired["PaymentMethodConfiguration.CreateParamsKonbini"] - """ - Konbini allows customers in Japan to pay for bills and online purchases at convenience stores with cash. Check this [page](https://stripe.com/docs/payments/konbini) for more details. - """ - kr_card: NotRequired["PaymentMethodConfiguration.CreateParamsKrCard"] - """ - Korean cards let users pay using locally issued cards from South Korea. - """ - link: NotRequired["PaymentMethodConfiguration.CreateParamsLink"] - """ - [Link](https://stripe.com/docs/payments/link) is a payment method network. With Link, users save their payment details once, then reuse that information to pay with one click for any business on the network. - """ - mobilepay: NotRequired[ - "PaymentMethodConfiguration.CreateParamsMobilepay" - ] - """ - MobilePay is a [single-use](https://stripe.com/docs/payments/payment-methods#usage) card wallet payment method used in Denmark and Finland. It allows customers to [authenticate and approve](https://stripe.com/docs/payments/payment-methods#customer-actions) payments using the MobilePay app. Check this [page](https://stripe.com/docs/payments/mobilepay) for more details. - """ - multibanco: NotRequired[ - "PaymentMethodConfiguration.CreateParamsMultibanco" - ] - """ - Stripe users in Europe and the United States can accept Multibanco payments from customers in Portugal using [Sources](https://stripe.com/docs/sources)—a single integration path for creating payments using any supported method. - """ - name: NotRequired[str] - """ - Configuration name. - """ - naver_pay: NotRequired[ - "PaymentMethodConfiguration.CreateParamsNaverPay" - ] - """ - Naver Pay is a popular local wallet available in South Korea. - """ - nz_bank_account: NotRequired[ - "PaymentMethodConfiguration.CreateParamsNzBankAccount" - ] - """ - Stripe users in New Zealand can accept Bulk Electronic Clearing System (BECS) direct debit payments from customers with a New Zeland bank account. Check this [page](https://stripe.com/docs/payments/nz-bank-account) for more details. - """ - oxxo: NotRequired["PaymentMethodConfiguration.CreateParamsOxxo"] - """ - OXXO is a Mexican chain of convenience stores with thousands of locations across Latin America and represents nearly 20% of online transactions in Mexico. OXXO allows customers to pay bills and online purchases in-store with cash. Check this [page](https://stripe.com/docs/payments/oxxo) for more details. - """ - p24: NotRequired["PaymentMethodConfiguration.CreateParamsP24"] - """ - Przelewy24 is a Poland-based payment method aggregator that allows customers to complete transactions online using bank transfers and other methods. Bank transfers account for 30% of online payments in Poland and Przelewy24 provides a way for customers to pay with over 165 banks. Check this [page](https://stripe.com/docs/payments/p24) for more details. - """ - parent: NotRequired[str] - """ - Configuration's parent configuration. Specify to create a child configuration. - """ - pay_by_bank: NotRequired[ - "PaymentMethodConfiguration.CreateParamsPayByBank" - ] - """ - Pay by bank is a redirect payment method backed by bank transfers. A customer is redirected to their bank to authorize a bank transfer for a given amount. This removes a lot of the error risks inherent in waiting for the customer to initiate a transfer themselves, and is less expensive than card payments. - """ - payco: NotRequired["PaymentMethodConfiguration.CreateParamsPayco"] - """ - PAYCO is a [single-use](https://docs.stripe.com/payments/payment-methods#usage local wallet available in South Korea. - """ - paynow: NotRequired["PaymentMethodConfiguration.CreateParamsPaynow"] - """ - PayNow is a Singapore-based payment method that allows customers to make a payment using their preferred app from participating banks and participating non-bank financial institutions. Check this [page](https://stripe.com/docs/payments/paynow) for more details. - """ - paypal: NotRequired["PaymentMethodConfiguration.CreateParamsPaypal"] - """ - PayPal, a digital wallet popular with customers in Europe, allows your customers worldwide to pay using their PayPal account. Check this [page](https://stripe.com/docs/payments/paypal) for more details. - """ - paypay: NotRequired["PaymentMethodConfiguration.CreateParamsPaypay"] - """ - Customers can pay with PayPay online or using the PayPay app. - """ - payto: NotRequired["PaymentMethodConfiguration.CreateParamsPayto"] - """ - PayTo is a [real-time](https://docs.stripe.com/payments/real-time) payment method that enables customers in Australia to pay by providing their bank account details. Customers must accept a mandate authorizing you to debit their account. Check this [page](https://docs.stripe.com/payments/payto) for more details. - """ - pix: NotRequired["PaymentMethodConfiguration.CreateParamsPix"] - """ - Pix is a payment method popular in Brazil. When paying with Pix, customers authenticate and approve payments by scanning a QR code in their preferred banking app. Check this [page](https://docs.stripe.com/payments/pix) for more details. - """ - promptpay: NotRequired[ - "PaymentMethodConfiguration.CreateParamsPromptpay" - ] - """ - PromptPay is a Thailand-based payment method that allows customers to make a payment using their preferred app from participating banks. Check this [page](https://stripe.com/docs/payments/promptpay) for more details. - """ - qris: NotRequired["PaymentMethodConfiguration.CreateParamsQris"] - """ - QRIS is a [real-time](https://docs.stripe.com/payments/real-time) payment method popular in Indonesia. When paying with QRIS, customers authenticate and approve payments by scanning a QR code in their preferred digital wallet app. - """ - revolut_pay: NotRequired[ - "PaymentMethodConfiguration.CreateParamsRevolutPay" - ] - """ - Revolut Pay, developed by Revolut, a global finance app, is a digital wallet payment method. Revolut Pay uses the customer's stored balance or cards to fund the payment, and offers the option for non-Revolut customers to save their details after their first purchase. - """ - samsung_pay: NotRequired[ - "PaymentMethodConfiguration.CreateParamsSamsungPay" - ] - """ - Samsung Pay is a [single-use](https://docs.stripe.com/payments/payment-methods#usage local wallet available in South Korea. - """ - satispay: NotRequired[ - "PaymentMethodConfiguration.CreateParamsSatispay" - ] - """ - Satispay is a [single-use](https://docs.stripe.com/payments/payment-methods#usage) payment method where customers are required to [authenticate](https://docs.stripe.com/payments/payment-methods#customer-actions) their payment. Customers pay by being redirected from your website or app, authorizing the payment with Satispay, then returning to your website or app. You get [immediate notification](https://docs.stripe.com/payments/payment-methods#payment-notification) of whether the payment succeeded or failed. - """ - sepa_debit: NotRequired[ - "PaymentMethodConfiguration.CreateParamsSepaDebit" - ] - """ - The [Single Euro Payments Area (SEPA)](https://en.wikipedia.org/wiki/Single_Euro_Payments_Area) is an initiative of the European Union to simplify payments within and across member countries. SEPA established and enforced banking standards to allow for the direct debiting of every EUR-denominated bank account within the SEPA region, check this [page](https://stripe.com/docs/payments/sepa-debit) for more details. - """ - shopeepay: NotRequired[ - "PaymentMethodConfiguration.CreateParamsShopeepay" - ] - """ - ShopeePay is a [single use](https://stripe.com/docs/payments/payment-methods#usage) digital wallet payment method popular in Indonesia. When paying with GoPay, customers authenticate and approve payments using the Shopee app. Desktop checkout is performed by scanning a QR code. When checking out on mobile, customers are redirected to the Shopee app to confirm payment. - """ - sofort: NotRequired["PaymentMethodConfiguration.CreateParamsSofort"] - """ - Stripe users in Europe and the United States can use the [Payment Intents API](https://stripe.com/docs/payments/payment-intents)—a single integration path for creating payments using any supported method—to accept [Sofort](https://www.sofort.com/) payments from customers. Check this [page](https://stripe.com/docs/payments/sofort) for more details. - """ - swish: NotRequired["PaymentMethodConfiguration.CreateParamsSwish"] - """ - Swish is a [real-time](https://stripe.com/docs/payments/real-time) payment method popular in Sweden. It allows customers to [authenticate and approve](https://stripe.com/docs/payments/payment-methods#customer-actions) payments using the Swish mobile app and the Swedish BankID mobile app. Check this [page](https://stripe.com/docs/payments/swish) for more details. - """ - twint: NotRequired["PaymentMethodConfiguration.CreateParamsTwint"] - """ - Twint is a payment method popular in Switzerland. It allows customers to pay using their mobile phone. Check this [page](https://docs.stripe.com/payments/twint) for more details. - """ - us_bank_account: NotRequired[ - "PaymentMethodConfiguration.CreateParamsUsBankAccount" - ] - """ - Stripe users in the United States can accept ACH direct debit payments from customers with a US bank account using the Automated Clearing House (ACH) payments system operated by Nacha. Check this [page](https://stripe.com/docs/payments/ach-direct-debit) for more details. - """ - wechat_pay: NotRequired[ - "PaymentMethodConfiguration.CreateParamsWechatPay" - ] - """ - WeChat, owned by Tencent, is China's leading mobile app with over 1 billion monthly active users. Chinese consumers can use WeChat Pay to pay for goods and services inside of businesses' apps and websites. WeChat Pay users buy most frequently in gaming, e-commerce, travel, online education, and food/nutrition. Check this [page](https://stripe.com/docs/payments/wechat-pay) for more details. - """ - zip: NotRequired["PaymentMethodConfiguration.CreateParamsZip"] - """ - Zip gives your customers a way to split purchases over a series of payments. Check this [page](https://stripe.com/docs/payments/zip) for more details like country availability. - """ - - class CreateParamsAcssDebit(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.CreateParamsAcssDebitDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class CreateParamsAcssDebitDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class CreateParamsAffirm(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.CreateParamsAffirmDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class CreateParamsAffirmDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class CreateParamsAfterpayClearpay(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.CreateParamsAfterpayClearpayDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class CreateParamsAfterpayClearpayDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class CreateParamsAlipay(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.CreateParamsAlipayDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class CreateParamsAlipayDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class CreateParamsAlma(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.CreateParamsAlmaDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class CreateParamsAlmaDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class CreateParamsAmazonPay(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.CreateParamsAmazonPayDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class CreateParamsAmazonPayDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class CreateParamsApplePay(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.CreateParamsApplePayDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class CreateParamsApplePayDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class CreateParamsApplePayLater(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.CreateParamsApplePayLaterDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class CreateParamsApplePayLaterDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class CreateParamsAuBecsDebit(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.CreateParamsAuBecsDebitDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class CreateParamsAuBecsDebitDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class CreateParamsBacsDebit(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.CreateParamsBacsDebitDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class CreateParamsBacsDebitDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class CreateParamsBancontact(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.CreateParamsBancontactDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class CreateParamsBancontactDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class CreateParamsBillie(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.CreateParamsBillieDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class CreateParamsBillieDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class CreateParamsBlik(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.CreateParamsBlikDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class CreateParamsBlikDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class CreateParamsBoleto(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.CreateParamsBoletoDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class CreateParamsBoletoDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class CreateParamsCard(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.CreateParamsCardDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class CreateParamsCardDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class CreateParamsCartesBancaires(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.CreateParamsCartesBancairesDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class CreateParamsCartesBancairesDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class CreateParamsCashapp(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.CreateParamsCashappDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class CreateParamsCashappDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class CreateParamsCustomerBalance(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.CreateParamsCustomerBalanceDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class CreateParamsCustomerBalanceDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class CreateParamsEps(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.CreateParamsEpsDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class CreateParamsEpsDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class CreateParamsFpx(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.CreateParamsFpxDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class CreateParamsFpxDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class CreateParamsFrMealVoucherConecs(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.CreateParamsFrMealVoucherConecsDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class CreateParamsFrMealVoucherConecsDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class CreateParamsGiropay(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.CreateParamsGiropayDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class CreateParamsGiropayDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class CreateParamsGooglePay(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.CreateParamsGooglePayDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class CreateParamsGooglePayDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class CreateParamsGopay(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.CreateParamsGopayDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class CreateParamsGopayDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class CreateParamsGrabpay(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.CreateParamsGrabpayDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class CreateParamsGrabpayDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class CreateParamsIdBankTransfer(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.CreateParamsIdBankTransferDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class CreateParamsIdBankTransferDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class CreateParamsIdeal(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.CreateParamsIdealDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class CreateParamsIdealDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class CreateParamsJcb(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.CreateParamsJcbDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class CreateParamsJcbDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class CreateParamsKakaoPay(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.CreateParamsKakaoPayDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class CreateParamsKakaoPayDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class CreateParamsKlarna(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.CreateParamsKlarnaDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class CreateParamsKlarnaDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class CreateParamsKonbini(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.CreateParamsKonbiniDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class CreateParamsKonbiniDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class CreateParamsKrCard(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.CreateParamsKrCardDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class CreateParamsKrCardDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class CreateParamsLink(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.CreateParamsLinkDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class CreateParamsLinkDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class CreateParamsMobilepay(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.CreateParamsMobilepayDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class CreateParamsMobilepayDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class CreateParamsMultibanco(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.CreateParamsMultibancoDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class CreateParamsMultibancoDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class CreateParamsNaverPay(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.CreateParamsNaverPayDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class CreateParamsNaverPayDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class CreateParamsNzBankAccount(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.CreateParamsNzBankAccountDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class CreateParamsNzBankAccountDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class CreateParamsOxxo(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.CreateParamsOxxoDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class CreateParamsOxxoDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class CreateParamsP24(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.CreateParamsP24DisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class CreateParamsP24DisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class CreateParamsPayByBank(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.CreateParamsPayByBankDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class CreateParamsPayByBankDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class CreateParamsPayco(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.CreateParamsPaycoDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class CreateParamsPaycoDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class CreateParamsPaynow(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.CreateParamsPaynowDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class CreateParamsPaynowDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class CreateParamsPaypal(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.CreateParamsPaypalDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class CreateParamsPaypalDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class CreateParamsPaypay(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.CreateParamsPaypayDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class CreateParamsPaypayDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class CreateParamsPayto(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.CreateParamsPaytoDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class CreateParamsPaytoDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class CreateParamsPix(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.CreateParamsPixDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class CreateParamsPixDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class CreateParamsPromptpay(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.CreateParamsPromptpayDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class CreateParamsPromptpayDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class CreateParamsQris(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.CreateParamsQrisDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class CreateParamsQrisDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class CreateParamsRevolutPay(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.CreateParamsRevolutPayDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class CreateParamsRevolutPayDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class CreateParamsSamsungPay(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.CreateParamsSamsungPayDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class CreateParamsSamsungPayDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class CreateParamsSatispay(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.CreateParamsSatispayDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class CreateParamsSatispayDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class CreateParamsSepaDebit(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.CreateParamsSepaDebitDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class CreateParamsSepaDebitDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class CreateParamsShopeepay(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.CreateParamsShopeepayDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class CreateParamsShopeepayDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class CreateParamsSofort(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.CreateParamsSofortDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class CreateParamsSofortDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class CreateParamsSwish(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.CreateParamsSwishDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class CreateParamsSwishDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class CreateParamsTwint(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.CreateParamsTwintDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class CreateParamsTwintDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class CreateParamsUsBankAccount(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.CreateParamsUsBankAccountDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class CreateParamsUsBankAccountDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class CreateParamsWechatPay(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.CreateParamsWechatPayDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class CreateParamsWechatPayDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class CreateParamsZip(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.CreateParamsZipDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class CreateParamsZipDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class ListParams(RequestOptions): - application: NotRequired["Literal['']|str"] - """ - The Connect application to filter by. - """ - 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 ModifyParams(RequestOptions): - acss_debit: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsAcssDebit" - ] - """ - Canadian pre-authorized debit payments, check this [page](https://stripe.com/docs/payments/acss-debit) for more details like country availability. - """ - active: NotRequired[bool] - """ - Whether the configuration can be used for new payments. - """ - affirm: NotRequired["PaymentMethodConfiguration.ModifyParamsAffirm"] - """ - [Affirm](https://www.affirm.com/) gives your customers a way to split purchases over a series of payments. Depending on the purchase, they can pay with four interest-free payments (Split Pay) or pay over a longer term (Installments), which might include interest. Check this [page](https://stripe.com/docs/payments/affirm) for more details like country availability. - """ - afterpay_clearpay: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsAfterpayClearpay" - ] - """ - Afterpay gives your customers a way to pay for purchases in installments, check this [page](https://stripe.com/docs/payments/afterpay-clearpay) for more details like country availability. Afterpay is particularly popular among businesses selling fashion, beauty, and sports products. - """ - alipay: NotRequired["PaymentMethodConfiguration.ModifyParamsAlipay"] - """ - Alipay is a digital wallet in China that has more than a billion active users worldwide. Alipay users can pay on the web or on a mobile device using login credentials or their Alipay app. Alipay has a low dispute rate and reduces fraud by authenticating payments using the customer's login credentials. Check this [page](https://stripe.com/docs/payments/alipay) for more details. - """ - alma: NotRequired["PaymentMethodConfiguration.ModifyParamsAlma"] - """ - Alma is a Buy Now, Pay Later payment method that offers customers the ability to pay in 2, 3, or 4 installments. - """ - amazon_pay: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsAmazonPay" - ] - """ - Amazon Pay is a wallet payment method that lets your customers check out the same way as on Amazon. - """ - apple_pay: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsApplePay" - ] - """ - Stripe users can accept [Apple Pay](https://stripe.com/payments/apple-pay) in iOS applications in iOS 9 and later, and on the web in Safari starting with iOS 10 or macOS Sierra. There are no additional fees to process Apple Pay payments, and the [pricing](https://stripe.com/pricing) is the same as other card transactions. Check this [page](https://stripe.com/docs/apple-pay) for more details. - """ - apple_pay_later: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsApplePayLater" - ] - """ - Apple Pay Later, a payment method for customers to buy now and pay later, gives your customers a way to split purchases into four installments across six weeks. - """ - au_becs_debit: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsAuBecsDebit" - ] - """ - Stripe users in Australia can accept Bulk Electronic Clearing System (BECS) direct debit payments from customers with an Australian bank account. Check this [page](https://stripe.com/docs/payments/au-becs-debit) for more details. - """ - bacs_debit: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsBacsDebit" - ] - """ - Stripe users in the UK can accept Bacs Direct Debit payments from customers with a UK bank account, check this [page](https://stripe.com/docs/payments/payment-methods/bacs-debit) for more details. - """ - bancontact: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsBancontact" - ] - """ - Bancontact is the most popular online payment method in Belgium, with over 15 million cards in circulation. [Customers](https://stripe.com/docs/api/customers) use a Bancontact card or mobile app linked to a Belgian bank account to make online payments that are secure, guaranteed, and confirmed immediately. Check this [page](https://stripe.com/docs/payments/bancontact) for more details. - """ - billie: NotRequired["PaymentMethodConfiguration.ModifyParamsBillie"] - """ - Billie is a [single-use](https://docs.stripe.com/payments/payment-methods#usage) payment method that offers businesses Pay by Invoice where they offer payment terms ranging from 7-120 days. Customers are redirected from your website or app, authorize the payment with Billie, then return to your website or app. You get [immediate notification](https://docs.stripe.com/payments/payment-methods#payment-notification) of whether the payment succeeded or failed. - """ - blik: NotRequired["PaymentMethodConfiguration.ModifyParamsBlik"] - """ - BLIK is a [single use](https://stripe.com/docs/payments/payment-methods#usage) payment method that requires customers to authenticate their payments. When customers want to pay online using BLIK, they request a six-digit code from their banking application and enter it into the payment collection form. Check this [page](https://stripe.com/docs/payments/blik) for more details. - """ - boleto: NotRequired["PaymentMethodConfiguration.ModifyParamsBoleto"] - """ - Boleto is an official (regulated by the Central Bank of Brazil) payment method in Brazil. Check this [page](https://stripe.com/docs/payments/boleto) for more details. - """ - card: NotRequired["PaymentMethodConfiguration.ModifyParamsCard"] - """ - Cards are a popular way for consumers and businesses to pay online or in person. Stripe supports global and local card networks. - """ - cartes_bancaires: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsCartesBancaires" - ] - """ - Cartes Bancaires is France's local card network. More than 95% of these cards are co-branded with either Visa or Mastercard, meaning you can process these cards over either Cartes Bancaires or the Visa or Mastercard networks. Check this [page](https://stripe.com/docs/payments/cartes-bancaires) for more details. - """ - cashapp: NotRequired["PaymentMethodConfiguration.ModifyParamsCashapp"] - """ - Cash App is a popular consumer app in the US that allows customers to bank, invest, send, and receive money using their digital wallet. Check this [page](https://stripe.com/docs/payments/cash-app-pay) for more details. - """ - customer_balance: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsCustomerBalance" - ] - """ - Uses a customer's [cash balance](https://stripe.com/docs/payments/customer-balance) for the payment. The cash balance can be funded via a bank transfer. Check this [page](https://stripe.com/docs/payments/bank-transfers) for more details. - """ - eps: NotRequired["PaymentMethodConfiguration.ModifyParamsEps"] - """ - EPS is an Austria-based payment method that allows customers to complete transactions online using their bank credentials. EPS is supported by all Austrian banks and is accepted by over 80% of Austrian online retailers. Check this [page](https://stripe.com/docs/payments/eps) for more details. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - fpx: NotRequired["PaymentMethodConfiguration.ModifyParamsFpx"] - """ - Financial Process Exchange (FPX) is a Malaysia-based payment method that allows customers to complete transactions online using their bank credentials. Bank Negara Malaysia (BNM), the Central Bank of Malaysia, and eleven other major Malaysian financial institutions are members of the PayNet Group, which owns and operates FPX. It is one of the most popular online payment methods in Malaysia, with nearly 90 million transactions in 2018 according to BNM. Check this [page](https://stripe.com/docs/payments/fpx) for more details. - """ - fr_meal_voucher_conecs: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsFrMealVoucherConecs" - ] - """ - Meal vouchers in France, or “titres-restaurant”, is a local benefits program commonly offered by employers for their employees to purchase prepared food and beverages on working days. Check this [page](https://stripe.com/docs/payments/benefits/fr-meal-vouchers) for more details. - """ - giropay: NotRequired["PaymentMethodConfiguration.ModifyParamsGiropay"] - """ - giropay is a German payment method based on online banking, introduced in 2006. It allows customers to complete transactions online using their online banking environment, with funds debited from their bank account. Depending on their bank, customers confirm payments on giropay using a second factor of authentication or a PIN. giropay accounts for 10% of online checkouts in Germany. Check this [page](https://stripe.com/docs/payments/giropay) for more details. - """ - google_pay: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsGooglePay" - ] - """ - Google Pay allows customers to make payments in your app or website using any credit or debit card saved to their Google Account, including those from Google Play, YouTube, Chrome, or an Android device. Use the Google Pay API to request any credit or debit card stored in your customer's Google account. Check this [page](https://stripe.com/docs/google-pay) for more details. - """ - gopay: NotRequired["PaymentMethodConfiguration.ModifyParamsGopay"] - """ - GoPay is a [single use](https://stripe.com/docs/payments/payment-methods#usage) digital wallet payment method popular in Indonesia. When paying with GoPay, customers authenticate and approve payments using the Gojek app. Desktop checkout is performed by scanning a QR code. When checking out on mobile, customers are redirected to the Gojek app to confirm payment. - """ - grabpay: NotRequired["PaymentMethodConfiguration.ModifyParamsGrabpay"] - """ - GrabPay is a payment method developed by [Grab](https://www.grab.com/sg/consumer/finance/pay/). GrabPay is a digital wallet - customers maintain a balance in their wallets that they pay out with. Check this [page](https://stripe.com/docs/payments/grabpay) for more details. - """ - id_bank_transfer: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsIdBankTransfer" - ] - """ - Stripe users in Indonesia can receive bank transfers from customers in Indonesia. Bank transfers are a popular B2C and B2B payment method in Indonesia. - """ - ideal: NotRequired["PaymentMethodConfiguration.ModifyParamsIdeal"] - """ - iDEAL is a Netherlands-based payment method that allows customers to complete transactions online using their bank credentials. All major Dutch banks are members of Currence, the scheme that operates iDEAL, making it the most popular online payment method in the Netherlands with a share of online transactions close to 55%. Check this [page](https://stripe.com/docs/payments/ideal) for more details. - """ - jcb: NotRequired["PaymentMethodConfiguration.ModifyParamsJcb"] - """ - JCB is a credit card company based in Japan. JCB is currently available in Japan to businesses approved by JCB, and available to all businesses in Australia, Canada, Hong Kong, Japan, New Zealand, Singapore, Switzerland, United Kingdom, United States, and all countries in the European Economic Area except Iceland. Check this [page](https://support.stripe.com/questions/accepting-japan-credit-bureau-%28jcb%29-payments) for more details. - """ - kakao_pay: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsKakaoPay" - ] - """ - Kakao Pay is a popular local wallet available in South Korea. - """ - klarna: NotRequired["PaymentMethodConfiguration.ModifyParamsKlarna"] - """ - Klarna gives customers a range of [payment options](https://stripe.com/docs/payments/klarna#payment-options) during checkout. Available payment options vary depending on the customer's billing address and the transaction amount. These payment options make it convenient for customers to purchase items in all price ranges. Check this [page](https://stripe.com/docs/payments/klarna) for more details. - """ - konbini: NotRequired["PaymentMethodConfiguration.ModifyParamsKonbini"] - """ - Konbini allows customers in Japan to pay for bills and online purchases at convenience stores with cash. Check this [page](https://stripe.com/docs/payments/konbini) for more details. - """ - kr_card: NotRequired["PaymentMethodConfiguration.ModifyParamsKrCard"] - """ - Korean cards let users pay using locally issued cards from South Korea. - """ - link: NotRequired["PaymentMethodConfiguration.ModifyParamsLink"] - """ - [Link](https://stripe.com/docs/payments/link) is a payment method network. With Link, users save their payment details once, then reuse that information to pay with one click for any business on the network. - """ - mobilepay: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsMobilepay" - ] - """ - MobilePay is a [single-use](https://stripe.com/docs/payments/payment-methods#usage) card wallet payment method used in Denmark and Finland. It allows customers to [authenticate and approve](https://stripe.com/docs/payments/payment-methods#customer-actions) payments using the MobilePay app. Check this [page](https://stripe.com/docs/payments/mobilepay) for more details. - """ - multibanco: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsMultibanco" - ] - """ - Stripe users in Europe and the United States can accept Multibanco payments from customers in Portugal using [Sources](https://stripe.com/docs/sources)—a single integration path for creating payments using any supported method. - """ - name: NotRequired[str] - """ - Configuration name. - """ - naver_pay: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsNaverPay" - ] - """ - Naver Pay is a popular local wallet available in South Korea. - """ - nz_bank_account: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsNzBankAccount" - ] - """ - Stripe users in New Zealand can accept Bulk Electronic Clearing System (BECS) direct debit payments from customers with a New Zeland bank account. Check this [page](https://stripe.com/docs/payments/nz-bank-account) for more details. - """ - oxxo: NotRequired["PaymentMethodConfiguration.ModifyParamsOxxo"] - """ - OXXO is a Mexican chain of convenience stores with thousands of locations across Latin America and represents nearly 20% of online transactions in Mexico. OXXO allows customers to pay bills and online purchases in-store with cash. Check this [page](https://stripe.com/docs/payments/oxxo) for more details. - """ - p24: NotRequired["PaymentMethodConfiguration.ModifyParamsP24"] - """ - Przelewy24 is a Poland-based payment method aggregator that allows customers to complete transactions online using bank transfers and other methods. Bank transfers account for 30% of online payments in Poland and Przelewy24 provides a way for customers to pay with over 165 banks. Check this [page](https://stripe.com/docs/payments/p24) for more details. - """ - pay_by_bank: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsPayByBank" - ] - """ - Pay by bank is a redirect payment method backed by bank transfers. A customer is redirected to their bank to authorize a bank transfer for a given amount. This removes a lot of the error risks inherent in waiting for the customer to initiate a transfer themselves, and is less expensive than card payments. - """ - payco: NotRequired["PaymentMethodConfiguration.ModifyParamsPayco"] - """ - PAYCO is a [single-use](https://docs.stripe.com/payments/payment-methods#usage local wallet available in South Korea. - """ - paynow: NotRequired["PaymentMethodConfiguration.ModifyParamsPaynow"] - """ - PayNow is a Singapore-based payment method that allows customers to make a payment using their preferred app from participating banks and participating non-bank financial institutions. Check this [page](https://stripe.com/docs/payments/paynow) for more details. - """ - paypal: NotRequired["PaymentMethodConfiguration.ModifyParamsPaypal"] - """ - PayPal, a digital wallet popular with customers in Europe, allows your customers worldwide to pay using their PayPal account. Check this [page](https://stripe.com/docs/payments/paypal) for more details. - """ - paypay: NotRequired["PaymentMethodConfiguration.ModifyParamsPaypay"] - """ - Customers can pay with PayPay online or using the PayPay app. - """ - payto: NotRequired["PaymentMethodConfiguration.ModifyParamsPayto"] - """ - PayTo is a [real-time](https://docs.stripe.com/payments/real-time) payment method that enables customers in Australia to pay by providing their bank account details. Customers must accept a mandate authorizing you to debit their account. Check this [page](https://docs.stripe.com/payments/payto) for more details. - """ - pix: NotRequired["PaymentMethodConfiguration.ModifyParamsPix"] - """ - Pix is a payment method popular in Brazil. When paying with Pix, customers authenticate and approve payments by scanning a QR code in their preferred banking app. Check this [page](https://docs.stripe.com/payments/pix) for more details. - """ - promptpay: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsPromptpay" - ] - """ - PromptPay is a Thailand-based payment method that allows customers to make a payment using their preferred app from participating banks. Check this [page](https://stripe.com/docs/payments/promptpay) for more details. - """ - qris: NotRequired["PaymentMethodConfiguration.ModifyParamsQris"] - """ - QRIS is a [real-time](https://docs.stripe.com/payments/real-time) payment method popular in Indonesia. When paying with QRIS, customers authenticate and approve payments by scanning a QR code in their preferred digital wallet app. - """ - revolut_pay: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsRevolutPay" - ] - """ - Revolut Pay, developed by Revolut, a global finance app, is a digital wallet payment method. Revolut Pay uses the customer's stored balance or cards to fund the payment, and offers the option for non-Revolut customers to save their details after their first purchase. - """ - samsung_pay: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsSamsungPay" - ] - """ - Samsung Pay is a [single-use](https://docs.stripe.com/payments/payment-methods#usage local wallet available in South Korea. - """ - satispay: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsSatispay" - ] - """ - Satispay is a [single-use](https://docs.stripe.com/payments/payment-methods#usage) payment method where customers are required to [authenticate](https://docs.stripe.com/payments/payment-methods#customer-actions) their payment. Customers pay by being redirected from your website or app, authorizing the payment with Satispay, then returning to your website or app. You get [immediate notification](https://docs.stripe.com/payments/payment-methods#payment-notification) of whether the payment succeeded or failed. - """ - sepa_debit: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsSepaDebit" - ] - """ - The [Single Euro Payments Area (SEPA)](https://en.wikipedia.org/wiki/Single_Euro_Payments_Area) is an initiative of the European Union to simplify payments within and across member countries. SEPA established and enforced banking standards to allow for the direct debiting of every EUR-denominated bank account within the SEPA region, check this [page](https://stripe.com/docs/payments/sepa-debit) for more details. - """ - shopeepay: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsShopeepay" - ] - """ - ShopeePay is a [single use](https://stripe.com/docs/payments/payment-methods#usage) digital wallet payment method popular in Indonesia. When paying with GoPay, customers authenticate and approve payments using the Shopee app. Desktop checkout is performed by scanning a QR code. When checking out on mobile, customers are redirected to the Shopee app to confirm payment. - """ - sofort: NotRequired["PaymentMethodConfiguration.ModifyParamsSofort"] - """ - Stripe users in Europe and the United States can use the [Payment Intents API](https://stripe.com/docs/payments/payment-intents)—a single integration path for creating payments using any supported method—to accept [Sofort](https://www.sofort.com/) payments from customers. Check this [page](https://stripe.com/docs/payments/sofort) for more details. - """ - swish: NotRequired["PaymentMethodConfiguration.ModifyParamsSwish"] - """ - Swish is a [real-time](https://stripe.com/docs/payments/real-time) payment method popular in Sweden. It allows customers to [authenticate and approve](https://stripe.com/docs/payments/payment-methods#customer-actions) payments using the Swish mobile app and the Swedish BankID mobile app. Check this [page](https://stripe.com/docs/payments/swish) for more details. - """ - twint: NotRequired["PaymentMethodConfiguration.ModifyParamsTwint"] - """ - Twint is a payment method popular in Switzerland. It allows customers to pay using their mobile phone. Check this [page](https://docs.stripe.com/payments/twint) for more details. - """ - us_bank_account: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsUsBankAccount" - ] - """ - Stripe users in the United States can accept ACH direct debit payments from customers with a US bank account using the Automated Clearing House (ACH) payments system operated by Nacha. Check this [page](https://stripe.com/docs/payments/ach-direct-debit) for more details. - """ - wechat_pay: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsWechatPay" - ] - """ - WeChat, owned by Tencent, is China's leading mobile app with over 1 billion monthly active users. Chinese consumers can use WeChat Pay to pay for goods and services inside of businesses' apps and websites. WeChat Pay users buy most frequently in gaming, e-commerce, travel, online education, and food/nutrition. Check this [page](https://stripe.com/docs/payments/wechat-pay) for more details. - """ - zip: NotRequired["PaymentMethodConfiguration.ModifyParamsZip"] - """ - Zip gives your customers a way to split purchases over a series of payments. Check this [page](https://stripe.com/docs/payments/zip) for more details like country availability. - """ - - class ModifyParamsAcssDebit(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsAcssDebitDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class ModifyParamsAcssDebitDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class ModifyParamsAffirm(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsAffirmDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class ModifyParamsAffirmDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class ModifyParamsAfterpayClearpay(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsAfterpayClearpayDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class ModifyParamsAfterpayClearpayDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class ModifyParamsAlipay(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsAlipayDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class ModifyParamsAlipayDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class ModifyParamsAlma(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsAlmaDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class ModifyParamsAlmaDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class ModifyParamsAmazonPay(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsAmazonPayDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class ModifyParamsAmazonPayDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class ModifyParamsApplePay(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsApplePayDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class ModifyParamsApplePayDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class ModifyParamsApplePayLater(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsApplePayLaterDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class ModifyParamsApplePayLaterDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class ModifyParamsAuBecsDebit(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsAuBecsDebitDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class ModifyParamsAuBecsDebitDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class ModifyParamsBacsDebit(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsBacsDebitDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class ModifyParamsBacsDebitDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class ModifyParamsBancontact(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsBancontactDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class ModifyParamsBancontactDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class ModifyParamsBillie(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsBillieDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class ModifyParamsBillieDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class ModifyParamsBlik(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsBlikDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class ModifyParamsBlikDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class ModifyParamsBoleto(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsBoletoDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class ModifyParamsBoletoDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class ModifyParamsCard(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsCardDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class ModifyParamsCardDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class ModifyParamsCartesBancaires(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsCartesBancairesDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class ModifyParamsCartesBancairesDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class ModifyParamsCashapp(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsCashappDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class ModifyParamsCashappDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class ModifyParamsCustomerBalance(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsCustomerBalanceDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class ModifyParamsCustomerBalanceDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class ModifyParamsEps(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsEpsDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class ModifyParamsEpsDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class ModifyParamsFpx(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsFpxDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class ModifyParamsFpxDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class ModifyParamsFrMealVoucherConecs(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsFrMealVoucherConecsDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class ModifyParamsFrMealVoucherConecsDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class ModifyParamsGiropay(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsGiropayDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class ModifyParamsGiropayDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class ModifyParamsGooglePay(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsGooglePayDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class ModifyParamsGooglePayDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class ModifyParamsGopay(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsGopayDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class ModifyParamsGopayDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class ModifyParamsGrabpay(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsGrabpayDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class ModifyParamsGrabpayDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class ModifyParamsIdBankTransfer(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsIdBankTransferDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class ModifyParamsIdBankTransferDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class ModifyParamsIdeal(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsIdealDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class ModifyParamsIdealDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class ModifyParamsJcb(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsJcbDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class ModifyParamsJcbDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class ModifyParamsKakaoPay(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsKakaoPayDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class ModifyParamsKakaoPayDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class ModifyParamsKlarna(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsKlarnaDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class ModifyParamsKlarnaDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class ModifyParamsKonbini(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsKonbiniDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class ModifyParamsKonbiniDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class ModifyParamsKrCard(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsKrCardDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class ModifyParamsKrCardDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class ModifyParamsLink(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsLinkDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class ModifyParamsLinkDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class ModifyParamsMobilepay(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsMobilepayDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class ModifyParamsMobilepayDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class ModifyParamsMultibanco(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsMultibancoDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class ModifyParamsMultibancoDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class ModifyParamsNaverPay(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsNaverPayDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class ModifyParamsNaverPayDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class ModifyParamsNzBankAccount(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsNzBankAccountDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class ModifyParamsNzBankAccountDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class ModifyParamsOxxo(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsOxxoDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class ModifyParamsOxxoDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class ModifyParamsP24(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsP24DisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class ModifyParamsP24DisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class ModifyParamsPayByBank(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsPayByBankDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class ModifyParamsPayByBankDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class ModifyParamsPayco(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsPaycoDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class ModifyParamsPaycoDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class ModifyParamsPaynow(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsPaynowDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class ModifyParamsPaynowDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class ModifyParamsPaypal(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsPaypalDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class ModifyParamsPaypalDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class ModifyParamsPaypay(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsPaypayDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class ModifyParamsPaypayDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class ModifyParamsPayto(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsPaytoDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class ModifyParamsPaytoDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class ModifyParamsPix(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsPixDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class ModifyParamsPixDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class ModifyParamsPromptpay(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsPromptpayDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class ModifyParamsPromptpayDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class ModifyParamsQris(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsQrisDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class ModifyParamsQrisDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class ModifyParamsRevolutPay(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsRevolutPayDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class ModifyParamsRevolutPayDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class ModifyParamsSamsungPay(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsSamsungPayDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class ModifyParamsSamsungPayDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class ModifyParamsSatispay(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsSatispayDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class ModifyParamsSatispayDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class ModifyParamsSepaDebit(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsSepaDebitDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class ModifyParamsSepaDebitDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class ModifyParamsShopeepay(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsShopeepayDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class ModifyParamsShopeepayDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class ModifyParamsSofort(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsSofortDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class ModifyParamsSofortDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class ModifyParamsSwish(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsSwishDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class ModifyParamsSwishDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class ModifyParamsTwint(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsTwintDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class ModifyParamsTwintDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class ModifyParamsUsBankAccount(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsUsBankAccountDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class ModifyParamsUsBankAccountDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class ModifyParamsWechatPay(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsWechatPayDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class ModifyParamsWechatPayDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class ModifyParamsZip(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfiguration.ModifyParamsZipDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class ModifyParamsZipDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class RetrieveParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - acss_debit: Optional[AcssDebit] active: bool """ @@ -3671,7 +1396,7 @@ class RetrieveParams(RequestOptions): @classmethod def create( - cls, **params: Unpack["PaymentMethodConfiguration.CreateParams"] + cls, **params: Unpack["PaymentMethodConfigurationCreateParams"] ) -> "PaymentMethodConfiguration": """ Creates a payment method configuration @@ -3687,7 +1412,7 @@ def create( @classmethod async def create_async( - cls, **params: Unpack["PaymentMethodConfiguration.CreateParams"] + cls, **params: Unpack["PaymentMethodConfigurationCreateParams"] ) -> "PaymentMethodConfiguration": """ Creates a payment method configuration @@ -3703,7 +1428,7 @@ async def create_async( @classmethod def list( - cls, **params: Unpack["PaymentMethodConfiguration.ListParams"] + cls, **params: Unpack["PaymentMethodConfigurationListParams"] ) -> ListObject["PaymentMethodConfiguration"]: """ List payment method configurations @@ -3723,7 +1448,7 @@ def list( @classmethod async def list_async( - cls, **params: Unpack["PaymentMethodConfiguration.ListParams"] + cls, **params: Unpack["PaymentMethodConfigurationListParams"] ) -> ListObject["PaymentMethodConfiguration"]: """ List payment method configurations @@ -3745,7 +1470,7 @@ async def list_async( def modify( cls, id: str, - **params: Unpack["PaymentMethodConfiguration.ModifyParams"], + **params: Unpack["PaymentMethodConfigurationModifyParams"], ) -> "PaymentMethodConfiguration": """ Update payment method configuration @@ -3764,7 +1489,7 @@ def modify( async def modify_async( cls, id: str, - **params: Unpack["PaymentMethodConfiguration.ModifyParams"], + **params: Unpack["PaymentMethodConfigurationModifyParams"], ) -> "PaymentMethodConfiguration": """ Update payment method configuration @@ -3783,7 +1508,7 @@ async def modify_async( def retrieve( cls, id: str, - **params: Unpack["PaymentMethodConfiguration.RetrieveParams"], + **params: Unpack["PaymentMethodConfigurationRetrieveParams"], ) -> "PaymentMethodConfiguration": """ Retrieve payment method configuration @@ -3796,7 +1521,7 @@ def retrieve( async def retrieve_async( cls, id: str, - **params: Unpack["PaymentMethodConfiguration.RetrieveParams"], + **params: Unpack["PaymentMethodConfigurationRetrieveParams"], ) -> "PaymentMethodConfiguration": """ Retrieve payment method configuration diff --git a/stripe/_payment_method_configuration_service.py b/stripe/_payment_method_configuration_service.py index ff55ce3b1..49c22e42f 100644 --- a/stripe/_payment_method_configuration_service.py +++ b/stripe/_payment_method_configuration_service.py @@ -5,2384 +5,28 @@ from stripe._request_options import RequestOptions from stripe._stripe_service import StripeService from stripe._util import sanitize_id -from typing import List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params._payment_method_configuration_create_params import ( + PaymentMethodConfigurationCreateParams, + ) + from stripe.params._payment_method_configuration_list_params import ( + PaymentMethodConfigurationListParams, + ) + from stripe.params._payment_method_configuration_retrieve_params import ( + PaymentMethodConfigurationRetrieveParams, + ) + from stripe.params._payment_method_configuration_update_params import ( + PaymentMethodConfigurationUpdateParams, + ) class PaymentMethodConfigurationService(StripeService): - class CreateParams(TypedDict): - acss_debit: NotRequired[ - "PaymentMethodConfigurationService.CreateParamsAcssDebit" - ] - """ - Canadian pre-authorized debit payments, check this [page](https://stripe.com/docs/payments/acss-debit) for more details like country availability. - """ - affirm: NotRequired[ - "PaymentMethodConfigurationService.CreateParamsAffirm" - ] - """ - [Affirm](https://www.affirm.com/) gives your customers a way to split purchases over a series of payments. Depending on the purchase, they can pay with four interest-free payments (Split Pay) or pay over a longer term (Installments), which might include interest. Check this [page](https://stripe.com/docs/payments/affirm) for more details like country availability. - """ - afterpay_clearpay: NotRequired[ - "PaymentMethodConfigurationService.CreateParamsAfterpayClearpay" - ] - """ - Afterpay gives your customers a way to pay for purchases in installments, check this [page](https://stripe.com/docs/payments/afterpay-clearpay) for more details like country availability. Afterpay is particularly popular among businesses selling fashion, beauty, and sports products. - """ - alipay: NotRequired[ - "PaymentMethodConfigurationService.CreateParamsAlipay" - ] - """ - Alipay is a digital wallet in China that has more than a billion active users worldwide. Alipay users can pay on the web or on a mobile device using login credentials or their Alipay app. Alipay has a low dispute rate and reduces fraud by authenticating payments using the customer's login credentials. Check this [page](https://stripe.com/docs/payments/alipay) for more details. - """ - alma: NotRequired["PaymentMethodConfigurationService.CreateParamsAlma"] - """ - Alma is a Buy Now, Pay Later payment method that offers customers the ability to pay in 2, 3, or 4 installments. - """ - amazon_pay: NotRequired[ - "PaymentMethodConfigurationService.CreateParamsAmazonPay" - ] - """ - Amazon Pay is a wallet payment method that lets your customers check out the same way as on Amazon. - """ - apple_pay: NotRequired[ - "PaymentMethodConfigurationService.CreateParamsApplePay" - ] - """ - Stripe users can accept [Apple Pay](https://stripe.com/payments/apple-pay) in iOS applications in iOS 9 and later, and on the web in Safari starting with iOS 10 or macOS Sierra. There are no additional fees to process Apple Pay payments, and the [pricing](https://stripe.com/pricing) is the same as other card transactions. Check this [page](https://stripe.com/docs/apple-pay) for more details. - """ - apple_pay_later: NotRequired[ - "PaymentMethodConfigurationService.CreateParamsApplePayLater" - ] - """ - Apple Pay Later, a payment method for customers to buy now and pay later, gives your customers a way to split purchases into four installments across six weeks. - """ - au_becs_debit: NotRequired[ - "PaymentMethodConfigurationService.CreateParamsAuBecsDebit" - ] - """ - Stripe users in Australia can accept Bulk Electronic Clearing System (BECS) direct debit payments from customers with an Australian bank account. Check this [page](https://stripe.com/docs/payments/au-becs-debit) for more details. - """ - bacs_debit: NotRequired[ - "PaymentMethodConfigurationService.CreateParamsBacsDebit" - ] - """ - Stripe users in the UK can accept Bacs Direct Debit payments from customers with a UK bank account, check this [page](https://stripe.com/docs/payments/payment-methods/bacs-debit) for more details. - """ - bancontact: NotRequired[ - "PaymentMethodConfigurationService.CreateParamsBancontact" - ] - """ - Bancontact is the most popular online payment method in Belgium, with over 15 million cards in circulation. [Customers](https://stripe.com/docs/api/customers) use a Bancontact card or mobile app linked to a Belgian bank account to make online payments that are secure, guaranteed, and confirmed immediately. Check this [page](https://stripe.com/docs/payments/bancontact) for more details. - """ - billie: NotRequired[ - "PaymentMethodConfigurationService.CreateParamsBillie" - ] - """ - Billie is a [single-use](https://docs.stripe.com/payments/payment-methods#usage) payment method that offers businesses Pay by Invoice where they offer payment terms ranging from 7-120 days. Customers are redirected from your website or app, authorize the payment with Billie, then return to your website or app. You get [immediate notification](https://docs.stripe.com/payments/payment-methods#payment-notification) of whether the payment succeeded or failed. - """ - blik: NotRequired["PaymentMethodConfigurationService.CreateParamsBlik"] - """ - BLIK is a [single use](https://stripe.com/docs/payments/payment-methods#usage) payment method that requires customers to authenticate their payments. When customers want to pay online using BLIK, they request a six-digit code from their banking application and enter it into the payment collection form. Check this [page](https://stripe.com/docs/payments/blik) for more details. - """ - boleto: NotRequired[ - "PaymentMethodConfigurationService.CreateParamsBoleto" - ] - """ - Boleto is an official (regulated by the Central Bank of Brazil) payment method in Brazil. Check this [page](https://stripe.com/docs/payments/boleto) for more details. - """ - card: NotRequired["PaymentMethodConfigurationService.CreateParamsCard"] - """ - Cards are a popular way for consumers and businesses to pay online or in person. Stripe supports global and local card networks. - """ - cartes_bancaires: NotRequired[ - "PaymentMethodConfigurationService.CreateParamsCartesBancaires" - ] - """ - Cartes Bancaires is France's local card network. More than 95% of these cards are co-branded with either Visa or Mastercard, meaning you can process these cards over either Cartes Bancaires or the Visa or Mastercard networks. Check this [page](https://stripe.com/docs/payments/cartes-bancaires) for more details. - """ - cashapp: NotRequired[ - "PaymentMethodConfigurationService.CreateParamsCashapp" - ] - """ - Cash App is a popular consumer app in the US that allows customers to bank, invest, send, and receive money using their digital wallet. Check this [page](https://stripe.com/docs/payments/cash-app-pay) for more details. - """ - customer_balance: NotRequired[ - "PaymentMethodConfigurationService.CreateParamsCustomerBalance" - ] - """ - Uses a customer's [cash balance](https://stripe.com/docs/payments/customer-balance) for the payment. The cash balance can be funded via a bank transfer. Check this [page](https://stripe.com/docs/payments/bank-transfers) for more details. - """ - eps: NotRequired["PaymentMethodConfigurationService.CreateParamsEps"] - """ - EPS is an Austria-based payment method that allows customers to complete transactions online using their bank credentials. EPS is supported by all Austrian banks and is accepted by over 80% of Austrian online retailers. Check this [page](https://stripe.com/docs/payments/eps) for more details. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - fpx: NotRequired["PaymentMethodConfigurationService.CreateParamsFpx"] - """ - Financial Process Exchange (FPX) is a Malaysia-based payment method that allows customers to complete transactions online using their bank credentials. Bank Negara Malaysia (BNM), the Central Bank of Malaysia, and eleven other major Malaysian financial institutions are members of the PayNet Group, which owns and operates FPX. It is one of the most popular online payment methods in Malaysia, with nearly 90 million transactions in 2018 according to BNM. Check this [page](https://stripe.com/docs/payments/fpx) for more details. - """ - fr_meal_voucher_conecs: NotRequired[ - "PaymentMethodConfigurationService.CreateParamsFrMealVoucherConecs" - ] - """ - Meal vouchers in France, or “titres-restaurant”, is a local benefits program commonly offered by employers for their employees to purchase prepared food and beverages on working days. Check this [page](https://stripe.com/docs/payments/benefits/fr-meal-vouchers) for more details. - """ - giropay: NotRequired[ - "PaymentMethodConfigurationService.CreateParamsGiropay" - ] - """ - giropay is a German payment method based on online banking, introduced in 2006. It allows customers to complete transactions online using their online banking environment, with funds debited from their bank account. Depending on their bank, customers confirm payments on giropay using a second factor of authentication or a PIN. giropay accounts for 10% of online checkouts in Germany. Check this [page](https://stripe.com/docs/payments/giropay) for more details. - """ - google_pay: NotRequired[ - "PaymentMethodConfigurationService.CreateParamsGooglePay" - ] - """ - Google Pay allows customers to make payments in your app or website using any credit or debit card saved to their Google Account, including those from Google Play, YouTube, Chrome, or an Android device. Use the Google Pay API to request any credit or debit card stored in your customer's Google account. Check this [page](https://stripe.com/docs/google-pay) for more details. - """ - gopay: NotRequired[ - "PaymentMethodConfigurationService.CreateParamsGopay" - ] - """ - GoPay is a [single use](https://stripe.com/docs/payments/payment-methods#usage) digital wallet payment method popular in Indonesia. When paying with GoPay, customers authenticate and approve payments using the Gojek app. Desktop checkout is performed by scanning a QR code. When checking out on mobile, customers are redirected to the Gojek app to confirm payment. - """ - grabpay: NotRequired[ - "PaymentMethodConfigurationService.CreateParamsGrabpay" - ] - """ - GrabPay is a payment method developed by [Grab](https://www.grab.com/sg/consumer/finance/pay/). GrabPay is a digital wallet - customers maintain a balance in their wallets that they pay out with. Check this [page](https://stripe.com/docs/payments/grabpay) for more details. - """ - id_bank_transfer: NotRequired[ - "PaymentMethodConfigurationService.CreateParamsIdBankTransfer" - ] - """ - Stripe users in Indonesia can receive bank transfers from customers in Indonesia. Bank transfers are a popular B2C and B2B payment method in Indonesia. - """ - ideal: NotRequired[ - "PaymentMethodConfigurationService.CreateParamsIdeal" - ] - """ - iDEAL is a Netherlands-based payment method that allows customers to complete transactions online using their bank credentials. All major Dutch banks are members of Currence, the scheme that operates iDEAL, making it the most popular online payment method in the Netherlands with a share of online transactions close to 55%. Check this [page](https://stripe.com/docs/payments/ideal) for more details. - """ - jcb: NotRequired["PaymentMethodConfigurationService.CreateParamsJcb"] - """ - JCB is a credit card company based in Japan. JCB is currently available in Japan to businesses approved by JCB, and available to all businesses in Australia, Canada, Hong Kong, Japan, New Zealand, Singapore, Switzerland, United Kingdom, United States, and all countries in the European Economic Area except Iceland. Check this [page](https://support.stripe.com/questions/accepting-japan-credit-bureau-%28jcb%29-payments) for more details. - """ - kakao_pay: NotRequired[ - "PaymentMethodConfigurationService.CreateParamsKakaoPay" - ] - """ - Kakao Pay is a popular local wallet available in South Korea. - """ - klarna: NotRequired[ - "PaymentMethodConfigurationService.CreateParamsKlarna" - ] - """ - Klarna gives customers a range of [payment options](https://stripe.com/docs/payments/klarna#payment-options) during checkout. Available payment options vary depending on the customer's billing address and the transaction amount. These payment options make it convenient for customers to purchase items in all price ranges. Check this [page](https://stripe.com/docs/payments/klarna) for more details. - """ - konbini: NotRequired[ - "PaymentMethodConfigurationService.CreateParamsKonbini" - ] - """ - Konbini allows customers in Japan to pay for bills and online purchases at convenience stores with cash. Check this [page](https://stripe.com/docs/payments/konbini) for more details. - """ - kr_card: NotRequired[ - "PaymentMethodConfigurationService.CreateParamsKrCard" - ] - """ - Korean cards let users pay using locally issued cards from South Korea. - """ - link: NotRequired["PaymentMethodConfigurationService.CreateParamsLink"] - """ - [Link](https://stripe.com/docs/payments/link) is a payment method network. With Link, users save their payment details once, then reuse that information to pay with one click for any business on the network. - """ - mobilepay: NotRequired[ - "PaymentMethodConfigurationService.CreateParamsMobilepay" - ] - """ - MobilePay is a [single-use](https://stripe.com/docs/payments/payment-methods#usage) card wallet payment method used in Denmark and Finland. It allows customers to [authenticate and approve](https://stripe.com/docs/payments/payment-methods#customer-actions) payments using the MobilePay app. Check this [page](https://stripe.com/docs/payments/mobilepay) for more details. - """ - multibanco: NotRequired[ - "PaymentMethodConfigurationService.CreateParamsMultibanco" - ] - """ - Stripe users in Europe and the United States can accept Multibanco payments from customers in Portugal using [Sources](https://stripe.com/docs/sources)—a single integration path for creating payments using any supported method. - """ - name: NotRequired[str] - """ - Configuration name. - """ - naver_pay: NotRequired[ - "PaymentMethodConfigurationService.CreateParamsNaverPay" - ] - """ - Naver Pay is a popular local wallet available in South Korea. - """ - nz_bank_account: NotRequired[ - "PaymentMethodConfigurationService.CreateParamsNzBankAccount" - ] - """ - Stripe users in New Zealand can accept Bulk Electronic Clearing System (BECS) direct debit payments from customers with a New Zeland bank account. Check this [page](https://stripe.com/docs/payments/nz-bank-account) for more details. - """ - oxxo: NotRequired["PaymentMethodConfigurationService.CreateParamsOxxo"] - """ - OXXO is a Mexican chain of convenience stores with thousands of locations across Latin America and represents nearly 20% of online transactions in Mexico. OXXO allows customers to pay bills and online purchases in-store with cash. Check this [page](https://stripe.com/docs/payments/oxxo) for more details. - """ - p24: NotRequired["PaymentMethodConfigurationService.CreateParamsP24"] - """ - Przelewy24 is a Poland-based payment method aggregator that allows customers to complete transactions online using bank transfers and other methods. Bank transfers account for 30% of online payments in Poland and Przelewy24 provides a way for customers to pay with over 165 banks. Check this [page](https://stripe.com/docs/payments/p24) for more details. - """ - parent: NotRequired[str] - """ - Configuration's parent configuration. Specify to create a child configuration. - """ - pay_by_bank: NotRequired[ - "PaymentMethodConfigurationService.CreateParamsPayByBank" - ] - """ - Pay by bank is a redirect payment method backed by bank transfers. A customer is redirected to their bank to authorize a bank transfer for a given amount. This removes a lot of the error risks inherent in waiting for the customer to initiate a transfer themselves, and is less expensive than card payments. - """ - payco: NotRequired[ - "PaymentMethodConfigurationService.CreateParamsPayco" - ] - """ - PAYCO is a [single-use](https://docs.stripe.com/payments/payment-methods#usage local wallet available in South Korea. - """ - paynow: NotRequired[ - "PaymentMethodConfigurationService.CreateParamsPaynow" - ] - """ - PayNow is a Singapore-based payment method that allows customers to make a payment using their preferred app from participating banks and participating non-bank financial institutions. Check this [page](https://stripe.com/docs/payments/paynow) for more details. - """ - paypal: NotRequired[ - "PaymentMethodConfigurationService.CreateParamsPaypal" - ] - """ - PayPal, a digital wallet popular with customers in Europe, allows your customers worldwide to pay using their PayPal account. Check this [page](https://stripe.com/docs/payments/paypal) for more details. - """ - paypay: NotRequired[ - "PaymentMethodConfigurationService.CreateParamsPaypay" - ] - """ - Customers can pay with PayPay online or using the PayPay app. - """ - payto: NotRequired[ - "PaymentMethodConfigurationService.CreateParamsPayto" - ] - """ - PayTo is a [real-time](https://docs.stripe.com/payments/real-time) payment method that enables customers in Australia to pay by providing their bank account details. Customers must accept a mandate authorizing you to debit their account. Check this [page](https://docs.stripe.com/payments/payto) for more details. - """ - pix: NotRequired["PaymentMethodConfigurationService.CreateParamsPix"] - """ - Pix is a payment method popular in Brazil. When paying with Pix, customers authenticate and approve payments by scanning a QR code in their preferred banking app. Check this [page](https://docs.stripe.com/payments/pix) for more details. - """ - promptpay: NotRequired[ - "PaymentMethodConfigurationService.CreateParamsPromptpay" - ] - """ - PromptPay is a Thailand-based payment method that allows customers to make a payment using their preferred app from participating banks. Check this [page](https://stripe.com/docs/payments/promptpay) for more details. - """ - qris: NotRequired["PaymentMethodConfigurationService.CreateParamsQris"] - """ - QRIS is a [real-time](https://docs.stripe.com/payments/real-time) payment method popular in Indonesia. When paying with QRIS, customers authenticate and approve payments by scanning a QR code in their preferred digital wallet app. - """ - revolut_pay: NotRequired[ - "PaymentMethodConfigurationService.CreateParamsRevolutPay" - ] - """ - Revolut Pay, developed by Revolut, a global finance app, is a digital wallet payment method. Revolut Pay uses the customer's stored balance or cards to fund the payment, and offers the option for non-Revolut customers to save their details after their first purchase. - """ - samsung_pay: NotRequired[ - "PaymentMethodConfigurationService.CreateParamsSamsungPay" - ] - """ - Samsung Pay is a [single-use](https://docs.stripe.com/payments/payment-methods#usage local wallet available in South Korea. - """ - satispay: NotRequired[ - "PaymentMethodConfigurationService.CreateParamsSatispay" - ] - """ - Satispay is a [single-use](https://docs.stripe.com/payments/payment-methods#usage) payment method where customers are required to [authenticate](https://docs.stripe.com/payments/payment-methods#customer-actions) their payment. Customers pay by being redirected from your website or app, authorizing the payment with Satispay, then returning to your website or app. You get [immediate notification](https://docs.stripe.com/payments/payment-methods#payment-notification) of whether the payment succeeded or failed. - """ - sepa_debit: NotRequired[ - "PaymentMethodConfigurationService.CreateParamsSepaDebit" - ] - """ - The [Single Euro Payments Area (SEPA)](https://en.wikipedia.org/wiki/Single_Euro_Payments_Area) is an initiative of the European Union to simplify payments within and across member countries. SEPA established and enforced banking standards to allow for the direct debiting of every EUR-denominated bank account within the SEPA region, check this [page](https://stripe.com/docs/payments/sepa-debit) for more details. - """ - shopeepay: NotRequired[ - "PaymentMethodConfigurationService.CreateParamsShopeepay" - ] - """ - ShopeePay is a [single use](https://stripe.com/docs/payments/payment-methods#usage) digital wallet payment method popular in Indonesia. When paying with GoPay, customers authenticate and approve payments using the Shopee app. Desktop checkout is performed by scanning a QR code. When checking out on mobile, customers are redirected to the Shopee app to confirm payment. - """ - sofort: NotRequired[ - "PaymentMethodConfigurationService.CreateParamsSofort" - ] - """ - Stripe users in Europe and the United States can use the [Payment Intents API](https://stripe.com/docs/payments/payment-intents)—a single integration path for creating payments using any supported method—to accept [Sofort](https://www.sofort.com/) payments from customers. Check this [page](https://stripe.com/docs/payments/sofort) for more details. - """ - swish: NotRequired[ - "PaymentMethodConfigurationService.CreateParamsSwish" - ] - """ - Swish is a [real-time](https://stripe.com/docs/payments/real-time) payment method popular in Sweden. It allows customers to [authenticate and approve](https://stripe.com/docs/payments/payment-methods#customer-actions) payments using the Swish mobile app and the Swedish BankID mobile app. Check this [page](https://stripe.com/docs/payments/swish) for more details. - """ - twint: NotRequired[ - "PaymentMethodConfigurationService.CreateParamsTwint" - ] - """ - Twint is a payment method popular in Switzerland. It allows customers to pay using their mobile phone. Check this [page](https://docs.stripe.com/payments/twint) for more details. - """ - us_bank_account: NotRequired[ - "PaymentMethodConfigurationService.CreateParamsUsBankAccount" - ] - """ - Stripe users in the United States can accept ACH direct debit payments from customers with a US bank account using the Automated Clearing House (ACH) payments system operated by Nacha. Check this [page](https://stripe.com/docs/payments/ach-direct-debit) for more details. - """ - wechat_pay: NotRequired[ - "PaymentMethodConfigurationService.CreateParamsWechatPay" - ] - """ - WeChat, owned by Tencent, is China's leading mobile app with over 1 billion monthly active users. Chinese consumers can use WeChat Pay to pay for goods and services inside of businesses' apps and websites. WeChat Pay users buy most frequently in gaming, e-commerce, travel, online education, and food/nutrition. Check this [page](https://stripe.com/docs/payments/wechat-pay) for more details. - """ - zip: NotRequired["PaymentMethodConfigurationService.CreateParamsZip"] - """ - Zip gives your customers a way to split purchases over a series of payments. Check this [page](https://stripe.com/docs/payments/zip) for more details like country availability. - """ - - class CreateParamsAcssDebit(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfigurationService.CreateParamsAcssDebitDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class CreateParamsAcssDebitDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class CreateParamsAffirm(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfigurationService.CreateParamsAffirmDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class CreateParamsAffirmDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class CreateParamsAfterpayClearpay(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfigurationService.CreateParamsAfterpayClearpayDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class CreateParamsAfterpayClearpayDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class CreateParamsAlipay(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfigurationService.CreateParamsAlipayDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class CreateParamsAlipayDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class CreateParamsAlma(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfigurationService.CreateParamsAlmaDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class CreateParamsAlmaDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class CreateParamsAmazonPay(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfigurationService.CreateParamsAmazonPayDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class CreateParamsAmazonPayDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class CreateParamsApplePay(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfigurationService.CreateParamsApplePayDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class CreateParamsApplePayDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class CreateParamsApplePayLater(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfigurationService.CreateParamsApplePayLaterDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class CreateParamsApplePayLaterDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class CreateParamsAuBecsDebit(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfigurationService.CreateParamsAuBecsDebitDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class CreateParamsAuBecsDebitDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class CreateParamsBacsDebit(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfigurationService.CreateParamsBacsDebitDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class CreateParamsBacsDebitDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class CreateParamsBancontact(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfigurationService.CreateParamsBancontactDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class CreateParamsBancontactDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class CreateParamsBillie(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfigurationService.CreateParamsBillieDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class CreateParamsBillieDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class CreateParamsBlik(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfigurationService.CreateParamsBlikDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class CreateParamsBlikDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class CreateParamsBoleto(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfigurationService.CreateParamsBoletoDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class CreateParamsBoletoDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class CreateParamsCard(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfigurationService.CreateParamsCardDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class CreateParamsCardDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class CreateParamsCartesBancaires(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfigurationService.CreateParamsCartesBancairesDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class CreateParamsCartesBancairesDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class CreateParamsCashapp(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfigurationService.CreateParamsCashappDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class CreateParamsCashappDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class CreateParamsCustomerBalance(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfigurationService.CreateParamsCustomerBalanceDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class CreateParamsCustomerBalanceDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class CreateParamsEps(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfigurationService.CreateParamsEpsDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class CreateParamsEpsDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class CreateParamsFpx(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfigurationService.CreateParamsFpxDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class CreateParamsFpxDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class CreateParamsFrMealVoucherConecs(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfigurationService.CreateParamsFrMealVoucherConecsDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class CreateParamsFrMealVoucherConecsDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class CreateParamsGiropay(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfigurationService.CreateParamsGiropayDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class CreateParamsGiropayDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class CreateParamsGooglePay(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfigurationService.CreateParamsGooglePayDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class CreateParamsGooglePayDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class CreateParamsGopay(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfigurationService.CreateParamsGopayDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class CreateParamsGopayDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class CreateParamsGrabpay(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfigurationService.CreateParamsGrabpayDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class CreateParamsGrabpayDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class CreateParamsIdBankTransfer(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfigurationService.CreateParamsIdBankTransferDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class CreateParamsIdBankTransferDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class CreateParamsIdeal(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfigurationService.CreateParamsIdealDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class CreateParamsIdealDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class CreateParamsJcb(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfigurationService.CreateParamsJcbDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class CreateParamsJcbDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class CreateParamsKakaoPay(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfigurationService.CreateParamsKakaoPayDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class CreateParamsKakaoPayDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class CreateParamsKlarna(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfigurationService.CreateParamsKlarnaDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class CreateParamsKlarnaDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class CreateParamsKonbini(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfigurationService.CreateParamsKonbiniDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class CreateParamsKonbiniDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class CreateParamsKrCard(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfigurationService.CreateParamsKrCardDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class CreateParamsKrCardDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class CreateParamsLink(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfigurationService.CreateParamsLinkDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class CreateParamsLinkDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class CreateParamsMobilepay(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfigurationService.CreateParamsMobilepayDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class CreateParamsMobilepayDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class CreateParamsMultibanco(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfigurationService.CreateParamsMultibancoDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class CreateParamsMultibancoDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class CreateParamsNaverPay(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfigurationService.CreateParamsNaverPayDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class CreateParamsNaverPayDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class CreateParamsNzBankAccount(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfigurationService.CreateParamsNzBankAccountDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class CreateParamsNzBankAccountDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class CreateParamsOxxo(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfigurationService.CreateParamsOxxoDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class CreateParamsOxxoDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class CreateParamsP24(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfigurationService.CreateParamsP24DisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class CreateParamsP24DisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class CreateParamsPayByBank(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfigurationService.CreateParamsPayByBankDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class CreateParamsPayByBankDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class CreateParamsPayco(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfigurationService.CreateParamsPaycoDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class CreateParamsPaycoDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class CreateParamsPaynow(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfigurationService.CreateParamsPaynowDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class CreateParamsPaynowDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class CreateParamsPaypal(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfigurationService.CreateParamsPaypalDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class CreateParamsPaypalDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class CreateParamsPaypay(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfigurationService.CreateParamsPaypayDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class CreateParamsPaypayDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class CreateParamsPayto(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfigurationService.CreateParamsPaytoDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class CreateParamsPaytoDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class CreateParamsPix(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfigurationService.CreateParamsPixDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class CreateParamsPixDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class CreateParamsPromptpay(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfigurationService.CreateParamsPromptpayDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class CreateParamsPromptpayDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class CreateParamsQris(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfigurationService.CreateParamsQrisDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class CreateParamsQrisDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class CreateParamsRevolutPay(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfigurationService.CreateParamsRevolutPayDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class CreateParamsRevolutPayDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class CreateParamsSamsungPay(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfigurationService.CreateParamsSamsungPayDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class CreateParamsSamsungPayDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class CreateParamsSatispay(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfigurationService.CreateParamsSatispayDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class CreateParamsSatispayDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class CreateParamsSepaDebit(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfigurationService.CreateParamsSepaDebitDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class CreateParamsSepaDebitDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class CreateParamsShopeepay(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfigurationService.CreateParamsShopeepayDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class CreateParamsShopeepayDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class CreateParamsSofort(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfigurationService.CreateParamsSofortDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class CreateParamsSofortDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class CreateParamsSwish(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfigurationService.CreateParamsSwishDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class CreateParamsSwishDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class CreateParamsTwint(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfigurationService.CreateParamsTwintDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class CreateParamsTwintDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class CreateParamsUsBankAccount(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfigurationService.CreateParamsUsBankAccountDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class CreateParamsUsBankAccountDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class CreateParamsWechatPay(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfigurationService.CreateParamsWechatPayDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class CreateParamsWechatPayDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class CreateParamsZip(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfigurationService.CreateParamsZipDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class CreateParamsZipDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class ListParams(TypedDict): - application: NotRequired["Literal['']|str"] - """ - The Connect application to filter by. - """ - 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 RetrieveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class UpdateParams(TypedDict): - acss_debit: NotRequired[ - "PaymentMethodConfigurationService.UpdateParamsAcssDebit" - ] - """ - Canadian pre-authorized debit payments, check this [page](https://stripe.com/docs/payments/acss-debit) for more details like country availability. - """ - active: NotRequired[bool] - """ - Whether the configuration can be used for new payments. - """ - affirm: NotRequired[ - "PaymentMethodConfigurationService.UpdateParamsAffirm" - ] - """ - [Affirm](https://www.affirm.com/) gives your customers a way to split purchases over a series of payments. Depending on the purchase, they can pay with four interest-free payments (Split Pay) or pay over a longer term (Installments), which might include interest. Check this [page](https://stripe.com/docs/payments/affirm) for more details like country availability. - """ - afterpay_clearpay: NotRequired[ - "PaymentMethodConfigurationService.UpdateParamsAfterpayClearpay" - ] - """ - Afterpay gives your customers a way to pay for purchases in installments, check this [page](https://stripe.com/docs/payments/afterpay-clearpay) for more details like country availability. Afterpay is particularly popular among businesses selling fashion, beauty, and sports products. - """ - alipay: NotRequired[ - "PaymentMethodConfigurationService.UpdateParamsAlipay" - ] - """ - Alipay is a digital wallet in China that has more than a billion active users worldwide. Alipay users can pay on the web or on a mobile device using login credentials or their Alipay app. Alipay has a low dispute rate and reduces fraud by authenticating payments using the customer's login credentials. Check this [page](https://stripe.com/docs/payments/alipay) for more details. - """ - alma: NotRequired["PaymentMethodConfigurationService.UpdateParamsAlma"] - """ - Alma is a Buy Now, Pay Later payment method that offers customers the ability to pay in 2, 3, or 4 installments. - """ - amazon_pay: NotRequired[ - "PaymentMethodConfigurationService.UpdateParamsAmazonPay" - ] - """ - Amazon Pay is a wallet payment method that lets your customers check out the same way as on Amazon. - """ - apple_pay: NotRequired[ - "PaymentMethodConfigurationService.UpdateParamsApplePay" - ] - """ - Stripe users can accept [Apple Pay](https://stripe.com/payments/apple-pay) in iOS applications in iOS 9 and later, and on the web in Safari starting with iOS 10 or macOS Sierra. There are no additional fees to process Apple Pay payments, and the [pricing](https://stripe.com/pricing) is the same as other card transactions. Check this [page](https://stripe.com/docs/apple-pay) for more details. - """ - apple_pay_later: NotRequired[ - "PaymentMethodConfigurationService.UpdateParamsApplePayLater" - ] - """ - Apple Pay Later, a payment method for customers to buy now and pay later, gives your customers a way to split purchases into four installments across six weeks. - """ - au_becs_debit: NotRequired[ - "PaymentMethodConfigurationService.UpdateParamsAuBecsDebit" - ] - """ - Stripe users in Australia can accept Bulk Electronic Clearing System (BECS) direct debit payments from customers with an Australian bank account. Check this [page](https://stripe.com/docs/payments/au-becs-debit) for more details. - """ - bacs_debit: NotRequired[ - "PaymentMethodConfigurationService.UpdateParamsBacsDebit" - ] - """ - Stripe users in the UK can accept Bacs Direct Debit payments from customers with a UK bank account, check this [page](https://stripe.com/docs/payments/payment-methods/bacs-debit) for more details. - """ - bancontact: NotRequired[ - "PaymentMethodConfigurationService.UpdateParamsBancontact" - ] - """ - Bancontact is the most popular online payment method in Belgium, with over 15 million cards in circulation. [Customers](https://stripe.com/docs/api/customers) use a Bancontact card or mobile app linked to a Belgian bank account to make online payments that are secure, guaranteed, and confirmed immediately. Check this [page](https://stripe.com/docs/payments/bancontact) for more details. - """ - billie: NotRequired[ - "PaymentMethodConfigurationService.UpdateParamsBillie" - ] - """ - Billie is a [single-use](https://docs.stripe.com/payments/payment-methods#usage) payment method that offers businesses Pay by Invoice where they offer payment terms ranging from 7-120 days. Customers are redirected from your website or app, authorize the payment with Billie, then return to your website or app. You get [immediate notification](https://docs.stripe.com/payments/payment-methods#payment-notification) of whether the payment succeeded or failed. - """ - blik: NotRequired["PaymentMethodConfigurationService.UpdateParamsBlik"] - """ - BLIK is a [single use](https://stripe.com/docs/payments/payment-methods#usage) payment method that requires customers to authenticate their payments. When customers want to pay online using BLIK, they request a six-digit code from their banking application and enter it into the payment collection form. Check this [page](https://stripe.com/docs/payments/blik) for more details. - """ - boleto: NotRequired[ - "PaymentMethodConfigurationService.UpdateParamsBoleto" - ] - """ - Boleto is an official (regulated by the Central Bank of Brazil) payment method in Brazil. Check this [page](https://stripe.com/docs/payments/boleto) for more details. - """ - card: NotRequired["PaymentMethodConfigurationService.UpdateParamsCard"] - """ - Cards are a popular way for consumers and businesses to pay online or in person. Stripe supports global and local card networks. - """ - cartes_bancaires: NotRequired[ - "PaymentMethodConfigurationService.UpdateParamsCartesBancaires" - ] - """ - Cartes Bancaires is France's local card network. More than 95% of these cards are co-branded with either Visa or Mastercard, meaning you can process these cards over either Cartes Bancaires or the Visa or Mastercard networks. Check this [page](https://stripe.com/docs/payments/cartes-bancaires) for more details. - """ - cashapp: NotRequired[ - "PaymentMethodConfigurationService.UpdateParamsCashapp" - ] - """ - Cash App is a popular consumer app in the US that allows customers to bank, invest, send, and receive money using their digital wallet. Check this [page](https://stripe.com/docs/payments/cash-app-pay) for more details. - """ - customer_balance: NotRequired[ - "PaymentMethodConfigurationService.UpdateParamsCustomerBalance" - ] - """ - Uses a customer's [cash balance](https://stripe.com/docs/payments/customer-balance) for the payment. The cash balance can be funded via a bank transfer. Check this [page](https://stripe.com/docs/payments/bank-transfers) for more details. - """ - eps: NotRequired["PaymentMethodConfigurationService.UpdateParamsEps"] - """ - EPS is an Austria-based payment method that allows customers to complete transactions online using their bank credentials. EPS is supported by all Austrian banks and is accepted by over 80% of Austrian online retailers. Check this [page](https://stripe.com/docs/payments/eps) for more details. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - fpx: NotRequired["PaymentMethodConfigurationService.UpdateParamsFpx"] - """ - Financial Process Exchange (FPX) is a Malaysia-based payment method that allows customers to complete transactions online using their bank credentials. Bank Negara Malaysia (BNM), the Central Bank of Malaysia, and eleven other major Malaysian financial institutions are members of the PayNet Group, which owns and operates FPX. It is one of the most popular online payment methods in Malaysia, with nearly 90 million transactions in 2018 according to BNM. Check this [page](https://stripe.com/docs/payments/fpx) for more details. - """ - fr_meal_voucher_conecs: NotRequired[ - "PaymentMethodConfigurationService.UpdateParamsFrMealVoucherConecs" - ] - """ - Meal vouchers in France, or “titres-restaurant”, is a local benefits program commonly offered by employers for their employees to purchase prepared food and beverages on working days. Check this [page](https://stripe.com/docs/payments/benefits/fr-meal-vouchers) for more details. - """ - giropay: NotRequired[ - "PaymentMethodConfigurationService.UpdateParamsGiropay" - ] - """ - giropay is a German payment method based on online banking, introduced in 2006. It allows customers to complete transactions online using their online banking environment, with funds debited from their bank account. Depending on their bank, customers confirm payments on giropay using a second factor of authentication or a PIN. giropay accounts for 10% of online checkouts in Germany. Check this [page](https://stripe.com/docs/payments/giropay) for more details. - """ - google_pay: NotRequired[ - "PaymentMethodConfigurationService.UpdateParamsGooglePay" - ] - """ - Google Pay allows customers to make payments in your app or website using any credit or debit card saved to their Google Account, including those from Google Play, YouTube, Chrome, or an Android device. Use the Google Pay API to request any credit or debit card stored in your customer's Google account. Check this [page](https://stripe.com/docs/google-pay) for more details. - """ - gopay: NotRequired[ - "PaymentMethodConfigurationService.UpdateParamsGopay" - ] - """ - GoPay is a [single use](https://stripe.com/docs/payments/payment-methods#usage) digital wallet payment method popular in Indonesia. When paying with GoPay, customers authenticate and approve payments using the Gojek app. Desktop checkout is performed by scanning a QR code. When checking out on mobile, customers are redirected to the Gojek app to confirm payment. - """ - grabpay: NotRequired[ - "PaymentMethodConfigurationService.UpdateParamsGrabpay" - ] - """ - GrabPay is a payment method developed by [Grab](https://www.grab.com/sg/consumer/finance/pay/). GrabPay is a digital wallet - customers maintain a balance in their wallets that they pay out with. Check this [page](https://stripe.com/docs/payments/grabpay) for more details. - """ - id_bank_transfer: NotRequired[ - "PaymentMethodConfigurationService.UpdateParamsIdBankTransfer" - ] - """ - Stripe users in Indonesia can receive bank transfers from customers in Indonesia. Bank transfers are a popular B2C and B2B payment method in Indonesia. - """ - ideal: NotRequired[ - "PaymentMethodConfigurationService.UpdateParamsIdeal" - ] - """ - iDEAL is a Netherlands-based payment method that allows customers to complete transactions online using their bank credentials. All major Dutch banks are members of Currence, the scheme that operates iDEAL, making it the most popular online payment method in the Netherlands with a share of online transactions close to 55%. Check this [page](https://stripe.com/docs/payments/ideal) for more details. - """ - jcb: NotRequired["PaymentMethodConfigurationService.UpdateParamsJcb"] - """ - JCB is a credit card company based in Japan. JCB is currently available in Japan to businesses approved by JCB, and available to all businesses in Australia, Canada, Hong Kong, Japan, New Zealand, Singapore, Switzerland, United Kingdom, United States, and all countries in the European Economic Area except Iceland. Check this [page](https://support.stripe.com/questions/accepting-japan-credit-bureau-%28jcb%29-payments) for more details. - """ - kakao_pay: NotRequired[ - "PaymentMethodConfigurationService.UpdateParamsKakaoPay" - ] - """ - Kakao Pay is a popular local wallet available in South Korea. - """ - klarna: NotRequired[ - "PaymentMethodConfigurationService.UpdateParamsKlarna" - ] - """ - Klarna gives customers a range of [payment options](https://stripe.com/docs/payments/klarna#payment-options) during checkout. Available payment options vary depending on the customer's billing address and the transaction amount. These payment options make it convenient for customers to purchase items in all price ranges. Check this [page](https://stripe.com/docs/payments/klarna) for more details. - """ - konbini: NotRequired[ - "PaymentMethodConfigurationService.UpdateParamsKonbini" - ] - """ - Konbini allows customers in Japan to pay for bills and online purchases at convenience stores with cash. Check this [page](https://stripe.com/docs/payments/konbini) for more details. - """ - kr_card: NotRequired[ - "PaymentMethodConfigurationService.UpdateParamsKrCard" - ] - """ - Korean cards let users pay using locally issued cards from South Korea. - """ - link: NotRequired["PaymentMethodConfigurationService.UpdateParamsLink"] - """ - [Link](https://stripe.com/docs/payments/link) is a payment method network. With Link, users save their payment details once, then reuse that information to pay with one click for any business on the network. - """ - mobilepay: NotRequired[ - "PaymentMethodConfigurationService.UpdateParamsMobilepay" - ] - """ - MobilePay is a [single-use](https://stripe.com/docs/payments/payment-methods#usage) card wallet payment method used in Denmark and Finland. It allows customers to [authenticate and approve](https://stripe.com/docs/payments/payment-methods#customer-actions) payments using the MobilePay app. Check this [page](https://stripe.com/docs/payments/mobilepay) for more details. - """ - multibanco: NotRequired[ - "PaymentMethodConfigurationService.UpdateParamsMultibanco" - ] - """ - Stripe users in Europe and the United States can accept Multibanco payments from customers in Portugal using [Sources](https://stripe.com/docs/sources)—a single integration path for creating payments using any supported method. - """ - name: NotRequired[str] - """ - Configuration name. - """ - naver_pay: NotRequired[ - "PaymentMethodConfigurationService.UpdateParamsNaverPay" - ] - """ - Naver Pay is a popular local wallet available in South Korea. - """ - nz_bank_account: NotRequired[ - "PaymentMethodConfigurationService.UpdateParamsNzBankAccount" - ] - """ - Stripe users in New Zealand can accept Bulk Electronic Clearing System (BECS) direct debit payments from customers with a New Zeland bank account. Check this [page](https://stripe.com/docs/payments/nz-bank-account) for more details. - """ - oxxo: NotRequired["PaymentMethodConfigurationService.UpdateParamsOxxo"] - """ - OXXO is a Mexican chain of convenience stores with thousands of locations across Latin America and represents nearly 20% of online transactions in Mexico. OXXO allows customers to pay bills and online purchases in-store with cash. Check this [page](https://stripe.com/docs/payments/oxxo) for more details. - """ - p24: NotRequired["PaymentMethodConfigurationService.UpdateParamsP24"] - """ - Przelewy24 is a Poland-based payment method aggregator that allows customers to complete transactions online using bank transfers and other methods. Bank transfers account for 30% of online payments in Poland and Przelewy24 provides a way for customers to pay with over 165 banks. Check this [page](https://stripe.com/docs/payments/p24) for more details. - """ - pay_by_bank: NotRequired[ - "PaymentMethodConfigurationService.UpdateParamsPayByBank" - ] - """ - Pay by bank is a redirect payment method backed by bank transfers. A customer is redirected to their bank to authorize a bank transfer for a given amount. This removes a lot of the error risks inherent in waiting for the customer to initiate a transfer themselves, and is less expensive than card payments. - """ - payco: NotRequired[ - "PaymentMethodConfigurationService.UpdateParamsPayco" - ] - """ - PAYCO is a [single-use](https://docs.stripe.com/payments/payment-methods#usage local wallet available in South Korea. - """ - paynow: NotRequired[ - "PaymentMethodConfigurationService.UpdateParamsPaynow" - ] - """ - PayNow is a Singapore-based payment method that allows customers to make a payment using their preferred app from participating banks and participating non-bank financial institutions. Check this [page](https://stripe.com/docs/payments/paynow) for more details. - """ - paypal: NotRequired[ - "PaymentMethodConfigurationService.UpdateParamsPaypal" - ] - """ - PayPal, a digital wallet popular with customers in Europe, allows your customers worldwide to pay using their PayPal account. Check this [page](https://stripe.com/docs/payments/paypal) for more details. - """ - paypay: NotRequired[ - "PaymentMethodConfigurationService.UpdateParamsPaypay" - ] - """ - Customers can pay with PayPay online or using the PayPay app. - """ - payto: NotRequired[ - "PaymentMethodConfigurationService.UpdateParamsPayto" - ] - """ - PayTo is a [real-time](https://docs.stripe.com/payments/real-time) payment method that enables customers in Australia to pay by providing their bank account details. Customers must accept a mandate authorizing you to debit their account. Check this [page](https://docs.stripe.com/payments/payto) for more details. - """ - pix: NotRequired["PaymentMethodConfigurationService.UpdateParamsPix"] - """ - Pix is a payment method popular in Brazil. When paying with Pix, customers authenticate and approve payments by scanning a QR code in their preferred banking app. Check this [page](https://docs.stripe.com/payments/pix) for more details. - """ - promptpay: NotRequired[ - "PaymentMethodConfigurationService.UpdateParamsPromptpay" - ] - """ - PromptPay is a Thailand-based payment method that allows customers to make a payment using their preferred app from participating banks. Check this [page](https://stripe.com/docs/payments/promptpay) for more details. - """ - qris: NotRequired["PaymentMethodConfigurationService.UpdateParamsQris"] - """ - QRIS is a [real-time](https://docs.stripe.com/payments/real-time) payment method popular in Indonesia. When paying with QRIS, customers authenticate and approve payments by scanning a QR code in their preferred digital wallet app. - """ - revolut_pay: NotRequired[ - "PaymentMethodConfigurationService.UpdateParamsRevolutPay" - ] - """ - Revolut Pay, developed by Revolut, a global finance app, is a digital wallet payment method. Revolut Pay uses the customer's stored balance or cards to fund the payment, and offers the option for non-Revolut customers to save their details after their first purchase. - """ - samsung_pay: NotRequired[ - "PaymentMethodConfigurationService.UpdateParamsSamsungPay" - ] - """ - Samsung Pay is a [single-use](https://docs.stripe.com/payments/payment-methods#usage local wallet available in South Korea. - """ - satispay: NotRequired[ - "PaymentMethodConfigurationService.UpdateParamsSatispay" - ] - """ - Satispay is a [single-use](https://docs.stripe.com/payments/payment-methods#usage) payment method where customers are required to [authenticate](https://docs.stripe.com/payments/payment-methods#customer-actions) their payment. Customers pay by being redirected from your website or app, authorizing the payment with Satispay, then returning to your website or app. You get [immediate notification](https://docs.stripe.com/payments/payment-methods#payment-notification) of whether the payment succeeded or failed. - """ - sepa_debit: NotRequired[ - "PaymentMethodConfigurationService.UpdateParamsSepaDebit" - ] - """ - The [Single Euro Payments Area (SEPA)](https://en.wikipedia.org/wiki/Single_Euro_Payments_Area) is an initiative of the European Union to simplify payments within and across member countries. SEPA established and enforced banking standards to allow for the direct debiting of every EUR-denominated bank account within the SEPA region, check this [page](https://stripe.com/docs/payments/sepa-debit) for more details. - """ - shopeepay: NotRequired[ - "PaymentMethodConfigurationService.UpdateParamsShopeepay" - ] - """ - ShopeePay is a [single use](https://stripe.com/docs/payments/payment-methods#usage) digital wallet payment method popular in Indonesia. When paying with GoPay, customers authenticate and approve payments using the Shopee app. Desktop checkout is performed by scanning a QR code. When checking out on mobile, customers are redirected to the Shopee app to confirm payment. - """ - sofort: NotRequired[ - "PaymentMethodConfigurationService.UpdateParamsSofort" - ] - """ - Stripe users in Europe and the United States can use the [Payment Intents API](https://stripe.com/docs/payments/payment-intents)—a single integration path for creating payments using any supported method—to accept [Sofort](https://www.sofort.com/) payments from customers. Check this [page](https://stripe.com/docs/payments/sofort) for more details. - """ - swish: NotRequired[ - "PaymentMethodConfigurationService.UpdateParamsSwish" - ] - """ - Swish is a [real-time](https://stripe.com/docs/payments/real-time) payment method popular in Sweden. It allows customers to [authenticate and approve](https://stripe.com/docs/payments/payment-methods#customer-actions) payments using the Swish mobile app and the Swedish BankID mobile app. Check this [page](https://stripe.com/docs/payments/swish) for more details. - """ - twint: NotRequired[ - "PaymentMethodConfigurationService.UpdateParamsTwint" - ] - """ - Twint is a payment method popular in Switzerland. It allows customers to pay using their mobile phone. Check this [page](https://docs.stripe.com/payments/twint) for more details. - """ - us_bank_account: NotRequired[ - "PaymentMethodConfigurationService.UpdateParamsUsBankAccount" - ] - """ - Stripe users in the United States can accept ACH direct debit payments from customers with a US bank account using the Automated Clearing House (ACH) payments system operated by Nacha. Check this [page](https://stripe.com/docs/payments/ach-direct-debit) for more details. - """ - wechat_pay: NotRequired[ - "PaymentMethodConfigurationService.UpdateParamsWechatPay" - ] - """ - WeChat, owned by Tencent, is China's leading mobile app with over 1 billion monthly active users. Chinese consumers can use WeChat Pay to pay for goods and services inside of businesses' apps and websites. WeChat Pay users buy most frequently in gaming, e-commerce, travel, online education, and food/nutrition. Check this [page](https://stripe.com/docs/payments/wechat-pay) for more details. - """ - zip: NotRequired["PaymentMethodConfigurationService.UpdateParamsZip"] - """ - Zip gives your customers a way to split purchases over a series of payments. Check this [page](https://stripe.com/docs/payments/zip) for more details like country availability. - """ - - class UpdateParamsAcssDebit(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfigurationService.UpdateParamsAcssDebitDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class UpdateParamsAcssDebitDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class UpdateParamsAffirm(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfigurationService.UpdateParamsAffirmDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class UpdateParamsAffirmDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class UpdateParamsAfterpayClearpay(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfigurationService.UpdateParamsAfterpayClearpayDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class UpdateParamsAfterpayClearpayDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class UpdateParamsAlipay(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfigurationService.UpdateParamsAlipayDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class UpdateParamsAlipayDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class UpdateParamsAlma(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfigurationService.UpdateParamsAlmaDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class UpdateParamsAlmaDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class UpdateParamsAmazonPay(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfigurationService.UpdateParamsAmazonPayDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class UpdateParamsAmazonPayDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class UpdateParamsApplePay(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfigurationService.UpdateParamsApplePayDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class UpdateParamsApplePayDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class UpdateParamsApplePayLater(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfigurationService.UpdateParamsApplePayLaterDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class UpdateParamsApplePayLaterDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class UpdateParamsAuBecsDebit(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfigurationService.UpdateParamsAuBecsDebitDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class UpdateParamsAuBecsDebitDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class UpdateParamsBacsDebit(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfigurationService.UpdateParamsBacsDebitDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class UpdateParamsBacsDebitDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class UpdateParamsBancontact(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfigurationService.UpdateParamsBancontactDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class UpdateParamsBancontactDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class UpdateParamsBillie(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfigurationService.UpdateParamsBillieDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class UpdateParamsBillieDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class UpdateParamsBlik(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfigurationService.UpdateParamsBlikDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class UpdateParamsBlikDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class UpdateParamsBoleto(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfigurationService.UpdateParamsBoletoDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class UpdateParamsBoletoDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class UpdateParamsCard(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfigurationService.UpdateParamsCardDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class UpdateParamsCardDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class UpdateParamsCartesBancaires(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfigurationService.UpdateParamsCartesBancairesDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class UpdateParamsCartesBancairesDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class UpdateParamsCashapp(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfigurationService.UpdateParamsCashappDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class UpdateParamsCashappDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class UpdateParamsCustomerBalance(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfigurationService.UpdateParamsCustomerBalanceDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class UpdateParamsCustomerBalanceDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class UpdateParamsEps(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfigurationService.UpdateParamsEpsDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class UpdateParamsEpsDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class UpdateParamsFpx(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfigurationService.UpdateParamsFpxDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class UpdateParamsFpxDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class UpdateParamsFrMealVoucherConecs(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfigurationService.UpdateParamsFrMealVoucherConecsDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class UpdateParamsFrMealVoucherConecsDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class UpdateParamsGiropay(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfigurationService.UpdateParamsGiropayDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class UpdateParamsGiropayDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class UpdateParamsGooglePay(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfigurationService.UpdateParamsGooglePayDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class UpdateParamsGooglePayDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class UpdateParamsGopay(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfigurationService.UpdateParamsGopayDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class UpdateParamsGopayDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class UpdateParamsGrabpay(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfigurationService.UpdateParamsGrabpayDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class UpdateParamsGrabpayDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class UpdateParamsIdBankTransfer(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfigurationService.UpdateParamsIdBankTransferDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class UpdateParamsIdBankTransferDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class UpdateParamsIdeal(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfigurationService.UpdateParamsIdealDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class UpdateParamsIdealDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class UpdateParamsJcb(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfigurationService.UpdateParamsJcbDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class UpdateParamsJcbDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class UpdateParamsKakaoPay(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfigurationService.UpdateParamsKakaoPayDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class UpdateParamsKakaoPayDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class UpdateParamsKlarna(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfigurationService.UpdateParamsKlarnaDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class UpdateParamsKlarnaDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class UpdateParamsKonbini(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfigurationService.UpdateParamsKonbiniDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class UpdateParamsKonbiniDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class UpdateParamsKrCard(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfigurationService.UpdateParamsKrCardDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class UpdateParamsKrCardDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class UpdateParamsLink(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfigurationService.UpdateParamsLinkDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class UpdateParamsLinkDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class UpdateParamsMobilepay(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfigurationService.UpdateParamsMobilepayDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class UpdateParamsMobilepayDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class UpdateParamsMultibanco(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfigurationService.UpdateParamsMultibancoDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class UpdateParamsMultibancoDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class UpdateParamsNaverPay(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfigurationService.UpdateParamsNaverPayDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class UpdateParamsNaverPayDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class UpdateParamsNzBankAccount(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfigurationService.UpdateParamsNzBankAccountDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class UpdateParamsNzBankAccountDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class UpdateParamsOxxo(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfigurationService.UpdateParamsOxxoDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class UpdateParamsOxxoDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class UpdateParamsP24(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfigurationService.UpdateParamsP24DisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class UpdateParamsP24DisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class UpdateParamsPayByBank(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfigurationService.UpdateParamsPayByBankDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class UpdateParamsPayByBankDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class UpdateParamsPayco(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfigurationService.UpdateParamsPaycoDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class UpdateParamsPaycoDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class UpdateParamsPaynow(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfigurationService.UpdateParamsPaynowDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class UpdateParamsPaynowDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class UpdateParamsPaypal(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfigurationService.UpdateParamsPaypalDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class UpdateParamsPaypalDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class UpdateParamsPaypay(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfigurationService.UpdateParamsPaypayDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class UpdateParamsPaypayDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class UpdateParamsPayto(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfigurationService.UpdateParamsPaytoDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class UpdateParamsPaytoDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class UpdateParamsPix(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfigurationService.UpdateParamsPixDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class UpdateParamsPixDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class UpdateParamsPromptpay(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfigurationService.UpdateParamsPromptpayDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class UpdateParamsPromptpayDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class UpdateParamsQris(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfigurationService.UpdateParamsQrisDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class UpdateParamsQrisDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class UpdateParamsRevolutPay(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfigurationService.UpdateParamsRevolutPayDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class UpdateParamsRevolutPayDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class UpdateParamsSamsungPay(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfigurationService.UpdateParamsSamsungPayDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class UpdateParamsSamsungPayDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class UpdateParamsSatispay(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfigurationService.UpdateParamsSatispayDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class UpdateParamsSatispayDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class UpdateParamsSepaDebit(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfigurationService.UpdateParamsSepaDebitDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class UpdateParamsSepaDebitDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class UpdateParamsShopeepay(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfigurationService.UpdateParamsShopeepayDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class UpdateParamsShopeepayDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class UpdateParamsSofort(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfigurationService.UpdateParamsSofortDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class UpdateParamsSofortDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class UpdateParamsSwish(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfigurationService.UpdateParamsSwishDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class UpdateParamsSwishDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class UpdateParamsTwint(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfigurationService.UpdateParamsTwintDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class UpdateParamsTwintDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class UpdateParamsUsBankAccount(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfigurationService.UpdateParamsUsBankAccountDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class UpdateParamsUsBankAccountDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class UpdateParamsWechatPay(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfigurationService.UpdateParamsWechatPayDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class UpdateParamsWechatPayDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - - class UpdateParamsZip(TypedDict): - display_preference: NotRequired[ - "PaymentMethodConfigurationService.UpdateParamsZipDisplayPreference" - ] - """ - Whether or not the payment method should be displayed. - """ - - class UpdateParamsZipDisplayPreference(TypedDict): - preference: NotRequired[Literal["none", "off", "on"]] - """ - The account's preference for whether or not to display this payment method. - """ - def list( self, - params: Optional[ - "PaymentMethodConfigurationService.ListParams" - ] = None, + params: Optional["PaymentMethodConfigurationListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[PaymentMethodConfiguration]: """ @@ -2401,9 +45,7 @@ def list( async def list_async( self, - params: Optional[ - "PaymentMethodConfigurationService.ListParams" - ] = None, + params: Optional["PaymentMethodConfigurationListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[PaymentMethodConfiguration]: """ @@ -2422,9 +64,7 @@ async def list_async( def create( self, - params: Optional[ - "PaymentMethodConfigurationService.CreateParams" - ] = None, + params: Optional["PaymentMethodConfigurationCreateParams"] = None, options: Optional[RequestOptions] = None, ) -> PaymentMethodConfiguration: """ @@ -2443,9 +83,7 @@ def create( async def create_async( self, - params: Optional[ - "PaymentMethodConfigurationService.CreateParams" - ] = None, + params: Optional["PaymentMethodConfigurationCreateParams"] = None, options: Optional[RequestOptions] = None, ) -> PaymentMethodConfiguration: """ @@ -2465,9 +103,7 @@ async def create_async( def retrieve( self, configuration: str, - params: Optional[ - "PaymentMethodConfigurationService.RetrieveParams" - ] = None, + params: Optional["PaymentMethodConfigurationRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> PaymentMethodConfiguration: """ @@ -2489,9 +125,7 @@ def retrieve( async def retrieve_async( self, configuration: str, - params: Optional[ - "PaymentMethodConfigurationService.RetrieveParams" - ] = None, + params: Optional["PaymentMethodConfigurationRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> PaymentMethodConfiguration: """ @@ -2513,9 +147,7 @@ async def retrieve_async( def update( self, configuration: str, - params: Optional[ - "PaymentMethodConfigurationService.UpdateParams" - ] = None, + params: Optional["PaymentMethodConfigurationUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> PaymentMethodConfiguration: """ @@ -2537,9 +169,7 @@ def update( async def update_async( self, configuration: str, - params: Optional[ - "PaymentMethodConfigurationService.UpdateParams" - ] = None, + params: Optional["PaymentMethodConfigurationUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> PaymentMethodConfiguration: """ diff --git a/stripe/_payment_method_domain.py b/stripe/_payment_method_domain.py index 78f636b50..bf61a3fc9 100644 --- a/stripe/_payment_method_domain.py +++ b/stripe/_payment_method_domain.py @@ -3,12 +3,28 @@ from stripe._createable_api_resource import CreateableAPIResource from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource -from stripe._request_options import RequestOptions from stripe._stripe_object import StripeObject from stripe._updateable_api_resource import UpdateableAPIResource from stripe._util import class_method_variant, sanitize_id -from typing import ClassVar, List, Optional, cast, overload -from typing_extensions import Literal, NotRequired, Unpack +from typing import ClassVar, Optional, cast, overload +from typing_extensions import Literal, Unpack, TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params._payment_method_domain_create_params import ( + PaymentMethodDomainCreateParams, + ) + from stripe.params._payment_method_domain_list_params import ( + PaymentMethodDomainListParams, + ) + from stripe.params._payment_method_domain_modify_params import ( + PaymentMethodDomainModifyParams, + ) + from stripe.params._payment_method_domain_retrieve_params import ( + PaymentMethodDomainRetrieveParams, + ) + from stripe.params._payment_method_domain_validate_params import ( + PaymentMethodDomainValidateParams, + ) class PaymentMethodDomain( @@ -129,68 +145,6 @@ class StatusDetails(StripeObject): """ _inner_class_types = {"status_details": StatusDetails} - class CreateParams(RequestOptions): - domain_name: str - """ - The domain name that this payment method domain object represents. - """ - enabled: NotRequired[bool] - """ - Whether this payment method domain is enabled. If the domain is not enabled, payment methods that require a payment method domain will not appear in Elements or Embedded Checkout. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class ListParams(RequestOptions): - domain_name: NotRequired[str] - """ - The domain name that this payment method domain object represents. - """ - enabled: NotRequired[bool] - """ - Whether this payment method domain is enabled. If the domain is not enabled, payment methods will not appear in Elements or Embedded Checkout - """ - 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 ModifyParams(RequestOptions): - enabled: NotRequired[bool] - """ - Whether this payment method domain is enabled. If the domain is not enabled, payment methods that require a payment method domain will not appear in Elements or Embedded Checkout. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class RetrieveParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class ValidateParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - amazon_pay: AmazonPay """ Indicates the status of a specific payment method on a payment method domain. @@ -242,7 +196,7 @@ class ValidateParams(RequestOptions): @classmethod def create( - cls, **params: Unpack["PaymentMethodDomain.CreateParams"] + cls, **params: Unpack["PaymentMethodDomainCreateParams"] ) -> "PaymentMethodDomain": """ Creates a payment method domain. @@ -258,7 +212,7 @@ def create( @classmethod async def create_async( - cls, **params: Unpack["PaymentMethodDomain.CreateParams"] + cls, **params: Unpack["PaymentMethodDomainCreateParams"] ) -> "PaymentMethodDomain": """ Creates a payment method domain. @@ -274,7 +228,7 @@ async def create_async( @classmethod def list( - cls, **params: Unpack["PaymentMethodDomain.ListParams"] + cls, **params: Unpack["PaymentMethodDomainListParams"] ) -> ListObject["PaymentMethodDomain"]: """ Lists the details of existing payment method domains. @@ -294,7 +248,7 @@ def list( @classmethod async def list_async( - cls, **params: Unpack["PaymentMethodDomain.ListParams"] + cls, **params: Unpack["PaymentMethodDomainListParams"] ) -> ListObject["PaymentMethodDomain"]: """ Lists the details of existing payment method domains. @@ -314,7 +268,7 @@ async def list_async( @classmethod def modify( - cls, id: str, **params: Unpack["PaymentMethodDomain.ModifyParams"] + cls, id: str, **params: Unpack["PaymentMethodDomainModifyParams"] ) -> "PaymentMethodDomain": """ Updates an existing payment method domain. @@ -331,7 +285,7 @@ def modify( @classmethod async def modify_async( - cls, id: str, **params: Unpack["PaymentMethodDomain.ModifyParams"] + cls, id: str, **params: Unpack["PaymentMethodDomainModifyParams"] ) -> "PaymentMethodDomain": """ Updates an existing payment method domain. @@ -348,7 +302,7 @@ async def modify_async( @classmethod def retrieve( - cls, id: str, **params: Unpack["PaymentMethodDomain.RetrieveParams"] + cls, id: str, **params: Unpack["PaymentMethodDomainRetrieveParams"] ) -> "PaymentMethodDomain": """ Retrieves the details of an existing payment method domain. @@ -359,7 +313,7 @@ def retrieve( @classmethod async def retrieve_async( - cls, id: str, **params: Unpack["PaymentMethodDomain.RetrieveParams"] + cls, id: str, **params: Unpack["PaymentMethodDomainRetrieveParams"] ) -> "PaymentMethodDomain": """ Retrieves the details of an existing payment method domain. @@ -372,7 +326,7 @@ async def retrieve_async( def _cls_validate( cls, payment_method_domain: str, - **params: Unpack["PaymentMethodDomain.ValidateParams"], + **params: Unpack["PaymentMethodDomainValidateParams"], ) -> "PaymentMethodDomain": """ Some payment methods might require additional steps to register a domain. If the requirements weren't satisfied when the domain was created, the payment method will be inactive on the domain. @@ -397,7 +351,7 @@ def _cls_validate( @staticmethod def validate( payment_method_domain: str, - **params: Unpack["PaymentMethodDomain.ValidateParams"], + **params: Unpack["PaymentMethodDomainValidateParams"], ) -> "PaymentMethodDomain": """ Some payment methods might require additional steps to register a domain. If the requirements weren't satisfied when the domain was created, the payment method will be inactive on the domain. @@ -411,7 +365,7 @@ def validate( @overload def validate( - self, **params: Unpack["PaymentMethodDomain.ValidateParams"] + self, **params: Unpack["PaymentMethodDomainValidateParams"] ) -> "PaymentMethodDomain": """ Some payment methods might require additional steps to register a domain. If the requirements weren't satisfied when the domain was created, the payment method will be inactive on the domain. @@ -425,7 +379,7 @@ def validate( @class_method_variant("_cls_validate") def validate( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["PaymentMethodDomain.ValidateParams"] + self, **params: Unpack["PaymentMethodDomainValidateParams"] ) -> "PaymentMethodDomain": """ Some payment methods might require additional steps to register a domain. If the requirements weren't satisfied when the domain was created, the payment method will be inactive on the domain. @@ -450,7 +404,7 @@ def validate( # pyright: ignore[reportGeneralTypeIssues] async def _cls_validate_async( cls, payment_method_domain: str, - **params: Unpack["PaymentMethodDomain.ValidateParams"], + **params: Unpack["PaymentMethodDomainValidateParams"], ) -> "PaymentMethodDomain": """ Some payment methods might require additional steps to register a domain. If the requirements weren't satisfied when the domain was created, the payment method will be inactive on the domain. @@ -475,7 +429,7 @@ async def _cls_validate_async( @staticmethod async def validate_async( payment_method_domain: str, - **params: Unpack["PaymentMethodDomain.ValidateParams"], + **params: Unpack["PaymentMethodDomainValidateParams"], ) -> "PaymentMethodDomain": """ Some payment methods might require additional steps to register a domain. If the requirements weren't satisfied when the domain was created, the payment method will be inactive on the domain. @@ -489,7 +443,7 @@ async def validate_async( @overload async def validate_async( - self, **params: Unpack["PaymentMethodDomain.ValidateParams"] + self, **params: Unpack["PaymentMethodDomainValidateParams"] ) -> "PaymentMethodDomain": """ Some payment methods might require additional steps to register a domain. If the requirements weren't satisfied when the domain was created, the payment method will be inactive on the domain. @@ -503,7 +457,7 @@ async def validate_async( @class_method_variant("_cls_validate_async") async def validate_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["PaymentMethodDomain.ValidateParams"] + self, **params: Unpack["PaymentMethodDomainValidateParams"] ) -> "PaymentMethodDomain": """ Some payment methods might require additional steps to register a domain. If the requirements weren't satisfied when the domain was created, the payment method will be inactive on the domain. diff --git a/stripe/_payment_method_domain_service.py b/stripe/_payment_method_domain_service.py index 4e0948cd2..a45a74502 100644 --- a/stripe/_payment_method_domain_service.py +++ b/stripe/_payment_method_domain_service.py @@ -5,76 +5,31 @@ from stripe._request_options import RequestOptions from stripe._stripe_service import StripeService from stripe._util import sanitize_id -from typing import List, Optional, cast -from typing_extensions import NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params._payment_method_domain_create_params import ( + PaymentMethodDomainCreateParams, + ) + from stripe.params._payment_method_domain_list_params import ( + PaymentMethodDomainListParams, + ) + from stripe.params._payment_method_domain_retrieve_params import ( + PaymentMethodDomainRetrieveParams, + ) + from stripe.params._payment_method_domain_update_params import ( + PaymentMethodDomainUpdateParams, + ) + from stripe.params._payment_method_domain_validate_params import ( + PaymentMethodDomainValidateParams, + ) class PaymentMethodDomainService(StripeService): - class CreateParams(TypedDict): - domain_name: str - """ - The domain name that this payment method domain object represents. - """ - enabled: NotRequired[bool] - """ - Whether this payment method domain is enabled. If the domain is not enabled, payment methods that require a payment method domain will not appear in Elements or Embedded Checkout. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class ListParams(TypedDict): - domain_name: NotRequired[str] - """ - The domain name that this payment method domain object represents. - """ - enabled: NotRequired[bool] - """ - Whether this payment method domain is enabled. If the domain is not enabled, payment methods will not appear in Elements or Embedded Checkout - """ - 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 RetrieveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class UpdateParams(TypedDict): - enabled: NotRequired[bool] - """ - Whether this payment method domain is enabled. If the domain is not enabled, payment methods that require a payment method domain will not appear in Elements or Embedded Checkout. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class ValidateParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - def list( self, - params: Optional["PaymentMethodDomainService.ListParams"] = None, + params: Optional["PaymentMethodDomainListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[PaymentMethodDomain]: """ @@ -93,7 +48,7 @@ def list( async def list_async( self, - params: Optional["PaymentMethodDomainService.ListParams"] = None, + params: Optional["PaymentMethodDomainListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[PaymentMethodDomain]: """ @@ -112,7 +67,7 @@ async def list_async( def create( self, - params: "PaymentMethodDomainService.CreateParams", + params: "PaymentMethodDomainCreateParams", options: Optional[RequestOptions] = None, ) -> PaymentMethodDomain: """ @@ -131,7 +86,7 @@ def create( async def create_async( self, - params: "PaymentMethodDomainService.CreateParams", + params: "PaymentMethodDomainCreateParams", options: Optional[RequestOptions] = None, ) -> PaymentMethodDomain: """ @@ -151,7 +106,7 @@ async def create_async( def retrieve( self, payment_method_domain: str, - params: Optional["PaymentMethodDomainService.RetrieveParams"] = None, + params: Optional["PaymentMethodDomainRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> PaymentMethodDomain: """ @@ -173,7 +128,7 @@ def retrieve( async def retrieve_async( self, payment_method_domain: str, - params: Optional["PaymentMethodDomainService.RetrieveParams"] = None, + params: Optional["PaymentMethodDomainRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> PaymentMethodDomain: """ @@ -195,7 +150,7 @@ async def retrieve_async( def update( self, payment_method_domain: str, - params: Optional["PaymentMethodDomainService.UpdateParams"] = None, + params: Optional["PaymentMethodDomainUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> PaymentMethodDomain: """ @@ -217,7 +172,7 @@ def update( async def update_async( self, payment_method_domain: str, - params: Optional["PaymentMethodDomainService.UpdateParams"] = None, + params: Optional["PaymentMethodDomainUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> PaymentMethodDomain: """ @@ -239,7 +194,7 @@ async def update_async( def validate( self, payment_method_domain: str, - params: Optional["PaymentMethodDomainService.ValidateParams"] = None, + params: Optional["PaymentMethodDomainValidateParams"] = None, options: Optional[RequestOptions] = None, ) -> PaymentMethodDomain: """ @@ -266,7 +221,7 @@ def validate( async def validate_async( self, payment_method_domain: str, - params: Optional["PaymentMethodDomainService.ValidateParams"] = None, + params: Optional["PaymentMethodDomainValidateParams"] = None, options: Optional[RequestOptions] = None, ) -> PaymentMethodDomain: """ diff --git a/stripe/_payment_method_service.py b/stripe/_payment_method_service.py index eba6f7ae9..2f1273dda 100644 --- a/stripe/_payment_method_service.py +++ b/stripe/_payment_method_service.py @@ -5,1117 +5,34 @@ from stripe._request_options import RequestOptions from stripe._stripe_service import StripeService from stripe._util import sanitize_id -from typing import Dict, List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params._payment_method_attach_params import ( + PaymentMethodAttachParams, + ) + from stripe.params._payment_method_create_params import ( + PaymentMethodCreateParams, + ) + from stripe.params._payment_method_detach_params import ( + PaymentMethodDetachParams, + ) + from stripe.params._payment_method_list_params import ( + PaymentMethodListParams, + ) + from stripe.params._payment_method_retrieve_params import ( + PaymentMethodRetrieveParams, + ) + from stripe.params._payment_method_update_params import ( + PaymentMethodUpdateParams, + ) class PaymentMethodService(StripeService): - class AttachParams(TypedDict): - customer: NotRequired[str] - """ - The ID of the customer to which to attach the PaymentMethod. - """ - customer_account: NotRequired[str] - """ - The ID of the account to which to attach the PaymentMethod. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class CreateParams(TypedDict): - acss_debit: NotRequired["PaymentMethodService.CreateParamsAcssDebit"] - """ - If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method. - """ - affirm: NotRequired["PaymentMethodService.CreateParamsAffirm"] - """ - If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method. - """ - afterpay_clearpay: NotRequired[ - "PaymentMethodService.CreateParamsAfterpayClearpay" - ] - """ - If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method. - """ - alipay: NotRequired["PaymentMethodService.CreateParamsAlipay"] - """ - If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. - """ - allow_redisplay: NotRequired[ - Literal["always", "limited", "unspecified"] - ] - """ - This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`. - """ - alma: NotRequired["PaymentMethodService.CreateParamsAlma"] - """ - If this is a Alma PaymentMethod, this hash contains details about the Alma payment method. - """ - amazon_pay: NotRequired["PaymentMethodService.CreateParamsAmazonPay"] - """ - If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method. - """ - au_becs_debit: NotRequired[ - "PaymentMethodService.CreateParamsAuBecsDebit" - ] - """ - If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. - """ - bacs_debit: NotRequired["PaymentMethodService.CreateParamsBacsDebit"] - """ - If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account. - """ - bancontact: NotRequired["PaymentMethodService.CreateParamsBancontact"] - """ - If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method. - """ - billie: NotRequired["PaymentMethodService.CreateParamsBillie"] - """ - If this is a `billie` PaymentMethod, this hash contains details about the Billie payment method. - """ - billing_details: NotRequired[ - "PaymentMethodService.CreateParamsBillingDetails" - ] - """ - Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. - """ - blik: NotRequired["PaymentMethodService.CreateParamsBlik"] - """ - If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method. - """ - boleto: NotRequired["PaymentMethodService.CreateParamsBoleto"] - """ - If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method. - """ - card: NotRequired["PaymentMethodService.CreateParamsCard"] - """ - If this is a `card` PaymentMethod, this hash contains the user's card details. For backwards compatibility, you can alternatively provide a Stripe token (e.g., for Apple Pay, Amex Express Checkout, or legacy Checkout) into the card hash with format `card: {token: "tok_visa"}`. When providing a card number, you must meet the requirements for [PCI compliance](https://stripe.com/docs/security#validating-pci-compliance). We strongly recommend using Stripe.js instead of interacting with this API directly. - """ - cashapp: NotRequired["PaymentMethodService.CreateParamsCashapp"] - """ - If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. - """ - crypto: NotRequired["PaymentMethodService.CreateParamsCrypto"] - """ - If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment method. - """ - customer: NotRequired[str] - """ - The `Customer` to whom the original PaymentMethod is attached. - """ - customer_balance: NotRequired[ - "PaymentMethodService.CreateParamsCustomerBalance" - ] - """ - If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. - """ - eps: NotRequired["PaymentMethodService.CreateParamsEps"] - """ - If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - fpx: NotRequired["PaymentMethodService.CreateParamsFpx"] - """ - If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method. - """ - giropay: NotRequired["PaymentMethodService.CreateParamsGiropay"] - """ - If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method. - """ - gopay: NotRequired["PaymentMethodService.CreateParamsGopay"] - """ - If this is a Gopay PaymentMethod, this hash contains details about the Gopay payment method. - """ - grabpay: NotRequired["PaymentMethodService.CreateParamsGrabpay"] - """ - If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method. - """ - id_bank_transfer: NotRequired[ - "PaymentMethodService.CreateParamsIdBankTransfer" - ] - """ - If this is an `IdBankTransfer` PaymentMethod, this hash contains details about the IdBankTransfer payment method. - """ - ideal: NotRequired["PaymentMethodService.CreateParamsIdeal"] - """ - If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. - """ - interac_present: NotRequired[ - "PaymentMethodService.CreateParamsInteracPresent" - ] - """ - If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. - """ - kakao_pay: NotRequired["PaymentMethodService.CreateParamsKakaoPay"] - """ - If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method. - """ - klarna: NotRequired["PaymentMethodService.CreateParamsKlarna"] - """ - If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method. - """ - konbini: NotRequired["PaymentMethodService.CreateParamsKonbini"] - """ - If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. - """ - kr_card: NotRequired["PaymentMethodService.CreateParamsKrCard"] - """ - If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method. - """ - link: NotRequired["PaymentMethodService.CreateParamsLink"] - """ - If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. - """ - mb_way: NotRequired["PaymentMethodService.CreateParamsMbWay"] - """ - If this is a MB WAY PaymentMethod, this hash contains details about the MB WAY payment method. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - mobilepay: NotRequired["PaymentMethodService.CreateParamsMobilepay"] - """ - If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method. - """ - multibanco: NotRequired["PaymentMethodService.CreateParamsMultibanco"] - """ - If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method. - """ - naver_pay: NotRequired["PaymentMethodService.CreateParamsNaverPay"] - """ - If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method. - """ - nz_bank_account: NotRequired[ - "PaymentMethodService.CreateParamsNzBankAccount" - ] - """ - If this is an nz_bank_account PaymentMethod, this hash contains details about the nz_bank_account payment method. - """ - oxxo: NotRequired["PaymentMethodService.CreateParamsOxxo"] - """ - If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. - """ - p24: NotRequired["PaymentMethodService.CreateParamsP24"] - """ - If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. - """ - pay_by_bank: NotRequired["PaymentMethodService.CreateParamsPayByBank"] - """ - If this is a `pay_by_bank` PaymentMethod, this hash contains details about the PayByBank payment method. - """ - payco: NotRequired["PaymentMethodService.CreateParamsPayco"] - """ - If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method. - """ - payment_method: NotRequired[str] - """ - The PaymentMethod to share. - """ - paynow: NotRequired["PaymentMethodService.CreateParamsPaynow"] - """ - If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method. - """ - paypal: NotRequired["PaymentMethodService.CreateParamsPaypal"] - """ - If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method. - """ - paypay: NotRequired["PaymentMethodService.CreateParamsPaypay"] - """ - If this is a `paypay` PaymentMethod, this hash contains details about the PayPay payment method. - """ - payto: NotRequired["PaymentMethodService.CreateParamsPayto"] - """ - If this is a `payto` PaymentMethod, this hash contains details about the PayTo payment method. - """ - pix: NotRequired["PaymentMethodService.CreateParamsPix"] - """ - If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method. - """ - promptpay: NotRequired["PaymentMethodService.CreateParamsPromptpay"] - """ - If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method. - """ - qris: NotRequired["PaymentMethodService.CreateParamsQris"] - """ - If this is a `qris` PaymentMethod, this hash contains details about the QRIS payment method. - """ - radar_options: NotRequired[ - "PaymentMethodService.CreateParamsRadarOptions" - ] - """ - Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. - """ - rechnung: NotRequired["PaymentMethodService.CreateParamsRechnung"] - """ - If this is a `rechnung` PaymentMethod, this hash contains details about the Rechnung payment method. - """ - revolut_pay: NotRequired["PaymentMethodService.CreateParamsRevolutPay"] - """ - If this is a `revolut_pay` PaymentMethod, this hash contains details about the Revolut Pay payment method. - """ - samsung_pay: NotRequired["PaymentMethodService.CreateParamsSamsungPay"] - """ - If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method. - """ - satispay: NotRequired["PaymentMethodService.CreateParamsSatispay"] - """ - If this is a `satispay` PaymentMethod, this hash contains details about the Satispay payment method. - """ - sepa_debit: NotRequired["PaymentMethodService.CreateParamsSepaDebit"] - """ - If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. - """ - shopeepay: NotRequired["PaymentMethodService.CreateParamsShopeepay"] - """ - If this is a Shopeepay PaymentMethod, this hash contains details about the Shopeepay payment method. - """ - sofort: NotRequired["PaymentMethodService.CreateParamsSofort"] - """ - If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. - """ - stripe_balance: NotRequired[ - "PaymentMethodService.CreateParamsStripeBalance" - ] - """ - This hash contains details about the Stripe balance payment method. - """ - swish: NotRequired["PaymentMethodService.CreateParamsSwish"] - """ - If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method. - """ - twint: NotRequired["PaymentMethodService.CreateParamsTwint"] - """ - If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method. - """ - type: NotRequired[ - Literal[ - "acss_debit", - "affirm", - "afterpay_clearpay", - "alipay", - "alma", - "amazon_pay", - "au_becs_debit", - "bacs_debit", - "bancontact", - "billie", - "blik", - "boleto", - "card", - "cashapp", - "crypto", - "customer_balance", - "eps", - "fpx", - "giropay", - "gopay", - "grabpay", - "id_bank_transfer", - "ideal", - "kakao_pay", - "klarna", - "konbini", - "kr_card", - "link", - "mb_way", - "mobilepay", - "multibanco", - "naver_pay", - "nz_bank_account", - "oxxo", - "p24", - "pay_by_bank", - "payco", - "paynow", - "paypal", - "paypay", - "payto", - "pix", - "promptpay", - "qris", - "rechnung", - "revolut_pay", - "samsung_pay", - "satispay", - "sepa_debit", - "shopeepay", - "sofort", - "stripe_balance", - "swish", - "twint", - "us_bank_account", - "wechat_pay", - "zip", - ] - ] - """ - The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. - """ - us_bank_account: NotRequired[ - "PaymentMethodService.CreateParamsUsBankAccount" - ] - """ - If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. - """ - wechat_pay: NotRequired["PaymentMethodService.CreateParamsWechatPay"] - """ - If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method. - """ - zip: NotRequired["PaymentMethodService.CreateParamsZip"] - """ - If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method. - """ - - class CreateParamsAcssDebit(TypedDict): - account_number: str - """ - Customer's bank account number. - """ - institution_number: str - """ - Institution number of the customer's bank. - """ - transit_number: str - """ - Transit number of the customer's bank. - """ - - class CreateParamsAffirm(TypedDict): - pass - - class CreateParamsAfterpayClearpay(TypedDict): - pass - - class CreateParamsAlipay(TypedDict): - pass - - class CreateParamsAlma(TypedDict): - pass - - class CreateParamsAmazonPay(TypedDict): - pass - - class CreateParamsAuBecsDebit(TypedDict): - account_number: str - """ - The account number for the bank account. - """ - bsb_number: str - """ - Bank-State-Branch number of the bank account. - """ - - class CreateParamsBacsDebit(TypedDict): - account_number: NotRequired[str] - """ - Account number of the bank account that the funds will be debited from. - """ - sort_code: NotRequired[str] - """ - Sort code of the bank account. (e.g., `10-20-30`) - """ - - class CreateParamsBancontact(TypedDict): - pass - - class CreateParamsBillie(TypedDict): - pass - - class CreateParamsBillingDetails(TypedDict): - address: NotRequired[ - "Literal['']|PaymentMethodService.CreateParamsBillingDetailsAddress" - ] - """ - Billing address. - """ - email: NotRequired["Literal['']|str"] - """ - Email address. - """ - name: NotRequired["Literal['']|str"] - """ - Full name. - """ - phone: NotRequired["Literal['']|str"] - """ - Billing phone number (including extension). - """ - tax_id: NotRequired[str] - """ - Taxpayer identification number. Used only for transactions between LATAM buyers and non-LATAM sellers. - """ - - class CreateParamsBillingDetailsAddress(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. - """ - - class CreateParamsBlik(TypedDict): - pass - - class CreateParamsBoleto(TypedDict): - tax_id: str - """ - The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers) - """ - - class CreateParamsCard(TypedDict): - cvc: NotRequired[str] - """ - The card's CVC. It is highly recommended to always include this value. - """ - exp_month: NotRequired[int] - """ - Two-digit number representing the card's expiration month. - """ - exp_year: NotRequired[int] - """ - Four-digit number representing the card's expiration year. - """ - networks: NotRequired["PaymentMethodService.CreateParamsCardNetworks"] - """ - Contains information about card networks used to process the payment. - """ - number: NotRequired[str] - """ - The card number, as a string without any separators. - """ - token: NotRequired[str] - """ - For backwards compatibility, you can alternatively provide a Stripe token (e.g., for Apple Pay, Amex Express Checkout, or legacy Checkout) into the card hash with format card: {token: "tok_visa"}. - """ - - class CreateParamsCardNetworks(TypedDict): - preferred: NotRequired[ - Literal["cartes_bancaires", "mastercard", "visa"] - ] - """ - The customer's preferred card network for co-branded cards. Supports `cartes_bancaires`, `mastercard`, or `visa`. Selection of a network that does not apply to the card will be stored as `invalid_preference` on the card. - """ - - class CreateParamsCashapp(TypedDict): - pass - - class CreateParamsCrypto(TypedDict): - pass - - class CreateParamsCustomerBalance(TypedDict): - pass - - class CreateParamsEps(TypedDict): - bank: NotRequired[ - Literal[ - "arzte_und_apotheker_bank", - "austrian_anadi_bank_ag", - "bank_austria", - "bankhaus_carl_spangler", - "bankhaus_schelhammer_und_schattera_ag", - "bawag_psk_ag", - "bks_bank_ag", - "brull_kallmus_bank_ag", - "btv_vier_lander_bank", - "capital_bank_grawe_gruppe_ag", - "deutsche_bank_ag", - "dolomitenbank", - "easybank_ag", - "erste_bank_und_sparkassen", - "hypo_alpeadriabank_international_ag", - "hypo_bank_burgenland_aktiengesellschaft", - "hypo_noe_lb_fur_niederosterreich_u_wien", - "hypo_oberosterreich_salzburg_steiermark", - "hypo_tirol_bank_ag", - "hypo_vorarlberg_bank_ag", - "marchfelder_bank", - "oberbank_ag", - "raiffeisen_bankengruppe_osterreich", - "schoellerbank_ag", - "sparda_bank_wien", - "volksbank_gruppe", - "volkskreditbank_ag", - "vr_bank_braunau", - ] - ] - """ - The customer's bank. - """ - - class CreateParamsFpx(TypedDict): - account_holder_type: NotRequired[Literal["company", "individual"]] - """ - Account holder type for FPX transaction - """ - bank: Literal[ - "affin_bank", - "agrobank", - "alliance_bank", - "ambank", - "bank_islam", - "bank_muamalat", - "bank_of_china", - "bank_rakyat", - "bsn", - "cimb", - "deutsche_bank", - "hong_leong_bank", - "hsbc", - "kfh", - "maybank2e", - "maybank2u", - "ocbc", - "pb_enterprise", - "public_bank", - "rhb", - "standard_chartered", - "uob", - ] - """ - The customer's bank. - """ - - class CreateParamsGiropay(TypedDict): - pass - - class CreateParamsGopay(TypedDict): - pass - - class CreateParamsGrabpay(TypedDict): - pass - - class CreateParamsIdBankTransfer(TypedDict): - bank: NotRequired[Literal["bca", "bni", "bri", "cimb", "permata"]] - """ - Bank where the account is held. - """ - - class CreateParamsIdeal(TypedDict): - bank: NotRequired[ - Literal[ - "abn_amro", - "asn_bank", - "bunq", - "buut", - "handelsbanken", - "ing", - "knab", - "moneyou", - "n26", - "nn", - "rabobank", - "regiobank", - "revolut", - "sns_bank", - "triodos_bank", - "van_lanschot", - "yoursafe", - ] - ] - """ - The customer's bank. Only use this parameter for existing customers. Don't use it for new customers. - """ - - class CreateParamsInteracPresent(TypedDict): - pass - - class CreateParamsKakaoPay(TypedDict): - pass - - class CreateParamsKlarna(TypedDict): - dob: NotRequired["PaymentMethodService.CreateParamsKlarnaDob"] - """ - Customer's date of birth - """ - - class CreateParamsKlarnaDob(TypedDict): - day: int - """ - The day of birth, between 1 and 31. - """ - month: int - """ - The month of birth, between 1 and 12. - """ - year: int - """ - The four-digit year of birth. - """ - - class CreateParamsKonbini(TypedDict): - pass - - class CreateParamsKrCard(TypedDict): - pass - - class CreateParamsLink(TypedDict): - pass - - class CreateParamsMbWay(TypedDict): - pass - - class CreateParamsMobilepay(TypedDict): - pass - - class CreateParamsMultibanco(TypedDict): - pass - - class CreateParamsNaverPay(TypedDict): - funding: NotRequired[Literal["card", "points"]] - """ - Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`. - """ - - class CreateParamsNzBankAccount(TypedDict): - account_holder_name: NotRequired[str] - """ - The name on the bank account. Only required if the account holder name is different from the name of the authorized signatory collected in the PaymentMethod's billing details. - """ - account_number: str - """ - The account number for the bank account. - """ - bank_code: str - """ - The numeric code for the bank account's bank. - """ - branch_code: str - """ - The numeric code for the bank account's bank branch. - """ - reference: NotRequired[str] - suffix: str - """ - The suffix of the bank account number. - """ - - class CreateParamsOxxo(TypedDict): - pass - - class CreateParamsP24(TypedDict): - bank: NotRequired[ - Literal[ - "alior_bank", - "bank_millennium", - "bank_nowy_bfg_sa", - "bank_pekao_sa", - "banki_spbdzielcze", - "blik", - "bnp_paribas", - "boz", - "citi_handlowy", - "credit_agricole", - "envelobank", - "etransfer_pocztowy24", - "getin_bank", - "ideabank", - "ing", - "inteligo", - "mbank_mtransfer", - "nest_przelew", - "noble_pay", - "pbac_z_ipko", - "plus_bank", - "santander_przelew24", - "tmobile_usbugi_bankowe", - "toyota_bank", - "velobank", - "volkswagen_bank", - ] - ] - """ - The customer's bank. - """ - - class CreateParamsPayByBank(TypedDict): - pass - - class CreateParamsPayco(TypedDict): - pass - - class CreateParamsPaynow(TypedDict): - pass - - class CreateParamsPaypal(TypedDict): - pass - - class CreateParamsPaypay(TypedDict): - pass - - class CreateParamsPayto(TypedDict): - account_number: NotRequired[str] - """ - The account number for the bank account. - """ - bsb_number: NotRequired[str] - """ - Bank-State-Branch number of the bank account. - """ - pay_id: NotRequired[str] - """ - The PayID alias for the bank account. - """ - - class CreateParamsPix(TypedDict): - pass - - class CreateParamsPromptpay(TypedDict): - pass - - class CreateParamsQris(TypedDict): - pass - - class CreateParamsRadarOptions(TypedDict): - session: NotRequired[str] - """ - A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. - """ - - class CreateParamsRechnung(TypedDict): - dob: "PaymentMethodService.CreateParamsRechnungDob" - """ - Customer's date of birth - """ - - class CreateParamsRechnungDob(TypedDict): - day: int - """ - The day of birth, between 1 and 31. - """ - month: int - """ - The month of birth, between 1 and 12. - """ - year: int - """ - The four-digit year of birth. - """ - - class CreateParamsRevolutPay(TypedDict): - pass - - class CreateParamsSamsungPay(TypedDict): - pass - - class CreateParamsSatispay(TypedDict): - pass - - class CreateParamsSepaDebit(TypedDict): - iban: str - """ - IBAN of the bank account. - """ - - class CreateParamsShopeepay(TypedDict): - pass - - class CreateParamsSofort(TypedDict): - country: Literal["AT", "BE", "DE", "ES", "IT", "NL"] - """ - Two-letter ISO code representing the country the bank account is located in. - """ - - class CreateParamsStripeBalance(TypedDict): - account: NotRequired[str] - """ - The connected account ID whose Stripe balance to use as the source of payment - """ - source_type: NotRequired[Literal["bank_account", "card", "fpx"]] - """ - The [source_type](https://docs.stripe.com/api/balance/balance_object#balance_object-available-source_types) of the balance - """ - - class CreateParamsSwish(TypedDict): - pass - - class CreateParamsTwint(TypedDict): - pass - - class CreateParamsUsBankAccount(TypedDict): - account_holder_type: NotRequired[Literal["company", "individual"]] - """ - Account holder type: individual or company. - """ - account_number: NotRequired[str] - """ - Account number of the bank account. - """ - account_type: NotRequired[Literal["checking", "savings"]] - """ - Account type: checkings or savings. Defaults to checking if omitted. - """ - financial_connections_account: NotRequired[str] - """ - The ID of a Financial Connections Account to use as a payment method. - """ - routing_number: NotRequired[str] - """ - Routing number of the bank account. - """ - - class CreateParamsWechatPay(TypedDict): - pass - - class CreateParamsZip(TypedDict): - pass - - class DetachParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class ListParams(TypedDict): - customer: NotRequired[str] - """ - The ID of the customer whose PaymentMethods will be retrieved. - """ - 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. - """ - type: NotRequired[ - Literal[ - "acss_debit", - "affirm", - "afterpay_clearpay", - "alipay", - "alma", - "amazon_pay", - "au_becs_debit", - "bacs_debit", - "bancontact", - "billie", - "blik", - "boleto", - "card", - "cashapp", - "crypto", - "customer_balance", - "eps", - "fpx", - "giropay", - "gopay", - "grabpay", - "id_bank_transfer", - "ideal", - "kakao_pay", - "klarna", - "konbini", - "kr_card", - "link", - "mb_way", - "mobilepay", - "multibanco", - "naver_pay", - "nz_bank_account", - "oxxo", - "p24", - "pay_by_bank", - "payco", - "paynow", - "paypal", - "paypay", - "payto", - "pix", - "promptpay", - "qris", - "rechnung", - "revolut_pay", - "samsung_pay", - "satispay", - "sepa_debit", - "shopeepay", - "sofort", - "stripe_balance", - "swish", - "twint", - "us_bank_account", - "wechat_pay", - "zip", - ] - ] - """ - An optional filter on the list, based on the object `type` field. Without the filter, the list includes all current and future payment method types. If your integration expects only one type of payment method in the response, make sure to provide a type value in the request. - """ - - class RetrieveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class UpdateParams(TypedDict): - allow_redisplay: NotRequired[ - Literal["always", "limited", "unspecified"] - ] - """ - This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`. - """ - billing_details: NotRequired[ - "PaymentMethodService.UpdateParamsBillingDetails" - ] - """ - Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. - """ - card: NotRequired["PaymentMethodService.UpdateParamsCard"] - """ - If this is a `card` PaymentMethod, this hash contains the user's card details. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - payto: NotRequired["PaymentMethodService.UpdateParamsPayto"] - """ - If this is a `payto` PaymentMethod, this hash contains details about the PayTo payment method. - """ - us_bank_account: NotRequired[ - "PaymentMethodService.UpdateParamsUsBankAccount" - ] - """ - If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. - """ - - class UpdateParamsBillingDetails(TypedDict): - address: NotRequired[ - "Literal['']|PaymentMethodService.UpdateParamsBillingDetailsAddress" - ] - """ - Billing address. - """ - email: NotRequired["Literal['']|str"] - """ - Email address. - """ - name: NotRequired["Literal['']|str"] - """ - Full name. - """ - phone: NotRequired["Literal['']|str"] - """ - Billing phone number (including extension). - """ - tax_id: NotRequired[str] - """ - Taxpayer identification number. Used only for transactions between LATAM buyers and non-LATAM sellers. - """ - - class UpdateParamsBillingDetailsAddress(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. - """ - - class UpdateParamsCard(TypedDict): - exp_month: NotRequired[int] - """ - Two-digit number representing the card's expiration month. - """ - exp_year: NotRequired[int] - """ - Four-digit number representing the card's expiration year. - """ - networks: NotRequired["PaymentMethodService.UpdateParamsCardNetworks"] - """ - Contains information about card networks used to process the payment. - """ - - class UpdateParamsCardNetworks(TypedDict): - preferred: NotRequired[ - "Literal['']|Literal['cartes_bancaires', 'mastercard', 'visa']" - ] - """ - The customer's preferred card network for co-branded cards. Supports `cartes_bancaires`, `mastercard`, or `visa`. Selection of a network that does not apply to the card will be stored as `invalid_preference` on the card. - """ - - class UpdateParamsPayto(TypedDict): - account_number: NotRequired[str] - """ - The account number for the bank account. - """ - bsb_number: NotRequired[str] - """ - Bank-State-Branch number of the bank account. - """ - pay_id: NotRequired[str] - """ - The PayID alias for the bank account. - """ - - class UpdateParamsUsBankAccount(TypedDict): - account_holder_type: NotRequired[Literal["company", "individual"]] - """ - Bank account holder type. - """ - account_type: NotRequired[Literal["checking", "savings"]] - """ - Bank account type. - """ - def list( self, - params: Optional["PaymentMethodService.ListParams"] = None, + params: Optional["PaymentMethodListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[PaymentMethod]: """ @@ -1134,7 +51,7 @@ def list( async def list_async( self, - params: Optional["PaymentMethodService.ListParams"] = None, + params: Optional["PaymentMethodListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[PaymentMethod]: """ @@ -1153,7 +70,7 @@ async def list_async( def create( self, - params: Optional["PaymentMethodService.CreateParams"] = None, + params: Optional["PaymentMethodCreateParams"] = None, options: Optional[RequestOptions] = None, ) -> PaymentMethod: """ @@ -1174,7 +91,7 @@ def create( async def create_async( self, - params: Optional["PaymentMethodService.CreateParams"] = None, + params: Optional["PaymentMethodCreateParams"] = None, options: Optional[RequestOptions] = None, ) -> PaymentMethod: """ @@ -1196,7 +113,7 @@ async def create_async( def retrieve( self, payment_method: str, - params: Optional["PaymentMethodService.RetrieveParams"] = None, + params: Optional["PaymentMethodRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> PaymentMethod: """ @@ -1218,7 +135,7 @@ def retrieve( async def retrieve_async( self, payment_method: str, - params: Optional["PaymentMethodService.RetrieveParams"] = None, + params: Optional["PaymentMethodRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> PaymentMethod: """ @@ -1240,7 +157,7 @@ async def retrieve_async( def update( self, payment_method: str, - params: Optional["PaymentMethodService.UpdateParams"] = None, + params: Optional["PaymentMethodUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> PaymentMethod: """ @@ -1262,7 +179,7 @@ def update( async def update_async( self, payment_method: str, - params: Optional["PaymentMethodService.UpdateParams"] = None, + params: Optional["PaymentMethodUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> PaymentMethod: """ @@ -1284,7 +201,7 @@ async def update_async( def attach( self, payment_method: str, - params: Optional["PaymentMethodService.AttachParams"] = None, + params: Optional["PaymentMethodAttachParams"] = None, options: Optional[RequestOptions] = None, ) -> PaymentMethod: """ @@ -1318,7 +235,7 @@ def attach( async def attach_async( self, payment_method: str, - params: Optional["PaymentMethodService.AttachParams"] = None, + params: Optional["PaymentMethodAttachParams"] = None, options: Optional[RequestOptions] = None, ) -> PaymentMethod: """ @@ -1352,7 +269,7 @@ async def attach_async( def detach( self, payment_method: str, - params: Optional["PaymentMethodService.DetachParams"] = None, + params: Optional["PaymentMethodDetachParams"] = None, options: Optional[RequestOptions] = None, ) -> PaymentMethod: """ @@ -1374,7 +291,7 @@ def detach( async def detach_async( self, payment_method: str, - params: Optional["PaymentMethodService.DetachParams"] = None, + params: Optional["PaymentMethodDetachParams"] = None, options: Optional[RequestOptions] = None, ) -> PaymentMethod: """ diff --git a/stripe/_payment_record.py b/stripe/_payment_record.py index 22a3a0bc0..a8f5b6727 100644 --- a/stripe/_payment_record.py +++ b/stripe/_payment_record.py @@ -2,21 +2,35 @@ # File generated from our OpenAPI spec from stripe._api_resource import APIResource from stripe._expandable_field import ExpandableField -from stripe._request_options import RequestOptions from stripe._stripe_object import StripeObject from stripe._util import class_method_variant, sanitize_id from typing import ClassVar, Dict, List, Optional, cast, overload -from typing_extensions import ( - Literal, - NotRequired, - TypedDict, - Unpack, - TYPE_CHECKING, -) +from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: from stripe._mandate import Mandate from stripe._payment_method import PaymentMethod + from stripe.params._payment_record_report_payment_attempt_canceled_params import ( + PaymentRecordReportPaymentAttemptCanceledParams, + ) + from stripe.params._payment_record_report_payment_attempt_failed_params import ( + PaymentRecordReportPaymentAttemptFailedParams, + ) + from stripe.params._payment_record_report_payment_attempt_guaranteed_params import ( + PaymentRecordReportPaymentAttemptGuaranteedParams, + ) + from stripe.params._payment_record_report_payment_attempt_informational_params import ( + PaymentRecordReportPaymentAttemptInformationalParams, + ) + from stripe.params._payment_record_report_payment_attempt_params import ( + PaymentRecordReportPaymentAttemptParams, + ) + from stripe.params._payment_record_report_payment_params import ( + PaymentRecordReportPaymentParams, + ) + from stripe.params._payment_record_retrieve_params import ( + PaymentRecordRetrieveParams, + ) class PaymentRecord(APIResource["PaymentRecord"]): @@ -2002,555 +2016,6 @@ class Address(StripeObject): """ _inner_class_types = {"address": Address} - class ReportPaymentAttemptCanceledParams(RequestOptions): - canceled_at: int - """ - When the reported payment was canceled. Measured in seconds since the Unix epoch. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - - class ReportPaymentAttemptFailedParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - failed_at: int - """ - When the reported payment failed. Measured in seconds since the Unix epoch. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - - class ReportPaymentAttemptGuaranteedParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - guaranteed_at: int - """ - When the reported payment was guaranteed. Measured in seconds since the Unix epoch. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - - class ReportPaymentAttemptInformationalParams(RequestOptions): - customer_details: NotRequired[ - "PaymentRecord.ReportPaymentAttemptInformationalParamsCustomerDetails" - ] - """ - Customer information for this payment. - """ - description: NotRequired["Literal['']|str"] - """ - An arbitrary string attached to the object. Often useful for displaying to users. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - shipping_details: NotRequired[ - "Literal['']|PaymentRecord.ReportPaymentAttemptInformationalParamsShippingDetails" - ] - """ - Shipping information for this payment. - """ - - class ReportPaymentAttemptInformationalParamsCustomerDetails(TypedDict): - customer: NotRequired[str] - """ - The customer who made the payment. - """ - email: NotRequired[str] - """ - The customer's phone number. - """ - name: NotRequired[str] - """ - The customer's name. - """ - phone: NotRequired[str] - """ - The customer's phone number. - """ - - class ReportPaymentAttemptInformationalParamsShippingDetails(TypedDict): - address: NotRequired[ - "PaymentRecord.ReportPaymentAttemptInformationalParamsShippingDetailsAddress" - ] - """ - The physical shipping address. - """ - name: NotRequired[str] - """ - The shipping recipient's name. - """ - phone: NotRequired[str] - """ - The shipping recipient's phone number. - """ - - class ReportPaymentAttemptInformationalParamsShippingDetailsAddress( - 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. - """ - - class ReportPaymentAttemptParams(RequestOptions): - description: NotRequired[str] - """ - An arbitrary string attached to the object. Often useful for displaying to users. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - failed: NotRequired["PaymentRecord.ReportPaymentAttemptParamsFailed"] - """ - Information about the payment attempt failure. - """ - guaranteed: NotRequired[ - "PaymentRecord.ReportPaymentAttemptParamsGuaranteed" - ] - """ - Information about the payment attempt guarantee. - """ - initiated_at: int - """ - When the reported payment was initiated. Measured in seconds since the Unix epoch. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - outcome: NotRequired[Literal["failed", "guaranteed"]] - """ - The outcome of the reported payment. - """ - payment_method_details: NotRequired[ - "PaymentRecord.ReportPaymentAttemptParamsPaymentMethodDetails" - ] - """ - Information about the Payment Method debited for this payment. - """ - shipping_details: NotRequired[ - "PaymentRecord.ReportPaymentAttemptParamsShippingDetails" - ] - """ - Shipping information for this payment. - """ - - class ReportPaymentAttemptParamsFailed(TypedDict): - failed_at: int - """ - When the reported payment failed. Measured in seconds since the Unix epoch. - """ - - class ReportPaymentAttemptParamsGuaranteed(TypedDict): - guaranteed_at: int - """ - When the reported payment was guaranteed. Measured in seconds since the Unix epoch. - """ - - class ReportPaymentAttemptParamsPaymentMethodDetails(TypedDict): - billing_details: NotRequired[ - "PaymentRecord.ReportPaymentAttemptParamsPaymentMethodDetailsBillingDetails" - ] - """ - The billing details associated with the method of payment. - """ - custom: NotRequired[ - "PaymentRecord.ReportPaymentAttemptParamsPaymentMethodDetailsCustom" - ] - """ - Information about the custom (user-defined) payment method used to make this payment. - """ - payment_method: NotRequired[str] - """ - ID of the Stripe Payment Method used to make this payment. - """ - type: NotRequired[Literal["custom"]] - """ - The type of the payment method details. An additional hash is included on the payment_method_details with a name matching this value. It contains additional information specific to the type. - """ - - class ReportPaymentAttemptParamsPaymentMethodDetailsBillingDetails( - TypedDict, - ): - address: NotRequired[ - "PaymentRecord.ReportPaymentAttemptParamsPaymentMethodDetailsBillingDetailsAddress" - ] - """ - The billing address associated with the method of payment. - """ - email: NotRequired[str] - """ - The billing email associated with the method of payment. - """ - name: NotRequired[str] - """ - The billing name associated with the method of payment. - """ - phone: NotRequired[str] - """ - The billing phone number associated with the method of payment. - """ - - class ReportPaymentAttemptParamsPaymentMethodDetailsBillingDetailsAddress( - 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. - """ - - class ReportPaymentAttemptParamsPaymentMethodDetailsCustom(TypedDict): - display_name: NotRequired[str] - """ - Display name for the custom (user-defined) payment method type used to make this payment. - """ - type: NotRequired[str] - """ - The custom payment method type associated with this payment. - """ - - class ReportPaymentAttemptParamsShippingDetails(TypedDict): - address: NotRequired[ - "PaymentRecord.ReportPaymentAttemptParamsShippingDetailsAddress" - ] - """ - The physical shipping address. - """ - name: NotRequired[str] - """ - The shipping recipient's name. - """ - phone: NotRequired[str] - """ - The shipping recipient's phone number. - """ - - class ReportPaymentAttemptParamsShippingDetailsAddress(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. - """ - - class ReportPaymentParams(RequestOptions): - amount_requested: "PaymentRecord.ReportPaymentParamsAmountRequested" - """ - The amount you initially requested for this payment. - """ - customer_details: NotRequired[ - "PaymentRecord.ReportPaymentParamsCustomerDetails" - ] - """ - Customer information for this payment. - """ - customer_presence: NotRequired[Literal["off_session", "on_session"]] - """ - Indicates whether the customer was present in your checkout flow during this payment. - """ - description: NotRequired[str] - """ - An arbitrary string attached to the object. Often useful for displaying to users. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - failed: NotRequired["PaymentRecord.ReportPaymentParamsFailed"] - """ - Information about the payment attempt failure. - """ - guaranteed: NotRequired["PaymentRecord.ReportPaymentParamsGuaranteed"] - """ - Information about the payment attempt guarantee. - """ - initiated_at: int - """ - When the reported payment was initiated. Measured in seconds since the Unix epoch. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - outcome: NotRequired[Literal["failed", "guaranteed"]] - """ - The outcome of the reported payment. - """ - payment_method_details: ( - "PaymentRecord.ReportPaymentParamsPaymentMethodDetails" - ) - """ - Information about the Payment Method debited for this payment. - """ - processor_details: NotRequired[ - "PaymentRecord.ReportPaymentParamsProcessorDetails" - ] - """ - Processor information for this payment. - """ - shipping_details: NotRequired[ - "PaymentRecord.ReportPaymentParamsShippingDetails" - ] - """ - Shipping information for this payment. - """ - - class ReportPaymentParamsAmountRequested(TypedDict): - 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). - """ - value: int - """ - A positive integer representing the amount in the currency's [minor unit](https://stripe.com/docs/currencies#zero-decimal). For example, `100` can represent 1 USD or 100 JPY. - """ - - class ReportPaymentParamsCustomerDetails(TypedDict): - customer: NotRequired[str] - """ - The customer who made the payment. - """ - email: NotRequired[str] - """ - The customer's phone number. - """ - name: NotRequired[str] - """ - The customer's name. - """ - phone: NotRequired[str] - """ - The customer's phone number. - """ - - class ReportPaymentParamsFailed(TypedDict): - failed_at: int - """ - When the reported payment failed. Measured in seconds since the Unix epoch. - """ - - class ReportPaymentParamsGuaranteed(TypedDict): - guaranteed_at: int - """ - When the reported payment was guaranteed. Measured in seconds since the Unix epoch. - """ - - class ReportPaymentParamsPaymentMethodDetails(TypedDict): - billing_details: NotRequired[ - "PaymentRecord.ReportPaymentParamsPaymentMethodDetailsBillingDetails" - ] - """ - The billing details associated with the method of payment. - """ - custom: NotRequired[ - "PaymentRecord.ReportPaymentParamsPaymentMethodDetailsCustom" - ] - """ - Information about the custom (user-defined) payment method used to make this payment. - """ - payment_method: NotRequired[str] - """ - ID of the Stripe Payment Method used to make this payment. - """ - type: NotRequired[Literal["custom"]] - """ - The type of the payment method details. An additional hash is included on the payment_method_details with a name matching this value. It contains additional information specific to the type. - """ - - class ReportPaymentParamsPaymentMethodDetailsBillingDetails(TypedDict): - address: NotRequired[ - "PaymentRecord.ReportPaymentParamsPaymentMethodDetailsBillingDetailsAddress" - ] - """ - The billing address associated with the method of payment. - """ - email: NotRequired[str] - """ - The billing email associated with the method of payment. - """ - name: NotRequired[str] - """ - The billing name associated with the method of payment. - """ - phone: NotRequired[str] - """ - The billing phone number associated with the method of payment. - """ - - class ReportPaymentParamsPaymentMethodDetailsBillingDetailsAddress( - 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. - """ - - class ReportPaymentParamsPaymentMethodDetailsCustom(TypedDict): - display_name: NotRequired[str] - """ - Display name for the custom (user-defined) payment method type used to make this payment. - """ - type: NotRequired[str] - """ - The custom payment method type associated with this payment. - """ - - class ReportPaymentParamsProcessorDetails(TypedDict): - custom: NotRequired[ - "PaymentRecord.ReportPaymentParamsProcessorDetailsCustom" - ] - """ - Information about the custom processor used to make this payment. - """ - type: Literal["custom"] - """ - The type of the processor details. An additional hash is included on processor_details with a name matching this value. It contains additional information specific to the processor. - """ - - class ReportPaymentParamsProcessorDetailsCustom(TypedDict): - payment_reference: str - """ - An opaque string for manual reconciliation of this payment, for example a check number or a payment processor ID. - """ - - class ReportPaymentParamsShippingDetails(TypedDict): - address: NotRequired[ - "PaymentRecord.ReportPaymentParamsShippingDetailsAddress" - ] - """ - The physical shipping address. - """ - name: NotRequired[str] - """ - The shipping recipient's name. - """ - phone: NotRequired[str] - """ - The shipping recipient's phone number. - """ - - class ReportPaymentParamsShippingDetailsAddress(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. - """ - - class RetrieveParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - amount: Amount """ A representation of an amount of money, consisting of an amount and a currency. @@ -2634,7 +2099,7 @@ class RetrieveParams(RequestOptions): @classmethod def report_payment( - cls, **params: Unpack["PaymentRecord.ReportPaymentParams"] + cls, **params: Unpack["PaymentRecordReportPaymentParams"] ) -> "PaymentRecord": """ Report a new Payment Record. You may report a Payment Record as it is @@ -2652,7 +2117,7 @@ def report_payment( @classmethod async def report_payment_async( - cls, **params: Unpack["PaymentRecord.ReportPaymentParams"] + cls, **params: Unpack["PaymentRecordReportPaymentParams"] ) -> "PaymentRecord": """ Report a new Payment Record. You may report a Payment Record as it is @@ -2672,7 +2137,7 @@ async def report_payment_async( def _cls_report_payment_attempt( cls, id: str, - **params: Unpack["PaymentRecord.ReportPaymentAttemptParams"], + **params: Unpack["PaymentRecordReportPaymentAttemptParams"], ) -> "PaymentRecord": """ Report a new payment attempt on the specified Payment Record. A new payment @@ -2692,7 +2157,7 @@ def _cls_report_payment_attempt( @overload @staticmethod def report_payment_attempt( - id: str, **params: Unpack["PaymentRecord.ReportPaymentAttemptParams"] + id: str, **params: Unpack["PaymentRecordReportPaymentAttemptParams"] ) -> "PaymentRecord": """ Report a new payment attempt on the specified Payment Record. A new payment @@ -2702,7 +2167,7 @@ def report_payment_attempt( @overload def report_payment_attempt( - self, **params: Unpack["PaymentRecord.ReportPaymentAttemptParams"] + self, **params: Unpack["PaymentRecordReportPaymentAttemptParams"] ) -> "PaymentRecord": """ Report a new payment attempt on the specified Payment Record. A new payment @@ -2712,7 +2177,7 @@ def report_payment_attempt( @class_method_variant("_cls_report_payment_attempt") def report_payment_attempt( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["PaymentRecord.ReportPaymentAttemptParams"] + self, **params: Unpack["PaymentRecordReportPaymentAttemptParams"] ) -> "PaymentRecord": """ Report a new payment attempt on the specified Payment Record. A new payment @@ -2733,7 +2198,7 @@ def report_payment_attempt( # pyright: ignore[reportGeneralTypeIssues] async def _cls_report_payment_attempt_async( cls, id: str, - **params: Unpack["PaymentRecord.ReportPaymentAttemptParams"], + **params: Unpack["PaymentRecordReportPaymentAttemptParams"], ) -> "PaymentRecord": """ Report a new payment attempt on the specified Payment Record. A new payment @@ -2753,7 +2218,7 @@ async def _cls_report_payment_attempt_async( @overload @staticmethod async def report_payment_attempt_async( - id: str, **params: Unpack["PaymentRecord.ReportPaymentAttemptParams"] + id: str, **params: Unpack["PaymentRecordReportPaymentAttemptParams"] ) -> "PaymentRecord": """ Report a new payment attempt on the specified Payment Record. A new payment @@ -2763,7 +2228,7 @@ async def report_payment_attempt_async( @overload async def report_payment_attempt_async( - self, **params: Unpack["PaymentRecord.ReportPaymentAttemptParams"] + self, **params: Unpack["PaymentRecordReportPaymentAttemptParams"] ) -> "PaymentRecord": """ Report a new payment attempt on the specified Payment Record. A new payment @@ -2773,7 +2238,7 @@ async def report_payment_attempt_async( @class_method_variant("_cls_report_payment_attempt_async") async def report_payment_attempt_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["PaymentRecord.ReportPaymentAttemptParams"] + self, **params: Unpack["PaymentRecordReportPaymentAttemptParams"] ) -> "PaymentRecord": """ Report a new payment attempt on the specified Payment Record. A new payment @@ -2794,7 +2259,7 @@ async def report_payment_attempt_async( # pyright: ignore[reportGeneralTypeIssu def _cls_report_payment_attempt_canceled( cls, id: str, - **params: Unpack["PaymentRecord.ReportPaymentAttemptCanceledParams"], + **params: Unpack["PaymentRecordReportPaymentAttemptCanceledParams"], ) -> "PaymentRecord": """ Report that the most recent payment attempt on the specified Payment Record @@ -2815,7 +2280,7 @@ def _cls_report_payment_attempt_canceled( @staticmethod def report_payment_attempt_canceled( id: str, - **params: Unpack["PaymentRecord.ReportPaymentAttemptCanceledParams"], + **params: Unpack["PaymentRecordReportPaymentAttemptCanceledParams"], ) -> "PaymentRecord": """ Report that the most recent payment attempt on the specified Payment Record @@ -2826,7 +2291,7 @@ def report_payment_attempt_canceled( @overload def report_payment_attempt_canceled( self, - **params: Unpack["PaymentRecord.ReportPaymentAttemptCanceledParams"], + **params: Unpack["PaymentRecordReportPaymentAttemptCanceledParams"], ) -> "PaymentRecord": """ Report that the most recent payment attempt on the specified Payment Record @@ -2837,7 +2302,7 @@ def report_payment_attempt_canceled( @class_method_variant("_cls_report_payment_attempt_canceled") def report_payment_attempt_canceled( # pyright: ignore[reportGeneralTypeIssues] self, - **params: Unpack["PaymentRecord.ReportPaymentAttemptCanceledParams"], + **params: Unpack["PaymentRecordReportPaymentAttemptCanceledParams"], ) -> "PaymentRecord": """ Report that the most recent payment attempt on the specified Payment Record @@ -2858,7 +2323,7 @@ def report_payment_attempt_canceled( # pyright: ignore[reportGeneralTypeIssues] async def _cls_report_payment_attempt_canceled_async( cls, id: str, - **params: Unpack["PaymentRecord.ReportPaymentAttemptCanceledParams"], + **params: Unpack["PaymentRecordReportPaymentAttemptCanceledParams"], ) -> "PaymentRecord": """ Report that the most recent payment attempt on the specified Payment Record @@ -2879,7 +2344,7 @@ async def _cls_report_payment_attempt_canceled_async( @staticmethod async def report_payment_attempt_canceled_async( id: str, - **params: Unpack["PaymentRecord.ReportPaymentAttemptCanceledParams"], + **params: Unpack["PaymentRecordReportPaymentAttemptCanceledParams"], ) -> "PaymentRecord": """ Report that the most recent payment attempt on the specified Payment Record @@ -2890,7 +2355,7 @@ async def report_payment_attempt_canceled_async( @overload async def report_payment_attempt_canceled_async( self, - **params: Unpack["PaymentRecord.ReportPaymentAttemptCanceledParams"], + **params: Unpack["PaymentRecordReportPaymentAttemptCanceledParams"], ) -> "PaymentRecord": """ Report that the most recent payment attempt on the specified Payment Record @@ -2901,7 +2366,7 @@ async def report_payment_attempt_canceled_async( @class_method_variant("_cls_report_payment_attempt_canceled_async") async def report_payment_attempt_canceled_async( # pyright: ignore[reportGeneralTypeIssues] self, - **params: Unpack["PaymentRecord.ReportPaymentAttemptCanceledParams"], + **params: Unpack["PaymentRecordReportPaymentAttemptCanceledParams"], ) -> "PaymentRecord": """ Report that the most recent payment attempt on the specified Payment Record @@ -2922,7 +2387,7 @@ async def report_payment_attempt_canceled_async( # pyright: ignore[reportGenera def _cls_report_payment_attempt_failed( cls, id: str, - **params: Unpack["PaymentRecord.ReportPaymentAttemptFailedParams"], + **params: Unpack["PaymentRecordReportPaymentAttemptFailedParams"], ) -> "PaymentRecord": """ Report that the most recent payment attempt on the specified Payment Record @@ -2943,7 +2408,7 @@ def _cls_report_payment_attempt_failed( @staticmethod def report_payment_attempt_failed( id: str, - **params: Unpack["PaymentRecord.ReportPaymentAttemptFailedParams"], + **params: Unpack["PaymentRecordReportPaymentAttemptFailedParams"], ) -> "PaymentRecord": """ Report that the most recent payment attempt on the specified Payment Record @@ -2953,8 +2418,7 @@ def report_payment_attempt_failed( @overload def report_payment_attempt_failed( - self, - **params: Unpack["PaymentRecord.ReportPaymentAttemptFailedParams"], + self, **params: Unpack["PaymentRecordReportPaymentAttemptFailedParams"] ) -> "PaymentRecord": """ Report that the most recent payment attempt on the specified Payment Record @@ -2964,8 +2428,7 @@ def report_payment_attempt_failed( @class_method_variant("_cls_report_payment_attempt_failed") def report_payment_attempt_failed( # pyright: ignore[reportGeneralTypeIssues] - self, - **params: Unpack["PaymentRecord.ReportPaymentAttemptFailedParams"], + self, **params: Unpack["PaymentRecordReportPaymentAttemptFailedParams"] ) -> "PaymentRecord": """ Report that the most recent payment attempt on the specified Payment Record @@ -2986,7 +2449,7 @@ def report_payment_attempt_failed( # pyright: ignore[reportGeneralTypeIssues] async def _cls_report_payment_attempt_failed_async( cls, id: str, - **params: Unpack["PaymentRecord.ReportPaymentAttemptFailedParams"], + **params: Unpack["PaymentRecordReportPaymentAttemptFailedParams"], ) -> "PaymentRecord": """ Report that the most recent payment attempt on the specified Payment Record @@ -3007,7 +2470,7 @@ async def _cls_report_payment_attempt_failed_async( @staticmethod async def report_payment_attempt_failed_async( id: str, - **params: Unpack["PaymentRecord.ReportPaymentAttemptFailedParams"], + **params: Unpack["PaymentRecordReportPaymentAttemptFailedParams"], ) -> "PaymentRecord": """ Report that the most recent payment attempt on the specified Payment Record @@ -3017,8 +2480,7 @@ async def report_payment_attempt_failed_async( @overload async def report_payment_attempt_failed_async( - self, - **params: Unpack["PaymentRecord.ReportPaymentAttemptFailedParams"], + self, **params: Unpack["PaymentRecordReportPaymentAttemptFailedParams"] ) -> "PaymentRecord": """ Report that the most recent payment attempt on the specified Payment Record @@ -3028,8 +2490,7 @@ async def report_payment_attempt_failed_async( @class_method_variant("_cls_report_payment_attempt_failed_async") async def report_payment_attempt_failed_async( # pyright: ignore[reportGeneralTypeIssues] - self, - **params: Unpack["PaymentRecord.ReportPaymentAttemptFailedParams"], + self, **params: Unpack["PaymentRecordReportPaymentAttemptFailedParams"] ) -> "PaymentRecord": """ Report that the most recent payment attempt on the specified Payment Record @@ -3050,7 +2511,7 @@ async def report_payment_attempt_failed_async( # pyright: ignore[reportGeneralT def _cls_report_payment_attempt_guaranteed( cls, id: str, - **params: Unpack["PaymentRecord.ReportPaymentAttemptGuaranteedParams"], + **params: Unpack["PaymentRecordReportPaymentAttemptGuaranteedParams"], ) -> "PaymentRecord": """ Report that the most recent payment attempt on the specified Payment Record @@ -3071,7 +2532,7 @@ def _cls_report_payment_attempt_guaranteed( @staticmethod def report_payment_attempt_guaranteed( id: str, - **params: Unpack["PaymentRecord.ReportPaymentAttemptGuaranteedParams"], + **params: Unpack["PaymentRecordReportPaymentAttemptGuaranteedParams"], ) -> "PaymentRecord": """ Report that the most recent payment attempt on the specified Payment Record @@ -3082,7 +2543,7 @@ def report_payment_attempt_guaranteed( @overload def report_payment_attempt_guaranteed( self, - **params: Unpack["PaymentRecord.ReportPaymentAttemptGuaranteedParams"], + **params: Unpack["PaymentRecordReportPaymentAttemptGuaranteedParams"], ) -> "PaymentRecord": """ Report that the most recent payment attempt on the specified Payment Record @@ -3093,7 +2554,7 @@ def report_payment_attempt_guaranteed( @class_method_variant("_cls_report_payment_attempt_guaranteed") def report_payment_attempt_guaranteed( # pyright: ignore[reportGeneralTypeIssues] self, - **params: Unpack["PaymentRecord.ReportPaymentAttemptGuaranteedParams"], + **params: Unpack["PaymentRecordReportPaymentAttemptGuaranteedParams"], ) -> "PaymentRecord": """ Report that the most recent payment attempt on the specified Payment Record @@ -3114,7 +2575,7 @@ def report_payment_attempt_guaranteed( # pyright: ignore[reportGeneralTypeIssue async def _cls_report_payment_attempt_guaranteed_async( cls, id: str, - **params: Unpack["PaymentRecord.ReportPaymentAttemptGuaranteedParams"], + **params: Unpack["PaymentRecordReportPaymentAttemptGuaranteedParams"], ) -> "PaymentRecord": """ Report that the most recent payment attempt on the specified Payment Record @@ -3135,7 +2596,7 @@ async def _cls_report_payment_attempt_guaranteed_async( @staticmethod async def report_payment_attempt_guaranteed_async( id: str, - **params: Unpack["PaymentRecord.ReportPaymentAttemptGuaranteedParams"], + **params: Unpack["PaymentRecordReportPaymentAttemptGuaranteedParams"], ) -> "PaymentRecord": """ Report that the most recent payment attempt on the specified Payment Record @@ -3146,7 +2607,7 @@ async def report_payment_attempt_guaranteed_async( @overload async def report_payment_attempt_guaranteed_async( self, - **params: Unpack["PaymentRecord.ReportPaymentAttemptGuaranteedParams"], + **params: Unpack["PaymentRecordReportPaymentAttemptGuaranteedParams"], ) -> "PaymentRecord": """ Report that the most recent payment attempt on the specified Payment Record @@ -3157,7 +2618,7 @@ async def report_payment_attempt_guaranteed_async( @class_method_variant("_cls_report_payment_attempt_guaranteed_async") async def report_payment_attempt_guaranteed_async( # pyright: ignore[reportGeneralTypeIssues] self, - **params: Unpack["PaymentRecord.ReportPaymentAttemptGuaranteedParams"], + **params: Unpack["PaymentRecordReportPaymentAttemptGuaranteedParams"], ) -> "PaymentRecord": """ Report that the most recent payment attempt on the specified Payment Record @@ -3179,7 +2640,7 @@ def _cls_report_payment_attempt_informational( cls, id: str, **params: Unpack[ - "PaymentRecord.ReportPaymentAttemptInformationalParams" + "PaymentRecordReportPaymentAttemptInformationalParams" ], ) -> "PaymentRecord": """ @@ -3201,7 +2662,7 @@ def _cls_report_payment_attempt_informational( def report_payment_attempt_informational( id: str, **params: Unpack[ - "PaymentRecord.ReportPaymentAttemptInformationalParams" + "PaymentRecordReportPaymentAttemptInformationalParams" ], ) -> "PaymentRecord": """ @@ -3213,7 +2674,7 @@ def report_payment_attempt_informational( def report_payment_attempt_informational( self, **params: Unpack[ - "PaymentRecord.ReportPaymentAttemptInformationalParams" + "PaymentRecordReportPaymentAttemptInformationalParams" ], ) -> "PaymentRecord": """ @@ -3225,7 +2686,7 @@ def report_payment_attempt_informational( def report_payment_attempt_informational( # pyright: ignore[reportGeneralTypeIssues] self, **params: Unpack[ - "PaymentRecord.ReportPaymentAttemptInformationalParams" + "PaymentRecordReportPaymentAttemptInformationalParams" ], ) -> "PaymentRecord": """ @@ -3247,7 +2708,7 @@ async def _cls_report_payment_attempt_informational_async( cls, id: str, **params: Unpack[ - "PaymentRecord.ReportPaymentAttemptInformationalParams" + "PaymentRecordReportPaymentAttemptInformationalParams" ], ) -> "PaymentRecord": """ @@ -3269,7 +2730,7 @@ async def _cls_report_payment_attempt_informational_async( async def report_payment_attempt_informational_async( id: str, **params: Unpack[ - "PaymentRecord.ReportPaymentAttemptInformationalParams" + "PaymentRecordReportPaymentAttemptInformationalParams" ], ) -> "PaymentRecord": """ @@ -3281,7 +2742,7 @@ async def report_payment_attempt_informational_async( async def report_payment_attempt_informational_async( self, **params: Unpack[ - "PaymentRecord.ReportPaymentAttemptInformationalParams" + "PaymentRecordReportPaymentAttemptInformationalParams" ], ) -> "PaymentRecord": """ @@ -3293,7 +2754,7 @@ async def report_payment_attempt_informational_async( async def report_payment_attempt_informational_async( # pyright: ignore[reportGeneralTypeIssues] self, **params: Unpack[ - "PaymentRecord.ReportPaymentAttemptInformationalParams" + "PaymentRecordReportPaymentAttemptInformationalParams" ], ) -> "PaymentRecord": """ @@ -3312,7 +2773,7 @@ async def report_payment_attempt_informational_async( # pyright: ignore[reportG @classmethod def retrieve( - cls, id: str, **params: Unpack["PaymentRecord.RetrieveParams"] + cls, id: str, **params: Unpack["PaymentRecordRetrieveParams"] ) -> "PaymentRecord": """ Retrieves a Payment Record with the given ID @@ -3323,7 +2784,7 @@ def retrieve( @classmethod async def retrieve_async( - cls, id: str, **params: Unpack["PaymentRecord.RetrieveParams"] + cls, id: str, **params: Unpack["PaymentRecordRetrieveParams"] ) -> "PaymentRecord": """ Retrieves a Payment Record with the given ID diff --git a/stripe/_payment_record_service.py b/stripe/_payment_record_service.py index 7dbd3a888..517918dfe 100644 --- a/stripe/_payment_record_service.py +++ b/stripe/_payment_record_service.py @@ -4,570 +4,38 @@ from stripe._request_options import RequestOptions from stripe._stripe_service import StripeService from stripe._util import sanitize_id -from typing import Dict, List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params._payment_record_report_payment_attempt_canceled_params import ( + PaymentRecordReportPaymentAttemptCanceledParams, + ) + from stripe.params._payment_record_report_payment_attempt_failed_params import ( + PaymentRecordReportPaymentAttemptFailedParams, + ) + from stripe.params._payment_record_report_payment_attempt_guaranteed_params import ( + PaymentRecordReportPaymentAttemptGuaranteedParams, + ) + from stripe.params._payment_record_report_payment_attempt_informational_params import ( + PaymentRecordReportPaymentAttemptInformationalParams, + ) + from stripe.params._payment_record_report_payment_attempt_params import ( + PaymentRecordReportPaymentAttemptParams, + ) + from stripe.params._payment_record_report_payment_params import ( + PaymentRecordReportPaymentParams, + ) + from stripe.params._payment_record_retrieve_params import ( + PaymentRecordRetrieveParams, + ) class PaymentRecordService(StripeService): - class ReportPaymentAttemptCanceledParams(TypedDict): - canceled_at: int - """ - When the reported payment was canceled. Measured in seconds since the Unix epoch. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - - class ReportPaymentAttemptFailedParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - failed_at: int - """ - When the reported payment failed. Measured in seconds since the Unix epoch. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - - class ReportPaymentAttemptGuaranteedParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - guaranteed_at: int - """ - When the reported payment was guaranteed. Measured in seconds since the Unix epoch. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - - class ReportPaymentAttemptInformationalParams(TypedDict): - customer_details: NotRequired[ - "PaymentRecordService.ReportPaymentAttemptInformationalParamsCustomerDetails" - ] - """ - Customer information for this payment. - """ - description: NotRequired["Literal['']|str"] - """ - An arbitrary string attached to the object. Often useful for displaying to users. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - shipping_details: NotRequired[ - "Literal['']|PaymentRecordService.ReportPaymentAttemptInformationalParamsShippingDetails" - ] - """ - Shipping information for this payment. - """ - - class ReportPaymentAttemptInformationalParamsCustomerDetails(TypedDict): - customer: NotRequired[str] - """ - The customer who made the payment. - """ - email: NotRequired[str] - """ - The customer's phone number. - """ - name: NotRequired[str] - """ - The customer's name. - """ - phone: NotRequired[str] - """ - The customer's phone number. - """ - - class ReportPaymentAttemptInformationalParamsShippingDetails(TypedDict): - address: NotRequired[ - "PaymentRecordService.ReportPaymentAttemptInformationalParamsShippingDetailsAddress" - ] - """ - The physical shipping address. - """ - name: NotRequired[str] - """ - The shipping recipient's name. - """ - phone: NotRequired[str] - """ - The shipping recipient's phone number. - """ - - class ReportPaymentAttemptInformationalParamsShippingDetailsAddress( - 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. - """ - - class ReportPaymentAttemptParams(TypedDict): - description: NotRequired[str] - """ - An arbitrary string attached to the object. Often useful for displaying to users. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - failed: NotRequired[ - "PaymentRecordService.ReportPaymentAttemptParamsFailed" - ] - """ - Information about the payment attempt failure. - """ - guaranteed: NotRequired[ - "PaymentRecordService.ReportPaymentAttemptParamsGuaranteed" - ] - """ - Information about the payment attempt guarantee. - """ - initiated_at: int - """ - When the reported payment was initiated. Measured in seconds since the Unix epoch. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - outcome: NotRequired[Literal["failed", "guaranteed"]] - """ - The outcome of the reported payment. - """ - payment_method_details: NotRequired[ - "PaymentRecordService.ReportPaymentAttemptParamsPaymentMethodDetails" - ] - """ - Information about the Payment Method debited for this payment. - """ - shipping_details: NotRequired[ - "PaymentRecordService.ReportPaymentAttemptParamsShippingDetails" - ] - """ - Shipping information for this payment. - """ - - class ReportPaymentAttemptParamsFailed(TypedDict): - failed_at: int - """ - When the reported payment failed. Measured in seconds since the Unix epoch. - """ - - class ReportPaymentAttemptParamsGuaranteed(TypedDict): - guaranteed_at: int - """ - When the reported payment was guaranteed. Measured in seconds since the Unix epoch. - """ - - class ReportPaymentAttemptParamsPaymentMethodDetails(TypedDict): - billing_details: NotRequired[ - "PaymentRecordService.ReportPaymentAttemptParamsPaymentMethodDetailsBillingDetails" - ] - """ - The billing details associated with the method of payment. - """ - custom: NotRequired[ - "PaymentRecordService.ReportPaymentAttemptParamsPaymentMethodDetailsCustom" - ] - """ - Information about the custom (user-defined) payment method used to make this payment. - """ - payment_method: NotRequired[str] - """ - ID of the Stripe Payment Method used to make this payment. - """ - type: NotRequired[Literal["custom"]] - """ - The type of the payment method details. An additional hash is included on the payment_method_details with a name matching this value. It contains additional information specific to the type. - """ - - class ReportPaymentAttemptParamsPaymentMethodDetailsBillingDetails( - TypedDict, - ): - address: NotRequired[ - "PaymentRecordService.ReportPaymentAttemptParamsPaymentMethodDetailsBillingDetailsAddress" - ] - """ - The billing address associated with the method of payment. - """ - email: NotRequired[str] - """ - The billing email associated with the method of payment. - """ - name: NotRequired[str] - """ - The billing name associated with the method of payment. - """ - phone: NotRequired[str] - """ - The billing phone number associated with the method of payment. - """ - - class ReportPaymentAttemptParamsPaymentMethodDetailsBillingDetailsAddress( - 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. - """ - - class ReportPaymentAttemptParamsPaymentMethodDetailsCustom(TypedDict): - display_name: NotRequired[str] - """ - Display name for the custom (user-defined) payment method type used to make this payment. - """ - type: NotRequired[str] - """ - The custom payment method type associated with this payment. - """ - - class ReportPaymentAttemptParamsShippingDetails(TypedDict): - address: NotRequired[ - "PaymentRecordService.ReportPaymentAttemptParamsShippingDetailsAddress" - ] - """ - The physical shipping address. - """ - name: NotRequired[str] - """ - The shipping recipient's name. - """ - phone: NotRequired[str] - """ - The shipping recipient's phone number. - """ - - class ReportPaymentAttemptParamsShippingDetailsAddress(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. - """ - - class ReportPaymentParams(TypedDict): - amount_requested: ( - "PaymentRecordService.ReportPaymentParamsAmountRequested" - ) - """ - The amount you initially requested for this payment. - """ - customer_details: NotRequired[ - "PaymentRecordService.ReportPaymentParamsCustomerDetails" - ] - """ - Customer information for this payment. - """ - customer_presence: NotRequired[Literal["off_session", "on_session"]] - """ - Indicates whether the customer was present in your checkout flow during this payment. - """ - description: NotRequired[str] - """ - An arbitrary string attached to the object. Often useful for displaying to users. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - failed: NotRequired["PaymentRecordService.ReportPaymentParamsFailed"] - """ - Information about the payment attempt failure. - """ - guaranteed: NotRequired[ - "PaymentRecordService.ReportPaymentParamsGuaranteed" - ] - """ - Information about the payment attempt guarantee. - """ - initiated_at: int - """ - When the reported payment was initiated. Measured in seconds since the Unix epoch. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - outcome: NotRequired[Literal["failed", "guaranteed"]] - """ - The outcome of the reported payment. - """ - payment_method_details: ( - "PaymentRecordService.ReportPaymentParamsPaymentMethodDetails" - ) - """ - Information about the Payment Method debited for this payment. - """ - processor_details: NotRequired[ - "PaymentRecordService.ReportPaymentParamsProcessorDetails" - ] - """ - Processor information for this payment. - """ - shipping_details: NotRequired[ - "PaymentRecordService.ReportPaymentParamsShippingDetails" - ] - """ - Shipping information for this payment. - """ - - class ReportPaymentParamsAmountRequested(TypedDict): - 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). - """ - value: int - """ - A positive integer representing the amount in the currency's [minor unit](https://stripe.com/docs/currencies#zero-decimal). For example, `100` can represent 1 USD or 100 JPY. - """ - - class ReportPaymentParamsCustomerDetails(TypedDict): - customer: NotRequired[str] - """ - The customer who made the payment. - """ - email: NotRequired[str] - """ - The customer's phone number. - """ - name: NotRequired[str] - """ - The customer's name. - """ - phone: NotRequired[str] - """ - The customer's phone number. - """ - - class ReportPaymentParamsFailed(TypedDict): - failed_at: int - """ - When the reported payment failed. Measured in seconds since the Unix epoch. - """ - - class ReportPaymentParamsGuaranteed(TypedDict): - guaranteed_at: int - """ - When the reported payment was guaranteed. Measured in seconds since the Unix epoch. - """ - - class ReportPaymentParamsPaymentMethodDetails(TypedDict): - billing_details: NotRequired[ - "PaymentRecordService.ReportPaymentParamsPaymentMethodDetailsBillingDetails" - ] - """ - The billing details associated with the method of payment. - """ - custom: NotRequired[ - "PaymentRecordService.ReportPaymentParamsPaymentMethodDetailsCustom" - ] - """ - Information about the custom (user-defined) payment method used to make this payment. - """ - payment_method: NotRequired[str] - """ - ID of the Stripe Payment Method used to make this payment. - """ - type: NotRequired[Literal["custom"]] - """ - The type of the payment method details. An additional hash is included on the payment_method_details with a name matching this value. It contains additional information specific to the type. - """ - - class ReportPaymentParamsPaymentMethodDetailsBillingDetails(TypedDict): - address: NotRequired[ - "PaymentRecordService.ReportPaymentParamsPaymentMethodDetailsBillingDetailsAddress" - ] - """ - The billing address associated with the method of payment. - """ - email: NotRequired[str] - """ - The billing email associated with the method of payment. - """ - name: NotRequired[str] - """ - The billing name associated with the method of payment. - """ - phone: NotRequired[str] - """ - The billing phone number associated with the method of payment. - """ - - class ReportPaymentParamsPaymentMethodDetailsBillingDetailsAddress( - 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. - """ - - class ReportPaymentParamsPaymentMethodDetailsCustom(TypedDict): - display_name: NotRequired[str] - """ - Display name for the custom (user-defined) payment method type used to make this payment. - """ - type: NotRequired[str] - """ - The custom payment method type associated with this payment. - """ - - class ReportPaymentParamsProcessorDetails(TypedDict): - custom: NotRequired[ - "PaymentRecordService.ReportPaymentParamsProcessorDetailsCustom" - ] - """ - Information about the custom processor used to make this payment. - """ - type: Literal["custom"] - """ - The type of the processor details. An additional hash is included on processor_details with a name matching this value. It contains additional information specific to the processor. - """ - - class ReportPaymentParamsProcessorDetailsCustom(TypedDict): - payment_reference: str - """ - An opaque string for manual reconciliation of this payment, for example a check number or a payment processor ID. - """ - - class ReportPaymentParamsShippingDetails(TypedDict): - address: NotRequired[ - "PaymentRecordService.ReportPaymentParamsShippingDetailsAddress" - ] - """ - The physical shipping address. - """ - name: NotRequired[str] - """ - The shipping recipient's name. - """ - phone: NotRequired[str] - """ - The shipping recipient's phone number. - """ - - class ReportPaymentParamsShippingDetailsAddress(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. - """ - - class RetrieveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - def retrieve( self, id: str, - params: Optional["PaymentRecordService.RetrieveParams"] = None, + params: Optional["PaymentRecordRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> PaymentRecord: """ @@ -587,7 +55,7 @@ def retrieve( async def retrieve_async( self, id: str, - params: Optional["PaymentRecordService.RetrieveParams"] = None, + params: Optional["PaymentRecordRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> PaymentRecord: """ @@ -607,7 +75,7 @@ async def retrieve_async( def report_payment_attempt( self, id: str, - params: "PaymentRecordService.ReportPaymentAttemptParams", + params: "PaymentRecordReportPaymentAttemptParams", options: Optional[RequestOptions] = None, ) -> PaymentRecord: """ @@ -630,7 +98,7 @@ def report_payment_attempt( async def report_payment_attempt_async( self, id: str, - params: "PaymentRecordService.ReportPaymentAttemptParams", + params: "PaymentRecordReportPaymentAttemptParams", options: Optional[RequestOptions] = None, ) -> PaymentRecord: """ @@ -653,7 +121,7 @@ async def report_payment_attempt_async( def report_payment_attempt_canceled( self, id: str, - params: "PaymentRecordService.ReportPaymentAttemptCanceledParams", + params: "PaymentRecordReportPaymentAttemptCanceledParams", options: Optional[RequestOptions] = None, ) -> PaymentRecord: """ @@ -676,7 +144,7 @@ def report_payment_attempt_canceled( async def report_payment_attempt_canceled_async( self, id: str, - params: "PaymentRecordService.ReportPaymentAttemptCanceledParams", + params: "PaymentRecordReportPaymentAttemptCanceledParams", options: Optional[RequestOptions] = None, ) -> PaymentRecord: """ @@ -699,7 +167,7 @@ async def report_payment_attempt_canceled_async( def report_payment_attempt_failed( self, id: str, - params: "PaymentRecordService.ReportPaymentAttemptFailedParams", + params: "PaymentRecordReportPaymentAttemptFailedParams", options: Optional[RequestOptions] = None, ) -> PaymentRecord: """ @@ -722,7 +190,7 @@ def report_payment_attempt_failed( async def report_payment_attempt_failed_async( self, id: str, - params: "PaymentRecordService.ReportPaymentAttemptFailedParams", + params: "PaymentRecordReportPaymentAttemptFailedParams", options: Optional[RequestOptions] = None, ) -> PaymentRecord: """ @@ -745,7 +213,7 @@ async def report_payment_attempt_failed_async( def report_payment_attempt_guaranteed( self, id: str, - params: "PaymentRecordService.ReportPaymentAttemptGuaranteedParams", + params: "PaymentRecordReportPaymentAttemptGuaranteedParams", options: Optional[RequestOptions] = None, ) -> PaymentRecord: """ @@ -768,7 +236,7 @@ def report_payment_attempt_guaranteed( async def report_payment_attempt_guaranteed_async( self, id: str, - params: "PaymentRecordService.ReportPaymentAttemptGuaranteedParams", + params: "PaymentRecordReportPaymentAttemptGuaranteedParams", options: Optional[RequestOptions] = None, ) -> PaymentRecord: """ @@ -792,7 +260,7 @@ def report_payment_attempt_informational( self, id: str, params: Optional[ - "PaymentRecordService.ReportPaymentAttemptInformationalParams" + "PaymentRecordReportPaymentAttemptInformationalParams" ] = None, options: Optional[RequestOptions] = None, ) -> PaymentRecord: @@ -816,7 +284,7 @@ async def report_payment_attempt_informational_async( self, id: str, params: Optional[ - "PaymentRecordService.ReportPaymentAttemptInformationalParams" + "PaymentRecordReportPaymentAttemptInformationalParams" ] = None, options: Optional[RequestOptions] = None, ) -> PaymentRecord: @@ -838,7 +306,7 @@ async def report_payment_attempt_informational_async( def report_payment( self, - params: "PaymentRecordService.ReportPaymentParams", + params: "PaymentRecordReportPaymentParams", options: Optional[RequestOptions] = None, ) -> PaymentRecord: """ @@ -859,7 +327,7 @@ def report_payment( async def report_payment_async( self, - params: "PaymentRecordService.ReportPaymentParams", + params: "PaymentRecordReportPaymentParams", options: Optional[RequestOptions] = None, ) -> PaymentRecord: """ diff --git a/stripe/_payout.py b/stripe/_payout.py index d000d8181..3f7d7f9ab 100644 --- a/stripe/_payout.py +++ b/stripe/_payout.py @@ -4,24 +4,23 @@ from stripe._expandable_field import ExpandableField from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource -from stripe._request_options import RequestOptions from stripe._stripe_object import StripeObject from stripe._updateable_api_resource import UpdateableAPIResource from stripe._util import class_method_variant, sanitize_id -from typing import ClassVar, Dict, List, Optional, Union, cast, overload -from typing_extensions import ( - Literal, - NotRequired, - TypedDict, - Unpack, - TYPE_CHECKING, -) +from typing import ClassVar, Dict, Optional, Union, cast, overload +from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: from stripe._application_fee import ApplicationFee from stripe._balance_transaction import BalanceTransaction from stripe._bank_account import BankAccount from stripe._card import Card + from stripe.params._payout_cancel_params import PayoutCancelParams + from stripe.params._payout_create_params import PayoutCreateParams + from stripe.params._payout_list_params import PayoutListParams + from stripe.params._payout_modify_params import PayoutModifyParams + from stripe.params._payout_retrieve_params import PayoutRetrieveParams + from stripe.params._payout_reverse_params import PayoutReverseParams class Payout( @@ -52,150 +51,6 @@ class TraceId(StripeObject): The trace ID value if `trace_id.status` is `supported`, otherwise `nil`. """ - class CancelParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class CreateParams(RequestOptions): - amount: int - """ - A positive integer in cents representing how much to payout. - """ - 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). - """ - description: NotRequired[str] - """ - An arbitrary string attached to the object. Often useful for displaying to users. - """ - destination: NotRequired[str] - """ - The ID of a bank account or a card to send the payout to. If you don't provide a destination, we use the default external account for the specified currency. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - method: NotRequired[Literal["instant", "standard"]] - """ - The method used to send this payout, which is `standard` or `instant`. We support `instant` for payouts to debit cards and bank accounts in certain countries. Learn more about [bank support for Instant Payouts](https://stripe.com/docs/payouts/instant-payouts-banks). - """ - payout_method: NotRequired[str] - """ - The ID of a v2 FinancialAccount to send funds to. - """ - source_type: NotRequired[Literal["bank_account", "card", "fpx"]] - """ - The balance type of your Stripe balance to draw this payout from. Balances for different payment sources are kept separately. You can find the amounts with the Balances API. One of `bank_account`, `card`, or `fpx`. - """ - statement_descriptor: NotRequired[str] - """ - A string that displays on the recipient's bank or card statement (up to 22 characters). A `statement_descriptor` that's longer than 22 characters return an error. Most banks truncate this information and display it inconsistently. Some banks might not display it at all. - """ - - class ListParams(RequestOptions): - arrival_date: NotRequired["Payout.ListParamsArrivalDate|int"] - """ - Only return payouts that are expected to arrive during the given date interval. - """ - created: NotRequired["Payout.ListParamsCreated|int"] - """ - Only return payouts that were created during the given date interval. - """ - destination: NotRequired[str] - """ - The ID of an external account - only return payouts sent to this external account. - """ - 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. - """ - status: NotRequired[str] - """ - Only return payouts that have the given status: `pending`, `paid`, `failed`, or `canceled`. - """ - - class ListParamsArrivalDate(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) - """ - - class ListParamsCreated(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) - """ - - class ModifyParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - - class RetrieveParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class ReverseParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - amount: int """ The amount (in cents (or local equivalent)) that transfers to your bank account or debit card. @@ -311,7 +166,7 @@ class ReverseParams(RequestOptions): @classmethod def _cls_cancel( - cls, payout: str, **params: Unpack["Payout.CancelParams"] + cls, payout: str, **params: Unpack["PayoutCancelParams"] ) -> "Payout": """ You can cancel a previously created payout if its status is pending. Stripe refunds the funds to your available balance. You can't cancel automatic Stripe payouts. @@ -330,7 +185,7 @@ def _cls_cancel( @overload @staticmethod def cancel( - payout: str, **params: Unpack["Payout.CancelParams"] + payout: str, **params: Unpack["PayoutCancelParams"] ) -> "Payout": """ You can cancel a previously created payout if its status is pending. Stripe refunds the funds to your available balance. You can't cancel automatic Stripe payouts. @@ -338,7 +193,7 @@ def cancel( ... @overload - def cancel(self, **params: Unpack["Payout.CancelParams"]) -> "Payout": + def cancel(self, **params: Unpack["PayoutCancelParams"]) -> "Payout": """ You can cancel a previously created payout if its status is pending. Stripe refunds the funds to your available balance. You can't cancel automatic Stripe payouts. """ @@ -346,7 +201,7 @@ def cancel(self, **params: Unpack["Payout.CancelParams"]) -> "Payout": @class_method_variant("_cls_cancel") def cancel( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Payout.CancelParams"] + self, **params: Unpack["PayoutCancelParams"] ) -> "Payout": """ You can cancel a previously created payout if its status is pending. Stripe refunds the funds to your available balance. You can't cancel automatic Stripe payouts. @@ -364,7 +219,7 @@ def cancel( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_cancel_async( - cls, payout: str, **params: Unpack["Payout.CancelParams"] + cls, payout: str, **params: Unpack["PayoutCancelParams"] ) -> "Payout": """ You can cancel a previously created payout if its status is pending. Stripe refunds the funds to your available balance. You can't cancel automatic Stripe payouts. @@ -383,7 +238,7 @@ async def _cls_cancel_async( @overload @staticmethod async def cancel_async( - payout: str, **params: Unpack["Payout.CancelParams"] + payout: str, **params: Unpack["PayoutCancelParams"] ) -> "Payout": """ You can cancel a previously created payout if its status is pending. Stripe refunds the funds to your available balance. You can't cancel automatic Stripe payouts. @@ -392,7 +247,7 @@ async def cancel_async( @overload async def cancel_async( - self, **params: Unpack["Payout.CancelParams"] + self, **params: Unpack["PayoutCancelParams"] ) -> "Payout": """ You can cancel a previously created payout if its status is pending. Stripe refunds the funds to your available balance. You can't cancel automatic Stripe payouts. @@ -401,7 +256,7 @@ async def cancel_async( @class_method_variant("_cls_cancel_async") async def cancel_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Payout.CancelParams"] + self, **params: Unpack["PayoutCancelParams"] ) -> "Payout": """ You can cancel a previously created payout if its status is pending. Stripe refunds the funds to your available balance. You can't cancel automatic Stripe payouts. @@ -418,7 +273,7 @@ async def cancel_async( # pyright: ignore[reportGeneralTypeIssues] ) @classmethod - def create(cls, **params: Unpack["Payout.CreateParams"]) -> "Payout": + def create(cls, **params: Unpack["PayoutCreateParams"]) -> "Payout": """ To send funds to your own bank account, create a new payout object. Your [Stripe balance](https://docs.stripe.com/api#balance) must cover the payout amount. If it doesn't, you receive an “Insufficient Funds” error. @@ -437,7 +292,7 @@ def create(cls, **params: Unpack["Payout.CreateParams"]) -> "Payout": @classmethod async def create_async( - cls, **params: Unpack["Payout.CreateParams"] + cls, **params: Unpack["PayoutCreateParams"] ) -> "Payout": """ To send funds to your own bank account, create a new payout object. Your [Stripe balance](https://docs.stripe.com/api#balance) must cover the payout amount. If it doesn't, you receive an “Insufficient Funds” error. @@ -457,7 +312,7 @@ async def create_async( @classmethod def list( - cls, **params: Unpack["Payout.ListParams"] + cls, **params: Unpack["PayoutListParams"] ) -> ListObject["Payout"]: """ Returns a list of existing payouts sent to third-party bank accounts or payouts that Stripe sent to you. The payouts return in sorted order, with the most recently created payouts appearing first. @@ -477,7 +332,7 @@ def list( @classmethod async def list_async( - cls, **params: Unpack["Payout.ListParams"] + cls, **params: Unpack["PayoutListParams"] ) -> ListObject["Payout"]: """ Returns a list of existing payouts sent to third-party bank accounts or payouts that Stripe sent to you. The payouts return in sorted order, with the most recently created payouts appearing first. @@ -497,7 +352,7 @@ async def list_async( @classmethod def modify( - cls, id: str, **params: Unpack["Payout.ModifyParams"] + cls, id: str, **params: Unpack["PayoutModifyParams"] ) -> "Payout": """ Updates the specified payout by setting the values of the parameters you pass. We don't change parameters that you don't provide. This request only accepts the metadata as arguments. @@ -514,7 +369,7 @@ def modify( @classmethod async def modify_async( - cls, id: str, **params: Unpack["Payout.ModifyParams"] + cls, id: str, **params: Unpack["PayoutModifyParams"] ) -> "Payout": """ Updates the specified payout by setting the values of the parameters you pass. We don't change parameters that you don't provide. This request only accepts the metadata as arguments. @@ -531,7 +386,7 @@ async def modify_async( @classmethod def retrieve( - cls, id: str, **params: Unpack["Payout.RetrieveParams"] + cls, id: str, **params: Unpack["PayoutRetrieveParams"] ) -> "Payout": """ Retrieves the details of an existing payout. Supply the unique payout ID from either a payout creation request or the payout list. Stripe returns the corresponding payout information. @@ -542,7 +397,7 @@ def retrieve( @classmethod async def retrieve_async( - cls, id: str, **params: Unpack["Payout.RetrieveParams"] + cls, id: str, **params: Unpack["PayoutRetrieveParams"] ) -> "Payout": """ Retrieves the details of an existing payout. Supply the unique payout ID from either a payout creation request or the payout list. Stripe returns the corresponding payout information. @@ -553,7 +408,7 @@ async def retrieve_async( @classmethod def _cls_reverse( - cls, payout: str, **params: Unpack["Payout.ReverseParams"] + cls, payout: str, **params: Unpack["PayoutReverseParams"] ) -> "Payout": """ Reverses a payout by debiting the destination bank account. At this time, you can only reverse payouts for connected accounts to US bank accounts. If the payout is manual and in the pending status, use /v1/payouts/:id/cancel instead. @@ -574,7 +429,7 @@ def _cls_reverse( @overload @staticmethod def reverse( - payout: str, **params: Unpack["Payout.ReverseParams"] + payout: str, **params: Unpack["PayoutReverseParams"] ) -> "Payout": """ Reverses a payout by debiting the destination bank account. At this time, you can only reverse payouts for connected accounts to US bank accounts. If the payout is manual and in the pending status, use /v1/payouts/:id/cancel instead. @@ -584,7 +439,7 @@ def reverse( ... @overload - def reverse(self, **params: Unpack["Payout.ReverseParams"]) -> "Payout": + def reverse(self, **params: Unpack["PayoutReverseParams"]) -> "Payout": """ Reverses a payout by debiting the destination bank account. At this time, you can only reverse payouts for connected accounts to US bank accounts. If the payout is manual and in the pending status, use /v1/payouts/:id/cancel instead. @@ -594,7 +449,7 @@ def reverse(self, **params: Unpack["Payout.ReverseParams"]) -> "Payout": @class_method_variant("_cls_reverse") def reverse( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Payout.ReverseParams"] + self, **params: Unpack["PayoutReverseParams"] ) -> "Payout": """ Reverses a payout by debiting the destination bank account. At this time, you can only reverse payouts for connected accounts to US bank accounts. If the payout is manual and in the pending status, use /v1/payouts/:id/cancel instead. @@ -614,7 +469,7 @@ def reverse( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_reverse_async( - cls, payout: str, **params: Unpack["Payout.ReverseParams"] + cls, payout: str, **params: Unpack["PayoutReverseParams"] ) -> "Payout": """ Reverses a payout by debiting the destination bank account. At this time, you can only reverse payouts for connected accounts to US bank accounts. If the payout is manual and in the pending status, use /v1/payouts/:id/cancel instead. @@ -635,7 +490,7 @@ async def _cls_reverse_async( @overload @staticmethod async def reverse_async( - payout: str, **params: Unpack["Payout.ReverseParams"] + payout: str, **params: Unpack["PayoutReverseParams"] ) -> "Payout": """ Reverses a payout by debiting the destination bank account. At this time, you can only reverse payouts for connected accounts to US bank accounts. If the payout is manual and in the pending status, use /v1/payouts/:id/cancel instead. @@ -646,7 +501,7 @@ async def reverse_async( @overload async def reverse_async( - self, **params: Unpack["Payout.ReverseParams"] + self, **params: Unpack["PayoutReverseParams"] ) -> "Payout": """ Reverses a payout by debiting the destination bank account. At this time, you can only reverse payouts for connected accounts to US bank accounts. If the payout is manual and in the pending status, use /v1/payouts/:id/cancel instead. @@ -657,7 +512,7 @@ async def reverse_async( @class_method_variant("_cls_reverse_async") async def reverse_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Payout.ReverseParams"] + self, **params: Unpack["PayoutReverseParams"] ) -> "Payout": """ Reverses a payout by debiting the destination bank account. At this time, you can only reverse payouts for connected accounts to US bank accounts. If the payout is manual and in the pending status, use /v1/payouts/:id/cancel instead. diff --git a/stripe/_payout_service.py b/stripe/_payout_service.py index ebec17306..31dbed352 100644 --- a/stripe/_payout_service.py +++ b/stripe/_payout_service.py @@ -5,158 +5,22 @@ from stripe._request_options import RequestOptions from stripe._stripe_service import StripeService from stripe._util import sanitize_id -from typing import Dict, List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params._payout_cancel_params import PayoutCancelParams + from stripe.params._payout_create_params import PayoutCreateParams + from stripe.params._payout_list_params import PayoutListParams + from stripe.params._payout_retrieve_params import PayoutRetrieveParams + from stripe.params._payout_reverse_params import PayoutReverseParams + from stripe.params._payout_update_params import PayoutUpdateParams -class PayoutService(StripeService): - class CancelParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class CreateParams(TypedDict): - amount: int - """ - A positive integer in cents representing how much to payout. - """ - 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). - """ - description: NotRequired[str] - """ - An arbitrary string attached to the object. Often useful for displaying to users. - """ - destination: NotRequired[str] - """ - The ID of a bank account or a card to send the payout to. If you don't provide a destination, we use the default external account for the specified currency. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - method: NotRequired[Literal["instant", "standard"]] - """ - The method used to send this payout, which is `standard` or `instant`. We support `instant` for payouts to debit cards and bank accounts in certain countries. Learn more about [bank support for Instant Payouts](https://stripe.com/docs/payouts/instant-payouts-banks). - """ - payout_method: NotRequired[str] - """ - The ID of a v2 FinancialAccount to send funds to. - """ - source_type: NotRequired[Literal["bank_account", "card", "fpx"]] - """ - The balance type of your Stripe balance to draw this payout from. Balances for different payment sources are kept separately. You can find the amounts with the Balances API. One of `bank_account`, `card`, or `fpx`. - """ - statement_descriptor: NotRequired[str] - """ - A string that displays on the recipient's bank or card statement (up to 22 characters). A `statement_descriptor` that's longer than 22 characters return an error. Most banks truncate this information and display it inconsistently. Some banks might not display it at all. - """ - - class ListParams(TypedDict): - arrival_date: NotRequired["PayoutService.ListParamsArrivalDate|int"] - """ - Only return payouts that are expected to arrive during the given date interval. - """ - created: NotRequired["PayoutService.ListParamsCreated|int"] - """ - Only return payouts that were created during the given date interval. - """ - destination: NotRequired[str] - """ - The ID of an external account - only return payouts sent to this external account. - """ - 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. - """ - status: NotRequired[str] - """ - Only return payouts that have the given status: `pending`, `paid`, `failed`, or `canceled`. - """ - - class ListParamsArrivalDate(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) - """ - - class ListParamsCreated(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) - """ - - class RetrieveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class ReverseParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - - class UpdateParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ +class PayoutService(StripeService): def list( self, - params: Optional["PayoutService.ListParams"] = None, + params: Optional["PayoutListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[Payout]: """ @@ -175,7 +39,7 @@ def list( async def list_async( self, - params: Optional["PayoutService.ListParams"] = None, + params: Optional["PayoutListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[Payout]: """ @@ -194,7 +58,7 @@ async def list_async( def create( self, - params: "PayoutService.CreateParams", + params: "PayoutCreateParams", options: Optional[RequestOptions] = None, ) -> Payout: """ @@ -217,7 +81,7 @@ def create( async def create_async( self, - params: "PayoutService.CreateParams", + params: "PayoutCreateParams", options: Optional[RequestOptions] = None, ) -> Payout: """ @@ -241,7 +105,7 @@ async def create_async( def retrieve( self, payout: str, - params: Optional["PayoutService.RetrieveParams"] = None, + params: Optional["PayoutRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Payout: """ @@ -261,7 +125,7 @@ def retrieve( async def retrieve_async( self, payout: str, - params: Optional["PayoutService.RetrieveParams"] = None, + params: Optional["PayoutRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Payout: """ @@ -281,7 +145,7 @@ async def retrieve_async( def update( self, payout: str, - params: Optional["PayoutService.UpdateParams"] = None, + params: Optional["PayoutUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> Payout: """ @@ -301,7 +165,7 @@ def update( async def update_async( self, payout: str, - params: Optional["PayoutService.UpdateParams"] = None, + params: Optional["PayoutUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> Payout: """ @@ -321,7 +185,7 @@ async def update_async( def cancel( self, payout: str, - params: Optional["PayoutService.CancelParams"] = None, + params: Optional["PayoutCancelParams"] = None, options: Optional[RequestOptions] = None, ) -> Payout: """ @@ -343,7 +207,7 @@ def cancel( async def cancel_async( self, payout: str, - params: Optional["PayoutService.CancelParams"] = None, + params: Optional["PayoutCancelParams"] = None, options: Optional[RequestOptions] = None, ) -> Payout: """ @@ -365,7 +229,7 @@ async def cancel_async( def reverse( self, payout: str, - params: Optional["PayoutService.ReverseParams"] = None, + params: Optional["PayoutReverseParams"] = None, options: Optional[RequestOptions] = None, ) -> Payout: """ @@ -389,7 +253,7 @@ def reverse( async def reverse_async( self, payout: str, - params: Optional["PayoutService.ReverseParams"] = None, + params: Optional["PayoutReverseParams"] = None, options: Optional[RequestOptions] = None, ) -> Payout: """ diff --git a/stripe/_plan.py b/stripe/_plan.py index 6a66982df..644a58386 100644 --- a/stripe/_plan.py +++ b/stripe/_plan.py @@ -5,21 +5,19 @@ from stripe._expandable_field import ExpandableField from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource -from stripe._request_options import RequestOptions from stripe._stripe_object import StripeObject from stripe._updateable_api_resource import UpdateableAPIResource from stripe._util import class_method_variant, sanitize_id -from typing import ClassVar, Dict, List, Optional, Union, cast, overload -from typing_extensions import ( - Literal, - NotRequired, - TypedDict, - Unpack, - TYPE_CHECKING, -) +from typing import ClassVar, Dict, List, Optional, cast, overload +from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: from stripe._product import Product + from stripe.params._plan_create_params import PlanCreateParams + from stripe.params._plan_delete_params import PlanDeleteParams + from stripe.params._plan_list_params import PlanListParams + from stripe.params._plan_modify_params import PlanModifyParams + from stripe.params._plan_retrieve_params import PlanRetrieveParams class Plan( @@ -73,224 +71,6 @@ class TransformUsage(StripeObject): After division, either round the result `up` or `down`. """ - class CreateParams(RequestOptions): - active: NotRequired[bool] - """ - Whether the plan is currently available for new subscriptions. Defaults to `true`. - """ - amount: NotRequired[int] - """ - A positive integer in cents (or local equivalent) (or 0 for a free plan) representing how much to charge on a recurring basis. - """ - amount_decimal: NotRequired[str] - """ - Same as `amount`, but accepts a decimal value with at most 12 decimal places. Only one of `amount` and `amount_decimal` can be set. - """ - billing_scheme: NotRequired[Literal["per_unit", "tiered"]] - """ - Describes how to compute the price per period. Either `per_unit` or `tiered`. `per_unit` indicates that the fixed amount (specified in `amount`) will be charged per unit in `quantity` (for plans with `usage_type=licensed`), or per unit of total usage (for plans with `usage_type=metered`). `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the `tiers` and `tiers_mode` attributes. - """ - 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. - """ - id: NotRequired[str] - """ - An identifier randomly generated by Stripe. Used to identify this plan when subscribing a customer. You can optionally override this ID, but the ID must be unique across all plans in your Stripe account. You can, however, use the same plan ID in both live and test modes. - """ - interval: Literal["day", "month", "week", "year"] - """ - Specifies billing frequency. Either `day`, `week`, `month` or `year`. - """ - interval_count: NotRequired[int] - """ - The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - meter: NotRequired[str] - """ - The meter tracking the usage of a metered price - """ - nickname: NotRequired[str] - """ - A brief description of the plan, hidden from customers. - """ - product: NotRequired["Plan.CreateParamsProduct|str"] - tiers: NotRequired[List["Plan.CreateParamsTier"]] - """ - Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. - """ - tiers_mode: NotRequired[Literal["graduated", "volume"]] - """ - Defines if the tiering price should be `graduated` or `volume` based. In `volume`-based tiering, the maximum quantity within a period determines the per unit price, in `graduated` tiering pricing can successively change as the quantity grows. - """ - transform_usage: NotRequired["Plan.CreateParamsTransformUsage"] - """ - Apply a transformation to the reported usage or set quantity before computing the billed price. Cannot be combined with `tiers`. - """ - trial_period_days: NotRequired[int] - """ - Default number of trial days when subscribing a customer to this plan using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan). - """ - usage_type: NotRequired[Literal["licensed", "metered"]] - """ - Configures how the quantity per period should be determined. Can be either `metered` or `licensed`. `licensed` automatically bills the `quantity` set when adding it to a subscription. `metered` aggregates the total usage based on usage records. Defaults to `licensed`. - """ - - class CreateParamsProduct(TypedDict): - active: NotRequired[bool] - """ - Whether the product is currently available for purchase. Defaults to `true`. - """ - id: NotRequired[str] - """ - The identifier for the product. Must be unique. If not provided, an identifier will be randomly generated. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - name: str - """ - The product's name, meant to be displayable to the customer. - """ - statement_descriptor: NotRequired[str] - """ - An arbitrary string to be displayed on your customer's credit card or bank statement. While most banks display this information consistently, some may display it incorrectly or not at all. - - This may be up to 22 characters. The statement description may not include `<`, `>`, `\\`, `"`, `'` characters, and will appear on your customer's statement in capital letters. Non-ASCII characters are automatically stripped. - """ - tax_code: NotRequired[str] - """ - A [tax code](https://stripe.com/docs/tax/tax-categories) ID. - """ - unit_label: NotRequired[str] - """ - A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal. - """ - - class CreateParamsTier(TypedDict): - flat_amount: NotRequired[int] - """ - The flat billing amount for an entire tier, regardless of the number of units in the tier. - """ - flat_amount_decimal: NotRequired[str] - """ - Same as `flat_amount`, but accepts a decimal value representing an integer in the minor units of the currency. Only one of `flat_amount` and `flat_amount_decimal` can be set. - """ - unit_amount: NotRequired[int] - """ - The per unit billing amount for each individual unit for which this tier applies. - """ - unit_amount_decimal: NotRequired[str] - """ - Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - """ - up_to: Union[Literal["inf"], int] - """ - Specifies the upper bound of this tier. The lower bound of a tier is the upper bound of the previous tier adding one. Use `inf` to define a fallback tier. - """ - - class CreateParamsTransformUsage(TypedDict): - divide_by: int - """ - Divide usage by this number. - """ - round: Literal["down", "up"] - """ - After division, either round the result `up` or `down`. - """ - - class DeleteParams(RequestOptions): - pass - - class ListParams(RequestOptions): - active: NotRequired[bool] - """ - Only return plans that are active or inactive (e.g., pass `false` to list all inactive plans). - """ - created: NotRequired["Plan.ListParamsCreated|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. - """ - product: NotRequired[str] - """ - Only return plans for the given product. - """ - 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 ListParamsCreated(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) - """ - - class ModifyParams(RequestOptions): - active: NotRequired[bool] - """ - Whether the plan is currently available for new subscriptions. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - nickname: NotRequired[str] - """ - A brief description of the plan, hidden from customers. - """ - product: NotRequired[str] - """ - The product the plan belongs to. This cannot be changed once it has been used in a subscription or subscription schedule. - """ - trial_period_days: NotRequired[int] - """ - Default number of trial days when subscribing a customer to this plan using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan). - """ - - class RetrieveParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - active: bool """ Whether the plan can be used for new purchases. @@ -377,7 +157,7 @@ class RetrieveParams(RequestOptions): """ @classmethod - def create(cls, **params: Unpack["Plan.CreateParams"]) -> "Plan": + def create(cls, **params: Unpack["PlanCreateParams"]) -> "Plan": """ You can now model subscriptions more flexibly using the [Prices API](https://docs.stripe.com/api#prices). It replaces the Plans API and is backwards compatible to simplify your migration. """ @@ -392,7 +172,7 @@ def create(cls, **params: Unpack["Plan.CreateParams"]) -> "Plan": @classmethod async def create_async( - cls, **params: Unpack["Plan.CreateParams"] + cls, **params: Unpack["PlanCreateParams"] ) -> "Plan": """ You can now model subscriptions more flexibly using the [Prices API](https://docs.stripe.com/api#prices). It replaces the Plans API and is backwards compatible to simplify your migration. @@ -408,7 +188,7 @@ async def create_async( @classmethod def _cls_delete( - cls, sid: str, **params: Unpack["Plan.DeleteParams"] + cls, sid: str, **params: Unpack["PlanDeleteParams"] ) -> "Plan": """ Deleting plans means new subscribers can't be added. Existing subscribers aren't affected. @@ -425,14 +205,14 @@ def _cls_delete( @overload @staticmethod - def delete(sid: str, **params: Unpack["Plan.DeleteParams"]) -> "Plan": + def delete(sid: str, **params: Unpack["PlanDeleteParams"]) -> "Plan": """ Deleting plans means new subscribers can't be added. Existing subscribers aren't affected. """ ... @overload - def delete(self, **params: Unpack["Plan.DeleteParams"]) -> "Plan": + def delete(self, **params: Unpack["PlanDeleteParams"]) -> "Plan": """ Deleting plans means new subscribers can't be added. Existing subscribers aren't affected. """ @@ -440,7 +220,7 @@ def delete(self, **params: Unpack["Plan.DeleteParams"]) -> "Plan": @class_method_variant("_cls_delete") def delete( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Plan.DeleteParams"] + self, **params: Unpack["PlanDeleteParams"] ) -> "Plan": """ Deleting plans means new subscribers can't be added. Existing subscribers aren't affected. @@ -453,7 +233,7 @@ def delete( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_delete_async( - cls, sid: str, **params: Unpack["Plan.DeleteParams"] + cls, sid: str, **params: Unpack["PlanDeleteParams"] ) -> "Plan": """ Deleting plans means new subscribers can't be added. Existing subscribers aren't affected. @@ -471,7 +251,7 @@ async def _cls_delete_async( @overload @staticmethod async def delete_async( - sid: str, **params: Unpack["Plan.DeleteParams"] + sid: str, **params: Unpack["PlanDeleteParams"] ) -> "Plan": """ Deleting plans means new subscribers can't be added. Existing subscribers aren't affected. @@ -480,7 +260,7 @@ async def delete_async( @overload async def delete_async( - self, **params: Unpack["Plan.DeleteParams"] + self, **params: Unpack["PlanDeleteParams"] ) -> "Plan": """ Deleting plans means new subscribers can't be added. Existing subscribers aren't affected. @@ -489,7 +269,7 @@ async def delete_async( @class_method_variant("_cls_delete_async") async def delete_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Plan.DeleteParams"] + self, **params: Unpack["PlanDeleteParams"] ) -> "Plan": """ Deleting plans means new subscribers can't be added. Existing subscribers aren't affected. @@ -501,7 +281,7 @@ async def delete_async( # pyright: ignore[reportGeneralTypeIssues] ) @classmethod - def list(cls, **params: Unpack["Plan.ListParams"]) -> ListObject["Plan"]: + def list(cls, **params: Unpack["PlanListParams"]) -> ListObject["Plan"]: """ Returns a list of your plans. """ @@ -520,7 +300,7 @@ def list(cls, **params: Unpack["Plan.ListParams"]) -> ListObject["Plan"]: @classmethod async def list_async( - cls, **params: Unpack["Plan.ListParams"] + cls, **params: Unpack["PlanListParams"] ) -> ListObject["Plan"]: """ Returns a list of your plans. @@ -539,7 +319,7 @@ async def list_async( return result @classmethod - def modify(cls, id: str, **params: Unpack["Plan.ModifyParams"]) -> "Plan": + def modify(cls, id: str, **params: Unpack["PlanModifyParams"]) -> "Plan": """ Updates the specified plan by setting the values of the parameters passed. Any parameters not provided are left unchanged. By design, you cannot change a plan's ID, amount, currency, or billing cycle. """ @@ -555,7 +335,7 @@ def modify(cls, id: str, **params: Unpack["Plan.ModifyParams"]) -> "Plan": @classmethod async def modify_async( - cls, id: str, **params: Unpack["Plan.ModifyParams"] + cls, id: str, **params: Unpack["PlanModifyParams"] ) -> "Plan": """ Updates the specified plan by setting the values of the parameters passed. Any parameters not provided are left unchanged. By design, you cannot change a plan's ID, amount, currency, or billing cycle. @@ -572,7 +352,7 @@ async def modify_async( @classmethod def retrieve( - cls, id: str, **params: Unpack["Plan.RetrieveParams"] + cls, id: str, **params: Unpack["PlanRetrieveParams"] ) -> "Plan": """ Retrieves the plan with the given ID. @@ -583,7 +363,7 @@ def retrieve( @classmethod async def retrieve_async( - cls, id: str, **params: Unpack["Plan.RetrieveParams"] + cls, id: str, **params: Unpack["PlanRetrieveParams"] ) -> "Plan": """ Retrieves the plan with the given ID. diff --git a/stripe/_plan_service.py b/stripe/_plan_service.py index 30e129018..6050e2c2a 100644 --- a/stripe/_plan_service.py +++ b/stripe/_plan_service.py @@ -5,233 +5,22 @@ from stripe._request_options import RequestOptions from stripe._stripe_service import StripeService from stripe._util import sanitize_id -from typing import Dict, List, Optional, Union, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params._plan_create_params import PlanCreateParams + from stripe.params._plan_delete_params import PlanDeleteParams + from stripe.params._plan_list_params import PlanListParams + from stripe.params._plan_retrieve_params import PlanRetrieveParams + from stripe.params._plan_update_params import PlanUpdateParams -class PlanService(StripeService): - class CreateParams(TypedDict): - active: NotRequired[bool] - """ - Whether the plan is currently available for new subscriptions. Defaults to `true`. - """ - amount: NotRequired[int] - """ - A positive integer in cents (or local equivalent) (or 0 for a free plan) representing how much to charge on a recurring basis. - """ - amount_decimal: NotRequired[str] - """ - Same as `amount`, but accepts a decimal value with at most 12 decimal places. Only one of `amount` and `amount_decimal` can be set. - """ - billing_scheme: NotRequired[Literal["per_unit", "tiered"]] - """ - Describes how to compute the price per period. Either `per_unit` or `tiered`. `per_unit` indicates that the fixed amount (specified in `amount`) will be charged per unit in `quantity` (for plans with `usage_type=licensed`), or per unit of total usage (for plans with `usage_type=metered`). `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the `tiers` and `tiers_mode` attributes. - """ - 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. - """ - id: NotRequired[str] - """ - An identifier randomly generated by Stripe. Used to identify this plan when subscribing a customer. You can optionally override this ID, but the ID must be unique across all plans in your Stripe account. You can, however, use the same plan ID in both live and test modes. - """ - interval: Literal["day", "month", "week", "year"] - """ - Specifies billing frequency. Either `day`, `week`, `month` or `year`. - """ - interval_count: NotRequired[int] - """ - The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - meter: NotRequired[str] - """ - The meter tracking the usage of a metered price - """ - nickname: NotRequired[str] - """ - A brief description of the plan, hidden from customers. - """ - product: NotRequired["PlanService.CreateParamsProduct|str"] - tiers: NotRequired[List["PlanService.CreateParamsTier"]] - """ - Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. - """ - tiers_mode: NotRequired[Literal["graduated", "volume"]] - """ - Defines if the tiering price should be `graduated` or `volume` based. In `volume`-based tiering, the maximum quantity within a period determines the per unit price, in `graduated` tiering pricing can successively change as the quantity grows. - """ - transform_usage: NotRequired["PlanService.CreateParamsTransformUsage"] - """ - Apply a transformation to the reported usage or set quantity before computing the billed price. Cannot be combined with `tiers`. - """ - trial_period_days: NotRequired[int] - """ - Default number of trial days when subscribing a customer to this plan using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan). - """ - usage_type: NotRequired[Literal["licensed", "metered"]] - """ - Configures how the quantity per period should be determined. Can be either `metered` or `licensed`. `licensed` automatically bills the `quantity` set when adding it to a subscription. `metered` aggregates the total usage based on usage records. Defaults to `licensed`. - """ - - class CreateParamsProduct(TypedDict): - active: NotRequired[bool] - """ - Whether the product is currently available for purchase. Defaults to `true`. - """ - id: NotRequired[str] - """ - The identifier for the product. Must be unique. If not provided, an identifier will be randomly generated. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - name: str - """ - The product's name, meant to be displayable to the customer. - """ - statement_descriptor: NotRequired[str] - """ - An arbitrary string to be displayed on your customer's credit card or bank statement. While most banks display this information consistently, some may display it incorrectly or not at all. - - This may be up to 22 characters. The statement description may not include `<`, `>`, `\\`, `"`, `'` characters, and will appear on your customer's statement in capital letters. Non-ASCII characters are automatically stripped. - """ - tax_code: NotRequired[str] - """ - A [tax code](https://stripe.com/docs/tax/tax-categories) ID. - """ - unit_label: NotRequired[str] - """ - A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal. - """ - - class CreateParamsTier(TypedDict): - flat_amount: NotRequired[int] - """ - The flat billing amount for an entire tier, regardless of the number of units in the tier. - """ - flat_amount_decimal: NotRequired[str] - """ - Same as `flat_amount`, but accepts a decimal value representing an integer in the minor units of the currency. Only one of `flat_amount` and `flat_amount_decimal` can be set. - """ - unit_amount: NotRequired[int] - """ - The per unit billing amount for each individual unit for which this tier applies. - """ - unit_amount_decimal: NotRequired[str] - """ - Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - """ - up_to: Union[Literal["inf"], int] - """ - Specifies the upper bound of this tier. The lower bound of a tier is the upper bound of the previous tier adding one. Use `inf` to define a fallback tier. - """ - - class CreateParamsTransformUsage(TypedDict): - divide_by: int - """ - Divide usage by this number. - """ - round: Literal["down", "up"] - """ - After division, either round the result `up` or `down`. - """ - - class DeleteParams(TypedDict): - pass - - class ListParams(TypedDict): - active: NotRequired[bool] - """ - Only return plans that are active or inactive (e.g., pass `false` to list all inactive plans). - """ - created: NotRequired["PlanService.ListParamsCreated|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. - """ - product: NotRequired[str] - """ - Only return plans for the given product. - """ - 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 ListParamsCreated(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) - """ - - class RetrieveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class UpdateParams(TypedDict): - active: NotRequired[bool] - """ - Whether the plan is currently available for new subscriptions. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - nickname: NotRequired[str] - """ - A brief description of the plan, hidden from customers. - """ - product: NotRequired[str] - """ - The product the plan belongs to. This cannot be changed once it has been used in a subscription or subscription schedule. - """ - trial_period_days: NotRequired[int] - """ - Default number of trial days when subscribing a customer to this plan using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan). - """ +class PlanService(StripeService): def delete( self, plan: str, - params: Optional["PlanService.DeleteParams"] = None, + params: Optional["PlanDeleteParams"] = None, options: Optional[RequestOptions] = None, ) -> Plan: """ @@ -251,7 +40,7 @@ def delete( async def delete_async( self, plan: str, - params: Optional["PlanService.DeleteParams"] = None, + params: Optional["PlanDeleteParams"] = None, options: Optional[RequestOptions] = None, ) -> Plan: """ @@ -271,7 +60,7 @@ async def delete_async( def retrieve( self, plan: str, - params: Optional["PlanService.RetrieveParams"] = None, + params: Optional["PlanRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Plan: """ @@ -291,7 +80,7 @@ def retrieve( async def retrieve_async( self, plan: str, - params: Optional["PlanService.RetrieveParams"] = None, + params: Optional["PlanRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Plan: """ @@ -311,7 +100,7 @@ async def retrieve_async( def update( self, plan: str, - params: Optional["PlanService.UpdateParams"] = None, + params: Optional["PlanUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> Plan: """ @@ -331,7 +120,7 @@ def update( async def update_async( self, plan: str, - params: Optional["PlanService.UpdateParams"] = None, + params: Optional["PlanUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> Plan: """ @@ -350,7 +139,7 @@ async def update_async( def list( self, - params: Optional["PlanService.ListParams"] = None, + params: Optional["PlanListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[Plan]: """ @@ -369,7 +158,7 @@ def list( async def list_async( self, - params: Optional["PlanService.ListParams"] = None, + params: Optional["PlanListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[Plan]: """ @@ -388,7 +177,7 @@ async def list_async( def create( self, - params: "PlanService.CreateParams", + params: "PlanCreateParams", options: Optional[RequestOptions] = None, ) -> Plan: """ @@ -407,7 +196,7 @@ def create( async def create_async( self, - params: "PlanService.CreateParams", + params: "PlanCreateParams", options: Optional[RequestOptions] = None, ) -> Plan: """ diff --git a/stripe/_price.py b/stripe/_price.py index 862960f00..55ba588e1 100644 --- a/stripe/_price.py +++ b/stripe/_price.py @@ -4,7 +4,6 @@ from stripe._expandable_field import ExpandableField from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource -from stripe._request_options import RequestOptions from stripe._search_result_object import SearchResultObject from stripe._searchable_api_resource import SearchableAPIResource from stripe._stripe_object import StripeObject @@ -17,19 +16,17 @@ Iterator, List, Optional, - Union, cast, ) -from typing_extensions import ( - Literal, - NotRequired, - TypedDict, - Unpack, - TYPE_CHECKING, -) +from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: from stripe._product import Product + from stripe.params._price_create_params import PriceCreateParams + from stripe.params._price_list_params import PriceListParams + from stripe.params._price_modify_params import PriceModifyParams + from stripe.params._price_retrieve_params import PriceRetrieveParams + from stripe.params._price_search_params import PriceSearchParams class Price( @@ -195,482 +192,6 @@ class TransformQuantity(StripeObject): After division, either round the result `up` or `down`. """ - class CreateParams(RequestOptions): - active: NotRequired[bool] - """ - Whether the price can be used for new purchases. Defaults to `true`. - """ - billing_scheme: NotRequired[Literal["per_unit", "tiered"]] - """ - Describes how to compute the price per period. Either `per_unit` or `tiered`. `per_unit` indicates that the fixed amount (specified in `unit_amount` or `unit_amount_decimal`) will be charged per unit in `quantity` (for prices with `usage_type=licensed`), or per unit of total usage (for prices with `usage_type=metered`). `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the `tiers` and `tiers_mode` attributes. - """ - 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). - """ - currency_options: NotRequired[ - Dict[str, "Price.CreateParamsCurrencyOptions"] - ] - """ - Prices defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). - """ - custom_unit_amount: NotRequired["Price.CreateParamsCustomUnitAmount"] - """ - When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - lookup_key: NotRequired[str] - """ - A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - nickname: NotRequired[str] - """ - A brief description of the price, hidden from customers. - """ - product: NotRequired[str] - """ - The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to. - """ - product_data: NotRequired["Price.CreateParamsProductData"] - """ - These fields can be used to create a new product that this price will belong to. - """ - recurring: NotRequired["Price.CreateParamsRecurring"] - """ - The recurring components of a price such as `interval` and `usage_type`. - """ - tax_behavior: NotRequired[ - Literal["exclusive", "inclusive", "unspecified"] - ] - """ - Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. - """ - tiers: NotRequired[List["Price.CreateParamsTier"]] - """ - Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. - """ - tiers_mode: NotRequired[Literal["graduated", "volume"]] - """ - Defines if the tiering price should be `graduated` or `volume` based. In `volume`-based tiering, the maximum quantity within a period determines the per unit price, in `graduated` tiering pricing can successively change as the quantity grows. - """ - transfer_lookup_key: NotRequired[bool] - """ - If set to true, will atomically remove the lookup key from the existing price, and assign it to this price. - """ - transform_quantity: NotRequired["Price.CreateParamsTransformQuantity"] - """ - Apply a transformation to the reported usage or set quantity before computing the billed price. Cannot be combined with `tiers`. - """ - unit_amount: NotRequired[int] - """ - A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. One of `unit_amount`, `unit_amount_decimal`, or `custom_unit_amount` is required, unless `billing_scheme=tiered`. - """ - unit_amount_decimal: NotRequired[str] - """ - Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - """ - - class CreateParamsCurrencyOptions(TypedDict): - custom_unit_amount: NotRequired[ - "Price.CreateParamsCurrencyOptionsCustomUnitAmount" - ] - """ - When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. - """ - tax_behavior: NotRequired[ - Literal["exclusive", "inclusive", "unspecified"] - ] - """ - Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. - """ - tiers: NotRequired[List["Price.CreateParamsCurrencyOptionsTier"]] - """ - Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. - """ - unit_amount: NotRequired[int] - """ - A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. - """ - unit_amount_decimal: NotRequired[str] - """ - Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - """ - - class CreateParamsCurrencyOptionsCustomUnitAmount(TypedDict): - enabled: bool - """ - Pass in `true` to enable `custom_unit_amount`, otherwise omit `custom_unit_amount`. - """ - maximum: NotRequired[int] - """ - The maximum unit amount the customer can specify for this item. - """ - minimum: NotRequired[int] - """ - The minimum unit amount the customer can specify for this item. Must be at least the minimum charge amount. - """ - preset: NotRequired[int] - """ - The starting unit amount which can be updated by the customer. - """ - - class CreateParamsCurrencyOptionsTier(TypedDict): - flat_amount: NotRequired[int] - """ - The flat billing amount for an entire tier, regardless of the number of units in the tier. - """ - flat_amount_decimal: NotRequired[str] - """ - Same as `flat_amount`, but accepts a decimal value representing an integer in the minor units of the currency. Only one of `flat_amount` and `flat_amount_decimal` can be set. - """ - unit_amount: NotRequired[int] - """ - The per unit billing amount for each individual unit for which this tier applies. - """ - unit_amount_decimal: NotRequired[str] - """ - Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - """ - up_to: Union[Literal["inf"], int] - """ - Specifies the upper bound of this tier. The lower bound of a tier is the upper bound of the previous tier adding one. Use `inf` to define a fallback tier. - """ - - class CreateParamsCustomUnitAmount(TypedDict): - enabled: bool - """ - Pass in `true` to enable `custom_unit_amount`, otherwise omit `custom_unit_amount`. - """ - maximum: NotRequired[int] - """ - The maximum unit amount the customer can specify for this item. - """ - minimum: NotRequired[int] - """ - The minimum unit amount the customer can specify for this item. Must be at least the minimum charge amount. - """ - preset: NotRequired[int] - """ - The starting unit amount which can be updated by the customer. - """ - - class CreateParamsProductData(TypedDict): - active: NotRequired[bool] - """ - Whether the product is currently available for purchase. Defaults to `true`. - """ - id: NotRequired[str] - """ - The identifier for the product. Must be unique. If not provided, an identifier will be randomly generated. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - name: str - """ - The product's name, meant to be displayable to the customer. - """ - statement_descriptor: NotRequired[str] - """ - An arbitrary string to be displayed on your customer's credit card or bank statement. While most banks display this information consistently, some may display it incorrectly or not at all. - - This may be up to 22 characters. The statement description may not include `<`, `>`, `\\`, `"`, `'` characters, and will appear on your customer's statement in capital letters. Non-ASCII characters are automatically stripped. - """ - tax_code: NotRequired[str] - """ - A [tax code](https://stripe.com/docs/tax/tax-categories) ID. - """ - unit_label: NotRequired[str] - """ - A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal. - """ - - class CreateParamsRecurring(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Specifies billing frequency. Either `day`, `week`, `month` or `year`. - """ - interval_count: NotRequired[int] - """ - The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). - """ - meter: NotRequired[str] - """ - The meter tracking the usage of a metered price - """ - trial_period_days: NotRequired[int] - """ - Default number of trial days when subscribing a customer to this price using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan). - """ - usage_type: NotRequired[Literal["licensed", "metered"]] - """ - Configures how the quantity per period should be determined. Can be either `metered` or `licensed`. `licensed` automatically bills the `quantity` set when adding it to a subscription. `metered` aggregates the total usage based on usage records. Defaults to `licensed`. - """ - - class CreateParamsTier(TypedDict): - flat_amount: NotRequired[int] - """ - The flat billing amount for an entire tier, regardless of the number of units in the tier. - """ - flat_amount_decimal: NotRequired[str] - """ - Same as `flat_amount`, but accepts a decimal value representing an integer in the minor units of the currency. Only one of `flat_amount` and `flat_amount_decimal` can be set. - """ - unit_amount: NotRequired[int] - """ - The per unit billing amount for each individual unit for which this tier applies. - """ - unit_amount_decimal: NotRequired[str] - """ - Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - """ - up_to: Union[Literal["inf"], int] - """ - Specifies the upper bound of this tier. The lower bound of a tier is the upper bound of the previous tier adding one. Use `inf` to define a fallback tier. - """ - - class CreateParamsTransformQuantity(TypedDict): - divide_by: int - """ - Divide usage by this number. - """ - round: Literal["down", "up"] - """ - After division, either round the result `up` or `down`. - """ - - class ListParams(RequestOptions): - active: NotRequired[bool] - """ - Only return prices that are active or inactive (e.g., pass `false` to list all inactive prices). - """ - created: NotRequired["Price.ListParamsCreated|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. - """ - currency: NotRequired[str] - """ - Only return prices for the given currency. - """ - 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. - """ - lookup_keys: NotRequired[List[str]] - """ - Only return the price with these lookup_keys, if any exist. You can specify up to 10 lookup_keys. - """ - product: NotRequired[str] - """ - Only return prices for the given product. - """ - recurring: NotRequired["Price.ListParamsRecurring"] - """ - Only return prices with these recurring fields. - """ - 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. - """ - type: NotRequired[Literal["one_time", "recurring"]] - """ - Only return prices of type `recurring` or `one_time`. - """ - - class ListParamsCreated(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) - """ - - class ListParamsRecurring(TypedDict): - interval: NotRequired[Literal["day", "month", "week", "year"]] - """ - Filter by billing frequency. Either `day`, `week`, `month` or `year`. - """ - meter: NotRequired[str] - """ - Filter by the price's meter. - """ - usage_type: NotRequired[Literal["licensed", "metered"]] - """ - Filter by the usage type for this price. Can be either `metered` or `licensed`. - """ - - class ModifyParams(RequestOptions): - active: NotRequired[bool] - """ - Whether the price can be used for new purchases. Defaults to `true`. - """ - currency_options: NotRequired[ - "Literal['']|Dict[str, Price.ModifyParamsCurrencyOptions]" - ] - """ - Prices defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - lookup_key: NotRequired[str] - """ - A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - migrate_to: NotRequired["Literal['']|Price.ModifyParamsMigrateTo"] - """ - If specified, subscriptions using this price will be updated to use the new referenced price. - """ - nickname: NotRequired[str] - """ - A brief description of the price, hidden from customers. - """ - tax_behavior: NotRequired[ - Literal["exclusive", "inclusive", "unspecified"] - ] - """ - Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. - """ - transfer_lookup_key: NotRequired[bool] - """ - If set to true, will atomically remove the lookup key from the existing price, and assign it to this price. - """ - - class ModifyParamsCurrencyOptions(TypedDict): - custom_unit_amount: NotRequired[ - "Price.ModifyParamsCurrencyOptionsCustomUnitAmount" - ] - """ - When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. - """ - tax_behavior: NotRequired[ - Literal["exclusive", "inclusive", "unspecified"] - ] - """ - Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. - """ - tiers: NotRequired[List["Price.ModifyParamsCurrencyOptionsTier"]] - """ - Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. - """ - unit_amount: NotRequired[int] - """ - A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. - """ - unit_amount_decimal: NotRequired[str] - """ - Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - """ - - class ModifyParamsCurrencyOptionsCustomUnitAmount(TypedDict): - enabled: bool - """ - Pass in `true` to enable `custom_unit_amount`, otherwise omit `custom_unit_amount`. - """ - maximum: NotRequired[int] - """ - The maximum unit amount the customer can specify for this item. - """ - minimum: NotRequired[int] - """ - The minimum unit amount the customer can specify for this item. Must be at least the minimum charge amount. - """ - preset: NotRequired[int] - """ - The starting unit amount which can be updated by the customer. - """ - - class ModifyParamsCurrencyOptionsTier(TypedDict): - flat_amount: NotRequired[int] - """ - The flat billing amount for an entire tier, regardless of the number of units in the tier. - """ - flat_amount_decimal: NotRequired[str] - """ - Same as `flat_amount`, but accepts a decimal value representing an integer in the minor units of the currency. Only one of `flat_amount` and `flat_amount_decimal` can be set. - """ - unit_amount: NotRequired[int] - """ - The per unit billing amount for each individual unit for which this tier applies. - """ - unit_amount_decimal: NotRequired[str] - """ - Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - """ - up_to: Union[Literal["inf"], int] - """ - Specifies the upper bound of this tier. The lower bound of a tier is the upper bound of the previous tier adding one. Use `inf` to define a fallback tier. - """ - - class ModifyParamsMigrateTo(TypedDict): - behavior: Literal["at_cycle_end"] - """ - The behavior controlling the point in the subscription lifecycle after which to migrate the price. Currently must be `at_cycle_end`. - """ - effective_after: NotRequired[int] - """ - The time after which subscriptions should start using the new price. - """ - price: str - """ - The ID of the price object. - """ - - class RetrieveParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class SearchParams(RequestOptions): - 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. - """ - page: NotRequired[str] - """ - A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. - """ - query: str - """ - The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for prices](https://stripe.com/docs/search#query-fields-for-prices). - """ - active: bool """ Whether the price can be used for new purchases. @@ -765,7 +286,7 @@ class SearchParams(RequestOptions): """ @classmethod - def create(cls, **params: Unpack["Price.CreateParams"]) -> "Price": + def create(cls, **params: Unpack["PriceCreateParams"]) -> "Price": """ Creates a new [Price for an existing Product](https://docs.stripe.com/api/prices). The Price can be recurring or one-time. """ @@ -780,7 +301,7 @@ def create(cls, **params: Unpack["Price.CreateParams"]) -> "Price": @classmethod async def create_async( - cls, **params: Unpack["Price.CreateParams"] + cls, **params: Unpack["PriceCreateParams"] ) -> "Price": """ Creates a new [Price for an existing Product](https://docs.stripe.com/api/prices). The Price can be recurring or one-time. @@ -795,7 +316,7 @@ async def create_async( ) @classmethod - def list(cls, **params: Unpack["Price.ListParams"]) -> ListObject["Price"]: + def list(cls, **params: Unpack["PriceListParams"]) -> ListObject["Price"]: """ Returns a list of your active prices, excluding [inline prices](https://docs.stripe.com/docs/products-prices/pricing-models#inline-pricing). For the list of inactive prices, set active to false. """ @@ -814,7 +335,7 @@ def list(cls, **params: Unpack["Price.ListParams"]) -> ListObject["Price"]: @classmethod async def list_async( - cls, **params: Unpack["Price.ListParams"] + cls, **params: Unpack["PriceListParams"] ) -> ListObject["Price"]: """ Returns a list of your active prices, excluding [inline prices](https://docs.stripe.com/docs/products-prices/pricing-models#inline-pricing). For the list of inactive prices, set active to false. @@ -833,9 +354,7 @@ async def list_async( return result @classmethod - def modify( - cls, id: str, **params: Unpack["Price.ModifyParams"] - ) -> "Price": + def modify(cls, id: str, **params: Unpack["PriceModifyParams"]) -> "Price": """ Updates the specified price by setting the values of the parameters passed. Any parameters not provided are left unchanged. """ @@ -851,7 +370,7 @@ def modify( @classmethod async def modify_async( - cls, id: str, **params: Unpack["Price.ModifyParams"] + cls, id: str, **params: Unpack["PriceModifyParams"] ) -> "Price": """ Updates the specified price by setting the values of the parameters passed. Any parameters not provided are left unchanged. @@ -868,7 +387,7 @@ async def modify_async( @classmethod def retrieve( - cls, id: str, **params: Unpack["Price.RetrieveParams"] + cls, id: str, **params: Unpack["PriceRetrieveParams"] ) -> "Price": """ Retrieves the price with the given ID. @@ -879,7 +398,7 @@ def retrieve( @classmethod async def retrieve_async( - cls, id: str, **params: Unpack["Price.RetrieveParams"] + cls, id: str, **params: Unpack["PriceRetrieveParams"] ) -> "Price": """ Retrieves the price with the given ID. @@ -890,7 +409,7 @@ async def retrieve_async( @classmethod def search( - cls, *args, **kwargs: Unpack["Price.SearchParams"] + cls, *args, **kwargs: Unpack["PriceSearchParams"] ) -> SearchResultObject["Price"]: """ Search for prices you've previously created using Stripe's [Search Query Language](https://docs.stripe.com/docs/search#search-query-language). @@ -902,7 +421,7 @@ def search( @classmethod async def search_async( - cls, *args, **kwargs: Unpack["Price.SearchParams"] + cls, *args, **kwargs: Unpack["PriceSearchParams"] ) -> SearchResultObject["Price"]: """ Search for prices you've previously created using Stripe's [Search Query Language](https://docs.stripe.com/docs/search#search-query-language). @@ -916,13 +435,13 @@ async def search_async( @classmethod def search_auto_paging_iter( - cls, *args, **kwargs: Unpack["Price.SearchParams"] + cls, *args, **kwargs: Unpack["PriceSearchParams"] ) -> Iterator["Price"]: return cls.search(*args, **kwargs).auto_paging_iter() @classmethod async def search_auto_paging_iter_async( - cls, *args, **kwargs: Unpack["Price.SearchParams"] + cls, *args, **kwargs: Unpack["PriceSearchParams"] ) -> AsyncIterator["Price"]: return (await cls.search_async(*args, **kwargs)).auto_paging_iter() diff --git a/stripe/_price_service.py b/stripe/_price_service.py index 15f86c76f..48753de6d 100644 --- a/stripe/_price_service.py +++ b/stripe/_price_service.py @@ -6,500 +6,21 @@ from stripe._search_result_object import SearchResultObject from stripe._stripe_service import StripeService from stripe._util import sanitize_id -from typing import Dict, List, Optional, Union, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params._price_create_params import PriceCreateParams + from stripe.params._price_list_params import PriceListParams + from stripe.params._price_retrieve_params import PriceRetrieveParams + from stripe.params._price_search_params import PriceSearchParams + from stripe.params._price_update_params import PriceUpdateParams -class PriceService(StripeService): - class CreateParams(TypedDict): - active: NotRequired[bool] - """ - Whether the price can be used for new purchases. Defaults to `true`. - """ - billing_scheme: NotRequired[Literal["per_unit", "tiered"]] - """ - Describes how to compute the price per period. Either `per_unit` or `tiered`. `per_unit` indicates that the fixed amount (specified in `unit_amount` or `unit_amount_decimal`) will be charged per unit in `quantity` (for prices with `usage_type=licensed`), or per unit of total usage (for prices with `usage_type=metered`). `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the `tiers` and `tiers_mode` attributes. - """ - 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). - """ - currency_options: NotRequired[ - Dict[str, "PriceService.CreateParamsCurrencyOptions"] - ] - """ - Prices defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). - """ - custom_unit_amount: NotRequired[ - "PriceService.CreateParamsCustomUnitAmount" - ] - """ - When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - lookup_key: NotRequired[str] - """ - A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - nickname: NotRequired[str] - """ - A brief description of the price, hidden from customers. - """ - product: NotRequired[str] - """ - The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to. - """ - product_data: NotRequired["PriceService.CreateParamsProductData"] - """ - These fields can be used to create a new product that this price will belong to. - """ - recurring: NotRequired["PriceService.CreateParamsRecurring"] - """ - The recurring components of a price such as `interval` and `usage_type`. - """ - tax_behavior: NotRequired[ - Literal["exclusive", "inclusive", "unspecified"] - ] - """ - Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. - """ - tiers: NotRequired[List["PriceService.CreateParamsTier"]] - """ - Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. - """ - tiers_mode: NotRequired[Literal["graduated", "volume"]] - """ - Defines if the tiering price should be `graduated` or `volume` based. In `volume`-based tiering, the maximum quantity within a period determines the per unit price, in `graduated` tiering pricing can successively change as the quantity grows. - """ - transfer_lookup_key: NotRequired[bool] - """ - If set to true, will atomically remove the lookup key from the existing price, and assign it to this price. - """ - transform_quantity: NotRequired[ - "PriceService.CreateParamsTransformQuantity" - ] - """ - Apply a transformation to the reported usage or set quantity before computing the billed price. Cannot be combined with `tiers`. - """ - unit_amount: NotRequired[int] - """ - A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. One of `unit_amount`, `unit_amount_decimal`, or `custom_unit_amount` is required, unless `billing_scheme=tiered`. - """ - unit_amount_decimal: NotRequired[str] - """ - Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - """ - - class CreateParamsCurrencyOptions(TypedDict): - custom_unit_amount: NotRequired[ - "PriceService.CreateParamsCurrencyOptionsCustomUnitAmount" - ] - """ - When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. - """ - tax_behavior: NotRequired[ - Literal["exclusive", "inclusive", "unspecified"] - ] - """ - Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. - """ - tiers: NotRequired[ - List["PriceService.CreateParamsCurrencyOptionsTier"] - ] - """ - Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. - """ - unit_amount: NotRequired[int] - """ - A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. - """ - unit_amount_decimal: NotRequired[str] - """ - Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - """ - - class CreateParamsCurrencyOptionsCustomUnitAmount(TypedDict): - enabled: bool - """ - Pass in `true` to enable `custom_unit_amount`, otherwise omit `custom_unit_amount`. - """ - maximum: NotRequired[int] - """ - The maximum unit amount the customer can specify for this item. - """ - minimum: NotRequired[int] - """ - The minimum unit amount the customer can specify for this item. Must be at least the minimum charge amount. - """ - preset: NotRequired[int] - """ - The starting unit amount which can be updated by the customer. - """ - - class CreateParamsCurrencyOptionsTier(TypedDict): - flat_amount: NotRequired[int] - """ - The flat billing amount for an entire tier, regardless of the number of units in the tier. - """ - flat_amount_decimal: NotRequired[str] - """ - Same as `flat_amount`, but accepts a decimal value representing an integer in the minor units of the currency. Only one of `flat_amount` and `flat_amount_decimal` can be set. - """ - unit_amount: NotRequired[int] - """ - The per unit billing amount for each individual unit for which this tier applies. - """ - unit_amount_decimal: NotRequired[str] - """ - Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - """ - up_to: Union[Literal["inf"], int] - """ - Specifies the upper bound of this tier. The lower bound of a tier is the upper bound of the previous tier adding one. Use `inf` to define a fallback tier. - """ - - class CreateParamsCustomUnitAmount(TypedDict): - enabled: bool - """ - Pass in `true` to enable `custom_unit_amount`, otherwise omit `custom_unit_amount`. - """ - maximum: NotRequired[int] - """ - The maximum unit amount the customer can specify for this item. - """ - minimum: NotRequired[int] - """ - The minimum unit amount the customer can specify for this item. Must be at least the minimum charge amount. - """ - preset: NotRequired[int] - """ - The starting unit amount which can be updated by the customer. - """ - - class CreateParamsProductData(TypedDict): - active: NotRequired[bool] - """ - Whether the product is currently available for purchase. Defaults to `true`. - """ - id: NotRequired[str] - """ - The identifier for the product. Must be unique. If not provided, an identifier will be randomly generated. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - name: str - """ - The product's name, meant to be displayable to the customer. - """ - statement_descriptor: NotRequired[str] - """ - An arbitrary string to be displayed on your customer's credit card or bank statement. While most banks display this information consistently, some may display it incorrectly or not at all. - - This may be up to 22 characters. The statement description may not include `<`, `>`, `\\`, `"`, `'` characters, and will appear on your customer's statement in capital letters. Non-ASCII characters are automatically stripped. - """ - tax_code: NotRequired[str] - """ - A [tax code](https://stripe.com/docs/tax/tax-categories) ID. - """ - unit_label: NotRequired[str] - """ - A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal. - """ - - class CreateParamsRecurring(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Specifies billing frequency. Either `day`, `week`, `month` or `year`. - """ - interval_count: NotRequired[int] - """ - The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). - """ - meter: NotRequired[str] - """ - The meter tracking the usage of a metered price - """ - trial_period_days: NotRequired[int] - """ - Default number of trial days when subscribing a customer to this price using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan). - """ - usage_type: NotRequired[Literal["licensed", "metered"]] - """ - Configures how the quantity per period should be determined. Can be either `metered` or `licensed`. `licensed` automatically bills the `quantity` set when adding it to a subscription. `metered` aggregates the total usage based on usage records. Defaults to `licensed`. - """ - - class CreateParamsTier(TypedDict): - flat_amount: NotRequired[int] - """ - The flat billing amount for an entire tier, regardless of the number of units in the tier. - """ - flat_amount_decimal: NotRequired[str] - """ - Same as `flat_amount`, but accepts a decimal value representing an integer in the minor units of the currency. Only one of `flat_amount` and `flat_amount_decimal` can be set. - """ - unit_amount: NotRequired[int] - """ - The per unit billing amount for each individual unit for which this tier applies. - """ - unit_amount_decimal: NotRequired[str] - """ - Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - """ - up_to: Union[Literal["inf"], int] - """ - Specifies the upper bound of this tier. The lower bound of a tier is the upper bound of the previous tier adding one. Use `inf` to define a fallback tier. - """ - - class CreateParamsTransformQuantity(TypedDict): - divide_by: int - """ - Divide usage by this number. - """ - round: Literal["down", "up"] - """ - After division, either round the result `up` or `down`. - """ - - class ListParams(TypedDict): - active: NotRequired[bool] - """ - Only return prices that are active or inactive (e.g., pass `false` to list all inactive prices). - """ - created: NotRequired["PriceService.ListParamsCreated|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. - """ - currency: NotRequired[str] - """ - Only return prices for the given currency. - """ - 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. - """ - lookup_keys: NotRequired[List[str]] - """ - Only return the price with these lookup_keys, if any exist. You can specify up to 10 lookup_keys. - """ - product: NotRequired[str] - """ - Only return prices for the given product. - """ - recurring: NotRequired["PriceService.ListParamsRecurring"] - """ - Only return prices with these recurring fields. - """ - 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. - """ - type: NotRequired[Literal["one_time", "recurring"]] - """ - Only return prices of type `recurring` or `one_time`. - """ - - class ListParamsCreated(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) - """ - - class ListParamsRecurring(TypedDict): - interval: NotRequired[Literal["day", "month", "week", "year"]] - """ - Filter by billing frequency. Either `day`, `week`, `month` or `year`. - """ - meter: NotRequired[str] - """ - Filter by the price's meter. - """ - usage_type: NotRequired[Literal["licensed", "metered"]] - """ - Filter by the usage type for this price. Can be either `metered` or `licensed`. - """ - - class RetrieveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class SearchParams(TypedDict): - 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. - """ - page: NotRequired[str] - """ - A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. - """ - query: str - """ - The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for prices](https://stripe.com/docs/search#query-fields-for-prices). - """ - - class UpdateParams(TypedDict): - active: NotRequired[bool] - """ - Whether the price can be used for new purchases. Defaults to `true`. - """ - currency_options: NotRequired[ - "Literal['']|Dict[str, PriceService.UpdateParamsCurrencyOptions]" - ] - """ - Prices defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - lookup_key: NotRequired[str] - """ - A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - migrate_to: NotRequired[ - "Literal['']|PriceService.UpdateParamsMigrateTo" - ] - """ - If specified, subscriptions using this price will be updated to use the new referenced price. - """ - nickname: NotRequired[str] - """ - A brief description of the price, hidden from customers. - """ - tax_behavior: NotRequired[ - Literal["exclusive", "inclusive", "unspecified"] - ] - """ - Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. - """ - transfer_lookup_key: NotRequired[bool] - """ - If set to true, will atomically remove the lookup key from the existing price, and assign it to this price. - """ - - class UpdateParamsCurrencyOptions(TypedDict): - custom_unit_amount: NotRequired[ - "PriceService.UpdateParamsCurrencyOptionsCustomUnitAmount" - ] - """ - When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. - """ - tax_behavior: NotRequired[ - Literal["exclusive", "inclusive", "unspecified"] - ] - """ - Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. - """ - tiers: NotRequired[ - List["PriceService.UpdateParamsCurrencyOptionsTier"] - ] - """ - Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. - """ - unit_amount: NotRequired[int] - """ - A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. - """ - unit_amount_decimal: NotRequired[str] - """ - Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - """ - - class UpdateParamsCurrencyOptionsCustomUnitAmount(TypedDict): - enabled: bool - """ - Pass in `true` to enable `custom_unit_amount`, otherwise omit `custom_unit_amount`. - """ - maximum: NotRequired[int] - """ - The maximum unit amount the customer can specify for this item. - """ - minimum: NotRequired[int] - """ - The minimum unit amount the customer can specify for this item. Must be at least the minimum charge amount. - """ - preset: NotRequired[int] - """ - The starting unit amount which can be updated by the customer. - """ - - class UpdateParamsCurrencyOptionsTier(TypedDict): - flat_amount: NotRequired[int] - """ - The flat billing amount for an entire tier, regardless of the number of units in the tier. - """ - flat_amount_decimal: NotRequired[str] - """ - Same as `flat_amount`, but accepts a decimal value representing an integer in the minor units of the currency. Only one of `flat_amount` and `flat_amount_decimal` can be set. - """ - unit_amount: NotRequired[int] - """ - The per unit billing amount for each individual unit for which this tier applies. - """ - unit_amount_decimal: NotRequired[str] - """ - Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - """ - up_to: Union[Literal["inf"], int] - """ - Specifies the upper bound of this tier. The lower bound of a tier is the upper bound of the previous tier adding one. Use `inf` to define a fallback tier. - """ - - class UpdateParamsMigrateTo(TypedDict): - behavior: Literal["at_cycle_end"] - """ - The behavior controlling the point in the subscription lifecycle after which to migrate the price. Currently must be `at_cycle_end`. - """ - effective_after: NotRequired[int] - """ - The time after which subscriptions should start using the new price. - """ - price: str - """ - The ID of the price object. - """ +class PriceService(StripeService): def list( self, - params: Optional["PriceService.ListParams"] = None, + params: Optional["PriceListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[Price]: """ @@ -518,7 +39,7 @@ def list( async def list_async( self, - params: Optional["PriceService.ListParams"] = None, + params: Optional["PriceListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[Price]: """ @@ -537,7 +58,7 @@ async def list_async( def create( self, - params: "PriceService.CreateParams", + params: "PriceCreateParams", options: Optional[RequestOptions] = None, ) -> Price: """ @@ -556,7 +77,7 @@ def create( async def create_async( self, - params: "PriceService.CreateParams", + params: "PriceCreateParams", options: Optional[RequestOptions] = None, ) -> Price: """ @@ -576,7 +97,7 @@ async def create_async( def retrieve( self, price: str, - params: Optional["PriceService.RetrieveParams"] = None, + params: Optional["PriceRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Price: """ @@ -596,7 +117,7 @@ def retrieve( async def retrieve_async( self, price: str, - params: Optional["PriceService.RetrieveParams"] = None, + params: Optional["PriceRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Price: """ @@ -616,7 +137,7 @@ async def retrieve_async( def update( self, price: str, - params: Optional["PriceService.UpdateParams"] = None, + params: Optional["PriceUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> Price: """ @@ -636,7 +157,7 @@ def update( async def update_async( self, price: str, - params: Optional["PriceService.UpdateParams"] = None, + params: Optional["PriceUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> Price: """ @@ -655,7 +176,7 @@ async def update_async( def search( self, - params: "PriceService.SearchParams", + params: "PriceSearchParams", options: Optional[RequestOptions] = None, ) -> SearchResultObject[Price]: """ @@ -677,7 +198,7 @@ def search( async def search_async( self, - params: "PriceService.SearchParams", + params: "PriceSearchParams", options: Optional[RequestOptions] = None, ) -> SearchResultObject[Price]: """ diff --git a/stripe/_product.py b/stripe/_product.py index 3ee2a67cd..aa29a9eae 100644 --- a/stripe/_product.py +++ b/stripe/_product.py @@ -6,7 +6,6 @@ from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource from stripe._nested_resource_class_methods import nested_resource_class_methods -from stripe._request_options import RequestOptions from stripe._search_result_object import SearchResultObject from stripe._searchable_api_resource import SearchableAPIResource from stripe._stripe_object import StripeObject @@ -19,22 +18,33 @@ Iterator, List, Optional, - Union, cast, overload, ) -from typing_extensions import ( - Literal, - NotRequired, - TypedDict, - Unpack, - TYPE_CHECKING, -) +from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: from stripe._price import Price from stripe._product_feature import ProductFeature from stripe._tax_code import TaxCode + from stripe.params._product_create_feature_params import ( + ProductCreateFeatureParams, + ) + from stripe.params._product_create_params import ProductCreateParams + from stripe.params._product_delete_feature_params import ( + ProductDeleteFeatureParams, + ) + from stripe.params._product_delete_params import ProductDeleteParams + from stripe.params._product_list_features_params import ( + ProductListFeaturesParams, + ) + from stripe.params._product_list_params import ProductListParams + from stripe.params._product_modify_params import ProductModifyParams + from stripe.params._product_retrieve_feature_params import ( + ProductRetrieveFeatureParams, + ) + from stripe.params._product_retrieve_params import ProductRetrieveParams + from stripe.params._product_search_params import ProductSearchParams @nested_resource_class_methods("feature") @@ -82,454 +92,6 @@ class PackageDimensions(StripeObject): Width, in inches. """ - class CreateFeatureParams(RequestOptions): - entitlement_feature: str - """ - The ID of the [Feature](https://stripe.com/docs/api/entitlements/feature) object attached to this product. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class CreateParams(RequestOptions): - active: NotRequired[bool] - """ - Whether the product is currently available for purchase. Defaults to `true`. - """ - default_price_data: NotRequired["Product.CreateParamsDefaultPriceData"] - """ - Data used to generate a new [Price](https://stripe.com/docs/api/prices) object. This Price will be set as the default price for this product. - """ - description: NotRequired[str] - """ - The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - id: NotRequired[str] - """ - An identifier will be randomly generated by Stripe. You can optionally override this ID, but the ID must be unique across all products in your Stripe account. - """ - images: NotRequired[List[str]] - """ - A list of up to 8 URLs of images for this product, meant to be displayable to the customer. - """ - marketing_features: NotRequired[ - List["Product.CreateParamsMarketingFeature"] - ] - """ - A list of up to 15 marketing features for this product. These are displayed in [pricing tables](https://stripe.com/docs/payments/checkout/pricing-table). - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - name: str - """ - The product's name, meant to be displayable to the customer. - """ - package_dimensions: NotRequired[ - "Product.CreateParamsPackageDimensions" - ] - """ - The dimensions of this product for shipping purposes. - """ - shippable: NotRequired[bool] - """ - Whether this product is shipped (i.e., physical goods). - """ - statement_descriptor: NotRequired[str] - """ - An arbitrary string to be displayed on your customer's credit card or bank statement. While most banks display this information consistently, some may display it incorrectly or not at all. - - This may be up to 22 characters. The statement description may not include `<`, `>`, `\\`, `"`, `'` characters, and will appear on your customer's statement in capital letters. Non-ASCII characters are automatically stripped. - It must contain at least one letter. Only used for subscription payments. - """ - tax_code: NotRequired[str] - """ - A [tax code](https://stripe.com/docs/tax/tax-categories) ID. - """ - type: NotRequired[Literal["good", "service"]] - """ - The type of the product. Defaults to `service` if not explicitly specified, enabling use of this product with Subscriptions and Plans. Set this parameter to `good` to use this product with Orders and SKUs. On API versions before `2018-02-05`, this field defaults to `good` for compatibility reasons. - """ - unit_label: NotRequired[str] - """ - A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal. - """ - url: NotRequired[str] - """ - A URL of a publicly-accessible webpage for this product. - """ - - class CreateParamsDefaultPriceData(TypedDict): - 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). - """ - currency_options: NotRequired[ - Dict[str, "Product.CreateParamsDefaultPriceDataCurrencyOptions"] - ] - """ - Prices defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). - """ - custom_unit_amount: NotRequired[ - "Product.CreateParamsDefaultPriceDataCustomUnitAmount" - ] - """ - When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - recurring: NotRequired["Product.CreateParamsDefaultPriceDataRecurring"] - """ - The recurring components of a price such as `interval` and `interval_count`. - """ - tax_behavior: NotRequired[ - Literal["exclusive", "inclusive", "unspecified"] - ] - """ - Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. - """ - unit_amount: NotRequired[int] - """ - A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. One of `unit_amount`, `unit_amount_decimal`, or `custom_unit_amount` is required. - """ - unit_amount_decimal: NotRequired[str] - """ - Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - """ - - class CreateParamsDefaultPriceDataCurrencyOptions(TypedDict): - custom_unit_amount: NotRequired[ - "Product.CreateParamsDefaultPriceDataCurrencyOptionsCustomUnitAmount" - ] - """ - When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. - """ - tax_behavior: NotRequired[ - Literal["exclusive", "inclusive", "unspecified"] - ] - """ - Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. - """ - tiers: NotRequired[ - List["Product.CreateParamsDefaultPriceDataCurrencyOptionsTier"] - ] - """ - Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. - """ - unit_amount: NotRequired[int] - """ - A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. - """ - unit_amount_decimal: NotRequired[str] - """ - Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - """ - - class CreateParamsDefaultPriceDataCurrencyOptionsCustomUnitAmount( - TypedDict, - ): - enabled: bool - """ - Pass in `true` to enable `custom_unit_amount`, otherwise omit `custom_unit_amount`. - """ - maximum: NotRequired[int] - """ - The maximum unit amount the customer can specify for this item. - """ - minimum: NotRequired[int] - """ - The minimum unit amount the customer can specify for this item. Must be at least the minimum charge amount. - """ - preset: NotRequired[int] - """ - The starting unit amount which can be updated by the customer. - """ - - class CreateParamsDefaultPriceDataCurrencyOptionsTier(TypedDict): - flat_amount: NotRequired[int] - """ - The flat billing amount for an entire tier, regardless of the number of units in the tier. - """ - flat_amount_decimal: NotRequired[str] - """ - Same as `flat_amount`, but accepts a decimal value representing an integer in the minor units of the currency. Only one of `flat_amount` and `flat_amount_decimal` can be set. - """ - unit_amount: NotRequired[int] - """ - The per unit billing amount for each individual unit for which this tier applies. - """ - unit_amount_decimal: NotRequired[str] - """ - Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - """ - up_to: Union[Literal["inf"], int] - """ - Specifies the upper bound of this tier. The lower bound of a tier is the upper bound of the previous tier adding one. Use `inf` to define a fallback tier. - """ - - class CreateParamsDefaultPriceDataCustomUnitAmount(TypedDict): - enabled: bool - """ - Pass in `true` to enable `custom_unit_amount`, otherwise omit `custom_unit_amount`. - """ - maximum: NotRequired[int] - """ - The maximum unit amount the customer can specify for this item. - """ - minimum: NotRequired[int] - """ - The minimum unit amount the customer can specify for this item. Must be at least the minimum charge amount. - """ - preset: NotRequired[int] - """ - The starting unit amount which can be updated by the customer. - """ - - class CreateParamsDefaultPriceDataRecurring(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Specifies billing frequency. Either `day`, `week`, `month` or `year`. - """ - interval_count: NotRequired[int] - """ - The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). - """ - - class CreateParamsMarketingFeature(TypedDict): - name: str - """ - The marketing feature name. Up to 80 characters long. - """ - - class CreateParamsPackageDimensions(TypedDict): - height: float - """ - Height, in inches. Maximum precision is 2 decimal places. - """ - length: float - """ - Length, in inches. Maximum precision is 2 decimal places. - """ - weight: float - """ - Weight, in ounces. Maximum precision is 2 decimal places. - """ - width: float - """ - Width, in inches. Maximum precision is 2 decimal places. - """ - - class DeleteFeatureParams(RequestOptions): - pass - - class DeleteParams(RequestOptions): - pass - - class ListFeaturesParams(RequestOptions): - 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 ListParams(RequestOptions): - active: NotRequired[bool] - """ - Only return products that are active or inactive (e.g., pass `false` to list all inactive products). - """ - created: NotRequired["Product.ListParamsCreated|int"] - """ - Only return products that were created during the given date interval. - """ - 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. - """ - ids: NotRequired[List[str]] - """ - Only return products with the given IDs. Cannot be used with [starting_after](https://stripe.com/docs/api#list_products-starting_after) or [ending_before](https://stripe.com/docs/api#list_products-ending_before). - """ - 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. - """ - shippable: NotRequired[bool] - """ - Only return products that can be shipped (i.e., physical, not digital products). - """ - 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. - """ - type: NotRequired[Literal["good", "service"]] - """ - Only return products of this type. - """ - url: NotRequired[str] - """ - Only return products with the given url. - """ - - class ListParamsCreated(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) - """ - - class ModifyParams(RequestOptions): - active: NotRequired[bool] - """ - Whether the product is available for purchase. - """ - default_price: NotRequired[str] - """ - The ID of the [Price](https://stripe.com/docs/api/prices) object that is the default price for this product. - """ - description: NotRequired["Literal['']|str"] - """ - The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - images: NotRequired["Literal['']|List[str]"] - """ - A list of up to 8 URLs of images for this product, meant to be displayable to the customer. - """ - marketing_features: NotRequired[ - "Literal['']|List[Product.ModifyParamsMarketingFeature]" - ] - """ - A list of up to 15 marketing features for this product. These are displayed in [pricing tables](https://stripe.com/docs/payments/checkout/pricing-table). - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - name: NotRequired[str] - """ - The product's name, meant to be displayable to the customer. - """ - package_dimensions: NotRequired[ - "Literal['']|Product.ModifyParamsPackageDimensions" - ] - """ - The dimensions of this product for shipping purposes. - """ - shippable: NotRequired[bool] - """ - Whether this product is shipped (i.e., physical goods). - """ - statement_descriptor: NotRequired[str] - """ - An arbitrary string to be displayed on your customer's credit card or bank statement. While most banks display this information consistently, some may display it incorrectly or not at all. - - This may be up to 22 characters. The statement description may not include `<`, `>`, `\\`, `"`, `'` characters, and will appear on your customer's statement in capital letters. Non-ASCII characters are automatically stripped. - It must contain at least one letter. May only be set if `type=service`. Only used for subscription payments. - """ - tax_code: NotRequired["Literal['']|str"] - """ - A [tax code](https://stripe.com/docs/tax/tax-categories) ID. - """ - unit_label: NotRequired["Literal['']|str"] - """ - A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal. May only be set if `type=service`. - """ - url: NotRequired["Literal['']|str"] - """ - A URL of a publicly-accessible webpage for this product. - """ - - class ModifyParamsMarketingFeature(TypedDict): - name: str - """ - The marketing feature name. Up to 80 characters long. - """ - - class ModifyParamsPackageDimensions(TypedDict): - height: float - """ - Height, in inches. Maximum precision is 2 decimal places. - """ - length: float - """ - Length, in inches. Maximum precision is 2 decimal places. - """ - weight: float - """ - Weight, in ounces. Maximum precision is 2 decimal places. - """ - width: float - """ - Width, in inches. Maximum precision is 2 decimal places. - """ - - class RetrieveFeatureParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class RetrieveParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class SearchParams(RequestOptions): - 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. - """ - page: NotRequired[str] - """ - A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. - """ - query: str - """ - The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for products](https://stripe.com/docs/search#query-fields-for-products). - """ - active: bool """ Whether the product is currently available for purchase. @@ -612,7 +174,7 @@ class SearchParams(RequestOptions): """ @classmethod - def create(cls, **params: Unpack["Product.CreateParams"]) -> "Product": + def create(cls, **params: Unpack["ProductCreateParams"]) -> "Product": """ Creates a new product object. """ @@ -627,7 +189,7 @@ def create(cls, **params: Unpack["Product.CreateParams"]) -> "Product": @classmethod async def create_async( - cls, **params: Unpack["Product.CreateParams"] + cls, **params: Unpack["ProductCreateParams"] ) -> "Product": """ Creates a new product object. @@ -643,7 +205,7 @@ async def create_async( @classmethod def _cls_delete( - cls, sid: str, **params: Unpack["Product.DeleteParams"] + cls, sid: str, **params: Unpack["ProductDeleteParams"] ) -> "Product": """ Delete a product. Deleting a product is only possible if it has no prices associated with it. Additionally, deleting a product with type=good is only possible if it has no SKUs associated with it. @@ -660,16 +222,14 @@ def _cls_delete( @overload @staticmethod - def delete( - sid: str, **params: Unpack["Product.DeleteParams"] - ) -> "Product": + def delete(sid: str, **params: Unpack["ProductDeleteParams"]) -> "Product": """ Delete a product. Deleting a product is only possible if it has no prices associated with it. Additionally, deleting a product with type=good is only possible if it has no SKUs associated with it. """ ... @overload - def delete(self, **params: Unpack["Product.DeleteParams"]) -> "Product": + def delete(self, **params: Unpack["ProductDeleteParams"]) -> "Product": """ Delete a product. Deleting a product is only possible if it has no prices associated with it. Additionally, deleting a product with type=good is only possible if it has no SKUs associated with it. """ @@ -677,7 +237,7 @@ def delete(self, **params: Unpack["Product.DeleteParams"]) -> "Product": @class_method_variant("_cls_delete") def delete( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Product.DeleteParams"] + self, **params: Unpack["ProductDeleteParams"] ) -> "Product": """ Delete a product. Deleting a product is only possible if it has no prices associated with it. Additionally, deleting a product with type=good is only possible if it has no SKUs associated with it. @@ -690,7 +250,7 @@ def delete( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_delete_async( - cls, sid: str, **params: Unpack["Product.DeleteParams"] + cls, sid: str, **params: Unpack["ProductDeleteParams"] ) -> "Product": """ Delete a product. Deleting a product is only possible if it has no prices associated with it. Additionally, deleting a product with type=good is only possible if it has no SKUs associated with it. @@ -708,7 +268,7 @@ async def _cls_delete_async( @overload @staticmethod async def delete_async( - sid: str, **params: Unpack["Product.DeleteParams"] + sid: str, **params: Unpack["ProductDeleteParams"] ) -> "Product": """ Delete a product. Deleting a product is only possible if it has no prices associated with it. Additionally, deleting a product with type=good is only possible if it has no SKUs associated with it. @@ -717,7 +277,7 @@ async def delete_async( @overload async def delete_async( - self, **params: Unpack["Product.DeleteParams"] + self, **params: Unpack["ProductDeleteParams"] ) -> "Product": """ Delete a product. Deleting a product is only possible if it has no prices associated with it. Additionally, deleting a product with type=good is only possible if it has no SKUs associated with it. @@ -726,7 +286,7 @@ async def delete_async( @class_method_variant("_cls_delete_async") async def delete_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Product.DeleteParams"] + self, **params: Unpack["ProductDeleteParams"] ) -> "Product": """ Delete a product. Deleting a product is only possible if it has no prices associated with it. Additionally, deleting a product with type=good is only possible if it has no SKUs associated with it. @@ -739,7 +299,7 @@ async def delete_async( # pyright: ignore[reportGeneralTypeIssues] @classmethod def list( - cls, **params: Unpack["Product.ListParams"] + cls, **params: Unpack["ProductListParams"] ) -> ListObject["Product"]: """ Returns a list of your products. The products are returned sorted by creation date, with the most recently created products appearing first. @@ -759,7 +319,7 @@ def list( @classmethod async def list_async( - cls, **params: Unpack["Product.ListParams"] + cls, **params: Unpack["ProductListParams"] ) -> ListObject["Product"]: """ Returns a list of your products. The products are returned sorted by creation date, with the most recently created products appearing first. @@ -779,7 +339,7 @@ async def list_async( @classmethod def modify( - cls, id: str, **params: Unpack["Product.ModifyParams"] + cls, id: str, **params: Unpack["ProductModifyParams"] ) -> "Product": """ Updates the specific product by setting the values of the parameters passed. Any parameters not provided will be left unchanged. @@ -796,7 +356,7 @@ def modify( @classmethod async def modify_async( - cls, id: str, **params: Unpack["Product.ModifyParams"] + cls, id: str, **params: Unpack["ProductModifyParams"] ) -> "Product": """ Updates the specific product by setting the values of the parameters passed. Any parameters not provided will be left unchanged. @@ -813,7 +373,7 @@ async def modify_async( @classmethod def retrieve( - cls, id: str, **params: Unpack["Product.RetrieveParams"] + cls, id: str, **params: Unpack["ProductRetrieveParams"] ) -> "Product": """ Retrieves the details of an existing product. Supply the unique product ID from either a product creation request or the product list, and Stripe will return the corresponding product information. @@ -824,7 +384,7 @@ def retrieve( @classmethod async def retrieve_async( - cls, id: str, **params: Unpack["Product.RetrieveParams"] + cls, id: str, **params: Unpack["ProductRetrieveParams"] ) -> "Product": """ Retrieves the details of an existing product. Supply the unique product ID from either a product creation request or the product list, and Stripe will return the corresponding product information. @@ -835,7 +395,7 @@ async def retrieve_async( @classmethod def search( - cls, *args, **kwargs: Unpack["Product.SearchParams"] + cls, *args, **kwargs: Unpack["ProductSearchParams"] ) -> SearchResultObject["Product"]: """ Search for products you've previously created using Stripe's [Search Query Language](https://docs.stripe.com/docs/search#search-query-language). @@ -847,7 +407,7 @@ def search( @classmethod async def search_async( - cls, *args, **kwargs: Unpack["Product.SearchParams"] + cls, *args, **kwargs: Unpack["ProductSearchParams"] ) -> SearchResultObject["Product"]: """ Search for products you've previously created using Stripe's [Search Query Language](https://docs.stripe.com/docs/search#search-query-language). @@ -861,13 +421,13 @@ async def search_async( @classmethod def search_auto_paging_iter( - cls, *args, **kwargs: Unpack["Product.SearchParams"] + cls, *args, **kwargs: Unpack["ProductSearchParams"] ) -> Iterator["Product"]: return cls.search(*args, **kwargs).auto_paging_iter() @classmethod async def search_auto_paging_iter_async( - cls, *args, **kwargs: Unpack["Product.SearchParams"] + cls, *args, **kwargs: Unpack["ProductSearchParams"] ) -> AsyncIterator["Product"]: return (await cls.search_async(*args, **kwargs)).auto_paging_iter() @@ -876,7 +436,7 @@ def delete_feature( cls, product: str, id: str, - **params: Unpack["Product.DeleteFeatureParams"], + **params: Unpack["ProductDeleteFeatureParams"], ) -> "ProductFeature": """ Deletes the feature attachment to a product @@ -897,7 +457,7 @@ async def delete_feature_async( cls, product: str, id: str, - **params: Unpack["Product.DeleteFeatureParams"], + **params: Unpack["ProductDeleteFeatureParams"], ) -> "ProductFeature": """ Deletes the feature attachment to a product @@ -918,7 +478,7 @@ def retrieve_feature( cls, product: str, id: str, - **params: Unpack["Product.RetrieveFeatureParams"], + **params: Unpack["ProductRetrieveFeatureParams"], ) -> "ProductFeature": """ Retrieves a product_feature, which represents a feature attachment to a product @@ -939,7 +499,7 @@ async def retrieve_feature_async( cls, product: str, id: str, - **params: Unpack["Product.RetrieveFeatureParams"], + **params: Unpack["ProductRetrieveFeatureParams"], ) -> "ProductFeature": """ Retrieves a product_feature, which represents a feature attachment to a product @@ -957,7 +517,7 @@ async def retrieve_feature_async( @classmethod def list_features( - cls, product: str, **params: Unpack["Product.ListFeaturesParams"] + cls, product: str, **params: Unpack["ProductListFeaturesParams"] ) -> ListObject["ProductFeature"]: """ Retrieve a list of features for a product @@ -975,7 +535,7 @@ def list_features( @classmethod async def list_features_async( - cls, product: str, **params: Unpack["Product.ListFeaturesParams"] + cls, product: str, **params: Unpack["ProductListFeaturesParams"] ) -> ListObject["ProductFeature"]: """ Retrieve a list of features for a product @@ -993,7 +553,7 @@ async def list_features_async( @classmethod def create_feature( - cls, product: str, **params: Unpack["Product.CreateFeatureParams"] + cls, product: str, **params: Unpack["ProductCreateFeatureParams"] ) -> "ProductFeature": """ Creates a product_feature, which represents a feature attachment to a product @@ -1011,7 +571,7 @@ def create_feature( @classmethod async def create_feature_async( - cls, product: str, **params: Unpack["Product.CreateFeatureParams"] + cls, product: str, **params: Unpack["ProductCreateFeatureParams"] ) -> "ProductFeature": """ Creates a product_feature, which represents a feature attachment to a product diff --git a/stripe/_product_feature_service.py b/stripe/_product_feature_service.py index cb3c5bb42..6b51bf496 100644 --- a/stripe/_product_feature_service.py +++ b/stripe/_product_feature_service.py @@ -5,53 +5,30 @@ from stripe._request_options import RequestOptions from stripe._stripe_service import StripeService from stripe._util import sanitize_id -from typing import List, Optional, cast -from typing_extensions import NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params._product_feature_create_params import ( + ProductFeatureCreateParams, + ) + from stripe.params._product_feature_delete_params import ( + ProductFeatureDeleteParams, + ) + from stripe.params._product_feature_list_params import ( + ProductFeatureListParams, + ) + from stripe.params._product_feature_retrieve_params import ( + ProductFeatureRetrieveParams, + ) -class ProductFeatureService(StripeService): - class CreateParams(TypedDict): - entitlement_feature: str - """ - The ID of the [Feature](https://stripe.com/docs/api/entitlements/feature) object attached to this product. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class DeleteParams(TypedDict): - pass - - class ListParams(TypedDict): - 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 RetrieveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ +class ProductFeatureService(StripeService): def delete( self, product: str, id: str, - params: Optional["ProductFeatureService.DeleteParams"] = None, + params: Optional["ProductFeatureDeleteParams"] = None, options: Optional[RequestOptions] = None, ) -> ProductFeature: """ @@ -75,7 +52,7 @@ async def delete_async( self, product: str, id: str, - params: Optional["ProductFeatureService.DeleteParams"] = None, + params: Optional["ProductFeatureDeleteParams"] = None, options: Optional[RequestOptions] = None, ) -> ProductFeature: """ @@ -99,7 +76,7 @@ def retrieve( self, product: str, id: str, - params: Optional["ProductFeatureService.RetrieveParams"] = None, + params: Optional["ProductFeatureRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> ProductFeature: """ @@ -123,7 +100,7 @@ async def retrieve_async( self, product: str, id: str, - params: Optional["ProductFeatureService.RetrieveParams"] = None, + params: Optional["ProductFeatureRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> ProductFeature: """ @@ -146,7 +123,7 @@ async def retrieve_async( def list( self, product: str, - params: Optional["ProductFeatureService.ListParams"] = None, + params: Optional["ProductFeatureListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[ProductFeature]: """ @@ -168,7 +145,7 @@ def list( async def list_async( self, product: str, - params: Optional["ProductFeatureService.ListParams"] = None, + params: Optional["ProductFeatureListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[ProductFeature]: """ @@ -190,7 +167,7 @@ async def list_async( def create( self, product: str, - params: "ProductFeatureService.CreateParams", + params: "ProductFeatureCreateParams", options: Optional[RequestOptions] = None, ) -> ProductFeature: """ @@ -212,7 +189,7 @@ def create( async def create_async( self, product: str, - params: "ProductFeatureService.CreateParams", + params: "ProductFeatureCreateParams", options: Optional[RequestOptions] = None, ) -> ProductFeature: """ diff --git a/stripe/_product_service.py b/stripe/_product_service.py index e2d532098..31c85f4af 100644 --- a/stripe/_product_service.py +++ b/stripe/_product_service.py @@ -7,8 +7,16 @@ from stripe._search_result_object import SearchResultObject from stripe._stripe_service import StripeService from stripe._util import sanitize_id -from typing import Dict, List, Optional, Union, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params._product_create_params import ProductCreateParams + from stripe.params._product_delete_params import ProductDeleteParams + from stripe.params._product_list_params import ProductListParams + from stripe.params._product_retrieve_params import ProductRetrieveParams + from stripe.params._product_search_params import ProductSearchParams + from stripe.params._product_update_params import ProductUpdateParams class ProductService(StripeService): @@ -16,430 +24,10 @@ def __init__(self, requestor): super().__init__(requestor) self.features = ProductFeatureService(self._requestor) - class CreateParams(TypedDict): - active: NotRequired[bool] - """ - Whether the product is currently available for purchase. Defaults to `true`. - """ - default_price_data: NotRequired[ - "ProductService.CreateParamsDefaultPriceData" - ] - """ - Data used to generate a new [Price](https://stripe.com/docs/api/prices) object. This Price will be set as the default price for this product. - """ - description: NotRequired[str] - """ - The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - id: NotRequired[str] - """ - An identifier will be randomly generated by Stripe. You can optionally override this ID, but the ID must be unique across all products in your Stripe account. - """ - images: NotRequired[List[str]] - """ - A list of up to 8 URLs of images for this product, meant to be displayable to the customer. - """ - marketing_features: NotRequired[ - List["ProductService.CreateParamsMarketingFeature"] - ] - """ - A list of up to 15 marketing features for this product. These are displayed in [pricing tables](https://stripe.com/docs/payments/checkout/pricing-table). - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - name: str - """ - The product's name, meant to be displayable to the customer. - """ - package_dimensions: NotRequired[ - "ProductService.CreateParamsPackageDimensions" - ] - """ - The dimensions of this product for shipping purposes. - """ - shippable: NotRequired[bool] - """ - Whether this product is shipped (i.e., physical goods). - """ - statement_descriptor: NotRequired[str] - """ - An arbitrary string to be displayed on your customer's credit card or bank statement. While most banks display this information consistently, some may display it incorrectly or not at all. - - This may be up to 22 characters. The statement description may not include `<`, `>`, `\\`, `"`, `'` characters, and will appear on your customer's statement in capital letters. Non-ASCII characters are automatically stripped. - It must contain at least one letter. Only used for subscription payments. - """ - tax_code: NotRequired[str] - """ - A [tax code](https://stripe.com/docs/tax/tax-categories) ID. - """ - type: NotRequired[Literal["good", "service"]] - """ - The type of the product. Defaults to `service` if not explicitly specified, enabling use of this product with Subscriptions and Plans. Set this parameter to `good` to use this product with Orders and SKUs. On API versions before `2018-02-05`, this field defaults to `good` for compatibility reasons. - """ - unit_label: NotRequired[str] - """ - A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal. - """ - url: NotRequired[str] - """ - A URL of a publicly-accessible webpage for this product. - """ - - class CreateParamsDefaultPriceData(TypedDict): - 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). - """ - currency_options: NotRequired[ - Dict[ - str, - "ProductService.CreateParamsDefaultPriceDataCurrencyOptions", - ] - ] - """ - Prices defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). - """ - custom_unit_amount: NotRequired[ - "ProductService.CreateParamsDefaultPriceDataCustomUnitAmount" - ] - """ - When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - recurring: NotRequired[ - "ProductService.CreateParamsDefaultPriceDataRecurring" - ] - """ - The recurring components of a price such as `interval` and `interval_count`. - """ - tax_behavior: NotRequired[ - Literal["exclusive", "inclusive", "unspecified"] - ] - """ - Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. - """ - unit_amount: NotRequired[int] - """ - A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. One of `unit_amount`, `unit_amount_decimal`, or `custom_unit_amount` is required. - """ - unit_amount_decimal: NotRequired[str] - """ - Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - """ - - class CreateParamsDefaultPriceDataCurrencyOptions(TypedDict): - custom_unit_amount: NotRequired[ - "ProductService.CreateParamsDefaultPriceDataCurrencyOptionsCustomUnitAmount" - ] - """ - When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. - """ - tax_behavior: NotRequired[ - Literal["exclusive", "inclusive", "unspecified"] - ] - """ - Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. - """ - tiers: NotRequired[ - List[ - "ProductService.CreateParamsDefaultPriceDataCurrencyOptionsTier" - ] - ] - """ - Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. - """ - unit_amount: NotRequired[int] - """ - A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. - """ - unit_amount_decimal: NotRequired[str] - """ - Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - """ - - class CreateParamsDefaultPriceDataCurrencyOptionsCustomUnitAmount( - TypedDict, - ): - enabled: bool - """ - Pass in `true` to enable `custom_unit_amount`, otherwise omit `custom_unit_amount`. - """ - maximum: NotRequired[int] - """ - The maximum unit amount the customer can specify for this item. - """ - minimum: NotRequired[int] - """ - The minimum unit amount the customer can specify for this item. Must be at least the minimum charge amount. - """ - preset: NotRequired[int] - """ - The starting unit amount which can be updated by the customer. - """ - - class CreateParamsDefaultPriceDataCurrencyOptionsTier(TypedDict): - flat_amount: NotRequired[int] - """ - The flat billing amount for an entire tier, regardless of the number of units in the tier. - """ - flat_amount_decimal: NotRequired[str] - """ - Same as `flat_amount`, but accepts a decimal value representing an integer in the minor units of the currency. Only one of `flat_amount` and `flat_amount_decimal` can be set. - """ - unit_amount: NotRequired[int] - """ - The per unit billing amount for each individual unit for which this tier applies. - """ - unit_amount_decimal: NotRequired[str] - """ - Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - """ - up_to: Union[Literal["inf"], int] - """ - Specifies the upper bound of this tier. The lower bound of a tier is the upper bound of the previous tier adding one. Use `inf` to define a fallback tier. - """ - - class CreateParamsDefaultPriceDataCustomUnitAmount(TypedDict): - enabled: bool - """ - Pass in `true` to enable `custom_unit_amount`, otherwise omit `custom_unit_amount`. - """ - maximum: NotRequired[int] - """ - The maximum unit amount the customer can specify for this item. - """ - minimum: NotRequired[int] - """ - The minimum unit amount the customer can specify for this item. Must be at least the minimum charge amount. - """ - preset: NotRequired[int] - """ - The starting unit amount which can be updated by the customer. - """ - - class CreateParamsDefaultPriceDataRecurring(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Specifies billing frequency. Either `day`, `week`, `month` or `year`. - """ - interval_count: NotRequired[int] - """ - The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). - """ - - class CreateParamsMarketingFeature(TypedDict): - name: str - """ - The marketing feature name. Up to 80 characters long. - """ - - class CreateParamsPackageDimensions(TypedDict): - height: float - """ - Height, in inches. Maximum precision is 2 decimal places. - """ - length: float - """ - Length, in inches. Maximum precision is 2 decimal places. - """ - weight: float - """ - Weight, in ounces. Maximum precision is 2 decimal places. - """ - width: float - """ - Width, in inches. Maximum precision is 2 decimal places. - """ - - class DeleteParams(TypedDict): - pass - - class ListParams(TypedDict): - active: NotRequired[bool] - """ - Only return products that are active or inactive (e.g., pass `false` to list all inactive products). - """ - created: NotRequired["ProductService.ListParamsCreated|int"] - """ - Only return products that were created during the given date interval. - """ - 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. - """ - ids: NotRequired[List[str]] - """ - Only return products with the given IDs. Cannot be used with [starting_after](https://stripe.com/docs/api#list_products-starting_after) or [ending_before](https://stripe.com/docs/api#list_products-ending_before). - """ - 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. - """ - shippable: NotRequired[bool] - """ - Only return products that can be shipped (i.e., physical, not digital products). - """ - 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. - """ - type: NotRequired[Literal["good", "service"]] - """ - Only return products of this type. - """ - url: NotRequired[str] - """ - Only return products with the given url. - """ - - class ListParamsCreated(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) - """ - - class RetrieveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class SearchParams(TypedDict): - 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. - """ - page: NotRequired[str] - """ - A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. - """ - query: str - """ - The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for products](https://stripe.com/docs/search#query-fields-for-products). - """ - - class UpdateParams(TypedDict): - active: NotRequired[bool] - """ - Whether the product is available for purchase. - """ - default_price: NotRequired[str] - """ - The ID of the [Price](https://stripe.com/docs/api/prices) object that is the default price for this product. - """ - description: NotRequired["Literal['']|str"] - """ - The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - images: NotRequired["Literal['']|List[str]"] - """ - A list of up to 8 URLs of images for this product, meant to be displayable to the customer. - """ - marketing_features: NotRequired[ - "Literal['']|List[ProductService.UpdateParamsMarketingFeature]" - ] - """ - A list of up to 15 marketing features for this product. These are displayed in [pricing tables](https://stripe.com/docs/payments/checkout/pricing-table). - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - name: NotRequired[str] - """ - The product's name, meant to be displayable to the customer. - """ - package_dimensions: NotRequired[ - "Literal['']|ProductService.UpdateParamsPackageDimensions" - ] - """ - The dimensions of this product for shipping purposes. - """ - shippable: NotRequired[bool] - """ - Whether this product is shipped (i.e., physical goods). - """ - statement_descriptor: NotRequired[str] - """ - An arbitrary string to be displayed on your customer's credit card or bank statement. While most banks display this information consistently, some may display it incorrectly or not at all. - - This may be up to 22 characters. The statement description may not include `<`, `>`, `\\`, `"`, `'` characters, and will appear on your customer's statement in capital letters. Non-ASCII characters are automatically stripped. - It must contain at least one letter. May only be set if `type=service`. Only used for subscription payments. - """ - tax_code: NotRequired["Literal['']|str"] - """ - A [tax code](https://stripe.com/docs/tax/tax-categories) ID. - """ - unit_label: NotRequired["Literal['']|str"] - """ - A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal. May only be set if `type=service`. - """ - url: NotRequired["Literal['']|str"] - """ - A URL of a publicly-accessible webpage for this product. - """ - - class UpdateParamsMarketingFeature(TypedDict): - name: str - """ - The marketing feature name. Up to 80 characters long. - """ - - class UpdateParamsPackageDimensions(TypedDict): - height: float - """ - Height, in inches. Maximum precision is 2 decimal places. - """ - length: float - """ - Length, in inches. Maximum precision is 2 decimal places. - """ - weight: float - """ - Weight, in ounces. Maximum precision is 2 decimal places. - """ - width: float - """ - Width, in inches. Maximum precision is 2 decimal places. - """ - def delete( self, id: str, - params: Optional["ProductService.DeleteParams"] = None, + params: Optional["ProductDeleteParams"] = None, options: Optional[RequestOptions] = None, ) -> Product: """ @@ -459,7 +47,7 @@ def delete( async def delete_async( self, id: str, - params: Optional["ProductService.DeleteParams"] = None, + params: Optional["ProductDeleteParams"] = None, options: Optional[RequestOptions] = None, ) -> Product: """ @@ -479,7 +67,7 @@ async def delete_async( def retrieve( self, id: str, - params: Optional["ProductService.RetrieveParams"] = None, + params: Optional["ProductRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Product: """ @@ -499,7 +87,7 @@ def retrieve( async def retrieve_async( self, id: str, - params: Optional["ProductService.RetrieveParams"] = None, + params: Optional["ProductRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Product: """ @@ -519,7 +107,7 @@ async def retrieve_async( def update( self, id: str, - params: Optional["ProductService.UpdateParams"] = None, + params: Optional["ProductUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> Product: """ @@ -539,7 +127,7 @@ def update( async def update_async( self, id: str, - params: Optional["ProductService.UpdateParams"] = None, + params: Optional["ProductUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> Product: """ @@ -558,7 +146,7 @@ async def update_async( def list( self, - params: Optional["ProductService.ListParams"] = None, + params: Optional["ProductListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[Product]: """ @@ -577,7 +165,7 @@ def list( async def list_async( self, - params: Optional["ProductService.ListParams"] = None, + params: Optional["ProductListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[Product]: """ @@ -596,7 +184,7 @@ async def list_async( def create( self, - params: "ProductService.CreateParams", + params: "ProductCreateParams", options: Optional[RequestOptions] = None, ) -> Product: """ @@ -615,7 +203,7 @@ def create( async def create_async( self, - params: "ProductService.CreateParams", + params: "ProductCreateParams", options: Optional[RequestOptions] = None, ) -> Product: """ @@ -634,7 +222,7 @@ async def create_async( def search( self, - params: "ProductService.SearchParams", + params: "ProductSearchParams", options: Optional[RequestOptions] = None, ) -> SearchResultObject[Product]: """ @@ -656,7 +244,7 @@ def search( async def search_async( self, - params: "ProductService.SearchParams", + params: "ProductSearchParams", options: Optional[RequestOptions] = None, ) -> SearchResultObject[Product]: """ diff --git a/stripe/_promotion_code.py b/stripe/_promotion_code.py index 9bade02b0..d8527ca80 100644 --- a/stripe/_promotion_code.py +++ b/stripe/_promotion_code.py @@ -4,22 +4,27 @@ from stripe._expandable_field import ExpandableField from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource -from stripe._request_options import RequestOptions from stripe._stripe_object import StripeObject from stripe._updateable_api_resource import UpdateableAPIResource from stripe._util import sanitize_id -from typing import ClassVar, Dict, List, Optional, cast -from typing_extensions import ( - Literal, - NotRequired, - TypedDict, - Unpack, - TYPE_CHECKING, -) +from typing import ClassVar, Dict, Optional, cast +from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: from stripe._coupon import Coupon from stripe._customer import Customer + from stripe.params._promotion_code_create_params import ( + PromotionCodeCreateParams, + ) + from stripe.params._promotion_code_list_params import ( + PromotionCodeListParams, + ) + from stripe.params._promotion_code_modify_params import ( + PromotionCodeModifyParams, + ) + from stripe.params._promotion_code_retrieve_params import ( + PromotionCodeRetrieveParams, + ) class PromotionCode( @@ -73,184 +78,6 @@ class CurrencyOptions(StripeObject): _inner_class_types = {"currency_options": CurrencyOptions} _inner_class_dicts = ["currency_options"] - class CreateParams(RequestOptions): - active: NotRequired[bool] - """ - Whether the promotion code is currently active. - """ - code: NotRequired[str] - """ - The customer-facing code. Regardless of case, this code must be unique across all active promotion codes for a specific customer. Valid characters are lower case letters (a-z), upper case letters (A-Z), and digits (0-9). - - If left blank, we will generate one automatically. - """ - customer: NotRequired[str] - """ - The customer that this promotion code can be used by. If not set, the promotion code can be used by all customers. - """ - customer_account: NotRequired[str] - """ - The account that this promotion code can be used by. If not set, the promotion code can be used by all accounts. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - expires_at: NotRequired[int] - """ - The timestamp at which this promotion code will expire. If the coupon has specified a `redeems_by`, then this value cannot be after the coupon's `redeems_by`. - """ - max_redemptions: NotRequired[int] - """ - A positive integer specifying the number of times the promotion code can be redeemed. If the coupon has specified a `max_redemptions`, then this value cannot be greater than the coupon's `max_redemptions`. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - promotion: "PromotionCode.CreateParamsPromotion" - """ - The promotion referenced by this promotion code. - """ - restrictions: NotRequired["PromotionCode.CreateParamsRestrictions"] - """ - Settings that restrict the redemption of the promotion code. - """ - - class CreateParamsPromotion(TypedDict): - coupon: NotRequired[str] - """ - If promotion `type` is `coupon`, the coupon for this promotion code. - """ - type: Literal["coupon"] - """ - Specifies the type of promotion. - """ - - class CreateParamsRestrictions(TypedDict): - currency_options: NotRequired[ - Dict[str, "PromotionCode.CreateParamsRestrictionsCurrencyOptions"] - ] - """ - Promotion codes defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). - """ - first_time_transaction: NotRequired[bool] - """ - A Boolean indicating if the Promotion Code should only be redeemed for Customers without any successful payments or invoices - """ - minimum_amount: NotRequired[int] - """ - Minimum amount required to redeem this Promotion Code into a Coupon (e.g., a purchase must be $100 or more to work). - """ - minimum_amount_currency: NotRequired[str] - """ - Three-letter [ISO code](https://stripe.com/docs/currencies) for minimum_amount - """ - - class CreateParamsRestrictionsCurrencyOptions(TypedDict): - minimum_amount: NotRequired[int] - """ - Minimum amount required to redeem this Promotion Code into a Coupon (e.g., a purchase must be $100 or more to work). - """ - - class ListParams(RequestOptions): - active: NotRequired[bool] - """ - Filter promotion codes by whether they are active. - """ - code: NotRequired[str] - """ - Only return promotion codes that have this case-insensitive code. - """ - coupon: NotRequired[str] - """ - Only return promotion codes for this coupon. - """ - created: NotRequired["PromotionCode.ListParamsCreated|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. - """ - customer: NotRequired[str] - """ - Only return promotion codes that are restricted to this customer. - """ - customer_account: NotRequired[str] - """ - Only return promotion codes that are restricted to this account. - """ - 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 ListParamsCreated(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) - """ - - class ModifyParams(RequestOptions): - active: NotRequired[bool] - """ - Whether the promotion code is currently active. A promotion code can only be reactivated when the coupon is still valid and the promotion code is otherwise redeemable. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - restrictions: NotRequired["PromotionCode.ModifyParamsRestrictions"] - """ - Settings that restrict the redemption of the promotion code. - """ - - class ModifyParamsRestrictions(TypedDict): - currency_options: NotRequired[ - Dict[str, "PromotionCode.ModifyParamsRestrictionsCurrencyOptions"] - ] - """ - Promotion codes defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). - """ - - class ModifyParamsRestrictionsCurrencyOptions(TypedDict): - minimum_amount: NotRequired[int] - """ - Minimum amount required to redeem this Promotion Code into a Coupon (e.g., a purchase must be $100 or more to work). - """ - - class RetrieveParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - active: bool """ Whether the promotion code is currently active. A promotion code is only active if the coupon is also valid. @@ -304,7 +131,7 @@ class RetrieveParams(RequestOptions): @classmethod def create( - cls, **params: Unpack["PromotionCode.CreateParams"] + cls, **params: Unpack["PromotionCodeCreateParams"] ) -> "PromotionCode": """ A promotion code points to an underlying promotion. You can optionally restrict the code to a specific customer, redemption limit, and expiration date. @@ -320,7 +147,7 @@ def create( @classmethod async def create_async( - cls, **params: Unpack["PromotionCode.CreateParams"] + cls, **params: Unpack["PromotionCodeCreateParams"] ) -> "PromotionCode": """ A promotion code points to an underlying promotion. You can optionally restrict the code to a specific customer, redemption limit, and expiration date. @@ -336,7 +163,7 @@ async def create_async( @classmethod def list( - cls, **params: Unpack["PromotionCode.ListParams"] + cls, **params: Unpack["PromotionCodeListParams"] ) -> ListObject["PromotionCode"]: """ Returns a list of your promotion codes. @@ -356,7 +183,7 @@ def list( @classmethod async def list_async( - cls, **params: Unpack["PromotionCode.ListParams"] + cls, **params: Unpack["PromotionCodeListParams"] ) -> ListObject["PromotionCode"]: """ Returns a list of your promotion codes. @@ -376,7 +203,7 @@ async def list_async( @classmethod def modify( - cls, id: str, **params: Unpack["PromotionCode.ModifyParams"] + cls, id: str, **params: Unpack["PromotionCodeModifyParams"] ) -> "PromotionCode": """ Updates the specified promotion code by setting the values of the parameters passed. Most fields are, by design, not editable. @@ -393,7 +220,7 @@ def modify( @classmethod async def modify_async( - cls, id: str, **params: Unpack["PromotionCode.ModifyParams"] + cls, id: str, **params: Unpack["PromotionCodeModifyParams"] ) -> "PromotionCode": """ Updates the specified promotion code by setting the values of the parameters passed. Most fields are, by design, not editable. @@ -410,7 +237,7 @@ async def modify_async( @classmethod def retrieve( - cls, id: str, **params: Unpack["PromotionCode.RetrieveParams"] + cls, id: str, **params: Unpack["PromotionCodeRetrieveParams"] ) -> "PromotionCode": """ Retrieves the promotion code with the given ID. In order to retrieve a promotion code by the customer-facing code use [list](https://docs.stripe.com/docs/api/promotion_codes/list) with the desired code. @@ -421,7 +248,7 @@ def retrieve( @classmethod async def retrieve_async( - cls, id: str, **params: Unpack["PromotionCode.RetrieveParams"] + cls, id: str, **params: Unpack["PromotionCodeRetrieveParams"] ) -> "PromotionCode": """ Retrieves the promotion code with the given ID. In order to retrieve a promotion code by the customer-facing code use [list](https://docs.stripe.com/docs/api/promotion_codes/list) with the desired code. diff --git a/stripe/_promotion_code_service.py b/stripe/_promotion_code_service.py index 3b3271c4f..7c93faa8c 100644 --- a/stripe/_promotion_code_service.py +++ b/stripe/_promotion_code_service.py @@ -5,202 +5,28 @@ from stripe._request_options import RequestOptions from stripe._stripe_service import StripeService from stripe._util import sanitize_id -from typing import Dict, List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params._promotion_code_create_params import ( + PromotionCodeCreateParams, + ) + from stripe.params._promotion_code_list_params import ( + PromotionCodeListParams, + ) + from stripe.params._promotion_code_retrieve_params import ( + PromotionCodeRetrieveParams, + ) + from stripe.params._promotion_code_update_params import ( + PromotionCodeUpdateParams, + ) class PromotionCodeService(StripeService): - class CreateParams(TypedDict): - active: NotRequired[bool] - """ - Whether the promotion code is currently active. - """ - code: NotRequired[str] - """ - The customer-facing code. Regardless of case, this code must be unique across all active promotion codes for a specific customer. Valid characters are lower case letters (a-z), upper case letters (A-Z), and digits (0-9). - - If left blank, we will generate one automatically. - """ - customer: NotRequired[str] - """ - The customer that this promotion code can be used by. If not set, the promotion code can be used by all customers. - """ - customer_account: NotRequired[str] - """ - The account that this promotion code can be used by. If not set, the promotion code can be used by all accounts. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - expires_at: NotRequired[int] - """ - The timestamp at which this promotion code will expire. If the coupon has specified a `redeems_by`, then this value cannot be after the coupon's `redeems_by`. - """ - max_redemptions: NotRequired[int] - """ - A positive integer specifying the number of times the promotion code can be redeemed. If the coupon has specified a `max_redemptions`, then this value cannot be greater than the coupon's `max_redemptions`. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - promotion: "PromotionCodeService.CreateParamsPromotion" - """ - The promotion referenced by this promotion code. - """ - restrictions: NotRequired[ - "PromotionCodeService.CreateParamsRestrictions" - ] - """ - Settings that restrict the redemption of the promotion code. - """ - - class CreateParamsPromotion(TypedDict): - coupon: NotRequired[str] - """ - If promotion `type` is `coupon`, the coupon for this promotion code. - """ - type: Literal["coupon"] - """ - Specifies the type of promotion. - """ - - class CreateParamsRestrictions(TypedDict): - currency_options: NotRequired[ - Dict[ - str, - "PromotionCodeService.CreateParamsRestrictionsCurrencyOptions", - ] - ] - """ - Promotion codes defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). - """ - first_time_transaction: NotRequired[bool] - """ - A Boolean indicating if the Promotion Code should only be redeemed for Customers without any successful payments or invoices - """ - minimum_amount: NotRequired[int] - """ - Minimum amount required to redeem this Promotion Code into a Coupon (e.g., a purchase must be $100 or more to work). - """ - minimum_amount_currency: NotRequired[str] - """ - Three-letter [ISO code](https://stripe.com/docs/currencies) for minimum_amount - """ - - class CreateParamsRestrictionsCurrencyOptions(TypedDict): - minimum_amount: NotRequired[int] - """ - Minimum amount required to redeem this Promotion Code into a Coupon (e.g., a purchase must be $100 or more to work). - """ - - class ListParams(TypedDict): - active: NotRequired[bool] - """ - Filter promotion codes by whether they are active. - """ - code: NotRequired[str] - """ - Only return promotion codes that have this case-insensitive code. - """ - coupon: NotRequired[str] - """ - Only return promotion codes for this coupon. - """ - created: NotRequired["PromotionCodeService.ListParamsCreated|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. - """ - customer: NotRequired[str] - """ - Only return promotion codes that are restricted to this customer. - """ - customer_account: NotRequired[str] - """ - Only return promotion codes that are restricted to this account. - """ - 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 ListParamsCreated(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) - """ - - class RetrieveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class UpdateParams(TypedDict): - active: NotRequired[bool] - """ - Whether the promotion code is currently active. A promotion code can only be reactivated when the coupon is still valid and the promotion code is otherwise redeemable. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - restrictions: NotRequired[ - "PromotionCodeService.UpdateParamsRestrictions" - ] - """ - Settings that restrict the redemption of the promotion code. - """ - - class UpdateParamsRestrictions(TypedDict): - currency_options: NotRequired[ - Dict[ - str, - "PromotionCodeService.UpdateParamsRestrictionsCurrencyOptions", - ] - ] - """ - Promotion codes defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). - """ - - class UpdateParamsRestrictionsCurrencyOptions(TypedDict): - minimum_amount: NotRequired[int] - """ - Minimum amount required to redeem this Promotion Code into a Coupon (e.g., a purchase must be $100 or more to work). - """ - def list( self, - params: Optional["PromotionCodeService.ListParams"] = None, + params: Optional["PromotionCodeListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[PromotionCode]: """ @@ -219,7 +45,7 @@ def list( async def list_async( self, - params: Optional["PromotionCodeService.ListParams"] = None, + params: Optional["PromotionCodeListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[PromotionCode]: """ @@ -238,7 +64,7 @@ async def list_async( def create( self, - params: "PromotionCodeService.CreateParams", + params: "PromotionCodeCreateParams", options: Optional[RequestOptions] = None, ) -> PromotionCode: """ @@ -257,7 +83,7 @@ def create( async def create_async( self, - params: "PromotionCodeService.CreateParams", + params: "PromotionCodeCreateParams", options: Optional[RequestOptions] = None, ) -> PromotionCode: """ @@ -277,7 +103,7 @@ async def create_async( def retrieve( self, promotion_code: str, - params: Optional["PromotionCodeService.RetrieveParams"] = None, + params: Optional["PromotionCodeRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> PromotionCode: """ @@ -299,7 +125,7 @@ def retrieve( async def retrieve_async( self, promotion_code: str, - params: Optional["PromotionCodeService.RetrieveParams"] = None, + params: Optional["PromotionCodeRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> PromotionCode: """ @@ -321,7 +147,7 @@ async def retrieve_async( def update( self, promotion_code: str, - params: Optional["PromotionCodeService.UpdateParams"] = None, + params: Optional["PromotionCodeUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> PromotionCode: """ @@ -343,7 +169,7 @@ def update( async def update_async( self, promotion_code: str, - params: Optional["PromotionCodeService.UpdateParams"] = None, + params: Optional["PromotionCodeUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> PromotionCode: """ diff --git a/stripe/_quote.py b/stripe/_quote.py index 92b1420be..df1e94337 100644 --- a/stripe/_quote.py +++ b/stripe/_quote.py @@ -5,18 +5,11 @@ from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource from stripe._nested_resource_class_methods import nested_resource_class_methods -from stripe._request_options import RequestOptions from stripe._stripe_object import StripeObject from stripe._updateable_api_resource import UpdateableAPIResource from stripe._util import class_method_variant, sanitize_id from typing import Any, ClassVar, Dict, List, Optional, cast, overload -from typing_extensions import ( - Literal, - NotRequired, - TypedDict, - Unpack, - TYPE_CHECKING, -) +from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: from stripe._account import Account @@ -36,6 +29,35 @@ SubscriptionSchedule as SubscriptionScheduleResource, ) from stripe._tax_rate import TaxRate + from stripe.params._quote_accept_params import QuoteAcceptParams + from stripe.params._quote_cancel_params import QuoteCancelParams + from stripe.params._quote_create_params import QuoteCreateParams + from stripe.params._quote_finalize_quote_params import ( + QuoteFinalizeQuoteParams, + ) + from stripe.params._quote_list_computed_upfront_line_items_params import ( + QuoteListComputedUpfrontLineItemsParams, + ) + from stripe.params._quote_list_line_items_params import ( + QuoteListLineItemsParams, + ) + from stripe.params._quote_list_lines_params import QuoteListLinesParams + from stripe.params._quote_list_params import QuoteListParams + from stripe.params._quote_list_preview_invoice_lines_params import ( + QuoteListPreviewInvoiceLinesParams, + ) + from stripe.params._quote_list_preview_invoices_params import ( + QuoteListPreviewInvoicesParams, + ) + from stripe.params._quote_list_preview_subscription_schedules_params import ( + QuoteListPreviewSubscriptionSchedulesParams, + ) + from stripe.params._quote_mark_draft_params import QuoteMarkDraftParams + from stripe.params._quote_mark_stale_params import QuoteMarkStaleParams + from stripe.params._quote_modify_params import QuoteModifyParams + from stripe.params._quote_pdf_params import QuotePdfParams + from stripe.params._quote_reestimate_params import QuoteReestimateParams + from stripe.params._quote_retrieve_params import QuoteRetrieveParams from stripe.test_helpers._test_clock import TestClock @@ -687,2700 +709,228 @@ class LineStartsAt(StripeObject): The timestamp the given line starts at. """ timestamp: Optional[int] - """ - A precise Unix timestamp. - """ - type: Literal[ - "line_starts_at", - "now", - "pause_collection_start", - "quote_acceptance_date", - "timestamp", - ] - """ - The type of method to specify the `bill_from` time. - """ - _inner_class_types = {"line_starts_at": LineStartsAt} - - class BillUntil(StripeObject): - class Duration(StripeObject): - interval: Literal["day", "month", "week", "year"] - """ - Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. - """ - interval_count: int - """ - The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. - """ - - class LineEndsAt(StripeObject): - id: str - """ - Unique identifier for the object. - """ - - computed: Optional[int] - """ - The materialized time. - """ - duration: Optional[Duration] - """ - Time span for the quote line starting from the `starts_at` date. - """ - line_ends_at: Optional[LineEndsAt] - """ - The timestamp the given line ends at. - """ - timestamp: Optional[int] - """ - A precise Unix timestamp. - """ - type: Literal[ - "duration", - "line_ends_at", - "schedule_end", - "timestamp", - "upcoming_invoice", - ] - """ - The type of method to specify the `bill_until` time. - """ - _inner_class_types = { - "duration": Duration, - "line_ends_at": LineEndsAt, - } - - bill_from: Optional[BillFrom] - """ - The start of the period to bill from when the Quote is accepted. - """ - bill_until: Optional[BillUntil] - """ - The end of the period to bill until when the Quote is accepted. - """ - _inner_class_types = { - "bill_from": BillFrom, - "bill_until": BillUntil, - } - - applies_to: AppliesTo - bill_on_acceptance: Optional[BillOnAcceptance] - """ - Describes the period to bill for upon accepting the quote. - """ - billing_behavior: Optional[ - Literal["prorate_on_next_phase", "prorate_up_front"] - ] - """ - Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front. - """ - customer: Optional[str] - """ - The customer which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed. - """ - description: Optional[str] - """ - The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. - """ - end_behavior: Optional[Literal["cancel", "release"]] - """ - Behavior of the subscription schedule and underlying subscription when it ends. - """ - proration_behavior: Optional[ - Literal["always_invoice", "create_prorations", "none"] - ] - """ - Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the quote is accepted. - """ - _inner_class_types = { - "applies_to": AppliesTo, - "bill_on_acceptance": BillOnAcceptance, - } - - class SubscriptionSchedule(StripeObject): - class AppliesTo(StripeObject): - new_reference: Optional[str] - """ - A custom string that identifies a new subscription schedule being created upon quote acceptance. All quote lines with the same `new_reference` field will be applied to the creation of a new subscription schedule. - """ - subscription_schedule: Optional[str] - """ - The ID of the schedule the line applies to. - """ - type: Literal["new_reference", "subscription_schedule"] - """ - Describes whether the quote line is affecting a new schedule or an existing schedule. - """ - - applies_to: AppliesTo - subscription_schedule: str - """ - The subscription schedule that was created or updated from this quote. - """ - _inner_class_types = {"applies_to": AppliesTo} - - class TotalDetails(StripeObject): - class Breakdown(StripeObject): - class Discount(StripeObject): - amount: int - """ - The amount discounted. - """ - discount: "DiscountResource" - """ - A discount represents the actual application of a [coupon](https://stripe.com/docs/api#coupons) or [promotion code](https://stripe.com/docs/api#promotion_codes). - It contains information about when the discount began, when it will end, and what it is applied to. - - Related guide: [Applying discounts to subscriptions](https://stripe.com/docs/billing/subscriptions/discounts) - """ - - class Tax(StripeObject): - amount: int - """ - Amount of tax applied for this rate. - """ - rate: "TaxRate" - """ - Tax rates can be applied to [invoices](https://docs.stripe.com/invoicing/taxes/tax-rates), [subscriptions](https://docs.stripe.com/billing/taxes/tax-rates) and [Checkout Sessions](https://docs.stripe.com/payments/checkout/use-manual-tax-rates) to collect tax. - - Related guide: [Tax rates](https://docs.stripe.com/billing/taxes/tax-rates) - """ - taxability_reason: Optional[ - Literal[ - "customer_exempt", - "not_collecting", - "not_subject_to_tax", - "not_supported", - "portion_product_exempt", - "portion_reduced_rated", - "portion_standard_rated", - "product_exempt", - "product_exempt_holiday", - "proportionally_rated", - "reduced_rated", - "reverse_charge", - "standard_rated", - "taxable_basis_reduced", - "zero_rated", - ] - ] - """ - The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. - """ - taxable_amount: Optional[int] - """ - The amount on which tax is calculated, in cents (or local equivalent). - """ - - discounts: List[Discount] - """ - The aggregated discounts. - """ - taxes: List[Tax] - """ - The aggregated tax amounts by rate. - """ - _inner_class_types = {"discounts": Discount, "taxes": Tax} - - amount_discount: int - """ - This is the sum of all the discounts. - """ - amount_shipping: Optional[int] - """ - This is the sum of all the shipping amounts. - """ - amount_tax: int - """ - This is the sum of all the tax amounts. - """ - breakdown: Optional[Breakdown] - _inner_class_types = {"breakdown": Breakdown} - - class TransferData(StripeObject): - amount: Optional[int] - """ - The amount in cents (or local equivalent) that will be transferred to the destination account when the invoice is paid. By default, the entire amount is transferred to the destination. - """ - amount_percent: Optional[float] - """ - A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount will be transferred to the destination. - """ - destination: ExpandableField["Account"] - """ - The account where funds from the payment will be transferred to upon payment success. - """ - - class AcceptParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class CancelParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class CreateParams(RequestOptions): - allow_backdated_lines: NotRequired[bool] - """ - Set to true to allow quote lines to have `starts_at` in the past if collection is paused between `starts_at` and now. - """ - application_fee_amount: NotRequired["Literal['']|int"] - """ - The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. There cannot be any line items with recurring prices when using this field. - """ - application_fee_percent: NotRequired["Literal['']|float"] - """ - A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. There must be at least 1 line item with a recurring price to use this field. - """ - automatic_tax: NotRequired["Quote.CreateParamsAutomaticTax"] - """ - Settings for automatic tax lookup for this quote and resulting invoices and subscriptions. - """ - collection_method: NotRequired[ - Literal["charge_automatically", "send_invoice"] - ] - """ - Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay invoices at the end of the subscription cycle or at invoice finalization using the default payment method attached to the subscription or customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`. - """ - customer: NotRequired[str] - """ - The customer for which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed. - """ - customer_account: NotRequired[str] - """ - The account for which this quote belongs to. A customer or account is required before finalizing the quote. Once specified, it cannot be changed. - """ - default_tax_rates: NotRequired["Literal['']|List[str]"] - """ - The tax rates that will apply to any line item that does not have `tax_rates` set. - """ - description: NotRequired["Literal['']|str"] - """ - A description that will be displayed on the quote PDF. If no value is passed, the default description configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used. - """ - discounts: NotRequired["Literal['']|List[Quote.CreateParamsDiscount]"] - """ - The discounts applied to the quote. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - expires_at: NotRequired[int] - """ - A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch. If no value is passed, the default expiration date configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used. - """ - footer: NotRequired["Literal['']|str"] - """ - A footer that will be displayed on the quote PDF. If no value is passed, the default footer configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used. - """ - from_quote: NotRequired["Quote.CreateParamsFromQuote"] - """ - Clone an existing quote. The new quote will be created in `status=draft`. When using this parameter, you cannot specify any other parameters except for `expires_at`. - """ - header: NotRequired["Literal['']|str"] - """ - A header that will be displayed on the quote PDF. If no value is passed, the default header configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used. - """ - invoice_settings: NotRequired["Quote.CreateParamsInvoiceSettings"] - """ - All invoices will be billed using the specified settings. - """ - line_items: NotRequired[List["Quote.CreateParamsLineItem"]] - """ - A list of line items the customer is being quoted for. Each line item includes information about the product, the quantity, and the resulting cost. - """ - lines: NotRequired[List["Quote.CreateParamsLine"]] - """ - A list of [quote lines](https://docs.stripe.com/api/quote_lines) on the quote. These lines describe changes, in the order provided, that will be used to create new subscription schedules or update existing subscription schedules when the quote is accepted. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - on_behalf_of: NotRequired["Literal['']|str"] - """ - The account on behalf of which to charge. - """ - subscription_data: NotRequired["Quote.CreateParamsSubscriptionData"] - """ - When creating a subscription or subscription schedule, the specified configuration data will be used. There must be at least one line item with a recurring price for a subscription or subscription schedule to be created. A subscription schedule is created if `subscription_data[effective_date]` is present and in the future, otherwise a subscription is created. - """ - subscription_data_overrides: NotRequired[ - List["Quote.CreateParamsSubscriptionDataOverride"] - ] - """ - List representing overrides for `subscription_data` configurations for specific subscription schedules. - """ - test_clock: NotRequired[str] - """ - ID of the test clock to attach to the quote. - """ - transfer_data: NotRequired[ - "Literal['']|Quote.CreateParamsTransferData" - ] - """ - The data with which to automatically create a Transfer for each of the invoices. - """ - - class CreateParamsAutomaticTax(TypedDict): - enabled: bool - """ - Controls whether Stripe will automatically compute tax on the resulting invoices or subscriptions as well as the quote itself. - """ - liability: NotRequired["Quote.CreateParamsAutomaticTaxLiability"] - """ - The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. - """ - - class CreateParamsAutomaticTaxLiability(TypedDict): - account: NotRequired[str] - """ - The connected account being referenced when `type` is `account`. - """ - type: Literal["account", "self"] - """ - Type of the account referenced in the request. - """ - - class CreateParamsDiscount(TypedDict): - coupon: NotRequired[str] - """ - ID of the coupon to create a new discount for. - """ - discount: NotRequired[str] - """ - ID of an existing discount on the object (or one of its ancestors) to reuse. - """ - discount_end: NotRequired["Quote.CreateParamsDiscountDiscountEnd"] - """ - Details to determine how long the discount should be applied for. - """ - promotion_code: NotRequired[str] - """ - ID of the promotion code to create a new discount for. - """ - - class CreateParamsDiscountDiscountEnd(TypedDict): - duration: NotRequired["Quote.CreateParamsDiscountDiscountEndDuration"] - """ - Time span for the redeemed discount. - """ - timestamp: NotRequired[int] - """ - A precise Unix timestamp for the discount to end. Must be in the future. - """ - type: Literal["duration", "timestamp"] - """ - The type of calculation made to determine when the discount ends. - """ - - class CreateParamsDiscountDiscountEndDuration(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. - """ - interval_count: int - """ - The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. - """ - - class CreateParamsFromQuote(TypedDict): - is_revision: NotRequired[bool] - """ - Whether this quote is a revision of the previous quote. - """ - quote: str - """ - The `id` of the quote that will be cloned. - """ - - class CreateParamsInvoiceSettings(TypedDict): - days_until_due: NotRequired[int] - """ - Number of days within which a customer must pay the invoice generated by this quote. This value will be `null` for quotes where `collection_method=charge_automatically`. - """ - issuer: NotRequired["Quote.CreateParamsInvoiceSettingsIssuer"] - """ - The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. - """ - - class CreateParamsInvoiceSettingsIssuer(TypedDict): - account: NotRequired[str] - """ - The connected account being referenced when `type` is `account`. - """ - type: Literal["account", "self"] - """ - Type of the account referenced in the request. - """ - - class CreateParamsLine(TypedDict): - actions: NotRequired[List["Quote.CreateParamsLineAction"]] - """ - An array of operations the quote line performs. - """ - applies_to: NotRequired["Quote.CreateParamsLineAppliesTo"] - """ - Details to identify the subscription schedule the quote line applies to. - """ - billing_cycle_anchor: NotRequired[ - Literal["automatic", "line_starts_at"] - ] - """ - For point-in-time quote lines (having no `ends_at` timestamp), this attribute lets you set or remove whether the subscription's billing cycle anchor is reset at the Quote Line `starts_at` timestamp.For time-span based quote lines (having both `starts_at` and `ends_at`), the only valid value is `automatic`, which removes any previously configured billing cycle anchor resets during the window of time spanning the quote line. - """ - cancel_subscription_schedule: NotRequired[ - "Quote.CreateParamsLineCancelSubscriptionSchedule" - ] - """ - A point-in-time operation that cancels an existing subscription schedule at the line's starts_at timestamp. Currently only compatible with `quote_acceptance_date` for `starts_at`. When using cancel_subscription_schedule, the subscription schedule on the quote remains unalterable, except for modifications to the metadata, collection_method or invoice_settings. - """ - ends_at: NotRequired["Quote.CreateParamsLineEndsAt"] - """ - Details to identify the end of the time range modified by the proposed change. If not supplied, the quote line is considered a point-in-time operation that only affects the exact timestamp at `starts_at`, and a restricted set of attributes is supported on the quote line. - """ - proration_behavior: NotRequired[ - Literal["always_invoice", "create_prorations", "none"] - ] - """ - Changes to how Stripe handles prorations during the quote line's time span. Affects if and how prorations are created when a future phase starts. - """ - set_pause_collection: NotRequired[ - "Quote.CreateParamsLineSetPauseCollection" - ] - """ - Defines how to pause collection for the underlying subscription throughout the duration of the amendment. - """ - set_schedule_end: NotRequired[ - Literal["line_ends_at", "line_starts_at"] - ] - """ - Timestamp helper to end the underlying schedule early, based on the acompanying line's start or end date. - """ - starts_at: NotRequired["Quote.CreateParamsLineStartsAt"] - """ - Details to identify the earliest timestamp where the proposed change should take effect. - """ - trial_settings: NotRequired["Quote.CreateParamsLineTrialSettings"] - """ - Settings related to subscription trials. - """ - - class CreateParamsLineAction(TypedDict): - add_discount: NotRequired["Quote.CreateParamsLineActionAddDiscount"] - """ - Details for the `add_discount` type. - """ - add_item: NotRequired["Quote.CreateParamsLineActionAddItem"] - """ - Details for the `add_item` type. - """ - add_metadata: NotRequired[Dict[str, str]] - """ - Details for the `add_metadata` type: specify a hash of key-value pairs. - """ - remove_discount: NotRequired[ - "Quote.CreateParamsLineActionRemoveDiscount" - ] - """ - Details for the `remove_discount` type. - """ - remove_item: NotRequired["Quote.CreateParamsLineActionRemoveItem"] - """ - Details for the `remove_item` type. - """ - remove_metadata: NotRequired[List[str]] - """ - Details for the `remove_metadata` type: specify an array of metadata keys. - """ - set_discounts: NotRequired[ - List["Quote.CreateParamsLineActionSetDiscount"] - ] - """ - Details for the `set_discounts` type. - """ - set_items: NotRequired[List["Quote.CreateParamsLineActionSetItem"]] - """ - Details for the `set_items` type. - """ - set_metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Details for the `set_metadata` type: specify an array of key-value pairs. - """ - type: Literal[ - "add_discount", - "add_item", - "add_metadata", - "clear_discounts", - "clear_metadata", - "remove_discount", - "remove_item", - "remove_metadata", - "set_discounts", - "set_items", - "set_metadata", - ] - """ - The type of action the quote line performs. - """ - - class CreateParamsLineActionAddDiscount(TypedDict): - coupon: NotRequired[str] - """ - The coupon code to redeem. - """ - discount: NotRequired[str] - """ - An ID of an existing discount for a coupon that was already redeemed. - """ - discount_end: NotRequired[ - "Quote.CreateParamsLineActionAddDiscountDiscountEnd" - ] - """ - Details to determine how long the discount should be applied for. - """ - index: NotRequired[int] - """ - The index, starting at 0, at which to position the new discount. When not supplied, Stripe defaults to appending the discount to the end of the `discounts` array. - """ - promotion_code: NotRequired[str] - """ - The promotion code to redeem. - """ - - class CreateParamsLineActionAddDiscountDiscountEnd(TypedDict): - type: Literal["line_ends_at"] - """ - The type of calculation made to determine when the discount ends. - """ - - class CreateParamsLineActionAddItem(TypedDict): - discounts: NotRequired[ - List["Quote.CreateParamsLineActionAddItemDiscount"] - ] - """ - The discounts applied to the item. Subscription item discounts are applied before subscription discounts. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - price: str - """ - The ID of the price object. - """ - quantity: NotRequired[int] - """ - Quantity for this item. - """ - tax_rates: NotRequired[List[str]] - """ - The tax rates that apply to this subscription item. When set, the `default_tax_rates` on the subscription do not apply to this `subscription_item`. - """ - trial: NotRequired["Quote.CreateParamsLineActionAddItemTrial"] - """ - Options that configure the trial on the subscription item. - """ - - class CreateParamsLineActionAddItemDiscount(TypedDict): - coupon: NotRequired[str] - """ - ID of the coupon to create a new discount for. - """ - discount: NotRequired[str] - """ - ID of an existing discount on the object (or one of its ancestors) to reuse. - """ - discount_end: NotRequired[ - "Quote.CreateParamsLineActionAddItemDiscountDiscountEnd" - ] - """ - Details to determine how long the discount should be applied for. - """ - promotion_code: NotRequired[str] - """ - ID of the promotion code to create a new discount for. - """ - - class CreateParamsLineActionAddItemDiscountDiscountEnd(TypedDict): - duration: NotRequired[ - "Quote.CreateParamsLineActionAddItemDiscountDiscountEndDuration" - ] - """ - Time span for the redeemed discount. - """ - timestamp: NotRequired[int] - """ - A precise Unix timestamp for the discount to end. Must be in the future. - """ - type: Literal["duration", "timestamp"] - """ - The type of calculation made to determine when the discount ends. - """ - - class CreateParamsLineActionAddItemDiscountDiscountEndDuration(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. - """ - interval_count: int - """ - The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. - """ - - class CreateParamsLineActionAddItemTrial(TypedDict): - converts_to: NotRequired[List[str]] - """ - List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. - """ - type: Literal["free", "paid"] - """ - Determines the type of trial for this item. - """ - - class CreateParamsLineActionRemoveDiscount(TypedDict): - coupon: NotRequired[str] - """ - The coupon code to remove from the `discounts` array. - """ - discount: NotRequired[str] - """ - The ID of a discount to remove from the `discounts` array. - """ - promotion_code: NotRequired[str] - """ - The ID of a promotion code to remove from the `discounts` array. - """ - - class CreateParamsLineActionRemoveItem(TypedDict): - price: str - """ - ID of a price to remove. - """ - - class CreateParamsLineActionSetDiscount(TypedDict): - coupon: NotRequired[str] - """ - The coupon code to replace the `discounts` array with. - """ - discount: NotRequired[str] - """ - An ID of an existing discount to replace the `discounts` array with. - """ - promotion_code: NotRequired[str] - """ - An ID of an existing promotion code to replace the `discounts` array with. - """ - - class CreateParamsLineActionSetItem(TypedDict): - discounts: NotRequired[ - List["Quote.CreateParamsLineActionSetItemDiscount"] - ] - """ - If an item with the `price` already exists, passing this will override the `discounts` array on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `discounts`. - """ - metadata: NotRequired[Dict[str, str]] - """ - If an item with the `price` already exists, passing this will override the `metadata` on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `metadata`. - """ - price: str - """ - The ID of the price object. - """ - quantity: NotRequired[int] - """ - If an item with the `price` already exists, passing this will override the quantity on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `quantity`. - """ - tax_rates: NotRequired[List[str]] - """ - If an item with the `price` already exists, passing this will override the `tax_rates` array on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `tax_rates`. - """ - trial: NotRequired["Quote.CreateParamsLineActionSetItemTrial"] - """ - If an item with the `price` already exists, passing this will override the `trial` configuration on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `trial`. - """ - - class CreateParamsLineActionSetItemDiscount(TypedDict): - coupon: NotRequired[str] - """ - ID of the coupon to create a new discount for. - """ - discount: NotRequired[str] - """ - ID of an existing discount on the object (or one of its ancestors) to reuse. - """ - discount_end: NotRequired[ - "Quote.CreateParamsLineActionSetItemDiscountDiscountEnd" - ] - """ - Details to determine how long the discount should be applied for. - """ - promotion_code: NotRequired[str] - """ - ID of the promotion code to create a new discount for. - """ - - class CreateParamsLineActionSetItemDiscountDiscountEnd(TypedDict): - duration: NotRequired[ - "Quote.CreateParamsLineActionSetItemDiscountDiscountEndDuration" - ] - """ - Time span for the redeemed discount. - """ - timestamp: NotRequired[int] - """ - A precise Unix timestamp for the discount to end. Must be in the future. - """ - type: Literal["duration", "timestamp"] - """ - The type of calculation made to determine when the discount ends. - """ - - class CreateParamsLineActionSetItemDiscountDiscountEndDuration(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. - """ - interval_count: int - """ - The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. - """ - - class CreateParamsLineActionSetItemTrial(TypedDict): - converts_to: NotRequired[List[str]] - """ - List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. - """ - type: Literal["free", "paid"] - """ - Determines the type of trial for this item. - """ - - class CreateParamsLineAppliesTo(TypedDict): - new_reference: NotRequired[str] - """ - A custom string that identifies a new subscription schedule being created upon quote acceptance. All quote lines with the same `new_reference` field will be applied to the creation of a new subscription schedule. - """ - subscription_schedule: NotRequired[str] - """ - The ID of the schedule the line applies to. - """ - type: Literal["new_reference", "subscription_schedule"] - """ - Describes whether the quote line is affecting a new schedule or an existing schedule. - """ - - class CreateParamsLineCancelSubscriptionSchedule(TypedDict): - cancel_at: Literal["line_starts_at"] - """ - Timestamp helper to cancel the underlying schedule on the accompanying line's start date. Must be set to `line_starts_at`. - """ - invoice_now: NotRequired[bool] - """ - If the subscription schedule is `active`, indicates if a final invoice will be generated that contains any un-invoiced metered usage and new/pending proration invoice items. Boolean that defaults to `true`. - """ - prorate: NotRequired[bool] - """ - If the subscription schedule is `active`, indicates if the cancellation should be prorated. Boolean that defaults to `true`. - """ - - class CreateParamsLineEndsAt(TypedDict): - discount_end: NotRequired["Quote.CreateParamsLineEndsAtDiscountEnd"] - """ - Use the `end` time of a given discount. - """ - duration: NotRequired["Quote.CreateParamsLineEndsAtDuration"] - """ - Time span for the quote line starting from the `starts_at` date. - """ - timestamp: NotRequired[int] - """ - A precise Unix timestamp. - """ - type: Literal[ - "billing_period_end", - "discount_end", - "duration", - "quote_acceptance_date", - "schedule_end", - "timestamp", - "upcoming_invoice", - ] - """ - Select a way to pass in `ends_at`. - """ - - class CreateParamsLineEndsAtDiscountEnd(TypedDict): - discount: str - """ - The ID of a specific discount. - """ - - class CreateParamsLineEndsAtDuration(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. - """ - interval_count: int - """ - The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. - """ - - class CreateParamsLineItem(TypedDict): - discounts: NotRequired[ - "Literal['']|List[Quote.CreateParamsLineItemDiscount]" - ] - """ - The discounts applied to this line item. - """ - price: NotRequired[str] - """ - The ID of the price object. One of `price` or `price_data` is required. - """ - price_data: NotRequired["Quote.CreateParamsLineItemPriceData"] - """ - Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. - """ - quantity: NotRequired[int] - """ - The quantity of the line item. - """ - tax_rates: NotRequired["Literal['']|List[str]"] - """ - The tax rates which apply to the line item. When set, the `default_tax_rates` on the quote do not apply to this line item. - """ - - class CreateParamsLineItemDiscount(TypedDict): - coupon: NotRequired[str] - """ - ID of the coupon to create a new discount for. - """ - discount: NotRequired[str] - """ - ID of an existing discount on the object (or one of its ancestors) to reuse. - """ - discount_end: NotRequired[ - "Quote.CreateParamsLineItemDiscountDiscountEnd" - ] - """ - Details to determine how long the discount should be applied for. - """ - promotion_code: NotRequired[str] - """ - ID of the promotion code to create a new discount for. - """ - - class CreateParamsLineItemDiscountDiscountEnd(TypedDict): - duration: NotRequired[ - "Quote.CreateParamsLineItemDiscountDiscountEndDuration" - ] - """ - Time span for the redeemed discount. - """ - timestamp: NotRequired[int] - """ - A precise Unix timestamp for the discount to end. Must be in the future. - """ - type: Literal["duration", "timestamp"] - """ - The type of calculation made to determine when the discount ends. - """ - - class CreateParamsLineItemDiscountDiscountEndDuration(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. - """ - interval_count: int - """ - The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. - """ - - class CreateParamsLineItemPriceData(TypedDict): - 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). - """ - product: str - """ - The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to. - """ - recurring: NotRequired["Quote.CreateParamsLineItemPriceDataRecurring"] - """ - The recurring components of a price such as `interval` and `interval_count`. - """ - tax_behavior: NotRequired[ - Literal["exclusive", "inclusive", "unspecified"] - ] - """ - Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. - """ - unit_amount: NotRequired[int] - """ - A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. - """ - unit_amount_decimal: NotRequired[str] - """ - Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - """ - - class CreateParamsLineItemPriceDataRecurring(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Specifies billing frequency. Either `day`, `week`, `month` or `year`. - """ - interval_count: NotRequired[int] - """ - The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). - """ - - class CreateParamsLineSetPauseCollection(TypedDict): - set: NotRequired["Quote.CreateParamsLineSetPauseCollectionSet"] - """ - Details of the pause_collection behavior to apply to the amendment. - """ - type: Literal["remove", "set"] - """ - Determines the type of the pause_collection amendment. - """ - - class CreateParamsLineSetPauseCollectionSet(TypedDict): - behavior: Literal["keep_as_draft", "mark_uncollectible", "void"] - """ - The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. - """ - - class CreateParamsLineStartsAt(TypedDict): - discount_end: NotRequired["Quote.CreateParamsLineStartsAtDiscountEnd"] - """ - Use the `end` time of a given discount. - """ - line_ends_at: NotRequired["Quote.CreateParamsLineStartsAtLineEndsAt"] - """ - The timestamp the given line ends at. - """ - timestamp: NotRequired[int] - """ - A precise Unix timestamp. - """ - type: Literal[ - "discount_end", - "line_ends_at", - "now", - "quote_acceptance_date", - "schedule_end", - "timestamp", - "upcoming_invoice", - ] - """ - Select a way to pass in `starts_at`. - """ - - class CreateParamsLineStartsAtDiscountEnd(TypedDict): - discount: str - """ - The ID of a specific discount. - """ - - class CreateParamsLineStartsAtLineEndsAt(TypedDict): - index: NotRequired[int] - """ - The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array. - """ - - class CreateParamsLineTrialSettings(TypedDict): - end_behavior: NotRequired[ - "Quote.CreateParamsLineTrialSettingsEndBehavior" - ] - """ - Defines how the subscription should behave when a trial ends. - """ - - class CreateParamsLineTrialSettingsEndBehavior(TypedDict): - prorate_up_front: NotRequired[Literal["defer", "include"]] - """ - Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`. - """ - - class CreateParamsSubscriptionData(TypedDict): - bill_on_acceptance: NotRequired[ - "Quote.CreateParamsSubscriptionDataBillOnAcceptance" - ] - """ - Describes the period to bill for upon accepting the quote. - """ - billing_behavior: NotRequired[ - Literal["prorate_on_next_phase", "prorate_up_front"] - ] - """ - Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front. - """ - billing_cycle_anchor: NotRequired["Literal['']|Literal['reset']"] - """ - When specified as `reset`, the subscription will always start a new billing period when the quote is accepted. - """ - billing_mode: NotRequired[ - "Quote.CreateParamsSubscriptionDataBillingMode" - ] - """ - Controls how prorations and invoices for subscriptions are calculated and orchestrated. - """ - description: NotRequired[str] - """ - The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. - """ - effective_date: NotRequired[ - "Literal['']|Literal['current_period_end']|int" - ] - """ - When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. When updating a subscription, the date of which the subscription will be updated using a subscription schedule. The special value `current_period_end` can be provided to update a subscription at the end of its current period. The `effective_date` is ignored if it is in the past when the quote is accepted. - """ - end_behavior: NotRequired[Literal["cancel", "release"]] - """ - Behavior of the subscription schedule and underlying subscription when it ends. - """ - from_subscription: NotRequired[str] - """ - The id of a subscription that the quote will update. By default, the quote will contain the state of the subscription (such as line items, collection method and billing thresholds) unless overridden. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will set metadata on the subscription or subscription schedule when the quote is accepted. If a recurring price is included in `line_items`, this field will be passed to the resulting subscription's `metadata` field. If `subscription_data.effective_date` is used, this field will be passed to the resulting subscription schedule's `phases.metadata` field. Unlike object-level metadata, this field is declarative. Updates will clear prior values. - """ - prebilling: NotRequired[ - "Literal['']|Quote.CreateParamsSubscriptionDataPrebilling" - ] - """ - If specified, the invoicing for the given billing cycle iterations will be processed when the quote is accepted. Cannot be used with `effective_date`. - """ - proration_behavior: NotRequired[ - Literal["always_invoice", "create_prorations", "none"] - ] - """ - Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations). When creating a subscription, valid values are `create_prorations` or `none`. - - When updating a subscription, valid values are `create_prorations`, `none`, or `always_invoice`. - - Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`. - - Prorations can be disabled by passing `none`. - """ - trial_period_days: NotRequired["Literal['']|int"] - """ - Integer representing the number of trial period days before the customer is charged for the first time. - """ - - class CreateParamsSubscriptionDataBillOnAcceptance(TypedDict): - bill_from: NotRequired[ - "Quote.CreateParamsSubscriptionDataBillOnAcceptanceBillFrom" - ] - """ - The start of the period to bill from when the Quote is accepted. - """ - bill_until: NotRequired[ - "Quote.CreateParamsSubscriptionDataBillOnAcceptanceBillUntil" - ] - """ - The end of the period to bill until when the Quote is accepted. - """ - - class CreateParamsSubscriptionDataBillOnAcceptanceBillFrom(TypedDict): - line_starts_at: NotRequired[ - "Quote.CreateParamsSubscriptionDataBillOnAcceptanceBillFromLineStartsAt" - ] - """ - Details of a Quote line to start the bill period from. - """ - timestamp: NotRequired[int] - """ - A precise Unix timestamp. - """ - type: Literal[ - "line_starts_at", - "now", - "pause_collection_start", - "quote_acceptance_date", - "timestamp", - ] - """ - The type of method to specify the `bill_from` time. - """ - - class CreateParamsSubscriptionDataBillOnAcceptanceBillFromLineStartsAt( - TypedDict, - ): - id: NotRequired[str] - """ - The ID of a quote line. - """ - index: NotRequired[int] - """ - The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array. - """ - - class CreateParamsSubscriptionDataBillOnAcceptanceBillUntil(TypedDict): - duration: NotRequired[ - "Quote.CreateParamsSubscriptionDataBillOnAcceptanceBillUntilDuration" - ] - """ - Details of the duration over which to bill. - """ - line_ends_at: NotRequired[ - "Quote.CreateParamsSubscriptionDataBillOnAcceptanceBillUntilLineEndsAt" - ] - """ - Details of a Quote line item from which to bill until. - """ - timestamp: NotRequired[int] - """ - A precise Unix timestamp. - """ - type: Literal[ - "duration", - "line_ends_at", - "schedule_end", - "timestamp", - "upcoming_invoice", - ] - """ - The type of method to specify the `bill_until` time. - """ - - class CreateParamsSubscriptionDataBillOnAcceptanceBillUntilDuration( - TypedDict, - ): - interval: Literal["day", "month", "week", "year"] - """ - Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. - """ - interval_count: int - """ - The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. - """ - - class CreateParamsSubscriptionDataBillOnAcceptanceBillUntilLineEndsAt( - TypedDict, - ): - id: NotRequired[str] - """ - The ID of a quote line. - """ - index: NotRequired[int] - """ - The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array. - """ - - class CreateParamsSubscriptionDataBillingMode(TypedDict): - flexible: NotRequired[ - "Quote.CreateParamsSubscriptionDataBillingModeFlexible" - ] - """ - Configure behavior for flexible billing mode. - """ - type: Literal["classic", "flexible"] - """ - Controls the calculation and orchestration of prorations and invoices for subscriptions. If no value is passed, the default is `flexible`. - """ - - class CreateParamsSubscriptionDataBillingModeFlexible(TypedDict): - proration_discounts: NotRequired[Literal["included", "itemized"]] - """ - Controls how invoices and invoice items display proration amounts and discount amounts. - """ - - class CreateParamsSubscriptionDataOverride(TypedDict): - applies_to: "Quote.CreateParamsSubscriptionDataOverrideAppliesTo" - """ - Whether the override applies to an existing Subscription Schedule or a new Subscription Schedule. - """ - bill_on_acceptance: NotRequired[ - "Quote.CreateParamsSubscriptionDataOverrideBillOnAcceptance" - ] - """ - Describes the period to bill for upon accepting the quote. - """ - billing_behavior: NotRequired[ - Literal["prorate_on_next_phase", "prorate_up_front"] - ] - """ - Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front. - """ - customer: NotRequired[str] - """ - The customer the Subscription Data override applies to. This is only relevant when `applies_to.type=new_reference`. - """ - description: NotRequired[str] - """ - The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. - """ - end_behavior: NotRequired[Literal["cancel", "release"]] - """ - Behavior of the subscription schedule and underlying subscription when it ends. - """ - proration_behavior: NotRequired[ - Literal["always_invoice", "create_prorations", "none"] - ] - """ - Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations). When creating a subscription, valid values are `create_prorations` or `none`. - - When updating a subscription, valid values are `create_prorations`, `none`, or `always_invoice`. - - Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`. - - Prorations can be disabled by passing `none`. - """ - - class CreateParamsSubscriptionDataOverrideAppliesTo(TypedDict): - new_reference: NotRequired[str] - """ - A custom string that identifies a new subscription schedule being created upon quote acceptance. All quote lines with the same `new_reference` field will be applied to the creation of a new subscription schedule. - """ - subscription_schedule: NotRequired[str] - """ - The ID of the schedule the line applies to. - """ - type: Literal["new_reference", "subscription_schedule"] - """ - Describes whether the quote line is affecting a new schedule or an existing schedule. - """ - - class CreateParamsSubscriptionDataOverrideBillOnAcceptance(TypedDict): - bill_from: NotRequired[ - "Quote.CreateParamsSubscriptionDataOverrideBillOnAcceptanceBillFrom" - ] - """ - The start of the period to bill from when the Quote is accepted. - """ - bill_until: NotRequired[ - "Quote.CreateParamsSubscriptionDataOverrideBillOnAcceptanceBillUntil" - ] - """ - The end of the period to bill until when the Quote is accepted. - """ - - class CreateParamsSubscriptionDataOverrideBillOnAcceptanceBillFrom( - TypedDict, - ): - line_starts_at: NotRequired[ - "Quote.CreateParamsSubscriptionDataOverrideBillOnAcceptanceBillFromLineStartsAt" - ] - """ - Details of a Quote line to start the bill period from. - """ - timestamp: NotRequired[int] - """ - A precise Unix timestamp. - """ - type: Literal[ - "line_starts_at", - "now", - "pause_collection_start", - "quote_acceptance_date", - "timestamp", - ] - """ - The type of method to specify the `bill_from` time. - """ - - class CreateParamsSubscriptionDataOverrideBillOnAcceptanceBillFromLineStartsAt( - TypedDict, - ): - id: NotRequired[str] - """ - The ID of a quote line. - """ - index: NotRequired[int] - """ - The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array. - """ - - class CreateParamsSubscriptionDataOverrideBillOnAcceptanceBillUntil( - TypedDict, - ): - duration: NotRequired[ - "Quote.CreateParamsSubscriptionDataOverrideBillOnAcceptanceBillUntilDuration" - ] - """ - Details of the duration over which to bill. - """ - line_ends_at: NotRequired[ - "Quote.CreateParamsSubscriptionDataOverrideBillOnAcceptanceBillUntilLineEndsAt" - ] - """ - Details of a Quote line item from which to bill until. - """ - timestamp: NotRequired[int] - """ - A precise Unix timestamp. - """ - type: Literal[ - "duration", - "line_ends_at", - "schedule_end", - "timestamp", - "upcoming_invoice", - ] - """ - The type of method to specify the `bill_until` time. - """ - - class CreateParamsSubscriptionDataOverrideBillOnAcceptanceBillUntilDuration( - TypedDict, - ): - interval: Literal["day", "month", "week", "year"] - """ - Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. - """ - interval_count: int - """ - The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. - """ - - class CreateParamsSubscriptionDataOverrideBillOnAcceptanceBillUntilLineEndsAt( - TypedDict, - ): - id: NotRequired[str] - """ - The ID of a quote line. - """ - index: NotRequired[int] - """ - The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array. - """ - - class CreateParamsSubscriptionDataPrebilling(TypedDict): - iterations: int - """ - This is used to determine the number of billing cycles to prebill. - """ - - class CreateParamsTransferData(TypedDict): - amount: NotRequired[int] - """ - The amount that will be transferred automatically when the invoice is paid. If no amount is set, the full amount is transferred. There cannot be any line items with recurring prices when using this field. - """ - amount_percent: NotRequired[float] - """ - A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. There must be at least 1 line item with a recurring price to use this field. - """ - destination: str - """ - ID of an existing, connected Stripe account. - """ - - class FinalizeQuoteParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - expires_at: NotRequired[int] - """ - A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch. - """ - - class ListComputedUpfrontLineItemsParams(RequestOptions): - 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 ListLineItemsParams(RequestOptions): - 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 ListLinesParams(RequestOptions): - 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 ListParams(RequestOptions): - customer: NotRequired[str] - """ - The ID of the customer whose quotes will be retrieved. - """ - customer_account: NotRequired[str] - """ - The ID of the account whose quotes will be retrieved. - """ - 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. - """ - from_subscription: NotRequired[str] - """ - The subscription which the quote updates. - """ - 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. - """ - status: NotRequired[ - Literal[ - "accepted", "accepting", "canceled", "draft", "open", "stale" - ] - ] - """ - The status of the quote. - """ - test_clock: NotRequired[str] - """ - Provides a list of quotes that are associated with the specified test clock. The response will not include quotes with test clocks if this and the customer parameter is not set. - """ - - class ListPreviewInvoiceLinesParams(RequestOptions): - 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 ListPreviewInvoicesParams(RequestOptions): - 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 ListPreviewSubscriptionSchedulesParams(RequestOptions): - 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 MarkDraftParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class MarkStaleParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - reason: NotRequired[str] - """ - Reason the Quote is being marked stale. - """ - - class ModifyParams(RequestOptions): - allow_backdated_lines: NotRequired[bool] - """ - Set to true to allow quote lines to have `starts_at` in the past if collection is paused between `starts_at` and now. - """ - application_fee_amount: NotRequired["Literal['']|int"] - """ - The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. There cannot be any line items with recurring prices when using this field. - """ - application_fee_percent: NotRequired["Literal['']|float"] - """ - A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. There must be at least 1 line item with a recurring price to use this field. - """ - automatic_tax: NotRequired["Quote.ModifyParamsAutomaticTax"] - """ - Settings for automatic tax lookup for this quote and resulting invoices and subscriptions. - """ - collection_method: NotRequired[ - Literal["charge_automatically", "send_invoice"] - ] - """ - Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay invoices at the end of the subscription cycle or at invoice finalization using the default payment method attached to the subscription or customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`. - """ - customer: NotRequired[str] - """ - The customer for which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed. - """ - customer_account: NotRequired[str] - """ - The account for which this quote belongs to. A customer or account is required before finalizing the quote. Once specified, it cannot be changed. - """ - default_tax_rates: NotRequired["Literal['']|List[str]"] - """ - The tax rates that will apply to any line item that does not have `tax_rates` set. - """ - description: NotRequired["Literal['']|str"] - """ - A description that will be displayed on the quote PDF. - """ - discounts: NotRequired["Literal['']|List[Quote.ModifyParamsDiscount]"] - """ - The discounts applied to the quote. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - expires_at: NotRequired[int] - """ - A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch. - """ - footer: NotRequired["Literal['']|str"] - """ - A footer that will be displayed on the quote PDF. - """ - header: NotRequired["Literal['']|str"] - """ - A header that will be displayed on the quote PDF. - """ - invoice_settings: NotRequired["Quote.ModifyParamsInvoiceSettings"] - """ - All invoices will be billed using the specified settings. - """ - line_items: NotRequired[List["Quote.ModifyParamsLineItem"]] - """ - A list of line items the customer is being quoted for. Each line item includes information about the product, the quantity, and the resulting cost. - """ - lines: NotRequired[List["Quote.ModifyParamsLine"]] - """ - A list of [quote lines](https://docs.stripe.com/api/quote_lines) on the quote. These lines describe changes, in the order provided, that will be used to create new subscription schedules or update existing subscription schedules when the quote is accepted. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - on_behalf_of: NotRequired["Literal['']|str"] - """ - The account on behalf of which to charge. - """ - subscription_data: NotRequired["Quote.ModifyParamsSubscriptionData"] - """ - When creating a subscription or subscription schedule, the specified configuration data will be used. There must be at least one line item with a recurring price for a subscription or subscription schedule to be created. A subscription schedule is created if `subscription_data[effective_date]` is present and in the future, otherwise a subscription is created. - """ - subscription_data_overrides: NotRequired[ - "Literal['']|List[Quote.ModifyParamsSubscriptionDataOverride]" - ] - """ - List representing overrides for `subscription_data` configurations for specific subscription schedules. - """ - transfer_data: NotRequired[ - "Literal['']|Quote.ModifyParamsTransferData" - ] - """ - The data with which to automatically create a Transfer for each of the invoices. - """ - - class ModifyParamsAutomaticTax(TypedDict): - enabled: bool - """ - Controls whether Stripe will automatically compute tax on the resulting invoices or subscriptions as well as the quote itself. - """ - liability: NotRequired["Quote.ModifyParamsAutomaticTaxLiability"] - """ - The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. - """ - - class ModifyParamsAutomaticTaxLiability(TypedDict): - account: NotRequired[str] - """ - The connected account being referenced when `type` is `account`. - """ - type: Literal["account", "self"] - """ - Type of the account referenced in the request. - """ - - class ModifyParamsDiscount(TypedDict): - coupon: NotRequired[str] - """ - ID of the coupon to create a new discount for. - """ - discount: NotRequired[str] - """ - ID of an existing discount on the object (or one of its ancestors) to reuse. - """ - discount_end: NotRequired["Quote.ModifyParamsDiscountDiscountEnd"] - """ - Details to determine how long the discount should be applied for. - """ - promotion_code: NotRequired[str] - """ - ID of the promotion code to create a new discount for. - """ - - class ModifyParamsDiscountDiscountEnd(TypedDict): - duration: NotRequired["Quote.ModifyParamsDiscountDiscountEndDuration"] - """ - Time span for the redeemed discount. - """ - timestamp: NotRequired[int] - """ - A precise Unix timestamp for the discount to end. Must be in the future. - """ - type: Literal["duration", "timestamp"] - """ - The type of calculation made to determine when the discount ends. - """ - - class ModifyParamsDiscountDiscountEndDuration(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. - """ - interval_count: int - """ - The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. - """ - - class ModifyParamsInvoiceSettings(TypedDict): - days_until_due: NotRequired[int] - """ - Number of days within which a customer must pay the invoice generated by this quote. This value will be `null` for quotes where `collection_method=charge_automatically`. - """ - issuer: NotRequired["Quote.ModifyParamsInvoiceSettingsIssuer"] - """ - The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. - """ - - class ModifyParamsInvoiceSettingsIssuer(TypedDict): - account: NotRequired[str] - """ - The connected account being referenced when `type` is `account`. - """ - type: Literal["account", "self"] - """ - Type of the account referenced in the request. - """ - - class ModifyParamsLine(TypedDict): - actions: NotRequired[List["Quote.ModifyParamsLineAction"]] - """ - An array of operations the quote line performs. - """ - applies_to: NotRequired["Quote.ModifyParamsLineAppliesTo"] - """ - Details to identify the subscription schedule the quote line applies to. - """ - billing_cycle_anchor: NotRequired[ - Literal["automatic", "line_starts_at"] - ] - """ - For point-in-time quote lines (having no `ends_at` timestamp), this attribute lets you set or remove whether the subscription's billing cycle anchor is reset at the Quote Line `starts_at` timestamp.For time-span based quote lines (having both `starts_at` and `ends_at`), the only valid value is `automatic`, which removes any previously configured billing cycle anchor resets during the window of time spanning the quote line. - """ - cancel_subscription_schedule: NotRequired[ - "Quote.ModifyParamsLineCancelSubscriptionSchedule" - ] - """ - A point-in-time operation that cancels an existing subscription schedule at the line's starts_at timestamp. Currently only compatible with `quote_acceptance_date` for `starts_at`. When using cancel_subscription_schedule, the subscription schedule on the quote remains unalterable, except for modifications to the metadata, collection_method or invoice_settings. - """ - ends_at: NotRequired["Quote.ModifyParamsLineEndsAt"] - """ - Details to identify the end of the time range modified by the proposed change. If not supplied, the quote line is considered a point-in-time operation that only affects the exact timestamp at `starts_at`, and a restricted set of attributes is supported on the quote line. - """ - id: NotRequired[str] - """ - The ID of an existing line on the quote. - """ - proration_behavior: NotRequired[ - Literal["always_invoice", "create_prorations", "none"] - ] - """ - Changes to how Stripe handles prorations during the quote line's time span. Affects if and how prorations are created when a future phase starts. - """ - set_pause_collection: NotRequired[ - "Quote.ModifyParamsLineSetPauseCollection" - ] - """ - Defines how to pause collection for the underlying subscription throughout the duration of the amendment. - """ - set_schedule_end: NotRequired[ - Literal["line_ends_at", "line_starts_at"] - ] - """ - Timestamp helper to end the underlying schedule early, based on the acompanying line's start or end date. - """ - starts_at: NotRequired["Quote.ModifyParamsLineStartsAt"] - """ - Details to identify the earliest timestamp where the proposed change should take effect. - """ - trial_settings: NotRequired["Quote.ModifyParamsLineTrialSettings"] - """ - Settings related to subscription trials. - """ - - class ModifyParamsLineAction(TypedDict): - add_discount: NotRequired["Quote.ModifyParamsLineActionAddDiscount"] - """ - Details for the `add_discount` type. - """ - add_item: NotRequired["Quote.ModifyParamsLineActionAddItem"] - """ - Details for the `add_item` type. - """ - add_metadata: NotRequired[Dict[str, str]] - """ - Details for the `add_metadata` type: specify a hash of key-value pairs. - """ - remove_discount: NotRequired[ - "Quote.ModifyParamsLineActionRemoveDiscount" - ] - """ - Details for the `remove_discount` type. - """ - remove_item: NotRequired["Quote.ModifyParamsLineActionRemoveItem"] - """ - Details for the `remove_item` type. - """ - remove_metadata: NotRequired[List[str]] - """ - Details for the `remove_metadata` type: specify an array of metadata keys. - """ - set_discounts: NotRequired[ - List["Quote.ModifyParamsLineActionSetDiscount"] - ] - """ - Details for the `set_discounts` type. - """ - set_items: NotRequired[List["Quote.ModifyParamsLineActionSetItem"]] - """ - Details for the `set_items` type. - """ - set_metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Details for the `set_metadata` type: specify an array of key-value pairs. - """ - type: Literal[ - "add_discount", - "add_item", - "add_metadata", - "clear_discounts", - "clear_metadata", - "remove_discount", - "remove_item", - "remove_metadata", - "set_discounts", - "set_items", - "set_metadata", - ] - """ - The type of action the quote line performs. - """ - - class ModifyParamsLineActionAddDiscount(TypedDict): - coupon: NotRequired[str] - """ - The coupon code to redeem. - """ - discount: NotRequired[str] - """ - An ID of an existing discount for a coupon that was already redeemed. - """ - discount_end: NotRequired[ - "Quote.ModifyParamsLineActionAddDiscountDiscountEnd" - ] - """ - Details to determine how long the discount should be applied for. - """ - index: NotRequired[int] - """ - The index, starting at 0, at which to position the new discount. When not supplied, Stripe defaults to appending the discount to the end of the `discounts` array. - """ - promotion_code: NotRequired[str] - """ - The promotion code to redeem. - """ - - class ModifyParamsLineActionAddDiscountDiscountEnd(TypedDict): - type: Literal["line_ends_at"] - """ - The type of calculation made to determine when the discount ends. - """ - - class ModifyParamsLineActionAddItem(TypedDict): - discounts: NotRequired[ - List["Quote.ModifyParamsLineActionAddItemDiscount"] - ] - """ - The discounts applied to the item. Subscription item discounts are applied before subscription discounts. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - price: str - """ - The ID of the price object. - """ - quantity: NotRequired[int] - """ - Quantity for this item. - """ - tax_rates: NotRequired[List[str]] - """ - The tax rates that apply to this subscription item. When set, the `default_tax_rates` on the subscription do not apply to this `subscription_item`. - """ - trial: NotRequired["Quote.ModifyParamsLineActionAddItemTrial"] - """ - Options that configure the trial on the subscription item. - """ - - class ModifyParamsLineActionAddItemDiscount(TypedDict): - coupon: NotRequired[str] - """ - ID of the coupon to create a new discount for. - """ - discount: NotRequired[str] - """ - ID of an existing discount on the object (or one of its ancestors) to reuse. - """ - discount_end: NotRequired[ - "Quote.ModifyParamsLineActionAddItemDiscountDiscountEnd" - ] - """ - Details to determine how long the discount should be applied for. - """ - promotion_code: NotRequired[str] - """ - ID of the promotion code to create a new discount for. - """ - - class ModifyParamsLineActionAddItemDiscountDiscountEnd(TypedDict): - duration: NotRequired[ - "Quote.ModifyParamsLineActionAddItemDiscountDiscountEndDuration" - ] - """ - Time span for the redeemed discount. - """ - timestamp: NotRequired[int] - """ - A precise Unix timestamp for the discount to end. Must be in the future. - """ - type: Literal["duration", "timestamp"] - """ - The type of calculation made to determine when the discount ends. - """ - - class ModifyParamsLineActionAddItemDiscountDiscountEndDuration(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. - """ - interval_count: int - """ - The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. - """ - - class ModifyParamsLineActionAddItemTrial(TypedDict): - converts_to: NotRequired[List[str]] - """ - List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. - """ - type: Literal["free", "paid"] - """ - Determines the type of trial for this item. - """ - - class ModifyParamsLineActionRemoveDiscount(TypedDict): - coupon: NotRequired[str] - """ - The coupon code to remove from the `discounts` array. - """ - discount: NotRequired[str] - """ - The ID of a discount to remove from the `discounts` array. - """ - promotion_code: NotRequired[str] - """ - The ID of a promotion code to remove from the `discounts` array. - """ - - class ModifyParamsLineActionRemoveItem(TypedDict): - price: str - """ - ID of a price to remove. - """ - - class ModifyParamsLineActionSetDiscount(TypedDict): - coupon: NotRequired[str] - """ - The coupon code to replace the `discounts` array with. - """ - discount: NotRequired[str] - """ - An ID of an existing discount to replace the `discounts` array with. - """ - promotion_code: NotRequired[str] - """ - An ID of an existing promotion code to replace the `discounts` array with. - """ - - class ModifyParamsLineActionSetItem(TypedDict): - discounts: NotRequired[ - List["Quote.ModifyParamsLineActionSetItemDiscount"] - ] - """ - If an item with the `price` already exists, passing this will override the `discounts` array on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `discounts`. - """ - metadata: NotRequired[Dict[str, str]] - """ - If an item with the `price` already exists, passing this will override the `metadata` on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `metadata`. - """ - price: str - """ - The ID of the price object. - """ - quantity: NotRequired[int] - """ - If an item with the `price` already exists, passing this will override the quantity on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `quantity`. - """ - tax_rates: NotRequired[List[str]] - """ - If an item with the `price` already exists, passing this will override the `tax_rates` array on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `tax_rates`. - """ - trial: NotRequired["Quote.ModifyParamsLineActionSetItemTrial"] - """ - If an item with the `price` already exists, passing this will override the `trial` configuration on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `trial`. - """ - - class ModifyParamsLineActionSetItemDiscount(TypedDict): - coupon: NotRequired[str] - """ - ID of the coupon to create a new discount for. - """ - discount: NotRequired[str] - """ - ID of an existing discount on the object (or one of its ancestors) to reuse. - """ - discount_end: NotRequired[ - "Quote.ModifyParamsLineActionSetItemDiscountDiscountEnd" - ] - """ - Details to determine how long the discount should be applied for. - """ - promotion_code: NotRequired[str] - """ - ID of the promotion code to create a new discount for. - """ - - class ModifyParamsLineActionSetItemDiscountDiscountEnd(TypedDict): - duration: NotRequired[ - "Quote.ModifyParamsLineActionSetItemDiscountDiscountEndDuration" - ] - """ - Time span for the redeemed discount. - """ - timestamp: NotRequired[int] - """ - A precise Unix timestamp for the discount to end. Must be in the future. - """ - type: Literal["duration", "timestamp"] - """ - The type of calculation made to determine when the discount ends. - """ - - class ModifyParamsLineActionSetItemDiscountDiscountEndDuration(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. - """ - interval_count: int - """ - The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. - """ - - class ModifyParamsLineActionSetItemTrial(TypedDict): - converts_to: NotRequired[List[str]] - """ - List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. - """ - type: Literal["free", "paid"] - """ - Determines the type of trial for this item. - """ - - class ModifyParamsLineAppliesTo(TypedDict): - new_reference: NotRequired[str] - """ - A custom string that identifies a new subscription schedule being created upon quote acceptance. All quote lines with the same `new_reference` field will be applied to the creation of a new subscription schedule. - """ - subscription_schedule: NotRequired[str] - """ - The ID of the schedule the line applies to. - """ - type: Literal["new_reference", "subscription_schedule"] - """ - Describes whether the quote line is affecting a new schedule or an existing schedule. - """ - - class ModifyParamsLineCancelSubscriptionSchedule(TypedDict): - cancel_at: Literal["line_starts_at"] - """ - Timestamp helper to cancel the underlying schedule on the accompanying line's start date. Must be set to `line_starts_at`. - """ - invoice_now: NotRequired[bool] - """ - If the subscription schedule is `active`, indicates if a final invoice will be generated that contains any un-invoiced metered usage and new/pending proration invoice items. Boolean that defaults to `true`. - """ - prorate: NotRequired[bool] - """ - If the subscription schedule is `active`, indicates if the cancellation should be prorated. Boolean that defaults to `true`. - """ - - class ModifyParamsLineEndsAt(TypedDict): - discount_end: NotRequired["Quote.ModifyParamsLineEndsAtDiscountEnd"] - """ - Use the `end` time of a given discount. - """ - duration: NotRequired["Quote.ModifyParamsLineEndsAtDuration"] - """ - Time span for the quote line starting from the `starts_at` date. - """ - timestamp: NotRequired[int] - """ - A precise Unix timestamp. - """ - type: Literal[ - "billing_period_end", - "discount_end", - "duration", - "quote_acceptance_date", - "schedule_end", - "timestamp", - "upcoming_invoice", - ] - """ - Select a way to pass in `ends_at`. - """ - - class ModifyParamsLineEndsAtDiscountEnd(TypedDict): - discount: str - """ - The ID of a specific discount. - """ - - class ModifyParamsLineEndsAtDuration(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. - """ - interval_count: int - """ - The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. - """ - - class ModifyParamsLineItem(TypedDict): - discounts: NotRequired[ - "Literal['']|List[Quote.ModifyParamsLineItemDiscount]" - ] - """ - The discounts applied to this line item. - """ - id: NotRequired[str] - """ - The ID of an existing line item on the quote. - """ - price: NotRequired[str] - """ - The ID of the price object. One of `price` or `price_data` is required. - """ - price_data: NotRequired["Quote.ModifyParamsLineItemPriceData"] - """ - Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. - """ - quantity: NotRequired[int] - """ - The quantity of the line item. - """ - tax_rates: NotRequired["Literal['']|List[str]"] - """ - The tax rates which apply to the line item. When set, the `default_tax_rates` on the quote do not apply to this line item. - """ - - class ModifyParamsLineItemDiscount(TypedDict): - coupon: NotRequired[str] - """ - ID of the coupon to create a new discount for. - """ - discount: NotRequired[str] - """ - ID of an existing discount on the object (or one of its ancestors) to reuse. - """ - discount_end: NotRequired[ - "Quote.ModifyParamsLineItemDiscountDiscountEnd" - ] - """ - Details to determine how long the discount should be applied for. - """ - promotion_code: NotRequired[str] - """ - ID of the promotion code to create a new discount for. - """ - - class ModifyParamsLineItemDiscountDiscountEnd(TypedDict): - duration: NotRequired[ - "Quote.ModifyParamsLineItemDiscountDiscountEndDuration" - ] - """ - Time span for the redeemed discount. - """ - timestamp: NotRequired[int] - """ - A precise Unix timestamp for the discount to end. Must be in the future. - """ - type: Literal["duration", "timestamp"] - """ - The type of calculation made to determine when the discount ends. - """ - - class ModifyParamsLineItemDiscountDiscountEndDuration(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. - """ - interval_count: int - """ - The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. - """ - - class ModifyParamsLineItemPriceData(TypedDict): - 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). - """ - product: str - """ - The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to. - """ - recurring: NotRequired["Quote.ModifyParamsLineItemPriceDataRecurring"] - """ - The recurring components of a price such as `interval` and `interval_count`. - """ - tax_behavior: NotRequired[ - Literal["exclusive", "inclusive", "unspecified"] - ] - """ - Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. - """ - unit_amount: NotRequired[int] - """ - A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. - """ - unit_amount_decimal: NotRequired[str] - """ - Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - """ - - class ModifyParamsLineItemPriceDataRecurring(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Specifies billing frequency. Either `day`, `week`, `month` or `year`. - """ - interval_count: NotRequired[int] - """ - The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). - """ - - class ModifyParamsLineSetPauseCollection(TypedDict): - set: NotRequired["Quote.ModifyParamsLineSetPauseCollectionSet"] - """ - Details of the pause_collection behavior to apply to the amendment. - """ - type: Literal["remove", "set"] - """ - Determines the type of the pause_collection amendment. - """ - - class ModifyParamsLineSetPauseCollectionSet(TypedDict): - behavior: Literal["keep_as_draft", "mark_uncollectible", "void"] - """ - The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. - """ - - class ModifyParamsLineStartsAt(TypedDict): - discount_end: NotRequired["Quote.ModifyParamsLineStartsAtDiscountEnd"] - """ - Use the `end` time of a given discount. - """ - line_ends_at: NotRequired["Quote.ModifyParamsLineStartsAtLineEndsAt"] - """ - The timestamp the given line ends at. - """ - timestamp: NotRequired[int] - """ - A precise Unix timestamp. - """ - type: Literal[ - "discount_end", - "line_ends_at", - "now", - "quote_acceptance_date", - "schedule_end", - "timestamp", - "upcoming_invoice", - ] - """ - Select a way to pass in `starts_at`. - """ - - class ModifyParamsLineStartsAtDiscountEnd(TypedDict): - discount: str - """ - The ID of a specific discount. - """ - - class ModifyParamsLineStartsAtLineEndsAt(TypedDict): - id: NotRequired[str] - """ - The ID of a quote line. - """ - index: NotRequired[int] - """ - The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array. - """ - - class ModifyParamsLineTrialSettings(TypedDict): - end_behavior: NotRequired[ - "Quote.ModifyParamsLineTrialSettingsEndBehavior" - ] - """ - Defines how the subscription should behave when a trial ends. - """ - - class ModifyParamsLineTrialSettingsEndBehavior(TypedDict): - prorate_up_front: NotRequired[Literal["defer", "include"]] - """ - Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`. - """ - - class ModifyParamsSubscriptionData(TypedDict): - bill_on_acceptance: NotRequired[ - "Literal['']|Quote.ModifyParamsSubscriptionDataBillOnAcceptance" - ] - """ - Describes the period to bill for upon accepting the quote. - """ - billing_behavior: NotRequired[ - Literal["prorate_on_next_phase", "prorate_up_front"] - ] - """ - Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front. - """ - billing_cycle_anchor: NotRequired["Literal['']|Literal['reset']"] - """ - When specified as `reset`, the subscription will always start a new billing period when the quote is accepted. - """ - description: NotRequired["Literal['']|str"] - """ - The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. - """ - effective_date: NotRequired[ - "Literal['']|Literal['current_period_end']|int" - ] - """ - When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. When updating a subscription, the date of which the subscription will be updated using a subscription schedule. The special value `current_period_end` can be provided to update a subscription at the end of its current period. The `effective_date` is ignored if it is in the past when the quote is accepted. - """ - end_behavior: NotRequired[Literal["cancel", "release"]] - """ - Behavior of the subscription schedule and underlying subscription when it ends. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will set metadata on the subscription or subscription schedule when the quote is accepted. If a recurring price is included in `line_items`, this field will be passed to the resulting subscription's `metadata` field. If `subscription_data.effective_date` is used, this field will be passed to the resulting subscription schedule's `phases.metadata` field. Unlike object-level metadata, this field is declarative. Updates will clear prior values. - """ - prebilling: NotRequired[ - "Literal['']|Quote.ModifyParamsSubscriptionDataPrebilling" - ] - """ - If specified, the invoicing for the given billing cycle iterations will be processed when the quote is accepted. Cannot be used with `effective_date`. - """ - proration_behavior: NotRequired[ - Literal["always_invoice", "create_prorations", "none"] - ] - """ - Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations). When creating a subscription, valid values are `create_prorations` or `none`. - - When updating a subscription, valid values are `create_prorations`, `none`, or `always_invoice`. - - Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`. - - Prorations can be disabled by passing `none`. - """ - trial_period_days: NotRequired["Literal['']|int"] - """ - Integer representing the number of trial period days before the customer is charged for the first time. - """ - - class ModifyParamsSubscriptionDataBillOnAcceptance(TypedDict): - bill_from: NotRequired[ - "Quote.ModifyParamsSubscriptionDataBillOnAcceptanceBillFrom" - ] - """ - The start of the period to bill from when the Quote is accepted. - """ - bill_until: NotRequired[ - "Quote.ModifyParamsSubscriptionDataBillOnAcceptanceBillUntil" - ] - """ - The end of the period to bill until when the Quote is accepted. - """ - - class ModifyParamsSubscriptionDataBillOnAcceptanceBillFrom(TypedDict): - line_starts_at: NotRequired[ - "Quote.ModifyParamsSubscriptionDataBillOnAcceptanceBillFromLineStartsAt" - ] - """ - Details of a Quote line to start the bill period from. - """ - timestamp: NotRequired[int] - """ - A precise Unix timestamp. - """ - type: Literal[ - "line_starts_at", - "now", - "pause_collection_start", - "quote_acceptance_date", - "timestamp", - ] - """ - The type of method to specify the `bill_from` time. - """ + """ + A precise Unix timestamp. + """ + type: Literal[ + "line_starts_at", + "now", + "pause_collection_start", + "quote_acceptance_date", + "timestamp", + ] + """ + The type of method to specify the `bill_from` time. + """ + _inner_class_types = {"line_starts_at": LineStartsAt} - class ModifyParamsSubscriptionDataBillOnAcceptanceBillFromLineStartsAt( - TypedDict, - ): - id: NotRequired[str] - """ - The ID of a quote line. - """ - index: NotRequired[int] - """ - The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array. - """ + class BillUntil(StripeObject): + class Duration(StripeObject): + interval: Literal["day", "month", "week", "year"] + """ + Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + """ + interval_count: int + """ + The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + """ - class ModifyParamsSubscriptionDataBillOnAcceptanceBillUntil(TypedDict): - duration: NotRequired[ - "Quote.ModifyParamsSubscriptionDataBillOnAcceptanceBillUntilDuration" - ] - """ - Details of the duration over which to bill. - """ - line_ends_at: NotRequired[ - "Quote.ModifyParamsSubscriptionDataBillOnAcceptanceBillUntilLineEndsAt" - ] - """ - Details of a Quote line item from which to bill until. - """ - timestamp: NotRequired[int] - """ - A precise Unix timestamp. - """ - type: Literal[ - "duration", - "line_ends_at", - "schedule_end", - "timestamp", - "upcoming_invoice", - ] - """ - The type of method to specify the `bill_until` time. - """ + class LineEndsAt(StripeObject): + id: str + """ + Unique identifier for the object. + """ - class ModifyParamsSubscriptionDataBillOnAcceptanceBillUntilDuration( - TypedDict, - ): - interval: Literal["day", "month", "week", "year"] - """ - Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. - """ - interval_count: int - """ - The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. - """ + computed: Optional[int] + """ + The materialized time. + """ + duration: Optional[Duration] + """ + Time span for the quote line starting from the `starts_at` date. + """ + line_ends_at: Optional[LineEndsAt] + """ + The timestamp the given line ends at. + """ + timestamp: Optional[int] + """ + A precise Unix timestamp. + """ + type: Literal[ + "duration", + "line_ends_at", + "schedule_end", + "timestamp", + "upcoming_invoice", + ] + """ + The type of method to specify the `bill_until` time. + """ + _inner_class_types = { + "duration": Duration, + "line_ends_at": LineEndsAt, + } - class ModifyParamsSubscriptionDataBillOnAcceptanceBillUntilLineEndsAt( - TypedDict, - ): - id: NotRequired[str] - """ - The ID of a quote line. - """ - index: NotRequired[int] - """ - The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array. - """ + bill_from: Optional[BillFrom] + """ + The start of the period to bill from when the Quote is accepted. + """ + bill_until: Optional[BillUntil] + """ + The end of the period to bill until when the Quote is accepted. + """ + _inner_class_types = { + "bill_from": BillFrom, + "bill_until": BillUntil, + } - class ModifyParamsSubscriptionDataOverride(TypedDict): - applies_to: "Quote.ModifyParamsSubscriptionDataOverrideAppliesTo" - """ - Whether the override applies to an existing Subscription Schedule or a new Subscription Schedule. - """ - bill_on_acceptance: NotRequired[ - "Literal['']|Quote.ModifyParamsSubscriptionDataOverrideBillOnAcceptance" - ] + applies_to: AppliesTo + bill_on_acceptance: Optional[BillOnAcceptance] """ Describes the period to bill for upon accepting the quote. """ - billing_behavior: NotRequired[ + billing_behavior: Optional[ Literal["prorate_on_next_phase", "prorate_up_front"] ] """ Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front. """ - customer: NotRequired[str] + customer: Optional[str] """ - The customer the Subscription Data override applies to. + The customer which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed. """ - description: NotRequired["Literal['']|str"] + description: Optional[str] """ The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. """ - end_behavior: NotRequired[Literal["cancel", "release"]] + end_behavior: Optional[Literal["cancel", "release"]] """ Behavior of the subscription schedule and underlying subscription when it ends. """ - proration_behavior: NotRequired[ + proration_behavior: Optional[ Literal["always_invoice", "create_prorations", "none"] ] """ - Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations). When creating a subscription, valid values are `create_prorations` or `none`. - - When updating a subscription, valid values are `create_prorations`, `none`, or `always_invoice`. - - Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`. - - Prorations can be disabled by passing `none`. - """ - - class ModifyParamsSubscriptionDataOverrideAppliesTo(TypedDict): - new_reference: NotRequired[str] - """ - A custom string that identifies a new subscription schedule being created upon quote acceptance. All quote lines with the same `new_reference` field will be applied to the creation of a new subscription schedule. - """ - subscription_schedule: NotRequired[str] - """ - The ID of the schedule the line applies to. - """ - type: Literal["new_reference", "subscription_schedule"] - """ - Describes whether the quote line is affecting a new schedule or an existing schedule. + Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the quote is accepted. """ + _inner_class_types = { + "applies_to": AppliesTo, + "bill_on_acceptance": BillOnAcceptance, + } - class ModifyParamsSubscriptionDataOverrideBillOnAcceptance(TypedDict): - bill_from: NotRequired[ - "Quote.ModifyParamsSubscriptionDataOverrideBillOnAcceptanceBillFrom" - ] - """ - The start of the period to bill from when the Quote is accepted. - """ - bill_until: NotRequired[ - "Quote.ModifyParamsSubscriptionDataOverrideBillOnAcceptanceBillUntil" - ] - """ - The end of the period to bill until when the Quote is accepted. - """ + class SubscriptionSchedule(StripeObject): + class AppliesTo(StripeObject): + new_reference: Optional[str] + """ + A custom string that identifies a new subscription schedule being created upon quote acceptance. All quote lines with the same `new_reference` field will be applied to the creation of a new subscription schedule. + """ + subscription_schedule: Optional[str] + """ + The ID of the schedule the line applies to. + """ + type: Literal["new_reference", "subscription_schedule"] + """ + Describes whether the quote line is affecting a new schedule or an existing schedule. + """ - class ModifyParamsSubscriptionDataOverrideBillOnAcceptanceBillFrom( - TypedDict, - ): - line_starts_at: NotRequired[ - "Quote.ModifyParamsSubscriptionDataOverrideBillOnAcceptanceBillFromLineStartsAt" - ] - """ - Details of a Quote line to start the bill period from. - """ - timestamp: NotRequired[int] - """ - A precise Unix timestamp. - """ - type: Literal[ - "line_starts_at", - "now", - "pause_collection_start", - "quote_acceptance_date", - "timestamp", - ] + applies_to: AppliesTo + subscription_schedule: str """ - The type of method to specify the `bill_from` time. + The subscription schedule that was created or updated from this quote. """ + _inner_class_types = {"applies_to": AppliesTo} - class ModifyParamsSubscriptionDataOverrideBillOnAcceptanceBillFromLineStartsAt( - TypedDict, - ): - id: NotRequired[str] - """ - The ID of a quote line. - """ - index: NotRequired[int] - """ - The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array. - """ + class TotalDetails(StripeObject): + class Breakdown(StripeObject): + class Discount(StripeObject): + amount: int + """ + The amount discounted. + """ + discount: "DiscountResource" + """ + A discount represents the actual application of a [coupon](https://stripe.com/docs/api#coupons) or [promotion code](https://stripe.com/docs/api#promotion_codes). + It contains information about when the discount began, when it will end, and what it is applied to. - class ModifyParamsSubscriptionDataOverrideBillOnAcceptanceBillUntil( - TypedDict, - ): - duration: NotRequired[ - "Quote.ModifyParamsSubscriptionDataOverrideBillOnAcceptanceBillUntilDuration" - ] - """ - Details of the duration over which to bill. - """ - line_ends_at: NotRequired[ - "Quote.ModifyParamsSubscriptionDataOverrideBillOnAcceptanceBillUntilLineEndsAt" - ] - """ - Details of a Quote line item from which to bill until. - """ - timestamp: NotRequired[int] - """ - A precise Unix timestamp. - """ - type: Literal[ - "duration", - "line_ends_at", - "schedule_end", - "timestamp", - "upcoming_invoice", - ] - """ - The type of method to specify the `bill_until` time. - """ + Related guide: [Applying discounts to subscriptions](https://stripe.com/docs/billing/subscriptions/discounts) + """ - class ModifyParamsSubscriptionDataOverrideBillOnAcceptanceBillUntilDuration( - TypedDict, - ): - interval: Literal["day", "month", "week", "year"] - """ - Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. - """ - interval_count: int - """ - The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. - """ + class Tax(StripeObject): + amount: int + """ + Amount of tax applied for this rate. + """ + rate: "TaxRate" + """ + Tax rates can be applied to [invoices](https://docs.stripe.com/invoicing/taxes/tax-rates), [subscriptions](https://docs.stripe.com/billing/taxes/tax-rates) and [Checkout Sessions](https://docs.stripe.com/payments/checkout/use-manual-tax-rates) to collect tax. - class ModifyParamsSubscriptionDataOverrideBillOnAcceptanceBillUntilLineEndsAt( - TypedDict, - ): - id: NotRequired[str] - """ - The ID of a quote line. - """ - index: NotRequired[int] - """ - The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array. - """ + Related guide: [Tax rates](https://docs.stripe.com/billing/taxes/tax-rates) + """ + taxability_reason: Optional[ + Literal[ + "customer_exempt", + "not_collecting", + "not_subject_to_tax", + "not_supported", + "portion_product_exempt", + "portion_reduced_rated", + "portion_standard_rated", + "product_exempt", + "product_exempt_holiday", + "proportionally_rated", + "reduced_rated", + "reverse_charge", + "standard_rated", + "taxable_basis_reduced", + "zero_rated", + ] + ] + """ + The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. + """ + taxable_amount: Optional[int] + """ + The amount on which tax is calculated, in cents (or local equivalent). + """ - class ModifyParamsSubscriptionDataPrebilling(TypedDict): - iterations: int - """ - This is used to determine the number of billing cycles to prebill. - """ + discounts: List[Discount] + """ + The aggregated discounts. + """ + taxes: List[Tax] + """ + The aggregated tax amounts by rate. + """ + _inner_class_types = {"discounts": Discount, "taxes": Tax} - class ModifyParamsTransferData(TypedDict): - amount: NotRequired[int] + amount_discount: int """ - The amount that will be transferred automatically when the invoice is paid. If no amount is set, the full amount is transferred. There cannot be any line items with recurring prices when using this field. + This is the sum of all the discounts. """ - amount_percent: NotRequired[float] + amount_shipping: Optional[int] """ - A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. There must be at least 1 line item with a recurring price to use this field. + This is the sum of all the shipping amounts. """ - destination: str + amount_tax: int """ - ID of an existing, connected Stripe account. + This is the sum of all the tax amounts. """ + breakdown: Optional[Breakdown] + _inner_class_types = {"breakdown": Breakdown} - class PdfParams(RequestOptions): - expand: NotRequired[List[str]] + class TransferData(StripeObject): + amount: Optional[int] """ - Specifies which fields in the response should be expanded. + The amount in cents (or local equivalent) that will be transferred to the destination account when the invoice is paid. By default, the entire amount is transferred to the destination. """ - - class ReestimateParams(RequestOptions): - expand: NotRequired[List[str]] + amount_percent: Optional[float] """ - Specifies which fields in the response should be expanded. + A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount will be transferred to the destination. """ - - class RetrieveParams(RequestOptions): - expand: NotRequired[List[str]] + destination: ExpandableField["Account"] """ - Specifies which fields in the response should be expanded. + The account where funds from the payment will be transferred to upon payment success. """ allow_backdated_lines: Optional[bool] @@ -3536,7 +1086,7 @@ class RetrieveParams(RequestOptions): @classmethod def _cls_accept( - cls, quote: str, **params: Unpack["Quote.AcceptParams"] + cls, quote: str, **params: Unpack["QuoteAcceptParams"] ) -> "Quote": """ Accepts the specified quote. @@ -3552,14 +1102,14 @@ def _cls_accept( @overload @staticmethod - def accept(quote: str, **params: Unpack["Quote.AcceptParams"]) -> "Quote": + def accept(quote: str, **params: Unpack["QuoteAcceptParams"]) -> "Quote": """ Accepts the specified quote. """ ... @overload - def accept(self, **params: Unpack["Quote.AcceptParams"]) -> "Quote": + def accept(self, **params: Unpack["QuoteAcceptParams"]) -> "Quote": """ Accepts the specified quote. """ @@ -3567,7 +1117,7 @@ def accept(self, **params: Unpack["Quote.AcceptParams"]) -> "Quote": @class_method_variant("_cls_accept") def accept( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Quote.AcceptParams"] + self, **params: Unpack["QuoteAcceptParams"] ) -> "Quote": """ Accepts the specified quote. @@ -3585,7 +1135,7 @@ def accept( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_accept_async( - cls, quote: str, **params: Unpack["Quote.AcceptParams"] + cls, quote: str, **params: Unpack["QuoteAcceptParams"] ) -> "Quote": """ Accepts the specified quote. @@ -3602,7 +1152,7 @@ async def _cls_accept_async( @overload @staticmethod async def accept_async( - quote: str, **params: Unpack["Quote.AcceptParams"] + quote: str, **params: Unpack["QuoteAcceptParams"] ) -> "Quote": """ Accepts the specified quote. @@ -3611,7 +1161,7 @@ async def accept_async( @overload async def accept_async( - self, **params: Unpack["Quote.AcceptParams"] + self, **params: Unpack["QuoteAcceptParams"] ) -> "Quote": """ Accepts the specified quote. @@ -3620,7 +1170,7 @@ async def accept_async( @class_method_variant("_cls_accept_async") async def accept_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Quote.AcceptParams"] + self, **params: Unpack["QuoteAcceptParams"] ) -> "Quote": """ Accepts the specified quote. @@ -3638,7 +1188,7 @@ async def accept_async( # pyright: ignore[reportGeneralTypeIssues] @classmethod def _cls_cancel( - cls, quote: str, **params: Unpack["Quote.CancelParams"] + cls, quote: str, **params: Unpack["QuoteCancelParams"] ) -> "Quote": """ Cancels the quote. @@ -3654,14 +1204,14 @@ def _cls_cancel( @overload @staticmethod - def cancel(quote: str, **params: Unpack["Quote.CancelParams"]) -> "Quote": + def cancel(quote: str, **params: Unpack["QuoteCancelParams"]) -> "Quote": """ Cancels the quote. """ ... @overload - def cancel(self, **params: Unpack["Quote.CancelParams"]) -> "Quote": + def cancel(self, **params: Unpack["QuoteCancelParams"]) -> "Quote": """ Cancels the quote. """ @@ -3669,7 +1219,7 @@ def cancel(self, **params: Unpack["Quote.CancelParams"]) -> "Quote": @class_method_variant("_cls_cancel") def cancel( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Quote.CancelParams"] + self, **params: Unpack["QuoteCancelParams"] ) -> "Quote": """ Cancels the quote. @@ -3687,7 +1237,7 @@ def cancel( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_cancel_async( - cls, quote: str, **params: Unpack["Quote.CancelParams"] + cls, quote: str, **params: Unpack["QuoteCancelParams"] ) -> "Quote": """ Cancels the quote. @@ -3704,7 +1254,7 @@ async def _cls_cancel_async( @overload @staticmethod async def cancel_async( - quote: str, **params: Unpack["Quote.CancelParams"] + quote: str, **params: Unpack["QuoteCancelParams"] ) -> "Quote": """ Cancels the quote. @@ -3713,7 +1263,7 @@ async def cancel_async( @overload async def cancel_async( - self, **params: Unpack["Quote.CancelParams"] + self, **params: Unpack["QuoteCancelParams"] ) -> "Quote": """ Cancels the quote. @@ -3722,7 +1272,7 @@ async def cancel_async( @class_method_variant("_cls_cancel_async") async def cancel_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Quote.CancelParams"] + self, **params: Unpack["QuoteCancelParams"] ) -> "Quote": """ Cancels the quote. @@ -3739,7 +1289,7 @@ async def cancel_async( # pyright: ignore[reportGeneralTypeIssues] ) @classmethod - def create(cls, **params: Unpack["Quote.CreateParams"]) -> "Quote": + def create(cls, **params: Unpack["QuoteCreateParams"]) -> "Quote": """ A quote models prices and services for a customer. Default options for header, description, footer, and expires_at can be set in the dashboard via the [quote template](https://dashboard.stripe.com/settings/billing/quote). """ @@ -3754,7 +1304,7 @@ def create(cls, **params: Unpack["Quote.CreateParams"]) -> "Quote": @classmethod async def create_async( - cls, **params: Unpack["Quote.CreateParams"] + cls, **params: Unpack["QuoteCreateParams"] ) -> "Quote": """ A quote models prices and services for a customer. Default options for header, description, footer, and expires_at can be set in the dashboard via the [quote template](https://dashboard.stripe.com/settings/billing/quote). @@ -3770,7 +1320,7 @@ async def create_async( @classmethod def _cls_finalize_quote( - cls, quote: str, **params: Unpack["Quote.FinalizeQuoteParams"] + cls, quote: str, **params: Unpack["QuoteFinalizeQuoteParams"] ) -> "Quote": """ Finalizes the quote. @@ -3787,7 +1337,7 @@ def _cls_finalize_quote( @overload @staticmethod def finalize_quote( - quote: str, **params: Unpack["Quote.FinalizeQuoteParams"] + quote: str, **params: Unpack["QuoteFinalizeQuoteParams"] ) -> "Quote": """ Finalizes the quote. @@ -3796,7 +1346,7 @@ def finalize_quote( @overload def finalize_quote( - self, **params: Unpack["Quote.FinalizeQuoteParams"] + self, **params: Unpack["QuoteFinalizeQuoteParams"] ) -> "Quote": """ Finalizes the quote. @@ -3805,7 +1355,7 @@ def finalize_quote( @class_method_variant("_cls_finalize_quote") def finalize_quote( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Quote.FinalizeQuoteParams"] + self, **params: Unpack["QuoteFinalizeQuoteParams"] ) -> "Quote": """ Finalizes the quote. @@ -3823,7 +1373,7 @@ def finalize_quote( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_finalize_quote_async( - cls, quote: str, **params: Unpack["Quote.FinalizeQuoteParams"] + cls, quote: str, **params: Unpack["QuoteFinalizeQuoteParams"] ) -> "Quote": """ Finalizes the quote. @@ -3840,7 +1390,7 @@ async def _cls_finalize_quote_async( @overload @staticmethod async def finalize_quote_async( - quote: str, **params: Unpack["Quote.FinalizeQuoteParams"] + quote: str, **params: Unpack["QuoteFinalizeQuoteParams"] ) -> "Quote": """ Finalizes the quote. @@ -3849,7 +1399,7 @@ async def finalize_quote_async( @overload async def finalize_quote_async( - self, **params: Unpack["Quote.FinalizeQuoteParams"] + self, **params: Unpack["QuoteFinalizeQuoteParams"] ) -> "Quote": """ Finalizes the quote. @@ -3858,7 +1408,7 @@ async def finalize_quote_async( @class_method_variant("_cls_finalize_quote_async") async def finalize_quote_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Quote.FinalizeQuoteParams"] + self, **params: Unpack["QuoteFinalizeQuoteParams"] ) -> "Quote": """ Finalizes the quote. @@ -3875,7 +1425,7 @@ async def finalize_quote_async( # pyright: ignore[reportGeneralTypeIssues] ) @classmethod - def list(cls, **params: Unpack["Quote.ListParams"]) -> ListObject["Quote"]: + def list(cls, **params: Unpack["QuoteListParams"]) -> ListObject["Quote"]: """ Returns a list of your quotes. """ @@ -3894,7 +1444,7 @@ def list(cls, **params: Unpack["Quote.ListParams"]) -> ListObject["Quote"]: @classmethod async def list_async( - cls, **params: Unpack["Quote.ListParams"] + cls, **params: Unpack["QuoteListParams"] ) -> ListObject["Quote"]: """ Returns a list of your quotes. @@ -3916,7 +1466,7 @@ async def list_async( def _cls_list_computed_upfront_line_items( cls, quote: str, - **params: Unpack["Quote.ListComputedUpfrontLineItemsParams"], + **params: Unpack["QuoteListComputedUpfrontLineItemsParams"], ) -> ListObject["LineItem"]: """ When retrieving a quote, there is an includable [computed.upfront.line_items](https://stripe.com/docs/api/quotes/object#quote_object-computed-upfront-line_items) property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of upfront line items. @@ -3935,8 +1485,7 @@ def _cls_list_computed_upfront_line_items( @overload @staticmethod def list_computed_upfront_line_items( - quote: str, - **params: Unpack["Quote.ListComputedUpfrontLineItemsParams"], + quote: str, **params: Unpack["QuoteListComputedUpfrontLineItemsParams"] ) -> ListObject["LineItem"]: """ When retrieving a quote, there is an includable [computed.upfront.line_items](https://stripe.com/docs/api/quotes/object#quote_object-computed-upfront-line_items) property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of upfront line items. @@ -3945,7 +1494,7 @@ def list_computed_upfront_line_items( @overload def list_computed_upfront_line_items( - self, **params: Unpack["Quote.ListComputedUpfrontLineItemsParams"] + self, **params: Unpack["QuoteListComputedUpfrontLineItemsParams"] ) -> ListObject["LineItem"]: """ When retrieving a quote, there is an includable [computed.upfront.line_items](https://stripe.com/docs/api/quotes/object#quote_object-computed-upfront-line_items) property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of upfront line items. @@ -3954,7 +1503,7 @@ def list_computed_upfront_line_items( @class_method_variant("_cls_list_computed_upfront_line_items") def list_computed_upfront_line_items( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Quote.ListComputedUpfrontLineItemsParams"] + self, **params: Unpack["QuoteListComputedUpfrontLineItemsParams"] ) -> ListObject["LineItem"]: """ When retrieving a quote, there is an includable [computed.upfront.line_items](https://stripe.com/docs/api/quotes/object#quote_object-computed-upfront-line_items) property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of upfront line items. @@ -3974,7 +1523,7 @@ def list_computed_upfront_line_items( # pyright: ignore[reportGeneralTypeIssues async def _cls_list_computed_upfront_line_items_async( cls, quote: str, - **params: Unpack["Quote.ListComputedUpfrontLineItemsParams"], + **params: Unpack["QuoteListComputedUpfrontLineItemsParams"], ) -> ListObject["LineItem"]: """ When retrieving a quote, there is an includable [computed.upfront.line_items](https://stripe.com/docs/api/quotes/object#quote_object-computed-upfront-line_items) property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of upfront line items. @@ -3993,8 +1542,7 @@ async def _cls_list_computed_upfront_line_items_async( @overload @staticmethod async def list_computed_upfront_line_items_async( - quote: str, - **params: Unpack["Quote.ListComputedUpfrontLineItemsParams"], + quote: str, **params: Unpack["QuoteListComputedUpfrontLineItemsParams"] ) -> ListObject["LineItem"]: """ When retrieving a quote, there is an includable [computed.upfront.line_items](https://stripe.com/docs/api/quotes/object#quote_object-computed-upfront-line_items) property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of upfront line items. @@ -4003,7 +1551,7 @@ async def list_computed_upfront_line_items_async( @overload async def list_computed_upfront_line_items_async( - self, **params: Unpack["Quote.ListComputedUpfrontLineItemsParams"] + self, **params: Unpack["QuoteListComputedUpfrontLineItemsParams"] ) -> ListObject["LineItem"]: """ When retrieving a quote, there is an includable [computed.upfront.line_items](https://stripe.com/docs/api/quotes/object#quote_object-computed-upfront-line_items) property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of upfront line items. @@ -4012,7 +1560,7 @@ async def list_computed_upfront_line_items_async( @class_method_variant("_cls_list_computed_upfront_line_items_async") async def list_computed_upfront_line_items_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Quote.ListComputedUpfrontLineItemsParams"] + self, **params: Unpack["QuoteListComputedUpfrontLineItemsParams"] ) -> ListObject["LineItem"]: """ When retrieving a quote, there is an includable [computed.upfront.line_items](https://stripe.com/docs/api/quotes/object#quote_object-computed-upfront-line_items) property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of upfront line items. @@ -4030,7 +1578,7 @@ async def list_computed_upfront_line_items_async( # pyright: ignore[reportGener @classmethod def _cls_list_line_items( - cls, quote: str, **params: Unpack["Quote.ListLineItemsParams"] + cls, quote: str, **params: Unpack["QuoteListLineItemsParams"] ) -> ListObject["LineItem"]: """ When retrieving a quote, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items. @@ -4049,7 +1597,7 @@ def _cls_list_line_items( @overload @staticmethod def list_line_items( - quote: str, **params: Unpack["Quote.ListLineItemsParams"] + quote: str, **params: Unpack["QuoteListLineItemsParams"] ) -> ListObject["LineItem"]: """ When retrieving a quote, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items. @@ -4058,7 +1606,7 @@ def list_line_items( @overload def list_line_items( - self, **params: Unpack["Quote.ListLineItemsParams"] + self, **params: Unpack["QuoteListLineItemsParams"] ) -> ListObject["LineItem"]: """ When retrieving a quote, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items. @@ -4067,7 +1615,7 @@ def list_line_items( @class_method_variant("_cls_list_line_items") def list_line_items( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Quote.ListLineItemsParams"] + self, **params: Unpack["QuoteListLineItemsParams"] ) -> ListObject["LineItem"]: """ When retrieving a quote, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items. @@ -4085,7 +1633,7 @@ def list_line_items( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_list_line_items_async( - cls, quote: str, **params: Unpack["Quote.ListLineItemsParams"] + cls, quote: str, **params: Unpack["QuoteListLineItemsParams"] ) -> ListObject["LineItem"]: """ When retrieving a quote, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items. @@ -4104,7 +1652,7 @@ async def _cls_list_line_items_async( @overload @staticmethod async def list_line_items_async( - quote: str, **params: Unpack["Quote.ListLineItemsParams"] + quote: str, **params: Unpack["QuoteListLineItemsParams"] ) -> ListObject["LineItem"]: """ When retrieving a quote, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items. @@ -4113,7 +1661,7 @@ async def list_line_items_async( @overload async def list_line_items_async( - self, **params: Unpack["Quote.ListLineItemsParams"] + self, **params: Unpack["QuoteListLineItemsParams"] ) -> ListObject["LineItem"]: """ When retrieving a quote, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items. @@ -4122,7 +1670,7 @@ async def list_line_items_async( @class_method_variant("_cls_list_line_items_async") async def list_line_items_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Quote.ListLineItemsParams"] + self, **params: Unpack["QuoteListLineItemsParams"] ) -> ListObject["LineItem"]: """ When retrieving a quote, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items. @@ -4140,7 +1688,7 @@ async def list_line_items_async( # pyright: ignore[reportGeneralTypeIssues] @classmethod def _cls_list_lines( - cls, quote: str, **params: Unpack["Quote.ListLinesParams"] + cls, quote: str, **params: Unpack["QuoteListLinesParams"] ) -> ListObject["QuoteLine"]: """ Retrieves a paginated list of lines for a quote. These lines describe changes that will be used to create new subscription schedules or update existing subscription schedules when the quote is accepted. @@ -4157,7 +1705,7 @@ def _cls_list_lines( @overload @staticmethod def list_lines( - quote: str, **params: Unpack["Quote.ListLinesParams"] + quote: str, **params: Unpack["QuoteListLinesParams"] ) -> ListObject["QuoteLine"]: """ Retrieves a paginated list of lines for a quote. These lines describe changes that will be used to create new subscription schedules or update existing subscription schedules when the quote is accepted. @@ -4166,7 +1714,7 @@ def list_lines( @overload def list_lines( - self, **params: Unpack["Quote.ListLinesParams"] + self, **params: Unpack["QuoteListLinesParams"] ) -> ListObject["QuoteLine"]: """ Retrieves a paginated list of lines for a quote. These lines describe changes that will be used to create new subscription schedules or update existing subscription schedules when the quote is accepted. @@ -4175,7 +1723,7 @@ def list_lines( @class_method_variant("_cls_list_lines") def list_lines( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Quote.ListLinesParams"] + self, **params: Unpack["QuoteListLinesParams"] ) -> ListObject["QuoteLine"]: """ Retrieves a paginated list of lines for a quote. These lines describe changes that will be used to create new subscription schedules or update existing subscription schedules when the quote is accepted. @@ -4193,7 +1741,7 @@ def list_lines( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_list_lines_async( - cls, quote: str, **params: Unpack["Quote.ListLinesParams"] + cls, quote: str, **params: Unpack["QuoteListLinesParams"] ) -> ListObject["QuoteLine"]: """ Retrieves a paginated list of lines for a quote. These lines describe changes that will be used to create new subscription schedules or update existing subscription schedules when the quote is accepted. @@ -4210,7 +1758,7 @@ async def _cls_list_lines_async( @overload @staticmethod async def list_lines_async( - quote: str, **params: Unpack["Quote.ListLinesParams"] + quote: str, **params: Unpack["QuoteListLinesParams"] ) -> ListObject["QuoteLine"]: """ Retrieves a paginated list of lines for a quote. These lines describe changes that will be used to create new subscription schedules or update existing subscription schedules when the quote is accepted. @@ -4219,7 +1767,7 @@ async def list_lines_async( @overload async def list_lines_async( - self, **params: Unpack["Quote.ListLinesParams"] + self, **params: Unpack["QuoteListLinesParams"] ) -> ListObject["QuoteLine"]: """ Retrieves a paginated list of lines for a quote. These lines describe changes that will be used to create new subscription schedules or update existing subscription schedules when the quote is accepted. @@ -4228,7 +1776,7 @@ async def list_lines_async( @class_method_variant("_cls_list_lines_async") async def list_lines_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Quote.ListLinesParams"] + self, **params: Unpack["QuoteListLinesParams"] ) -> ListObject["QuoteLine"]: """ Retrieves a paginated list of lines for a quote. These lines describe changes that will be used to create new subscription schedules or update existing subscription schedules when the quote is accepted. @@ -4249,7 +1797,7 @@ def _cls_list_preview_invoice_lines( cls, quote: str, preview_invoice: str, - **params: Unpack["Quote.ListPreviewInvoiceLinesParams"], + **params: Unpack["QuoteListPreviewInvoiceLinesParams"], ) -> ListObject["InvoiceLineItem"]: """ Preview the invoice line items that would be generated by accepting the quote. @@ -4271,7 +1819,7 @@ def _cls_list_preview_invoice_lines( def list_preview_invoice_lines( quote: str, preview_invoice: str, - **params: Unpack["Quote.ListPreviewInvoiceLinesParams"], + **params: Unpack["QuoteListPreviewInvoiceLinesParams"], ) -> ListObject["InvoiceLineItem"]: """ Preview the invoice line items that would be generated by accepting the quote. @@ -4282,7 +1830,7 @@ def list_preview_invoice_lines( def list_preview_invoice_lines( self, preview_invoice: str, - **params: Unpack["Quote.ListPreviewInvoiceLinesParams"], + **params: Unpack["QuoteListPreviewInvoiceLinesParams"], ) -> ListObject["InvoiceLineItem"]: """ Preview the invoice line items that would be generated by accepting the quote. @@ -4293,7 +1841,7 @@ def list_preview_invoice_lines( def list_preview_invoice_lines( # pyright: ignore[reportGeneralTypeIssues] self, preview_invoice: str, - **params: Unpack["Quote.ListPreviewInvoiceLinesParams"], + **params: Unpack["QuoteListPreviewInvoiceLinesParams"], ) -> ListObject["InvoiceLineItem"]: """ Preview the invoice line items that would be generated by accepting the quote. @@ -4315,7 +1863,7 @@ async def _cls_list_preview_invoice_lines_async( cls, quote: str, preview_invoice: str, - **params: Unpack["Quote.ListPreviewInvoiceLinesParams"], + **params: Unpack["QuoteListPreviewInvoiceLinesParams"], ) -> ListObject["InvoiceLineItem"]: """ Preview the invoice line items that would be generated by accepting the quote. @@ -4337,7 +1885,7 @@ async def _cls_list_preview_invoice_lines_async( async def list_preview_invoice_lines_async( quote: str, preview_invoice: str, - **params: Unpack["Quote.ListPreviewInvoiceLinesParams"], + **params: Unpack["QuoteListPreviewInvoiceLinesParams"], ) -> ListObject["InvoiceLineItem"]: """ Preview the invoice line items that would be generated by accepting the quote. @@ -4348,7 +1896,7 @@ async def list_preview_invoice_lines_async( async def list_preview_invoice_lines_async( self, preview_invoice: str, - **params: Unpack["Quote.ListPreviewInvoiceLinesParams"], + **params: Unpack["QuoteListPreviewInvoiceLinesParams"], ) -> ListObject["InvoiceLineItem"]: """ Preview the invoice line items that would be generated by accepting the quote. @@ -4359,7 +1907,7 @@ async def list_preview_invoice_lines_async( async def list_preview_invoice_lines_async( # pyright: ignore[reportGeneralTypeIssues] self, preview_invoice: str, - **params: Unpack["Quote.ListPreviewInvoiceLinesParams"], + **params: Unpack["QuoteListPreviewInvoiceLinesParams"], ) -> ListObject["InvoiceLineItem"]: """ Preview the invoice line items that would be generated by accepting the quote. @@ -4378,7 +1926,7 @@ async def list_preview_invoice_lines_async( # pyright: ignore[reportGeneralType @classmethod def _cls_mark_draft( - cls, quote: str, **params: Unpack["Quote.MarkDraftParams"] + cls, quote: str, **params: Unpack["QuoteMarkDraftParams"] ) -> "Quote": """ Converts a stale quote to draft. @@ -4397,7 +1945,7 @@ def _cls_mark_draft( @overload @staticmethod def mark_draft( - quote: str, **params: Unpack["Quote.MarkDraftParams"] + quote: str, **params: Unpack["QuoteMarkDraftParams"] ) -> "Quote": """ Converts a stale quote to draft. @@ -4405,7 +1953,7 @@ def mark_draft( ... @overload - def mark_draft(self, **params: Unpack["Quote.MarkDraftParams"]) -> "Quote": + def mark_draft(self, **params: Unpack["QuoteMarkDraftParams"]) -> "Quote": """ Converts a stale quote to draft. """ @@ -4413,7 +1961,7 @@ def mark_draft(self, **params: Unpack["Quote.MarkDraftParams"]) -> "Quote": @class_method_variant("_cls_mark_draft") def mark_draft( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Quote.MarkDraftParams"] + self, **params: Unpack["QuoteMarkDraftParams"] ) -> "Quote": """ Converts a stale quote to draft. @@ -4431,7 +1979,7 @@ def mark_draft( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_mark_draft_async( - cls, quote: str, **params: Unpack["Quote.MarkDraftParams"] + cls, quote: str, **params: Unpack["QuoteMarkDraftParams"] ) -> "Quote": """ Converts a stale quote to draft. @@ -4450,7 +1998,7 @@ async def _cls_mark_draft_async( @overload @staticmethod async def mark_draft_async( - quote: str, **params: Unpack["Quote.MarkDraftParams"] + quote: str, **params: Unpack["QuoteMarkDraftParams"] ) -> "Quote": """ Converts a stale quote to draft. @@ -4459,7 +2007,7 @@ async def mark_draft_async( @overload async def mark_draft_async( - self, **params: Unpack["Quote.MarkDraftParams"] + self, **params: Unpack["QuoteMarkDraftParams"] ) -> "Quote": """ Converts a stale quote to draft. @@ -4468,7 +2016,7 @@ async def mark_draft_async( @class_method_variant("_cls_mark_draft_async") async def mark_draft_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Quote.MarkDraftParams"] + self, **params: Unpack["QuoteMarkDraftParams"] ) -> "Quote": """ Converts a stale quote to draft. @@ -4486,7 +2034,7 @@ async def mark_draft_async( # pyright: ignore[reportGeneralTypeIssues] @classmethod def _cls_mark_stale( - cls, quote: str, **params: Unpack["Quote.MarkStaleParams"] + cls, quote: str, **params: Unpack["QuoteMarkStaleParams"] ) -> "Quote": """ Converts a draft or open quote to stale. @@ -4505,7 +2053,7 @@ def _cls_mark_stale( @overload @staticmethod def mark_stale( - quote: str, **params: Unpack["Quote.MarkStaleParams"] + quote: str, **params: Unpack["QuoteMarkStaleParams"] ) -> "Quote": """ Converts a draft or open quote to stale. @@ -4513,7 +2061,7 @@ def mark_stale( ... @overload - def mark_stale(self, **params: Unpack["Quote.MarkStaleParams"]) -> "Quote": + def mark_stale(self, **params: Unpack["QuoteMarkStaleParams"]) -> "Quote": """ Converts a draft or open quote to stale. """ @@ -4521,7 +2069,7 @@ def mark_stale(self, **params: Unpack["Quote.MarkStaleParams"]) -> "Quote": @class_method_variant("_cls_mark_stale") def mark_stale( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Quote.MarkStaleParams"] + self, **params: Unpack["QuoteMarkStaleParams"] ) -> "Quote": """ Converts a draft or open quote to stale. @@ -4539,7 +2087,7 @@ def mark_stale( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_mark_stale_async( - cls, quote: str, **params: Unpack["Quote.MarkStaleParams"] + cls, quote: str, **params: Unpack["QuoteMarkStaleParams"] ) -> "Quote": """ Converts a draft or open quote to stale. @@ -4558,7 +2106,7 @@ async def _cls_mark_stale_async( @overload @staticmethod async def mark_stale_async( - quote: str, **params: Unpack["Quote.MarkStaleParams"] + quote: str, **params: Unpack["QuoteMarkStaleParams"] ) -> "Quote": """ Converts a draft or open quote to stale. @@ -4567,7 +2115,7 @@ async def mark_stale_async( @overload async def mark_stale_async( - self, **params: Unpack["Quote.MarkStaleParams"] + self, **params: Unpack["QuoteMarkStaleParams"] ) -> "Quote": """ Converts a draft or open quote to stale. @@ -4576,7 +2124,7 @@ async def mark_stale_async( @class_method_variant("_cls_mark_stale_async") async def mark_stale_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Quote.MarkStaleParams"] + self, **params: Unpack["QuoteMarkStaleParams"] ) -> "Quote": """ Converts a draft or open quote to stale. @@ -4593,9 +2141,7 @@ async def mark_stale_async( # pyright: ignore[reportGeneralTypeIssues] ) @classmethod - def modify( - cls, id: str, **params: Unpack["Quote.ModifyParams"] - ) -> "Quote": + def modify(cls, id: str, **params: Unpack["QuoteModifyParams"]) -> "Quote": """ A quote models prices and services for a customer. """ @@ -4611,7 +2157,7 @@ def modify( @classmethod async def modify_async( - cls, id: str, **params: Unpack["Quote.ModifyParams"] + cls, id: str, **params: Unpack["QuoteModifyParams"] ) -> "Quote": """ A quote models prices and services for a customer. @@ -4627,7 +2173,7 @@ async def modify_async( ) @classmethod - def _cls_pdf(cls, quote: str, **params: Unpack["Quote.PdfParams"]) -> Any: + def _cls_pdf(cls, quote: str, **params: Unpack["QuotePdfParams"]) -> Any: """ Download the PDF for a finalized quote. Explanation for special handling can be found [here](https://docs.stripe.com/quotes/overview#quote_pdf) """ @@ -4643,14 +2189,14 @@ def _cls_pdf(cls, quote: str, **params: Unpack["Quote.PdfParams"]) -> Any: @overload @staticmethod - def pdf(quote: str, **params: Unpack["Quote.PdfParams"]) -> Any: + def pdf(quote: str, **params: Unpack["QuotePdfParams"]) -> Any: """ Download the PDF for a finalized quote. Explanation for special handling can be found [here](https://docs.stripe.com/quotes/overview#quote_pdf) """ ... @overload - def pdf(self, **params: Unpack["Quote.PdfParams"]) -> Any: + def pdf(self, **params: Unpack["QuotePdfParams"]) -> Any: """ Download the PDF for a finalized quote. Explanation for special handling can be found [here](https://docs.stripe.com/quotes/overview#quote_pdf) """ @@ -4658,7 +2204,7 @@ def pdf(self, **params: Unpack["Quote.PdfParams"]) -> Any: @class_method_variant("_cls_pdf") def pdf( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Quote.PdfParams"] + self, **params: Unpack["QuotePdfParams"] ) -> Any: """ Download the PDF for a finalized quote. Explanation for special handling can be found [here](https://docs.stripe.com/quotes/overview#quote_pdf) @@ -4677,7 +2223,7 @@ def pdf( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_pdf_async( - cls, quote: str, **params: Unpack["Quote.PdfParams"] + cls, quote: str, **params: Unpack["QuotePdfParams"] ) -> Any: """ Download the PDF for a finalized quote. Explanation for special handling can be found [here](https://docs.stripe.com/quotes/overview#quote_pdf) @@ -4694,16 +2240,14 @@ async def _cls_pdf_async( @overload @staticmethod - async def pdf_async( - quote: str, **params: Unpack["Quote.PdfParams"] - ) -> Any: + async def pdf_async(quote: str, **params: Unpack["QuotePdfParams"]) -> Any: """ Download the PDF for a finalized quote. Explanation for special handling can be found [here](https://docs.stripe.com/quotes/overview#quote_pdf) """ ... @overload - async def pdf_async(self, **params: Unpack["Quote.PdfParams"]) -> Any: + async def pdf_async(self, **params: Unpack["QuotePdfParams"]) -> Any: """ Download the PDF for a finalized quote. Explanation for special handling can be found [here](https://docs.stripe.com/quotes/overview#quote_pdf) """ @@ -4711,7 +2255,7 @@ async def pdf_async(self, **params: Unpack["Quote.PdfParams"]) -> Any: @class_method_variant("_cls_pdf_async") async def pdf_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Quote.PdfParams"] + self, **params: Unpack["QuotePdfParams"] ) -> Any: """ Download the PDF for a finalized quote. Explanation for special handling can be found [here](https://docs.stripe.com/quotes/overview#quote_pdf) @@ -4730,7 +2274,7 @@ async def pdf_async( # pyright: ignore[reportGeneralTypeIssues] @classmethod def _cls_reestimate( - cls, quote: str, **params: Unpack["Quote.ReestimateParams"] + cls, quote: str, **params: Unpack["QuoteReestimateParams"] ) -> "Quote": """ Recompute the upcoming invoice estimate for the quote. @@ -4749,7 +2293,7 @@ def _cls_reestimate( @overload @staticmethod def reestimate( - quote: str, **params: Unpack["Quote.ReestimateParams"] + quote: str, **params: Unpack["QuoteReestimateParams"] ) -> "Quote": """ Recompute the upcoming invoice estimate for the quote. @@ -4757,9 +2301,7 @@ def reestimate( ... @overload - def reestimate( - self, **params: Unpack["Quote.ReestimateParams"] - ) -> "Quote": + def reestimate(self, **params: Unpack["QuoteReestimateParams"]) -> "Quote": """ Recompute the upcoming invoice estimate for the quote. """ @@ -4767,7 +2309,7 @@ def reestimate( @class_method_variant("_cls_reestimate") def reestimate( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Quote.ReestimateParams"] + self, **params: Unpack["QuoteReestimateParams"] ) -> "Quote": """ Recompute the upcoming invoice estimate for the quote. @@ -4785,7 +2327,7 @@ def reestimate( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_reestimate_async( - cls, quote: str, **params: Unpack["Quote.ReestimateParams"] + cls, quote: str, **params: Unpack["QuoteReestimateParams"] ) -> "Quote": """ Recompute the upcoming invoice estimate for the quote. @@ -4804,7 +2346,7 @@ async def _cls_reestimate_async( @overload @staticmethod async def reestimate_async( - quote: str, **params: Unpack["Quote.ReestimateParams"] + quote: str, **params: Unpack["QuoteReestimateParams"] ) -> "Quote": """ Recompute the upcoming invoice estimate for the quote. @@ -4813,7 +2355,7 @@ async def reestimate_async( @overload async def reestimate_async( - self, **params: Unpack["Quote.ReestimateParams"] + self, **params: Unpack["QuoteReestimateParams"] ) -> "Quote": """ Recompute the upcoming invoice estimate for the quote. @@ -4822,7 +2364,7 @@ async def reestimate_async( @class_method_variant("_cls_reestimate_async") async def reestimate_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Quote.ReestimateParams"] + self, **params: Unpack["QuoteReestimateParams"] ) -> "Quote": """ Recompute the upcoming invoice estimate for the quote. @@ -4840,7 +2382,7 @@ async def reestimate_async( # pyright: ignore[reportGeneralTypeIssues] @classmethod def retrieve( - cls, id: str, **params: Unpack["Quote.RetrieveParams"] + cls, id: str, **params: Unpack["QuoteRetrieveParams"] ) -> "Quote": """ Retrieves the quote with the given ID. @@ -4851,7 +2393,7 @@ def retrieve( @classmethod async def retrieve_async( - cls, id: str, **params: Unpack["Quote.RetrieveParams"] + cls, id: str, **params: Unpack["QuoteRetrieveParams"] ) -> "Quote": """ Retrieves the quote with the given ID. @@ -4862,7 +2404,7 @@ async def retrieve_async( @classmethod def list_preview_invoices( - cls, quote: str, **params: Unpack["Quote.ListPreviewInvoicesParams"] + cls, quote: str, **params: Unpack["QuoteListPreviewInvoicesParams"] ) -> ListObject["QuotePreviewInvoice"]: """ Preview the invoices that would be generated by accepting the quote. @@ -4880,7 +2422,7 @@ def list_preview_invoices( @classmethod async def list_preview_invoices_async( - cls, quote: str, **params: Unpack["Quote.ListPreviewInvoicesParams"] + cls, quote: str, **params: Unpack["QuoteListPreviewInvoicesParams"] ) -> ListObject["QuotePreviewInvoice"]: """ Preview the invoices that would be generated by accepting the quote. @@ -4900,7 +2442,7 @@ async def list_preview_invoices_async( def list_preview_subscription_schedules( cls, quote: str, - **params: Unpack["Quote.ListPreviewSubscriptionSchedulesParams"], + **params: Unpack["QuoteListPreviewSubscriptionSchedulesParams"], ) -> ListObject["QuotePreviewSubscriptionSchedule"]: """ Preview the schedules that would be generated by accepting the quote @@ -4920,7 +2462,7 @@ def list_preview_subscription_schedules( async def list_preview_subscription_schedules_async( cls, quote: str, - **params: Unpack["Quote.ListPreviewSubscriptionSchedulesParams"], + **params: Unpack["QuoteListPreviewSubscriptionSchedulesParams"], ) -> ListObject["QuotePreviewSubscriptionSchedule"]: """ Preview the schedules that would be generated by accepting the quote diff --git a/stripe/_quote_computed_upfront_line_items_service.py b/stripe/_quote_computed_upfront_line_items_service.py index 87aea0365..927f91d10 100644 --- a/stripe/_quote_computed_upfront_line_items_service.py +++ b/stripe/_quote_computed_upfront_line_items_service.py @@ -5,35 +5,20 @@ from stripe._request_options import RequestOptions from stripe._stripe_service import StripeService from stripe._util import sanitize_id -from typing import List, Optional, cast -from typing_extensions import NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params._quote_computed_upfront_line_items_list_params import ( + QuoteComputedUpfrontLineItemsListParams, + ) -class QuoteComputedUpfrontLineItemsService(StripeService): - class ListParams(TypedDict): - 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 QuoteComputedUpfrontLineItemsService(StripeService): def list( self, quote: str, - params: Optional[ - "QuoteComputedUpfrontLineItemsService.ListParams" - ] = None, + params: Optional["QuoteComputedUpfrontLineItemsListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[LineItem]: """ @@ -55,9 +40,7 @@ def list( async def list_async( self, quote: str, - params: Optional[ - "QuoteComputedUpfrontLineItemsService.ListParams" - ] = None, + params: Optional["QuoteComputedUpfrontLineItemsListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[LineItem]: """ diff --git a/stripe/_quote_line_item_service.py b/stripe/_quote_line_item_service.py index 1c574a4ba..dbb28fa9a 100644 --- a/stripe/_quote_line_item_service.py +++ b/stripe/_quote_line_item_service.py @@ -5,33 +5,20 @@ from stripe._request_options import RequestOptions from stripe._stripe_service import StripeService from stripe._util import sanitize_id -from typing import List, Optional, cast -from typing_extensions import NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params._quote_line_item_list_params import ( + QuoteLineItemListParams, + ) -class QuoteLineItemService(StripeService): - class ListParams(TypedDict): - 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 QuoteLineItemService(StripeService): def list( self, quote: str, - params: Optional["QuoteLineItemService.ListParams"] = None, + params: Optional["QuoteLineItemListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[LineItem]: """ @@ -53,7 +40,7 @@ def list( async def list_async( self, quote: str, - params: Optional["QuoteLineItemService.ListParams"] = None, + params: Optional["QuoteLineItemListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[LineItem]: """ diff --git a/stripe/_quote_line_service.py b/stripe/_quote_line_service.py index 363a1920f..d19bccee4 100644 --- a/stripe/_quote_line_service.py +++ b/stripe/_quote_line_service.py @@ -5,33 +5,18 @@ from stripe._request_options import RequestOptions from stripe._stripe_service import StripeService from stripe._util import sanitize_id -from typing import List, Optional, cast -from typing_extensions import NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params._quote_line_list_params import QuoteLineListParams -class QuoteLineService(StripeService): - class ListParams(TypedDict): - 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 QuoteLineService(StripeService): def list( self, quote: str, - params: Optional["QuoteLineService.ListParams"] = None, + params: Optional["QuoteLineListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[QuoteLine]: """ @@ -51,7 +36,7 @@ def list( async def list_async( self, quote: str, - params: Optional["QuoteLineService.ListParams"] = None, + params: Optional["QuoteLineListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[QuoteLine]: """ diff --git a/stripe/_quote_preview_invoice_service.py b/stripe/_quote_preview_invoice_service.py index 22b4a4448..410865adb 100644 --- a/stripe/_quote_preview_invoice_service.py +++ b/stripe/_quote_preview_invoice_service.py @@ -5,33 +5,20 @@ from stripe._request_options import RequestOptions from stripe._stripe_service import StripeService from stripe._util import sanitize_id -from typing import List, Optional, cast -from typing_extensions import NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params._quote_preview_invoice_list_params import ( + QuotePreviewInvoiceListParams, + ) -class QuotePreviewInvoiceService(StripeService): - class ListParams(TypedDict): - 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 QuotePreviewInvoiceService(StripeService): def list( self, quote: str, - params: Optional["QuotePreviewInvoiceService.ListParams"] = None, + params: Optional["QuotePreviewInvoiceListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[QuotePreviewInvoice]: """ @@ -53,7 +40,7 @@ def list( async def list_async( self, quote: str, - params: Optional["QuotePreviewInvoiceService.ListParams"] = None, + params: Optional["QuotePreviewInvoiceListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[QuotePreviewInvoice]: """ diff --git a/stripe/_quote_preview_subscription_schedule_service.py b/stripe/_quote_preview_subscription_schedule_service.py index 89e691ecf..153879193 100644 --- a/stripe/_quote_preview_subscription_schedule_service.py +++ b/stripe/_quote_preview_subscription_schedule_service.py @@ -7,35 +7,20 @@ from stripe._request_options import RequestOptions from stripe._stripe_service import StripeService from stripe._util import sanitize_id -from typing import List, Optional, cast -from typing_extensions import NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params._quote_preview_subscription_schedule_list_params import ( + QuotePreviewSubscriptionScheduleListParams, + ) -class QuotePreviewSubscriptionScheduleService(StripeService): - class ListParams(TypedDict): - 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 QuotePreviewSubscriptionScheduleService(StripeService): def list( self, quote: str, - params: Optional[ - "QuotePreviewSubscriptionScheduleService.ListParams" - ] = None, + params: Optional["QuotePreviewSubscriptionScheduleListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[QuotePreviewSubscriptionSchedule]: """ @@ -57,9 +42,7 @@ def list( async def list_async( self, quote: str, - params: Optional[ - "QuotePreviewSubscriptionScheduleService.ListParams" - ] = None, + params: Optional["QuotePreviewSubscriptionScheduleListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[QuotePreviewSubscriptionSchedule]: """ diff --git a/stripe/_quote_service.py b/stripe/_quote_service.py index 015d4253b..768097b89 100644 --- a/stripe/_quote_service.py +++ b/stripe/_quote_service.py @@ -15,8 +15,26 @@ from stripe._request_options import RequestOptions from stripe._stripe_service import StripeService from stripe._util import sanitize_id -from typing import Any, Dict, List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Any, Optional, cast +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params._quote_accept_params import QuoteAcceptParams + from stripe.params._quote_cancel_params import QuoteCancelParams + from stripe.params._quote_create_params import QuoteCreateParams + from stripe.params._quote_finalize_quote_params import ( + QuoteFinalizeQuoteParams, + ) + from stripe.params._quote_list_params import QuoteListParams + from stripe.params._quote_list_preview_invoice_lines_params import ( + QuoteListPreviewInvoiceLinesParams, + ) + from stripe.params._quote_mark_draft_params import QuoteMarkDraftParams + from stripe.params._quote_mark_stale_params import QuoteMarkStaleParams + from stripe.params._quote_pdf_params import QuotePdfParams + from stripe.params._quote_reestimate_params import QuoteReestimateParams + from stripe.params._quote_retrieve_params import QuoteRetrieveParams + from stripe.params._quote_update_params import QuoteUpdateParams class QuoteService(StripeService): @@ -36,2451 +54,9 @@ def __init__(self, requestor): ) ) - class AcceptParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class CancelParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class CreateParams(TypedDict): - allow_backdated_lines: NotRequired[bool] - """ - Set to true to allow quote lines to have `starts_at` in the past if collection is paused between `starts_at` and now. - """ - application_fee_amount: NotRequired["Literal['']|int"] - """ - The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. There cannot be any line items with recurring prices when using this field. - """ - application_fee_percent: NotRequired["Literal['']|float"] - """ - A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. There must be at least 1 line item with a recurring price to use this field. - """ - automatic_tax: NotRequired["QuoteService.CreateParamsAutomaticTax"] - """ - Settings for automatic tax lookup for this quote and resulting invoices and subscriptions. - """ - collection_method: NotRequired[ - Literal["charge_automatically", "send_invoice"] - ] - """ - Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay invoices at the end of the subscription cycle or at invoice finalization using the default payment method attached to the subscription or customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`. - """ - customer: NotRequired[str] - """ - The customer for which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed. - """ - customer_account: NotRequired[str] - """ - The account for which this quote belongs to. A customer or account is required before finalizing the quote. Once specified, it cannot be changed. - """ - default_tax_rates: NotRequired["Literal['']|List[str]"] - """ - The tax rates that will apply to any line item that does not have `tax_rates` set. - """ - description: NotRequired["Literal['']|str"] - """ - A description that will be displayed on the quote PDF. If no value is passed, the default description configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used. - """ - discounts: NotRequired[ - "Literal['']|List[QuoteService.CreateParamsDiscount]" - ] - """ - The discounts applied to the quote. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - expires_at: NotRequired[int] - """ - A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch. If no value is passed, the default expiration date configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used. - """ - footer: NotRequired["Literal['']|str"] - """ - A footer that will be displayed on the quote PDF. If no value is passed, the default footer configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used. - """ - from_quote: NotRequired["QuoteService.CreateParamsFromQuote"] - """ - Clone an existing quote. The new quote will be created in `status=draft`. When using this parameter, you cannot specify any other parameters except for `expires_at`. - """ - header: NotRequired["Literal['']|str"] - """ - A header that will be displayed on the quote PDF. If no value is passed, the default header configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used. - """ - invoice_settings: NotRequired[ - "QuoteService.CreateParamsInvoiceSettings" - ] - """ - All invoices will be billed using the specified settings. - """ - line_items: NotRequired[List["QuoteService.CreateParamsLineItem"]] - """ - A list of line items the customer is being quoted for. Each line item includes information about the product, the quantity, and the resulting cost. - """ - lines: NotRequired[List["QuoteService.CreateParamsLine"]] - """ - A list of [quote lines](https://docs.stripe.com/api/quote_lines) on the quote. These lines describe changes, in the order provided, that will be used to create new subscription schedules or update existing subscription schedules when the quote is accepted. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - on_behalf_of: NotRequired["Literal['']|str"] - """ - The account on behalf of which to charge. - """ - subscription_data: NotRequired[ - "QuoteService.CreateParamsSubscriptionData" - ] - """ - When creating a subscription or subscription schedule, the specified configuration data will be used. There must be at least one line item with a recurring price for a subscription or subscription schedule to be created. A subscription schedule is created if `subscription_data[effective_date]` is present and in the future, otherwise a subscription is created. - """ - subscription_data_overrides: NotRequired[ - List["QuoteService.CreateParamsSubscriptionDataOverride"] - ] - """ - List representing overrides for `subscription_data` configurations for specific subscription schedules. - """ - test_clock: NotRequired[str] - """ - ID of the test clock to attach to the quote. - """ - transfer_data: NotRequired[ - "Literal['']|QuoteService.CreateParamsTransferData" - ] - """ - The data with which to automatically create a Transfer for each of the invoices. - """ - - class CreateParamsAutomaticTax(TypedDict): - enabled: bool - """ - Controls whether Stripe will automatically compute tax on the resulting invoices or subscriptions as well as the quote itself. - """ - liability: NotRequired[ - "QuoteService.CreateParamsAutomaticTaxLiability" - ] - """ - The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. - """ - - class CreateParamsAutomaticTaxLiability(TypedDict): - account: NotRequired[str] - """ - The connected account being referenced when `type` is `account`. - """ - type: Literal["account", "self"] - """ - Type of the account referenced in the request. - """ - - class CreateParamsDiscount(TypedDict): - coupon: NotRequired[str] - """ - ID of the coupon to create a new discount for. - """ - discount: NotRequired[str] - """ - ID of an existing discount on the object (or one of its ancestors) to reuse. - """ - discount_end: NotRequired[ - "QuoteService.CreateParamsDiscountDiscountEnd" - ] - """ - Details to determine how long the discount should be applied for. - """ - promotion_code: NotRequired[str] - """ - ID of the promotion code to create a new discount for. - """ - - class CreateParamsDiscountDiscountEnd(TypedDict): - duration: NotRequired[ - "QuoteService.CreateParamsDiscountDiscountEndDuration" - ] - """ - Time span for the redeemed discount. - """ - timestamp: NotRequired[int] - """ - A precise Unix timestamp for the discount to end. Must be in the future. - """ - type: Literal["duration", "timestamp"] - """ - The type of calculation made to determine when the discount ends. - """ - - class CreateParamsDiscountDiscountEndDuration(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. - """ - interval_count: int - """ - The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. - """ - - class CreateParamsFromQuote(TypedDict): - is_revision: NotRequired[bool] - """ - Whether this quote is a revision of the previous quote. - """ - quote: str - """ - The `id` of the quote that will be cloned. - """ - - class CreateParamsInvoiceSettings(TypedDict): - days_until_due: NotRequired[int] - """ - Number of days within which a customer must pay the invoice generated by this quote. This value will be `null` for quotes where `collection_method=charge_automatically`. - """ - issuer: NotRequired["QuoteService.CreateParamsInvoiceSettingsIssuer"] - """ - The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. - """ - - class CreateParamsInvoiceSettingsIssuer(TypedDict): - account: NotRequired[str] - """ - The connected account being referenced when `type` is `account`. - """ - type: Literal["account", "self"] - """ - Type of the account referenced in the request. - """ - - class CreateParamsLine(TypedDict): - actions: NotRequired[List["QuoteService.CreateParamsLineAction"]] - """ - An array of operations the quote line performs. - """ - applies_to: NotRequired["QuoteService.CreateParamsLineAppliesTo"] - """ - Details to identify the subscription schedule the quote line applies to. - """ - billing_cycle_anchor: NotRequired[ - Literal["automatic", "line_starts_at"] - ] - """ - For point-in-time quote lines (having no `ends_at` timestamp), this attribute lets you set or remove whether the subscription's billing cycle anchor is reset at the Quote Line `starts_at` timestamp.For time-span based quote lines (having both `starts_at` and `ends_at`), the only valid value is `automatic`, which removes any previously configured billing cycle anchor resets during the window of time spanning the quote line. - """ - cancel_subscription_schedule: NotRequired[ - "QuoteService.CreateParamsLineCancelSubscriptionSchedule" - ] - """ - A point-in-time operation that cancels an existing subscription schedule at the line's starts_at timestamp. Currently only compatible with `quote_acceptance_date` for `starts_at`. When using cancel_subscription_schedule, the subscription schedule on the quote remains unalterable, except for modifications to the metadata, collection_method or invoice_settings. - """ - ends_at: NotRequired["QuoteService.CreateParamsLineEndsAt"] - """ - Details to identify the end of the time range modified by the proposed change. If not supplied, the quote line is considered a point-in-time operation that only affects the exact timestamp at `starts_at`, and a restricted set of attributes is supported on the quote line. - """ - proration_behavior: NotRequired[ - Literal["always_invoice", "create_prorations", "none"] - ] - """ - Changes to how Stripe handles prorations during the quote line's time span. Affects if and how prorations are created when a future phase starts. - """ - set_pause_collection: NotRequired[ - "QuoteService.CreateParamsLineSetPauseCollection" - ] - """ - Defines how to pause collection for the underlying subscription throughout the duration of the amendment. - """ - set_schedule_end: NotRequired[ - Literal["line_ends_at", "line_starts_at"] - ] - """ - Timestamp helper to end the underlying schedule early, based on the acompanying line's start or end date. - """ - starts_at: NotRequired["QuoteService.CreateParamsLineStartsAt"] - """ - Details to identify the earliest timestamp where the proposed change should take effect. - """ - trial_settings: NotRequired[ - "QuoteService.CreateParamsLineTrialSettings" - ] - """ - Settings related to subscription trials. - """ - - class CreateParamsLineAction(TypedDict): - add_discount: NotRequired[ - "QuoteService.CreateParamsLineActionAddDiscount" - ] - """ - Details for the `add_discount` type. - """ - add_item: NotRequired["QuoteService.CreateParamsLineActionAddItem"] - """ - Details for the `add_item` type. - """ - add_metadata: NotRequired[Dict[str, str]] - """ - Details for the `add_metadata` type: specify a hash of key-value pairs. - """ - remove_discount: NotRequired[ - "QuoteService.CreateParamsLineActionRemoveDiscount" - ] - """ - Details for the `remove_discount` type. - """ - remove_item: NotRequired[ - "QuoteService.CreateParamsLineActionRemoveItem" - ] - """ - Details for the `remove_item` type. - """ - remove_metadata: NotRequired[List[str]] - """ - Details for the `remove_metadata` type: specify an array of metadata keys. - """ - set_discounts: NotRequired[ - List["QuoteService.CreateParamsLineActionSetDiscount"] - ] - """ - Details for the `set_discounts` type. - """ - set_items: NotRequired[ - List["QuoteService.CreateParamsLineActionSetItem"] - ] - """ - Details for the `set_items` type. - """ - set_metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Details for the `set_metadata` type: specify an array of key-value pairs. - """ - type: Literal[ - "add_discount", - "add_item", - "add_metadata", - "clear_discounts", - "clear_metadata", - "remove_discount", - "remove_item", - "remove_metadata", - "set_discounts", - "set_items", - "set_metadata", - ] - """ - The type of action the quote line performs. - """ - - class CreateParamsLineActionAddDiscount(TypedDict): - coupon: NotRequired[str] - """ - The coupon code to redeem. - """ - discount: NotRequired[str] - """ - An ID of an existing discount for a coupon that was already redeemed. - """ - discount_end: NotRequired[ - "QuoteService.CreateParamsLineActionAddDiscountDiscountEnd" - ] - """ - Details to determine how long the discount should be applied for. - """ - index: NotRequired[int] - """ - The index, starting at 0, at which to position the new discount. When not supplied, Stripe defaults to appending the discount to the end of the `discounts` array. - """ - promotion_code: NotRequired[str] - """ - The promotion code to redeem. - """ - - class CreateParamsLineActionAddDiscountDiscountEnd(TypedDict): - type: Literal["line_ends_at"] - """ - The type of calculation made to determine when the discount ends. - """ - - class CreateParamsLineActionAddItem(TypedDict): - discounts: NotRequired[ - List["QuoteService.CreateParamsLineActionAddItemDiscount"] - ] - """ - The discounts applied to the item. Subscription item discounts are applied before subscription discounts. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - price: str - """ - The ID of the price object. - """ - quantity: NotRequired[int] - """ - Quantity for this item. - """ - tax_rates: NotRequired[List[str]] - """ - The tax rates that apply to this subscription item. When set, the `default_tax_rates` on the subscription do not apply to this `subscription_item`. - """ - trial: NotRequired["QuoteService.CreateParamsLineActionAddItemTrial"] - """ - Options that configure the trial on the subscription item. - """ - - class CreateParamsLineActionAddItemDiscount(TypedDict): - coupon: NotRequired[str] - """ - ID of the coupon to create a new discount for. - """ - discount: NotRequired[str] - """ - ID of an existing discount on the object (or one of its ancestors) to reuse. - """ - discount_end: NotRequired[ - "QuoteService.CreateParamsLineActionAddItemDiscountDiscountEnd" - ] - """ - Details to determine how long the discount should be applied for. - """ - promotion_code: NotRequired[str] - """ - ID of the promotion code to create a new discount for. - """ - - class CreateParamsLineActionAddItemDiscountDiscountEnd(TypedDict): - duration: NotRequired[ - "QuoteService.CreateParamsLineActionAddItemDiscountDiscountEndDuration" - ] - """ - Time span for the redeemed discount. - """ - timestamp: NotRequired[int] - """ - A precise Unix timestamp for the discount to end. Must be in the future. - """ - type: Literal["duration", "timestamp"] - """ - The type of calculation made to determine when the discount ends. - """ - - class CreateParamsLineActionAddItemDiscountDiscountEndDuration(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. - """ - interval_count: int - """ - The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. - """ - - class CreateParamsLineActionAddItemTrial(TypedDict): - converts_to: NotRequired[List[str]] - """ - List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. - """ - type: Literal["free", "paid"] - """ - Determines the type of trial for this item. - """ - - class CreateParamsLineActionRemoveDiscount(TypedDict): - coupon: NotRequired[str] - """ - The coupon code to remove from the `discounts` array. - """ - discount: NotRequired[str] - """ - The ID of a discount to remove from the `discounts` array. - """ - promotion_code: NotRequired[str] - """ - The ID of a promotion code to remove from the `discounts` array. - """ - - class CreateParamsLineActionRemoveItem(TypedDict): - price: str - """ - ID of a price to remove. - """ - - class CreateParamsLineActionSetDiscount(TypedDict): - coupon: NotRequired[str] - """ - The coupon code to replace the `discounts` array with. - """ - discount: NotRequired[str] - """ - An ID of an existing discount to replace the `discounts` array with. - """ - promotion_code: NotRequired[str] - """ - An ID of an existing promotion code to replace the `discounts` array with. - """ - - class CreateParamsLineActionSetItem(TypedDict): - discounts: NotRequired[ - List["QuoteService.CreateParamsLineActionSetItemDiscount"] - ] - """ - If an item with the `price` already exists, passing this will override the `discounts` array on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `discounts`. - """ - metadata: NotRequired[Dict[str, str]] - """ - If an item with the `price` already exists, passing this will override the `metadata` on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `metadata`. - """ - price: str - """ - The ID of the price object. - """ - quantity: NotRequired[int] - """ - If an item with the `price` already exists, passing this will override the quantity on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `quantity`. - """ - tax_rates: NotRequired[List[str]] - """ - If an item with the `price` already exists, passing this will override the `tax_rates` array on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `tax_rates`. - """ - trial: NotRequired["QuoteService.CreateParamsLineActionSetItemTrial"] - """ - If an item with the `price` already exists, passing this will override the `trial` configuration on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `trial`. - """ - - class CreateParamsLineActionSetItemDiscount(TypedDict): - coupon: NotRequired[str] - """ - ID of the coupon to create a new discount for. - """ - discount: NotRequired[str] - """ - ID of an existing discount on the object (or one of its ancestors) to reuse. - """ - discount_end: NotRequired[ - "QuoteService.CreateParamsLineActionSetItemDiscountDiscountEnd" - ] - """ - Details to determine how long the discount should be applied for. - """ - promotion_code: NotRequired[str] - """ - ID of the promotion code to create a new discount for. - """ - - class CreateParamsLineActionSetItemDiscountDiscountEnd(TypedDict): - duration: NotRequired[ - "QuoteService.CreateParamsLineActionSetItemDiscountDiscountEndDuration" - ] - """ - Time span for the redeemed discount. - """ - timestamp: NotRequired[int] - """ - A precise Unix timestamp for the discount to end. Must be in the future. - """ - type: Literal["duration", "timestamp"] - """ - The type of calculation made to determine when the discount ends. - """ - - class CreateParamsLineActionSetItemDiscountDiscountEndDuration(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. - """ - interval_count: int - """ - The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. - """ - - class CreateParamsLineActionSetItemTrial(TypedDict): - converts_to: NotRequired[List[str]] - """ - List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. - """ - type: Literal["free", "paid"] - """ - Determines the type of trial for this item. - """ - - class CreateParamsLineAppliesTo(TypedDict): - new_reference: NotRequired[str] - """ - A custom string that identifies a new subscription schedule being created upon quote acceptance. All quote lines with the same `new_reference` field will be applied to the creation of a new subscription schedule. - """ - subscription_schedule: NotRequired[str] - """ - The ID of the schedule the line applies to. - """ - type: Literal["new_reference", "subscription_schedule"] - """ - Describes whether the quote line is affecting a new schedule or an existing schedule. - """ - - class CreateParamsLineCancelSubscriptionSchedule(TypedDict): - cancel_at: Literal["line_starts_at"] - """ - Timestamp helper to cancel the underlying schedule on the accompanying line's start date. Must be set to `line_starts_at`. - """ - invoice_now: NotRequired[bool] - """ - If the subscription schedule is `active`, indicates if a final invoice will be generated that contains any un-invoiced metered usage and new/pending proration invoice items. Boolean that defaults to `true`. - """ - prorate: NotRequired[bool] - """ - If the subscription schedule is `active`, indicates if the cancellation should be prorated. Boolean that defaults to `true`. - """ - - class CreateParamsLineEndsAt(TypedDict): - discount_end: NotRequired[ - "QuoteService.CreateParamsLineEndsAtDiscountEnd" - ] - """ - Use the `end` time of a given discount. - """ - duration: NotRequired["QuoteService.CreateParamsLineEndsAtDuration"] - """ - Time span for the quote line starting from the `starts_at` date. - """ - timestamp: NotRequired[int] - """ - A precise Unix timestamp. - """ - type: Literal[ - "billing_period_end", - "discount_end", - "duration", - "quote_acceptance_date", - "schedule_end", - "timestamp", - "upcoming_invoice", - ] - """ - Select a way to pass in `ends_at`. - """ - - class CreateParamsLineEndsAtDiscountEnd(TypedDict): - discount: str - """ - The ID of a specific discount. - """ - - class CreateParamsLineEndsAtDuration(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. - """ - interval_count: int - """ - The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. - """ - - class CreateParamsLineItem(TypedDict): - discounts: NotRequired[ - "Literal['']|List[QuoteService.CreateParamsLineItemDiscount]" - ] - """ - The discounts applied to this line item. - """ - price: NotRequired[str] - """ - The ID of the price object. One of `price` or `price_data` is required. - """ - price_data: NotRequired["QuoteService.CreateParamsLineItemPriceData"] - """ - Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. - """ - quantity: NotRequired[int] - """ - The quantity of the line item. - """ - tax_rates: NotRequired["Literal['']|List[str]"] - """ - The tax rates which apply to the line item. When set, the `default_tax_rates` on the quote do not apply to this line item. - """ - - class CreateParamsLineItemDiscount(TypedDict): - coupon: NotRequired[str] - """ - ID of the coupon to create a new discount for. - """ - discount: NotRequired[str] - """ - ID of an existing discount on the object (or one of its ancestors) to reuse. - """ - discount_end: NotRequired[ - "QuoteService.CreateParamsLineItemDiscountDiscountEnd" - ] - """ - Details to determine how long the discount should be applied for. - """ - promotion_code: NotRequired[str] - """ - ID of the promotion code to create a new discount for. - """ - - class CreateParamsLineItemDiscountDiscountEnd(TypedDict): - duration: NotRequired[ - "QuoteService.CreateParamsLineItemDiscountDiscountEndDuration" - ] - """ - Time span for the redeemed discount. - """ - timestamp: NotRequired[int] - """ - A precise Unix timestamp for the discount to end. Must be in the future. - """ - type: Literal["duration", "timestamp"] - """ - The type of calculation made to determine when the discount ends. - """ - - class CreateParamsLineItemDiscountDiscountEndDuration(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. - """ - interval_count: int - """ - The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. - """ - - class CreateParamsLineItemPriceData(TypedDict): - 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). - """ - product: str - """ - The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to. - """ - recurring: NotRequired[ - "QuoteService.CreateParamsLineItemPriceDataRecurring" - ] - """ - The recurring components of a price such as `interval` and `interval_count`. - """ - tax_behavior: NotRequired[ - Literal["exclusive", "inclusive", "unspecified"] - ] - """ - Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. - """ - unit_amount: NotRequired[int] - """ - A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. - """ - unit_amount_decimal: NotRequired[str] - """ - Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - """ - - class CreateParamsLineItemPriceDataRecurring(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Specifies billing frequency. Either `day`, `week`, `month` or `year`. - """ - interval_count: NotRequired[int] - """ - The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). - """ - - class CreateParamsLineSetPauseCollection(TypedDict): - set: NotRequired["QuoteService.CreateParamsLineSetPauseCollectionSet"] - """ - Details of the pause_collection behavior to apply to the amendment. - """ - type: Literal["remove", "set"] - """ - Determines the type of the pause_collection amendment. - """ - - class CreateParamsLineSetPauseCollectionSet(TypedDict): - behavior: Literal["keep_as_draft", "mark_uncollectible", "void"] - """ - The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. - """ - - class CreateParamsLineStartsAt(TypedDict): - discount_end: NotRequired[ - "QuoteService.CreateParamsLineStartsAtDiscountEnd" - ] - """ - Use the `end` time of a given discount. - """ - line_ends_at: NotRequired[ - "QuoteService.CreateParamsLineStartsAtLineEndsAt" - ] - """ - The timestamp the given line ends at. - """ - timestamp: NotRequired[int] - """ - A precise Unix timestamp. - """ - type: Literal[ - "discount_end", - "line_ends_at", - "now", - "quote_acceptance_date", - "schedule_end", - "timestamp", - "upcoming_invoice", - ] - """ - Select a way to pass in `starts_at`. - """ - - class CreateParamsLineStartsAtDiscountEnd(TypedDict): - discount: str - """ - The ID of a specific discount. - """ - - class CreateParamsLineStartsAtLineEndsAt(TypedDict): - index: NotRequired[int] - """ - The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array. - """ - - class CreateParamsLineTrialSettings(TypedDict): - end_behavior: NotRequired[ - "QuoteService.CreateParamsLineTrialSettingsEndBehavior" - ] - """ - Defines how the subscription should behave when a trial ends. - """ - - class CreateParamsLineTrialSettingsEndBehavior(TypedDict): - prorate_up_front: NotRequired[Literal["defer", "include"]] - """ - Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`. - """ - - class CreateParamsSubscriptionData(TypedDict): - bill_on_acceptance: NotRequired[ - "QuoteService.CreateParamsSubscriptionDataBillOnAcceptance" - ] - """ - Describes the period to bill for upon accepting the quote. - """ - billing_behavior: NotRequired[ - Literal["prorate_on_next_phase", "prorate_up_front"] - ] - """ - Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front. - """ - billing_cycle_anchor: NotRequired["Literal['']|Literal['reset']"] - """ - When specified as `reset`, the subscription will always start a new billing period when the quote is accepted. - """ - billing_mode: NotRequired[ - "QuoteService.CreateParamsSubscriptionDataBillingMode" - ] - """ - Controls how prorations and invoices for subscriptions are calculated and orchestrated. - """ - description: NotRequired[str] - """ - The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. - """ - effective_date: NotRequired[ - "Literal['']|Literal['current_period_end']|int" - ] - """ - When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. When updating a subscription, the date of which the subscription will be updated using a subscription schedule. The special value `current_period_end` can be provided to update a subscription at the end of its current period. The `effective_date` is ignored if it is in the past when the quote is accepted. - """ - end_behavior: NotRequired[Literal["cancel", "release"]] - """ - Behavior of the subscription schedule and underlying subscription when it ends. - """ - from_subscription: NotRequired[str] - """ - The id of a subscription that the quote will update. By default, the quote will contain the state of the subscription (such as line items, collection method and billing thresholds) unless overridden. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will set metadata on the subscription or subscription schedule when the quote is accepted. If a recurring price is included in `line_items`, this field will be passed to the resulting subscription's `metadata` field. If `subscription_data.effective_date` is used, this field will be passed to the resulting subscription schedule's `phases.metadata` field. Unlike object-level metadata, this field is declarative. Updates will clear prior values. - """ - prebilling: NotRequired[ - "Literal['']|QuoteService.CreateParamsSubscriptionDataPrebilling" - ] - """ - If specified, the invoicing for the given billing cycle iterations will be processed when the quote is accepted. Cannot be used with `effective_date`. - """ - proration_behavior: NotRequired[ - Literal["always_invoice", "create_prorations", "none"] - ] - """ - Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations). When creating a subscription, valid values are `create_prorations` or `none`. - - When updating a subscription, valid values are `create_prorations`, `none`, or `always_invoice`. - - Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`. - - Prorations can be disabled by passing `none`. - """ - trial_period_days: NotRequired["Literal['']|int"] - """ - Integer representing the number of trial period days before the customer is charged for the first time. - """ - - class CreateParamsSubscriptionDataBillOnAcceptance(TypedDict): - bill_from: NotRequired[ - "QuoteService.CreateParamsSubscriptionDataBillOnAcceptanceBillFrom" - ] - """ - The start of the period to bill from when the Quote is accepted. - """ - bill_until: NotRequired[ - "QuoteService.CreateParamsSubscriptionDataBillOnAcceptanceBillUntil" - ] - """ - The end of the period to bill until when the Quote is accepted. - """ - - class CreateParamsSubscriptionDataBillOnAcceptanceBillFrom(TypedDict): - line_starts_at: NotRequired[ - "QuoteService.CreateParamsSubscriptionDataBillOnAcceptanceBillFromLineStartsAt" - ] - """ - Details of a Quote line to start the bill period from. - """ - timestamp: NotRequired[int] - """ - A precise Unix timestamp. - """ - type: Literal[ - "line_starts_at", - "now", - "pause_collection_start", - "quote_acceptance_date", - "timestamp", - ] - """ - The type of method to specify the `bill_from` time. - """ - - class CreateParamsSubscriptionDataBillOnAcceptanceBillFromLineStartsAt( - TypedDict, - ): - id: NotRequired[str] - """ - The ID of a quote line. - """ - index: NotRequired[int] - """ - The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array. - """ - - class CreateParamsSubscriptionDataBillOnAcceptanceBillUntil(TypedDict): - duration: NotRequired[ - "QuoteService.CreateParamsSubscriptionDataBillOnAcceptanceBillUntilDuration" - ] - """ - Details of the duration over which to bill. - """ - line_ends_at: NotRequired[ - "QuoteService.CreateParamsSubscriptionDataBillOnAcceptanceBillUntilLineEndsAt" - ] - """ - Details of a Quote line item from which to bill until. - """ - timestamp: NotRequired[int] - """ - A precise Unix timestamp. - """ - type: Literal[ - "duration", - "line_ends_at", - "schedule_end", - "timestamp", - "upcoming_invoice", - ] - """ - The type of method to specify the `bill_until` time. - """ - - class CreateParamsSubscriptionDataBillOnAcceptanceBillUntilDuration( - TypedDict, - ): - interval: Literal["day", "month", "week", "year"] - """ - Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. - """ - interval_count: int - """ - The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. - """ - - class CreateParamsSubscriptionDataBillOnAcceptanceBillUntilLineEndsAt( - TypedDict, - ): - id: NotRequired[str] - """ - The ID of a quote line. - """ - index: NotRequired[int] - """ - The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array. - """ - - class CreateParamsSubscriptionDataBillingMode(TypedDict): - flexible: NotRequired[ - "QuoteService.CreateParamsSubscriptionDataBillingModeFlexible" - ] - """ - Configure behavior for flexible billing mode. - """ - type: Literal["classic", "flexible"] - """ - Controls the calculation and orchestration of prorations and invoices for subscriptions. If no value is passed, the default is `flexible`. - """ - - class CreateParamsSubscriptionDataBillingModeFlexible(TypedDict): - proration_discounts: NotRequired[Literal["included", "itemized"]] - """ - Controls how invoices and invoice items display proration amounts and discount amounts. - """ - - class CreateParamsSubscriptionDataOverride(TypedDict): - applies_to: ( - "QuoteService.CreateParamsSubscriptionDataOverrideAppliesTo" - ) - """ - Whether the override applies to an existing Subscription Schedule or a new Subscription Schedule. - """ - bill_on_acceptance: NotRequired[ - "QuoteService.CreateParamsSubscriptionDataOverrideBillOnAcceptance" - ] - """ - Describes the period to bill for upon accepting the quote. - """ - billing_behavior: NotRequired[ - Literal["prorate_on_next_phase", "prorate_up_front"] - ] - """ - Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front. - """ - customer: NotRequired[str] - """ - The customer the Subscription Data override applies to. This is only relevant when `applies_to.type=new_reference`. - """ - description: NotRequired[str] - """ - The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. - """ - end_behavior: NotRequired[Literal["cancel", "release"]] - """ - Behavior of the subscription schedule and underlying subscription when it ends. - """ - proration_behavior: NotRequired[ - Literal["always_invoice", "create_prorations", "none"] - ] - """ - Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations). When creating a subscription, valid values are `create_prorations` or `none`. - - When updating a subscription, valid values are `create_prorations`, `none`, or `always_invoice`. - - Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`. - - Prorations can be disabled by passing `none`. - """ - - class CreateParamsSubscriptionDataOverrideAppliesTo(TypedDict): - new_reference: NotRequired[str] - """ - A custom string that identifies a new subscription schedule being created upon quote acceptance. All quote lines with the same `new_reference` field will be applied to the creation of a new subscription schedule. - """ - subscription_schedule: NotRequired[str] - """ - The ID of the schedule the line applies to. - """ - type: Literal["new_reference", "subscription_schedule"] - """ - Describes whether the quote line is affecting a new schedule or an existing schedule. - """ - - class CreateParamsSubscriptionDataOverrideBillOnAcceptance(TypedDict): - bill_from: NotRequired[ - "QuoteService.CreateParamsSubscriptionDataOverrideBillOnAcceptanceBillFrom" - ] - """ - The start of the period to bill from when the Quote is accepted. - """ - bill_until: NotRequired[ - "QuoteService.CreateParamsSubscriptionDataOverrideBillOnAcceptanceBillUntil" - ] - """ - The end of the period to bill until when the Quote is accepted. - """ - - class CreateParamsSubscriptionDataOverrideBillOnAcceptanceBillFrom( - TypedDict, - ): - line_starts_at: NotRequired[ - "QuoteService.CreateParamsSubscriptionDataOverrideBillOnAcceptanceBillFromLineStartsAt" - ] - """ - Details of a Quote line to start the bill period from. - """ - timestamp: NotRequired[int] - """ - A precise Unix timestamp. - """ - type: Literal[ - "line_starts_at", - "now", - "pause_collection_start", - "quote_acceptance_date", - "timestamp", - ] - """ - The type of method to specify the `bill_from` time. - """ - - class CreateParamsSubscriptionDataOverrideBillOnAcceptanceBillFromLineStartsAt( - TypedDict, - ): - id: NotRequired[str] - """ - The ID of a quote line. - """ - index: NotRequired[int] - """ - The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array. - """ - - class CreateParamsSubscriptionDataOverrideBillOnAcceptanceBillUntil( - TypedDict, - ): - duration: NotRequired[ - "QuoteService.CreateParamsSubscriptionDataOverrideBillOnAcceptanceBillUntilDuration" - ] - """ - Details of the duration over which to bill. - """ - line_ends_at: NotRequired[ - "QuoteService.CreateParamsSubscriptionDataOverrideBillOnAcceptanceBillUntilLineEndsAt" - ] - """ - Details of a Quote line item from which to bill until. - """ - timestamp: NotRequired[int] - """ - A precise Unix timestamp. - """ - type: Literal[ - "duration", - "line_ends_at", - "schedule_end", - "timestamp", - "upcoming_invoice", - ] - """ - The type of method to specify the `bill_until` time. - """ - - class CreateParamsSubscriptionDataOverrideBillOnAcceptanceBillUntilDuration( - TypedDict, - ): - interval: Literal["day", "month", "week", "year"] - """ - Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. - """ - interval_count: int - """ - The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. - """ - - class CreateParamsSubscriptionDataOverrideBillOnAcceptanceBillUntilLineEndsAt( - TypedDict, - ): - id: NotRequired[str] - """ - The ID of a quote line. - """ - index: NotRequired[int] - """ - The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array. - """ - - class CreateParamsSubscriptionDataPrebilling(TypedDict): - iterations: int - """ - This is used to determine the number of billing cycles to prebill. - """ - - class CreateParamsTransferData(TypedDict): - amount: NotRequired[int] - """ - The amount that will be transferred automatically when the invoice is paid. If no amount is set, the full amount is transferred. There cannot be any line items with recurring prices when using this field. - """ - amount_percent: NotRequired[float] - """ - A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. There must be at least 1 line item with a recurring price to use this field. - """ - destination: str - """ - ID of an existing, connected Stripe account. - """ - - class FinalizeQuoteParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - expires_at: NotRequired[int] - """ - A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch. - """ - - class ListParams(TypedDict): - customer: NotRequired[str] - """ - The ID of the customer whose quotes will be retrieved. - """ - customer_account: NotRequired[str] - """ - The ID of the account whose quotes will be retrieved. - """ - 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. - """ - from_subscription: NotRequired[str] - """ - The subscription which the quote updates. - """ - 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. - """ - status: NotRequired[ - Literal[ - "accepted", "accepting", "canceled", "draft", "open", "stale" - ] - ] - """ - The status of the quote. - """ - test_clock: NotRequired[str] - """ - Provides a list of quotes that are associated with the specified test clock. The response will not include quotes with test clocks if this and the customer parameter is not set. - """ - - class ListPreviewInvoiceLinesParams(TypedDict): - 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 MarkDraftParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class MarkStaleParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - reason: NotRequired[str] - """ - Reason the Quote is being marked stale. - """ - - class PdfParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class ReestimateParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class RetrieveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class UpdateParams(TypedDict): - allow_backdated_lines: NotRequired[bool] - """ - Set to true to allow quote lines to have `starts_at` in the past if collection is paused between `starts_at` and now. - """ - application_fee_amount: NotRequired["Literal['']|int"] - """ - The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. There cannot be any line items with recurring prices when using this field. - """ - application_fee_percent: NotRequired["Literal['']|float"] - """ - A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. There must be at least 1 line item with a recurring price to use this field. - """ - automatic_tax: NotRequired["QuoteService.UpdateParamsAutomaticTax"] - """ - Settings for automatic tax lookup for this quote and resulting invoices and subscriptions. - """ - collection_method: NotRequired[ - Literal["charge_automatically", "send_invoice"] - ] - """ - Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay invoices at the end of the subscription cycle or at invoice finalization using the default payment method attached to the subscription or customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`. - """ - customer: NotRequired[str] - """ - The customer for which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed. - """ - customer_account: NotRequired[str] - """ - The account for which this quote belongs to. A customer or account is required before finalizing the quote. Once specified, it cannot be changed. - """ - default_tax_rates: NotRequired["Literal['']|List[str]"] - """ - The tax rates that will apply to any line item that does not have `tax_rates` set. - """ - description: NotRequired["Literal['']|str"] - """ - A description that will be displayed on the quote PDF. - """ - discounts: NotRequired[ - "Literal['']|List[QuoteService.UpdateParamsDiscount]" - ] - """ - The discounts applied to the quote. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - expires_at: NotRequired[int] - """ - A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch. - """ - footer: NotRequired["Literal['']|str"] - """ - A footer that will be displayed on the quote PDF. - """ - header: NotRequired["Literal['']|str"] - """ - A header that will be displayed on the quote PDF. - """ - invoice_settings: NotRequired[ - "QuoteService.UpdateParamsInvoiceSettings" - ] - """ - All invoices will be billed using the specified settings. - """ - line_items: NotRequired[List["QuoteService.UpdateParamsLineItem"]] - """ - A list of line items the customer is being quoted for. Each line item includes information about the product, the quantity, and the resulting cost. - """ - lines: NotRequired[List["QuoteService.UpdateParamsLine"]] - """ - A list of [quote lines](https://docs.stripe.com/api/quote_lines) on the quote. These lines describe changes, in the order provided, that will be used to create new subscription schedules or update existing subscription schedules when the quote is accepted. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - on_behalf_of: NotRequired["Literal['']|str"] - """ - The account on behalf of which to charge. - """ - subscription_data: NotRequired[ - "QuoteService.UpdateParamsSubscriptionData" - ] - """ - When creating a subscription or subscription schedule, the specified configuration data will be used. There must be at least one line item with a recurring price for a subscription or subscription schedule to be created. A subscription schedule is created if `subscription_data[effective_date]` is present and in the future, otherwise a subscription is created. - """ - subscription_data_overrides: NotRequired[ - "Literal['']|List[QuoteService.UpdateParamsSubscriptionDataOverride]" - ] - """ - List representing overrides for `subscription_data` configurations for specific subscription schedules. - """ - transfer_data: NotRequired[ - "Literal['']|QuoteService.UpdateParamsTransferData" - ] - """ - The data with which to automatically create a Transfer for each of the invoices. - """ - - class UpdateParamsAutomaticTax(TypedDict): - enabled: bool - """ - Controls whether Stripe will automatically compute tax on the resulting invoices or subscriptions as well as the quote itself. - """ - liability: NotRequired[ - "QuoteService.UpdateParamsAutomaticTaxLiability" - ] - """ - The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. - """ - - class UpdateParamsAutomaticTaxLiability(TypedDict): - account: NotRequired[str] - """ - The connected account being referenced when `type` is `account`. - """ - type: Literal["account", "self"] - """ - Type of the account referenced in the request. - """ - - class UpdateParamsDiscount(TypedDict): - coupon: NotRequired[str] - """ - ID of the coupon to create a new discount for. - """ - discount: NotRequired[str] - """ - ID of an existing discount on the object (or one of its ancestors) to reuse. - """ - discount_end: NotRequired[ - "QuoteService.UpdateParamsDiscountDiscountEnd" - ] - """ - Details to determine how long the discount should be applied for. - """ - promotion_code: NotRequired[str] - """ - ID of the promotion code to create a new discount for. - """ - - class UpdateParamsDiscountDiscountEnd(TypedDict): - duration: NotRequired[ - "QuoteService.UpdateParamsDiscountDiscountEndDuration" - ] - """ - Time span for the redeemed discount. - """ - timestamp: NotRequired[int] - """ - A precise Unix timestamp for the discount to end. Must be in the future. - """ - type: Literal["duration", "timestamp"] - """ - The type of calculation made to determine when the discount ends. - """ - - class UpdateParamsDiscountDiscountEndDuration(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. - """ - interval_count: int - """ - The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. - """ - - class UpdateParamsInvoiceSettings(TypedDict): - days_until_due: NotRequired[int] - """ - Number of days within which a customer must pay the invoice generated by this quote. This value will be `null` for quotes where `collection_method=charge_automatically`. - """ - issuer: NotRequired["QuoteService.UpdateParamsInvoiceSettingsIssuer"] - """ - The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. - """ - - class UpdateParamsInvoiceSettingsIssuer(TypedDict): - account: NotRequired[str] - """ - The connected account being referenced when `type` is `account`. - """ - type: Literal["account", "self"] - """ - Type of the account referenced in the request. - """ - - class UpdateParamsLine(TypedDict): - actions: NotRequired[List["QuoteService.UpdateParamsLineAction"]] - """ - An array of operations the quote line performs. - """ - applies_to: NotRequired["QuoteService.UpdateParamsLineAppliesTo"] - """ - Details to identify the subscription schedule the quote line applies to. - """ - billing_cycle_anchor: NotRequired[ - Literal["automatic", "line_starts_at"] - ] - """ - For point-in-time quote lines (having no `ends_at` timestamp), this attribute lets you set or remove whether the subscription's billing cycle anchor is reset at the Quote Line `starts_at` timestamp.For time-span based quote lines (having both `starts_at` and `ends_at`), the only valid value is `automatic`, which removes any previously configured billing cycle anchor resets during the window of time spanning the quote line. - """ - cancel_subscription_schedule: NotRequired[ - "QuoteService.UpdateParamsLineCancelSubscriptionSchedule" - ] - """ - A point-in-time operation that cancels an existing subscription schedule at the line's starts_at timestamp. Currently only compatible with `quote_acceptance_date` for `starts_at`. When using cancel_subscription_schedule, the subscription schedule on the quote remains unalterable, except for modifications to the metadata, collection_method or invoice_settings. - """ - ends_at: NotRequired["QuoteService.UpdateParamsLineEndsAt"] - """ - Details to identify the end of the time range modified by the proposed change. If not supplied, the quote line is considered a point-in-time operation that only affects the exact timestamp at `starts_at`, and a restricted set of attributes is supported on the quote line. - """ - id: NotRequired[str] - """ - The ID of an existing line on the quote. - """ - proration_behavior: NotRequired[ - Literal["always_invoice", "create_prorations", "none"] - ] - """ - Changes to how Stripe handles prorations during the quote line's time span. Affects if and how prorations are created when a future phase starts. - """ - set_pause_collection: NotRequired[ - "QuoteService.UpdateParamsLineSetPauseCollection" - ] - """ - Defines how to pause collection for the underlying subscription throughout the duration of the amendment. - """ - set_schedule_end: NotRequired[ - Literal["line_ends_at", "line_starts_at"] - ] - """ - Timestamp helper to end the underlying schedule early, based on the acompanying line's start or end date. - """ - starts_at: NotRequired["QuoteService.UpdateParamsLineStartsAt"] - """ - Details to identify the earliest timestamp where the proposed change should take effect. - """ - trial_settings: NotRequired[ - "QuoteService.UpdateParamsLineTrialSettings" - ] - """ - Settings related to subscription trials. - """ - - class UpdateParamsLineAction(TypedDict): - add_discount: NotRequired[ - "QuoteService.UpdateParamsLineActionAddDiscount" - ] - """ - Details for the `add_discount` type. - """ - add_item: NotRequired["QuoteService.UpdateParamsLineActionAddItem"] - """ - Details for the `add_item` type. - """ - add_metadata: NotRequired[Dict[str, str]] - """ - Details for the `add_metadata` type: specify a hash of key-value pairs. - """ - remove_discount: NotRequired[ - "QuoteService.UpdateParamsLineActionRemoveDiscount" - ] - """ - Details for the `remove_discount` type. - """ - remove_item: NotRequired[ - "QuoteService.UpdateParamsLineActionRemoveItem" - ] - """ - Details for the `remove_item` type. - """ - remove_metadata: NotRequired[List[str]] - """ - Details for the `remove_metadata` type: specify an array of metadata keys. - """ - set_discounts: NotRequired[ - List["QuoteService.UpdateParamsLineActionSetDiscount"] - ] - """ - Details for the `set_discounts` type. - """ - set_items: NotRequired[ - List["QuoteService.UpdateParamsLineActionSetItem"] - ] - """ - Details for the `set_items` type. - """ - set_metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Details for the `set_metadata` type: specify an array of key-value pairs. - """ - type: Literal[ - "add_discount", - "add_item", - "add_metadata", - "clear_discounts", - "clear_metadata", - "remove_discount", - "remove_item", - "remove_metadata", - "set_discounts", - "set_items", - "set_metadata", - ] - """ - The type of action the quote line performs. - """ - - class UpdateParamsLineActionAddDiscount(TypedDict): - coupon: NotRequired[str] - """ - The coupon code to redeem. - """ - discount: NotRequired[str] - """ - An ID of an existing discount for a coupon that was already redeemed. - """ - discount_end: NotRequired[ - "QuoteService.UpdateParamsLineActionAddDiscountDiscountEnd" - ] - """ - Details to determine how long the discount should be applied for. - """ - index: NotRequired[int] - """ - The index, starting at 0, at which to position the new discount. When not supplied, Stripe defaults to appending the discount to the end of the `discounts` array. - """ - promotion_code: NotRequired[str] - """ - The promotion code to redeem. - """ - - class UpdateParamsLineActionAddDiscountDiscountEnd(TypedDict): - type: Literal["line_ends_at"] - """ - The type of calculation made to determine when the discount ends. - """ - - class UpdateParamsLineActionAddItem(TypedDict): - discounts: NotRequired[ - List["QuoteService.UpdateParamsLineActionAddItemDiscount"] - ] - """ - The discounts applied to the item. Subscription item discounts are applied before subscription discounts. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - price: str - """ - The ID of the price object. - """ - quantity: NotRequired[int] - """ - Quantity for this item. - """ - tax_rates: NotRequired[List[str]] - """ - The tax rates that apply to this subscription item. When set, the `default_tax_rates` on the subscription do not apply to this `subscription_item`. - """ - trial: NotRequired["QuoteService.UpdateParamsLineActionAddItemTrial"] - """ - Options that configure the trial on the subscription item. - """ - - class UpdateParamsLineActionAddItemDiscount(TypedDict): - coupon: NotRequired[str] - """ - ID of the coupon to create a new discount for. - """ - discount: NotRequired[str] - """ - ID of an existing discount on the object (or one of its ancestors) to reuse. - """ - discount_end: NotRequired[ - "QuoteService.UpdateParamsLineActionAddItemDiscountDiscountEnd" - ] - """ - Details to determine how long the discount should be applied for. - """ - promotion_code: NotRequired[str] - """ - ID of the promotion code to create a new discount for. - """ - - class UpdateParamsLineActionAddItemDiscountDiscountEnd(TypedDict): - duration: NotRequired[ - "QuoteService.UpdateParamsLineActionAddItemDiscountDiscountEndDuration" - ] - """ - Time span for the redeemed discount. - """ - timestamp: NotRequired[int] - """ - A precise Unix timestamp for the discount to end. Must be in the future. - """ - type: Literal["duration", "timestamp"] - """ - The type of calculation made to determine when the discount ends. - """ - - class UpdateParamsLineActionAddItemDiscountDiscountEndDuration(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. - """ - interval_count: int - """ - The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. - """ - - class UpdateParamsLineActionAddItemTrial(TypedDict): - converts_to: NotRequired[List[str]] - """ - List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. - """ - type: Literal["free", "paid"] - """ - Determines the type of trial for this item. - """ - - class UpdateParamsLineActionRemoveDiscount(TypedDict): - coupon: NotRequired[str] - """ - The coupon code to remove from the `discounts` array. - """ - discount: NotRequired[str] - """ - The ID of a discount to remove from the `discounts` array. - """ - promotion_code: NotRequired[str] - """ - The ID of a promotion code to remove from the `discounts` array. - """ - - class UpdateParamsLineActionRemoveItem(TypedDict): - price: str - """ - ID of a price to remove. - """ - - class UpdateParamsLineActionSetDiscount(TypedDict): - coupon: NotRequired[str] - """ - The coupon code to replace the `discounts` array with. - """ - discount: NotRequired[str] - """ - An ID of an existing discount to replace the `discounts` array with. - """ - promotion_code: NotRequired[str] - """ - An ID of an existing promotion code to replace the `discounts` array with. - """ - - class UpdateParamsLineActionSetItem(TypedDict): - discounts: NotRequired[ - List["QuoteService.UpdateParamsLineActionSetItemDiscount"] - ] - """ - If an item with the `price` already exists, passing this will override the `discounts` array on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `discounts`. - """ - metadata: NotRequired[Dict[str, str]] - """ - If an item with the `price` already exists, passing this will override the `metadata` on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `metadata`. - """ - price: str - """ - The ID of the price object. - """ - quantity: NotRequired[int] - """ - If an item with the `price` already exists, passing this will override the quantity on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `quantity`. - """ - tax_rates: NotRequired[List[str]] - """ - If an item with the `price` already exists, passing this will override the `tax_rates` array on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `tax_rates`. - """ - trial: NotRequired["QuoteService.UpdateParamsLineActionSetItemTrial"] - """ - If an item with the `price` already exists, passing this will override the `trial` configuration on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `trial`. - """ - - class UpdateParamsLineActionSetItemDiscount(TypedDict): - coupon: NotRequired[str] - """ - ID of the coupon to create a new discount for. - """ - discount: NotRequired[str] - """ - ID of an existing discount on the object (or one of its ancestors) to reuse. - """ - discount_end: NotRequired[ - "QuoteService.UpdateParamsLineActionSetItemDiscountDiscountEnd" - ] - """ - Details to determine how long the discount should be applied for. - """ - promotion_code: NotRequired[str] - """ - ID of the promotion code to create a new discount for. - """ - - class UpdateParamsLineActionSetItemDiscountDiscountEnd(TypedDict): - duration: NotRequired[ - "QuoteService.UpdateParamsLineActionSetItemDiscountDiscountEndDuration" - ] - """ - Time span for the redeemed discount. - """ - timestamp: NotRequired[int] - """ - A precise Unix timestamp for the discount to end. Must be in the future. - """ - type: Literal["duration", "timestamp"] - """ - The type of calculation made to determine when the discount ends. - """ - - class UpdateParamsLineActionSetItemDiscountDiscountEndDuration(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. - """ - interval_count: int - """ - The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. - """ - - class UpdateParamsLineActionSetItemTrial(TypedDict): - converts_to: NotRequired[List[str]] - """ - List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. - """ - type: Literal["free", "paid"] - """ - Determines the type of trial for this item. - """ - - class UpdateParamsLineAppliesTo(TypedDict): - new_reference: NotRequired[str] - """ - A custom string that identifies a new subscription schedule being created upon quote acceptance. All quote lines with the same `new_reference` field will be applied to the creation of a new subscription schedule. - """ - subscription_schedule: NotRequired[str] - """ - The ID of the schedule the line applies to. - """ - type: Literal["new_reference", "subscription_schedule"] - """ - Describes whether the quote line is affecting a new schedule or an existing schedule. - """ - - class UpdateParamsLineCancelSubscriptionSchedule(TypedDict): - cancel_at: Literal["line_starts_at"] - """ - Timestamp helper to cancel the underlying schedule on the accompanying line's start date. Must be set to `line_starts_at`. - """ - invoice_now: NotRequired[bool] - """ - If the subscription schedule is `active`, indicates if a final invoice will be generated that contains any un-invoiced metered usage and new/pending proration invoice items. Boolean that defaults to `true`. - """ - prorate: NotRequired[bool] - """ - If the subscription schedule is `active`, indicates if the cancellation should be prorated. Boolean that defaults to `true`. - """ - - class UpdateParamsLineEndsAt(TypedDict): - discount_end: NotRequired[ - "QuoteService.UpdateParamsLineEndsAtDiscountEnd" - ] - """ - Use the `end` time of a given discount. - """ - duration: NotRequired["QuoteService.UpdateParamsLineEndsAtDuration"] - """ - Time span for the quote line starting from the `starts_at` date. - """ - timestamp: NotRequired[int] - """ - A precise Unix timestamp. - """ - type: Literal[ - "billing_period_end", - "discount_end", - "duration", - "quote_acceptance_date", - "schedule_end", - "timestamp", - "upcoming_invoice", - ] - """ - Select a way to pass in `ends_at`. - """ - - class UpdateParamsLineEndsAtDiscountEnd(TypedDict): - discount: str - """ - The ID of a specific discount. - """ - - class UpdateParamsLineEndsAtDuration(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. - """ - interval_count: int - """ - The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. - """ - - class UpdateParamsLineItem(TypedDict): - discounts: NotRequired[ - "Literal['']|List[QuoteService.UpdateParamsLineItemDiscount]" - ] - """ - The discounts applied to this line item. - """ - id: NotRequired[str] - """ - The ID of an existing line item on the quote. - """ - price: NotRequired[str] - """ - The ID of the price object. One of `price` or `price_data` is required. - """ - price_data: NotRequired["QuoteService.UpdateParamsLineItemPriceData"] - """ - Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. - """ - quantity: NotRequired[int] - """ - The quantity of the line item. - """ - tax_rates: NotRequired["Literal['']|List[str]"] - """ - The tax rates which apply to the line item. When set, the `default_tax_rates` on the quote do not apply to this line item. - """ - - class UpdateParamsLineItemDiscount(TypedDict): - coupon: NotRequired[str] - """ - ID of the coupon to create a new discount for. - """ - discount: NotRequired[str] - """ - ID of an existing discount on the object (or one of its ancestors) to reuse. - """ - discount_end: NotRequired[ - "QuoteService.UpdateParamsLineItemDiscountDiscountEnd" - ] - """ - Details to determine how long the discount should be applied for. - """ - promotion_code: NotRequired[str] - """ - ID of the promotion code to create a new discount for. - """ - - class UpdateParamsLineItemDiscountDiscountEnd(TypedDict): - duration: NotRequired[ - "QuoteService.UpdateParamsLineItemDiscountDiscountEndDuration" - ] - """ - Time span for the redeemed discount. - """ - timestamp: NotRequired[int] - """ - A precise Unix timestamp for the discount to end. Must be in the future. - """ - type: Literal["duration", "timestamp"] - """ - The type of calculation made to determine when the discount ends. - """ - - class UpdateParamsLineItemDiscountDiscountEndDuration(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. - """ - interval_count: int - """ - The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. - """ - - class UpdateParamsLineItemPriceData(TypedDict): - 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). - """ - product: str - """ - The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to. - """ - recurring: NotRequired[ - "QuoteService.UpdateParamsLineItemPriceDataRecurring" - ] - """ - The recurring components of a price such as `interval` and `interval_count`. - """ - tax_behavior: NotRequired[ - Literal["exclusive", "inclusive", "unspecified"] - ] - """ - Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. - """ - unit_amount: NotRequired[int] - """ - A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. - """ - unit_amount_decimal: NotRequired[str] - """ - Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - """ - - class UpdateParamsLineItemPriceDataRecurring(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Specifies billing frequency. Either `day`, `week`, `month` or `year`. - """ - interval_count: NotRequired[int] - """ - The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). - """ - - class UpdateParamsLineSetPauseCollection(TypedDict): - set: NotRequired["QuoteService.UpdateParamsLineSetPauseCollectionSet"] - """ - Details of the pause_collection behavior to apply to the amendment. - """ - type: Literal["remove", "set"] - """ - Determines the type of the pause_collection amendment. - """ - - class UpdateParamsLineSetPauseCollectionSet(TypedDict): - behavior: Literal["keep_as_draft", "mark_uncollectible", "void"] - """ - The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. - """ - - class UpdateParamsLineStartsAt(TypedDict): - discount_end: NotRequired[ - "QuoteService.UpdateParamsLineStartsAtDiscountEnd" - ] - """ - Use the `end` time of a given discount. - """ - line_ends_at: NotRequired[ - "QuoteService.UpdateParamsLineStartsAtLineEndsAt" - ] - """ - The timestamp the given line ends at. - """ - timestamp: NotRequired[int] - """ - A precise Unix timestamp. - """ - type: Literal[ - "discount_end", - "line_ends_at", - "now", - "quote_acceptance_date", - "schedule_end", - "timestamp", - "upcoming_invoice", - ] - """ - Select a way to pass in `starts_at`. - """ - - class UpdateParamsLineStartsAtDiscountEnd(TypedDict): - discount: str - """ - The ID of a specific discount. - """ - - class UpdateParamsLineStartsAtLineEndsAt(TypedDict): - id: NotRequired[str] - """ - The ID of a quote line. - """ - index: NotRequired[int] - """ - The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array. - """ - - class UpdateParamsLineTrialSettings(TypedDict): - end_behavior: NotRequired[ - "QuoteService.UpdateParamsLineTrialSettingsEndBehavior" - ] - """ - Defines how the subscription should behave when a trial ends. - """ - - class UpdateParamsLineTrialSettingsEndBehavior(TypedDict): - prorate_up_front: NotRequired[Literal["defer", "include"]] - """ - Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`. - """ - - class UpdateParamsSubscriptionData(TypedDict): - bill_on_acceptance: NotRequired[ - "Literal['']|QuoteService.UpdateParamsSubscriptionDataBillOnAcceptance" - ] - """ - Describes the period to bill for upon accepting the quote. - """ - billing_behavior: NotRequired[ - Literal["prorate_on_next_phase", "prorate_up_front"] - ] - """ - Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front. - """ - billing_cycle_anchor: NotRequired["Literal['']|Literal['reset']"] - """ - When specified as `reset`, the subscription will always start a new billing period when the quote is accepted. - """ - description: NotRequired["Literal['']|str"] - """ - The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. - """ - effective_date: NotRequired[ - "Literal['']|Literal['current_period_end']|int" - ] - """ - When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. When updating a subscription, the date of which the subscription will be updated using a subscription schedule. The special value `current_period_end` can be provided to update a subscription at the end of its current period. The `effective_date` is ignored if it is in the past when the quote is accepted. - """ - end_behavior: NotRequired[Literal["cancel", "release"]] - """ - Behavior of the subscription schedule and underlying subscription when it ends. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will set metadata on the subscription or subscription schedule when the quote is accepted. If a recurring price is included in `line_items`, this field will be passed to the resulting subscription's `metadata` field. If `subscription_data.effective_date` is used, this field will be passed to the resulting subscription schedule's `phases.metadata` field. Unlike object-level metadata, this field is declarative. Updates will clear prior values. - """ - prebilling: NotRequired[ - "Literal['']|QuoteService.UpdateParamsSubscriptionDataPrebilling" - ] - """ - If specified, the invoicing for the given billing cycle iterations will be processed when the quote is accepted. Cannot be used with `effective_date`. - """ - proration_behavior: NotRequired[ - Literal["always_invoice", "create_prorations", "none"] - ] - """ - Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations). When creating a subscription, valid values are `create_prorations` or `none`. - - When updating a subscription, valid values are `create_prorations`, `none`, or `always_invoice`. - - Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`. - - Prorations can be disabled by passing `none`. - """ - trial_period_days: NotRequired["Literal['']|int"] - """ - Integer representing the number of trial period days before the customer is charged for the first time. - """ - - class UpdateParamsSubscriptionDataBillOnAcceptance(TypedDict): - bill_from: NotRequired[ - "QuoteService.UpdateParamsSubscriptionDataBillOnAcceptanceBillFrom" - ] - """ - The start of the period to bill from when the Quote is accepted. - """ - bill_until: NotRequired[ - "QuoteService.UpdateParamsSubscriptionDataBillOnAcceptanceBillUntil" - ] - """ - The end of the period to bill until when the Quote is accepted. - """ - - class UpdateParamsSubscriptionDataBillOnAcceptanceBillFrom(TypedDict): - line_starts_at: NotRequired[ - "QuoteService.UpdateParamsSubscriptionDataBillOnAcceptanceBillFromLineStartsAt" - ] - """ - Details of a Quote line to start the bill period from. - """ - timestamp: NotRequired[int] - """ - A precise Unix timestamp. - """ - type: Literal[ - "line_starts_at", - "now", - "pause_collection_start", - "quote_acceptance_date", - "timestamp", - ] - """ - The type of method to specify the `bill_from` time. - """ - - class UpdateParamsSubscriptionDataBillOnAcceptanceBillFromLineStartsAt( - TypedDict, - ): - id: NotRequired[str] - """ - The ID of a quote line. - """ - index: NotRequired[int] - """ - The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array. - """ - - class UpdateParamsSubscriptionDataBillOnAcceptanceBillUntil(TypedDict): - duration: NotRequired[ - "QuoteService.UpdateParamsSubscriptionDataBillOnAcceptanceBillUntilDuration" - ] - """ - Details of the duration over which to bill. - """ - line_ends_at: NotRequired[ - "QuoteService.UpdateParamsSubscriptionDataBillOnAcceptanceBillUntilLineEndsAt" - ] - """ - Details of a Quote line item from which to bill until. - """ - timestamp: NotRequired[int] - """ - A precise Unix timestamp. - """ - type: Literal[ - "duration", - "line_ends_at", - "schedule_end", - "timestamp", - "upcoming_invoice", - ] - """ - The type of method to specify the `bill_until` time. - """ - - class UpdateParamsSubscriptionDataBillOnAcceptanceBillUntilDuration( - TypedDict, - ): - interval: Literal["day", "month", "week", "year"] - """ - Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. - """ - interval_count: int - """ - The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. - """ - - class UpdateParamsSubscriptionDataBillOnAcceptanceBillUntilLineEndsAt( - TypedDict, - ): - id: NotRequired[str] - """ - The ID of a quote line. - """ - index: NotRequired[int] - """ - The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array. - """ - - class UpdateParamsSubscriptionDataOverride(TypedDict): - applies_to: ( - "QuoteService.UpdateParamsSubscriptionDataOverrideAppliesTo" - ) - """ - Whether the override applies to an existing Subscription Schedule or a new Subscription Schedule. - """ - bill_on_acceptance: NotRequired[ - "Literal['']|QuoteService.UpdateParamsSubscriptionDataOverrideBillOnAcceptance" - ] - """ - Describes the period to bill for upon accepting the quote. - """ - billing_behavior: NotRequired[ - Literal["prorate_on_next_phase", "prorate_up_front"] - ] - """ - Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front. - """ - customer: NotRequired[str] - """ - The customer the Subscription Data override applies to. - """ - description: NotRequired["Literal['']|str"] - """ - The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. - """ - end_behavior: NotRequired[Literal["cancel", "release"]] - """ - Behavior of the subscription schedule and underlying subscription when it ends. - """ - proration_behavior: NotRequired[ - Literal["always_invoice", "create_prorations", "none"] - ] - """ - Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations). When creating a subscription, valid values are `create_prorations` or `none`. - - When updating a subscription, valid values are `create_prorations`, `none`, or `always_invoice`. - - Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`. - - Prorations can be disabled by passing `none`. - """ - - class UpdateParamsSubscriptionDataOverrideAppliesTo(TypedDict): - new_reference: NotRequired[str] - """ - A custom string that identifies a new subscription schedule being created upon quote acceptance. All quote lines with the same `new_reference` field will be applied to the creation of a new subscription schedule. - """ - subscription_schedule: NotRequired[str] - """ - The ID of the schedule the line applies to. - """ - type: Literal["new_reference", "subscription_schedule"] - """ - Describes whether the quote line is affecting a new schedule or an existing schedule. - """ - - class UpdateParamsSubscriptionDataOverrideBillOnAcceptance(TypedDict): - bill_from: NotRequired[ - "QuoteService.UpdateParamsSubscriptionDataOverrideBillOnAcceptanceBillFrom" - ] - """ - The start of the period to bill from when the Quote is accepted. - """ - bill_until: NotRequired[ - "QuoteService.UpdateParamsSubscriptionDataOverrideBillOnAcceptanceBillUntil" - ] - """ - The end of the period to bill until when the Quote is accepted. - """ - - class UpdateParamsSubscriptionDataOverrideBillOnAcceptanceBillFrom( - TypedDict, - ): - line_starts_at: NotRequired[ - "QuoteService.UpdateParamsSubscriptionDataOverrideBillOnAcceptanceBillFromLineStartsAt" - ] - """ - Details of a Quote line to start the bill period from. - """ - timestamp: NotRequired[int] - """ - A precise Unix timestamp. - """ - type: Literal[ - "line_starts_at", - "now", - "pause_collection_start", - "quote_acceptance_date", - "timestamp", - ] - """ - The type of method to specify the `bill_from` time. - """ - - class UpdateParamsSubscriptionDataOverrideBillOnAcceptanceBillFromLineStartsAt( - TypedDict, - ): - id: NotRequired[str] - """ - The ID of a quote line. - """ - index: NotRequired[int] - """ - The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array. - """ - - class UpdateParamsSubscriptionDataOverrideBillOnAcceptanceBillUntil( - TypedDict, - ): - duration: NotRequired[ - "QuoteService.UpdateParamsSubscriptionDataOverrideBillOnAcceptanceBillUntilDuration" - ] - """ - Details of the duration over which to bill. - """ - line_ends_at: NotRequired[ - "QuoteService.UpdateParamsSubscriptionDataOverrideBillOnAcceptanceBillUntilLineEndsAt" - ] - """ - Details of a Quote line item from which to bill until. - """ - timestamp: NotRequired[int] - """ - A precise Unix timestamp. - """ - type: Literal[ - "duration", - "line_ends_at", - "schedule_end", - "timestamp", - "upcoming_invoice", - ] - """ - The type of method to specify the `bill_until` time. - """ - - class UpdateParamsSubscriptionDataOverrideBillOnAcceptanceBillUntilDuration( - TypedDict, - ): - interval: Literal["day", "month", "week", "year"] - """ - Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. - """ - interval_count: int - """ - The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. - """ - - class UpdateParamsSubscriptionDataOverrideBillOnAcceptanceBillUntilLineEndsAt( - TypedDict, - ): - id: NotRequired[str] - """ - The ID of a quote line. - """ - index: NotRequired[int] - """ - The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array. - """ - - class UpdateParamsSubscriptionDataPrebilling(TypedDict): - iterations: int - """ - This is used to determine the number of billing cycles to prebill. - """ - - class UpdateParamsTransferData(TypedDict): - amount: NotRequired[int] - """ - The amount that will be transferred automatically when the invoice is paid. If no amount is set, the full amount is transferred. There cannot be any line items with recurring prices when using this field. - """ - amount_percent: NotRequired[float] - """ - A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. There must be at least 1 line item with a recurring price to use this field. - """ - destination: str - """ - ID of an existing, connected Stripe account. - """ - def list( self, - params: Optional["QuoteService.ListParams"] = None, + params: Optional["QuoteListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[Quote]: """ @@ -2499,7 +75,7 @@ def list( async def list_async( self, - params: Optional["QuoteService.ListParams"] = None, + params: Optional["QuoteListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[Quote]: """ @@ -2518,7 +94,7 @@ async def list_async( def create( self, - params: Optional["QuoteService.CreateParams"] = None, + params: Optional["QuoteCreateParams"] = None, options: Optional[RequestOptions] = None, ) -> Quote: """ @@ -2537,7 +113,7 @@ def create( async def create_async( self, - params: Optional["QuoteService.CreateParams"] = None, + params: Optional["QuoteCreateParams"] = None, options: Optional[RequestOptions] = None, ) -> Quote: """ @@ -2557,7 +133,7 @@ async def create_async( def retrieve( self, quote: str, - params: Optional["QuoteService.RetrieveParams"] = None, + params: Optional["QuoteRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Quote: """ @@ -2577,7 +153,7 @@ def retrieve( async def retrieve_async( self, quote: str, - params: Optional["QuoteService.RetrieveParams"] = None, + params: Optional["QuoteRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Quote: """ @@ -2597,7 +173,7 @@ async def retrieve_async( def update( self, quote: str, - params: Optional["QuoteService.UpdateParams"] = None, + params: Optional["QuoteUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> Quote: """ @@ -2617,7 +193,7 @@ def update( async def update_async( self, quote: str, - params: Optional["QuoteService.UpdateParams"] = None, + params: Optional["QuoteUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> Quote: """ @@ -2637,7 +213,7 @@ async def update_async( def accept( self, quote: str, - params: Optional["QuoteService.AcceptParams"] = None, + params: Optional["QuoteAcceptParams"] = None, options: Optional[RequestOptions] = None, ) -> Quote: """ @@ -2657,7 +233,7 @@ def accept( async def accept_async( self, quote: str, - params: Optional["QuoteService.AcceptParams"] = None, + params: Optional["QuoteAcceptParams"] = None, options: Optional[RequestOptions] = None, ) -> Quote: """ @@ -2677,7 +253,7 @@ async def accept_async( def cancel( self, quote: str, - params: Optional["QuoteService.CancelParams"] = None, + params: Optional["QuoteCancelParams"] = None, options: Optional[RequestOptions] = None, ) -> Quote: """ @@ -2697,7 +273,7 @@ def cancel( async def cancel_async( self, quote: str, - params: Optional["QuoteService.CancelParams"] = None, + params: Optional["QuoteCancelParams"] = None, options: Optional[RequestOptions] = None, ) -> Quote: """ @@ -2717,7 +293,7 @@ async def cancel_async( def finalize_quote( self, quote: str, - params: Optional["QuoteService.FinalizeQuoteParams"] = None, + params: Optional["QuoteFinalizeQuoteParams"] = None, options: Optional[RequestOptions] = None, ) -> Quote: """ @@ -2737,7 +313,7 @@ def finalize_quote( async def finalize_quote_async( self, quote: str, - params: Optional["QuoteService.FinalizeQuoteParams"] = None, + params: Optional["QuoteFinalizeQuoteParams"] = None, options: Optional[RequestOptions] = None, ) -> Quote: """ @@ -2757,7 +333,7 @@ async def finalize_quote_async( def mark_draft( self, quote: str, - params: Optional["QuoteService.MarkDraftParams"] = None, + params: Optional["QuoteMarkDraftParams"] = None, options: Optional[RequestOptions] = None, ) -> Quote: """ @@ -2779,7 +355,7 @@ def mark_draft( async def mark_draft_async( self, quote: str, - params: Optional["QuoteService.MarkDraftParams"] = None, + params: Optional["QuoteMarkDraftParams"] = None, options: Optional[RequestOptions] = None, ) -> Quote: """ @@ -2801,7 +377,7 @@ async def mark_draft_async( def mark_stale( self, quote: str, - params: Optional["QuoteService.MarkStaleParams"] = None, + params: Optional["QuoteMarkStaleParams"] = None, options: Optional[RequestOptions] = None, ) -> Quote: """ @@ -2823,7 +399,7 @@ def mark_stale( async def mark_stale_async( self, quote: str, - params: Optional["QuoteService.MarkStaleParams"] = None, + params: Optional["QuoteMarkStaleParams"] = None, options: Optional[RequestOptions] = None, ) -> Quote: """ @@ -2845,7 +421,7 @@ async def mark_stale_async( def reestimate( self, quote: str, - params: Optional["QuoteService.ReestimateParams"] = None, + params: Optional["QuoteReestimateParams"] = None, options: Optional[RequestOptions] = None, ) -> Quote: """ @@ -2867,7 +443,7 @@ def reestimate( async def reestimate_async( self, quote: str, - params: Optional["QuoteService.ReestimateParams"] = None, + params: Optional["QuoteReestimateParams"] = None, options: Optional[RequestOptions] = None, ) -> Quote: """ @@ -2889,7 +465,7 @@ async def reestimate_async( def pdf( self, quote: str, - params: Optional["QuoteService.PdfParams"] = None, + params: Optional["QuotePdfParams"] = None, options: Optional[RequestOptions] = None, ) -> Any: """ @@ -2909,7 +485,7 @@ def pdf( async def pdf_async( self, quote: str, - params: Optional["QuoteService.PdfParams"] = None, + params: Optional["QuotePdfParams"] = None, options: Optional[RequestOptions] = None, ) -> Any: """ @@ -2930,7 +506,7 @@ def list_preview_invoice_lines( self, quote: str, preview_invoice: str, - params: Optional["QuoteService.ListPreviewInvoiceLinesParams"] = None, + params: Optional["QuoteListPreviewInvoiceLinesParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[InvoiceLineItem]: """ @@ -2954,7 +530,7 @@ async def list_preview_invoice_lines_async( self, quote: str, preview_invoice: str, - params: Optional["QuoteService.ListPreviewInvoiceLinesParams"] = None, + params: Optional["QuoteListPreviewInvoiceLinesParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[InvoiceLineItem]: """ diff --git a/stripe/_refund.py b/stripe/_refund.py index f8e44253b..b4358ddc4 100644 --- a/stripe/_refund.py +++ b/stripe/_refund.py @@ -4,26 +4,24 @@ from stripe._expandable_field import ExpandableField from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource -from stripe._request_options import RequestOptions from stripe._stripe_object import StripeObject from stripe._test_helpers import APIResourceTestHelpers from stripe._updateable_api_resource import UpdateableAPIResource from stripe._util import class_method_variant, sanitize_id -from typing import ClassVar, Dict, List, Optional, cast, overload -from typing_extensions import ( - Literal, - NotRequired, - Type, - TypedDict, - Unpack, - TYPE_CHECKING, -) +from typing import ClassVar, Dict, Optional, cast, overload +from typing_extensions import Literal, Type, Unpack, TYPE_CHECKING if TYPE_CHECKING: from stripe._balance_transaction import BalanceTransaction from stripe._charge import Charge from stripe._payment_intent import PaymentIntent from stripe._reversal import Reversal + from stripe.params._refund_cancel_params import RefundCancelParams + from stripe.params._refund_create_params import RefundCreateParams + from stripe.params._refund_expire_params import RefundExpireParams + from stripe.params._refund_list_params import RefundListParams + from stripe.params._refund_modify_params import RefundModifyParams + from stripe.params._refund_retrieve_params import RefundRetrieveParams class Refund( @@ -360,133 +358,6 @@ class PresentmentDetails(StripeObject): Currency presented to the customer during payment. """ - class CancelParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class CreateParams(RequestOptions): - amount: NotRequired[int] - charge: NotRequired[str] - """ - The identifier of the charge to refund. - """ - currency: NotRequired[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). - """ - customer: NotRequired[str] - """ - Customer whose customer balance to refund from. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - instructions_email: NotRequired[str] - """ - For payment methods without native refund support (e.g., Konbini, PromptPay), use this email from the customer to receive refund instructions. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - origin: NotRequired[Literal["customer_balance"]] - """ - Origin of the refund - """ - payment_intent: NotRequired[str] - """ - The identifier of the PaymentIntent to refund. - """ - reason: NotRequired[ - Literal["duplicate", "fraudulent", "requested_by_customer"] - ] - """ - String indicating the reason for the refund. If set, possible values are `duplicate`, `fraudulent`, and `requested_by_customer`. If you believe the charge to be fraudulent, specifying `fraudulent` as the reason will add the associated card and email to your [block lists](https://stripe.com/docs/radar/lists), and will also help us improve our fraud detection algorithms. - """ - refund_application_fee: NotRequired[bool] - """ - Boolean indicating whether the application fee should be refunded when refunding this charge. If a full charge refund is given, the full application fee will be refunded. Otherwise, the application fee will be refunded in an amount proportional to the amount of the charge refunded. An application fee can be refunded only by the application that created the charge. - """ - reverse_transfer: NotRequired[bool] - """ - Boolean indicating whether the transfer should be reversed when refunding this charge. The transfer will be reversed proportionally to the amount being refunded (either the entire or partial amount). - - A transfer can be reversed only by the application that created the charge. - """ - - class ExpireParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class ListParams(RequestOptions): - charge: NotRequired[str] - """ - Only return refunds for the charge specified by this charge ID. - """ - created: NotRequired["Refund.ListParamsCreated|int"] - """ - Only return refunds that were created during the given date interval. - """ - 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. - """ - payment_intent: NotRequired[str] - """ - Only return refunds for the PaymentIntent specified by this ID. - """ - 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 ListParamsCreated(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) - """ - - class ModifyParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - - class RetrieveParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - amount: int """ Amount, in cents (or local equivalent). @@ -580,7 +451,7 @@ class RetrieveParams(RequestOptions): @classmethod def _cls_cancel( - cls, refund: str, **params: Unpack["Refund.CancelParams"] + cls, refund: str, **params: Unpack["RefundCancelParams"] ) -> "Refund": """ Cancels a refund with a status of requires_action. @@ -601,7 +472,7 @@ def _cls_cancel( @overload @staticmethod def cancel( - refund: str, **params: Unpack["Refund.CancelParams"] + refund: str, **params: Unpack["RefundCancelParams"] ) -> "Refund": """ Cancels a refund with a status of requires_action. @@ -611,7 +482,7 @@ def cancel( ... @overload - def cancel(self, **params: Unpack["Refund.CancelParams"]) -> "Refund": + def cancel(self, **params: Unpack["RefundCancelParams"]) -> "Refund": """ Cancels a refund with a status of requires_action. @@ -621,7 +492,7 @@ def cancel(self, **params: Unpack["Refund.CancelParams"]) -> "Refund": @class_method_variant("_cls_cancel") def cancel( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Refund.CancelParams"] + self, **params: Unpack["RefundCancelParams"] ) -> "Refund": """ Cancels a refund with a status of requires_action. @@ -641,7 +512,7 @@ def cancel( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_cancel_async( - cls, refund: str, **params: Unpack["Refund.CancelParams"] + cls, refund: str, **params: Unpack["RefundCancelParams"] ) -> "Refund": """ Cancels a refund with a status of requires_action. @@ -662,7 +533,7 @@ async def _cls_cancel_async( @overload @staticmethod async def cancel_async( - refund: str, **params: Unpack["Refund.CancelParams"] + refund: str, **params: Unpack["RefundCancelParams"] ) -> "Refund": """ Cancels a refund with a status of requires_action. @@ -673,7 +544,7 @@ async def cancel_async( @overload async def cancel_async( - self, **params: Unpack["Refund.CancelParams"] + self, **params: Unpack["RefundCancelParams"] ) -> "Refund": """ Cancels a refund with a status of requires_action. @@ -684,7 +555,7 @@ async def cancel_async( @class_method_variant("_cls_cancel_async") async def cancel_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Refund.CancelParams"] + self, **params: Unpack["RefundCancelParams"] ) -> "Refund": """ Cancels a refund with a status of requires_action. @@ -703,7 +574,7 @@ async def cancel_async( # pyright: ignore[reportGeneralTypeIssues] ) @classmethod - def create(cls, **params: Unpack["Refund.CreateParams"]) -> "Refund": + def create(cls, **params: Unpack["RefundCreateParams"]) -> "Refund": """ When you create a new refund, you must specify a Charge or a PaymentIntent object on which to create it. @@ -728,7 +599,7 @@ def create(cls, **params: Unpack["Refund.CreateParams"]) -> "Refund": @classmethod async def create_async( - cls, **params: Unpack["Refund.CreateParams"] + cls, **params: Unpack["RefundCreateParams"] ) -> "Refund": """ When you create a new refund, you must specify a Charge or a PaymentIntent object on which to create it. @@ -754,7 +625,7 @@ async def create_async( @classmethod def list( - cls, **params: Unpack["Refund.ListParams"] + cls, **params: Unpack["RefundListParams"] ) -> ListObject["Refund"]: """ Returns a list of all refunds you created. We return the refunds in sorted order, with the most recent refunds appearing first. The 10 most recent refunds are always available by default on the Charge object. @@ -774,7 +645,7 @@ def list( @classmethod async def list_async( - cls, **params: Unpack["Refund.ListParams"] + cls, **params: Unpack["RefundListParams"] ) -> ListObject["Refund"]: """ Returns a list of all refunds you created. We return the refunds in sorted order, with the most recent refunds appearing first. The 10 most recent refunds are always available by default on the Charge object. @@ -794,7 +665,7 @@ async def list_async( @classmethod def modify( - cls, id: str, **params: Unpack["Refund.ModifyParams"] + cls, id: str, **params: Unpack["RefundModifyParams"] ) -> "Refund": """ Updates the refund that you specify by setting the values of the passed parameters. Any parameters that you don't provide remain unchanged. @@ -813,7 +684,7 @@ def modify( @classmethod async def modify_async( - cls, id: str, **params: Unpack["Refund.ModifyParams"] + cls, id: str, **params: Unpack["RefundModifyParams"] ) -> "Refund": """ Updates the refund that you specify by setting the values of the passed parameters. Any parameters that you don't provide remain unchanged. @@ -832,7 +703,7 @@ async def modify_async( @classmethod def retrieve( - cls, id: str, **params: Unpack["Refund.RetrieveParams"] + cls, id: str, **params: Unpack["RefundRetrieveParams"] ) -> "Refund": """ Retrieves the details of an existing refund. @@ -843,7 +714,7 @@ def retrieve( @classmethod async def retrieve_async( - cls, id: str, **params: Unpack["Refund.RetrieveParams"] + cls, id: str, **params: Unpack["RefundRetrieveParams"] ) -> "Refund": """ Retrieves the details of an existing refund. @@ -857,7 +728,7 @@ class TestHelpers(APIResourceTestHelpers["Refund"]): @classmethod def _cls_expire( - cls, refund: str, **params: Unpack["Refund.ExpireParams"] + cls, refund: str, **params: Unpack["RefundExpireParams"] ) -> "Refund": """ Expire a refund with a status of requires_action. @@ -876,7 +747,7 @@ def _cls_expire( @overload @staticmethod def expire( - refund: str, **params: Unpack["Refund.ExpireParams"] + refund: str, **params: Unpack["RefundExpireParams"] ) -> "Refund": """ Expire a refund with a status of requires_action. @@ -884,7 +755,7 @@ def expire( ... @overload - def expire(self, **params: Unpack["Refund.ExpireParams"]) -> "Refund": + def expire(self, **params: Unpack["RefundExpireParams"]) -> "Refund": """ Expire a refund with a status of requires_action. """ @@ -892,7 +763,7 @@ def expire(self, **params: Unpack["Refund.ExpireParams"]) -> "Refund": @class_method_variant("_cls_expire") def expire( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Refund.ExpireParams"] + self, **params: Unpack["RefundExpireParams"] ) -> "Refund": """ Expire a refund with a status of requires_action. @@ -910,7 +781,7 @@ def expire( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_expire_async( - cls, refund: str, **params: Unpack["Refund.ExpireParams"] + cls, refund: str, **params: Unpack["RefundExpireParams"] ) -> "Refund": """ Expire a refund with a status of requires_action. @@ -929,7 +800,7 @@ async def _cls_expire_async( @overload @staticmethod async def expire_async( - refund: str, **params: Unpack["Refund.ExpireParams"] + refund: str, **params: Unpack["RefundExpireParams"] ) -> "Refund": """ Expire a refund with a status of requires_action. @@ -938,7 +809,7 @@ async def expire_async( @overload async def expire_async( - self, **params: Unpack["Refund.ExpireParams"] + self, **params: Unpack["RefundExpireParams"] ) -> "Refund": """ Expire a refund with a status of requires_action. @@ -947,7 +818,7 @@ async def expire_async( @class_method_variant("_cls_expire_async") async def expire_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Refund.ExpireParams"] + self, **params: Unpack["RefundExpireParams"] ) -> "Refund": """ Expire a refund with a status of requires_action. diff --git a/stripe/_refund_service.py b/stripe/_refund_service.py index 6a8c35794..a9319e0bc 100644 --- a/stripe/_refund_service.py +++ b/stripe/_refund_service.py @@ -5,135 +5,21 @@ from stripe._request_options import RequestOptions from stripe._stripe_service import StripeService from stripe._util import sanitize_id -from typing import Dict, List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params._refund_cancel_params import RefundCancelParams + from stripe.params._refund_create_params import RefundCreateParams + from stripe.params._refund_list_params import RefundListParams + from stripe.params._refund_retrieve_params import RefundRetrieveParams + from stripe.params._refund_update_params import RefundUpdateParams -class RefundService(StripeService): - class CancelParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class CreateParams(TypedDict): - amount: NotRequired[int] - charge: NotRequired[str] - """ - The identifier of the charge to refund. - """ - currency: NotRequired[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). - """ - customer: NotRequired[str] - """ - Customer whose customer balance to refund from. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - instructions_email: NotRequired[str] - """ - For payment methods without native refund support (e.g., Konbini, PromptPay), use this email from the customer to receive refund instructions. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - origin: NotRequired[Literal["customer_balance"]] - """ - Origin of the refund - """ - payment_intent: NotRequired[str] - """ - The identifier of the PaymentIntent to refund. - """ - reason: NotRequired[ - Literal["duplicate", "fraudulent", "requested_by_customer"] - ] - """ - String indicating the reason for the refund. If set, possible values are `duplicate`, `fraudulent`, and `requested_by_customer`. If you believe the charge to be fraudulent, specifying `fraudulent` as the reason will add the associated card and email to your [block lists](https://stripe.com/docs/radar/lists), and will also help us improve our fraud detection algorithms. - """ - refund_application_fee: NotRequired[bool] - """ - Boolean indicating whether the application fee should be refunded when refunding this charge. If a full charge refund is given, the full application fee will be refunded. Otherwise, the application fee will be refunded in an amount proportional to the amount of the charge refunded. An application fee can be refunded only by the application that created the charge. - """ - reverse_transfer: NotRequired[bool] - """ - Boolean indicating whether the transfer should be reversed when refunding this charge. The transfer will be reversed proportionally to the amount being refunded (either the entire or partial amount). - - A transfer can be reversed only by the application that created the charge. - """ - - class ListParams(TypedDict): - charge: NotRequired[str] - """ - Only return refunds for the charge specified by this charge ID. - """ - created: NotRequired["RefundService.ListParamsCreated|int"] - """ - Only return refunds that were created during the given date interval. - """ - 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. - """ - payment_intent: NotRequired[str] - """ - Only return refunds for the PaymentIntent specified by this ID. - """ - 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 ListParamsCreated(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) - """ - - class RetrieveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class UpdateParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ +class RefundService(StripeService): def list( self, - params: Optional["RefundService.ListParams"] = None, + params: Optional["RefundListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[Refund]: """ @@ -152,7 +38,7 @@ def list( async def list_async( self, - params: Optional["RefundService.ListParams"] = None, + params: Optional["RefundListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[Refund]: """ @@ -171,7 +57,7 @@ async def list_async( def create( self, - params: Optional["RefundService.CreateParams"] = None, + params: Optional["RefundCreateParams"] = None, options: Optional[RequestOptions] = None, ) -> Refund: """ @@ -200,7 +86,7 @@ def create( async def create_async( self, - params: Optional["RefundService.CreateParams"] = None, + params: Optional["RefundCreateParams"] = None, options: Optional[RequestOptions] = None, ) -> Refund: """ @@ -230,7 +116,7 @@ async def create_async( def retrieve( self, refund: str, - params: Optional["RefundService.RetrieveParams"] = None, + params: Optional["RefundRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Refund: """ @@ -250,7 +136,7 @@ def retrieve( async def retrieve_async( self, refund: str, - params: Optional["RefundService.RetrieveParams"] = None, + params: Optional["RefundRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Refund: """ @@ -270,7 +156,7 @@ async def retrieve_async( def update( self, refund: str, - params: Optional["RefundService.UpdateParams"] = None, + params: Optional["RefundUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> Refund: """ @@ -292,7 +178,7 @@ def update( async def update_async( self, refund: str, - params: Optional["RefundService.UpdateParams"] = None, + params: Optional["RefundUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> Refund: """ @@ -314,7 +200,7 @@ async def update_async( def cancel( self, refund: str, - params: Optional["RefundService.CancelParams"] = None, + params: Optional["RefundCancelParams"] = None, options: Optional[RequestOptions] = None, ) -> Refund: """ @@ -338,7 +224,7 @@ def cancel( async def cancel_async( self, refund: str, - params: Optional["RefundService.CancelParams"] = None, + params: Optional["RefundCancelParams"] = None, options: Optional[RequestOptions] = None, ) -> Refund: """ diff --git a/stripe/_review.py b/stripe/_review.py index cbe4c0386..d03e8462f 100644 --- a/stripe/_review.py +++ b/stripe/_review.py @@ -3,21 +3,17 @@ from stripe._expandable_field import ExpandableField from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource -from stripe._request_options import RequestOptions from stripe._stripe_object import StripeObject from stripe._util import class_method_variant, sanitize_id -from typing import ClassVar, List, Optional, cast, overload -from typing_extensions import ( - Literal, - NotRequired, - TypedDict, - Unpack, - TYPE_CHECKING, -) +from typing import ClassVar, Optional, cast, overload +from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: from stripe._charge import Charge from stripe._payment_intent import PaymentIntent + from stripe.params._review_approve_params import ReviewApproveParams + from stripe.params._review_list_params import ReviewListParams + from stripe.params._review_retrieve_params import ReviewRetrieveParams class Review(ListableAPIResource["Review"]): @@ -70,58 +66,6 @@ class Session(StripeObject): The version for the browser session (e.g., `61.0.3163.100`). """ - class ApproveParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class ListParams(RequestOptions): - created: NotRequired["Review.ListParamsCreated|int"] - """ - Only return reviews that were created during the given date interval. - """ - 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 ListParamsCreated(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) - """ - - class RetrieveParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - billing_zip: Optional[str] """ The ZIP or postal code of the card used, if applicable. @@ -192,7 +136,7 @@ class RetrieveParams(RequestOptions): @classmethod def _cls_approve( - cls, review: str, **params: Unpack["Review.ApproveParams"] + cls, review: str, **params: Unpack["ReviewApproveParams"] ) -> "Review": """ Approves a Review object, closing it and removing it from the list of reviews. @@ -211,7 +155,7 @@ def _cls_approve( @overload @staticmethod def approve( - review: str, **params: Unpack["Review.ApproveParams"] + review: str, **params: Unpack["ReviewApproveParams"] ) -> "Review": """ Approves a Review object, closing it and removing it from the list of reviews. @@ -219,7 +163,7 @@ def approve( ... @overload - def approve(self, **params: Unpack["Review.ApproveParams"]) -> "Review": + def approve(self, **params: Unpack["ReviewApproveParams"]) -> "Review": """ Approves a Review object, closing it and removing it from the list of reviews. """ @@ -227,7 +171,7 @@ def approve(self, **params: Unpack["Review.ApproveParams"]) -> "Review": @class_method_variant("_cls_approve") def approve( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Review.ApproveParams"] + self, **params: Unpack["ReviewApproveParams"] ) -> "Review": """ Approves a Review object, closing it and removing it from the list of reviews. @@ -245,7 +189,7 @@ def approve( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_approve_async( - cls, review: str, **params: Unpack["Review.ApproveParams"] + cls, review: str, **params: Unpack["ReviewApproveParams"] ) -> "Review": """ Approves a Review object, closing it and removing it from the list of reviews. @@ -264,7 +208,7 @@ async def _cls_approve_async( @overload @staticmethod async def approve_async( - review: str, **params: Unpack["Review.ApproveParams"] + review: str, **params: Unpack["ReviewApproveParams"] ) -> "Review": """ Approves a Review object, closing it and removing it from the list of reviews. @@ -273,7 +217,7 @@ async def approve_async( @overload async def approve_async( - self, **params: Unpack["Review.ApproveParams"] + self, **params: Unpack["ReviewApproveParams"] ) -> "Review": """ Approves a Review object, closing it and removing it from the list of reviews. @@ -282,7 +226,7 @@ async def approve_async( @class_method_variant("_cls_approve_async") async def approve_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Review.ApproveParams"] + self, **params: Unpack["ReviewApproveParams"] ) -> "Review": """ Approves a Review object, closing it and removing it from the list of reviews. @@ -300,7 +244,7 @@ async def approve_async( # pyright: ignore[reportGeneralTypeIssues] @classmethod def list( - cls, **params: Unpack["Review.ListParams"] + cls, **params: Unpack["ReviewListParams"] ) -> ListObject["Review"]: """ Returns a list of Review objects that have open set to true. The objects are sorted in descending order by creation date, with the most recently created object appearing first. @@ -320,7 +264,7 @@ def list( @classmethod async def list_async( - cls, **params: Unpack["Review.ListParams"] + cls, **params: Unpack["ReviewListParams"] ) -> ListObject["Review"]: """ Returns a list of Review objects that have open set to true. The objects are sorted in descending order by creation date, with the most recently created object appearing first. @@ -340,7 +284,7 @@ async def list_async( @classmethod def retrieve( - cls, id: str, **params: Unpack["Review.RetrieveParams"] + cls, id: str, **params: Unpack["ReviewRetrieveParams"] ) -> "Review": """ Retrieves a Review object. @@ -351,7 +295,7 @@ def retrieve( @classmethod async def retrieve_async( - cls, id: str, **params: Unpack["Review.RetrieveParams"] + cls, id: str, **params: Unpack["ReviewRetrieveParams"] ) -> "Review": """ Retrieves a Review object. diff --git a/stripe/_review_service.py b/stripe/_review_service.py index 14aea532b..ddae806a2 100644 --- a/stripe/_review_service.py +++ b/stripe/_review_service.py @@ -5,66 +5,19 @@ from stripe._review import Review from stripe._stripe_service import StripeService from stripe._util import sanitize_id -from typing import List, Optional, cast -from typing_extensions import NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params._review_approve_params import ReviewApproveParams + from stripe.params._review_list_params import ReviewListParams + from stripe.params._review_retrieve_params import ReviewRetrieveParams -class ReviewService(StripeService): - class ApproveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class ListParams(TypedDict): - created: NotRequired["ReviewService.ListParamsCreated|int"] - """ - Only return reviews that were created during the given date interval. - """ - 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 ListParamsCreated(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) - """ - - class RetrieveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ +class ReviewService(StripeService): def list( self, - params: Optional["ReviewService.ListParams"] = None, + params: Optional["ReviewListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[Review]: """ @@ -83,7 +36,7 @@ def list( async def list_async( self, - params: Optional["ReviewService.ListParams"] = None, + params: Optional["ReviewListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[Review]: """ @@ -103,7 +56,7 @@ async def list_async( def retrieve( self, review: str, - params: Optional["ReviewService.RetrieveParams"] = None, + params: Optional["ReviewRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Review: """ @@ -123,7 +76,7 @@ def retrieve( async def retrieve_async( self, review: str, - params: Optional["ReviewService.RetrieveParams"] = None, + params: Optional["ReviewRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Review: """ @@ -143,7 +96,7 @@ async def retrieve_async( def approve( self, review: str, - params: Optional["ReviewService.ApproveParams"] = None, + params: Optional["ReviewApproveParams"] = None, options: Optional[RequestOptions] = None, ) -> Review: """ @@ -165,7 +118,7 @@ def approve( async def approve_async( self, review: str, - params: Optional["ReviewService.ApproveParams"] = None, + params: Optional["ReviewApproveParams"] = None, options: Optional[RequestOptions] = None, ) -> Review: """ diff --git a/stripe/_setup_attempt.py b/stripe/_setup_attempt.py index 08554ce42..861a23ed0 100644 --- a/stripe/_setup_attempt.py +++ b/stripe/_setup_attempt.py @@ -3,16 +3,9 @@ from stripe._expandable_field import ExpandableField from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource -from stripe._request_options import RequestOptions from stripe._stripe_object import StripeObject from typing import ClassVar, List, Optional, Union -from typing_extensions import ( - Literal, - NotRequired, - TypedDict, - Unpack, - TYPE_CHECKING, -) +from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: from stripe._account import Account @@ -25,6 +18,7 @@ from stripe._payment_method import PaymentMethod from stripe._setup_intent import SetupIntent from stripe._source import Source + from stripe.params._setup_attempt_list_params import SetupAttemptListParams class SetupAttempt(ListableAPIResource["SetupAttempt"]): @@ -776,53 +770,6 @@ class SetupError(StripeObject): The type of error returned. One of `api_error`, `card_error`, `idempotency_error`, or `invalid_request_error` """ - class ListParams(RequestOptions): - created: NotRequired["SetupAttempt.ListParamsCreated|int"] - """ - A filter on the list, based on the object `created` field. The value - can be a string with an integer Unix timestamp or 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. - """ - setup_intent: str - """ - Only return SetupAttempts created by the SetupIntent specified by - this ID. - """ - 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 ListParamsCreated(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) - """ - application: Optional[ExpandableField["Application"]] """ The value of [application](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-application) on the SetupIntent at the time of this confirmation. @@ -891,7 +838,7 @@ class ListParamsCreated(TypedDict): @classmethod def list( - cls, **params: Unpack["SetupAttempt.ListParams"] + cls, **params: Unpack["SetupAttemptListParams"] ) -> ListObject["SetupAttempt"]: """ Returns a list of SetupAttempts that associate with a provided SetupIntent. @@ -911,7 +858,7 @@ def list( @classmethod async def list_async( - cls, **params: Unpack["SetupAttempt.ListParams"] + cls, **params: Unpack["SetupAttemptListParams"] ) -> ListObject["SetupAttempt"]: """ Returns a list of SetupAttempts that associate with a provided SetupIntent. diff --git a/stripe/_setup_attempt_service.py b/stripe/_setup_attempt_service.py index 1b8aa0154..328957a4b 100644 --- a/stripe/_setup_attempt_service.py +++ b/stripe/_setup_attempt_service.py @@ -4,61 +4,17 @@ from stripe._request_options import RequestOptions from stripe._setup_attempt import SetupAttempt from stripe._stripe_service import StripeService -from typing import List, Optional, cast -from typing_extensions import NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params._setup_attempt_list_params import SetupAttemptListParams -class SetupAttemptService(StripeService): - class ListParams(TypedDict): - created: NotRequired["SetupAttemptService.ListParamsCreated|int"] - """ - A filter on the list, based on the object `created` field. The value - can be a string with an integer Unix timestamp or 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. - """ - setup_intent: str - """ - Only return SetupAttempts created by the SetupIntent specified by - this ID. - """ - 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 ListParamsCreated(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) - """ +class SetupAttemptService(StripeService): def list( self, - params: "SetupAttemptService.ListParams", + params: "SetupAttemptListParams", options: Optional[RequestOptions] = None, ) -> ListObject[SetupAttempt]: """ @@ -77,7 +33,7 @@ def list( async def list_async( self, - params: "SetupAttemptService.ListParams", + params: "SetupAttemptListParams", options: Optional[RequestOptions] = None, ) -> ListObject[SetupAttempt]: """ diff --git a/stripe/_setup_intent.py b/stripe/_setup_intent.py index 435cb9a2c..240858a62 100644 --- a/stripe/_setup_intent.py +++ b/stripe/_setup_intent.py @@ -4,18 +4,11 @@ from stripe._expandable_field import ExpandableField from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource -from stripe._request_options import RequestOptions from stripe._stripe_object import StripeObject from stripe._updateable_api_resource import UpdateableAPIResource from stripe._util import class_method_variant, sanitize_id from typing import Any, ClassVar, Dict, List, Optional, Union, cast, overload -from typing_extensions import ( - Literal, - NotRequired, - TypedDict, - Unpack, - TYPE_CHECKING, -) +from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: from stripe._account import Account @@ -28,6 +21,25 @@ from stripe._payment_method import PaymentMethod from stripe._setup_attempt import SetupAttempt from stripe._source import Source + from stripe.params._setup_intent_cancel_params import ( + SetupIntentCancelParams, + ) + from stripe.params._setup_intent_confirm_params import ( + SetupIntentConfirmParams, + ) + from stripe.params._setup_intent_create_params import ( + SetupIntentCreateParams, + ) + from stripe.params._setup_intent_list_params import SetupIntentListParams + from stripe.params._setup_intent_modify_params import ( + SetupIntentModifyParams, + ) + from stripe.params._setup_intent_retrieve_params import ( + SetupIntentRetrieveParams, + ) + from stripe.params._setup_intent_verify_microdeposits_params import ( + SetupIntentVerifyMicrodepositsParams, + ) class SetupIntent( @@ -847,4963 +859,6 @@ class MandateOptions(StripeObject): "us_bank_account": UsBankAccount, } - class CancelParams(RequestOptions): - cancellation_reason: NotRequired[ - Literal["abandoned", "duplicate", "requested_by_customer"] - ] - """ - Reason for canceling this SetupIntent. Possible values are: `abandoned`, `requested_by_customer`, or `duplicate` - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class ConfirmParams(RequestOptions): - confirmation_token: NotRequired[str] - """ - ID of the ConfirmationToken used to confirm this SetupIntent. - - If the provided ConfirmationToken contains properties that are also being provided in this request, such as `payment_method`, then the values in this request will take precedence. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - mandate_data: NotRequired[ - "Literal['']|SetupIntent.ConfirmParamsMandateData" - ] - payment_method: NotRequired[str] - """ - ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent. - """ - payment_method_data: NotRequired[ - "SetupIntent.ConfirmParamsPaymentMethodData" - ] - """ - When included, this hash creates a PaymentMethod that is set as the [`payment_method`](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-payment_method) - value in the SetupIntent. - """ - payment_method_options: NotRequired[ - "SetupIntent.ConfirmParamsPaymentMethodOptions" - ] - """ - Payment method-specific configuration for this SetupIntent. - """ - return_url: NotRequired[str] - """ - The URL to redirect your customer back to after they authenticate on the payment method's app or site. - If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. - This parameter is only used for cards and other redirect-based payment methods. - """ - use_stripe_sdk: NotRequired[bool] - """ - Set to `true` when confirming server-side and using Stripe.js, iOS, or Android client-side SDKs to handle the next actions. - """ - - class ConfirmParamsMandateData(TypedDict): - customer_acceptance: NotRequired[ - "SetupIntent.ConfirmParamsMandateDataCustomerAcceptance" - ] - """ - This hash contains details about the customer acceptance of the Mandate. - """ - - class ConfirmParamsMandateDataCustomerAcceptance(TypedDict): - accepted_at: NotRequired[int] - """ - The time at which the customer accepted the Mandate. - """ - offline: NotRequired[ - "SetupIntent.ConfirmParamsMandateDataCustomerAcceptanceOffline" - ] - """ - If this is a Mandate accepted offline, this hash contains details about the offline acceptance. - """ - online: NotRequired[ - "SetupIntent.ConfirmParamsMandateDataCustomerAcceptanceOnline" - ] - """ - If this is a Mandate accepted online, this hash contains details about the online acceptance. - """ - type: Literal["offline", "online"] - """ - The type of customer acceptance information included with the Mandate. One of `online` or `offline`. - """ - - class ConfirmParamsMandateDataCustomerAcceptanceOffline(TypedDict): - pass - - class ConfirmParamsMandateDataCustomerAcceptanceOnline(TypedDict): - ip_address: NotRequired[str] - """ - The IP address from which the Mandate was accepted by the customer. - """ - user_agent: NotRequired[str] - """ - The user agent of the browser from which the Mandate was accepted by the customer. - """ - - class ConfirmParamsPaymentMethodData(TypedDict): - acss_debit: NotRequired[ - "SetupIntent.ConfirmParamsPaymentMethodDataAcssDebit" - ] - """ - If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method. - """ - affirm: NotRequired["SetupIntent.ConfirmParamsPaymentMethodDataAffirm"] - """ - If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method. - """ - afterpay_clearpay: NotRequired[ - "SetupIntent.ConfirmParamsPaymentMethodDataAfterpayClearpay" - ] - """ - If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method. - """ - alipay: NotRequired["SetupIntent.ConfirmParamsPaymentMethodDataAlipay"] - """ - If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. - """ - allow_redisplay: NotRequired[ - Literal["always", "limited", "unspecified"] - ] - """ - This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`. - """ - alma: NotRequired["SetupIntent.ConfirmParamsPaymentMethodDataAlma"] - """ - If this is a Alma PaymentMethod, this hash contains details about the Alma payment method. - """ - amazon_pay: NotRequired[ - "SetupIntent.ConfirmParamsPaymentMethodDataAmazonPay" - ] - """ - If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method. - """ - au_becs_debit: NotRequired[ - "SetupIntent.ConfirmParamsPaymentMethodDataAuBecsDebit" - ] - """ - If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. - """ - bacs_debit: NotRequired[ - "SetupIntent.ConfirmParamsPaymentMethodDataBacsDebit" - ] - """ - If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account. - """ - bancontact: NotRequired[ - "SetupIntent.ConfirmParamsPaymentMethodDataBancontact" - ] - """ - If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method. - """ - billie: NotRequired["SetupIntent.ConfirmParamsPaymentMethodDataBillie"] - """ - If this is a `billie` PaymentMethod, this hash contains details about the Billie payment method. - """ - billing_details: NotRequired[ - "SetupIntent.ConfirmParamsPaymentMethodDataBillingDetails" - ] - """ - Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. - """ - blik: NotRequired["SetupIntent.ConfirmParamsPaymentMethodDataBlik"] - """ - If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method. - """ - boleto: NotRequired["SetupIntent.ConfirmParamsPaymentMethodDataBoleto"] - """ - If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method. - """ - cashapp: NotRequired[ - "SetupIntent.ConfirmParamsPaymentMethodDataCashapp" - ] - """ - If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. - """ - crypto: NotRequired["SetupIntent.ConfirmParamsPaymentMethodDataCrypto"] - """ - If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment method. - """ - customer_balance: NotRequired[ - "SetupIntent.ConfirmParamsPaymentMethodDataCustomerBalance" - ] - """ - If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. - """ - eps: NotRequired["SetupIntent.ConfirmParamsPaymentMethodDataEps"] - """ - If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. - """ - fpx: NotRequired["SetupIntent.ConfirmParamsPaymentMethodDataFpx"] - """ - If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method. - """ - giropay: NotRequired[ - "SetupIntent.ConfirmParamsPaymentMethodDataGiropay" - ] - """ - If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method. - """ - gopay: NotRequired["SetupIntent.ConfirmParamsPaymentMethodDataGopay"] - """ - If this is a Gopay PaymentMethod, this hash contains details about the Gopay payment method. - """ - grabpay: NotRequired[ - "SetupIntent.ConfirmParamsPaymentMethodDataGrabpay" - ] - """ - If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method. - """ - id_bank_transfer: NotRequired[ - "SetupIntent.ConfirmParamsPaymentMethodDataIdBankTransfer" - ] - """ - If this is an `IdBankTransfer` PaymentMethod, this hash contains details about the IdBankTransfer payment method. - """ - ideal: NotRequired["SetupIntent.ConfirmParamsPaymentMethodDataIdeal"] - """ - If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. - """ - interac_present: NotRequired[ - "SetupIntent.ConfirmParamsPaymentMethodDataInteracPresent" - ] - """ - If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. - """ - kakao_pay: NotRequired[ - "SetupIntent.ConfirmParamsPaymentMethodDataKakaoPay" - ] - """ - If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method. - """ - klarna: NotRequired["SetupIntent.ConfirmParamsPaymentMethodDataKlarna"] - """ - If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method. - """ - konbini: NotRequired[ - "SetupIntent.ConfirmParamsPaymentMethodDataKonbini" - ] - """ - If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. - """ - kr_card: NotRequired[ - "SetupIntent.ConfirmParamsPaymentMethodDataKrCard" - ] - """ - If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method. - """ - link: NotRequired["SetupIntent.ConfirmParamsPaymentMethodDataLink"] - """ - If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. - """ - mb_way: NotRequired["SetupIntent.ConfirmParamsPaymentMethodDataMbWay"] - """ - If this is a MB WAY PaymentMethod, this hash contains details about the MB WAY payment method. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - mobilepay: NotRequired[ - "SetupIntent.ConfirmParamsPaymentMethodDataMobilepay" - ] - """ - If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method. - """ - multibanco: NotRequired[ - "SetupIntent.ConfirmParamsPaymentMethodDataMultibanco" - ] - """ - If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method. - """ - naver_pay: NotRequired[ - "SetupIntent.ConfirmParamsPaymentMethodDataNaverPay" - ] - """ - If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method. - """ - nz_bank_account: NotRequired[ - "SetupIntent.ConfirmParamsPaymentMethodDataNzBankAccount" - ] - """ - If this is an nz_bank_account PaymentMethod, this hash contains details about the nz_bank_account payment method. - """ - oxxo: NotRequired["SetupIntent.ConfirmParamsPaymentMethodDataOxxo"] - """ - If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. - """ - p24: NotRequired["SetupIntent.ConfirmParamsPaymentMethodDataP24"] - """ - If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. - """ - pay_by_bank: NotRequired[ - "SetupIntent.ConfirmParamsPaymentMethodDataPayByBank" - ] - """ - If this is a `pay_by_bank` PaymentMethod, this hash contains details about the PayByBank payment method. - """ - payco: NotRequired["SetupIntent.ConfirmParamsPaymentMethodDataPayco"] - """ - If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method. - """ - paynow: NotRequired["SetupIntent.ConfirmParamsPaymentMethodDataPaynow"] - """ - If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method. - """ - paypal: NotRequired["SetupIntent.ConfirmParamsPaymentMethodDataPaypal"] - """ - If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method. - """ - paypay: NotRequired["SetupIntent.ConfirmParamsPaymentMethodDataPaypay"] - """ - If this is a `paypay` PaymentMethod, this hash contains details about the PayPay payment method. - """ - payto: NotRequired["SetupIntent.ConfirmParamsPaymentMethodDataPayto"] - """ - If this is a `payto` PaymentMethod, this hash contains details about the PayTo payment method. - """ - pix: NotRequired["SetupIntent.ConfirmParamsPaymentMethodDataPix"] - """ - If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method. - """ - promptpay: NotRequired[ - "SetupIntent.ConfirmParamsPaymentMethodDataPromptpay" - ] - """ - If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method. - """ - qris: NotRequired["SetupIntent.ConfirmParamsPaymentMethodDataQris"] - """ - If this is a `qris` PaymentMethod, this hash contains details about the QRIS payment method. - """ - radar_options: NotRequired[ - "SetupIntent.ConfirmParamsPaymentMethodDataRadarOptions" - ] - """ - Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. - """ - rechnung: NotRequired[ - "SetupIntent.ConfirmParamsPaymentMethodDataRechnung" - ] - """ - If this is a `rechnung` PaymentMethod, this hash contains details about the Rechnung payment method. - """ - revolut_pay: NotRequired[ - "SetupIntent.ConfirmParamsPaymentMethodDataRevolutPay" - ] - """ - If this is a `revolut_pay` PaymentMethod, this hash contains details about the Revolut Pay payment method. - """ - samsung_pay: NotRequired[ - "SetupIntent.ConfirmParamsPaymentMethodDataSamsungPay" - ] - """ - If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method. - """ - satispay: NotRequired[ - "SetupIntent.ConfirmParamsPaymentMethodDataSatispay" - ] - """ - If this is a `satispay` PaymentMethod, this hash contains details about the Satispay payment method. - """ - sepa_debit: NotRequired[ - "SetupIntent.ConfirmParamsPaymentMethodDataSepaDebit" - ] - """ - If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. - """ - shopeepay: NotRequired[ - "SetupIntent.ConfirmParamsPaymentMethodDataShopeepay" - ] - """ - If this is a Shopeepay PaymentMethod, this hash contains details about the Shopeepay payment method. - """ - sofort: NotRequired["SetupIntent.ConfirmParamsPaymentMethodDataSofort"] - """ - If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. - """ - stripe_balance: NotRequired[ - "SetupIntent.ConfirmParamsPaymentMethodDataStripeBalance" - ] - """ - This hash contains details about the Stripe balance payment method. - """ - swish: NotRequired["SetupIntent.ConfirmParamsPaymentMethodDataSwish"] - """ - If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method. - """ - twint: NotRequired["SetupIntent.ConfirmParamsPaymentMethodDataTwint"] - """ - If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method. - """ - type: Literal[ - "acss_debit", - "affirm", - "afterpay_clearpay", - "alipay", - "alma", - "amazon_pay", - "au_becs_debit", - "bacs_debit", - "bancontact", - "billie", - "blik", - "boleto", - "cashapp", - "crypto", - "customer_balance", - "eps", - "fpx", - "giropay", - "gopay", - "grabpay", - "id_bank_transfer", - "ideal", - "kakao_pay", - "klarna", - "konbini", - "kr_card", - "link", - "mb_way", - "mobilepay", - "multibanco", - "naver_pay", - "nz_bank_account", - "oxxo", - "p24", - "pay_by_bank", - "payco", - "paynow", - "paypal", - "paypay", - "payto", - "pix", - "promptpay", - "qris", - "rechnung", - "revolut_pay", - "samsung_pay", - "satispay", - "sepa_debit", - "shopeepay", - "sofort", - "stripe_balance", - "swish", - "twint", - "us_bank_account", - "wechat_pay", - "zip", - ] - """ - The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. - """ - us_bank_account: NotRequired[ - "SetupIntent.ConfirmParamsPaymentMethodDataUsBankAccount" - ] - """ - If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. - """ - wechat_pay: NotRequired[ - "SetupIntent.ConfirmParamsPaymentMethodDataWechatPay" - ] - """ - If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method. - """ - zip: NotRequired["SetupIntent.ConfirmParamsPaymentMethodDataZip"] - """ - If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method. - """ - - class ConfirmParamsPaymentMethodDataAcssDebit(TypedDict): - account_number: str - """ - Customer's bank account number. - """ - institution_number: str - """ - Institution number of the customer's bank. - """ - transit_number: str - """ - Transit number of the customer's bank. - """ - - class ConfirmParamsPaymentMethodDataAffirm(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataAfterpayClearpay(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataAlipay(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataAlma(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataAmazonPay(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataAuBecsDebit(TypedDict): - account_number: str - """ - The account number for the bank account. - """ - bsb_number: str - """ - Bank-State-Branch number of the bank account. - """ - - class ConfirmParamsPaymentMethodDataBacsDebit(TypedDict): - account_number: NotRequired[str] - """ - Account number of the bank account that the funds will be debited from. - """ - sort_code: NotRequired[str] - """ - Sort code of the bank account. (e.g., `10-20-30`) - """ - - class ConfirmParamsPaymentMethodDataBancontact(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataBillie(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataBillingDetails(TypedDict): - address: NotRequired[ - "Literal['']|SetupIntent.ConfirmParamsPaymentMethodDataBillingDetailsAddress" - ] - """ - Billing address. - """ - email: NotRequired["Literal['']|str"] - """ - Email address. - """ - name: NotRequired["Literal['']|str"] - """ - Full name. - """ - phone: NotRequired["Literal['']|str"] - """ - Billing phone number (including extension). - """ - tax_id: NotRequired[str] - """ - Taxpayer identification number. Used only for transactions between LATAM buyers and non-LATAM sellers. - """ - - class ConfirmParamsPaymentMethodDataBillingDetailsAddress(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. - """ - - class ConfirmParamsPaymentMethodDataBlik(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataBoleto(TypedDict): - tax_id: str - """ - The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers) - """ - - class ConfirmParamsPaymentMethodDataCashapp(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataCrypto(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataCustomerBalance(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataEps(TypedDict): - bank: NotRequired[ - Literal[ - "arzte_und_apotheker_bank", - "austrian_anadi_bank_ag", - "bank_austria", - "bankhaus_carl_spangler", - "bankhaus_schelhammer_und_schattera_ag", - "bawag_psk_ag", - "bks_bank_ag", - "brull_kallmus_bank_ag", - "btv_vier_lander_bank", - "capital_bank_grawe_gruppe_ag", - "deutsche_bank_ag", - "dolomitenbank", - "easybank_ag", - "erste_bank_und_sparkassen", - "hypo_alpeadriabank_international_ag", - "hypo_bank_burgenland_aktiengesellschaft", - "hypo_noe_lb_fur_niederosterreich_u_wien", - "hypo_oberosterreich_salzburg_steiermark", - "hypo_tirol_bank_ag", - "hypo_vorarlberg_bank_ag", - "marchfelder_bank", - "oberbank_ag", - "raiffeisen_bankengruppe_osterreich", - "schoellerbank_ag", - "sparda_bank_wien", - "volksbank_gruppe", - "volkskreditbank_ag", - "vr_bank_braunau", - ] - ] - """ - The customer's bank. - """ - - class ConfirmParamsPaymentMethodDataFpx(TypedDict): - account_holder_type: NotRequired[Literal["company", "individual"]] - """ - Account holder type for FPX transaction - """ - bank: Literal[ - "affin_bank", - "agrobank", - "alliance_bank", - "ambank", - "bank_islam", - "bank_muamalat", - "bank_of_china", - "bank_rakyat", - "bsn", - "cimb", - "deutsche_bank", - "hong_leong_bank", - "hsbc", - "kfh", - "maybank2e", - "maybank2u", - "ocbc", - "pb_enterprise", - "public_bank", - "rhb", - "standard_chartered", - "uob", - ] - """ - The customer's bank. - """ - - class ConfirmParamsPaymentMethodDataGiropay(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataGopay(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataGrabpay(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataIdBankTransfer(TypedDict): - bank: NotRequired[Literal["bca", "bni", "bri", "cimb", "permata"]] - """ - Bank where the account is held. - """ - - class ConfirmParamsPaymentMethodDataIdeal(TypedDict): - bank: NotRequired[ - Literal[ - "abn_amro", - "asn_bank", - "bunq", - "buut", - "handelsbanken", - "ing", - "knab", - "moneyou", - "n26", - "nn", - "rabobank", - "regiobank", - "revolut", - "sns_bank", - "triodos_bank", - "van_lanschot", - "yoursafe", - ] - ] - """ - The customer's bank. Only use this parameter for existing customers. Don't use it for new customers. - """ - - class ConfirmParamsPaymentMethodDataInteracPresent(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataKakaoPay(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataKlarna(TypedDict): - dob: NotRequired["SetupIntent.ConfirmParamsPaymentMethodDataKlarnaDob"] - """ - Customer's date of birth - """ - - class ConfirmParamsPaymentMethodDataKlarnaDob(TypedDict): - day: int - """ - The day of birth, between 1 and 31. - """ - month: int - """ - The month of birth, between 1 and 12. - """ - year: int - """ - The four-digit year of birth. - """ - - class ConfirmParamsPaymentMethodDataKonbini(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataKrCard(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataLink(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataMbWay(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataMobilepay(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataMultibanco(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataNaverPay(TypedDict): - funding: NotRequired[Literal["card", "points"]] - """ - Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`. - """ - - class ConfirmParamsPaymentMethodDataNzBankAccount(TypedDict): - account_holder_name: NotRequired[str] - """ - The name on the bank account. Only required if the account holder name is different from the name of the authorized signatory collected in the PaymentMethod's billing details. - """ - account_number: str - """ - The account number for the bank account. - """ - bank_code: str - """ - The numeric code for the bank account's bank. - """ - branch_code: str - """ - The numeric code for the bank account's bank branch. - """ - reference: NotRequired[str] - suffix: str - """ - The suffix of the bank account number. - """ - - class ConfirmParamsPaymentMethodDataOxxo(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataP24(TypedDict): - bank: NotRequired[ - Literal[ - "alior_bank", - "bank_millennium", - "bank_nowy_bfg_sa", - "bank_pekao_sa", - "banki_spbdzielcze", - "blik", - "bnp_paribas", - "boz", - "citi_handlowy", - "credit_agricole", - "envelobank", - "etransfer_pocztowy24", - "getin_bank", - "ideabank", - "ing", - "inteligo", - "mbank_mtransfer", - "nest_przelew", - "noble_pay", - "pbac_z_ipko", - "plus_bank", - "santander_przelew24", - "tmobile_usbugi_bankowe", - "toyota_bank", - "velobank", - "volkswagen_bank", - ] - ] - """ - The customer's bank. - """ - - class ConfirmParamsPaymentMethodDataPayByBank(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataPayco(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataPaynow(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataPaypal(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataPaypay(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataPayto(TypedDict): - account_number: NotRequired[str] - """ - The account number for the bank account. - """ - bsb_number: NotRequired[str] - """ - Bank-State-Branch number of the bank account. - """ - pay_id: NotRequired[str] - """ - The PayID alias for the bank account. - """ - - class ConfirmParamsPaymentMethodDataPix(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataPromptpay(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataQris(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataRadarOptions(TypedDict): - session: NotRequired[str] - """ - A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. - """ - - class ConfirmParamsPaymentMethodDataRechnung(TypedDict): - dob: "SetupIntent.ConfirmParamsPaymentMethodDataRechnungDob" - """ - Customer's date of birth - """ - - class ConfirmParamsPaymentMethodDataRechnungDob(TypedDict): - day: int - """ - The day of birth, between 1 and 31. - """ - month: int - """ - The month of birth, between 1 and 12. - """ - year: int - """ - The four-digit year of birth. - """ - - class ConfirmParamsPaymentMethodDataRevolutPay(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataSamsungPay(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataSatispay(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataSepaDebit(TypedDict): - iban: str - """ - IBAN of the bank account. - """ - - class ConfirmParamsPaymentMethodDataShopeepay(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataSofort(TypedDict): - country: Literal["AT", "BE", "DE", "ES", "IT", "NL"] - """ - Two-letter ISO code representing the country the bank account is located in. - """ - - class ConfirmParamsPaymentMethodDataStripeBalance(TypedDict): - account: NotRequired[str] - """ - The connected account ID whose Stripe balance to use as the source of payment - """ - source_type: NotRequired[Literal["bank_account", "card", "fpx"]] - """ - The [source_type](https://docs.stripe.com/api/balance/balance_object#balance_object-available-source_types) of the balance - """ - - class ConfirmParamsPaymentMethodDataSwish(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataTwint(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataUsBankAccount(TypedDict): - account_holder_type: NotRequired[Literal["company", "individual"]] - """ - Account holder type: individual or company. - """ - account_number: NotRequired[str] - """ - Account number of the bank account. - """ - account_type: NotRequired[Literal["checking", "savings"]] - """ - Account type: checkings or savings. Defaults to checking if omitted. - """ - financial_connections_account: NotRequired[str] - """ - The ID of a Financial Connections Account to use as a payment method. - """ - routing_number: NotRequired[str] - """ - Routing number of the bank account. - """ - - class ConfirmParamsPaymentMethodDataWechatPay(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataZip(TypedDict): - pass - - class ConfirmParamsPaymentMethodOptions(TypedDict): - acss_debit: NotRequired[ - "SetupIntent.ConfirmParamsPaymentMethodOptionsAcssDebit" - ] - """ - If this is a `acss_debit` SetupIntent, this sub-hash contains details about the ACSS Debit payment method options. - """ - amazon_pay: NotRequired[ - "SetupIntent.ConfirmParamsPaymentMethodOptionsAmazonPay" - ] - """ - If this is a `amazon_pay` SetupIntent, this sub-hash contains details about the AmazonPay payment method options. - """ - bacs_debit: NotRequired[ - "SetupIntent.ConfirmParamsPaymentMethodOptionsBacsDebit" - ] - """ - If this is a `bacs_debit` SetupIntent, this sub-hash contains details about the Bacs Debit payment method options. - """ - card: NotRequired["SetupIntent.ConfirmParamsPaymentMethodOptionsCard"] - """ - Configuration for any card setup attempted on this SetupIntent. - """ - card_present: NotRequired[ - "SetupIntent.ConfirmParamsPaymentMethodOptionsCardPresent" - ] - """ - If this is a `card_present` PaymentMethod, this sub-hash contains details about the card-present payment method options. - """ - klarna: NotRequired[ - "SetupIntent.ConfirmParamsPaymentMethodOptionsKlarna" - ] - """ - If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method options. - """ - link: NotRequired["SetupIntent.ConfirmParamsPaymentMethodOptionsLink"] - """ - If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options. - """ - paypal: NotRequired[ - "SetupIntent.ConfirmParamsPaymentMethodOptionsPaypal" - ] - """ - If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options. - """ - payto: NotRequired[ - "SetupIntent.ConfirmParamsPaymentMethodOptionsPayto" - ] - """ - If this is a `payto` SetupIntent, this sub-hash contains details about the PayTo payment method options. - """ - pix: NotRequired["SetupIntent.ConfirmParamsPaymentMethodOptionsPix"] - """ - If this is a `pix` SetupIntent, this sub-hash contains details about the Pix payment method options. - """ - sepa_debit: NotRequired[ - "SetupIntent.ConfirmParamsPaymentMethodOptionsSepaDebit" - ] - """ - If this is a `sepa_debit` SetupIntent, this sub-hash contains details about the SEPA Debit payment method options. - """ - us_bank_account: NotRequired[ - "SetupIntent.ConfirmParamsPaymentMethodOptionsUsBankAccount" - ] - """ - If this is a `us_bank_account` SetupIntent, this sub-hash contains details about the US bank account payment method options. - """ - - class ConfirmParamsPaymentMethodOptionsAcssDebit(TypedDict): - currency: NotRequired[Literal["cad", "usd"]] - """ - 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). - """ - mandate_options: NotRequired[ - "SetupIntent.ConfirmParamsPaymentMethodOptionsAcssDebitMandateOptions" - ] - """ - Additional fields for Mandate creation - """ - verification_method: NotRequired[ - Literal["automatic", "instant", "microdeposits"] - ] - """ - Bank account verification method. - """ - - class ConfirmParamsPaymentMethodOptionsAcssDebitMandateOptions(TypedDict): - custom_mandate_url: NotRequired["Literal['']|str"] - """ - A URL for custom mandate text to render during confirmation step. - The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent, - or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent. - """ - default_for: NotRequired[List[Literal["invoice", "subscription"]]] - """ - List of Stripe products where this mandate can be selected automatically. - """ - interval_description: NotRequired[str] - """ - Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'. - """ - payment_schedule: NotRequired[ - Literal["combined", "interval", "sporadic"] - ] - """ - Payment schedule for the mandate. - """ - transaction_type: NotRequired[Literal["business", "personal"]] - """ - Transaction type of the mandate. - """ - - class ConfirmParamsPaymentMethodOptionsAmazonPay(TypedDict): - pass - - class ConfirmParamsPaymentMethodOptionsBacsDebit(TypedDict): - mandate_options: NotRequired[ - "SetupIntent.ConfirmParamsPaymentMethodOptionsBacsDebitMandateOptions" - ] - """ - Additional fields for Mandate creation - """ - - class ConfirmParamsPaymentMethodOptionsBacsDebitMandateOptions(TypedDict): - reference_prefix: NotRequired["Literal['']|str"] - """ - Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'. - """ - - class ConfirmParamsPaymentMethodOptionsCard(TypedDict): - mandate_options: NotRequired[ - "SetupIntent.ConfirmParamsPaymentMethodOptionsCardMandateOptions" - ] - """ - Configuration options for setting up an eMandate for cards issued in India. - """ - moto: NotRequired[bool] - """ - When specified, this parameter signals that a card has been collected - as MOTO (Mail Order Telephone Order) and thus out of scope for SCA. This - parameter can only be provided during confirmation. - """ - network: NotRequired[ - Literal[ - "amex", - "cartes_bancaires", - "diners", - "discover", - "eftpos_au", - "girocard", - "interac", - "jcb", - "link", - "mastercard", - "unionpay", - "unknown", - "visa", - ] - ] - """ - Selected network to process this SetupIntent on. Depends on the available networks of the card attached to the SetupIntent. Can be only set confirm-time. - """ - request_three_d_secure: NotRequired[ - Literal["any", "automatic", "challenge"] - ] - """ - We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. - """ - three_d_secure: NotRequired[ - "SetupIntent.ConfirmParamsPaymentMethodOptionsCardThreeDSecure" - ] - """ - If 3D Secure authentication was performed with a third-party provider, - the authentication details to use for this setup. - """ - - class ConfirmParamsPaymentMethodOptionsCardMandateOptions(TypedDict): - amount: int - """ - Amount to be charged for future payments. - """ - amount_type: Literal["fixed", "maximum"] - """ - One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. - """ - currency: str - """ - Currency in which future payments will be charged. 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). - """ - description: NotRequired[str] - """ - A description of the mandate or subscription that is meant to be displayed to the customer. - """ - end_date: NotRequired[int] - """ - End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. - """ - interval: Literal["day", "month", "sporadic", "week", "year"] - """ - Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`. - """ - interval_count: NotRequired[int] - """ - The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`. - """ - reference: str - """ - Unique identifier for the mandate or subscription. - """ - start_date: int - """ - Start date of the mandate or subscription. Start date should not be lesser than yesterday. - """ - supported_types: NotRequired[List[Literal["india"]]] - """ - Specifies the type of mandates supported. Possible values are `india`. - """ - - class ConfirmParamsPaymentMethodOptionsCardPresent(TypedDict): - pass - - class ConfirmParamsPaymentMethodOptionsCardThreeDSecure(TypedDict): - ares_trans_status: NotRequired[ - Literal["A", "C", "I", "N", "R", "U", "Y"] - ] - """ - The `transStatus` returned from the card Issuer's ACS in the ARes. - """ - cryptogram: NotRequired[str] - """ - The cryptogram, also known as the "authentication value" (AAV, CAVV or - AEVV). This value is 20 bytes, base64-encoded into a 28-character string. - (Most 3D Secure providers will return the base64-encoded version, which - is what you should specify here.) - """ - electronic_commerce_indicator: NotRequired[ - Literal["01", "02", "05", "06", "07"] - ] - """ - The Electronic Commerce Indicator (ECI) is returned by your 3D Secure - provider and indicates what degree of authentication was performed. - """ - network_options: NotRequired[ - "SetupIntent.ConfirmParamsPaymentMethodOptionsCardThreeDSecureNetworkOptions" - ] - """ - Network specific 3DS fields. Network specific arguments require an - explicit card brand choice. The parameter `payment_method_options.card.network`` - must be populated accordingly - """ - requestor_challenge_indicator: NotRequired[str] - """ - The challenge indicator (`threeDSRequestorChallengeInd`) which was requested in the - AReq sent to the card Issuer's ACS. A string containing 2 digits from 01-99. - """ - transaction_id: NotRequired[str] - """ - For 3D Secure 1, the XID. For 3D Secure 2, the Directory Server - Transaction ID (dsTransID). - """ - version: NotRequired[Literal["1.0.2", "2.1.0", "2.2.0"]] - """ - The version of 3D Secure that was performed. - """ - - class ConfirmParamsPaymentMethodOptionsCardThreeDSecureNetworkOptions( - TypedDict, - ): - cartes_bancaires: NotRequired[ - "SetupIntent.ConfirmParamsPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancaires" - ] - """ - Cartes Bancaires-specific 3DS fields. - """ - - class ConfirmParamsPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancaires( - TypedDict, - ): - cb_avalgo: Literal["0", "1", "2", "3", "4", "A"] - """ - The cryptogram calculation algorithm used by the card Issuer's ACS - to calculate the Authentication cryptogram. Also known as `cavvAlgorithm`. - messageExtension: CB-AVALGO - """ - cb_exemption: NotRequired[str] - """ - The exemption indicator returned from Cartes Bancaires in the ARes. - message extension: CB-EXEMPTION; string (4 characters) - This is a 3 byte bitmap (low significant byte first and most significant - bit first) that has been Base64 encoded - """ - cb_score: NotRequired[int] - """ - The risk score returned from Cartes Bancaires in the ARes. - message extension: CB-SCORE; numeric value 0-99 - """ - - class ConfirmParamsPaymentMethodOptionsKlarna(TypedDict): - currency: NotRequired[str] - """ - The currency of the SetupIntent. Three letter ISO currency code. - """ - on_demand: NotRequired[ - "SetupIntent.ConfirmParamsPaymentMethodOptionsKlarnaOnDemand" - ] - """ - On-demand details if setting up a payment method for on-demand payments. - """ - preferred_locale: NotRequired[ - Literal[ - "cs-CZ", - "da-DK", - "de-AT", - "de-CH", - "de-DE", - "el-GR", - "en-AT", - "en-AU", - "en-BE", - "en-CA", - "en-CH", - "en-CZ", - "en-DE", - "en-DK", - "en-ES", - "en-FI", - "en-FR", - "en-GB", - "en-GR", - "en-IE", - "en-IT", - "en-NL", - "en-NO", - "en-NZ", - "en-PL", - "en-PT", - "en-RO", - "en-SE", - "en-US", - "es-ES", - "es-US", - "fi-FI", - "fr-BE", - "fr-CA", - "fr-CH", - "fr-FR", - "it-CH", - "it-IT", - "nb-NO", - "nl-BE", - "nl-NL", - "pl-PL", - "pt-PT", - "ro-RO", - "sv-FI", - "sv-SE", - ] - ] - """ - Preferred language of the Klarna authorization page that the customer is redirected to - """ - subscriptions: NotRequired[ - "Literal['']|List[SetupIntent.ConfirmParamsPaymentMethodOptionsKlarnaSubscription]" - ] - """ - Subscription details if setting up or charging a subscription - """ - - class ConfirmParamsPaymentMethodOptionsKlarnaOnDemand(TypedDict): - average_amount: NotRequired[int] - """ - Your average amount value. You can use a value across your customer base, or segment based on customer type, country, etc. - """ - maximum_amount: NotRequired[int] - """ - The maximum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. - """ - minimum_amount: NotRequired[int] - """ - The lowest or minimum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. - """ - purchase_interval: NotRequired[Literal["day", "month", "week", "year"]] - """ - Interval at which the customer is making purchases - """ - purchase_interval_count: NotRequired[int] - """ - The number of `purchase_interval` between charges - """ - - class ConfirmParamsPaymentMethodOptionsKlarnaSubscription(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Unit of time between subscription charges. - """ - interval_count: NotRequired[int] - """ - The number of intervals (specified in the `interval` attribute) between subscription charges. For example, `interval=month` and `interval_count=3` charges every 3 months. - """ - name: NotRequired[str] - """ - Name for subscription. - """ - next_billing: "SetupIntent.ConfirmParamsPaymentMethodOptionsKlarnaSubscriptionNextBilling" - """ - Describes the upcoming charge for this subscription. - """ - reference: str - """ - A non-customer-facing reference to correlate subscription charges in the Klarna app. Use a value that persists across subscription charges. - """ - - class ConfirmParamsPaymentMethodOptionsKlarnaSubscriptionNextBilling( - TypedDict, - ): - amount: int - """ - The amount of the next charge for the subscription. - """ - date: str - """ - The date of the next charge for the subscription in YYYY-MM-DD format. - """ - - class ConfirmParamsPaymentMethodOptionsLink(TypedDict): - persistent_token: NotRequired[str] - """ - [Deprecated] This is a legacy parameter that no longer has any function. - """ - - class ConfirmParamsPaymentMethodOptionsPaypal(TypedDict): - billing_agreement_id: NotRequired[str] - """ - The PayPal Billing Agreement ID (BAID). This is an ID generated by PayPal which represents the mandate between the merchant and the customer. - """ - currency: NotRequired[str] - subsellers: NotRequired[List[str]] - """ - The Stripe connected account IDs of the sellers on the platform for this transaction (optional). Only allowed when [separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) are used. - """ - - class ConfirmParamsPaymentMethodOptionsPayto(TypedDict): - mandate_options: NotRequired[ - "SetupIntent.ConfirmParamsPaymentMethodOptionsPaytoMandateOptions" - ] - """ - Additional fields for Mandate creation. - """ - - class ConfirmParamsPaymentMethodOptionsPaytoMandateOptions(TypedDict): - amount: NotRequired[int] - """ - Amount that will be collected. It is required when `amount_type` is `fixed`. - """ - amount_type: NotRequired[Literal["fixed", "maximum"]] - """ - The type of amount that will be collected. The amount charged must be exact or up to the value of `amount` param for `fixed` or `maximum` type respectively. - """ - end_date: NotRequired[str] - """ - Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no end date. - """ - payment_schedule: NotRequired[ - Literal[ - "adhoc", - "annual", - "daily", - "fortnightly", - "monthly", - "quarterly", - "semi_annual", - "weekly", - ] - ] - """ - The periodicity at which payments will be collected. - """ - payments_per_period: NotRequired[int] - """ - The number of payments that will be made during a payment period. Defaults to 1 except for when `payment_schedule` is `adhoc`. In that case, it defaults to no limit. - """ - purpose: NotRequired[ - Literal[ - "dependant_support", - "government", - "loan", - "mortgage", - "other", - "pension", - "personal", - "retail", - "salary", - "tax", - "utility", - ] - ] - """ - The purpose for which payments are made. Defaults to retail. - """ - start_date: NotRequired[str] - """ - Date, in YYYY-MM-DD format, from which payments will be collected. Defaults to confirmation time. - """ - - class ConfirmParamsPaymentMethodOptionsPix(TypedDict): - mandate_options: NotRequired[ - "SetupIntent.ConfirmParamsPaymentMethodOptionsPixMandateOptions" - ] - """ - Additional fields for mandate creation. - """ - - class ConfirmParamsPaymentMethodOptionsPixMandateOptions(TypedDict): - amount: NotRequired[int] - """ - Amount to be charged for future payments. Required when `amount_type=fixed`. If not provided for `amount_type=maximum`, defaults to 40000. - """ - amount_includes_iof: NotRequired[Literal["always", "never"]] - """ - Determines if the amount includes the IOF tax. Defaults to `never`. - """ - amount_type: NotRequired[Literal["fixed", "maximum"]] - """ - Type of amount. Defaults to `maximum`. - """ - currency: NotRequired[str] - """ - Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Only `brl` is supported currently. - """ - end_date: NotRequired[str] - """ - Date when the mandate expires and no further payments will be charged, in `YYYY-MM-DD`. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. - """ - payment_schedule: NotRequired[ - Literal["halfyearly", "monthly", "quarterly", "weekly", "yearly"] - ] - """ - Schedule at which the future payments will be charged. Defaults to `weekly`. - """ - reference: NotRequired[str] - """ - Subscription name displayed to buyers in their bank app. Defaults to the displayable business name. - """ - start_date: NotRequired[str] - """ - Start date of the mandate, in `YYYY-MM-DD`. Start date should be at least 3 days in the future. Defaults to 3 days after the current date. - """ - - class ConfirmParamsPaymentMethodOptionsSepaDebit(TypedDict): - mandate_options: NotRequired[ - "SetupIntent.ConfirmParamsPaymentMethodOptionsSepaDebitMandateOptions" - ] - """ - Additional fields for Mandate creation - """ - - class ConfirmParamsPaymentMethodOptionsSepaDebitMandateOptions(TypedDict): - reference_prefix: NotRequired["Literal['']|str"] - """ - Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'. - """ - - class ConfirmParamsPaymentMethodOptionsUsBankAccount(TypedDict): - financial_connections: NotRequired[ - "SetupIntent.ConfirmParamsPaymentMethodOptionsUsBankAccountFinancialConnections" - ] - """ - Additional fields for Financial Connections Session creation - """ - mandate_options: NotRequired[ - "SetupIntent.ConfirmParamsPaymentMethodOptionsUsBankAccountMandateOptions" - ] - """ - Additional fields for Mandate creation - """ - networks: NotRequired[ - "SetupIntent.ConfirmParamsPaymentMethodOptionsUsBankAccountNetworks" - ] - """ - Additional fields for network related functions - """ - verification_method: NotRequired[ - Literal["automatic", "instant", "microdeposits"] - ] - """ - Bank account verification method. - """ - - class ConfirmParamsPaymentMethodOptionsUsBankAccountFinancialConnections( - TypedDict, - ): - filters: NotRequired[ - "SetupIntent.ConfirmParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters" - ] - """ - Provide filters for the linked accounts that the customer can select for the payment method. - """ - manual_entry: NotRequired[ - "SetupIntent.ConfirmParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsManualEntry" - ] - """ - Customize manual entry behavior - """ - permissions: NotRequired[ - List[ - Literal[ - "balances", "ownership", "payment_method", "transactions" - ] - ] - ] - """ - The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. - """ - prefetch: NotRequired[ - List[ - Literal[ - "balances", - "inferred_balances", - "ownership", - "transactions", - ] - ] - ] - """ - List of data features that you would like to retrieve upon account creation. - """ - return_url: NotRequired[str] - """ - For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. - """ - - class ConfirmParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters( - TypedDict, - ): - account_subcategories: NotRequired[ - List[Literal["checking", "savings"]] - ] - """ - The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`. - """ - institution: NotRequired[str] - """ - ID of the institution to use to filter for selectable accounts. - """ - - class ConfirmParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsManualEntry( - TypedDict, - ): - mode: Literal["automatic", "custom"] - """ - Settings for configuring manual entry of account details. - """ - - class ConfirmParamsPaymentMethodOptionsUsBankAccountMandateOptions( - TypedDict, - ): - collection_method: NotRequired["Literal['']|Literal['paper']"] - """ - The method used to collect offline mandate customer acceptance. - """ - - class ConfirmParamsPaymentMethodOptionsUsBankAccountNetworks(TypedDict): - requested: NotRequired[List[Literal["ach", "us_domestic_wire"]]] - """ - Triggers validations to run across the selected networks - """ - - class CreateParams(RequestOptions): - attach_to_self: NotRequired[bool] - """ - If present, the SetupIntent's payment method will be attached to the in-context Stripe Account. - - It can only be used for this Stripe Account's own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer. - """ - automatic_payment_methods: NotRequired[ - "SetupIntent.CreateParamsAutomaticPaymentMethods" - ] - """ - When you enable this parameter, this SetupIntent accepts payment methods that you enable in the Dashboard and that are compatible with its other parameters. - """ - confirm: NotRequired[bool] - """ - Set to `true` to attempt to confirm this SetupIntent immediately. This parameter defaults to `false`. If a card is the attached payment method, you can provide a `return_url` in case further authentication is necessary. - """ - confirmation_token: NotRequired[str] - """ - ID of the ConfirmationToken used to confirm this SetupIntent. - - If the provided ConfirmationToken contains properties that are also being provided in this request, such as `payment_method`, then the values in this request will take precedence. - """ - customer: NotRequired[str] - """ - ID of the Customer this SetupIntent belongs to, if one exists. - - If present, the SetupIntent's payment method will be attached to the Customer on successful setup. Payment methods attached to other Customers cannot be used with this SetupIntent. - """ - customer_account: NotRequired[str] - """ - ID of the Account this SetupIntent belongs to, if one exists. - - If present, the SetupIntent's payment method will be attached to the Account on successful setup. Payment methods attached to other Accounts cannot be used with this SetupIntent. - """ - description: NotRequired[str] - """ - An arbitrary string attached to the object. Often useful for displaying to users. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - flow_directions: NotRequired[List[Literal["inbound", "outbound"]]] - """ - Indicates the directions of money movement for which this payment method is intended to be used. - - Include `inbound` if you intend to use the payment method as the origin to pull funds from. Include `outbound` if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes. - """ - mandate_data: NotRequired[ - "Literal['']|SetupIntent.CreateParamsMandateData" - ] - """ - This hash contains details about the mandate to create. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/setup_intents/create#create_setup_intent-confirm). - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - on_behalf_of: NotRequired[str] - """ - The Stripe account ID created for this SetupIntent. - """ - payment_method: NotRequired[str] - """ - ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent. - """ - payment_method_configuration: NotRequired[str] - """ - The ID of the [payment method configuration](https://stripe.com/docs/api/payment_method_configurations) to use with this SetupIntent. - """ - payment_method_data: NotRequired[ - "SetupIntent.CreateParamsPaymentMethodData" - ] - """ - When included, this hash creates a PaymentMethod that is set as the [`payment_method`](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-payment_method) - value in the SetupIntent. - """ - payment_method_options: NotRequired[ - "SetupIntent.CreateParamsPaymentMethodOptions" - ] - """ - Payment method-specific configuration for this SetupIntent. - """ - payment_method_types: NotRequired[List[str]] - """ - The list of payment method types (for example, card) that this SetupIntent can use. If you don't provide this, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). A list of valid payment method types can be found [here](https://docs.stripe.com/api/payment_methods/object#payment_method_object-type). - """ - return_url: NotRequired[str] - """ - The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. To redirect to a mobile application, you can alternatively supply an application URI scheme. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/setup_intents/create#create_setup_intent-confirm). - """ - single_use: NotRequired["SetupIntent.CreateParamsSingleUse"] - """ - If you populate this hash, this SetupIntent generates a `single_use` mandate after successful completion. - - Single-use mandates are only valid for the following payment methods: `acss_debit`, `alipay`, `au_becs_debit`, `bacs_debit`, `bancontact`, `boleto`, `ideal`, `link`, `sepa_debit`, and `us_bank_account`. - """ - usage: NotRequired[Literal["off_session", "on_session"]] - """ - Indicates how the payment method is intended to be used in the future. If not provided, this value defaults to `off_session`. - """ - use_stripe_sdk: NotRequired[bool] - """ - Set to `true` when confirming server-side and using Stripe.js, iOS, or Android client-side SDKs to handle the next actions. - """ - - class CreateParamsAutomaticPaymentMethods(TypedDict): - allow_redirects: NotRequired[Literal["always", "never"]] - """ - Controls whether this SetupIntent will accept redirect-based payment methods. - - Redirect-based payment methods may require your customer to be redirected to a payment method's app or site for authentication or additional steps. To [confirm](https://stripe.com/docs/api/setup_intents/confirm) this SetupIntent, you may be required to provide a `return_url` to redirect customers back to your site after they authenticate or complete the setup. - """ - enabled: bool - """ - Whether this feature is enabled. - """ - - class CreateParamsMandateData(TypedDict): - customer_acceptance: ( - "SetupIntent.CreateParamsMandateDataCustomerAcceptance" - ) - """ - This hash contains details about the customer acceptance of the Mandate. - """ - - class CreateParamsMandateDataCustomerAcceptance(TypedDict): - accepted_at: NotRequired[int] - """ - The time at which the customer accepted the Mandate. - """ - offline: NotRequired[ - "SetupIntent.CreateParamsMandateDataCustomerAcceptanceOffline" - ] - """ - If this is a Mandate accepted offline, this hash contains details about the offline acceptance. - """ - online: NotRequired[ - "SetupIntent.CreateParamsMandateDataCustomerAcceptanceOnline" - ] - """ - If this is a Mandate accepted online, this hash contains details about the online acceptance. - """ - type: Literal["offline", "online"] - """ - The type of customer acceptance information included with the Mandate. One of `online` or `offline`. - """ - - class CreateParamsMandateDataCustomerAcceptanceOffline(TypedDict): - pass - - class CreateParamsMandateDataCustomerAcceptanceOnline(TypedDict): - ip_address: str - """ - The IP address from which the Mandate was accepted by the customer. - """ - user_agent: str - """ - The user agent of the browser from which the Mandate was accepted by the customer. - """ - - class CreateParamsPaymentMethodData(TypedDict): - acss_debit: NotRequired[ - "SetupIntent.CreateParamsPaymentMethodDataAcssDebit" - ] - """ - If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method. - """ - affirm: NotRequired["SetupIntent.CreateParamsPaymentMethodDataAffirm"] - """ - If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method. - """ - afterpay_clearpay: NotRequired[ - "SetupIntent.CreateParamsPaymentMethodDataAfterpayClearpay" - ] - """ - If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method. - """ - alipay: NotRequired["SetupIntent.CreateParamsPaymentMethodDataAlipay"] - """ - If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. - """ - allow_redisplay: NotRequired[ - Literal["always", "limited", "unspecified"] - ] - """ - This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`. - """ - alma: NotRequired["SetupIntent.CreateParamsPaymentMethodDataAlma"] - """ - If this is a Alma PaymentMethod, this hash contains details about the Alma payment method. - """ - amazon_pay: NotRequired[ - "SetupIntent.CreateParamsPaymentMethodDataAmazonPay" - ] - """ - If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method. - """ - au_becs_debit: NotRequired[ - "SetupIntent.CreateParamsPaymentMethodDataAuBecsDebit" - ] - """ - If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. - """ - bacs_debit: NotRequired[ - "SetupIntent.CreateParamsPaymentMethodDataBacsDebit" - ] - """ - If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account. - """ - bancontact: NotRequired[ - "SetupIntent.CreateParamsPaymentMethodDataBancontact" - ] - """ - If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method. - """ - billie: NotRequired["SetupIntent.CreateParamsPaymentMethodDataBillie"] - """ - If this is a `billie` PaymentMethod, this hash contains details about the Billie payment method. - """ - billing_details: NotRequired[ - "SetupIntent.CreateParamsPaymentMethodDataBillingDetails" - ] - """ - Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. - """ - blik: NotRequired["SetupIntent.CreateParamsPaymentMethodDataBlik"] - """ - If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method. - """ - boleto: NotRequired["SetupIntent.CreateParamsPaymentMethodDataBoleto"] - """ - If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method. - """ - cashapp: NotRequired[ - "SetupIntent.CreateParamsPaymentMethodDataCashapp" - ] - """ - If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. - """ - crypto: NotRequired["SetupIntent.CreateParamsPaymentMethodDataCrypto"] - """ - If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment method. - """ - customer_balance: NotRequired[ - "SetupIntent.CreateParamsPaymentMethodDataCustomerBalance" - ] - """ - If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. - """ - eps: NotRequired["SetupIntent.CreateParamsPaymentMethodDataEps"] - """ - If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. - """ - fpx: NotRequired["SetupIntent.CreateParamsPaymentMethodDataFpx"] - """ - If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method. - """ - giropay: NotRequired[ - "SetupIntent.CreateParamsPaymentMethodDataGiropay" - ] - """ - If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method. - """ - gopay: NotRequired["SetupIntent.CreateParamsPaymentMethodDataGopay"] - """ - If this is a Gopay PaymentMethod, this hash contains details about the Gopay payment method. - """ - grabpay: NotRequired[ - "SetupIntent.CreateParamsPaymentMethodDataGrabpay" - ] - """ - If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method. - """ - id_bank_transfer: NotRequired[ - "SetupIntent.CreateParamsPaymentMethodDataIdBankTransfer" - ] - """ - If this is an `IdBankTransfer` PaymentMethod, this hash contains details about the IdBankTransfer payment method. - """ - ideal: NotRequired["SetupIntent.CreateParamsPaymentMethodDataIdeal"] - """ - If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. - """ - interac_present: NotRequired[ - "SetupIntent.CreateParamsPaymentMethodDataInteracPresent" - ] - """ - If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. - """ - kakao_pay: NotRequired[ - "SetupIntent.CreateParamsPaymentMethodDataKakaoPay" - ] - """ - If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method. - """ - klarna: NotRequired["SetupIntent.CreateParamsPaymentMethodDataKlarna"] - """ - If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method. - """ - konbini: NotRequired[ - "SetupIntent.CreateParamsPaymentMethodDataKonbini" - ] - """ - If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. - """ - kr_card: NotRequired["SetupIntent.CreateParamsPaymentMethodDataKrCard"] - """ - If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method. - """ - link: NotRequired["SetupIntent.CreateParamsPaymentMethodDataLink"] - """ - If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. - """ - mb_way: NotRequired["SetupIntent.CreateParamsPaymentMethodDataMbWay"] - """ - If this is a MB WAY PaymentMethod, this hash contains details about the MB WAY payment method. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - mobilepay: NotRequired[ - "SetupIntent.CreateParamsPaymentMethodDataMobilepay" - ] - """ - If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method. - """ - multibanco: NotRequired[ - "SetupIntent.CreateParamsPaymentMethodDataMultibanco" - ] - """ - If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method. - """ - naver_pay: NotRequired[ - "SetupIntent.CreateParamsPaymentMethodDataNaverPay" - ] - """ - If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method. - """ - nz_bank_account: NotRequired[ - "SetupIntent.CreateParamsPaymentMethodDataNzBankAccount" - ] - """ - If this is an nz_bank_account PaymentMethod, this hash contains details about the nz_bank_account payment method. - """ - oxxo: NotRequired["SetupIntent.CreateParamsPaymentMethodDataOxxo"] - """ - If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. - """ - p24: NotRequired["SetupIntent.CreateParamsPaymentMethodDataP24"] - """ - If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. - """ - pay_by_bank: NotRequired[ - "SetupIntent.CreateParamsPaymentMethodDataPayByBank" - ] - """ - If this is a `pay_by_bank` PaymentMethod, this hash contains details about the PayByBank payment method. - """ - payco: NotRequired["SetupIntent.CreateParamsPaymentMethodDataPayco"] - """ - If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method. - """ - paynow: NotRequired["SetupIntent.CreateParamsPaymentMethodDataPaynow"] - """ - If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method. - """ - paypal: NotRequired["SetupIntent.CreateParamsPaymentMethodDataPaypal"] - """ - If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method. - """ - paypay: NotRequired["SetupIntent.CreateParamsPaymentMethodDataPaypay"] - """ - If this is a `paypay` PaymentMethod, this hash contains details about the PayPay payment method. - """ - payto: NotRequired["SetupIntent.CreateParamsPaymentMethodDataPayto"] - """ - If this is a `payto` PaymentMethod, this hash contains details about the PayTo payment method. - """ - pix: NotRequired["SetupIntent.CreateParamsPaymentMethodDataPix"] - """ - If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method. - """ - promptpay: NotRequired[ - "SetupIntent.CreateParamsPaymentMethodDataPromptpay" - ] - """ - If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method. - """ - qris: NotRequired["SetupIntent.CreateParamsPaymentMethodDataQris"] - """ - If this is a `qris` PaymentMethod, this hash contains details about the QRIS payment method. - """ - radar_options: NotRequired[ - "SetupIntent.CreateParamsPaymentMethodDataRadarOptions" - ] - """ - Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. - """ - rechnung: NotRequired[ - "SetupIntent.CreateParamsPaymentMethodDataRechnung" - ] - """ - If this is a `rechnung` PaymentMethod, this hash contains details about the Rechnung payment method. - """ - revolut_pay: NotRequired[ - "SetupIntent.CreateParamsPaymentMethodDataRevolutPay" - ] - """ - If this is a `revolut_pay` PaymentMethod, this hash contains details about the Revolut Pay payment method. - """ - samsung_pay: NotRequired[ - "SetupIntent.CreateParamsPaymentMethodDataSamsungPay" - ] - """ - If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method. - """ - satispay: NotRequired[ - "SetupIntent.CreateParamsPaymentMethodDataSatispay" - ] - """ - If this is a `satispay` PaymentMethod, this hash contains details about the Satispay payment method. - """ - sepa_debit: NotRequired[ - "SetupIntent.CreateParamsPaymentMethodDataSepaDebit" - ] - """ - If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. - """ - shopeepay: NotRequired[ - "SetupIntent.CreateParamsPaymentMethodDataShopeepay" - ] - """ - If this is a Shopeepay PaymentMethod, this hash contains details about the Shopeepay payment method. - """ - sofort: NotRequired["SetupIntent.CreateParamsPaymentMethodDataSofort"] - """ - If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. - """ - stripe_balance: NotRequired[ - "SetupIntent.CreateParamsPaymentMethodDataStripeBalance" - ] - """ - This hash contains details about the Stripe balance payment method. - """ - swish: NotRequired["SetupIntent.CreateParamsPaymentMethodDataSwish"] - """ - If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method. - """ - twint: NotRequired["SetupIntent.CreateParamsPaymentMethodDataTwint"] - """ - If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method. - """ - type: Literal[ - "acss_debit", - "affirm", - "afterpay_clearpay", - "alipay", - "alma", - "amazon_pay", - "au_becs_debit", - "bacs_debit", - "bancontact", - "billie", - "blik", - "boleto", - "cashapp", - "crypto", - "customer_balance", - "eps", - "fpx", - "giropay", - "gopay", - "grabpay", - "id_bank_transfer", - "ideal", - "kakao_pay", - "klarna", - "konbini", - "kr_card", - "link", - "mb_way", - "mobilepay", - "multibanco", - "naver_pay", - "nz_bank_account", - "oxxo", - "p24", - "pay_by_bank", - "payco", - "paynow", - "paypal", - "paypay", - "payto", - "pix", - "promptpay", - "qris", - "rechnung", - "revolut_pay", - "samsung_pay", - "satispay", - "sepa_debit", - "shopeepay", - "sofort", - "stripe_balance", - "swish", - "twint", - "us_bank_account", - "wechat_pay", - "zip", - ] - """ - The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. - """ - us_bank_account: NotRequired[ - "SetupIntent.CreateParamsPaymentMethodDataUsBankAccount" - ] - """ - If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. - """ - wechat_pay: NotRequired[ - "SetupIntent.CreateParamsPaymentMethodDataWechatPay" - ] - """ - If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method. - """ - zip: NotRequired["SetupIntent.CreateParamsPaymentMethodDataZip"] - """ - If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method. - """ - - class CreateParamsPaymentMethodDataAcssDebit(TypedDict): - account_number: str - """ - Customer's bank account number. - """ - institution_number: str - """ - Institution number of the customer's bank. - """ - transit_number: str - """ - Transit number of the customer's bank. - """ - - class CreateParamsPaymentMethodDataAffirm(TypedDict): - pass - - class CreateParamsPaymentMethodDataAfterpayClearpay(TypedDict): - pass - - class CreateParamsPaymentMethodDataAlipay(TypedDict): - pass - - class CreateParamsPaymentMethodDataAlma(TypedDict): - pass - - class CreateParamsPaymentMethodDataAmazonPay(TypedDict): - pass - - class CreateParamsPaymentMethodDataAuBecsDebit(TypedDict): - account_number: str - """ - The account number for the bank account. - """ - bsb_number: str - """ - Bank-State-Branch number of the bank account. - """ - - class CreateParamsPaymentMethodDataBacsDebit(TypedDict): - account_number: NotRequired[str] - """ - Account number of the bank account that the funds will be debited from. - """ - sort_code: NotRequired[str] - """ - Sort code of the bank account. (e.g., `10-20-30`) - """ - - class CreateParamsPaymentMethodDataBancontact(TypedDict): - pass - - class CreateParamsPaymentMethodDataBillie(TypedDict): - pass - - class CreateParamsPaymentMethodDataBillingDetails(TypedDict): - address: NotRequired[ - "Literal['']|SetupIntent.CreateParamsPaymentMethodDataBillingDetailsAddress" - ] - """ - Billing address. - """ - email: NotRequired["Literal['']|str"] - """ - Email address. - """ - name: NotRequired["Literal['']|str"] - """ - Full name. - """ - phone: NotRequired["Literal['']|str"] - """ - Billing phone number (including extension). - """ - tax_id: NotRequired[str] - """ - Taxpayer identification number. Used only for transactions between LATAM buyers and non-LATAM sellers. - """ - - class CreateParamsPaymentMethodDataBillingDetailsAddress(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. - """ - - class CreateParamsPaymentMethodDataBlik(TypedDict): - pass - - class CreateParamsPaymentMethodDataBoleto(TypedDict): - tax_id: str - """ - The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers) - """ - - class CreateParamsPaymentMethodDataCashapp(TypedDict): - pass - - class CreateParamsPaymentMethodDataCrypto(TypedDict): - pass - - class CreateParamsPaymentMethodDataCustomerBalance(TypedDict): - pass - - class CreateParamsPaymentMethodDataEps(TypedDict): - bank: NotRequired[ - Literal[ - "arzte_und_apotheker_bank", - "austrian_anadi_bank_ag", - "bank_austria", - "bankhaus_carl_spangler", - "bankhaus_schelhammer_und_schattera_ag", - "bawag_psk_ag", - "bks_bank_ag", - "brull_kallmus_bank_ag", - "btv_vier_lander_bank", - "capital_bank_grawe_gruppe_ag", - "deutsche_bank_ag", - "dolomitenbank", - "easybank_ag", - "erste_bank_und_sparkassen", - "hypo_alpeadriabank_international_ag", - "hypo_bank_burgenland_aktiengesellschaft", - "hypo_noe_lb_fur_niederosterreich_u_wien", - "hypo_oberosterreich_salzburg_steiermark", - "hypo_tirol_bank_ag", - "hypo_vorarlberg_bank_ag", - "marchfelder_bank", - "oberbank_ag", - "raiffeisen_bankengruppe_osterreich", - "schoellerbank_ag", - "sparda_bank_wien", - "volksbank_gruppe", - "volkskreditbank_ag", - "vr_bank_braunau", - ] - ] - """ - The customer's bank. - """ - - class CreateParamsPaymentMethodDataFpx(TypedDict): - account_holder_type: NotRequired[Literal["company", "individual"]] - """ - Account holder type for FPX transaction - """ - bank: Literal[ - "affin_bank", - "agrobank", - "alliance_bank", - "ambank", - "bank_islam", - "bank_muamalat", - "bank_of_china", - "bank_rakyat", - "bsn", - "cimb", - "deutsche_bank", - "hong_leong_bank", - "hsbc", - "kfh", - "maybank2e", - "maybank2u", - "ocbc", - "pb_enterprise", - "public_bank", - "rhb", - "standard_chartered", - "uob", - ] - """ - The customer's bank. - """ - - class CreateParamsPaymentMethodDataGiropay(TypedDict): - pass - - class CreateParamsPaymentMethodDataGopay(TypedDict): - pass - - class CreateParamsPaymentMethodDataGrabpay(TypedDict): - pass - - class CreateParamsPaymentMethodDataIdBankTransfer(TypedDict): - bank: NotRequired[Literal["bca", "bni", "bri", "cimb", "permata"]] - """ - Bank where the account is held. - """ - - class CreateParamsPaymentMethodDataIdeal(TypedDict): - bank: NotRequired[ - Literal[ - "abn_amro", - "asn_bank", - "bunq", - "buut", - "handelsbanken", - "ing", - "knab", - "moneyou", - "n26", - "nn", - "rabobank", - "regiobank", - "revolut", - "sns_bank", - "triodos_bank", - "van_lanschot", - "yoursafe", - ] - ] - """ - The customer's bank. Only use this parameter for existing customers. Don't use it for new customers. - """ - - class CreateParamsPaymentMethodDataInteracPresent(TypedDict): - pass - - class CreateParamsPaymentMethodDataKakaoPay(TypedDict): - pass - - class CreateParamsPaymentMethodDataKlarna(TypedDict): - dob: NotRequired["SetupIntent.CreateParamsPaymentMethodDataKlarnaDob"] - """ - Customer's date of birth - """ - - class CreateParamsPaymentMethodDataKlarnaDob(TypedDict): - day: int - """ - The day of birth, between 1 and 31. - """ - month: int - """ - The month of birth, between 1 and 12. - """ - year: int - """ - The four-digit year of birth. - """ - - class CreateParamsPaymentMethodDataKonbini(TypedDict): - pass - - class CreateParamsPaymentMethodDataKrCard(TypedDict): - pass - - class CreateParamsPaymentMethodDataLink(TypedDict): - pass - - class CreateParamsPaymentMethodDataMbWay(TypedDict): - pass - - class CreateParamsPaymentMethodDataMobilepay(TypedDict): - pass - - class CreateParamsPaymentMethodDataMultibanco(TypedDict): - pass - - class CreateParamsPaymentMethodDataNaverPay(TypedDict): - funding: NotRequired[Literal["card", "points"]] - """ - Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`. - """ - - class CreateParamsPaymentMethodDataNzBankAccount(TypedDict): - account_holder_name: NotRequired[str] - """ - The name on the bank account. Only required if the account holder name is different from the name of the authorized signatory collected in the PaymentMethod's billing details. - """ - account_number: str - """ - The account number for the bank account. - """ - bank_code: str - """ - The numeric code for the bank account's bank. - """ - branch_code: str - """ - The numeric code for the bank account's bank branch. - """ - reference: NotRequired[str] - suffix: str - """ - The suffix of the bank account number. - """ - - class CreateParamsPaymentMethodDataOxxo(TypedDict): - pass - - class CreateParamsPaymentMethodDataP24(TypedDict): - bank: NotRequired[ - Literal[ - "alior_bank", - "bank_millennium", - "bank_nowy_bfg_sa", - "bank_pekao_sa", - "banki_spbdzielcze", - "blik", - "bnp_paribas", - "boz", - "citi_handlowy", - "credit_agricole", - "envelobank", - "etransfer_pocztowy24", - "getin_bank", - "ideabank", - "ing", - "inteligo", - "mbank_mtransfer", - "nest_przelew", - "noble_pay", - "pbac_z_ipko", - "plus_bank", - "santander_przelew24", - "tmobile_usbugi_bankowe", - "toyota_bank", - "velobank", - "volkswagen_bank", - ] - ] - """ - The customer's bank. - """ - - class CreateParamsPaymentMethodDataPayByBank(TypedDict): - pass - - class CreateParamsPaymentMethodDataPayco(TypedDict): - pass - - class CreateParamsPaymentMethodDataPaynow(TypedDict): - pass - - class CreateParamsPaymentMethodDataPaypal(TypedDict): - pass - - class CreateParamsPaymentMethodDataPaypay(TypedDict): - pass - - class CreateParamsPaymentMethodDataPayto(TypedDict): - account_number: NotRequired[str] - """ - The account number for the bank account. - """ - bsb_number: NotRequired[str] - """ - Bank-State-Branch number of the bank account. - """ - pay_id: NotRequired[str] - """ - The PayID alias for the bank account. - """ - - class CreateParamsPaymentMethodDataPix(TypedDict): - pass - - class CreateParamsPaymentMethodDataPromptpay(TypedDict): - pass - - class CreateParamsPaymentMethodDataQris(TypedDict): - pass - - class CreateParamsPaymentMethodDataRadarOptions(TypedDict): - session: NotRequired[str] - """ - A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. - """ - - class CreateParamsPaymentMethodDataRechnung(TypedDict): - dob: "SetupIntent.CreateParamsPaymentMethodDataRechnungDob" - """ - Customer's date of birth - """ - - class CreateParamsPaymentMethodDataRechnungDob(TypedDict): - day: int - """ - The day of birth, between 1 and 31. - """ - month: int - """ - The month of birth, between 1 and 12. - """ - year: int - """ - The four-digit year of birth. - """ - - class CreateParamsPaymentMethodDataRevolutPay(TypedDict): - pass - - class CreateParamsPaymentMethodDataSamsungPay(TypedDict): - pass - - class CreateParamsPaymentMethodDataSatispay(TypedDict): - pass - - class CreateParamsPaymentMethodDataSepaDebit(TypedDict): - iban: str - """ - IBAN of the bank account. - """ - - class CreateParamsPaymentMethodDataShopeepay(TypedDict): - pass - - class CreateParamsPaymentMethodDataSofort(TypedDict): - country: Literal["AT", "BE", "DE", "ES", "IT", "NL"] - """ - Two-letter ISO code representing the country the bank account is located in. - """ - - class CreateParamsPaymentMethodDataStripeBalance(TypedDict): - account: NotRequired[str] - """ - The connected account ID whose Stripe balance to use as the source of payment - """ - source_type: NotRequired[Literal["bank_account", "card", "fpx"]] - """ - The [source_type](https://docs.stripe.com/api/balance/balance_object#balance_object-available-source_types) of the balance - """ - - class CreateParamsPaymentMethodDataSwish(TypedDict): - pass - - class CreateParamsPaymentMethodDataTwint(TypedDict): - pass - - class CreateParamsPaymentMethodDataUsBankAccount(TypedDict): - account_holder_type: NotRequired[Literal["company", "individual"]] - """ - Account holder type: individual or company. - """ - account_number: NotRequired[str] - """ - Account number of the bank account. - """ - account_type: NotRequired[Literal["checking", "savings"]] - """ - Account type: checkings or savings. Defaults to checking if omitted. - """ - financial_connections_account: NotRequired[str] - """ - The ID of a Financial Connections Account to use as a payment method. - """ - routing_number: NotRequired[str] - """ - Routing number of the bank account. - """ - - class CreateParamsPaymentMethodDataWechatPay(TypedDict): - pass - - class CreateParamsPaymentMethodDataZip(TypedDict): - pass - - class CreateParamsPaymentMethodOptions(TypedDict): - acss_debit: NotRequired[ - "SetupIntent.CreateParamsPaymentMethodOptionsAcssDebit" - ] - """ - If this is a `acss_debit` SetupIntent, this sub-hash contains details about the ACSS Debit payment method options. - """ - amazon_pay: NotRequired[ - "SetupIntent.CreateParamsPaymentMethodOptionsAmazonPay" - ] - """ - If this is a `amazon_pay` SetupIntent, this sub-hash contains details about the AmazonPay payment method options. - """ - bacs_debit: NotRequired[ - "SetupIntent.CreateParamsPaymentMethodOptionsBacsDebit" - ] - """ - If this is a `bacs_debit` SetupIntent, this sub-hash contains details about the Bacs Debit payment method options. - """ - card: NotRequired["SetupIntent.CreateParamsPaymentMethodOptionsCard"] - """ - Configuration for any card setup attempted on this SetupIntent. - """ - card_present: NotRequired[ - "SetupIntent.CreateParamsPaymentMethodOptionsCardPresent" - ] - """ - If this is a `card_present` PaymentMethod, this sub-hash contains details about the card-present payment method options. - """ - klarna: NotRequired[ - "SetupIntent.CreateParamsPaymentMethodOptionsKlarna" - ] - """ - If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method options. - """ - link: NotRequired["SetupIntent.CreateParamsPaymentMethodOptionsLink"] - """ - If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options. - """ - paypal: NotRequired[ - "SetupIntent.CreateParamsPaymentMethodOptionsPaypal" - ] - """ - If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options. - """ - payto: NotRequired["SetupIntent.CreateParamsPaymentMethodOptionsPayto"] - """ - If this is a `payto` SetupIntent, this sub-hash contains details about the PayTo payment method options. - """ - pix: NotRequired["SetupIntent.CreateParamsPaymentMethodOptionsPix"] - """ - If this is a `pix` SetupIntent, this sub-hash contains details about the Pix payment method options. - """ - sepa_debit: NotRequired[ - "SetupIntent.CreateParamsPaymentMethodOptionsSepaDebit" - ] - """ - If this is a `sepa_debit` SetupIntent, this sub-hash contains details about the SEPA Debit payment method options. - """ - us_bank_account: NotRequired[ - "SetupIntent.CreateParamsPaymentMethodOptionsUsBankAccount" - ] - """ - If this is a `us_bank_account` SetupIntent, this sub-hash contains details about the US bank account payment method options. - """ - - class CreateParamsPaymentMethodOptionsAcssDebit(TypedDict): - currency: NotRequired[Literal["cad", "usd"]] - """ - 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). - """ - mandate_options: NotRequired[ - "SetupIntent.CreateParamsPaymentMethodOptionsAcssDebitMandateOptions" - ] - """ - Additional fields for Mandate creation - """ - verification_method: NotRequired[ - Literal["automatic", "instant", "microdeposits"] - ] - """ - Bank account verification method. - """ - - class CreateParamsPaymentMethodOptionsAcssDebitMandateOptions(TypedDict): - custom_mandate_url: NotRequired["Literal['']|str"] - """ - A URL for custom mandate text to render during confirmation step. - The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent, - or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent. - """ - default_for: NotRequired[List[Literal["invoice", "subscription"]]] - """ - List of Stripe products where this mandate can be selected automatically. - """ - interval_description: NotRequired[str] - """ - Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'. - """ - payment_schedule: NotRequired[ - Literal["combined", "interval", "sporadic"] - ] - """ - Payment schedule for the mandate. - """ - transaction_type: NotRequired[Literal["business", "personal"]] - """ - Transaction type of the mandate. - """ - - class CreateParamsPaymentMethodOptionsAmazonPay(TypedDict): - pass - - class CreateParamsPaymentMethodOptionsBacsDebit(TypedDict): - mandate_options: NotRequired[ - "SetupIntent.CreateParamsPaymentMethodOptionsBacsDebitMandateOptions" - ] - """ - Additional fields for Mandate creation - """ - - class CreateParamsPaymentMethodOptionsBacsDebitMandateOptions(TypedDict): - reference_prefix: NotRequired["Literal['']|str"] - """ - Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'. - """ - - class CreateParamsPaymentMethodOptionsCard(TypedDict): - mandate_options: NotRequired[ - "SetupIntent.CreateParamsPaymentMethodOptionsCardMandateOptions" - ] - """ - Configuration options for setting up an eMandate for cards issued in India. - """ - moto: NotRequired[bool] - """ - When specified, this parameter signals that a card has been collected - as MOTO (Mail Order Telephone Order) and thus out of scope for SCA. This - parameter can only be provided during confirmation. - """ - network: NotRequired[ - Literal[ - "amex", - "cartes_bancaires", - "diners", - "discover", - "eftpos_au", - "girocard", - "interac", - "jcb", - "link", - "mastercard", - "unionpay", - "unknown", - "visa", - ] - ] - """ - Selected network to process this SetupIntent on. Depends on the available networks of the card attached to the SetupIntent. Can be only set confirm-time. - """ - request_three_d_secure: NotRequired[ - Literal["any", "automatic", "challenge"] - ] - """ - We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. - """ - three_d_secure: NotRequired[ - "SetupIntent.CreateParamsPaymentMethodOptionsCardThreeDSecure" - ] - """ - If 3D Secure authentication was performed with a third-party provider, - the authentication details to use for this setup. - """ - - class CreateParamsPaymentMethodOptionsCardMandateOptions(TypedDict): - amount: int - """ - Amount to be charged for future payments. - """ - amount_type: Literal["fixed", "maximum"] - """ - One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. - """ - currency: str - """ - Currency in which future payments will be charged. 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). - """ - description: NotRequired[str] - """ - A description of the mandate or subscription that is meant to be displayed to the customer. - """ - end_date: NotRequired[int] - """ - End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. - """ - interval: Literal["day", "month", "sporadic", "week", "year"] - """ - Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`. - """ - interval_count: NotRequired[int] - """ - The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`. - """ - reference: str - """ - Unique identifier for the mandate or subscription. - """ - start_date: int - """ - Start date of the mandate or subscription. Start date should not be lesser than yesterday. - """ - supported_types: NotRequired[List[Literal["india"]]] - """ - Specifies the type of mandates supported. Possible values are `india`. - """ - - class CreateParamsPaymentMethodOptionsCardPresent(TypedDict): - pass - - class CreateParamsPaymentMethodOptionsCardThreeDSecure(TypedDict): - ares_trans_status: NotRequired[ - Literal["A", "C", "I", "N", "R", "U", "Y"] - ] - """ - The `transStatus` returned from the card Issuer's ACS in the ARes. - """ - cryptogram: NotRequired[str] - """ - The cryptogram, also known as the "authentication value" (AAV, CAVV or - AEVV). This value is 20 bytes, base64-encoded into a 28-character string. - (Most 3D Secure providers will return the base64-encoded version, which - is what you should specify here.) - """ - electronic_commerce_indicator: NotRequired[ - Literal["01", "02", "05", "06", "07"] - ] - """ - The Electronic Commerce Indicator (ECI) is returned by your 3D Secure - provider and indicates what degree of authentication was performed. - """ - network_options: NotRequired[ - "SetupIntent.CreateParamsPaymentMethodOptionsCardThreeDSecureNetworkOptions" - ] - """ - Network specific 3DS fields. Network specific arguments require an - explicit card brand choice. The parameter `payment_method_options.card.network`` - must be populated accordingly - """ - requestor_challenge_indicator: NotRequired[str] - """ - The challenge indicator (`threeDSRequestorChallengeInd`) which was requested in the - AReq sent to the card Issuer's ACS. A string containing 2 digits from 01-99. - """ - transaction_id: NotRequired[str] - """ - For 3D Secure 1, the XID. For 3D Secure 2, the Directory Server - Transaction ID (dsTransID). - """ - version: NotRequired[Literal["1.0.2", "2.1.0", "2.2.0"]] - """ - The version of 3D Secure that was performed. - """ - - class CreateParamsPaymentMethodOptionsCardThreeDSecureNetworkOptions( - TypedDict, - ): - cartes_bancaires: NotRequired[ - "SetupIntent.CreateParamsPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancaires" - ] - """ - Cartes Bancaires-specific 3DS fields. - """ - - class CreateParamsPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancaires( - TypedDict, - ): - cb_avalgo: Literal["0", "1", "2", "3", "4", "A"] - """ - The cryptogram calculation algorithm used by the card Issuer's ACS - to calculate the Authentication cryptogram. Also known as `cavvAlgorithm`. - messageExtension: CB-AVALGO - """ - cb_exemption: NotRequired[str] - """ - The exemption indicator returned from Cartes Bancaires in the ARes. - message extension: CB-EXEMPTION; string (4 characters) - This is a 3 byte bitmap (low significant byte first and most significant - bit first) that has been Base64 encoded - """ - cb_score: NotRequired[int] - """ - The risk score returned from Cartes Bancaires in the ARes. - message extension: CB-SCORE; numeric value 0-99 - """ - - class CreateParamsPaymentMethodOptionsKlarna(TypedDict): - currency: NotRequired[str] - """ - The currency of the SetupIntent. Three letter ISO currency code. - """ - on_demand: NotRequired[ - "SetupIntent.CreateParamsPaymentMethodOptionsKlarnaOnDemand" - ] - """ - On-demand details if setting up a payment method for on-demand payments. - """ - preferred_locale: NotRequired[ - Literal[ - "cs-CZ", - "da-DK", - "de-AT", - "de-CH", - "de-DE", - "el-GR", - "en-AT", - "en-AU", - "en-BE", - "en-CA", - "en-CH", - "en-CZ", - "en-DE", - "en-DK", - "en-ES", - "en-FI", - "en-FR", - "en-GB", - "en-GR", - "en-IE", - "en-IT", - "en-NL", - "en-NO", - "en-NZ", - "en-PL", - "en-PT", - "en-RO", - "en-SE", - "en-US", - "es-ES", - "es-US", - "fi-FI", - "fr-BE", - "fr-CA", - "fr-CH", - "fr-FR", - "it-CH", - "it-IT", - "nb-NO", - "nl-BE", - "nl-NL", - "pl-PL", - "pt-PT", - "ro-RO", - "sv-FI", - "sv-SE", - ] - ] - """ - Preferred language of the Klarna authorization page that the customer is redirected to - """ - subscriptions: NotRequired[ - "Literal['']|List[SetupIntent.CreateParamsPaymentMethodOptionsKlarnaSubscription]" - ] - """ - Subscription details if setting up or charging a subscription - """ - - class CreateParamsPaymentMethodOptionsKlarnaOnDemand(TypedDict): - average_amount: NotRequired[int] - """ - Your average amount value. You can use a value across your customer base, or segment based on customer type, country, etc. - """ - maximum_amount: NotRequired[int] - """ - The maximum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. - """ - minimum_amount: NotRequired[int] - """ - The lowest or minimum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. - """ - purchase_interval: NotRequired[Literal["day", "month", "week", "year"]] - """ - Interval at which the customer is making purchases - """ - purchase_interval_count: NotRequired[int] - """ - The number of `purchase_interval` between charges - """ - - class CreateParamsPaymentMethodOptionsKlarnaSubscription(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Unit of time between subscription charges. - """ - interval_count: NotRequired[int] - """ - The number of intervals (specified in the `interval` attribute) between subscription charges. For example, `interval=month` and `interval_count=3` charges every 3 months. - """ - name: NotRequired[str] - """ - Name for subscription. - """ - next_billing: "SetupIntent.CreateParamsPaymentMethodOptionsKlarnaSubscriptionNextBilling" - """ - Describes the upcoming charge for this subscription. - """ - reference: str - """ - A non-customer-facing reference to correlate subscription charges in the Klarna app. Use a value that persists across subscription charges. - """ - - class CreateParamsPaymentMethodOptionsKlarnaSubscriptionNextBilling( - TypedDict, - ): - amount: int - """ - The amount of the next charge for the subscription. - """ - date: str - """ - The date of the next charge for the subscription in YYYY-MM-DD format. - """ - - class CreateParamsPaymentMethodOptionsLink(TypedDict): - persistent_token: NotRequired[str] - """ - [Deprecated] This is a legacy parameter that no longer has any function. - """ - - class CreateParamsPaymentMethodOptionsPaypal(TypedDict): - billing_agreement_id: NotRequired[str] - """ - The PayPal Billing Agreement ID (BAID). This is an ID generated by PayPal which represents the mandate between the merchant and the customer. - """ - currency: NotRequired[str] - subsellers: NotRequired[List[str]] - """ - The Stripe connected account IDs of the sellers on the platform for this transaction (optional). Only allowed when [separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) are used. - """ - - class CreateParamsPaymentMethodOptionsPayto(TypedDict): - mandate_options: NotRequired[ - "SetupIntent.CreateParamsPaymentMethodOptionsPaytoMandateOptions" - ] - """ - Additional fields for Mandate creation. - """ - - class CreateParamsPaymentMethodOptionsPaytoMandateOptions(TypedDict): - amount: NotRequired[int] - """ - Amount that will be collected. It is required when `amount_type` is `fixed`. - """ - amount_type: NotRequired[Literal["fixed", "maximum"]] - """ - The type of amount that will be collected. The amount charged must be exact or up to the value of `amount` param for `fixed` or `maximum` type respectively. - """ - end_date: NotRequired[str] - """ - Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no end date. - """ - payment_schedule: NotRequired[ - Literal[ - "adhoc", - "annual", - "daily", - "fortnightly", - "monthly", - "quarterly", - "semi_annual", - "weekly", - ] - ] - """ - The periodicity at which payments will be collected. - """ - payments_per_period: NotRequired[int] - """ - The number of payments that will be made during a payment period. Defaults to 1 except for when `payment_schedule` is `adhoc`. In that case, it defaults to no limit. - """ - purpose: NotRequired[ - Literal[ - "dependant_support", - "government", - "loan", - "mortgage", - "other", - "pension", - "personal", - "retail", - "salary", - "tax", - "utility", - ] - ] - """ - The purpose for which payments are made. Defaults to retail. - """ - start_date: NotRequired[str] - """ - Date, in YYYY-MM-DD format, from which payments will be collected. Defaults to confirmation time. - """ - - class CreateParamsPaymentMethodOptionsPix(TypedDict): - mandate_options: NotRequired[ - "SetupIntent.CreateParamsPaymentMethodOptionsPixMandateOptions" - ] - """ - Additional fields for mandate creation. - """ - - class CreateParamsPaymentMethodOptionsPixMandateOptions(TypedDict): - amount: NotRequired[int] - """ - Amount to be charged for future payments. Required when `amount_type=fixed`. If not provided for `amount_type=maximum`, defaults to 40000. - """ - amount_includes_iof: NotRequired[Literal["always", "never"]] - """ - Determines if the amount includes the IOF tax. Defaults to `never`. - """ - amount_type: NotRequired[Literal["fixed", "maximum"]] - """ - Type of amount. Defaults to `maximum`. - """ - currency: NotRequired[str] - """ - Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Only `brl` is supported currently. - """ - end_date: NotRequired[str] - """ - Date when the mandate expires and no further payments will be charged, in `YYYY-MM-DD`. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. - """ - payment_schedule: NotRequired[ - Literal["halfyearly", "monthly", "quarterly", "weekly", "yearly"] - ] - """ - Schedule at which the future payments will be charged. Defaults to `weekly`. - """ - reference: NotRequired[str] - """ - Subscription name displayed to buyers in their bank app. Defaults to the displayable business name. - """ - start_date: NotRequired[str] - """ - Start date of the mandate, in `YYYY-MM-DD`. Start date should be at least 3 days in the future. Defaults to 3 days after the current date. - """ - - class CreateParamsPaymentMethodOptionsSepaDebit(TypedDict): - mandate_options: NotRequired[ - "SetupIntent.CreateParamsPaymentMethodOptionsSepaDebitMandateOptions" - ] - """ - Additional fields for Mandate creation - """ - - class CreateParamsPaymentMethodOptionsSepaDebitMandateOptions(TypedDict): - reference_prefix: NotRequired["Literal['']|str"] - """ - Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'. - """ - - class CreateParamsPaymentMethodOptionsUsBankAccount(TypedDict): - financial_connections: NotRequired[ - "SetupIntent.CreateParamsPaymentMethodOptionsUsBankAccountFinancialConnections" - ] - """ - Additional fields for Financial Connections Session creation - """ - mandate_options: NotRequired[ - "SetupIntent.CreateParamsPaymentMethodOptionsUsBankAccountMandateOptions" - ] - """ - Additional fields for Mandate creation - """ - networks: NotRequired[ - "SetupIntent.CreateParamsPaymentMethodOptionsUsBankAccountNetworks" - ] - """ - Additional fields for network related functions - """ - verification_method: NotRequired[ - Literal["automatic", "instant", "microdeposits"] - ] - """ - Bank account verification method. - """ - - class CreateParamsPaymentMethodOptionsUsBankAccountFinancialConnections( - TypedDict, - ): - filters: NotRequired[ - "SetupIntent.CreateParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters" - ] - """ - Provide filters for the linked accounts that the customer can select for the payment method. - """ - manual_entry: NotRequired[ - "SetupIntent.CreateParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsManualEntry" - ] - """ - Customize manual entry behavior - """ - permissions: NotRequired[ - List[ - Literal[ - "balances", "ownership", "payment_method", "transactions" - ] - ] - ] - """ - The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. - """ - prefetch: NotRequired[ - List[ - Literal[ - "balances", - "inferred_balances", - "ownership", - "transactions", - ] - ] - ] - """ - List of data features that you would like to retrieve upon account creation. - """ - return_url: NotRequired[str] - """ - For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. - """ - - class CreateParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters( - TypedDict, - ): - account_subcategories: NotRequired[ - List[Literal["checking", "savings"]] - ] - """ - The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`. - """ - institution: NotRequired[str] - """ - ID of the institution to use to filter for selectable accounts. - """ - - class CreateParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsManualEntry( - TypedDict, - ): - mode: Literal["automatic", "custom"] - """ - Settings for configuring manual entry of account details. - """ - - class CreateParamsPaymentMethodOptionsUsBankAccountMandateOptions( - TypedDict, - ): - collection_method: NotRequired["Literal['']|Literal['paper']"] - """ - The method used to collect offline mandate customer acceptance. - """ - - class CreateParamsPaymentMethodOptionsUsBankAccountNetworks(TypedDict): - requested: NotRequired[List[Literal["ach", "us_domestic_wire"]]] - """ - Triggers validations to run across the selected networks - """ - - class CreateParamsSingleUse(TypedDict): - amount: int - """ - Amount the customer is granting permission to collect later. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). - """ - 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). - """ - - class ListParams(RequestOptions): - attach_to_self: NotRequired[bool] - """ - If present, the SetupIntent's payment method will be attached to the in-context Stripe Account. - - It can only be used for this Stripe Account's own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer. - """ - created: NotRequired["SetupIntent.ListParamsCreated|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. - """ - customer: NotRequired[str] - """ - Only return SetupIntents for the customer specified by this customer ID. - """ - customer_account: NotRequired[str] - """ - Only return SetupIntents for the account specified by this customer ID. - """ - 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. - """ - payment_method: NotRequired[str] - """ - Only return SetupIntents that associate with the specified payment method. - """ - 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 ListParamsCreated(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) - """ - - class ModifyParams(RequestOptions): - attach_to_self: NotRequired[bool] - """ - If present, the SetupIntent's payment method will be attached to the in-context Stripe Account. - - It can only be used for this Stripe Account's own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer. - """ - customer: NotRequired[str] - """ - ID of the Customer this SetupIntent belongs to, if one exists. - - If present, the SetupIntent's payment method will be attached to the Customer on successful setup. Payment methods attached to other Customers cannot be used with this SetupIntent. - """ - customer_account: NotRequired[str] - """ - ID of the Account this SetupIntent belongs to, if one exists. - - If present, the SetupIntent's payment method will be attached to the Account on successful setup. Payment methods attached to other Accounts cannot be used with this SetupIntent. - """ - description: NotRequired[str] - """ - An arbitrary string attached to the object. Often useful for displaying to users. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - flow_directions: NotRequired[List[Literal["inbound", "outbound"]]] - """ - Indicates the directions of money movement for which this payment method is intended to be used. - - Include `inbound` if you intend to use the payment method as the origin to pull funds from. Include `outbound` if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - payment_method: NotRequired[str] - """ - ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent. To unset this field to null, pass in an empty string. - """ - payment_method_configuration: NotRequired[str] - """ - The ID of the [payment method configuration](https://stripe.com/docs/api/payment_method_configurations) to use with this SetupIntent. - """ - payment_method_data: NotRequired[ - "SetupIntent.ModifyParamsPaymentMethodData" - ] - """ - When included, this hash creates a PaymentMethod that is set as the [`payment_method`](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-payment_method) - value in the SetupIntent. - """ - payment_method_options: NotRequired[ - "SetupIntent.ModifyParamsPaymentMethodOptions" - ] - """ - Payment method-specific configuration for this SetupIntent. - """ - payment_method_types: NotRequired[List[str]] - """ - The list of payment method types (for example, card) that this SetupIntent can set up. If you don't provide this, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). A list of valid payment method types can be found [here](https://docs.stripe.com/api/payment_methods/object#payment_method_object-type). - """ - - class ModifyParamsPaymentMethodData(TypedDict): - acss_debit: NotRequired[ - "SetupIntent.ModifyParamsPaymentMethodDataAcssDebit" - ] - """ - If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method. - """ - affirm: NotRequired["SetupIntent.ModifyParamsPaymentMethodDataAffirm"] - """ - If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method. - """ - afterpay_clearpay: NotRequired[ - "SetupIntent.ModifyParamsPaymentMethodDataAfterpayClearpay" - ] - """ - If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method. - """ - alipay: NotRequired["SetupIntent.ModifyParamsPaymentMethodDataAlipay"] - """ - If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. - """ - allow_redisplay: NotRequired[ - Literal["always", "limited", "unspecified"] - ] - """ - This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`. - """ - alma: NotRequired["SetupIntent.ModifyParamsPaymentMethodDataAlma"] - """ - If this is a Alma PaymentMethod, this hash contains details about the Alma payment method. - """ - amazon_pay: NotRequired[ - "SetupIntent.ModifyParamsPaymentMethodDataAmazonPay" - ] - """ - If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method. - """ - au_becs_debit: NotRequired[ - "SetupIntent.ModifyParamsPaymentMethodDataAuBecsDebit" - ] - """ - If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. - """ - bacs_debit: NotRequired[ - "SetupIntent.ModifyParamsPaymentMethodDataBacsDebit" - ] - """ - If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account. - """ - bancontact: NotRequired[ - "SetupIntent.ModifyParamsPaymentMethodDataBancontact" - ] - """ - If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method. - """ - billie: NotRequired["SetupIntent.ModifyParamsPaymentMethodDataBillie"] - """ - If this is a `billie` PaymentMethod, this hash contains details about the Billie payment method. - """ - billing_details: NotRequired[ - "SetupIntent.ModifyParamsPaymentMethodDataBillingDetails" - ] - """ - Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. - """ - blik: NotRequired["SetupIntent.ModifyParamsPaymentMethodDataBlik"] - """ - If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method. - """ - boleto: NotRequired["SetupIntent.ModifyParamsPaymentMethodDataBoleto"] - """ - If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method. - """ - cashapp: NotRequired[ - "SetupIntent.ModifyParamsPaymentMethodDataCashapp" - ] - """ - If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. - """ - crypto: NotRequired["SetupIntent.ModifyParamsPaymentMethodDataCrypto"] - """ - If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment method. - """ - customer_balance: NotRequired[ - "SetupIntent.ModifyParamsPaymentMethodDataCustomerBalance" - ] - """ - If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. - """ - eps: NotRequired["SetupIntent.ModifyParamsPaymentMethodDataEps"] - """ - If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. - """ - fpx: NotRequired["SetupIntent.ModifyParamsPaymentMethodDataFpx"] - """ - If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method. - """ - giropay: NotRequired[ - "SetupIntent.ModifyParamsPaymentMethodDataGiropay" - ] - """ - If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method. - """ - gopay: NotRequired["SetupIntent.ModifyParamsPaymentMethodDataGopay"] - """ - If this is a Gopay PaymentMethod, this hash contains details about the Gopay payment method. - """ - grabpay: NotRequired[ - "SetupIntent.ModifyParamsPaymentMethodDataGrabpay" - ] - """ - If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method. - """ - id_bank_transfer: NotRequired[ - "SetupIntent.ModifyParamsPaymentMethodDataIdBankTransfer" - ] - """ - If this is an `IdBankTransfer` PaymentMethod, this hash contains details about the IdBankTransfer payment method. - """ - ideal: NotRequired["SetupIntent.ModifyParamsPaymentMethodDataIdeal"] - """ - If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. - """ - interac_present: NotRequired[ - "SetupIntent.ModifyParamsPaymentMethodDataInteracPresent" - ] - """ - If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. - """ - kakao_pay: NotRequired[ - "SetupIntent.ModifyParamsPaymentMethodDataKakaoPay" - ] - """ - If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method. - """ - klarna: NotRequired["SetupIntent.ModifyParamsPaymentMethodDataKlarna"] - """ - If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method. - """ - konbini: NotRequired[ - "SetupIntent.ModifyParamsPaymentMethodDataKonbini" - ] - """ - If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. - """ - kr_card: NotRequired["SetupIntent.ModifyParamsPaymentMethodDataKrCard"] - """ - If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method. - """ - link: NotRequired["SetupIntent.ModifyParamsPaymentMethodDataLink"] - """ - If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. - """ - mb_way: NotRequired["SetupIntent.ModifyParamsPaymentMethodDataMbWay"] - """ - If this is a MB WAY PaymentMethod, this hash contains details about the MB WAY payment method. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - mobilepay: NotRequired[ - "SetupIntent.ModifyParamsPaymentMethodDataMobilepay" - ] - """ - If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method. - """ - multibanco: NotRequired[ - "SetupIntent.ModifyParamsPaymentMethodDataMultibanco" - ] - """ - If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method. - """ - naver_pay: NotRequired[ - "SetupIntent.ModifyParamsPaymentMethodDataNaverPay" - ] - """ - If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method. - """ - nz_bank_account: NotRequired[ - "SetupIntent.ModifyParamsPaymentMethodDataNzBankAccount" - ] - """ - If this is an nz_bank_account PaymentMethod, this hash contains details about the nz_bank_account payment method. - """ - oxxo: NotRequired["SetupIntent.ModifyParamsPaymentMethodDataOxxo"] - """ - If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. - """ - p24: NotRequired["SetupIntent.ModifyParamsPaymentMethodDataP24"] - """ - If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. - """ - pay_by_bank: NotRequired[ - "SetupIntent.ModifyParamsPaymentMethodDataPayByBank" - ] - """ - If this is a `pay_by_bank` PaymentMethod, this hash contains details about the PayByBank payment method. - """ - payco: NotRequired["SetupIntent.ModifyParamsPaymentMethodDataPayco"] - """ - If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method. - """ - paynow: NotRequired["SetupIntent.ModifyParamsPaymentMethodDataPaynow"] - """ - If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method. - """ - paypal: NotRequired["SetupIntent.ModifyParamsPaymentMethodDataPaypal"] - """ - If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method. - """ - paypay: NotRequired["SetupIntent.ModifyParamsPaymentMethodDataPaypay"] - """ - If this is a `paypay` PaymentMethod, this hash contains details about the PayPay payment method. - """ - payto: NotRequired["SetupIntent.ModifyParamsPaymentMethodDataPayto"] - """ - If this is a `payto` PaymentMethod, this hash contains details about the PayTo payment method. - """ - pix: NotRequired["SetupIntent.ModifyParamsPaymentMethodDataPix"] - """ - If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method. - """ - promptpay: NotRequired[ - "SetupIntent.ModifyParamsPaymentMethodDataPromptpay" - ] - """ - If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method. - """ - qris: NotRequired["SetupIntent.ModifyParamsPaymentMethodDataQris"] - """ - If this is a `qris` PaymentMethod, this hash contains details about the QRIS payment method. - """ - radar_options: NotRequired[ - "SetupIntent.ModifyParamsPaymentMethodDataRadarOptions" - ] - """ - Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. - """ - rechnung: NotRequired[ - "SetupIntent.ModifyParamsPaymentMethodDataRechnung" - ] - """ - If this is a `rechnung` PaymentMethod, this hash contains details about the Rechnung payment method. - """ - revolut_pay: NotRequired[ - "SetupIntent.ModifyParamsPaymentMethodDataRevolutPay" - ] - """ - If this is a `revolut_pay` PaymentMethod, this hash contains details about the Revolut Pay payment method. - """ - samsung_pay: NotRequired[ - "SetupIntent.ModifyParamsPaymentMethodDataSamsungPay" - ] - """ - If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method. - """ - satispay: NotRequired[ - "SetupIntent.ModifyParamsPaymentMethodDataSatispay" - ] - """ - If this is a `satispay` PaymentMethod, this hash contains details about the Satispay payment method. - """ - sepa_debit: NotRequired[ - "SetupIntent.ModifyParamsPaymentMethodDataSepaDebit" - ] - """ - If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. - """ - shopeepay: NotRequired[ - "SetupIntent.ModifyParamsPaymentMethodDataShopeepay" - ] - """ - If this is a Shopeepay PaymentMethod, this hash contains details about the Shopeepay payment method. - """ - sofort: NotRequired["SetupIntent.ModifyParamsPaymentMethodDataSofort"] - """ - If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. - """ - stripe_balance: NotRequired[ - "SetupIntent.ModifyParamsPaymentMethodDataStripeBalance" - ] - """ - This hash contains details about the Stripe balance payment method. - """ - swish: NotRequired["SetupIntent.ModifyParamsPaymentMethodDataSwish"] - """ - If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method. - """ - twint: NotRequired["SetupIntent.ModifyParamsPaymentMethodDataTwint"] - """ - If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method. - """ - type: Literal[ - "acss_debit", - "affirm", - "afterpay_clearpay", - "alipay", - "alma", - "amazon_pay", - "au_becs_debit", - "bacs_debit", - "bancontact", - "billie", - "blik", - "boleto", - "cashapp", - "crypto", - "customer_balance", - "eps", - "fpx", - "giropay", - "gopay", - "grabpay", - "id_bank_transfer", - "ideal", - "kakao_pay", - "klarna", - "konbini", - "kr_card", - "link", - "mb_way", - "mobilepay", - "multibanco", - "naver_pay", - "nz_bank_account", - "oxxo", - "p24", - "pay_by_bank", - "payco", - "paynow", - "paypal", - "paypay", - "payto", - "pix", - "promptpay", - "qris", - "rechnung", - "revolut_pay", - "samsung_pay", - "satispay", - "sepa_debit", - "shopeepay", - "sofort", - "stripe_balance", - "swish", - "twint", - "us_bank_account", - "wechat_pay", - "zip", - ] - """ - The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. - """ - us_bank_account: NotRequired[ - "SetupIntent.ModifyParamsPaymentMethodDataUsBankAccount" - ] - """ - If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. - """ - wechat_pay: NotRequired[ - "SetupIntent.ModifyParamsPaymentMethodDataWechatPay" - ] - """ - If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method. - """ - zip: NotRequired["SetupIntent.ModifyParamsPaymentMethodDataZip"] - """ - If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method. - """ - - class ModifyParamsPaymentMethodDataAcssDebit(TypedDict): - account_number: str - """ - Customer's bank account number. - """ - institution_number: str - """ - Institution number of the customer's bank. - """ - transit_number: str - """ - Transit number of the customer's bank. - """ - - class ModifyParamsPaymentMethodDataAffirm(TypedDict): - pass - - class ModifyParamsPaymentMethodDataAfterpayClearpay(TypedDict): - pass - - class ModifyParamsPaymentMethodDataAlipay(TypedDict): - pass - - class ModifyParamsPaymentMethodDataAlma(TypedDict): - pass - - class ModifyParamsPaymentMethodDataAmazonPay(TypedDict): - pass - - class ModifyParamsPaymentMethodDataAuBecsDebit(TypedDict): - account_number: str - """ - The account number for the bank account. - """ - bsb_number: str - """ - Bank-State-Branch number of the bank account. - """ - - class ModifyParamsPaymentMethodDataBacsDebit(TypedDict): - account_number: NotRequired[str] - """ - Account number of the bank account that the funds will be debited from. - """ - sort_code: NotRequired[str] - """ - Sort code of the bank account. (e.g., `10-20-30`) - """ - - class ModifyParamsPaymentMethodDataBancontact(TypedDict): - pass - - class ModifyParamsPaymentMethodDataBillie(TypedDict): - pass - - class ModifyParamsPaymentMethodDataBillingDetails(TypedDict): - address: NotRequired[ - "Literal['']|SetupIntent.ModifyParamsPaymentMethodDataBillingDetailsAddress" - ] - """ - Billing address. - """ - email: NotRequired["Literal['']|str"] - """ - Email address. - """ - name: NotRequired["Literal['']|str"] - """ - Full name. - """ - phone: NotRequired["Literal['']|str"] - """ - Billing phone number (including extension). - """ - tax_id: NotRequired[str] - """ - Taxpayer identification number. Used only for transactions between LATAM buyers and non-LATAM sellers. - """ - - class ModifyParamsPaymentMethodDataBillingDetailsAddress(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. - """ - - class ModifyParamsPaymentMethodDataBlik(TypedDict): - pass - - class ModifyParamsPaymentMethodDataBoleto(TypedDict): - tax_id: str - """ - The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers) - """ - - class ModifyParamsPaymentMethodDataCashapp(TypedDict): - pass - - class ModifyParamsPaymentMethodDataCrypto(TypedDict): - pass - - class ModifyParamsPaymentMethodDataCustomerBalance(TypedDict): - pass - - class ModifyParamsPaymentMethodDataEps(TypedDict): - bank: NotRequired[ - Literal[ - "arzte_und_apotheker_bank", - "austrian_anadi_bank_ag", - "bank_austria", - "bankhaus_carl_spangler", - "bankhaus_schelhammer_und_schattera_ag", - "bawag_psk_ag", - "bks_bank_ag", - "brull_kallmus_bank_ag", - "btv_vier_lander_bank", - "capital_bank_grawe_gruppe_ag", - "deutsche_bank_ag", - "dolomitenbank", - "easybank_ag", - "erste_bank_und_sparkassen", - "hypo_alpeadriabank_international_ag", - "hypo_bank_burgenland_aktiengesellschaft", - "hypo_noe_lb_fur_niederosterreich_u_wien", - "hypo_oberosterreich_salzburg_steiermark", - "hypo_tirol_bank_ag", - "hypo_vorarlberg_bank_ag", - "marchfelder_bank", - "oberbank_ag", - "raiffeisen_bankengruppe_osterreich", - "schoellerbank_ag", - "sparda_bank_wien", - "volksbank_gruppe", - "volkskreditbank_ag", - "vr_bank_braunau", - ] - ] - """ - The customer's bank. - """ - - class ModifyParamsPaymentMethodDataFpx(TypedDict): - account_holder_type: NotRequired[Literal["company", "individual"]] - """ - Account holder type for FPX transaction - """ - bank: Literal[ - "affin_bank", - "agrobank", - "alliance_bank", - "ambank", - "bank_islam", - "bank_muamalat", - "bank_of_china", - "bank_rakyat", - "bsn", - "cimb", - "deutsche_bank", - "hong_leong_bank", - "hsbc", - "kfh", - "maybank2e", - "maybank2u", - "ocbc", - "pb_enterprise", - "public_bank", - "rhb", - "standard_chartered", - "uob", - ] - """ - The customer's bank. - """ - - class ModifyParamsPaymentMethodDataGiropay(TypedDict): - pass - - class ModifyParamsPaymentMethodDataGopay(TypedDict): - pass - - class ModifyParamsPaymentMethodDataGrabpay(TypedDict): - pass - - class ModifyParamsPaymentMethodDataIdBankTransfer(TypedDict): - bank: NotRequired[Literal["bca", "bni", "bri", "cimb", "permata"]] - """ - Bank where the account is held. - """ - - class ModifyParamsPaymentMethodDataIdeal(TypedDict): - bank: NotRequired[ - Literal[ - "abn_amro", - "asn_bank", - "bunq", - "buut", - "handelsbanken", - "ing", - "knab", - "moneyou", - "n26", - "nn", - "rabobank", - "regiobank", - "revolut", - "sns_bank", - "triodos_bank", - "van_lanschot", - "yoursafe", - ] - ] - """ - The customer's bank. Only use this parameter for existing customers. Don't use it for new customers. - """ - - class ModifyParamsPaymentMethodDataInteracPresent(TypedDict): - pass - - class ModifyParamsPaymentMethodDataKakaoPay(TypedDict): - pass - - class ModifyParamsPaymentMethodDataKlarna(TypedDict): - dob: NotRequired["SetupIntent.ModifyParamsPaymentMethodDataKlarnaDob"] - """ - Customer's date of birth - """ - - class ModifyParamsPaymentMethodDataKlarnaDob(TypedDict): - day: int - """ - The day of birth, between 1 and 31. - """ - month: int - """ - The month of birth, between 1 and 12. - """ - year: int - """ - The four-digit year of birth. - """ - - class ModifyParamsPaymentMethodDataKonbini(TypedDict): - pass - - class ModifyParamsPaymentMethodDataKrCard(TypedDict): - pass - - class ModifyParamsPaymentMethodDataLink(TypedDict): - pass - - class ModifyParamsPaymentMethodDataMbWay(TypedDict): - pass - - class ModifyParamsPaymentMethodDataMobilepay(TypedDict): - pass - - class ModifyParamsPaymentMethodDataMultibanco(TypedDict): - pass - - class ModifyParamsPaymentMethodDataNaverPay(TypedDict): - funding: NotRequired[Literal["card", "points"]] - """ - Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`. - """ - - class ModifyParamsPaymentMethodDataNzBankAccount(TypedDict): - account_holder_name: NotRequired[str] - """ - The name on the bank account. Only required if the account holder name is different from the name of the authorized signatory collected in the PaymentMethod's billing details. - """ - account_number: str - """ - The account number for the bank account. - """ - bank_code: str - """ - The numeric code for the bank account's bank. - """ - branch_code: str - """ - The numeric code for the bank account's bank branch. - """ - reference: NotRequired[str] - suffix: str - """ - The suffix of the bank account number. - """ - - class ModifyParamsPaymentMethodDataOxxo(TypedDict): - pass - - class ModifyParamsPaymentMethodDataP24(TypedDict): - bank: NotRequired[ - Literal[ - "alior_bank", - "bank_millennium", - "bank_nowy_bfg_sa", - "bank_pekao_sa", - "banki_spbdzielcze", - "blik", - "bnp_paribas", - "boz", - "citi_handlowy", - "credit_agricole", - "envelobank", - "etransfer_pocztowy24", - "getin_bank", - "ideabank", - "ing", - "inteligo", - "mbank_mtransfer", - "nest_przelew", - "noble_pay", - "pbac_z_ipko", - "plus_bank", - "santander_przelew24", - "tmobile_usbugi_bankowe", - "toyota_bank", - "velobank", - "volkswagen_bank", - ] - ] - """ - The customer's bank. - """ - - class ModifyParamsPaymentMethodDataPayByBank(TypedDict): - pass - - class ModifyParamsPaymentMethodDataPayco(TypedDict): - pass - - class ModifyParamsPaymentMethodDataPaynow(TypedDict): - pass - - class ModifyParamsPaymentMethodDataPaypal(TypedDict): - pass - - class ModifyParamsPaymentMethodDataPaypay(TypedDict): - pass - - class ModifyParamsPaymentMethodDataPayto(TypedDict): - account_number: NotRequired[str] - """ - The account number for the bank account. - """ - bsb_number: NotRequired[str] - """ - Bank-State-Branch number of the bank account. - """ - pay_id: NotRequired[str] - """ - The PayID alias for the bank account. - """ - - class ModifyParamsPaymentMethodDataPix(TypedDict): - pass - - class ModifyParamsPaymentMethodDataPromptpay(TypedDict): - pass - - class ModifyParamsPaymentMethodDataQris(TypedDict): - pass - - class ModifyParamsPaymentMethodDataRadarOptions(TypedDict): - session: NotRequired[str] - """ - A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. - """ - - class ModifyParamsPaymentMethodDataRechnung(TypedDict): - dob: "SetupIntent.ModifyParamsPaymentMethodDataRechnungDob" - """ - Customer's date of birth - """ - - class ModifyParamsPaymentMethodDataRechnungDob(TypedDict): - day: int - """ - The day of birth, between 1 and 31. - """ - month: int - """ - The month of birth, between 1 and 12. - """ - year: int - """ - The four-digit year of birth. - """ - - class ModifyParamsPaymentMethodDataRevolutPay(TypedDict): - pass - - class ModifyParamsPaymentMethodDataSamsungPay(TypedDict): - pass - - class ModifyParamsPaymentMethodDataSatispay(TypedDict): - pass - - class ModifyParamsPaymentMethodDataSepaDebit(TypedDict): - iban: str - """ - IBAN of the bank account. - """ - - class ModifyParamsPaymentMethodDataShopeepay(TypedDict): - pass - - class ModifyParamsPaymentMethodDataSofort(TypedDict): - country: Literal["AT", "BE", "DE", "ES", "IT", "NL"] - """ - Two-letter ISO code representing the country the bank account is located in. - """ - - class ModifyParamsPaymentMethodDataStripeBalance(TypedDict): - account: NotRequired[str] - """ - The connected account ID whose Stripe balance to use as the source of payment - """ - source_type: NotRequired[Literal["bank_account", "card", "fpx"]] - """ - The [source_type](https://docs.stripe.com/api/balance/balance_object#balance_object-available-source_types) of the balance - """ - - class ModifyParamsPaymentMethodDataSwish(TypedDict): - pass - - class ModifyParamsPaymentMethodDataTwint(TypedDict): - pass - - class ModifyParamsPaymentMethodDataUsBankAccount(TypedDict): - account_holder_type: NotRequired[Literal["company", "individual"]] - """ - Account holder type: individual or company. - """ - account_number: NotRequired[str] - """ - Account number of the bank account. - """ - account_type: NotRequired[Literal["checking", "savings"]] - """ - Account type: checkings or savings. Defaults to checking if omitted. - """ - financial_connections_account: NotRequired[str] - """ - The ID of a Financial Connections Account to use as a payment method. - """ - routing_number: NotRequired[str] - """ - Routing number of the bank account. - """ - - class ModifyParamsPaymentMethodDataWechatPay(TypedDict): - pass - - class ModifyParamsPaymentMethodDataZip(TypedDict): - pass - - class ModifyParamsPaymentMethodOptions(TypedDict): - acss_debit: NotRequired[ - "SetupIntent.ModifyParamsPaymentMethodOptionsAcssDebit" - ] - """ - If this is a `acss_debit` SetupIntent, this sub-hash contains details about the ACSS Debit payment method options. - """ - amazon_pay: NotRequired[ - "SetupIntent.ModifyParamsPaymentMethodOptionsAmazonPay" - ] - """ - If this is a `amazon_pay` SetupIntent, this sub-hash contains details about the AmazonPay payment method options. - """ - bacs_debit: NotRequired[ - "SetupIntent.ModifyParamsPaymentMethodOptionsBacsDebit" - ] - """ - If this is a `bacs_debit` SetupIntent, this sub-hash contains details about the Bacs Debit payment method options. - """ - card: NotRequired["SetupIntent.ModifyParamsPaymentMethodOptionsCard"] - """ - Configuration for any card setup attempted on this SetupIntent. - """ - card_present: NotRequired[ - "SetupIntent.ModifyParamsPaymentMethodOptionsCardPresent" - ] - """ - If this is a `card_present` PaymentMethod, this sub-hash contains details about the card-present payment method options. - """ - klarna: NotRequired[ - "SetupIntent.ModifyParamsPaymentMethodOptionsKlarna" - ] - """ - If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method options. - """ - link: NotRequired["SetupIntent.ModifyParamsPaymentMethodOptionsLink"] - """ - If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options. - """ - paypal: NotRequired[ - "SetupIntent.ModifyParamsPaymentMethodOptionsPaypal" - ] - """ - If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options. - """ - payto: NotRequired["SetupIntent.ModifyParamsPaymentMethodOptionsPayto"] - """ - If this is a `payto` SetupIntent, this sub-hash contains details about the PayTo payment method options. - """ - pix: NotRequired["SetupIntent.ModifyParamsPaymentMethodOptionsPix"] - """ - If this is a `pix` SetupIntent, this sub-hash contains details about the Pix payment method options. - """ - sepa_debit: NotRequired[ - "SetupIntent.ModifyParamsPaymentMethodOptionsSepaDebit" - ] - """ - If this is a `sepa_debit` SetupIntent, this sub-hash contains details about the SEPA Debit payment method options. - """ - us_bank_account: NotRequired[ - "SetupIntent.ModifyParamsPaymentMethodOptionsUsBankAccount" - ] - """ - If this is a `us_bank_account` SetupIntent, this sub-hash contains details about the US bank account payment method options. - """ - - class ModifyParamsPaymentMethodOptionsAcssDebit(TypedDict): - currency: NotRequired[Literal["cad", "usd"]] - """ - 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). - """ - mandate_options: NotRequired[ - "SetupIntent.ModifyParamsPaymentMethodOptionsAcssDebitMandateOptions" - ] - """ - Additional fields for Mandate creation - """ - verification_method: NotRequired[ - Literal["automatic", "instant", "microdeposits"] - ] - """ - Bank account verification method. - """ - - class ModifyParamsPaymentMethodOptionsAcssDebitMandateOptions(TypedDict): - custom_mandate_url: NotRequired["Literal['']|str"] - """ - A URL for custom mandate text to render during confirmation step. - The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent, - or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent. - """ - default_for: NotRequired[List[Literal["invoice", "subscription"]]] - """ - List of Stripe products where this mandate can be selected automatically. - """ - interval_description: NotRequired[str] - """ - Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'. - """ - payment_schedule: NotRequired[ - Literal["combined", "interval", "sporadic"] - ] - """ - Payment schedule for the mandate. - """ - transaction_type: NotRequired[Literal["business", "personal"]] - """ - Transaction type of the mandate. - """ - - class ModifyParamsPaymentMethodOptionsAmazonPay(TypedDict): - pass - - class ModifyParamsPaymentMethodOptionsBacsDebit(TypedDict): - mandate_options: NotRequired[ - "SetupIntent.ModifyParamsPaymentMethodOptionsBacsDebitMandateOptions" - ] - """ - Additional fields for Mandate creation - """ - - class ModifyParamsPaymentMethodOptionsBacsDebitMandateOptions(TypedDict): - reference_prefix: NotRequired["Literal['']|str"] - """ - Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'. - """ - - class ModifyParamsPaymentMethodOptionsCard(TypedDict): - mandate_options: NotRequired[ - "SetupIntent.ModifyParamsPaymentMethodOptionsCardMandateOptions" - ] - """ - Configuration options for setting up an eMandate for cards issued in India. - """ - moto: NotRequired[bool] - """ - When specified, this parameter signals that a card has been collected - as MOTO (Mail Order Telephone Order) and thus out of scope for SCA. This - parameter can only be provided during confirmation. - """ - network: NotRequired[ - Literal[ - "amex", - "cartes_bancaires", - "diners", - "discover", - "eftpos_au", - "girocard", - "interac", - "jcb", - "link", - "mastercard", - "unionpay", - "unknown", - "visa", - ] - ] - """ - Selected network to process this SetupIntent on. Depends on the available networks of the card attached to the SetupIntent. Can be only set confirm-time. - """ - request_three_d_secure: NotRequired[ - Literal["any", "automatic", "challenge"] - ] - """ - We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. - """ - three_d_secure: NotRequired[ - "SetupIntent.ModifyParamsPaymentMethodOptionsCardThreeDSecure" - ] - """ - If 3D Secure authentication was performed with a third-party provider, - the authentication details to use for this setup. - """ - - class ModifyParamsPaymentMethodOptionsCardMandateOptions(TypedDict): - amount: int - """ - Amount to be charged for future payments. - """ - amount_type: Literal["fixed", "maximum"] - """ - One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. - """ - currency: str - """ - Currency in which future payments will be charged. 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). - """ - description: NotRequired[str] - """ - A description of the mandate or subscription that is meant to be displayed to the customer. - """ - end_date: NotRequired[int] - """ - End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. - """ - interval: Literal["day", "month", "sporadic", "week", "year"] - """ - Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`. - """ - interval_count: NotRequired[int] - """ - The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`. - """ - reference: str - """ - Unique identifier for the mandate or subscription. - """ - start_date: int - """ - Start date of the mandate or subscription. Start date should not be lesser than yesterday. - """ - supported_types: NotRequired[List[Literal["india"]]] - """ - Specifies the type of mandates supported. Possible values are `india`. - """ - - class ModifyParamsPaymentMethodOptionsCardPresent(TypedDict): - pass - - class ModifyParamsPaymentMethodOptionsCardThreeDSecure(TypedDict): - ares_trans_status: NotRequired[ - Literal["A", "C", "I", "N", "R", "U", "Y"] - ] - """ - The `transStatus` returned from the card Issuer's ACS in the ARes. - """ - cryptogram: NotRequired[str] - """ - The cryptogram, also known as the "authentication value" (AAV, CAVV or - AEVV). This value is 20 bytes, base64-encoded into a 28-character string. - (Most 3D Secure providers will return the base64-encoded version, which - is what you should specify here.) - """ - electronic_commerce_indicator: NotRequired[ - Literal["01", "02", "05", "06", "07"] - ] - """ - The Electronic Commerce Indicator (ECI) is returned by your 3D Secure - provider and indicates what degree of authentication was performed. - """ - network_options: NotRequired[ - "SetupIntent.ModifyParamsPaymentMethodOptionsCardThreeDSecureNetworkOptions" - ] - """ - Network specific 3DS fields. Network specific arguments require an - explicit card brand choice. The parameter `payment_method_options.card.network`` - must be populated accordingly - """ - requestor_challenge_indicator: NotRequired[str] - """ - The challenge indicator (`threeDSRequestorChallengeInd`) which was requested in the - AReq sent to the card Issuer's ACS. A string containing 2 digits from 01-99. - """ - transaction_id: NotRequired[str] - """ - For 3D Secure 1, the XID. For 3D Secure 2, the Directory Server - Transaction ID (dsTransID). - """ - version: NotRequired[Literal["1.0.2", "2.1.0", "2.2.0"]] - """ - The version of 3D Secure that was performed. - """ - - class ModifyParamsPaymentMethodOptionsCardThreeDSecureNetworkOptions( - TypedDict, - ): - cartes_bancaires: NotRequired[ - "SetupIntent.ModifyParamsPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancaires" - ] - """ - Cartes Bancaires-specific 3DS fields. - """ - - class ModifyParamsPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancaires( - TypedDict, - ): - cb_avalgo: Literal["0", "1", "2", "3", "4", "A"] - """ - The cryptogram calculation algorithm used by the card Issuer's ACS - to calculate the Authentication cryptogram. Also known as `cavvAlgorithm`. - messageExtension: CB-AVALGO - """ - cb_exemption: NotRequired[str] - """ - The exemption indicator returned from Cartes Bancaires in the ARes. - message extension: CB-EXEMPTION; string (4 characters) - This is a 3 byte bitmap (low significant byte first and most significant - bit first) that has been Base64 encoded - """ - cb_score: NotRequired[int] - """ - The risk score returned from Cartes Bancaires in the ARes. - message extension: CB-SCORE; numeric value 0-99 - """ - - class ModifyParamsPaymentMethodOptionsKlarna(TypedDict): - currency: NotRequired[str] - """ - The currency of the SetupIntent. Three letter ISO currency code. - """ - on_demand: NotRequired[ - "SetupIntent.ModifyParamsPaymentMethodOptionsKlarnaOnDemand" - ] - """ - On-demand details if setting up a payment method for on-demand payments. - """ - preferred_locale: NotRequired[ - Literal[ - "cs-CZ", - "da-DK", - "de-AT", - "de-CH", - "de-DE", - "el-GR", - "en-AT", - "en-AU", - "en-BE", - "en-CA", - "en-CH", - "en-CZ", - "en-DE", - "en-DK", - "en-ES", - "en-FI", - "en-FR", - "en-GB", - "en-GR", - "en-IE", - "en-IT", - "en-NL", - "en-NO", - "en-NZ", - "en-PL", - "en-PT", - "en-RO", - "en-SE", - "en-US", - "es-ES", - "es-US", - "fi-FI", - "fr-BE", - "fr-CA", - "fr-CH", - "fr-FR", - "it-CH", - "it-IT", - "nb-NO", - "nl-BE", - "nl-NL", - "pl-PL", - "pt-PT", - "ro-RO", - "sv-FI", - "sv-SE", - ] - ] - """ - Preferred language of the Klarna authorization page that the customer is redirected to - """ - subscriptions: NotRequired[ - "Literal['']|List[SetupIntent.ModifyParamsPaymentMethodOptionsKlarnaSubscription]" - ] - """ - Subscription details if setting up or charging a subscription - """ - - class ModifyParamsPaymentMethodOptionsKlarnaOnDemand(TypedDict): - average_amount: NotRequired[int] - """ - Your average amount value. You can use a value across your customer base, or segment based on customer type, country, etc. - """ - maximum_amount: NotRequired[int] - """ - The maximum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. - """ - minimum_amount: NotRequired[int] - """ - The lowest or minimum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. - """ - purchase_interval: NotRequired[Literal["day", "month", "week", "year"]] - """ - Interval at which the customer is making purchases - """ - purchase_interval_count: NotRequired[int] - """ - The number of `purchase_interval` between charges - """ - - class ModifyParamsPaymentMethodOptionsKlarnaSubscription(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Unit of time between subscription charges. - """ - interval_count: NotRequired[int] - """ - The number of intervals (specified in the `interval` attribute) between subscription charges. For example, `interval=month` and `interval_count=3` charges every 3 months. - """ - name: NotRequired[str] - """ - Name for subscription. - """ - next_billing: "SetupIntent.ModifyParamsPaymentMethodOptionsKlarnaSubscriptionNextBilling" - """ - Describes the upcoming charge for this subscription. - """ - reference: str - """ - A non-customer-facing reference to correlate subscription charges in the Klarna app. Use a value that persists across subscription charges. - """ - - class ModifyParamsPaymentMethodOptionsKlarnaSubscriptionNextBilling( - TypedDict, - ): - amount: int - """ - The amount of the next charge for the subscription. - """ - date: str - """ - The date of the next charge for the subscription in YYYY-MM-DD format. - """ - - class ModifyParamsPaymentMethodOptionsLink(TypedDict): - persistent_token: NotRequired[str] - """ - [Deprecated] This is a legacy parameter that no longer has any function. - """ - - class ModifyParamsPaymentMethodOptionsPaypal(TypedDict): - billing_agreement_id: NotRequired[str] - """ - The PayPal Billing Agreement ID (BAID). This is an ID generated by PayPal which represents the mandate between the merchant and the customer. - """ - currency: NotRequired[str] - subsellers: NotRequired[List[str]] - """ - The Stripe connected account IDs of the sellers on the platform for this transaction (optional). Only allowed when [separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) are used. - """ - - class ModifyParamsPaymentMethodOptionsPayto(TypedDict): - mandate_options: NotRequired[ - "SetupIntent.ModifyParamsPaymentMethodOptionsPaytoMandateOptions" - ] - """ - Additional fields for Mandate creation. - """ - - class ModifyParamsPaymentMethodOptionsPaytoMandateOptions(TypedDict): - amount: NotRequired[int] - """ - Amount that will be collected. It is required when `amount_type` is `fixed`. - """ - amount_type: NotRequired[Literal["fixed", "maximum"]] - """ - The type of amount that will be collected. The amount charged must be exact or up to the value of `amount` param for `fixed` or `maximum` type respectively. - """ - end_date: NotRequired[str] - """ - Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no end date. - """ - payment_schedule: NotRequired[ - Literal[ - "adhoc", - "annual", - "daily", - "fortnightly", - "monthly", - "quarterly", - "semi_annual", - "weekly", - ] - ] - """ - The periodicity at which payments will be collected. - """ - payments_per_period: NotRequired[int] - """ - The number of payments that will be made during a payment period. Defaults to 1 except for when `payment_schedule` is `adhoc`. In that case, it defaults to no limit. - """ - purpose: NotRequired[ - Literal[ - "dependant_support", - "government", - "loan", - "mortgage", - "other", - "pension", - "personal", - "retail", - "salary", - "tax", - "utility", - ] - ] - """ - The purpose for which payments are made. Defaults to retail. - """ - start_date: NotRequired[str] - """ - Date, in YYYY-MM-DD format, from which payments will be collected. Defaults to confirmation time. - """ - - class ModifyParamsPaymentMethodOptionsPix(TypedDict): - mandate_options: NotRequired[ - "SetupIntent.ModifyParamsPaymentMethodOptionsPixMandateOptions" - ] - """ - Additional fields for mandate creation. - """ - - class ModifyParamsPaymentMethodOptionsPixMandateOptions(TypedDict): - amount: NotRequired[int] - """ - Amount to be charged for future payments. Required when `amount_type=fixed`. If not provided for `amount_type=maximum`, defaults to 40000. - """ - amount_includes_iof: NotRequired[Literal["always", "never"]] - """ - Determines if the amount includes the IOF tax. Defaults to `never`. - """ - amount_type: NotRequired[Literal["fixed", "maximum"]] - """ - Type of amount. Defaults to `maximum`. - """ - currency: NotRequired[str] - """ - Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Only `brl` is supported currently. - """ - end_date: NotRequired[str] - """ - Date when the mandate expires and no further payments will be charged, in `YYYY-MM-DD`. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. - """ - payment_schedule: NotRequired[ - Literal["halfyearly", "monthly", "quarterly", "weekly", "yearly"] - ] - """ - Schedule at which the future payments will be charged. Defaults to `weekly`. - """ - reference: NotRequired[str] - """ - Subscription name displayed to buyers in their bank app. Defaults to the displayable business name. - """ - start_date: NotRequired[str] - """ - Start date of the mandate, in `YYYY-MM-DD`. Start date should be at least 3 days in the future. Defaults to 3 days after the current date. - """ - - class ModifyParamsPaymentMethodOptionsSepaDebit(TypedDict): - mandate_options: NotRequired[ - "SetupIntent.ModifyParamsPaymentMethodOptionsSepaDebitMandateOptions" - ] - """ - Additional fields for Mandate creation - """ - - class ModifyParamsPaymentMethodOptionsSepaDebitMandateOptions(TypedDict): - reference_prefix: NotRequired["Literal['']|str"] - """ - Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'. - """ - - class ModifyParamsPaymentMethodOptionsUsBankAccount(TypedDict): - financial_connections: NotRequired[ - "SetupIntent.ModifyParamsPaymentMethodOptionsUsBankAccountFinancialConnections" - ] - """ - Additional fields for Financial Connections Session creation - """ - mandate_options: NotRequired[ - "SetupIntent.ModifyParamsPaymentMethodOptionsUsBankAccountMandateOptions" - ] - """ - Additional fields for Mandate creation - """ - networks: NotRequired[ - "SetupIntent.ModifyParamsPaymentMethodOptionsUsBankAccountNetworks" - ] - """ - Additional fields for network related functions - """ - verification_method: NotRequired[ - Literal["automatic", "instant", "microdeposits"] - ] - """ - Bank account verification method. - """ - - class ModifyParamsPaymentMethodOptionsUsBankAccountFinancialConnections( - TypedDict, - ): - filters: NotRequired[ - "SetupIntent.ModifyParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters" - ] - """ - Provide filters for the linked accounts that the customer can select for the payment method. - """ - manual_entry: NotRequired[ - "SetupIntent.ModifyParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsManualEntry" - ] - """ - Customize manual entry behavior - """ - permissions: NotRequired[ - List[ - Literal[ - "balances", "ownership", "payment_method", "transactions" - ] - ] - ] - """ - The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. - """ - prefetch: NotRequired[ - List[ - Literal[ - "balances", - "inferred_balances", - "ownership", - "transactions", - ] - ] - ] - """ - List of data features that you would like to retrieve upon account creation. - """ - return_url: NotRequired[str] - """ - For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. - """ - - class ModifyParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters( - TypedDict, - ): - account_subcategories: NotRequired[ - List[Literal["checking", "savings"]] - ] - """ - The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`. - """ - institution: NotRequired[str] - """ - ID of the institution to use to filter for selectable accounts. - """ - - class ModifyParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsManualEntry( - TypedDict, - ): - mode: Literal["automatic", "custom"] - """ - Settings for configuring manual entry of account details. - """ - - class ModifyParamsPaymentMethodOptionsUsBankAccountMandateOptions( - TypedDict, - ): - collection_method: NotRequired["Literal['']|Literal['paper']"] - """ - The method used to collect offline mandate customer acceptance. - """ - - class ModifyParamsPaymentMethodOptionsUsBankAccountNetworks(TypedDict): - requested: NotRequired[List[Literal["ach", "us_domestic_wire"]]] - """ - Triggers validations to run across the selected networks - """ - - class RetrieveParams(RequestOptions): - client_secret: NotRequired[str] - """ - The client secret of the SetupIntent. We require this string if you use a publishable key to retrieve the SetupIntent. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class VerifyMicrodepositsParams(RequestOptions): - amounts: NotRequired[List[int]] - """ - Two positive integers, in *cents*, equal to the values of the microdeposits sent to the bank account. - """ - descriptor_code: NotRequired[str] - """ - A six-character code starting with SM present in the microdeposit sent to the bank account. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - application: Optional[ExpandableField["Application"]] """ ID of the Connect application that created the SetupIntent. @@ -5934,7 +989,7 @@ class VerifyMicrodepositsParams(RequestOptions): @classmethod def _cls_cancel( - cls, intent: str, **params: Unpack["SetupIntent.CancelParams"] + cls, intent: str, **params: Unpack["SetupIntentCancelParams"] ) -> "SetupIntent": """ You can cancel a SetupIntent object when it's in one of these statuses: requires_payment_method, requires_confirmation, or requires_action. @@ -5955,7 +1010,7 @@ def _cls_cancel( @overload @staticmethod def cancel( - intent: str, **params: Unpack["SetupIntent.CancelParams"] + intent: str, **params: Unpack["SetupIntentCancelParams"] ) -> "SetupIntent": """ You can cancel a SetupIntent object when it's in one of these statuses: requires_payment_method, requires_confirmation, or requires_action. @@ -5966,7 +1021,7 @@ def cancel( @overload def cancel( - self, **params: Unpack["SetupIntent.CancelParams"] + self, **params: Unpack["SetupIntentCancelParams"] ) -> "SetupIntent": """ You can cancel a SetupIntent object when it's in one of these statuses: requires_payment_method, requires_confirmation, or requires_action. @@ -5977,7 +1032,7 @@ def cancel( @class_method_variant("_cls_cancel") def cancel( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["SetupIntent.CancelParams"] + self, **params: Unpack["SetupIntentCancelParams"] ) -> "SetupIntent": """ You can cancel a SetupIntent object when it's in one of these statuses: requires_payment_method, requires_confirmation, or requires_action. @@ -5997,7 +1052,7 @@ def cancel( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_cancel_async( - cls, intent: str, **params: Unpack["SetupIntent.CancelParams"] + cls, intent: str, **params: Unpack["SetupIntentCancelParams"] ) -> "SetupIntent": """ You can cancel a SetupIntent object when it's in one of these statuses: requires_payment_method, requires_confirmation, or requires_action. @@ -6018,7 +1073,7 @@ async def _cls_cancel_async( @overload @staticmethod async def cancel_async( - intent: str, **params: Unpack["SetupIntent.CancelParams"] + intent: str, **params: Unpack["SetupIntentCancelParams"] ) -> "SetupIntent": """ You can cancel a SetupIntent object when it's in one of these statuses: requires_payment_method, requires_confirmation, or requires_action. @@ -6029,7 +1084,7 @@ async def cancel_async( @overload async def cancel_async( - self, **params: Unpack["SetupIntent.CancelParams"] + self, **params: Unpack["SetupIntentCancelParams"] ) -> "SetupIntent": """ You can cancel a SetupIntent object when it's in one of these statuses: requires_payment_method, requires_confirmation, or requires_action. @@ -6040,7 +1095,7 @@ async def cancel_async( @class_method_variant("_cls_cancel_async") async def cancel_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["SetupIntent.CancelParams"] + self, **params: Unpack["SetupIntentCancelParams"] ) -> "SetupIntent": """ You can cancel a SetupIntent object when it's in one of these statuses: requires_payment_method, requires_confirmation, or requires_action. @@ -6060,7 +1115,7 @@ async def cancel_async( # pyright: ignore[reportGeneralTypeIssues] @classmethod def _cls_confirm( - cls, intent: str, **params: Unpack["SetupIntent.ConfirmParams"] + cls, intent: str, **params: Unpack["SetupIntentConfirmParams"] ) -> "SetupIntent": """ Confirm that your customer intends to set up the current or @@ -6092,7 +1147,7 @@ def _cls_confirm( @overload @staticmethod def confirm( - intent: str, **params: Unpack["SetupIntent.ConfirmParams"] + intent: str, **params: Unpack["SetupIntentConfirmParams"] ) -> "SetupIntent": """ Confirm that your customer intends to set up the current or @@ -6114,7 +1169,7 @@ def confirm( @overload def confirm( - self, **params: Unpack["SetupIntent.ConfirmParams"] + self, **params: Unpack["SetupIntentConfirmParams"] ) -> "SetupIntent": """ Confirm that your customer intends to set up the current or @@ -6136,7 +1191,7 @@ def confirm( @class_method_variant("_cls_confirm") def confirm( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["SetupIntent.ConfirmParams"] + self, **params: Unpack["SetupIntentConfirmParams"] ) -> "SetupIntent": """ Confirm that your customer intends to set up the current or @@ -6167,7 +1222,7 @@ def confirm( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_confirm_async( - cls, intent: str, **params: Unpack["SetupIntent.ConfirmParams"] + cls, intent: str, **params: Unpack["SetupIntentConfirmParams"] ) -> "SetupIntent": """ Confirm that your customer intends to set up the current or @@ -6199,7 +1254,7 @@ async def _cls_confirm_async( @overload @staticmethod async def confirm_async( - intent: str, **params: Unpack["SetupIntent.ConfirmParams"] + intent: str, **params: Unpack["SetupIntentConfirmParams"] ) -> "SetupIntent": """ Confirm that your customer intends to set up the current or @@ -6221,7 +1276,7 @@ async def confirm_async( @overload async def confirm_async( - self, **params: Unpack["SetupIntent.ConfirmParams"] + self, **params: Unpack["SetupIntentConfirmParams"] ) -> "SetupIntent": """ Confirm that your customer intends to set up the current or @@ -6243,7 +1298,7 @@ async def confirm_async( @class_method_variant("_cls_confirm_async") async def confirm_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["SetupIntent.ConfirmParams"] + self, **params: Unpack["SetupIntentConfirmParams"] ) -> "SetupIntent": """ Confirm that your customer intends to set up the current or @@ -6274,7 +1329,7 @@ async def confirm_async( # pyright: ignore[reportGeneralTypeIssues] @classmethod def create( - cls, **params: Unpack["SetupIntent.CreateParams"] + cls, **params: Unpack["SetupIntentCreateParams"] ) -> "SetupIntent": """ Creates a SetupIntent object. @@ -6293,7 +1348,7 @@ def create( @classmethod async def create_async( - cls, **params: Unpack["SetupIntent.CreateParams"] + cls, **params: Unpack["SetupIntentCreateParams"] ) -> "SetupIntent": """ Creates a SetupIntent object. @@ -6312,7 +1367,7 @@ async def create_async( @classmethod def list( - cls, **params: Unpack["SetupIntent.ListParams"] + cls, **params: Unpack["SetupIntentListParams"] ) -> ListObject["SetupIntent"]: """ Returns a list of SetupIntents. @@ -6332,7 +1387,7 @@ def list( @classmethod async def list_async( - cls, **params: Unpack["SetupIntent.ListParams"] + cls, **params: Unpack["SetupIntentListParams"] ) -> ListObject["SetupIntent"]: """ Returns a list of SetupIntents. @@ -6352,7 +1407,7 @@ async def list_async( @classmethod def modify( - cls, id: str, **params: Unpack["SetupIntent.ModifyParams"] + cls, id: str, **params: Unpack["SetupIntentModifyParams"] ) -> "SetupIntent": """ Updates a SetupIntent object. @@ -6369,7 +1424,7 @@ def modify( @classmethod async def modify_async( - cls, id: str, **params: Unpack["SetupIntent.ModifyParams"] + cls, id: str, **params: Unpack["SetupIntentModifyParams"] ) -> "SetupIntent": """ Updates a SetupIntent object. @@ -6386,7 +1441,7 @@ async def modify_async( @classmethod def retrieve( - cls, id: str, **params: Unpack["SetupIntent.RetrieveParams"] + cls, id: str, **params: Unpack["SetupIntentRetrieveParams"] ) -> "SetupIntent": """ Retrieves the details of a SetupIntent that has previously been created. @@ -6401,7 +1456,7 @@ def retrieve( @classmethod async def retrieve_async( - cls, id: str, **params: Unpack["SetupIntent.RetrieveParams"] + cls, id: str, **params: Unpack["SetupIntentRetrieveParams"] ) -> "SetupIntent": """ Retrieves the details of a SetupIntent that has previously been created. @@ -6418,7 +1473,7 @@ async def retrieve_async( def _cls_verify_microdeposits( cls, intent: str, - **params: Unpack["SetupIntent.VerifyMicrodepositsParams"], + **params: Unpack["SetupIntentVerifyMicrodepositsParams"], ) -> "SetupIntent": """ Verifies microdeposits on a SetupIntent object. @@ -6437,7 +1492,7 @@ def _cls_verify_microdeposits( @overload @staticmethod def verify_microdeposits( - intent: str, **params: Unpack["SetupIntent.VerifyMicrodepositsParams"] + intent: str, **params: Unpack["SetupIntentVerifyMicrodepositsParams"] ) -> "SetupIntent": """ Verifies microdeposits on a SetupIntent object. @@ -6446,7 +1501,7 @@ def verify_microdeposits( @overload def verify_microdeposits( - self, **params: Unpack["SetupIntent.VerifyMicrodepositsParams"] + self, **params: Unpack["SetupIntentVerifyMicrodepositsParams"] ) -> "SetupIntent": """ Verifies microdeposits on a SetupIntent object. @@ -6455,7 +1510,7 @@ def verify_microdeposits( @class_method_variant("_cls_verify_microdeposits") def verify_microdeposits( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["SetupIntent.VerifyMicrodepositsParams"] + self, **params: Unpack["SetupIntentVerifyMicrodepositsParams"] ) -> "SetupIntent": """ Verifies microdeposits on a SetupIntent object. @@ -6475,7 +1530,7 @@ def verify_microdeposits( # pyright: ignore[reportGeneralTypeIssues] async def _cls_verify_microdeposits_async( cls, intent: str, - **params: Unpack["SetupIntent.VerifyMicrodepositsParams"], + **params: Unpack["SetupIntentVerifyMicrodepositsParams"], ) -> "SetupIntent": """ Verifies microdeposits on a SetupIntent object. @@ -6494,7 +1549,7 @@ async def _cls_verify_microdeposits_async( @overload @staticmethod async def verify_microdeposits_async( - intent: str, **params: Unpack["SetupIntent.VerifyMicrodepositsParams"] + intent: str, **params: Unpack["SetupIntentVerifyMicrodepositsParams"] ) -> "SetupIntent": """ Verifies microdeposits on a SetupIntent object. @@ -6503,7 +1558,7 @@ async def verify_microdeposits_async( @overload async def verify_microdeposits_async( - self, **params: Unpack["SetupIntent.VerifyMicrodepositsParams"] + self, **params: Unpack["SetupIntentVerifyMicrodepositsParams"] ) -> "SetupIntent": """ Verifies microdeposits on a SetupIntent object. @@ -6512,7 +1567,7 @@ async def verify_microdeposits_async( @class_method_variant("_cls_verify_microdeposits_async") async def verify_microdeposits_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["SetupIntent.VerifyMicrodepositsParams"] + self, **params: Unpack["SetupIntentVerifyMicrodepositsParams"] ) -> "SetupIntent": """ Verifies microdeposits on a SetupIntent object. diff --git a/stripe/_setup_intent_service.py b/stripe/_setup_intent_service.py index c2525c51d..ed7492301 100644 --- a/stripe/_setup_intent_service.py +++ b/stripe/_setup_intent_service.py @@ -5,5145 +5,35 @@ from stripe._setup_intent import SetupIntent from stripe._stripe_service import StripeService from stripe._util import sanitize_id -from typing import Dict, List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params._setup_intent_cancel_params import ( + SetupIntentCancelParams, + ) + from stripe.params._setup_intent_confirm_params import ( + SetupIntentConfirmParams, + ) + from stripe.params._setup_intent_create_params import ( + SetupIntentCreateParams, + ) + from stripe.params._setup_intent_list_params import SetupIntentListParams + from stripe.params._setup_intent_retrieve_params import ( + SetupIntentRetrieveParams, + ) + from stripe.params._setup_intent_update_params import ( + SetupIntentUpdateParams, + ) + from stripe.params._setup_intent_verify_microdeposits_params import ( + SetupIntentVerifyMicrodepositsParams, + ) class SetupIntentService(StripeService): - class CancelParams(TypedDict): - cancellation_reason: NotRequired[ - Literal["abandoned", "duplicate", "requested_by_customer"] - ] - """ - Reason for canceling this SetupIntent. Possible values are: `abandoned`, `requested_by_customer`, or `duplicate` - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class ConfirmParams(TypedDict): - confirmation_token: NotRequired[str] - """ - ID of the ConfirmationToken used to confirm this SetupIntent. - - If the provided ConfirmationToken contains properties that are also being provided in this request, such as `payment_method`, then the values in this request will take precedence. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - mandate_data: NotRequired[ - "Literal['']|SetupIntentService.ConfirmParamsMandateData" - ] - payment_method: NotRequired[str] - """ - ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent. - """ - payment_method_data: NotRequired[ - "SetupIntentService.ConfirmParamsPaymentMethodData" - ] - """ - When included, this hash creates a PaymentMethod that is set as the [`payment_method`](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-payment_method) - value in the SetupIntent. - """ - payment_method_options: NotRequired[ - "SetupIntentService.ConfirmParamsPaymentMethodOptions" - ] - """ - Payment method-specific configuration for this SetupIntent. - """ - return_url: NotRequired[str] - """ - The URL to redirect your customer back to after they authenticate on the payment method's app or site. - If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. - This parameter is only used for cards and other redirect-based payment methods. - """ - use_stripe_sdk: NotRequired[bool] - """ - Set to `true` when confirming server-side and using Stripe.js, iOS, or Android client-side SDKs to handle the next actions. - """ - - class ConfirmParamsMandateData(TypedDict): - customer_acceptance: NotRequired[ - "SetupIntentService.ConfirmParamsMandateDataCustomerAcceptance" - ] - """ - This hash contains details about the customer acceptance of the Mandate. - """ - - class ConfirmParamsMandateDataCustomerAcceptance(TypedDict): - accepted_at: NotRequired[int] - """ - The time at which the customer accepted the Mandate. - """ - offline: NotRequired[ - "SetupIntentService.ConfirmParamsMandateDataCustomerAcceptanceOffline" - ] - """ - If this is a Mandate accepted offline, this hash contains details about the offline acceptance. - """ - online: NotRequired[ - "SetupIntentService.ConfirmParamsMandateDataCustomerAcceptanceOnline" - ] - """ - If this is a Mandate accepted online, this hash contains details about the online acceptance. - """ - type: Literal["offline", "online"] - """ - The type of customer acceptance information included with the Mandate. One of `online` or `offline`. - """ - - class ConfirmParamsMandateDataCustomerAcceptanceOffline(TypedDict): - pass - - class ConfirmParamsMandateDataCustomerAcceptanceOnline(TypedDict): - ip_address: NotRequired[str] - """ - The IP address from which the Mandate was accepted by the customer. - """ - user_agent: NotRequired[str] - """ - The user agent of the browser from which the Mandate was accepted by the customer. - """ - - class ConfirmParamsPaymentMethodData(TypedDict): - acss_debit: NotRequired[ - "SetupIntentService.ConfirmParamsPaymentMethodDataAcssDebit" - ] - """ - If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method. - """ - affirm: NotRequired[ - "SetupIntentService.ConfirmParamsPaymentMethodDataAffirm" - ] - """ - If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method. - """ - afterpay_clearpay: NotRequired[ - "SetupIntentService.ConfirmParamsPaymentMethodDataAfterpayClearpay" - ] - """ - If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method. - """ - alipay: NotRequired[ - "SetupIntentService.ConfirmParamsPaymentMethodDataAlipay" - ] - """ - If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. - """ - allow_redisplay: NotRequired[ - Literal["always", "limited", "unspecified"] - ] - """ - This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`. - """ - alma: NotRequired[ - "SetupIntentService.ConfirmParamsPaymentMethodDataAlma" - ] - """ - If this is a Alma PaymentMethod, this hash contains details about the Alma payment method. - """ - amazon_pay: NotRequired[ - "SetupIntentService.ConfirmParamsPaymentMethodDataAmazonPay" - ] - """ - If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method. - """ - au_becs_debit: NotRequired[ - "SetupIntentService.ConfirmParamsPaymentMethodDataAuBecsDebit" - ] - """ - If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. - """ - bacs_debit: NotRequired[ - "SetupIntentService.ConfirmParamsPaymentMethodDataBacsDebit" - ] - """ - If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account. - """ - bancontact: NotRequired[ - "SetupIntentService.ConfirmParamsPaymentMethodDataBancontact" - ] - """ - If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method. - """ - billie: NotRequired[ - "SetupIntentService.ConfirmParamsPaymentMethodDataBillie" - ] - """ - If this is a `billie` PaymentMethod, this hash contains details about the Billie payment method. - """ - billing_details: NotRequired[ - "SetupIntentService.ConfirmParamsPaymentMethodDataBillingDetails" - ] - """ - Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. - """ - blik: NotRequired[ - "SetupIntentService.ConfirmParamsPaymentMethodDataBlik" - ] - """ - If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method. - """ - boleto: NotRequired[ - "SetupIntentService.ConfirmParamsPaymentMethodDataBoleto" - ] - """ - If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method. - """ - cashapp: NotRequired[ - "SetupIntentService.ConfirmParamsPaymentMethodDataCashapp" - ] - """ - If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. - """ - crypto: NotRequired[ - "SetupIntentService.ConfirmParamsPaymentMethodDataCrypto" - ] - """ - If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment method. - """ - customer_balance: NotRequired[ - "SetupIntentService.ConfirmParamsPaymentMethodDataCustomerBalance" - ] - """ - If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. - """ - eps: NotRequired[ - "SetupIntentService.ConfirmParamsPaymentMethodDataEps" - ] - """ - If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. - """ - fpx: NotRequired[ - "SetupIntentService.ConfirmParamsPaymentMethodDataFpx" - ] - """ - If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method. - """ - giropay: NotRequired[ - "SetupIntentService.ConfirmParamsPaymentMethodDataGiropay" - ] - """ - If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method. - """ - gopay: NotRequired[ - "SetupIntentService.ConfirmParamsPaymentMethodDataGopay" - ] - """ - If this is a Gopay PaymentMethod, this hash contains details about the Gopay payment method. - """ - grabpay: NotRequired[ - "SetupIntentService.ConfirmParamsPaymentMethodDataGrabpay" - ] - """ - If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method. - """ - id_bank_transfer: NotRequired[ - "SetupIntentService.ConfirmParamsPaymentMethodDataIdBankTransfer" - ] - """ - If this is an `IdBankTransfer` PaymentMethod, this hash contains details about the IdBankTransfer payment method. - """ - ideal: NotRequired[ - "SetupIntentService.ConfirmParamsPaymentMethodDataIdeal" - ] - """ - If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. - """ - interac_present: NotRequired[ - "SetupIntentService.ConfirmParamsPaymentMethodDataInteracPresent" - ] - """ - If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. - """ - kakao_pay: NotRequired[ - "SetupIntentService.ConfirmParamsPaymentMethodDataKakaoPay" - ] - """ - If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method. - """ - klarna: NotRequired[ - "SetupIntentService.ConfirmParamsPaymentMethodDataKlarna" - ] - """ - If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method. - """ - konbini: NotRequired[ - "SetupIntentService.ConfirmParamsPaymentMethodDataKonbini" - ] - """ - If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. - """ - kr_card: NotRequired[ - "SetupIntentService.ConfirmParamsPaymentMethodDataKrCard" - ] - """ - If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method. - """ - link: NotRequired[ - "SetupIntentService.ConfirmParamsPaymentMethodDataLink" - ] - """ - If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. - """ - mb_way: NotRequired[ - "SetupIntentService.ConfirmParamsPaymentMethodDataMbWay" - ] - """ - If this is a MB WAY PaymentMethod, this hash contains details about the MB WAY payment method. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - mobilepay: NotRequired[ - "SetupIntentService.ConfirmParamsPaymentMethodDataMobilepay" - ] - """ - If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method. - """ - multibanco: NotRequired[ - "SetupIntentService.ConfirmParamsPaymentMethodDataMultibanco" - ] - """ - If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method. - """ - naver_pay: NotRequired[ - "SetupIntentService.ConfirmParamsPaymentMethodDataNaverPay" - ] - """ - If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method. - """ - nz_bank_account: NotRequired[ - "SetupIntentService.ConfirmParamsPaymentMethodDataNzBankAccount" - ] - """ - If this is an nz_bank_account PaymentMethod, this hash contains details about the nz_bank_account payment method. - """ - oxxo: NotRequired[ - "SetupIntentService.ConfirmParamsPaymentMethodDataOxxo" - ] - """ - If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. - """ - p24: NotRequired[ - "SetupIntentService.ConfirmParamsPaymentMethodDataP24" - ] - """ - If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. - """ - pay_by_bank: NotRequired[ - "SetupIntentService.ConfirmParamsPaymentMethodDataPayByBank" - ] - """ - If this is a `pay_by_bank` PaymentMethod, this hash contains details about the PayByBank payment method. - """ - payco: NotRequired[ - "SetupIntentService.ConfirmParamsPaymentMethodDataPayco" - ] - """ - If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method. - """ - paynow: NotRequired[ - "SetupIntentService.ConfirmParamsPaymentMethodDataPaynow" - ] - """ - If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method. - """ - paypal: NotRequired[ - "SetupIntentService.ConfirmParamsPaymentMethodDataPaypal" - ] - """ - If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method. - """ - paypay: NotRequired[ - "SetupIntentService.ConfirmParamsPaymentMethodDataPaypay" - ] - """ - If this is a `paypay` PaymentMethod, this hash contains details about the PayPay payment method. - """ - payto: NotRequired[ - "SetupIntentService.ConfirmParamsPaymentMethodDataPayto" - ] - """ - If this is a `payto` PaymentMethod, this hash contains details about the PayTo payment method. - """ - pix: NotRequired[ - "SetupIntentService.ConfirmParamsPaymentMethodDataPix" - ] - """ - If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method. - """ - promptpay: NotRequired[ - "SetupIntentService.ConfirmParamsPaymentMethodDataPromptpay" - ] - """ - If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method. - """ - qris: NotRequired[ - "SetupIntentService.ConfirmParamsPaymentMethodDataQris" - ] - """ - If this is a `qris` PaymentMethod, this hash contains details about the QRIS payment method. - """ - radar_options: NotRequired[ - "SetupIntentService.ConfirmParamsPaymentMethodDataRadarOptions" - ] - """ - Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. - """ - rechnung: NotRequired[ - "SetupIntentService.ConfirmParamsPaymentMethodDataRechnung" - ] - """ - If this is a `rechnung` PaymentMethod, this hash contains details about the Rechnung payment method. - """ - revolut_pay: NotRequired[ - "SetupIntentService.ConfirmParamsPaymentMethodDataRevolutPay" - ] - """ - If this is a `revolut_pay` PaymentMethod, this hash contains details about the Revolut Pay payment method. - """ - samsung_pay: NotRequired[ - "SetupIntentService.ConfirmParamsPaymentMethodDataSamsungPay" - ] - """ - If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method. - """ - satispay: NotRequired[ - "SetupIntentService.ConfirmParamsPaymentMethodDataSatispay" - ] - """ - If this is a `satispay` PaymentMethod, this hash contains details about the Satispay payment method. - """ - sepa_debit: NotRequired[ - "SetupIntentService.ConfirmParamsPaymentMethodDataSepaDebit" - ] - """ - If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. - """ - shopeepay: NotRequired[ - "SetupIntentService.ConfirmParamsPaymentMethodDataShopeepay" - ] - """ - If this is a Shopeepay PaymentMethod, this hash contains details about the Shopeepay payment method. - """ - sofort: NotRequired[ - "SetupIntentService.ConfirmParamsPaymentMethodDataSofort" - ] - """ - If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. - """ - stripe_balance: NotRequired[ - "SetupIntentService.ConfirmParamsPaymentMethodDataStripeBalance" - ] - """ - This hash contains details about the Stripe balance payment method. - """ - swish: NotRequired[ - "SetupIntentService.ConfirmParamsPaymentMethodDataSwish" - ] - """ - If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method. - """ - twint: NotRequired[ - "SetupIntentService.ConfirmParamsPaymentMethodDataTwint" - ] - """ - If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method. - """ - type: Literal[ - "acss_debit", - "affirm", - "afterpay_clearpay", - "alipay", - "alma", - "amazon_pay", - "au_becs_debit", - "bacs_debit", - "bancontact", - "billie", - "blik", - "boleto", - "cashapp", - "crypto", - "customer_balance", - "eps", - "fpx", - "giropay", - "gopay", - "grabpay", - "id_bank_transfer", - "ideal", - "kakao_pay", - "klarna", - "konbini", - "kr_card", - "link", - "mb_way", - "mobilepay", - "multibanco", - "naver_pay", - "nz_bank_account", - "oxxo", - "p24", - "pay_by_bank", - "payco", - "paynow", - "paypal", - "paypay", - "payto", - "pix", - "promptpay", - "qris", - "rechnung", - "revolut_pay", - "samsung_pay", - "satispay", - "sepa_debit", - "shopeepay", - "sofort", - "stripe_balance", - "swish", - "twint", - "us_bank_account", - "wechat_pay", - "zip", - ] - """ - The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. - """ - us_bank_account: NotRequired[ - "SetupIntentService.ConfirmParamsPaymentMethodDataUsBankAccount" - ] - """ - If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. - """ - wechat_pay: NotRequired[ - "SetupIntentService.ConfirmParamsPaymentMethodDataWechatPay" - ] - """ - If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method. - """ - zip: NotRequired[ - "SetupIntentService.ConfirmParamsPaymentMethodDataZip" - ] - """ - If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method. - """ - - class ConfirmParamsPaymentMethodDataAcssDebit(TypedDict): - account_number: str - """ - Customer's bank account number. - """ - institution_number: str - """ - Institution number of the customer's bank. - """ - transit_number: str - """ - Transit number of the customer's bank. - """ - - class ConfirmParamsPaymentMethodDataAffirm(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataAfterpayClearpay(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataAlipay(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataAlma(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataAmazonPay(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataAuBecsDebit(TypedDict): - account_number: str - """ - The account number for the bank account. - """ - bsb_number: str - """ - Bank-State-Branch number of the bank account. - """ - - class ConfirmParamsPaymentMethodDataBacsDebit(TypedDict): - account_number: NotRequired[str] - """ - Account number of the bank account that the funds will be debited from. - """ - sort_code: NotRequired[str] - """ - Sort code of the bank account. (e.g., `10-20-30`) - """ - - class ConfirmParamsPaymentMethodDataBancontact(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataBillie(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataBillingDetails(TypedDict): - address: NotRequired[ - "Literal['']|SetupIntentService.ConfirmParamsPaymentMethodDataBillingDetailsAddress" - ] - """ - Billing address. - """ - email: NotRequired["Literal['']|str"] - """ - Email address. - """ - name: NotRequired["Literal['']|str"] - """ - Full name. - """ - phone: NotRequired["Literal['']|str"] - """ - Billing phone number (including extension). - """ - tax_id: NotRequired[str] - """ - Taxpayer identification number. Used only for transactions between LATAM buyers and non-LATAM sellers. - """ - - class ConfirmParamsPaymentMethodDataBillingDetailsAddress(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. - """ - - class ConfirmParamsPaymentMethodDataBlik(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataBoleto(TypedDict): - tax_id: str - """ - The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers) - """ - - class ConfirmParamsPaymentMethodDataCashapp(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataCrypto(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataCustomerBalance(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataEps(TypedDict): - bank: NotRequired[ - Literal[ - "arzte_und_apotheker_bank", - "austrian_anadi_bank_ag", - "bank_austria", - "bankhaus_carl_spangler", - "bankhaus_schelhammer_und_schattera_ag", - "bawag_psk_ag", - "bks_bank_ag", - "brull_kallmus_bank_ag", - "btv_vier_lander_bank", - "capital_bank_grawe_gruppe_ag", - "deutsche_bank_ag", - "dolomitenbank", - "easybank_ag", - "erste_bank_und_sparkassen", - "hypo_alpeadriabank_international_ag", - "hypo_bank_burgenland_aktiengesellschaft", - "hypo_noe_lb_fur_niederosterreich_u_wien", - "hypo_oberosterreich_salzburg_steiermark", - "hypo_tirol_bank_ag", - "hypo_vorarlberg_bank_ag", - "marchfelder_bank", - "oberbank_ag", - "raiffeisen_bankengruppe_osterreich", - "schoellerbank_ag", - "sparda_bank_wien", - "volksbank_gruppe", - "volkskreditbank_ag", - "vr_bank_braunau", - ] - ] - """ - The customer's bank. - """ - - class ConfirmParamsPaymentMethodDataFpx(TypedDict): - account_holder_type: NotRequired[Literal["company", "individual"]] - """ - Account holder type for FPX transaction - """ - bank: Literal[ - "affin_bank", - "agrobank", - "alliance_bank", - "ambank", - "bank_islam", - "bank_muamalat", - "bank_of_china", - "bank_rakyat", - "bsn", - "cimb", - "deutsche_bank", - "hong_leong_bank", - "hsbc", - "kfh", - "maybank2e", - "maybank2u", - "ocbc", - "pb_enterprise", - "public_bank", - "rhb", - "standard_chartered", - "uob", - ] - """ - The customer's bank. - """ - - class ConfirmParamsPaymentMethodDataGiropay(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataGopay(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataGrabpay(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataIdBankTransfer(TypedDict): - bank: NotRequired[Literal["bca", "bni", "bri", "cimb", "permata"]] - """ - Bank where the account is held. - """ - - class ConfirmParamsPaymentMethodDataIdeal(TypedDict): - bank: NotRequired[ - Literal[ - "abn_amro", - "asn_bank", - "bunq", - "buut", - "handelsbanken", - "ing", - "knab", - "moneyou", - "n26", - "nn", - "rabobank", - "regiobank", - "revolut", - "sns_bank", - "triodos_bank", - "van_lanschot", - "yoursafe", - ] - ] - """ - The customer's bank. Only use this parameter for existing customers. Don't use it for new customers. - """ - - class ConfirmParamsPaymentMethodDataInteracPresent(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataKakaoPay(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataKlarna(TypedDict): - dob: NotRequired[ - "SetupIntentService.ConfirmParamsPaymentMethodDataKlarnaDob" - ] - """ - Customer's date of birth - """ - - class ConfirmParamsPaymentMethodDataKlarnaDob(TypedDict): - day: int - """ - The day of birth, between 1 and 31. - """ - month: int - """ - The month of birth, between 1 and 12. - """ - year: int - """ - The four-digit year of birth. - """ - - class ConfirmParamsPaymentMethodDataKonbini(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataKrCard(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataLink(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataMbWay(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataMobilepay(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataMultibanco(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataNaverPay(TypedDict): - funding: NotRequired[Literal["card", "points"]] - """ - Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`. - """ - - class ConfirmParamsPaymentMethodDataNzBankAccount(TypedDict): - account_holder_name: NotRequired[str] - """ - The name on the bank account. Only required if the account holder name is different from the name of the authorized signatory collected in the PaymentMethod's billing details. - """ - account_number: str - """ - The account number for the bank account. - """ - bank_code: str - """ - The numeric code for the bank account's bank. - """ - branch_code: str - """ - The numeric code for the bank account's bank branch. - """ - reference: NotRequired[str] - suffix: str - """ - The suffix of the bank account number. - """ - - class ConfirmParamsPaymentMethodDataOxxo(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataP24(TypedDict): - bank: NotRequired[ - Literal[ - "alior_bank", - "bank_millennium", - "bank_nowy_bfg_sa", - "bank_pekao_sa", - "banki_spbdzielcze", - "blik", - "bnp_paribas", - "boz", - "citi_handlowy", - "credit_agricole", - "envelobank", - "etransfer_pocztowy24", - "getin_bank", - "ideabank", - "ing", - "inteligo", - "mbank_mtransfer", - "nest_przelew", - "noble_pay", - "pbac_z_ipko", - "plus_bank", - "santander_przelew24", - "tmobile_usbugi_bankowe", - "toyota_bank", - "velobank", - "volkswagen_bank", - ] - ] - """ - The customer's bank. - """ - - class ConfirmParamsPaymentMethodDataPayByBank(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataPayco(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataPaynow(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataPaypal(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataPaypay(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataPayto(TypedDict): - account_number: NotRequired[str] - """ - The account number for the bank account. - """ - bsb_number: NotRequired[str] - """ - Bank-State-Branch number of the bank account. - """ - pay_id: NotRequired[str] - """ - The PayID alias for the bank account. - """ - - class ConfirmParamsPaymentMethodDataPix(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataPromptpay(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataQris(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataRadarOptions(TypedDict): - session: NotRequired[str] - """ - A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. - """ - - class ConfirmParamsPaymentMethodDataRechnung(TypedDict): - dob: "SetupIntentService.ConfirmParamsPaymentMethodDataRechnungDob" - """ - Customer's date of birth - """ - - class ConfirmParamsPaymentMethodDataRechnungDob(TypedDict): - day: int - """ - The day of birth, between 1 and 31. - """ - month: int - """ - The month of birth, between 1 and 12. - """ - year: int - """ - The four-digit year of birth. - """ - - class ConfirmParamsPaymentMethodDataRevolutPay(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataSamsungPay(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataSatispay(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataSepaDebit(TypedDict): - iban: str - """ - IBAN of the bank account. - """ - - class ConfirmParamsPaymentMethodDataShopeepay(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataSofort(TypedDict): - country: Literal["AT", "BE", "DE", "ES", "IT", "NL"] - """ - Two-letter ISO code representing the country the bank account is located in. - """ - - class ConfirmParamsPaymentMethodDataStripeBalance(TypedDict): - account: NotRequired[str] - """ - The connected account ID whose Stripe balance to use as the source of payment - """ - source_type: NotRequired[Literal["bank_account", "card", "fpx"]] - """ - The [source_type](https://docs.stripe.com/api/balance/balance_object#balance_object-available-source_types) of the balance - """ - - class ConfirmParamsPaymentMethodDataSwish(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataTwint(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataUsBankAccount(TypedDict): - account_holder_type: NotRequired[Literal["company", "individual"]] - """ - Account holder type: individual or company. - """ - account_number: NotRequired[str] - """ - Account number of the bank account. - """ - account_type: NotRequired[Literal["checking", "savings"]] - """ - Account type: checkings or savings. Defaults to checking if omitted. - """ - financial_connections_account: NotRequired[str] - """ - The ID of a Financial Connections Account to use as a payment method. - """ - routing_number: NotRequired[str] - """ - Routing number of the bank account. - """ - - class ConfirmParamsPaymentMethodDataWechatPay(TypedDict): - pass - - class ConfirmParamsPaymentMethodDataZip(TypedDict): - pass - - class ConfirmParamsPaymentMethodOptions(TypedDict): - acss_debit: NotRequired[ - "SetupIntentService.ConfirmParamsPaymentMethodOptionsAcssDebit" - ] - """ - If this is a `acss_debit` SetupIntent, this sub-hash contains details about the ACSS Debit payment method options. - """ - amazon_pay: NotRequired[ - "SetupIntentService.ConfirmParamsPaymentMethodOptionsAmazonPay" - ] - """ - If this is a `amazon_pay` SetupIntent, this sub-hash contains details about the AmazonPay payment method options. - """ - bacs_debit: NotRequired[ - "SetupIntentService.ConfirmParamsPaymentMethodOptionsBacsDebit" - ] - """ - If this is a `bacs_debit` SetupIntent, this sub-hash contains details about the Bacs Debit payment method options. - """ - card: NotRequired[ - "SetupIntentService.ConfirmParamsPaymentMethodOptionsCard" - ] - """ - Configuration for any card setup attempted on this SetupIntent. - """ - card_present: NotRequired[ - "SetupIntentService.ConfirmParamsPaymentMethodOptionsCardPresent" - ] - """ - If this is a `card_present` PaymentMethod, this sub-hash contains details about the card-present payment method options. - """ - klarna: NotRequired[ - "SetupIntentService.ConfirmParamsPaymentMethodOptionsKlarna" - ] - """ - If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method options. - """ - link: NotRequired[ - "SetupIntentService.ConfirmParamsPaymentMethodOptionsLink" - ] - """ - If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options. - """ - paypal: NotRequired[ - "SetupIntentService.ConfirmParamsPaymentMethodOptionsPaypal" - ] - """ - If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options. - """ - payto: NotRequired[ - "SetupIntentService.ConfirmParamsPaymentMethodOptionsPayto" - ] - """ - If this is a `payto` SetupIntent, this sub-hash contains details about the PayTo payment method options. - """ - pix: NotRequired[ - "SetupIntentService.ConfirmParamsPaymentMethodOptionsPix" - ] - """ - If this is a `pix` SetupIntent, this sub-hash contains details about the Pix payment method options. - """ - sepa_debit: NotRequired[ - "SetupIntentService.ConfirmParamsPaymentMethodOptionsSepaDebit" - ] - """ - If this is a `sepa_debit` SetupIntent, this sub-hash contains details about the SEPA Debit payment method options. - """ - us_bank_account: NotRequired[ - "SetupIntentService.ConfirmParamsPaymentMethodOptionsUsBankAccount" - ] - """ - If this is a `us_bank_account` SetupIntent, this sub-hash contains details about the US bank account payment method options. - """ - - class ConfirmParamsPaymentMethodOptionsAcssDebit(TypedDict): - currency: NotRequired[Literal["cad", "usd"]] - """ - 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). - """ - mandate_options: NotRequired[ - "SetupIntentService.ConfirmParamsPaymentMethodOptionsAcssDebitMandateOptions" - ] - """ - Additional fields for Mandate creation - """ - verification_method: NotRequired[ - Literal["automatic", "instant", "microdeposits"] - ] - """ - Bank account verification method. - """ - - class ConfirmParamsPaymentMethodOptionsAcssDebitMandateOptions(TypedDict): - custom_mandate_url: NotRequired["Literal['']|str"] - """ - A URL for custom mandate text to render during confirmation step. - The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent, - or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent. - """ - default_for: NotRequired[List[Literal["invoice", "subscription"]]] - """ - List of Stripe products where this mandate can be selected automatically. - """ - interval_description: NotRequired[str] - """ - Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'. - """ - payment_schedule: NotRequired[ - Literal["combined", "interval", "sporadic"] - ] - """ - Payment schedule for the mandate. - """ - transaction_type: NotRequired[Literal["business", "personal"]] - """ - Transaction type of the mandate. - """ - - class ConfirmParamsPaymentMethodOptionsAmazonPay(TypedDict): - pass - - class ConfirmParamsPaymentMethodOptionsBacsDebit(TypedDict): - mandate_options: NotRequired[ - "SetupIntentService.ConfirmParamsPaymentMethodOptionsBacsDebitMandateOptions" - ] - """ - Additional fields for Mandate creation - """ - - class ConfirmParamsPaymentMethodOptionsBacsDebitMandateOptions(TypedDict): - reference_prefix: NotRequired["Literal['']|str"] - """ - Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'. - """ - - class ConfirmParamsPaymentMethodOptionsCard(TypedDict): - mandate_options: NotRequired[ - "SetupIntentService.ConfirmParamsPaymentMethodOptionsCardMandateOptions" - ] - """ - Configuration options for setting up an eMandate for cards issued in India. - """ - moto: NotRequired[bool] - """ - When specified, this parameter signals that a card has been collected - as MOTO (Mail Order Telephone Order) and thus out of scope for SCA. This - parameter can only be provided during confirmation. - """ - network: NotRequired[ - Literal[ - "amex", - "cartes_bancaires", - "diners", - "discover", - "eftpos_au", - "girocard", - "interac", - "jcb", - "link", - "mastercard", - "unionpay", - "unknown", - "visa", - ] - ] - """ - Selected network to process this SetupIntent on. Depends on the available networks of the card attached to the SetupIntent. Can be only set confirm-time. - """ - request_three_d_secure: NotRequired[ - Literal["any", "automatic", "challenge"] - ] - """ - We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. - """ - three_d_secure: NotRequired[ - "SetupIntentService.ConfirmParamsPaymentMethodOptionsCardThreeDSecure" - ] - """ - If 3D Secure authentication was performed with a third-party provider, - the authentication details to use for this setup. - """ - - class ConfirmParamsPaymentMethodOptionsCardMandateOptions(TypedDict): - amount: int - """ - Amount to be charged for future payments. - """ - amount_type: Literal["fixed", "maximum"] - """ - One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. - """ - currency: str - """ - Currency in which future payments will be charged. 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). - """ - description: NotRequired[str] - """ - A description of the mandate or subscription that is meant to be displayed to the customer. - """ - end_date: NotRequired[int] - """ - End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. - """ - interval: Literal["day", "month", "sporadic", "week", "year"] - """ - Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`. - """ - interval_count: NotRequired[int] - """ - The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`. - """ - reference: str - """ - Unique identifier for the mandate or subscription. - """ - start_date: int - """ - Start date of the mandate or subscription. Start date should not be lesser than yesterday. - """ - supported_types: NotRequired[List[Literal["india"]]] - """ - Specifies the type of mandates supported. Possible values are `india`. - """ - - class ConfirmParamsPaymentMethodOptionsCardPresent(TypedDict): - pass - - class ConfirmParamsPaymentMethodOptionsCardThreeDSecure(TypedDict): - ares_trans_status: NotRequired[ - Literal["A", "C", "I", "N", "R", "U", "Y"] - ] - """ - The `transStatus` returned from the card Issuer's ACS in the ARes. - """ - cryptogram: NotRequired[str] - """ - The cryptogram, also known as the "authentication value" (AAV, CAVV or - AEVV). This value is 20 bytes, base64-encoded into a 28-character string. - (Most 3D Secure providers will return the base64-encoded version, which - is what you should specify here.) - """ - electronic_commerce_indicator: NotRequired[ - Literal["01", "02", "05", "06", "07"] - ] - """ - The Electronic Commerce Indicator (ECI) is returned by your 3D Secure - provider and indicates what degree of authentication was performed. - """ - network_options: NotRequired[ - "SetupIntentService.ConfirmParamsPaymentMethodOptionsCardThreeDSecureNetworkOptions" - ] - """ - Network specific 3DS fields. Network specific arguments require an - explicit card brand choice. The parameter `payment_method_options.card.network`` - must be populated accordingly - """ - requestor_challenge_indicator: NotRequired[str] - """ - The challenge indicator (`threeDSRequestorChallengeInd`) which was requested in the - AReq sent to the card Issuer's ACS. A string containing 2 digits from 01-99. - """ - transaction_id: NotRequired[str] - """ - For 3D Secure 1, the XID. For 3D Secure 2, the Directory Server - Transaction ID (dsTransID). - """ - version: NotRequired[Literal["1.0.2", "2.1.0", "2.2.0"]] - """ - The version of 3D Secure that was performed. - """ - - class ConfirmParamsPaymentMethodOptionsCardThreeDSecureNetworkOptions( - TypedDict, - ): - cartes_bancaires: NotRequired[ - "SetupIntentService.ConfirmParamsPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancaires" - ] - """ - Cartes Bancaires-specific 3DS fields. - """ - - class ConfirmParamsPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancaires( - TypedDict, - ): - cb_avalgo: Literal["0", "1", "2", "3", "4", "A"] - """ - The cryptogram calculation algorithm used by the card Issuer's ACS - to calculate the Authentication cryptogram. Also known as `cavvAlgorithm`. - messageExtension: CB-AVALGO - """ - cb_exemption: NotRequired[str] - """ - The exemption indicator returned from Cartes Bancaires in the ARes. - message extension: CB-EXEMPTION; string (4 characters) - This is a 3 byte bitmap (low significant byte first and most significant - bit first) that has been Base64 encoded - """ - cb_score: NotRequired[int] - """ - The risk score returned from Cartes Bancaires in the ARes. - message extension: CB-SCORE; numeric value 0-99 - """ - - class ConfirmParamsPaymentMethodOptionsKlarna(TypedDict): - currency: NotRequired[str] - """ - The currency of the SetupIntent. Three letter ISO currency code. - """ - on_demand: NotRequired[ - "SetupIntentService.ConfirmParamsPaymentMethodOptionsKlarnaOnDemand" - ] - """ - On-demand details if setting up a payment method for on-demand payments. - """ - preferred_locale: NotRequired[ - Literal[ - "cs-CZ", - "da-DK", - "de-AT", - "de-CH", - "de-DE", - "el-GR", - "en-AT", - "en-AU", - "en-BE", - "en-CA", - "en-CH", - "en-CZ", - "en-DE", - "en-DK", - "en-ES", - "en-FI", - "en-FR", - "en-GB", - "en-GR", - "en-IE", - "en-IT", - "en-NL", - "en-NO", - "en-NZ", - "en-PL", - "en-PT", - "en-RO", - "en-SE", - "en-US", - "es-ES", - "es-US", - "fi-FI", - "fr-BE", - "fr-CA", - "fr-CH", - "fr-FR", - "it-CH", - "it-IT", - "nb-NO", - "nl-BE", - "nl-NL", - "pl-PL", - "pt-PT", - "ro-RO", - "sv-FI", - "sv-SE", - ] - ] - """ - Preferred language of the Klarna authorization page that the customer is redirected to - """ - subscriptions: NotRequired[ - "Literal['']|List[SetupIntentService.ConfirmParamsPaymentMethodOptionsKlarnaSubscription]" - ] - """ - Subscription details if setting up or charging a subscription - """ - - class ConfirmParamsPaymentMethodOptionsKlarnaOnDemand(TypedDict): - average_amount: NotRequired[int] - """ - Your average amount value. You can use a value across your customer base, or segment based on customer type, country, etc. - """ - maximum_amount: NotRequired[int] - """ - The maximum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. - """ - minimum_amount: NotRequired[int] - """ - The lowest or minimum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. - """ - purchase_interval: NotRequired[Literal["day", "month", "week", "year"]] - """ - Interval at which the customer is making purchases - """ - purchase_interval_count: NotRequired[int] - """ - The number of `purchase_interval` between charges - """ - - class ConfirmParamsPaymentMethodOptionsKlarnaSubscription(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Unit of time between subscription charges. - """ - interval_count: NotRequired[int] - """ - The number of intervals (specified in the `interval` attribute) between subscription charges. For example, `interval=month` and `interval_count=3` charges every 3 months. - """ - name: NotRequired[str] - """ - Name for subscription. - """ - next_billing: "SetupIntentService.ConfirmParamsPaymentMethodOptionsKlarnaSubscriptionNextBilling" - """ - Describes the upcoming charge for this subscription. - """ - reference: str - """ - A non-customer-facing reference to correlate subscription charges in the Klarna app. Use a value that persists across subscription charges. - """ - - class ConfirmParamsPaymentMethodOptionsKlarnaSubscriptionNextBilling( - TypedDict, - ): - amount: int - """ - The amount of the next charge for the subscription. - """ - date: str - """ - The date of the next charge for the subscription in YYYY-MM-DD format. - """ - - class ConfirmParamsPaymentMethodOptionsLink(TypedDict): - persistent_token: NotRequired[str] - """ - [Deprecated] This is a legacy parameter that no longer has any function. - """ - - class ConfirmParamsPaymentMethodOptionsPaypal(TypedDict): - billing_agreement_id: NotRequired[str] - """ - The PayPal Billing Agreement ID (BAID). This is an ID generated by PayPal which represents the mandate between the merchant and the customer. - """ - currency: NotRequired[str] - subsellers: NotRequired[List[str]] - """ - The Stripe connected account IDs of the sellers on the platform for this transaction (optional). Only allowed when [separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) are used. - """ - - class ConfirmParamsPaymentMethodOptionsPayto(TypedDict): - mandate_options: NotRequired[ - "SetupIntentService.ConfirmParamsPaymentMethodOptionsPaytoMandateOptions" - ] - """ - Additional fields for Mandate creation. - """ - - class ConfirmParamsPaymentMethodOptionsPaytoMandateOptions(TypedDict): - amount: NotRequired[int] - """ - Amount that will be collected. It is required when `amount_type` is `fixed`. - """ - amount_type: NotRequired[Literal["fixed", "maximum"]] - """ - The type of amount that will be collected. The amount charged must be exact or up to the value of `amount` param for `fixed` or `maximum` type respectively. - """ - end_date: NotRequired[str] - """ - Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no end date. - """ - payment_schedule: NotRequired[ - Literal[ - "adhoc", - "annual", - "daily", - "fortnightly", - "monthly", - "quarterly", - "semi_annual", - "weekly", - ] - ] - """ - The periodicity at which payments will be collected. - """ - payments_per_period: NotRequired[int] - """ - The number of payments that will be made during a payment period. Defaults to 1 except for when `payment_schedule` is `adhoc`. In that case, it defaults to no limit. - """ - purpose: NotRequired[ - Literal[ - "dependant_support", - "government", - "loan", - "mortgage", - "other", - "pension", - "personal", - "retail", - "salary", - "tax", - "utility", - ] - ] - """ - The purpose for which payments are made. Defaults to retail. - """ - start_date: NotRequired[str] - """ - Date, in YYYY-MM-DD format, from which payments will be collected. Defaults to confirmation time. - """ - - class ConfirmParamsPaymentMethodOptionsPix(TypedDict): - mandate_options: NotRequired[ - "SetupIntentService.ConfirmParamsPaymentMethodOptionsPixMandateOptions" - ] - """ - Additional fields for mandate creation. - """ - - class ConfirmParamsPaymentMethodOptionsPixMandateOptions(TypedDict): - amount: NotRequired[int] - """ - Amount to be charged for future payments. Required when `amount_type=fixed`. If not provided for `amount_type=maximum`, defaults to 40000. - """ - amount_includes_iof: NotRequired[Literal["always", "never"]] - """ - Determines if the amount includes the IOF tax. Defaults to `never`. - """ - amount_type: NotRequired[Literal["fixed", "maximum"]] - """ - Type of amount. Defaults to `maximum`. - """ - currency: NotRequired[str] - """ - Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Only `brl` is supported currently. - """ - end_date: NotRequired[str] - """ - Date when the mandate expires and no further payments will be charged, in `YYYY-MM-DD`. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. - """ - payment_schedule: NotRequired[ - Literal["halfyearly", "monthly", "quarterly", "weekly", "yearly"] - ] - """ - Schedule at which the future payments will be charged. Defaults to `weekly`. - """ - reference: NotRequired[str] - """ - Subscription name displayed to buyers in their bank app. Defaults to the displayable business name. - """ - start_date: NotRequired[str] - """ - Start date of the mandate, in `YYYY-MM-DD`. Start date should be at least 3 days in the future. Defaults to 3 days after the current date. - """ - - class ConfirmParamsPaymentMethodOptionsSepaDebit(TypedDict): - mandate_options: NotRequired[ - "SetupIntentService.ConfirmParamsPaymentMethodOptionsSepaDebitMandateOptions" - ] - """ - Additional fields for Mandate creation - """ - - class ConfirmParamsPaymentMethodOptionsSepaDebitMandateOptions(TypedDict): - reference_prefix: NotRequired["Literal['']|str"] - """ - Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'. - """ - - class ConfirmParamsPaymentMethodOptionsUsBankAccount(TypedDict): - financial_connections: NotRequired[ - "SetupIntentService.ConfirmParamsPaymentMethodOptionsUsBankAccountFinancialConnections" - ] - """ - Additional fields for Financial Connections Session creation - """ - mandate_options: NotRequired[ - "SetupIntentService.ConfirmParamsPaymentMethodOptionsUsBankAccountMandateOptions" - ] - """ - Additional fields for Mandate creation - """ - networks: NotRequired[ - "SetupIntentService.ConfirmParamsPaymentMethodOptionsUsBankAccountNetworks" - ] - """ - Additional fields for network related functions - """ - verification_method: NotRequired[ - Literal["automatic", "instant", "microdeposits"] - ] - """ - Bank account verification method. - """ - - class ConfirmParamsPaymentMethodOptionsUsBankAccountFinancialConnections( - TypedDict, - ): - filters: NotRequired[ - "SetupIntentService.ConfirmParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters" - ] - """ - Provide filters for the linked accounts that the customer can select for the payment method. - """ - manual_entry: NotRequired[ - "SetupIntentService.ConfirmParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsManualEntry" - ] - """ - Customize manual entry behavior - """ - permissions: NotRequired[ - List[ - Literal[ - "balances", "ownership", "payment_method", "transactions" - ] - ] - ] - """ - The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. - """ - prefetch: NotRequired[ - List[ - Literal[ - "balances", - "inferred_balances", - "ownership", - "transactions", - ] - ] - ] - """ - List of data features that you would like to retrieve upon account creation. - """ - return_url: NotRequired[str] - """ - For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. - """ - - class ConfirmParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters( - TypedDict, - ): - account_subcategories: NotRequired[ - List[Literal["checking", "savings"]] - ] - """ - The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`. - """ - institution: NotRequired[str] - """ - ID of the institution to use to filter for selectable accounts. - """ - - class ConfirmParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsManualEntry( - TypedDict, - ): - mode: Literal["automatic", "custom"] - """ - Settings for configuring manual entry of account details. - """ - - class ConfirmParamsPaymentMethodOptionsUsBankAccountMandateOptions( - TypedDict, - ): - collection_method: NotRequired["Literal['']|Literal['paper']"] - """ - The method used to collect offline mandate customer acceptance. - """ - - class ConfirmParamsPaymentMethodOptionsUsBankAccountNetworks(TypedDict): - requested: NotRequired[List[Literal["ach", "us_domestic_wire"]]] - """ - Triggers validations to run across the selected networks - """ - - class CreateParams(TypedDict): - attach_to_self: NotRequired[bool] - """ - If present, the SetupIntent's payment method will be attached to the in-context Stripe Account. - - It can only be used for this Stripe Account's own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer. - """ - automatic_payment_methods: NotRequired[ - "SetupIntentService.CreateParamsAutomaticPaymentMethods" - ] - """ - When you enable this parameter, this SetupIntent accepts payment methods that you enable in the Dashboard and that are compatible with its other parameters. - """ - confirm: NotRequired[bool] - """ - Set to `true` to attempt to confirm this SetupIntent immediately. This parameter defaults to `false`. If a card is the attached payment method, you can provide a `return_url` in case further authentication is necessary. - """ - confirmation_token: NotRequired[str] - """ - ID of the ConfirmationToken used to confirm this SetupIntent. - - If the provided ConfirmationToken contains properties that are also being provided in this request, such as `payment_method`, then the values in this request will take precedence. - """ - customer: NotRequired[str] - """ - ID of the Customer this SetupIntent belongs to, if one exists. - - If present, the SetupIntent's payment method will be attached to the Customer on successful setup. Payment methods attached to other Customers cannot be used with this SetupIntent. - """ - customer_account: NotRequired[str] - """ - ID of the Account this SetupIntent belongs to, if one exists. - - If present, the SetupIntent's payment method will be attached to the Account on successful setup. Payment methods attached to other Accounts cannot be used with this SetupIntent. - """ - description: NotRequired[str] - """ - An arbitrary string attached to the object. Often useful for displaying to users. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - flow_directions: NotRequired[List[Literal["inbound", "outbound"]]] - """ - Indicates the directions of money movement for which this payment method is intended to be used. - - Include `inbound` if you intend to use the payment method as the origin to pull funds from. Include `outbound` if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes. - """ - mandate_data: NotRequired[ - "Literal['']|SetupIntentService.CreateParamsMandateData" - ] - """ - This hash contains details about the mandate to create. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/setup_intents/create#create_setup_intent-confirm). - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - on_behalf_of: NotRequired[str] - """ - The Stripe account ID created for this SetupIntent. - """ - payment_method: NotRequired[str] - """ - ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent. - """ - payment_method_configuration: NotRequired[str] - """ - The ID of the [payment method configuration](https://stripe.com/docs/api/payment_method_configurations) to use with this SetupIntent. - """ - payment_method_data: NotRequired[ - "SetupIntentService.CreateParamsPaymentMethodData" - ] - """ - When included, this hash creates a PaymentMethod that is set as the [`payment_method`](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-payment_method) - value in the SetupIntent. - """ - payment_method_options: NotRequired[ - "SetupIntentService.CreateParamsPaymentMethodOptions" - ] - """ - Payment method-specific configuration for this SetupIntent. - """ - payment_method_types: NotRequired[List[str]] - """ - The list of payment method types (for example, card) that this SetupIntent can use. If you don't provide this, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). A list of valid payment method types can be found [here](https://docs.stripe.com/api/payment_methods/object#payment_method_object-type). - """ - return_url: NotRequired[str] - """ - The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. To redirect to a mobile application, you can alternatively supply an application URI scheme. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/setup_intents/create#create_setup_intent-confirm). - """ - single_use: NotRequired["SetupIntentService.CreateParamsSingleUse"] - """ - If you populate this hash, this SetupIntent generates a `single_use` mandate after successful completion. - - Single-use mandates are only valid for the following payment methods: `acss_debit`, `alipay`, `au_becs_debit`, `bacs_debit`, `bancontact`, `boleto`, `ideal`, `link`, `sepa_debit`, and `us_bank_account`. - """ - usage: NotRequired[Literal["off_session", "on_session"]] - """ - Indicates how the payment method is intended to be used in the future. If not provided, this value defaults to `off_session`. - """ - use_stripe_sdk: NotRequired[bool] - """ - Set to `true` when confirming server-side and using Stripe.js, iOS, or Android client-side SDKs to handle the next actions. - """ - - class CreateParamsAutomaticPaymentMethods(TypedDict): - allow_redirects: NotRequired[Literal["always", "never"]] - """ - Controls whether this SetupIntent will accept redirect-based payment methods. - - Redirect-based payment methods may require your customer to be redirected to a payment method's app or site for authentication or additional steps. To [confirm](https://stripe.com/docs/api/setup_intents/confirm) this SetupIntent, you may be required to provide a `return_url` to redirect customers back to your site after they authenticate or complete the setup. - """ - enabled: bool - """ - Whether this feature is enabled. - """ - - class CreateParamsMandateData(TypedDict): - customer_acceptance: ( - "SetupIntentService.CreateParamsMandateDataCustomerAcceptance" - ) - """ - This hash contains details about the customer acceptance of the Mandate. - """ - - class CreateParamsMandateDataCustomerAcceptance(TypedDict): - accepted_at: NotRequired[int] - """ - The time at which the customer accepted the Mandate. - """ - offline: NotRequired[ - "SetupIntentService.CreateParamsMandateDataCustomerAcceptanceOffline" - ] - """ - If this is a Mandate accepted offline, this hash contains details about the offline acceptance. - """ - online: NotRequired[ - "SetupIntentService.CreateParamsMandateDataCustomerAcceptanceOnline" - ] - """ - If this is a Mandate accepted online, this hash contains details about the online acceptance. - """ - type: Literal["offline", "online"] - """ - The type of customer acceptance information included with the Mandate. One of `online` or `offline`. - """ - - class CreateParamsMandateDataCustomerAcceptanceOffline(TypedDict): - pass - - class CreateParamsMandateDataCustomerAcceptanceOnline(TypedDict): - ip_address: str - """ - The IP address from which the Mandate was accepted by the customer. - """ - user_agent: str - """ - The user agent of the browser from which the Mandate was accepted by the customer. - """ - - class CreateParamsPaymentMethodData(TypedDict): - acss_debit: NotRequired[ - "SetupIntentService.CreateParamsPaymentMethodDataAcssDebit" - ] - """ - If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method. - """ - affirm: NotRequired[ - "SetupIntentService.CreateParamsPaymentMethodDataAffirm" - ] - """ - If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method. - """ - afterpay_clearpay: NotRequired[ - "SetupIntentService.CreateParamsPaymentMethodDataAfterpayClearpay" - ] - """ - If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method. - """ - alipay: NotRequired[ - "SetupIntentService.CreateParamsPaymentMethodDataAlipay" - ] - """ - If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. - """ - allow_redisplay: NotRequired[ - Literal["always", "limited", "unspecified"] - ] - """ - This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`. - """ - alma: NotRequired[ - "SetupIntentService.CreateParamsPaymentMethodDataAlma" - ] - """ - If this is a Alma PaymentMethod, this hash contains details about the Alma payment method. - """ - amazon_pay: NotRequired[ - "SetupIntentService.CreateParamsPaymentMethodDataAmazonPay" - ] - """ - If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method. - """ - au_becs_debit: NotRequired[ - "SetupIntentService.CreateParamsPaymentMethodDataAuBecsDebit" - ] - """ - If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. - """ - bacs_debit: NotRequired[ - "SetupIntentService.CreateParamsPaymentMethodDataBacsDebit" - ] - """ - If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account. - """ - bancontact: NotRequired[ - "SetupIntentService.CreateParamsPaymentMethodDataBancontact" - ] - """ - If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method. - """ - billie: NotRequired[ - "SetupIntentService.CreateParamsPaymentMethodDataBillie" - ] - """ - If this is a `billie` PaymentMethod, this hash contains details about the Billie payment method. - """ - billing_details: NotRequired[ - "SetupIntentService.CreateParamsPaymentMethodDataBillingDetails" - ] - """ - Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. - """ - blik: NotRequired[ - "SetupIntentService.CreateParamsPaymentMethodDataBlik" - ] - """ - If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method. - """ - boleto: NotRequired[ - "SetupIntentService.CreateParamsPaymentMethodDataBoleto" - ] - """ - If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method. - """ - cashapp: NotRequired[ - "SetupIntentService.CreateParamsPaymentMethodDataCashapp" - ] - """ - If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. - """ - crypto: NotRequired[ - "SetupIntentService.CreateParamsPaymentMethodDataCrypto" - ] - """ - If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment method. - """ - customer_balance: NotRequired[ - "SetupIntentService.CreateParamsPaymentMethodDataCustomerBalance" - ] - """ - If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. - """ - eps: NotRequired["SetupIntentService.CreateParamsPaymentMethodDataEps"] - """ - If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. - """ - fpx: NotRequired["SetupIntentService.CreateParamsPaymentMethodDataFpx"] - """ - If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method. - """ - giropay: NotRequired[ - "SetupIntentService.CreateParamsPaymentMethodDataGiropay" - ] - """ - If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method. - """ - gopay: NotRequired[ - "SetupIntentService.CreateParamsPaymentMethodDataGopay" - ] - """ - If this is a Gopay PaymentMethod, this hash contains details about the Gopay payment method. - """ - grabpay: NotRequired[ - "SetupIntentService.CreateParamsPaymentMethodDataGrabpay" - ] - """ - If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method. - """ - id_bank_transfer: NotRequired[ - "SetupIntentService.CreateParamsPaymentMethodDataIdBankTransfer" - ] - """ - If this is an `IdBankTransfer` PaymentMethod, this hash contains details about the IdBankTransfer payment method. - """ - ideal: NotRequired[ - "SetupIntentService.CreateParamsPaymentMethodDataIdeal" - ] - """ - If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. - """ - interac_present: NotRequired[ - "SetupIntentService.CreateParamsPaymentMethodDataInteracPresent" - ] - """ - If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. - """ - kakao_pay: NotRequired[ - "SetupIntentService.CreateParamsPaymentMethodDataKakaoPay" - ] - """ - If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method. - """ - klarna: NotRequired[ - "SetupIntentService.CreateParamsPaymentMethodDataKlarna" - ] - """ - If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method. - """ - konbini: NotRequired[ - "SetupIntentService.CreateParamsPaymentMethodDataKonbini" - ] - """ - If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. - """ - kr_card: NotRequired[ - "SetupIntentService.CreateParamsPaymentMethodDataKrCard" - ] - """ - If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method. - """ - link: NotRequired[ - "SetupIntentService.CreateParamsPaymentMethodDataLink" - ] - """ - If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. - """ - mb_way: NotRequired[ - "SetupIntentService.CreateParamsPaymentMethodDataMbWay" - ] - """ - If this is a MB WAY PaymentMethod, this hash contains details about the MB WAY payment method. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - mobilepay: NotRequired[ - "SetupIntentService.CreateParamsPaymentMethodDataMobilepay" - ] - """ - If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method. - """ - multibanco: NotRequired[ - "SetupIntentService.CreateParamsPaymentMethodDataMultibanco" - ] - """ - If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method. - """ - naver_pay: NotRequired[ - "SetupIntentService.CreateParamsPaymentMethodDataNaverPay" - ] - """ - If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method. - """ - nz_bank_account: NotRequired[ - "SetupIntentService.CreateParamsPaymentMethodDataNzBankAccount" - ] - """ - If this is an nz_bank_account PaymentMethod, this hash contains details about the nz_bank_account payment method. - """ - oxxo: NotRequired[ - "SetupIntentService.CreateParamsPaymentMethodDataOxxo" - ] - """ - If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. - """ - p24: NotRequired["SetupIntentService.CreateParamsPaymentMethodDataP24"] - """ - If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. - """ - pay_by_bank: NotRequired[ - "SetupIntentService.CreateParamsPaymentMethodDataPayByBank" - ] - """ - If this is a `pay_by_bank` PaymentMethod, this hash contains details about the PayByBank payment method. - """ - payco: NotRequired[ - "SetupIntentService.CreateParamsPaymentMethodDataPayco" - ] - """ - If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method. - """ - paynow: NotRequired[ - "SetupIntentService.CreateParamsPaymentMethodDataPaynow" - ] - """ - If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method. - """ - paypal: NotRequired[ - "SetupIntentService.CreateParamsPaymentMethodDataPaypal" - ] - """ - If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method. - """ - paypay: NotRequired[ - "SetupIntentService.CreateParamsPaymentMethodDataPaypay" - ] - """ - If this is a `paypay` PaymentMethod, this hash contains details about the PayPay payment method. - """ - payto: NotRequired[ - "SetupIntentService.CreateParamsPaymentMethodDataPayto" - ] - """ - If this is a `payto` PaymentMethod, this hash contains details about the PayTo payment method. - """ - pix: NotRequired["SetupIntentService.CreateParamsPaymentMethodDataPix"] - """ - If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method. - """ - promptpay: NotRequired[ - "SetupIntentService.CreateParamsPaymentMethodDataPromptpay" - ] - """ - If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method. - """ - qris: NotRequired[ - "SetupIntentService.CreateParamsPaymentMethodDataQris" - ] - """ - If this is a `qris` PaymentMethod, this hash contains details about the QRIS payment method. - """ - radar_options: NotRequired[ - "SetupIntentService.CreateParamsPaymentMethodDataRadarOptions" - ] - """ - Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. - """ - rechnung: NotRequired[ - "SetupIntentService.CreateParamsPaymentMethodDataRechnung" - ] - """ - If this is a `rechnung` PaymentMethod, this hash contains details about the Rechnung payment method. - """ - revolut_pay: NotRequired[ - "SetupIntentService.CreateParamsPaymentMethodDataRevolutPay" - ] - """ - If this is a `revolut_pay` PaymentMethod, this hash contains details about the Revolut Pay payment method. - """ - samsung_pay: NotRequired[ - "SetupIntentService.CreateParamsPaymentMethodDataSamsungPay" - ] - """ - If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method. - """ - satispay: NotRequired[ - "SetupIntentService.CreateParamsPaymentMethodDataSatispay" - ] - """ - If this is a `satispay` PaymentMethod, this hash contains details about the Satispay payment method. - """ - sepa_debit: NotRequired[ - "SetupIntentService.CreateParamsPaymentMethodDataSepaDebit" - ] - """ - If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. - """ - shopeepay: NotRequired[ - "SetupIntentService.CreateParamsPaymentMethodDataShopeepay" - ] - """ - If this is a Shopeepay PaymentMethod, this hash contains details about the Shopeepay payment method. - """ - sofort: NotRequired[ - "SetupIntentService.CreateParamsPaymentMethodDataSofort" - ] - """ - If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. - """ - stripe_balance: NotRequired[ - "SetupIntentService.CreateParamsPaymentMethodDataStripeBalance" - ] - """ - This hash contains details about the Stripe balance payment method. - """ - swish: NotRequired[ - "SetupIntentService.CreateParamsPaymentMethodDataSwish" - ] - """ - If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method. - """ - twint: NotRequired[ - "SetupIntentService.CreateParamsPaymentMethodDataTwint" - ] - """ - If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method. - """ - type: Literal[ - "acss_debit", - "affirm", - "afterpay_clearpay", - "alipay", - "alma", - "amazon_pay", - "au_becs_debit", - "bacs_debit", - "bancontact", - "billie", - "blik", - "boleto", - "cashapp", - "crypto", - "customer_balance", - "eps", - "fpx", - "giropay", - "gopay", - "grabpay", - "id_bank_transfer", - "ideal", - "kakao_pay", - "klarna", - "konbini", - "kr_card", - "link", - "mb_way", - "mobilepay", - "multibanco", - "naver_pay", - "nz_bank_account", - "oxxo", - "p24", - "pay_by_bank", - "payco", - "paynow", - "paypal", - "paypay", - "payto", - "pix", - "promptpay", - "qris", - "rechnung", - "revolut_pay", - "samsung_pay", - "satispay", - "sepa_debit", - "shopeepay", - "sofort", - "stripe_balance", - "swish", - "twint", - "us_bank_account", - "wechat_pay", - "zip", - ] - """ - The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. - """ - us_bank_account: NotRequired[ - "SetupIntentService.CreateParamsPaymentMethodDataUsBankAccount" - ] - """ - If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. - """ - wechat_pay: NotRequired[ - "SetupIntentService.CreateParamsPaymentMethodDataWechatPay" - ] - """ - If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method. - """ - zip: NotRequired["SetupIntentService.CreateParamsPaymentMethodDataZip"] - """ - If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method. - """ - - class CreateParamsPaymentMethodDataAcssDebit(TypedDict): - account_number: str - """ - Customer's bank account number. - """ - institution_number: str - """ - Institution number of the customer's bank. - """ - transit_number: str - """ - Transit number of the customer's bank. - """ - - class CreateParamsPaymentMethodDataAffirm(TypedDict): - pass - - class CreateParamsPaymentMethodDataAfterpayClearpay(TypedDict): - pass - - class CreateParamsPaymentMethodDataAlipay(TypedDict): - pass - - class CreateParamsPaymentMethodDataAlma(TypedDict): - pass - - class CreateParamsPaymentMethodDataAmazonPay(TypedDict): - pass - - class CreateParamsPaymentMethodDataAuBecsDebit(TypedDict): - account_number: str - """ - The account number for the bank account. - """ - bsb_number: str - """ - Bank-State-Branch number of the bank account. - """ - - class CreateParamsPaymentMethodDataBacsDebit(TypedDict): - account_number: NotRequired[str] - """ - Account number of the bank account that the funds will be debited from. - """ - sort_code: NotRequired[str] - """ - Sort code of the bank account. (e.g., `10-20-30`) - """ - - class CreateParamsPaymentMethodDataBancontact(TypedDict): - pass - - class CreateParamsPaymentMethodDataBillie(TypedDict): - pass - - class CreateParamsPaymentMethodDataBillingDetails(TypedDict): - address: NotRequired[ - "Literal['']|SetupIntentService.CreateParamsPaymentMethodDataBillingDetailsAddress" - ] - """ - Billing address. - """ - email: NotRequired["Literal['']|str"] - """ - Email address. - """ - name: NotRequired["Literal['']|str"] - """ - Full name. - """ - phone: NotRequired["Literal['']|str"] - """ - Billing phone number (including extension). - """ - tax_id: NotRequired[str] - """ - Taxpayer identification number. Used only for transactions between LATAM buyers and non-LATAM sellers. - """ - - class CreateParamsPaymentMethodDataBillingDetailsAddress(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. - """ - - class CreateParamsPaymentMethodDataBlik(TypedDict): - pass - - class CreateParamsPaymentMethodDataBoleto(TypedDict): - tax_id: str - """ - The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers) - """ - - class CreateParamsPaymentMethodDataCashapp(TypedDict): - pass - - class CreateParamsPaymentMethodDataCrypto(TypedDict): - pass - - class CreateParamsPaymentMethodDataCustomerBalance(TypedDict): - pass - - class CreateParamsPaymentMethodDataEps(TypedDict): - bank: NotRequired[ - Literal[ - "arzte_und_apotheker_bank", - "austrian_anadi_bank_ag", - "bank_austria", - "bankhaus_carl_spangler", - "bankhaus_schelhammer_und_schattera_ag", - "bawag_psk_ag", - "bks_bank_ag", - "brull_kallmus_bank_ag", - "btv_vier_lander_bank", - "capital_bank_grawe_gruppe_ag", - "deutsche_bank_ag", - "dolomitenbank", - "easybank_ag", - "erste_bank_und_sparkassen", - "hypo_alpeadriabank_international_ag", - "hypo_bank_burgenland_aktiengesellschaft", - "hypo_noe_lb_fur_niederosterreich_u_wien", - "hypo_oberosterreich_salzburg_steiermark", - "hypo_tirol_bank_ag", - "hypo_vorarlberg_bank_ag", - "marchfelder_bank", - "oberbank_ag", - "raiffeisen_bankengruppe_osterreich", - "schoellerbank_ag", - "sparda_bank_wien", - "volksbank_gruppe", - "volkskreditbank_ag", - "vr_bank_braunau", - ] - ] - """ - The customer's bank. - """ - - class CreateParamsPaymentMethodDataFpx(TypedDict): - account_holder_type: NotRequired[Literal["company", "individual"]] - """ - Account holder type for FPX transaction - """ - bank: Literal[ - "affin_bank", - "agrobank", - "alliance_bank", - "ambank", - "bank_islam", - "bank_muamalat", - "bank_of_china", - "bank_rakyat", - "bsn", - "cimb", - "deutsche_bank", - "hong_leong_bank", - "hsbc", - "kfh", - "maybank2e", - "maybank2u", - "ocbc", - "pb_enterprise", - "public_bank", - "rhb", - "standard_chartered", - "uob", - ] - """ - The customer's bank. - """ - - class CreateParamsPaymentMethodDataGiropay(TypedDict): - pass - - class CreateParamsPaymentMethodDataGopay(TypedDict): - pass - - class CreateParamsPaymentMethodDataGrabpay(TypedDict): - pass - - class CreateParamsPaymentMethodDataIdBankTransfer(TypedDict): - bank: NotRequired[Literal["bca", "bni", "bri", "cimb", "permata"]] - """ - Bank where the account is held. - """ - - class CreateParamsPaymentMethodDataIdeal(TypedDict): - bank: NotRequired[ - Literal[ - "abn_amro", - "asn_bank", - "bunq", - "buut", - "handelsbanken", - "ing", - "knab", - "moneyou", - "n26", - "nn", - "rabobank", - "regiobank", - "revolut", - "sns_bank", - "triodos_bank", - "van_lanschot", - "yoursafe", - ] - ] - """ - The customer's bank. Only use this parameter for existing customers. Don't use it for new customers. - """ - - class CreateParamsPaymentMethodDataInteracPresent(TypedDict): - pass - - class CreateParamsPaymentMethodDataKakaoPay(TypedDict): - pass - - class CreateParamsPaymentMethodDataKlarna(TypedDict): - dob: NotRequired[ - "SetupIntentService.CreateParamsPaymentMethodDataKlarnaDob" - ] - """ - Customer's date of birth - """ - - class CreateParamsPaymentMethodDataKlarnaDob(TypedDict): - day: int - """ - The day of birth, between 1 and 31. - """ - month: int - """ - The month of birth, between 1 and 12. - """ - year: int - """ - The four-digit year of birth. - """ - - class CreateParamsPaymentMethodDataKonbini(TypedDict): - pass - - class CreateParamsPaymentMethodDataKrCard(TypedDict): - pass - - class CreateParamsPaymentMethodDataLink(TypedDict): - pass - - class CreateParamsPaymentMethodDataMbWay(TypedDict): - pass - - class CreateParamsPaymentMethodDataMobilepay(TypedDict): - pass - - class CreateParamsPaymentMethodDataMultibanco(TypedDict): - pass - - class CreateParamsPaymentMethodDataNaverPay(TypedDict): - funding: NotRequired[Literal["card", "points"]] - """ - Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`. - """ - - class CreateParamsPaymentMethodDataNzBankAccount(TypedDict): - account_holder_name: NotRequired[str] - """ - The name on the bank account. Only required if the account holder name is different from the name of the authorized signatory collected in the PaymentMethod's billing details. - """ - account_number: str - """ - The account number for the bank account. - """ - bank_code: str - """ - The numeric code for the bank account's bank. - """ - branch_code: str - """ - The numeric code for the bank account's bank branch. - """ - reference: NotRequired[str] - suffix: str - """ - The suffix of the bank account number. - """ - - class CreateParamsPaymentMethodDataOxxo(TypedDict): - pass - - class CreateParamsPaymentMethodDataP24(TypedDict): - bank: NotRequired[ - Literal[ - "alior_bank", - "bank_millennium", - "bank_nowy_bfg_sa", - "bank_pekao_sa", - "banki_spbdzielcze", - "blik", - "bnp_paribas", - "boz", - "citi_handlowy", - "credit_agricole", - "envelobank", - "etransfer_pocztowy24", - "getin_bank", - "ideabank", - "ing", - "inteligo", - "mbank_mtransfer", - "nest_przelew", - "noble_pay", - "pbac_z_ipko", - "plus_bank", - "santander_przelew24", - "tmobile_usbugi_bankowe", - "toyota_bank", - "velobank", - "volkswagen_bank", - ] - ] - """ - The customer's bank. - """ - - class CreateParamsPaymentMethodDataPayByBank(TypedDict): - pass - - class CreateParamsPaymentMethodDataPayco(TypedDict): - pass - - class CreateParamsPaymentMethodDataPaynow(TypedDict): - pass - - class CreateParamsPaymentMethodDataPaypal(TypedDict): - pass - - class CreateParamsPaymentMethodDataPaypay(TypedDict): - pass - - class CreateParamsPaymentMethodDataPayto(TypedDict): - account_number: NotRequired[str] - """ - The account number for the bank account. - """ - bsb_number: NotRequired[str] - """ - Bank-State-Branch number of the bank account. - """ - pay_id: NotRequired[str] - """ - The PayID alias for the bank account. - """ - - class CreateParamsPaymentMethodDataPix(TypedDict): - pass - - class CreateParamsPaymentMethodDataPromptpay(TypedDict): - pass - - class CreateParamsPaymentMethodDataQris(TypedDict): - pass - - class CreateParamsPaymentMethodDataRadarOptions(TypedDict): - session: NotRequired[str] - """ - A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. - """ - - class CreateParamsPaymentMethodDataRechnung(TypedDict): - dob: "SetupIntentService.CreateParamsPaymentMethodDataRechnungDob" - """ - Customer's date of birth - """ - - class CreateParamsPaymentMethodDataRechnungDob(TypedDict): - day: int - """ - The day of birth, between 1 and 31. - """ - month: int - """ - The month of birth, between 1 and 12. - """ - year: int - """ - The four-digit year of birth. - """ - - class CreateParamsPaymentMethodDataRevolutPay(TypedDict): - pass - - class CreateParamsPaymentMethodDataSamsungPay(TypedDict): - pass - - class CreateParamsPaymentMethodDataSatispay(TypedDict): - pass - - class CreateParamsPaymentMethodDataSepaDebit(TypedDict): - iban: str - """ - IBAN of the bank account. - """ - - class CreateParamsPaymentMethodDataShopeepay(TypedDict): - pass - - class CreateParamsPaymentMethodDataSofort(TypedDict): - country: Literal["AT", "BE", "DE", "ES", "IT", "NL"] - """ - Two-letter ISO code representing the country the bank account is located in. - """ - - class CreateParamsPaymentMethodDataStripeBalance(TypedDict): - account: NotRequired[str] - """ - The connected account ID whose Stripe balance to use as the source of payment - """ - source_type: NotRequired[Literal["bank_account", "card", "fpx"]] - """ - The [source_type](https://docs.stripe.com/api/balance/balance_object#balance_object-available-source_types) of the balance - """ - - class CreateParamsPaymentMethodDataSwish(TypedDict): - pass - - class CreateParamsPaymentMethodDataTwint(TypedDict): - pass - - class CreateParamsPaymentMethodDataUsBankAccount(TypedDict): - account_holder_type: NotRequired[Literal["company", "individual"]] - """ - Account holder type: individual or company. - """ - account_number: NotRequired[str] - """ - Account number of the bank account. - """ - account_type: NotRequired[Literal["checking", "savings"]] - """ - Account type: checkings or savings. Defaults to checking if omitted. - """ - financial_connections_account: NotRequired[str] - """ - The ID of a Financial Connections Account to use as a payment method. - """ - routing_number: NotRequired[str] - """ - Routing number of the bank account. - """ - - class CreateParamsPaymentMethodDataWechatPay(TypedDict): - pass - - class CreateParamsPaymentMethodDataZip(TypedDict): - pass - - class CreateParamsPaymentMethodOptions(TypedDict): - acss_debit: NotRequired[ - "SetupIntentService.CreateParamsPaymentMethodOptionsAcssDebit" - ] - """ - If this is a `acss_debit` SetupIntent, this sub-hash contains details about the ACSS Debit payment method options. - """ - amazon_pay: NotRequired[ - "SetupIntentService.CreateParamsPaymentMethodOptionsAmazonPay" - ] - """ - If this is a `amazon_pay` SetupIntent, this sub-hash contains details about the AmazonPay payment method options. - """ - bacs_debit: NotRequired[ - "SetupIntentService.CreateParamsPaymentMethodOptionsBacsDebit" - ] - """ - If this is a `bacs_debit` SetupIntent, this sub-hash contains details about the Bacs Debit payment method options. - """ - card: NotRequired[ - "SetupIntentService.CreateParamsPaymentMethodOptionsCard" - ] - """ - Configuration for any card setup attempted on this SetupIntent. - """ - card_present: NotRequired[ - "SetupIntentService.CreateParamsPaymentMethodOptionsCardPresent" - ] - """ - If this is a `card_present` PaymentMethod, this sub-hash contains details about the card-present payment method options. - """ - klarna: NotRequired[ - "SetupIntentService.CreateParamsPaymentMethodOptionsKlarna" - ] - """ - If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method options. - """ - link: NotRequired[ - "SetupIntentService.CreateParamsPaymentMethodOptionsLink" - ] - """ - If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options. - """ - paypal: NotRequired[ - "SetupIntentService.CreateParamsPaymentMethodOptionsPaypal" - ] - """ - If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options. - """ - payto: NotRequired[ - "SetupIntentService.CreateParamsPaymentMethodOptionsPayto" - ] - """ - If this is a `payto` SetupIntent, this sub-hash contains details about the PayTo payment method options. - """ - pix: NotRequired[ - "SetupIntentService.CreateParamsPaymentMethodOptionsPix" - ] - """ - If this is a `pix` SetupIntent, this sub-hash contains details about the Pix payment method options. - """ - sepa_debit: NotRequired[ - "SetupIntentService.CreateParamsPaymentMethodOptionsSepaDebit" - ] - """ - If this is a `sepa_debit` SetupIntent, this sub-hash contains details about the SEPA Debit payment method options. - """ - us_bank_account: NotRequired[ - "SetupIntentService.CreateParamsPaymentMethodOptionsUsBankAccount" - ] - """ - If this is a `us_bank_account` SetupIntent, this sub-hash contains details about the US bank account payment method options. - """ - - class CreateParamsPaymentMethodOptionsAcssDebit(TypedDict): - currency: NotRequired[Literal["cad", "usd"]] - """ - 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). - """ - mandate_options: NotRequired[ - "SetupIntentService.CreateParamsPaymentMethodOptionsAcssDebitMandateOptions" - ] - """ - Additional fields for Mandate creation - """ - verification_method: NotRequired[ - Literal["automatic", "instant", "microdeposits"] - ] - """ - Bank account verification method. - """ - - class CreateParamsPaymentMethodOptionsAcssDebitMandateOptions(TypedDict): - custom_mandate_url: NotRequired["Literal['']|str"] - """ - A URL for custom mandate text to render during confirmation step. - The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent, - or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent. - """ - default_for: NotRequired[List[Literal["invoice", "subscription"]]] - """ - List of Stripe products where this mandate can be selected automatically. - """ - interval_description: NotRequired[str] - """ - Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'. - """ - payment_schedule: NotRequired[ - Literal["combined", "interval", "sporadic"] - ] - """ - Payment schedule for the mandate. - """ - transaction_type: NotRequired[Literal["business", "personal"]] - """ - Transaction type of the mandate. - """ - - class CreateParamsPaymentMethodOptionsAmazonPay(TypedDict): - pass - - class CreateParamsPaymentMethodOptionsBacsDebit(TypedDict): - mandate_options: NotRequired[ - "SetupIntentService.CreateParamsPaymentMethodOptionsBacsDebitMandateOptions" - ] - """ - Additional fields for Mandate creation - """ - - class CreateParamsPaymentMethodOptionsBacsDebitMandateOptions(TypedDict): - reference_prefix: NotRequired["Literal['']|str"] - """ - Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'. - """ - - class CreateParamsPaymentMethodOptionsCard(TypedDict): - mandate_options: NotRequired[ - "SetupIntentService.CreateParamsPaymentMethodOptionsCardMandateOptions" - ] - """ - Configuration options for setting up an eMandate for cards issued in India. - """ - moto: NotRequired[bool] - """ - When specified, this parameter signals that a card has been collected - as MOTO (Mail Order Telephone Order) and thus out of scope for SCA. This - parameter can only be provided during confirmation. - """ - network: NotRequired[ - Literal[ - "amex", - "cartes_bancaires", - "diners", - "discover", - "eftpos_au", - "girocard", - "interac", - "jcb", - "link", - "mastercard", - "unionpay", - "unknown", - "visa", - ] - ] - """ - Selected network to process this SetupIntent on. Depends on the available networks of the card attached to the SetupIntent. Can be only set confirm-time. - """ - request_three_d_secure: NotRequired[ - Literal["any", "automatic", "challenge"] - ] - """ - We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. - """ - three_d_secure: NotRequired[ - "SetupIntentService.CreateParamsPaymentMethodOptionsCardThreeDSecure" - ] - """ - If 3D Secure authentication was performed with a third-party provider, - the authentication details to use for this setup. - """ - - class CreateParamsPaymentMethodOptionsCardMandateOptions(TypedDict): - amount: int - """ - Amount to be charged for future payments. - """ - amount_type: Literal["fixed", "maximum"] - """ - One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. - """ - currency: str - """ - Currency in which future payments will be charged. 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). - """ - description: NotRequired[str] - """ - A description of the mandate or subscription that is meant to be displayed to the customer. - """ - end_date: NotRequired[int] - """ - End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. - """ - interval: Literal["day", "month", "sporadic", "week", "year"] - """ - Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`. - """ - interval_count: NotRequired[int] - """ - The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`. - """ - reference: str - """ - Unique identifier for the mandate or subscription. - """ - start_date: int - """ - Start date of the mandate or subscription. Start date should not be lesser than yesterday. - """ - supported_types: NotRequired[List[Literal["india"]]] - """ - Specifies the type of mandates supported. Possible values are `india`. - """ - - class CreateParamsPaymentMethodOptionsCardPresent(TypedDict): - pass - - class CreateParamsPaymentMethodOptionsCardThreeDSecure(TypedDict): - ares_trans_status: NotRequired[ - Literal["A", "C", "I", "N", "R", "U", "Y"] - ] - """ - The `transStatus` returned from the card Issuer's ACS in the ARes. - """ - cryptogram: NotRequired[str] - """ - The cryptogram, also known as the "authentication value" (AAV, CAVV or - AEVV). This value is 20 bytes, base64-encoded into a 28-character string. - (Most 3D Secure providers will return the base64-encoded version, which - is what you should specify here.) - """ - electronic_commerce_indicator: NotRequired[ - Literal["01", "02", "05", "06", "07"] - ] - """ - The Electronic Commerce Indicator (ECI) is returned by your 3D Secure - provider and indicates what degree of authentication was performed. - """ - network_options: NotRequired[ - "SetupIntentService.CreateParamsPaymentMethodOptionsCardThreeDSecureNetworkOptions" - ] - """ - Network specific 3DS fields. Network specific arguments require an - explicit card brand choice. The parameter `payment_method_options.card.network`` - must be populated accordingly - """ - requestor_challenge_indicator: NotRequired[str] - """ - The challenge indicator (`threeDSRequestorChallengeInd`) which was requested in the - AReq sent to the card Issuer's ACS. A string containing 2 digits from 01-99. - """ - transaction_id: NotRequired[str] - """ - For 3D Secure 1, the XID. For 3D Secure 2, the Directory Server - Transaction ID (dsTransID). - """ - version: NotRequired[Literal["1.0.2", "2.1.0", "2.2.0"]] - """ - The version of 3D Secure that was performed. - """ - - class CreateParamsPaymentMethodOptionsCardThreeDSecureNetworkOptions( - TypedDict, - ): - cartes_bancaires: NotRequired[ - "SetupIntentService.CreateParamsPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancaires" - ] - """ - Cartes Bancaires-specific 3DS fields. - """ - - class CreateParamsPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancaires( - TypedDict, - ): - cb_avalgo: Literal["0", "1", "2", "3", "4", "A"] - """ - The cryptogram calculation algorithm used by the card Issuer's ACS - to calculate the Authentication cryptogram. Also known as `cavvAlgorithm`. - messageExtension: CB-AVALGO - """ - cb_exemption: NotRequired[str] - """ - The exemption indicator returned from Cartes Bancaires in the ARes. - message extension: CB-EXEMPTION; string (4 characters) - This is a 3 byte bitmap (low significant byte first and most significant - bit first) that has been Base64 encoded - """ - cb_score: NotRequired[int] - """ - The risk score returned from Cartes Bancaires in the ARes. - message extension: CB-SCORE; numeric value 0-99 - """ - - class CreateParamsPaymentMethodOptionsKlarna(TypedDict): - currency: NotRequired[str] - """ - The currency of the SetupIntent. Three letter ISO currency code. - """ - on_demand: NotRequired[ - "SetupIntentService.CreateParamsPaymentMethodOptionsKlarnaOnDemand" - ] - """ - On-demand details if setting up a payment method for on-demand payments. - """ - preferred_locale: NotRequired[ - Literal[ - "cs-CZ", - "da-DK", - "de-AT", - "de-CH", - "de-DE", - "el-GR", - "en-AT", - "en-AU", - "en-BE", - "en-CA", - "en-CH", - "en-CZ", - "en-DE", - "en-DK", - "en-ES", - "en-FI", - "en-FR", - "en-GB", - "en-GR", - "en-IE", - "en-IT", - "en-NL", - "en-NO", - "en-NZ", - "en-PL", - "en-PT", - "en-RO", - "en-SE", - "en-US", - "es-ES", - "es-US", - "fi-FI", - "fr-BE", - "fr-CA", - "fr-CH", - "fr-FR", - "it-CH", - "it-IT", - "nb-NO", - "nl-BE", - "nl-NL", - "pl-PL", - "pt-PT", - "ro-RO", - "sv-FI", - "sv-SE", - ] - ] - """ - Preferred language of the Klarna authorization page that the customer is redirected to - """ - subscriptions: NotRequired[ - "Literal['']|List[SetupIntentService.CreateParamsPaymentMethodOptionsKlarnaSubscription]" - ] - """ - Subscription details if setting up or charging a subscription - """ - - class CreateParamsPaymentMethodOptionsKlarnaOnDemand(TypedDict): - average_amount: NotRequired[int] - """ - Your average amount value. You can use a value across your customer base, or segment based on customer type, country, etc. - """ - maximum_amount: NotRequired[int] - """ - The maximum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. - """ - minimum_amount: NotRequired[int] - """ - The lowest or minimum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. - """ - purchase_interval: NotRequired[Literal["day", "month", "week", "year"]] - """ - Interval at which the customer is making purchases - """ - purchase_interval_count: NotRequired[int] - """ - The number of `purchase_interval` between charges - """ - - class CreateParamsPaymentMethodOptionsKlarnaSubscription(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Unit of time between subscription charges. - """ - interval_count: NotRequired[int] - """ - The number of intervals (specified in the `interval` attribute) between subscription charges. For example, `interval=month` and `interval_count=3` charges every 3 months. - """ - name: NotRequired[str] - """ - Name for subscription. - """ - next_billing: "SetupIntentService.CreateParamsPaymentMethodOptionsKlarnaSubscriptionNextBilling" - """ - Describes the upcoming charge for this subscription. - """ - reference: str - """ - A non-customer-facing reference to correlate subscription charges in the Klarna app. Use a value that persists across subscription charges. - """ - - class CreateParamsPaymentMethodOptionsKlarnaSubscriptionNextBilling( - TypedDict, - ): - amount: int - """ - The amount of the next charge for the subscription. - """ - date: str - """ - The date of the next charge for the subscription in YYYY-MM-DD format. - """ - - class CreateParamsPaymentMethodOptionsLink(TypedDict): - persistent_token: NotRequired[str] - """ - [Deprecated] This is a legacy parameter that no longer has any function. - """ - - class CreateParamsPaymentMethodOptionsPaypal(TypedDict): - billing_agreement_id: NotRequired[str] - """ - The PayPal Billing Agreement ID (BAID). This is an ID generated by PayPal which represents the mandate between the merchant and the customer. - """ - currency: NotRequired[str] - subsellers: NotRequired[List[str]] - """ - The Stripe connected account IDs of the sellers on the platform for this transaction (optional). Only allowed when [separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) are used. - """ - - class CreateParamsPaymentMethodOptionsPayto(TypedDict): - mandate_options: NotRequired[ - "SetupIntentService.CreateParamsPaymentMethodOptionsPaytoMandateOptions" - ] - """ - Additional fields for Mandate creation. - """ - - class CreateParamsPaymentMethodOptionsPaytoMandateOptions(TypedDict): - amount: NotRequired[int] - """ - Amount that will be collected. It is required when `amount_type` is `fixed`. - """ - amount_type: NotRequired[Literal["fixed", "maximum"]] - """ - The type of amount that will be collected. The amount charged must be exact or up to the value of `amount` param for `fixed` or `maximum` type respectively. - """ - end_date: NotRequired[str] - """ - Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no end date. - """ - payment_schedule: NotRequired[ - Literal[ - "adhoc", - "annual", - "daily", - "fortnightly", - "monthly", - "quarterly", - "semi_annual", - "weekly", - ] - ] - """ - The periodicity at which payments will be collected. - """ - payments_per_period: NotRequired[int] - """ - The number of payments that will be made during a payment period. Defaults to 1 except for when `payment_schedule` is `adhoc`. In that case, it defaults to no limit. - """ - purpose: NotRequired[ - Literal[ - "dependant_support", - "government", - "loan", - "mortgage", - "other", - "pension", - "personal", - "retail", - "salary", - "tax", - "utility", - ] - ] - """ - The purpose for which payments are made. Defaults to retail. - """ - start_date: NotRequired[str] - """ - Date, in YYYY-MM-DD format, from which payments will be collected. Defaults to confirmation time. - """ - - class CreateParamsPaymentMethodOptionsPix(TypedDict): - mandate_options: NotRequired[ - "SetupIntentService.CreateParamsPaymentMethodOptionsPixMandateOptions" - ] - """ - Additional fields for mandate creation. - """ - - class CreateParamsPaymentMethodOptionsPixMandateOptions(TypedDict): - amount: NotRequired[int] - """ - Amount to be charged for future payments. Required when `amount_type=fixed`. If not provided for `amount_type=maximum`, defaults to 40000. - """ - amount_includes_iof: NotRequired[Literal["always", "never"]] - """ - Determines if the amount includes the IOF tax. Defaults to `never`. - """ - amount_type: NotRequired[Literal["fixed", "maximum"]] - """ - Type of amount. Defaults to `maximum`. - """ - currency: NotRequired[str] - """ - Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Only `brl` is supported currently. - """ - end_date: NotRequired[str] - """ - Date when the mandate expires and no further payments will be charged, in `YYYY-MM-DD`. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. - """ - payment_schedule: NotRequired[ - Literal["halfyearly", "monthly", "quarterly", "weekly", "yearly"] - ] - """ - Schedule at which the future payments will be charged. Defaults to `weekly`. - """ - reference: NotRequired[str] - """ - Subscription name displayed to buyers in their bank app. Defaults to the displayable business name. - """ - start_date: NotRequired[str] - """ - Start date of the mandate, in `YYYY-MM-DD`. Start date should be at least 3 days in the future. Defaults to 3 days after the current date. - """ - - class CreateParamsPaymentMethodOptionsSepaDebit(TypedDict): - mandate_options: NotRequired[ - "SetupIntentService.CreateParamsPaymentMethodOptionsSepaDebitMandateOptions" - ] - """ - Additional fields for Mandate creation - """ - - class CreateParamsPaymentMethodOptionsSepaDebitMandateOptions(TypedDict): - reference_prefix: NotRequired["Literal['']|str"] - """ - Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'. - """ - - class CreateParamsPaymentMethodOptionsUsBankAccount(TypedDict): - financial_connections: NotRequired[ - "SetupIntentService.CreateParamsPaymentMethodOptionsUsBankAccountFinancialConnections" - ] - """ - Additional fields for Financial Connections Session creation - """ - mandate_options: NotRequired[ - "SetupIntentService.CreateParamsPaymentMethodOptionsUsBankAccountMandateOptions" - ] - """ - Additional fields for Mandate creation - """ - networks: NotRequired[ - "SetupIntentService.CreateParamsPaymentMethodOptionsUsBankAccountNetworks" - ] - """ - Additional fields for network related functions - """ - verification_method: NotRequired[ - Literal["automatic", "instant", "microdeposits"] - ] - """ - Bank account verification method. - """ - - class CreateParamsPaymentMethodOptionsUsBankAccountFinancialConnections( - TypedDict, - ): - filters: NotRequired[ - "SetupIntentService.CreateParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters" - ] - """ - Provide filters for the linked accounts that the customer can select for the payment method. - """ - manual_entry: NotRequired[ - "SetupIntentService.CreateParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsManualEntry" - ] - """ - Customize manual entry behavior - """ - permissions: NotRequired[ - List[ - Literal[ - "balances", "ownership", "payment_method", "transactions" - ] - ] - ] - """ - The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. - """ - prefetch: NotRequired[ - List[ - Literal[ - "balances", - "inferred_balances", - "ownership", - "transactions", - ] - ] - ] - """ - List of data features that you would like to retrieve upon account creation. - """ - return_url: NotRequired[str] - """ - For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. - """ - - class CreateParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters( - TypedDict, - ): - account_subcategories: NotRequired[ - List[Literal["checking", "savings"]] - ] - """ - The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`. - """ - institution: NotRequired[str] - """ - ID of the institution to use to filter for selectable accounts. - """ - - class CreateParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsManualEntry( - TypedDict, - ): - mode: Literal["automatic", "custom"] - """ - Settings for configuring manual entry of account details. - """ - - class CreateParamsPaymentMethodOptionsUsBankAccountMandateOptions( - TypedDict, - ): - collection_method: NotRequired["Literal['']|Literal['paper']"] - """ - The method used to collect offline mandate customer acceptance. - """ - - class CreateParamsPaymentMethodOptionsUsBankAccountNetworks(TypedDict): - requested: NotRequired[List[Literal["ach", "us_domestic_wire"]]] - """ - Triggers validations to run across the selected networks - """ - - class CreateParamsSingleUse(TypedDict): - amount: int - """ - Amount the customer is granting permission to collect later. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). - """ - 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). - """ - - class ListParams(TypedDict): - attach_to_self: NotRequired[bool] - """ - If present, the SetupIntent's payment method will be attached to the in-context Stripe Account. - - It can only be used for this Stripe Account's own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer. - """ - created: NotRequired["SetupIntentService.ListParamsCreated|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. - """ - customer: NotRequired[str] - """ - Only return SetupIntents for the customer specified by this customer ID. - """ - customer_account: NotRequired[str] - """ - Only return SetupIntents for the account specified by this customer ID. - """ - 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. - """ - payment_method: NotRequired[str] - """ - Only return SetupIntents that associate with the specified payment method. - """ - 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 ListParamsCreated(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) - """ - - class RetrieveParams(TypedDict): - client_secret: NotRequired[str] - """ - The client secret of the SetupIntent. We require this string if you use a publishable key to retrieve the SetupIntent. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class UpdateParams(TypedDict): - attach_to_self: NotRequired[bool] - """ - If present, the SetupIntent's payment method will be attached to the in-context Stripe Account. - - It can only be used for this Stripe Account's own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer. - """ - customer: NotRequired[str] - """ - ID of the Customer this SetupIntent belongs to, if one exists. - - If present, the SetupIntent's payment method will be attached to the Customer on successful setup. Payment methods attached to other Customers cannot be used with this SetupIntent. - """ - customer_account: NotRequired[str] - """ - ID of the Account this SetupIntent belongs to, if one exists. - - If present, the SetupIntent's payment method will be attached to the Account on successful setup. Payment methods attached to other Accounts cannot be used with this SetupIntent. - """ - description: NotRequired[str] - """ - An arbitrary string attached to the object. Often useful for displaying to users. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - flow_directions: NotRequired[List[Literal["inbound", "outbound"]]] - """ - Indicates the directions of money movement for which this payment method is intended to be used. - - Include `inbound` if you intend to use the payment method as the origin to pull funds from. Include `outbound` if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - payment_method: NotRequired[str] - """ - ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent. To unset this field to null, pass in an empty string. - """ - payment_method_configuration: NotRequired[str] - """ - The ID of the [payment method configuration](https://stripe.com/docs/api/payment_method_configurations) to use with this SetupIntent. - """ - payment_method_data: NotRequired[ - "SetupIntentService.UpdateParamsPaymentMethodData" - ] - """ - When included, this hash creates a PaymentMethod that is set as the [`payment_method`](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-payment_method) - value in the SetupIntent. - """ - payment_method_options: NotRequired[ - "SetupIntentService.UpdateParamsPaymentMethodOptions" - ] - """ - Payment method-specific configuration for this SetupIntent. - """ - payment_method_types: NotRequired[List[str]] - """ - The list of payment method types (for example, card) that this SetupIntent can set up. If you don't provide this, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). A list of valid payment method types can be found [here](https://docs.stripe.com/api/payment_methods/object#payment_method_object-type). - """ - - class UpdateParamsPaymentMethodData(TypedDict): - acss_debit: NotRequired[ - "SetupIntentService.UpdateParamsPaymentMethodDataAcssDebit" - ] - """ - If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method. - """ - affirm: NotRequired[ - "SetupIntentService.UpdateParamsPaymentMethodDataAffirm" - ] - """ - If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method. - """ - afterpay_clearpay: NotRequired[ - "SetupIntentService.UpdateParamsPaymentMethodDataAfterpayClearpay" - ] - """ - If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method. - """ - alipay: NotRequired[ - "SetupIntentService.UpdateParamsPaymentMethodDataAlipay" - ] - """ - If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. - """ - allow_redisplay: NotRequired[ - Literal["always", "limited", "unspecified"] - ] - """ - This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`. - """ - alma: NotRequired[ - "SetupIntentService.UpdateParamsPaymentMethodDataAlma" - ] - """ - If this is a Alma PaymentMethod, this hash contains details about the Alma payment method. - """ - amazon_pay: NotRequired[ - "SetupIntentService.UpdateParamsPaymentMethodDataAmazonPay" - ] - """ - If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method. - """ - au_becs_debit: NotRequired[ - "SetupIntentService.UpdateParamsPaymentMethodDataAuBecsDebit" - ] - """ - If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. - """ - bacs_debit: NotRequired[ - "SetupIntentService.UpdateParamsPaymentMethodDataBacsDebit" - ] - """ - If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account. - """ - bancontact: NotRequired[ - "SetupIntentService.UpdateParamsPaymentMethodDataBancontact" - ] - """ - If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method. - """ - billie: NotRequired[ - "SetupIntentService.UpdateParamsPaymentMethodDataBillie" - ] - """ - If this is a `billie` PaymentMethod, this hash contains details about the Billie payment method. - """ - billing_details: NotRequired[ - "SetupIntentService.UpdateParamsPaymentMethodDataBillingDetails" - ] - """ - Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. - """ - blik: NotRequired[ - "SetupIntentService.UpdateParamsPaymentMethodDataBlik" - ] - """ - If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method. - """ - boleto: NotRequired[ - "SetupIntentService.UpdateParamsPaymentMethodDataBoleto" - ] - """ - If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method. - """ - cashapp: NotRequired[ - "SetupIntentService.UpdateParamsPaymentMethodDataCashapp" - ] - """ - If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. - """ - crypto: NotRequired[ - "SetupIntentService.UpdateParamsPaymentMethodDataCrypto" - ] - """ - If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment method. - """ - customer_balance: NotRequired[ - "SetupIntentService.UpdateParamsPaymentMethodDataCustomerBalance" - ] - """ - If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. - """ - eps: NotRequired["SetupIntentService.UpdateParamsPaymentMethodDataEps"] - """ - If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. - """ - fpx: NotRequired["SetupIntentService.UpdateParamsPaymentMethodDataFpx"] - """ - If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method. - """ - giropay: NotRequired[ - "SetupIntentService.UpdateParamsPaymentMethodDataGiropay" - ] - """ - If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method. - """ - gopay: NotRequired[ - "SetupIntentService.UpdateParamsPaymentMethodDataGopay" - ] - """ - If this is a Gopay PaymentMethod, this hash contains details about the Gopay payment method. - """ - grabpay: NotRequired[ - "SetupIntentService.UpdateParamsPaymentMethodDataGrabpay" - ] - """ - If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method. - """ - id_bank_transfer: NotRequired[ - "SetupIntentService.UpdateParamsPaymentMethodDataIdBankTransfer" - ] - """ - If this is an `IdBankTransfer` PaymentMethod, this hash contains details about the IdBankTransfer payment method. - """ - ideal: NotRequired[ - "SetupIntentService.UpdateParamsPaymentMethodDataIdeal" - ] - """ - If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. - """ - interac_present: NotRequired[ - "SetupIntentService.UpdateParamsPaymentMethodDataInteracPresent" - ] - """ - If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. - """ - kakao_pay: NotRequired[ - "SetupIntentService.UpdateParamsPaymentMethodDataKakaoPay" - ] - """ - If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method. - """ - klarna: NotRequired[ - "SetupIntentService.UpdateParamsPaymentMethodDataKlarna" - ] - """ - If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method. - """ - konbini: NotRequired[ - "SetupIntentService.UpdateParamsPaymentMethodDataKonbini" - ] - """ - If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. - """ - kr_card: NotRequired[ - "SetupIntentService.UpdateParamsPaymentMethodDataKrCard" - ] - """ - If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method. - """ - link: NotRequired[ - "SetupIntentService.UpdateParamsPaymentMethodDataLink" - ] - """ - If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. - """ - mb_way: NotRequired[ - "SetupIntentService.UpdateParamsPaymentMethodDataMbWay" - ] - """ - If this is a MB WAY PaymentMethod, this hash contains details about the MB WAY payment method. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - mobilepay: NotRequired[ - "SetupIntentService.UpdateParamsPaymentMethodDataMobilepay" - ] - """ - If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method. - """ - multibanco: NotRequired[ - "SetupIntentService.UpdateParamsPaymentMethodDataMultibanco" - ] - """ - If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method. - """ - naver_pay: NotRequired[ - "SetupIntentService.UpdateParamsPaymentMethodDataNaverPay" - ] - """ - If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method. - """ - nz_bank_account: NotRequired[ - "SetupIntentService.UpdateParamsPaymentMethodDataNzBankAccount" - ] - """ - If this is an nz_bank_account PaymentMethod, this hash contains details about the nz_bank_account payment method. - """ - oxxo: NotRequired[ - "SetupIntentService.UpdateParamsPaymentMethodDataOxxo" - ] - """ - If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. - """ - p24: NotRequired["SetupIntentService.UpdateParamsPaymentMethodDataP24"] - """ - If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. - """ - pay_by_bank: NotRequired[ - "SetupIntentService.UpdateParamsPaymentMethodDataPayByBank" - ] - """ - If this is a `pay_by_bank` PaymentMethod, this hash contains details about the PayByBank payment method. - """ - payco: NotRequired[ - "SetupIntentService.UpdateParamsPaymentMethodDataPayco" - ] - """ - If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method. - """ - paynow: NotRequired[ - "SetupIntentService.UpdateParamsPaymentMethodDataPaynow" - ] - """ - If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method. - """ - paypal: NotRequired[ - "SetupIntentService.UpdateParamsPaymentMethodDataPaypal" - ] - """ - If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method. - """ - paypay: NotRequired[ - "SetupIntentService.UpdateParamsPaymentMethodDataPaypay" - ] - """ - If this is a `paypay` PaymentMethod, this hash contains details about the PayPay payment method. - """ - payto: NotRequired[ - "SetupIntentService.UpdateParamsPaymentMethodDataPayto" - ] - """ - If this is a `payto` PaymentMethod, this hash contains details about the PayTo payment method. - """ - pix: NotRequired["SetupIntentService.UpdateParamsPaymentMethodDataPix"] - """ - If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method. - """ - promptpay: NotRequired[ - "SetupIntentService.UpdateParamsPaymentMethodDataPromptpay" - ] - """ - If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method. - """ - qris: NotRequired[ - "SetupIntentService.UpdateParamsPaymentMethodDataQris" - ] - """ - If this is a `qris` PaymentMethod, this hash contains details about the QRIS payment method. - """ - radar_options: NotRequired[ - "SetupIntentService.UpdateParamsPaymentMethodDataRadarOptions" - ] - """ - Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. - """ - rechnung: NotRequired[ - "SetupIntentService.UpdateParamsPaymentMethodDataRechnung" - ] - """ - If this is a `rechnung` PaymentMethod, this hash contains details about the Rechnung payment method. - """ - revolut_pay: NotRequired[ - "SetupIntentService.UpdateParamsPaymentMethodDataRevolutPay" - ] - """ - If this is a `revolut_pay` PaymentMethod, this hash contains details about the Revolut Pay payment method. - """ - samsung_pay: NotRequired[ - "SetupIntentService.UpdateParamsPaymentMethodDataSamsungPay" - ] - """ - If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method. - """ - satispay: NotRequired[ - "SetupIntentService.UpdateParamsPaymentMethodDataSatispay" - ] - """ - If this is a `satispay` PaymentMethod, this hash contains details about the Satispay payment method. - """ - sepa_debit: NotRequired[ - "SetupIntentService.UpdateParamsPaymentMethodDataSepaDebit" - ] - """ - If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. - """ - shopeepay: NotRequired[ - "SetupIntentService.UpdateParamsPaymentMethodDataShopeepay" - ] - """ - If this is a Shopeepay PaymentMethod, this hash contains details about the Shopeepay payment method. - """ - sofort: NotRequired[ - "SetupIntentService.UpdateParamsPaymentMethodDataSofort" - ] - """ - If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. - """ - stripe_balance: NotRequired[ - "SetupIntentService.UpdateParamsPaymentMethodDataStripeBalance" - ] - """ - This hash contains details about the Stripe balance payment method. - """ - swish: NotRequired[ - "SetupIntentService.UpdateParamsPaymentMethodDataSwish" - ] - """ - If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method. - """ - twint: NotRequired[ - "SetupIntentService.UpdateParamsPaymentMethodDataTwint" - ] - """ - If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method. - """ - type: Literal[ - "acss_debit", - "affirm", - "afterpay_clearpay", - "alipay", - "alma", - "amazon_pay", - "au_becs_debit", - "bacs_debit", - "bancontact", - "billie", - "blik", - "boleto", - "cashapp", - "crypto", - "customer_balance", - "eps", - "fpx", - "giropay", - "gopay", - "grabpay", - "id_bank_transfer", - "ideal", - "kakao_pay", - "klarna", - "konbini", - "kr_card", - "link", - "mb_way", - "mobilepay", - "multibanco", - "naver_pay", - "nz_bank_account", - "oxxo", - "p24", - "pay_by_bank", - "payco", - "paynow", - "paypal", - "paypay", - "payto", - "pix", - "promptpay", - "qris", - "rechnung", - "revolut_pay", - "samsung_pay", - "satispay", - "sepa_debit", - "shopeepay", - "sofort", - "stripe_balance", - "swish", - "twint", - "us_bank_account", - "wechat_pay", - "zip", - ] - """ - The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. - """ - us_bank_account: NotRequired[ - "SetupIntentService.UpdateParamsPaymentMethodDataUsBankAccount" - ] - """ - If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. - """ - wechat_pay: NotRequired[ - "SetupIntentService.UpdateParamsPaymentMethodDataWechatPay" - ] - """ - If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method. - """ - zip: NotRequired["SetupIntentService.UpdateParamsPaymentMethodDataZip"] - """ - If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method. - """ - - class UpdateParamsPaymentMethodDataAcssDebit(TypedDict): - account_number: str - """ - Customer's bank account number. - """ - institution_number: str - """ - Institution number of the customer's bank. - """ - transit_number: str - """ - Transit number of the customer's bank. - """ - - class UpdateParamsPaymentMethodDataAffirm(TypedDict): - pass - - class UpdateParamsPaymentMethodDataAfterpayClearpay(TypedDict): - pass - - class UpdateParamsPaymentMethodDataAlipay(TypedDict): - pass - - class UpdateParamsPaymentMethodDataAlma(TypedDict): - pass - - class UpdateParamsPaymentMethodDataAmazonPay(TypedDict): - pass - - class UpdateParamsPaymentMethodDataAuBecsDebit(TypedDict): - account_number: str - """ - The account number for the bank account. - """ - bsb_number: str - """ - Bank-State-Branch number of the bank account. - """ - - class UpdateParamsPaymentMethodDataBacsDebit(TypedDict): - account_number: NotRequired[str] - """ - Account number of the bank account that the funds will be debited from. - """ - sort_code: NotRequired[str] - """ - Sort code of the bank account. (e.g., `10-20-30`) - """ - - class UpdateParamsPaymentMethodDataBancontact(TypedDict): - pass - - class UpdateParamsPaymentMethodDataBillie(TypedDict): - pass - - class UpdateParamsPaymentMethodDataBillingDetails(TypedDict): - address: NotRequired[ - "Literal['']|SetupIntentService.UpdateParamsPaymentMethodDataBillingDetailsAddress" - ] - """ - Billing address. - """ - email: NotRequired["Literal['']|str"] - """ - Email address. - """ - name: NotRequired["Literal['']|str"] - """ - Full name. - """ - phone: NotRequired["Literal['']|str"] - """ - Billing phone number (including extension). - """ - tax_id: NotRequired[str] - """ - Taxpayer identification number. Used only for transactions between LATAM buyers and non-LATAM sellers. - """ - - class UpdateParamsPaymentMethodDataBillingDetailsAddress(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. - """ - - class UpdateParamsPaymentMethodDataBlik(TypedDict): - pass - - class UpdateParamsPaymentMethodDataBoleto(TypedDict): - tax_id: str - """ - The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers) - """ - - class UpdateParamsPaymentMethodDataCashapp(TypedDict): - pass - - class UpdateParamsPaymentMethodDataCrypto(TypedDict): - pass - - class UpdateParamsPaymentMethodDataCustomerBalance(TypedDict): - pass - - class UpdateParamsPaymentMethodDataEps(TypedDict): - bank: NotRequired[ - Literal[ - "arzte_und_apotheker_bank", - "austrian_anadi_bank_ag", - "bank_austria", - "bankhaus_carl_spangler", - "bankhaus_schelhammer_und_schattera_ag", - "bawag_psk_ag", - "bks_bank_ag", - "brull_kallmus_bank_ag", - "btv_vier_lander_bank", - "capital_bank_grawe_gruppe_ag", - "deutsche_bank_ag", - "dolomitenbank", - "easybank_ag", - "erste_bank_und_sparkassen", - "hypo_alpeadriabank_international_ag", - "hypo_bank_burgenland_aktiengesellschaft", - "hypo_noe_lb_fur_niederosterreich_u_wien", - "hypo_oberosterreich_salzburg_steiermark", - "hypo_tirol_bank_ag", - "hypo_vorarlberg_bank_ag", - "marchfelder_bank", - "oberbank_ag", - "raiffeisen_bankengruppe_osterreich", - "schoellerbank_ag", - "sparda_bank_wien", - "volksbank_gruppe", - "volkskreditbank_ag", - "vr_bank_braunau", - ] - ] - """ - The customer's bank. - """ - - class UpdateParamsPaymentMethodDataFpx(TypedDict): - account_holder_type: NotRequired[Literal["company", "individual"]] - """ - Account holder type for FPX transaction - """ - bank: Literal[ - "affin_bank", - "agrobank", - "alliance_bank", - "ambank", - "bank_islam", - "bank_muamalat", - "bank_of_china", - "bank_rakyat", - "bsn", - "cimb", - "deutsche_bank", - "hong_leong_bank", - "hsbc", - "kfh", - "maybank2e", - "maybank2u", - "ocbc", - "pb_enterprise", - "public_bank", - "rhb", - "standard_chartered", - "uob", - ] - """ - The customer's bank. - """ - - class UpdateParamsPaymentMethodDataGiropay(TypedDict): - pass - - class UpdateParamsPaymentMethodDataGopay(TypedDict): - pass - - class UpdateParamsPaymentMethodDataGrabpay(TypedDict): - pass - - class UpdateParamsPaymentMethodDataIdBankTransfer(TypedDict): - bank: NotRequired[Literal["bca", "bni", "bri", "cimb", "permata"]] - """ - Bank where the account is held. - """ - - class UpdateParamsPaymentMethodDataIdeal(TypedDict): - bank: NotRequired[ - Literal[ - "abn_amro", - "asn_bank", - "bunq", - "buut", - "handelsbanken", - "ing", - "knab", - "moneyou", - "n26", - "nn", - "rabobank", - "regiobank", - "revolut", - "sns_bank", - "triodos_bank", - "van_lanschot", - "yoursafe", - ] - ] - """ - The customer's bank. Only use this parameter for existing customers. Don't use it for new customers. - """ - - class UpdateParamsPaymentMethodDataInteracPresent(TypedDict): - pass - - class UpdateParamsPaymentMethodDataKakaoPay(TypedDict): - pass - - class UpdateParamsPaymentMethodDataKlarna(TypedDict): - dob: NotRequired[ - "SetupIntentService.UpdateParamsPaymentMethodDataKlarnaDob" - ] - """ - Customer's date of birth - """ - - class UpdateParamsPaymentMethodDataKlarnaDob(TypedDict): - day: int - """ - The day of birth, between 1 and 31. - """ - month: int - """ - The month of birth, between 1 and 12. - """ - year: int - """ - The four-digit year of birth. - """ - - class UpdateParamsPaymentMethodDataKonbini(TypedDict): - pass - - class UpdateParamsPaymentMethodDataKrCard(TypedDict): - pass - - class UpdateParamsPaymentMethodDataLink(TypedDict): - pass - - class UpdateParamsPaymentMethodDataMbWay(TypedDict): - pass - - class UpdateParamsPaymentMethodDataMobilepay(TypedDict): - pass - - class UpdateParamsPaymentMethodDataMultibanco(TypedDict): - pass - - class UpdateParamsPaymentMethodDataNaverPay(TypedDict): - funding: NotRequired[Literal["card", "points"]] - """ - Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`. - """ - - class UpdateParamsPaymentMethodDataNzBankAccount(TypedDict): - account_holder_name: NotRequired[str] - """ - The name on the bank account. Only required if the account holder name is different from the name of the authorized signatory collected in the PaymentMethod's billing details. - """ - account_number: str - """ - The account number for the bank account. - """ - bank_code: str - """ - The numeric code for the bank account's bank. - """ - branch_code: str - """ - The numeric code for the bank account's bank branch. - """ - reference: NotRequired[str] - suffix: str - """ - The suffix of the bank account number. - """ - - class UpdateParamsPaymentMethodDataOxxo(TypedDict): - pass - - class UpdateParamsPaymentMethodDataP24(TypedDict): - bank: NotRequired[ - Literal[ - "alior_bank", - "bank_millennium", - "bank_nowy_bfg_sa", - "bank_pekao_sa", - "banki_spbdzielcze", - "blik", - "bnp_paribas", - "boz", - "citi_handlowy", - "credit_agricole", - "envelobank", - "etransfer_pocztowy24", - "getin_bank", - "ideabank", - "ing", - "inteligo", - "mbank_mtransfer", - "nest_przelew", - "noble_pay", - "pbac_z_ipko", - "plus_bank", - "santander_przelew24", - "tmobile_usbugi_bankowe", - "toyota_bank", - "velobank", - "volkswagen_bank", - ] - ] - """ - The customer's bank. - """ - - class UpdateParamsPaymentMethodDataPayByBank(TypedDict): - pass - - class UpdateParamsPaymentMethodDataPayco(TypedDict): - pass - - class UpdateParamsPaymentMethodDataPaynow(TypedDict): - pass - - class UpdateParamsPaymentMethodDataPaypal(TypedDict): - pass - - class UpdateParamsPaymentMethodDataPaypay(TypedDict): - pass - - class UpdateParamsPaymentMethodDataPayto(TypedDict): - account_number: NotRequired[str] - """ - The account number for the bank account. - """ - bsb_number: NotRequired[str] - """ - Bank-State-Branch number of the bank account. - """ - pay_id: NotRequired[str] - """ - The PayID alias for the bank account. - """ - - class UpdateParamsPaymentMethodDataPix(TypedDict): - pass - - class UpdateParamsPaymentMethodDataPromptpay(TypedDict): - pass - - class UpdateParamsPaymentMethodDataQris(TypedDict): - pass - - class UpdateParamsPaymentMethodDataRadarOptions(TypedDict): - session: NotRequired[str] - """ - A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. - """ - - class UpdateParamsPaymentMethodDataRechnung(TypedDict): - dob: "SetupIntentService.UpdateParamsPaymentMethodDataRechnungDob" - """ - Customer's date of birth - """ - - class UpdateParamsPaymentMethodDataRechnungDob(TypedDict): - day: int - """ - The day of birth, between 1 and 31. - """ - month: int - """ - The month of birth, between 1 and 12. - """ - year: int - """ - The four-digit year of birth. - """ - - class UpdateParamsPaymentMethodDataRevolutPay(TypedDict): - pass - - class UpdateParamsPaymentMethodDataSamsungPay(TypedDict): - pass - - class UpdateParamsPaymentMethodDataSatispay(TypedDict): - pass - - class UpdateParamsPaymentMethodDataSepaDebit(TypedDict): - iban: str - """ - IBAN of the bank account. - """ - - class UpdateParamsPaymentMethodDataShopeepay(TypedDict): - pass - - class UpdateParamsPaymentMethodDataSofort(TypedDict): - country: Literal["AT", "BE", "DE", "ES", "IT", "NL"] - """ - Two-letter ISO code representing the country the bank account is located in. - """ - - class UpdateParamsPaymentMethodDataStripeBalance(TypedDict): - account: NotRequired[str] - """ - The connected account ID whose Stripe balance to use as the source of payment - """ - source_type: NotRequired[Literal["bank_account", "card", "fpx"]] - """ - The [source_type](https://docs.stripe.com/api/balance/balance_object#balance_object-available-source_types) of the balance - """ - - class UpdateParamsPaymentMethodDataSwish(TypedDict): - pass - - class UpdateParamsPaymentMethodDataTwint(TypedDict): - pass - - class UpdateParamsPaymentMethodDataUsBankAccount(TypedDict): - account_holder_type: NotRequired[Literal["company", "individual"]] - """ - Account holder type: individual or company. - """ - account_number: NotRequired[str] - """ - Account number of the bank account. - """ - account_type: NotRequired[Literal["checking", "savings"]] - """ - Account type: checkings or savings. Defaults to checking if omitted. - """ - financial_connections_account: NotRequired[str] - """ - The ID of a Financial Connections Account to use as a payment method. - """ - routing_number: NotRequired[str] - """ - Routing number of the bank account. - """ - - class UpdateParamsPaymentMethodDataWechatPay(TypedDict): - pass - - class UpdateParamsPaymentMethodDataZip(TypedDict): - pass - - class UpdateParamsPaymentMethodOptions(TypedDict): - acss_debit: NotRequired[ - "SetupIntentService.UpdateParamsPaymentMethodOptionsAcssDebit" - ] - """ - If this is a `acss_debit` SetupIntent, this sub-hash contains details about the ACSS Debit payment method options. - """ - amazon_pay: NotRequired[ - "SetupIntentService.UpdateParamsPaymentMethodOptionsAmazonPay" - ] - """ - If this is a `amazon_pay` SetupIntent, this sub-hash contains details about the AmazonPay payment method options. - """ - bacs_debit: NotRequired[ - "SetupIntentService.UpdateParamsPaymentMethodOptionsBacsDebit" - ] - """ - If this is a `bacs_debit` SetupIntent, this sub-hash contains details about the Bacs Debit payment method options. - """ - card: NotRequired[ - "SetupIntentService.UpdateParamsPaymentMethodOptionsCard" - ] - """ - Configuration for any card setup attempted on this SetupIntent. - """ - card_present: NotRequired[ - "SetupIntentService.UpdateParamsPaymentMethodOptionsCardPresent" - ] - """ - If this is a `card_present` PaymentMethod, this sub-hash contains details about the card-present payment method options. - """ - klarna: NotRequired[ - "SetupIntentService.UpdateParamsPaymentMethodOptionsKlarna" - ] - """ - If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method options. - """ - link: NotRequired[ - "SetupIntentService.UpdateParamsPaymentMethodOptionsLink" - ] - """ - If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options. - """ - paypal: NotRequired[ - "SetupIntentService.UpdateParamsPaymentMethodOptionsPaypal" - ] - """ - If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options. - """ - payto: NotRequired[ - "SetupIntentService.UpdateParamsPaymentMethodOptionsPayto" - ] - """ - If this is a `payto` SetupIntent, this sub-hash contains details about the PayTo payment method options. - """ - pix: NotRequired[ - "SetupIntentService.UpdateParamsPaymentMethodOptionsPix" - ] - """ - If this is a `pix` SetupIntent, this sub-hash contains details about the Pix payment method options. - """ - sepa_debit: NotRequired[ - "SetupIntentService.UpdateParamsPaymentMethodOptionsSepaDebit" - ] - """ - If this is a `sepa_debit` SetupIntent, this sub-hash contains details about the SEPA Debit payment method options. - """ - us_bank_account: NotRequired[ - "SetupIntentService.UpdateParamsPaymentMethodOptionsUsBankAccount" - ] - """ - If this is a `us_bank_account` SetupIntent, this sub-hash contains details about the US bank account payment method options. - """ - - class UpdateParamsPaymentMethodOptionsAcssDebit(TypedDict): - currency: NotRequired[Literal["cad", "usd"]] - """ - 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). - """ - mandate_options: NotRequired[ - "SetupIntentService.UpdateParamsPaymentMethodOptionsAcssDebitMandateOptions" - ] - """ - Additional fields for Mandate creation - """ - verification_method: NotRequired[ - Literal["automatic", "instant", "microdeposits"] - ] - """ - Bank account verification method. - """ - - class UpdateParamsPaymentMethodOptionsAcssDebitMandateOptions(TypedDict): - custom_mandate_url: NotRequired["Literal['']|str"] - """ - A URL for custom mandate text to render during confirmation step. - The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent, - or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent. - """ - default_for: NotRequired[List[Literal["invoice", "subscription"]]] - """ - List of Stripe products where this mandate can be selected automatically. - """ - interval_description: NotRequired[str] - """ - Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'. - """ - payment_schedule: NotRequired[ - Literal["combined", "interval", "sporadic"] - ] - """ - Payment schedule for the mandate. - """ - transaction_type: NotRequired[Literal["business", "personal"]] - """ - Transaction type of the mandate. - """ - - class UpdateParamsPaymentMethodOptionsAmazonPay(TypedDict): - pass - - class UpdateParamsPaymentMethodOptionsBacsDebit(TypedDict): - mandate_options: NotRequired[ - "SetupIntentService.UpdateParamsPaymentMethodOptionsBacsDebitMandateOptions" - ] - """ - Additional fields for Mandate creation - """ - - class UpdateParamsPaymentMethodOptionsBacsDebitMandateOptions(TypedDict): - reference_prefix: NotRequired["Literal['']|str"] - """ - Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'. - """ - - class UpdateParamsPaymentMethodOptionsCard(TypedDict): - mandate_options: NotRequired[ - "SetupIntentService.UpdateParamsPaymentMethodOptionsCardMandateOptions" - ] - """ - Configuration options for setting up an eMandate for cards issued in India. - """ - moto: NotRequired[bool] - """ - When specified, this parameter signals that a card has been collected - as MOTO (Mail Order Telephone Order) and thus out of scope for SCA. This - parameter can only be provided during confirmation. - """ - network: NotRequired[ - Literal[ - "amex", - "cartes_bancaires", - "diners", - "discover", - "eftpos_au", - "girocard", - "interac", - "jcb", - "link", - "mastercard", - "unionpay", - "unknown", - "visa", - ] - ] - """ - Selected network to process this SetupIntent on. Depends on the available networks of the card attached to the SetupIntent. Can be only set confirm-time. - """ - request_three_d_secure: NotRequired[ - Literal["any", "automatic", "challenge"] - ] - """ - We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. - """ - three_d_secure: NotRequired[ - "SetupIntentService.UpdateParamsPaymentMethodOptionsCardThreeDSecure" - ] - """ - If 3D Secure authentication was performed with a third-party provider, - the authentication details to use for this setup. - """ - - class UpdateParamsPaymentMethodOptionsCardMandateOptions(TypedDict): - amount: int - """ - Amount to be charged for future payments. - """ - amount_type: Literal["fixed", "maximum"] - """ - One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. - """ - currency: str - """ - Currency in which future payments will be charged. 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). - """ - description: NotRequired[str] - """ - A description of the mandate or subscription that is meant to be displayed to the customer. - """ - end_date: NotRequired[int] - """ - End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. - """ - interval: Literal["day", "month", "sporadic", "week", "year"] - """ - Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`. - """ - interval_count: NotRequired[int] - """ - The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`. - """ - reference: str - """ - Unique identifier for the mandate or subscription. - """ - start_date: int - """ - Start date of the mandate or subscription. Start date should not be lesser than yesterday. - """ - supported_types: NotRequired[List[Literal["india"]]] - """ - Specifies the type of mandates supported. Possible values are `india`. - """ - - class UpdateParamsPaymentMethodOptionsCardPresent(TypedDict): - pass - - class UpdateParamsPaymentMethodOptionsCardThreeDSecure(TypedDict): - ares_trans_status: NotRequired[ - Literal["A", "C", "I", "N", "R", "U", "Y"] - ] - """ - The `transStatus` returned from the card Issuer's ACS in the ARes. - """ - cryptogram: NotRequired[str] - """ - The cryptogram, also known as the "authentication value" (AAV, CAVV or - AEVV). This value is 20 bytes, base64-encoded into a 28-character string. - (Most 3D Secure providers will return the base64-encoded version, which - is what you should specify here.) - """ - electronic_commerce_indicator: NotRequired[ - Literal["01", "02", "05", "06", "07"] - ] - """ - The Electronic Commerce Indicator (ECI) is returned by your 3D Secure - provider and indicates what degree of authentication was performed. - """ - network_options: NotRequired[ - "SetupIntentService.UpdateParamsPaymentMethodOptionsCardThreeDSecureNetworkOptions" - ] - """ - Network specific 3DS fields. Network specific arguments require an - explicit card brand choice. The parameter `payment_method_options.card.network`` - must be populated accordingly - """ - requestor_challenge_indicator: NotRequired[str] - """ - The challenge indicator (`threeDSRequestorChallengeInd`) which was requested in the - AReq sent to the card Issuer's ACS. A string containing 2 digits from 01-99. - """ - transaction_id: NotRequired[str] - """ - For 3D Secure 1, the XID. For 3D Secure 2, the Directory Server - Transaction ID (dsTransID). - """ - version: NotRequired[Literal["1.0.2", "2.1.0", "2.2.0"]] - """ - The version of 3D Secure that was performed. - """ - - class UpdateParamsPaymentMethodOptionsCardThreeDSecureNetworkOptions( - TypedDict, - ): - cartes_bancaires: NotRequired[ - "SetupIntentService.UpdateParamsPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancaires" - ] - """ - Cartes Bancaires-specific 3DS fields. - """ - - class UpdateParamsPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancaires( - TypedDict, - ): - cb_avalgo: Literal["0", "1", "2", "3", "4", "A"] - """ - The cryptogram calculation algorithm used by the card Issuer's ACS - to calculate the Authentication cryptogram. Also known as `cavvAlgorithm`. - messageExtension: CB-AVALGO - """ - cb_exemption: NotRequired[str] - """ - The exemption indicator returned from Cartes Bancaires in the ARes. - message extension: CB-EXEMPTION; string (4 characters) - This is a 3 byte bitmap (low significant byte first and most significant - bit first) that has been Base64 encoded - """ - cb_score: NotRequired[int] - """ - The risk score returned from Cartes Bancaires in the ARes. - message extension: CB-SCORE; numeric value 0-99 - """ - - class UpdateParamsPaymentMethodOptionsKlarna(TypedDict): - currency: NotRequired[str] - """ - The currency of the SetupIntent. Three letter ISO currency code. - """ - on_demand: NotRequired[ - "SetupIntentService.UpdateParamsPaymentMethodOptionsKlarnaOnDemand" - ] - """ - On-demand details if setting up a payment method for on-demand payments. - """ - preferred_locale: NotRequired[ - Literal[ - "cs-CZ", - "da-DK", - "de-AT", - "de-CH", - "de-DE", - "el-GR", - "en-AT", - "en-AU", - "en-BE", - "en-CA", - "en-CH", - "en-CZ", - "en-DE", - "en-DK", - "en-ES", - "en-FI", - "en-FR", - "en-GB", - "en-GR", - "en-IE", - "en-IT", - "en-NL", - "en-NO", - "en-NZ", - "en-PL", - "en-PT", - "en-RO", - "en-SE", - "en-US", - "es-ES", - "es-US", - "fi-FI", - "fr-BE", - "fr-CA", - "fr-CH", - "fr-FR", - "it-CH", - "it-IT", - "nb-NO", - "nl-BE", - "nl-NL", - "pl-PL", - "pt-PT", - "ro-RO", - "sv-FI", - "sv-SE", - ] - ] - """ - Preferred language of the Klarna authorization page that the customer is redirected to - """ - subscriptions: NotRequired[ - "Literal['']|List[SetupIntentService.UpdateParamsPaymentMethodOptionsKlarnaSubscription]" - ] - """ - Subscription details if setting up or charging a subscription - """ - - class UpdateParamsPaymentMethodOptionsKlarnaOnDemand(TypedDict): - average_amount: NotRequired[int] - """ - Your average amount value. You can use a value across your customer base, or segment based on customer type, country, etc. - """ - maximum_amount: NotRequired[int] - """ - The maximum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. - """ - minimum_amount: NotRequired[int] - """ - The lowest or minimum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. - """ - purchase_interval: NotRequired[Literal["day", "month", "week", "year"]] - """ - Interval at which the customer is making purchases - """ - purchase_interval_count: NotRequired[int] - """ - The number of `purchase_interval` between charges - """ - - class UpdateParamsPaymentMethodOptionsKlarnaSubscription(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Unit of time between subscription charges. - """ - interval_count: NotRequired[int] - """ - The number of intervals (specified in the `interval` attribute) between subscription charges. For example, `interval=month` and `interval_count=3` charges every 3 months. - """ - name: NotRequired[str] - """ - Name for subscription. - """ - next_billing: "SetupIntentService.UpdateParamsPaymentMethodOptionsKlarnaSubscriptionNextBilling" - """ - Describes the upcoming charge for this subscription. - """ - reference: str - """ - A non-customer-facing reference to correlate subscription charges in the Klarna app. Use a value that persists across subscription charges. - """ - - class UpdateParamsPaymentMethodOptionsKlarnaSubscriptionNextBilling( - TypedDict, - ): - amount: int - """ - The amount of the next charge for the subscription. - """ - date: str - """ - The date of the next charge for the subscription in YYYY-MM-DD format. - """ - - class UpdateParamsPaymentMethodOptionsLink(TypedDict): - persistent_token: NotRequired[str] - """ - [Deprecated] This is a legacy parameter that no longer has any function. - """ - - class UpdateParamsPaymentMethodOptionsPaypal(TypedDict): - billing_agreement_id: NotRequired[str] - """ - The PayPal Billing Agreement ID (BAID). This is an ID generated by PayPal which represents the mandate between the merchant and the customer. - """ - currency: NotRequired[str] - subsellers: NotRequired[List[str]] - """ - The Stripe connected account IDs of the sellers on the platform for this transaction (optional). Only allowed when [separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) are used. - """ - - class UpdateParamsPaymentMethodOptionsPayto(TypedDict): - mandate_options: NotRequired[ - "SetupIntentService.UpdateParamsPaymentMethodOptionsPaytoMandateOptions" - ] - """ - Additional fields for Mandate creation. - """ - - class UpdateParamsPaymentMethodOptionsPaytoMandateOptions(TypedDict): - amount: NotRequired[int] - """ - Amount that will be collected. It is required when `amount_type` is `fixed`. - """ - amount_type: NotRequired[Literal["fixed", "maximum"]] - """ - The type of amount that will be collected. The amount charged must be exact or up to the value of `amount` param for `fixed` or `maximum` type respectively. - """ - end_date: NotRequired[str] - """ - Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no end date. - """ - payment_schedule: NotRequired[ - Literal[ - "adhoc", - "annual", - "daily", - "fortnightly", - "monthly", - "quarterly", - "semi_annual", - "weekly", - ] - ] - """ - The periodicity at which payments will be collected. - """ - payments_per_period: NotRequired[int] - """ - The number of payments that will be made during a payment period. Defaults to 1 except for when `payment_schedule` is `adhoc`. In that case, it defaults to no limit. - """ - purpose: NotRequired[ - Literal[ - "dependant_support", - "government", - "loan", - "mortgage", - "other", - "pension", - "personal", - "retail", - "salary", - "tax", - "utility", - ] - ] - """ - The purpose for which payments are made. Defaults to retail. - """ - start_date: NotRequired[str] - """ - Date, in YYYY-MM-DD format, from which payments will be collected. Defaults to confirmation time. - """ - - class UpdateParamsPaymentMethodOptionsPix(TypedDict): - mandate_options: NotRequired[ - "SetupIntentService.UpdateParamsPaymentMethodOptionsPixMandateOptions" - ] - """ - Additional fields for mandate creation. - """ - - class UpdateParamsPaymentMethodOptionsPixMandateOptions(TypedDict): - amount: NotRequired[int] - """ - Amount to be charged for future payments. Required when `amount_type=fixed`. If not provided for `amount_type=maximum`, defaults to 40000. - """ - amount_includes_iof: NotRequired[Literal["always", "never"]] - """ - Determines if the amount includes the IOF tax. Defaults to `never`. - """ - amount_type: NotRequired[Literal["fixed", "maximum"]] - """ - Type of amount. Defaults to `maximum`. - """ - currency: NotRequired[str] - """ - Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Only `brl` is supported currently. - """ - end_date: NotRequired[str] - """ - Date when the mandate expires and no further payments will be charged, in `YYYY-MM-DD`. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. - """ - payment_schedule: NotRequired[ - Literal["halfyearly", "monthly", "quarterly", "weekly", "yearly"] - ] - """ - Schedule at which the future payments will be charged. Defaults to `weekly`. - """ - reference: NotRequired[str] - """ - Subscription name displayed to buyers in their bank app. Defaults to the displayable business name. - """ - start_date: NotRequired[str] - """ - Start date of the mandate, in `YYYY-MM-DD`. Start date should be at least 3 days in the future. Defaults to 3 days after the current date. - """ - - class UpdateParamsPaymentMethodOptionsSepaDebit(TypedDict): - mandate_options: NotRequired[ - "SetupIntentService.UpdateParamsPaymentMethodOptionsSepaDebitMandateOptions" - ] - """ - Additional fields for Mandate creation - """ - - class UpdateParamsPaymentMethodOptionsSepaDebitMandateOptions(TypedDict): - reference_prefix: NotRequired["Literal['']|str"] - """ - Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'. - """ - - class UpdateParamsPaymentMethodOptionsUsBankAccount(TypedDict): - financial_connections: NotRequired[ - "SetupIntentService.UpdateParamsPaymentMethodOptionsUsBankAccountFinancialConnections" - ] - """ - Additional fields for Financial Connections Session creation - """ - mandate_options: NotRequired[ - "SetupIntentService.UpdateParamsPaymentMethodOptionsUsBankAccountMandateOptions" - ] - """ - Additional fields for Mandate creation - """ - networks: NotRequired[ - "SetupIntentService.UpdateParamsPaymentMethodOptionsUsBankAccountNetworks" - ] - """ - Additional fields for network related functions - """ - verification_method: NotRequired[ - Literal["automatic", "instant", "microdeposits"] - ] - """ - Bank account verification method. - """ - - class UpdateParamsPaymentMethodOptionsUsBankAccountFinancialConnections( - TypedDict, - ): - filters: NotRequired[ - "SetupIntentService.UpdateParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters" - ] - """ - Provide filters for the linked accounts that the customer can select for the payment method. - """ - manual_entry: NotRequired[ - "SetupIntentService.UpdateParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsManualEntry" - ] - """ - Customize manual entry behavior - """ - permissions: NotRequired[ - List[ - Literal[ - "balances", "ownership", "payment_method", "transactions" - ] - ] - ] - """ - The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. - """ - prefetch: NotRequired[ - List[ - Literal[ - "balances", - "inferred_balances", - "ownership", - "transactions", - ] - ] - ] - """ - List of data features that you would like to retrieve upon account creation. - """ - return_url: NotRequired[str] - """ - For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. - """ - - class UpdateParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters( - TypedDict, - ): - account_subcategories: NotRequired[ - List[Literal["checking", "savings"]] - ] - """ - The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`. - """ - institution: NotRequired[str] - """ - ID of the institution to use to filter for selectable accounts. - """ - - class UpdateParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsManualEntry( - TypedDict, - ): - mode: Literal["automatic", "custom"] - """ - Settings for configuring manual entry of account details. - """ - - class UpdateParamsPaymentMethodOptionsUsBankAccountMandateOptions( - TypedDict, - ): - collection_method: NotRequired["Literal['']|Literal['paper']"] - """ - The method used to collect offline mandate customer acceptance. - """ - - class UpdateParamsPaymentMethodOptionsUsBankAccountNetworks(TypedDict): - requested: NotRequired[List[Literal["ach", "us_domestic_wire"]]] - """ - Triggers validations to run across the selected networks - """ - - class VerifyMicrodepositsParams(TypedDict): - amounts: NotRequired[List[int]] - """ - Two positive integers, in *cents*, equal to the values of the microdeposits sent to the bank account. - """ - descriptor_code: NotRequired[str] - """ - A six-character code starting with SM present in the microdeposit sent to the bank account. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - def list( self, - params: Optional["SetupIntentService.ListParams"] = None, + params: Optional["SetupIntentListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[SetupIntent]: """ @@ -5162,7 +52,7 @@ def list( async def list_async( self, - params: Optional["SetupIntentService.ListParams"] = None, + params: Optional["SetupIntentListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[SetupIntent]: """ @@ -5181,7 +71,7 @@ async def list_async( def create( self, - params: Optional["SetupIntentService.CreateParams"] = None, + params: Optional["SetupIntentCreateParams"] = None, options: Optional[RequestOptions] = None, ) -> SetupIntent: """ @@ -5203,7 +93,7 @@ def create( async def create_async( self, - params: Optional["SetupIntentService.CreateParams"] = None, + params: Optional["SetupIntentCreateParams"] = None, options: Optional[RequestOptions] = None, ) -> SetupIntent: """ @@ -5226,7 +116,7 @@ async def create_async( def retrieve( self, intent: str, - params: Optional["SetupIntentService.RetrieveParams"] = None, + params: Optional["SetupIntentRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> SetupIntent: """ @@ -5252,7 +142,7 @@ def retrieve( async def retrieve_async( self, intent: str, - params: Optional["SetupIntentService.RetrieveParams"] = None, + params: Optional["SetupIntentRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> SetupIntent: """ @@ -5278,7 +168,7 @@ async def retrieve_async( def update( self, intent: str, - params: Optional["SetupIntentService.UpdateParams"] = None, + params: Optional["SetupIntentUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> SetupIntent: """ @@ -5300,7 +190,7 @@ def update( async def update_async( self, intent: str, - params: Optional["SetupIntentService.UpdateParams"] = None, + params: Optional["SetupIntentUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> SetupIntent: """ @@ -5322,7 +212,7 @@ async def update_async( def cancel( self, intent: str, - params: Optional["SetupIntentService.CancelParams"] = None, + params: Optional["SetupIntentCancelParams"] = None, options: Optional[RequestOptions] = None, ) -> SetupIntent: """ @@ -5346,7 +236,7 @@ def cancel( async def cancel_async( self, intent: str, - params: Optional["SetupIntentService.CancelParams"] = None, + params: Optional["SetupIntentCancelParams"] = None, options: Optional[RequestOptions] = None, ) -> SetupIntent: """ @@ -5370,7 +260,7 @@ async def cancel_async( def confirm( self, intent: str, - params: Optional["SetupIntentService.ConfirmParams"] = None, + params: Optional["SetupIntentConfirmParams"] = None, options: Optional[RequestOptions] = None, ) -> SetupIntent: """ @@ -5405,7 +295,7 @@ def confirm( async def confirm_async( self, intent: str, - params: Optional["SetupIntentService.ConfirmParams"] = None, + params: Optional["SetupIntentConfirmParams"] = None, options: Optional[RequestOptions] = None, ) -> SetupIntent: """ @@ -5440,9 +330,7 @@ async def confirm_async( def verify_microdeposits( self, intent: str, - params: Optional[ - "SetupIntentService.VerifyMicrodepositsParams" - ] = None, + params: Optional["SetupIntentVerifyMicrodepositsParams"] = None, options: Optional[RequestOptions] = None, ) -> SetupIntent: """ @@ -5464,9 +352,7 @@ def verify_microdeposits( async def verify_microdeposits_async( self, intent: str, - params: Optional[ - "SetupIntentService.VerifyMicrodepositsParams" - ] = None, + params: Optional["SetupIntentVerifyMicrodepositsParams"] = None, options: Optional[RequestOptions] = None, ) -> SetupIntent: """ diff --git a/stripe/_shipping_rate.py b/stripe/_shipping_rate.py index 4373b7f00..1389c7506 100644 --- a/stripe/_shipping_rate.py +++ b/stripe/_shipping_rate.py @@ -4,21 +4,24 @@ from stripe._expandable_field import ExpandableField from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource -from stripe._request_options import RequestOptions from stripe._stripe_object import StripeObject from stripe._updateable_api_resource import UpdateableAPIResource from stripe._util import sanitize_id -from typing import ClassVar, Dict, List, Optional, cast -from typing_extensions import ( - Literal, - NotRequired, - TypedDict, - Unpack, - TYPE_CHECKING, -) +from typing import ClassVar, Dict, Optional, cast +from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: from stripe._tax_code import TaxCode + from stripe.params._shipping_rate_create_params import ( + ShippingRateCreateParams, + ) + from stripe.params._shipping_rate_list_params import ShippingRateListParams + from stripe.params._shipping_rate_modify_params import ( + ShippingRateModifyParams, + ) + from stripe.params._shipping_rate_retrieve_params import ( + ShippingRateRetrieveParams, + ) class ShippingRate( @@ -90,204 +93,6 @@ class CurrencyOptions(StripeObject): _inner_class_types = {"currency_options": CurrencyOptions} _inner_class_dicts = ["currency_options"] - class CreateParams(RequestOptions): - delivery_estimate: NotRequired[ - "ShippingRate.CreateParamsDeliveryEstimate" - ] - """ - The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions. - """ - display_name: str - """ - The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - fixed_amount: NotRequired["ShippingRate.CreateParamsFixedAmount"] - """ - Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - tax_behavior: NotRequired[ - Literal["exclusive", "inclusive", "unspecified"] - ] - """ - Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. - """ - tax_code: NotRequired[str] - """ - A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`. - """ - type: NotRequired[Literal["fixed_amount"]] - """ - The type of calculation to use on the shipping rate. - """ - - class CreateParamsDeliveryEstimate(TypedDict): - maximum: NotRequired[ - "ShippingRate.CreateParamsDeliveryEstimateMaximum" - ] - """ - The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite. - """ - minimum: NotRequired[ - "ShippingRate.CreateParamsDeliveryEstimateMinimum" - ] - """ - The lower bound of the estimated range. If empty, represents no lower bound. - """ - - class CreateParamsDeliveryEstimateMaximum(TypedDict): - unit: Literal["business_day", "day", "hour", "month", "week"] - """ - A unit of time. - """ - value: int - """ - Must be greater than 0. - """ - - class CreateParamsDeliveryEstimateMinimum(TypedDict): - unit: Literal["business_day", "day", "hour", "month", "week"] - """ - A unit of time. - """ - value: int - """ - Must be greater than 0. - """ - - class CreateParamsFixedAmount(TypedDict): - amount: int - """ - A non-negative integer in cents representing how much to charge. - """ - 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). - """ - currency_options: NotRequired[ - Dict[str, "ShippingRate.CreateParamsFixedAmountCurrencyOptions"] - ] - """ - Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). - """ - - class CreateParamsFixedAmountCurrencyOptions(TypedDict): - amount: int - """ - A non-negative integer in cents representing how much to charge. - """ - tax_behavior: NotRequired[ - Literal["exclusive", "inclusive", "unspecified"] - ] - """ - Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. - """ - - class ListParams(RequestOptions): - active: NotRequired[bool] - """ - Only return shipping rates that are active or inactive. - """ - created: NotRequired["ShippingRate.ListParamsCreated|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. - """ - currency: NotRequired[str] - """ - Only return shipping rates for the given currency. - """ - 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 ListParamsCreated(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) - """ - - class ModifyParams(RequestOptions): - active: NotRequired[bool] - """ - Whether the shipping rate can be used for new purchases. Defaults to `true`. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - fixed_amount: NotRequired["ShippingRate.ModifyParamsFixedAmount"] - """ - Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - tax_behavior: NotRequired[ - Literal["exclusive", "inclusive", "unspecified"] - ] - """ - Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. - """ - - class ModifyParamsFixedAmount(TypedDict): - currency_options: NotRequired[ - Dict[str, "ShippingRate.ModifyParamsFixedAmountCurrencyOptions"] - ] - """ - Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). - """ - - class ModifyParamsFixedAmountCurrencyOptions(TypedDict): - amount: NotRequired[int] - """ - A non-negative integer in cents representing how much to charge. - """ - tax_behavior: NotRequired[ - Literal["exclusive", "inclusive", "unspecified"] - ] - """ - Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. - """ - - class RetrieveParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - active: bool """ Whether the shipping rate can be used for new purchases. Defaults to `true`. @@ -336,7 +141,7 @@ class RetrieveParams(RequestOptions): @classmethod def create( - cls, **params: Unpack["ShippingRate.CreateParams"] + cls, **params: Unpack["ShippingRateCreateParams"] ) -> "ShippingRate": """ Creates a new shipping rate object. @@ -352,7 +157,7 @@ def create( @classmethod async def create_async( - cls, **params: Unpack["ShippingRate.CreateParams"] + cls, **params: Unpack["ShippingRateCreateParams"] ) -> "ShippingRate": """ Creates a new shipping rate object. @@ -368,7 +173,7 @@ async def create_async( @classmethod def list( - cls, **params: Unpack["ShippingRate.ListParams"] + cls, **params: Unpack["ShippingRateListParams"] ) -> ListObject["ShippingRate"]: """ Returns a list of your shipping rates. @@ -388,7 +193,7 @@ def list( @classmethod async def list_async( - cls, **params: Unpack["ShippingRate.ListParams"] + cls, **params: Unpack["ShippingRateListParams"] ) -> ListObject["ShippingRate"]: """ Returns a list of your shipping rates. @@ -408,7 +213,7 @@ async def list_async( @classmethod def modify( - cls, id: str, **params: Unpack["ShippingRate.ModifyParams"] + cls, id: str, **params: Unpack["ShippingRateModifyParams"] ) -> "ShippingRate": """ Updates an existing shipping rate object. @@ -425,7 +230,7 @@ def modify( @classmethod async def modify_async( - cls, id: str, **params: Unpack["ShippingRate.ModifyParams"] + cls, id: str, **params: Unpack["ShippingRateModifyParams"] ) -> "ShippingRate": """ Updates an existing shipping rate object. @@ -442,7 +247,7 @@ async def modify_async( @classmethod def retrieve( - cls, id: str, **params: Unpack["ShippingRate.RetrieveParams"] + cls, id: str, **params: Unpack["ShippingRateRetrieveParams"] ) -> "ShippingRate": """ Returns the shipping rate object with the given ID. @@ -453,7 +258,7 @@ def retrieve( @classmethod async def retrieve_async( - cls, id: str, **params: Unpack["ShippingRate.RetrieveParams"] + cls, id: str, **params: Unpack["ShippingRateRetrieveParams"] ) -> "ShippingRate": """ Returns the shipping rate object with the given ID. diff --git a/stripe/_shipping_rate_service.py b/stripe/_shipping_rate_service.py index 5fc70569e..2cd493c1b 100644 --- a/stripe/_shipping_rate_service.py +++ b/stripe/_shipping_rate_service.py @@ -5,222 +5,26 @@ from stripe._shipping_rate import ShippingRate from stripe._stripe_service import StripeService from stripe._util import sanitize_id -from typing import Dict, List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params._shipping_rate_create_params import ( + ShippingRateCreateParams, + ) + from stripe.params._shipping_rate_list_params import ShippingRateListParams + from stripe.params._shipping_rate_retrieve_params import ( + ShippingRateRetrieveParams, + ) + from stripe.params._shipping_rate_update_params import ( + ShippingRateUpdateParams, + ) class ShippingRateService(StripeService): - class CreateParams(TypedDict): - delivery_estimate: NotRequired[ - "ShippingRateService.CreateParamsDeliveryEstimate" - ] - """ - The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions. - """ - display_name: str - """ - The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - fixed_amount: NotRequired[ - "ShippingRateService.CreateParamsFixedAmount" - ] - """ - Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - tax_behavior: NotRequired[ - Literal["exclusive", "inclusive", "unspecified"] - ] - """ - Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. - """ - tax_code: NotRequired[str] - """ - A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`. - """ - type: NotRequired[Literal["fixed_amount"]] - """ - The type of calculation to use on the shipping rate. - """ - - class CreateParamsDeliveryEstimate(TypedDict): - maximum: NotRequired[ - "ShippingRateService.CreateParamsDeliveryEstimateMaximum" - ] - """ - The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite. - """ - minimum: NotRequired[ - "ShippingRateService.CreateParamsDeliveryEstimateMinimum" - ] - """ - The lower bound of the estimated range. If empty, represents no lower bound. - """ - - class CreateParamsDeliveryEstimateMaximum(TypedDict): - unit: Literal["business_day", "day", "hour", "month", "week"] - """ - A unit of time. - """ - value: int - """ - Must be greater than 0. - """ - - class CreateParamsDeliveryEstimateMinimum(TypedDict): - unit: Literal["business_day", "day", "hour", "month", "week"] - """ - A unit of time. - """ - value: int - """ - Must be greater than 0. - """ - - class CreateParamsFixedAmount(TypedDict): - amount: int - """ - A non-negative integer in cents representing how much to charge. - """ - 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). - """ - currency_options: NotRequired[ - Dict[ - str, - "ShippingRateService.CreateParamsFixedAmountCurrencyOptions", - ] - ] - """ - Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). - """ - - class CreateParamsFixedAmountCurrencyOptions(TypedDict): - amount: int - """ - A non-negative integer in cents representing how much to charge. - """ - tax_behavior: NotRequired[ - Literal["exclusive", "inclusive", "unspecified"] - ] - """ - Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. - """ - - class ListParams(TypedDict): - active: NotRequired[bool] - """ - Only return shipping rates that are active or inactive. - """ - created: NotRequired["ShippingRateService.ListParamsCreated|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. - """ - currency: NotRequired[str] - """ - Only return shipping rates for the given currency. - """ - 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 ListParamsCreated(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) - """ - - class RetrieveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class UpdateParams(TypedDict): - active: NotRequired[bool] - """ - Whether the shipping rate can be used for new purchases. Defaults to `true`. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - fixed_amount: NotRequired[ - "ShippingRateService.UpdateParamsFixedAmount" - ] - """ - Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - tax_behavior: NotRequired[ - Literal["exclusive", "inclusive", "unspecified"] - ] - """ - Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. - """ - - class UpdateParamsFixedAmount(TypedDict): - currency_options: NotRequired[ - Dict[ - str, - "ShippingRateService.UpdateParamsFixedAmountCurrencyOptions", - ] - ] - """ - Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). - """ - - class UpdateParamsFixedAmountCurrencyOptions(TypedDict): - amount: NotRequired[int] - """ - A non-negative integer in cents representing how much to charge. - """ - tax_behavior: NotRequired[ - Literal["exclusive", "inclusive", "unspecified"] - ] - """ - Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. - """ - def list( self, - params: Optional["ShippingRateService.ListParams"] = None, + params: Optional["ShippingRateListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[ShippingRate]: """ @@ -239,7 +43,7 @@ def list( async def list_async( self, - params: Optional["ShippingRateService.ListParams"] = None, + params: Optional["ShippingRateListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[ShippingRate]: """ @@ -258,7 +62,7 @@ async def list_async( def create( self, - params: "ShippingRateService.CreateParams", + params: "ShippingRateCreateParams", options: Optional[RequestOptions] = None, ) -> ShippingRate: """ @@ -277,7 +81,7 @@ def create( async def create_async( self, - params: "ShippingRateService.CreateParams", + params: "ShippingRateCreateParams", options: Optional[RequestOptions] = None, ) -> ShippingRate: """ @@ -297,7 +101,7 @@ async def create_async( def retrieve( self, shipping_rate_token: str, - params: Optional["ShippingRateService.RetrieveParams"] = None, + params: Optional["ShippingRateRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> ShippingRate: """ @@ -319,7 +123,7 @@ def retrieve( async def retrieve_async( self, shipping_rate_token: str, - params: Optional["ShippingRateService.RetrieveParams"] = None, + params: Optional["ShippingRateRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> ShippingRate: """ @@ -341,7 +145,7 @@ async def retrieve_async( def update( self, shipping_rate_token: str, - params: Optional["ShippingRateService.UpdateParams"] = None, + params: Optional["ShippingRateUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> ShippingRate: """ @@ -363,7 +167,7 @@ def update( async def update_async( self, shipping_rate_token: str, - params: Optional["ShippingRateService.UpdateParams"] = None, + params: Optional["ShippingRateUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> ShippingRate: """ diff --git a/stripe/_source.py b/stripe/_source.py index 1b3492085..a7fb2315b 100644 --- a/stripe/_source.py +++ b/stripe/_source.py @@ -4,21 +4,21 @@ from stripe._customer import Customer from stripe._error import InvalidRequestError from stripe._list_object import ListObject -from stripe._request_options import RequestOptions from stripe._stripe_object import StripeObject from stripe._updateable_api_resource import UpdateableAPIResource from stripe._util import class_method_variant, sanitize_id from typing import ClassVar, Dict, List, Optional, cast, overload -from typing_extensions import ( - Literal, - NotRequired, - TypedDict, - Unpack, - TYPE_CHECKING, -) +from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: from stripe._source_transaction import SourceTransaction + from stripe.params._source_create_params import SourceCreateParams + from stripe.params._source_list_source_transactions_params import ( + SourceListSourceTransactionsParams, + ) + from stripe.params._source_modify_params import SourceModifyParams + from stripe.params._source_retrieve_params import SourceRetrieveParams + from stripe.params._source_verify_params import SourceVerifyParams class Source(CreateableAPIResource["Source"], UpdateableAPIResource["Source"]): @@ -499,530 +499,6 @@ class Wechat(StripeObject): qr_code_url: Optional[str] statement_descriptor: Optional[str] - class CreateParams(RequestOptions): - amount: NotRequired[int] - """ - Amount associated with the source. This is the amount for which the source will be chargeable once ready. Required for `single_use` sources. Not supported for `receiver` type sources, where charge amount may not be specified until funds land. - """ - currency: NotRequired[str] - """ - Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) associated with the source. This is the currency for which the source will be chargeable once ready. - """ - customer: NotRequired[str] - """ - The `Customer` to whom the original source is attached to. Must be set when the original source is not a `Source` (e.g., `Card`). - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - flow: NotRequired[ - Literal["code_verification", "none", "receiver", "redirect"] - ] - """ - The authentication `flow` of the source to create. `flow` is one of `redirect`, `receiver`, `code_verification`, `none`. It is generally inferred unless a type supports multiple flows. - """ - mandate: NotRequired["Source.CreateParamsMandate"] - """ - Information about a mandate possibility attached to a source object (generally for bank debits) as well as its acceptance status. - """ - metadata: NotRequired[Dict[str, str]] - original_source: NotRequired[str] - """ - The source to share. - """ - owner: NotRequired["Source.CreateParamsOwner"] - """ - Information about the owner of the payment instrument that may be used or required by particular source types. - """ - receiver: NotRequired["Source.CreateParamsReceiver"] - """ - Optional parameters for the receiver flow. Can be set only if the source is a receiver (`flow` is `receiver`). - """ - redirect: NotRequired["Source.CreateParamsRedirect"] - """ - Parameters required for the redirect flow. Required if the source is authenticated by a redirect (`flow` is `redirect`). - """ - source_order: NotRequired["Source.CreateParamsSourceOrder"] - """ - Information about the items and shipping associated with the source. Required for transactional credit (for example Klarna) sources before you can charge it. - """ - statement_descriptor: NotRequired[str] - """ - An arbitrary string to be displayed on your customer's statement. As an example, if your website is `RunClub` and the item you're charging for is a race ticket, you may want to specify a `statement_descriptor` of `RunClub 5K race ticket.` While many payment types will display this information, some may not display it at all. - """ - token: NotRequired[str] - """ - An optional token used to create the source. When passed, token properties will override source parameters. - """ - type: NotRequired[str] - """ - The `type` of the source to create. Required unless `customer` and `original_source` are specified (see the [Cloning card Sources](https://stripe.com/docs/sources/connect#cloning-card-sources) guide) - """ - usage: NotRequired[Literal["reusable", "single_use"]] - - class CreateParamsMandate(TypedDict): - acceptance: NotRequired["Source.CreateParamsMandateAcceptance"] - """ - The parameters required to notify Stripe of a mandate acceptance or refusal by the customer. - """ - amount: NotRequired["Literal['']|int"] - """ - The amount specified by the mandate. (Leave null for a mandate covering all amounts) - """ - currency: NotRequired[str] - """ - The currency specified by the mandate. (Must match `currency` of the source) - """ - interval: NotRequired[Literal["one_time", "scheduled", "variable"]] - """ - The interval of debits permitted by the mandate. Either `one_time` (just permitting a single debit), `scheduled` (with debits on an agreed schedule or for clearly-defined events), or `variable`(for debits with any frequency) - """ - notification_method: NotRequired[ - Literal[ - "deprecated_none", "email", "manual", "none", "stripe_email" - ] - ] - """ - The method Stripe should use to notify the customer of upcoming debit instructions and/or mandate confirmation as required by the underlying debit network. Either `email` (an email is sent directly to the customer), `manual` (a `source.mandate_notification` event is sent to your webhooks endpoint and you should handle the notification) or `none` (the underlying debit network does not require any notification). - """ - - class CreateParamsMandateAcceptance(TypedDict): - date: NotRequired[int] - """ - The Unix timestamp (in seconds) when the mandate was accepted or refused by the customer. - """ - ip: NotRequired[str] - """ - The IP address from which the mandate was accepted or refused by the customer. - """ - offline: NotRequired["Source.CreateParamsMandateAcceptanceOffline"] - """ - The parameters required to store a mandate accepted offline. Should only be set if `mandate[type]` is `offline` - """ - online: NotRequired["Source.CreateParamsMandateAcceptanceOnline"] - """ - The parameters required to store a mandate accepted online. Should only be set if `mandate[type]` is `online` - """ - status: Literal["accepted", "pending", "refused", "revoked"] - """ - The status of the mandate acceptance. Either `accepted` (the mandate was accepted) or `refused` (the mandate was refused). - """ - type: NotRequired[Literal["offline", "online"]] - """ - The type of acceptance information included with the mandate. Either `online` or `offline` - """ - user_agent: NotRequired[str] - """ - The user agent of the browser from which the mandate was accepted or refused by the customer. - """ - - class CreateParamsMandateAcceptanceOffline(TypedDict): - contact_email: str - """ - An email to contact you with if a copy of the mandate is requested, required if `type` is `offline`. - """ - - class CreateParamsMandateAcceptanceOnline(TypedDict): - date: NotRequired[int] - """ - The Unix timestamp (in seconds) when the mandate was accepted or refused by the customer. - """ - ip: NotRequired[str] - """ - The IP address from which the mandate was accepted or refused by the customer. - """ - user_agent: NotRequired[str] - """ - The user agent of the browser from which the mandate was accepted or refused by the customer. - """ - - class CreateParamsOwner(TypedDict): - address: NotRequired["Source.CreateParamsOwnerAddress"] - """ - Owner's address. - """ - email: NotRequired[str] - """ - Owner's email address. - """ - name: NotRequired[str] - """ - Owner's full name. - """ - phone: NotRequired[str] - """ - Owner's phone number. - """ - - class CreateParamsOwnerAddress(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. - """ - - class CreateParamsReceiver(TypedDict): - refund_attributes_method: NotRequired[ - Literal["email", "manual", "none"] - ] - """ - The method Stripe should use to request information needed to process a refund or mispayment. Either `email` (an email is sent directly to the customer) or `manual` (a `source.refund_attributes_required` event is sent to your webhooks endpoint). Refer to each payment method's documentation to learn which refund attributes may be required. - """ - - class CreateParamsRedirect(TypedDict): - return_url: str - """ - The URL you provide to redirect the customer back to you after they authenticated their payment. It can use your application URI scheme in the context of a mobile application. - """ - - class CreateParamsSourceOrder(TypedDict): - items: NotRequired[List["Source.CreateParamsSourceOrderItem"]] - """ - List of items constituting the order. - """ - shipping: NotRequired["Source.CreateParamsSourceOrderShipping"] - """ - Shipping address for the order. Required if any of the SKUs are for products that have `shippable` set to true. - """ - - class CreateParamsSourceOrderItem(TypedDict): - amount: NotRequired[int] - currency: NotRequired[str] - description: NotRequired[str] - parent: NotRequired[str] - """ - The ID of the SKU being ordered. - """ - quantity: NotRequired[int] - """ - The quantity of this order item. When type is `sku`, this is the number of instances of the SKU to be ordered. - """ - type: NotRequired[Literal["discount", "shipping", "sku", "tax"]] - - class CreateParamsSourceOrderShipping(TypedDict): - address: "Source.CreateParamsSourceOrderShippingAddress" - """ - Shipping address. - """ - carrier: NotRequired[str] - """ - The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. - """ - name: NotRequired[str] - """ - Recipient name. - """ - phone: NotRequired[str] - """ - Recipient phone (including extension). - """ - tracking_number: NotRequired[str] - """ - The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. - """ - - class CreateParamsSourceOrderShippingAddress(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: 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. - """ - - class ListSourceTransactionsParams(RequestOptions): - 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 ModifyParams(RequestOptions): - amount: NotRequired[int] - """ - Amount associated with the source. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - mandate: NotRequired["Source.ModifyParamsMandate"] - """ - Information about a mandate possibility attached to a source object (generally for bank debits) as well as its acceptance status. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - owner: NotRequired["Source.ModifyParamsOwner"] - """ - Information about the owner of the payment instrument that may be used or required by particular source types. - """ - source_order: NotRequired["Source.ModifyParamsSourceOrder"] - """ - Information about the items and shipping associated with the source. Required for transactional credit (for example Klarna) sources before you can charge it. - """ - - class ModifyParamsMandate(TypedDict): - acceptance: NotRequired["Source.ModifyParamsMandateAcceptance"] - """ - The parameters required to notify Stripe of a mandate acceptance or refusal by the customer. - """ - amount: NotRequired["Literal['']|int"] - """ - The amount specified by the mandate. (Leave null for a mandate covering all amounts) - """ - currency: NotRequired[str] - """ - The currency specified by the mandate. (Must match `currency` of the source) - """ - interval: NotRequired[Literal["one_time", "scheduled", "variable"]] - """ - The interval of debits permitted by the mandate. Either `one_time` (just permitting a single debit), `scheduled` (with debits on an agreed schedule or for clearly-defined events), or `variable`(for debits with any frequency) - """ - notification_method: NotRequired[ - Literal[ - "deprecated_none", "email", "manual", "none", "stripe_email" - ] - ] - """ - The method Stripe should use to notify the customer of upcoming debit instructions and/or mandate confirmation as required by the underlying debit network. Either `email` (an email is sent directly to the customer), `manual` (a `source.mandate_notification` event is sent to your webhooks endpoint and you should handle the notification) or `none` (the underlying debit network does not require any notification). - """ - - class ModifyParamsMandateAcceptance(TypedDict): - date: NotRequired[int] - """ - The Unix timestamp (in seconds) when the mandate was accepted or refused by the customer. - """ - ip: NotRequired[str] - """ - The IP address from which the mandate was accepted or refused by the customer. - """ - offline: NotRequired["Source.ModifyParamsMandateAcceptanceOffline"] - """ - The parameters required to store a mandate accepted offline. Should only be set if `mandate[type]` is `offline` - """ - online: NotRequired["Source.ModifyParamsMandateAcceptanceOnline"] - """ - The parameters required to store a mandate accepted online. Should only be set if `mandate[type]` is `online` - """ - status: Literal["accepted", "pending", "refused", "revoked"] - """ - The status of the mandate acceptance. Either `accepted` (the mandate was accepted) or `refused` (the mandate was refused). - """ - type: NotRequired[Literal["offline", "online"]] - """ - The type of acceptance information included with the mandate. Either `online` or `offline` - """ - user_agent: NotRequired[str] - """ - The user agent of the browser from which the mandate was accepted or refused by the customer. - """ - - class ModifyParamsMandateAcceptanceOffline(TypedDict): - contact_email: str - """ - An email to contact you with if a copy of the mandate is requested, required if `type` is `offline`. - """ - - class ModifyParamsMandateAcceptanceOnline(TypedDict): - date: NotRequired[int] - """ - The Unix timestamp (in seconds) when the mandate was accepted or refused by the customer. - """ - ip: NotRequired[str] - """ - The IP address from which the mandate was accepted or refused by the customer. - """ - user_agent: NotRequired[str] - """ - The user agent of the browser from which the mandate was accepted or refused by the customer. - """ - - class ModifyParamsOwner(TypedDict): - address: NotRequired["Source.ModifyParamsOwnerAddress"] - """ - Owner's address. - """ - email: NotRequired[str] - """ - Owner's email address. - """ - name: NotRequired[str] - """ - Owner's full name. - """ - phone: NotRequired[str] - """ - Owner's phone number. - """ - - class ModifyParamsOwnerAddress(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. - """ - - class ModifyParamsSourceOrder(TypedDict): - items: NotRequired[List["Source.ModifyParamsSourceOrderItem"]] - """ - List of items constituting the order. - """ - shipping: NotRequired["Source.ModifyParamsSourceOrderShipping"] - """ - Shipping address for the order. Required if any of the SKUs are for products that have `shippable` set to true. - """ - - class ModifyParamsSourceOrderItem(TypedDict): - amount: NotRequired[int] - currency: NotRequired[str] - description: NotRequired[str] - parent: NotRequired[str] - """ - The ID of the SKU being ordered. - """ - quantity: NotRequired[int] - """ - The quantity of this order item. When type is `sku`, this is the number of instances of the SKU to be ordered. - """ - type: NotRequired[Literal["discount", "shipping", "sku", "tax"]] - - class ModifyParamsSourceOrderShipping(TypedDict): - address: "Source.ModifyParamsSourceOrderShippingAddress" - """ - Shipping address. - """ - carrier: NotRequired[str] - """ - The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. - """ - name: NotRequired[str] - """ - Recipient name. - """ - phone: NotRequired[str] - """ - Recipient phone (including extension). - """ - tracking_number: NotRequired[str] - """ - The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. - """ - - class ModifyParamsSourceOrderShippingAddress(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: 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. - """ - - class RetrieveParams(RequestOptions): - client_secret: NotRequired[str] - """ - The client secret of the source. Required if a publishable key is used to retrieve the source. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class VerifyParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - values: List[str] - """ - The values needed to verify the source. - """ - ach_credit_transfer: Optional[AchCreditTransfer] ach_debit: Optional[AchDebit] acss_debit: Optional[AcssDebit] @@ -1134,7 +610,7 @@ class VerifyParams(RequestOptions): wechat: Optional[Wechat] @classmethod - def create(cls, **params: Unpack["Source.CreateParams"]) -> "Source": + def create(cls, **params: Unpack["SourceCreateParams"]) -> "Source": """ Creates a new source object. """ @@ -1149,7 +625,7 @@ def create(cls, **params: Unpack["Source.CreateParams"]) -> "Source": @classmethod async def create_async( - cls, **params: Unpack["Source.CreateParams"] + cls, **params: Unpack["SourceCreateParams"] ) -> "Source": """ Creates a new source object. @@ -1167,7 +643,7 @@ async def create_async( def _cls_list_source_transactions( cls, source: str, - **params: Unpack["Source.ListSourceTransactionsParams"], + **params: Unpack["SourceListSourceTransactionsParams"], ) -> ListObject["SourceTransaction"]: """ List source transactions for a given source. @@ -1186,7 +662,7 @@ def _cls_list_source_transactions( @overload @staticmethod def list_source_transactions( - source: str, **params: Unpack["Source.ListSourceTransactionsParams"] + source: str, **params: Unpack["SourceListSourceTransactionsParams"] ) -> ListObject["SourceTransaction"]: """ List source transactions for a given source. @@ -1195,7 +671,7 @@ def list_source_transactions( @overload def list_source_transactions( - self, **params: Unpack["Source.ListSourceTransactionsParams"] + self, **params: Unpack["SourceListSourceTransactionsParams"] ) -> ListObject["SourceTransaction"]: """ List source transactions for a given source. @@ -1204,7 +680,7 @@ def list_source_transactions( @class_method_variant("_cls_list_source_transactions") def list_source_transactions( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Source.ListSourceTransactionsParams"] + self, **params: Unpack["SourceListSourceTransactionsParams"] ) -> ListObject["SourceTransaction"]: """ List source transactions for a given source. @@ -1224,7 +700,7 @@ def list_source_transactions( # pyright: ignore[reportGeneralTypeIssues] async def _cls_list_source_transactions_async( cls, source: str, - **params: Unpack["Source.ListSourceTransactionsParams"], + **params: Unpack["SourceListSourceTransactionsParams"], ) -> ListObject["SourceTransaction"]: """ List source transactions for a given source. @@ -1243,7 +719,7 @@ async def _cls_list_source_transactions_async( @overload @staticmethod async def list_source_transactions_async( - source: str, **params: Unpack["Source.ListSourceTransactionsParams"] + source: str, **params: Unpack["SourceListSourceTransactionsParams"] ) -> ListObject["SourceTransaction"]: """ List source transactions for a given source. @@ -1252,7 +728,7 @@ async def list_source_transactions_async( @overload async def list_source_transactions_async( - self, **params: Unpack["Source.ListSourceTransactionsParams"] + self, **params: Unpack["SourceListSourceTransactionsParams"] ) -> ListObject["SourceTransaction"]: """ List source transactions for a given source. @@ -1261,7 +737,7 @@ async def list_source_transactions_async( @class_method_variant("_cls_list_source_transactions_async") async def list_source_transactions_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Source.ListSourceTransactionsParams"] + self, **params: Unpack["SourceListSourceTransactionsParams"] ) -> ListObject["SourceTransaction"]: """ List source transactions for a given source. @@ -1279,7 +755,7 @@ async def list_source_transactions_async( # pyright: ignore[reportGeneralTypeIs @classmethod def modify( - cls, id: str, **params: Unpack["Source.ModifyParams"] + cls, id: str, **params: Unpack["SourceModifyParams"] ) -> "Source": """ Updates the specified source by setting the values of the parameters passed. Any parameters not provided will be left unchanged. @@ -1298,7 +774,7 @@ def modify( @classmethod async def modify_async( - cls, id: str, **params: Unpack["Source.ModifyParams"] + cls, id: str, **params: Unpack["SourceModifyParams"] ) -> "Source": """ Updates the specified source by setting the values of the parameters passed. Any parameters not provided will be left unchanged. @@ -1317,7 +793,7 @@ async def modify_async( @classmethod def retrieve( - cls, id: str, **params: Unpack["Source.RetrieveParams"] + cls, id: str, **params: Unpack["SourceRetrieveParams"] ) -> "Source": """ Retrieves an existing source object. Supply the unique source ID from a source creation request and Stripe will return the corresponding up-to-date source object information. @@ -1328,7 +804,7 @@ def retrieve( @classmethod async def retrieve_async( - cls, id: str, **params: Unpack["Source.RetrieveParams"] + cls, id: str, **params: Unpack["SourceRetrieveParams"] ) -> "Source": """ Retrieves an existing source object. Supply the unique source ID from a source creation request and Stripe will return the corresponding up-to-date source object information. @@ -1339,7 +815,7 @@ async def retrieve_async( @classmethod def _cls_verify( - cls, source: str, **params: Unpack["Source.VerifyParams"] + cls, source: str, **params: Unpack["SourceVerifyParams"] ) -> "Source": """ Verify a given source. @@ -1358,7 +834,7 @@ def _cls_verify( @overload @staticmethod def verify( - source: str, **params: Unpack["Source.VerifyParams"] + source: str, **params: Unpack["SourceVerifyParams"] ) -> "Source": """ Verify a given source. @@ -1366,7 +842,7 @@ def verify( ... @overload - def verify(self, **params: Unpack["Source.VerifyParams"]) -> "Source": + def verify(self, **params: Unpack["SourceVerifyParams"]) -> "Source": """ Verify a given source. """ @@ -1374,7 +850,7 @@ def verify(self, **params: Unpack["Source.VerifyParams"]) -> "Source": @class_method_variant("_cls_verify") def verify( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Source.VerifyParams"] + self, **params: Unpack["SourceVerifyParams"] ) -> "Source": """ Verify a given source. @@ -1392,7 +868,7 @@ def verify( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_verify_async( - cls, source: str, **params: Unpack["Source.VerifyParams"] + cls, source: str, **params: Unpack["SourceVerifyParams"] ) -> "Source": """ Verify a given source. @@ -1411,7 +887,7 @@ async def _cls_verify_async( @overload @staticmethod async def verify_async( - source: str, **params: Unpack["Source.VerifyParams"] + source: str, **params: Unpack["SourceVerifyParams"] ) -> "Source": """ Verify a given source. @@ -1420,7 +896,7 @@ async def verify_async( @overload async def verify_async( - self, **params: Unpack["Source.VerifyParams"] + self, **params: Unpack["SourceVerifyParams"] ) -> "Source": """ Verify a given source. @@ -1429,7 +905,7 @@ async def verify_async( @class_method_variant("_cls_verify_async") async def verify_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Source.VerifyParams"] + self, **params: Unpack["SourceVerifyParams"] ) -> "Source": """ Verify a given source. diff --git a/stripe/_source_service.py b/stripe/_source_service.py index 4a0bf0619..313cc6237 100644 --- a/stripe/_source_service.py +++ b/stripe/_source_service.py @@ -8,8 +8,15 @@ from stripe._source_transaction_service import SourceTransactionService from stripe._stripe_service import StripeService from stripe._util import sanitize_id -from typing import Dict, List, Optional, Union, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, Union, cast +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params._source_create_params import SourceCreateParams + from stripe.params._source_detach_params import SourceDetachParams + from stripe.params._source_retrieve_params import SourceRetrieveParams + from stripe.params._source_update_params import SourceUpdateParams + from stripe.params._source_verify_params import SourceVerifyParams class SourceService(StripeService): @@ -17,531 +24,11 @@ def __init__(self, requestor): super().__init__(requestor) self.transactions = SourceTransactionService(self._requestor) - class CreateParams(TypedDict): - amount: NotRequired[int] - """ - Amount associated with the source. This is the amount for which the source will be chargeable once ready. Required for `single_use` sources. Not supported for `receiver` type sources, where charge amount may not be specified until funds land. - """ - currency: NotRequired[str] - """ - Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) associated with the source. This is the currency for which the source will be chargeable once ready. - """ - customer: NotRequired[str] - """ - The `Customer` to whom the original source is attached to. Must be set when the original source is not a `Source` (e.g., `Card`). - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - flow: NotRequired[ - Literal["code_verification", "none", "receiver", "redirect"] - ] - """ - The authentication `flow` of the source to create. `flow` is one of `redirect`, `receiver`, `code_verification`, `none`. It is generally inferred unless a type supports multiple flows. - """ - mandate: NotRequired["SourceService.CreateParamsMandate"] - """ - Information about a mandate possibility attached to a source object (generally for bank debits) as well as its acceptance status. - """ - metadata: NotRequired[Dict[str, str]] - original_source: NotRequired[str] - """ - The source to share. - """ - owner: NotRequired["SourceService.CreateParamsOwner"] - """ - Information about the owner of the payment instrument that may be used or required by particular source types. - """ - receiver: NotRequired["SourceService.CreateParamsReceiver"] - """ - Optional parameters for the receiver flow. Can be set only if the source is a receiver (`flow` is `receiver`). - """ - redirect: NotRequired["SourceService.CreateParamsRedirect"] - """ - Parameters required for the redirect flow. Required if the source is authenticated by a redirect (`flow` is `redirect`). - """ - source_order: NotRequired["SourceService.CreateParamsSourceOrder"] - """ - Information about the items and shipping associated with the source. Required for transactional credit (for example Klarna) sources before you can charge it. - """ - statement_descriptor: NotRequired[str] - """ - An arbitrary string to be displayed on your customer's statement. As an example, if your website is `RunClub` and the item you're charging for is a race ticket, you may want to specify a `statement_descriptor` of `RunClub 5K race ticket.` While many payment types will display this information, some may not display it at all. - """ - token: NotRequired[str] - """ - An optional token used to create the source. When passed, token properties will override source parameters. - """ - type: NotRequired[str] - """ - The `type` of the source to create. Required unless `customer` and `original_source` are specified (see the [Cloning card Sources](https://stripe.com/docs/sources/connect#cloning-card-sources) guide) - """ - usage: NotRequired[Literal["reusable", "single_use"]] - - class CreateParamsMandate(TypedDict): - acceptance: NotRequired["SourceService.CreateParamsMandateAcceptance"] - """ - The parameters required to notify Stripe of a mandate acceptance or refusal by the customer. - """ - amount: NotRequired["Literal['']|int"] - """ - The amount specified by the mandate. (Leave null for a mandate covering all amounts) - """ - currency: NotRequired[str] - """ - The currency specified by the mandate. (Must match `currency` of the source) - """ - interval: NotRequired[Literal["one_time", "scheduled", "variable"]] - """ - The interval of debits permitted by the mandate. Either `one_time` (just permitting a single debit), `scheduled` (with debits on an agreed schedule or for clearly-defined events), or `variable`(for debits with any frequency) - """ - notification_method: NotRequired[ - Literal[ - "deprecated_none", "email", "manual", "none", "stripe_email" - ] - ] - """ - The method Stripe should use to notify the customer of upcoming debit instructions and/or mandate confirmation as required by the underlying debit network. Either `email` (an email is sent directly to the customer), `manual` (a `source.mandate_notification` event is sent to your webhooks endpoint and you should handle the notification) or `none` (the underlying debit network does not require any notification). - """ - - class CreateParamsMandateAcceptance(TypedDict): - date: NotRequired[int] - """ - The Unix timestamp (in seconds) when the mandate was accepted or refused by the customer. - """ - ip: NotRequired[str] - """ - The IP address from which the mandate was accepted or refused by the customer. - """ - offline: NotRequired[ - "SourceService.CreateParamsMandateAcceptanceOffline" - ] - """ - The parameters required to store a mandate accepted offline. Should only be set if `mandate[type]` is `offline` - """ - online: NotRequired[ - "SourceService.CreateParamsMandateAcceptanceOnline" - ] - """ - The parameters required to store a mandate accepted online. Should only be set if `mandate[type]` is `online` - """ - status: Literal["accepted", "pending", "refused", "revoked"] - """ - The status of the mandate acceptance. Either `accepted` (the mandate was accepted) or `refused` (the mandate was refused). - """ - type: NotRequired[Literal["offline", "online"]] - """ - The type of acceptance information included with the mandate. Either `online` or `offline` - """ - user_agent: NotRequired[str] - """ - The user agent of the browser from which the mandate was accepted or refused by the customer. - """ - - class CreateParamsMandateAcceptanceOffline(TypedDict): - contact_email: str - """ - An email to contact you with if a copy of the mandate is requested, required if `type` is `offline`. - """ - - class CreateParamsMandateAcceptanceOnline(TypedDict): - date: NotRequired[int] - """ - The Unix timestamp (in seconds) when the mandate was accepted or refused by the customer. - """ - ip: NotRequired[str] - """ - The IP address from which the mandate was accepted or refused by the customer. - """ - user_agent: NotRequired[str] - """ - The user agent of the browser from which the mandate was accepted or refused by the customer. - """ - - class CreateParamsOwner(TypedDict): - address: NotRequired["SourceService.CreateParamsOwnerAddress"] - """ - Owner's address. - """ - email: NotRequired[str] - """ - Owner's email address. - """ - name: NotRequired[str] - """ - Owner's full name. - """ - phone: NotRequired[str] - """ - Owner's phone number. - """ - - class CreateParamsOwnerAddress(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. - """ - - class CreateParamsReceiver(TypedDict): - refund_attributes_method: NotRequired[ - Literal["email", "manual", "none"] - ] - """ - The method Stripe should use to request information needed to process a refund or mispayment. Either `email` (an email is sent directly to the customer) or `manual` (a `source.refund_attributes_required` event is sent to your webhooks endpoint). Refer to each payment method's documentation to learn which refund attributes may be required. - """ - - class CreateParamsRedirect(TypedDict): - return_url: str - """ - The URL you provide to redirect the customer back to you after they authenticated their payment. It can use your application URI scheme in the context of a mobile application. - """ - - class CreateParamsSourceOrder(TypedDict): - items: NotRequired[List["SourceService.CreateParamsSourceOrderItem"]] - """ - List of items constituting the order. - """ - shipping: NotRequired["SourceService.CreateParamsSourceOrderShipping"] - """ - Shipping address for the order. Required if any of the SKUs are for products that have `shippable` set to true. - """ - - class CreateParamsSourceOrderItem(TypedDict): - amount: NotRequired[int] - currency: NotRequired[str] - description: NotRequired[str] - parent: NotRequired[str] - """ - The ID of the SKU being ordered. - """ - quantity: NotRequired[int] - """ - The quantity of this order item. When type is `sku`, this is the number of instances of the SKU to be ordered. - """ - type: NotRequired[Literal["discount", "shipping", "sku", "tax"]] - - class CreateParamsSourceOrderShipping(TypedDict): - address: "SourceService.CreateParamsSourceOrderShippingAddress" - """ - Shipping address. - """ - carrier: NotRequired[str] - """ - The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. - """ - name: NotRequired[str] - """ - Recipient name. - """ - phone: NotRequired[str] - """ - Recipient phone (including extension). - """ - tracking_number: NotRequired[str] - """ - The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. - """ - - class CreateParamsSourceOrderShippingAddress(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: 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. - """ - - class DetachParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class RetrieveParams(TypedDict): - client_secret: NotRequired[str] - """ - The client secret of the source. Required if a publishable key is used to retrieve the source. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class UpdateParams(TypedDict): - amount: NotRequired[int] - """ - Amount associated with the source. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - mandate: NotRequired["SourceService.UpdateParamsMandate"] - """ - Information about a mandate possibility attached to a source object (generally for bank debits) as well as its acceptance status. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - owner: NotRequired["SourceService.UpdateParamsOwner"] - """ - Information about the owner of the payment instrument that may be used or required by particular source types. - """ - source_order: NotRequired["SourceService.UpdateParamsSourceOrder"] - """ - Information about the items and shipping associated with the source. Required for transactional credit (for example Klarna) sources before you can charge it. - """ - - class UpdateParamsMandate(TypedDict): - acceptance: NotRequired["SourceService.UpdateParamsMandateAcceptance"] - """ - The parameters required to notify Stripe of a mandate acceptance or refusal by the customer. - """ - amount: NotRequired["Literal['']|int"] - """ - The amount specified by the mandate. (Leave null for a mandate covering all amounts) - """ - currency: NotRequired[str] - """ - The currency specified by the mandate. (Must match `currency` of the source) - """ - interval: NotRequired[Literal["one_time", "scheduled", "variable"]] - """ - The interval of debits permitted by the mandate. Either `one_time` (just permitting a single debit), `scheduled` (with debits on an agreed schedule or for clearly-defined events), or `variable`(for debits with any frequency) - """ - notification_method: NotRequired[ - Literal[ - "deprecated_none", "email", "manual", "none", "stripe_email" - ] - ] - """ - The method Stripe should use to notify the customer of upcoming debit instructions and/or mandate confirmation as required by the underlying debit network. Either `email` (an email is sent directly to the customer), `manual` (a `source.mandate_notification` event is sent to your webhooks endpoint and you should handle the notification) or `none` (the underlying debit network does not require any notification). - """ - - class UpdateParamsMandateAcceptance(TypedDict): - date: NotRequired[int] - """ - The Unix timestamp (in seconds) when the mandate was accepted or refused by the customer. - """ - ip: NotRequired[str] - """ - The IP address from which the mandate was accepted or refused by the customer. - """ - offline: NotRequired[ - "SourceService.UpdateParamsMandateAcceptanceOffline" - ] - """ - The parameters required to store a mandate accepted offline. Should only be set if `mandate[type]` is `offline` - """ - online: NotRequired[ - "SourceService.UpdateParamsMandateAcceptanceOnline" - ] - """ - The parameters required to store a mandate accepted online. Should only be set if `mandate[type]` is `online` - """ - status: Literal["accepted", "pending", "refused", "revoked"] - """ - The status of the mandate acceptance. Either `accepted` (the mandate was accepted) or `refused` (the mandate was refused). - """ - type: NotRequired[Literal["offline", "online"]] - """ - The type of acceptance information included with the mandate. Either `online` or `offline` - """ - user_agent: NotRequired[str] - """ - The user agent of the browser from which the mandate was accepted or refused by the customer. - """ - - class UpdateParamsMandateAcceptanceOffline(TypedDict): - contact_email: str - """ - An email to contact you with if a copy of the mandate is requested, required if `type` is `offline`. - """ - - class UpdateParamsMandateAcceptanceOnline(TypedDict): - date: NotRequired[int] - """ - The Unix timestamp (in seconds) when the mandate was accepted or refused by the customer. - """ - ip: NotRequired[str] - """ - The IP address from which the mandate was accepted or refused by the customer. - """ - user_agent: NotRequired[str] - """ - The user agent of the browser from which the mandate was accepted or refused by the customer. - """ - - class UpdateParamsOwner(TypedDict): - address: NotRequired["SourceService.UpdateParamsOwnerAddress"] - """ - Owner's address. - """ - email: NotRequired[str] - """ - Owner's email address. - """ - name: NotRequired[str] - """ - Owner's full name. - """ - phone: NotRequired[str] - """ - Owner's phone number. - """ - - class UpdateParamsOwnerAddress(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. - """ - - class UpdateParamsSourceOrder(TypedDict): - items: NotRequired[List["SourceService.UpdateParamsSourceOrderItem"]] - """ - List of items constituting the order. - """ - shipping: NotRequired["SourceService.UpdateParamsSourceOrderShipping"] - """ - Shipping address for the order. Required if any of the SKUs are for products that have `shippable` set to true. - """ - - class UpdateParamsSourceOrderItem(TypedDict): - amount: NotRequired[int] - currency: NotRequired[str] - description: NotRequired[str] - parent: NotRequired[str] - """ - The ID of the SKU being ordered. - """ - quantity: NotRequired[int] - """ - The quantity of this order item. When type is `sku`, this is the number of instances of the SKU to be ordered. - """ - type: NotRequired[Literal["discount", "shipping", "sku", "tax"]] - - class UpdateParamsSourceOrderShipping(TypedDict): - address: "SourceService.UpdateParamsSourceOrderShippingAddress" - """ - Shipping address. - """ - carrier: NotRequired[str] - """ - The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. - """ - name: NotRequired[str] - """ - Recipient name. - """ - phone: NotRequired[str] - """ - Recipient phone (including extension). - """ - tracking_number: NotRequired[str] - """ - The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. - """ - - class UpdateParamsSourceOrderShippingAddress(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: 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. - """ - - class VerifyParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - values: List[str] - """ - The values needed to verify the source. - """ - def detach( self, customer: str, id: str, - params: Optional["SourceService.DetachParams"] = None, + params: Optional["SourceDetachParams"] = None, options: Optional[RequestOptions] = None, ) -> Union[Account, BankAccount, Card, Source]: """ @@ -565,7 +52,7 @@ async def detach_async( self, customer: str, id: str, - params: Optional["SourceService.DetachParams"] = None, + params: Optional["SourceDetachParams"] = None, options: Optional[RequestOptions] = None, ) -> Union[Account, BankAccount, Card, Source]: """ @@ -588,7 +75,7 @@ async def detach_async( def retrieve( self, source: str, - params: Optional["SourceService.RetrieveParams"] = None, + params: Optional["SourceRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Source: """ @@ -608,7 +95,7 @@ def retrieve( async def retrieve_async( self, source: str, - params: Optional["SourceService.RetrieveParams"] = None, + params: Optional["SourceRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Source: """ @@ -628,7 +115,7 @@ async def retrieve_async( def update( self, source: str, - params: Optional["SourceService.UpdateParams"] = None, + params: Optional["SourceUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> Source: """ @@ -650,7 +137,7 @@ def update( async def update_async( self, source: str, - params: Optional["SourceService.UpdateParams"] = None, + params: Optional["SourceUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> Source: """ @@ -671,7 +158,7 @@ async def update_async( def create( self, - params: Optional["SourceService.CreateParams"] = None, + params: Optional["SourceCreateParams"] = None, options: Optional[RequestOptions] = None, ) -> Source: """ @@ -690,7 +177,7 @@ def create( async def create_async( self, - params: Optional["SourceService.CreateParams"] = None, + params: Optional["SourceCreateParams"] = None, options: Optional[RequestOptions] = None, ) -> Source: """ @@ -710,7 +197,7 @@ async def create_async( def verify( self, source: str, - params: "SourceService.VerifyParams", + params: "SourceVerifyParams", options: Optional[RequestOptions] = None, ) -> Source: """ @@ -732,7 +219,7 @@ def verify( async def verify_async( self, source: str, - params: "SourceService.VerifyParams", + params: "SourceVerifyParams", options: Optional[RequestOptions] = None, ) -> Source: """ diff --git a/stripe/_source_transaction_service.py b/stripe/_source_transaction_service.py index 23fbfcef8..9c3b9e035 100644 --- a/stripe/_source_transaction_service.py +++ b/stripe/_source_transaction_service.py @@ -5,33 +5,20 @@ from stripe._source_transaction import SourceTransaction from stripe._stripe_service import StripeService from stripe._util import sanitize_id -from typing import List, Optional, cast -from typing_extensions import NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params._source_transaction_list_params import ( + SourceTransactionListParams, + ) -class SourceTransactionService(StripeService): - class ListParams(TypedDict): - 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 SourceTransactionService(StripeService): def list( self, source: str, - params: Optional["SourceTransactionService.ListParams"] = None, + params: Optional["SourceTransactionListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[SourceTransaction]: """ @@ -53,7 +40,7 @@ def list( async def list_async( self, source: str, - params: Optional["SourceTransactionService.ListParams"] = None, + params: Optional["SourceTransactionListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[SourceTransaction]: """ diff --git a/stripe/_stripe_client.py b/stripe/_stripe_client.py index 86fedaee2..032be9c87 100644 --- a/stripe/_stripe_client.py +++ b/stripe/_stripe_client.py @@ -27,7 +27,7 @@ from stripe._util import _convert_to_stripe_object, get_api_mode, deprecated # noqa: F401 from stripe._webhook import Webhook, WebhookSignature from stripe._event import Event -from stripe.v2._event import EventNotification +from stripe.v2.core._event import EventNotification from typing import Any, Dict, Optional, Union, cast from typing_extensions import TYPE_CHECKING diff --git a/stripe/_subscription.py b/stripe/_subscription.py index e7bc7aad0..e1c585633 100644 --- a/stripe/_subscription.py +++ b/stripe/_subscription.py @@ -5,7 +5,6 @@ from stripe._expandable_field import ExpandableField from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource -from stripe._request_options import RequestOptions from stripe._search_result_object import SearchResultObject from stripe._searchable_api_resource import SearchableAPIResource from stripe._stripe_object import StripeObject @@ -22,13 +21,7 @@ cast, overload, ) -from typing_extensions import ( - Literal, - NotRequired, - TypedDict, - Unpack, - TYPE_CHECKING, -) +from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: from stripe._account import Account @@ -46,6 +39,34 @@ from stripe._subscription_schedule import SubscriptionSchedule from stripe._tax_id import TaxId from stripe._tax_rate import TaxRate + from stripe.params._subscription_attach_cadence_params import ( + SubscriptionAttachCadenceParams, + ) + from stripe.params._subscription_cancel_params import ( + SubscriptionCancelParams, + ) + from stripe.params._subscription_create_params import ( + SubscriptionCreateParams, + ) + from stripe.params._subscription_delete_discount_params import ( + SubscriptionDeleteDiscountParams, + ) + from stripe.params._subscription_list_params import SubscriptionListParams + from stripe.params._subscription_migrate_params import ( + SubscriptionMigrateParams, + ) + from stripe.params._subscription_modify_params import ( + SubscriptionModifyParams, + ) + from stripe.params._subscription_resume_params import ( + SubscriptionResumeParams, + ) + from stripe.params._subscription_retrieve_params import ( + SubscriptionRetrieveParams, + ) + from stripe.params._subscription_search_params import ( + SubscriptionSearchParams, + ) from stripe.test_helpers._test_clock import TestClock @@ -680,2284 +701,6 @@ class EndBehavior(StripeObject): """ _inner_class_types = {"end_behavior": EndBehavior} - class AttachCadenceParams(RequestOptions): - billing_cadence: str - """ - The Billing Cadence which controls the timing of recurring invoice generation for this subscription. If unset, the subscription will bill according to its own configured schedule and create its own invoices. If set, this subscription will be billed by the cadence instead, potentially sharing invoices with the other subscriptions linked to that Cadence. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class CancelParams(RequestOptions): - cancellation_details: NotRequired[ - "Subscription.CancelParamsCancellationDetails" - ] - """ - Details about why this subscription was cancelled - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - invoice_now: NotRequired[bool] - """ - Will generate a final invoice that invoices for any un-invoiced metered usage and new/pending proration invoice items. Defaults to `false`. - """ - prorate: NotRequired[bool] - """ - Will generate a proration invoice item that credits remaining unused time until the subscription period end. Defaults to `false`. - """ - - class CancelParamsCancellationDetails(TypedDict): - comment: NotRequired["Literal['']|str"] - """ - Additional comments about why the user canceled the subscription, if the subscription was canceled explicitly by the user. - """ - feedback: NotRequired[ - "Literal['']|Literal['customer_service', 'low_quality', 'missing_features', 'other', 'switched_service', 'too_complex', 'too_expensive', 'unused']" - ] - """ - The customer submitted reason for why they canceled, if the subscription was canceled explicitly by the user. - """ - - class CreateParams(RequestOptions): - add_invoice_items: NotRequired[ - List["Subscription.CreateParamsAddInvoiceItem"] - ] - """ - A list of prices and quantities that will generate invoice items appended to the next invoice for this subscription. You may pass up to 20 items. - """ - application_fee_percent: NotRequired["Literal['']|float"] - """ - A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). - """ - automatic_tax: NotRequired["Subscription.CreateParamsAutomaticTax"] - """ - Automatic tax settings for this subscription. - """ - backdate_start_date: NotRequired[int] - """ - A past timestamp to backdate the subscription's start date to. If set, the first invoice will contain line items for the timespan between the start date and the current time. Can be combined with trials and the billing cycle anchor. - """ - billing_cadence: NotRequired[str] - """ - The Billing Cadence which controls the timing of recurring invoice generation for this subscription. If unset, the subscription will bill according to its own configured schedule and create its own invoices. If set, this subscription will be billed by the cadence instead, potentially sharing invoices with the other subscriptions linked to that Cadence. - """ - billing_cycle_anchor: NotRequired[int] - """ - A future timestamp in UTC format to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). The anchor is the reference point that aligns future billing cycle dates. It sets the day of week for `week` intervals, the day of month for `month` and `year` intervals, and the month of year for `year` intervals. - """ - billing_cycle_anchor_config: NotRequired[ - "Subscription.CreateParamsBillingCycleAnchorConfig" - ] - """ - Mutually exclusive with billing_cycle_anchor and only valid with monthly and yearly price intervals. When provided, the billing_cycle_anchor is set to the next occurrence of the day_of_month at the hour, minute, and second UTC. - """ - billing_mode: NotRequired["Subscription.CreateParamsBillingMode"] - """ - Controls how prorations and invoices for subscriptions are calculated and orchestrated. - """ - billing_schedules: NotRequired[ - List["Subscription.CreateParamsBillingSchedule"] - ] - """ - Sets the billing schedules for the subscription. - """ - billing_thresholds: NotRequired[ - "Literal['']|Subscription.CreateParamsBillingThresholds" - ] - """ - Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. - """ - cancel_at: NotRequired[ - "int|Literal['max_period_end', 'min_period_end']" - ] - """ - A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period. - """ - cancel_at_period_end: NotRequired[bool] - """ - Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. - """ - collection_method: NotRequired[ - Literal["charge_automatically", "send_invoice"] - ] - """ - Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`. - """ - currency: NotRequired[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). - """ - customer: NotRequired[str] - """ - The identifier of the customer to subscribe. - """ - customer_account: NotRequired[str] - """ - The identifier of the account to subscribe. - """ - days_until_due: NotRequired[int] - """ - Number of days a customer has to pay invoices generated by this subscription. Valid only for subscriptions where `collection_method` is set to `send_invoice`. - """ - default_payment_method: NotRequired[str] - """ - ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over `default_source`. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). - """ - default_source: NotRequired[str] - """ - ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If `default_payment_method` is also set, `default_payment_method` will take precedence. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). - """ - default_tax_rates: NotRequired["Literal['']|List[str]"] - """ - The tax rates that will apply to any subscription item that does not have `tax_rates` set. Invoices created will have their `default_tax_rates` populated from the subscription. - """ - description: NotRequired[str] - """ - The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. - """ - discounts: NotRequired[ - "Literal['']|List[Subscription.CreateParamsDiscount]" - ] - """ - The coupons to redeem into discounts for the subscription. If not specified or empty, inherits the discount from the subscription's customer. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - invoice_settings: NotRequired[ - "Subscription.CreateParamsInvoiceSettings" - ] - """ - All invoices will be billed using the specified settings. - """ - items: NotRequired[List["Subscription.CreateParamsItem"]] - """ - A list of up to 20 subscription items, each with an attached price. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - off_session: NotRequired[bool] - """ - Indicates if a customer is on or off-session while an invoice payment is attempted. Defaults to `false` (on-session). - """ - on_behalf_of: NotRequired["Literal['']|str"] - """ - The account on behalf of which to charge, for each of the subscription's invoices. - """ - payment_behavior: NotRequired[ - Literal[ - "allow_incomplete", - "default_incomplete", - "error_if_incomplete", - "pending_if_incomplete", - ] - ] - """ - Only applies to subscriptions with `collection_method=charge_automatically`. - - Use `allow_incomplete` to create Subscriptions with `status=incomplete` if the first invoice can't be paid. Creating Subscriptions with this status allows you to manage scenarios where additional customer actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior. - - Use `default_incomplete` to create Subscriptions with `status=incomplete` when the first invoice requires payment, otherwise start as active. Subscriptions transition to `status=active` when successfully confirming the PaymentIntent on the first invoice. This allows simpler management of scenarios where additional customer actions are needed to pay a subscription's invoice, such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. If the PaymentIntent is not confirmed within 23 hours Subscriptions transition to `status=incomplete_expired`, which is a terminal state. - - Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's first invoice can't be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further customer action is needed, this parameter doesn't create a Subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more. - - `pending_if_incomplete` is only used with updates and cannot be passed when creating a Subscription. - - Subscriptions with `collection_method=send_invoice` are automatically activated regardless of the first Invoice status. - """ - payment_settings: NotRequired[ - "Subscription.CreateParamsPaymentSettings" - ] - """ - Payment settings to pass to invoices created by the subscription. - """ - pending_invoice_item_interval: NotRequired[ - "Literal['']|Subscription.CreateParamsPendingInvoiceItemInterval" - ] - """ - Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval. - """ - prebilling: NotRequired["Subscription.CreateParamsPrebilling"] - """ - If specified, the invoicing for the given billing cycle iterations will be processed now. - """ - proration_behavior: NotRequired[ - Literal["always_invoice", "create_prorations", "none"] - ] - """ - Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) resulting from the `billing_cycle_anchor`. If no value is passed, the default is `create_prorations`. - """ - transfer_data: NotRequired["Subscription.CreateParamsTransferData"] - """ - If specified, the funds from the subscription's invoices will be transferred to the destination and the ID of the resulting transfers will be found on the resulting charges. - """ - trial_end: NotRequired["Literal['now']|int"] - """ - Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. If set, trial_end will override the default trial period of the plan the customer is being subscribed to. The special value `now` can be provided to end the customer's trial immediately. Can be at most two years from `billing_cycle_anchor`. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. - """ - trial_from_plan: NotRequired[bool] - """ - Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. - """ - trial_period_days: NotRequired[int] - """ - Integer representing the number of trial period days before the customer is charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. - """ - trial_settings: NotRequired["Subscription.CreateParamsTrialSettings"] - """ - Settings related to subscription trials. - """ - - class CreateParamsAddInvoiceItem(TypedDict): - discounts: NotRequired[ - List["Subscription.CreateParamsAddInvoiceItemDiscount"] - ] - """ - The coupons to redeem into discounts for the item. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - period: NotRequired["Subscription.CreateParamsAddInvoiceItemPeriod"] - """ - The period associated with this invoice item. If not set, `period.start.type` defaults to `max_item_period_start` and `period.end.type` defaults to `min_item_period_end`. - """ - price: NotRequired[str] - """ - The ID of the price object. One of `price` or `price_data` is required. - """ - price_data: NotRequired[ - "Subscription.CreateParamsAddInvoiceItemPriceData" - ] - """ - Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. - """ - quantity: NotRequired[int] - """ - Quantity for this item. Defaults to 1. - """ - tax_rates: NotRequired["Literal['']|List[str]"] - """ - The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item. - """ - - class CreateParamsAddInvoiceItemDiscount(TypedDict): - coupon: NotRequired[str] - """ - ID of the coupon to create a new discount for. - """ - discount: NotRequired[str] - """ - ID of an existing discount on the object (or one of its ancestors) to reuse. - """ - discount_end: NotRequired[ - "Subscription.CreateParamsAddInvoiceItemDiscountDiscountEnd" - ] - """ - Details to determine how long the discount should be applied for. - """ - promotion_code: NotRequired[str] - """ - ID of the promotion code to create a new discount for. - """ - - class CreateParamsAddInvoiceItemDiscountDiscountEnd(TypedDict): - duration: NotRequired[ - "Subscription.CreateParamsAddInvoiceItemDiscountDiscountEndDuration" - ] - """ - Time span for the redeemed discount. - """ - timestamp: NotRequired[int] - """ - A precise Unix timestamp for the discount to end. Must be in the future. - """ - type: Literal["duration", "timestamp"] - """ - The type of calculation made to determine when the discount ends. - """ - - class CreateParamsAddInvoiceItemDiscountDiscountEndDuration(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. - """ - interval_count: int - """ - The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. - """ - - class CreateParamsAddInvoiceItemPeriod(TypedDict): - end: "Subscription.CreateParamsAddInvoiceItemPeriodEnd" - """ - End of the invoice item period. - """ - start: "Subscription.CreateParamsAddInvoiceItemPeriodStart" - """ - Start of the invoice item period. - """ - - class CreateParamsAddInvoiceItemPeriodEnd(TypedDict): - timestamp: NotRequired[int] - """ - A precise Unix timestamp for the end of the invoice item period. Must be greater than or equal to `period.start`. - """ - type: Literal["min_item_period_end", "timestamp"] - """ - Select how to calculate the end of the invoice item period. - """ - - class CreateParamsAddInvoiceItemPeriodStart(TypedDict): - timestamp: NotRequired[int] - """ - A precise Unix timestamp for the start of the invoice item period. Must be less than or equal to `period.end`. - """ - type: Literal["max_item_period_start", "now", "timestamp"] - """ - Select how to calculate the start of the invoice item period. - """ - - class CreateParamsAddInvoiceItemPriceData(TypedDict): - 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). - """ - product: str - """ - The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to. - """ - tax_behavior: NotRequired[ - Literal["exclusive", "inclusive", "unspecified"] - ] - """ - Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. - """ - unit_amount: NotRequired[int] - """ - A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge or a negative integer representing the amount to credit to the customer. - """ - unit_amount_decimal: NotRequired[str] - """ - Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - """ - - class CreateParamsAutomaticTax(TypedDict): - enabled: bool - """ - Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription. - """ - liability: NotRequired[ - "Subscription.CreateParamsAutomaticTaxLiability" - ] - """ - The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. - """ - - class CreateParamsAutomaticTaxLiability(TypedDict): - account: NotRequired[str] - """ - The connected account being referenced when `type` is `account`. - """ - type: Literal["account", "self"] - """ - Type of the account referenced in the request. - """ - - class CreateParamsBillingCycleAnchorConfig(TypedDict): - day_of_month: int - """ - The day of the month the anchor should be. Ranges from 1 to 31. - """ - hour: NotRequired[int] - """ - The hour of the day the anchor should be. Ranges from 0 to 23. - """ - minute: NotRequired[int] - """ - The minute of the hour the anchor should be. Ranges from 0 to 59. - """ - month: NotRequired[int] - """ - The month to start full cycle periods. Ranges from 1 to 12. - """ - second: NotRequired[int] - """ - The second of the minute the anchor should be. Ranges from 0 to 59. - """ - - class CreateParamsBillingMode(TypedDict): - flexible: NotRequired["Subscription.CreateParamsBillingModeFlexible"] - """ - Configure behavior for flexible billing mode. - """ - type: Literal["classic", "flexible"] - """ - Controls the calculation and orchestration of prorations and invoices for subscriptions. If no value is passed, the default is `flexible`. - """ - - class CreateParamsBillingModeFlexible(TypedDict): - proration_discounts: NotRequired[Literal["included", "itemized"]] - """ - Controls how invoices and invoice items display proration amounts and discount amounts. - """ - - class CreateParamsBillingSchedule(TypedDict): - applies_to: NotRequired[ - List["Subscription.CreateParamsBillingScheduleAppliesTo"] - ] - """ - Configure billing schedule differently for individual subscription items. - """ - bill_until: "Subscription.CreateParamsBillingScheduleBillUntil" - """ - The end date for the billing schedule. - """ - key: NotRequired[str] - """ - Specify a key for the billing schedule. Must be unique to this field, alphanumeric, and up to 200 characters. If not provided, a unique key will be generated. - """ - - class CreateParamsBillingScheduleAppliesTo(TypedDict): - price: NotRequired[str] - """ - The ID of the price object. - """ - type: Literal["price"] - """ - Controls which subscription items the billing schedule applies to. - """ - - class CreateParamsBillingScheduleBillUntil(TypedDict): - duration: NotRequired[ - "Subscription.CreateParamsBillingScheduleBillUntilDuration" - ] - """ - Specifies the billing period. - """ - timestamp: NotRequired[int] - """ - The end date of the billing schedule. - """ - type: Literal["duration", "timestamp"] - """ - Describes how the billing schedule will determine the end date. Either `duration` or `timestamp`. - """ - - class CreateParamsBillingScheduleBillUntilDuration(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Specifies billing duration. Either `day`, `week`, `month` or `year`. - """ - interval_count: NotRequired[int] - """ - The multiplier applied to the interval. - """ - - class CreateParamsBillingThresholds(TypedDict): - amount_gte: NotRequired[int] - """ - Monetary threshold that triggers the subscription to advance to a new billing period - """ - reset_billing_cycle_anchor: NotRequired[bool] - """ - Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. - """ - - class CreateParamsDiscount(TypedDict): - coupon: NotRequired[str] - """ - ID of the coupon to create a new discount for. - """ - discount: NotRequired[str] - """ - ID of an existing discount on the object (or one of its ancestors) to reuse. - """ - discount_end: NotRequired[ - "Subscription.CreateParamsDiscountDiscountEnd" - ] - """ - Details to determine how long the discount should be applied for. - """ - promotion_code: NotRequired[str] - """ - ID of the promotion code to create a new discount for. - """ - - class CreateParamsDiscountDiscountEnd(TypedDict): - duration: NotRequired[ - "Subscription.CreateParamsDiscountDiscountEndDuration" - ] - """ - Time span for the redeemed discount. - """ - timestamp: NotRequired[int] - """ - A precise Unix timestamp for the discount to end. Must be in the future. - """ - type: Literal["duration", "timestamp"] - """ - The type of calculation made to determine when the discount ends. - """ - - class CreateParamsDiscountDiscountEndDuration(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. - """ - interval_count: int - """ - The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. - """ - - class CreateParamsInvoiceSettings(TypedDict): - account_tax_ids: NotRequired["Literal['']|List[str]"] - """ - The account tax IDs associated with the subscription. Will be set on invoices generated by the subscription. - """ - issuer: NotRequired["Subscription.CreateParamsInvoiceSettingsIssuer"] - """ - The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. - """ - - class CreateParamsInvoiceSettingsIssuer(TypedDict): - account: NotRequired[str] - """ - The connected account being referenced when `type` is `account`. - """ - type: Literal["account", "self"] - """ - Type of the account referenced in the request. - """ - - class CreateParamsItem(TypedDict): - billing_thresholds: NotRequired[ - "Literal['']|Subscription.CreateParamsItemBillingThresholds" - ] - """ - Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. - """ - discounts: NotRequired[ - "Literal['']|List[Subscription.CreateParamsItemDiscount]" - ] - """ - The coupons to redeem into discounts for the subscription item. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - plan: NotRequired[str] - """ - Plan ID for this item, as a string. - """ - price: NotRequired[str] - """ - The ID of the price object. - """ - price_data: NotRequired["Subscription.CreateParamsItemPriceData"] - """ - Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. - """ - quantity: NotRequired[int] - """ - Quantity for this item. - """ - tax_rates: NotRequired["Literal['']|List[str]"] - """ - A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. - """ - trial: NotRequired["Subscription.CreateParamsItemTrial"] - """ - Define options to configure the trial on the subscription item. - """ - - class CreateParamsItemBillingThresholds(TypedDict): - usage_gte: int - """ - Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)) - """ - - class CreateParamsItemDiscount(TypedDict): - coupon: NotRequired[str] - """ - ID of the coupon to create a new discount for. - """ - discount: NotRequired[str] - """ - ID of an existing discount on the object (or one of its ancestors) to reuse. - """ - discount_end: NotRequired[ - "Subscription.CreateParamsItemDiscountDiscountEnd" - ] - """ - Details to determine how long the discount should be applied for. - """ - promotion_code: NotRequired[str] - """ - ID of the promotion code to create a new discount for. - """ - - class CreateParamsItemDiscountDiscountEnd(TypedDict): - duration: NotRequired[ - "Subscription.CreateParamsItemDiscountDiscountEndDuration" - ] - """ - Time span for the redeemed discount. - """ - timestamp: NotRequired[int] - """ - A precise Unix timestamp for the discount to end. Must be in the future. - """ - type: Literal["duration", "timestamp"] - """ - The type of calculation made to determine when the discount ends. - """ - - class CreateParamsItemDiscountDiscountEndDuration(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. - """ - interval_count: int - """ - The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. - """ - - class CreateParamsItemPriceData(TypedDict): - 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). - """ - product: str - """ - The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to. - """ - recurring: "Subscription.CreateParamsItemPriceDataRecurring" - """ - The recurring components of a price such as `interval` and `interval_count`. - """ - tax_behavior: NotRequired[ - Literal["exclusive", "inclusive", "unspecified"] - ] - """ - Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. - """ - unit_amount: NotRequired[int] - """ - A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. - """ - unit_amount_decimal: NotRequired[str] - """ - Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - """ - - class CreateParamsItemPriceDataRecurring(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Specifies billing frequency. Either `day`, `week`, `month` or `year`. - """ - interval_count: NotRequired[int] - """ - The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). - """ - - class CreateParamsItemTrial(TypedDict): - converts_to: NotRequired[List[str]] - """ - List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. - """ - type: Literal["free", "paid"] - """ - Determines the type of trial for this item. - """ - - class CreateParamsPaymentSettings(TypedDict): - payment_method_options: NotRequired[ - "Subscription.CreateParamsPaymentSettingsPaymentMethodOptions" - ] - """ - Payment-method-specific configuration to provide to invoices created by the subscription. - """ - payment_method_types: NotRequired[ - "Literal['']|List[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'affirm', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'boleto', 'card', 'cashapp', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'id_bank_transfer', 'ideal', 'jp_credit_transfer', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'multibanco', 'naver_pay', 'nz_bank_account', 'p24', 'payco', 'paynow', 'paypal', 'pix', 'promptpay', 'revolut_pay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'stripe_balance', 'swish', 'upi', 'us_bank_account', 'wechat_pay']]" - ] - """ - The list of payment method types (e.g. card) to provide to the invoice's PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice's default payment method, the subscription's default payment method, the customer's default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). Should not be specified with payment_method_configuration - """ - save_default_payment_method: NotRequired[ - Literal["off", "on_subscription"] - ] - """ - Configure whether Stripe updates `subscription.default_payment_method` when payment succeeds. Defaults to `off` if unspecified. - """ - - class CreateParamsPaymentSettingsPaymentMethodOptions(TypedDict): - acss_debit: NotRequired[ - "Literal['']|Subscription.CreateParamsPaymentSettingsPaymentMethodOptionsAcssDebit" - ] - """ - This sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice's PaymentIntent. - """ - bancontact: NotRequired[ - "Literal['']|Subscription.CreateParamsPaymentSettingsPaymentMethodOptionsBancontact" - ] - """ - This sub-hash contains details about the Bancontact payment method options to pass to the invoice's PaymentIntent. - """ - card: NotRequired[ - "Literal['']|Subscription.CreateParamsPaymentSettingsPaymentMethodOptionsCard" - ] - """ - This sub-hash contains details about the Card payment method options to pass to the invoice's PaymentIntent. - """ - customer_balance: NotRequired[ - "Literal['']|Subscription.CreateParamsPaymentSettingsPaymentMethodOptionsCustomerBalance" - ] - """ - This sub-hash contains details about the Bank transfer payment method options to pass to the invoice's PaymentIntent. - """ - id_bank_transfer: NotRequired[ - "Literal['']|Subscription.CreateParamsPaymentSettingsPaymentMethodOptionsIdBankTransfer" - ] - """ - This sub-hash contains details about the Indonesia bank transfer payment method options to pass to the invoice's PaymentIntent. - """ - konbini: NotRequired[ - "Literal['']|Subscription.CreateParamsPaymentSettingsPaymentMethodOptionsKonbini" - ] - """ - This sub-hash contains details about the Konbini payment method options to pass to the invoice's PaymentIntent. - """ - pix: NotRequired[ - "Literal['']|Subscription.CreateParamsPaymentSettingsPaymentMethodOptionsPix" - ] - """ - This sub-hash contains details about the Pix payment method options to pass to the invoice's PaymentIntent. - """ - sepa_debit: NotRequired[ - "Literal['']|Subscription.CreateParamsPaymentSettingsPaymentMethodOptionsSepaDebit" - ] - """ - This sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice's PaymentIntent. - """ - upi: NotRequired[ - "Literal['']|Subscription.CreateParamsPaymentSettingsPaymentMethodOptionsUpi" - ] - """ - This sub-hash contains details about the UPI payment method options to pass to the invoice's PaymentIntent. - """ - us_bank_account: NotRequired[ - "Literal['']|Subscription.CreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccount" - ] - """ - This sub-hash contains details about the ACH direct debit payment method options to pass to the invoice's PaymentIntent. - """ - - class CreateParamsPaymentSettingsPaymentMethodOptionsAcssDebit(TypedDict): - mandate_options: NotRequired[ - "Subscription.CreateParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions" - ] - """ - Additional fields for Mandate creation - """ - verification_method: NotRequired[ - Literal["automatic", "instant", "microdeposits"] - ] - """ - Verification method for the intent - """ - - class CreateParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions( - TypedDict, - ): - transaction_type: NotRequired[Literal["business", "personal"]] - """ - Transaction type of the mandate. - """ - - class CreateParamsPaymentSettingsPaymentMethodOptionsBancontact(TypedDict): - preferred_language: NotRequired[Literal["de", "en", "fr", "nl"]] - """ - Preferred language of the Bancontact authorization page that the customer is redirected to. - """ - - class CreateParamsPaymentSettingsPaymentMethodOptionsCard(TypedDict): - mandate_options: NotRequired[ - "Subscription.CreateParamsPaymentSettingsPaymentMethodOptionsCardMandateOptions" - ] - """ - Configuration options for setting up an eMandate for cards issued in India. - """ - network: NotRequired[ - Literal[ - "amex", - "cartes_bancaires", - "diners", - "discover", - "eftpos_au", - "girocard", - "interac", - "jcb", - "link", - "mastercard", - "unionpay", - "unknown", - "visa", - ] - ] - """ - Selected network to process this Subscription on. Depends on the available networks of the card attached to the Subscription. Can be only set confirm-time. - """ - request_three_d_secure: NotRequired[ - Literal["any", "automatic", "challenge"] - ] - """ - We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. - """ - - class CreateParamsPaymentSettingsPaymentMethodOptionsCardMandateOptions( - TypedDict, - ): - amount: NotRequired[int] - """ - Amount to be charged for future payments. - """ - amount_type: NotRequired[Literal["fixed", "maximum"]] - """ - One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. - """ - description: NotRequired[str] - """ - A description of the mandate or subscription that is meant to be displayed to the customer. - """ - - class CreateParamsPaymentSettingsPaymentMethodOptionsCustomerBalance( - TypedDict, - ): - bank_transfer: NotRequired[ - "Subscription.CreateParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransfer" - ] - """ - Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. - """ - funding_type: NotRequired[str] - """ - The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. - """ - - class CreateParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransfer( - TypedDict, - ): - eu_bank_transfer: NotRequired[ - "Subscription.CreateParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer" - ] - """ - Configuration for eu_bank_transfer funding type. - """ - type: NotRequired[str] - """ - The bank transfer type that can be used for funding. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. - """ - - class CreateParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer( - TypedDict, - ): - country: str - """ - The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. - """ - - class CreateParamsPaymentSettingsPaymentMethodOptionsIdBankTransfer( - TypedDict, - ): - pass - - class CreateParamsPaymentSettingsPaymentMethodOptionsKonbini(TypedDict): - pass - - class CreateParamsPaymentSettingsPaymentMethodOptionsPix(TypedDict): - mandate_options: NotRequired[ - "Subscription.CreateParamsPaymentSettingsPaymentMethodOptionsPixMandateOptions" - ] - """ - Configuration options for setting up a mandate - """ - - class CreateParamsPaymentSettingsPaymentMethodOptionsPixMandateOptions( - TypedDict, - ): - amount: NotRequired[int] - """ - Amount to be charged for future payments. If not provided, defaults to 40000. - """ - amount_includes_iof: NotRequired[Literal["always", "never"]] - """ - Determines if the amount includes the IOF tax. Defaults to `never`. - """ - end_date: NotRequired[str] - """ - Date when the mandate expires and no further payments will be charged, in `YYYY-MM-DD`. If not provided, the mandate will be active until canceled. - """ - payment_schedule: NotRequired[ - Literal["halfyearly", "monthly", "quarterly", "weekly", "yearly"] - ] - """ - Schedule at which the future payments will be charged. Defaults to `weekly`. - """ - - class CreateParamsPaymentSettingsPaymentMethodOptionsSepaDebit(TypedDict): - pass - - class CreateParamsPaymentSettingsPaymentMethodOptionsUpi(TypedDict): - mandate_options: NotRequired[ - "Subscription.CreateParamsPaymentSettingsPaymentMethodOptionsUpiMandateOptions" - ] - """ - Configuration options for setting up an eMandate - """ - - class CreateParamsPaymentSettingsPaymentMethodOptionsUpiMandateOptions( - TypedDict, - ): - amount: NotRequired[int] - """ - Amount to be charged for future payments. - """ - amount_type: NotRequired[Literal["fixed", "maximum"]] - """ - One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. - """ - description: NotRequired[str] - """ - A description of the mandate or subscription that is meant to be displayed to the customer. - """ - end_date: NotRequired[int] - """ - End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. - """ - - class CreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccount( - TypedDict, - ): - financial_connections: NotRequired[ - "Subscription.CreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections" - ] - """ - Additional fields for Financial Connections Session creation - """ - verification_method: NotRequired[ - Literal["automatic", "instant", "microdeposits"] - ] - """ - Verification method for the intent - """ - - class CreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections( - TypedDict, - ): - filters: NotRequired[ - "Subscription.CreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters" - ] - """ - Provide filters for the linked accounts that the customer can select for the payment method. - """ - permissions: NotRequired[ - List[ - Literal[ - "balances", "ownership", "payment_method", "transactions" - ] - ] - ] - """ - The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. - """ - prefetch: NotRequired[ - List[ - Literal[ - "balances", - "inferred_balances", - "ownership", - "transactions", - ] - ] - ] - """ - List of data features that you would like to retrieve upon account creation. - """ - - class CreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters( - TypedDict, - ): - account_subcategories: NotRequired[ - List[Literal["checking", "savings"]] - ] - """ - The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`. - """ - institution: NotRequired[str] - """ - ID of the institution to use to filter for selectable accounts. - """ - - class CreateParamsPendingInvoiceItemInterval(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Specifies invoicing frequency. Either `day`, `week`, `month` or `year`. - """ - interval_count: NotRequired[int] - """ - The number of intervals between invoices. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). - """ - - class CreateParamsPrebilling(TypedDict): - iterations: int - """ - This is used to determine the number of billing cycles to prebill. - """ - update_behavior: NotRequired[Literal["prebill", "reset"]] - """ - Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`. - """ - - class CreateParamsTransferData(TypedDict): - amount_percent: NotRequired[float] - """ - A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. - """ - destination: str - """ - ID of an existing, connected Stripe account. - """ - - class CreateParamsTrialSettings(TypedDict): - end_behavior: "Subscription.CreateParamsTrialSettingsEndBehavior" - """ - Defines how the subscription should behave when the user's free trial ends. - """ - - class CreateParamsTrialSettingsEndBehavior(TypedDict): - missing_payment_method: Literal["cancel", "create_invoice", "pause"] - """ - Indicates how the subscription should change when the trial ends if the user did not provide a payment method. - """ - - class DeleteDiscountParams(RequestOptions): - pass - - class ListParams(RequestOptions): - automatic_tax: NotRequired["Subscription.ListParamsAutomaticTax"] - """ - Filter subscriptions by their automatic tax settings. - """ - collection_method: NotRequired[ - Literal["charge_automatically", "send_invoice"] - ] - """ - The collection method of the subscriptions to retrieve. Either `charge_automatically` or `send_invoice`. - """ - created: NotRequired["Subscription.ListParamsCreated|int"] - """ - Only return subscriptions that were created during the given date interval. - """ - current_period_end: NotRequired[ - "Subscription.ListParamsCurrentPeriodEnd|int" - ] - """ - Only return subscriptions whose minimum item current_period_end falls within the given date interval. - """ - current_period_start: NotRequired[ - "Subscription.ListParamsCurrentPeriodStart|int" - ] - """ - Only return subscriptions whose maximum item current_period_start falls within the given date interval. - """ - customer: NotRequired[str] - """ - The ID of the customer whose subscriptions will be retrieved. - """ - customer_account: NotRequired[str] - """ - The ID of the account whose subscriptions will be retrieved. - """ - 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. - """ - plan: NotRequired[str] - """ - The ID of the plan whose subscriptions will be retrieved. - """ - price: NotRequired[str] - """ - Filter for subscriptions that contain this recurring price ID. - """ - 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. - """ - status: NotRequired[ - Literal[ - "active", - "all", - "canceled", - "ended", - "incomplete", - "incomplete_expired", - "past_due", - "paused", - "trialing", - "unpaid", - ] - ] - """ - The status of the subscriptions to retrieve. Passing in a value of `canceled` will return all canceled subscriptions, including those belonging to deleted customers. Pass `ended` to find subscriptions that are canceled and subscriptions that are expired due to [incomplete payment](https://stripe.com/docs/billing/subscriptions/overview#subscription-statuses). Passing in a value of `all` will return subscriptions of all statuses. If no value is supplied, all subscriptions that have not been canceled are returned. - """ - test_clock: NotRequired[str] - """ - Filter for subscriptions that are associated with the specified test clock. The response will not include subscriptions with test clocks if this and the customer parameter is not set. - """ - - class ListParamsAutomaticTax(TypedDict): - enabled: bool - """ - Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription. - """ - - class ListParamsCreated(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) - """ - - class ListParamsCurrentPeriodEnd(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) - """ - - class ListParamsCurrentPeriodStart(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) - """ - - class MigrateParams(RequestOptions): - billing_mode: "Subscription.MigrateParamsBillingMode" - """ - Controls how prorations and invoices for subscriptions are calculated and orchestrated. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class MigrateParamsBillingMode(TypedDict): - flexible: NotRequired["Subscription.MigrateParamsBillingModeFlexible"] - """ - Configure behavior for flexible billing mode. - """ - type: Literal["flexible"] - """ - Controls the calculation and orchestration of prorations and invoices for subscriptions. - """ - - class MigrateParamsBillingModeFlexible(TypedDict): - proration_discounts: NotRequired[Literal["included", "itemized"]] - """ - Controls how invoices and invoice items display proration amounts and discount amounts. - """ - - class ModifyParams(RequestOptions): - add_invoice_items: NotRequired[ - List["Subscription.ModifyParamsAddInvoiceItem"] - ] - """ - A list of prices and quantities that will generate invoice items appended to the next invoice for this subscription. You may pass up to 20 items. - """ - application_fee_percent: NotRequired["Literal['']|float"] - """ - A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). - """ - automatic_tax: NotRequired["Subscription.ModifyParamsAutomaticTax"] - """ - Automatic tax settings for this subscription. We recommend you only include this parameter when the existing value is being changed. - """ - billing_cadence: NotRequired[str] - """ - The Billing Cadence which controls the timing of recurring invoice generation for this subscription. If unset, the subscription will bill according to its own configured schedule and create its own invoices. If set, this subscription will be billed by the cadence instead, potentially sharing invoices with the other subscriptions linked to that Cadence. - """ - billing_cycle_anchor: NotRequired[Literal["now", "unchanged"]] - """ - Either `now` or `unchanged`. Setting the value to `now` resets the subscription's billing cycle anchor to the current time (in UTC). For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). - """ - billing_schedules: NotRequired[ - "Literal['']|List[Subscription.ModifyParamsBillingSchedule]" - ] - """ - Sets the billing schedules for the subscription. - """ - billing_thresholds: NotRequired[ - "Literal['']|Subscription.ModifyParamsBillingThresholds" - ] - """ - Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. - """ - cancel_at: NotRequired[ - "Literal['']|int|Literal['max_period_end', 'min_period_end']" - ] - """ - A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period. - """ - cancel_at_period_end: NotRequired[bool] - """ - Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. - """ - cancellation_details: NotRequired[ - "Subscription.ModifyParamsCancellationDetails" - ] - """ - Details about why this subscription was cancelled - """ - collection_method: NotRequired[ - Literal["charge_automatically", "send_invoice"] - ] - """ - Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`. - """ - days_until_due: NotRequired[int] - """ - Number of days a customer has to pay invoices generated by this subscription. Valid only for subscriptions where `collection_method` is set to `send_invoice`. - """ - default_payment_method: NotRequired[str] - """ - ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over `default_source`. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). - """ - default_source: NotRequired["Literal['']|str"] - """ - ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If `default_payment_method` is also set, `default_payment_method` will take precedence. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). - """ - default_tax_rates: NotRequired["Literal['']|List[str]"] - """ - The tax rates that will apply to any subscription item that does not have `tax_rates` set. Invoices created will have their `default_tax_rates` populated from the subscription. Pass an empty string to remove previously-defined tax rates. - """ - description: NotRequired["Literal['']|str"] - """ - The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. - """ - discounts: NotRequired[ - "Literal['']|List[Subscription.ModifyParamsDiscount]" - ] - """ - The coupons to redeem into discounts for the subscription. If not specified or empty, inherits the discount from the subscription's customer. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - invoice_settings: NotRequired[ - "Subscription.ModifyParamsInvoiceSettings" - ] - """ - All invoices will be billed using the specified settings. - """ - items: NotRequired[List["Subscription.ModifyParamsItem"]] - """ - A list of up to 20 subscription items, each with an attached price. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - off_session: NotRequired[bool] - """ - Indicates if a customer is on or off-session while an invoice payment is attempted. Defaults to `false` (on-session). - """ - on_behalf_of: NotRequired["Literal['']|str"] - """ - The account on behalf of which to charge, for each of the subscription's invoices. - """ - pause_collection: NotRequired[ - "Literal['']|Subscription.ModifyParamsPauseCollection" - ] - """ - If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment). - """ - payment_behavior: NotRequired[ - Literal[ - "allow_incomplete", - "default_incomplete", - "error_if_incomplete", - "pending_if_incomplete", - ] - ] - """ - Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior. - - Use `default_incomplete` to transition the subscription to `status=past_due` when payment is required and await explicit confirmation of the invoice's payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription's invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. - - Use `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes). - - Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://docs.stripe.com/changelog/2019-03-14) to learn more. - """ - payment_settings: NotRequired[ - "Subscription.ModifyParamsPaymentSettings" - ] - """ - Payment settings to pass to invoices created by the subscription. - """ - pending_invoice_item_interval: NotRequired[ - "Literal['']|Subscription.ModifyParamsPendingInvoiceItemInterval" - ] - """ - Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval. - """ - prebilling: NotRequired["Subscription.ModifyParamsPrebilling"] - """ - If specified, the invoicing for the given billing cycle iterations will be processed now. - """ - proration_behavior: NotRequired[ - Literal["always_invoice", "create_prorations", "none"] - ] - """ - Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`. - """ - proration_date: NotRequired[int] - """ - If set, prorations will be calculated as though the subscription was updated at the given time. This can be used to apply exactly the same prorations that were previewed with the [create preview](https://stripe.com/docs/api/invoices/create_preview) endpoint. `proration_date` can also be used to implement custom proration logic, such as prorating by day instead of by second, by providing the time that you wish to use for proration calculations. - """ - transfer_data: NotRequired[ - "Literal['']|Subscription.ModifyParamsTransferData" - ] - """ - If specified, the funds from the subscription's invoices will be transferred to the destination and the ID of the resulting transfers will be found on the resulting charges. This will be unset if you POST an empty value. - """ - trial_end: NotRequired["Literal['now']|int"] - """ - Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. If set, `trial_end` will override the default trial period of the plan the customer is being subscribed to. The `billing_cycle_anchor` will be updated to the `trial_end` value. The special value `now` can be provided to end the customer's trial immediately. Can be at most two years from `billing_cycle_anchor`. - """ - trial_from_plan: NotRequired[bool] - """ - Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. - """ - trial_settings: NotRequired["Subscription.ModifyParamsTrialSettings"] - """ - Settings related to subscription trials. - """ - - class ModifyParamsAddInvoiceItem(TypedDict): - discounts: NotRequired[ - List["Subscription.ModifyParamsAddInvoiceItemDiscount"] - ] - """ - The coupons to redeem into discounts for the item. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - period: NotRequired["Subscription.ModifyParamsAddInvoiceItemPeriod"] - """ - The period associated with this invoice item. If not set, `period.start.type` defaults to `max_item_period_start` and `period.end.type` defaults to `min_item_period_end`. - """ - price: NotRequired[str] - """ - The ID of the price object. One of `price` or `price_data` is required. - """ - price_data: NotRequired[ - "Subscription.ModifyParamsAddInvoiceItemPriceData" - ] - """ - Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. - """ - quantity: NotRequired[int] - """ - Quantity for this item. Defaults to 1. - """ - tax_rates: NotRequired["Literal['']|List[str]"] - """ - The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item. - """ - - class ModifyParamsAddInvoiceItemDiscount(TypedDict): - coupon: NotRequired[str] - """ - ID of the coupon to create a new discount for. - """ - discount: NotRequired[str] - """ - ID of an existing discount on the object (or one of its ancestors) to reuse. - """ - discount_end: NotRequired[ - "Subscription.ModifyParamsAddInvoiceItemDiscountDiscountEnd" - ] - """ - Details to determine how long the discount should be applied for. - """ - promotion_code: NotRequired[str] - """ - ID of the promotion code to create a new discount for. - """ - - class ModifyParamsAddInvoiceItemDiscountDiscountEnd(TypedDict): - duration: NotRequired[ - "Subscription.ModifyParamsAddInvoiceItemDiscountDiscountEndDuration" - ] - """ - Time span for the redeemed discount. - """ - timestamp: NotRequired[int] - """ - A precise Unix timestamp for the discount to end. Must be in the future. - """ - type: Literal["duration", "timestamp"] - """ - The type of calculation made to determine when the discount ends. - """ - - class ModifyParamsAddInvoiceItemDiscountDiscountEndDuration(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. - """ - interval_count: int - """ - The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. - """ - - class ModifyParamsAddInvoiceItemPeriod(TypedDict): - end: "Subscription.ModifyParamsAddInvoiceItemPeriodEnd" - """ - End of the invoice item period. - """ - start: "Subscription.ModifyParamsAddInvoiceItemPeriodStart" - """ - Start of the invoice item period. - """ - - class ModifyParamsAddInvoiceItemPeriodEnd(TypedDict): - timestamp: NotRequired[int] - """ - A precise Unix timestamp for the end of the invoice item period. Must be greater than or equal to `period.start`. - """ - type: Literal["min_item_period_end", "timestamp"] - """ - Select how to calculate the end of the invoice item period. - """ - - class ModifyParamsAddInvoiceItemPeriodStart(TypedDict): - timestamp: NotRequired[int] - """ - A precise Unix timestamp for the start of the invoice item period. Must be less than or equal to `period.end`. - """ - type: Literal["max_item_period_start", "now", "timestamp"] - """ - Select how to calculate the start of the invoice item period. - """ - - class ModifyParamsAddInvoiceItemPriceData(TypedDict): - 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). - """ - product: str - """ - The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to. - """ - tax_behavior: NotRequired[ - Literal["exclusive", "inclusive", "unspecified"] - ] - """ - Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. - """ - unit_amount: NotRequired[int] - """ - A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge or a negative integer representing the amount to credit to the customer. - """ - unit_amount_decimal: NotRequired[str] - """ - Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - """ - - class ModifyParamsAutomaticTax(TypedDict): - enabled: bool - """ - Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription. - """ - liability: NotRequired[ - "Subscription.ModifyParamsAutomaticTaxLiability" - ] - """ - The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. - """ - - class ModifyParamsAutomaticTaxLiability(TypedDict): - account: NotRequired[str] - """ - The connected account being referenced when `type` is `account`. - """ - type: Literal["account", "self"] - """ - Type of the account referenced in the request. - """ - - class ModifyParamsBillingSchedule(TypedDict): - applies_to: NotRequired[ - List["Subscription.ModifyParamsBillingScheduleAppliesTo"] - ] - """ - Configure billing schedule differently for individual subscription items. - """ - bill_until: NotRequired[ - "Subscription.ModifyParamsBillingScheduleBillUntil" - ] - """ - The end date for the billing schedule. - """ - key: NotRequired[str] - """ - Specify a key for the billing schedule. Must be unique to this field, alphanumeric, and up to 200 characters. If not provided, a unique key will be generated. - """ - - class ModifyParamsBillingScheduleAppliesTo(TypedDict): - price: NotRequired[str] - """ - The ID of the price object. - """ - type: Literal["price"] - """ - Controls which subscription items the billing schedule applies to. - """ - - class ModifyParamsBillingScheduleBillUntil(TypedDict): - duration: NotRequired[ - "Subscription.ModifyParamsBillingScheduleBillUntilDuration" - ] - """ - Specifies the billing period. - """ - timestamp: NotRequired[int] - """ - The end date of the billing schedule. - """ - type: Literal["duration", "timestamp"] - """ - Describes how the billing schedule will determine the end date. Either `duration` or `timestamp`. - """ - - class ModifyParamsBillingScheduleBillUntilDuration(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Specifies billing duration. Either `day`, `week`, `month` or `year`. - """ - interval_count: NotRequired[int] - """ - The multiplier applied to the interval. - """ - - class ModifyParamsBillingThresholds(TypedDict): - amount_gte: NotRequired[int] - """ - Monetary threshold that triggers the subscription to advance to a new billing period - """ - reset_billing_cycle_anchor: NotRequired[bool] - """ - Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. - """ - - class ModifyParamsCancellationDetails(TypedDict): - comment: NotRequired["Literal['']|str"] - """ - Additional comments about why the user canceled the subscription, if the subscription was canceled explicitly by the user. - """ - feedback: NotRequired[ - "Literal['']|Literal['customer_service', 'low_quality', 'missing_features', 'other', 'switched_service', 'too_complex', 'too_expensive', 'unused']" - ] - """ - The customer submitted reason for why they canceled, if the subscription was canceled explicitly by the user. - """ - - class ModifyParamsDiscount(TypedDict): - coupon: NotRequired[str] - """ - ID of the coupon to create a new discount for. - """ - discount: NotRequired[str] - """ - ID of an existing discount on the object (or one of its ancestors) to reuse. - """ - discount_end: NotRequired[ - "Subscription.ModifyParamsDiscountDiscountEnd" - ] - """ - Details to determine how long the discount should be applied for. - """ - promotion_code: NotRequired[str] - """ - ID of the promotion code to create a new discount for. - """ - - class ModifyParamsDiscountDiscountEnd(TypedDict): - duration: NotRequired[ - "Subscription.ModifyParamsDiscountDiscountEndDuration" - ] - """ - Time span for the redeemed discount. - """ - timestamp: NotRequired[int] - """ - A precise Unix timestamp for the discount to end. Must be in the future. - """ - type: Literal["duration", "timestamp"] - """ - The type of calculation made to determine when the discount ends. - """ - - class ModifyParamsDiscountDiscountEndDuration(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. - """ - interval_count: int - """ - The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. - """ - - class ModifyParamsInvoiceSettings(TypedDict): - account_tax_ids: NotRequired["Literal['']|List[str]"] - """ - The account tax IDs associated with the subscription. Will be set on invoices generated by the subscription. - """ - issuer: NotRequired["Subscription.ModifyParamsInvoiceSettingsIssuer"] - """ - The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. - """ - - class ModifyParamsInvoiceSettingsIssuer(TypedDict): - account: NotRequired[str] - """ - The connected account being referenced when `type` is `account`. - """ - type: Literal["account", "self"] - """ - Type of the account referenced in the request. - """ - - class ModifyParamsItem(TypedDict): - billing_thresholds: NotRequired[ - "Literal['']|Subscription.ModifyParamsItemBillingThresholds" - ] - """ - Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. - """ - clear_usage: NotRequired[bool] - """ - Delete all usage for a given subscription item. You must pass this when deleting a usage records subscription item. `clear_usage` has no effect if the plan has a billing meter attached. - """ - deleted: NotRequired[bool] - """ - A flag that, if set to `true`, will delete the specified item. - """ - discounts: NotRequired[ - "Literal['']|List[Subscription.ModifyParamsItemDiscount]" - ] - """ - The coupons to redeem into discounts for the subscription item. - """ - id: NotRequired[str] - """ - Subscription item to update. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - plan: NotRequired[str] - """ - Plan ID for this item, as a string. - """ - price: NotRequired[str] - """ - The ID of the price object. One of `price` or `price_data` is required. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided. - """ - price_data: NotRequired["Subscription.ModifyParamsItemPriceData"] - """ - Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. - """ - quantity: NotRequired[int] - """ - Quantity for this item. - """ - tax_rates: NotRequired["Literal['']|List[str]"] - """ - A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. - """ - - class ModifyParamsItemBillingThresholds(TypedDict): - usage_gte: int - """ - Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)) - """ - - class ModifyParamsItemDiscount(TypedDict): - coupon: NotRequired[str] - """ - ID of the coupon to create a new discount for. - """ - discount: NotRequired[str] - """ - ID of an existing discount on the object (or one of its ancestors) to reuse. - """ - discount_end: NotRequired[ - "Subscription.ModifyParamsItemDiscountDiscountEnd" - ] - """ - Details to determine how long the discount should be applied for. - """ - promotion_code: NotRequired[str] - """ - ID of the promotion code to create a new discount for. - """ - - class ModifyParamsItemDiscountDiscountEnd(TypedDict): - duration: NotRequired[ - "Subscription.ModifyParamsItemDiscountDiscountEndDuration" - ] - """ - Time span for the redeemed discount. - """ - timestamp: NotRequired[int] - """ - A precise Unix timestamp for the discount to end. Must be in the future. - """ - type: Literal["duration", "timestamp"] - """ - The type of calculation made to determine when the discount ends. - """ - - class ModifyParamsItemDiscountDiscountEndDuration(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. - """ - interval_count: int - """ - The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. - """ - - class ModifyParamsItemPriceData(TypedDict): - 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). - """ - product: str - """ - The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to. - """ - recurring: "Subscription.ModifyParamsItemPriceDataRecurring" - """ - The recurring components of a price such as `interval` and `interval_count`. - """ - tax_behavior: NotRequired[ - Literal["exclusive", "inclusive", "unspecified"] - ] - """ - Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. - """ - unit_amount: NotRequired[int] - """ - A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. - """ - unit_amount_decimal: NotRequired[str] - """ - Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - """ - - class ModifyParamsItemPriceDataRecurring(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Specifies billing frequency. Either `day`, `week`, `month` or `year`. - """ - interval_count: NotRequired[int] - """ - The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). - """ - - class ModifyParamsPauseCollection(TypedDict): - behavior: Literal["keep_as_draft", "mark_uncollectible", "void"] - """ - The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. - """ - resumes_at: NotRequired[int] - """ - The time after which the subscription will resume collecting payments. - """ - - class ModifyParamsPaymentSettings(TypedDict): - payment_method_options: NotRequired[ - "Subscription.ModifyParamsPaymentSettingsPaymentMethodOptions" - ] - """ - Payment-method-specific configuration to provide to invoices created by the subscription. - """ - payment_method_types: NotRequired[ - "Literal['']|List[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'affirm', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'boleto', 'card', 'cashapp', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'id_bank_transfer', 'ideal', 'jp_credit_transfer', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'multibanco', 'naver_pay', 'nz_bank_account', 'p24', 'payco', 'paynow', 'paypal', 'pix', 'promptpay', 'revolut_pay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'stripe_balance', 'swish', 'upi', 'us_bank_account', 'wechat_pay']]" - ] - """ - The list of payment method types (e.g. card) to provide to the invoice's PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice's default payment method, the subscription's default payment method, the customer's default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). Should not be specified with payment_method_configuration - """ - save_default_payment_method: NotRequired[ - Literal["off", "on_subscription"] - ] - """ - Configure whether Stripe updates `subscription.default_payment_method` when payment succeeds. Defaults to `off` if unspecified. - """ - - class ModifyParamsPaymentSettingsPaymentMethodOptions(TypedDict): - acss_debit: NotRequired[ - "Literal['']|Subscription.ModifyParamsPaymentSettingsPaymentMethodOptionsAcssDebit" - ] - """ - This sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice's PaymentIntent. - """ - bancontact: NotRequired[ - "Literal['']|Subscription.ModifyParamsPaymentSettingsPaymentMethodOptionsBancontact" - ] - """ - This sub-hash contains details about the Bancontact payment method options to pass to the invoice's PaymentIntent. - """ - card: NotRequired[ - "Literal['']|Subscription.ModifyParamsPaymentSettingsPaymentMethodOptionsCard" - ] - """ - This sub-hash contains details about the Card payment method options to pass to the invoice's PaymentIntent. - """ - customer_balance: NotRequired[ - "Literal['']|Subscription.ModifyParamsPaymentSettingsPaymentMethodOptionsCustomerBalance" - ] - """ - This sub-hash contains details about the Bank transfer payment method options to pass to the invoice's PaymentIntent. - """ - id_bank_transfer: NotRequired[ - "Literal['']|Subscription.ModifyParamsPaymentSettingsPaymentMethodOptionsIdBankTransfer" - ] - """ - This sub-hash contains details about the Indonesia bank transfer payment method options to pass to the invoice's PaymentIntent. - """ - konbini: NotRequired[ - "Literal['']|Subscription.ModifyParamsPaymentSettingsPaymentMethodOptionsKonbini" - ] - """ - This sub-hash contains details about the Konbini payment method options to pass to the invoice's PaymentIntent. - """ - pix: NotRequired[ - "Literal['']|Subscription.ModifyParamsPaymentSettingsPaymentMethodOptionsPix" - ] - """ - This sub-hash contains details about the Pix payment method options to pass to the invoice's PaymentIntent. - """ - sepa_debit: NotRequired[ - "Literal['']|Subscription.ModifyParamsPaymentSettingsPaymentMethodOptionsSepaDebit" - ] - """ - This sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice's PaymentIntent. - """ - upi: NotRequired[ - "Literal['']|Subscription.ModifyParamsPaymentSettingsPaymentMethodOptionsUpi" - ] - """ - This sub-hash contains details about the UPI payment method options to pass to the invoice's PaymentIntent. - """ - us_bank_account: NotRequired[ - "Literal['']|Subscription.ModifyParamsPaymentSettingsPaymentMethodOptionsUsBankAccount" - ] - """ - This sub-hash contains details about the ACH direct debit payment method options to pass to the invoice's PaymentIntent. - """ - - class ModifyParamsPaymentSettingsPaymentMethodOptionsAcssDebit(TypedDict): - mandate_options: NotRequired[ - "Subscription.ModifyParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions" - ] - """ - Additional fields for Mandate creation - """ - verification_method: NotRequired[ - Literal["automatic", "instant", "microdeposits"] - ] - """ - Verification method for the intent - """ - - class ModifyParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions( - TypedDict, - ): - transaction_type: NotRequired[Literal["business", "personal"]] - """ - Transaction type of the mandate. - """ - - class ModifyParamsPaymentSettingsPaymentMethodOptionsBancontact(TypedDict): - preferred_language: NotRequired[Literal["de", "en", "fr", "nl"]] - """ - Preferred language of the Bancontact authorization page that the customer is redirected to. - """ - - class ModifyParamsPaymentSettingsPaymentMethodOptionsCard(TypedDict): - mandate_options: NotRequired[ - "Subscription.ModifyParamsPaymentSettingsPaymentMethodOptionsCardMandateOptions" - ] - """ - Configuration options for setting up an eMandate for cards issued in India. - """ - network: NotRequired[ - Literal[ - "amex", - "cartes_bancaires", - "diners", - "discover", - "eftpos_au", - "girocard", - "interac", - "jcb", - "link", - "mastercard", - "unionpay", - "unknown", - "visa", - ] - ] - """ - Selected network to process this Subscription on. Depends on the available networks of the card attached to the Subscription. Can be only set confirm-time. - """ - request_three_d_secure: NotRequired[ - Literal["any", "automatic", "challenge"] - ] - """ - We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. - """ - - class ModifyParamsPaymentSettingsPaymentMethodOptionsCardMandateOptions( - TypedDict, - ): - amount: NotRequired[int] - """ - Amount to be charged for future payments. - """ - amount_type: NotRequired[Literal["fixed", "maximum"]] - """ - One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. - """ - description: NotRequired[str] - """ - A description of the mandate or subscription that is meant to be displayed to the customer. - """ - - class ModifyParamsPaymentSettingsPaymentMethodOptionsCustomerBalance( - TypedDict, - ): - bank_transfer: NotRequired[ - "Subscription.ModifyParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransfer" - ] - """ - Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. - """ - funding_type: NotRequired[str] - """ - The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. - """ - - class ModifyParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransfer( - TypedDict, - ): - eu_bank_transfer: NotRequired[ - "Subscription.ModifyParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer" - ] - """ - Configuration for eu_bank_transfer funding type. - """ - type: NotRequired[str] - """ - The bank transfer type that can be used for funding. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. - """ - - class ModifyParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer( - TypedDict, - ): - country: str - """ - The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. - """ - - class ModifyParamsPaymentSettingsPaymentMethodOptionsIdBankTransfer( - TypedDict, - ): - pass - - class ModifyParamsPaymentSettingsPaymentMethodOptionsKonbini(TypedDict): - pass - - class ModifyParamsPaymentSettingsPaymentMethodOptionsPix(TypedDict): - mandate_options: NotRequired[ - "Subscription.ModifyParamsPaymentSettingsPaymentMethodOptionsPixMandateOptions" - ] - """ - Configuration options for setting up a mandate - """ - - class ModifyParamsPaymentSettingsPaymentMethodOptionsPixMandateOptions( - TypedDict, - ): - amount: NotRequired[int] - """ - Amount to be charged for future payments. If not provided, defaults to 40000. - """ - amount_includes_iof: NotRequired[Literal["always", "never"]] - """ - Determines if the amount includes the IOF tax. Defaults to `never`. - """ - end_date: NotRequired[str] - """ - Date when the mandate expires and no further payments will be charged, in `YYYY-MM-DD`. If not provided, the mandate will be active until canceled. - """ - payment_schedule: NotRequired[ - Literal["halfyearly", "monthly", "quarterly", "weekly", "yearly"] - ] - """ - Schedule at which the future payments will be charged. Defaults to `weekly`. - """ - - class ModifyParamsPaymentSettingsPaymentMethodOptionsSepaDebit(TypedDict): - pass - - class ModifyParamsPaymentSettingsPaymentMethodOptionsUpi(TypedDict): - mandate_options: NotRequired[ - "Subscription.ModifyParamsPaymentSettingsPaymentMethodOptionsUpiMandateOptions" - ] - """ - Configuration options for setting up an eMandate - """ - - class ModifyParamsPaymentSettingsPaymentMethodOptionsUpiMandateOptions( - TypedDict, - ): - amount: NotRequired[int] - """ - Amount to be charged for future payments. - """ - amount_type: NotRequired[Literal["fixed", "maximum"]] - """ - One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. - """ - description: NotRequired[str] - """ - A description of the mandate or subscription that is meant to be displayed to the customer. - """ - end_date: NotRequired[int] - """ - End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. - """ - - class ModifyParamsPaymentSettingsPaymentMethodOptionsUsBankAccount( - TypedDict, - ): - financial_connections: NotRequired[ - "Subscription.ModifyParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections" - ] - """ - Additional fields for Financial Connections Session creation - """ - verification_method: NotRequired[ - Literal["automatic", "instant", "microdeposits"] - ] - """ - Verification method for the intent - """ - - class ModifyParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections( - TypedDict, - ): - filters: NotRequired[ - "Subscription.ModifyParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters" - ] - """ - Provide filters for the linked accounts that the customer can select for the payment method. - """ - permissions: NotRequired[ - List[ - Literal[ - "balances", "ownership", "payment_method", "transactions" - ] - ] - ] - """ - The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. - """ - prefetch: NotRequired[ - List[ - Literal[ - "balances", - "inferred_balances", - "ownership", - "transactions", - ] - ] - ] - """ - List of data features that you would like to retrieve upon account creation. - """ - - class ModifyParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters( - TypedDict, - ): - account_subcategories: NotRequired[ - List[Literal["checking", "savings"]] - ] - """ - The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`. - """ - institution: NotRequired[str] - """ - ID of the institution to use to filter for selectable accounts. - """ - - class ModifyParamsPendingInvoiceItemInterval(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Specifies invoicing frequency. Either `day`, `week`, `month` or `year`. - """ - interval_count: NotRequired[int] - """ - The number of intervals between invoices. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). - """ - - class ModifyParamsPrebilling(TypedDict): - iterations: int - """ - This is used to determine the number of billing cycles to prebill. - """ - update_behavior: NotRequired[Literal["prebill", "reset"]] - """ - Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`. - """ - - class ModifyParamsTransferData(TypedDict): - amount_percent: NotRequired[float] - """ - A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. - """ - destination: str - """ - ID of an existing, connected Stripe account. - """ - - class ModifyParamsTrialSettings(TypedDict): - end_behavior: "Subscription.ModifyParamsTrialSettingsEndBehavior" - """ - Defines how the subscription should behave when the user's free trial ends. - """ - - class ModifyParamsTrialSettingsEndBehavior(TypedDict): - missing_payment_method: Literal["cancel", "create_invoice", "pause"] - """ - Indicates how the subscription should change when the trial ends if the user did not provide a payment method. - """ - - class ResumeParams(RequestOptions): - billing_cycle_anchor: NotRequired[Literal["now", "unchanged"]] - """ - The billing cycle anchor that applies when the subscription is resumed. Either `now` or `unchanged`. The default is `now`. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - proration_behavior: NotRequired[ - Literal["always_invoice", "create_prorations", "none"] - ] - """ - Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) resulting from the `billing_cycle_anchor` being `unchanged`. When the `billing_cycle_anchor` is set to `now` (default value), no prorations are generated. If no value is passed, the default is `create_prorations`. - """ - proration_date: NotRequired[int] - """ - If set, prorations will be calculated as though the subscription was resumed at the given time. This can be used to apply exactly the same prorations that were previewed with the [create preview](https://stripe.com/docs/api/invoices/create_preview) endpoint. - """ - - class RetrieveParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class SearchParams(RequestOptions): - 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. - """ - page: NotRequired[str] - """ - A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. - """ - query: str - """ - The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for subscriptions](https://stripe.com/docs/search#query-fields-for-subscriptions). - """ - application: Optional[ExpandableField["Application"]] """ ID of the Connect Application that created the subscription. @@ -3176,7 +919,7 @@ class SearchParams(RequestOptions): def _cls_attach_cadence( cls, subscription: str, - **params: Unpack["Subscription.AttachCadenceParams"], + **params: Unpack["SubscriptionAttachCadenceParams"], ) -> "Subscription": """ Attach a Billing Cadence to an existing subscription. When attached, the subscription is billed by the Billing Cadence, potentially sharing invoices with the other subscriptions linked to the Billing Cadence. @@ -3195,7 +938,7 @@ def _cls_attach_cadence( @overload @staticmethod def attach_cadence( - subscription: str, **params: Unpack["Subscription.AttachCadenceParams"] + subscription: str, **params: Unpack["SubscriptionAttachCadenceParams"] ) -> "Subscription": """ Attach a Billing Cadence to an existing subscription. When attached, the subscription is billed by the Billing Cadence, potentially sharing invoices with the other subscriptions linked to the Billing Cadence. @@ -3204,7 +947,7 @@ def attach_cadence( @overload def attach_cadence( - self, **params: Unpack["Subscription.AttachCadenceParams"] + self, **params: Unpack["SubscriptionAttachCadenceParams"] ) -> "Subscription": """ Attach a Billing Cadence to an existing subscription. When attached, the subscription is billed by the Billing Cadence, potentially sharing invoices with the other subscriptions linked to the Billing Cadence. @@ -3213,7 +956,7 @@ def attach_cadence( @class_method_variant("_cls_attach_cadence") def attach_cadence( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Subscription.AttachCadenceParams"] + self, **params: Unpack["SubscriptionAttachCadenceParams"] ) -> "Subscription": """ Attach a Billing Cadence to an existing subscription. When attached, the subscription is billed by the Billing Cadence, potentially sharing invoices with the other subscriptions linked to the Billing Cadence. @@ -3233,7 +976,7 @@ def attach_cadence( # pyright: ignore[reportGeneralTypeIssues] async def _cls_attach_cadence_async( cls, subscription: str, - **params: Unpack["Subscription.AttachCadenceParams"], + **params: Unpack["SubscriptionAttachCadenceParams"], ) -> "Subscription": """ Attach a Billing Cadence to an existing subscription. When attached, the subscription is billed by the Billing Cadence, potentially sharing invoices with the other subscriptions linked to the Billing Cadence. @@ -3252,7 +995,7 @@ async def _cls_attach_cadence_async( @overload @staticmethod async def attach_cadence_async( - subscription: str, **params: Unpack["Subscription.AttachCadenceParams"] + subscription: str, **params: Unpack["SubscriptionAttachCadenceParams"] ) -> "Subscription": """ Attach a Billing Cadence to an existing subscription. When attached, the subscription is billed by the Billing Cadence, potentially sharing invoices with the other subscriptions linked to the Billing Cadence. @@ -3261,7 +1004,7 @@ async def attach_cadence_async( @overload async def attach_cadence_async( - self, **params: Unpack["Subscription.AttachCadenceParams"] + self, **params: Unpack["SubscriptionAttachCadenceParams"] ) -> "Subscription": """ Attach a Billing Cadence to an existing subscription. When attached, the subscription is billed by the Billing Cadence, potentially sharing invoices with the other subscriptions linked to the Billing Cadence. @@ -3270,7 +1013,7 @@ async def attach_cadence_async( @class_method_variant("_cls_attach_cadence_async") async def attach_cadence_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Subscription.AttachCadenceParams"] + self, **params: Unpack["SubscriptionAttachCadenceParams"] ) -> "Subscription": """ Attach a Billing Cadence to an existing subscription. When attached, the subscription is billed by the Billing Cadence, potentially sharing invoices with the other subscriptions linked to the Billing Cadence. @@ -3290,7 +1033,7 @@ async def attach_cadence_async( # pyright: ignore[reportGeneralTypeIssues] def _cls_cancel( cls, subscription_exposed_id: str, - **params: Unpack["Subscription.CancelParams"], + **params: Unpack["SubscriptionCancelParams"], ) -> "Subscription": """ Cancels a customer's subscription immediately. The customer won't be charged again for the subscription. After it's canceled, you can no longer update the subscription or its [metadata](https://docs.stripe.com/metadata). @@ -3316,7 +1059,7 @@ def _cls_cancel( @staticmethod def cancel( subscription_exposed_id: str, - **params: Unpack["Subscription.CancelParams"], + **params: Unpack["SubscriptionCancelParams"], ) -> "Subscription": """ Cancels a customer's subscription immediately. The customer won't be charged again for the subscription. After it's canceled, you can no longer update the subscription or its [metadata](https://docs.stripe.com/metadata). @@ -3329,7 +1072,7 @@ def cancel( @overload def cancel( - self, **params: Unpack["Subscription.CancelParams"] + self, **params: Unpack["SubscriptionCancelParams"] ) -> "Subscription": """ Cancels a customer's subscription immediately. The customer won't be charged again for the subscription. After it's canceled, you can no longer update the subscription or its [metadata](https://docs.stripe.com/metadata). @@ -3342,7 +1085,7 @@ def cancel( @class_method_variant("_cls_cancel") def cancel( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Subscription.CancelParams"] + self, **params: Unpack["SubscriptionCancelParams"] ) -> "Subscription": """ Cancels a customer's subscription immediately. The customer won't be charged again for the subscription. After it's canceled, you can no longer update the subscription or its [metadata](https://docs.stripe.com/metadata). @@ -3366,7 +1109,7 @@ def cancel( # pyright: ignore[reportGeneralTypeIssues] async def _cls_cancel_async( cls, subscription_exposed_id: str, - **params: Unpack["Subscription.CancelParams"], + **params: Unpack["SubscriptionCancelParams"], ) -> "Subscription": """ Cancels a customer's subscription immediately. The customer won't be charged again for the subscription. After it's canceled, you can no longer update the subscription or its [metadata](https://docs.stripe.com/metadata). @@ -3392,7 +1135,7 @@ async def _cls_cancel_async( @staticmethod async def cancel_async( subscription_exposed_id: str, - **params: Unpack["Subscription.CancelParams"], + **params: Unpack["SubscriptionCancelParams"], ) -> "Subscription": """ Cancels a customer's subscription immediately. The customer won't be charged again for the subscription. After it's canceled, you can no longer update the subscription or its [metadata](https://docs.stripe.com/metadata). @@ -3405,7 +1148,7 @@ async def cancel_async( @overload async def cancel_async( - self, **params: Unpack["Subscription.CancelParams"] + self, **params: Unpack["SubscriptionCancelParams"] ) -> "Subscription": """ Cancels a customer's subscription immediately. The customer won't be charged again for the subscription. After it's canceled, you can no longer update the subscription or its [metadata](https://docs.stripe.com/metadata). @@ -3418,7 +1161,7 @@ async def cancel_async( @class_method_variant("_cls_cancel_async") async def cancel_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Subscription.CancelParams"] + self, **params: Unpack["SubscriptionCancelParams"] ) -> "Subscription": """ Cancels a customer's subscription immediately. The customer won't be charged again for the subscription. After it's canceled, you can no longer update the subscription or its [metadata](https://docs.stripe.com/metadata). @@ -3440,7 +1183,7 @@ async def cancel_async( # pyright: ignore[reportGeneralTypeIssues] @classmethod def create( - cls, **params: Unpack["Subscription.CreateParams"] + cls, **params: Unpack["SubscriptionCreateParams"] ) -> "Subscription": """ Creates a new subscription on an existing customer. Each customer can have up to 500 active or scheduled subscriptions. @@ -3462,7 +1205,7 @@ def create( @classmethod async def create_async( - cls, **params: Unpack["Subscription.CreateParams"] + cls, **params: Unpack["SubscriptionCreateParams"] ) -> "Subscription": """ Creates a new subscription on an existing customer. Each customer can have up to 500 active or scheduled subscriptions. @@ -3486,7 +1229,7 @@ async def create_async( def _cls_delete_discount( cls, subscription_exposed_id: str, - **params: Unpack["Subscription.DeleteDiscountParams"], + **params: Unpack["SubscriptionDeleteDiscountParams"], ) -> "Discount": """ Removes the currently applied discount on a subscription. @@ -3508,7 +1251,7 @@ def _cls_delete_discount( @staticmethod def delete_discount( subscription_exposed_id: str, - **params: Unpack["Subscription.DeleteDiscountParams"], + **params: Unpack["SubscriptionDeleteDiscountParams"], ) -> "Discount": """ Removes the currently applied discount on a subscription. @@ -3517,7 +1260,7 @@ def delete_discount( @overload def delete_discount( - self, **params: Unpack["Subscription.DeleteDiscountParams"] + self, **params: Unpack["SubscriptionDeleteDiscountParams"] ) -> "Discount": """ Removes the currently applied discount on a subscription. @@ -3526,7 +1269,7 @@ def delete_discount( @class_method_variant("_cls_delete_discount") def delete_discount( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Subscription.DeleteDiscountParams"] + self, **params: Unpack["SubscriptionDeleteDiscountParams"] ) -> "Discount": """ Removes the currently applied discount on a subscription. @@ -3546,7 +1289,7 @@ def delete_discount( # pyright: ignore[reportGeneralTypeIssues] async def _cls_delete_discount_async( cls, subscription_exposed_id: str, - **params: Unpack["Subscription.DeleteDiscountParams"], + **params: Unpack["SubscriptionDeleteDiscountParams"], ) -> "Discount": """ Removes the currently applied discount on a subscription. @@ -3568,7 +1311,7 @@ async def _cls_delete_discount_async( @staticmethod async def delete_discount_async( subscription_exposed_id: str, - **params: Unpack["Subscription.DeleteDiscountParams"], + **params: Unpack["SubscriptionDeleteDiscountParams"], ) -> "Discount": """ Removes the currently applied discount on a subscription. @@ -3577,7 +1320,7 @@ async def delete_discount_async( @overload async def delete_discount_async( - self, **params: Unpack["Subscription.DeleteDiscountParams"] + self, **params: Unpack["SubscriptionDeleteDiscountParams"] ) -> "Discount": """ Removes the currently applied discount on a subscription. @@ -3586,7 +1329,7 @@ async def delete_discount_async( @class_method_variant("_cls_delete_discount_async") async def delete_discount_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Subscription.DeleteDiscountParams"] + self, **params: Unpack["SubscriptionDeleteDiscountParams"] ) -> "Discount": """ Removes the currently applied discount on a subscription. @@ -3604,7 +1347,7 @@ async def delete_discount_async( # pyright: ignore[reportGeneralTypeIssues] @classmethod def list( - cls, **params: Unpack["Subscription.ListParams"] + cls, **params: Unpack["SubscriptionListParams"] ) -> ListObject["Subscription"]: """ By default, returns a list of subscriptions that have not been canceled. In order to list canceled subscriptions, specify status=canceled. @@ -3624,7 +1367,7 @@ def list( @classmethod async def list_async( - cls, **params: Unpack["Subscription.ListParams"] + cls, **params: Unpack["SubscriptionListParams"] ) -> ListObject["Subscription"]: """ By default, returns a list of subscriptions that have not been canceled. In order to list canceled subscriptions, specify status=canceled. @@ -3644,7 +1387,7 @@ async def list_async( @classmethod def _cls_migrate( - cls, subscription: str, **params: Unpack["Subscription.MigrateParams"] + cls, subscription: str, **params: Unpack["SubscriptionMigrateParams"] ) -> "Subscription": """ Upgrade the billing_mode of an existing subscription. @@ -3663,7 +1406,7 @@ def _cls_migrate( @overload @staticmethod def migrate( - subscription: str, **params: Unpack["Subscription.MigrateParams"] + subscription: str, **params: Unpack["SubscriptionMigrateParams"] ) -> "Subscription": """ Upgrade the billing_mode of an existing subscription. @@ -3672,7 +1415,7 @@ def migrate( @overload def migrate( - self, **params: Unpack["Subscription.MigrateParams"] + self, **params: Unpack["SubscriptionMigrateParams"] ) -> "Subscription": """ Upgrade the billing_mode of an existing subscription. @@ -3681,7 +1424,7 @@ def migrate( @class_method_variant("_cls_migrate") def migrate( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Subscription.MigrateParams"] + self, **params: Unpack["SubscriptionMigrateParams"] ) -> "Subscription": """ Upgrade the billing_mode of an existing subscription. @@ -3699,7 +1442,7 @@ def migrate( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_migrate_async( - cls, subscription: str, **params: Unpack["Subscription.MigrateParams"] + cls, subscription: str, **params: Unpack["SubscriptionMigrateParams"] ) -> "Subscription": """ Upgrade the billing_mode of an existing subscription. @@ -3718,7 +1461,7 @@ async def _cls_migrate_async( @overload @staticmethod async def migrate_async( - subscription: str, **params: Unpack["Subscription.MigrateParams"] + subscription: str, **params: Unpack["SubscriptionMigrateParams"] ) -> "Subscription": """ Upgrade the billing_mode of an existing subscription. @@ -3727,7 +1470,7 @@ async def migrate_async( @overload async def migrate_async( - self, **params: Unpack["Subscription.MigrateParams"] + self, **params: Unpack["SubscriptionMigrateParams"] ) -> "Subscription": """ Upgrade the billing_mode of an existing subscription. @@ -3736,7 +1479,7 @@ async def migrate_async( @class_method_variant("_cls_migrate_async") async def migrate_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Subscription.MigrateParams"] + self, **params: Unpack["SubscriptionMigrateParams"] ) -> "Subscription": """ Upgrade the billing_mode of an existing subscription. @@ -3754,7 +1497,7 @@ async def migrate_async( # pyright: ignore[reportGeneralTypeIssues] @classmethod def modify( - cls, id: str, **params: Unpack["Subscription.ModifyParams"] + cls, id: str, **params: Unpack["SubscriptionModifyParams"] ) -> "Subscription": """ Updates an existing subscription to match the specified parameters. @@ -3791,7 +1534,7 @@ def modify( @classmethod async def modify_async( - cls, id: str, **params: Unpack["Subscription.ModifyParams"] + cls, id: str, **params: Unpack["SubscriptionModifyParams"] ) -> "Subscription": """ Updates an existing subscription to match the specified parameters. @@ -3828,7 +1571,7 @@ async def modify_async( @classmethod def _cls_resume( - cls, subscription: str, **params: Unpack["Subscription.ResumeParams"] + cls, subscription: str, **params: Unpack["SubscriptionResumeParams"] ) -> "Subscription": """ Initiates resumption of a paused subscription, optionally resetting the billing cycle anchor and creating prorations. If a resumption invoice is generated, it must be paid or marked uncollectible before the subscription will be unpaused. If payment succeeds the subscription will become active, and if payment fails the subscription will be past_due. The resumption invoice will void automatically if not paid by the expiration date. @@ -3847,7 +1590,7 @@ def _cls_resume( @overload @staticmethod def resume( - subscription: str, **params: Unpack["Subscription.ResumeParams"] + subscription: str, **params: Unpack["SubscriptionResumeParams"] ) -> "Subscription": """ Initiates resumption of a paused subscription, optionally resetting the billing cycle anchor and creating prorations. If a resumption invoice is generated, it must be paid or marked uncollectible before the subscription will be unpaused. If payment succeeds the subscription will become active, and if payment fails the subscription will be past_due. The resumption invoice will void automatically if not paid by the expiration date. @@ -3856,7 +1599,7 @@ def resume( @overload def resume( - self, **params: Unpack["Subscription.ResumeParams"] + self, **params: Unpack["SubscriptionResumeParams"] ) -> "Subscription": """ Initiates resumption of a paused subscription, optionally resetting the billing cycle anchor and creating prorations. If a resumption invoice is generated, it must be paid or marked uncollectible before the subscription will be unpaused. If payment succeeds the subscription will become active, and if payment fails the subscription will be past_due. The resumption invoice will void automatically if not paid by the expiration date. @@ -3865,7 +1608,7 @@ def resume( @class_method_variant("_cls_resume") def resume( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Subscription.ResumeParams"] + self, **params: Unpack["SubscriptionResumeParams"] ) -> "Subscription": """ Initiates resumption of a paused subscription, optionally resetting the billing cycle anchor and creating prorations. If a resumption invoice is generated, it must be paid or marked uncollectible before the subscription will be unpaused. If payment succeeds the subscription will become active, and if payment fails the subscription will be past_due. The resumption invoice will void automatically if not paid by the expiration date. @@ -3883,7 +1626,7 @@ def resume( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_resume_async( - cls, subscription: str, **params: Unpack["Subscription.ResumeParams"] + cls, subscription: str, **params: Unpack["SubscriptionResumeParams"] ) -> "Subscription": """ Initiates resumption of a paused subscription, optionally resetting the billing cycle anchor and creating prorations. If a resumption invoice is generated, it must be paid or marked uncollectible before the subscription will be unpaused. If payment succeeds the subscription will become active, and if payment fails the subscription will be past_due. The resumption invoice will void automatically if not paid by the expiration date. @@ -3902,7 +1645,7 @@ async def _cls_resume_async( @overload @staticmethod async def resume_async( - subscription: str, **params: Unpack["Subscription.ResumeParams"] + subscription: str, **params: Unpack["SubscriptionResumeParams"] ) -> "Subscription": """ Initiates resumption of a paused subscription, optionally resetting the billing cycle anchor and creating prorations. If a resumption invoice is generated, it must be paid or marked uncollectible before the subscription will be unpaused. If payment succeeds the subscription will become active, and if payment fails the subscription will be past_due. The resumption invoice will void automatically if not paid by the expiration date. @@ -3911,7 +1654,7 @@ async def resume_async( @overload async def resume_async( - self, **params: Unpack["Subscription.ResumeParams"] + self, **params: Unpack["SubscriptionResumeParams"] ) -> "Subscription": """ Initiates resumption of a paused subscription, optionally resetting the billing cycle anchor and creating prorations. If a resumption invoice is generated, it must be paid or marked uncollectible before the subscription will be unpaused. If payment succeeds the subscription will become active, and if payment fails the subscription will be past_due. The resumption invoice will void automatically if not paid by the expiration date. @@ -3920,7 +1663,7 @@ async def resume_async( @class_method_variant("_cls_resume_async") async def resume_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Subscription.ResumeParams"] + self, **params: Unpack["SubscriptionResumeParams"] ) -> "Subscription": """ Initiates resumption of a paused subscription, optionally resetting the billing cycle anchor and creating prorations. If a resumption invoice is generated, it must be paid or marked uncollectible before the subscription will be unpaused. If payment succeeds the subscription will become active, and if payment fails the subscription will be past_due. The resumption invoice will void automatically if not paid by the expiration date. @@ -3938,7 +1681,7 @@ async def resume_async( # pyright: ignore[reportGeneralTypeIssues] @classmethod def retrieve( - cls, id: str, **params: Unpack["Subscription.RetrieveParams"] + cls, id: str, **params: Unpack["SubscriptionRetrieveParams"] ) -> "Subscription": """ Retrieves the subscription with the given ID. @@ -3949,7 +1692,7 @@ def retrieve( @classmethod async def retrieve_async( - cls, id: str, **params: Unpack["Subscription.RetrieveParams"] + cls, id: str, **params: Unpack["SubscriptionRetrieveParams"] ) -> "Subscription": """ Retrieves the subscription with the given ID. @@ -3960,7 +1703,7 @@ async def retrieve_async( @classmethod def search( - cls, *args, **kwargs: Unpack["Subscription.SearchParams"] + cls, *args, **kwargs: Unpack["SubscriptionSearchParams"] ) -> SearchResultObject["Subscription"]: """ Search for subscriptions you've previously created using Stripe's [Search Query Language](https://docs.stripe.com/docs/search#search-query-language). @@ -3974,7 +1717,7 @@ def search( @classmethod async def search_async( - cls, *args, **kwargs: Unpack["Subscription.SearchParams"] + cls, *args, **kwargs: Unpack["SubscriptionSearchParams"] ) -> SearchResultObject["Subscription"]: """ Search for subscriptions you've previously created using Stripe's [Search Query Language](https://docs.stripe.com/docs/search#search-query-language). @@ -3988,13 +1731,13 @@ async def search_async( @classmethod def search_auto_paging_iter( - cls, *args, **kwargs: Unpack["Subscription.SearchParams"] + cls, *args, **kwargs: Unpack["SubscriptionSearchParams"] ) -> Iterator["Subscription"]: return cls.search(*args, **kwargs).auto_paging_iter() @classmethod async def search_auto_paging_iter_async( - cls, *args, **kwargs: Unpack["Subscription.SearchParams"] + cls, *args, **kwargs: Unpack["SubscriptionSearchParams"] ) -> AsyncIterator["Subscription"]: return (await cls.search_async(*args, **kwargs)).auto_paging_iter() diff --git a/stripe/_subscription_item.py b/stripe/_subscription_item.py index ebe04915f..b080673ff 100644 --- a/stripe/_subscription_item.py +++ b/stripe/_subscription_item.py @@ -5,24 +5,32 @@ from stripe._expandable_field import ExpandableField from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource -from stripe._request_options import RequestOptions from stripe._stripe_object import StripeObject from stripe._updateable_api_resource import UpdateableAPIResource from stripe._util import class_method_variant, sanitize_id from typing import ClassVar, Dict, List, Optional, cast, overload -from typing_extensions import ( - Literal, - NotRequired, - TypedDict, - Unpack, - TYPE_CHECKING, -) +from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: from stripe._discount import Discount from stripe._plan import Plan from stripe._price import Price from stripe._tax_rate import TaxRate + from stripe.params._subscription_item_create_params import ( + SubscriptionItemCreateParams, + ) + from stripe.params._subscription_item_delete_params import ( + SubscriptionItemDeleteParams, + ) + from stripe.params._subscription_item_list_params import ( + SubscriptionItemListParams, + ) + from stripe.params._subscription_item_modify_params import ( + SubscriptionItemModifyParams, + ) + from stripe.params._subscription_item_retrieve_params import ( + SubscriptionItemRetrieveParams, + ) class SubscriptionItem( @@ -54,390 +62,6 @@ class Trial(StripeObject): Determines the type of trial for this item. """ - class CreateParams(RequestOptions): - billing_thresholds: NotRequired[ - "Literal['']|SubscriptionItem.CreateParamsBillingThresholds" - ] - """ - Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. - """ - discounts: NotRequired[ - "Literal['']|List[SubscriptionItem.CreateParamsDiscount]" - ] - """ - The coupons to redeem into discounts for the subscription item. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - payment_behavior: NotRequired[ - Literal[ - "allow_incomplete", - "default_incomplete", - "error_if_incomplete", - "pending_if_incomplete", - ] - ] - """ - Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior. - - Use `default_incomplete` to transition the subscription to `status=past_due` when payment is required and await explicit confirmation of the invoice's payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription's invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. - - Use `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes). - - Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://docs.stripe.com/changelog/2019-03-14) to learn more. - """ - plan: NotRequired[str] - """ - The identifier of the plan to add to the subscription. - """ - price: NotRequired[str] - """ - The ID of the price object. - """ - price_data: NotRequired["SubscriptionItem.CreateParamsPriceData"] - """ - Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. - """ - proration_behavior: NotRequired[ - Literal["always_invoice", "create_prorations", "none"] - ] - """ - Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`. - """ - proration_date: NotRequired[int] - """ - If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply the same proration that was previewed with the [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint. - """ - quantity: NotRequired[int] - """ - The quantity you'd like to apply to the subscription item you're creating. - """ - subscription: str - """ - The identifier of the subscription to modify. - """ - tax_rates: NotRequired["Literal['']|List[str]"] - """ - A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. - """ - trial: NotRequired["SubscriptionItem.CreateParamsTrial"] - """ - Options that configure the trial on the subscription item. - """ - - class CreateParamsBillingThresholds(TypedDict): - usage_gte: int - """ - Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)) - """ - - class CreateParamsDiscount(TypedDict): - coupon: NotRequired[str] - """ - ID of the coupon to create a new discount for. - """ - discount: NotRequired[str] - """ - ID of an existing discount on the object (or one of its ancestors) to reuse. - """ - discount_end: NotRequired[ - "SubscriptionItem.CreateParamsDiscountDiscountEnd" - ] - """ - Details to determine how long the discount should be applied for. - """ - promotion_code: NotRequired[str] - """ - ID of the promotion code to create a new discount for. - """ - - class CreateParamsDiscountDiscountEnd(TypedDict): - duration: NotRequired[ - "SubscriptionItem.CreateParamsDiscountDiscountEndDuration" - ] - """ - Time span for the redeemed discount. - """ - timestamp: NotRequired[int] - """ - A precise Unix timestamp for the discount to end. Must be in the future. - """ - type: Literal["duration", "timestamp"] - """ - The type of calculation made to determine when the discount ends. - """ - - class CreateParamsDiscountDiscountEndDuration(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. - """ - interval_count: int - """ - The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. - """ - - class CreateParamsPriceData(TypedDict): - 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). - """ - product: str - """ - The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to. - """ - recurring: "SubscriptionItem.CreateParamsPriceDataRecurring" - """ - The recurring components of a price such as `interval` and `interval_count`. - """ - tax_behavior: NotRequired[ - Literal["exclusive", "inclusive", "unspecified"] - ] - """ - Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. - """ - unit_amount: NotRequired[int] - """ - A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. - """ - unit_amount_decimal: NotRequired[str] - """ - Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - """ - - class CreateParamsPriceDataRecurring(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Specifies billing frequency. Either `day`, `week`, `month` or `year`. - """ - interval_count: NotRequired[int] - """ - The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). - """ - - class CreateParamsTrial(TypedDict): - converts_to: NotRequired[List[str]] - """ - List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. - """ - type: Literal["free", "paid"] - """ - Determines the type of trial for this item. - """ - - class DeleteParams(RequestOptions): - clear_usage: NotRequired[bool] - """ - Delete all usage for the given subscription item. Allowed only when the current plan's `usage_type` is `metered`. - """ - proration_behavior: NotRequired[ - Literal["always_invoice", "create_prorations", "none"] - ] - """ - Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`. - """ - proration_date: NotRequired[int] - """ - If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply the same proration that was previewed with the [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint. - """ - - class ListParams(RequestOptions): - 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. - """ - subscription: str - """ - The ID of the subscription whose items will be retrieved. - """ - - class ModifyParams(RequestOptions): - billing_thresholds: NotRequired[ - "Literal['']|SubscriptionItem.ModifyParamsBillingThresholds" - ] - """ - Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. - """ - discounts: NotRequired[ - "Literal['']|List[SubscriptionItem.ModifyParamsDiscount]" - ] - """ - The coupons to redeem into discounts for the subscription item. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - off_session: NotRequired[bool] - """ - Indicates if a customer is on or off-session while an invoice payment is attempted. Defaults to `false` (on-session). - """ - payment_behavior: NotRequired[ - Literal[ - "allow_incomplete", - "default_incomplete", - "error_if_incomplete", - "pending_if_incomplete", - ] - ] - """ - Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior. - - Use `default_incomplete` to transition the subscription to `status=past_due` when payment is required and await explicit confirmation of the invoice's payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription's invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. - - Use `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes). - - Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://docs.stripe.com/changelog/2019-03-14) to learn more. - """ - plan: NotRequired[str] - """ - The identifier of the new plan for this subscription item. - """ - price: NotRequired[str] - """ - The ID of the price object. One of `price` or `price_data` is required. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided. - """ - price_data: NotRequired["SubscriptionItem.ModifyParamsPriceData"] - """ - Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. - """ - proration_behavior: NotRequired[ - Literal["always_invoice", "create_prorations", "none"] - ] - """ - Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`. - """ - proration_date: NotRequired[int] - """ - If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply the same proration that was previewed with the [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint. - """ - quantity: NotRequired[int] - """ - The quantity you'd like to apply to the subscription item you're creating. - """ - tax_rates: NotRequired["Literal['']|List[str]"] - """ - A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. - """ - - class ModifyParamsBillingThresholds(TypedDict): - usage_gte: int - """ - Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)) - """ - - class ModifyParamsDiscount(TypedDict): - coupon: NotRequired[str] - """ - ID of the coupon to create a new discount for. - """ - discount: NotRequired[str] - """ - ID of an existing discount on the object (or one of its ancestors) to reuse. - """ - discount_end: NotRequired[ - "SubscriptionItem.ModifyParamsDiscountDiscountEnd" - ] - """ - Details to determine how long the discount should be applied for. - """ - promotion_code: NotRequired[str] - """ - ID of the promotion code to create a new discount for. - """ - - class ModifyParamsDiscountDiscountEnd(TypedDict): - duration: NotRequired[ - "SubscriptionItem.ModifyParamsDiscountDiscountEndDuration" - ] - """ - Time span for the redeemed discount. - """ - timestamp: NotRequired[int] - """ - A precise Unix timestamp for the discount to end. Must be in the future. - """ - type: Literal["duration", "timestamp"] - """ - The type of calculation made to determine when the discount ends. - """ - - class ModifyParamsDiscountDiscountEndDuration(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. - """ - interval_count: int - """ - The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. - """ - - class ModifyParamsPriceData(TypedDict): - 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). - """ - product: str - """ - The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to. - """ - recurring: "SubscriptionItem.ModifyParamsPriceDataRecurring" - """ - The recurring components of a price such as `interval` and `interval_count`. - """ - tax_behavior: NotRequired[ - Literal["exclusive", "inclusive", "unspecified"] - ] - """ - Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. - """ - unit_amount: NotRequired[int] - """ - A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. - """ - unit_amount_decimal: NotRequired[str] - """ - Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - """ - - class ModifyParamsPriceDataRecurring(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Specifies billing frequency. Either `day`, `week`, `month` or `year`. - """ - interval_count: NotRequired[int] - """ - The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). - """ - - class RetrieveParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - billed_until: Optional[int] """ The time period the subscription item has been billed for. @@ -517,7 +141,7 @@ class RetrieveParams(RequestOptions): @classmethod def create( - cls, **params: Unpack["SubscriptionItem.CreateParams"] + cls, **params: Unpack["SubscriptionItemCreateParams"] ) -> "SubscriptionItem": """ Adds a new item to an existing subscription. No existing items will be changed or replaced. @@ -533,7 +157,7 @@ def create( @classmethod async def create_async( - cls, **params: Unpack["SubscriptionItem.CreateParams"] + cls, **params: Unpack["SubscriptionItemCreateParams"] ) -> "SubscriptionItem": """ Adds a new item to an existing subscription. No existing items will be changed or replaced. @@ -549,7 +173,7 @@ async def create_async( @classmethod def _cls_delete( - cls, sid: str, **params: Unpack["SubscriptionItem.DeleteParams"] + cls, sid: str, **params: Unpack["SubscriptionItemDeleteParams"] ) -> "SubscriptionItem": """ Deletes an item from the subscription. Removing a subscription item from a subscription will not cancel the subscription. @@ -567,7 +191,7 @@ def _cls_delete( @overload @staticmethod def delete( - sid: str, **params: Unpack["SubscriptionItem.DeleteParams"] + sid: str, **params: Unpack["SubscriptionItemDeleteParams"] ) -> "SubscriptionItem": """ Deletes an item from the subscription. Removing a subscription item from a subscription will not cancel the subscription. @@ -576,7 +200,7 @@ def delete( @overload def delete( - self, **params: Unpack["SubscriptionItem.DeleteParams"] + self, **params: Unpack["SubscriptionItemDeleteParams"] ) -> "SubscriptionItem": """ Deletes an item from the subscription. Removing a subscription item from a subscription will not cancel the subscription. @@ -585,7 +209,7 @@ def delete( @class_method_variant("_cls_delete") def delete( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["SubscriptionItem.DeleteParams"] + self, **params: Unpack["SubscriptionItemDeleteParams"] ) -> "SubscriptionItem": """ Deletes an item from the subscription. Removing a subscription item from a subscription will not cancel the subscription. @@ -598,7 +222,7 @@ def delete( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_delete_async( - cls, sid: str, **params: Unpack["SubscriptionItem.DeleteParams"] + cls, sid: str, **params: Unpack["SubscriptionItemDeleteParams"] ) -> "SubscriptionItem": """ Deletes an item from the subscription. Removing a subscription item from a subscription will not cancel the subscription. @@ -616,7 +240,7 @@ async def _cls_delete_async( @overload @staticmethod async def delete_async( - sid: str, **params: Unpack["SubscriptionItem.DeleteParams"] + sid: str, **params: Unpack["SubscriptionItemDeleteParams"] ) -> "SubscriptionItem": """ Deletes an item from the subscription. Removing a subscription item from a subscription will not cancel the subscription. @@ -625,7 +249,7 @@ async def delete_async( @overload async def delete_async( - self, **params: Unpack["SubscriptionItem.DeleteParams"] + self, **params: Unpack["SubscriptionItemDeleteParams"] ) -> "SubscriptionItem": """ Deletes an item from the subscription. Removing a subscription item from a subscription will not cancel the subscription. @@ -634,7 +258,7 @@ async def delete_async( @class_method_variant("_cls_delete_async") async def delete_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["SubscriptionItem.DeleteParams"] + self, **params: Unpack["SubscriptionItemDeleteParams"] ) -> "SubscriptionItem": """ Deletes an item from the subscription. Removing a subscription item from a subscription will not cancel the subscription. @@ -647,7 +271,7 @@ async def delete_async( # pyright: ignore[reportGeneralTypeIssues] @classmethod def list( - cls, **params: Unpack["SubscriptionItem.ListParams"] + cls, **params: Unpack["SubscriptionItemListParams"] ) -> ListObject["SubscriptionItem"]: """ Returns a list of your subscription items for a given subscription. @@ -667,7 +291,7 @@ def list( @classmethod async def list_async( - cls, **params: Unpack["SubscriptionItem.ListParams"] + cls, **params: Unpack["SubscriptionItemListParams"] ) -> ListObject["SubscriptionItem"]: """ Returns a list of your subscription items for a given subscription. @@ -687,7 +311,7 @@ async def list_async( @classmethod def modify( - cls, id: str, **params: Unpack["SubscriptionItem.ModifyParams"] + cls, id: str, **params: Unpack["SubscriptionItemModifyParams"] ) -> "SubscriptionItem": """ Updates the plan or quantity of an item on a current subscription. @@ -704,7 +328,7 @@ def modify( @classmethod async def modify_async( - cls, id: str, **params: Unpack["SubscriptionItem.ModifyParams"] + cls, id: str, **params: Unpack["SubscriptionItemModifyParams"] ) -> "SubscriptionItem": """ Updates the plan or quantity of an item on a current subscription. @@ -721,7 +345,7 @@ async def modify_async( @classmethod def retrieve( - cls, id: str, **params: Unpack["SubscriptionItem.RetrieveParams"] + cls, id: str, **params: Unpack["SubscriptionItemRetrieveParams"] ) -> "SubscriptionItem": """ Retrieves the subscription item with the given ID. @@ -732,7 +356,7 @@ def retrieve( @classmethod async def retrieve_async( - cls, id: str, **params: Unpack["SubscriptionItem.RetrieveParams"] + cls, id: str, **params: Unpack["SubscriptionItemRetrieveParams"] ) -> "SubscriptionItem": """ Retrieves the subscription item with the given ID. diff --git a/stripe/_subscription_item_service.py b/stripe/_subscription_item_service.py index c8a4e8fcd..fc930d4a3 100644 --- a/stripe/_subscription_item_service.py +++ b/stripe/_subscription_item_service.py @@ -5,403 +5,32 @@ from stripe._stripe_service import StripeService from stripe._subscription_item import SubscriptionItem from stripe._util import sanitize_id -from typing import Dict, List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params._subscription_item_create_params import ( + SubscriptionItemCreateParams, + ) + from stripe.params._subscription_item_delete_params import ( + SubscriptionItemDeleteParams, + ) + from stripe.params._subscription_item_list_params import ( + SubscriptionItemListParams, + ) + from stripe.params._subscription_item_retrieve_params import ( + SubscriptionItemRetrieveParams, + ) + from stripe.params._subscription_item_update_params import ( + SubscriptionItemUpdateParams, + ) class SubscriptionItemService(StripeService): - class CreateParams(TypedDict): - billing_thresholds: NotRequired[ - "Literal['']|SubscriptionItemService.CreateParamsBillingThresholds" - ] - """ - Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. - """ - discounts: NotRequired[ - "Literal['']|List[SubscriptionItemService.CreateParamsDiscount]" - ] - """ - The coupons to redeem into discounts for the subscription item. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - payment_behavior: NotRequired[ - Literal[ - "allow_incomplete", - "default_incomplete", - "error_if_incomplete", - "pending_if_incomplete", - ] - ] - """ - Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior. - - Use `default_incomplete` to transition the subscription to `status=past_due` when payment is required and await explicit confirmation of the invoice's payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription's invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. - - Use `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes). - - Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://docs.stripe.com/changelog/2019-03-14) to learn more. - """ - plan: NotRequired[str] - """ - The identifier of the plan to add to the subscription. - """ - price: NotRequired[str] - """ - The ID of the price object. - """ - price_data: NotRequired[ - "SubscriptionItemService.CreateParamsPriceData" - ] - """ - Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. - """ - proration_behavior: NotRequired[ - Literal["always_invoice", "create_prorations", "none"] - ] - """ - Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`. - """ - proration_date: NotRequired[int] - """ - If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply the same proration that was previewed with the [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint. - """ - quantity: NotRequired[int] - """ - The quantity you'd like to apply to the subscription item you're creating. - """ - subscription: str - """ - The identifier of the subscription to modify. - """ - tax_rates: NotRequired["Literal['']|List[str]"] - """ - A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. - """ - trial: NotRequired["SubscriptionItemService.CreateParamsTrial"] - """ - Options that configure the trial on the subscription item. - """ - - class CreateParamsBillingThresholds(TypedDict): - usage_gte: int - """ - Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)) - """ - - class CreateParamsDiscount(TypedDict): - coupon: NotRequired[str] - """ - ID of the coupon to create a new discount for. - """ - discount: NotRequired[str] - """ - ID of an existing discount on the object (or one of its ancestors) to reuse. - """ - discount_end: NotRequired[ - "SubscriptionItemService.CreateParamsDiscountDiscountEnd" - ] - """ - Details to determine how long the discount should be applied for. - """ - promotion_code: NotRequired[str] - """ - ID of the promotion code to create a new discount for. - """ - - class CreateParamsDiscountDiscountEnd(TypedDict): - duration: NotRequired[ - "SubscriptionItemService.CreateParamsDiscountDiscountEndDuration" - ] - """ - Time span for the redeemed discount. - """ - timestamp: NotRequired[int] - """ - A precise Unix timestamp for the discount to end. Must be in the future. - """ - type: Literal["duration", "timestamp"] - """ - The type of calculation made to determine when the discount ends. - """ - - class CreateParamsDiscountDiscountEndDuration(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. - """ - interval_count: int - """ - The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. - """ - - class CreateParamsPriceData(TypedDict): - 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). - """ - product: str - """ - The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to. - """ - recurring: "SubscriptionItemService.CreateParamsPriceDataRecurring" - """ - The recurring components of a price such as `interval` and `interval_count`. - """ - tax_behavior: NotRequired[ - Literal["exclusive", "inclusive", "unspecified"] - ] - """ - Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. - """ - unit_amount: NotRequired[int] - """ - A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. - """ - unit_amount_decimal: NotRequired[str] - """ - Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - """ - - class CreateParamsPriceDataRecurring(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Specifies billing frequency. Either `day`, `week`, `month` or `year`. - """ - interval_count: NotRequired[int] - """ - The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). - """ - - class CreateParamsTrial(TypedDict): - converts_to: NotRequired[List[str]] - """ - List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. - """ - type: Literal["free", "paid"] - """ - Determines the type of trial for this item. - """ - - class DeleteParams(TypedDict): - clear_usage: NotRequired[bool] - """ - Delete all usage for the given subscription item. Allowed only when the current plan's `usage_type` is `metered`. - """ - proration_behavior: NotRequired[ - Literal["always_invoice", "create_prorations", "none"] - ] - """ - Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`. - """ - proration_date: NotRequired[int] - """ - If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply the same proration that was previewed with the [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint. - """ - - class ListParams(TypedDict): - 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. - """ - subscription: str - """ - The ID of the subscription whose items will be retrieved. - """ - - class RetrieveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class UpdateParams(TypedDict): - billing_thresholds: NotRequired[ - "Literal['']|SubscriptionItemService.UpdateParamsBillingThresholds" - ] - """ - Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. - """ - discounts: NotRequired[ - "Literal['']|List[SubscriptionItemService.UpdateParamsDiscount]" - ] - """ - The coupons to redeem into discounts for the subscription item. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - off_session: NotRequired[bool] - """ - Indicates if a customer is on or off-session while an invoice payment is attempted. Defaults to `false` (on-session). - """ - payment_behavior: NotRequired[ - Literal[ - "allow_incomplete", - "default_incomplete", - "error_if_incomplete", - "pending_if_incomplete", - ] - ] - """ - Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior. - - Use `default_incomplete` to transition the subscription to `status=past_due` when payment is required and await explicit confirmation of the invoice's payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription's invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. - - Use `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes). - - Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://docs.stripe.com/changelog/2019-03-14) to learn more. - """ - plan: NotRequired[str] - """ - The identifier of the new plan for this subscription item. - """ - price: NotRequired[str] - """ - The ID of the price object. One of `price` or `price_data` is required. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided. - """ - price_data: NotRequired[ - "SubscriptionItemService.UpdateParamsPriceData" - ] - """ - Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. - """ - proration_behavior: NotRequired[ - Literal["always_invoice", "create_prorations", "none"] - ] - """ - Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`. - """ - proration_date: NotRequired[int] - """ - If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply the same proration that was previewed with the [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint. - """ - quantity: NotRequired[int] - """ - The quantity you'd like to apply to the subscription item you're creating. - """ - tax_rates: NotRequired["Literal['']|List[str]"] - """ - A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. - """ - - class UpdateParamsBillingThresholds(TypedDict): - usage_gte: int - """ - Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)) - """ - - class UpdateParamsDiscount(TypedDict): - coupon: NotRequired[str] - """ - ID of the coupon to create a new discount for. - """ - discount: NotRequired[str] - """ - ID of an existing discount on the object (or one of its ancestors) to reuse. - """ - discount_end: NotRequired[ - "SubscriptionItemService.UpdateParamsDiscountDiscountEnd" - ] - """ - Details to determine how long the discount should be applied for. - """ - promotion_code: NotRequired[str] - """ - ID of the promotion code to create a new discount for. - """ - - class UpdateParamsDiscountDiscountEnd(TypedDict): - duration: NotRequired[ - "SubscriptionItemService.UpdateParamsDiscountDiscountEndDuration" - ] - """ - Time span for the redeemed discount. - """ - timestamp: NotRequired[int] - """ - A precise Unix timestamp for the discount to end. Must be in the future. - """ - type: Literal["duration", "timestamp"] - """ - The type of calculation made to determine when the discount ends. - """ - - class UpdateParamsDiscountDiscountEndDuration(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. - """ - interval_count: int - """ - The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. - """ - - class UpdateParamsPriceData(TypedDict): - 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). - """ - product: str - """ - The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to. - """ - recurring: "SubscriptionItemService.UpdateParamsPriceDataRecurring" - """ - The recurring components of a price such as `interval` and `interval_count`. - """ - tax_behavior: NotRequired[ - Literal["exclusive", "inclusive", "unspecified"] - ] - """ - Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. - """ - unit_amount: NotRequired[int] - """ - A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. - """ - unit_amount_decimal: NotRequired[str] - """ - Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - """ - - class UpdateParamsPriceDataRecurring(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Specifies billing frequency. Either `day`, `week`, `month` or `year`. - """ - interval_count: NotRequired[int] - """ - The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). - """ - def delete( self, item: str, - params: Optional["SubscriptionItemService.DeleteParams"] = None, + params: Optional["SubscriptionItemDeleteParams"] = None, options: Optional[RequestOptions] = None, ) -> SubscriptionItem: """ @@ -421,7 +50,7 @@ def delete( async def delete_async( self, item: str, - params: Optional["SubscriptionItemService.DeleteParams"] = None, + params: Optional["SubscriptionItemDeleteParams"] = None, options: Optional[RequestOptions] = None, ) -> SubscriptionItem: """ @@ -441,7 +70,7 @@ async def delete_async( def retrieve( self, item: str, - params: Optional["SubscriptionItemService.RetrieveParams"] = None, + params: Optional["SubscriptionItemRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> SubscriptionItem: """ @@ -461,7 +90,7 @@ def retrieve( async def retrieve_async( self, item: str, - params: Optional["SubscriptionItemService.RetrieveParams"] = None, + params: Optional["SubscriptionItemRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> SubscriptionItem: """ @@ -481,7 +110,7 @@ async def retrieve_async( def update( self, item: str, - params: Optional["SubscriptionItemService.UpdateParams"] = None, + params: Optional["SubscriptionItemUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> SubscriptionItem: """ @@ -501,7 +130,7 @@ def update( async def update_async( self, item: str, - params: Optional["SubscriptionItemService.UpdateParams"] = None, + params: Optional["SubscriptionItemUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> SubscriptionItem: """ @@ -520,7 +149,7 @@ async def update_async( def list( self, - params: "SubscriptionItemService.ListParams", + params: "SubscriptionItemListParams", options: Optional[RequestOptions] = None, ) -> ListObject[SubscriptionItem]: """ @@ -539,7 +168,7 @@ def list( async def list_async( self, - params: "SubscriptionItemService.ListParams", + params: "SubscriptionItemListParams", options: Optional[RequestOptions] = None, ) -> ListObject[SubscriptionItem]: """ @@ -558,7 +187,7 @@ async def list_async( def create( self, - params: "SubscriptionItemService.CreateParams", + params: "SubscriptionItemCreateParams", options: Optional[RequestOptions] = None, ) -> SubscriptionItem: """ @@ -577,7 +206,7 @@ def create( async def create_async( self, - params: "SubscriptionItemService.CreateParams", + params: "SubscriptionItemCreateParams", options: Optional[RequestOptions] = None, ) -> SubscriptionItem: """ diff --git a/stripe/_subscription_schedule.py b/stripe/_subscription_schedule.py index ead83b364..f01f99ed9 100644 --- a/stripe/_subscription_schedule.py +++ b/stripe/_subscription_schedule.py @@ -4,18 +4,11 @@ from stripe._expandable_field import ExpandableField from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource -from stripe._request_options import RequestOptions from stripe._stripe_object import StripeObject from stripe._updateable_api_resource import UpdateableAPIResource from stripe._util import class_method_variant, sanitize_id from typing import ClassVar, Dict, List, Optional, cast, overload -from typing_extensions import ( - Literal, - NotRequired, - TypedDict, - Unpack, - TYPE_CHECKING, -) +from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: from stripe._account import Account @@ -31,6 +24,27 @@ from stripe._subscription import Subscription from stripe._tax_id import TaxId from stripe._tax_rate import TaxRate + from stripe.params._subscription_schedule_amend_params import ( + SubscriptionScheduleAmendParams, + ) + from stripe.params._subscription_schedule_cancel_params import ( + SubscriptionScheduleCancelParams, + ) + from stripe.params._subscription_schedule_create_params import ( + SubscriptionScheduleCreateParams, + ) + from stripe.params._subscription_schedule_list_params import ( + SubscriptionScheduleListParams, + ) + from stripe.params._subscription_schedule_modify_params import ( + SubscriptionScheduleModifyParams, + ) + from stripe.params._subscription_schedule_release_params import ( + SubscriptionScheduleReleaseParams, + ) + from stripe.params._subscription_schedule_retrieve_params import ( + SubscriptionScheduleRetrieveParams, + ) from stripe.test_helpers._test_clock import TestClock @@ -624,2410 +638,158 @@ class Prebilling(StripeObject): Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. """ - class AmendParams(RequestOptions): - amendments: NotRequired[ - List["SubscriptionSchedule.AmendParamsAmendment"] - ] - """ - Changes to apply to the phases of the subscription schedule, in the order provided. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - prebilling: NotRequired[ - "Literal['']|List[SubscriptionSchedule.AmendParamsPrebilling]" - ] - """ - Provide any time periods to bill in advance. - """ - proration_behavior: NotRequired[ - Literal["always_invoice", "create_prorations", "none"] - ] - """ - In cases where the amendment changes the currently active phase, - specifies if and how to prorate at the time of the request. - """ - schedule_settings: NotRequired[ - "SubscriptionSchedule.AmendParamsScheduleSettings" - ] - """ - Changes to apply to the subscription schedule. - """ + application: Optional[ExpandableField["Application"]] + """ + ID of the Connect Application that created the schedule. + """ + billing_behavior: Optional[ + Literal["prorate_on_next_phase", "prorate_up_front"] + ] + """ + Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front. + """ + billing_mode: BillingMode + """ + The billing mode of the subscription. + """ + canceled_at: Optional[int] + """ + Time at which the subscription schedule was canceled. Measured in seconds since the Unix epoch. + """ + completed_at: Optional[int] + """ + Time at which the subscription schedule was completed. Measured in seconds since the Unix epoch. + """ + created: int + """ + Time at which the object was created. Measured in seconds since the Unix epoch. + """ + current_phase: Optional[CurrentPhase] + """ + Object representing the start and end dates for the current phase of the subscription schedule, if it is `active`. + """ + customer: ExpandableField["Customer"] + """ + ID of the customer who owns the subscription schedule. + """ + customer_account: Optional[str] + """ + ID of the account who owns the subscription schedule. + """ + default_settings: DefaultSettings + end_behavior: Literal["cancel", "none", "release", "renew"] + """ + Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running. `cancel` will end the subscription schedule and cancel the underlying subscription. + """ + id: str + """ + Unique identifier for the object. + """ + last_price_migration_error: Optional[LastPriceMigrationError] + """ + Details of the most recent price migration that failed for the subscription schedule. + """ + livemode: bool + """ + Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + """ + metadata: Optional[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + """ + object: Literal["subscription_schedule"] + """ + String representing the object's type. Objects of the same type share the same value. + """ + phases: List[Phase] + """ + Configuration for the subscription schedule's phases. + """ + prebilling: Optional[Prebilling] + """ + Time period and invoice for a Subscription billed in advance. + """ + released_at: Optional[int] + """ + Time at which the subscription schedule was released. Measured in seconds since the Unix epoch. + """ + released_subscription: Optional[str] + """ + ID of the subscription once managed by the subscription schedule (if it is released). + """ + status: Literal[ + "active", "canceled", "completed", "not_started", "released" + ] + """ + The present status of the subscription schedule. Possible values are `not_started`, `active`, `completed`, `released`, and `canceled`. You can read more about the different states in our [behavior guide](https://stripe.com/docs/billing/subscriptions/subscription-schedules). + """ + subscription: Optional[ExpandableField["Subscription"]] + """ + ID of the subscription managed by the subscription schedule. + """ + test_clock: Optional[ExpandableField["TestClock"]] + """ + ID of the test clock this subscription schedule belongs to. + """ - class AmendParamsAmendment(TypedDict): - amendment_end: NotRequired[ - "SubscriptionSchedule.AmendParamsAmendmentAmendmentEnd" - ] + @classmethod + def _cls_amend( + cls, schedule: str, **params: Unpack["SubscriptionScheduleAmendParams"] + ) -> "SubscriptionSchedule": """ - Details to identify the end of the time range modified by the proposed change. If not supplied, the amendment is considered a point-in-time operation that only affects the exact timestamp at `amendment_start`, and a restricted set of attributes is supported on the amendment. + Amends an existing subscription schedule. """ - amendment_start: ( - "SubscriptionSchedule.AmendParamsAmendmentAmendmentStart" + return cast( + "SubscriptionSchedule", + cls._static_request( + "post", + "/v1/subscription_schedules/{schedule}/amend".format( + schedule=sanitize_id(schedule) + ), + params=params, + ), ) - """ - Details to identify the earliest timestamp where the proposed change should take effect. - """ - billing_cycle_anchor: NotRequired[ - Literal["amendment_start", "automatic"] - ] - """ - For point-in-time amendments (having no `amendment_end`), this attribute lets you set or remove whether the subscription's billing cycle anchor is reset at the `amendment_start` timestamp.For time-span based amendments (having both `amendment_start` and `amendment_end`), the only value valid is `automatic`, which removes any previously configured billing cycle anchor resets scheduled to occur during the window of time spanned by the amendment. - """ - discount_actions: NotRequired[ - List["SubscriptionSchedule.AmendParamsAmendmentDiscountAction"] - ] - """ - Changes to the coupons being redeemed or discounts being applied during the amendment time span. - """ - item_actions: NotRequired[ - List["SubscriptionSchedule.AmendParamsAmendmentItemAction"] - ] - """ - Changes to the subscription items during the amendment time span. - """ - metadata_actions: NotRequired[ - List["SubscriptionSchedule.AmendParamsAmendmentMetadataAction"] - ] - """ - Instructions for how to modify phase metadata - """ - proration_behavior: NotRequired[ - Literal["always_invoice", "create_prorations", "none"] - ] - """ - Changes to how Stripe handles prorations during the amendment time span. Affects if and how prorations are created when a future phase starts. In cases where the amendment changes the currently active phase, it is used to determine whether or how to prorate now, at the time of the request. Also supported as a point-in-time operation when `amendment_end` is `null`. - """ - set_pause_collection: NotRequired[ - "SubscriptionSchedule.AmendParamsAmendmentSetPauseCollection" - ] - """ - Defines how to pause collection for the underlying subscription throughout the duration of the amendment. - """ - set_schedule_end: NotRequired[ - Literal["amendment_end", "amendment_start"] - ] - """ - Ends the subscription schedule early as dictated by either the accompanying amendment's start or end. - """ - trial_settings: NotRequired[ - "SubscriptionSchedule.AmendParamsAmendmentTrialSettings" - ] - """ - Settings related to subscription trials. - """ - - class AmendParamsAmendmentAmendmentEnd(TypedDict): - discount_end: NotRequired[ - "SubscriptionSchedule.AmendParamsAmendmentAmendmentEndDiscountEnd" - ] - """ - Use the `end` time of a given discount. - """ - duration: NotRequired[ - "SubscriptionSchedule.AmendParamsAmendmentAmendmentEndDuration" - ] - """ - Time span for the amendment starting from the `amendment_start`. - """ - timestamp: NotRequired[int] - """ - A precise Unix timestamp for the amendment to end. Must be after the `amendment_start`. - """ - type: Literal[ - "discount_end", - "duration", - "schedule_end", - "timestamp", - "trial_end", - "trial_start", - "upcoming_invoice", - ] - """ - Select one of three ways to pass the `amendment_end`. - """ - - class AmendParamsAmendmentAmendmentEndDiscountEnd(TypedDict): - discount: str - """ - The ID of a specific discount. - """ - - class AmendParamsAmendmentAmendmentEndDuration(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. - """ - interval_count: int - """ - The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. - """ - - class AmendParamsAmendmentAmendmentStart(TypedDict): - amendment_end: NotRequired[ - "SubscriptionSchedule.AmendParamsAmendmentAmendmentStartAmendmentEnd" - ] - """ - Details of another amendment in the same array, immediately after which this amendment should begin. - """ - discount_end: NotRequired[ - "SubscriptionSchedule.AmendParamsAmendmentAmendmentStartDiscountEnd" - ] - """ - Use the `end` time of a given discount. - """ - timestamp: NotRequired[int] - """ - A precise Unix timestamp for the amendment to start. - """ - type: Literal[ - "amendment_end", - "discount_end", - "now", - "schedule_end", - "timestamp", - "trial_end", - "trial_start", - "upcoming_invoice", - ] - """ - Select one of three ways to pass the `amendment_start`. - """ - - class AmendParamsAmendmentAmendmentStartAmendmentEnd(TypedDict): - index: int - """ - The position of the previous amendment in the `amendments` array after which this amendment should begin. Indexes start from 0 and must be less than the index of the current amendment in the array. - """ - - class AmendParamsAmendmentAmendmentStartDiscountEnd(TypedDict): - discount: str - """ - The ID of a specific discount. - """ - class AmendParamsAmendmentDiscountAction(TypedDict): - add: NotRequired[ - "SubscriptionSchedule.AmendParamsAmendmentDiscountActionAdd" - ] - """ - Details of the discount to add. - """ - remove: NotRequired[ - "SubscriptionSchedule.AmendParamsAmendmentDiscountActionRemove" - ] - """ - Details of the discount to remove. - """ - set: NotRequired[ - "SubscriptionSchedule.AmendParamsAmendmentDiscountActionSet" - ] - """ - Details of the discount to replace the existing discounts with. - """ - type: Literal["add", "remove", "set"] - """ - Determines the type of discount action. - """ - - class AmendParamsAmendmentDiscountActionAdd(TypedDict): - coupon: NotRequired[str] - """ - The coupon code to redeem. - """ - discount: NotRequired[str] - """ - An ID of an existing discount for a coupon that was already redeemed. - """ - discount_end: NotRequired[ - "SubscriptionSchedule.AmendParamsAmendmentDiscountActionAddDiscountEnd" - ] - """ - Details to determine how long the discount should be applied for. - """ - index: NotRequired[int] - """ - The index, starting at 0, at which to position the new discount. When not supplied, Stripe defaults to appending the discount to the end of the `discounts` array. - """ - promotion_code: NotRequired[str] - """ - The promotion code to redeem. - """ - - class AmendParamsAmendmentDiscountActionAddDiscountEnd(TypedDict): - type: Literal["amendment_end"] + @overload + @staticmethod + def amend( + schedule: str, **params: Unpack["SubscriptionScheduleAmendParams"] + ) -> "SubscriptionSchedule": """ - The type of calculation made to determine when the discount ends. + Amends an existing subscription schedule. """ + ... - class AmendParamsAmendmentDiscountActionRemove(TypedDict): - coupon: NotRequired[str] - """ - The coupon code to remove from the `discounts` array. - """ - discount: NotRequired[str] - """ - The ID of a discount to remove from the `discounts` array. - """ - promotion_code: NotRequired[str] + @overload + def amend( + self, **params: Unpack["SubscriptionScheduleAmendParams"] + ) -> "SubscriptionSchedule": """ - The ID of a promotion code to remove from the `discounts` array. + Amends an existing subscription schedule. """ + ... - class AmendParamsAmendmentDiscountActionSet(TypedDict): - coupon: NotRequired[str] - """ - The coupon code to replace the `discounts` array with. - """ - discount: NotRequired[str] - """ - An ID of an existing discount to replace the `discounts` array with. - """ - promotion_code: NotRequired[str] + @class_method_variant("_cls_amend") + def amend( # pyright: ignore[reportGeneralTypeIssues] + self, **params: Unpack["SubscriptionScheduleAmendParams"] + ) -> "SubscriptionSchedule": """ - An ID of an existing promotion code to replace the `discounts` array with. + Amends an existing subscription schedule. """ - - class AmendParamsAmendmentItemAction(TypedDict): - add: NotRequired[ - "SubscriptionSchedule.AmendParamsAmendmentItemActionAdd" - ] - """ - Details of the subscription item to add. If an item with the same `price` exists, it will be replaced by this new item. Otherwise, it adds the new item. - """ - remove: NotRequired[ - "SubscriptionSchedule.AmendParamsAmendmentItemActionRemove" - ] - """ - Details of the subscription item to remove. - """ - set: NotRequired[ - "SubscriptionSchedule.AmendParamsAmendmentItemActionSet" - ] - """ - Details of the subscription item to replace the existing items with. If an item with the `set[price]` already exists, the `items` array is not cleared. Instead, all of the other `set` properties that are passed in this request will replace the existing values for the configuration item. - """ - type: Literal["add", "remove", "set"] - """ - Determines the type of item action. - """ - - class AmendParamsAmendmentItemActionAdd(TypedDict): - discounts: NotRequired[ - List[ - "SubscriptionSchedule.AmendParamsAmendmentItemActionAddDiscount" - ] - ] - """ - The discounts applied to the item. Subscription item discounts are applied before subscription discounts. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - price: str - """ - The ID of the price object. - """ - quantity: NotRequired[int] - """ - Quantity for this item. - """ - tax_rates: NotRequired[List[str]] - """ - The tax rates that apply to this subscription item. When set, the `default_tax_rates` on the subscription do not apply to this `subscription_item`. - """ - trial: NotRequired[ - "SubscriptionSchedule.AmendParamsAmendmentItemActionAddTrial" - ] - """ - Options that configure the trial on the subscription item. - """ - - class AmendParamsAmendmentItemActionAddDiscount(TypedDict): - coupon: NotRequired[str] - """ - ID of the coupon to create a new discount for. - """ - discount: NotRequired[str] - """ - ID of an existing discount on the object (or one of its ancestors) to reuse. - """ - discount_end: NotRequired[ - "SubscriptionSchedule.AmendParamsAmendmentItemActionAddDiscountDiscountEnd" - ] - """ - Details to determine how long the discount should be applied for. - """ - promotion_code: NotRequired[str] - """ - ID of the promotion code to create a new discount for. - """ - - class AmendParamsAmendmentItemActionAddDiscountDiscountEnd(TypedDict): - duration: NotRequired[ - "SubscriptionSchedule.AmendParamsAmendmentItemActionAddDiscountDiscountEndDuration" - ] - """ - Time span for the redeemed discount. - """ - timestamp: NotRequired[int] - """ - A precise Unix timestamp for the discount to end. Must be in the future. - """ - type: Literal["duration", "timestamp"] - """ - The type of calculation made to determine when the discount ends. - """ - - class AmendParamsAmendmentItemActionAddDiscountDiscountEndDuration( - TypedDict, - ): - interval: Literal["day", "month", "week", "year"] - """ - Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. - """ - interval_count: int - """ - The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. - """ - - class AmendParamsAmendmentItemActionAddTrial(TypedDict): - converts_to: NotRequired[List[str]] - """ - List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. - """ - type: Literal["free", "paid"] - """ - Determines the type of trial for this item. - """ - - class AmendParamsAmendmentItemActionRemove(TypedDict): - price: str - """ - ID of a price to remove. - """ - - class AmendParamsAmendmentItemActionSet(TypedDict): - discounts: NotRequired[ - List[ - "SubscriptionSchedule.AmendParamsAmendmentItemActionSetDiscount" - ] - ] - """ - If an item with the `price` already exists, passing this will override the `discounts` array on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `discounts`. - """ - metadata: NotRequired[Dict[str, str]] - """ - If an item with the `price` already exists, passing this will override the `metadata` on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `metadata`. - """ - price: str - """ - The ID of the price object. - """ - quantity: NotRequired[int] - """ - If an item with the `price` already exists, passing this will override the quantity on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `quantity`. - """ - tax_rates: NotRequired[List[str]] - """ - If an item with the `price` already exists, passing this will override the `tax_rates` array on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `tax_rates`. - """ - trial: NotRequired[ - "SubscriptionSchedule.AmendParamsAmendmentItemActionSetTrial" - ] - """ - If an item with the `price` already exists, passing this will override the `trial` configuration on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `trial`. - """ - - class AmendParamsAmendmentItemActionSetDiscount(TypedDict): - coupon: NotRequired[str] - """ - ID of the coupon to create a new discount for. - """ - discount: NotRequired[str] - """ - ID of an existing discount on the object (or one of its ancestors) to reuse. - """ - discount_end: NotRequired[ - "SubscriptionSchedule.AmendParamsAmendmentItemActionSetDiscountDiscountEnd" - ] - """ - Details to determine how long the discount should be applied for. - """ - promotion_code: NotRequired[str] - """ - ID of the promotion code to create a new discount for. - """ - - class AmendParamsAmendmentItemActionSetDiscountDiscountEnd(TypedDict): - duration: NotRequired[ - "SubscriptionSchedule.AmendParamsAmendmentItemActionSetDiscountDiscountEndDuration" - ] - """ - Time span for the redeemed discount. - """ - timestamp: NotRequired[int] - """ - A precise Unix timestamp for the discount to end. Must be in the future. - """ - type: Literal["duration", "timestamp"] - """ - The type of calculation made to determine when the discount ends. - """ - - class AmendParamsAmendmentItemActionSetDiscountDiscountEndDuration( - TypedDict, - ): - interval: Literal["day", "month", "week", "year"] - """ - Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. - """ - interval_count: int - """ - The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. - """ - - class AmendParamsAmendmentItemActionSetTrial(TypedDict): - converts_to: NotRequired[List[str]] - """ - List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. - """ - type: Literal["free", "paid"] - """ - Determines the type of trial for this item. - """ - - class AmendParamsAmendmentMetadataAction(TypedDict): - add: NotRequired[Dict[str, str]] - """ - Key-value pairs to add to schedule phase metadata. These values will merge with existing schedule phase metadata. - """ - remove: NotRequired[List[str]] - """ - Keys to remove from schedule phase metadata. - """ - set: NotRequired["Literal['']|Dict[str, str]"] - """ - Key-value pairs to set as schedule phase metadata. Existing schedule phase metadata will be overwritten. - """ - type: Literal["add", "remove", "set"] - """ - Select one of three ways to update phase-level `metadata` on subscription schedules. - """ - - class AmendParamsAmendmentSetPauseCollection(TypedDict): - set: NotRequired[ - "SubscriptionSchedule.AmendParamsAmendmentSetPauseCollectionSet" - ] - """ - Details of the pause_collection behavior to apply to the amendment. - """ - type: Literal["remove", "set"] - """ - Determines the type of the pause_collection amendment. - """ - - class AmendParamsAmendmentSetPauseCollectionSet(TypedDict): - behavior: Literal["keep_as_draft", "mark_uncollectible", "void"] - """ - The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. - """ - - class AmendParamsAmendmentTrialSettings(TypedDict): - end_behavior: NotRequired[ - "SubscriptionSchedule.AmendParamsAmendmentTrialSettingsEndBehavior" - ] - """ - Defines how the subscription should behave when a trial ends. - """ - - class AmendParamsAmendmentTrialSettingsEndBehavior(TypedDict): - prorate_up_front: NotRequired[Literal["defer", "include"]] - """ - Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`. - """ - - class AmendParamsPrebilling(TypedDict): - bill_from: NotRequired[ - "SubscriptionSchedule.AmendParamsPrebillingBillFrom" - ] - """ - The beginning of the prebilled time period. The default value is `now`. - """ - bill_until: NotRequired[ - "SubscriptionSchedule.AmendParamsPrebillingBillUntil" - ] - """ - The end of the prebilled time period. - """ - invoice_at: NotRequired[Literal["now"]] - """ - When the prebilling invoice should be created. The default value is `now`. - """ - update_behavior: NotRequired[Literal["prebill", "reset"]] - """ - Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`. - """ - - class AmendParamsPrebillingBillFrom(TypedDict): - amendment_start: NotRequired[ - "SubscriptionSchedule.AmendParamsPrebillingBillFromAmendmentStart" - ] - """ - Start the prebilled period when a specified amendment begins. - """ - timestamp: NotRequired[int] - """ - Start the prebilled period at a precise integer timestamp, starting from the Unix epoch. - """ - type: Literal["amendment_start", "now", "timestamp"] - """ - Select one of several ways to pass the `bill_from` value. - """ - - class AmendParamsPrebillingBillFromAmendmentStart(TypedDict): - index: int - """ - The position of the amendment in the `amendments` array with which prebilling should begin. Indexes start from 0 and must be less than the total number of supplied amendments. - """ - - class AmendParamsPrebillingBillUntil(TypedDict): - amendment_end: NotRequired[ - "SubscriptionSchedule.AmendParamsPrebillingBillUntilAmendmentEnd" - ] - """ - End the prebilled period when a specified amendment ends. - """ - duration: NotRequired[ - "SubscriptionSchedule.AmendParamsPrebillingBillUntilDuration" - ] - """ - Time span for prebilling, starting from `bill_from`. - """ - timestamp: NotRequired[int] - """ - End the prebilled period at a precise integer timestamp, starting from the Unix epoch. - """ - type: Literal["amendment_end", "duration", "schedule_end", "timestamp"] - """ - Select one of several ways to pass the `bill_until` value. - """ - - class AmendParamsPrebillingBillUntilAmendmentEnd(TypedDict): - index: int - """ - The position of the amendment in the `amendments` array at which prebilling should end. Indexes start from 0 and must be less than the total number of supplied amendments. - """ - - class AmendParamsPrebillingBillUntilDuration(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. - """ - interval_count: int - """ - The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. - """ - - class AmendParamsScheduleSettings(TypedDict): - end_behavior: NotRequired[Literal["cancel", "release"]] - """ - Behavior of the subscription schedule and underlying subscription when it ends. - """ - - class CancelParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - invoice_now: NotRequired[bool] - """ - If the subscription schedule is `active`, indicates if a final invoice will be generated that contains any un-invoiced metered usage and new/pending proration invoice items. Defaults to `true`. - """ - prorate: NotRequired[bool] - """ - If the subscription schedule is `active`, indicates if the cancellation should be prorated. Defaults to `true`. - """ - - class CreateParams(RequestOptions): - billing_behavior: NotRequired[ - Literal["prorate_on_next_phase", "prorate_up_front"] - ] - """ - Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front. - """ - billing_mode: NotRequired[ - "SubscriptionSchedule.CreateParamsBillingMode" - ] - """ - Controls how prorations and invoices for subscriptions are calculated and orchestrated. - """ - customer: NotRequired[str] - """ - The identifier of the customer to create the subscription schedule for. - """ - customer_account: NotRequired[str] - """ - The identifier of the account to create the subscription schedule for. - """ - default_settings: NotRequired[ - "SubscriptionSchedule.CreateParamsDefaultSettings" - ] - """ - Object representing the subscription schedule's default settings. - """ - end_behavior: NotRequired[ - Literal["cancel", "none", "release", "renew"] - ] - """ - Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running. `cancel` will end the subscription schedule and cancel the underlying subscription. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - from_subscription: NotRequired[str] - """ - Migrate an existing subscription to be managed by a subscription schedule. If this parameter is set, a subscription schedule will be created using the subscription's item(s), set to auto-renew using the subscription's interval. When using this parameter, other parameters (such as phase values) cannot be set. To create a subscription schedule with other modifications, we recommend making two separate API calls. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - phases: NotRequired[List["SubscriptionSchedule.CreateParamsPhase"]] - """ - List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase. - """ - prebilling: NotRequired["SubscriptionSchedule.CreateParamsPrebilling"] - """ - If specified, the invoicing for the given billing cycle iterations will be processed now. - """ - start_date: NotRequired["int|Literal['now']"] - """ - When the subscription schedule starts. We recommend using `now` so that it starts the subscription immediately. You can also use a Unix timestamp to backdate the subscription so that it starts on a past date, or set a future date for the subscription to start on. - """ - - class CreateParamsBillingMode(TypedDict): - flexible: NotRequired[ - "SubscriptionSchedule.CreateParamsBillingModeFlexible" - ] - """ - Configure behavior for flexible billing mode. - """ - type: Literal["classic", "flexible"] - """ - Controls the calculation and orchestration of prorations and invoices for subscriptions. If no value is passed, the default is `flexible`. - """ - - class CreateParamsBillingModeFlexible(TypedDict): - proration_discounts: NotRequired[Literal["included", "itemized"]] - """ - Controls how invoices and invoice items display proration amounts and discount amounts. - """ - - class CreateParamsDefaultSettings(TypedDict): - application_fee_percent: NotRequired[float] - """ - A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). - """ - automatic_tax: NotRequired[ - "SubscriptionSchedule.CreateParamsDefaultSettingsAutomaticTax" - ] - """ - Default settings for automatic tax computation. - """ - billing_cycle_anchor: NotRequired[Literal["automatic", "phase_start"]] - """ - Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). - """ - billing_thresholds: NotRequired[ - "Literal['']|SubscriptionSchedule.CreateParamsDefaultSettingsBillingThresholds" - ] - """ - Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. - """ - collection_method: NotRequired[ - Literal["charge_automatically", "send_invoice"] - ] - """ - Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically` on creation. - """ - default_payment_method: NotRequired[str] - """ - ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings. - """ - description: NotRequired["Literal['']|str"] - """ - Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. - """ - invoice_settings: NotRequired[ - "SubscriptionSchedule.CreateParamsDefaultSettingsInvoiceSettings" - ] - """ - All invoices will be billed using the specified settings. - """ - on_behalf_of: NotRequired["Literal['']|str"] - """ - The account on behalf of which to charge, for each of the associated subscription's invoices. - """ - transfer_data: NotRequired[ - "Literal['']|SubscriptionSchedule.CreateParamsDefaultSettingsTransferData" - ] - """ - The data with which to automatically create a Transfer for each of the associated subscription's invoices. - """ - - class CreateParamsDefaultSettingsAutomaticTax(TypedDict): - enabled: bool - """ - Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription. - """ - liability: NotRequired[ - "SubscriptionSchedule.CreateParamsDefaultSettingsAutomaticTaxLiability" - ] - """ - The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. - """ - - class CreateParamsDefaultSettingsAutomaticTaxLiability(TypedDict): - account: NotRequired[str] - """ - The connected account being referenced when `type` is `account`. - """ - type: Literal["account", "self"] - """ - Type of the account referenced in the request. - """ - - class CreateParamsDefaultSettingsBillingThresholds(TypedDict): - amount_gte: NotRequired[int] - """ - Monetary threshold that triggers the subscription to advance to a new billing period - """ - reset_billing_cycle_anchor: NotRequired[bool] - """ - Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. - """ - - class CreateParamsDefaultSettingsInvoiceSettings(TypedDict): - account_tax_ids: NotRequired["Literal['']|List[str]"] - """ - The account tax IDs associated with the subscription schedule. Will be set on invoices generated by the subscription schedule. - """ - days_until_due: NotRequired[int] - """ - Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `collection_method=charge_automatically`. - """ - issuer: NotRequired[ - "SubscriptionSchedule.CreateParamsDefaultSettingsInvoiceSettingsIssuer" - ] - """ - The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. - """ - - class CreateParamsDefaultSettingsInvoiceSettingsIssuer(TypedDict): - account: NotRequired[str] - """ - The connected account being referenced when `type` is `account`. - """ - type: Literal["account", "self"] - """ - Type of the account referenced in the request. - """ - - class CreateParamsDefaultSettingsTransferData(TypedDict): - amount_percent: NotRequired[float] - """ - A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. - """ - destination: str - """ - ID of an existing, connected Stripe account. - """ - - class CreateParamsPhase(TypedDict): - add_invoice_items: NotRequired[ - List["SubscriptionSchedule.CreateParamsPhaseAddInvoiceItem"] - ] - """ - A list of prices and quantities that will generate invoice items appended to the next invoice for this phase. You may pass up to 20 items. - """ - application_fee_percent: NotRequired[float] - """ - A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). - """ - automatic_tax: NotRequired[ - "SubscriptionSchedule.CreateParamsPhaseAutomaticTax" - ] - """ - Automatic tax settings for this phase. - """ - billing_cycle_anchor: NotRequired[Literal["automatic", "phase_start"]] - """ - Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). - """ - billing_thresholds: NotRequired[ - "Literal['']|SubscriptionSchedule.CreateParamsPhaseBillingThresholds" - ] - """ - Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. - """ - collection_method: NotRequired[ - Literal["charge_automatically", "send_invoice"] - ] - """ - Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically` on creation. - """ - currency: NotRequired[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). - """ - default_payment_method: NotRequired[str] - """ - ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings. - """ - default_tax_rates: NotRequired["Literal['']|List[str]"] - """ - A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will set the Subscription's [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates), which means they will be the Invoice's [`default_tax_rates`](https://stripe.com/docs/api/invoices/create#create_invoice-default_tax_rates) for any Invoices issued by the Subscription during this Phase. - """ - description: NotRequired["Literal['']|str"] - """ - Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. - """ - discounts: NotRequired[ - "Literal['']|List[SubscriptionSchedule.CreateParamsPhaseDiscount]" - ] - """ - The coupons to redeem into discounts for the schedule phase. If not specified, inherits the discount from the subscription's customer. Pass an empty string to avoid inheriting any discounts. - """ - duration: NotRequired["SubscriptionSchedule.CreateParamsPhaseDuration"] - """ - The number of intervals the phase should last. If set, `end_date` must not be set. - """ - end_date: NotRequired[int] - """ - The date at which this phase of the subscription schedule ends. If set, `iterations` must not be set. - """ - invoice_settings: NotRequired[ - "SubscriptionSchedule.CreateParamsPhaseInvoiceSettings" - ] - """ - All invoices will be billed using the specified settings. - """ - items: List["SubscriptionSchedule.CreateParamsPhaseItem"] - """ - List of configuration items, each with an attached price, to apply during this phase of the subscription schedule. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a phase. Metadata on a schedule's phase will update the underlying subscription's `metadata` when the phase is entered, adding new keys and replacing existing keys in the subscription's `metadata`. Individual keys in the subscription's `metadata` can be unset by posting an empty value to them in the phase's `metadata`. To unset all keys in the subscription's `metadata`, update the subscription directly or unset every key individually from the phase's `metadata`. - """ - on_behalf_of: NotRequired[str] - """ - The account on behalf of which to charge, for each of the associated subscription's invoices. - """ - pause_collection: NotRequired[ - "SubscriptionSchedule.CreateParamsPhasePauseCollection" - ] - """ - If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment). - """ - proration_behavior: NotRequired[ - Literal["always_invoice", "create_prorations", "none"] - ] - """ - Controls whether the subscription schedule should create [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when transitioning to this phase if there is a difference in billing configuration. It's different from the request-level [proration_behavior](https://stripe.com/docs/api/subscription_schedules/update#update_subscription_schedule-proration_behavior) parameter which controls what happens if the update request affects the billing configuration (item price, quantity, etc.) of the current phase. - """ - transfer_data: NotRequired[ - "SubscriptionSchedule.CreateParamsPhaseTransferData" - ] - """ - The data with which to automatically create a Transfer for each of the associated subscription's invoices. - """ - trial: NotRequired[bool] - """ - If set to true the entire phase is counted as a trial and the customer will not be charged for any fees. - """ - trial_continuation: NotRequired[Literal["continue", "none"]] - """ - Specify trial behavior when crossing phase boundaries - """ - trial_end: NotRequired[int] - """ - Sets the phase to trialing from the start date to this date. Must be before the phase end date, can not be combined with `trial` - """ - trial_settings: NotRequired[ - "SubscriptionSchedule.CreateParamsPhaseTrialSettings" - ] - """ - Settings related to subscription trials. - """ - - class CreateParamsPhaseAddInvoiceItem(TypedDict): - discounts: NotRequired[ - List[ - "SubscriptionSchedule.CreateParamsPhaseAddInvoiceItemDiscount" - ] - ] - """ - The coupons to redeem into discounts for the item. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - period: NotRequired[ - "SubscriptionSchedule.CreateParamsPhaseAddInvoiceItemPeriod" - ] - """ - The period associated with this invoice item. If not set, `period.start.type` defaults to `max_item_period_start` and `period.end.type` defaults to `min_item_period_end`. - """ - price: NotRequired[str] - """ - The ID of the price object. One of `price` or `price_data` is required. - """ - price_data: NotRequired[ - "SubscriptionSchedule.CreateParamsPhaseAddInvoiceItemPriceData" - ] - """ - Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. - """ - quantity: NotRequired[int] - """ - Quantity for this item. Defaults to 1. - """ - tax_rates: NotRequired["Literal['']|List[str]"] - """ - The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item. - """ - - class CreateParamsPhaseAddInvoiceItemDiscount(TypedDict): - coupon: NotRequired[str] - """ - ID of the coupon to create a new discount for. - """ - discount: NotRequired[str] - """ - ID of an existing discount on the object (or one of its ancestors) to reuse. - """ - discount_end: NotRequired[ - "SubscriptionSchedule.CreateParamsPhaseAddInvoiceItemDiscountDiscountEnd" - ] - """ - Details to determine how long the discount should be applied for. - """ - promotion_code: NotRequired[str] - """ - ID of the promotion code to create a new discount for. - """ - - class CreateParamsPhaseAddInvoiceItemDiscountDiscountEnd(TypedDict): - duration: NotRequired[ - "SubscriptionSchedule.CreateParamsPhaseAddInvoiceItemDiscountDiscountEndDuration" - ] - """ - Time span for the redeemed discount. - """ - timestamp: NotRequired[int] - """ - A precise Unix timestamp for the discount to end. Must be in the future. - """ - type: Literal["duration", "timestamp"] - """ - The type of calculation made to determine when the discount ends. - """ - - class CreateParamsPhaseAddInvoiceItemDiscountDiscountEndDuration( - TypedDict - ): - interval: Literal["day", "month", "week", "year"] - """ - Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. - """ - interval_count: int - """ - The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. - """ - - class CreateParamsPhaseAddInvoiceItemPeriod(TypedDict): - end: "SubscriptionSchedule.CreateParamsPhaseAddInvoiceItemPeriodEnd" - """ - End of the invoice item period. - """ - start: ( - "SubscriptionSchedule.CreateParamsPhaseAddInvoiceItemPeriodStart" - ) - """ - Start of the invoice item period. - """ - - class CreateParamsPhaseAddInvoiceItemPeriodEnd(TypedDict): - timestamp: NotRequired[int] - """ - A precise Unix timestamp for the end of the invoice item period. Must be greater than or equal to `period.start`. - """ - type: Literal["min_item_period_end", "phase_end", "timestamp"] - """ - Select how to calculate the end of the invoice item period. - """ - - class CreateParamsPhaseAddInvoiceItemPeriodStart(TypedDict): - timestamp: NotRequired[int] - """ - A precise Unix timestamp for the start of the invoice item period. Must be less than or equal to `period.end`. - """ - type: Literal["max_item_period_start", "phase_start", "timestamp"] - """ - Select how to calculate the start of the invoice item period. - """ - - class CreateParamsPhaseAddInvoiceItemPriceData(TypedDict): - 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). - """ - product: str - """ - The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to. - """ - tax_behavior: NotRequired[ - Literal["exclusive", "inclusive", "unspecified"] - ] - """ - Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. - """ - unit_amount: NotRequired[int] - """ - A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge or a negative integer representing the amount to credit to the customer. - """ - unit_amount_decimal: NotRequired[str] - """ - Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - """ - - class CreateParamsPhaseAutomaticTax(TypedDict): - enabled: bool - """ - Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription. - """ - liability: NotRequired[ - "SubscriptionSchedule.CreateParamsPhaseAutomaticTaxLiability" - ] - """ - The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. - """ - - class CreateParamsPhaseAutomaticTaxLiability(TypedDict): - account: NotRequired[str] - """ - The connected account being referenced when `type` is `account`. - """ - type: Literal["account", "self"] - """ - Type of the account referenced in the request. - """ - - class CreateParamsPhaseBillingThresholds(TypedDict): - amount_gte: NotRequired[int] - """ - Monetary threshold that triggers the subscription to advance to a new billing period - """ - reset_billing_cycle_anchor: NotRequired[bool] - """ - Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. - """ - - class CreateParamsPhaseDiscount(TypedDict): - coupon: NotRequired[str] - """ - ID of the coupon to create a new discount for. - """ - discount: NotRequired[str] - """ - ID of an existing discount on the object (or one of its ancestors) to reuse. - """ - discount_end: NotRequired[ - "SubscriptionSchedule.CreateParamsPhaseDiscountDiscountEnd" - ] - """ - Details to determine how long the discount should be applied for. - """ - promotion_code: NotRequired[str] - """ - ID of the promotion code to create a new discount for. - """ - - class CreateParamsPhaseDiscountDiscountEnd(TypedDict): - duration: NotRequired[ - "SubscriptionSchedule.CreateParamsPhaseDiscountDiscountEndDuration" - ] - """ - Time span for the redeemed discount. - """ - timestamp: NotRequired[int] - """ - A precise Unix timestamp for the discount to end. Must be in the future. - """ - type: Literal["duration", "timestamp"] - """ - The type of calculation made to determine when the discount ends. - """ - - class CreateParamsPhaseDiscountDiscountEndDuration(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. - """ - interval_count: int - """ - The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. - """ - - class CreateParamsPhaseDuration(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Specifies phase duration. Either `day`, `week`, `month` or `year`. - """ - interval_count: NotRequired[int] - """ - The multiplier applied to the interval. - """ - - class CreateParamsPhaseInvoiceSettings(TypedDict): - account_tax_ids: NotRequired["Literal['']|List[str]"] - """ - The account tax IDs associated with this phase of the subscription schedule. Will be set on invoices generated by this phase of the subscription schedule. - """ - days_until_due: NotRequired[int] - """ - Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `billing=charge_automatically`. - """ - issuer: NotRequired[ - "SubscriptionSchedule.CreateParamsPhaseInvoiceSettingsIssuer" - ] - """ - The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. - """ - - class CreateParamsPhaseInvoiceSettingsIssuer(TypedDict): - account: NotRequired[str] - """ - The connected account being referenced when `type` is `account`. - """ - type: Literal["account", "self"] - """ - Type of the account referenced in the request. - """ - - class CreateParamsPhaseItem(TypedDict): - billing_thresholds: NotRequired[ - "Literal['']|SubscriptionSchedule.CreateParamsPhaseItemBillingThresholds" - ] - """ - Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. - """ - discounts: NotRequired[ - "Literal['']|List[SubscriptionSchedule.CreateParamsPhaseItemDiscount]" - ] - """ - The coupons to redeem into discounts for the subscription item. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a configuration item. Metadata on a configuration item will update the underlying subscription item's `metadata` when the phase is entered, adding new keys and replacing existing keys. Individual keys in the subscription item's `metadata` can be unset by posting an empty value to them in the configuration item's `metadata`. To unset all keys in the subscription item's `metadata`, update the subscription item directly or unset every key individually from the configuration item's `metadata`. - """ - plan: NotRequired[str] - """ - The plan ID to subscribe to. You may specify the same ID in `plan` and `price`. - """ - price: NotRequired[str] - """ - The ID of the price object. - """ - price_data: NotRequired[ - "SubscriptionSchedule.CreateParamsPhaseItemPriceData" - ] - """ - Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. - """ - quantity: NotRequired[int] - """ - Quantity for the given price. Can be set only if the price's `usage_type` is `licensed` and not `metered`. - """ - tax_rates: NotRequired["Literal['']|List[str]"] - """ - A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. - """ - trial: NotRequired["SubscriptionSchedule.CreateParamsPhaseItemTrial"] - """ - Options that configure the trial on the subscription item. - """ - - class CreateParamsPhaseItemBillingThresholds(TypedDict): - usage_gte: int - """ - Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)) - """ - - class CreateParamsPhaseItemDiscount(TypedDict): - coupon: NotRequired[str] - """ - ID of the coupon to create a new discount for. - """ - discount: NotRequired[str] - """ - ID of an existing discount on the object (or one of its ancestors) to reuse. - """ - discount_end: NotRequired[ - "SubscriptionSchedule.CreateParamsPhaseItemDiscountDiscountEnd" - ] - """ - Details to determine how long the discount should be applied for. - """ - promotion_code: NotRequired[str] - """ - ID of the promotion code to create a new discount for. - """ - - class CreateParamsPhaseItemDiscountDiscountEnd(TypedDict): - duration: NotRequired[ - "SubscriptionSchedule.CreateParamsPhaseItemDiscountDiscountEndDuration" - ] - """ - Time span for the redeemed discount. - """ - timestamp: NotRequired[int] - """ - A precise Unix timestamp for the discount to end. Must be in the future. - """ - type: Literal["duration", "timestamp"] - """ - The type of calculation made to determine when the discount ends. - """ - - class CreateParamsPhaseItemDiscountDiscountEndDuration(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. - """ - interval_count: int - """ - The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. - """ - - class CreateParamsPhaseItemPriceData(TypedDict): - 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). - """ - product: str - """ - The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to. - """ - recurring: ( - "SubscriptionSchedule.CreateParamsPhaseItemPriceDataRecurring" - ) - """ - The recurring components of a price such as `interval` and `interval_count`. - """ - tax_behavior: NotRequired[ - Literal["exclusive", "inclusive", "unspecified"] - ] - """ - Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. - """ - unit_amount: NotRequired[int] - """ - A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. - """ - unit_amount_decimal: NotRequired[str] - """ - Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - """ - - class CreateParamsPhaseItemPriceDataRecurring(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Specifies billing frequency. Either `day`, `week`, `month` or `year`. - """ - interval_count: NotRequired[int] - """ - The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). - """ - - class CreateParamsPhaseItemTrial(TypedDict): - converts_to: NotRequired[List[str]] - """ - List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. - """ - type: Literal["free", "paid"] - """ - Determines the type of trial for this item. - """ - - class CreateParamsPhasePauseCollection(TypedDict): - behavior: Literal["keep_as_draft", "mark_uncollectible", "void"] - """ - The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. - """ - - class CreateParamsPhaseTransferData(TypedDict): - amount_percent: NotRequired[float] - """ - A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. - """ - destination: str - """ - ID of an existing, connected Stripe account. - """ - - class CreateParamsPhaseTrialSettings(TypedDict): - end_behavior: NotRequired[ - "SubscriptionSchedule.CreateParamsPhaseTrialSettingsEndBehavior" - ] - """ - Defines how the subscription should behave when a trial ends. - """ - - class CreateParamsPhaseTrialSettingsEndBehavior(TypedDict): - prorate_up_front: NotRequired[Literal["defer", "include"]] - """ - Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`. - """ - - class CreateParamsPrebilling(TypedDict): - iterations: int - """ - This is used to determine the number of billing cycles to prebill. - """ - update_behavior: NotRequired[Literal["prebill", "reset"]] - """ - Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`. - """ - - class ListParams(RequestOptions): - canceled_at: NotRequired[ - "SubscriptionSchedule.ListParamsCanceledAt|int" - ] - """ - Only return subscription schedules that were created canceled the given date interval. - """ - completed_at: NotRequired[ - "SubscriptionSchedule.ListParamsCompletedAt|int" - ] - """ - Only return subscription schedules that completed during the given date interval. - """ - created: NotRequired["SubscriptionSchedule.ListParamsCreated|int"] - """ - Only return subscription schedules that were created during the given date interval. - """ - customer: NotRequired[str] - """ - Only return subscription schedules for the given customer. - """ - customer_account: NotRequired[str] - """ - Only return subscription schedules for the given account. - """ - 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. - """ - released_at: NotRequired[ - "SubscriptionSchedule.ListParamsReleasedAt|int" - ] - """ - Only return subscription schedules that were released during the given date interval. - """ - scheduled: NotRequired[bool] - """ - Only return subscription schedules that have not started yet. - """ - 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 ListParamsCanceledAt(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) - """ - - class ListParamsCompletedAt(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) - """ - - class ListParamsCreated(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) - """ - - class ListParamsReleasedAt(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) - """ - - class ModifyParams(RequestOptions): - billing_behavior: NotRequired[ - Literal["prorate_on_next_phase", "prorate_up_front"] - ] - """ - Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front. - """ - default_settings: NotRequired[ - "SubscriptionSchedule.ModifyParamsDefaultSettings" - ] - """ - Object representing the subscription schedule's default settings. - """ - end_behavior: NotRequired[ - Literal["cancel", "none", "release", "renew"] - ] - """ - Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running. `cancel` will end the subscription schedule and cancel the underlying subscription. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - phases: NotRequired[List["SubscriptionSchedule.ModifyParamsPhase"]] - """ - List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase. Note that past phases can be omitted. - """ - prebilling: NotRequired["SubscriptionSchedule.ModifyParamsPrebilling"] - """ - If specified, the invoicing for the given billing cycle iterations will be processed now. - """ - proration_behavior: NotRequired[ - Literal["always_invoice", "create_prorations", "none"] - ] - """ - If the update changes the billing configuration (item price, quantity, etc.) of the current phase, indicates how prorations from this change should be handled. The default value is `create_prorations`. - """ - - class ModifyParamsDefaultSettings(TypedDict): - application_fee_percent: NotRequired[float] - """ - A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). - """ - automatic_tax: NotRequired[ - "SubscriptionSchedule.ModifyParamsDefaultSettingsAutomaticTax" - ] - """ - Default settings for automatic tax computation. - """ - billing_cycle_anchor: NotRequired[Literal["automatic", "phase_start"]] - """ - Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). - """ - billing_thresholds: NotRequired[ - "Literal['']|SubscriptionSchedule.ModifyParamsDefaultSettingsBillingThresholds" - ] - """ - Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. - """ - collection_method: NotRequired[ - Literal["charge_automatically", "send_invoice"] - ] - """ - Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically` on creation. - """ - default_payment_method: NotRequired[str] - """ - ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings. - """ - description: NotRequired["Literal['']|str"] - """ - Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. - """ - invoice_settings: NotRequired[ - "SubscriptionSchedule.ModifyParamsDefaultSettingsInvoiceSettings" - ] - """ - All invoices will be billed using the specified settings. - """ - on_behalf_of: NotRequired["Literal['']|str"] - """ - The account on behalf of which to charge, for each of the associated subscription's invoices. - """ - transfer_data: NotRequired[ - "Literal['']|SubscriptionSchedule.ModifyParamsDefaultSettingsTransferData" - ] - """ - The data with which to automatically create a Transfer for each of the associated subscription's invoices. - """ - - class ModifyParamsDefaultSettingsAutomaticTax(TypedDict): - enabled: bool - """ - Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription. - """ - liability: NotRequired[ - "SubscriptionSchedule.ModifyParamsDefaultSettingsAutomaticTaxLiability" - ] - """ - The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. - """ - - class ModifyParamsDefaultSettingsAutomaticTaxLiability(TypedDict): - account: NotRequired[str] - """ - The connected account being referenced when `type` is `account`. - """ - type: Literal["account", "self"] - """ - Type of the account referenced in the request. - """ - - class ModifyParamsDefaultSettingsBillingThresholds(TypedDict): - amount_gte: NotRequired[int] - """ - Monetary threshold that triggers the subscription to advance to a new billing period - """ - reset_billing_cycle_anchor: NotRequired[bool] - """ - Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. - """ - - class ModifyParamsDefaultSettingsInvoiceSettings(TypedDict): - account_tax_ids: NotRequired["Literal['']|List[str]"] - """ - The account tax IDs associated with the subscription schedule. Will be set on invoices generated by the subscription schedule. - """ - days_until_due: NotRequired[int] - """ - Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `collection_method=charge_automatically`. - """ - issuer: NotRequired[ - "SubscriptionSchedule.ModifyParamsDefaultSettingsInvoiceSettingsIssuer" - ] - """ - The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. - """ - - class ModifyParamsDefaultSettingsInvoiceSettingsIssuer(TypedDict): - account: NotRequired[str] - """ - The connected account being referenced when `type` is `account`. - """ - type: Literal["account", "self"] - """ - Type of the account referenced in the request. - """ - - class ModifyParamsDefaultSettingsTransferData(TypedDict): - amount_percent: NotRequired[float] - """ - A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. - """ - destination: str - """ - ID of an existing, connected Stripe account. - """ - - class ModifyParamsPhase(TypedDict): - add_invoice_items: NotRequired[ - List["SubscriptionSchedule.ModifyParamsPhaseAddInvoiceItem"] - ] - """ - A list of prices and quantities that will generate invoice items appended to the next invoice for this phase. You may pass up to 20 items. - """ - application_fee_percent: NotRequired[float] - """ - A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). - """ - automatic_tax: NotRequired[ - "SubscriptionSchedule.ModifyParamsPhaseAutomaticTax" - ] - """ - Automatic tax settings for this phase. - """ - billing_cycle_anchor: NotRequired[Literal["automatic", "phase_start"]] - """ - Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). - """ - billing_thresholds: NotRequired[ - "Literal['']|SubscriptionSchedule.ModifyParamsPhaseBillingThresholds" - ] - """ - Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. - """ - collection_method: NotRequired[ - Literal["charge_automatically", "send_invoice"] - ] - """ - Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically` on creation. - """ - currency: NotRequired[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). - """ - default_payment_method: NotRequired[str] - """ - ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings. - """ - default_tax_rates: NotRequired["Literal['']|List[str]"] - """ - A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will set the Subscription's [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates), which means they will be the Invoice's [`default_tax_rates`](https://stripe.com/docs/api/invoices/create#create_invoice-default_tax_rates) for any Invoices issued by the Subscription during this Phase. - """ - description: NotRequired["Literal['']|str"] - """ - Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. - """ - discounts: NotRequired[ - "Literal['']|List[SubscriptionSchedule.ModifyParamsPhaseDiscount]" - ] - """ - The coupons to redeem into discounts for the schedule phase. If not specified, inherits the discount from the subscription's customer. Pass an empty string to avoid inheriting any discounts. - """ - duration: NotRequired["SubscriptionSchedule.ModifyParamsPhaseDuration"] - """ - The number of intervals the phase should last. If set, `end_date` must not be set. - """ - end_date: NotRequired["int|Literal['now']"] - """ - The date at which this phase of the subscription schedule ends. If set, `iterations` must not be set. - """ - invoice_settings: NotRequired[ - "SubscriptionSchedule.ModifyParamsPhaseInvoiceSettings" - ] - """ - All invoices will be billed using the specified settings. - """ - items: List["SubscriptionSchedule.ModifyParamsPhaseItem"] - """ - List of configuration items, each with an attached price, to apply during this phase of the subscription schedule. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a phase. Metadata on a schedule's phase will update the underlying subscription's `metadata` when the phase is entered, adding new keys and replacing existing keys in the subscription's `metadata`. Individual keys in the subscription's `metadata` can be unset by posting an empty value to them in the phase's `metadata`. To unset all keys in the subscription's `metadata`, update the subscription directly or unset every key individually from the phase's `metadata`. - """ - on_behalf_of: NotRequired[str] - """ - The account on behalf of which to charge, for each of the associated subscription's invoices. - """ - pause_collection: NotRequired[ - "SubscriptionSchedule.ModifyParamsPhasePauseCollection" - ] - """ - If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment). - """ - proration_behavior: NotRequired[ - Literal["always_invoice", "create_prorations", "none"] - ] - """ - Controls whether the subscription schedule should create [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when transitioning to this phase if there is a difference in billing configuration. It's different from the request-level [proration_behavior](https://stripe.com/docs/api/subscription_schedules/update#update_subscription_schedule-proration_behavior) parameter which controls what happens if the update request affects the billing configuration (item price, quantity, etc.) of the current phase. - """ - start_date: NotRequired["int|Literal['now']"] - """ - The date at which this phase of the subscription schedule starts or `now`. Must be set on the first phase. - """ - transfer_data: NotRequired[ - "SubscriptionSchedule.ModifyParamsPhaseTransferData" - ] - """ - The data with which to automatically create a Transfer for each of the associated subscription's invoices. - """ - trial: NotRequired[bool] - """ - If set to true the entire phase is counted as a trial and the customer will not be charged for any fees. - """ - trial_continuation: NotRequired[Literal["continue", "none"]] - """ - Specify trial behavior when crossing phase boundaries - """ - trial_end: NotRequired["int|Literal['now']"] - """ - Sets the phase to trialing from the start date to this date. Must be before the phase end date, can not be combined with `trial` - """ - trial_settings: NotRequired[ - "SubscriptionSchedule.ModifyParamsPhaseTrialSettings" - ] - """ - Settings related to subscription trials. - """ - - class ModifyParamsPhaseAddInvoiceItem(TypedDict): - discounts: NotRequired[ - List[ - "SubscriptionSchedule.ModifyParamsPhaseAddInvoiceItemDiscount" - ] - ] - """ - The coupons to redeem into discounts for the item. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - period: NotRequired[ - "SubscriptionSchedule.ModifyParamsPhaseAddInvoiceItemPeriod" - ] - """ - The period associated with this invoice item. If not set, `period.start.type` defaults to `max_item_period_start` and `period.end.type` defaults to `min_item_period_end`. - """ - price: NotRequired[str] - """ - The ID of the price object. One of `price` or `price_data` is required. - """ - price_data: NotRequired[ - "SubscriptionSchedule.ModifyParamsPhaseAddInvoiceItemPriceData" - ] - """ - Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. - """ - quantity: NotRequired[int] - """ - Quantity for this item. Defaults to 1. - """ - tax_rates: NotRequired["Literal['']|List[str]"] - """ - The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item. - """ - - class ModifyParamsPhaseAddInvoiceItemDiscount(TypedDict): - coupon: NotRequired[str] - """ - ID of the coupon to create a new discount for. - """ - discount: NotRequired[str] - """ - ID of an existing discount on the object (or one of its ancestors) to reuse. - """ - discount_end: NotRequired[ - "SubscriptionSchedule.ModifyParamsPhaseAddInvoiceItemDiscountDiscountEnd" - ] - """ - Details to determine how long the discount should be applied for. - """ - promotion_code: NotRequired[str] - """ - ID of the promotion code to create a new discount for. - """ - - class ModifyParamsPhaseAddInvoiceItemDiscountDiscountEnd(TypedDict): - duration: NotRequired[ - "SubscriptionSchedule.ModifyParamsPhaseAddInvoiceItemDiscountDiscountEndDuration" - ] - """ - Time span for the redeemed discount. - """ - timestamp: NotRequired[int] - """ - A precise Unix timestamp for the discount to end. Must be in the future. - """ - type: Literal["duration", "timestamp"] - """ - The type of calculation made to determine when the discount ends. - """ - - class ModifyParamsPhaseAddInvoiceItemDiscountDiscountEndDuration( - TypedDict - ): - interval: Literal["day", "month", "week", "year"] - """ - Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. - """ - interval_count: int - """ - The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. - """ - - class ModifyParamsPhaseAddInvoiceItemPeriod(TypedDict): - end: "SubscriptionSchedule.ModifyParamsPhaseAddInvoiceItemPeriodEnd" - """ - End of the invoice item period. - """ - start: ( - "SubscriptionSchedule.ModifyParamsPhaseAddInvoiceItemPeriodStart" - ) - """ - Start of the invoice item period. - """ - - class ModifyParamsPhaseAddInvoiceItemPeriodEnd(TypedDict): - timestamp: NotRequired[int] - """ - A precise Unix timestamp for the end of the invoice item period. Must be greater than or equal to `period.start`. - """ - type: Literal["min_item_period_end", "phase_end", "timestamp"] - """ - Select how to calculate the end of the invoice item period. - """ - - class ModifyParamsPhaseAddInvoiceItemPeriodStart(TypedDict): - timestamp: NotRequired[int] - """ - A precise Unix timestamp for the start of the invoice item period. Must be less than or equal to `period.end`. - """ - type: Literal["max_item_period_start", "phase_start", "timestamp"] - """ - Select how to calculate the start of the invoice item period. - """ - - class ModifyParamsPhaseAddInvoiceItemPriceData(TypedDict): - 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). - """ - product: str - """ - The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to. - """ - tax_behavior: NotRequired[ - Literal["exclusive", "inclusive", "unspecified"] - ] - """ - Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. - """ - unit_amount: NotRequired[int] - """ - A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge or a negative integer representing the amount to credit to the customer. - """ - unit_amount_decimal: NotRequired[str] - """ - Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - """ - - class ModifyParamsPhaseAutomaticTax(TypedDict): - enabled: bool - """ - Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription. - """ - liability: NotRequired[ - "SubscriptionSchedule.ModifyParamsPhaseAutomaticTaxLiability" - ] - """ - The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. - """ - - class ModifyParamsPhaseAutomaticTaxLiability(TypedDict): - account: NotRequired[str] - """ - The connected account being referenced when `type` is `account`. - """ - type: Literal["account", "self"] - """ - Type of the account referenced in the request. - """ - - class ModifyParamsPhaseBillingThresholds(TypedDict): - amount_gte: NotRequired[int] - """ - Monetary threshold that triggers the subscription to advance to a new billing period - """ - reset_billing_cycle_anchor: NotRequired[bool] - """ - Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. - """ - - class ModifyParamsPhaseDiscount(TypedDict): - coupon: NotRequired[str] - """ - ID of the coupon to create a new discount for. - """ - discount: NotRequired[str] - """ - ID of an existing discount on the object (or one of its ancestors) to reuse. - """ - discount_end: NotRequired[ - "SubscriptionSchedule.ModifyParamsPhaseDiscountDiscountEnd" - ] - """ - Details to determine how long the discount should be applied for. - """ - promotion_code: NotRequired[str] - """ - ID of the promotion code to create a new discount for. - """ - - class ModifyParamsPhaseDiscountDiscountEnd(TypedDict): - duration: NotRequired[ - "SubscriptionSchedule.ModifyParamsPhaseDiscountDiscountEndDuration" - ] - """ - Time span for the redeemed discount. - """ - timestamp: NotRequired[int] - """ - A precise Unix timestamp for the discount to end. Must be in the future. - """ - type: Literal["duration", "timestamp"] - """ - The type of calculation made to determine when the discount ends. - """ - - class ModifyParamsPhaseDiscountDiscountEndDuration(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. - """ - interval_count: int - """ - The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. - """ - - class ModifyParamsPhaseDuration(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Specifies phase duration. Either `day`, `week`, `month` or `year`. - """ - interval_count: NotRequired[int] - """ - The multiplier applied to the interval. - """ - - class ModifyParamsPhaseInvoiceSettings(TypedDict): - account_tax_ids: NotRequired["Literal['']|List[str]"] - """ - The account tax IDs associated with this phase of the subscription schedule. Will be set on invoices generated by this phase of the subscription schedule. - """ - days_until_due: NotRequired[int] - """ - Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `billing=charge_automatically`. - """ - issuer: NotRequired[ - "SubscriptionSchedule.ModifyParamsPhaseInvoiceSettingsIssuer" - ] - """ - The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. - """ - - class ModifyParamsPhaseInvoiceSettingsIssuer(TypedDict): - account: NotRequired[str] - """ - The connected account being referenced when `type` is `account`. - """ - type: Literal["account", "self"] - """ - Type of the account referenced in the request. - """ - - class ModifyParamsPhaseItem(TypedDict): - billing_thresholds: NotRequired[ - "Literal['']|SubscriptionSchedule.ModifyParamsPhaseItemBillingThresholds" - ] - """ - Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. - """ - discounts: NotRequired[ - "Literal['']|List[SubscriptionSchedule.ModifyParamsPhaseItemDiscount]" - ] - """ - The coupons to redeem into discounts for the subscription item. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a configuration item. Metadata on a configuration item will update the underlying subscription item's `metadata` when the phase is entered, adding new keys and replacing existing keys. Individual keys in the subscription item's `metadata` can be unset by posting an empty value to them in the configuration item's `metadata`. To unset all keys in the subscription item's `metadata`, update the subscription item directly or unset every key individually from the configuration item's `metadata`. - """ - plan: NotRequired[str] - """ - The plan ID to subscribe to. You may specify the same ID in `plan` and `price`. - """ - price: NotRequired[str] - """ - The ID of the price object. - """ - price_data: NotRequired[ - "SubscriptionSchedule.ModifyParamsPhaseItemPriceData" - ] - """ - Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. - """ - quantity: NotRequired[int] - """ - Quantity for the given price. Can be set only if the price's `usage_type` is `licensed` and not `metered`. - """ - tax_rates: NotRequired["Literal['']|List[str]"] - """ - A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. - """ - trial: NotRequired["SubscriptionSchedule.ModifyParamsPhaseItemTrial"] - """ - Options that configure the trial on the subscription item. - """ - - class ModifyParamsPhaseItemBillingThresholds(TypedDict): - usage_gte: int - """ - Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)) - """ - - class ModifyParamsPhaseItemDiscount(TypedDict): - coupon: NotRequired[str] - """ - ID of the coupon to create a new discount for. - """ - discount: NotRequired[str] - """ - ID of an existing discount on the object (or one of its ancestors) to reuse. - """ - discount_end: NotRequired[ - "SubscriptionSchedule.ModifyParamsPhaseItemDiscountDiscountEnd" - ] - """ - Details to determine how long the discount should be applied for. - """ - promotion_code: NotRequired[str] - """ - ID of the promotion code to create a new discount for. - """ - - class ModifyParamsPhaseItemDiscountDiscountEnd(TypedDict): - duration: NotRequired[ - "SubscriptionSchedule.ModifyParamsPhaseItemDiscountDiscountEndDuration" - ] - """ - Time span for the redeemed discount. - """ - timestamp: NotRequired[int] - """ - A precise Unix timestamp for the discount to end. Must be in the future. - """ - type: Literal["duration", "timestamp"] - """ - The type of calculation made to determine when the discount ends. - """ - - class ModifyParamsPhaseItemDiscountDiscountEndDuration(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. - """ - interval_count: int - """ - The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. - """ - - class ModifyParamsPhaseItemPriceData(TypedDict): - 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). - """ - product: str - """ - The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to. - """ - recurring: ( - "SubscriptionSchedule.ModifyParamsPhaseItemPriceDataRecurring" - ) - """ - The recurring components of a price such as `interval` and `interval_count`. - """ - tax_behavior: NotRequired[ - Literal["exclusive", "inclusive", "unspecified"] - ] - """ - Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. - """ - unit_amount: NotRequired[int] - """ - A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. - """ - unit_amount_decimal: NotRequired[str] - """ - Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - """ - - class ModifyParamsPhaseItemPriceDataRecurring(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Specifies billing frequency. Either `day`, `week`, `month` or `year`. - """ - interval_count: NotRequired[int] - """ - The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). - """ - - class ModifyParamsPhaseItemTrial(TypedDict): - converts_to: NotRequired[List[str]] - """ - List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. - """ - type: Literal["free", "paid"] - """ - Determines the type of trial for this item. - """ - - class ModifyParamsPhasePauseCollection(TypedDict): - behavior: Literal["keep_as_draft", "mark_uncollectible", "void"] - """ - The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. - """ - - class ModifyParamsPhaseTransferData(TypedDict): - amount_percent: NotRequired[float] - """ - A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. - """ - destination: str - """ - ID of an existing, connected Stripe account. - """ - - class ModifyParamsPhaseTrialSettings(TypedDict): - end_behavior: NotRequired[ - "SubscriptionSchedule.ModifyParamsPhaseTrialSettingsEndBehavior" - ] - """ - Defines how the subscription should behave when a trial ends. - """ - - class ModifyParamsPhaseTrialSettingsEndBehavior(TypedDict): - prorate_up_front: NotRequired[Literal["defer", "include"]] - """ - Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`. - """ - - class ModifyParamsPrebilling(TypedDict): - iterations: int - """ - This is used to determine the number of billing cycles to prebill. - """ - update_behavior: NotRequired[Literal["prebill", "reset"]] - """ - Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`. - """ - - class ReleaseParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - preserve_cancel_date: NotRequired[bool] - """ - Keep any cancellation on the subscription that the schedule has set - """ - - class RetrieveParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - application: Optional[ExpandableField["Application"]] - """ - ID of the Connect Application that created the schedule. - """ - billing_behavior: Optional[ - Literal["prorate_on_next_phase", "prorate_up_front"] - ] - """ - Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front. - """ - billing_mode: BillingMode - """ - The billing mode of the subscription. - """ - canceled_at: Optional[int] - """ - Time at which the subscription schedule was canceled. Measured in seconds since the Unix epoch. - """ - completed_at: Optional[int] - """ - Time at which the subscription schedule was completed. Measured in seconds since the Unix epoch. - """ - created: int - """ - Time at which the object was created. Measured in seconds since the Unix epoch. - """ - current_phase: Optional[CurrentPhase] - """ - Object representing the start and end dates for the current phase of the subscription schedule, if it is `active`. - """ - customer: ExpandableField["Customer"] - """ - ID of the customer who owns the subscription schedule. - """ - customer_account: Optional[str] - """ - ID of the account who owns the subscription schedule. - """ - default_settings: DefaultSettings - end_behavior: Literal["cancel", "none", "release", "renew"] - """ - Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running. `cancel` will end the subscription schedule and cancel the underlying subscription. - """ - id: str - """ - Unique identifier for the object. - """ - last_price_migration_error: Optional[LastPriceMigrationError] - """ - Details of the most recent price migration that failed for the subscription schedule. - """ - livemode: bool - """ - Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. - """ - metadata: Optional[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. - """ - object: Literal["subscription_schedule"] - """ - String representing the object's type. Objects of the same type share the same value. - """ - phases: List[Phase] - """ - Configuration for the subscription schedule's phases. - """ - prebilling: Optional[Prebilling] - """ - Time period and invoice for a Subscription billed in advance. - """ - released_at: Optional[int] - """ - Time at which the subscription schedule was released. Measured in seconds since the Unix epoch. - """ - released_subscription: Optional[str] - """ - ID of the subscription once managed by the subscription schedule (if it is released). - """ - status: Literal[ - "active", "canceled", "completed", "not_started", "released" - ] - """ - The present status of the subscription schedule. Possible values are `not_started`, `active`, `completed`, `released`, and `canceled`. You can read more about the different states in our [behavior guide](https://stripe.com/docs/billing/subscriptions/subscription-schedules). - """ - subscription: Optional[ExpandableField["Subscription"]] - """ - ID of the subscription managed by the subscription schedule. - """ - test_clock: Optional[ExpandableField["TestClock"]] - """ - ID of the test clock this subscription schedule belongs to. - """ - - @classmethod - def _cls_amend( - cls, - schedule: str, - **params: Unpack["SubscriptionSchedule.AmendParams"], - ) -> "SubscriptionSchedule": - """ - Amends an existing subscription schedule. - """ - return cast( - "SubscriptionSchedule", - cls._static_request( - "post", - "/v1/subscription_schedules/{schedule}/amend".format( - schedule=sanitize_id(schedule) - ), - params=params, - ), - ) - - @overload - @staticmethod - def amend( - schedule: str, **params: Unpack["SubscriptionSchedule.AmendParams"] - ) -> "SubscriptionSchedule": - """ - Amends an existing subscription schedule. - """ - ... - - @overload - def amend( - self, **params: Unpack["SubscriptionSchedule.AmendParams"] - ) -> "SubscriptionSchedule": - """ - Amends an existing subscription schedule. - """ - ... - - @class_method_variant("_cls_amend") - def amend( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["SubscriptionSchedule.AmendParams"] - ) -> "SubscriptionSchedule": - """ - Amends an existing subscription schedule. - """ - return cast( - "SubscriptionSchedule", - self._request( - "post", - "/v1/subscription_schedules/{schedule}/amend".format( - schedule=sanitize_id(self.get("id")) - ), - params=params, - ), - ) + return cast( + "SubscriptionSchedule", + self._request( + "post", + "/v1/subscription_schedules/{schedule}/amend".format( + schedule=sanitize_id(self.get("id")) + ), + params=params, + ), + ) @classmethod async def _cls_amend_async( - cls, - schedule: str, - **params: Unpack["SubscriptionSchedule.AmendParams"], + cls, schedule: str, **params: Unpack["SubscriptionScheduleAmendParams"] ) -> "SubscriptionSchedule": """ Amends an existing subscription schedule. @@ -3046,7 +808,7 @@ async def _cls_amend_async( @overload @staticmethod async def amend_async( - schedule: str, **params: Unpack["SubscriptionSchedule.AmendParams"] + schedule: str, **params: Unpack["SubscriptionScheduleAmendParams"] ) -> "SubscriptionSchedule": """ Amends an existing subscription schedule. @@ -3055,7 +817,7 @@ async def amend_async( @overload async def amend_async( - self, **params: Unpack["SubscriptionSchedule.AmendParams"] + self, **params: Unpack["SubscriptionScheduleAmendParams"] ) -> "SubscriptionSchedule": """ Amends an existing subscription schedule. @@ -3064,7 +826,7 @@ async def amend_async( @class_method_variant("_cls_amend_async") async def amend_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["SubscriptionSchedule.AmendParams"] + self, **params: Unpack["SubscriptionScheduleAmendParams"] ) -> "SubscriptionSchedule": """ Amends an existing subscription schedule. @@ -3084,7 +846,7 @@ async def amend_async( # pyright: ignore[reportGeneralTypeIssues] def _cls_cancel( cls, schedule: str, - **params: Unpack["SubscriptionSchedule.CancelParams"], + **params: Unpack["SubscriptionScheduleCancelParams"], ) -> "SubscriptionSchedule": """ Cancels a subscription schedule and its associated subscription immediately (if the subscription schedule has an active subscription). A subscription schedule can only be canceled if its status is not_started or active. @@ -3103,7 +865,7 @@ def _cls_cancel( @overload @staticmethod def cancel( - schedule: str, **params: Unpack["SubscriptionSchedule.CancelParams"] + schedule: str, **params: Unpack["SubscriptionScheduleCancelParams"] ) -> "SubscriptionSchedule": """ Cancels a subscription schedule and its associated subscription immediately (if the subscription schedule has an active subscription). A subscription schedule can only be canceled if its status is not_started or active. @@ -3112,7 +874,7 @@ def cancel( @overload def cancel( - self, **params: Unpack["SubscriptionSchedule.CancelParams"] + self, **params: Unpack["SubscriptionScheduleCancelParams"] ) -> "SubscriptionSchedule": """ Cancels a subscription schedule and its associated subscription immediately (if the subscription schedule has an active subscription). A subscription schedule can only be canceled if its status is not_started or active. @@ -3121,7 +883,7 @@ def cancel( @class_method_variant("_cls_cancel") def cancel( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["SubscriptionSchedule.CancelParams"] + self, **params: Unpack["SubscriptionScheduleCancelParams"] ) -> "SubscriptionSchedule": """ Cancels a subscription schedule and its associated subscription immediately (if the subscription schedule has an active subscription). A subscription schedule can only be canceled if its status is not_started or active. @@ -3141,7 +903,7 @@ def cancel( # pyright: ignore[reportGeneralTypeIssues] async def _cls_cancel_async( cls, schedule: str, - **params: Unpack["SubscriptionSchedule.CancelParams"], + **params: Unpack["SubscriptionScheduleCancelParams"], ) -> "SubscriptionSchedule": """ Cancels a subscription schedule and its associated subscription immediately (if the subscription schedule has an active subscription). A subscription schedule can only be canceled if its status is not_started or active. @@ -3160,7 +922,7 @@ async def _cls_cancel_async( @overload @staticmethod async def cancel_async( - schedule: str, **params: Unpack["SubscriptionSchedule.CancelParams"] + schedule: str, **params: Unpack["SubscriptionScheduleCancelParams"] ) -> "SubscriptionSchedule": """ Cancels a subscription schedule and its associated subscription immediately (if the subscription schedule has an active subscription). A subscription schedule can only be canceled if its status is not_started or active. @@ -3169,7 +931,7 @@ async def cancel_async( @overload async def cancel_async( - self, **params: Unpack["SubscriptionSchedule.CancelParams"] + self, **params: Unpack["SubscriptionScheduleCancelParams"] ) -> "SubscriptionSchedule": """ Cancels a subscription schedule and its associated subscription immediately (if the subscription schedule has an active subscription). A subscription schedule can only be canceled if its status is not_started or active. @@ -3178,7 +940,7 @@ async def cancel_async( @class_method_variant("_cls_cancel_async") async def cancel_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["SubscriptionSchedule.CancelParams"] + self, **params: Unpack["SubscriptionScheduleCancelParams"] ) -> "SubscriptionSchedule": """ Cancels a subscription schedule and its associated subscription immediately (if the subscription schedule has an active subscription). A subscription schedule can only be canceled if its status is not_started or active. @@ -3196,7 +958,7 @@ async def cancel_async( # pyright: ignore[reportGeneralTypeIssues] @classmethod def create( - cls, **params: Unpack["SubscriptionSchedule.CreateParams"] + cls, **params: Unpack["SubscriptionScheduleCreateParams"] ) -> "SubscriptionSchedule": """ Creates a new subscription schedule object. Each customer can have up to 500 active or scheduled subscriptions. @@ -3212,7 +974,7 @@ def create( @classmethod async def create_async( - cls, **params: Unpack["SubscriptionSchedule.CreateParams"] + cls, **params: Unpack["SubscriptionScheduleCreateParams"] ) -> "SubscriptionSchedule": """ Creates a new subscription schedule object. Each customer can have up to 500 active or scheduled subscriptions. @@ -3228,7 +990,7 @@ async def create_async( @classmethod def list( - cls, **params: Unpack["SubscriptionSchedule.ListParams"] + cls, **params: Unpack["SubscriptionScheduleListParams"] ) -> ListObject["SubscriptionSchedule"]: """ Retrieves the list of your subscription schedules. @@ -3248,7 +1010,7 @@ def list( @classmethod async def list_async( - cls, **params: Unpack["SubscriptionSchedule.ListParams"] + cls, **params: Unpack["SubscriptionScheduleListParams"] ) -> ListObject["SubscriptionSchedule"]: """ Retrieves the list of your subscription schedules. @@ -3268,7 +1030,7 @@ async def list_async( @classmethod def modify( - cls, id: str, **params: Unpack["SubscriptionSchedule.ModifyParams"] + cls, id: str, **params: Unpack["SubscriptionScheduleModifyParams"] ) -> "SubscriptionSchedule": """ Updates an existing subscription schedule. @@ -3285,7 +1047,7 @@ def modify( @classmethod async def modify_async( - cls, id: str, **params: Unpack["SubscriptionSchedule.ModifyParams"] + cls, id: str, **params: Unpack["SubscriptionScheduleModifyParams"] ) -> "SubscriptionSchedule": """ Updates an existing subscription schedule. @@ -3304,7 +1066,7 @@ async def modify_async( def _cls_release( cls, schedule: str, - **params: Unpack["SubscriptionSchedule.ReleaseParams"], + **params: Unpack["SubscriptionScheduleReleaseParams"], ) -> "SubscriptionSchedule": """ Releases the subscription schedule immediately, which will stop scheduling of its phases, but leave any existing subscription in place. A schedule can only be released if its status is not_started or active. If the subscription schedule is currently associated with a subscription, releasing it will remove its subscription property and set the subscription's ID to the released_subscription property. @@ -3323,7 +1085,7 @@ def _cls_release( @overload @staticmethod def release( - schedule: str, **params: Unpack["SubscriptionSchedule.ReleaseParams"] + schedule: str, **params: Unpack["SubscriptionScheduleReleaseParams"] ) -> "SubscriptionSchedule": """ Releases the subscription schedule immediately, which will stop scheduling of its phases, but leave any existing subscription in place. A schedule can only be released if its status is not_started or active. If the subscription schedule is currently associated with a subscription, releasing it will remove its subscription property and set the subscription's ID to the released_subscription property. @@ -3332,7 +1094,7 @@ def release( @overload def release( - self, **params: Unpack["SubscriptionSchedule.ReleaseParams"] + self, **params: Unpack["SubscriptionScheduleReleaseParams"] ) -> "SubscriptionSchedule": """ Releases the subscription schedule immediately, which will stop scheduling of its phases, but leave any existing subscription in place. A schedule can only be released if its status is not_started or active. If the subscription schedule is currently associated with a subscription, releasing it will remove its subscription property and set the subscription's ID to the released_subscription property. @@ -3341,7 +1103,7 @@ def release( @class_method_variant("_cls_release") def release( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["SubscriptionSchedule.ReleaseParams"] + self, **params: Unpack["SubscriptionScheduleReleaseParams"] ) -> "SubscriptionSchedule": """ Releases the subscription schedule immediately, which will stop scheduling of its phases, but leave any existing subscription in place. A schedule can only be released if its status is not_started or active. If the subscription schedule is currently associated with a subscription, releasing it will remove its subscription property and set the subscription's ID to the released_subscription property. @@ -3361,7 +1123,7 @@ def release( # pyright: ignore[reportGeneralTypeIssues] async def _cls_release_async( cls, schedule: str, - **params: Unpack["SubscriptionSchedule.ReleaseParams"], + **params: Unpack["SubscriptionScheduleReleaseParams"], ) -> "SubscriptionSchedule": """ Releases the subscription schedule immediately, which will stop scheduling of its phases, but leave any existing subscription in place. A schedule can only be released if its status is not_started or active. If the subscription schedule is currently associated with a subscription, releasing it will remove its subscription property and set the subscription's ID to the released_subscription property. @@ -3380,7 +1142,7 @@ async def _cls_release_async( @overload @staticmethod async def release_async( - schedule: str, **params: Unpack["SubscriptionSchedule.ReleaseParams"] + schedule: str, **params: Unpack["SubscriptionScheduleReleaseParams"] ) -> "SubscriptionSchedule": """ Releases the subscription schedule immediately, which will stop scheduling of its phases, but leave any existing subscription in place. A schedule can only be released if its status is not_started or active. If the subscription schedule is currently associated with a subscription, releasing it will remove its subscription property and set the subscription's ID to the released_subscription property. @@ -3389,7 +1151,7 @@ async def release_async( @overload async def release_async( - self, **params: Unpack["SubscriptionSchedule.ReleaseParams"] + self, **params: Unpack["SubscriptionScheduleReleaseParams"] ) -> "SubscriptionSchedule": """ Releases the subscription schedule immediately, which will stop scheduling of its phases, but leave any existing subscription in place. A schedule can only be released if its status is not_started or active. If the subscription schedule is currently associated with a subscription, releasing it will remove its subscription property and set the subscription's ID to the released_subscription property. @@ -3398,7 +1160,7 @@ async def release_async( @class_method_variant("_cls_release_async") async def release_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["SubscriptionSchedule.ReleaseParams"] + self, **params: Unpack["SubscriptionScheduleReleaseParams"] ) -> "SubscriptionSchedule": """ Releases the subscription schedule immediately, which will stop scheduling of its phases, but leave any existing subscription in place. A schedule can only be released if its status is not_started or active. If the subscription schedule is currently associated with a subscription, releasing it will remove its subscription property and set the subscription's ID to the released_subscription property. @@ -3416,7 +1178,7 @@ async def release_async( # pyright: ignore[reportGeneralTypeIssues] @classmethod def retrieve( - cls, id: str, **params: Unpack["SubscriptionSchedule.RetrieveParams"] + cls, id: str, **params: Unpack["SubscriptionScheduleRetrieveParams"] ) -> "SubscriptionSchedule": """ Retrieves the details of an existing subscription schedule. You only need to supply the unique subscription schedule identifier that was returned upon subscription schedule creation. @@ -3427,7 +1189,7 @@ def retrieve( @classmethod async def retrieve_async( - cls, id: str, **params: Unpack["SubscriptionSchedule.RetrieveParams"] + cls, id: str, **params: Unpack["SubscriptionScheduleRetrieveParams"] ) -> "SubscriptionSchedule": """ Retrieves the details of an existing subscription schedule. You only need to supply the unique subscription schedule identifier that was returned upon subscription schedule creation. diff --git a/stripe/_subscription_schedule_service.py b/stripe/_subscription_schedule_service.py index 96c8c3a69..0d2a16eb7 100644 --- a/stripe/_subscription_schedule_service.py +++ b/stripe/_subscription_schedule_service.py @@ -5,2276 +5,37 @@ from stripe._stripe_service import StripeService from stripe._subscription_schedule import SubscriptionSchedule from stripe._util import sanitize_id -from typing import Dict, List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params._subscription_schedule_amend_params import ( + SubscriptionScheduleAmendParams, + ) + from stripe.params._subscription_schedule_cancel_params import ( + SubscriptionScheduleCancelParams, + ) + from stripe.params._subscription_schedule_create_params import ( + SubscriptionScheduleCreateParams, + ) + from stripe.params._subscription_schedule_list_params import ( + SubscriptionScheduleListParams, + ) + from stripe.params._subscription_schedule_release_params import ( + SubscriptionScheduleReleaseParams, + ) + from stripe.params._subscription_schedule_retrieve_params import ( + SubscriptionScheduleRetrieveParams, + ) + from stripe.params._subscription_schedule_update_params import ( + SubscriptionScheduleUpdateParams, + ) class SubscriptionScheduleService(StripeService): - class AmendParams(TypedDict): - amendments: NotRequired[ - List["SubscriptionScheduleService.AmendParamsAmendment"] - ] - """ - Changes to apply to the phases of the subscription schedule, in the order provided. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - prebilling: NotRequired[ - "Literal['']|List[SubscriptionScheduleService.AmendParamsPrebilling]" - ] - """ - Provide any time periods to bill in advance. - """ - proration_behavior: NotRequired[ - Literal["always_invoice", "create_prorations", "none"] - ] - """ - In cases where the amendment changes the currently active phase, - specifies if and how to prorate at the time of the request. - """ - schedule_settings: NotRequired[ - "SubscriptionScheduleService.AmendParamsScheduleSettings" - ] - """ - Changes to apply to the subscription schedule. - """ - - class AmendParamsAmendment(TypedDict): - amendment_end: NotRequired[ - "SubscriptionScheduleService.AmendParamsAmendmentAmendmentEnd" - ] - """ - Details to identify the end of the time range modified by the proposed change. If not supplied, the amendment is considered a point-in-time operation that only affects the exact timestamp at `amendment_start`, and a restricted set of attributes is supported on the amendment. - """ - amendment_start: ( - "SubscriptionScheduleService.AmendParamsAmendmentAmendmentStart" - ) - """ - Details to identify the earliest timestamp where the proposed change should take effect. - """ - billing_cycle_anchor: NotRequired[ - Literal["amendment_start", "automatic"] - ] - """ - For point-in-time amendments (having no `amendment_end`), this attribute lets you set or remove whether the subscription's billing cycle anchor is reset at the `amendment_start` timestamp.For time-span based amendments (having both `amendment_start` and `amendment_end`), the only value valid is `automatic`, which removes any previously configured billing cycle anchor resets scheduled to occur during the window of time spanned by the amendment. - """ - discount_actions: NotRequired[ - List[ - "SubscriptionScheduleService.AmendParamsAmendmentDiscountAction" - ] - ] - """ - Changes to the coupons being redeemed or discounts being applied during the amendment time span. - """ - item_actions: NotRequired[ - List["SubscriptionScheduleService.AmendParamsAmendmentItemAction"] - ] - """ - Changes to the subscription items during the amendment time span. - """ - metadata_actions: NotRequired[ - List[ - "SubscriptionScheduleService.AmendParamsAmendmentMetadataAction" - ] - ] - """ - Instructions for how to modify phase metadata - """ - proration_behavior: NotRequired[ - Literal["always_invoice", "create_prorations", "none"] - ] - """ - Changes to how Stripe handles prorations during the amendment time span. Affects if and how prorations are created when a future phase starts. In cases where the amendment changes the currently active phase, it is used to determine whether or how to prorate now, at the time of the request. Also supported as a point-in-time operation when `amendment_end` is `null`. - """ - set_pause_collection: NotRequired[ - "SubscriptionScheduleService.AmendParamsAmendmentSetPauseCollection" - ] - """ - Defines how to pause collection for the underlying subscription throughout the duration of the amendment. - """ - set_schedule_end: NotRequired[ - Literal["amendment_end", "amendment_start"] - ] - """ - Ends the subscription schedule early as dictated by either the accompanying amendment's start or end. - """ - trial_settings: NotRequired[ - "SubscriptionScheduleService.AmendParamsAmendmentTrialSettings" - ] - """ - Settings related to subscription trials. - """ - - class AmendParamsAmendmentAmendmentEnd(TypedDict): - discount_end: NotRequired[ - "SubscriptionScheduleService.AmendParamsAmendmentAmendmentEndDiscountEnd" - ] - """ - Use the `end` time of a given discount. - """ - duration: NotRequired[ - "SubscriptionScheduleService.AmendParamsAmendmentAmendmentEndDuration" - ] - """ - Time span for the amendment starting from the `amendment_start`. - """ - timestamp: NotRequired[int] - """ - A precise Unix timestamp for the amendment to end. Must be after the `amendment_start`. - """ - type: Literal[ - "discount_end", - "duration", - "schedule_end", - "timestamp", - "trial_end", - "trial_start", - "upcoming_invoice", - ] - """ - Select one of three ways to pass the `amendment_end`. - """ - - class AmendParamsAmendmentAmendmentEndDiscountEnd(TypedDict): - discount: str - """ - The ID of a specific discount. - """ - - class AmendParamsAmendmentAmendmentEndDuration(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. - """ - interval_count: int - """ - The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. - """ - - class AmendParamsAmendmentAmendmentStart(TypedDict): - amendment_end: NotRequired[ - "SubscriptionScheduleService.AmendParamsAmendmentAmendmentStartAmendmentEnd" - ] - """ - Details of another amendment in the same array, immediately after which this amendment should begin. - """ - discount_end: NotRequired[ - "SubscriptionScheduleService.AmendParamsAmendmentAmendmentStartDiscountEnd" - ] - """ - Use the `end` time of a given discount. - """ - timestamp: NotRequired[int] - """ - A precise Unix timestamp for the amendment to start. - """ - type: Literal[ - "amendment_end", - "discount_end", - "now", - "schedule_end", - "timestamp", - "trial_end", - "trial_start", - "upcoming_invoice", - ] - """ - Select one of three ways to pass the `amendment_start`. - """ - - class AmendParamsAmendmentAmendmentStartAmendmentEnd(TypedDict): - index: int - """ - The position of the previous amendment in the `amendments` array after which this amendment should begin. Indexes start from 0 and must be less than the index of the current amendment in the array. - """ - - class AmendParamsAmendmentAmendmentStartDiscountEnd(TypedDict): - discount: str - """ - The ID of a specific discount. - """ - - class AmendParamsAmendmentDiscountAction(TypedDict): - add: NotRequired[ - "SubscriptionScheduleService.AmendParamsAmendmentDiscountActionAdd" - ] - """ - Details of the discount to add. - """ - remove: NotRequired[ - "SubscriptionScheduleService.AmendParamsAmendmentDiscountActionRemove" - ] - """ - Details of the discount to remove. - """ - set: NotRequired[ - "SubscriptionScheduleService.AmendParamsAmendmentDiscountActionSet" - ] - """ - Details of the discount to replace the existing discounts with. - """ - type: Literal["add", "remove", "set"] - """ - Determines the type of discount action. - """ - - class AmendParamsAmendmentDiscountActionAdd(TypedDict): - coupon: NotRequired[str] - """ - The coupon code to redeem. - """ - discount: NotRequired[str] - """ - An ID of an existing discount for a coupon that was already redeemed. - """ - discount_end: NotRequired[ - "SubscriptionScheduleService.AmendParamsAmendmentDiscountActionAddDiscountEnd" - ] - """ - Details to determine how long the discount should be applied for. - """ - index: NotRequired[int] - """ - The index, starting at 0, at which to position the new discount. When not supplied, Stripe defaults to appending the discount to the end of the `discounts` array. - """ - promotion_code: NotRequired[str] - """ - The promotion code to redeem. - """ - - class AmendParamsAmendmentDiscountActionAddDiscountEnd(TypedDict): - type: Literal["amendment_end"] - """ - The type of calculation made to determine when the discount ends. - """ - - class AmendParamsAmendmentDiscountActionRemove(TypedDict): - coupon: NotRequired[str] - """ - The coupon code to remove from the `discounts` array. - """ - discount: NotRequired[str] - """ - The ID of a discount to remove from the `discounts` array. - """ - promotion_code: NotRequired[str] - """ - The ID of a promotion code to remove from the `discounts` array. - """ - - class AmendParamsAmendmentDiscountActionSet(TypedDict): - coupon: NotRequired[str] - """ - The coupon code to replace the `discounts` array with. - """ - discount: NotRequired[str] - """ - An ID of an existing discount to replace the `discounts` array with. - """ - promotion_code: NotRequired[str] - """ - An ID of an existing promotion code to replace the `discounts` array with. - """ - - class AmendParamsAmendmentItemAction(TypedDict): - add: NotRequired[ - "SubscriptionScheduleService.AmendParamsAmendmentItemActionAdd" - ] - """ - Details of the subscription item to add. If an item with the same `price` exists, it will be replaced by this new item. Otherwise, it adds the new item. - """ - remove: NotRequired[ - "SubscriptionScheduleService.AmendParamsAmendmentItemActionRemove" - ] - """ - Details of the subscription item to remove. - """ - set: NotRequired[ - "SubscriptionScheduleService.AmendParamsAmendmentItemActionSet" - ] - """ - Details of the subscription item to replace the existing items with. If an item with the `set[price]` already exists, the `items` array is not cleared. Instead, all of the other `set` properties that are passed in this request will replace the existing values for the configuration item. - """ - type: Literal["add", "remove", "set"] - """ - Determines the type of item action. - """ - - class AmendParamsAmendmentItemActionAdd(TypedDict): - discounts: NotRequired[ - List[ - "SubscriptionScheduleService.AmendParamsAmendmentItemActionAddDiscount" - ] - ] - """ - The discounts applied to the item. Subscription item discounts are applied before subscription discounts. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - price: str - """ - The ID of the price object. - """ - quantity: NotRequired[int] - """ - Quantity for this item. - """ - tax_rates: NotRequired[List[str]] - """ - The tax rates that apply to this subscription item. When set, the `default_tax_rates` on the subscription do not apply to this `subscription_item`. - """ - trial: NotRequired[ - "SubscriptionScheduleService.AmendParamsAmendmentItemActionAddTrial" - ] - """ - Options that configure the trial on the subscription item. - """ - - class AmendParamsAmendmentItemActionAddDiscount(TypedDict): - coupon: NotRequired[str] - """ - ID of the coupon to create a new discount for. - """ - discount: NotRequired[str] - """ - ID of an existing discount on the object (or one of its ancestors) to reuse. - """ - discount_end: NotRequired[ - "SubscriptionScheduleService.AmendParamsAmendmentItemActionAddDiscountDiscountEnd" - ] - """ - Details to determine how long the discount should be applied for. - """ - promotion_code: NotRequired[str] - """ - ID of the promotion code to create a new discount for. - """ - - class AmendParamsAmendmentItemActionAddDiscountDiscountEnd(TypedDict): - duration: NotRequired[ - "SubscriptionScheduleService.AmendParamsAmendmentItemActionAddDiscountDiscountEndDuration" - ] - """ - Time span for the redeemed discount. - """ - timestamp: NotRequired[int] - """ - A precise Unix timestamp for the discount to end. Must be in the future. - """ - type: Literal["duration", "timestamp"] - """ - The type of calculation made to determine when the discount ends. - """ - - class AmendParamsAmendmentItemActionAddDiscountDiscountEndDuration( - TypedDict, - ): - interval: Literal["day", "month", "week", "year"] - """ - Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. - """ - interval_count: int - """ - The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. - """ - - class AmendParamsAmendmentItemActionAddTrial(TypedDict): - converts_to: NotRequired[List[str]] - """ - List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. - """ - type: Literal["free", "paid"] - """ - Determines the type of trial for this item. - """ - - class AmendParamsAmendmentItemActionRemove(TypedDict): - price: str - """ - ID of a price to remove. - """ - - class AmendParamsAmendmentItemActionSet(TypedDict): - discounts: NotRequired[ - List[ - "SubscriptionScheduleService.AmendParamsAmendmentItemActionSetDiscount" - ] - ] - """ - If an item with the `price` already exists, passing this will override the `discounts` array on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `discounts`. - """ - metadata: NotRequired[Dict[str, str]] - """ - If an item with the `price` already exists, passing this will override the `metadata` on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `metadata`. - """ - price: str - """ - The ID of the price object. - """ - quantity: NotRequired[int] - """ - If an item with the `price` already exists, passing this will override the quantity on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `quantity`. - """ - tax_rates: NotRequired[List[str]] - """ - If an item with the `price` already exists, passing this will override the `tax_rates` array on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `tax_rates`. - """ - trial: NotRequired[ - "SubscriptionScheduleService.AmendParamsAmendmentItemActionSetTrial" - ] - """ - If an item with the `price` already exists, passing this will override the `trial` configuration on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `trial`. - """ - - class AmendParamsAmendmentItemActionSetDiscount(TypedDict): - coupon: NotRequired[str] - """ - ID of the coupon to create a new discount for. - """ - discount: NotRequired[str] - """ - ID of an existing discount on the object (or one of its ancestors) to reuse. - """ - discount_end: NotRequired[ - "SubscriptionScheduleService.AmendParamsAmendmentItemActionSetDiscountDiscountEnd" - ] - """ - Details to determine how long the discount should be applied for. - """ - promotion_code: NotRequired[str] - """ - ID of the promotion code to create a new discount for. - """ - - class AmendParamsAmendmentItemActionSetDiscountDiscountEnd(TypedDict): - duration: NotRequired[ - "SubscriptionScheduleService.AmendParamsAmendmentItemActionSetDiscountDiscountEndDuration" - ] - """ - Time span for the redeemed discount. - """ - timestamp: NotRequired[int] - """ - A precise Unix timestamp for the discount to end. Must be in the future. - """ - type: Literal["duration", "timestamp"] - """ - The type of calculation made to determine when the discount ends. - """ - - class AmendParamsAmendmentItemActionSetDiscountDiscountEndDuration( - TypedDict, - ): - interval: Literal["day", "month", "week", "year"] - """ - Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. - """ - interval_count: int - """ - The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. - """ - - class AmendParamsAmendmentItemActionSetTrial(TypedDict): - converts_to: NotRequired[List[str]] - """ - List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. - """ - type: Literal["free", "paid"] - """ - Determines the type of trial for this item. - """ - - class AmendParamsAmendmentMetadataAction(TypedDict): - add: NotRequired[Dict[str, str]] - """ - Key-value pairs to add to schedule phase metadata. These values will merge with existing schedule phase metadata. - """ - remove: NotRequired[List[str]] - """ - Keys to remove from schedule phase metadata. - """ - set: NotRequired["Literal['']|Dict[str, str]"] - """ - Key-value pairs to set as schedule phase metadata. Existing schedule phase metadata will be overwritten. - """ - type: Literal["add", "remove", "set"] - """ - Select one of three ways to update phase-level `metadata` on subscription schedules. - """ - - class AmendParamsAmendmentSetPauseCollection(TypedDict): - set: NotRequired[ - "SubscriptionScheduleService.AmendParamsAmendmentSetPauseCollectionSet" - ] - """ - Details of the pause_collection behavior to apply to the amendment. - """ - type: Literal["remove", "set"] - """ - Determines the type of the pause_collection amendment. - """ - - class AmendParamsAmendmentSetPauseCollectionSet(TypedDict): - behavior: Literal["keep_as_draft", "mark_uncollectible", "void"] - """ - The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. - """ - - class AmendParamsAmendmentTrialSettings(TypedDict): - end_behavior: NotRequired[ - "SubscriptionScheduleService.AmendParamsAmendmentTrialSettingsEndBehavior" - ] - """ - Defines how the subscription should behave when a trial ends. - """ - - class AmendParamsAmendmentTrialSettingsEndBehavior(TypedDict): - prorate_up_front: NotRequired[Literal["defer", "include"]] - """ - Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`. - """ - - class AmendParamsPrebilling(TypedDict): - bill_from: NotRequired[ - "SubscriptionScheduleService.AmendParamsPrebillingBillFrom" - ] - """ - The beginning of the prebilled time period. The default value is `now`. - """ - bill_until: NotRequired[ - "SubscriptionScheduleService.AmendParamsPrebillingBillUntil" - ] - """ - The end of the prebilled time period. - """ - invoice_at: NotRequired[Literal["now"]] - """ - When the prebilling invoice should be created. The default value is `now`. - """ - update_behavior: NotRequired[Literal["prebill", "reset"]] - """ - Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`. - """ - - class AmendParamsPrebillingBillFrom(TypedDict): - amendment_start: NotRequired[ - "SubscriptionScheduleService.AmendParamsPrebillingBillFromAmendmentStart" - ] - """ - Start the prebilled period when a specified amendment begins. - """ - timestamp: NotRequired[int] - """ - Start the prebilled period at a precise integer timestamp, starting from the Unix epoch. - """ - type: Literal["amendment_start", "now", "timestamp"] - """ - Select one of several ways to pass the `bill_from` value. - """ - - class AmendParamsPrebillingBillFromAmendmentStart(TypedDict): - index: int - """ - The position of the amendment in the `amendments` array with which prebilling should begin. Indexes start from 0 and must be less than the total number of supplied amendments. - """ - - class AmendParamsPrebillingBillUntil(TypedDict): - amendment_end: NotRequired[ - "SubscriptionScheduleService.AmendParamsPrebillingBillUntilAmendmentEnd" - ] - """ - End the prebilled period when a specified amendment ends. - """ - duration: NotRequired[ - "SubscriptionScheduleService.AmendParamsPrebillingBillUntilDuration" - ] - """ - Time span for prebilling, starting from `bill_from`. - """ - timestamp: NotRequired[int] - """ - End the prebilled period at a precise integer timestamp, starting from the Unix epoch. - """ - type: Literal["amendment_end", "duration", "schedule_end", "timestamp"] - """ - Select one of several ways to pass the `bill_until` value. - """ - - class AmendParamsPrebillingBillUntilAmendmentEnd(TypedDict): - index: int - """ - The position of the amendment in the `amendments` array at which prebilling should end. Indexes start from 0 and must be less than the total number of supplied amendments. - """ - - class AmendParamsPrebillingBillUntilDuration(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. - """ - interval_count: int - """ - The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. - """ - - class AmendParamsScheduleSettings(TypedDict): - end_behavior: NotRequired[Literal["cancel", "release"]] - """ - Behavior of the subscription schedule and underlying subscription when it ends. - """ - - class CancelParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - invoice_now: NotRequired[bool] - """ - If the subscription schedule is `active`, indicates if a final invoice will be generated that contains any un-invoiced metered usage and new/pending proration invoice items. Defaults to `true`. - """ - prorate: NotRequired[bool] - """ - If the subscription schedule is `active`, indicates if the cancellation should be prorated. Defaults to `true`. - """ - - class CreateParams(TypedDict): - billing_behavior: NotRequired[ - Literal["prorate_on_next_phase", "prorate_up_front"] - ] - """ - Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front. - """ - billing_mode: NotRequired[ - "SubscriptionScheduleService.CreateParamsBillingMode" - ] - """ - Controls how prorations and invoices for subscriptions are calculated and orchestrated. - """ - customer: NotRequired[str] - """ - The identifier of the customer to create the subscription schedule for. - """ - customer_account: NotRequired[str] - """ - The identifier of the account to create the subscription schedule for. - """ - default_settings: NotRequired[ - "SubscriptionScheduleService.CreateParamsDefaultSettings" - ] - """ - Object representing the subscription schedule's default settings. - """ - end_behavior: NotRequired[ - Literal["cancel", "none", "release", "renew"] - ] - """ - Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running. `cancel` will end the subscription schedule and cancel the underlying subscription. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - from_subscription: NotRequired[str] - """ - Migrate an existing subscription to be managed by a subscription schedule. If this parameter is set, a subscription schedule will be created using the subscription's item(s), set to auto-renew using the subscription's interval. When using this parameter, other parameters (such as phase values) cannot be set. To create a subscription schedule with other modifications, we recommend making two separate API calls. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - phases: NotRequired[ - List["SubscriptionScheduleService.CreateParamsPhase"] - ] - """ - List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase. - """ - prebilling: NotRequired[ - "SubscriptionScheduleService.CreateParamsPrebilling" - ] - """ - If specified, the invoicing for the given billing cycle iterations will be processed now. - """ - start_date: NotRequired["int|Literal['now']"] - """ - When the subscription schedule starts. We recommend using `now` so that it starts the subscription immediately. You can also use a Unix timestamp to backdate the subscription so that it starts on a past date, or set a future date for the subscription to start on. - """ - - class CreateParamsBillingMode(TypedDict): - flexible: NotRequired[ - "SubscriptionScheduleService.CreateParamsBillingModeFlexible" - ] - """ - Configure behavior for flexible billing mode. - """ - type: Literal["classic", "flexible"] - """ - Controls the calculation and orchestration of prorations and invoices for subscriptions. If no value is passed, the default is `flexible`. - """ - - class CreateParamsBillingModeFlexible(TypedDict): - proration_discounts: NotRequired[Literal["included", "itemized"]] - """ - Controls how invoices and invoice items display proration amounts and discount amounts. - """ - - class CreateParamsDefaultSettings(TypedDict): - application_fee_percent: NotRequired[float] - """ - A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). - """ - automatic_tax: NotRequired[ - "SubscriptionScheduleService.CreateParamsDefaultSettingsAutomaticTax" - ] - """ - Default settings for automatic tax computation. - """ - billing_cycle_anchor: NotRequired[Literal["automatic", "phase_start"]] - """ - Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). - """ - billing_thresholds: NotRequired[ - "Literal['']|SubscriptionScheduleService.CreateParamsDefaultSettingsBillingThresholds" - ] - """ - Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. - """ - collection_method: NotRequired[ - Literal["charge_automatically", "send_invoice"] - ] - """ - Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically` on creation. - """ - default_payment_method: NotRequired[str] - """ - ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings. - """ - description: NotRequired["Literal['']|str"] - """ - Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. - """ - invoice_settings: NotRequired[ - "SubscriptionScheduleService.CreateParamsDefaultSettingsInvoiceSettings" - ] - """ - All invoices will be billed using the specified settings. - """ - on_behalf_of: NotRequired["Literal['']|str"] - """ - The account on behalf of which to charge, for each of the associated subscription's invoices. - """ - transfer_data: NotRequired[ - "Literal['']|SubscriptionScheduleService.CreateParamsDefaultSettingsTransferData" - ] - """ - The data with which to automatically create a Transfer for each of the associated subscription's invoices. - """ - - class CreateParamsDefaultSettingsAutomaticTax(TypedDict): - enabled: bool - """ - Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription. - """ - liability: NotRequired[ - "SubscriptionScheduleService.CreateParamsDefaultSettingsAutomaticTaxLiability" - ] - """ - The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. - """ - - class CreateParamsDefaultSettingsAutomaticTaxLiability(TypedDict): - account: NotRequired[str] - """ - The connected account being referenced when `type` is `account`. - """ - type: Literal["account", "self"] - """ - Type of the account referenced in the request. - """ - - class CreateParamsDefaultSettingsBillingThresholds(TypedDict): - amount_gte: NotRequired[int] - """ - Monetary threshold that triggers the subscription to advance to a new billing period - """ - reset_billing_cycle_anchor: NotRequired[bool] - """ - Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. - """ - - class CreateParamsDefaultSettingsInvoiceSettings(TypedDict): - account_tax_ids: NotRequired["Literal['']|List[str]"] - """ - The account tax IDs associated with the subscription schedule. Will be set on invoices generated by the subscription schedule. - """ - days_until_due: NotRequired[int] - """ - Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `collection_method=charge_automatically`. - """ - issuer: NotRequired[ - "SubscriptionScheduleService.CreateParamsDefaultSettingsInvoiceSettingsIssuer" - ] - """ - The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. - """ - - class CreateParamsDefaultSettingsInvoiceSettingsIssuer(TypedDict): - account: NotRequired[str] - """ - The connected account being referenced when `type` is `account`. - """ - type: Literal["account", "self"] - """ - Type of the account referenced in the request. - """ - - class CreateParamsDefaultSettingsTransferData(TypedDict): - amount_percent: NotRequired[float] - """ - A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. - """ - destination: str - """ - ID of an existing, connected Stripe account. - """ - - class CreateParamsPhase(TypedDict): - add_invoice_items: NotRequired[ - List["SubscriptionScheduleService.CreateParamsPhaseAddInvoiceItem"] - ] - """ - A list of prices and quantities that will generate invoice items appended to the next invoice for this phase. You may pass up to 20 items. - """ - application_fee_percent: NotRequired[float] - """ - A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). - """ - automatic_tax: NotRequired[ - "SubscriptionScheduleService.CreateParamsPhaseAutomaticTax" - ] - """ - Automatic tax settings for this phase. - """ - billing_cycle_anchor: NotRequired[Literal["automatic", "phase_start"]] - """ - Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). - """ - billing_thresholds: NotRequired[ - "Literal['']|SubscriptionScheduleService.CreateParamsPhaseBillingThresholds" - ] - """ - Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. - """ - collection_method: NotRequired[ - Literal["charge_automatically", "send_invoice"] - ] - """ - Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically` on creation. - """ - currency: NotRequired[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). - """ - default_payment_method: NotRequired[str] - """ - ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings. - """ - default_tax_rates: NotRequired["Literal['']|List[str]"] - """ - A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will set the Subscription's [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates), which means they will be the Invoice's [`default_tax_rates`](https://stripe.com/docs/api/invoices/create#create_invoice-default_tax_rates) for any Invoices issued by the Subscription during this Phase. - """ - description: NotRequired["Literal['']|str"] - """ - Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. - """ - discounts: NotRequired[ - "Literal['']|List[SubscriptionScheduleService.CreateParamsPhaseDiscount]" - ] - """ - The coupons to redeem into discounts for the schedule phase. If not specified, inherits the discount from the subscription's customer. Pass an empty string to avoid inheriting any discounts. - """ - duration: NotRequired[ - "SubscriptionScheduleService.CreateParamsPhaseDuration" - ] - """ - The number of intervals the phase should last. If set, `end_date` must not be set. - """ - end_date: NotRequired[int] - """ - The date at which this phase of the subscription schedule ends. If set, `iterations` must not be set. - """ - invoice_settings: NotRequired[ - "SubscriptionScheduleService.CreateParamsPhaseInvoiceSettings" - ] - """ - All invoices will be billed using the specified settings. - """ - items: List["SubscriptionScheduleService.CreateParamsPhaseItem"] - """ - List of configuration items, each with an attached price, to apply during this phase of the subscription schedule. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a phase. Metadata on a schedule's phase will update the underlying subscription's `metadata` when the phase is entered, adding new keys and replacing existing keys in the subscription's `metadata`. Individual keys in the subscription's `metadata` can be unset by posting an empty value to them in the phase's `metadata`. To unset all keys in the subscription's `metadata`, update the subscription directly or unset every key individually from the phase's `metadata`. - """ - on_behalf_of: NotRequired[str] - """ - The account on behalf of which to charge, for each of the associated subscription's invoices. - """ - pause_collection: NotRequired[ - "SubscriptionScheduleService.CreateParamsPhasePauseCollection" - ] - """ - If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment). - """ - proration_behavior: NotRequired[ - Literal["always_invoice", "create_prorations", "none"] - ] - """ - Controls whether the subscription schedule should create [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when transitioning to this phase if there is a difference in billing configuration. It's different from the request-level [proration_behavior](https://stripe.com/docs/api/subscription_schedules/update#update_subscription_schedule-proration_behavior) parameter which controls what happens if the update request affects the billing configuration (item price, quantity, etc.) of the current phase. - """ - transfer_data: NotRequired[ - "SubscriptionScheduleService.CreateParamsPhaseTransferData" - ] - """ - The data with which to automatically create a Transfer for each of the associated subscription's invoices. - """ - trial: NotRequired[bool] - """ - If set to true the entire phase is counted as a trial and the customer will not be charged for any fees. - """ - trial_continuation: NotRequired[Literal["continue", "none"]] - """ - Specify trial behavior when crossing phase boundaries - """ - trial_end: NotRequired[int] - """ - Sets the phase to trialing from the start date to this date. Must be before the phase end date, can not be combined with `trial` - """ - trial_settings: NotRequired[ - "SubscriptionScheduleService.CreateParamsPhaseTrialSettings" - ] - """ - Settings related to subscription trials. - """ - - class CreateParamsPhaseAddInvoiceItem(TypedDict): - discounts: NotRequired[ - List[ - "SubscriptionScheduleService.CreateParamsPhaseAddInvoiceItemDiscount" - ] - ] - """ - The coupons to redeem into discounts for the item. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - period: NotRequired[ - "SubscriptionScheduleService.CreateParamsPhaseAddInvoiceItemPeriod" - ] - """ - The period associated with this invoice item. If not set, `period.start.type` defaults to `max_item_period_start` and `period.end.type` defaults to `min_item_period_end`. - """ - price: NotRequired[str] - """ - The ID of the price object. One of `price` or `price_data` is required. - """ - price_data: NotRequired[ - "SubscriptionScheduleService.CreateParamsPhaseAddInvoiceItemPriceData" - ] - """ - Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. - """ - quantity: NotRequired[int] - """ - Quantity for this item. Defaults to 1. - """ - tax_rates: NotRequired["Literal['']|List[str]"] - """ - The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item. - """ - - class CreateParamsPhaseAddInvoiceItemDiscount(TypedDict): - coupon: NotRequired[str] - """ - ID of the coupon to create a new discount for. - """ - discount: NotRequired[str] - """ - ID of an existing discount on the object (or one of its ancestors) to reuse. - """ - discount_end: NotRequired[ - "SubscriptionScheduleService.CreateParamsPhaseAddInvoiceItemDiscountDiscountEnd" - ] - """ - Details to determine how long the discount should be applied for. - """ - promotion_code: NotRequired[str] - """ - ID of the promotion code to create a new discount for. - """ - - class CreateParamsPhaseAddInvoiceItemDiscountDiscountEnd(TypedDict): - duration: NotRequired[ - "SubscriptionScheduleService.CreateParamsPhaseAddInvoiceItemDiscountDiscountEndDuration" - ] - """ - Time span for the redeemed discount. - """ - timestamp: NotRequired[int] - """ - A precise Unix timestamp for the discount to end. Must be in the future. - """ - type: Literal["duration", "timestamp"] - """ - The type of calculation made to determine when the discount ends. - """ - - class CreateParamsPhaseAddInvoiceItemDiscountDiscountEndDuration( - TypedDict - ): - interval: Literal["day", "month", "week", "year"] - """ - Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. - """ - interval_count: int - """ - The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. - """ - - class CreateParamsPhaseAddInvoiceItemPeriod(TypedDict): - end: "SubscriptionScheduleService.CreateParamsPhaseAddInvoiceItemPeriodEnd" - """ - End of the invoice item period. - """ - start: "SubscriptionScheduleService.CreateParamsPhaseAddInvoiceItemPeriodStart" - """ - Start of the invoice item period. - """ - - class CreateParamsPhaseAddInvoiceItemPeriodEnd(TypedDict): - timestamp: NotRequired[int] - """ - A precise Unix timestamp for the end of the invoice item period. Must be greater than or equal to `period.start`. - """ - type: Literal["min_item_period_end", "phase_end", "timestamp"] - """ - Select how to calculate the end of the invoice item period. - """ - - class CreateParamsPhaseAddInvoiceItemPeriodStart(TypedDict): - timestamp: NotRequired[int] - """ - A precise Unix timestamp for the start of the invoice item period. Must be less than or equal to `period.end`. - """ - type: Literal["max_item_period_start", "phase_start", "timestamp"] - """ - Select how to calculate the start of the invoice item period. - """ - - class CreateParamsPhaseAddInvoiceItemPriceData(TypedDict): - 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). - """ - product: str - """ - The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to. - """ - tax_behavior: NotRequired[ - Literal["exclusive", "inclusive", "unspecified"] - ] - """ - Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. - """ - unit_amount: NotRequired[int] - """ - A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge or a negative integer representing the amount to credit to the customer. - """ - unit_amount_decimal: NotRequired[str] - """ - Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - """ - - class CreateParamsPhaseAutomaticTax(TypedDict): - enabled: bool - """ - Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription. - """ - liability: NotRequired[ - "SubscriptionScheduleService.CreateParamsPhaseAutomaticTaxLiability" - ] - """ - The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. - """ - - class CreateParamsPhaseAutomaticTaxLiability(TypedDict): - account: NotRequired[str] - """ - The connected account being referenced when `type` is `account`. - """ - type: Literal["account", "self"] - """ - Type of the account referenced in the request. - """ - - class CreateParamsPhaseBillingThresholds(TypedDict): - amount_gte: NotRequired[int] - """ - Monetary threshold that triggers the subscription to advance to a new billing period - """ - reset_billing_cycle_anchor: NotRequired[bool] - """ - Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. - """ - - class CreateParamsPhaseDiscount(TypedDict): - coupon: NotRequired[str] - """ - ID of the coupon to create a new discount for. - """ - discount: NotRequired[str] - """ - ID of an existing discount on the object (or one of its ancestors) to reuse. - """ - discount_end: NotRequired[ - "SubscriptionScheduleService.CreateParamsPhaseDiscountDiscountEnd" - ] - """ - Details to determine how long the discount should be applied for. - """ - promotion_code: NotRequired[str] - """ - ID of the promotion code to create a new discount for. - """ - - class CreateParamsPhaseDiscountDiscountEnd(TypedDict): - duration: NotRequired[ - "SubscriptionScheduleService.CreateParamsPhaseDiscountDiscountEndDuration" - ] - """ - Time span for the redeemed discount. - """ - timestamp: NotRequired[int] - """ - A precise Unix timestamp for the discount to end. Must be in the future. - """ - type: Literal["duration", "timestamp"] - """ - The type of calculation made to determine when the discount ends. - """ - - class CreateParamsPhaseDiscountDiscountEndDuration(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. - """ - interval_count: int - """ - The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. - """ - - class CreateParamsPhaseDuration(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Specifies phase duration. Either `day`, `week`, `month` or `year`. - """ - interval_count: NotRequired[int] - """ - The multiplier applied to the interval. - """ - - class CreateParamsPhaseInvoiceSettings(TypedDict): - account_tax_ids: NotRequired["Literal['']|List[str]"] - """ - The account tax IDs associated with this phase of the subscription schedule. Will be set on invoices generated by this phase of the subscription schedule. - """ - days_until_due: NotRequired[int] - """ - Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `billing=charge_automatically`. - """ - issuer: NotRequired[ - "SubscriptionScheduleService.CreateParamsPhaseInvoiceSettingsIssuer" - ] - """ - The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. - """ - - class CreateParamsPhaseInvoiceSettingsIssuer(TypedDict): - account: NotRequired[str] - """ - The connected account being referenced when `type` is `account`. - """ - type: Literal["account", "self"] - """ - Type of the account referenced in the request. - """ - - class CreateParamsPhaseItem(TypedDict): - billing_thresholds: NotRequired[ - "Literal['']|SubscriptionScheduleService.CreateParamsPhaseItemBillingThresholds" - ] - """ - Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. - """ - discounts: NotRequired[ - "Literal['']|List[SubscriptionScheduleService.CreateParamsPhaseItemDiscount]" - ] - """ - The coupons to redeem into discounts for the subscription item. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a configuration item. Metadata on a configuration item will update the underlying subscription item's `metadata` when the phase is entered, adding new keys and replacing existing keys. Individual keys in the subscription item's `metadata` can be unset by posting an empty value to them in the configuration item's `metadata`. To unset all keys in the subscription item's `metadata`, update the subscription item directly or unset every key individually from the configuration item's `metadata`. - """ - plan: NotRequired[str] - """ - The plan ID to subscribe to. You may specify the same ID in `plan` and `price`. - """ - price: NotRequired[str] - """ - The ID of the price object. - """ - price_data: NotRequired[ - "SubscriptionScheduleService.CreateParamsPhaseItemPriceData" - ] - """ - Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. - """ - quantity: NotRequired[int] - """ - Quantity for the given price. Can be set only if the price's `usage_type` is `licensed` and not `metered`. - """ - tax_rates: NotRequired["Literal['']|List[str]"] - """ - A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. - """ - trial: NotRequired[ - "SubscriptionScheduleService.CreateParamsPhaseItemTrial" - ] - """ - Options that configure the trial on the subscription item. - """ - - class CreateParamsPhaseItemBillingThresholds(TypedDict): - usage_gte: int - """ - Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)) - """ - - class CreateParamsPhaseItemDiscount(TypedDict): - coupon: NotRequired[str] - """ - ID of the coupon to create a new discount for. - """ - discount: NotRequired[str] - """ - ID of an existing discount on the object (or one of its ancestors) to reuse. - """ - discount_end: NotRequired[ - "SubscriptionScheduleService.CreateParamsPhaseItemDiscountDiscountEnd" - ] - """ - Details to determine how long the discount should be applied for. - """ - promotion_code: NotRequired[str] - """ - ID of the promotion code to create a new discount for. - """ - - class CreateParamsPhaseItemDiscountDiscountEnd(TypedDict): - duration: NotRequired[ - "SubscriptionScheduleService.CreateParamsPhaseItemDiscountDiscountEndDuration" - ] - """ - Time span for the redeemed discount. - """ - timestamp: NotRequired[int] - """ - A precise Unix timestamp for the discount to end. Must be in the future. - """ - type: Literal["duration", "timestamp"] - """ - The type of calculation made to determine when the discount ends. - """ - - class CreateParamsPhaseItemDiscountDiscountEndDuration(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. - """ - interval_count: int - """ - The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. - """ - - class CreateParamsPhaseItemPriceData(TypedDict): - 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). - """ - product: str - """ - The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to. - """ - recurring: "SubscriptionScheduleService.CreateParamsPhaseItemPriceDataRecurring" - """ - The recurring components of a price such as `interval` and `interval_count`. - """ - tax_behavior: NotRequired[ - Literal["exclusive", "inclusive", "unspecified"] - ] - """ - Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. - """ - unit_amount: NotRequired[int] - """ - A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. - """ - unit_amount_decimal: NotRequired[str] - """ - Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - """ - - class CreateParamsPhaseItemPriceDataRecurring(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Specifies billing frequency. Either `day`, `week`, `month` or `year`. - """ - interval_count: NotRequired[int] - """ - The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). - """ - - class CreateParamsPhaseItemTrial(TypedDict): - converts_to: NotRequired[List[str]] - """ - List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. - """ - type: Literal["free", "paid"] - """ - Determines the type of trial for this item. - """ - - class CreateParamsPhasePauseCollection(TypedDict): - behavior: Literal["keep_as_draft", "mark_uncollectible", "void"] - """ - The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. - """ - - class CreateParamsPhaseTransferData(TypedDict): - amount_percent: NotRequired[float] - """ - A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. - """ - destination: str - """ - ID of an existing, connected Stripe account. - """ - - class CreateParamsPhaseTrialSettings(TypedDict): - end_behavior: NotRequired[ - "SubscriptionScheduleService.CreateParamsPhaseTrialSettingsEndBehavior" - ] - """ - Defines how the subscription should behave when a trial ends. - """ - - class CreateParamsPhaseTrialSettingsEndBehavior(TypedDict): - prorate_up_front: NotRequired[Literal["defer", "include"]] - """ - Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`. - """ - - class CreateParamsPrebilling(TypedDict): - iterations: int - """ - This is used to determine the number of billing cycles to prebill. - """ - update_behavior: NotRequired[Literal["prebill", "reset"]] - """ - Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`. - """ - - class ListParams(TypedDict): - canceled_at: NotRequired[ - "SubscriptionScheduleService.ListParamsCanceledAt|int" - ] - """ - Only return subscription schedules that were created canceled the given date interval. - """ - completed_at: NotRequired[ - "SubscriptionScheduleService.ListParamsCompletedAt|int" - ] - """ - Only return subscription schedules that completed during the given date interval. - """ - created: NotRequired[ - "SubscriptionScheduleService.ListParamsCreated|int" - ] - """ - Only return subscription schedules that were created during the given date interval. - """ - customer: NotRequired[str] - """ - Only return subscription schedules for the given customer. - """ - customer_account: NotRequired[str] - """ - Only return subscription schedules for the given account. - """ - 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. - """ - released_at: NotRequired[ - "SubscriptionScheduleService.ListParamsReleasedAt|int" - ] - """ - Only return subscription schedules that were released during the given date interval. - """ - scheduled: NotRequired[bool] - """ - Only return subscription schedules that have not started yet. - """ - 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 ListParamsCanceledAt(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) - """ - - class ListParamsCompletedAt(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) - """ - - class ListParamsCreated(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) - """ - - class ListParamsReleasedAt(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) - """ - - class ReleaseParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - preserve_cancel_date: NotRequired[bool] - """ - Keep any cancellation on the subscription that the schedule has set - """ - - class RetrieveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class UpdateParams(TypedDict): - billing_behavior: NotRequired[ - Literal["prorate_on_next_phase", "prorate_up_front"] - ] - """ - Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front. - """ - default_settings: NotRequired[ - "SubscriptionScheduleService.UpdateParamsDefaultSettings" - ] - """ - Object representing the subscription schedule's default settings. - """ - end_behavior: NotRequired[ - Literal["cancel", "none", "release", "renew"] - ] - """ - Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running. `cancel` will end the subscription schedule and cancel the underlying subscription. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - phases: NotRequired[ - List["SubscriptionScheduleService.UpdateParamsPhase"] - ] - """ - List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase. Note that past phases can be omitted. - """ - prebilling: NotRequired[ - "SubscriptionScheduleService.UpdateParamsPrebilling" - ] - """ - If specified, the invoicing for the given billing cycle iterations will be processed now. - """ - proration_behavior: NotRequired[ - Literal["always_invoice", "create_prorations", "none"] - ] - """ - If the update changes the billing configuration (item price, quantity, etc.) of the current phase, indicates how prorations from this change should be handled. The default value is `create_prorations`. - """ - - class UpdateParamsDefaultSettings(TypedDict): - application_fee_percent: NotRequired[float] - """ - A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). - """ - automatic_tax: NotRequired[ - "SubscriptionScheduleService.UpdateParamsDefaultSettingsAutomaticTax" - ] - """ - Default settings for automatic tax computation. - """ - billing_cycle_anchor: NotRequired[Literal["automatic", "phase_start"]] - """ - Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). - """ - billing_thresholds: NotRequired[ - "Literal['']|SubscriptionScheduleService.UpdateParamsDefaultSettingsBillingThresholds" - ] - """ - Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. - """ - collection_method: NotRequired[ - Literal["charge_automatically", "send_invoice"] - ] - """ - Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically` on creation. - """ - default_payment_method: NotRequired[str] - """ - ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings. - """ - description: NotRequired["Literal['']|str"] - """ - Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. - """ - invoice_settings: NotRequired[ - "SubscriptionScheduleService.UpdateParamsDefaultSettingsInvoiceSettings" - ] - """ - All invoices will be billed using the specified settings. - """ - on_behalf_of: NotRequired["Literal['']|str"] - """ - The account on behalf of which to charge, for each of the associated subscription's invoices. - """ - transfer_data: NotRequired[ - "Literal['']|SubscriptionScheduleService.UpdateParamsDefaultSettingsTransferData" - ] - """ - The data with which to automatically create a Transfer for each of the associated subscription's invoices. - """ - - class UpdateParamsDefaultSettingsAutomaticTax(TypedDict): - enabled: bool - """ - Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription. - """ - liability: NotRequired[ - "SubscriptionScheduleService.UpdateParamsDefaultSettingsAutomaticTaxLiability" - ] - """ - The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. - """ - - class UpdateParamsDefaultSettingsAutomaticTaxLiability(TypedDict): - account: NotRequired[str] - """ - The connected account being referenced when `type` is `account`. - """ - type: Literal["account", "self"] - """ - Type of the account referenced in the request. - """ - - class UpdateParamsDefaultSettingsBillingThresholds(TypedDict): - amount_gte: NotRequired[int] - """ - Monetary threshold that triggers the subscription to advance to a new billing period - """ - reset_billing_cycle_anchor: NotRequired[bool] - """ - Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. - """ - - class UpdateParamsDefaultSettingsInvoiceSettings(TypedDict): - account_tax_ids: NotRequired["Literal['']|List[str]"] - """ - The account tax IDs associated with the subscription schedule. Will be set on invoices generated by the subscription schedule. - """ - days_until_due: NotRequired[int] - """ - Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `collection_method=charge_automatically`. - """ - issuer: NotRequired[ - "SubscriptionScheduleService.UpdateParamsDefaultSettingsInvoiceSettingsIssuer" - ] - """ - The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. - """ - - class UpdateParamsDefaultSettingsInvoiceSettingsIssuer(TypedDict): - account: NotRequired[str] - """ - The connected account being referenced when `type` is `account`. - """ - type: Literal["account", "self"] - """ - Type of the account referenced in the request. - """ - - class UpdateParamsDefaultSettingsTransferData(TypedDict): - amount_percent: NotRequired[float] - """ - A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. - """ - destination: str - """ - ID of an existing, connected Stripe account. - """ - - class UpdateParamsPhase(TypedDict): - add_invoice_items: NotRequired[ - List["SubscriptionScheduleService.UpdateParamsPhaseAddInvoiceItem"] - ] - """ - A list of prices and quantities that will generate invoice items appended to the next invoice for this phase. You may pass up to 20 items. - """ - application_fee_percent: NotRequired[float] - """ - A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). - """ - automatic_tax: NotRequired[ - "SubscriptionScheduleService.UpdateParamsPhaseAutomaticTax" - ] - """ - Automatic tax settings for this phase. - """ - billing_cycle_anchor: NotRequired[Literal["automatic", "phase_start"]] - """ - Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). - """ - billing_thresholds: NotRequired[ - "Literal['']|SubscriptionScheduleService.UpdateParamsPhaseBillingThresholds" - ] - """ - Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. - """ - collection_method: NotRequired[ - Literal["charge_automatically", "send_invoice"] - ] - """ - Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically` on creation. - """ - currency: NotRequired[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). - """ - default_payment_method: NotRequired[str] - """ - ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings. - """ - default_tax_rates: NotRequired["Literal['']|List[str]"] - """ - A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will set the Subscription's [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates), which means they will be the Invoice's [`default_tax_rates`](https://stripe.com/docs/api/invoices/create#create_invoice-default_tax_rates) for any Invoices issued by the Subscription during this Phase. - """ - description: NotRequired["Literal['']|str"] - """ - Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. - """ - discounts: NotRequired[ - "Literal['']|List[SubscriptionScheduleService.UpdateParamsPhaseDiscount]" - ] - """ - The coupons to redeem into discounts for the schedule phase. If not specified, inherits the discount from the subscription's customer. Pass an empty string to avoid inheriting any discounts. - """ - duration: NotRequired[ - "SubscriptionScheduleService.UpdateParamsPhaseDuration" - ] - """ - The number of intervals the phase should last. If set, `end_date` must not be set. - """ - end_date: NotRequired["int|Literal['now']"] - """ - The date at which this phase of the subscription schedule ends. If set, `iterations` must not be set. - """ - invoice_settings: NotRequired[ - "SubscriptionScheduleService.UpdateParamsPhaseInvoiceSettings" - ] - """ - All invoices will be billed using the specified settings. - """ - items: List["SubscriptionScheduleService.UpdateParamsPhaseItem"] - """ - List of configuration items, each with an attached price, to apply during this phase of the subscription schedule. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a phase. Metadata on a schedule's phase will update the underlying subscription's `metadata` when the phase is entered, adding new keys and replacing existing keys in the subscription's `metadata`. Individual keys in the subscription's `metadata` can be unset by posting an empty value to them in the phase's `metadata`. To unset all keys in the subscription's `metadata`, update the subscription directly or unset every key individually from the phase's `metadata`. - """ - on_behalf_of: NotRequired[str] - """ - The account on behalf of which to charge, for each of the associated subscription's invoices. - """ - pause_collection: NotRequired[ - "SubscriptionScheduleService.UpdateParamsPhasePauseCollection" - ] - """ - If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment). - """ - proration_behavior: NotRequired[ - Literal["always_invoice", "create_prorations", "none"] - ] - """ - Controls whether the subscription schedule should create [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when transitioning to this phase if there is a difference in billing configuration. It's different from the request-level [proration_behavior](https://stripe.com/docs/api/subscription_schedules/update#update_subscription_schedule-proration_behavior) parameter which controls what happens if the update request affects the billing configuration (item price, quantity, etc.) of the current phase. - """ - start_date: NotRequired["int|Literal['now']"] - """ - The date at which this phase of the subscription schedule starts or `now`. Must be set on the first phase. - """ - transfer_data: NotRequired[ - "SubscriptionScheduleService.UpdateParamsPhaseTransferData" - ] - """ - The data with which to automatically create a Transfer for each of the associated subscription's invoices. - """ - trial: NotRequired[bool] - """ - If set to true the entire phase is counted as a trial and the customer will not be charged for any fees. - """ - trial_continuation: NotRequired[Literal["continue", "none"]] - """ - Specify trial behavior when crossing phase boundaries - """ - trial_end: NotRequired["int|Literal['now']"] - """ - Sets the phase to trialing from the start date to this date. Must be before the phase end date, can not be combined with `trial` - """ - trial_settings: NotRequired[ - "SubscriptionScheduleService.UpdateParamsPhaseTrialSettings" - ] - """ - Settings related to subscription trials. - """ - - class UpdateParamsPhaseAddInvoiceItem(TypedDict): - discounts: NotRequired[ - List[ - "SubscriptionScheduleService.UpdateParamsPhaseAddInvoiceItemDiscount" - ] - ] - """ - The coupons to redeem into discounts for the item. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - period: NotRequired[ - "SubscriptionScheduleService.UpdateParamsPhaseAddInvoiceItemPeriod" - ] - """ - The period associated with this invoice item. If not set, `period.start.type` defaults to `max_item_period_start` and `period.end.type` defaults to `min_item_period_end`. - """ - price: NotRequired[str] - """ - The ID of the price object. One of `price` or `price_data` is required. - """ - price_data: NotRequired[ - "SubscriptionScheduleService.UpdateParamsPhaseAddInvoiceItemPriceData" - ] - """ - Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. - """ - quantity: NotRequired[int] - """ - Quantity for this item. Defaults to 1. - """ - tax_rates: NotRequired["Literal['']|List[str]"] - """ - The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item. - """ - - class UpdateParamsPhaseAddInvoiceItemDiscount(TypedDict): - coupon: NotRequired[str] - """ - ID of the coupon to create a new discount for. - """ - discount: NotRequired[str] - """ - ID of an existing discount on the object (or one of its ancestors) to reuse. - """ - discount_end: NotRequired[ - "SubscriptionScheduleService.UpdateParamsPhaseAddInvoiceItemDiscountDiscountEnd" - ] - """ - Details to determine how long the discount should be applied for. - """ - promotion_code: NotRequired[str] - """ - ID of the promotion code to create a new discount for. - """ - - class UpdateParamsPhaseAddInvoiceItemDiscountDiscountEnd(TypedDict): - duration: NotRequired[ - "SubscriptionScheduleService.UpdateParamsPhaseAddInvoiceItemDiscountDiscountEndDuration" - ] - """ - Time span for the redeemed discount. - """ - timestamp: NotRequired[int] - """ - A precise Unix timestamp for the discount to end. Must be in the future. - """ - type: Literal["duration", "timestamp"] - """ - The type of calculation made to determine when the discount ends. - """ - - class UpdateParamsPhaseAddInvoiceItemDiscountDiscountEndDuration( - TypedDict - ): - interval: Literal["day", "month", "week", "year"] - """ - Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. - """ - interval_count: int - """ - The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. - """ - - class UpdateParamsPhaseAddInvoiceItemPeriod(TypedDict): - end: "SubscriptionScheduleService.UpdateParamsPhaseAddInvoiceItemPeriodEnd" - """ - End of the invoice item period. - """ - start: "SubscriptionScheduleService.UpdateParamsPhaseAddInvoiceItemPeriodStart" - """ - Start of the invoice item period. - """ - - class UpdateParamsPhaseAddInvoiceItemPeriodEnd(TypedDict): - timestamp: NotRequired[int] - """ - A precise Unix timestamp for the end of the invoice item period. Must be greater than or equal to `period.start`. - """ - type: Literal["min_item_period_end", "phase_end", "timestamp"] - """ - Select how to calculate the end of the invoice item period. - """ - - class UpdateParamsPhaseAddInvoiceItemPeriodStart(TypedDict): - timestamp: NotRequired[int] - """ - A precise Unix timestamp for the start of the invoice item period. Must be less than or equal to `period.end`. - """ - type: Literal["max_item_period_start", "phase_start", "timestamp"] - """ - Select how to calculate the start of the invoice item period. - """ - - class UpdateParamsPhaseAddInvoiceItemPriceData(TypedDict): - 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). - """ - product: str - """ - The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to. - """ - tax_behavior: NotRequired[ - Literal["exclusive", "inclusive", "unspecified"] - ] - """ - Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. - """ - unit_amount: NotRequired[int] - """ - A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge or a negative integer representing the amount to credit to the customer. - """ - unit_amount_decimal: NotRequired[str] - """ - Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - """ - - class UpdateParamsPhaseAutomaticTax(TypedDict): - enabled: bool - """ - Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription. - """ - liability: NotRequired[ - "SubscriptionScheduleService.UpdateParamsPhaseAutomaticTaxLiability" - ] - """ - The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. - """ - - class UpdateParamsPhaseAutomaticTaxLiability(TypedDict): - account: NotRequired[str] - """ - The connected account being referenced when `type` is `account`. - """ - type: Literal["account", "self"] - """ - Type of the account referenced in the request. - """ - - class UpdateParamsPhaseBillingThresholds(TypedDict): - amount_gte: NotRequired[int] - """ - Monetary threshold that triggers the subscription to advance to a new billing period - """ - reset_billing_cycle_anchor: NotRequired[bool] - """ - Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. - """ - - class UpdateParamsPhaseDiscount(TypedDict): - coupon: NotRequired[str] - """ - ID of the coupon to create a new discount for. - """ - discount: NotRequired[str] - """ - ID of an existing discount on the object (or one of its ancestors) to reuse. - """ - discount_end: NotRequired[ - "SubscriptionScheduleService.UpdateParamsPhaseDiscountDiscountEnd" - ] - """ - Details to determine how long the discount should be applied for. - """ - promotion_code: NotRequired[str] - """ - ID of the promotion code to create a new discount for. - """ - - class UpdateParamsPhaseDiscountDiscountEnd(TypedDict): - duration: NotRequired[ - "SubscriptionScheduleService.UpdateParamsPhaseDiscountDiscountEndDuration" - ] - """ - Time span for the redeemed discount. - """ - timestamp: NotRequired[int] - """ - A precise Unix timestamp for the discount to end. Must be in the future. - """ - type: Literal["duration", "timestamp"] - """ - The type of calculation made to determine when the discount ends. - """ - - class UpdateParamsPhaseDiscountDiscountEndDuration(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. - """ - interval_count: int - """ - The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. - """ - - class UpdateParamsPhaseDuration(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Specifies phase duration. Either `day`, `week`, `month` or `year`. - """ - interval_count: NotRequired[int] - """ - The multiplier applied to the interval. - """ - - class UpdateParamsPhaseInvoiceSettings(TypedDict): - account_tax_ids: NotRequired["Literal['']|List[str]"] - """ - The account tax IDs associated with this phase of the subscription schedule. Will be set on invoices generated by this phase of the subscription schedule. - """ - days_until_due: NotRequired[int] - """ - Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `billing=charge_automatically`. - """ - issuer: NotRequired[ - "SubscriptionScheduleService.UpdateParamsPhaseInvoiceSettingsIssuer" - ] - """ - The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. - """ - - class UpdateParamsPhaseInvoiceSettingsIssuer(TypedDict): - account: NotRequired[str] - """ - The connected account being referenced when `type` is `account`. - """ - type: Literal["account", "self"] - """ - Type of the account referenced in the request. - """ - - class UpdateParamsPhaseItem(TypedDict): - billing_thresholds: NotRequired[ - "Literal['']|SubscriptionScheduleService.UpdateParamsPhaseItemBillingThresholds" - ] - """ - Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. - """ - discounts: NotRequired[ - "Literal['']|List[SubscriptionScheduleService.UpdateParamsPhaseItemDiscount]" - ] - """ - The coupons to redeem into discounts for the subscription item. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a configuration item. Metadata on a configuration item will update the underlying subscription item's `metadata` when the phase is entered, adding new keys and replacing existing keys. Individual keys in the subscription item's `metadata` can be unset by posting an empty value to them in the configuration item's `metadata`. To unset all keys in the subscription item's `metadata`, update the subscription item directly or unset every key individually from the configuration item's `metadata`. - """ - plan: NotRequired[str] - """ - The plan ID to subscribe to. You may specify the same ID in `plan` and `price`. - """ - price: NotRequired[str] - """ - The ID of the price object. - """ - price_data: NotRequired[ - "SubscriptionScheduleService.UpdateParamsPhaseItemPriceData" - ] - """ - Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. - """ - quantity: NotRequired[int] - """ - Quantity for the given price. Can be set only if the price's `usage_type` is `licensed` and not `metered`. - """ - tax_rates: NotRequired["Literal['']|List[str]"] - """ - A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. - """ - trial: NotRequired[ - "SubscriptionScheduleService.UpdateParamsPhaseItemTrial" - ] - """ - Options that configure the trial on the subscription item. - """ - - class UpdateParamsPhaseItemBillingThresholds(TypedDict): - usage_gte: int - """ - Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)) - """ - - class UpdateParamsPhaseItemDiscount(TypedDict): - coupon: NotRequired[str] - """ - ID of the coupon to create a new discount for. - """ - discount: NotRequired[str] - """ - ID of an existing discount on the object (or one of its ancestors) to reuse. - """ - discount_end: NotRequired[ - "SubscriptionScheduleService.UpdateParamsPhaseItemDiscountDiscountEnd" - ] - """ - Details to determine how long the discount should be applied for. - """ - promotion_code: NotRequired[str] - """ - ID of the promotion code to create a new discount for. - """ - - class UpdateParamsPhaseItemDiscountDiscountEnd(TypedDict): - duration: NotRequired[ - "SubscriptionScheduleService.UpdateParamsPhaseItemDiscountDiscountEndDuration" - ] - """ - Time span for the redeemed discount. - """ - timestamp: NotRequired[int] - """ - A precise Unix timestamp for the discount to end. Must be in the future. - """ - type: Literal["duration", "timestamp"] - """ - The type of calculation made to determine when the discount ends. - """ - - class UpdateParamsPhaseItemDiscountDiscountEndDuration(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. - """ - interval_count: int - """ - The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. - """ - - class UpdateParamsPhaseItemPriceData(TypedDict): - 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). - """ - product: str - """ - The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to. - """ - recurring: "SubscriptionScheduleService.UpdateParamsPhaseItemPriceDataRecurring" - """ - The recurring components of a price such as `interval` and `interval_count`. - """ - tax_behavior: NotRequired[ - Literal["exclusive", "inclusive", "unspecified"] - ] - """ - Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. - """ - unit_amount: NotRequired[int] - """ - A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. - """ - unit_amount_decimal: NotRequired[str] - """ - Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - """ - - class UpdateParamsPhaseItemPriceDataRecurring(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Specifies billing frequency. Either `day`, `week`, `month` or `year`. - """ - interval_count: NotRequired[int] - """ - The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). - """ - - class UpdateParamsPhaseItemTrial(TypedDict): - converts_to: NotRequired[List[str]] - """ - List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. - """ - type: Literal["free", "paid"] - """ - Determines the type of trial for this item. - """ - - class UpdateParamsPhasePauseCollection(TypedDict): - behavior: Literal["keep_as_draft", "mark_uncollectible", "void"] - """ - The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. - """ - - class UpdateParamsPhaseTransferData(TypedDict): - amount_percent: NotRequired[float] - """ - A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. - """ - destination: str - """ - ID of an existing, connected Stripe account. - """ - - class UpdateParamsPhaseTrialSettings(TypedDict): - end_behavior: NotRequired[ - "SubscriptionScheduleService.UpdateParamsPhaseTrialSettingsEndBehavior" - ] - """ - Defines how the subscription should behave when a trial ends. - """ - - class UpdateParamsPhaseTrialSettingsEndBehavior(TypedDict): - prorate_up_front: NotRequired[Literal["defer", "include"]] - """ - Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`. - """ - - class UpdateParamsPrebilling(TypedDict): - iterations: int - """ - This is used to determine the number of billing cycles to prebill. - """ - update_behavior: NotRequired[Literal["prebill", "reset"]] - """ - Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`. - """ - def list( self, - params: Optional["SubscriptionScheduleService.ListParams"] = None, + params: Optional["SubscriptionScheduleListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[SubscriptionSchedule]: """ @@ -2293,7 +54,7 @@ def list( async def list_async( self, - params: Optional["SubscriptionScheduleService.ListParams"] = None, + params: Optional["SubscriptionScheduleListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[SubscriptionSchedule]: """ @@ -2312,7 +73,7 @@ async def list_async( def create( self, - params: Optional["SubscriptionScheduleService.CreateParams"] = None, + params: Optional["SubscriptionScheduleCreateParams"] = None, options: Optional[RequestOptions] = None, ) -> SubscriptionSchedule: """ @@ -2331,7 +92,7 @@ def create( async def create_async( self, - params: Optional["SubscriptionScheduleService.CreateParams"] = None, + params: Optional["SubscriptionScheduleCreateParams"] = None, options: Optional[RequestOptions] = None, ) -> SubscriptionSchedule: """ @@ -2351,7 +112,7 @@ async def create_async( def retrieve( self, schedule: str, - params: Optional["SubscriptionScheduleService.RetrieveParams"] = None, + params: Optional["SubscriptionScheduleRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> SubscriptionSchedule: """ @@ -2373,7 +134,7 @@ def retrieve( async def retrieve_async( self, schedule: str, - params: Optional["SubscriptionScheduleService.RetrieveParams"] = None, + params: Optional["SubscriptionScheduleRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> SubscriptionSchedule: """ @@ -2395,7 +156,7 @@ async def retrieve_async( def update( self, schedule: str, - params: Optional["SubscriptionScheduleService.UpdateParams"] = None, + params: Optional["SubscriptionScheduleUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> SubscriptionSchedule: """ @@ -2417,7 +178,7 @@ def update( async def update_async( self, schedule: str, - params: Optional["SubscriptionScheduleService.UpdateParams"] = None, + params: Optional["SubscriptionScheduleUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> SubscriptionSchedule: """ @@ -2439,7 +200,7 @@ async def update_async( def amend( self, schedule: str, - params: Optional["SubscriptionScheduleService.AmendParams"] = None, + params: Optional["SubscriptionScheduleAmendParams"] = None, options: Optional[RequestOptions] = None, ) -> SubscriptionSchedule: """ @@ -2461,7 +222,7 @@ def amend( async def amend_async( self, schedule: str, - params: Optional["SubscriptionScheduleService.AmendParams"] = None, + params: Optional["SubscriptionScheduleAmendParams"] = None, options: Optional[RequestOptions] = None, ) -> SubscriptionSchedule: """ @@ -2483,7 +244,7 @@ async def amend_async( def cancel( self, schedule: str, - params: Optional["SubscriptionScheduleService.CancelParams"] = None, + params: Optional["SubscriptionScheduleCancelParams"] = None, options: Optional[RequestOptions] = None, ) -> SubscriptionSchedule: """ @@ -2505,7 +266,7 @@ def cancel( async def cancel_async( self, schedule: str, - params: Optional["SubscriptionScheduleService.CancelParams"] = None, + params: Optional["SubscriptionScheduleCancelParams"] = None, options: Optional[RequestOptions] = None, ) -> SubscriptionSchedule: """ @@ -2527,7 +288,7 @@ async def cancel_async( def release( self, schedule: str, - params: Optional["SubscriptionScheduleService.ReleaseParams"] = None, + params: Optional["SubscriptionScheduleReleaseParams"] = None, options: Optional[RequestOptions] = None, ) -> SubscriptionSchedule: """ @@ -2549,7 +310,7 @@ def release( async def release_async( self, schedule: str, - params: Optional["SubscriptionScheduleService.ReleaseParams"] = None, + params: Optional["SubscriptionScheduleReleaseParams"] = None, options: Optional[RequestOptions] = None, ) -> SubscriptionSchedule: """ diff --git a/stripe/_subscription_service.py b/stripe/_subscription_service.py index fb6c4f263..b5dabf44c 100644 --- a/stripe/_subscription_service.py +++ b/stripe/_subscription_service.py @@ -7,2327 +7,45 @@ from stripe._stripe_service import StripeService from stripe._subscription import Subscription from stripe._util import sanitize_id -from typing import Dict, List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params._subscription_attach_cadence_params import ( + SubscriptionAttachCadenceParams, + ) + from stripe.params._subscription_cancel_params import ( + SubscriptionCancelParams, + ) + from stripe.params._subscription_create_params import ( + SubscriptionCreateParams, + ) + from stripe.params._subscription_delete_discount_params import ( + SubscriptionDeleteDiscountParams, + ) + from stripe.params._subscription_list_params import SubscriptionListParams + from stripe.params._subscription_migrate_params import ( + SubscriptionMigrateParams, + ) + from stripe.params._subscription_resume_params import ( + SubscriptionResumeParams, + ) + from stripe.params._subscription_retrieve_params import ( + SubscriptionRetrieveParams, + ) + from stripe.params._subscription_search_params import ( + SubscriptionSearchParams, + ) + from stripe.params._subscription_update_params import ( + SubscriptionUpdateParams, + ) class SubscriptionService(StripeService): - class AttachCadenceParams(TypedDict): - billing_cadence: str - """ - The Billing Cadence which controls the timing of recurring invoice generation for this subscription. If unset, the subscription will bill according to its own configured schedule and create its own invoices. If set, this subscription will be billed by the cadence instead, potentially sharing invoices with the other subscriptions linked to that Cadence. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class CancelParams(TypedDict): - cancellation_details: NotRequired[ - "SubscriptionService.CancelParamsCancellationDetails" - ] - """ - Details about why this subscription was cancelled - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - invoice_now: NotRequired[bool] - """ - Will generate a final invoice that invoices for any un-invoiced metered usage and new/pending proration invoice items. Defaults to `false`. - """ - prorate: NotRequired[bool] - """ - Will generate a proration invoice item that credits remaining unused time until the subscription period end. Defaults to `false`. - """ - - class CancelParamsCancellationDetails(TypedDict): - comment: NotRequired["Literal['']|str"] - """ - Additional comments about why the user canceled the subscription, if the subscription was canceled explicitly by the user. - """ - feedback: NotRequired[ - "Literal['']|Literal['customer_service', 'low_quality', 'missing_features', 'other', 'switched_service', 'too_complex', 'too_expensive', 'unused']" - ] - """ - The customer submitted reason for why they canceled, if the subscription was canceled explicitly by the user. - """ - - class CreateParams(TypedDict): - add_invoice_items: NotRequired[ - List["SubscriptionService.CreateParamsAddInvoiceItem"] - ] - """ - A list of prices and quantities that will generate invoice items appended to the next invoice for this subscription. You may pass up to 20 items. - """ - application_fee_percent: NotRequired["Literal['']|float"] - """ - A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). - """ - automatic_tax: NotRequired[ - "SubscriptionService.CreateParamsAutomaticTax" - ] - """ - Automatic tax settings for this subscription. - """ - backdate_start_date: NotRequired[int] - """ - A past timestamp to backdate the subscription's start date to. If set, the first invoice will contain line items for the timespan between the start date and the current time. Can be combined with trials and the billing cycle anchor. - """ - billing_cadence: NotRequired[str] - """ - The Billing Cadence which controls the timing of recurring invoice generation for this subscription. If unset, the subscription will bill according to its own configured schedule and create its own invoices. If set, this subscription will be billed by the cadence instead, potentially sharing invoices with the other subscriptions linked to that Cadence. - """ - billing_cycle_anchor: NotRequired[int] - """ - A future timestamp in UTC format to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). The anchor is the reference point that aligns future billing cycle dates. It sets the day of week for `week` intervals, the day of month for `month` and `year` intervals, and the month of year for `year` intervals. - """ - billing_cycle_anchor_config: NotRequired[ - "SubscriptionService.CreateParamsBillingCycleAnchorConfig" - ] - """ - Mutually exclusive with billing_cycle_anchor and only valid with monthly and yearly price intervals. When provided, the billing_cycle_anchor is set to the next occurrence of the day_of_month at the hour, minute, and second UTC. - """ - billing_mode: NotRequired[ - "SubscriptionService.CreateParamsBillingMode" - ] - """ - Controls how prorations and invoices for subscriptions are calculated and orchestrated. - """ - billing_schedules: NotRequired[ - List["SubscriptionService.CreateParamsBillingSchedule"] - ] - """ - Sets the billing schedules for the subscription. - """ - billing_thresholds: NotRequired[ - "Literal['']|SubscriptionService.CreateParamsBillingThresholds" - ] - """ - Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. - """ - cancel_at: NotRequired[ - "int|Literal['max_period_end', 'min_period_end']" - ] - """ - A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period. - """ - cancel_at_period_end: NotRequired[bool] - """ - Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. - """ - collection_method: NotRequired[ - Literal["charge_automatically", "send_invoice"] - ] - """ - Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`. - """ - currency: NotRequired[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). - """ - customer: NotRequired[str] - """ - The identifier of the customer to subscribe. - """ - customer_account: NotRequired[str] - """ - The identifier of the account to subscribe. - """ - days_until_due: NotRequired[int] - """ - Number of days a customer has to pay invoices generated by this subscription. Valid only for subscriptions where `collection_method` is set to `send_invoice`. - """ - default_payment_method: NotRequired[str] - """ - ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over `default_source`. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). - """ - default_source: NotRequired[str] - """ - ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If `default_payment_method` is also set, `default_payment_method` will take precedence. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). - """ - default_tax_rates: NotRequired["Literal['']|List[str]"] - """ - The tax rates that will apply to any subscription item that does not have `tax_rates` set. Invoices created will have their `default_tax_rates` populated from the subscription. - """ - description: NotRequired[str] - """ - The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. - """ - discounts: NotRequired[ - "Literal['']|List[SubscriptionService.CreateParamsDiscount]" - ] - """ - The coupons to redeem into discounts for the subscription. If not specified or empty, inherits the discount from the subscription's customer. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - invoice_settings: NotRequired[ - "SubscriptionService.CreateParamsInvoiceSettings" - ] - """ - All invoices will be billed using the specified settings. - """ - items: NotRequired[List["SubscriptionService.CreateParamsItem"]] - """ - A list of up to 20 subscription items, each with an attached price. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - off_session: NotRequired[bool] - """ - Indicates if a customer is on or off-session while an invoice payment is attempted. Defaults to `false` (on-session). - """ - on_behalf_of: NotRequired["Literal['']|str"] - """ - The account on behalf of which to charge, for each of the subscription's invoices. - """ - payment_behavior: NotRequired[ - Literal[ - "allow_incomplete", - "default_incomplete", - "error_if_incomplete", - "pending_if_incomplete", - ] - ] - """ - Only applies to subscriptions with `collection_method=charge_automatically`. - - Use `allow_incomplete` to create Subscriptions with `status=incomplete` if the first invoice can't be paid. Creating Subscriptions with this status allows you to manage scenarios where additional customer actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior. - - Use `default_incomplete` to create Subscriptions with `status=incomplete` when the first invoice requires payment, otherwise start as active. Subscriptions transition to `status=active` when successfully confirming the PaymentIntent on the first invoice. This allows simpler management of scenarios where additional customer actions are needed to pay a subscription's invoice, such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. If the PaymentIntent is not confirmed within 23 hours Subscriptions transition to `status=incomplete_expired`, which is a terminal state. - - Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's first invoice can't be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further customer action is needed, this parameter doesn't create a Subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more. - - `pending_if_incomplete` is only used with updates and cannot be passed when creating a Subscription. - - Subscriptions with `collection_method=send_invoice` are automatically activated regardless of the first Invoice status. - """ - payment_settings: NotRequired[ - "SubscriptionService.CreateParamsPaymentSettings" - ] - """ - Payment settings to pass to invoices created by the subscription. - """ - pending_invoice_item_interval: NotRequired[ - "Literal['']|SubscriptionService.CreateParamsPendingInvoiceItemInterval" - ] - """ - Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval. - """ - prebilling: NotRequired["SubscriptionService.CreateParamsPrebilling"] - """ - If specified, the invoicing for the given billing cycle iterations will be processed now. - """ - proration_behavior: NotRequired[ - Literal["always_invoice", "create_prorations", "none"] - ] - """ - Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) resulting from the `billing_cycle_anchor`. If no value is passed, the default is `create_prorations`. - """ - transfer_data: NotRequired[ - "SubscriptionService.CreateParamsTransferData" - ] - """ - If specified, the funds from the subscription's invoices will be transferred to the destination and the ID of the resulting transfers will be found on the resulting charges. - """ - trial_end: NotRequired["Literal['now']|int"] - """ - Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. If set, trial_end will override the default trial period of the plan the customer is being subscribed to. The special value `now` can be provided to end the customer's trial immediately. Can be at most two years from `billing_cycle_anchor`. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. - """ - trial_from_plan: NotRequired[bool] - """ - Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. - """ - trial_period_days: NotRequired[int] - """ - Integer representing the number of trial period days before the customer is charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. - """ - trial_settings: NotRequired[ - "SubscriptionService.CreateParamsTrialSettings" - ] - """ - Settings related to subscription trials. - """ - - class CreateParamsAddInvoiceItem(TypedDict): - discounts: NotRequired[ - List["SubscriptionService.CreateParamsAddInvoiceItemDiscount"] - ] - """ - The coupons to redeem into discounts for the item. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - period: NotRequired[ - "SubscriptionService.CreateParamsAddInvoiceItemPeriod" - ] - """ - The period associated with this invoice item. If not set, `period.start.type` defaults to `max_item_period_start` and `period.end.type` defaults to `min_item_period_end`. - """ - price: NotRequired[str] - """ - The ID of the price object. One of `price` or `price_data` is required. - """ - price_data: NotRequired[ - "SubscriptionService.CreateParamsAddInvoiceItemPriceData" - ] - """ - Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. - """ - quantity: NotRequired[int] - """ - Quantity for this item. Defaults to 1. - """ - tax_rates: NotRequired["Literal['']|List[str]"] - """ - The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item. - """ - - class CreateParamsAddInvoiceItemDiscount(TypedDict): - coupon: NotRequired[str] - """ - ID of the coupon to create a new discount for. - """ - discount: NotRequired[str] - """ - ID of an existing discount on the object (or one of its ancestors) to reuse. - """ - discount_end: NotRequired[ - "SubscriptionService.CreateParamsAddInvoiceItemDiscountDiscountEnd" - ] - """ - Details to determine how long the discount should be applied for. - """ - promotion_code: NotRequired[str] - """ - ID of the promotion code to create a new discount for. - """ - - class CreateParamsAddInvoiceItemDiscountDiscountEnd(TypedDict): - duration: NotRequired[ - "SubscriptionService.CreateParamsAddInvoiceItemDiscountDiscountEndDuration" - ] - """ - Time span for the redeemed discount. - """ - timestamp: NotRequired[int] - """ - A precise Unix timestamp for the discount to end. Must be in the future. - """ - type: Literal["duration", "timestamp"] - """ - The type of calculation made to determine when the discount ends. - """ - - class CreateParamsAddInvoiceItemDiscountDiscountEndDuration(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. - """ - interval_count: int - """ - The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. - """ - - class CreateParamsAddInvoiceItemPeriod(TypedDict): - end: "SubscriptionService.CreateParamsAddInvoiceItemPeriodEnd" - """ - End of the invoice item period. - """ - start: "SubscriptionService.CreateParamsAddInvoiceItemPeriodStart" - """ - Start of the invoice item period. - """ - - class CreateParamsAddInvoiceItemPeriodEnd(TypedDict): - timestamp: NotRequired[int] - """ - A precise Unix timestamp for the end of the invoice item period. Must be greater than or equal to `period.start`. - """ - type: Literal["min_item_period_end", "timestamp"] - """ - Select how to calculate the end of the invoice item period. - """ - - class CreateParamsAddInvoiceItemPeriodStart(TypedDict): - timestamp: NotRequired[int] - """ - A precise Unix timestamp for the start of the invoice item period. Must be less than or equal to `period.end`. - """ - type: Literal["max_item_period_start", "now", "timestamp"] - """ - Select how to calculate the start of the invoice item period. - """ - - class CreateParamsAddInvoiceItemPriceData(TypedDict): - 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). - """ - product: str - """ - The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to. - """ - tax_behavior: NotRequired[ - Literal["exclusive", "inclusive", "unspecified"] - ] - """ - Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. - """ - unit_amount: NotRequired[int] - """ - A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge or a negative integer representing the amount to credit to the customer. - """ - unit_amount_decimal: NotRequired[str] - """ - Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - """ - - class CreateParamsAutomaticTax(TypedDict): - enabled: bool - """ - Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription. - """ - liability: NotRequired[ - "SubscriptionService.CreateParamsAutomaticTaxLiability" - ] - """ - The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. - """ - - class CreateParamsAutomaticTaxLiability(TypedDict): - account: NotRequired[str] - """ - The connected account being referenced when `type` is `account`. - """ - type: Literal["account", "self"] - """ - Type of the account referenced in the request. - """ - - class CreateParamsBillingCycleAnchorConfig(TypedDict): - day_of_month: int - """ - The day of the month the anchor should be. Ranges from 1 to 31. - """ - hour: NotRequired[int] - """ - The hour of the day the anchor should be. Ranges from 0 to 23. - """ - minute: NotRequired[int] - """ - The minute of the hour the anchor should be. Ranges from 0 to 59. - """ - month: NotRequired[int] - """ - The month to start full cycle periods. Ranges from 1 to 12. - """ - second: NotRequired[int] - """ - The second of the minute the anchor should be. Ranges from 0 to 59. - """ - - class CreateParamsBillingMode(TypedDict): - flexible: NotRequired[ - "SubscriptionService.CreateParamsBillingModeFlexible" - ] - """ - Configure behavior for flexible billing mode. - """ - type: Literal["classic", "flexible"] - """ - Controls the calculation and orchestration of prorations and invoices for subscriptions. If no value is passed, the default is `flexible`. - """ - - class CreateParamsBillingModeFlexible(TypedDict): - proration_discounts: NotRequired[Literal["included", "itemized"]] - """ - Controls how invoices and invoice items display proration amounts and discount amounts. - """ - - class CreateParamsBillingSchedule(TypedDict): - applies_to: NotRequired[ - List["SubscriptionService.CreateParamsBillingScheduleAppliesTo"] - ] - """ - Configure billing schedule differently for individual subscription items. - """ - bill_until: "SubscriptionService.CreateParamsBillingScheduleBillUntil" - """ - The end date for the billing schedule. - """ - key: NotRequired[str] - """ - Specify a key for the billing schedule. Must be unique to this field, alphanumeric, and up to 200 characters. If not provided, a unique key will be generated. - """ - - class CreateParamsBillingScheduleAppliesTo(TypedDict): - price: NotRequired[str] - """ - The ID of the price object. - """ - type: Literal["price"] - """ - Controls which subscription items the billing schedule applies to. - """ - - class CreateParamsBillingScheduleBillUntil(TypedDict): - duration: NotRequired[ - "SubscriptionService.CreateParamsBillingScheduleBillUntilDuration" - ] - """ - Specifies the billing period. - """ - timestamp: NotRequired[int] - """ - The end date of the billing schedule. - """ - type: Literal["duration", "timestamp"] - """ - Describes how the billing schedule will determine the end date. Either `duration` or `timestamp`. - """ - - class CreateParamsBillingScheduleBillUntilDuration(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Specifies billing duration. Either `day`, `week`, `month` or `year`. - """ - interval_count: NotRequired[int] - """ - The multiplier applied to the interval. - """ - - class CreateParamsBillingThresholds(TypedDict): - amount_gte: NotRequired[int] - """ - Monetary threshold that triggers the subscription to advance to a new billing period - """ - reset_billing_cycle_anchor: NotRequired[bool] - """ - Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. - """ - - class CreateParamsDiscount(TypedDict): - coupon: NotRequired[str] - """ - ID of the coupon to create a new discount for. - """ - discount: NotRequired[str] - """ - ID of an existing discount on the object (or one of its ancestors) to reuse. - """ - discount_end: NotRequired[ - "SubscriptionService.CreateParamsDiscountDiscountEnd" - ] - """ - Details to determine how long the discount should be applied for. - """ - promotion_code: NotRequired[str] - """ - ID of the promotion code to create a new discount for. - """ - - class CreateParamsDiscountDiscountEnd(TypedDict): - duration: NotRequired[ - "SubscriptionService.CreateParamsDiscountDiscountEndDuration" - ] - """ - Time span for the redeemed discount. - """ - timestamp: NotRequired[int] - """ - A precise Unix timestamp for the discount to end. Must be in the future. - """ - type: Literal["duration", "timestamp"] - """ - The type of calculation made to determine when the discount ends. - """ - - class CreateParamsDiscountDiscountEndDuration(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. - """ - interval_count: int - """ - The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. - """ - - class CreateParamsInvoiceSettings(TypedDict): - account_tax_ids: NotRequired["Literal['']|List[str]"] - """ - The account tax IDs associated with the subscription. Will be set on invoices generated by the subscription. - """ - issuer: NotRequired[ - "SubscriptionService.CreateParamsInvoiceSettingsIssuer" - ] - """ - The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. - """ - - class CreateParamsInvoiceSettingsIssuer(TypedDict): - account: NotRequired[str] - """ - The connected account being referenced when `type` is `account`. - """ - type: Literal["account", "self"] - """ - Type of the account referenced in the request. - """ - - class CreateParamsItem(TypedDict): - billing_thresholds: NotRequired[ - "Literal['']|SubscriptionService.CreateParamsItemBillingThresholds" - ] - """ - Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. - """ - discounts: NotRequired[ - "Literal['']|List[SubscriptionService.CreateParamsItemDiscount]" - ] - """ - The coupons to redeem into discounts for the subscription item. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - plan: NotRequired[str] - """ - Plan ID for this item, as a string. - """ - price: NotRequired[str] - """ - The ID of the price object. - """ - price_data: NotRequired[ - "SubscriptionService.CreateParamsItemPriceData" - ] - """ - Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. - """ - quantity: NotRequired[int] - """ - Quantity for this item. - """ - tax_rates: NotRequired["Literal['']|List[str]"] - """ - A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. - """ - trial: NotRequired["SubscriptionService.CreateParamsItemTrial"] - """ - Define options to configure the trial on the subscription item. - """ - - class CreateParamsItemBillingThresholds(TypedDict): - usage_gte: int - """ - Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)) - """ - - class CreateParamsItemDiscount(TypedDict): - coupon: NotRequired[str] - """ - ID of the coupon to create a new discount for. - """ - discount: NotRequired[str] - """ - ID of an existing discount on the object (or one of its ancestors) to reuse. - """ - discount_end: NotRequired[ - "SubscriptionService.CreateParamsItemDiscountDiscountEnd" - ] - """ - Details to determine how long the discount should be applied for. - """ - promotion_code: NotRequired[str] - """ - ID of the promotion code to create a new discount for. - """ - - class CreateParamsItemDiscountDiscountEnd(TypedDict): - duration: NotRequired[ - "SubscriptionService.CreateParamsItemDiscountDiscountEndDuration" - ] - """ - Time span for the redeemed discount. - """ - timestamp: NotRequired[int] - """ - A precise Unix timestamp for the discount to end. Must be in the future. - """ - type: Literal["duration", "timestamp"] - """ - The type of calculation made to determine when the discount ends. - """ - - class CreateParamsItemDiscountDiscountEndDuration(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. - """ - interval_count: int - """ - The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. - """ - - class CreateParamsItemPriceData(TypedDict): - 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). - """ - product: str - """ - The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to. - """ - recurring: "SubscriptionService.CreateParamsItemPriceDataRecurring" - """ - The recurring components of a price such as `interval` and `interval_count`. - """ - tax_behavior: NotRequired[ - Literal["exclusive", "inclusive", "unspecified"] - ] - """ - Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. - """ - unit_amount: NotRequired[int] - """ - A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. - """ - unit_amount_decimal: NotRequired[str] - """ - Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - """ - - class CreateParamsItemPriceDataRecurring(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Specifies billing frequency. Either `day`, `week`, `month` or `year`. - """ - interval_count: NotRequired[int] - """ - The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). - """ - - class CreateParamsItemTrial(TypedDict): - converts_to: NotRequired[List[str]] - """ - List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. - """ - type: Literal["free", "paid"] - """ - Determines the type of trial for this item. - """ - - class CreateParamsPaymentSettings(TypedDict): - payment_method_options: NotRequired[ - "SubscriptionService.CreateParamsPaymentSettingsPaymentMethodOptions" - ] - """ - Payment-method-specific configuration to provide to invoices created by the subscription. - """ - payment_method_types: NotRequired[ - "Literal['']|List[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'affirm', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'boleto', 'card', 'cashapp', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'id_bank_transfer', 'ideal', 'jp_credit_transfer', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'multibanco', 'naver_pay', 'nz_bank_account', 'p24', 'payco', 'paynow', 'paypal', 'pix', 'promptpay', 'revolut_pay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'stripe_balance', 'swish', 'upi', 'us_bank_account', 'wechat_pay']]" - ] - """ - The list of payment method types (e.g. card) to provide to the invoice's PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice's default payment method, the subscription's default payment method, the customer's default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). Should not be specified with payment_method_configuration - """ - save_default_payment_method: NotRequired[ - Literal["off", "on_subscription"] - ] - """ - Configure whether Stripe updates `subscription.default_payment_method` when payment succeeds. Defaults to `off` if unspecified. - """ - - class CreateParamsPaymentSettingsPaymentMethodOptions(TypedDict): - acss_debit: NotRequired[ - "Literal['']|SubscriptionService.CreateParamsPaymentSettingsPaymentMethodOptionsAcssDebit" - ] - """ - This sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice's PaymentIntent. - """ - bancontact: NotRequired[ - "Literal['']|SubscriptionService.CreateParamsPaymentSettingsPaymentMethodOptionsBancontact" - ] - """ - This sub-hash contains details about the Bancontact payment method options to pass to the invoice's PaymentIntent. - """ - card: NotRequired[ - "Literal['']|SubscriptionService.CreateParamsPaymentSettingsPaymentMethodOptionsCard" - ] - """ - This sub-hash contains details about the Card payment method options to pass to the invoice's PaymentIntent. - """ - customer_balance: NotRequired[ - "Literal['']|SubscriptionService.CreateParamsPaymentSettingsPaymentMethodOptionsCustomerBalance" - ] - """ - This sub-hash contains details about the Bank transfer payment method options to pass to the invoice's PaymentIntent. - """ - id_bank_transfer: NotRequired[ - "Literal['']|SubscriptionService.CreateParamsPaymentSettingsPaymentMethodOptionsIdBankTransfer" - ] - """ - This sub-hash contains details about the Indonesia bank transfer payment method options to pass to the invoice's PaymentIntent. - """ - konbini: NotRequired[ - "Literal['']|SubscriptionService.CreateParamsPaymentSettingsPaymentMethodOptionsKonbini" - ] - """ - This sub-hash contains details about the Konbini payment method options to pass to the invoice's PaymentIntent. - """ - pix: NotRequired[ - "Literal['']|SubscriptionService.CreateParamsPaymentSettingsPaymentMethodOptionsPix" - ] - """ - This sub-hash contains details about the Pix payment method options to pass to the invoice's PaymentIntent. - """ - sepa_debit: NotRequired[ - "Literal['']|SubscriptionService.CreateParamsPaymentSettingsPaymentMethodOptionsSepaDebit" - ] - """ - This sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice's PaymentIntent. - """ - upi: NotRequired[ - "Literal['']|SubscriptionService.CreateParamsPaymentSettingsPaymentMethodOptionsUpi" - ] - """ - This sub-hash contains details about the UPI payment method options to pass to the invoice's PaymentIntent. - """ - us_bank_account: NotRequired[ - "Literal['']|SubscriptionService.CreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccount" - ] - """ - This sub-hash contains details about the ACH direct debit payment method options to pass to the invoice's PaymentIntent. - """ - - class CreateParamsPaymentSettingsPaymentMethodOptionsAcssDebit(TypedDict): - mandate_options: NotRequired[ - "SubscriptionService.CreateParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions" - ] - """ - Additional fields for Mandate creation - """ - verification_method: NotRequired[ - Literal["automatic", "instant", "microdeposits"] - ] - """ - Verification method for the intent - """ - - class CreateParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions( - TypedDict, - ): - transaction_type: NotRequired[Literal["business", "personal"]] - """ - Transaction type of the mandate. - """ - - class CreateParamsPaymentSettingsPaymentMethodOptionsBancontact(TypedDict): - preferred_language: NotRequired[Literal["de", "en", "fr", "nl"]] - """ - Preferred language of the Bancontact authorization page that the customer is redirected to. - """ - - class CreateParamsPaymentSettingsPaymentMethodOptionsCard(TypedDict): - mandate_options: NotRequired[ - "SubscriptionService.CreateParamsPaymentSettingsPaymentMethodOptionsCardMandateOptions" - ] - """ - Configuration options for setting up an eMandate for cards issued in India. - """ - network: NotRequired[ - Literal[ - "amex", - "cartes_bancaires", - "diners", - "discover", - "eftpos_au", - "girocard", - "interac", - "jcb", - "link", - "mastercard", - "unionpay", - "unknown", - "visa", - ] - ] - """ - Selected network to process this Subscription on. Depends on the available networks of the card attached to the Subscription. Can be only set confirm-time. - """ - request_three_d_secure: NotRequired[ - Literal["any", "automatic", "challenge"] - ] - """ - We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. - """ - - class CreateParamsPaymentSettingsPaymentMethodOptionsCardMandateOptions( - TypedDict, - ): - amount: NotRequired[int] - """ - Amount to be charged for future payments. - """ - amount_type: NotRequired[Literal["fixed", "maximum"]] - """ - One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. - """ - description: NotRequired[str] - """ - A description of the mandate or subscription that is meant to be displayed to the customer. - """ - - class CreateParamsPaymentSettingsPaymentMethodOptionsCustomerBalance( - TypedDict, - ): - bank_transfer: NotRequired[ - "SubscriptionService.CreateParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransfer" - ] - """ - Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. - """ - funding_type: NotRequired[str] - """ - The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. - """ - - class CreateParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransfer( - TypedDict, - ): - eu_bank_transfer: NotRequired[ - "SubscriptionService.CreateParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer" - ] - """ - Configuration for eu_bank_transfer funding type. - """ - type: NotRequired[str] - """ - The bank transfer type that can be used for funding. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. - """ - - class CreateParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer( - TypedDict, - ): - country: str - """ - The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. - """ - - class CreateParamsPaymentSettingsPaymentMethodOptionsIdBankTransfer( - TypedDict, - ): - pass - - class CreateParamsPaymentSettingsPaymentMethodOptionsKonbini(TypedDict): - pass - - class CreateParamsPaymentSettingsPaymentMethodOptionsPix(TypedDict): - mandate_options: NotRequired[ - "SubscriptionService.CreateParamsPaymentSettingsPaymentMethodOptionsPixMandateOptions" - ] - """ - Configuration options for setting up a mandate - """ - - class CreateParamsPaymentSettingsPaymentMethodOptionsPixMandateOptions( - TypedDict, - ): - amount: NotRequired[int] - """ - Amount to be charged for future payments. If not provided, defaults to 40000. - """ - amount_includes_iof: NotRequired[Literal["always", "never"]] - """ - Determines if the amount includes the IOF tax. Defaults to `never`. - """ - end_date: NotRequired[str] - """ - Date when the mandate expires and no further payments will be charged, in `YYYY-MM-DD`. If not provided, the mandate will be active until canceled. - """ - payment_schedule: NotRequired[ - Literal["halfyearly", "monthly", "quarterly", "weekly", "yearly"] - ] - """ - Schedule at which the future payments will be charged. Defaults to `weekly`. - """ - - class CreateParamsPaymentSettingsPaymentMethodOptionsSepaDebit(TypedDict): - pass - - class CreateParamsPaymentSettingsPaymentMethodOptionsUpi(TypedDict): - mandate_options: NotRequired[ - "SubscriptionService.CreateParamsPaymentSettingsPaymentMethodOptionsUpiMandateOptions" - ] - """ - Configuration options for setting up an eMandate - """ - - class CreateParamsPaymentSettingsPaymentMethodOptionsUpiMandateOptions( - TypedDict, - ): - amount: NotRequired[int] - """ - Amount to be charged for future payments. - """ - amount_type: NotRequired[Literal["fixed", "maximum"]] - """ - One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. - """ - description: NotRequired[str] - """ - A description of the mandate or subscription that is meant to be displayed to the customer. - """ - end_date: NotRequired[int] - """ - End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. - """ - - class CreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccount( - TypedDict, - ): - financial_connections: NotRequired[ - "SubscriptionService.CreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections" - ] - """ - Additional fields for Financial Connections Session creation - """ - verification_method: NotRequired[ - Literal["automatic", "instant", "microdeposits"] - ] - """ - Verification method for the intent - """ - - class CreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections( - TypedDict, - ): - filters: NotRequired[ - "SubscriptionService.CreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters" - ] - """ - Provide filters for the linked accounts that the customer can select for the payment method. - """ - permissions: NotRequired[ - List[ - Literal[ - "balances", "ownership", "payment_method", "transactions" - ] - ] - ] - """ - The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. - """ - prefetch: NotRequired[ - List[ - Literal[ - "balances", - "inferred_balances", - "ownership", - "transactions", - ] - ] - ] - """ - List of data features that you would like to retrieve upon account creation. - """ - - class CreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters( - TypedDict, - ): - account_subcategories: NotRequired[ - List[Literal["checking", "savings"]] - ] - """ - The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`. - """ - institution: NotRequired[str] - """ - ID of the institution to use to filter for selectable accounts. - """ - - class CreateParamsPendingInvoiceItemInterval(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Specifies invoicing frequency. Either `day`, `week`, `month` or `year`. - """ - interval_count: NotRequired[int] - """ - The number of intervals between invoices. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). - """ - - class CreateParamsPrebilling(TypedDict): - iterations: int - """ - This is used to determine the number of billing cycles to prebill. - """ - update_behavior: NotRequired[Literal["prebill", "reset"]] - """ - Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`. - """ - - class CreateParamsTransferData(TypedDict): - amount_percent: NotRequired[float] - """ - A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. - """ - destination: str - """ - ID of an existing, connected Stripe account. - """ - - class CreateParamsTrialSettings(TypedDict): - end_behavior: ( - "SubscriptionService.CreateParamsTrialSettingsEndBehavior" - ) - """ - Defines how the subscription should behave when the user's free trial ends. - """ - - class CreateParamsTrialSettingsEndBehavior(TypedDict): - missing_payment_method: Literal["cancel", "create_invoice", "pause"] - """ - Indicates how the subscription should change when the trial ends if the user did not provide a payment method. - """ - - class DeleteDiscountParams(TypedDict): - pass - - class ListParams(TypedDict): - automatic_tax: NotRequired[ - "SubscriptionService.ListParamsAutomaticTax" - ] - """ - Filter subscriptions by their automatic tax settings. - """ - collection_method: NotRequired[ - Literal["charge_automatically", "send_invoice"] - ] - """ - The collection method of the subscriptions to retrieve. Either `charge_automatically` or `send_invoice`. - """ - created: NotRequired["SubscriptionService.ListParamsCreated|int"] - """ - Only return subscriptions that were created during the given date interval. - """ - current_period_end: NotRequired[ - "SubscriptionService.ListParamsCurrentPeriodEnd|int" - ] - """ - Only return subscriptions whose minimum item current_period_end falls within the given date interval. - """ - current_period_start: NotRequired[ - "SubscriptionService.ListParamsCurrentPeriodStart|int" - ] - """ - Only return subscriptions whose maximum item current_period_start falls within the given date interval. - """ - customer: NotRequired[str] - """ - The ID of the customer whose subscriptions will be retrieved. - """ - customer_account: NotRequired[str] - """ - The ID of the account whose subscriptions will be retrieved. - """ - 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. - """ - plan: NotRequired[str] - """ - The ID of the plan whose subscriptions will be retrieved. - """ - price: NotRequired[str] - """ - Filter for subscriptions that contain this recurring price ID. - """ - 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. - """ - status: NotRequired[ - Literal[ - "active", - "all", - "canceled", - "ended", - "incomplete", - "incomplete_expired", - "past_due", - "paused", - "trialing", - "unpaid", - ] - ] - """ - The status of the subscriptions to retrieve. Passing in a value of `canceled` will return all canceled subscriptions, including those belonging to deleted customers. Pass `ended` to find subscriptions that are canceled and subscriptions that are expired due to [incomplete payment](https://stripe.com/docs/billing/subscriptions/overview#subscription-statuses). Passing in a value of `all` will return subscriptions of all statuses. If no value is supplied, all subscriptions that have not been canceled are returned. - """ - test_clock: NotRequired[str] - """ - Filter for subscriptions that are associated with the specified test clock. The response will not include subscriptions with test clocks if this and the customer parameter is not set. - """ - - class ListParamsAutomaticTax(TypedDict): - enabled: bool - """ - Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription. - """ - - class ListParamsCreated(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) - """ - - class ListParamsCurrentPeriodEnd(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) - """ - - class ListParamsCurrentPeriodStart(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) - """ - - class MigrateParams(TypedDict): - billing_mode: "SubscriptionService.MigrateParamsBillingMode" - """ - Controls how prorations and invoices for subscriptions are calculated and orchestrated. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class MigrateParamsBillingMode(TypedDict): - flexible: NotRequired[ - "SubscriptionService.MigrateParamsBillingModeFlexible" - ] - """ - Configure behavior for flexible billing mode. - """ - type: Literal["flexible"] - """ - Controls the calculation and orchestration of prorations and invoices for subscriptions. - """ - - class MigrateParamsBillingModeFlexible(TypedDict): - proration_discounts: NotRequired[Literal["included", "itemized"]] - """ - Controls how invoices and invoice items display proration amounts and discount amounts. - """ - - class ResumeParams(TypedDict): - billing_cycle_anchor: NotRequired[Literal["now", "unchanged"]] - """ - The billing cycle anchor that applies when the subscription is resumed. Either `now` or `unchanged`. The default is `now`. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - proration_behavior: NotRequired[ - Literal["always_invoice", "create_prorations", "none"] - ] - """ - Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) resulting from the `billing_cycle_anchor` being `unchanged`. When the `billing_cycle_anchor` is set to `now` (default value), no prorations are generated. If no value is passed, the default is `create_prorations`. - """ - proration_date: NotRequired[int] - """ - If set, prorations will be calculated as though the subscription was resumed at the given time. This can be used to apply exactly the same prorations that were previewed with the [create preview](https://stripe.com/docs/api/invoices/create_preview) endpoint. - """ - - class RetrieveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class SearchParams(TypedDict): - 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. - """ - page: NotRequired[str] - """ - A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. - """ - query: str - """ - The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for subscriptions](https://stripe.com/docs/search#query-fields-for-subscriptions). - """ - - class UpdateParams(TypedDict): - add_invoice_items: NotRequired[ - List["SubscriptionService.UpdateParamsAddInvoiceItem"] - ] - """ - A list of prices and quantities that will generate invoice items appended to the next invoice for this subscription. You may pass up to 20 items. - """ - application_fee_percent: NotRequired["Literal['']|float"] - """ - A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). - """ - automatic_tax: NotRequired[ - "SubscriptionService.UpdateParamsAutomaticTax" - ] - """ - Automatic tax settings for this subscription. We recommend you only include this parameter when the existing value is being changed. - """ - billing_cadence: NotRequired[str] - """ - The Billing Cadence which controls the timing of recurring invoice generation for this subscription. If unset, the subscription will bill according to its own configured schedule and create its own invoices. If set, this subscription will be billed by the cadence instead, potentially sharing invoices with the other subscriptions linked to that Cadence. - """ - billing_cycle_anchor: NotRequired[Literal["now", "unchanged"]] - """ - Either `now` or `unchanged`. Setting the value to `now` resets the subscription's billing cycle anchor to the current time (in UTC). For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). - """ - billing_schedules: NotRequired[ - "Literal['']|List[SubscriptionService.UpdateParamsBillingSchedule]" - ] - """ - Sets the billing schedules for the subscription. - """ - billing_thresholds: NotRequired[ - "Literal['']|SubscriptionService.UpdateParamsBillingThresholds" - ] - """ - Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. - """ - cancel_at: NotRequired[ - "Literal['']|int|Literal['max_period_end', 'min_period_end']" - ] - """ - A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period. - """ - cancel_at_period_end: NotRequired[bool] - """ - Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. - """ - cancellation_details: NotRequired[ - "SubscriptionService.UpdateParamsCancellationDetails" - ] - """ - Details about why this subscription was cancelled - """ - collection_method: NotRequired[ - Literal["charge_automatically", "send_invoice"] - ] - """ - Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`. - """ - days_until_due: NotRequired[int] - """ - Number of days a customer has to pay invoices generated by this subscription. Valid only for subscriptions where `collection_method` is set to `send_invoice`. - """ - default_payment_method: NotRequired[str] - """ - ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over `default_source`. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). - """ - default_source: NotRequired["Literal['']|str"] - """ - ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If `default_payment_method` is also set, `default_payment_method` will take precedence. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). - """ - default_tax_rates: NotRequired["Literal['']|List[str]"] - """ - The tax rates that will apply to any subscription item that does not have `tax_rates` set. Invoices created will have their `default_tax_rates` populated from the subscription. Pass an empty string to remove previously-defined tax rates. - """ - description: NotRequired["Literal['']|str"] - """ - The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. - """ - discounts: NotRequired[ - "Literal['']|List[SubscriptionService.UpdateParamsDiscount]" - ] - """ - The coupons to redeem into discounts for the subscription. If not specified or empty, inherits the discount from the subscription's customer. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - invoice_settings: NotRequired[ - "SubscriptionService.UpdateParamsInvoiceSettings" - ] - """ - All invoices will be billed using the specified settings. - """ - items: NotRequired[List["SubscriptionService.UpdateParamsItem"]] - """ - A list of up to 20 subscription items, each with an attached price. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - off_session: NotRequired[bool] - """ - Indicates if a customer is on or off-session while an invoice payment is attempted. Defaults to `false` (on-session). - """ - on_behalf_of: NotRequired["Literal['']|str"] - """ - The account on behalf of which to charge, for each of the subscription's invoices. - """ - pause_collection: NotRequired[ - "Literal['']|SubscriptionService.UpdateParamsPauseCollection" - ] - """ - If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment). - """ - payment_behavior: NotRequired[ - Literal[ - "allow_incomplete", - "default_incomplete", - "error_if_incomplete", - "pending_if_incomplete", - ] - ] - """ - Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior. - - Use `default_incomplete` to transition the subscription to `status=past_due` when payment is required and await explicit confirmation of the invoice's payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription's invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. - - Use `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes). - - Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://docs.stripe.com/changelog/2019-03-14) to learn more. - """ - payment_settings: NotRequired[ - "SubscriptionService.UpdateParamsPaymentSettings" - ] - """ - Payment settings to pass to invoices created by the subscription. - """ - pending_invoice_item_interval: NotRequired[ - "Literal['']|SubscriptionService.UpdateParamsPendingInvoiceItemInterval" - ] - """ - Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval. - """ - prebilling: NotRequired["SubscriptionService.UpdateParamsPrebilling"] - """ - If specified, the invoicing for the given billing cycle iterations will be processed now. - """ - proration_behavior: NotRequired[ - Literal["always_invoice", "create_prorations", "none"] - ] - """ - Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`. - """ - proration_date: NotRequired[int] - """ - If set, prorations will be calculated as though the subscription was updated at the given time. This can be used to apply exactly the same prorations that were previewed with the [create preview](https://stripe.com/docs/api/invoices/create_preview) endpoint. `proration_date` can also be used to implement custom proration logic, such as prorating by day instead of by second, by providing the time that you wish to use for proration calculations. - """ - transfer_data: NotRequired[ - "Literal['']|SubscriptionService.UpdateParamsTransferData" - ] - """ - If specified, the funds from the subscription's invoices will be transferred to the destination and the ID of the resulting transfers will be found on the resulting charges. This will be unset if you POST an empty value. - """ - trial_end: NotRequired["Literal['now']|int"] - """ - Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. If set, `trial_end` will override the default trial period of the plan the customer is being subscribed to. The `billing_cycle_anchor` will be updated to the `trial_end` value. The special value `now` can be provided to end the customer's trial immediately. Can be at most two years from `billing_cycle_anchor`. - """ - trial_from_plan: NotRequired[bool] - """ - Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. - """ - trial_settings: NotRequired[ - "SubscriptionService.UpdateParamsTrialSettings" - ] - """ - Settings related to subscription trials. - """ - - class UpdateParamsAddInvoiceItem(TypedDict): - discounts: NotRequired[ - List["SubscriptionService.UpdateParamsAddInvoiceItemDiscount"] - ] - """ - The coupons to redeem into discounts for the item. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - period: NotRequired[ - "SubscriptionService.UpdateParamsAddInvoiceItemPeriod" - ] - """ - The period associated with this invoice item. If not set, `period.start.type` defaults to `max_item_period_start` and `period.end.type` defaults to `min_item_period_end`. - """ - price: NotRequired[str] - """ - The ID of the price object. One of `price` or `price_data` is required. - """ - price_data: NotRequired[ - "SubscriptionService.UpdateParamsAddInvoiceItemPriceData" - ] - """ - Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. - """ - quantity: NotRequired[int] - """ - Quantity for this item. Defaults to 1. - """ - tax_rates: NotRequired["Literal['']|List[str]"] - """ - The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item. - """ - - class UpdateParamsAddInvoiceItemDiscount(TypedDict): - coupon: NotRequired[str] - """ - ID of the coupon to create a new discount for. - """ - discount: NotRequired[str] - """ - ID of an existing discount on the object (or one of its ancestors) to reuse. - """ - discount_end: NotRequired[ - "SubscriptionService.UpdateParamsAddInvoiceItemDiscountDiscountEnd" - ] - """ - Details to determine how long the discount should be applied for. - """ - promotion_code: NotRequired[str] - """ - ID of the promotion code to create a new discount for. - """ - - class UpdateParamsAddInvoiceItemDiscountDiscountEnd(TypedDict): - duration: NotRequired[ - "SubscriptionService.UpdateParamsAddInvoiceItemDiscountDiscountEndDuration" - ] - """ - Time span for the redeemed discount. - """ - timestamp: NotRequired[int] - """ - A precise Unix timestamp for the discount to end. Must be in the future. - """ - type: Literal["duration", "timestamp"] - """ - The type of calculation made to determine when the discount ends. - """ - - class UpdateParamsAddInvoiceItemDiscountDiscountEndDuration(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. - """ - interval_count: int - """ - The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. - """ - - class UpdateParamsAddInvoiceItemPeriod(TypedDict): - end: "SubscriptionService.UpdateParamsAddInvoiceItemPeriodEnd" - """ - End of the invoice item period. - """ - start: "SubscriptionService.UpdateParamsAddInvoiceItemPeriodStart" - """ - Start of the invoice item period. - """ - - class UpdateParamsAddInvoiceItemPeriodEnd(TypedDict): - timestamp: NotRequired[int] - """ - A precise Unix timestamp for the end of the invoice item period. Must be greater than or equal to `period.start`. - """ - type: Literal["min_item_period_end", "timestamp"] - """ - Select how to calculate the end of the invoice item period. - """ - - class UpdateParamsAddInvoiceItemPeriodStart(TypedDict): - timestamp: NotRequired[int] - """ - A precise Unix timestamp for the start of the invoice item period. Must be less than or equal to `period.end`. - """ - type: Literal["max_item_period_start", "now", "timestamp"] - """ - Select how to calculate the start of the invoice item period. - """ - - class UpdateParamsAddInvoiceItemPriceData(TypedDict): - 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). - """ - product: str - """ - The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to. - """ - tax_behavior: NotRequired[ - Literal["exclusive", "inclusive", "unspecified"] - ] - """ - Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. - """ - unit_amount: NotRequired[int] - """ - A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge or a negative integer representing the amount to credit to the customer. - """ - unit_amount_decimal: NotRequired[str] - """ - Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - """ - - class UpdateParamsAutomaticTax(TypedDict): - enabled: bool - """ - Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription. - """ - liability: NotRequired[ - "SubscriptionService.UpdateParamsAutomaticTaxLiability" - ] - """ - The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. - """ - - class UpdateParamsAutomaticTaxLiability(TypedDict): - account: NotRequired[str] - """ - The connected account being referenced when `type` is `account`. - """ - type: Literal["account", "self"] - """ - Type of the account referenced in the request. - """ - - class UpdateParamsBillingSchedule(TypedDict): - applies_to: NotRequired[ - List["SubscriptionService.UpdateParamsBillingScheduleAppliesTo"] - ] - """ - Configure billing schedule differently for individual subscription items. - """ - bill_until: NotRequired[ - "SubscriptionService.UpdateParamsBillingScheduleBillUntil" - ] - """ - The end date for the billing schedule. - """ - key: NotRequired[str] - """ - Specify a key for the billing schedule. Must be unique to this field, alphanumeric, and up to 200 characters. If not provided, a unique key will be generated. - """ - - class UpdateParamsBillingScheduleAppliesTo(TypedDict): - price: NotRequired[str] - """ - The ID of the price object. - """ - type: Literal["price"] - """ - Controls which subscription items the billing schedule applies to. - """ - - class UpdateParamsBillingScheduleBillUntil(TypedDict): - duration: NotRequired[ - "SubscriptionService.UpdateParamsBillingScheduleBillUntilDuration" - ] - """ - Specifies the billing period. - """ - timestamp: NotRequired[int] - """ - The end date of the billing schedule. - """ - type: Literal["duration", "timestamp"] - """ - Describes how the billing schedule will determine the end date. Either `duration` or `timestamp`. - """ - - class UpdateParamsBillingScheduleBillUntilDuration(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Specifies billing duration. Either `day`, `week`, `month` or `year`. - """ - interval_count: NotRequired[int] - """ - The multiplier applied to the interval. - """ - - class UpdateParamsBillingThresholds(TypedDict): - amount_gte: NotRequired[int] - """ - Monetary threshold that triggers the subscription to advance to a new billing period - """ - reset_billing_cycle_anchor: NotRequired[bool] - """ - Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. - """ - - class UpdateParamsCancellationDetails(TypedDict): - comment: NotRequired["Literal['']|str"] - """ - Additional comments about why the user canceled the subscription, if the subscription was canceled explicitly by the user. - """ - feedback: NotRequired[ - "Literal['']|Literal['customer_service', 'low_quality', 'missing_features', 'other', 'switched_service', 'too_complex', 'too_expensive', 'unused']" - ] - """ - The customer submitted reason for why they canceled, if the subscription was canceled explicitly by the user. - """ - - class UpdateParamsDiscount(TypedDict): - coupon: NotRequired[str] - """ - ID of the coupon to create a new discount for. - """ - discount: NotRequired[str] - """ - ID of an existing discount on the object (or one of its ancestors) to reuse. - """ - discount_end: NotRequired[ - "SubscriptionService.UpdateParamsDiscountDiscountEnd" - ] - """ - Details to determine how long the discount should be applied for. - """ - promotion_code: NotRequired[str] - """ - ID of the promotion code to create a new discount for. - """ - - class UpdateParamsDiscountDiscountEnd(TypedDict): - duration: NotRequired[ - "SubscriptionService.UpdateParamsDiscountDiscountEndDuration" - ] - """ - Time span for the redeemed discount. - """ - timestamp: NotRequired[int] - """ - A precise Unix timestamp for the discount to end. Must be in the future. - """ - type: Literal["duration", "timestamp"] - """ - The type of calculation made to determine when the discount ends. - """ - - class UpdateParamsDiscountDiscountEndDuration(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. - """ - interval_count: int - """ - The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. - """ - - class UpdateParamsInvoiceSettings(TypedDict): - account_tax_ids: NotRequired["Literal['']|List[str]"] - """ - The account tax IDs associated with the subscription. Will be set on invoices generated by the subscription. - """ - issuer: NotRequired[ - "SubscriptionService.UpdateParamsInvoiceSettingsIssuer" - ] - """ - The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. - """ - - class UpdateParamsInvoiceSettingsIssuer(TypedDict): - account: NotRequired[str] - """ - The connected account being referenced when `type` is `account`. - """ - type: Literal["account", "self"] - """ - Type of the account referenced in the request. - """ - - class UpdateParamsItem(TypedDict): - billing_thresholds: NotRequired[ - "Literal['']|SubscriptionService.UpdateParamsItemBillingThresholds" - ] - """ - Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. - """ - clear_usage: NotRequired[bool] - """ - Delete all usage for a given subscription item. You must pass this when deleting a usage records subscription item. `clear_usage` has no effect if the plan has a billing meter attached. - """ - deleted: NotRequired[bool] - """ - A flag that, if set to `true`, will delete the specified item. - """ - discounts: NotRequired[ - "Literal['']|List[SubscriptionService.UpdateParamsItemDiscount]" - ] - """ - The coupons to redeem into discounts for the subscription item. - """ - id: NotRequired[str] - """ - Subscription item to update. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - plan: NotRequired[str] - """ - Plan ID for this item, as a string. - """ - price: NotRequired[str] - """ - The ID of the price object. One of `price` or `price_data` is required. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided. - """ - price_data: NotRequired[ - "SubscriptionService.UpdateParamsItemPriceData" - ] - """ - Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. - """ - quantity: NotRequired[int] - """ - Quantity for this item. - """ - tax_rates: NotRequired["Literal['']|List[str]"] - """ - A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. - """ - - class UpdateParamsItemBillingThresholds(TypedDict): - usage_gte: int - """ - Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)) - """ - - class UpdateParamsItemDiscount(TypedDict): - coupon: NotRequired[str] - """ - ID of the coupon to create a new discount for. - """ - discount: NotRequired[str] - """ - ID of an existing discount on the object (or one of its ancestors) to reuse. - """ - discount_end: NotRequired[ - "SubscriptionService.UpdateParamsItemDiscountDiscountEnd" - ] - """ - Details to determine how long the discount should be applied for. - """ - promotion_code: NotRequired[str] - """ - ID of the promotion code to create a new discount for. - """ - - class UpdateParamsItemDiscountDiscountEnd(TypedDict): - duration: NotRequired[ - "SubscriptionService.UpdateParamsItemDiscountDiscountEndDuration" - ] - """ - Time span for the redeemed discount. - """ - timestamp: NotRequired[int] - """ - A precise Unix timestamp for the discount to end. Must be in the future. - """ - type: Literal["duration", "timestamp"] - """ - The type of calculation made to determine when the discount ends. - """ - - class UpdateParamsItemDiscountDiscountEndDuration(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. - """ - interval_count: int - """ - The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. - """ - - class UpdateParamsItemPriceData(TypedDict): - 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). - """ - product: str - """ - The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to. - """ - recurring: "SubscriptionService.UpdateParamsItemPriceDataRecurring" - """ - The recurring components of a price such as `interval` and `interval_count`. - """ - tax_behavior: NotRequired[ - Literal["exclusive", "inclusive", "unspecified"] - ] - """ - Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. - """ - unit_amount: NotRequired[int] - """ - A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. - """ - unit_amount_decimal: NotRequired[str] - """ - Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - """ - - class UpdateParamsItemPriceDataRecurring(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Specifies billing frequency. Either `day`, `week`, `month` or `year`. - """ - interval_count: NotRequired[int] - """ - The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). - """ - - class UpdateParamsPauseCollection(TypedDict): - behavior: Literal["keep_as_draft", "mark_uncollectible", "void"] - """ - The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. - """ - resumes_at: NotRequired[int] - """ - The time after which the subscription will resume collecting payments. - """ - - class UpdateParamsPaymentSettings(TypedDict): - payment_method_options: NotRequired[ - "SubscriptionService.UpdateParamsPaymentSettingsPaymentMethodOptions" - ] - """ - Payment-method-specific configuration to provide to invoices created by the subscription. - """ - payment_method_types: NotRequired[ - "Literal['']|List[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'affirm', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'boleto', 'card', 'cashapp', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'id_bank_transfer', 'ideal', 'jp_credit_transfer', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'multibanco', 'naver_pay', 'nz_bank_account', 'p24', 'payco', 'paynow', 'paypal', 'pix', 'promptpay', 'revolut_pay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'stripe_balance', 'swish', 'upi', 'us_bank_account', 'wechat_pay']]" - ] - """ - The list of payment method types (e.g. card) to provide to the invoice's PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice's default payment method, the subscription's default payment method, the customer's default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). Should not be specified with payment_method_configuration - """ - save_default_payment_method: NotRequired[ - Literal["off", "on_subscription"] - ] - """ - Configure whether Stripe updates `subscription.default_payment_method` when payment succeeds. Defaults to `off` if unspecified. - """ - - class UpdateParamsPaymentSettingsPaymentMethodOptions(TypedDict): - acss_debit: NotRequired[ - "Literal['']|SubscriptionService.UpdateParamsPaymentSettingsPaymentMethodOptionsAcssDebit" - ] - """ - This sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice's PaymentIntent. - """ - bancontact: NotRequired[ - "Literal['']|SubscriptionService.UpdateParamsPaymentSettingsPaymentMethodOptionsBancontact" - ] - """ - This sub-hash contains details about the Bancontact payment method options to pass to the invoice's PaymentIntent. - """ - card: NotRequired[ - "Literal['']|SubscriptionService.UpdateParamsPaymentSettingsPaymentMethodOptionsCard" - ] - """ - This sub-hash contains details about the Card payment method options to pass to the invoice's PaymentIntent. - """ - customer_balance: NotRequired[ - "Literal['']|SubscriptionService.UpdateParamsPaymentSettingsPaymentMethodOptionsCustomerBalance" - ] - """ - This sub-hash contains details about the Bank transfer payment method options to pass to the invoice's PaymentIntent. - """ - id_bank_transfer: NotRequired[ - "Literal['']|SubscriptionService.UpdateParamsPaymentSettingsPaymentMethodOptionsIdBankTransfer" - ] - """ - This sub-hash contains details about the Indonesia bank transfer payment method options to pass to the invoice's PaymentIntent. - """ - konbini: NotRequired[ - "Literal['']|SubscriptionService.UpdateParamsPaymentSettingsPaymentMethodOptionsKonbini" - ] - """ - This sub-hash contains details about the Konbini payment method options to pass to the invoice's PaymentIntent. - """ - pix: NotRequired[ - "Literal['']|SubscriptionService.UpdateParamsPaymentSettingsPaymentMethodOptionsPix" - ] - """ - This sub-hash contains details about the Pix payment method options to pass to the invoice's PaymentIntent. - """ - sepa_debit: NotRequired[ - "Literal['']|SubscriptionService.UpdateParamsPaymentSettingsPaymentMethodOptionsSepaDebit" - ] - """ - This sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice's PaymentIntent. - """ - upi: NotRequired[ - "Literal['']|SubscriptionService.UpdateParamsPaymentSettingsPaymentMethodOptionsUpi" - ] - """ - This sub-hash contains details about the UPI payment method options to pass to the invoice's PaymentIntent. - """ - us_bank_account: NotRequired[ - "Literal['']|SubscriptionService.UpdateParamsPaymentSettingsPaymentMethodOptionsUsBankAccount" - ] - """ - This sub-hash contains details about the ACH direct debit payment method options to pass to the invoice's PaymentIntent. - """ - - class UpdateParamsPaymentSettingsPaymentMethodOptionsAcssDebit(TypedDict): - mandate_options: NotRequired[ - "SubscriptionService.UpdateParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions" - ] - """ - Additional fields for Mandate creation - """ - verification_method: NotRequired[ - Literal["automatic", "instant", "microdeposits"] - ] - """ - Verification method for the intent - """ - - class UpdateParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions( - TypedDict, - ): - transaction_type: NotRequired[Literal["business", "personal"]] - """ - Transaction type of the mandate. - """ - - class UpdateParamsPaymentSettingsPaymentMethodOptionsBancontact(TypedDict): - preferred_language: NotRequired[Literal["de", "en", "fr", "nl"]] - """ - Preferred language of the Bancontact authorization page that the customer is redirected to. - """ - - class UpdateParamsPaymentSettingsPaymentMethodOptionsCard(TypedDict): - mandate_options: NotRequired[ - "SubscriptionService.UpdateParamsPaymentSettingsPaymentMethodOptionsCardMandateOptions" - ] - """ - Configuration options for setting up an eMandate for cards issued in India. - """ - network: NotRequired[ - Literal[ - "amex", - "cartes_bancaires", - "diners", - "discover", - "eftpos_au", - "girocard", - "interac", - "jcb", - "link", - "mastercard", - "unionpay", - "unknown", - "visa", - ] - ] - """ - Selected network to process this Subscription on. Depends on the available networks of the card attached to the Subscription. Can be only set confirm-time. - """ - request_three_d_secure: NotRequired[ - Literal["any", "automatic", "challenge"] - ] - """ - We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. - """ - - class UpdateParamsPaymentSettingsPaymentMethodOptionsCardMandateOptions( - TypedDict, - ): - amount: NotRequired[int] - """ - Amount to be charged for future payments. - """ - amount_type: NotRequired[Literal["fixed", "maximum"]] - """ - One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. - """ - description: NotRequired[str] - """ - A description of the mandate or subscription that is meant to be displayed to the customer. - """ - - class UpdateParamsPaymentSettingsPaymentMethodOptionsCustomerBalance( - TypedDict, - ): - bank_transfer: NotRequired[ - "SubscriptionService.UpdateParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransfer" - ] - """ - Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. - """ - funding_type: NotRequired[str] - """ - The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. - """ - - class UpdateParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransfer( - TypedDict, - ): - eu_bank_transfer: NotRequired[ - "SubscriptionService.UpdateParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer" - ] - """ - Configuration for eu_bank_transfer funding type. - """ - type: NotRequired[str] - """ - The bank transfer type that can be used for funding. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. - """ - - class UpdateParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer( - TypedDict, - ): - country: str - """ - The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. - """ - - class UpdateParamsPaymentSettingsPaymentMethodOptionsIdBankTransfer( - TypedDict, - ): - pass - - class UpdateParamsPaymentSettingsPaymentMethodOptionsKonbini(TypedDict): - pass - - class UpdateParamsPaymentSettingsPaymentMethodOptionsPix(TypedDict): - mandate_options: NotRequired[ - "SubscriptionService.UpdateParamsPaymentSettingsPaymentMethodOptionsPixMandateOptions" - ] - """ - Configuration options for setting up a mandate - """ - - class UpdateParamsPaymentSettingsPaymentMethodOptionsPixMandateOptions( - TypedDict, - ): - amount: NotRequired[int] - """ - Amount to be charged for future payments. If not provided, defaults to 40000. - """ - amount_includes_iof: NotRequired[Literal["always", "never"]] - """ - Determines if the amount includes the IOF tax. Defaults to `never`. - """ - end_date: NotRequired[str] - """ - Date when the mandate expires and no further payments will be charged, in `YYYY-MM-DD`. If not provided, the mandate will be active until canceled. - """ - payment_schedule: NotRequired[ - Literal["halfyearly", "monthly", "quarterly", "weekly", "yearly"] - ] - """ - Schedule at which the future payments will be charged. Defaults to `weekly`. - """ - - class UpdateParamsPaymentSettingsPaymentMethodOptionsSepaDebit(TypedDict): - pass - - class UpdateParamsPaymentSettingsPaymentMethodOptionsUpi(TypedDict): - mandate_options: NotRequired[ - "SubscriptionService.UpdateParamsPaymentSettingsPaymentMethodOptionsUpiMandateOptions" - ] - """ - Configuration options for setting up an eMandate - """ - - class UpdateParamsPaymentSettingsPaymentMethodOptionsUpiMandateOptions( - TypedDict, - ): - amount: NotRequired[int] - """ - Amount to be charged for future payments. - """ - amount_type: NotRequired[Literal["fixed", "maximum"]] - """ - One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. - """ - description: NotRequired[str] - """ - A description of the mandate or subscription that is meant to be displayed to the customer. - """ - end_date: NotRequired[int] - """ - End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. - """ - - class UpdateParamsPaymentSettingsPaymentMethodOptionsUsBankAccount( - TypedDict, - ): - financial_connections: NotRequired[ - "SubscriptionService.UpdateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections" - ] - """ - Additional fields for Financial Connections Session creation - """ - verification_method: NotRequired[ - Literal["automatic", "instant", "microdeposits"] - ] - """ - Verification method for the intent - """ - - class UpdateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections( - TypedDict, - ): - filters: NotRequired[ - "SubscriptionService.UpdateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters" - ] - """ - Provide filters for the linked accounts that the customer can select for the payment method. - """ - permissions: NotRequired[ - List[ - Literal[ - "balances", "ownership", "payment_method", "transactions" - ] - ] - ] - """ - The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. - """ - prefetch: NotRequired[ - List[ - Literal[ - "balances", - "inferred_balances", - "ownership", - "transactions", - ] - ] - ] - """ - List of data features that you would like to retrieve upon account creation. - """ - - class UpdateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters( - TypedDict, - ): - account_subcategories: NotRequired[ - List[Literal["checking", "savings"]] - ] - """ - The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`. - """ - institution: NotRequired[str] - """ - ID of the institution to use to filter for selectable accounts. - """ - - class UpdateParamsPendingInvoiceItemInterval(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Specifies invoicing frequency. Either `day`, `week`, `month` or `year`. - """ - interval_count: NotRequired[int] - """ - The number of intervals between invoices. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). - """ - - class UpdateParamsPrebilling(TypedDict): - iterations: int - """ - This is used to determine the number of billing cycles to prebill. - """ - update_behavior: NotRequired[Literal["prebill", "reset"]] - """ - Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`. - """ - - class UpdateParamsTransferData(TypedDict): - amount_percent: NotRequired[float] - """ - A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. - """ - destination: str - """ - ID of an existing, connected Stripe account. - """ - - class UpdateParamsTrialSettings(TypedDict): - end_behavior: ( - "SubscriptionService.UpdateParamsTrialSettingsEndBehavior" - ) - """ - Defines how the subscription should behave when the user's free trial ends. - """ - - class UpdateParamsTrialSettingsEndBehavior(TypedDict): - missing_payment_method: Literal["cancel", "create_invoice", "pause"] - """ - Indicates how the subscription should change when the trial ends if the user did not provide a payment method. - """ - def cancel( self, subscription_exposed_id: str, - params: Optional["SubscriptionService.CancelParams"] = None, + params: Optional["SubscriptionCancelParams"] = None, options: Optional[RequestOptions] = None, ) -> Subscription: """ @@ -2355,7 +73,7 @@ def cancel( async def cancel_async( self, subscription_exposed_id: str, - params: Optional["SubscriptionService.CancelParams"] = None, + params: Optional["SubscriptionCancelParams"] = None, options: Optional[RequestOptions] = None, ) -> Subscription: """ @@ -2383,7 +101,7 @@ async def cancel_async( def retrieve( self, subscription_exposed_id: str, - params: Optional["SubscriptionService.RetrieveParams"] = None, + params: Optional["SubscriptionRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Subscription: """ @@ -2407,7 +125,7 @@ def retrieve( async def retrieve_async( self, subscription_exposed_id: str, - params: Optional["SubscriptionService.RetrieveParams"] = None, + params: Optional["SubscriptionRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Subscription: """ @@ -2431,7 +149,7 @@ async def retrieve_async( def update( self, subscription_exposed_id: str, - params: Optional["SubscriptionService.UpdateParams"] = None, + params: Optional["SubscriptionUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> Subscription: """ @@ -2475,7 +193,7 @@ def update( async def update_async( self, subscription_exposed_id: str, - params: Optional["SubscriptionService.UpdateParams"] = None, + params: Optional["SubscriptionUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> Subscription: """ @@ -2519,7 +237,7 @@ async def update_async( def delete_discount( self, subscription_exposed_id: str, - params: Optional["SubscriptionService.DeleteDiscountParams"] = None, + params: Optional["SubscriptionDeleteDiscountParams"] = None, options: Optional[RequestOptions] = None, ) -> Discount: """ @@ -2543,7 +261,7 @@ def delete_discount( async def delete_discount_async( self, subscription_exposed_id: str, - params: Optional["SubscriptionService.DeleteDiscountParams"] = None, + params: Optional["SubscriptionDeleteDiscountParams"] = None, options: Optional[RequestOptions] = None, ) -> Discount: """ @@ -2566,7 +284,7 @@ async def delete_discount_async( def list( self, - params: Optional["SubscriptionService.ListParams"] = None, + params: Optional["SubscriptionListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[Subscription]: """ @@ -2585,7 +303,7 @@ def list( async def list_async( self, - params: Optional["SubscriptionService.ListParams"] = None, + params: Optional["SubscriptionListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[Subscription]: """ @@ -2604,7 +322,7 @@ async def list_async( def create( self, - params: Optional["SubscriptionService.CreateParams"] = None, + params: Optional["SubscriptionCreateParams"] = None, options: Optional[RequestOptions] = None, ) -> Subscription: """ @@ -2629,7 +347,7 @@ def create( async def create_async( self, - params: Optional["SubscriptionService.CreateParams"] = None, + params: Optional["SubscriptionCreateParams"] = None, options: Optional[RequestOptions] = None, ) -> Subscription: """ @@ -2654,7 +372,7 @@ async def create_async( def search( self, - params: "SubscriptionService.SearchParams", + params: "SubscriptionSearchParams", options: Optional[RequestOptions] = None, ) -> SearchResultObject[Subscription]: """ @@ -2676,7 +394,7 @@ def search( async def search_async( self, - params: "SubscriptionService.SearchParams", + params: "SubscriptionSearchParams", options: Optional[RequestOptions] = None, ) -> SearchResultObject[Subscription]: """ @@ -2699,7 +417,7 @@ async def search_async( def attach_cadence( self, subscription: str, - params: "SubscriptionService.AttachCadenceParams", + params: "SubscriptionAttachCadenceParams", options: Optional[RequestOptions] = None, ) -> Subscription: """ @@ -2721,7 +439,7 @@ def attach_cadence( async def attach_cadence_async( self, subscription: str, - params: "SubscriptionService.AttachCadenceParams", + params: "SubscriptionAttachCadenceParams", options: Optional[RequestOptions] = None, ) -> Subscription: """ @@ -2743,7 +461,7 @@ async def attach_cadence_async( def migrate( self, subscription: str, - params: "SubscriptionService.MigrateParams", + params: "SubscriptionMigrateParams", options: Optional[RequestOptions] = None, ) -> Subscription: """ @@ -2765,7 +483,7 @@ def migrate( async def migrate_async( self, subscription: str, - params: "SubscriptionService.MigrateParams", + params: "SubscriptionMigrateParams", options: Optional[RequestOptions] = None, ) -> Subscription: """ @@ -2787,7 +505,7 @@ async def migrate_async( def resume( self, subscription: str, - params: Optional["SubscriptionService.ResumeParams"] = None, + params: Optional["SubscriptionResumeParams"] = None, options: Optional[RequestOptions] = None, ) -> Subscription: """ @@ -2809,7 +527,7 @@ def resume( async def resume_async( self, subscription: str, - params: Optional["SubscriptionService.ResumeParams"] = None, + params: Optional["SubscriptionResumeParams"] = None, options: Optional[RequestOptions] = None, ) -> Subscription: """ diff --git a/stripe/_tax_code.py b/stripe/_tax_code.py index e9160c8b1..281a4985a 100644 --- a/stripe/_tax_code.py +++ b/stripe/_tax_code.py @@ -2,9 +2,12 @@ # File generated from our OpenAPI spec from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource -from stripe._request_options import RequestOptions -from typing import ClassVar, List -from typing_extensions import Literal, NotRequired, Unpack +from typing import ClassVar +from typing_extensions import Literal, Unpack, TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params._tax_code_list_params import TaxCodeListParams + from stripe.params._tax_code_retrieve_params import TaxCodeRetrieveParams class TaxCode(ListableAPIResource["TaxCode"]): @@ -13,31 +16,6 @@ class TaxCode(ListableAPIResource["TaxCode"]): """ OBJECT_NAME: ClassVar[Literal["tax_code"]] = "tax_code" - - class ListParams(RequestOptions): - 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 RetrieveParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - description: str """ A detailed description of which types of products the tax code represents. @@ -57,7 +35,7 @@ class RetrieveParams(RequestOptions): @classmethod def list( - cls, **params: Unpack["TaxCode.ListParams"] + cls, **params: Unpack["TaxCodeListParams"] ) -> ListObject["TaxCode"]: """ A list of [all tax codes available](https://stripe.com/docs/tax/tax-categories) to add to Products in order to allow specific tax calculations. @@ -77,7 +55,7 @@ def list( @classmethod async def list_async( - cls, **params: Unpack["TaxCode.ListParams"] + cls, **params: Unpack["TaxCodeListParams"] ) -> ListObject["TaxCode"]: """ A list of [all tax codes available](https://stripe.com/docs/tax/tax-categories) to add to Products in order to allow specific tax calculations. @@ -97,7 +75,7 @@ async def list_async( @classmethod def retrieve( - cls, id: str, **params: Unpack["TaxCode.RetrieveParams"] + cls, id: str, **params: Unpack["TaxCodeRetrieveParams"] ) -> "TaxCode": """ Retrieves the details of an existing tax code. Supply the unique tax code ID and Stripe will return the corresponding tax code information. @@ -108,7 +86,7 @@ def retrieve( @classmethod async def retrieve_async( - cls, id: str, **params: Unpack["TaxCode.RetrieveParams"] + cls, id: str, **params: Unpack["TaxCodeRetrieveParams"] ) -> "TaxCode": """ Retrieves the details of an existing tax code. Supply the unique tax code ID and Stripe will return the corresponding tax code information. diff --git a/stripe/_tax_code_service.py b/stripe/_tax_code_service.py index eebd0ff1d..5fc32c68f 100644 --- a/stripe/_tax_code_service.py +++ b/stripe/_tax_code_service.py @@ -5,38 +5,18 @@ from stripe._stripe_service import StripeService from stripe._tax_code import TaxCode from stripe._util import sanitize_id -from typing import List, Optional, cast -from typing_extensions import NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params._tax_code_list_params import TaxCodeListParams + from stripe.params._tax_code_retrieve_params import TaxCodeRetrieveParams -class TaxCodeService(StripeService): - class ListParams(TypedDict): - 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 RetrieveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ +class TaxCodeService(StripeService): def list( self, - params: Optional["TaxCodeService.ListParams"] = None, + params: Optional["TaxCodeListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[TaxCode]: """ @@ -55,7 +35,7 @@ def list( async def list_async( self, - params: Optional["TaxCodeService.ListParams"] = None, + params: Optional["TaxCodeListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[TaxCode]: """ @@ -75,7 +55,7 @@ async def list_async( def retrieve( self, id: str, - params: Optional["TaxCodeService.RetrieveParams"] = None, + params: Optional["TaxCodeRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> TaxCode: """ @@ -95,7 +75,7 @@ def retrieve( async def retrieve_async( self, id: str, - params: Optional["TaxCodeService.RetrieveParams"] = None, + params: Optional["TaxCodeRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> TaxCode: """ diff --git a/stripe/_tax_id.py b/stripe/_tax_id.py index 8d3657203..19638b5d9 100644 --- a/stripe/_tax_id.py +++ b/stripe/_tax_id.py @@ -5,22 +5,19 @@ from stripe._expandable_field import ExpandableField from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource -from stripe._request_options import RequestOptions from stripe._stripe_object import StripeObject from stripe._util import class_method_variant, sanitize_id -from typing import ClassVar, List, Optional, cast, overload -from typing_extensions import ( - Literal, - NotRequired, - TypedDict, - Unpack, - TYPE_CHECKING, -) +from typing import ClassVar, Optional, cast, overload +from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: from stripe._account import Account from stripe._application import Application from stripe._customer import Customer + from stripe.params._tax_id_create_params import TaxIdCreateParams + from stripe.params._tax_id_delete_params import TaxIdDeleteParams + from stripe.params._tax_id_list_params import TaxIdListParams + from stripe.params._tax_id_retrieve_params import TaxIdRetrieveParams class TaxId( @@ -73,202 +70,6 @@ class Verification(StripeObject): Verified name. """ - class CreateParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - owner: NotRequired["TaxId.CreateParamsOwner"] - """ - The account or customer the tax ID belongs to. Defaults to `owner[type]=self`. - """ - type: Literal[ - "ad_nrt", - "ae_trn", - "al_tin", - "am_tin", - "ao_tin", - "ar_cuit", - "au_abn", - "au_arn", - "aw_tin", - "az_tin", - "ba_tin", - "bb_tin", - "bd_bin", - "bf_ifu", - "bg_uic", - "bh_vat", - "bj_ifu", - "bo_tin", - "br_cnpj", - "br_cpf", - "bs_tin", - "by_tin", - "ca_bn", - "ca_gst_hst", - "ca_pst_bc", - "ca_pst_mb", - "ca_pst_sk", - "ca_qst", - "cd_nif", - "ch_uid", - "ch_vat", - "cl_tin", - "cm_niu", - "cn_tin", - "co_nit", - "cr_tin", - "cv_nif", - "de_stn", - "do_rcn", - "ec_ruc", - "eg_tin", - "es_cif", - "et_tin", - "eu_oss_vat", - "eu_vat", - "gb_vat", - "ge_vat", - "gn_nif", - "hk_br", - "hr_oib", - "hu_tin", - "id_npwp", - "il_vat", - "in_gst", - "is_vat", - "jp_cn", - "jp_rn", - "jp_trn", - "ke_pin", - "kg_tin", - "kh_tin", - "kr_brn", - "kz_bin", - "la_tin", - "li_uid", - "li_vat", - "ma_vat", - "md_vat", - "me_pib", - "mk_vat", - "mr_nif", - "mx_rfc", - "my_frp", - "my_itn", - "my_sst", - "ng_tin", - "no_vat", - "no_voec", - "np_pan", - "nz_gst", - "om_vat", - "pe_ruc", - "ph_tin", - "ro_tin", - "rs_pib", - "ru_inn", - "ru_kpp", - "sa_vat", - "sg_gst", - "sg_uen", - "si_tin", - "sn_ninea", - "sr_fin", - "sv_nit", - "th_vat", - "tj_tin", - "tr_tin", - "tw_vat", - "tz_vat", - "ua_vat", - "ug_tin", - "us_ein", - "uy_ruc", - "uz_tin", - "uz_vat", - "ve_rif", - "vn_tin", - "za_vat", - "zm_tin", - "zw_tin", - ] - """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `al_tin`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `aw_tin`, `az_tin`, `ba_tin`, `bb_tin`, `bd_bin`, `bf_ifu`, `bg_uic`, `bh_vat`, `bj_ifu`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cm_niu`, `cn_tin`, `co_nit`, `cr_tin`, `cv_nif`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `et_tin`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kg_tin`, `kh_tin`, `kr_brn`, `kz_bin`, `la_tin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin` - """ - value: str - """ - Value of the tax ID. - """ - - class CreateParamsOwner(TypedDict): - account: NotRequired[str] - """ - Account the tax ID belongs to. Required when `type=account` - """ - customer: NotRequired[str] - """ - Customer the tax ID belongs to. Required when `type=customer` - """ - customer_account: NotRequired[str] - """ - v2 Account the tax ID belongs to. Can be used in place of `customer` when `type=customer` - """ - type: Literal["account", "application", "customer", "self"] - """ - Type of owner referenced. - """ - - class DeleteParams(RequestOptions): - pass - - class ListParams(RequestOptions): - 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. - """ - owner: NotRequired["TaxId.ListParamsOwner"] - """ - The account or customer the tax ID belongs to. Defaults to `owner[type]=self`. - """ - 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 ListParamsOwner(TypedDict): - account: NotRequired[str] - """ - Account the tax ID belongs to. Required when `type=account` - """ - customer: NotRequired[str] - """ - Customer the tax ID belongs to. Required when `type=customer` - """ - customer_account: NotRequired[str] - """ - v2 Account the tax ID belongs to. Can be used in place of `customer` when `type=customer` - """ - type: Literal["account", "application", "customer", "self"] - """ - Type of owner referenced. - """ - - class RetrieveParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - country: Optional[str] """ Two-letter ISO code representing the country of the tax ID. @@ -431,7 +232,7 @@ class RetrieveParams(RequestOptions): """ @classmethod - def create(cls, **params: Unpack["TaxId.CreateParams"]) -> "TaxId": + def create(cls, **params: Unpack["TaxIdCreateParams"]) -> "TaxId": """ Creates a new account or customer tax_id object. """ @@ -446,7 +247,7 @@ def create(cls, **params: Unpack["TaxId.CreateParams"]) -> "TaxId": @classmethod async def create_async( - cls, **params: Unpack["TaxId.CreateParams"] + cls, **params: Unpack["TaxIdCreateParams"] ) -> "TaxId": """ Creates a new account or customer tax_id object. @@ -462,7 +263,7 @@ async def create_async( @classmethod def _cls_delete( - cls, sid: str, **params: Unpack["TaxId.DeleteParams"] + cls, sid: str, **params: Unpack["TaxIdDeleteParams"] ) -> "TaxId": """ Deletes an existing account or customer tax_id object. @@ -479,14 +280,14 @@ def _cls_delete( @overload @staticmethod - def delete(sid: str, **params: Unpack["TaxId.DeleteParams"]) -> "TaxId": + def delete(sid: str, **params: Unpack["TaxIdDeleteParams"]) -> "TaxId": """ Deletes an existing account or customer tax_id object. """ ... @overload - def delete(self, **params: Unpack["TaxId.DeleteParams"]) -> "TaxId": + def delete(self, **params: Unpack["TaxIdDeleteParams"]) -> "TaxId": """ Deletes an existing account or customer tax_id object. """ @@ -494,7 +295,7 @@ def delete(self, **params: Unpack["TaxId.DeleteParams"]) -> "TaxId": @class_method_variant("_cls_delete") def delete( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["TaxId.DeleteParams"] + self, **params: Unpack["TaxIdDeleteParams"] ) -> "TaxId": """ Deletes an existing account or customer tax_id object. @@ -507,7 +308,7 @@ def delete( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_delete_async( - cls, sid: str, **params: Unpack["TaxId.DeleteParams"] + cls, sid: str, **params: Unpack["TaxIdDeleteParams"] ) -> "TaxId": """ Deletes an existing account or customer tax_id object. @@ -525,7 +326,7 @@ async def _cls_delete_async( @overload @staticmethod async def delete_async( - sid: str, **params: Unpack["TaxId.DeleteParams"] + sid: str, **params: Unpack["TaxIdDeleteParams"] ) -> "TaxId": """ Deletes an existing account or customer tax_id object. @@ -534,7 +335,7 @@ async def delete_async( @overload async def delete_async( - self, **params: Unpack["TaxId.DeleteParams"] + self, **params: Unpack["TaxIdDeleteParams"] ) -> "TaxId": """ Deletes an existing account or customer tax_id object. @@ -543,7 +344,7 @@ async def delete_async( @class_method_variant("_cls_delete_async") async def delete_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["TaxId.DeleteParams"] + self, **params: Unpack["TaxIdDeleteParams"] ) -> "TaxId": """ Deletes an existing account or customer tax_id object. @@ -555,7 +356,7 @@ async def delete_async( # pyright: ignore[reportGeneralTypeIssues] ) @classmethod - def list(cls, **params: Unpack["TaxId.ListParams"]) -> ListObject["TaxId"]: + def list(cls, **params: Unpack["TaxIdListParams"]) -> ListObject["TaxId"]: """ Returns a list of tax IDs. """ @@ -574,7 +375,7 @@ def list(cls, **params: Unpack["TaxId.ListParams"]) -> ListObject["TaxId"]: @classmethod async def list_async( - cls, **params: Unpack["TaxId.ListParams"] + cls, **params: Unpack["TaxIdListParams"] ) -> ListObject["TaxId"]: """ Returns a list of tax IDs. @@ -594,7 +395,7 @@ async def list_async( @classmethod def retrieve( - cls, id: str, **params: Unpack["TaxId.RetrieveParams"] + cls, id: str, **params: Unpack["TaxIdRetrieveParams"] ) -> "TaxId": """ Retrieves an account or customer tax_id object. @@ -605,7 +406,7 @@ def retrieve( @classmethod async def retrieve_async( - cls, id: str, **params: Unpack["TaxId.RetrieveParams"] + cls, id: str, **params: Unpack["TaxIdRetrieveParams"] ) -> "TaxId": """ Retrieves an account or customer tax_id object. diff --git a/stripe/_tax_id_service.py b/stripe/_tax_id_service.py index 320148e09..f830c3616 100644 --- a/stripe/_tax_id_service.py +++ b/stripe/_tax_id_service.py @@ -5,211 +5,21 @@ from stripe._stripe_service import StripeService from stripe._tax_id import TaxId from stripe._util import sanitize_id -from typing import List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params._tax_id_create_params import TaxIdCreateParams + from stripe.params._tax_id_delete_params import TaxIdDeleteParams + from stripe.params._tax_id_list_params import TaxIdListParams + from stripe.params._tax_id_retrieve_params import TaxIdRetrieveParams -class TaxIdService(StripeService): - class CreateParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - owner: NotRequired["TaxIdService.CreateParamsOwner"] - """ - The account or customer the tax ID belongs to. Defaults to `owner[type]=self`. - """ - type: Literal[ - "ad_nrt", - "ae_trn", - "al_tin", - "am_tin", - "ao_tin", - "ar_cuit", - "au_abn", - "au_arn", - "aw_tin", - "az_tin", - "ba_tin", - "bb_tin", - "bd_bin", - "bf_ifu", - "bg_uic", - "bh_vat", - "bj_ifu", - "bo_tin", - "br_cnpj", - "br_cpf", - "bs_tin", - "by_tin", - "ca_bn", - "ca_gst_hst", - "ca_pst_bc", - "ca_pst_mb", - "ca_pst_sk", - "ca_qst", - "cd_nif", - "ch_uid", - "ch_vat", - "cl_tin", - "cm_niu", - "cn_tin", - "co_nit", - "cr_tin", - "cv_nif", - "de_stn", - "do_rcn", - "ec_ruc", - "eg_tin", - "es_cif", - "et_tin", - "eu_oss_vat", - "eu_vat", - "gb_vat", - "ge_vat", - "gn_nif", - "hk_br", - "hr_oib", - "hu_tin", - "id_npwp", - "il_vat", - "in_gst", - "is_vat", - "jp_cn", - "jp_rn", - "jp_trn", - "ke_pin", - "kg_tin", - "kh_tin", - "kr_brn", - "kz_bin", - "la_tin", - "li_uid", - "li_vat", - "ma_vat", - "md_vat", - "me_pib", - "mk_vat", - "mr_nif", - "mx_rfc", - "my_frp", - "my_itn", - "my_sst", - "ng_tin", - "no_vat", - "no_voec", - "np_pan", - "nz_gst", - "om_vat", - "pe_ruc", - "ph_tin", - "ro_tin", - "rs_pib", - "ru_inn", - "ru_kpp", - "sa_vat", - "sg_gst", - "sg_uen", - "si_tin", - "sn_ninea", - "sr_fin", - "sv_nit", - "th_vat", - "tj_tin", - "tr_tin", - "tw_vat", - "tz_vat", - "ua_vat", - "ug_tin", - "us_ein", - "uy_ruc", - "uz_tin", - "uz_vat", - "ve_rif", - "vn_tin", - "za_vat", - "zm_tin", - "zw_tin", - ] - """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `al_tin`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `aw_tin`, `az_tin`, `ba_tin`, `bb_tin`, `bd_bin`, `bf_ifu`, `bg_uic`, `bh_vat`, `bj_ifu`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cm_niu`, `cn_tin`, `co_nit`, `cr_tin`, `cv_nif`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `et_tin`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kg_tin`, `kh_tin`, `kr_brn`, `kz_bin`, `la_tin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin` - """ - value: str - """ - Value of the tax ID. - """ - - class CreateParamsOwner(TypedDict): - account: NotRequired[str] - """ - Account the tax ID belongs to. Required when `type=account` - """ - customer: NotRequired[str] - """ - Customer the tax ID belongs to. Required when `type=customer` - """ - customer_account: NotRequired[str] - """ - v2 Account the tax ID belongs to. Can be used in place of `customer` when `type=customer` - """ - type: Literal["account", "application", "customer", "self"] - """ - Type of owner referenced. - """ - - class DeleteParams(TypedDict): - pass - - class ListParams(TypedDict): - 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. - """ - owner: NotRequired["TaxIdService.ListParamsOwner"] - """ - The account or customer the tax ID belongs to. Defaults to `owner[type]=self`. - """ - 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 ListParamsOwner(TypedDict): - account: NotRequired[str] - """ - Account the tax ID belongs to. Required when `type=account` - """ - customer: NotRequired[str] - """ - Customer the tax ID belongs to. Required when `type=customer` - """ - customer_account: NotRequired[str] - """ - v2 Account the tax ID belongs to. Can be used in place of `customer` when `type=customer` - """ - type: Literal["account", "application", "customer", "self"] - """ - Type of owner referenced. - """ - - class RetrieveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ +class TaxIdService(StripeService): def delete( self, id: str, - params: Optional["TaxIdService.DeleteParams"] = None, + params: Optional["TaxIdDeleteParams"] = None, options: Optional[RequestOptions] = None, ) -> TaxId: """ @@ -229,7 +39,7 @@ def delete( async def delete_async( self, id: str, - params: Optional["TaxIdService.DeleteParams"] = None, + params: Optional["TaxIdDeleteParams"] = None, options: Optional[RequestOptions] = None, ) -> TaxId: """ @@ -249,7 +59,7 @@ async def delete_async( def retrieve( self, id: str, - params: Optional["TaxIdService.RetrieveParams"] = None, + params: Optional["TaxIdRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> TaxId: """ @@ -269,7 +79,7 @@ def retrieve( async def retrieve_async( self, id: str, - params: Optional["TaxIdService.RetrieveParams"] = None, + params: Optional["TaxIdRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> TaxId: """ @@ -288,7 +98,7 @@ async def retrieve_async( def list( self, - params: Optional["TaxIdService.ListParams"] = None, + params: Optional["TaxIdListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[TaxId]: """ @@ -307,7 +117,7 @@ def list( async def list_async( self, - params: Optional["TaxIdService.ListParams"] = None, + params: Optional["TaxIdListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[TaxId]: """ @@ -326,7 +136,7 @@ async def list_async( def create( self, - params: "TaxIdService.CreateParams", + params: "TaxIdCreateParams", options: Optional[RequestOptions] = None, ) -> TaxId: """ @@ -345,7 +155,7 @@ def create( async def create_async( self, - params: "TaxIdService.CreateParams", + params: "TaxIdCreateParams", options: Optional[RequestOptions] = None, ) -> TaxId: """ diff --git a/stripe/_tax_rate.py b/stripe/_tax_rate.py index 1be651bc2..ec57166e9 100644 --- a/stripe/_tax_rate.py +++ b/stripe/_tax_rate.py @@ -3,12 +3,17 @@ from stripe._createable_api_resource import CreateableAPIResource from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource -from stripe._request_options import RequestOptions from stripe._stripe_object import StripeObject from stripe._updateable_api_resource import UpdateableAPIResource from stripe._util import sanitize_id -from typing import ClassVar, Dict, List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict, Unpack +from typing import ClassVar, Dict, Optional, cast +from typing_extensions import Literal, Unpack, TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params._tax_rate_create_params import TaxRateCreateParams + from stripe.params._tax_rate_list_params import TaxRateListParams + from stripe.params._tax_rate_modify_params import TaxRateModifyParams + from stripe.params._tax_rate_retrieve_params import TaxRateRetrieveParams class TaxRate( @@ -34,178 +39,6 @@ class FlatAmount(StripeObject): Three-letter ISO currency code, in lowercase. """ - class CreateParams(RequestOptions): - active: NotRequired[bool] - """ - Flag determining whether the tax rate is active or inactive (archived). Inactive tax rates cannot be used with new applications or Checkout Sessions, but will still work for subscriptions and invoices that already have it set. - """ - country: NotRequired[str] - """ - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - """ - description: NotRequired[str] - """ - An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers. - """ - display_name: str - """ - The display name of the tax rate, which will be shown to users. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - inclusive: bool - """ - This specifies if the tax rate is inclusive or exclusive. - """ - jurisdiction: NotRequired[str] - """ - The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer's invoice. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - percentage: float - """ - This represents the tax rate percent out of 100. - """ - state: NotRequired[str] - """ - [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2), without country prefix. For example, "NY" for New York, United States. - """ - tax_type: NotRequired[ - Literal[ - "amusement_tax", - "communications_tax", - "gst", - "hst", - "igst", - "jct", - "lease_tax", - "pst", - "qst", - "retail_delivery_fee", - "rst", - "sales_tax", - "service_tax", - "vat", - ] - ] - """ - The high-level tax type, such as `vat` or `sales_tax`. - """ - - class ListParams(RequestOptions): - active: NotRequired[bool] - """ - Optional flag to filter by tax rates that are either active or inactive (archived). - """ - created: NotRequired["TaxRate.ListParamsCreated|int"] - """ - Optional range for filtering created date. - """ - 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. - """ - inclusive: NotRequired[bool] - """ - Optional flag to filter by tax rates that are inclusive (or those that are not inclusive). - """ - 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 ListParamsCreated(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) - """ - - class ModifyParams(RequestOptions): - active: NotRequired[bool] - """ - Flag determining whether the tax rate is active or inactive (archived). Inactive tax rates cannot be used with new applications or Checkout Sessions, but will still work for subscriptions and invoices that already have it set. - """ - country: NotRequired[str] - """ - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - """ - description: NotRequired[str] - """ - An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers. - """ - display_name: NotRequired[str] - """ - The display name of the tax rate, which will be shown to users. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - jurisdiction: NotRequired[str] - """ - The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer's invoice. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - state: NotRequired[str] - """ - [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2), without country prefix. For example, "NY" for New York, United States. - """ - tax_type: NotRequired[ - Literal[ - "amusement_tax", - "communications_tax", - "gst", - "hst", - "igst", - "jct", - "lease_tax", - "pst", - "qst", - "retail_delivery_fee", - "rst", - "sales_tax", - "service_tax", - "vat", - ] - ] - """ - The high-level tax type, such as `vat` or `sales_tax`. - """ - - class RetrieveParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - active: bool """ Defaults to `true`. When set to `false`, this tax rate cannot be used with new applications or Checkout Sessions, but will still work for subscriptions and invoices that already have it set. @@ -301,7 +134,7 @@ class RetrieveParams(RequestOptions): """ @classmethod - def create(cls, **params: Unpack["TaxRate.CreateParams"]) -> "TaxRate": + def create(cls, **params: Unpack["TaxRateCreateParams"]) -> "TaxRate": """ Creates a new tax rate. """ @@ -316,7 +149,7 @@ def create(cls, **params: Unpack["TaxRate.CreateParams"]) -> "TaxRate": @classmethod async def create_async( - cls, **params: Unpack["TaxRate.CreateParams"] + cls, **params: Unpack["TaxRateCreateParams"] ) -> "TaxRate": """ Creates a new tax rate. @@ -332,7 +165,7 @@ async def create_async( @classmethod def list( - cls, **params: Unpack["TaxRate.ListParams"] + cls, **params: Unpack["TaxRateListParams"] ) -> ListObject["TaxRate"]: """ Returns a list of your tax rates. Tax rates are returned sorted by creation date, with the most recently created tax rates appearing first. @@ -352,7 +185,7 @@ def list( @classmethod async def list_async( - cls, **params: Unpack["TaxRate.ListParams"] + cls, **params: Unpack["TaxRateListParams"] ) -> ListObject["TaxRate"]: """ Returns a list of your tax rates. Tax rates are returned sorted by creation date, with the most recently created tax rates appearing first. @@ -372,7 +205,7 @@ async def list_async( @classmethod def modify( - cls, id: str, **params: Unpack["TaxRate.ModifyParams"] + cls, id: str, **params: Unpack["TaxRateModifyParams"] ) -> "TaxRate": """ Updates an existing tax rate. @@ -389,7 +222,7 @@ def modify( @classmethod async def modify_async( - cls, id: str, **params: Unpack["TaxRate.ModifyParams"] + cls, id: str, **params: Unpack["TaxRateModifyParams"] ) -> "TaxRate": """ Updates an existing tax rate. @@ -406,7 +239,7 @@ async def modify_async( @classmethod def retrieve( - cls, id: str, **params: Unpack["TaxRate.RetrieveParams"] + cls, id: str, **params: Unpack["TaxRateRetrieveParams"] ) -> "TaxRate": """ Retrieves a tax rate with the given ID @@ -417,7 +250,7 @@ def retrieve( @classmethod async def retrieve_async( - cls, id: str, **params: Unpack["TaxRate.RetrieveParams"] + cls, id: str, **params: Unpack["TaxRateRetrieveParams"] ) -> "TaxRate": """ Retrieves a tax rate with the given ID diff --git a/stripe/_tax_rate_service.py b/stripe/_tax_rate_service.py index bffa61e43..62030d13f 100644 --- a/stripe/_tax_rate_service.py +++ b/stripe/_tax_rate_service.py @@ -5,186 +5,20 @@ from stripe._stripe_service import StripeService from stripe._tax_rate import TaxRate from stripe._util import sanitize_id -from typing import Dict, List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params._tax_rate_create_params import TaxRateCreateParams + from stripe.params._tax_rate_list_params import TaxRateListParams + from stripe.params._tax_rate_retrieve_params import TaxRateRetrieveParams + from stripe.params._tax_rate_update_params import TaxRateUpdateParams -class TaxRateService(StripeService): - class CreateParams(TypedDict): - active: NotRequired[bool] - """ - Flag determining whether the tax rate is active or inactive (archived). Inactive tax rates cannot be used with new applications or Checkout Sessions, but will still work for subscriptions and invoices that already have it set. - """ - country: NotRequired[str] - """ - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - """ - description: NotRequired[str] - """ - An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers. - """ - display_name: str - """ - The display name of the tax rate, which will be shown to users. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - inclusive: bool - """ - This specifies if the tax rate is inclusive or exclusive. - """ - jurisdiction: NotRequired[str] - """ - The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer's invoice. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - percentage: float - """ - This represents the tax rate percent out of 100. - """ - state: NotRequired[str] - """ - [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2), without country prefix. For example, "NY" for New York, United States. - """ - tax_type: NotRequired[ - Literal[ - "amusement_tax", - "communications_tax", - "gst", - "hst", - "igst", - "jct", - "lease_tax", - "pst", - "qst", - "retail_delivery_fee", - "rst", - "sales_tax", - "service_tax", - "vat", - ] - ] - """ - The high-level tax type, such as `vat` or `sales_tax`. - """ - - class ListParams(TypedDict): - active: NotRequired[bool] - """ - Optional flag to filter by tax rates that are either active or inactive (archived). - """ - created: NotRequired["TaxRateService.ListParamsCreated|int"] - """ - Optional range for filtering created date. - """ - 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. - """ - inclusive: NotRequired[bool] - """ - Optional flag to filter by tax rates that are inclusive (or those that are not inclusive). - """ - 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 ListParamsCreated(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) - """ - - class RetrieveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class UpdateParams(TypedDict): - active: NotRequired[bool] - """ - Flag determining whether the tax rate is active or inactive (archived). Inactive tax rates cannot be used with new applications or Checkout Sessions, but will still work for subscriptions and invoices that already have it set. - """ - country: NotRequired[str] - """ - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - """ - description: NotRequired[str] - """ - An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers. - """ - display_name: NotRequired[str] - """ - The display name of the tax rate, which will be shown to users. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - jurisdiction: NotRequired[str] - """ - The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer's invoice. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - state: NotRequired[str] - """ - [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2), without country prefix. For example, "NY" for New York, United States. - """ - tax_type: NotRequired[ - Literal[ - "amusement_tax", - "communications_tax", - "gst", - "hst", - "igst", - "jct", - "lease_tax", - "pst", - "qst", - "retail_delivery_fee", - "rst", - "sales_tax", - "service_tax", - "vat", - ] - ] - """ - The high-level tax type, such as `vat` or `sales_tax`. - """ +class TaxRateService(StripeService): def list( self, - params: Optional["TaxRateService.ListParams"] = None, + params: Optional["TaxRateListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[TaxRate]: """ @@ -203,7 +37,7 @@ def list( async def list_async( self, - params: Optional["TaxRateService.ListParams"] = None, + params: Optional["TaxRateListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[TaxRate]: """ @@ -222,7 +56,7 @@ async def list_async( def create( self, - params: "TaxRateService.CreateParams", + params: "TaxRateCreateParams", options: Optional[RequestOptions] = None, ) -> TaxRate: """ @@ -241,7 +75,7 @@ def create( async def create_async( self, - params: "TaxRateService.CreateParams", + params: "TaxRateCreateParams", options: Optional[RequestOptions] = None, ) -> TaxRate: """ @@ -261,7 +95,7 @@ async def create_async( def retrieve( self, tax_rate: str, - params: Optional["TaxRateService.RetrieveParams"] = None, + params: Optional["TaxRateRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> TaxRate: """ @@ -283,7 +117,7 @@ def retrieve( async def retrieve_async( self, tax_rate: str, - params: Optional["TaxRateService.RetrieveParams"] = None, + params: Optional["TaxRateRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> TaxRate: """ @@ -305,7 +139,7 @@ async def retrieve_async( def update( self, tax_rate: str, - params: Optional["TaxRateService.UpdateParams"] = None, + params: Optional["TaxRateUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> TaxRate: """ @@ -327,7 +161,7 @@ def update( async def update_async( self, tax_rate: str, - params: Optional["TaxRateService.UpdateParams"] = None, + params: Optional["TaxRateUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> TaxRate: """ diff --git a/stripe/_token.py b/stripe/_token.py index 84e72f495..bf02e107e 100644 --- a/stripe/_token.py +++ b/stripe/_token.py @@ -1,19 +1,14 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._createable_api_resource import CreateableAPIResource -from stripe._request_options import RequestOptions -from typing import ClassVar, Dict, List, Optional, cast -from typing_extensions import ( - Literal, - NotRequired, - TypedDict, - Unpack, - TYPE_CHECKING, -) +from typing import ClassVar, Optional, cast +from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: from stripe._bank_account import BankAccount from stripe._card import Card + from stripe.params._token_create_params import TokenCreateParams + from stripe.params._token_retrieve_params import TokenRetrieveParams class Token(CreateableAPIResource["Token"]): @@ -41,1162 +36,6 @@ class Token(CreateableAPIResource["Token"]): """ OBJECT_NAME: ClassVar[Literal["token"]] = "token" - - class CreateParams(RequestOptions): - account: NotRequired["Token.CreateParamsAccount"] - """ - Information for the account this token represents. - """ - bank_account: NotRequired["Token.CreateParamsBankAccount"] - """ - The bank account this token will represent. - """ - card: NotRequired["Token.CreateParamsCard|str"] - """ - The card this token will represent. If you also pass in a customer, the card must be the ID of a card belonging to the customer. Otherwise, if you do not pass in a customer, this is a dictionary containing a user's credit card details, with the options described below. - """ - customer: NotRequired[str] - """ - Create a token for the customer, which is owned by the application's account. You can only use this with an [OAuth access token](https://stripe.com/docs/connect/standard-accounts) or [Stripe-Account header](https://stripe.com/docs/connect/authentication). Learn more about [cloning saved payment methods](https://stripe.com/docs/connect/cloning-saved-payment-methods). - """ - cvc_update: NotRequired["Token.CreateParamsCvcUpdate"] - """ - The updated CVC value this token represents. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - person: NotRequired["Token.CreateParamsPerson"] - """ - Information for the person this token represents. - """ - pii: NotRequired["Token.CreateParamsPii"] - """ - The PII this token represents. - """ - - class CreateParamsAccount(TypedDict): - business_type: NotRequired[ - Literal["company", "government_entity", "individual", "non_profit"] - ] - """ - The business type. - """ - company: NotRequired["Token.CreateParamsAccountCompany"] - """ - Information about the company or business. - """ - individual: NotRequired["Token.CreateParamsAccountIndividual"] - """ - Information about the person represented by the account. - """ - tos_shown_and_accepted: NotRequired[bool] - """ - Whether the user described by the data in the token has been shown [the Stripe Connected Account Agreement](https://docs.stripe.com/connect/account-tokens#stripe-connected-account-agreement). When creating an account token to create a new Connect account, this value must be `true`. - """ - - class CreateParamsAccountCompany(TypedDict): - address: NotRequired["Token.CreateParamsAccountCompanyAddress"] - """ - The company's primary address. - """ - address_kana: NotRequired[ - "Token.CreateParamsAccountCompanyAddressKana" - ] - """ - The Kana variation of the company's primary address (Japan only). - """ - address_kanji: NotRequired[ - "Token.CreateParamsAccountCompanyAddressKanji" - ] - """ - The Kanji variation of the company's primary address (Japan only). - """ - directors_provided: NotRequired[bool] - """ - Whether the company's directors have been provided. Set this Boolean to `true` after creating all the company's directors with [the Persons API](https://docs.stripe.com/api/persons) for accounts with a `relationship.director` requirement. This value is not automatically set to `true` after creating directors, so it needs to be updated to indicate all directors have been provided. - """ - directorship_declaration: NotRequired[ - "Token.CreateParamsAccountCompanyDirectorshipDeclaration" - ] - """ - This hash is used to attest that the directors information provided to Stripe is both current and correct. - """ - executives_provided: NotRequired[bool] - """ - Whether the company's executives have been provided. Set this Boolean to `true` after creating all the company's executives with [the Persons API](https://docs.stripe.com/api/persons) for accounts with a `relationship.executive` requirement. - """ - export_license_id: NotRequired[str] - """ - The export license ID number of the company, also referred as Import Export Code (India only). - """ - export_purpose_code: NotRequired[str] - """ - The purpose code to use for export transactions (India only). - """ - name: NotRequired[str] - """ - The company's legal name. - """ - name_kana: NotRequired[str] - """ - The Kana variation of the company's legal name (Japan only). - """ - name_kanji: NotRequired[str] - """ - The Kanji variation of the company's legal name (Japan only). - """ - owners_provided: NotRequired[bool] - """ - Whether the company's owners have been provided. Set this Boolean to `true` after creating all the company's owners with [the Persons API](https://docs.stripe.com/api/persons) for accounts with a `relationship.owner` requirement. - """ - ownership_declaration: NotRequired[ - "Token.CreateParamsAccountCompanyOwnershipDeclaration" - ] - """ - This hash is used to attest that the beneficial owner information provided to Stripe is both current and correct. - """ - ownership_declaration_shown_and_signed: NotRequired[bool] - """ - Whether the user described by the data in the token has been shown the Ownership Declaration and indicated that it is correct. - """ - ownership_exemption_reason: NotRequired[ - "Literal['']|Literal['qualified_entity_exceeds_ownership_threshold', 'qualifies_as_financial_institution']" - ] - """ - This value is used to determine if a business is exempt from providing ultimate beneficial owners. See [this support article](https://support.stripe.com/questions/exemption-from-providing-ownership-details) and [changelog](https://docs.stripe.com/changelog/acacia/2025-01-27/ownership-exemption-reason-accounts-api) for more details. - """ - phone: NotRequired[str] - """ - The company's phone number (used for verification). - """ - registration_date: NotRequired[ - "Literal['']|Token.CreateParamsAccountCompanyRegistrationDate" - ] - """ - When the business was incorporated or registered. - """ - registration_number: NotRequired[str] - """ - The identification number given to a company when it is registered or incorporated, if distinct from the identification number used for filing taxes. (Examples are the CIN for companies and LLP IN for partnerships in India, and the Company Registration Number in Hong Kong). - """ - structure: NotRequired[ - "Literal['']|Literal['free_zone_establishment', 'free_zone_llc', 'government_instrumentality', 'governmental_unit', 'incorporated_non_profit', 'incorporated_partnership', 'limited_liability_partnership', 'llc', 'multi_member_llc', 'private_company', 'private_corporation', 'private_partnership', 'public_company', 'public_corporation', 'public_partnership', 'registered_charity', 'single_member_llc', 'sole_establishment', 'sole_proprietorship', 'tax_exempt_government_instrumentality', 'unincorporated_association', 'unincorporated_non_profit', 'unincorporated_partnership']" - ] - """ - The category identifying the legal structure of the company or legal entity. See [Business structure](https://docs.stripe.com/connect/identity-verification#business-structure) for more details. Pass an empty string to unset this value. - """ - tax_id: NotRequired[str] - """ - The business ID number of the company, as appropriate for the company's country. (Examples are an Employer ID Number in the U.S., a Business Number in Canada, or a Company Number in the UK.) - """ - tax_id_registrar: NotRequired[str] - """ - The jurisdiction in which the `tax_id` is registered (Germany-based companies only). - """ - vat_id: NotRequired[str] - """ - The VAT number of the company. - """ - verification: NotRequired[ - "Token.CreateParamsAccountCompanyVerification" - ] - """ - Information on the verification state of the company. - """ - - class CreateParamsAccountCompanyAddress(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. - """ - - class CreateParamsAccountCompanyAddressKana(TypedDict): - city: NotRequired[str] - """ - City or ward. - """ - 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] - """ - Block or building number. - """ - line2: NotRequired[str] - """ - Building details. - """ - postal_code: NotRequired[str] - """ - Postal code. - """ - state: NotRequired[str] - """ - Prefecture. - """ - town: NotRequired[str] - """ - Town or cho-me. - """ - - class CreateParamsAccountCompanyAddressKanji(TypedDict): - city: NotRequired[str] - """ - City or ward. - """ - 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] - """ - Block or building number. - """ - line2: NotRequired[str] - """ - Building details. - """ - postal_code: NotRequired[str] - """ - Postal code. - """ - state: NotRequired[str] - """ - Prefecture. - """ - town: NotRequired[str] - """ - Town or cho-me. - """ - - class CreateParamsAccountCompanyDirectorshipDeclaration(TypedDict): - date: NotRequired[int] - """ - The Unix timestamp marking when the directorship declaration attestation was made. - """ - ip: NotRequired[str] - """ - The IP address from which the directorship declaration attestation was made. - """ - user_agent: NotRequired[str] - """ - The user agent of the browser from which the directorship declaration attestation was made. - """ - - class CreateParamsAccountCompanyOwnershipDeclaration(TypedDict): - date: NotRequired[int] - """ - The Unix timestamp marking when the beneficial owner attestation was made. - """ - ip: NotRequired[str] - """ - The IP address from which the beneficial owner attestation was made. - """ - user_agent: NotRequired[str] - """ - The user agent of the browser from which the beneficial owner attestation was made. - """ - - class CreateParamsAccountCompanyRegistrationDate(TypedDict): - day: int - """ - The day of registration, between 1 and 31. - """ - month: int - """ - The month of registration, between 1 and 12. - """ - year: int - """ - The four-digit year of registration. - """ - - class CreateParamsAccountCompanyVerification(TypedDict): - document: NotRequired[ - "Token.CreateParamsAccountCompanyVerificationDocument" - ] - """ - A document verifying the business. - """ - - class CreateParamsAccountCompanyVerificationDocument(TypedDict): - back: NotRequired[str] - """ - The back of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. - """ - front: NotRequired[str] - """ - The front of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. - """ - - class CreateParamsAccountIndividual(TypedDict): - address: NotRequired["Token.CreateParamsAccountIndividualAddress"] - """ - The individual's primary address. - """ - address_kana: NotRequired[ - "Token.CreateParamsAccountIndividualAddressKana" - ] - """ - The Kana variation of the individual's primary address (Japan only). - """ - address_kanji: NotRequired[ - "Token.CreateParamsAccountIndividualAddressKanji" - ] - """ - The Kanji variation of the individual's primary address (Japan only). - """ - dob: NotRequired["Literal['']|Token.CreateParamsAccountIndividualDob"] - """ - The individual's date of birth. - """ - email: NotRequired[str] - """ - The individual's email address. - """ - first_name: NotRequired[str] - """ - The individual's first name. - """ - first_name_kana: NotRequired[str] - """ - The Kana variation of the individual's first name (Japan only). - """ - first_name_kanji: NotRequired[str] - """ - The Kanji variation of the individual's first name (Japan only). - """ - full_name_aliases: NotRequired["Literal['']|List[str]"] - """ - A list of alternate names or aliases that the individual is known by. - """ - gender: NotRequired[str] - """ - The individual's gender - """ - id_number: NotRequired[str] - """ - The government-issued ID number of the individual, as appropriate for the representative's country. (Examples are a Social Security Number in the U.S., or a Social Insurance Number in Canada). Instead of the number itself, you can also provide a [PII token created with Stripe.js](https://docs.stripe.com/js/tokens/create_token?type=pii). - """ - id_number_secondary: NotRequired[str] - """ - The government-issued secondary ID number of the individual, as appropriate for the representative's country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token created with Stripe.js](https://docs.stripe.com/js/tokens/create_token?type=pii). - """ - last_name: NotRequired[str] - """ - The individual's last name. - """ - last_name_kana: NotRequired[str] - """ - The Kana variation of the individual's last name (Japan only). - """ - last_name_kanji: NotRequired[str] - """ - The Kanji variation of the individual's last name (Japan only). - """ - maiden_name: NotRequired[str] - """ - The individual's maiden name. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - phone: NotRequired[str] - """ - The individual's phone number. - """ - political_exposure: NotRequired[Literal["existing", "none"]] - """ - Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. - """ - registered_address: NotRequired[ - "Token.CreateParamsAccountIndividualRegisteredAddress" - ] - """ - The individual's registered address. - """ - relationship: NotRequired[ - "Token.CreateParamsAccountIndividualRelationship" - ] - """ - Describes the person's relationship to the account. - """ - ssn_last_4: NotRequired[str] - """ - The last four digits of the individual's Social Security Number (U.S. only). - """ - verification: NotRequired[ - "Token.CreateParamsAccountIndividualVerification" - ] - """ - The individual's verification document information. - """ - - class CreateParamsAccountIndividualAddress(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. - """ - - class CreateParamsAccountIndividualAddressKana(TypedDict): - city: NotRequired[str] - """ - City or ward. - """ - 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] - """ - Block or building number. - """ - line2: NotRequired[str] - """ - Building details. - """ - postal_code: NotRequired[str] - """ - Postal code. - """ - state: NotRequired[str] - """ - Prefecture. - """ - town: NotRequired[str] - """ - Town or cho-me. - """ - - class CreateParamsAccountIndividualAddressKanji(TypedDict): - city: NotRequired[str] - """ - City or ward. - """ - 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] - """ - Block or building number. - """ - line2: NotRequired[str] - """ - Building details. - """ - postal_code: NotRequired[str] - """ - Postal code. - """ - state: NotRequired[str] - """ - Prefecture. - """ - town: NotRequired[str] - """ - Town or cho-me. - """ - - class CreateParamsAccountIndividualDob(TypedDict): - day: int - """ - The day of birth, between 1 and 31. - """ - month: int - """ - The month of birth, between 1 and 12. - """ - year: int - """ - The four-digit year of birth. - """ - - class CreateParamsAccountIndividualRegisteredAddress(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. - """ - - class CreateParamsAccountIndividualRelationship(TypedDict): - director: NotRequired[bool] - """ - Whether the person is a director of the account's legal entity. Directors are typically members of the governing board of the company, or responsible for ensuring the company meets its regulatory obligations. - """ - executive: NotRequired[bool] - """ - Whether the person has significant responsibility to control, manage, or direct the organization. - """ - owner: NotRequired[bool] - """ - Whether the person is an owner of the account's legal entity. - """ - percent_ownership: NotRequired["Literal['']|float"] - """ - The percent owned by the person of the account's legal entity. - """ - title: NotRequired[str] - """ - The person's title (e.g., CEO, Support Engineer). - """ - - class CreateParamsAccountIndividualVerification(TypedDict): - additional_document: NotRequired[ - "Token.CreateParamsAccountIndividualVerificationAdditionalDocument" - ] - """ - A document showing address, either a passport, local ID card, or utility bill from a well-known utility company. - """ - document: NotRequired[ - "Token.CreateParamsAccountIndividualVerificationDocument" - ] - """ - An identifying document, either a passport or local ID card. - """ - - class CreateParamsAccountIndividualVerificationAdditionalDocument( - TypedDict, - ): - back: NotRequired[str] - """ - The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. - """ - front: NotRequired[str] - """ - The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. - """ - - class CreateParamsAccountIndividualVerificationDocument(TypedDict): - back: NotRequired[str] - """ - The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. - """ - front: NotRequired[str] - """ - The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. - """ - - class CreateParamsBankAccount(TypedDict): - account_holder_name: NotRequired[str] - """ - The name of the person or business that owns the bank account. This field is required when attaching the bank account to a `Customer` object. - """ - account_holder_type: NotRequired[Literal["company", "individual"]] - """ - The type of entity that holds the account. It can be `company` or `individual`. This field is required when attaching the bank account to a `Customer` object. - """ - account_number: str - """ - The account number for the bank account, in string form. Must be a checking account. - """ - account_type: NotRequired[ - Literal["checking", "futsu", "savings", "toza"] - ] - """ - The bank account type. This can only be `checking` or `savings` in most countries. In Japan, this can only be `futsu` or `toza`. - """ - country: str - """ - The country in which the bank account is located. - """ - currency: NotRequired[str] - """ - The currency the bank account is in. This must be a country/currency pairing that [Stripe supports.](https://stripe.com/docs/payouts) - """ - payment_method: NotRequired[str] - """ - The ID of a Payment Method with a `type` of `us_bank_account`. The Payment Method's bank account information will be copied and returned as a Bank Account Token. This parameter is exclusive with respect to all other parameters in the `bank_account` hash. You must include the top-level `customer` parameter if the Payment Method is attached to a `Customer` object. If the Payment Method is not attached to a `Customer` object, it will be consumed and cannot be used again. You may not use Payment Methods which were created by a Setup Intent with `attach_to_self=true`. - """ - routing_number: NotRequired[str] - """ - The routing number, sort code, or other country-appropriate institution number for the bank account. For US bank accounts, this is required and should be the ACH routing number, not the wire routing number. If you are providing an IBAN for `account_number`, this field is not required. - """ - - class CreateParamsCard(TypedDict): - address_city: NotRequired[str] - """ - City / District / Suburb / Town / Village. - """ - address_country: NotRequired[str] - """ - Billing address country, if provided. - """ - address_line1: NotRequired[str] - """ - Address line 1 (Street address / PO Box / Company name). - """ - address_line2: NotRequired[str] - """ - Address line 2 (Apartment / Suite / Unit / Building). - """ - address_state: NotRequired[str] - """ - State / County / Province / Region. - """ - address_zip: NotRequired[str] - """ - ZIP or postal code. - """ - currency: NotRequired[str] - """ - Required in order to add the card to an account; in all other cases, this parameter is not used. When added to an account, the card (which must be a debit card) can be used as a transfer destination for funds in this currency. - """ - cvc: NotRequired[str] - """ - Card security code. Highly recommended to always include this value. - """ - exp_month: str - """ - Two-digit number representing the card's expiration month. - """ - exp_year: str - """ - Two- or four-digit number representing the card's expiration year. - """ - name: NotRequired[str] - """ - Cardholder's full name. - """ - networks: NotRequired["Token.CreateParamsCardNetworks"] - """ - Contains information about card networks used to process the payment. - """ - number: str - """ - The card number, as a string without any separators. - """ - - class CreateParamsCardNetworks(TypedDict): - preferred: NotRequired[ - Literal["cartes_bancaires", "mastercard", "visa"] - ] - """ - The customer's preferred card network for co-branded cards. Supports `cartes_bancaires`, `mastercard`, or `visa`. Selection of a network that does not apply to the card will be stored as `invalid_preference` on the card. - """ - - class CreateParamsCvcUpdate(TypedDict): - cvc: str - """ - The CVC value, in string form. - """ - - class CreateParamsPerson(TypedDict): - additional_tos_acceptances: NotRequired[ - "Token.CreateParamsPersonAdditionalTosAcceptances" - ] - """ - Details on the legal guardian's or authorizer's acceptance of the required Stripe agreements. - """ - address: NotRequired["Token.CreateParamsPersonAddress"] - """ - The person's address. - """ - address_kana: NotRequired["Token.CreateParamsPersonAddressKana"] - """ - The Kana variation of the person's address (Japan only). - """ - address_kanji: NotRequired["Token.CreateParamsPersonAddressKanji"] - """ - The Kanji variation of the person's address (Japan only). - """ - dob: NotRequired["Literal['']|Token.CreateParamsPersonDob"] - """ - The person's date of birth. - """ - documents: NotRequired["Token.CreateParamsPersonDocuments"] - """ - Documents that may be submitted to satisfy various informational requests. - """ - email: NotRequired[str] - """ - The person's email address. - """ - first_name: NotRequired[str] - """ - The person's first name. - """ - first_name_kana: NotRequired[str] - """ - The Kana variation of the person's first name (Japan only). - """ - first_name_kanji: NotRequired[str] - """ - The Kanji variation of the person's first name (Japan only). - """ - full_name_aliases: NotRequired["Literal['']|List[str]"] - """ - A list of alternate names or aliases that the person is known by. - """ - gender: NotRequired[str] - """ - The person's gender (International regulations require either "male" or "female"). - """ - id_number: NotRequired[str] - """ - The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://docs.stripe.com/js/tokens/create_token?type=pii). - """ - id_number_secondary: NotRequired[str] - """ - The person's secondary ID number, as appropriate for their country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://docs.stripe.com/js/tokens/create_token?type=pii). - """ - last_name: NotRequired[str] - """ - The person's last name. - """ - last_name_kana: NotRequired[str] - """ - The Kana variation of the person's last name (Japan only). - """ - last_name_kanji: NotRequired[str] - """ - The Kanji variation of the person's last name (Japan only). - """ - maiden_name: NotRequired[str] - """ - The person's maiden name. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - nationality: NotRequired[str] - """ - The country where the person is a national. Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)), or "XX" if unavailable. - """ - phone: NotRequired[str] - """ - The person's phone number. - """ - political_exposure: NotRequired[Literal["existing", "none"]] - """ - Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. - """ - registered_address: NotRequired[ - "Token.CreateParamsPersonRegisteredAddress" - ] - """ - The person's registered address. - """ - relationship: NotRequired["Token.CreateParamsPersonRelationship"] - """ - The relationship that this person has with the account's legal entity. - """ - ssn_last_4: NotRequired[str] - """ - The last four digits of the person's Social Security number (U.S. only). - """ - us_cfpb_data: NotRequired["Token.CreateParamsPersonUsCfpbData"] - """ - Demographic data related to the person. - """ - verification: NotRequired["Token.CreateParamsPersonVerification"] - """ - The person's verification status. - """ - - class CreateParamsPersonAdditionalTosAcceptances(TypedDict): - account: NotRequired[ - "Token.CreateParamsPersonAdditionalTosAcceptancesAccount" - ] - """ - Details on the legal guardian's acceptance of the main Stripe service agreement. - """ - - class CreateParamsPersonAdditionalTosAcceptancesAccount(TypedDict): - date: NotRequired[int] - """ - The Unix timestamp marking when the account representative accepted the service agreement. - """ - ip: NotRequired[str] - """ - The IP address from which the account representative accepted the service agreement. - """ - user_agent: NotRequired["Literal['']|str"] - """ - The user agent of the browser from which the account representative accepted the service agreement. - """ - - class CreateParamsPersonAddress(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. - """ - - class CreateParamsPersonAddressKana(TypedDict): - city: NotRequired[str] - """ - City or ward. - """ - 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] - """ - Block or building number. - """ - line2: NotRequired[str] - """ - Building details. - """ - postal_code: NotRequired[str] - """ - Postal code. - """ - state: NotRequired[str] - """ - Prefecture. - """ - town: NotRequired[str] - """ - Town or cho-me. - """ - - class CreateParamsPersonAddressKanji(TypedDict): - city: NotRequired[str] - """ - City or ward. - """ - 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] - """ - Block or building number. - """ - line2: NotRequired[str] - """ - Building details. - """ - postal_code: NotRequired[str] - """ - Postal code. - """ - state: NotRequired[str] - """ - Prefecture. - """ - town: NotRequired[str] - """ - Town or cho-me. - """ - - class CreateParamsPersonDob(TypedDict): - day: int - """ - The day of birth, between 1 and 31. - """ - month: int - """ - The month of birth, between 1 and 12. - """ - year: int - """ - The four-digit year of birth. - """ - - class CreateParamsPersonDocuments(TypedDict): - company_authorization: NotRequired[ - "Token.CreateParamsPersonDocumentsCompanyAuthorization" - ] - """ - One or more documents that demonstrate proof that this person is authorized to represent the company. - """ - passport: NotRequired["Token.CreateParamsPersonDocumentsPassport"] - """ - One or more documents showing the person's passport page with photo and personal data. - """ - visa: NotRequired["Token.CreateParamsPersonDocumentsVisa"] - """ - One or more documents showing the person's visa required for living in the country where they are residing. - """ - - class CreateParamsPersonDocumentsCompanyAuthorization(TypedDict): - files: NotRequired[List[str]] - """ - One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. - """ - - class CreateParamsPersonDocumentsPassport(TypedDict): - files: NotRequired[List[str]] - """ - One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. - """ - - class CreateParamsPersonDocumentsVisa(TypedDict): - files: NotRequired[List[str]] - """ - One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. - """ - - class CreateParamsPersonRegisteredAddress(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. - """ - - class CreateParamsPersonRelationship(TypedDict): - authorizer: NotRequired[bool] - """ - Whether the person is the authorizer of the account's representative. - """ - director: NotRequired[bool] - """ - Whether the person is a director of the account's legal entity. Directors are typically members of the governing board of the company, or responsible for ensuring the company meets its regulatory obligations. - """ - executive: NotRequired[bool] - """ - Whether the person has significant responsibility to control, manage, or direct the organization. - """ - legal_guardian: NotRequired[bool] - """ - Whether the person is the legal guardian of the account's representative. - """ - owner: NotRequired[bool] - """ - Whether the person is an owner of the account's legal entity. - """ - percent_ownership: NotRequired["Literal['']|float"] - """ - The percent owned by the person of the account's legal entity. - """ - representative: NotRequired[bool] - """ - Whether the person is authorized as the primary representative of the account. This is the person nominated by the business to provide information about themselves, and general information about the account. There can only be one representative at any given time. At the time the account is created, this person should be set to the person responsible for opening the account. - """ - title: NotRequired[str] - """ - The person's title (e.g., CEO, Support Engineer). - """ - - class CreateParamsPersonUsCfpbData(TypedDict): - ethnicity_details: NotRequired[ - "Token.CreateParamsPersonUsCfpbDataEthnicityDetails" - ] - """ - The persons ethnicity details - """ - race_details: NotRequired[ - "Token.CreateParamsPersonUsCfpbDataRaceDetails" - ] - """ - The persons race details - """ - self_identified_gender: NotRequired[str] - """ - The persons self-identified gender - """ - - class CreateParamsPersonUsCfpbDataEthnicityDetails(TypedDict): - ethnicity: NotRequired[ - List[ - Literal[ - "cuban", - "hispanic_or_latino", - "mexican", - "not_hispanic_or_latino", - "other_hispanic_or_latino", - "prefer_not_to_answer", - "puerto_rican", - ] - ] - ] - """ - The persons ethnicity - """ - ethnicity_other: NotRequired[str] - """ - Please specify your origin, when other is selected. - """ - - class CreateParamsPersonUsCfpbDataRaceDetails(TypedDict): - race: NotRequired[ - List[ - Literal[ - "african_american", - "american_indian_or_alaska_native", - "asian", - "asian_indian", - "black_or_african_american", - "chinese", - "ethiopian", - "filipino", - "guamanian_or_chamorro", - "haitian", - "jamaican", - "japanese", - "korean", - "native_hawaiian", - "native_hawaiian_or_other_pacific_islander", - "nigerian", - "other_asian", - "other_black_or_african_american", - "other_pacific_islander", - "prefer_not_to_answer", - "samoan", - "somali", - "vietnamese", - "white", - ] - ] - ] - """ - The persons race. - """ - race_other: NotRequired[str] - """ - Please specify your race, when other is selected. - """ - - class CreateParamsPersonVerification(TypedDict): - additional_document: NotRequired[ - "Token.CreateParamsPersonVerificationAdditionalDocument" - ] - """ - A document showing address, either a passport, local ID card, or utility bill from a well-known utility company. - """ - document: NotRequired["Token.CreateParamsPersonVerificationDocument"] - """ - An identifying document, either a passport or local ID card. - """ - - class CreateParamsPersonVerificationAdditionalDocument(TypedDict): - back: NotRequired[str] - """ - The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. - """ - front: NotRequired[str] - """ - The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. - """ - - class CreateParamsPersonVerificationDocument(TypedDict): - back: NotRequired[str] - """ - The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. - """ - front: NotRequired[str] - """ - The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. - """ - - class CreateParamsPii(TypedDict): - id_number: NotRequired[str] - """ - The `id_number` for the PII, in string form. - """ - - class RetrieveParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - bank_account: Optional["BankAccount"] """ These bank accounts are payment methods on `Customer` objects. @@ -1245,7 +84,7 @@ class RetrieveParams(RequestOptions): """ @classmethod - def create(cls, **params: Unpack["Token.CreateParams"]) -> "Token": + def create(cls, **params: Unpack["TokenCreateParams"]) -> "Token": """ Creates a single-use token that represents a bank account's details. You can use this token with any v1 API method in place of a bank account dictionary. You can only use this token once. To do so, attach it to a [connected account](https://docs.stripe.com/api#accounts) where [controller.requirement_collection](https://docs.stripe.com/api/accounts/object#account_object-controller-requirement_collection) is application, which includes Custom accounts. @@ -1261,7 +100,7 @@ def create(cls, **params: Unpack["Token.CreateParams"]) -> "Token": @classmethod async def create_async( - cls, **params: Unpack["Token.CreateParams"] + cls, **params: Unpack["TokenCreateParams"] ) -> "Token": """ Creates a single-use token that represents a bank account's details. @@ -1278,7 +117,7 @@ async def create_async( @classmethod def retrieve( - cls, id: str, **params: Unpack["Token.RetrieveParams"] + cls, id: str, **params: Unpack["TokenRetrieveParams"] ) -> "Token": """ Retrieves the token with the given ID. @@ -1289,7 +128,7 @@ def retrieve( @classmethod async def retrieve_async( - cls, id: str, **params: Unpack["Token.RetrieveParams"] + cls, id: str, **params: Unpack["TokenRetrieveParams"] ) -> "Token": """ Retrieves the token with the given ID. diff --git a/stripe/_token_service.py b/stripe/_token_service.py index 06c6a66ae..f42c261e7 100644 --- a/stripe/_token_service.py +++ b/stripe/_token_service.py @@ -4,1184 +4,19 @@ from stripe._stripe_service import StripeService from stripe._token import Token from stripe._util import sanitize_id -from typing import Dict, List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params._token_create_params import TokenCreateParams + from stripe.params._token_retrieve_params import TokenRetrieveParams -class TokenService(StripeService): - class CreateParams(TypedDict): - account: NotRequired["TokenService.CreateParamsAccount"] - """ - Information for the account this token represents. - """ - bank_account: NotRequired["TokenService.CreateParamsBankAccount"] - """ - The bank account this token will represent. - """ - card: NotRequired["TokenService.CreateParamsCard|str"] - """ - The card this token will represent. If you also pass in a customer, the card must be the ID of a card belonging to the customer. Otherwise, if you do not pass in a customer, this is a dictionary containing a user's credit card details, with the options described below. - """ - customer: NotRequired[str] - """ - Create a token for the customer, which is owned by the application's account. You can only use this with an [OAuth access token](https://stripe.com/docs/connect/standard-accounts) or [Stripe-Account header](https://stripe.com/docs/connect/authentication). Learn more about [cloning saved payment methods](https://stripe.com/docs/connect/cloning-saved-payment-methods). - """ - cvc_update: NotRequired["TokenService.CreateParamsCvcUpdate"] - """ - The updated CVC value this token represents. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - person: NotRequired["TokenService.CreateParamsPerson"] - """ - Information for the person this token represents. - """ - pii: NotRequired["TokenService.CreateParamsPii"] - """ - The PII this token represents. - """ - - class CreateParamsAccount(TypedDict): - business_type: NotRequired[ - Literal["company", "government_entity", "individual", "non_profit"] - ] - """ - The business type. - """ - company: NotRequired["TokenService.CreateParamsAccountCompany"] - """ - Information about the company or business. - """ - individual: NotRequired["TokenService.CreateParamsAccountIndividual"] - """ - Information about the person represented by the account. - """ - tos_shown_and_accepted: NotRequired[bool] - """ - Whether the user described by the data in the token has been shown [the Stripe Connected Account Agreement](https://docs.stripe.com/connect/account-tokens#stripe-connected-account-agreement). When creating an account token to create a new Connect account, this value must be `true`. - """ - - class CreateParamsAccountCompany(TypedDict): - address: NotRequired["TokenService.CreateParamsAccountCompanyAddress"] - """ - The company's primary address. - """ - address_kana: NotRequired[ - "TokenService.CreateParamsAccountCompanyAddressKana" - ] - """ - The Kana variation of the company's primary address (Japan only). - """ - address_kanji: NotRequired[ - "TokenService.CreateParamsAccountCompanyAddressKanji" - ] - """ - The Kanji variation of the company's primary address (Japan only). - """ - directors_provided: NotRequired[bool] - """ - Whether the company's directors have been provided. Set this Boolean to `true` after creating all the company's directors with [the Persons API](https://docs.stripe.com/api/persons) for accounts with a `relationship.director` requirement. This value is not automatically set to `true` after creating directors, so it needs to be updated to indicate all directors have been provided. - """ - directorship_declaration: NotRequired[ - "TokenService.CreateParamsAccountCompanyDirectorshipDeclaration" - ] - """ - This hash is used to attest that the directors information provided to Stripe is both current and correct. - """ - executives_provided: NotRequired[bool] - """ - Whether the company's executives have been provided. Set this Boolean to `true` after creating all the company's executives with [the Persons API](https://docs.stripe.com/api/persons) for accounts with a `relationship.executive` requirement. - """ - export_license_id: NotRequired[str] - """ - The export license ID number of the company, also referred as Import Export Code (India only). - """ - export_purpose_code: NotRequired[str] - """ - The purpose code to use for export transactions (India only). - """ - name: NotRequired[str] - """ - The company's legal name. - """ - name_kana: NotRequired[str] - """ - The Kana variation of the company's legal name (Japan only). - """ - name_kanji: NotRequired[str] - """ - The Kanji variation of the company's legal name (Japan only). - """ - owners_provided: NotRequired[bool] - """ - Whether the company's owners have been provided. Set this Boolean to `true` after creating all the company's owners with [the Persons API](https://docs.stripe.com/api/persons) for accounts with a `relationship.owner` requirement. - """ - ownership_declaration: NotRequired[ - "TokenService.CreateParamsAccountCompanyOwnershipDeclaration" - ] - """ - This hash is used to attest that the beneficial owner information provided to Stripe is both current and correct. - """ - ownership_declaration_shown_and_signed: NotRequired[bool] - """ - Whether the user described by the data in the token has been shown the Ownership Declaration and indicated that it is correct. - """ - ownership_exemption_reason: NotRequired[ - "Literal['']|Literal['qualified_entity_exceeds_ownership_threshold', 'qualifies_as_financial_institution']" - ] - """ - This value is used to determine if a business is exempt from providing ultimate beneficial owners. See [this support article](https://support.stripe.com/questions/exemption-from-providing-ownership-details) and [changelog](https://docs.stripe.com/changelog/acacia/2025-01-27/ownership-exemption-reason-accounts-api) for more details. - """ - phone: NotRequired[str] - """ - The company's phone number (used for verification). - """ - registration_date: NotRequired[ - "Literal['']|TokenService.CreateParamsAccountCompanyRegistrationDate" - ] - """ - When the business was incorporated or registered. - """ - registration_number: NotRequired[str] - """ - The identification number given to a company when it is registered or incorporated, if distinct from the identification number used for filing taxes. (Examples are the CIN for companies and LLP IN for partnerships in India, and the Company Registration Number in Hong Kong). - """ - structure: NotRequired[ - "Literal['']|Literal['free_zone_establishment', 'free_zone_llc', 'government_instrumentality', 'governmental_unit', 'incorporated_non_profit', 'incorporated_partnership', 'limited_liability_partnership', 'llc', 'multi_member_llc', 'private_company', 'private_corporation', 'private_partnership', 'public_company', 'public_corporation', 'public_partnership', 'registered_charity', 'single_member_llc', 'sole_establishment', 'sole_proprietorship', 'tax_exempt_government_instrumentality', 'unincorporated_association', 'unincorporated_non_profit', 'unincorporated_partnership']" - ] - """ - The category identifying the legal structure of the company or legal entity. See [Business structure](https://docs.stripe.com/connect/identity-verification#business-structure) for more details. Pass an empty string to unset this value. - """ - tax_id: NotRequired[str] - """ - The business ID number of the company, as appropriate for the company's country. (Examples are an Employer ID Number in the U.S., a Business Number in Canada, or a Company Number in the UK.) - """ - tax_id_registrar: NotRequired[str] - """ - The jurisdiction in which the `tax_id` is registered (Germany-based companies only). - """ - vat_id: NotRequired[str] - """ - The VAT number of the company. - """ - verification: NotRequired[ - "TokenService.CreateParamsAccountCompanyVerification" - ] - """ - Information on the verification state of the company. - """ - - class CreateParamsAccountCompanyAddress(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. - """ - - class CreateParamsAccountCompanyAddressKana(TypedDict): - city: NotRequired[str] - """ - City or ward. - """ - 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] - """ - Block or building number. - """ - line2: NotRequired[str] - """ - Building details. - """ - postal_code: NotRequired[str] - """ - Postal code. - """ - state: NotRequired[str] - """ - Prefecture. - """ - town: NotRequired[str] - """ - Town or cho-me. - """ - - class CreateParamsAccountCompanyAddressKanji(TypedDict): - city: NotRequired[str] - """ - City or ward. - """ - 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] - """ - Block or building number. - """ - line2: NotRequired[str] - """ - Building details. - """ - postal_code: NotRequired[str] - """ - Postal code. - """ - state: NotRequired[str] - """ - Prefecture. - """ - town: NotRequired[str] - """ - Town or cho-me. - """ - - class CreateParamsAccountCompanyDirectorshipDeclaration(TypedDict): - date: NotRequired[int] - """ - The Unix timestamp marking when the directorship declaration attestation was made. - """ - ip: NotRequired[str] - """ - The IP address from which the directorship declaration attestation was made. - """ - user_agent: NotRequired[str] - """ - The user agent of the browser from which the directorship declaration attestation was made. - """ - - class CreateParamsAccountCompanyOwnershipDeclaration(TypedDict): - date: NotRequired[int] - """ - The Unix timestamp marking when the beneficial owner attestation was made. - """ - ip: NotRequired[str] - """ - The IP address from which the beneficial owner attestation was made. - """ - user_agent: NotRequired[str] - """ - The user agent of the browser from which the beneficial owner attestation was made. - """ - - class CreateParamsAccountCompanyRegistrationDate(TypedDict): - day: int - """ - The day of registration, between 1 and 31. - """ - month: int - """ - The month of registration, between 1 and 12. - """ - year: int - """ - The four-digit year of registration. - """ - - class CreateParamsAccountCompanyVerification(TypedDict): - document: NotRequired[ - "TokenService.CreateParamsAccountCompanyVerificationDocument" - ] - """ - A document verifying the business. - """ - - class CreateParamsAccountCompanyVerificationDocument(TypedDict): - back: NotRequired[str] - """ - The back of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. - """ - front: NotRequired[str] - """ - The front of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. - """ - - class CreateParamsAccountIndividual(TypedDict): - address: NotRequired[ - "TokenService.CreateParamsAccountIndividualAddress" - ] - """ - The individual's primary address. - """ - address_kana: NotRequired[ - "TokenService.CreateParamsAccountIndividualAddressKana" - ] - """ - The Kana variation of the individual's primary address (Japan only). - """ - address_kanji: NotRequired[ - "TokenService.CreateParamsAccountIndividualAddressKanji" - ] - """ - The Kanji variation of the individual's primary address (Japan only). - """ - dob: NotRequired[ - "Literal['']|TokenService.CreateParamsAccountIndividualDob" - ] - """ - The individual's date of birth. - """ - email: NotRequired[str] - """ - The individual's email address. - """ - first_name: NotRequired[str] - """ - The individual's first name. - """ - first_name_kana: NotRequired[str] - """ - The Kana variation of the individual's first name (Japan only). - """ - first_name_kanji: NotRequired[str] - """ - The Kanji variation of the individual's first name (Japan only). - """ - full_name_aliases: NotRequired["Literal['']|List[str]"] - """ - A list of alternate names or aliases that the individual is known by. - """ - gender: NotRequired[str] - """ - The individual's gender - """ - id_number: NotRequired[str] - """ - The government-issued ID number of the individual, as appropriate for the representative's country. (Examples are a Social Security Number in the U.S., or a Social Insurance Number in Canada). Instead of the number itself, you can also provide a [PII token created with Stripe.js](https://docs.stripe.com/js/tokens/create_token?type=pii). - """ - id_number_secondary: NotRequired[str] - """ - The government-issued secondary ID number of the individual, as appropriate for the representative's country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token created with Stripe.js](https://docs.stripe.com/js/tokens/create_token?type=pii). - """ - last_name: NotRequired[str] - """ - The individual's last name. - """ - last_name_kana: NotRequired[str] - """ - The Kana variation of the individual's last name (Japan only). - """ - last_name_kanji: NotRequired[str] - """ - The Kanji variation of the individual's last name (Japan only). - """ - maiden_name: NotRequired[str] - """ - The individual's maiden name. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - phone: NotRequired[str] - """ - The individual's phone number. - """ - political_exposure: NotRequired[Literal["existing", "none"]] - """ - Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. - """ - registered_address: NotRequired[ - "TokenService.CreateParamsAccountIndividualRegisteredAddress" - ] - """ - The individual's registered address. - """ - relationship: NotRequired[ - "TokenService.CreateParamsAccountIndividualRelationship" - ] - """ - Describes the person's relationship to the account. - """ - ssn_last_4: NotRequired[str] - """ - The last four digits of the individual's Social Security Number (U.S. only). - """ - verification: NotRequired[ - "TokenService.CreateParamsAccountIndividualVerification" - ] - """ - The individual's verification document information. - """ - - class CreateParamsAccountIndividualAddress(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. - """ - - class CreateParamsAccountIndividualAddressKana(TypedDict): - city: NotRequired[str] - """ - City or ward. - """ - 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] - """ - Block or building number. - """ - line2: NotRequired[str] - """ - Building details. - """ - postal_code: NotRequired[str] - """ - Postal code. - """ - state: NotRequired[str] - """ - Prefecture. - """ - town: NotRequired[str] - """ - Town or cho-me. - """ - - class CreateParamsAccountIndividualAddressKanji(TypedDict): - city: NotRequired[str] - """ - City or ward. - """ - 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] - """ - Block or building number. - """ - line2: NotRequired[str] - """ - Building details. - """ - postal_code: NotRequired[str] - """ - Postal code. - """ - state: NotRequired[str] - """ - Prefecture. - """ - town: NotRequired[str] - """ - Town or cho-me. - """ - - class CreateParamsAccountIndividualDob(TypedDict): - day: int - """ - The day of birth, between 1 and 31. - """ - month: int - """ - The month of birth, between 1 and 12. - """ - year: int - """ - The four-digit year of birth. - """ - - class CreateParamsAccountIndividualRegisteredAddress(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. - """ - - class CreateParamsAccountIndividualRelationship(TypedDict): - director: NotRequired[bool] - """ - Whether the person is a director of the account's legal entity. Directors are typically members of the governing board of the company, or responsible for ensuring the company meets its regulatory obligations. - """ - executive: NotRequired[bool] - """ - Whether the person has significant responsibility to control, manage, or direct the organization. - """ - owner: NotRequired[bool] - """ - Whether the person is an owner of the account's legal entity. - """ - percent_ownership: NotRequired["Literal['']|float"] - """ - The percent owned by the person of the account's legal entity. - """ - title: NotRequired[str] - """ - The person's title (e.g., CEO, Support Engineer). - """ - - class CreateParamsAccountIndividualVerification(TypedDict): - additional_document: NotRequired[ - "TokenService.CreateParamsAccountIndividualVerificationAdditionalDocument" - ] - """ - A document showing address, either a passport, local ID card, or utility bill from a well-known utility company. - """ - document: NotRequired[ - "TokenService.CreateParamsAccountIndividualVerificationDocument" - ] - """ - An identifying document, either a passport or local ID card. - """ - - class CreateParamsAccountIndividualVerificationAdditionalDocument( - TypedDict, - ): - back: NotRequired[str] - """ - The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. - """ - front: NotRequired[str] - """ - The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. - """ - - class CreateParamsAccountIndividualVerificationDocument(TypedDict): - back: NotRequired[str] - """ - The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. - """ - front: NotRequired[str] - """ - The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. - """ - - class CreateParamsBankAccount(TypedDict): - account_holder_name: NotRequired[str] - """ - The name of the person or business that owns the bank account. This field is required when attaching the bank account to a `Customer` object. - """ - account_holder_type: NotRequired[Literal["company", "individual"]] - """ - The type of entity that holds the account. It can be `company` or `individual`. This field is required when attaching the bank account to a `Customer` object. - """ - account_number: str - """ - The account number for the bank account, in string form. Must be a checking account. - """ - account_type: NotRequired[ - Literal["checking", "futsu", "savings", "toza"] - ] - """ - The bank account type. This can only be `checking` or `savings` in most countries. In Japan, this can only be `futsu` or `toza`. - """ - country: str - """ - The country in which the bank account is located. - """ - currency: NotRequired[str] - """ - The currency the bank account is in. This must be a country/currency pairing that [Stripe supports.](https://stripe.com/docs/payouts) - """ - payment_method: NotRequired[str] - """ - The ID of a Payment Method with a `type` of `us_bank_account`. The Payment Method's bank account information will be copied and returned as a Bank Account Token. This parameter is exclusive with respect to all other parameters in the `bank_account` hash. You must include the top-level `customer` parameter if the Payment Method is attached to a `Customer` object. If the Payment Method is not attached to a `Customer` object, it will be consumed and cannot be used again. You may not use Payment Methods which were created by a Setup Intent with `attach_to_self=true`. - """ - routing_number: NotRequired[str] - """ - The routing number, sort code, or other country-appropriate institution number for the bank account. For US bank accounts, this is required and should be the ACH routing number, not the wire routing number. If you are providing an IBAN for `account_number`, this field is not required. - """ - - class CreateParamsCard(TypedDict): - address_city: NotRequired[str] - """ - City / District / Suburb / Town / Village. - """ - address_country: NotRequired[str] - """ - Billing address country, if provided. - """ - address_line1: NotRequired[str] - """ - Address line 1 (Street address / PO Box / Company name). - """ - address_line2: NotRequired[str] - """ - Address line 2 (Apartment / Suite / Unit / Building). - """ - address_state: NotRequired[str] - """ - State / County / Province / Region. - """ - address_zip: NotRequired[str] - """ - ZIP or postal code. - """ - currency: NotRequired[str] - """ - Required in order to add the card to an account; in all other cases, this parameter is not used. When added to an account, the card (which must be a debit card) can be used as a transfer destination for funds in this currency. - """ - cvc: NotRequired[str] - """ - Card security code. Highly recommended to always include this value. - """ - exp_month: str - """ - Two-digit number representing the card's expiration month. - """ - exp_year: str - """ - Two- or four-digit number representing the card's expiration year. - """ - name: NotRequired[str] - """ - Cardholder's full name. - """ - networks: NotRequired["TokenService.CreateParamsCardNetworks"] - """ - Contains information about card networks used to process the payment. - """ - number: str - """ - The card number, as a string without any separators. - """ - - class CreateParamsCardNetworks(TypedDict): - preferred: NotRequired[ - Literal["cartes_bancaires", "mastercard", "visa"] - ] - """ - The customer's preferred card network for co-branded cards. Supports `cartes_bancaires`, `mastercard`, or `visa`. Selection of a network that does not apply to the card will be stored as `invalid_preference` on the card. - """ - - class CreateParamsCvcUpdate(TypedDict): - cvc: str - """ - The CVC value, in string form. - """ - - class CreateParamsPerson(TypedDict): - additional_tos_acceptances: NotRequired[ - "TokenService.CreateParamsPersonAdditionalTosAcceptances" - ] - """ - Details on the legal guardian's or authorizer's acceptance of the required Stripe agreements. - """ - address: NotRequired["TokenService.CreateParamsPersonAddress"] - """ - The person's address. - """ - address_kana: NotRequired["TokenService.CreateParamsPersonAddressKana"] - """ - The Kana variation of the person's address (Japan only). - """ - address_kanji: NotRequired[ - "TokenService.CreateParamsPersonAddressKanji" - ] - """ - The Kanji variation of the person's address (Japan only). - """ - dob: NotRequired["Literal['']|TokenService.CreateParamsPersonDob"] - """ - The person's date of birth. - """ - documents: NotRequired["TokenService.CreateParamsPersonDocuments"] - """ - Documents that may be submitted to satisfy various informational requests. - """ - email: NotRequired[str] - """ - The person's email address. - """ - first_name: NotRequired[str] - """ - The person's first name. - """ - first_name_kana: NotRequired[str] - """ - The Kana variation of the person's first name (Japan only). - """ - first_name_kanji: NotRequired[str] - """ - The Kanji variation of the person's first name (Japan only). - """ - full_name_aliases: NotRequired["Literal['']|List[str]"] - """ - A list of alternate names or aliases that the person is known by. - """ - gender: NotRequired[str] - """ - The person's gender (International regulations require either "male" or "female"). - """ - id_number: NotRequired[str] - """ - The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://docs.stripe.com/js/tokens/create_token?type=pii). - """ - id_number_secondary: NotRequired[str] - """ - The person's secondary ID number, as appropriate for their country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://docs.stripe.com/js/tokens/create_token?type=pii). - """ - last_name: NotRequired[str] - """ - The person's last name. - """ - last_name_kana: NotRequired[str] - """ - The Kana variation of the person's last name (Japan only). - """ - last_name_kanji: NotRequired[str] - """ - The Kanji variation of the person's last name (Japan only). - """ - maiden_name: NotRequired[str] - """ - The person's maiden name. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - nationality: NotRequired[str] - """ - The country where the person is a national. Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)), or "XX" if unavailable. - """ - phone: NotRequired[str] - """ - The person's phone number. - """ - political_exposure: NotRequired[Literal["existing", "none"]] - """ - Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. - """ - registered_address: NotRequired[ - "TokenService.CreateParamsPersonRegisteredAddress" - ] - """ - The person's registered address. - """ - relationship: NotRequired[ - "TokenService.CreateParamsPersonRelationship" - ] - """ - The relationship that this person has with the account's legal entity. - """ - ssn_last_4: NotRequired[str] - """ - The last four digits of the person's Social Security number (U.S. only). - """ - us_cfpb_data: NotRequired["TokenService.CreateParamsPersonUsCfpbData"] - """ - Demographic data related to the person. - """ - verification: NotRequired[ - "TokenService.CreateParamsPersonVerification" - ] - """ - The person's verification status. - """ - - class CreateParamsPersonAdditionalTosAcceptances(TypedDict): - account: NotRequired[ - "TokenService.CreateParamsPersonAdditionalTosAcceptancesAccount" - ] - """ - Details on the legal guardian's acceptance of the main Stripe service agreement. - """ - - class CreateParamsPersonAdditionalTosAcceptancesAccount(TypedDict): - date: NotRequired[int] - """ - The Unix timestamp marking when the account representative accepted the service agreement. - """ - ip: NotRequired[str] - """ - The IP address from which the account representative accepted the service agreement. - """ - user_agent: NotRequired["Literal['']|str"] - """ - The user agent of the browser from which the account representative accepted the service agreement. - """ - - class CreateParamsPersonAddress(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. - """ - - class CreateParamsPersonAddressKana(TypedDict): - city: NotRequired[str] - """ - City or ward. - """ - 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] - """ - Block or building number. - """ - line2: NotRequired[str] - """ - Building details. - """ - postal_code: NotRequired[str] - """ - Postal code. - """ - state: NotRequired[str] - """ - Prefecture. - """ - town: NotRequired[str] - """ - Town or cho-me. - """ - - class CreateParamsPersonAddressKanji(TypedDict): - city: NotRequired[str] - """ - City or ward. - """ - 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] - """ - Block or building number. - """ - line2: NotRequired[str] - """ - Building details. - """ - postal_code: NotRequired[str] - """ - Postal code. - """ - state: NotRequired[str] - """ - Prefecture. - """ - town: NotRequired[str] - """ - Town or cho-me. - """ - - class CreateParamsPersonDob(TypedDict): - day: int - """ - The day of birth, between 1 and 31. - """ - month: int - """ - The month of birth, between 1 and 12. - """ - year: int - """ - The four-digit year of birth. - """ - - class CreateParamsPersonDocuments(TypedDict): - company_authorization: NotRequired[ - "TokenService.CreateParamsPersonDocumentsCompanyAuthorization" - ] - """ - One or more documents that demonstrate proof that this person is authorized to represent the company. - """ - passport: NotRequired[ - "TokenService.CreateParamsPersonDocumentsPassport" - ] - """ - One or more documents showing the person's passport page with photo and personal data. - """ - visa: NotRequired["TokenService.CreateParamsPersonDocumentsVisa"] - """ - One or more documents showing the person's visa required for living in the country where they are residing. - """ - - class CreateParamsPersonDocumentsCompanyAuthorization(TypedDict): - files: NotRequired[List[str]] - """ - One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. - """ - - class CreateParamsPersonDocumentsPassport(TypedDict): - files: NotRequired[List[str]] - """ - One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. - """ - - class CreateParamsPersonDocumentsVisa(TypedDict): - files: NotRequired[List[str]] - """ - One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. - """ - - class CreateParamsPersonRegisteredAddress(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. - """ - - class CreateParamsPersonRelationship(TypedDict): - authorizer: NotRequired[bool] - """ - Whether the person is the authorizer of the account's representative. - """ - director: NotRequired[bool] - """ - Whether the person is a director of the account's legal entity. Directors are typically members of the governing board of the company, or responsible for ensuring the company meets its regulatory obligations. - """ - executive: NotRequired[bool] - """ - Whether the person has significant responsibility to control, manage, or direct the organization. - """ - legal_guardian: NotRequired[bool] - """ - Whether the person is the legal guardian of the account's representative. - """ - owner: NotRequired[bool] - """ - Whether the person is an owner of the account's legal entity. - """ - percent_ownership: NotRequired["Literal['']|float"] - """ - The percent owned by the person of the account's legal entity. - """ - representative: NotRequired[bool] - """ - Whether the person is authorized as the primary representative of the account. This is the person nominated by the business to provide information about themselves, and general information about the account. There can only be one representative at any given time. At the time the account is created, this person should be set to the person responsible for opening the account. - """ - title: NotRequired[str] - """ - The person's title (e.g., CEO, Support Engineer). - """ - - class CreateParamsPersonUsCfpbData(TypedDict): - ethnicity_details: NotRequired[ - "TokenService.CreateParamsPersonUsCfpbDataEthnicityDetails" - ] - """ - The persons ethnicity details - """ - race_details: NotRequired[ - "TokenService.CreateParamsPersonUsCfpbDataRaceDetails" - ] - """ - The persons race details - """ - self_identified_gender: NotRequired[str] - """ - The persons self-identified gender - """ - - class CreateParamsPersonUsCfpbDataEthnicityDetails(TypedDict): - ethnicity: NotRequired[ - List[ - Literal[ - "cuban", - "hispanic_or_latino", - "mexican", - "not_hispanic_or_latino", - "other_hispanic_or_latino", - "prefer_not_to_answer", - "puerto_rican", - ] - ] - ] - """ - The persons ethnicity - """ - ethnicity_other: NotRequired[str] - """ - Please specify your origin, when other is selected. - """ - - class CreateParamsPersonUsCfpbDataRaceDetails(TypedDict): - race: NotRequired[ - List[ - Literal[ - "african_american", - "american_indian_or_alaska_native", - "asian", - "asian_indian", - "black_or_african_american", - "chinese", - "ethiopian", - "filipino", - "guamanian_or_chamorro", - "haitian", - "jamaican", - "japanese", - "korean", - "native_hawaiian", - "native_hawaiian_or_other_pacific_islander", - "nigerian", - "other_asian", - "other_black_or_african_american", - "other_pacific_islander", - "prefer_not_to_answer", - "samoan", - "somali", - "vietnamese", - "white", - ] - ] - ] - """ - The persons race. - """ - race_other: NotRequired[str] - """ - Please specify your race, when other is selected. - """ - - class CreateParamsPersonVerification(TypedDict): - additional_document: NotRequired[ - "TokenService.CreateParamsPersonVerificationAdditionalDocument" - ] - """ - A document showing address, either a passport, local ID card, or utility bill from a well-known utility company. - """ - document: NotRequired[ - "TokenService.CreateParamsPersonVerificationDocument" - ] - """ - An identifying document, either a passport or local ID card. - """ - - class CreateParamsPersonVerificationAdditionalDocument(TypedDict): - back: NotRequired[str] - """ - The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. - """ - front: NotRequired[str] - """ - The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. - """ - - class CreateParamsPersonVerificationDocument(TypedDict): - back: NotRequired[str] - """ - The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. - """ - front: NotRequired[str] - """ - The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. - """ - - class CreateParamsPii(TypedDict): - id_number: NotRequired[str] - """ - The `id_number` for the PII, in string form. - """ - - class RetrieveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ +class TokenService(StripeService): def retrieve( self, token: str, - params: Optional["TokenService.RetrieveParams"] = None, + params: Optional["TokenRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Token: """ @@ -1201,7 +36,7 @@ def retrieve( async def retrieve_async( self, token: str, - params: Optional["TokenService.RetrieveParams"] = None, + params: Optional["TokenRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Token: """ @@ -1220,7 +55,7 @@ async def retrieve_async( def create( self, - params: Optional["TokenService.CreateParams"] = None, + params: Optional["TokenCreateParams"] = None, options: Optional[RequestOptions] = None, ) -> Token: """ @@ -1240,7 +75,7 @@ def create( async def create_async( self, - params: Optional["TokenService.CreateParams"] = None, + params: Optional["TokenCreateParams"] = None, options: Optional[RequestOptions] = None, ) -> Token: """ diff --git a/stripe/_topup.py b/stripe/_topup.py index 9c1dc0004..e95ddfd20 100644 --- a/stripe/_topup.py +++ b/stripe/_topup.py @@ -4,21 +4,19 @@ from stripe._expandable_field import ExpandableField from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource -from stripe._request_options import RequestOptions from stripe._updateable_api_resource import UpdateableAPIResource from stripe._util import class_method_variant, sanitize_id -from typing import ClassVar, Dict, List, Optional, cast, overload -from typing_extensions import ( - Literal, - NotRequired, - TypedDict, - Unpack, - TYPE_CHECKING, -) +from typing import ClassVar, Dict, Optional, cast, overload +from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: from stripe._balance_transaction import BalanceTransaction from stripe._source import Source + from stripe.params._topup_cancel_params import TopupCancelParams + from stripe.params._topup_create_params import TopupCreateParams + from stripe.params._topup_list_params import TopupListParams + from stripe.params._topup_modify_params import TopupModifyParams + from stripe.params._topup_retrieve_params import TopupRetrieveParams class Topup( @@ -35,135 +33,6 @@ class Topup( """ OBJECT_NAME: ClassVar[Literal["topup"]] = "topup" - - class CancelParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class CreateParams(RequestOptions): - amount: int - """ - A positive integer representing how much to transfer. - """ - 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). - """ - description: NotRequired[str] - """ - An arbitrary string attached to the object. Often useful for displaying to users. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - source: NotRequired[str] - """ - The ID of a source to transfer funds from. For most users, this should be left unspecified which will use the bank account that was set up in the dashboard for the specified currency. In test mode, this can be a test bank token (see [Testing Top-ups](https://stripe.com/docs/connect/testing#testing-top-ups)). - """ - statement_descriptor: NotRequired[str] - """ - Extra information about a top-up for the source's bank statement. Limited to 15 ASCII characters. - """ - transfer_group: NotRequired[str] - """ - A string that identifies this top-up as part of a group. - """ - - class ListParams(RequestOptions): - amount: NotRequired["Topup.ListParamsAmount|int"] - """ - A positive integer representing how much to transfer. - """ - created: NotRequired["Topup.ListParamsCreated|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. - """ - status: NotRequired[ - Literal["canceled", "failed", "pending", "succeeded"] - ] - """ - Only return top-ups that have the given status. One of `canceled`, `failed`, `pending` or `succeeded`. - """ - - class ListParamsAmount(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) - """ - - class ListParamsCreated(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) - """ - - class ModifyParams(RequestOptions): - description: NotRequired[str] - """ - An arbitrary string attached to the object. Often useful for displaying to users. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - - class RetrieveParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - amount: int """ Amount transferred. @@ -231,7 +100,7 @@ class RetrieveParams(RequestOptions): @classmethod def _cls_cancel( - cls, topup: str, **params: Unpack["Topup.CancelParams"] + cls, topup: str, **params: Unpack["TopupCancelParams"] ) -> "Topup": """ Cancels a top-up. Only pending top-ups can be canceled. @@ -247,14 +116,14 @@ def _cls_cancel( @overload @staticmethod - def cancel(topup: str, **params: Unpack["Topup.CancelParams"]) -> "Topup": + def cancel(topup: str, **params: Unpack["TopupCancelParams"]) -> "Topup": """ Cancels a top-up. Only pending top-ups can be canceled. """ ... @overload - def cancel(self, **params: Unpack["Topup.CancelParams"]) -> "Topup": + def cancel(self, **params: Unpack["TopupCancelParams"]) -> "Topup": """ Cancels a top-up. Only pending top-ups can be canceled. """ @@ -262,7 +131,7 @@ def cancel(self, **params: Unpack["Topup.CancelParams"]) -> "Topup": @class_method_variant("_cls_cancel") def cancel( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Topup.CancelParams"] + self, **params: Unpack["TopupCancelParams"] ) -> "Topup": """ Cancels a top-up. Only pending top-ups can be canceled. @@ -280,7 +149,7 @@ def cancel( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_cancel_async( - cls, topup: str, **params: Unpack["Topup.CancelParams"] + cls, topup: str, **params: Unpack["TopupCancelParams"] ) -> "Topup": """ Cancels a top-up. Only pending top-ups can be canceled. @@ -297,7 +166,7 @@ async def _cls_cancel_async( @overload @staticmethod async def cancel_async( - topup: str, **params: Unpack["Topup.CancelParams"] + topup: str, **params: Unpack["TopupCancelParams"] ) -> "Topup": """ Cancels a top-up. Only pending top-ups can be canceled. @@ -306,7 +175,7 @@ async def cancel_async( @overload async def cancel_async( - self, **params: Unpack["Topup.CancelParams"] + self, **params: Unpack["TopupCancelParams"] ) -> "Topup": """ Cancels a top-up. Only pending top-ups can be canceled. @@ -315,7 +184,7 @@ async def cancel_async( @class_method_variant("_cls_cancel_async") async def cancel_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Topup.CancelParams"] + self, **params: Unpack["TopupCancelParams"] ) -> "Topup": """ Cancels a top-up. Only pending top-ups can be canceled. @@ -332,7 +201,7 @@ async def cancel_async( # pyright: ignore[reportGeneralTypeIssues] ) @classmethod - def create(cls, **params: Unpack["Topup.CreateParams"]) -> "Topup": + def create(cls, **params: Unpack["TopupCreateParams"]) -> "Topup": """ Top up the balance of an account """ @@ -347,7 +216,7 @@ def create(cls, **params: Unpack["Topup.CreateParams"]) -> "Topup": @classmethod async def create_async( - cls, **params: Unpack["Topup.CreateParams"] + cls, **params: Unpack["TopupCreateParams"] ) -> "Topup": """ Top up the balance of an account @@ -362,7 +231,7 @@ async def create_async( ) @classmethod - def list(cls, **params: Unpack["Topup.ListParams"]) -> ListObject["Topup"]: + def list(cls, **params: Unpack["TopupListParams"]) -> ListObject["Topup"]: """ Returns a list of top-ups. """ @@ -381,7 +250,7 @@ def list(cls, **params: Unpack["Topup.ListParams"]) -> ListObject["Topup"]: @classmethod async def list_async( - cls, **params: Unpack["Topup.ListParams"] + cls, **params: Unpack["TopupListParams"] ) -> ListObject["Topup"]: """ Returns a list of top-ups. @@ -400,9 +269,7 @@ async def list_async( return result @classmethod - def modify( - cls, id: str, **params: Unpack["Topup.ModifyParams"] - ) -> "Topup": + def modify(cls, id: str, **params: Unpack["TopupModifyParams"]) -> "Topup": """ Updates the metadata of a top-up. Other top-up details are not editable by design. """ @@ -418,7 +285,7 @@ def modify( @classmethod async def modify_async( - cls, id: str, **params: Unpack["Topup.ModifyParams"] + cls, id: str, **params: Unpack["TopupModifyParams"] ) -> "Topup": """ Updates the metadata of a top-up. Other top-up details are not editable by design. @@ -435,7 +302,7 @@ async def modify_async( @classmethod def retrieve( - cls, id: str, **params: Unpack["Topup.RetrieveParams"] + cls, id: str, **params: Unpack["TopupRetrieveParams"] ) -> "Topup": """ Retrieves the details of a top-up that has previously been created. Supply the unique top-up ID that was returned from your previous request, and Stripe will return the corresponding top-up information. @@ -446,7 +313,7 @@ def retrieve( @classmethod async def retrieve_async( - cls, id: str, **params: Unpack["Topup.RetrieveParams"] + cls, id: str, **params: Unpack["TopupRetrieveParams"] ) -> "Topup": """ Retrieves the details of a top-up that has previously been created. Supply the unique top-up ID that was returned from your previous request, and Stripe will return the corresponding top-up information. diff --git a/stripe/_topup_service.py b/stripe/_topup_service.py index c76f99123..5e29002e9 100644 --- a/stripe/_topup_service.py +++ b/stripe/_topup_service.py @@ -5,142 +5,21 @@ from stripe._stripe_service import StripeService from stripe._topup import Topup from stripe._util import sanitize_id -from typing import Dict, List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params._topup_cancel_params import TopupCancelParams + from stripe.params._topup_create_params import TopupCreateParams + from stripe.params._topup_list_params import TopupListParams + from stripe.params._topup_retrieve_params import TopupRetrieveParams + from stripe.params._topup_update_params import TopupUpdateParams -class TopupService(StripeService): - class CancelParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class CreateParams(TypedDict): - amount: int - """ - A positive integer representing how much to transfer. - """ - 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). - """ - description: NotRequired[str] - """ - An arbitrary string attached to the object. Often useful for displaying to users. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - source: NotRequired[str] - """ - The ID of a source to transfer funds from. For most users, this should be left unspecified which will use the bank account that was set up in the dashboard for the specified currency. In test mode, this can be a test bank token (see [Testing Top-ups](https://stripe.com/docs/connect/testing#testing-top-ups)). - """ - statement_descriptor: NotRequired[str] - """ - Extra information about a top-up for the source's bank statement. Limited to 15 ASCII characters. - """ - transfer_group: NotRequired[str] - """ - A string that identifies this top-up as part of a group. - """ - - class ListParams(TypedDict): - amount: NotRequired["TopupService.ListParamsAmount|int"] - """ - A positive integer representing how much to transfer. - """ - created: NotRequired["TopupService.ListParamsCreated|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. - """ - status: NotRequired[ - Literal["canceled", "failed", "pending", "succeeded"] - ] - """ - Only return top-ups that have the given status. One of `canceled`, `failed`, `pending` or `succeeded`. - """ - - class ListParamsAmount(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) - """ - - class ListParamsCreated(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) - """ - - class RetrieveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class UpdateParams(TypedDict): - description: NotRequired[str] - """ - An arbitrary string attached to the object. Often useful for displaying to users. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ +class TopupService(StripeService): def list( self, - params: Optional["TopupService.ListParams"] = None, + params: Optional["TopupListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[Topup]: """ @@ -159,7 +38,7 @@ def list( async def list_async( self, - params: Optional["TopupService.ListParams"] = None, + params: Optional["TopupListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[Topup]: """ @@ -178,7 +57,7 @@ async def list_async( def create( self, - params: "TopupService.CreateParams", + params: "TopupCreateParams", options: Optional[RequestOptions] = None, ) -> Topup: """ @@ -197,7 +76,7 @@ def create( async def create_async( self, - params: "TopupService.CreateParams", + params: "TopupCreateParams", options: Optional[RequestOptions] = None, ) -> Topup: """ @@ -217,7 +96,7 @@ async def create_async( def retrieve( self, topup: str, - params: Optional["TopupService.RetrieveParams"] = None, + params: Optional["TopupRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Topup: """ @@ -237,7 +116,7 @@ def retrieve( async def retrieve_async( self, topup: str, - params: Optional["TopupService.RetrieveParams"] = None, + params: Optional["TopupRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Topup: """ @@ -257,7 +136,7 @@ async def retrieve_async( def update( self, topup: str, - params: Optional["TopupService.UpdateParams"] = None, + params: Optional["TopupUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> Topup: """ @@ -277,7 +156,7 @@ def update( async def update_async( self, topup: str, - params: Optional["TopupService.UpdateParams"] = None, + params: Optional["TopupUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> Topup: """ @@ -297,7 +176,7 @@ async def update_async( def cancel( self, topup: str, - params: Optional["TopupService.CancelParams"] = None, + params: Optional["TopupCancelParams"] = None, options: Optional[RequestOptions] = None, ) -> Topup: """ @@ -317,7 +196,7 @@ def cancel( async def cancel_async( self, topup: str, - params: Optional["TopupService.CancelParams"] = None, + params: Optional["TopupCancelParams"] = None, options: Optional[RequestOptions] = None, ) -> Topup: """ diff --git a/stripe/_transfer.py b/stripe/_transfer.py index 124c1b11f..231f789cb 100644 --- a/stripe/_transfer.py +++ b/stripe/_transfer.py @@ -5,23 +5,32 @@ from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource from stripe._nested_resource_class_methods import nested_resource_class_methods -from stripe._request_options import RequestOptions from stripe._updateable_api_resource import UpdateableAPIResource from stripe._util import sanitize_id -from typing import ClassVar, Dict, List, Optional, cast -from typing_extensions import ( - Literal, - NotRequired, - TypedDict, - Unpack, - TYPE_CHECKING, -) +from typing import ClassVar, Dict, Optional, cast +from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: from stripe._account import Account from stripe._balance_transaction import BalanceTransaction from stripe._charge import Charge from stripe._reversal import Reversal + from stripe.params._transfer_create_params import TransferCreateParams + from stripe.params._transfer_create_reversal_params import ( + TransferCreateReversalParams, + ) + from stripe.params._transfer_list_params import TransferListParams + from stripe.params._transfer_list_reversals_params import ( + TransferListReversalsParams, + ) + from stripe.params._transfer_modify_params import TransferModifyParams + from stripe.params._transfer_modify_reversal_params import ( + TransferModifyReversalParams, + ) + from stripe.params._transfer_retrieve_params import TransferRetrieveParams + from stripe.params._transfer_retrieve_reversal_params import ( + TransferRetrieveReversalParams, + ) @nested_resource_class_methods("reversal") @@ -44,173 +53,6 @@ class Transfer( """ OBJECT_NAME: ClassVar[Literal["transfer"]] = "transfer" - - class CreateParams(RequestOptions): - amount: NotRequired[int] - """ - A positive integer in cents (or local equivalent) representing how much to transfer. - """ - currency: str - """ - Three-letter [ISO code for currency](https://www.iso.org/iso-4217-currency-codes.html) in lowercase. Must be a [supported currency](https://docs.stripe.com/currencies). - """ - description: NotRequired[str] - """ - An arbitrary string attached to the object. Often useful for displaying to users. - """ - destination: str - """ - The ID of a connected Stripe account. [See the Connect documentation](https://docs.stripe.com/docs/connect/separate-charges-and-transfers) for details. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - fx_quote: NotRequired[str] - """ - The FX rate in the quote is validated and used to convert the transfer amount to the destination currency. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - source_transaction: NotRequired[str] - """ - You can use this parameter to transfer funds from a charge before they are added to your available balance. A pending balance will transfer immediately but the funds will not become available until the original charge becomes available. [See the Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-availability) for details. - """ - source_type: NotRequired[Literal["bank_account", "card", "fpx"]] - """ - The source balance to use for this transfer. One of `bank_account`, `card`, or `fpx`. For most users, this will default to `card`. - """ - transfer_group: NotRequired[str] - """ - A string that identifies this transaction as part of a group. See the [Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-options) for details. - """ - - class CreateReversalParams(RequestOptions): - amount: NotRequired[int] - """ - A positive integer in cents (or local equivalent) representing how much of this transfer to reverse. Can only reverse up to the unreversed amount remaining of the transfer. Partial transfer reversals are only allowed for transfers to Stripe Accounts. Defaults to the entire transfer amount. - """ - description: NotRequired[str] - """ - An arbitrary string which you can attach to a reversal object. This will be unset if you POST an empty value. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - refund_application_fee: NotRequired[bool] - """ - Boolean indicating whether the application fee should be refunded when reversing this transfer. If a full transfer reversal is given, the full application fee will be refunded. Otherwise, the application fee will be refunded with an amount proportional to the amount of the transfer reversed. - """ - - class ListParams(RequestOptions): - created: NotRequired["Transfer.ListParamsCreated|int"] - """ - Only return transfers that were created during the given date interval. - """ - destination: NotRequired[str] - """ - Only return transfers for the destination specified by this account ID. - """ - 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. - """ - transfer_group: NotRequired[str] - """ - Only return transfers with the specified transfer group. - """ - - class ListParamsCreated(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) - """ - - class ListReversalsParams(RequestOptions): - 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 ModifyParams(RequestOptions): - description: NotRequired[str] - """ - An arbitrary string attached to the object. Often useful for displaying to users. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - - class ModifyReversalParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - - class RetrieveParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class RetrieveReversalParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - amount: int """ Amount in cents (or local equivalent) to be transferred. @@ -285,7 +127,7 @@ class RetrieveReversalParams(RequestOptions): """ @classmethod - def create(cls, **params: Unpack["Transfer.CreateParams"]) -> "Transfer": + def create(cls, **params: Unpack["TransferCreateParams"]) -> "Transfer": """ To send funds from your Stripe account to a connected account, you create a new transfer object. Your [Stripe balance](https://docs.stripe.com/api#balance) must be able to cover the transfer amount, or you'll receive an “Insufficient Funds” error. """ @@ -300,7 +142,7 @@ def create(cls, **params: Unpack["Transfer.CreateParams"]) -> "Transfer": @classmethod async def create_async( - cls, **params: Unpack["Transfer.CreateParams"] + cls, **params: Unpack["TransferCreateParams"] ) -> "Transfer": """ To send funds from your Stripe account to a connected account, you create a new transfer object. Your [Stripe balance](https://docs.stripe.com/api#balance) must be able to cover the transfer amount, or you'll receive an “Insufficient Funds” error. @@ -316,7 +158,7 @@ async def create_async( @classmethod def list( - cls, **params: Unpack["Transfer.ListParams"] + cls, **params: Unpack["TransferListParams"] ) -> ListObject["Transfer"]: """ Returns a list of existing transfers sent to connected accounts. The transfers are returned in sorted order, with the most recently created transfers appearing first. @@ -336,7 +178,7 @@ def list( @classmethod async def list_async( - cls, **params: Unpack["Transfer.ListParams"] + cls, **params: Unpack["TransferListParams"] ) -> ListObject["Transfer"]: """ Returns a list of existing transfers sent to connected accounts. The transfers are returned in sorted order, with the most recently created transfers appearing first. @@ -356,7 +198,7 @@ async def list_async( @classmethod def modify( - cls, id: str, **params: Unpack["Transfer.ModifyParams"] + cls, id: str, **params: Unpack["TransferModifyParams"] ) -> "Transfer": """ Updates the specified transfer by setting the values of the parameters passed. Any parameters not provided will be left unchanged. @@ -375,7 +217,7 @@ def modify( @classmethod async def modify_async( - cls, id: str, **params: Unpack["Transfer.ModifyParams"] + cls, id: str, **params: Unpack["TransferModifyParams"] ) -> "Transfer": """ Updates the specified transfer by setting the values of the parameters passed. Any parameters not provided will be left unchanged. @@ -394,7 +236,7 @@ async def modify_async( @classmethod def retrieve( - cls, id: str, **params: Unpack["Transfer.RetrieveParams"] + cls, id: str, **params: Unpack["TransferRetrieveParams"] ) -> "Transfer": """ Retrieves the details of an existing transfer. Supply the unique transfer ID from either a transfer creation request or the transfer list, and Stripe will return the corresponding transfer information. @@ -405,7 +247,7 @@ def retrieve( @classmethod async def retrieve_async( - cls, id: str, **params: Unpack["Transfer.RetrieveParams"] + cls, id: str, **params: Unpack["TransferRetrieveParams"] ) -> "Transfer": """ Retrieves the details of an existing transfer. Supply the unique transfer ID from either a transfer creation request or the transfer list, and Stripe will return the corresponding transfer information. @@ -416,7 +258,7 @@ async def retrieve_async( @classmethod def list_reversals( - cls, id: str, **params: Unpack["Transfer.ListReversalsParams"] + cls, id: str, **params: Unpack["TransferListReversalsParams"] ) -> ListObject["Reversal"]: """ You can see a list of the reversals belonging to a specific transfer. Note that the 10 most recent reversals are always available by default on the transfer object. If you need more than those 10, you can use this API method and the limit and starting_after parameters to page through additional reversals. @@ -432,7 +274,7 @@ def list_reversals( @classmethod async def list_reversals_async( - cls, id: str, **params: Unpack["Transfer.ListReversalsParams"] + cls, id: str, **params: Unpack["TransferListReversalsParams"] ) -> ListObject["Reversal"]: """ You can see a list of the reversals belonging to a specific transfer. Note that the 10 most recent reversals are always available by default on the transfer object. If you need more than those 10, you can use this API method and the limit and starting_after parameters to page through additional reversals. @@ -448,7 +290,7 @@ async def list_reversals_async( @classmethod def create_reversal( - cls, id: str, **params: Unpack["Transfer.CreateReversalParams"] + cls, id: str, **params: Unpack["TransferCreateReversalParams"] ) -> "Reversal": """ When you create a new reversal, you must specify a transfer to create it on. @@ -468,7 +310,7 @@ def create_reversal( @classmethod async def create_reversal_async( - cls, id: str, **params: Unpack["Transfer.CreateReversalParams"] + cls, id: str, **params: Unpack["TransferCreateReversalParams"] ) -> "Reversal": """ When you create a new reversal, you must specify a transfer to create it on. @@ -491,7 +333,7 @@ def retrieve_reversal( cls, transfer: str, id: str, - **params: Unpack["Transfer.RetrieveReversalParams"], + **params: Unpack["TransferRetrieveReversalParams"], ) -> "Reversal": """ By default, you can see the 10 most recent reversals stored directly on the transfer object, but you can also retrieve details about a specific reversal stored on the transfer. @@ -512,7 +354,7 @@ async def retrieve_reversal_async( cls, transfer: str, id: str, - **params: Unpack["Transfer.RetrieveReversalParams"], + **params: Unpack["TransferRetrieveReversalParams"], ) -> "Reversal": """ By default, you can see the 10 most recent reversals stored directly on the transfer object, but you can also retrieve details about a specific reversal stored on the transfer. @@ -533,7 +375,7 @@ def modify_reversal( cls, transfer: str, id: str, - **params: Unpack["Transfer.ModifyReversalParams"], + **params: Unpack["TransferModifyReversalParams"], ) -> "Reversal": """ Updates the specified reversal by setting the values of the parameters passed. Any parameters not provided will be left unchanged. @@ -556,7 +398,7 @@ async def modify_reversal_async( cls, transfer: str, id: str, - **params: Unpack["Transfer.ModifyReversalParams"], + **params: Unpack["TransferModifyReversalParams"], ) -> "Reversal": """ Updates the specified reversal by setting the values of the parameters passed. Any parameters not provided will be left unchanged. diff --git a/stripe/_transfer_reversal_service.py b/stripe/_transfer_reversal_service.py index f3269092f..b3bf2ada1 100644 --- a/stripe/_transfer_reversal_service.py +++ b/stripe/_transfer_reversal_service.py @@ -5,71 +5,29 @@ from stripe._reversal import Reversal from stripe._stripe_service import StripeService from stripe._util import sanitize_id -from typing import Dict, List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params._transfer_reversal_create_params import ( + TransferReversalCreateParams, + ) + from stripe.params._transfer_reversal_list_params import ( + TransferReversalListParams, + ) + from stripe.params._transfer_reversal_retrieve_params import ( + TransferReversalRetrieveParams, + ) + from stripe.params._transfer_reversal_update_params import ( + TransferReversalUpdateParams, + ) class TransferReversalService(StripeService): - class CreateParams(TypedDict): - amount: NotRequired[int] - """ - A positive integer in cents (or local equivalent) representing how much of this transfer to reverse. Can only reverse up to the unreversed amount remaining of the transfer. Partial transfer reversals are only allowed for transfers to Stripe Accounts. Defaults to the entire transfer amount. - """ - description: NotRequired[str] - """ - An arbitrary string which you can attach to a reversal object. This will be unset if you POST an empty value. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - refund_application_fee: NotRequired[bool] - """ - Boolean indicating whether the application fee should be refunded when reversing this transfer. If a full transfer reversal is given, the full application fee will be refunded. Otherwise, the application fee will be refunded with an amount proportional to the amount of the transfer reversed. - """ - - class ListParams(TypedDict): - 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 RetrieveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class UpdateParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - def list( self, id: str, - params: Optional["TransferReversalService.ListParams"] = None, + params: Optional["TransferReversalListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[Reversal]: """ @@ -89,7 +47,7 @@ def list( async def list_async( self, id: str, - params: Optional["TransferReversalService.ListParams"] = None, + params: Optional["TransferReversalListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[Reversal]: """ @@ -109,7 +67,7 @@ async def list_async( def create( self, id: str, - params: Optional["TransferReversalService.CreateParams"] = None, + params: Optional["TransferReversalCreateParams"] = None, options: Optional[RequestOptions] = None, ) -> Reversal: """ @@ -133,7 +91,7 @@ def create( async def create_async( self, id: str, - params: Optional["TransferReversalService.CreateParams"] = None, + params: Optional["TransferReversalCreateParams"] = None, options: Optional[RequestOptions] = None, ) -> Reversal: """ @@ -158,7 +116,7 @@ def retrieve( self, transfer: str, id: str, - params: Optional["TransferReversalService.RetrieveParams"] = None, + params: Optional["TransferReversalRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Reversal: """ @@ -182,7 +140,7 @@ async def retrieve_async( self, transfer: str, id: str, - params: Optional["TransferReversalService.RetrieveParams"] = None, + params: Optional["TransferReversalRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Reversal: """ @@ -206,7 +164,7 @@ def update( self, transfer: str, id: str, - params: Optional["TransferReversalService.UpdateParams"] = None, + params: Optional["TransferReversalUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> Reversal: """ @@ -232,7 +190,7 @@ async def update_async( self, transfer: str, id: str, - params: Optional["TransferReversalService.UpdateParams"] = None, + params: Optional["TransferReversalUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> Reversal: """ diff --git a/stripe/_transfer_service.py b/stripe/_transfer_service.py index fd57f5c5b..d379a0762 100644 --- a/stripe/_transfer_service.py +++ b/stripe/_transfer_service.py @@ -6,8 +6,14 @@ from stripe._transfer import Transfer from stripe._transfer_reversal_service import TransferReversalService from stripe._util import sanitize_id -from typing import Dict, List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params._transfer_create_params import TransferCreateParams + from stripe.params._transfer_list_params import TransferListParams + from stripe.params._transfer_retrieve_params import TransferRetrieveParams + from stripe.params._transfer_update_params import TransferUpdateParams class TransferService(StripeService): @@ -15,119 +21,9 @@ def __init__(self, requestor): super().__init__(requestor) self.reversals = TransferReversalService(self._requestor) - class CreateParams(TypedDict): - amount: NotRequired[int] - """ - A positive integer in cents (or local equivalent) representing how much to transfer. - """ - currency: str - """ - Three-letter [ISO code for currency](https://www.iso.org/iso-4217-currency-codes.html) in lowercase. Must be a [supported currency](https://docs.stripe.com/currencies). - """ - description: NotRequired[str] - """ - An arbitrary string attached to the object. Often useful for displaying to users. - """ - destination: str - """ - The ID of a connected Stripe account. [See the Connect documentation](https://docs.stripe.com/docs/connect/separate-charges-and-transfers) for details. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - fx_quote: NotRequired[str] - """ - The FX rate in the quote is validated and used to convert the transfer amount to the destination currency. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - source_transaction: NotRequired[str] - """ - You can use this parameter to transfer funds from a charge before they are added to your available balance. A pending balance will transfer immediately but the funds will not become available until the original charge becomes available. [See the Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-availability) for details. - """ - source_type: NotRequired[Literal["bank_account", "card", "fpx"]] - """ - The source balance to use for this transfer. One of `bank_account`, `card`, or `fpx`. For most users, this will default to `card`. - """ - transfer_group: NotRequired[str] - """ - A string that identifies this transaction as part of a group. See the [Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-options) for details. - """ - - class ListParams(TypedDict): - created: NotRequired["TransferService.ListParamsCreated|int"] - """ - Only return transfers that were created during the given date interval. - """ - destination: NotRequired[str] - """ - Only return transfers for the destination specified by this account ID. - """ - 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. - """ - transfer_group: NotRequired[str] - """ - Only return transfers with the specified transfer group. - """ - - class ListParamsCreated(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) - """ - - class RetrieveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class UpdateParams(TypedDict): - description: NotRequired[str] - """ - An arbitrary string attached to the object. Often useful for displaying to users. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - def list( self, - params: Optional["TransferService.ListParams"] = None, + params: Optional["TransferListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[Transfer]: """ @@ -146,7 +42,7 @@ def list( async def list_async( self, - params: Optional["TransferService.ListParams"] = None, + params: Optional["TransferListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[Transfer]: """ @@ -165,7 +61,7 @@ async def list_async( def create( self, - params: "TransferService.CreateParams", + params: "TransferCreateParams", options: Optional[RequestOptions] = None, ) -> Transfer: """ @@ -184,7 +80,7 @@ def create( async def create_async( self, - params: "TransferService.CreateParams", + params: "TransferCreateParams", options: Optional[RequestOptions] = None, ) -> Transfer: """ @@ -204,7 +100,7 @@ async def create_async( def retrieve( self, transfer: str, - params: Optional["TransferService.RetrieveParams"] = None, + params: Optional["TransferRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Transfer: """ @@ -226,7 +122,7 @@ def retrieve( async def retrieve_async( self, transfer: str, - params: Optional["TransferService.RetrieveParams"] = None, + params: Optional["TransferRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Transfer: """ @@ -248,7 +144,7 @@ async def retrieve_async( def update( self, transfer: str, - params: Optional["TransferService.UpdateParams"] = None, + params: Optional["TransferUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> Transfer: """ @@ -272,7 +168,7 @@ def update( async def update_async( self, transfer: str, - params: Optional["TransferService.UpdateParams"] = None, + params: Optional["TransferUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> Transfer: """ diff --git a/stripe/_util.py b/stripe/_util.py index a59be07ef..1103d32aa 100644 --- a/stripe/_util.py +++ b/stripe/_util.py @@ -1,6 +1,5 @@ import functools import hmac -import io # noqa: F401 import logging import sys import os diff --git a/stripe/_webhook_endpoint.py b/stripe/_webhook_endpoint.py index 683f21a00..50c1d8cf0 100644 --- a/stripe/_webhook_endpoint.py +++ b/stripe/_webhook_endpoint.py @@ -4,11 +4,27 @@ from stripe._deletable_api_resource import DeletableAPIResource from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource -from stripe._request_options import RequestOptions from stripe._updateable_api_resource import UpdateableAPIResource from stripe._util import class_method_variant, sanitize_id from typing import ClassVar, Dict, List, Optional, cast, overload -from typing_extensions import Literal, NotRequired, Unpack +from typing_extensions import Literal, Unpack, TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params._webhook_endpoint_create_params import ( + WebhookEndpointCreateParams, + ) + from stripe.params._webhook_endpoint_delete_params import ( + WebhookEndpointDeleteParams, + ) + from stripe.params._webhook_endpoint_list_params import ( + WebhookEndpointListParams, + ) + from stripe.params._webhook_endpoint_modify_params import ( + WebhookEndpointModifyParams, + ) + from stripe.params._webhook_endpoint_retrieve_params import ( + WebhookEndpointRetrieveParams, + ) class WebhookEndpoint( @@ -28,795 +44,6 @@ class WebhookEndpoint( """ OBJECT_NAME: ClassVar[Literal["webhook_endpoint"]] = "webhook_endpoint" - - class CreateParams(RequestOptions): - api_version: NotRequired[ - Literal[ - "2011-01-01", - "2011-06-21", - "2011-06-28", - "2011-08-01", - "2011-09-15", - "2011-11-17", - "2012-02-23", - "2012-03-25", - "2012-06-18", - "2012-06-28", - "2012-07-09", - "2012-09-24", - "2012-10-26", - "2012-11-07", - "2013-02-11", - "2013-02-13", - "2013-07-05", - "2013-08-12", - "2013-08-13", - "2013-10-29", - "2013-12-03", - "2014-01-31", - "2014-03-13", - "2014-03-28", - "2014-05-19", - "2014-06-13", - "2014-06-17", - "2014-07-22", - "2014-07-26", - "2014-08-04", - "2014-08-20", - "2014-09-08", - "2014-10-07", - "2014-11-05", - "2014-11-20", - "2014-12-08", - "2014-12-17", - "2014-12-22", - "2015-01-11", - "2015-01-26", - "2015-02-10", - "2015-02-16", - "2015-02-18", - "2015-03-24", - "2015-04-07", - "2015-06-15", - "2015-07-07", - "2015-07-13", - "2015-07-28", - "2015-08-07", - "2015-08-19", - "2015-09-03", - "2015-09-08", - "2015-09-23", - "2015-10-01", - "2015-10-12", - "2015-10-16", - "2016-02-03", - "2016-02-19", - "2016-02-22", - "2016-02-23", - "2016-02-29", - "2016-03-07", - "2016-06-15", - "2016-07-06", - "2016-10-19", - "2017-01-27", - "2017-02-14", - "2017-04-06", - "2017-05-25", - "2017-06-05", - "2017-08-15", - "2017-12-14", - "2018-01-23", - "2018-02-05", - "2018-02-06", - "2018-02-28", - "2018-05-21", - "2018-07-27", - "2018-08-23", - "2018-09-06", - "2018-09-24", - "2018-10-31", - "2018-11-08", - "2019-02-11", - "2019-02-19", - "2019-03-14", - "2019-05-16", - "2019-08-14", - "2019-09-09", - "2019-10-08", - "2019-10-17", - "2019-11-05", - "2019-12-03", - "2020-03-02", - "2020-08-27", - "2022-08-01", - "2022-11-15", - "2023-08-16", - "2023-10-16", - "2024-04-10", - "2024-06-20", - "2024-09-30.acacia", - "2024-10-28.acacia", - "2024-11-20.acacia", - "2024-12-18.acacia", - "2025-01-27.acacia", - "2025-02-24.acacia", - "2025-03-01.dashboard", - "2025-03-31.basil", - "2025-04-30.basil", - "2025-05-28.basil", - "2025-06-30.basil", - "2025-07-30.basil", - "2025-08-27.basil", - "2025-09-30.clover", - ] - ] - """ - Events sent to this endpoint will be generated with this Stripe Version instead of your account's default Stripe Version. - """ - connect: NotRequired[bool] - """ - Whether this endpoint should receive events from connected accounts (`true`), or from your account (`false`). Defaults to `false`. - """ - description: NotRequired["Literal['']|str"] - """ - An optional description of what the webhook is used for. - """ - enabled_events: List[ - Literal[ - "*", - "account.application.authorized", - "account.application.deauthorized", - "account.external_account.created", - "account.external_account.deleted", - "account.external_account.updated", - "account.updated", - "account_notice.created", - "account_notice.updated", - "application_fee.created", - "application_fee.refund.updated", - "application_fee.refunded", - "balance.available", - "balance_settings.updated", - "billing.alert.triggered", - "billing_portal.configuration.created", - "billing_portal.configuration.updated", - "billing_portal.session.created", - "capability.updated", - "capital.financing_offer.accepted", - "capital.financing_offer.canceled", - "capital.financing_offer.created", - "capital.financing_offer.expired", - "capital.financing_offer.fully_repaid", - "capital.financing_offer.paid_out", - "capital.financing_offer.rejected", - "capital.financing_offer.replacement_created", - "capital.financing_transaction.created", - "cash_balance.funds_available", - "charge.captured", - "charge.dispute.closed", - "charge.dispute.created", - "charge.dispute.funds_reinstated", - "charge.dispute.funds_withdrawn", - "charge.dispute.updated", - "charge.expired", - "charge.failed", - "charge.pending", - "charge.refund.updated", - "charge.refunded", - "charge.succeeded", - "charge.updated", - "checkout.session.async_payment_failed", - "checkout.session.async_payment_succeeded", - "checkout.session.completed", - "checkout.session.expired", - "climate.order.canceled", - "climate.order.created", - "climate.order.delayed", - "climate.order.delivered", - "climate.order.product_substituted", - "climate.product.created", - "climate.product.pricing_updated", - "coupon.created", - "coupon.deleted", - "coupon.updated", - "credit_note.created", - "credit_note.updated", - "credit_note.voided", - "customer.created", - "customer.deleted", - "customer.discount.created", - "customer.discount.deleted", - "customer.discount.updated", - "customer.source.created", - "customer.source.deleted", - "customer.source.expiring", - "customer.source.updated", - "customer.subscription.collection_paused", - "customer.subscription.collection_resumed", - "customer.subscription.created", - "customer.subscription.custom_event", - "customer.subscription.deleted", - "customer.subscription.paused", - "customer.subscription.pending_update_applied", - "customer.subscription.pending_update_expired", - "customer.subscription.price_migration_failed", - "customer.subscription.resumed", - "customer.subscription.trial_will_end", - "customer.subscription.updated", - "customer.tax_id.created", - "customer.tax_id.deleted", - "customer.tax_id.updated", - "customer.updated", - "customer_cash_balance_transaction.created", - "entitlements.active_entitlement_summary.updated", - "file.created", - "financial_connections.account.created", - "financial_connections.account.deactivated", - "financial_connections.account.disconnected", - "financial_connections.account.reactivated", - "financial_connections.account.refreshed_balance", - "financial_connections.account.refreshed_inferred_balances", - "financial_connections.account.refreshed_ownership", - "financial_connections.account.refreshed_transactions", - "financial_connections.session.updated", - "fx_quote.expired", - "identity.verification_session.canceled", - "identity.verification_session.created", - "identity.verification_session.processing", - "identity.verification_session.redacted", - "identity.verification_session.requires_input", - "identity.verification_session.verified", - "invoice.created", - "invoice.deleted", - "invoice.finalization_failed", - "invoice.finalized", - "invoice.marked_uncollectible", - "invoice.overdue", - "invoice.overpaid", - "invoice.paid", - "invoice.payment.overpaid", - "invoice.payment_action_required", - "invoice.payment_attempt_required", - "invoice.payment_failed", - "invoice.payment_succeeded", - "invoice.sent", - "invoice.upcoming", - "invoice.updated", - "invoice.voided", - "invoice.will_be_due", - "invoice_payment.paid", - "invoiceitem.created", - "invoiceitem.deleted", - "issuing_authorization.created", - "issuing_authorization.request", - "issuing_authorization.updated", - "issuing_card.created", - "issuing_card.updated", - "issuing_cardholder.created", - "issuing_cardholder.updated", - "issuing_dispute.closed", - "issuing_dispute.created", - "issuing_dispute.funds_reinstated", - "issuing_dispute.funds_rescinded", - "issuing_dispute.submitted", - "issuing_dispute.updated", - "issuing_dispute_settlement_detail.created", - "issuing_dispute_settlement_detail.updated", - "issuing_fraud_liability_debit.created", - "issuing_personalization_design.activated", - "issuing_personalization_design.deactivated", - "issuing_personalization_design.rejected", - "issuing_personalization_design.updated", - "issuing_settlement.created", - "issuing_settlement.updated", - "issuing_token.created", - "issuing_token.updated", - "issuing_transaction.created", - "issuing_transaction.purchase_details_receipt_updated", - "issuing_transaction.updated", - "mandate.updated", - "payment_intent.amount_capturable_updated", - "payment_intent.canceled", - "payment_intent.created", - "payment_intent.partially_funded", - "payment_intent.payment_failed", - "payment_intent.processing", - "payment_intent.requires_action", - "payment_intent.succeeded", - "payment_link.created", - "payment_link.updated", - "payment_method.attached", - "payment_method.automatically_updated", - "payment_method.detached", - "payment_method.updated", - "payout.canceled", - "payout.created", - "payout.failed", - "payout.paid", - "payout.reconciliation_completed", - "payout.updated", - "person.created", - "person.deleted", - "person.updated", - "plan.created", - "plan.deleted", - "plan.updated", - "price.created", - "price.deleted", - "price.updated", - "privacy.redaction_job.canceled", - "privacy.redaction_job.created", - "privacy.redaction_job.ready", - "privacy.redaction_job.succeeded", - "privacy.redaction_job.validation_error", - "product.created", - "product.deleted", - "product.updated", - "promotion_code.created", - "promotion_code.updated", - "quote.accept_failed", - "quote.accepted", - "quote.accepting", - "quote.canceled", - "quote.created", - "quote.draft", - "quote.finalized", - "quote.reestimate_failed", - "quote.reestimated", - "quote.stale", - "radar.early_fraud_warning.created", - "radar.early_fraud_warning.updated", - "refund.created", - "refund.failed", - "refund.updated", - "reporting.report_run.failed", - "reporting.report_run.succeeded", - "reporting.report_type.updated", - "review.closed", - "review.opened", - "setup_intent.canceled", - "setup_intent.created", - "setup_intent.requires_action", - "setup_intent.setup_failed", - "setup_intent.succeeded", - "sigma.scheduled_query_run.created", - "source.canceled", - "source.chargeable", - "source.failed", - "source.mandate_notification", - "source.refund_attributes_required", - "source.transaction.created", - "source.transaction.updated", - "subscription_schedule.aborted", - "subscription_schedule.canceled", - "subscription_schedule.completed", - "subscription_schedule.created", - "subscription_schedule.expiring", - "subscription_schedule.price_migration_failed", - "subscription_schedule.released", - "subscription_schedule.updated", - "tax.form.updated", - "tax.settings.updated", - "tax_rate.created", - "tax_rate.updated", - "terminal.reader.action_failed", - "terminal.reader.action_succeeded", - "terminal.reader.action_updated", - "test_helpers.test_clock.advancing", - "test_helpers.test_clock.created", - "test_helpers.test_clock.deleted", - "test_helpers.test_clock.internal_failure", - "test_helpers.test_clock.ready", - "topup.canceled", - "topup.created", - "topup.failed", - "topup.reversed", - "topup.succeeded", - "transfer.created", - "transfer.reversed", - "transfer.updated", - "treasury.credit_reversal.created", - "treasury.credit_reversal.posted", - "treasury.debit_reversal.completed", - "treasury.debit_reversal.created", - "treasury.debit_reversal.initial_credit_granted", - "treasury.financial_account.closed", - "treasury.financial_account.created", - "treasury.financial_account.features_status_updated", - "treasury.inbound_transfer.canceled", - "treasury.inbound_transfer.created", - "treasury.inbound_transfer.failed", - "treasury.inbound_transfer.succeeded", - "treasury.outbound_payment.canceled", - "treasury.outbound_payment.created", - "treasury.outbound_payment.expected_arrival_date_updated", - "treasury.outbound_payment.failed", - "treasury.outbound_payment.posted", - "treasury.outbound_payment.returned", - "treasury.outbound_payment.tracking_details_updated", - "treasury.outbound_transfer.canceled", - "treasury.outbound_transfer.created", - "treasury.outbound_transfer.expected_arrival_date_updated", - "treasury.outbound_transfer.failed", - "treasury.outbound_transfer.posted", - "treasury.outbound_transfer.returned", - "treasury.outbound_transfer.tracking_details_updated", - "treasury.received_credit.created", - "treasury.received_credit.failed", - "treasury.received_credit.succeeded", - "treasury.received_debit.created", - "billing.credit_balance_transaction.created", - "billing.credit_grant.created", - "billing.credit_grant.updated", - "billing.meter.created", - "billing.meter.deactivated", - "billing.meter.reactivated", - "billing.meter.updated", - ] - ] - """ - The list of events to enable for this endpoint. You may specify `['*']` to enable all events, except those that require explicit selection. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - url: str - """ - The URL of the webhook endpoint. - """ - - class DeleteParams(RequestOptions): - pass - - class ListParams(RequestOptions): - 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 ModifyParams(RequestOptions): - description: NotRequired["Literal['']|str"] - """ - An optional description of what the webhook is used for. - """ - disabled: NotRequired[bool] - """ - Disable the webhook endpoint if set to true. - """ - enabled_events: NotRequired[ - List[ - Literal[ - "*", - "account.application.authorized", - "account.application.deauthorized", - "account.external_account.created", - "account.external_account.deleted", - "account.external_account.updated", - "account.updated", - "account_notice.created", - "account_notice.updated", - "application_fee.created", - "application_fee.refund.updated", - "application_fee.refunded", - "balance.available", - "balance_settings.updated", - "billing.alert.triggered", - "billing_portal.configuration.created", - "billing_portal.configuration.updated", - "billing_portal.session.created", - "capability.updated", - "capital.financing_offer.accepted", - "capital.financing_offer.canceled", - "capital.financing_offer.created", - "capital.financing_offer.expired", - "capital.financing_offer.fully_repaid", - "capital.financing_offer.paid_out", - "capital.financing_offer.rejected", - "capital.financing_offer.replacement_created", - "capital.financing_transaction.created", - "cash_balance.funds_available", - "charge.captured", - "charge.dispute.closed", - "charge.dispute.created", - "charge.dispute.funds_reinstated", - "charge.dispute.funds_withdrawn", - "charge.dispute.updated", - "charge.expired", - "charge.failed", - "charge.pending", - "charge.refund.updated", - "charge.refunded", - "charge.succeeded", - "charge.updated", - "checkout.session.async_payment_failed", - "checkout.session.async_payment_succeeded", - "checkout.session.completed", - "checkout.session.expired", - "climate.order.canceled", - "climate.order.created", - "climate.order.delayed", - "climate.order.delivered", - "climate.order.product_substituted", - "climate.product.created", - "climate.product.pricing_updated", - "coupon.created", - "coupon.deleted", - "coupon.updated", - "credit_note.created", - "credit_note.updated", - "credit_note.voided", - "customer.created", - "customer.deleted", - "customer.discount.created", - "customer.discount.deleted", - "customer.discount.updated", - "customer.source.created", - "customer.source.deleted", - "customer.source.expiring", - "customer.source.updated", - "customer.subscription.collection_paused", - "customer.subscription.collection_resumed", - "customer.subscription.created", - "customer.subscription.custom_event", - "customer.subscription.deleted", - "customer.subscription.paused", - "customer.subscription.pending_update_applied", - "customer.subscription.pending_update_expired", - "customer.subscription.price_migration_failed", - "customer.subscription.resumed", - "customer.subscription.trial_will_end", - "customer.subscription.updated", - "customer.tax_id.created", - "customer.tax_id.deleted", - "customer.tax_id.updated", - "customer.updated", - "customer_cash_balance_transaction.created", - "entitlements.active_entitlement_summary.updated", - "file.created", - "financial_connections.account.created", - "financial_connections.account.deactivated", - "financial_connections.account.disconnected", - "financial_connections.account.reactivated", - "financial_connections.account.refreshed_balance", - "financial_connections.account.refreshed_inferred_balances", - "financial_connections.account.refreshed_ownership", - "financial_connections.account.refreshed_transactions", - "financial_connections.session.updated", - "fx_quote.expired", - "identity.verification_session.canceled", - "identity.verification_session.created", - "identity.verification_session.processing", - "identity.verification_session.redacted", - "identity.verification_session.requires_input", - "identity.verification_session.verified", - "invoice.created", - "invoice.deleted", - "invoice.finalization_failed", - "invoice.finalized", - "invoice.marked_uncollectible", - "invoice.overdue", - "invoice.overpaid", - "invoice.paid", - "invoice.payment.overpaid", - "invoice.payment_action_required", - "invoice.payment_attempt_required", - "invoice.payment_failed", - "invoice.payment_succeeded", - "invoice.sent", - "invoice.upcoming", - "invoice.updated", - "invoice.voided", - "invoice.will_be_due", - "invoice_payment.paid", - "invoiceitem.created", - "invoiceitem.deleted", - "issuing_authorization.created", - "issuing_authorization.request", - "issuing_authorization.updated", - "issuing_card.created", - "issuing_card.updated", - "issuing_cardholder.created", - "issuing_cardholder.updated", - "issuing_dispute.closed", - "issuing_dispute.created", - "issuing_dispute.funds_reinstated", - "issuing_dispute.funds_rescinded", - "issuing_dispute.submitted", - "issuing_dispute.updated", - "issuing_dispute_settlement_detail.created", - "issuing_dispute_settlement_detail.updated", - "issuing_fraud_liability_debit.created", - "issuing_personalization_design.activated", - "issuing_personalization_design.deactivated", - "issuing_personalization_design.rejected", - "issuing_personalization_design.updated", - "issuing_settlement.created", - "issuing_settlement.updated", - "issuing_token.created", - "issuing_token.updated", - "issuing_transaction.created", - "issuing_transaction.purchase_details_receipt_updated", - "issuing_transaction.updated", - "mandate.updated", - "payment_intent.amount_capturable_updated", - "payment_intent.canceled", - "payment_intent.created", - "payment_intent.partially_funded", - "payment_intent.payment_failed", - "payment_intent.processing", - "payment_intent.requires_action", - "payment_intent.succeeded", - "payment_link.created", - "payment_link.updated", - "payment_method.attached", - "payment_method.automatically_updated", - "payment_method.detached", - "payment_method.updated", - "payout.canceled", - "payout.created", - "payout.failed", - "payout.paid", - "payout.reconciliation_completed", - "payout.updated", - "person.created", - "person.deleted", - "person.updated", - "plan.created", - "plan.deleted", - "plan.updated", - "price.created", - "price.deleted", - "price.updated", - "privacy.redaction_job.canceled", - "privacy.redaction_job.created", - "privacy.redaction_job.ready", - "privacy.redaction_job.succeeded", - "privacy.redaction_job.validation_error", - "product.created", - "product.deleted", - "product.updated", - "promotion_code.created", - "promotion_code.updated", - "quote.accept_failed", - "quote.accepted", - "quote.accepting", - "quote.canceled", - "quote.created", - "quote.draft", - "quote.finalized", - "quote.reestimate_failed", - "quote.reestimated", - "quote.stale", - "radar.early_fraud_warning.created", - "radar.early_fraud_warning.updated", - "refund.created", - "refund.failed", - "refund.updated", - "reporting.report_run.failed", - "reporting.report_run.succeeded", - "reporting.report_type.updated", - "review.closed", - "review.opened", - "setup_intent.canceled", - "setup_intent.created", - "setup_intent.requires_action", - "setup_intent.setup_failed", - "setup_intent.succeeded", - "sigma.scheduled_query_run.created", - "source.canceled", - "source.chargeable", - "source.failed", - "source.mandate_notification", - "source.refund_attributes_required", - "source.transaction.created", - "source.transaction.updated", - "subscription_schedule.aborted", - "subscription_schedule.canceled", - "subscription_schedule.completed", - "subscription_schedule.created", - "subscription_schedule.expiring", - "subscription_schedule.price_migration_failed", - "subscription_schedule.released", - "subscription_schedule.updated", - "tax.form.updated", - "tax.settings.updated", - "tax_rate.created", - "tax_rate.updated", - "terminal.reader.action_failed", - "terminal.reader.action_succeeded", - "terminal.reader.action_updated", - "test_helpers.test_clock.advancing", - "test_helpers.test_clock.created", - "test_helpers.test_clock.deleted", - "test_helpers.test_clock.internal_failure", - "test_helpers.test_clock.ready", - "topup.canceled", - "topup.created", - "topup.failed", - "topup.reversed", - "topup.succeeded", - "transfer.created", - "transfer.reversed", - "transfer.updated", - "treasury.credit_reversal.created", - "treasury.credit_reversal.posted", - "treasury.debit_reversal.completed", - "treasury.debit_reversal.created", - "treasury.debit_reversal.initial_credit_granted", - "treasury.financial_account.closed", - "treasury.financial_account.created", - "treasury.financial_account.features_status_updated", - "treasury.inbound_transfer.canceled", - "treasury.inbound_transfer.created", - "treasury.inbound_transfer.failed", - "treasury.inbound_transfer.succeeded", - "treasury.outbound_payment.canceled", - "treasury.outbound_payment.created", - "treasury.outbound_payment.expected_arrival_date_updated", - "treasury.outbound_payment.failed", - "treasury.outbound_payment.posted", - "treasury.outbound_payment.returned", - "treasury.outbound_payment.tracking_details_updated", - "treasury.outbound_transfer.canceled", - "treasury.outbound_transfer.created", - "treasury.outbound_transfer.expected_arrival_date_updated", - "treasury.outbound_transfer.failed", - "treasury.outbound_transfer.posted", - "treasury.outbound_transfer.returned", - "treasury.outbound_transfer.tracking_details_updated", - "treasury.received_credit.created", - "treasury.received_credit.failed", - "treasury.received_credit.succeeded", - "treasury.received_debit.created", - "billing.credit_balance_transaction.created", - "billing.credit_grant.created", - "billing.credit_grant.updated", - "billing.meter.created", - "billing.meter.deactivated", - "billing.meter.reactivated", - "billing.meter.updated", - ] - ] - ] - """ - The list of events to enable for this endpoint. You may specify `['*']` to enable all events, except those that require explicit selection. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - url: NotRequired[str] - """ - The URL of the webhook endpoint. - """ - - class RetrieveParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - api_version: Optional[str] """ The API version events are rendered as for this webhook endpoint. @@ -872,7 +99,7 @@ class RetrieveParams(RequestOptions): @classmethod def create( - cls, **params: Unpack["WebhookEndpoint.CreateParams"] + cls, **params: Unpack["WebhookEndpointCreateParams"] ) -> "WebhookEndpoint": """ A webhook endpoint must have a url and a list of enabled_events. You may optionally specify the Boolean connect parameter. If set to true, then a Connect webhook endpoint that notifies the specified url about events from all connected accounts is created; otherwise an account webhook endpoint that notifies the specified url only about events from your account is created. You can also create webhook endpoints in the [webhooks settings](https://dashboard.stripe.com/account/webhooks) section of the Dashboard. @@ -888,7 +115,7 @@ def create( @classmethod async def create_async( - cls, **params: Unpack["WebhookEndpoint.CreateParams"] + cls, **params: Unpack["WebhookEndpointCreateParams"] ) -> "WebhookEndpoint": """ A webhook endpoint must have a url and a list of enabled_events. You may optionally specify the Boolean connect parameter. If set to true, then a Connect webhook endpoint that notifies the specified url about events from all connected accounts is created; otherwise an account webhook endpoint that notifies the specified url only about events from your account is created. You can also create webhook endpoints in the [webhooks settings](https://dashboard.stripe.com/account/webhooks) section of the Dashboard. @@ -904,7 +131,7 @@ async def create_async( @classmethod def _cls_delete( - cls, sid: str, **params: Unpack["WebhookEndpoint.DeleteParams"] + cls, sid: str, **params: Unpack["WebhookEndpointDeleteParams"] ) -> "WebhookEndpoint": """ You can also delete webhook endpoints via the [webhook endpoint management](https://dashboard.stripe.com/account/webhooks) page of the Stripe dashboard. @@ -922,7 +149,7 @@ def _cls_delete( @overload @staticmethod def delete( - sid: str, **params: Unpack["WebhookEndpoint.DeleteParams"] + sid: str, **params: Unpack["WebhookEndpointDeleteParams"] ) -> "WebhookEndpoint": """ You can also delete webhook endpoints via the [webhook endpoint management](https://dashboard.stripe.com/account/webhooks) page of the Stripe dashboard. @@ -931,7 +158,7 @@ def delete( @overload def delete( - self, **params: Unpack["WebhookEndpoint.DeleteParams"] + self, **params: Unpack["WebhookEndpointDeleteParams"] ) -> "WebhookEndpoint": """ You can also delete webhook endpoints via the [webhook endpoint management](https://dashboard.stripe.com/account/webhooks) page of the Stripe dashboard. @@ -940,7 +167,7 @@ def delete( @class_method_variant("_cls_delete") def delete( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["WebhookEndpoint.DeleteParams"] + self, **params: Unpack["WebhookEndpointDeleteParams"] ) -> "WebhookEndpoint": """ You can also delete webhook endpoints via the [webhook endpoint management](https://dashboard.stripe.com/account/webhooks) page of the Stripe dashboard. @@ -953,7 +180,7 @@ def delete( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_delete_async( - cls, sid: str, **params: Unpack["WebhookEndpoint.DeleteParams"] + cls, sid: str, **params: Unpack["WebhookEndpointDeleteParams"] ) -> "WebhookEndpoint": """ You can also delete webhook endpoints via the [webhook endpoint management](https://dashboard.stripe.com/account/webhooks) page of the Stripe dashboard. @@ -971,7 +198,7 @@ async def _cls_delete_async( @overload @staticmethod async def delete_async( - sid: str, **params: Unpack["WebhookEndpoint.DeleteParams"] + sid: str, **params: Unpack["WebhookEndpointDeleteParams"] ) -> "WebhookEndpoint": """ You can also delete webhook endpoints via the [webhook endpoint management](https://dashboard.stripe.com/account/webhooks) page of the Stripe dashboard. @@ -980,7 +207,7 @@ async def delete_async( @overload async def delete_async( - self, **params: Unpack["WebhookEndpoint.DeleteParams"] + self, **params: Unpack["WebhookEndpointDeleteParams"] ) -> "WebhookEndpoint": """ You can also delete webhook endpoints via the [webhook endpoint management](https://dashboard.stripe.com/account/webhooks) page of the Stripe dashboard. @@ -989,7 +216,7 @@ async def delete_async( @class_method_variant("_cls_delete_async") async def delete_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["WebhookEndpoint.DeleteParams"] + self, **params: Unpack["WebhookEndpointDeleteParams"] ) -> "WebhookEndpoint": """ You can also delete webhook endpoints via the [webhook endpoint management](https://dashboard.stripe.com/account/webhooks) page of the Stripe dashboard. @@ -1002,7 +229,7 @@ async def delete_async( # pyright: ignore[reportGeneralTypeIssues] @classmethod def list( - cls, **params: Unpack["WebhookEndpoint.ListParams"] + cls, **params: Unpack["WebhookEndpointListParams"] ) -> ListObject["WebhookEndpoint"]: """ Returns a list of your webhook endpoints. @@ -1022,7 +249,7 @@ def list( @classmethod async def list_async( - cls, **params: Unpack["WebhookEndpoint.ListParams"] + cls, **params: Unpack["WebhookEndpointListParams"] ) -> ListObject["WebhookEndpoint"]: """ Returns a list of your webhook endpoints. @@ -1042,7 +269,7 @@ async def list_async( @classmethod def modify( - cls, id: str, **params: Unpack["WebhookEndpoint.ModifyParams"] + cls, id: str, **params: Unpack["WebhookEndpointModifyParams"] ) -> "WebhookEndpoint": """ Updates the webhook endpoint. You may edit the url, the list of enabled_events, and the status of your endpoint. @@ -1059,7 +286,7 @@ def modify( @classmethod async def modify_async( - cls, id: str, **params: Unpack["WebhookEndpoint.ModifyParams"] + cls, id: str, **params: Unpack["WebhookEndpointModifyParams"] ) -> "WebhookEndpoint": """ Updates the webhook endpoint. You may edit the url, the list of enabled_events, and the status of your endpoint. @@ -1076,7 +303,7 @@ async def modify_async( @classmethod def retrieve( - cls, id: str, **params: Unpack["WebhookEndpoint.RetrieveParams"] + cls, id: str, **params: Unpack["WebhookEndpointRetrieveParams"] ) -> "WebhookEndpoint": """ Retrieves the webhook endpoint with the given ID. @@ -1087,7 +314,7 @@ def retrieve( @classmethod async def retrieve_async( - cls, id: str, **params: Unpack["WebhookEndpoint.RetrieveParams"] + cls, id: str, **params: Unpack["WebhookEndpointRetrieveParams"] ) -> "WebhookEndpoint": """ Retrieves the webhook endpoint with the given ID. diff --git a/stripe/_webhook_endpoint_service.py b/stripe/_webhook_endpoint_service.py index ed8895755..66714d6da 100644 --- a/stripe/_webhook_endpoint_service.py +++ b/stripe/_webhook_endpoint_service.py @@ -5,803 +5,32 @@ from stripe._stripe_service import StripeService from stripe._util import sanitize_id from stripe._webhook_endpoint import WebhookEndpoint -from typing import Dict, List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params._webhook_endpoint_create_params import ( + WebhookEndpointCreateParams, + ) + from stripe.params._webhook_endpoint_delete_params import ( + WebhookEndpointDeleteParams, + ) + from stripe.params._webhook_endpoint_list_params import ( + WebhookEndpointListParams, + ) + from stripe.params._webhook_endpoint_retrieve_params import ( + WebhookEndpointRetrieveParams, + ) + from stripe.params._webhook_endpoint_update_params import ( + WebhookEndpointUpdateParams, + ) class WebhookEndpointService(StripeService): - class CreateParams(TypedDict): - api_version: NotRequired[ - Literal[ - "2011-01-01", - "2011-06-21", - "2011-06-28", - "2011-08-01", - "2011-09-15", - "2011-11-17", - "2012-02-23", - "2012-03-25", - "2012-06-18", - "2012-06-28", - "2012-07-09", - "2012-09-24", - "2012-10-26", - "2012-11-07", - "2013-02-11", - "2013-02-13", - "2013-07-05", - "2013-08-12", - "2013-08-13", - "2013-10-29", - "2013-12-03", - "2014-01-31", - "2014-03-13", - "2014-03-28", - "2014-05-19", - "2014-06-13", - "2014-06-17", - "2014-07-22", - "2014-07-26", - "2014-08-04", - "2014-08-20", - "2014-09-08", - "2014-10-07", - "2014-11-05", - "2014-11-20", - "2014-12-08", - "2014-12-17", - "2014-12-22", - "2015-01-11", - "2015-01-26", - "2015-02-10", - "2015-02-16", - "2015-02-18", - "2015-03-24", - "2015-04-07", - "2015-06-15", - "2015-07-07", - "2015-07-13", - "2015-07-28", - "2015-08-07", - "2015-08-19", - "2015-09-03", - "2015-09-08", - "2015-09-23", - "2015-10-01", - "2015-10-12", - "2015-10-16", - "2016-02-03", - "2016-02-19", - "2016-02-22", - "2016-02-23", - "2016-02-29", - "2016-03-07", - "2016-06-15", - "2016-07-06", - "2016-10-19", - "2017-01-27", - "2017-02-14", - "2017-04-06", - "2017-05-25", - "2017-06-05", - "2017-08-15", - "2017-12-14", - "2018-01-23", - "2018-02-05", - "2018-02-06", - "2018-02-28", - "2018-05-21", - "2018-07-27", - "2018-08-23", - "2018-09-06", - "2018-09-24", - "2018-10-31", - "2018-11-08", - "2019-02-11", - "2019-02-19", - "2019-03-14", - "2019-05-16", - "2019-08-14", - "2019-09-09", - "2019-10-08", - "2019-10-17", - "2019-11-05", - "2019-12-03", - "2020-03-02", - "2020-08-27", - "2022-08-01", - "2022-11-15", - "2023-08-16", - "2023-10-16", - "2024-04-10", - "2024-06-20", - "2024-09-30.acacia", - "2024-10-28.acacia", - "2024-11-20.acacia", - "2024-12-18.acacia", - "2025-01-27.acacia", - "2025-02-24.acacia", - "2025-03-01.dashboard", - "2025-03-31.basil", - "2025-04-30.basil", - "2025-05-28.basil", - "2025-06-30.basil", - "2025-07-30.basil", - "2025-08-27.basil", - "2025-09-30.clover", - ] - ] - """ - Events sent to this endpoint will be generated with this Stripe Version instead of your account's default Stripe Version. - """ - connect: NotRequired[bool] - """ - Whether this endpoint should receive events from connected accounts (`true`), or from your account (`false`). Defaults to `false`. - """ - description: NotRequired["Literal['']|str"] - """ - An optional description of what the webhook is used for. - """ - enabled_events: List[ - Literal[ - "*", - "account.application.authorized", - "account.application.deauthorized", - "account.external_account.created", - "account.external_account.deleted", - "account.external_account.updated", - "account.updated", - "account_notice.created", - "account_notice.updated", - "application_fee.created", - "application_fee.refund.updated", - "application_fee.refunded", - "balance.available", - "balance_settings.updated", - "billing.alert.triggered", - "billing_portal.configuration.created", - "billing_portal.configuration.updated", - "billing_portal.session.created", - "capability.updated", - "capital.financing_offer.accepted", - "capital.financing_offer.canceled", - "capital.financing_offer.created", - "capital.financing_offer.expired", - "capital.financing_offer.fully_repaid", - "capital.financing_offer.paid_out", - "capital.financing_offer.rejected", - "capital.financing_offer.replacement_created", - "capital.financing_transaction.created", - "cash_balance.funds_available", - "charge.captured", - "charge.dispute.closed", - "charge.dispute.created", - "charge.dispute.funds_reinstated", - "charge.dispute.funds_withdrawn", - "charge.dispute.updated", - "charge.expired", - "charge.failed", - "charge.pending", - "charge.refund.updated", - "charge.refunded", - "charge.succeeded", - "charge.updated", - "checkout.session.async_payment_failed", - "checkout.session.async_payment_succeeded", - "checkout.session.completed", - "checkout.session.expired", - "climate.order.canceled", - "climate.order.created", - "climate.order.delayed", - "climate.order.delivered", - "climate.order.product_substituted", - "climate.product.created", - "climate.product.pricing_updated", - "coupon.created", - "coupon.deleted", - "coupon.updated", - "credit_note.created", - "credit_note.updated", - "credit_note.voided", - "customer.created", - "customer.deleted", - "customer.discount.created", - "customer.discount.deleted", - "customer.discount.updated", - "customer.source.created", - "customer.source.deleted", - "customer.source.expiring", - "customer.source.updated", - "customer.subscription.collection_paused", - "customer.subscription.collection_resumed", - "customer.subscription.created", - "customer.subscription.custom_event", - "customer.subscription.deleted", - "customer.subscription.paused", - "customer.subscription.pending_update_applied", - "customer.subscription.pending_update_expired", - "customer.subscription.price_migration_failed", - "customer.subscription.resumed", - "customer.subscription.trial_will_end", - "customer.subscription.updated", - "customer.tax_id.created", - "customer.tax_id.deleted", - "customer.tax_id.updated", - "customer.updated", - "customer_cash_balance_transaction.created", - "entitlements.active_entitlement_summary.updated", - "file.created", - "financial_connections.account.created", - "financial_connections.account.deactivated", - "financial_connections.account.disconnected", - "financial_connections.account.reactivated", - "financial_connections.account.refreshed_balance", - "financial_connections.account.refreshed_inferred_balances", - "financial_connections.account.refreshed_ownership", - "financial_connections.account.refreshed_transactions", - "financial_connections.session.updated", - "fx_quote.expired", - "identity.verification_session.canceled", - "identity.verification_session.created", - "identity.verification_session.processing", - "identity.verification_session.redacted", - "identity.verification_session.requires_input", - "identity.verification_session.verified", - "invoice.created", - "invoice.deleted", - "invoice.finalization_failed", - "invoice.finalized", - "invoice.marked_uncollectible", - "invoice.overdue", - "invoice.overpaid", - "invoice.paid", - "invoice.payment.overpaid", - "invoice.payment_action_required", - "invoice.payment_attempt_required", - "invoice.payment_failed", - "invoice.payment_succeeded", - "invoice.sent", - "invoice.upcoming", - "invoice.updated", - "invoice.voided", - "invoice.will_be_due", - "invoice_payment.paid", - "invoiceitem.created", - "invoiceitem.deleted", - "issuing_authorization.created", - "issuing_authorization.request", - "issuing_authorization.updated", - "issuing_card.created", - "issuing_card.updated", - "issuing_cardholder.created", - "issuing_cardholder.updated", - "issuing_dispute.closed", - "issuing_dispute.created", - "issuing_dispute.funds_reinstated", - "issuing_dispute.funds_rescinded", - "issuing_dispute.submitted", - "issuing_dispute.updated", - "issuing_dispute_settlement_detail.created", - "issuing_dispute_settlement_detail.updated", - "issuing_fraud_liability_debit.created", - "issuing_personalization_design.activated", - "issuing_personalization_design.deactivated", - "issuing_personalization_design.rejected", - "issuing_personalization_design.updated", - "issuing_settlement.created", - "issuing_settlement.updated", - "issuing_token.created", - "issuing_token.updated", - "issuing_transaction.created", - "issuing_transaction.purchase_details_receipt_updated", - "issuing_transaction.updated", - "mandate.updated", - "payment_intent.amount_capturable_updated", - "payment_intent.canceled", - "payment_intent.created", - "payment_intent.partially_funded", - "payment_intent.payment_failed", - "payment_intent.processing", - "payment_intent.requires_action", - "payment_intent.succeeded", - "payment_link.created", - "payment_link.updated", - "payment_method.attached", - "payment_method.automatically_updated", - "payment_method.detached", - "payment_method.updated", - "payout.canceled", - "payout.created", - "payout.failed", - "payout.paid", - "payout.reconciliation_completed", - "payout.updated", - "person.created", - "person.deleted", - "person.updated", - "plan.created", - "plan.deleted", - "plan.updated", - "price.created", - "price.deleted", - "price.updated", - "privacy.redaction_job.canceled", - "privacy.redaction_job.created", - "privacy.redaction_job.ready", - "privacy.redaction_job.succeeded", - "privacy.redaction_job.validation_error", - "product.created", - "product.deleted", - "product.updated", - "promotion_code.created", - "promotion_code.updated", - "quote.accept_failed", - "quote.accepted", - "quote.accepting", - "quote.canceled", - "quote.created", - "quote.draft", - "quote.finalized", - "quote.reestimate_failed", - "quote.reestimated", - "quote.stale", - "radar.early_fraud_warning.created", - "radar.early_fraud_warning.updated", - "refund.created", - "refund.failed", - "refund.updated", - "reporting.report_run.failed", - "reporting.report_run.succeeded", - "reporting.report_type.updated", - "review.closed", - "review.opened", - "setup_intent.canceled", - "setup_intent.created", - "setup_intent.requires_action", - "setup_intent.setup_failed", - "setup_intent.succeeded", - "sigma.scheduled_query_run.created", - "source.canceled", - "source.chargeable", - "source.failed", - "source.mandate_notification", - "source.refund_attributes_required", - "source.transaction.created", - "source.transaction.updated", - "subscription_schedule.aborted", - "subscription_schedule.canceled", - "subscription_schedule.completed", - "subscription_schedule.created", - "subscription_schedule.expiring", - "subscription_schedule.price_migration_failed", - "subscription_schedule.released", - "subscription_schedule.updated", - "tax.form.updated", - "tax.settings.updated", - "tax_rate.created", - "tax_rate.updated", - "terminal.reader.action_failed", - "terminal.reader.action_succeeded", - "terminal.reader.action_updated", - "test_helpers.test_clock.advancing", - "test_helpers.test_clock.created", - "test_helpers.test_clock.deleted", - "test_helpers.test_clock.internal_failure", - "test_helpers.test_clock.ready", - "topup.canceled", - "topup.created", - "topup.failed", - "topup.reversed", - "topup.succeeded", - "transfer.created", - "transfer.reversed", - "transfer.updated", - "treasury.credit_reversal.created", - "treasury.credit_reversal.posted", - "treasury.debit_reversal.completed", - "treasury.debit_reversal.created", - "treasury.debit_reversal.initial_credit_granted", - "treasury.financial_account.closed", - "treasury.financial_account.created", - "treasury.financial_account.features_status_updated", - "treasury.inbound_transfer.canceled", - "treasury.inbound_transfer.created", - "treasury.inbound_transfer.failed", - "treasury.inbound_transfer.succeeded", - "treasury.outbound_payment.canceled", - "treasury.outbound_payment.created", - "treasury.outbound_payment.expected_arrival_date_updated", - "treasury.outbound_payment.failed", - "treasury.outbound_payment.posted", - "treasury.outbound_payment.returned", - "treasury.outbound_payment.tracking_details_updated", - "treasury.outbound_transfer.canceled", - "treasury.outbound_transfer.created", - "treasury.outbound_transfer.expected_arrival_date_updated", - "treasury.outbound_transfer.failed", - "treasury.outbound_transfer.posted", - "treasury.outbound_transfer.returned", - "treasury.outbound_transfer.tracking_details_updated", - "treasury.received_credit.created", - "treasury.received_credit.failed", - "treasury.received_credit.succeeded", - "treasury.received_debit.created", - "billing.credit_balance_transaction.created", - "billing.credit_grant.created", - "billing.credit_grant.updated", - "billing.meter.created", - "billing.meter.deactivated", - "billing.meter.reactivated", - "billing.meter.updated", - ] - ] - """ - The list of events to enable for this endpoint. You may specify `['*']` to enable all events, except those that require explicit selection. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - url: str - """ - The URL of the webhook endpoint. - """ - - class DeleteParams(TypedDict): - pass - - class ListParams(TypedDict): - 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 RetrieveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class UpdateParams(TypedDict): - description: NotRequired["Literal['']|str"] - """ - An optional description of what the webhook is used for. - """ - disabled: NotRequired[bool] - """ - Disable the webhook endpoint if set to true. - """ - enabled_events: NotRequired[ - List[ - Literal[ - "*", - "account.application.authorized", - "account.application.deauthorized", - "account.external_account.created", - "account.external_account.deleted", - "account.external_account.updated", - "account.updated", - "account_notice.created", - "account_notice.updated", - "application_fee.created", - "application_fee.refund.updated", - "application_fee.refunded", - "balance.available", - "balance_settings.updated", - "billing.alert.triggered", - "billing_portal.configuration.created", - "billing_portal.configuration.updated", - "billing_portal.session.created", - "capability.updated", - "capital.financing_offer.accepted", - "capital.financing_offer.canceled", - "capital.financing_offer.created", - "capital.financing_offer.expired", - "capital.financing_offer.fully_repaid", - "capital.financing_offer.paid_out", - "capital.financing_offer.rejected", - "capital.financing_offer.replacement_created", - "capital.financing_transaction.created", - "cash_balance.funds_available", - "charge.captured", - "charge.dispute.closed", - "charge.dispute.created", - "charge.dispute.funds_reinstated", - "charge.dispute.funds_withdrawn", - "charge.dispute.updated", - "charge.expired", - "charge.failed", - "charge.pending", - "charge.refund.updated", - "charge.refunded", - "charge.succeeded", - "charge.updated", - "checkout.session.async_payment_failed", - "checkout.session.async_payment_succeeded", - "checkout.session.completed", - "checkout.session.expired", - "climate.order.canceled", - "climate.order.created", - "climate.order.delayed", - "climate.order.delivered", - "climate.order.product_substituted", - "climate.product.created", - "climate.product.pricing_updated", - "coupon.created", - "coupon.deleted", - "coupon.updated", - "credit_note.created", - "credit_note.updated", - "credit_note.voided", - "customer.created", - "customer.deleted", - "customer.discount.created", - "customer.discount.deleted", - "customer.discount.updated", - "customer.source.created", - "customer.source.deleted", - "customer.source.expiring", - "customer.source.updated", - "customer.subscription.collection_paused", - "customer.subscription.collection_resumed", - "customer.subscription.created", - "customer.subscription.custom_event", - "customer.subscription.deleted", - "customer.subscription.paused", - "customer.subscription.pending_update_applied", - "customer.subscription.pending_update_expired", - "customer.subscription.price_migration_failed", - "customer.subscription.resumed", - "customer.subscription.trial_will_end", - "customer.subscription.updated", - "customer.tax_id.created", - "customer.tax_id.deleted", - "customer.tax_id.updated", - "customer.updated", - "customer_cash_balance_transaction.created", - "entitlements.active_entitlement_summary.updated", - "file.created", - "financial_connections.account.created", - "financial_connections.account.deactivated", - "financial_connections.account.disconnected", - "financial_connections.account.reactivated", - "financial_connections.account.refreshed_balance", - "financial_connections.account.refreshed_inferred_balances", - "financial_connections.account.refreshed_ownership", - "financial_connections.account.refreshed_transactions", - "financial_connections.session.updated", - "fx_quote.expired", - "identity.verification_session.canceled", - "identity.verification_session.created", - "identity.verification_session.processing", - "identity.verification_session.redacted", - "identity.verification_session.requires_input", - "identity.verification_session.verified", - "invoice.created", - "invoice.deleted", - "invoice.finalization_failed", - "invoice.finalized", - "invoice.marked_uncollectible", - "invoice.overdue", - "invoice.overpaid", - "invoice.paid", - "invoice.payment.overpaid", - "invoice.payment_action_required", - "invoice.payment_attempt_required", - "invoice.payment_failed", - "invoice.payment_succeeded", - "invoice.sent", - "invoice.upcoming", - "invoice.updated", - "invoice.voided", - "invoice.will_be_due", - "invoice_payment.paid", - "invoiceitem.created", - "invoiceitem.deleted", - "issuing_authorization.created", - "issuing_authorization.request", - "issuing_authorization.updated", - "issuing_card.created", - "issuing_card.updated", - "issuing_cardholder.created", - "issuing_cardholder.updated", - "issuing_dispute.closed", - "issuing_dispute.created", - "issuing_dispute.funds_reinstated", - "issuing_dispute.funds_rescinded", - "issuing_dispute.submitted", - "issuing_dispute.updated", - "issuing_dispute_settlement_detail.created", - "issuing_dispute_settlement_detail.updated", - "issuing_fraud_liability_debit.created", - "issuing_personalization_design.activated", - "issuing_personalization_design.deactivated", - "issuing_personalization_design.rejected", - "issuing_personalization_design.updated", - "issuing_settlement.created", - "issuing_settlement.updated", - "issuing_token.created", - "issuing_token.updated", - "issuing_transaction.created", - "issuing_transaction.purchase_details_receipt_updated", - "issuing_transaction.updated", - "mandate.updated", - "payment_intent.amount_capturable_updated", - "payment_intent.canceled", - "payment_intent.created", - "payment_intent.partially_funded", - "payment_intent.payment_failed", - "payment_intent.processing", - "payment_intent.requires_action", - "payment_intent.succeeded", - "payment_link.created", - "payment_link.updated", - "payment_method.attached", - "payment_method.automatically_updated", - "payment_method.detached", - "payment_method.updated", - "payout.canceled", - "payout.created", - "payout.failed", - "payout.paid", - "payout.reconciliation_completed", - "payout.updated", - "person.created", - "person.deleted", - "person.updated", - "plan.created", - "plan.deleted", - "plan.updated", - "price.created", - "price.deleted", - "price.updated", - "privacy.redaction_job.canceled", - "privacy.redaction_job.created", - "privacy.redaction_job.ready", - "privacy.redaction_job.succeeded", - "privacy.redaction_job.validation_error", - "product.created", - "product.deleted", - "product.updated", - "promotion_code.created", - "promotion_code.updated", - "quote.accept_failed", - "quote.accepted", - "quote.accepting", - "quote.canceled", - "quote.created", - "quote.draft", - "quote.finalized", - "quote.reestimate_failed", - "quote.reestimated", - "quote.stale", - "radar.early_fraud_warning.created", - "radar.early_fraud_warning.updated", - "refund.created", - "refund.failed", - "refund.updated", - "reporting.report_run.failed", - "reporting.report_run.succeeded", - "reporting.report_type.updated", - "review.closed", - "review.opened", - "setup_intent.canceled", - "setup_intent.created", - "setup_intent.requires_action", - "setup_intent.setup_failed", - "setup_intent.succeeded", - "sigma.scheduled_query_run.created", - "source.canceled", - "source.chargeable", - "source.failed", - "source.mandate_notification", - "source.refund_attributes_required", - "source.transaction.created", - "source.transaction.updated", - "subscription_schedule.aborted", - "subscription_schedule.canceled", - "subscription_schedule.completed", - "subscription_schedule.created", - "subscription_schedule.expiring", - "subscription_schedule.price_migration_failed", - "subscription_schedule.released", - "subscription_schedule.updated", - "tax.form.updated", - "tax.settings.updated", - "tax_rate.created", - "tax_rate.updated", - "terminal.reader.action_failed", - "terminal.reader.action_succeeded", - "terminal.reader.action_updated", - "test_helpers.test_clock.advancing", - "test_helpers.test_clock.created", - "test_helpers.test_clock.deleted", - "test_helpers.test_clock.internal_failure", - "test_helpers.test_clock.ready", - "topup.canceled", - "topup.created", - "topup.failed", - "topup.reversed", - "topup.succeeded", - "transfer.created", - "transfer.reversed", - "transfer.updated", - "treasury.credit_reversal.created", - "treasury.credit_reversal.posted", - "treasury.debit_reversal.completed", - "treasury.debit_reversal.created", - "treasury.debit_reversal.initial_credit_granted", - "treasury.financial_account.closed", - "treasury.financial_account.created", - "treasury.financial_account.features_status_updated", - "treasury.inbound_transfer.canceled", - "treasury.inbound_transfer.created", - "treasury.inbound_transfer.failed", - "treasury.inbound_transfer.succeeded", - "treasury.outbound_payment.canceled", - "treasury.outbound_payment.created", - "treasury.outbound_payment.expected_arrival_date_updated", - "treasury.outbound_payment.failed", - "treasury.outbound_payment.posted", - "treasury.outbound_payment.returned", - "treasury.outbound_payment.tracking_details_updated", - "treasury.outbound_transfer.canceled", - "treasury.outbound_transfer.created", - "treasury.outbound_transfer.expected_arrival_date_updated", - "treasury.outbound_transfer.failed", - "treasury.outbound_transfer.posted", - "treasury.outbound_transfer.returned", - "treasury.outbound_transfer.tracking_details_updated", - "treasury.received_credit.created", - "treasury.received_credit.failed", - "treasury.received_credit.succeeded", - "treasury.received_debit.created", - "billing.credit_balance_transaction.created", - "billing.credit_grant.created", - "billing.credit_grant.updated", - "billing.meter.created", - "billing.meter.deactivated", - "billing.meter.reactivated", - "billing.meter.updated", - ] - ] - ] - """ - The list of events to enable for this endpoint. You may specify `['*']` to enable all events, except those that require explicit selection. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - url: NotRequired[str] - """ - The URL of the webhook endpoint. - """ - def delete( self, webhook_endpoint: str, - params: Optional["WebhookEndpointService.DeleteParams"] = None, + params: Optional["WebhookEndpointDeleteParams"] = None, options: Optional[RequestOptions] = None, ) -> WebhookEndpoint: """ @@ -823,7 +52,7 @@ def delete( async def delete_async( self, webhook_endpoint: str, - params: Optional["WebhookEndpointService.DeleteParams"] = None, + params: Optional["WebhookEndpointDeleteParams"] = None, options: Optional[RequestOptions] = None, ) -> WebhookEndpoint: """ @@ -845,7 +74,7 @@ async def delete_async( def retrieve( self, webhook_endpoint: str, - params: Optional["WebhookEndpointService.RetrieveParams"] = None, + params: Optional["WebhookEndpointRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> WebhookEndpoint: """ @@ -867,7 +96,7 @@ def retrieve( async def retrieve_async( self, webhook_endpoint: str, - params: Optional["WebhookEndpointService.RetrieveParams"] = None, + params: Optional["WebhookEndpointRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> WebhookEndpoint: """ @@ -889,7 +118,7 @@ async def retrieve_async( def update( self, webhook_endpoint: str, - params: Optional["WebhookEndpointService.UpdateParams"] = None, + params: Optional["WebhookEndpointUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> WebhookEndpoint: """ @@ -911,7 +140,7 @@ def update( async def update_async( self, webhook_endpoint: str, - params: Optional["WebhookEndpointService.UpdateParams"] = None, + params: Optional["WebhookEndpointUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> WebhookEndpoint: """ @@ -932,7 +161,7 @@ async def update_async( def list( self, - params: Optional["WebhookEndpointService.ListParams"] = None, + params: Optional["WebhookEndpointListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[WebhookEndpoint]: """ @@ -951,7 +180,7 @@ def list( async def list_async( self, - params: Optional["WebhookEndpointService.ListParams"] = None, + params: Optional["WebhookEndpointListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[WebhookEndpoint]: """ @@ -970,7 +199,7 @@ async def list_async( def create( self, - params: "WebhookEndpointService.CreateParams", + params: "WebhookEndpointCreateParams", options: Optional[RequestOptions] = None, ) -> WebhookEndpoint: """ @@ -989,7 +218,7 @@ def create( async def create_async( self, - params: "WebhookEndpointService.CreateParams", + params: "WebhookEndpointCreateParams", options: Optional[RequestOptions] = None, ) -> WebhookEndpoint: """ diff --git a/stripe/api_resources/abstract/__init__.py b/stripe/api_resources/abstract/__init__.py deleted file mode 100644 index 42e74e3b3..000000000 --- a/stripe/api_resources/abstract/__init__.py +++ /dev/null @@ -1,45 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.abstract package is deprecated, please change your - imports to import from stripe directly. - From: - from stripe.api_resources.abstract import ... - To: - from stripe import ... - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe.api_resources.abstract.api_resource import APIResource - from stripe.api_resources.abstract.createable_api_resource import ( - CreateableAPIResource, - ) - from stripe.api_resources.abstract.custom_method import custom_method - from stripe.api_resources.abstract.deletable_api_resource import ( - DeletableAPIResource, - ) - from stripe.api_resources.abstract.listable_api_resource import ( - ListableAPIResource, - ) - from stripe.api_resources.abstract.nested_resource_class_methods import ( - nested_resource_class_methods, - ) - from stripe.api_resources.abstract.searchable_api_resource import ( - SearchableAPIResource, - ) - from stripe.api_resources.abstract.singleton_api_resource import ( - SingletonAPIResource, - ) - from stripe.api_resources.abstract.test_helpers import ( - APIResourceTestHelpers, - ) - from stripe.api_resources.abstract.updateable_api_resource import ( - UpdateableAPIResource, - ) - from stripe.api_resources.abstract.verify_mixin import VerifyMixin diff --git a/stripe/api_resources/abstract/api_resource.py b/stripe/api_resources/abstract/api_resource.py deleted file mode 100644 index fe1e1c77b..000000000 --- a/stripe/api_resources/abstract/api_resource.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.api_resource package is deprecated, please change your - imports to import from stripe directly. - From: - from stripe.api_resources.api_resource import APIResource - To: - from stripe import APIResource - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe._api_resource import ( # noqa - APIResource, - ) diff --git a/stripe/api_resources/abstract/createable_api_resource.py b/stripe/api_resources/abstract/createable_api_resource.py deleted file mode 100644 index 71ae8cffe..000000000 --- a/stripe/api_resources/abstract/createable_api_resource.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.createable_api_resource package is deprecated, please change your - imports to import from stripe directly. - From: - from stripe.api_resources.createable_api_resource import CreateableAPIResource - To: - from stripe import CreateableAPIResource - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe._createable_api_resource import ( # noqa - CreateableAPIResource, - ) diff --git a/stripe/api_resources/abstract/custom_method.py b/stripe/api_resources/abstract/custom_method.py deleted file mode 100644 index 442c62660..000000000 --- a/stripe/api_resources/abstract/custom_method.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.custom_method package is deprecated, please change your - imports to import from stripe directly. - From: - from stripe.api_resources.custom_method import custom_method - To: - from stripe import custom_method - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe._custom_method import ( # noqa - custom_method, - ) diff --git a/stripe/api_resources/abstract/deletable_api_resource.py b/stripe/api_resources/abstract/deletable_api_resource.py deleted file mode 100644 index 21c073805..000000000 --- a/stripe/api_resources/abstract/deletable_api_resource.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.deletable_api_resource package is deprecated, please change your - imports to import from stripe directly. - From: - from stripe.api_resources.deletable_api_resource import DeletableAPIResource - To: - from stripe import DeletableAPIResource - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe._deletable_api_resource import ( # noqa - DeletableAPIResource, - ) diff --git a/stripe/api_resources/abstract/listable_api_resource.py b/stripe/api_resources/abstract/listable_api_resource.py deleted file mode 100644 index 2a8897e2e..000000000 --- a/stripe/api_resources/abstract/listable_api_resource.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.listable_api_resource package is deprecated, please change your - imports to import from stripe directly. - From: - from stripe.api_resources.listable_api_resource import ListableAPIResource - To: - from stripe import ListableAPIResource - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe._listable_api_resource import ( # noqa - ListableAPIResource, - ) diff --git a/stripe/api_resources/abstract/nested_resource_class_methods.py b/stripe/api_resources/abstract/nested_resource_class_methods.py deleted file mode 100644 index 288c22c52..000000000 --- a/stripe/api_resources/abstract/nested_resource_class_methods.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.nested_resource_class_methods package is deprecated, please change your - imports to import from stripe directly. - From: - from stripe.api_resources.nested_resource_class_methods import nested_resource_class_methods - To: - from stripe import nested_resource_class_methods - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe._nested_resource_class_methods import ( # noqa - nested_resource_class_methods, - ) diff --git a/stripe/api_resources/abstract/searchable_api_resource.py b/stripe/api_resources/abstract/searchable_api_resource.py deleted file mode 100644 index 0f9f25971..000000000 --- a/stripe/api_resources/abstract/searchable_api_resource.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.searchable_api_resource package is deprecated, please change your - imports to import from stripe directly. - From: - from stripe.api_resources.searchable_api_resource import SearchableAPIResource - To: - from stripe import SearchableAPIResource - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe._searchable_api_resource import ( # noqa - SearchableAPIResource, - ) diff --git a/stripe/api_resources/abstract/singleton_api_resource.py b/stripe/api_resources/abstract/singleton_api_resource.py deleted file mode 100644 index 15325a43e..000000000 --- a/stripe/api_resources/abstract/singleton_api_resource.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.singleton_api_resource package is deprecated, please change your - imports to import from stripe directly. - From: - from stripe.api_resources.singleton_api_resource import SingletonAPIResource - To: - from stripe import SingletonAPIResource - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe._singleton_api_resource import ( # noqa - SingletonAPIResource, - ) diff --git a/stripe/api_resources/abstract/test_helpers.py b/stripe/api_resources/abstract/test_helpers.py deleted file mode 100644 index 1a2133a6f..000000000 --- a/stripe/api_resources/abstract/test_helpers.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.test_helpers package is deprecated, please change your - imports to import from stripe directly. - From: - from stripe.api_resources.test_helpers import APIResourceTestHelpers - To: - from stripe import APIResourceTestHelpers - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe._test_helpers import ( # noqa - APIResourceTestHelpers, - ) diff --git a/stripe/api_resources/abstract/updateable_api_resource.py b/stripe/api_resources/abstract/updateable_api_resource.py deleted file mode 100644 index a6820bac7..000000000 --- a/stripe/api_resources/abstract/updateable_api_resource.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.updateable_api_resource package is deprecated, please change your - imports to import from stripe directly. - From: - from stripe.api_resources.updateable_api_resource import UpdateableAPIResource - To: - from stripe import UpdateableAPIResource - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe._updateable_api_resource import ( # noqa - UpdateableAPIResource, - ) diff --git a/stripe/api_resources/abstract/verify_mixin.py b/stripe/api_resources/abstract/verify_mixin.py deleted file mode 100644 index 799bb4b60..000000000 --- a/stripe/api_resources/abstract/verify_mixin.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.verify_mixin package is deprecated, please change your - imports to import from stripe directly. - From: - from stripe.api_resources.verify_mixin import VerifyMixin - To: - from stripe import VerifyMixin - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe._verify_mixin import ( # noqa - VerifyMixin, - ) diff --git a/stripe/api_resources/account.py b/stripe/api_resources/account.py deleted file mode 100644 index 4da265a79..000000000 --- a/stripe/api_resources/account.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.account package is deprecated, please change your - imports to import from stripe directly. - From: - from stripe.api_resources.account import Account - To: - from stripe import Account - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe._account import ( # noqa - Account, - ) diff --git a/stripe/api_resources/account_link.py b/stripe/api_resources/account_link.py deleted file mode 100644 index 85b4a775f..000000000 --- a/stripe/api_resources/account_link.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.account_link package is deprecated, please change your - imports to import from stripe directly. - From: - from stripe.api_resources.account_link import AccountLink - To: - from stripe import AccountLink - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe._account_link import ( # noqa - AccountLink, - ) diff --git a/stripe/api_resources/account_notice.py b/stripe/api_resources/account_notice.py deleted file mode 100644 index 5e2b3be80..000000000 --- a/stripe/api_resources/account_notice.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.account_notice package is deprecated, please change your - imports to import from stripe directly. - From: - from stripe.api_resources.account_notice import AccountNotice - To: - from stripe import AccountNotice - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe._account_notice import ( # noqa - AccountNotice, - ) diff --git a/stripe/api_resources/account_session.py b/stripe/api_resources/account_session.py deleted file mode 100644 index e6735e1ae..000000000 --- a/stripe/api_resources/account_session.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.account_session package is deprecated, please change your - imports to import from stripe directly. - From: - from stripe.api_resources.account_session import AccountSession - To: - from stripe import AccountSession - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe._account_session import ( # noqa - AccountSession, - ) diff --git a/stripe/api_resources/apple_pay_domain.py b/stripe/api_resources/apple_pay_domain.py deleted file mode 100644 index 809d2ff58..000000000 --- a/stripe/api_resources/apple_pay_domain.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.apple_pay_domain package is deprecated, please change your - imports to import from stripe directly. - From: - from stripe.api_resources.apple_pay_domain import ApplePayDomain - To: - from stripe import ApplePayDomain - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe._apple_pay_domain import ( # noqa - ApplePayDomain, - ) diff --git a/stripe/api_resources/application.py b/stripe/api_resources/application.py deleted file mode 100644 index 232024908..000000000 --- a/stripe/api_resources/application.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.application package is deprecated, please change your - imports to import from stripe directly. - From: - from stripe.api_resources.application import Application - To: - from stripe import Application - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe._application import ( # noqa - Application, - ) diff --git a/stripe/api_resources/application_fee.py b/stripe/api_resources/application_fee.py deleted file mode 100644 index 89f07d58e..000000000 --- a/stripe/api_resources/application_fee.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.application_fee package is deprecated, please change your - imports to import from stripe directly. - From: - from stripe.api_resources.application_fee import ApplicationFee - To: - from stripe import ApplicationFee - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe._application_fee import ( # noqa - ApplicationFee, - ) diff --git a/stripe/api_resources/application_fee_refund.py b/stripe/api_resources/application_fee_refund.py deleted file mode 100644 index aeb95c635..000000000 --- a/stripe/api_resources/application_fee_refund.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.application_fee_refund package is deprecated, please change your - imports to import from stripe directly. - From: - from stripe.api_resources.application_fee_refund import ApplicationFeeRefund - To: - from stripe import ApplicationFeeRefund - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe._application_fee_refund import ( # noqa - ApplicationFeeRefund, - ) diff --git a/stripe/api_resources/apps/__init__.py b/stripe/api_resources/apps/__init__.py deleted file mode 100644 index d949fe0e9..000000000 --- a/stripe/api_resources/apps/__init__.py +++ /dev/null @@ -1,19 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.apps package is deprecated, please change your - imports to import from stripe.apps directly. - From: - from stripe.api_resources.apps import ... - To: - from stripe.apps import ... - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe.api_resources.apps.secret import Secret diff --git a/stripe/api_resources/apps/secret.py b/stripe/api_resources/apps/secret.py deleted file mode 100644 index 86046a5fd..000000000 --- a/stripe/api_resources/apps/secret.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.apps.secret package is deprecated, please change your - imports to import from stripe.apps directly. - From: - from stripe.api_resources.apps.secret import Secret - To: - from stripe.apps import Secret - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe.apps._secret import ( # noqa - Secret, - ) diff --git a/stripe/api_resources/balance.py b/stripe/api_resources/balance.py deleted file mode 100644 index 230e2b0cd..000000000 --- a/stripe/api_resources/balance.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.balance package is deprecated, please change your - imports to import from stripe directly. - From: - from stripe.api_resources.balance import Balance - To: - from stripe import Balance - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe._balance import ( # noqa - Balance, - ) diff --git a/stripe/api_resources/balance_settings.py b/stripe/api_resources/balance_settings.py deleted file mode 100644 index 8a0fa0311..000000000 --- a/stripe/api_resources/balance_settings.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.balance_settings package is deprecated, please change your - imports to import from stripe directly. - From: - from stripe.api_resources.balance_settings import BalanceSettings - To: - from stripe import BalanceSettings - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe._balance_settings import ( # noqa - BalanceSettings, - ) diff --git a/stripe/api_resources/balance_transaction.py b/stripe/api_resources/balance_transaction.py deleted file mode 100644 index 3121fbe49..000000000 --- a/stripe/api_resources/balance_transaction.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.balance_transaction package is deprecated, please change your - imports to import from stripe directly. - From: - from stripe.api_resources.balance_transaction import BalanceTransaction - To: - from stripe import BalanceTransaction - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe._balance_transaction import ( # noqa - BalanceTransaction, - ) diff --git a/stripe/api_resources/bank_account.py b/stripe/api_resources/bank_account.py deleted file mode 100644 index 524ce6a69..000000000 --- a/stripe/api_resources/bank_account.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.bank_account package is deprecated, please change your - imports to import from stripe directly. - From: - from stripe.api_resources.bank_account import BankAccount - To: - from stripe import BankAccount - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe._bank_account import ( # noqa - BankAccount, - ) diff --git a/stripe/api_resources/billing/__init__.py b/stripe/api_resources/billing/__init__.py deleted file mode 100644 index cc36c5c0a..000000000 --- a/stripe/api_resources/billing/__init__.py +++ /dev/null @@ -1,36 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.billing package is deprecated, please change your - imports to import from stripe.billing directly. - From: - from stripe.api_resources.billing import ... - To: - from stripe.billing import ... - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe.api_resources.billing import analytics - from stripe.api_resources.billing.alert import Alert - from stripe.api_resources.billing.alert_triggered import AlertTriggered - from stripe.api_resources.billing.credit_balance_summary import ( - CreditBalanceSummary, - ) - from stripe.api_resources.billing.credit_balance_transaction import ( - CreditBalanceTransaction, - ) - from stripe.api_resources.billing.credit_grant import CreditGrant - from stripe.api_resources.billing.meter import Meter - from stripe.api_resources.billing.meter_event import MeterEvent - from stripe.api_resources.billing.meter_event_adjustment import ( - MeterEventAdjustment, - ) - from stripe.api_resources.billing.meter_event_summary import ( - MeterEventSummary, - ) diff --git a/stripe/api_resources/billing/alert.py b/stripe/api_resources/billing/alert.py deleted file mode 100644 index 09ccecff9..000000000 --- a/stripe/api_resources/billing/alert.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.billing.alert package is deprecated, please change your - imports to import from stripe.billing directly. - From: - from stripe.api_resources.billing.alert import Alert - To: - from stripe.billing import Alert - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe.billing._alert import ( # noqa - Alert, - ) diff --git a/stripe/api_resources/billing/alert_triggered.py b/stripe/api_resources/billing/alert_triggered.py deleted file mode 100644 index c967783e7..000000000 --- a/stripe/api_resources/billing/alert_triggered.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.billing.alert_triggered package is deprecated, please change your - imports to import from stripe.billing directly. - From: - from stripe.api_resources.billing.alert_triggered import AlertTriggered - To: - from stripe.billing import AlertTriggered - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe.billing._alert_triggered import ( # noqa - AlertTriggered, - ) diff --git a/stripe/api_resources/billing/analytics/__init__.py b/stripe/api_resources/billing/analytics/__init__.py deleted file mode 100644 index bda3eb58e..000000000 --- a/stripe/api_resources/billing/analytics/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.billing.analytics package is deprecated, please change your - imports to import from stripe.billing.analytics directly. - From: - from stripe.api_resources.billing.analytics import ... - To: - from stripe.billing.analytics import ... - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe.api_resources.billing.analytics.meter_usage import MeterUsage - from stripe.api_resources.billing.analytics.meter_usage_row import ( - MeterUsageRow, - ) diff --git a/stripe/api_resources/billing/analytics/meter_usage.py b/stripe/api_resources/billing/analytics/meter_usage.py deleted file mode 100644 index a695c2573..000000000 --- a/stripe/api_resources/billing/analytics/meter_usage.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.billing.analytics.meter_usage package is deprecated, please change your - imports to import from stripe.billing.analytics directly. - From: - from stripe.api_resources.billing.analytics.meter_usage import MeterUsage - To: - from stripe.billing.analytics import MeterUsage - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe.billing.analytics._meter_usage import ( # noqa - MeterUsage, - ) diff --git a/stripe/api_resources/billing/analytics/meter_usage_row.py b/stripe/api_resources/billing/analytics/meter_usage_row.py deleted file mode 100644 index 160997951..000000000 --- a/stripe/api_resources/billing/analytics/meter_usage_row.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.billing.analytics.meter_usage_row package is deprecated, please change your - imports to import from stripe.billing.analytics directly. - From: - from stripe.api_resources.billing.analytics.meter_usage_row import MeterUsageRow - To: - from stripe.billing.analytics import MeterUsageRow - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe.billing.analytics._meter_usage_row import ( # noqa - MeterUsageRow, - ) diff --git a/stripe/api_resources/billing/credit_balance_summary.py b/stripe/api_resources/billing/credit_balance_summary.py deleted file mode 100644 index 48e8754c2..000000000 --- a/stripe/api_resources/billing/credit_balance_summary.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.billing.credit_balance_summary package is deprecated, please change your - imports to import from stripe.billing directly. - From: - from stripe.api_resources.billing.credit_balance_summary import CreditBalanceSummary - To: - from stripe.billing import CreditBalanceSummary - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe.billing._credit_balance_summary import ( # noqa - CreditBalanceSummary, - ) diff --git a/stripe/api_resources/billing/credit_balance_transaction.py b/stripe/api_resources/billing/credit_balance_transaction.py deleted file mode 100644 index 8797820ad..000000000 --- a/stripe/api_resources/billing/credit_balance_transaction.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.billing.credit_balance_transaction package is deprecated, please change your - imports to import from stripe.billing directly. - From: - from stripe.api_resources.billing.credit_balance_transaction import CreditBalanceTransaction - To: - from stripe.billing import CreditBalanceTransaction - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe.billing._credit_balance_transaction import ( # noqa - CreditBalanceTransaction, - ) diff --git a/stripe/api_resources/billing/credit_grant.py b/stripe/api_resources/billing/credit_grant.py deleted file mode 100644 index 4d50815d7..000000000 --- a/stripe/api_resources/billing/credit_grant.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.billing.credit_grant package is deprecated, please change your - imports to import from stripe.billing directly. - From: - from stripe.api_resources.billing.credit_grant import CreditGrant - To: - from stripe.billing import CreditGrant - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe.billing._credit_grant import ( # noqa - CreditGrant, - ) diff --git a/stripe/api_resources/billing/meter.py b/stripe/api_resources/billing/meter.py deleted file mode 100644 index c750e21cb..000000000 --- a/stripe/api_resources/billing/meter.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.billing.meter package is deprecated, please change your - imports to import from stripe.billing directly. - From: - from stripe.api_resources.billing.meter import Meter - To: - from stripe.billing import Meter - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe.billing._meter import ( # noqa - Meter, - ) diff --git a/stripe/api_resources/billing/meter_event.py b/stripe/api_resources/billing/meter_event.py deleted file mode 100644 index 85e1f22fb..000000000 --- a/stripe/api_resources/billing/meter_event.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.billing.meter_event package is deprecated, please change your - imports to import from stripe.billing directly. - From: - from stripe.api_resources.billing.meter_event import MeterEvent - To: - from stripe.billing import MeterEvent - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe.billing._meter_event import ( # noqa - MeterEvent, - ) diff --git a/stripe/api_resources/billing/meter_event_adjustment.py b/stripe/api_resources/billing/meter_event_adjustment.py deleted file mode 100644 index b2be2e010..000000000 --- a/stripe/api_resources/billing/meter_event_adjustment.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.billing.meter_event_adjustment package is deprecated, please change your - imports to import from stripe.billing directly. - From: - from stripe.api_resources.billing.meter_event_adjustment import MeterEventAdjustment - To: - from stripe.billing import MeterEventAdjustment - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe.billing._meter_event_adjustment import ( # noqa - MeterEventAdjustment, - ) diff --git a/stripe/api_resources/billing/meter_event_summary.py b/stripe/api_resources/billing/meter_event_summary.py deleted file mode 100644 index 8cf6ee4c9..000000000 --- a/stripe/api_resources/billing/meter_event_summary.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.billing.meter_event_summary package is deprecated, please change your - imports to import from stripe.billing directly. - From: - from stripe.api_resources.billing.meter_event_summary import MeterEventSummary - To: - from stripe.billing import MeterEventSummary - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe.billing._meter_event_summary import ( # noqa - MeterEventSummary, - ) diff --git a/stripe/api_resources/billing_portal/__init__.py b/stripe/api_resources/billing_portal/__init__.py deleted file mode 100644 index 258111d17..000000000 --- a/stripe/api_resources/billing_portal/__init__.py +++ /dev/null @@ -1,20 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.billing_portal package is deprecated, please change your - imports to import from stripe.billing_portal directly. - From: - from stripe.api_resources.billing_portal import ... - To: - from stripe.billing_portal import ... - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe.api_resources.billing_portal.configuration import Configuration - from stripe.api_resources.billing_portal.session import Session diff --git a/stripe/api_resources/billing_portal/configuration.py b/stripe/api_resources/billing_portal/configuration.py deleted file mode 100644 index fc0a4ab25..000000000 --- a/stripe/api_resources/billing_portal/configuration.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.billing_portal.configuration package is deprecated, please change your - imports to import from stripe.billing_portal directly. - From: - from stripe.api_resources.billing_portal.configuration import Configuration - To: - from stripe.billing_portal import Configuration - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe.billing_portal._configuration import ( # noqa - Configuration, - ) diff --git a/stripe/api_resources/billing_portal/session.py b/stripe/api_resources/billing_portal/session.py deleted file mode 100644 index faf6f41b0..000000000 --- a/stripe/api_resources/billing_portal/session.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.billing_portal.session package is deprecated, please change your - imports to import from stripe.billing_portal directly. - From: - from stripe.api_resources.billing_portal.session import Session - To: - from stripe.billing_portal import Session - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe.billing_portal._session import ( # noqa - Session, - ) diff --git a/stripe/api_resources/capability.py b/stripe/api_resources/capability.py deleted file mode 100644 index 3d3d1c527..000000000 --- a/stripe/api_resources/capability.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.capability package is deprecated, please change your - imports to import from stripe directly. - From: - from stripe.api_resources.capability import Capability - To: - from stripe import Capability - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe._capability import ( # noqa - Capability, - ) diff --git a/stripe/api_resources/capital/__init__.py b/stripe/api_resources/capital/__init__.py deleted file mode 100644 index 04241cada..000000000 --- a/stripe/api_resources/capital/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.capital package is deprecated, please change your - imports to import from stripe.capital directly. - From: - from stripe.api_resources.capital import ... - To: - from stripe.capital import ... - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe.api_resources.capital.financing_offer import FinancingOffer - from stripe.api_resources.capital.financing_summary import FinancingSummary - from stripe.api_resources.capital.financing_transaction import ( - FinancingTransaction, - ) diff --git a/stripe/api_resources/capital/financing_offer.py b/stripe/api_resources/capital/financing_offer.py deleted file mode 100644 index 711d0409d..000000000 --- a/stripe/api_resources/capital/financing_offer.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.capital.financing_offer package is deprecated, please change your - imports to import from stripe.capital directly. - From: - from stripe.api_resources.capital.financing_offer import FinancingOffer - To: - from stripe.capital import FinancingOffer - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe.capital._financing_offer import ( # noqa - FinancingOffer, - ) diff --git a/stripe/api_resources/capital/financing_summary.py b/stripe/api_resources/capital/financing_summary.py deleted file mode 100644 index 7c84ec7b6..000000000 --- a/stripe/api_resources/capital/financing_summary.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.capital.financing_summary package is deprecated, please change your - imports to import from stripe.capital directly. - From: - from stripe.api_resources.capital.financing_summary import FinancingSummary - To: - from stripe.capital import FinancingSummary - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe.capital._financing_summary import ( # noqa - FinancingSummary, - ) diff --git a/stripe/api_resources/capital/financing_transaction.py b/stripe/api_resources/capital/financing_transaction.py deleted file mode 100644 index c49a3596c..000000000 --- a/stripe/api_resources/capital/financing_transaction.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.capital.financing_transaction package is deprecated, please change your - imports to import from stripe.capital directly. - From: - from stripe.api_resources.capital.financing_transaction import FinancingTransaction - To: - from stripe.capital import FinancingTransaction - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe.capital._financing_transaction import ( # noqa - FinancingTransaction, - ) diff --git a/stripe/api_resources/card.py b/stripe/api_resources/card.py deleted file mode 100644 index 3476fed4d..000000000 --- a/stripe/api_resources/card.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.card package is deprecated, please change your - imports to import from stripe directly. - From: - from stripe.api_resources.card import Card - To: - from stripe import Card - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe._card import ( # noqa - Card, - ) diff --git a/stripe/api_resources/cash_balance.py b/stripe/api_resources/cash_balance.py deleted file mode 100644 index 7a2200d86..000000000 --- a/stripe/api_resources/cash_balance.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.cash_balance package is deprecated, please change your - imports to import from stripe directly. - From: - from stripe.api_resources.cash_balance import CashBalance - To: - from stripe import CashBalance - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe._cash_balance import ( # noqa - CashBalance, - ) diff --git a/stripe/api_resources/charge.py b/stripe/api_resources/charge.py deleted file mode 100644 index 80b19216c..000000000 --- a/stripe/api_resources/charge.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.charge package is deprecated, please change your - imports to import from stripe directly. - From: - from stripe.api_resources.charge import Charge - To: - from stripe import Charge - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe._charge import ( # noqa - Charge, - ) diff --git a/stripe/api_resources/checkout/__init__.py b/stripe/api_resources/checkout/__init__.py deleted file mode 100644 index eaa052517..000000000 --- a/stripe/api_resources/checkout/__init__.py +++ /dev/null @@ -1,19 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.checkout package is deprecated, please change your - imports to import from stripe.checkout directly. - From: - from stripe.api_resources.checkout import ... - To: - from stripe.checkout import ... - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe.api_resources.checkout.session import Session diff --git a/stripe/api_resources/checkout/session.py b/stripe/api_resources/checkout/session.py deleted file mode 100644 index 65d7dd461..000000000 --- a/stripe/api_resources/checkout/session.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.checkout.session package is deprecated, please change your - imports to import from stripe.checkout directly. - From: - from stripe.api_resources.checkout.session import Session - To: - from stripe.checkout import Session - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe.checkout._session import ( # noqa - Session, - ) diff --git a/stripe/api_resources/climate/__init__.py b/stripe/api_resources/climate/__init__.py deleted file mode 100644 index 0bedec1ea..000000000 --- a/stripe/api_resources/climate/__init__.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.climate package is deprecated, please change your - imports to import from stripe.climate directly. - From: - from stripe.api_resources.climate import ... - To: - from stripe.climate import ... - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe.api_resources.climate.order import Order - from stripe.api_resources.climate.product import Product - from stripe.api_resources.climate.supplier import Supplier diff --git a/stripe/api_resources/climate/order.py b/stripe/api_resources/climate/order.py deleted file mode 100644 index 2e84727a8..000000000 --- a/stripe/api_resources/climate/order.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.climate.order package is deprecated, please change your - imports to import from stripe.climate directly. - From: - from stripe.api_resources.climate.order import Order - To: - from stripe.climate import Order - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe.climate._order import ( # noqa - Order, - ) diff --git a/stripe/api_resources/climate/product.py b/stripe/api_resources/climate/product.py deleted file mode 100644 index c535a5941..000000000 --- a/stripe/api_resources/climate/product.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.climate.product package is deprecated, please change your - imports to import from stripe.climate directly. - From: - from stripe.api_resources.climate.product import Product - To: - from stripe.climate import Product - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe.climate._product import ( # noqa - Product, - ) diff --git a/stripe/api_resources/climate/supplier.py b/stripe/api_resources/climate/supplier.py deleted file mode 100644 index 6ab96f82b..000000000 --- a/stripe/api_resources/climate/supplier.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.climate.supplier package is deprecated, please change your - imports to import from stripe.climate directly. - From: - from stripe.api_resources.climate.supplier import Supplier - To: - from stripe.climate import Supplier - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe.climate._supplier import ( # noqa - Supplier, - ) diff --git a/stripe/api_resources/confirmation_token.py b/stripe/api_resources/confirmation_token.py deleted file mode 100644 index 3f0fe344c..000000000 --- a/stripe/api_resources/confirmation_token.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.confirmation_token package is deprecated, please change your - imports to import from stripe directly. - From: - from stripe.api_resources.confirmation_token import ConfirmationToken - To: - from stripe import ConfirmationToken - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe._confirmation_token import ( # noqa - ConfirmationToken, - ) diff --git a/stripe/api_resources/connect_collection_transfer.py b/stripe/api_resources/connect_collection_transfer.py deleted file mode 100644 index 532f626ea..000000000 --- a/stripe/api_resources/connect_collection_transfer.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.connect_collection_transfer package is deprecated, please change your - imports to import from stripe directly. - From: - from stripe.api_resources.connect_collection_transfer import ConnectCollectionTransfer - To: - from stripe import ConnectCollectionTransfer - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe._connect_collection_transfer import ( # noqa - ConnectCollectionTransfer, - ) diff --git a/stripe/api_resources/country_spec.py b/stripe/api_resources/country_spec.py deleted file mode 100644 index 1a03f507a..000000000 --- a/stripe/api_resources/country_spec.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.country_spec package is deprecated, please change your - imports to import from stripe directly. - From: - from stripe.api_resources.country_spec import CountrySpec - To: - from stripe import CountrySpec - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe._country_spec import ( # noqa - CountrySpec, - ) diff --git a/stripe/api_resources/coupon.py b/stripe/api_resources/coupon.py deleted file mode 100644 index ccbc82a02..000000000 --- a/stripe/api_resources/coupon.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.coupon package is deprecated, please change your - imports to import from stripe directly. - From: - from stripe.api_resources.coupon import Coupon - To: - from stripe import Coupon - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe._coupon import ( # noqa - Coupon, - ) diff --git a/stripe/api_resources/credit_note.py b/stripe/api_resources/credit_note.py deleted file mode 100644 index e20ecc928..000000000 --- a/stripe/api_resources/credit_note.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.credit_note package is deprecated, please change your - imports to import from stripe directly. - From: - from stripe.api_resources.credit_note import CreditNote - To: - from stripe import CreditNote - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe._credit_note import ( # noqa - CreditNote, - ) diff --git a/stripe/api_resources/credit_note_line_item.py b/stripe/api_resources/credit_note_line_item.py deleted file mode 100644 index c6a829881..000000000 --- a/stripe/api_resources/credit_note_line_item.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.credit_note_line_item package is deprecated, please change your - imports to import from stripe directly. - From: - from stripe.api_resources.credit_note_line_item import CreditNoteLineItem - To: - from stripe import CreditNoteLineItem - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe._credit_note_line_item import ( # noqa - CreditNoteLineItem, - ) diff --git a/stripe/api_resources/customer.py b/stripe/api_resources/customer.py deleted file mode 100644 index dfbde2f12..000000000 --- a/stripe/api_resources/customer.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.customer package is deprecated, please change your - imports to import from stripe directly. - From: - from stripe.api_resources.customer import Customer - To: - from stripe import Customer - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe._customer import ( # noqa - Customer, - ) diff --git a/stripe/api_resources/customer_balance_transaction.py b/stripe/api_resources/customer_balance_transaction.py deleted file mode 100644 index 9bf45b2bf..000000000 --- a/stripe/api_resources/customer_balance_transaction.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.customer_balance_transaction package is deprecated, please change your - imports to import from stripe directly. - From: - from stripe.api_resources.customer_balance_transaction import CustomerBalanceTransaction - To: - from stripe import CustomerBalanceTransaction - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe._customer_balance_transaction import ( # noqa - CustomerBalanceTransaction, - ) diff --git a/stripe/api_resources/customer_cash_balance_transaction.py b/stripe/api_resources/customer_cash_balance_transaction.py deleted file mode 100644 index ba1e940b3..000000000 --- a/stripe/api_resources/customer_cash_balance_transaction.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.customer_cash_balance_transaction package is deprecated, please change your - imports to import from stripe directly. - From: - from stripe.api_resources.customer_cash_balance_transaction import CustomerCashBalanceTransaction - To: - from stripe import CustomerCashBalanceTransaction - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe._customer_cash_balance_transaction import ( # noqa - CustomerCashBalanceTransaction, - ) diff --git a/stripe/api_resources/customer_session.py b/stripe/api_resources/customer_session.py deleted file mode 100644 index 0d37b4ffa..000000000 --- a/stripe/api_resources/customer_session.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.customer_session package is deprecated, please change your - imports to import from stripe directly. - From: - from stripe.api_resources.customer_session import CustomerSession - To: - from stripe import CustomerSession - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe._customer_session import ( # noqa - CustomerSession, - ) diff --git a/stripe/api_resources/discount.py b/stripe/api_resources/discount.py deleted file mode 100644 index 02fda4291..000000000 --- a/stripe/api_resources/discount.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.discount package is deprecated, please change your - imports to import from stripe directly. - From: - from stripe.api_resources.discount import Discount - To: - from stripe import Discount - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe._discount import ( # noqa - Discount, - ) diff --git a/stripe/api_resources/dispute.py b/stripe/api_resources/dispute.py deleted file mode 100644 index 2c77da0a1..000000000 --- a/stripe/api_resources/dispute.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.dispute package is deprecated, please change your - imports to import from stripe directly. - From: - from stripe.api_resources.dispute import Dispute - To: - from stripe import Dispute - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe._dispute import ( # noqa - Dispute, - ) diff --git a/stripe/api_resources/entitlements/__init__.py b/stripe/api_resources/entitlements/__init__.py deleted file mode 100644 index 133ae14dd..000000000 --- a/stripe/api_resources/entitlements/__init__.py +++ /dev/null @@ -1,25 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.entitlements package is deprecated, please change your - imports to import from stripe.entitlements directly. - From: - from stripe.api_resources.entitlements import ... - To: - from stripe.entitlements import ... - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe.api_resources.entitlements.active_entitlement import ( - ActiveEntitlement, - ) - from stripe.api_resources.entitlements.active_entitlement_summary import ( - ActiveEntitlementSummary, - ) - from stripe.api_resources.entitlements.feature import Feature diff --git a/stripe/api_resources/entitlements/active_entitlement.py b/stripe/api_resources/entitlements/active_entitlement.py deleted file mode 100644 index 3e5321bed..000000000 --- a/stripe/api_resources/entitlements/active_entitlement.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.entitlements.active_entitlement package is deprecated, please change your - imports to import from stripe.entitlements directly. - From: - from stripe.api_resources.entitlements.active_entitlement import ActiveEntitlement - To: - from stripe.entitlements import ActiveEntitlement - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe.entitlements._active_entitlement import ( # noqa - ActiveEntitlement, - ) diff --git a/stripe/api_resources/entitlements/active_entitlement_summary.py b/stripe/api_resources/entitlements/active_entitlement_summary.py deleted file mode 100644 index ad981e565..000000000 --- a/stripe/api_resources/entitlements/active_entitlement_summary.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.entitlements.active_entitlement_summary package is deprecated, please change your - imports to import from stripe.entitlements directly. - From: - from stripe.api_resources.entitlements.active_entitlement_summary import ActiveEntitlementSummary - To: - from stripe.entitlements import ActiveEntitlementSummary - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe.entitlements._active_entitlement_summary import ( # noqa - ActiveEntitlementSummary, - ) diff --git a/stripe/api_resources/entitlements/feature.py b/stripe/api_resources/entitlements/feature.py deleted file mode 100644 index 888e561db..000000000 --- a/stripe/api_resources/entitlements/feature.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.entitlements.feature package is deprecated, please change your - imports to import from stripe.entitlements directly. - From: - from stripe.api_resources.entitlements.feature import Feature - To: - from stripe.entitlements import Feature - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe.entitlements._feature import ( # noqa - Feature, - ) diff --git a/stripe/api_resources/ephemeral_key.py b/stripe/api_resources/ephemeral_key.py deleted file mode 100644 index eca3b349b..000000000 --- a/stripe/api_resources/ephemeral_key.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.ephemeral_key package is deprecated, please change your - imports to import from stripe directly. - From: - from stripe.api_resources.ephemeral_key import EphemeralKey - To: - from stripe import EphemeralKey - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe._ephemeral_key import ( # noqa - EphemeralKey, - ) diff --git a/stripe/api_resources/error_object.py b/stripe/api_resources/error_object.py deleted file mode 100644 index d1443e985..000000000 --- a/stripe/api_resources/error_object.py +++ /dev/null @@ -1,20 +0,0 @@ -# -*- coding: utf-8 -*- -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.error_object package is deprecated, please change your - imports to import from stripe directly. - From: - from stripe.api_resources.error_object import ErrorObject - To: - from stripe import ErrorObject - """, - DeprecationWarning, -) -if not TYPE_CHECKING: - from stripe._error_object import ( # noqa - ErrorObject, - OAuthErrorObject, - ) diff --git a/stripe/api_resources/event.py b/stripe/api_resources/event.py deleted file mode 100644 index 85d2f48b9..000000000 --- a/stripe/api_resources/event.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.event package is deprecated, please change your - imports to import from stripe directly. - From: - from stripe.api_resources.event import Event - To: - from stripe import Event - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe._event import ( # noqa - Event, - ) diff --git a/stripe/api_resources/exchange_rate.py b/stripe/api_resources/exchange_rate.py deleted file mode 100644 index 989b63d21..000000000 --- a/stripe/api_resources/exchange_rate.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.exchange_rate package is deprecated, please change your - imports to import from stripe directly. - From: - from stripe.api_resources.exchange_rate import ExchangeRate - To: - from stripe import ExchangeRate - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe._exchange_rate import ( # noqa - ExchangeRate, - ) diff --git a/stripe/api_resources/file.py b/stripe/api_resources/file.py deleted file mode 100644 index f335fc94c..000000000 --- a/stripe/api_resources/file.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.file package is deprecated, please change your - imports to import from stripe directly. - From: - from stripe.api_resources.file import File - To: - from stripe import File - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe._file import ( # noqa - File, - ) diff --git a/stripe/api_resources/file_link.py b/stripe/api_resources/file_link.py deleted file mode 100644 index 026d2e865..000000000 --- a/stripe/api_resources/file_link.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.file_link package is deprecated, please change your - imports to import from stripe directly. - From: - from stripe.api_resources.file_link import FileLink - To: - from stripe import FileLink - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe._file_link import ( # noqa - FileLink, - ) diff --git a/stripe/api_resources/financial_connections/__init__.py b/stripe/api_resources/financial_connections/__init__.py deleted file mode 100644 index 3f95fee9c..000000000 --- a/stripe/api_resources/financial_connections/__init__.py +++ /dev/null @@ -1,35 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.financial_connections package is deprecated, please change your - imports to import from stripe.financial_connections directly. - From: - from stripe.api_resources.financial_connections import ... - To: - from stripe.financial_connections import ... - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe.api_resources.financial_connections.account import Account - from stripe.api_resources.financial_connections.account_inferred_balance import ( - AccountInferredBalance, - ) - from stripe.api_resources.financial_connections.account_owner import ( - AccountOwner, - ) - from stripe.api_resources.financial_connections.account_ownership import ( - AccountOwnership, - ) - from stripe.api_resources.financial_connections.institution import ( - Institution, - ) - from stripe.api_resources.financial_connections.session import Session - from stripe.api_resources.financial_connections.transaction import ( - Transaction, - ) diff --git a/stripe/api_resources/financial_connections/account.py b/stripe/api_resources/financial_connections/account.py deleted file mode 100644 index 6da362334..000000000 --- a/stripe/api_resources/financial_connections/account.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.financial_connections.account package is deprecated, please change your - imports to import from stripe.financial_connections directly. - From: - from stripe.api_resources.financial_connections.account import Account - To: - from stripe.financial_connections import Account - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe.financial_connections._account import ( # noqa - Account, - ) diff --git a/stripe/api_resources/financial_connections/account_inferred_balance.py b/stripe/api_resources/financial_connections/account_inferred_balance.py deleted file mode 100644 index 4a4e1a9ce..000000000 --- a/stripe/api_resources/financial_connections/account_inferred_balance.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.financial_connections.account_inferred_balance package is deprecated, please change your - imports to import from stripe.financial_connections directly. - From: - from stripe.api_resources.financial_connections.account_inferred_balance import AccountInferredBalance - To: - from stripe.financial_connections import AccountInferredBalance - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe.financial_connections._account_inferred_balance import ( # noqa - AccountInferredBalance, - ) diff --git a/stripe/api_resources/financial_connections/account_owner.py b/stripe/api_resources/financial_connections/account_owner.py deleted file mode 100644 index b3539a12e..000000000 --- a/stripe/api_resources/financial_connections/account_owner.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.financial_connections.account_owner package is deprecated, please change your - imports to import from stripe.financial_connections directly. - From: - from stripe.api_resources.financial_connections.account_owner import AccountOwner - To: - from stripe.financial_connections import AccountOwner - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe.financial_connections._account_owner import ( # noqa - AccountOwner, - ) diff --git a/stripe/api_resources/financial_connections/account_ownership.py b/stripe/api_resources/financial_connections/account_ownership.py deleted file mode 100644 index ffa6dadb1..000000000 --- a/stripe/api_resources/financial_connections/account_ownership.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.financial_connections.account_ownership package is deprecated, please change your - imports to import from stripe.financial_connections directly. - From: - from stripe.api_resources.financial_connections.account_ownership import AccountOwnership - To: - from stripe.financial_connections import AccountOwnership - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe.financial_connections._account_ownership import ( # noqa - AccountOwnership, - ) diff --git a/stripe/api_resources/financial_connections/institution.py b/stripe/api_resources/financial_connections/institution.py deleted file mode 100644 index 6f5598aa6..000000000 --- a/stripe/api_resources/financial_connections/institution.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.financial_connections.institution package is deprecated, please change your - imports to import from stripe.financial_connections directly. - From: - from stripe.api_resources.financial_connections.institution import Institution - To: - from stripe.financial_connections import Institution - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe.financial_connections._institution import ( # noqa - Institution, - ) diff --git a/stripe/api_resources/financial_connections/session.py b/stripe/api_resources/financial_connections/session.py deleted file mode 100644 index f8a7a4406..000000000 --- a/stripe/api_resources/financial_connections/session.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.financial_connections.session package is deprecated, please change your - imports to import from stripe.financial_connections directly. - From: - from stripe.api_resources.financial_connections.session import Session - To: - from stripe.financial_connections import Session - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe.financial_connections._session import ( # noqa - Session, - ) diff --git a/stripe/api_resources/financial_connections/transaction.py b/stripe/api_resources/financial_connections/transaction.py deleted file mode 100644 index 73c0e0072..000000000 --- a/stripe/api_resources/financial_connections/transaction.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.financial_connections.transaction package is deprecated, please change your - imports to import from stripe.financial_connections directly. - From: - from stripe.api_resources.financial_connections.transaction import Transaction - To: - from stripe.financial_connections import Transaction - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe.financial_connections._transaction import ( # noqa - Transaction, - ) diff --git a/stripe/api_resources/forwarding/__init__.py b/stripe/api_resources/forwarding/__init__.py deleted file mode 100644 index 2ca62e372..000000000 --- a/stripe/api_resources/forwarding/__init__.py +++ /dev/null @@ -1,19 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.forwarding package is deprecated, please change your - imports to import from stripe.forwarding directly. - From: - from stripe.api_resources.forwarding import ... - To: - from stripe.forwarding import ... - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe.api_resources.forwarding.request import Request diff --git a/stripe/api_resources/forwarding/request.py b/stripe/api_resources/forwarding/request.py deleted file mode 100644 index 26e6969ff..000000000 --- a/stripe/api_resources/forwarding/request.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.forwarding.request package is deprecated, please change your - imports to import from stripe.forwarding directly. - From: - from stripe.api_resources.forwarding.request import Request - To: - from stripe.forwarding import Request - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe.forwarding._request import ( # noqa - Request, - ) diff --git a/stripe/api_resources/funding_instructions.py b/stripe/api_resources/funding_instructions.py deleted file mode 100644 index e4ed9dd08..000000000 --- a/stripe/api_resources/funding_instructions.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.funding_instructions package is deprecated, please change your - imports to import from stripe directly. - From: - from stripe.api_resources.funding_instructions import FundingInstructions - To: - from stripe import FundingInstructions - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe._funding_instructions import ( # noqa - FundingInstructions, - ) diff --git a/stripe/api_resources/fx_quote.py b/stripe/api_resources/fx_quote.py deleted file mode 100644 index f7b67a25d..000000000 --- a/stripe/api_resources/fx_quote.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.fx_quote package is deprecated, please change your - imports to import from stripe directly. - From: - from stripe.api_resources.fx_quote import FxQuote - To: - from stripe import FxQuote - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe._fx_quote import ( # noqa - FxQuote, - ) diff --git a/stripe/api_resources/identity/__init__.py b/stripe/api_resources/identity/__init__.py deleted file mode 100644 index a14d44426..000000000 --- a/stripe/api_resources/identity/__init__.py +++ /dev/null @@ -1,24 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.identity package is deprecated, please change your - imports to import from stripe.identity directly. - From: - from stripe.api_resources.identity import ... - To: - from stripe.identity import ... - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe.api_resources.identity.verification_report import ( - VerificationReport, - ) - from stripe.api_resources.identity.verification_session import ( - VerificationSession, - ) diff --git a/stripe/api_resources/identity/verification_report.py b/stripe/api_resources/identity/verification_report.py deleted file mode 100644 index a27b20235..000000000 --- a/stripe/api_resources/identity/verification_report.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.identity.verification_report package is deprecated, please change your - imports to import from stripe.identity directly. - From: - from stripe.api_resources.identity.verification_report import VerificationReport - To: - from stripe.identity import VerificationReport - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe.identity._verification_report import ( # noqa - VerificationReport, - ) diff --git a/stripe/api_resources/identity/verification_session.py b/stripe/api_resources/identity/verification_session.py deleted file mode 100644 index 45493c092..000000000 --- a/stripe/api_resources/identity/verification_session.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.identity.verification_session package is deprecated, please change your - imports to import from stripe.identity directly. - From: - from stripe.api_resources.identity.verification_session import VerificationSession - To: - from stripe.identity import VerificationSession - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe.identity._verification_session import ( # noqa - VerificationSession, - ) diff --git a/stripe/api_resources/invoice.py b/stripe/api_resources/invoice.py deleted file mode 100644 index 71c729399..000000000 --- a/stripe/api_resources/invoice.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.invoice package is deprecated, please change your - imports to import from stripe directly. - From: - from stripe.api_resources.invoice import Invoice - To: - from stripe import Invoice - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe._invoice import ( # noqa - Invoice, - ) diff --git a/stripe/api_resources/invoice_item.py b/stripe/api_resources/invoice_item.py deleted file mode 100644 index f97ac416e..000000000 --- a/stripe/api_resources/invoice_item.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.invoice_item package is deprecated, please change your - imports to import from stripe directly. - From: - from stripe.api_resources.invoice_item import InvoiceItem - To: - from stripe import InvoiceItem - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe._invoice_item import ( # noqa - InvoiceItem, - ) diff --git a/stripe/api_resources/invoice_line_item.py b/stripe/api_resources/invoice_line_item.py deleted file mode 100644 index 0f4e8d9ae..000000000 --- a/stripe/api_resources/invoice_line_item.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.invoice_line_item package is deprecated, please change your - imports to import from stripe directly. - From: - from stripe.api_resources.invoice_line_item import InvoiceLineItem - To: - from stripe import InvoiceLineItem - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe._invoice_line_item import ( # noqa - InvoiceLineItem, - ) diff --git a/stripe/api_resources/invoice_payment.py b/stripe/api_resources/invoice_payment.py deleted file mode 100644 index 48d804655..000000000 --- a/stripe/api_resources/invoice_payment.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.invoice_payment package is deprecated, please change your - imports to import from stripe directly. - From: - from stripe.api_resources.invoice_payment import InvoicePayment - To: - from stripe import InvoicePayment - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe._invoice_payment import ( # noqa - InvoicePayment, - ) diff --git a/stripe/api_resources/invoice_rendering_template.py b/stripe/api_resources/invoice_rendering_template.py deleted file mode 100644 index e0b96650e..000000000 --- a/stripe/api_resources/invoice_rendering_template.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.invoice_rendering_template package is deprecated, please change your - imports to import from stripe directly. - From: - from stripe.api_resources.invoice_rendering_template import InvoiceRenderingTemplate - To: - from stripe import InvoiceRenderingTemplate - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe._invoice_rendering_template import ( # noqa - InvoiceRenderingTemplate, - ) diff --git a/stripe/api_resources/issuing/__init__.py b/stripe/api_resources/issuing/__init__.py deleted file mode 100644 index eb7e8c0eb..000000000 --- a/stripe/api_resources/issuing/__init__.py +++ /dev/null @@ -1,38 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.issuing package is deprecated, please change your - imports to import from stripe.issuing directly. - From: - from stripe.api_resources.issuing import ... - To: - from stripe.issuing import ... - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe.api_resources.issuing.authorization import Authorization - from stripe.api_resources.issuing.card import Card - from stripe.api_resources.issuing.cardholder import Cardholder - from stripe.api_resources.issuing.credit_underwriting_record import ( - CreditUnderwritingRecord, - ) - from stripe.api_resources.issuing.dispute import Dispute - from stripe.api_resources.issuing.dispute_settlement_detail import ( - DisputeSettlementDetail, - ) - from stripe.api_resources.issuing.fraud_liability_debit import ( - FraudLiabilityDebit, - ) - from stripe.api_resources.issuing.personalization_design import ( - PersonalizationDesign, - ) - from stripe.api_resources.issuing.physical_bundle import PhysicalBundle - from stripe.api_resources.issuing.settlement import Settlement - from stripe.api_resources.issuing.token import Token - from stripe.api_resources.issuing.transaction import Transaction diff --git a/stripe/api_resources/issuing/authorization.py b/stripe/api_resources/issuing/authorization.py deleted file mode 100644 index 83eb3b07c..000000000 --- a/stripe/api_resources/issuing/authorization.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.issuing.authorization package is deprecated, please change your - imports to import from stripe.issuing directly. - From: - from stripe.api_resources.issuing.authorization import Authorization - To: - from stripe.issuing import Authorization - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe.issuing._authorization import ( # noqa - Authorization, - ) diff --git a/stripe/api_resources/issuing/card.py b/stripe/api_resources/issuing/card.py deleted file mode 100644 index eec21ad00..000000000 --- a/stripe/api_resources/issuing/card.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.issuing.card package is deprecated, please change your - imports to import from stripe.issuing directly. - From: - from stripe.api_resources.issuing.card import Card - To: - from stripe.issuing import Card - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe.issuing._card import ( # noqa - Card, - ) diff --git a/stripe/api_resources/issuing/cardholder.py b/stripe/api_resources/issuing/cardholder.py deleted file mode 100644 index 671099148..000000000 --- a/stripe/api_resources/issuing/cardholder.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.issuing.cardholder package is deprecated, please change your - imports to import from stripe.issuing directly. - From: - from stripe.api_resources.issuing.cardholder import Cardholder - To: - from stripe.issuing import Cardholder - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe.issuing._cardholder import ( # noqa - Cardholder, - ) diff --git a/stripe/api_resources/issuing/credit_underwriting_record.py b/stripe/api_resources/issuing/credit_underwriting_record.py deleted file mode 100644 index e267c197c..000000000 --- a/stripe/api_resources/issuing/credit_underwriting_record.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.issuing.credit_underwriting_record package is deprecated, please change your - imports to import from stripe.issuing directly. - From: - from stripe.api_resources.issuing.credit_underwriting_record import CreditUnderwritingRecord - To: - from stripe.issuing import CreditUnderwritingRecord - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe.issuing._credit_underwriting_record import ( # noqa - CreditUnderwritingRecord, - ) diff --git a/stripe/api_resources/issuing/dispute.py b/stripe/api_resources/issuing/dispute.py deleted file mode 100644 index 571b05427..000000000 --- a/stripe/api_resources/issuing/dispute.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.issuing.dispute package is deprecated, please change your - imports to import from stripe.issuing directly. - From: - from stripe.api_resources.issuing.dispute import Dispute - To: - from stripe.issuing import Dispute - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe.issuing._dispute import ( # noqa - Dispute, - ) diff --git a/stripe/api_resources/issuing/dispute_settlement_detail.py b/stripe/api_resources/issuing/dispute_settlement_detail.py deleted file mode 100644 index 73b932877..000000000 --- a/stripe/api_resources/issuing/dispute_settlement_detail.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.issuing.dispute_settlement_detail package is deprecated, please change your - imports to import from stripe.issuing directly. - From: - from stripe.api_resources.issuing.dispute_settlement_detail import DisputeSettlementDetail - To: - from stripe.issuing import DisputeSettlementDetail - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe.issuing._dispute_settlement_detail import ( # noqa - DisputeSettlementDetail, - ) diff --git a/stripe/api_resources/issuing/fraud_liability_debit.py b/stripe/api_resources/issuing/fraud_liability_debit.py deleted file mode 100644 index 024b2e904..000000000 --- a/stripe/api_resources/issuing/fraud_liability_debit.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.issuing.fraud_liability_debit package is deprecated, please change your - imports to import from stripe.issuing directly. - From: - from stripe.api_resources.issuing.fraud_liability_debit import FraudLiabilityDebit - To: - from stripe.issuing import FraudLiabilityDebit - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe.issuing._fraud_liability_debit import ( # noqa - FraudLiabilityDebit, - ) diff --git a/stripe/api_resources/issuing/personalization_design.py b/stripe/api_resources/issuing/personalization_design.py deleted file mode 100644 index 2b65c1db6..000000000 --- a/stripe/api_resources/issuing/personalization_design.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.issuing.personalization_design package is deprecated, please change your - imports to import from stripe.issuing directly. - From: - from stripe.api_resources.issuing.personalization_design import PersonalizationDesign - To: - from stripe.issuing import PersonalizationDesign - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe.issuing._personalization_design import ( # noqa - PersonalizationDesign, - ) diff --git a/stripe/api_resources/issuing/physical_bundle.py b/stripe/api_resources/issuing/physical_bundle.py deleted file mode 100644 index ea29db063..000000000 --- a/stripe/api_resources/issuing/physical_bundle.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.issuing.physical_bundle package is deprecated, please change your - imports to import from stripe.issuing directly. - From: - from stripe.api_resources.issuing.physical_bundle import PhysicalBundle - To: - from stripe.issuing import PhysicalBundle - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe.issuing._physical_bundle import ( # noqa - PhysicalBundle, - ) diff --git a/stripe/api_resources/issuing/settlement.py b/stripe/api_resources/issuing/settlement.py deleted file mode 100644 index 54e88615d..000000000 --- a/stripe/api_resources/issuing/settlement.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.issuing.settlement package is deprecated, please change your - imports to import from stripe.issuing directly. - From: - from stripe.api_resources.issuing.settlement import Settlement - To: - from stripe.issuing import Settlement - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe.issuing._settlement import ( # noqa - Settlement, - ) diff --git a/stripe/api_resources/issuing/token.py b/stripe/api_resources/issuing/token.py deleted file mode 100644 index 36675f4ab..000000000 --- a/stripe/api_resources/issuing/token.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.issuing.token package is deprecated, please change your - imports to import from stripe.issuing directly. - From: - from stripe.api_resources.issuing.token import Token - To: - from stripe.issuing import Token - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe.issuing._token import ( # noqa - Token, - ) diff --git a/stripe/api_resources/issuing/transaction.py b/stripe/api_resources/issuing/transaction.py deleted file mode 100644 index 897e57886..000000000 --- a/stripe/api_resources/issuing/transaction.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.issuing.transaction package is deprecated, please change your - imports to import from stripe.issuing directly. - From: - from stripe.api_resources.issuing.transaction import Transaction - To: - from stripe.issuing import Transaction - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe.issuing._transaction import ( # noqa - Transaction, - ) diff --git a/stripe/api_resources/line_item.py b/stripe/api_resources/line_item.py deleted file mode 100644 index be6f9225c..000000000 --- a/stripe/api_resources/line_item.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.line_item package is deprecated, please change your - imports to import from stripe directly. - From: - from stripe.api_resources.line_item import LineItem - To: - from stripe import LineItem - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe._line_item import ( # noqa - LineItem, - ) diff --git a/stripe/api_resources/list_object.py b/stripe/api_resources/list_object.py deleted file mode 100644 index 6f5c80fb6..000000000 --- a/stripe/api_resources/list_object.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.list_object package is deprecated, please change your - imports to import from stripe directly. - From: - from stripe.api_resources.list_object import ListObject - To: - from stripe import ListObject - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe._list_object import ( # noqa - ListObject, - ) diff --git a/stripe/api_resources/login_link.py b/stripe/api_resources/login_link.py deleted file mode 100644 index 612d73b49..000000000 --- a/stripe/api_resources/login_link.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.login_link package is deprecated, please change your - imports to import from stripe directly. - From: - from stripe.api_resources.login_link import LoginLink - To: - from stripe import LoginLink - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe._login_link import ( # noqa - LoginLink, - ) diff --git a/stripe/api_resources/mandate.py b/stripe/api_resources/mandate.py deleted file mode 100644 index 8b699b9e2..000000000 --- a/stripe/api_resources/mandate.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.mandate package is deprecated, please change your - imports to import from stripe directly. - From: - from stripe.api_resources.mandate import Mandate - To: - from stripe import Mandate - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe._mandate import ( # noqa - Mandate, - ) diff --git a/stripe/api_resources/margin.py b/stripe/api_resources/margin.py deleted file mode 100644 index 2a94240be..000000000 --- a/stripe/api_resources/margin.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.margin package is deprecated, please change your - imports to import from stripe directly. - From: - from stripe.api_resources.margin import Margin - To: - from stripe import Margin - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe._margin import ( # noqa - Margin, - ) diff --git a/stripe/api_resources/order.py b/stripe/api_resources/order.py deleted file mode 100644 index 559962f48..000000000 --- a/stripe/api_resources/order.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.order package is deprecated, please change your - imports to import from stripe directly. - From: - from stripe.api_resources.order import Order - To: - from stripe import Order - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe._order import ( # noqa - Order, - ) diff --git a/stripe/api_resources/payment_attempt_record.py b/stripe/api_resources/payment_attempt_record.py deleted file mode 100644 index 5c6a86fe8..000000000 --- a/stripe/api_resources/payment_attempt_record.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.payment_attempt_record package is deprecated, please change your - imports to import from stripe directly. - From: - from stripe.api_resources.payment_attempt_record import PaymentAttemptRecord - To: - from stripe import PaymentAttemptRecord - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe._payment_attempt_record import ( # noqa - PaymentAttemptRecord, - ) diff --git a/stripe/api_resources/payment_intent.py b/stripe/api_resources/payment_intent.py deleted file mode 100644 index 6aa2110da..000000000 --- a/stripe/api_resources/payment_intent.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.payment_intent package is deprecated, please change your - imports to import from stripe directly. - From: - from stripe.api_resources.payment_intent import PaymentIntent - To: - from stripe import PaymentIntent - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe._payment_intent import ( # noqa - PaymentIntent, - ) diff --git a/stripe/api_resources/payment_intent_amount_details_line_item.py b/stripe/api_resources/payment_intent_amount_details_line_item.py deleted file mode 100644 index 8e2a1545e..000000000 --- a/stripe/api_resources/payment_intent_amount_details_line_item.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.payment_intent_amount_details_line_item package is deprecated, please change your - imports to import from stripe directly. - From: - from stripe.api_resources.payment_intent_amount_details_line_item import PaymentIntentAmountDetailsLineItem - To: - from stripe import PaymentIntentAmountDetailsLineItem - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe._payment_intent_amount_details_line_item import ( # noqa - PaymentIntentAmountDetailsLineItem, - ) diff --git a/stripe/api_resources/payment_link.py b/stripe/api_resources/payment_link.py deleted file mode 100644 index 61b6f5925..000000000 --- a/stripe/api_resources/payment_link.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.payment_link package is deprecated, please change your - imports to import from stripe directly. - From: - from stripe.api_resources.payment_link import PaymentLink - To: - from stripe import PaymentLink - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe._payment_link import ( # noqa - PaymentLink, - ) diff --git a/stripe/api_resources/payment_method.py b/stripe/api_resources/payment_method.py deleted file mode 100644 index fda536ff5..000000000 --- a/stripe/api_resources/payment_method.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.payment_method package is deprecated, please change your - imports to import from stripe directly. - From: - from stripe.api_resources.payment_method import PaymentMethod - To: - from stripe import PaymentMethod - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe._payment_method import ( # noqa - PaymentMethod, - ) diff --git a/stripe/api_resources/payment_method_configuration.py b/stripe/api_resources/payment_method_configuration.py deleted file mode 100644 index 8030fe3b4..000000000 --- a/stripe/api_resources/payment_method_configuration.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.payment_method_configuration package is deprecated, please change your - imports to import from stripe directly. - From: - from stripe.api_resources.payment_method_configuration import PaymentMethodConfiguration - To: - from stripe import PaymentMethodConfiguration - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe._payment_method_configuration import ( # noqa - PaymentMethodConfiguration, - ) diff --git a/stripe/api_resources/payment_method_domain.py b/stripe/api_resources/payment_method_domain.py deleted file mode 100644 index eb0971a6e..000000000 --- a/stripe/api_resources/payment_method_domain.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.payment_method_domain package is deprecated, please change your - imports to import from stripe directly. - From: - from stripe.api_resources.payment_method_domain import PaymentMethodDomain - To: - from stripe import PaymentMethodDomain - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe._payment_method_domain import ( # noqa - PaymentMethodDomain, - ) diff --git a/stripe/api_resources/payment_record.py b/stripe/api_resources/payment_record.py deleted file mode 100644 index 7e72b796a..000000000 --- a/stripe/api_resources/payment_record.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.payment_record package is deprecated, please change your - imports to import from stripe directly. - From: - from stripe.api_resources.payment_record import PaymentRecord - To: - from stripe import PaymentRecord - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe._payment_record import ( # noqa - PaymentRecord, - ) diff --git a/stripe/api_resources/payout.py b/stripe/api_resources/payout.py deleted file mode 100644 index f6fbc4b16..000000000 --- a/stripe/api_resources/payout.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.payout package is deprecated, please change your - imports to import from stripe directly. - From: - from stripe.api_resources.payout import Payout - To: - from stripe import Payout - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe._payout import ( # noqa - Payout, - ) diff --git a/stripe/api_resources/person.py b/stripe/api_resources/person.py deleted file mode 100644 index bb644f1f3..000000000 --- a/stripe/api_resources/person.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.person package is deprecated, please change your - imports to import from stripe directly. - From: - from stripe.api_resources.person import Person - To: - from stripe import Person - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe._person import ( # noqa - Person, - ) diff --git a/stripe/api_resources/plan.py b/stripe/api_resources/plan.py deleted file mode 100644 index 539937497..000000000 --- a/stripe/api_resources/plan.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.plan package is deprecated, please change your - imports to import from stripe directly. - From: - from stripe.api_resources.plan import Plan - To: - from stripe import Plan - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe._plan import ( # noqa - Plan, - ) diff --git a/stripe/api_resources/price.py b/stripe/api_resources/price.py deleted file mode 100644 index 3f2c3754e..000000000 --- a/stripe/api_resources/price.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.price package is deprecated, please change your - imports to import from stripe directly. - From: - from stripe.api_resources.price import Price - To: - from stripe import Price - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe._price import ( # noqa - Price, - ) diff --git a/stripe/api_resources/privacy/__init__.py b/stripe/api_resources/privacy/__init__.py deleted file mode 100644 index 9366d685f..000000000 --- a/stripe/api_resources/privacy/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.privacy package is deprecated, please change your - imports to import from stripe.privacy directly. - From: - from stripe.api_resources.privacy import ... - To: - from stripe.privacy import ... - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe.api_resources.privacy.redaction_job import RedactionJob - from stripe.api_resources.privacy.redaction_job_validation_error import ( - RedactionJobValidationError, - ) diff --git a/stripe/api_resources/privacy/redaction_job.py b/stripe/api_resources/privacy/redaction_job.py deleted file mode 100644 index 2cacf908e..000000000 --- a/stripe/api_resources/privacy/redaction_job.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.privacy.redaction_job package is deprecated, please change your - imports to import from stripe.privacy directly. - From: - from stripe.api_resources.privacy.redaction_job import RedactionJob - To: - from stripe.privacy import RedactionJob - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe.privacy._redaction_job import ( # noqa - RedactionJob, - ) diff --git a/stripe/api_resources/privacy/redaction_job_validation_error.py b/stripe/api_resources/privacy/redaction_job_validation_error.py deleted file mode 100644 index bc0630cea..000000000 --- a/stripe/api_resources/privacy/redaction_job_validation_error.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.privacy.redaction_job_validation_error package is deprecated, please change your - imports to import from stripe.privacy directly. - From: - from stripe.api_resources.privacy.redaction_job_validation_error import RedactionJobValidationError - To: - from stripe.privacy import RedactionJobValidationError - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe.privacy._redaction_job_validation_error import ( # noqa - RedactionJobValidationError, - ) diff --git a/stripe/api_resources/product.py b/stripe/api_resources/product.py deleted file mode 100644 index 2458af4b6..000000000 --- a/stripe/api_resources/product.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.product package is deprecated, please change your - imports to import from stripe directly. - From: - from stripe.api_resources.product import Product - To: - from stripe import Product - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe._product import ( # noqa - Product, - ) diff --git a/stripe/api_resources/product_feature.py b/stripe/api_resources/product_feature.py deleted file mode 100644 index e01cf6179..000000000 --- a/stripe/api_resources/product_feature.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.product_feature package is deprecated, please change your - imports to import from stripe directly. - From: - from stripe.api_resources.product_feature import ProductFeature - To: - from stripe import ProductFeature - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe._product_feature import ( # noqa - ProductFeature, - ) diff --git a/stripe/api_resources/promotion_code.py b/stripe/api_resources/promotion_code.py deleted file mode 100644 index d2ab9dfd0..000000000 --- a/stripe/api_resources/promotion_code.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.promotion_code package is deprecated, please change your - imports to import from stripe directly. - From: - from stripe.api_resources.promotion_code import PromotionCode - To: - from stripe import PromotionCode - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe._promotion_code import ( # noqa - PromotionCode, - ) diff --git a/stripe/api_resources/quote.py b/stripe/api_resources/quote.py deleted file mode 100644 index 71ba4bbf6..000000000 --- a/stripe/api_resources/quote.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.quote package is deprecated, please change your - imports to import from stripe directly. - From: - from stripe.api_resources.quote import Quote - To: - from stripe import Quote - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe._quote import ( # noqa - Quote, - ) diff --git a/stripe/api_resources/quote_line.py b/stripe/api_resources/quote_line.py deleted file mode 100644 index fbca0c6cd..000000000 --- a/stripe/api_resources/quote_line.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.quote_line package is deprecated, please change your - imports to import from stripe directly. - From: - from stripe.api_resources.quote_line import QuoteLine - To: - from stripe import QuoteLine - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe._quote_line import ( # noqa - QuoteLine, - ) diff --git a/stripe/api_resources/quote_preview_invoice.py b/stripe/api_resources/quote_preview_invoice.py deleted file mode 100644 index 4f4fda381..000000000 --- a/stripe/api_resources/quote_preview_invoice.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.quote_preview_invoice package is deprecated, please change your - imports to import from stripe directly. - From: - from stripe.api_resources.quote_preview_invoice import QuotePreviewInvoice - To: - from stripe import QuotePreviewInvoice - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe._quote_preview_invoice import ( # noqa - QuotePreviewInvoice, - ) diff --git a/stripe/api_resources/quote_preview_subscription_schedule.py b/stripe/api_resources/quote_preview_subscription_schedule.py deleted file mode 100644 index 97390da55..000000000 --- a/stripe/api_resources/quote_preview_subscription_schedule.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.quote_preview_subscription_schedule package is deprecated, please change your - imports to import from stripe directly. - From: - from stripe.api_resources.quote_preview_subscription_schedule import QuotePreviewSubscriptionSchedule - To: - from stripe import QuotePreviewSubscriptionSchedule - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe._quote_preview_subscription_schedule import ( # noqa - QuotePreviewSubscriptionSchedule, - ) diff --git a/stripe/api_resources/radar/__init__.py b/stripe/api_resources/radar/__init__.py deleted file mode 100644 index f9307cff2..000000000 --- a/stripe/api_resources/radar/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.radar package is deprecated, please change your - imports to import from stripe.radar directly. - From: - from stripe.api_resources.radar import ... - To: - from stripe.radar import ... - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe.api_resources.radar.early_fraud_warning import ( - EarlyFraudWarning, - ) - from stripe.api_resources.radar.value_list import ValueList - from stripe.api_resources.radar.value_list_item import ValueListItem diff --git a/stripe/api_resources/radar/early_fraud_warning.py b/stripe/api_resources/radar/early_fraud_warning.py deleted file mode 100644 index 2477ff1da..000000000 --- a/stripe/api_resources/radar/early_fraud_warning.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.radar.early_fraud_warning package is deprecated, please change your - imports to import from stripe.radar directly. - From: - from stripe.api_resources.radar.early_fraud_warning import EarlyFraudWarning - To: - from stripe.radar import EarlyFraudWarning - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe.radar._early_fraud_warning import ( # noqa - EarlyFraudWarning, - ) diff --git a/stripe/api_resources/radar/value_list.py b/stripe/api_resources/radar/value_list.py deleted file mode 100644 index 6444e19b5..000000000 --- a/stripe/api_resources/radar/value_list.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.radar.value_list package is deprecated, please change your - imports to import from stripe.radar directly. - From: - from stripe.api_resources.radar.value_list import ValueList - To: - from stripe.radar import ValueList - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe.radar._value_list import ( # noqa - ValueList, - ) diff --git a/stripe/api_resources/radar/value_list_item.py b/stripe/api_resources/radar/value_list_item.py deleted file mode 100644 index 1340ca612..000000000 --- a/stripe/api_resources/radar/value_list_item.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.radar.value_list_item package is deprecated, please change your - imports to import from stripe.radar directly. - From: - from stripe.api_resources.radar.value_list_item import ValueListItem - To: - from stripe.radar import ValueListItem - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe.radar._value_list_item import ( # noqa - ValueListItem, - ) diff --git a/stripe/api_resources/recipient_transfer.py b/stripe/api_resources/recipient_transfer.py deleted file mode 100644 index 1d7d8ec52..000000000 --- a/stripe/api_resources/recipient_transfer.py +++ /dev/null @@ -1,15 +0,0 @@ -from stripe._stripe_object import StripeObject - -from warnings import warn - -warn( - """ - The RecipientTransfer class is deprecated and will be removed in a future - """, - DeprecationWarning, - stacklevel=2, -) - - -class RecipientTransfer(StripeObject): - OBJECT_NAME = "recipient_transfer" diff --git a/stripe/api_resources/refund.py b/stripe/api_resources/refund.py deleted file mode 100644 index 8fb0bfd07..000000000 --- a/stripe/api_resources/refund.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.refund package is deprecated, please change your - imports to import from stripe directly. - From: - from stripe.api_resources.refund import Refund - To: - from stripe import Refund - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe._refund import ( # noqa - Refund, - ) diff --git a/stripe/api_resources/reporting/__init__.py b/stripe/api_resources/reporting/__init__.py deleted file mode 100644 index 641b9c607..000000000 --- a/stripe/api_resources/reporting/__init__.py +++ /dev/null @@ -1,20 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.reporting package is deprecated, please change your - imports to import from stripe.reporting directly. - From: - from stripe.api_resources.reporting import ... - To: - from stripe.reporting import ... - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe.api_resources.reporting.report_run import ReportRun - from stripe.api_resources.reporting.report_type import ReportType diff --git a/stripe/api_resources/reporting/report_run.py b/stripe/api_resources/reporting/report_run.py deleted file mode 100644 index b56686266..000000000 --- a/stripe/api_resources/reporting/report_run.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.reporting.report_run package is deprecated, please change your - imports to import from stripe.reporting directly. - From: - from stripe.api_resources.reporting.report_run import ReportRun - To: - from stripe.reporting import ReportRun - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe.reporting._report_run import ( # noqa - ReportRun, - ) diff --git a/stripe/api_resources/reporting/report_type.py b/stripe/api_resources/reporting/report_type.py deleted file mode 100644 index d1e356956..000000000 --- a/stripe/api_resources/reporting/report_type.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.reporting.report_type package is deprecated, please change your - imports to import from stripe.reporting directly. - From: - from stripe.api_resources.reporting.report_type import ReportType - To: - from stripe.reporting import ReportType - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe.reporting._report_type import ( # noqa - ReportType, - ) diff --git a/stripe/api_resources/reserve_transaction.py b/stripe/api_resources/reserve_transaction.py deleted file mode 100644 index da7eb01a8..000000000 --- a/stripe/api_resources/reserve_transaction.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.reserve_transaction package is deprecated, please change your - imports to import from stripe directly. - From: - from stripe.api_resources.reserve_transaction import ReserveTransaction - To: - from stripe import ReserveTransaction - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe._reserve_transaction import ( # noqa - ReserveTransaction, - ) diff --git a/stripe/api_resources/reversal.py b/stripe/api_resources/reversal.py deleted file mode 100644 index 2e80cf906..000000000 --- a/stripe/api_resources/reversal.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.reversal package is deprecated, please change your - imports to import from stripe directly. - From: - from stripe.api_resources.reversal import Reversal - To: - from stripe import Reversal - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe._reversal import ( # noqa - Reversal, - ) diff --git a/stripe/api_resources/review.py b/stripe/api_resources/review.py deleted file mode 100644 index b4b6bf127..000000000 --- a/stripe/api_resources/review.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.review package is deprecated, please change your - imports to import from stripe directly. - From: - from stripe.api_resources.review import Review - To: - from stripe import Review - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe._review import ( # noqa - Review, - ) diff --git a/stripe/api_resources/search_result_object.py b/stripe/api_resources/search_result_object.py deleted file mode 100644 index 46e0728ef..000000000 --- a/stripe/api_resources/search_result_object.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.search_result_object package is deprecated, please change your - imports to import from stripe directly. - From: - from stripe.api_resources.search_result_object import SearchResultObject - To: - from stripe import SearchResultObject - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe._search_result_object import ( # noqa - SearchResultObject, - ) diff --git a/stripe/api_resources/setup_attempt.py b/stripe/api_resources/setup_attempt.py deleted file mode 100644 index 97bd829a0..000000000 --- a/stripe/api_resources/setup_attempt.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.setup_attempt package is deprecated, please change your - imports to import from stripe directly. - From: - from stripe.api_resources.setup_attempt import SetupAttempt - To: - from stripe import SetupAttempt - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe._setup_attempt import ( # noqa - SetupAttempt, - ) diff --git a/stripe/api_resources/setup_intent.py b/stripe/api_resources/setup_intent.py deleted file mode 100644 index 9e0e3bce6..000000000 --- a/stripe/api_resources/setup_intent.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.setup_intent package is deprecated, please change your - imports to import from stripe directly. - From: - from stripe.api_resources.setup_intent import SetupIntent - To: - from stripe import SetupIntent - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe._setup_intent import ( # noqa - SetupIntent, - ) diff --git a/stripe/api_resources/shipping_rate.py b/stripe/api_resources/shipping_rate.py deleted file mode 100644 index 614149494..000000000 --- a/stripe/api_resources/shipping_rate.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.shipping_rate package is deprecated, please change your - imports to import from stripe directly. - From: - from stripe.api_resources.shipping_rate import ShippingRate - To: - from stripe import ShippingRate - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe._shipping_rate import ( # noqa - ShippingRate, - ) diff --git a/stripe/api_resources/sigma/__init__.py b/stripe/api_resources/sigma/__init__.py deleted file mode 100644 index 36f3cb7f7..000000000 --- a/stripe/api_resources/sigma/__init__.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.sigma package is deprecated, please change your - imports to import from stripe.sigma directly. - From: - from stripe.api_resources.sigma import ... - To: - from stripe.sigma import ... - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe.api_resources.sigma.scheduled_query_run import ( - ScheduledQueryRun, - ) diff --git a/stripe/api_resources/sigma/scheduled_query_run.py b/stripe/api_resources/sigma/scheduled_query_run.py deleted file mode 100644 index c47938a14..000000000 --- a/stripe/api_resources/sigma/scheduled_query_run.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.sigma.scheduled_query_run package is deprecated, please change your - imports to import from stripe.sigma directly. - From: - from stripe.api_resources.sigma.scheduled_query_run import ScheduledQueryRun - To: - from stripe.sigma import ScheduledQueryRun - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe.sigma._scheduled_query_run import ( # noqa - ScheduledQueryRun, - ) diff --git a/stripe/api_resources/source.py b/stripe/api_resources/source.py deleted file mode 100644 index 9bfca6d20..000000000 --- a/stripe/api_resources/source.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.source package is deprecated, please change your - imports to import from stripe directly. - From: - from stripe.api_resources.source import Source - To: - from stripe import Source - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe._source import ( # noqa - Source, - ) diff --git a/stripe/api_resources/source_mandate_notification.py b/stripe/api_resources/source_mandate_notification.py deleted file mode 100644 index 09b2d5897..000000000 --- a/stripe/api_resources/source_mandate_notification.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.source_mandate_notification package is deprecated, please change your - imports to import from stripe directly. - From: - from stripe.api_resources.source_mandate_notification import SourceMandateNotification - To: - from stripe import SourceMandateNotification - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe._source_mandate_notification import ( # noqa - SourceMandateNotification, - ) diff --git a/stripe/api_resources/source_transaction.py b/stripe/api_resources/source_transaction.py deleted file mode 100644 index 99b4faede..000000000 --- a/stripe/api_resources/source_transaction.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.source_transaction package is deprecated, please change your - imports to import from stripe directly. - From: - from stripe.api_resources.source_transaction import SourceTransaction - To: - from stripe import SourceTransaction - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe._source_transaction import ( # noqa - SourceTransaction, - ) diff --git a/stripe/api_resources/subscription.py b/stripe/api_resources/subscription.py deleted file mode 100644 index e5fbe7dbe..000000000 --- a/stripe/api_resources/subscription.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.subscription package is deprecated, please change your - imports to import from stripe directly. - From: - from stripe.api_resources.subscription import Subscription - To: - from stripe import Subscription - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe._subscription import ( # noqa - Subscription, - ) diff --git a/stripe/api_resources/subscription_item.py b/stripe/api_resources/subscription_item.py deleted file mode 100644 index 4ee30b2ba..000000000 --- a/stripe/api_resources/subscription_item.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.subscription_item package is deprecated, please change your - imports to import from stripe directly. - From: - from stripe.api_resources.subscription_item import SubscriptionItem - To: - from stripe import SubscriptionItem - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe._subscription_item import ( # noqa - SubscriptionItem, - ) diff --git a/stripe/api_resources/subscription_schedule.py b/stripe/api_resources/subscription_schedule.py deleted file mode 100644 index ebc54b5a3..000000000 --- a/stripe/api_resources/subscription_schedule.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.subscription_schedule package is deprecated, please change your - imports to import from stripe directly. - From: - from stripe.api_resources.subscription_schedule import SubscriptionSchedule - To: - from stripe import SubscriptionSchedule - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe._subscription_schedule import ( # noqa - SubscriptionSchedule, - ) diff --git a/stripe/api_resources/tax/__init__.py b/stripe/api_resources/tax/__init__.py deleted file mode 100644 index 404b94134..000000000 --- a/stripe/api_resources/tax/__init__.py +++ /dev/null @@ -1,30 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.tax package is deprecated, please change your - imports to import from stripe.tax directly. - From: - from stripe.api_resources.tax import ... - To: - from stripe.tax import ... - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe.api_resources.tax.association import Association - from stripe.api_resources.tax.calculation import Calculation - from stripe.api_resources.tax.calculation_line_item import ( - CalculationLineItem, - ) - from stripe.api_resources.tax.form import Form - from stripe.api_resources.tax.registration import Registration - from stripe.api_resources.tax.settings import Settings - from stripe.api_resources.tax.transaction import Transaction - from stripe.api_resources.tax.transaction_line_item import ( - TransactionLineItem, - ) diff --git a/stripe/api_resources/tax/association.py b/stripe/api_resources/tax/association.py deleted file mode 100644 index d050740d9..000000000 --- a/stripe/api_resources/tax/association.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.tax.association package is deprecated, please change your - imports to import from stripe.tax directly. - From: - from stripe.api_resources.tax.association import Association - To: - from stripe.tax import Association - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe.tax._association import ( # noqa - Association, - ) diff --git a/stripe/api_resources/tax/calculation.py b/stripe/api_resources/tax/calculation.py deleted file mode 100644 index afa7cb7ad..000000000 --- a/stripe/api_resources/tax/calculation.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.tax.calculation package is deprecated, please change your - imports to import from stripe.tax directly. - From: - from stripe.api_resources.tax.calculation import Calculation - To: - from stripe.tax import Calculation - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe.tax._calculation import ( # noqa - Calculation, - ) diff --git a/stripe/api_resources/tax/calculation_line_item.py b/stripe/api_resources/tax/calculation_line_item.py deleted file mode 100644 index feed190b2..000000000 --- a/stripe/api_resources/tax/calculation_line_item.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.tax.calculation_line_item package is deprecated, please change your - imports to import from stripe.tax directly. - From: - from stripe.api_resources.tax.calculation_line_item import CalculationLineItem - To: - from stripe.tax import CalculationLineItem - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe.tax._calculation_line_item import ( # noqa - CalculationLineItem, - ) diff --git a/stripe/api_resources/tax/form.py b/stripe/api_resources/tax/form.py deleted file mode 100644 index 8f5ae4fc8..000000000 --- a/stripe/api_resources/tax/form.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.tax.form package is deprecated, please change your - imports to import from stripe.tax directly. - From: - from stripe.api_resources.tax.form import Form - To: - from stripe.tax import Form - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe.tax._form import ( # noqa - Form, - ) diff --git a/stripe/api_resources/tax/registration.py b/stripe/api_resources/tax/registration.py deleted file mode 100644 index 05762f0ba..000000000 --- a/stripe/api_resources/tax/registration.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.tax.registration package is deprecated, please change your - imports to import from stripe.tax directly. - From: - from stripe.api_resources.tax.registration import Registration - To: - from stripe.tax import Registration - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe.tax._registration import ( # noqa - Registration, - ) diff --git a/stripe/api_resources/tax/settings.py b/stripe/api_resources/tax/settings.py deleted file mode 100644 index 7402ce4a3..000000000 --- a/stripe/api_resources/tax/settings.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.tax.settings package is deprecated, please change your - imports to import from stripe.tax directly. - From: - from stripe.api_resources.tax.settings import Settings - To: - from stripe.tax import Settings - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe.tax._settings import ( # noqa - Settings, - ) diff --git a/stripe/api_resources/tax/transaction.py b/stripe/api_resources/tax/transaction.py deleted file mode 100644 index 54fe31100..000000000 --- a/stripe/api_resources/tax/transaction.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.tax.transaction package is deprecated, please change your - imports to import from stripe.tax directly. - From: - from stripe.api_resources.tax.transaction import Transaction - To: - from stripe.tax import Transaction - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe.tax._transaction import ( # noqa - Transaction, - ) diff --git a/stripe/api_resources/tax/transaction_line_item.py b/stripe/api_resources/tax/transaction_line_item.py deleted file mode 100644 index 69399886f..000000000 --- a/stripe/api_resources/tax/transaction_line_item.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.tax.transaction_line_item package is deprecated, please change your - imports to import from stripe.tax directly. - From: - from stripe.api_resources.tax.transaction_line_item import TransactionLineItem - To: - from stripe.tax import TransactionLineItem - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe.tax._transaction_line_item import ( # noqa - TransactionLineItem, - ) diff --git a/stripe/api_resources/tax_code.py b/stripe/api_resources/tax_code.py deleted file mode 100644 index d3a48f2ce..000000000 --- a/stripe/api_resources/tax_code.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.tax_code package is deprecated, please change your - imports to import from stripe directly. - From: - from stripe.api_resources.tax_code import TaxCode - To: - from stripe import TaxCode - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe._tax_code import ( # noqa - TaxCode, - ) diff --git a/stripe/api_resources/tax_deducted_at_source.py b/stripe/api_resources/tax_deducted_at_source.py deleted file mode 100644 index d85343a67..000000000 --- a/stripe/api_resources/tax_deducted_at_source.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.tax_deducted_at_source package is deprecated, please change your - imports to import from stripe directly. - From: - from stripe.api_resources.tax_deducted_at_source import TaxDeductedAtSource - To: - from stripe import TaxDeductedAtSource - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe._tax_deducted_at_source import ( # noqa - TaxDeductedAtSource, - ) diff --git a/stripe/api_resources/tax_id.py b/stripe/api_resources/tax_id.py deleted file mode 100644 index 539c0f9b3..000000000 --- a/stripe/api_resources/tax_id.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.tax_id package is deprecated, please change your - imports to import from stripe directly. - From: - from stripe.api_resources.tax_id import TaxId - To: - from stripe import TaxId - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe._tax_id import ( # noqa - TaxId, - ) diff --git a/stripe/api_resources/tax_rate.py b/stripe/api_resources/tax_rate.py deleted file mode 100644 index 47c1532bf..000000000 --- a/stripe/api_resources/tax_rate.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.tax_rate package is deprecated, please change your - imports to import from stripe directly. - From: - from stripe.api_resources.tax_rate import TaxRate - To: - from stripe import TaxRate - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe._tax_rate import ( # noqa - TaxRate, - ) diff --git a/stripe/api_resources/terminal/__init__.py b/stripe/api_resources/terminal/__init__.py deleted file mode 100644 index f123bb1aa..000000000 --- a/stripe/api_resources/terminal/__init__.py +++ /dev/null @@ -1,26 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.terminal package is deprecated, please change your - imports to import from stripe.terminal directly. - From: - from stripe.api_resources.terminal import ... - To: - from stripe.terminal import ... - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe.api_resources.terminal.configuration import Configuration - from stripe.api_resources.terminal.connection_token import ConnectionToken - from stripe.api_resources.terminal.location import Location - from stripe.api_resources.terminal.onboarding_link import OnboardingLink - from stripe.api_resources.terminal.reader import Reader - from stripe.api_resources.terminal.reader_collected_data import ( - ReaderCollectedData, - ) diff --git a/stripe/api_resources/terminal/configuration.py b/stripe/api_resources/terminal/configuration.py deleted file mode 100644 index d4f908834..000000000 --- a/stripe/api_resources/terminal/configuration.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.terminal.configuration package is deprecated, please change your - imports to import from stripe.terminal directly. - From: - from stripe.api_resources.terminal.configuration import Configuration - To: - from stripe.terminal import Configuration - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe.terminal._configuration import ( # noqa - Configuration, - ) diff --git a/stripe/api_resources/terminal/connection_token.py b/stripe/api_resources/terminal/connection_token.py deleted file mode 100644 index e1ed827cb..000000000 --- a/stripe/api_resources/terminal/connection_token.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.terminal.connection_token package is deprecated, please change your - imports to import from stripe.terminal directly. - From: - from stripe.api_resources.terminal.connection_token import ConnectionToken - To: - from stripe.terminal import ConnectionToken - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe.terminal._connection_token import ( # noqa - ConnectionToken, - ) diff --git a/stripe/api_resources/terminal/location.py b/stripe/api_resources/terminal/location.py deleted file mode 100644 index c23d104a9..000000000 --- a/stripe/api_resources/terminal/location.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.terminal.location package is deprecated, please change your - imports to import from stripe.terminal directly. - From: - from stripe.api_resources.terminal.location import Location - To: - from stripe.terminal import Location - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe.terminal._location import ( # noqa - Location, - ) diff --git a/stripe/api_resources/terminal/onboarding_link.py b/stripe/api_resources/terminal/onboarding_link.py deleted file mode 100644 index 24a87e86e..000000000 --- a/stripe/api_resources/terminal/onboarding_link.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.terminal.onboarding_link package is deprecated, please change your - imports to import from stripe.terminal directly. - From: - from stripe.api_resources.terminal.onboarding_link import OnboardingLink - To: - from stripe.terminal import OnboardingLink - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe.terminal._onboarding_link import ( # noqa - OnboardingLink, - ) diff --git a/stripe/api_resources/terminal/reader.py b/stripe/api_resources/terminal/reader.py deleted file mode 100644 index aa17e46da..000000000 --- a/stripe/api_resources/terminal/reader.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.terminal.reader package is deprecated, please change your - imports to import from stripe.terminal directly. - From: - from stripe.api_resources.terminal.reader import Reader - To: - from stripe.terminal import Reader - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe.terminal._reader import ( # noqa - Reader, - ) diff --git a/stripe/api_resources/terminal/reader_collected_data.py b/stripe/api_resources/terminal/reader_collected_data.py deleted file mode 100644 index e25ac2207..000000000 --- a/stripe/api_resources/terminal/reader_collected_data.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.terminal.reader_collected_data package is deprecated, please change your - imports to import from stripe.terminal directly. - From: - from stripe.api_resources.terminal.reader_collected_data import ReaderCollectedData - To: - from stripe.terminal import ReaderCollectedData - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe.terminal._reader_collected_data import ( # noqa - ReaderCollectedData, - ) diff --git a/stripe/api_resources/test_helpers/__init__.py b/stripe/api_resources/test_helpers/__init__.py deleted file mode 100644 index fa9a3548b..000000000 --- a/stripe/api_resources/test_helpers/__init__.py +++ /dev/null @@ -1,19 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.test_helpers package is deprecated, please change your - imports to import from stripe.test_helpers directly. - From: - from stripe.api_resources.test_helpers import ... - To: - from stripe.test_helpers import ... - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe.api_resources.test_helpers.test_clock import TestClock diff --git a/stripe/api_resources/test_helpers/test_clock.py b/stripe/api_resources/test_helpers/test_clock.py deleted file mode 100644 index 0483cd767..000000000 --- a/stripe/api_resources/test_helpers/test_clock.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.test_helpers.test_clock package is deprecated, please change your - imports to import from stripe.test_helpers directly. - From: - from stripe.api_resources.test_helpers.test_clock import TestClock - To: - from stripe.test_helpers import TestClock - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe.test_helpers._test_clock import ( # noqa - TestClock, - ) diff --git a/stripe/api_resources/token.py b/stripe/api_resources/token.py deleted file mode 100644 index 28ec1a7d0..000000000 --- a/stripe/api_resources/token.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.token package is deprecated, please change your - imports to import from stripe directly. - From: - from stripe.api_resources.token import Token - To: - from stripe import Token - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe._token import ( # noqa - Token, - ) diff --git a/stripe/api_resources/topup.py b/stripe/api_resources/topup.py deleted file mode 100644 index a456adff8..000000000 --- a/stripe/api_resources/topup.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.topup package is deprecated, please change your - imports to import from stripe directly. - From: - from stripe.api_resources.topup import Topup - To: - from stripe import Topup - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe._topup import ( # noqa - Topup, - ) diff --git a/stripe/api_resources/transfer.py b/stripe/api_resources/transfer.py deleted file mode 100644 index 8893f9a83..000000000 --- a/stripe/api_resources/transfer.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.transfer package is deprecated, please change your - imports to import from stripe directly. - From: - from stripe.api_resources.transfer import Transfer - To: - from stripe import Transfer - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe._transfer import ( # noqa - Transfer, - ) diff --git a/stripe/api_resources/treasury/__init__.py b/stripe/api_resources/treasury/__init__.py deleted file mode 100644 index 499cdb8fc..000000000 --- a/stripe/api_resources/treasury/__init__.py +++ /dev/null @@ -1,37 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.treasury package is deprecated, please change your - imports to import from stripe.treasury directly. - From: - from stripe.api_resources.treasury import ... - To: - from stripe.treasury import ... - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe.api_resources.treasury.credit_reversal import CreditReversal - from stripe.api_resources.treasury.debit_reversal import DebitReversal - from stripe.api_resources.treasury.financial_account import ( - FinancialAccount, - ) - from stripe.api_resources.treasury.financial_account_features import ( - FinancialAccountFeatures, - ) - from stripe.api_resources.treasury.inbound_transfer import InboundTransfer - from stripe.api_resources.treasury.outbound_payment import OutboundPayment - from stripe.api_resources.treasury.outbound_transfer import ( - OutboundTransfer, - ) - from stripe.api_resources.treasury.received_credit import ReceivedCredit - from stripe.api_resources.treasury.received_debit import ReceivedDebit - from stripe.api_resources.treasury.transaction import Transaction - from stripe.api_resources.treasury.transaction_entry import ( - TransactionEntry, - ) diff --git a/stripe/api_resources/treasury/credit_reversal.py b/stripe/api_resources/treasury/credit_reversal.py deleted file mode 100644 index 9a94b977a..000000000 --- a/stripe/api_resources/treasury/credit_reversal.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.treasury.credit_reversal package is deprecated, please change your - imports to import from stripe.treasury directly. - From: - from stripe.api_resources.treasury.credit_reversal import CreditReversal - To: - from stripe.treasury import CreditReversal - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe.treasury._credit_reversal import ( # noqa - CreditReversal, - ) diff --git a/stripe/api_resources/treasury/debit_reversal.py b/stripe/api_resources/treasury/debit_reversal.py deleted file mode 100644 index d6cf966a0..000000000 --- a/stripe/api_resources/treasury/debit_reversal.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.treasury.debit_reversal package is deprecated, please change your - imports to import from stripe.treasury directly. - From: - from stripe.api_resources.treasury.debit_reversal import DebitReversal - To: - from stripe.treasury import DebitReversal - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe.treasury._debit_reversal import ( # noqa - DebitReversal, - ) diff --git a/stripe/api_resources/treasury/financial_account.py b/stripe/api_resources/treasury/financial_account.py deleted file mode 100644 index cd4f71685..000000000 --- a/stripe/api_resources/treasury/financial_account.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.treasury.financial_account package is deprecated, please change your - imports to import from stripe.treasury directly. - From: - from stripe.api_resources.treasury.financial_account import FinancialAccount - To: - from stripe.treasury import FinancialAccount - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe.treasury._financial_account import ( # noqa - FinancialAccount, - ) diff --git a/stripe/api_resources/treasury/financial_account_features.py b/stripe/api_resources/treasury/financial_account_features.py deleted file mode 100644 index 1dcbe6c74..000000000 --- a/stripe/api_resources/treasury/financial_account_features.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.treasury.financial_account_features package is deprecated, please change your - imports to import from stripe.treasury directly. - From: - from stripe.api_resources.treasury.financial_account_features import FinancialAccountFeatures - To: - from stripe.treasury import FinancialAccountFeatures - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe.treasury._financial_account_features import ( # noqa - FinancialAccountFeatures, - ) diff --git a/stripe/api_resources/treasury/inbound_transfer.py b/stripe/api_resources/treasury/inbound_transfer.py deleted file mode 100644 index b94f5fea8..000000000 --- a/stripe/api_resources/treasury/inbound_transfer.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.treasury.inbound_transfer package is deprecated, please change your - imports to import from stripe.treasury directly. - From: - from stripe.api_resources.treasury.inbound_transfer import InboundTransfer - To: - from stripe.treasury import InboundTransfer - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe.treasury._inbound_transfer import ( # noqa - InboundTransfer, - ) diff --git a/stripe/api_resources/treasury/outbound_payment.py b/stripe/api_resources/treasury/outbound_payment.py deleted file mode 100644 index fbd1831a5..000000000 --- a/stripe/api_resources/treasury/outbound_payment.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.treasury.outbound_payment package is deprecated, please change your - imports to import from stripe.treasury directly. - From: - from stripe.api_resources.treasury.outbound_payment import OutboundPayment - To: - from stripe.treasury import OutboundPayment - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe.treasury._outbound_payment import ( # noqa - OutboundPayment, - ) diff --git a/stripe/api_resources/treasury/outbound_transfer.py b/stripe/api_resources/treasury/outbound_transfer.py deleted file mode 100644 index 9f988dfa3..000000000 --- a/stripe/api_resources/treasury/outbound_transfer.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.treasury.outbound_transfer package is deprecated, please change your - imports to import from stripe.treasury directly. - From: - from stripe.api_resources.treasury.outbound_transfer import OutboundTransfer - To: - from stripe.treasury import OutboundTransfer - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe.treasury._outbound_transfer import ( # noqa - OutboundTransfer, - ) diff --git a/stripe/api_resources/treasury/received_credit.py b/stripe/api_resources/treasury/received_credit.py deleted file mode 100644 index 29b2bc845..000000000 --- a/stripe/api_resources/treasury/received_credit.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.treasury.received_credit package is deprecated, please change your - imports to import from stripe.treasury directly. - From: - from stripe.api_resources.treasury.received_credit import ReceivedCredit - To: - from stripe.treasury import ReceivedCredit - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe.treasury._received_credit import ( # noqa - ReceivedCredit, - ) diff --git a/stripe/api_resources/treasury/received_debit.py b/stripe/api_resources/treasury/received_debit.py deleted file mode 100644 index 68ab29c74..000000000 --- a/stripe/api_resources/treasury/received_debit.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.treasury.received_debit package is deprecated, please change your - imports to import from stripe.treasury directly. - From: - from stripe.api_resources.treasury.received_debit import ReceivedDebit - To: - from stripe.treasury import ReceivedDebit - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe.treasury._received_debit import ( # noqa - ReceivedDebit, - ) diff --git a/stripe/api_resources/treasury/transaction.py b/stripe/api_resources/treasury/transaction.py deleted file mode 100644 index 4b8d242d7..000000000 --- a/stripe/api_resources/treasury/transaction.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.treasury.transaction package is deprecated, please change your - imports to import from stripe.treasury directly. - From: - from stripe.api_resources.treasury.transaction import Transaction - To: - from stripe.treasury import Transaction - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe.treasury._transaction import ( # noqa - Transaction, - ) diff --git a/stripe/api_resources/treasury/transaction_entry.py b/stripe/api_resources/treasury/transaction_entry.py deleted file mode 100644 index d87a9a6e0..000000000 --- a/stripe/api_resources/treasury/transaction_entry.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.treasury.transaction_entry package is deprecated, please change your - imports to import from stripe.treasury directly. - From: - from stripe.api_resources.treasury.transaction_entry import TransactionEntry - To: - from stripe.treasury import TransactionEntry - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe.treasury._transaction_entry import ( # noqa - TransactionEntry, - ) diff --git a/stripe/api_resources/webhook_endpoint.py b/stripe/api_resources/webhook_endpoint.py deleted file mode 100644 index 175e1387b..000000000 --- a/stripe/api_resources/webhook_endpoint.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# File generated from our OpenAPI spec -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.webhook_endpoint package is deprecated, please change your - imports to import from stripe directly. - From: - from stripe.api_resources.webhook_endpoint import WebhookEndpoint - To: - from stripe import WebhookEndpoint - """, - DeprecationWarning, - stacklevel=2, -) -if not TYPE_CHECKING: - from stripe._webhook_endpoint import ( # noqa - WebhookEndpoint, - ) diff --git a/stripe/api_version.py b/stripe/api_version.py deleted file mode 100644 index e1ca60748..000000000 --- a/stripe/api_version.py +++ /dev/null @@ -1,15 +0,0 @@ -# -*- coding: utf-8 -*- -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_version package is deprecated and will become internal in the future. - """, - DeprecationWarning, -) - -if not TYPE_CHECKING: - from stripe._api_version import ( # noqa - _ApiVersion, - ) diff --git a/stripe/app_info.py b/stripe/app_info.py deleted file mode 100644 index b4be7cadc..000000000 --- a/stripe/app_info.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -""" -The stripe.app_info package is deprecated, please change your -imports to import from stripe directly. -From: - from stripe.app_info import AppInfo -To: - from stripe import AppInfo -""" - -from typing_extensions import TYPE_CHECKING - -# No deprecation warning is raised here, because it would happen -# on every import of `stripe/__init__.py` otherwise. Since that -# module declares its own `app_info` name, this module becomes -# practically impossible to import anyway. - -if not TYPE_CHECKING: - from stripe._app_info import ( # noqa - AppInfo, - ) diff --git a/stripe/apps/_secret.py b/stripe/apps/_secret.py index f79259ba8..9ff3f402a 100644 --- a/stripe/apps/_secret.py +++ b/stripe/apps/_secret.py @@ -3,10 +3,17 @@ from stripe._createable_api_resource import CreateableAPIResource from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource -from stripe._request_options import RequestOptions from stripe._stripe_object import StripeObject -from typing import ClassVar, List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict, Unpack +from typing import ClassVar, Optional, cast +from typing_extensions import Literal, Unpack, TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params.apps._secret_create_params import SecretCreateParams + from stripe.params.apps._secret_delete_where_params import ( + SecretDeleteWhereParams, + ) + from stripe.params.apps._secret_find_params import SecretFindParams + from stripe.params.apps._secret_list_params import SecretListParams class Secret(CreateableAPIResource["Secret"], ListableAPIResource["Secret"]): @@ -34,118 +41,6 @@ class Scope(StripeObject): The user ID, if type is set to "user" """ - class CreateParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - expires_at: NotRequired[int] - """ - The Unix timestamp for the expiry time of the secret, after which the secret deletes. - """ - name: str - """ - A name for the secret that's unique within the scope. - """ - payload: str - """ - The plaintext secret value to be stored. - """ - scope: "Secret.CreateParamsScope" - """ - Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user. - """ - - class CreateParamsScope(TypedDict): - type: Literal["account", "user"] - """ - The secret scope type. - """ - user: NotRequired[str] - """ - The user ID. This field is required if `type` is set to `user`, and should not be provided if `type` is set to `account`. - """ - - class DeleteWhereParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - name: str - """ - A name for the secret that's unique within the scope. - """ - scope: "Secret.DeleteWhereParamsScope" - """ - Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user. - """ - - class DeleteWhereParamsScope(TypedDict): - type: Literal["account", "user"] - """ - The secret scope type. - """ - user: NotRequired[str] - """ - The user ID. This field is required if `type` is set to `user`, and should not be provided if `type` is set to `account`. - """ - - class FindParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - name: str - """ - A name for the secret that's unique within the scope. - """ - scope: "Secret.FindParamsScope" - """ - Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user. - """ - - class FindParamsScope(TypedDict): - type: Literal["account", "user"] - """ - The secret scope type. - """ - user: NotRequired[str] - """ - The user ID. This field is required if `type` is set to `user`, and should not be provided if `type` is set to `account`. - """ - - class ListParams(RequestOptions): - 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. - """ - scope: "Secret.ListParamsScope" - """ - Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user. - """ - 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 ListParamsScope(TypedDict): - type: Literal["account", "user"] - """ - The secret scope type. - """ - user: NotRequired[str] - """ - The user ID. This field is required if `type` is set to `user`, and should not be provided if `type` is set to `account`. - """ - created: int """ Time at which the object was created. Measured in seconds since the Unix epoch. @@ -181,7 +76,7 @@ class ListParamsScope(TypedDict): scope: Scope @classmethod - def create(cls, **params: Unpack["Secret.CreateParams"]) -> "Secret": + def create(cls, **params: Unpack["SecretCreateParams"]) -> "Secret": """ Create or replace a secret in the secret store. """ @@ -196,7 +91,7 @@ def create(cls, **params: Unpack["Secret.CreateParams"]) -> "Secret": @classmethod async def create_async( - cls, **params: Unpack["Secret.CreateParams"] + cls, **params: Unpack["SecretCreateParams"] ) -> "Secret": """ Create or replace a secret in the secret store. @@ -212,7 +107,7 @@ async def create_async( @classmethod def delete_where( - cls, **params: Unpack["Secret.DeleteWhereParams"] + cls, **params: Unpack["SecretDeleteWhereParams"] ) -> "Secret": """ Deletes a secret from the secret store by name and scope. @@ -228,7 +123,7 @@ def delete_where( @classmethod async def delete_where_async( - cls, **params: Unpack["Secret.DeleteWhereParams"] + cls, **params: Unpack["SecretDeleteWhereParams"] ) -> "Secret": """ Deletes a secret from the secret store by name and scope. @@ -243,7 +138,7 @@ async def delete_where_async( ) @classmethod - def find(cls, **params: Unpack["Secret.FindParams"]) -> "Secret": + def find(cls, **params: Unpack["SecretFindParams"]) -> "Secret": """ Finds a secret in the secret store by name and scope. """ @@ -258,7 +153,7 @@ def find(cls, **params: Unpack["Secret.FindParams"]) -> "Secret": @classmethod async def find_async( - cls, **params: Unpack["Secret.FindParams"] + cls, **params: Unpack["SecretFindParams"] ) -> "Secret": """ Finds a secret in the secret store by name and scope. @@ -274,7 +169,7 @@ async def find_async( @classmethod def list( - cls, **params: Unpack["Secret.ListParams"] + cls, **params: Unpack["SecretListParams"] ) -> ListObject["Secret"]: """ List all secrets stored on the given scope. @@ -294,7 +189,7 @@ def list( @classmethod async def list_async( - cls, **params: Unpack["Secret.ListParams"] + cls, **params: Unpack["SecretListParams"] ) -> ListObject["Secret"]: """ List all secrets stored on the given scope. diff --git a/stripe/apps/_secret_service.py b/stripe/apps/_secret_service.py index 385eb66f1..0bc15330e 100644 --- a/stripe/apps/_secret_service.py +++ b/stripe/apps/_secret_service.py @@ -4,126 +4,22 @@ from stripe._request_options import RequestOptions from stripe._stripe_service import StripeService from stripe.apps._secret import Secret -from typing import List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params.apps._secret_create_params import SecretCreateParams + from stripe.params.apps._secret_delete_where_params import ( + SecretDeleteWhereParams, + ) + from stripe.params.apps._secret_find_params import SecretFindParams + from stripe.params.apps._secret_list_params import SecretListParams -class SecretService(StripeService): - class CreateParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - expires_at: NotRequired[int] - """ - The Unix timestamp for the expiry time of the secret, after which the secret deletes. - """ - name: str - """ - A name for the secret that's unique within the scope. - """ - payload: str - """ - The plaintext secret value to be stored. - """ - scope: "SecretService.CreateParamsScope" - """ - Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user. - """ - - class CreateParamsScope(TypedDict): - type: Literal["account", "user"] - """ - The secret scope type. - """ - user: NotRequired[str] - """ - The user ID. This field is required if `type` is set to `user`, and should not be provided if `type` is set to `account`. - """ - - class DeleteWhereParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - name: str - """ - A name for the secret that's unique within the scope. - """ - scope: "SecretService.DeleteWhereParamsScope" - """ - Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user. - """ - - class DeleteWhereParamsScope(TypedDict): - type: Literal["account", "user"] - """ - The secret scope type. - """ - user: NotRequired[str] - """ - The user ID. This field is required if `type` is set to `user`, and should not be provided if `type` is set to `account`. - """ - - class FindParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - name: str - """ - A name for the secret that's unique within the scope. - """ - scope: "SecretService.FindParamsScope" - """ - Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user. - """ - - class FindParamsScope(TypedDict): - type: Literal["account", "user"] - """ - The secret scope type. - """ - user: NotRequired[str] - """ - The user ID. This field is required if `type` is set to `user`, and should not be provided if `type` is set to `account`. - """ - - class ListParams(TypedDict): - 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. - """ - scope: "SecretService.ListParamsScope" - """ - Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user. - """ - 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 ListParamsScope(TypedDict): - type: Literal["account", "user"] - """ - The secret scope type. - """ - user: NotRequired[str] - """ - The user ID. This field is required if `type` is set to `user`, and should not be provided if `type` is set to `account`. - """ +class SecretService(StripeService): def list( self, - params: "SecretService.ListParams", + params: "SecretListParams", options: Optional[RequestOptions] = None, ) -> ListObject[Secret]: """ @@ -142,7 +38,7 @@ def list( async def list_async( self, - params: "SecretService.ListParams", + params: "SecretListParams", options: Optional[RequestOptions] = None, ) -> ListObject[Secret]: """ @@ -161,7 +57,7 @@ async def list_async( def create( self, - params: "SecretService.CreateParams", + params: "SecretCreateParams", options: Optional[RequestOptions] = None, ) -> Secret: """ @@ -180,7 +76,7 @@ def create( async def create_async( self, - params: "SecretService.CreateParams", + params: "SecretCreateParams", options: Optional[RequestOptions] = None, ) -> Secret: """ @@ -199,7 +95,7 @@ async def create_async( def find( self, - params: "SecretService.FindParams", + params: "SecretFindParams", options: Optional[RequestOptions] = None, ) -> Secret: """ @@ -218,7 +114,7 @@ def find( async def find_async( self, - params: "SecretService.FindParams", + params: "SecretFindParams", options: Optional[RequestOptions] = None, ) -> Secret: """ @@ -237,7 +133,7 @@ async def find_async( def delete_where( self, - params: "SecretService.DeleteWhereParams", + params: "SecretDeleteWhereParams", options: Optional[RequestOptions] = None, ) -> Secret: """ @@ -256,7 +152,7 @@ def delete_where( async def delete_where_async( self, - params: "SecretService.DeleteWhereParams", + params: "SecretDeleteWhereParams", options: Optional[RequestOptions] = None, ) -> Secret: """ diff --git a/stripe/billing/_alert.py b/stripe/billing/_alert.py index e93fe8cdb..8a2601471 100644 --- a/stripe/billing/_alert.py +++ b/stripe/billing/_alert.py @@ -4,21 +4,26 @@ from stripe._expandable_field import ExpandableField from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource -from stripe._request_options import RequestOptions from stripe._stripe_object import StripeObject from stripe._util import class_method_variant, sanitize_id from typing import ClassVar, Dict, List, Optional, cast, overload -from typing_extensions import ( - Literal, - NotRequired, - TypedDict, - Unpack, - TYPE_CHECKING, -) +from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: from stripe._customer import Customer from stripe.billing._meter import Meter + from stripe.params.billing._alert_activate_params import ( + AlertActivateParams, + ) + from stripe.params.billing._alert_archive_params import AlertArchiveParams + from stripe.params.billing._alert_create_params import AlertCreateParams + from stripe.params.billing._alert_deactivate_params import ( + AlertDeactivateParams, + ) + from stripe.params.billing._alert_list_params import AlertListParams + from stripe.params.billing._alert_retrieve_params import ( + AlertRetrieveParams, + ) class Alert(CreateableAPIResource["Alert"], ListableAPIResource["Alert"]): @@ -140,234 +145,6 @@ class Filter(StripeObject): """ _inner_class_types = {"filters": Filter} - class ActivateParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class ArchiveParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class CreateParams(RequestOptions): - alert_type: Literal["credit_balance_threshold", "usage_threshold"] - """ - The type of alert to create. - """ - credit_balance_threshold: NotRequired[ - "Alert.CreateParamsCreditBalanceThreshold" - ] - """ - The configuration of the credit balance threshold. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - title: str - """ - The title of the alert. - """ - usage_threshold: NotRequired["Alert.CreateParamsUsageThreshold"] - """ - The configuration of the usage threshold. - """ - - class CreateParamsCreditBalanceThreshold(TypedDict): - filters: NotRequired[ - List["Alert.CreateParamsCreditBalanceThresholdFilter"] - ] - """ - The filters allows limiting the scope of this credit balance alert. You must specify a customer filter at this time. - """ - lte: "Alert.CreateParamsCreditBalanceThresholdLte" - """ - Defines at which value the alert will fire. - """ - - class CreateParamsCreditBalanceThresholdFilter(TypedDict): - credit_grants: NotRequired[ - "Alert.CreateParamsCreditBalanceThresholdFilterCreditGrants" - ] - """ - The credit grants for which to configure the credit balance alert. - """ - customer: NotRequired[str] - """ - Limit the scope to this credit balance alert only to this customer. - """ - type: Literal["customer", "tenant"] - """ - What type of filter is being applied to this credit balance alert. - """ - - class CreateParamsCreditBalanceThresholdFilterCreditGrants(TypedDict): - applicability_config: "Alert.CreateParamsCreditBalanceThresholdFilterCreditGrantsApplicabilityConfig" - """ - The applicability configuration for this credit grants filter. - """ - - class CreateParamsCreditBalanceThresholdFilterCreditGrantsApplicabilityConfig( - TypedDict, - ): - scope: "Alert.CreateParamsCreditBalanceThresholdFilterCreditGrantsApplicabilityConfigScope" - """ - Specify the scope of this applicability config. - """ - - class CreateParamsCreditBalanceThresholdFilterCreditGrantsApplicabilityConfigScope( - TypedDict, - ): - billable_items: NotRequired[ - List[ - "Alert.CreateParamsCreditBalanceThresholdFilterCreditGrantsApplicabilityConfigScopeBillableItem" - ] - ] - """ - A list of billable items that the credit grant can apply to. We currently only support metered billable items. Cannot be used in combination with `price_type` or `prices`. - """ - price_type: NotRequired[Literal["metered"]] - """ - The price type that credit grants can apply to. We currently only support the `metered` price type. Cannot be used in combination with `prices`. - """ - prices: NotRequired[ - List[ - "Alert.CreateParamsCreditBalanceThresholdFilterCreditGrantsApplicabilityConfigScopePrice" - ] - ] - """ - A list of prices that the credit grant can apply to. We currently only support the `metered` prices. Cannot be used in combination with `price_type`. - """ - - class CreateParamsCreditBalanceThresholdFilterCreditGrantsApplicabilityConfigScopeBillableItem( - TypedDict, - ): - id: str - """ - The billable item ID this credit grant should apply to. - """ - - class CreateParamsCreditBalanceThresholdFilterCreditGrantsApplicabilityConfigScopePrice( - TypedDict, - ): - id: str - """ - The price ID this credit grant should apply to. - """ - - class CreateParamsCreditBalanceThresholdLte(TypedDict): - balance_type: Literal["custom_pricing_unit", "monetary"] - """ - Specify the type of this balance. We currently only support `monetary` billing credits. - """ - custom_pricing_unit: NotRequired[ - "Alert.CreateParamsCreditBalanceThresholdLteCustomPricingUnit" - ] - """ - The custom pricing unit amount. - """ - monetary: NotRequired[ - "Alert.CreateParamsCreditBalanceThresholdLteMonetary" - ] - """ - The monetary amount. - """ - - class CreateParamsCreditBalanceThresholdLteCustomPricingUnit(TypedDict): - id: str - """ - The ID of the custom pricing unit. - """ - value: str - """ - A positive decimal string representing the amount of the custom pricing unit threshold. - """ - - class CreateParamsCreditBalanceThresholdLteMonetary(TypedDict): - currency: str - """ - Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) of the `value` parameter. - """ - value: int - """ - An integer representing the amount of the threshold. - """ - - class CreateParamsUsageThreshold(TypedDict): - filters: NotRequired[List["Alert.CreateParamsUsageThresholdFilter"]] - """ - The filters allows limiting the scope of this usage alert. You can only specify up to one filter at this time. - """ - gte: int - """ - Defines at which value the alert will fire. - """ - meter: str - """ - The [Billing Meter](https://docs.stripe.com/api/billing/meter) ID whose usage is monitored. - """ - recurrence: Literal["one_time"] - """ - Defines how the alert will behave. - """ - - class CreateParamsUsageThresholdFilter(TypedDict): - customer: NotRequired[str] - """ - Limit the scope to this usage alert only to this customer. - """ - type: Literal["customer"] - """ - What type of filter is being applied to this usage alert. - """ - - class DeactivateParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class ListParams(RequestOptions): - alert_type: NotRequired[ - Literal["credit_balance_threshold", "usage_threshold"] - ] - """ - Filter results to only include this type of alert. - """ - customer: NotRequired[str] - """ - Filter results to only include alerts for the given customer. - """ - 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. - """ - meter: NotRequired[str] - """ - Filter results to only include alerts with the given meter. - """ - 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 RetrieveParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - alert_type: Literal["credit_balance_threshold", "usage_threshold"] """ Defines the type of the alert. @@ -403,7 +180,7 @@ class RetrieveParams(RequestOptions): @classmethod def _cls_activate( - cls, id: str, **params: Unpack["Alert.ActivateParams"] + cls, id: str, **params: Unpack["AlertActivateParams"] ) -> "Alert": """ Reactivates this alert, allowing it to trigger again. @@ -419,14 +196,14 @@ def _cls_activate( @overload @staticmethod - def activate(id: str, **params: Unpack["Alert.ActivateParams"]) -> "Alert": + def activate(id: str, **params: Unpack["AlertActivateParams"]) -> "Alert": """ Reactivates this alert, allowing it to trigger again. """ ... @overload - def activate(self, **params: Unpack["Alert.ActivateParams"]) -> "Alert": + def activate(self, **params: Unpack["AlertActivateParams"]) -> "Alert": """ Reactivates this alert, allowing it to trigger again. """ @@ -434,7 +211,7 @@ def activate(self, **params: Unpack["Alert.ActivateParams"]) -> "Alert": @class_method_variant("_cls_activate") def activate( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Alert.ActivateParams"] + self, **params: Unpack["AlertActivateParams"] ) -> "Alert": """ Reactivates this alert, allowing it to trigger again. @@ -452,7 +229,7 @@ def activate( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_activate_async( - cls, id: str, **params: Unpack["Alert.ActivateParams"] + cls, id: str, **params: Unpack["AlertActivateParams"] ) -> "Alert": """ Reactivates this alert, allowing it to trigger again. @@ -469,7 +246,7 @@ async def _cls_activate_async( @overload @staticmethod async def activate_async( - id: str, **params: Unpack["Alert.ActivateParams"] + id: str, **params: Unpack["AlertActivateParams"] ) -> "Alert": """ Reactivates this alert, allowing it to trigger again. @@ -478,7 +255,7 @@ async def activate_async( @overload async def activate_async( - self, **params: Unpack["Alert.ActivateParams"] + self, **params: Unpack["AlertActivateParams"] ) -> "Alert": """ Reactivates this alert, allowing it to trigger again. @@ -487,7 +264,7 @@ async def activate_async( @class_method_variant("_cls_activate_async") async def activate_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Alert.ActivateParams"] + self, **params: Unpack["AlertActivateParams"] ) -> "Alert": """ Reactivates this alert, allowing it to trigger again. @@ -505,7 +282,7 @@ async def activate_async( # pyright: ignore[reportGeneralTypeIssues] @classmethod def _cls_archive( - cls, id: str, **params: Unpack["Alert.ArchiveParams"] + cls, id: str, **params: Unpack["AlertArchiveParams"] ) -> "Alert": """ Archives this alert, removing it from the list view and APIs. This is non-reversible. @@ -521,14 +298,14 @@ def _cls_archive( @overload @staticmethod - def archive(id: str, **params: Unpack["Alert.ArchiveParams"]) -> "Alert": + def archive(id: str, **params: Unpack["AlertArchiveParams"]) -> "Alert": """ Archives this alert, removing it from the list view and APIs. This is non-reversible. """ ... @overload - def archive(self, **params: Unpack["Alert.ArchiveParams"]) -> "Alert": + def archive(self, **params: Unpack["AlertArchiveParams"]) -> "Alert": """ Archives this alert, removing it from the list view and APIs. This is non-reversible. """ @@ -536,7 +313,7 @@ def archive(self, **params: Unpack["Alert.ArchiveParams"]) -> "Alert": @class_method_variant("_cls_archive") def archive( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Alert.ArchiveParams"] + self, **params: Unpack["AlertArchiveParams"] ) -> "Alert": """ Archives this alert, removing it from the list view and APIs. This is non-reversible. @@ -554,7 +331,7 @@ def archive( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_archive_async( - cls, id: str, **params: Unpack["Alert.ArchiveParams"] + cls, id: str, **params: Unpack["AlertArchiveParams"] ) -> "Alert": """ Archives this alert, removing it from the list view and APIs. This is non-reversible. @@ -571,7 +348,7 @@ async def _cls_archive_async( @overload @staticmethod async def archive_async( - id: str, **params: Unpack["Alert.ArchiveParams"] + id: str, **params: Unpack["AlertArchiveParams"] ) -> "Alert": """ Archives this alert, removing it from the list view and APIs. This is non-reversible. @@ -580,7 +357,7 @@ async def archive_async( @overload async def archive_async( - self, **params: Unpack["Alert.ArchiveParams"] + self, **params: Unpack["AlertArchiveParams"] ) -> "Alert": """ Archives this alert, removing it from the list view and APIs. This is non-reversible. @@ -589,7 +366,7 @@ async def archive_async( @class_method_variant("_cls_archive_async") async def archive_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Alert.ArchiveParams"] + self, **params: Unpack["AlertArchiveParams"] ) -> "Alert": """ Archives this alert, removing it from the list view and APIs. This is non-reversible. @@ -606,7 +383,7 @@ async def archive_async( # pyright: ignore[reportGeneralTypeIssues] ) @classmethod - def create(cls, **params: Unpack["Alert.CreateParams"]) -> "Alert": + def create(cls, **params: Unpack["AlertCreateParams"]) -> "Alert": """ Creates a billing alert """ @@ -621,7 +398,7 @@ def create(cls, **params: Unpack["Alert.CreateParams"]) -> "Alert": @classmethod async def create_async( - cls, **params: Unpack["Alert.CreateParams"] + cls, **params: Unpack["AlertCreateParams"] ) -> "Alert": """ Creates a billing alert @@ -637,7 +414,7 @@ async def create_async( @classmethod def _cls_deactivate( - cls, id: str, **params: Unpack["Alert.DeactivateParams"] + cls, id: str, **params: Unpack["AlertDeactivateParams"] ) -> "Alert": """ Deactivates this alert, preventing it from triggering. @@ -656,7 +433,7 @@ def _cls_deactivate( @overload @staticmethod def deactivate( - id: str, **params: Unpack["Alert.DeactivateParams"] + id: str, **params: Unpack["AlertDeactivateParams"] ) -> "Alert": """ Deactivates this alert, preventing it from triggering. @@ -664,9 +441,7 @@ def deactivate( ... @overload - def deactivate( - self, **params: Unpack["Alert.DeactivateParams"] - ) -> "Alert": + def deactivate(self, **params: Unpack["AlertDeactivateParams"]) -> "Alert": """ Deactivates this alert, preventing it from triggering. """ @@ -674,7 +449,7 @@ def deactivate( @class_method_variant("_cls_deactivate") def deactivate( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Alert.DeactivateParams"] + self, **params: Unpack["AlertDeactivateParams"] ) -> "Alert": """ Deactivates this alert, preventing it from triggering. @@ -692,7 +467,7 @@ def deactivate( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_deactivate_async( - cls, id: str, **params: Unpack["Alert.DeactivateParams"] + cls, id: str, **params: Unpack["AlertDeactivateParams"] ) -> "Alert": """ Deactivates this alert, preventing it from triggering. @@ -711,7 +486,7 @@ async def _cls_deactivate_async( @overload @staticmethod async def deactivate_async( - id: str, **params: Unpack["Alert.DeactivateParams"] + id: str, **params: Unpack["AlertDeactivateParams"] ) -> "Alert": """ Deactivates this alert, preventing it from triggering. @@ -720,7 +495,7 @@ async def deactivate_async( @overload async def deactivate_async( - self, **params: Unpack["Alert.DeactivateParams"] + self, **params: Unpack["AlertDeactivateParams"] ) -> "Alert": """ Deactivates this alert, preventing it from triggering. @@ -729,7 +504,7 @@ async def deactivate_async( @class_method_variant("_cls_deactivate_async") async def deactivate_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Alert.DeactivateParams"] + self, **params: Unpack["AlertDeactivateParams"] ) -> "Alert": """ Deactivates this alert, preventing it from triggering. @@ -746,7 +521,7 @@ async def deactivate_async( # pyright: ignore[reportGeneralTypeIssues] ) @classmethod - def list(cls, **params: Unpack["Alert.ListParams"]) -> ListObject["Alert"]: + def list(cls, **params: Unpack["AlertListParams"]) -> ListObject["Alert"]: """ Lists billing active and inactive alerts """ @@ -765,7 +540,7 @@ def list(cls, **params: Unpack["Alert.ListParams"]) -> ListObject["Alert"]: @classmethod async def list_async( - cls, **params: Unpack["Alert.ListParams"] + cls, **params: Unpack["AlertListParams"] ) -> ListObject["Alert"]: """ Lists billing active and inactive alerts @@ -785,7 +560,7 @@ async def list_async( @classmethod def retrieve( - cls, id: str, **params: Unpack["Alert.RetrieveParams"] + cls, id: str, **params: Unpack["AlertRetrieveParams"] ) -> "Alert": """ Retrieves a billing alert given an ID @@ -796,7 +571,7 @@ def retrieve( @classmethod async def retrieve_async( - cls, id: str, **params: Unpack["Alert.RetrieveParams"] + cls, id: str, **params: Unpack["AlertRetrieveParams"] ) -> "Alert": """ Retrieves a billing alert given an ID diff --git a/stripe/billing/_alert_service.py b/stripe/billing/_alert_service.py index 448274572..5abb8a18c 100644 --- a/stripe/billing/_alert_service.py +++ b/stripe/billing/_alert_service.py @@ -5,244 +5,28 @@ from stripe._stripe_service import StripeService from stripe._util import sanitize_id from stripe.billing._alert import Alert -from typing import List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params.billing._alert_activate_params import ( + AlertActivateParams, + ) + from stripe.params.billing._alert_archive_params import AlertArchiveParams + from stripe.params.billing._alert_create_params import AlertCreateParams + from stripe.params.billing._alert_deactivate_params import ( + AlertDeactivateParams, + ) + from stripe.params.billing._alert_list_params import AlertListParams + from stripe.params.billing._alert_retrieve_params import ( + AlertRetrieveParams, + ) -class AlertService(StripeService): - class ActivateParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class ArchiveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class CreateParams(TypedDict): - alert_type: Literal["credit_balance_threshold", "usage_threshold"] - """ - The type of alert to create. - """ - credit_balance_threshold: NotRequired[ - "AlertService.CreateParamsCreditBalanceThreshold" - ] - """ - The configuration of the credit balance threshold. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - title: str - """ - The title of the alert. - """ - usage_threshold: NotRequired["AlertService.CreateParamsUsageThreshold"] - """ - The configuration of the usage threshold. - """ - - class CreateParamsCreditBalanceThreshold(TypedDict): - filters: NotRequired[ - List["AlertService.CreateParamsCreditBalanceThresholdFilter"] - ] - """ - The filters allows limiting the scope of this credit balance alert. You must specify a customer filter at this time. - """ - lte: "AlertService.CreateParamsCreditBalanceThresholdLte" - """ - Defines at which value the alert will fire. - """ - - class CreateParamsCreditBalanceThresholdFilter(TypedDict): - credit_grants: NotRequired[ - "AlertService.CreateParamsCreditBalanceThresholdFilterCreditGrants" - ] - """ - The credit grants for which to configure the credit balance alert. - """ - customer: NotRequired[str] - """ - Limit the scope to this credit balance alert only to this customer. - """ - type: Literal["customer", "tenant"] - """ - What type of filter is being applied to this credit balance alert. - """ - - class CreateParamsCreditBalanceThresholdFilterCreditGrants(TypedDict): - applicability_config: "AlertService.CreateParamsCreditBalanceThresholdFilterCreditGrantsApplicabilityConfig" - """ - The applicability configuration for this credit grants filter. - """ - - class CreateParamsCreditBalanceThresholdFilterCreditGrantsApplicabilityConfig( - TypedDict, - ): - scope: "AlertService.CreateParamsCreditBalanceThresholdFilterCreditGrantsApplicabilityConfigScope" - """ - Specify the scope of this applicability config. - """ - - class CreateParamsCreditBalanceThresholdFilterCreditGrantsApplicabilityConfigScope( - TypedDict, - ): - billable_items: NotRequired[ - List[ - "AlertService.CreateParamsCreditBalanceThresholdFilterCreditGrantsApplicabilityConfigScopeBillableItem" - ] - ] - """ - A list of billable items that the credit grant can apply to. We currently only support metered billable items. Cannot be used in combination with `price_type` or `prices`. - """ - price_type: NotRequired[Literal["metered"]] - """ - The price type that credit grants can apply to. We currently only support the `metered` price type. Cannot be used in combination with `prices`. - """ - prices: NotRequired[ - List[ - "AlertService.CreateParamsCreditBalanceThresholdFilterCreditGrantsApplicabilityConfigScopePrice" - ] - ] - """ - A list of prices that the credit grant can apply to. We currently only support the `metered` prices. Cannot be used in combination with `price_type`. - """ - - class CreateParamsCreditBalanceThresholdFilterCreditGrantsApplicabilityConfigScopeBillableItem( - TypedDict, - ): - id: str - """ - The billable item ID this credit grant should apply to. - """ - - class CreateParamsCreditBalanceThresholdFilterCreditGrantsApplicabilityConfigScopePrice( - TypedDict, - ): - id: str - """ - The price ID this credit grant should apply to. - """ - - class CreateParamsCreditBalanceThresholdLte(TypedDict): - balance_type: Literal["custom_pricing_unit", "monetary"] - """ - Specify the type of this balance. We currently only support `monetary` billing credits. - """ - custom_pricing_unit: NotRequired[ - "AlertService.CreateParamsCreditBalanceThresholdLteCustomPricingUnit" - ] - """ - The custom pricing unit amount. - """ - monetary: NotRequired[ - "AlertService.CreateParamsCreditBalanceThresholdLteMonetary" - ] - """ - The monetary amount. - """ - - class CreateParamsCreditBalanceThresholdLteCustomPricingUnit(TypedDict): - id: str - """ - The ID of the custom pricing unit. - """ - value: str - """ - A positive decimal string representing the amount of the custom pricing unit threshold. - """ - - class CreateParamsCreditBalanceThresholdLteMonetary(TypedDict): - currency: str - """ - Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) of the `value` parameter. - """ - value: int - """ - An integer representing the amount of the threshold. - """ - - class CreateParamsUsageThreshold(TypedDict): - filters: NotRequired[ - List["AlertService.CreateParamsUsageThresholdFilter"] - ] - """ - The filters allows limiting the scope of this usage alert. You can only specify up to one filter at this time. - """ - gte: int - """ - Defines at which value the alert will fire. - """ - meter: str - """ - The [Billing Meter](https://docs.stripe.com/api/billing/meter) ID whose usage is monitored. - """ - recurrence: Literal["one_time"] - """ - Defines how the alert will behave. - """ - - class CreateParamsUsageThresholdFilter(TypedDict): - customer: NotRequired[str] - """ - Limit the scope to this usage alert only to this customer. - """ - type: Literal["customer"] - """ - What type of filter is being applied to this usage alert. - """ - - class DeactivateParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class ListParams(TypedDict): - alert_type: NotRequired[ - Literal["credit_balance_threshold", "usage_threshold"] - ] - """ - Filter results to only include this type of alert. - """ - customer: NotRequired[str] - """ - Filter results to only include alerts for the given customer. - """ - 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. - """ - meter: NotRequired[str] - """ - Filter results to only include alerts with the given meter. - """ - 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 RetrieveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ +class AlertService(StripeService): def list( self, - params: Optional["AlertService.ListParams"] = None, + params: Optional["AlertListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[Alert]: """ @@ -261,7 +45,7 @@ def list( async def list_async( self, - params: Optional["AlertService.ListParams"] = None, + params: Optional["AlertListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[Alert]: """ @@ -280,7 +64,7 @@ async def list_async( def create( self, - params: "AlertService.CreateParams", + params: "AlertCreateParams", options: Optional[RequestOptions] = None, ) -> Alert: """ @@ -299,7 +83,7 @@ def create( async def create_async( self, - params: "AlertService.CreateParams", + params: "AlertCreateParams", options: Optional[RequestOptions] = None, ) -> Alert: """ @@ -319,7 +103,7 @@ async def create_async( def retrieve( self, id: str, - params: Optional["AlertService.RetrieveParams"] = None, + params: Optional["AlertRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Alert: """ @@ -339,7 +123,7 @@ def retrieve( async def retrieve_async( self, id: str, - params: Optional["AlertService.RetrieveParams"] = None, + params: Optional["AlertRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Alert: """ @@ -359,7 +143,7 @@ async def retrieve_async( def activate( self, id: str, - params: Optional["AlertService.ActivateParams"] = None, + params: Optional["AlertActivateParams"] = None, options: Optional[RequestOptions] = None, ) -> Alert: """ @@ -379,7 +163,7 @@ def activate( async def activate_async( self, id: str, - params: Optional["AlertService.ActivateParams"] = None, + params: Optional["AlertActivateParams"] = None, options: Optional[RequestOptions] = None, ) -> Alert: """ @@ -399,7 +183,7 @@ async def activate_async( def archive( self, id: str, - params: Optional["AlertService.ArchiveParams"] = None, + params: Optional["AlertArchiveParams"] = None, options: Optional[RequestOptions] = None, ) -> Alert: """ @@ -419,7 +203,7 @@ def archive( async def archive_async( self, id: str, - params: Optional["AlertService.ArchiveParams"] = None, + params: Optional["AlertArchiveParams"] = None, options: Optional[RequestOptions] = None, ) -> Alert: """ @@ -439,7 +223,7 @@ async def archive_async( def deactivate( self, id: str, - params: Optional["AlertService.DeactivateParams"] = None, + params: Optional["AlertDeactivateParams"] = None, options: Optional[RequestOptions] = None, ) -> Alert: """ @@ -461,7 +245,7 @@ def deactivate( async def deactivate_async( self, id: str, - params: Optional["AlertService.DeactivateParams"] = None, + params: Optional["AlertDeactivateParams"] = None, options: Optional[RequestOptions] = None, ) -> Alert: """ diff --git a/stripe/billing/_credit_balance_summary.py b/stripe/billing/_credit_balance_summary.py index 346e50b61..9edffdc17 100644 --- a/stripe/billing/_credit_balance_summary.py +++ b/stripe/billing/_credit_balance_summary.py @@ -1,20 +1,16 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._expandable_field import ExpandableField -from stripe._request_options import RequestOptions from stripe._singleton_api_resource import SingletonAPIResource from stripe._stripe_object import StripeObject from typing import ClassVar, Dict, List, Optional -from typing_extensions import ( - Literal, - NotRequired, - TypedDict, - Unpack, - TYPE_CHECKING, -) +from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: from stripe._customer import Customer + from stripe.params.billing._credit_balance_summary_retrieve_params import ( + CreditBalanceSummaryRetrieveParams, + ) class CreditBalanceSummary(SingletonAPIResource["CreditBalanceSummary"]): @@ -176,74 +172,6 @@ class Monetary(StripeObject): "ledger_balance": LedgerBalance, } - class RetrieveParams(RequestOptions): - customer: NotRequired[str] - """ - The customer for which to fetch credit balance summary. - """ - customer_account: NotRequired[str] - """ - The account for which to fetch credit balance summary. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - filter: "CreditBalanceSummary.RetrieveParamsFilter" - """ - The filter criteria for the credit balance summary. - """ - - class RetrieveParamsFilter(TypedDict): - applicability_scope: NotRequired[ - "CreditBalanceSummary.RetrieveParamsFilterApplicabilityScope" - ] - """ - The billing credit applicability scope for which to fetch credit balance summary. - """ - credit_grant: NotRequired[str] - """ - The credit grant for which to fetch credit balance summary. - """ - type: Literal["applicability_scope", "credit_grant"] - """ - Specify the type of this filter. - """ - - class RetrieveParamsFilterApplicabilityScope(TypedDict): - billable_items: NotRequired[ - List[ - "CreditBalanceSummary.RetrieveParamsFilterApplicabilityScopeBillableItem" - ] - ] - """ - A list of billable items that the credit grant can apply to. We currently only support metered billable items. Cannot be used in combination with `price_type` or `prices`. - """ - price_type: NotRequired[Literal["metered"]] - """ - The price type that credit grants can apply to. We currently only support the `metered` price type. Cannot be used in combination with `prices`. - """ - prices: NotRequired[ - List[ - "CreditBalanceSummary.RetrieveParamsFilterApplicabilityScopePrice" - ] - ] - """ - A list of prices that the credit grant can apply to. We currently only support the `metered` prices. Cannot be used in combination with `price_type`. - """ - - class RetrieveParamsFilterApplicabilityScopeBillableItem(TypedDict): - id: str - """ - The billable item ID this credit grant should apply to. - """ - - class RetrieveParamsFilterApplicabilityScopePrice(TypedDict): - id: str - """ - The price ID this credit grant should apply to. - """ - balances: List[Balance] """ The billing credit balances. One entry per credit grant currency. If a customer only has credit grants in a single currency, then this will have a single balance entry. @@ -267,7 +195,7 @@ class RetrieveParamsFilterApplicabilityScopePrice(TypedDict): @classmethod def retrieve( - cls, **params: Unpack["CreditBalanceSummary.RetrieveParams"] + cls, **params: Unpack["CreditBalanceSummaryRetrieveParams"] ) -> "CreditBalanceSummary": """ Retrieves the credit balance summary for a customer. @@ -278,7 +206,7 @@ def retrieve( @classmethod async def retrieve_async( - cls, **params: Unpack["CreditBalanceSummary.RetrieveParams"] + cls, **params: Unpack["CreditBalanceSummaryRetrieveParams"] ) -> "CreditBalanceSummary": """ Retrieves the credit balance summary for a customer. diff --git a/stripe/billing/_credit_balance_summary_service.py b/stripe/billing/_credit_balance_summary_service.py index cec499171..c2862ce42 100644 --- a/stripe/billing/_credit_balance_summary_service.py +++ b/stripe/billing/_credit_balance_summary_service.py @@ -3,82 +3,19 @@ from stripe._request_options import RequestOptions from stripe._stripe_service import StripeService from stripe.billing._credit_balance_summary import CreditBalanceSummary -from typing import List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params.billing._credit_balance_summary_retrieve_params import ( + CreditBalanceSummaryRetrieveParams, + ) -class CreditBalanceSummaryService(StripeService): - class RetrieveParams(TypedDict): - customer: NotRequired[str] - """ - The customer for which to fetch credit balance summary. - """ - customer_account: NotRequired[str] - """ - The account for which to fetch credit balance summary. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - filter: "CreditBalanceSummaryService.RetrieveParamsFilter" - """ - The filter criteria for the credit balance summary. - """ - - class RetrieveParamsFilter(TypedDict): - applicability_scope: NotRequired[ - "CreditBalanceSummaryService.RetrieveParamsFilterApplicabilityScope" - ] - """ - The billing credit applicability scope for which to fetch credit balance summary. - """ - credit_grant: NotRequired[str] - """ - The credit grant for which to fetch credit balance summary. - """ - type: Literal["applicability_scope", "credit_grant"] - """ - Specify the type of this filter. - """ - - class RetrieveParamsFilterApplicabilityScope(TypedDict): - billable_items: NotRequired[ - List[ - "CreditBalanceSummaryService.RetrieveParamsFilterApplicabilityScopeBillableItem" - ] - ] - """ - A list of billable items that the credit grant can apply to. We currently only support metered billable items. Cannot be used in combination with `price_type` or `prices`. - """ - price_type: NotRequired[Literal["metered"]] - """ - The price type that credit grants can apply to. We currently only support the `metered` price type. Cannot be used in combination with `prices`. - """ - prices: NotRequired[ - List[ - "CreditBalanceSummaryService.RetrieveParamsFilterApplicabilityScopePrice" - ] - ] - """ - A list of prices that the credit grant can apply to. We currently only support the `metered` prices. Cannot be used in combination with `price_type`. - """ - - class RetrieveParamsFilterApplicabilityScopeBillableItem(TypedDict): - id: str - """ - The billable item ID this credit grant should apply to. - """ - - class RetrieveParamsFilterApplicabilityScopePrice(TypedDict): - id: str - """ - The price ID this credit grant should apply to. - """ +class CreditBalanceSummaryService(StripeService): def retrieve( self, - params: "CreditBalanceSummaryService.RetrieveParams", + params: "CreditBalanceSummaryRetrieveParams", options: Optional[RequestOptions] = None, ) -> CreditBalanceSummary: """ @@ -97,7 +34,7 @@ def retrieve( async def retrieve_async( self, - params: "CreditBalanceSummaryService.RetrieveParams", + params: "CreditBalanceSummaryRetrieveParams", options: Optional[RequestOptions] = None, ) -> CreditBalanceSummary: """ diff --git a/stripe/billing/_credit_balance_transaction.py b/stripe/billing/_credit_balance_transaction.py index 1ba4c48e9..a28343c1e 100644 --- a/stripe/billing/_credit_balance_transaction.py +++ b/stripe/billing/_credit_balance_transaction.py @@ -3,14 +3,19 @@ from stripe._expandable_field import ExpandableField from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource -from stripe._request_options import RequestOptions from stripe._stripe_object import StripeObject -from typing import ClassVar, Dict, List, Optional -from typing_extensions import Literal, NotRequired, Unpack, TYPE_CHECKING +from typing import ClassVar, Dict, Optional +from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: from stripe._invoice import Invoice from stripe.billing._credit_grant import CreditGrant + from stripe.params.billing._credit_balance_transaction_list_params import ( + CreditBalanceTransactionListParams, + ) + from stripe.params.billing._credit_balance_transaction_retrieve_params import ( + CreditBalanceTransactionRetrieveParams, + ) from stripe.test_helpers._test_clock import TestClock @@ -219,42 +224,6 @@ class CreditsApplied(StripeObject): "credits_applied": CreditsApplied, } - class ListParams(RequestOptions): - credit_grant: NotRequired[str] - """ - The credit grant for which to fetch credit balance transactions. - """ - customer: NotRequired[str] - """ - The customer for which to fetch credit balance transactions. - """ - customer_account: NotRequired[str] - """ - The account for which to fetch credit balance transactions. - """ - 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 RetrieveParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - created: int """ Time at which the object was created. Measured in seconds since the Unix epoch. @@ -298,7 +267,7 @@ class RetrieveParams(RequestOptions): @classmethod def list( - cls, **params: Unpack["CreditBalanceTransaction.ListParams"] + cls, **params: Unpack["CreditBalanceTransactionListParams"] ) -> ListObject["CreditBalanceTransaction"]: """ Retrieve a list of credit balance transactions. @@ -318,7 +287,7 @@ def list( @classmethod async def list_async( - cls, **params: Unpack["CreditBalanceTransaction.ListParams"] + cls, **params: Unpack["CreditBalanceTransactionListParams"] ) -> ListObject["CreditBalanceTransaction"]: """ Retrieve a list of credit balance transactions. @@ -340,7 +309,7 @@ async def list_async( def retrieve( cls, id: str, - **params: Unpack["CreditBalanceTransaction.RetrieveParams"], + **params: Unpack["CreditBalanceTransactionRetrieveParams"], ) -> "CreditBalanceTransaction": """ Retrieves a credit balance transaction. @@ -353,7 +322,7 @@ def retrieve( async def retrieve_async( cls, id: str, - **params: Unpack["CreditBalanceTransaction.RetrieveParams"], + **params: Unpack["CreditBalanceTransactionRetrieveParams"], ) -> "CreditBalanceTransaction": """ Retrieves a credit balance transaction. diff --git a/stripe/billing/_credit_balance_transaction_service.py b/stripe/billing/_credit_balance_transaction_service.py index 36389cf36..16886c34e 100644 --- a/stripe/billing/_credit_balance_transaction_service.py +++ b/stripe/billing/_credit_balance_transaction_service.py @@ -5,50 +5,22 @@ from stripe._stripe_service import StripeService from stripe._util import sanitize_id from stripe.billing._credit_balance_transaction import CreditBalanceTransaction -from typing import List, Optional, cast -from typing_extensions import NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params.billing._credit_balance_transaction_list_params import ( + CreditBalanceTransactionListParams, + ) + from stripe.params.billing._credit_balance_transaction_retrieve_params import ( + CreditBalanceTransactionRetrieveParams, + ) -class CreditBalanceTransactionService(StripeService): - class ListParams(TypedDict): - credit_grant: NotRequired[str] - """ - The credit grant for which to fetch credit balance transactions. - """ - customer: NotRequired[str] - """ - The customer for which to fetch credit balance transactions. - """ - customer_account: NotRequired[str] - """ - The account for which to fetch credit balance transactions. - """ - 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 RetrieveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ +class CreditBalanceTransactionService(StripeService): def list( self, - params: Optional["CreditBalanceTransactionService.ListParams"] = None, + params: Optional["CreditBalanceTransactionListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[CreditBalanceTransaction]: """ @@ -67,7 +39,7 @@ def list( async def list_async( self, - params: Optional["CreditBalanceTransactionService.ListParams"] = None, + params: Optional["CreditBalanceTransactionListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[CreditBalanceTransaction]: """ @@ -87,9 +59,7 @@ async def list_async( def retrieve( self, id: str, - params: Optional[ - "CreditBalanceTransactionService.RetrieveParams" - ] = None, + params: Optional["CreditBalanceTransactionRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> CreditBalanceTransaction: """ @@ -111,9 +81,7 @@ def retrieve( async def retrieve_async( self, id: str, - params: Optional[ - "CreditBalanceTransactionService.RetrieveParams" - ] = None, + params: Optional["CreditBalanceTransactionRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> CreditBalanceTransaction: """ diff --git a/stripe/billing/_credit_grant.py b/stripe/billing/_credit_grant.py index ea01e8a20..8e5f75b9b 100644 --- a/stripe/billing/_credit_grant.py +++ b/stripe/billing/_credit_grant.py @@ -4,21 +4,32 @@ from stripe._expandable_field import ExpandableField from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource -from stripe._request_options import RequestOptions from stripe._stripe_object import StripeObject from stripe._updateable_api_resource import UpdateableAPIResource from stripe._util import class_method_variant, sanitize_id from typing import ClassVar, Dict, List, Optional, cast, overload -from typing_extensions import ( - Literal, - NotRequired, - TypedDict, - Unpack, - TYPE_CHECKING, -) +from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: from stripe._customer import Customer + from stripe.params.billing._credit_grant_create_params import ( + CreditGrantCreateParams, + ) + from stripe.params.billing._credit_grant_expire_params import ( + CreditGrantExpireParams, + ) + from stripe.params.billing._credit_grant_list_params import ( + CreditGrantListParams, + ) + from stripe.params.billing._credit_grant_modify_params import ( + CreditGrantModifyParams, + ) + from stripe.params.billing._credit_grant_retrieve_params import ( + CreditGrantRetrieveParams, + ) + from stripe.params.billing._credit_grant_void_grant_params import ( + CreditGrantVoidGrantParams, + ) from stripe.test_helpers._test_clock import TestClock @@ -142,184 +153,6 @@ class Price(StripeObject): scope: Scope _inner_class_types = {"scope": Scope} - class CreateParams(RequestOptions): - amount: "CreditGrant.CreateParamsAmount" - """ - Amount of this credit grant. - """ - applicability_config: "CreditGrant.CreateParamsApplicabilityConfig" - """ - Configuration specifying what this credit grant applies to. We currently only support `metered` prices that have a [Billing Meter](https://docs.stripe.com/api/billing/meter) attached to them. - """ - category: Literal["paid", "promotional"] - """ - The category of this credit grant. - """ - customer: NotRequired[str] - """ - ID of the customer to receive the billing credits. - """ - customer_account: NotRequired[str] - """ - ID of the account to receive the billing credits. - """ - effective_at: NotRequired[int] - """ - The time when the billing credits become effective-when they're eligible for use. It defaults to the current timestamp if not specified. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - expires_at: NotRequired[int] - """ - The time when the billing credits expire. If not specified, the billing credits don't expire. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of key-value pairs that you can attach to an object. You can use this to store additional information about the object (for example, cost basis) in a structured format. - """ - name: NotRequired[str] - """ - A descriptive name shown in the Dashboard. - """ - priority: NotRequired[int] - """ - The desired priority for applying this credit grant. If not specified, it will be set to the default value of 50. The highest priority is 0 and the lowest is 100. - """ - - class CreateParamsAmount(TypedDict): - custom_pricing_unit: NotRequired[ - "CreditGrant.CreateParamsAmountCustomPricingUnit" - ] - """ - The custom pricing unit amount. - """ - monetary: NotRequired["CreditGrant.CreateParamsAmountMonetary"] - """ - The monetary amount. - """ - type: Literal["custom_pricing_unit", "monetary"] - """ - The type of this amount. We currently only support `monetary` billing credits. - """ - - class CreateParamsAmountCustomPricingUnit(TypedDict): - id: str - """ - The ID of the custom pricing unit. - """ - value: str - """ - A positive integer representing the amount of the credit grant. - """ - - class CreateParamsAmountMonetary(TypedDict): - currency: str - """ - Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) of the `value` parameter. - """ - value: int - """ - A positive integer representing the amount of the credit grant. - """ - - class CreateParamsApplicabilityConfig(TypedDict): - scope: "CreditGrant.CreateParamsApplicabilityConfigScope" - """ - Specify the scope of this applicability config. - """ - - class CreateParamsApplicabilityConfigScope(TypedDict): - billable_items: NotRequired[ - List[ - "CreditGrant.CreateParamsApplicabilityConfigScopeBillableItem" - ] - ] - """ - A list of billable items that the credit grant can apply to. We currently only support metered billable items. Cannot be used in combination with `price_type` or `prices`. - """ - price_type: NotRequired[Literal["metered"]] - """ - The price type that credit grants can apply to. We currently only support the `metered` price type. Cannot be used in combination with `prices`. - """ - prices: NotRequired[ - List["CreditGrant.CreateParamsApplicabilityConfigScopePrice"] - ] - """ - A list of prices that the credit grant can apply to. We currently only support the `metered` prices. Cannot be used in combination with `price_type`. - """ - - class CreateParamsApplicabilityConfigScopeBillableItem(TypedDict): - id: str - """ - The billable item ID this credit grant should apply to. - """ - - class CreateParamsApplicabilityConfigScopePrice(TypedDict): - id: str - """ - The price ID this credit grant should apply to. - """ - - class ExpireParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class ListParams(RequestOptions): - customer: NotRequired[str] - """ - Only return credit grants for this customer. - """ - customer_account: NotRequired[str] - """ - Only return credit grants for this account. - """ - 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 ModifyParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - expires_at: NotRequired["Literal['']|int"] - """ - The time when the billing credits created by this credit grant expire. If set to empty, the billing credits never expire. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of key-value pairs you can attach to an object. You can use this to store additional information about the object (for example, cost basis) in a structured format. - """ - - class RetrieveParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class VoidGrantParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - amount: Amount applicability_config: ApplicabilityConfig category: Literal["paid", "promotional"] @@ -385,7 +218,7 @@ class VoidGrantParams(RequestOptions): @classmethod def create( - cls, **params: Unpack["CreditGrant.CreateParams"] + cls, **params: Unpack["CreditGrantCreateParams"] ) -> "CreditGrant": """ Creates a credit grant. @@ -401,7 +234,7 @@ def create( @classmethod async def create_async( - cls, **params: Unpack["CreditGrant.CreateParams"] + cls, **params: Unpack["CreditGrantCreateParams"] ) -> "CreditGrant": """ Creates a credit grant. @@ -417,7 +250,7 @@ async def create_async( @classmethod def _cls_expire( - cls, id: str, **params: Unpack["CreditGrant.ExpireParams"] + cls, id: str, **params: Unpack["CreditGrantExpireParams"] ) -> "CreditGrant": """ Expires a credit grant. @@ -436,7 +269,7 @@ def _cls_expire( @overload @staticmethod def expire( - id: str, **params: Unpack["CreditGrant.ExpireParams"] + id: str, **params: Unpack["CreditGrantExpireParams"] ) -> "CreditGrant": """ Expires a credit grant. @@ -445,7 +278,7 @@ def expire( @overload def expire( - self, **params: Unpack["CreditGrant.ExpireParams"] + self, **params: Unpack["CreditGrantExpireParams"] ) -> "CreditGrant": """ Expires a credit grant. @@ -454,7 +287,7 @@ def expire( @class_method_variant("_cls_expire") def expire( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["CreditGrant.ExpireParams"] + self, **params: Unpack["CreditGrantExpireParams"] ) -> "CreditGrant": """ Expires a credit grant. @@ -472,7 +305,7 @@ def expire( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_expire_async( - cls, id: str, **params: Unpack["CreditGrant.ExpireParams"] + cls, id: str, **params: Unpack["CreditGrantExpireParams"] ) -> "CreditGrant": """ Expires a credit grant. @@ -491,7 +324,7 @@ async def _cls_expire_async( @overload @staticmethod async def expire_async( - id: str, **params: Unpack["CreditGrant.ExpireParams"] + id: str, **params: Unpack["CreditGrantExpireParams"] ) -> "CreditGrant": """ Expires a credit grant. @@ -500,7 +333,7 @@ async def expire_async( @overload async def expire_async( - self, **params: Unpack["CreditGrant.ExpireParams"] + self, **params: Unpack["CreditGrantExpireParams"] ) -> "CreditGrant": """ Expires a credit grant. @@ -509,7 +342,7 @@ async def expire_async( @class_method_variant("_cls_expire_async") async def expire_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["CreditGrant.ExpireParams"] + self, **params: Unpack["CreditGrantExpireParams"] ) -> "CreditGrant": """ Expires a credit grant. @@ -527,7 +360,7 @@ async def expire_async( # pyright: ignore[reportGeneralTypeIssues] @classmethod def list( - cls, **params: Unpack["CreditGrant.ListParams"] + cls, **params: Unpack["CreditGrantListParams"] ) -> ListObject["CreditGrant"]: """ Retrieve a list of credit grants. @@ -547,7 +380,7 @@ def list( @classmethod async def list_async( - cls, **params: Unpack["CreditGrant.ListParams"] + cls, **params: Unpack["CreditGrantListParams"] ) -> ListObject["CreditGrant"]: """ Retrieve a list of credit grants. @@ -567,7 +400,7 @@ async def list_async( @classmethod def modify( - cls, id: str, **params: Unpack["CreditGrant.ModifyParams"] + cls, id: str, **params: Unpack["CreditGrantModifyParams"] ) -> "CreditGrant": """ Updates a credit grant. @@ -584,7 +417,7 @@ def modify( @classmethod async def modify_async( - cls, id: str, **params: Unpack["CreditGrant.ModifyParams"] + cls, id: str, **params: Unpack["CreditGrantModifyParams"] ) -> "CreditGrant": """ Updates a credit grant. @@ -601,7 +434,7 @@ async def modify_async( @classmethod def retrieve( - cls, id: str, **params: Unpack["CreditGrant.RetrieveParams"] + cls, id: str, **params: Unpack["CreditGrantRetrieveParams"] ) -> "CreditGrant": """ Retrieves a credit grant. @@ -612,7 +445,7 @@ def retrieve( @classmethod async def retrieve_async( - cls, id: str, **params: Unpack["CreditGrant.RetrieveParams"] + cls, id: str, **params: Unpack["CreditGrantRetrieveParams"] ) -> "CreditGrant": """ Retrieves a credit grant. @@ -623,7 +456,7 @@ async def retrieve_async( @classmethod def _cls_void_grant( - cls, id: str, **params: Unpack["CreditGrant.VoidGrantParams"] + cls, id: str, **params: Unpack["CreditGrantVoidGrantParams"] ) -> "CreditGrant": """ Voids a credit grant. @@ -642,7 +475,7 @@ def _cls_void_grant( @overload @staticmethod def void_grant( - id: str, **params: Unpack["CreditGrant.VoidGrantParams"] + id: str, **params: Unpack["CreditGrantVoidGrantParams"] ) -> "CreditGrant": """ Voids a credit grant. @@ -651,7 +484,7 @@ def void_grant( @overload def void_grant( - self, **params: Unpack["CreditGrant.VoidGrantParams"] + self, **params: Unpack["CreditGrantVoidGrantParams"] ) -> "CreditGrant": """ Voids a credit grant. @@ -660,7 +493,7 @@ def void_grant( @class_method_variant("_cls_void_grant") def void_grant( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["CreditGrant.VoidGrantParams"] + self, **params: Unpack["CreditGrantVoidGrantParams"] ) -> "CreditGrant": """ Voids a credit grant. @@ -678,7 +511,7 @@ def void_grant( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_void_grant_async( - cls, id: str, **params: Unpack["CreditGrant.VoidGrantParams"] + cls, id: str, **params: Unpack["CreditGrantVoidGrantParams"] ) -> "CreditGrant": """ Voids a credit grant. @@ -697,7 +530,7 @@ async def _cls_void_grant_async( @overload @staticmethod async def void_grant_async( - id: str, **params: Unpack["CreditGrant.VoidGrantParams"] + id: str, **params: Unpack["CreditGrantVoidGrantParams"] ) -> "CreditGrant": """ Voids a credit grant. @@ -706,7 +539,7 @@ async def void_grant_async( @overload async def void_grant_async( - self, **params: Unpack["CreditGrant.VoidGrantParams"] + self, **params: Unpack["CreditGrantVoidGrantParams"] ) -> "CreditGrant": """ Voids a credit grant. @@ -715,7 +548,7 @@ async def void_grant_async( @class_method_variant("_cls_void_grant_async") async def void_grant_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["CreditGrant.VoidGrantParams"] + self, **params: Unpack["CreditGrantVoidGrantParams"] ) -> "CreditGrant": """ Voids a credit grant. diff --git a/stripe/billing/_credit_grant_service.py b/stripe/billing/_credit_grant_service.py index e02326e18..e4e10239f 100644 --- a/stripe/billing/_credit_grant_service.py +++ b/stripe/billing/_credit_grant_service.py @@ -5,196 +5,34 @@ from stripe._stripe_service import StripeService from stripe._util import sanitize_id from stripe.billing._credit_grant import CreditGrant -from typing import Dict, List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params.billing._credit_grant_create_params import ( + CreditGrantCreateParams, + ) + from stripe.params.billing._credit_grant_expire_params import ( + CreditGrantExpireParams, + ) + from stripe.params.billing._credit_grant_list_params import ( + CreditGrantListParams, + ) + from stripe.params.billing._credit_grant_retrieve_params import ( + CreditGrantRetrieveParams, + ) + from stripe.params.billing._credit_grant_update_params import ( + CreditGrantUpdateParams, + ) + from stripe.params.billing._credit_grant_void_grant_params import ( + CreditGrantVoidGrantParams, + ) -class CreditGrantService(StripeService): - class CreateParams(TypedDict): - amount: "CreditGrantService.CreateParamsAmount" - """ - Amount of this credit grant. - """ - applicability_config: ( - "CreditGrantService.CreateParamsApplicabilityConfig" - ) - """ - Configuration specifying what this credit grant applies to. We currently only support `metered` prices that have a [Billing Meter](https://docs.stripe.com/api/billing/meter) attached to them. - """ - category: Literal["paid", "promotional"] - """ - The category of this credit grant. - """ - customer: NotRequired[str] - """ - ID of the customer to receive the billing credits. - """ - customer_account: NotRequired[str] - """ - ID of the account to receive the billing credits. - """ - effective_at: NotRequired[int] - """ - The time when the billing credits become effective-when they're eligible for use. It defaults to the current timestamp if not specified. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - expires_at: NotRequired[int] - """ - The time when the billing credits expire. If not specified, the billing credits don't expire. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of key-value pairs that you can attach to an object. You can use this to store additional information about the object (for example, cost basis) in a structured format. - """ - name: NotRequired[str] - """ - A descriptive name shown in the Dashboard. - """ - priority: NotRequired[int] - """ - The desired priority for applying this credit grant. If not specified, it will be set to the default value of 50. The highest priority is 0 and the lowest is 100. - """ - - class CreateParamsAmount(TypedDict): - custom_pricing_unit: NotRequired[ - "CreditGrantService.CreateParamsAmountCustomPricingUnit" - ] - """ - The custom pricing unit amount. - """ - monetary: NotRequired["CreditGrantService.CreateParamsAmountMonetary"] - """ - The monetary amount. - """ - type: Literal["custom_pricing_unit", "monetary"] - """ - The type of this amount. We currently only support `monetary` billing credits. - """ - - class CreateParamsAmountCustomPricingUnit(TypedDict): - id: str - """ - The ID of the custom pricing unit. - """ - value: str - """ - A positive integer representing the amount of the credit grant. - """ - - class CreateParamsAmountMonetary(TypedDict): - currency: str - """ - Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) of the `value` parameter. - """ - value: int - """ - A positive integer representing the amount of the credit grant. - """ - - class CreateParamsApplicabilityConfig(TypedDict): - scope: "CreditGrantService.CreateParamsApplicabilityConfigScope" - """ - Specify the scope of this applicability config. - """ - - class CreateParamsApplicabilityConfigScope(TypedDict): - billable_items: NotRequired[ - List[ - "CreditGrantService.CreateParamsApplicabilityConfigScopeBillableItem" - ] - ] - """ - A list of billable items that the credit grant can apply to. We currently only support metered billable items. Cannot be used in combination with `price_type` or `prices`. - """ - price_type: NotRequired[Literal["metered"]] - """ - The price type that credit grants can apply to. We currently only support the `metered` price type. Cannot be used in combination with `prices`. - """ - prices: NotRequired[ - List[ - "CreditGrantService.CreateParamsApplicabilityConfigScopePrice" - ] - ] - """ - A list of prices that the credit grant can apply to. We currently only support the `metered` prices. Cannot be used in combination with `price_type`. - """ - - class CreateParamsApplicabilityConfigScopeBillableItem(TypedDict): - id: str - """ - The billable item ID this credit grant should apply to. - """ - - class CreateParamsApplicabilityConfigScopePrice(TypedDict): - id: str - """ - The price ID this credit grant should apply to. - """ - - class ExpireParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class ListParams(TypedDict): - customer: NotRequired[str] - """ - Only return credit grants for this customer. - """ - customer_account: NotRequired[str] - """ - Only return credit grants for this account. - """ - 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 RetrieveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class UpdateParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - expires_at: NotRequired["Literal['']|int"] - """ - The time when the billing credits created by this credit grant expire. If set to empty, the billing credits never expire. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of key-value pairs you can attach to an object. You can use this to store additional information about the object (for example, cost basis) in a structured format. - """ - - class VoidGrantParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ +class CreditGrantService(StripeService): def list( self, - params: Optional["CreditGrantService.ListParams"] = None, + params: Optional["CreditGrantListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[CreditGrant]: """ @@ -213,7 +51,7 @@ def list( async def list_async( self, - params: Optional["CreditGrantService.ListParams"] = None, + params: Optional["CreditGrantListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[CreditGrant]: """ @@ -232,7 +70,7 @@ async def list_async( def create( self, - params: "CreditGrantService.CreateParams", + params: "CreditGrantCreateParams", options: Optional[RequestOptions] = None, ) -> CreditGrant: """ @@ -251,7 +89,7 @@ def create( async def create_async( self, - params: "CreditGrantService.CreateParams", + params: "CreditGrantCreateParams", options: Optional[RequestOptions] = None, ) -> CreditGrant: """ @@ -271,7 +109,7 @@ async def create_async( def retrieve( self, id: str, - params: Optional["CreditGrantService.RetrieveParams"] = None, + params: Optional["CreditGrantRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> CreditGrant: """ @@ -291,7 +129,7 @@ def retrieve( async def retrieve_async( self, id: str, - params: Optional["CreditGrantService.RetrieveParams"] = None, + params: Optional["CreditGrantRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> CreditGrant: """ @@ -311,7 +149,7 @@ async def retrieve_async( def update( self, id: str, - params: Optional["CreditGrantService.UpdateParams"] = None, + params: Optional["CreditGrantUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> CreditGrant: """ @@ -331,7 +169,7 @@ def update( async def update_async( self, id: str, - params: Optional["CreditGrantService.UpdateParams"] = None, + params: Optional["CreditGrantUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> CreditGrant: """ @@ -351,7 +189,7 @@ async def update_async( def expire( self, id: str, - params: Optional["CreditGrantService.ExpireParams"] = None, + params: Optional["CreditGrantExpireParams"] = None, options: Optional[RequestOptions] = None, ) -> CreditGrant: """ @@ -373,7 +211,7 @@ def expire( async def expire_async( self, id: str, - params: Optional["CreditGrantService.ExpireParams"] = None, + params: Optional["CreditGrantExpireParams"] = None, options: Optional[RequestOptions] = None, ) -> CreditGrant: """ @@ -395,7 +233,7 @@ async def expire_async( def void_grant( self, id: str, - params: Optional["CreditGrantService.VoidGrantParams"] = None, + params: Optional["CreditGrantVoidGrantParams"] = None, options: Optional[RequestOptions] = None, ) -> CreditGrant: """ @@ -417,7 +255,7 @@ def void_grant( async def void_grant_async( self, id: str, - params: Optional["CreditGrantService.VoidGrantParams"] = None, + params: Optional["CreditGrantVoidGrantParams"] = None, options: Optional[RequestOptions] = None, ) -> CreditGrant: """ diff --git a/stripe/billing/_meter.py b/stripe/billing/_meter.py index a0ae2cf4a..5f7d7b114 100644 --- a/stripe/billing/_meter.py +++ b/stripe/billing/_meter.py @@ -4,21 +4,29 @@ from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource from stripe._nested_resource_class_methods import nested_resource_class_methods -from stripe._request_options import RequestOptions from stripe._stripe_object import StripeObject from stripe._updateable_api_resource import UpdateableAPIResource from stripe._util import class_method_variant, sanitize_id -from typing import ClassVar, List, Optional, cast, overload -from typing_extensions import ( - Literal, - NotRequired, - TypedDict, - Unpack, - TYPE_CHECKING, -) +from typing import ClassVar, Optional, cast, overload +from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: from stripe.billing._meter_event_summary import MeterEventSummary + from stripe.params.billing._meter_create_params import MeterCreateParams + from stripe.params.billing._meter_deactivate_params import ( + MeterDeactivateParams, + ) + from stripe.params.billing._meter_list_event_summaries_params import ( + MeterListEventSummariesParams, + ) + from stripe.params.billing._meter_list_params import MeterListParams + from stripe.params.billing._meter_modify_params import MeterModifyParams + from stripe.params.billing._meter_reactivate_params import ( + MeterReactivateParams, + ) + from stripe.params.billing._meter_retrieve_params import ( + MeterRetrieveParams, + ) @nested_resource_class_methods("event_summary") @@ -63,142 +71,6 @@ class ValueSettings(StripeObject): The key in the meter event payload to use as the value for this meter. """ - class CreateParams(RequestOptions): - customer_mapping: NotRequired["Meter.CreateParamsCustomerMapping"] - """ - Fields that specify how to map a meter event to a customer. - """ - default_aggregation: "Meter.CreateParamsDefaultAggregation" - """ - The default settings to aggregate a meter's events with. - """ - display_name: str - """ - The meter's name. Not visible to the customer. - """ - event_name: str - """ - The name of the meter event to record usage for. Corresponds with the `event_name` field on meter events. - """ - event_time_window: NotRequired[Literal["day", "hour"]] - """ - The time window which meter events have been pre-aggregated for, if any. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - value_settings: NotRequired["Meter.CreateParamsValueSettings"] - """ - Fields that specify how to calculate a meter event's value. - """ - - class CreateParamsCustomerMapping(TypedDict): - event_payload_key: str - """ - The key in the meter event payload to use for mapping the event to a customer. - """ - type: Literal["by_id"] - """ - The method for mapping a meter event to a customer. Must be `by_id`. - """ - - class CreateParamsDefaultAggregation(TypedDict): - formula: Literal["count", "last", "sum"] - """ - Specifies how events are aggregated. Allowed values are `count` to count the number of events, `sum` to sum each event's value and `last` to take the last event's value in the window. - """ - - class CreateParamsValueSettings(TypedDict): - event_payload_key: str - """ - The key in the usage event payload to use as the value for this meter. For example, if the event payload contains usage on a `bytes_used` field, then set the event_payload_key to "bytes_used". - """ - - class DeactivateParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class ListEventSummariesParams(RequestOptions): - customer: str - """ - The customer for which to fetch event summaries. - """ - end_time: int - """ - The timestamp from when to stop aggregating meter events (exclusive). Must be aligned with minute boundaries. - """ - 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. - """ - start_time: int - """ - The timestamp from when to start aggregating meter events (inclusive). Must be aligned with minute boundaries. - """ - 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. - """ - value_grouping_window: NotRequired[Literal["day", "hour"]] - """ - Specifies what granularity to use when generating event summaries. If not specified, a single event summary would be returned for the specified time range. For hourly granularity, start and end times must align with hour boundaries (e.g., 00:00, 01:00, ..., 23:00). For daily granularity, start and end times must align with UTC day boundaries (00:00 UTC). - """ - - class ListParams(RequestOptions): - 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. - """ - status: NotRequired[Literal["active", "inactive"]] - """ - Filter results to only include meters with the given status. - """ - - class ModifyParams(RequestOptions): - display_name: NotRequired[str] - """ - The meter's name. Not visible to the customer. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class ReactivateParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class RetrieveParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - created: int """ Time at which the object was created. Measured in seconds since the Unix epoch. @@ -241,7 +113,7 @@ class RetrieveParams(RequestOptions): value_settings: ValueSettings @classmethod - def create(cls, **params: Unpack["Meter.CreateParams"]) -> "Meter": + def create(cls, **params: Unpack["MeterCreateParams"]) -> "Meter": """ Creates a billing meter. """ @@ -256,7 +128,7 @@ def create(cls, **params: Unpack["Meter.CreateParams"]) -> "Meter": @classmethod async def create_async( - cls, **params: Unpack["Meter.CreateParams"] + cls, **params: Unpack["MeterCreateParams"] ) -> "Meter": """ Creates a billing meter. @@ -272,7 +144,7 @@ async def create_async( @classmethod def _cls_deactivate( - cls, id: str, **params: Unpack["Meter.DeactivateParams"] + cls, id: str, **params: Unpack["MeterDeactivateParams"] ) -> "Meter": """ When a meter is deactivated, no more meter events will be accepted for this meter. You can't attach a deactivated meter to a price. @@ -291,7 +163,7 @@ def _cls_deactivate( @overload @staticmethod def deactivate( - id: str, **params: Unpack["Meter.DeactivateParams"] + id: str, **params: Unpack["MeterDeactivateParams"] ) -> "Meter": """ When a meter is deactivated, no more meter events will be accepted for this meter. You can't attach a deactivated meter to a price. @@ -299,9 +171,7 @@ def deactivate( ... @overload - def deactivate( - self, **params: Unpack["Meter.DeactivateParams"] - ) -> "Meter": + def deactivate(self, **params: Unpack["MeterDeactivateParams"]) -> "Meter": """ When a meter is deactivated, no more meter events will be accepted for this meter. You can't attach a deactivated meter to a price. """ @@ -309,7 +179,7 @@ def deactivate( @class_method_variant("_cls_deactivate") def deactivate( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Meter.DeactivateParams"] + self, **params: Unpack["MeterDeactivateParams"] ) -> "Meter": """ When a meter is deactivated, no more meter events will be accepted for this meter. You can't attach a deactivated meter to a price. @@ -327,7 +197,7 @@ def deactivate( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_deactivate_async( - cls, id: str, **params: Unpack["Meter.DeactivateParams"] + cls, id: str, **params: Unpack["MeterDeactivateParams"] ) -> "Meter": """ When a meter is deactivated, no more meter events will be accepted for this meter. You can't attach a deactivated meter to a price. @@ -346,7 +216,7 @@ async def _cls_deactivate_async( @overload @staticmethod async def deactivate_async( - id: str, **params: Unpack["Meter.DeactivateParams"] + id: str, **params: Unpack["MeterDeactivateParams"] ) -> "Meter": """ When a meter is deactivated, no more meter events will be accepted for this meter. You can't attach a deactivated meter to a price. @@ -355,7 +225,7 @@ async def deactivate_async( @overload async def deactivate_async( - self, **params: Unpack["Meter.DeactivateParams"] + self, **params: Unpack["MeterDeactivateParams"] ) -> "Meter": """ When a meter is deactivated, no more meter events will be accepted for this meter. You can't attach a deactivated meter to a price. @@ -364,7 +234,7 @@ async def deactivate_async( @class_method_variant("_cls_deactivate_async") async def deactivate_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Meter.DeactivateParams"] + self, **params: Unpack["MeterDeactivateParams"] ) -> "Meter": """ When a meter is deactivated, no more meter events will be accepted for this meter. You can't attach a deactivated meter to a price. @@ -381,7 +251,7 @@ async def deactivate_async( # pyright: ignore[reportGeneralTypeIssues] ) @classmethod - def list(cls, **params: Unpack["Meter.ListParams"]) -> ListObject["Meter"]: + def list(cls, **params: Unpack["MeterListParams"]) -> ListObject["Meter"]: """ Retrieve a list of billing meters. """ @@ -400,7 +270,7 @@ def list(cls, **params: Unpack["Meter.ListParams"]) -> ListObject["Meter"]: @classmethod async def list_async( - cls, **params: Unpack["Meter.ListParams"] + cls, **params: Unpack["MeterListParams"] ) -> ListObject["Meter"]: """ Retrieve a list of billing meters. @@ -419,9 +289,7 @@ async def list_async( return result @classmethod - def modify( - cls, id: str, **params: Unpack["Meter.ModifyParams"] - ) -> "Meter": + def modify(cls, id: str, **params: Unpack["MeterModifyParams"]) -> "Meter": """ Updates a billing meter. """ @@ -437,7 +305,7 @@ def modify( @classmethod async def modify_async( - cls, id: str, **params: Unpack["Meter.ModifyParams"] + cls, id: str, **params: Unpack["MeterModifyParams"] ) -> "Meter": """ Updates a billing meter. @@ -454,7 +322,7 @@ async def modify_async( @classmethod def _cls_reactivate( - cls, id: str, **params: Unpack["Meter.ReactivateParams"] + cls, id: str, **params: Unpack["MeterReactivateParams"] ) -> "Meter": """ When a meter is reactivated, events for this meter can be accepted and you can attach the meter to a price. @@ -473,7 +341,7 @@ def _cls_reactivate( @overload @staticmethod def reactivate( - id: str, **params: Unpack["Meter.ReactivateParams"] + id: str, **params: Unpack["MeterReactivateParams"] ) -> "Meter": """ When a meter is reactivated, events for this meter can be accepted and you can attach the meter to a price. @@ -481,9 +349,7 @@ def reactivate( ... @overload - def reactivate( - self, **params: Unpack["Meter.ReactivateParams"] - ) -> "Meter": + def reactivate(self, **params: Unpack["MeterReactivateParams"]) -> "Meter": """ When a meter is reactivated, events for this meter can be accepted and you can attach the meter to a price. """ @@ -491,7 +357,7 @@ def reactivate( @class_method_variant("_cls_reactivate") def reactivate( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Meter.ReactivateParams"] + self, **params: Unpack["MeterReactivateParams"] ) -> "Meter": """ When a meter is reactivated, events for this meter can be accepted and you can attach the meter to a price. @@ -509,7 +375,7 @@ def reactivate( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_reactivate_async( - cls, id: str, **params: Unpack["Meter.ReactivateParams"] + cls, id: str, **params: Unpack["MeterReactivateParams"] ) -> "Meter": """ When a meter is reactivated, events for this meter can be accepted and you can attach the meter to a price. @@ -528,7 +394,7 @@ async def _cls_reactivate_async( @overload @staticmethod async def reactivate_async( - id: str, **params: Unpack["Meter.ReactivateParams"] + id: str, **params: Unpack["MeterReactivateParams"] ) -> "Meter": """ When a meter is reactivated, events for this meter can be accepted and you can attach the meter to a price. @@ -537,7 +403,7 @@ async def reactivate_async( @overload async def reactivate_async( - self, **params: Unpack["Meter.ReactivateParams"] + self, **params: Unpack["MeterReactivateParams"] ) -> "Meter": """ When a meter is reactivated, events for this meter can be accepted and you can attach the meter to a price. @@ -546,7 +412,7 @@ async def reactivate_async( @class_method_variant("_cls_reactivate_async") async def reactivate_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Meter.ReactivateParams"] + self, **params: Unpack["MeterReactivateParams"] ) -> "Meter": """ When a meter is reactivated, events for this meter can be accepted and you can attach the meter to a price. @@ -564,7 +430,7 @@ async def reactivate_async( # pyright: ignore[reportGeneralTypeIssues] @classmethod def retrieve( - cls, id: str, **params: Unpack["Meter.RetrieveParams"] + cls, id: str, **params: Unpack["MeterRetrieveParams"] ) -> "Meter": """ Retrieves a billing meter given an ID. @@ -575,7 +441,7 @@ def retrieve( @classmethod async def retrieve_async( - cls, id: str, **params: Unpack["Meter.RetrieveParams"] + cls, id: str, **params: Unpack["MeterRetrieveParams"] ) -> "Meter": """ Retrieves a billing meter given an ID. @@ -586,7 +452,7 @@ async def retrieve_async( @classmethod def list_event_summaries( - cls, id: str, **params: Unpack["Meter.ListEventSummariesParams"] + cls, id: str, **params: Unpack["MeterListEventSummariesParams"] ) -> ListObject["MeterEventSummary"]: """ Retrieve a list of billing meter event summaries. @@ -604,7 +470,7 @@ def list_event_summaries( @classmethod async def list_event_summaries_async( - cls, id: str, **params: Unpack["Meter.ListEventSummariesParams"] + cls, id: str, **params: Unpack["MeterListEventSummariesParams"] ) -> ListObject["MeterEventSummary"]: """ Retrieve a list of billing meter event summaries. diff --git a/stripe/billing/_meter_event.py b/stripe/billing/_meter_event.py index 428d66604..53dcfa569 100644 --- a/stripe/billing/_meter_event.py +++ b/stripe/billing/_meter_event.py @@ -1,9 +1,13 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._createable_api_resource import CreateableAPIResource -from stripe._request_options import RequestOptions -from typing import ClassVar, Dict, List, cast -from typing_extensions import Literal, NotRequired, Unpack +from typing import ClassVar, Dict, cast +from typing_extensions import Literal, Unpack, TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params.billing._meter_event_create_params import ( + MeterEventCreateParams, + ) class MeterEvent(CreateableAPIResource["MeterEvent"]): @@ -14,29 +18,6 @@ class MeterEvent(CreateableAPIResource["MeterEvent"]): OBJECT_NAME: ClassVar[Literal["billing.meter_event"]] = ( "billing.meter_event" ) - - class CreateParams(RequestOptions): - event_name: str - """ - The name of the meter event. Corresponds with the `event_name` field on a meter. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - identifier: NotRequired[str] - """ - A unique identifier for the event. If not provided, one is generated. We recommend using UUID-like identifiers. We will enforce uniqueness within a rolling period of at least 24 hours. The enforcement of uniqueness primarily addresses issues arising from accidental retries or other problems occurring within extremely brief time intervals. This approach helps prevent duplicate entries and ensures data integrity in high-frequency operations. - """ - payload: Dict[str, str] - """ - The payload of the event. This must contain the fields corresponding to a meter's `customer_mapping.event_payload_key` (default is `stripe_customer_id`) and `value_settings.event_payload_key` (default is `value`). Read more about the [payload](https://docs.stripe.com/billing/subscriptions/usage-based/recording-usage#payload-key-overrides). - """ - timestamp: NotRequired[int] - """ - The time of the event. Measured in seconds since the Unix epoch. Must be within the past 35 calendar days or up to 5 minutes in the future. Defaults to current timestamp if not specified. - """ - created: int """ Time at which the object was created. Measured in seconds since the Unix epoch. @@ -68,7 +49,7 @@ class CreateParams(RequestOptions): @classmethod def create( - cls, **params: Unpack["MeterEvent.CreateParams"] + cls, **params: Unpack["MeterEventCreateParams"] ) -> "MeterEvent": """ Creates a billing meter event. @@ -84,7 +65,7 @@ def create( @classmethod async def create_async( - cls, **params: Unpack["MeterEvent.CreateParams"] + cls, **params: Unpack["MeterEventCreateParams"] ) -> "MeterEvent": """ Creates a billing meter event. diff --git a/stripe/billing/_meter_event_adjustment.py b/stripe/billing/_meter_event_adjustment.py index 0304e7c7f..be7a0b935 100644 --- a/stripe/billing/_meter_event_adjustment.py +++ b/stripe/billing/_meter_event_adjustment.py @@ -1,10 +1,14 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._createable_api_resource import CreateableAPIResource -from stripe._request_options import RequestOptions from stripe._stripe_object import StripeObject -from typing import ClassVar, List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict, Unpack +from typing import ClassVar, Optional, cast +from typing_extensions import Literal, Unpack, TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params.billing._meter_event_adjustment_create_params import ( + MeterEventAdjustmentCreateParams, + ) class MeterEventAdjustment(CreateableAPIResource["MeterEventAdjustment"]): @@ -22,30 +26,6 @@ class Cancel(StripeObject): Unique identifier for the event. """ - class CreateParams(RequestOptions): - cancel: NotRequired["MeterEventAdjustment.CreateParamsCancel"] - """ - Specifies which event to cancel. - """ - event_name: str - """ - The name of the meter event. Corresponds with the `event_name` field on a meter. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - type: Literal["cancel"] - """ - Specifies whether to cancel a single event or a range of events for a time period. Time period cancellation is not supported yet. - """ - - class CreateParamsCancel(TypedDict): - identifier: NotRequired[str] - """ - Unique identifier for the event. You can only cancel events within 24 hours of Stripe receiving them. - """ - cancel: Optional[Cancel] """ Specifies which event to cancel. @@ -73,7 +53,7 @@ class CreateParamsCancel(TypedDict): @classmethod def create( - cls, **params: Unpack["MeterEventAdjustment.CreateParams"] + cls, **params: Unpack["MeterEventAdjustmentCreateParams"] ) -> "MeterEventAdjustment": """ Creates a billing meter event adjustment. @@ -89,7 +69,7 @@ def create( @classmethod async def create_async( - cls, **params: Unpack["MeterEventAdjustment.CreateParams"] + cls, **params: Unpack["MeterEventAdjustmentCreateParams"] ) -> "MeterEventAdjustment": """ Creates a billing meter event adjustment. diff --git a/stripe/billing/_meter_event_adjustment_service.py b/stripe/billing/_meter_event_adjustment_service.py index c5f8cf7be..342d2bb50 100644 --- a/stripe/billing/_meter_event_adjustment_service.py +++ b/stripe/billing/_meter_event_adjustment_service.py @@ -3,38 +3,19 @@ from stripe._request_options import RequestOptions from stripe._stripe_service import StripeService from stripe.billing._meter_event_adjustment import MeterEventAdjustment -from typing import List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params.billing._meter_event_adjustment_create_params import ( + MeterEventAdjustmentCreateParams, + ) -class MeterEventAdjustmentService(StripeService): - class CreateParams(TypedDict): - cancel: NotRequired["MeterEventAdjustmentService.CreateParamsCancel"] - """ - Specifies which event to cancel. - """ - event_name: str - """ - The name of the meter event. Corresponds with the `event_name` field on a meter. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - type: Literal["cancel"] - """ - Specifies whether to cancel a single event or a range of events for a time period. Time period cancellation is not supported yet. - """ - - class CreateParamsCancel(TypedDict): - identifier: NotRequired[str] - """ - Unique identifier for the event. You can only cancel events within 24 hours of Stripe receiving them. - """ +class MeterEventAdjustmentService(StripeService): def create( self, - params: "MeterEventAdjustmentService.CreateParams", + params: "MeterEventAdjustmentCreateParams", options: Optional[RequestOptions] = None, ) -> MeterEventAdjustment: """ @@ -53,7 +34,7 @@ def create( async def create_async( self, - params: "MeterEventAdjustmentService.CreateParams", + params: "MeterEventAdjustmentCreateParams", options: Optional[RequestOptions] = None, ) -> MeterEventAdjustment: """ diff --git a/stripe/billing/_meter_event_service.py b/stripe/billing/_meter_event_service.py index 2e43f3b71..208740055 100644 --- a/stripe/billing/_meter_event_service.py +++ b/stripe/billing/_meter_event_service.py @@ -3,36 +3,19 @@ from stripe._request_options import RequestOptions from stripe._stripe_service import StripeService from stripe.billing._meter_event import MeterEvent -from typing import Dict, List, Optional, cast -from typing_extensions import NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params.billing._meter_event_create_params import ( + MeterEventCreateParams, + ) -class MeterEventService(StripeService): - class CreateParams(TypedDict): - event_name: str - """ - The name of the meter event. Corresponds with the `event_name` field on a meter. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - identifier: NotRequired[str] - """ - A unique identifier for the event. If not provided, one is generated. We recommend using UUID-like identifiers. We will enforce uniqueness within a rolling period of at least 24 hours. The enforcement of uniqueness primarily addresses issues arising from accidental retries or other problems occurring within extremely brief time intervals. This approach helps prevent duplicate entries and ensures data integrity in high-frequency operations. - """ - payload: Dict[str, str] - """ - The payload of the event. This must contain the fields corresponding to a meter's `customer_mapping.event_payload_key` (default is `stripe_customer_id`) and `value_settings.event_payload_key` (default is `value`). Read more about the [payload](https://docs.stripe.com/billing/subscriptions/usage-based/recording-usage#payload-key-overrides). - """ - timestamp: NotRequired[int] - """ - The time of the event. Measured in seconds since the Unix epoch. Must be within the past 35 calendar days or up to 5 minutes in the future. Defaults to current timestamp if not specified. - """ +class MeterEventService(StripeService): def create( self, - params: "MeterEventService.CreateParams", + params: "MeterEventCreateParams", options: Optional[RequestOptions] = None, ) -> MeterEvent: """ @@ -51,7 +34,7 @@ def create( async def create_async( self, - params: "MeterEventService.CreateParams", + params: "MeterEventCreateParams", options: Optional[RequestOptions] = None, ) -> MeterEvent: """ diff --git a/stripe/billing/_meter_event_summary_service.py b/stripe/billing/_meter_event_summary_service.py index a917a37c5..a603151c3 100644 --- a/stripe/billing/_meter_event_summary_service.py +++ b/stripe/billing/_meter_event_summary_service.py @@ -5,49 +5,20 @@ from stripe._stripe_service import StripeService from stripe._util import sanitize_id from stripe.billing._meter_event_summary import MeterEventSummary -from typing import List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params.billing._meter_event_summary_list_params import ( + MeterEventSummaryListParams, + ) -class MeterEventSummaryService(StripeService): - class ListParams(TypedDict): - customer: str - """ - The customer for which to fetch event summaries. - """ - end_time: int - """ - The timestamp from when to stop aggregating meter events (exclusive). Must be aligned with minute boundaries. - """ - 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. - """ - start_time: int - """ - The timestamp from when to start aggregating meter events (inclusive). Must be aligned with minute boundaries. - """ - 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. - """ - value_grouping_window: NotRequired[Literal["day", "hour"]] - """ - Specifies what granularity to use when generating event summaries. If not specified, a single event summary would be returned for the specified time range. For hourly granularity, start and end times must align with hour boundaries (e.g., 00:00, 01:00, ..., 23:00). For daily granularity, start and end times must align with UTC day boundaries (00:00 UTC). - """ +class MeterEventSummaryService(StripeService): def list( self, id: str, - params: "MeterEventSummaryService.ListParams", + params: "MeterEventSummaryListParams", options: Optional[RequestOptions] = None, ) -> ListObject[MeterEventSummary]: """ @@ -69,7 +40,7 @@ def list( async def list_async( self, id: str, - params: "MeterEventSummaryService.ListParams", + params: "MeterEventSummaryListParams", options: Optional[RequestOptions] = None, ) -> ListObject[MeterEventSummary]: """ diff --git a/stripe/billing/_meter_service.py b/stripe/billing/_meter_service.py index 53df2fb41..73dfbe97b 100644 --- a/stripe/billing/_meter_service.py +++ b/stripe/billing/_meter_service.py @@ -8,8 +8,22 @@ from stripe.billing._meter_event_summary_service import ( MeterEventSummaryService, ) -from typing import List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params.billing._meter_create_params import MeterCreateParams + from stripe.params.billing._meter_deactivate_params import ( + MeterDeactivateParams, + ) + from stripe.params.billing._meter_list_params import MeterListParams + from stripe.params.billing._meter_reactivate_params import ( + MeterReactivateParams, + ) + from stripe.params.billing._meter_retrieve_params import ( + MeterRetrieveParams, + ) + from stripe.params.billing._meter_update_params import MeterUpdateParams class MeterService(StripeService): @@ -17,113 +31,9 @@ def __init__(self, requestor): super().__init__(requestor) self.event_summaries = MeterEventSummaryService(self._requestor) - class CreateParams(TypedDict): - customer_mapping: NotRequired[ - "MeterService.CreateParamsCustomerMapping" - ] - """ - Fields that specify how to map a meter event to a customer. - """ - default_aggregation: "MeterService.CreateParamsDefaultAggregation" - """ - The default settings to aggregate a meter's events with. - """ - display_name: str - """ - The meter's name. Not visible to the customer. - """ - event_name: str - """ - The name of the meter event to record usage for. Corresponds with the `event_name` field on meter events. - """ - event_time_window: NotRequired[Literal["day", "hour"]] - """ - The time window which meter events have been pre-aggregated for, if any. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - value_settings: NotRequired["MeterService.CreateParamsValueSettings"] - """ - Fields that specify how to calculate a meter event's value. - """ - - class CreateParamsCustomerMapping(TypedDict): - event_payload_key: str - """ - The key in the meter event payload to use for mapping the event to a customer. - """ - type: Literal["by_id"] - """ - The method for mapping a meter event to a customer. Must be `by_id`. - """ - - class CreateParamsDefaultAggregation(TypedDict): - formula: Literal["count", "last", "sum"] - """ - Specifies how events are aggregated. Allowed values are `count` to count the number of events, `sum` to sum each event's value and `last` to take the last event's value in the window. - """ - - class CreateParamsValueSettings(TypedDict): - event_payload_key: str - """ - The key in the usage event payload to use as the value for this meter. For example, if the event payload contains usage on a `bytes_used` field, then set the event_payload_key to "bytes_used". - """ - - class DeactivateParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class ListParams(TypedDict): - 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. - """ - status: NotRequired[Literal["active", "inactive"]] - """ - Filter results to only include meters with the given status. - """ - - class ReactivateParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class RetrieveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class UpdateParams(TypedDict): - display_name: NotRequired[str] - """ - The meter's name. Not visible to the customer. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - def list( self, - params: Optional["MeterService.ListParams"] = None, + params: Optional["MeterListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[Meter]: """ @@ -142,7 +52,7 @@ def list( async def list_async( self, - params: Optional["MeterService.ListParams"] = None, + params: Optional["MeterListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[Meter]: """ @@ -161,7 +71,7 @@ async def list_async( def create( self, - params: "MeterService.CreateParams", + params: "MeterCreateParams", options: Optional[RequestOptions] = None, ) -> Meter: """ @@ -180,7 +90,7 @@ def create( async def create_async( self, - params: "MeterService.CreateParams", + params: "MeterCreateParams", options: Optional[RequestOptions] = None, ) -> Meter: """ @@ -200,7 +110,7 @@ async def create_async( def retrieve( self, id: str, - params: Optional["MeterService.RetrieveParams"] = None, + params: Optional["MeterRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Meter: """ @@ -220,7 +130,7 @@ def retrieve( async def retrieve_async( self, id: str, - params: Optional["MeterService.RetrieveParams"] = None, + params: Optional["MeterRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Meter: """ @@ -240,7 +150,7 @@ async def retrieve_async( def update( self, id: str, - params: Optional["MeterService.UpdateParams"] = None, + params: Optional["MeterUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> Meter: """ @@ -260,7 +170,7 @@ def update( async def update_async( self, id: str, - params: Optional["MeterService.UpdateParams"] = None, + params: Optional["MeterUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> Meter: """ @@ -280,7 +190,7 @@ async def update_async( def deactivate( self, id: str, - params: Optional["MeterService.DeactivateParams"] = None, + params: Optional["MeterDeactivateParams"] = None, options: Optional[RequestOptions] = None, ) -> Meter: """ @@ -302,7 +212,7 @@ def deactivate( async def deactivate_async( self, id: str, - params: Optional["MeterService.DeactivateParams"] = None, + params: Optional["MeterDeactivateParams"] = None, options: Optional[RequestOptions] = None, ) -> Meter: """ @@ -324,7 +234,7 @@ async def deactivate_async( def reactivate( self, id: str, - params: Optional["MeterService.ReactivateParams"] = None, + params: Optional["MeterReactivateParams"] = None, options: Optional[RequestOptions] = None, ) -> Meter: """ @@ -346,7 +256,7 @@ def reactivate( async def reactivate_async( self, id: str, - params: Optional["MeterService.ReactivateParams"] = None, + params: Optional["MeterReactivateParams"] = None, options: Optional[RequestOptions] = None, ) -> Meter: """ diff --git a/stripe/billing/analytics/_meter_usage.py b/stripe/billing/analytics/_meter_usage.py index 537f48955..0645528d7 100644 --- a/stripe/billing/analytics/_meter_usage.py +++ b/stripe/billing/analytics/_meter_usage.py @@ -1,19 +1,15 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._list_object import ListObject -from stripe._request_options import RequestOptions from stripe._singleton_api_resource import SingletonAPIResource -from typing import ClassVar, Dict, List -from typing_extensions import ( - Literal, - NotRequired, - TypedDict, - Unpack, - TYPE_CHECKING, -) +from typing import ClassVar +from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: from stripe.billing.analytics._meter_usage_row import MeterUsageRow + from stripe.params.billing.analytics._meter_usage_retrieve_params import ( + MeterUsageRetrieveParams, + ) class MeterUsage(SingletonAPIResource["MeterUsage"]): @@ -24,659 +20,6 @@ class MeterUsage(SingletonAPIResource["MeterUsage"]): OBJECT_NAME: ClassVar[Literal["billing.analytics.meter_usage"]] = ( "billing.analytics.meter_usage" ) - - class RetrieveParams(RequestOptions): - customer: str - """ - The customer id to fetch meter usage data for. - """ - ends_at: int - """ - The timestamp from when to stop aggregating meter events (exclusive). Must be aligned with minute boundaries. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - meters: NotRequired[List["MeterUsage.RetrieveParamsMeter"]] - """ - An array of meter parameters to specify which meters to include in the usage data. If not specified, usage across all meters for the customer is included. - """ - starts_at: int - """ - The timestamp from when to start aggregating meter events (inclusive). Must be aligned with minute boundaries. - """ - timezone: NotRequired[ - Literal[ - "Africa/Abidjan", - "Africa/Accra", - "Africa/Addis_Ababa", - "Africa/Algiers", - "Africa/Asmara", - "Africa/Asmera", - "Africa/Bamako", - "Africa/Bangui", - "Africa/Banjul", - "Africa/Bissau", - "Africa/Blantyre", - "Africa/Brazzaville", - "Africa/Bujumbura", - "Africa/Cairo", - "Africa/Casablanca", - "Africa/Ceuta", - "Africa/Conakry", - "Africa/Dakar", - "Africa/Dar_es_Salaam", - "Africa/Djibouti", - "Africa/Douala", - "Africa/El_Aaiun", - "Africa/Freetown", - "Africa/Gaborone", - "Africa/Harare", - "Africa/Johannesburg", - "Africa/Juba", - "Africa/Kampala", - "Africa/Khartoum", - "Africa/Kigali", - "Africa/Kinshasa", - "Africa/Lagos", - "Africa/Libreville", - "Africa/Lome", - "Africa/Luanda", - "Africa/Lubumbashi", - "Africa/Lusaka", - "Africa/Malabo", - "Africa/Maputo", - "Africa/Maseru", - "Africa/Mbabane", - "Africa/Mogadishu", - "Africa/Monrovia", - "Africa/Nairobi", - "Africa/Ndjamena", - "Africa/Niamey", - "Africa/Nouakchott", - "Africa/Ouagadougou", - "Africa/Porto-Novo", - "Africa/Sao_Tome", - "Africa/Timbuktu", - "Africa/Tripoli", - "Africa/Tunis", - "Africa/Windhoek", - "America/Adak", - "America/Anchorage", - "America/Anguilla", - "America/Antigua", - "America/Araguaina", - "America/Argentina/Buenos_Aires", - "America/Argentina/Catamarca", - "America/Argentina/ComodRivadavia", - "America/Argentina/Cordoba", - "America/Argentina/Jujuy", - "America/Argentina/La_Rioja", - "America/Argentina/Mendoza", - "America/Argentina/Rio_Gallegos", - "America/Argentina/Salta", - "America/Argentina/San_Juan", - "America/Argentina/San_Luis", - "America/Argentina/Tucuman", - "America/Argentina/Ushuaia", - "America/Aruba", - "America/Asuncion", - "America/Atikokan", - "America/Atka", - "America/Bahia", - "America/Bahia_Banderas", - "America/Barbados", - "America/Belem", - "America/Belize", - "America/Blanc-Sablon", - "America/Boa_Vista", - "America/Bogota", - "America/Boise", - "America/Buenos_Aires", - "America/Cambridge_Bay", - "America/Campo_Grande", - "America/Cancun", - "America/Caracas", - "America/Catamarca", - "America/Cayenne", - "America/Cayman", - "America/Chicago", - "America/Chihuahua", - "America/Ciudad_Juarez", - "America/Coral_Harbour", - "America/Cordoba", - "America/Costa_Rica", - "America/Coyhaique", - "America/Creston", - "America/Cuiaba", - "America/Curacao", - "America/Danmarkshavn", - "America/Dawson", - "America/Dawson_Creek", - "America/Denver", - "America/Detroit", - "America/Dominica", - "America/Edmonton", - "America/Eirunepe", - "America/El_Salvador", - "America/Ensenada", - "America/Fort_Nelson", - "America/Fort_Wayne", - "America/Fortaleza", - "America/Glace_Bay", - "America/Godthab", - "America/Goose_Bay", - "America/Grand_Turk", - "America/Grenada", - "America/Guadeloupe", - "America/Guatemala", - "America/Guayaquil", - "America/Guyana", - "America/Halifax", - "America/Havana", - "America/Hermosillo", - "America/Indiana/Indianapolis", - "America/Indiana/Knox", - "America/Indiana/Marengo", - "America/Indiana/Petersburg", - "America/Indiana/Tell_City", - "America/Indiana/Vevay", - "America/Indiana/Vincennes", - "America/Indiana/Winamac", - "America/Indianapolis", - "America/Inuvik", - "America/Iqaluit", - "America/Jamaica", - "America/Jujuy", - "America/Juneau", - "America/Kentucky/Louisville", - "America/Kentucky/Monticello", - "America/Knox_IN", - "America/Kralendijk", - "America/La_Paz", - "America/Lima", - "America/Los_Angeles", - "America/Louisville", - "America/Lower_Princes", - "America/Maceio", - "America/Managua", - "America/Manaus", - "America/Marigot", - "America/Martinique", - "America/Matamoros", - "America/Mazatlan", - "America/Mendoza", - "America/Menominee", - "America/Merida", - "America/Metlakatla", - "America/Mexico_City", - "America/Miquelon", - "America/Moncton", - "America/Monterrey", - "America/Montevideo", - "America/Montreal", - "America/Montserrat", - "America/Nassau", - "America/New_York", - "America/Nipigon", - "America/Nome", - "America/Noronha", - "America/North_Dakota/Beulah", - "America/North_Dakota/Center", - "America/North_Dakota/New_Salem", - "America/Nuuk", - "America/Ojinaga", - "America/Panama", - "America/Pangnirtung", - "America/Paramaribo", - "America/Phoenix", - "America/Port-au-Prince", - "America/Port_of_Spain", - "America/Porto_Acre", - "America/Porto_Velho", - "America/Puerto_Rico", - "America/Punta_Arenas", - "America/Rainy_River", - "America/Rankin_Inlet", - "America/Recife", - "America/Regina", - "America/Resolute", - "America/Rio_Branco", - "America/Rosario", - "America/Santa_Isabel", - "America/Santarem", - "America/Santiago", - "America/Santo_Domingo", - "America/Sao_Paulo", - "America/Scoresbysund", - "America/Shiprock", - "America/Sitka", - "America/St_Barthelemy", - "America/St_Johns", - "America/St_Kitts", - "America/St_Lucia", - "America/St_Thomas", - "America/St_Vincent", - "America/Swift_Current", - "America/Tegucigalpa", - "America/Thule", - "America/Thunder_Bay", - "America/Tijuana", - "America/Toronto", - "America/Tortola", - "America/Vancouver", - "America/Virgin", - "America/Whitehorse", - "America/Winnipeg", - "America/Yakutat", - "America/Yellowknife", - "Antarctica/Casey", - "Antarctica/Davis", - "Antarctica/DumontDUrville", - "Antarctica/Macquarie", - "Antarctica/Mawson", - "Antarctica/McMurdo", - "Antarctica/Palmer", - "Antarctica/Rothera", - "Antarctica/South_Pole", - "Antarctica/Syowa", - "Antarctica/Troll", - "Antarctica/Vostok", - "Arctic/Longyearbyen", - "Asia/Aden", - "Asia/Almaty", - "Asia/Amman", - "Asia/Anadyr", - "Asia/Aqtau", - "Asia/Aqtobe", - "Asia/Ashgabat", - "Asia/Ashkhabad", - "Asia/Atyrau", - "Asia/Baghdad", - "Asia/Bahrain", - "Asia/Baku", - "Asia/Bangkok", - "Asia/Barnaul", - "Asia/Beirut", - "Asia/Bishkek", - "Asia/Brunei", - "Asia/Calcutta", - "Asia/Chita", - "Asia/Choibalsan", - "Asia/Chongqing", - "Asia/Chungking", - "Asia/Colombo", - "Asia/Dacca", - "Asia/Damascus", - "Asia/Dhaka", - "Asia/Dili", - "Asia/Dubai", - "Asia/Dushanbe", - "Asia/Famagusta", - "Asia/Gaza", - "Asia/Harbin", - "Asia/Hebron", - "Asia/Ho_Chi_Minh", - "Asia/Hong_Kong", - "Asia/Hovd", - "Asia/Irkutsk", - "Asia/Istanbul", - "Asia/Jakarta", - "Asia/Jayapura", - "Asia/Jerusalem", - "Asia/Kabul", - "Asia/Kamchatka", - "Asia/Karachi", - "Asia/Kashgar", - "Asia/Kathmandu", - "Asia/Katmandu", - "Asia/Khandyga", - "Asia/Kolkata", - "Asia/Krasnoyarsk", - "Asia/Kuala_Lumpur", - "Asia/Kuching", - "Asia/Kuwait", - "Asia/Macao", - "Asia/Macau", - "Asia/Magadan", - "Asia/Makassar", - "Asia/Manila", - "Asia/Muscat", - "Asia/Nicosia", - "Asia/Novokuznetsk", - "Asia/Novosibirsk", - "Asia/Omsk", - "Asia/Oral", - "Asia/Phnom_Penh", - "Asia/Pontianak", - "Asia/Pyongyang", - "Asia/Qatar", - "Asia/Qostanay", - "Asia/Qyzylorda", - "Asia/Rangoon", - "Asia/Riyadh", - "Asia/Saigon", - "Asia/Sakhalin", - "Asia/Samarkand", - "Asia/Seoul", - "Asia/Shanghai", - "Asia/Singapore", - "Asia/Srednekolymsk", - "Asia/Taipei", - "Asia/Tashkent", - "Asia/Tbilisi", - "Asia/Tehran", - "Asia/Tel_Aviv", - "Asia/Thimbu", - "Asia/Thimphu", - "Asia/Tokyo", - "Asia/Tomsk", - "Asia/Ujung_Pandang", - "Asia/Ulaanbaatar", - "Asia/Ulan_Bator", - "Asia/Urumqi", - "Asia/Ust-Nera", - "Asia/Vientiane", - "Asia/Vladivostok", - "Asia/Yakutsk", - "Asia/Yangon", - "Asia/Yekaterinburg", - "Asia/Yerevan", - "Atlantic/Azores", - "Atlantic/Bermuda", - "Atlantic/Canary", - "Atlantic/Cape_Verde", - "Atlantic/Faeroe", - "Atlantic/Faroe", - "Atlantic/Jan_Mayen", - "Atlantic/Madeira", - "Atlantic/Reykjavik", - "Atlantic/South_Georgia", - "Atlantic/St_Helena", - "Atlantic/Stanley", - "Australia/ACT", - "Australia/Adelaide", - "Australia/Brisbane", - "Australia/Broken_Hill", - "Australia/Canberra", - "Australia/Currie", - "Australia/Darwin", - "Australia/Eucla", - "Australia/Hobart", - "Australia/LHI", - "Australia/Lindeman", - "Australia/Lord_Howe", - "Australia/Melbourne", - "Australia/NSW", - "Australia/North", - "Australia/Perth", - "Australia/Queensland", - "Australia/South", - "Australia/Sydney", - "Australia/Tasmania", - "Australia/Victoria", - "Australia/West", - "Australia/Yancowinna", - "Brazil/Acre", - "Brazil/DeNoronha", - "Brazil/East", - "Brazil/West", - "CET", - "CST6CDT", - "Canada/Atlantic", - "Canada/Central", - "Canada/Eastern", - "Canada/Mountain", - "Canada/Newfoundland", - "Canada/Pacific", - "Canada/Saskatchewan", - "Canada/Yukon", - "Chile/Continental", - "Chile/EasterIsland", - "Cuba", - "EET", - "EST", - "EST5EDT", - "Egypt", - "Eire", - "Etc/GMT", - "Etc/GMT+0", - "Etc/GMT+1", - "Etc/GMT+10", - "Etc/GMT+11", - "Etc/GMT+12", - "Etc/GMT+2", - "Etc/GMT+3", - "Etc/GMT+4", - "Etc/GMT+5", - "Etc/GMT+6", - "Etc/GMT+7", - "Etc/GMT+8", - "Etc/GMT+9", - "Etc/GMT-0", - "Etc/GMT-1", - "Etc/GMT-10", - "Etc/GMT-11", - "Etc/GMT-12", - "Etc/GMT-13", - "Etc/GMT-14", - "Etc/GMT-2", - "Etc/GMT-3", - "Etc/GMT-4", - "Etc/GMT-5", - "Etc/GMT-6", - "Etc/GMT-7", - "Etc/GMT-8", - "Etc/GMT-9", - "Etc/GMT0", - "Etc/Greenwich", - "Etc/UCT", - "Etc/UTC", - "Etc/Universal", - "Etc/Zulu", - "Europe/Amsterdam", - "Europe/Andorra", - "Europe/Astrakhan", - "Europe/Athens", - "Europe/Belfast", - "Europe/Belgrade", - "Europe/Berlin", - "Europe/Bratislava", - "Europe/Brussels", - "Europe/Bucharest", - "Europe/Budapest", - "Europe/Busingen", - "Europe/Chisinau", - "Europe/Copenhagen", - "Europe/Dublin", - "Europe/Gibraltar", - "Europe/Guernsey", - "Europe/Helsinki", - "Europe/Isle_of_Man", - "Europe/Istanbul", - "Europe/Jersey", - "Europe/Kaliningrad", - "Europe/Kiev", - "Europe/Kirov", - "Europe/Kyiv", - "Europe/Lisbon", - "Europe/Ljubljana", - "Europe/London", - "Europe/Luxembourg", - "Europe/Madrid", - "Europe/Malta", - "Europe/Mariehamn", - "Europe/Minsk", - "Europe/Monaco", - "Europe/Moscow", - "Europe/Nicosia", - "Europe/Oslo", - "Europe/Paris", - "Europe/Podgorica", - "Europe/Prague", - "Europe/Riga", - "Europe/Rome", - "Europe/Samara", - "Europe/San_Marino", - "Europe/Sarajevo", - "Europe/Saratov", - "Europe/Simferopol", - "Europe/Skopje", - "Europe/Sofia", - "Europe/Stockholm", - "Europe/Tallinn", - "Europe/Tirane", - "Europe/Tiraspol", - "Europe/Ulyanovsk", - "Europe/Uzhgorod", - "Europe/Vaduz", - "Europe/Vatican", - "Europe/Vienna", - "Europe/Vilnius", - "Europe/Volgograd", - "Europe/Warsaw", - "Europe/Zagreb", - "Europe/Zaporozhye", - "Europe/Zurich", - "Factory", - "GB", - "GB-Eire", - "GMT", - "GMT+0", - "GMT-0", - "GMT0", - "Greenwich", - "HST", - "Hongkong", - "Iceland", - "Indian/Antananarivo", - "Indian/Chagos", - "Indian/Christmas", - "Indian/Cocos", - "Indian/Comoro", - "Indian/Kerguelen", - "Indian/Mahe", - "Indian/Maldives", - "Indian/Mauritius", - "Indian/Mayotte", - "Indian/Reunion", - "Iran", - "Israel", - "Jamaica", - "Japan", - "Kwajalein", - "Libya", - "MET", - "MST", - "MST7MDT", - "Mexico/BajaNorte", - "Mexico/BajaSur", - "Mexico/General", - "NZ", - "NZ-CHAT", - "Navajo", - "PRC", - "PST8PDT", - "Pacific/Apia", - "Pacific/Auckland", - "Pacific/Bougainville", - "Pacific/Chatham", - "Pacific/Chuuk", - "Pacific/Easter", - "Pacific/Efate", - "Pacific/Enderbury", - "Pacific/Fakaofo", - "Pacific/Fiji", - "Pacific/Funafuti", - "Pacific/Galapagos", - "Pacific/Gambier", - "Pacific/Guadalcanal", - "Pacific/Guam", - "Pacific/Honolulu", - "Pacific/Johnston", - "Pacific/Kanton", - "Pacific/Kiritimati", - "Pacific/Kosrae", - "Pacific/Kwajalein", - "Pacific/Majuro", - "Pacific/Marquesas", - "Pacific/Midway", - "Pacific/Nauru", - "Pacific/Niue", - "Pacific/Norfolk", - "Pacific/Noumea", - "Pacific/Pago_Pago", - "Pacific/Palau", - "Pacific/Pitcairn", - "Pacific/Pohnpei", - "Pacific/Ponape", - "Pacific/Port_Moresby", - "Pacific/Rarotonga", - "Pacific/Saipan", - "Pacific/Samoa", - "Pacific/Tahiti", - "Pacific/Tarawa", - "Pacific/Tongatapu", - "Pacific/Truk", - "Pacific/Wake", - "Pacific/Wallis", - "Pacific/Yap", - "Poland", - "Portugal", - "ROC", - "ROK", - "Singapore", - "Turkey", - "UCT", - "US/Alaska", - "US/Aleutian", - "US/Arizona", - "US/Central", - "US/East-Indiana", - "US/Eastern", - "US/Hawaii", - "US/Indiana-Starke", - "US/Michigan", - "US/Mountain", - "US/Pacific", - "US/Pacific-New", - "US/Samoa", - "UTC", - "Universal", - "W-SU", - "WET", - "Zulu", - ] - ] - """ - The timezone to use for the start and end times. Defaults to UTC if not specified. - """ - value_grouping_window: NotRequired[ - Literal["day", "hour", "month", "week"] - ] - """ - Specifies what granularity to use when aggregating meter usage events. If not specified, a single event would be returned for the specified time range. - """ - - class RetrieveParamsMeter(TypedDict): - dimension_filters: NotRequired[Dict[str, str]] - """ - Key-value pairs used to filter usage events by meter dimension values. If specified, usage will be filtered for matching usage events. - """ - dimension_group_by_keys: NotRequired[List[str]] - """ - List of meter dimension keys to group by. If specified, usage events will be grouped by the given meter dimension key's values. - """ - meter: str - """ - Meter id to query usage for. - """ - tenant_filters: NotRequired[Dict[str, str]] - """ - Key-value pairs used to filter usage events by high cardinality tenant dimension values. If specified, usage will be filtered for matching usage events. - """ - livemode: bool """ Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. @@ -693,7 +36,7 @@ class RetrieveParamsMeter(TypedDict): @classmethod def retrieve( - cls, **params: Unpack["MeterUsage.RetrieveParams"] + cls, **params: Unpack["MeterUsageRetrieveParams"] ) -> "MeterUsage": """ Returns aggregated meter usage data for a customer within a specified time interval. The data can be grouped by various dimensions and can include multiple meters if specified. @@ -704,7 +47,7 @@ def retrieve( @classmethod async def retrieve_async( - cls, **params: Unpack["MeterUsage.RetrieveParams"] + cls, **params: Unpack["MeterUsageRetrieveParams"] ) -> "MeterUsage": """ Returns aggregated meter usage data for a customer within a specified time interval. The data can be grouped by various dimensions and can include multiple meters if specified. diff --git a/stripe/billing/analytics/_meter_usage_service.py b/stripe/billing/analytics/_meter_usage_service.py index 49654b8a4..3b77f980a 100644 --- a/stripe/billing/analytics/_meter_usage_service.py +++ b/stripe/billing/analytics/_meter_usage_service.py @@ -3,666 +3,19 @@ from stripe._request_options import RequestOptions from stripe._stripe_service import StripeService from stripe.billing.analytics._meter_usage import MeterUsage -from typing import Dict, List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params.billing.analytics._meter_usage_retrieve_params import ( + MeterUsageRetrieveParams, + ) -class MeterUsageService(StripeService): - class RetrieveParams(TypedDict): - customer: str - """ - The customer id to fetch meter usage data for. - """ - ends_at: int - """ - The timestamp from when to stop aggregating meter events (exclusive). Must be aligned with minute boundaries. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - meters: NotRequired[List["MeterUsageService.RetrieveParamsMeter"]] - """ - An array of meter parameters to specify which meters to include in the usage data. If not specified, usage across all meters for the customer is included. - """ - starts_at: int - """ - The timestamp from when to start aggregating meter events (inclusive). Must be aligned with minute boundaries. - """ - timezone: NotRequired[ - Literal[ - "Africa/Abidjan", - "Africa/Accra", - "Africa/Addis_Ababa", - "Africa/Algiers", - "Africa/Asmara", - "Africa/Asmera", - "Africa/Bamako", - "Africa/Bangui", - "Africa/Banjul", - "Africa/Bissau", - "Africa/Blantyre", - "Africa/Brazzaville", - "Africa/Bujumbura", - "Africa/Cairo", - "Africa/Casablanca", - "Africa/Ceuta", - "Africa/Conakry", - "Africa/Dakar", - "Africa/Dar_es_Salaam", - "Africa/Djibouti", - "Africa/Douala", - "Africa/El_Aaiun", - "Africa/Freetown", - "Africa/Gaborone", - "Africa/Harare", - "Africa/Johannesburg", - "Africa/Juba", - "Africa/Kampala", - "Africa/Khartoum", - "Africa/Kigali", - "Africa/Kinshasa", - "Africa/Lagos", - "Africa/Libreville", - "Africa/Lome", - "Africa/Luanda", - "Africa/Lubumbashi", - "Africa/Lusaka", - "Africa/Malabo", - "Africa/Maputo", - "Africa/Maseru", - "Africa/Mbabane", - "Africa/Mogadishu", - "Africa/Monrovia", - "Africa/Nairobi", - "Africa/Ndjamena", - "Africa/Niamey", - "Africa/Nouakchott", - "Africa/Ouagadougou", - "Africa/Porto-Novo", - "Africa/Sao_Tome", - "Africa/Timbuktu", - "Africa/Tripoli", - "Africa/Tunis", - "Africa/Windhoek", - "America/Adak", - "America/Anchorage", - "America/Anguilla", - "America/Antigua", - "America/Araguaina", - "America/Argentina/Buenos_Aires", - "America/Argentina/Catamarca", - "America/Argentina/ComodRivadavia", - "America/Argentina/Cordoba", - "America/Argentina/Jujuy", - "America/Argentina/La_Rioja", - "America/Argentina/Mendoza", - "America/Argentina/Rio_Gallegos", - "America/Argentina/Salta", - "America/Argentina/San_Juan", - "America/Argentina/San_Luis", - "America/Argentina/Tucuman", - "America/Argentina/Ushuaia", - "America/Aruba", - "America/Asuncion", - "America/Atikokan", - "America/Atka", - "America/Bahia", - "America/Bahia_Banderas", - "America/Barbados", - "America/Belem", - "America/Belize", - "America/Blanc-Sablon", - "America/Boa_Vista", - "America/Bogota", - "America/Boise", - "America/Buenos_Aires", - "America/Cambridge_Bay", - "America/Campo_Grande", - "America/Cancun", - "America/Caracas", - "America/Catamarca", - "America/Cayenne", - "America/Cayman", - "America/Chicago", - "America/Chihuahua", - "America/Ciudad_Juarez", - "America/Coral_Harbour", - "America/Cordoba", - "America/Costa_Rica", - "America/Coyhaique", - "America/Creston", - "America/Cuiaba", - "America/Curacao", - "America/Danmarkshavn", - "America/Dawson", - "America/Dawson_Creek", - "America/Denver", - "America/Detroit", - "America/Dominica", - "America/Edmonton", - "America/Eirunepe", - "America/El_Salvador", - "America/Ensenada", - "America/Fort_Nelson", - "America/Fort_Wayne", - "America/Fortaleza", - "America/Glace_Bay", - "America/Godthab", - "America/Goose_Bay", - "America/Grand_Turk", - "America/Grenada", - "America/Guadeloupe", - "America/Guatemala", - "America/Guayaquil", - "America/Guyana", - "America/Halifax", - "America/Havana", - "America/Hermosillo", - "America/Indiana/Indianapolis", - "America/Indiana/Knox", - "America/Indiana/Marengo", - "America/Indiana/Petersburg", - "America/Indiana/Tell_City", - "America/Indiana/Vevay", - "America/Indiana/Vincennes", - "America/Indiana/Winamac", - "America/Indianapolis", - "America/Inuvik", - "America/Iqaluit", - "America/Jamaica", - "America/Jujuy", - "America/Juneau", - "America/Kentucky/Louisville", - "America/Kentucky/Monticello", - "America/Knox_IN", - "America/Kralendijk", - "America/La_Paz", - "America/Lima", - "America/Los_Angeles", - "America/Louisville", - "America/Lower_Princes", - "America/Maceio", - "America/Managua", - "America/Manaus", - "America/Marigot", - "America/Martinique", - "America/Matamoros", - "America/Mazatlan", - "America/Mendoza", - "America/Menominee", - "America/Merida", - "America/Metlakatla", - "America/Mexico_City", - "America/Miquelon", - "America/Moncton", - "America/Monterrey", - "America/Montevideo", - "America/Montreal", - "America/Montserrat", - "America/Nassau", - "America/New_York", - "America/Nipigon", - "America/Nome", - "America/Noronha", - "America/North_Dakota/Beulah", - "America/North_Dakota/Center", - "America/North_Dakota/New_Salem", - "America/Nuuk", - "America/Ojinaga", - "America/Panama", - "America/Pangnirtung", - "America/Paramaribo", - "America/Phoenix", - "America/Port-au-Prince", - "America/Port_of_Spain", - "America/Porto_Acre", - "America/Porto_Velho", - "America/Puerto_Rico", - "America/Punta_Arenas", - "America/Rainy_River", - "America/Rankin_Inlet", - "America/Recife", - "America/Regina", - "America/Resolute", - "America/Rio_Branco", - "America/Rosario", - "America/Santa_Isabel", - "America/Santarem", - "America/Santiago", - "America/Santo_Domingo", - "America/Sao_Paulo", - "America/Scoresbysund", - "America/Shiprock", - "America/Sitka", - "America/St_Barthelemy", - "America/St_Johns", - "America/St_Kitts", - "America/St_Lucia", - "America/St_Thomas", - "America/St_Vincent", - "America/Swift_Current", - "America/Tegucigalpa", - "America/Thule", - "America/Thunder_Bay", - "America/Tijuana", - "America/Toronto", - "America/Tortola", - "America/Vancouver", - "America/Virgin", - "America/Whitehorse", - "America/Winnipeg", - "America/Yakutat", - "America/Yellowknife", - "Antarctica/Casey", - "Antarctica/Davis", - "Antarctica/DumontDUrville", - "Antarctica/Macquarie", - "Antarctica/Mawson", - "Antarctica/McMurdo", - "Antarctica/Palmer", - "Antarctica/Rothera", - "Antarctica/South_Pole", - "Antarctica/Syowa", - "Antarctica/Troll", - "Antarctica/Vostok", - "Arctic/Longyearbyen", - "Asia/Aden", - "Asia/Almaty", - "Asia/Amman", - "Asia/Anadyr", - "Asia/Aqtau", - "Asia/Aqtobe", - "Asia/Ashgabat", - "Asia/Ashkhabad", - "Asia/Atyrau", - "Asia/Baghdad", - "Asia/Bahrain", - "Asia/Baku", - "Asia/Bangkok", - "Asia/Barnaul", - "Asia/Beirut", - "Asia/Bishkek", - "Asia/Brunei", - "Asia/Calcutta", - "Asia/Chita", - "Asia/Choibalsan", - "Asia/Chongqing", - "Asia/Chungking", - "Asia/Colombo", - "Asia/Dacca", - "Asia/Damascus", - "Asia/Dhaka", - "Asia/Dili", - "Asia/Dubai", - "Asia/Dushanbe", - "Asia/Famagusta", - "Asia/Gaza", - "Asia/Harbin", - "Asia/Hebron", - "Asia/Ho_Chi_Minh", - "Asia/Hong_Kong", - "Asia/Hovd", - "Asia/Irkutsk", - "Asia/Istanbul", - "Asia/Jakarta", - "Asia/Jayapura", - "Asia/Jerusalem", - "Asia/Kabul", - "Asia/Kamchatka", - "Asia/Karachi", - "Asia/Kashgar", - "Asia/Kathmandu", - "Asia/Katmandu", - "Asia/Khandyga", - "Asia/Kolkata", - "Asia/Krasnoyarsk", - "Asia/Kuala_Lumpur", - "Asia/Kuching", - "Asia/Kuwait", - "Asia/Macao", - "Asia/Macau", - "Asia/Magadan", - "Asia/Makassar", - "Asia/Manila", - "Asia/Muscat", - "Asia/Nicosia", - "Asia/Novokuznetsk", - "Asia/Novosibirsk", - "Asia/Omsk", - "Asia/Oral", - "Asia/Phnom_Penh", - "Asia/Pontianak", - "Asia/Pyongyang", - "Asia/Qatar", - "Asia/Qostanay", - "Asia/Qyzylorda", - "Asia/Rangoon", - "Asia/Riyadh", - "Asia/Saigon", - "Asia/Sakhalin", - "Asia/Samarkand", - "Asia/Seoul", - "Asia/Shanghai", - "Asia/Singapore", - "Asia/Srednekolymsk", - "Asia/Taipei", - "Asia/Tashkent", - "Asia/Tbilisi", - "Asia/Tehran", - "Asia/Tel_Aviv", - "Asia/Thimbu", - "Asia/Thimphu", - "Asia/Tokyo", - "Asia/Tomsk", - "Asia/Ujung_Pandang", - "Asia/Ulaanbaatar", - "Asia/Ulan_Bator", - "Asia/Urumqi", - "Asia/Ust-Nera", - "Asia/Vientiane", - "Asia/Vladivostok", - "Asia/Yakutsk", - "Asia/Yangon", - "Asia/Yekaterinburg", - "Asia/Yerevan", - "Atlantic/Azores", - "Atlantic/Bermuda", - "Atlantic/Canary", - "Atlantic/Cape_Verde", - "Atlantic/Faeroe", - "Atlantic/Faroe", - "Atlantic/Jan_Mayen", - "Atlantic/Madeira", - "Atlantic/Reykjavik", - "Atlantic/South_Georgia", - "Atlantic/St_Helena", - "Atlantic/Stanley", - "Australia/ACT", - "Australia/Adelaide", - "Australia/Brisbane", - "Australia/Broken_Hill", - "Australia/Canberra", - "Australia/Currie", - "Australia/Darwin", - "Australia/Eucla", - "Australia/Hobart", - "Australia/LHI", - "Australia/Lindeman", - "Australia/Lord_Howe", - "Australia/Melbourne", - "Australia/NSW", - "Australia/North", - "Australia/Perth", - "Australia/Queensland", - "Australia/South", - "Australia/Sydney", - "Australia/Tasmania", - "Australia/Victoria", - "Australia/West", - "Australia/Yancowinna", - "Brazil/Acre", - "Brazil/DeNoronha", - "Brazil/East", - "Brazil/West", - "CET", - "CST6CDT", - "Canada/Atlantic", - "Canada/Central", - "Canada/Eastern", - "Canada/Mountain", - "Canada/Newfoundland", - "Canada/Pacific", - "Canada/Saskatchewan", - "Canada/Yukon", - "Chile/Continental", - "Chile/EasterIsland", - "Cuba", - "EET", - "EST", - "EST5EDT", - "Egypt", - "Eire", - "Etc/GMT", - "Etc/GMT+0", - "Etc/GMT+1", - "Etc/GMT+10", - "Etc/GMT+11", - "Etc/GMT+12", - "Etc/GMT+2", - "Etc/GMT+3", - "Etc/GMT+4", - "Etc/GMT+5", - "Etc/GMT+6", - "Etc/GMT+7", - "Etc/GMT+8", - "Etc/GMT+9", - "Etc/GMT-0", - "Etc/GMT-1", - "Etc/GMT-10", - "Etc/GMT-11", - "Etc/GMT-12", - "Etc/GMT-13", - "Etc/GMT-14", - "Etc/GMT-2", - "Etc/GMT-3", - "Etc/GMT-4", - "Etc/GMT-5", - "Etc/GMT-6", - "Etc/GMT-7", - "Etc/GMT-8", - "Etc/GMT-9", - "Etc/GMT0", - "Etc/Greenwich", - "Etc/UCT", - "Etc/UTC", - "Etc/Universal", - "Etc/Zulu", - "Europe/Amsterdam", - "Europe/Andorra", - "Europe/Astrakhan", - "Europe/Athens", - "Europe/Belfast", - "Europe/Belgrade", - "Europe/Berlin", - "Europe/Bratislava", - "Europe/Brussels", - "Europe/Bucharest", - "Europe/Budapest", - "Europe/Busingen", - "Europe/Chisinau", - "Europe/Copenhagen", - "Europe/Dublin", - "Europe/Gibraltar", - "Europe/Guernsey", - "Europe/Helsinki", - "Europe/Isle_of_Man", - "Europe/Istanbul", - "Europe/Jersey", - "Europe/Kaliningrad", - "Europe/Kiev", - "Europe/Kirov", - "Europe/Kyiv", - "Europe/Lisbon", - "Europe/Ljubljana", - "Europe/London", - "Europe/Luxembourg", - "Europe/Madrid", - "Europe/Malta", - "Europe/Mariehamn", - "Europe/Minsk", - "Europe/Monaco", - "Europe/Moscow", - "Europe/Nicosia", - "Europe/Oslo", - "Europe/Paris", - "Europe/Podgorica", - "Europe/Prague", - "Europe/Riga", - "Europe/Rome", - "Europe/Samara", - "Europe/San_Marino", - "Europe/Sarajevo", - "Europe/Saratov", - "Europe/Simferopol", - "Europe/Skopje", - "Europe/Sofia", - "Europe/Stockholm", - "Europe/Tallinn", - "Europe/Tirane", - "Europe/Tiraspol", - "Europe/Ulyanovsk", - "Europe/Uzhgorod", - "Europe/Vaduz", - "Europe/Vatican", - "Europe/Vienna", - "Europe/Vilnius", - "Europe/Volgograd", - "Europe/Warsaw", - "Europe/Zagreb", - "Europe/Zaporozhye", - "Europe/Zurich", - "Factory", - "GB", - "GB-Eire", - "GMT", - "GMT+0", - "GMT-0", - "GMT0", - "Greenwich", - "HST", - "Hongkong", - "Iceland", - "Indian/Antananarivo", - "Indian/Chagos", - "Indian/Christmas", - "Indian/Cocos", - "Indian/Comoro", - "Indian/Kerguelen", - "Indian/Mahe", - "Indian/Maldives", - "Indian/Mauritius", - "Indian/Mayotte", - "Indian/Reunion", - "Iran", - "Israel", - "Jamaica", - "Japan", - "Kwajalein", - "Libya", - "MET", - "MST", - "MST7MDT", - "Mexico/BajaNorte", - "Mexico/BajaSur", - "Mexico/General", - "NZ", - "NZ-CHAT", - "Navajo", - "PRC", - "PST8PDT", - "Pacific/Apia", - "Pacific/Auckland", - "Pacific/Bougainville", - "Pacific/Chatham", - "Pacific/Chuuk", - "Pacific/Easter", - "Pacific/Efate", - "Pacific/Enderbury", - "Pacific/Fakaofo", - "Pacific/Fiji", - "Pacific/Funafuti", - "Pacific/Galapagos", - "Pacific/Gambier", - "Pacific/Guadalcanal", - "Pacific/Guam", - "Pacific/Honolulu", - "Pacific/Johnston", - "Pacific/Kanton", - "Pacific/Kiritimati", - "Pacific/Kosrae", - "Pacific/Kwajalein", - "Pacific/Majuro", - "Pacific/Marquesas", - "Pacific/Midway", - "Pacific/Nauru", - "Pacific/Niue", - "Pacific/Norfolk", - "Pacific/Noumea", - "Pacific/Pago_Pago", - "Pacific/Palau", - "Pacific/Pitcairn", - "Pacific/Pohnpei", - "Pacific/Ponape", - "Pacific/Port_Moresby", - "Pacific/Rarotonga", - "Pacific/Saipan", - "Pacific/Samoa", - "Pacific/Tahiti", - "Pacific/Tarawa", - "Pacific/Tongatapu", - "Pacific/Truk", - "Pacific/Wake", - "Pacific/Wallis", - "Pacific/Yap", - "Poland", - "Portugal", - "ROC", - "ROK", - "Singapore", - "Turkey", - "UCT", - "US/Alaska", - "US/Aleutian", - "US/Arizona", - "US/Central", - "US/East-Indiana", - "US/Eastern", - "US/Hawaii", - "US/Indiana-Starke", - "US/Michigan", - "US/Mountain", - "US/Pacific", - "US/Pacific-New", - "US/Samoa", - "UTC", - "Universal", - "W-SU", - "WET", - "Zulu", - ] - ] - """ - The timezone to use for the start and end times. Defaults to UTC if not specified. - """ - value_grouping_window: NotRequired[ - Literal["day", "hour", "month", "week"] - ] - """ - Specifies what granularity to use when aggregating meter usage events. If not specified, a single event would be returned for the specified time range. - """ - - class RetrieveParamsMeter(TypedDict): - dimension_filters: NotRequired[Dict[str, str]] - """ - Key-value pairs used to filter usage events by meter dimension values. If specified, usage will be filtered for matching usage events. - """ - dimension_group_by_keys: NotRequired[List[str]] - """ - List of meter dimension keys to group by. If specified, usage events will be grouped by the given meter dimension key's values. - """ - meter: str - """ - Meter id to query usage for. - """ - tenant_filters: NotRequired[Dict[str, str]] - """ - Key-value pairs used to filter usage events by high cardinality tenant dimension values. If specified, usage will be filtered for matching usage events. - """ +class MeterUsageService(StripeService): def retrieve( self, - params: "MeterUsageService.RetrieveParams", + params: "MeterUsageRetrieveParams", options: Optional[RequestOptions] = None, ) -> MeterUsage: """ @@ -681,7 +34,7 @@ def retrieve( async def retrieve_async( self, - params: "MeterUsageService.RetrieveParams", + params: "MeterUsageRetrieveParams", options: Optional[RequestOptions] = None, ) -> MeterUsage: """ diff --git a/stripe/billing_portal/_configuration.py b/stripe/billing_portal/_configuration.py index a21a3c5d2..822a3acd7 100644 --- a/stripe/billing_portal/_configuration.py +++ b/stripe/billing_portal/_configuration.py @@ -4,21 +4,26 @@ from stripe._expandable_field import ExpandableField from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource -from stripe._request_options import RequestOptions from stripe._stripe_object import StripeObject from stripe._updateable_api_resource import UpdateableAPIResource from stripe._util import sanitize_id -from typing import ClassVar, Dict, List, Optional, Union, cast -from typing_extensions import ( - Literal, - NotRequired, - TypedDict, - Unpack, - TYPE_CHECKING, -) +from typing import ClassVar, Dict, List, Optional, cast +from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: from stripe._application import Application + from stripe.params.billing_portal._configuration_create_params import ( + ConfigurationCreateParams, + ) + from stripe.params.billing_portal._configuration_list_params import ( + ConfigurationListParams, + ) + from stripe.params.billing_portal._configuration_modify_params import ( + ConfigurationModifyParams, + ) + from stripe.params.billing_portal._configuration_retrieve_params import ( + ConfigurationRetrieveParams, + ) class Configuration( @@ -213,510 +218,6 @@ class LoginPage(StripeObject): A shareable URL to the hosted portal login page. Your customers will be able to log in with their [email](https://stripe.com/docs/api/customers/object#customer_object-email) and receive a link to their customer portal. """ - class CreateParams(RequestOptions): - business_profile: NotRequired[ - "Configuration.CreateParamsBusinessProfile" - ] - """ - The business information shown to customers in the portal. - """ - default_return_url: NotRequired["Literal['']|str"] - """ - The default URL to redirect customers to when they click on the portal's link to return to your website. This can be [overriden](https://stripe.com/docs/api/customer_portal/sessions/create#create_portal_session-return_url) when creating the session. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - features: "Configuration.CreateParamsFeatures" - """ - Information about the features available in the portal. - """ - login_page: NotRequired["Configuration.CreateParamsLoginPage"] - """ - The hosted login page for this configuration. Learn more about the portal login page in our [integration docs](https://stripe.com/docs/billing/subscriptions/integrating-customer-portal#share). - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - name: NotRequired["Literal['']|str"] - """ - The name of the configuration. - """ - - class CreateParamsBusinessProfile(TypedDict): - headline: NotRequired["Literal['']|str"] - """ - The messaging shown to customers in the portal. - """ - privacy_policy_url: NotRequired[str] - """ - A link to the business's publicly available privacy policy. - """ - terms_of_service_url: NotRequired[str] - """ - A link to the business's publicly available terms of service. - """ - - class CreateParamsFeatures(TypedDict): - customer_update: NotRequired[ - "Configuration.CreateParamsFeaturesCustomerUpdate" - ] - """ - Information about updating the customer details in the portal. - """ - invoice_history: NotRequired[ - "Configuration.CreateParamsFeaturesInvoiceHistory" - ] - """ - Information about showing the billing history in the portal. - """ - payment_method_update: NotRequired[ - "Configuration.CreateParamsFeaturesPaymentMethodUpdate" - ] - """ - Information about updating payment methods in the portal. - """ - subscription_cancel: NotRequired[ - "Configuration.CreateParamsFeaturesSubscriptionCancel" - ] - """ - Information about canceling subscriptions in the portal. - """ - subscription_update: NotRequired[ - "Configuration.CreateParamsFeaturesSubscriptionUpdate" - ] - """ - Information about updating subscriptions in the portal. - """ - - class CreateParamsFeaturesCustomerUpdate(TypedDict): - allowed_updates: NotRequired[ - "Literal['']|List[Literal['address', 'email', 'name', 'phone', 'shipping', 'tax_id']]" - ] - """ - The types of customer updates that are supported. When empty, customers are not updateable. - """ - enabled: bool - """ - Whether the feature is enabled. - """ - - class CreateParamsFeaturesInvoiceHistory(TypedDict): - enabled: bool - """ - Whether the feature is enabled. - """ - - class CreateParamsFeaturesPaymentMethodUpdate(TypedDict): - enabled: bool - """ - Whether the feature is enabled. - """ - - class CreateParamsFeaturesSubscriptionCancel(TypedDict): - cancellation_reason: NotRequired[ - "Configuration.CreateParamsFeaturesSubscriptionCancelCancellationReason" - ] - """ - Whether the cancellation reasons will be collected in the portal and which options are exposed to the customer - """ - enabled: bool - """ - Whether the feature is enabled. - """ - mode: NotRequired[Literal["at_period_end", "immediately"]] - """ - Whether to cancel subscriptions immediately or at the end of the billing period. - """ - proration_behavior: NotRequired[ - Literal["always_invoice", "create_prorations", "none"] - ] - """ - Whether to create prorations when canceling subscriptions. Possible values are `none` and `create_prorations`, which is only compatible with `mode=immediately`. Passing `always_invoice` will result in an error. No prorations are generated when canceling a subscription at the end of its natural billing period. - """ - - class CreateParamsFeaturesSubscriptionCancelCancellationReason(TypedDict): - enabled: bool - """ - Whether the feature is enabled. - """ - options: Union[ - Literal[""], - List[ - Literal[ - "customer_service", - "low_quality", - "missing_features", - "other", - "switched_service", - "too_complex", - "too_expensive", - "unused", - ] - ], - ] - """ - Which cancellation reasons will be given as options to the customer. - """ - - class CreateParamsFeaturesSubscriptionUpdate(TypedDict): - default_allowed_updates: NotRequired[ - "Literal['']|List[Literal['price', 'promotion_code', 'quantity']]" - ] - """ - The types of subscription updates that are supported. When empty, subscriptions are not updateable. - """ - enabled: bool - """ - Whether the feature is enabled. - """ - products: NotRequired[ - "Literal['']|List[Configuration.CreateParamsFeaturesSubscriptionUpdateProduct]" - ] - """ - The list of up to 10 products that support subscription updates. - """ - proration_behavior: NotRequired[ - Literal["always_invoice", "create_prorations", "none"] - ] - """ - Determines how to handle prorations resulting from subscription updates. Valid values are `none`, `create_prorations`, and `always_invoice`. - """ - schedule_at_period_end: NotRequired[ - "Configuration.CreateParamsFeaturesSubscriptionUpdateScheduleAtPeriodEnd" - ] - """ - Setting to control when an update should be scheduled at the end of the period instead of applying immediately. - """ - trial_update_behavior: NotRequired[ - Literal["continue_trial", "end_trial"] - ] - """ - The behavior when updating a subscription that is trialing. - """ - - class CreateParamsFeaturesSubscriptionUpdateProduct(TypedDict): - adjustable_quantity: NotRequired[ - "Configuration.CreateParamsFeaturesSubscriptionUpdateProductAdjustableQuantity" - ] - """ - Control whether the quantity of the product can be adjusted. - """ - prices: List[str] - """ - The list of price IDs for the product that a subscription can be updated to. - """ - product: str - """ - The product id. - """ - - class CreateParamsFeaturesSubscriptionUpdateProductAdjustableQuantity( - TypedDict, - ): - enabled: bool - """ - Set to true if the quantity can be adjusted to any non-negative integer. - """ - maximum: NotRequired[int] - """ - The maximum quantity that can be set for the product. - """ - minimum: NotRequired[int] - """ - The minimum quantity that can be set for the product. - """ - - class CreateParamsFeaturesSubscriptionUpdateScheduleAtPeriodEnd(TypedDict): - conditions: NotRequired[ - List[ - "Configuration.CreateParamsFeaturesSubscriptionUpdateScheduleAtPeriodEndCondition" - ] - ] - """ - List of conditions. When any condition is true, the update will be scheduled at the end of the current period. - """ - - class CreateParamsFeaturesSubscriptionUpdateScheduleAtPeriodEndCondition( - TypedDict, - ): - type: Literal["decreasing_item_amount", "shortening_interval"] - """ - The type of condition. - """ - - class CreateParamsLoginPage(TypedDict): - enabled: bool - """ - Set to `true` to generate a shareable URL [`login_page.url`](https://stripe.com/docs/api/customer_portal/configuration#portal_configuration_object-login_page-url) that will take your customers to a hosted login page for the customer portal. - """ - - class ListParams(RequestOptions): - active: NotRequired[bool] - """ - Only return configurations that are active or inactive (e.g., pass `true` to only list active configurations). - """ - 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. - """ - is_default: NotRequired[bool] - """ - Only return the default or non-default configurations (e.g., pass `true` to only list the default configuration). - """ - 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 ModifyParams(RequestOptions): - active: NotRequired[bool] - """ - Whether the configuration is active and can be used to create portal sessions. - """ - business_profile: NotRequired[ - "Configuration.ModifyParamsBusinessProfile" - ] - """ - The business information shown to customers in the portal. - """ - default_return_url: NotRequired["Literal['']|str"] - """ - The default URL to redirect customers to when they click on the portal's link to return to your website. This can be [overriden](https://stripe.com/docs/api/customer_portal/sessions/create#create_portal_session-return_url) when creating the session. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - features: NotRequired["Configuration.ModifyParamsFeatures"] - """ - Information about the features available in the portal. - """ - login_page: NotRequired["Configuration.ModifyParamsLoginPage"] - """ - The hosted login page for this configuration. Learn more about the portal login page in our [integration docs](https://stripe.com/docs/billing/subscriptions/integrating-customer-portal#share). - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - name: NotRequired["Literal['']|str"] - """ - The name of the configuration. - """ - - class ModifyParamsBusinessProfile(TypedDict): - headline: NotRequired["Literal['']|str"] - """ - The messaging shown to customers in the portal. - """ - privacy_policy_url: NotRequired["Literal['']|str"] - """ - A link to the business's publicly available privacy policy. - """ - terms_of_service_url: NotRequired["Literal['']|str"] - """ - A link to the business's publicly available terms of service. - """ - - class ModifyParamsFeatures(TypedDict): - customer_update: NotRequired[ - "Configuration.ModifyParamsFeaturesCustomerUpdate" - ] - """ - Information about updating the customer details in the portal. - """ - invoice_history: NotRequired[ - "Configuration.ModifyParamsFeaturesInvoiceHistory" - ] - """ - Information about showing the billing history in the portal. - """ - payment_method_update: NotRequired[ - "Configuration.ModifyParamsFeaturesPaymentMethodUpdate" - ] - """ - Information about updating payment methods in the portal. - """ - subscription_cancel: NotRequired[ - "Configuration.ModifyParamsFeaturesSubscriptionCancel" - ] - """ - Information about canceling subscriptions in the portal. - """ - subscription_update: NotRequired[ - "Configuration.ModifyParamsFeaturesSubscriptionUpdate" - ] - """ - Information about updating subscriptions in the portal. - """ - - class ModifyParamsFeaturesCustomerUpdate(TypedDict): - allowed_updates: NotRequired[ - "Literal['']|List[Literal['address', 'email', 'name', 'phone', 'shipping', 'tax_id']]" - ] - """ - The types of customer updates that are supported. When empty, customers are not updateable. - """ - enabled: NotRequired[bool] - """ - Whether the feature is enabled. - """ - - class ModifyParamsFeaturesInvoiceHistory(TypedDict): - enabled: bool - """ - Whether the feature is enabled. - """ - - class ModifyParamsFeaturesPaymentMethodUpdate(TypedDict): - enabled: bool - """ - Whether the feature is enabled. - """ - - class ModifyParamsFeaturesSubscriptionCancel(TypedDict): - cancellation_reason: NotRequired[ - "Configuration.ModifyParamsFeaturesSubscriptionCancelCancellationReason" - ] - """ - Whether the cancellation reasons will be collected in the portal and which options are exposed to the customer - """ - enabled: NotRequired[bool] - """ - Whether the feature is enabled. - """ - mode: NotRequired[Literal["at_period_end", "immediately"]] - """ - Whether to cancel subscriptions immediately or at the end of the billing period. - """ - proration_behavior: NotRequired[ - Literal["always_invoice", "create_prorations", "none"] - ] - """ - Whether to create prorations when canceling subscriptions. Possible values are `none` and `create_prorations`, which is only compatible with `mode=immediately`. Passing `always_invoice` will result in an error. No prorations are generated when canceling a subscription at the end of its natural billing period. - """ - - class ModifyParamsFeaturesSubscriptionCancelCancellationReason(TypedDict): - enabled: bool - """ - Whether the feature is enabled. - """ - options: NotRequired[ - "Literal['']|List[Literal['customer_service', 'low_quality', 'missing_features', 'other', 'switched_service', 'too_complex', 'too_expensive', 'unused']]" - ] - """ - Which cancellation reasons will be given as options to the customer. - """ - - class ModifyParamsFeaturesSubscriptionUpdate(TypedDict): - default_allowed_updates: NotRequired[ - "Literal['']|List[Literal['price', 'promotion_code', 'quantity']]" - ] - """ - The types of subscription updates that are supported. When empty, subscriptions are not updateable. - """ - enabled: NotRequired[bool] - """ - Whether the feature is enabled. - """ - products: NotRequired[ - "Literal['']|List[Configuration.ModifyParamsFeaturesSubscriptionUpdateProduct]" - ] - """ - The list of up to 10 products that support subscription updates. - """ - proration_behavior: NotRequired[ - Literal["always_invoice", "create_prorations", "none"] - ] - """ - Determines how to handle prorations resulting from subscription updates. Valid values are `none`, `create_prorations`, and `always_invoice`. - """ - schedule_at_period_end: NotRequired[ - "Configuration.ModifyParamsFeaturesSubscriptionUpdateScheduleAtPeriodEnd" - ] - """ - Setting to control when an update should be scheduled at the end of the period instead of applying immediately. - """ - trial_update_behavior: NotRequired[ - Literal["continue_trial", "end_trial"] - ] - """ - The behavior when updating a subscription that is trialing. - """ - - class ModifyParamsFeaturesSubscriptionUpdateProduct(TypedDict): - adjustable_quantity: NotRequired[ - "Configuration.ModifyParamsFeaturesSubscriptionUpdateProductAdjustableQuantity" - ] - """ - Control whether the quantity of the product can be adjusted. - """ - prices: List[str] - """ - The list of price IDs for the product that a subscription can be updated to. - """ - product: str - """ - The product id. - """ - - class ModifyParamsFeaturesSubscriptionUpdateProductAdjustableQuantity( - TypedDict, - ): - enabled: bool - """ - Set to true if the quantity can be adjusted to any non-negative integer. - """ - maximum: NotRequired[int] - """ - The maximum quantity that can be set for the product. - """ - minimum: NotRequired[int] - """ - The minimum quantity that can be set for the product. - """ - - class ModifyParamsFeaturesSubscriptionUpdateScheduleAtPeriodEnd(TypedDict): - conditions: NotRequired[ - "Literal['']|List[Configuration.ModifyParamsFeaturesSubscriptionUpdateScheduleAtPeriodEndCondition]" - ] - """ - List of conditions. When any condition is true, the update will be scheduled at the end of the current period. - """ - - class ModifyParamsFeaturesSubscriptionUpdateScheduleAtPeriodEndCondition( - TypedDict, - ): - type: Literal["decreasing_item_amount", "shortening_interval"] - """ - The type of condition. - """ - - class ModifyParamsLoginPage(TypedDict): - enabled: bool - """ - Set to `true` to generate a shareable URL [`login_page.url`](https://stripe.com/docs/api/customer_portal/configuration#portal_configuration_object-login_page-url) that will take your customers to a hosted login page for the customer portal. - - Set to `false` to deactivate the `login_page.url`. - """ - - class RetrieveParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - active: bool """ Whether the configuration is active and can be used to create portal sessions. @@ -767,7 +268,7 @@ class RetrieveParams(RequestOptions): @classmethod def create( - cls, **params: Unpack["Configuration.CreateParams"] + cls, **params: Unpack["ConfigurationCreateParams"] ) -> "Configuration": """ Creates a configuration that describes the functionality and behavior of a PortalSession @@ -783,7 +284,7 @@ def create( @classmethod async def create_async( - cls, **params: Unpack["Configuration.CreateParams"] + cls, **params: Unpack["ConfigurationCreateParams"] ) -> "Configuration": """ Creates a configuration that describes the functionality and behavior of a PortalSession @@ -799,7 +300,7 @@ async def create_async( @classmethod def list( - cls, **params: Unpack["Configuration.ListParams"] + cls, **params: Unpack["ConfigurationListParams"] ) -> ListObject["Configuration"]: """ Returns a list of configurations that describe the functionality of the customer portal. @@ -819,7 +320,7 @@ def list( @classmethod async def list_async( - cls, **params: Unpack["Configuration.ListParams"] + cls, **params: Unpack["ConfigurationListParams"] ) -> ListObject["Configuration"]: """ Returns a list of configurations that describe the functionality of the customer portal. @@ -839,7 +340,7 @@ async def list_async( @classmethod def modify( - cls, id: str, **params: Unpack["Configuration.ModifyParams"] + cls, id: str, **params: Unpack["ConfigurationModifyParams"] ) -> "Configuration": """ Updates a configuration that describes the functionality of the customer portal. @@ -856,7 +357,7 @@ def modify( @classmethod async def modify_async( - cls, id: str, **params: Unpack["Configuration.ModifyParams"] + cls, id: str, **params: Unpack["ConfigurationModifyParams"] ) -> "Configuration": """ Updates a configuration that describes the functionality of the customer portal. @@ -873,7 +374,7 @@ async def modify_async( @classmethod def retrieve( - cls, id: str, **params: Unpack["Configuration.RetrieveParams"] + cls, id: str, **params: Unpack["ConfigurationRetrieveParams"] ) -> "Configuration": """ Retrieves a configuration that describes the functionality of the customer portal. @@ -884,7 +385,7 @@ def retrieve( @classmethod async def retrieve_async( - cls, id: str, **params: Unpack["Configuration.RetrieveParams"] + cls, id: str, **params: Unpack["ConfigurationRetrieveParams"] ) -> "Configuration": """ Retrieves a configuration that describes the functionality of the customer portal. diff --git a/stripe/billing_portal/_configuration_service.py b/stripe/billing_portal/_configuration_service.py index b2836181a..bb48cc8e0 100644 --- a/stripe/billing_portal/_configuration_service.py +++ b/stripe/billing_portal/_configuration_service.py @@ -5,518 +5,28 @@ from stripe._stripe_service import StripeService from stripe._util import sanitize_id from stripe.billing_portal._configuration import Configuration -from typing import Dict, List, Optional, Union, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params.billing_portal._configuration_create_params import ( + ConfigurationCreateParams, + ) + from stripe.params.billing_portal._configuration_list_params import ( + ConfigurationListParams, + ) + from stripe.params.billing_portal._configuration_retrieve_params import ( + ConfigurationRetrieveParams, + ) + from stripe.params.billing_portal._configuration_update_params import ( + ConfigurationUpdateParams, + ) class ConfigurationService(StripeService): - class CreateParams(TypedDict): - business_profile: NotRequired[ - "ConfigurationService.CreateParamsBusinessProfile" - ] - """ - The business information shown to customers in the portal. - """ - default_return_url: NotRequired["Literal['']|str"] - """ - The default URL to redirect customers to when they click on the portal's link to return to your website. This can be [overriden](https://stripe.com/docs/api/customer_portal/sessions/create#create_portal_session-return_url) when creating the session. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - features: "ConfigurationService.CreateParamsFeatures" - """ - Information about the features available in the portal. - """ - login_page: NotRequired["ConfigurationService.CreateParamsLoginPage"] - """ - The hosted login page for this configuration. Learn more about the portal login page in our [integration docs](https://stripe.com/docs/billing/subscriptions/integrating-customer-portal#share). - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - name: NotRequired["Literal['']|str"] - """ - The name of the configuration. - """ - - class CreateParamsBusinessProfile(TypedDict): - headline: NotRequired["Literal['']|str"] - """ - The messaging shown to customers in the portal. - """ - privacy_policy_url: NotRequired[str] - """ - A link to the business's publicly available privacy policy. - """ - terms_of_service_url: NotRequired[str] - """ - A link to the business's publicly available terms of service. - """ - - class CreateParamsFeatures(TypedDict): - customer_update: NotRequired[ - "ConfigurationService.CreateParamsFeaturesCustomerUpdate" - ] - """ - Information about updating the customer details in the portal. - """ - invoice_history: NotRequired[ - "ConfigurationService.CreateParamsFeaturesInvoiceHistory" - ] - """ - Information about showing the billing history in the portal. - """ - payment_method_update: NotRequired[ - "ConfigurationService.CreateParamsFeaturesPaymentMethodUpdate" - ] - """ - Information about updating payment methods in the portal. - """ - subscription_cancel: NotRequired[ - "ConfigurationService.CreateParamsFeaturesSubscriptionCancel" - ] - """ - Information about canceling subscriptions in the portal. - """ - subscription_update: NotRequired[ - "ConfigurationService.CreateParamsFeaturesSubscriptionUpdate" - ] - """ - Information about updating subscriptions in the portal. - """ - - class CreateParamsFeaturesCustomerUpdate(TypedDict): - allowed_updates: NotRequired[ - "Literal['']|List[Literal['address', 'email', 'name', 'phone', 'shipping', 'tax_id']]" - ] - """ - The types of customer updates that are supported. When empty, customers are not updateable. - """ - enabled: bool - """ - Whether the feature is enabled. - """ - - class CreateParamsFeaturesInvoiceHistory(TypedDict): - enabled: bool - """ - Whether the feature is enabled. - """ - - class CreateParamsFeaturesPaymentMethodUpdate(TypedDict): - enabled: bool - """ - Whether the feature is enabled. - """ - - class CreateParamsFeaturesSubscriptionCancel(TypedDict): - cancellation_reason: NotRequired[ - "ConfigurationService.CreateParamsFeaturesSubscriptionCancelCancellationReason" - ] - """ - Whether the cancellation reasons will be collected in the portal and which options are exposed to the customer - """ - enabled: bool - """ - Whether the feature is enabled. - """ - mode: NotRequired[Literal["at_period_end", "immediately"]] - """ - Whether to cancel subscriptions immediately or at the end of the billing period. - """ - proration_behavior: NotRequired[ - Literal["always_invoice", "create_prorations", "none"] - ] - """ - Whether to create prorations when canceling subscriptions. Possible values are `none` and `create_prorations`, which is only compatible with `mode=immediately`. Passing `always_invoice` will result in an error. No prorations are generated when canceling a subscription at the end of its natural billing period. - """ - - class CreateParamsFeaturesSubscriptionCancelCancellationReason(TypedDict): - enabled: bool - """ - Whether the feature is enabled. - """ - options: Union[ - Literal[""], - List[ - Literal[ - "customer_service", - "low_quality", - "missing_features", - "other", - "switched_service", - "too_complex", - "too_expensive", - "unused", - ] - ], - ] - """ - Which cancellation reasons will be given as options to the customer. - """ - - class CreateParamsFeaturesSubscriptionUpdate(TypedDict): - default_allowed_updates: NotRequired[ - "Literal['']|List[Literal['price', 'promotion_code', 'quantity']]" - ] - """ - The types of subscription updates that are supported. When empty, subscriptions are not updateable. - """ - enabled: bool - """ - Whether the feature is enabled. - """ - products: NotRequired[ - "Literal['']|List[ConfigurationService.CreateParamsFeaturesSubscriptionUpdateProduct]" - ] - """ - The list of up to 10 products that support subscription updates. - """ - proration_behavior: NotRequired[ - Literal["always_invoice", "create_prorations", "none"] - ] - """ - Determines how to handle prorations resulting from subscription updates. Valid values are `none`, `create_prorations`, and `always_invoice`. - """ - schedule_at_period_end: NotRequired[ - "ConfigurationService.CreateParamsFeaturesSubscriptionUpdateScheduleAtPeriodEnd" - ] - """ - Setting to control when an update should be scheduled at the end of the period instead of applying immediately. - """ - trial_update_behavior: NotRequired[ - Literal["continue_trial", "end_trial"] - ] - """ - The behavior when updating a subscription that is trialing. - """ - - class CreateParamsFeaturesSubscriptionUpdateProduct(TypedDict): - adjustable_quantity: NotRequired[ - "ConfigurationService.CreateParamsFeaturesSubscriptionUpdateProductAdjustableQuantity" - ] - """ - Control whether the quantity of the product can be adjusted. - """ - prices: List[str] - """ - The list of price IDs for the product that a subscription can be updated to. - """ - product: str - """ - The product id. - """ - - class CreateParamsFeaturesSubscriptionUpdateProductAdjustableQuantity( - TypedDict, - ): - enabled: bool - """ - Set to true if the quantity can be adjusted to any non-negative integer. - """ - maximum: NotRequired[int] - """ - The maximum quantity that can be set for the product. - """ - minimum: NotRequired[int] - """ - The minimum quantity that can be set for the product. - """ - - class CreateParamsFeaturesSubscriptionUpdateScheduleAtPeriodEnd(TypedDict): - conditions: NotRequired[ - List[ - "ConfigurationService.CreateParamsFeaturesSubscriptionUpdateScheduleAtPeriodEndCondition" - ] - ] - """ - List of conditions. When any condition is true, the update will be scheduled at the end of the current period. - """ - - class CreateParamsFeaturesSubscriptionUpdateScheduleAtPeriodEndCondition( - TypedDict, - ): - type: Literal["decreasing_item_amount", "shortening_interval"] - """ - The type of condition. - """ - - class CreateParamsLoginPage(TypedDict): - enabled: bool - """ - Set to `true` to generate a shareable URL [`login_page.url`](https://stripe.com/docs/api/customer_portal/configuration#portal_configuration_object-login_page-url) that will take your customers to a hosted login page for the customer portal. - """ - - class ListParams(TypedDict): - active: NotRequired[bool] - """ - Only return configurations that are active or inactive (e.g., pass `true` to only list active configurations). - """ - 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. - """ - is_default: NotRequired[bool] - """ - Only return the default or non-default configurations (e.g., pass `true` to only list the default configuration). - """ - 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 RetrieveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class UpdateParams(TypedDict): - active: NotRequired[bool] - """ - Whether the configuration is active and can be used to create portal sessions. - """ - business_profile: NotRequired[ - "ConfigurationService.UpdateParamsBusinessProfile" - ] - """ - The business information shown to customers in the portal. - """ - default_return_url: NotRequired["Literal['']|str"] - """ - The default URL to redirect customers to when they click on the portal's link to return to your website. This can be [overriden](https://stripe.com/docs/api/customer_portal/sessions/create#create_portal_session-return_url) when creating the session. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - features: NotRequired["ConfigurationService.UpdateParamsFeatures"] - """ - Information about the features available in the portal. - """ - login_page: NotRequired["ConfigurationService.UpdateParamsLoginPage"] - """ - The hosted login page for this configuration. Learn more about the portal login page in our [integration docs](https://stripe.com/docs/billing/subscriptions/integrating-customer-portal#share). - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - name: NotRequired["Literal['']|str"] - """ - The name of the configuration. - """ - - class UpdateParamsBusinessProfile(TypedDict): - headline: NotRequired["Literal['']|str"] - """ - The messaging shown to customers in the portal. - """ - privacy_policy_url: NotRequired["Literal['']|str"] - """ - A link to the business's publicly available privacy policy. - """ - terms_of_service_url: NotRequired["Literal['']|str"] - """ - A link to the business's publicly available terms of service. - """ - - class UpdateParamsFeatures(TypedDict): - customer_update: NotRequired[ - "ConfigurationService.UpdateParamsFeaturesCustomerUpdate" - ] - """ - Information about updating the customer details in the portal. - """ - invoice_history: NotRequired[ - "ConfigurationService.UpdateParamsFeaturesInvoiceHistory" - ] - """ - Information about showing the billing history in the portal. - """ - payment_method_update: NotRequired[ - "ConfigurationService.UpdateParamsFeaturesPaymentMethodUpdate" - ] - """ - Information about updating payment methods in the portal. - """ - subscription_cancel: NotRequired[ - "ConfigurationService.UpdateParamsFeaturesSubscriptionCancel" - ] - """ - Information about canceling subscriptions in the portal. - """ - subscription_update: NotRequired[ - "ConfigurationService.UpdateParamsFeaturesSubscriptionUpdate" - ] - """ - Information about updating subscriptions in the portal. - """ - - class UpdateParamsFeaturesCustomerUpdate(TypedDict): - allowed_updates: NotRequired[ - "Literal['']|List[Literal['address', 'email', 'name', 'phone', 'shipping', 'tax_id']]" - ] - """ - The types of customer updates that are supported. When empty, customers are not updateable. - """ - enabled: NotRequired[bool] - """ - Whether the feature is enabled. - """ - - class UpdateParamsFeaturesInvoiceHistory(TypedDict): - enabled: bool - """ - Whether the feature is enabled. - """ - - class UpdateParamsFeaturesPaymentMethodUpdate(TypedDict): - enabled: bool - """ - Whether the feature is enabled. - """ - - class UpdateParamsFeaturesSubscriptionCancel(TypedDict): - cancellation_reason: NotRequired[ - "ConfigurationService.UpdateParamsFeaturesSubscriptionCancelCancellationReason" - ] - """ - Whether the cancellation reasons will be collected in the portal and which options are exposed to the customer - """ - enabled: NotRequired[bool] - """ - Whether the feature is enabled. - """ - mode: NotRequired[Literal["at_period_end", "immediately"]] - """ - Whether to cancel subscriptions immediately or at the end of the billing period. - """ - proration_behavior: NotRequired[ - Literal["always_invoice", "create_prorations", "none"] - ] - """ - Whether to create prorations when canceling subscriptions. Possible values are `none` and `create_prorations`, which is only compatible with `mode=immediately`. Passing `always_invoice` will result in an error. No prorations are generated when canceling a subscription at the end of its natural billing period. - """ - - class UpdateParamsFeaturesSubscriptionCancelCancellationReason(TypedDict): - enabled: bool - """ - Whether the feature is enabled. - """ - options: NotRequired[ - "Literal['']|List[Literal['customer_service', 'low_quality', 'missing_features', 'other', 'switched_service', 'too_complex', 'too_expensive', 'unused']]" - ] - """ - Which cancellation reasons will be given as options to the customer. - """ - - class UpdateParamsFeaturesSubscriptionUpdate(TypedDict): - default_allowed_updates: NotRequired[ - "Literal['']|List[Literal['price', 'promotion_code', 'quantity']]" - ] - """ - The types of subscription updates that are supported. When empty, subscriptions are not updateable. - """ - enabled: NotRequired[bool] - """ - Whether the feature is enabled. - """ - products: NotRequired[ - "Literal['']|List[ConfigurationService.UpdateParamsFeaturesSubscriptionUpdateProduct]" - ] - """ - The list of up to 10 products that support subscription updates. - """ - proration_behavior: NotRequired[ - Literal["always_invoice", "create_prorations", "none"] - ] - """ - Determines how to handle prorations resulting from subscription updates. Valid values are `none`, `create_prorations`, and `always_invoice`. - """ - schedule_at_period_end: NotRequired[ - "ConfigurationService.UpdateParamsFeaturesSubscriptionUpdateScheduleAtPeriodEnd" - ] - """ - Setting to control when an update should be scheduled at the end of the period instead of applying immediately. - """ - trial_update_behavior: NotRequired[ - Literal["continue_trial", "end_trial"] - ] - """ - The behavior when updating a subscription that is trialing. - """ - - class UpdateParamsFeaturesSubscriptionUpdateProduct(TypedDict): - adjustable_quantity: NotRequired[ - "ConfigurationService.UpdateParamsFeaturesSubscriptionUpdateProductAdjustableQuantity" - ] - """ - Control whether the quantity of the product can be adjusted. - """ - prices: List[str] - """ - The list of price IDs for the product that a subscription can be updated to. - """ - product: str - """ - The product id. - """ - - class UpdateParamsFeaturesSubscriptionUpdateProductAdjustableQuantity( - TypedDict, - ): - enabled: bool - """ - Set to true if the quantity can be adjusted to any non-negative integer. - """ - maximum: NotRequired[int] - """ - The maximum quantity that can be set for the product. - """ - minimum: NotRequired[int] - """ - The minimum quantity that can be set for the product. - """ - - class UpdateParamsFeaturesSubscriptionUpdateScheduleAtPeriodEnd(TypedDict): - conditions: NotRequired[ - "Literal['']|List[ConfigurationService.UpdateParamsFeaturesSubscriptionUpdateScheduleAtPeriodEndCondition]" - ] - """ - List of conditions. When any condition is true, the update will be scheduled at the end of the current period. - """ - - class UpdateParamsFeaturesSubscriptionUpdateScheduleAtPeriodEndCondition( - TypedDict, - ): - type: Literal["decreasing_item_amount", "shortening_interval"] - """ - The type of condition. - """ - - class UpdateParamsLoginPage(TypedDict): - enabled: bool - """ - Set to `true` to generate a shareable URL [`login_page.url`](https://stripe.com/docs/api/customer_portal/configuration#portal_configuration_object-login_page-url) that will take your customers to a hosted login page for the customer portal. - - Set to `false` to deactivate the `login_page.url`. - """ - def list( self, - params: Optional["ConfigurationService.ListParams"] = None, + params: Optional["ConfigurationListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[Configuration]: """ @@ -535,7 +45,7 @@ def list( async def list_async( self, - params: Optional["ConfigurationService.ListParams"] = None, + params: Optional["ConfigurationListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[Configuration]: """ @@ -554,7 +64,7 @@ async def list_async( def create( self, - params: "ConfigurationService.CreateParams", + params: "ConfigurationCreateParams", options: Optional[RequestOptions] = None, ) -> Configuration: """ @@ -573,7 +83,7 @@ def create( async def create_async( self, - params: "ConfigurationService.CreateParams", + params: "ConfigurationCreateParams", options: Optional[RequestOptions] = None, ) -> Configuration: """ @@ -593,7 +103,7 @@ async def create_async( def retrieve( self, configuration: str, - params: Optional["ConfigurationService.RetrieveParams"] = None, + params: Optional["ConfigurationRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Configuration: """ @@ -615,7 +125,7 @@ def retrieve( async def retrieve_async( self, configuration: str, - params: Optional["ConfigurationService.RetrieveParams"] = None, + params: Optional["ConfigurationRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Configuration: """ @@ -637,7 +147,7 @@ async def retrieve_async( def update( self, configuration: str, - params: Optional["ConfigurationService.UpdateParams"] = None, + params: Optional["ConfigurationUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> Configuration: """ @@ -659,7 +169,7 @@ def update( async def update_async( self, configuration: str, - params: Optional["ConfigurationService.UpdateParams"] = None, + params: Optional["ConfigurationUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> Configuration: """ diff --git a/stripe/billing_portal/_session.py b/stripe/billing_portal/_session.py index d6295f8e5..d1499dc8b 100644 --- a/stripe/billing_portal/_session.py +++ b/stripe/billing_portal/_session.py @@ -2,19 +2,15 @@ # File generated from our OpenAPI spec from stripe._createable_api_resource import CreateableAPIResource from stripe._expandable_field import ExpandableField -from stripe._request_options import RequestOptions from stripe._stripe_object import StripeObject from typing import ClassVar, List, Optional, cast -from typing_extensions import ( - Literal, - NotRequired, - TypedDict, - Unpack, - TYPE_CHECKING, -) +from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: from stripe.billing_portal._configuration import Configuration + from stripe.params.billing_portal._session_create_params import ( + SessionCreateParams, + ) class Session(CreateableAPIResource["Session"]): @@ -172,235 +168,6 @@ class Item(StripeObject): "subscription_update_confirm": SubscriptionUpdateConfirm, } - class CreateParams(RequestOptions): - configuration: NotRequired[str] - """ - The ID of an existing [configuration](https://stripe.com/docs/api/customer_portal/configuration) to use for this session, describing its functionality and features. If not specified, the session uses the default configuration. - """ - customer: NotRequired[str] - """ - The ID of an existing customer. - """ - customer_account: NotRequired[str] - """ - The ID of an existing account. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - flow_data: NotRequired["Session.CreateParamsFlowData"] - """ - Information about a specific flow for the customer to go through. See the [docs](https://stripe.com/docs/customer-management/portal-deep-links) to learn more about using customer portal deep links and flows. - """ - locale: NotRequired[ - Literal[ - "auto", - "bg", - "cs", - "da", - "de", - "el", - "en", - "en-AU", - "en-CA", - "en-GB", - "en-IE", - "en-IN", - "en-NZ", - "en-SG", - "es", - "es-419", - "et", - "fi", - "fil", - "fr", - "fr-CA", - "hr", - "hu", - "id", - "it", - "ja", - "ko", - "lt", - "lv", - "ms", - "mt", - "nb", - "nl", - "pl", - "pt", - "pt-BR", - "ro", - "ru", - "sk", - "sl", - "sv", - "th", - "tr", - "vi", - "zh", - "zh-HK", - "zh-TW", - ] - ] - """ - The IETF language tag of the locale customer portal is displayed in. If blank or auto, the customer's `preferred_locales` or browser's locale is used. - """ - on_behalf_of: NotRequired[str] - """ - The `on_behalf_of` account to use for this session. When specified, only subscriptions and invoices with this `on_behalf_of` account appear in the portal. For more information, see the [docs](https://stripe.com/docs/connect/separate-charges-and-transfers#settlement-merchant). Use the [Accounts API](https://stripe.com/docs/api/accounts/object#account_object-settings-branding) to modify the `on_behalf_of` account's branding settings, which the portal displays. - """ - return_url: NotRequired[str] - """ - The default URL to redirect customers to when they click on the portal's link to return to your website. - """ - - class CreateParamsFlowData(TypedDict): - after_completion: NotRequired[ - "Session.CreateParamsFlowDataAfterCompletion" - ] - """ - Behavior after the flow is completed. - """ - subscription_cancel: NotRequired[ - "Session.CreateParamsFlowDataSubscriptionCancel" - ] - """ - Configuration when `flow_data.type=subscription_cancel`. - """ - subscription_update: NotRequired[ - "Session.CreateParamsFlowDataSubscriptionUpdate" - ] - """ - Configuration when `flow_data.type=subscription_update`. - """ - subscription_update_confirm: NotRequired[ - "Session.CreateParamsFlowDataSubscriptionUpdateConfirm" - ] - """ - Configuration when `flow_data.type=subscription_update_confirm`. - """ - type: Literal[ - "payment_method_update", - "subscription_cancel", - "subscription_update", - "subscription_update_confirm", - ] - """ - Type of flow that the customer will go through. - """ - - class CreateParamsFlowDataAfterCompletion(TypedDict): - hosted_confirmation: NotRequired[ - "Session.CreateParamsFlowDataAfterCompletionHostedConfirmation" - ] - """ - Configuration when `after_completion.type=hosted_confirmation`. - """ - redirect: NotRequired[ - "Session.CreateParamsFlowDataAfterCompletionRedirect" - ] - """ - Configuration when `after_completion.type=redirect`. - """ - type: Literal["hosted_confirmation", "portal_homepage", "redirect"] - """ - The specified behavior after the flow is completed. - """ - - class CreateParamsFlowDataAfterCompletionHostedConfirmation(TypedDict): - custom_message: NotRequired[str] - """ - A custom message to display to the customer after the flow is completed. - """ - - class CreateParamsFlowDataAfterCompletionRedirect(TypedDict): - return_url: str - """ - The URL the customer will be redirected to after the flow is completed. - """ - - class CreateParamsFlowDataSubscriptionCancel(TypedDict): - retention: NotRequired[ - "Session.CreateParamsFlowDataSubscriptionCancelRetention" - ] - """ - Specify a retention strategy to be used in the cancellation flow. - """ - subscription: str - """ - The ID of the subscription to be canceled. - """ - - class CreateParamsFlowDataSubscriptionCancelRetention(TypedDict): - coupon_offer: "Session.CreateParamsFlowDataSubscriptionCancelRetentionCouponOffer" - """ - Configuration when `retention.type=coupon_offer`. - """ - type: Literal["coupon_offer"] - """ - Type of retention strategy to use with the customer. - """ - - class CreateParamsFlowDataSubscriptionCancelRetentionCouponOffer( - TypedDict - ): - coupon: str - """ - The ID of the coupon to be offered. - """ - - class CreateParamsFlowDataSubscriptionUpdate(TypedDict): - subscription: str - """ - The ID of the subscription to be updated. - """ - - class CreateParamsFlowDataSubscriptionUpdateConfirm(TypedDict): - discounts: NotRequired[ - List[ - "Session.CreateParamsFlowDataSubscriptionUpdateConfirmDiscount" - ] - ] - """ - The coupon or promotion code to apply to this subscription update. - """ - items: List[ - "Session.CreateParamsFlowDataSubscriptionUpdateConfirmItem" - ] - """ - The [subscription item](https://stripe.com/docs/api/subscription_items) to be updated through this flow. Currently, only up to one may be specified and subscriptions with multiple items are not updatable. - """ - subscription: str - """ - The ID of the subscription to be updated. - """ - - class CreateParamsFlowDataSubscriptionUpdateConfirmDiscount(TypedDict): - coupon: NotRequired[str] - """ - The ID of the coupon to apply to this subscription update. - """ - promotion_code: NotRequired[str] - """ - The ID of a promotion code to apply to this subscription update. - """ - - class CreateParamsFlowDataSubscriptionUpdateConfirmItem(TypedDict): - id: str - """ - The ID of the [subscription item](https://stripe.com/docs/api/subscriptions/object#subscription_object-items-data-id) to be updated. - """ - price: NotRequired[str] - """ - The price the customer should subscribe to through this flow. The price must also be included in the configuration's [`features.subscription_update.products`](https://stripe.com/docs/api/customer_portal/configuration#portal_configuration_object-features-subscription_update-products). - """ - quantity: NotRequired[int] - """ - [Quantity](https://stripe.com/docs/subscriptions/quantities) for this item that the customer should subscribe to through this flow. - """ - configuration: ExpandableField["Configuration"] """ The configuration used by this session, describing the features available. @@ -501,7 +268,7 @@ class CreateParamsFlowDataSubscriptionUpdateConfirmItem(TypedDict): """ @classmethod - def create(cls, **params: Unpack["Session.CreateParams"]) -> "Session": + def create(cls, **params: Unpack["SessionCreateParams"]) -> "Session": """ Creates a session of the customer portal. """ @@ -516,7 +283,7 @@ def create(cls, **params: Unpack["Session.CreateParams"]) -> "Session": @classmethod async def create_async( - cls, **params: Unpack["Session.CreateParams"] + cls, **params: Unpack["SessionCreateParams"] ) -> "Session": """ Creates a session of the customer portal. diff --git a/stripe/billing_portal/_session_service.py b/stripe/billing_portal/_session_service.py index 885e19b8a..89e72ced9 100644 --- a/stripe/billing_portal/_session_service.py +++ b/stripe/billing_portal/_session_service.py @@ -3,243 +3,19 @@ from stripe._request_options import RequestOptions from stripe._stripe_service import StripeService from stripe.billing_portal._session import Session -from typing import List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params.billing_portal._session_create_params import ( + SessionCreateParams, + ) -class SessionService(StripeService): - class CreateParams(TypedDict): - configuration: NotRequired[str] - """ - The ID of an existing [configuration](https://stripe.com/docs/api/customer_portal/configuration) to use for this session, describing its functionality and features. If not specified, the session uses the default configuration. - """ - customer: NotRequired[str] - """ - The ID of an existing customer. - """ - customer_account: NotRequired[str] - """ - The ID of an existing account. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - flow_data: NotRequired["SessionService.CreateParamsFlowData"] - """ - Information about a specific flow for the customer to go through. See the [docs](https://stripe.com/docs/customer-management/portal-deep-links) to learn more about using customer portal deep links and flows. - """ - locale: NotRequired[ - Literal[ - "auto", - "bg", - "cs", - "da", - "de", - "el", - "en", - "en-AU", - "en-CA", - "en-GB", - "en-IE", - "en-IN", - "en-NZ", - "en-SG", - "es", - "es-419", - "et", - "fi", - "fil", - "fr", - "fr-CA", - "hr", - "hu", - "id", - "it", - "ja", - "ko", - "lt", - "lv", - "ms", - "mt", - "nb", - "nl", - "pl", - "pt", - "pt-BR", - "ro", - "ru", - "sk", - "sl", - "sv", - "th", - "tr", - "vi", - "zh", - "zh-HK", - "zh-TW", - ] - ] - """ - The IETF language tag of the locale customer portal is displayed in. If blank or auto, the customer's `preferred_locales` or browser's locale is used. - """ - on_behalf_of: NotRequired[str] - """ - The `on_behalf_of` account to use for this session. When specified, only subscriptions and invoices with this `on_behalf_of` account appear in the portal. For more information, see the [docs](https://stripe.com/docs/connect/separate-charges-and-transfers#settlement-merchant). Use the [Accounts API](https://stripe.com/docs/api/accounts/object#account_object-settings-branding) to modify the `on_behalf_of` account's branding settings, which the portal displays. - """ - return_url: NotRequired[str] - """ - The default URL to redirect customers to when they click on the portal's link to return to your website. - """ - - class CreateParamsFlowData(TypedDict): - after_completion: NotRequired[ - "SessionService.CreateParamsFlowDataAfterCompletion" - ] - """ - Behavior after the flow is completed. - """ - subscription_cancel: NotRequired[ - "SessionService.CreateParamsFlowDataSubscriptionCancel" - ] - """ - Configuration when `flow_data.type=subscription_cancel`. - """ - subscription_update: NotRequired[ - "SessionService.CreateParamsFlowDataSubscriptionUpdate" - ] - """ - Configuration when `flow_data.type=subscription_update`. - """ - subscription_update_confirm: NotRequired[ - "SessionService.CreateParamsFlowDataSubscriptionUpdateConfirm" - ] - """ - Configuration when `flow_data.type=subscription_update_confirm`. - """ - type: Literal[ - "payment_method_update", - "subscription_cancel", - "subscription_update", - "subscription_update_confirm", - ] - """ - Type of flow that the customer will go through. - """ - - class CreateParamsFlowDataAfterCompletion(TypedDict): - hosted_confirmation: NotRequired[ - "SessionService.CreateParamsFlowDataAfterCompletionHostedConfirmation" - ] - """ - Configuration when `after_completion.type=hosted_confirmation`. - """ - redirect: NotRequired[ - "SessionService.CreateParamsFlowDataAfterCompletionRedirect" - ] - """ - Configuration when `after_completion.type=redirect`. - """ - type: Literal["hosted_confirmation", "portal_homepage", "redirect"] - """ - The specified behavior after the flow is completed. - """ - - class CreateParamsFlowDataAfterCompletionHostedConfirmation(TypedDict): - custom_message: NotRequired[str] - """ - A custom message to display to the customer after the flow is completed. - """ - - class CreateParamsFlowDataAfterCompletionRedirect(TypedDict): - return_url: str - """ - The URL the customer will be redirected to after the flow is completed. - """ - - class CreateParamsFlowDataSubscriptionCancel(TypedDict): - retention: NotRequired[ - "SessionService.CreateParamsFlowDataSubscriptionCancelRetention" - ] - """ - Specify a retention strategy to be used in the cancellation flow. - """ - subscription: str - """ - The ID of the subscription to be canceled. - """ - - class CreateParamsFlowDataSubscriptionCancelRetention(TypedDict): - coupon_offer: "SessionService.CreateParamsFlowDataSubscriptionCancelRetentionCouponOffer" - """ - Configuration when `retention.type=coupon_offer`. - """ - type: Literal["coupon_offer"] - """ - Type of retention strategy to use with the customer. - """ - - class CreateParamsFlowDataSubscriptionCancelRetentionCouponOffer( - TypedDict - ): - coupon: str - """ - The ID of the coupon to be offered. - """ - - class CreateParamsFlowDataSubscriptionUpdate(TypedDict): - subscription: str - """ - The ID of the subscription to be updated. - """ - - class CreateParamsFlowDataSubscriptionUpdateConfirm(TypedDict): - discounts: NotRequired[ - List[ - "SessionService.CreateParamsFlowDataSubscriptionUpdateConfirmDiscount" - ] - ] - """ - The coupon or promotion code to apply to this subscription update. - """ - items: List[ - "SessionService.CreateParamsFlowDataSubscriptionUpdateConfirmItem" - ] - """ - The [subscription item](https://stripe.com/docs/api/subscription_items) to be updated through this flow. Currently, only up to one may be specified and subscriptions with multiple items are not updatable. - """ - subscription: str - """ - The ID of the subscription to be updated. - """ - - class CreateParamsFlowDataSubscriptionUpdateConfirmDiscount(TypedDict): - coupon: NotRequired[str] - """ - The ID of the coupon to apply to this subscription update. - """ - promotion_code: NotRequired[str] - """ - The ID of a promotion code to apply to this subscription update. - """ - - class CreateParamsFlowDataSubscriptionUpdateConfirmItem(TypedDict): - id: str - """ - The ID of the [subscription item](https://stripe.com/docs/api/subscriptions/object#subscription_object-items-data-id) to be updated. - """ - price: NotRequired[str] - """ - The price the customer should subscribe to through this flow. The price must also be included in the configuration's [`features.subscription_update.products`](https://stripe.com/docs/api/customer_portal/configuration#portal_configuration_object-features-subscription_update-products). - """ - quantity: NotRequired[int] - """ - [Quantity](https://stripe.com/docs/subscriptions/quantities) for this item that the customer should subscribe to through this flow. - """ +class SessionService(StripeService): def create( self, - params: Optional["SessionService.CreateParams"] = None, + params: Optional["SessionCreateParams"] = None, options: Optional[RequestOptions] = None, ) -> Session: """ @@ -258,7 +34,7 @@ def create( async def create_async( self, - params: Optional["SessionService.CreateParams"] = None, + params: Optional["SessionCreateParams"] = None, options: Optional[RequestOptions] = None, ) -> Session: """ diff --git a/stripe/capital/_financing_offer.py b/stripe/capital/_financing_offer.py index 12ba9a8d1..d1323ba46 100644 --- a/stripe/capital/_financing_offer.py +++ b/stripe/capital/_financing_offer.py @@ -2,11 +2,21 @@ # File generated from our OpenAPI spec from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource -from stripe._request_options import RequestOptions from stripe._stripe_object import StripeObject from stripe._util import class_method_variant, sanitize_id -from typing import ClassVar, Dict, List, Optional, cast, overload -from typing_extensions import Literal, NotRequired, TypedDict, Unpack +from typing import ClassVar, Dict, Optional, cast, overload +from typing_extensions import Literal, Unpack, TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params.capital._financing_offer_list_params import ( + FinancingOfferListParams, + ) + from stripe.params.capital._financing_offer_mark_delivered_params import ( + FinancingOfferMarkDeliveredParams, + ) + from stripe.params.capital._financing_offer_retrieve_params import ( + FinancingOfferRetrieveParams, + ) class FinancingOffer(ListableAPIResource["FinancingOffer"]): @@ -73,79 +83,6 @@ class OfferedTerms(StripeObject): Per-transaction rate at which Stripe will withhold funds to repay the financing. """ - class ListParams(RequestOptions): - connected_account: NotRequired[str] - """ - limit list to offers belonging to given connected account - """ - created: NotRequired["FinancingOffer.ListParamsCreated|int"] - """ - Only return offers that were created during the given date interval. - """ - 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. - """ - status: NotRequired[ - Literal[ - "accepted", - "canceled", - "completed", - "delivered", - "expired", - "fully_repaid", - "paid_out", - "rejected", - "revoked", - "undelivered", - ] - ] - """ - limit list to offers with given status - """ - - class ListParamsCreated(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) - """ - - class MarkDeliveredParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class RetrieveParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - accepted_terms: Optional[AcceptedTerms] """ This is an object representing the terms of an offer of financing from @@ -229,7 +166,7 @@ class RetrieveParams(RequestOptions): @classmethod def list( - cls, **params: Unpack["FinancingOffer.ListParams"] + cls, **params: Unpack["FinancingOfferListParams"] ) -> ListObject["FinancingOffer"]: """ Retrieves the financing offers available for Connected accounts that belong to your platform. @@ -249,7 +186,7 @@ def list( @classmethod async def list_async( - cls, **params: Unpack["FinancingOffer.ListParams"] + cls, **params: Unpack["FinancingOfferListParams"] ) -> ListObject["FinancingOffer"]: """ Retrieves the financing offers available for Connected accounts that belong to your platform. @@ -271,7 +208,7 @@ async def list_async( def _cls_mark_delivered( cls, financing_offer: str, - **params: Unpack["FinancingOffer.MarkDeliveredParams"], + **params: Unpack["FinancingOfferMarkDeliveredParams"], ) -> "FinancingOffer": """ Acknowledges that platform has received and delivered the financing_offer to @@ -292,7 +229,7 @@ def _cls_mark_delivered( @staticmethod def mark_delivered( financing_offer: str, - **params: Unpack["FinancingOffer.MarkDeliveredParams"], + **params: Unpack["FinancingOfferMarkDeliveredParams"], ) -> "FinancingOffer": """ Acknowledges that platform has received and delivered the financing_offer to @@ -302,7 +239,7 @@ def mark_delivered( @overload def mark_delivered( - self, **params: Unpack["FinancingOffer.MarkDeliveredParams"] + self, **params: Unpack["FinancingOfferMarkDeliveredParams"] ) -> "FinancingOffer": """ Acknowledges that platform has received and delivered the financing_offer to @@ -312,7 +249,7 @@ def mark_delivered( @class_method_variant("_cls_mark_delivered") def mark_delivered( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["FinancingOffer.MarkDeliveredParams"] + self, **params: Unpack["FinancingOfferMarkDeliveredParams"] ) -> "FinancingOffer": """ Acknowledges that platform has received and delivered the financing_offer to @@ -333,7 +270,7 @@ def mark_delivered( # pyright: ignore[reportGeneralTypeIssues] async def _cls_mark_delivered_async( cls, financing_offer: str, - **params: Unpack["FinancingOffer.MarkDeliveredParams"], + **params: Unpack["FinancingOfferMarkDeliveredParams"], ) -> "FinancingOffer": """ Acknowledges that platform has received and delivered the financing_offer to @@ -354,7 +291,7 @@ async def _cls_mark_delivered_async( @staticmethod async def mark_delivered_async( financing_offer: str, - **params: Unpack["FinancingOffer.MarkDeliveredParams"], + **params: Unpack["FinancingOfferMarkDeliveredParams"], ) -> "FinancingOffer": """ Acknowledges that platform has received and delivered the financing_offer to @@ -364,7 +301,7 @@ async def mark_delivered_async( @overload async def mark_delivered_async( - self, **params: Unpack["FinancingOffer.MarkDeliveredParams"] + self, **params: Unpack["FinancingOfferMarkDeliveredParams"] ) -> "FinancingOffer": """ Acknowledges that platform has received and delivered the financing_offer to @@ -374,7 +311,7 @@ async def mark_delivered_async( @class_method_variant("_cls_mark_delivered_async") async def mark_delivered_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["FinancingOffer.MarkDeliveredParams"] + self, **params: Unpack["FinancingOfferMarkDeliveredParams"] ) -> "FinancingOffer": """ Acknowledges that platform has received and delivered the financing_offer to @@ -393,7 +330,7 @@ async def mark_delivered_async( # pyright: ignore[reportGeneralTypeIssues] @classmethod def retrieve( - cls, id: str, **params: Unpack["FinancingOffer.RetrieveParams"] + cls, id: str, **params: Unpack["FinancingOfferRetrieveParams"] ) -> "FinancingOffer": """ Get the details of the financing offer @@ -404,7 +341,7 @@ def retrieve( @classmethod async def retrieve_async( - cls, id: str, **params: Unpack["FinancingOffer.RetrieveParams"] + cls, id: str, **params: Unpack["FinancingOfferRetrieveParams"] ) -> "FinancingOffer": """ Get the details of the financing offer diff --git a/stripe/capital/_financing_offer_service.py b/stripe/capital/_financing_offer_service.py index d07ef1bdc..c685aec47 100644 --- a/stripe/capital/_financing_offer_service.py +++ b/stripe/capital/_financing_offer_service.py @@ -5,87 +5,25 @@ from stripe._stripe_service import StripeService from stripe._util import sanitize_id from stripe.capital._financing_offer import FinancingOffer -from typing import List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params.capital._financing_offer_list_params import ( + FinancingOfferListParams, + ) + from stripe.params.capital._financing_offer_mark_delivered_params import ( + FinancingOfferMarkDeliveredParams, + ) + from stripe.params.capital._financing_offer_retrieve_params import ( + FinancingOfferRetrieveParams, + ) -class FinancingOfferService(StripeService): - class ListParams(TypedDict): - connected_account: NotRequired[str] - """ - limit list to offers belonging to given connected account - """ - created: NotRequired["FinancingOfferService.ListParamsCreated|int"] - """ - Only return offers that were created during the given date interval. - """ - 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. - """ - status: NotRequired[ - Literal[ - "accepted", - "canceled", - "completed", - "delivered", - "expired", - "fully_repaid", - "paid_out", - "rejected", - "revoked", - "undelivered", - ] - ] - """ - limit list to offers with given status - """ - - class ListParamsCreated(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) - """ - - class MarkDeliveredParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class RetrieveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ +class FinancingOfferService(StripeService): def list( self, - params: Optional["FinancingOfferService.ListParams"] = None, + params: Optional["FinancingOfferListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[FinancingOffer]: """ @@ -104,7 +42,7 @@ def list( async def list_async( self, - params: Optional["FinancingOfferService.ListParams"] = None, + params: Optional["FinancingOfferListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[FinancingOffer]: """ @@ -124,7 +62,7 @@ async def list_async( def retrieve( self, financing_offer: str, - params: Optional["FinancingOfferService.RetrieveParams"] = None, + params: Optional["FinancingOfferRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> FinancingOffer: """ @@ -146,7 +84,7 @@ def retrieve( async def retrieve_async( self, financing_offer: str, - params: Optional["FinancingOfferService.RetrieveParams"] = None, + params: Optional["FinancingOfferRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> FinancingOffer: """ @@ -168,7 +106,7 @@ async def retrieve_async( def mark_delivered( self, financing_offer: str, - params: Optional["FinancingOfferService.MarkDeliveredParams"] = None, + params: Optional["FinancingOfferMarkDeliveredParams"] = None, options: Optional[RequestOptions] = None, ) -> FinancingOffer: """ @@ -191,7 +129,7 @@ def mark_delivered( async def mark_delivered_async( self, financing_offer: str, - params: Optional["FinancingOfferService.MarkDeliveredParams"] = None, + params: Optional["FinancingOfferMarkDeliveredParams"] = None, options: Optional[RequestOptions] = None, ) -> FinancingOffer: """ diff --git a/stripe/capital/_financing_summary.py b/stripe/capital/_financing_summary.py index 92db68015..e50643321 100644 --- a/stripe/capital/_financing_summary.py +++ b/stripe/capital/_financing_summary.py @@ -1,10 +1,14 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec -from stripe._request_options import RequestOptions from stripe._singleton_api_resource import SingletonAPIResource from stripe._stripe_object import StripeObject -from typing import ClassVar, List, Optional -from typing_extensions import Literal, NotRequired, Unpack +from typing import ClassVar, Optional +from typing_extensions import Literal, Unpack, TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params.capital._financing_summary_retrieve_params import ( + FinancingSummaryRetrieveParams, + ) class FinancingSummary(SingletonAPIResource["FinancingSummary"]): @@ -73,12 +77,6 @@ class CurrentRepaymentInterval(StripeObject): "current_repayment_interval": CurrentRepaymentInterval, } - class RetrieveParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - details: Optional[Details] """ Additional information about the financing summary. Describes currency, advance amount, @@ -100,7 +98,7 @@ class RetrieveParams(RequestOptions): @classmethod def retrieve( - cls, **params: Unpack["FinancingSummary.RetrieveParams"] + cls, **params: Unpack["FinancingSummaryRetrieveParams"] ) -> "FinancingSummary": """ Retrieve the financing state for the account that was authenticated in the request. @@ -111,7 +109,7 @@ def retrieve( @classmethod async def retrieve_async( - cls, **params: Unpack["FinancingSummary.RetrieveParams"] + cls, **params: Unpack["FinancingSummaryRetrieveParams"] ) -> "FinancingSummary": """ Retrieve the financing state for the account that was authenticated in the request. diff --git a/stripe/capital/_financing_summary_service.py b/stripe/capital/_financing_summary_service.py index bbe21d4a9..d0f2134fa 100644 --- a/stripe/capital/_financing_summary_service.py +++ b/stripe/capital/_financing_summary_service.py @@ -3,20 +3,19 @@ from stripe._request_options import RequestOptions from stripe._stripe_service import StripeService from stripe.capital._financing_summary import FinancingSummary -from typing import List, Optional, cast -from typing_extensions import NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params.capital._financing_summary_retrieve_params import ( + FinancingSummaryRetrieveParams, + ) -class FinancingSummaryService(StripeService): - class RetrieveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ +class FinancingSummaryService(StripeService): def retrieve( self, - params: Optional["FinancingSummaryService.RetrieveParams"] = None, + params: Optional["FinancingSummaryRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> FinancingSummary: """ @@ -35,7 +34,7 @@ def retrieve( async def retrieve_async( self, - params: Optional["FinancingSummaryService.RetrieveParams"] = None, + params: Optional["FinancingSummaryRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> FinancingSummary: """ diff --git a/stripe/capital/_financing_transaction.py b/stripe/capital/_financing_transaction.py index d28a26098..e8b8420b6 100644 --- a/stripe/capital/_financing_transaction.py +++ b/stripe/capital/_financing_transaction.py @@ -2,10 +2,17 @@ # File generated from our OpenAPI spec from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource -from stripe._request_options import RequestOptions from stripe._stripe_object import StripeObject -from typing import ClassVar, List, Optional -from typing_extensions import Literal, NotRequired, Unpack +from typing import ClassVar, Optional +from typing_extensions import Literal, Unpack, TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params.capital._financing_transaction_list_params import ( + FinancingTransactionListParams, + ) + from stripe.params.capital._financing_transaction_retrieve_params import ( + FinancingTransactionRetrieveParams, + ) class FinancingTransaction(ListableAPIResource["FinancingTransaction"]): @@ -74,46 +81,6 @@ class Transaction(StripeObject): """ _inner_class_types = {"transaction": Transaction} - class ListParams(RequestOptions): - charge: NotRequired[str] - """ - For transactions of type `paydown` and reason `automatic_withholding` only, only returns transactions that were created as a result of this charge. - """ - 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. - """ - financing_offer: NotRequired[str] - """ - Returns transactions that were created that apply to this financing offer ID. - """ - 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. - """ - reversed_transaction: NotRequired[str] - """ - Only returns transactions that are responsible for reversing this financing transaction ID. - """ - 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. - """ - treasury_transaction: NotRequired[str] - """ - For transactions of type `paydown` and reason `automatic_withholding` only, only returns transactions that were created as a result of this Treasury Transaction. - """ - - class RetrieveParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - account: str """ The ID of the merchant associated with this financing transaction. @@ -159,7 +126,7 @@ class RetrieveParams(RequestOptions): @classmethod def list( - cls, **params: Unpack["FinancingTransaction.ListParams"] + cls, **params: Unpack["FinancingTransactionListParams"] ) -> ListObject["FinancingTransaction"]: """ Returns a list of financing transactions. The transactions are returned in sorted order, @@ -180,7 +147,7 @@ def list( @classmethod async def list_async( - cls, **params: Unpack["FinancingTransaction.ListParams"] + cls, **params: Unpack["FinancingTransactionListParams"] ) -> ListObject["FinancingTransaction"]: """ Returns a list of financing transactions. The transactions are returned in sorted order, @@ -201,7 +168,7 @@ async def list_async( @classmethod def retrieve( - cls, id: str, **params: Unpack["FinancingTransaction.RetrieveParams"] + cls, id: str, **params: Unpack["FinancingTransactionRetrieveParams"] ) -> "FinancingTransaction": """ Retrieves a financing transaction for a financing offer. @@ -212,7 +179,7 @@ def retrieve( @classmethod async def retrieve_async( - cls, id: str, **params: Unpack["FinancingTransaction.RetrieveParams"] + cls, id: str, **params: Unpack["FinancingTransactionRetrieveParams"] ) -> "FinancingTransaction": """ Retrieves a financing transaction for a financing offer. diff --git a/stripe/capital/_financing_transaction_service.py b/stripe/capital/_financing_transaction_service.py index 80079c406..238def8bd 100644 --- a/stripe/capital/_financing_transaction_service.py +++ b/stripe/capital/_financing_transaction_service.py @@ -5,54 +5,22 @@ from stripe._stripe_service import StripeService from stripe._util import sanitize_id from stripe.capital._financing_transaction import FinancingTransaction -from typing import List, Optional, cast -from typing_extensions import NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params.capital._financing_transaction_list_params import ( + FinancingTransactionListParams, + ) + from stripe.params.capital._financing_transaction_retrieve_params import ( + FinancingTransactionRetrieveParams, + ) -class FinancingTransactionService(StripeService): - class ListParams(TypedDict): - charge: NotRequired[str] - """ - For transactions of type `paydown` and reason `automatic_withholding` only, only returns transactions that were created as a result of this charge. - """ - 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. - """ - financing_offer: NotRequired[str] - """ - Returns transactions that were created that apply to this financing offer ID. - """ - 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. - """ - reversed_transaction: NotRequired[str] - """ - Only returns transactions that are responsible for reversing this financing transaction ID. - """ - 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. - """ - treasury_transaction: NotRequired[str] - """ - For transactions of type `paydown` and reason `automatic_withholding` only, only returns transactions that were created as a result of this Treasury Transaction. - """ - - class RetrieveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ +class FinancingTransactionService(StripeService): def list( self, - params: Optional["FinancingTransactionService.ListParams"] = None, + params: Optional["FinancingTransactionListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[FinancingTransaction]: """ @@ -72,7 +40,7 @@ def list( async def list_async( self, - params: Optional["FinancingTransactionService.ListParams"] = None, + params: Optional["FinancingTransactionListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[FinancingTransaction]: """ @@ -93,7 +61,7 @@ async def list_async( def retrieve( self, financing_transaction: str, - params: Optional["FinancingTransactionService.RetrieveParams"] = None, + params: Optional["FinancingTransactionRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> FinancingTransaction: """ @@ -115,7 +83,7 @@ def retrieve( async def retrieve_async( self, financing_transaction: str, - params: Optional["FinancingTransactionService.RetrieveParams"] = None, + params: Optional["FinancingTransactionRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> FinancingTransaction: """ diff --git a/stripe/checkout/_session.py b/stripe/checkout/_session.py index 332c2c7b7..87a930f65 100644 --- a/stripe/checkout/_session.py +++ b/stripe/checkout/_session.py @@ -4,18 +4,11 @@ from stripe._expandable_field import ExpandableField from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource -from stripe._request_options import RequestOptions from stripe._stripe_object import StripeObject from stripe._updateable_api_resource import UpdateableAPIResource from stripe._util import class_method_variant, sanitize_id from typing import ClassVar, Dict, List, Optional, cast, overload -from typing_extensions import ( - Literal, - NotRequired, - TypedDict, - Unpack, - TYPE_CHECKING, -) +from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: from stripe._account import Account @@ -32,6 +25,22 @@ from stripe._subscription import Subscription from stripe._tax_id import TaxId as TaxIdResource from stripe._tax_rate import TaxRate + from stripe.params.checkout._session_create_params import ( + SessionCreateParams, + ) + from stripe.params.checkout._session_expire_params import ( + SessionExpireParams, + ) + from stripe.params.checkout._session_list_line_items_params import ( + SessionListLineItemsParams, + ) + from stripe.params.checkout._session_list_params import SessionListParams + from stripe.params.checkout._session_modify_params import ( + SessionModifyParams, + ) + from stripe.params.checkout._session_retrieve_params import ( + SessionRetrieveParams, + ) class Session( @@ -2408,3627 +2417,6 @@ class Link(StripeObject): link: Optional[Link] _inner_class_types = {"link": Link} - class CreateParams(RequestOptions): - adaptive_pricing: NotRequired["Session.CreateParamsAdaptivePricing"] - """ - Settings for price localization with [Adaptive Pricing](https://docs.stripe.com/payments/checkout/adaptive-pricing). - """ - after_expiration: NotRequired["Session.CreateParamsAfterExpiration"] - """ - Configure actions after a Checkout Session has expired. - """ - allow_promotion_codes: NotRequired[bool] - """ - Enables user redeemable promotion codes. - """ - automatic_tax: NotRequired["Session.CreateParamsAutomaticTax"] - """ - Settings for automatic tax lookup for this session and resulting payments, invoices, and subscriptions. - """ - billing_address_collection: NotRequired[Literal["auto", "required"]] - """ - Specify whether Checkout should collect the customer's billing address. Defaults to `auto`. - """ - branding_settings: NotRequired["Session.CreateParamsBrandingSettings"] - """ - The branding settings for the Checkout Session. This parameter is not allowed if ui_mode is `custom`. - """ - cancel_url: NotRequired[str] - """ - If set, Checkout displays a back button and customers will be directed to this URL if they decide to cancel payment and return to your website. This parameter is not allowed if ui_mode is `embedded` or `custom`. - """ - client_reference_id: NotRequired[str] - """ - A unique string to reference the Checkout Session. This can be a - customer ID, a cart ID, or similar, and can be used to reconcile the - session with your internal systems. - """ - consent_collection: NotRequired[ - "Session.CreateParamsConsentCollection" - ] - """ - Configure fields for the Checkout Session to gather active consent from customers. - """ - currency: NotRequired[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). Required in `setup` mode when `payment_method_types` is not set. - """ - custom_fields: NotRequired[List["Session.CreateParamsCustomField"]] - """ - Collect additional information from your customer using custom fields. Up to 3 fields are supported. - """ - custom_text: NotRequired["Session.CreateParamsCustomText"] - """ - Display additional text for your customers using custom text. - """ - customer: NotRequired[str] - """ - ID of an existing Customer, if one exists. In `payment` mode, the customer's most recently saved card - payment method will be used to prefill the email, name, card details, and billing address - on the Checkout page. In `subscription` mode, the customer's [default payment method](https://stripe.com/docs/api/customers/update#update_customer-invoice_settings-default_payment_method) - will be used if it's a card, otherwise the most recently saved card will be used. A valid billing address, billing name and billing email are required on the payment method for Checkout to prefill the customer's card details. - - If the Customer already has a valid [email](https://stripe.com/docs/api/customers/object#customer_object-email) set, the email will be prefilled and not editable in Checkout. - If the Customer does not have a valid `email`, Checkout will set the email entered during the session on the Customer. - - If blank for Checkout Sessions in `subscription` mode or with `customer_creation` set as `always` in `payment` mode, Checkout will create a new Customer object based on information provided during the payment flow. - - You can set [`payment_intent_data.setup_future_usage`](https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-payment_intent_data-setup_future_usage) to have Checkout automatically attach the payment method to the Customer you pass in for future reuse. - """ - customer_account: NotRequired[str] - """ - ID of an existing Account, if one exists. Has the same behavior as `customer`. - """ - customer_creation: NotRequired[Literal["always", "if_required"]] - """ - Configure whether a Checkout Session creates a [Customer](https://stripe.com/docs/api/customers) during Session confirmation. - - When a Customer is not created, you can still retrieve email, address, and other customer data entered in Checkout - with [customer_details](https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-customer_details). - - Sessions that don't create Customers instead are grouped by [guest customers](https://stripe.com/docs/payments/checkout/guest-customers) - in the Dashboard. Promotion codes limited to first time customers will return invalid for these Sessions. - - Can only be set in `payment` and `setup` mode. - """ - customer_email: NotRequired[str] - """ - If provided, this value will be used when the Customer object is created. - If not provided, customers will be asked to enter their email address. - Use this parameter to prefill customer data if you already have an email - on file. To access information about the customer once a session is - complete, use the `customer` field. - """ - customer_update: NotRequired["Session.CreateParamsCustomerUpdate"] - """ - Controls what fields on Customer can be updated by the Checkout Session. Can only be provided when `customer` is provided. - """ - discounts: NotRequired[List["Session.CreateParamsDiscount"]] - """ - The coupon or promotion code to apply to this Session. Currently, only up to one may be specified. - """ - excluded_payment_method_types: NotRequired[ - List[ - Literal[ - "acss_debit", - "affirm", - "afterpay_clearpay", - "alipay", - "alma", - "amazon_pay", - "au_becs_debit", - "bacs_debit", - "bancontact", - "billie", - "blik", - "boleto", - "card", - "cashapp", - "crypto", - "customer_balance", - "eps", - "fpx", - "giropay", - "gopay", - "grabpay", - "ideal", - "kakao_pay", - "klarna", - "konbini", - "kr_card", - "mb_way", - "mobilepay", - "multibanco", - "naver_pay", - "nz_bank_account", - "oxxo", - "p24", - "pay_by_bank", - "payco", - "paynow", - "paypal", - "paypay", - "payto", - "pix", - "promptpay", - "qris", - "rechnung", - "revolut_pay", - "samsung_pay", - "satispay", - "sepa_debit", - "shopeepay", - "sofort", - "swish", - "twint", - "us_bank_account", - "wechat_pay", - "zip", - ] - ] - ] - """ - A list of the types of payment methods (e.g., `card`) that should be excluded from this Checkout Session. This should only be used when payment methods for this Checkout Session are managed through the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - expires_at: NotRequired[int] - """ - The Epoch time in seconds at which the Checkout Session will expire. It can be anywhere from 30 minutes to 24 hours after Checkout Session creation. By default, this value is 24 hours from creation. - """ - invoice_creation: NotRequired["Session.CreateParamsInvoiceCreation"] - """ - Generate a post-purchase Invoice for one-time payments. - """ - line_items: NotRequired[List["Session.CreateParamsLineItem"]] - """ - A list of items the customer is purchasing. Use this parameter to pass one-time or recurring [Prices](https://stripe.com/docs/api/prices). The parameter is required for `payment` and `subscription` mode. - - For `payment` mode, there is a maximum of 100 line items, however it is recommended to consolidate line items if there are more than a few dozen. - - For `subscription` mode, there is a maximum of 20 line items with recurring Prices and 20 line items with one-time Prices. Line items with one-time Prices will be on the initial invoice only. - """ - locale: NotRequired[ - Literal[ - "auto", - "bg", - "cs", - "da", - "de", - "el", - "en", - "en-GB", - "es", - "es-419", - "et", - "fi", - "fil", - "fr", - "fr-CA", - "hr", - "hu", - "id", - "it", - "ja", - "ko", - "lt", - "lv", - "ms", - "mt", - "nb", - "nl", - "pl", - "pt", - "pt-BR", - "ro", - "ru", - "sk", - "sl", - "sv", - "th", - "tr", - "vi", - "zh", - "zh-HK", - "zh-TW", - ] - ] - """ - The IETF language tag of the locale Checkout is displayed in. If blank or `auto`, the browser's locale is used. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - mode: NotRequired[Literal["payment", "setup", "subscription"]] - """ - The mode of the Checkout Session. Pass `subscription` if the Checkout Session includes at least one recurring item. - """ - name_collection: NotRequired["Session.CreateParamsNameCollection"] - """ - Controls name collection settings for the session. - - You can configure Checkout to collect your customers' business names, individual names, or both. Each name field can be either required or optional. - - If a [Customer](https://stripe.com/docs/api/customers) is created or provided, the names can be saved to the Customer object as well. - """ - optional_items: NotRequired[List["Session.CreateParamsOptionalItem"]] - """ - A list of optional items the customer can add to their order at checkout. Use this parameter to pass one-time or recurring [Prices](https://stripe.com/docs/api/prices). - - There is a maximum of 10 optional items allowed on a Checkout Session, and the existing limits on the number of line items allowed on a Checkout Session apply to the combined number of line items and optional items. - - For `payment` mode, there is a maximum of 100 combined line items and optional items, however it is recommended to consolidate items if there are more than a few dozen. - - For `subscription` mode, there is a maximum of 20 line items and optional items with recurring Prices and 20 line items and optional items with one-time Prices. - """ - origin_context: NotRequired[Literal["mobile_app", "web"]] - """ - Where the user is coming from. This informs the optimizations that are applied to the session. - """ - payment_intent_data: NotRequired[ - "Session.CreateParamsPaymentIntentData" - ] - """ - A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in `payment` mode. - """ - payment_method_collection: NotRequired[ - Literal["always", "if_required"] - ] - """ - Specify whether Checkout should collect a payment method. When set to `if_required`, Checkout will not collect a payment method when the total due for the session is 0. - This may occur if the Checkout Session includes a free trial or a discount. - - Can only be set in `subscription` mode. Defaults to `always`. - - If you'd like information on how to collect a payment method outside of Checkout, read the guide on configuring [subscriptions with a free trial](https://stripe.com/docs/payments/checkout/free-trials). - """ - payment_method_configuration: NotRequired[str] - """ - The ID of the payment method configuration to use with this Checkout session. - """ - payment_method_data: NotRequired[ - "Session.CreateParamsPaymentMethodData" - ] - """ - This parameter allows you to set some attributes on the payment method created during a Checkout session. - """ - payment_method_options: NotRequired[ - "Session.CreateParamsPaymentMethodOptions" - ] - """ - Payment-method-specific configuration. - """ - payment_method_types: NotRequired[ - List[ - Literal[ - "acss_debit", - "affirm", - "afterpay_clearpay", - "alipay", - "alma", - "amazon_pay", - "au_becs_debit", - "bacs_debit", - "bancontact", - "billie", - "blik", - "boleto", - "card", - "cashapp", - "crypto", - "customer_balance", - "eps", - "fpx", - "giropay", - "gopay", - "grabpay", - "ideal", - "kakao_pay", - "klarna", - "konbini", - "kr_card", - "link", - "mb_way", - "mobilepay", - "multibanco", - "naver_pay", - "nz_bank_account", - "oxxo", - "p24", - "pay_by_bank", - "payco", - "paynow", - "paypal", - "paypay", - "payto", - "pix", - "promptpay", - "qris", - "rechnung", - "revolut_pay", - "samsung_pay", - "satispay", - "sepa_debit", - "shopeepay", - "sofort", - "swish", - "twint", - "us_bank_account", - "wechat_pay", - "zip", - ] - ] - ] - """ - A list of the types of payment methods (e.g., `card`) this Checkout Session can accept. - - You can omit this attribute to manage your payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). - See [Dynamic Payment Methods](https://stripe.com/docs/payments/payment-methods/integration-options#using-dynamic-payment-methods) for more details. - - Read more about the supported payment methods and their requirements in our [payment - method details guide](https://docs.stripe.com/docs/payments/checkout/payment-methods). - - If multiple payment methods are passed, Checkout will dynamically reorder them to - prioritize the most relevant payment methods based on the customer's location and - other characteristics. - """ - permissions: NotRequired["Session.CreateParamsPermissions"] - """ - This property is used to set up permissions for various actions (e.g., update) on the CheckoutSession object. Can only be set when creating `embedded` or `custom` sessions. - - For specific permissions, please refer to their dedicated subsections, such as `permissions.update_shipping_details`. - """ - phone_number_collection: NotRequired[ - "Session.CreateParamsPhoneNumberCollection" - ] - """ - Controls phone number collection settings for the session. - - We recommend that you review your privacy policy and check with your legal contacts - before using this feature. Learn more about [collecting phone numbers with Checkout](https://stripe.com/docs/payments/checkout/phone-numbers). - """ - redirect_on_completion: NotRequired[ - Literal["always", "if_required", "never"] - ] - """ - This parameter applies to `ui_mode: embedded`. Learn more about the [redirect behavior](https://stripe.com/docs/payments/checkout/custom-success-page?payment-ui=embedded-form) of embedded sessions. Defaults to `always`. - """ - return_url: NotRequired[str] - """ - The URL to redirect your customer back to after they authenticate or cancel their payment on the - payment method's app or site. This parameter is required if `ui_mode` is `embedded` or `custom` - and redirect-based payment methods are enabled on the session. - """ - saved_payment_method_options: NotRequired[ - "Session.CreateParamsSavedPaymentMethodOptions" - ] - """ - Controls saved payment method settings for the session. Only available in `payment` and `subscription` mode. - """ - setup_intent_data: NotRequired["Session.CreateParamsSetupIntentData"] - """ - A subset of parameters to be passed to SetupIntent creation for Checkout Sessions in `setup` mode. - """ - shipping_address_collection: NotRequired[ - "Session.CreateParamsShippingAddressCollection" - ] - """ - When set, provides configuration for Checkout to collect a shipping address from a customer. - """ - shipping_options: NotRequired[ - List["Session.CreateParamsShippingOption"] - ] - """ - The shipping rate options to apply to this Session. Up to a maximum of 5. - """ - submit_type: NotRequired[ - Literal["auto", "book", "donate", "pay", "subscribe"] - ] - """ - Describes the type of transaction being performed by Checkout in order - to customize relevant text on the page, such as the submit button. - `submit_type` can only be specified on Checkout Sessions in - `payment` or `subscription` mode. If blank or `auto`, `pay` is used. - """ - subscription_data: NotRequired["Session.CreateParamsSubscriptionData"] - """ - A subset of parameters to be passed to subscription creation for Checkout Sessions in `subscription` mode. - """ - success_url: NotRequired[str] - """ - The URL to which Stripe should send customers when payment or setup - is complete. - This parameter is not allowed if ui_mode is `embedded` or `custom`. If you'd like to use - information from the successful Checkout Session on your page, read the - guide on [customizing your success page](https://stripe.com/docs/payments/checkout/custom-success-page). - """ - tax_id_collection: NotRequired["Session.CreateParamsTaxIdCollection"] - """ - Controls tax ID collection during checkout. - """ - ui_mode: NotRequired[Literal["custom", "embedded", "hosted"]] - """ - The UI mode of the Session. Defaults to `hosted`. - """ - wallet_options: NotRequired["Session.CreateParamsWalletOptions"] - """ - Wallet-specific configuration. - """ - checkout_items: NotRequired[List["Session.CreateParamsCheckoutItem"]] - - class CreateParamsAdaptivePricing(TypedDict): - enabled: NotRequired[bool] - """ - If set to `true`, Adaptive Pricing is available on [eligible sessions](https://docs.stripe.com/payments/currencies/localize-prices/adaptive-pricing?payment-ui=stripe-hosted#restrictions). Defaults to your [dashboard setting](https://dashboard.stripe.com/settings/adaptive-pricing). - """ - - class CreateParamsAfterExpiration(TypedDict): - recovery: NotRequired["Session.CreateParamsAfterExpirationRecovery"] - """ - Configure a Checkout Session that can be used to recover an expired session. - """ - - class CreateParamsAfterExpirationRecovery(TypedDict): - allow_promotion_codes: NotRequired[bool] - """ - Enables user redeemable promotion codes on the recovered Checkout Sessions. Defaults to `false` - """ - enabled: bool - """ - If `true`, a recovery URL will be generated to recover this Checkout Session if it - expires before a successful transaction is completed. It will be attached to the - Checkout Session object upon expiration. - """ - - class CreateParamsAutomaticTax(TypedDict): - enabled: bool - """ - Set to `true` to [calculate tax automatically](https://docs.stripe.com/tax) using the customer's location. - - Enabling this parameter causes Checkout to collect any billing address information necessary for tax calculation. - """ - liability: NotRequired["Session.CreateParamsAutomaticTaxLiability"] - """ - The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. - """ - - class CreateParamsAutomaticTaxLiability(TypedDict): - account: NotRequired[str] - """ - The connected account being referenced when `type` is `account`. - """ - type: Literal["account", "self"] - """ - Type of the account referenced in the request. - """ - - class CreateParamsBrandingSettings(TypedDict): - background_color: NotRequired["Literal['']|str"] - """ - A hex color value starting with `#` representing the background color for the Checkout Session. - """ - border_style: NotRequired[ - "Literal['']|Literal['pill', 'rectangular', 'rounded']" - ] - """ - The border style for the Checkout Session. - """ - button_color: NotRequired["Literal['']|str"] - """ - A hex color value starting with `#` representing the button color for the Checkout Session. - """ - display_name: NotRequired[str] - """ - A string to override the business name shown on the Checkout Session. - """ - font_family: NotRequired[ - "Literal['']|Literal['be_vietnam_pro', 'bitter', 'chakra_petch', 'default', 'hahmlet', 'inconsolata', 'inter', 'lato', 'lora', 'm_plus_1_code', 'montserrat', 'noto_sans', 'noto_sans_jp', 'noto_serif', 'nunito', 'open_sans', 'pridi', 'pt_sans', 'pt_serif', 'raleway', 'roboto', 'roboto_slab', 'source_sans_pro', 'titillium_web', 'ubuntu_mono', 'zen_maru_gothic']" - ] - """ - The font family for the Checkout Session corresponding to one of the [supported font families](https://docs.stripe.com/payments/checkout/customization/appearance?payment-ui=stripe-hosted#font-compatibility). - """ - icon: NotRequired["Session.CreateParamsBrandingSettingsIcon"] - """ - The icon for the Checkout Session. You cannot set both `logo` and `icon`. - """ - logo: NotRequired["Session.CreateParamsBrandingSettingsLogo"] - """ - The logo for the Checkout Session. You cannot set both `logo` and `icon`. - """ - - class CreateParamsBrandingSettingsIcon(TypedDict): - file: NotRequired[str] - """ - The ID of a [File upload](https://stripe.com/docs/api/files) representing the icon. Purpose must be `business_icon`. Required if `type` is `file` and disallowed otherwise. - """ - type: Literal["file", "url"] - """ - The type of image for the icon. Must be one of `file` or `url`. - """ - url: NotRequired[str] - """ - The URL of the image. Required if `type` is `url` and disallowed otherwise. - """ - - class CreateParamsBrandingSettingsLogo(TypedDict): - file: NotRequired[str] - """ - The ID of a [File upload](https://stripe.com/docs/api/files) representing the logo. Purpose must be `business_logo`. Required if `type` is `file` and disallowed otherwise. - """ - type: Literal["file", "url"] - """ - The type of image for the logo. Must be one of `file` or `url`. - """ - url: NotRequired[str] - """ - The URL of the image. Required if `type` is `url` and disallowed otherwise. - """ - - class CreateParamsCheckoutItem(TypedDict): - type: Literal[ - "rate_card_subscription_item", "pricing_plan_subscription_item" - ] - rate_card_subscription_item: NotRequired[ - "Session.CreateParamsCheckoutItemRateCardSubscriptionItem" - ] - pricing_plan_subscription_item: NotRequired[ - "Session.CreateParamsCheckoutItemPricingPlanSubscriptionItem" - ] - - class CreateParamsCheckoutItemPricingPlanSubscriptionItem(TypedDict): - pricing_plan: str - pricing_plan_version: NotRequired[str] - metadata: NotRequired[Dict[str, str]] - component_configurations: NotRequired[ - Dict[ - str, - "Session.CreateParamsCheckoutItemPricingPlanSubscriptionItemComponentConfigurations", - ] - ] - - class CreateParamsCheckoutItemPricingPlanSubscriptionItemComponentConfigurations( - TypedDict, - ): - type: Literal["license_fee_component"] - license_fee_component: NotRequired[ - "Session.CreateParamsCheckoutItemPricingPlanSubscriptionItemComponentConfigurationsLicenseFeeComponent" - ] - - class CreateParamsCheckoutItemPricingPlanSubscriptionItemComponentConfigurationsLicenseFeeComponent( - TypedDict, - ): - quantity: int - - class CreateParamsCheckoutItemRateCardSubscriptionItem(TypedDict): - rate_card: str - metadata: NotRequired[Dict[str, str]] - rate_card_version: NotRequired[str] - - class CreateParamsConsentCollection(TypedDict): - payment_method_reuse_agreement: NotRequired[ - "Session.CreateParamsConsentCollectionPaymentMethodReuseAgreement" - ] - """ - Determines the display of payment method reuse agreement text in the UI. If set to `hidden`, it will hide legal text related to the reuse of a payment method. - """ - promotions: NotRequired[Literal["auto", "none"]] - """ - If set to `auto`, enables the collection of customer consent for promotional communications. The Checkout - Session will determine whether to display an option to opt into promotional communication - from the merchant depending on the customer's locale. Only available to US merchants. - """ - terms_of_service: NotRequired[Literal["none", "required"]] - """ - If set to `required`, it requires customers to check a terms of service checkbox before being able to pay. - There must be a valid terms of service URL set in your [Dashboard settings](https://dashboard.stripe.com/settings/public). - """ - - class CreateParamsConsentCollectionPaymentMethodReuseAgreement(TypedDict): - position: Literal["auto", "hidden"] - """ - Determines the position and visibility of the payment method reuse agreement in the UI. When set to `auto`, Stripe's - defaults will be used. When set to `hidden`, the payment method reuse agreement text will always be hidden in the UI. - """ - - class CreateParamsCustomField(TypedDict): - dropdown: NotRequired["Session.CreateParamsCustomFieldDropdown"] - """ - Configuration for `type=dropdown` fields. - """ - key: str - """ - String of your choice that your integration can use to reconcile this field. Must be unique to this field, alphanumeric, and up to 200 characters. - """ - label: "Session.CreateParamsCustomFieldLabel" - """ - The label for the field, displayed to the customer. - """ - numeric: NotRequired["Session.CreateParamsCustomFieldNumeric"] - """ - Configuration for `type=numeric` fields. - """ - optional: NotRequired[bool] - """ - Whether the customer is required to complete the field before completing the Checkout Session. Defaults to `false`. - """ - text: NotRequired["Session.CreateParamsCustomFieldText"] - """ - Configuration for `type=text` fields. - """ - type: Literal["dropdown", "numeric", "text"] - """ - The type of the field. - """ - - class CreateParamsCustomFieldDropdown(TypedDict): - default_value: NotRequired[str] - """ - The value that will pre-fill the field on the payment page.Must match a `value` in the `options` array. - """ - options: List["Session.CreateParamsCustomFieldDropdownOption"] - """ - The options available for the customer to select. Up to 200 options allowed. - """ - - class CreateParamsCustomFieldDropdownOption(TypedDict): - label: str - """ - The label for the option, displayed to the customer. Up to 100 characters. - """ - value: str - """ - The value for this option, not displayed to the customer, used by your integration to reconcile the option selected by the customer. Must be unique to this option, alphanumeric, and up to 100 characters. - """ - - class CreateParamsCustomFieldLabel(TypedDict): - custom: str - """ - Custom text for the label, displayed to the customer. Up to 50 characters. - """ - type: Literal["custom"] - """ - The type of the label. - """ - - class CreateParamsCustomFieldNumeric(TypedDict): - default_value: NotRequired[str] - """ - The value that will pre-fill the field on the payment page. - """ - maximum_length: NotRequired[int] - """ - The maximum character length constraint for the customer's input. - """ - minimum_length: NotRequired[int] - """ - The minimum character length requirement for the customer's input. - """ - - class CreateParamsCustomFieldText(TypedDict): - default_value: NotRequired[str] - """ - The value that will pre-fill the field on the payment page. - """ - maximum_length: NotRequired[int] - """ - The maximum character length constraint for the customer's input. - """ - minimum_length: NotRequired[int] - """ - The minimum character length requirement for the customer's input. - """ - - class CreateParamsCustomText(TypedDict): - after_submit: NotRequired[ - "Literal['']|Session.CreateParamsCustomTextAfterSubmit" - ] - """ - Custom text that should be displayed after the payment confirmation button. - """ - shipping_address: NotRequired[ - "Literal['']|Session.CreateParamsCustomTextShippingAddress" - ] - """ - Custom text that should be displayed alongside shipping address collection. - """ - submit: NotRequired["Literal['']|Session.CreateParamsCustomTextSubmit"] - """ - Custom text that should be displayed alongside the payment confirmation button. - """ - terms_of_service_acceptance: NotRequired[ - "Literal['']|Session.CreateParamsCustomTextTermsOfServiceAcceptance" - ] - """ - Custom text that should be displayed in place of the default terms of service agreement text. - """ - - class CreateParamsCustomTextAfterSubmit(TypedDict): - message: str - """ - Text may be up to 1200 characters in length. - """ - - class CreateParamsCustomTextShippingAddress(TypedDict): - message: str - """ - Text may be up to 1200 characters in length. - """ - - class CreateParamsCustomTextSubmit(TypedDict): - message: str - """ - Text may be up to 1200 characters in length. - """ - - class CreateParamsCustomTextTermsOfServiceAcceptance(TypedDict): - message: str - """ - Text may be up to 1200 characters in length. - """ - - class CreateParamsCustomerUpdate(TypedDict): - address: NotRequired[Literal["auto", "never"]] - """ - Describes whether Checkout saves the billing address onto `customer.address`. - To always collect a full billing address, use `billing_address_collection`. Defaults to `never`. - """ - name: NotRequired[Literal["auto", "never"]] - """ - Describes whether Checkout saves the name onto `customer.name`. Defaults to `never`. - """ - shipping: NotRequired[Literal["auto", "never"]] - """ - Describes whether Checkout saves shipping information onto `customer.shipping`. - To collect shipping information, use `shipping_address_collection`. Defaults to `never`. - """ - - class CreateParamsDiscount(TypedDict): - coupon: NotRequired[str] - """ - The ID of the coupon to apply to this Session. - """ - coupon_data: NotRequired["Session.CreateParamsDiscountCouponData"] - """ - Data used to generate a new [Coupon](https://stripe.com/docs/api/coupon) object inline. One of `coupon` or `coupon_data` is required when updating discounts. - """ - promotion_code: NotRequired[str] - """ - The ID of a promotion code to apply to this Session. - """ - - class CreateParamsDiscountCouponData(TypedDict): - amount_off: NotRequired[int] - """ - A positive integer representing the amount to subtract from an invoice total (required if `percent_off` is not passed). - """ - currency: NotRequired[str] - """ - Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) of the `amount_off` parameter (required if `amount_off` is passed). - """ - duration: NotRequired[Literal["forever", "once", "repeating"]] - """ - Specifies how long the discount will be in effect if used on a subscription. Defaults to `once`. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - name: NotRequired[str] - """ - Name of the coupon displayed to customers on, for instance invoices, or receipts. By default the `id` is shown if `name` is not set. - """ - percent_off: NotRequired[float] - """ - A positive float larger than 0, and smaller or equal to 100, that represents the discount the coupon will apply (required if `amount_off` is not passed). - """ - - class CreateParamsInvoiceCreation(TypedDict): - enabled: bool - """ - Set to `true` to enable invoice creation. - """ - invoice_data: NotRequired[ - "Session.CreateParamsInvoiceCreationInvoiceData" - ] - """ - Parameters passed when creating invoices for payment-mode Checkout Sessions. - """ - - class CreateParamsInvoiceCreationInvoiceData(TypedDict): - account_tax_ids: NotRequired["Literal['']|List[str]"] - """ - The account tax IDs associated with the invoice. - """ - custom_fields: NotRequired[ - "Literal['']|List[Session.CreateParamsInvoiceCreationInvoiceDataCustomField]" - ] - """ - Default custom fields to be displayed on invoices for this customer. - """ - description: NotRequired[str] - """ - An arbitrary string attached to the object. Often useful for displaying to users. - """ - footer: NotRequired[str] - """ - Default footer to be displayed on invoices for this customer. - """ - issuer: NotRequired[ - "Session.CreateParamsInvoiceCreationInvoiceDataIssuer" - ] - """ - The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - rendering_options: NotRequired[ - "Literal['']|Session.CreateParamsInvoiceCreationInvoiceDataRenderingOptions" - ] - """ - Default options for invoice PDF rendering for this customer. - """ - - class CreateParamsInvoiceCreationInvoiceDataCustomField(TypedDict): - name: str - """ - The name of the custom field. This may be up to 40 characters. - """ - value: str - """ - The value of the custom field. This may be up to 140 characters. - """ - - class CreateParamsInvoiceCreationInvoiceDataIssuer(TypedDict): - account: NotRequired[str] - """ - The connected account being referenced when `type` is `account`. - """ - type: Literal["account", "self"] - """ - Type of the account referenced in the request. - """ - - class CreateParamsInvoiceCreationInvoiceDataRenderingOptions(TypedDict): - amount_tax_display: NotRequired[ - "Literal['']|Literal['exclude_tax', 'include_inclusive_tax']" - ] - """ - How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One of `exclude_tax` or `include_inclusive_tax`. `include_inclusive_tax` will include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. `exclude_tax` will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts. - """ - template: NotRequired[str] - """ - ID of the invoice rendering template to use for this invoice. - """ - - class CreateParamsLineItem(TypedDict): - adjustable_quantity: NotRequired[ - "Session.CreateParamsLineItemAdjustableQuantity" - ] - """ - When set, provides configuration for this item's quantity to be adjusted by the customer during Checkout. - """ - dynamic_tax_rates: NotRequired[List[str]] - """ - The [tax rates](https://stripe.com/docs/api/tax_rates) that will be applied to this line item depending on the customer's billing/shipping address. We currently support the following countries: US, GB, AU, and all countries in the EU. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - price: NotRequired[str] - """ - The ID of the [Price](https://stripe.com/docs/api/prices) or [Plan](https://stripe.com/docs/api/plans) object. One of `price` or `price_data` is required. - """ - price_data: NotRequired["Session.CreateParamsLineItemPriceData"] - """ - Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. - """ - quantity: NotRequired[int] - """ - The quantity of the line item being purchased. Quantity should not be defined when `recurring.usage_type=metered`. - """ - tax_rates: NotRequired[List[str]] - """ - The [tax rates](https://stripe.com/docs/api/tax_rates) which apply to this line item. - """ - - class CreateParamsLineItemAdjustableQuantity(TypedDict): - enabled: bool - """ - Set to true if the quantity can be adjusted to any non-negative integer. - """ - maximum: NotRequired[int] - """ - The maximum quantity the customer can purchase for the Checkout Session. By default this value is 99. You can specify a value up to 999999. - """ - minimum: NotRequired[int] - """ - The minimum quantity the customer must purchase for the Checkout Session. By default this value is 0. - """ - - class CreateParamsLineItemPriceData(TypedDict): - 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). - """ - product: NotRequired[str] - """ - The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to. One of `product` or `product_data` is required. - """ - product_data: NotRequired[ - "Session.CreateParamsLineItemPriceDataProductData" - ] - """ - Data used to generate a new [Product](https://docs.stripe.com/api/products) object inline. One of `product` or `product_data` is required. - """ - recurring: NotRequired[ - "Session.CreateParamsLineItemPriceDataRecurring" - ] - """ - The recurring components of a price such as `interval` and `interval_count`. - """ - tax_behavior: NotRequired[ - Literal["exclusive", "inclusive", "unspecified"] - ] - """ - Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. - """ - unit_amount: NotRequired[int] - """ - A non-negative integer in cents (or local equivalent) representing how much to charge. One of `unit_amount` or `unit_amount_decimal` is required. - """ - unit_amount_decimal: NotRequired[str] - """ - Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - """ - - class CreateParamsLineItemPriceDataProductData(TypedDict): - description: NotRequired[str] - """ - The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. - """ - images: NotRequired[List[str]] - """ - A list of up to 8 URLs of images for this product, meant to be displayable to the customer. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - name: str - """ - The product's name, meant to be displayable to the customer. - """ - tax_code: NotRequired[str] - """ - A [tax code](https://stripe.com/docs/tax/tax-categories) ID. - """ - unit_label: NotRequired[str] - """ - A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal. - """ - - class CreateParamsLineItemPriceDataRecurring(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Specifies billing frequency. Either `day`, `week`, `month` or `year`. - """ - interval_count: NotRequired[int] - """ - The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). - """ - - class CreateParamsNameCollection(TypedDict): - business: NotRequired["Session.CreateParamsNameCollectionBusiness"] - """ - Controls settings applied for collecting the customer's business name on the session. - """ - individual: NotRequired["Session.CreateParamsNameCollectionIndividual"] - """ - Controls settings applied for collecting the customer's individual name on the session. - """ - - class CreateParamsNameCollectionBusiness(TypedDict): - enabled: bool - """ - Enable business name collection on the Checkout Session. Defaults to `false`. - """ - optional: NotRequired[bool] - """ - Whether the customer is required to provide a business name before completing the Checkout Session. Defaults to `false`. - """ - - class CreateParamsNameCollectionIndividual(TypedDict): - enabled: bool - """ - Enable individual name collection on the Checkout Session. Defaults to `false`. - """ - optional: NotRequired[bool] - """ - Whether the customer is required to provide their name before completing the Checkout Session. Defaults to `false`. - """ - - class CreateParamsOptionalItem(TypedDict): - adjustable_quantity: NotRequired[ - "Session.CreateParamsOptionalItemAdjustableQuantity" - ] - """ - When set, provides configuration for the customer to adjust the quantity of the line item created when a customer chooses to add this optional item to their order. - """ - price: str - """ - The ID of the [Price](https://stripe.com/docs/api/prices) or [Plan](https://stripe.com/docs/api/plans) object. - """ - quantity: int - """ - The initial quantity of the line item created when a customer chooses to add this optional item to their order. - """ - - class CreateParamsOptionalItemAdjustableQuantity(TypedDict): - enabled: bool - """ - Set to true if the quantity can be adjusted to any non-negative integer. - """ - maximum: NotRequired[int] - """ - The maximum quantity of this item the customer can purchase. By default this value is 99. You can specify a value up to 999999. - """ - minimum: NotRequired[int] - """ - The minimum quantity of this item the customer must purchase, if they choose to purchase it. Because this item is optional, the customer will always be able to remove it from their order, even if the `minimum` configured here is greater than 0. By default this value is 0. - """ - - class CreateParamsPaymentIntentData(TypedDict): - application_fee_amount: NotRequired[int] - """ - The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total amount captured. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). - """ - capture_method: NotRequired[ - Literal["automatic", "automatic_async", "manual"] - ] - """ - Controls when the funds will be captured from the customer's account. - """ - description: NotRequired[str] - """ - An arbitrary string attached to the object. Often useful for displaying to users. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - on_behalf_of: NotRequired[str] - """ - The Stripe account ID for which these funds are intended. For details, - see the PaymentIntents [use case for connected - accounts](https://docs.stripe.com/docs/payments/connected-accounts). - """ - receipt_email: NotRequired[str] - """ - Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). - """ - setup_future_usage: NotRequired[Literal["off_session", "on_session"]] - """ - Indicates that you intend to [make future payments](https://stripe.com/docs/payments/payment-intents#future-usage) with the payment - method collected by this Checkout Session. - - When setting this to `on_session`, Checkout will show a notice to the - customer that their payment details will be saved. - - When setting this to `off_session`, Checkout will show a notice to the - customer that their payment details will be saved and used for future - payments. - - If a Customer has been provided or Checkout creates a new Customer, - Checkout will attach the payment method to the Customer. - - If Checkout does not create a Customer, the payment method is not attached - to a Customer. To reuse the payment method, you can retrieve it from the - Checkout Session's PaymentIntent. - - When processing card payments, Checkout also uses `setup_future_usage` - to dynamically optimize your payment flow and comply with regional - legislation and network rules, such as SCA. - """ - shipping: NotRequired["Session.CreateParamsPaymentIntentDataShipping"] - """ - Shipping information for this payment. - """ - statement_descriptor: NotRequired[str] - """ - Text that appears on the customer's statement as the statement descriptor for a non-card charge. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see [the Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors). - - Setting this value for a card charge returns an error. For card charges, set the [statement_descriptor_suffix](https://docs.stripe.com/get-started/account/statement-descriptors#dynamic) instead. - """ - statement_descriptor_suffix: NotRequired[str] - """ - Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. - """ - transfer_data: NotRequired[ - "Session.CreateParamsPaymentIntentDataTransferData" - ] - """ - The parameters used to automatically create a Transfer when the payment succeeds. - For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). - """ - transfer_group: NotRequired[str] - """ - A string that identifies the resulting payment as part of a group. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/connect/separate-charges-and-transfers) for details. - """ - - class CreateParamsPaymentIntentDataShipping(TypedDict): - address: "Session.CreateParamsPaymentIntentDataShippingAddress" - """ - Shipping address. - """ - carrier: NotRequired[str] - """ - The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. - """ - name: str - """ - Recipient name. - """ - phone: NotRequired[str] - """ - Recipient phone (including extension). - """ - tracking_number: NotRequired[str] - """ - The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. - """ - - class CreateParamsPaymentIntentDataShippingAddress(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: 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. - """ - - class CreateParamsPaymentIntentDataTransferData(TypedDict): - amount: NotRequired[int] - """ - The amount that will be transferred automatically when a charge succeeds. - """ - destination: str - """ - If specified, successful charges will be attributed to the destination - account for tax reporting, and the funds from charges will be transferred - to the destination account. The ID of the resulting transfer will be - returned on the successful charge's `transfer` field. - """ - - class CreateParamsPaymentMethodData(TypedDict): - allow_redisplay: NotRequired[ - Literal["always", "limited", "unspecified"] - ] - """ - Allow redisplay will be set on the payment method on confirmation and indicates whether this payment method can be shown again to the customer in a checkout flow. Only set this field if you wish to override the allow_redisplay value determined by Checkout. - """ - - class CreateParamsPaymentMethodOptions(TypedDict): - acss_debit: NotRequired[ - "Session.CreateParamsPaymentMethodOptionsAcssDebit" - ] - """ - contains details about the ACSS Debit payment method options. - """ - affirm: NotRequired["Session.CreateParamsPaymentMethodOptionsAffirm"] - """ - contains details about the Affirm payment method options. - """ - afterpay_clearpay: NotRequired[ - "Session.CreateParamsPaymentMethodOptionsAfterpayClearpay" - ] - """ - contains details about the Afterpay Clearpay payment method options. - """ - alipay: NotRequired["Session.CreateParamsPaymentMethodOptionsAlipay"] - """ - contains details about the Alipay payment method options. - """ - alma: NotRequired["Session.CreateParamsPaymentMethodOptionsAlma"] - """ - contains details about the Alma payment method options. - """ - amazon_pay: NotRequired[ - "Session.CreateParamsPaymentMethodOptionsAmazonPay" - ] - """ - contains details about the AmazonPay payment method options. - """ - au_becs_debit: NotRequired[ - "Session.CreateParamsPaymentMethodOptionsAuBecsDebit" - ] - """ - contains details about the AU Becs Debit payment method options. - """ - bacs_debit: NotRequired[ - "Session.CreateParamsPaymentMethodOptionsBacsDebit" - ] - """ - contains details about the Bacs Debit payment method options. - """ - bancontact: NotRequired[ - "Session.CreateParamsPaymentMethodOptionsBancontact" - ] - """ - contains details about the Bancontact payment method options. - """ - billie: NotRequired["Session.CreateParamsPaymentMethodOptionsBillie"] - """ - contains details about the Billie payment method options. - """ - boleto: NotRequired["Session.CreateParamsPaymentMethodOptionsBoleto"] - """ - contains details about the Boleto payment method options. - """ - card: NotRequired["Session.CreateParamsPaymentMethodOptionsCard"] - """ - contains details about the Card payment method options. - """ - cashapp: NotRequired["Session.CreateParamsPaymentMethodOptionsCashapp"] - """ - contains details about the Cashapp Pay payment method options. - """ - customer_balance: NotRequired[ - "Session.CreateParamsPaymentMethodOptionsCustomerBalance" - ] - """ - contains details about the Customer Balance payment method options. - """ - demo_pay: NotRequired[ - "Session.CreateParamsPaymentMethodOptionsDemoPay" - ] - """ - contains details about the DemoPay payment method options. - """ - eps: NotRequired["Session.CreateParamsPaymentMethodOptionsEps"] - """ - contains details about the EPS payment method options. - """ - fpx: NotRequired["Session.CreateParamsPaymentMethodOptionsFpx"] - """ - contains details about the FPX payment method options. - """ - giropay: NotRequired["Session.CreateParamsPaymentMethodOptionsGiropay"] - """ - contains details about the Giropay payment method options. - """ - grabpay: NotRequired["Session.CreateParamsPaymentMethodOptionsGrabpay"] - """ - contains details about the Grabpay payment method options. - """ - ideal: NotRequired["Session.CreateParamsPaymentMethodOptionsIdeal"] - """ - contains details about the Ideal payment method options. - """ - kakao_pay: NotRequired[ - "Session.CreateParamsPaymentMethodOptionsKakaoPay" - ] - """ - contains details about the Kakao Pay payment method options. - """ - klarna: NotRequired["Session.CreateParamsPaymentMethodOptionsKlarna"] - """ - contains details about the Klarna payment method options. - """ - konbini: NotRequired["Session.CreateParamsPaymentMethodOptionsKonbini"] - """ - contains details about the Konbini payment method options. - """ - kr_card: NotRequired["Session.CreateParamsPaymentMethodOptionsKrCard"] - """ - contains details about the Korean card payment method options. - """ - link: NotRequired["Session.CreateParamsPaymentMethodOptionsLink"] - """ - contains details about the Link payment method options. - """ - mobilepay: NotRequired[ - "Session.CreateParamsPaymentMethodOptionsMobilepay" - ] - """ - contains details about the Mobilepay payment method options. - """ - multibanco: NotRequired[ - "Session.CreateParamsPaymentMethodOptionsMultibanco" - ] - """ - contains details about the Multibanco payment method options. - """ - naver_pay: NotRequired[ - "Session.CreateParamsPaymentMethodOptionsNaverPay" - ] - """ - contains details about the Naver Pay payment method options. - """ - oxxo: NotRequired["Session.CreateParamsPaymentMethodOptionsOxxo"] - """ - contains details about the OXXO payment method options. - """ - p24: NotRequired["Session.CreateParamsPaymentMethodOptionsP24"] - """ - contains details about the P24 payment method options. - """ - pay_by_bank: NotRequired[ - "Session.CreateParamsPaymentMethodOptionsPayByBank" - ] - """ - contains details about the Pay By Bank payment method options. - """ - payco: NotRequired["Session.CreateParamsPaymentMethodOptionsPayco"] - """ - contains details about the PAYCO payment method options. - """ - paynow: NotRequired["Session.CreateParamsPaymentMethodOptionsPaynow"] - """ - contains details about the PayNow payment method options. - """ - paypal: NotRequired["Session.CreateParamsPaymentMethodOptionsPaypal"] - """ - contains details about the PayPal payment method options. - """ - payto: NotRequired["Session.CreateParamsPaymentMethodOptionsPayto"] - """ - contains details about the PayTo payment method options. - """ - pix: NotRequired["Session.CreateParamsPaymentMethodOptionsPix"] - """ - contains details about the Pix payment method options. - """ - revolut_pay: NotRequired[ - "Session.CreateParamsPaymentMethodOptionsRevolutPay" - ] - """ - contains details about the RevolutPay payment method options. - """ - samsung_pay: NotRequired[ - "Session.CreateParamsPaymentMethodOptionsSamsungPay" - ] - """ - contains details about the Samsung Pay payment method options. - """ - satispay: NotRequired[ - "Session.CreateParamsPaymentMethodOptionsSatispay" - ] - """ - contains details about the Satispay payment method options. - """ - sepa_debit: NotRequired[ - "Session.CreateParamsPaymentMethodOptionsSepaDebit" - ] - """ - contains details about the Sepa Debit payment method options. - """ - sofort: NotRequired["Session.CreateParamsPaymentMethodOptionsSofort"] - """ - contains details about the Sofort payment method options. - """ - swish: NotRequired["Session.CreateParamsPaymentMethodOptionsSwish"] - """ - contains details about the Swish payment method options. - """ - us_bank_account: NotRequired[ - "Session.CreateParamsPaymentMethodOptionsUsBankAccount" - ] - """ - contains details about the Us Bank Account payment method options. - """ - wechat_pay: NotRequired[ - "Session.CreateParamsPaymentMethodOptionsWechatPay" - ] - """ - contains details about the WeChat Pay payment method options. - """ - - class CreateParamsPaymentMethodOptionsAcssDebit(TypedDict): - currency: NotRequired[Literal["cad", "usd"]] - """ - 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). This is only accepted for Checkout Sessions in `setup` mode. - """ - mandate_options: NotRequired[ - "Session.CreateParamsPaymentMethodOptionsAcssDebitMandateOptions" - ] - """ - Additional fields for Mandate creation - """ - setup_future_usage: NotRequired[ - Literal["none", "off_session", "on_session"] - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - """ - target_date: NotRequired[str] - """ - Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. - """ - verification_method: NotRequired[ - Literal["automatic", "instant", "microdeposits"] - ] - """ - Verification method for the intent - """ - - class CreateParamsPaymentMethodOptionsAcssDebitMandateOptions(TypedDict): - custom_mandate_url: NotRequired["Literal['']|str"] - """ - A URL for custom mandate text to render during confirmation step. - The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent, - or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent. - """ - default_for: NotRequired[List[Literal["invoice", "subscription"]]] - """ - List of Stripe products where this mandate can be selected automatically. Only usable in `setup` mode. - """ - interval_description: NotRequired[str] - """ - Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'. - """ - payment_schedule: NotRequired[ - Literal["combined", "interval", "sporadic"] - ] - """ - Payment schedule for the mandate. - """ - transaction_type: NotRequired[Literal["business", "personal"]] - """ - Transaction type of the mandate. - """ - - class CreateParamsPaymentMethodOptionsAffirm(TypedDict): - capture_method: NotRequired[Literal["manual"]] - """ - Controls when the funds will be captured from the customer's account. - """ - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - """ - - class CreateParamsPaymentMethodOptionsAfterpayClearpay(TypedDict): - capture_method: NotRequired[Literal["manual"]] - """ - Controls when the funds will be captured from the customer's account. - """ - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - """ - - class CreateParamsPaymentMethodOptionsAlipay(TypedDict): - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - """ - - class CreateParamsPaymentMethodOptionsAlma(TypedDict): - capture_method: NotRequired[Literal["manual"]] - """ - Controls when the funds will be captured from the customer's account. - """ - - class CreateParamsPaymentMethodOptionsAmazonPay(TypedDict): - capture_method: NotRequired[Literal["manual"]] - """ - Controls when the funds will be captured from the customer's account. - """ - setup_future_usage: NotRequired[Literal["none", "off_session"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - """ - - class CreateParamsPaymentMethodOptionsAuBecsDebit(TypedDict): - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - """ - target_date: NotRequired[str] - """ - Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. - """ - - class CreateParamsPaymentMethodOptionsBacsDebit(TypedDict): - mandate_options: NotRequired[ - "Session.CreateParamsPaymentMethodOptionsBacsDebitMandateOptions" - ] - """ - Additional fields for Mandate creation - """ - setup_future_usage: NotRequired[ - Literal["none", "off_session", "on_session"] - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - """ - target_date: NotRequired[str] - """ - Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. - """ - - class CreateParamsPaymentMethodOptionsBacsDebitMandateOptions(TypedDict): - reference_prefix: NotRequired["Literal['']|str"] - """ - Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'. - """ - - class CreateParamsPaymentMethodOptionsBancontact(TypedDict): - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - """ - - class CreateParamsPaymentMethodOptionsBillie(TypedDict): - capture_method: NotRequired[Literal["manual"]] - """ - Controls when the funds will be captured from the customer's account. - """ - - class CreateParamsPaymentMethodOptionsBoleto(TypedDict): - expires_after_days: NotRequired[int] - """ - The number of calendar days before a Boleto voucher expires. For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto invoice will expire on Wednesday at 23:59 America/Sao_Paulo time. - """ - setup_future_usage: NotRequired[ - Literal["none", "off_session", "on_session"] - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - """ - - class CreateParamsPaymentMethodOptionsCard(TypedDict): - capture_method: NotRequired[Literal["manual"]] - """ - Controls when the funds will be captured from the customer's account. - """ - installments: NotRequired[ - "Session.CreateParamsPaymentMethodOptionsCardInstallments" - ] - """ - Installment options for card payments - """ - request_decremental_authorization: NotRequired[ - Literal["if_available", "never"] - ] - """ - Request ability to [capture beyond the standard authorization validity window](https://docs.stripe.com/payments/extended-authorization) for this CheckoutSession. - """ - request_extended_authorization: NotRequired[ - Literal["if_available", "never"] - ] - """ - Request ability to [capture beyond the standard authorization validity window](https://docs.stripe.com/payments/extended-authorization) for this CheckoutSession. - """ - request_incremental_authorization: NotRequired[ - Literal["if_available", "never"] - ] - """ - Request ability to [increment the authorization](https://docs.stripe.com/payments/incremental-authorization) for this CheckoutSession. - """ - request_multicapture: NotRequired[Literal["if_available", "never"]] - """ - Request ability to make [multiple captures](https://docs.stripe.com/payments/multicapture) for this CheckoutSession. - """ - request_overcapture: NotRequired[Literal["if_available", "never"]] - """ - Request ability to [overcapture](https://docs.stripe.com/payments/overcapture) for this CheckoutSession. - """ - request_three_d_secure: NotRequired[ - Literal["any", "automatic", "challenge"] - ] - """ - We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. - """ - restrictions: NotRequired[ - "Session.CreateParamsPaymentMethodOptionsCardRestrictions" - ] - """ - Restrictions to apply to the card payment method. For example, you can block specific card brands. - """ - setup_future_usage: NotRequired[Literal["off_session", "on_session"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - """ - statement_descriptor_suffix_kana: NotRequired[str] - """ - Provides information about a card payment that customers see on their statements. Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor that's set on the account to form the complete statement descriptor. Maximum 22 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 22 characters. - """ - statement_descriptor_suffix_kanji: NotRequired[str] - """ - Provides information about a card payment that customers see on their statements. Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement descriptor that's set on the account to form the complete statement descriptor. Maximum 17 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 17 characters. - """ - - class CreateParamsPaymentMethodOptionsCardInstallments(TypedDict): - enabled: NotRequired[bool] - """ - Setting to true enables installments for this Checkout Session. - Setting to false will prevent any installment plan from applying to a payment. - """ - - class CreateParamsPaymentMethodOptionsCardRestrictions(TypedDict): - brands_blocked: NotRequired[ - List[ - Literal[ - "american_express", - "discover_global_network", - "mastercard", - "visa", - ] - ] - ] - """ - Specify the card brands to block in the Checkout Session. If a customer enters or selects a card belonging to a blocked brand, they can't complete the Session. - """ - - class CreateParamsPaymentMethodOptionsCashapp(TypedDict): - capture_method: NotRequired[Literal["manual"]] - """ - Controls when the funds will be captured from the customer's account. - """ - setup_future_usage: NotRequired[ - Literal["none", "off_session", "on_session"] - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - """ - - class CreateParamsPaymentMethodOptionsCustomerBalance(TypedDict): - bank_transfer: NotRequired[ - "Session.CreateParamsPaymentMethodOptionsCustomerBalanceBankTransfer" - ] - """ - Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. - """ - funding_type: NotRequired[Literal["bank_transfer"]] - """ - The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. - """ - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - """ - - class CreateParamsPaymentMethodOptionsCustomerBalanceBankTransfer( - TypedDict, - ): - eu_bank_transfer: NotRequired[ - "Session.CreateParamsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer" - ] - """ - Configuration for eu_bank_transfer funding type. - """ - requested_address_types: NotRequired[ - List[ - Literal[ - "aba", - "iban", - "sepa", - "sort_code", - "spei", - "swift", - "zengin", - ] - ] - ] - """ - List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned. - - Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`. - """ - type: Literal[ - "eu_bank_transfer", - "gb_bank_transfer", - "jp_bank_transfer", - "mx_bank_transfer", - "us_bank_transfer", - ] - """ - The list of bank transfer types that this PaymentIntent is allowed to use for funding. - """ - - class CreateParamsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer( - TypedDict, - ): - country: str - """ - The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. - """ - - class CreateParamsPaymentMethodOptionsDemoPay(TypedDict): - setup_future_usage: NotRequired[Literal["none", "off_session"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - """ - - class CreateParamsPaymentMethodOptionsEps(TypedDict): - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - """ - - class CreateParamsPaymentMethodOptionsFpx(TypedDict): - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - """ - - class CreateParamsPaymentMethodOptionsGiropay(TypedDict): - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - """ - - class CreateParamsPaymentMethodOptionsGrabpay(TypedDict): - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - """ - - class CreateParamsPaymentMethodOptionsIdeal(TypedDict): - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - """ - - class CreateParamsPaymentMethodOptionsKakaoPay(TypedDict): - capture_method: NotRequired[Literal["manual"]] - """ - Controls when the funds will be captured from the customer's account. - """ - setup_future_usage: NotRequired[Literal["none", "off_session"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - """ - - class CreateParamsPaymentMethodOptionsKlarna(TypedDict): - capture_method: NotRequired[Literal["manual"]] - """ - Controls when the funds will be captured from the customer's account. - """ - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - """ - subscriptions: NotRequired[ - "Literal['']|List[Session.CreateParamsPaymentMethodOptionsKlarnaSubscription]" - ] - """ - Subscription details if the Checkout Session sets up a future subscription. - """ - - class CreateParamsPaymentMethodOptionsKlarnaSubscription(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Unit of time between subscription charges. - """ - interval_count: NotRequired[int] - """ - The number of intervals (specified in the `interval` attribute) between subscription charges. For example, `interval=month` and `interval_count=3` charges every 3 months. - """ - name: NotRequired[str] - """ - Name for subscription. - """ - next_billing: "Session.CreateParamsPaymentMethodOptionsKlarnaSubscriptionNextBilling" - """ - Describes the upcoming charge for this subscription. - """ - reference: str - """ - A non-customer-facing reference to correlate subscription charges in the Klarna app. Use a value that persists across subscription charges. - """ - - class CreateParamsPaymentMethodOptionsKlarnaSubscriptionNextBilling( - TypedDict, - ): - amount: int - """ - The amount of the next charge for the subscription. - """ - date: str - """ - The date of the next charge for the subscription in YYYY-MM-DD format. - """ - - class CreateParamsPaymentMethodOptionsKonbini(TypedDict): - expires_after_days: NotRequired[int] - """ - The number of calendar days (between 1 and 60) after which Konbini payment instructions will expire. For example, if a PaymentIntent is confirmed with Konbini and `expires_after_days` set to 2 on Monday JST, the instructions will expire on Wednesday 23:59:59 JST. Defaults to 3 days. - """ - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - """ - - class CreateParamsPaymentMethodOptionsKrCard(TypedDict): - capture_method: NotRequired[Literal["manual"]] - """ - Controls when the funds will be captured from the customer's account. - """ - setup_future_usage: NotRequired[Literal["none", "off_session"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - """ - - class CreateParamsPaymentMethodOptionsLink(TypedDict): - capture_method: NotRequired[Literal["manual"]] - """ - Controls when the funds will be captured from the customer's account. - """ - setup_future_usage: NotRequired[Literal["none", "off_session"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - """ - - class CreateParamsPaymentMethodOptionsMobilepay(TypedDict): - capture_method: NotRequired[Literal["manual"]] - """ - Controls when the funds will be captured from the customer's account. - """ - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - """ - - class CreateParamsPaymentMethodOptionsMultibanco(TypedDict): - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - """ - - class CreateParamsPaymentMethodOptionsNaverPay(TypedDict): - capture_method: NotRequired[Literal["manual"]] - """ - Controls when the funds will be captured from the customer's account. - """ - setup_future_usage: NotRequired[Literal["none", "off_session"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - """ - - class CreateParamsPaymentMethodOptionsOxxo(TypedDict): - expires_after_days: NotRequired[int] - """ - The number of calendar days before an OXXO voucher expires. For example, if you create an OXXO voucher on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time. - """ - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - """ - - class CreateParamsPaymentMethodOptionsP24(TypedDict): - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - """ - tos_shown_and_accepted: NotRequired[bool] - """ - Confirm that the payer has accepted the P24 terms and conditions. - """ - - class CreateParamsPaymentMethodOptionsPayByBank(TypedDict): - pass - - class CreateParamsPaymentMethodOptionsPayco(TypedDict): - capture_method: NotRequired[Literal["manual"]] - """ - Controls when the funds will be captured from the customer's account. - """ - - class CreateParamsPaymentMethodOptionsPaynow(TypedDict): - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - """ - - class CreateParamsPaymentMethodOptionsPaypal(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds will be captured from the customer's account. - """ - preferred_locale: NotRequired[ - Literal[ - "cs-CZ", - "da-DK", - "de-AT", - "de-DE", - "de-LU", - "el-GR", - "en-GB", - "en-US", - "es-ES", - "fi-FI", - "fr-BE", - "fr-FR", - "fr-LU", - "hu-HU", - "it-IT", - "nl-BE", - "nl-NL", - "pl-PL", - "pt-PT", - "sk-SK", - "sv-SE", - ] - ] - """ - [Preferred locale](https://stripe.com/docs/payments/paypal/supported-locales) of the PayPal checkout page that the customer is redirected to. - """ - reference: NotRequired[str] - """ - A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. - """ - reference_id: NotRequired[str] - """ - A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. - """ - risk_correlation_id: NotRequired[str] - """ - The risk correlation ID for an on-session payment using a saved PayPal payment method. - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - subsellers: NotRequired[List[str]] - """ - The Stripe connected account IDs of the sellers on the platform for this transaction (optional). Only allowed when [separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) are used. - """ - - class CreateParamsPaymentMethodOptionsPayto(TypedDict): - mandate_options: NotRequired[ - "Session.CreateParamsPaymentMethodOptionsPaytoMandateOptions" - ] - """ - Additional fields for Mandate creation - """ - setup_future_usage: NotRequired[Literal["none", "off_session"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - """ - - class CreateParamsPaymentMethodOptionsPaytoMandateOptions(TypedDict): - amount: NotRequired[int] - """ - Amount that will be collected. It is required when `amount_type` is `fixed`. - """ - amount_type: NotRequired[Literal["fixed", "maximum"]] - """ - The type of amount that will be collected. The amount charged must be exact or up to the value of `amount` param for `fixed` or `maximum` type respectively. - """ - end_date: NotRequired[str] - """ - Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no end date. - """ - payment_schedule: NotRequired[ - Literal[ - "adhoc", - "annual", - "daily", - "fortnightly", - "monthly", - "quarterly", - "semi_annual", - "weekly", - ] - ] - """ - The periodicity at which payments will be collected. - """ - payments_per_period: NotRequired[int] - """ - The number of payments that will be made during a payment period. Defaults to 1 except for when `payment_schedule` is `adhoc`. In that case, it defaults to no limit. - """ - purpose: NotRequired[ - Literal[ - "dependant_support", - "government", - "loan", - "mortgage", - "other", - "pension", - "personal", - "retail", - "salary", - "tax", - "utility", - ] - ] - """ - The purpose for which payments are made. Defaults to retail. - """ - start_date: NotRequired[str] - """ - Date, in YYYY-MM-DD format, from which payments will be collected. Defaults to confirmation time. - """ - - class CreateParamsPaymentMethodOptionsPix(TypedDict): - amount_includes_iof: NotRequired[Literal["always", "never"]] - """ - Determines if the amount includes the IOF tax. Defaults to `never`. - """ - expires_after_seconds: NotRequired[int] - """ - The number of seconds (between 10 and 1209600) after which Pix payment will expire. Defaults to 86400 seconds. - """ - mandate_options: NotRequired[ - "Session.CreateParamsPaymentMethodOptionsPixMandateOptions" - ] - """ - Additional fields for mandate creation. - """ - setup_future_usage: NotRequired[Literal["none", "off_session"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - """ - - class CreateParamsPaymentMethodOptionsPixMandateOptions(TypedDict): - amount: NotRequired[int] - """ - Amount to be charged for future payments. Required when `amount_type=fixed`. If not provided for `amount_type=maximum`, defaults to 40000. - """ - amount_includes_iof: NotRequired[Literal["always", "never"]] - """ - Determines if the amount includes the IOF tax. Defaults to `never`. - """ - amount_type: NotRequired[Literal["fixed", "maximum"]] - """ - Type of amount. Defaults to `maximum`. - """ - currency: NotRequired[str] - """ - Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Only `brl` is supported currently. - """ - end_date: NotRequired[str] - """ - Date when the mandate expires and no further payments will be charged, in `YYYY-MM-DD`. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. - """ - payment_schedule: NotRequired[ - Literal["halfyearly", "monthly", "quarterly", "weekly", "yearly"] - ] - """ - Schedule at which the future payments will be charged. Defaults to `weekly`. - """ - reference: NotRequired[str] - """ - Subscription name displayed to buyers in their bank app. Defaults to the displayable business name. - """ - start_date: NotRequired[str] - """ - Start date of the mandate, in `YYYY-MM-DD`. Start date should be at least 3 days in the future. Defaults to 3 days after the current date. - """ - - class CreateParamsPaymentMethodOptionsRevolutPay(TypedDict): - capture_method: NotRequired[Literal["manual"]] - """ - Controls when the funds will be captured from the customer's account. - """ - setup_future_usage: NotRequired[Literal["none", "off_session"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - """ - - class CreateParamsPaymentMethodOptionsSamsungPay(TypedDict): - capture_method: NotRequired[Literal["manual"]] - """ - Controls when the funds will be captured from the customer's account. - """ - - class CreateParamsPaymentMethodOptionsSatispay(TypedDict): - capture_method: NotRequired[Literal["manual"]] - """ - Controls when the funds will be captured from the customer's account. - """ - - class CreateParamsPaymentMethodOptionsSepaDebit(TypedDict): - mandate_options: NotRequired[ - "Session.CreateParamsPaymentMethodOptionsSepaDebitMandateOptions" - ] - """ - Additional fields for Mandate creation - """ - setup_future_usage: NotRequired[ - Literal["none", "off_session", "on_session"] - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - """ - target_date: NotRequired[str] - """ - Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. - """ - - class CreateParamsPaymentMethodOptionsSepaDebitMandateOptions(TypedDict): - reference_prefix: NotRequired["Literal['']|str"] - """ - Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'. - """ - - class CreateParamsPaymentMethodOptionsSofort(TypedDict): - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - """ - - class CreateParamsPaymentMethodOptionsSwish(TypedDict): - reference: NotRequired[str] - """ - The order reference that will be displayed to customers in the Swish application. Defaults to the `id` of the Payment Intent. - """ - - class CreateParamsPaymentMethodOptionsUsBankAccount(TypedDict): - financial_connections: NotRequired[ - "Session.CreateParamsPaymentMethodOptionsUsBankAccountFinancialConnections" - ] - """ - Additional fields for Financial Connections Session creation - """ - setup_future_usage: NotRequired[ - Literal["none", "off_session", "on_session"] - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - """ - target_date: NotRequired[str] - """ - Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. - """ - verification_method: NotRequired[Literal["automatic", "instant"]] - """ - Verification method for the intent - """ - - class CreateParamsPaymentMethodOptionsUsBankAccountFinancialConnections( - TypedDict, - ): - permissions: NotRequired[ - List[ - Literal[ - "balances", "ownership", "payment_method", "transactions" - ] - ] - ] - """ - The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. - """ - prefetch: NotRequired[ - List[ - Literal[ - "balances", - "inferred_balances", - "ownership", - "transactions", - ] - ] - ] - """ - List of data features that you would like to retrieve upon account creation. - """ - - class CreateParamsPaymentMethodOptionsWechatPay(TypedDict): - app_id: NotRequired[str] - """ - The app ID registered with WeChat Pay. Only required when client is ios or android. - """ - client: Literal["android", "ios", "web"] - """ - The client type that the end customer will pay from - """ - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - """ - - class CreateParamsPermissions(TypedDict): - update: NotRequired["Session.CreateParamsPermissionsUpdate"] - """ - Permissions for updating the Checkout Session. - """ - update_discounts: NotRequired[Literal["client_only", "server_only"]] - """ - Determines which entity is allowed to update the discounts (coupons or promotion codes) that apply to this session. - - Default is `client_only`. Stripe Checkout client will automatically handle discount updates. If set to `server_only`, only your server is allowed to update discounts. - """ - update_line_items: NotRequired[Literal["client_only", "server_only"]] - """ - Determines which entity is allowed to update the line items. - - Default is `client_only`. Stripe Checkout client will automatically update the line items. If set to `server_only`, only your server is allowed to update the line items. - - When set to `server_only`, you must add the onLineItemsChange event handler when initializing the Stripe Checkout client and manually update the line items from your server using the Stripe API. - """ - update_shipping_details: NotRequired[ - Literal["client_only", "server_only"] - ] - """ - Determines which entity is allowed to update the shipping details. - - Default is `client_only`. Stripe Checkout client will automatically update the shipping details. If set to `server_only`, only your server is allowed to update the shipping details. - - When set to `server_only`, you must add the onShippingDetailsChange event handler when initializing the Stripe Checkout client and manually update the shipping details from your server using the Stripe API. - """ - - class CreateParamsPermissionsUpdate(TypedDict): - line_items: NotRequired[Literal["client_only", "server_only"]] - """ - Determines which entity is allowed to update the line items. - - Default is `client_only`. Stripe Checkout client will automatically update the line items. If set to `server_only`, only your server is allowed to update the line items. - - When set to `server_only`, you must add the onLineItemsChange event handler when initializing the Stripe Checkout client and manually update the line items from your server using the Stripe API. - """ - shipping_details: NotRequired[Literal["client_only", "server_only"]] - """ - Determines which entity is allowed to update the shipping details. - - Default is `client_only`. Stripe Checkout client will automatically update the shipping details. If set to `server_only`, only your server is allowed to update the shipping details. - - When set to `server_only`, you must add the onShippingDetailsChange event handler when initializing the Stripe Checkout client and manually update the shipping details from your server using the Stripe API. - """ - - class CreateParamsPhoneNumberCollection(TypedDict): - enabled: bool - """ - Set to `true` to enable phone number collection. - - Can only be set in `payment` and `subscription` mode. - """ - - class CreateParamsSavedPaymentMethodOptions(TypedDict): - allow_redisplay_filters: NotRequired[ - List[Literal["always", "limited", "unspecified"]] - ] - """ - Uses the `allow_redisplay` value of each saved payment method to filter the set presented to a returning customer. By default, only saved payment methods with 'allow_redisplay: ‘always' are shown in Checkout. - """ - payment_method_remove: NotRequired[Literal["disabled", "enabled"]] - """ - Enable customers to choose if they wish to remove their saved payment methods. Disabled by default. - """ - payment_method_save: NotRequired[Literal["disabled", "enabled"]] - """ - Enable customers to choose if they wish to save their payment method for future use. Disabled by default. - """ - - class CreateParamsSetupIntentData(TypedDict): - description: NotRequired[str] - """ - An arbitrary string attached to the object. Often useful for displaying to users. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - on_behalf_of: NotRequired[str] - """ - The Stripe account for which the setup is intended. - """ - - class CreateParamsShippingAddressCollection(TypedDict): - allowed_countries: List[ - Literal[ - "AC", - "AD", - "AE", - "AF", - "AG", - "AI", - "AL", - "AM", - "AO", - "AQ", - "AR", - "AT", - "AU", - "AW", - "AX", - "AZ", - "BA", - "BB", - "BD", - "BE", - "BF", - "BG", - "BH", - "BI", - "BJ", - "BL", - "BM", - "BN", - "BO", - "BQ", - "BR", - "BS", - "BT", - "BV", - "BW", - "BY", - "BZ", - "CA", - "CD", - "CF", - "CG", - "CH", - "CI", - "CK", - "CL", - "CM", - "CN", - "CO", - "CR", - "CV", - "CW", - "CY", - "CZ", - "DE", - "DJ", - "DK", - "DM", - "DO", - "DZ", - "EC", - "EE", - "EG", - "EH", - "ER", - "ES", - "ET", - "FI", - "FJ", - "FK", - "FO", - "FR", - "GA", - "GB", - "GD", - "GE", - "GF", - "GG", - "GH", - "GI", - "GL", - "GM", - "GN", - "GP", - "GQ", - "GR", - "GS", - "GT", - "GU", - "GW", - "GY", - "HK", - "HN", - "HR", - "HT", - "HU", - "ID", - "IE", - "IL", - "IM", - "IN", - "IO", - "IQ", - "IS", - "IT", - "JE", - "JM", - "JO", - "JP", - "KE", - "KG", - "KH", - "KI", - "KM", - "KN", - "KR", - "KW", - "KY", - "KZ", - "LA", - "LB", - "LC", - "LI", - "LK", - "LR", - "LS", - "LT", - "LU", - "LV", - "LY", - "MA", - "MC", - "MD", - "ME", - "MF", - "MG", - "MK", - "ML", - "MM", - "MN", - "MO", - "MQ", - "MR", - "MS", - "MT", - "MU", - "MV", - "MW", - "MX", - "MY", - "MZ", - "NA", - "NC", - "NE", - "NG", - "NI", - "NL", - "NO", - "NP", - "NR", - "NU", - "NZ", - "OM", - "PA", - "PE", - "PF", - "PG", - "PH", - "PK", - "PL", - "PM", - "PN", - "PR", - "PS", - "PT", - "PY", - "QA", - "RE", - "RO", - "RS", - "RU", - "RW", - "SA", - "SB", - "SC", - "SD", - "SE", - "SG", - "SH", - "SI", - "SJ", - "SK", - "SL", - "SM", - "SN", - "SO", - "SR", - "SS", - "ST", - "SV", - "SX", - "SZ", - "TA", - "TC", - "TD", - "TF", - "TG", - "TH", - "TJ", - "TK", - "TL", - "TM", - "TN", - "TO", - "TR", - "TT", - "TV", - "TW", - "TZ", - "UA", - "UG", - "US", - "UY", - "UZ", - "VA", - "VC", - "VE", - "VG", - "VN", - "VU", - "WF", - "WS", - "XK", - "YE", - "YT", - "ZA", - "ZM", - "ZW", - "ZZ", - ] - ] - """ - An array of two-letter ISO country codes representing which countries Checkout should provide as options for - shipping locations. - """ - - class CreateParamsShippingOption(TypedDict): - shipping_rate: NotRequired[str] - """ - The ID of the Shipping Rate to use for this shipping option. - """ - shipping_rate_data: NotRequired[ - "Session.CreateParamsShippingOptionShippingRateData" - ] - """ - Parameters to be passed to Shipping Rate creation for this shipping option. - """ - - class CreateParamsShippingOptionShippingRateData(TypedDict): - delivery_estimate: NotRequired[ - "Session.CreateParamsShippingOptionShippingRateDataDeliveryEstimate" - ] - """ - The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions. - """ - display_name: str - """ - The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions. - """ - fixed_amount: NotRequired[ - "Session.CreateParamsShippingOptionShippingRateDataFixedAmount" - ] - """ - Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - tax_behavior: NotRequired[ - Literal["exclusive", "inclusive", "unspecified"] - ] - """ - Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. - """ - tax_code: NotRequired[str] - """ - A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`. - """ - type: NotRequired[Literal["fixed_amount"]] - """ - The type of calculation to use on the shipping rate. - """ - - class CreateParamsShippingOptionShippingRateDataDeliveryEstimate( - TypedDict - ): - maximum: NotRequired[ - "Session.CreateParamsShippingOptionShippingRateDataDeliveryEstimateMaximum" - ] - """ - The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite. - """ - minimum: NotRequired[ - "Session.CreateParamsShippingOptionShippingRateDataDeliveryEstimateMinimum" - ] - """ - The lower bound of the estimated range. If empty, represents no lower bound. - """ - - class CreateParamsShippingOptionShippingRateDataDeliveryEstimateMaximum( - TypedDict, - ): - unit: Literal["business_day", "day", "hour", "month", "week"] - """ - A unit of time. - """ - value: int - """ - Must be greater than 0. - """ - - class CreateParamsShippingOptionShippingRateDataDeliveryEstimateMinimum( - TypedDict, - ): - unit: Literal["business_day", "day", "hour", "month", "week"] - """ - A unit of time. - """ - value: int - """ - Must be greater than 0. - """ - - class CreateParamsShippingOptionShippingRateDataFixedAmount(TypedDict): - amount: int - """ - A non-negative integer in cents representing how much to charge. - """ - 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). - """ - currency_options: NotRequired[ - Dict[ - str, - "Session.CreateParamsShippingOptionShippingRateDataFixedAmountCurrencyOptions", - ] - ] - """ - Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). - """ - - class CreateParamsShippingOptionShippingRateDataFixedAmountCurrencyOptions( - TypedDict, - ): - amount: int - """ - A non-negative integer in cents representing how much to charge. - """ - tax_behavior: NotRequired[ - Literal["exclusive", "inclusive", "unspecified"] - ] - """ - Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. - """ - - class CreateParamsSubscriptionData(TypedDict): - application_fee_percent: NotRequired[float] - """ - A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. To use an application fee percent, the request must be made on behalf of another account, using the `Stripe-Account` header or an OAuth key. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). - """ - billing_cycle_anchor: NotRequired[int] - """ - A future timestamp to anchor the subscription's billing cycle for new subscriptions. - """ - billing_mode: NotRequired[ - "Session.CreateParamsSubscriptionDataBillingMode" - ] - """ - Controls how prorations and invoices for subscriptions are calculated and orchestrated. - """ - default_tax_rates: NotRequired[List[str]] - """ - The tax rates that will apply to any subscription item that does not have - `tax_rates` set. Invoices created will have their `default_tax_rates` populated - from the subscription. - """ - description: NotRequired[str] - """ - The subscription's description, meant to be displayable to the customer. - Use this field to optionally store an explanation of the subscription - for rendering in the [customer portal](https://stripe.com/docs/customer-management). - """ - invoice_settings: NotRequired[ - "Session.CreateParamsSubscriptionDataInvoiceSettings" - ] - """ - All invoices will be billed using the specified settings. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - on_behalf_of: NotRequired[str] - """ - The account on behalf of which to charge, for each of the subscription's invoices. - """ - proration_behavior: NotRequired[Literal["create_prorations", "none"]] - """ - Determines how to handle prorations resulting from the `billing_cycle_anchor`. If no value is passed, the default is `create_prorations`. - """ - transfer_data: NotRequired[ - "Session.CreateParamsSubscriptionDataTransferData" - ] - """ - If specified, the funds from the subscription's invoices will be transferred to the destination and the ID of the resulting transfers will be found on the resulting charges. - """ - trial_end: NotRequired[int] - """ - Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. Has to be at least 48 hours in the future. - """ - trial_period_days: NotRequired[int] - """ - Integer representing the number of trial period days before the customer is charged for the first time. Has to be at least 1. - """ - trial_settings: NotRequired[ - "Session.CreateParamsSubscriptionDataTrialSettings" - ] - """ - Settings related to subscription trials. - """ - - class CreateParamsSubscriptionDataBillingMode(TypedDict): - flexible: NotRequired[ - "Session.CreateParamsSubscriptionDataBillingModeFlexible" - ] - """ - Configure behavior for flexible billing mode. - """ - type: Literal["classic", "flexible"] - """ - Controls the calculation and orchestration of prorations and invoices for subscriptions. If no value is passed, the default is `flexible`. - """ - - class CreateParamsSubscriptionDataBillingModeFlexible(TypedDict): - proration_discounts: NotRequired[Literal["included", "itemized"]] - """ - Controls how invoices and invoice items display proration amounts and discount amounts. - """ - - class CreateParamsSubscriptionDataInvoiceSettings(TypedDict): - issuer: NotRequired[ - "Session.CreateParamsSubscriptionDataInvoiceSettingsIssuer" - ] - """ - The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. - """ - - class CreateParamsSubscriptionDataInvoiceSettingsIssuer(TypedDict): - account: NotRequired[str] - """ - The connected account being referenced when `type` is `account`. - """ - type: Literal["account", "self"] - """ - Type of the account referenced in the request. - """ - - class CreateParamsSubscriptionDataTransferData(TypedDict): - amount_percent: NotRequired[float] - """ - A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. - """ - destination: str - """ - ID of an existing, connected Stripe account. - """ - - class CreateParamsSubscriptionDataTrialSettings(TypedDict): - end_behavior: ( - "Session.CreateParamsSubscriptionDataTrialSettingsEndBehavior" - ) - """ - Defines how the subscription should behave when the user's free trial ends. - """ - - class CreateParamsSubscriptionDataTrialSettingsEndBehavior(TypedDict): - missing_payment_method: Literal["cancel", "create_invoice", "pause"] - """ - Indicates how the subscription should change when the trial ends if the user did not provide a payment method. - """ - - class CreateParamsTaxIdCollection(TypedDict): - enabled: bool - """ - Enable tax ID collection during checkout. Defaults to `false`. - """ - required: NotRequired[Literal["if_supported", "never"]] - """ - Describes whether a tax ID is required during checkout. Defaults to `never`. - """ - - class CreateParamsWalletOptions(TypedDict): - link: NotRequired["Session.CreateParamsWalletOptionsLink"] - """ - contains details about the Link wallet options. - """ - - class CreateParamsWalletOptionsLink(TypedDict): - display: NotRequired[Literal["auto", "never"]] - """ - Specifies whether Checkout should display Link as a payment option. By default, Checkout will display all the supported wallets that the Checkout Session was created with. This is the `auto` behavior, and it is the default choice. - """ - - class ExpireParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class ListLineItemsParams(RequestOptions): - 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 ListParams(RequestOptions): - created: NotRequired["Session.ListParamsCreated|int"] - """ - Only return Checkout Sessions that were created during the given date interval. - """ - customer: NotRequired[str] - """ - Only return the Checkout Sessions for the Customer specified. - """ - customer_account: NotRequired[str] - """ - Only return the Checkout Sessions for the Account specified. - """ - customer_details: NotRequired["Session.ListParamsCustomerDetails"] - """ - Only return the Checkout Sessions for the Customer details specified. - """ - 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. - """ - payment_intent: NotRequired[str] - """ - Only return the Checkout Session for the PaymentIntent specified. - """ - payment_link: NotRequired[str] - """ - Only return the Checkout Sessions for the Payment Link specified. - """ - 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. - """ - status: NotRequired[Literal["complete", "expired", "open"]] - """ - Only return the Checkout Sessions matching the given status. - """ - subscription: NotRequired[str] - """ - Only return the Checkout Session for the subscription specified. - """ - - class ListParamsCreated(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) - """ - - class ListParamsCustomerDetails(TypedDict): - email: str - """ - Customer's email address. - """ - - class ModifyParams(RequestOptions): - automatic_tax: NotRequired["Session.ModifyParamsAutomaticTax"] - """ - Settings for automatic tax lookup for this session and resulting payments, invoices, and subscriptions. - """ - collected_information: NotRequired[ - "Session.ModifyParamsCollectedInformation" - ] - """ - Information about the customer collected within the Checkout Session. Can only be set when updating `embedded` or `custom` sessions. - """ - discounts: NotRequired[ - "Literal['']|List[Session.ModifyParamsDiscount]" - ] - """ - List of coupons and promotion codes attached to the Checkout Session. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - invoice_creation: NotRequired["Session.ModifyParamsInvoiceCreation"] - """ - Generate a post-purchase Invoice for one-time payments. - """ - line_items: NotRequired[List["Session.ModifyParamsLineItem"]] - """ - A list of items the customer is purchasing. - - When updating line items, you must retransmit the entire array of line items. - - To retain an existing line item, specify its `id`. - - To update an existing line item, specify its `id` along with the new values of the fields to update. - - To add a new line item, specify one of `price` or `price_data` and `quantity`. - - To remove an existing line item, omit the line item's ID from the retransmitted array. - - To reorder a line item, specify it at the desired position in the retransmitted array. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - shipping_options: NotRequired[ - "Literal['']|List[Session.ModifyParamsShippingOption]" - ] - """ - The shipping rate options to apply to this Session. Up to a maximum of 5. - """ - subscription_data: NotRequired["Session.ModifyParamsSubscriptionData"] - """ - A subset of parameters to be passed to subscription creation for Checkout Sessions in `subscription` mode. - """ - - class ModifyParamsAutomaticTax(TypedDict): - liability: NotRequired["Session.ModifyParamsAutomaticTaxLiability"] - """ - The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. - """ - - class ModifyParamsAutomaticTaxLiability(TypedDict): - account: NotRequired[str] - """ - The connected account being referenced when `type` is `account`. - """ - type: Literal["account", "self"] - """ - Type of the account referenced in the request. - """ - - class ModifyParamsCollectedInformation(TypedDict): - shipping_details: NotRequired[ - "Session.ModifyParamsCollectedInformationShippingDetails" - ] - """ - The shipping details to apply to this Session. - """ - - class ModifyParamsCollectedInformationShippingDetails(TypedDict): - address: ( - "Session.ModifyParamsCollectedInformationShippingDetailsAddress" - ) - """ - The address of the customer - """ - name: str - """ - The name of customer - """ - - class ModifyParamsCollectedInformationShippingDetailsAddress(TypedDict): - city: NotRequired[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: 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. - """ - - class ModifyParamsDiscount(TypedDict): - coupon: NotRequired[str] - """ - The ID of the [Coupon](https://stripe.com/docs/api/coupons) to apply to this Session. One of `coupon` or `coupon_data` is required when updating discounts. - """ - coupon_data: NotRequired["Session.ModifyParamsDiscountCouponData"] - """ - Data used to generate a new [Coupon](https://stripe.com/docs/api/coupon) object inline. One of `coupon` or `coupon_data` is required when updating discounts. - """ - - class ModifyParamsDiscountCouponData(TypedDict): - amount_off: NotRequired[int] - """ - A positive integer representing the amount to subtract from an invoice total (required if `percent_off` is not passed). - """ - currency: NotRequired[str] - """ - Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) of the `amount_off` parameter (required if `amount_off` is passed). - """ - duration: NotRequired[Literal["forever", "once", "repeating"]] - """ - Specifies how long the discount will be in effect if used on a subscription. Defaults to `once`. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - name: NotRequired[str] - """ - Name of the coupon displayed to customers on, for instance invoices, or receipts. By default the `id` is shown if `name` is not set. - """ - percent_off: NotRequired[float] - """ - A positive float larger than 0, and smaller or equal to 100, that represents the discount the coupon will apply (required if `amount_off` is not passed). - """ - - class ModifyParamsInvoiceCreation(TypedDict): - invoice_data: NotRequired[ - "Session.ModifyParamsInvoiceCreationInvoiceData" - ] - """ - Parameters passed when creating invoices for payment-mode Checkout Sessions. - """ - - class ModifyParamsInvoiceCreationInvoiceData(TypedDict): - issuer: NotRequired[ - "Session.ModifyParamsInvoiceCreationInvoiceDataIssuer" - ] - """ - The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. - """ - - class ModifyParamsInvoiceCreationInvoiceDataIssuer(TypedDict): - account: NotRequired[str] - """ - The connected account being referenced when `type` is `account`. - """ - type: Literal["account", "self"] - """ - Type of the account referenced in the request. - """ - - class ModifyParamsLineItem(TypedDict): - adjustable_quantity: NotRequired[ - "Session.ModifyParamsLineItemAdjustableQuantity" - ] - """ - When set, provides configuration for this item's quantity to be adjusted by the customer during Checkout. - """ - id: NotRequired[str] - """ - ID of an existing line item. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - price: NotRequired[str] - """ - The ID of the [Price](https://stripe.com/docs/api/prices). One of `price` or `price_data` is required when creating a new line item. - """ - price_data: NotRequired["Session.ModifyParamsLineItemPriceData"] - """ - Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required when creating a new line item. - """ - quantity: NotRequired[int] - """ - The quantity of the line item being purchased. Quantity should not be defined when `recurring.usage_type=metered`. - """ - tax_rates: NotRequired["Literal['']|List[str]"] - """ - The [tax rates](https://stripe.com/docs/api/tax_rates) which apply to this line item. - """ - - class ModifyParamsLineItemAdjustableQuantity(TypedDict): - enabled: bool - """ - Set to true if the quantity can be adjusted to any positive integer. Setting to false will remove any previously specified constraints on quantity. - """ - maximum: NotRequired[int] - """ - The maximum quantity the customer can purchase for the Checkout Session. By default this value is 99. You can specify a value up to 999999. - """ - minimum: NotRequired[int] - """ - The minimum quantity the customer must purchase for the Checkout Session. By default this value is 0. - """ - - class ModifyParamsLineItemPriceData(TypedDict): - 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). - """ - product: NotRequired[str] - """ - The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to. One of `product` or `product_data` is required. - """ - product_data: NotRequired[ - "Session.ModifyParamsLineItemPriceDataProductData" - ] - """ - Data used to generate a new [Product](https://docs.stripe.com/api/products) object inline. One of `product` or `product_data` is required. - """ - recurring: NotRequired[ - "Session.ModifyParamsLineItemPriceDataRecurring" - ] - """ - The recurring components of a price such as `interval` and `interval_count`. - """ - tax_behavior: NotRequired[ - Literal["exclusive", "inclusive", "unspecified"] - ] - """ - Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. - """ - unit_amount: NotRequired[int] - """ - A non-negative integer in cents (or local equivalent) representing how much to charge. One of `unit_amount` or `unit_amount_decimal` is required. - """ - unit_amount_decimal: NotRequired[str] - """ - Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - """ - - class ModifyParamsLineItemPriceDataProductData(TypedDict): - description: NotRequired[str] - """ - The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. - """ - images: NotRequired[List[str]] - """ - A list of up to 8 URLs of images for this product, meant to be displayable to the customer. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - name: str - """ - The product's name, meant to be displayable to the customer. - """ - tax_code: NotRequired[str] - """ - A [tax code](https://stripe.com/docs/tax/tax-categories) ID. - """ - unit_label: NotRequired[str] - """ - A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal. - """ - - class ModifyParamsLineItemPriceDataRecurring(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Specifies billing frequency. Either `day`, `week`, `month` or `year`. - """ - interval_count: NotRequired[int] - """ - The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). - """ - - class ModifyParamsShippingOption(TypedDict): - shipping_rate: NotRequired[str] - """ - The ID of the Shipping Rate to use for this shipping option. - """ - shipping_rate_data: NotRequired[ - "Session.ModifyParamsShippingOptionShippingRateData" - ] - """ - Parameters to be passed to Shipping Rate creation for this shipping option. - """ - - class ModifyParamsShippingOptionShippingRateData(TypedDict): - delivery_estimate: NotRequired[ - "Session.ModifyParamsShippingOptionShippingRateDataDeliveryEstimate" - ] - """ - The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions. - """ - display_name: str - """ - The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions. - """ - fixed_amount: NotRequired[ - "Session.ModifyParamsShippingOptionShippingRateDataFixedAmount" - ] - """ - Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - tax_behavior: NotRequired[ - Literal["exclusive", "inclusive", "unspecified"] - ] - """ - Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. - """ - tax_code: NotRequired[str] - """ - A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`. - """ - type: NotRequired[Literal["fixed_amount"]] - """ - The type of calculation to use on the shipping rate. - """ - - class ModifyParamsShippingOptionShippingRateDataDeliveryEstimate( - TypedDict - ): - maximum: NotRequired[ - "Session.ModifyParamsShippingOptionShippingRateDataDeliveryEstimateMaximum" - ] - """ - The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite. - """ - minimum: NotRequired[ - "Session.ModifyParamsShippingOptionShippingRateDataDeliveryEstimateMinimum" - ] - """ - The lower bound of the estimated range. If empty, represents no lower bound. - """ - - class ModifyParamsShippingOptionShippingRateDataDeliveryEstimateMaximum( - TypedDict, - ): - unit: Literal["business_day", "day", "hour", "month", "week"] - """ - A unit of time. - """ - value: int - """ - Must be greater than 0. - """ - - class ModifyParamsShippingOptionShippingRateDataDeliveryEstimateMinimum( - TypedDict, - ): - unit: Literal["business_day", "day", "hour", "month", "week"] - """ - A unit of time. - """ - value: int - """ - Must be greater than 0. - """ - - class ModifyParamsShippingOptionShippingRateDataFixedAmount(TypedDict): - amount: int - """ - A non-negative integer in cents representing how much to charge. - """ - 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). - """ - currency_options: NotRequired[ - Dict[ - str, - "Session.ModifyParamsShippingOptionShippingRateDataFixedAmountCurrencyOptions", - ] - ] - """ - Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). - """ - - class ModifyParamsShippingOptionShippingRateDataFixedAmountCurrencyOptions( - TypedDict, - ): - amount: int - """ - A non-negative integer in cents representing how much to charge. - """ - tax_behavior: NotRequired[ - Literal["exclusive", "inclusive", "unspecified"] - ] - """ - Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. - """ - - class ModifyParamsSubscriptionData(TypedDict): - invoice_settings: NotRequired[ - "Session.ModifyParamsSubscriptionDataInvoiceSettings" - ] - """ - All invoices will be billed using the specified settings. - """ - trial_end: NotRequired[int] - """ - Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. Has to be at least 48 hours in the future. - """ - trial_period_days: NotRequired["Literal['']|int"] - """ - Integer representing the number of trial period days before the customer is charged for the first time. Has to be at least 1. - """ - - class ModifyParamsSubscriptionDataInvoiceSettings(TypedDict): - issuer: NotRequired[ - "Session.ModifyParamsSubscriptionDataInvoiceSettingsIssuer" - ] - """ - The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. - """ - - class ModifyParamsSubscriptionDataInvoiceSettingsIssuer(TypedDict): - account: NotRequired[str] - """ - The connected account being referenced when `type` is `account`. - """ - type: Literal["account", "self"] - """ - Type of the account referenced in the request. - """ - - class RetrieveParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - adaptive_pricing: Optional[AdaptivePricing] """ Settings for price localization with [Adaptive Pricing](https://docs.stripe.com/payments/checkout/adaptive-pricing). @@ -6342,7 +2730,7 @@ class RetrieveParams(RequestOptions): """ @classmethod - def create(cls, **params: Unpack["Session.CreateParams"]) -> "Session": + def create(cls, **params: Unpack["SessionCreateParams"]) -> "Session": """ Creates a Checkout Session object. """ @@ -6357,7 +2745,7 @@ def create(cls, **params: Unpack["Session.CreateParams"]) -> "Session": @classmethod async def create_async( - cls, **params: Unpack["Session.CreateParams"] + cls, **params: Unpack["SessionCreateParams"] ) -> "Session": """ Creates a Checkout Session object. @@ -6373,7 +2761,7 @@ async def create_async( @classmethod def _cls_expire( - cls, session: str, **params: Unpack["Session.ExpireParams"] + cls, session: str, **params: Unpack["SessionExpireParams"] ) -> "Session": """ A Checkout Session can be expired when it is in one of these statuses: open @@ -6394,7 +2782,7 @@ def _cls_expire( @overload @staticmethod def expire( - session: str, **params: Unpack["Session.ExpireParams"] + session: str, **params: Unpack["SessionExpireParams"] ) -> "Session": """ A Checkout Session can be expired when it is in one of these statuses: open @@ -6404,7 +2792,7 @@ def expire( ... @overload - def expire(self, **params: Unpack["Session.ExpireParams"]) -> "Session": + def expire(self, **params: Unpack["SessionExpireParams"]) -> "Session": """ A Checkout Session can be expired when it is in one of these statuses: open @@ -6414,7 +2802,7 @@ def expire(self, **params: Unpack["Session.ExpireParams"]) -> "Session": @class_method_variant("_cls_expire") def expire( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Session.ExpireParams"] + self, **params: Unpack["SessionExpireParams"] ) -> "Session": """ A Checkout Session can be expired when it is in one of these statuses: open @@ -6434,7 +2822,7 @@ def expire( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_expire_async( - cls, session: str, **params: Unpack["Session.ExpireParams"] + cls, session: str, **params: Unpack["SessionExpireParams"] ) -> "Session": """ A Checkout Session can be expired when it is in one of these statuses: open @@ -6455,7 +2843,7 @@ async def _cls_expire_async( @overload @staticmethod async def expire_async( - session: str, **params: Unpack["Session.ExpireParams"] + session: str, **params: Unpack["SessionExpireParams"] ) -> "Session": """ A Checkout Session can be expired when it is in one of these statuses: open @@ -6466,7 +2854,7 @@ async def expire_async( @overload async def expire_async( - self, **params: Unpack["Session.ExpireParams"] + self, **params: Unpack["SessionExpireParams"] ) -> "Session": """ A Checkout Session can be expired when it is in one of these statuses: open @@ -6477,7 +2865,7 @@ async def expire_async( @class_method_variant("_cls_expire_async") async def expire_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Session.ExpireParams"] + self, **params: Unpack["SessionExpireParams"] ) -> "Session": """ A Checkout Session can be expired when it is in one of these statuses: open @@ -6497,7 +2885,7 @@ async def expire_async( # pyright: ignore[reportGeneralTypeIssues] @classmethod def list( - cls, **params: Unpack["Session.ListParams"] + cls, **params: Unpack["SessionListParams"] ) -> ListObject["Session"]: """ Returns a list of Checkout Sessions. @@ -6517,7 +2905,7 @@ def list( @classmethod async def list_async( - cls, **params: Unpack["Session.ListParams"] + cls, **params: Unpack["SessionListParams"] ) -> ListObject["Session"]: """ Returns a list of Checkout Sessions. @@ -6537,7 +2925,7 @@ async def list_async( @classmethod def _cls_list_line_items( - cls, session: str, **params: Unpack["Session.ListLineItemsParams"] + cls, session: str, **params: Unpack["SessionListLineItemsParams"] ) -> ListObject["LineItem"]: """ When retrieving a Checkout Session, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items. @@ -6556,7 +2944,7 @@ def _cls_list_line_items( @overload @staticmethod def list_line_items( - session: str, **params: Unpack["Session.ListLineItemsParams"] + session: str, **params: Unpack["SessionListLineItemsParams"] ) -> ListObject["LineItem"]: """ When retrieving a Checkout Session, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items. @@ -6565,7 +2953,7 @@ def list_line_items( @overload def list_line_items( - self, **params: Unpack["Session.ListLineItemsParams"] + self, **params: Unpack["SessionListLineItemsParams"] ) -> ListObject["LineItem"]: """ When retrieving a Checkout Session, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items. @@ -6574,7 +2962,7 @@ def list_line_items( @class_method_variant("_cls_list_line_items") def list_line_items( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Session.ListLineItemsParams"] + self, **params: Unpack["SessionListLineItemsParams"] ) -> ListObject["LineItem"]: """ When retrieving a Checkout Session, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items. @@ -6592,7 +2980,7 @@ def list_line_items( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_list_line_items_async( - cls, session: str, **params: Unpack["Session.ListLineItemsParams"] + cls, session: str, **params: Unpack["SessionListLineItemsParams"] ) -> ListObject["LineItem"]: """ When retrieving a Checkout Session, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items. @@ -6611,7 +2999,7 @@ async def _cls_list_line_items_async( @overload @staticmethod async def list_line_items_async( - session: str, **params: Unpack["Session.ListLineItemsParams"] + session: str, **params: Unpack["SessionListLineItemsParams"] ) -> ListObject["LineItem"]: """ When retrieving a Checkout Session, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items. @@ -6620,7 +3008,7 @@ async def list_line_items_async( @overload async def list_line_items_async( - self, **params: Unpack["Session.ListLineItemsParams"] + self, **params: Unpack["SessionListLineItemsParams"] ) -> ListObject["LineItem"]: """ When retrieving a Checkout Session, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items. @@ -6629,7 +3017,7 @@ async def list_line_items_async( @class_method_variant("_cls_list_line_items_async") async def list_line_items_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Session.ListLineItemsParams"] + self, **params: Unpack["SessionListLineItemsParams"] ) -> ListObject["LineItem"]: """ When retrieving a Checkout Session, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items. @@ -6647,7 +3035,7 @@ async def list_line_items_async( # pyright: ignore[reportGeneralTypeIssues] @classmethod def modify( - cls, id: str, **params: Unpack["Session.ModifyParams"] + cls, id: str, **params: Unpack["SessionModifyParams"] ) -> "Session": """ Updates a Checkout Session object. @@ -6666,7 +3054,7 @@ def modify( @classmethod async def modify_async( - cls, id: str, **params: Unpack["Session.ModifyParams"] + cls, id: str, **params: Unpack["SessionModifyParams"] ) -> "Session": """ Updates a Checkout Session object. @@ -6685,7 +3073,7 @@ async def modify_async( @classmethod def retrieve( - cls, id: str, **params: Unpack["Session.RetrieveParams"] + cls, id: str, **params: Unpack["SessionRetrieveParams"] ) -> "Session": """ Retrieves a Checkout Session object. @@ -6696,7 +3084,7 @@ def retrieve( @classmethod async def retrieve_async( - cls, id: str, **params: Unpack["Session.RetrieveParams"] + cls, id: str, **params: Unpack["SessionRetrieveParams"] ) -> "Session": """ Retrieves a Checkout Session object. diff --git a/stripe/checkout/_session_line_item_service.py b/stripe/checkout/_session_line_item_service.py index c4187f35f..25862b64b 100644 --- a/stripe/checkout/_session_line_item_service.py +++ b/stripe/checkout/_session_line_item_service.py @@ -5,33 +5,20 @@ from stripe._request_options import RequestOptions from stripe._stripe_service import StripeService from stripe._util import sanitize_id -from typing import List, Optional, cast -from typing_extensions import NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params.checkout._session_line_item_list_params import ( + SessionLineItemListParams, + ) -class SessionLineItemService(StripeService): - class ListParams(TypedDict): - 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 SessionLineItemService(StripeService): def list( self, session: str, - params: Optional["SessionLineItemService.ListParams"] = None, + params: Optional["SessionLineItemListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[LineItem]: """ @@ -53,7 +40,7 @@ def list( async def list_async( self, session: str, - params: Optional["SessionLineItemService.ListParams"] = None, + params: Optional["SessionLineItemListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[LineItem]: """ diff --git a/stripe/checkout/_session_service.py b/stripe/checkout/_session_service.py index c86cbd9ee..844022bbc 100644 --- a/stripe/checkout/_session_service.py +++ b/stripe/checkout/_session_service.py @@ -6,8 +6,23 @@ from stripe._util import sanitize_id from stripe.checkout._session import Session from stripe.checkout._session_line_item_service import SessionLineItemService -from typing import Dict, List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params.checkout._session_create_params import ( + SessionCreateParams, + ) + from stripe.params.checkout._session_expire_params import ( + SessionExpireParams, + ) + from stripe.params.checkout._session_list_params import SessionListParams + from stripe.params.checkout._session_retrieve_params import ( + SessionRetrieveParams, + ) + from stripe.params.checkout._session_update_params import ( + SessionUpdateParams, + ) class SessionService(StripeService): @@ -15,3698 +30,9 @@ def __init__(self, requestor): super().__init__(requestor) self.line_items = SessionLineItemService(self._requestor) - class CreateParams(TypedDict): - adaptive_pricing: NotRequired[ - "SessionService.CreateParamsAdaptivePricing" - ] - """ - Settings for price localization with [Adaptive Pricing](https://docs.stripe.com/payments/checkout/adaptive-pricing). - """ - after_expiration: NotRequired[ - "SessionService.CreateParamsAfterExpiration" - ] - """ - Configure actions after a Checkout Session has expired. - """ - allow_promotion_codes: NotRequired[bool] - """ - Enables user redeemable promotion codes. - """ - automatic_tax: NotRequired["SessionService.CreateParamsAutomaticTax"] - """ - Settings for automatic tax lookup for this session and resulting payments, invoices, and subscriptions. - """ - billing_address_collection: NotRequired[Literal["auto", "required"]] - """ - Specify whether Checkout should collect the customer's billing address. Defaults to `auto`. - """ - branding_settings: NotRequired[ - "SessionService.CreateParamsBrandingSettings" - ] - """ - The branding settings for the Checkout Session. This parameter is not allowed if ui_mode is `custom`. - """ - cancel_url: NotRequired[str] - """ - If set, Checkout displays a back button and customers will be directed to this URL if they decide to cancel payment and return to your website. This parameter is not allowed if ui_mode is `embedded` or `custom`. - """ - client_reference_id: NotRequired[str] - """ - A unique string to reference the Checkout Session. This can be a - customer ID, a cart ID, or similar, and can be used to reconcile the - session with your internal systems. - """ - consent_collection: NotRequired[ - "SessionService.CreateParamsConsentCollection" - ] - """ - Configure fields for the Checkout Session to gather active consent from customers. - """ - currency: NotRequired[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). Required in `setup` mode when `payment_method_types` is not set. - """ - custom_fields: NotRequired[ - List["SessionService.CreateParamsCustomField"] - ] - """ - Collect additional information from your customer using custom fields. Up to 3 fields are supported. - """ - custom_text: NotRequired["SessionService.CreateParamsCustomText"] - """ - Display additional text for your customers using custom text. - """ - customer: NotRequired[str] - """ - ID of an existing Customer, if one exists. In `payment` mode, the customer's most recently saved card - payment method will be used to prefill the email, name, card details, and billing address - on the Checkout page. In `subscription` mode, the customer's [default payment method](https://stripe.com/docs/api/customers/update#update_customer-invoice_settings-default_payment_method) - will be used if it's a card, otherwise the most recently saved card will be used. A valid billing address, billing name and billing email are required on the payment method for Checkout to prefill the customer's card details. - - If the Customer already has a valid [email](https://stripe.com/docs/api/customers/object#customer_object-email) set, the email will be prefilled and not editable in Checkout. - If the Customer does not have a valid `email`, Checkout will set the email entered during the session on the Customer. - - If blank for Checkout Sessions in `subscription` mode or with `customer_creation` set as `always` in `payment` mode, Checkout will create a new Customer object based on information provided during the payment flow. - - You can set [`payment_intent_data.setup_future_usage`](https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-payment_intent_data-setup_future_usage) to have Checkout automatically attach the payment method to the Customer you pass in for future reuse. - """ - customer_account: NotRequired[str] - """ - ID of an existing Account, if one exists. Has the same behavior as `customer`. - """ - customer_creation: NotRequired[Literal["always", "if_required"]] - """ - Configure whether a Checkout Session creates a [Customer](https://stripe.com/docs/api/customers) during Session confirmation. - - When a Customer is not created, you can still retrieve email, address, and other customer data entered in Checkout - with [customer_details](https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-customer_details). - - Sessions that don't create Customers instead are grouped by [guest customers](https://stripe.com/docs/payments/checkout/guest-customers) - in the Dashboard. Promotion codes limited to first time customers will return invalid for these Sessions. - - Can only be set in `payment` and `setup` mode. - """ - customer_email: NotRequired[str] - """ - If provided, this value will be used when the Customer object is created. - If not provided, customers will be asked to enter their email address. - Use this parameter to prefill customer data if you already have an email - on file. To access information about the customer once a session is - complete, use the `customer` field. - """ - customer_update: NotRequired[ - "SessionService.CreateParamsCustomerUpdate" - ] - """ - Controls what fields on Customer can be updated by the Checkout Session. Can only be provided when `customer` is provided. - """ - discounts: NotRequired[List["SessionService.CreateParamsDiscount"]] - """ - The coupon or promotion code to apply to this Session. Currently, only up to one may be specified. - """ - excluded_payment_method_types: NotRequired[ - List[ - Literal[ - "acss_debit", - "affirm", - "afterpay_clearpay", - "alipay", - "alma", - "amazon_pay", - "au_becs_debit", - "bacs_debit", - "bancontact", - "billie", - "blik", - "boleto", - "card", - "cashapp", - "crypto", - "customer_balance", - "eps", - "fpx", - "giropay", - "gopay", - "grabpay", - "ideal", - "kakao_pay", - "klarna", - "konbini", - "kr_card", - "mb_way", - "mobilepay", - "multibanco", - "naver_pay", - "nz_bank_account", - "oxxo", - "p24", - "pay_by_bank", - "payco", - "paynow", - "paypal", - "paypay", - "payto", - "pix", - "promptpay", - "qris", - "rechnung", - "revolut_pay", - "samsung_pay", - "satispay", - "sepa_debit", - "shopeepay", - "sofort", - "swish", - "twint", - "us_bank_account", - "wechat_pay", - "zip", - ] - ] - ] - """ - A list of the types of payment methods (e.g., `card`) that should be excluded from this Checkout Session. This should only be used when payment methods for this Checkout Session are managed through the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - expires_at: NotRequired[int] - """ - The Epoch time in seconds at which the Checkout Session will expire. It can be anywhere from 30 minutes to 24 hours after Checkout Session creation. By default, this value is 24 hours from creation. - """ - invoice_creation: NotRequired[ - "SessionService.CreateParamsInvoiceCreation" - ] - """ - Generate a post-purchase Invoice for one-time payments. - """ - line_items: NotRequired[List["SessionService.CreateParamsLineItem"]] - """ - A list of items the customer is purchasing. Use this parameter to pass one-time or recurring [Prices](https://stripe.com/docs/api/prices). The parameter is required for `payment` and `subscription` mode. - - For `payment` mode, there is a maximum of 100 line items, however it is recommended to consolidate line items if there are more than a few dozen. - - For `subscription` mode, there is a maximum of 20 line items with recurring Prices and 20 line items with one-time Prices. Line items with one-time Prices will be on the initial invoice only. - """ - locale: NotRequired[ - Literal[ - "auto", - "bg", - "cs", - "da", - "de", - "el", - "en", - "en-GB", - "es", - "es-419", - "et", - "fi", - "fil", - "fr", - "fr-CA", - "hr", - "hu", - "id", - "it", - "ja", - "ko", - "lt", - "lv", - "ms", - "mt", - "nb", - "nl", - "pl", - "pt", - "pt-BR", - "ro", - "ru", - "sk", - "sl", - "sv", - "th", - "tr", - "vi", - "zh", - "zh-HK", - "zh-TW", - ] - ] - """ - The IETF language tag of the locale Checkout is displayed in. If blank or `auto`, the browser's locale is used. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - mode: NotRequired[Literal["payment", "setup", "subscription"]] - """ - The mode of the Checkout Session. Pass `subscription` if the Checkout Session includes at least one recurring item. - """ - name_collection: NotRequired[ - "SessionService.CreateParamsNameCollection" - ] - """ - Controls name collection settings for the session. - - You can configure Checkout to collect your customers' business names, individual names, or both. Each name field can be either required or optional. - - If a [Customer](https://stripe.com/docs/api/customers) is created or provided, the names can be saved to the Customer object as well. - """ - optional_items: NotRequired[ - List["SessionService.CreateParamsOptionalItem"] - ] - """ - A list of optional items the customer can add to their order at checkout. Use this parameter to pass one-time or recurring [Prices](https://stripe.com/docs/api/prices). - - There is a maximum of 10 optional items allowed on a Checkout Session, and the existing limits on the number of line items allowed on a Checkout Session apply to the combined number of line items and optional items. - - For `payment` mode, there is a maximum of 100 combined line items and optional items, however it is recommended to consolidate items if there are more than a few dozen. - - For `subscription` mode, there is a maximum of 20 line items and optional items with recurring Prices and 20 line items and optional items with one-time Prices. - """ - origin_context: NotRequired[Literal["mobile_app", "web"]] - """ - Where the user is coming from. This informs the optimizations that are applied to the session. - """ - payment_intent_data: NotRequired[ - "SessionService.CreateParamsPaymentIntentData" - ] - """ - A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in `payment` mode. - """ - payment_method_collection: NotRequired[ - Literal["always", "if_required"] - ] - """ - Specify whether Checkout should collect a payment method. When set to `if_required`, Checkout will not collect a payment method when the total due for the session is 0. - This may occur if the Checkout Session includes a free trial or a discount. - - Can only be set in `subscription` mode. Defaults to `always`. - - If you'd like information on how to collect a payment method outside of Checkout, read the guide on configuring [subscriptions with a free trial](https://stripe.com/docs/payments/checkout/free-trials). - """ - payment_method_configuration: NotRequired[str] - """ - The ID of the payment method configuration to use with this Checkout session. - """ - payment_method_data: NotRequired[ - "SessionService.CreateParamsPaymentMethodData" - ] - """ - This parameter allows you to set some attributes on the payment method created during a Checkout session. - """ - payment_method_options: NotRequired[ - "SessionService.CreateParamsPaymentMethodOptions" - ] - """ - Payment-method-specific configuration. - """ - payment_method_types: NotRequired[ - List[ - Literal[ - "acss_debit", - "affirm", - "afterpay_clearpay", - "alipay", - "alma", - "amazon_pay", - "au_becs_debit", - "bacs_debit", - "bancontact", - "billie", - "blik", - "boleto", - "card", - "cashapp", - "crypto", - "customer_balance", - "eps", - "fpx", - "giropay", - "gopay", - "grabpay", - "ideal", - "kakao_pay", - "klarna", - "konbini", - "kr_card", - "link", - "mb_way", - "mobilepay", - "multibanco", - "naver_pay", - "nz_bank_account", - "oxxo", - "p24", - "pay_by_bank", - "payco", - "paynow", - "paypal", - "paypay", - "payto", - "pix", - "promptpay", - "qris", - "rechnung", - "revolut_pay", - "samsung_pay", - "satispay", - "sepa_debit", - "shopeepay", - "sofort", - "swish", - "twint", - "us_bank_account", - "wechat_pay", - "zip", - ] - ] - ] - """ - A list of the types of payment methods (e.g., `card`) this Checkout Session can accept. - - You can omit this attribute to manage your payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). - See [Dynamic Payment Methods](https://stripe.com/docs/payments/payment-methods/integration-options#using-dynamic-payment-methods) for more details. - - Read more about the supported payment methods and their requirements in our [payment - method details guide](https://docs.stripe.com/docs/payments/checkout/payment-methods). - - If multiple payment methods are passed, Checkout will dynamically reorder them to - prioritize the most relevant payment methods based on the customer's location and - other characteristics. - """ - permissions: NotRequired["SessionService.CreateParamsPermissions"] - """ - This property is used to set up permissions for various actions (e.g., update) on the CheckoutSession object. Can only be set when creating `embedded` or `custom` sessions. - - For specific permissions, please refer to their dedicated subsections, such as `permissions.update_shipping_details`. - """ - phone_number_collection: NotRequired[ - "SessionService.CreateParamsPhoneNumberCollection" - ] - """ - Controls phone number collection settings for the session. - - We recommend that you review your privacy policy and check with your legal contacts - before using this feature. Learn more about [collecting phone numbers with Checkout](https://stripe.com/docs/payments/checkout/phone-numbers). - """ - redirect_on_completion: NotRequired[ - Literal["always", "if_required", "never"] - ] - """ - This parameter applies to `ui_mode: embedded`. Learn more about the [redirect behavior](https://stripe.com/docs/payments/checkout/custom-success-page?payment-ui=embedded-form) of embedded sessions. Defaults to `always`. - """ - return_url: NotRequired[str] - """ - The URL to redirect your customer back to after they authenticate or cancel their payment on the - payment method's app or site. This parameter is required if `ui_mode` is `embedded` or `custom` - and redirect-based payment methods are enabled on the session. - """ - saved_payment_method_options: NotRequired[ - "SessionService.CreateParamsSavedPaymentMethodOptions" - ] - """ - Controls saved payment method settings for the session. Only available in `payment` and `subscription` mode. - """ - setup_intent_data: NotRequired[ - "SessionService.CreateParamsSetupIntentData" - ] - """ - A subset of parameters to be passed to SetupIntent creation for Checkout Sessions in `setup` mode. - """ - shipping_address_collection: NotRequired[ - "SessionService.CreateParamsShippingAddressCollection" - ] - """ - When set, provides configuration for Checkout to collect a shipping address from a customer. - """ - shipping_options: NotRequired[ - List["SessionService.CreateParamsShippingOption"] - ] - """ - The shipping rate options to apply to this Session. Up to a maximum of 5. - """ - submit_type: NotRequired[ - Literal["auto", "book", "donate", "pay", "subscribe"] - ] - """ - Describes the type of transaction being performed by Checkout in order - to customize relevant text on the page, such as the submit button. - `submit_type` can only be specified on Checkout Sessions in - `payment` or `subscription` mode. If blank or `auto`, `pay` is used. - """ - subscription_data: NotRequired[ - "SessionService.CreateParamsSubscriptionData" - ] - """ - A subset of parameters to be passed to subscription creation for Checkout Sessions in `subscription` mode. - """ - success_url: NotRequired[str] - """ - The URL to which Stripe should send customers when payment or setup - is complete. - This parameter is not allowed if ui_mode is `embedded` or `custom`. If you'd like to use - information from the successful Checkout Session on your page, read the - guide on [customizing your success page](https://stripe.com/docs/payments/checkout/custom-success-page). - """ - tax_id_collection: NotRequired[ - "SessionService.CreateParamsTaxIdCollection" - ] - """ - Controls tax ID collection during checkout. - """ - ui_mode: NotRequired[Literal["custom", "embedded", "hosted"]] - """ - The UI mode of the Session. Defaults to `hosted`. - """ - wallet_options: NotRequired["SessionService.CreateParamsWalletOptions"] - """ - Wallet-specific configuration. - """ - checkout_items: NotRequired[ - List["SessionService.CreateParamsCheckoutItem"] - ] - - class CreateParamsAdaptivePricing(TypedDict): - enabled: NotRequired[bool] - """ - If set to `true`, Adaptive Pricing is available on [eligible sessions](https://docs.stripe.com/payments/currencies/localize-prices/adaptive-pricing?payment-ui=stripe-hosted#restrictions). Defaults to your [dashboard setting](https://dashboard.stripe.com/settings/adaptive-pricing). - """ - - class CreateParamsAfterExpiration(TypedDict): - recovery: NotRequired[ - "SessionService.CreateParamsAfterExpirationRecovery" - ] - """ - Configure a Checkout Session that can be used to recover an expired session. - """ - - class CreateParamsAfterExpirationRecovery(TypedDict): - allow_promotion_codes: NotRequired[bool] - """ - Enables user redeemable promotion codes on the recovered Checkout Sessions. Defaults to `false` - """ - enabled: bool - """ - If `true`, a recovery URL will be generated to recover this Checkout Session if it - expires before a successful transaction is completed. It will be attached to the - Checkout Session object upon expiration. - """ - - class CreateParamsAutomaticTax(TypedDict): - enabled: bool - """ - Set to `true` to [calculate tax automatically](https://docs.stripe.com/tax) using the customer's location. - - Enabling this parameter causes Checkout to collect any billing address information necessary for tax calculation. - """ - liability: NotRequired[ - "SessionService.CreateParamsAutomaticTaxLiability" - ] - """ - The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. - """ - - class CreateParamsAutomaticTaxLiability(TypedDict): - account: NotRequired[str] - """ - The connected account being referenced when `type` is `account`. - """ - type: Literal["account", "self"] - """ - Type of the account referenced in the request. - """ - - class CreateParamsBrandingSettings(TypedDict): - background_color: NotRequired["Literal['']|str"] - """ - A hex color value starting with `#` representing the background color for the Checkout Session. - """ - border_style: NotRequired[ - "Literal['']|Literal['pill', 'rectangular', 'rounded']" - ] - """ - The border style for the Checkout Session. - """ - button_color: NotRequired["Literal['']|str"] - """ - A hex color value starting with `#` representing the button color for the Checkout Session. - """ - display_name: NotRequired[str] - """ - A string to override the business name shown on the Checkout Session. - """ - font_family: NotRequired[ - "Literal['']|Literal['be_vietnam_pro', 'bitter', 'chakra_petch', 'default', 'hahmlet', 'inconsolata', 'inter', 'lato', 'lora', 'm_plus_1_code', 'montserrat', 'noto_sans', 'noto_sans_jp', 'noto_serif', 'nunito', 'open_sans', 'pridi', 'pt_sans', 'pt_serif', 'raleway', 'roboto', 'roboto_slab', 'source_sans_pro', 'titillium_web', 'ubuntu_mono', 'zen_maru_gothic']" - ] - """ - The font family for the Checkout Session corresponding to one of the [supported font families](https://docs.stripe.com/payments/checkout/customization/appearance?payment-ui=stripe-hosted#font-compatibility). - """ - icon: NotRequired["SessionService.CreateParamsBrandingSettingsIcon"] - """ - The icon for the Checkout Session. You cannot set both `logo` and `icon`. - """ - logo: NotRequired["SessionService.CreateParamsBrandingSettingsLogo"] - """ - The logo for the Checkout Session. You cannot set both `logo` and `icon`. - """ - - class CreateParamsBrandingSettingsIcon(TypedDict): - file: NotRequired[str] - """ - The ID of a [File upload](https://stripe.com/docs/api/files) representing the icon. Purpose must be `business_icon`. Required if `type` is `file` and disallowed otherwise. - """ - type: Literal["file", "url"] - """ - The type of image for the icon. Must be one of `file` or `url`. - """ - url: NotRequired[str] - """ - The URL of the image. Required if `type` is `url` and disallowed otherwise. - """ - - class CreateParamsBrandingSettingsLogo(TypedDict): - file: NotRequired[str] - """ - The ID of a [File upload](https://stripe.com/docs/api/files) representing the logo. Purpose must be `business_logo`. Required if `type` is `file` and disallowed otherwise. - """ - type: Literal["file", "url"] - """ - The type of image for the logo. Must be one of `file` or `url`. - """ - url: NotRequired[str] - """ - The URL of the image. Required if `type` is `url` and disallowed otherwise. - """ - - class CreateParamsCheckoutItem(TypedDict): - type: Literal[ - "rate_card_subscription_item", "pricing_plan_subscription_item" - ] - rate_card_subscription_item: NotRequired[ - "SessionService.CreateParamsCheckoutItemRateCardSubscriptionItem" - ] - pricing_plan_subscription_item: NotRequired[ - "SessionService.CreateParamsCheckoutItemPricingPlanSubscriptionItem" - ] - - class CreateParamsCheckoutItemPricingPlanSubscriptionItem(TypedDict): - pricing_plan: str - pricing_plan_version: NotRequired[str] - metadata: NotRequired[Dict[str, str]] - component_configurations: NotRequired[ - Dict[ - str, - "SessionService.CreateParamsCheckoutItemPricingPlanSubscriptionItemComponentConfigurations", - ] - ] - - class CreateParamsCheckoutItemPricingPlanSubscriptionItemComponentConfigurations( - TypedDict, - ): - type: Literal["license_fee_component"] - license_fee_component: NotRequired[ - "SessionService.CreateParamsCheckoutItemPricingPlanSubscriptionItemComponentConfigurationsLicenseFeeComponent" - ] - - class CreateParamsCheckoutItemPricingPlanSubscriptionItemComponentConfigurationsLicenseFeeComponent( - TypedDict, - ): - quantity: int - - class CreateParamsCheckoutItemRateCardSubscriptionItem(TypedDict): - rate_card: str - metadata: NotRequired[Dict[str, str]] - rate_card_version: NotRequired[str] - - class CreateParamsConsentCollection(TypedDict): - payment_method_reuse_agreement: NotRequired[ - "SessionService.CreateParamsConsentCollectionPaymentMethodReuseAgreement" - ] - """ - Determines the display of payment method reuse agreement text in the UI. If set to `hidden`, it will hide legal text related to the reuse of a payment method. - """ - promotions: NotRequired[Literal["auto", "none"]] - """ - If set to `auto`, enables the collection of customer consent for promotional communications. The Checkout - Session will determine whether to display an option to opt into promotional communication - from the merchant depending on the customer's locale. Only available to US merchants. - """ - terms_of_service: NotRequired[Literal["none", "required"]] - """ - If set to `required`, it requires customers to check a terms of service checkbox before being able to pay. - There must be a valid terms of service URL set in your [Dashboard settings](https://dashboard.stripe.com/settings/public). - """ - - class CreateParamsConsentCollectionPaymentMethodReuseAgreement(TypedDict): - position: Literal["auto", "hidden"] - """ - Determines the position and visibility of the payment method reuse agreement in the UI. When set to `auto`, Stripe's - defaults will be used. When set to `hidden`, the payment method reuse agreement text will always be hidden in the UI. - """ - - class CreateParamsCustomField(TypedDict): - dropdown: NotRequired["SessionService.CreateParamsCustomFieldDropdown"] - """ - Configuration for `type=dropdown` fields. - """ - key: str - """ - String of your choice that your integration can use to reconcile this field. Must be unique to this field, alphanumeric, and up to 200 characters. - """ - label: "SessionService.CreateParamsCustomFieldLabel" - """ - The label for the field, displayed to the customer. - """ - numeric: NotRequired["SessionService.CreateParamsCustomFieldNumeric"] - """ - Configuration for `type=numeric` fields. - """ - optional: NotRequired[bool] - """ - Whether the customer is required to complete the field before completing the Checkout Session. Defaults to `false`. - """ - text: NotRequired["SessionService.CreateParamsCustomFieldText"] - """ - Configuration for `type=text` fields. - """ - type: Literal["dropdown", "numeric", "text"] - """ - The type of the field. - """ - - class CreateParamsCustomFieldDropdown(TypedDict): - default_value: NotRequired[str] - """ - The value that will pre-fill the field on the payment page.Must match a `value` in the `options` array. - """ - options: List["SessionService.CreateParamsCustomFieldDropdownOption"] - """ - The options available for the customer to select. Up to 200 options allowed. - """ - - class CreateParamsCustomFieldDropdownOption(TypedDict): - label: str - """ - The label for the option, displayed to the customer. Up to 100 characters. - """ - value: str - """ - The value for this option, not displayed to the customer, used by your integration to reconcile the option selected by the customer. Must be unique to this option, alphanumeric, and up to 100 characters. - """ - - class CreateParamsCustomFieldLabel(TypedDict): - custom: str - """ - Custom text for the label, displayed to the customer. Up to 50 characters. - """ - type: Literal["custom"] - """ - The type of the label. - """ - - class CreateParamsCustomFieldNumeric(TypedDict): - default_value: NotRequired[str] - """ - The value that will pre-fill the field on the payment page. - """ - maximum_length: NotRequired[int] - """ - The maximum character length constraint for the customer's input. - """ - minimum_length: NotRequired[int] - """ - The minimum character length requirement for the customer's input. - """ - - class CreateParamsCustomFieldText(TypedDict): - default_value: NotRequired[str] - """ - The value that will pre-fill the field on the payment page. - """ - maximum_length: NotRequired[int] - """ - The maximum character length constraint for the customer's input. - """ - minimum_length: NotRequired[int] - """ - The minimum character length requirement for the customer's input. - """ - - class CreateParamsCustomText(TypedDict): - after_submit: NotRequired[ - "Literal['']|SessionService.CreateParamsCustomTextAfterSubmit" - ] - """ - Custom text that should be displayed after the payment confirmation button. - """ - shipping_address: NotRequired[ - "Literal['']|SessionService.CreateParamsCustomTextShippingAddress" - ] - """ - Custom text that should be displayed alongside shipping address collection. - """ - submit: NotRequired[ - "Literal['']|SessionService.CreateParamsCustomTextSubmit" - ] - """ - Custom text that should be displayed alongside the payment confirmation button. - """ - terms_of_service_acceptance: NotRequired[ - "Literal['']|SessionService.CreateParamsCustomTextTermsOfServiceAcceptance" - ] - """ - Custom text that should be displayed in place of the default terms of service agreement text. - """ - - class CreateParamsCustomTextAfterSubmit(TypedDict): - message: str - """ - Text may be up to 1200 characters in length. - """ - - class CreateParamsCustomTextShippingAddress(TypedDict): - message: str - """ - Text may be up to 1200 characters in length. - """ - - class CreateParamsCustomTextSubmit(TypedDict): - message: str - """ - Text may be up to 1200 characters in length. - """ - - class CreateParamsCustomTextTermsOfServiceAcceptance(TypedDict): - message: str - """ - Text may be up to 1200 characters in length. - """ - - class CreateParamsCustomerUpdate(TypedDict): - address: NotRequired[Literal["auto", "never"]] - """ - Describes whether Checkout saves the billing address onto `customer.address`. - To always collect a full billing address, use `billing_address_collection`. Defaults to `never`. - """ - name: NotRequired[Literal["auto", "never"]] - """ - Describes whether Checkout saves the name onto `customer.name`. Defaults to `never`. - """ - shipping: NotRequired[Literal["auto", "never"]] - """ - Describes whether Checkout saves shipping information onto `customer.shipping`. - To collect shipping information, use `shipping_address_collection`. Defaults to `never`. - """ - - class CreateParamsDiscount(TypedDict): - coupon: NotRequired[str] - """ - The ID of the coupon to apply to this Session. - """ - coupon_data: NotRequired[ - "SessionService.CreateParamsDiscountCouponData" - ] - """ - Data used to generate a new [Coupon](https://stripe.com/docs/api/coupon) object inline. One of `coupon` or `coupon_data` is required when updating discounts. - """ - promotion_code: NotRequired[str] - """ - The ID of a promotion code to apply to this Session. - """ - - class CreateParamsDiscountCouponData(TypedDict): - amount_off: NotRequired[int] - """ - A positive integer representing the amount to subtract from an invoice total (required if `percent_off` is not passed). - """ - currency: NotRequired[str] - """ - Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) of the `amount_off` parameter (required if `amount_off` is passed). - """ - duration: NotRequired[Literal["forever", "once", "repeating"]] - """ - Specifies how long the discount will be in effect if used on a subscription. Defaults to `once`. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - name: NotRequired[str] - """ - Name of the coupon displayed to customers on, for instance invoices, or receipts. By default the `id` is shown if `name` is not set. - """ - percent_off: NotRequired[float] - """ - A positive float larger than 0, and smaller or equal to 100, that represents the discount the coupon will apply (required if `amount_off` is not passed). - """ - - class CreateParamsInvoiceCreation(TypedDict): - enabled: bool - """ - Set to `true` to enable invoice creation. - """ - invoice_data: NotRequired[ - "SessionService.CreateParamsInvoiceCreationInvoiceData" - ] - """ - Parameters passed when creating invoices for payment-mode Checkout Sessions. - """ - - class CreateParamsInvoiceCreationInvoiceData(TypedDict): - account_tax_ids: NotRequired["Literal['']|List[str]"] - """ - The account tax IDs associated with the invoice. - """ - custom_fields: NotRequired[ - "Literal['']|List[SessionService.CreateParamsInvoiceCreationInvoiceDataCustomField]" - ] - """ - Default custom fields to be displayed on invoices for this customer. - """ - description: NotRequired[str] - """ - An arbitrary string attached to the object. Often useful for displaying to users. - """ - footer: NotRequired[str] - """ - Default footer to be displayed on invoices for this customer. - """ - issuer: NotRequired[ - "SessionService.CreateParamsInvoiceCreationInvoiceDataIssuer" - ] - """ - The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - rendering_options: NotRequired[ - "Literal['']|SessionService.CreateParamsInvoiceCreationInvoiceDataRenderingOptions" - ] - """ - Default options for invoice PDF rendering for this customer. - """ - - class CreateParamsInvoiceCreationInvoiceDataCustomField(TypedDict): - name: str - """ - The name of the custom field. This may be up to 40 characters. - """ - value: str - """ - The value of the custom field. This may be up to 140 characters. - """ - - class CreateParamsInvoiceCreationInvoiceDataIssuer(TypedDict): - account: NotRequired[str] - """ - The connected account being referenced when `type` is `account`. - """ - type: Literal["account", "self"] - """ - Type of the account referenced in the request. - """ - - class CreateParamsInvoiceCreationInvoiceDataRenderingOptions(TypedDict): - amount_tax_display: NotRequired[ - "Literal['']|Literal['exclude_tax', 'include_inclusive_tax']" - ] - """ - How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One of `exclude_tax` or `include_inclusive_tax`. `include_inclusive_tax` will include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. `exclude_tax` will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts. - """ - template: NotRequired[str] - """ - ID of the invoice rendering template to use for this invoice. - """ - - class CreateParamsLineItem(TypedDict): - adjustable_quantity: NotRequired[ - "SessionService.CreateParamsLineItemAdjustableQuantity" - ] - """ - When set, provides configuration for this item's quantity to be adjusted by the customer during Checkout. - """ - dynamic_tax_rates: NotRequired[List[str]] - """ - The [tax rates](https://stripe.com/docs/api/tax_rates) that will be applied to this line item depending on the customer's billing/shipping address. We currently support the following countries: US, GB, AU, and all countries in the EU. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - price: NotRequired[str] - """ - The ID of the [Price](https://stripe.com/docs/api/prices) or [Plan](https://stripe.com/docs/api/plans) object. One of `price` or `price_data` is required. - """ - price_data: NotRequired["SessionService.CreateParamsLineItemPriceData"] - """ - Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. - """ - quantity: NotRequired[int] - """ - The quantity of the line item being purchased. Quantity should not be defined when `recurring.usage_type=metered`. - """ - tax_rates: NotRequired[List[str]] - """ - The [tax rates](https://stripe.com/docs/api/tax_rates) which apply to this line item. - """ - - class CreateParamsLineItemAdjustableQuantity(TypedDict): - enabled: bool - """ - Set to true if the quantity can be adjusted to any non-negative integer. - """ - maximum: NotRequired[int] - """ - The maximum quantity the customer can purchase for the Checkout Session. By default this value is 99. You can specify a value up to 999999. - """ - minimum: NotRequired[int] - """ - The minimum quantity the customer must purchase for the Checkout Session. By default this value is 0. - """ - - class CreateParamsLineItemPriceData(TypedDict): - 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). - """ - product: NotRequired[str] - """ - The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to. One of `product` or `product_data` is required. - """ - product_data: NotRequired[ - "SessionService.CreateParamsLineItemPriceDataProductData" - ] - """ - Data used to generate a new [Product](https://docs.stripe.com/api/products) object inline. One of `product` or `product_data` is required. - """ - recurring: NotRequired[ - "SessionService.CreateParamsLineItemPriceDataRecurring" - ] - """ - The recurring components of a price such as `interval` and `interval_count`. - """ - tax_behavior: NotRequired[ - Literal["exclusive", "inclusive", "unspecified"] - ] - """ - Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. - """ - unit_amount: NotRequired[int] - """ - A non-negative integer in cents (or local equivalent) representing how much to charge. One of `unit_amount` or `unit_amount_decimal` is required. - """ - unit_amount_decimal: NotRequired[str] - """ - Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - """ - - class CreateParamsLineItemPriceDataProductData(TypedDict): - description: NotRequired[str] - """ - The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. - """ - images: NotRequired[List[str]] - """ - A list of up to 8 URLs of images for this product, meant to be displayable to the customer. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - name: str - """ - The product's name, meant to be displayable to the customer. - """ - tax_code: NotRequired[str] - """ - A [tax code](https://stripe.com/docs/tax/tax-categories) ID. - """ - unit_label: NotRequired[str] - """ - A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal. - """ - - class CreateParamsLineItemPriceDataRecurring(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Specifies billing frequency. Either `day`, `week`, `month` or `year`. - """ - interval_count: NotRequired[int] - """ - The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). - """ - - class CreateParamsNameCollection(TypedDict): - business: NotRequired[ - "SessionService.CreateParamsNameCollectionBusiness" - ] - """ - Controls settings applied for collecting the customer's business name on the session. - """ - individual: NotRequired[ - "SessionService.CreateParamsNameCollectionIndividual" - ] - """ - Controls settings applied for collecting the customer's individual name on the session. - """ - - class CreateParamsNameCollectionBusiness(TypedDict): - enabled: bool - """ - Enable business name collection on the Checkout Session. Defaults to `false`. - """ - optional: NotRequired[bool] - """ - Whether the customer is required to provide a business name before completing the Checkout Session. Defaults to `false`. - """ - - class CreateParamsNameCollectionIndividual(TypedDict): - enabled: bool - """ - Enable individual name collection on the Checkout Session. Defaults to `false`. - """ - optional: NotRequired[bool] - """ - Whether the customer is required to provide their name before completing the Checkout Session. Defaults to `false`. - """ - - class CreateParamsOptionalItem(TypedDict): - adjustable_quantity: NotRequired[ - "SessionService.CreateParamsOptionalItemAdjustableQuantity" - ] - """ - When set, provides configuration for the customer to adjust the quantity of the line item created when a customer chooses to add this optional item to their order. - """ - price: str - """ - The ID of the [Price](https://stripe.com/docs/api/prices) or [Plan](https://stripe.com/docs/api/plans) object. - """ - quantity: int - """ - The initial quantity of the line item created when a customer chooses to add this optional item to their order. - """ - - class CreateParamsOptionalItemAdjustableQuantity(TypedDict): - enabled: bool - """ - Set to true if the quantity can be adjusted to any non-negative integer. - """ - maximum: NotRequired[int] - """ - The maximum quantity of this item the customer can purchase. By default this value is 99. You can specify a value up to 999999. - """ - minimum: NotRequired[int] - """ - The minimum quantity of this item the customer must purchase, if they choose to purchase it. Because this item is optional, the customer will always be able to remove it from their order, even if the `minimum` configured here is greater than 0. By default this value is 0. - """ - - class CreateParamsPaymentIntentData(TypedDict): - application_fee_amount: NotRequired[int] - """ - The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total amount captured. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). - """ - capture_method: NotRequired[ - Literal["automatic", "automatic_async", "manual"] - ] - """ - Controls when the funds will be captured from the customer's account. - """ - description: NotRequired[str] - """ - An arbitrary string attached to the object. Often useful for displaying to users. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - on_behalf_of: NotRequired[str] - """ - The Stripe account ID for which these funds are intended. For details, - see the PaymentIntents [use case for connected - accounts](https://docs.stripe.com/docs/payments/connected-accounts). - """ - receipt_email: NotRequired[str] - """ - Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). - """ - setup_future_usage: NotRequired[Literal["off_session", "on_session"]] - """ - Indicates that you intend to [make future payments](https://stripe.com/docs/payments/payment-intents#future-usage) with the payment - method collected by this Checkout Session. - - When setting this to `on_session`, Checkout will show a notice to the - customer that their payment details will be saved. - - When setting this to `off_session`, Checkout will show a notice to the - customer that their payment details will be saved and used for future - payments. - - If a Customer has been provided or Checkout creates a new Customer, - Checkout will attach the payment method to the Customer. - - If Checkout does not create a Customer, the payment method is not attached - to a Customer. To reuse the payment method, you can retrieve it from the - Checkout Session's PaymentIntent. - - When processing card payments, Checkout also uses `setup_future_usage` - to dynamically optimize your payment flow and comply with regional - legislation and network rules, such as SCA. - """ - shipping: NotRequired[ - "SessionService.CreateParamsPaymentIntentDataShipping" - ] - """ - Shipping information for this payment. - """ - statement_descriptor: NotRequired[str] - """ - Text that appears on the customer's statement as the statement descriptor for a non-card charge. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see [the Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors). - - Setting this value for a card charge returns an error. For card charges, set the [statement_descriptor_suffix](https://docs.stripe.com/get-started/account/statement-descriptors#dynamic) instead. - """ - statement_descriptor_suffix: NotRequired[str] - """ - Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. - """ - transfer_data: NotRequired[ - "SessionService.CreateParamsPaymentIntentDataTransferData" - ] - """ - The parameters used to automatically create a Transfer when the payment succeeds. - For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). - """ - transfer_group: NotRequired[str] - """ - A string that identifies the resulting payment as part of a group. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/connect/separate-charges-and-transfers) for details. - """ - - class CreateParamsPaymentIntentDataShipping(TypedDict): - address: "SessionService.CreateParamsPaymentIntentDataShippingAddress" - """ - Shipping address. - """ - carrier: NotRequired[str] - """ - The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. - """ - name: str - """ - Recipient name. - """ - phone: NotRequired[str] - """ - Recipient phone (including extension). - """ - tracking_number: NotRequired[str] - """ - The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. - """ - - class CreateParamsPaymentIntentDataShippingAddress(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: 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. - """ - - class CreateParamsPaymentIntentDataTransferData(TypedDict): - amount: NotRequired[int] - """ - The amount that will be transferred automatically when a charge succeeds. - """ - destination: str - """ - If specified, successful charges will be attributed to the destination - account for tax reporting, and the funds from charges will be transferred - to the destination account. The ID of the resulting transfer will be - returned on the successful charge's `transfer` field. - """ - - class CreateParamsPaymentMethodData(TypedDict): - allow_redisplay: NotRequired[ - Literal["always", "limited", "unspecified"] - ] - """ - Allow redisplay will be set on the payment method on confirmation and indicates whether this payment method can be shown again to the customer in a checkout flow. Only set this field if you wish to override the allow_redisplay value determined by Checkout. - """ - - class CreateParamsPaymentMethodOptions(TypedDict): - acss_debit: NotRequired[ - "SessionService.CreateParamsPaymentMethodOptionsAcssDebit" - ] - """ - contains details about the ACSS Debit payment method options. - """ - affirm: NotRequired[ - "SessionService.CreateParamsPaymentMethodOptionsAffirm" - ] - """ - contains details about the Affirm payment method options. - """ - afterpay_clearpay: NotRequired[ - "SessionService.CreateParamsPaymentMethodOptionsAfterpayClearpay" - ] - """ - contains details about the Afterpay Clearpay payment method options. - """ - alipay: NotRequired[ - "SessionService.CreateParamsPaymentMethodOptionsAlipay" - ] - """ - contains details about the Alipay payment method options. - """ - alma: NotRequired[ - "SessionService.CreateParamsPaymentMethodOptionsAlma" - ] - """ - contains details about the Alma payment method options. - """ - amazon_pay: NotRequired[ - "SessionService.CreateParamsPaymentMethodOptionsAmazonPay" - ] - """ - contains details about the AmazonPay payment method options. - """ - au_becs_debit: NotRequired[ - "SessionService.CreateParamsPaymentMethodOptionsAuBecsDebit" - ] - """ - contains details about the AU Becs Debit payment method options. - """ - bacs_debit: NotRequired[ - "SessionService.CreateParamsPaymentMethodOptionsBacsDebit" - ] - """ - contains details about the Bacs Debit payment method options. - """ - bancontact: NotRequired[ - "SessionService.CreateParamsPaymentMethodOptionsBancontact" - ] - """ - contains details about the Bancontact payment method options. - """ - billie: NotRequired[ - "SessionService.CreateParamsPaymentMethodOptionsBillie" - ] - """ - contains details about the Billie payment method options. - """ - boleto: NotRequired[ - "SessionService.CreateParamsPaymentMethodOptionsBoleto" - ] - """ - contains details about the Boleto payment method options. - """ - card: NotRequired[ - "SessionService.CreateParamsPaymentMethodOptionsCard" - ] - """ - contains details about the Card payment method options. - """ - cashapp: NotRequired[ - "SessionService.CreateParamsPaymentMethodOptionsCashapp" - ] - """ - contains details about the Cashapp Pay payment method options. - """ - customer_balance: NotRequired[ - "SessionService.CreateParamsPaymentMethodOptionsCustomerBalance" - ] - """ - contains details about the Customer Balance payment method options. - """ - demo_pay: NotRequired[ - "SessionService.CreateParamsPaymentMethodOptionsDemoPay" - ] - """ - contains details about the DemoPay payment method options. - """ - eps: NotRequired["SessionService.CreateParamsPaymentMethodOptionsEps"] - """ - contains details about the EPS payment method options. - """ - fpx: NotRequired["SessionService.CreateParamsPaymentMethodOptionsFpx"] - """ - contains details about the FPX payment method options. - """ - giropay: NotRequired[ - "SessionService.CreateParamsPaymentMethodOptionsGiropay" - ] - """ - contains details about the Giropay payment method options. - """ - grabpay: NotRequired[ - "SessionService.CreateParamsPaymentMethodOptionsGrabpay" - ] - """ - contains details about the Grabpay payment method options. - """ - ideal: NotRequired[ - "SessionService.CreateParamsPaymentMethodOptionsIdeal" - ] - """ - contains details about the Ideal payment method options. - """ - kakao_pay: NotRequired[ - "SessionService.CreateParamsPaymentMethodOptionsKakaoPay" - ] - """ - contains details about the Kakao Pay payment method options. - """ - klarna: NotRequired[ - "SessionService.CreateParamsPaymentMethodOptionsKlarna" - ] - """ - contains details about the Klarna payment method options. - """ - konbini: NotRequired[ - "SessionService.CreateParamsPaymentMethodOptionsKonbini" - ] - """ - contains details about the Konbini payment method options. - """ - kr_card: NotRequired[ - "SessionService.CreateParamsPaymentMethodOptionsKrCard" - ] - """ - contains details about the Korean card payment method options. - """ - link: NotRequired[ - "SessionService.CreateParamsPaymentMethodOptionsLink" - ] - """ - contains details about the Link payment method options. - """ - mobilepay: NotRequired[ - "SessionService.CreateParamsPaymentMethodOptionsMobilepay" - ] - """ - contains details about the Mobilepay payment method options. - """ - multibanco: NotRequired[ - "SessionService.CreateParamsPaymentMethodOptionsMultibanco" - ] - """ - contains details about the Multibanco payment method options. - """ - naver_pay: NotRequired[ - "SessionService.CreateParamsPaymentMethodOptionsNaverPay" - ] - """ - contains details about the Naver Pay payment method options. - """ - oxxo: NotRequired[ - "SessionService.CreateParamsPaymentMethodOptionsOxxo" - ] - """ - contains details about the OXXO payment method options. - """ - p24: NotRequired["SessionService.CreateParamsPaymentMethodOptionsP24"] - """ - contains details about the P24 payment method options. - """ - pay_by_bank: NotRequired[ - "SessionService.CreateParamsPaymentMethodOptionsPayByBank" - ] - """ - contains details about the Pay By Bank payment method options. - """ - payco: NotRequired[ - "SessionService.CreateParamsPaymentMethodOptionsPayco" - ] - """ - contains details about the PAYCO payment method options. - """ - paynow: NotRequired[ - "SessionService.CreateParamsPaymentMethodOptionsPaynow" - ] - """ - contains details about the PayNow payment method options. - """ - paypal: NotRequired[ - "SessionService.CreateParamsPaymentMethodOptionsPaypal" - ] - """ - contains details about the PayPal payment method options. - """ - payto: NotRequired[ - "SessionService.CreateParamsPaymentMethodOptionsPayto" - ] - """ - contains details about the PayTo payment method options. - """ - pix: NotRequired["SessionService.CreateParamsPaymentMethodOptionsPix"] - """ - contains details about the Pix payment method options. - """ - revolut_pay: NotRequired[ - "SessionService.CreateParamsPaymentMethodOptionsRevolutPay" - ] - """ - contains details about the RevolutPay payment method options. - """ - samsung_pay: NotRequired[ - "SessionService.CreateParamsPaymentMethodOptionsSamsungPay" - ] - """ - contains details about the Samsung Pay payment method options. - """ - satispay: NotRequired[ - "SessionService.CreateParamsPaymentMethodOptionsSatispay" - ] - """ - contains details about the Satispay payment method options. - """ - sepa_debit: NotRequired[ - "SessionService.CreateParamsPaymentMethodOptionsSepaDebit" - ] - """ - contains details about the Sepa Debit payment method options. - """ - sofort: NotRequired[ - "SessionService.CreateParamsPaymentMethodOptionsSofort" - ] - """ - contains details about the Sofort payment method options. - """ - swish: NotRequired[ - "SessionService.CreateParamsPaymentMethodOptionsSwish" - ] - """ - contains details about the Swish payment method options. - """ - us_bank_account: NotRequired[ - "SessionService.CreateParamsPaymentMethodOptionsUsBankAccount" - ] - """ - contains details about the Us Bank Account payment method options. - """ - wechat_pay: NotRequired[ - "SessionService.CreateParamsPaymentMethodOptionsWechatPay" - ] - """ - contains details about the WeChat Pay payment method options. - """ - - class CreateParamsPaymentMethodOptionsAcssDebit(TypedDict): - currency: NotRequired[Literal["cad", "usd"]] - """ - 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). This is only accepted for Checkout Sessions in `setup` mode. - """ - mandate_options: NotRequired[ - "SessionService.CreateParamsPaymentMethodOptionsAcssDebitMandateOptions" - ] - """ - Additional fields for Mandate creation - """ - setup_future_usage: NotRequired[ - Literal["none", "off_session", "on_session"] - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - """ - target_date: NotRequired[str] - """ - Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. - """ - verification_method: NotRequired[ - Literal["automatic", "instant", "microdeposits"] - ] - """ - Verification method for the intent - """ - - class CreateParamsPaymentMethodOptionsAcssDebitMandateOptions(TypedDict): - custom_mandate_url: NotRequired["Literal['']|str"] - """ - A URL for custom mandate text to render during confirmation step. - The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent, - or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent. - """ - default_for: NotRequired[List[Literal["invoice", "subscription"]]] - """ - List of Stripe products where this mandate can be selected automatically. Only usable in `setup` mode. - """ - interval_description: NotRequired[str] - """ - Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'. - """ - payment_schedule: NotRequired[ - Literal["combined", "interval", "sporadic"] - ] - """ - Payment schedule for the mandate. - """ - transaction_type: NotRequired[Literal["business", "personal"]] - """ - Transaction type of the mandate. - """ - - class CreateParamsPaymentMethodOptionsAffirm(TypedDict): - capture_method: NotRequired[Literal["manual"]] - """ - Controls when the funds will be captured from the customer's account. - """ - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - """ - - class CreateParamsPaymentMethodOptionsAfterpayClearpay(TypedDict): - capture_method: NotRequired[Literal["manual"]] - """ - Controls when the funds will be captured from the customer's account. - """ - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - """ - - class CreateParamsPaymentMethodOptionsAlipay(TypedDict): - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - """ - - class CreateParamsPaymentMethodOptionsAlma(TypedDict): - capture_method: NotRequired[Literal["manual"]] - """ - Controls when the funds will be captured from the customer's account. - """ - - class CreateParamsPaymentMethodOptionsAmazonPay(TypedDict): - capture_method: NotRequired[Literal["manual"]] - """ - Controls when the funds will be captured from the customer's account. - """ - setup_future_usage: NotRequired[Literal["none", "off_session"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - """ - - class CreateParamsPaymentMethodOptionsAuBecsDebit(TypedDict): - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - """ - target_date: NotRequired[str] - """ - Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. - """ - - class CreateParamsPaymentMethodOptionsBacsDebit(TypedDict): - mandate_options: NotRequired[ - "SessionService.CreateParamsPaymentMethodOptionsBacsDebitMandateOptions" - ] - """ - Additional fields for Mandate creation - """ - setup_future_usage: NotRequired[ - Literal["none", "off_session", "on_session"] - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - """ - target_date: NotRequired[str] - """ - Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. - """ - - class CreateParamsPaymentMethodOptionsBacsDebitMandateOptions(TypedDict): - reference_prefix: NotRequired["Literal['']|str"] - """ - Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'. - """ - - class CreateParamsPaymentMethodOptionsBancontact(TypedDict): - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - """ - - class CreateParamsPaymentMethodOptionsBillie(TypedDict): - capture_method: NotRequired[Literal["manual"]] - """ - Controls when the funds will be captured from the customer's account. - """ - - class CreateParamsPaymentMethodOptionsBoleto(TypedDict): - expires_after_days: NotRequired[int] - """ - The number of calendar days before a Boleto voucher expires. For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto invoice will expire on Wednesday at 23:59 America/Sao_Paulo time. - """ - setup_future_usage: NotRequired[ - Literal["none", "off_session", "on_session"] - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - """ - - class CreateParamsPaymentMethodOptionsCard(TypedDict): - capture_method: NotRequired[Literal["manual"]] - """ - Controls when the funds will be captured from the customer's account. - """ - installments: NotRequired[ - "SessionService.CreateParamsPaymentMethodOptionsCardInstallments" - ] - """ - Installment options for card payments - """ - request_decremental_authorization: NotRequired[ - Literal["if_available", "never"] - ] - """ - Request ability to [capture beyond the standard authorization validity window](https://docs.stripe.com/payments/extended-authorization) for this CheckoutSession. - """ - request_extended_authorization: NotRequired[ - Literal["if_available", "never"] - ] - """ - Request ability to [capture beyond the standard authorization validity window](https://docs.stripe.com/payments/extended-authorization) for this CheckoutSession. - """ - request_incremental_authorization: NotRequired[ - Literal["if_available", "never"] - ] - """ - Request ability to [increment the authorization](https://docs.stripe.com/payments/incremental-authorization) for this CheckoutSession. - """ - request_multicapture: NotRequired[Literal["if_available", "never"]] - """ - Request ability to make [multiple captures](https://docs.stripe.com/payments/multicapture) for this CheckoutSession. - """ - request_overcapture: NotRequired[Literal["if_available", "never"]] - """ - Request ability to [overcapture](https://docs.stripe.com/payments/overcapture) for this CheckoutSession. - """ - request_three_d_secure: NotRequired[ - Literal["any", "automatic", "challenge"] - ] - """ - We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. - """ - restrictions: NotRequired[ - "SessionService.CreateParamsPaymentMethodOptionsCardRestrictions" - ] - """ - Restrictions to apply to the card payment method. For example, you can block specific card brands. - """ - setup_future_usage: NotRequired[Literal["off_session", "on_session"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - """ - statement_descriptor_suffix_kana: NotRequired[str] - """ - Provides information about a card payment that customers see on their statements. Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor that's set on the account to form the complete statement descriptor. Maximum 22 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 22 characters. - """ - statement_descriptor_suffix_kanji: NotRequired[str] - """ - Provides information about a card payment that customers see on their statements. Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement descriptor that's set on the account to form the complete statement descriptor. Maximum 17 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 17 characters. - """ - - class CreateParamsPaymentMethodOptionsCardInstallments(TypedDict): - enabled: NotRequired[bool] - """ - Setting to true enables installments for this Checkout Session. - Setting to false will prevent any installment plan from applying to a payment. - """ - - class CreateParamsPaymentMethodOptionsCardRestrictions(TypedDict): - brands_blocked: NotRequired[ - List[ - Literal[ - "american_express", - "discover_global_network", - "mastercard", - "visa", - ] - ] - ] - """ - Specify the card brands to block in the Checkout Session. If a customer enters or selects a card belonging to a blocked brand, they can't complete the Session. - """ - - class CreateParamsPaymentMethodOptionsCashapp(TypedDict): - capture_method: NotRequired[Literal["manual"]] - """ - Controls when the funds will be captured from the customer's account. - """ - setup_future_usage: NotRequired[ - Literal["none", "off_session", "on_session"] - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - """ - - class CreateParamsPaymentMethodOptionsCustomerBalance(TypedDict): - bank_transfer: NotRequired[ - "SessionService.CreateParamsPaymentMethodOptionsCustomerBalanceBankTransfer" - ] - """ - Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. - """ - funding_type: NotRequired[Literal["bank_transfer"]] - """ - The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. - """ - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - """ - - class CreateParamsPaymentMethodOptionsCustomerBalanceBankTransfer( - TypedDict, - ): - eu_bank_transfer: NotRequired[ - "SessionService.CreateParamsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer" - ] - """ - Configuration for eu_bank_transfer funding type. - """ - requested_address_types: NotRequired[ - List[ - Literal[ - "aba", - "iban", - "sepa", - "sort_code", - "spei", - "swift", - "zengin", - ] - ] - ] - """ - List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned. - - Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`. - """ - type: Literal[ - "eu_bank_transfer", - "gb_bank_transfer", - "jp_bank_transfer", - "mx_bank_transfer", - "us_bank_transfer", - ] - """ - The list of bank transfer types that this PaymentIntent is allowed to use for funding. - """ - - class CreateParamsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer( - TypedDict, - ): - country: str - """ - The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. - """ - - class CreateParamsPaymentMethodOptionsDemoPay(TypedDict): - setup_future_usage: NotRequired[Literal["none", "off_session"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - """ - - class CreateParamsPaymentMethodOptionsEps(TypedDict): - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - """ - - class CreateParamsPaymentMethodOptionsFpx(TypedDict): - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - """ - - class CreateParamsPaymentMethodOptionsGiropay(TypedDict): - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - """ - - class CreateParamsPaymentMethodOptionsGrabpay(TypedDict): - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - """ - - class CreateParamsPaymentMethodOptionsIdeal(TypedDict): - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - """ - - class CreateParamsPaymentMethodOptionsKakaoPay(TypedDict): - capture_method: NotRequired[Literal["manual"]] - """ - Controls when the funds will be captured from the customer's account. - """ - setup_future_usage: NotRequired[Literal["none", "off_session"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - """ - - class CreateParamsPaymentMethodOptionsKlarna(TypedDict): - capture_method: NotRequired[Literal["manual"]] - """ - Controls when the funds will be captured from the customer's account. - """ - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - """ - subscriptions: NotRequired[ - "Literal['']|List[SessionService.CreateParamsPaymentMethodOptionsKlarnaSubscription]" - ] - """ - Subscription details if the Checkout Session sets up a future subscription. - """ - - class CreateParamsPaymentMethodOptionsKlarnaSubscription(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Unit of time between subscription charges. - """ - interval_count: NotRequired[int] - """ - The number of intervals (specified in the `interval` attribute) between subscription charges. For example, `interval=month` and `interval_count=3` charges every 3 months. - """ - name: NotRequired[str] - """ - Name for subscription. - """ - next_billing: "SessionService.CreateParamsPaymentMethodOptionsKlarnaSubscriptionNextBilling" - """ - Describes the upcoming charge for this subscription. - """ - reference: str - """ - A non-customer-facing reference to correlate subscription charges in the Klarna app. Use a value that persists across subscription charges. - """ - - class CreateParamsPaymentMethodOptionsKlarnaSubscriptionNextBilling( - TypedDict, - ): - amount: int - """ - The amount of the next charge for the subscription. - """ - date: str - """ - The date of the next charge for the subscription in YYYY-MM-DD format. - """ - - class CreateParamsPaymentMethodOptionsKonbini(TypedDict): - expires_after_days: NotRequired[int] - """ - The number of calendar days (between 1 and 60) after which Konbini payment instructions will expire. For example, if a PaymentIntent is confirmed with Konbini and `expires_after_days` set to 2 on Monday JST, the instructions will expire on Wednesday 23:59:59 JST. Defaults to 3 days. - """ - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - """ - - class CreateParamsPaymentMethodOptionsKrCard(TypedDict): - capture_method: NotRequired[Literal["manual"]] - """ - Controls when the funds will be captured from the customer's account. - """ - setup_future_usage: NotRequired[Literal["none", "off_session"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - """ - - class CreateParamsPaymentMethodOptionsLink(TypedDict): - capture_method: NotRequired[Literal["manual"]] - """ - Controls when the funds will be captured from the customer's account. - """ - setup_future_usage: NotRequired[Literal["none", "off_session"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - """ - - class CreateParamsPaymentMethodOptionsMobilepay(TypedDict): - capture_method: NotRequired[Literal["manual"]] - """ - Controls when the funds will be captured from the customer's account. - """ - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - """ - - class CreateParamsPaymentMethodOptionsMultibanco(TypedDict): - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - """ - - class CreateParamsPaymentMethodOptionsNaverPay(TypedDict): - capture_method: NotRequired[Literal["manual"]] - """ - Controls when the funds will be captured from the customer's account. - """ - setup_future_usage: NotRequired[Literal["none", "off_session"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - """ - - class CreateParamsPaymentMethodOptionsOxxo(TypedDict): - expires_after_days: NotRequired[int] - """ - The number of calendar days before an OXXO voucher expires. For example, if you create an OXXO voucher on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time. - """ - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - """ - - class CreateParamsPaymentMethodOptionsP24(TypedDict): - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - """ - tos_shown_and_accepted: NotRequired[bool] - """ - Confirm that the payer has accepted the P24 terms and conditions. - """ - - class CreateParamsPaymentMethodOptionsPayByBank(TypedDict): - pass - - class CreateParamsPaymentMethodOptionsPayco(TypedDict): - capture_method: NotRequired[Literal["manual"]] - """ - Controls when the funds will be captured from the customer's account. - """ - - class CreateParamsPaymentMethodOptionsPaynow(TypedDict): - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - """ - - class CreateParamsPaymentMethodOptionsPaypal(TypedDict): - capture_method: NotRequired["Literal['']|Literal['manual']"] - """ - Controls when the funds will be captured from the customer's account. - """ - preferred_locale: NotRequired[ - Literal[ - "cs-CZ", - "da-DK", - "de-AT", - "de-DE", - "de-LU", - "el-GR", - "en-GB", - "en-US", - "es-ES", - "fi-FI", - "fr-BE", - "fr-FR", - "fr-LU", - "hu-HU", - "it-IT", - "nl-BE", - "nl-NL", - "pl-PL", - "pt-PT", - "sk-SK", - "sv-SE", - ] - ] - """ - [Preferred locale](https://stripe.com/docs/payments/paypal/supported-locales) of the PayPal checkout page that the customer is redirected to. - """ - reference: NotRequired[str] - """ - A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. - """ - reference_id: NotRequired[str] - """ - A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. - """ - risk_correlation_id: NotRequired[str] - """ - The risk correlation ID for an on-session payment using a saved PayPal payment method. - """ - setup_future_usage: NotRequired[ - "Literal['']|Literal['none', 'off_session']" - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - - If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. - """ - subsellers: NotRequired[List[str]] - """ - The Stripe connected account IDs of the sellers on the platform for this transaction (optional). Only allowed when [separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) are used. - """ - - class CreateParamsPaymentMethodOptionsPayto(TypedDict): - mandate_options: NotRequired[ - "SessionService.CreateParamsPaymentMethodOptionsPaytoMandateOptions" - ] - """ - Additional fields for Mandate creation - """ - setup_future_usage: NotRequired[Literal["none", "off_session"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - """ - - class CreateParamsPaymentMethodOptionsPaytoMandateOptions(TypedDict): - amount: NotRequired[int] - """ - Amount that will be collected. It is required when `amount_type` is `fixed`. - """ - amount_type: NotRequired[Literal["fixed", "maximum"]] - """ - The type of amount that will be collected. The amount charged must be exact or up to the value of `amount` param for `fixed` or `maximum` type respectively. - """ - end_date: NotRequired[str] - """ - Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no end date. - """ - payment_schedule: NotRequired[ - Literal[ - "adhoc", - "annual", - "daily", - "fortnightly", - "monthly", - "quarterly", - "semi_annual", - "weekly", - ] - ] - """ - The periodicity at which payments will be collected. - """ - payments_per_period: NotRequired[int] - """ - The number of payments that will be made during a payment period. Defaults to 1 except for when `payment_schedule` is `adhoc`. In that case, it defaults to no limit. - """ - purpose: NotRequired[ - Literal[ - "dependant_support", - "government", - "loan", - "mortgage", - "other", - "pension", - "personal", - "retail", - "salary", - "tax", - "utility", - ] - ] - """ - The purpose for which payments are made. Defaults to retail. - """ - start_date: NotRequired[str] - """ - Date, in YYYY-MM-DD format, from which payments will be collected. Defaults to confirmation time. - """ - - class CreateParamsPaymentMethodOptionsPix(TypedDict): - amount_includes_iof: NotRequired[Literal["always", "never"]] - """ - Determines if the amount includes the IOF tax. Defaults to `never`. - """ - expires_after_seconds: NotRequired[int] - """ - The number of seconds (between 10 and 1209600) after which Pix payment will expire. Defaults to 86400 seconds. - """ - mandate_options: NotRequired[ - "SessionService.CreateParamsPaymentMethodOptionsPixMandateOptions" - ] - """ - Additional fields for mandate creation. - """ - setup_future_usage: NotRequired[Literal["none", "off_session"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - """ - - class CreateParamsPaymentMethodOptionsPixMandateOptions(TypedDict): - amount: NotRequired[int] - """ - Amount to be charged for future payments. Required when `amount_type=fixed`. If not provided for `amount_type=maximum`, defaults to 40000. - """ - amount_includes_iof: NotRequired[Literal["always", "never"]] - """ - Determines if the amount includes the IOF tax. Defaults to `never`. - """ - amount_type: NotRequired[Literal["fixed", "maximum"]] - """ - Type of amount. Defaults to `maximum`. - """ - currency: NotRequired[str] - """ - Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Only `brl` is supported currently. - """ - end_date: NotRequired[str] - """ - Date when the mandate expires and no further payments will be charged, in `YYYY-MM-DD`. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. - """ - payment_schedule: NotRequired[ - Literal["halfyearly", "monthly", "quarterly", "weekly", "yearly"] - ] - """ - Schedule at which the future payments will be charged. Defaults to `weekly`. - """ - reference: NotRequired[str] - """ - Subscription name displayed to buyers in their bank app. Defaults to the displayable business name. - """ - start_date: NotRequired[str] - """ - Start date of the mandate, in `YYYY-MM-DD`. Start date should be at least 3 days in the future. Defaults to 3 days after the current date. - """ - - class CreateParamsPaymentMethodOptionsRevolutPay(TypedDict): - capture_method: NotRequired[Literal["manual"]] - """ - Controls when the funds will be captured from the customer's account. - """ - setup_future_usage: NotRequired[Literal["none", "off_session"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - """ - - class CreateParamsPaymentMethodOptionsSamsungPay(TypedDict): - capture_method: NotRequired[Literal["manual"]] - """ - Controls when the funds will be captured from the customer's account. - """ - - class CreateParamsPaymentMethodOptionsSatispay(TypedDict): - capture_method: NotRequired[Literal["manual"]] - """ - Controls when the funds will be captured from the customer's account. - """ - - class CreateParamsPaymentMethodOptionsSepaDebit(TypedDict): - mandate_options: NotRequired[ - "SessionService.CreateParamsPaymentMethodOptionsSepaDebitMandateOptions" - ] - """ - Additional fields for Mandate creation - """ - setup_future_usage: NotRequired[ - Literal["none", "off_session", "on_session"] - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - """ - target_date: NotRequired[str] - """ - Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. - """ - - class CreateParamsPaymentMethodOptionsSepaDebitMandateOptions(TypedDict): - reference_prefix: NotRequired["Literal['']|str"] - """ - Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'. - """ - - class CreateParamsPaymentMethodOptionsSofort(TypedDict): - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - """ - - class CreateParamsPaymentMethodOptionsSwish(TypedDict): - reference: NotRequired[str] - """ - The order reference that will be displayed to customers in the Swish application. Defaults to the `id` of the Payment Intent. - """ - - class CreateParamsPaymentMethodOptionsUsBankAccount(TypedDict): - financial_connections: NotRequired[ - "SessionService.CreateParamsPaymentMethodOptionsUsBankAccountFinancialConnections" - ] - """ - Additional fields for Financial Connections Session creation - """ - setup_future_usage: NotRequired[ - Literal["none", "off_session", "on_session"] - ] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - """ - target_date: NotRequired[str] - """ - Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. - """ - verification_method: NotRequired[Literal["automatic", "instant"]] - """ - Verification method for the intent - """ - - class CreateParamsPaymentMethodOptionsUsBankAccountFinancialConnections( - TypedDict, - ): - permissions: NotRequired[ - List[ - Literal[ - "balances", "ownership", "payment_method", "transactions" - ] - ] - ] - """ - The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. - """ - prefetch: NotRequired[ - List[ - Literal[ - "balances", - "inferred_balances", - "ownership", - "transactions", - ] - ] - ] - """ - List of data features that you would like to retrieve upon account creation. - """ - - class CreateParamsPaymentMethodOptionsWechatPay(TypedDict): - app_id: NotRequired[str] - """ - The app ID registered with WeChat Pay. Only required when client is ios or android. - """ - client: Literal["android", "ios", "web"] - """ - The client type that the end customer will pay from - """ - setup_future_usage: NotRequired[Literal["none"]] - """ - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. - - If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. - - When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). - """ - - class CreateParamsPermissions(TypedDict): - update: NotRequired["SessionService.CreateParamsPermissionsUpdate"] - """ - Permissions for updating the Checkout Session. - """ - update_discounts: NotRequired[Literal["client_only", "server_only"]] - """ - Determines which entity is allowed to update the discounts (coupons or promotion codes) that apply to this session. - - Default is `client_only`. Stripe Checkout client will automatically handle discount updates. If set to `server_only`, only your server is allowed to update discounts. - """ - update_line_items: NotRequired[Literal["client_only", "server_only"]] - """ - Determines which entity is allowed to update the line items. - - Default is `client_only`. Stripe Checkout client will automatically update the line items. If set to `server_only`, only your server is allowed to update the line items. - - When set to `server_only`, you must add the onLineItemsChange event handler when initializing the Stripe Checkout client and manually update the line items from your server using the Stripe API. - """ - update_shipping_details: NotRequired[ - Literal["client_only", "server_only"] - ] - """ - Determines which entity is allowed to update the shipping details. - - Default is `client_only`. Stripe Checkout client will automatically update the shipping details. If set to `server_only`, only your server is allowed to update the shipping details. - - When set to `server_only`, you must add the onShippingDetailsChange event handler when initializing the Stripe Checkout client and manually update the shipping details from your server using the Stripe API. - """ - - class CreateParamsPermissionsUpdate(TypedDict): - line_items: NotRequired[Literal["client_only", "server_only"]] - """ - Determines which entity is allowed to update the line items. - - Default is `client_only`. Stripe Checkout client will automatically update the line items. If set to `server_only`, only your server is allowed to update the line items. - - When set to `server_only`, you must add the onLineItemsChange event handler when initializing the Stripe Checkout client and manually update the line items from your server using the Stripe API. - """ - shipping_details: NotRequired[Literal["client_only", "server_only"]] - """ - Determines which entity is allowed to update the shipping details. - - Default is `client_only`. Stripe Checkout client will automatically update the shipping details. If set to `server_only`, only your server is allowed to update the shipping details. - - When set to `server_only`, you must add the onShippingDetailsChange event handler when initializing the Stripe Checkout client and manually update the shipping details from your server using the Stripe API. - """ - - class CreateParamsPhoneNumberCollection(TypedDict): - enabled: bool - """ - Set to `true` to enable phone number collection. - - Can only be set in `payment` and `subscription` mode. - """ - - class CreateParamsSavedPaymentMethodOptions(TypedDict): - allow_redisplay_filters: NotRequired[ - List[Literal["always", "limited", "unspecified"]] - ] - """ - Uses the `allow_redisplay` value of each saved payment method to filter the set presented to a returning customer. By default, only saved payment methods with 'allow_redisplay: ‘always' are shown in Checkout. - """ - payment_method_remove: NotRequired[Literal["disabled", "enabled"]] - """ - Enable customers to choose if they wish to remove their saved payment methods. Disabled by default. - """ - payment_method_save: NotRequired[Literal["disabled", "enabled"]] - """ - Enable customers to choose if they wish to save their payment method for future use. Disabled by default. - """ - - class CreateParamsSetupIntentData(TypedDict): - description: NotRequired[str] - """ - An arbitrary string attached to the object. Often useful for displaying to users. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - on_behalf_of: NotRequired[str] - """ - The Stripe account for which the setup is intended. - """ - - class CreateParamsShippingAddressCollection(TypedDict): - allowed_countries: List[ - Literal[ - "AC", - "AD", - "AE", - "AF", - "AG", - "AI", - "AL", - "AM", - "AO", - "AQ", - "AR", - "AT", - "AU", - "AW", - "AX", - "AZ", - "BA", - "BB", - "BD", - "BE", - "BF", - "BG", - "BH", - "BI", - "BJ", - "BL", - "BM", - "BN", - "BO", - "BQ", - "BR", - "BS", - "BT", - "BV", - "BW", - "BY", - "BZ", - "CA", - "CD", - "CF", - "CG", - "CH", - "CI", - "CK", - "CL", - "CM", - "CN", - "CO", - "CR", - "CV", - "CW", - "CY", - "CZ", - "DE", - "DJ", - "DK", - "DM", - "DO", - "DZ", - "EC", - "EE", - "EG", - "EH", - "ER", - "ES", - "ET", - "FI", - "FJ", - "FK", - "FO", - "FR", - "GA", - "GB", - "GD", - "GE", - "GF", - "GG", - "GH", - "GI", - "GL", - "GM", - "GN", - "GP", - "GQ", - "GR", - "GS", - "GT", - "GU", - "GW", - "GY", - "HK", - "HN", - "HR", - "HT", - "HU", - "ID", - "IE", - "IL", - "IM", - "IN", - "IO", - "IQ", - "IS", - "IT", - "JE", - "JM", - "JO", - "JP", - "KE", - "KG", - "KH", - "KI", - "KM", - "KN", - "KR", - "KW", - "KY", - "KZ", - "LA", - "LB", - "LC", - "LI", - "LK", - "LR", - "LS", - "LT", - "LU", - "LV", - "LY", - "MA", - "MC", - "MD", - "ME", - "MF", - "MG", - "MK", - "ML", - "MM", - "MN", - "MO", - "MQ", - "MR", - "MS", - "MT", - "MU", - "MV", - "MW", - "MX", - "MY", - "MZ", - "NA", - "NC", - "NE", - "NG", - "NI", - "NL", - "NO", - "NP", - "NR", - "NU", - "NZ", - "OM", - "PA", - "PE", - "PF", - "PG", - "PH", - "PK", - "PL", - "PM", - "PN", - "PR", - "PS", - "PT", - "PY", - "QA", - "RE", - "RO", - "RS", - "RU", - "RW", - "SA", - "SB", - "SC", - "SD", - "SE", - "SG", - "SH", - "SI", - "SJ", - "SK", - "SL", - "SM", - "SN", - "SO", - "SR", - "SS", - "ST", - "SV", - "SX", - "SZ", - "TA", - "TC", - "TD", - "TF", - "TG", - "TH", - "TJ", - "TK", - "TL", - "TM", - "TN", - "TO", - "TR", - "TT", - "TV", - "TW", - "TZ", - "UA", - "UG", - "US", - "UY", - "UZ", - "VA", - "VC", - "VE", - "VG", - "VN", - "VU", - "WF", - "WS", - "XK", - "YE", - "YT", - "ZA", - "ZM", - "ZW", - "ZZ", - ] - ] - """ - An array of two-letter ISO country codes representing which countries Checkout should provide as options for - shipping locations. - """ - - class CreateParamsShippingOption(TypedDict): - shipping_rate: NotRequired[str] - """ - The ID of the Shipping Rate to use for this shipping option. - """ - shipping_rate_data: NotRequired[ - "SessionService.CreateParamsShippingOptionShippingRateData" - ] - """ - Parameters to be passed to Shipping Rate creation for this shipping option. - """ - - class CreateParamsShippingOptionShippingRateData(TypedDict): - delivery_estimate: NotRequired[ - "SessionService.CreateParamsShippingOptionShippingRateDataDeliveryEstimate" - ] - """ - The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions. - """ - display_name: str - """ - The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions. - """ - fixed_amount: NotRequired[ - "SessionService.CreateParamsShippingOptionShippingRateDataFixedAmount" - ] - """ - Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - tax_behavior: NotRequired[ - Literal["exclusive", "inclusive", "unspecified"] - ] - """ - Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. - """ - tax_code: NotRequired[str] - """ - A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`. - """ - type: NotRequired[Literal["fixed_amount"]] - """ - The type of calculation to use on the shipping rate. - """ - - class CreateParamsShippingOptionShippingRateDataDeliveryEstimate( - TypedDict - ): - maximum: NotRequired[ - "SessionService.CreateParamsShippingOptionShippingRateDataDeliveryEstimateMaximum" - ] - """ - The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite. - """ - minimum: NotRequired[ - "SessionService.CreateParamsShippingOptionShippingRateDataDeliveryEstimateMinimum" - ] - """ - The lower bound of the estimated range. If empty, represents no lower bound. - """ - - class CreateParamsShippingOptionShippingRateDataDeliveryEstimateMaximum( - TypedDict, - ): - unit: Literal["business_day", "day", "hour", "month", "week"] - """ - A unit of time. - """ - value: int - """ - Must be greater than 0. - """ - - class CreateParamsShippingOptionShippingRateDataDeliveryEstimateMinimum( - TypedDict, - ): - unit: Literal["business_day", "day", "hour", "month", "week"] - """ - A unit of time. - """ - value: int - """ - Must be greater than 0. - """ - - class CreateParamsShippingOptionShippingRateDataFixedAmount(TypedDict): - amount: int - """ - A non-negative integer in cents representing how much to charge. - """ - 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). - """ - currency_options: NotRequired[ - Dict[ - str, - "SessionService.CreateParamsShippingOptionShippingRateDataFixedAmountCurrencyOptions", - ] - ] - """ - Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). - """ - - class CreateParamsShippingOptionShippingRateDataFixedAmountCurrencyOptions( - TypedDict, - ): - amount: int - """ - A non-negative integer in cents representing how much to charge. - """ - tax_behavior: NotRequired[ - Literal["exclusive", "inclusive", "unspecified"] - ] - """ - Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. - """ - - class CreateParamsSubscriptionData(TypedDict): - application_fee_percent: NotRequired[float] - """ - A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. To use an application fee percent, the request must be made on behalf of another account, using the `Stripe-Account` header or an OAuth key. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). - """ - billing_cycle_anchor: NotRequired[int] - """ - A future timestamp to anchor the subscription's billing cycle for new subscriptions. - """ - billing_mode: NotRequired[ - "SessionService.CreateParamsSubscriptionDataBillingMode" - ] - """ - Controls how prorations and invoices for subscriptions are calculated and orchestrated. - """ - default_tax_rates: NotRequired[List[str]] - """ - The tax rates that will apply to any subscription item that does not have - `tax_rates` set. Invoices created will have their `default_tax_rates` populated - from the subscription. - """ - description: NotRequired[str] - """ - The subscription's description, meant to be displayable to the customer. - Use this field to optionally store an explanation of the subscription - for rendering in the [customer portal](https://stripe.com/docs/customer-management). - """ - invoice_settings: NotRequired[ - "SessionService.CreateParamsSubscriptionDataInvoiceSettings" - ] - """ - All invoices will be billed using the specified settings. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - on_behalf_of: NotRequired[str] - """ - The account on behalf of which to charge, for each of the subscription's invoices. - """ - proration_behavior: NotRequired[Literal["create_prorations", "none"]] - """ - Determines how to handle prorations resulting from the `billing_cycle_anchor`. If no value is passed, the default is `create_prorations`. - """ - transfer_data: NotRequired[ - "SessionService.CreateParamsSubscriptionDataTransferData" - ] - """ - If specified, the funds from the subscription's invoices will be transferred to the destination and the ID of the resulting transfers will be found on the resulting charges. - """ - trial_end: NotRequired[int] - """ - Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. Has to be at least 48 hours in the future. - """ - trial_period_days: NotRequired[int] - """ - Integer representing the number of trial period days before the customer is charged for the first time. Has to be at least 1. - """ - trial_settings: NotRequired[ - "SessionService.CreateParamsSubscriptionDataTrialSettings" - ] - """ - Settings related to subscription trials. - """ - - class CreateParamsSubscriptionDataBillingMode(TypedDict): - flexible: NotRequired[ - "SessionService.CreateParamsSubscriptionDataBillingModeFlexible" - ] - """ - Configure behavior for flexible billing mode. - """ - type: Literal["classic", "flexible"] - """ - Controls the calculation and orchestration of prorations and invoices for subscriptions. If no value is passed, the default is `flexible`. - """ - - class CreateParamsSubscriptionDataBillingModeFlexible(TypedDict): - proration_discounts: NotRequired[Literal["included", "itemized"]] - """ - Controls how invoices and invoice items display proration amounts and discount amounts. - """ - - class CreateParamsSubscriptionDataInvoiceSettings(TypedDict): - issuer: NotRequired[ - "SessionService.CreateParamsSubscriptionDataInvoiceSettingsIssuer" - ] - """ - The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. - """ - - class CreateParamsSubscriptionDataInvoiceSettingsIssuer(TypedDict): - account: NotRequired[str] - """ - The connected account being referenced when `type` is `account`. - """ - type: Literal["account", "self"] - """ - Type of the account referenced in the request. - """ - - class CreateParamsSubscriptionDataTransferData(TypedDict): - amount_percent: NotRequired[float] - """ - A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. - """ - destination: str - """ - ID of an existing, connected Stripe account. - """ - - class CreateParamsSubscriptionDataTrialSettings(TypedDict): - end_behavior: "SessionService.CreateParamsSubscriptionDataTrialSettingsEndBehavior" - """ - Defines how the subscription should behave when the user's free trial ends. - """ - - class CreateParamsSubscriptionDataTrialSettingsEndBehavior(TypedDict): - missing_payment_method: Literal["cancel", "create_invoice", "pause"] - """ - Indicates how the subscription should change when the trial ends if the user did not provide a payment method. - """ - - class CreateParamsTaxIdCollection(TypedDict): - enabled: bool - """ - Enable tax ID collection during checkout. Defaults to `false`. - """ - required: NotRequired[Literal["if_supported", "never"]] - """ - Describes whether a tax ID is required during checkout. Defaults to `never`. - """ - - class CreateParamsWalletOptions(TypedDict): - link: NotRequired["SessionService.CreateParamsWalletOptionsLink"] - """ - contains details about the Link wallet options. - """ - - class CreateParamsWalletOptionsLink(TypedDict): - display: NotRequired[Literal["auto", "never"]] - """ - Specifies whether Checkout should display Link as a payment option. By default, Checkout will display all the supported wallets that the Checkout Session was created with. This is the `auto` behavior, and it is the default choice. - """ - - class ExpireParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class ListParams(TypedDict): - created: NotRequired["SessionService.ListParamsCreated|int"] - """ - Only return Checkout Sessions that were created during the given date interval. - """ - customer: NotRequired[str] - """ - Only return the Checkout Sessions for the Customer specified. - """ - customer_account: NotRequired[str] - """ - Only return the Checkout Sessions for the Account specified. - """ - customer_details: NotRequired[ - "SessionService.ListParamsCustomerDetails" - ] - """ - Only return the Checkout Sessions for the Customer details specified. - """ - 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. - """ - payment_intent: NotRequired[str] - """ - Only return the Checkout Session for the PaymentIntent specified. - """ - payment_link: NotRequired[str] - """ - Only return the Checkout Sessions for the Payment Link specified. - """ - 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. - """ - status: NotRequired[Literal["complete", "expired", "open"]] - """ - Only return the Checkout Sessions matching the given status. - """ - subscription: NotRequired[str] - """ - Only return the Checkout Session for the subscription specified. - """ - - class ListParamsCreated(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) - """ - - class ListParamsCustomerDetails(TypedDict): - email: str - """ - Customer's email address. - """ - - class RetrieveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class UpdateParams(TypedDict): - automatic_tax: NotRequired["SessionService.UpdateParamsAutomaticTax"] - """ - Settings for automatic tax lookup for this session and resulting payments, invoices, and subscriptions. - """ - collected_information: NotRequired[ - "SessionService.UpdateParamsCollectedInformation" - ] - """ - Information about the customer collected within the Checkout Session. Can only be set when updating `embedded` or `custom` sessions. - """ - discounts: NotRequired[ - "Literal['']|List[SessionService.UpdateParamsDiscount]" - ] - """ - List of coupons and promotion codes attached to the Checkout Session. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - invoice_creation: NotRequired[ - "SessionService.UpdateParamsInvoiceCreation" - ] - """ - Generate a post-purchase Invoice for one-time payments. - """ - line_items: NotRequired[List["SessionService.UpdateParamsLineItem"]] - """ - A list of items the customer is purchasing. - - When updating line items, you must retransmit the entire array of line items. - - To retain an existing line item, specify its `id`. - - To update an existing line item, specify its `id` along with the new values of the fields to update. - - To add a new line item, specify one of `price` or `price_data` and `quantity`. - - To remove an existing line item, omit the line item's ID from the retransmitted array. - - To reorder a line item, specify it at the desired position in the retransmitted array. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - shipping_options: NotRequired[ - "Literal['']|List[SessionService.UpdateParamsShippingOption]" - ] - """ - The shipping rate options to apply to this Session. Up to a maximum of 5. - """ - subscription_data: NotRequired[ - "SessionService.UpdateParamsSubscriptionData" - ] - """ - A subset of parameters to be passed to subscription creation for Checkout Sessions in `subscription` mode. - """ - - class UpdateParamsAutomaticTax(TypedDict): - liability: NotRequired[ - "SessionService.UpdateParamsAutomaticTaxLiability" - ] - """ - The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. - """ - - class UpdateParamsAutomaticTaxLiability(TypedDict): - account: NotRequired[str] - """ - The connected account being referenced when `type` is `account`. - """ - type: Literal["account", "self"] - """ - Type of the account referenced in the request. - """ - - class UpdateParamsCollectedInformation(TypedDict): - shipping_details: NotRequired[ - "SessionService.UpdateParamsCollectedInformationShippingDetails" - ] - """ - The shipping details to apply to this Session. - """ - - class UpdateParamsCollectedInformationShippingDetails(TypedDict): - address: "SessionService.UpdateParamsCollectedInformationShippingDetailsAddress" - """ - The address of the customer - """ - name: str - """ - The name of customer - """ - - class UpdateParamsCollectedInformationShippingDetailsAddress(TypedDict): - city: NotRequired[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: 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. - """ - - class UpdateParamsDiscount(TypedDict): - coupon: NotRequired[str] - """ - The ID of the [Coupon](https://stripe.com/docs/api/coupons) to apply to this Session. One of `coupon` or `coupon_data` is required when updating discounts. - """ - coupon_data: NotRequired[ - "SessionService.UpdateParamsDiscountCouponData" - ] - """ - Data used to generate a new [Coupon](https://stripe.com/docs/api/coupon) object inline. One of `coupon` or `coupon_data` is required when updating discounts. - """ - - class UpdateParamsDiscountCouponData(TypedDict): - amount_off: NotRequired[int] - """ - A positive integer representing the amount to subtract from an invoice total (required if `percent_off` is not passed). - """ - currency: NotRequired[str] - """ - Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) of the `amount_off` parameter (required if `amount_off` is passed). - """ - duration: NotRequired[Literal["forever", "once", "repeating"]] - """ - Specifies how long the discount will be in effect if used on a subscription. Defaults to `once`. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - name: NotRequired[str] - """ - Name of the coupon displayed to customers on, for instance invoices, or receipts. By default the `id` is shown if `name` is not set. - """ - percent_off: NotRequired[float] - """ - A positive float larger than 0, and smaller or equal to 100, that represents the discount the coupon will apply (required if `amount_off` is not passed). - """ - - class UpdateParamsInvoiceCreation(TypedDict): - invoice_data: NotRequired[ - "SessionService.UpdateParamsInvoiceCreationInvoiceData" - ] - """ - Parameters passed when creating invoices for payment-mode Checkout Sessions. - """ - - class UpdateParamsInvoiceCreationInvoiceData(TypedDict): - issuer: NotRequired[ - "SessionService.UpdateParamsInvoiceCreationInvoiceDataIssuer" - ] - """ - The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. - """ - - class UpdateParamsInvoiceCreationInvoiceDataIssuer(TypedDict): - account: NotRequired[str] - """ - The connected account being referenced when `type` is `account`. - """ - type: Literal["account", "self"] - """ - Type of the account referenced in the request. - """ - - class UpdateParamsLineItem(TypedDict): - adjustable_quantity: NotRequired[ - "SessionService.UpdateParamsLineItemAdjustableQuantity" - ] - """ - When set, provides configuration for this item's quantity to be adjusted by the customer during Checkout. - """ - id: NotRequired[str] - """ - ID of an existing line item. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - price: NotRequired[str] - """ - The ID of the [Price](https://stripe.com/docs/api/prices). One of `price` or `price_data` is required when creating a new line item. - """ - price_data: NotRequired["SessionService.UpdateParamsLineItemPriceData"] - """ - Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required when creating a new line item. - """ - quantity: NotRequired[int] - """ - The quantity of the line item being purchased. Quantity should not be defined when `recurring.usage_type=metered`. - """ - tax_rates: NotRequired["Literal['']|List[str]"] - """ - The [tax rates](https://stripe.com/docs/api/tax_rates) which apply to this line item. - """ - - class UpdateParamsLineItemAdjustableQuantity(TypedDict): - enabled: bool - """ - Set to true if the quantity can be adjusted to any positive integer. Setting to false will remove any previously specified constraints on quantity. - """ - maximum: NotRequired[int] - """ - The maximum quantity the customer can purchase for the Checkout Session. By default this value is 99. You can specify a value up to 999999. - """ - minimum: NotRequired[int] - """ - The minimum quantity the customer must purchase for the Checkout Session. By default this value is 0. - """ - - class UpdateParamsLineItemPriceData(TypedDict): - 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). - """ - product: NotRequired[str] - """ - The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to. One of `product` or `product_data` is required. - """ - product_data: NotRequired[ - "SessionService.UpdateParamsLineItemPriceDataProductData" - ] - """ - Data used to generate a new [Product](https://docs.stripe.com/api/products) object inline. One of `product` or `product_data` is required. - """ - recurring: NotRequired[ - "SessionService.UpdateParamsLineItemPriceDataRecurring" - ] - """ - The recurring components of a price such as `interval` and `interval_count`. - """ - tax_behavior: NotRequired[ - Literal["exclusive", "inclusive", "unspecified"] - ] - """ - Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. - """ - unit_amount: NotRequired[int] - """ - A non-negative integer in cents (or local equivalent) representing how much to charge. One of `unit_amount` or `unit_amount_decimal` is required. - """ - unit_amount_decimal: NotRequired[str] - """ - Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - """ - - class UpdateParamsLineItemPriceDataProductData(TypedDict): - description: NotRequired[str] - """ - The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. - """ - images: NotRequired[List[str]] - """ - A list of up to 8 URLs of images for this product, meant to be displayable to the customer. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - name: str - """ - The product's name, meant to be displayable to the customer. - """ - tax_code: NotRequired[str] - """ - A [tax code](https://stripe.com/docs/tax/tax-categories) ID. - """ - unit_label: NotRequired[str] - """ - A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal. - """ - - class UpdateParamsLineItemPriceDataRecurring(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - Specifies billing frequency. Either `day`, `week`, `month` or `year`. - """ - interval_count: NotRequired[int] - """ - The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). - """ - - class UpdateParamsShippingOption(TypedDict): - shipping_rate: NotRequired[str] - """ - The ID of the Shipping Rate to use for this shipping option. - """ - shipping_rate_data: NotRequired[ - "SessionService.UpdateParamsShippingOptionShippingRateData" - ] - """ - Parameters to be passed to Shipping Rate creation for this shipping option. - """ - - class UpdateParamsShippingOptionShippingRateData(TypedDict): - delivery_estimate: NotRequired[ - "SessionService.UpdateParamsShippingOptionShippingRateDataDeliveryEstimate" - ] - """ - The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions. - """ - display_name: str - """ - The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions. - """ - fixed_amount: NotRequired[ - "SessionService.UpdateParamsShippingOptionShippingRateDataFixedAmount" - ] - """ - Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - tax_behavior: NotRequired[ - Literal["exclusive", "inclusive", "unspecified"] - ] - """ - Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. - """ - tax_code: NotRequired[str] - """ - A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`. - """ - type: NotRequired[Literal["fixed_amount"]] - """ - The type of calculation to use on the shipping rate. - """ - - class UpdateParamsShippingOptionShippingRateDataDeliveryEstimate( - TypedDict - ): - maximum: NotRequired[ - "SessionService.UpdateParamsShippingOptionShippingRateDataDeliveryEstimateMaximum" - ] - """ - The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite. - """ - minimum: NotRequired[ - "SessionService.UpdateParamsShippingOptionShippingRateDataDeliveryEstimateMinimum" - ] - """ - The lower bound of the estimated range. If empty, represents no lower bound. - """ - - class UpdateParamsShippingOptionShippingRateDataDeliveryEstimateMaximum( - TypedDict, - ): - unit: Literal["business_day", "day", "hour", "month", "week"] - """ - A unit of time. - """ - value: int - """ - Must be greater than 0. - """ - - class UpdateParamsShippingOptionShippingRateDataDeliveryEstimateMinimum( - TypedDict, - ): - unit: Literal["business_day", "day", "hour", "month", "week"] - """ - A unit of time. - """ - value: int - """ - Must be greater than 0. - """ - - class UpdateParamsShippingOptionShippingRateDataFixedAmount(TypedDict): - amount: int - """ - A non-negative integer in cents representing how much to charge. - """ - 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). - """ - currency_options: NotRequired[ - Dict[ - str, - "SessionService.UpdateParamsShippingOptionShippingRateDataFixedAmountCurrencyOptions", - ] - ] - """ - Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). - """ - - class UpdateParamsShippingOptionShippingRateDataFixedAmountCurrencyOptions( - TypedDict, - ): - amount: int - """ - A non-negative integer in cents representing how much to charge. - """ - tax_behavior: NotRequired[ - Literal["exclusive", "inclusive", "unspecified"] - ] - """ - Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. - """ - - class UpdateParamsSubscriptionData(TypedDict): - invoice_settings: NotRequired[ - "SessionService.UpdateParamsSubscriptionDataInvoiceSettings" - ] - """ - All invoices will be billed using the specified settings. - """ - trial_end: NotRequired[int] - """ - Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. Has to be at least 48 hours in the future. - """ - trial_period_days: NotRequired["Literal['']|int"] - """ - Integer representing the number of trial period days before the customer is charged for the first time. Has to be at least 1. - """ - - class UpdateParamsSubscriptionDataInvoiceSettings(TypedDict): - issuer: NotRequired[ - "SessionService.UpdateParamsSubscriptionDataInvoiceSettingsIssuer" - ] - """ - The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. - """ - - class UpdateParamsSubscriptionDataInvoiceSettingsIssuer(TypedDict): - account: NotRequired[str] - """ - The connected account being referenced when `type` is `account`. - """ - type: Literal["account", "self"] - """ - Type of the account referenced in the request. - """ - def list( self, - params: Optional["SessionService.ListParams"] = None, + params: Optional["SessionListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[Session]: """ @@ -3725,7 +51,7 @@ def list( async def list_async( self, - params: Optional["SessionService.ListParams"] = None, + params: Optional["SessionListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[Session]: """ @@ -3744,7 +70,7 @@ async def list_async( def create( self, - params: Optional["SessionService.CreateParams"] = None, + params: Optional["SessionCreateParams"] = None, options: Optional[RequestOptions] = None, ) -> Session: """ @@ -3763,7 +89,7 @@ def create( async def create_async( self, - params: Optional["SessionService.CreateParams"] = None, + params: Optional["SessionCreateParams"] = None, options: Optional[RequestOptions] = None, ) -> Session: """ @@ -3783,7 +109,7 @@ async def create_async( def retrieve( self, session: str, - params: Optional["SessionService.RetrieveParams"] = None, + params: Optional["SessionRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Session: """ @@ -3805,7 +131,7 @@ def retrieve( async def retrieve_async( self, session: str, - params: Optional["SessionService.RetrieveParams"] = None, + params: Optional["SessionRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Session: """ @@ -3827,7 +153,7 @@ async def retrieve_async( def update( self, session: str, - params: Optional["SessionService.UpdateParams"] = None, + params: Optional["SessionUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> Session: """ @@ -3851,7 +177,7 @@ def update( async def update_async( self, session: str, - params: Optional["SessionService.UpdateParams"] = None, + params: Optional["SessionUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> Session: """ @@ -3875,7 +201,7 @@ async def update_async( def expire( self, session: str, - params: Optional["SessionService.ExpireParams"] = None, + params: Optional["SessionExpireParams"] = None, options: Optional[RequestOptions] = None, ) -> Session: """ @@ -3899,7 +225,7 @@ def expire( async def expire_async( self, session: str, - params: Optional["SessionService.ExpireParams"] = None, + params: Optional["SessionExpireParams"] = None, options: Optional[RequestOptions] = None, ) -> Session: """ diff --git a/stripe/climate/_order.py b/stripe/climate/_order.py index 354821c46..477690ee9 100644 --- a/stripe/climate/_order.py +++ b/stripe/climate/_order.py @@ -4,22 +4,22 @@ from stripe._expandable_field import ExpandableField from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource -from stripe._request_options import RequestOptions from stripe._stripe_object import StripeObject from stripe._updateable_api_resource import UpdateableAPIResource from stripe._util import class_method_variant, sanitize_id -from typing import ClassVar, Dict, List, Optional, Union, cast, overload -from typing_extensions import ( - Literal, - NotRequired, - TypedDict, - Unpack, - TYPE_CHECKING, -) +from typing import ClassVar, Dict, List, Optional, cast, overload +from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: from stripe.climate._product import Product from stripe.climate._supplier import Supplier + from stripe.params.climate._order_cancel_params import OrderCancelParams + from stripe.params.climate._order_create_params import OrderCreateParams + from stripe.params.climate._order_list_params import OrderListParams + from stripe.params.climate._order_modify_params import OrderModifyParams + from stripe.params.climate._order_retrieve_params import ( + OrderRetrieveParams, + ) class Order( @@ -85,92 +85,6 @@ class Location(StripeObject): """ _inner_class_types = {"location": Location} - class CancelParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class CreateParams(RequestOptions): - amount: NotRequired[int] - """ - Requested amount of carbon removal units. Either this or `metric_tons` must be specified. - """ - beneficiary: NotRequired["Order.CreateParamsBeneficiary"] - """ - Publicly sharable reference for the end beneficiary of carbon removal. Assumed to be the Stripe account if not set. - """ - currency: NotRequired[str] - """ - Request currency for the order as a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a supported [settlement currency for your account](https://stripe.com/docs/currencies). If omitted, the account's default currency will be used. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - metric_tons: NotRequired[str] - """ - Requested number of tons for the order. Either this or `amount` must be specified. - """ - product: str - """ - Unique identifier of the Climate product. - """ - - class CreateParamsBeneficiary(TypedDict): - public_name: str - """ - Publicly displayable name for the end beneficiary of carbon removal. - """ - - class ListParams(RequestOptions): - 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 ModifyParams(RequestOptions): - beneficiary: NotRequired["Literal['']|Order.ModifyParamsBeneficiary"] - """ - Publicly sharable reference for the end beneficiary of carbon removal. Assumed to be the Stripe account if not set. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - - class ModifyParamsBeneficiary(TypedDict): - public_name: Union[Literal[""], str] - """ - Publicly displayable name for the end beneficiary of carbon removal. - """ - - class RetrieveParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - amount_fees: int """ Total amount of [Frontier](https://frontierclimate.com/)'s service fees in the currency's smallest unit. @@ -263,7 +177,7 @@ class RetrieveParams(RequestOptions): @classmethod def _cls_cancel( - cls, order: str, **params: Unpack["Order.CancelParams"] + cls, order: str, **params: Unpack["OrderCancelParams"] ) -> "Order": """ Cancels a Climate order. You can cancel an order within 24 hours of creation. Stripe refunds the @@ -284,7 +198,7 @@ def _cls_cancel( @overload @staticmethod - def cancel(order: str, **params: Unpack["Order.CancelParams"]) -> "Order": + def cancel(order: str, **params: Unpack["OrderCancelParams"]) -> "Order": """ Cancels a Climate order. You can cancel an order within 24 hours of creation. Stripe refunds the reservation amount_subtotal, but not the amount_fees for user-triggered cancellations. Frontier @@ -294,7 +208,7 @@ def cancel(order: str, **params: Unpack["Order.CancelParams"]) -> "Order": ... @overload - def cancel(self, **params: Unpack["Order.CancelParams"]) -> "Order": + def cancel(self, **params: Unpack["OrderCancelParams"]) -> "Order": """ Cancels a Climate order. You can cancel an order within 24 hours of creation. Stripe refunds the reservation amount_subtotal, but not the amount_fees for user-triggered cancellations. Frontier @@ -305,7 +219,7 @@ def cancel(self, **params: Unpack["Order.CancelParams"]) -> "Order": @class_method_variant("_cls_cancel") def cancel( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Order.CancelParams"] + self, **params: Unpack["OrderCancelParams"] ) -> "Order": """ Cancels a Climate order. You can cancel an order within 24 hours of creation. Stripe refunds the @@ -326,7 +240,7 @@ def cancel( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_cancel_async( - cls, order: str, **params: Unpack["Order.CancelParams"] + cls, order: str, **params: Unpack["OrderCancelParams"] ) -> "Order": """ Cancels a Climate order. You can cancel an order within 24 hours of creation. Stripe refunds the @@ -348,7 +262,7 @@ async def _cls_cancel_async( @overload @staticmethod async def cancel_async( - order: str, **params: Unpack["Order.CancelParams"] + order: str, **params: Unpack["OrderCancelParams"] ) -> "Order": """ Cancels a Climate order. You can cancel an order within 24 hours of creation. Stripe refunds the @@ -360,7 +274,7 @@ async def cancel_async( @overload async def cancel_async( - self, **params: Unpack["Order.CancelParams"] + self, **params: Unpack["OrderCancelParams"] ) -> "Order": """ Cancels a Climate order. You can cancel an order within 24 hours of creation. Stripe refunds the @@ -372,7 +286,7 @@ async def cancel_async( @class_method_variant("_cls_cancel_async") async def cancel_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Order.CancelParams"] + self, **params: Unpack["OrderCancelParams"] ) -> "Order": """ Cancels a Climate order. You can cancel an order within 24 hours of creation. Stripe refunds the @@ -392,7 +306,7 @@ async def cancel_async( # pyright: ignore[reportGeneralTypeIssues] ) @classmethod - def create(cls, **params: Unpack["Order.CreateParams"]) -> "Order": + def create(cls, **params: Unpack["OrderCreateParams"]) -> "Order": """ Creates a Climate order object for a given Climate product. The order will be processed immediately after creation and payment will be deducted your Stripe balance. @@ -408,7 +322,7 @@ def create(cls, **params: Unpack["Order.CreateParams"]) -> "Order": @classmethod async def create_async( - cls, **params: Unpack["Order.CreateParams"] + cls, **params: Unpack["OrderCreateParams"] ) -> "Order": """ Creates a Climate order object for a given Climate product. The order will be processed immediately @@ -424,7 +338,7 @@ async def create_async( ) @classmethod - def list(cls, **params: Unpack["Order.ListParams"]) -> ListObject["Order"]: + def list(cls, **params: Unpack["OrderListParams"]) -> ListObject["Order"]: """ Lists all Climate order objects. The orders are returned sorted by creation date, with the most recently created orders appearing first. @@ -444,7 +358,7 @@ def list(cls, **params: Unpack["Order.ListParams"]) -> ListObject["Order"]: @classmethod async def list_async( - cls, **params: Unpack["Order.ListParams"] + cls, **params: Unpack["OrderListParams"] ) -> ListObject["Order"]: """ Lists all Climate order objects. The orders are returned sorted by creation date, with the @@ -464,9 +378,7 @@ async def list_async( return result @classmethod - def modify( - cls, id: str, **params: Unpack["Order.ModifyParams"] - ) -> "Order": + def modify(cls, id: str, **params: Unpack["OrderModifyParams"]) -> "Order": """ Updates the specified order by setting the values of the parameters passed. """ @@ -482,7 +394,7 @@ def modify( @classmethod async def modify_async( - cls, id: str, **params: Unpack["Order.ModifyParams"] + cls, id: str, **params: Unpack["OrderModifyParams"] ) -> "Order": """ Updates the specified order by setting the values of the parameters passed. @@ -499,7 +411,7 @@ async def modify_async( @classmethod def retrieve( - cls, id: str, **params: Unpack["Order.RetrieveParams"] + cls, id: str, **params: Unpack["OrderRetrieveParams"] ) -> "Order": """ Retrieves the details of a Climate order object with the given ID. @@ -510,7 +422,7 @@ def retrieve( @classmethod async def retrieve_async( - cls, id: str, **params: Unpack["Order.RetrieveParams"] + cls, id: str, **params: Unpack["OrderRetrieveParams"] ) -> "Order": """ Retrieves the details of a Climate order object with the given ID. diff --git a/stripe/climate/_order_service.py b/stripe/climate/_order_service.py index 4ea9e33f8..7865e1000 100644 --- a/stripe/climate/_order_service.py +++ b/stripe/climate/_order_service.py @@ -5,102 +5,23 @@ from stripe._stripe_service import StripeService from stripe._util import sanitize_id from stripe.climate._order import Order -from typing import Dict, List, Optional, Union, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params.climate._order_cancel_params import OrderCancelParams + from stripe.params.climate._order_create_params import OrderCreateParams + from stripe.params.climate._order_list_params import OrderListParams + from stripe.params.climate._order_retrieve_params import ( + OrderRetrieveParams, + ) + from stripe.params.climate._order_update_params import OrderUpdateParams -class OrderService(StripeService): - class CancelParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class CreateParams(TypedDict): - amount: NotRequired[int] - """ - Requested amount of carbon removal units. Either this or `metric_tons` must be specified. - """ - beneficiary: NotRequired["OrderService.CreateParamsBeneficiary"] - """ - Publicly sharable reference for the end beneficiary of carbon removal. Assumed to be the Stripe account if not set. - """ - currency: NotRequired[str] - """ - Request currency for the order as a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a supported [settlement currency for your account](https://stripe.com/docs/currencies). If omitted, the account's default currency will be used. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - metric_tons: NotRequired[str] - """ - Requested number of tons for the order. Either this or `amount` must be specified. - """ - product: str - """ - Unique identifier of the Climate product. - """ - - class CreateParamsBeneficiary(TypedDict): - public_name: str - """ - Publicly displayable name for the end beneficiary of carbon removal. - """ - - class ListParams(TypedDict): - 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 RetrieveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class UpdateParams(TypedDict): - beneficiary: NotRequired[ - "Literal['']|OrderService.UpdateParamsBeneficiary" - ] - """ - Publicly sharable reference for the end beneficiary of carbon removal. Assumed to be the Stripe account if not set. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - - class UpdateParamsBeneficiary(TypedDict): - public_name: Union[Literal[""], str] - """ - Publicly displayable name for the end beneficiary of carbon removal. - """ +class OrderService(StripeService): def list( self, - params: Optional["OrderService.ListParams"] = None, + params: Optional["OrderListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[Order]: """ @@ -120,7 +41,7 @@ def list( async def list_async( self, - params: Optional["OrderService.ListParams"] = None, + params: Optional["OrderListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[Order]: """ @@ -140,7 +61,7 @@ async def list_async( def create( self, - params: "OrderService.CreateParams", + params: "OrderCreateParams", options: Optional[RequestOptions] = None, ) -> Order: """ @@ -160,7 +81,7 @@ def create( async def create_async( self, - params: "OrderService.CreateParams", + params: "OrderCreateParams", options: Optional[RequestOptions] = None, ) -> Order: """ @@ -181,7 +102,7 @@ async def create_async( def retrieve( self, order: str, - params: Optional["OrderService.RetrieveParams"] = None, + params: Optional["OrderRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Order: """ @@ -201,7 +122,7 @@ def retrieve( async def retrieve_async( self, order: str, - params: Optional["OrderService.RetrieveParams"] = None, + params: Optional["OrderRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Order: """ @@ -221,7 +142,7 @@ async def retrieve_async( def update( self, order: str, - params: Optional["OrderService.UpdateParams"] = None, + params: Optional["OrderUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> Order: """ @@ -241,7 +162,7 @@ def update( async def update_async( self, order: str, - params: Optional["OrderService.UpdateParams"] = None, + params: Optional["OrderUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> Order: """ @@ -261,7 +182,7 @@ async def update_async( def cancel( self, order: str, - params: Optional["OrderService.CancelParams"] = None, + params: Optional["OrderCancelParams"] = None, options: Optional[RequestOptions] = None, ) -> Order: """ @@ -286,7 +207,7 @@ def cancel( async def cancel_async( self, order: str, - params: Optional["OrderService.CancelParams"] = None, + params: Optional["OrderCancelParams"] = None, options: Optional[RequestOptions] = None, ) -> Order: """ diff --git a/stripe/climate/_product.py b/stripe/climate/_product.py index fbe5c4d16..613352ec9 100644 --- a/stripe/climate/_product.py +++ b/stripe/climate/_product.py @@ -2,13 +2,16 @@ # File generated from our OpenAPI spec from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource -from stripe._request_options import RequestOptions from stripe._stripe_object import StripeObject from typing import ClassVar, Dict, List, Optional -from typing_extensions import Literal, NotRequired, Unpack, TYPE_CHECKING +from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: from stripe.climate._supplier import Supplier + from stripe.params.climate._product_list_params import ProductListParams + from stripe.params.climate._product_retrieve_params import ( + ProductRetrieveParams, + ) class Product(ListableAPIResource["Product"]): @@ -33,30 +36,6 @@ class CurrentPricesPerMetricTon(StripeObject): Total for one metric ton of carbon removal (including fees) in the currency's smallest unit. """ - class ListParams(RequestOptions): - 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 RetrieveParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - created: int """ Time at which the object was created. Measured in seconds since the Unix epoch. @@ -98,7 +77,7 @@ class RetrieveParams(RequestOptions): @classmethod def list( - cls, **params: Unpack["Product.ListParams"] + cls, **params: Unpack["ProductListParams"] ) -> ListObject["Product"]: """ Lists all available Climate product objects. @@ -118,7 +97,7 @@ def list( @classmethod async def list_async( - cls, **params: Unpack["Product.ListParams"] + cls, **params: Unpack["ProductListParams"] ) -> ListObject["Product"]: """ Lists all available Climate product objects. @@ -138,7 +117,7 @@ async def list_async( @classmethod def retrieve( - cls, id: str, **params: Unpack["Product.RetrieveParams"] + cls, id: str, **params: Unpack["ProductRetrieveParams"] ) -> "Product": """ Retrieves the details of a Climate product with the given ID. @@ -149,7 +128,7 @@ def retrieve( @classmethod async def retrieve_async( - cls, id: str, **params: Unpack["Product.RetrieveParams"] + cls, id: str, **params: Unpack["ProductRetrieveParams"] ) -> "Product": """ Retrieves the details of a Climate product with the given ID. diff --git a/stripe/climate/_product_service.py b/stripe/climate/_product_service.py index 5b8108272..d9bc88796 100644 --- a/stripe/climate/_product_service.py +++ b/stripe/climate/_product_service.py @@ -5,38 +5,20 @@ from stripe._stripe_service import StripeService from stripe._util import sanitize_id from stripe.climate._product import Product -from typing import List, Optional, cast -from typing_extensions import NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params.climate._product_list_params import ProductListParams + from stripe.params.climate._product_retrieve_params import ( + ProductRetrieveParams, + ) -class ProductService(StripeService): - class ListParams(TypedDict): - 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 RetrieveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ +class ProductService(StripeService): def list( self, - params: Optional["ProductService.ListParams"] = None, + params: Optional["ProductListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[Product]: """ @@ -55,7 +37,7 @@ def list( async def list_async( self, - params: Optional["ProductService.ListParams"] = None, + params: Optional["ProductListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[Product]: """ @@ -75,7 +57,7 @@ async def list_async( def retrieve( self, product: str, - params: Optional["ProductService.RetrieveParams"] = None, + params: Optional["ProductRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Product: """ @@ -97,7 +79,7 @@ def retrieve( async def retrieve_async( self, product: str, - params: Optional["ProductService.RetrieveParams"] = None, + params: Optional["ProductRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Product: """ diff --git a/stripe/climate/_supplier.py b/stripe/climate/_supplier.py index 78b76bbc0..d65e2100d 100644 --- a/stripe/climate/_supplier.py +++ b/stripe/climate/_supplier.py @@ -2,10 +2,15 @@ # File generated from our OpenAPI spec from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource -from stripe._request_options import RequestOptions from stripe._stripe_object import StripeObject from typing import ClassVar, List, Optional -from typing_extensions import Literal, NotRequired, Unpack +from typing_extensions import Literal, Unpack, TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params.climate._supplier_list_params import SupplierListParams + from stripe.params.climate._supplier_retrieve_params import ( + SupplierRetrieveParams, + ) class Supplier(ListableAPIResource["Supplier"]): @@ -37,30 +42,6 @@ class Location(StripeObject): The state/county/province/region where the supplier is located. """ - class ListParams(RequestOptions): - 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 RetrieveParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - id: str """ Unique identifier for the object. @@ -96,7 +77,7 @@ class RetrieveParams(RequestOptions): @classmethod def list( - cls, **params: Unpack["Supplier.ListParams"] + cls, **params: Unpack["SupplierListParams"] ) -> ListObject["Supplier"]: """ Lists all available Climate supplier objects. @@ -116,7 +97,7 @@ def list( @classmethod async def list_async( - cls, **params: Unpack["Supplier.ListParams"] + cls, **params: Unpack["SupplierListParams"] ) -> ListObject["Supplier"]: """ Lists all available Climate supplier objects. @@ -136,7 +117,7 @@ async def list_async( @classmethod def retrieve( - cls, id: str, **params: Unpack["Supplier.RetrieveParams"] + cls, id: str, **params: Unpack["SupplierRetrieveParams"] ) -> "Supplier": """ Retrieves a Climate supplier object. @@ -147,7 +128,7 @@ def retrieve( @classmethod async def retrieve_async( - cls, id: str, **params: Unpack["Supplier.RetrieveParams"] + cls, id: str, **params: Unpack["SupplierRetrieveParams"] ) -> "Supplier": """ Retrieves a Climate supplier object. diff --git a/stripe/climate/_supplier_service.py b/stripe/climate/_supplier_service.py index a2333170f..5cb5ed496 100644 --- a/stripe/climate/_supplier_service.py +++ b/stripe/climate/_supplier_service.py @@ -5,38 +5,20 @@ from stripe._stripe_service import StripeService from stripe._util import sanitize_id from stripe.climate._supplier import Supplier -from typing import List, Optional, cast -from typing_extensions import NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params.climate._supplier_list_params import SupplierListParams + from stripe.params.climate._supplier_retrieve_params import ( + SupplierRetrieveParams, + ) -class SupplierService(StripeService): - class ListParams(TypedDict): - 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 RetrieveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ +class SupplierService(StripeService): def list( self, - params: Optional["SupplierService.ListParams"] = None, + params: Optional["SupplierListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[Supplier]: """ @@ -55,7 +37,7 @@ def list( async def list_async( self, - params: Optional["SupplierService.ListParams"] = None, + params: Optional["SupplierListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[Supplier]: """ @@ -75,7 +57,7 @@ async def list_async( def retrieve( self, supplier: str, - params: Optional["SupplierService.RetrieveParams"] = None, + params: Optional["SupplierRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Supplier: """ @@ -97,7 +79,7 @@ def retrieve( async def retrieve_async( self, supplier: str, - params: Optional["SupplierService.RetrieveParams"] = None, + params: Optional["SupplierRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Supplier: """ diff --git a/stripe/entitlements/_active_entitlement.py b/stripe/entitlements/_active_entitlement.py index 51d324d5c..9e95b282d 100644 --- a/stripe/entitlements/_active_entitlement.py +++ b/stripe/entitlements/_active_entitlement.py @@ -3,12 +3,17 @@ from stripe._expandable_field import ExpandableField from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource -from stripe._request_options import RequestOptions -from typing import ClassVar, List -from typing_extensions import Literal, NotRequired, Unpack, TYPE_CHECKING +from typing import ClassVar +from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: from stripe.entitlements._feature import Feature + from stripe.params.entitlements._active_entitlement_list_params import ( + ActiveEntitlementListParams, + ) + from stripe.params.entitlements._active_entitlement_retrieve_params import ( + ActiveEntitlementRetrieveParams, + ) class ActiveEntitlement(ListableAPIResource["ActiveEntitlement"]): @@ -19,35 +24,6 @@ class ActiveEntitlement(ListableAPIResource["ActiveEntitlement"]): OBJECT_NAME: ClassVar[Literal["entitlements.active_entitlement"]] = ( "entitlements.active_entitlement" ) - - class ListParams(RequestOptions): - customer: str - """ - The ID of the customer. - """ - 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 RetrieveParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - feature: ExpandableField["Feature"] """ The [Feature](https://stripe.com/docs/api/entitlements/feature) that the customer is entitled to. @@ -71,7 +47,7 @@ class RetrieveParams(RequestOptions): @classmethod def list( - cls, **params: Unpack["ActiveEntitlement.ListParams"] + cls, **params: Unpack["ActiveEntitlementListParams"] ) -> ListObject["ActiveEntitlement"]: """ Retrieve a list of active entitlements for a customer @@ -91,7 +67,7 @@ def list( @classmethod async def list_async( - cls, **params: Unpack["ActiveEntitlement.ListParams"] + cls, **params: Unpack["ActiveEntitlementListParams"] ) -> ListObject["ActiveEntitlement"]: """ Retrieve a list of active entitlements for a customer @@ -111,7 +87,7 @@ async def list_async( @classmethod def retrieve( - cls, id: str, **params: Unpack["ActiveEntitlement.RetrieveParams"] + cls, id: str, **params: Unpack["ActiveEntitlementRetrieveParams"] ) -> "ActiveEntitlement": """ Retrieve an active entitlement @@ -122,7 +98,7 @@ def retrieve( @classmethod async def retrieve_async( - cls, id: str, **params: Unpack["ActiveEntitlement.RetrieveParams"] + cls, id: str, **params: Unpack["ActiveEntitlementRetrieveParams"] ) -> "ActiveEntitlement": """ Retrieve an active entitlement diff --git a/stripe/entitlements/_active_entitlement_service.py b/stripe/entitlements/_active_entitlement_service.py index 892584c6e..607258bde 100644 --- a/stripe/entitlements/_active_entitlement_service.py +++ b/stripe/entitlements/_active_entitlement_service.py @@ -5,42 +5,22 @@ from stripe._stripe_service import StripeService from stripe._util import sanitize_id from stripe.entitlements._active_entitlement import ActiveEntitlement -from typing import List, Optional, cast -from typing_extensions import NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params.entitlements._active_entitlement_list_params import ( + ActiveEntitlementListParams, + ) + from stripe.params.entitlements._active_entitlement_retrieve_params import ( + ActiveEntitlementRetrieveParams, + ) -class ActiveEntitlementService(StripeService): - class ListParams(TypedDict): - customer: str - """ - The ID of the customer. - """ - 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 RetrieveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ +class ActiveEntitlementService(StripeService): def list( self, - params: "ActiveEntitlementService.ListParams", + params: "ActiveEntitlementListParams", options: Optional[RequestOptions] = None, ) -> ListObject[ActiveEntitlement]: """ @@ -59,7 +39,7 @@ def list( async def list_async( self, - params: "ActiveEntitlementService.ListParams", + params: "ActiveEntitlementListParams", options: Optional[RequestOptions] = None, ) -> ListObject[ActiveEntitlement]: """ @@ -79,7 +59,7 @@ async def list_async( def retrieve( self, id: str, - params: Optional["ActiveEntitlementService.RetrieveParams"] = None, + params: Optional["ActiveEntitlementRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> ActiveEntitlement: """ @@ -101,7 +81,7 @@ def retrieve( async def retrieve_async( self, id: str, - params: Optional["ActiveEntitlementService.RetrieveParams"] = None, + params: Optional["ActiveEntitlementRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> ActiveEntitlement: """ diff --git a/stripe/entitlements/_feature.py b/stripe/entitlements/_feature.py index 85bca6f8f..c9954ef1e 100644 --- a/stripe/entitlements/_feature.py +++ b/stripe/entitlements/_feature.py @@ -3,11 +3,24 @@ from stripe._createable_api_resource import CreateableAPIResource from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource -from stripe._request_options import RequestOptions from stripe._updateable_api_resource import UpdateableAPIResource from stripe._util import sanitize_id -from typing import ClassVar, Dict, List, cast -from typing_extensions import Literal, NotRequired, Unpack +from typing import ClassVar, Dict, cast +from typing_extensions import Literal, Unpack, TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params.entitlements._feature_create_params import ( + FeatureCreateParams, + ) + from stripe.params.entitlements._feature_list_params import ( + FeatureListParams, + ) + from stripe.params.entitlements._feature_modify_params import ( + FeatureModifyParams, + ) + from stripe.params.entitlements._feature_retrieve_params import ( + FeatureRetrieveParams, + ) class Feature( @@ -23,75 +36,6 @@ class Feature( OBJECT_NAME: ClassVar[Literal["entitlements.feature"]] = ( "entitlements.feature" ) - - class CreateParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - lookup_key: str - """ - A unique key you provide as your own system identifier. This may be up to 80 characters. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. - """ - name: str - """ - The feature's name, for your own purpose, not meant to be displayable to the customer. - """ - - class ListParams(RequestOptions): - archived: NotRequired[bool] - """ - If set, filter results to only include features with the given archive status. - """ - 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. - """ - lookup_key: NotRequired[str] - """ - If set, filter results to only include features with the given lookup_key. - """ - 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 ModifyParams(RequestOptions): - active: NotRequired[bool] - """ - Inactive features cannot be attached to new products and will not be returned from the features list endpoint. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. - """ - name: NotRequired[str] - """ - The feature's name, for your own purpose, not meant to be displayable to the customer. - """ - - class RetrieveParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - active: bool """ Inactive features cannot be attached to new products and will not be returned from the features list endpoint. @@ -122,7 +66,7 @@ class RetrieveParams(RequestOptions): """ @classmethod - def create(cls, **params: Unpack["Feature.CreateParams"]) -> "Feature": + def create(cls, **params: Unpack["FeatureCreateParams"]) -> "Feature": """ Creates a feature """ @@ -137,7 +81,7 @@ def create(cls, **params: Unpack["Feature.CreateParams"]) -> "Feature": @classmethod async def create_async( - cls, **params: Unpack["Feature.CreateParams"] + cls, **params: Unpack["FeatureCreateParams"] ) -> "Feature": """ Creates a feature @@ -153,7 +97,7 @@ async def create_async( @classmethod def list( - cls, **params: Unpack["Feature.ListParams"] + cls, **params: Unpack["FeatureListParams"] ) -> ListObject["Feature"]: """ Retrieve a list of features @@ -173,7 +117,7 @@ def list( @classmethod async def list_async( - cls, **params: Unpack["Feature.ListParams"] + cls, **params: Unpack["FeatureListParams"] ) -> ListObject["Feature"]: """ Retrieve a list of features @@ -193,7 +137,7 @@ async def list_async( @classmethod def modify( - cls, id: str, **params: Unpack["Feature.ModifyParams"] + cls, id: str, **params: Unpack["FeatureModifyParams"] ) -> "Feature": """ Update a feature's metadata or permanently deactivate it. @@ -210,7 +154,7 @@ def modify( @classmethod async def modify_async( - cls, id: str, **params: Unpack["Feature.ModifyParams"] + cls, id: str, **params: Unpack["FeatureModifyParams"] ) -> "Feature": """ Update a feature's metadata or permanently deactivate it. @@ -227,7 +171,7 @@ async def modify_async( @classmethod def retrieve( - cls, id: str, **params: Unpack["Feature.RetrieveParams"] + cls, id: str, **params: Unpack["FeatureRetrieveParams"] ) -> "Feature": """ Retrieves a feature @@ -238,7 +182,7 @@ def retrieve( @classmethod async def retrieve_async( - cls, id: str, **params: Unpack["Feature.RetrieveParams"] + cls, id: str, **params: Unpack["FeatureRetrieveParams"] ) -> "Feature": """ Retrieves a feature diff --git a/stripe/entitlements/_feature_service.py b/stripe/entitlements/_feature_service.py index d1841b36b..4f50b652b 100644 --- a/stripe/entitlements/_feature_service.py +++ b/stripe/entitlements/_feature_service.py @@ -5,82 +5,28 @@ from stripe._stripe_service import StripeService from stripe._util import sanitize_id from stripe.entitlements._feature import Feature -from typing import Dict, List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params.entitlements._feature_create_params import ( + FeatureCreateParams, + ) + from stripe.params.entitlements._feature_list_params import ( + FeatureListParams, + ) + from stripe.params.entitlements._feature_retrieve_params import ( + FeatureRetrieveParams, + ) + from stripe.params.entitlements._feature_update_params import ( + FeatureUpdateParams, + ) -class FeatureService(StripeService): - class CreateParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - lookup_key: str - """ - A unique key you provide as your own system identifier. This may be up to 80 characters. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. - """ - name: str - """ - The feature's name, for your own purpose, not meant to be displayable to the customer. - """ - - class ListParams(TypedDict): - archived: NotRequired[bool] - """ - If set, filter results to only include features with the given archive status. - """ - 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. - """ - lookup_key: NotRequired[str] - """ - If set, filter results to only include features with the given lookup_key. - """ - 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 RetrieveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class UpdateParams(TypedDict): - active: NotRequired[bool] - """ - Inactive features cannot be attached to new products and will not be returned from the features list endpoint. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. - """ - name: NotRequired[str] - """ - The feature's name, for your own purpose, not meant to be displayable to the customer. - """ +class FeatureService(StripeService): def list( self, - params: Optional["FeatureService.ListParams"] = None, + params: Optional["FeatureListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[Feature]: """ @@ -99,7 +45,7 @@ def list( async def list_async( self, - params: Optional["FeatureService.ListParams"] = None, + params: Optional["FeatureListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[Feature]: """ @@ -118,7 +64,7 @@ async def list_async( def create( self, - params: "FeatureService.CreateParams", + params: "FeatureCreateParams", options: Optional[RequestOptions] = None, ) -> Feature: """ @@ -137,7 +83,7 @@ def create( async def create_async( self, - params: "FeatureService.CreateParams", + params: "FeatureCreateParams", options: Optional[RequestOptions] = None, ) -> Feature: """ @@ -157,7 +103,7 @@ async def create_async( def retrieve( self, id: str, - params: Optional["FeatureService.RetrieveParams"] = None, + params: Optional["FeatureRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Feature: """ @@ -177,7 +123,7 @@ def retrieve( async def retrieve_async( self, id: str, - params: Optional["FeatureService.RetrieveParams"] = None, + params: Optional["FeatureRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Feature: """ @@ -197,7 +143,7 @@ async def retrieve_async( def update( self, id: str, - params: Optional["FeatureService.UpdateParams"] = None, + params: Optional["FeatureUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> Feature: """ @@ -217,7 +163,7 @@ def update( async def update_async( self, id: str, - params: Optional["FeatureService.UpdateParams"] = None, + params: Optional["FeatureUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> Feature: """ diff --git a/stripe/error.py b/stripe/error.py deleted file mode 100644 index 470567e5e..000000000 --- a/stripe/error.py +++ /dev/null @@ -1,28 +0,0 @@ -# -*- coding: utf-8 -*- -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.api_resources.error_object package is deprecated, please change your - imports to import from stripe directly. - From: - from stripe.api_resources.error_object import ErrorObject - To: - from stripe import ErrorObject - """, - DeprecationWarning, -) - -if not TYPE_CHECKING: - from stripe._error import StripeError # noqa - from stripe._error import APIError # noqa - from stripe._error import APIConnectionError # noqa - from stripe._error import StripeErrorWithParamCode # noqa - from stripe._error import CardError # noqa - from stripe._error import IdempotencyError # noqa - from stripe._error import InvalidRequestError # noqa - from stripe._error import AuthenticationError # noqa - from stripe._error import PermissionError # noqa - from stripe._error import RateLimitError # noqa - from stripe._error import SignatureVerificationError # noqa diff --git a/stripe/events/__init__.py b/stripe/events/__init__.py index fa34c7541..e5b56dc53 100644 --- a/stripe/events/__init__.py +++ b/stripe/events/__init__.py @@ -1,5 +1,10 @@ # -*- coding: utf-8 -*- -# File generated from our OpenAPI spec + +from stripe.v2.core._event import ( + UnknownEventNotification as UnknownEventNotification, +) + +# The beginning of the section generated from our OpenAPI spec from stripe.events._event_classes import ( ALL_EVENT_NOTIFICATIONS as ALL_EVENT_NOTIFICATIONS, ) @@ -1251,3 +1256,4 @@ V2PaymentsOffSessionPaymentSucceededEvent as V2PaymentsOffSessionPaymentSucceededEvent, V2PaymentsOffSessionPaymentSucceededEventNotification as V2PaymentsOffSessionPaymentSucceededEventNotification, ) +# The end of the section generated from our OpenAPI spec diff --git a/stripe/events/_v1_account_updated_event.py b/stripe/events/_v1_account_updated_event.py index bb82b25a6..eb1b719a0 100644 --- a/stripe/events/_v1_account_updated_event.py +++ b/stripe/events/_v1_account_updated_event.py @@ -4,7 +4,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_application_fee_created_event.py b/stripe/events/_v1_application_fee_created_event.py index 298f972ed..4af174cd2 100644 --- a/stripe/events/_v1_application_fee_created_event.py +++ b/stripe/events/_v1_application_fee_created_event.py @@ -4,7 +4,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_application_fee_refunded_event.py b/stripe/events/_v1_application_fee_refunded_event.py index a715b23cb..c2acae8b0 100644 --- a/stripe/events/_v1_application_fee_refunded_event.py +++ b/stripe/events/_v1_application_fee_refunded_event.py @@ -4,7 +4,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_billing_meter_error_report_triggered_event.py b/stripe/events/_v1_billing_meter_error_report_triggered_event.py index 11d8e138f..80ec324b3 100644 --- a/stripe/events/_v1_billing_meter_error_report_triggered_event.py +++ b/stripe/events/_v1_billing_meter_error_report_triggered_event.py @@ -7,7 +7,7 @@ from stripe._stripe_response import StripeResponse from stripe._util import get_api_mode from stripe.billing._meter import Meter -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, List, Optional, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_billing_meter_no_meter_found_event.py b/stripe/events/_v1_billing_meter_no_meter_found_event.py index d45cab994..9a55b013b 100644 --- a/stripe/events/_v1_billing_meter_no_meter_found_event.py +++ b/stripe/events/_v1_billing_meter_no_meter_found_event.py @@ -4,7 +4,7 @@ from stripe._api_requestor import _APIRequestor from stripe._stripe_object import StripeObject from stripe._stripe_response import StripeResponse -from stripe.v2._event import Event, EventNotification +from stripe.v2.core._event import Event, EventNotification from typing import Any, Dict, List, Optional, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_billing_portal_configuration_created_event.py b/stripe/events/_v1_billing_portal_configuration_created_event.py index 4a49acef0..f9edc4089 100644 --- a/stripe/events/_v1_billing_portal_configuration_created_event.py +++ b/stripe/events/_v1_billing_portal_configuration_created_event.py @@ -4,7 +4,7 @@ from stripe._stripe_object import StripeObject from stripe._util import get_api_mode from stripe.billing_portal._configuration import Configuration -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_billing_portal_configuration_updated_event.py b/stripe/events/_v1_billing_portal_configuration_updated_event.py index 88125b777..eec5f9a0a 100644 --- a/stripe/events/_v1_billing_portal_configuration_updated_event.py +++ b/stripe/events/_v1_billing_portal_configuration_updated_event.py @@ -4,7 +4,7 @@ from stripe._stripe_object import StripeObject from stripe._util import get_api_mode from stripe.billing_portal._configuration import Configuration -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_capability_updated_event.py b/stripe/events/_v1_capability_updated_event.py index f66704a02..e46807004 100644 --- a/stripe/events/_v1_capability_updated_event.py +++ b/stripe/events/_v1_capability_updated_event.py @@ -4,7 +4,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_charge_captured_event.py b/stripe/events/_v1_charge_captured_event.py index 8fe966cd8..4567ec685 100644 --- a/stripe/events/_v1_charge_captured_event.py +++ b/stripe/events/_v1_charge_captured_event.py @@ -4,7 +4,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_charge_dispute_closed_event.py b/stripe/events/_v1_charge_dispute_closed_event.py index 4b0c2d378..a2dc8246a 100644 --- a/stripe/events/_v1_charge_dispute_closed_event.py +++ b/stripe/events/_v1_charge_dispute_closed_event.py @@ -4,7 +4,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_charge_dispute_created_event.py b/stripe/events/_v1_charge_dispute_created_event.py index 459e780c9..50a18daff 100644 --- a/stripe/events/_v1_charge_dispute_created_event.py +++ b/stripe/events/_v1_charge_dispute_created_event.py @@ -4,7 +4,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_charge_dispute_funds_reinstated_event.py b/stripe/events/_v1_charge_dispute_funds_reinstated_event.py index 32799521c..dfba358dd 100644 --- a/stripe/events/_v1_charge_dispute_funds_reinstated_event.py +++ b/stripe/events/_v1_charge_dispute_funds_reinstated_event.py @@ -4,7 +4,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_charge_dispute_funds_withdrawn_event.py b/stripe/events/_v1_charge_dispute_funds_withdrawn_event.py index 7424c3083..e66a0db4a 100644 --- a/stripe/events/_v1_charge_dispute_funds_withdrawn_event.py +++ b/stripe/events/_v1_charge_dispute_funds_withdrawn_event.py @@ -4,7 +4,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_charge_dispute_updated_event.py b/stripe/events/_v1_charge_dispute_updated_event.py index 58afb3255..767f5a15f 100644 --- a/stripe/events/_v1_charge_dispute_updated_event.py +++ b/stripe/events/_v1_charge_dispute_updated_event.py @@ -4,7 +4,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_charge_expired_event.py b/stripe/events/_v1_charge_expired_event.py index e59d2ce5e..6f871f158 100644 --- a/stripe/events/_v1_charge_expired_event.py +++ b/stripe/events/_v1_charge_expired_event.py @@ -4,7 +4,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_charge_failed_event.py b/stripe/events/_v1_charge_failed_event.py index 7bca849c2..877d2d16f 100644 --- a/stripe/events/_v1_charge_failed_event.py +++ b/stripe/events/_v1_charge_failed_event.py @@ -4,7 +4,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_charge_pending_event.py b/stripe/events/_v1_charge_pending_event.py index 5d48eddd3..836ebb6de 100644 --- a/stripe/events/_v1_charge_pending_event.py +++ b/stripe/events/_v1_charge_pending_event.py @@ -4,7 +4,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_charge_refund_updated_event.py b/stripe/events/_v1_charge_refund_updated_event.py index 8e09cf296..a0013ee1f 100644 --- a/stripe/events/_v1_charge_refund_updated_event.py +++ b/stripe/events/_v1_charge_refund_updated_event.py @@ -4,7 +4,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_charge_refunded_event.py b/stripe/events/_v1_charge_refunded_event.py index 2db1262cf..02ee9fb7c 100644 --- a/stripe/events/_v1_charge_refunded_event.py +++ b/stripe/events/_v1_charge_refunded_event.py @@ -4,7 +4,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_charge_succeeded_event.py b/stripe/events/_v1_charge_succeeded_event.py index 055139111..4484dd84f 100644 --- a/stripe/events/_v1_charge_succeeded_event.py +++ b/stripe/events/_v1_charge_succeeded_event.py @@ -4,7 +4,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_charge_updated_event.py b/stripe/events/_v1_charge_updated_event.py index c3ebc1f66..626611f9b 100644 --- a/stripe/events/_v1_charge_updated_event.py +++ b/stripe/events/_v1_charge_updated_event.py @@ -4,7 +4,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_checkout_session_async_payment_failed_event.py b/stripe/events/_v1_checkout_session_async_payment_failed_event.py index 7c1b083ef..eba2aa167 100644 --- a/stripe/events/_v1_checkout_session_async_payment_failed_event.py +++ b/stripe/events/_v1_checkout_session_async_payment_failed_event.py @@ -4,7 +4,7 @@ from stripe._stripe_object import StripeObject from stripe._util import get_api_mode from stripe.checkout._session import Session -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_checkout_session_async_payment_succeeded_event.py b/stripe/events/_v1_checkout_session_async_payment_succeeded_event.py index f59d0b1aa..912367339 100644 --- a/stripe/events/_v1_checkout_session_async_payment_succeeded_event.py +++ b/stripe/events/_v1_checkout_session_async_payment_succeeded_event.py @@ -4,7 +4,7 @@ from stripe._stripe_object import StripeObject from stripe._util import get_api_mode from stripe.checkout._session import Session -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_checkout_session_completed_event.py b/stripe/events/_v1_checkout_session_completed_event.py index 17142bbf1..1c871e71b 100644 --- a/stripe/events/_v1_checkout_session_completed_event.py +++ b/stripe/events/_v1_checkout_session_completed_event.py @@ -4,7 +4,7 @@ from stripe._stripe_object import StripeObject from stripe._util import get_api_mode from stripe.checkout._session import Session -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_checkout_session_expired_event.py b/stripe/events/_v1_checkout_session_expired_event.py index 0aea2ea8f..4fb83ce04 100644 --- a/stripe/events/_v1_checkout_session_expired_event.py +++ b/stripe/events/_v1_checkout_session_expired_event.py @@ -4,7 +4,7 @@ from stripe._stripe_object import StripeObject from stripe._util import get_api_mode from stripe.checkout._session import Session -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_climate_order_canceled_event.py b/stripe/events/_v1_climate_order_canceled_event.py index 9e0e20acd..b8fda3863 100644 --- a/stripe/events/_v1_climate_order_canceled_event.py +++ b/stripe/events/_v1_climate_order_canceled_event.py @@ -4,7 +4,7 @@ from stripe._stripe_object import StripeObject from stripe._util import get_api_mode from stripe.climate._order import Order -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_climate_order_created_event.py b/stripe/events/_v1_climate_order_created_event.py index ffdfedbd6..605795ae5 100644 --- a/stripe/events/_v1_climate_order_created_event.py +++ b/stripe/events/_v1_climate_order_created_event.py @@ -4,7 +4,7 @@ from stripe._stripe_object import StripeObject from stripe._util import get_api_mode from stripe.climate._order import Order -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_climate_order_delayed_event.py b/stripe/events/_v1_climate_order_delayed_event.py index 06db9a039..5641c4c22 100644 --- a/stripe/events/_v1_climate_order_delayed_event.py +++ b/stripe/events/_v1_climate_order_delayed_event.py @@ -4,7 +4,7 @@ from stripe._stripe_object import StripeObject from stripe._util import get_api_mode from stripe.climate._order import Order -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_climate_order_delivered_event.py b/stripe/events/_v1_climate_order_delivered_event.py index 33800ad83..7854fe07e 100644 --- a/stripe/events/_v1_climate_order_delivered_event.py +++ b/stripe/events/_v1_climate_order_delivered_event.py @@ -4,7 +4,7 @@ from stripe._stripe_object import StripeObject from stripe._util import get_api_mode from stripe.climate._order import Order -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_climate_order_product_substituted_event.py b/stripe/events/_v1_climate_order_product_substituted_event.py index c5aed45f4..d72d160ac 100644 --- a/stripe/events/_v1_climate_order_product_substituted_event.py +++ b/stripe/events/_v1_climate_order_product_substituted_event.py @@ -4,7 +4,7 @@ from stripe._stripe_object import StripeObject from stripe._util import get_api_mode from stripe.climate._order import Order -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_climate_product_created_event.py b/stripe/events/_v1_climate_product_created_event.py index e5e0bf653..842805861 100644 --- a/stripe/events/_v1_climate_product_created_event.py +++ b/stripe/events/_v1_climate_product_created_event.py @@ -4,7 +4,7 @@ from stripe._stripe_object import StripeObject from stripe._util import get_api_mode from stripe.climate._product import Product -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_climate_product_pricing_updated_event.py b/stripe/events/_v1_climate_product_pricing_updated_event.py index 5de3bdc12..6cf25eb4b 100644 --- a/stripe/events/_v1_climate_product_pricing_updated_event.py +++ b/stripe/events/_v1_climate_product_pricing_updated_event.py @@ -4,7 +4,7 @@ from stripe._stripe_object import StripeObject from stripe._util import get_api_mode from stripe.climate._product import Product -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_coupon_created_event.py b/stripe/events/_v1_coupon_created_event.py index a81801cce..cbb1ec9e2 100644 --- a/stripe/events/_v1_coupon_created_event.py +++ b/stripe/events/_v1_coupon_created_event.py @@ -4,7 +4,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_coupon_deleted_event.py b/stripe/events/_v1_coupon_deleted_event.py index db3961a59..55134268b 100644 --- a/stripe/events/_v1_coupon_deleted_event.py +++ b/stripe/events/_v1_coupon_deleted_event.py @@ -4,7 +4,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_coupon_updated_event.py b/stripe/events/_v1_coupon_updated_event.py index 81a63d106..d77336a51 100644 --- a/stripe/events/_v1_coupon_updated_event.py +++ b/stripe/events/_v1_coupon_updated_event.py @@ -4,7 +4,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_credit_note_created_event.py b/stripe/events/_v1_credit_note_created_event.py index c7626a6c6..cf7a026d5 100644 --- a/stripe/events/_v1_credit_note_created_event.py +++ b/stripe/events/_v1_credit_note_created_event.py @@ -4,7 +4,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_credit_note_updated_event.py b/stripe/events/_v1_credit_note_updated_event.py index e8d2ebd11..53d83ef96 100644 --- a/stripe/events/_v1_credit_note_updated_event.py +++ b/stripe/events/_v1_credit_note_updated_event.py @@ -4,7 +4,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_credit_note_voided_event.py b/stripe/events/_v1_credit_note_voided_event.py index 8bf509ba6..5344478f3 100644 --- a/stripe/events/_v1_credit_note_voided_event.py +++ b/stripe/events/_v1_credit_note_voided_event.py @@ -4,7 +4,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_customer_created_event.py b/stripe/events/_v1_customer_created_event.py index c7c642ea1..97f702880 100644 --- a/stripe/events/_v1_customer_created_event.py +++ b/stripe/events/_v1_customer_created_event.py @@ -4,7 +4,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_customer_deleted_event.py b/stripe/events/_v1_customer_deleted_event.py index 9d0ac0a29..40602f8d1 100644 --- a/stripe/events/_v1_customer_deleted_event.py +++ b/stripe/events/_v1_customer_deleted_event.py @@ -4,7 +4,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_customer_subscription_created_event.py b/stripe/events/_v1_customer_subscription_created_event.py index 79ee98115..395724c22 100644 --- a/stripe/events/_v1_customer_subscription_created_event.py +++ b/stripe/events/_v1_customer_subscription_created_event.py @@ -4,7 +4,7 @@ from stripe._stripe_object import StripeObject from stripe._subscription import Subscription from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_customer_subscription_deleted_event.py b/stripe/events/_v1_customer_subscription_deleted_event.py index 170285a09..ef090a27d 100644 --- a/stripe/events/_v1_customer_subscription_deleted_event.py +++ b/stripe/events/_v1_customer_subscription_deleted_event.py @@ -4,7 +4,7 @@ from stripe._stripe_object import StripeObject from stripe._subscription import Subscription from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_customer_subscription_paused_event.py b/stripe/events/_v1_customer_subscription_paused_event.py index 643a58a0d..a3c6ff4b2 100644 --- a/stripe/events/_v1_customer_subscription_paused_event.py +++ b/stripe/events/_v1_customer_subscription_paused_event.py @@ -4,7 +4,7 @@ from stripe._stripe_object import StripeObject from stripe._subscription import Subscription from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_customer_subscription_pending_update_applied_event.py b/stripe/events/_v1_customer_subscription_pending_update_applied_event.py index 49e9bd813..3f32d8fcb 100644 --- a/stripe/events/_v1_customer_subscription_pending_update_applied_event.py +++ b/stripe/events/_v1_customer_subscription_pending_update_applied_event.py @@ -4,7 +4,7 @@ from stripe._stripe_object import StripeObject from stripe._subscription import Subscription from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_customer_subscription_pending_update_expired_event.py b/stripe/events/_v1_customer_subscription_pending_update_expired_event.py index 0328f398a..c8490e6bd 100644 --- a/stripe/events/_v1_customer_subscription_pending_update_expired_event.py +++ b/stripe/events/_v1_customer_subscription_pending_update_expired_event.py @@ -4,7 +4,7 @@ from stripe._stripe_object import StripeObject from stripe._subscription import Subscription from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_customer_subscription_resumed_event.py b/stripe/events/_v1_customer_subscription_resumed_event.py index fb6ec6649..990d7eb4c 100644 --- a/stripe/events/_v1_customer_subscription_resumed_event.py +++ b/stripe/events/_v1_customer_subscription_resumed_event.py @@ -4,7 +4,7 @@ from stripe._stripe_object import StripeObject from stripe._subscription import Subscription from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_customer_subscription_trial_will_end_event.py b/stripe/events/_v1_customer_subscription_trial_will_end_event.py index 2a27c5055..16b632961 100644 --- a/stripe/events/_v1_customer_subscription_trial_will_end_event.py +++ b/stripe/events/_v1_customer_subscription_trial_will_end_event.py @@ -4,7 +4,7 @@ from stripe._stripe_object import StripeObject from stripe._subscription import Subscription from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_customer_subscription_updated_event.py b/stripe/events/_v1_customer_subscription_updated_event.py index 8983af6f7..4ea91a338 100644 --- a/stripe/events/_v1_customer_subscription_updated_event.py +++ b/stripe/events/_v1_customer_subscription_updated_event.py @@ -4,7 +4,7 @@ from stripe._stripe_object import StripeObject from stripe._subscription import Subscription from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_customer_tax_id_created_event.py b/stripe/events/_v1_customer_tax_id_created_event.py index b597515d1..af37775fe 100644 --- a/stripe/events/_v1_customer_tax_id_created_event.py +++ b/stripe/events/_v1_customer_tax_id_created_event.py @@ -4,7 +4,7 @@ from stripe._stripe_object import StripeObject from stripe._tax_id import TaxId from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_customer_tax_id_deleted_event.py b/stripe/events/_v1_customer_tax_id_deleted_event.py index 0db23c043..f30235bea 100644 --- a/stripe/events/_v1_customer_tax_id_deleted_event.py +++ b/stripe/events/_v1_customer_tax_id_deleted_event.py @@ -4,7 +4,7 @@ from stripe._stripe_object import StripeObject from stripe._tax_id import TaxId from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_customer_tax_id_updated_event.py b/stripe/events/_v1_customer_tax_id_updated_event.py index 155c6c486..a4b313f72 100644 --- a/stripe/events/_v1_customer_tax_id_updated_event.py +++ b/stripe/events/_v1_customer_tax_id_updated_event.py @@ -4,7 +4,7 @@ from stripe._stripe_object import StripeObject from stripe._tax_id import TaxId from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_customer_updated_event.py b/stripe/events/_v1_customer_updated_event.py index 0be1668f6..5cfcc9c90 100644 --- a/stripe/events/_v1_customer_updated_event.py +++ b/stripe/events/_v1_customer_updated_event.py @@ -4,7 +4,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_file_created_event.py b/stripe/events/_v1_file_created_event.py index 1834ecbb5..d2b48040c 100644 --- a/stripe/events/_v1_file_created_event.py +++ b/stripe/events/_v1_file_created_event.py @@ -4,7 +4,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_financial_connections_account_created_event.py b/stripe/events/_v1_financial_connections_account_created_event.py index 99d4c3d67..366e13655 100644 --- a/stripe/events/_v1_financial_connections_account_created_event.py +++ b/stripe/events/_v1_financial_connections_account_created_event.py @@ -4,7 +4,7 @@ from stripe._stripe_object import StripeObject from stripe._util import get_api_mode from stripe.financial_connections._account import Account -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_financial_connections_account_deactivated_event.py b/stripe/events/_v1_financial_connections_account_deactivated_event.py index 60d4e4269..7be66a1b5 100644 --- a/stripe/events/_v1_financial_connections_account_deactivated_event.py +++ b/stripe/events/_v1_financial_connections_account_deactivated_event.py @@ -4,7 +4,7 @@ from stripe._stripe_object import StripeObject from stripe._util import get_api_mode from stripe.financial_connections._account import Account -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_financial_connections_account_disconnected_event.py b/stripe/events/_v1_financial_connections_account_disconnected_event.py index 5515576df..e1e618d4f 100644 --- a/stripe/events/_v1_financial_connections_account_disconnected_event.py +++ b/stripe/events/_v1_financial_connections_account_disconnected_event.py @@ -4,7 +4,7 @@ from stripe._stripe_object import StripeObject from stripe._util import get_api_mode from stripe.financial_connections._account import Account -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_financial_connections_account_reactivated_event.py b/stripe/events/_v1_financial_connections_account_reactivated_event.py index 11e5e998f..0ff8fcd0e 100644 --- a/stripe/events/_v1_financial_connections_account_reactivated_event.py +++ b/stripe/events/_v1_financial_connections_account_reactivated_event.py @@ -4,7 +4,7 @@ from stripe._stripe_object import StripeObject from stripe._util import get_api_mode from stripe.financial_connections._account import Account -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_financial_connections_account_refreshed_balance_event.py b/stripe/events/_v1_financial_connections_account_refreshed_balance_event.py index 566273d42..e9a7e54ec 100644 --- a/stripe/events/_v1_financial_connections_account_refreshed_balance_event.py +++ b/stripe/events/_v1_financial_connections_account_refreshed_balance_event.py @@ -4,7 +4,7 @@ from stripe._stripe_object import StripeObject from stripe._util import get_api_mode from stripe.financial_connections._account import Account -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_financial_connections_account_refreshed_ownership_event.py b/stripe/events/_v1_financial_connections_account_refreshed_ownership_event.py index 602967ca5..5abd1cd4c 100644 --- a/stripe/events/_v1_financial_connections_account_refreshed_ownership_event.py +++ b/stripe/events/_v1_financial_connections_account_refreshed_ownership_event.py @@ -4,7 +4,7 @@ from stripe._stripe_object import StripeObject from stripe._util import get_api_mode from stripe.financial_connections._account import Account -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_financial_connections_account_refreshed_transactions_event.py b/stripe/events/_v1_financial_connections_account_refreshed_transactions_event.py index 21a33597a..c4989b768 100644 --- a/stripe/events/_v1_financial_connections_account_refreshed_transactions_event.py +++ b/stripe/events/_v1_financial_connections_account_refreshed_transactions_event.py @@ -4,7 +4,7 @@ from stripe._stripe_object import StripeObject from stripe._util import get_api_mode from stripe.financial_connections._account import Account -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_identity_verification_session_canceled_event.py b/stripe/events/_v1_identity_verification_session_canceled_event.py index 5317667fb..395c3bf0b 100644 --- a/stripe/events/_v1_identity_verification_session_canceled_event.py +++ b/stripe/events/_v1_identity_verification_session_canceled_event.py @@ -4,7 +4,7 @@ from stripe._stripe_object import StripeObject from stripe._util import get_api_mode from stripe.identity._verification_session import VerificationSession -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_identity_verification_session_created_event.py b/stripe/events/_v1_identity_verification_session_created_event.py index 7bcc9be1a..05ba1fa5b 100644 --- a/stripe/events/_v1_identity_verification_session_created_event.py +++ b/stripe/events/_v1_identity_verification_session_created_event.py @@ -4,7 +4,7 @@ from stripe._stripe_object import StripeObject from stripe._util import get_api_mode from stripe.identity._verification_session import VerificationSession -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_identity_verification_session_processing_event.py b/stripe/events/_v1_identity_verification_session_processing_event.py index f176a7548..753359593 100644 --- a/stripe/events/_v1_identity_verification_session_processing_event.py +++ b/stripe/events/_v1_identity_verification_session_processing_event.py @@ -4,7 +4,7 @@ from stripe._stripe_object import StripeObject from stripe._util import get_api_mode from stripe.identity._verification_session import VerificationSession -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_identity_verification_session_redacted_event.py b/stripe/events/_v1_identity_verification_session_redacted_event.py index 0b562b33d..d8898ebc0 100644 --- a/stripe/events/_v1_identity_verification_session_redacted_event.py +++ b/stripe/events/_v1_identity_verification_session_redacted_event.py @@ -4,7 +4,7 @@ from stripe._stripe_object import StripeObject from stripe._util import get_api_mode from stripe.identity._verification_session import VerificationSession -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_identity_verification_session_requires_input_event.py b/stripe/events/_v1_identity_verification_session_requires_input_event.py index 1b71ada79..f0e3b3a18 100644 --- a/stripe/events/_v1_identity_verification_session_requires_input_event.py +++ b/stripe/events/_v1_identity_verification_session_requires_input_event.py @@ -4,7 +4,7 @@ from stripe._stripe_object import StripeObject from stripe._util import get_api_mode from stripe.identity._verification_session import VerificationSession -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_identity_verification_session_verified_event.py b/stripe/events/_v1_identity_verification_session_verified_event.py index 6fdf9df9f..ab861f112 100644 --- a/stripe/events/_v1_identity_verification_session_verified_event.py +++ b/stripe/events/_v1_identity_verification_session_verified_event.py @@ -4,7 +4,7 @@ from stripe._stripe_object import StripeObject from stripe._util import get_api_mode from stripe.identity._verification_session import VerificationSession -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_invoice_created_event.py b/stripe/events/_v1_invoice_created_event.py index e8990f47e..f9f410922 100644 --- a/stripe/events/_v1_invoice_created_event.py +++ b/stripe/events/_v1_invoice_created_event.py @@ -4,7 +4,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_invoice_deleted_event.py b/stripe/events/_v1_invoice_deleted_event.py index 6c18867c0..f46853e4d 100644 --- a/stripe/events/_v1_invoice_deleted_event.py +++ b/stripe/events/_v1_invoice_deleted_event.py @@ -4,7 +4,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_invoice_finalization_failed_event.py b/stripe/events/_v1_invoice_finalization_failed_event.py index b0a8fa71a..5742f37f7 100644 --- a/stripe/events/_v1_invoice_finalization_failed_event.py +++ b/stripe/events/_v1_invoice_finalization_failed_event.py @@ -4,7 +4,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_invoice_finalized_event.py b/stripe/events/_v1_invoice_finalized_event.py index 3a9849226..09829abdb 100644 --- a/stripe/events/_v1_invoice_finalized_event.py +++ b/stripe/events/_v1_invoice_finalized_event.py @@ -4,7 +4,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_invoice_marked_uncollectible_event.py b/stripe/events/_v1_invoice_marked_uncollectible_event.py index 4ae1e5d65..6bd781be1 100644 --- a/stripe/events/_v1_invoice_marked_uncollectible_event.py +++ b/stripe/events/_v1_invoice_marked_uncollectible_event.py @@ -4,7 +4,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_invoice_overdue_event.py b/stripe/events/_v1_invoice_overdue_event.py index f4549a42f..cd03928ed 100644 --- a/stripe/events/_v1_invoice_overdue_event.py +++ b/stripe/events/_v1_invoice_overdue_event.py @@ -4,7 +4,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_invoice_overpaid_event.py b/stripe/events/_v1_invoice_overpaid_event.py index a12dece21..a184b5422 100644 --- a/stripe/events/_v1_invoice_overpaid_event.py +++ b/stripe/events/_v1_invoice_overpaid_event.py @@ -4,7 +4,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_invoice_paid_event.py b/stripe/events/_v1_invoice_paid_event.py index cc58e141a..913bbf415 100644 --- a/stripe/events/_v1_invoice_paid_event.py +++ b/stripe/events/_v1_invoice_paid_event.py @@ -4,7 +4,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_invoice_payment_action_required_event.py b/stripe/events/_v1_invoice_payment_action_required_event.py index bd81fcc08..dd85899e8 100644 --- a/stripe/events/_v1_invoice_payment_action_required_event.py +++ b/stripe/events/_v1_invoice_payment_action_required_event.py @@ -4,7 +4,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_invoice_payment_failed_event.py b/stripe/events/_v1_invoice_payment_failed_event.py index 8f07c9754..b26d7451f 100644 --- a/stripe/events/_v1_invoice_payment_failed_event.py +++ b/stripe/events/_v1_invoice_payment_failed_event.py @@ -4,7 +4,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_invoice_payment_paid_event.py b/stripe/events/_v1_invoice_payment_paid_event.py index d61f67582..00c3c87b0 100644 --- a/stripe/events/_v1_invoice_payment_paid_event.py +++ b/stripe/events/_v1_invoice_payment_paid_event.py @@ -4,7 +4,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_invoice_payment_succeeded_event.py b/stripe/events/_v1_invoice_payment_succeeded_event.py index f776f4343..2466ea557 100644 --- a/stripe/events/_v1_invoice_payment_succeeded_event.py +++ b/stripe/events/_v1_invoice_payment_succeeded_event.py @@ -4,7 +4,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_invoice_sent_event.py b/stripe/events/_v1_invoice_sent_event.py index 0beb39380..dee66030e 100644 --- a/stripe/events/_v1_invoice_sent_event.py +++ b/stripe/events/_v1_invoice_sent_event.py @@ -4,7 +4,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_invoice_upcoming_event.py b/stripe/events/_v1_invoice_upcoming_event.py index 8c2befa46..3a7f85b08 100644 --- a/stripe/events/_v1_invoice_upcoming_event.py +++ b/stripe/events/_v1_invoice_upcoming_event.py @@ -4,7 +4,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_invoice_updated_event.py b/stripe/events/_v1_invoice_updated_event.py index 608024404..abfcc486f 100644 --- a/stripe/events/_v1_invoice_updated_event.py +++ b/stripe/events/_v1_invoice_updated_event.py @@ -4,7 +4,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_invoice_voided_event.py b/stripe/events/_v1_invoice_voided_event.py index 80e93440f..d606b2891 100644 --- a/stripe/events/_v1_invoice_voided_event.py +++ b/stripe/events/_v1_invoice_voided_event.py @@ -4,7 +4,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_invoice_will_be_due_event.py b/stripe/events/_v1_invoice_will_be_due_event.py index 0a23a25cf..325024f91 100644 --- a/stripe/events/_v1_invoice_will_be_due_event.py +++ b/stripe/events/_v1_invoice_will_be_due_event.py @@ -4,7 +4,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_invoiceitem_created_event.py b/stripe/events/_v1_invoiceitem_created_event.py index 6f10bf48e..97b093522 100644 --- a/stripe/events/_v1_invoiceitem_created_event.py +++ b/stripe/events/_v1_invoiceitem_created_event.py @@ -4,7 +4,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_invoiceitem_deleted_event.py b/stripe/events/_v1_invoiceitem_deleted_event.py index 4f7d2d6a4..a6afcf971 100644 --- a/stripe/events/_v1_invoiceitem_deleted_event.py +++ b/stripe/events/_v1_invoiceitem_deleted_event.py @@ -4,7 +4,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_issuing_authorization_created_event.py b/stripe/events/_v1_issuing_authorization_created_event.py index acfea4775..15cae5647 100644 --- a/stripe/events/_v1_issuing_authorization_created_event.py +++ b/stripe/events/_v1_issuing_authorization_created_event.py @@ -4,7 +4,7 @@ from stripe._stripe_object import StripeObject from stripe._util import get_api_mode from stripe.issuing._authorization import Authorization -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_issuing_authorization_request_event.py b/stripe/events/_v1_issuing_authorization_request_event.py index 63a414c8c..be982c63a 100644 --- a/stripe/events/_v1_issuing_authorization_request_event.py +++ b/stripe/events/_v1_issuing_authorization_request_event.py @@ -4,7 +4,7 @@ from stripe._stripe_object import StripeObject from stripe._util import get_api_mode from stripe.issuing._authorization import Authorization -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_issuing_authorization_updated_event.py b/stripe/events/_v1_issuing_authorization_updated_event.py index 22169c29a..1dc5c4117 100644 --- a/stripe/events/_v1_issuing_authorization_updated_event.py +++ b/stripe/events/_v1_issuing_authorization_updated_event.py @@ -4,7 +4,7 @@ from stripe._stripe_object import StripeObject from stripe._util import get_api_mode from stripe.issuing._authorization import Authorization -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_issuing_card_created_event.py b/stripe/events/_v1_issuing_card_created_event.py index 6a9a00a76..4e8c8f619 100644 --- a/stripe/events/_v1_issuing_card_created_event.py +++ b/stripe/events/_v1_issuing_card_created_event.py @@ -4,7 +4,7 @@ from stripe._stripe_object import StripeObject from stripe._util import get_api_mode from stripe.issuing._card import Card -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_issuing_card_updated_event.py b/stripe/events/_v1_issuing_card_updated_event.py index a0924b421..8fe31a5ca 100644 --- a/stripe/events/_v1_issuing_card_updated_event.py +++ b/stripe/events/_v1_issuing_card_updated_event.py @@ -4,7 +4,7 @@ from stripe._stripe_object import StripeObject from stripe._util import get_api_mode from stripe.issuing._card import Card -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_issuing_cardholder_created_event.py b/stripe/events/_v1_issuing_cardholder_created_event.py index baafd4ab3..2abbeb9de 100644 --- a/stripe/events/_v1_issuing_cardholder_created_event.py +++ b/stripe/events/_v1_issuing_cardholder_created_event.py @@ -4,7 +4,7 @@ from stripe._stripe_object import StripeObject from stripe._util import get_api_mode from stripe.issuing._cardholder import Cardholder -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_issuing_cardholder_updated_event.py b/stripe/events/_v1_issuing_cardholder_updated_event.py index 85b109aca..8cc37de85 100644 --- a/stripe/events/_v1_issuing_cardholder_updated_event.py +++ b/stripe/events/_v1_issuing_cardholder_updated_event.py @@ -4,7 +4,7 @@ from stripe._stripe_object import StripeObject from stripe._util import get_api_mode from stripe.issuing._cardholder import Cardholder -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_issuing_dispute_closed_event.py b/stripe/events/_v1_issuing_dispute_closed_event.py index 48ffb3f36..d5a70d6ef 100644 --- a/stripe/events/_v1_issuing_dispute_closed_event.py +++ b/stripe/events/_v1_issuing_dispute_closed_event.py @@ -4,7 +4,7 @@ from stripe._stripe_object import StripeObject from stripe._util import get_api_mode from stripe.issuing._dispute import Dispute -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_issuing_dispute_created_event.py b/stripe/events/_v1_issuing_dispute_created_event.py index 3cbecf778..bf47dd835 100644 --- a/stripe/events/_v1_issuing_dispute_created_event.py +++ b/stripe/events/_v1_issuing_dispute_created_event.py @@ -4,7 +4,7 @@ from stripe._stripe_object import StripeObject from stripe._util import get_api_mode from stripe.issuing._dispute import Dispute -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_issuing_dispute_funds_reinstated_event.py b/stripe/events/_v1_issuing_dispute_funds_reinstated_event.py index 76f425984..fd69231c0 100644 --- a/stripe/events/_v1_issuing_dispute_funds_reinstated_event.py +++ b/stripe/events/_v1_issuing_dispute_funds_reinstated_event.py @@ -4,7 +4,7 @@ from stripe._stripe_object import StripeObject from stripe._util import get_api_mode from stripe.issuing._dispute import Dispute -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_issuing_dispute_funds_rescinded_event.py b/stripe/events/_v1_issuing_dispute_funds_rescinded_event.py index 38cbe9d2e..6bf890cdf 100644 --- a/stripe/events/_v1_issuing_dispute_funds_rescinded_event.py +++ b/stripe/events/_v1_issuing_dispute_funds_rescinded_event.py @@ -4,7 +4,7 @@ from stripe._stripe_object import StripeObject from stripe._util import get_api_mode from stripe.issuing._dispute import Dispute -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_issuing_dispute_submitted_event.py b/stripe/events/_v1_issuing_dispute_submitted_event.py index f9ebb1b2d..4848c45dc 100644 --- a/stripe/events/_v1_issuing_dispute_submitted_event.py +++ b/stripe/events/_v1_issuing_dispute_submitted_event.py @@ -4,7 +4,7 @@ from stripe._stripe_object import StripeObject from stripe._util import get_api_mode from stripe.issuing._dispute import Dispute -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_issuing_dispute_updated_event.py b/stripe/events/_v1_issuing_dispute_updated_event.py index d4a5ea946..85d9776aa 100644 --- a/stripe/events/_v1_issuing_dispute_updated_event.py +++ b/stripe/events/_v1_issuing_dispute_updated_event.py @@ -4,7 +4,7 @@ from stripe._stripe_object import StripeObject from stripe._util import get_api_mode from stripe.issuing._dispute import Dispute -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_issuing_personalization_design_activated_event.py b/stripe/events/_v1_issuing_personalization_design_activated_event.py index afebf53c2..431c26e66 100644 --- a/stripe/events/_v1_issuing_personalization_design_activated_event.py +++ b/stripe/events/_v1_issuing_personalization_design_activated_event.py @@ -4,7 +4,7 @@ from stripe._stripe_object import StripeObject from stripe._util import get_api_mode from stripe.issuing._personalization_design import PersonalizationDesign -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_issuing_personalization_design_deactivated_event.py b/stripe/events/_v1_issuing_personalization_design_deactivated_event.py index 78202c2ac..6ea869711 100644 --- a/stripe/events/_v1_issuing_personalization_design_deactivated_event.py +++ b/stripe/events/_v1_issuing_personalization_design_deactivated_event.py @@ -4,7 +4,7 @@ from stripe._stripe_object import StripeObject from stripe._util import get_api_mode from stripe.issuing._personalization_design import PersonalizationDesign -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_issuing_personalization_design_rejected_event.py b/stripe/events/_v1_issuing_personalization_design_rejected_event.py index e0a0ce0cb..f59f055a4 100644 --- a/stripe/events/_v1_issuing_personalization_design_rejected_event.py +++ b/stripe/events/_v1_issuing_personalization_design_rejected_event.py @@ -4,7 +4,7 @@ from stripe._stripe_object import StripeObject from stripe._util import get_api_mode from stripe.issuing._personalization_design import PersonalizationDesign -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_issuing_personalization_design_updated_event.py b/stripe/events/_v1_issuing_personalization_design_updated_event.py index 2fd63e96a..84aeb8ed8 100644 --- a/stripe/events/_v1_issuing_personalization_design_updated_event.py +++ b/stripe/events/_v1_issuing_personalization_design_updated_event.py @@ -4,7 +4,7 @@ from stripe._stripe_object import StripeObject from stripe._util import get_api_mode from stripe.issuing._personalization_design import PersonalizationDesign -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_issuing_token_created_event.py b/stripe/events/_v1_issuing_token_created_event.py index 235c6fb77..2fc5a5565 100644 --- a/stripe/events/_v1_issuing_token_created_event.py +++ b/stripe/events/_v1_issuing_token_created_event.py @@ -4,7 +4,7 @@ from stripe._stripe_object import StripeObject from stripe._util import get_api_mode from stripe.issuing._token import Token -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_issuing_token_updated_event.py b/stripe/events/_v1_issuing_token_updated_event.py index 68b78c6f9..7ee9d9e4c 100644 --- a/stripe/events/_v1_issuing_token_updated_event.py +++ b/stripe/events/_v1_issuing_token_updated_event.py @@ -4,7 +4,7 @@ from stripe._stripe_object import StripeObject from stripe._util import get_api_mode from stripe.issuing._token import Token -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_issuing_transaction_created_event.py b/stripe/events/_v1_issuing_transaction_created_event.py index 2b63f7a4b..98b87e95d 100644 --- a/stripe/events/_v1_issuing_transaction_created_event.py +++ b/stripe/events/_v1_issuing_transaction_created_event.py @@ -4,7 +4,7 @@ from stripe._stripe_object import StripeObject from stripe._util import get_api_mode from stripe.issuing._transaction import Transaction -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_issuing_transaction_purchase_details_receipt_updated_event.py b/stripe/events/_v1_issuing_transaction_purchase_details_receipt_updated_event.py index b891bb249..3021f0745 100644 --- a/stripe/events/_v1_issuing_transaction_purchase_details_receipt_updated_event.py +++ b/stripe/events/_v1_issuing_transaction_purchase_details_receipt_updated_event.py @@ -4,7 +4,7 @@ from stripe._stripe_object import StripeObject from stripe._util import get_api_mode from stripe.issuing._transaction import Transaction -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_issuing_transaction_updated_event.py b/stripe/events/_v1_issuing_transaction_updated_event.py index 51b6b6f35..6fbddc9dd 100644 --- a/stripe/events/_v1_issuing_transaction_updated_event.py +++ b/stripe/events/_v1_issuing_transaction_updated_event.py @@ -4,7 +4,7 @@ from stripe._stripe_object import StripeObject from stripe._util import get_api_mode from stripe.issuing._transaction import Transaction -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_mandate_updated_event.py b/stripe/events/_v1_mandate_updated_event.py index 7dc8fb6df..dec323c5b 100644 --- a/stripe/events/_v1_mandate_updated_event.py +++ b/stripe/events/_v1_mandate_updated_event.py @@ -4,7 +4,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_payment_intent_amount_capturable_updated_event.py b/stripe/events/_v1_payment_intent_amount_capturable_updated_event.py index 62f55e2d3..abd42ba65 100644 --- a/stripe/events/_v1_payment_intent_amount_capturable_updated_event.py +++ b/stripe/events/_v1_payment_intent_amount_capturable_updated_event.py @@ -4,7 +4,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_payment_intent_canceled_event.py b/stripe/events/_v1_payment_intent_canceled_event.py index 9f9a429cc..cb8423c5f 100644 --- a/stripe/events/_v1_payment_intent_canceled_event.py +++ b/stripe/events/_v1_payment_intent_canceled_event.py @@ -4,7 +4,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_payment_intent_created_event.py b/stripe/events/_v1_payment_intent_created_event.py index e41149e8b..be382c301 100644 --- a/stripe/events/_v1_payment_intent_created_event.py +++ b/stripe/events/_v1_payment_intent_created_event.py @@ -4,7 +4,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_payment_intent_partially_funded_event.py b/stripe/events/_v1_payment_intent_partially_funded_event.py index 3e78713fb..ddd1cc1d9 100644 --- a/stripe/events/_v1_payment_intent_partially_funded_event.py +++ b/stripe/events/_v1_payment_intent_partially_funded_event.py @@ -4,7 +4,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_payment_intent_payment_failed_event.py b/stripe/events/_v1_payment_intent_payment_failed_event.py index bb149b075..3645662d9 100644 --- a/stripe/events/_v1_payment_intent_payment_failed_event.py +++ b/stripe/events/_v1_payment_intent_payment_failed_event.py @@ -4,7 +4,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_payment_intent_processing_event.py b/stripe/events/_v1_payment_intent_processing_event.py index e048b8c04..0a5f88988 100644 --- a/stripe/events/_v1_payment_intent_processing_event.py +++ b/stripe/events/_v1_payment_intent_processing_event.py @@ -4,7 +4,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_payment_intent_requires_action_event.py b/stripe/events/_v1_payment_intent_requires_action_event.py index cb2f554d1..97dacfcae 100644 --- a/stripe/events/_v1_payment_intent_requires_action_event.py +++ b/stripe/events/_v1_payment_intent_requires_action_event.py @@ -4,7 +4,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_payment_intent_succeeded_event.py b/stripe/events/_v1_payment_intent_succeeded_event.py index 3fe68fc4d..996e4fd23 100644 --- a/stripe/events/_v1_payment_intent_succeeded_event.py +++ b/stripe/events/_v1_payment_intent_succeeded_event.py @@ -4,7 +4,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_payment_link_created_event.py b/stripe/events/_v1_payment_link_created_event.py index 9da384c96..0b139042f 100644 --- a/stripe/events/_v1_payment_link_created_event.py +++ b/stripe/events/_v1_payment_link_created_event.py @@ -4,7 +4,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_payment_link_updated_event.py b/stripe/events/_v1_payment_link_updated_event.py index 20e4b7dec..584149bef 100644 --- a/stripe/events/_v1_payment_link_updated_event.py +++ b/stripe/events/_v1_payment_link_updated_event.py @@ -4,7 +4,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_payment_method_attached_event.py b/stripe/events/_v1_payment_method_attached_event.py index 63b886b5c..5151e6727 100644 --- a/stripe/events/_v1_payment_method_attached_event.py +++ b/stripe/events/_v1_payment_method_attached_event.py @@ -4,7 +4,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_payment_method_automatically_updated_event.py b/stripe/events/_v1_payment_method_automatically_updated_event.py index 9d874cfff..52fe9eb79 100644 --- a/stripe/events/_v1_payment_method_automatically_updated_event.py +++ b/stripe/events/_v1_payment_method_automatically_updated_event.py @@ -4,7 +4,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_payment_method_detached_event.py b/stripe/events/_v1_payment_method_detached_event.py index 0aa3e1131..2b8cdaad2 100644 --- a/stripe/events/_v1_payment_method_detached_event.py +++ b/stripe/events/_v1_payment_method_detached_event.py @@ -4,7 +4,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_payment_method_updated_event.py b/stripe/events/_v1_payment_method_updated_event.py index cd52080f3..3c1ab672e 100644 --- a/stripe/events/_v1_payment_method_updated_event.py +++ b/stripe/events/_v1_payment_method_updated_event.py @@ -4,7 +4,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_payout_canceled_event.py b/stripe/events/_v1_payout_canceled_event.py index 0315a3db4..88ebc23ac 100644 --- a/stripe/events/_v1_payout_canceled_event.py +++ b/stripe/events/_v1_payout_canceled_event.py @@ -4,7 +4,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_payout_created_event.py b/stripe/events/_v1_payout_created_event.py index 5ee872762..db0c5880a 100644 --- a/stripe/events/_v1_payout_created_event.py +++ b/stripe/events/_v1_payout_created_event.py @@ -4,7 +4,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_payout_failed_event.py b/stripe/events/_v1_payout_failed_event.py index 376c9009c..49352f299 100644 --- a/stripe/events/_v1_payout_failed_event.py +++ b/stripe/events/_v1_payout_failed_event.py @@ -4,7 +4,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_payout_paid_event.py b/stripe/events/_v1_payout_paid_event.py index 7029113c1..597ead088 100644 --- a/stripe/events/_v1_payout_paid_event.py +++ b/stripe/events/_v1_payout_paid_event.py @@ -4,7 +4,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_payout_reconciliation_completed_event.py b/stripe/events/_v1_payout_reconciliation_completed_event.py index da192f82a..1d2c46cc5 100644 --- a/stripe/events/_v1_payout_reconciliation_completed_event.py +++ b/stripe/events/_v1_payout_reconciliation_completed_event.py @@ -4,7 +4,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_payout_updated_event.py b/stripe/events/_v1_payout_updated_event.py index e9d2a6da1..ba8a56c9a 100644 --- a/stripe/events/_v1_payout_updated_event.py +++ b/stripe/events/_v1_payout_updated_event.py @@ -4,7 +4,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_person_created_event.py b/stripe/events/_v1_person_created_event.py index 95d8dd14f..6ddf75aa5 100644 --- a/stripe/events/_v1_person_created_event.py +++ b/stripe/events/_v1_person_created_event.py @@ -4,7 +4,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_person_deleted_event.py b/stripe/events/_v1_person_deleted_event.py index 8c3bc0804..bc3062766 100644 --- a/stripe/events/_v1_person_deleted_event.py +++ b/stripe/events/_v1_person_deleted_event.py @@ -4,7 +4,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_person_updated_event.py b/stripe/events/_v1_person_updated_event.py index d6360e3c0..f52162a91 100644 --- a/stripe/events/_v1_person_updated_event.py +++ b/stripe/events/_v1_person_updated_event.py @@ -4,7 +4,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_plan_created_event.py b/stripe/events/_v1_plan_created_event.py index cc74c529b..ff6af79c9 100644 --- a/stripe/events/_v1_plan_created_event.py +++ b/stripe/events/_v1_plan_created_event.py @@ -4,7 +4,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_plan_deleted_event.py b/stripe/events/_v1_plan_deleted_event.py index d07afeaee..163729645 100644 --- a/stripe/events/_v1_plan_deleted_event.py +++ b/stripe/events/_v1_plan_deleted_event.py @@ -4,7 +4,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_plan_updated_event.py b/stripe/events/_v1_plan_updated_event.py index 3d201f8af..098f78a2d 100644 --- a/stripe/events/_v1_plan_updated_event.py +++ b/stripe/events/_v1_plan_updated_event.py @@ -4,7 +4,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_price_created_event.py b/stripe/events/_v1_price_created_event.py index 92d33ef68..fc1700d66 100644 --- a/stripe/events/_v1_price_created_event.py +++ b/stripe/events/_v1_price_created_event.py @@ -4,7 +4,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_price_deleted_event.py b/stripe/events/_v1_price_deleted_event.py index ed932009e..1e1bba618 100644 --- a/stripe/events/_v1_price_deleted_event.py +++ b/stripe/events/_v1_price_deleted_event.py @@ -4,7 +4,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_price_updated_event.py b/stripe/events/_v1_price_updated_event.py index fe2ba3633..49faf9142 100644 --- a/stripe/events/_v1_price_updated_event.py +++ b/stripe/events/_v1_price_updated_event.py @@ -4,7 +4,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_product_created_event.py b/stripe/events/_v1_product_created_event.py index 5beed8317..69bcd5248 100644 --- a/stripe/events/_v1_product_created_event.py +++ b/stripe/events/_v1_product_created_event.py @@ -4,7 +4,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_product_deleted_event.py b/stripe/events/_v1_product_deleted_event.py index 1a6d57ca5..654972c32 100644 --- a/stripe/events/_v1_product_deleted_event.py +++ b/stripe/events/_v1_product_deleted_event.py @@ -4,7 +4,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_product_updated_event.py b/stripe/events/_v1_product_updated_event.py index b572fb387..8a78d4ab2 100644 --- a/stripe/events/_v1_product_updated_event.py +++ b/stripe/events/_v1_product_updated_event.py @@ -4,7 +4,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_promotion_code_created_event.py b/stripe/events/_v1_promotion_code_created_event.py index da8d77fe6..2c05cb20d 100644 --- a/stripe/events/_v1_promotion_code_created_event.py +++ b/stripe/events/_v1_promotion_code_created_event.py @@ -4,7 +4,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_promotion_code_updated_event.py b/stripe/events/_v1_promotion_code_updated_event.py index 37bd820a6..81b630b2f 100644 --- a/stripe/events/_v1_promotion_code_updated_event.py +++ b/stripe/events/_v1_promotion_code_updated_event.py @@ -4,7 +4,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_quote_accepted_event.py b/stripe/events/_v1_quote_accepted_event.py index 71105a470..c3e8b278a 100644 --- a/stripe/events/_v1_quote_accepted_event.py +++ b/stripe/events/_v1_quote_accepted_event.py @@ -4,7 +4,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_quote_canceled_event.py b/stripe/events/_v1_quote_canceled_event.py index f708696bd..2830d6363 100644 --- a/stripe/events/_v1_quote_canceled_event.py +++ b/stripe/events/_v1_quote_canceled_event.py @@ -4,7 +4,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_quote_created_event.py b/stripe/events/_v1_quote_created_event.py index 6f11d3582..ec105e079 100644 --- a/stripe/events/_v1_quote_created_event.py +++ b/stripe/events/_v1_quote_created_event.py @@ -4,7 +4,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_quote_finalized_event.py b/stripe/events/_v1_quote_finalized_event.py index e7d588563..995fb19f1 100644 --- a/stripe/events/_v1_quote_finalized_event.py +++ b/stripe/events/_v1_quote_finalized_event.py @@ -4,7 +4,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_radar_early_fraud_warning_created_event.py b/stripe/events/_v1_radar_early_fraud_warning_created_event.py index 2df945122..68d152c94 100644 --- a/stripe/events/_v1_radar_early_fraud_warning_created_event.py +++ b/stripe/events/_v1_radar_early_fraud_warning_created_event.py @@ -4,7 +4,7 @@ from stripe._stripe_object import StripeObject from stripe._util import get_api_mode from stripe.radar._early_fraud_warning import EarlyFraudWarning -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_radar_early_fraud_warning_updated_event.py b/stripe/events/_v1_radar_early_fraud_warning_updated_event.py index 0f1988604..993efa45a 100644 --- a/stripe/events/_v1_radar_early_fraud_warning_updated_event.py +++ b/stripe/events/_v1_radar_early_fraud_warning_updated_event.py @@ -4,7 +4,7 @@ from stripe._stripe_object import StripeObject from stripe._util import get_api_mode from stripe.radar._early_fraud_warning import EarlyFraudWarning -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_refund_created_event.py b/stripe/events/_v1_refund_created_event.py index fce6d5197..860aadd98 100644 --- a/stripe/events/_v1_refund_created_event.py +++ b/stripe/events/_v1_refund_created_event.py @@ -4,7 +4,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_refund_failed_event.py b/stripe/events/_v1_refund_failed_event.py index c059be607..28112abee 100644 --- a/stripe/events/_v1_refund_failed_event.py +++ b/stripe/events/_v1_refund_failed_event.py @@ -4,7 +4,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_refund_updated_event.py b/stripe/events/_v1_refund_updated_event.py index b2b74469c..0599c0b63 100644 --- a/stripe/events/_v1_refund_updated_event.py +++ b/stripe/events/_v1_refund_updated_event.py @@ -4,7 +4,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_review_closed_event.py b/stripe/events/_v1_review_closed_event.py index 217716684..3d2029a26 100644 --- a/stripe/events/_v1_review_closed_event.py +++ b/stripe/events/_v1_review_closed_event.py @@ -4,7 +4,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_review_opened_event.py b/stripe/events/_v1_review_opened_event.py index b9d9069d1..210a34332 100644 --- a/stripe/events/_v1_review_opened_event.py +++ b/stripe/events/_v1_review_opened_event.py @@ -4,7 +4,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_setup_intent_canceled_event.py b/stripe/events/_v1_setup_intent_canceled_event.py index 913745ba2..e994f894b 100644 --- a/stripe/events/_v1_setup_intent_canceled_event.py +++ b/stripe/events/_v1_setup_intent_canceled_event.py @@ -4,7 +4,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_setup_intent_created_event.py b/stripe/events/_v1_setup_intent_created_event.py index 1b2340521..7df21996f 100644 --- a/stripe/events/_v1_setup_intent_created_event.py +++ b/stripe/events/_v1_setup_intent_created_event.py @@ -4,7 +4,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_setup_intent_requires_action_event.py b/stripe/events/_v1_setup_intent_requires_action_event.py index 916bac9c7..23f8d90ce 100644 --- a/stripe/events/_v1_setup_intent_requires_action_event.py +++ b/stripe/events/_v1_setup_intent_requires_action_event.py @@ -4,7 +4,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_setup_intent_setup_failed_event.py b/stripe/events/_v1_setup_intent_setup_failed_event.py index 890e4b78b..e89ed5494 100644 --- a/stripe/events/_v1_setup_intent_setup_failed_event.py +++ b/stripe/events/_v1_setup_intent_setup_failed_event.py @@ -4,7 +4,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_setup_intent_succeeded_event.py b/stripe/events/_v1_setup_intent_succeeded_event.py index 44c2cce8a..5c03a8d4e 100644 --- a/stripe/events/_v1_setup_intent_succeeded_event.py +++ b/stripe/events/_v1_setup_intent_succeeded_event.py @@ -4,7 +4,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_sigma_scheduled_query_run_created_event.py b/stripe/events/_v1_sigma_scheduled_query_run_created_event.py index 542b7db4e..b7b98ae44 100644 --- a/stripe/events/_v1_sigma_scheduled_query_run_created_event.py +++ b/stripe/events/_v1_sigma_scheduled_query_run_created_event.py @@ -4,7 +4,7 @@ from stripe._stripe_object import StripeObject from stripe._util import get_api_mode from stripe.sigma._scheduled_query_run import ScheduledQueryRun -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_source_canceled_event.py b/stripe/events/_v1_source_canceled_event.py index ec9759991..df17c2a68 100644 --- a/stripe/events/_v1_source_canceled_event.py +++ b/stripe/events/_v1_source_canceled_event.py @@ -4,7 +4,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_source_chargeable_event.py b/stripe/events/_v1_source_chargeable_event.py index fd75d983c..abd67a85f 100644 --- a/stripe/events/_v1_source_chargeable_event.py +++ b/stripe/events/_v1_source_chargeable_event.py @@ -4,7 +4,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_source_failed_event.py b/stripe/events/_v1_source_failed_event.py index 397a17c50..098fa5283 100644 --- a/stripe/events/_v1_source_failed_event.py +++ b/stripe/events/_v1_source_failed_event.py @@ -4,7 +4,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_source_refund_attributes_required_event.py b/stripe/events/_v1_source_refund_attributes_required_event.py index 367c777a8..9285b9ef7 100644 --- a/stripe/events/_v1_source_refund_attributes_required_event.py +++ b/stripe/events/_v1_source_refund_attributes_required_event.py @@ -4,7 +4,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_subscription_schedule_aborted_event.py b/stripe/events/_v1_subscription_schedule_aborted_event.py index b96ff4fdb..5b4b3badb 100644 --- a/stripe/events/_v1_subscription_schedule_aborted_event.py +++ b/stripe/events/_v1_subscription_schedule_aborted_event.py @@ -4,7 +4,7 @@ from stripe._stripe_object import StripeObject from stripe._subscription_schedule import SubscriptionSchedule from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_subscription_schedule_canceled_event.py b/stripe/events/_v1_subscription_schedule_canceled_event.py index 47717ee42..2684a8e8b 100644 --- a/stripe/events/_v1_subscription_schedule_canceled_event.py +++ b/stripe/events/_v1_subscription_schedule_canceled_event.py @@ -4,7 +4,7 @@ from stripe._stripe_object import StripeObject from stripe._subscription_schedule import SubscriptionSchedule from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_subscription_schedule_completed_event.py b/stripe/events/_v1_subscription_schedule_completed_event.py index a44d61600..bb1a6b663 100644 --- a/stripe/events/_v1_subscription_schedule_completed_event.py +++ b/stripe/events/_v1_subscription_schedule_completed_event.py @@ -4,7 +4,7 @@ from stripe._stripe_object import StripeObject from stripe._subscription_schedule import SubscriptionSchedule from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_subscription_schedule_created_event.py b/stripe/events/_v1_subscription_schedule_created_event.py index bae0af5bd..e6f5567f0 100644 --- a/stripe/events/_v1_subscription_schedule_created_event.py +++ b/stripe/events/_v1_subscription_schedule_created_event.py @@ -4,7 +4,7 @@ from stripe._stripe_object import StripeObject from stripe._subscription_schedule import SubscriptionSchedule from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_subscription_schedule_expiring_event.py b/stripe/events/_v1_subscription_schedule_expiring_event.py index 20c3c1925..6e737ea7d 100644 --- a/stripe/events/_v1_subscription_schedule_expiring_event.py +++ b/stripe/events/_v1_subscription_schedule_expiring_event.py @@ -4,7 +4,7 @@ from stripe._stripe_object import StripeObject from stripe._subscription_schedule import SubscriptionSchedule from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_subscription_schedule_released_event.py b/stripe/events/_v1_subscription_schedule_released_event.py index 2856bb127..ae558f81c 100644 --- a/stripe/events/_v1_subscription_schedule_released_event.py +++ b/stripe/events/_v1_subscription_schedule_released_event.py @@ -4,7 +4,7 @@ from stripe._stripe_object import StripeObject from stripe._subscription_schedule import SubscriptionSchedule from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_subscription_schedule_updated_event.py b/stripe/events/_v1_subscription_schedule_updated_event.py index 367b65d12..3a45f6996 100644 --- a/stripe/events/_v1_subscription_schedule_updated_event.py +++ b/stripe/events/_v1_subscription_schedule_updated_event.py @@ -4,7 +4,7 @@ from stripe._stripe_object import StripeObject from stripe._subscription_schedule import SubscriptionSchedule from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_tax_rate_created_event.py b/stripe/events/_v1_tax_rate_created_event.py index acdca1348..17b06a176 100644 --- a/stripe/events/_v1_tax_rate_created_event.py +++ b/stripe/events/_v1_tax_rate_created_event.py @@ -4,7 +4,7 @@ from stripe._stripe_object import StripeObject from stripe._tax_rate import TaxRate from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_tax_rate_updated_event.py b/stripe/events/_v1_tax_rate_updated_event.py index 1ed4fb863..629d63205 100644 --- a/stripe/events/_v1_tax_rate_updated_event.py +++ b/stripe/events/_v1_tax_rate_updated_event.py @@ -4,7 +4,7 @@ from stripe._stripe_object import StripeObject from stripe._tax_rate import TaxRate from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_terminal_reader_action_failed_event.py b/stripe/events/_v1_terminal_reader_action_failed_event.py index e9213f06f..f066ea01c 100644 --- a/stripe/events/_v1_terminal_reader_action_failed_event.py +++ b/stripe/events/_v1_terminal_reader_action_failed_event.py @@ -4,7 +4,7 @@ from stripe._stripe_object import StripeObject from stripe._util import get_api_mode from stripe.terminal._reader import Reader -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_terminal_reader_action_succeeded_event.py b/stripe/events/_v1_terminal_reader_action_succeeded_event.py index d03d59b35..e45b23508 100644 --- a/stripe/events/_v1_terminal_reader_action_succeeded_event.py +++ b/stripe/events/_v1_terminal_reader_action_succeeded_event.py @@ -4,7 +4,7 @@ from stripe._stripe_object import StripeObject from stripe._util import get_api_mode from stripe.terminal._reader import Reader -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_terminal_reader_action_updated_event.py b/stripe/events/_v1_terminal_reader_action_updated_event.py index 09b6267e1..329008194 100644 --- a/stripe/events/_v1_terminal_reader_action_updated_event.py +++ b/stripe/events/_v1_terminal_reader_action_updated_event.py @@ -4,7 +4,7 @@ from stripe._stripe_object import StripeObject from stripe._util import get_api_mode from stripe.terminal._reader import Reader -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_test_helpers_test_clock_advancing_event.py b/stripe/events/_v1_test_helpers_test_clock_advancing_event.py index e9e733437..dbcc736d5 100644 --- a/stripe/events/_v1_test_helpers_test_clock_advancing_event.py +++ b/stripe/events/_v1_test_helpers_test_clock_advancing_event.py @@ -4,7 +4,7 @@ from stripe._stripe_object import StripeObject from stripe._util import get_api_mode from stripe.test_helpers._test_clock import TestClock -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_test_helpers_test_clock_created_event.py b/stripe/events/_v1_test_helpers_test_clock_created_event.py index 5a106a355..948834b6c 100644 --- a/stripe/events/_v1_test_helpers_test_clock_created_event.py +++ b/stripe/events/_v1_test_helpers_test_clock_created_event.py @@ -4,7 +4,7 @@ from stripe._stripe_object import StripeObject from stripe._util import get_api_mode from stripe.test_helpers._test_clock import TestClock -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_test_helpers_test_clock_deleted_event.py b/stripe/events/_v1_test_helpers_test_clock_deleted_event.py index 5fcc86c99..4dbca723c 100644 --- a/stripe/events/_v1_test_helpers_test_clock_deleted_event.py +++ b/stripe/events/_v1_test_helpers_test_clock_deleted_event.py @@ -4,7 +4,7 @@ from stripe._stripe_object import StripeObject from stripe._util import get_api_mode from stripe.test_helpers._test_clock import TestClock -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_test_helpers_test_clock_internal_failure_event.py b/stripe/events/_v1_test_helpers_test_clock_internal_failure_event.py index 1407ebcaa..2a5e8bb09 100644 --- a/stripe/events/_v1_test_helpers_test_clock_internal_failure_event.py +++ b/stripe/events/_v1_test_helpers_test_clock_internal_failure_event.py @@ -4,7 +4,7 @@ from stripe._stripe_object import StripeObject from stripe._util import get_api_mode from stripe.test_helpers._test_clock import TestClock -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_test_helpers_test_clock_ready_event.py b/stripe/events/_v1_test_helpers_test_clock_ready_event.py index 28418e3fa..046cb73a7 100644 --- a/stripe/events/_v1_test_helpers_test_clock_ready_event.py +++ b/stripe/events/_v1_test_helpers_test_clock_ready_event.py @@ -4,7 +4,7 @@ from stripe._stripe_object import StripeObject from stripe._util import get_api_mode from stripe.test_helpers._test_clock import TestClock -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_topup_canceled_event.py b/stripe/events/_v1_topup_canceled_event.py index 4027056e0..4037d3cd1 100644 --- a/stripe/events/_v1_topup_canceled_event.py +++ b/stripe/events/_v1_topup_canceled_event.py @@ -4,7 +4,7 @@ from stripe._stripe_object import StripeObject from stripe._topup import Topup from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_topup_created_event.py b/stripe/events/_v1_topup_created_event.py index 7d5b68f56..aca16577b 100644 --- a/stripe/events/_v1_topup_created_event.py +++ b/stripe/events/_v1_topup_created_event.py @@ -4,7 +4,7 @@ from stripe._stripe_object import StripeObject from stripe._topup import Topup from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_topup_failed_event.py b/stripe/events/_v1_topup_failed_event.py index c7ccca96b..49825280b 100644 --- a/stripe/events/_v1_topup_failed_event.py +++ b/stripe/events/_v1_topup_failed_event.py @@ -4,7 +4,7 @@ from stripe._stripe_object import StripeObject from stripe._topup import Topup from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_topup_reversed_event.py b/stripe/events/_v1_topup_reversed_event.py index fb05ef3e5..dbf69a827 100644 --- a/stripe/events/_v1_topup_reversed_event.py +++ b/stripe/events/_v1_topup_reversed_event.py @@ -4,7 +4,7 @@ from stripe._stripe_object import StripeObject from stripe._topup import Topup from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_topup_succeeded_event.py b/stripe/events/_v1_topup_succeeded_event.py index 7cbf23cab..690e586d9 100644 --- a/stripe/events/_v1_topup_succeeded_event.py +++ b/stripe/events/_v1_topup_succeeded_event.py @@ -4,7 +4,7 @@ from stripe._stripe_object import StripeObject from stripe._topup import Topup from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_transfer_created_event.py b/stripe/events/_v1_transfer_created_event.py index b370d79e3..88aeb223f 100644 --- a/stripe/events/_v1_transfer_created_event.py +++ b/stripe/events/_v1_transfer_created_event.py @@ -4,7 +4,7 @@ from stripe._stripe_object import StripeObject from stripe._transfer import Transfer from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_transfer_reversed_event.py b/stripe/events/_v1_transfer_reversed_event.py index c386aa70b..9e42a14d9 100644 --- a/stripe/events/_v1_transfer_reversed_event.py +++ b/stripe/events/_v1_transfer_reversed_event.py @@ -4,7 +4,7 @@ from stripe._stripe_object import StripeObject from stripe._transfer import Transfer from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v1_transfer_updated_event.py b/stripe/events/_v1_transfer_updated_event.py index 3092da9bb..66f828873 100644 --- a/stripe/events/_v1_transfer_updated_event.py +++ b/stripe/events/_v1_transfer_updated_event.py @@ -4,7 +4,7 @@ from stripe._stripe_object import StripeObject from stripe._transfer import Transfer from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v2_billing_bill_setting_updated_event.py b/stripe/events/_v2_billing_bill_setting_updated_event.py index 032bb6501..d37bd48ef 100644 --- a/stripe/events/_v2_billing_bill_setting_updated_event.py +++ b/stripe/events/_v2_billing_bill_setting_updated_event.py @@ -6,8 +6,8 @@ from stripe._stripe_object import StripeObject from stripe._stripe_response import StripeResponse from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject from stripe.v2.billing._bill_setting import BillSetting +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, Optional, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v2_billing_cadence_billed_event.py b/stripe/events/_v2_billing_cadence_billed_event.py index 4ddeec9b3..fdae4ec4a 100644 --- a/stripe/events/_v2_billing_cadence_billed_event.py +++ b/stripe/events/_v2_billing_cadence_billed_event.py @@ -6,8 +6,8 @@ from stripe._stripe_object import StripeObject from stripe._stripe_response import StripeResponse from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject from stripe.v2.billing._cadence import Cadence +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, List, Optional, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v2_billing_cadence_canceled_event.py b/stripe/events/_v2_billing_cadence_canceled_event.py index f6dc031b4..216185550 100644 --- a/stripe/events/_v2_billing_cadence_canceled_event.py +++ b/stripe/events/_v2_billing_cadence_canceled_event.py @@ -3,8 +3,8 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject from stripe.v2.billing._cadence import Cadence +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v2_billing_cadence_created_event.py b/stripe/events/_v2_billing_cadence_created_event.py index 44b0d9756..79d6aa61e 100644 --- a/stripe/events/_v2_billing_cadence_created_event.py +++ b/stripe/events/_v2_billing_cadence_created_event.py @@ -6,8 +6,8 @@ from stripe._stripe_object import StripeObject from stripe._stripe_response import StripeResponse from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject from stripe.v2.billing._cadence import Cadence +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, Optional, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v2_billing_license_fee_created_event.py b/stripe/events/_v2_billing_license_fee_created_event.py index 23b20ee46..16ac23416 100644 --- a/stripe/events/_v2_billing_license_fee_created_event.py +++ b/stripe/events/_v2_billing_license_fee_created_event.py @@ -3,8 +3,8 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject from stripe.v2.billing._license_fee import LicenseFee +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v2_billing_license_fee_updated_event.py b/stripe/events/_v2_billing_license_fee_updated_event.py index 3678456fc..f0c9cf417 100644 --- a/stripe/events/_v2_billing_license_fee_updated_event.py +++ b/stripe/events/_v2_billing_license_fee_updated_event.py @@ -3,8 +3,8 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject from stripe.v2.billing._license_fee import LicenseFee +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v2_billing_license_fee_version_created_event.py b/stripe/events/_v2_billing_license_fee_version_created_event.py index 7809863b0..26708c80f 100644 --- a/stripe/events/_v2_billing_license_fee_version_created_event.py +++ b/stripe/events/_v2_billing_license_fee_version_created_event.py @@ -6,8 +6,8 @@ from stripe._stripe_object import StripeObject from stripe._stripe_response import StripeResponse from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject from stripe.v2.billing._license_fee_version import LicenseFeeVersion +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, Optional, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v2_billing_licensed_item_created_event.py b/stripe/events/_v2_billing_licensed_item_created_event.py index 0a31b6de2..300a5f71e 100644 --- a/stripe/events/_v2_billing_licensed_item_created_event.py +++ b/stripe/events/_v2_billing_licensed_item_created_event.py @@ -3,8 +3,8 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject from stripe.v2.billing._licensed_item import LicensedItem +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v2_billing_licensed_item_updated_event.py b/stripe/events/_v2_billing_licensed_item_updated_event.py index d854a0b95..0d8ea19ca 100644 --- a/stripe/events/_v2_billing_licensed_item_updated_event.py +++ b/stripe/events/_v2_billing_licensed_item_updated_event.py @@ -3,8 +3,8 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject from stripe.v2.billing._licensed_item import LicensedItem +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v2_billing_metered_item_created_event.py b/stripe/events/_v2_billing_metered_item_created_event.py index cdd80fb55..fa3cb5100 100644 --- a/stripe/events/_v2_billing_metered_item_created_event.py +++ b/stripe/events/_v2_billing_metered_item_created_event.py @@ -3,8 +3,8 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject from stripe.v2.billing._metered_item import MeteredItem +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v2_billing_metered_item_updated_event.py b/stripe/events/_v2_billing_metered_item_updated_event.py index 00fa6ce9d..858cd2cae 100644 --- a/stripe/events/_v2_billing_metered_item_updated_event.py +++ b/stripe/events/_v2_billing_metered_item_updated_event.py @@ -3,8 +3,8 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject from stripe.v2.billing._metered_item import MeteredItem +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v2_billing_pricing_plan_component_created_event.py b/stripe/events/_v2_billing_pricing_plan_component_created_event.py index 0cf88f985..cd3b361ee 100644 --- a/stripe/events/_v2_billing_pricing_plan_component_created_event.py +++ b/stripe/events/_v2_billing_pricing_plan_component_created_event.py @@ -6,8 +6,8 @@ from stripe._stripe_object import StripeObject from stripe._stripe_response import StripeResponse from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject from stripe.v2.billing._pricing_plan_component import PricingPlanComponent +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, Optional, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v2_billing_pricing_plan_component_updated_event.py b/stripe/events/_v2_billing_pricing_plan_component_updated_event.py index ade8cbc4b..5b812c3fb 100644 --- a/stripe/events/_v2_billing_pricing_plan_component_updated_event.py +++ b/stripe/events/_v2_billing_pricing_plan_component_updated_event.py @@ -6,8 +6,8 @@ from stripe._stripe_object import StripeObject from stripe._stripe_response import StripeResponse from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject from stripe.v2.billing._pricing_plan_component import PricingPlanComponent +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, Optional, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v2_billing_pricing_plan_created_event.py b/stripe/events/_v2_billing_pricing_plan_created_event.py index f78a763b3..f8a9a774f 100644 --- a/stripe/events/_v2_billing_pricing_plan_created_event.py +++ b/stripe/events/_v2_billing_pricing_plan_created_event.py @@ -3,8 +3,8 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject from stripe.v2.billing._pricing_plan import PricingPlan +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v2_billing_pricing_plan_subscription_collection_awaiting_customer_action_event.py b/stripe/events/_v2_billing_pricing_plan_subscription_collection_awaiting_customer_action_event.py index 9a8c6f0cd..1a9eb0ab4 100644 --- a/stripe/events/_v2_billing_pricing_plan_subscription_collection_awaiting_customer_action_event.py +++ b/stripe/events/_v2_billing_pricing_plan_subscription_collection_awaiting_customer_action_event.py @@ -3,10 +3,10 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject from stripe.v2.billing._pricing_plan_subscription import ( PricingPlanSubscription, ) +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v2_billing_pricing_plan_subscription_collection_current_event.py b/stripe/events/_v2_billing_pricing_plan_subscription_collection_current_event.py index b9a63a31f..438f524d3 100644 --- a/stripe/events/_v2_billing_pricing_plan_subscription_collection_current_event.py +++ b/stripe/events/_v2_billing_pricing_plan_subscription_collection_current_event.py @@ -3,10 +3,10 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject from stripe.v2.billing._pricing_plan_subscription import ( PricingPlanSubscription, ) +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v2_billing_pricing_plan_subscription_collection_past_due_event.py b/stripe/events/_v2_billing_pricing_plan_subscription_collection_past_due_event.py index a339de9b4..156e1110c 100644 --- a/stripe/events/_v2_billing_pricing_plan_subscription_collection_past_due_event.py +++ b/stripe/events/_v2_billing_pricing_plan_subscription_collection_past_due_event.py @@ -3,10 +3,10 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject from stripe.v2.billing._pricing_plan_subscription import ( PricingPlanSubscription, ) +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v2_billing_pricing_plan_subscription_collection_paused_event.py b/stripe/events/_v2_billing_pricing_plan_subscription_collection_paused_event.py index 0f1947fd8..c0a5600bd 100644 --- a/stripe/events/_v2_billing_pricing_plan_subscription_collection_paused_event.py +++ b/stripe/events/_v2_billing_pricing_plan_subscription_collection_paused_event.py @@ -3,10 +3,10 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject from stripe.v2.billing._pricing_plan_subscription import ( PricingPlanSubscription, ) +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v2_billing_pricing_plan_subscription_collection_unpaid_event.py b/stripe/events/_v2_billing_pricing_plan_subscription_collection_unpaid_event.py index 983e2c43c..76ae1638b 100644 --- a/stripe/events/_v2_billing_pricing_plan_subscription_collection_unpaid_event.py +++ b/stripe/events/_v2_billing_pricing_plan_subscription_collection_unpaid_event.py @@ -3,10 +3,10 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject from stripe.v2.billing._pricing_plan_subscription import ( PricingPlanSubscription, ) +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v2_billing_pricing_plan_subscription_servicing_activated_event.py b/stripe/events/_v2_billing_pricing_plan_subscription_servicing_activated_event.py index 2a3c23135..9329eafe9 100644 --- a/stripe/events/_v2_billing_pricing_plan_subscription_servicing_activated_event.py +++ b/stripe/events/_v2_billing_pricing_plan_subscription_servicing_activated_event.py @@ -3,10 +3,10 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject from stripe.v2.billing._pricing_plan_subscription import ( PricingPlanSubscription, ) +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v2_billing_pricing_plan_subscription_servicing_canceled_event.py b/stripe/events/_v2_billing_pricing_plan_subscription_servicing_canceled_event.py index ce21eeeff..d729cd017 100644 --- a/stripe/events/_v2_billing_pricing_plan_subscription_servicing_canceled_event.py +++ b/stripe/events/_v2_billing_pricing_plan_subscription_servicing_canceled_event.py @@ -3,10 +3,10 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject from stripe.v2.billing._pricing_plan_subscription import ( PricingPlanSubscription, ) +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v2_billing_pricing_plan_subscription_servicing_paused_event.py b/stripe/events/_v2_billing_pricing_plan_subscription_servicing_paused_event.py index 367a5b5a5..a8ff0ca3f 100644 --- a/stripe/events/_v2_billing_pricing_plan_subscription_servicing_paused_event.py +++ b/stripe/events/_v2_billing_pricing_plan_subscription_servicing_paused_event.py @@ -3,10 +3,10 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject from stripe.v2.billing._pricing_plan_subscription import ( PricingPlanSubscription, ) +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v2_billing_pricing_plan_updated_event.py b/stripe/events/_v2_billing_pricing_plan_updated_event.py index a7ed194fc..5ac845384 100644 --- a/stripe/events/_v2_billing_pricing_plan_updated_event.py +++ b/stripe/events/_v2_billing_pricing_plan_updated_event.py @@ -3,8 +3,8 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject from stripe.v2.billing._pricing_plan import PricingPlan +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v2_billing_pricing_plan_version_created_event.py b/stripe/events/_v2_billing_pricing_plan_version_created_event.py index 11dd8a444..efc99cd08 100644 --- a/stripe/events/_v2_billing_pricing_plan_version_created_event.py +++ b/stripe/events/_v2_billing_pricing_plan_version_created_event.py @@ -6,8 +6,8 @@ from stripe._stripe_object import StripeObject from stripe._stripe_response import StripeResponse from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject from stripe.v2.billing._pricing_plan_version import PricingPlanVersion +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, Optional, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v2_billing_rate_card_created_event.py b/stripe/events/_v2_billing_rate_card_created_event.py index 39f72d43b..f76a562c4 100644 --- a/stripe/events/_v2_billing_rate_card_created_event.py +++ b/stripe/events/_v2_billing_rate_card_created_event.py @@ -6,8 +6,8 @@ from stripe._stripe_object import StripeObject from stripe._stripe_response import StripeResponse from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject from stripe.v2.billing._rate_card import RateCard +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, Optional, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v2_billing_rate_card_rate_created_event.py b/stripe/events/_v2_billing_rate_card_rate_created_event.py index c3530bb0a..f0e6cf77d 100644 --- a/stripe/events/_v2_billing_rate_card_rate_created_event.py +++ b/stripe/events/_v2_billing_rate_card_rate_created_event.py @@ -6,8 +6,8 @@ from stripe._stripe_object import StripeObject from stripe._stripe_response import StripeResponse from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject from stripe.v2.billing._rate_card_rate import RateCardRate +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, Optional, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v2_billing_rate_card_subscription_activated_event.py b/stripe/events/_v2_billing_rate_card_subscription_activated_event.py index babce89f0..bff3f846f 100644 --- a/stripe/events/_v2_billing_rate_card_subscription_activated_event.py +++ b/stripe/events/_v2_billing_rate_card_subscription_activated_event.py @@ -3,8 +3,8 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject from stripe.v2.billing._rate_card_subscription import RateCardSubscription +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v2_billing_rate_card_subscription_canceled_event.py b/stripe/events/_v2_billing_rate_card_subscription_canceled_event.py index 54839ac12..6a580d933 100644 --- a/stripe/events/_v2_billing_rate_card_subscription_canceled_event.py +++ b/stripe/events/_v2_billing_rate_card_subscription_canceled_event.py @@ -3,8 +3,8 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject from stripe.v2.billing._rate_card_subscription import RateCardSubscription +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v2_billing_rate_card_subscription_collection_awaiting_customer_action_event.py b/stripe/events/_v2_billing_rate_card_subscription_collection_awaiting_customer_action_event.py index 8875b8086..ac5782fd7 100644 --- a/stripe/events/_v2_billing_rate_card_subscription_collection_awaiting_customer_action_event.py +++ b/stripe/events/_v2_billing_rate_card_subscription_collection_awaiting_customer_action_event.py @@ -3,8 +3,8 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject from stripe.v2.billing._rate_card_subscription import RateCardSubscription +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v2_billing_rate_card_subscription_collection_current_event.py b/stripe/events/_v2_billing_rate_card_subscription_collection_current_event.py index f93262f7f..0ed9cae2d 100644 --- a/stripe/events/_v2_billing_rate_card_subscription_collection_current_event.py +++ b/stripe/events/_v2_billing_rate_card_subscription_collection_current_event.py @@ -3,8 +3,8 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject from stripe.v2.billing._rate_card_subscription import RateCardSubscription +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v2_billing_rate_card_subscription_collection_past_due_event.py b/stripe/events/_v2_billing_rate_card_subscription_collection_past_due_event.py index b2b13ea01..062c975ad 100644 --- a/stripe/events/_v2_billing_rate_card_subscription_collection_past_due_event.py +++ b/stripe/events/_v2_billing_rate_card_subscription_collection_past_due_event.py @@ -3,8 +3,8 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject from stripe.v2.billing._rate_card_subscription import RateCardSubscription +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v2_billing_rate_card_subscription_collection_paused_event.py b/stripe/events/_v2_billing_rate_card_subscription_collection_paused_event.py index c7e320c51..79400caa1 100644 --- a/stripe/events/_v2_billing_rate_card_subscription_collection_paused_event.py +++ b/stripe/events/_v2_billing_rate_card_subscription_collection_paused_event.py @@ -3,8 +3,8 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject from stripe.v2.billing._rate_card_subscription import RateCardSubscription +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v2_billing_rate_card_subscription_collection_unpaid_event.py b/stripe/events/_v2_billing_rate_card_subscription_collection_unpaid_event.py index 93c659d9b..a9fee3494 100644 --- a/stripe/events/_v2_billing_rate_card_subscription_collection_unpaid_event.py +++ b/stripe/events/_v2_billing_rate_card_subscription_collection_unpaid_event.py @@ -3,8 +3,8 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject from stripe.v2.billing._rate_card_subscription import RateCardSubscription +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v2_billing_rate_card_subscription_servicing_activated_event.py b/stripe/events/_v2_billing_rate_card_subscription_servicing_activated_event.py index 702e16916..dcc5fb081 100644 --- a/stripe/events/_v2_billing_rate_card_subscription_servicing_activated_event.py +++ b/stripe/events/_v2_billing_rate_card_subscription_servicing_activated_event.py @@ -3,8 +3,8 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject from stripe.v2.billing._rate_card_subscription import RateCardSubscription +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v2_billing_rate_card_subscription_servicing_canceled_event.py b/stripe/events/_v2_billing_rate_card_subscription_servicing_canceled_event.py index 7b96fef45..035db8ec1 100644 --- a/stripe/events/_v2_billing_rate_card_subscription_servicing_canceled_event.py +++ b/stripe/events/_v2_billing_rate_card_subscription_servicing_canceled_event.py @@ -3,8 +3,8 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject from stripe.v2.billing._rate_card_subscription import RateCardSubscription +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v2_billing_rate_card_subscription_servicing_paused_event.py b/stripe/events/_v2_billing_rate_card_subscription_servicing_paused_event.py index 3b039a5ec..2220c3ca0 100644 --- a/stripe/events/_v2_billing_rate_card_subscription_servicing_paused_event.py +++ b/stripe/events/_v2_billing_rate_card_subscription_servicing_paused_event.py @@ -3,8 +3,8 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject from stripe.v2.billing._rate_card_subscription import RateCardSubscription +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v2_billing_rate_card_updated_event.py b/stripe/events/_v2_billing_rate_card_updated_event.py index 24834ac63..59ff71dd7 100644 --- a/stripe/events/_v2_billing_rate_card_updated_event.py +++ b/stripe/events/_v2_billing_rate_card_updated_event.py @@ -3,8 +3,8 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject from stripe.v2.billing._rate_card import RateCard +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v2_billing_rate_card_version_created_event.py b/stripe/events/_v2_billing_rate_card_version_created_event.py index 8c1c28ac8..48146a87c 100644 --- a/stripe/events/_v2_billing_rate_card_version_created_event.py +++ b/stripe/events/_v2_billing_rate_card_version_created_event.py @@ -6,8 +6,8 @@ from stripe._stripe_object import StripeObject from stripe._stripe_response import StripeResponse from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject from stripe.v2.billing._rate_card_version import RateCardVersion +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, Optional, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v2_core_account_closed_event.py b/stripe/events/_v2_core_account_closed_event.py index 13ddadf6c..734f4f3cf 100644 --- a/stripe/events/_v2_core_account_closed_event.py +++ b/stripe/events/_v2_core_account_closed_event.py @@ -3,8 +3,8 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject from stripe.v2.core._account import Account +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v2_core_account_created_event.py b/stripe/events/_v2_core_account_created_event.py index 80d1f9d08..ab2b67a39 100644 --- a/stripe/events/_v2_core_account_created_event.py +++ b/stripe/events/_v2_core_account_created_event.py @@ -3,8 +3,8 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject from stripe.v2.core._account import Account +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v2_core_account_including_configuration_customer_capability_status_updated_event.py b/stripe/events/_v2_core_account_including_configuration_customer_capability_status_updated_event.py index fd7208ad3..504bb17fb 100644 --- a/stripe/events/_v2_core_account_including_configuration_customer_capability_status_updated_event.py +++ b/stripe/events/_v2_core_account_including_configuration_customer_capability_status_updated_event.py @@ -6,8 +6,8 @@ from stripe._stripe_object import StripeObject from stripe._stripe_response import StripeResponse from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject from stripe.v2.core._account import Account +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, Optional, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v2_core_account_including_configuration_customer_updated_event.py b/stripe/events/_v2_core_account_including_configuration_customer_updated_event.py index e5a3e0194..a6353960a 100644 --- a/stripe/events/_v2_core_account_including_configuration_customer_updated_event.py +++ b/stripe/events/_v2_core_account_including_configuration_customer_updated_event.py @@ -3,8 +3,8 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject from stripe.v2.core._account import Account +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v2_core_account_including_configuration_merchant_capability_status_updated_event.py b/stripe/events/_v2_core_account_including_configuration_merchant_capability_status_updated_event.py index 9f7a35704..f39d42778 100644 --- a/stripe/events/_v2_core_account_including_configuration_merchant_capability_status_updated_event.py +++ b/stripe/events/_v2_core_account_including_configuration_merchant_capability_status_updated_event.py @@ -6,8 +6,8 @@ from stripe._stripe_object import StripeObject from stripe._stripe_response import StripeResponse from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject from stripe.v2.core._account import Account +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, Optional, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v2_core_account_including_configuration_merchant_updated_event.py b/stripe/events/_v2_core_account_including_configuration_merchant_updated_event.py index c8e9f60a4..1e2641d8c 100644 --- a/stripe/events/_v2_core_account_including_configuration_merchant_updated_event.py +++ b/stripe/events/_v2_core_account_including_configuration_merchant_updated_event.py @@ -3,8 +3,8 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject from stripe.v2.core._account import Account +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v2_core_account_including_configuration_recipient_capability_status_updated_event.py b/stripe/events/_v2_core_account_including_configuration_recipient_capability_status_updated_event.py index 60ef695d8..6708ae005 100644 --- a/stripe/events/_v2_core_account_including_configuration_recipient_capability_status_updated_event.py +++ b/stripe/events/_v2_core_account_including_configuration_recipient_capability_status_updated_event.py @@ -6,8 +6,8 @@ from stripe._stripe_object import StripeObject from stripe._stripe_response import StripeResponse from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject from stripe.v2.core._account import Account +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, Optional, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v2_core_account_including_configuration_recipient_updated_event.py b/stripe/events/_v2_core_account_including_configuration_recipient_updated_event.py index a31a1cec4..a5a46d5f5 100644 --- a/stripe/events/_v2_core_account_including_configuration_recipient_updated_event.py +++ b/stripe/events/_v2_core_account_including_configuration_recipient_updated_event.py @@ -3,8 +3,8 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject from stripe.v2.core._account import Account +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v2_core_account_including_configuration_storer_capability_status_updated_event.py b/stripe/events/_v2_core_account_including_configuration_storer_capability_status_updated_event.py index a52868238..d6b1ca0a2 100644 --- a/stripe/events/_v2_core_account_including_configuration_storer_capability_status_updated_event.py +++ b/stripe/events/_v2_core_account_including_configuration_storer_capability_status_updated_event.py @@ -6,8 +6,8 @@ from stripe._stripe_object import StripeObject from stripe._stripe_response import StripeResponse from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject from stripe.v2.core._account import Account +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, Optional, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v2_core_account_including_configuration_storer_updated_event.py b/stripe/events/_v2_core_account_including_configuration_storer_updated_event.py index 877b93622..b17bd33e2 100644 --- a/stripe/events/_v2_core_account_including_configuration_storer_updated_event.py +++ b/stripe/events/_v2_core_account_including_configuration_storer_updated_event.py @@ -3,8 +3,8 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject from stripe.v2.core._account import Account +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v2_core_account_including_defaults_updated_event.py b/stripe/events/_v2_core_account_including_defaults_updated_event.py index 0531ed144..dec4beed3 100644 --- a/stripe/events/_v2_core_account_including_defaults_updated_event.py +++ b/stripe/events/_v2_core_account_including_defaults_updated_event.py @@ -3,8 +3,8 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject from stripe.v2.core._account import Account +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v2_core_account_including_identity_updated_event.py b/stripe/events/_v2_core_account_including_identity_updated_event.py index fb45062fd..7c2d04f4f 100644 --- a/stripe/events/_v2_core_account_including_identity_updated_event.py +++ b/stripe/events/_v2_core_account_including_identity_updated_event.py @@ -3,8 +3,8 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject from stripe.v2.core._account import Account +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v2_core_account_including_requirements_updated_event.py b/stripe/events/_v2_core_account_including_requirements_updated_event.py index c65216b56..41adaa761 100644 --- a/stripe/events/_v2_core_account_including_requirements_updated_event.py +++ b/stripe/events/_v2_core_account_including_requirements_updated_event.py @@ -3,8 +3,8 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject from stripe.v2.core._account import Account +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v2_core_account_link_returned_event.py b/stripe/events/_v2_core_account_link_returned_event.py index 1cdca99c5..434d340d2 100644 --- a/stripe/events/_v2_core_account_link_returned_event.py +++ b/stripe/events/_v2_core_account_link_returned_event.py @@ -4,7 +4,7 @@ from stripe._api_requestor import _APIRequestor from stripe._stripe_object import StripeObject from stripe._stripe_response import StripeResponse -from stripe.v2._event import Event, EventNotification +from stripe.v2.core._event import Event, EventNotification from typing import Any, Dict, List, Optional, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v2_core_account_person_created_event.py b/stripe/events/_v2_core_account_person_created_event.py index 13422488b..bfb04d752 100644 --- a/stripe/events/_v2_core_account_person_created_event.py +++ b/stripe/events/_v2_core_account_person_created_event.py @@ -6,8 +6,8 @@ from stripe._stripe_object import StripeObject from stripe._stripe_response import StripeResponse from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject from stripe.v2.core._account_person import AccountPerson +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, Optional, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v2_core_account_person_deleted_event.py b/stripe/events/_v2_core_account_person_deleted_event.py index f3bcd9de5..a9790ed93 100644 --- a/stripe/events/_v2_core_account_person_deleted_event.py +++ b/stripe/events/_v2_core_account_person_deleted_event.py @@ -6,8 +6,8 @@ from stripe._stripe_object import StripeObject from stripe._stripe_response import StripeResponse from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject from stripe.v2.core._account_person import AccountPerson +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, Optional, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v2_core_account_person_updated_event.py b/stripe/events/_v2_core_account_person_updated_event.py index 06abdecae..495f3282e 100644 --- a/stripe/events/_v2_core_account_person_updated_event.py +++ b/stripe/events/_v2_core_account_person_updated_event.py @@ -6,8 +6,8 @@ from stripe._stripe_object import StripeObject from stripe._stripe_response import StripeResponse from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject from stripe.v2.core._account_person import AccountPerson +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, Optional, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v2_core_account_updated_event.py b/stripe/events/_v2_core_account_updated_event.py index fc418f90d..c06fac50c 100644 --- a/stripe/events/_v2_core_account_updated_event.py +++ b/stripe/events/_v2_core_account_updated_event.py @@ -3,8 +3,8 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject from stripe.v2.core._account import Account +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v2_core_claimable_sandbox_claimed_event.py b/stripe/events/_v2_core_claimable_sandbox_claimed_event.py index 164134941..1c7ad3d31 100644 --- a/stripe/events/_v2_core_claimable_sandbox_claimed_event.py +++ b/stripe/events/_v2_core_claimable_sandbox_claimed_event.py @@ -3,8 +3,8 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject from stripe.v2.core._claimable_sandbox import ClaimableSandbox +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v2_core_claimable_sandbox_created_event.py b/stripe/events/_v2_core_claimable_sandbox_created_event.py index 7f6874819..eadfd22ef 100644 --- a/stripe/events/_v2_core_claimable_sandbox_created_event.py +++ b/stripe/events/_v2_core_claimable_sandbox_created_event.py @@ -3,8 +3,8 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject from stripe.v2.core._claimable_sandbox import ClaimableSandbox +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v2_core_claimable_sandbox_expired_event.py b/stripe/events/_v2_core_claimable_sandbox_expired_event.py index 04497dde8..0295a22bc 100644 --- a/stripe/events/_v2_core_claimable_sandbox_expired_event.py +++ b/stripe/events/_v2_core_claimable_sandbox_expired_event.py @@ -3,8 +3,8 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject from stripe.v2.core._claimable_sandbox import ClaimableSandbox +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v2_core_claimable_sandbox_expiring_event.py b/stripe/events/_v2_core_claimable_sandbox_expiring_event.py index 4c9351baa..69a66382a 100644 --- a/stripe/events/_v2_core_claimable_sandbox_expiring_event.py +++ b/stripe/events/_v2_core_claimable_sandbox_expiring_event.py @@ -3,8 +3,8 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject from stripe.v2.core._claimable_sandbox import ClaimableSandbox +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v2_core_claimable_sandbox_sandbox_details_owner_account_updated_event.py b/stripe/events/_v2_core_claimable_sandbox_sandbox_details_owner_account_updated_event.py index d40a31af8..a264022f6 100644 --- a/stripe/events/_v2_core_claimable_sandbox_sandbox_details_owner_account_updated_event.py +++ b/stripe/events/_v2_core_claimable_sandbox_sandbox_details_owner_account_updated_event.py @@ -3,8 +3,8 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject from stripe.v2.core._claimable_sandbox import ClaimableSandbox +from stripe.v2.core._event import Event, EventNotification, RelatedObject from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v2_core_event_destination_ping_event.py b/stripe/events/_v2_core_event_destination_ping_event.py index 343e30adc..06562051a 100644 --- a/stripe/events/_v2_core_event_destination_ping_event.py +++ b/stripe/events/_v2_core_event_destination_ping_event.py @@ -3,8 +3,8 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject -from stripe.v2._event_destination import EventDestination +from stripe.v2.core._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event_destination import EventDestination from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v2_core_health_api_error_firing_event.py b/stripe/events/_v2_core_health_api_error_firing_event.py index 1c575068e..7e1078839 100644 --- a/stripe/events/_v2_core_health_api_error_firing_event.py +++ b/stripe/events/_v2_core_health_api_error_firing_event.py @@ -4,7 +4,7 @@ from stripe._api_requestor import _APIRequestor from stripe._stripe_object import StripeObject from stripe._stripe_response import StripeResponse -from stripe.v2._event import Event, EventNotification +from stripe.v2.core._event import Event, EventNotification from typing import Any, Dict, Optional, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v2_core_health_api_error_resolved_event.py b/stripe/events/_v2_core_health_api_error_resolved_event.py index 5053bc351..6dafdca3c 100644 --- a/stripe/events/_v2_core_health_api_error_resolved_event.py +++ b/stripe/events/_v2_core_health_api_error_resolved_event.py @@ -4,7 +4,7 @@ from stripe._api_requestor import _APIRequestor from stripe._stripe_object import StripeObject from stripe._stripe_response import StripeResponse -from stripe.v2._event import Event, EventNotification +from stripe.v2.core._event import Event, EventNotification from typing import Any, Dict, Optional, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v2_core_health_api_latency_firing_event.py b/stripe/events/_v2_core_health_api_latency_firing_event.py index 6dc7ec077..69b2717ef 100644 --- a/stripe/events/_v2_core_health_api_latency_firing_event.py +++ b/stripe/events/_v2_core_health_api_latency_firing_event.py @@ -4,7 +4,7 @@ from stripe._api_requestor import _APIRequestor from stripe._stripe_object import StripeObject from stripe._stripe_response import StripeResponse -from stripe.v2._event import Event, EventNotification +from stripe.v2.core._event import Event, EventNotification from typing import Any, Dict, Optional, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v2_core_health_api_latency_resolved_event.py b/stripe/events/_v2_core_health_api_latency_resolved_event.py index 9e259ae87..138434de7 100644 --- a/stripe/events/_v2_core_health_api_latency_resolved_event.py +++ b/stripe/events/_v2_core_health_api_latency_resolved_event.py @@ -4,7 +4,7 @@ from stripe._api_requestor import _APIRequestor from stripe._stripe_object import StripeObject from stripe._stripe_response import StripeResponse -from stripe.v2._event import Event, EventNotification +from stripe.v2.core._event import Event, EventNotification from typing import Any, Dict, Optional, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v2_core_health_authorization_rate_drop_firing_event.py b/stripe/events/_v2_core_health_authorization_rate_drop_firing_event.py index 6531e245e..f7d51a565 100644 --- a/stripe/events/_v2_core_health_authorization_rate_drop_firing_event.py +++ b/stripe/events/_v2_core_health_authorization_rate_drop_firing_event.py @@ -4,7 +4,7 @@ from stripe._api_requestor import _APIRequestor from stripe._stripe_object import StripeObject from stripe._stripe_response import StripeResponse -from stripe.v2._event import Event, EventNotification +from stripe.v2.core._event import Event, EventNotification from typing import Any, Dict, List, Optional, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v2_core_health_authorization_rate_drop_resolved_event.py b/stripe/events/_v2_core_health_authorization_rate_drop_resolved_event.py index b39be65e5..726e346ee 100644 --- a/stripe/events/_v2_core_health_authorization_rate_drop_resolved_event.py +++ b/stripe/events/_v2_core_health_authorization_rate_drop_resolved_event.py @@ -4,7 +4,7 @@ from stripe._api_requestor import _APIRequestor from stripe._stripe_object import StripeObject from stripe._stripe_response import StripeResponse -from stripe.v2._event import Event, EventNotification +from stripe.v2.core._event import Event, EventNotification from typing import Any, Dict, List, Optional, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v2_core_health_event_generation_failure_resolved_event.py b/stripe/events/_v2_core_health_event_generation_failure_resolved_event.py index be6dd8dee..cf80c042d 100644 --- a/stripe/events/_v2_core_health_event_generation_failure_resolved_event.py +++ b/stripe/events/_v2_core_health_event_generation_failure_resolved_event.py @@ -4,7 +4,7 @@ from stripe._api_requestor import _APIRequestor from stripe._stripe_object import StripeObject from stripe._stripe_response import StripeResponse -from stripe.v2._event import Event, EventNotification +from stripe.v2.core._event import Event, EventNotification from typing import Any, Dict, Optional, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v2_core_health_fraud_rate_increased_event.py b/stripe/events/_v2_core_health_fraud_rate_increased_event.py index b12a80761..8fc706f5a 100644 --- a/stripe/events/_v2_core_health_fraud_rate_increased_event.py +++ b/stripe/events/_v2_core_health_fraud_rate_increased_event.py @@ -5,7 +5,7 @@ from stripe._stripe_object import StripeObject from stripe._stripe_response import StripeResponse from stripe.v2._amount import Amount -from stripe.v2._event import Event, EventNotification +from stripe.v2.core._event import Event, EventNotification from typing import Any, Dict, Optional, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v2_core_health_issuing_authorization_request_errors_firing_event.py b/stripe/events/_v2_core_health_issuing_authorization_request_errors_firing_event.py index 08746268b..bf369937e 100644 --- a/stripe/events/_v2_core_health_issuing_authorization_request_errors_firing_event.py +++ b/stripe/events/_v2_core_health_issuing_authorization_request_errors_firing_event.py @@ -5,7 +5,7 @@ from stripe._stripe_object import StripeObject from stripe._stripe_response import StripeResponse from stripe.v2._amount import Amount -from stripe.v2._event import Event, EventNotification +from stripe.v2.core._event import Event, EventNotification from typing import Any, Dict, Optional, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v2_core_health_issuing_authorization_request_errors_resolved_event.py b/stripe/events/_v2_core_health_issuing_authorization_request_errors_resolved_event.py index 55b1d8f0e..cd245c8d4 100644 --- a/stripe/events/_v2_core_health_issuing_authorization_request_errors_resolved_event.py +++ b/stripe/events/_v2_core_health_issuing_authorization_request_errors_resolved_event.py @@ -5,7 +5,7 @@ from stripe._stripe_object import StripeObject from stripe._stripe_response import StripeResponse from stripe.v2._amount import Amount -from stripe.v2._event import Event, EventNotification +from stripe.v2.core._event import Event, EventNotification from typing import Any, Dict, Optional, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v2_core_health_issuing_authorization_request_timeout_firing_event.py b/stripe/events/_v2_core_health_issuing_authorization_request_timeout_firing_event.py index 5d268ce24..ba8c59e6d 100644 --- a/stripe/events/_v2_core_health_issuing_authorization_request_timeout_firing_event.py +++ b/stripe/events/_v2_core_health_issuing_authorization_request_timeout_firing_event.py @@ -5,7 +5,7 @@ from stripe._stripe_object import StripeObject from stripe._stripe_response import StripeResponse from stripe.v2._amount import Amount -from stripe.v2._event import Event, EventNotification +from stripe.v2.core._event import Event, EventNotification from typing import Any, Dict, Optional, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v2_core_health_issuing_authorization_request_timeout_resolved_event.py b/stripe/events/_v2_core_health_issuing_authorization_request_timeout_resolved_event.py index fbe500c3d..a7f28f0e9 100644 --- a/stripe/events/_v2_core_health_issuing_authorization_request_timeout_resolved_event.py +++ b/stripe/events/_v2_core_health_issuing_authorization_request_timeout_resolved_event.py @@ -5,7 +5,7 @@ from stripe._stripe_object import StripeObject from stripe._stripe_response import StripeResponse from stripe.v2._amount import Amount -from stripe.v2._event import Event, EventNotification +from stripe.v2.core._event import Event, EventNotification from typing import Any, Dict, Optional, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v2_core_health_payment_method_error_firing_event.py b/stripe/events/_v2_core_health_payment_method_error_firing_event.py index 5f786bc4c..fddd0a14b 100644 --- a/stripe/events/_v2_core_health_payment_method_error_firing_event.py +++ b/stripe/events/_v2_core_health_payment_method_error_firing_event.py @@ -4,7 +4,7 @@ from stripe._api_requestor import _APIRequestor from stripe._stripe_object import StripeObject from stripe._stripe_response import StripeResponse -from stripe.v2._event import Event, EventNotification +from stripe.v2.core._event import Event, EventNotification from typing import Any, Dict, Optional, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v2_core_health_payment_method_error_resolved_event.py b/stripe/events/_v2_core_health_payment_method_error_resolved_event.py index f0b48e99a..4412ef0a4 100644 --- a/stripe/events/_v2_core_health_payment_method_error_resolved_event.py +++ b/stripe/events/_v2_core_health_payment_method_error_resolved_event.py @@ -4,7 +4,7 @@ from stripe._api_requestor import _APIRequestor from stripe._stripe_object import StripeObject from stripe._stripe_response import StripeResponse -from stripe.v2._event import Event, EventNotification +from stripe.v2.core._event import Event, EventNotification from typing import Any, Dict, Optional, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v2_core_health_traffic_volume_drop_firing_event.py b/stripe/events/_v2_core_health_traffic_volume_drop_firing_event.py index 1d45894da..1fced84a5 100644 --- a/stripe/events/_v2_core_health_traffic_volume_drop_firing_event.py +++ b/stripe/events/_v2_core_health_traffic_volume_drop_firing_event.py @@ -4,7 +4,7 @@ from stripe._api_requestor import _APIRequestor from stripe._stripe_object import StripeObject from stripe._stripe_response import StripeResponse -from stripe.v2._event import Event, EventNotification +from stripe.v2.core._event import Event, EventNotification from typing import Any, Dict, Optional, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v2_core_health_traffic_volume_drop_resolved_event.py b/stripe/events/_v2_core_health_traffic_volume_drop_resolved_event.py index 13d7d20a5..0c89d5332 100644 --- a/stripe/events/_v2_core_health_traffic_volume_drop_resolved_event.py +++ b/stripe/events/_v2_core_health_traffic_volume_drop_resolved_event.py @@ -4,7 +4,7 @@ from stripe._api_requestor import _APIRequestor from stripe._stripe_object import StripeObject from stripe._stripe_response import StripeResponse -from stripe.v2._event import Event, EventNotification +from stripe.v2.core._event import Event, EventNotification from typing import Any, Dict, Optional, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v2_core_health_webhook_latency_firing_event.py b/stripe/events/_v2_core_health_webhook_latency_firing_event.py index 5eecdc9df..1b067c511 100644 --- a/stripe/events/_v2_core_health_webhook_latency_firing_event.py +++ b/stripe/events/_v2_core_health_webhook_latency_firing_event.py @@ -4,7 +4,7 @@ from stripe._api_requestor import _APIRequestor from stripe._stripe_object import StripeObject from stripe._stripe_response import StripeResponse -from stripe.v2._event import Event, EventNotification +from stripe.v2.core._event import Event, EventNotification from typing import Any, Dict, Optional, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v2_core_health_webhook_latency_resolved_event.py b/stripe/events/_v2_core_health_webhook_latency_resolved_event.py index 9e1c4e459..9c988d27b 100644 --- a/stripe/events/_v2_core_health_webhook_latency_resolved_event.py +++ b/stripe/events/_v2_core_health_webhook_latency_resolved_event.py @@ -4,7 +4,7 @@ from stripe._api_requestor import _APIRequestor from stripe._stripe_object import StripeObject from stripe._stripe_response import StripeResponse -from stripe.v2._event import Event, EventNotification +from stripe.v2.core._event import Event, EventNotification from typing import Any, Dict, Optional, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v2_money_management_adjustment_created_event.py b/stripe/events/_v2_money_management_adjustment_created_event.py index 1f10e6b39..52e54fe25 100644 --- a/stripe/events/_v2_money_management_adjustment_created_event.py +++ b/stripe/events/_v2_money_management_adjustment_created_event.py @@ -3,7 +3,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from stripe.v2.money_management._adjustment import Adjustment from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v2_money_management_financial_account_created_event.py b/stripe/events/_v2_money_management_financial_account_created_event.py index 75b12df16..d46973893 100644 --- a/stripe/events/_v2_money_management_financial_account_created_event.py +++ b/stripe/events/_v2_money_management_financial_account_created_event.py @@ -3,7 +3,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from stripe.v2.money_management._financial_account import FinancialAccount from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v2_money_management_financial_account_updated_event.py b/stripe/events/_v2_money_management_financial_account_updated_event.py index 068cde165..1d84c78e9 100644 --- a/stripe/events/_v2_money_management_financial_account_updated_event.py +++ b/stripe/events/_v2_money_management_financial_account_updated_event.py @@ -3,7 +3,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from stripe.v2.money_management._financial_account import FinancialAccount from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v2_money_management_financial_address_activated_event.py b/stripe/events/_v2_money_management_financial_address_activated_event.py index 7b5d84b55..d2dcf12d9 100644 --- a/stripe/events/_v2_money_management_financial_address_activated_event.py +++ b/stripe/events/_v2_money_management_financial_address_activated_event.py @@ -3,7 +3,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from stripe.v2.money_management._financial_address import FinancialAddress from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v2_money_management_financial_address_failed_event.py b/stripe/events/_v2_money_management_financial_address_failed_event.py index 2a7d2793f..64e2f4426 100644 --- a/stripe/events/_v2_money_management_financial_address_failed_event.py +++ b/stripe/events/_v2_money_management_financial_address_failed_event.py @@ -3,7 +3,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from stripe.v2.money_management._financial_address import FinancialAddress from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v2_money_management_inbound_transfer_available_event.py b/stripe/events/_v2_money_management_inbound_transfer_available_event.py index 4f1a9dbc4..fe5f50c37 100644 --- a/stripe/events/_v2_money_management_inbound_transfer_available_event.py +++ b/stripe/events/_v2_money_management_inbound_transfer_available_event.py @@ -6,7 +6,7 @@ from stripe._stripe_object import StripeObject from stripe._stripe_response import StripeResponse from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from stripe.v2.money_management._inbound_transfer import InboundTransfer from typing import Any, Dict, Optional, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v2_money_management_inbound_transfer_bank_debit_failed_event.py b/stripe/events/_v2_money_management_inbound_transfer_bank_debit_failed_event.py index f9d0e6a7a..13d015fb0 100644 --- a/stripe/events/_v2_money_management_inbound_transfer_bank_debit_failed_event.py +++ b/stripe/events/_v2_money_management_inbound_transfer_bank_debit_failed_event.py @@ -3,7 +3,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from stripe.v2.money_management._inbound_transfer import InboundTransfer from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v2_money_management_inbound_transfer_bank_debit_processing_event.py b/stripe/events/_v2_money_management_inbound_transfer_bank_debit_processing_event.py index bd8389dd8..9057fdcba 100644 --- a/stripe/events/_v2_money_management_inbound_transfer_bank_debit_processing_event.py +++ b/stripe/events/_v2_money_management_inbound_transfer_bank_debit_processing_event.py @@ -3,7 +3,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from stripe.v2.money_management._inbound_transfer import InboundTransfer from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v2_money_management_inbound_transfer_bank_debit_queued_event.py b/stripe/events/_v2_money_management_inbound_transfer_bank_debit_queued_event.py index a57bcacb0..2428d12f0 100644 --- a/stripe/events/_v2_money_management_inbound_transfer_bank_debit_queued_event.py +++ b/stripe/events/_v2_money_management_inbound_transfer_bank_debit_queued_event.py @@ -3,7 +3,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from stripe.v2.money_management._inbound_transfer import InboundTransfer from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v2_money_management_inbound_transfer_bank_debit_returned_event.py b/stripe/events/_v2_money_management_inbound_transfer_bank_debit_returned_event.py index 74743e1f0..caddb6aff 100644 --- a/stripe/events/_v2_money_management_inbound_transfer_bank_debit_returned_event.py +++ b/stripe/events/_v2_money_management_inbound_transfer_bank_debit_returned_event.py @@ -3,7 +3,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from stripe.v2.money_management._inbound_transfer import InboundTransfer from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v2_money_management_inbound_transfer_bank_debit_succeeded_event.py b/stripe/events/_v2_money_management_inbound_transfer_bank_debit_succeeded_event.py index 782698b20..c1af88e4d 100644 --- a/stripe/events/_v2_money_management_inbound_transfer_bank_debit_succeeded_event.py +++ b/stripe/events/_v2_money_management_inbound_transfer_bank_debit_succeeded_event.py @@ -3,7 +3,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from stripe.v2.money_management._inbound_transfer import InboundTransfer from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v2_money_management_outbound_payment_canceled_event.py b/stripe/events/_v2_money_management_outbound_payment_canceled_event.py index dffd90e1b..0e7402f80 100644 --- a/stripe/events/_v2_money_management_outbound_payment_canceled_event.py +++ b/stripe/events/_v2_money_management_outbound_payment_canceled_event.py @@ -3,7 +3,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from stripe.v2.money_management._outbound_payment import OutboundPayment from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v2_money_management_outbound_payment_created_event.py b/stripe/events/_v2_money_management_outbound_payment_created_event.py index 71aecc202..679650b65 100644 --- a/stripe/events/_v2_money_management_outbound_payment_created_event.py +++ b/stripe/events/_v2_money_management_outbound_payment_created_event.py @@ -3,7 +3,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from stripe.v2.money_management._outbound_payment import OutboundPayment from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v2_money_management_outbound_payment_failed_event.py b/stripe/events/_v2_money_management_outbound_payment_failed_event.py index 4f70ec7e2..8a9a4371c 100644 --- a/stripe/events/_v2_money_management_outbound_payment_failed_event.py +++ b/stripe/events/_v2_money_management_outbound_payment_failed_event.py @@ -3,7 +3,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from stripe.v2.money_management._outbound_payment import OutboundPayment from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v2_money_management_outbound_payment_posted_event.py b/stripe/events/_v2_money_management_outbound_payment_posted_event.py index cbaa42023..ba37fa8fb 100644 --- a/stripe/events/_v2_money_management_outbound_payment_posted_event.py +++ b/stripe/events/_v2_money_management_outbound_payment_posted_event.py @@ -3,7 +3,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from stripe.v2.money_management._outbound_payment import OutboundPayment from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v2_money_management_outbound_payment_returned_event.py b/stripe/events/_v2_money_management_outbound_payment_returned_event.py index 94032fce8..4878e64aa 100644 --- a/stripe/events/_v2_money_management_outbound_payment_returned_event.py +++ b/stripe/events/_v2_money_management_outbound_payment_returned_event.py @@ -3,7 +3,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from stripe.v2.money_management._outbound_payment import OutboundPayment from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v2_money_management_outbound_payment_updated_event.py b/stripe/events/_v2_money_management_outbound_payment_updated_event.py index 281af11d8..00c199d4b 100644 --- a/stripe/events/_v2_money_management_outbound_payment_updated_event.py +++ b/stripe/events/_v2_money_management_outbound_payment_updated_event.py @@ -3,7 +3,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from stripe.v2.money_management._outbound_payment import OutboundPayment from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v2_money_management_outbound_transfer_canceled_event.py b/stripe/events/_v2_money_management_outbound_transfer_canceled_event.py index 510262078..de514549a 100644 --- a/stripe/events/_v2_money_management_outbound_transfer_canceled_event.py +++ b/stripe/events/_v2_money_management_outbound_transfer_canceled_event.py @@ -3,7 +3,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from stripe.v2.money_management._outbound_transfer import OutboundTransfer from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v2_money_management_outbound_transfer_created_event.py b/stripe/events/_v2_money_management_outbound_transfer_created_event.py index 6fc74d51e..07a179e6a 100644 --- a/stripe/events/_v2_money_management_outbound_transfer_created_event.py +++ b/stripe/events/_v2_money_management_outbound_transfer_created_event.py @@ -3,7 +3,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from stripe.v2.money_management._outbound_transfer import OutboundTransfer from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v2_money_management_outbound_transfer_failed_event.py b/stripe/events/_v2_money_management_outbound_transfer_failed_event.py index fa3efb2ae..fec681664 100644 --- a/stripe/events/_v2_money_management_outbound_transfer_failed_event.py +++ b/stripe/events/_v2_money_management_outbound_transfer_failed_event.py @@ -3,7 +3,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from stripe.v2.money_management._outbound_transfer import OutboundTransfer from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v2_money_management_outbound_transfer_posted_event.py b/stripe/events/_v2_money_management_outbound_transfer_posted_event.py index 56e288eb5..c80ae705b 100644 --- a/stripe/events/_v2_money_management_outbound_transfer_posted_event.py +++ b/stripe/events/_v2_money_management_outbound_transfer_posted_event.py @@ -3,7 +3,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from stripe.v2.money_management._outbound_transfer import OutboundTransfer from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v2_money_management_outbound_transfer_returned_event.py b/stripe/events/_v2_money_management_outbound_transfer_returned_event.py index 25ba32b25..b6b133a42 100644 --- a/stripe/events/_v2_money_management_outbound_transfer_returned_event.py +++ b/stripe/events/_v2_money_management_outbound_transfer_returned_event.py @@ -3,7 +3,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from stripe.v2.money_management._outbound_transfer import OutboundTransfer from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v2_money_management_outbound_transfer_updated_event.py b/stripe/events/_v2_money_management_outbound_transfer_updated_event.py index 90f64487e..a549bcf4f 100644 --- a/stripe/events/_v2_money_management_outbound_transfer_updated_event.py +++ b/stripe/events/_v2_money_management_outbound_transfer_updated_event.py @@ -3,7 +3,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from stripe.v2.money_management._outbound_transfer import OutboundTransfer from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v2_money_management_payout_method_updated_event.py b/stripe/events/_v2_money_management_payout_method_updated_event.py index 4b1a9de8e..3bfceed36 100644 --- a/stripe/events/_v2_money_management_payout_method_updated_event.py +++ b/stripe/events/_v2_money_management_payout_method_updated_event.py @@ -3,7 +3,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from stripe.v2.money_management._payout_method import PayoutMethod from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v2_money_management_received_credit_available_event.py b/stripe/events/_v2_money_management_received_credit_available_event.py index 95b1d34a5..53d21fa94 100644 --- a/stripe/events/_v2_money_management_received_credit_available_event.py +++ b/stripe/events/_v2_money_management_received_credit_available_event.py @@ -6,7 +6,7 @@ from stripe._stripe_object import StripeObject from stripe._stripe_response import StripeResponse from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from stripe.v2.money_management._received_credit import ReceivedCredit from typing import Any, Dict, Optional, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v2_money_management_received_credit_failed_event.py b/stripe/events/_v2_money_management_received_credit_failed_event.py index b42425d39..c9e8bf39e 100644 --- a/stripe/events/_v2_money_management_received_credit_failed_event.py +++ b/stripe/events/_v2_money_management_received_credit_failed_event.py @@ -3,7 +3,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from stripe.v2.money_management._received_credit import ReceivedCredit from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v2_money_management_received_credit_returned_event.py b/stripe/events/_v2_money_management_received_credit_returned_event.py index 096cf37eb..2034a96d8 100644 --- a/stripe/events/_v2_money_management_received_credit_returned_event.py +++ b/stripe/events/_v2_money_management_received_credit_returned_event.py @@ -3,7 +3,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from stripe.v2.money_management._received_credit import ReceivedCredit from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v2_money_management_received_credit_succeeded_event.py b/stripe/events/_v2_money_management_received_credit_succeeded_event.py index 462e0a72d..4d82f3b0b 100644 --- a/stripe/events/_v2_money_management_received_credit_succeeded_event.py +++ b/stripe/events/_v2_money_management_received_credit_succeeded_event.py @@ -3,7 +3,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from stripe.v2.money_management._received_credit import ReceivedCredit from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v2_money_management_received_debit_canceled_event.py b/stripe/events/_v2_money_management_received_debit_canceled_event.py index a8f4f4b6c..181c4f883 100644 --- a/stripe/events/_v2_money_management_received_debit_canceled_event.py +++ b/stripe/events/_v2_money_management_received_debit_canceled_event.py @@ -3,7 +3,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from stripe.v2.money_management._received_debit import ReceivedDebit from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v2_money_management_received_debit_failed_event.py b/stripe/events/_v2_money_management_received_debit_failed_event.py index c4d645286..26cdf8d48 100644 --- a/stripe/events/_v2_money_management_received_debit_failed_event.py +++ b/stripe/events/_v2_money_management_received_debit_failed_event.py @@ -3,7 +3,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from stripe.v2.money_management._received_debit import ReceivedDebit from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v2_money_management_received_debit_pending_event.py b/stripe/events/_v2_money_management_received_debit_pending_event.py index fcd40a3ff..038a4a72d 100644 --- a/stripe/events/_v2_money_management_received_debit_pending_event.py +++ b/stripe/events/_v2_money_management_received_debit_pending_event.py @@ -3,7 +3,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from stripe.v2.money_management._received_debit import ReceivedDebit from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v2_money_management_received_debit_succeeded_event.py b/stripe/events/_v2_money_management_received_debit_succeeded_event.py index 86beaacfb..a046b75e4 100644 --- a/stripe/events/_v2_money_management_received_debit_succeeded_event.py +++ b/stripe/events/_v2_money_management_received_debit_succeeded_event.py @@ -3,7 +3,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from stripe.v2.money_management._received_debit import ReceivedDebit from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v2_money_management_received_debit_updated_event.py b/stripe/events/_v2_money_management_received_debit_updated_event.py index 14efb2a4c..9f22ed15c 100644 --- a/stripe/events/_v2_money_management_received_debit_updated_event.py +++ b/stripe/events/_v2_money_management_received_debit_updated_event.py @@ -3,7 +3,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from stripe.v2.money_management._received_debit import ReceivedDebit from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v2_money_management_recipient_verification_created_event.py b/stripe/events/_v2_money_management_recipient_verification_created_event.py index b26b491b7..95ca9137a 100644 --- a/stripe/events/_v2_money_management_recipient_verification_created_event.py +++ b/stripe/events/_v2_money_management_recipient_verification_created_event.py @@ -3,7 +3,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from stripe.v2.money_management._recipient_verification import ( RecipientVerification, ) diff --git a/stripe/events/_v2_money_management_recipient_verification_updated_event.py b/stripe/events/_v2_money_management_recipient_verification_updated_event.py index a8795cf69..c0f3730f9 100644 --- a/stripe/events/_v2_money_management_recipient_verification_updated_event.py +++ b/stripe/events/_v2_money_management_recipient_verification_updated_event.py @@ -3,7 +3,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from stripe.v2.money_management._recipient_verification import ( RecipientVerification, ) diff --git a/stripe/events/_v2_money_management_transaction_created_event.py b/stripe/events/_v2_money_management_transaction_created_event.py index 438d69c3e..18ee91fe4 100644 --- a/stripe/events/_v2_money_management_transaction_created_event.py +++ b/stripe/events/_v2_money_management_transaction_created_event.py @@ -3,7 +3,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from stripe.v2.money_management._transaction import Transaction from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v2_money_management_transaction_updated_event.py b/stripe/events/_v2_money_management_transaction_updated_event.py index 21c852a62..bb1517285 100644 --- a/stripe/events/_v2_money_management_transaction_updated_event.py +++ b/stripe/events/_v2_money_management_transaction_updated_event.py @@ -3,7 +3,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from stripe.v2.money_management._transaction import Transaction from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v2_payments_off_session_payment_authorization_attempt_failed_event.py b/stripe/events/_v2_payments_off_session_payment_authorization_attempt_failed_event.py index a79d6eddf..a4a2f1842 100644 --- a/stripe/events/_v2_payments_off_session_payment_authorization_attempt_failed_event.py +++ b/stripe/events/_v2_payments_off_session_payment_authorization_attempt_failed_event.py @@ -3,7 +3,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from stripe.v2.payments._off_session_payment import OffSessionPayment from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v2_payments_off_session_payment_authorization_attempt_started_event.py b/stripe/events/_v2_payments_off_session_payment_authorization_attempt_started_event.py index 088b9e01c..4ceeb6bf7 100644 --- a/stripe/events/_v2_payments_off_session_payment_authorization_attempt_started_event.py +++ b/stripe/events/_v2_payments_off_session_payment_authorization_attempt_started_event.py @@ -3,7 +3,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from stripe.v2.payments._off_session_payment import OffSessionPayment from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v2_payments_off_session_payment_canceled_event.py b/stripe/events/_v2_payments_off_session_payment_canceled_event.py index c229e7980..0dca051ea 100644 --- a/stripe/events/_v2_payments_off_session_payment_canceled_event.py +++ b/stripe/events/_v2_payments_off_session_payment_canceled_event.py @@ -3,7 +3,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from stripe.v2.payments._off_session_payment import OffSessionPayment from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v2_payments_off_session_payment_created_event.py b/stripe/events/_v2_payments_off_session_payment_created_event.py index 7a9c7646c..99b12cca7 100644 --- a/stripe/events/_v2_payments_off_session_payment_created_event.py +++ b/stripe/events/_v2_payments_off_session_payment_created_event.py @@ -3,7 +3,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from stripe.v2.payments._off_session_payment import OffSessionPayment from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v2_payments_off_session_payment_failed_event.py b/stripe/events/_v2_payments_off_session_payment_failed_event.py index d9f4e5b23..48136d4ac 100644 --- a/stripe/events/_v2_payments_off_session_payment_failed_event.py +++ b/stripe/events/_v2_payments_off_session_payment_failed_event.py @@ -3,7 +3,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from stripe.v2.payments._off_session_payment import OffSessionPayment from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v2_payments_off_session_payment_requires_capture_event.py b/stripe/events/_v2_payments_off_session_payment_requires_capture_event.py index c05d8abb7..6ae6ecc4d 100644 --- a/stripe/events/_v2_payments_off_session_payment_requires_capture_event.py +++ b/stripe/events/_v2_payments_off_session_payment_requires_capture_event.py @@ -3,7 +3,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from stripe.v2.payments._off_session_payment import OffSessionPayment from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/events/_v2_payments_off_session_payment_succeeded_event.py b/stripe/events/_v2_payments_off_session_payment_succeeded_event.py index 0263e354b..1820a0658 100644 --- a/stripe/events/_v2_payments_off_session_payment_succeeded_event.py +++ b/stripe/events/_v2_payments_off_session_payment_succeeded_event.py @@ -3,7 +3,7 @@ from stripe._stripe_client import StripeClient from stripe._stripe_object import StripeObject from stripe._util import get_api_mode -from stripe.v2._event import Event, EventNotification, RelatedObject +from stripe.v2.core._event import Event, EventNotification, RelatedObject from stripe.v2.payments._off_session_payment import OffSessionPayment from typing import Any, Dict, cast from typing_extensions import Literal, override diff --git a/stripe/financial_connections/_account.py b/stripe/financial_connections/_account.py index 6feb58839..b39a4d758 100644 --- a/stripe/financial_connections/_account.py +++ b/stripe/financial_connections/_account.py @@ -4,17 +4,10 @@ from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource from stripe._nested_resource_class_methods import nested_resource_class_methods -from stripe._request_options import RequestOptions from stripe._stripe_object import StripeObject from stripe._util import class_method_variant, sanitize_id from typing import ClassVar, Dict, List, Optional, cast, overload -from typing_extensions import ( - Literal, - NotRequired, - TypedDict, - Unpack, - TYPE_CHECKING, -) +from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: from stripe._account import Account as AccountResource @@ -27,6 +20,30 @@ AccountOwnership, ) from stripe.financial_connections._institution import Institution + from stripe.params.financial_connections._account_disconnect_params import ( + AccountDisconnectParams, + ) + from stripe.params.financial_connections._account_list_inferred_balances_params import ( + AccountListInferredBalancesParams, + ) + from stripe.params.financial_connections._account_list_owners_params import ( + AccountListOwnersParams, + ) + from stripe.params.financial_connections._account_list_params import ( + AccountListParams, + ) + from stripe.params.financial_connections._account_refresh_account_params import ( + AccountRefreshAccountParams, + ) + from stripe.params.financial_connections._account_retrieve_params import ( + AccountRetrieveParams, + ) + from stripe.params.financial_connections._account_subscribe_params import ( + AccountSubscribeParams, + ) + from stripe.params.financial_connections._account_unsubscribe_params import ( + AccountUnsubscribeParams, + ) @nested_resource_class_methods("inferred_balance") @@ -155,132 +172,6 @@ class TransactionRefresh(StripeObject): The status of the last refresh attempt. """ - class DisconnectParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class ListInferredBalancesParams(RequestOptions): - 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 ListOwnersParams(RequestOptions): - 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. - """ - ownership: str - """ - The ID of the ownership object to fetch owners from. - """ - 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 ListParams(RequestOptions): - account_holder: NotRequired["Account.ListParamsAccountHolder"] - """ - If present, only return accounts that belong to the specified account holder. `account_holder[customer]` and `account_holder[account]` are mutually exclusive. - """ - 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. - """ - session: NotRequired[str] - """ - If present, only return accounts that were collected as part of the given session. - """ - 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 ListParamsAccountHolder(TypedDict): - account: NotRequired[str] - """ - The ID of the Stripe account whose accounts will be retrieved. - """ - customer: NotRequired[str] - """ - The ID of the Stripe customer whose accounts will be retrieved. - """ - customer_account: NotRequired[str] - """ - The Account ID of the Stripe customer whose accounts will be retrieved. - """ - - class RefreshAccountParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - features: List[ - Literal[ - "balance", "inferred_balances", "ownership", "transactions" - ] - ] - """ - The list of account features that you would like to refresh. - """ - - class RetrieveParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class SubscribeParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - features: List[Literal["balance", "inferred_balances", "transactions"]] - """ - The list of account features to which you would like to subscribe. - """ - - class UnsubscribeParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - features: List[Literal["balance", "inferred_balances", "transactions"]] - """ - The list of account features from which you would like to unsubscribe. - """ - account_holder: Optional[AccountHolder] """ The account holder that this account belongs to. @@ -394,7 +285,7 @@ class UnsubscribeParams(RequestOptions): @classmethod def _cls_disconnect( - cls, account: str, **params: Unpack["Account.DisconnectParams"] + cls, account: str, **params: Unpack["AccountDisconnectParams"] ) -> "Account": """ Disables your access to a Financial Connections Account. You will no longer be able to access data associated with the account (e.g. balances, transactions). @@ -413,7 +304,7 @@ def _cls_disconnect( @overload @staticmethod def disconnect( - account: str, **params: Unpack["Account.DisconnectParams"] + account: str, **params: Unpack["AccountDisconnectParams"] ) -> "Account": """ Disables your access to a Financial Connections Account. You will no longer be able to access data associated with the account (e.g. balances, transactions). @@ -422,7 +313,7 @@ def disconnect( @overload def disconnect( - self, **params: Unpack["Account.DisconnectParams"] + self, **params: Unpack["AccountDisconnectParams"] ) -> "Account": """ Disables your access to a Financial Connections Account. You will no longer be able to access data associated with the account (e.g. balances, transactions). @@ -431,7 +322,7 @@ def disconnect( @class_method_variant("_cls_disconnect") def disconnect( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Account.DisconnectParams"] + self, **params: Unpack["AccountDisconnectParams"] ) -> "Account": """ Disables your access to a Financial Connections Account. You will no longer be able to access data associated with the account (e.g. balances, transactions). @@ -449,7 +340,7 @@ def disconnect( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_disconnect_async( - cls, account: str, **params: Unpack["Account.DisconnectParams"] + cls, account: str, **params: Unpack["AccountDisconnectParams"] ) -> "Account": """ Disables your access to a Financial Connections Account. You will no longer be able to access data associated with the account (e.g. balances, transactions). @@ -468,7 +359,7 @@ async def _cls_disconnect_async( @overload @staticmethod async def disconnect_async( - account: str, **params: Unpack["Account.DisconnectParams"] + account: str, **params: Unpack["AccountDisconnectParams"] ) -> "Account": """ Disables your access to a Financial Connections Account. You will no longer be able to access data associated with the account (e.g. balances, transactions). @@ -477,7 +368,7 @@ async def disconnect_async( @overload async def disconnect_async( - self, **params: Unpack["Account.DisconnectParams"] + self, **params: Unpack["AccountDisconnectParams"] ) -> "Account": """ Disables your access to a Financial Connections Account. You will no longer be able to access data associated with the account (e.g. balances, transactions). @@ -486,7 +377,7 @@ async def disconnect_async( @class_method_variant("_cls_disconnect_async") async def disconnect_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Account.DisconnectParams"] + self, **params: Unpack["AccountDisconnectParams"] ) -> "Account": """ Disables your access to a Financial Connections Account. You will no longer be able to access data associated with the account (e.g. balances, transactions). @@ -504,7 +395,7 @@ async def disconnect_async( # pyright: ignore[reportGeneralTypeIssues] @classmethod def list( - cls, **params: Unpack["Account.ListParams"] + cls, **params: Unpack["AccountListParams"] ) -> ListObject["Account"]: """ Returns a list of Financial Connections Account objects. @@ -524,7 +415,7 @@ def list( @classmethod async def list_async( - cls, **params: Unpack["Account.ListParams"] + cls, **params: Unpack["AccountListParams"] ) -> ListObject["Account"]: """ Returns a list of Financial Connections Account objects. @@ -544,7 +435,7 @@ async def list_async( @classmethod def _cls_list_owners( - cls, account: str, **params: Unpack["Account.ListOwnersParams"] + cls, account: str, **params: Unpack["AccountListOwnersParams"] ) -> ListObject["AccountOwner"]: """ Lists all owners for a given Account @@ -563,7 +454,7 @@ def _cls_list_owners( @overload @staticmethod def list_owners( - account: str, **params: Unpack["Account.ListOwnersParams"] + account: str, **params: Unpack["AccountListOwnersParams"] ) -> ListObject["AccountOwner"]: """ Lists all owners for a given Account @@ -572,7 +463,7 @@ def list_owners( @overload def list_owners( - self, **params: Unpack["Account.ListOwnersParams"] + self, **params: Unpack["AccountListOwnersParams"] ) -> ListObject["AccountOwner"]: """ Lists all owners for a given Account @@ -581,7 +472,7 @@ def list_owners( @class_method_variant("_cls_list_owners") def list_owners( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Account.ListOwnersParams"] + self, **params: Unpack["AccountListOwnersParams"] ) -> ListObject["AccountOwner"]: """ Lists all owners for a given Account @@ -599,7 +490,7 @@ def list_owners( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_list_owners_async( - cls, account: str, **params: Unpack["Account.ListOwnersParams"] + cls, account: str, **params: Unpack["AccountListOwnersParams"] ) -> ListObject["AccountOwner"]: """ Lists all owners for a given Account @@ -618,7 +509,7 @@ async def _cls_list_owners_async( @overload @staticmethod async def list_owners_async( - account: str, **params: Unpack["Account.ListOwnersParams"] + account: str, **params: Unpack["AccountListOwnersParams"] ) -> ListObject["AccountOwner"]: """ Lists all owners for a given Account @@ -627,7 +518,7 @@ async def list_owners_async( @overload async def list_owners_async( - self, **params: Unpack["Account.ListOwnersParams"] + self, **params: Unpack["AccountListOwnersParams"] ) -> ListObject["AccountOwner"]: """ Lists all owners for a given Account @@ -636,7 +527,7 @@ async def list_owners_async( @class_method_variant("_cls_list_owners_async") async def list_owners_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Account.ListOwnersParams"] + self, **params: Unpack["AccountListOwnersParams"] ) -> ListObject["AccountOwner"]: """ Lists all owners for a given Account @@ -654,7 +545,7 @@ async def list_owners_async( # pyright: ignore[reportGeneralTypeIssues] @classmethod def _cls_refresh_account( - cls, account: str, **params: Unpack["Account.RefreshAccountParams"] + cls, account: str, **params: Unpack["AccountRefreshAccountParams"] ) -> "Account": """ Refreshes the data associated with a Financial Connections Account. @@ -673,7 +564,7 @@ def _cls_refresh_account( @overload @staticmethod def refresh_account( - account: str, **params: Unpack["Account.RefreshAccountParams"] + account: str, **params: Unpack["AccountRefreshAccountParams"] ) -> "Account": """ Refreshes the data associated with a Financial Connections Account. @@ -682,7 +573,7 @@ def refresh_account( @overload def refresh_account( - self, **params: Unpack["Account.RefreshAccountParams"] + self, **params: Unpack["AccountRefreshAccountParams"] ) -> "Account": """ Refreshes the data associated with a Financial Connections Account. @@ -691,7 +582,7 @@ def refresh_account( @class_method_variant("_cls_refresh_account") def refresh_account( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Account.RefreshAccountParams"] + self, **params: Unpack["AccountRefreshAccountParams"] ) -> "Account": """ Refreshes the data associated with a Financial Connections Account. @@ -709,7 +600,7 @@ def refresh_account( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_refresh_account_async( - cls, account: str, **params: Unpack["Account.RefreshAccountParams"] + cls, account: str, **params: Unpack["AccountRefreshAccountParams"] ) -> "Account": """ Refreshes the data associated with a Financial Connections Account. @@ -728,7 +619,7 @@ async def _cls_refresh_account_async( @overload @staticmethod async def refresh_account_async( - account: str, **params: Unpack["Account.RefreshAccountParams"] + account: str, **params: Unpack["AccountRefreshAccountParams"] ) -> "Account": """ Refreshes the data associated with a Financial Connections Account. @@ -737,7 +628,7 @@ async def refresh_account_async( @overload async def refresh_account_async( - self, **params: Unpack["Account.RefreshAccountParams"] + self, **params: Unpack["AccountRefreshAccountParams"] ) -> "Account": """ Refreshes the data associated with a Financial Connections Account. @@ -746,7 +637,7 @@ async def refresh_account_async( @class_method_variant("_cls_refresh_account_async") async def refresh_account_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Account.RefreshAccountParams"] + self, **params: Unpack["AccountRefreshAccountParams"] ) -> "Account": """ Refreshes the data associated with a Financial Connections Account. @@ -764,7 +655,7 @@ async def refresh_account_async( # pyright: ignore[reportGeneralTypeIssues] @classmethod def retrieve( - cls, id: str, **params: Unpack["Account.RetrieveParams"] + cls, id: str, **params: Unpack["AccountRetrieveParams"] ) -> "Account": """ Retrieves the details of an Financial Connections Account. @@ -775,7 +666,7 @@ def retrieve( @classmethod async def retrieve_async( - cls, id: str, **params: Unpack["Account.RetrieveParams"] + cls, id: str, **params: Unpack["AccountRetrieveParams"] ) -> "Account": """ Retrieves the details of an Financial Connections Account. @@ -786,7 +677,7 @@ async def retrieve_async( @classmethod def _cls_subscribe( - cls, account: str, **params: Unpack["Account.SubscribeParams"] + cls, account: str, **params: Unpack["AccountSubscribeParams"] ) -> "Account": """ Subscribes to periodic refreshes of data associated with a Financial Connections Account. @@ -805,7 +696,7 @@ def _cls_subscribe( @overload @staticmethod def subscribe( - account: str, **params: Unpack["Account.SubscribeParams"] + account: str, **params: Unpack["AccountSubscribeParams"] ) -> "Account": """ Subscribes to periodic refreshes of data associated with a Financial Connections Account. @@ -814,7 +705,7 @@ def subscribe( @overload def subscribe( - self, **params: Unpack["Account.SubscribeParams"] + self, **params: Unpack["AccountSubscribeParams"] ) -> "Account": """ Subscribes to periodic refreshes of data associated with a Financial Connections Account. @@ -823,7 +714,7 @@ def subscribe( @class_method_variant("_cls_subscribe") def subscribe( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Account.SubscribeParams"] + self, **params: Unpack["AccountSubscribeParams"] ) -> "Account": """ Subscribes to periodic refreshes of data associated with a Financial Connections Account. @@ -841,7 +732,7 @@ def subscribe( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_subscribe_async( - cls, account: str, **params: Unpack["Account.SubscribeParams"] + cls, account: str, **params: Unpack["AccountSubscribeParams"] ) -> "Account": """ Subscribes to periodic refreshes of data associated with a Financial Connections Account. @@ -860,7 +751,7 @@ async def _cls_subscribe_async( @overload @staticmethod async def subscribe_async( - account: str, **params: Unpack["Account.SubscribeParams"] + account: str, **params: Unpack["AccountSubscribeParams"] ) -> "Account": """ Subscribes to periodic refreshes of data associated with a Financial Connections Account. @@ -869,7 +760,7 @@ async def subscribe_async( @overload async def subscribe_async( - self, **params: Unpack["Account.SubscribeParams"] + self, **params: Unpack["AccountSubscribeParams"] ) -> "Account": """ Subscribes to periodic refreshes of data associated with a Financial Connections Account. @@ -878,7 +769,7 @@ async def subscribe_async( @class_method_variant("_cls_subscribe_async") async def subscribe_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Account.SubscribeParams"] + self, **params: Unpack["AccountSubscribeParams"] ) -> "Account": """ Subscribes to periodic refreshes of data associated with a Financial Connections Account. @@ -896,7 +787,7 @@ async def subscribe_async( # pyright: ignore[reportGeneralTypeIssues] @classmethod def _cls_unsubscribe( - cls, account: str, **params: Unpack["Account.UnsubscribeParams"] + cls, account: str, **params: Unpack["AccountUnsubscribeParams"] ) -> "Account": """ Unsubscribes from periodic refreshes of data associated with a Financial Connections Account. @@ -915,7 +806,7 @@ def _cls_unsubscribe( @overload @staticmethod def unsubscribe( - account: str, **params: Unpack["Account.UnsubscribeParams"] + account: str, **params: Unpack["AccountUnsubscribeParams"] ) -> "Account": """ Unsubscribes from periodic refreshes of data associated with a Financial Connections Account. @@ -924,7 +815,7 @@ def unsubscribe( @overload def unsubscribe( - self, **params: Unpack["Account.UnsubscribeParams"] + self, **params: Unpack["AccountUnsubscribeParams"] ) -> "Account": """ Unsubscribes from periodic refreshes of data associated with a Financial Connections Account. @@ -933,7 +824,7 @@ def unsubscribe( @class_method_variant("_cls_unsubscribe") def unsubscribe( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Account.UnsubscribeParams"] + self, **params: Unpack["AccountUnsubscribeParams"] ) -> "Account": """ Unsubscribes from periodic refreshes of data associated with a Financial Connections Account. @@ -951,7 +842,7 @@ def unsubscribe( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_unsubscribe_async( - cls, account: str, **params: Unpack["Account.UnsubscribeParams"] + cls, account: str, **params: Unpack["AccountUnsubscribeParams"] ) -> "Account": """ Unsubscribes from periodic refreshes of data associated with a Financial Connections Account. @@ -970,7 +861,7 @@ async def _cls_unsubscribe_async( @overload @staticmethod async def unsubscribe_async( - account: str, **params: Unpack["Account.UnsubscribeParams"] + account: str, **params: Unpack["AccountUnsubscribeParams"] ) -> "Account": """ Unsubscribes from periodic refreshes of data associated with a Financial Connections Account. @@ -979,7 +870,7 @@ async def unsubscribe_async( @overload async def unsubscribe_async( - self, **params: Unpack["Account.UnsubscribeParams"] + self, **params: Unpack["AccountUnsubscribeParams"] ) -> "Account": """ Unsubscribes from periodic refreshes of data associated with a Financial Connections Account. @@ -988,7 +879,7 @@ async def unsubscribe_async( @class_method_variant("_cls_unsubscribe_async") async def unsubscribe_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Account.UnsubscribeParams"] + self, **params: Unpack["AccountUnsubscribeParams"] ) -> "Account": """ Unsubscribes from periodic refreshes of data associated with a Financial Connections Account. @@ -1008,7 +899,7 @@ async def unsubscribe_async( # pyright: ignore[reportGeneralTypeIssues] def list_inferred_balances( cls, account: str, - **params: Unpack["Account.ListInferredBalancesParams"], + **params: Unpack["AccountListInferredBalancesParams"], ) -> ListObject["AccountInferredBalance"]: """ Lists the recorded inferred balances for a Financial Connections Account. @@ -1028,7 +919,7 @@ def list_inferred_balances( async def list_inferred_balances_async( cls, account: str, - **params: Unpack["Account.ListInferredBalancesParams"], + **params: Unpack["AccountListInferredBalancesParams"], ) -> ListObject["AccountInferredBalance"]: """ Lists the recorded inferred balances for a Financial Connections Account. diff --git a/stripe/financial_connections/_account_inferred_balance_service.py b/stripe/financial_connections/_account_inferred_balance_service.py index 87b0e613b..cc1a309c8 100644 --- a/stripe/financial_connections/_account_inferred_balance_service.py +++ b/stripe/financial_connections/_account_inferred_balance_service.py @@ -7,33 +7,20 @@ from stripe.financial_connections._account_inferred_balance import ( AccountInferredBalance, ) -from typing import List, Optional, cast -from typing_extensions import NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params.financial_connections._account_inferred_balance_list_params import ( + AccountInferredBalanceListParams, + ) -class AccountInferredBalanceService(StripeService): - class ListParams(TypedDict): - 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 AccountInferredBalanceService(StripeService): def list( self, account: str, - params: Optional["AccountInferredBalanceService.ListParams"] = None, + params: Optional["AccountInferredBalanceListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[AccountInferredBalance]: """ @@ -55,7 +42,7 @@ def list( async def list_async( self, account: str, - params: Optional["AccountInferredBalanceService.ListParams"] = None, + params: Optional["AccountInferredBalanceListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[AccountInferredBalance]: """ diff --git a/stripe/financial_connections/_account_owner_service.py b/stripe/financial_connections/_account_owner_service.py index 9b1263f52..17f591238 100644 --- a/stripe/financial_connections/_account_owner_service.py +++ b/stripe/financial_connections/_account_owner_service.py @@ -5,37 +5,20 @@ from stripe._stripe_service import StripeService from stripe._util import sanitize_id from stripe.financial_connections._account_owner import AccountOwner -from typing import List, Optional, cast -from typing_extensions import NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params.financial_connections._account_owner_list_params import ( + AccountOwnerListParams, + ) -class AccountOwnerService(StripeService): - class ListParams(TypedDict): - 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. - """ - ownership: str - """ - The ID of the ownership object to fetch owners from. - """ - 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 AccountOwnerService(StripeService): def list( self, account: str, - params: "AccountOwnerService.ListParams", + params: "AccountOwnerListParams", options: Optional[RequestOptions] = None, ) -> ListObject[AccountOwner]: """ @@ -57,7 +40,7 @@ def list( async def list_async( self, account: str, - params: "AccountOwnerService.ListParams", + params: "AccountOwnerListParams", options: Optional[RequestOptions] = None, ) -> ListObject[AccountOwner]: """ diff --git a/stripe/financial_connections/_account_service.py b/stripe/financial_connections/_account_service.py index 4ca2d6293..6ffafd338 100644 --- a/stripe/financial_connections/_account_service.py +++ b/stripe/financial_connections/_account_service.py @@ -11,8 +11,28 @@ from stripe.financial_connections._account_owner_service import ( AccountOwnerService, ) -from typing import List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params.financial_connections._account_disconnect_params import ( + AccountDisconnectParams, + ) + from stripe.params.financial_connections._account_list_params import ( + AccountListParams, + ) + from stripe.params.financial_connections._account_refresh_params import ( + AccountRefreshParams, + ) + from stripe.params.financial_connections._account_retrieve_params import ( + AccountRetrieveParams, + ) + from stripe.params.financial_connections._account_subscribe_params import ( + AccountSubscribeParams, + ) + from stripe.params.financial_connections._account_unsubscribe_params import ( + AccountUnsubscribeParams, + ) class AccountService(StripeService): @@ -21,95 +41,9 @@ def __init__(self, requestor): self.inferred_balances = AccountInferredBalanceService(self._requestor) self.owners = AccountOwnerService(self._requestor) - class DisconnectParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class ListParams(TypedDict): - account_holder: NotRequired["AccountService.ListParamsAccountHolder"] - """ - If present, only return accounts that belong to the specified account holder. `account_holder[customer]` and `account_holder[account]` are mutually exclusive. - """ - 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. - """ - session: NotRequired[str] - """ - If present, only return accounts that were collected as part of the given session. - """ - 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 ListParamsAccountHolder(TypedDict): - account: NotRequired[str] - """ - The ID of the Stripe account whose accounts will be retrieved. - """ - customer: NotRequired[str] - """ - The ID of the Stripe customer whose accounts will be retrieved. - """ - customer_account: NotRequired[str] - """ - The Account ID of the Stripe customer whose accounts will be retrieved. - """ - - class RefreshParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - features: List[ - Literal[ - "balance", "inferred_balances", "ownership", "transactions" - ] - ] - """ - The list of account features that you would like to refresh. - """ - - class RetrieveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class SubscribeParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - features: List[Literal["balance", "inferred_balances", "transactions"]] - """ - The list of account features to which you would like to subscribe. - """ - - class UnsubscribeParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - features: List[Literal["balance", "inferred_balances", "transactions"]] - """ - The list of account features from which you would like to unsubscribe. - """ - def list( self, - params: Optional["AccountService.ListParams"] = None, + params: Optional["AccountListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[Account]: """ @@ -128,7 +62,7 @@ def list( async def list_async( self, - params: Optional["AccountService.ListParams"] = None, + params: Optional["AccountListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[Account]: """ @@ -148,7 +82,7 @@ async def list_async( def retrieve( self, account: str, - params: Optional["AccountService.RetrieveParams"] = None, + params: Optional["AccountRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Account: """ @@ -170,7 +104,7 @@ def retrieve( async def retrieve_async( self, account: str, - params: Optional["AccountService.RetrieveParams"] = None, + params: Optional["AccountRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Account: """ @@ -192,7 +126,7 @@ async def retrieve_async( def disconnect( self, account: str, - params: Optional["AccountService.DisconnectParams"] = None, + params: Optional["AccountDisconnectParams"] = None, options: Optional[RequestOptions] = None, ) -> Account: """ @@ -214,7 +148,7 @@ def disconnect( async def disconnect_async( self, account: str, - params: Optional["AccountService.DisconnectParams"] = None, + params: Optional["AccountDisconnectParams"] = None, options: Optional[RequestOptions] = None, ) -> Account: """ @@ -236,7 +170,7 @@ async def disconnect_async( def refresh( self, account: str, - params: "AccountService.RefreshParams", + params: "AccountRefreshParams", options: Optional[RequestOptions] = None, ) -> Account: """ @@ -258,7 +192,7 @@ def refresh( async def refresh_async( self, account: str, - params: "AccountService.RefreshParams", + params: "AccountRefreshParams", options: Optional[RequestOptions] = None, ) -> Account: """ @@ -280,7 +214,7 @@ async def refresh_async( def subscribe( self, account: str, - params: "AccountService.SubscribeParams", + params: "AccountSubscribeParams", options: Optional[RequestOptions] = None, ) -> Account: """ @@ -302,7 +236,7 @@ def subscribe( async def subscribe_async( self, account: str, - params: "AccountService.SubscribeParams", + params: "AccountSubscribeParams", options: Optional[RequestOptions] = None, ) -> Account: """ @@ -324,7 +258,7 @@ async def subscribe_async( def unsubscribe( self, account: str, - params: "AccountService.UnsubscribeParams", + params: "AccountUnsubscribeParams", options: Optional[RequestOptions] = None, ) -> Account: """ @@ -346,7 +280,7 @@ def unsubscribe( async def unsubscribe_async( self, account: str, - params: "AccountService.UnsubscribeParams", + params: "AccountUnsubscribeParams", options: Optional[RequestOptions] = None, ) -> Account: """ diff --git a/stripe/financial_connections/_institution.py b/stripe/financial_connections/_institution.py index 78a33e841..0d671827f 100644 --- a/stripe/financial_connections/_institution.py +++ b/stripe/financial_connections/_institution.py @@ -2,10 +2,17 @@ # File generated from our OpenAPI spec from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource -from stripe._request_options import RequestOptions from stripe._stripe_object import StripeObject from typing import ClassVar, List, Optional -from typing_extensions import Literal, NotRequired, Unpack +from typing_extensions import Literal, Unpack, TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params.financial_connections._institution_list_params import ( + InstitutionListParams, + ) + from stripe.params.financial_connections._institution_retrieve_params import ( + InstitutionRetrieveParams, + ) class Institution(ListableAPIResource["Institution"]): @@ -53,30 +60,6 @@ class Transactions(StripeObject): "transactions": Transactions, } - class ListParams(RequestOptions): - 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 RetrieveParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - countries: List[str] """ The list of countries supported by this institution, formatted as ISO country codes. @@ -113,7 +96,7 @@ class RetrieveParams(RequestOptions): @classmethod def list( - cls, **params: Unpack["Institution.ListParams"] + cls, **params: Unpack["InstitutionListParams"] ) -> ListObject["Institution"]: """ Returns a list of Financial Connections Institution objects. @@ -133,7 +116,7 @@ def list( @classmethod async def list_async( - cls, **params: Unpack["Institution.ListParams"] + cls, **params: Unpack["InstitutionListParams"] ) -> ListObject["Institution"]: """ Returns a list of Financial Connections Institution objects. @@ -153,7 +136,7 @@ async def list_async( @classmethod def retrieve( - cls, id: str, **params: Unpack["Institution.RetrieveParams"] + cls, id: str, **params: Unpack["InstitutionRetrieveParams"] ) -> "Institution": """ Retrieves the details of a Financial Connections Institution. @@ -164,7 +147,7 @@ def retrieve( @classmethod async def retrieve_async( - cls, id: str, **params: Unpack["Institution.RetrieveParams"] + cls, id: str, **params: Unpack["InstitutionRetrieveParams"] ) -> "Institution": """ Retrieves the details of a Financial Connections Institution. diff --git a/stripe/financial_connections/_institution_service.py b/stripe/financial_connections/_institution_service.py index 85d49f609..85e012d6e 100644 --- a/stripe/financial_connections/_institution_service.py +++ b/stripe/financial_connections/_institution_service.py @@ -5,38 +5,22 @@ from stripe._stripe_service import StripeService from stripe._util import sanitize_id from stripe.financial_connections._institution import Institution -from typing import List, Optional, cast -from typing_extensions import NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params.financial_connections._institution_list_params import ( + InstitutionListParams, + ) + from stripe.params.financial_connections._institution_retrieve_params import ( + InstitutionRetrieveParams, + ) -class InstitutionService(StripeService): - class ListParams(TypedDict): - 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 RetrieveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ +class InstitutionService(StripeService): def list( self, - params: Optional["InstitutionService.ListParams"] = None, + params: Optional["InstitutionListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[Institution]: """ @@ -55,7 +39,7 @@ def list( async def list_async( self, - params: Optional["InstitutionService.ListParams"] = None, + params: Optional["InstitutionListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[Institution]: """ @@ -75,7 +59,7 @@ async def list_async( def retrieve( self, institution: str, - params: Optional["InstitutionService.RetrieveParams"] = None, + params: Optional["InstitutionRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Institution: """ @@ -97,7 +81,7 @@ def retrieve( async def retrieve_async( self, institution: str, - params: Optional["InstitutionService.RetrieveParams"] = None, + params: Optional["InstitutionRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Institution: """ diff --git a/stripe/financial_connections/_session.py b/stripe/financial_connections/_session.py index a19490058..5b5a67173 100644 --- a/stripe/financial_connections/_session.py +++ b/stripe/financial_connections/_session.py @@ -3,16 +3,9 @@ from stripe._createable_api_resource import CreateableAPIResource from stripe._expandable_field import ExpandableField from stripe._list_object import ListObject -from stripe._request_options import RequestOptions from stripe._stripe_object import StripeObject from typing import ClassVar, List, Optional, cast -from typing_extensions import ( - Literal, - NotRequired, - TypedDict, - Unpack, - TYPE_CHECKING, -) +from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: from stripe._account import Account as AccountResource @@ -20,6 +13,12 @@ from stripe.financial_connections._account import ( Account as FinancialConnectionsAccountResource, ) + from stripe.params.financial_connections._session_create_params import ( + SessionCreateParams, + ) + from stripe.params.financial_connections._session_retrieve_params import ( + SessionRetrieveParams, + ) class Session(CreateableAPIResource["Session"]): @@ -89,113 +88,6 @@ class Cancelled(StripeObject): cancelled: Optional[Cancelled] _inner_class_types = {"cancelled": Cancelled} - class CreateParams(RequestOptions): - account_holder: "Session.CreateParamsAccountHolder" - """ - The account holder to link accounts for. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - filters: NotRequired["Session.CreateParamsFilters"] - """ - Filters to restrict the kinds of accounts to collect. - """ - limits: NotRequired["Session.CreateParamsLimits"] - """ - Settings for configuring Session-specific limits. - """ - manual_entry: NotRequired["Session.CreateParamsManualEntry"] - """ - Customize manual entry behavior - """ - permissions: List[ - Literal["balances", "ownership", "payment_method", "transactions"] - ] - """ - List of data features that you would like to request access to. - - Possible values are `balances`, `transactions`, `ownership`, and `payment_method`. - """ - prefetch: NotRequired[ - List[ - Literal[ - "balances", - "inferred_balances", - "ownership", - "transactions", - ] - ] - ] - """ - List of data features that you would like to retrieve upon account creation. - """ - return_url: NotRequired[str] - """ - For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. - """ - - class CreateParamsAccountHolder(TypedDict): - account: NotRequired[str] - """ - The ID of the Stripe account whose accounts will be retrieved. Should only be present if `type` is `account`. - """ - customer: NotRequired[str] - """ - The ID of the Stripe customer whose accounts will be retrieved. Should only be present if `type` is `customer`. - """ - customer_account: NotRequired[str] - """ - The ID of the Stripe customer Account whose accounts will be retrieved. Should only be present if `type` is `customer`. - """ - type: Literal["account", "customer"] - """ - Type of account holder to collect accounts for. - """ - - class CreateParamsFilters(TypedDict): - account_subcategories: NotRequired[ - List[ - Literal[ - "checking", - "credit_card", - "line_of_credit", - "mortgage", - "savings", - ] - ] - ] - """ - Restricts the Session to subcategories of accounts that can be linked. Valid subcategories are: `checking`, `savings`, `mortgage`, `line_of_credit`, `credit_card`. - """ - countries: NotRequired[List[str]] - """ - List of countries from which to collect accounts. - """ - institution: NotRequired[str] - """ - Stripe ID of the institution with which the customer should be directed to log in. - """ - - class CreateParamsLimits(TypedDict): - accounts: int - """ - The number of accounts that can be linked in this Session. - """ - - class CreateParamsManualEntry(TypedDict): - mode: NotRequired[Literal["automatic", "custom"]] - """ - Whether manual entry will be handled by Stripe during the Session. - """ - - class RetrieveParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - account_holder: Optional[AccountHolder] """ The account holder for whom accounts are collected in this session. @@ -250,7 +142,7 @@ class RetrieveParams(RequestOptions): status_details: Optional[StatusDetails] @classmethod - def create(cls, **params: Unpack["Session.CreateParams"]) -> "Session": + def create(cls, **params: Unpack["SessionCreateParams"]) -> "Session": """ To launch the Financial Connections authorization flow, create a Session. The session's client_secret can be used to launch the flow using Stripe.js. """ @@ -265,7 +157,7 @@ def create(cls, **params: Unpack["Session.CreateParams"]) -> "Session": @classmethod async def create_async( - cls, **params: Unpack["Session.CreateParams"] + cls, **params: Unpack["SessionCreateParams"] ) -> "Session": """ To launch the Financial Connections authorization flow, create a Session. The session's client_secret can be used to launch the flow using Stripe.js. @@ -281,7 +173,7 @@ async def create_async( @classmethod def retrieve( - cls, id: str, **params: Unpack["Session.RetrieveParams"] + cls, id: str, **params: Unpack["SessionRetrieveParams"] ) -> "Session": """ Retrieves the details of a Financial Connections Session @@ -292,7 +184,7 @@ def retrieve( @classmethod async def retrieve_async( - cls, id: str, **params: Unpack["Session.RetrieveParams"] + cls, id: str, **params: Unpack["SessionRetrieveParams"] ) -> "Session": """ Retrieves the details of a Financial Connections Session diff --git a/stripe/financial_connections/_session_service.py b/stripe/financial_connections/_session_service.py index 94d89a85c..ad8a34782 100644 --- a/stripe/financial_connections/_session_service.py +++ b/stripe/financial_connections/_session_service.py @@ -4,122 +4,23 @@ from stripe._stripe_service import StripeService from stripe._util import sanitize_id from stripe.financial_connections._session import Session -from typing import List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params.financial_connections._session_create_params import ( + SessionCreateParams, + ) + from stripe.params.financial_connections._session_retrieve_params import ( + SessionRetrieveParams, + ) -class SessionService(StripeService): - class CreateParams(TypedDict): - account_holder: "SessionService.CreateParamsAccountHolder" - """ - The account holder to link accounts for. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - filters: NotRequired["SessionService.CreateParamsFilters"] - """ - Filters to restrict the kinds of accounts to collect. - """ - limits: NotRequired["SessionService.CreateParamsLimits"] - """ - Settings for configuring Session-specific limits. - """ - manual_entry: NotRequired["SessionService.CreateParamsManualEntry"] - """ - Customize manual entry behavior - """ - permissions: List[ - Literal["balances", "ownership", "payment_method", "transactions"] - ] - """ - List of data features that you would like to request access to. - - Possible values are `balances`, `transactions`, `ownership`, and `payment_method`. - """ - prefetch: NotRequired[ - List[ - Literal[ - "balances", - "inferred_balances", - "ownership", - "transactions", - ] - ] - ] - """ - List of data features that you would like to retrieve upon account creation. - """ - return_url: NotRequired[str] - """ - For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. - """ - - class CreateParamsAccountHolder(TypedDict): - account: NotRequired[str] - """ - The ID of the Stripe account whose accounts will be retrieved. Should only be present if `type` is `account`. - """ - customer: NotRequired[str] - """ - The ID of the Stripe customer whose accounts will be retrieved. Should only be present if `type` is `customer`. - """ - customer_account: NotRequired[str] - """ - The ID of the Stripe customer Account whose accounts will be retrieved. Should only be present if `type` is `customer`. - """ - type: Literal["account", "customer"] - """ - Type of account holder to collect accounts for. - """ - - class CreateParamsFilters(TypedDict): - account_subcategories: NotRequired[ - List[ - Literal[ - "checking", - "credit_card", - "line_of_credit", - "mortgage", - "savings", - ] - ] - ] - """ - Restricts the Session to subcategories of accounts that can be linked. Valid subcategories are: `checking`, `savings`, `mortgage`, `line_of_credit`, `credit_card`. - """ - countries: NotRequired[List[str]] - """ - List of countries from which to collect accounts. - """ - institution: NotRequired[str] - """ - Stripe ID of the institution with which the customer should be directed to log in. - """ - - class CreateParamsLimits(TypedDict): - accounts: int - """ - The number of accounts that can be linked in this Session. - """ - - class CreateParamsManualEntry(TypedDict): - mode: NotRequired[Literal["automatic", "custom"]] - """ - Whether manual entry will be handled by Stripe during the Session. - """ - - class RetrieveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ +class SessionService(StripeService): def retrieve( self, session: str, - params: Optional["SessionService.RetrieveParams"] = None, + params: Optional["SessionRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Session: """ @@ -141,7 +42,7 @@ def retrieve( async def retrieve_async( self, session: str, - params: Optional["SessionService.RetrieveParams"] = None, + params: Optional["SessionRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Session: """ @@ -162,7 +63,7 @@ async def retrieve_async( def create( self, - params: "SessionService.CreateParams", + params: "SessionCreateParams", options: Optional[RequestOptions] = None, ) -> Session: """ @@ -181,7 +82,7 @@ def create( async def create_async( self, - params: "SessionService.CreateParams", + params: "SessionCreateParams", options: Optional[RequestOptions] = None, ) -> Session: """ diff --git a/stripe/financial_connections/_transaction.py b/stripe/financial_connections/_transaction.py index 47188a1cb..9a5369584 100644 --- a/stripe/financial_connections/_transaction.py +++ b/stripe/financial_connections/_transaction.py @@ -2,10 +2,17 @@ # File generated from our OpenAPI spec from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource -from stripe._request_options import RequestOptions from stripe._stripe_object import StripeObject -from typing import ClassVar, List, Optional -from typing_extensions import Literal, NotRequired, TypedDict, Unpack +from typing import ClassVar, Optional +from typing_extensions import Literal, Unpack, TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params.financial_connections._transaction_list_params import ( + TransactionListParams, + ) + from stripe.params.financial_connections._transaction_retrieve_params import ( + TransactionRetrieveParams, + ) class Transaction(ListableAPIResource["Transaction"]): @@ -27,68 +34,6 @@ class StatusTransitions(StripeObject): Time at which this transaction was voided. Measured in seconds since the Unix epoch. """ - class ListParams(RequestOptions): - account: str - """ - The ID of the Financial Connections Account whose transactions will be retrieved. - """ - 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. - """ - transacted_at: NotRequired["Transaction.ListParamsTransactedAt|int"] - """ - A filter on the list based on the object `transacted_at` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with the following options: - """ - transaction_refresh: NotRequired[ - "Transaction.ListParamsTransactionRefresh" - ] - """ - A filter on the list based on the object `transaction_refresh` field. The value can be a dictionary with the following options: - """ - - class ListParamsTransactedAt(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) - """ - - class ListParamsTransactionRefresh(TypedDict): - after: str - """ - Return results where the transactions were created or updated by a refresh that took place after this refresh (non-inclusive). - """ - - class RetrieveParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - account: str """ The ID of the Financial Connections Account this transaction belongs to. @@ -137,7 +82,7 @@ class RetrieveParams(RequestOptions): @classmethod def list( - cls, **params: Unpack["Transaction.ListParams"] + cls, **params: Unpack["TransactionListParams"] ) -> ListObject["Transaction"]: """ Returns a list of Financial Connections Transaction objects. @@ -157,7 +102,7 @@ def list( @classmethod async def list_async( - cls, **params: Unpack["Transaction.ListParams"] + cls, **params: Unpack["TransactionListParams"] ) -> ListObject["Transaction"]: """ Returns a list of Financial Connections Transaction objects. @@ -177,7 +122,7 @@ async def list_async( @classmethod def retrieve( - cls, id: str, **params: Unpack["Transaction.RetrieveParams"] + cls, id: str, **params: Unpack["TransactionRetrieveParams"] ) -> "Transaction": """ Retrieves the details of a Financial Connections Transaction @@ -188,7 +133,7 @@ def retrieve( @classmethod async def retrieve_async( - cls, id: str, **params: Unpack["Transaction.RetrieveParams"] + cls, id: str, **params: Unpack["TransactionRetrieveParams"] ) -> "Transaction": """ Retrieves the details of a Financial Connections Transaction diff --git a/stripe/financial_connections/_transaction_service.py b/stripe/financial_connections/_transaction_service.py index 9bcc53a68..58dceb483 100644 --- a/stripe/financial_connections/_transaction_service.py +++ b/stripe/financial_connections/_transaction_service.py @@ -5,78 +5,22 @@ from stripe._stripe_service import StripeService from stripe._util import sanitize_id from stripe.financial_connections._transaction import Transaction -from typing import List, Optional, cast -from typing_extensions import NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params.financial_connections._transaction_list_params import ( + TransactionListParams, + ) + from stripe.params.financial_connections._transaction_retrieve_params import ( + TransactionRetrieveParams, + ) -class TransactionService(StripeService): - class ListParams(TypedDict): - account: str - """ - The ID of the Financial Connections Account whose transactions will be retrieved. - """ - 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. - """ - transacted_at: NotRequired[ - "TransactionService.ListParamsTransactedAt|int" - ] - """ - A filter on the list based on the object `transacted_at` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with the following options: - """ - transaction_refresh: NotRequired[ - "TransactionService.ListParamsTransactionRefresh" - ] - """ - A filter on the list based on the object `transaction_refresh` field. The value can be a dictionary with the following options: - """ - - class ListParamsTransactedAt(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) - """ - - class ListParamsTransactionRefresh(TypedDict): - after: str - """ - Return results where the transactions were created or updated by a refresh that took place after this refresh (non-inclusive). - """ - - class RetrieveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ +class TransactionService(StripeService): def list( self, - params: "TransactionService.ListParams", + params: "TransactionListParams", options: Optional[RequestOptions] = None, ) -> ListObject[Transaction]: """ @@ -95,7 +39,7 @@ def list( async def list_async( self, - params: "TransactionService.ListParams", + params: "TransactionListParams", options: Optional[RequestOptions] = None, ) -> ListObject[Transaction]: """ @@ -115,7 +59,7 @@ async def list_async( def retrieve( self, transaction: str, - params: Optional["TransactionService.RetrieveParams"] = None, + params: Optional["TransactionRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Transaction: """ @@ -137,7 +81,7 @@ def retrieve( async def retrieve_async( self, transaction: str, - params: Optional["TransactionService.RetrieveParams"] = None, + params: Optional["TransactionRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Transaction: """ diff --git a/stripe/forwarding/_request.py b/stripe/forwarding/_request.py index 787704049..cd1bd7016 100644 --- a/stripe/forwarding/_request.py +++ b/stripe/forwarding/_request.py @@ -3,10 +3,18 @@ from stripe._createable_api_resource import CreateableAPIResource from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource -from stripe._request_options import RequestOptions from stripe._stripe_object import StripeObject from typing import ClassVar, Dict, List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict, Unpack +from typing_extensions import Literal, Unpack, TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params.forwarding._request_create_params import ( + RequestCreateParams, + ) + from stripe.params.forwarding._request_list_params import RequestListParams + from stripe.params.forwarding._request_retrieve_params import ( + RequestRetrieveParams, + ) class Request( @@ -93,106 +101,6 @@ class Header(StripeObject): """ _inner_class_types = {"headers": Header} - class CreateParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - payment_method: str - """ - The PaymentMethod to insert into the forwarded request. Forwarding previously consumed PaymentMethods is allowed. - """ - replacements: List[ - Literal[ - "card_cvc", - "card_expiry", - "card_number", - "cardholder_name", - "request_signature", - ] - ] - """ - The field kinds to be replaced in the forwarded request. - """ - request: "Request.CreateParamsRequest" - """ - The request body and headers to be sent to the destination endpoint. - """ - url: str - """ - The destination URL for the forwarded request. Must be supported by the config. - """ - - class CreateParamsRequest(TypedDict): - body: NotRequired[str] - """ - The body payload to send to the destination endpoint. - """ - headers: NotRequired[List["Request.CreateParamsRequestHeader"]] - """ - The headers to include in the forwarded request. Can be omitted if no additional headers (excluding Stripe-generated ones such as the Content-Type header) should be included. - """ - - class CreateParamsRequestHeader(TypedDict): - name: str - """ - The header name. - """ - value: str - """ - The header value. - """ - - class ListParams(RequestOptions): - created: NotRequired["Request.ListParamsCreated"] - """ - Similar to other List endpoints, filters results based on created timestamp. You can pass gt, gte, lt, and lte timestamp values. - """ - ending_before: NotRequired[str] - """ - A pagination cursor to fetch the previous page of the list. The value must be a ForwardingRequest ID. - """ - 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 pagination cursor to fetch the next page of the list. The value must be a ForwardingRequest ID. - """ - - class ListParamsCreated(TypedDict): - gt: NotRequired[int] - """ - Return results where the `created` field is greater than this value. - """ - gte: NotRequired[int] - """ - Return results where the `created` field is greater than or equal to this value. - """ - lt: NotRequired[int] - """ - Return results where the `created` field is less than this value. - """ - lte: NotRequired[int] - """ - Return results where the `created` field is less than or equal to this value. - """ - - class RetrieveParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - created: int """ Time at which the object was created. Measured in seconds since the Unix epoch. @@ -247,7 +155,7 @@ class RetrieveParams(RequestOptions): """ @classmethod - def create(cls, **params: Unpack["Request.CreateParams"]) -> "Request": + def create(cls, **params: Unpack["RequestCreateParams"]) -> "Request": """ Creates a ForwardingRequest object. """ @@ -262,7 +170,7 @@ def create(cls, **params: Unpack["Request.CreateParams"]) -> "Request": @classmethod async def create_async( - cls, **params: Unpack["Request.CreateParams"] + cls, **params: Unpack["RequestCreateParams"] ) -> "Request": """ Creates a ForwardingRequest object. @@ -278,7 +186,7 @@ async def create_async( @classmethod def list( - cls, **params: Unpack["Request.ListParams"] + cls, **params: Unpack["RequestListParams"] ) -> ListObject["Request"]: """ Lists all ForwardingRequest objects. @@ -298,7 +206,7 @@ def list( @classmethod async def list_async( - cls, **params: Unpack["Request.ListParams"] + cls, **params: Unpack["RequestListParams"] ) -> ListObject["Request"]: """ Lists all ForwardingRequest objects. @@ -318,7 +226,7 @@ async def list_async( @classmethod def retrieve( - cls, id: str, **params: Unpack["Request.RetrieveParams"] + cls, id: str, **params: Unpack["RequestRetrieveParams"] ) -> "Request": """ Retrieves a ForwardingRequest object. @@ -329,7 +237,7 @@ def retrieve( @classmethod async def retrieve_async( - cls, id: str, **params: Unpack["Request.RetrieveParams"] + cls, id: str, **params: Unpack["RequestRetrieveParams"] ) -> "Request": """ Retrieves a ForwardingRequest object. diff --git a/stripe/forwarding/_request_service.py b/stripe/forwarding/_request_service.py index 378b9372a..cf6e9bc84 100644 --- a/stripe/forwarding/_request_service.py +++ b/stripe/forwarding/_request_service.py @@ -5,114 +5,23 @@ from stripe._stripe_service import StripeService from stripe._util import sanitize_id from stripe.forwarding._request import Request -from typing import Dict, List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params.forwarding._request_create_params import ( + RequestCreateParams, + ) + from stripe.params.forwarding._request_list_params import RequestListParams + from stripe.params.forwarding._request_retrieve_params import ( + RequestRetrieveParams, + ) -class RequestService(StripeService): - class CreateParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - payment_method: str - """ - The PaymentMethod to insert into the forwarded request. Forwarding previously consumed PaymentMethods is allowed. - """ - replacements: List[ - Literal[ - "card_cvc", - "card_expiry", - "card_number", - "cardholder_name", - "request_signature", - ] - ] - """ - The field kinds to be replaced in the forwarded request. - """ - request: "RequestService.CreateParamsRequest" - """ - The request body and headers to be sent to the destination endpoint. - """ - url: str - """ - The destination URL for the forwarded request. Must be supported by the config. - """ - - class CreateParamsRequest(TypedDict): - body: NotRequired[str] - """ - The body payload to send to the destination endpoint. - """ - headers: NotRequired[List["RequestService.CreateParamsRequestHeader"]] - """ - The headers to include in the forwarded request. Can be omitted if no additional headers (excluding Stripe-generated ones such as the Content-Type header) should be included. - """ - - class CreateParamsRequestHeader(TypedDict): - name: str - """ - The header name. - """ - value: str - """ - The header value. - """ - - class ListParams(TypedDict): - created: NotRequired["RequestService.ListParamsCreated"] - """ - Similar to other List endpoints, filters results based on created timestamp. You can pass gt, gte, lt, and lte timestamp values. - """ - ending_before: NotRequired[str] - """ - A pagination cursor to fetch the previous page of the list. The value must be a ForwardingRequest ID. - """ - 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 pagination cursor to fetch the next page of the list. The value must be a ForwardingRequest ID. - """ - - class ListParamsCreated(TypedDict): - gt: NotRequired[int] - """ - Return results where the `created` field is greater than this value. - """ - gte: NotRequired[int] - """ - Return results where the `created` field is greater than or equal to this value. - """ - lt: NotRequired[int] - """ - Return results where the `created` field is less than this value. - """ - lte: NotRequired[int] - """ - Return results where the `created` field is less than or equal to this value. - """ - - class RetrieveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ +class RequestService(StripeService): def list( self, - params: Optional["RequestService.ListParams"] = None, + params: Optional["RequestListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[Request]: """ @@ -131,7 +40,7 @@ def list( async def list_async( self, - params: Optional["RequestService.ListParams"] = None, + params: Optional["RequestListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[Request]: """ @@ -150,7 +59,7 @@ async def list_async( def create( self, - params: "RequestService.CreateParams", + params: "RequestCreateParams", options: Optional[RequestOptions] = None, ) -> Request: """ @@ -169,7 +78,7 @@ def create( async def create_async( self, - params: "RequestService.CreateParams", + params: "RequestCreateParams", options: Optional[RequestOptions] = None, ) -> Request: """ @@ -189,7 +98,7 @@ async def create_async( def retrieve( self, id: str, - params: Optional["RequestService.RetrieveParams"] = None, + params: Optional["RequestRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Request: """ @@ -209,7 +118,7 @@ def retrieve( async def retrieve_async( self, id: str, - params: Optional["RequestService.RetrieveParams"] = None, + params: Optional["RequestRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Request: """ diff --git a/stripe/http_client.py b/stripe/http_client.py deleted file mode 100644 index 954c3e044..000000000 --- a/stripe/http_client.py +++ /dev/null @@ -1,19 +0,0 @@ -# -*- coding: utf-8 -*- -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.http_client package is deprecated, please change your - imports to import from stripe directly. - From: - from stripe.http_client import HTTPClient - To: - from stripe import HTTPClient - """, - DeprecationWarning, - stacklevel=2, -) - -if not TYPE_CHECKING: - from stripe._http_client import * # noqa diff --git a/stripe/identity/_verification_report.py b/stripe/identity/_verification_report.py index 50f215251..335851502 100644 --- a/stripe/identity/_verification_report.py +++ b/stripe/identity/_verification_report.py @@ -2,10 +2,17 @@ # File generated from our OpenAPI spec from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource -from stripe._request_options import RequestOptions from stripe._stripe_object import StripeObject from typing import ClassVar, List, Optional -from typing_extensions import Literal, NotRequired, TypedDict, Unpack +from typing_extensions import Literal, Unpack, TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params.identity._verification_report_list_params import ( + VerificationReportListParams, + ) + from stripe.params.identity._verification_report_retrieve_params import ( + VerificationReportRetrieveParams, + ) class VerificationReport(ListableAPIResource["VerificationReport"]): @@ -363,64 +370,6 @@ class Error(StripeObject): """ _inner_class_types = {"error": Error} - class ListParams(RequestOptions): - client_reference_id: NotRequired[str] - """ - A string to reference this user. This can be a customer ID, a session ID, or similar, and can be used to reconcile this verification with your internal systems. - """ - created: NotRequired["VerificationReport.ListParamsCreated|int"] - """ - Only return VerificationReports that were created during the given date interval. - """ - 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. - """ - type: NotRequired[Literal["document", "id_number"]] - """ - Only return VerificationReports of this type - """ - verification_session: NotRequired[str] - """ - Only return VerificationReports created by this VerificationSession ID. It is allowed to provide a VerificationIntent ID. - """ - - class ListParamsCreated(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) - """ - - class RetrieveParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - client_reference_id: Optional[str] """ A string to reference this user. This can be a customer ID, a session ID, or similar, and can be used to reconcile this verification with your internal systems. @@ -477,7 +426,7 @@ class RetrieveParams(RequestOptions): @classmethod def list( - cls, **params: Unpack["VerificationReport.ListParams"] + cls, **params: Unpack["VerificationReportListParams"] ) -> ListObject["VerificationReport"]: """ List all verification reports. @@ -497,7 +446,7 @@ def list( @classmethod async def list_async( - cls, **params: Unpack["VerificationReport.ListParams"] + cls, **params: Unpack["VerificationReportListParams"] ) -> ListObject["VerificationReport"]: """ List all verification reports. @@ -517,7 +466,7 @@ async def list_async( @classmethod def retrieve( - cls, id: str, **params: Unpack["VerificationReport.RetrieveParams"] + cls, id: str, **params: Unpack["VerificationReportRetrieveParams"] ) -> "VerificationReport": """ Retrieves an existing VerificationReport @@ -528,7 +477,7 @@ def retrieve( @classmethod async def retrieve_async( - cls, id: str, **params: Unpack["VerificationReport.RetrieveParams"] + cls, id: str, **params: Unpack["VerificationReportRetrieveParams"] ) -> "VerificationReport": """ Retrieves an existing VerificationReport diff --git a/stripe/identity/_verification_report_service.py b/stripe/identity/_verification_report_service.py index f9f5940b7..8ea97bfb2 100644 --- a/stripe/identity/_verification_report_service.py +++ b/stripe/identity/_verification_report_service.py @@ -5,72 +5,22 @@ from stripe._stripe_service import StripeService from stripe._util import sanitize_id from stripe.identity._verification_report import VerificationReport -from typing import List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params.identity._verification_report_list_params import ( + VerificationReportListParams, + ) + from stripe.params.identity._verification_report_retrieve_params import ( + VerificationReportRetrieveParams, + ) -class VerificationReportService(StripeService): - class ListParams(TypedDict): - client_reference_id: NotRequired[str] - """ - A string to reference this user. This can be a customer ID, a session ID, or similar, and can be used to reconcile this verification with your internal systems. - """ - created: NotRequired["VerificationReportService.ListParamsCreated|int"] - """ - Only return VerificationReports that were created during the given date interval. - """ - 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. - """ - type: NotRequired[Literal["document", "id_number"]] - """ - Only return VerificationReports of this type - """ - verification_session: NotRequired[str] - """ - Only return VerificationReports created by this VerificationSession ID. It is allowed to provide a VerificationIntent ID. - """ - - class ListParamsCreated(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) - """ - - class RetrieveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ +class VerificationReportService(StripeService): def list( self, - params: Optional["VerificationReportService.ListParams"] = None, + params: Optional["VerificationReportListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[VerificationReport]: """ @@ -89,7 +39,7 @@ def list( async def list_async( self, - params: Optional["VerificationReportService.ListParams"] = None, + params: Optional["VerificationReportListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[VerificationReport]: """ @@ -109,7 +59,7 @@ async def list_async( def retrieve( self, report: str, - params: Optional["VerificationReportService.RetrieveParams"] = None, + params: Optional["VerificationReportRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> VerificationReport: """ @@ -131,7 +81,7 @@ def retrieve( async def retrieve_async( self, report: str, - params: Optional["VerificationReportService.RetrieveParams"] = None, + params: Optional["VerificationReportRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> VerificationReport: """ diff --git a/stripe/identity/_verification_session.py b/stripe/identity/_verification_session.py index d1127b591..02e248f9b 100644 --- a/stripe/identity/_verification_session.py +++ b/stripe/identity/_verification_session.py @@ -4,21 +4,32 @@ from stripe._expandable_field import ExpandableField from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource -from stripe._request_options import RequestOptions from stripe._stripe_object import StripeObject from stripe._updateable_api_resource import UpdateableAPIResource from stripe._util import class_method_variant, sanitize_id from typing import ClassVar, Dict, List, Optional, cast, overload -from typing_extensions import ( - Literal, - NotRequired, - TypedDict, - Unpack, - TYPE_CHECKING, -) +from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: from stripe.identity._verification_report import VerificationReport + from stripe.params.identity._verification_session_cancel_params import ( + VerificationSessionCancelParams, + ) + from stripe.params.identity._verification_session_create_params import ( + VerificationSessionCreateParams, + ) + from stripe.params.identity._verification_session_list_params import ( + VerificationSessionListParams, + ) + from stripe.params.identity._verification_session_modify_params import ( + VerificationSessionModifyParams, + ) + from stripe.params.identity._verification_session_redact_params import ( + VerificationSessionRedactParams, + ) + from stripe.params.identity._verification_session_retrieve_params import ( + VerificationSessionRetrieveParams, + ) class VerificationSession( @@ -248,236 +259,6 @@ class Dob(StripeObject): """ _inner_class_types = {"address": Address, "dob": Dob} - class CancelParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class CreateParams(RequestOptions): - client_reference_id: NotRequired[str] - """ - A string to reference this user. This can be a customer ID, a session ID, or similar, and can be used to reconcile this verification with your internal systems. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - options: NotRequired["VerificationSession.CreateParamsOptions"] - """ - A set of options for the session's verification checks. - """ - provided_details: NotRequired[ - "VerificationSession.CreateParamsProvidedDetails" - ] - """ - Details provided about the user being verified. These details may be shown to the user. - """ - related_customer: NotRequired[str] - """ - Customer ID - """ - related_customer_account: NotRequired[str] - """ - Token referencing a Customer Account resource. - """ - related_person: NotRequired[ - "VerificationSession.CreateParamsRelatedPerson" - ] - """ - Tokens referencing a Person resource and it's associated account. - """ - return_url: NotRequired[str] - """ - The URL that the user will be redirected to upon completing the verification flow. - """ - type: NotRequired[Literal["document", "id_number"]] - """ - The type of [verification check](https://stripe.com/docs/identity/verification-checks) to be performed. You must provide a `type` if not passing `verification_flow`. - """ - verification_flow: NotRequired[str] - """ - The ID of a verification flow from the Dashboard. See https://docs.stripe.com/identity/verification-flows. - """ - - class CreateParamsOptions(TypedDict): - document: NotRequired[ - "Literal['']|VerificationSession.CreateParamsOptionsDocument" - ] - """ - Options that apply to the [document check](https://stripe.com/docs/identity/verification-checks?type=document). - """ - - class CreateParamsOptionsDocument(TypedDict): - allowed_types: NotRequired[ - List[Literal["driving_license", "id_card", "passport"]] - ] - """ - Array of strings of allowed identity document types. If the provided identity document isn't one of the allowed types, the verification check will fail with a document_type_not_allowed error code. - """ - require_id_number: NotRequired[bool] - """ - Collect an ID number and perform an [ID number check](https://stripe.com/docs/identity/verification-checks?type=id-number) with the document's extracted name and date of birth. - """ - require_live_capture: NotRequired[bool] - """ - Disable image uploads, identity document images have to be captured using the device's camera. - """ - require_matching_selfie: NotRequired[bool] - """ - Capture a face image and perform a [selfie check](https://stripe.com/docs/identity/verification-checks?type=selfie) comparing a photo ID and a picture of your user's face. [Learn more](https://stripe.com/docs/identity/selfie). - """ - - class CreateParamsProvidedDetails(TypedDict): - email: NotRequired[str] - """ - Email of user being verified - """ - phone: NotRequired[str] - """ - Phone number of user being verified - """ - - class CreateParamsRelatedPerson(TypedDict): - account: str - """ - A token representing a connected account. If provided, the person parameter is also required and must be associated with the account. - """ - person: str - """ - A token referencing a Person resource that this verification is being used to verify. - """ - - class ListParams(RequestOptions): - client_reference_id: NotRequired[str] - """ - A string to reference this user. This can be a customer ID, a session ID, or similar, and can be used to reconcile this verification with your internal systems. - """ - created: NotRequired["VerificationSession.ListParamsCreated|int"] - """ - Only return VerificationSessions that were created during the given date interval. - """ - 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. - """ - related_customer: NotRequired[str] - related_customer_account: NotRequired[str] - 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. - """ - status: NotRequired[ - Literal["canceled", "processing", "requires_input", "verified"] - ] - """ - Only return VerificationSessions with this status. [Learn more about the lifecycle of sessions](https://stripe.com/docs/identity/how-sessions-work). - """ - - class ListParamsCreated(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) - """ - - class ModifyParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - options: NotRequired["VerificationSession.ModifyParamsOptions"] - """ - A set of options for the session's verification checks. - """ - provided_details: NotRequired[ - "VerificationSession.ModifyParamsProvidedDetails" - ] - """ - Details provided about the user being verified. These details may be shown to the user. - """ - type: NotRequired[Literal["document", "id_number"]] - """ - The type of [verification check](https://stripe.com/docs/identity/verification-checks) to be performed. - """ - - class ModifyParamsOptions(TypedDict): - document: NotRequired[ - "Literal['']|VerificationSession.ModifyParamsOptionsDocument" - ] - """ - Options that apply to the [document check](https://stripe.com/docs/identity/verification-checks?type=document). - """ - - class ModifyParamsOptionsDocument(TypedDict): - allowed_types: NotRequired[ - List[Literal["driving_license", "id_card", "passport"]] - ] - """ - Array of strings of allowed identity document types. If the provided identity document isn't one of the allowed types, the verification check will fail with a document_type_not_allowed error code. - """ - require_id_number: NotRequired[bool] - """ - Collect an ID number and perform an [ID number check](https://stripe.com/docs/identity/verification-checks?type=id-number) with the document's extracted name and date of birth. - """ - require_live_capture: NotRequired[bool] - """ - Disable image uploads, identity document images have to be captured using the device's camera. - """ - require_matching_selfie: NotRequired[bool] - """ - Capture a face image and perform a [selfie check](https://stripe.com/docs/identity/verification-checks?type=selfie) comparing a photo ID and a picture of your user's face. [Learn more](https://stripe.com/docs/identity/selfie). - """ - - class ModifyParamsProvidedDetails(TypedDict): - email: NotRequired[str] - """ - Email of user being verified - """ - phone: NotRequired[str] - """ - Phone number of user being verified - """ - - class RedactParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class RetrieveParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - client_reference_id: Optional[str] """ A string to reference this user. This can be a customer ID, a session ID, or similar, and can be used to reconcile this verification with your internal systems. @@ -558,7 +339,7 @@ class RetrieveParams(RequestOptions): @classmethod def _cls_cancel( - cls, session: str, **params: Unpack["VerificationSession.CancelParams"] + cls, session: str, **params: Unpack["VerificationSessionCancelParams"] ) -> "VerificationSession": """ A VerificationSession object can be canceled when it is in requires_input [status](https://docs.stripe.com/docs/identity/how-sessions-work). @@ -579,7 +360,7 @@ def _cls_cancel( @overload @staticmethod def cancel( - session: str, **params: Unpack["VerificationSession.CancelParams"] + session: str, **params: Unpack["VerificationSessionCancelParams"] ) -> "VerificationSession": """ A VerificationSession object can be canceled when it is in requires_input [status](https://docs.stripe.com/docs/identity/how-sessions-work). @@ -590,7 +371,7 @@ def cancel( @overload def cancel( - self, **params: Unpack["VerificationSession.CancelParams"] + self, **params: Unpack["VerificationSessionCancelParams"] ) -> "VerificationSession": """ A VerificationSession object can be canceled when it is in requires_input [status](https://docs.stripe.com/docs/identity/how-sessions-work). @@ -601,7 +382,7 @@ def cancel( @class_method_variant("_cls_cancel") def cancel( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["VerificationSession.CancelParams"] + self, **params: Unpack["VerificationSessionCancelParams"] ) -> "VerificationSession": """ A VerificationSession object can be canceled when it is in requires_input [status](https://docs.stripe.com/docs/identity/how-sessions-work). @@ -621,7 +402,7 @@ def cancel( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_cancel_async( - cls, session: str, **params: Unpack["VerificationSession.CancelParams"] + cls, session: str, **params: Unpack["VerificationSessionCancelParams"] ) -> "VerificationSession": """ A VerificationSession object can be canceled when it is in requires_input [status](https://docs.stripe.com/docs/identity/how-sessions-work). @@ -642,7 +423,7 @@ async def _cls_cancel_async( @overload @staticmethod async def cancel_async( - session: str, **params: Unpack["VerificationSession.CancelParams"] + session: str, **params: Unpack["VerificationSessionCancelParams"] ) -> "VerificationSession": """ A VerificationSession object can be canceled when it is in requires_input [status](https://docs.stripe.com/docs/identity/how-sessions-work). @@ -653,7 +434,7 @@ async def cancel_async( @overload async def cancel_async( - self, **params: Unpack["VerificationSession.CancelParams"] + self, **params: Unpack["VerificationSessionCancelParams"] ) -> "VerificationSession": """ A VerificationSession object can be canceled when it is in requires_input [status](https://docs.stripe.com/docs/identity/how-sessions-work). @@ -664,7 +445,7 @@ async def cancel_async( @class_method_variant("_cls_cancel_async") async def cancel_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["VerificationSession.CancelParams"] + self, **params: Unpack["VerificationSessionCancelParams"] ) -> "VerificationSession": """ A VerificationSession object can be canceled when it is in requires_input [status](https://docs.stripe.com/docs/identity/how-sessions-work). @@ -684,7 +465,7 @@ async def cancel_async( # pyright: ignore[reportGeneralTypeIssues] @classmethod def create( - cls, **params: Unpack["VerificationSession.CreateParams"] + cls, **params: Unpack["VerificationSessionCreateParams"] ) -> "VerificationSession": """ Creates a VerificationSession object. @@ -706,7 +487,7 @@ def create( @classmethod async def create_async( - cls, **params: Unpack["VerificationSession.CreateParams"] + cls, **params: Unpack["VerificationSessionCreateParams"] ) -> "VerificationSession": """ Creates a VerificationSession object. @@ -728,7 +509,7 @@ async def create_async( @classmethod def list( - cls, **params: Unpack["VerificationSession.ListParams"] + cls, **params: Unpack["VerificationSessionListParams"] ) -> ListObject["VerificationSession"]: """ Returns a list of VerificationSessions @@ -748,7 +529,7 @@ def list( @classmethod async def list_async( - cls, **params: Unpack["VerificationSession.ListParams"] + cls, **params: Unpack["VerificationSessionListParams"] ) -> ListObject["VerificationSession"]: """ Returns a list of VerificationSessions @@ -768,7 +549,7 @@ async def list_async( @classmethod def modify( - cls, id: str, **params: Unpack["VerificationSession.ModifyParams"] + cls, id: str, **params: Unpack["VerificationSessionModifyParams"] ) -> "VerificationSession": """ Updates a VerificationSession object. @@ -788,7 +569,7 @@ def modify( @classmethod async def modify_async( - cls, id: str, **params: Unpack["VerificationSession.ModifyParams"] + cls, id: str, **params: Unpack["VerificationSessionModifyParams"] ) -> "VerificationSession": """ Updates a VerificationSession object. @@ -808,7 +589,7 @@ async def modify_async( @classmethod def _cls_redact( - cls, session: str, **params: Unpack["VerificationSession.RedactParams"] + cls, session: str, **params: Unpack["VerificationSessionRedactParams"] ) -> "VerificationSession": """ Redact a VerificationSession to remove all collected information from Stripe. This will redact @@ -845,7 +626,7 @@ def _cls_redact( @overload @staticmethod def redact( - session: str, **params: Unpack["VerificationSession.RedactParams"] + session: str, **params: Unpack["VerificationSessionRedactParams"] ) -> "VerificationSession": """ Redact a VerificationSession to remove all collected information from Stripe. This will redact @@ -872,7 +653,7 @@ def redact( @overload def redact( - self, **params: Unpack["VerificationSession.RedactParams"] + self, **params: Unpack["VerificationSessionRedactParams"] ) -> "VerificationSession": """ Redact a VerificationSession to remove all collected information from Stripe. This will redact @@ -899,7 +680,7 @@ def redact( @class_method_variant("_cls_redact") def redact( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["VerificationSession.RedactParams"] + self, **params: Unpack["VerificationSessionRedactParams"] ) -> "VerificationSession": """ Redact a VerificationSession to remove all collected information from Stripe. This will redact @@ -935,7 +716,7 @@ def redact( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_redact_async( - cls, session: str, **params: Unpack["VerificationSession.RedactParams"] + cls, session: str, **params: Unpack["VerificationSessionRedactParams"] ) -> "VerificationSession": """ Redact a VerificationSession to remove all collected information from Stripe. This will redact @@ -972,7 +753,7 @@ async def _cls_redact_async( @overload @staticmethod async def redact_async( - session: str, **params: Unpack["VerificationSession.RedactParams"] + session: str, **params: Unpack["VerificationSessionRedactParams"] ) -> "VerificationSession": """ Redact a VerificationSession to remove all collected information from Stripe. This will redact @@ -999,7 +780,7 @@ async def redact_async( @overload async def redact_async( - self, **params: Unpack["VerificationSession.RedactParams"] + self, **params: Unpack["VerificationSessionRedactParams"] ) -> "VerificationSession": """ Redact a VerificationSession to remove all collected information from Stripe. This will redact @@ -1026,7 +807,7 @@ async def redact_async( @class_method_variant("_cls_redact_async") async def redact_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["VerificationSession.RedactParams"] + self, **params: Unpack["VerificationSessionRedactParams"] ) -> "VerificationSession": """ Redact a VerificationSession to remove all collected information from Stripe. This will redact @@ -1062,7 +843,7 @@ async def redact_async( # pyright: ignore[reportGeneralTypeIssues] @classmethod def retrieve( - cls, id: str, **params: Unpack["VerificationSession.RetrieveParams"] + cls, id: str, **params: Unpack["VerificationSessionRetrieveParams"] ) -> "VerificationSession": """ Retrieves the details of a VerificationSession that was previously created. @@ -1076,7 +857,7 @@ def retrieve( @classmethod async def retrieve_async( - cls, id: str, **params: Unpack["VerificationSession.RetrieveParams"] + cls, id: str, **params: Unpack["VerificationSessionRetrieveParams"] ) -> "VerificationSession": """ Retrieves the details of a VerificationSession that was previously created. diff --git a/stripe/identity/_verification_session_service.py b/stripe/identity/_verification_session_service.py index e92d5d697..aa48f91fa 100644 --- a/stripe/identity/_verification_session_service.py +++ b/stripe/identity/_verification_session_service.py @@ -5,246 +5,34 @@ from stripe._stripe_service import StripeService from stripe._util import sanitize_id from stripe.identity._verification_session import VerificationSession -from typing import Dict, List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params.identity._verification_session_cancel_params import ( + VerificationSessionCancelParams, + ) + from stripe.params.identity._verification_session_create_params import ( + VerificationSessionCreateParams, + ) + from stripe.params.identity._verification_session_list_params import ( + VerificationSessionListParams, + ) + from stripe.params.identity._verification_session_redact_params import ( + VerificationSessionRedactParams, + ) + from stripe.params.identity._verification_session_retrieve_params import ( + VerificationSessionRetrieveParams, + ) + from stripe.params.identity._verification_session_update_params import ( + VerificationSessionUpdateParams, + ) class VerificationSessionService(StripeService): - class CancelParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class CreateParams(TypedDict): - client_reference_id: NotRequired[str] - """ - A string to reference this user. This can be a customer ID, a session ID, or similar, and can be used to reconcile this verification with your internal systems. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - options: NotRequired["VerificationSessionService.CreateParamsOptions"] - """ - A set of options for the session's verification checks. - """ - provided_details: NotRequired[ - "VerificationSessionService.CreateParamsProvidedDetails" - ] - """ - Details provided about the user being verified. These details may be shown to the user. - """ - related_customer: NotRequired[str] - """ - Customer ID - """ - related_customer_account: NotRequired[str] - """ - Token referencing a Customer Account resource. - """ - related_person: NotRequired[ - "VerificationSessionService.CreateParamsRelatedPerson" - ] - """ - Tokens referencing a Person resource and it's associated account. - """ - return_url: NotRequired[str] - """ - The URL that the user will be redirected to upon completing the verification flow. - """ - type: NotRequired[Literal["document", "id_number"]] - """ - The type of [verification check](https://stripe.com/docs/identity/verification-checks) to be performed. You must provide a `type` if not passing `verification_flow`. - """ - verification_flow: NotRequired[str] - """ - The ID of a verification flow from the Dashboard. See https://docs.stripe.com/identity/verification-flows. - """ - - class CreateParamsOptions(TypedDict): - document: NotRequired[ - "Literal['']|VerificationSessionService.CreateParamsOptionsDocument" - ] - """ - Options that apply to the [document check](https://stripe.com/docs/identity/verification-checks?type=document). - """ - - class CreateParamsOptionsDocument(TypedDict): - allowed_types: NotRequired[ - List[Literal["driving_license", "id_card", "passport"]] - ] - """ - Array of strings of allowed identity document types. If the provided identity document isn't one of the allowed types, the verification check will fail with a document_type_not_allowed error code. - """ - require_id_number: NotRequired[bool] - """ - Collect an ID number and perform an [ID number check](https://stripe.com/docs/identity/verification-checks?type=id-number) with the document's extracted name and date of birth. - """ - require_live_capture: NotRequired[bool] - """ - Disable image uploads, identity document images have to be captured using the device's camera. - """ - require_matching_selfie: NotRequired[bool] - """ - Capture a face image and perform a [selfie check](https://stripe.com/docs/identity/verification-checks?type=selfie) comparing a photo ID and a picture of your user's face. [Learn more](https://stripe.com/docs/identity/selfie). - """ - - class CreateParamsProvidedDetails(TypedDict): - email: NotRequired[str] - """ - Email of user being verified - """ - phone: NotRequired[str] - """ - Phone number of user being verified - """ - - class CreateParamsRelatedPerson(TypedDict): - account: str - """ - A token representing a connected account. If provided, the person parameter is also required and must be associated with the account. - """ - person: str - """ - A token referencing a Person resource that this verification is being used to verify. - """ - - class ListParams(TypedDict): - client_reference_id: NotRequired[str] - """ - A string to reference this user. This can be a customer ID, a session ID, or similar, and can be used to reconcile this verification with your internal systems. - """ - created: NotRequired[ - "VerificationSessionService.ListParamsCreated|int" - ] - """ - Only return VerificationSessions that were created during the given date interval. - """ - 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. - """ - related_customer: NotRequired[str] - related_customer_account: NotRequired[str] - 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. - """ - status: NotRequired[ - Literal["canceled", "processing", "requires_input", "verified"] - ] - """ - Only return VerificationSessions with this status. [Learn more about the lifecycle of sessions](https://stripe.com/docs/identity/how-sessions-work). - """ - - class ListParamsCreated(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) - """ - - class RedactParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class RetrieveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class UpdateParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - options: NotRequired["VerificationSessionService.UpdateParamsOptions"] - """ - A set of options for the session's verification checks. - """ - provided_details: NotRequired[ - "VerificationSessionService.UpdateParamsProvidedDetails" - ] - """ - Details provided about the user being verified. These details may be shown to the user. - """ - type: NotRequired[Literal["document", "id_number"]] - """ - The type of [verification check](https://stripe.com/docs/identity/verification-checks) to be performed. - """ - - class UpdateParamsOptions(TypedDict): - document: NotRequired[ - "Literal['']|VerificationSessionService.UpdateParamsOptionsDocument" - ] - """ - Options that apply to the [document check](https://stripe.com/docs/identity/verification-checks?type=document). - """ - - class UpdateParamsOptionsDocument(TypedDict): - allowed_types: NotRequired[ - List[Literal["driving_license", "id_card", "passport"]] - ] - """ - Array of strings of allowed identity document types. If the provided identity document isn't one of the allowed types, the verification check will fail with a document_type_not_allowed error code. - """ - require_id_number: NotRequired[bool] - """ - Collect an ID number and perform an [ID number check](https://stripe.com/docs/identity/verification-checks?type=id-number) with the document's extracted name and date of birth. - """ - require_live_capture: NotRequired[bool] - """ - Disable image uploads, identity document images have to be captured using the device's camera. - """ - require_matching_selfie: NotRequired[bool] - """ - Capture a face image and perform a [selfie check](https://stripe.com/docs/identity/verification-checks?type=selfie) comparing a photo ID and a picture of your user's face. [Learn more](https://stripe.com/docs/identity/selfie). - """ - - class UpdateParamsProvidedDetails(TypedDict): - email: NotRequired[str] - """ - Email of user being verified - """ - phone: NotRequired[str] - """ - Phone number of user being verified - """ - def list( self, - params: Optional["VerificationSessionService.ListParams"] = None, + params: Optional["VerificationSessionListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[VerificationSession]: """ @@ -263,7 +51,7 @@ def list( async def list_async( self, - params: Optional["VerificationSessionService.ListParams"] = None, + params: Optional["VerificationSessionListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[VerificationSession]: """ @@ -282,7 +70,7 @@ async def list_async( def create( self, - params: Optional["VerificationSessionService.CreateParams"] = None, + params: Optional["VerificationSessionCreateParams"] = None, options: Optional[RequestOptions] = None, ) -> VerificationSession: """ @@ -307,7 +95,7 @@ def create( async def create_async( self, - params: Optional["VerificationSessionService.CreateParams"] = None, + params: Optional["VerificationSessionCreateParams"] = None, options: Optional[RequestOptions] = None, ) -> VerificationSession: """ @@ -333,7 +121,7 @@ async def create_async( def retrieve( self, session: str, - params: Optional["VerificationSessionService.RetrieveParams"] = None, + params: Optional["VerificationSessionRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> VerificationSession: """ @@ -358,7 +146,7 @@ def retrieve( async def retrieve_async( self, session: str, - params: Optional["VerificationSessionService.RetrieveParams"] = None, + params: Optional["VerificationSessionRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> VerificationSession: """ @@ -383,7 +171,7 @@ async def retrieve_async( def update( self, session: str, - params: Optional["VerificationSessionService.UpdateParams"] = None, + params: Optional["VerificationSessionUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> VerificationSession: """ @@ -408,7 +196,7 @@ def update( async def update_async( self, session: str, - params: Optional["VerificationSessionService.UpdateParams"] = None, + params: Optional["VerificationSessionUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> VerificationSession: """ @@ -433,7 +221,7 @@ async def update_async( def cancel( self, session: str, - params: Optional["VerificationSessionService.CancelParams"] = None, + params: Optional["VerificationSessionCancelParams"] = None, options: Optional[RequestOptions] = None, ) -> VerificationSession: """ @@ -457,7 +245,7 @@ def cancel( async def cancel_async( self, session: str, - params: Optional["VerificationSessionService.CancelParams"] = None, + params: Optional["VerificationSessionCancelParams"] = None, options: Optional[RequestOptions] = None, ) -> VerificationSession: """ @@ -481,7 +269,7 @@ async def cancel_async( def redact( self, session: str, - params: Optional["VerificationSessionService.RedactParams"] = None, + params: Optional["VerificationSessionRedactParams"] = None, options: Optional[RequestOptions] = None, ) -> VerificationSession: """ @@ -521,7 +309,7 @@ def redact( async def redact_async( self, session: str, - params: Optional["VerificationSessionService.RedactParams"] = None, + params: Optional["VerificationSessionRedactParams"] = None, options: Optional[RequestOptions] = None, ) -> VerificationSession: """ diff --git a/stripe/issuing/_authorization.py b/stripe/issuing/_authorization.py index 304715bc7..60e775d02 100644 --- a/stripe/issuing/_authorization.py +++ b/stripe/issuing/_authorization.py @@ -3,20 +3,12 @@ from stripe._expandable_field import ExpandableField from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource -from stripe._request_options import RequestOptions from stripe._stripe_object import StripeObject from stripe._test_helpers import APIResourceTestHelpers from stripe._updateable_api_resource import UpdateableAPIResource from stripe._util import class_method_variant, sanitize_id from typing import ClassVar, Dict, List, Optional, cast, overload -from typing_extensions import ( - Literal, - NotRequired, - Type, - TypedDict, - Unpack, - TYPE_CHECKING, -) +from typing_extensions import Literal, Type, Unpack, TYPE_CHECKING if TYPE_CHECKING: from stripe._balance_transaction import BalanceTransaction @@ -24,6 +16,42 @@ from stripe.issuing._cardholder import Cardholder from stripe.issuing._token import Token from stripe.issuing._transaction import Transaction + from stripe.params.issuing._authorization_approve_params import ( + AuthorizationApproveParams, + ) + from stripe.params.issuing._authorization_capture_params import ( + AuthorizationCaptureParams, + ) + from stripe.params.issuing._authorization_create_params import ( + AuthorizationCreateParams, + ) + from stripe.params.issuing._authorization_decline_params import ( + AuthorizationDeclineParams, + ) + from stripe.params.issuing._authorization_expire_params import ( + AuthorizationExpireParams, + ) + from stripe.params.issuing._authorization_finalize_amount_params import ( + AuthorizationFinalizeAmountParams, + ) + from stripe.params.issuing._authorization_increment_params import ( + AuthorizationIncrementParams, + ) + from stripe.params.issuing._authorization_list_params import ( + AuthorizationListParams, + ) + from stripe.params.issuing._authorization_modify_params import ( + AuthorizationModifyParams, + ) + from stripe.params.issuing._authorization_respond_params import ( + AuthorizationRespondParams, + ) + from stripe.params.issuing._authorization_retrieve_params import ( + AuthorizationRetrieveParams, + ) + from stripe.params.issuing._authorization_reverse_params import ( + AuthorizationReverseParams, + ) class Authorization( @@ -459,1202 +487,6 @@ class ThreeDSecure(StripeObject): "three_d_secure": ThreeDSecure, } - class ApproveParams(RequestOptions): - amount: NotRequired[int] - """ - If the authorization's `pending_request.is_amount_controllable` property is `true`, you may provide this value to control how much to hold for the authorization. Must be positive (use [`decline`](https://stripe.com/docs/api/issuing/authorizations/decline) to decline an authorization request). - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - - class CaptureParams(RequestOptions): - capture_amount: NotRequired[int] - """ - The amount to capture from the authorization. If not provided, the full amount of the authorization will be captured. This amount is in the authorization currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). - """ - close_authorization: NotRequired[bool] - """ - Whether to close the authorization after capture. Defaults to true. Set to false to enable multi-capture flows. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - purchase_details: NotRequired[ - "Authorization.CaptureParamsPurchaseDetails" - ] - """ - Additional purchase information that is optionally provided by the merchant. - """ - - class CaptureParamsPurchaseDetails(TypedDict): - fleet: NotRequired["Authorization.CaptureParamsPurchaseDetailsFleet"] - """ - Fleet-specific information for transactions using Fleet cards. - """ - flight: NotRequired["Authorization.CaptureParamsPurchaseDetailsFlight"] - """ - Information about the flight that was purchased with this transaction. - """ - fuel: NotRequired["Authorization.CaptureParamsPurchaseDetailsFuel"] - """ - Information about fuel that was purchased with this transaction. - """ - lodging: NotRequired[ - "Authorization.CaptureParamsPurchaseDetailsLodging" - ] - """ - Information about lodging that was purchased with this transaction. - """ - receipt: NotRequired[ - List["Authorization.CaptureParamsPurchaseDetailsReceipt"] - ] - """ - The line items in the purchase. - """ - reference: NotRequired[str] - """ - A merchant-specific order number. - """ - - class CaptureParamsPurchaseDetailsFleet(TypedDict): - cardholder_prompt_data: NotRequired[ - "Authorization.CaptureParamsPurchaseDetailsFleetCardholderPromptData" - ] - """ - Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry. - """ - purchase_type: NotRequired[ - Literal[ - "fuel_and_non_fuel_purchase", - "fuel_purchase", - "non_fuel_purchase", - ] - ] - """ - The type of purchase. One of `fuel_purchase`, `non_fuel_purchase`, or `fuel_and_non_fuel_purchase`. - """ - reported_breakdown: NotRequired[ - "Authorization.CaptureParamsPurchaseDetailsFleetReportedBreakdown" - ] - """ - More information about the total amount. This information is not guaranteed to be accurate as some merchants may provide unreliable data. - """ - service_type: NotRequired[ - Literal["full_service", "non_fuel_transaction", "self_service"] - ] - """ - The type of fuel service. One of `non_fuel_transaction`, `full_service`, or `self_service`. - """ - - class CaptureParamsPurchaseDetailsFleetCardholderPromptData(TypedDict): - driver_id: NotRequired[str] - """ - Driver ID. - """ - odometer: NotRequired[int] - """ - Odometer reading. - """ - unspecified_id: NotRequired[str] - """ - An alphanumeric ID. This field is used when a vehicle ID, driver ID, or generic ID is entered by the cardholder, but the merchant or card network did not specify the prompt type. - """ - user_id: NotRequired[str] - """ - User ID. - """ - vehicle_number: NotRequired[str] - """ - Vehicle number. - """ - - class CaptureParamsPurchaseDetailsFleetReportedBreakdown(TypedDict): - fuel: NotRequired[ - "Authorization.CaptureParamsPurchaseDetailsFleetReportedBreakdownFuel" - ] - """ - Breakdown of fuel portion of the purchase. - """ - non_fuel: NotRequired[ - "Authorization.CaptureParamsPurchaseDetailsFleetReportedBreakdownNonFuel" - ] - """ - Breakdown of non-fuel portion of the purchase. - """ - tax: NotRequired[ - "Authorization.CaptureParamsPurchaseDetailsFleetReportedBreakdownTax" - ] - """ - Information about tax included in this transaction. - """ - - class CaptureParamsPurchaseDetailsFleetReportedBreakdownFuel(TypedDict): - gross_amount_decimal: NotRequired[str] - """ - Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive of taxes. - """ - - class CaptureParamsPurchaseDetailsFleetReportedBreakdownNonFuel(TypedDict): - gross_amount_decimal: NotRequired[str] - """ - Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes. - """ - - class CaptureParamsPurchaseDetailsFleetReportedBreakdownTax(TypedDict): - local_amount_decimal: NotRequired[str] - """ - Amount of state or provincial Sales Tax included in the transaction amount. Null if not reported by merchant or not subject to tax. - """ - national_amount_decimal: NotRequired[str] - """ - Amount of national Sales Tax or VAT included in the transaction amount. Null if not reported by merchant or not subject to tax. - """ - - class CaptureParamsPurchaseDetailsFlight(TypedDict): - departure_at: NotRequired[int] - """ - The time that the flight departed. - """ - passenger_name: NotRequired[str] - """ - The name of the passenger. - """ - refundable: NotRequired[bool] - """ - Whether the ticket is refundable. - """ - segments: NotRequired[ - List["Authorization.CaptureParamsPurchaseDetailsFlightSegment"] - ] - """ - The legs of the trip. - """ - travel_agency: NotRequired[str] - """ - The travel agency that issued the ticket. - """ - - class CaptureParamsPurchaseDetailsFlightSegment(TypedDict): - arrival_airport_code: NotRequired[str] - """ - The three-letter IATA airport code of the flight's destination. - """ - carrier: NotRequired[str] - """ - The airline carrier code. - """ - departure_airport_code: NotRequired[str] - """ - The three-letter IATA airport code that the flight departed from. - """ - flight_number: NotRequired[str] - """ - The flight number. - """ - service_class: NotRequired[str] - """ - The flight's service class. - """ - stopover_allowed: NotRequired[bool] - """ - Whether a stopover is allowed on this flight. - """ - - class CaptureParamsPurchaseDetailsFuel(TypedDict): - industry_product_code: NotRequired[str] - """ - [Conexxus Payment System Product Code](https://www.conexxus.org/conexxus-payment-system-product-codes) identifying the primary fuel product purchased. - """ - quantity_decimal: NotRequired[str] - """ - The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places. - """ - type: NotRequired[ - Literal[ - "diesel", - "other", - "unleaded_plus", - "unleaded_regular", - "unleaded_super", - ] - ] - """ - The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`. - """ - unit: NotRequired[ - Literal[ - "charging_minute", - "imperial_gallon", - "kilogram", - "kilowatt_hour", - "liter", - "other", - "pound", - "us_gallon", - ] - ] - """ - The units for `quantity_decimal`. One of `charging_minute`, `imperial_gallon`, `kilogram`, `kilowatt_hour`, `liter`, `pound`, `us_gallon`, or `other`. - """ - unit_cost_decimal: NotRequired[str] - """ - The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places. - """ - - class CaptureParamsPurchaseDetailsLodging(TypedDict): - check_in_at: NotRequired[int] - """ - The time of checking into the lodging. - """ - nights: NotRequired[int] - """ - The number of nights stayed at the lodging. - """ - - class CaptureParamsPurchaseDetailsReceipt(TypedDict): - description: NotRequired[str] - quantity: NotRequired[str] - total: NotRequired[int] - unit_cost: NotRequired[int] - - class CreateParams(RequestOptions): - amount: NotRequired[int] - """ - The total amount to attempt to authorize. This amount is in the provided currency, or defaults to the card's currency, and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). - """ - amount_details: NotRequired["Authorization.CreateParamsAmountDetails"] - """ - Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). - """ - authorization_method: NotRequired[ - Literal["chip", "contactless", "keyed_in", "online", "swipe"] - ] - """ - How the card details were provided. Defaults to online. - """ - card: str - """ - Card associated with this authorization. - """ - currency: NotRequired[str] - """ - The currency of the authorization. If not provided, defaults to the currency of the card. 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. - """ - fleet: NotRequired["Authorization.CreateParamsFleet"] - """ - Fleet-specific information for authorizations using Fleet cards. - """ - fraud_disputability_likelihood: NotRequired[ - Literal["neutral", "unknown", "very_likely", "very_unlikely"] - ] - """ - Probability that this transaction can be disputed in the event of fraud. Assessed by comparing the characteristics of the authorization to card network rules. - """ - fuel: NotRequired["Authorization.CreateParamsFuel"] - """ - Information about fuel that was purchased with this transaction. - """ - is_amount_controllable: NotRequired[bool] - """ - If set `true`, you may provide [amount](https://stripe.com/docs/api/issuing/authorizations/approve#approve_issuing_authorization-amount) to control how much to hold for the authorization. - """ - merchant_amount: NotRequired[int] - """ - The total amount to attempt to authorize. This amount is in the provided merchant currency, and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). - """ - merchant_currency: NotRequired[str] - """ - The currency of the authorization. If not provided, defaults to the currency of the card. 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). - """ - merchant_data: NotRequired["Authorization.CreateParamsMerchantData"] - """ - Details about the seller (grocery store, e-commerce website, etc.) where the card authorization happened. - """ - network_data: NotRequired["Authorization.CreateParamsNetworkData"] - """ - Details about the authorization, such as identifiers, set by the card network. - """ - risk_assessment: NotRequired[ - "Authorization.CreateParamsRiskAssessment" - ] - """ - Stripe's assessment of the fraud risk for this authorization. - """ - verification_data: NotRequired[ - "Authorization.CreateParamsVerificationData" - ] - """ - Verifications that Stripe performed on information that the cardholder provided to the merchant. - """ - wallet: NotRequired[Literal["apple_pay", "google_pay", "samsung_pay"]] - """ - The digital wallet used for this transaction. One of `apple_pay`, `google_pay`, or `samsung_pay`. Will populate as `null` when no digital wallet was utilized. - """ - - class CreateParamsAmountDetails(TypedDict): - atm_fee: NotRequired[int] - """ - The ATM withdrawal fee. - """ - cashback_amount: NotRequired[int] - """ - The amount of cash requested by the cardholder. - """ - - class CreateParamsFleet(TypedDict): - cardholder_prompt_data: NotRequired[ - "Authorization.CreateParamsFleetCardholderPromptData" - ] - """ - Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry. - """ - purchase_type: NotRequired[ - Literal[ - "fuel_and_non_fuel_purchase", - "fuel_purchase", - "non_fuel_purchase", - ] - ] - """ - The type of purchase. One of `fuel_purchase`, `non_fuel_purchase`, or `fuel_and_non_fuel_purchase`. - """ - reported_breakdown: NotRequired[ - "Authorization.CreateParamsFleetReportedBreakdown" - ] - """ - More information about the total amount. This information is not guaranteed to be accurate as some merchants may provide unreliable data. - """ - service_type: NotRequired[ - Literal["full_service", "non_fuel_transaction", "self_service"] - ] - """ - The type of fuel service. One of `non_fuel_transaction`, `full_service`, or `self_service`. - """ - - class CreateParamsFleetCardholderPromptData(TypedDict): - driver_id: NotRequired[str] - """ - Driver ID. - """ - odometer: NotRequired[int] - """ - Odometer reading. - """ - unspecified_id: NotRequired[str] - """ - An alphanumeric ID. This field is used when a vehicle ID, driver ID, or generic ID is entered by the cardholder, but the merchant or card network did not specify the prompt type. - """ - user_id: NotRequired[str] - """ - User ID. - """ - vehicle_number: NotRequired[str] - """ - Vehicle number. - """ - - class CreateParamsFleetReportedBreakdown(TypedDict): - fuel: NotRequired[ - "Authorization.CreateParamsFleetReportedBreakdownFuel" - ] - """ - Breakdown of fuel portion of the purchase. - """ - non_fuel: NotRequired[ - "Authorization.CreateParamsFleetReportedBreakdownNonFuel" - ] - """ - Breakdown of non-fuel portion of the purchase. - """ - tax: NotRequired["Authorization.CreateParamsFleetReportedBreakdownTax"] - """ - Information about tax included in this transaction. - """ - - class CreateParamsFleetReportedBreakdownFuel(TypedDict): - gross_amount_decimal: NotRequired[str] - """ - Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive of taxes. - """ - - class CreateParamsFleetReportedBreakdownNonFuel(TypedDict): - gross_amount_decimal: NotRequired[str] - """ - Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes. - """ - - class CreateParamsFleetReportedBreakdownTax(TypedDict): - local_amount_decimal: NotRequired[str] - """ - Amount of state or provincial Sales Tax included in the transaction amount. Null if not reported by merchant or not subject to tax. - """ - national_amount_decimal: NotRequired[str] - """ - Amount of national Sales Tax or VAT included in the transaction amount. Null if not reported by merchant or not subject to tax. - """ - - class CreateParamsFuel(TypedDict): - industry_product_code: NotRequired[str] - """ - [Conexxus Payment System Product Code](https://www.conexxus.org/conexxus-payment-system-product-codes) identifying the primary fuel product purchased. - """ - quantity_decimal: NotRequired[str] - """ - The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places. - """ - type: NotRequired[ - Literal[ - "diesel", - "other", - "unleaded_plus", - "unleaded_regular", - "unleaded_super", - ] - ] - """ - The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`. - """ - unit: NotRequired[ - Literal[ - "charging_minute", - "imperial_gallon", - "kilogram", - "kilowatt_hour", - "liter", - "other", - "pound", - "us_gallon", - ] - ] - """ - The units for `quantity_decimal`. One of `charging_minute`, `imperial_gallon`, `kilogram`, `kilowatt_hour`, `liter`, `pound`, `us_gallon`, or `other`. - """ - unit_cost_decimal: NotRequired[str] - """ - The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places. - """ - - class CreateParamsMerchantData(TypedDict): - category: NotRequired[ - Literal[ - "ac_refrigeration_repair", - "accounting_bookkeeping_services", - "advertising_services", - "agricultural_cooperative", - "airlines_air_carriers", - "airports_flying_fields", - "ambulance_services", - "amusement_parks_carnivals", - "antique_reproductions", - "antique_shops", - "aquariums", - "architectural_surveying_services", - "art_dealers_and_galleries", - "artists_supply_and_craft_shops", - "auto_and_home_supply_stores", - "auto_body_repair_shops", - "auto_paint_shops", - "auto_service_shops", - "automated_cash_disburse", - "automated_fuel_dispensers", - "automobile_associations", - "automotive_parts_and_accessories_stores", - "automotive_tire_stores", - "bail_and_bond_payments", - "bakeries", - "bands_orchestras", - "barber_and_beauty_shops", - "betting_casino_gambling", - "bicycle_shops", - "billiard_pool_establishments", - "boat_dealers", - "boat_rentals_and_leases", - "book_stores", - "books_periodicals_and_newspapers", - "bowling_alleys", - "bus_lines", - "business_secretarial_schools", - "buying_shopping_services", - "cable_satellite_and_other_pay_television_and_radio", - "camera_and_photographic_supply_stores", - "candy_nut_and_confectionery_stores", - "car_and_truck_dealers_new_used", - "car_and_truck_dealers_used_only", - "car_rental_agencies", - "car_washes", - "carpentry_services", - "carpet_upholstery_cleaning", - "caterers", - "charitable_and_social_service_organizations_fundraising", - "chemicals_and_allied_products", - "child_care_services", - "childrens_and_infants_wear_stores", - "chiropodists_podiatrists", - "chiropractors", - "cigar_stores_and_stands", - "civic_social_fraternal_associations", - "cleaning_and_maintenance", - "clothing_rental", - "colleges_universities", - "commercial_equipment", - "commercial_footwear", - "commercial_photography_art_and_graphics", - "commuter_transport_and_ferries", - "computer_network_services", - "computer_programming", - "computer_repair", - "computer_software_stores", - "computers_peripherals_and_software", - "concrete_work_services", - "construction_materials", - "consulting_public_relations", - "correspondence_schools", - "cosmetic_stores", - "counseling_services", - "country_clubs", - "courier_services", - "court_costs", - "credit_reporting_agencies", - "cruise_lines", - "dairy_products_stores", - "dance_hall_studios_schools", - "dating_escort_services", - "dentists_orthodontists", - "department_stores", - "detective_agencies", - "digital_goods_applications", - "digital_goods_games", - "digital_goods_large_volume", - "digital_goods_media", - "direct_marketing_catalog_merchant", - "direct_marketing_combination_catalog_and_retail_merchant", - "direct_marketing_inbound_telemarketing", - "direct_marketing_insurance_services", - "direct_marketing_other", - "direct_marketing_outbound_telemarketing", - "direct_marketing_subscription", - "direct_marketing_travel", - "discount_stores", - "doctors", - "door_to_door_sales", - "drapery_window_covering_and_upholstery_stores", - "drinking_places", - "drug_stores_and_pharmacies", - "drugs_drug_proprietaries_and_druggist_sundries", - "dry_cleaners", - "durable_goods", - "duty_free_stores", - "eating_places_restaurants", - "educational_services", - "electric_razor_stores", - "electric_vehicle_charging", - "electrical_parts_and_equipment", - "electrical_services", - "electronics_repair_shops", - "electronics_stores", - "elementary_secondary_schools", - "emergency_services_gcas_visa_use_only", - "employment_temp_agencies", - "equipment_rental", - "exterminating_services", - "family_clothing_stores", - "fast_food_restaurants", - "financial_institutions", - "fines_government_administrative_entities", - "fireplace_fireplace_screens_and_accessories_stores", - "floor_covering_stores", - "florists", - "florists_supplies_nursery_stock_and_flowers", - "freezer_and_locker_meat_provisioners", - "fuel_dealers_non_automotive", - "funeral_services_crematories", - "furniture_home_furnishings_and_equipment_stores_except_appliances", - "furniture_repair_refinishing", - "furriers_and_fur_shops", - "general_services", - "gift_card_novelty_and_souvenir_shops", - "glass_paint_and_wallpaper_stores", - "glassware_crystal_stores", - "golf_courses_public", - "government_licensed_horse_dog_racing_us_region_only", - "government_licensed_online_casions_online_gambling_us_region_only", - "government_owned_lotteries_non_us_region", - "government_owned_lotteries_us_region_only", - "government_services", - "grocery_stores_supermarkets", - "hardware_equipment_and_supplies", - "hardware_stores", - "health_and_beauty_spas", - "hearing_aids_sales_and_supplies", - "heating_plumbing_a_c", - "hobby_toy_and_game_shops", - "home_supply_warehouse_stores", - "hospitals", - "hotels_motels_and_resorts", - "household_appliance_stores", - "industrial_supplies", - "information_retrieval_services", - "insurance_default", - "insurance_underwriting_premiums", - "intra_company_purchases", - "jewelry_stores_watches_clocks_and_silverware_stores", - "landscaping_services", - "laundries", - "laundry_cleaning_services", - "legal_services_attorneys", - "luggage_and_leather_goods_stores", - "lumber_building_materials_stores", - "manual_cash_disburse", - "marinas_service_and_supplies", - "marketplaces", - "masonry_stonework_and_plaster", - "massage_parlors", - "medical_and_dental_labs", - "medical_dental_ophthalmic_and_hospital_equipment_and_supplies", - "medical_services", - "membership_organizations", - "mens_and_boys_clothing_and_accessories_stores", - "mens_womens_clothing_stores", - "metal_service_centers", - "miscellaneous_apparel_and_accessory_shops", - "miscellaneous_auto_dealers", - "miscellaneous_business_services", - "miscellaneous_food_stores", - "miscellaneous_general_merchandise", - "miscellaneous_general_services", - "miscellaneous_home_furnishing_specialty_stores", - "miscellaneous_publishing_and_printing", - "miscellaneous_recreation_services", - "miscellaneous_repair_shops", - "miscellaneous_specialty_retail", - "mobile_home_dealers", - "motion_picture_theaters", - "motor_freight_carriers_and_trucking", - "motor_homes_dealers", - "motor_vehicle_supplies_and_new_parts", - "motorcycle_shops_and_dealers", - "motorcycle_shops_dealers", - "music_stores_musical_instruments_pianos_and_sheet_music", - "news_dealers_and_newsstands", - "non_fi_money_orders", - "non_fi_stored_value_card_purchase_load", - "nondurable_goods", - "nurseries_lawn_and_garden_supply_stores", - "nursing_personal_care", - "office_and_commercial_furniture", - "opticians_eyeglasses", - "optometrists_ophthalmologist", - "orthopedic_goods_prosthetic_devices", - "osteopaths", - "package_stores_beer_wine_and_liquor", - "paints_varnishes_and_supplies", - "parking_lots_garages", - "passenger_railways", - "pawn_shops", - "pet_shops_pet_food_and_supplies", - "petroleum_and_petroleum_products", - "photo_developing", - "photographic_photocopy_microfilm_equipment_and_supplies", - "photographic_studios", - "picture_video_production", - "piece_goods_notions_and_other_dry_goods", - "plumbing_heating_equipment_and_supplies", - "political_organizations", - "postal_services_government_only", - "precious_stones_and_metals_watches_and_jewelry", - "professional_services", - "public_warehousing_and_storage", - "quick_copy_repro_and_blueprint", - "railroads", - "real_estate_agents_and_managers_rentals", - "record_stores", - "recreational_vehicle_rentals", - "religious_goods_stores", - "religious_organizations", - "roofing_siding_sheet_metal", - "secretarial_support_services", - "security_brokers_dealers", - "service_stations", - "sewing_needlework_fabric_and_piece_goods_stores", - "shoe_repair_hat_cleaning", - "shoe_stores", - "small_appliance_repair", - "snowmobile_dealers", - "special_trade_services", - "specialty_cleaning", - "sporting_goods_stores", - "sporting_recreation_camps", - "sports_and_riding_apparel_stores", - "sports_clubs_fields", - "stamp_and_coin_stores", - "stationary_office_supplies_printing_and_writing_paper", - "stationery_stores_office_and_school_supply_stores", - "swimming_pools_sales", - "t_ui_travel_germany", - "tailors_alterations", - "tax_payments_government_agencies", - "tax_preparation_services", - "taxicabs_limousines", - "telecommunication_equipment_and_telephone_sales", - "telecommunication_services", - "telegraph_services", - "tent_and_awning_shops", - "testing_laboratories", - "theatrical_ticket_agencies", - "timeshares", - "tire_retreading_and_repair", - "tolls_bridge_fees", - "tourist_attractions_and_exhibits", - "towing_services", - "trailer_parks_campgrounds", - "transportation_services", - "travel_agencies_tour_operators", - "truck_stop_iteration", - "truck_utility_trailer_rentals", - "typesetting_plate_making_and_related_services", - "typewriter_stores", - "u_s_federal_government_agencies_or_departments", - "uniforms_commercial_clothing", - "used_merchandise_and_secondhand_stores", - "utilities", - "variety_stores", - "veterinary_services", - "video_amusement_game_supplies", - "video_game_arcades", - "video_tape_rental_stores", - "vocational_trade_schools", - "watch_jewelry_repair", - "welding_repair", - "wholesale_clubs", - "wig_and_toupee_stores", - "wires_money_orders", - "womens_accessory_and_specialty_shops", - "womens_ready_to_wear_stores", - "wrecking_and_salvage_yards", - ] - ] - """ - A categorization of the seller's type of business. See our [merchant categories guide](https://stripe.com/docs/issuing/merchant-categories) for a list of possible values. - """ - city: NotRequired[str] - """ - City where the seller is located - """ - country: NotRequired[str] - """ - Country where the seller is located - """ - name: NotRequired[str] - """ - Name of the seller - """ - network_id: NotRequired[str] - """ - Identifier assigned to the seller by the card network. Different card networks may assign different network_id fields to the same merchant. - """ - postal_code: NotRequired[str] - """ - Postal code where the seller is located - """ - state: NotRequired[str] - """ - State where the seller is located - """ - terminal_id: NotRequired[str] - """ - An ID assigned by the seller to the location of the sale. - """ - url: NotRequired[str] - """ - URL provided by the merchant on a 3DS request - """ - - class CreateParamsNetworkData(TypedDict): - acquiring_institution_id: NotRequired[str] - """ - Identifier assigned to the acquirer by the card network. - """ - - class CreateParamsRiskAssessment(TypedDict): - card_testing_risk: NotRequired[ - "Authorization.CreateParamsRiskAssessmentCardTestingRisk" - ] - """ - Stripe's assessment of this authorization's likelihood of being card testing activity. - """ - merchant_dispute_risk: NotRequired[ - "Authorization.CreateParamsRiskAssessmentMerchantDisputeRisk" - ] - """ - The dispute risk of the merchant (the seller on a purchase) on an authorization based on all Stripe Issuing activity. - """ - - class CreateParamsRiskAssessmentCardTestingRisk(TypedDict): - invalid_account_number_decline_rate_past_hour: NotRequired[int] - """ - The % of declines due to a card number not existing in the past hour, taking place at the same merchant. Higher rates correspond to a greater probability of card testing activity, meaning bad actors may be attempting different card number combinations to guess a correct one. Takes on values between 0 and 100. - """ - invalid_credentials_decline_rate_past_hour: NotRequired[int] - """ - The % of declines due to incorrect verification data (like CVV or expiry) in the past hour, taking place at the same merchant. Higher rates correspond to a greater probability of bad actors attempting to utilize valid card credentials at merchants with verification requirements. Takes on values between 0 and 100. - """ - risk_level: Literal[ - "elevated", "highest", "low", "normal", "not_assessed", "unknown" - ] - """ - The likelihood that this authorization is associated with card testing activity. This is assessed by evaluating decline activity over the last hour. - """ - - class CreateParamsRiskAssessmentMerchantDisputeRisk(TypedDict): - dispute_rate: NotRequired[int] - """ - The dispute rate observed across all Stripe Issuing authorizations for this merchant. For example, a value of 50 means 50% of authorizations from this merchant on Stripe Issuing have resulted in a dispute. Higher values mean a higher likelihood the authorization is disputed. Takes on values between 0 and 100. - """ - risk_level: Literal[ - "elevated", "highest", "low", "normal", "not_assessed", "unknown" - ] - """ - The likelihood that authorizations from this merchant will result in a dispute based on their history on Stripe Issuing. - """ - - class CreateParamsVerificationData(TypedDict): - address_line1_check: NotRequired[ - Literal["match", "mismatch", "not_provided"] - ] - """ - Whether the cardholder provided an address first line and if it matched the cardholder's `billing.address.line1`. - """ - address_postal_code_check: NotRequired[ - Literal["match", "mismatch", "not_provided"] - ] - """ - Whether the cardholder provided a postal code and if it matched the cardholder's `billing.address.postal_code`. - """ - authentication_exemption: NotRequired[ - "Authorization.CreateParamsVerificationDataAuthenticationExemption" - ] - """ - The exemption applied to this authorization. - """ - cvc_check: NotRequired[Literal["match", "mismatch", "not_provided"]] - """ - Whether the cardholder provided a CVC and if it matched Stripe's record. - """ - expiry_check: NotRequired[Literal["match", "mismatch", "not_provided"]] - """ - Whether the cardholder provided an expiry date and if it matched Stripe's record. - """ - three_d_secure: NotRequired[ - "Authorization.CreateParamsVerificationDataThreeDSecure" - ] - """ - 3D Secure details. - """ - - class CreateParamsVerificationDataAuthenticationExemption(TypedDict): - claimed_by: Literal["acquirer", "issuer"] - """ - The entity that requested the exemption, either the acquiring merchant or the Issuing user. - """ - type: Literal[ - "low_value_transaction", "transaction_risk_analysis", "unknown" - ] - """ - The specific exemption claimed for this authorization. - """ - - class CreateParamsVerificationDataThreeDSecure(TypedDict): - result: Literal[ - "attempt_acknowledged", "authenticated", "failed", "required" - ] - """ - The outcome of the 3D Secure authentication request. - """ - - class DeclineParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - - class ExpireParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class FinalizeAmountParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - final_amount: int - """ - The final authorization amount that will be captured by the merchant. This amount is in the authorization currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). - """ - fleet: NotRequired["Authorization.FinalizeAmountParamsFleet"] - """ - Fleet-specific information for authorizations using Fleet cards. - """ - fuel: NotRequired["Authorization.FinalizeAmountParamsFuel"] - """ - Information about fuel that was purchased with this transaction. - """ - - class FinalizeAmountParamsFleet(TypedDict): - cardholder_prompt_data: NotRequired[ - "Authorization.FinalizeAmountParamsFleetCardholderPromptData" - ] - """ - Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry. - """ - purchase_type: NotRequired[ - Literal[ - "fuel_and_non_fuel_purchase", - "fuel_purchase", - "non_fuel_purchase", - ] - ] - """ - The type of purchase. One of `fuel_purchase`, `non_fuel_purchase`, or `fuel_and_non_fuel_purchase`. - """ - reported_breakdown: NotRequired[ - "Authorization.FinalizeAmountParamsFleetReportedBreakdown" - ] - """ - More information about the total amount. This information is not guaranteed to be accurate as some merchants may provide unreliable data. - """ - service_type: NotRequired[ - Literal["full_service", "non_fuel_transaction", "self_service"] - ] - """ - The type of fuel service. One of `non_fuel_transaction`, `full_service`, or `self_service`. - """ - - class FinalizeAmountParamsFleetCardholderPromptData(TypedDict): - driver_id: NotRequired[str] - """ - Driver ID. - """ - odometer: NotRequired[int] - """ - Odometer reading. - """ - unspecified_id: NotRequired[str] - """ - An alphanumeric ID. This field is used when a vehicle ID, driver ID, or generic ID is entered by the cardholder, but the merchant or card network did not specify the prompt type. - """ - user_id: NotRequired[str] - """ - User ID. - """ - vehicle_number: NotRequired[str] - """ - Vehicle number. - """ - - class FinalizeAmountParamsFleetReportedBreakdown(TypedDict): - fuel: NotRequired[ - "Authorization.FinalizeAmountParamsFleetReportedBreakdownFuel" - ] - """ - Breakdown of fuel portion of the purchase. - """ - non_fuel: NotRequired[ - "Authorization.FinalizeAmountParamsFleetReportedBreakdownNonFuel" - ] - """ - Breakdown of non-fuel portion of the purchase. - """ - tax: NotRequired[ - "Authorization.FinalizeAmountParamsFleetReportedBreakdownTax" - ] - """ - Information about tax included in this transaction. - """ - - class FinalizeAmountParamsFleetReportedBreakdownFuel(TypedDict): - gross_amount_decimal: NotRequired[str] - """ - Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive of taxes. - """ - - class FinalizeAmountParamsFleetReportedBreakdownNonFuel(TypedDict): - gross_amount_decimal: NotRequired[str] - """ - Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes. - """ - - class FinalizeAmountParamsFleetReportedBreakdownTax(TypedDict): - local_amount_decimal: NotRequired[str] - """ - Amount of state or provincial Sales Tax included in the transaction amount. Null if not reported by merchant or not subject to tax. - """ - national_amount_decimal: NotRequired[str] - """ - Amount of national Sales Tax or VAT included in the transaction amount. Null if not reported by merchant or not subject to tax. - """ - - class FinalizeAmountParamsFuel(TypedDict): - industry_product_code: NotRequired[str] - """ - [Conexxus Payment System Product Code](https://www.conexxus.org/conexxus-payment-system-product-codes) identifying the primary fuel product purchased. - """ - quantity_decimal: NotRequired[str] - """ - The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places. - """ - type: NotRequired[ - Literal[ - "diesel", - "other", - "unleaded_plus", - "unleaded_regular", - "unleaded_super", - ] - ] - """ - The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`. - """ - unit: NotRequired[ - Literal[ - "charging_minute", - "imperial_gallon", - "kilogram", - "kilowatt_hour", - "liter", - "other", - "pound", - "us_gallon", - ] - ] - """ - The units for `quantity_decimal`. One of `charging_minute`, `imperial_gallon`, `kilogram`, `kilowatt_hour`, `liter`, `pound`, `us_gallon`, or `other`. - """ - unit_cost_decimal: NotRequired[str] - """ - The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places. - """ - - class IncrementParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - increment_amount: int - """ - The amount to increment the authorization by. This amount is in the authorization currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). - """ - is_amount_controllable: NotRequired[bool] - """ - If set `true`, you may provide [amount](https://stripe.com/docs/api/issuing/authorizations/approve#approve_issuing_authorization-amount) to control how much to hold for the authorization. - """ - - class ListParams(RequestOptions): - card: NotRequired[str] - """ - Only return authorizations that belong to the given card. - """ - cardholder: NotRequired[str] - """ - Only return authorizations that belong to the given cardholder. - """ - created: NotRequired["Authorization.ListParamsCreated|int"] - """ - Only return authorizations that were created during the given date interval. - """ - 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. - """ - status: NotRequired[ - Literal["closed", "expired", "pending", "reversed"] - ] - """ - Only return authorizations with the given status. One of `pending`, `closed`, or `reversed`. - """ - - class ListParamsCreated(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) - """ - - class ModifyParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - - class RespondParams(RequestOptions): - confirmed: bool - """ - Whether to simulate the user confirming that the transaction was legitimate (true) or telling Stripe that it was fraudulent (false). - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class RetrieveParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class ReverseParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - reverse_amount: NotRequired[int] - """ - The amount to reverse from the authorization. If not provided, the full amount of the authorization will be reversed. This amount is in the authorization currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). - """ - amount: int """ The total amount that was authorized or rejected. This amount is in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). `amount` should be the same as `merchant_amount`, unless `currency` and `merchant_currency` are different. @@ -1770,9 +602,7 @@ class ReverseParams(RequestOptions): @classmethod def _cls_approve( - cls, - authorization: str, - **params: Unpack["Authorization.ApproveParams"], + cls, authorization: str, **params: Unpack["AuthorizationApproveParams"] ) -> "Authorization": """ [Deprecated] Approves a pending Issuing Authorization object. This request should be made within the timeout window of the [real-time authorization](https://docs.stripe.com/docs/issuing/controls/real-time-authorizations) flow. @@ -1792,7 +622,7 @@ def _cls_approve( @overload @staticmethod def approve( - authorization: str, **params: Unpack["Authorization.ApproveParams"] + authorization: str, **params: Unpack["AuthorizationApproveParams"] ) -> "Authorization": """ [Deprecated] Approves a pending Issuing Authorization object. This request should be made within the timeout window of the [real-time authorization](https://docs.stripe.com/docs/issuing/controls/real-time-authorizations) flow. @@ -1802,7 +632,7 @@ def approve( @overload def approve( - self, **params: Unpack["Authorization.ApproveParams"] + self, **params: Unpack["AuthorizationApproveParams"] ) -> "Authorization": """ [Deprecated] Approves a pending Issuing Authorization object. This request should be made within the timeout window of the [real-time authorization](https://docs.stripe.com/docs/issuing/controls/real-time-authorizations) flow. @@ -1812,7 +642,7 @@ def approve( @class_method_variant("_cls_approve") def approve( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Authorization.ApproveParams"] + self, **params: Unpack["AuthorizationApproveParams"] ) -> "Authorization": """ [Deprecated] Approves a pending Issuing Authorization object. This request should be made within the timeout window of the [real-time authorization](https://docs.stripe.com/docs/issuing/controls/real-time-authorizations) flow. @@ -1831,9 +661,7 @@ def approve( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_approve_async( - cls, - authorization: str, - **params: Unpack["Authorization.ApproveParams"], + cls, authorization: str, **params: Unpack["AuthorizationApproveParams"] ) -> "Authorization": """ [Deprecated] Approves a pending Issuing Authorization object. This request should be made within the timeout window of the [real-time authorization](https://docs.stripe.com/docs/issuing/controls/real-time-authorizations) flow. @@ -1853,7 +681,7 @@ async def _cls_approve_async( @overload @staticmethod async def approve_async( - authorization: str, **params: Unpack["Authorization.ApproveParams"] + authorization: str, **params: Unpack["AuthorizationApproveParams"] ) -> "Authorization": """ [Deprecated] Approves a pending Issuing Authorization object. This request should be made within the timeout window of the [real-time authorization](https://docs.stripe.com/docs/issuing/controls/real-time-authorizations) flow. @@ -1863,7 +691,7 @@ async def approve_async( @overload async def approve_async( - self, **params: Unpack["Authorization.ApproveParams"] + self, **params: Unpack["AuthorizationApproveParams"] ) -> "Authorization": """ [Deprecated] Approves a pending Issuing Authorization object. This request should be made within the timeout window of the [real-time authorization](https://docs.stripe.com/docs/issuing/controls/real-time-authorizations) flow. @@ -1873,7 +701,7 @@ async def approve_async( @class_method_variant("_cls_approve_async") async def approve_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Authorization.ApproveParams"] + self, **params: Unpack["AuthorizationApproveParams"] ) -> "Authorization": """ [Deprecated] Approves a pending Issuing Authorization object. This request should be made within the timeout window of the [real-time authorization](https://docs.stripe.com/docs/issuing/controls/real-time-authorizations) flow. @@ -1892,9 +720,7 @@ async def approve_async( # pyright: ignore[reportGeneralTypeIssues] @classmethod def _cls_decline( - cls, - authorization: str, - **params: Unpack["Authorization.DeclineParams"], + cls, authorization: str, **params: Unpack["AuthorizationDeclineParams"] ) -> "Authorization": """ [Deprecated] Declines a pending Issuing Authorization object. This request should be made within the timeout window of the [real time authorization](https://docs.stripe.com/docs/issuing/controls/real-time-authorizations) flow. @@ -1914,7 +740,7 @@ def _cls_decline( @overload @staticmethod def decline( - authorization: str, **params: Unpack["Authorization.DeclineParams"] + authorization: str, **params: Unpack["AuthorizationDeclineParams"] ) -> "Authorization": """ [Deprecated] Declines a pending Issuing Authorization object. This request should be made within the timeout window of the [real time authorization](https://docs.stripe.com/docs/issuing/controls/real-time-authorizations) flow. @@ -1924,7 +750,7 @@ def decline( @overload def decline( - self, **params: Unpack["Authorization.DeclineParams"] + self, **params: Unpack["AuthorizationDeclineParams"] ) -> "Authorization": """ [Deprecated] Declines a pending Issuing Authorization object. This request should be made within the timeout window of the [real time authorization](https://docs.stripe.com/docs/issuing/controls/real-time-authorizations) flow. @@ -1934,7 +760,7 @@ def decline( @class_method_variant("_cls_decline") def decline( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Authorization.DeclineParams"] + self, **params: Unpack["AuthorizationDeclineParams"] ) -> "Authorization": """ [Deprecated] Declines a pending Issuing Authorization object. This request should be made within the timeout window of the [real time authorization](https://docs.stripe.com/docs/issuing/controls/real-time-authorizations) flow. @@ -1953,9 +779,7 @@ def decline( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_decline_async( - cls, - authorization: str, - **params: Unpack["Authorization.DeclineParams"], + cls, authorization: str, **params: Unpack["AuthorizationDeclineParams"] ) -> "Authorization": """ [Deprecated] Declines a pending Issuing Authorization object. This request should be made within the timeout window of the [real time authorization](https://docs.stripe.com/docs/issuing/controls/real-time-authorizations) flow. @@ -1975,7 +799,7 @@ async def _cls_decline_async( @overload @staticmethod async def decline_async( - authorization: str, **params: Unpack["Authorization.DeclineParams"] + authorization: str, **params: Unpack["AuthorizationDeclineParams"] ) -> "Authorization": """ [Deprecated] Declines a pending Issuing Authorization object. This request should be made within the timeout window of the [real time authorization](https://docs.stripe.com/docs/issuing/controls/real-time-authorizations) flow. @@ -1985,7 +809,7 @@ async def decline_async( @overload async def decline_async( - self, **params: Unpack["Authorization.DeclineParams"] + self, **params: Unpack["AuthorizationDeclineParams"] ) -> "Authorization": """ [Deprecated] Declines a pending Issuing Authorization object. This request should be made within the timeout window of the [real time authorization](https://docs.stripe.com/docs/issuing/controls/real-time-authorizations) flow. @@ -1995,7 +819,7 @@ async def decline_async( @class_method_variant("_cls_decline_async") async def decline_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Authorization.DeclineParams"] + self, **params: Unpack["AuthorizationDeclineParams"] ) -> "Authorization": """ [Deprecated] Declines a pending Issuing Authorization object. This request should be made within the timeout window of the [real time authorization](https://docs.stripe.com/docs/issuing/controls/real-time-authorizations) flow. @@ -2014,7 +838,7 @@ async def decline_async( # pyright: ignore[reportGeneralTypeIssues] @classmethod def list( - cls, **params: Unpack["Authorization.ListParams"] + cls, **params: Unpack["AuthorizationListParams"] ) -> ListObject["Authorization"]: """ Returns a list of Issuing Authorization objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first. @@ -2034,7 +858,7 @@ def list( @classmethod async def list_async( - cls, **params: Unpack["Authorization.ListParams"] + cls, **params: Unpack["AuthorizationListParams"] ) -> ListObject["Authorization"]: """ Returns a list of Issuing Authorization objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first. @@ -2054,7 +878,7 @@ async def list_async( @classmethod def modify( - cls, id: str, **params: Unpack["Authorization.ModifyParams"] + cls, id: str, **params: Unpack["AuthorizationModifyParams"] ) -> "Authorization": """ Updates the specified Issuing Authorization object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. @@ -2071,7 +895,7 @@ def modify( @classmethod async def modify_async( - cls, id: str, **params: Unpack["Authorization.ModifyParams"] + cls, id: str, **params: Unpack["AuthorizationModifyParams"] ) -> "Authorization": """ Updates the specified Issuing Authorization object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. @@ -2088,7 +912,7 @@ async def modify_async( @classmethod def retrieve( - cls, id: str, **params: Unpack["Authorization.RetrieveParams"] + cls, id: str, **params: Unpack["AuthorizationRetrieveParams"] ) -> "Authorization": """ Retrieves an Issuing Authorization object. @@ -2099,7 +923,7 @@ def retrieve( @classmethod async def retrieve_async( - cls, id: str, **params: Unpack["Authorization.RetrieveParams"] + cls, id: str, **params: Unpack["AuthorizationRetrieveParams"] ) -> "Authorization": """ Retrieves an Issuing Authorization object. @@ -2115,7 +939,7 @@ class TestHelpers(APIResourceTestHelpers["Authorization"]): def _cls_capture( cls, authorization: str, - **params: Unpack["Authorization.CaptureParams"], + **params: Unpack["AuthorizationCaptureParams"], ) -> "Authorization": """ Capture a test-mode authorization. @@ -2134,7 +958,7 @@ def _cls_capture( @overload @staticmethod def capture( - authorization: str, **params: Unpack["Authorization.CaptureParams"] + authorization: str, **params: Unpack["AuthorizationCaptureParams"] ) -> "Authorization": """ Capture a test-mode authorization. @@ -2143,7 +967,7 @@ def capture( @overload def capture( - self, **params: Unpack["Authorization.CaptureParams"] + self, **params: Unpack["AuthorizationCaptureParams"] ) -> "Authorization": """ Capture a test-mode authorization. @@ -2152,7 +976,7 @@ def capture( @class_method_variant("_cls_capture") def capture( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Authorization.CaptureParams"] + self, **params: Unpack["AuthorizationCaptureParams"] ) -> "Authorization": """ Capture a test-mode authorization. @@ -2172,7 +996,7 @@ def capture( # pyright: ignore[reportGeneralTypeIssues] async def _cls_capture_async( cls, authorization: str, - **params: Unpack["Authorization.CaptureParams"], + **params: Unpack["AuthorizationCaptureParams"], ) -> "Authorization": """ Capture a test-mode authorization. @@ -2191,7 +1015,7 @@ async def _cls_capture_async( @overload @staticmethod async def capture_async( - authorization: str, **params: Unpack["Authorization.CaptureParams"] + authorization: str, **params: Unpack["AuthorizationCaptureParams"] ) -> "Authorization": """ Capture a test-mode authorization. @@ -2200,7 +1024,7 @@ async def capture_async( @overload async def capture_async( - self, **params: Unpack["Authorization.CaptureParams"] + self, **params: Unpack["AuthorizationCaptureParams"] ) -> "Authorization": """ Capture a test-mode authorization. @@ -2209,7 +1033,7 @@ async def capture_async( @class_method_variant("_cls_capture_async") async def capture_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Authorization.CaptureParams"] + self, **params: Unpack["AuthorizationCaptureParams"] ) -> "Authorization": """ Capture a test-mode authorization. @@ -2227,7 +1051,7 @@ async def capture_async( # pyright: ignore[reportGeneralTypeIssues] @classmethod def create( - cls, **params: Unpack["Authorization.CreateParams"] + cls, **params: Unpack["AuthorizationCreateParams"] ) -> "Authorization": """ Create a test-mode authorization. @@ -2243,7 +1067,7 @@ def create( @classmethod async def create_async( - cls, **params: Unpack["Authorization.CreateParams"] + cls, **params: Unpack["AuthorizationCreateParams"] ) -> "Authorization": """ Create a test-mode authorization. @@ -2261,7 +1085,7 @@ async def create_async( def _cls_expire( cls, authorization: str, - **params: Unpack["Authorization.ExpireParams"], + **params: Unpack["AuthorizationExpireParams"], ) -> "Authorization": """ Expire a test-mode Authorization. @@ -2280,7 +1104,7 @@ def _cls_expire( @overload @staticmethod def expire( - authorization: str, **params: Unpack["Authorization.ExpireParams"] + authorization: str, **params: Unpack["AuthorizationExpireParams"] ) -> "Authorization": """ Expire a test-mode Authorization. @@ -2289,7 +1113,7 @@ def expire( @overload def expire( - self, **params: Unpack["Authorization.ExpireParams"] + self, **params: Unpack["AuthorizationExpireParams"] ) -> "Authorization": """ Expire a test-mode Authorization. @@ -2298,7 +1122,7 @@ def expire( @class_method_variant("_cls_expire") def expire( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Authorization.ExpireParams"] + self, **params: Unpack["AuthorizationExpireParams"] ) -> "Authorization": """ Expire a test-mode Authorization. @@ -2318,7 +1142,7 @@ def expire( # pyright: ignore[reportGeneralTypeIssues] async def _cls_expire_async( cls, authorization: str, - **params: Unpack["Authorization.ExpireParams"], + **params: Unpack["AuthorizationExpireParams"], ) -> "Authorization": """ Expire a test-mode Authorization. @@ -2337,7 +1161,7 @@ async def _cls_expire_async( @overload @staticmethod async def expire_async( - authorization: str, **params: Unpack["Authorization.ExpireParams"] + authorization: str, **params: Unpack["AuthorizationExpireParams"] ) -> "Authorization": """ Expire a test-mode Authorization. @@ -2346,7 +1170,7 @@ async def expire_async( @overload async def expire_async( - self, **params: Unpack["Authorization.ExpireParams"] + self, **params: Unpack["AuthorizationExpireParams"] ) -> "Authorization": """ Expire a test-mode Authorization. @@ -2355,7 +1179,7 @@ async def expire_async( @class_method_variant("_cls_expire_async") async def expire_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Authorization.ExpireParams"] + self, **params: Unpack["AuthorizationExpireParams"] ) -> "Authorization": """ Expire a test-mode Authorization. @@ -2375,7 +1199,7 @@ async def expire_async( # pyright: ignore[reportGeneralTypeIssues] def _cls_finalize_amount( cls, authorization: str, - **params: Unpack["Authorization.FinalizeAmountParams"], + **params: Unpack["AuthorizationFinalizeAmountParams"], ) -> "Authorization": """ Finalize the amount on an Authorization prior to capture, when the initial authorization was for an estimated amount. @@ -2395,7 +1219,7 @@ def _cls_finalize_amount( @staticmethod def finalize_amount( authorization: str, - **params: Unpack["Authorization.FinalizeAmountParams"], + **params: Unpack["AuthorizationFinalizeAmountParams"], ) -> "Authorization": """ Finalize the amount on an Authorization prior to capture, when the initial authorization was for an estimated amount. @@ -2404,7 +1228,7 @@ def finalize_amount( @overload def finalize_amount( - self, **params: Unpack["Authorization.FinalizeAmountParams"] + self, **params: Unpack["AuthorizationFinalizeAmountParams"] ) -> "Authorization": """ Finalize the amount on an Authorization prior to capture, when the initial authorization was for an estimated amount. @@ -2413,7 +1237,7 @@ def finalize_amount( @class_method_variant("_cls_finalize_amount") def finalize_amount( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Authorization.FinalizeAmountParams"] + self, **params: Unpack["AuthorizationFinalizeAmountParams"] ) -> "Authorization": """ Finalize the amount on an Authorization prior to capture, when the initial authorization was for an estimated amount. @@ -2433,7 +1257,7 @@ def finalize_amount( # pyright: ignore[reportGeneralTypeIssues] async def _cls_finalize_amount_async( cls, authorization: str, - **params: Unpack["Authorization.FinalizeAmountParams"], + **params: Unpack["AuthorizationFinalizeAmountParams"], ) -> "Authorization": """ Finalize the amount on an Authorization prior to capture, when the initial authorization was for an estimated amount. @@ -2453,7 +1277,7 @@ async def _cls_finalize_amount_async( @staticmethod async def finalize_amount_async( authorization: str, - **params: Unpack["Authorization.FinalizeAmountParams"], + **params: Unpack["AuthorizationFinalizeAmountParams"], ) -> "Authorization": """ Finalize the amount on an Authorization prior to capture, when the initial authorization was for an estimated amount. @@ -2462,7 +1286,7 @@ async def finalize_amount_async( @overload async def finalize_amount_async( - self, **params: Unpack["Authorization.FinalizeAmountParams"] + self, **params: Unpack["AuthorizationFinalizeAmountParams"] ) -> "Authorization": """ Finalize the amount on an Authorization prior to capture, when the initial authorization was for an estimated amount. @@ -2471,7 +1295,7 @@ async def finalize_amount_async( @class_method_variant("_cls_finalize_amount_async") async def finalize_amount_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Authorization.FinalizeAmountParams"] + self, **params: Unpack["AuthorizationFinalizeAmountParams"] ) -> "Authorization": """ Finalize the amount on an Authorization prior to capture, when the initial authorization was for an estimated amount. @@ -2491,7 +1315,7 @@ async def finalize_amount_async( # pyright: ignore[reportGeneralTypeIssues] def _cls_increment( cls, authorization: str, - **params: Unpack["Authorization.IncrementParams"], + **params: Unpack["AuthorizationIncrementParams"], ) -> "Authorization": """ Increment a test-mode Authorization. @@ -2511,7 +1335,7 @@ def _cls_increment( @staticmethod def increment( authorization: str, - **params: Unpack["Authorization.IncrementParams"], + **params: Unpack["AuthorizationIncrementParams"], ) -> "Authorization": """ Increment a test-mode Authorization. @@ -2520,7 +1344,7 @@ def increment( @overload def increment( - self, **params: Unpack["Authorization.IncrementParams"] + self, **params: Unpack["AuthorizationIncrementParams"] ) -> "Authorization": """ Increment a test-mode Authorization. @@ -2529,7 +1353,7 @@ def increment( @class_method_variant("_cls_increment") def increment( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Authorization.IncrementParams"] + self, **params: Unpack["AuthorizationIncrementParams"] ) -> "Authorization": """ Increment a test-mode Authorization. @@ -2549,7 +1373,7 @@ def increment( # pyright: ignore[reportGeneralTypeIssues] async def _cls_increment_async( cls, authorization: str, - **params: Unpack["Authorization.IncrementParams"], + **params: Unpack["AuthorizationIncrementParams"], ) -> "Authorization": """ Increment a test-mode Authorization. @@ -2569,7 +1393,7 @@ async def _cls_increment_async( @staticmethod async def increment_async( authorization: str, - **params: Unpack["Authorization.IncrementParams"], + **params: Unpack["AuthorizationIncrementParams"], ) -> "Authorization": """ Increment a test-mode Authorization. @@ -2578,7 +1402,7 @@ async def increment_async( @overload async def increment_async( - self, **params: Unpack["Authorization.IncrementParams"] + self, **params: Unpack["AuthorizationIncrementParams"] ) -> "Authorization": """ Increment a test-mode Authorization. @@ -2587,7 +1411,7 @@ async def increment_async( @class_method_variant("_cls_increment_async") async def increment_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Authorization.IncrementParams"] + self, **params: Unpack["AuthorizationIncrementParams"] ) -> "Authorization": """ Increment a test-mode Authorization. @@ -2607,7 +1431,7 @@ async def increment_async( # pyright: ignore[reportGeneralTypeIssues] def _cls_respond( cls, authorization: str, - **params: Unpack["Authorization.RespondParams"], + **params: Unpack["AuthorizationRespondParams"], ) -> "Authorization": """ Respond to a fraud challenge on a testmode Issuing authorization, simulating either a confirmation of fraud or a correction of legitimacy. @@ -2626,7 +1450,7 @@ def _cls_respond( @overload @staticmethod def respond( - authorization: str, **params: Unpack["Authorization.RespondParams"] + authorization: str, **params: Unpack["AuthorizationRespondParams"] ) -> "Authorization": """ Respond to a fraud challenge on a testmode Issuing authorization, simulating either a confirmation of fraud or a correction of legitimacy. @@ -2635,7 +1459,7 @@ def respond( @overload def respond( - self, **params: Unpack["Authorization.RespondParams"] + self, **params: Unpack["AuthorizationRespondParams"] ) -> "Authorization": """ Respond to a fraud challenge on a testmode Issuing authorization, simulating either a confirmation of fraud or a correction of legitimacy. @@ -2644,7 +1468,7 @@ def respond( @class_method_variant("_cls_respond") def respond( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Authorization.RespondParams"] + self, **params: Unpack["AuthorizationRespondParams"] ) -> "Authorization": """ Respond to a fraud challenge on a testmode Issuing authorization, simulating either a confirmation of fraud or a correction of legitimacy. @@ -2664,7 +1488,7 @@ def respond( # pyright: ignore[reportGeneralTypeIssues] async def _cls_respond_async( cls, authorization: str, - **params: Unpack["Authorization.RespondParams"], + **params: Unpack["AuthorizationRespondParams"], ) -> "Authorization": """ Respond to a fraud challenge on a testmode Issuing authorization, simulating either a confirmation of fraud or a correction of legitimacy. @@ -2683,7 +1507,7 @@ async def _cls_respond_async( @overload @staticmethod async def respond_async( - authorization: str, **params: Unpack["Authorization.RespondParams"] + authorization: str, **params: Unpack["AuthorizationRespondParams"] ) -> "Authorization": """ Respond to a fraud challenge on a testmode Issuing authorization, simulating either a confirmation of fraud or a correction of legitimacy. @@ -2692,7 +1516,7 @@ async def respond_async( @overload async def respond_async( - self, **params: Unpack["Authorization.RespondParams"] + self, **params: Unpack["AuthorizationRespondParams"] ) -> "Authorization": """ Respond to a fraud challenge on a testmode Issuing authorization, simulating either a confirmation of fraud or a correction of legitimacy. @@ -2701,7 +1525,7 @@ async def respond_async( @class_method_variant("_cls_respond_async") async def respond_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Authorization.RespondParams"] + self, **params: Unpack["AuthorizationRespondParams"] ) -> "Authorization": """ Respond to a fraud challenge on a testmode Issuing authorization, simulating either a confirmation of fraud or a correction of legitimacy. @@ -2721,7 +1545,7 @@ async def respond_async( # pyright: ignore[reportGeneralTypeIssues] def _cls_reverse( cls, authorization: str, - **params: Unpack["Authorization.ReverseParams"], + **params: Unpack["AuthorizationReverseParams"], ) -> "Authorization": """ Reverse a test-mode Authorization. @@ -2740,7 +1564,7 @@ def _cls_reverse( @overload @staticmethod def reverse( - authorization: str, **params: Unpack["Authorization.ReverseParams"] + authorization: str, **params: Unpack["AuthorizationReverseParams"] ) -> "Authorization": """ Reverse a test-mode Authorization. @@ -2749,7 +1573,7 @@ def reverse( @overload def reverse( - self, **params: Unpack["Authorization.ReverseParams"] + self, **params: Unpack["AuthorizationReverseParams"] ) -> "Authorization": """ Reverse a test-mode Authorization. @@ -2758,7 +1582,7 @@ def reverse( @class_method_variant("_cls_reverse") def reverse( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Authorization.ReverseParams"] + self, **params: Unpack["AuthorizationReverseParams"] ) -> "Authorization": """ Reverse a test-mode Authorization. @@ -2778,7 +1602,7 @@ def reverse( # pyright: ignore[reportGeneralTypeIssues] async def _cls_reverse_async( cls, authorization: str, - **params: Unpack["Authorization.ReverseParams"], + **params: Unpack["AuthorizationReverseParams"], ) -> "Authorization": """ Reverse a test-mode Authorization. @@ -2797,7 +1621,7 @@ async def _cls_reverse_async( @overload @staticmethod async def reverse_async( - authorization: str, **params: Unpack["Authorization.ReverseParams"] + authorization: str, **params: Unpack["AuthorizationReverseParams"] ) -> "Authorization": """ Reverse a test-mode Authorization. @@ -2806,7 +1630,7 @@ async def reverse_async( @overload async def reverse_async( - self, **params: Unpack["Authorization.ReverseParams"] + self, **params: Unpack["AuthorizationReverseParams"] ) -> "Authorization": """ Reverse a test-mode Authorization. @@ -2815,7 +1639,7 @@ async def reverse_async( @class_method_variant("_cls_reverse_async") async def reverse_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Authorization.ReverseParams"] + self, **params: Unpack["AuthorizationReverseParams"] ) -> "Authorization": """ Reverse a test-mode Authorization. diff --git a/stripe/issuing/_authorization_service.py b/stripe/issuing/_authorization_service.py index d7e6f08ec..d85ebfee4 100644 --- a/stripe/issuing/_authorization_service.py +++ b/stripe/issuing/_authorization_service.py @@ -5,108 +5,31 @@ from stripe._stripe_service import StripeService from stripe._util import sanitize_id from stripe.issuing._authorization import Authorization -from typing import Dict, List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params.issuing._authorization_approve_params import ( + AuthorizationApproveParams, + ) + from stripe.params.issuing._authorization_decline_params import ( + AuthorizationDeclineParams, + ) + from stripe.params.issuing._authorization_list_params import ( + AuthorizationListParams, + ) + from stripe.params.issuing._authorization_retrieve_params import ( + AuthorizationRetrieveParams, + ) + from stripe.params.issuing._authorization_update_params import ( + AuthorizationUpdateParams, + ) class AuthorizationService(StripeService): - class ApproveParams(TypedDict): - amount: NotRequired[int] - """ - If the authorization's `pending_request.is_amount_controllable` property is `true`, you may provide this value to control how much to hold for the authorization. Must be positive (use [`decline`](https://stripe.com/docs/api/issuing/authorizations/decline) to decline an authorization request). - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - - class DeclineParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - - class ListParams(TypedDict): - card: NotRequired[str] - """ - Only return authorizations that belong to the given card. - """ - cardholder: NotRequired[str] - """ - Only return authorizations that belong to the given cardholder. - """ - created: NotRequired["AuthorizationService.ListParamsCreated|int"] - """ - Only return authorizations that were created during the given date interval. - """ - 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. - """ - status: NotRequired[ - Literal["closed", "expired", "pending", "reversed"] - ] - """ - Only return authorizations with the given status. One of `pending`, `closed`, or `reversed`. - """ - - class ListParamsCreated(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) - """ - - class RetrieveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class UpdateParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - def list( self, - params: Optional["AuthorizationService.ListParams"] = None, + params: Optional["AuthorizationListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[Authorization]: """ @@ -125,7 +48,7 @@ def list( async def list_async( self, - params: Optional["AuthorizationService.ListParams"] = None, + params: Optional["AuthorizationListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[Authorization]: """ @@ -145,7 +68,7 @@ async def list_async( def retrieve( self, authorization: str, - params: Optional["AuthorizationService.RetrieveParams"] = None, + params: Optional["AuthorizationRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Authorization: """ @@ -167,7 +90,7 @@ def retrieve( async def retrieve_async( self, authorization: str, - params: Optional["AuthorizationService.RetrieveParams"] = None, + params: Optional["AuthorizationRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Authorization: """ @@ -189,7 +112,7 @@ async def retrieve_async( def update( self, authorization: str, - params: Optional["AuthorizationService.UpdateParams"] = None, + params: Optional["AuthorizationUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> Authorization: """ @@ -211,7 +134,7 @@ def update( async def update_async( self, authorization: str, - params: Optional["AuthorizationService.UpdateParams"] = None, + params: Optional["AuthorizationUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> Authorization: """ @@ -233,7 +156,7 @@ async def update_async( def approve( self, authorization: str, - params: Optional["AuthorizationService.ApproveParams"] = None, + params: Optional["AuthorizationApproveParams"] = None, options: Optional[RequestOptions] = None, ) -> Authorization: """ @@ -256,7 +179,7 @@ def approve( async def approve_async( self, authorization: str, - params: Optional["AuthorizationService.ApproveParams"] = None, + params: Optional["AuthorizationApproveParams"] = None, options: Optional[RequestOptions] = None, ) -> Authorization: """ @@ -279,7 +202,7 @@ async def approve_async( def decline( self, authorization: str, - params: Optional["AuthorizationService.DeclineParams"] = None, + params: Optional["AuthorizationDeclineParams"] = None, options: Optional[RequestOptions] = None, ) -> Authorization: """ @@ -302,7 +225,7 @@ def decline( async def decline_async( self, authorization: str, - params: Optional["AuthorizationService.DeclineParams"] = None, + params: Optional["AuthorizationDeclineParams"] = None, options: Optional[RequestOptions] = None, ) -> Authorization: """ diff --git a/stripe/issuing/_card.py b/stripe/issuing/_card.py index 10fcd38b3..ebce1fe2b 100644 --- a/stripe/issuing/_card.py +++ b/stripe/issuing/_card.py @@ -4,24 +4,31 @@ from stripe._expandable_field import ExpandableField from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource -from stripe._request_options import RequestOptions from stripe._stripe_object import StripeObject from stripe._test_helpers import APIResourceTestHelpers from stripe._updateable_api_resource import UpdateableAPIResource from stripe._util import class_method_variant, sanitize_id from typing import ClassVar, Dict, List, Optional, cast, overload -from typing_extensions import ( - Literal, - NotRequired, - Type, - TypedDict, - Unpack, - TYPE_CHECKING, -) +from typing_extensions import Literal, Type, Unpack, TYPE_CHECKING if TYPE_CHECKING: from stripe.issuing._cardholder import Cardholder from stripe.issuing._personalization_design import PersonalizationDesign + from stripe.params.issuing._card_create_params import CardCreateParams + from stripe.params.issuing._card_deliver_card_params import ( + CardDeliverCardParams, + ) + from stripe.params.issuing._card_fail_card_params import CardFailCardParams + from stripe.params.issuing._card_list_params import CardListParams + from stripe.params.issuing._card_modify_params import CardModifyParams + from stripe.params.issuing._card_retrieve_params import CardRetrieveParams + from stripe.params.issuing._card_return_card_params import ( + CardReturnCardParams, + ) + from stripe.params.issuing._card_ship_card_params import CardShipCardParams + from stripe.params.issuing._card_submit_card_params import ( + CardSubmitCardParams, + ) class Card( @@ -1173,2260 +1180,6 @@ class GooglePay(StripeObject): """ _inner_class_types = {"apple_pay": ApplePay, "google_pay": GooglePay} - class CreateParams(RequestOptions): - cardholder: NotRequired[str] - """ - The [Cardholder](https://stripe.com/docs/api#issuing_cardholder_object) object with which the card will be associated. - """ - currency: str - """ - The currency for the card. - """ - exp_month: NotRequired[int] - """ - The desired expiration month (1-12) for this card if [specifying a custom expiration date](https://docs.stripe.com/issuing/cards/virtual/issue-cards?testing-method=with-code#exp-dates). - """ - exp_year: NotRequired[int] - """ - The desired 4-digit expiration year for this card if [specifying a custom expiration date](https://docs.stripe.com/issuing/cards/virtual/issue-cards?testing-method=with-code#exp-dates). - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - financial_account: NotRequired[str] - """ - The new financial account ID the card will be associated with. This field allows a card to be reassigned to a different financial account. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - personalization_design: NotRequired[str] - """ - The personalization design object belonging to this card. - """ - pin: NotRequired["Card.CreateParamsPin"] - """ - The desired PIN for this card. - """ - replacement_for: NotRequired[str] - """ - The card this is meant to be a replacement for (if any). - """ - replacement_reason: NotRequired[ - Literal["damaged", "expired", "lost", "stolen"] - ] - """ - If `replacement_for` is specified, this should indicate why that card is being replaced. - """ - second_line: NotRequired["Literal['']|str"] - """ - The second line to print on the card. Max length: 24 characters. - """ - shipping: NotRequired["Card.CreateParamsShipping"] - """ - The address where the card will be shipped. - """ - spending_controls: NotRequired["Card.CreateParamsSpendingControls"] - """ - Rules that control spending for this card. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details. - """ - status: NotRequired[Literal["active", "inactive"]] - """ - Whether authorizations can be approved on this card. May be blocked from activating cards depending on past-due Cardholder requirements. Defaults to `inactive`. - """ - type: Literal["physical", "virtual"] - """ - The type of card to issue. Possible values are `physical` or `virtual`. - """ - - class CreateParamsPin(TypedDict): - encrypted_number: NotRequired[str] - """ - The card's desired new PIN, encrypted under Stripe's public key. - """ - - class CreateParamsShipping(TypedDict): - address: "Card.CreateParamsShippingAddress" - """ - The address that the card is shipped to. - """ - address_validation: NotRequired[ - "Card.CreateParamsShippingAddressValidation" - ] - """ - Address validation settings. - """ - customs: NotRequired["Card.CreateParamsShippingCustoms"] - """ - Customs information for the shipment. - """ - name: str - """ - The name printed on the shipping label when shipping the card. - """ - phone_number: NotRequired[str] - """ - Phone number of the recipient of the shipment. - """ - require_signature: NotRequired[bool] - """ - Whether a signature is required for card delivery. - """ - service: NotRequired[Literal["express", "priority", "standard"]] - """ - Shipment service. - """ - type: NotRequired[Literal["bulk", "individual"]] - """ - Packaging options. - """ - - class CreateParamsShippingAddress(TypedDict): - city: 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: 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: str - """ - ZIP or postal code. - """ - state: NotRequired[str] - """ - State, county, province, or region. - """ - - class CreateParamsShippingAddressValidation(TypedDict): - mode: Literal[ - "disabled", "normalization_only", "validation_and_normalization" - ] - """ - The address validation capabilities to use. - """ - - class CreateParamsShippingCustoms(TypedDict): - eori_number: NotRequired[str] - """ - The Economic Operators Registration and Identification (EORI) number to use for Customs. Required for bulk shipments to Europe. - """ - - class CreateParamsSpendingControls(TypedDict): - allowed_categories: NotRequired[ - List[ - Literal[ - "ac_refrigeration_repair", - "accounting_bookkeeping_services", - "advertising_services", - "agricultural_cooperative", - "airlines_air_carriers", - "airports_flying_fields", - "ambulance_services", - "amusement_parks_carnivals", - "antique_reproductions", - "antique_shops", - "aquariums", - "architectural_surveying_services", - "art_dealers_and_galleries", - "artists_supply_and_craft_shops", - "auto_and_home_supply_stores", - "auto_body_repair_shops", - "auto_paint_shops", - "auto_service_shops", - "automated_cash_disburse", - "automated_fuel_dispensers", - "automobile_associations", - "automotive_parts_and_accessories_stores", - "automotive_tire_stores", - "bail_and_bond_payments", - "bakeries", - "bands_orchestras", - "barber_and_beauty_shops", - "betting_casino_gambling", - "bicycle_shops", - "billiard_pool_establishments", - "boat_dealers", - "boat_rentals_and_leases", - "book_stores", - "books_periodicals_and_newspapers", - "bowling_alleys", - "bus_lines", - "business_secretarial_schools", - "buying_shopping_services", - "cable_satellite_and_other_pay_television_and_radio", - "camera_and_photographic_supply_stores", - "candy_nut_and_confectionery_stores", - "car_and_truck_dealers_new_used", - "car_and_truck_dealers_used_only", - "car_rental_agencies", - "car_washes", - "carpentry_services", - "carpet_upholstery_cleaning", - "caterers", - "charitable_and_social_service_organizations_fundraising", - "chemicals_and_allied_products", - "child_care_services", - "childrens_and_infants_wear_stores", - "chiropodists_podiatrists", - "chiropractors", - "cigar_stores_and_stands", - "civic_social_fraternal_associations", - "cleaning_and_maintenance", - "clothing_rental", - "colleges_universities", - "commercial_equipment", - "commercial_footwear", - "commercial_photography_art_and_graphics", - "commuter_transport_and_ferries", - "computer_network_services", - "computer_programming", - "computer_repair", - "computer_software_stores", - "computers_peripherals_and_software", - "concrete_work_services", - "construction_materials", - "consulting_public_relations", - "correspondence_schools", - "cosmetic_stores", - "counseling_services", - "country_clubs", - "courier_services", - "court_costs", - "credit_reporting_agencies", - "cruise_lines", - "dairy_products_stores", - "dance_hall_studios_schools", - "dating_escort_services", - "dentists_orthodontists", - "department_stores", - "detective_agencies", - "digital_goods_applications", - "digital_goods_games", - "digital_goods_large_volume", - "digital_goods_media", - "direct_marketing_catalog_merchant", - "direct_marketing_combination_catalog_and_retail_merchant", - "direct_marketing_inbound_telemarketing", - "direct_marketing_insurance_services", - "direct_marketing_other", - "direct_marketing_outbound_telemarketing", - "direct_marketing_subscription", - "direct_marketing_travel", - "discount_stores", - "doctors", - "door_to_door_sales", - "drapery_window_covering_and_upholstery_stores", - "drinking_places", - "drug_stores_and_pharmacies", - "drugs_drug_proprietaries_and_druggist_sundries", - "dry_cleaners", - "durable_goods", - "duty_free_stores", - "eating_places_restaurants", - "educational_services", - "electric_razor_stores", - "electric_vehicle_charging", - "electrical_parts_and_equipment", - "electrical_services", - "electronics_repair_shops", - "electronics_stores", - "elementary_secondary_schools", - "emergency_services_gcas_visa_use_only", - "employment_temp_agencies", - "equipment_rental", - "exterminating_services", - "family_clothing_stores", - "fast_food_restaurants", - "financial_institutions", - "fines_government_administrative_entities", - "fireplace_fireplace_screens_and_accessories_stores", - "floor_covering_stores", - "florists", - "florists_supplies_nursery_stock_and_flowers", - "freezer_and_locker_meat_provisioners", - "fuel_dealers_non_automotive", - "funeral_services_crematories", - "furniture_home_furnishings_and_equipment_stores_except_appliances", - "furniture_repair_refinishing", - "furriers_and_fur_shops", - "general_services", - "gift_card_novelty_and_souvenir_shops", - "glass_paint_and_wallpaper_stores", - "glassware_crystal_stores", - "golf_courses_public", - "government_licensed_horse_dog_racing_us_region_only", - "government_licensed_online_casions_online_gambling_us_region_only", - "government_owned_lotteries_non_us_region", - "government_owned_lotteries_us_region_only", - "government_services", - "grocery_stores_supermarkets", - "hardware_equipment_and_supplies", - "hardware_stores", - "health_and_beauty_spas", - "hearing_aids_sales_and_supplies", - "heating_plumbing_a_c", - "hobby_toy_and_game_shops", - "home_supply_warehouse_stores", - "hospitals", - "hotels_motels_and_resorts", - "household_appliance_stores", - "industrial_supplies", - "information_retrieval_services", - "insurance_default", - "insurance_underwriting_premiums", - "intra_company_purchases", - "jewelry_stores_watches_clocks_and_silverware_stores", - "landscaping_services", - "laundries", - "laundry_cleaning_services", - "legal_services_attorneys", - "luggage_and_leather_goods_stores", - "lumber_building_materials_stores", - "manual_cash_disburse", - "marinas_service_and_supplies", - "marketplaces", - "masonry_stonework_and_plaster", - "massage_parlors", - "medical_and_dental_labs", - "medical_dental_ophthalmic_and_hospital_equipment_and_supplies", - "medical_services", - "membership_organizations", - "mens_and_boys_clothing_and_accessories_stores", - "mens_womens_clothing_stores", - "metal_service_centers", - "miscellaneous", - "miscellaneous_apparel_and_accessory_shops", - "miscellaneous_auto_dealers", - "miscellaneous_business_services", - "miscellaneous_food_stores", - "miscellaneous_general_merchandise", - "miscellaneous_general_services", - "miscellaneous_home_furnishing_specialty_stores", - "miscellaneous_publishing_and_printing", - "miscellaneous_recreation_services", - "miscellaneous_repair_shops", - "miscellaneous_specialty_retail", - "mobile_home_dealers", - "motion_picture_theaters", - "motor_freight_carriers_and_trucking", - "motor_homes_dealers", - "motor_vehicle_supplies_and_new_parts", - "motorcycle_shops_and_dealers", - "motorcycle_shops_dealers", - "music_stores_musical_instruments_pianos_and_sheet_music", - "news_dealers_and_newsstands", - "non_fi_money_orders", - "non_fi_stored_value_card_purchase_load", - "nondurable_goods", - "nurseries_lawn_and_garden_supply_stores", - "nursing_personal_care", - "office_and_commercial_furniture", - "opticians_eyeglasses", - "optometrists_ophthalmologist", - "orthopedic_goods_prosthetic_devices", - "osteopaths", - "package_stores_beer_wine_and_liquor", - "paints_varnishes_and_supplies", - "parking_lots_garages", - "passenger_railways", - "pawn_shops", - "pet_shops_pet_food_and_supplies", - "petroleum_and_petroleum_products", - "photo_developing", - "photographic_photocopy_microfilm_equipment_and_supplies", - "photographic_studios", - "picture_video_production", - "piece_goods_notions_and_other_dry_goods", - "plumbing_heating_equipment_and_supplies", - "political_organizations", - "postal_services_government_only", - "precious_stones_and_metals_watches_and_jewelry", - "professional_services", - "public_warehousing_and_storage", - "quick_copy_repro_and_blueprint", - "railroads", - "real_estate_agents_and_managers_rentals", - "record_stores", - "recreational_vehicle_rentals", - "religious_goods_stores", - "religious_organizations", - "roofing_siding_sheet_metal", - "secretarial_support_services", - "security_brokers_dealers", - "service_stations", - "sewing_needlework_fabric_and_piece_goods_stores", - "shoe_repair_hat_cleaning", - "shoe_stores", - "small_appliance_repair", - "snowmobile_dealers", - "special_trade_services", - "specialty_cleaning", - "sporting_goods_stores", - "sporting_recreation_camps", - "sports_and_riding_apparel_stores", - "sports_clubs_fields", - "stamp_and_coin_stores", - "stationary_office_supplies_printing_and_writing_paper", - "stationery_stores_office_and_school_supply_stores", - "swimming_pools_sales", - "t_ui_travel_germany", - "tailors_alterations", - "tax_payments_government_agencies", - "tax_preparation_services", - "taxicabs_limousines", - "telecommunication_equipment_and_telephone_sales", - "telecommunication_services", - "telegraph_services", - "tent_and_awning_shops", - "testing_laboratories", - "theatrical_ticket_agencies", - "timeshares", - "tire_retreading_and_repair", - "tolls_bridge_fees", - "tourist_attractions_and_exhibits", - "towing_services", - "trailer_parks_campgrounds", - "transportation_services", - "travel_agencies_tour_operators", - "truck_stop_iteration", - "truck_utility_trailer_rentals", - "typesetting_plate_making_and_related_services", - "typewriter_stores", - "u_s_federal_government_agencies_or_departments", - "uniforms_commercial_clothing", - "used_merchandise_and_secondhand_stores", - "utilities", - "variety_stores", - "veterinary_services", - "video_amusement_game_supplies", - "video_game_arcades", - "video_tape_rental_stores", - "vocational_trade_schools", - "watch_jewelry_repair", - "welding_repair", - "wholesale_clubs", - "wig_and_toupee_stores", - "wires_money_orders", - "womens_accessory_and_specialty_shops", - "womens_ready_to_wear_stores", - "wrecking_and_salvage_yards", - ] - ] - ] - """ - Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to allow. All other categories will be blocked. Cannot be set with `blocked_categories`. - """ - allowed_merchant_countries: NotRequired[List[str]] - """ - Array of strings containing representing countries from which authorizations will be allowed. Authorizations from merchants in all other countries will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `blocked_merchant_countries`. Provide an empty value to unset this control. - """ - blocked_categories: NotRequired[ - List[ - Literal[ - "ac_refrigeration_repair", - "accounting_bookkeeping_services", - "advertising_services", - "agricultural_cooperative", - "airlines_air_carriers", - "airports_flying_fields", - "ambulance_services", - "amusement_parks_carnivals", - "antique_reproductions", - "antique_shops", - "aquariums", - "architectural_surveying_services", - "art_dealers_and_galleries", - "artists_supply_and_craft_shops", - "auto_and_home_supply_stores", - "auto_body_repair_shops", - "auto_paint_shops", - "auto_service_shops", - "automated_cash_disburse", - "automated_fuel_dispensers", - "automobile_associations", - "automotive_parts_and_accessories_stores", - "automotive_tire_stores", - "bail_and_bond_payments", - "bakeries", - "bands_orchestras", - "barber_and_beauty_shops", - "betting_casino_gambling", - "bicycle_shops", - "billiard_pool_establishments", - "boat_dealers", - "boat_rentals_and_leases", - "book_stores", - "books_periodicals_and_newspapers", - "bowling_alleys", - "bus_lines", - "business_secretarial_schools", - "buying_shopping_services", - "cable_satellite_and_other_pay_television_and_radio", - "camera_and_photographic_supply_stores", - "candy_nut_and_confectionery_stores", - "car_and_truck_dealers_new_used", - "car_and_truck_dealers_used_only", - "car_rental_agencies", - "car_washes", - "carpentry_services", - "carpet_upholstery_cleaning", - "caterers", - "charitable_and_social_service_organizations_fundraising", - "chemicals_and_allied_products", - "child_care_services", - "childrens_and_infants_wear_stores", - "chiropodists_podiatrists", - "chiropractors", - "cigar_stores_and_stands", - "civic_social_fraternal_associations", - "cleaning_and_maintenance", - "clothing_rental", - "colleges_universities", - "commercial_equipment", - "commercial_footwear", - "commercial_photography_art_and_graphics", - "commuter_transport_and_ferries", - "computer_network_services", - "computer_programming", - "computer_repair", - "computer_software_stores", - "computers_peripherals_and_software", - "concrete_work_services", - "construction_materials", - "consulting_public_relations", - "correspondence_schools", - "cosmetic_stores", - "counseling_services", - "country_clubs", - "courier_services", - "court_costs", - "credit_reporting_agencies", - "cruise_lines", - "dairy_products_stores", - "dance_hall_studios_schools", - "dating_escort_services", - "dentists_orthodontists", - "department_stores", - "detective_agencies", - "digital_goods_applications", - "digital_goods_games", - "digital_goods_large_volume", - "digital_goods_media", - "direct_marketing_catalog_merchant", - "direct_marketing_combination_catalog_and_retail_merchant", - "direct_marketing_inbound_telemarketing", - "direct_marketing_insurance_services", - "direct_marketing_other", - "direct_marketing_outbound_telemarketing", - "direct_marketing_subscription", - "direct_marketing_travel", - "discount_stores", - "doctors", - "door_to_door_sales", - "drapery_window_covering_and_upholstery_stores", - "drinking_places", - "drug_stores_and_pharmacies", - "drugs_drug_proprietaries_and_druggist_sundries", - "dry_cleaners", - "durable_goods", - "duty_free_stores", - "eating_places_restaurants", - "educational_services", - "electric_razor_stores", - "electric_vehicle_charging", - "electrical_parts_and_equipment", - "electrical_services", - "electronics_repair_shops", - "electronics_stores", - "elementary_secondary_schools", - "emergency_services_gcas_visa_use_only", - "employment_temp_agencies", - "equipment_rental", - "exterminating_services", - "family_clothing_stores", - "fast_food_restaurants", - "financial_institutions", - "fines_government_administrative_entities", - "fireplace_fireplace_screens_and_accessories_stores", - "floor_covering_stores", - "florists", - "florists_supplies_nursery_stock_and_flowers", - "freezer_and_locker_meat_provisioners", - "fuel_dealers_non_automotive", - "funeral_services_crematories", - "furniture_home_furnishings_and_equipment_stores_except_appliances", - "furniture_repair_refinishing", - "furriers_and_fur_shops", - "general_services", - "gift_card_novelty_and_souvenir_shops", - "glass_paint_and_wallpaper_stores", - "glassware_crystal_stores", - "golf_courses_public", - "government_licensed_horse_dog_racing_us_region_only", - "government_licensed_online_casions_online_gambling_us_region_only", - "government_owned_lotteries_non_us_region", - "government_owned_lotteries_us_region_only", - "government_services", - "grocery_stores_supermarkets", - "hardware_equipment_and_supplies", - "hardware_stores", - "health_and_beauty_spas", - "hearing_aids_sales_and_supplies", - "heating_plumbing_a_c", - "hobby_toy_and_game_shops", - "home_supply_warehouse_stores", - "hospitals", - "hotels_motels_and_resorts", - "household_appliance_stores", - "industrial_supplies", - "information_retrieval_services", - "insurance_default", - "insurance_underwriting_premiums", - "intra_company_purchases", - "jewelry_stores_watches_clocks_and_silverware_stores", - "landscaping_services", - "laundries", - "laundry_cleaning_services", - "legal_services_attorneys", - "luggage_and_leather_goods_stores", - "lumber_building_materials_stores", - "manual_cash_disburse", - "marinas_service_and_supplies", - "marketplaces", - "masonry_stonework_and_plaster", - "massage_parlors", - "medical_and_dental_labs", - "medical_dental_ophthalmic_and_hospital_equipment_and_supplies", - "medical_services", - "membership_organizations", - "mens_and_boys_clothing_and_accessories_stores", - "mens_womens_clothing_stores", - "metal_service_centers", - "miscellaneous", - "miscellaneous_apparel_and_accessory_shops", - "miscellaneous_auto_dealers", - "miscellaneous_business_services", - "miscellaneous_food_stores", - "miscellaneous_general_merchandise", - "miscellaneous_general_services", - "miscellaneous_home_furnishing_specialty_stores", - "miscellaneous_publishing_and_printing", - "miscellaneous_recreation_services", - "miscellaneous_repair_shops", - "miscellaneous_specialty_retail", - "mobile_home_dealers", - "motion_picture_theaters", - "motor_freight_carriers_and_trucking", - "motor_homes_dealers", - "motor_vehicle_supplies_and_new_parts", - "motorcycle_shops_and_dealers", - "motorcycle_shops_dealers", - "music_stores_musical_instruments_pianos_and_sheet_music", - "news_dealers_and_newsstands", - "non_fi_money_orders", - "non_fi_stored_value_card_purchase_load", - "nondurable_goods", - "nurseries_lawn_and_garden_supply_stores", - "nursing_personal_care", - "office_and_commercial_furniture", - "opticians_eyeglasses", - "optometrists_ophthalmologist", - "orthopedic_goods_prosthetic_devices", - "osteopaths", - "package_stores_beer_wine_and_liquor", - "paints_varnishes_and_supplies", - "parking_lots_garages", - "passenger_railways", - "pawn_shops", - "pet_shops_pet_food_and_supplies", - "petroleum_and_petroleum_products", - "photo_developing", - "photographic_photocopy_microfilm_equipment_and_supplies", - "photographic_studios", - "picture_video_production", - "piece_goods_notions_and_other_dry_goods", - "plumbing_heating_equipment_and_supplies", - "political_organizations", - "postal_services_government_only", - "precious_stones_and_metals_watches_and_jewelry", - "professional_services", - "public_warehousing_and_storage", - "quick_copy_repro_and_blueprint", - "railroads", - "real_estate_agents_and_managers_rentals", - "record_stores", - "recreational_vehicle_rentals", - "religious_goods_stores", - "religious_organizations", - "roofing_siding_sheet_metal", - "secretarial_support_services", - "security_brokers_dealers", - "service_stations", - "sewing_needlework_fabric_and_piece_goods_stores", - "shoe_repair_hat_cleaning", - "shoe_stores", - "small_appliance_repair", - "snowmobile_dealers", - "special_trade_services", - "specialty_cleaning", - "sporting_goods_stores", - "sporting_recreation_camps", - "sports_and_riding_apparel_stores", - "sports_clubs_fields", - "stamp_and_coin_stores", - "stationary_office_supplies_printing_and_writing_paper", - "stationery_stores_office_and_school_supply_stores", - "swimming_pools_sales", - "t_ui_travel_germany", - "tailors_alterations", - "tax_payments_government_agencies", - "tax_preparation_services", - "taxicabs_limousines", - "telecommunication_equipment_and_telephone_sales", - "telecommunication_services", - "telegraph_services", - "tent_and_awning_shops", - "testing_laboratories", - "theatrical_ticket_agencies", - "timeshares", - "tire_retreading_and_repair", - "tolls_bridge_fees", - "tourist_attractions_and_exhibits", - "towing_services", - "trailer_parks_campgrounds", - "transportation_services", - "travel_agencies_tour_operators", - "truck_stop_iteration", - "truck_utility_trailer_rentals", - "typesetting_plate_making_and_related_services", - "typewriter_stores", - "u_s_federal_government_agencies_or_departments", - "uniforms_commercial_clothing", - "used_merchandise_and_secondhand_stores", - "utilities", - "variety_stores", - "veterinary_services", - "video_amusement_game_supplies", - "video_game_arcades", - "video_tape_rental_stores", - "vocational_trade_schools", - "watch_jewelry_repair", - "welding_repair", - "wholesale_clubs", - "wig_and_toupee_stores", - "wires_money_orders", - "womens_accessory_and_specialty_shops", - "womens_ready_to_wear_stores", - "wrecking_and_salvage_yards", - ] - ] - ] - """ - Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to decline. All other categories will be allowed. Cannot be set with `allowed_categories`. - """ - blocked_merchant_countries: NotRequired[List[str]] - """ - Array of strings containing representing countries from which authorizations will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `allowed_merchant_countries`. Provide an empty value to unset this control. - """ - spending_limits: NotRequired[ - List["Card.CreateParamsSpendingControlsSpendingLimit"] - ] - """ - Limit spending with amount-based rules that apply across any cards this card replaced (i.e., its `replacement_for` card and _that_ card's `replacement_for` card, up the chain). - """ - - class CreateParamsSpendingControlsSpendingLimit(TypedDict): - amount: int - """ - Maximum amount allowed to spend per interval. - """ - categories: NotRequired[ - List[ - Literal[ - "ac_refrigeration_repair", - "accounting_bookkeeping_services", - "advertising_services", - "agricultural_cooperative", - "airlines_air_carriers", - "airports_flying_fields", - "ambulance_services", - "amusement_parks_carnivals", - "antique_reproductions", - "antique_shops", - "aquariums", - "architectural_surveying_services", - "art_dealers_and_galleries", - "artists_supply_and_craft_shops", - "auto_and_home_supply_stores", - "auto_body_repair_shops", - "auto_paint_shops", - "auto_service_shops", - "automated_cash_disburse", - "automated_fuel_dispensers", - "automobile_associations", - "automotive_parts_and_accessories_stores", - "automotive_tire_stores", - "bail_and_bond_payments", - "bakeries", - "bands_orchestras", - "barber_and_beauty_shops", - "betting_casino_gambling", - "bicycle_shops", - "billiard_pool_establishments", - "boat_dealers", - "boat_rentals_and_leases", - "book_stores", - "books_periodicals_and_newspapers", - "bowling_alleys", - "bus_lines", - "business_secretarial_schools", - "buying_shopping_services", - "cable_satellite_and_other_pay_television_and_radio", - "camera_and_photographic_supply_stores", - "candy_nut_and_confectionery_stores", - "car_and_truck_dealers_new_used", - "car_and_truck_dealers_used_only", - "car_rental_agencies", - "car_washes", - "carpentry_services", - "carpet_upholstery_cleaning", - "caterers", - "charitable_and_social_service_organizations_fundraising", - "chemicals_and_allied_products", - "child_care_services", - "childrens_and_infants_wear_stores", - "chiropodists_podiatrists", - "chiropractors", - "cigar_stores_and_stands", - "civic_social_fraternal_associations", - "cleaning_and_maintenance", - "clothing_rental", - "colleges_universities", - "commercial_equipment", - "commercial_footwear", - "commercial_photography_art_and_graphics", - "commuter_transport_and_ferries", - "computer_network_services", - "computer_programming", - "computer_repair", - "computer_software_stores", - "computers_peripherals_and_software", - "concrete_work_services", - "construction_materials", - "consulting_public_relations", - "correspondence_schools", - "cosmetic_stores", - "counseling_services", - "country_clubs", - "courier_services", - "court_costs", - "credit_reporting_agencies", - "cruise_lines", - "dairy_products_stores", - "dance_hall_studios_schools", - "dating_escort_services", - "dentists_orthodontists", - "department_stores", - "detective_agencies", - "digital_goods_applications", - "digital_goods_games", - "digital_goods_large_volume", - "digital_goods_media", - "direct_marketing_catalog_merchant", - "direct_marketing_combination_catalog_and_retail_merchant", - "direct_marketing_inbound_telemarketing", - "direct_marketing_insurance_services", - "direct_marketing_other", - "direct_marketing_outbound_telemarketing", - "direct_marketing_subscription", - "direct_marketing_travel", - "discount_stores", - "doctors", - "door_to_door_sales", - "drapery_window_covering_and_upholstery_stores", - "drinking_places", - "drug_stores_and_pharmacies", - "drugs_drug_proprietaries_and_druggist_sundries", - "dry_cleaners", - "durable_goods", - "duty_free_stores", - "eating_places_restaurants", - "educational_services", - "electric_razor_stores", - "electric_vehicle_charging", - "electrical_parts_and_equipment", - "electrical_services", - "electronics_repair_shops", - "electronics_stores", - "elementary_secondary_schools", - "emergency_services_gcas_visa_use_only", - "employment_temp_agencies", - "equipment_rental", - "exterminating_services", - "family_clothing_stores", - "fast_food_restaurants", - "financial_institutions", - "fines_government_administrative_entities", - "fireplace_fireplace_screens_and_accessories_stores", - "floor_covering_stores", - "florists", - "florists_supplies_nursery_stock_and_flowers", - "freezer_and_locker_meat_provisioners", - "fuel_dealers_non_automotive", - "funeral_services_crematories", - "furniture_home_furnishings_and_equipment_stores_except_appliances", - "furniture_repair_refinishing", - "furriers_and_fur_shops", - "general_services", - "gift_card_novelty_and_souvenir_shops", - "glass_paint_and_wallpaper_stores", - "glassware_crystal_stores", - "golf_courses_public", - "government_licensed_horse_dog_racing_us_region_only", - "government_licensed_online_casions_online_gambling_us_region_only", - "government_owned_lotteries_non_us_region", - "government_owned_lotteries_us_region_only", - "government_services", - "grocery_stores_supermarkets", - "hardware_equipment_and_supplies", - "hardware_stores", - "health_and_beauty_spas", - "hearing_aids_sales_and_supplies", - "heating_plumbing_a_c", - "hobby_toy_and_game_shops", - "home_supply_warehouse_stores", - "hospitals", - "hotels_motels_and_resorts", - "household_appliance_stores", - "industrial_supplies", - "information_retrieval_services", - "insurance_default", - "insurance_underwriting_premiums", - "intra_company_purchases", - "jewelry_stores_watches_clocks_and_silverware_stores", - "landscaping_services", - "laundries", - "laundry_cleaning_services", - "legal_services_attorneys", - "luggage_and_leather_goods_stores", - "lumber_building_materials_stores", - "manual_cash_disburse", - "marinas_service_and_supplies", - "marketplaces", - "masonry_stonework_and_plaster", - "massage_parlors", - "medical_and_dental_labs", - "medical_dental_ophthalmic_and_hospital_equipment_and_supplies", - "medical_services", - "membership_organizations", - "mens_and_boys_clothing_and_accessories_stores", - "mens_womens_clothing_stores", - "metal_service_centers", - "miscellaneous", - "miscellaneous_apparel_and_accessory_shops", - "miscellaneous_auto_dealers", - "miscellaneous_business_services", - "miscellaneous_food_stores", - "miscellaneous_general_merchandise", - "miscellaneous_general_services", - "miscellaneous_home_furnishing_specialty_stores", - "miscellaneous_publishing_and_printing", - "miscellaneous_recreation_services", - "miscellaneous_repair_shops", - "miscellaneous_specialty_retail", - "mobile_home_dealers", - "motion_picture_theaters", - "motor_freight_carriers_and_trucking", - "motor_homes_dealers", - "motor_vehicle_supplies_and_new_parts", - "motorcycle_shops_and_dealers", - "motorcycle_shops_dealers", - "music_stores_musical_instruments_pianos_and_sheet_music", - "news_dealers_and_newsstands", - "non_fi_money_orders", - "non_fi_stored_value_card_purchase_load", - "nondurable_goods", - "nurseries_lawn_and_garden_supply_stores", - "nursing_personal_care", - "office_and_commercial_furniture", - "opticians_eyeglasses", - "optometrists_ophthalmologist", - "orthopedic_goods_prosthetic_devices", - "osteopaths", - "package_stores_beer_wine_and_liquor", - "paints_varnishes_and_supplies", - "parking_lots_garages", - "passenger_railways", - "pawn_shops", - "pet_shops_pet_food_and_supplies", - "petroleum_and_petroleum_products", - "photo_developing", - "photographic_photocopy_microfilm_equipment_and_supplies", - "photographic_studios", - "picture_video_production", - "piece_goods_notions_and_other_dry_goods", - "plumbing_heating_equipment_and_supplies", - "political_organizations", - "postal_services_government_only", - "precious_stones_and_metals_watches_and_jewelry", - "professional_services", - "public_warehousing_and_storage", - "quick_copy_repro_and_blueprint", - "railroads", - "real_estate_agents_and_managers_rentals", - "record_stores", - "recreational_vehicle_rentals", - "religious_goods_stores", - "religious_organizations", - "roofing_siding_sheet_metal", - "secretarial_support_services", - "security_brokers_dealers", - "service_stations", - "sewing_needlework_fabric_and_piece_goods_stores", - "shoe_repair_hat_cleaning", - "shoe_stores", - "small_appliance_repair", - "snowmobile_dealers", - "special_trade_services", - "specialty_cleaning", - "sporting_goods_stores", - "sporting_recreation_camps", - "sports_and_riding_apparel_stores", - "sports_clubs_fields", - "stamp_and_coin_stores", - "stationary_office_supplies_printing_and_writing_paper", - "stationery_stores_office_and_school_supply_stores", - "swimming_pools_sales", - "t_ui_travel_germany", - "tailors_alterations", - "tax_payments_government_agencies", - "tax_preparation_services", - "taxicabs_limousines", - "telecommunication_equipment_and_telephone_sales", - "telecommunication_services", - "telegraph_services", - "tent_and_awning_shops", - "testing_laboratories", - "theatrical_ticket_agencies", - "timeshares", - "tire_retreading_and_repair", - "tolls_bridge_fees", - "tourist_attractions_and_exhibits", - "towing_services", - "trailer_parks_campgrounds", - "transportation_services", - "travel_agencies_tour_operators", - "truck_stop_iteration", - "truck_utility_trailer_rentals", - "typesetting_plate_making_and_related_services", - "typewriter_stores", - "u_s_federal_government_agencies_or_departments", - "uniforms_commercial_clothing", - "used_merchandise_and_secondhand_stores", - "utilities", - "variety_stores", - "veterinary_services", - "video_amusement_game_supplies", - "video_game_arcades", - "video_tape_rental_stores", - "vocational_trade_schools", - "watch_jewelry_repair", - "welding_repair", - "wholesale_clubs", - "wig_and_toupee_stores", - "wires_money_orders", - "womens_accessory_and_specialty_shops", - "womens_ready_to_wear_stores", - "wrecking_and_salvage_yards", - ] - ] - ] - """ - Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories. - """ - interval: Literal[ - "all_time", - "daily", - "monthly", - "per_authorization", - "weekly", - "yearly", - ] - """ - Interval (or event) to which the amount applies. - """ - - class DeliverCardParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class FailCardParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class ListParams(RequestOptions): - cardholder: NotRequired[str] - """ - Only return cards belonging to the Cardholder with the provided ID. - """ - created: NotRequired["Card.ListParamsCreated|int"] - """ - Only return cards that were issued during the given date interval. - """ - 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. - """ - exp_month: NotRequired[int] - """ - Only return cards that have the given expiration month. - """ - exp_year: NotRequired[int] - """ - Only return cards that have the given expiration year. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - last4: NotRequired[str] - """ - Only return cards that have the given last four digits. - """ - 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. - """ - personalization_design: NotRequired[str] - 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. - """ - status: NotRequired[Literal["active", "canceled", "inactive"]] - """ - Only return cards that have the given status. One of `active`, `inactive`, or `canceled`. - """ - type: NotRequired[Literal["physical", "virtual"]] - """ - Only return cards that have the given type. One of `virtual` or `physical`. - """ - - class ListParamsCreated(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) - """ - - class ModifyParams(RequestOptions): - cancellation_reason: NotRequired[Literal["lost", "stolen"]] - """ - Reason why the `status` of this card is `canceled`. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - personalization_design: NotRequired[str] - pin: NotRequired["Card.ModifyParamsPin"] - """ - The desired new PIN for this card. - """ - shipping: NotRequired["Card.ModifyParamsShipping"] - """ - Updated shipping information for the card. - """ - spending_controls: NotRequired["Card.ModifyParamsSpendingControls"] - """ - Rules that control spending for this card. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details. - """ - status: NotRequired[Literal["active", "canceled", "inactive"]] - """ - Dictates whether authorizations can be approved on this card. May be blocked from activating cards depending on past-due Cardholder requirements. Defaults to `inactive`. If this card is being canceled because it was lost or stolen, this information should be provided as `cancellation_reason`. - """ - - class ModifyParamsPin(TypedDict): - encrypted_number: NotRequired[str] - """ - The card's desired new PIN, encrypted under Stripe's public key. - """ - - class ModifyParamsShipping(TypedDict): - address: "Card.ModifyParamsShippingAddress" - """ - The address that the card is shipped to. - """ - address_validation: NotRequired[ - "Card.ModifyParamsShippingAddressValidation" - ] - """ - Address validation settings. - """ - customs: NotRequired["Card.ModifyParamsShippingCustoms"] - """ - Customs information for the shipment. - """ - name: str - """ - The name printed on the shipping label when shipping the card. - """ - phone_number: NotRequired[str] - """ - Phone number of the recipient of the shipment. - """ - require_signature: NotRequired[bool] - """ - Whether a signature is required for card delivery. - """ - service: NotRequired[Literal["express", "priority", "standard"]] - """ - Shipment service. - """ - type: NotRequired[Literal["bulk", "individual"]] - """ - Packaging options. - """ - - class ModifyParamsShippingAddress(TypedDict): - city: 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: 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: str - """ - ZIP or postal code. - """ - state: NotRequired[str] - """ - State, county, province, or region. - """ - - class ModifyParamsShippingAddressValidation(TypedDict): - mode: Literal[ - "disabled", "normalization_only", "validation_and_normalization" - ] - """ - The address validation capabilities to use. - """ - - class ModifyParamsShippingCustoms(TypedDict): - eori_number: NotRequired[str] - """ - The Economic Operators Registration and Identification (EORI) number to use for Customs. Required for bulk shipments to Europe. - """ - - class ModifyParamsSpendingControls(TypedDict): - allowed_categories: NotRequired[ - List[ - Literal[ - "ac_refrigeration_repair", - "accounting_bookkeeping_services", - "advertising_services", - "agricultural_cooperative", - "airlines_air_carriers", - "airports_flying_fields", - "ambulance_services", - "amusement_parks_carnivals", - "antique_reproductions", - "antique_shops", - "aquariums", - "architectural_surveying_services", - "art_dealers_and_galleries", - "artists_supply_and_craft_shops", - "auto_and_home_supply_stores", - "auto_body_repair_shops", - "auto_paint_shops", - "auto_service_shops", - "automated_cash_disburse", - "automated_fuel_dispensers", - "automobile_associations", - "automotive_parts_and_accessories_stores", - "automotive_tire_stores", - "bail_and_bond_payments", - "bakeries", - "bands_orchestras", - "barber_and_beauty_shops", - "betting_casino_gambling", - "bicycle_shops", - "billiard_pool_establishments", - "boat_dealers", - "boat_rentals_and_leases", - "book_stores", - "books_periodicals_and_newspapers", - "bowling_alleys", - "bus_lines", - "business_secretarial_schools", - "buying_shopping_services", - "cable_satellite_and_other_pay_television_and_radio", - "camera_and_photographic_supply_stores", - "candy_nut_and_confectionery_stores", - "car_and_truck_dealers_new_used", - "car_and_truck_dealers_used_only", - "car_rental_agencies", - "car_washes", - "carpentry_services", - "carpet_upholstery_cleaning", - "caterers", - "charitable_and_social_service_organizations_fundraising", - "chemicals_and_allied_products", - "child_care_services", - "childrens_and_infants_wear_stores", - "chiropodists_podiatrists", - "chiropractors", - "cigar_stores_and_stands", - "civic_social_fraternal_associations", - "cleaning_and_maintenance", - "clothing_rental", - "colleges_universities", - "commercial_equipment", - "commercial_footwear", - "commercial_photography_art_and_graphics", - "commuter_transport_and_ferries", - "computer_network_services", - "computer_programming", - "computer_repair", - "computer_software_stores", - "computers_peripherals_and_software", - "concrete_work_services", - "construction_materials", - "consulting_public_relations", - "correspondence_schools", - "cosmetic_stores", - "counseling_services", - "country_clubs", - "courier_services", - "court_costs", - "credit_reporting_agencies", - "cruise_lines", - "dairy_products_stores", - "dance_hall_studios_schools", - "dating_escort_services", - "dentists_orthodontists", - "department_stores", - "detective_agencies", - "digital_goods_applications", - "digital_goods_games", - "digital_goods_large_volume", - "digital_goods_media", - "direct_marketing_catalog_merchant", - "direct_marketing_combination_catalog_and_retail_merchant", - "direct_marketing_inbound_telemarketing", - "direct_marketing_insurance_services", - "direct_marketing_other", - "direct_marketing_outbound_telemarketing", - "direct_marketing_subscription", - "direct_marketing_travel", - "discount_stores", - "doctors", - "door_to_door_sales", - "drapery_window_covering_and_upholstery_stores", - "drinking_places", - "drug_stores_and_pharmacies", - "drugs_drug_proprietaries_and_druggist_sundries", - "dry_cleaners", - "durable_goods", - "duty_free_stores", - "eating_places_restaurants", - "educational_services", - "electric_razor_stores", - "electric_vehicle_charging", - "electrical_parts_and_equipment", - "electrical_services", - "electronics_repair_shops", - "electronics_stores", - "elementary_secondary_schools", - "emergency_services_gcas_visa_use_only", - "employment_temp_agencies", - "equipment_rental", - "exterminating_services", - "family_clothing_stores", - "fast_food_restaurants", - "financial_institutions", - "fines_government_administrative_entities", - "fireplace_fireplace_screens_and_accessories_stores", - "floor_covering_stores", - "florists", - "florists_supplies_nursery_stock_and_flowers", - "freezer_and_locker_meat_provisioners", - "fuel_dealers_non_automotive", - "funeral_services_crematories", - "furniture_home_furnishings_and_equipment_stores_except_appliances", - "furniture_repair_refinishing", - "furriers_and_fur_shops", - "general_services", - "gift_card_novelty_and_souvenir_shops", - "glass_paint_and_wallpaper_stores", - "glassware_crystal_stores", - "golf_courses_public", - "government_licensed_horse_dog_racing_us_region_only", - "government_licensed_online_casions_online_gambling_us_region_only", - "government_owned_lotteries_non_us_region", - "government_owned_lotteries_us_region_only", - "government_services", - "grocery_stores_supermarkets", - "hardware_equipment_and_supplies", - "hardware_stores", - "health_and_beauty_spas", - "hearing_aids_sales_and_supplies", - "heating_plumbing_a_c", - "hobby_toy_and_game_shops", - "home_supply_warehouse_stores", - "hospitals", - "hotels_motels_and_resorts", - "household_appliance_stores", - "industrial_supplies", - "information_retrieval_services", - "insurance_default", - "insurance_underwriting_premiums", - "intra_company_purchases", - "jewelry_stores_watches_clocks_and_silverware_stores", - "landscaping_services", - "laundries", - "laundry_cleaning_services", - "legal_services_attorneys", - "luggage_and_leather_goods_stores", - "lumber_building_materials_stores", - "manual_cash_disburse", - "marinas_service_and_supplies", - "marketplaces", - "masonry_stonework_and_plaster", - "massage_parlors", - "medical_and_dental_labs", - "medical_dental_ophthalmic_and_hospital_equipment_and_supplies", - "medical_services", - "membership_organizations", - "mens_and_boys_clothing_and_accessories_stores", - "mens_womens_clothing_stores", - "metal_service_centers", - "miscellaneous", - "miscellaneous_apparel_and_accessory_shops", - "miscellaneous_auto_dealers", - "miscellaneous_business_services", - "miscellaneous_food_stores", - "miscellaneous_general_merchandise", - "miscellaneous_general_services", - "miscellaneous_home_furnishing_specialty_stores", - "miscellaneous_publishing_and_printing", - "miscellaneous_recreation_services", - "miscellaneous_repair_shops", - "miscellaneous_specialty_retail", - "mobile_home_dealers", - "motion_picture_theaters", - "motor_freight_carriers_and_trucking", - "motor_homes_dealers", - "motor_vehicle_supplies_and_new_parts", - "motorcycle_shops_and_dealers", - "motorcycle_shops_dealers", - "music_stores_musical_instruments_pianos_and_sheet_music", - "news_dealers_and_newsstands", - "non_fi_money_orders", - "non_fi_stored_value_card_purchase_load", - "nondurable_goods", - "nurseries_lawn_and_garden_supply_stores", - "nursing_personal_care", - "office_and_commercial_furniture", - "opticians_eyeglasses", - "optometrists_ophthalmologist", - "orthopedic_goods_prosthetic_devices", - "osteopaths", - "package_stores_beer_wine_and_liquor", - "paints_varnishes_and_supplies", - "parking_lots_garages", - "passenger_railways", - "pawn_shops", - "pet_shops_pet_food_and_supplies", - "petroleum_and_petroleum_products", - "photo_developing", - "photographic_photocopy_microfilm_equipment_and_supplies", - "photographic_studios", - "picture_video_production", - "piece_goods_notions_and_other_dry_goods", - "plumbing_heating_equipment_and_supplies", - "political_organizations", - "postal_services_government_only", - "precious_stones_and_metals_watches_and_jewelry", - "professional_services", - "public_warehousing_and_storage", - "quick_copy_repro_and_blueprint", - "railroads", - "real_estate_agents_and_managers_rentals", - "record_stores", - "recreational_vehicle_rentals", - "religious_goods_stores", - "religious_organizations", - "roofing_siding_sheet_metal", - "secretarial_support_services", - "security_brokers_dealers", - "service_stations", - "sewing_needlework_fabric_and_piece_goods_stores", - "shoe_repair_hat_cleaning", - "shoe_stores", - "small_appliance_repair", - "snowmobile_dealers", - "special_trade_services", - "specialty_cleaning", - "sporting_goods_stores", - "sporting_recreation_camps", - "sports_and_riding_apparel_stores", - "sports_clubs_fields", - "stamp_and_coin_stores", - "stationary_office_supplies_printing_and_writing_paper", - "stationery_stores_office_and_school_supply_stores", - "swimming_pools_sales", - "t_ui_travel_germany", - "tailors_alterations", - "tax_payments_government_agencies", - "tax_preparation_services", - "taxicabs_limousines", - "telecommunication_equipment_and_telephone_sales", - "telecommunication_services", - "telegraph_services", - "tent_and_awning_shops", - "testing_laboratories", - "theatrical_ticket_agencies", - "timeshares", - "tire_retreading_and_repair", - "tolls_bridge_fees", - "tourist_attractions_and_exhibits", - "towing_services", - "trailer_parks_campgrounds", - "transportation_services", - "travel_agencies_tour_operators", - "truck_stop_iteration", - "truck_utility_trailer_rentals", - "typesetting_plate_making_and_related_services", - "typewriter_stores", - "u_s_federal_government_agencies_or_departments", - "uniforms_commercial_clothing", - "used_merchandise_and_secondhand_stores", - "utilities", - "variety_stores", - "veterinary_services", - "video_amusement_game_supplies", - "video_game_arcades", - "video_tape_rental_stores", - "vocational_trade_schools", - "watch_jewelry_repair", - "welding_repair", - "wholesale_clubs", - "wig_and_toupee_stores", - "wires_money_orders", - "womens_accessory_and_specialty_shops", - "womens_ready_to_wear_stores", - "wrecking_and_salvage_yards", - ] - ] - ] - """ - Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to allow. All other categories will be blocked. Cannot be set with `blocked_categories`. - """ - allowed_merchant_countries: NotRequired[List[str]] - """ - Array of strings containing representing countries from which authorizations will be allowed. Authorizations from merchants in all other countries will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `blocked_merchant_countries`. Provide an empty value to unset this control. - """ - blocked_categories: NotRequired[ - List[ - Literal[ - "ac_refrigeration_repair", - "accounting_bookkeeping_services", - "advertising_services", - "agricultural_cooperative", - "airlines_air_carriers", - "airports_flying_fields", - "ambulance_services", - "amusement_parks_carnivals", - "antique_reproductions", - "antique_shops", - "aquariums", - "architectural_surveying_services", - "art_dealers_and_galleries", - "artists_supply_and_craft_shops", - "auto_and_home_supply_stores", - "auto_body_repair_shops", - "auto_paint_shops", - "auto_service_shops", - "automated_cash_disburse", - "automated_fuel_dispensers", - "automobile_associations", - "automotive_parts_and_accessories_stores", - "automotive_tire_stores", - "bail_and_bond_payments", - "bakeries", - "bands_orchestras", - "barber_and_beauty_shops", - "betting_casino_gambling", - "bicycle_shops", - "billiard_pool_establishments", - "boat_dealers", - "boat_rentals_and_leases", - "book_stores", - "books_periodicals_and_newspapers", - "bowling_alleys", - "bus_lines", - "business_secretarial_schools", - "buying_shopping_services", - "cable_satellite_and_other_pay_television_and_radio", - "camera_and_photographic_supply_stores", - "candy_nut_and_confectionery_stores", - "car_and_truck_dealers_new_used", - "car_and_truck_dealers_used_only", - "car_rental_agencies", - "car_washes", - "carpentry_services", - "carpet_upholstery_cleaning", - "caterers", - "charitable_and_social_service_organizations_fundraising", - "chemicals_and_allied_products", - "child_care_services", - "childrens_and_infants_wear_stores", - "chiropodists_podiatrists", - "chiropractors", - "cigar_stores_and_stands", - "civic_social_fraternal_associations", - "cleaning_and_maintenance", - "clothing_rental", - "colleges_universities", - "commercial_equipment", - "commercial_footwear", - "commercial_photography_art_and_graphics", - "commuter_transport_and_ferries", - "computer_network_services", - "computer_programming", - "computer_repair", - "computer_software_stores", - "computers_peripherals_and_software", - "concrete_work_services", - "construction_materials", - "consulting_public_relations", - "correspondence_schools", - "cosmetic_stores", - "counseling_services", - "country_clubs", - "courier_services", - "court_costs", - "credit_reporting_agencies", - "cruise_lines", - "dairy_products_stores", - "dance_hall_studios_schools", - "dating_escort_services", - "dentists_orthodontists", - "department_stores", - "detective_agencies", - "digital_goods_applications", - "digital_goods_games", - "digital_goods_large_volume", - "digital_goods_media", - "direct_marketing_catalog_merchant", - "direct_marketing_combination_catalog_and_retail_merchant", - "direct_marketing_inbound_telemarketing", - "direct_marketing_insurance_services", - "direct_marketing_other", - "direct_marketing_outbound_telemarketing", - "direct_marketing_subscription", - "direct_marketing_travel", - "discount_stores", - "doctors", - "door_to_door_sales", - "drapery_window_covering_and_upholstery_stores", - "drinking_places", - "drug_stores_and_pharmacies", - "drugs_drug_proprietaries_and_druggist_sundries", - "dry_cleaners", - "durable_goods", - "duty_free_stores", - "eating_places_restaurants", - "educational_services", - "electric_razor_stores", - "electric_vehicle_charging", - "electrical_parts_and_equipment", - "electrical_services", - "electronics_repair_shops", - "electronics_stores", - "elementary_secondary_schools", - "emergency_services_gcas_visa_use_only", - "employment_temp_agencies", - "equipment_rental", - "exterminating_services", - "family_clothing_stores", - "fast_food_restaurants", - "financial_institutions", - "fines_government_administrative_entities", - "fireplace_fireplace_screens_and_accessories_stores", - "floor_covering_stores", - "florists", - "florists_supplies_nursery_stock_and_flowers", - "freezer_and_locker_meat_provisioners", - "fuel_dealers_non_automotive", - "funeral_services_crematories", - "furniture_home_furnishings_and_equipment_stores_except_appliances", - "furniture_repair_refinishing", - "furriers_and_fur_shops", - "general_services", - "gift_card_novelty_and_souvenir_shops", - "glass_paint_and_wallpaper_stores", - "glassware_crystal_stores", - "golf_courses_public", - "government_licensed_horse_dog_racing_us_region_only", - "government_licensed_online_casions_online_gambling_us_region_only", - "government_owned_lotteries_non_us_region", - "government_owned_lotteries_us_region_only", - "government_services", - "grocery_stores_supermarkets", - "hardware_equipment_and_supplies", - "hardware_stores", - "health_and_beauty_spas", - "hearing_aids_sales_and_supplies", - "heating_plumbing_a_c", - "hobby_toy_and_game_shops", - "home_supply_warehouse_stores", - "hospitals", - "hotels_motels_and_resorts", - "household_appliance_stores", - "industrial_supplies", - "information_retrieval_services", - "insurance_default", - "insurance_underwriting_premiums", - "intra_company_purchases", - "jewelry_stores_watches_clocks_and_silverware_stores", - "landscaping_services", - "laundries", - "laundry_cleaning_services", - "legal_services_attorneys", - "luggage_and_leather_goods_stores", - "lumber_building_materials_stores", - "manual_cash_disburse", - "marinas_service_and_supplies", - "marketplaces", - "masonry_stonework_and_plaster", - "massage_parlors", - "medical_and_dental_labs", - "medical_dental_ophthalmic_and_hospital_equipment_and_supplies", - "medical_services", - "membership_organizations", - "mens_and_boys_clothing_and_accessories_stores", - "mens_womens_clothing_stores", - "metal_service_centers", - "miscellaneous", - "miscellaneous_apparel_and_accessory_shops", - "miscellaneous_auto_dealers", - "miscellaneous_business_services", - "miscellaneous_food_stores", - "miscellaneous_general_merchandise", - "miscellaneous_general_services", - "miscellaneous_home_furnishing_specialty_stores", - "miscellaneous_publishing_and_printing", - "miscellaneous_recreation_services", - "miscellaneous_repair_shops", - "miscellaneous_specialty_retail", - "mobile_home_dealers", - "motion_picture_theaters", - "motor_freight_carriers_and_trucking", - "motor_homes_dealers", - "motor_vehicle_supplies_and_new_parts", - "motorcycle_shops_and_dealers", - "motorcycle_shops_dealers", - "music_stores_musical_instruments_pianos_and_sheet_music", - "news_dealers_and_newsstands", - "non_fi_money_orders", - "non_fi_stored_value_card_purchase_load", - "nondurable_goods", - "nurseries_lawn_and_garden_supply_stores", - "nursing_personal_care", - "office_and_commercial_furniture", - "opticians_eyeglasses", - "optometrists_ophthalmologist", - "orthopedic_goods_prosthetic_devices", - "osteopaths", - "package_stores_beer_wine_and_liquor", - "paints_varnishes_and_supplies", - "parking_lots_garages", - "passenger_railways", - "pawn_shops", - "pet_shops_pet_food_and_supplies", - "petroleum_and_petroleum_products", - "photo_developing", - "photographic_photocopy_microfilm_equipment_and_supplies", - "photographic_studios", - "picture_video_production", - "piece_goods_notions_and_other_dry_goods", - "plumbing_heating_equipment_and_supplies", - "political_organizations", - "postal_services_government_only", - "precious_stones_and_metals_watches_and_jewelry", - "professional_services", - "public_warehousing_and_storage", - "quick_copy_repro_and_blueprint", - "railroads", - "real_estate_agents_and_managers_rentals", - "record_stores", - "recreational_vehicle_rentals", - "religious_goods_stores", - "religious_organizations", - "roofing_siding_sheet_metal", - "secretarial_support_services", - "security_brokers_dealers", - "service_stations", - "sewing_needlework_fabric_and_piece_goods_stores", - "shoe_repair_hat_cleaning", - "shoe_stores", - "small_appliance_repair", - "snowmobile_dealers", - "special_trade_services", - "specialty_cleaning", - "sporting_goods_stores", - "sporting_recreation_camps", - "sports_and_riding_apparel_stores", - "sports_clubs_fields", - "stamp_and_coin_stores", - "stationary_office_supplies_printing_and_writing_paper", - "stationery_stores_office_and_school_supply_stores", - "swimming_pools_sales", - "t_ui_travel_germany", - "tailors_alterations", - "tax_payments_government_agencies", - "tax_preparation_services", - "taxicabs_limousines", - "telecommunication_equipment_and_telephone_sales", - "telecommunication_services", - "telegraph_services", - "tent_and_awning_shops", - "testing_laboratories", - "theatrical_ticket_agencies", - "timeshares", - "tire_retreading_and_repair", - "tolls_bridge_fees", - "tourist_attractions_and_exhibits", - "towing_services", - "trailer_parks_campgrounds", - "transportation_services", - "travel_agencies_tour_operators", - "truck_stop_iteration", - "truck_utility_trailer_rentals", - "typesetting_plate_making_and_related_services", - "typewriter_stores", - "u_s_federal_government_agencies_or_departments", - "uniforms_commercial_clothing", - "used_merchandise_and_secondhand_stores", - "utilities", - "variety_stores", - "veterinary_services", - "video_amusement_game_supplies", - "video_game_arcades", - "video_tape_rental_stores", - "vocational_trade_schools", - "watch_jewelry_repair", - "welding_repair", - "wholesale_clubs", - "wig_and_toupee_stores", - "wires_money_orders", - "womens_accessory_and_specialty_shops", - "womens_ready_to_wear_stores", - "wrecking_and_salvage_yards", - ] - ] - ] - """ - Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to decline. All other categories will be allowed. Cannot be set with `allowed_categories`. - """ - blocked_merchant_countries: NotRequired[List[str]] - """ - Array of strings containing representing countries from which authorizations will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `allowed_merchant_countries`. Provide an empty value to unset this control. - """ - spending_limits: NotRequired[ - List["Card.ModifyParamsSpendingControlsSpendingLimit"] - ] - """ - Limit spending with amount-based rules that apply across any cards this card replaced (i.e., its `replacement_for` card and _that_ card's `replacement_for` card, up the chain). - """ - - class ModifyParamsSpendingControlsSpendingLimit(TypedDict): - amount: int - """ - Maximum amount allowed to spend per interval. - """ - categories: NotRequired[ - List[ - Literal[ - "ac_refrigeration_repair", - "accounting_bookkeeping_services", - "advertising_services", - "agricultural_cooperative", - "airlines_air_carriers", - "airports_flying_fields", - "ambulance_services", - "amusement_parks_carnivals", - "antique_reproductions", - "antique_shops", - "aquariums", - "architectural_surveying_services", - "art_dealers_and_galleries", - "artists_supply_and_craft_shops", - "auto_and_home_supply_stores", - "auto_body_repair_shops", - "auto_paint_shops", - "auto_service_shops", - "automated_cash_disburse", - "automated_fuel_dispensers", - "automobile_associations", - "automotive_parts_and_accessories_stores", - "automotive_tire_stores", - "bail_and_bond_payments", - "bakeries", - "bands_orchestras", - "barber_and_beauty_shops", - "betting_casino_gambling", - "bicycle_shops", - "billiard_pool_establishments", - "boat_dealers", - "boat_rentals_and_leases", - "book_stores", - "books_periodicals_and_newspapers", - "bowling_alleys", - "bus_lines", - "business_secretarial_schools", - "buying_shopping_services", - "cable_satellite_and_other_pay_television_and_radio", - "camera_and_photographic_supply_stores", - "candy_nut_and_confectionery_stores", - "car_and_truck_dealers_new_used", - "car_and_truck_dealers_used_only", - "car_rental_agencies", - "car_washes", - "carpentry_services", - "carpet_upholstery_cleaning", - "caterers", - "charitable_and_social_service_organizations_fundraising", - "chemicals_and_allied_products", - "child_care_services", - "childrens_and_infants_wear_stores", - "chiropodists_podiatrists", - "chiropractors", - "cigar_stores_and_stands", - "civic_social_fraternal_associations", - "cleaning_and_maintenance", - "clothing_rental", - "colleges_universities", - "commercial_equipment", - "commercial_footwear", - "commercial_photography_art_and_graphics", - "commuter_transport_and_ferries", - "computer_network_services", - "computer_programming", - "computer_repair", - "computer_software_stores", - "computers_peripherals_and_software", - "concrete_work_services", - "construction_materials", - "consulting_public_relations", - "correspondence_schools", - "cosmetic_stores", - "counseling_services", - "country_clubs", - "courier_services", - "court_costs", - "credit_reporting_agencies", - "cruise_lines", - "dairy_products_stores", - "dance_hall_studios_schools", - "dating_escort_services", - "dentists_orthodontists", - "department_stores", - "detective_agencies", - "digital_goods_applications", - "digital_goods_games", - "digital_goods_large_volume", - "digital_goods_media", - "direct_marketing_catalog_merchant", - "direct_marketing_combination_catalog_and_retail_merchant", - "direct_marketing_inbound_telemarketing", - "direct_marketing_insurance_services", - "direct_marketing_other", - "direct_marketing_outbound_telemarketing", - "direct_marketing_subscription", - "direct_marketing_travel", - "discount_stores", - "doctors", - "door_to_door_sales", - "drapery_window_covering_and_upholstery_stores", - "drinking_places", - "drug_stores_and_pharmacies", - "drugs_drug_proprietaries_and_druggist_sundries", - "dry_cleaners", - "durable_goods", - "duty_free_stores", - "eating_places_restaurants", - "educational_services", - "electric_razor_stores", - "electric_vehicle_charging", - "electrical_parts_and_equipment", - "electrical_services", - "electronics_repair_shops", - "electronics_stores", - "elementary_secondary_schools", - "emergency_services_gcas_visa_use_only", - "employment_temp_agencies", - "equipment_rental", - "exterminating_services", - "family_clothing_stores", - "fast_food_restaurants", - "financial_institutions", - "fines_government_administrative_entities", - "fireplace_fireplace_screens_and_accessories_stores", - "floor_covering_stores", - "florists", - "florists_supplies_nursery_stock_and_flowers", - "freezer_and_locker_meat_provisioners", - "fuel_dealers_non_automotive", - "funeral_services_crematories", - "furniture_home_furnishings_and_equipment_stores_except_appliances", - "furniture_repair_refinishing", - "furriers_and_fur_shops", - "general_services", - "gift_card_novelty_and_souvenir_shops", - "glass_paint_and_wallpaper_stores", - "glassware_crystal_stores", - "golf_courses_public", - "government_licensed_horse_dog_racing_us_region_only", - "government_licensed_online_casions_online_gambling_us_region_only", - "government_owned_lotteries_non_us_region", - "government_owned_lotteries_us_region_only", - "government_services", - "grocery_stores_supermarkets", - "hardware_equipment_and_supplies", - "hardware_stores", - "health_and_beauty_spas", - "hearing_aids_sales_and_supplies", - "heating_plumbing_a_c", - "hobby_toy_and_game_shops", - "home_supply_warehouse_stores", - "hospitals", - "hotels_motels_and_resorts", - "household_appliance_stores", - "industrial_supplies", - "information_retrieval_services", - "insurance_default", - "insurance_underwriting_premiums", - "intra_company_purchases", - "jewelry_stores_watches_clocks_and_silverware_stores", - "landscaping_services", - "laundries", - "laundry_cleaning_services", - "legal_services_attorneys", - "luggage_and_leather_goods_stores", - "lumber_building_materials_stores", - "manual_cash_disburse", - "marinas_service_and_supplies", - "marketplaces", - "masonry_stonework_and_plaster", - "massage_parlors", - "medical_and_dental_labs", - "medical_dental_ophthalmic_and_hospital_equipment_and_supplies", - "medical_services", - "membership_organizations", - "mens_and_boys_clothing_and_accessories_stores", - "mens_womens_clothing_stores", - "metal_service_centers", - "miscellaneous", - "miscellaneous_apparel_and_accessory_shops", - "miscellaneous_auto_dealers", - "miscellaneous_business_services", - "miscellaneous_food_stores", - "miscellaneous_general_merchandise", - "miscellaneous_general_services", - "miscellaneous_home_furnishing_specialty_stores", - "miscellaneous_publishing_and_printing", - "miscellaneous_recreation_services", - "miscellaneous_repair_shops", - "miscellaneous_specialty_retail", - "mobile_home_dealers", - "motion_picture_theaters", - "motor_freight_carriers_and_trucking", - "motor_homes_dealers", - "motor_vehicle_supplies_and_new_parts", - "motorcycle_shops_and_dealers", - "motorcycle_shops_dealers", - "music_stores_musical_instruments_pianos_and_sheet_music", - "news_dealers_and_newsstands", - "non_fi_money_orders", - "non_fi_stored_value_card_purchase_load", - "nondurable_goods", - "nurseries_lawn_and_garden_supply_stores", - "nursing_personal_care", - "office_and_commercial_furniture", - "opticians_eyeglasses", - "optometrists_ophthalmologist", - "orthopedic_goods_prosthetic_devices", - "osteopaths", - "package_stores_beer_wine_and_liquor", - "paints_varnishes_and_supplies", - "parking_lots_garages", - "passenger_railways", - "pawn_shops", - "pet_shops_pet_food_and_supplies", - "petroleum_and_petroleum_products", - "photo_developing", - "photographic_photocopy_microfilm_equipment_and_supplies", - "photographic_studios", - "picture_video_production", - "piece_goods_notions_and_other_dry_goods", - "plumbing_heating_equipment_and_supplies", - "political_organizations", - "postal_services_government_only", - "precious_stones_and_metals_watches_and_jewelry", - "professional_services", - "public_warehousing_and_storage", - "quick_copy_repro_and_blueprint", - "railroads", - "real_estate_agents_and_managers_rentals", - "record_stores", - "recreational_vehicle_rentals", - "religious_goods_stores", - "religious_organizations", - "roofing_siding_sheet_metal", - "secretarial_support_services", - "security_brokers_dealers", - "service_stations", - "sewing_needlework_fabric_and_piece_goods_stores", - "shoe_repair_hat_cleaning", - "shoe_stores", - "small_appliance_repair", - "snowmobile_dealers", - "special_trade_services", - "specialty_cleaning", - "sporting_goods_stores", - "sporting_recreation_camps", - "sports_and_riding_apparel_stores", - "sports_clubs_fields", - "stamp_and_coin_stores", - "stationary_office_supplies_printing_and_writing_paper", - "stationery_stores_office_and_school_supply_stores", - "swimming_pools_sales", - "t_ui_travel_germany", - "tailors_alterations", - "tax_payments_government_agencies", - "tax_preparation_services", - "taxicabs_limousines", - "telecommunication_equipment_and_telephone_sales", - "telecommunication_services", - "telegraph_services", - "tent_and_awning_shops", - "testing_laboratories", - "theatrical_ticket_agencies", - "timeshares", - "tire_retreading_and_repair", - "tolls_bridge_fees", - "tourist_attractions_and_exhibits", - "towing_services", - "trailer_parks_campgrounds", - "transportation_services", - "travel_agencies_tour_operators", - "truck_stop_iteration", - "truck_utility_trailer_rentals", - "typesetting_plate_making_and_related_services", - "typewriter_stores", - "u_s_federal_government_agencies_or_departments", - "uniforms_commercial_clothing", - "used_merchandise_and_secondhand_stores", - "utilities", - "variety_stores", - "veterinary_services", - "video_amusement_game_supplies", - "video_game_arcades", - "video_tape_rental_stores", - "vocational_trade_schools", - "watch_jewelry_repair", - "welding_repair", - "wholesale_clubs", - "wig_and_toupee_stores", - "wires_money_orders", - "womens_accessory_and_specialty_shops", - "womens_ready_to_wear_stores", - "wrecking_and_salvage_yards", - ] - ] - ] - """ - Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories. - """ - interval: Literal[ - "all_time", - "daily", - "monthly", - "per_authorization", - "weekly", - "yearly", - ] - """ - Interval (or event) to which the amount applies. - """ - - class RetrieveParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class ReturnCardParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class ShipCardParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class SubmitCardParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - brand: str """ The brand of the card. @@ -3530,7 +1283,7 @@ class SubmitCardParams(RequestOptions): """ @classmethod - def create(cls, **params: Unpack["Card.CreateParams"]) -> "Card": + def create(cls, **params: Unpack["CardCreateParams"]) -> "Card": """ Creates an Issuing Card object. """ @@ -3545,7 +1298,7 @@ def create(cls, **params: Unpack["Card.CreateParams"]) -> "Card": @classmethod async def create_async( - cls, **params: Unpack["Card.CreateParams"] + cls, **params: Unpack["CardCreateParams"] ) -> "Card": """ Creates an Issuing Card object. @@ -3560,7 +1313,7 @@ async def create_async( ) @classmethod - def list(cls, **params: Unpack["Card.ListParams"]) -> ListObject["Card"]: + def list(cls, **params: Unpack["CardListParams"]) -> ListObject["Card"]: """ Returns a list of Issuing Card objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first. """ @@ -3579,7 +1332,7 @@ def list(cls, **params: Unpack["Card.ListParams"]) -> ListObject["Card"]: @classmethod async def list_async( - cls, **params: Unpack["Card.ListParams"] + cls, **params: Unpack["CardListParams"] ) -> ListObject["Card"]: """ Returns a list of Issuing Card objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first. @@ -3598,7 +1351,7 @@ async def list_async( return result @classmethod - def modify(cls, id: str, **params: Unpack["Card.ModifyParams"]) -> "Card": + def modify(cls, id: str, **params: Unpack["CardModifyParams"]) -> "Card": """ Updates the specified Issuing Card object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. """ @@ -3614,7 +1367,7 @@ def modify(cls, id: str, **params: Unpack["Card.ModifyParams"]) -> "Card": @classmethod async def modify_async( - cls, id: str, **params: Unpack["Card.ModifyParams"] + cls, id: str, **params: Unpack["CardModifyParams"] ) -> "Card": """ Updates the specified Issuing Card object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. @@ -3631,7 +1384,7 @@ async def modify_async( @classmethod def retrieve( - cls, id: str, **params: Unpack["Card.RetrieveParams"] + cls, id: str, **params: Unpack["CardRetrieveParams"] ) -> "Card": """ Retrieves an Issuing Card object. @@ -3642,7 +1395,7 @@ def retrieve( @classmethod async def retrieve_async( - cls, id: str, **params: Unpack["Card.RetrieveParams"] + cls, id: str, **params: Unpack["CardRetrieveParams"] ) -> "Card": """ Retrieves an Issuing Card object. @@ -3656,7 +1409,7 @@ class TestHelpers(APIResourceTestHelpers["Card"]): @classmethod def _cls_deliver_card( - cls, card: str, **params: Unpack["Card.DeliverCardParams"] + cls, card: str, **params: Unpack["CardDeliverCardParams"] ) -> "Card": """ Updates the shipping status of the specified Issuing Card object to delivered. @@ -3675,7 +1428,7 @@ def _cls_deliver_card( @overload @staticmethod def deliver_card( - card: str, **params: Unpack["Card.DeliverCardParams"] + card: str, **params: Unpack["CardDeliverCardParams"] ) -> "Card": """ Updates the shipping status of the specified Issuing Card object to delivered. @@ -3684,7 +1437,7 @@ def deliver_card( @overload def deliver_card( - self, **params: Unpack["Card.DeliverCardParams"] + self, **params: Unpack["CardDeliverCardParams"] ) -> "Card": """ Updates the shipping status of the specified Issuing Card object to delivered. @@ -3693,7 +1446,7 @@ def deliver_card( @class_method_variant("_cls_deliver_card") def deliver_card( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Card.DeliverCardParams"] + self, **params: Unpack["CardDeliverCardParams"] ) -> "Card": """ Updates the shipping status of the specified Issuing Card object to delivered. @@ -3711,7 +1464,7 @@ def deliver_card( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_deliver_card_async( - cls, card: str, **params: Unpack["Card.DeliverCardParams"] + cls, card: str, **params: Unpack["CardDeliverCardParams"] ) -> "Card": """ Updates the shipping status of the specified Issuing Card object to delivered. @@ -3730,7 +1483,7 @@ async def _cls_deliver_card_async( @overload @staticmethod async def deliver_card_async( - card: str, **params: Unpack["Card.DeliverCardParams"] + card: str, **params: Unpack["CardDeliverCardParams"] ) -> "Card": """ Updates the shipping status of the specified Issuing Card object to delivered. @@ -3739,7 +1492,7 @@ async def deliver_card_async( @overload async def deliver_card_async( - self, **params: Unpack["Card.DeliverCardParams"] + self, **params: Unpack["CardDeliverCardParams"] ) -> "Card": """ Updates the shipping status of the specified Issuing Card object to delivered. @@ -3748,7 +1501,7 @@ async def deliver_card_async( @class_method_variant("_cls_deliver_card_async") async def deliver_card_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Card.DeliverCardParams"] + self, **params: Unpack["CardDeliverCardParams"] ) -> "Card": """ Updates the shipping status of the specified Issuing Card object to delivered. @@ -3766,7 +1519,7 @@ async def deliver_card_async( # pyright: ignore[reportGeneralTypeIssues] @classmethod def _cls_fail_card( - cls, card: str, **params: Unpack["Card.FailCardParams"] + cls, card: str, **params: Unpack["CardFailCardParams"] ) -> "Card": """ Updates the shipping status of the specified Issuing Card object to failure. @@ -3785,7 +1538,7 @@ def _cls_fail_card( @overload @staticmethod def fail_card( - card: str, **params: Unpack["Card.FailCardParams"] + card: str, **params: Unpack["CardFailCardParams"] ) -> "Card": """ Updates the shipping status of the specified Issuing Card object to failure. @@ -3793,7 +1546,7 @@ def fail_card( ... @overload - def fail_card(self, **params: Unpack["Card.FailCardParams"]) -> "Card": + def fail_card(self, **params: Unpack["CardFailCardParams"]) -> "Card": """ Updates the shipping status of the specified Issuing Card object to failure. """ @@ -3801,7 +1554,7 @@ def fail_card(self, **params: Unpack["Card.FailCardParams"]) -> "Card": @class_method_variant("_cls_fail_card") def fail_card( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Card.FailCardParams"] + self, **params: Unpack["CardFailCardParams"] ) -> "Card": """ Updates the shipping status of the specified Issuing Card object to failure. @@ -3819,7 +1572,7 @@ def fail_card( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_fail_card_async( - cls, card: str, **params: Unpack["Card.FailCardParams"] + cls, card: str, **params: Unpack["CardFailCardParams"] ) -> "Card": """ Updates the shipping status of the specified Issuing Card object to failure. @@ -3838,7 +1591,7 @@ async def _cls_fail_card_async( @overload @staticmethod async def fail_card_async( - card: str, **params: Unpack["Card.FailCardParams"] + card: str, **params: Unpack["CardFailCardParams"] ) -> "Card": """ Updates the shipping status of the specified Issuing Card object to failure. @@ -3847,7 +1600,7 @@ async def fail_card_async( @overload async def fail_card_async( - self, **params: Unpack["Card.FailCardParams"] + self, **params: Unpack["CardFailCardParams"] ) -> "Card": """ Updates the shipping status of the specified Issuing Card object to failure. @@ -3856,7 +1609,7 @@ async def fail_card_async( @class_method_variant("_cls_fail_card_async") async def fail_card_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Card.FailCardParams"] + self, **params: Unpack["CardFailCardParams"] ) -> "Card": """ Updates the shipping status of the specified Issuing Card object to failure. @@ -3874,7 +1627,7 @@ async def fail_card_async( # pyright: ignore[reportGeneralTypeIssues] @classmethod def _cls_return_card( - cls, card: str, **params: Unpack["Card.ReturnCardParams"] + cls, card: str, **params: Unpack["CardReturnCardParams"] ) -> "Card": """ Updates the shipping status of the specified Issuing Card object to returned. @@ -3893,7 +1646,7 @@ def _cls_return_card( @overload @staticmethod def return_card( - card: str, **params: Unpack["Card.ReturnCardParams"] + card: str, **params: Unpack["CardReturnCardParams"] ) -> "Card": """ Updates the shipping status of the specified Issuing Card object to returned. @@ -3902,7 +1655,7 @@ def return_card( @overload def return_card( - self, **params: Unpack["Card.ReturnCardParams"] + self, **params: Unpack["CardReturnCardParams"] ) -> "Card": """ Updates the shipping status of the specified Issuing Card object to returned. @@ -3911,7 +1664,7 @@ def return_card( @class_method_variant("_cls_return_card") def return_card( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Card.ReturnCardParams"] + self, **params: Unpack["CardReturnCardParams"] ) -> "Card": """ Updates the shipping status of the specified Issuing Card object to returned. @@ -3929,7 +1682,7 @@ def return_card( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_return_card_async( - cls, card: str, **params: Unpack["Card.ReturnCardParams"] + cls, card: str, **params: Unpack["CardReturnCardParams"] ) -> "Card": """ Updates the shipping status of the specified Issuing Card object to returned. @@ -3948,7 +1701,7 @@ async def _cls_return_card_async( @overload @staticmethod async def return_card_async( - card: str, **params: Unpack["Card.ReturnCardParams"] + card: str, **params: Unpack["CardReturnCardParams"] ) -> "Card": """ Updates the shipping status of the specified Issuing Card object to returned. @@ -3957,7 +1710,7 @@ async def return_card_async( @overload async def return_card_async( - self, **params: Unpack["Card.ReturnCardParams"] + self, **params: Unpack["CardReturnCardParams"] ) -> "Card": """ Updates the shipping status of the specified Issuing Card object to returned. @@ -3966,7 +1719,7 @@ async def return_card_async( @class_method_variant("_cls_return_card_async") async def return_card_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Card.ReturnCardParams"] + self, **params: Unpack["CardReturnCardParams"] ) -> "Card": """ Updates the shipping status of the specified Issuing Card object to returned. @@ -3984,7 +1737,7 @@ async def return_card_async( # pyright: ignore[reportGeneralTypeIssues] @classmethod def _cls_ship_card( - cls, card: str, **params: Unpack["Card.ShipCardParams"] + cls, card: str, **params: Unpack["CardShipCardParams"] ) -> "Card": """ Updates the shipping status of the specified Issuing Card object to shipped. @@ -4003,7 +1756,7 @@ def _cls_ship_card( @overload @staticmethod def ship_card( - card: str, **params: Unpack["Card.ShipCardParams"] + card: str, **params: Unpack["CardShipCardParams"] ) -> "Card": """ Updates the shipping status of the specified Issuing Card object to shipped. @@ -4011,7 +1764,7 @@ def ship_card( ... @overload - def ship_card(self, **params: Unpack["Card.ShipCardParams"]) -> "Card": + def ship_card(self, **params: Unpack["CardShipCardParams"]) -> "Card": """ Updates the shipping status of the specified Issuing Card object to shipped. """ @@ -4019,7 +1772,7 @@ def ship_card(self, **params: Unpack["Card.ShipCardParams"]) -> "Card": @class_method_variant("_cls_ship_card") def ship_card( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Card.ShipCardParams"] + self, **params: Unpack["CardShipCardParams"] ) -> "Card": """ Updates the shipping status of the specified Issuing Card object to shipped. @@ -4037,7 +1790,7 @@ def ship_card( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_ship_card_async( - cls, card: str, **params: Unpack["Card.ShipCardParams"] + cls, card: str, **params: Unpack["CardShipCardParams"] ) -> "Card": """ Updates the shipping status of the specified Issuing Card object to shipped. @@ -4056,7 +1809,7 @@ async def _cls_ship_card_async( @overload @staticmethod async def ship_card_async( - card: str, **params: Unpack["Card.ShipCardParams"] + card: str, **params: Unpack["CardShipCardParams"] ) -> "Card": """ Updates the shipping status of the specified Issuing Card object to shipped. @@ -4065,7 +1818,7 @@ async def ship_card_async( @overload async def ship_card_async( - self, **params: Unpack["Card.ShipCardParams"] + self, **params: Unpack["CardShipCardParams"] ) -> "Card": """ Updates the shipping status of the specified Issuing Card object to shipped. @@ -4074,7 +1827,7 @@ async def ship_card_async( @class_method_variant("_cls_ship_card_async") async def ship_card_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Card.ShipCardParams"] + self, **params: Unpack["CardShipCardParams"] ) -> "Card": """ Updates the shipping status of the specified Issuing Card object to shipped. @@ -4092,7 +1845,7 @@ async def ship_card_async( # pyright: ignore[reportGeneralTypeIssues] @classmethod def _cls_submit_card( - cls, card: str, **params: Unpack["Card.SubmitCardParams"] + cls, card: str, **params: Unpack["CardSubmitCardParams"] ) -> "Card": """ Updates the shipping status of the specified Issuing Card object to submitted. This method requires Stripe Version ‘2024-09-30.acacia' or later. @@ -4111,7 +1864,7 @@ def _cls_submit_card( @overload @staticmethod def submit_card( - card: str, **params: Unpack["Card.SubmitCardParams"] + card: str, **params: Unpack["CardSubmitCardParams"] ) -> "Card": """ Updates the shipping status of the specified Issuing Card object to submitted. This method requires Stripe Version ‘2024-09-30.acacia' or later. @@ -4120,7 +1873,7 @@ def submit_card( @overload def submit_card( - self, **params: Unpack["Card.SubmitCardParams"] + self, **params: Unpack["CardSubmitCardParams"] ) -> "Card": """ Updates the shipping status of the specified Issuing Card object to submitted. This method requires Stripe Version ‘2024-09-30.acacia' or later. @@ -4129,7 +1882,7 @@ def submit_card( @class_method_variant("_cls_submit_card") def submit_card( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Card.SubmitCardParams"] + self, **params: Unpack["CardSubmitCardParams"] ) -> "Card": """ Updates the shipping status of the specified Issuing Card object to submitted. This method requires Stripe Version ‘2024-09-30.acacia' or later. @@ -4147,7 +1900,7 @@ def submit_card( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_submit_card_async( - cls, card: str, **params: Unpack["Card.SubmitCardParams"] + cls, card: str, **params: Unpack["CardSubmitCardParams"] ) -> "Card": """ Updates the shipping status of the specified Issuing Card object to submitted. This method requires Stripe Version ‘2024-09-30.acacia' or later. @@ -4166,7 +1919,7 @@ async def _cls_submit_card_async( @overload @staticmethod async def submit_card_async( - card: str, **params: Unpack["Card.SubmitCardParams"] + card: str, **params: Unpack["CardSubmitCardParams"] ) -> "Card": """ Updates the shipping status of the specified Issuing Card object to submitted. This method requires Stripe Version ‘2024-09-30.acacia' or later. @@ -4175,7 +1928,7 @@ async def submit_card_async( @overload async def submit_card_async( - self, **params: Unpack["Card.SubmitCardParams"] + self, **params: Unpack["CardSubmitCardParams"] ) -> "Card": """ Updates the shipping status of the specified Issuing Card object to submitted. This method requires Stripe Version ‘2024-09-30.acacia' or later. @@ -4184,7 +1937,7 @@ async def submit_card_async( @class_method_variant("_cls_submit_card_async") async def submit_card_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Card.SubmitCardParams"] + self, **params: Unpack["CardSubmitCardParams"] ) -> "Card": """ Updates the shipping status of the specified Issuing Card object to submitted. This method requires Stripe Version ‘2024-09-30.acacia' or later. diff --git a/stripe/issuing/_card_service.py b/stripe/issuing/_card_service.py index 94c26aff2..c9a8257ea 100644 --- a/stripe/issuing/_card_service.py +++ b/stripe/issuing/_card_service.py @@ -5,2242 +5,20 @@ from stripe._stripe_service import StripeService from stripe._util import sanitize_id from stripe.issuing._card import Card -from typing import Dict, List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params.issuing._card_create_params import CardCreateParams + from stripe.params.issuing._card_list_params import CardListParams + from stripe.params.issuing._card_retrieve_params import CardRetrieveParams + from stripe.params.issuing._card_update_params import CardUpdateParams -class CardService(StripeService): - class CreateParams(TypedDict): - cardholder: NotRequired[str] - """ - The [Cardholder](https://stripe.com/docs/api#issuing_cardholder_object) object with which the card will be associated. - """ - currency: str - """ - The currency for the card. - """ - exp_month: NotRequired[int] - """ - The desired expiration month (1-12) for this card if [specifying a custom expiration date](https://docs.stripe.com/issuing/cards/virtual/issue-cards?testing-method=with-code#exp-dates). - """ - exp_year: NotRequired[int] - """ - The desired 4-digit expiration year for this card if [specifying a custom expiration date](https://docs.stripe.com/issuing/cards/virtual/issue-cards?testing-method=with-code#exp-dates). - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - financial_account: NotRequired[str] - """ - The new financial account ID the card will be associated with. This field allows a card to be reassigned to a different financial account. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - personalization_design: NotRequired[str] - """ - The personalization design object belonging to this card. - """ - pin: NotRequired["CardService.CreateParamsPin"] - """ - The desired PIN for this card. - """ - replacement_for: NotRequired[str] - """ - The card this is meant to be a replacement for (if any). - """ - replacement_reason: NotRequired[ - Literal["damaged", "expired", "lost", "stolen"] - ] - """ - If `replacement_for` is specified, this should indicate why that card is being replaced. - """ - second_line: NotRequired["Literal['']|str"] - """ - The second line to print on the card. Max length: 24 characters. - """ - shipping: NotRequired["CardService.CreateParamsShipping"] - """ - The address where the card will be shipped. - """ - spending_controls: NotRequired[ - "CardService.CreateParamsSpendingControls" - ] - """ - Rules that control spending for this card. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details. - """ - status: NotRequired[Literal["active", "inactive"]] - """ - Whether authorizations can be approved on this card. May be blocked from activating cards depending on past-due Cardholder requirements. Defaults to `inactive`. - """ - type: Literal["physical", "virtual"] - """ - The type of card to issue. Possible values are `physical` or `virtual`. - """ - - class CreateParamsPin(TypedDict): - encrypted_number: NotRequired[str] - """ - The card's desired new PIN, encrypted under Stripe's public key. - """ - - class CreateParamsShipping(TypedDict): - address: "CardService.CreateParamsShippingAddress" - """ - The address that the card is shipped to. - """ - address_validation: NotRequired[ - "CardService.CreateParamsShippingAddressValidation" - ] - """ - Address validation settings. - """ - customs: NotRequired["CardService.CreateParamsShippingCustoms"] - """ - Customs information for the shipment. - """ - name: str - """ - The name printed on the shipping label when shipping the card. - """ - phone_number: NotRequired[str] - """ - Phone number of the recipient of the shipment. - """ - require_signature: NotRequired[bool] - """ - Whether a signature is required for card delivery. - """ - service: NotRequired[Literal["express", "priority", "standard"]] - """ - Shipment service. - """ - type: NotRequired[Literal["bulk", "individual"]] - """ - Packaging options. - """ - - class CreateParamsShippingAddress(TypedDict): - city: 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: 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: str - """ - ZIP or postal code. - """ - state: NotRequired[str] - """ - State, county, province, or region. - """ - - class CreateParamsShippingAddressValidation(TypedDict): - mode: Literal[ - "disabled", "normalization_only", "validation_and_normalization" - ] - """ - The address validation capabilities to use. - """ - - class CreateParamsShippingCustoms(TypedDict): - eori_number: NotRequired[str] - """ - The Economic Operators Registration and Identification (EORI) number to use for Customs. Required for bulk shipments to Europe. - """ - - class CreateParamsSpendingControls(TypedDict): - allowed_categories: NotRequired[ - List[ - Literal[ - "ac_refrigeration_repair", - "accounting_bookkeeping_services", - "advertising_services", - "agricultural_cooperative", - "airlines_air_carriers", - "airports_flying_fields", - "ambulance_services", - "amusement_parks_carnivals", - "antique_reproductions", - "antique_shops", - "aquariums", - "architectural_surveying_services", - "art_dealers_and_galleries", - "artists_supply_and_craft_shops", - "auto_and_home_supply_stores", - "auto_body_repair_shops", - "auto_paint_shops", - "auto_service_shops", - "automated_cash_disburse", - "automated_fuel_dispensers", - "automobile_associations", - "automotive_parts_and_accessories_stores", - "automotive_tire_stores", - "bail_and_bond_payments", - "bakeries", - "bands_orchestras", - "barber_and_beauty_shops", - "betting_casino_gambling", - "bicycle_shops", - "billiard_pool_establishments", - "boat_dealers", - "boat_rentals_and_leases", - "book_stores", - "books_periodicals_and_newspapers", - "bowling_alleys", - "bus_lines", - "business_secretarial_schools", - "buying_shopping_services", - "cable_satellite_and_other_pay_television_and_radio", - "camera_and_photographic_supply_stores", - "candy_nut_and_confectionery_stores", - "car_and_truck_dealers_new_used", - "car_and_truck_dealers_used_only", - "car_rental_agencies", - "car_washes", - "carpentry_services", - "carpet_upholstery_cleaning", - "caterers", - "charitable_and_social_service_organizations_fundraising", - "chemicals_and_allied_products", - "child_care_services", - "childrens_and_infants_wear_stores", - "chiropodists_podiatrists", - "chiropractors", - "cigar_stores_and_stands", - "civic_social_fraternal_associations", - "cleaning_and_maintenance", - "clothing_rental", - "colleges_universities", - "commercial_equipment", - "commercial_footwear", - "commercial_photography_art_and_graphics", - "commuter_transport_and_ferries", - "computer_network_services", - "computer_programming", - "computer_repair", - "computer_software_stores", - "computers_peripherals_and_software", - "concrete_work_services", - "construction_materials", - "consulting_public_relations", - "correspondence_schools", - "cosmetic_stores", - "counseling_services", - "country_clubs", - "courier_services", - "court_costs", - "credit_reporting_agencies", - "cruise_lines", - "dairy_products_stores", - "dance_hall_studios_schools", - "dating_escort_services", - "dentists_orthodontists", - "department_stores", - "detective_agencies", - "digital_goods_applications", - "digital_goods_games", - "digital_goods_large_volume", - "digital_goods_media", - "direct_marketing_catalog_merchant", - "direct_marketing_combination_catalog_and_retail_merchant", - "direct_marketing_inbound_telemarketing", - "direct_marketing_insurance_services", - "direct_marketing_other", - "direct_marketing_outbound_telemarketing", - "direct_marketing_subscription", - "direct_marketing_travel", - "discount_stores", - "doctors", - "door_to_door_sales", - "drapery_window_covering_and_upholstery_stores", - "drinking_places", - "drug_stores_and_pharmacies", - "drugs_drug_proprietaries_and_druggist_sundries", - "dry_cleaners", - "durable_goods", - "duty_free_stores", - "eating_places_restaurants", - "educational_services", - "electric_razor_stores", - "electric_vehicle_charging", - "electrical_parts_and_equipment", - "electrical_services", - "electronics_repair_shops", - "electronics_stores", - "elementary_secondary_schools", - "emergency_services_gcas_visa_use_only", - "employment_temp_agencies", - "equipment_rental", - "exterminating_services", - "family_clothing_stores", - "fast_food_restaurants", - "financial_institutions", - "fines_government_administrative_entities", - "fireplace_fireplace_screens_and_accessories_stores", - "floor_covering_stores", - "florists", - "florists_supplies_nursery_stock_and_flowers", - "freezer_and_locker_meat_provisioners", - "fuel_dealers_non_automotive", - "funeral_services_crematories", - "furniture_home_furnishings_and_equipment_stores_except_appliances", - "furniture_repair_refinishing", - "furriers_and_fur_shops", - "general_services", - "gift_card_novelty_and_souvenir_shops", - "glass_paint_and_wallpaper_stores", - "glassware_crystal_stores", - "golf_courses_public", - "government_licensed_horse_dog_racing_us_region_only", - "government_licensed_online_casions_online_gambling_us_region_only", - "government_owned_lotteries_non_us_region", - "government_owned_lotteries_us_region_only", - "government_services", - "grocery_stores_supermarkets", - "hardware_equipment_and_supplies", - "hardware_stores", - "health_and_beauty_spas", - "hearing_aids_sales_and_supplies", - "heating_plumbing_a_c", - "hobby_toy_and_game_shops", - "home_supply_warehouse_stores", - "hospitals", - "hotels_motels_and_resorts", - "household_appliance_stores", - "industrial_supplies", - "information_retrieval_services", - "insurance_default", - "insurance_underwriting_premiums", - "intra_company_purchases", - "jewelry_stores_watches_clocks_and_silverware_stores", - "landscaping_services", - "laundries", - "laundry_cleaning_services", - "legal_services_attorneys", - "luggage_and_leather_goods_stores", - "lumber_building_materials_stores", - "manual_cash_disburse", - "marinas_service_and_supplies", - "marketplaces", - "masonry_stonework_and_plaster", - "massage_parlors", - "medical_and_dental_labs", - "medical_dental_ophthalmic_and_hospital_equipment_and_supplies", - "medical_services", - "membership_organizations", - "mens_and_boys_clothing_and_accessories_stores", - "mens_womens_clothing_stores", - "metal_service_centers", - "miscellaneous", - "miscellaneous_apparel_and_accessory_shops", - "miscellaneous_auto_dealers", - "miscellaneous_business_services", - "miscellaneous_food_stores", - "miscellaneous_general_merchandise", - "miscellaneous_general_services", - "miscellaneous_home_furnishing_specialty_stores", - "miscellaneous_publishing_and_printing", - "miscellaneous_recreation_services", - "miscellaneous_repair_shops", - "miscellaneous_specialty_retail", - "mobile_home_dealers", - "motion_picture_theaters", - "motor_freight_carriers_and_trucking", - "motor_homes_dealers", - "motor_vehicle_supplies_and_new_parts", - "motorcycle_shops_and_dealers", - "motorcycle_shops_dealers", - "music_stores_musical_instruments_pianos_and_sheet_music", - "news_dealers_and_newsstands", - "non_fi_money_orders", - "non_fi_stored_value_card_purchase_load", - "nondurable_goods", - "nurseries_lawn_and_garden_supply_stores", - "nursing_personal_care", - "office_and_commercial_furniture", - "opticians_eyeglasses", - "optometrists_ophthalmologist", - "orthopedic_goods_prosthetic_devices", - "osteopaths", - "package_stores_beer_wine_and_liquor", - "paints_varnishes_and_supplies", - "parking_lots_garages", - "passenger_railways", - "pawn_shops", - "pet_shops_pet_food_and_supplies", - "petroleum_and_petroleum_products", - "photo_developing", - "photographic_photocopy_microfilm_equipment_and_supplies", - "photographic_studios", - "picture_video_production", - "piece_goods_notions_and_other_dry_goods", - "plumbing_heating_equipment_and_supplies", - "political_organizations", - "postal_services_government_only", - "precious_stones_and_metals_watches_and_jewelry", - "professional_services", - "public_warehousing_and_storage", - "quick_copy_repro_and_blueprint", - "railroads", - "real_estate_agents_and_managers_rentals", - "record_stores", - "recreational_vehicle_rentals", - "religious_goods_stores", - "religious_organizations", - "roofing_siding_sheet_metal", - "secretarial_support_services", - "security_brokers_dealers", - "service_stations", - "sewing_needlework_fabric_and_piece_goods_stores", - "shoe_repair_hat_cleaning", - "shoe_stores", - "small_appliance_repair", - "snowmobile_dealers", - "special_trade_services", - "specialty_cleaning", - "sporting_goods_stores", - "sporting_recreation_camps", - "sports_and_riding_apparel_stores", - "sports_clubs_fields", - "stamp_and_coin_stores", - "stationary_office_supplies_printing_and_writing_paper", - "stationery_stores_office_and_school_supply_stores", - "swimming_pools_sales", - "t_ui_travel_germany", - "tailors_alterations", - "tax_payments_government_agencies", - "tax_preparation_services", - "taxicabs_limousines", - "telecommunication_equipment_and_telephone_sales", - "telecommunication_services", - "telegraph_services", - "tent_and_awning_shops", - "testing_laboratories", - "theatrical_ticket_agencies", - "timeshares", - "tire_retreading_and_repair", - "tolls_bridge_fees", - "tourist_attractions_and_exhibits", - "towing_services", - "trailer_parks_campgrounds", - "transportation_services", - "travel_agencies_tour_operators", - "truck_stop_iteration", - "truck_utility_trailer_rentals", - "typesetting_plate_making_and_related_services", - "typewriter_stores", - "u_s_federal_government_agencies_or_departments", - "uniforms_commercial_clothing", - "used_merchandise_and_secondhand_stores", - "utilities", - "variety_stores", - "veterinary_services", - "video_amusement_game_supplies", - "video_game_arcades", - "video_tape_rental_stores", - "vocational_trade_schools", - "watch_jewelry_repair", - "welding_repair", - "wholesale_clubs", - "wig_and_toupee_stores", - "wires_money_orders", - "womens_accessory_and_specialty_shops", - "womens_ready_to_wear_stores", - "wrecking_and_salvage_yards", - ] - ] - ] - """ - Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to allow. All other categories will be blocked. Cannot be set with `blocked_categories`. - """ - allowed_merchant_countries: NotRequired[List[str]] - """ - Array of strings containing representing countries from which authorizations will be allowed. Authorizations from merchants in all other countries will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `blocked_merchant_countries`. Provide an empty value to unset this control. - """ - blocked_categories: NotRequired[ - List[ - Literal[ - "ac_refrigeration_repair", - "accounting_bookkeeping_services", - "advertising_services", - "agricultural_cooperative", - "airlines_air_carriers", - "airports_flying_fields", - "ambulance_services", - "amusement_parks_carnivals", - "antique_reproductions", - "antique_shops", - "aquariums", - "architectural_surveying_services", - "art_dealers_and_galleries", - "artists_supply_and_craft_shops", - "auto_and_home_supply_stores", - "auto_body_repair_shops", - "auto_paint_shops", - "auto_service_shops", - "automated_cash_disburse", - "automated_fuel_dispensers", - "automobile_associations", - "automotive_parts_and_accessories_stores", - "automotive_tire_stores", - "bail_and_bond_payments", - "bakeries", - "bands_orchestras", - "barber_and_beauty_shops", - "betting_casino_gambling", - "bicycle_shops", - "billiard_pool_establishments", - "boat_dealers", - "boat_rentals_and_leases", - "book_stores", - "books_periodicals_and_newspapers", - "bowling_alleys", - "bus_lines", - "business_secretarial_schools", - "buying_shopping_services", - "cable_satellite_and_other_pay_television_and_radio", - "camera_and_photographic_supply_stores", - "candy_nut_and_confectionery_stores", - "car_and_truck_dealers_new_used", - "car_and_truck_dealers_used_only", - "car_rental_agencies", - "car_washes", - "carpentry_services", - "carpet_upholstery_cleaning", - "caterers", - "charitable_and_social_service_organizations_fundraising", - "chemicals_and_allied_products", - "child_care_services", - "childrens_and_infants_wear_stores", - "chiropodists_podiatrists", - "chiropractors", - "cigar_stores_and_stands", - "civic_social_fraternal_associations", - "cleaning_and_maintenance", - "clothing_rental", - "colleges_universities", - "commercial_equipment", - "commercial_footwear", - "commercial_photography_art_and_graphics", - "commuter_transport_and_ferries", - "computer_network_services", - "computer_programming", - "computer_repair", - "computer_software_stores", - "computers_peripherals_and_software", - "concrete_work_services", - "construction_materials", - "consulting_public_relations", - "correspondence_schools", - "cosmetic_stores", - "counseling_services", - "country_clubs", - "courier_services", - "court_costs", - "credit_reporting_agencies", - "cruise_lines", - "dairy_products_stores", - "dance_hall_studios_schools", - "dating_escort_services", - "dentists_orthodontists", - "department_stores", - "detective_agencies", - "digital_goods_applications", - "digital_goods_games", - "digital_goods_large_volume", - "digital_goods_media", - "direct_marketing_catalog_merchant", - "direct_marketing_combination_catalog_and_retail_merchant", - "direct_marketing_inbound_telemarketing", - "direct_marketing_insurance_services", - "direct_marketing_other", - "direct_marketing_outbound_telemarketing", - "direct_marketing_subscription", - "direct_marketing_travel", - "discount_stores", - "doctors", - "door_to_door_sales", - "drapery_window_covering_and_upholstery_stores", - "drinking_places", - "drug_stores_and_pharmacies", - "drugs_drug_proprietaries_and_druggist_sundries", - "dry_cleaners", - "durable_goods", - "duty_free_stores", - "eating_places_restaurants", - "educational_services", - "electric_razor_stores", - "electric_vehicle_charging", - "electrical_parts_and_equipment", - "electrical_services", - "electronics_repair_shops", - "electronics_stores", - "elementary_secondary_schools", - "emergency_services_gcas_visa_use_only", - "employment_temp_agencies", - "equipment_rental", - "exterminating_services", - "family_clothing_stores", - "fast_food_restaurants", - "financial_institutions", - "fines_government_administrative_entities", - "fireplace_fireplace_screens_and_accessories_stores", - "floor_covering_stores", - "florists", - "florists_supplies_nursery_stock_and_flowers", - "freezer_and_locker_meat_provisioners", - "fuel_dealers_non_automotive", - "funeral_services_crematories", - "furniture_home_furnishings_and_equipment_stores_except_appliances", - "furniture_repair_refinishing", - "furriers_and_fur_shops", - "general_services", - "gift_card_novelty_and_souvenir_shops", - "glass_paint_and_wallpaper_stores", - "glassware_crystal_stores", - "golf_courses_public", - "government_licensed_horse_dog_racing_us_region_only", - "government_licensed_online_casions_online_gambling_us_region_only", - "government_owned_lotteries_non_us_region", - "government_owned_lotteries_us_region_only", - "government_services", - "grocery_stores_supermarkets", - "hardware_equipment_and_supplies", - "hardware_stores", - "health_and_beauty_spas", - "hearing_aids_sales_and_supplies", - "heating_plumbing_a_c", - "hobby_toy_and_game_shops", - "home_supply_warehouse_stores", - "hospitals", - "hotels_motels_and_resorts", - "household_appliance_stores", - "industrial_supplies", - "information_retrieval_services", - "insurance_default", - "insurance_underwriting_premiums", - "intra_company_purchases", - "jewelry_stores_watches_clocks_and_silverware_stores", - "landscaping_services", - "laundries", - "laundry_cleaning_services", - "legal_services_attorneys", - "luggage_and_leather_goods_stores", - "lumber_building_materials_stores", - "manual_cash_disburse", - "marinas_service_and_supplies", - "marketplaces", - "masonry_stonework_and_plaster", - "massage_parlors", - "medical_and_dental_labs", - "medical_dental_ophthalmic_and_hospital_equipment_and_supplies", - "medical_services", - "membership_organizations", - "mens_and_boys_clothing_and_accessories_stores", - "mens_womens_clothing_stores", - "metal_service_centers", - "miscellaneous", - "miscellaneous_apparel_and_accessory_shops", - "miscellaneous_auto_dealers", - "miscellaneous_business_services", - "miscellaneous_food_stores", - "miscellaneous_general_merchandise", - "miscellaneous_general_services", - "miscellaneous_home_furnishing_specialty_stores", - "miscellaneous_publishing_and_printing", - "miscellaneous_recreation_services", - "miscellaneous_repair_shops", - "miscellaneous_specialty_retail", - "mobile_home_dealers", - "motion_picture_theaters", - "motor_freight_carriers_and_trucking", - "motor_homes_dealers", - "motor_vehicle_supplies_and_new_parts", - "motorcycle_shops_and_dealers", - "motorcycle_shops_dealers", - "music_stores_musical_instruments_pianos_and_sheet_music", - "news_dealers_and_newsstands", - "non_fi_money_orders", - "non_fi_stored_value_card_purchase_load", - "nondurable_goods", - "nurseries_lawn_and_garden_supply_stores", - "nursing_personal_care", - "office_and_commercial_furniture", - "opticians_eyeglasses", - "optometrists_ophthalmologist", - "orthopedic_goods_prosthetic_devices", - "osteopaths", - "package_stores_beer_wine_and_liquor", - "paints_varnishes_and_supplies", - "parking_lots_garages", - "passenger_railways", - "pawn_shops", - "pet_shops_pet_food_and_supplies", - "petroleum_and_petroleum_products", - "photo_developing", - "photographic_photocopy_microfilm_equipment_and_supplies", - "photographic_studios", - "picture_video_production", - "piece_goods_notions_and_other_dry_goods", - "plumbing_heating_equipment_and_supplies", - "political_organizations", - "postal_services_government_only", - "precious_stones_and_metals_watches_and_jewelry", - "professional_services", - "public_warehousing_and_storage", - "quick_copy_repro_and_blueprint", - "railroads", - "real_estate_agents_and_managers_rentals", - "record_stores", - "recreational_vehicle_rentals", - "religious_goods_stores", - "religious_organizations", - "roofing_siding_sheet_metal", - "secretarial_support_services", - "security_brokers_dealers", - "service_stations", - "sewing_needlework_fabric_and_piece_goods_stores", - "shoe_repair_hat_cleaning", - "shoe_stores", - "small_appliance_repair", - "snowmobile_dealers", - "special_trade_services", - "specialty_cleaning", - "sporting_goods_stores", - "sporting_recreation_camps", - "sports_and_riding_apparel_stores", - "sports_clubs_fields", - "stamp_and_coin_stores", - "stationary_office_supplies_printing_and_writing_paper", - "stationery_stores_office_and_school_supply_stores", - "swimming_pools_sales", - "t_ui_travel_germany", - "tailors_alterations", - "tax_payments_government_agencies", - "tax_preparation_services", - "taxicabs_limousines", - "telecommunication_equipment_and_telephone_sales", - "telecommunication_services", - "telegraph_services", - "tent_and_awning_shops", - "testing_laboratories", - "theatrical_ticket_agencies", - "timeshares", - "tire_retreading_and_repair", - "tolls_bridge_fees", - "tourist_attractions_and_exhibits", - "towing_services", - "trailer_parks_campgrounds", - "transportation_services", - "travel_agencies_tour_operators", - "truck_stop_iteration", - "truck_utility_trailer_rentals", - "typesetting_plate_making_and_related_services", - "typewriter_stores", - "u_s_federal_government_agencies_or_departments", - "uniforms_commercial_clothing", - "used_merchandise_and_secondhand_stores", - "utilities", - "variety_stores", - "veterinary_services", - "video_amusement_game_supplies", - "video_game_arcades", - "video_tape_rental_stores", - "vocational_trade_schools", - "watch_jewelry_repair", - "welding_repair", - "wholesale_clubs", - "wig_and_toupee_stores", - "wires_money_orders", - "womens_accessory_and_specialty_shops", - "womens_ready_to_wear_stores", - "wrecking_and_salvage_yards", - ] - ] - ] - """ - Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to decline. All other categories will be allowed. Cannot be set with `allowed_categories`. - """ - blocked_merchant_countries: NotRequired[List[str]] - """ - Array of strings containing representing countries from which authorizations will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `allowed_merchant_countries`. Provide an empty value to unset this control. - """ - spending_limits: NotRequired[ - List["CardService.CreateParamsSpendingControlsSpendingLimit"] - ] - """ - Limit spending with amount-based rules that apply across any cards this card replaced (i.e., its `replacement_for` card and _that_ card's `replacement_for` card, up the chain). - """ - - class CreateParamsSpendingControlsSpendingLimit(TypedDict): - amount: int - """ - Maximum amount allowed to spend per interval. - """ - categories: NotRequired[ - List[ - Literal[ - "ac_refrigeration_repair", - "accounting_bookkeeping_services", - "advertising_services", - "agricultural_cooperative", - "airlines_air_carriers", - "airports_flying_fields", - "ambulance_services", - "amusement_parks_carnivals", - "antique_reproductions", - "antique_shops", - "aquariums", - "architectural_surveying_services", - "art_dealers_and_galleries", - "artists_supply_and_craft_shops", - "auto_and_home_supply_stores", - "auto_body_repair_shops", - "auto_paint_shops", - "auto_service_shops", - "automated_cash_disburse", - "automated_fuel_dispensers", - "automobile_associations", - "automotive_parts_and_accessories_stores", - "automotive_tire_stores", - "bail_and_bond_payments", - "bakeries", - "bands_orchestras", - "barber_and_beauty_shops", - "betting_casino_gambling", - "bicycle_shops", - "billiard_pool_establishments", - "boat_dealers", - "boat_rentals_and_leases", - "book_stores", - "books_periodicals_and_newspapers", - "bowling_alleys", - "bus_lines", - "business_secretarial_schools", - "buying_shopping_services", - "cable_satellite_and_other_pay_television_and_radio", - "camera_and_photographic_supply_stores", - "candy_nut_and_confectionery_stores", - "car_and_truck_dealers_new_used", - "car_and_truck_dealers_used_only", - "car_rental_agencies", - "car_washes", - "carpentry_services", - "carpet_upholstery_cleaning", - "caterers", - "charitable_and_social_service_organizations_fundraising", - "chemicals_and_allied_products", - "child_care_services", - "childrens_and_infants_wear_stores", - "chiropodists_podiatrists", - "chiropractors", - "cigar_stores_and_stands", - "civic_social_fraternal_associations", - "cleaning_and_maintenance", - "clothing_rental", - "colleges_universities", - "commercial_equipment", - "commercial_footwear", - "commercial_photography_art_and_graphics", - "commuter_transport_and_ferries", - "computer_network_services", - "computer_programming", - "computer_repair", - "computer_software_stores", - "computers_peripherals_and_software", - "concrete_work_services", - "construction_materials", - "consulting_public_relations", - "correspondence_schools", - "cosmetic_stores", - "counseling_services", - "country_clubs", - "courier_services", - "court_costs", - "credit_reporting_agencies", - "cruise_lines", - "dairy_products_stores", - "dance_hall_studios_schools", - "dating_escort_services", - "dentists_orthodontists", - "department_stores", - "detective_agencies", - "digital_goods_applications", - "digital_goods_games", - "digital_goods_large_volume", - "digital_goods_media", - "direct_marketing_catalog_merchant", - "direct_marketing_combination_catalog_and_retail_merchant", - "direct_marketing_inbound_telemarketing", - "direct_marketing_insurance_services", - "direct_marketing_other", - "direct_marketing_outbound_telemarketing", - "direct_marketing_subscription", - "direct_marketing_travel", - "discount_stores", - "doctors", - "door_to_door_sales", - "drapery_window_covering_and_upholstery_stores", - "drinking_places", - "drug_stores_and_pharmacies", - "drugs_drug_proprietaries_and_druggist_sundries", - "dry_cleaners", - "durable_goods", - "duty_free_stores", - "eating_places_restaurants", - "educational_services", - "electric_razor_stores", - "electric_vehicle_charging", - "electrical_parts_and_equipment", - "electrical_services", - "electronics_repair_shops", - "electronics_stores", - "elementary_secondary_schools", - "emergency_services_gcas_visa_use_only", - "employment_temp_agencies", - "equipment_rental", - "exterminating_services", - "family_clothing_stores", - "fast_food_restaurants", - "financial_institutions", - "fines_government_administrative_entities", - "fireplace_fireplace_screens_and_accessories_stores", - "floor_covering_stores", - "florists", - "florists_supplies_nursery_stock_and_flowers", - "freezer_and_locker_meat_provisioners", - "fuel_dealers_non_automotive", - "funeral_services_crematories", - "furniture_home_furnishings_and_equipment_stores_except_appliances", - "furniture_repair_refinishing", - "furriers_and_fur_shops", - "general_services", - "gift_card_novelty_and_souvenir_shops", - "glass_paint_and_wallpaper_stores", - "glassware_crystal_stores", - "golf_courses_public", - "government_licensed_horse_dog_racing_us_region_only", - "government_licensed_online_casions_online_gambling_us_region_only", - "government_owned_lotteries_non_us_region", - "government_owned_lotteries_us_region_only", - "government_services", - "grocery_stores_supermarkets", - "hardware_equipment_and_supplies", - "hardware_stores", - "health_and_beauty_spas", - "hearing_aids_sales_and_supplies", - "heating_plumbing_a_c", - "hobby_toy_and_game_shops", - "home_supply_warehouse_stores", - "hospitals", - "hotels_motels_and_resorts", - "household_appliance_stores", - "industrial_supplies", - "information_retrieval_services", - "insurance_default", - "insurance_underwriting_premiums", - "intra_company_purchases", - "jewelry_stores_watches_clocks_and_silverware_stores", - "landscaping_services", - "laundries", - "laundry_cleaning_services", - "legal_services_attorneys", - "luggage_and_leather_goods_stores", - "lumber_building_materials_stores", - "manual_cash_disburse", - "marinas_service_and_supplies", - "marketplaces", - "masonry_stonework_and_plaster", - "massage_parlors", - "medical_and_dental_labs", - "medical_dental_ophthalmic_and_hospital_equipment_and_supplies", - "medical_services", - "membership_organizations", - "mens_and_boys_clothing_and_accessories_stores", - "mens_womens_clothing_stores", - "metal_service_centers", - "miscellaneous", - "miscellaneous_apparel_and_accessory_shops", - "miscellaneous_auto_dealers", - "miscellaneous_business_services", - "miscellaneous_food_stores", - "miscellaneous_general_merchandise", - "miscellaneous_general_services", - "miscellaneous_home_furnishing_specialty_stores", - "miscellaneous_publishing_and_printing", - "miscellaneous_recreation_services", - "miscellaneous_repair_shops", - "miscellaneous_specialty_retail", - "mobile_home_dealers", - "motion_picture_theaters", - "motor_freight_carriers_and_trucking", - "motor_homes_dealers", - "motor_vehicle_supplies_and_new_parts", - "motorcycle_shops_and_dealers", - "motorcycle_shops_dealers", - "music_stores_musical_instruments_pianos_and_sheet_music", - "news_dealers_and_newsstands", - "non_fi_money_orders", - "non_fi_stored_value_card_purchase_load", - "nondurable_goods", - "nurseries_lawn_and_garden_supply_stores", - "nursing_personal_care", - "office_and_commercial_furniture", - "opticians_eyeglasses", - "optometrists_ophthalmologist", - "orthopedic_goods_prosthetic_devices", - "osteopaths", - "package_stores_beer_wine_and_liquor", - "paints_varnishes_and_supplies", - "parking_lots_garages", - "passenger_railways", - "pawn_shops", - "pet_shops_pet_food_and_supplies", - "petroleum_and_petroleum_products", - "photo_developing", - "photographic_photocopy_microfilm_equipment_and_supplies", - "photographic_studios", - "picture_video_production", - "piece_goods_notions_and_other_dry_goods", - "plumbing_heating_equipment_and_supplies", - "political_organizations", - "postal_services_government_only", - "precious_stones_and_metals_watches_and_jewelry", - "professional_services", - "public_warehousing_and_storage", - "quick_copy_repro_and_blueprint", - "railroads", - "real_estate_agents_and_managers_rentals", - "record_stores", - "recreational_vehicle_rentals", - "religious_goods_stores", - "religious_organizations", - "roofing_siding_sheet_metal", - "secretarial_support_services", - "security_brokers_dealers", - "service_stations", - "sewing_needlework_fabric_and_piece_goods_stores", - "shoe_repair_hat_cleaning", - "shoe_stores", - "small_appliance_repair", - "snowmobile_dealers", - "special_trade_services", - "specialty_cleaning", - "sporting_goods_stores", - "sporting_recreation_camps", - "sports_and_riding_apparel_stores", - "sports_clubs_fields", - "stamp_and_coin_stores", - "stationary_office_supplies_printing_and_writing_paper", - "stationery_stores_office_and_school_supply_stores", - "swimming_pools_sales", - "t_ui_travel_germany", - "tailors_alterations", - "tax_payments_government_agencies", - "tax_preparation_services", - "taxicabs_limousines", - "telecommunication_equipment_and_telephone_sales", - "telecommunication_services", - "telegraph_services", - "tent_and_awning_shops", - "testing_laboratories", - "theatrical_ticket_agencies", - "timeshares", - "tire_retreading_and_repair", - "tolls_bridge_fees", - "tourist_attractions_and_exhibits", - "towing_services", - "trailer_parks_campgrounds", - "transportation_services", - "travel_agencies_tour_operators", - "truck_stop_iteration", - "truck_utility_trailer_rentals", - "typesetting_plate_making_and_related_services", - "typewriter_stores", - "u_s_federal_government_agencies_or_departments", - "uniforms_commercial_clothing", - "used_merchandise_and_secondhand_stores", - "utilities", - "variety_stores", - "veterinary_services", - "video_amusement_game_supplies", - "video_game_arcades", - "video_tape_rental_stores", - "vocational_trade_schools", - "watch_jewelry_repair", - "welding_repair", - "wholesale_clubs", - "wig_and_toupee_stores", - "wires_money_orders", - "womens_accessory_and_specialty_shops", - "womens_ready_to_wear_stores", - "wrecking_and_salvage_yards", - ] - ] - ] - """ - Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories. - """ - interval: Literal[ - "all_time", - "daily", - "monthly", - "per_authorization", - "weekly", - "yearly", - ] - """ - Interval (or event) to which the amount applies. - """ - - class ListParams(TypedDict): - cardholder: NotRequired[str] - """ - Only return cards belonging to the Cardholder with the provided ID. - """ - created: NotRequired["CardService.ListParamsCreated|int"] - """ - Only return cards that were issued during the given date interval. - """ - 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. - """ - exp_month: NotRequired[int] - """ - Only return cards that have the given expiration month. - """ - exp_year: NotRequired[int] - """ - Only return cards that have the given expiration year. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - last4: NotRequired[str] - """ - Only return cards that have the given last four digits. - """ - 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. - """ - personalization_design: NotRequired[str] - 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. - """ - status: NotRequired[Literal["active", "canceled", "inactive"]] - """ - Only return cards that have the given status. One of `active`, `inactive`, or `canceled`. - """ - type: NotRequired[Literal["physical", "virtual"]] - """ - Only return cards that have the given type. One of `virtual` or `physical`. - """ - - class ListParamsCreated(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) - """ - - class RetrieveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class UpdateParams(TypedDict): - cancellation_reason: NotRequired[Literal["lost", "stolen"]] - """ - Reason why the `status` of this card is `canceled`. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - personalization_design: NotRequired[str] - pin: NotRequired["CardService.UpdateParamsPin"] - """ - The desired new PIN for this card. - """ - shipping: NotRequired["CardService.UpdateParamsShipping"] - """ - Updated shipping information for the card. - """ - spending_controls: NotRequired[ - "CardService.UpdateParamsSpendingControls" - ] - """ - Rules that control spending for this card. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details. - """ - status: NotRequired[Literal["active", "canceled", "inactive"]] - """ - Dictates whether authorizations can be approved on this card. May be blocked from activating cards depending on past-due Cardholder requirements. Defaults to `inactive`. If this card is being canceled because it was lost or stolen, this information should be provided as `cancellation_reason`. - """ - - class UpdateParamsPin(TypedDict): - encrypted_number: NotRequired[str] - """ - The card's desired new PIN, encrypted under Stripe's public key. - """ - - class UpdateParamsShipping(TypedDict): - address: "CardService.UpdateParamsShippingAddress" - """ - The address that the card is shipped to. - """ - address_validation: NotRequired[ - "CardService.UpdateParamsShippingAddressValidation" - ] - """ - Address validation settings. - """ - customs: NotRequired["CardService.UpdateParamsShippingCustoms"] - """ - Customs information for the shipment. - """ - name: str - """ - The name printed on the shipping label when shipping the card. - """ - phone_number: NotRequired[str] - """ - Phone number of the recipient of the shipment. - """ - require_signature: NotRequired[bool] - """ - Whether a signature is required for card delivery. - """ - service: NotRequired[Literal["express", "priority", "standard"]] - """ - Shipment service. - """ - type: NotRequired[Literal["bulk", "individual"]] - """ - Packaging options. - """ - - class UpdateParamsShippingAddress(TypedDict): - city: 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: 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: str - """ - ZIP or postal code. - """ - state: NotRequired[str] - """ - State, county, province, or region. - """ - - class UpdateParamsShippingAddressValidation(TypedDict): - mode: Literal[ - "disabled", "normalization_only", "validation_and_normalization" - ] - """ - The address validation capabilities to use. - """ - - class UpdateParamsShippingCustoms(TypedDict): - eori_number: NotRequired[str] - """ - The Economic Operators Registration and Identification (EORI) number to use for Customs. Required for bulk shipments to Europe. - """ - - class UpdateParamsSpendingControls(TypedDict): - allowed_categories: NotRequired[ - List[ - Literal[ - "ac_refrigeration_repair", - "accounting_bookkeeping_services", - "advertising_services", - "agricultural_cooperative", - "airlines_air_carriers", - "airports_flying_fields", - "ambulance_services", - "amusement_parks_carnivals", - "antique_reproductions", - "antique_shops", - "aquariums", - "architectural_surveying_services", - "art_dealers_and_galleries", - "artists_supply_and_craft_shops", - "auto_and_home_supply_stores", - "auto_body_repair_shops", - "auto_paint_shops", - "auto_service_shops", - "automated_cash_disburse", - "automated_fuel_dispensers", - "automobile_associations", - "automotive_parts_and_accessories_stores", - "automotive_tire_stores", - "bail_and_bond_payments", - "bakeries", - "bands_orchestras", - "barber_and_beauty_shops", - "betting_casino_gambling", - "bicycle_shops", - "billiard_pool_establishments", - "boat_dealers", - "boat_rentals_and_leases", - "book_stores", - "books_periodicals_and_newspapers", - "bowling_alleys", - "bus_lines", - "business_secretarial_schools", - "buying_shopping_services", - "cable_satellite_and_other_pay_television_and_radio", - "camera_and_photographic_supply_stores", - "candy_nut_and_confectionery_stores", - "car_and_truck_dealers_new_used", - "car_and_truck_dealers_used_only", - "car_rental_agencies", - "car_washes", - "carpentry_services", - "carpet_upholstery_cleaning", - "caterers", - "charitable_and_social_service_organizations_fundraising", - "chemicals_and_allied_products", - "child_care_services", - "childrens_and_infants_wear_stores", - "chiropodists_podiatrists", - "chiropractors", - "cigar_stores_and_stands", - "civic_social_fraternal_associations", - "cleaning_and_maintenance", - "clothing_rental", - "colleges_universities", - "commercial_equipment", - "commercial_footwear", - "commercial_photography_art_and_graphics", - "commuter_transport_and_ferries", - "computer_network_services", - "computer_programming", - "computer_repair", - "computer_software_stores", - "computers_peripherals_and_software", - "concrete_work_services", - "construction_materials", - "consulting_public_relations", - "correspondence_schools", - "cosmetic_stores", - "counseling_services", - "country_clubs", - "courier_services", - "court_costs", - "credit_reporting_agencies", - "cruise_lines", - "dairy_products_stores", - "dance_hall_studios_schools", - "dating_escort_services", - "dentists_orthodontists", - "department_stores", - "detective_agencies", - "digital_goods_applications", - "digital_goods_games", - "digital_goods_large_volume", - "digital_goods_media", - "direct_marketing_catalog_merchant", - "direct_marketing_combination_catalog_and_retail_merchant", - "direct_marketing_inbound_telemarketing", - "direct_marketing_insurance_services", - "direct_marketing_other", - "direct_marketing_outbound_telemarketing", - "direct_marketing_subscription", - "direct_marketing_travel", - "discount_stores", - "doctors", - "door_to_door_sales", - "drapery_window_covering_and_upholstery_stores", - "drinking_places", - "drug_stores_and_pharmacies", - "drugs_drug_proprietaries_and_druggist_sundries", - "dry_cleaners", - "durable_goods", - "duty_free_stores", - "eating_places_restaurants", - "educational_services", - "electric_razor_stores", - "electric_vehicle_charging", - "electrical_parts_and_equipment", - "electrical_services", - "electronics_repair_shops", - "electronics_stores", - "elementary_secondary_schools", - "emergency_services_gcas_visa_use_only", - "employment_temp_agencies", - "equipment_rental", - "exterminating_services", - "family_clothing_stores", - "fast_food_restaurants", - "financial_institutions", - "fines_government_administrative_entities", - "fireplace_fireplace_screens_and_accessories_stores", - "floor_covering_stores", - "florists", - "florists_supplies_nursery_stock_and_flowers", - "freezer_and_locker_meat_provisioners", - "fuel_dealers_non_automotive", - "funeral_services_crematories", - "furniture_home_furnishings_and_equipment_stores_except_appliances", - "furniture_repair_refinishing", - "furriers_and_fur_shops", - "general_services", - "gift_card_novelty_and_souvenir_shops", - "glass_paint_and_wallpaper_stores", - "glassware_crystal_stores", - "golf_courses_public", - "government_licensed_horse_dog_racing_us_region_only", - "government_licensed_online_casions_online_gambling_us_region_only", - "government_owned_lotteries_non_us_region", - "government_owned_lotteries_us_region_only", - "government_services", - "grocery_stores_supermarkets", - "hardware_equipment_and_supplies", - "hardware_stores", - "health_and_beauty_spas", - "hearing_aids_sales_and_supplies", - "heating_plumbing_a_c", - "hobby_toy_and_game_shops", - "home_supply_warehouse_stores", - "hospitals", - "hotels_motels_and_resorts", - "household_appliance_stores", - "industrial_supplies", - "information_retrieval_services", - "insurance_default", - "insurance_underwriting_premiums", - "intra_company_purchases", - "jewelry_stores_watches_clocks_and_silverware_stores", - "landscaping_services", - "laundries", - "laundry_cleaning_services", - "legal_services_attorneys", - "luggage_and_leather_goods_stores", - "lumber_building_materials_stores", - "manual_cash_disburse", - "marinas_service_and_supplies", - "marketplaces", - "masonry_stonework_and_plaster", - "massage_parlors", - "medical_and_dental_labs", - "medical_dental_ophthalmic_and_hospital_equipment_and_supplies", - "medical_services", - "membership_organizations", - "mens_and_boys_clothing_and_accessories_stores", - "mens_womens_clothing_stores", - "metal_service_centers", - "miscellaneous", - "miscellaneous_apparel_and_accessory_shops", - "miscellaneous_auto_dealers", - "miscellaneous_business_services", - "miscellaneous_food_stores", - "miscellaneous_general_merchandise", - "miscellaneous_general_services", - "miscellaneous_home_furnishing_specialty_stores", - "miscellaneous_publishing_and_printing", - "miscellaneous_recreation_services", - "miscellaneous_repair_shops", - "miscellaneous_specialty_retail", - "mobile_home_dealers", - "motion_picture_theaters", - "motor_freight_carriers_and_trucking", - "motor_homes_dealers", - "motor_vehicle_supplies_and_new_parts", - "motorcycle_shops_and_dealers", - "motorcycle_shops_dealers", - "music_stores_musical_instruments_pianos_and_sheet_music", - "news_dealers_and_newsstands", - "non_fi_money_orders", - "non_fi_stored_value_card_purchase_load", - "nondurable_goods", - "nurseries_lawn_and_garden_supply_stores", - "nursing_personal_care", - "office_and_commercial_furniture", - "opticians_eyeglasses", - "optometrists_ophthalmologist", - "orthopedic_goods_prosthetic_devices", - "osteopaths", - "package_stores_beer_wine_and_liquor", - "paints_varnishes_and_supplies", - "parking_lots_garages", - "passenger_railways", - "pawn_shops", - "pet_shops_pet_food_and_supplies", - "petroleum_and_petroleum_products", - "photo_developing", - "photographic_photocopy_microfilm_equipment_and_supplies", - "photographic_studios", - "picture_video_production", - "piece_goods_notions_and_other_dry_goods", - "plumbing_heating_equipment_and_supplies", - "political_organizations", - "postal_services_government_only", - "precious_stones_and_metals_watches_and_jewelry", - "professional_services", - "public_warehousing_and_storage", - "quick_copy_repro_and_blueprint", - "railroads", - "real_estate_agents_and_managers_rentals", - "record_stores", - "recreational_vehicle_rentals", - "religious_goods_stores", - "religious_organizations", - "roofing_siding_sheet_metal", - "secretarial_support_services", - "security_brokers_dealers", - "service_stations", - "sewing_needlework_fabric_and_piece_goods_stores", - "shoe_repair_hat_cleaning", - "shoe_stores", - "small_appliance_repair", - "snowmobile_dealers", - "special_trade_services", - "specialty_cleaning", - "sporting_goods_stores", - "sporting_recreation_camps", - "sports_and_riding_apparel_stores", - "sports_clubs_fields", - "stamp_and_coin_stores", - "stationary_office_supplies_printing_and_writing_paper", - "stationery_stores_office_and_school_supply_stores", - "swimming_pools_sales", - "t_ui_travel_germany", - "tailors_alterations", - "tax_payments_government_agencies", - "tax_preparation_services", - "taxicabs_limousines", - "telecommunication_equipment_and_telephone_sales", - "telecommunication_services", - "telegraph_services", - "tent_and_awning_shops", - "testing_laboratories", - "theatrical_ticket_agencies", - "timeshares", - "tire_retreading_and_repair", - "tolls_bridge_fees", - "tourist_attractions_and_exhibits", - "towing_services", - "trailer_parks_campgrounds", - "transportation_services", - "travel_agencies_tour_operators", - "truck_stop_iteration", - "truck_utility_trailer_rentals", - "typesetting_plate_making_and_related_services", - "typewriter_stores", - "u_s_federal_government_agencies_or_departments", - "uniforms_commercial_clothing", - "used_merchandise_and_secondhand_stores", - "utilities", - "variety_stores", - "veterinary_services", - "video_amusement_game_supplies", - "video_game_arcades", - "video_tape_rental_stores", - "vocational_trade_schools", - "watch_jewelry_repair", - "welding_repair", - "wholesale_clubs", - "wig_and_toupee_stores", - "wires_money_orders", - "womens_accessory_and_specialty_shops", - "womens_ready_to_wear_stores", - "wrecking_and_salvage_yards", - ] - ] - ] - """ - Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to allow. All other categories will be blocked. Cannot be set with `blocked_categories`. - """ - allowed_merchant_countries: NotRequired[List[str]] - """ - Array of strings containing representing countries from which authorizations will be allowed. Authorizations from merchants in all other countries will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `blocked_merchant_countries`. Provide an empty value to unset this control. - """ - blocked_categories: NotRequired[ - List[ - Literal[ - "ac_refrigeration_repair", - "accounting_bookkeeping_services", - "advertising_services", - "agricultural_cooperative", - "airlines_air_carriers", - "airports_flying_fields", - "ambulance_services", - "amusement_parks_carnivals", - "antique_reproductions", - "antique_shops", - "aquariums", - "architectural_surveying_services", - "art_dealers_and_galleries", - "artists_supply_and_craft_shops", - "auto_and_home_supply_stores", - "auto_body_repair_shops", - "auto_paint_shops", - "auto_service_shops", - "automated_cash_disburse", - "automated_fuel_dispensers", - "automobile_associations", - "automotive_parts_and_accessories_stores", - "automotive_tire_stores", - "bail_and_bond_payments", - "bakeries", - "bands_orchestras", - "barber_and_beauty_shops", - "betting_casino_gambling", - "bicycle_shops", - "billiard_pool_establishments", - "boat_dealers", - "boat_rentals_and_leases", - "book_stores", - "books_periodicals_and_newspapers", - "bowling_alleys", - "bus_lines", - "business_secretarial_schools", - "buying_shopping_services", - "cable_satellite_and_other_pay_television_and_radio", - "camera_and_photographic_supply_stores", - "candy_nut_and_confectionery_stores", - "car_and_truck_dealers_new_used", - "car_and_truck_dealers_used_only", - "car_rental_agencies", - "car_washes", - "carpentry_services", - "carpet_upholstery_cleaning", - "caterers", - "charitable_and_social_service_organizations_fundraising", - "chemicals_and_allied_products", - "child_care_services", - "childrens_and_infants_wear_stores", - "chiropodists_podiatrists", - "chiropractors", - "cigar_stores_and_stands", - "civic_social_fraternal_associations", - "cleaning_and_maintenance", - "clothing_rental", - "colleges_universities", - "commercial_equipment", - "commercial_footwear", - "commercial_photography_art_and_graphics", - "commuter_transport_and_ferries", - "computer_network_services", - "computer_programming", - "computer_repair", - "computer_software_stores", - "computers_peripherals_and_software", - "concrete_work_services", - "construction_materials", - "consulting_public_relations", - "correspondence_schools", - "cosmetic_stores", - "counseling_services", - "country_clubs", - "courier_services", - "court_costs", - "credit_reporting_agencies", - "cruise_lines", - "dairy_products_stores", - "dance_hall_studios_schools", - "dating_escort_services", - "dentists_orthodontists", - "department_stores", - "detective_agencies", - "digital_goods_applications", - "digital_goods_games", - "digital_goods_large_volume", - "digital_goods_media", - "direct_marketing_catalog_merchant", - "direct_marketing_combination_catalog_and_retail_merchant", - "direct_marketing_inbound_telemarketing", - "direct_marketing_insurance_services", - "direct_marketing_other", - "direct_marketing_outbound_telemarketing", - "direct_marketing_subscription", - "direct_marketing_travel", - "discount_stores", - "doctors", - "door_to_door_sales", - "drapery_window_covering_and_upholstery_stores", - "drinking_places", - "drug_stores_and_pharmacies", - "drugs_drug_proprietaries_and_druggist_sundries", - "dry_cleaners", - "durable_goods", - "duty_free_stores", - "eating_places_restaurants", - "educational_services", - "electric_razor_stores", - "electric_vehicle_charging", - "electrical_parts_and_equipment", - "electrical_services", - "electronics_repair_shops", - "electronics_stores", - "elementary_secondary_schools", - "emergency_services_gcas_visa_use_only", - "employment_temp_agencies", - "equipment_rental", - "exterminating_services", - "family_clothing_stores", - "fast_food_restaurants", - "financial_institutions", - "fines_government_administrative_entities", - "fireplace_fireplace_screens_and_accessories_stores", - "floor_covering_stores", - "florists", - "florists_supplies_nursery_stock_and_flowers", - "freezer_and_locker_meat_provisioners", - "fuel_dealers_non_automotive", - "funeral_services_crematories", - "furniture_home_furnishings_and_equipment_stores_except_appliances", - "furniture_repair_refinishing", - "furriers_and_fur_shops", - "general_services", - "gift_card_novelty_and_souvenir_shops", - "glass_paint_and_wallpaper_stores", - "glassware_crystal_stores", - "golf_courses_public", - "government_licensed_horse_dog_racing_us_region_only", - "government_licensed_online_casions_online_gambling_us_region_only", - "government_owned_lotteries_non_us_region", - "government_owned_lotteries_us_region_only", - "government_services", - "grocery_stores_supermarkets", - "hardware_equipment_and_supplies", - "hardware_stores", - "health_and_beauty_spas", - "hearing_aids_sales_and_supplies", - "heating_plumbing_a_c", - "hobby_toy_and_game_shops", - "home_supply_warehouse_stores", - "hospitals", - "hotels_motels_and_resorts", - "household_appliance_stores", - "industrial_supplies", - "information_retrieval_services", - "insurance_default", - "insurance_underwriting_premiums", - "intra_company_purchases", - "jewelry_stores_watches_clocks_and_silverware_stores", - "landscaping_services", - "laundries", - "laundry_cleaning_services", - "legal_services_attorneys", - "luggage_and_leather_goods_stores", - "lumber_building_materials_stores", - "manual_cash_disburse", - "marinas_service_and_supplies", - "marketplaces", - "masonry_stonework_and_plaster", - "massage_parlors", - "medical_and_dental_labs", - "medical_dental_ophthalmic_and_hospital_equipment_and_supplies", - "medical_services", - "membership_organizations", - "mens_and_boys_clothing_and_accessories_stores", - "mens_womens_clothing_stores", - "metal_service_centers", - "miscellaneous", - "miscellaneous_apparel_and_accessory_shops", - "miscellaneous_auto_dealers", - "miscellaneous_business_services", - "miscellaneous_food_stores", - "miscellaneous_general_merchandise", - "miscellaneous_general_services", - "miscellaneous_home_furnishing_specialty_stores", - "miscellaneous_publishing_and_printing", - "miscellaneous_recreation_services", - "miscellaneous_repair_shops", - "miscellaneous_specialty_retail", - "mobile_home_dealers", - "motion_picture_theaters", - "motor_freight_carriers_and_trucking", - "motor_homes_dealers", - "motor_vehicle_supplies_and_new_parts", - "motorcycle_shops_and_dealers", - "motorcycle_shops_dealers", - "music_stores_musical_instruments_pianos_and_sheet_music", - "news_dealers_and_newsstands", - "non_fi_money_orders", - "non_fi_stored_value_card_purchase_load", - "nondurable_goods", - "nurseries_lawn_and_garden_supply_stores", - "nursing_personal_care", - "office_and_commercial_furniture", - "opticians_eyeglasses", - "optometrists_ophthalmologist", - "orthopedic_goods_prosthetic_devices", - "osteopaths", - "package_stores_beer_wine_and_liquor", - "paints_varnishes_and_supplies", - "parking_lots_garages", - "passenger_railways", - "pawn_shops", - "pet_shops_pet_food_and_supplies", - "petroleum_and_petroleum_products", - "photo_developing", - "photographic_photocopy_microfilm_equipment_and_supplies", - "photographic_studios", - "picture_video_production", - "piece_goods_notions_and_other_dry_goods", - "plumbing_heating_equipment_and_supplies", - "political_organizations", - "postal_services_government_only", - "precious_stones_and_metals_watches_and_jewelry", - "professional_services", - "public_warehousing_and_storage", - "quick_copy_repro_and_blueprint", - "railroads", - "real_estate_agents_and_managers_rentals", - "record_stores", - "recreational_vehicle_rentals", - "religious_goods_stores", - "religious_organizations", - "roofing_siding_sheet_metal", - "secretarial_support_services", - "security_brokers_dealers", - "service_stations", - "sewing_needlework_fabric_and_piece_goods_stores", - "shoe_repair_hat_cleaning", - "shoe_stores", - "small_appliance_repair", - "snowmobile_dealers", - "special_trade_services", - "specialty_cleaning", - "sporting_goods_stores", - "sporting_recreation_camps", - "sports_and_riding_apparel_stores", - "sports_clubs_fields", - "stamp_and_coin_stores", - "stationary_office_supplies_printing_and_writing_paper", - "stationery_stores_office_and_school_supply_stores", - "swimming_pools_sales", - "t_ui_travel_germany", - "tailors_alterations", - "tax_payments_government_agencies", - "tax_preparation_services", - "taxicabs_limousines", - "telecommunication_equipment_and_telephone_sales", - "telecommunication_services", - "telegraph_services", - "tent_and_awning_shops", - "testing_laboratories", - "theatrical_ticket_agencies", - "timeshares", - "tire_retreading_and_repair", - "tolls_bridge_fees", - "tourist_attractions_and_exhibits", - "towing_services", - "trailer_parks_campgrounds", - "transportation_services", - "travel_agencies_tour_operators", - "truck_stop_iteration", - "truck_utility_trailer_rentals", - "typesetting_plate_making_and_related_services", - "typewriter_stores", - "u_s_federal_government_agencies_or_departments", - "uniforms_commercial_clothing", - "used_merchandise_and_secondhand_stores", - "utilities", - "variety_stores", - "veterinary_services", - "video_amusement_game_supplies", - "video_game_arcades", - "video_tape_rental_stores", - "vocational_trade_schools", - "watch_jewelry_repair", - "welding_repair", - "wholesale_clubs", - "wig_and_toupee_stores", - "wires_money_orders", - "womens_accessory_and_specialty_shops", - "womens_ready_to_wear_stores", - "wrecking_and_salvage_yards", - ] - ] - ] - """ - Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to decline. All other categories will be allowed. Cannot be set with `allowed_categories`. - """ - blocked_merchant_countries: NotRequired[List[str]] - """ - Array of strings containing representing countries from which authorizations will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `allowed_merchant_countries`. Provide an empty value to unset this control. - """ - spending_limits: NotRequired[ - List["CardService.UpdateParamsSpendingControlsSpendingLimit"] - ] - """ - Limit spending with amount-based rules that apply across any cards this card replaced (i.e., its `replacement_for` card and _that_ card's `replacement_for` card, up the chain). - """ - - class UpdateParamsSpendingControlsSpendingLimit(TypedDict): - amount: int - """ - Maximum amount allowed to spend per interval. - """ - categories: NotRequired[ - List[ - Literal[ - "ac_refrigeration_repair", - "accounting_bookkeeping_services", - "advertising_services", - "agricultural_cooperative", - "airlines_air_carriers", - "airports_flying_fields", - "ambulance_services", - "amusement_parks_carnivals", - "antique_reproductions", - "antique_shops", - "aquariums", - "architectural_surveying_services", - "art_dealers_and_galleries", - "artists_supply_and_craft_shops", - "auto_and_home_supply_stores", - "auto_body_repair_shops", - "auto_paint_shops", - "auto_service_shops", - "automated_cash_disburse", - "automated_fuel_dispensers", - "automobile_associations", - "automotive_parts_and_accessories_stores", - "automotive_tire_stores", - "bail_and_bond_payments", - "bakeries", - "bands_orchestras", - "barber_and_beauty_shops", - "betting_casino_gambling", - "bicycle_shops", - "billiard_pool_establishments", - "boat_dealers", - "boat_rentals_and_leases", - "book_stores", - "books_periodicals_and_newspapers", - "bowling_alleys", - "bus_lines", - "business_secretarial_schools", - "buying_shopping_services", - "cable_satellite_and_other_pay_television_and_radio", - "camera_and_photographic_supply_stores", - "candy_nut_and_confectionery_stores", - "car_and_truck_dealers_new_used", - "car_and_truck_dealers_used_only", - "car_rental_agencies", - "car_washes", - "carpentry_services", - "carpet_upholstery_cleaning", - "caterers", - "charitable_and_social_service_organizations_fundraising", - "chemicals_and_allied_products", - "child_care_services", - "childrens_and_infants_wear_stores", - "chiropodists_podiatrists", - "chiropractors", - "cigar_stores_and_stands", - "civic_social_fraternal_associations", - "cleaning_and_maintenance", - "clothing_rental", - "colleges_universities", - "commercial_equipment", - "commercial_footwear", - "commercial_photography_art_and_graphics", - "commuter_transport_and_ferries", - "computer_network_services", - "computer_programming", - "computer_repair", - "computer_software_stores", - "computers_peripherals_and_software", - "concrete_work_services", - "construction_materials", - "consulting_public_relations", - "correspondence_schools", - "cosmetic_stores", - "counseling_services", - "country_clubs", - "courier_services", - "court_costs", - "credit_reporting_agencies", - "cruise_lines", - "dairy_products_stores", - "dance_hall_studios_schools", - "dating_escort_services", - "dentists_orthodontists", - "department_stores", - "detective_agencies", - "digital_goods_applications", - "digital_goods_games", - "digital_goods_large_volume", - "digital_goods_media", - "direct_marketing_catalog_merchant", - "direct_marketing_combination_catalog_and_retail_merchant", - "direct_marketing_inbound_telemarketing", - "direct_marketing_insurance_services", - "direct_marketing_other", - "direct_marketing_outbound_telemarketing", - "direct_marketing_subscription", - "direct_marketing_travel", - "discount_stores", - "doctors", - "door_to_door_sales", - "drapery_window_covering_and_upholstery_stores", - "drinking_places", - "drug_stores_and_pharmacies", - "drugs_drug_proprietaries_and_druggist_sundries", - "dry_cleaners", - "durable_goods", - "duty_free_stores", - "eating_places_restaurants", - "educational_services", - "electric_razor_stores", - "electric_vehicle_charging", - "electrical_parts_and_equipment", - "electrical_services", - "electronics_repair_shops", - "electronics_stores", - "elementary_secondary_schools", - "emergency_services_gcas_visa_use_only", - "employment_temp_agencies", - "equipment_rental", - "exterminating_services", - "family_clothing_stores", - "fast_food_restaurants", - "financial_institutions", - "fines_government_administrative_entities", - "fireplace_fireplace_screens_and_accessories_stores", - "floor_covering_stores", - "florists", - "florists_supplies_nursery_stock_and_flowers", - "freezer_and_locker_meat_provisioners", - "fuel_dealers_non_automotive", - "funeral_services_crematories", - "furniture_home_furnishings_and_equipment_stores_except_appliances", - "furniture_repair_refinishing", - "furriers_and_fur_shops", - "general_services", - "gift_card_novelty_and_souvenir_shops", - "glass_paint_and_wallpaper_stores", - "glassware_crystal_stores", - "golf_courses_public", - "government_licensed_horse_dog_racing_us_region_only", - "government_licensed_online_casions_online_gambling_us_region_only", - "government_owned_lotteries_non_us_region", - "government_owned_lotteries_us_region_only", - "government_services", - "grocery_stores_supermarkets", - "hardware_equipment_and_supplies", - "hardware_stores", - "health_and_beauty_spas", - "hearing_aids_sales_and_supplies", - "heating_plumbing_a_c", - "hobby_toy_and_game_shops", - "home_supply_warehouse_stores", - "hospitals", - "hotels_motels_and_resorts", - "household_appliance_stores", - "industrial_supplies", - "information_retrieval_services", - "insurance_default", - "insurance_underwriting_premiums", - "intra_company_purchases", - "jewelry_stores_watches_clocks_and_silverware_stores", - "landscaping_services", - "laundries", - "laundry_cleaning_services", - "legal_services_attorneys", - "luggage_and_leather_goods_stores", - "lumber_building_materials_stores", - "manual_cash_disburse", - "marinas_service_and_supplies", - "marketplaces", - "masonry_stonework_and_plaster", - "massage_parlors", - "medical_and_dental_labs", - "medical_dental_ophthalmic_and_hospital_equipment_and_supplies", - "medical_services", - "membership_organizations", - "mens_and_boys_clothing_and_accessories_stores", - "mens_womens_clothing_stores", - "metal_service_centers", - "miscellaneous", - "miscellaneous_apparel_and_accessory_shops", - "miscellaneous_auto_dealers", - "miscellaneous_business_services", - "miscellaneous_food_stores", - "miscellaneous_general_merchandise", - "miscellaneous_general_services", - "miscellaneous_home_furnishing_specialty_stores", - "miscellaneous_publishing_and_printing", - "miscellaneous_recreation_services", - "miscellaneous_repair_shops", - "miscellaneous_specialty_retail", - "mobile_home_dealers", - "motion_picture_theaters", - "motor_freight_carriers_and_trucking", - "motor_homes_dealers", - "motor_vehicle_supplies_and_new_parts", - "motorcycle_shops_and_dealers", - "motorcycle_shops_dealers", - "music_stores_musical_instruments_pianos_and_sheet_music", - "news_dealers_and_newsstands", - "non_fi_money_orders", - "non_fi_stored_value_card_purchase_load", - "nondurable_goods", - "nurseries_lawn_and_garden_supply_stores", - "nursing_personal_care", - "office_and_commercial_furniture", - "opticians_eyeglasses", - "optometrists_ophthalmologist", - "orthopedic_goods_prosthetic_devices", - "osteopaths", - "package_stores_beer_wine_and_liquor", - "paints_varnishes_and_supplies", - "parking_lots_garages", - "passenger_railways", - "pawn_shops", - "pet_shops_pet_food_and_supplies", - "petroleum_and_petroleum_products", - "photo_developing", - "photographic_photocopy_microfilm_equipment_and_supplies", - "photographic_studios", - "picture_video_production", - "piece_goods_notions_and_other_dry_goods", - "plumbing_heating_equipment_and_supplies", - "political_organizations", - "postal_services_government_only", - "precious_stones_and_metals_watches_and_jewelry", - "professional_services", - "public_warehousing_and_storage", - "quick_copy_repro_and_blueprint", - "railroads", - "real_estate_agents_and_managers_rentals", - "record_stores", - "recreational_vehicle_rentals", - "religious_goods_stores", - "religious_organizations", - "roofing_siding_sheet_metal", - "secretarial_support_services", - "security_brokers_dealers", - "service_stations", - "sewing_needlework_fabric_and_piece_goods_stores", - "shoe_repair_hat_cleaning", - "shoe_stores", - "small_appliance_repair", - "snowmobile_dealers", - "special_trade_services", - "specialty_cleaning", - "sporting_goods_stores", - "sporting_recreation_camps", - "sports_and_riding_apparel_stores", - "sports_clubs_fields", - "stamp_and_coin_stores", - "stationary_office_supplies_printing_and_writing_paper", - "stationery_stores_office_and_school_supply_stores", - "swimming_pools_sales", - "t_ui_travel_germany", - "tailors_alterations", - "tax_payments_government_agencies", - "tax_preparation_services", - "taxicabs_limousines", - "telecommunication_equipment_and_telephone_sales", - "telecommunication_services", - "telegraph_services", - "tent_and_awning_shops", - "testing_laboratories", - "theatrical_ticket_agencies", - "timeshares", - "tire_retreading_and_repair", - "tolls_bridge_fees", - "tourist_attractions_and_exhibits", - "towing_services", - "trailer_parks_campgrounds", - "transportation_services", - "travel_agencies_tour_operators", - "truck_stop_iteration", - "truck_utility_trailer_rentals", - "typesetting_plate_making_and_related_services", - "typewriter_stores", - "u_s_federal_government_agencies_or_departments", - "uniforms_commercial_clothing", - "used_merchandise_and_secondhand_stores", - "utilities", - "variety_stores", - "veterinary_services", - "video_amusement_game_supplies", - "video_game_arcades", - "video_tape_rental_stores", - "vocational_trade_schools", - "watch_jewelry_repair", - "welding_repair", - "wholesale_clubs", - "wig_and_toupee_stores", - "wires_money_orders", - "womens_accessory_and_specialty_shops", - "womens_ready_to_wear_stores", - "wrecking_and_salvage_yards", - ] - ] - ] - """ - Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories. - """ - interval: Literal[ - "all_time", - "daily", - "monthly", - "per_authorization", - "weekly", - "yearly", - ] - """ - Interval (or event) to which the amount applies. - """ +class CardService(StripeService): def list( self, - params: Optional["CardService.ListParams"] = None, + params: Optional["CardListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[Card]: """ @@ -2259,7 +37,7 @@ def list( async def list_async( self, - params: Optional["CardService.ListParams"] = None, + params: Optional["CardListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[Card]: """ @@ -2278,7 +56,7 @@ async def list_async( def create( self, - params: "CardService.CreateParams", + params: "CardCreateParams", options: Optional[RequestOptions] = None, ) -> Card: """ @@ -2297,7 +75,7 @@ def create( async def create_async( self, - params: "CardService.CreateParams", + params: "CardCreateParams", options: Optional[RequestOptions] = None, ) -> Card: """ @@ -2317,7 +95,7 @@ async def create_async( def retrieve( self, card: str, - params: Optional["CardService.RetrieveParams"] = None, + params: Optional["CardRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Card: """ @@ -2337,7 +115,7 @@ def retrieve( async def retrieve_async( self, card: str, - params: Optional["CardService.RetrieveParams"] = None, + params: Optional["CardRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Card: """ @@ -2357,7 +135,7 @@ async def retrieve_async( def update( self, card: str, - params: Optional["CardService.UpdateParams"] = None, + params: Optional["CardUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> Card: """ @@ -2377,7 +155,7 @@ def update( async def update_async( self, card: str, - params: Optional["CardService.UpdateParams"] = None, + params: Optional["CardUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> Card: """ diff --git a/stripe/issuing/_cardholder.py b/stripe/issuing/_cardholder.py index 3c69ca6d8..673668b82 100644 --- a/stripe/issuing/_cardholder.py +++ b/stripe/issuing/_cardholder.py @@ -4,21 +4,26 @@ from stripe._expandable_field import ExpandableField from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource -from stripe._request_options import RequestOptions from stripe._stripe_object import StripeObject from stripe._updateable_api_resource import UpdateableAPIResource from stripe._util import sanitize_id from typing import ClassVar, Dict, List, Optional, cast -from typing_extensions import ( - Literal, - NotRequired, - TypedDict, - Unpack, - TYPE_CHECKING, -) +from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: from stripe._file import File + from stripe.params.issuing._cardholder_create_params import ( + CardholderCreateParams, + ) + from stripe.params.issuing._cardholder_list_params import ( + CardholderListParams, + ) + from stripe.params.issuing._cardholder_modify_params import ( + CardholderModifyParams, + ) + from stripe.params.issuing._cardholder_retrieve_params import ( + CardholderRetrieveParams, + ) class Cardholder( @@ -1128,2305 +1133,6 @@ class SpendingLimit(StripeObject): """ _inner_class_types = {"spending_limits": SpendingLimit} - class CreateParams(RequestOptions): - billing: "Cardholder.CreateParamsBilling" - """ - The cardholder's billing address. - """ - company: NotRequired["Cardholder.CreateParamsCompany"] - """ - Additional information about a `company` cardholder. - """ - email: NotRequired[str] - """ - The cardholder's email address. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - individual: NotRequired["Cardholder.CreateParamsIndividual"] - """ - Additional information about an `individual` cardholder. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - name: str - """ - The cardholder's name. This will be printed on cards issued to them. The maximum length of this field is 24 characters. This field cannot contain any special characters or numbers. - """ - phone_number: NotRequired[str] - """ - The cardholder's phone number. This will be transformed to [E.164](https://en.wikipedia.org/wiki/E.164) if it is not provided in that format already. This is required for all cardholders who will be creating EU cards. - While phone number is optional if the cardholder will not be creating EU cards, note that this cardholder will not be eligible for 3DS without a phone number. See the [3D Secure documentation](https://stripe.com/docs/issuing/3d-secure#when-is-3d-secure-applied) for more details. - """ - preferred_locales: NotRequired[ - List[Literal["de", "en", "es", "fr", "it"]] - ] - """ - The cardholder's preferred locales (languages), ordered by preference. Locales can be `de`, `en`, `es`, `fr`, or `it`. - This changes the language of the [3D Secure flow](https://stripe.com/docs/issuing/3d-secure) and one-time password messages sent to the cardholder. - """ - spending_controls: NotRequired[ - "Cardholder.CreateParamsSpendingControls" - ] - """ - Rules that control spending across this cardholder's cards. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details. - """ - status: NotRequired[Literal["active", "inactive"]] - """ - Specifies whether to permit authorizations on this cardholder's cards. Defaults to `active`. - """ - type: NotRequired[Literal["company", "individual"]] - """ - One of `individual` or `company`. See [Choose a cardholder type](https://stripe.com/docs/issuing/other/choose-cardholder) for more details. - """ - - class CreateParamsBilling(TypedDict): - address: "Cardholder.CreateParamsBillingAddress" - """ - The cardholder's billing address. - """ - - class CreateParamsBillingAddress(TypedDict): - city: 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: 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: str - """ - ZIP or postal code. - """ - state: NotRequired[str] - """ - State, county, province, or region. - """ - - class CreateParamsCompany(TypedDict): - tax_id: NotRequired[str] - """ - The entity's business ID number. - """ - - class CreateParamsIndividual(TypedDict): - card_issuing: NotRequired[ - "Cardholder.CreateParamsIndividualCardIssuing" - ] - """ - Information related to the card_issuing program for this cardholder. - """ - dob: NotRequired["Cardholder.CreateParamsIndividualDob"] - """ - The date of birth of this cardholder. Cardholders must be older than 13 years old. - """ - first_name: NotRequired[str] - """ - The first name of this cardholder. Required before activating Cards. This field cannot contain any numbers, special characters (except periods, commas, hyphens, spaces and apostrophes) or non-latin letters. - """ - last_name: NotRequired[str] - """ - The last name of this cardholder. Required before activating Cards. This field cannot contain any numbers, special characters (except periods, commas, hyphens, spaces and apostrophes) or non-latin letters. - """ - verification: NotRequired[ - "Cardholder.CreateParamsIndividualVerification" - ] - """ - Government-issued ID document for this cardholder. - """ - - class CreateParamsIndividualCardIssuing(TypedDict): - user_terms_acceptance: NotRequired[ - "Cardholder.CreateParamsIndividualCardIssuingUserTermsAcceptance" - ] - """ - Information about cardholder acceptance of Celtic [Authorized User Terms](https://stripe.com/docs/issuing/cards#accept-authorized-user-terms). Required for cards backed by a Celtic program. - """ - - class CreateParamsIndividualCardIssuingUserTermsAcceptance(TypedDict): - date: NotRequired[int] - """ - The Unix timestamp marking when the cardholder accepted the Authorized User Terms. Required for Celtic Spend Card users. - """ - ip: NotRequired[str] - """ - The IP address from which the cardholder accepted the Authorized User Terms. Required for Celtic Spend Card users. - """ - user_agent: NotRequired["Literal['']|str"] - """ - The user agent of the browser from which the cardholder accepted the Authorized User Terms. - """ - - class CreateParamsIndividualDob(TypedDict): - day: int - """ - The day of birth, between 1 and 31. - """ - month: int - """ - The month of birth, between 1 and 12. - """ - year: int - """ - The four-digit year of birth. - """ - - class CreateParamsIndividualVerification(TypedDict): - document: NotRequired[ - "Cardholder.CreateParamsIndividualVerificationDocument" - ] - """ - An identifying document, either a passport or local ID card. - """ - - class CreateParamsIndividualVerificationDocument(TypedDict): - back: NotRequired[str] - """ - The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. - """ - front: NotRequired[str] - """ - The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. - """ - - class CreateParamsSpendingControls(TypedDict): - allowed_categories: NotRequired[ - List[ - Literal[ - "ac_refrigeration_repair", - "accounting_bookkeeping_services", - "advertising_services", - "agricultural_cooperative", - "airlines_air_carriers", - "airports_flying_fields", - "ambulance_services", - "amusement_parks_carnivals", - "antique_reproductions", - "antique_shops", - "aquariums", - "architectural_surveying_services", - "art_dealers_and_galleries", - "artists_supply_and_craft_shops", - "auto_and_home_supply_stores", - "auto_body_repair_shops", - "auto_paint_shops", - "auto_service_shops", - "automated_cash_disburse", - "automated_fuel_dispensers", - "automobile_associations", - "automotive_parts_and_accessories_stores", - "automotive_tire_stores", - "bail_and_bond_payments", - "bakeries", - "bands_orchestras", - "barber_and_beauty_shops", - "betting_casino_gambling", - "bicycle_shops", - "billiard_pool_establishments", - "boat_dealers", - "boat_rentals_and_leases", - "book_stores", - "books_periodicals_and_newspapers", - "bowling_alleys", - "bus_lines", - "business_secretarial_schools", - "buying_shopping_services", - "cable_satellite_and_other_pay_television_and_radio", - "camera_and_photographic_supply_stores", - "candy_nut_and_confectionery_stores", - "car_and_truck_dealers_new_used", - "car_and_truck_dealers_used_only", - "car_rental_agencies", - "car_washes", - "carpentry_services", - "carpet_upholstery_cleaning", - "caterers", - "charitable_and_social_service_organizations_fundraising", - "chemicals_and_allied_products", - "child_care_services", - "childrens_and_infants_wear_stores", - "chiropodists_podiatrists", - "chiropractors", - "cigar_stores_and_stands", - "civic_social_fraternal_associations", - "cleaning_and_maintenance", - "clothing_rental", - "colleges_universities", - "commercial_equipment", - "commercial_footwear", - "commercial_photography_art_and_graphics", - "commuter_transport_and_ferries", - "computer_network_services", - "computer_programming", - "computer_repair", - "computer_software_stores", - "computers_peripherals_and_software", - "concrete_work_services", - "construction_materials", - "consulting_public_relations", - "correspondence_schools", - "cosmetic_stores", - "counseling_services", - "country_clubs", - "courier_services", - "court_costs", - "credit_reporting_agencies", - "cruise_lines", - "dairy_products_stores", - "dance_hall_studios_schools", - "dating_escort_services", - "dentists_orthodontists", - "department_stores", - "detective_agencies", - "digital_goods_applications", - "digital_goods_games", - "digital_goods_large_volume", - "digital_goods_media", - "direct_marketing_catalog_merchant", - "direct_marketing_combination_catalog_and_retail_merchant", - "direct_marketing_inbound_telemarketing", - "direct_marketing_insurance_services", - "direct_marketing_other", - "direct_marketing_outbound_telemarketing", - "direct_marketing_subscription", - "direct_marketing_travel", - "discount_stores", - "doctors", - "door_to_door_sales", - "drapery_window_covering_and_upholstery_stores", - "drinking_places", - "drug_stores_and_pharmacies", - "drugs_drug_proprietaries_and_druggist_sundries", - "dry_cleaners", - "durable_goods", - "duty_free_stores", - "eating_places_restaurants", - "educational_services", - "electric_razor_stores", - "electric_vehicle_charging", - "electrical_parts_and_equipment", - "electrical_services", - "electronics_repair_shops", - "electronics_stores", - "elementary_secondary_schools", - "emergency_services_gcas_visa_use_only", - "employment_temp_agencies", - "equipment_rental", - "exterminating_services", - "family_clothing_stores", - "fast_food_restaurants", - "financial_institutions", - "fines_government_administrative_entities", - "fireplace_fireplace_screens_and_accessories_stores", - "floor_covering_stores", - "florists", - "florists_supplies_nursery_stock_and_flowers", - "freezer_and_locker_meat_provisioners", - "fuel_dealers_non_automotive", - "funeral_services_crematories", - "furniture_home_furnishings_and_equipment_stores_except_appliances", - "furniture_repair_refinishing", - "furriers_and_fur_shops", - "general_services", - "gift_card_novelty_and_souvenir_shops", - "glass_paint_and_wallpaper_stores", - "glassware_crystal_stores", - "golf_courses_public", - "government_licensed_horse_dog_racing_us_region_only", - "government_licensed_online_casions_online_gambling_us_region_only", - "government_owned_lotteries_non_us_region", - "government_owned_lotteries_us_region_only", - "government_services", - "grocery_stores_supermarkets", - "hardware_equipment_and_supplies", - "hardware_stores", - "health_and_beauty_spas", - "hearing_aids_sales_and_supplies", - "heating_plumbing_a_c", - "hobby_toy_and_game_shops", - "home_supply_warehouse_stores", - "hospitals", - "hotels_motels_and_resorts", - "household_appliance_stores", - "industrial_supplies", - "information_retrieval_services", - "insurance_default", - "insurance_underwriting_premiums", - "intra_company_purchases", - "jewelry_stores_watches_clocks_and_silverware_stores", - "landscaping_services", - "laundries", - "laundry_cleaning_services", - "legal_services_attorneys", - "luggage_and_leather_goods_stores", - "lumber_building_materials_stores", - "manual_cash_disburse", - "marinas_service_and_supplies", - "marketplaces", - "masonry_stonework_and_plaster", - "massage_parlors", - "medical_and_dental_labs", - "medical_dental_ophthalmic_and_hospital_equipment_and_supplies", - "medical_services", - "membership_organizations", - "mens_and_boys_clothing_and_accessories_stores", - "mens_womens_clothing_stores", - "metal_service_centers", - "miscellaneous", - "miscellaneous_apparel_and_accessory_shops", - "miscellaneous_auto_dealers", - "miscellaneous_business_services", - "miscellaneous_food_stores", - "miscellaneous_general_merchandise", - "miscellaneous_general_services", - "miscellaneous_home_furnishing_specialty_stores", - "miscellaneous_publishing_and_printing", - "miscellaneous_recreation_services", - "miscellaneous_repair_shops", - "miscellaneous_specialty_retail", - "mobile_home_dealers", - "motion_picture_theaters", - "motor_freight_carriers_and_trucking", - "motor_homes_dealers", - "motor_vehicle_supplies_and_new_parts", - "motorcycle_shops_and_dealers", - "motorcycle_shops_dealers", - "music_stores_musical_instruments_pianos_and_sheet_music", - "news_dealers_and_newsstands", - "non_fi_money_orders", - "non_fi_stored_value_card_purchase_load", - "nondurable_goods", - "nurseries_lawn_and_garden_supply_stores", - "nursing_personal_care", - "office_and_commercial_furniture", - "opticians_eyeglasses", - "optometrists_ophthalmologist", - "orthopedic_goods_prosthetic_devices", - "osteopaths", - "package_stores_beer_wine_and_liquor", - "paints_varnishes_and_supplies", - "parking_lots_garages", - "passenger_railways", - "pawn_shops", - "pet_shops_pet_food_and_supplies", - "petroleum_and_petroleum_products", - "photo_developing", - "photographic_photocopy_microfilm_equipment_and_supplies", - "photographic_studios", - "picture_video_production", - "piece_goods_notions_and_other_dry_goods", - "plumbing_heating_equipment_and_supplies", - "political_organizations", - "postal_services_government_only", - "precious_stones_and_metals_watches_and_jewelry", - "professional_services", - "public_warehousing_and_storage", - "quick_copy_repro_and_blueprint", - "railroads", - "real_estate_agents_and_managers_rentals", - "record_stores", - "recreational_vehicle_rentals", - "religious_goods_stores", - "religious_organizations", - "roofing_siding_sheet_metal", - "secretarial_support_services", - "security_brokers_dealers", - "service_stations", - "sewing_needlework_fabric_and_piece_goods_stores", - "shoe_repair_hat_cleaning", - "shoe_stores", - "small_appliance_repair", - "snowmobile_dealers", - "special_trade_services", - "specialty_cleaning", - "sporting_goods_stores", - "sporting_recreation_camps", - "sports_and_riding_apparel_stores", - "sports_clubs_fields", - "stamp_and_coin_stores", - "stationary_office_supplies_printing_and_writing_paper", - "stationery_stores_office_and_school_supply_stores", - "swimming_pools_sales", - "t_ui_travel_germany", - "tailors_alterations", - "tax_payments_government_agencies", - "tax_preparation_services", - "taxicabs_limousines", - "telecommunication_equipment_and_telephone_sales", - "telecommunication_services", - "telegraph_services", - "tent_and_awning_shops", - "testing_laboratories", - "theatrical_ticket_agencies", - "timeshares", - "tire_retreading_and_repair", - "tolls_bridge_fees", - "tourist_attractions_and_exhibits", - "towing_services", - "trailer_parks_campgrounds", - "transportation_services", - "travel_agencies_tour_operators", - "truck_stop_iteration", - "truck_utility_trailer_rentals", - "typesetting_plate_making_and_related_services", - "typewriter_stores", - "u_s_federal_government_agencies_or_departments", - "uniforms_commercial_clothing", - "used_merchandise_and_secondhand_stores", - "utilities", - "variety_stores", - "veterinary_services", - "video_amusement_game_supplies", - "video_game_arcades", - "video_tape_rental_stores", - "vocational_trade_schools", - "watch_jewelry_repair", - "welding_repair", - "wholesale_clubs", - "wig_and_toupee_stores", - "wires_money_orders", - "womens_accessory_and_specialty_shops", - "womens_ready_to_wear_stores", - "wrecking_and_salvage_yards", - ] - ] - ] - """ - Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to allow. All other categories will be blocked. Cannot be set with `blocked_categories`. - """ - allowed_merchant_countries: NotRequired[List[str]] - """ - Array of strings containing representing countries from which authorizations will be allowed. Authorizations from merchants in all other countries will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `blocked_merchant_countries`. Provide an empty value to unset this control. - """ - blocked_categories: NotRequired[ - List[ - Literal[ - "ac_refrigeration_repair", - "accounting_bookkeeping_services", - "advertising_services", - "agricultural_cooperative", - "airlines_air_carriers", - "airports_flying_fields", - "ambulance_services", - "amusement_parks_carnivals", - "antique_reproductions", - "antique_shops", - "aquariums", - "architectural_surveying_services", - "art_dealers_and_galleries", - "artists_supply_and_craft_shops", - "auto_and_home_supply_stores", - "auto_body_repair_shops", - "auto_paint_shops", - "auto_service_shops", - "automated_cash_disburse", - "automated_fuel_dispensers", - "automobile_associations", - "automotive_parts_and_accessories_stores", - "automotive_tire_stores", - "bail_and_bond_payments", - "bakeries", - "bands_orchestras", - "barber_and_beauty_shops", - "betting_casino_gambling", - "bicycle_shops", - "billiard_pool_establishments", - "boat_dealers", - "boat_rentals_and_leases", - "book_stores", - "books_periodicals_and_newspapers", - "bowling_alleys", - "bus_lines", - "business_secretarial_schools", - "buying_shopping_services", - "cable_satellite_and_other_pay_television_and_radio", - "camera_and_photographic_supply_stores", - "candy_nut_and_confectionery_stores", - "car_and_truck_dealers_new_used", - "car_and_truck_dealers_used_only", - "car_rental_agencies", - "car_washes", - "carpentry_services", - "carpet_upholstery_cleaning", - "caterers", - "charitable_and_social_service_organizations_fundraising", - "chemicals_and_allied_products", - "child_care_services", - "childrens_and_infants_wear_stores", - "chiropodists_podiatrists", - "chiropractors", - "cigar_stores_and_stands", - "civic_social_fraternal_associations", - "cleaning_and_maintenance", - "clothing_rental", - "colleges_universities", - "commercial_equipment", - "commercial_footwear", - "commercial_photography_art_and_graphics", - "commuter_transport_and_ferries", - "computer_network_services", - "computer_programming", - "computer_repair", - "computer_software_stores", - "computers_peripherals_and_software", - "concrete_work_services", - "construction_materials", - "consulting_public_relations", - "correspondence_schools", - "cosmetic_stores", - "counseling_services", - "country_clubs", - "courier_services", - "court_costs", - "credit_reporting_agencies", - "cruise_lines", - "dairy_products_stores", - "dance_hall_studios_schools", - "dating_escort_services", - "dentists_orthodontists", - "department_stores", - "detective_agencies", - "digital_goods_applications", - "digital_goods_games", - "digital_goods_large_volume", - "digital_goods_media", - "direct_marketing_catalog_merchant", - "direct_marketing_combination_catalog_and_retail_merchant", - "direct_marketing_inbound_telemarketing", - "direct_marketing_insurance_services", - "direct_marketing_other", - "direct_marketing_outbound_telemarketing", - "direct_marketing_subscription", - "direct_marketing_travel", - "discount_stores", - "doctors", - "door_to_door_sales", - "drapery_window_covering_and_upholstery_stores", - "drinking_places", - "drug_stores_and_pharmacies", - "drugs_drug_proprietaries_and_druggist_sundries", - "dry_cleaners", - "durable_goods", - "duty_free_stores", - "eating_places_restaurants", - "educational_services", - "electric_razor_stores", - "electric_vehicle_charging", - "electrical_parts_and_equipment", - "electrical_services", - "electronics_repair_shops", - "electronics_stores", - "elementary_secondary_schools", - "emergency_services_gcas_visa_use_only", - "employment_temp_agencies", - "equipment_rental", - "exterminating_services", - "family_clothing_stores", - "fast_food_restaurants", - "financial_institutions", - "fines_government_administrative_entities", - "fireplace_fireplace_screens_and_accessories_stores", - "floor_covering_stores", - "florists", - "florists_supplies_nursery_stock_and_flowers", - "freezer_and_locker_meat_provisioners", - "fuel_dealers_non_automotive", - "funeral_services_crematories", - "furniture_home_furnishings_and_equipment_stores_except_appliances", - "furniture_repair_refinishing", - "furriers_and_fur_shops", - "general_services", - "gift_card_novelty_and_souvenir_shops", - "glass_paint_and_wallpaper_stores", - "glassware_crystal_stores", - "golf_courses_public", - "government_licensed_horse_dog_racing_us_region_only", - "government_licensed_online_casions_online_gambling_us_region_only", - "government_owned_lotteries_non_us_region", - "government_owned_lotteries_us_region_only", - "government_services", - "grocery_stores_supermarkets", - "hardware_equipment_and_supplies", - "hardware_stores", - "health_and_beauty_spas", - "hearing_aids_sales_and_supplies", - "heating_plumbing_a_c", - "hobby_toy_and_game_shops", - "home_supply_warehouse_stores", - "hospitals", - "hotels_motels_and_resorts", - "household_appliance_stores", - "industrial_supplies", - "information_retrieval_services", - "insurance_default", - "insurance_underwriting_premiums", - "intra_company_purchases", - "jewelry_stores_watches_clocks_and_silverware_stores", - "landscaping_services", - "laundries", - "laundry_cleaning_services", - "legal_services_attorneys", - "luggage_and_leather_goods_stores", - "lumber_building_materials_stores", - "manual_cash_disburse", - "marinas_service_and_supplies", - "marketplaces", - "masonry_stonework_and_plaster", - "massage_parlors", - "medical_and_dental_labs", - "medical_dental_ophthalmic_and_hospital_equipment_and_supplies", - "medical_services", - "membership_organizations", - "mens_and_boys_clothing_and_accessories_stores", - "mens_womens_clothing_stores", - "metal_service_centers", - "miscellaneous", - "miscellaneous_apparel_and_accessory_shops", - "miscellaneous_auto_dealers", - "miscellaneous_business_services", - "miscellaneous_food_stores", - "miscellaneous_general_merchandise", - "miscellaneous_general_services", - "miscellaneous_home_furnishing_specialty_stores", - "miscellaneous_publishing_and_printing", - "miscellaneous_recreation_services", - "miscellaneous_repair_shops", - "miscellaneous_specialty_retail", - "mobile_home_dealers", - "motion_picture_theaters", - "motor_freight_carriers_and_trucking", - "motor_homes_dealers", - "motor_vehicle_supplies_and_new_parts", - "motorcycle_shops_and_dealers", - "motorcycle_shops_dealers", - "music_stores_musical_instruments_pianos_and_sheet_music", - "news_dealers_and_newsstands", - "non_fi_money_orders", - "non_fi_stored_value_card_purchase_load", - "nondurable_goods", - "nurseries_lawn_and_garden_supply_stores", - "nursing_personal_care", - "office_and_commercial_furniture", - "opticians_eyeglasses", - "optometrists_ophthalmologist", - "orthopedic_goods_prosthetic_devices", - "osteopaths", - "package_stores_beer_wine_and_liquor", - "paints_varnishes_and_supplies", - "parking_lots_garages", - "passenger_railways", - "pawn_shops", - "pet_shops_pet_food_and_supplies", - "petroleum_and_petroleum_products", - "photo_developing", - "photographic_photocopy_microfilm_equipment_and_supplies", - "photographic_studios", - "picture_video_production", - "piece_goods_notions_and_other_dry_goods", - "plumbing_heating_equipment_and_supplies", - "political_organizations", - "postal_services_government_only", - "precious_stones_and_metals_watches_and_jewelry", - "professional_services", - "public_warehousing_and_storage", - "quick_copy_repro_and_blueprint", - "railroads", - "real_estate_agents_and_managers_rentals", - "record_stores", - "recreational_vehicle_rentals", - "religious_goods_stores", - "religious_organizations", - "roofing_siding_sheet_metal", - "secretarial_support_services", - "security_brokers_dealers", - "service_stations", - "sewing_needlework_fabric_and_piece_goods_stores", - "shoe_repair_hat_cleaning", - "shoe_stores", - "small_appliance_repair", - "snowmobile_dealers", - "special_trade_services", - "specialty_cleaning", - "sporting_goods_stores", - "sporting_recreation_camps", - "sports_and_riding_apparel_stores", - "sports_clubs_fields", - "stamp_and_coin_stores", - "stationary_office_supplies_printing_and_writing_paper", - "stationery_stores_office_and_school_supply_stores", - "swimming_pools_sales", - "t_ui_travel_germany", - "tailors_alterations", - "tax_payments_government_agencies", - "tax_preparation_services", - "taxicabs_limousines", - "telecommunication_equipment_and_telephone_sales", - "telecommunication_services", - "telegraph_services", - "tent_and_awning_shops", - "testing_laboratories", - "theatrical_ticket_agencies", - "timeshares", - "tire_retreading_and_repair", - "tolls_bridge_fees", - "tourist_attractions_and_exhibits", - "towing_services", - "trailer_parks_campgrounds", - "transportation_services", - "travel_agencies_tour_operators", - "truck_stop_iteration", - "truck_utility_trailer_rentals", - "typesetting_plate_making_and_related_services", - "typewriter_stores", - "u_s_federal_government_agencies_or_departments", - "uniforms_commercial_clothing", - "used_merchandise_and_secondhand_stores", - "utilities", - "variety_stores", - "veterinary_services", - "video_amusement_game_supplies", - "video_game_arcades", - "video_tape_rental_stores", - "vocational_trade_schools", - "watch_jewelry_repair", - "welding_repair", - "wholesale_clubs", - "wig_and_toupee_stores", - "wires_money_orders", - "womens_accessory_and_specialty_shops", - "womens_ready_to_wear_stores", - "wrecking_and_salvage_yards", - ] - ] - ] - """ - Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to decline. All other categories will be allowed. Cannot be set with `allowed_categories`. - """ - blocked_merchant_countries: NotRequired[List[str]] - """ - Array of strings containing representing countries from which authorizations will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `allowed_merchant_countries`. Provide an empty value to unset this control. - """ - spending_limits: NotRequired[ - List["Cardholder.CreateParamsSpendingControlsSpendingLimit"] - ] - """ - Limit spending with amount-based rules that apply across this cardholder's cards. - """ - spending_limits_currency: NotRequired[str] - """ - Currency of amounts within `spending_limits`. Defaults to your merchant country's currency. - """ - - class CreateParamsSpendingControlsSpendingLimit(TypedDict): - amount: int - """ - Maximum amount allowed to spend per interval. - """ - categories: NotRequired[ - List[ - Literal[ - "ac_refrigeration_repair", - "accounting_bookkeeping_services", - "advertising_services", - "agricultural_cooperative", - "airlines_air_carriers", - "airports_flying_fields", - "ambulance_services", - "amusement_parks_carnivals", - "antique_reproductions", - "antique_shops", - "aquariums", - "architectural_surveying_services", - "art_dealers_and_galleries", - "artists_supply_and_craft_shops", - "auto_and_home_supply_stores", - "auto_body_repair_shops", - "auto_paint_shops", - "auto_service_shops", - "automated_cash_disburse", - "automated_fuel_dispensers", - "automobile_associations", - "automotive_parts_and_accessories_stores", - "automotive_tire_stores", - "bail_and_bond_payments", - "bakeries", - "bands_orchestras", - "barber_and_beauty_shops", - "betting_casino_gambling", - "bicycle_shops", - "billiard_pool_establishments", - "boat_dealers", - "boat_rentals_and_leases", - "book_stores", - "books_periodicals_and_newspapers", - "bowling_alleys", - "bus_lines", - "business_secretarial_schools", - "buying_shopping_services", - "cable_satellite_and_other_pay_television_and_radio", - "camera_and_photographic_supply_stores", - "candy_nut_and_confectionery_stores", - "car_and_truck_dealers_new_used", - "car_and_truck_dealers_used_only", - "car_rental_agencies", - "car_washes", - "carpentry_services", - "carpet_upholstery_cleaning", - "caterers", - "charitable_and_social_service_organizations_fundraising", - "chemicals_and_allied_products", - "child_care_services", - "childrens_and_infants_wear_stores", - "chiropodists_podiatrists", - "chiropractors", - "cigar_stores_and_stands", - "civic_social_fraternal_associations", - "cleaning_and_maintenance", - "clothing_rental", - "colleges_universities", - "commercial_equipment", - "commercial_footwear", - "commercial_photography_art_and_graphics", - "commuter_transport_and_ferries", - "computer_network_services", - "computer_programming", - "computer_repair", - "computer_software_stores", - "computers_peripherals_and_software", - "concrete_work_services", - "construction_materials", - "consulting_public_relations", - "correspondence_schools", - "cosmetic_stores", - "counseling_services", - "country_clubs", - "courier_services", - "court_costs", - "credit_reporting_agencies", - "cruise_lines", - "dairy_products_stores", - "dance_hall_studios_schools", - "dating_escort_services", - "dentists_orthodontists", - "department_stores", - "detective_agencies", - "digital_goods_applications", - "digital_goods_games", - "digital_goods_large_volume", - "digital_goods_media", - "direct_marketing_catalog_merchant", - "direct_marketing_combination_catalog_and_retail_merchant", - "direct_marketing_inbound_telemarketing", - "direct_marketing_insurance_services", - "direct_marketing_other", - "direct_marketing_outbound_telemarketing", - "direct_marketing_subscription", - "direct_marketing_travel", - "discount_stores", - "doctors", - "door_to_door_sales", - "drapery_window_covering_and_upholstery_stores", - "drinking_places", - "drug_stores_and_pharmacies", - "drugs_drug_proprietaries_and_druggist_sundries", - "dry_cleaners", - "durable_goods", - "duty_free_stores", - "eating_places_restaurants", - "educational_services", - "electric_razor_stores", - "electric_vehicle_charging", - "electrical_parts_and_equipment", - "electrical_services", - "electronics_repair_shops", - "electronics_stores", - "elementary_secondary_schools", - "emergency_services_gcas_visa_use_only", - "employment_temp_agencies", - "equipment_rental", - "exterminating_services", - "family_clothing_stores", - "fast_food_restaurants", - "financial_institutions", - "fines_government_administrative_entities", - "fireplace_fireplace_screens_and_accessories_stores", - "floor_covering_stores", - "florists", - "florists_supplies_nursery_stock_and_flowers", - "freezer_and_locker_meat_provisioners", - "fuel_dealers_non_automotive", - "funeral_services_crematories", - "furniture_home_furnishings_and_equipment_stores_except_appliances", - "furniture_repair_refinishing", - "furriers_and_fur_shops", - "general_services", - "gift_card_novelty_and_souvenir_shops", - "glass_paint_and_wallpaper_stores", - "glassware_crystal_stores", - "golf_courses_public", - "government_licensed_horse_dog_racing_us_region_only", - "government_licensed_online_casions_online_gambling_us_region_only", - "government_owned_lotteries_non_us_region", - "government_owned_lotteries_us_region_only", - "government_services", - "grocery_stores_supermarkets", - "hardware_equipment_and_supplies", - "hardware_stores", - "health_and_beauty_spas", - "hearing_aids_sales_and_supplies", - "heating_plumbing_a_c", - "hobby_toy_and_game_shops", - "home_supply_warehouse_stores", - "hospitals", - "hotels_motels_and_resorts", - "household_appliance_stores", - "industrial_supplies", - "information_retrieval_services", - "insurance_default", - "insurance_underwriting_premiums", - "intra_company_purchases", - "jewelry_stores_watches_clocks_and_silverware_stores", - "landscaping_services", - "laundries", - "laundry_cleaning_services", - "legal_services_attorneys", - "luggage_and_leather_goods_stores", - "lumber_building_materials_stores", - "manual_cash_disburse", - "marinas_service_and_supplies", - "marketplaces", - "masonry_stonework_and_plaster", - "massage_parlors", - "medical_and_dental_labs", - "medical_dental_ophthalmic_and_hospital_equipment_and_supplies", - "medical_services", - "membership_organizations", - "mens_and_boys_clothing_and_accessories_stores", - "mens_womens_clothing_stores", - "metal_service_centers", - "miscellaneous", - "miscellaneous_apparel_and_accessory_shops", - "miscellaneous_auto_dealers", - "miscellaneous_business_services", - "miscellaneous_food_stores", - "miscellaneous_general_merchandise", - "miscellaneous_general_services", - "miscellaneous_home_furnishing_specialty_stores", - "miscellaneous_publishing_and_printing", - "miscellaneous_recreation_services", - "miscellaneous_repair_shops", - "miscellaneous_specialty_retail", - "mobile_home_dealers", - "motion_picture_theaters", - "motor_freight_carriers_and_trucking", - "motor_homes_dealers", - "motor_vehicle_supplies_and_new_parts", - "motorcycle_shops_and_dealers", - "motorcycle_shops_dealers", - "music_stores_musical_instruments_pianos_and_sheet_music", - "news_dealers_and_newsstands", - "non_fi_money_orders", - "non_fi_stored_value_card_purchase_load", - "nondurable_goods", - "nurseries_lawn_and_garden_supply_stores", - "nursing_personal_care", - "office_and_commercial_furniture", - "opticians_eyeglasses", - "optometrists_ophthalmologist", - "orthopedic_goods_prosthetic_devices", - "osteopaths", - "package_stores_beer_wine_and_liquor", - "paints_varnishes_and_supplies", - "parking_lots_garages", - "passenger_railways", - "pawn_shops", - "pet_shops_pet_food_and_supplies", - "petroleum_and_petroleum_products", - "photo_developing", - "photographic_photocopy_microfilm_equipment_and_supplies", - "photographic_studios", - "picture_video_production", - "piece_goods_notions_and_other_dry_goods", - "plumbing_heating_equipment_and_supplies", - "political_organizations", - "postal_services_government_only", - "precious_stones_and_metals_watches_and_jewelry", - "professional_services", - "public_warehousing_and_storage", - "quick_copy_repro_and_blueprint", - "railroads", - "real_estate_agents_and_managers_rentals", - "record_stores", - "recreational_vehicle_rentals", - "religious_goods_stores", - "religious_organizations", - "roofing_siding_sheet_metal", - "secretarial_support_services", - "security_brokers_dealers", - "service_stations", - "sewing_needlework_fabric_and_piece_goods_stores", - "shoe_repair_hat_cleaning", - "shoe_stores", - "small_appliance_repair", - "snowmobile_dealers", - "special_trade_services", - "specialty_cleaning", - "sporting_goods_stores", - "sporting_recreation_camps", - "sports_and_riding_apparel_stores", - "sports_clubs_fields", - "stamp_and_coin_stores", - "stationary_office_supplies_printing_and_writing_paper", - "stationery_stores_office_and_school_supply_stores", - "swimming_pools_sales", - "t_ui_travel_germany", - "tailors_alterations", - "tax_payments_government_agencies", - "tax_preparation_services", - "taxicabs_limousines", - "telecommunication_equipment_and_telephone_sales", - "telecommunication_services", - "telegraph_services", - "tent_and_awning_shops", - "testing_laboratories", - "theatrical_ticket_agencies", - "timeshares", - "tire_retreading_and_repair", - "tolls_bridge_fees", - "tourist_attractions_and_exhibits", - "towing_services", - "trailer_parks_campgrounds", - "transportation_services", - "travel_agencies_tour_operators", - "truck_stop_iteration", - "truck_utility_trailer_rentals", - "typesetting_plate_making_and_related_services", - "typewriter_stores", - "u_s_federal_government_agencies_or_departments", - "uniforms_commercial_clothing", - "used_merchandise_and_secondhand_stores", - "utilities", - "variety_stores", - "veterinary_services", - "video_amusement_game_supplies", - "video_game_arcades", - "video_tape_rental_stores", - "vocational_trade_schools", - "watch_jewelry_repair", - "welding_repair", - "wholesale_clubs", - "wig_and_toupee_stores", - "wires_money_orders", - "womens_accessory_and_specialty_shops", - "womens_ready_to_wear_stores", - "wrecking_and_salvage_yards", - ] - ] - ] - """ - Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories. - """ - interval: Literal[ - "all_time", - "daily", - "monthly", - "per_authorization", - "weekly", - "yearly", - ] - """ - Interval (or event) to which the amount applies. - """ - - class ListParams(RequestOptions): - created: NotRequired["Cardholder.ListParamsCreated|int"] - """ - Only return cardholders that were created during the given date interval. - """ - email: NotRequired[str] - """ - Only return cardholders that have the given email address. - """ - 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. - """ - phone_number: NotRequired[str] - """ - Only return cardholders that have the given phone number. - """ - 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. - """ - status: NotRequired[Literal["active", "blocked", "inactive"]] - """ - Only return cardholders that have the given status. One of `active`, `inactive`, or `blocked`. - """ - type: NotRequired[Literal["company", "individual"]] - """ - Only return cardholders that have the given type. One of `individual` or `company`. - """ - - class ListParamsCreated(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) - """ - - class ModifyParams(RequestOptions): - billing: NotRequired["Cardholder.ModifyParamsBilling"] - """ - The cardholder's billing address. - """ - company: NotRequired["Cardholder.ModifyParamsCompany"] - """ - Additional information about a `company` cardholder. - """ - email: NotRequired[str] - """ - The cardholder's email address. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - individual: NotRequired["Cardholder.ModifyParamsIndividual"] - """ - Additional information about an `individual` cardholder. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - phone_number: NotRequired[str] - """ - The cardholder's phone number. This is required for all cardholders who will be creating EU cards. See the [3D Secure documentation](https://stripe.com/docs/issuing/3d-secure) for more details. - """ - preferred_locales: NotRequired[ - List[Literal["de", "en", "es", "fr", "it"]] - ] - """ - The cardholder's preferred locales (languages), ordered by preference. Locales can be `de`, `en`, `es`, `fr`, or `it`. - This changes the language of the [3D Secure flow](https://stripe.com/docs/issuing/3d-secure) and one-time password messages sent to the cardholder. - """ - spending_controls: NotRequired[ - "Cardholder.ModifyParamsSpendingControls" - ] - """ - Rules that control spending across this cardholder's cards. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details. - """ - status: NotRequired[Literal["active", "inactive"]] - """ - Specifies whether to permit authorizations on this cardholder's cards. - """ - - class ModifyParamsBilling(TypedDict): - address: "Cardholder.ModifyParamsBillingAddress" - """ - The cardholder's billing address. - """ - - class ModifyParamsBillingAddress(TypedDict): - city: 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: 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: str - """ - ZIP or postal code. - """ - state: NotRequired[str] - """ - State, county, province, or region. - """ - - class ModifyParamsCompany(TypedDict): - tax_id: NotRequired[str] - """ - The entity's business ID number. - """ - - class ModifyParamsIndividual(TypedDict): - card_issuing: NotRequired[ - "Cardholder.ModifyParamsIndividualCardIssuing" - ] - """ - Information related to the card_issuing program for this cardholder. - """ - dob: NotRequired["Cardholder.ModifyParamsIndividualDob"] - """ - The date of birth of this cardholder. Cardholders must be older than 13 years old. - """ - first_name: NotRequired[str] - """ - The first name of this cardholder. Required before activating Cards. This field cannot contain any numbers, special characters (except periods, commas, hyphens, spaces and apostrophes) or non-latin letters. - """ - last_name: NotRequired[str] - """ - The last name of this cardholder. Required before activating Cards. This field cannot contain any numbers, special characters (except periods, commas, hyphens, spaces and apostrophes) or non-latin letters. - """ - verification: NotRequired[ - "Cardholder.ModifyParamsIndividualVerification" - ] - """ - Government-issued ID document for this cardholder. - """ - - class ModifyParamsIndividualCardIssuing(TypedDict): - user_terms_acceptance: NotRequired[ - "Cardholder.ModifyParamsIndividualCardIssuingUserTermsAcceptance" - ] - """ - Information about cardholder acceptance of Celtic [Authorized User Terms](https://stripe.com/docs/issuing/cards#accept-authorized-user-terms). Required for cards backed by a Celtic program. - """ - - class ModifyParamsIndividualCardIssuingUserTermsAcceptance(TypedDict): - date: NotRequired[int] - """ - The Unix timestamp marking when the cardholder accepted the Authorized User Terms. Required for Celtic Spend Card users. - """ - ip: NotRequired[str] - """ - The IP address from which the cardholder accepted the Authorized User Terms. Required for Celtic Spend Card users. - """ - user_agent: NotRequired["Literal['']|str"] - """ - The user agent of the browser from which the cardholder accepted the Authorized User Terms. - """ - - class ModifyParamsIndividualDob(TypedDict): - day: int - """ - The day of birth, between 1 and 31. - """ - month: int - """ - The month of birth, between 1 and 12. - """ - year: int - """ - The four-digit year of birth. - """ - - class ModifyParamsIndividualVerification(TypedDict): - document: NotRequired[ - "Cardholder.ModifyParamsIndividualVerificationDocument" - ] - """ - An identifying document, either a passport or local ID card. - """ - - class ModifyParamsIndividualVerificationDocument(TypedDict): - back: NotRequired[str] - """ - The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. - """ - front: NotRequired[str] - """ - The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. - """ - - class ModifyParamsSpendingControls(TypedDict): - allowed_categories: NotRequired[ - List[ - Literal[ - "ac_refrigeration_repair", - "accounting_bookkeeping_services", - "advertising_services", - "agricultural_cooperative", - "airlines_air_carriers", - "airports_flying_fields", - "ambulance_services", - "amusement_parks_carnivals", - "antique_reproductions", - "antique_shops", - "aquariums", - "architectural_surveying_services", - "art_dealers_and_galleries", - "artists_supply_and_craft_shops", - "auto_and_home_supply_stores", - "auto_body_repair_shops", - "auto_paint_shops", - "auto_service_shops", - "automated_cash_disburse", - "automated_fuel_dispensers", - "automobile_associations", - "automotive_parts_and_accessories_stores", - "automotive_tire_stores", - "bail_and_bond_payments", - "bakeries", - "bands_orchestras", - "barber_and_beauty_shops", - "betting_casino_gambling", - "bicycle_shops", - "billiard_pool_establishments", - "boat_dealers", - "boat_rentals_and_leases", - "book_stores", - "books_periodicals_and_newspapers", - "bowling_alleys", - "bus_lines", - "business_secretarial_schools", - "buying_shopping_services", - "cable_satellite_and_other_pay_television_and_radio", - "camera_and_photographic_supply_stores", - "candy_nut_and_confectionery_stores", - "car_and_truck_dealers_new_used", - "car_and_truck_dealers_used_only", - "car_rental_agencies", - "car_washes", - "carpentry_services", - "carpet_upholstery_cleaning", - "caterers", - "charitable_and_social_service_organizations_fundraising", - "chemicals_and_allied_products", - "child_care_services", - "childrens_and_infants_wear_stores", - "chiropodists_podiatrists", - "chiropractors", - "cigar_stores_and_stands", - "civic_social_fraternal_associations", - "cleaning_and_maintenance", - "clothing_rental", - "colleges_universities", - "commercial_equipment", - "commercial_footwear", - "commercial_photography_art_and_graphics", - "commuter_transport_and_ferries", - "computer_network_services", - "computer_programming", - "computer_repair", - "computer_software_stores", - "computers_peripherals_and_software", - "concrete_work_services", - "construction_materials", - "consulting_public_relations", - "correspondence_schools", - "cosmetic_stores", - "counseling_services", - "country_clubs", - "courier_services", - "court_costs", - "credit_reporting_agencies", - "cruise_lines", - "dairy_products_stores", - "dance_hall_studios_schools", - "dating_escort_services", - "dentists_orthodontists", - "department_stores", - "detective_agencies", - "digital_goods_applications", - "digital_goods_games", - "digital_goods_large_volume", - "digital_goods_media", - "direct_marketing_catalog_merchant", - "direct_marketing_combination_catalog_and_retail_merchant", - "direct_marketing_inbound_telemarketing", - "direct_marketing_insurance_services", - "direct_marketing_other", - "direct_marketing_outbound_telemarketing", - "direct_marketing_subscription", - "direct_marketing_travel", - "discount_stores", - "doctors", - "door_to_door_sales", - "drapery_window_covering_and_upholstery_stores", - "drinking_places", - "drug_stores_and_pharmacies", - "drugs_drug_proprietaries_and_druggist_sundries", - "dry_cleaners", - "durable_goods", - "duty_free_stores", - "eating_places_restaurants", - "educational_services", - "electric_razor_stores", - "electric_vehicle_charging", - "electrical_parts_and_equipment", - "electrical_services", - "electronics_repair_shops", - "electronics_stores", - "elementary_secondary_schools", - "emergency_services_gcas_visa_use_only", - "employment_temp_agencies", - "equipment_rental", - "exterminating_services", - "family_clothing_stores", - "fast_food_restaurants", - "financial_institutions", - "fines_government_administrative_entities", - "fireplace_fireplace_screens_and_accessories_stores", - "floor_covering_stores", - "florists", - "florists_supplies_nursery_stock_and_flowers", - "freezer_and_locker_meat_provisioners", - "fuel_dealers_non_automotive", - "funeral_services_crematories", - "furniture_home_furnishings_and_equipment_stores_except_appliances", - "furniture_repair_refinishing", - "furriers_and_fur_shops", - "general_services", - "gift_card_novelty_and_souvenir_shops", - "glass_paint_and_wallpaper_stores", - "glassware_crystal_stores", - "golf_courses_public", - "government_licensed_horse_dog_racing_us_region_only", - "government_licensed_online_casions_online_gambling_us_region_only", - "government_owned_lotteries_non_us_region", - "government_owned_lotteries_us_region_only", - "government_services", - "grocery_stores_supermarkets", - "hardware_equipment_and_supplies", - "hardware_stores", - "health_and_beauty_spas", - "hearing_aids_sales_and_supplies", - "heating_plumbing_a_c", - "hobby_toy_and_game_shops", - "home_supply_warehouse_stores", - "hospitals", - "hotels_motels_and_resorts", - "household_appliance_stores", - "industrial_supplies", - "information_retrieval_services", - "insurance_default", - "insurance_underwriting_premiums", - "intra_company_purchases", - "jewelry_stores_watches_clocks_and_silverware_stores", - "landscaping_services", - "laundries", - "laundry_cleaning_services", - "legal_services_attorneys", - "luggage_and_leather_goods_stores", - "lumber_building_materials_stores", - "manual_cash_disburse", - "marinas_service_and_supplies", - "marketplaces", - "masonry_stonework_and_plaster", - "massage_parlors", - "medical_and_dental_labs", - "medical_dental_ophthalmic_and_hospital_equipment_and_supplies", - "medical_services", - "membership_organizations", - "mens_and_boys_clothing_and_accessories_stores", - "mens_womens_clothing_stores", - "metal_service_centers", - "miscellaneous", - "miscellaneous_apparel_and_accessory_shops", - "miscellaneous_auto_dealers", - "miscellaneous_business_services", - "miscellaneous_food_stores", - "miscellaneous_general_merchandise", - "miscellaneous_general_services", - "miscellaneous_home_furnishing_specialty_stores", - "miscellaneous_publishing_and_printing", - "miscellaneous_recreation_services", - "miscellaneous_repair_shops", - "miscellaneous_specialty_retail", - "mobile_home_dealers", - "motion_picture_theaters", - "motor_freight_carriers_and_trucking", - "motor_homes_dealers", - "motor_vehicle_supplies_and_new_parts", - "motorcycle_shops_and_dealers", - "motorcycle_shops_dealers", - "music_stores_musical_instruments_pianos_and_sheet_music", - "news_dealers_and_newsstands", - "non_fi_money_orders", - "non_fi_stored_value_card_purchase_load", - "nondurable_goods", - "nurseries_lawn_and_garden_supply_stores", - "nursing_personal_care", - "office_and_commercial_furniture", - "opticians_eyeglasses", - "optometrists_ophthalmologist", - "orthopedic_goods_prosthetic_devices", - "osteopaths", - "package_stores_beer_wine_and_liquor", - "paints_varnishes_and_supplies", - "parking_lots_garages", - "passenger_railways", - "pawn_shops", - "pet_shops_pet_food_and_supplies", - "petroleum_and_petroleum_products", - "photo_developing", - "photographic_photocopy_microfilm_equipment_and_supplies", - "photographic_studios", - "picture_video_production", - "piece_goods_notions_and_other_dry_goods", - "plumbing_heating_equipment_and_supplies", - "political_organizations", - "postal_services_government_only", - "precious_stones_and_metals_watches_and_jewelry", - "professional_services", - "public_warehousing_and_storage", - "quick_copy_repro_and_blueprint", - "railroads", - "real_estate_agents_and_managers_rentals", - "record_stores", - "recreational_vehicle_rentals", - "religious_goods_stores", - "religious_organizations", - "roofing_siding_sheet_metal", - "secretarial_support_services", - "security_brokers_dealers", - "service_stations", - "sewing_needlework_fabric_and_piece_goods_stores", - "shoe_repair_hat_cleaning", - "shoe_stores", - "small_appliance_repair", - "snowmobile_dealers", - "special_trade_services", - "specialty_cleaning", - "sporting_goods_stores", - "sporting_recreation_camps", - "sports_and_riding_apparel_stores", - "sports_clubs_fields", - "stamp_and_coin_stores", - "stationary_office_supplies_printing_and_writing_paper", - "stationery_stores_office_and_school_supply_stores", - "swimming_pools_sales", - "t_ui_travel_germany", - "tailors_alterations", - "tax_payments_government_agencies", - "tax_preparation_services", - "taxicabs_limousines", - "telecommunication_equipment_and_telephone_sales", - "telecommunication_services", - "telegraph_services", - "tent_and_awning_shops", - "testing_laboratories", - "theatrical_ticket_agencies", - "timeshares", - "tire_retreading_and_repair", - "tolls_bridge_fees", - "tourist_attractions_and_exhibits", - "towing_services", - "trailer_parks_campgrounds", - "transportation_services", - "travel_agencies_tour_operators", - "truck_stop_iteration", - "truck_utility_trailer_rentals", - "typesetting_plate_making_and_related_services", - "typewriter_stores", - "u_s_federal_government_agencies_or_departments", - "uniforms_commercial_clothing", - "used_merchandise_and_secondhand_stores", - "utilities", - "variety_stores", - "veterinary_services", - "video_amusement_game_supplies", - "video_game_arcades", - "video_tape_rental_stores", - "vocational_trade_schools", - "watch_jewelry_repair", - "welding_repair", - "wholesale_clubs", - "wig_and_toupee_stores", - "wires_money_orders", - "womens_accessory_and_specialty_shops", - "womens_ready_to_wear_stores", - "wrecking_and_salvage_yards", - ] - ] - ] - """ - Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to allow. All other categories will be blocked. Cannot be set with `blocked_categories`. - """ - allowed_merchant_countries: NotRequired[List[str]] - """ - Array of strings containing representing countries from which authorizations will be allowed. Authorizations from merchants in all other countries will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `blocked_merchant_countries`. Provide an empty value to unset this control. - """ - blocked_categories: NotRequired[ - List[ - Literal[ - "ac_refrigeration_repair", - "accounting_bookkeeping_services", - "advertising_services", - "agricultural_cooperative", - "airlines_air_carriers", - "airports_flying_fields", - "ambulance_services", - "amusement_parks_carnivals", - "antique_reproductions", - "antique_shops", - "aquariums", - "architectural_surveying_services", - "art_dealers_and_galleries", - "artists_supply_and_craft_shops", - "auto_and_home_supply_stores", - "auto_body_repair_shops", - "auto_paint_shops", - "auto_service_shops", - "automated_cash_disburse", - "automated_fuel_dispensers", - "automobile_associations", - "automotive_parts_and_accessories_stores", - "automotive_tire_stores", - "bail_and_bond_payments", - "bakeries", - "bands_orchestras", - "barber_and_beauty_shops", - "betting_casino_gambling", - "bicycle_shops", - "billiard_pool_establishments", - "boat_dealers", - "boat_rentals_and_leases", - "book_stores", - "books_periodicals_and_newspapers", - "bowling_alleys", - "bus_lines", - "business_secretarial_schools", - "buying_shopping_services", - "cable_satellite_and_other_pay_television_and_radio", - "camera_and_photographic_supply_stores", - "candy_nut_and_confectionery_stores", - "car_and_truck_dealers_new_used", - "car_and_truck_dealers_used_only", - "car_rental_agencies", - "car_washes", - "carpentry_services", - "carpet_upholstery_cleaning", - "caterers", - "charitable_and_social_service_organizations_fundraising", - "chemicals_and_allied_products", - "child_care_services", - "childrens_and_infants_wear_stores", - "chiropodists_podiatrists", - "chiropractors", - "cigar_stores_and_stands", - "civic_social_fraternal_associations", - "cleaning_and_maintenance", - "clothing_rental", - "colleges_universities", - "commercial_equipment", - "commercial_footwear", - "commercial_photography_art_and_graphics", - "commuter_transport_and_ferries", - "computer_network_services", - "computer_programming", - "computer_repair", - "computer_software_stores", - "computers_peripherals_and_software", - "concrete_work_services", - "construction_materials", - "consulting_public_relations", - "correspondence_schools", - "cosmetic_stores", - "counseling_services", - "country_clubs", - "courier_services", - "court_costs", - "credit_reporting_agencies", - "cruise_lines", - "dairy_products_stores", - "dance_hall_studios_schools", - "dating_escort_services", - "dentists_orthodontists", - "department_stores", - "detective_agencies", - "digital_goods_applications", - "digital_goods_games", - "digital_goods_large_volume", - "digital_goods_media", - "direct_marketing_catalog_merchant", - "direct_marketing_combination_catalog_and_retail_merchant", - "direct_marketing_inbound_telemarketing", - "direct_marketing_insurance_services", - "direct_marketing_other", - "direct_marketing_outbound_telemarketing", - "direct_marketing_subscription", - "direct_marketing_travel", - "discount_stores", - "doctors", - "door_to_door_sales", - "drapery_window_covering_and_upholstery_stores", - "drinking_places", - "drug_stores_and_pharmacies", - "drugs_drug_proprietaries_and_druggist_sundries", - "dry_cleaners", - "durable_goods", - "duty_free_stores", - "eating_places_restaurants", - "educational_services", - "electric_razor_stores", - "electric_vehicle_charging", - "electrical_parts_and_equipment", - "electrical_services", - "electronics_repair_shops", - "electronics_stores", - "elementary_secondary_schools", - "emergency_services_gcas_visa_use_only", - "employment_temp_agencies", - "equipment_rental", - "exterminating_services", - "family_clothing_stores", - "fast_food_restaurants", - "financial_institutions", - "fines_government_administrative_entities", - "fireplace_fireplace_screens_and_accessories_stores", - "floor_covering_stores", - "florists", - "florists_supplies_nursery_stock_and_flowers", - "freezer_and_locker_meat_provisioners", - "fuel_dealers_non_automotive", - "funeral_services_crematories", - "furniture_home_furnishings_and_equipment_stores_except_appliances", - "furniture_repair_refinishing", - "furriers_and_fur_shops", - "general_services", - "gift_card_novelty_and_souvenir_shops", - "glass_paint_and_wallpaper_stores", - "glassware_crystal_stores", - "golf_courses_public", - "government_licensed_horse_dog_racing_us_region_only", - "government_licensed_online_casions_online_gambling_us_region_only", - "government_owned_lotteries_non_us_region", - "government_owned_lotteries_us_region_only", - "government_services", - "grocery_stores_supermarkets", - "hardware_equipment_and_supplies", - "hardware_stores", - "health_and_beauty_spas", - "hearing_aids_sales_and_supplies", - "heating_plumbing_a_c", - "hobby_toy_and_game_shops", - "home_supply_warehouse_stores", - "hospitals", - "hotels_motels_and_resorts", - "household_appliance_stores", - "industrial_supplies", - "information_retrieval_services", - "insurance_default", - "insurance_underwriting_premiums", - "intra_company_purchases", - "jewelry_stores_watches_clocks_and_silverware_stores", - "landscaping_services", - "laundries", - "laundry_cleaning_services", - "legal_services_attorneys", - "luggage_and_leather_goods_stores", - "lumber_building_materials_stores", - "manual_cash_disburse", - "marinas_service_and_supplies", - "marketplaces", - "masonry_stonework_and_plaster", - "massage_parlors", - "medical_and_dental_labs", - "medical_dental_ophthalmic_and_hospital_equipment_and_supplies", - "medical_services", - "membership_organizations", - "mens_and_boys_clothing_and_accessories_stores", - "mens_womens_clothing_stores", - "metal_service_centers", - "miscellaneous", - "miscellaneous_apparel_and_accessory_shops", - "miscellaneous_auto_dealers", - "miscellaneous_business_services", - "miscellaneous_food_stores", - "miscellaneous_general_merchandise", - "miscellaneous_general_services", - "miscellaneous_home_furnishing_specialty_stores", - "miscellaneous_publishing_and_printing", - "miscellaneous_recreation_services", - "miscellaneous_repair_shops", - "miscellaneous_specialty_retail", - "mobile_home_dealers", - "motion_picture_theaters", - "motor_freight_carriers_and_trucking", - "motor_homes_dealers", - "motor_vehicle_supplies_and_new_parts", - "motorcycle_shops_and_dealers", - "motorcycle_shops_dealers", - "music_stores_musical_instruments_pianos_and_sheet_music", - "news_dealers_and_newsstands", - "non_fi_money_orders", - "non_fi_stored_value_card_purchase_load", - "nondurable_goods", - "nurseries_lawn_and_garden_supply_stores", - "nursing_personal_care", - "office_and_commercial_furniture", - "opticians_eyeglasses", - "optometrists_ophthalmologist", - "orthopedic_goods_prosthetic_devices", - "osteopaths", - "package_stores_beer_wine_and_liquor", - "paints_varnishes_and_supplies", - "parking_lots_garages", - "passenger_railways", - "pawn_shops", - "pet_shops_pet_food_and_supplies", - "petroleum_and_petroleum_products", - "photo_developing", - "photographic_photocopy_microfilm_equipment_and_supplies", - "photographic_studios", - "picture_video_production", - "piece_goods_notions_and_other_dry_goods", - "plumbing_heating_equipment_and_supplies", - "political_organizations", - "postal_services_government_only", - "precious_stones_and_metals_watches_and_jewelry", - "professional_services", - "public_warehousing_and_storage", - "quick_copy_repro_and_blueprint", - "railroads", - "real_estate_agents_and_managers_rentals", - "record_stores", - "recreational_vehicle_rentals", - "religious_goods_stores", - "religious_organizations", - "roofing_siding_sheet_metal", - "secretarial_support_services", - "security_brokers_dealers", - "service_stations", - "sewing_needlework_fabric_and_piece_goods_stores", - "shoe_repair_hat_cleaning", - "shoe_stores", - "small_appliance_repair", - "snowmobile_dealers", - "special_trade_services", - "specialty_cleaning", - "sporting_goods_stores", - "sporting_recreation_camps", - "sports_and_riding_apparel_stores", - "sports_clubs_fields", - "stamp_and_coin_stores", - "stationary_office_supplies_printing_and_writing_paper", - "stationery_stores_office_and_school_supply_stores", - "swimming_pools_sales", - "t_ui_travel_germany", - "tailors_alterations", - "tax_payments_government_agencies", - "tax_preparation_services", - "taxicabs_limousines", - "telecommunication_equipment_and_telephone_sales", - "telecommunication_services", - "telegraph_services", - "tent_and_awning_shops", - "testing_laboratories", - "theatrical_ticket_agencies", - "timeshares", - "tire_retreading_and_repair", - "tolls_bridge_fees", - "tourist_attractions_and_exhibits", - "towing_services", - "trailer_parks_campgrounds", - "transportation_services", - "travel_agencies_tour_operators", - "truck_stop_iteration", - "truck_utility_trailer_rentals", - "typesetting_plate_making_and_related_services", - "typewriter_stores", - "u_s_federal_government_agencies_or_departments", - "uniforms_commercial_clothing", - "used_merchandise_and_secondhand_stores", - "utilities", - "variety_stores", - "veterinary_services", - "video_amusement_game_supplies", - "video_game_arcades", - "video_tape_rental_stores", - "vocational_trade_schools", - "watch_jewelry_repair", - "welding_repair", - "wholesale_clubs", - "wig_and_toupee_stores", - "wires_money_orders", - "womens_accessory_and_specialty_shops", - "womens_ready_to_wear_stores", - "wrecking_and_salvage_yards", - ] - ] - ] - """ - Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to decline. All other categories will be allowed. Cannot be set with `allowed_categories`. - """ - blocked_merchant_countries: NotRequired[List[str]] - """ - Array of strings containing representing countries from which authorizations will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `allowed_merchant_countries`. Provide an empty value to unset this control. - """ - spending_limits: NotRequired[ - List["Cardholder.ModifyParamsSpendingControlsSpendingLimit"] - ] - """ - Limit spending with amount-based rules that apply across this cardholder's cards. - """ - spending_limits_currency: NotRequired[str] - """ - Currency of amounts within `spending_limits`. Defaults to your merchant country's currency. - """ - - class ModifyParamsSpendingControlsSpendingLimit(TypedDict): - amount: int - """ - Maximum amount allowed to spend per interval. - """ - categories: NotRequired[ - List[ - Literal[ - "ac_refrigeration_repair", - "accounting_bookkeeping_services", - "advertising_services", - "agricultural_cooperative", - "airlines_air_carriers", - "airports_flying_fields", - "ambulance_services", - "amusement_parks_carnivals", - "antique_reproductions", - "antique_shops", - "aquariums", - "architectural_surveying_services", - "art_dealers_and_galleries", - "artists_supply_and_craft_shops", - "auto_and_home_supply_stores", - "auto_body_repair_shops", - "auto_paint_shops", - "auto_service_shops", - "automated_cash_disburse", - "automated_fuel_dispensers", - "automobile_associations", - "automotive_parts_and_accessories_stores", - "automotive_tire_stores", - "bail_and_bond_payments", - "bakeries", - "bands_orchestras", - "barber_and_beauty_shops", - "betting_casino_gambling", - "bicycle_shops", - "billiard_pool_establishments", - "boat_dealers", - "boat_rentals_and_leases", - "book_stores", - "books_periodicals_and_newspapers", - "bowling_alleys", - "bus_lines", - "business_secretarial_schools", - "buying_shopping_services", - "cable_satellite_and_other_pay_television_and_radio", - "camera_and_photographic_supply_stores", - "candy_nut_and_confectionery_stores", - "car_and_truck_dealers_new_used", - "car_and_truck_dealers_used_only", - "car_rental_agencies", - "car_washes", - "carpentry_services", - "carpet_upholstery_cleaning", - "caterers", - "charitable_and_social_service_organizations_fundraising", - "chemicals_and_allied_products", - "child_care_services", - "childrens_and_infants_wear_stores", - "chiropodists_podiatrists", - "chiropractors", - "cigar_stores_and_stands", - "civic_social_fraternal_associations", - "cleaning_and_maintenance", - "clothing_rental", - "colleges_universities", - "commercial_equipment", - "commercial_footwear", - "commercial_photography_art_and_graphics", - "commuter_transport_and_ferries", - "computer_network_services", - "computer_programming", - "computer_repair", - "computer_software_stores", - "computers_peripherals_and_software", - "concrete_work_services", - "construction_materials", - "consulting_public_relations", - "correspondence_schools", - "cosmetic_stores", - "counseling_services", - "country_clubs", - "courier_services", - "court_costs", - "credit_reporting_agencies", - "cruise_lines", - "dairy_products_stores", - "dance_hall_studios_schools", - "dating_escort_services", - "dentists_orthodontists", - "department_stores", - "detective_agencies", - "digital_goods_applications", - "digital_goods_games", - "digital_goods_large_volume", - "digital_goods_media", - "direct_marketing_catalog_merchant", - "direct_marketing_combination_catalog_and_retail_merchant", - "direct_marketing_inbound_telemarketing", - "direct_marketing_insurance_services", - "direct_marketing_other", - "direct_marketing_outbound_telemarketing", - "direct_marketing_subscription", - "direct_marketing_travel", - "discount_stores", - "doctors", - "door_to_door_sales", - "drapery_window_covering_and_upholstery_stores", - "drinking_places", - "drug_stores_and_pharmacies", - "drugs_drug_proprietaries_and_druggist_sundries", - "dry_cleaners", - "durable_goods", - "duty_free_stores", - "eating_places_restaurants", - "educational_services", - "electric_razor_stores", - "electric_vehicle_charging", - "electrical_parts_and_equipment", - "electrical_services", - "electronics_repair_shops", - "electronics_stores", - "elementary_secondary_schools", - "emergency_services_gcas_visa_use_only", - "employment_temp_agencies", - "equipment_rental", - "exterminating_services", - "family_clothing_stores", - "fast_food_restaurants", - "financial_institutions", - "fines_government_administrative_entities", - "fireplace_fireplace_screens_and_accessories_stores", - "floor_covering_stores", - "florists", - "florists_supplies_nursery_stock_and_flowers", - "freezer_and_locker_meat_provisioners", - "fuel_dealers_non_automotive", - "funeral_services_crematories", - "furniture_home_furnishings_and_equipment_stores_except_appliances", - "furniture_repair_refinishing", - "furriers_and_fur_shops", - "general_services", - "gift_card_novelty_and_souvenir_shops", - "glass_paint_and_wallpaper_stores", - "glassware_crystal_stores", - "golf_courses_public", - "government_licensed_horse_dog_racing_us_region_only", - "government_licensed_online_casions_online_gambling_us_region_only", - "government_owned_lotteries_non_us_region", - "government_owned_lotteries_us_region_only", - "government_services", - "grocery_stores_supermarkets", - "hardware_equipment_and_supplies", - "hardware_stores", - "health_and_beauty_spas", - "hearing_aids_sales_and_supplies", - "heating_plumbing_a_c", - "hobby_toy_and_game_shops", - "home_supply_warehouse_stores", - "hospitals", - "hotels_motels_and_resorts", - "household_appliance_stores", - "industrial_supplies", - "information_retrieval_services", - "insurance_default", - "insurance_underwriting_premiums", - "intra_company_purchases", - "jewelry_stores_watches_clocks_and_silverware_stores", - "landscaping_services", - "laundries", - "laundry_cleaning_services", - "legal_services_attorneys", - "luggage_and_leather_goods_stores", - "lumber_building_materials_stores", - "manual_cash_disburse", - "marinas_service_and_supplies", - "marketplaces", - "masonry_stonework_and_plaster", - "massage_parlors", - "medical_and_dental_labs", - "medical_dental_ophthalmic_and_hospital_equipment_and_supplies", - "medical_services", - "membership_organizations", - "mens_and_boys_clothing_and_accessories_stores", - "mens_womens_clothing_stores", - "metal_service_centers", - "miscellaneous", - "miscellaneous_apparel_and_accessory_shops", - "miscellaneous_auto_dealers", - "miscellaneous_business_services", - "miscellaneous_food_stores", - "miscellaneous_general_merchandise", - "miscellaneous_general_services", - "miscellaneous_home_furnishing_specialty_stores", - "miscellaneous_publishing_and_printing", - "miscellaneous_recreation_services", - "miscellaneous_repair_shops", - "miscellaneous_specialty_retail", - "mobile_home_dealers", - "motion_picture_theaters", - "motor_freight_carriers_and_trucking", - "motor_homes_dealers", - "motor_vehicle_supplies_and_new_parts", - "motorcycle_shops_and_dealers", - "motorcycle_shops_dealers", - "music_stores_musical_instruments_pianos_and_sheet_music", - "news_dealers_and_newsstands", - "non_fi_money_orders", - "non_fi_stored_value_card_purchase_load", - "nondurable_goods", - "nurseries_lawn_and_garden_supply_stores", - "nursing_personal_care", - "office_and_commercial_furniture", - "opticians_eyeglasses", - "optometrists_ophthalmologist", - "orthopedic_goods_prosthetic_devices", - "osteopaths", - "package_stores_beer_wine_and_liquor", - "paints_varnishes_and_supplies", - "parking_lots_garages", - "passenger_railways", - "pawn_shops", - "pet_shops_pet_food_and_supplies", - "petroleum_and_petroleum_products", - "photo_developing", - "photographic_photocopy_microfilm_equipment_and_supplies", - "photographic_studios", - "picture_video_production", - "piece_goods_notions_and_other_dry_goods", - "plumbing_heating_equipment_and_supplies", - "political_organizations", - "postal_services_government_only", - "precious_stones_and_metals_watches_and_jewelry", - "professional_services", - "public_warehousing_and_storage", - "quick_copy_repro_and_blueprint", - "railroads", - "real_estate_agents_and_managers_rentals", - "record_stores", - "recreational_vehicle_rentals", - "religious_goods_stores", - "religious_organizations", - "roofing_siding_sheet_metal", - "secretarial_support_services", - "security_brokers_dealers", - "service_stations", - "sewing_needlework_fabric_and_piece_goods_stores", - "shoe_repair_hat_cleaning", - "shoe_stores", - "small_appliance_repair", - "snowmobile_dealers", - "special_trade_services", - "specialty_cleaning", - "sporting_goods_stores", - "sporting_recreation_camps", - "sports_and_riding_apparel_stores", - "sports_clubs_fields", - "stamp_and_coin_stores", - "stationary_office_supplies_printing_and_writing_paper", - "stationery_stores_office_and_school_supply_stores", - "swimming_pools_sales", - "t_ui_travel_germany", - "tailors_alterations", - "tax_payments_government_agencies", - "tax_preparation_services", - "taxicabs_limousines", - "telecommunication_equipment_and_telephone_sales", - "telecommunication_services", - "telegraph_services", - "tent_and_awning_shops", - "testing_laboratories", - "theatrical_ticket_agencies", - "timeshares", - "tire_retreading_and_repair", - "tolls_bridge_fees", - "tourist_attractions_and_exhibits", - "towing_services", - "trailer_parks_campgrounds", - "transportation_services", - "travel_agencies_tour_operators", - "truck_stop_iteration", - "truck_utility_trailer_rentals", - "typesetting_plate_making_and_related_services", - "typewriter_stores", - "u_s_federal_government_agencies_or_departments", - "uniforms_commercial_clothing", - "used_merchandise_and_secondhand_stores", - "utilities", - "variety_stores", - "veterinary_services", - "video_amusement_game_supplies", - "video_game_arcades", - "video_tape_rental_stores", - "vocational_trade_schools", - "watch_jewelry_repair", - "welding_repair", - "wholesale_clubs", - "wig_and_toupee_stores", - "wires_money_orders", - "womens_accessory_and_specialty_shops", - "womens_ready_to_wear_stores", - "wrecking_and_salvage_yards", - ] - ] - ] - """ - Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories. - """ - interval: Literal[ - "all_time", - "daily", - "monthly", - "per_authorization", - "weekly", - "yearly", - ] - """ - Interval (or event) to which the amount applies. - """ - - class RetrieveParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - billing: Billing company: Optional[Company] """ @@ -3489,7 +1195,7 @@ class RetrieveParams(RequestOptions): @classmethod def create( - cls, **params: Unpack["Cardholder.CreateParams"] + cls, **params: Unpack["CardholderCreateParams"] ) -> "Cardholder": """ Creates a new Issuing Cardholder object that can be issued cards. @@ -3505,7 +1211,7 @@ def create( @classmethod async def create_async( - cls, **params: Unpack["Cardholder.CreateParams"] + cls, **params: Unpack["CardholderCreateParams"] ) -> "Cardholder": """ Creates a new Issuing Cardholder object that can be issued cards. @@ -3521,7 +1227,7 @@ async def create_async( @classmethod def list( - cls, **params: Unpack["Cardholder.ListParams"] + cls, **params: Unpack["CardholderListParams"] ) -> ListObject["Cardholder"]: """ Returns a list of Issuing Cardholder objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first. @@ -3541,7 +1247,7 @@ def list( @classmethod async def list_async( - cls, **params: Unpack["Cardholder.ListParams"] + cls, **params: Unpack["CardholderListParams"] ) -> ListObject["Cardholder"]: """ Returns a list of Issuing Cardholder objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first. @@ -3561,7 +1267,7 @@ async def list_async( @classmethod def modify( - cls, id: str, **params: Unpack["Cardholder.ModifyParams"] + cls, id: str, **params: Unpack["CardholderModifyParams"] ) -> "Cardholder": """ Updates the specified Issuing Cardholder object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. @@ -3578,7 +1284,7 @@ def modify( @classmethod async def modify_async( - cls, id: str, **params: Unpack["Cardholder.ModifyParams"] + cls, id: str, **params: Unpack["CardholderModifyParams"] ) -> "Cardholder": """ Updates the specified Issuing Cardholder object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. @@ -3595,7 +1301,7 @@ async def modify_async( @classmethod def retrieve( - cls, id: str, **params: Unpack["Cardholder.RetrieveParams"] + cls, id: str, **params: Unpack["CardholderRetrieveParams"] ) -> "Cardholder": """ Retrieves an Issuing Cardholder object. @@ -3606,7 +1312,7 @@ def retrieve( @classmethod async def retrieve_async( - cls, id: str, **params: Unpack["Cardholder.RetrieveParams"] + cls, id: str, **params: Unpack["CardholderRetrieveParams"] ) -> "Cardholder": """ Retrieves an Issuing Cardholder object. diff --git a/stripe/issuing/_cardholder_service.py b/stripe/issuing/_cardholder_service.py index da1e37a78..3ca7ae92a 100644 --- a/stripe/issuing/_cardholder_service.py +++ b/stripe/issuing/_cardholder_service.py @@ -5,2313 +5,28 @@ from stripe._stripe_service import StripeService from stripe._util import sanitize_id from stripe.issuing._cardholder import Cardholder -from typing import Dict, List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params.issuing._cardholder_create_params import ( + CardholderCreateParams, + ) + from stripe.params.issuing._cardholder_list_params import ( + CardholderListParams, + ) + from stripe.params.issuing._cardholder_retrieve_params import ( + CardholderRetrieveParams, + ) + from stripe.params.issuing._cardholder_update_params import ( + CardholderUpdateParams, + ) class CardholderService(StripeService): - class CreateParams(TypedDict): - billing: "CardholderService.CreateParamsBilling" - """ - The cardholder's billing address. - """ - company: NotRequired["CardholderService.CreateParamsCompany"] - """ - Additional information about a `company` cardholder. - """ - email: NotRequired[str] - """ - The cardholder's email address. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - individual: NotRequired["CardholderService.CreateParamsIndividual"] - """ - Additional information about an `individual` cardholder. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - name: str - """ - The cardholder's name. This will be printed on cards issued to them. The maximum length of this field is 24 characters. This field cannot contain any special characters or numbers. - """ - phone_number: NotRequired[str] - """ - The cardholder's phone number. This will be transformed to [E.164](https://en.wikipedia.org/wiki/E.164) if it is not provided in that format already. This is required for all cardholders who will be creating EU cards. - While phone number is optional if the cardholder will not be creating EU cards, note that this cardholder will not be eligible for 3DS without a phone number. See the [3D Secure documentation](https://stripe.com/docs/issuing/3d-secure#when-is-3d-secure-applied) for more details. - """ - preferred_locales: NotRequired[ - List[Literal["de", "en", "es", "fr", "it"]] - ] - """ - The cardholder's preferred locales (languages), ordered by preference. Locales can be `de`, `en`, `es`, `fr`, or `it`. - This changes the language of the [3D Secure flow](https://stripe.com/docs/issuing/3d-secure) and one-time password messages sent to the cardholder. - """ - spending_controls: NotRequired[ - "CardholderService.CreateParamsSpendingControls" - ] - """ - Rules that control spending across this cardholder's cards. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details. - """ - status: NotRequired[Literal["active", "inactive"]] - """ - Specifies whether to permit authorizations on this cardholder's cards. Defaults to `active`. - """ - type: NotRequired[Literal["company", "individual"]] - """ - One of `individual` or `company`. See [Choose a cardholder type](https://stripe.com/docs/issuing/other/choose-cardholder) for more details. - """ - - class CreateParamsBilling(TypedDict): - address: "CardholderService.CreateParamsBillingAddress" - """ - The cardholder's billing address. - """ - - class CreateParamsBillingAddress(TypedDict): - city: 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: 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: str - """ - ZIP or postal code. - """ - state: NotRequired[str] - """ - State, county, province, or region. - """ - - class CreateParamsCompany(TypedDict): - tax_id: NotRequired[str] - """ - The entity's business ID number. - """ - - class CreateParamsIndividual(TypedDict): - card_issuing: NotRequired[ - "CardholderService.CreateParamsIndividualCardIssuing" - ] - """ - Information related to the card_issuing program for this cardholder. - """ - dob: NotRequired["CardholderService.CreateParamsIndividualDob"] - """ - The date of birth of this cardholder. Cardholders must be older than 13 years old. - """ - first_name: NotRequired[str] - """ - The first name of this cardholder. Required before activating Cards. This field cannot contain any numbers, special characters (except periods, commas, hyphens, spaces and apostrophes) or non-latin letters. - """ - last_name: NotRequired[str] - """ - The last name of this cardholder. Required before activating Cards. This field cannot contain any numbers, special characters (except periods, commas, hyphens, spaces and apostrophes) or non-latin letters. - """ - verification: NotRequired[ - "CardholderService.CreateParamsIndividualVerification" - ] - """ - Government-issued ID document for this cardholder. - """ - - class CreateParamsIndividualCardIssuing(TypedDict): - user_terms_acceptance: NotRequired[ - "CardholderService.CreateParamsIndividualCardIssuingUserTermsAcceptance" - ] - """ - Information about cardholder acceptance of Celtic [Authorized User Terms](https://stripe.com/docs/issuing/cards#accept-authorized-user-terms). Required for cards backed by a Celtic program. - """ - - class CreateParamsIndividualCardIssuingUserTermsAcceptance(TypedDict): - date: NotRequired[int] - """ - The Unix timestamp marking when the cardholder accepted the Authorized User Terms. Required for Celtic Spend Card users. - """ - ip: NotRequired[str] - """ - The IP address from which the cardholder accepted the Authorized User Terms. Required for Celtic Spend Card users. - """ - user_agent: NotRequired["Literal['']|str"] - """ - The user agent of the browser from which the cardholder accepted the Authorized User Terms. - """ - - class CreateParamsIndividualDob(TypedDict): - day: int - """ - The day of birth, between 1 and 31. - """ - month: int - """ - The month of birth, between 1 and 12. - """ - year: int - """ - The four-digit year of birth. - """ - - class CreateParamsIndividualVerification(TypedDict): - document: NotRequired[ - "CardholderService.CreateParamsIndividualVerificationDocument" - ] - """ - An identifying document, either a passport or local ID card. - """ - - class CreateParamsIndividualVerificationDocument(TypedDict): - back: NotRequired[str] - """ - The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. - """ - front: NotRequired[str] - """ - The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. - """ - - class CreateParamsSpendingControls(TypedDict): - allowed_categories: NotRequired[ - List[ - Literal[ - "ac_refrigeration_repair", - "accounting_bookkeeping_services", - "advertising_services", - "agricultural_cooperative", - "airlines_air_carriers", - "airports_flying_fields", - "ambulance_services", - "amusement_parks_carnivals", - "antique_reproductions", - "antique_shops", - "aquariums", - "architectural_surveying_services", - "art_dealers_and_galleries", - "artists_supply_and_craft_shops", - "auto_and_home_supply_stores", - "auto_body_repair_shops", - "auto_paint_shops", - "auto_service_shops", - "automated_cash_disburse", - "automated_fuel_dispensers", - "automobile_associations", - "automotive_parts_and_accessories_stores", - "automotive_tire_stores", - "bail_and_bond_payments", - "bakeries", - "bands_orchestras", - "barber_and_beauty_shops", - "betting_casino_gambling", - "bicycle_shops", - "billiard_pool_establishments", - "boat_dealers", - "boat_rentals_and_leases", - "book_stores", - "books_periodicals_and_newspapers", - "bowling_alleys", - "bus_lines", - "business_secretarial_schools", - "buying_shopping_services", - "cable_satellite_and_other_pay_television_and_radio", - "camera_and_photographic_supply_stores", - "candy_nut_and_confectionery_stores", - "car_and_truck_dealers_new_used", - "car_and_truck_dealers_used_only", - "car_rental_agencies", - "car_washes", - "carpentry_services", - "carpet_upholstery_cleaning", - "caterers", - "charitable_and_social_service_organizations_fundraising", - "chemicals_and_allied_products", - "child_care_services", - "childrens_and_infants_wear_stores", - "chiropodists_podiatrists", - "chiropractors", - "cigar_stores_and_stands", - "civic_social_fraternal_associations", - "cleaning_and_maintenance", - "clothing_rental", - "colleges_universities", - "commercial_equipment", - "commercial_footwear", - "commercial_photography_art_and_graphics", - "commuter_transport_and_ferries", - "computer_network_services", - "computer_programming", - "computer_repair", - "computer_software_stores", - "computers_peripherals_and_software", - "concrete_work_services", - "construction_materials", - "consulting_public_relations", - "correspondence_schools", - "cosmetic_stores", - "counseling_services", - "country_clubs", - "courier_services", - "court_costs", - "credit_reporting_agencies", - "cruise_lines", - "dairy_products_stores", - "dance_hall_studios_schools", - "dating_escort_services", - "dentists_orthodontists", - "department_stores", - "detective_agencies", - "digital_goods_applications", - "digital_goods_games", - "digital_goods_large_volume", - "digital_goods_media", - "direct_marketing_catalog_merchant", - "direct_marketing_combination_catalog_and_retail_merchant", - "direct_marketing_inbound_telemarketing", - "direct_marketing_insurance_services", - "direct_marketing_other", - "direct_marketing_outbound_telemarketing", - "direct_marketing_subscription", - "direct_marketing_travel", - "discount_stores", - "doctors", - "door_to_door_sales", - "drapery_window_covering_and_upholstery_stores", - "drinking_places", - "drug_stores_and_pharmacies", - "drugs_drug_proprietaries_and_druggist_sundries", - "dry_cleaners", - "durable_goods", - "duty_free_stores", - "eating_places_restaurants", - "educational_services", - "electric_razor_stores", - "electric_vehicle_charging", - "electrical_parts_and_equipment", - "electrical_services", - "electronics_repair_shops", - "electronics_stores", - "elementary_secondary_schools", - "emergency_services_gcas_visa_use_only", - "employment_temp_agencies", - "equipment_rental", - "exterminating_services", - "family_clothing_stores", - "fast_food_restaurants", - "financial_institutions", - "fines_government_administrative_entities", - "fireplace_fireplace_screens_and_accessories_stores", - "floor_covering_stores", - "florists", - "florists_supplies_nursery_stock_and_flowers", - "freezer_and_locker_meat_provisioners", - "fuel_dealers_non_automotive", - "funeral_services_crematories", - "furniture_home_furnishings_and_equipment_stores_except_appliances", - "furniture_repair_refinishing", - "furriers_and_fur_shops", - "general_services", - "gift_card_novelty_and_souvenir_shops", - "glass_paint_and_wallpaper_stores", - "glassware_crystal_stores", - "golf_courses_public", - "government_licensed_horse_dog_racing_us_region_only", - "government_licensed_online_casions_online_gambling_us_region_only", - "government_owned_lotteries_non_us_region", - "government_owned_lotteries_us_region_only", - "government_services", - "grocery_stores_supermarkets", - "hardware_equipment_and_supplies", - "hardware_stores", - "health_and_beauty_spas", - "hearing_aids_sales_and_supplies", - "heating_plumbing_a_c", - "hobby_toy_and_game_shops", - "home_supply_warehouse_stores", - "hospitals", - "hotels_motels_and_resorts", - "household_appliance_stores", - "industrial_supplies", - "information_retrieval_services", - "insurance_default", - "insurance_underwriting_premiums", - "intra_company_purchases", - "jewelry_stores_watches_clocks_and_silverware_stores", - "landscaping_services", - "laundries", - "laundry_cleaning_services", - "legal_services_attorneys", - "luggage_and_leather_goods_stores", - "lumber_building_materials_stores", - "manual_cash_disburse", - "marinas_service_and_supplies", - "marketplaces", - "masonry_stonework_and_plaster", - "massage_parlors", - "medical_and_dental_labs", - "medical_dental_ophthalmic_and_hospital_equipment_and_supplies", - "medical_services", - "membership_organizations", - "mens_and_boys_clothing_and_accessories_stores", - "mens_womens_clothing_stores", - "metal_service_centers", - "miscellaneous", - "miscellaneous_apparel_and_accessory_shops", - "miscellaneous_auto_dealers", - "miscellaneous_business_services", - "miscellaneous_food_stores", - "miscellaneous_general_merchandise", - "miscellaneous_general_services", - "miscellaneous_home_furnishing_specialty_stores", - "miscellaneous_publishing_and_printing", - "miscellaneous_recreation_services", - "miscellaneous_repair_shops", - "miscellaneous_specialty_retail", - "mobile_home_dealers", - "motion_picture_theaters", - "motor_freight_carriers_and_trucking", - "motor_homes_dealers", - "motor_vehicle_supplies_and_new_parts", - "motorcycle_shops_and_dealers", - "motorcycle_shops_dealers", - "music_stores_musical_instruments_pianos_and_sheet_music", - "news_dealers_and_newsstands", - "non_fi_money_orders", - "non_fi_stored_value_card_purchase_load", - "nondurable_goods", - "nurseries_lawn_and_garden_supply_stores", - "nursing_personal_care", - "office_and_commercial_furniture", - "opticians_eyeglasses", - "optometrists_ophthalmologist", - "orthopedic_goods_prosthetic_devices", - "osteopaths", - "package_stores_beer_wine_and_liquor", - "paints_varnishes_and_supplies", - "parking_lots_garages", - "passenger_railways", - "pawn_shops", - "pet_shops_pet_food_and_supplies", - "petroleum_and_petroleum_products", - "photo_developing", - "photographic_photocopy_microfilm_equipment_and_supplies", - "photographic_studios", - "picture_video_production", - "piece_goods_notions_and_other_dry_goods", - "plumbing_heating_equipment_and_supplies", - "political_organizations", - "postal_services_government_only", - "precious_stones_and_metals_watches_and_jewelry", - "professional_services", - "public_warehousing_and_storage", - "quick_copy_repro_and_blueprint", - "railroads", - "real_estate_agents_and_managers_rentals", - "record_stores", - "recreational_vehicle_rentals", - "religious_goods_stores", - "religious_organizations", - "roofing_siding_sheet_metal", - "secretarial_support_services", - "security_brokers_dealers", - "service_stations", - "sewing_needlework_fabric_and_piece_goods_stores", - "shoe_repair_hat_cleaning", - "shoe_stores", - "small_appliance_repair", - "snowmobile_dealers", - "special_trade_services", - "specialty_cleaning", - "sporting_goods_stores", - "sporting_recreation_camps", - "sports_and_riding_apparel_stores", - "sports_clubs_fields", - "stamp_and_coin_stores", - "stationary_office_supplies_printing_and_writing_paper", - "stationery_stores_office_and_school_supply_stores", - "swimming_pools_sales", - "t_ui_travel_germany", - "tailors_alterations", - "tax_payments_government_agencies", - "tax_preparation_services", - "taxicabs_limousines", - "telecommunication_equipment_and_telephone_sales", - "telecommunication_services", - "telegraph_services", - "tent_and_awning_shops", - "testing_laboratories", - "theatrical_ticket_agencies", - "timeshares", - "tire_retreading_and_repair", - "tolls_bridge_fees", - "tourist_attractions_and_exhibits", - "towing_services", - "trailer_parks_campgrounds", - "transportation_services", - "travel_agencies_tour_operators", - "truck_stop_iteration", - "truck_utility_trailer_rentals", - "typesetting_plate_making_and_related_services", - "typewriter_stores", - "u_s_federal_government_agencies_or_departments", - "uniforms_commercial_clothing", - "used_merchandise_and_secondhand_stores", - "utilities", - "variety_stores", - "veterinary_services", - "video_amusement_game_supplies", - "video_game_arcades", - "video_tape_rental_stores", - "vocational_trade_schools", - "watch_jewelry_repair", - "welding_repair", - "wholesale_clubs", - "wig_and_toupee_stores", - "wires_money_orders", - "womens_accessory_and_specialty_shops", - "womens_ready_to_wear_stores", - "wrecking_and_salvage_yards", - ] - ] - ] - """ - Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to allow. All other categories will be blocked. Cannot be set with `blocked_categories`. - """ - allowed_merchant_countries: NotRequired[List[str]] - """ - Array of strings containing representing countries from which authorizations will be allowed. Authorizations from merchants in all other countries will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `blocked_merchant_countries`. Provide an empty value to unset this control. - """ - blocked_categories: NotRequired[ - List[ - Literal[ - "ac_refrigeration_repair", - "accounting_bookkeeping_services", - "advertising_services", - "agricultural_cooperative", - "airlines_air_carriers", - "airports_flying_fields", - "ambulance_services", - "amusement_parks_carnivals", - "antique_reproductions", - "antique_shops", - "aquariums", - "architectural_surveying_services", - "art_dealers_and_galleries", - "artists_supply_and_craft_shops", - "auto_and_home_supply_stores", - "auto_body_repair_shops", - "auto_paint_shops", - "auto_service_shops", - "automated_cash_disburse", - "automated_fuel_dispensers", - "automobile_associations", - "automotive_parts_and_accessories_stores", - "automotive_tire_stores", - "bail_and_bond_payments", - "bakeries", - "bands_orchestras", - "barber_and_beauty_shops", - "betting_casino_gambling", - "bicycle_shops", - "billiard_pool_establishments", - "boat_dealers", - "boat_rentals_and_leases", - "book_stores", - "books_periodicals_and_newspapers", - "bowling_alleys", - "bus_lines", - "business_secretarial_schools", - "buying_shopping_services", - "cable_satellite_and_other_pay_television_and_radio", - "camera_and_photographic_supply_stores", - "candy_nut_and_confectionery_stores", - "car_and_truck_dealers_new_used", - "car_and_truck_dealers_used_only", - "car_rental_agencies", - "car_washes", - "carpentry_services", - "carpet_upholstery_cleaning", - "caterers", - "charitable_and_social_service_organizations_fundraising", - "chemicals_and_allied_products", - "child_care_services", - "childrens_and_infants_wear_stores", - "chiropodists_podiatrists", - "chiropractors", - "cigar_stores_and_stands", - "civic_social_fraternal_associations", - "cleaning_and_maintenance", - "clothing_rental", - "colleges_universities", - "commercial_equipment", - "commercial_footwear", - "commercial_photography_art_and_graphics", - "commuter_transport_and_ferries", - "computer_network_services", - "computer_programming", - "computer_repair", - "computer_software_stores", - "computers_peripherals_and_software", - "concrete_work_services", - "construction_materials", - "consulting_public_relations", - "correspondence_schools", - "cosmetic_stores", - "counseling_services", - "country_clubs", - "courier_services", - "court_costs", - "credit_reporting_agencies", - "cruise_lines", - "dairy_products_stores", - "dance_hall_studios_schools", - "dating_escort_services", - "dentists_orthodontists", - "department_stores", - "detective_agencies", - "digital_goods_applications", - "digital_goods_games", - "digital_goods_large_volume", - "digital_goods_media", - "direct_marketing_catalog_merchant", - "direct_marketing_combination_catalog_and_retail_merchant", - "direct_marketing_inbound_telemarketing", - "direct_marketing_insurance_services", - "direct_marketing_other", - "direct_marketing_outbound_telemarketing", - "direct_marketing_subscription", - "direct_marketing_travel", - "discount_stores", - "doctors", - "door_to_door_sales", - "drapery_window_covering_and_upholstery_stores", - "drinking_places", - "drug_stores_and_pharmacies", - "drugs_drug_proprietaries_and_druggist_sundries", - "dry_cleaners", - "durable_goods", - "duty_free_stores", - "eating_places_restaurants", - "educational_services", - "electric_razor_stores", - "electric_vehicle_charging", - "electrical_parts_and_equipment", - "electrical_services", - "electronics_repair_shops", - "electronics_stores", - "elementary_secondary_schools", - "emergency_services_gcas_visa_use_only", - "employment_temp_agencies", - "equipment_rental", - "exterminating_services", - "family_clothing_stores", - "fast_food_restaurants", - "financial_institutions", - "fines_government_administrative_entities", - "fireplace_fireplace_screens_and_accessories_stores", - "floor_covering_stores", - "florists", - "florists_supplies_nursery_stock_and_flowers", - "freezer_and_locker_meat_provisioners", - "fuel_dealers_non_automotive", - "funeral_services_crematories", - "furniture_home_furnishings_and_equipment_stores_except_appliances", - "furniture_repair_refinishing", - "furriers_and_fur_shops", - "general_services", - "gift_card_novelty_and_souvenir_shops", - "glass_paint_and_wallpaper_stores", - "glassware_crystal_stores", - "golf_courses_public", - "government_licensed_horse_dog_racing_us_region_only", - "government_licensed_online_casions_online_gambling_us_region_only", - "government_owned_lotteries_non_us_region", - "government_owned_lotteries_us_region_only", - "government_services", - "grocery_stores_supermarkets", - "hardware_equipment_and_supplies", - "hardware_stores", - "health_and_beauty_spas", - "hearing_aids_sales_and_supplies", - "heating_plumbing_a_c", - "hobby_toy_and_game_shops", - "home_supply_warehouse_stores", - "hospitals", - "hotels_motels_and_resorts", - "household_appliance_stores", - "industrial_supplies", - "information_retrieval_services", - "insurance_default", - "insurance_underwriting_premiums", - "intra_company_purchases", - "jewelry_stores_watches_clocks_and_silverware_stores", - "landscaping_services", - "laundries", - "laundry_cleaning_services", - "legal_services_attorneys", - "luggage_and_leather_goods_stores", - "lumber_building_materials_stores", - "manual_cash_disburse", - "marinas_service_and_supplies", - "marketplaces", - "masonry_stonework_and_plaster", - "massage_parlors", - "medical_and_dental_labs", - "medical_dental_ophthalmic_and_hospital_equipment_and_supplies", - "medical_services", - "membership_organizations", - "mens_and_boys_clothing_and_accessories_stores", - "mens_womens_clothing_stores", - "metal_service_centers", - "miscellaneous", - "miscellaneous_apparel_and_accessory_shops", - "miscellaneous_auto_dealers", - "miscellaneous_business_services", - "miscellaneous_food_stores", - "miscellaneous_general_merchandise", - "miscellaneous_general_services", - "miscellaneous_home_furnishing_specialty_stores", - "miscellaneous_publishing_and_printing", - "miscellaneous_recreation_services", - "miscellaneous_repair_shops", - "miscellaneous_specialty_retail", - "mobile_home_dealers", - "motion_picture_theaters", - "motor_freight_carriers_and_trucking", - "motor_homes_dealers", - "motor_vehicle_supplies_and_new_parts", - "motorcycle_shops_and_dealers", - "motorcycle_shops_dealers", - "music_stores_musical_instruments_pianos_and_sheet_music", - "news_dealers_and_newsstands", - "non_fi_money_orders", - "non_fi_stored_value_card_purchase_load", - "nondurable_goods", - "nurseries_lawn_and_garden_supply_stores", - "nursing_personal_care", - "office_and_commercial_furniture", - "opticians_eyeglasses", - "optometrists_ophthalmologist", - "orthopedic_goods_prosthetic_devices", - "osteopaths", - "package_stores_beer_wine_and_liquor", - "paints_varnishes_and_supplies", - "parking_lots_garages", - "passenger_railways", - "pawn_shops", - "pet_shops_pet_food_and_supplies", - "petroleum_and_petroleum_products", - "photo_developing", - "photographic_photocopy_microfilm_equipment_and_supplies", - "photographic_studios", - "picture_video_production", - "piece_goods_notions_and_other_dry_goods", - "plumbing_heating_equipment_and_supplies", - "political_organizations", - "postal_services_government_only", - "precious_stones_and_metals_watches_and_jewelry", - "professional_services", - "public_warehousing_and_storage", - "quick_copy_repro_and_blueprint", - "railroads", - "real_estate_agents_and_managers_rentals", - "record_stores", - "recreational_vehicle_rentals", - "religious_goods_stores", - "religious_organizations", - "roofing_siding_sheet_metal", - "secretarial_support_services", - "security_brokers_dealers", - "service_stations", - "sewing_needlework_fabric_and_piece_goods_stores", - "shoe_repair_hat_cleaning", - "shoe_stores", - "small_appliance_repair", - "snowmobile_dealers", - "special_trade_services", - "specialty_cleaning", - "sporting_goods_stores", - "sporting_recreation_camps", - "sports_and_riding_apparel_stores", - "sports_clubs_fields", - "stamp_and_coin_stores", - "stationary_office_supplies_printing_and_writing_paper", - "stationery_stores_office_and_school_supply_stores", - "swimming_pools_sales", - "t_ui_travel_germany", - "tailors_alterations", - "tax_payments_government_agencies", - "tax_preparation_services", - "taxicabs_limousines", - "telecommunication_equipment_and_telephone_sales", - "telecommunication_services", - "telegraph_services", - "tent_and_awning_shops", - "testing_laboratories", - "theatrical_ticket_agencies", - "timeshares", - "tire_retreading_and_repair", - "tolls_bridge_fees", - "tourist_attractions_and_exhibits", - "towing_services", - "trailer_parks_campgrounds", - "transportation_services", - "travel_agencies_tour_operators", - "truck_stop_iteration", - "truck_utility_trailer_rentals", - "typesetting_plate_making_and_related_services", - "typewriter_stores", - "u_s_federal_government_agencies_or_departments", - "uniforms_commercial_clothing", - "used_merchandise_and_secondhand_stores", - "utilities", - "variety_stores", - "veterinary_services", - "video_amusement_game_supplies", - "video_game_arcades", - "video_tape_rental_stores", - "vocational_trade_schools", - "watch_jewelry_repair", - "welding_repair", - "wholesale_clubs", - "wig_and_toupee_stores", - "wires_money_orders", - "womens_accessory_and_specialty_shops", - "womens_ready_to_wear_stores", - "wrecking_and_salvage_yards", - ] - ] - ] - """ - Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to decline. All other categories will be allowed. Cannot be set with `allowed_categories`. - """ - blocked_merchant_countries: NotRequired[List[str]] - """ - Array of strings containing representing countries from which authorizations will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `allowed_merchant_countries`. Provide an empty value to unset this control. - """ - spending_limits: NotRequired[ - List["CardholderService.CreateParamsSpendingControlsSpendingLimit"] - ] - """ - Limit spending with amount-based rules that apply across this cardholder's cards. - """ - spending_limits_currency: NotRequired[str] - """ - Currency of amounts within `spending_limits`. Defaults to your merchant country's currency. - """ - - class CreateParamsSpendingControlsSpendingLimit(TypedDict): - amount: int - """ - Maximum amount allowed to spend per interval. - """ - categories: NotRequired[ - List[ - Literal[ - "ac_refrigeration_repair", - "accounting_bookkeeping_services", - "advertising_services", - "agricultural_cooperative", - "airlines_air_carriers", - "airports_flying_fields", - "ambulance_services", - "amusement_parks_carnivals", - "antique_reproductions", - "antique_shops", - "aquariums", - "architectural_surveying_services", - "art_dealers_and_galleries", - "artists_supply_and_craft_shops", - "auto_and_home_supply_stores", - "auto_body_repair_shops", - "auto_paint_shops", - "auto_service_shops", - "automated_cash_disburse", - "automated_fuel_dispensers", - "automobile_associations", - "automotive_parts_and_accessories_stores", - "automotive_tire_stores", - "bail_and_bond_payments", - "bakeries", - "bands_orchestras", - "barber_and_beauty_shops", - "betting_casino_gambling", - "bicycle_shops", - "billiard_pool_establishments", - "boat_dealers", - "boat_rentals_and_leases", - "book_stores", - "books_periodicals_and_newspapers", - "bowling_alleys", - "bus_lines", - "business_secretarial_schools", - "buying_shopping_services", - "cable_satellite_and_other_pay_television_and_radio", - "camera_and_photographic_supply_stores", - "candy_nut_and_confectionery_stores", - "car_and_truck_dealers_new_used", - "car_and_truck_dealers_used_only", - "car_rental_agencies", - "car_washes", - "carpentry_services", - "carpet_upholstery_cleaning", - "caterers", - "charitable_and_social_service_organizations_fundraising", - "chemicals_and_allied_products", - "child_care_services", - "childrens_and_infants_wear_stores", - "chiropodists_podiatrists", - "chiropractors", - "cigar_stores_and_stands", - "civic_social_fraternal_associations", - "cleaning_and_maintenance", - "clothing_rental", - "colleges_universities", - "commercial_equipment", - "commercial_footwear", - "commercial_photography_art_and_graphics", - "commuter_transport_and_ferries", - "computer_network_services", - "computer_programming", - "computer_repair", - "computer_software_stores", - "computers_peripherals_and_software", - "concrete_work_services", - "construction_materials", - "consulting_public_relations", - "correspondence_schools", - "cosmetic_stores", - "counseling_services", - "country_clubs", - "courier_services", - "court_costs", - "credit_reporting_agencies", - "cruise_lines", - "dairy_products_stores", - "dance_hall_studios_schools", - "dating_escort_services", - "dentists_orthodontists", - "department_stores", - "detective_agencies", - "digital_goods_applications", - "digital_goods_games", - "digital_goods_large_volume", - "digital_goods_media", - "direct_marketing_catalog_merchant", - "direct_marketing_combination_catalog_and_retail_merchant", - "direct_marketing_inbound_telemarketing", - "direct_marketing_insurance_services", - "direct_marketing_other", - "direct_marketing_outbound_telemarketing", - "direct_marketing_subscription", - "direct_marketing_travel", - "discount_stores", - "doctors", - "door_to_door_sales", - "drapery_window_covering_and_upholstery_stores", - "drinking_places", - "drug_stores_and_pharmacies", - "drugs_drug_proprietaries_and_druggist_sundries", - "dry_cleaners", - "durable_goods", - "duty_free_stores", - "eating_places_restaurants", - "educational_services", - "electric_razor_stores", - "electric_vehicle_charging", - "electrical_parts_and_equipment", - "electrical_services", - "electronics_repair_shops", - "electronics_stores", - "elementary_secondary_schools", - "emergency_services_gcas_visa_use_only", - "employment_temp_agencies", - "equipment_rental", - "exterminating_services", - "family_clothing_stores", - "fast_food_restaurants", - "financial_institutions", - "fines_government_administrative_entities", - "fireplace_fireplace_screens_and_accessories_stores", - "floor_covering_stores", - "florists", - "florists_supplies_nursery_stock_and_flowers", - "freezer_and_locker_meat_provisioners", - "fuel_dealers_non_automotive", - "funeral_services_crematories", - "furniture_home_furnishings_and_equipment_stores_except_appliances", - "furniture_repair_refinishing", - "furriers_and_fur_shops", - "general_services", - "gift_card_novelty_and_souvenir_shops", - "glass_paint_and_wallpaper_stores", - "glassware_crystal_stores", - "golf_courses_public", - "government_licensed_horse_dog_racing_us_region_only", - "government_licensed_online_casions_online_gambling_us_region_only", - "government_owned_lotteries_non_us_region", - "government_owned_lotteries_us_region_only", - "government_services", - "grocery_stores_supermarkets", - "hardware_equipment_and_supplies", - "hardware_stores", - "health_and_beauty_spas", - "hearing_aids_sales_and_supplies", - "heating_plumbing_a_c", - "hobby_toy_and_game_shops", - "home_supply_warehouse_stores", - "hospitals", - "hotels_motels_and_resorts", - "household_appliance_stores", - "industrial_supplies", - "information_retrieval_services", - "insurance_default", - "insurance_underwriting_premiums", - "intra_company_purchases", - "jewelry_stores_watches_clocks_and_silverware_stores", - "landscaping_services", - "laundries", - "laundry_cleaning_services", - "legal_services_attorneys", - "luggage_and_leather_goods_stores", - "lumber_building_materials_stores", - "manual_cash_disburse", - "marinas_service_and_supplies", - "marketplaces", - "masonry_stonework_and_plaster", - "massage_parlors", - "medical_and_dental_labs", - "medical_dental_ophthalmic_and_hospital_equipment_and_supplies", - "medical_services", - "membership_organizations", - "mens_and_boys_clothing_and_accessories_stores", - "mens_womens_clothing_stores", - "metal_service_centers", - "miscellaneous", - "miscellaneous_apparel_and_accessory_shops", - "miscellaneous_auto_dealers", - "miscellaneous_business_services", - "miscellaneous_food_stores", - "miscellaneous_general_merchandise", - "miscellaneous_general_services", - "miscellaneous_home_furnishing_specialty_stores", - "miscellaneous_publishing_and_printing", - "miscellaneous_recreation_services", - "miscellaneous_repair_shops", - "miscellaneous_specialty_retail", - "mobile_home_dealers", - "motion_picture_theaters", - "motor_freight_carriers_and_trucking", - "motor_homes_dealers", - "motor_vehicle_supplies_and_new_parts", - "motorcycle_shops_and_dealers", - "motorcycle_shops_dealers", - "music_stores_musical_instruments_pianos_and_sheet_music", - "news_dealers_and_newsstands", - "non_fi_money_orders", - "non_fi_stored_value_card_purchase_load", - "nondurable_goods", - "nurseries_lawn_and_garden_supply_stores", - "nursing_personal_care", - "office_and_commercial_furniture", - "opticians_eyeglasses", - "optometrists_ophthalmologist", - "orthopedic_goods_prosthetic_devices", - "osteopaths", - "package_stores_beer_wine_and_liquor", - "paints_varnishes_and_supplies", - "parking_lots_garages", - "passenger_railways", - "pawn_shops", - "pet_shops_pet_food_and_supplies", - "petroleum_and_petroleum_products", - "photo_developing", - "photographic_photocopy_microfilm_equipment_and_supplies", - "photographic_studios", - "picture_video_production", - "piece_goods_notions_and_other_dry_goods", - "plumbing_heating_equipment_and_supplies", - "political_organizations", - "postal_services_government_only", - "precious_stones_and_metals_watches_and_jewelry", - "professional_services", - "public_warehousing_and_storage", - "quick_copy_repro_and_blueprint", - "railroads", - "real_estate_agents_and_managers_rentals", - "record_stores", - "recreational_vehicle_rentals", - "religious_goods_stores", - "religious_organizations", - "roofing_siding_sheet_metal", - "secretarial_support_services", - "security_brokers_dealers", - "service_stations", - "sewing_needlework_fabric_and_piece_goods_stores", - "shoe_repair_hat_cleaning", - "shoe_stores", - "small_appliance_repair", - "snowmobile_dealers", - "special_trade_services", - "specialty_cleaning", - "sporting_goods_stores", - "sporting_recreation_camps", - "sports_and_riding_apparel_stores", - "sports_clubs_fields", - "stamp_and_coin_stores", - "stationary_office_supplies_printing_and_writing_paper", - "stationery_stores_office_and_school_supply_stores", - "swimming_pools_sales", - "t_ui_travel_germany", - "tailors_alterations", - "tax_payments_government_agencies", - "tax_preparation_services", - "taxicabs_limousines", - "telecommunication_equipment_and_telephone_sales", - "telecommunication_services", - "telegraph_services", - "tent_and_awning_shops", - "testing_laboratories", - "theatrical_ticket_agencies", - "timeshares", - "tire_retreading_and_repair", - "tolls_bridge_fees", - "tourist_attractions_and_exhibits", - "towing_services", - "trailer_parks_campgrounds", - "transportation_services", - "travel_agencies_tour_operators", - "truck_stop_iteration", - "truck_utility_trailer_rentals", - "typesetting_plate_making_and_related_services", - "typewriter_stores", - "u_s_federal_government_agencies_or_departments", - "uniforms_commercial_clothing", - "used_merchandise_and_secondhand_stores", - "utilities", - "variety_stores", - "veterinary_services", - "video_amusement_game_supplies", - "video_game_arcades", - "video_tape_rental_stores", - "vocational_trade_schools", - "watch_jewelry_repair", - "welding_repair", - "wholesale_clubs", - "wig_and_toupee_stores", - "wires_money_orders", - "womens_accessory_and_specialty_shops", - "womens_ready_to_wear_stores", - "wrecking_and_salvage_yards", - ] - ] - ] - """ - Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories. - """ - interval: Literal[ - "all_time", - "daily", - "monthly", - "per_authorization", - "weekly", - "yearly", - ] - """ - Interval (or event) to which the amount applies. - """ - - class ListParams(TypedDict): - created: NotRequired["CardholderService.ListParamsCreated|int"] - """ - Only return cardholders that were created during the given date interval. - """ - email: NotRequired[str] - """ - Only return cardholders that have the given email address. - """ - 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. - """ - phone_number: NotRequired[str] - """ - Only return cardholders that have the given phone number. - """ - 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. - """ - status: NotRequired[Literal["active", "blocked", "inactive"]] - """ - Only return cardholders that have the given status. One of `active`, `inactive`, or `blocked`. - """ - type: NotRequired[Literal["company", "individual"]] - """ - Only return cardholders that have the given type. One of `individual` or `company`. - """ - - class ListParamsCreated(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) - """ - - class RetrieveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class UpdateParams(TypedDict): - billing: NotRequired["CardholderService.UpdateParamsBilling"] - """ - The cardholder's billing address. - """ - company: NotRequired["CardholderService.UpdateParamsCompany"] - """ - Additional information about a `company` cardholder. - """ - email: NotRequired[str] - """ - The cardholder's email address. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - individual: NotRequired["CardholderService.UpdateParamsIndividual"] - """ - Additional information about an `individual` cardholder. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - phone_number: NotRequired[str] - """ - The cardholder's phone number. This is required for all cardholders who will be creating EU cards. See the [3D Secure documentation](https://stripe.com/docs/issuing/3d-secure) for more details. - """ - preferred_locales: NotRequired[ - List[Literal["de", "en", "es", "fr", "it"]] - ] - """ - The cardholder's preferred locales (languages), ordered by preference. Locales can be `de`, `en`, `es`, `fr`, or `it`. - This changes the language of the [3D Secure flow](https://stripe.com/docs/issuing/3d-secure) and one-time password messages sent to the cardholder. - """ - spending_controls: NotRequired[ - "CardholderService.UpdateParamsSpendingControls" - ] - """ - Rules that control spending across this cardholder's cards. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details. - """ - status: NotRequired[Literal["active", "inactive"]] - """ - Specifies whether to permit authorizations on this cardholder's cards. - """ - - class UpdateParamsBilling(TypedDict): - address: "CardholderService.UpdateParamsBillingAddress" - """ - The cardholder's billing address. - """ - - class UpdateParamsBillingAddress(TypedDict): - city: 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: 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: str - """ - ZIP or postal code. - """ - state: NotRequired[str] - """ - State, county, province, or region. - """ - - class UpdateParamsCompany(TypedDict): - tax_id: NotRequired[str] - """ - The entity's business ID number. - """ - - class UpdateParamsIndividual(TypedDict): - card_issuing: NotRequired[ - "CardholderService.UpdateParamsIndividualCardIssuing" - ] - """ - Information related to the card_issuing program for this cardholder. - """ - dob: NotRequired["CardholderService.UpdateParamsIndividualDob"] - """ - The date of birth of this cardholder. Cardholders must be older than 13 years old. - """ - first_name: NotRequired[str] - """ - The first name of this cardholder. Required before activating Cards. This field cannot contain any numbers, special characters (except periods, commas, hyphens, spaces and apostrophes) or non-latin letters. - """ - last_name: NotRequired[str] - """ - The last name of this cardholder. Required before activating Cards. This field cannot contain any numbers, special characters (except periods, commas, hyphens, spaces and apostrophes) or non-latin letters. - """ - verification: NotRequired[ - "CardholderService.UpdateParamsIndividualVerification" - ] - """ - Government-issued ID document for this cardholder. - """ - - class UpdateParamsIndividualCardIssuing(TypedDict): - user_terms_acceptance: NotRequired[ - "CardholderService.UpdateParamsIndividualCardIssuingUserTermsAcceptance" - ] - """ - Information about cardholder acceptance of Celtic [Authorized User Terms](https://stripe.com/docs/issuing/cards#accept-authorized-user-terms). Required for cards backed by a Celtic program. - """ - - class UpdateParamsIndividualCardIssuingUserTermsAcceptance(TypedDict): - date: NotRequired[int] - """ - The Unix timestamp marking when the cardholder accepted the Authorized User Terms. Required for Celtic Spend Card users. - """ - ip: NotRequired[str] - """ - The IP address from which the cardholder accepted the Authorized User Terms. Required for Celtic Spend Card users. - """ - user_agent: NotRequired["Literal['']|str"] - """ - The user agent of the browser from which the cardholder accepted the Authorized User Terms. - """ - - class UpdateParamsIndividualDob(TypedDict): - day: int - """ - The day of birth, between 1 and 31. - """ - month: int - """ - The month of birth, between 1 and 12. - """ - year: int - """ - The four-digit year of birth. - """ - - class UpdateParamsIndividualVerification(TypedDict): - document: NotRequired[ - "CardholderService.UpdateParamsIndividualVerificationDocument" - ] - """ - An identifying document, either a passport or local ID card. - """ - - class UpdateParamsIndividualVerificationDocument(TypedDict): - back: NotRequired[str] - """ - The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. - """ - front: NotRequired[str] - """ - The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. - """ - - class UpdateParamsSpendingControls(TypedDict): - allowed_categories: NotRequired[ - List[ - Literal[ - "ac_refrigeration_repair", - "accounting_bookkeeping_services", - "advertising_services", - "agricultural_cooperative", - "airlines_air_carriers", - "airports_flying_fields", - "ambulance_services", - "amusement_parks_carnivals", - "antique_reproductions", - "antique_shops", - "aquariums", - "architectural_surveying_services", - "art_dealers_and_galleries", - "artists_supply_and_craft_shops", - "auto_and_home_supply_stores", - "auto_body_repair_shops", - "auto_paint_shops", - "auto_service_shops", - "automated_cash_disburse", - "automated_fuel_dispensers", - "automobile_associations", - "automotive_parts_and_accessories_stores", - "automotive_tire_stores", - "bail_and_bond_payments", - "bakeries", - "bands_orchestras", - "barber_and_beauty_shops", - "betting_casino_gambling", - "bicycle_shops", - "billiard_pool_establishments", - "boat_dealers", - "boat_rentals_and_leases", - "book_stores", - "books_periodicals_and_newspapers", - "bowling_alleys", - "bus_lines", - "business_secretarial_schools", - "buying_shopping_services", - "cable_satellite_and_other_pay_television_and_radio", - "camera_and_photographic_supply_stores", - "candy_nut_and_confectionery_stores", - "car_and_truck_dealers_new_used", - "car_and_truck_dealers_used_only", - "car_rental_agencies", - "car_washes", - "carpentry_services", - "carpet_upholstery_cleaning", - "caterers", - "charitable_and_social_service_organizations_fundraising", - "chemicals_and_allied_products", - "child_care_services", - "childrens_and_infants_wear_stores", - "chiropodists_podiatrists", - "chiropractors", - "cigar_stores_and_stands", - "civic_social_fraternal_associations", - "cleaning_and_maintenance", - "clothing_rental", - "colleges_universities", - "commercial_equipment", - "commercial_footwear", - "commercial_photography_art_and_graphics", - "commuter_transport_and_ferries", - "computer_network_services", - "computer_programming", - "computer_repair", - "computer_software_stores", - "computers_peripherals_and_software", - "concrete_work_services", - "construction_materials", - "consulting_public_relations", - "correspondence_schools", - "cosmetic_stores", - "counseling_services", - "country_clubs", - "courier_services", - "court_costs", - "credit_reporting_agencies", - "cruise_lines", - "dairy_products_stores", - "dance_hall_studios_schools", - "dating_escort_services", - "dentists_orthodontists", - "department_stores", - "detective_agencies", - "digital_goods_applications", - "digital_goods_games", - "digital_goods_large_volume", - "digital_goods_media", - "direct_marketing_catalog_merchant", - "direct_marketing_combination_catalog_and_retail_merchant", - "direct_marketing_inbound_telemarketing", - "direct_marketing_insurance_services", - "direct_marketing_other", - "direct_marketing_outbound_telemarketing", - "direct_marketing_subscription", - "direct_marketing_travel", - "discount_stores", - "doctors", - "door_to_door_sales", - "drapery_window_covering_and_upholstery_stores", - "drinking_places", - "drug_stores_and_pharmacies", - "drugs_drug_proprietaries_and_druggist_sundries", - "dry_cleaners", - "durable_goods", - "duty_free_stores", - "eating_places_restaurants", - "educational_services", - "electric_razor_stores", - "electric_vehicle_charging", - "electrical_parts_and_equipment", - "electrical_services", - "electronics_repair_shops", - "electronics_stores", - "elementary_secondary_schools", - "emergency_services_gcas_visa_use_only", - "employment_temp_agencies", - "equipment_rental", - "exterminating_services", - "family_clothing_stores", - "fast_food_restaurants", - "financial_institutions", - "fines_government_administrative_entities", - "fireplace_fireplace_screens_and_accessories_stores", - "floor_covering_stores", - "florists", - "florists_supplies_nursery_stock_and_flowers", - "freezer_and_locker_meat_provisioners", - "fuel_dealers_non_automotive", - "funeral_services_crematories", - "furniture_home_furnishings_and_equipment_stores_except_appliances", - "furniture_repair_refinishing", - "furriers_and_fur_shops", - "general_services", - "gift_card_novelty_and_souvenir_shops", - "glass_paint_and_wallpaper_stores", - "glassware_crystal_stores", - "golf_courses_public", - "government_licensed_horse_dog_racing_us_region_only", - "government_licensed_online_casions_online_gambling_us_region_only", - "government_owned_lotteries_non_us_region", - "government_owned_lotteries_us_region_only", - "government_services", - "grocery_stores_supermarkets", - "hardware_equipment_and_supplies", - "hardware_stores", - "health_and_beauty_spas", - "hearing_aids_sales_and_supplies", - "heating_plumbing_a_c", - "hobby_toy_and_game_shops", - "home_supply_warehouse_stores", - "hospitals", - "hotels_motels_and_resorts", - "household_appliance_stores", - "industrial_supplies", - "information_retrieval_services", - "insurance_default", - "insurance_underwriting_premiums", - "intra_company_purchases", - "jewelry_stores_watches_clocks_and_silverware_stores", - "landscaping_services", - "laundries", - "laundry_cleaning_services", - "legal_services_attorneys", - "luggage_and_leather_goods_stores", - "lumber_building_materials_stores", - "manual_cash_disburse", - "marinas_service_and_supplies", - "marketplaces", - "masonry_stonework_and_plaster", - "massage_parlors", - "medical_and_dental_labs", - "medical_dental_ophthalmic_and_hospital_equipment_and_supplies", - "medical_services", - "membership_organizations", - "mens_and_boys_clothing_and_accessories_stores", - "mens_womens_clothing_stores", - "metal_service_centers", - "miscellaneous", - "miscellaneous_apparel_and_accessory_shops", - "miscellaneous_auto_dealers", - "miscellaneous_business_services", - "miscellaneous_food_stores", - "miscellaneous_general_merchandise", - "miscellaneous_general_services", - "miscellaneous_home_furnishing_specialty_stores", - "miscellaneous_publishing_and_printing", - "miscellaneous_recreation_services", - "miscellaneous_repair_shops", - "miscellaneous_specialty_retail", - "mobile_home_dealers", - "motion_picture_theaters", - "motor_freight_carriers_and_trucking", - "motor_homes_dealers", - "motor_vehicle_supplies_and_new_parts", - "motorcycle_shops_and_dealers", - "motorcycle_shops_dealers", - "music_stores_musical_instruments_pianos_and_sheet_music", - "news_dealers_and_newsstands", - "non_fi_money_orders", - "non_fi_stored_value_card_purchase_load", - "nondurable_goods", - "nurseries_lawn_and_garden_supply_stores", - "nursing_personal_care", - "office_and_commercial_furniture", - "opticians_eyeglasses", - "optometrists_ophthalmologist", - "orthopedic_goods_prosthetic_devices", - "osteopaths", - "package_stores_beer_wine_and_liquor", - "paints_varnishes_and_supplies", - "parking_lots_garages", - "passenger_railways", - "pawn_shops", - "pet_shops_pet_food_and_supplies", - "petroleum_and_petroleum_products", - "photo_developing", - "photographic_photocopy_microfilm_equipment_and_supplies", - "photographic_studios", - "picture_video_production", - "piece_goods_notions_and_other_dry_goods", - "plumbing_heating_equipment_and_supplies", - "political_organizations", - "postal_services_government_only", - "precious_stones_and_metals_watches_and_jewelry", - "professional_services", - "public_warehousing_and_storage", - "quick_copy_repro_and_blueprint", - "railroads", - "real_estate_agents_and_managers_rentals", - "record_stores", - "recreational_vehicle_rentals", - "religious_goods_stores", - "religious_organizations", - "roofing_siding_sheet_metal", - "secretarial_support_services", - "security_brokers_dealers", - "service_stations", - "sewing_needlework_fabric_and_piece_goods_stores", - "shoe_repair_hat_cleaning", - "shoe_stores", - "small_appliance_repair", - "snowmobile_dealers", - "special_trade_services", - "specialty_cleaning", - "sporting_goods_stores", - "sporting_recreation_camps", - "sports_and_riding_apparel_stores", - "sports_clubs_fields", - "stamp_and_coin_stores", - "stationary_office_supplies_printing_and_writing_paper", - "stationery_stores_office_and_school_supply_stores", - "swimming_pools_sales", - "t_ui_travel_germany", - "tailors_alterations", - "tax_payments_government_agencies", - "tax_preparation_services", - "taxicabs_limousines", - "telecommunication_equipment_and_telephone_sales", - "telecommunication_services", - "telegraph_services", - "tent_and_awning_shops", - "testing_laboratories", - "theatrical_ticket_agencies", - "timeshares", - "tire_retreading_and_repair", - "tolls_bridge_fees", - "tourist_attractions_and_exhibits", - "towing_services", - "trailer_parks_campgrounds", - "transportation_services", - "travel_agencies_tour_operators", - "truck_stop_iteration", - "truck_utility_trailer_rentals", - "typesetting_plate_making_and_related_services", - "typewriter_stores", - "u_s_federal_government_agencies_or_departments", - "uniforms_commercial_clothing", - "used_merchandise_and_secondhand_stores", - "utilities", - "variety_stores", - "veterinary_services", - "video_amusement_game_supplies", - "video_game_arcades", - "video_tape_rental_stores", - "vocational_trade_schools", - "watch_jewelry_repair", - "welding_repair", - "wholesale_clubs", - "wig_and_toupee_stores", - "wires_money_orders", - "womens_accessory_and_specialty_shops", - "womens_ready_to_wear_stores", - "wrecking_and_salvage_yards", - ] - ] - ] - """ - Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to allow. All other categories will be blocked. Cannot be set with `blocked_categories`. - """ - allowed_merchant_countries: NotRequired[List[str]] - """ - Array of strings containing representing countries from which authorizations will be allowed. Authorizations from merchants in all other countries will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `blocked_merchant_countries`. Provide an empty value to unset this control. - """ - blocked_categories: NotRequired[ - List[ - Literal[ - "ac_refrigeration_repair", - "accounting_bookkeeping_services", - "advertising_services", - "agricultural_cooperative", - "airlines_air_carriers", - "airports_flying_fields", - "ambulance_services", - "amusement_parks_carnivals", - "antique_reproductions", - "antique_shops", - "aquariums", - "architectural_surveying_services", - "art_dealers_and_galleries", - "artists_supply_and_craft_shops", - "auto_and_home_supply_stores", - "auto_body_repair_shops", - "auto_paint_shops", - "auto_service_shops", - "automated_cash_disburse", - "automated_fuel_dispensers", - "automobile_associations", - "automotive_parts_and_accessories_stores", - "automotive_tire_stores", - "bail_and_bond_payments", - "bakeries", - "bands_orchestras", - "barber_and_beauty_shops", - "betting_casino_gambling", - "bicycle_shops", - "billiard_pool_establishments", - "boat_dealers", - "boat_rentals_and_leases", - "book_stores", - "books_periodicals_and_newspapers", - "bowling_alleys", - "bus_lines", - "business_secretarial_schools", - "buying_shopping_services", - "cable_satellite_and_other_pay_television_and_radio", - "camera_and_photographic_supply_stores", - "candy_nut_and_confectionery_stores", - "car_and_truck_dealers_new_used", - "car_and_truck_dealers_used_only", - "car_rental_agencies", - "car_washes", - "carpentry_services", - "carpet_upholstery_cleaning", - "caterers", - "charitable_and_social_service_organizations_fundraising", - "chemicals_and_allied_products", - "child_care_services", - "childrens_and_infants_wear_stores", - "chiropodists_podiatrists", - "chiropractors", - "cigar_stores_and_stands", - "civic_social_fraternal_associations", - "cleaning_and_maintenance", - "clothing_rental", - "colleges_universities", - "commercial_equipment", - "commercial_footwear", - "commercial_photography_art_and_graphics", - "commuter_transport_and_ferries", - "computer_network_services", - "computer_programming", - "computer_repair", - "computer_software_stores", - "computers_peripherals_and_software", - "concrete_work_services", - "construction_materials", - "consulting_public_relations", - "correspondence_schools", - "cosmetic_stores", - "counseling_services", - "country_clubs", - "courier_services", - "court_costs", - "credit_reporting_agencies", - "cruise_lines", - "dairy_products_stores", - "dance_hall_studios_schools", - "dating_escort_services", - "dentists_orthodontists", - "department_stores", - "detective_agencies", - "digital_goods_applications", - "digital_goods_games", - "digital_goods_large_volume", - "digital_goods_media", - "direct_marketing_catalog_merchant", - "direct_marketing_combination_catalog_and_retail_merchant", - "direct_marketing_inbound_telemarketing", - "direct_marketing_insurance_services", - "direct_marketing_other", - "direct_marketing_outbound_telemarketing", - "direct_marketing_subscription", - "direct_marketing_travel", - "discount_stores", - "doctors", - "door_to_door_sales", - "drapery_window_covering_and_upholstery_stores", - "drinking_places", - "drug_stores_and_pharmacies", - "drugs_drug_proprietaries_and_druggist_sundries", - "dry_cleaners", - "durable_goods", - "duty_free_stores", - "eating_places_restaurants", - "educational_services", - "electric_razor_stores", - "electric_vehicle_charging", - "electrical_parts_and_equipment", - "electrical_services", - "electronics_repair_shops", - "electronics_stores", - "elementary_secondary_schools", - "emergency_services_gcas_visa_use_only", - "employment_temp_agencies", - "equipment_rental", - "exterminating_services", - "family_clothing_stores", - "fast_food_restaurants", - "financial_institutions", - "fines_government_administrative_entities", - "fireplace_fireplace_screens_and_accessories_stores", - "floor_covering_stores", - "florists", - "florists_supplies_nursery_stock_and_flowers", - "freezer_and_locker_meat_provisioners", - "fuel_dealers_non_automotive", - "funeral_services_crematories", - "furniture_home_furnishings_and_equipment_stores_except_appliances", - "furniture_repair_refinishing", - "furriers_and_fur_shops", - "general_services", - "gift_card_novelty_and_souvenir_shops", - "glass_paint_and_wallpaper_stores", - "glassware_crystal_stores", - "golf_courses_public", - "government_licensed_horse_dog_racing_us_region_only", - "government_licensed_online_casions_online_gambling_us_region_only", - "government_owned_lotteries_non_us_region", - "government_owned_lotteries_us_region_only", - "government_services", - "grocery_stores_supermarkets", - "hardware_equipment_and_supplies", - "hardware_stores", - "health_and_beauty_spas", - "hearing_aids_sales_and_supplies", - "heating_plumbing_a_c", - "hobby_toy_and_game_shops", - "home_supply_warehouse_stores", - "hospitals", - "hotels_motels_and_resorts", - "household_appliance_stores", - "industrial_supplies", - "information_retrieval_services", - "insurance_default", - "insurance_underwriting_premiums", - "intra_company_purchases", - "jewelry_stores_watches_clocks_and_silverware_stores", - "landscaping_services", - "laundries", - "laundry_cleaning_services", - "legal_services_attorneys", - "luggage_and_leather_goods_stores", - "lumber_building_materials_stores", - "manual_cash_disburse", - "marinas_service_and_supplies", - "marketplaces", - "masonry_stonework_and_plaster", - "massage_parlors", - "medical_and_dental_labs", - "medical_dental_ophthalmic_and_hospital_equipment_and_supplies", - "medical_services", - "membership_organizations", - "mens_and_boys_clothing_and_accessories_stores", - "mens_womens_clothing_stores", - "metal_service_centers", - "miscellaneous", - "miscellaneous_apparel_and_accessory_shops", - "miscellaneous_auto_dealers", - "miscellaneous_business_services", - "miscellaneous_food_stores", - "miscellaneous_general_merchandise", - "miscellaneous_general_services", - "miscellaneous_home_furnishing_specialty_stores", - "miscellaneous_publishing_and_printing", - "miscellaneous_recreation_services", - "miscellaneous_repair_shops", - "miscellaneous_specialty_retail", - "mobile_home_dealers", - "motion_picture_theaters", - "motor_freight_carriers_and_trucking", - "motor_homes_dealers", - "motor_vehicle_supplies_and_new_parts", - "motorcycle_shops_and_dealers", - "motorcycle_shops_dealers", - "music_stores_musical_instruments_pianos_and_sheet_music", - "news_dealers_and_newsstands", - "non_fi_money_orders", - "non_fi_stored_value_card_purchase_load", - "nondurable_goods", - "nurseries_lawn_and_garden_supply_stores", - "nursing_personal_care", - "office_and_commercial_furniture", - "opticians_eyeglasses", - "optometrists_ophthalmologist", - "orthopedic_goods_prosthetic_devices", - "osteopaths", - "package_stores_beer_wine_and_liquor", - "paints_varnishes_and_supplies", - "parking_lots_garages", - "passenger_railways", - "pawn_shops", - "pet_shops_pet_food_and_supplies", - "petroleum_and_petroleum_products", - "photo_developing", - "photographic_photocopy_microfilm_equipment_and_supplies", - "photographic_studios", - "picture_video_production", - "piece_goods_notions_and_other_dry_goods", - "plumbing_heating_equipment_and_supplies", - "political_organizations", - "postal_services_government_only", - "precious_stones_and_metals_watches_and_jewelry", - "professional_services", - "public_warehousing_and_storage", - "quick_copy_repro_and_blueprint", - "railroads", - "real_estate_agents_and_managers_rentals", - "record_stores", - "recreational_vehicle_rentals", - "religious_goods_stores", - "religious_organizations", - "roofing_siding_sheet_metal", - "secretarial_support_services", - "security_brokers_dealers", - "service_stations", - "sewing_needlework_fabric_and_piece_goods_stores", - "shoe_repair_hat_cleaning", - "shoe_stores", - "small_appliance_repair", - "snowmobile_dealers", - "special_trade_services", - "specialty_cleaning", - "sporting_goods_stores", - "sporting_recreation_camps", - "sports_and_riding_apparel_stores", - "sports_clubs_fields", - "stamp_and_coin_stores", - "stationary_office_supplies_printing_and_writing_paper", - "stationery_stores_office_and_school_supply_stores", - "swimming_pools_sales", - "t_ui_travel_germany", - "tailors_alterations", - "tax_payments_government_agencies", - "tax_preparation_services", - "taxicabs_limousines", - "telecommunication_equipment_and_telephone_sales", - "telecommunication_services", - "telegraph_services", - "tent_and_awning_shops", - "testing_laboratories", - "theatrical_ticket_agencies", - "timeshares", - "tire_retreading_and_repair", - "tolls_bridge_fees", - "tourist_attractions_and_exhibits", - "towing_services", - "trailer_parks_campgrounds", - "transportation_services", - "travel_agencies_tour_operators", - "truck_stop_iteration", - "truck_utility_trailer_rentals", - "typesetting_plate_making_and_related_services", - "typewriter_stores", - "u_s_federal_government_agencies_or_departments", - "uniforms_commercial_clothing", - "used_merchandise_and_secondhand_stores", - "utilities", - "variety_stores", - "veterinary_services", - "video_amusement_game_supplies", - "video_game_arcades", - "video_tape_rental_stores", - "vocational_trade_schools", - "watch_jewelry_repair", - "welding_repair", - "wholesale_clubs", - "wig_and_toupee_stores", - "wires_money_orders", - "womens_accessory_and_specialty_shops", - "womens_ready_to_wear_stores", - "wrecking_and_salvage_yards", - ] - ] - ] - """ - Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to decline. All other categories will be allowed. Cannot be set with `allowed_categories`. - """ - blocked_merchant_countries: NotRequired[List[str]] - """ - Array of strings containing representing countries from which authorizations will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `allowed_merchant_countries`. Provide an empty value to unset this control. - """ - spending_limits: NotRequired[ - List["CardholderService.UpdateParamsSpendingControlsSpendingLimit"] - ] - """ - Limit spending with amount-based rules that apply across this cardholder's cards. - """ - spending_limits_currency: NotRequired[str] - """ - Currency of amounts within `spending_limits`. Defaults to your merchant country's currency. - """ - - class UpdateParamsSpendingControlsSpendingLimit(TypedDict): - amount: int - """ - Maximum amount allowed to spend per interval. - """ - categories: NotRequired[ - List[ - Literal[ - "ac_refrigeration_repair", - "accounting_bookkeeping_services", - "advertising_services", - "agricultural_cooperative", - "airlines_air_carriers", - "airports_flying_fields", - "ambulance_services", - "amusement_parks_carnivals", - "antique_reproductions", - "antique_shops", - "aquariums", - "architectural_surveying_services", - "art_dealers_and_galleries", - "artists_supply_and_craft_shops", - "auto_and_home_supply_stores", - "auto_body_repair_shops", - "auto_paint_shops", - "auto_service_shops", - "automated_cash_disburse", - "automated_fuel_dispensers", - "automobile_associations", - "automotive_parts_and_accessories_stores", - "automotive_tire_stores", - "bail_and_bond_payments", - "bakeries", - "bands_orchestras", - "barber_and_beauty_shops", - "betting_casino_gambling", - "bicycle_shops", - "billiard_pool_establishments", - "boat_dealers", - "boat_rentals_and_leases", - "book_stores", - "books_periodicals_and_newspapers", - "bowling_alleys", - "bus_lines", - "business_secretarial_schools", - "buying_shopping_services", - "cable_satellite_and_other_pay_television_and_radio", - "camera_and_photographic_supply_stores", - "candy_nut_and_confectionery_stores", - "car_and_truck_dealers_new_used", - "car_and_truck_dealers_used_only", - "car_rental_agencies", - "car_washes", - "carpentry_services", - "carpet_upholstery_cleaning", - "caterers", - "charitable_and_social_service_organizations_fundraising", - "chemicals_and_allied_products", - "child_care_services", - "childrens_and_infants_wear_stores", - "chiropodists_podiatrists", - "chiropractors", - "cigar_stores_and_stands", - "civic_social_fraternal_associations", - "cleaning_and_maintenance", - "clothing_rental", - "colleges_universities", - "commercial_equipment", - "commercial_footwear", - "commercial_photography_art_and_graphics", - "commuter_transport_and_ferries", - "computer_network_services", - "computer_programming", - "computer_repair", - "computer_software_stores", - "computers_peripherals_and_software", - "concrete_work_services", - "construction_materials", - "consulting_public_relations", - "correspondence_schools", - "cosmetic_stores", - "counseling_services", - "country_clubs", - "courier_services", - "court_costs", - "credit_reporting_agencies", - "cruise_lines", - "dairy_products_stores", - "dance_hall_studios_schools", - "dating_escort_services", - "dentists_orthodontists", - "department_stores", - "detective_agencies", - "digital_goods_applications", - "digital_goods_games", - "digital_goods_large_volume", - "digital_goods_media", - "direct_marketing_catalog_merchant", - "direct_marketing_combination_catalog_and_retail_merchant", - "direct_marketing_inbound_telemarketing", - "direct_marketing_insurance_services", - "direct_marketing_other", - "direct_marketing_outbound_telemarketing", - "direct_marketing_subscription", - "direct_marketing_travel", - "discount_stores", - "doctors", - "door_to_door_sales", - "drapery_window_covering_and_upholstery_stores", - "drinking_places", - "drug_stores_and_pharmacies", - "drugs_drug_proprietaries_and_druggist_sundries", - "dry_cleaners", - "durable_goods", - "duty_free_stores", - "eating_places_restaurants", - "educational_services", - "electric_razor_stores", - "electric_vehicle_charging", - "electrical_parts_and_equipment", - "electrical_services", - "electronics_repair_shops", - "electronics_stores", - "elementary_secondary_schools", - "emergency_services_gcas_visa_use_only", - "employment_temp_agencies", - "equipment_rental", - "exterminating_services", - "family_clothing_stores", - "fast_food_restaurants", - "financial_institutions", - "fines_government_administrative_entities", - "fireplace_fireplace_screens_and_accessories_stores", - "floor_covering_stores", - "florists", - "florists_supplies_nursery_stock_and_flowers", - "freezer_and_locker_meat_provisioners", - "fuel_dealers_non_automotive", - "funeral_services_crematories", - "furniture_home_furnishings_and_equipment_stores_except_appliances", - "furniture_repair_refinishing", - "furriers_and_fur_shops", - "general_services", - "gift_card_novelty_and_souvenir_shops", - "glass_paint_and_wallpaper_stores", - "glassware_crystal_stores", - "golf_courses_public", - "government_licensed_horse_dog_racing_us_region_only", - "government_licensed_online_casions_online_gambling_us_region_only", - "government_owned_lotteries_non_us_region", - "government_owned_lotteries_us_region_only", - "government_services", - "grocery_stores_supermarkets", - "hardware_equipment_and_supplies", - "hardware_stores", - "health_and_beauty_spas", - "hearing_aids_sales_and_supplies", - "heating_plumbing_a_c", - "hobby_toy_and_game_shops", - "home_supply_warehouse_stores", - "hospitals", - "hotels_motels_and_resorts", - "household_appliance_stores", - "industrial_supplies", - "information_retrieval_services", - "insurance_default", - "insurance_underwriting_premiums", - "intra_company_purchases", - "jewelry_stores_watches_clocks_and_silverware_stores", - "landscaping_services", - "laundries", - "laundry_cleaning_services", - "legal_services_attorneys", - "luggage_and_leather_goods_stores", - "lumber_building_materials_stores", - "manual_cash_disburse", - "marinas_service_and_supplies", - "marketplaces", - "masonry_stonework_and_plaster", - "massage_parlors", - "medical_and_dental_labs", - "medical_dental_ophthalmic_and_hospital_equipment_and_supplies", - "medical_services", - "membership_organizations", - "mens_and_boys_clothing_and_accessories_stores", - "mens_womens_clothing_stores", - "metal_service_centers", - "miscellaneous", - "miscellaneous_apparel_and_accessory_shops", - "miscellaneous_auto_dealers", - "miscellaneous_business_services", - "miscellaneous_food_stores", - "miscellaneous_general_merchandise", - "miscellaneous_general_services", - "miscellaneous_home_furnishing_specialty_stores", - "miscellaneous_publishing_and_printing", - "miscellaneous_recreation_services", - "miscellaneous_repair_shops", - "miscellaneous_specialty_retail", - "mobile_home_dealers", - "motion_picture_theaters", - "motor_freight_carriers_and_trucking", - "motor_homes_dealers", - "motor_vehicle_supplies_and_new_parts", - "motorcycle_shops_and_dealers", - "motorcycle_shops_dealers", - "music_stores_musical_instruments_pianos_and_sheet_music", - "news_dealers_and_newsstands", - "non_fi_money_orders", - "non_fi_stored_value_card_purchase_load", - "nondurable_goods", - "nurseries_lawn_and_garden_supply_stores", - "nursing_personal_care", - "office_and_commercial_furniture", - "opticians_eyeglasses", - "optometrists_ophthalmologist", - "orthopedic_goods_prosthetic_devices", - "osteopaths", - "package_stores_beer_wine_and_liquor", - "paints_varnishes_and_supplies", - "parking_lots_garages", - "passenger_railways", - "pawn_shops", - "pet_shops_pet_food_and_supplies", - "petroleum_and_petroleum_products", - "photo_developing", - "photographic_photocopy_microfilm_equipment_and_supplies", - "photographic_studios", - "picture_video_production", - "piece_goods_notions_and_other_dry_goods", - "plumbing_heating_equipment_and_supplies", - "political_organizations", - "postal_services_government_only", - "precious_stones_and_metals_watches_and_jewelry", - "professional_services", - "public_warehousing_and_storage", - "quick_copy_repro_and_blueprint", - "railroads", - "real_estate_agents_and_managers_rentals", - "record_stores", - "recreational_vehicle_rentals", - "religious_goods_stores", - "religious_organizations", - "roofing_siding_sheet_metal", - "secretarial_support_services", - "security_brokers_dealers", - "service_stations", - "sewing_needlework_fabric_and_piece_goods_stores", - "shoe_repair_hat_cleaning", - "shoe_stores", - "small_appliance_repair", - "snowmobile_dealers", - "special_trade_services", - "specialty_cleaning", - "sporting_goods_stores", - "sporting_recreation_camps", - "sports_and_riding_apparel_stores", - "sports_clubs_fields", - "stamp_and_coin_stores", - "stationary_office_supplies_printing_and_writing_paper", - "stationery_stores_office_and_school_supply_stores", - "swimming_pools_sales", - "t_ui_travel_germany", - "tailors_alterations", - "tax_payments_government_agencies", - "tax_preparation_services", - "taxicabs_limousines", - "telecommunication_equipment_and_telephone_sales", - "telecommunication_services", - "telegraph_services", - "tent_and_awning_shops", - "testing_laboratories", - "theatrical_ticket_agencies", - "timeshares", - "tire_retreading_and_repair", - "tolls_bridge_fees", - "tourist_attractions_and_exhibits", - "towing_services", - "trailer_parks_campgrounds", - "transportation_services", - "travel_agencies_tour_operators", - "truck_stop_iteration", - "truck_utility_trailer_rentals", - "typesetting_plate_making_and_related_services", - "typewriter_stores", - "u_s_federal_government_agencies_or_departments", - "uniforms_commercial_clothing", - "used_merchandise_and_secondhand_stores", - "utilities", - "variety_stores", - "veterinary_services", - "video_amusement_game_supplies", - "video_game_arcades", - "video_tape_rental_stores", - "vocational_trade_schools", - "watch_jewelry_repair", - "welding_repair", - "wholesale_clubs", - "wig_and_toupee_stores", - "wires_money_orders", - "womens_accessory_and_specialty_shops", - "womens_ready_to_wear_stores", - "wrecking_and_salvage_yards", - ] - ] - ] - """ - Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories. - """ - interval: Literal[ - "all_time", - "daily", - "monthly", - "per_authorization", - "weekly", - "yearly", - ] - """ - Interval (or event) to which the amount applies. - """ - def list( self, - params: Optional["CardholderService.ListParams"] = None, + params: Optional["CardholderListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[Cardholder]: """ @@ -2330,7 +45,7 @@ def list( async def list_async( self, - params: Optional["CardholderService.ListParams"] = None, + params: Optional["CardholderListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[Cardholder]: """ @@ -2349,7 +64,7 @@ async def list_async( def create( self, - params: "CardholderService.CreateParams", + params: "CardholderCreateParams", options: Optional[RequestOptions] = None, ) -> Cardholder: """ @@ -2368,7 +83,7 @@ def create( async def create_async( self, - params: "CardholderService.CreateParams", + params: "CardholderCreateParams", options: Optional[RequestOptions] = None, ) -> Cardholder: """ @@ -2388,7 +103,7 @@ async def create_async( def retrieve( self, cardholder: str, - params: Optional["CardholderService.RetrieveParams"] = None, + params: Optional["CardholderRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Cardholder: """ @@ -2410,7 +125,7 @@ def retrieve( async def retrieve_async( self, cardholder: str, - params: Optional["CardholderService.RetrieveParams"] = None, + params: Optional["CardholderRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Cardholder: """ @@ -2432,7 +147,7 @@ async def retrieve_async( def update( self, cardholder: str, - params: Optional["CardholderService.UpdateParams"] = None, + params: Optional["CardholderUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> Cardholder: """ @@ -2454,7 +169,7 @@ def update( async def update_async( self, cardholder: str, - params: Optional["CardholderService.UpdateParams"] = None, + params: Optional["CardholderUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> Cardholder: """ diff --git a/stripe/issuing/_credit_underwriting_record.py b/stripe/issuing/_credit_underwriting_record.py index f85cd45cf..96bd7fb63 100644 --- a/stripe/issuing/_credit_underwriting_record.py +++ b/stripe/issuing/_credit_underwriting_record.py @@ -2,11 +2,30 @@ # File generated from our OpenAPI spec from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource -from stripe._request_options import RequestOptions from stripe._stripe_object import StripeObject from stripe._util import class_method_variant, sanitize_id from typing import ClassVar, Dict, List, Optional, cast, overload -from typing_extensions import Literal, NotRequired, TypedDict, Unpack +from typing_extensions import Literal, Unpack, TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params.issuing._credit_underwriting_record_correct_params import ( + CreditUnderwritingRecordCorrectParams, + ) + from stripe.params.issuing._credit_underwriting_record_create_from_application_params import ( + CreditUnderwritingRecordCreateFromApplicationParams, + ) + from stripe.params.issuing._credit_underwriting_record_create_from_proactive_review_params import ( + CreditUnderwritingRecordCreateFromProactiveReviewParams, + ) + from stripe.params.issuing._credit_underwriting_record_list_params import ( + CreditUnderwritingRecordListParams, + ) + from stripe.params.issuing._credit_underwriting_record_report_decision_params import ( + CreditUnderwritingRecordReportDecisionParams, + ) + from stripe.params.issuing._credit_underwriting_record_retrieve_params import ( + CreditUnderwritingRecordRetrieveParams, + ) class CreditUnderwritingRecord( @@ -362,898 +381,6 @@ class UnderwritingException(StripeObject): The decision before the exception was applied. """ - class CorrectParams(RequestOptions): - application: NotRequired[ - "CreditUnderwritingRecord.CorrectParamsApplication" - ] - """ - Details about the application submission. - """ - credit_user: NotRequired[ - "CreditUnderwritingRecord.CorrectParamsCreditUser" - ] - """ - Information about the company or person applying or holding the account. - """ - decided_at: NotRequired[int] - """ - Date when a decision was made. - """ - decision: NotRequired["CreditUnderwritingRecord.CorrectParamsDecision"] - """ - Details about the decision. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - regulatory_reporting_file: NotRequired[str] - """ - File containing regulatory reporting data for the decision. Required if you are subject to this [reporting requirement](https://stripe.com/docs/issuing/credit/report-required-regulatory-data-for-credit-decisions). Optional if previously provided and no changes are needed. - """ - underwriting_exception: NotRequired[ - "CreditUnderwritingRecord.CorrectParamsUnderwritingException" - ] - """ - If an exception to the usual underwriting criteria was made for this decision, details about the exception must be provided. Exceptions should only be granted in rare circumstances, in consultation with Stripe Compliance. - """ - - class CorrectParamsApplication(TypedDict): - application_method: NotRequired[ - Literal["in_person", "mail", "online", "phone"] - ] - """ - The channel through which the applicant has submitted their application. Defaults to `online`. - """ - purpose: Literal["credit_limit_increase", "credit_line_opening"] - """ - Scope of demand made by the applicant. - """ - submitted_at: int - """ - Date when the applicant submitted their application. - """ - - class CorrectParamsCreditUser(TypedDict): - email: str - """ - Email of the applicant or accountholder. - """ - name: str - """ - Full name of the company or person. - """ - - class CorrectParamsDecision(TypedDict): - application_rejected: NotRequired[ - "CreditUnderwritingRecord.CorrectParamsDecisionApplicationRejected" - ] - """ - Details about the application rejection. - """ - credit_limit_approved: NotRequired[ - "CreditUnderwritingRecord.CorrectParamsDecisionCreditLimitApproved" - ] - """ - Details about the credit limit approved. An approved credit limit is required before you can set a `credit_limit_amount` in the [CreditPolicy API](https://stripe.com/docs/api/issuing/credit_policy/) - """ - credit_limit_decreased: NotRequired[ - "CreditUnderwritingRecord.CorrectParamsDecisionCreditLimitDecreased" - ] - """ - Details about the credit limit decreased. - """ - credit_line_closed: NotRequired[ - "CreditUnderwritingRecord.CorrectParamsDecisionCreditLineClosed" - ] - """ - Details about the credit line closed. - """ - type: Literal[ - "additional_information_requested", - "application_rejected", - "credit_limit_approved", - "credit_limit_decreased", - "credit_line_closed", - "no_changes", - "withdrawn_by_applicant", - ] - """ - Outcome of the decision. - """ - - class CorrectParamsDecisionApplicationRejected(TypedDict): - reason_other_explanation: NotRequired[str] - """ - Details about the `reasons.other` when present. - """ - reasons: List[ - Literal[ - "applicant_is_not_beneficial_owner", - "applicant_too_young", - "application_is_not_beneficial_owner", - "bankruptcy", - "business_size_too_small", - "current_account_tier_ineligible", - "customer_already_exists", - "customer_requested_account_closure", - "debt_to_cash_balance_ratio_too_high", - "debt_to_equity_ratio_too_high", - "delinquent_credit_obligations", - "dispute_rate_too_high", - "duration_of_residence", - "excessive_income_or_revenue_obligations", - "expenses_to_cash_balance_ratio_too_high", - "foreclosure_or_repossession", - "frozen_file_at_credit_bureau", - "garnishment_or_attachment", - "government_loan_program_criteria", - "high_concentration_of_clients", - "high_risk_industry", - "incomplete_application", - "inconsistent_monthly_revenues", - "insufficient_account_history_with_platform", - "insufficient_bank_account_history", - "insufficient_cash_balance", - "insufficient_cash_flow", - "insufficient_collateral", - "insufficient_credit_experience", - "insufficient_deposits", - "insufficient_income", - "insufficient_margin_ratio", - "insufficient_operating_profit", - "insufficient_period_in_operation", - "insufficient_reserves", - "insufficient_revenue", - "insufficient_social_media_performance", - "insufficient_time_in_network", - "insufficient_trade_credit_insurance", - "invalid_business_license", - "lacking_cash_account", - "late_payment_history_reported_to_bureau", - "lien_collection_action_or_judgement", - "negative_public_information", - "no_credit_file", - "other", - "outside_supported_country", - "outside_supported_state", - "poor_payment_history_with_platform", - "prior_or_current_legal_action", - "prohibited_industry", - "rate_of_cash_balance_fluctuation_too_high", - "recent_inquiries_on_business_credit_report", - "removal_of_bank_account_connection", - "revenue_discrepancy", - "runway_too_short", - "suspected_fraud", - "too_many_non_sufficient_funds_or_overdrafts", - "unable_to_verify_address", - "unable_to_verify_identity", - "unable_to_verify_income_or_revenue", - "unprofitable", - "unsupportable_business_type", - ] - ] - """ - List of reasons why the application was rejected, up to 4 reasons, in order of importance. - """ - - class CorrectParamsDecisionCreditLimitApproved(TypedDict): - amount: int - """ - The credit approved, in the currency of the account and [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). - """ - currency: NotRequired[str] - """ - The currency of the credit approved, will default to the Account's Issuing currency. - """ - - class CorrectParamsDecisionCreditLimitDecreased(TypedDict): - amount: int - """ - The credit approved, in the currency of the account and [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). - """ - currency: NotRequired[str] - """ - The currency of the credit approved, will default to the Account's Issuing currency. - """ - reason_other_explanation: NotRequired[str] - """ - Details about the `reasons.other` when present. - """ - reasons: List[ - Literal[ - "applicant_is_not_beneficial_owner", - "applicant_too_young", - "application_is_not_beneficial_owner", - "bankruptcy", - "business_size_too_small", - "change_in_financial_state", - "change_in_utilization_of_credit_line", - "current_account_tier_ineligible", - "customer_already_exists", - "customer_requested_account_closure", - "debt_to_cash_balance_ratio_too_high", - "debt_to_equity_ratio_too_high", - "decrease_in_income_to_expense_ratio", - "decrease_in_social_media_performance", - "delinquent_credit_obligations", - "dispute_rate_too_high", - "duration_of_residence", - "exceeds_acceptable_platform_exposure", - "excessive_income_or_revenue_obligations", - "expenses_to_cash_balance_ratio_too_high", - "foreclosure_or_repossession", - "frozen_file_at_credit_bureau", - "garnishment_or_attachment", - "government_loan_program_criteria", - "has_recent_credit_limit_increase", - "high_concentration_of_clients", - "high_risk_industry", - "incomplete_application", - "inconsistent_monthly_revenues", - "insufficient_account_history_with_platform", - "insufficient_bank_account_history", - "insufficient_cash_balance", - "insufficient_cash_flow", - "insufficient_collateral", - "insufficient_credit_experience", - "insufficient_credit_utilization", - "insufficient_deposits", - "insufficient_income", - "insufficient_margin_ratio", - "insufficient_operating_profit", - "insufficient_period_in_operation", - "insufficient_reserves", - "insufficient_revenue", - "insufficient_social_media_performance", - "insufficient_time_in_network", - "insufficient_trade_credit_insurance", - "insufficient_usage_as_qualified_expenses", - "invalid_business_license", - "lacking_cash_account", - "late_payment_history_reported_to_bureau", - "lien_collection_action_or_judgement", - "negative_public_information", - "no_credit_file", - "other", - "outside_supported_country", - "outside_supported_state", - "poor_payment_history_with_platform", - "prior_or_current_legal_action", - "prohibited_industry", - "rate_of_cash_balance_fluctuation_too_high", - "recent_inquiries_on_business_credit_report", - "removal_of_bank_account_connection", - "revenue_discrepancy", - "runway_too_short", - "suspected_fraud", - "too_many_non_sufficient_funds_or_overdrafts", - "unable_to_verify_address", - "unable_to_verify_identity", - "unable_to_verify_income_or_revenue", - "unprofitable", - "unsupportable_business_type", - ] - ] - """ - List of reasons why the existing credit was decreased, up to 4 reasons, in order of importance. - """ - - class CorrectParamsDecisionCreditLineClosed(TypedDict): - reason_other_explanation: NotRequired[str] - """ - Details about the `reasons.other` when present. - """ - reasons: List[ - Literal[ - "applicant_is_not_beneficial_owner", - "applicant_too_young", - "application_is_not_beneficial_owner", - "bankruptcy", - "business_size_too_small", - "change_in_financial_state", - "change_in_utilization_of_credit_line", - "current_account_tier_ineligible", - "customer_already_exists", - "customer_requested_account_closure", - "debt_to_cash_balance_ratio_too_high", - "debt_to_equity_ratio_too_high", - "decrease_in_income_to_expense_ratio", - "decrease_in_social_media_performance", - "delinquent_credit_obligations", - "dispute_rate_too_high", - "duration_of_residence", - "exceeds_acceptable_platform_exposure", - "excessive_income_or_revenue_obligations", - "expenses_to_cash_balance_ratio_too_high", - "foreclosure_or_repossession", - "frozen_file_at_credit_bureau", - "garnishment_or_attachment", - "government_loan_program_criteria", - "has_recent_credit_limit_increase", - "high_concentration_of_clients", - "high_risk_industry", - "incomplete_application", - "inconsistent_monthly_revenues", - "insufficient_account_history_with_platform", - "insufficient_bank_account_history", - "insufficient_cash_balance", - "insufficient_cash_flow", - "insufficient_collateral", - "insufficient_credit_experience", - "insufficient_credit_utilization", - "insufficient_deposits", - "insufficient_income", - "insufficient_margin_ratio", - "insufficient_operating_profit", - "insufficient_period_in_operation", - "insufficient_reserves", - "insufficient_revenue", - "insufficient_social_media_performance", - "insufficient_time_in_network", - "insufficient_trade_credit_insurance", - "insufficient_usage_as_qualified_expenses", - "invalid_business_license", - "lacking_cash_account", - "late_payment_history_reported_to_bureau", - "lien_collection_action_or_judgement", - "negative_public_information", - "no_credit_file", - "other", - "outside_supported_country", - "outside_supported_state", - "poor_payment_history_with_platform", - "prior_or_current_legal_action", - "prohibited_industry", - "rate_of_cash_balance_fluctuation_too_high", - "recent_inquiries_on_business_credit_report", - "removal_of_bank_account_connection", - "revenue_discrepancy", - "runway_too_short", - "suspected_fraud", - "too_many_non_sufficient_funds_or_overdrafts", - "unable_to_verify_address", - "unable_to_verify_identity", - "unable_to_verify_income_or_revenue", - "unprofitable", - "unsupportable_business_type", - ] - ] - """ - List of reasons why the credit line was closed, up to 4 reasons, in order of importance. - """ - - class CorrectParamsUnderwritingException(TypedDict): - explanation: str - """ - Written explanation for the exception. - """ - original_decision_type: Literal[ - "additional_information_requested", - "application_rejected", - "credit_limit_approved", - "credit_limit_decreased", - "credit_line_closed", - "no_changes", - "withdrawn_by_applicant", - ] - """ - The decision before the exception was applied. - """ - - class CreateFromApplicationParams(RequestOptions): - application: ( - "CreditUnderwritingRecord.CreateFromApplicationParamsApplication" - ) - """ - Details about the application submission. - """ - credit_user: ( - "CreditUnderwritingRecord.CreateFromApplicationParamsCreditUser" - ) - """ - Information about the company or person applying or holding the account. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - - class CreateFromApplicationParamsApplication(TypedDict): - application_method: NotRequired[ - Literal["in_person", "mail", "online", "phone"] - ] - """ - The channel through which the applicant has submitted their application. Defaults to `online`. - """ - purpose: Literal["credit_limit_increase", "credit_line_opening"] - """ - Scope of demand made by the applicant. - """ - submitted_at: int - """ - Date when the applicant submitted their application. - """ - - class CreateFromApplicationParamsCreditUser(TypedDict): - email: str - """ - Email of the applicant or accountholder. - """ - name: str - """ - Full name of the company or person. - """ - - class CreateFromProactiveReviewParams(RequestOptions): - credit_user: "CreditUnderwritingRecord.CreateFromProactiveReviewParamsCreditUser" - """ - Information about the company or person applying or holding the account. - """ - decided_at: int - """ - Date when a decision was made. - """ - decision: ( - "CreditUnderwritingRecord.CreateFromProactiveReviewParamsDecision" - ) - """ - Details about the decision. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - regulatory_reporting_file: NotRequired[str] - """ - File containing regulatory reporting data for the decision. Required if you are subject to this [reporting requirement](https://stripe.com/docs/issuing/credit/report-required-regulatory-data-for-credit-decisions). - """ - underwriting_exception: NotRequired[ - "CreditUnderwritingRecord.CreateFromProactiveReviewParamsUnderwritingException" - ] - """ - If an exception to the usual underwriting criteria was made for this decision, details about the exception must be provided. Exceptions should only be granted in rare circumstances, in consultation with Stripe Compliance. - """ - - class CreateFromProactiveReviewParamsCreditUser(TypedDict): - email: str - """ - Email of the applicant or accountholder. - """ - name: str - """ - Full name of the company or person. - """ - - class CreateFromProactiveReviewParamsDecision(TypedDict): - credit_limit_approved: NotRequired[ - "CreditUnderwritingRecord.CreateFromProactiveReviewParamsDecisionCreditLimitApproved" - ] - """ - Details about the credit limit approved. An approved credit limit is required before you can set a `credit_limit_amount` in the [CreditPolicy API](https://stripe.com/docs/api/issuing/credit_policy/) - """ - credit_limit_decreased: NotRequired[ - "CreditUnderwritingRecord.CreateFromProactiveReviewParamsDecisionCreditLimitDecreased" - ] - """ - Details about the credit limit decreased. - """ - credit_line_closed: NotRequired[ - "CreditUnderwritingRecord.CreateFromProactiveReviewParamsDecisionCreditLineClosed" - ] - """ - Details about the credit line closed. - """ - type: Literal[ - "credit_limit_approved", - "credit_limit_decreased", - "credit_line_closed", - "no_changes", - ] - """ - Outcome of the decision. - """ - - class CreateFromProactiveReviewParamsDecisionCreditLimitApproved( - TypedDict - ): - amount: int - """ - The credit approved, in the currency of the account and [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). - """ - currency: NotRequired[str] - """ - The currency of the credit approved, will default to the Account's Issuing currency. - """ - - class CreateFromProactiveReviewParamsDecisionCreditLimitDecreased( - TypedDict, - ): - amount: int - """ - The credit approved, in the currency of the account and [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). - """ - currency: NotRequired[str] - """ - The currency of the credit approved, will default to the Account's Issuing currency. - """ - reason_other_explanation: NotRequired[str] - """ - Details about the `reasons.other` when present. - """ - reasons: List[ - Literal[ - "applicant_is_not_beneficial_owner", - "applicant_too_young", - "application_is_not_beneficial_owner", - "bankruptcy", - "business_size_too_small", - "change_in_financial_state", - "change_in_utilization_of_credit_line", - "current_account_tier_ineligible", - "customer_already_exists", - "customer_requested_account_closure", - "debt_to_cash_balance_ratio_too_high", - "debt_to_equity_ratio_too_high", - "decrease_in_income_to_expense_ratio", - "decrease_in_social_media_performance", - "delinquent_credit_obligations", - "dispute_rate_too_high", - "duration_of_residence", - "exceeds_acceptable_platform_exposure", - "excessive_income_or_revenue_obligations", - "expenses_to_cash_balance_ratio_too_high", - "foreclosure_or_repossession", - "frozen_file_at_credit_bureau", - "garnishment_or_attachment", - "government_loan_program_criteria", - "has_recent_credit_limit_increase", - "high_concentration_of_clients", - "high_risk_industry", - "incomplete_application", - "inconsistent_monthly_revenues", - "insufficient_account_history_with_platform", - "insufficient_bank_account_history", - "insufficient_cash_balance", - "insufficient_cash_flow", - "insufficient_collateral", - "insufficient_credit_experience", - "insufficient_credit_utilization", - "insufficient_deposits", - "insufficient_income", - "insufficient_margin_ratio", - "insufficient_operating_profit", - "insufficient_period_in_operation", - "insufficient_reserves", - "insufficient_revenue", - "insufficient_social_media_performance", - "insufficient_time_in_network", - "insufficient_trade_credit_insurance", - "insufficient_usage_as_qualified_expenses", - "invalid_business_license", - "lacking_cash_account", - "late_payment_history_reported_to_bureau", - "lien_collection_action_or_judgement", - "negative_public_information", - "no_credit_file", - "other", - "outside_supported_country", - "outside_supported_state", - "poor_payment_history_with_platform", - "prior_or_current_legal_action", - "prohibited_industry", - "rate_of_cash_balance_fluctuation_too_high", - "recent_inquiries_on_business_credit_report", - "removal_of_bank_account_connection", - "revenue_discrepancy", - "runway_too_short", - "suspected_fraud", - "too_many_non_sufficient_funds_or_overdrafts", - "unable_to_verify_address", - "unable_to_verify_identity", - "unable_to_verify_income_or_revenue", - "unprofitable", - "unsupportable_business_type", - ] - ] - """ - List of reasons why the existing credit was decreased, up to 4 reasons, in order of importance. - """ - - class CreateFromProactiveReviewParamsDecisionCreditLineClosed(TypedDict): - reason_other_explanation: NotRequired[str] - """ - Details about the `reasons.other` when present. - """ - reasons: List[ - Literal[ - "applicant_is_not_beneficial_owner", - "applicant_too_young", - "application_is_not_beneficial_owner", - "bankruptcy", - "business_size_too_small", - "change_in_financial_state", - "change_in_utilization_of_credit_line", - "current_account_tier_ineligible", - "customer_already_exists", - "customer_requested_account_closure", - "debt_to_cash_balance_ratio_too_high", - "debt_to_equity_ratio_too_high", - "decrease_in_income_to_expense_ratio", - "decrease_in_social_media_performance", - "delinquent_credit_obligations", - "dispute_rate_too_high", - "duration_of_residence", - "exceeds_acceptable_platform_exposure", - "excessive_income_or_revenue_obligations", - "expenses_to_cash_balance_ratio_too_high", - "foreclosure_or_repossession", - "frozen_file_at_credit_bureau", - "garnishment_or_attachment", - "government_loan_program_criteria", - "has_recent_credit_limit_increase", - "high_concentration_of_clients", - "high_risk_industry", - "incomplete_application", - "inconsistent_monthly_revenues", - "insufficient_account_history_with_platform", - "insufficient_bank_account_history", - "insufficient_cash_balance", - "insufficient_cash_flow", - "insufficient_collateral", - "insufficient_credit_experience", - "insufficient_credit_utilization", - "insufficient_deposits", - "insufficient_income", - "insufficient_margin_ratio", - "insufficient_operating_profit", - "insufficient_period_in_operation", - "insufficient_reserves", - "insufficient_revenue", - "insufficient_social_media_performance", - "insufficient_time_in_network", - "insufficient_trade_credit_insurance", - "insufficient_usage_as_qualified_expenses", - "invalid_business_license", - "lacking_cash_account", - "late_payment_history_reported_to_bureau", - "lien_collection_action_or_judgement", - "negative_public_information", - "no_credit_file", - "other", - "outside_supported_country", - "outside_supported_state", - "poor_payment_history_with_platform", - "prior_or_current_legal_action", - "prohibited_industry", - "rate_of_cash_balance_fluctuation_too_high", - "recent_inquiries_on_business_credit_report", - "removal_of_bank_account_connection", - "revenue_discrepancy", - "runway_too_short", - "suspected_fraud", - "too_many_non_sufficient_funds_or_overdrafts", - "unable_to_verify_address", - "unable_to_verify_identity", - "unable_to_verify_income_or_revenue", - "unprofitable", - "unsupportable_business_type", - ] - ] - """ - List of reasons why the credit line was closed, up to 4 reasons, in order of importance. - """ - - class CreateFromProactiveReviewParamsUnderwritingException(TypedDict): - explanation: str - """ - Written explanation for the exception. - """ - original_decision_type: Literal[ - "additional_information_requested", - "application_rejected", - "credit_limit_approved", - "credit_limit_decreased", - "credit_line_closed", - "no_changes", - "withdrawn_by_applicant", - ] - """ - The decision before the exception was applied. - """ - - class ListParams(RequestOptions): - 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 ReportDecisionParams(RequestOptions): - decided_at: int - """ - Date when a decision was made. - """ - decision: "CreditUnderwritingRecord.ReportDecisionParamsDecision" - """ - Details about the decision. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - regulatory_reporting_file: NotRequired[str] - """ - File containing regulatory reporting data for the decision. Required if you are subject to this [reporting requirement](https://stripe.com/docs/issuing/credit/report-required-regulatory-data-for-credit-decisions). - """ - underwriting_exception: NotRequired[ - "CreditUnderwritingRecord.ReportDecisionParamsUnderwritingException" - ] - """ - If an exception to the usual underwriting criteria was made for this decision, details about the exception must be provided. Exceptions should only be granted in rare circumstances, in consultation with Stripe Compliance. - """ - - class ReportDecisionParamsDecision(TypedDict): - application_rejected: NotRequired[ - "CreditUnderwritingRecord.ReportDecisionParamsDecisionApplicationRejected" - ] - """ - Details about the application rejection. - """ - credit_limit_approved: NotRequired[ - "CreditUnderwritingRecord.ReportDecisionParamsDecisionCreditLimitApproved" - ] - """ - Details about the credit limit approved. An approved credit limit is required before you can set a `credit_limit_amount` in the [CreditPolicy API](https://stripe.com/docs/api/issuing/credit_policy/) - """ - type: Literal[ - "additional_information_requested", - "application_rejected", - "credit_limit_approved", - "withdrawn_by_applicant", - ] - """ - Outcome of the decision. - """ - - class ReportDecisionParamsDecisionApplicationRejected(TypedDict): - reason_other_explanation: NotRequired[str] - """ - Details about the `reasons.other` when present. - """ - reasons: List[ - Literal[ - "applicant_is_not_beneficial_owner", - "applicant_too_young", - "application_is_not_beneficial_owner", - "bankruptcy", - "business_size_too_small", - "current_account_tier_ineligible", - "customer_already_exists", - "customer_requested_account_closure", - "debt_to_cash_balance_ratio_too_high", - "debt_to_equity_ratio_too_high", - "delinquent_credit_obligations", - "dispute_rate_too_high", - "duration_of_residence", - "excessive_income_or_revenue_obligations", - "expenses_to_cash_balance_ratio_too_high", - "foreclosure_or_repossession", - "frozen_file_at_credit_bureau", - "garnishment_or_attachment", - "government_loan_program_criteria", - "high_concentration_of_clients", - "high_risk_industry", - "incomplete_application", - "inconsistent_monthly_revenues", - "insufficient_account_history_with_platform", - "insufficient_bank_account_history", - "insufficient_cash_balance", - "insufficient_cash_flow", - "insufficient_collateral", - "insufficient_credit_experience", - "insufficient_deposits", - "insufficient_income", - "insufficient_margin_ratio", - "insufficient_operating_profit", - "insufficient_period_in_operation", - "insufficient_reserves", - "insufficient_revenue", - "insufficient_social_media_performance", - "insufficient_time_in_network", - "insufficient_trade_credit_insurance", - "invalid_business_license", - "lacking_cash_account", - "late_payment_history_reported_to_bureau", - "lien_collection_action_or_judgement", - "negative_public_information", - "no_credit_file", - "other", - "outside_supported_country", - "outside_supported_state", - "poor_payment_history_with_platform", - "prior_or_current_legal_action", - "prohibited_industry", - "rate_of_cash_balance_fluctuation_too_high", - "recent_inquiries_on_business_credit_report", - "removal_of_bank_account_connection", - "revenue_discrepancy", - "runway_too_short", - "suspected_fraud", - "too_many_non_sufficient_funds_or_overdrafts", - "unable_to_verify_address", - "unable_to_verify_identity", - "unable_to_verify_income_or_revenue", - "unprofitable", - "unsupportable_business_type", - ] - ] - """ - List of reasons why the application was rejected, up to 4 reasons, in order of importance. - """ - - class ReportDecisionParamsDecisionCreditLimitApproved(TypedDict): - amount: int - """ - The credit approved, in the currency of the account and [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). - """ - currency: NotRequired[str] - """ - The currency of the credit approved, will default to the Account's Issuing currency. - """ - - class ReportDecisionParamsUnderwritingException(TypedDict): - explanation: str - """ - Written explanation for the exception. - """ - original_decision_type: Literal[ - "additional_information_requested", - "application_rejected", - "credit_limit_approved", - "credit_limit_decreased", - "credit_line_closed", - "no_changes", - "withdrawn_by_applicant", - ] - """ - The decision before the exception was applied. - """ - - class RetrieveParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - application: Optional[Application] """ For decisions triggered by an application, details about the submission. @@ -1308,7 +435,7 @@ class RetrieveParams(RequestOptions): def _cls_correct( cls, credit_underwriting_record: str, - **params: Unpack["CreditUnderwritingRecord.CorrectParams"], + **params: Unpack["CreditUnderwritingRecordCorrectParams"], ) -> "CreditUnderwritingRecord": """ Update a CreditUnderwritingRecord object to correct mistakes. @@ -1330,7 +457,7 @@ def _cls_correct( @staticmethod def correct( credit_underwriting_record: str, - **params: Unpack["CreditUnderwritingRecord.CorrectParams"], + **params: Unpack["CreditUnderwritingRecordCorrectParams"], ) -> "CreditUnderwritingRecord": """ Update a CreditUnderwritingRecord object to correct mistakes. @@ -1339,7 +466,7 @@ def correct( @overload def correct( - self, **params: Unpack["CreditUnderwritingRecord.CorrectParams"] + self, **params: Unpack["CreditUnderwritingRecordCorrectParams"] ) -> "CreditUnderwritingRecord": """ Update a CreditUnderwritingRecord object to correct mistakes. @@ -1348,7 +475,7 @@ def correct( @class_method_variant("_cls_correct") def correct( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["CreditUnderwritingRecord.CorrectParams"] + self, **params: Unpack["CreditUnderwritingRecordCorrectParams"] ) -> "CreditUnderwritingRecord": """ Update a CreditUnderwritingRecord object to correct mistakes. @@ -1368,7 +495,7 @@ def correct( # pyright: ignore[reportGeneralTypeIssues] async def _cls_correct_async( cls, credit_underwriting_record: str, - **params: Unpack["CreditUnderwritingRecord.CorrectParams"], + **params: Unpack["CreditUnderwritingRecordCorrectParams"], ) -> "CreditUnderwritingRecord": """ Update a CreditUnderwritingRecord object to correct mistakes. @@ -1390,7 +517,7 @@ async def _cls_correct_async( @staticmethod async def correct_async( credit_underwriting_record: str, - **params: Unpack["CreditUnderwritingRecord.CorrectParams"], + **params: Unpack["CreditUnderwritingRecordCorrectParams"], ) -> "CreditUnderwritingRecord": """ Update a CreditUnderwritingRecord object to correct mistakes. @@ -1399,7 +526,7 @@ async def correct_async( @overload async def correct_async( - self, **params: Unpack["CreditUnderwritingRecord.CorrectParams"] + self, **params: Unpack["CreditUnderwritingRecordCorrectParams"] ) -> "CreditUnderwritingRecord": """ Update a CreditUnderwritingRecord object to correct mistakes. @@ -1408,7 +535,7 @@ async def correct_async( @class_method_variant("_cls_correct_async") async def correct_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["CreditUnderwritingRecord.CorrectParams"] + self, **params: Unpack["CreditUnderwritingRecordCorrectParams"] ) -> "CreditUnderwritingRecord": """ Update a CreditUnderwritingRecord object to correct mistakes. @@ -1428,7 +555,7 @@ async def correct_async( # pyright: ignore[reportGeneralTypeIssues] def create_from_application( cls, **params: Unpack[ - "CreditUnderwritingRecord.CreateFromApplicationParams" + "CreditUnderwritingRecordCreateFromApplicationParams" ], ) -> "CreditUnderwritingRecord": """ @@ -1447,7 +574,7 @@ def create_from_application( async def create_from_application_async( cls, **params: Unpack[ - "CreditUnderwritingRecord.CreateFromApplicationParams" + "CreditUnderwritingRecordCreateFromApplicationParams" ], ) -> "CreditUnderwritingRecord": """ @@ -1466,7 +593,7 @@ async def create_from_application_async( def create_from_proactive_review( cls, **params: Unpack[ - "CreditUnderwritingRecord.CreateFromProactiveReviewParams" + "CreditUnderwritingRecordCreateFromProactiveReviewParams" ], ) -> "CreditUnderwritingRecord": """ @@ -1485,7 +612,7 @@ def create_from_proactive_review( async def create_from_proactive_review_async( cls, **params: Unpack[ - "CreditUnderwritingRecord.CreateFromProactiveReviewParams" + "CreditUnderwritingRecordCreateFromProactiveReviewParams" ], ) -> "CreditUnderwritingRecord": """ @@ -1502,7 +629,7 @@ async def create_from_proactive_review_async( @classmethod def list( - cls, **params: Unpack["CreditUnderwritingRecord.ListParams"] + cls, **params: Unpack["CreditUnderwritingRecordListParams"] ) -> ListObject["CreditUnderwritingRecord"]: """ Retrieves a list of CreditUnderwritingRecord objects. The objects are sorted in descending order by creation date, with the most-recently-created object appearing first. @@ -1522,7 +649,7 @@ def list( @classmethod async def list_async( - cls, **params: Unpack["CreditUnderwritingRecord.ListParams"] + cls, **params: Unpack["CreditUnderwritingRecordListParams"] ) -> ListObject["CreditUnderwritingRecord"]: """ Retrieves a list of CreditUnderwritingRecord objects. The objects are sorted in descending order by creation date, with the most-recently-created object appearing first. @@ -1544,7 +671,7 @@ async def list_async( def _cls_report_decision( cls, credit_underwriting_record: str, - **params: Unpack["CreditUnderwritingRecord.ReportDecisionParams"], + **params: Unpack["CreditUnderwritingRecordReportDecisionParams"], ) -> "CreditUnderwritingRecord": """ Update a CreditUnderwritingRecord object from a decision made on a credit application. @@ -1566,7 +693,7 @@ def _cls_report_decision( @staticmethod def report_decision( credit_underwriting_record: str, - **params: Unpack["CreditUnderwritingRecord.ReportDecisionParams"], + **params: Unpack["CreditUnderwritingRecordReportDecisionParams"], ) -> "CreditUnderwritingRecord": """ Update a CreditUnderwritingRecord object from a decision made on a credit application. @@ -1575,7 +702,7 @@ def report_decision( @overload def report_decision( - self, **params: Unpack["CreditUnderwritingRecord.ReportDecisionParams"] + self, **params: Unpack["CreditUnderwritingRecordReportDecisionParams"] ) -> "CreditUnderwritingRecord": """ Update a CreditUnderwritingRecord object from a decision made on a credit application. @@ -1584,7 +711,7 @@ def report_decision( @class_method_variant("_cls_report_decision") def report_decision( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["CreditUnderwritingRecord.ReportDecisionParams"] + self, **params: Unpack["CreditUnderwritingRecordReportDecisionParams"] ) -> "CreditUnderwritingRecord": """ Update a CreditUnderwritingRecord object from a decision made on a credit application. @@ -1604,7 +731,7 @@ def report_decision( # pyright: ignore[reportGeneralTypeIssues] async def _cls_report_decision_async( cls, credit_underwriting_record: str, - **params: Unpack["CreditUnderwritingRecord.ReportDecisionParams"], + **params: Unpack["CreditUnderwritingRecordReportDecisionParams"], ) -> "CreditUnderwritingRecord": """ Update a CreditUnderwritingRecord object from a decision made on a credit application. @@ -1626,7 +753,7 @@ async def _cls_report_decision_async( @staticmethod async def report_decision_async( credit_underwriting_record: str, - **params: Unpack["CreditUnderwritingRecord.ReportDecisionParams"], + **params: Unpack["CreditUnderwritingRecordReportDecisionParams"], ) -> "CreditUnderwritingRecord": """ Update a CreditUnderwritingRecord object from a decision made on a credit application. @@ -1635,7 +762,7 @@ async def report_decision_async( @overload async def report_decision_async( - self, **params: Unpack["CreditUnderwritingRecord.ReportDecisionParams"] + self, **params: Unpack["CreditUnderwritingRecordReportDecisionParams"] ) -> "CreditUnderwritingRecord": """ Update a CreditUnderwritingRecord object from a decision made on a credit application. @@ -1644,7 +771,7 @@ async def report_decision_async( @class_method_variant("_cls_report_decision_async") async def report_decision_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["CreditUnderwritingRecord.ReportDecisionParams"] + self, **params: Unpack["CreditUnderwritingRecordReportDecisionParams"] ) -> "CreditUnderwritingRecord": """ Update a CreditUnderwritingRecord object from a decision made on a credit application. @@ -1664,7 +791,7 @@ async def report_decision_async( # pyright: ignore[reportGeneralTypeIssues] def retrieve( cls, id: str, - **params: Unpack["CreditUnderwritingRecord.RetrieveParams"], + **params: Unpack["CreditUnderwritingRecordRetrieveParams"], ) -> "CreditUnderwritingRecord": """ Retrieves a CreditUnderwritingRecord object. @@ -1677,7 +804,7 @@ def retrieve( async def retrieve_async( cls, id: str, - **params: Unpack["CreditUnderwritingRecord.RetrieveParams"], + **params: Unpack["CreditUnderwritingRecordRetrieveParams"], ) -> "CreditUnderwritingRecord": """ Retrieves a CreditUnderwritingRecord object. diff --git a/stripe/issuing/_credit_underwriting_record_service.py b/stripe/issuing/_credit_underwriting_record_service.py index c0d810c4a..3657885e2 100644 --- a/stripe/issuing/_credit_underwriting_record_service.py +++ b/stripe/issuing/_credit_underwriting_record_service.py @@ -5,904 +5,34 @@ from stripe._stripe_service import StripeService from stripe._util import sanitize_id from stripe.issuing._credit_underwriting_record import CreditUnderwritingRecord -from typing import Dict, List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params.issuing._credit_underwriting_record_correct_params import ( + CreditUnderwritingRecordCorrectParams, + ) + from stripe.params.issuing._credit_underwriting_record_create_from_application_params import ( + CreditUnderwritingRecordCreateFromApplicationParams, + ) + from stripe.params.issuing._credit_underwriting_record_create_from_proactive_review_params import ( + CreditUnderwritingRecordCreateFromProactiveReviewParams, + ) + from stripe.params.issuing._credit_underwriting_record_list_params import ( + CreditUnderwritingRecordListParams, + ) + from stripe.params.issuing._credit_underwriting_record_report_decision_params import ( + CreditUnderwritingRecordReportDecisionParams, + ) + from stripe.params.issuing._credit_underwriting_record_retrieve_params import ( + CreditUnderwritingRecordRetrieveParams, + ) class CreditUnderwritingRecordService(StripeService): - class CorrectParams(TypedDict): - application: NotRequired[ - "CreditUnderwritingRecordService.CorrectParamsApplication" - ] - """ - Details about the application submission. - """ - credit_user: NotRequired[ - "CreditUnderwritingRecordService.CorrectParamsCreditUser" - ] - """ - Information about the company or person applying or holding the account. - """ - decided_at: NotRequired[int] - """ - Date when a decision was made. - """ - decision: NotRequired[ - "CreditUnderwritingRecordService.CorrectParamsDecision" - ] - """ - Details about the decision. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - regulatory_reporting_file: NotRequired[str] - """ - File containing regulatory reporting data for the decision. Required if you are subject to this [reporting requirement](https://stripe.com/docs/issuing/credit/report-required-regulatory-data-for-credit-decisions). Optional if previously provided and no changes are needed. - """ - underwriting_exception: NotRequired[ - "CreditUnderwritingRecordService.CorrectParamsUnderwritingException" - ] - """ - If an exception to the usual underwriting criteria was made for this decision, details about the exception must be provided. Exceptions should only be granted in rare circumstances, in consultation with Stripe Compliance. - """ - - class CorrectParamsApplication(TypedDict): - application_method: NotRequired[ - Literal["in_person", "mail", "online", "phone"] - ] - """ - The channel through which the applicant has submitted their application. Defaults to `online`. - """ - purpose: Literal["credit_limit_increase", "credit_line_opening"] - """ - Scope of demand made by the applicant. - """ - submitted_at: int - """ - Date when the applicant submitted their application. - """ - - class CorrectParamsCreditUser(TypedDict): - email: str - """ - Email of the applicant or accountholder. - """ - name: str - """ - Full name of the company or person. - """ - - class CorrectParamsDecision(TypedDict): - application_rejected: NotRequired[ - "CreditUnderwritingRecordService.CorrectParamsDecisionApplicationRejected" - ] - """ - Details about the application rejection. - """ - credit_limit_approved: NotRequired[ - "CreditUnderwritingRecordService.CorrectParamsDecisionCreditLimitApproved" - ] - """ - Details about the credit limit approved. An approved credit limit is required before you can set a `credit_limit_amount` in the [CreditPolicy API](https://stripe.com/docs/api/issuing/credit_policy/) - """ - credit_limit_decreased: NotRequired[ - "CreditUnderwritingRecordService.CorrectParamsDecisionCreditLimitDecreased" - ] - """ - Details about the credit limit decreased. - """ - credit_line_closed: NotRequired[ - "CreditUnderwritingRecordService.CorrectParamsDecisionCreditLineClosed" - ] - """ - Details about the credit line closed. - """ - type: Literal[ - "additional_information_requested", - "application_rejected", - "credit_limit_approved", - "credit_limit_decreased", - "credit_line_closed", - "no_changes", - "withdrawn_by_applicant", - ] - """ - Outcome of the decision. - """ - - class CorrectParamsDecisionApplicationRejected(TypedDict): - reason_other_explanation: NotRequired[str] - """ - Details about the `reasons.other` when present. - """ - reasons: List[ - Literal[ - "applicant_is_not_beneficial_owner", - "applicant_too_young", - "application_is_not_beneficial_owner", - "bankruptcy", - "business_size_too_small", - "current_account_tier_ineligible", - "customer_already_exists", - "customer_requested_account_closure", - "debt_to_cash_balance_ratio_too_high", - "debt_to_equity_ratio_too_high", - "delinquent_credit_obligations", - "dispute_rate_too_high", - "duration_of_residence", - "excessive_income_or_revenue_obligations", - "expenses_to_cash_balance_ratio_too_high", - "foreclosure_or_repossession", - "frozen_file_at_credit_bureau", - "garnishment_or_attachment", - "government_loan_program_criteria", - "high_concentration_of_clients", - "high_risk_industry", - "incomplete_application", - "inconsistent_monthly_revenues", - "insufficient_account_history_with_platform", - "insufficient_bank_account_history", - "insufficient_cash_balance", - "insufficient_cash_flow", - "insufficient_collateral", - "insufficient_credit_experience", - "insufficient_deposits", - "insufficient_income", - "insufficient_margin_ratio", - "insufficient_operating_profit", - "insufficient_period_in_operation", - "insufficient_reserves", - "insufficient_revenue", - "insufficient_social_media_performance", - "insufficient_time_in_network", - "insufficient_trade_credit_insurance", - "invalid_business_license", - "lacking_cash_account", - "late_payment_history_reported_to_bureau", - "lien_collection_action_or_judgement", - "negative_public_information", - "no_credit_file", - "other", - "outside_supported_country", - "outside_supported_state", - "poor_payment_history_with_platform", - "prior_or_current_legal_action", - "prohibited_industry", - "rate_of_cash_balance_fluctuation_too_high", - "recent_inquiries_on_business_credit_report", - "removal_of_bank_account_connection", - "revenue_discrepancy", - "runway_too_short", - "suspected_fraud", - "too_many_non_sufficient_funds_or_overdrafts", - "unable_to_verify_address", - "unable_to_verify_identity", - "unable_to_verify_income_or_revenue", - "unprofitable", - "unsupportable_business_type", - ] - ] - """ - List of reasons why the application was rejected, up to 4 reasons, in order of importance. - """ - - class CorrectParamsDecisionCreditLimitApproved(TypedDict): - amount: int - """ - The credit approved, in the currency of the account and [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). - """ - currency: NotRequired[str] - """ - The currency of the credit approved, will default to the Account's Issuing currency. - """ - - class CorrectParamsDecisionCreditLimitDecreased(TypedDict): - amount: int - """ - The credit approved, in the currency of the account and [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). - """ - currency: NotRequired[str] - """ - The currency of the credit approved, will default to the Account's Issuing currency. - """ - reason_other_explanation: NotRequired[str] - """ - Details about the `reasons.other` when present. - """ - reasons: List[ - Literal[ - "applicant_is_not_beneficial_owner", - "applicant_too_young", - "application_is_not_beneficial_owner", - "bankruptcy", - "business_size_too_small", - "change_in_financial_state", - "change_in_utilization_of_credit_line", - "current_account_tier_ineligible", - "customer_already_exists", - "customer_requested_account_closure", - "debt_to_cash_balance_ratio_too_high", - "debt_to_equity_ratio_too_high", - "decrease_in_income_to_expense_ratio", - "decrease_in_social_media_performance", - "delinquent_credit_obligations", - "dispute_rate_too_high", - "duration_of_residence", - "exceeds_acceptable_platform_exposure", - "excessive_income_or_revenue_obligations", - "expenses_to_cash_balance_ratio_too_high", - "foreclosure_or_repossession", - "frozen_file_at_credit_bureau", - "garnishment_or_attachment", - "government_loan_program_criteria", - "has_recent_credit_limit_increase", - "high_concentration_of_clients", - "high_risk_industry", - "incomplete_application", - "inconsistent_monthly_revenues", - "insufficient_account_history_with_platform", - "insufficient_bank_account_history", - "insufficient_cash_balance", - "insufficient_cash_flow", - "insufficient_collateral", - "insufficient_credit_experience", - "insufficient_credit_utilization", - "insufficient_deposits", - "insufficient_income", - "insufficient_margin_ratio", - "insufficient_operating_profit", - "insufficient_period_in_operation", - "insufficient_reserves", - "insufficient_revenue", - "insufficient_social_media_performance", - "insufficient_time_in_network", - "insufficient_trade_credit_insurance", - "insufficient_usage_as_qualified_expenses", - "invalid_business_license", - "lacking_cash_account", - "late_payment_history_reported_to_bureau", - "lien_collection_action_or_judgement", - "negative_public_information", - "no_credit_file", - "other", - "outside_supported_country", - "outside_supported_state", - "poor_payment_history_with_platform", - "prior_or_current_legal_action", - "prohibited_industry", - "rate_of_cash_balance_fluctuation_too_high", - "recent_inquiries_on_business_credit_report", - "removal_of_bank_account_connection", - "revenue_discrepancy", - "runway_too_short", - "suspected_fraud", - "too_many_non_sufficient_funds_or_overdrafts", - "unable_to_verify_address", - "unable_to_verify_identity", - "unable_to_verify_income_or_revenue", - "unprofitable", - "unsupportable_business_type", - ] - ] - """ - List of reasons why the existing credit was decreased, up to 4 reasons, in order of importance. - """ - - class CorrectParamsDecisionCreditLineClosed(TypedDict): - reason_other_explanation: NotRequired[str] - """ - Details about the `reasons.other` when present. - """ - reasons: List[ - Literal[ - "applicant_is_not_beneficial_owner", - "applicant_too_young", - "application_is_not_beneficial_owner", - "bankruptcy", - "business_size_too_small", - "change_in_financial_state", - "change_in_utilization_of_credit_line", - "current_account_tier_ineligible", - "customer_already_exists", - "customer_requested_account_closure", - "debt_to_cash_balance_ratio_too_high", - "debt_to_equity_ratio_too_high", - "decrease_in_income_to_expense_ratio", - "decrease_in_social_media_performance", - "delinquent_credit_obligations", - "dispute_rate_too_high", - "duration_of_residence", - "exceeds_acceptable_platform_exposure", - "excessive_income_or_revenue_obligations", - "expenses_to_cash_balance_ratio_too_high", - "foreclosure_or_repossession", - "frozen_file_at_credit_bureau", - "garnishment_or_attachment", - "government_loan_program_criteria", - "has_recent_credit_limit_increase", - "high_concentration_of_clients", - "high_risk_industry", - "incomplete_application", - "inconsistent_monthly_revenues", - "insufficient_account_history_with_platform", - "insufficient_bank_account_history", - "insufficient_cash_balance", - "insufficient_cash_flow", - "insufficient_collateral", - "insufficient_credit_experience", - "insufficient_credit_utilization", - "insufficient_deposits", - "insufficient_income", - "insufficient_margin_ratio", - "insufficient_operating_profit", - "insufficient_period_in_operation", - "insufficient_reserves", - "insufficient_revenue", - "insufficient_social_media_performance", - "insufficient_time_in_network", - "insufficient_trade_credit_insurance", - "insufficient_usage_as_qualified_expenses", - "invalid_business_license", - "lacking_cash_account", - "late_payment_history_reported_to_bureau", - "lien_collection_action_or_judgement", - "negative_public_information", - "no_credit_file", - "other", - "outside_supported_country", - "outside_supported_state", - "poor_payment_history_with_platform", - "prior_or_current_legal_action", - "prohibited_industry", - "rate_of_cash_balance_fluctuation_too_high", - "recent_inquiries_on_business_credit_report", - "removal_of_bank_account_connection", - "revenue_discrepancy", - "runway_too_short", - "suspected_fraud", - "too_many_non_sufficient_funds_or_overdrafts", - "unable_to_verify_address", - "unable_to_verify_identity", - "unable_to_verify_income_or_revenue", - "unprofitable", - "unsupportable_business_type", - ] - ] - """ - List of reasons why the credit line was closed, up to 4 reasons, in order of importance. - """ - - class CorrectParamsUnderwritingException(TypedDict): - explanation: str - """ - Written explanation for the exception. - """ - original_decision_type: Literal[ - "additional_information_requested", - "application_rejected", - "credit_limit_approved", - "credit_limit_decreased", - "credit_line_closed", - "no_changes", - "withdrawn_by_applicant", - ] - """ - The decision before the exception was applied. - """ - - class CreateFromApplicationParams(TypedDict): - application: "CreditUnderwritingRecordService.CreateFromApplicationParamsApplication" - """ - Details about the application submission. - """ - credit_user: "CreditUnderwritingRecordService.CreateFromApplicationParamsCreditUser" - """ - Information about the company or person applying or holding the account. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - - class CreateFromApplicationParamsApplication(TypedDict): - application_method: NotRequired[ - Literal["in_person", "mail", "online", "phone"] - ] - """ - The channel through which the applicant has submitted their application. Defaults to `online`. - """ - purpose: Literal["credit_limit_increase", "credit_line_opening"] - """ - Scope of demand made by the applicant. - """ - submitted_at: int - """ - Date when the applicant submitted their application. - """ - - class CreateFromApplicationParamsCreditUser(TypedDict): - email: str - """ - Email of the applicant or accountholder. - """ - name: str - """ - Full name of the company or person. - """ - - class CreateFromProactiveReviewParams(TypedDict): - credit_user: "CreditUnderwritingRecordService.CreateFromProactiveReviewParamsCreditUser" - """ - Information about the company or person applying or holding the account. - """ - decided_at: int - """ - Date when a decision was made. - """ - decision: "CreditUnderwritingRecordService.CreateFromProactiveReviewParamsDecision" - """ - Details about the decision. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - regulatory_reporting_file: NotRequired[str] - """ - File containing regulatory reporting data for the decision. Required if you are subject to this [reporting requirement](https://stripe.com/docs/issuing/credit/report-required-regulatory-data-for-credit-decisions). - """ - underwriting_exception: NotRequired[ - "CreditUnderwritingRecordService.CreateFromProactiveReviewParamsUnderwritingException" - ] - """ - If an exception to the usual underwriting criteria was made for this decision, details about the exception must be provided. Exceptions should only be granted in rare circumstances, in consultation with Stripe Compliance. - """ - - class CreateFromProactiveReviewParamsCreditUser(TypedDict): - email: str - """ - Email of the applicant or accountholder. - """ - name: str - """ - Full name of the company or person. - """ - - class CreateFromProactiveReviewParamsDecision(TypedDict): - credit_limit_approved: NotRequired[ - "CreditUnderwritingRecordService.CreateFromProactiveReviewParamsDecisionCreditLimitApproved" - ] - """ - Details about the credit limit approved. An approved credit limit is required before you can set a `credit_limit_amount` in the [CreditPolicy API](https://stripe.com/docs/api/issuing/credit_policy/) - """ - credit_limit_decreased: NotRequired[ - "CreditUnderwritingRecordService.CreateFromProactiveReviewParamsDecisionCreditLimitDecreased" - ] - """ - Details about the credit limit decreased. - """ - credit_line_closed: NotRequired[ - "CreditUnderwritingRecordService.CreateFromProactiveReviewParamsDecisionCreditLineClosed" - ] - """ - Details about the credit line closed. - """ - type: Literal[ - "credit_limit_approved", - "credit_limit_decreased", - "credit_line_closed", - "no_changes", - ] - """ - Outcome of the decision. - """ - - class CreateFromProactiveReviewParamsDecisionCreditLimitApproved( - TypedDict - ): - amount: int - """ - The credit approved, in the currency of the account and [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). - """ - currency: NotRequired[str] - """ - The currency of the credit approved, will default to the Account's Issuing currency. - """ - - class CreateFromProactiveReviewParamsDecisionCreditLimitDecreased( - TypedDict, - ): - amount: int - """ - The credit approved, in the currency of the account and [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). - """ - currency: NotRequired[str] - """ - The currency of the credit approved, will default to the Account's Issuing currency. - """ - reason_other_explanation: NotRequired[str] - """ - Details about the `reasons.other` when present. - """ - reasons: List[ - Literal[ - "applicant_is_not_beneficial_owner", - "applicant_too_young", - "application_is_not_beneficial_owner", - "bankruptcy", - "business_size_too_small", - "change_in_financial_state", - "change_in_utilization_of_credit_line", - "current_account_tier_ineligible", - "customer_already_exists", - "customer_requested_account_closure", - "debt_to_cash_balance_ratio_too_high", - "debt_to_equity_ratio_too_high", - "decrease_in_income_to_expense_ratio", - "decrease_in_social_media_performance", - "delinquent_credit_obligations", - "dispute_rate_too_high", - "duration_of_residence", - "exceeds_acceptable_platform_exposure", - "excessive_income_or_revenue_obligations", - "expenses_to_cash_balance_ratio_too_high", - "foreclosure_or_repossession", - "frozen_file_at_credit_bureau", - "garnishment_or_attachment", - "government_loan_program_criteria", - "has_recent_credit_limit_increase", - "high_concentration_of_clients", - "high_risk_industry", - "incomplete_application", - "inconsistent_monthly_revenues", - "insufficient_account_history_with_platform", - "insufficient_bank_account_history", - "insufficient_cash_balance", - "insufficient_cash_flow", - "insufficient_collateral", - "insufficient_credit_experience", - "insufficient_credit_utilization", - "insufficient_deposits", - "insufficient_income", - "insufficient_margin_ratio", - "insufficient_operating_profit", - "insufficient_period_in_operation", - "insufficient_reserves", - "insufficient_revenue", - "insufficient_social_media_performance", - "insufficient_time_in_network", - "insufficient_trade_credit_insurance", - "insufficient_usage_as_qualified_expenses", - "invalid_business_license", - "lacking_cash_account", - "late_payment_history_reported_to_bureau", - "lien_collection_action_or_judgement", - "negative_public_information", - "no_credit_file", - "other", - "outside_supported_country", - "outside_supported_state", - "poor_payment_history_with_platform", - "prior_or_current_legal_action", - "prohibited_industry", - "rate_of_cash_balance_fluctuation_too_high", - "recent_inquiries_on_business_credit_report", - "removal_of_bank_account_connection", - "revenue_discrepancy", - "runway_too_short", - "suspected_fraud", - "too_many_non_sufficient_funds_or_overdrafts", - "unable_to_verify_address", - "unable_to_verify_identity", - "unable_to_verify_income_or_revenue", - "unprofitable", - "unsupportable_business_type", - ] - ] - """ - List of reasons why the existing credit was decreased, up to 4 reasons, in order of importance. - """ - - class CreateFromProactiveReviewParamsDecisionCreditLineClosed(TypedDict): - reason_other_explanation: NotRequired[str] - """ - Details about the `reasons.other` when present. - """ - reasons: List[ - Literal[ - "applicant_is_not_beneficial_owner", - "applicant_too_young", - "application_is_not_beneficial_owner", - "bankruptcy", - "business_size_too_small", - "change_in_financial_state", - "change_in_utilization_of_credit_line", - "current_account_tier_ineligible", - "customer_already_exists", - "customer_requested_account_closure", - "debt_to_cash_balance_ratio_too_high", - "debt_to_equity_ratio_too_high", - "decrease_in_income_to_expense_ratio", - "decrease_in_social_media_performance", - "delinquent_credit_obligations", - "dispute_rate_too_high", - "duration_of_residence", - "exceeds_acceptable_platform_exposure", - "excessive_income_or_revenue_obligations", - "expenses_to_cash_balance_ratio_too_high", - "foreclosure_or_repossession", - "frozen_file_at_credit_bureau", - "garnishment_or_attachment", - "government_loan_program_criteria", - "has_recent_credit_limit_increase", - "high_concentration_of_clients", - "high_risk_industry", - "incomplete_application", - "inconsistent_monthly_revenues", - "insufficient_account_history_with_platform", - "insufficient_bank_account_history", - "insufficient_cash_balance", - "insufficient_cash_flow", - "insufficient_collateral", - "insufficient_credit_experience", - "insufficient_credit_utilization", - "insufficient_deposits", - "insufficient_income", - "insufficient_margin_ratio", - "insufficient_operating_profit", - "insufficient_period_in_operation", - "insufficient_reserves", - "insufficient_revenue", - "insufficient_social_media_performance", - "insufficient_time_in_network", - "insufficient_trade_credit_insurance", - "insufficient_usage_as_qualified_expenses", - "invalid_business_license", - "lacking_cash_account", - "late_payment_history_reported_to_bureau", - "lien_collection_action_or_judgement", - "negative_public_information", - "no_credit_file", - "other", - "outside_supported_country", - "outside_supported_state", - "poor_payment_history_with_platform", - "prior_or_current_legal_action", - "prohibited_industry", - "rate_of_cash_balance_fluctuation_too_high", - "recent_inquiries_on_business_credit_report", - "removal_of_bank_account_connection", - "revenue_discrepancy", - "runway_too_short", - "suspected_fraud", - "too_many_non_sufficient_funds_or_overdrafts", - "unable_to_verify_address", - "unable_to_verify_identity", - "unable_to_verify_income_or_revenue", - "unprofitable", - "unsupportable_business_type", - ] - ] - """ - List of reasons why the credit line was closed, up to 4 reasons, in order of importance. - """ - - class CreateFromProactiveReviewParamsUnderwritingException(TypedDict): - explanation: str - """ - Written explanation for the exception. - """ - original_decision_type: Literal[ - "additional_information_requested", - "application_rejected", - "credit_limit_approved", - "credit_limit_decreased", - "credit_line_closed", - "no_changes", - "withdrawn_by_applicant", - ] - """ - The decision before the exception was applied. - """ - - class ListParams(TypedDict): - 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 ReportDecisionParams(TypedDict): - decided_at: int - """ - Date when a decision was made. - """ - decision: ( - "CreditUnderwritingRecordService.ReportDecisionParamsDecision" - ) - """ - Details about the decision. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - regulatory_reporting_file: NotRequired[str] - """ - File containing regulatory reporting data for the decision. Required if you are subject to this [reporting requirement](https://stripe.com/docs/issuing/credit/report-required-regulatory-data-for-credit-decisions). - """ - underwriting_exception: NotRequired[ - "CreditUnderwritingRecordService.ReportDecisionParamsUnderwritingException" - ] - """ - If an exception to the usual underwriting criteria was made for this decision, details about the exception must be provided. Exceptions should only be granted in rare circumstances, in consultation with Stripe Compliance. - """ - - class ReportDecisionParamsDecision(TypedDict): - application_rejected: NotRequired[ - "CreditUnderwritingRecordService.ReportDecisionParamsDecisionApplicationRejected" - ] - """ - Details about the application rejection. - """ - credit_limit_approved: NotRequired[ - "CreditUnderwritingRecordService.ReportDecisionParamsDecisionCreditLimitApproved" - ] - """ - Details about the credit limit approved. An approved credit limit is required before you can set a `credit_limit_amount` in the [CreditPolicy API](https://stripe.com/docs/api/issuing/credit_policy/) - """ - type: Literal[ - "additional_information_requested", - "application_rejected", - "credit_limit_approved", - "withdrawn_by_applicant", - ] - """ - Outcome of the decision. - """ - - class ReportDecisionParamsDecisionApplicationRejected(TypedDict): - reason_other_explanation: NotRequired[str] - """ - Details about the `reasons.other` when present. - """ - reasons: List[ - Literal[ - "applicant_is_not_beneficial_owner", - "applicant_too_young", - "application_is_not_beneficial_owner", - "bankruptcy", - "business_size_too_small", - "current_account_tier_ineligible", - "customer_already_exists", - "customer_requested_account_closure", - "debt_to_cash_balance_ratio_too_high", - "debt_to_equity_ratio_too_high", - "delinquent_credit_obligations", - "dispute_rate_too_high", - "duration_of_residence", - "excessive_income_or_revenue_obligations", - "expenses_to_cash_balance_ratio_too_high", - "foreclosure_or_repossession", - "frozen_file_at_credit_bureau", - "garnishment_or_attachment", - "government_loan_program_criteria", - "high_concentration_of_clients", - "high_risk_industry", - "incomplete_application", - "inconsistent_monthly_revenues", - "insufficient_account_history_with_platform", - "insufficient_bank_account_history", - "insufficient_cash_balance", - "insufficient_cash_flow", - "insufficient_collateral", - "insufficient_credit_experience", - "insufficient_deposits", - "insufficient_income", - "insufficient_margin_ratio", - "insufficient_operating_profit", - "insufficient_period_in_operation", - "insufficient_reserves", - "insufficient_revenue", - "insufficient_social_media_performance", - "insufficient_time_in_network", - "insufficient_trade_credit_insurance", - "invalid_business_license", - "lacking_cash_account", - "late_payment_history_reported_to_bureau", - "lien_collection_action_or_judgement", - "negative_public_information", - "no_credit_file", - "other", - "outside_supported_country", - "outside_supported_state", - "poor_payment_history_with_platform", - "prior_or_current_legal_action", - "prohibited_industry", - "rate_of_cash_balance_fluctuation_too_high", - "recent_inquiries_on_business_credit_report", - "removal_of_bank_account_connection", - "revenue_discrepancy", - "runway_too_short", - "suspected_fraud", - "too_many_non_sufficient_funds_or_overdrafts", - "unable_to_verify_address", - "unable_to_verify_identity", - "unable_to_verify_income_or_revenue", - "unprofitable", - "unsupportable_business_type", - ] - ] - """ - List of reasons why the application was rejected, up to 4 reasons, in order of importance. - """ - - class ReportDecisionParamsDecisionCreditLimitApproved(TypedDict): - amount: int - """ - The credit approved, in the currency of the account and [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). - """ - currency: NotRequired[str] - """ - The currency of the credit approved, will default to the Account's Issuing currency. - """ - - class ReportDecisionParamsUnderwritingException(TypedDict): - explanation: str - """ - Written explanation for the exception. - """ - original_decision_type: Literal[ - "additional_information_requested", - "application_rejected", - "credit_limit_approved", - "credit_limit_decreased", - "credit_line_closed", - "no_changes", - "withdrawn_by_applicant", - ] - """ - The decision before the exception was applied. - """ - - class RetrieveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - def list( self, - params: Optional["CreditUnderwritingRecordService.ListParams"] = None, + params: Optional["CreditUnderwritingRecordListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[CreditUnderwritingRecord]: """ @@ -921,7 +51,7 @@ def list( async def list_async( self, - params: Optional["CreditUnderwritingRecordService.ListParams"] = None, + params: Optional["CreditUnderwritingRecordListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[CreditUnderwritingRecord]: """ @@ -941,9 +71,7 @@ async def list_async( def retrieve( self, credit_underwriting_record: str, - params: Optional[ - "CreditUnderwritingRecordService.RetrieveParams" - ] = None, + params: Optional["CreditUnderwritingRecordRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> CreditUnderwritingRecord: """ @@ -967,9 +95,7 @@ def retrieve( async def retrieve_async( self, credit_underwriting_record: str, - params: Optional[ - "CreditUnderwritingRecordService.RetrieveParams" - ] = None, + params: Optional["CreditUnderwritingRecordRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> CreditUnderwritingRecord: """ @@ -993,9 +119,7 @@ async def retrieve_async( def correct( self, credit_underwriting_record: str, - params: Optional[ - "CreditUnderwritingRecordService.CorrectParams" - ] = None, + params: Optional["CreditUnderwritingRecordCorrectParams"] = None, options: Optional[RequestOptions] = None, ) -> CreditUnderwritingRecord: """ @@ -1019,9 +143,7 @@ def correct( async def correct_async( self, credit_underwriting_record: str, - params: Optional[ - "CreditUnderwritingRecordService.CorrectParams" - ] = None, + params: Optional["CreditUnderwritingRecordCorrectParams"] = None, options: Optional[RequestOptions] = None, ) -> CreditUnderwritingRecord: """ @@ -1045,7 +167,7 @@ async def correct_async( def report_decision( self, credit_underwriting_record: str, - params: "CreditUnderwritingRecordService.ReportDecisionParams", + params: "CreditUnderwritingRecordReportDecisionParams", options: Optional[RequestOptions] = None, ) -> CreditUnderwritingRecord: """ @@ -1069,7 +191,7 @@ def report_decision( async def report_decision_async( self, credit_underwriting_record: str, - params: "CreditUnderwritingRecordService.ReportDecisionParams", + params: "CreditUnderwritingRecordReportDecisionParams", options: Optional[RequestOptions] = None, ) -> CreditUnderwritingRecord: """ @@ -1092,7 +214,7 @@ async def report_decision_async( def create_from_application( self, - params: "CreditUnderwritingRecordService.CreateFromApplicationParams", + params: "CreditUnderwritingRecordCreateFromApplicationParams", options: Optional[RequestOptions] = None, ) -> CreditUnderwritingRecord: """ @@ -1111,7 +233,7 @@ def create_from_application( async def create_from_application_async( self, - params: "CreditUnderwritingRecordService.CreateFromApplicationParams", + params: "CreditUnderwritingRecordCreateFromApplicationParams", options: Optional[RequestOptions] = None, ) -> CreditUnderwritingRecord: """ @@ -1130,7 +252,7 @@ async def create_from_application_async( def create_from_proactive_review( self, - params: "CreditUnderwritingRecordService.CreateFromProactiveReviewParams", + params: "CreditUnderwritingRecordCreateFromProactiveReviewParams", options: Optional[RequestOptions] = None, ) -> CreditUnderwritingRecord: """ @@ -1149,7 +271,7 @@ def create_from_proactive_review( async def create_from_proactive_review_async( self, - params: "CreditUnderwritingRecordService.CreateFromProactiveReviewParams", + params: "CreditUnderwritingRecordCreateFromProactiveReviewParams", options: Optional[RequestOptions] = None, ) -> CreditUnderwritingRecord: """ diff --git a/stripe/issuing/_dispute.py b/stripe/issuing/_dispute.py index b6a200243..2be6f914d 100644 --- a/stripe/issuing/_dispute.py +++ b/stripe/issuing/_dispute.py @@ -4,23 +4,29 @@ from stripe._expandable_field import ExpandableField from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource -from stripe._request_options import RequestOptions from stripe._stripe_object import StripeObject from stripe._updateable_api_resource import UpdateableAPIResource from stripe._util import class_method_variant, sanitize_id from typing import ClassVar, Dict, List, Optional, cast, overload -from typing_extensions import ( - Literal, - NotRequired, - TypedDict, - Unpack, - TYPE_CHECKING, -) +from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: from stripe._balance_transaction import BalanceTransaction from stripe._file import File from stripe.issuing._transaction import Transaction + from stripe.params.issuing._dispute_create_params import ( + DisputeCreateParams, + ) + from stripe.params.issuing._dispute_list_params import DisputeListParams + from stripe.params.issuing._dispute_modify_params import ( + DisputeModifyParams, + ) + from stripe.params.issuing._dispute_retrieve_params import ( + DisputeRetrieveParams, + ) + from stripe.params.issuing._dispute_submit_params import ( + DisputeSubmitParams, + ) class Dispute( @@ -255,620 +261,6 @@ class Treasury(StripeObject): The Treasury [ReceivedDebit](https://stripe.com/docs/api/treasury/received_debits) that is being disputed. """ - class CreateParams(RequestOptions): - amount: NotRequired[int] - """ - The dispute amount in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). If not set, defaults to the full transaction amount. - """ - evidence: NotRequired["Dispute.CreateParamsEvidence"] - """ - Evidence provided for the dispute. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - transaction: NotRequired[str] - """ - The ID of the issuing transaction to create a dispute for. For transaction on Treasury FinancialAccounts, use `treasury.received_debit`. - """ - treasury: NotRequired["Dispute.CreateParamsTreasury"] - """ - Params for disputes related to Treasury FinancialAccounts - """ - - class CreateParamsEvidence(TypedDict): - canceled: NotRequired[ - "Literal['']|Dispute.CreateParamsEvidenceCanceled" - ] - """ - Evidence provided when `reason` is 'canceled'. - """ - duplicate: NotRequired[ - "Literal['']|Dispute.CreateParamsEvidenceDuplicate" - ] - """ - Evidence provided when `reason` is 'duplicate'. - """ - fraudulent: NotRequired[ - "Literal['']|Dispute.CreateParamsEvidenceFraudulent" - ] - """ - Evidence provided when `reason` is 'fraudulent'. - """ - merchandise_not_as_described: NotRequired[ - "Literal['']|Dispute.CreateParamsEvidenceMerchandiseNotAsDescribed" - ] - """ - Evidence provided when `reason` is 'merchandise_not_as_described'. - """ - no_valid_authorization: NotRequired[ - "Literal['']|Dispute.CreateParamsEvidenceNoValidAuthorization" - ] - """ - Evidence provided when `reason` is 'no_valid_authorization'. - """ - not_received: NotRequired[ - "Literal['']|Dispute.CreateParamsEvidenceNotReceived" - ] - """ - Evidence provided when `reason` is 'not_received'. - """ - other: NotRequired["Literal['']|Dispute.CreateParamsEvidenceOther"] - """ - Evidence provided when `reason` is 'other'. - """ - reason: NotRequired[ - Literal[ - "canceled", - "duplicate", - "fraudulent", - "merchandise_not_as_described", - "no_valid_authorization", - "not_received", - "other", - "service_not_as_described", - ] - ] - """ - The reason for filing the dispute. The evidence should be submitted in the field of the same name. - """ - service_not_as_described: NotRequired[ - "Literal['']|Dispute.CreateParamsEvidenceServiceNotAsDescribed" - ] - """ - Evidence provided when `reason` is 'service_not_as_described'. - """ - - class CreateParamsEvidenceCanceled(TypedDict): - additional_documentation: NotRequired["Literal['']|str"] - """ - (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. - """ - canceled_at: NotRequired["Literal['']|int"] - """ - Date when order was canceled. - """ - cancellation_policy_provided: NotRequired["Literal['']|bool"] - """ - Whether the cardholder was provided with a cancellation policy. - """ - cancellation_reason: NotRequired["Literal['']|str"] - """ - Reason for canceling the order. - """ - expected_at: NotRequired["Literal['']|int"] - """ - Date when the cardholder expected to receive the product. - """ - explanation: NotRequired["Literal['']|str"] - """ - Explanation of why the cardholder is disputing this transaction. - """ - product_description: NotRequired["Literal['']|str"] - """ - Description of the merchandise or service that was purchased. - """ - product_type: NotRequired[ - "Literal['']|Literal['merchandise', 'service']" - ] - """ - Whether the product was a merchandise or service. - """ - return_status: NotRequired[ - "Literal['']|Literal['merchant_rejected', 'successful']" - ] - """ - Result of cardholder's attempt to return the product. - """ - returned_at: NotRequired["Literal['']|int"] - """ - Date when the product was returned or attempted to be returned. - """ - - class CreateParamsEvidenceDuplicate(TypedDict): - additional_documentation: NotRequired["Literal['']|str"] - """ - (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. - """ - card_statement: NotRequired["Literal['']|str"] - """ - (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Copy of the card statement showing that the product had already been paid for. - """ - cash_receipt: NotRequired["Literal['']|str"] - """ - (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Copy of the receipt showing that the product had been paid for in cash. - """ - check_image: NotRequired["Literal['']|str"] - """ - (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Image of the front and back of the check that was used to pay for the product. - """ - explanation: NotRequired["Literal['']|str"] - """ - Explanation of why the cardholder is disputing this transaction. - """ - original_transaction: NotRequired[str] - """ - Transaction (e.g., ipi_...) that the disputed transaction is a duplicate of. Of the two or more transactions that are copies of each other, this is original undisputed one. - """ - - class CreateParamsEvidenceFraudulent(TypedDict): - additional_documentation: NotRequired["Literal['']|str"] - """ - (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. - """ - explanation: NotRequired["Literal['']|str"] - """ - Explanation of why the cardholder is disputing this transaction. - """ - - class CreateParamsEvidenceMerchandiseNotAsDescribed(TypedDict): - additional_documentation: NotRequired["Literal['']|str"] - """ - (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. - """ - explanation: NotRequired["Literal['']|str"] - """ - Explanation of why the cardholder is disputing this transaction. - """ - received_at: NotRequired["Literal['']|int"] - """ - Date when the product was received. - """ - return_description: NotRequired["Literal['']|str"] - """ - Description of the cardholder's attempt to return the product. - """ - return_status: NotRequired[ - "Literal['']|Literal['merchant_rejected', 'successful']" - ] - """ - Result of cardholder's attempt to return the product. - """ - returned_at: NotRequired["Literal['']|int"] - """ - Date when the product was returned or attempted to be returned. - """ - - class CreateParamsEvidenceNoValidAuthorization(TypedDict): - additional_documentation: NotRequired["Literal['']|str"] - """ - (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. - """ - explanation: NotRequired["Literal['']|str"] - """ - Explanation of why the cardholder is disputing this transaction. - """ - - class CreateParamsEvidenceNotReceived(TypedDict): - additional_documentation: NotRequired["Literal['']|str"] - """ - (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. - """ - expected_at: NotRequired["Literal['']|int"] - """ - Date when the cardholder expected to receive the product. - """ - explanation: NotRequired["Literal['']|str"] - """ - Explanation of why the cardholder is disputing this transaction. - """ - product_description: NotRequired["Literal['']|str"] - """ - Description of the merchandise or service that was purchased. - """ - product_type: NotRequired[ - "Literal['']|Literal['merchandise', 'service']" - ] - """ - Whether the product was a merchandise or service. - """ - - class CreateParamsEvidenceOther(TypedDict): - additional_documentation: NotRequired["Literal['']|str"] - """ - (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. - """ - explanation: NotRequired["Literal['']|str"] - """ - Explanation of why the cardholder is disputing this transaction. - """ - product_description: NotRequired["Literal['']|str"] - """ - Description of the merchandise or service that was purchased. - """ - product_type: NotRequired[ - "Literal['']|Literal['merchandise', 'service']" - ] - """ - Whether the product was a merchandise or service. - """ - - class CreateParamsEvidenceServiceNotAsDescribed(TypedDict): - additional_documentation: NotRequired["Literal['']|str"] - """ - (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. - """ - canceled_at: NotRequired["Literal['']|int"] - """ - Date when order was canceled. - """ - cancellation_reason: NotRequired["Literal['']|str"] - """ - Reason for canceling the order. - """ - explanation: NotRequired["Literal['']|str"] - """ - Explanation of why the cardholder is disputing this transaction. - """ - received_at: NotRequired["Literal['']|int"] - """ - Date when the product was received. - """ - - class CreateParamsTreasury(TypedDict): - received_debit: str - """ - The ID of the ReceivedDebit to initiate an Issuings dispute for. - """ - - class ListParams(RequestOptions): - created: NotRequired["Dispute.ListParamsCreated|int"] - """ - Only return Issuing disputes that were created during the given date interval. - """ - 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. - """ - status: NotRequired[ - Literal["expired", "lost", "submitted", "unsubmitted", "won"] - ] - """ - Select Issuing disputes with the given status. - """ - transaction: NotRequired[str] - """ - Select the Issuing dispute for the given transaction. - """ - - class ListParamsCreated(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) - """ - - class ModifyParams(RequestOptions): - amount: NotRequired[int] - """ - The dispute amount in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). - """ - evidence: NotRequired["Dispute.ModifyParamsEvidence"] - """ - Evidence provided for the dispute. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - - class ModifyParamsEvidence(TypedDict): - canceled: NotRequired[ - "Literal['']|Dispute.ModifyParamsEvidenceCanceled" - ] - """ - Evidence provided when `reason` is 'canceled'. - """ - duplicate: NotRequired[ - "Literal['']|Dispute.ModifyParamsEvidenceDuplicate" - ] - """ - Evidence provided when `reason` is 'duplicate'. - """ - fraudulent: NotRequired[ - "Literal['']|Dispute.ModifyParamsEvidenceFraudulent" - ] - """ - Evidence provided when `reason` is 'fraudulent'. - """ - merchandise_not_as_described: NotRequired[ - "Literal['']|Dispute.ModifyParamsEvidenceMerchandiseNotAsDescribed" - ] - """ - Evidence provided when `reason` is 'merchandise_not_as_described'. - """ - no_valid_authorization: NotRequired[ - "Literal['']|Dispute.ModifyParamsEvidenceNoValidAuthorization" - ] - """ - Evidence provided when `reason` is 'no_valid_authorization'. - """ - not_received: NotRequired[ - "Literal['']|Dispute.ModifyParamsEvidenceNotReceived" - ] - """ - Evidence provided when `reason` is 'not_received'. - """ - other: NotRequired["Literal['']|Dispute.ModifyParamsEvidenceOther"] - """ - Evidence provided when `reason` is 'other'. - """ - reason: NotRequired[ - Literal[ - "canceled", - "duplicate", - "fraudulent", - "merchandise_not_as_described", - "no_valid_authorization", - "not_received", - "other", - "service_not_as_described", - ] - ] - """ - The reason for filing the dispute. The evidence should be submitted in the field of the same name. - """ - service_not_as_described: NotRequired[ - "Literal['']|Dispute.ModifyParamsEvidenceServiceNotAsDescribed" - ] - """ - Evidence provided when `reason` is 'service_not_as_described'. - """ - - class ModifyParamsEvidenceCanceled(TypedDict): - additional_documentation: NotRequired["Literal['']|str"] - """ - (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. - """ - canceled_at: NotRequired["Literal['']|int"] - """ - Date when order was canceled. - """ - cancellation_policy_provided: NotRequired["Literal['']|bool"] - """ - Whether the cardholder was provided with a cancellation policy. - """ - cancellation_reason: NotRequired["Literal['']|str"] - """ - Reason for canceling the order. - """ - expected_at: NotRequired["Literal['']|int"] - """ - Date when the cardholder expected to receive the product. - """ - explanation: NotRequired["Literal['']|str"] - """ - Explanation of why the cardholder is disputing this transaction. - """ - product_description: NotRequired["Literal['']|str"] - """ - Description of the merchandise or service that was purchased. - """ - product_type: NotRequired[ - "Literal['']|Literal['merchandise', 'service']" - ] - """ - Whether the product was a merchandise or service. - """ - return_status: NotRequired[ - "Literal['']|Literal['merchant_rejected', 'successful']" - ] - """ - Result of cardholder's attempt to return the product. - """ - returned_at: NotRequired["Literal['']|int"] - """ - Date when the product was returned or attempted to be returned. - """ - - class ModifyParamsEvidenceDuplicate(TypedDict): - additional_documentation: NotRequired["Literal['']|str"] - """ - (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. - """ - card_statement: NotRequired["Literal['']|str"] - """ - (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Copy of the card statement showing that the product had already been paid for. - """ - cash_receipt: NotRequired["Literal['']|str"] - """ - (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Copy of the receipt showing that the product had been paid for in cash. - """ - check_image: NotRequired["Literal['']|str"] - """ - (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Image of the front and back of the check that was used to pay for the product. - """ - explanation: NotRequired["Literal['']|str"] - """ - Explanation of why the cardholder is disputing this transaction. - """ - original_transaction: NotRequired[str] - """ - Transaction (e.g., ipi_...) that the disputed transaction is a duplicate of. Of the two or more transactions that are copies of each other, this is original undisputed one. - """ - - class ModifyParamsEvidenceFraudulent(TypedDict): - additional_documentation: NotRequired["Literal['']|str"] - """ - (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. - """ - explanation: NotRequired["Literal['']|str"] - """ - Explanation of why the cardholder is disputing this transaction. - """ - - class ModifyParamsEvidenceMerchandiseNotAsDescribed(TypedDict): - additional_documentation: NotRequired["Literal['']|str"] - """ - (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. - """ - explanation: NotRequired["Literal['']|str"] - """ - Explanation of why the cardholder is disputing this transaction. - """ - received_at: NotRequired["Literal['']|int"] - """ - Date when the product was received. - """ - return_description: NotRequired["Literal['']|str"] - """ - Description of the cardholder's attempt to return the product. - """ - return_status: NotRequired[ - "Literal['']|Literal['merchant_rejected', 'successful']" - ] - """ - Result of cardholder's attempt to return the product. - """ - returned_at: NotRequired["Literal['']|int"] - """ - Date when the product was returned or attempted to be returned. - """ - - class ModifyParamsEvidenceNoValidAuthorization(TypedDict): - additional_documentation: NotRequired["Literal['']|str"] - """ - (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. - """ - explanation: NotRequired["Literal['']|str"] - """ - Explanation of why the cardholder is disputing this transaction. - """ - - class ModifyParamsEvidenceNotReceived(TypedDict): - additional_documentation: NotRequired["Literal['']|str"] - """ - (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. - """ - expected_at: NotRequired["Literal['']|int"] - """ - Date when the cardholder expected to receive the product. - """ - explanation: NotRequired["Literal['']|str"] - """ - Explanation of why the cardholder is disputing this transaction. - """ - product_description: NotRequired["Literal['']|str"] - """ - Description of the merchandise or service that was purchased. - """ - product_type: NotRequired[ - "Literal['']|Literal['merchandise', 'service']" - ] - """ - Whether the product was a merchandise or service. - """ - - class ModifyParamsEvidenceOther(TypedDict): - additional_documentation: NotRequired["Literal['']|str"] - """ - (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. - """ - explanation: NotRequired["Literal['']|str"] - """ - Explanation of why the cardholder is disputing this transaction. - """ - product_description: NotRequired["Literal['']|str"] - """ - Description of the merchandise or service that was purchased. - """ - product_type: NotRequired[ - "Literal['']|Literal['merchandise', 'service']" - ] - """ - Whether the product was a merchandise or service. - """ - - class ModifyParamsEvidenceServiceNotAsDescribed(TypedDict): - additional_documentation: NotRequired["Literal['']|str"] - """ - (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. - """ - canceled_at: NotRequired["Literal['']|int"] - """ - Date when order was canceled. - """ - cancellation_reason: NotRequired["Literal['']|str"] - """ - Reason for canceling the order. - """ - explanation: NotRequired["Literal['']|str"] - """ - Explanation of why the cardholder is disputing this transaction. - """ - received_at: NotRequired["Literal['']|int"] - """ - Date when the product was received. - """ - - class RetrieveParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class SubmitParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - amount: int """ Disputed amount in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). Usually the amount of the `transaction`, but can differ (usually because of currency fluctuation). @@ -943,7 +335,7 @@ class SubmitParams(RequestOptions): """ @classmethod - def create(cls, **params: Unpack["Dispute.CreateParams"]) -> "Dispute": + def create(cls, **params: Unpack["DisputeCreateParams"]) -> "Dispute": """ Creates an Issuing Dispute object. Individual pieces of evidence within the evidence object are optional at this point. Stripe only validates that required evidence is present during submission. Refer to [Dispute reasons and evidence](https://docs.stripe.com/docs/issuing/purchases/disputes#dispute-reasons-and-evidence) for more details about evidence requirements. """ @@ -958,7 +350,7 @@ def create(cls, **params: Unpack["Dispute.CreateParams"]) -> "Dispute": @classmethod async def create_async( - cls, **params: Unpack["Dispute.CreateParams"] + cls, **params: Unpack["DisputeCreateParams"] ) -> "Dispute": """ Creates an Issuing Dispute object. Individual pieces of evidence within the evidence object are optional at this point. Stripe only validates that required evidence is present during submission. Refer to [Dispute reasons and evidence](https://docs.stripe.com/docs/issuing/purchases/disputes#dispute-reasons-and-evidence) for more details about evidence requirements. @@ -974,7 +366,7 @@ async def create_async( @classmethod def list( - cls, **params: Unpack["Dispute.ListParams"] + cls, **params: Unpack["DisputeListParams"] ) -> ListObject["Dispute"]: """ Returns a list of Issuing Dispute objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first. @@ -994,7 +386,7 @@ def list( @classmethod async def list_async( - cls, **params: Unpack["Dispute.ListParams"] + cls, **params: Unpack["DisputeListParams"] ) -> ListObject["Dispute"]: """ Returns a list of Issuing Dispute objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first. @@ -1014,7 +406,7 @@ async def list_async( @classmethod def modify( - cls, id: str, **params: Unpack["Dispute.ModifyParams"] + cls, id: str, **params: Unpack["DisputeModifyParams"] ) -> "Dispute": """ Updates the specified Issuing Dispute object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. Properties on the evidence object can be unset by passing in an empty string. @@ -1031,7 +423,7 @@ def modify( @classmethod async def modify_async( - cls, id: str, **params: Unpack["Dispute.ModifyParams"] + cls, id: str, **params: Unpack["DisputeModifyParams"] ) -> "Dispute": """ Updates the specified Issuing Dispute object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. Properties on the evidence object can be unset by passing in an empty string. @@ -1048,7 +440,7 @@ async def modify_async( @classmethod def retrieve( - cls, id: str, **params: Unpack["Dispute.RetrieveParams"] + cls, id: str, **params: Unpack["DisputeRetrieveParams"] ) -> "Dispute": """ Retrieves an Issuing Dispute object. @@ -1059,7 +451,7 @@ def retrieve( @classmethod async def retrieve_async( - cls, id: str, **params: Unpack["Dispute.RetrieveParams"] + cls, id: str, **params: Unpack["DisputeRetrieveParams"] ) -> "Dispute": """ Retrieves an Issuing Dispute object. @@ -1070,7 +462,7 @@ async def retrieve_async( @classmethod def _cls_submit( - cls, dispute: str, **params: Unpack["Dispute.SubmitParams"] + cls, dispute: str, **params: Unpack["DisputeSubmitParams"] ) -> "Dispute": """ Submits an Issuing Dispute to the card network. Stripe validates that all evidence fields required for the dispute's reason are present. For more details, see [Dispute reasons and evidence](https://docs.stripe.com/docs/issuing/purchases/disputes#dispute-reasons-and-evidence). @@ -1089,7 +481,7 @@ def _cls_submit( @overload @staticmethod def submit( - dispute: str, **params: Unpack["Dispute.SubmitParams"] + dispute: str, **params: Unpack["DisputeSubmitParams"] ) -> "Dispute": """ Submits an Issuing Dispute to the card network. Stripe validates that all evidence fields required for the dispute's reason are present. For more details, see [Dispute reasons and evidence](https://docs.stripe.com/docs/issuing/purchases/disputes#dispute-reasons-and-evidence). @@ -1097,7 +489,7 @@ def submit( ... @overload - def submit(self, **params: Unpack["Dispute.SubmitParams"]) -> "Dispute": + def submit(self, **params: Unpack["DisputeSubmitParams"]) -> "Dispute": """ Submits an Issuing Dispute to the card network. Stripe validates that all evidence fields required for the dispute's reason are present. For more details, see [Dispute reasons and evidence](https://docs.stripe.com/docs/issuing/purchases/disputes#dispute-reasons-and-evidence). """ @@ -1105,7 +497,7 @@ def submit(self, **params: Unpack["Dispute.SubmitParams"]) -> "Dispute": @class_method_variant("_cls_submit") def submit( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Dispute.SubmitParams"] + self, **params: Unpack["DisputeSubmitParams"] ) -> "Dispute": """ Submits an Issuing Dispute to the card network. Stripe validates that all evidence fields required for the dispute's reason are present. For more details, see [Dispute reasons and evidence](https://docs.stripe.com/docs/issuing/purchases/disputes#dispute-reasons-and-evidence). @@ -1123,7 +515,7 @@ def submit( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_submit_async( - cls, dispute: str, **params: Unpack["Dispute.SubmitParams"] + cls, dispute: str, **params: Unpack["DisputeSubmitParams"] ) -> "Dispute": """ Submits an Issuing Dispute to the card network. Stripe validates that all evidence fields required for the dispute's reason are present. For more details, see [Dispute reasons and evidence](https://docs.stripe.com/docs/issuing/purchases/disputes#dispute-reasons-and-evidence). @@ -1142,7 +534,7 @@ async def _cls_submit_async( @overload @staticmethod async def submit_async( - dispute: str, **params: Unpack["Dispute.SubmitParams"] + dispute: str, **params: Unpack["DisputeSubmitParams"] ) -> "Dispute": """ Submits an Issuing Dispute to the card network. Stripe validates that all evidence fields required for the dispute's reason are present. For more details, see [Dispute reasons and evidence](https://docs.stripe.com/docs/issuing/purchases/disputes#dispute-reasons-and-evidence). @@ -1151,7 +543,7 @@ async def submit_async( @overload async def submit_async( - self, **params: Unpack["Dispute.SubmitParams"] + self, **params: Unpack["DisputeSubmitParams"] ) -> "Dispute": """ Submits an Issuing Dispute to the card network. Stripe validates that all evidence fields required for the dispute's reason are present. For more details, see [Dispute reasons and evidence](https://docs.stripe.com/docs/issuing/purchases/disputes#dispute-reasons-and-evidence). @@ -1160,7 +552,7 @@ async def submit_async( @class_method_variant("_cls_submit_async") async def submit_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Dispute.SubmitParams"] + self, **params: Unpack["DisputeSubmitParams"] ) -> "Dispute": """ Submits an Issuing Dispute to the card network. Stripe validates that all evidence fields required for the dispute's reason are present. For more details, see [Dispute reasons and evidence](https://docs.stripe.com/docs/issuing/purchases/disputes#dispute-reasons-and-evidence). diff --git a/stripe/issuing/_dispute_service.py b/stripe/issuing/_dispute_service.py index e48ceecbc..3d9ae040d 100644 --- a/stripe/issuing/_dispute_service.py +++ b/stripe/issuing/_dispute_service.py @@ -5,632 +5,29 @@ from stripe._stripe_service import StripeService from stripe._util import sanitize_id from stripe.issuing._dispute import Dispute -from typing import Dict, List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params.issuing._dispute_create_params import ( + DisputeCreateParams, + ) + from stripe.params.issuing._dispute_list_params import DisputeListParams + from stripe.params.issuing._dispute_retrieve_params import ( + DisputeRetrieveParams, + ) + from stripe.params.issuing._dispute_submit_params import ( + DisputeSubmitParams, + ) + from stripe.params.issuing._dispute_update_params import ( + DisputeUpdateParams, + ) class DisputeService(StripeService): - class CreateParams(TypedDict): - amount: NotRequired[int] - """ - The dispute amount in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). If not set, defaults to the full transaction amount. - """ - evidence: NotRequired["DisputeService.CreateParamsEvidence"] - """ - Evidence provided for the dispute. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - transaction: NotRequired[str] - """ - The ID of the issuing transaction to create a dispute for. For transaction on Treasury FinancialAccounts, use `treasury.received_debit`. - """ - treasury: NotRequired["DisputeService.CreateParamsTreasury"] - """ - Params for disputes related to Treasury FinancialAccounts - """ - - class CreateParamsEvidence(TypedDict): - canceled: NotRequired[ - "Literal['']|DisputeService.CreateParamsEvidenceCanceled" - ] - """ - Evidence provided when `reason` is 'canceled'. - """ - duplicate: NotRequired[ - "Literal['']|DisputeService.CreateParamsEvidenceDuplicate" - ] - """ - Evidence provided when `reason` is 'duplicate'. - """ - fraudulent: NotRequired[ - "Literal['']|DisputeService.CreateParamsEvidenceFraudulent" - ] - """ - Evidence provided when `reason` is 'fraudulent'. - """ - merchandise_not_as_described: NotRequired[ - "Literal['']|DisputeService.CreateParamsEvidenceMerchandiseNotAsDescribed" - ] - """ - Evidence provided when `reason` is 'merchandise_not_as_described'. - """ - no_valid_authorization: NotRequired[ - "Literal['']|DisputeService.CreateParamsEvidenceNoValidAuthorization" - ] - """ - Evidence provided when `reason` is 'no_valid_authorization'. - """ - not_received: NotRequired[ - "Literal['']|DisputeService.CreateParamsEvidenceNotReceived" - ] - """ - Evidence provided when `reason` is 'not_received'. - """ - other: NotRequired[ - "Literal['']|DisputeService.CreateParamsEvidenceOther" - ] - """ - Evidence provided when `reason` is 'other'. - """ - reason: NotRequired[ - Literal[ - "canceled", - "duplicate", - "fraudulent", - "merchandise_not_as_described", - "no_valid_authorization", - "not_received", - "other", - "service_not_as_described", - ] - ] - """ - The reason for filing the dispute. The evidence should be submitted in the field of the same name. - """ - service_not_as_described: NotRequired[ - "Literal['']|DisputeService.CreateParamsEvidenceServiceNotAsDescribed" - ] - """ - Evidence provided when `reason` is 'service_not_as_described'. - """ - - class CreateParamsEvidenceCanceled(TypedDict): - additional_documentation: NotRequired["Literal['']|str"] - """ - (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. - """ - canceled_at: NotRequired["Literal['']|int"] - """ - Date when order was canceled. - """ - cancellation_policy_provided: NotRequired["Literal['']|bool"] - """ - Whether the cardholder was provided with a cancellation policy. - """ - cancellation_reason: NotRequired["Literal['']|str"] - """ - Reason for canceling the order. - """ - expected_at: NotRequired["Literal['']|int"] - """ - Date when the cardholder expected to receive the product. - """ - explanation: NotRequired["Literal['']|str"] - """ - Explanation of why the cardholder is disputing this transaction. - """ - product_description: NotRequired["Literal['']|str"] - """ - Description of the merchandise or service that was purchased. - """ - product_type: NotRequired[ - "Literal['']|Literal['merchandise', 'service']" - ] - """ - Whether the product was a merchandise or service. - """ - return_status: NotRequired[ - "Literal['']|Literal['merchant_rejected', 'successful']" - ] - """ - Result of cardholder's attempt to return the product. - """ - returned_at: NotRequired["Literal['']|int"] - """ - Date when the product was returned or attempted to be returned. - """ - - class CreateParamsEvidenceDuplicate(TypedDict): - additional_documentation: NotRequired["Literal['']|str"] - """ - (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. - """ - card_statement: NotRequired["Literal['']|str"] - """ - (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Copy of the card statement showing that the product had already been paid for. - """ - cash_receipt: NotRequired["Literal['']|str"] - """ - (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Copy of the receipt showing that the product had been paid for in cash. - """ - check_image: NotRequired["Literal['']|str"] - """ - (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Image of the front and back of the check that was used to pay for the product. - """ - explanation: NotRequired["Literal['']|str"] - """ - Explanation of why the cardholder is disputing this transaction. - """ - original_transaction: NotRequired[str] - """ - Transaction (e.g., ipi_...) that the disputed transaction is a duplicate of. Of the two or more transactions that are copies of each other, this is original undisputed one. - """ - - class CreateParamsEvidenceFraudulent(TypedDict): - additional_documentation: NotRequired["Literal['']|str"] - """ - (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. - """ - explanation: NotRequired["Literal['']|str"] - """ - Explanation of why the cardholder is disputing this transaction. - """ - - class CreateParamsEvidenceMerchandiseNotAsDescribed(TypedDict): - additional_documentation: NotRequired["Literal['']|str"] - """ - (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. - """ - explanation: NotRequired["Literal['']|str"] - """ - Explanation of why the cardholder is disputing this transaction. - """ - received_at: NotRequired["Literal['']|int"] - """ - Date when the product was received. - """ - return_description: NotRequired["Literal['']|str"] - """ - Description of the cardholder's attempt to return the product. - """ - return_status: NotRequired[ - "Literal['']|Literal['merchant_rejected', 'successful']" - ] - """ - Result of cardholder's attempt to return the product. - """ - returned_at: NotRequired["Literal['']|int"] - """ - Date when the product was returned or attempted to be returned. - """ - - class CreateParamsEvidenceNoValidAuthorization(TypedDict): - additional_documentation: NotRequired["Literal['']|str"] - """ - (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. - """ - explanation: NotRequired["Literal['']|str"] - """ - Explanation of why the cardholder is disputing this transaction. - """ - - class CreateParamsEvidenceNotReceived(TypedDict): - additional_documentation: NotRequired["Literal['']|str"] - """ - (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. - """ - expected_at: NotRequired["Literal['']|int"] - """ - Date when the cardholder expected to receive the product. - """ - explanation: NotRequired["Literal['']|str"] - """ - Explanation of why the cardholder is disputing this transaction. - """ - product_description: NotRequired["Literal['']|str"] - """ - Description of the merchandise or service that was purchased. - """ - product_type: NotRequired[ - "Literal['']|Literal['merchandise', 'service']" - ] - """ - Whether the product was a merchandise or service. - """ - - class CreateParamsEvidenceOther(TypedDict): - additional_documentation: NotRequired["Literal['']|str"] - """ - (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. - """ - explanation: NotRequired["Literal['']|str"] - """ - Explanation of why the cardholder is disputing this transaction. - """ - product_description: NotRequired["Literal['']|str"] - """ - Description of the merchandise or service that was purchased. - """ - product_type: NotRequired[ - "Literal['']|Literal['merchandise', 'service']" - ] - """ - Whether the product was a merchandise or service. - """ - - class CreateParamsEvidenceServiceNotAsDescribed(TypedDict): - additional_documentation: NotRequired["Literal['']|str"] - """ - (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. - """ - canceled_at: NotRequired["Literal['']|int"] - """ - Date when order was canceled. - """ - cancellation_reason: NotRequired["Literal['']|str"] - """ - Reason for canceling the order. - """ - explanation: NotRequired["Literal['']|str"] - """ - Explanation of why the cardholder is disputing this transaction. - """ - received_at: NotRequired["Literal['']|int"] - """ - Date when the product was received. - """ - - class CreateParamsTreasury(TypedDict): - received_debit: str - """ - The ID of the ReceivedDebit to initiate an Issuings dispute for. - """ - - class ListParams(TypedDict): - created: NotRequired["DisputeService.ListParamsCreated|int"] - """ - Only return Issuing disputes that were created during the given date interval. - """ - 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. - """ - status: NotRequired[ - Literal["expired", "lost", "submitted", "unsubmitted", "won"] - ] - """ - Select Issuing disputes with the given status. - """ - transaction: NotRequired[str] - """ - Select the Issuing dispute for the given transaction. - """ - - class ListParamsCreated(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) - """ - - class RetrieveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class SubmitParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - - class UpdateParams(TypedDict): - amount: NotRequired[int] - """ - The dispute amount in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). - """ - evidence: NotRequired["DisputeService.UpdateParamsEvidence"] - """ - Evidence provided for the dispute. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - - class UpdateParamsEvidence(TypedDict): - canceled: NotRequired[ - "Literal['']|DisputeService.UpdateParamsEvidenceCanceled" - ] - """ - Evidence provided when `reason` is 'canceled'. - """ - duplicate: NotRequired[ - "Literal['']|DisputeService.UpdateParamsEvidenceDuplicate" - ] - """ - Evidence provided when `reason` is 'duplicate'. - """ - fraudulent: NotRequired[ - "Literal['']|DisputeService.UpdateParamsEvidenceFraudulent" - ] - """ - Evidence provided when `reason` is 'fraudulent'. - """ - merchandise_not_as_described: NotRequired[ - "Literal['']|DisputeService.UpdateParamsEvidenceMerchandiseNotAsDescribed" - ] - """ - Evidence provided when `reason` is 'merchandise_not_as_described'. - """ - no_valid_authorization: NotRequired[ - "Literal['']|DisputeService.UpdateParamsEvidenceNoValidAuthorization" - ] - """ - Evidence provided when `reason` is 'no_valid_authorization'. - """ - not_received: NotRequired[ - "Literal['']|DisputeService.UpdateParamsEvidenceNotReceived" - ] - """ - Evidence provided when `reason` is 'not_received'. - """ - other: NotRequired[ - "Literal['']|DisputeService.UpdateParamsEvidenceOther" - ] - """ - Evidence provided when `reason` is 'other'. - """ - reason: NotRequired[ - Literal[ - "canceled", - "duplicate", - "fraudulent", - "merchandise_not_as_described", - "no_valid_authorization", - "not_received", - "other", - "service_not_as_described", - ] - ] - """ - The reason for filing the dispute. The evidence should be submitted in the field of the same name. - """ - service_not_as_described: NotRequired[ - "Literal['']|DisputeService.UpdateParamsEvidenceServiceNotAsDescribed" - ] - """ - Evidence provided when `reason` is 'service_not_as_described'. - """ - - class UpdateParamsEvidenceCanceled(TypedDict): - additional_documentation: NotRequired["Literal['']|str"] - """ - (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. - """ - canceled_at: NotRequired["Literal['']|int"] - """ - Date when order was canceled. - """ - cancellation_policy_provided: NotRequired["Literal['']|bool"] - """ - Whether the cardholder was provided with a cancellation policy. - """ - cancellation_reason: NotRequired["Literal['']|str"] - """ - Reason for canceling the order. - """ - expected_at: NotRequired["Literal['']|int"] - """ - Date when the cardholder expected to receive the product. - """ - explanation: NotRequired["Literal['']|str"] - """ - Explanation of why the cardholder is disputing this transaction. - """ - product_description: NotRequired["Literal['']|str"] - """ - Description of the merchandise or service that was purchased. - """ - product_type: NotRequired[ - "Literal['']|Literal['merchandise', 'service']" - ] - """ - Whether the product was a merchandise or service. - """ - return_status: NotRequired[ - "Literal['']|Literal['merchant_rejected', 'successful']" - ] - """ - Result of cardholder's attempt to return the product. - """ - returned_at: NotRequired["Literal['']|int"] - """ - Date when the product was returned or attempted to be returned. - """ - - class UpdateParamsEvidenceDuplicate(TypedDict): - additional_documentation: NotRequired["Literal['']|str"] - """ - (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. - """ - card_statement: NotRequired["Literal['']|str"] - """ - (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Copy of the card statement showing that the product had already been paid for. - """ - cash_receipt: NotRequired["Literal['']|str"] - """ - (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Copy of the receipt showing that the product had been paid for in cash. - """ - check_image: NotRequired["Literal['']|str"] - """ - (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Image of the front and back of the check that was used to pay for the product. - """ - explanation: NotRequired["Literal['']|str"] - """ - Explanation of why the cardholder is disputing this transaction. - """ - original_transaction: NotRequired[str] - """ - Transaction (e.g., ipi_...) that the disputed transaction is a duplicate of. Of the two or more transactions that are copies of each other, this is original undisputed one. - """ - - class UpdateParamsEvidenceFraudulent(TypedDict): - additional_documentation: NotRequired["Literal['']|str"] - """ - (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. - """ - explanation: NotRequired["Literal['']|str"] - """ - Explanation of why the cardholder is disputing this transaction. - """ - - class UpdateParamsEvidenceMerchandiseNotAsDescribed(TypedDict): - additional_documentation: NotRequired["Literal['']|str"] - """ - (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. - """ - explanation: NotRequired["Literal['']|str"] - """ - Explanation of why the cardholder is disputing this transaction. - """ - received_at: NotRequired["Literal['']|int"] - """ - Date when the product was received. - """ - return_description: NotRequired["Literal['']|str"] - """ - Description of the cardholder's attempt to return the product. - """ - return_status: NotRequired[ - "Literal['']|Literal['merchant_rejected', 'successful']" - ] - """ - Result of cardholder's attempt to return the product. - """ - returned_at: NotRequired["Literal['']|int"] - """ - Date when the product was returned or attempted to be returned. - """ - - class UpdateParamsEvidenceNoValidAuthorization(TypedDict): - additional_documentation: NotRequired["Literal['']|str"] - """ - (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. - """ - explanation: NotRequired["Literal['']|str"] - """ - Explanation of why the cardholder is disputing this transaction. - """ - - class UpdateParamsEvidenceNotReceived(TypedDict): - additional_documentation: NotRequired["Literal['']|str"] - """ - (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. - """ - expected_at: NotRequired["Literal['']|int"] - """ - Date when the cardholder expected to receive the product. - """ - explanation: NotRequired["Literal['']|str"] - """ - Explanation of why the cardholder is disputing this transaction. - """ - product_description: NotRequired["Literal['']|str"] - """ - Description of the merchandise or service that was purchased. - """ - product_type: NotRequired[ - "Literal['']|Literal['merchandise', 'service']" - ] - """ - Whether the product was a merchandise or service. - """ - - class UpdateParamsEvidenceOther(TypedDict): - additional_documentation: NotRequired["Literal['']|str"] - """ - (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. - """ - explanation: NotRequired["Literal['']|str"] - """ - Explanation of why the cardholder is disputing this transaction. - """ - product_description: NotRequired["Literal['']|str"] - """ - Description of the merchandise or service that was purchased. - """ - product_type: NotRequired[ - "Literal['']|Literal['merchandise', 'service']" - ] - """ - Whether the product was a merchandise or service. - """ - - class UpdateParamsEvidenceServiceNotAsDescribed(TypedDict): - additional_documentation: NotRequired["Literal['']|str"] - """ - (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. - """ - canceled_at: NotRequired["Literal['']|int"] - """ - Date when order was canceled. - """ - cancellation_reason: NotRequired["Literal['']|str"] - """ - Reason for canceling the order. - """ - explanation: NotRequired["Literal['']|str"] - """ - Explanation of why the cardholder is disputing this transaction. - """ - received_at: NotRequired["Literal['']|int"] - """ - Date when the product was received. - """ - def list( self, - params: Optional["DisputeService.ListParams"] = None, + params: Optional["DisputeListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[Dispute]: """ @@ -649,7 +46,7 @@ def list( async def list_async( self, - params: Optional["DisputeService.ListParams"] = None, + params: Optional["DisputeListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[Dispute]: """ @@ -668,7 +65,7 @@ async def list_async( def create( self, - params: Optional["DisputeService.CreateParams"] = None, + params: Optional["DisputeCreateParams"] = None, options: Optional[RequestOptions] = None, ) -> Dispute: """ @@ -687,7 +84,7 @@ def create( async def create_async( self, - params: Optional["DisputeService.CreateParams"] = None, + params: Optional["DisputeCreateParams"] = None, options: Optional[RequestOptions] = None, ) -> Dispute: """ @@ -707,7 +104,7 @@ async def create_async( def retrieve( self, dispute: str, - params: Optional["DisputeService.RetrieveParams"] = None, + params: Optional["DisputeRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Dispute: """ @@ -729,7 +126,7 @@ def retrieve( async def retrieve_async( self, dispute: str, - params: Optional["DisputeService.RetrieveParams"] = None, + params: Optional["DisputeRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Dispute: """ @@ -751,7 +148,7 @@ async def retrieve_async( def update( self, dispute: str, - params: Optional["DisputeService.UpdateParams"] = None, + params: Optional["DisputeUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> Dispute: """ @@ -773,7 +170,7 @@ def update( async def update_async( self, dispute: str, - params: Optional["DisputeService.UpdateParams"] = None, + params: Optional["DisputeUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> Dispute: """ @@ -795,7 +192,7 @@ async def update_async( def submit( self, dispute: str, - params: Optional["DisputeService.SubmitParams"] = None, + params: Optional["DisputeSubmitParams"] = None, options: Optional[RequestOptions] = None, ) -> Dispute: """ @@ -817,7 +214,7 @@ def submit( async def submit_async( self, dispute: str, - params: Optional["DisputeService.SubmitParams"] = None, + params: Optional["DisputeSubmitParams"] = None, options: Optional[RequestOptions] = None, ) -> Dispute: """ diff --git a/stripe/issuing/_dispute_settlement_detail.py b/stripe/issuing/_dispute_settlement_detail.py index b7215693b..c94626545 100644 --- a/stripe/issuing/_dispute_settlement_detail.py +++ b/stripe/issuing/_dispute_settlement_detail.py @@ -2,10 +2,17 @@ # File generated from our OpenAPI spec from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource -from stripe._request_options import RequestOptions from stripe._stripe_object import StripeObject -from typing import ClassVar, List, Optional -from typing_extensions import Literal, NotRequired, Unpack +from typing import ClassVar, Optional +from typing_extensions import Literal, Unpack, TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params.issuing._dispute_settlement_detail_list_params import ( + DisputeSettlementDetailListParams, + ) + from stripe.params.issuing._dispute_settlement_detail_retrieve_params import ( + DisputeSettlementDetailRetrieveParams, + ) class DisputeSettlementDetail(ListableAPIResource["DisputeSettlementDetail"]): @@ -23,34 +30,6 @@ class NetworkData(StripeObject): The date the transaction was processed by the card network. This can be different from the date the seller recorded the transaction depending on when the acquirer submits the transaction to the network. """ - class ListParams(RequestOptions): - 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. - """ - settlement: NotRequired[str] - """ - Select the Issuing dispute settlement details for the given settlement. - """ - 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 RetrieveParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - amount: int """ Disputed amount in the card's currency and in the smallest currency unit. Usually the amount of the transaction, but can differ (usually because of currency fluctuation). @@ -102,7 +81,7 @@ class RetrieveParams(RequestOptions): @classmethod def list( - cls, **params: Unpack["DisputeSettlementDetail.ListParams"] + cls, **params: Unpack["DisputeSettlementDetailListParams"] ) -> ListObject["DisputeSettlementDetail"]: """ Returns a list of Issuing DisputeSettlementDetail objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first. @@ -122,7 +101,7 @@ def list( @classmethod async def list_async( - cls, **params: Unpack["DisputeSettlementDetail.ListParams"] + cls, **params: Unpack["DisputeSettlementDetailListParams"] ) -> ListObject["DisputeSettlementDetail"]: """ Returns a list of Issuing DisputeSettlementDetail objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first. @@ -142,9 +121,7 @@ async def list_async( @classmethod def retrieve( - cls, - id: str, - **params: Unpack["DisputeSettlementDetail.RetrieveParams"], + cls, id: str, **params: Unpack["DisputeSettlementDetailRetrieveParams"] ) -> "DisputeSettlementDetail": """ Retrieves an Issuing DisputeSettlementDetail object. @@ -155,9 +132,7 @@ def retrieve( @classmethod async def retrieve_async( - cls, - id: str, - **params: Unpack["DisputeSettlementDetail.RetrieveParams"], + cls, id: str, **params: Unpack["DisputeSettlementDetailRetrieveParams"] ) -> "DisputeSettlementDetail": """ Retrieves an Issuing DisputeSettlementDetail object. diff --git a/stripe/issuing/_dispute_settlement_detail_service.py b/stripe/issuing/_dispute_settlement_detail_service.py index 05e579571..285e94f95 100644 --- a/stripe/issuing/_dispute_settlement_detail_service.py +++ b/stripe/issuing/_dispute_settlement_detail_service.py @@ -5,42 +5,22 @@ from stripe._stripe_service import StripeService from stripe._util import sanitize_id from stripe.issuing._dispute_settlement_detail import DisputeSettlementDetail -from typing import List, Optional, cast -from typing_extensions import NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params.issuing._dispute_settlement_detail_list_params import ( + DisputeSettlementDetailListParams, + ) + from stripe.params.issuing._dispute_settlement_detail_retrieve_params import ( + DisputeSettlementDetailRetrieveParams, + ) -class DisputeSettlementDetailService(StripeService): - class ListParams(TypedDict): - 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. - """ - settlement: NotRequired[str] - """ - Select the Issuing dispute settlement details for the given settlement. - """ - 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 RetrieveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ +class DisputeSettlementDetailService(StripeService): def list( self, - params: Optional["DisputeSettlementDetailService.ListParams"] = None, + params: Optional["DisputeSettlementDetailListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[DisputeSettlementDetail]: """ @@ -59,7 +39,7 @@ def list( async def list_async( self, - params: Optional["DisputeSettlementDetailService.ListParams"] = None, + params: Optional["DisputeSettlementDetailListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[DisputeSettlementDetail]: """ @@ -79,9 +59,7 @@ async def list_async( def retrieve( self, dispute_settlement_detail: str, - params: Optional[ - "DisputeSettlementDetailService.RetrieveParams" - ] = None, + params: Optional["DisputeSettlementDetailRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> DisputeSettlementDetail: """ @@ -105,9 +83,7 @@ def retrieve( async def retrieve_async( self, dispute_settlement_detail: str, - params: Optional[ - "DisputeSettlementDetailService.RetrieveParams" - ] = None, + params: Optional["DisputeSettlementDetailRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> DisputeSettlementDetail: """ diff --git a/stripe/issuing/_fraud_liability_debit.py b/stripe/issuing/_fraud_liability_debit.py index 94ee96e31..9efb04448 100644 --- a/stripe/issuing/_fraud_liability_debit.py +++ b/stripe/issuing/_fraud_liability_debit.py @@ -3,18 +3,17 @@ from stripe._expandable_field import ExpandableField from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource -from stripe._request_options import RequestOptions -from typing import ClassVar, List, Optional -from typing_extensions import ( - Literal, - NotRequired, - TypedDict, - Unpack, - TYPE_CHECKING, -) +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.issuing._fraud_liability_debit_list_params import ( + FraudLiabilityDebitListParams, + ) + from stripe.params.issuing._fraud_liability_debit_retrieve_params import ( + FraudLiabilityDebitRetrieveParams, + ) class FraudLiabilityDebit(ListableAPIResource["FraudLiabilityDebit"]): @@ -25,53 +24,6 @@ class FraudLiabilityDebit(ListableAPIResource["FraudLiabilityDebit"]): OBJECT_NAME: ClassVar[Literal["issuing.fraud_liability_debit"]] = ( "issuing.fraud_liability_debit" ) - - class ListParams(RequestOptions): - created: NotRequired["FraudLiabilityDebit.ListParamsCreated|int"] - """ - Only return Issuing Fraud Liability Debits that were created during the given date interval. - """ - 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 ListParamsCreated(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) - """ - - class RetrieveParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - amount: int """ Debited amount. This is equal to the disputed amount and is given in the card's currency and in the smallest currency unit. @@ -107,7 +59,7 @@ class RetrieveParams(RequestOptions): @classmethod def list( - cls, **params: Unpack["FraudLiabilityDebit.ListParams"] + cls, **params: Unpack["FraudLiabilityDebitListParams"] ) -> ListObject["FraudLiabilityDebit"]: """ Returns a list of Issuing FraudLiabilityDebit objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first. @@ -127,7 +79,7 @@ def list( @classmethod async def list_async( - cls, **params: Unpack["FraudLiabilityDebit.ListParams"] + cls, **params: Unpack["FraudLiabilityDebitListParams"] ) -> ListObject["FraudLiabilityDebit"]: """ Returns a list of Issuing FraudLiabilityDebit objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first. @@ -147,7 +99,7 @@ async def list_async( @classmethod def retrieve( - cls, id: str, **params: Unpack["FraudLiabilityDebit.RetrieveParams"] + cls, id: str, **params: Unpack["FraudLiabilityDebitRetrieveParams"] ) -> "FraudLiabilityDebit": """ Retrieves an Issuing FraudLiabilityDebit object. @@ -158,7 +110,7 @@ def retrieve( @classmethod async def retrieve_async( - cls, id: str, **params: Unpack["FraudLiabilityDebit.RetrieveParams"] + cls, id: str, **params: Unpack["FraudLiabilityDebitRetrieveParams"] ) -> "FraudLiabilityDebit": """ Retrieves an Issuing FraudLiabilityDebit object. diff --git a/stripe/issuing/_fraud_liability_debit_service.py b/stripe/issuing/_fraud_liability_debit_service.py index 93fa590d4..60487c559 100644 --- a/stripe/issuing/_fraud_liability_debit_service.py +++ b/stripe/issuing/_fraud_liability_debit_service.py @@ -5,62 +5,22 @@ from stripe._stripe_service import StripeService from stripe._util import sanitize_id from stripe.issuing._fraud_liability_debit import FraudLiabilityDebit -from typing import List, Optional, cast -from typing_extensions import NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params.issuing._fraud_liability_debit_list_params import ( + FraudLiabilityDebitListParams, + ) + from stripe.params.issuing._fraud_liability_debit_retrieve_params import ( + FraudLiabilityDebitRetrieveParams, + ) -class FraudLiabilityDebitService(StripeService): - class ListParams(TypedDict): - created: NotRequired[ - "FraudLiabilityDebitService.ListParamsCreated|int" - ] - """ - Only return Issuing Fraud Liability Debits that were created during the given date interval. - """ - 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 ListParamsCreated(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) - """ - - class RetrieveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ +class FraudLiabilityDebitService(StripeService): def list( self, - params: Optional["FraudLiabilityDebitService.ListParams"] = None, + params: Optional["FraudLiabilityDebitListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[FraudLiabilityDebit]: """ @@ -79,7 +39,7 @@ def list( async def list_async( self, - params: Optional["FraudLiabilityDebitService.ListParams"] = None, + params: Optional["FraudLiabilityDebitListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[FraudLiabilityDebit]: """ @@ -99,7 +59,7 @@ async def list_async( def retrieve( self, fraud_liability_debit: str, - params: Optional["FraudLiabilityDebitService.RetrieveParams"] = None, + params: Optional["FraudLiabilityDebitRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> FraudLiabilityDebit: """ @@ -121,7 +81,7 @@ def retrieve( async def retrieve_async( self, fraud_liability_debit: str, - params: Optional["FraudLiabilityDebitService.RetrieveParams"] = None, + params: Optional["FraudLiabilityDebitRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> FraudLiabilityDebit: """ diff --git a/stripe/issuing/_personalization_design.py b/stripe/issuing/_personalization_design.py index c8520e8ee..fd65ab0ac 100644 --- a/stripe/issuing/_personalization_design.py +++ b/stripe/issuing/_personalization_design.py @@ -4,24 +4,37 @@ from stripe._expandable_field import ExpandableField from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource -from stripe._request_options import RequestOptions from stripe._stripe_object import StripeObject from stripe._test_helpers import APIResourceTestHelpers from stripe._updateable_api_resource import UpdateableAPIResource from stripe._util import class_method_variant, sanitize_id from typing import ClassVar, Dict, List, Optional, cast, overload -from typing_extensions import ( - Literal, - NotRequired, - Type, - TypedDict, - Unpack, - TYPE_CHECKING, -) +from typing_extensions import Literal, Type, Unpack, TYPE_CHECKING if TYPE_CHECKING: from stripe._file import File from stripe.issuing._physical_bundle import PhysicalBundle + from stripe.params.issuing._personalization_design_activate_params import ( + PersonalizationDesignActivateParams, + ) + from stripe.params.issuing._personalization_design_create_params import ( + PersonalizationDesignCreateParams, + ) + from stripe.params.issuing._personalization_design_deactivate_params import ( + PersonalizationDesignDeactivateParams, + ) + from stripe.params.issuing._personalization_design_list_params import ( + PersonalizationDesignListParams, + ) + from stripe.params.issuing._personalization_design_modify_params import ( + PersonalizationDesignModifyParams, + ) + from stripe.params.issuing._personalization_design_reject_params import ( + PersonalizationDesignRejectParams, + ) + from stripe.params.issuing._personalization_design_retrieve_params import ( + PersonalizationDesignRetrieveParams, + ) class PersonalizationDesign( @@ -100,243 +113,6 @@ class RejectionReasons(StripeObject): The reason(s) the carrier text was rejected. """ - class ActivateParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class CreateParams(RequestOptions): - card_logo: NotRequired[str] - """ - The file for the card logo, for use with physical bundles that support card logos. Must have a `purpose` value of `issuing_logo`. - """ - carrier_text: NotRequired[ - "PersonalizationDesign.CreateParamsCarrierText" - ] - """ - Hash containing carrier text, for use with physical bundles that support carrier text. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - lookup_key: NotRequired[str] - """ - A lookup key used to retrieve personalization designs dynamically from a static string. This may be up to 200 characters. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - name: NotRequired[str] - """ - Friendly display name. - """ - physical_bundle: str - """ - The physical bundle object belonging to this personalization design. - """ - preferences: NotRequired[ - "PersonalizationDesign.CreateParamsPreferences" - ] - """ - Information on whether this personalization design is used to create cards when one is not specified. - """ - transfer_lookup_key: NotRequired[bool] - """ - If set to true, will atomically remove the lookup key from the existing personalization design, and assign it to this personalization design. - """ - - class CreateParamsCarrierText(TypedDict): - footer_body: NotRequired["Literal['']|str"] - """ - The footer body text of the carrier letter. - """ - footer_title: NotRequired["Literal['']|str"] - """ - The footer title text of the carrier letter. - """ - header_body: NotRequired["Literal['']|str"] - """ - The header body text of the carrier letter. - """ - header_title: NotRequired["Literal['']|str"] - """ - The header title text of the carrier letter. - """ - - class CreateParamsPreferences(TypedDict): - is_default: bool - """ - Whether we use this personalization design to create cards when one isn't specified. A connected account uses the Connect platform's default design if no personalization design is set as the default design. - """ - - class DeactivateParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class ListParams(RequestOptions): - 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. - """ - lookup_keys: NotRequired[List[str]] - """ - Only return personalization designs with the given lookup keys. - """ - preferences: NotRequired["PersonalizationDesign.ListParamsPreferences"] - """ - Only return personalization designs with the given preferences. - """ - 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. - """ - status: NotRequired[ - Literal["active", "inactive", "rejected", "review"] - ] - """ - Only return personalization designs with the given status. - """ - - class ListParamsPreferences(TypedDict): - is_default: NotRequired[bool] - """ - Only return the personalization design that's set as the default. A connected account uses the Connect platform's default design if no personalization design is set as the default. - """ - is_platform_default: NotRequired[bool] - """ - Only return the personalization design that is set as the Connect platform's default. This parameter is only applicable to connected accounts. - """ - - class ModifyParams(RequestOptions): - card_logo: NotRequired["Literal['']|str"] - """ - The file for the card logo, for use with physical bundles that support card logos. Must have a `purpose` value of `issuing_logo`. - """ - carrier_text: NotRequired[ - "Literal['']|PersonalizationDesign.ModifyParamsCarrierText" - ] - """ - Hash containing carrier text, for use with physical bundles that support carrier text. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - lookup_key: NotRequired["Literal['']|str"] - """ - A lookup key used to retrieve personalization designs dynamically from a static string. This may be up to 200 characters. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - name: NotRequired["Literal['']|str"] - """ - Friendly display name. Providing an empty string will set the field to null. - """ - physical_bundle: NotRequired[str] - """ - The physical bundle object belonging to this personalization design. - """ - preferences: NotRequired[ - "PersonalizationDesign.ModifyParamsPreferences" - ] - """ - Information on whether this personalization design is used to create cards when one is not specified. - """ - transfer_lookup_key: NotRequired[bool] - """ - If set to true, will atomically remove the lookup key from the existing personalization design, and assign it to this personalization design. - """ - - class ModifyParamsCarrierText(TypedDict): - footer_body: NotRequired["Literal['']|str"] - """ - The footer body text of the carrier letter. - """ - footer_title: NotRequired["Literal['']|str"] - """ - The footer title text of the carrier letter. - """ - header_body: NotRequired["Literal['']|str"] - """ - The header body text of the carrier letter. - """ - header_title: NotRequired["Literal['']|str"] - """ - The header title text of the carrier letter. - """ - - class ModifyParamsPreferences(TypedDict): - is_default: bool - """ - Whether we use this personalization design to create cards when one isn't specified. A connected account uses the Connect platform's default design if no personalization design is set as the default design. - """ - - class RejectParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - rejection_reasons: "PersonalizationDesign.RejectParamsRejectionReasons" - """ - The reason(s) the personalization design was rejected. - """ - - class RejectParamsRejectionReasons(TypedDict): - card_logo: NotRequired[ - List[ - Literal[ - "geographic_location", - "inappropriate", - "network_name", - "non_binary_image", - "non_fiat_currency", - "other", - "other_entity", - "promotional_material", - ] - ] - ] - """ - The reason(s) the card logo was rejected. - """ - carrier_text: NotRequired[ - List[ - Literal[ - "geographic_location", - "inappropriate", - "network_name", - "non_fiat_currency", - "other", - "other_entity", - "promotional_material", - ] - ] - ] - """ - The reason(s) the carrier text was rejected. - """ - - class RetrieveParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - card_logo: Optional[ExpandableField["File"]] """ The file for the card logo to use with physical bundles that support card logos. Must have a `purpose` value of `issuing_logo`. @@ -386,7 +162,7 @@ class RetrieveParams(RequestOptions): @classmethod def create( - cls, **params: Unpack["PersonalizationDesign.CreateParams"] + cls, **params: Unpack["PersonalizationDesignCreateParams"] ) -> "PersonalizationDesign": """ Creates a personalization design object. @@ -402,7 +178,7 @@ def create( @classmethod async def create_async( - cls, **params: Unpack["PersonalizationDesign.CreateParams"] + cls, **params: Unpack["PersonalizationDesignCreateParams"] ) -> "PersonalizationDesign": """ Creates a personalization design object. @@ -418,7 +194,7 @@ async def create_async( @classmethod def list( - cls, **params: Unpack["PersonalizationDesign.ListParams"] + cls, **params: Unpack["PersonalizationDesignListParams"] ) -> ListObject["PersonalizationDesign"]: """ Returns a list of personalization design objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first. @@ -438,7 +214,7 @@ def list( @classmethod async def list_async( - cls, **params: Unpack["PersonalizationDesign.ListParams"] + cls, **params: Unpack["PersonalizationDesignListParams"] ) -> ListObject["PersonalizationDesign"]: """ Returns a list of personalization design objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first. @@ -458,7 +234,7 @@ async def list_async( @classmethod def modify( - cls, id: str, **params: Unpack["PersonalizationDesign.ModifyParams"] + cls, id: str, **params: Unpack["PersonalizationDesignModifyParams"] ) -> "PersonalizationDesign": """ Updates a card personalization object. @@ -475,7 +251,7 @@ def modify( @classmethod async def modify_async( - cls, id: str, **params: Unpack["PersonalizationDesign.ModifyParams"] + cls, id: str, **params: Unpack["PersonalizationDesignModifyParams"] ) -> "PersonalizationDesign": """ Updates a card personalization object. @@ -492,7 +268,7 @@ async def modify_async( @classmethod def retrieve( - cls, id: str, **params: Unpack["PersonalizationDesign.RetrieveParams"] + cls, id: str, **params: Unpack["PersonalizationDesignRetrieveParams"] ) -> "PersonalizationDesign": """ Retrieves a personalization design object. @@ -503,7 +279,7 @@ def retrieve( @classmethod async def retrieve_async( - cls, id: str, **params: Unpack["PersonalizationDesign.RetrieveParams"] + cls, id: str, **params: Unpack["PersonalizationDesignRetrieveParams"] ) -> "PersonalizationDesign": """ Retrieves a personalization design object. @@ -519,7 +295,7 @@ class TestHelpers(APIResourceTestHelpers["PersonalizationDesign"]): def _cls_activate( cls, personalization_design: str, - **params: Unpack["PersonalizationDesign.ActivateParams"], + **params: Unpack["PersonalizationDesignActivateParams"], ) -> "PersonalizationDesign": """ Updates the status of the specified testmode personalization design object to active. @@ -541,7 +317,7 @@ def _cls_activate( @staticmethod def activate( personalization_design: str, - **params: Unpack["PersonalizationDesign.ActivateParams"], + **params: Unpack["PersonalizationDesignActivateParams"], ) -> "PersonalizationDesign": """ Updates the status of the specified testmode personalization design object to active. @@ -550,7 +326,7 @@ def activate( @overload def activate( - self, **params: Unpack["PersonalizationDesign.ActivateParams"] + self, **params: Unpack["PersonalizationDesignActivateParams"] ) -> "PersonalizationDesign": """ Updates the status of the specified testmode personalization design object to active. @@ -559,7 +335,7 @@ def activate( @class_method_variant("_cls_activate") def activate( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["PersonalizationDesign.ActivateParams"] + self, **params: Unpack["PersonalizationDesignActivateParams"] ) -> "PersonalizationDesign": """ Updates the status of the specified testmode personalization design object to active. @@ -581,7 +357,7 @@ def activate( # pyright: ignore[reportGeneralTypeIssues] async def _cls_activate_async( cls, personalization_design: str, - **params: Unpack["PersonalizationDesign.ActivateParams"], + **params: Unpack["PersonalizationDesignActivateParams"], ) -> "PersonalizationDesign": """ Updates the status of the specified testmode personalization design object to active. @@ -603,7 +379,7 @@ async def _cls_activate_async( @staticmethod async def activate_async( personalization_design: str, - **params: Unpack["PersonalizationDesign.ActivateParams"], + **params: Unpack["PersonalizationDesignActivateParams"], ) -> "PersonalizationDesign": """ Updates the status of the specified testmode personalization design object to active. @@ -612,7 +388,7 @@ async def activate_async( @overload async def activate_async( - self, **params: Unpack["PersonalizationDesign.ActivateParams"] + self, **params: Unpack["PersonalizationDesignActivateParams"] ) -> "PersonalizationDesign": """ Updates the status of the specified testmode personalization design object to active. @@ -621,7 +397,7 @@ async def activate_async( @class_method_variant("_cls_activate_async") async def activate_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["PersonalizationDesign.ActivateParams"] + self, **params: Unpack["PersonalizationDesignActivateParams"] ) -> "PersonalizationDesign": """ Updates the status of the specified testmode personalization design object to active. @@ -643,7 +419,7 @@ async def activate_async( # pyright: ignore[reportGeneralTypeIssues] def _cls_deactivate( cls, personalization_design: str, - **params: Unpack["PersonalizationDesign.DeactivateParams"], + **params: Unpack["PersonalizationDesignDeactivateParams"], ) -> "PersonalizationDesign": """ Updates the status of the specified testmode personalization design object to inactive. @@ -665,7 +441,7 @@ def _cls_deactivate( @staticmethod def deactivate( personalization_design: str, - **params: Unpack["PersonalizationDesign.DeactivateParams"], + **params: Unpack["PersonalizationDesignDeactivateParams"], ) -> "PersonalizationDesign": """ Updates the status of the specified testmode personalization design object to inactive. @@ -674,7 +450,7 @@ def deactivate( @overload def deactivate( - self, **params: Unpack["PersonalizationDesign.DeactivateParams"] + self, **params: Unpack["PersonalizationDesignDeactivateParams"] ) -> "PersonalizationDesign": """ Updates the status of the specified testmode personalization design object to inactive. @@ -683,7 +459,7 @@ def deactivate( @class_method_variant("_cls_deactivate") def deactivate( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["PersonalizationDesign.DeactivateParams"] + self, **params: Unpack["PersonalizationDesignDeactivateParams"] ) -> "PersonalizationDesign": """ Updates the status of the specified testmode personalization design object to inactive. @@ -705,7 +481,7 @@ def deactivate( # pyright: ignore[reportGeneralTypeIssues] async def _cls_deactivate_async( cls, personalization_design: str, - **params: Unpack["PersonalizationDesign.DeactivateParams"], + **params: Unpack["PersonalizationDesignDeactivateParams"], ) -> "PersonalizationDesign": """ Updates the status of the specified testmode personalization design object to inactive. @@ -727,7 +503,7 @@ async def _cls_deactivate_async( @staticmethod async def deactivate_async( personalization_design: str, - **params: Unpack["PersonalizationDesign.DeactivateParams"], + **params: Unpack["PersonalizationDesignDeactivateParams"], ) -> "PersonalizationDesign": """ Updates the status of the specified testmode personalization design object to inactive. @@ -736,7 +512,7 @@ async def deactivate_async( @overload async def deactivate_async( - self, **params: Unpack["PersonalizationDesign.DeactivateParams"] + self, **params: Unpack["PersonalizationDesignDeactivateParams"] ) -> "PersonalizationDesign": """ Updates the status of the specified testmode personalization design object to inactive. @@ -745,7 +521,7 @@ async def deactivate_async( @class_method_variant("_cls_deactivate_async") async def deactivate_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["PersonalizationDesign.DeactivateParams"] + self, **params: Unpack["PersonalizationDesignDeactivateParams"] ) -> "PersonalizationDesign": """ Updates the status of the specified testmode personalization design object to inactive. @@ -767,7 +543,7 @@ async def deactivate_async( # pyright: ignore[reportGeneralTypeIssues] def _cls_reject( cls, personalization_design: str, - **params: Unpack["PersonalizationDesign.RejectParams"], + **params: Unpack["PersonalizationDesignRejectParams"], ) -> "PersonalizationDesign": """ Updates the status of the specified testmode personalization design object to rejected. @@ -789,7 +565,7 @@ def _cls_reject( @staticmethod def reject( personalization_design: str, - **params: Unpack["PersonalizationDesign.RejectParams"], + **params: Unpack["PersonalizationDesignRejectParams"], ) -> "PersonalizationDesign": """ Updates the status of the specified testmode personalization design object to rejected. @@ -798,7 +574,7 @@ def reject( @overload def reject( - self, **params: Unpack["PersonalizationDesign.RejectParams"] + self, **params: Unpack["PersonalizationDesignRejectParams"] ) -> "PersonalizationDesign": """ Updates the status of the specified testmode personalization design object to rejected. @@ -807,7 +583,7 @@ def reject( @class_method_variant("_cls_reject") def reject( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["PersonalizationDesign.RejectParams"] + self, **params: Unpack["PersonalizationDesignRejectParams"] ) -> "PersonalizationDesign": """ Updates the status of the specified testmode personalization design object to rejected. @@ -829,7 +605,7 @@ def reject( # pyright: ignore[reportGeneralTypeIssues] async def _cls_reject_async( cls, personalization_design: str, - **params: Unpack["PersonalizationDesign.RejectParams"], + **params: Unpack["PersonalizationDesignRejectParams"], ) -> "PersonalizationDesign": """ Updates the status of the specified testmode personalization design object to rejected. @@ -851,7 +627,7 @@ async def _cls_reject_async( @staticmethod async def reject_async( personalization_design: str, - **params: Unpack["PersonalizationDesign.RejectParams"], + **params: Unpack["PersonalizationDesignRejectParams"], ) -> "PersonalizationDesign": """ Updates the status of the specified testmode personalization design object to rejected. @@ -860,7 +636,7 @@ async def reject_async( @overload async def reject_async( - self, **params: Unpack["PersonalizationDesign.RejectParams"] + self, **params: Unpack["PersonalizationDesignRejectParams"] ) -> "PersonalizationDesign": """ Updates the status of the specified testmode personalization design object to rejected. @@ -869,7 +645,7 @@ async def reject_async( @class_method_variant("_cls_reject_async") async def reject_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["PersonalizationDesign.RejectParams"] + self, **params: Unpack["PersonalizationDesignRejectParams"] ) -> "PersonalizationDesign": """ Updates the status of the specified testmode personalization design object to rejected. diff --git a/stripe/issuing/_personalization_design_service.py b/stripe/issuing/_personalization_design_service.py index cd8b2595f..090b9cbc3 100644 --- a/stripe/issuing/_personalization_design_service.py +++ b/stripe/issuing/_personalization_design_service.py @@ -5,196 +5,28 @@ from stripe._stripe_service import StripeService from stripe._util import sanitize_id from stripe.issuing._personalization_design import PersonalizationDesign -from typing import Dict, List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params.issuing._personalization_design_create_params import ( + PersonalizationDesignCreateParams, + ) + from stripe.params.issuing._personalization_design_list_params import ( + PersonalizationDesignListParams, + ) + from stripe.params.issuing._personalization_design_retrieve_params import ( + PersonalizationDesignRetrieveParams, + ) + from stripe.params.issuing._personalization_design_update_params import ( + PersonalizationDesignUpdateParams, + ) class PersonalizationDesignService(StripeService): - class CreateParams(TypedDict): - card_logo: NotRequired[str] - """ - The file for the card logo, for use with physical bundles that support card logos. Must have a `purpose` value of `issuing_logo`. - """ - carrier_text: NotRequired[ - "PersonalizationDesignService.CreateParamsCarrierText" - ] - """ - Hash containing carrier text, for use with physical bundles that support carrier text. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - lookup_key: NotRequired[str] - """ - A lookup key used to retrieve personalization designs dynamically from a static string. This may be up to 200 characters. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - name: NotRequired[str] - """ - Friendly display name. - """ - physical_bundle: str - """ - The physical bundle object belonging to this personalization design. - """ - preferences: NotRequired[ - "PersonalizationDesignService.CreateParamsPreferences" - ] - """ - Information on whether this personalization design is used to create cards when one is not specified. - """ - transfer_lookup_key: NotRequired[bool] - """ - If set to true, will atomically remove the lookup key from the existing personalization design, and assign it to this personalization design. - """ - - class CreateParamsCarrierText(TypedDict): - footer_body: NotRequired["Literal['']|str"] - """ - The footer body text of the carrier letter. - """ - footer_title: NotRequired["Literal['']|str"] - """ - The footer title text of the carrier letter. - """ - header_body: NotRequired["Literal['']|str"] - """ - The header body text of the carrier letter. - """ - header_title: NotRequired["Literal['']|str"] - """ - The header title text of the carrier letter. - """ - - class CreateParamsPreferences(TypedDict): - is_default: bool - """ - Whether we use this personalization design to create cards when one isn't specified. A connected account uses the Connect platform's default design if no personalization design is set as the default design. - """ - - class ListParams(TypedDict): - 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. - """ - lookup_keys: NotRequired[List[str]] - """ - Only return personalization designs with the given lookup keys. - """ - preferences: NotRequired[ - "PersonalizationDesignService.ListParamsPreferences" - ] - """ - Only return personalization designs with the given preferences. - """ - 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. - """ - status: NotRequired[ - Literal["active", "inactive", "rejected", "review"] - ] - """ - Only return personalization designs with the given status. - """ - - class ListParamsPreferences(TypedDict): - is_default: NotRequired[bool] - """ - Only return the personalization design that's set as the default. A connected account uses the Connect platform's default design if no personalization design is set as the default. - """ - is_platform_default: NotRequired[bool] - """ - Only return the personalization design that is set as the Connect platform's default. This parameter is only applicable to connected accounts. - """ - - class RetrieveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class UpdateParams(TypedDict): - card_logo: NotRequired["Literal['']|str"] - """ - The file for the card logo, for use with physical bundles that support card logos. Must have a `purpose` value of `issuing_logo`. - """ - carrier_text: NotRequired[ - "Literal['']|PersonalizationDesignService.UpdateParamsCarrierText" - ] - """ - Hash containing carrier text, for use with physical bundles that support carrier text. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - lookup_key: NotRequired["Literal['']|str"] - """ - A lookup key used to retrieve personalization designs dynamically from a static string. This may be up to 200 characters. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - name: NotRequired["Literal['']|str"] - """ - Friendly display name. Providing an empty string will set the field to null. - """ - physical_bundle: NotRequired[str] - """ - The physical bundle object belonging to this personalization design. - """ - preferences: NotRequired[ - "PersonalizationDesignService.UpdateParamsPreferences" - ] - """ - Information on whether this personalization design is used to create cards when one is not specified. - """ - transfer_lookup_key: NotRequired[bool] - """ - If set to true, will atomically remove the lookup key from the existing personalization design, and assign it to this personalization design. - """ - - class UpdateParamsCarrierText(TypedDict): - footer_body: NotRequired["Literal['']|str"] - """ - The footer body text of the carrier letter. - """ - footer_title: NotRequired["Literal['']|str"] - """ - The footer title text of the carrier letter. - """ - header_body: NotRequired["Literal['']|str"] - """ - The header body text of the carrier letter. - """ - header_title: NotRequired["Literal['']|str"] - """ - The header title text of the carrier letter. - """ - - class UpdateParamsPreferences(TypedDict): - is_default: bool - """ - Whether we use this personalization design to create cards when one isn't specified. A connected account uses the Connect platform's default design if no personalization design is set as the default design. - """ - def list( self, - params: Optional["PersonalizationDesignService.ListParams"] = None, + params: Optional["PersonalizationDesignListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[PersonalizationDesign]: """ @@ -213,7 +45,7 @@ def list( async def list_async( self, - params: Optional["PersonalizationDesignService.ListParams"] = None, + params: Optional["PersonalizationDesignListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[PersonalizationDesign]: """ @@ -232,7 +64,7 @@ async def list_async( def create( self, - params: "PersonalizationDesignService.CreateParams", + params: "PersonalizationDesignCreateParams", options: Optional[RequestOptions] = None, ) -> PersonalizationDesign: """ @@ -251,7 +83,7 @@ def create( async def create_async( self, - params: "PersonalizationDesignService.CreateParams", + params: "PersonalizationDesignCreateParams", options: Optional[RequestOptions] = None, ) -> PersonalizationDesign: """ @@ -271,7 +103,7 @@ async def create_async( def retrieve( self, personalization_design: str, - params: Optional["PersonalizationDesignService.RetrieveParams"] = None, + params: Optional["PersonalizationDesignRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> PersonalizationDesign: """ @@ -293,7 +125,7 @@ def retrieve( async def retrieve_async( self, personalization_design: str, - params: Optional["PersonalizationDesignService.RetrieveParams"] = None, + params: Optional["PersonalizationDesignRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> PersonalizationDesign: """ @@ -315,7 +147,7 @@ async def retrieve_async( def update( self, personalization_design: str, - params: Optional["PersonalizationDesignService.UpdateParams"] = None, + params: Optional["PersonalizationDesignUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> PersonalizationDesign: """ @@ -337,7 +169,7 @@ def update( async def update_async( self, personalization_design: str, - params: Optional["PersonalizationDesignService.UpdateParams"] = None, + params: Optional["PersonalizationDesignUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> PersonalizationDesign: """ diff --git a/stripe/issuing/_physical_bundle.py b/stripe/issuing/_physical_bundle.py index 7f2661d49..0e5b33878 100644 --- a/stripe/issuing/_physical_bundle.py +++ b/stripe/issuing/_physical_bundle.py @@ -2,10 +2,17 @@ # File generated from our OpenAPI spec from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource -from stripe._request_options import RequestOptions from stripe._stripe_object import StripeObject -from typing import ClassVar, List -from typing_extensions import Literal, NotRequired, Unpack +from typing import ClassVar +from typing_extensions import Literal, Unpack, TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params.issuing._physical_bundle_list_params import ( + PhysicalBundleListParams, + ) + from stripe.params.issuing._physical_bundle_retrieve_params import ( + PhysicalBundleRetrieveParams, + ) class PhysicalBundle(ListableAPIResource["PhysicalBundle"]): @@ -31,38 +38,6 @@ class Features(StripeObject): The policy for how to use a second line on a card with this physical bundle. """ - class ListParams(RequestOptions): - 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. - """ - status: NotRequired[Literal["active", "inactive", "review"]] - """ - Only return physical bundles with the given status. - """ - type: NotRequired[Literal["custom", "standard"]] - """ - Only return physical bundles with the given type. - """ - - class RetrieveParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - features: Features id: str """ @@ -91,7 +66,7 @@ class RetrieveParams(RequestOptions): @classmethod def list( - cls, **params: Unpack["PhysicalBundle.ListParams"] + cls, **params: Unpack["PhysicalBundleListParams"] ) -> ListObject["PhysicalBundle"]: """ Returns a list of physical bundle objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first. @@ -111,7 +86,7 @@ def list( @classmethod async def list_async( - cls, **params: Unpack["PhysicalBundle.ListParams"] + cls, **params: Unpack["PhysicalBundleListParams"] ) -> ListObject["PhysicalBundle"]: """ Returns a list of physical bundle objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first. @@ -131,7 +106,7 @@ async def list_async( @classmethod def retrieve( - cls, id: str, **params: Unpack["PhysicalBundle.RetrieveParams"] + cls, id: str, **params: Unpack["PhysicalBundleRetrieveParams"] ) -> "PhysicalBundle": """ Retrieves a physical bundle object. @@ -142,7 +117,7 @@ def retrieve( @classmethod async def retrieve_async( - cls, id: str, **params: Unpack["PhysicalBundle.RetrieveParams"] + cls, id: str, **params: Unpack["PhysicalBundleRetrieveParams"] ) -> "PhysicalBundle": """ Retrieves a physical bundle object. diff --git a/stripe/issuing/_physical_bundle_service.py b/stripe/issuing/_physical_bundle_service.py index 00c7398ba..65c161191 100644 --- a/stripe/issuing/_physical_bundle_service.py +++ b/stripe/issuing/_physical_bundle_service.py @@ -5,46 +5,22 @@ from stripe._stripe_service import StripeService from stripe._util import sanitize_id from stripe.issuing._physical_bundle import PhysicalBundle -from typing import List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params.issuing._physical_bundle_list_params import ( + PhysicalBundleListParams, + ) + from stripe.params.issuing._physical_bundle_retrieve_params import ( + PhysicalBundleRetrieveParams, + ) -class PhysicalBundleService(StripeService): - class ListParams(TypedDict): - 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. - """ - status: NotRequired[Literal["active", "inactive", "review"]] - """ - Only return physical bundles with the given status. - """ - type: NotRequired[Literal["custom", "standard"]] - """ - Only return physical bundles with the given type. - """ - - class RetrieveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ +class PhysicalBundleService(StripeService): def list( self, - params: Optional["PhysicalBundleService.ListParams"] = None, + params: Optional["PhysicalBundleListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[PhysicalBundle]: """ @@ -63,7 +39,7 @@ def list( async def list_async( self, - params: Optional["PhysicalBundleService.ListParams"] = None, + params: Optional["PhysicalBundleListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[PhysicalBundle]: """ @@ -83,7 +59,7 @@ async def list_async( def retrieve( self, physical_bundle: str, - params: Optional["PhysicalBundleService.RetrieveParams"] = None, + params: Optional["PhysicalBundleRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> PhysicalBundle: """ @@ -105,7 +81,7 @@ def retrieve( async def retrieve_async( self, physical_bundle: str, - params: Optional["PhysicalBundleService.RetrieveParams"] = None, + params: Optional["PhysicalBundleRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> PhysicalBundle: """ diff --git a/stripe/issuing/_token.py b/stripe/issuing/_token.py index 214976671..85434e3ea 100644 --- a/stripe/issuing/_token.py +++ b/stripe/issuing/_token.py @@ -3,21 +3,19 @@ from stripe._expandable_field import ExpandableField from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource -from stripe._request_options import RequestOptions from stripe._stripe_object import StripeObject from stripe._updateable_api_resource import UpdateableAPIResource from stripe._util import sanitize_id from typing import ClassVar, List, Optional, cast -from typing_extensions import ( - Literal, - NotRequired, - TypedDict, - Unpack, - TYPE_CHECKING, -) +from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: from stripe.issuing._card import Card + from stripe.params.issuing._token_list_params import TokenListParams + from stripe.params.issuing._token_modify_params import TokenModifyParams + from stripe.params.issuing._token_retrieve_params import ( + TokenRetrieveParams, + ) class Token(ListableAPIResource["Token"], UpdateableAPIResource["Token"]): @@ -192,72 +190,6 @@ class CardholderAddress(StripeObject): "wallet_provider": WalletProvider, } - class ListParams(RequestOptions): - card: str - """ - The Issuing card identifier to list tokens for. - """ - created: NotRequired["Token.ListParamsCreated|int"] - """ - Only return Issuing tokens that were created during the given date interval. - """ - 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. - """ - status: NotRequired[ - Literal["active", "deleted", "requested", "suspended"] - ] - """ - Select Issuing tokens with the given status. - """ - - class ListParamsCreated(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) - """ - - class ModifyParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - status: Literal["active", "deleted", "suspended"] - """ - Specifies which status the token should be updated to. - """ - - class RetrieveParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - card: ExpandableField["Card"] """ Card associated with this token. @@ -307,7 +239,7 @@ class RetrieveParams(RequestOptions): """ @classmethod - def list(cls, **params: Unpack["Token.ListParams"]) -> ListObject["Token"]: + def list(cls, **params: Unpack["TokenListParams"]) -> ListObject["Token"]: """ Lists all Issuing Token objects for a given card. """ @@ -326,7 +258,7 @@ def list(cls, **params: Unpack["Token.ListParams"]) -> ListObject["Token"]: @classmethod async def list_async( - cls, **params: Unpack["Token.ListParams"] + cls, **params: Unpack["TokenListParams"] ) -> ListObject["Token"]: """ Lists all Issuing Token objects for a given card. @@ -345,9 +277,7 @@ async def list_async( return result @classmethod - def modify( - cls, id: str, **params: Unpack["Token.ModifyParams"] - ) -> "Token": + def modify(cls, id: str, **params: Unpack["TokenModifyParams"]) -> "Token": """ Attempts to update the specified Issuing Token object to the status specified. """ @@ -363,7 +293,7 @@ def modify( @classmethod async def modify_async( - cls, id: str, **params: Unpack["Token.ModifyParams"] + cls, id: str, **params: Unpack["TokenModifyParams"] ) -> "Token": """ Attempts to update the specified Issuing Token object to the status specified. @@ -380,7 +310,7 @@ async def modify_async( @classmethod def retrieve( - cls, id: str, **params: Unpack["Token.RetrieveParams"] + cls, id: str, **params: Unpack["TokenRetrieveParams"] ) -> "Token": """ Retrieves an Issuing Token object. @@ -391,7 +321,7 @@ def retrieve( @classmethod async def retrieve_async( - cls, id: str, **params: Unpack["Token.RetrieveParams"] + cls, id: str, **params: Unpack["TokenRetrieveParams"] ) -> "Token": """ Retrieves an Issuing Token object. diff --git a/stripe/issuing/_token_service.py b/stripe/issuing/_token_service.py index 81de27914..e1d305780 100644 --- a/stripe/issuing/_token_service.py +++ b/stripe/issuing/_token_service.py @@ -5,80 +5,21 @@ from stripe._stripe_service import StripeService from stripe._util import sanitize_id from stripe.issuing._token import Token -from typing import List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params.issuing._token_list_params import TokenListParams + from stripe.params.issuing._token_retrieve_params import ( + TokenRetrieveParams, + ) + from stripe.params.issuing._token_update_params import TokenUpdateParams -class TokenService(StripeService): - class ListParams(TypedDict): - card: str - """ - The Issuing card identifier to list tokens for. - """ - created: NotRequired["TokenService.ListParamsCreated|int"] - """ - Only return Issuing tokens that were created during the given date interval. - """ - 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. - """ - status: NotRequired[ - Literal["active", "deleted", "requested", "suspended"] - ] - """ - Select Issuing tokens with the given status. - """ - - class ListParamsCreated(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) - """ - - class RetrieveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class UpdateParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - status: Literal["active", "deleted", "suspended"] - """ - Specifies which status the token should be updated to. - """ +class TokenService(StripeService): def list( self, - params: "TokenService.ListParams", + params: "TokenListParams", options: Optional[RequestOptions] = None, ) -> ListObject[Token]: """ @@ -97,7 +38,7 @@ def list( async def list_async( self, - params: "TokenService.ListParams", + params: "TokenListParams", options: Optional[RequestOptions] = None, ) -> ListObject[Token]: """ @@ -117,7 +58,7 @@ async def list_async( def retrieve( self, token: str, - params: Optional["TokenService.RetrieveParams"] = None, + params: Optional["TokenRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Token: """ @@ -137,7 +78,7 @@ def retrieve( async def retrieve_async( self, token: str, - params: Optional["TokenService.RetrieveParams"] = None, + params: Optional["TokenRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Token: """ @@ -157,7 +98,7 @@ async def retrieve_async( def update( self, token: str, - params: "TokenService.UpdateParams", + params: "TokenUpdateParams", options: Optional[RequestOptions] = None, ) -> Token: """ @@ -177,7 +118,7 @@ def update( async def update_async( self, token: str, - params: "TokenService.UpdateParams", + params: "TokenUpdateParams", options: Optional[RequestOptions] = None, ) -> Token: """ diff --git a/stripe/issuing/_transaction.py b/stripe/issuing/_transaction.py index c395a9880..fa97fd598 100644 --- a/stripe/issuing/_transaction.py +++ b/stripe/issuing/_transaction.py @@ -3,20 +3,12 @@ from stripe._expandable_field import ExpandableField from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource -from stripe._request_options import RequestOptions from stripe._stripe_object import StripeObject from stripe._test_helpers import APIResourceTestHelpers from stripe._updateable_api_resource import UpdateableAPIResource from stripe._util import class_method_variant, sanitize_id from typing import ClassVar, Dict, List, Optional, cast, overload -from typing_extensions import ( - Literal, - NotRequired, - Type, - TypedDict, - Unpack, - TYPE_CHECKING, -) +from typing_extensions import Literal, Type, Unpack, TYPE_CHECKING if TYPE_CHECKING: from stripe._balance_transaction import BalanceTransaction @@ -26,6 +18,24 @@ from stripe.issuing._dispute import Dispute from stripe.issuing._settlement import Settlement from stripe.issuing._token import Token + from stripe.params.issuing._transaction_create_force_capture_params import ( + TransactionCreateForceCaptureParams, + ) + from stripe.params.issuing._transaction_create_unlinked_refund_params import ( + TransactionCreateUnlinkedRefundParams, + ) + from stripe.params.issuing._transaction_list_params import ( + TransactionListParams, + ) + from stripe.params.issuing._transaction_modify_params import ( + TransactionModifyParams, + ) + from stripe.params.issuing._transaction_refund_params import ( + TransactionRefundParams, + ) + from stripe.params.issuing._transaction_retrieve_params import ( + TransactionRetrieveParams, + ) class Transaction( @@ -341,1318 +351,6 @@ class Treasury(StripeObject): The Treasury [ReceivedDebit](https://stripe.com/docs/api/treasury/received_debits) representing this Issuing transaction if it is a capture """ - class CreateForceCaptureParams(RequestOptions): - amount: int - """ - The total amount to attempt to capture. This amount is in the provided currency, or defaults to the cards currency, and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). - """ - card: str - """ - Card associated with this transaction. - """ - currency: NotRequired[str] - """ - The currency of the capture. If not provided, defaults to the currency of the card. 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. - """ - merchant_data: NotRequired[ - "Transaction.CreateForceCaptureParamsMerchantData" - ] - """ - Details about the seller (grocery store, e-commerce website, etc.) where the card authorization happened. - """ - purchase_details: NotRequired[ - "Transaction.CreateForceCaptureParamsPurchaseDetails" - ] - """ - Additional purchase information that is optionally provided by the merchant. - """ - - class CreateForceCaptureParamsMerchantData(TypedDict): - category: NotRequired[ - Literal[ - "ac_refrigeration_repair", - "accounting_bookkeeping_services", - "advertising_services", - "agricultural_cooperative", - "airlines_air_carriers", - "airports_flying_fields", - "ambulance_services", - "amusement_parks_carnivals", - "antique_reproductions", - "antique_shops", - "aquariums", - "architectural_surveying_services", - "art_dealers_and_galleries", - "artists_supply_and_craft_shops", - "auto_and_home_supply_stores", - "auto_body_repair_shops", - "auto_paint_shops", - "auto_service_shops", - "automated_cash_disburse", - "automated_fuel_dispensers", - "automobile_associations", - "automotive_parts_and_accessories_stores", - "automotive_tire_stores", - "bail_and_bond_payments", - "bakeries", - "bands_orchestras", - "barber_and_beauty_shops", - "betting_casino_gambling", - "bicycle_shops", - "billiard_pool_establishments", - "boat_dealers", - "boat_rentals_and_leases", - "book_stores", - "books_periodicals_and_newspapers", - "bowling_alleys", - "bus_lines", - "business_secretarial_schools", - "buying_shopping_services", - "cable_satellite_and_other_pay_television_and_radio", - "camera_and_photographic_supply_stores", - "candy_nut_and_confectionery_stores", - "car_and_truck_dealers_new_used", - "car_and_truck_dealers_used_only", - "car_rental_agencies", - "car_washes", - "carpentry_services", - "carpet_upholstery_cleaning", - "caterers", - "charitable_and_social_service_organizations_fundraising", - "chemicals_and_allied_products", - "child_care_services", - "childrens_and_infants_wear_stores", - "chiropodists_podiatrists", - "chiropractors", - "cigar_stores_and_stands", - "civic_social_fraternal_associations", - "cleaning_and_maintenance", - "clothing_rental", - "colleges_universities", - "commercial_equipment", - "commercial_footwear", - "commercial_photography_art_and_graphics", - "commuter_transport_and_ferries", - "computer_network_services", - "computer_programming", - "computer_repair", - "computer_software_stores", - "computers_peripherals_and_software", - "concrete_work_services", - "construction_materials", - "consulting_public_relations", - "correspondence_schools", - "cosmetic_stores", - "counseling_services", - "country_clubs", - "courier_services", - "court_costs", - "credit_reporting_agencies", - "cruise_lines", - "dairy_products_stores", - "dance_hall_studios_schools", - "dating_escort_services", - "dentists_orthodontists", - "department_stores", - "detective_agencies", - "digital_goods_applications", - "digital_goods_games", - "digital_goods_large_volume", - "digital_goods_media", - "direct_marketing_catalog_merchant", - "direct_marketing_combination_catalog_and_retail_merchant", - "direct_marketing_inbound_telemarketing", - "direct_marketing_insurance_services", - "direct_marketing_other", - "direct_marketing_outbound_telemarketing", - "direct_marketing_subscription", - "direct_marketing_travel", - "discount_stores", - "doctors", - "door_to_door_sales", - "drapery_window_covering_and_upholstery_stores", - "drinking_places", - "drug_stores_and_pharmacies", - "drugs_drug_proprietaries_and_druggist_sundries", - "dry_cleaners", - "durable_goods", - "duty_free_stores", - "eating_places_restaurants", - "educational_services", - "electric_razor_stores", - "electric_vehicle_charging", - "electrical_parts_and_equipment", - "electrical_services", - "electronics_repair_shops", - "electronics_stores", - "elementary_secondary_schools", - "emergency_services_gcas_visa_use_only", - "employment_temp_agencies", - "equipment_rental", - "exterminating_services", - "family_clothing_stores", - "fast_food_restaurants", - "financial_institutions", - "fines_government_administrative_entities", - "fireplace_fireplace_screens_and_accessories_stores", - "floor_covering_stores", - "florists", - "florists_supplies_nursery_stock_and_flowers", - "freezer_and_locker_meat_provisioners", - "fuel_dealers_non_automotive", - "funeral_services_crematories", - "furniture_home_furnishings_and_equipment_stores_except_appliances", - "furniture_repair_refinishing", - "furriers_and_fur_shops", - "general_services", - "gift_card_novelty_and_souvenir_shops", - "glass_paint_and_wallpaper_stores", - "glassware_crystal_stores", - "golf_courses_public", - "government_licensed_horse_dog_racing_us_region_only", - "government_licensed_online_casions_online_gambling_us_region_only", - "government_owned_lotteries_non_us_region", - "government_owned_lotteries_us_region_only", - "government_services", - "grocery_stores_supermarkets", - "hardware_equipment_and_supplies", - "hardware_stores", - "health_and_beauty_spas", - "hearing_aids_sales_and_supplies", - "heating_plumbing_a_c", - "hobby_toy_and_game_shops", - "home_supply_warehouse_stores", - "hospitals", - "hotels_motels_and_resorts", - "household_appliance_stores", - "industrial_supplies", - "information_retrieval_services", - "insurance_default", - "insurance_underwriting_premiums", - "intra_company_purchases", - "jewelry_stores_watches_clocks_and_silverware_stores", - "landscaping_services", - "laundries", - "laundry_cleaning_services", - "legal_services_attorneys", - "luggage_and_leather_goods_stores", - "lumber_building_materials_stores", - "manual_cash_disburse", - "marinas_service_and_supplies", - "marketplaces", - "masonry_stonework_and_plaster", - "massage_parlors", - "medical_and_dental_labs", - "medical_dental_ophthalmic_and_hospital_equipment_and_supplies", - "medical_services", - "membership_organizations", - "mens_and_boys_clothing_and_accessories_stores", - "mens_womens_clothing_stores", - "metal_service_centers", - "miscellaneous_apparel_and_accessory_shops", - "miscellaneous_auto_dealers", - "miscellaneous_business_services", - "miscellaneous_food_stores", - "miscellaneous_general_merchandise", - "miscellaneous_general_services", - "miscellaneous_home_furnishing_specialty_stores", - "miscellaneous_publishing_and_printing", - "miscellaneous_recreation_services", - "miscellaneous_repair_shops", - "miscellaneous_specialty_retail", - "mobile_home_dealers", - "motion_picture_theaters", - "motor_freight_carriers_and_trucking", - "motor_homes_dealers", - "motor_vehicle_supplies_and_new_parts", - "motorcycle_shops_and_dealers", - "motorcycle_shops_dealers", - "music_stores_musical_instruments_pianos_and_sheet_music", - "news_dealers_and_newsstands", - "non_fi_money_orders", - "non_fi_stored_value_card_purchase_load", - "nondurable_goods", - "nurseries_lawn_and_garden_supply_stores", - "nursing_personal_care", - "office_and_commercial_furniture", - "opticians_eyeglasses", - "optometrists_ophthalmologist", - "orthopedic_goods_prosthetic_devices", - "osteopaths", - "package_stores_beer_wine_and_liquor", - "paints_varnishes_and_supplies", - "parking_lots_garages", - "passenger_railways", - "pawn_shops", - "pet_shops_pet_food_and_supplies", - "petroleum_and_petroleum_products", - "photo_developing", - "photographic_photocopy_microfilm_equipment_and_supplies", - "photographic_studios", - "picture_video_production", - "piece_goods_notions_and_other_dry_goods", - "plumbing_heating_equipment_and_supplies", - "political_organizations", - "postal_services_government_only", - "precious_stones_and_metals_watches_and_jewelry", - "professional_services", - "public_warehousing_and_storage", - "quick_copy_repro_and_blueprint", - "railroads", - "real_estate_agents_and_managers_rentals", - "record_stores", - "recreational_vehicle_rentals", - "religious_goods_stores", - "religious_organizations", - "roofing_siding_sheet_metal", - "secretarial_support_services", - "security_brokers_dealers", - "service_stations", - "sewing_needlework_fabric_and_piece_goods_stores", - "shoe_repair_hat_cleaning", - "shoe_stores", - "small_appliance_repair", - "snowmobile_dealers", - "special_trade_services", - "specialty_cleaning", - "sporting_goods_stores", - "sporting_recreation_camps", - "sports_and_riding_apparel_stores", - "sports_clubs_fields", - "stamp_and_coin_stores", - "stationary_office_supplies_printing_and_writing_paper", - "stationery_stores_office_and_school_supply_stores", - "swimming_pools_sales", - "t_ui_travel_germany", - "tailors_alterations", - "tax_payments_government_agencies", - "tax_preparation_services", - "taxicabs_limousines", - "telecommunication_equipment_and_telephone_sales", - "telecommunication_services", - "telegraph_services", - "tent_and_awning_shops", - "testing_laboratories", - "theatrical_ticket_agencies", - "timeshares", - "tire_retreading_and_repair", - "tolls_bridge_fees", - "tourist_attractions_and_exhibits", - "towing_services", - "trailer_parks_campgrounds", - "transportation_services", - "travel_agencies_tour_operators", - "truck_stop_iteration", - "truck_utility_trailer_rentals", - "typesetting_plate_making_and_related_services", - "typewriter_stores", - "u_s_federal_government_agencies_or_departments", - "uniforms_commercial_clothing", - "used_merchandise_and_secondhand_stores", - "utilities", - "variety_stores", - "veterinary_services", - "video_amusement_game_supplies", - "video_game_arcades", - "video_tape_rental_stores", - "vocational_trade_schools", - "watch_jewelry_repair", - "welding_repair", - "wholesale_clubs", - "wig_and_toupee_stores", - "wires_money_orders", - "womens_accessory_and_specialty_shops", - "womens_ready_to_wear_stores", - "wrecking_and_salvage_yards", - ] - ] - """ - A categorization of the seller's type of business. See our [merchant categories guide](https://stripe.com/docs/issuing/merchant-categories) for a list of possible values. - """ - city: NotRequired[str] - """ - City where the seller is located - """ - country: NotRequired[str] - """ - Country where the seller is located - """ - name: NotRequired[str] - """ - Name of the seller - """ - network_id: NotRequired[str] - """ - Identifier assigned to the seller by the card network. Different card networks may assign different network_id fields to the same merchant. - """ - postal_code: NotRequired[str] - """ - Postal code where the seller is located - """ - state: NotRequired[str] - """ - State where the seller is located - """ - terminal_id: NotRequired[str] - """ - An ID assigned by the seller to the location of the sale. - """ - url: NotRequired[str] - """ - URL provided by the merchant on a 3DS request - """ - - class CreateForceCaptureParamsPurchaseDetails(TypedDict): - fleet: NotRequired[ - "Transaction.CreateForceCaptureParamsPurchaseDetailsFleet" - ] - """ - Fleet-specific information for transactions using Fleet cards. - """ - flight: NotRequired[ - "Transaction.CreateForceCaptureParamsPurchaseDetailsFlight" - ] - """ - Information about the flight that was purchased with this transaction. - """ - fuel: NotRequired[ - "Transaction.CreateForceCaptureParamsPurchaseDetailsFuel" - ] - """ - Information about fuel that was purchased with this transaction. - """ - lodging: NotRequired[ - "Transaction.CreateForceCaptureParamsPurchaseDetailsLodging" - ] - """ - Information about lodging that was purchased with this transaction. - """ - receipt: NotRequired[ - List["Transaction.CreateForceCaptureParamsPurchaseDetailsReceipt"] - ] - """ - The line items in the purchase. - """ - reference: NotRequired[str] - """ - A merchant-specific order number. - """ - - class CreateForceCaptureParamsPurchaseDetailsFleet(TypedDict): - cardholder_prompt_data: NotRequired[ - "Transaction.CreateForceCaptureParamsPurchaseDetailsFleetCardholderPromptData" - ] - """ - Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry. - """ - purchase_type: NotRequired[ - Literal[ - "fuel_and_non_fuel_purchase", - "fuel_purchase", - "non_fuel_purchase", - ] - ] - """ - The type of purchase. One of `fuel_purchase`, `non_fuel_purchase`, or `fuel_and_non_fuel_purchase`. - """ - reported_breakdown: NotRequired[ - "Transaction.CreateForceCaptureParamsPurchaseDetailsFleetReportedBreakdown" - ] - """ - More information about the total amount. This information is not guaranteed to be accurate as some merchants may provide unreliable data. - """ - service_type: NotRequired[ - Literal["full_service", "non_fuel_transaction", "self_service"] - ] - """ - The type of fuel service. One of `non_fuel_transaction`, `full_service`, or `self_service`. - """ - - class CreateForceCaptureParamsPurchaseDetailsFleetCardholderPromptData( - TypedDict, - ): - driver_id: NotRequired[str] - """ - Driver ID. - """ - odometer: NotRequired[int] - """ - Odometer reading. - """ - unspecified_id: NotRequired[str] - """ - An alphanumeric ID. This field is used when a vehicle ID, driver ID, or generic ID is entered by the cardholder, but the merchant or card network did not specify the prompt type. - """ - user_id: NotRequired[str] - """ - User ID. - """ - vehicle_number: NotRequired[str] - """ - Vehicle number. - """ - - class CreateForceCaptureParamsPurchaseDetailsFleetReportedBreakdown( - TypedDict, - ): - fuel: NotRequired[ - "Transaction.CreateForceCaptureParamsPurchaseDetailsFleetReportedBreakdownFuel" - ] - """ - Breakdown of fuel portion of the purchase. - """ - non_fuel: NotRequired[ - "Transaction.CreateForceCaptureParamsPurchaseDetailsFleetReportedBreakdownNonFuel" - ] - """ - Breakdown of non-fuel portion of the purchase. - """ - tax: NotRequired[ - "Transaction.CreateForceCaptureParamsPurchaseDetailsFleetReportedBreakdownTax" - ] - """ - Information about tax included in this transaction. - """ - - class CreateForceCaptureParamsPurchaseDetailsFleetReportedBreakdownFuel( - TypedDict, - ): - gross_amount_decimal: NotRequired[str] - """ - Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive of taxes. - """ - - class CreateForceCaptureParamsPurchaseDetailsFleetReportedBreakdownNonFuel( - TypedDict, - ): - gross_amount_decimal: NotRequired[str] - """ - Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes. - """ - - class CreateForceCaptureParamsPurchaseDetailsFleetReportedBreakdownTax( - TypedDict, - ): - local_amount_decimal: NotRequired[str] - """ - Amount of state or provincial Sales Tax included in the transaction amount. Null if not reported by merchant or not subject to tax. - """ - national_amount_decimal: NotRequired[str] - """ - Amount of national Sales Tax or VAT included in the transaction amount. Null if not reported by merchant or not subject to tax. - """ - - class CreateForceCaptureParamsPurchaseDetailsFlight(TypedDict): - departure_at: NotRequired[int] - """ - The time that the flight departed. - """ - passenger_name: NotRequired[str] - """ - The name of the passenger. - """ - refundable: NotRequired[bool] - """ - Whether the ticket is refundable. - """ - segments: NotRequired[ - List[ - "Transaction.CreateForceCaptureParamsPurchaseDetailsFlightSegment" - ] - ] - """ - The legs of the trip. - """ - travel_agency: NotRequired[str] - """ - The travel agency that issued the ticket. - """ - - class CreateForceCaptureParamsPurchaseDetailsFlightSegment(TypedDict): - arrival_airport_code: NotRequired[str] - """ - The three-letter IATA airport code of the flight's destination. - """ - carrier: NotRequired[str] - """ - The airline carrier code. - """ - departure_airport_code: NotRequired[str] - """ - The three-letter IATA airport code that the flight departed from. - """ - flight_number: NotRequired[str] - """ - The flight number. - """ - service_class: NotRequired[str] - """ - The flight's service class. - """ - stopover_allowed: NotRequired[bool] - """ - Whether a stopover is allowed on this flight. - """ - - class CreateForceCaptureParamsPurchaseDetailsFuel(TypedDict): - industry_product_code: NotRequired[str] - """ - [Conexxus Payment System Product Code](https://www.conexxus.org/conexxus-payment-system-product-codes) identifying the primary fuel product purchased. - """ - quantity_decimal: NotRequired[str] - """ - The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places. - """ - type: NotRequired[ - Literal[ - "diesel", - "other", - "unleaded_plus", - "unleaded_regular", - "unleaded_super", - ] - ] - """ - The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`. - """ - unit: NotRequired[ - Literal[ - "charging_minute", - "imperial_gallon", - "kilogram", - "kilowatt_hour", - "liter", - "other", - "pound", - "us_gallon", - ] - ] - """ - The units for `quantity_decimal`. One of `charging_minute`, `imperial_gallon`, `kilogram`, `kilowatt_hour`, `liter`, `pound`, `us_gallon`, or `other`. - """ - unit_cost_decimal: NotRequired[str] - """ - The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places. - """ - - class CreateForceCaptureParamsPurchaseDetailsLodging(TypedDict): - check_in_at: NotRequired[int] - """ - The time of checking into the lodging. - """ - nights: NotRequired[int] - """ - The number of nights stayed at the lodging. - """ - - class CreateForceCaptureParamsPurchaseDetailsReceipt(TypedDict): - description: NotRequired[str] - quantity: NotRequired[str] - total: NotRequired[int] - unit_cost: NotRequired[int] - - class CreateUnlinkedRefundParams(RequestOptions): - amount: int - """ - The total amount to attempt to refund. This amount is in the provided currency, or defaults to the cards currency, and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). - """ - card: str - """ - Card associated with this unlinked refund transaction. - """ - currency: NotRequired[str] - """ - The currency of the unlinked refund. If not provided, defaults to the currency of the card. 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. - """ - merchant_data: NotRequired[ - "Transaction.CreateUnlinkedRefundParamsMerchantData" - ] - """ - Details about the seller (grocery store, e-commerce website, etc.) where the card authorization happened. - """ - purchase_details: NotRequired[ - "Transaction.CreateUnlinkedRefundParamsPurchaseDetails" - ] - """ - Additional purchase information that is optionally provided by the merchant. - """ - - class CreateUnlinkedRefundParamsMerchantData(TypedDict): - category: NotRequired[ - Literal[ - "ac_refrigeration_repair", - "accounting_bookkeeping_services", - "advertising_services", - "agricultural_cooperative", - "airlines_air_carriers", - "airports_flying_fields", - "ambulance_services", - "amusement_parks_carnivals", - "antique_reproductions", - "antique_shops", - "aquariums", - "architectural_surveying_services", - "art_dealers_and_galleries", - "artists_supply_and_craft_shops", - "auto_and_home_supply_stores", - "auto_body_repair_shops", - "auto_paint_shops", - "auto_service_shops", - "automated_cash_disburse", - "automated_fuel_dispensers", - "automobile_associations", - "automotive_parts_and_accessories_stores", - "automotive_tire_stores", - "bail_and_bond_payments", - "bakeries", - "bands_orchestras", - "barber_and_beauty_shops", - "betting_casino_gambling", - "bicycle_shops", - "billiard_pool_establishments", - "boat_dealers", - "boat_rentals_and_leases", - "book_stores", - "books_periodicals_and_newspapers", - "bowling_alleys", - "bus_lines", - "business_secretarial_schools", - "buying_shopping_services", - "cable_satellite_and_other_pay_television_and_radio", - "camera_and_photographic_supply_stores", - "candy_nut_and_confectionery_stores", - "car_and_truck_dealers_new_used", - "car_and_truck_dealers_used_only", - "car_rental_agencies", - "car_washes", - "carpentry_services", - "carpet_upholstery_cleaning", - "caterers", - "charitable_and_social_service_organizations_fundraising", - "chemicals_and_allied_products", - "child_care_services", - "childrens_and_infants_wear_stores", - "chiropodists_podiatrists", - "chiropractors", - "cigar_stores_and_stands", - "civic_social_fraternal_associations", - "cleaning_and_maintenance", - "clothing_rental", - "colleges_universities", - "commercial_equipment", - "commercial_footwear", - "commercial_photography_art_and_graphics", - "commuter_transport_and_ferries", - "computer_network_services", - "computer_programming", - "computer_repair", - "computer_software_stores", - "computers_peripherals_and_software", - "concrete_work_services", - "construction_materials", - "consulting_public_relations", - "correspondence_schools", - "cosmetic_stores", - "counseling_services", - "country_clubs", - "courier_services", - "court_costs", - "credit_reporting_agencies", - "cruise_lines", - "dairy_products_stores", - "dance_hall_studios_schools", - "dating_escort_services", - "dentists_orthodontists", - "department_stores", - "detective_agencies", - "digital_goods_applications", - "digital_goods_games", - "digital_goods_large_volume", - "digital_goods_media", - "direct_marketing_catalog_merchant", - "direct_marketing_combination_catalog_and_retail_merchant", - "direct_marketing_inbound_telemarketing", - "direct_marketing_insurance_services", - "direct_marketing_other", - "direct_marketing_outbound_telemarketing", - "direct_marketing_subscription", - "direct_marketing_travel", - "discount_stores", - "doctors", - "door_to_door_sales", - "drapery_window_covering_and_upholstery_stores", - "drinking_places", - "drug_stores_and_pharmacies", - "drugs_drug_proprietaries_and_druggist_sundries", - "dry_cleaners", - "durable_goods", - "duty_free_stores", - "eating_places_restaurants", - "educational_services", - "electric_razor_stores", - "electric_vehicle_charging", - "electrical_parts_and_equipment", - "electrical_services", - "electronics_repair_shops", - "electronics_stores", - "elementary_secondary_schools", - "emergency_services_gcas_visa_use_only", - "employment_temp_agencies", - "equipment_rental", - "exterminating_services", - "family_clothing_stores", - "fast_food_restaurants", - "financial_institutions", - "fines_government_administrative_entities", - "fireplace_fireplace_screens_and_accessories_stores", - "floor_covering_stores", - "florists", - "florists_supplies_nursery_stock_and_flowers", - "freezer_and_locker_meat_provisioners", - "fuel_dealers_non_automotive", - "funeral_services_crematories", - "furniture_home_furnishings_and_equipment_stores_except_appliances", - "furniture_repair_refinishing", - "furriers_and_fur_shops", - "general_services", - "gift_card_novelty_and_souvenir_shops", - "glass_paint_and_wallpaper_stores", - "glassware_crystal_stores", - "golf_courses_public", - "government_licensed_horse_dog_racing_us_region_only", - "government_licensed_online_casions_online_gambling_us_region_only", - "government_owned_lotteries_non_us_region", - "government_owned_lotteries_us_region_only", - "government_services", - "grocery_stores_supermarkets", - "hardware_equipment_and_supplies", - "hardware_stores", - "health_and_beauty_spas", - "hearing_aids_sales_and_supplies", - "heating_plumbing_a_c", - "hobby_toy_and_game_shops", - "home_supply_warehouse_stores", - "hospitals", - "hotels_motels_and_resorts", - "household_appliance_stores", - "industrial_supplies", - "information_retrieval_services", - "insurance_default", - "insurance_underwriting_premiums", - "intra_company_purchases", - "jewelry_stores_watches_clocks_and_silverware_stores", - "landscaping_services", - "laundries", - "laundry_cleaning_services", - "legal_services_attorneys", - "luggage_and_leather_goods_stores", - "lumber_building_materials_stores", - "manual_cash_disburse", - "marinas_service_and_supplies", - "marketplaces", - "masonry_stonework_and_plaster", - "massage_parlors", - "medical_and_dental_labs", - "medical_dental_ophthalmic_and_hospital_equipment_and_supplies", - "medical_services", - "membership_organizations", - "mens_and_boys_clothing_and_accessories_stores", - "mens_womens_clothing_stores", - "metal_service_centers", - "miscellaneous_apparel_and_accessory_shops", - "miscellaneous_auto_dealers", - "miscellaneous_business_services", - "miscellaneous_food_stores", - "miscellaneous_general_merchandise", - "miscellaneous_general_services", - "miscellaneous_home_furnishing_specialty_stores", - "miscellaneous_publishing_and_printing", - "miscellaneous_recreation_services", - "miscellaneous_repair_shops", - "miscellaneous_specialty_retail", - "mobile_home_dealers", - "motion_picture_theaters", - "motor_freight_carriers_and_trucking", - "motor_homes_dealers", - "motor_vehicle_supplies_and_new_parts", - "motorcycle_shops_and_dealers", - "motorcycle_shops_dealers", - "music_stores_musical_instruments_pianos_and_sheet_music", - "news_dealers_and_newsstands", - "non_fi_money_orders", - "non_fi_stored_value_card_purchase_load", - "nondurable_goods", - "nurseries_lawn_and_garden_supply_stores", - "nursing_personal_care", - "office_and_commercial_furniture", - "opticians_eyeglasses", - "optometrists_ophthalmologist", - "orthopedic_goods_prosthetic_devices", - "osteopaths", - "package_stores_beer_wine_and_liquor", - "paints_varnishes_and_supplies", - "parking_lots_garages", - "passenger_railways", - "pawn_shops", - "pet_shops_pet_food_and_supplies", - "petroleum_and_petroleum_products", - "photo_developing", - "photographic_photocopy_microfilm_equipment_and_supplies", - "photographic_studios", - "picture_video_production", - "piece_goods_notions_and_other_dry_goods", - "plumbing_heating_equipment_and_supplies", - "political_organizations", - "postal_services_government_only", - "precious_stones_and_metals_watches_and_jewelry", - "professional_services", - "public_warehousing_and_storage", - "quick_copy_repro_and_blueprint", - "railroads", - "real_estate_agents_and_managers_rentals", - "record_stores", - "recreational_vehicle_rentals", - "religious_goods_stores", - "religious_organizations", - "roofing_siding_sheet_metal", - "secretarial_support_services", - "security_brokers_dealers", - "service_stations", - "sewing_needlework_fabric_and_piece_goods_stores", - "shoe_repair_hat_cleaning", - "shoe_stores", - "small_appliance_repair", - "snowmobile_dealers", - "special_trade_services", - "specialty_cleaning", - "sporting_goods_stores", - "sporting_recreation_camps", - "sports_and_riding_apparel_stores", - "sports_clubs_fields", - "stamp_and_coin_stores", - "stationary_office_supplies_printing_and_writing_paper", - "stationery_stores_office_and_school_supply_stores", - "swimming_pools_sales", - "t_ui_travel_germany", - "tailors_alterations", - "tax_payments_government_agencies", - "tax_preparation_services", - "taxicabs_limousines", - "telecommunication_equipment_and_telephone_sales", - "telecommunication_services", - "telegraph_services", - "tent_and_awning_shops", - "testing_laboratories", - "theatrical_ticket_agencies", - "timeshares", - "tire_retreading_and_repair", - "tolls_bridge_fees", - "tourist_attractions_and_exhibits", - "towing_services", - "trailer_parks_campgrounds", - "transportation_services", - "travel_agencies_tour_operators", - "truck_stop_iteration", - "truck_utility_trailer_rentals", - "typesetting_plate_making_and_related_services", - "typewriter_stores", - "u_s_federal_government_agencies_or_departments", - "uniforms_commercial_clothing", - "used_merchandise_and_secondhand_stores", - "utilities", - "variety_stores", - "veterinary_services", - "video_amusement_game_supplies", - "video_game_arcades", - "video_tape_rental_stores", - "vocational_trade_schools", - "watch_jewelry_repair", - "welding_repair", - "wholesale_clubs", - "wig_and_toupee_stores", - "wires_money_orders", - "womens_accessory_and_specialty_shops", - "womens_ready_to_wear_stores", - "wrecking_and_salvage_yards", - ] - ] - """ - A categorization of the seller's type of business. See our [merchant categories guide](https://stripe.com/docs/issuing/merchant-categories) for a list of possible values. - """ - city: NotRequired[str] - """ - City where the seller is located - """ - country: NotRequired[str] - """ - Country where the seller is located - """ - name: NotRequired[str] - """ - Name of the seller - """ - network_id: NotRequired[str] - """ - Identifier assigned to the seller by the card network. Different card networks may assign different network_id fields to the same merchant. - """ - postal_code: NotRequired[str] - """ - Postal code where the seller is located - """ - state: NotRequired[str] - """ - State where the seller is located - """ - terminal_id: NotRequired[str] - """ - An ID assigned by the seller to the location of the sale. - """ - url: NotRequired[str] - """ - URL provided by the merchant on a 3DS request - """ - - class CreateUnlinkedRefundParamsPurchaseDetails(TypedDict): - fleet: NotRequired[ - "Transaction.CreateUnlinkedRefundParamsPurchaseDetailsFleet" - ] - """ - Fleet-specific information for transactions using Fleet cards. - """ - flight: NotRequired[ - "Transaction.CreateUnlinkedRefundParamsPurchaseDetailsFlight" - ] - """ - Information about the flight that was purchased with this transaction. - """ - fuel: NotRequired[ - "Transaction.CreateUnlinkedRefundParamsPurchaseDetailsFuel" - ] - """ - Information about fuel that was purchased with this transaction. - """ - lodging: NotRequired[ - "Transaction.CreateUnlinkedRefundParamsPurchaseDetailsLodging" - ] - """ - Information about lodging that was purchased with this transaction. - """ - receipt: NotRequired[ - List[ - "Transaction.CreateUnlinkedRefundParamsPurchaseDetailsReceipt" - ] - ] - """ - The line items in the purchase. - """ - reference: NotRequired[str] - """ - A merchant-specific order number. - """ - - class CreateUnlinkedRefundParamsPurchaseDetailsFleet(TypedDict): - cardholder_prompt_data: NotRequired[ - "Transaction.CreateUnlinkedRefundParamsPurchaseDetailsFleetCardholderPromptData" - ] - """ - Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry. - """ - purchase_type: NotRequired[ - Literal[ - "fuel_and_non_fuel_purchase", - "fuel_purchase", - "non_fuel_purchase", - ] - ] - """ - The type of purchase. One of `fuel_purchase`, `non_fuel_purchase`, or `fuel_and_non_fuel_purchase`. - """ - reported_breakdown: NotRequired[ - "Transaction.CreateUnlinkedRefundParamsPurchaseDetailsFleetReportedBreakdown" - ] - """ - More information about the total amount. This information is not guaranteed to be accurate as some merchants may provide unreliable data. - """ - service_type: NotRequired[ - Literal["full_service", "non_fuel_transaction", "self_service"] - ] - """ - The type of fuel service. One of `non_fuel_transaction`, `full_service`, or `self_service`. - """ - - class CreateUnlinkedRefundParamsPurchaseDetailsFleetCardholderPromptData( - TypedDict, - ): - driver_id: NotRequired[str] - """ - Driver ID. - """ - odometer: NotRequired[int] - """ - Odometer reading. - """ - unspecified_id: NotRequired[str] - """ - An alphanumeric ID. This field is used when a vehicle ID, driver ID, or generic ID is entered by the cardholder, but the merchant or card network did not specify the prompt type. - """ - user_id: NotRequired[str] - """ - User ID. - """ - vehicle_number: NotRequired[str] - """ - Vehicle number. - """ - - class CreateUnlinkedRefundParamsPurchaseDetailsFleetReportedBreakdown( - TypedDict, - ): - fuel: NotRequired[ - "Transaction.CreateUnlinkedRefundParamsPurchaseDetailsFleetReportedBreakdownFuel" - ] - """ - Breakdown of fuel portion of the purchase. - """ - non_fuel: NotRequired[ - "Transaction.CreateUnlinkedRefundParamsPurchaseDetailsFleetReportedBreakdownNonFuel" - ] - """ - Breakdown of non-fuel portion of the purchase. - """ - tax: NotRequired[ - "Transaction.CreateUnlinkedRefundParamsPurchaseDetailsFleetReportedBreakdownTax" - ] - """ - Information about tax included in this transaction. - """ - - class CreateUnlinkedRefundParamsPurchaseDetailsFleetReportedBreakdownFuel( - TypedDict, - ): - gross_amount_decimal: NotRequired[str] - """ - Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive of taxes. - """ - - class CreateUnlinkedRefundParamsPurchaseDetailsFleetReportedBreakdownNonFuel( - TypedDict, - ): - gross_amount_decimal: NotRequired[str] - """ - Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes. - """ - - class CreateUnlinkedRefundParamsPurchaseDetailsFleetReportedBreakdownTax( - TypedDict, - ): - local_amount_decimal: NotRequired[str] - """ - Amount of state or provincial Sales Tax included in the transaction amount. Null if not reported by merchant or not subject to tax. - """ - national_amount_decimal: NotRequired[str] - """ - Amount of national Sales Tax or VAT included in the transaction amount. Null if not reported by merchant or not subject to tax. - """ - - class CreateUnlinkedRefundParamsPurchaseDetailsFlight(TypedDict): - departure_at: NotRequired[int] - """ - The time that the flight departed. - """ - passenger_name: NotRequired[str] - """ - The name of the passenger. - """ - refundable: NotRequired[bool] - """ - Whether the ticket is refundable. - """ - segments: NotRequired[ - List[ - "Transaction.CreateUnlinkedRefundParamsPurchaseDetailsFlightSegment" - ] - ] - """ - The legs of the trip. - """ - travel_agency: NotRequired[str] - """ - The travel agency that issued the ticket. - """ - - class CreateUnlinkedRefundParamsPurchaseDetailsFlightSegment(TypedDict): - arrival_airport_code: NotRequired[str] - """ - The three-letter IATA airport code of the flight's destination. - """ - carrier: NotRequired[str] - """ - The airline carrier code. - """ - departure_airport_code: NotRequired[str] - """ - The three-letter IATA airport code that the flight departed from. - """ - flight_number: NotRequired[str] - """ - The flight number. - """ - service_class: NotRequired[str] - """ - The flight's service class. - """ - stopover_allowed: NotRequired[bool] - """ - Whether a stopover is allowed on this flight. - """ - - class CreateUnlinkedRefundParamsPurchaseDetailsFuel(TypedDict): - industry_product_code: NotRequired[str] - """ - [Conexxus Payment System Product Code](https://www.conexxus.org/conexxus-payment-system-product-codes) identifying the primary fuel product purchased. - """ - quantity_decimal: NotRequired[str] - """ - The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places. - """ - type: NotRequired[ - Literal[ - "diesel", - "other", - "unleaded_plus", - "unleaded_regular", - "unleaded_super", - ] - ] - """ - The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`. - """ - unit: NotRequired[ - Literal[ - "charging_minute", - "imperial_gallon", - "kilogram", - "kilowatt_hour", - "liter", - "other", - "pound", - "us_gallon", - ] - ] - """ - The units for `quantity_decimal`. One of `charging_minute`, `imperial_gallon`, `kilogram`, `kilowatt_hour`, `liter`, `pound`, `us_gallon`, or `other`. - """ - unit_cost_decimal: NotRequired[str] - """ - The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places. - """ - - class CreateUnlinkedRefundParamsPurchaseDetailsLodging(TypedDict): - check_in_at: NotRequired[int] - """ - The time of checking into the lodging. - """ - nights: NotRequired[int] - """ - The number of nights stayed at the lodging. - """ - - class CreateUnlinkedRefundParamsPurchaseDetailsReceipt(TypedDict): - description: NotRequired[str] - quantity: NotRequired[str] - total: NotRequired[int] - unit_cost: NotRequired[int] - - class ListParams(RequestOptions): - card: NotRequired[str] - """ - Only return transactions that belong to the given card. - """ - cardholder: NotRequired[str] - """ - Only return transactions that belong to the given cardholder. - """ - created: NotRequired["Transaction.ListParamsCreated|int"] - """ - Only return transactions that were created during the given date interval. - """ - 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. - """ - settlement: NotRequired[str] - """ - Only return transactions that are associated with the given settlement. - """ - 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. - """ - type: NotRequired[Literal["capture", "refund"]] - """ - Only return transactions that have the given type. One of `capture` or `refund`. - """ - - class ListParamsCreated(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) - """ - - class ModifyParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - - class RefundParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - refund_amount: NotRequired[int] - """ - The total amount to attempt to refund. This amount is in the provided currency, or defaults to the cards currency, and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). - """ - - class RetrieveParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - amount: int """ The transaction amount, which will be reflected in your balance. This amount is in your currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). @@ -1745,7 +443,7 @@ class RetrieveParams(RequestOptions): @classmethod def list( - cls, **params: Unpack["Transaction.ListParams"] + cls, **params: Unpack["TransactionListParams"] ) -> ListObject["Transaction"]: """ Returns a list of Issuing Transaction objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first. @@ -1765,7 +463,7 @@ def list( @classmethod async def list_async( - cls, **params: Unpack["Transaction.ListParams"] + cls, **params: Unpack["TransactionListParams"] ) -> ListObject["Transaction"]: """ Returns a list of Issuing Transaction objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first. @@ -1785,7 +483,7 @@ async def list_async( @classmethod def modify( - cls, id: str, **params: Unpack["Transaction.ModifyParams"] + cls, id: str, **params: Unpack["TransactionModifyParams"] ) -> "Transaction": """ Updates the specified Issuing Transaction object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. @@ -1802,7 +500,7 @@ def modify( @classmethod async def modify_async( - cls, id: str, **params: Unpack["Transaction.ModifyParams"] + cls, id: str, **params: Unpack["TransactionModifyParams"] ) -> "Transaction": """ Updates the specified Issuing Transaction object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. @@ -1819,7 +517,7 @@ async def modify_async( @classmethod def retrieve( - cls, id: str, **params: Unpack["Transaction.RetrieveParams"] + cls, id: str, **params: Unpack["TransactionRetrieveParams"] ) -> "Transaction": """ Retrieves an Issuing Transaction object. @@ -1830,7 +528,7 @@ def retrieve( @classmethod async def retrieve_async( - cls, id: str, **params: Unpack["Transaction.RetrieveParams"] + cls, id: str, **params: Unpack["TransactionRetrieveParams"] ) -> "Transaction": """ Retrieves an Issuing Transaction object. @@ -1844,7 +542,7 @@ class TestHelpers(APIResourceTestHelpers["Transaction"]): @classmethod def create_force_capture( - cls, **params: Unpack["Transaction.CreateForceCaptureParams"] + cls, **params: Unpack["TransactionCreateForceCaptureParams"] ) -> "Transaction": """ Allows the user to capture an arbitrary amount, also known as a forced capture. @@ -1860,7 +558,7 @@ def create_force_capture( @classmethod async def create_force_capture_async( - cls, **params: Unpack["Transaction.CreateForceCaptureParams"] + cls, **params: Unpack["TransactionCreateForceCaptureParams"] ) -> "Transaction": """ Allows the user to capture an arbitrary amount, also known as a forced capture. @@ -1876,7 +574,7 @@ async def create_force_capture_async( @classmethod def create_unlinked_refund( - cls, **params: Unpack["Transaction.CreateUnlinkedRefundParams"] + cls, **params: Unpack["TransactionCreateUnlinkedRefundParams"] ) -> "Transaction": """ Allows the user to refund an arbitrary amount, also known as a unlinked refund. @@ -1892,7 +590,7 @@ def create_unlinked_refund( @classmethod async def create_unlinked_refund_async( - cls, **params: Unpack["Transaction.CreateUnlinkedRefundParams"] + cls, **params: Unpack["TransactionCreateUnlinkedRefundParams"] ) -> "Transaction": """ Allows the user to refund an arbitrary amount, also known as a unlinked refund. @@ -1908,7 +606,7 @@ async def create_unlinked_refund_async( @classmethod def _cls_refund( - cls, transaction: str, **params: Unpack["Transaction.RefundParams"] + cls, transaction: str, **params: Unpack["TransactionRefundParams"] ) -> "Transaction": """ Refund a test-mode Transaction. @@ -1927,7 +625,7 @@ def _cls_refund( @overload @staticmethod def refund( - transaction: str, **params: Unpack["Transaction.RefundParams"] + transaction: str, **params: Unpack["TransactionRefundParams"] ) -> "Transaction": """ Refund a test-mode Transaction. @@ -1936,7 +634,7 @@ def refund( @overload def refund( - self, **params: Unpack["Transaction.RefundParams"] + self, **params: Unpack["TransactionRefundParams"] ) -> "Transaction": """ Refund a test-mode Transaction. @@ -1945,7 +643,7 @@ def refund( @class_method_variant("_cls_refund") def refund( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Transaction.RefundParams"] + self, **params: Unpack["TransactionRefundParams"] ) -> "Transaction": """ Refund a test-mode Transaction. @@ -1963,7 +661,7 @@ def refund( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_refund_async( - cls, transaction: str, **params: Unpack["Transaction.RefundParams"] + cls, transaction: str, **params: Unpack["TransactionRefundParams"] ) -> "Transaction": """ Refund a test-mode Transaction. @@ -1982,7 +680,7 @@ async def _cls_refund_async( @overload @staticmethod async def refund_async( - transaction: str, **params: Unpack["Transaction.RefundParams"] + transaction: str, **params: Unpack["TransactionRefundParams"] ) -> "Transaction": """ Refund a test-mode Transaction. @@ -1991,7 +689,7 @@ async def refund_async( @overload async def refund_async( - self, **params: Unpack["Transaction.RefundParams"] + self, **params: Unpack["TransactionRefundParams"] ) -> "Transaction": """ Refund a test-mode Transaction. @@ -2000,7 +698,7 @@ async def refund_async( @class_method_variant("_cls_refund_async") async def refund_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Transaction.RefundParams"] + self, **params: Unpack["TransactionRefundParams"] ) -> "Transaction": """ Refund a test-mode Transaction. diff --git a/stripe/issuing/_transaction_service.py b/stripe/issuing/_transaction_service.py index 23ba206b1..c5d93b736 100644 --- a/stripe/issuing/_transaction_service.py +++ b/stripe/issuing/_transaction_service.py @@ -5,86 +5,25 @@ from stripe._stripe_service import StripeService from stripe._util import sanitize_id from stripe.issuing._transaction import Transaction -from typing import Dict, List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params.issuing._transaction_list_params import ( + TransactionListParams, + ) + from stripe.params.issuing._transaction_retrieve_params import ( + TransactionRetrieveParams, + ) + from stripe.params.issuing._transaction_update_params import ( + TransactionUpdateParams, + ) -class TransactionService(StripeService): - class ListParams(TypedDict): - card: NotRequired[str] - """ - Only return transactions that belong to the given card. - """ - cardholder: NotRequired[str] - """ - Only return transactions that belong to the given cardholder. - """ - created: NotRequired["TransactionService.ListParamsCreated|int"] - """ - Only return transactions that were created during the given date interval. - """ - 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. - """ - settlement: NotRequired[str] - """ - Only return transactions that are associated with the given settlement. - """ - 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. - """ - type: NotRequired[Literal["capture", "refund"]] - """ - Only return transactions that have the given type. One of `capture` or `refund`. - """ - - class ListParamsCreated(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) - """ - - class RetrieveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class UpdateParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ +class TransactionService(StripeService): def list( self, - params: Optional["TransactionService.ListParams"] = None, + params: Optional["TransactionListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[Transaction]: """ @@ -103,7 +42,7 @@ def list( async def list_async( self, - params: Optional["TransactionService.ListParams"] = None, + params: Optional["TransactionListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[Transaction]: """ @@ -123,7 +62,7 @@ async def list_async( def retrieve( self, transaction: str, - params: Optional["TransactionService.RetrieveParams"] = None, + params: Optional["TransactionRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Transaction: """ @@ -145,7 +84,7 @@ def retrieve( async def retrieve_async( self, transaction: str, - params: Optional["TransactionService.RetrieveParams"] = None, + params: Optional["TransactionRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Transaction: """ @@ -167,7 +106,7 @@ async def retrieve_async( def update( self, transaction: str, - params: Optional["TransactionService.UpdateParams"] = None, + params: Optional["TransactionUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> Transaction: """ @@ -189,7 +128,7 @@ def update( async def update_async( self, transaction: str, - params: Optional["TransactionService.UpdateParams"] = None, + params: Optional["TransactionUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> Transaction: """ diff --git a/stripe/multipart_data_generator.py b/stripe/multipart_data_generator.py deleted file mode 100644 index 511029eef..000000000 --- a/stripe/multipart_data_generator.py +++ /dev/null @@ -1,15 +0,0 @@ -# -*- coding: utf-8 -*- -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.multipart_data_generator package is deprecated and will become internal in the future. - """, - DeprecationWarning, -) - -if not TYPE_CHECKING: - from stripe._multipart_data_generator import ( # noqa - MultipartDataGenerator, - ) diff --git a/stripe/oauth.py b/stripe/oauth.py deleted file mode 100644 index 5dd01e0f2..000000000 --- a/stripe/oauth.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.oauth package is deprecated, please change your - imports to import from stripe directly. - From: - from stripe.oauth import OAuth - To: - from stripe import OAuth - """, - DeprecationWarning, - stacklevel=2, -) - -if not TYPE_CHECKING: - from stripe._oauth import ( # noqa - OAuth, - ) diff --git a/stripe/oauth_error.py b/stripe/oauth_error.py index baad50887..14f75c2af 100644 --- a/stripe/oauth_error.py +++ b/stripe/oauth_error.py @@ -1,6 +1,5 @@ -# Used for global variables -import stripe # noqa: IMP101 from stripe._error import StripeError +from stripe._error_object import OAuthErrorObject class OAuthError(StripeError): @@ -21,9 +20,11 @@ def _construct_error_object(self): if self.json_body is None: return None - return stripe.error_object.OAuthErrorObject._construct_from( # pyright: ignore - values=self.json_body, - requestor=stripe._APIRequestor._global_instance(), + from stripe._api_requestor import _APIRequestor + + return OAuthErrorObject._construct_from( + values=self.json_body, # type: ignore + requestor=_APIRequestor._global_instance(), api_mode="V1", ) diff --git a/stripe/params/__init__.py b/stripe/params/__init__.py new file mode 100644 index 000000000..c0a28729a --- /dev/null +++ b/stripe/params/__init__.py @@ -0,0 +1,1294 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe.params import ( + apps as apps, + billing as billing, + billing_portal as billing_portal, + capital as capital, + checkout as checkout, + climate as climate, + entitlements as entitlements, + financial_connections as financial_connections, + forwarding as forwarding, + identity as identity, + issuing as issuing, + privacy as privacy, + radar as radar, + reporting as reporting, + sigma as sigma, + tax as tax, + terminal as terminal, + test_helpers as test_helpers, + treasury as treasury, +) +from stripe.params._account_capability_list_params import ( + AccountCapabilityListParams as AccountCapabilityListParams, +) +from stripe.params._account_capability_retrieve_params import ( + AccountCapabilityRetrieveParams as AccountCapabilityRetrieveParams, +) +from stripe.params._account_capability_update_params import ( + AccountCapabilityUpdateParams as AccountCapabilityUpdateParams, +) +from stripe.params._account_create_external_account_params import ( + AccountCreateExternalAccountParams as AccountCreateExternalAccountParams, +) +from stripe.params._account_create_login_link_params import ( + AccountCreateLoginLinkParams as AccountCreateLoginLinkParams, +) +from stripe.params._account_create_params import ( + AccountCreateParams as AccountCreateParams, +) +from stripe.params._account_create_person_params import ( + AccountCreatePersonParams as AccountCreatePersonParams, +) +from stripe.params._account_delete_external_account_params import ( + AccountDeleteExternalAccountParams as AccountDeleteExternalAccountParams, +) +from stripe.params._account_delete_params import ( + AccountDeleteParams as AccountDeleteParams, +) +from stripe.params._account_delete_person_params import ( + AccountDeletePersonParams as AccountDeletePersonParams, +) +from stripe.params._account_external_account_create_params import ( + AccountExternalAccountCreateParams as AccountExternalAccountCreateParams, +) +from stripe.params._account_external_account_delete_params import ( + AccountExternalAccountDeleteParams as AccountExternalAccountDeleteParams, +) +from stripe.params._account_external_account_list_params import ( + AccountExternalAccountListParams as AccountExternalAccountListParams, +) +from stripe.params._account_external_account_retrieve_params import ( + AccountExternalAccountRetrieveParams as AccountExternalAccountRetrieveParams, +) +from stripe.params._account_external_account_update_params import ( + AccountExternalAccountUpdateParams as AccountExternalAccountUpdateParams, +) +from stripe.params._account_link_create_params import ( + AccountLinkCreateParams as AccountLinkCreateParams, +) +from stripe.params._account_list_capabilities_params import ( + AccountListCapabilitiesParams as AccountListCapabilitiesParams, +) +from stripe.params._account_list_external_accounts_params import ( + AccountListExternalAccountsParams as AccountListExternalAccountsParams, +) +from stripe.params._account_list_params import ( + AccountListParams as AccountListParams, +) +from stripe.params._account_list_persons_params import ( + AccountListPersonsParams as AccountListPersonsParams, +) +from stripe.params._account_login_link_create_params import ( + AccountLoginLinkCreateParams as AccountLoginLinkCreateParams, +) +from stripe.params._account_modify_capability_params import ( + AccountModifyCapabilityParams as AccountModifyCapabilityParams, +) +from stripe.params._account_modify_external_account_params import ( + AccountModifyExternalAccountParams as AccountModifyExternalAccountParams, +) +from stripe.params._account_modify_person_params import ( + AccountModifyPersonParams as AccountModifyPersonParams, +) +from stripe.params._account_notice_list_params import ( + AccountNoticeListParams as AccountNoticeListParams, +) +from stripe.params._account_notice_modify_params import ( + AccountNoticeModifyParams as AccountNoticeModifyParams, +) +from stripe.params._account_notice_retrieve_params import ( + AccountNoticeRetrieveParams as AccountNoticeRetrieveParams, +) +from stripe.params._account_notice_update_params import ( + AccountNoticeUpdateParams as AccountNoticeUpdateParams, +) +from stripe.params._account_person_create_params import ( + AccountPersonCreateParams as AccountPersonCreateParams, +) +from stripe.params._account_person_delete_params import ( + AccountPersonDeleteParams as AccountPersonDeleteParams, +) +from stripe.params._account_person_list_params import ( + AccountPersonListParams as AccountPersonListParams, +) +from stripe.params._account_person_retrieve_params import ( + AccountPersonRetrieveParams as AccountPersonRetrieveParams, +) +from stripe.params._account_person_update_params import ( + AccountPersonUpdateParams as AccountPersonUpdateParams, +) +from stripe.params._account_persons_params import ( + AccountPersonsParams as AccountPersonsParams, +) +from stripe.params._account_reject_params import ( + AccountRejectParams as AccountRejectParams, +) +from stripe.params._account_retrieve_capability_params import ( + AccountRetrieveCapabilityParams as AccountRetrieveCapabilityParams, +) +from stripe.params._account_retrieve_current_params import ( + AccountRetrieveCurrentParams as AccountRetrieveCurrentParams, +) +from stripe.params._account_retrieve_external_account_params import ( + AccountRetrieveExternalAccountParams as AccountRetrieveExternalAccountParams, +) +from stripe.params._account_retrieve_params import ( + AccountRetrieveParams as AccountRetrieveParams, +) +from stripe.params._account_retrieve_person_params import ( + AccountRetrievePersonParams as AccountRetrievePersonParams, +) +from stripe.params._account_session_create_params import ( + AccountSessionCreateParams as AccountSessionCreateParams, +) +from stripe.params._account_update_params import ( + AccountUpdateParams as AccountUpdateParams, +) +from stripe.params._apple_pay_domain_create_params import ( + ApplePayDomainCreateParams as ApplePayDomainCreateParams, +) +from stripe.params._apple_pay_domain_delete_params import ( + ApplePayDomainDeleteParams as ApplePayDomainDeleteParams, +) +from stripe.params._apple_pay_domain_list_params import ( + ApplePayDomainListParams as ApplePayDomainListParams, +) +from stripe.params._apple_pay_domain_retrieve_params import ( + ApplePayDomainRetrieveParams as ApplePayDomainRetrieveParams, +) +from stripe.params._application_fee_create_refund_params import ( + ApplicationFeeCreateRefundParams as ApplicationFeeCreateRefundParams, +) +from stripe.params._application_fee_list_params import ( + ApplicationFeeListParams as ApplicationFeeListParams, +) +from stripe.params._application_fee_list_refunds_params import ( + ApplicationFeeListRefundsParams as ApplicationFeeListRefundsParams, +) +from stripe.params._application_fee_modify_refund_params import ( + ApplicationFeeModifyRefundParams as ApplicationFeeModifyRefundParams, +) +from stripe.params._application_fee_refund_create_params import ( + ApplicationFeeRefundCreateParams as ApplicationFeeRefundCreateParams, +) +from stripe.params._application_fee_refund_list_params import ( + ApplicationFeeRefundListParams as ApplicationFeeRefundListParams, +) +from stripe.params._application_fee_refund_params import ( + ApplicationFeeRefundParams as ApplicationFeeRefundParams, +) +from stripe.params._application_fee_refund_retrieve_params import ( + ApplicationFeeRefundRetrieveParams as ApplicationFeeRefundRetrieveParams, +) +from stripe.params._application_fee_refund_update_params import ( + ApplicationFeeRefundUpdateParams as ApplicationFeeRefundUpdateParams, +) +from stripe.params._application_fee_retrieve_params import ( + ApplicationFeeRetrieveParams as ApplicationFeeRetrieveParams, +) +from stripe.params._application_fee_retrieve_refund_params import ( + ApplicationFeeRetrieveRefundParams as ApplicationFeeRetrieveRefundParams, +) +from stripe.params._balance_retrieve_params import ( + BalanceRetrieveParams as BalanceRetrieveParams, +) +from stripe.params._balance_settings_modify_params import ( + BalanceSettingsModifyParams as BalanceSettingsModifyParams, +) +from stripe.params._balance_settings_retrieve_params import ( + BalanceSettingsRetrieveParams as BalanceSettingsRetrieveParams, +) +from stripe.params._balance_settings_update_params import ( + BalanceSettingsUpdateParams as BalanceSettingsUpdateParams, +) +from stripe.params._balance_transaction_list_params import ( + BalanceTransactionListParams as BalanceTransactionListParams, +) +from stripe.params._balance_transaction_retrieve_params import ( + BalanceTransactionRetrieveParams as BalanceTransactionRetrieveParams, +) +from stripe.params._bank_account_delete_params import ( + BankAccountDeleteParams as BankAccountDeleteParams, +) +from stripe.params._card_delete_params import ( + CardDeleteParams as CardDeleteParams, +) +from stripe.params._charge_capture_params import ( + ChargeCaptureParams as ChargeCaptureParams, +) +from stripe.params._charge_create_params import ( + ChargeCreateParams as ChargeCreateParams, +) +from stripe.params._charge_list_params import ( + ChargeListParams as ChargeListParams, +) +from stripe.params._charge_list_refunds_params import ( + ChargeListRefundsParams as ChargeListRefundsParams, +) +from stripe.params._charge_modify_params import ( + ChargeModifyParams as ChargeModifyParams, +) +from stripe.params._charge_retrieve_params import ( + ChargeRetrieveParams as ChargeRetrieveParams, +) +from stripe.params._charge_retrieve_refund_params import ( + ChargeRetrieveRefundParams as ChargeRetrieveRefundParams, +) +from stripe.params._charge_search_params import ( + ChargeSearchParams as ChargeSearchParams, +) +from stripe.params._charge_update_params import ( + ChargeUpdateParams as ChargeUpdateParams, +) +from stripe.params._confirmation_token_create_params import ( + ConfirmationTokenCreateParams as ConfirmationTokenCreateParams, +) +from stripe.params._confirmation_token_retrieve_params import ( + ConfirmationTokenRetrieveParams as ConfirmationTokenRetrieveParams, +) +from stripe.params._country_spec_list_params import ( + CountrySpecListParams as CountrySpecListParams, +) +from stripe.params._country_spec_retrieve_params import ( + CountrySpecRetrieveParams as CountrySpecRetrieveParams, +) +from stripe.params._coupon_create_params import ( + CouponCreateParams as CouponCreateParams, +) +from stripe.params._coupon_delete_params import ( + CouponDeleteParams as CouponDeleteParams, +) +from stripe.params._coupon_list_params import ( + CouponListParams as CouponListParams, +) +from stripe.params._coupon_modify_params import ( + CouponModifyParams as CouponModifyParams, +) +from stripe.params._coupon_retrieve_params import ( + CouponRetrieveParams as CouponRetrieveParams, +) +from stripe.params._coupon_update_params import ( + CouponUpdateParams as CouponUpdateParams, +) +from stripe.params._credit_note_create_params import ( + CreditNoteCreateParams as CreditNoteCreateParams, +) +from stripe.params._credit_note_line_item_list_params import ( + CreditNoteLineItemListParams as CreditNoteLineItemListParams, +) +from stripe.params._credit_note_list_lines_params import ( + CreditNoteListLinesParams as CreditNoteListLinesParams, +) +from stripe.params._credit_note_list_params import ( + CreditNoteListParams as CreditNoteListParams, +) +from stripe.params._credit_note_modify_params import ( + CreditNoteModifyParams as CreditNoteModifyParams, +) +from stripe.params._credit_note_preview_lines_list_params import ( + CreditNotePreviewLinesListParams as CreditNotePreviewLinesListParams, +) +from stripe.params._credit_note_preview_lines_params import ( + CreditNotePreviewLinesParams as CreditNotePreviewLinesParams, +) +from stripe.params._credit_note_preview_params import ( + CreditNotePreviewParams as CreditNotePreviewParams, +) +from stripe.params._credit_note_retrieve_params import ( + CreditNoteRetrieveParams as CreditNoteRetrieveParams, +) +from stripe.params._credit_note_update_params import ( + CreditNoteUpdateParams as CreditNoteUpdateParams, +) +from stripe.params._credit_note_void_credit_note_params import ( + CreditNoteVoidCreditNoteParams as CreditNoteVoidCreditNoteParams, +) +from stripe.params._customer_balance_transaction_create_params import ( + CustomerBalanceTransactionCreateParams as CustomerBalanceTransactionCreateParams, +) +from stripe.params._customer_balance_transaction_list_params import ( + CustomerBalanceTransactionListParams as CustomerBalanceTransactionListParams, +) +from stripe.params._customer_balance_transaction_retrieve_params import ( + CustomerBalanceTransactionRetrieveParams as CustomerBalanceTransactionRetrieveParams, +) +from stripe.params._customer_balance_transaction_update_params import ( + CustomerBalanceTransactionUpdateParams as CustomerBalanceTransactionUpdateParams, +) +from stripe.params._customer_cash_balance_retrieve_params import ( + CustomerCashBalanceRetrieveParams as CustomerCashBalanceRetrieveParams, +) +from stripe.params._customer_cash_balance_transaction_list_params import ( + CustomerCashBalanceTransactionListParams as CustomerCashBalanceTransactionListParams, +) +from stripe.params._customer_cash_balance_transaction_retrieve_params import ( + CustomerCashBalanceTransactionRetrieveParams as CustomerCashBalanceTransactionRetrieveParams, +) +from stripe.params._customer_cash_balance_update_params import ( + CustomerCashBalanceUpdateParams as CustomerCashBalanceUpdateParams, +) +from stripe.params._customer_create_balance_transaction_params import ( + CustomerCreateBalanceTransactionParams as CustomerCreateBalanceTransactionParams, +) +from stripe.params._customer_create_funding_instructions_params import ( + CustomerCreateFundingInstructionsParams as CustomerCreateFundingInstructionsParams, +) +from stripe.params._customer_create_params import ( + CustomerCreateParams as CustomerCreateParams, +) +from stripe.params._customer_create_source_params import ( + CustomerCreateSourceParams as CustomerCreateSourceParams, +) +from stripe.params._customer_create_tax_id_params import ( + CustomerCreateTaxIdParams as CustomerCreateTaxIdParams, +) +from stripe.params._customer_delete_discount_params import ( + CustomerDeleteDiscountParams as CustomerDeleteDiscountParams, +) +from stripe.params._customer_delete_params import ( + CustomerDeleteParams as CustomerDeleteParams, +) +from stripe.params._customer_delete_source_params import ( + CustomerDeleteSourceParams as CustomerDeleteSourceParams, +) +from stripe.params._customer_delete_tax_id_params import ( + CustomerDeleteTaxIdParams as CustomerDeleteTaxIdParams, +) +from stripe.params._customer_fund_cash_balance_params import ( + CustomerFundCashBalanceParams as CustomerFundCashBalanceParams, +) +from stripe.params._customer_funding_instructions_create_params import ( + CustomerFundingInstructionsCreateParams as CustomerFundingInstructionsCreateParams, +) +from stripe.params._customer_list_balance_transactions_params import ( + CustomerListBalanceTransactionsParams as CustomerListBalanceTransactionsParams, +) +from stripe.params._customer_list_cash_balance_transactions_params import ( + CustomerListCashBalanceTransactionsParams as CustomerListCashBalanceTransactionsParams, +) +from stripe.params._customer_list_params import ( + CustomerListParams as CustomerListParams, +) +from stripe.params._customer_list_payment_methods_params import ( + CustomerListPaymentMethodsParams as CustomerListPaymentMethodsParams, +) +from stripe.params._customer_list_sources_params import ( + CustomerListSourcesParams as CustomerListSourcesParams, +) +from stripe.params._customer_list_tax_ids_params import ( + CustomerListTaxIdsParams as CustomerListTaxIdsParams, +) +from stripe.params._customer_modify_balance_transaction_params import ( + CustomerModifyBalanceTransactionParams as CustomerModifyBalanceTransactionParams, +) +from stripe.params._customer_modify_cash_balance_params import ( + CustomerModifyCashBalanceParams as CustomerModifyCashBalanceParams, +) +from stripe.params._customer_modify_params import ( + CustomerModifyParams as CustomerModifyParams, +) +from stripe.params._customer_modify_source_params import ( + CustomerModifySourceParams as CustomerModifySourceParams, +) +from stripe.params._customer_payment_method_list_params import ( + CustomerPaymentMethodListParams as CustomerPaymentMethodListParams, +) +from stripe.params._customer_payment_method_retrieve_params import ( + CustomerPaymentMethodRetrieveParams as CustomerPaymentMethodRetrieveParams, +) +from stripe.params._customer_payment_source_create_params import ( + CustomerPaymentSourceCreateParams as CustomerPaymentSourceCreateParams, +) +from stripe.params._customer_payment_source_delete_params import ( + CustomerPaymentSourceDeleteParams as CustomerPaymentSourceDeleteParams, +) +from stripe.params._customer_payment_source_list_params import ( + CustomerPaymentSourceListParams as CustomerPaymentSourceListParams, +) +from stripe.params._customer_payment_source_retrieve_params import ( + CustomerPaymentSourceRetrieveParams as CustomerPaymentSourceRetrieveParams, +) +from stripe.params._customer_payment_source_update_params import ( + CustomerPaymentSourceUpdateParams as CustomerPaymentSourceUpdateParams, +) +from stripe.params._customer_payment_source_verify_params import ( + CustomerPaymentSourceVerifyParams as CustomerPaymentSourceVerifyParams, +) +from stripe.params._customer_retrieve_balance_transaction_params import ( + CustomerRetrieveBalanceTransactionParams as CustomerRetrieveBalanceTransactionParams, +) +from stripe.params._customer_retrieve_cash_balance_params import ( + CustomerRetrieveCashBalanceParams as CustomerRetrieveCashBalanceParams, +) +from stripe.params._customer_retrieve_cash_balance_transaction_params import ( + CustomerRetrieveCashBalanceTransactionParams as CustomerRetrieveCashBalanceTransactionParams, +) +from stripe.params._customer_retrieve_params import ( + CustomerRetrieveParams as CustomerRetrieveParams, +) +from stripe.params._customer_retrieve_payment_method_params import ( + CustomerRetrievePaymentMethodParams as CustomerRetrievePaymentMethodParams, +) +from stripe.params._customer_retrieve_source_params import ( + CustomerRetrieveSourceParams as CustomerRetrieveSourceParams, +) +from stripe.params._customer_retrieve_tax_id_params import ( + CustomerRetrieveTaxIdParams as CustomerRetrieveTaxIdParams, +) +from stripe.params._customer_search_params import ( + CustomerSearchParams as CustomerSearchParams, +) +from stripe.params._customer_session_create_params import ( + CustomerSessionCreateParams as CustomerSessionCreateParams, +) +from stripe.params._customer_tax_id_create_params import ( + CustomerTaxIdCreateParams as CustomerTaxIdCreateParams, +) +from stripe.params._customer_tax_id_delete_params import ( + CustomerTaxIdDeleteParams as CustomerTaxIdDeleteParams, +) +from stripe.params._customer_tax_id_list_params import ( + CustomerTaxIdListParams as CustomerTaxIdListParams, +) +from stripe.params._customer_tax_id_retrieve_params import ( + CustomerTaxIdRetrieveParams as CustomerTaxIdRetrieveParams, +) +from stripe.params._customer_update_params import ( + CustomerUpdateParams as CustomerUpdateParams, +) +from stripe.params._dispute_close_params import ( + DisputeCloseParams as DisputeCloseParams, +) +from stripe.params._dispute_list_params import ( + DisputeListParams as DisputeListParams, +) +from stripe.params._dispute_modify_params import ( + DisputeModifyParams as DisputeModifyParams, +) +from stripe.params._dispute_retrieve_params import ( + DisputeRetrieveParams as DisputeRetrieveParams, +) +from stripe.params._dispute_update_params import ( + DisputeUpdateParams as DisputeUpdateParams, +) +from stripe.params._ephemeral_key_create_params import ( + EphemeralKeyCreateParams as EphemeralKeyCreateParams, +) +from stripe.params._ephemeral_key_delete_params import ( + EphemeralKeyDeleteParams as EphemeralKeyDeleteParams, +) +from stripe.params._event_list_params import EventListParams as EventListParams +from stripe.params._event_retrieve_params import ( + EventRetrieveParams as EventRetrieveParams, +) +from stripe.params._exchange_rate_list_params import ( + ExchangeRateListParams as ExchangeRateListParams, +) +from stripe.params._exchange_rate_retrieve_params import ( + ExchangeRateRetrieveParams as ExchangeRateRetrieveParams, +) +from stripe.params._external_account_create_params import ( + ExternalAccountCreateParams as ExternalAccountCreateParams, +) +from stripe.params._external_account_delete_params import ( + ExternalAccountDeleteParams as ExternalAccountDeleteParams, +) +from stripe.params._external_account_list_params import ( + ExternalAccountListParams as ExternalAccountListParams, +) +from stripe.params._external_account_retrieve_params import ( + ExternalAccountRetrieveParams as ExternalAccountRetrieveParams, +) +from stripe.params._external_account_update_params import ( + ExternalAccountUpdateParams as ExternalAccountUpdateParams, +) +from stripe.params._file_create_params import ( + FileCreateParams as FileCreateParams, +) +from stripe.params._file_link_create_params import ( + FileLinkCreateParams as FileLinkCreateParams, +) +from stripe.params._file_link_list_params import ( + FileLinkListParams as FileLinkListParams, +) +from stripe.params._file_link_modify_params import ( + FileLinkModifyParams as FileLinkModifyParams, +) +from stripe.params._file_link_retrieve_params import ( + FileLinkRetrieveParams as FileLinkRetrieveParams, +) +from stripe.params._file_link_update_params import ( + FileLinkUpdateParams as FileLinkUpdateParams, +) +from stripe.params._file_list_params import FileListParams as FileListParams +from stripe.params._file_retrieve_params import ( + FileRetrieveParams as FileRetrieveParams, +) +from stripe.params._fx_quote_create_params import ( + FxQuoteCreateParams as FxQuoteCreateParams, +) +from stripe.params._fx_quote_list_params import ( + FxQuoteListParams as FxQuoteListParams, +) +from stripe.params._fx_quote_retrieve_params import ( + FxQuoteRetrieveParams as FxQuoteRetrieveParams, +) +from stripe.params._invoice_add_lines_params import ( + InvoiceAddLinesParams as InvoiceAddLinesParams, +) +from stripe.params._invoice_attach_payment_params import ( + InvoiceAttachPaymentParams as InvoiceAttachPaymentParams, +) +from stripe.params._invoice_create_params import ( + InvoiceCreateParams as InvoiceCreateParams, +) +from stripe.params._invoice_create_preview_params import ( + InvoiceCreatePreviewParams as InvoiceCreatePreviewParams, +) +from stripe.params._invoice_delete_params import ( + InvoiceDeleteParams as InvoiceDeleteParams, +) +from stripe.params._invoice_finalize_invoice_params import ( + InvoiceFinalizeInvoiceParams as InvoiceFinalizeInvoiceParams, +) +from stripe.params._invoice_item_create_params import ( + InvoiceItemCreateParams as InvoiceItemCreateParams, +) +from stripe.params._invoice_item_delete_params import ( + InvoiceItemDeleteParams as InvoiceItemDeleteParams, +) +from stripe.params._invoice_item_list_params import ( + InvoiceItemListParams as InvoiceItemListParams, +) +from stripe.params._invoice_item_modify_params import ( + InvoiceItemModifyParams as InvoiceItemModifyParams, +) +from stripe.params._invoice_item_retrieve_params import ( + InvoiceItemRetrieveParams as InvoiceItemRetrieveParams, +) +from stripe.params._invoice_item_update_params import ( + InvoiceItemUpdateParams as InvoiceItemUpdateParams, +) +from stripe.params._invoice_line_item_list_params import ( + InvoiceLineItemListParams as InvoiceLineItemListParams, +) +from stripe.params._invoice_line_item_update_params import ( + InvoiceLineItemUpdateParams as InvoiceLineItemUpdateParams, +) +from stripe.params._invoice_list_lines_params import ( + InvoiceListLinesParams as InvoiceListLinesParams, +) +from stripe.params._invoice_list_params import ( + InvoiceListParams as InvoiceListParams, +) +from stripe.params._invoice_mark_uncollectible_params import ( + InvoiceMarkUncollectibleParams as InvoiceMarkUncollectibleParams, +) +from stripe.params._invoice_modify_params import ( + InvoiceModifyParams as InvoiceModifyParams, +) +from stripe.params._invoice_pay_params import ( + InvoicePayParams as InvoicePayParams, +) +from stripe.params._invoice_payment_list_params import ( + InvoicePaymentListParams as InvoicePaymentListParams, +) +from stripe.params._invoice_payment_retrieve_params import ( + InvoicePaymentRetrieveParams as InvoicePaymentRetrieveParams, +) +from stripe.params._invoice_remove_lines_params import ( + InvoiceRemoveLinesParams as InvoiceRemoveLinesParams, +) +from stripe.params._invoice_rendering_template_archive_params import ( + InvoiceRenderingTemplateArchiveParams as InvoiceRenderingTemplateArchiveParams, +) +from stripe.params._invoice_rendering_template_list_params import ( + InvoiceRenderingTemplateListParams as InvoiceRenderingTemplateListParams, +) +from stripe.params._invoice_rendering_template_retrieve_params import ( + InvoiceRenderingTemplateRetrieveParams as InvoiceRenderingTemplateRetrieveParams, +) +from stripe.params._invoice_rendering_template_unarchive_params import ( + InvoiceRenderingTemplateUnarchiveParams as InvoiceRenderingTemplateUnarchiveParams, +) +from stripe.params._invoice_retrieve_params import ( + InvoiceRetrieveParams as InvoiceRetrieveParams, +) +from stripe.params._invoice_search_params import ( + InvoiceSearchParams as InvoiceSearchParams, +) +from stripe.params._invoice_send_invoice_params import ( + InvoiceSendInvoiceParams as InvoiceSendInvoiceParams, +) +from stripe.params._invoice_update_lines_params import ( + InvoiceUpdateLinesParams as InvoiceUpdateLinesParams, +) +from stripe.params._invoice_update_params import ( + InvoiceUpdateParams as InvoiceUpdateParams, +) +from stripe.params._invoice_void_invoice_params import ( + InvoiceVoidInvoiceParams as InvoiceVoidInvoiceParams, +) +from stripe.params._mandate_list_params import ( + MandateListParams as MandateListParams, +) +from stripe.params._mandate_retrieve_params import ( + MandateRetrieveParams as MandateRetrieveParams, +) +from stripe.params._margin_create_params import ( + MarginCreateParams as MarginCreateParams, +) +from stripe.params._margin_list_params import ( + MarginListParams as MarginListParams, +) +from stripe.params._margin_modify_params import ( + MarginModifyParams as MarginModifyParams, +) +from stripe.params._margin_retrieve_params import ( + MarginRetrieveParams as MarginRetrieveParams, +) +from stripe.params._margin_update_params import ( + MarginUpdateParams as MarginUpdateParams, +) +from stripe.params._order_cancel_params import ( + OrderCancelParams as OrderCancelParams, +) +from stripe.params._order_create_params import ( + OrderCreateParams as OrderCreateParams, +) +from stripe.params._order_line_item_list_params import ( + OrderLineItemListParams as OrderLineItemListParams, +) +from stripe.params._order_list_line_items_params import ( + OrderListLineItemsParams as OrderListLineItemsParams, +) +from stripe.params._order_list_params import OrderListParams as OrderListParams +from stripe.params._order_modify_params import ( + OrderModifyParams as OrderModifyParams, +) +from stripe.params._order_reopen_params import ( + OrderReopenParams as OrderReopenParams, +) +from stripe.params._order_retrieve_params import ( + OrderRetrieveParams as OrderRetrieveParams, +) +from stripe.params._order_submit_params import ( + OrderSubmitParams as OrderSubmitParams, +) +from stripe.params._order_update_params import ( + OrderUpdateParams as OrderUpdateParams, +) +from stripe.params._payment_attempt_record_list_params import ( + PaymentAttemptRecordListParams as PaymentAttemptRecordListParams, +) +from stripe.params._payment_attempt_record_retrieve_params import ( + PaymentAttemptRecordRetrieveParams as PaymentAttemptRecordRetrieveParams, +) +from stripe.params._payment_intent_amount_details_line_item_list_params import ( + PaymentIntentAmountDetailsLineItemListParams as PaymentIntentAmountDetailsLineItemListParams, +) +from stripe.params._payment_intent_apply_customer_balance_params import ( + PaymentIntentApplyCustomerBalanceParams as PaymentIntentApplyCustomerBalanceParams, +) +from stripe.params._payment_intent_cancel_params import ( + PaymentIntentCancelParams as PaymentIntentCancelParams, +) +from stripe.params._payment_intent_capture_params import ( + PaymentIntentCaptureParams as PaymentIntentCaptureParams, +) +from stripe.params._payment_intent_confirm_params import ( + PaymentIntentConfirmParams as PaymentIntentConfirmParams, +) +from stripe.params._payment_intent_create_params import ( + PaymentIntentCreateParams as PaymentIntentCreateParams, +) +from stripe.params._payment_intent_decrement_authorization_params import ( + PaymentIntentDecrementAuthorizationParams as PaymentIntentDecrementAuthorizationParams, +) +from stripe.params._payment_intent_increment_authorization_params import ( + PaymentIntentIncrementAuthorizationParams as PaymentIntentIncrementAuthorizationParams, +) +from stripe.params._payment_intent_list_amount_details_line_items_params import ( + PaymentIntentListAmountDetailsLineItemsParams as PaymentIntentListAmountDetailsLineItemsParams, +) +from stripe.params._payment_intent_list_params import ( + PaymentIntentListParams as PaymentIntentListParams, +) +from stripe.params._payment_intent_modify_params import ( + PaymentIntentModifyParams as PaymentIntentModifyParams, +) +from stripe.params._payment_intent_retrieve_params import ( + PaymentIntentRetrieveParams as PaymentIntentRetrieveParams, +) +from stripe.params._payment_intent_search_params import ( + PaymentIntentSearchParams as PaymentIntentSearchParams, +) +from stripe.params._payment_intent_trigger_action_params import ( + PaymentIntentTriggerActionParams as PaymentIntentTriggerActionParams, +) +from stripe.params._payment_intent_update_params import ( + PaymentIntentUpdateParams as PaymentIntentUpdateParams, +) +from stripe.params._payment_intent_verify_microdeposits_params import ( + PaymentIntentVerifyMicrodepositsParams as PaymentIntentVerifyMicrodepositsParams, +) +from stripe.params._payment_link_create_params import ( + PaymentLinkCreateParams as PaymentLinkCreateParams, +) +from stripe.params._payment_link_line_item_list_params import ( + PaymentLinkLineItemListParams as PaymentLinkLineItemListParams, +) +from stripe.params._payment_link_list_line_items_params import ( + PaymentLinkListLineItemsParams as PaymentLinkListLineItemsParams, +) +from stripe.params._payment_link_list_params import ( + PaymentLinkListParams as PaymentLinkListParams, +) +from stripe.params._payment_link_modify_params import ( + PaymentLinkModifyParams as PaymentLinkModifyParams, +) +from stripe.params._payment_link_retrieve_params import ( + PaymentLinkRetrieveParams as PaymentLinkRetrieveParams, +) +from stripe.params._payment_link_update_params import ( + PaymentLinkUpdateParams as PaymentLinkUpdateParams, +) +from stripe.params._payment_method_attach_params import ( + PaymentMethodAttachParams as PaymentMethodAttachParams, +) +from stripe.params._payment_method_configuration_create_params import ( + PaymentMethodConfigurationCreateParams as PaymentMethodConfigurationCreateParams, +) +from stripe.params._payment_method_configuration_list_params import ( + PaymentMethodConfigurationListParams as PaymentMethodConfigurationListParams, +) +from stripe.params._payment_method_configuration_modify_params import ( + PaymentMethodConfigurationModifyParams as PaymentMethodConfigurationModifyParams, +) +from stripe.params._payment_method_configuration_retrieve_params import ( + PaymentMethodConfigurationRetrieveParams as PaymentMethodConfigurationRetrieveParams, +) +from stripe.params._payment_method_configuration_update_params import ( + PaymentMethodConfigurationUpdateParams as PaymentMethodConfigurationUpdateParams, +) +from stripe.params._payment_method_create_params import ( + PaymentMethodCreateParams as PaymentMethodCreateParams, +) +from stripe.params._payment_method_detach_params import ( + PaymentMethodDetachParams as PaymentMethodDetachParams, +) +from stripe.params._payment_method_domain_create_params import ( + PaymentMethodDomainCreateParams as PaymentMethodDomainCreateParams, +) +from stripe.params._payment_method_domain_list_params import ( + PaymentMethodDomainListParams as PaymentMethodDomainListParams, +) +from stripe.params._payment_method_domain_modify_params import ( + PaymentMethodDomainModifyParams as PaymentMethodDomainModifyParams, +) +from stripe.params._payment_method_domain_retrieve_params import ( + PaymentMethodDomainRetrieveParams as PaymentMethodDomainRetrieveParams, +) +from stripe.params._payment_method_domain_update_params import ( + PaymentMethodDomainUpdateParams as PaymentMethodDomainUpdateParams, +) +from stripe.params._payment_method_domain_validate_params import ( + PaymentMethodDomainValidateParams as PaymentMethodDomainValidateParams, +) +from stripe.params._payment_method_list_params import ( + PaymentMethodListParams as PaymentMethodListParams, +) +from stripe.params._payment_method_modify_params import ( + PaymentMethodModifyParams as PaymentMethodModifyParams, +) +from stripe.params._payment_method_retrieve_params import ( + PaymentMethodRetrieveParams as PaymentMethodRetrieveParams, +) +from stripe.params._payment_method_update_params import ( + PaymentMethodUpdateParams as PaymentMethodUpdateParams, +) +from stripe.params._payment_record_report_payment_attempt_canceled_params import ( + PaymentRecordReportPaymentAttemptCanceledParams as PaymentRecordReportPaymentAttemptCanceledParams, +) +from stripe.params._payment_record_report_payment_attempt_failed_params import ( + PaymentRecordReportPaymentAttemptFailedParams as PaymentRecordReportPaymentAttemptFailedParams, +) +from stripe.params._payment_record_report_payment_attempt_guaranteed_params import ( + PaymentRecordReportPaymentAttemptGuaranteedParams as PaymentRecordReportPaymentAttemptGuaranteedParams, +) +from stripe.params._payment_record_report_payment_attempt_informational_params import ( + PaymentRecordReportPaymentAttemptInformationalParams as PaymentRecordReportPaymentAttemptInformationalParams, +) +from stripe.params._payment_record_report_payment_attempt_params import ( + PaymentRecordReportPaymentAttemptParams as PaymentRecordReportPaymentAttemptParams, +) +from stripe.params._payment_record_report_payment_params import ( + PaymentRecordReportPaymentParams as PaymentRecordReportPaymentParams, +) +from stripe.params._payment_record_retrieve_params import ( + PaymentRecordRetrieveParams as PaymentRecordRetrieveParams, +) +from stripe.params._payout_cancel_params import ( + PayoutCancelParams as PayoutCancelParams, +) +from stripe.params._payout_create_params import ( + PayoutCreateParams as PayoutCreateParams, +) +from stripe.params._payout_list_params import ( + PayoutListParams as PayoutListParams, +) +from stripe.params._payout_modify_params import ( + PayoutModifyParams as PayoutModifyParams, +) +from stripe.params._payout_retrieve_params import ( + PayoutRetrieveParams as PayoutRetrieveParams, +) +from stripe.params._payout_reverse_params import ( + PayoutReverseParams as PayoutReverseParams, +) +from stripe.params._payout_update_params import ( + PayoutUpdateParams as PayoutUpdateParams, +) +from stripe.params._plan_create_params import ( + PlanCreateParams as PlanCreateParams, +) +from stripe.params._plan_delete_params import ( + PlanDeleteParams as PlanDeleteParams, +) +from stripe.params._plan_list_params import PlanListParams as PlanListParams +from stripe.params._plan_modify_params import ( + PlanModifyParams as PlanModifyParams, +) +from stripe.params._plan_retrieve_params import ( + PlanRetrieveParams as PlanRetrieveParams, +) +from stripe.params._plan_update_params import ( + PlanUpdateParams as PlanUpdateParams, +) +from stripe.params._price_create_params import ( + PriceCreateParams as PriceCreateParams, +) +from stripe.params._price_list_params import PriceListParams as PriceListParams +from stripe.params._price_modify_params import ( + PriceModifyParams as PriceModifyParams, +) +from stripe.params._price_retrieve_params import ( + PriceRetrieveParams as PriceRetrieveParams, +) +from stripe.params._price_search_params import ( + PriceSearchParams as PriceSearchParams, +) +from stripe.params._price_update_params import ( + PriceUpdateParams as PriceUpdateParams, +) +from stripe.params._product_create_feature_params import ( + ProductCreateFeatureParams as ProductCreateFeatureParams, +) +from stripe.params._product_create_params import ( + ProductCreateParams as ProductCreateParams, +) +from stripe.params._product_delete_feature_params import ( + ProductDeleteFeatureParams as ProductDeleteFeatureParams, +) +from stripe.params._product_delete_params import ( + ProductDeleteParams as ProductDeleteParams, +) +from stripe.params._product_feature_create_params import ( + ProductFeatureCreateParams as ProductFeatureCreateParams, +) +from stripe.params._product_feature_delete_params import ( + ProductFeatureDeleteParams as ProductFeatureDeleteParams, +) +from stripe.params._product_feature_list_params import ( + ProductFeatureListParams as ProductFeatureListParams, +) +from stripe.params._product_feature_retrieve_params import ( + ProductFeatureRetrieveParams as ProductFeatureRetrieveParams, +) +from stripe.params._product_list_features_params import ( + ProductListFeaturesParams as ProductListFeaturesParams, +) +from stripe.params._product_list_params import ( + ProductListParams as ProductListParams, +) +from stripe.params._product_modify_params import ( + ProductModifyParams as ProductModifyParams, +) +from stripe.params._product_retrieve_feature_params import ( + ProductRetrieveFeatureParams as ProductRetrieveFeatureParams, +) +from stripe.params._product_retrieve_params import ( + ProductRetrieveParams as ProductRetrieveParams, +) +from stripe.params._product_search_params import ( + ProductSearchParams as ProductSearchParams, +) +from stripe.params._product_update_params import ( + ProductUpdateParams as ProductUpdateParams, +) +from stripe.params._promotion_code_create_params import ( + PromotionCodeCreateParams as PromotionCodeCreateParams, +) +from stripe.params._promotion_code_list_params import ( + PromotionCodeListParams as PromotionCodeListParams, +) +from stripe.params._promotion_code_modify_params import ( + PromotionCodeModifyParams as PromotionCodeModifyParams, +) +from stripe.params._promotion_code_retrieve_params import ( + PromotionCodeRetrieveParams as PromotionCodeRetrieveParams, +) +from stripe.params._promotion_code_update_params import ( + PromotionCodeUpdateParams as PromotionCodeUpdateParams, +) +from stripe.params._quote_accept_params import ( + QuoteAcceptParams as QuoteAcceptParams, +) +from stripe.params._quote_cancel_params import ( + QuoteCancelParams as QuoteCancelParams, +) +from stripe.params._quote_computed_upfront_line_items_list_params import ( + QuoteComputedUpfrontLineItemsListParams as QuoteComputedUpfrontLineItemsListParams, +) +from stripe.params._quote_create_params import ( + QuoteCreateParams as QuoteCreateParams, +) +from stripe.params._quote_finalize_quote_params import ( + QuoteFinalizeQuoteParams as QuoteFinalizeQuoteParams, +) +from stripe.params._quote_line_item_list_params import ( + QuoteLineItemListParams as QuoteLineItemListParams, +) +from stripe.params._quote_line_list_params import ( + QuoteLineListParams as QuoteLineListParams, +) +from stripe.params._quote_list_computed_upfront_line_items_params import ( + QuoteListComputedUpfrontLineItemsParams as QuoteListComputedUpfrontLineItemsParams, +) +from stripe.params._quote_list_line_items_params import ( + QuoteListLineItemsParams as QuoteListLineItemsParams, +) +from stripe.params._quote_list_lines_params import ( + QuoteListLinesParams as QuoteListLinesParams, +) +from stripe.params._quote_list_params import QuoteListParams as QuoteListParams +from stripe.params._quote_list_preview_invoice_lines_params import ( + QuoteListPreviewInvoiceLinesParams as QuoteListPreviewInvoiceLinesParams, +) +from stripe.params._quote_list_preview_invoices_params import ( + QuoteListPreviewInvoicesParams as QuoteListPreviewInvoicesParams, +) +from stripe.params._quote_list_preview_subscription_schedules_params import ( + QuoteListPreviewSubscriptionSchedulesParams as QuoteListPreviewSubscriptionSchedulesParams, +) +from stripe.params._quote_mark_draft_params import ( + QuoteMarkDraftParams as QuoteMarkDraftParams, +) +from stripe.params._quote_mark_stale_params import ( + QuoteMarkStaleParams as QuoteMarkStaleParams, +) +from stripe.params._quote_modify_params import ( + QuoteModifyParams as QuoteModifyParams, +) +from stripe.params._quote_pdf_params import QuotePdfParams as QuotePdfParams +from stripe.params._quote_preview_invoice_list_params import ( + QuotePreviewInvoiceListParams as QuotePreviewInvoiceListParams, +) +from stripe.params._quote_preview_subscription_schedule_list_params import ( + QuotePreviewSubscriptionScheduleListParams as QuotePreviewSubscriptionScheduleListParams, +) +from stripe.params._quote_reestimate_params import ( + QuoteReestimateParams as QuoteReestimateParams, +) +from stripe.params._quote_retrieve_params import ( + QuoteRetrieveParams as QuoteRetrieveParams, +) +from stripe.params._quote_update_params import ( + QuoteUpdateParams as QuoteUpdateParams, +) +from stripe.params._refund_cancel_params import ( + RefundCancelParams as RefundCancelParams, +) +from stripe.params._refund_create_params import ( + RefundCreateParams as RefundCreateParams, +) +from stripe.params._refund_expire_params import ( + RefundExpireParams as RefundExpireParams, +) +from stripe.params._refund_list_params import ( + RefundListParams as RefundListParams, +) +from stripe.params._refund_modify_params import ( + RefundModifyParams as RefundModifyParams, +) +from stripe.params._refund_retrieve_params import ( + RefundRetrieveParams as RefundRetrieveParams, +) +from stripe.params._refund_update_params import ( + RefundUpdateParams as RefundUpdateParams, +) +from stripe.params._review_approve_params import ( + ReviewApproveParams as ReviewApproveParams, +) +from stripe.params._review_list_params import ( + ReviewListParams as ReviewListParams, +) +from stripe.params._review_retrieve_params import ( + ReviewRetrieveParams as ReviewRetrieveParams, +) +from stripe.params._setup_attempt_list_params import ( + SetupAttemptListParams as SetupAttemptListParams, +) +from stripe.params._setup_intent_cancel_params import ( + SetupIntentCancelParams as SetupIntentCancelParams, +) +from stripe.params._setup_intent_confirm_params import ( + SetupIntentConfirmParams as SetupIntentConfirmParams, +) +from stripe.params._setup_intent_create_params import ( + SetupIntentCreateParams as SetupIntentCreateParams, +) +from stripe.params._setup_intent_list_params import ( + SetupIntentListParams as SetupIntentListParams, +) +from stripe.params._setup_intent_modify_params import ( + SetupIntentModifyParams as SetupIntentModifyParams, +) +from stripe.params._setup_intent_retrieve_params import ( + SetupIntentRetrieveParams as SetupIntentRetrieveParams, +) +from stripe.params._setup_intent_update_params import ( + SetupIntentUpdateParams as SetupIntentUpdateParams, +) +from stripe.params._setup_intent_verify_microdeposits_params import ( + SetupIntentVerifyMicrodepositsParams as SetupIntentVerifyMicrodepositsParams, +) +from stripe.params._shipping_rate_create_params import ( + ShippingRateCreateParams as ShippingRateCreateParams, +) +from stripe.params._shipping_rate_list_params import ( + ShippingRateListParams as ShippingRateListParams, +) +from stripe.params._shipping_rate_modify_params import ( + ShippingRateModifyParams as ShippingRateModifyParams, +) +from stripe.params._shipping_rate_retrieve_params import ( + ShippingRateRetrieveParams as ShippingRateRetrieveParams, +) +from stripe.params._shipping_rate_update_params import ( + ShippingRateUpdateParams as ShippingRateUpdateParams, +) +from stripe.params._source_create_params import ( + SourceCreateParams as SourceCreateParams, +) +from stripe.params._source_detach_params import ( + SourceDetachParams as SourceDetachParams, +) +from stripe.params._source_list_source_transactions_params import ( + SourceListSourceTransactionsParams as SourceListSourceTransactionsParams, +) +from stripe.params._source_modify_params import ( + SourceModifyParams as SourceModifyParams, +) +from stripe.params._source_retrieve_params import ( + SourceRetrieveParams as SourceRetrieveParams, +) +from stripe.params._source_transaction_list_params import ( + SourceTransactionListParams as SourceTransactionListParams, +) +from stripe.params._source_update_params import ( + SourceUpdateParams as SourceUpdateParams, +) +from stripe.params._source_verify_params import ( + SourceVerifyParams as SourceVerifyParams, +) +from stripe.params._subscription_attach_cadence_params import ( + SubscriptionAttachCadenceParams as SubscriptionAttachCadenceParams, +) +from stripe.params._subscription_cancel_params import ( + SubscriptionCancelParams as SubscriptionCancelParams, +) +from stripe.params._subscription_create_params import ( + SubscriptionCreateParams as SubscriptionCreateParams, +) +from stripe.params._subscription_delete_discount_params import ( + SubscriptionDeleteDiscountParams as SubscriptionDeleteDiscountParams, +) +from stripe.params._subscription_item_create_params import ( + SubscriptionItemCreateParams as SubscriptionItemCreateParams, +) +from stripe.params._subscription_item_delete_params import ( + SubscriptionItemDeleteParams as SubscriptionItemDeleteParams, +) +from stripe.params._subscription_item_list_params import ( + SubscriptionItemListParams as SubscriptionItemListParams, +) +from stripe.params._subscription_item_modify_params import ( + SubscriptionItemModifyParams as SubscriptionItemModifyParams, +) +from stripe.params._subscription_item_retrieve_params import ( + SubscriptionItemRetrieveParams as SubscriptionItemRetrieveParams, +) +from stripe.params._subscription_item_update_params import ( + SubscriptionItemUpdateParams as SubscriptionItemUpdateParams, +) +from stripe.params._subscription_list_params import ( + SubscriptionListParams as SubscriptionListParams, +) +from stripe.params._subscription_migrate_params import ( + SubscriptionMigrateParams as SubscriptionMigrateParams, +) +from stripe.params._subscription_modify_params import ( + SubscriptionModifyParams as SubscriptionModifyParams, +) +from stripe.params._subscription_resume_params import ( + SubscriptionResumeParams as SubscriptionResumeParams, +) +from stripe.params._subscription_retrieve_params import ( + SubscriptionRetrieveParams as SubscriptionRetrieveParams, +) +from stripe.params._subscription_schedule_amend_params import ( + SubscriptionScheduleAmendParams as SubscriptionScheduleAmendParams, +) +from stripe.params._subscription_schedule_cancel_params import ( + SubscriptionScheduleCancelParams as SubscriptionScheduleCancelParams, +) +from stripe.params._subscription_schedule_create_params import ( + SubscriptionScheduleCreateParams as SubscriptionScheduleCreateParams, +) +from stripe.params._subscription_schedule_list_params import ( + SubscriptionScheduleListParams as SubscriptionScheduleListParams, +) +from stripe.params._subscription_schedule_modify_params import ( + SubscriptionScheduleModifyParams as SubscriptionScheduleModifyParams, +) +from stripe.params._subscription_schedule_release_params import ( + SubscriptionScheduleReleaseParams as SubscriptionScheduleReleaseParams, +) +from stripe.params._subscription_schedule_retrieve_params import ( + SubscriptionScheduleRetrieveParams as SubscriptionScheduleRetrieveParams, +) +from stripe.params._subscription_schedule_update_params import ( + SubscriptionScheduleUpdateParams as SubscriptionScheduleUpdateParams, +) +from stripe.params._subscription_search_params import ( + SubscriptionSearchParams as SubscriptionSearchParams, +) +from stripe.params._subscription_update_params import ( + SubscriptionUpdateParams as SubscriptionUpdateParams, +) +from stripe.params._tax_code_list_params import ( + TaxCodeListParams as TaxCodeListParams, +) +from stripe.params._tax_code_retrieve_params import ( + TaxCodeRetrieveParams as TaxCodeRetrieveParams, +) +from stripe.params._tax_id_create_params import ( + TaxIdCreateParams as TaxIdCreateParams, +) +from stripe.params._tax_id_delete_params import ( + TaxIdDeleteParams as TaxIdDeleteParams, +) +from stripe.params._tax_id_list_params import ( + TaxIdListParams as TaxIdListParams, +) +from stripe.params._tax_id_retrieve_params import ( + TaxIdRetrieveParams as TaxIdRetrieveParams, +) +from stripe.params._tax_rate_create_params import ( + TaxRateCreateParams as TaxRateCreateParams, +) +from stripe.params._tax_rate_list_params import ( + TaxRateListParams as TaxRateListParams, +) +from stripe.params._tax_rate_modify_params import ( + TaxRateModifyParams as TaxRateModifyParams, +) +from stripe.params._tax_rate_retrieve_params import ( + TaxRateRetrieveParams as TaxRateRetrieveParams, +) +from stripe.params._tax_rate_update_params import ( + TaxRateUpdateParams as TaxRateUpdateParams, +) +from stripe.params._token_create_params import ( + TokenCreateParams as TokenCreateParams, +) +from stripe.params._token_retrieve_params import ( + TokenRetrieveParams as TokenRetrieveParams, +) +from stripe.params._topup_cancel_params import ( + TopupCancelParams as TopupCancelParams, +) +from stripe.params._topup_create_params import ( + TopupCreateParams as TopupCreateParams, +) +from stripe.params._topup_list_params import TopupListParams as TopupListParams +from stripe.params._topup_modify_params import ( + TopupModifyParams as TopupModifyParams, +) +from stripe.params._topup_retrieve_params import ( + TopupRetrieveParams as TopupRetrieveParams, +) +from stripe.params._topup_update_params import ( + TopupUpdateParams as TopupUpdateParams, +) +from stripe.params._transfer_create_params import ( + TransferCreateParams as TransferCreateParams, +) +from stripe.params._transfer_create_reversal_params import ( + TransferCreateReversalParams as TransferCreateReversalParams, +) +from stripe.params._transfer_list_params import ( + TransferListParams as TransferListParams, +) +from stripe.params._transfer_list_reversals_params import ( + TransferListReversalsParams as TransferListReversalsParams, +) +from stripe.params._transfer_modify_params import ( + TransferModifyParams as TransferModifyParams, +) +from stripe.params._transfer_modify_reversal_params import ( + TransferModifyReversalParams as TransferModifyReversalParams, +) +from stripe.params._transfer_retrieve_params import ( + TransferRetrieveParams as TransferRetrieveParams, +) +from stripe.params._transfer_retrieve_reversal_params import ( + TransferRetrieveReversalParams as TransferRetrieveReversalParams, +) +from stripe.params._transfer_reversal_create_params import ( + TransferReversalCreateParams as TransferReversalCreateParams, +) +from stripe.params._transfer_reversal_list_params import ( + TransferReversalListParams as TransferReversalListParams, +) +from stripe.params._transfer_reversal_retrieve_params import ( + TransferReversalRetrieveParams as TransferReversalRetrieveParams, +) +from stripe.params._transfer_reversal_update_params import ( + TransferReversalUpdateParams as TransferReversalUpdateParams, +) +from stripe.params._transfer_update_params import ( + TransferUpdateParams as TransferUpdateParams, +) +from stripe.params._webhook_endpoint_create_params import ( + WebhookEndpointCreateParams as WebhookEndpointCreateParams, +) +from stripe.params._webhook_endpoint_delete_params import ( + WebhookEndpointDeleteParams as WebhookEndpointDeleteParams, +) +from stripe.params._webhook_endpoint_list_params import ( + WebhookEndpointListParams as WebhookEndpointListParams, +) +from stripe.params._webhook_endpoint_modify_params import ( + WebhookEndpointModifyParams as WebhookEndpointModifyParams, +) +from stripe.params._webhook_endpoint_retrieve_params import ( + WebhookEndpointRetrieveParams as WebhookEndpointRetrieveParams, +) +from stripe.params._webhook_endpoint_update_params import ( + WebhookEndpointUpdateParams as WebhookEndpointUpdateParams, +) diff --git a/stripe/params/_account_capability_list_params.py b/stripe/params/_account_capability_list_params.py new file mode 100644 index 000000000..efeeb3cb1 --- /dev/null +++ b/stripe/params/_account_capability_list_params.py @@ -0,0 +1,11 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import NotRequired, TypedDict + + +class AccountCapabilityListParams(TypedDict): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_account_capability_retrieve_params.py b/stripe/params/_account_capability_retrieve_params.py new file mode 100644 index 000000000..c6ac87f36 --- /dev/null +++ b/stripe/params/_account_capability_retrieve_params.py @@ -0,0 +1,11 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import NotRequired, TypedDict + + +class AccountCapabilityRetrieveParams(TypedDict): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_account_capability_update_params.py b/stripe/params/_account_capability_update_params.py new file mode 100644 index 000000000..3c323d676 --- /dev/null +++ b/stripe/params/_account_capability_update_params.py @@ -0,0 +1,17 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import NotRequired, TypedDict + + +class AccountCapabilityUpdateParams(TypedDict): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + requested: NotRequired[bool] + """ + To request a new capability for an account, pass true. There can be a delay before the requested capability becomes active. If the capability has any activation requirements, the response includes them in the `requirements` arrays. + + If a capability isn't permanent, you can remove it from the account by passing false. Some capabilities are permanent after they've been requested. Attempting to remove a permanent capability returns an error. + """ diff --git a/stripe/params/_account_create_external_account_params.py b/stripe/params/_account_create_external_account_params.py new file mode 100644 index 000000000..82ccbfb58 --- /dev/null +++ b/stripe/params/_account_create_external_account_params.py @@ -0,0 +1,83 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List, Union +from typing_extensions import Literal, NotRequired, TypedDict + + +class AccountCreateExternalAccountParams(RequestOptions): + default_for_currency: NotRequired[bool] + """ + When set to true, or if this is the first external account added in this currency, this account becomes the default external account for its currency. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + external_account: Union[ + str, + "AccountCreateExternalAccountParamsCard", + "AccountCreateExternalAccountParamsBankAccount", + "AccountCreateExternalAccountParamsCardToken", + ] + """ + A token, like the ones returned by [Stripe.js](https://stripe.com/docs/js) or a dictionary containing a user's external account details (with the options shown below). Please refer to full [documentation](https://stripe.com/docs/api/external_accounts) instead. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + + +class AccountCreateExternalAccountParamsCard(TypedDict): + object: Literal["card"] + address_city: NotRequired[str] + address_country: NotRequired[str] + address_line1: NotRequired[str] + address_line2: NotRequired[str] + address_state: NotRequired[str] + address_zip: NotRequired[str] + currency: NotRequired[str] + cvc: NotRequired[str] + exp_month: int + exp_year: int + name: NotRequired[str] + number: str + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + """ + + +class AccountCreateExternalAccountParamsBankAccount(TypedDict): + object: Literal["bank_account"] + account_holder_name: NotRequired[str] + """ + The name of the person or business that owns the bank account.This field is required when attaching the bank account to a `Customer` object. + """ + account_holder_type: NotRequired[Literal["company", "individual"]] + """ + The type of entity that holds the account. It can be `company` or `individual`. This field is required when attaching the bank account to a `Customer` object. + """ + account_number: str + """ + The account number for the bank account, in string form. Must be a checking account. + """ + country: str + """ + The country in which the bank account is located. + """ + currency: NotRequired[str] + """ + The currency the bank account is in. This must be a country/currency pairing that [Stripe supports.](docs/payouts) + """ + routing_number: NotRequired[str] + """ + The routing number, sort code, or other country-appropriate institution number for the bank account. For US bank accounts, this is required and should be the ACH routing number, not the wire routing number. If you are providing an IBAN for `account_number`, this field is not required. + """ + + +class AccountCreateExternalAccountParamsCardToken(TypedDict): + object: Literal["card"] + currency: NotRequired[str] + token: str diff --git a/stripe/params/_account_create_login_link_params.py b/stripe/params/_account_create_login_link_params.py new file mode 100644 index 000000000..a9b2f6282 --- /dev/null +++ b/stripe/params/_account_create_login_link_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 AccountCreateLoginLinkParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_account_create_params.py b/stripe/params/_account_create_params.py new file mode 100644 index 000000000..af474503e --- /dev/null +++ b/stripe/params/_account_create_params.py @@ -0,0 +1,2239 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class AccountCreateParams(RequestOptions): + account_token: NotRequired[str] + """ + An [account token](https://stripe.com/docs/api#create_account_token), used to securely provide details to the account. + """ + business_profile: NotRequired["AccountCreateParamsBusinessProfile"] + """ + Business information about the account. + """ + business_type: NotRequired[ + Literal["company", "government_entity", "individual", "non_profit"] + ] + """ + The business type. Once you create an [Account Link](https://docs.stripe.com/api/account_links) or [Account Session](https://docs.stripe.com/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](https://docs.stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. + """ + capabilities: NotRequired["AccountCreateParamsCapabilities"] + """ + Each key of the dictionary represents a capability, and each capability + maps to its settings (for example, whether it has been requested or not). Each + capability is inactive until you have provided its specific + requirements and Stripe has verified them. An account might have some + of its requested capabilities be active and some be inactive. + + Required when [account.controller.stripe_dashboard.type](https://docs.stripe.com/api/accounts/create#create_account-controller-dashboard-type) + is `none`, which includes Custom accounts. + """ + company: NotRequired["AccountCreateParamsCompany"] + """ + Information about the company or business. This field is available for any `business_type`. Once you create an [Account Link](https://docs.stripe.com/api/account_links) or [Account Session](https://docs.stripe.com/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](https://docs.stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. + """ + controller: NotRequired["AccountCreateParamsController"] + """ + A hash of configuration describing the account controller's attributes. + """ + country: NotRequired[str] + """ + The country in which the account holder resides, or in which the business is legally established. This should be an ISO 3166-1 alpha-2 country code. For example, if you are in the United States and the business for which you're creating an account is legally represented in Canada, you would use `CA` as the country for the account being created. Available countries include [Stripe's global markets](https://stripe.com/global) as well as countries where [cross-border payouts](https://stripe.com/docs/connect/cross-border-payouts) are supported. + """ + default_currency: NotRequired[str] + """ + Three-letter ISO currency code representing the default currency for the account. This must be a currency that [Stripe supports in the account's country](https://docs.stripe.com/payouts). + """ + documents: NotRequired["AccountCreateParamsDocuments"] + """ + Documents that may be submitted to satisfy various informational requests. + """ + email: NotRequired[str] + """ + The email address of the account holder. This is only to make the account easier to identify to you. If [controller.requirement_collection](https://docs.stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts, Stripe doesn't email the account without your consent. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + external_account: NotRequired[ + "str|AccountCreateParamsBankAccount|AccountCreateParamsCard|AccountCreateParamsCardToken" + ] + """ + A card or bank account to attach to the account for receiving [payouts](https://docs.stripe.com/connect/bank-debit-card-payouts) (you won't be able to use it for top-ups). You can provide either a token, like the ones returned by [Stripe.js](https://docs.stripe.com/js), or a dictionary, as documented in the `external_account` parameter for [bank account](https://docs.stripe.com/api#account_create_bank_account) creation. + + By default, providing an external account sets it as the new default external account for its currency, and deletes the old default if one exists. To add additional external accounts without replacing the existing default for the currency, use the [bank account](https://docs.stripe.com/api#account_create_bank_account) or [card creation](https://docs.stripe.com/api#account_create_card) APIs. After you create an [Account Link](https://docs.stripe.com/api/account_links) or [Account Session](https://docs.stripe.com/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](https://docs.stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. + """ + groups: NotRequired["AccountCreateParamsGroups"] + """ + A hash of account group type to tokens. These are account groups this account should be added to. + """ + individual: NotRequired["AccountCreateParamsIndividual"] + """ + Information about the person represented by the account. This field is null unless `business_type` is set to `individual`. Once you create an [Account Link](https://docs.stripe.com/api/account_links) or [Account Session](https://docs.stripe.com/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](https://docs.stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + risk_controls: NotRequired["AccountCreateParamsRiskControls"] + """ + A hash to configure risk controls on the account. Please see [this page for more details](https://docs.stripe.com/connect/pausing-payments-or-payouts-on-connected-accounts). + """ + settings: NotRequired["AccountCreateParamsSettings"] + """ + Options for customizing how the account functions within Stripe. + """ + tos_acceptance: NotRequired["AccountCreateParamsTosAcceptance"] + """ + Details on the account's acceptance of the [Stripe Services Agreement](https://docs.stripe.com/connect/updating-accounts#tos-acceptance). This property can only be updated for accounts where [controller.requirement_collection](https://docs.stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. This property defaults to a `full` service agreement when empty. + """ + type: NotRequired[Literal["custom", "express", "standard"]] + """ + The type of Stripe account to create. May be one of `custom`, `express` or `standard`. + """ + + +class AccountCreateParamsBusinessProfile(TypedDict): + annual_revenue: NotRequired[ + "AccountCreateParamsBusinessProfileAnnualRevenue" + ] + """ + The applicant's gross annual revenue for its preceding fiscal year. + """ + estimated_worker_count: NotRequired[int] + """ + An estimated upper bound of employees, contractors, vendors, etc. currently working for the business. + """ + mcc: NotRequired[str] + """ + [The merchant category code for the account](https://docs.stripe.com/connect/setting-mcc). MCCs are used to classify businesses based on the goods or services they provide. + """ + minority_owned_business_designation: NotRequired[ + List[ + Literal[ + "lgbtqi_owned_business", + "minority_owned_business", + "none_of_these_apply", + "prefer_not_to_answer", + "women_owned_business", + ] + ] + ] + """ + Whether the business is a minority-owned, women-owned, and/or LGBTQI+ -owned business. + """ + monthly_estimated_revenue: NotRequired[ + "AccountCreateParamsBusinessProfileMonthlyEstimatedRevenue" + ] + """ + An estimate of the monthly revenue of the business. Only accepted for accounts in Brazil and India. + """ + name: NotRequired[str] + """ + The customer-facing business name. + """ + product_description: NotRequired[str] + """ + Internal-only description of the product sold by, or service provided by, the business. Used by Stripe for risk and underwriting purposes. + """ + support_address: NotRequired[ + "AccountCreateParamsBusinessProfileSupportAddress" + ] + """ + A publicly available mailing address for sending support issues to. + """ + support_email: NotRequired[str] + """ + A publicly available email address for sending support issues to. + """ + support_phone: NotRequired[str] + """ + A publicly available phone number to call with support issues. + """ + support_url: NotRequired["Literal['']|str"] + """ + A publicly available website for handling support issues. + """ + url: NotRequired[str] + """ + The business's publicly available website. + """ + + +class AccountCreateParamsBusinessProfileAnnualRevenue(TypedDict): + amount: int + """ + A non-negative integer representing the amount in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal). + """ + 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). + """ + fiscal_year_end: str + """ + The close-out date of the preceding fiscal year in ISO 8601 format. E.g. 2023-12-31 for the 31st of December, 2023. + """ + + +class AccountCreateParamsBusinessProfileMonthlyEstimatedRevenue(TypedDict): + amount: int + """ + A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal). + """ + 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). + """ + + +class AccountCreateParamsBusinessProfileSupportAddress(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. + """ + + +class AccountCreateParamsCapabilities(TypedDict): + acss_debit_payments: NotRequired[ + "AccountCreateParamsCapabilitiesAcssDebitPayments" + ] + """ + The acss_debit_payments capability. + """ + affirm_payments: NotRequired[ + "AccountCreateParamsCapabilitiesAffirmPayments" + ] + """ + The affirm_payments capability. + """ + afterpay_clearpay_payments: NotRequired[ + "AccountCreateParamsCapabilitiesAfterpayClearpayPayments" + ] + """ + The afterpay_clearpay_payments capability. + """ + alma_payments: NotRequired["AccountCreateParamsCapabilitiesAlmaPayments"] + """ + The alma_payments capability. + """ + amazon_pay_payments: NotRequired[ + "AccountCreateParamsCapabilitiesAmazonPayPayments" + ] + """ + The amazon_pay_payments capability. + """ + au_becs_debit_payments: NotRequired[ + "AccountCreateParamsCapabilitiesAuBecsDebitPayments" + ] + """ + The au_becs_debit_payments capability. + """ + automatic_indirect_tax: NotRequired[ + "AccountCreateParamsCapabilitiesAutomaticIndirectTax" + ] + """ + The automatic_indirect_tax capability. + """ + bacs_debit_payments: NotRequired[ + "AccountCreateParamsCapabilitiesBacsDebitPayments" + ] + """ + The bacs_debit_payments capability. + """ + bancontact_payments: NotRequired[ + "AccountCreateParamsCapabilitiesBancontactPayments" + ] + """ + The bancontact_payments capability. + """ + bank_transfer_payments: NotRequired[ + "AccountCreateParamsCapabilitiesBankTransferPayments" + ] + """ + The bank_transfer_payments capability. + """ + billie_payments: NotRequired[ + "AccountCreateParamsCapabilitiesBilliePayments" + ] + """ + The billie_payments capability. + """ + blik_payments: NotRequired["AccountCreateParamsCapabilitiesBlikPayments"] + """ + The blik_payments capability. + """ + boleto_payments: NotRequired[ + "AccountCreateParamsCapabilitiesBoletoPayments" + ] + """ + The boleto_payments capability. + """ + card_issuing: NotRequired["AccountCreateParamsCapabilitiesCardIssuing"] + """ + The card_issuing capability. + """ + card_payments: NotRequired["AccountCreateParamsCapabilitiesCardPayments"] + """ + The card_payments capability. + """ + cartes_bancaires_payments: NotRequired[ + "AccountCreateParamsCapabilitiesCartesBancairesPayments" + ] + """ + The cartes_bancaires_payments capability. + """ + cashapp_payments: NotRequired[ + "AccountCreateParamsCapabilitiesCashappPayments" + ] + """ + The cashapp_payments capability. + """ + crypto_payments: NotRequired[ + "AccountCreateParamsCapabilitiesCryptoPayments" + ] + """ + The crypto_payments capability. + """ + eps_payments: NotRequired["AccountCreateParamsCapabilitiesEpsPayments"] + """ + The eps_payments capability. + """ + fpx_payments: NotRequired["AccountCreateParamsCapabilitiesFpxPayments"] + """ + The fpx_payments capability. + """ + gb_bank_transfer_payments: NotRequired[ + "AccountCreateParamsCapabilitiesGbBankTransferPayments" + ] + """ + The gb_bank_transfer_payments capability. + """ + giropay_payments: NotRequired[ + "AccountCreateParamsCapabilitiesGiropayPayments" + ] + """ + The giropay_payments capability. + """ + gopay_payments: NotRequired["AccountCreateParamsCapabilitiesGopayPayments"] + """ + The gopay_payments capability. + """ + grabpay_payments: NotRequired[ + "AccountCreateParamsCapabilitiesGrabpayPayments" + ] + """ + The grabpay_payments capability. + """ + id_bank_transfer_payments: NotRequired[ + "AccountCreateParamsCapabilitiesIdBankTransferPayments" + ] + """ + The id_bank_transfer_payments capability. + """ + id_bank_transfer_payments_bca: NotRequired[ + "AccountCreateParamsCapabilitiesIdBankTransferPaymentsBca" + ] + """ + The id_bank_transfer_payments_bca capability. + """ + ideal_payments: NotRequired["AccountCreateParamsCapabilitiesIdealPayments"] + """ + The ideal_payments capability. + """ + india_international_payments: NotRequired[ + "AccountCreateParamsCapabilitiesIndiaInternationalPayments" + ] + """ + The india_international_payments capability. + """ + jcb_payments: NotRequired["AccountCreateParamsCapabilitiesJcbPayments"] + """ + The jcb_payments capability. + """ + jp_bank_transfer_payments: NotRequired[ + "AccountCreateParamsCapabilitiesJpBankTransferPayments" + ] + """ + The jp_bank_transfer_payments capability. + """ + kakao_pay_payments: NotRequired[ + "AccountCreateParamsCapabilitiesKakaoPayPayments" + ] + """ + The kakao_pay_payments capability. + """ + klarna_payments: NotRequired[ + "AccountCreateParamsCapabilitiesKlarnaPayments" + ] + """ + The klarna_payments capability. + """ + konbini_payments: NotRequired[ + "AccountCreateParamsCapabilitiesKonbiniPayments" + ] + """ + The konbini_payments capability. + """ + kr_card_payments: NotRequired[ + "AccountCreateParamsCapabilitiesKrCardPayments" + ] + """ + The kr_card_payments capability. + """ + legacy_payments: NotRequired[ + "AccountCreateParamsCapabilitiesLegacyPayments" + ] + """ + The legacy_payments capability. + """ + link_payments: NotRequired["AccountCreateParamsCapabilitiesLinkPayments"] + """ + The link_payments capability. + """ + mb_way_payments: NotRequired[ + "AccountCreateParamsCapabilitiesMbWayPayments" + ] + """ + The mb_way_payments capability. + """ + mobilepay_payments: NotRequired[ + "AccountCreateParamsCapabilitiesMobilepayPayments" + ] + """ + The mobilepay_payments capability. + """ + multibanco_payments: NotRequired[ + "AccountCreateParamsCapabilitiesMultibancoPayments" + ] + """ + The multibanco_payments capability. + """ + mx_bank_transfer_payments: NotRequired[ + "AccountCreateParamsCapabilitiesMxBankTransferPayments" + ] + """ + The mx_bank_transfer_payments capability. + """ + naver_pay_payments: NotRequired[ + "AccountCreateParamsCapabilitiesNaverPayPayments" + ] + """ + The naver_pay_payments capability. + """ + nz_bank_account_becs_debit_payments: NotRequired[ + "AccountCreateParamsCapabilitiesNzBankAccountBecsDebitPayments" + ] + """ + The nz_bank_account_becs_debit_payments capability. + """ + oxxo_payments: NotRequired["AccountCreateParamsCapabilitiesOxxoPayments"] + """ + The oxxo_payments capability. + """ + p24_payments: NotRequired["AccountCreateParamsCapabilitiesP24Payments"] + """ + The p24_payments capability. + """ + pay_by_bank_payments: NotRequired[ + "AccountCreateParamsCapabilitiesPayByBankPayments" + ] + """ + The pay_by_bank_payments capability. + """ + payco_payments: NotRequired["AccountCreateParamsCapabilitiesPaycoPayments"] + """ + The payco_payments capability. + """ + paynow_payments: NotRequired[ + "AccountCreateParamsCapabilitiesPaynowPayments" + ] + """ + The paynow_payments capability. + """ + paypal_payments: NotRequired[ + "AccountCreateParamsCapabilitiesPaypalPayments" + ] + """ + The paypal_payments capability. + """ + paypay_payments: NotRequired[ + "AccountCreateParamsCapabilitiesPaypayPayments" + ] + """ + The paypay_payments capability. + """ + payto_payments: NotRequired["AccountCreateParamsCapabilitiesPaytoPayments"] + """ + The payto_payments capability. + """ + pix_payments: NotRequired["AccountCreateParamsCapabilitiesPixPayments"] + """ + The pix_payments capability. + """ + promptpay_payments: NotRequired[ + "AccountCreateParamsCapabilitiesPromptpayPayments" + ] + """ + The promptpay_payments capability. + """ + qris_payments: NotRequired["AccountCreateParamsCapabilitiesQrisPayments"] + """ + The qris_payments capability. + """ + rechnung_payments: NotRequired[ + "AccountCreateParamsCapabilitiesRechnungPayments" + ] + """ + The rechnung_payments capability. + """ + revolut_pay_payments: NotRequired[ + "AccountCreateParamsCapabilitiesRevolutPayPayments" + ] + """ + The revolut_pay_payments capability. + """ + samsung_pay_payments: NotRequired[ + "AccountCreateParamsCapabilitiesSamsungPayPayments" + ] + """ + The samsung_pay_payments capability. + """ + satispay_payments: NotRequired[ + "AccountCreateParamsCapabilitiesSatispayPayments" + ] + """ + The satispay_payments capability. + """ + sepa_bank_transfer_payments: NotRequired[ + "AccountCreateParamsCapabilitiesSepaBankTransferPayments" + ] + """ + The sepa_bank_transfer_payments capability. + """ + sepa_debit_payments: NotRequired[ + "AccountCreateParamsCapabilitiesSepaDebitPayments" + ] + """ + The sepa_debit_payments capability. + """ + shopeepay_payments: NotRequired[ + "AccountCreateParamsCapabilitiesShopeepayPayments" + ] + """ + The shopeepay_payments capability. + """ + sofort_payments: NotRequired[ + "AccountCreateParamsCapabilitiesSofortPayments" + ] + """ + The sofort_payments capability. + """ + stripe_balance_payments: NotRequired[ + "AccountCreateParamsCapabilitiesStripeBalancePayments" + ] + """ + The stripe_balance_payments capability. + """ + swish_payments: NotRequired["AccountCreateParamsCapabilitiesSwishPayments"] + """ + The swish_payments capability. + """ + tax_reporting_us_1099_k: NotRequired[ + "AccountCreateParamsCapabilitiesTaxReportingUs1099K" + ] + """ + The tax_reporting_us_1099_k capability. + """ + tax_reporting_us_1099_misc: NotRequired[ + "AccountCreateParamsCapabilitiesTaxReportingUs1099Misc" + ] + """ + The tax_reporting_us_1099_misc capability. + """ + transfers: NotRequired["AccountCreateParamsCapabilitiesTransfers"] + """ + The transfers capability. + """ + treasury: NotRequired["AccountCreateParamsCapabilitiesTreasury"] + """ + The treasury capability. + """ + treasury_evolve: NotRequired[ + "AccountCreateParamsCapabilitiesTreasuryEvolve" + ] + """ + The treasury_evolve capability. + """ + treasury_fifth_third: NotRequired[ + "AccountCreateParamsCapabilitiesTreasuryFifthThird" + ] + """ + The treasury_fifth_third capability. + """ + treasury_goldman_sachs: NotRequired[ + "AccountCreateParamsCapabilitiesTreasuryGoldmanSachs" + ] + """ + The treasury_goldman_sachs capability. + """ + twint_payments: NotRequired["AccountCreateParamsCapabilitiesTwintPayments"] + """ + The twint_payments capability. + """ + us_bank_account_ach_payments: NotRequired[ + "AccountCreateParamsCapabilitiesUsBankAccountAchPayments" + ] + """ + The us_bank_account_ach_payments capability. + """ + us_bank_transfer_payments: NotRequired[ + "AccountCreateParamsCapabilitiesUsBankTransferPayments" + ] + """ + The us_bank_transfer_payments capability. + """ + zip_payments: NotRequired["AccountCreateParamsCapabilitiesZipPayments"] + """ + The zip_payments capability. + """ + + +class AccountCreateParamsCapabilitiesAcssDebitPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountCreateParamsCapabilitiesAffirmPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountCreateParamsCapabilitiesAfterpayClearpayPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountCreateParamsCapabilitiesAlmaPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountCreateParamsCapabilitiesAmazonPayPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountCreateParamsCapabilitiesAuBecsDebitPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountCreateParamsCapabilitiesAutomaticIndirectTax(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountCreateParamsCapabilitiesBacsDebitPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountCreateParamsCapabilitiesBancontactPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountCreateParamsCapabilitiesBankTransferPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountCreateParamsCapabilitiesBilliePayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountCreateParamsCapabilitiesBlikPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountCreateParamsCapabilitiesBoletoPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountCreateParamsCapabilitiesCardIssuing(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountCreateParamsCapabilitiesCardPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountCreateParamsCapabilitiesCartesBancairesPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountCreateParamsCapabilitiesCashappPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountCreateParamsCapabilitiesCryptoPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountCreateParamsCapabilitiesEpsPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountCreateParamsCapabilitiesFpxPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountCreateParamsCapabilitiesGbBankTransferPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountCreateParamsCapabilitiesGiropayPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountCreateParamsCapabilitiesGopayPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountCreateParamsCapabilitiesGrabpayPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountCreateParamsCapabilitiesIdBankTransferPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountCreateParamsCapabilitiesIdBankTransferPaymentsBca(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountCreateParamsCapabilitiesIdealPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountCreateParamsCapabilitiesIndiaInternationalPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountCreateParamsCapabilitiesJcbPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountCreateParamsCapabilitiesJpBankTransferPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountCreateParamsCapabilitiesKakaoPayPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountCreateParamsCapabilitiesKlarnaPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountCreateParamsCapabilitiesKonbiniPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountCreateParamsCapabilitiesKrCardPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountCreateParamsCapabilitiesLegacyPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountCreateParamsCapabilitiesLinkPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountCreateParamsCapabilitiesMbWayPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountCreateParamsCapabilitiesMobilepayPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountCreateParamsCapabilitiesMultibancoPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountCreateParamsCapabilitiesMxBankTransferPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountCreateParamsCapabilitiesNaverPayPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountCreateParamsCapabilitiesNzBankAccountBecsDebitPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountCreateParamsCapabilitiesOxxoPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountCreateParamsCapabilitiesP24Payments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountCreateParamsCapabilitiesPayByBankPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountCreateParamsCapabilitiesPaycoPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountCreateParamsCapabilitiesPaynowPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountCreateParamsCapabilitiesPaypalPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountCreateParamsCapabilitiesPaypayPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountCreateParamsCapabilitiesPaytoPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountCreateParamsCapabilitiesPixPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountCreateParamsCapabilitiesPromptpayPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountCreateParamsCapabilitiesQrisPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountCreateParamsCapabilitiesRechnungPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountCreateParamsCapabilitiesRevolutPayPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountCreateParamsCapabilitiesSamsungPayPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountCreateParamsCapabilitiesSatispayPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountCreateParamsCapabilitiesSepaBankTransferPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountCreateParamsCapabilitiesSepaDebitPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountCreateParamsCapabilitiesShopeepayPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountCreateParamsCapabilitiesSofortPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountCreateParamsCapabilitiesStripeBalancePayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountCreateParamsCapabilitiesSwishPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountCreateParamsCapabilitiesTaxReportingUs1099K(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountCreateParamsCapabilitiesTaxReportingUs1099Misc(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountCreateParamsCapabilitiesTransfers(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountCreateParamsCapabilitiesTreasury(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountCreateParamsCapabilitiesTreasuryEvolve(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountCreateParamsCapabilitiesTreasuryFifthThird(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountCreateParamsCapabilitiesTreasuryGoldmanSachs(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountCreateParamsCapabilitiesTwintPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountCreateParamsCapabilitiesUsBankAccountAchPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountCreateParamsCapabilitiesUsBankTransferPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountCreateParamsCapabilitiesZipPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountCreateParamsCompany(TypedDict): + address: NotRequired["AccountCreateParamsCompanyAddress"] + """ + The company's primary address. + """ + address_kana: NotRequired["AccountCreateParamsCompanyAddressKana"] + """ + The Kana variation of the company's primary address (Japan only). + """ + address_kanji: NotRequired["AccountCreateParamsCompanyAddressKanji"] + """ + The Kanji variation of the company's primary address (Japan only). + """ + directors_provided: NotRequired[bool] + """ + Whether the company's directors have been provided. Set this Boolean to `true` after creating all the company's directors with [the Persons API](https://docs.stripe.com/api/persons) for accounts with a `relationship.director` requirement. This value is not automatically set to `true` after creating directors, so it needs to be updated to indicate all directors have been provided. + """ + directorship_declaration: NotRequired[ + "AccountCreateParamsCompanyDirectorshipDeclaration" + ] + """ + This hash is used to attest that the directors information provided to Stripe is both current and correct. + """ + executives_provided: NotRequired[bool] + """ + Whether the company's executives have been provided. Set this Boolean to `true` after creating all the company's executives with [the Persons API](https://docs.stripe.com/api/persons) for accounts with a `relationship.executive` requirement. + """ + export_license_id: NotRequired[str] + """ + The export license ID number of the company, also referred as Import Export Code (India only). + """ + export_purpose_code: NotRequired[str] + """ + The purpose code to use for export transactions (India only). + """ + name: NotRequired[str] + """ + The company's legal name. + """ + name_kana: NotRequired[str] + """ + The Kana variation of the company's legal name (Japan only). + """ + name_kanji: NotRequired[str] + """ + The Kanji variation of the company's legal name (Japan only). + """ + owners_provided: NotRequired[bool] + """ + Whether the company's owners have been provided. Set this Boolean to `true` after creating all the company's owners with [the Persons API](https://docs.stripe.com/api/persons) for accounts with a `relationship.owner` requirement. + """ + ownership_declaration: NotRequired[ + "AccountCreateParamsCompanyOwnershipDeclaration" + ] + """ + This hash is used to attest that the beneficial owner information provided to Stripe is both current and correct. + """ + ownership_exemption_reason: NotRequired[ + "Literal['']|Literal['qualified_entity_exceeds_ownership_threshold', 'qualifies_as_financial_institution']" + ] + """ + This value is used to determine if a business is exempt from providing ultimate beneficial owners. See [this support article](https://support.stripe.com/questions/exemption-from-providing-ownership-details) and [changelog](https://docs.stripe.com/changelog/acacia/2025-01-27/ownership-exemption-reason-accounts-api) for more details. + """ + phone: NotRequired[str] + """ + The company's phone number (used for verification). + """ + registration_date: NotRequired[ + "Literal['']|AccountCreateParamsCompanyRegistrationDate" + ] + """ + When the business was incorporated or registered. + """ + registration_number: NotRequired[str] + """ + The identification number given to a company when it is registered or incorporated, if distinct from the identification number used for filing taxes. (Examples are the CIN for companies and LLP IN for partnerships in India, and the Company Registration Number in Hong Kong). + """ + structure: NotRequired[ + "Literal['']|Literal['free_zone_establishment', 'free_zone_llc', 'government_instrumentality', 'governmental_unit', 'incorporated_non_profit', 'incorporated_partnership', 'limited_liability_partnership', 'llc', 'multi_member_llc', 'private_company', 'private_corporation', 'private_partnership', 'public_company', 'public_corporation', 'public_partnership', 'registered_charity', 'single_member_llc', 'sole_establishment', 'sole_proprietorship', 'tax_exempt_government_instrumentality', 'unincorporated_association', 'unincorporated_non_profit', 'unincorporated_partnership']" + ] + """ + The category identifying the legal structure of the company or legal entity. See [Business structure](https://docs.stripe.com/connect/identity-verification#business-structure) for more details. Pass an empty string to unset this value. + """ + tax_id: NotRequired[str] + """ + The business ID number of the company, as appropriate for the company's country. (Examples are an Employer ID Number in the U.S., a Business Number in Canada, or a Company Number in the UK.) + """ + tax_id_registrar: NotRequired[str] + """ + The jurisdiction in which the `tax_id` is registered (Germany-based companies only). + """ + vat_id: NotRequired[str] + """ + The VAT number of the company. + """ + verification: NotRequired["AccountCreateParamsCompanyVerification"] + """ + Information on the verification state of the company. + """ + + +class AccountCreateParamsCompanyAddress(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. + """ + + +class AccountCreateParamsCompanyAddressKana(TypedDict): + city: NotRequired[str] + """ + City or ward. + """ + 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] + """ + Block or building number. + """ + line2: NotRequired[str] + """ + Building details. + """ + postal_code: NotRequired[str] + """ + Postal code. + """ + state: NotRequired[str] + """ + Prefecture. + """ + town: NotRequired[str] + """ + Town or cho-me. + """ + + +class AccountCreateParamsCompanyAddressKanji(TypedDict): + city: NotRequired[str] + """ + City or ward. + """ + 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] + """ + Block or building number. + """ + line2: NotRequired[str] + """ + Building details. + """ + postal_code: NotRequired[str] + """ + Postal code. + """ + state: NotRequired[str] + """ + Prefecture. + """ + town: NotRequired[str] + """ + Town or cho-me. + """ + + +class AccountCreateParamsCompanyDirectorshipDeclaration(TypedDict): + date: NotRequired[int] + """ + The Unix timestamp marking when the directorship declaration attestation was made. + """ + ip: NotRequired[str] + """ + The IP address from which the directorship declaration attestation was made. + """ + user_agent: NotRequired[str] + """ + The user agent of the browser from which the directorship declaration attestation was made. + """ + + +class AccountCreateParamsCompanyOwnershipDeclaration(TypedDict): + date: NotRequired[int] + """ + The Unix timestamp marking when the beneficial owner attestation was made. + """ + ip: NotRequired[str] + """ + The IP address from which the beneficial owner attestation was made. + """ + user_agent: NotRequired[str] + """ + The user agent of the browser from which the beneficial owner attestation was made. + """ + + +class AccountCreateParamsCompanyRegistrationDate(TypedDict): + day: int + """ + The day of registration, between 1 and 31. + """ + month: int + """ + The month of registration, between 1 and 12. + """ + year: int + """ + The four-digit year of registration. + """ + + +class AccountCreateParamsCompanyVerification(TypedDict): + document: NotRequired["AccountCreateParamsCompanyVerificationDocument"] + """ + A document verifying the business. + """ + + +class AccountCreateParamsCompanyVerificationDocument(TypedDict): + back: NotRequired[str] + """ + The back of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + """ + front: NotRequired[str] + """ + The front of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + """ + + +class AccountCreateParamsController(TypedDict): + application: NotRequired["AccountCreateParamsControllerApplication"] + """ + A hash of configuration describing the Connect application that controls the account. + """ + dashboard: NotRequired["AccountCreateParamsControllerDashboard"] + """ + Properties of the account's dashboard. + """ + fees: NotRequired["AccountCreateParamsControllerFees"] + """ + A hash of configuration for who pays Stripe fees for product usage on this account. + """ + losses: NotRequired["AccountCreateParamsControllerLosses"] + """ + A hash of configuration for products that have negative balance liability, and whether Stripe or a Connect application is responsible for them. + """ + requirement_collection: NotRequired[Literal["application", "stripe"]] + """ + A value indicating responsibility for collecting updated information when requirements on the account are due or change. Defaults to `stripe`. + """ + stripe_dashboard: NotRequired[ + "AccountCreateParamsControllerStripeDashboard" + ] + """ + A hash of configuration for Stripe-hosted dashboards. + """ + + +class AccountCreateParamsControllerApplication(TypedDict): + loss_liable: bool + """ + Whether the controller is liable for losses on this account. For details, see [Understanding Connect Account Balances](https://stripe.com/docs/connect/account-balances). + """ + onboarding_owner: NotRequired[bool] + """ + Whether the controller owns onboarding for this account. + """ + pricing_controls: NotRequired[bool] + """ + Whether the controller has pricing controls for this account. + """ + + +class AccountCreateParamsControllerDashboard(TypedDict): + type: NotRequired[Literal["express", "full", "none"]] + """ + Whether this account should have access to the full Stripe Dashboard (`full`), to the Express Dashboard (`express`), or to no Stripe-hosted dashboard (`none`). Defaults to `full`. + """ + + +class AccountCreateParamsControllerFees(TypedDict): + payer: NotRequired[Literal["account", "application"]] + """ + A value indicating the responsible payer of Stripe fees on this account. Defaults to `account`. Learn more about [fee behavior on connected accounts](https://docs.stripe.com/connect/direct-charges-fee-payer-behavior). + """ + + +class AccountCreateParamsControllerLosses(TypedDict): + payments: NotRequired[Literal["application", "stripe"]] + """ + A value indicating who is liable when this account can't pay back negative balances resulting from payments. Defaults to `stripe`. + """ + + +class AccountCreateParamsControllerStripeDashboard(TypedDict): + type: NotRequired[Literal["express", "full", "none"]] + """ + Whether this account should have access to the full Stripe Dashboard (`full`), to the Express Dashboard (`express`), or to no Stripe-hosted dashboard (`none`). Defaults to `full`. + """ + + +class AccountCreateParamsDocuments(TypedDict): + bank_account_ownership_verification: NotRequired[ + "AccountCreateParamsDocumentsBankAccountOwnershipVerification" + ] + """ + One or more documents that support the [Bank account ownership verification](https://support.stripe.com/questions/bank-account-ownership-verification) requirement. Must be a document associated with the account's primary active bank account that displays the last 4 digits of the account number, either a statement or a check. + """ + company_license: NotRequired["AccountCreateParamsDocumentsCompanyLicense"] + """ + One or more documents that demonstrate proof of a company's license to operate. + """ + company_memorandum_of_association: NotRequired[ + "AccountCreateParamsDocumentsCompanyMemorandumOfAssociation" + ] + """ + One or more documents showing the company's Memorandum of Association. + """ + company_ministerial_decree: NotRequired[ + "AccountCreateParamsDocumentsCompanyMinisterialDecree" + ] + """ + (Certain countries only) One or more documents showing the ministerial decree legalizing the company's establishment. + """ + company_registration_verification: NotRequired[ + "AccountCreateParamsDocumentsCompanyRegistrationVerification" + ] + """ + One or more documents that demonstrate proof of a company's registration with the appropriate local authorities. + """ + company_tax_id_verification: NotRequired[ + "AccountCreateParamsDocumentsCompanyTaxIdVerification" + ] + """ + One or more documents that demonstrate proof of a company's tax ID. + """ + proof_of_address: NotRequired["AccountCreateParamsDocumentsProofOfAddress"] + """ + One or more documents that demonstrate proof of address. + """ + proof_of_registration: NotRequired[ + "AccountCreateParamsDocumentsProofOfRegistration" + ] + """ + One or more documents showing the company's proof of registration with the national business registry. + """ + proof_of_ultimate_beneficial_ownership: NotRequired[ + "AccountCreateParamsDocumentsProofOfUltimateBeneficialOwnership" + ] + """ + One or more documents that demonstrate proof of ultimate beneficial ownership. + """ + + +class AccountCreateParamsDocumentsBankAccountOwnershipVerification(TypedDict): + files: NotRequired[List[str]] + """ + One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + """ + + +class AccountCreateParamsDocumentsCompanyLicense(TypedDict): + files: NotRequired[List[str]] + """ + One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + """ + + +class AccountCreateParamsDocumentsCompanyMemorandumOfAssociation(TypedDict): + files: NotRequired[List[str]] + """ + One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + """ + + +class AccountCreateParamsDocumentsCompanyMinisterialDecree(TypedDict): + files: NotRequired[List[str]] + """ + One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + """ + + +class AccountCreateParamsDocumentsCompanyRegistrationVerification(TypedDict): + files: NotRequired[List[str]] + """ + One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + """ + + +class AccountCreateParamsDocumentsCompanyTaxIdVerification(TypedDict): + files: NotRequired[List[str]] + """ + One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + """ + + +class AccountCreateParamsDocumentsProofOfAddress(TypedDict): + files: NotRequired[List[str]] + """ + One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + """ + + +class AccountCreateParamsDocumentsProofOfRegistration(TypedDict): + files: NotRequired[List[str]] + """ + One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + """ + + +class AccountCreateParamsDocumentsProofOfUltimateBeneficialOwnership( + TypedDict +): + files: NotRequired[List[str]] + """ + One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + """ + + +class AccountCreateParamsBankAccount(TypedDict): + object: Literal["bank_account"] + account_holder_name: NotRequired[str] + """ + The name of the person or business that owns the bank account.This field is required when attaching the bank account to a `Customer` object. + """ + account_holder_type: NotRequired[Literal["company", "individual"]] + """ + The type of entity that holds the account. It can be `company` or `individual`. This field is required when attaching the bank account to a `Customer` object. + """ + account_number: str + """ + The account number for the bank account, in string form. Must be a checking account. + """ + country: str + """ + The country in which the bank account is located. + """ + currency: NotRequired[str] + """ + The currency the bank account is in. This must be a country/currency pairing that [Stripe supports.](docs/payouts) + """ + routing_number: NotRequired[str] + """ + The routing number, sort code, or other country-appropriate institution number for the bank account. For US bank accounts, this is required and should be the ACH routing number, not the wire routing number. If you are providing an IBAN for `account_number`, this field is not required. + """ + + +class AccountCreateParamsCard(TypedDict): + object: Literal["card"] + address_city: NotRequired[str] + address_country: NotRequired[str] + address_line1: NotRequired[str] + address_line2: NotRequired[str] + address_state: NotRequired[str] + address_zip: NotRequired[str] + currency: NotRequired[str] + cvc: NotRequired[str] + exp_month: int + exp_year: int + name: NotRequired[str] + number: str + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + """ + default_for_currency: NotRequired[bool] + + +class AccountCreateParamsCardToken(TypedDict): + object: Literal["card"] + currency: NotRequired[str] + token: str + + +class AccountCreateParamsGroups(TypedDict): + payments_pricing: NotRequired["Literal['']|str"] + """ + The group the account is in to determine their payments pricing, and null if the account is on customized pricing. [See the Platform pricing tool documentation](https://stripe.com/docs/connect/platform-pricing-tools) for details. + """ + + +class AccountCreateParamsIndividual(TypedDict): + address: NotRequired["AccountCreateParamsIndividualAddress"] + """ + The individual's primary address. + """ + address_kana: NotRequired["AccountCreateParamsIndividualAddressKana"] + """ + The Kana variation of the individual's primary address (Japan only). + """ + address_kanji: NotRequired["AccountCreateParamsIndividualAddressKanji"] + """ + The Kanji variation of the individual's primary address (Japan only). + """ + dob: NotRequired["Literal['']|AccountCreateParamsIndividualDob"] + """ + The individual's date of birth. + """ + email: NotRequired[str] + """ + The individual's email address. + """ + first_name: NotRequired[str] + """ + The individual's first name. + """ + first_name_kana: NotRequired[str] + """ + The Kana variation of the individual's first name (Japan only). + """ + first_name_kanji: NotRequired[str] + """ + The Kanji variation of the individual's first name (Japan only). + """ + full_name_aliases: NotRequired["Literal['']|List[str]"] + """ + A list of alternate names or aliases that the individual is known by. + """ + gender: NotRequired[str] + """ + The individual's gender + """ + id_number: NotRequired[str] + """ + The government-issued ID number of the individual, as appropriate for the representative's country. (Examples are a Social Security Number in the U.S., or a Social Insurance Number in Canada). Instead of the number itself, you can also provide a [PII token created with Stripe.js](https://docs.stripe.com/js/tokens/create_token?type=pii). + """ + id_number_secondary: NotRequired[str] + """ + The government-issued secondary ID number of the individual, as appropriate for the representative's country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token created with Stripe.js](https://docs.stripe.com/js/tokens/create_token?type=pii). + """ + last_name: NotRequired[str] + """ + The individual's last name. + """ + last_name_kana: NotRequired[str] + """ + The Kana variation of the individual's last name (Japan only). + """ + last_name_kanji: NotRequired[str] + """ + The Kanji variation of the individual's last name (Japan only). + """ + maiden_name: NotRequired[str] + """ + The individual's maiden name. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + phone: NotRequired[str] + """ + The individual's phone number. + """ + political_exposure: NotRequired[Literal["existing", "none"]] + """ + Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. + """ + registered_address: NotRequired[ + "AccountCreateParamsIndividualRegisteredAddress" + ] + """ + The individual's registered address. + """ + relationship: NotRequired["AccountCreateParamsIndividualRelationship"] + """ + Describes the person's relationship to the account. + """ + ssn_last_4: NotRequired[str] + """ + The last four digits of the individual's Social Security Number (U.S. only). + """ + verification: NotRequired["AccountCreateParamsIndividualVerification"] + """ + The individual's verification document information. + """ + + +class AccountCreateParamsIndividualAddress(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. + """ + + +class AccountCreateParamsIndividualAddressKana(TypedDict): + city: NotRequired[str] + """ + City or ward. + """ + 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] + """ + Block or building number. + """ + line2: NotRequired[str] + """ + Building details. + """ + postal_code: NotRequired[str] + """ + Postal code. + """ + state: NotRequired[str] + """ + Prefecture. + """ + town: NotRequired[str] + """ + Town or cho-me. + """ + + +class AccountCreateParamsIndividualAddressKanji(TypedDict): + city: NotRequired[str] + """ + City or ward. + """ + 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] + """ + Block or building number. + """ + line2: NotRequired[str] + """ + Building details. + """ + postal_code: NotRequired[str] + """ + Postal code. + """ + state: NotRequired[str] + """ + Prefecture. + """ + town: NotRequired[str] + """ + Town or cho-me. + """ + + +class AccountCreateParamsIndividualDob(TypedDict): + day: int + """ + The day of birth, between 1 and 31. + """ + month: int + """ + The month of birth, between 1 and 12. + """ + year: int + """ + The four-digit year of birth. + """ + + +class AccountCreateParamsIndividualRegisteredAddress(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. + """ + + +class AccountCreateParamsIndividualRelationship(TypedDict): + director: NotRequired[bool] + """ + Whether the person is a director of the account's legal entity. Directors are typically members of the governing board of the company, or responsible for ensuring the company meets its regulatory obligations. + """ + executive: NotRequired[bool] + """ + Whether the person has significant responsibility to control, manage, or direct the organization. + """ + owner: NotRequired[bool] + """ + Whether the person is an owner of the account's legal entity. + """ + percent_ownership: NotRequired["Literal['']|float"] + """ + The percent owned by the person of the account's legal entity. + """ + title: NotRequired[str] + """ + The person's title (e.g., CEO, Support Engineer). + """ + + +class AccountCreateParamsIndividualVerification(TypedDict): + additional_document: NotRequired[ + "AccountCreateParamsIndividualVerificationAdditionalDocument" + ] + """ + A document showing address, either a passport, local ID card, or utility bill from a well-known utility company. + """ + document: NotRequired["AccountCreateParamsIndividualVerificationDocument"] + """ + An identifying document, either a passport or local ID card. + """ + + +class AccountCreateParamsIndividualVerificationAdditionalDocument(TypedDict): + back: NotRequired[str] + """ + The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + """ + front: NotRequired[str] + """ + The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + """ + + +class AccountCreateParamsIndividualVerificationDocument(TypedDict): + back: NotRequired[str] + """ + The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + """ + front: NotRequired[str] + """ + The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + """ + + +class AccountCreateParamsRiskControls(TypedDict): + charges: NotRequired["AccountCreateParamsRiskControlsCharges"] + """ + Represents the risk control status of charges. Please see [this page for more details](https://stripe.com/docs/connect/pausing-payments-or-payouts-on-connected-accounts). + """ + payouts: NotRequired["AccountCreateParamsRiskControlsPayouts"] + """ + Represents the risk control status of payouts. Please see [this page for more details](https://stripe.com/docs/connect/pausing-payments-or-payouts-on-connected-accounts). + """ + + +class AccountCreateParamsRiskControlsCharges(TypedDict): + pause_requested: NotRequired[bool] + """ + To request to pause a risk control, pass `true`. To request to unpause a risk control, pass `false`. + There can be a delay before the risk control is paused or unpaused. + """ + + +class AccountCreateParamsRiskControlsPayouts(TypedDict): + pause_requested: NotRequired[bool] + """ + To request to pause a risk control, pass `true`. To request to unpause a risk control, pass `false`. + There can be a delay before the risk control is paused or unpaused. + """ + + +class AccountCreateParamsSettings(TypedDict): + bacs_debit_payments: NotRequired[ + "AccountCreateParamsSettingsBacsDebitPayments" + ] + """ + Settings specific to Bacs Direct Debit. + """ + bank_bca_onboarding: NotRequired[ + "AccountCreateParamsSettingsBankBcaOnboarding" + ] + """ + Settings specific to bank BCA onboarding for Indonesia bank transfers payments method. + """ + branding: NotRequired["AccountCreateParamsSettingsBranding"] + """ + Settings used to apply the account's branding to email receipts, invoices, Checkout, and other products. + """ + capital: NotRequired["AccountCreateParamsSettingsCapital"] + """ + Settings specific to the account's use of the Capital product. + """ + card_issuing: NotRequired["AccountCreateParamsSettingsCardIssuing"] + """ + Settings specific to the account's use of the Card Issuing product. + """ + card_payments: NotRequired["AccountCreateParamsSettingsCardPayments"] + """ + Settings specific to card charging on the account. + """ + invoices: NotRequired["AccountCreateParamsSettingsInvoices"] + """ + Settings specific to the account's use of Invoices. + """ + payments: NotRequired["AccountCreateParamsSettingsPayments"] + """ + Settings that apply across payment methods for charging on the account. + """ + payouts: NotRequired["AccountCreateParamsSettingsPayouts"] + """ + Settings specific to the account's payouts. + """ + tax_forms: NotRequired["AccountCreateParamsSettingsTaxForms"] + """ + Settings specific to the account's tax forms. + """ + treasury: NotRequired["AccountCreateParamsSettingsTreasury"] + """ + Settings specific to the account's Treasury FinancialAccounts. + """ + + +class AccountCreateParamsSettingsBacsDebitPayments(TypedDict): + display_name: NotRequired[str] + """ + The Bacs Direct Debit Display Name for this account. For payments made with Bacs Direct Debit, this name appears on the mandate as the statement descriptor. Mobile banking apps display it as the name of the business. To use custom branding, set the Bacs Direct Debit Display Name during or right after creation. Custom branding incurs an additional monthly fee for the platform. If you don't set the display name before requesting Bacs capability, it's automatically set as "Stripe" and the account is onboarded to Stripe branding, which is free. + """ + + +class AccountCreateParamsSettingsBankBcaOnboarding(TypedDict): + account_holder_name: NotRequired[str] + """ + Bank BCA business account holder name + """ + business_account_number: NotRequired[str] + """ + Bank BCA business account number + """ + + +class AccountCreateParamsSettingsBranding(TypedDict): + icon: NotRequired[str] + """ + (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) An icon for the account. Must be square and at least 128px x 128px. + """ + logo: NotRequired[str] + """ + (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) A logo for the account that will be used in Checkout instead of the icon and without the account's name next to it if provided. Must be at least 128px x 128px. + """ + primary_color: NotRequired[str] + """ + A CSS hex color value representing the primary branding color for this account. + """ + secondary_color: NotRequired[str] + """ + A CSS hex color value representing the secondary branding color for this account. + """ + + +class AccountCreateParamsSettingsCapital(TypedDict): + payout_destination: NotRequired[Dict[str, str]] + """ + Per-currency mapping of user-selected destination accounts used to pay out loans. + """ + payout_destination_selector: NotRequired[Dict[str, List[str]]] + """ + Per-currency mapping of all destination accounts eligible to receive Capital financing payouts. + """ + + +class AccountCreateParamsSettingsCardIssuing(TypedDict): + tos_acceptance: NotRequired[ + "AccountCreateParamsSettingsCardIssuingTosAcceptance" + ] + """ + Details on the account's acceptance of the [Stripe Issuing Terms and Disclosures](https://docs.stripe.com/issuing/connect/tos_acceptance). + """ + + +class AccountCreateParamsSettingsCardIssuingTosAcceptance(TypedDict): + date: NotRequired[int] + """ + The Unix timestamp marking when the account representative accepted the service agreement. + """ + ip: NotRequired[str] + """ + The IP address from which the account representative accepted the service agreement. + """ + user_agent: NotRequired["Literal['']|str"] + """ + The user agent of the browser from which the account representative accepted the service agreement. + """ + + +class AccountCreateParamsSettingsCardPayments(TypedDict): + decline_on: NotRequired["AccountCreateParamsSettingsCardPaymentsDeclineOn"] + """ + Automatically declines certain charge types regardless of whether the card issuer accepted or declined the charge. + """ + statement_descriptor_prefix: NotRequired[str] + """ + The default text that appears on credit card statements when a charge is made. This field prefixes any dynamic `statement_descriptor` specified on the charge. `statement_descriptor_prefix` is useful for maximizing descriptor space for the dynamic portion. + """ + statement_descriptor_prefix_kana: NotRequired["Literal['']|str"] + """ + The Kana variation of the default text that appears on credit card statements when a charge is made (Japan only). This field prefixes any dynamic `statement_descriptor_suffix_kana` specified on the charge. `statement_descriptor_prefix_kana` is useful for maximizing descriptor space for the dynamic portion. + """ + statement_descriptor_prefix_kanji: NotRequired["Literal['']|str"] + """ + The Kanji variation of the default text that appears on credit card statements when a charge is made (Japan only). This field prefixes any dynamic `statement_descriptor_suffix_kanji` specified on the charge. `statement_descriptor_prefix_kanji` is useful for maximizing descriptor space for the dynamic portion. + """ + + +class AccountCreateParamsSettingsCardPaymentsDeclineOn(TypedDict): + avs_failure: NotRequired[bool] + """ + Whether Stripe automatically declines charges with an incorrect ZIP or postal code. This setting only applies when a ZIP or postal code is provided and they fail bank verification. + """ + cvc_failure: NotRequired[bool] + """ + Whether Stripe automatically declines charges with an incorrect CVC. This setting only applies when a CVC is provided and it fails bank verification. + """ + + +class AccountCreateParamsSettingsInvoices(TypedDict): + hosted_payment_method_save: NotRequired[ + Literal["always", "never", "offer"] + ] + """ + Whether payment methods should be saved when a payment is completed for a one-time invoices on a hosted invoice page. + """ + + +class AccountCreateParamsSettingsPayments(TypedDict): + statement_descriptor: NotRequired[str] + """ + The default text that appears on statements for non-card charges outside of Japan. For card charges, if you don't set a `statement_descriptor_prefix`, this text is also used as the statement descriptor prefix. In that case, if concatenating the statement descriptor suffix causes the combined statement descriptor to exceed 22 characters, we truncate the `statement_descriptor` text to limit the full descriptor to 22 characters. For more information about statement descriptors and their requirements, see the [account settings documentation](https://docs.stripe.com/get-started/account/statement-descriptors). + """ + statement_descriptor_kana: NotRequired[str] + """ + The Kana variation of `statement_descriptor` used for charges in Japan. Japanese statement descriptors have [special requirements](https://docs.stripe.com/get-started/account/statement-descriptors#set-japanese-statement-descriptors). + """ + statement_descriptor_kanji: NotRequired[str] + """ + The Kanji variation of `statement_descriptor` used for charges in Japan. Japanese statement descriptors have [special requirements](https://docs.stripe.com/get-started/account/statement-descriptors#set-japanese-statement-descriptors). + """ + + +class AccountCreateParamsSettingsPayouts(TypedDict): + debit_negative_balances: NotRequired[bool] + """ + A Boolean indicating whether Stripe should try to reclaim negative balances from an attached bank account. For details, see [Understanding Connect Account Balances](https://docs.stripe.com/connect/account-balances). + """ + schedule: NotRequired["AccountCreateParamsSettingsPayoutsSchedule"] + """ + Details on when funds from charges are available, and when they are paid out to an external account. For details, see our [Setting Bank and Debit Card Payouts](https://docs.stripe.com/connect/bank-transfers#payout-information) documentation. + """ + statement_descriptor: NotRequired[str] + """ + The text that appears on the bank account statement for payouts. If not set, this defaults to the platform's bank descriptor as set in the Dashboard. + """ + + +class AccountCreateParamsSettingsPayoutsSchedule(TypedDict): + delay_days: NotRequired["Literal['minimum']|int"] + """ + The number of days charge funds are held before being paid out. May also be set to `minimum`, representing the lowest available value for the account country. Default is `minimum`. The `delay_days` parameter remains at the last configured value if `interval` is `manual`. [Learn more about controlling payout delay days](https://docs.stripe.com/connect/manage-payout-schedule). + """ + interval: NotRequired[Literal["daily", "manual", "monthly", "weekly"]] + """ + How frequently available funds are paid out. One of: `daily`, `manual`, `weekly`, or `monthly`. Default is `daily`. + """ + monthly_anchor: NotRequired[int] + """ + The day of the month when available funds are paid out, specified as a number between 1--31. Payouts nominally scheduled between the 29th and 31st of the month are instead sent on the last day of a shorter month. Required and applicable only if `interval` is `monthly`. + """ + monthly_payout_days: NotRequired[List[int]] + """ + The days of the month when available funds are paid out, specified as an array of numbers between 1--31. Payouts nominally scheduled between the 29th and 31st of the month are instead sent on the last day of a shorter month. Required and applicable only if `interval` is `monthly` and `monthly_anchor` is not set. + """ + weekly_anchor: NotRequired[ + Literal[ + "friday", + "monday", + "saturday", + "sunday", + "thursday", + "tuesday", + "wednesday", + ] + ] + """ + The day of the week when available funds are paid out, specified as `monday`, `tuesday`, etc. Required and applicable only if `interval` is `weekly`. + """ + weekly_payout_days: NotRequired[ + List[Literal["friday", "monday", "thursday", "tuesday", "wednesday"]] + ] + """ + The days of the week when available funds are paid out, specified as an array, e.g., [`monday`, `tuesday`]. Required and applicable only if `interval` is `weekly`. + """ + + +class AccountCreateParamsSettingsTaxForms(TypedDict): + consented_to_paperless_delivery: NotRequired[bool] + """ + Whether the account opted out of receiving their tax forms by postal delivery. + """ + + +class AccountCreateParamsSettingsTreasury(TypedDict): + tos_acceptance: NotRequired[ + "AccountCreateParamsSettingsTreasuryTosAcceptance" + ] + """ + Details on the account's acceptance of the Stripe Treasury Services Agreement. + """ + + +class AccountCreateParamsSettingsTreasuryTosAcceptance(TypedDict): + date: NotRequired[int] + """ + The Unix timestamp marking when the account representative accepted the service agreement. + """ + ip: NotRequired[str] + """ + The IP address from which the account representative accepted the service agreement. + """ + user_agent: NotRequired["Literal['']|str"] + """ + The user agent of the browser from which the account representative accepted the service agreement. + """ + + +class AccountCreateParamsTosAcceptance(TypedDict): + date: NotRequired[int] + """ + The Unix timestamp marking when the account representative accepted their service agreement. + """ + ip: NotRequired[str] + """ + The IP address from which the account representative accepted their service agreement. + """ + service_agreement: NotRequired[str] + """ + The user's service agreement type. + """ + user_agent: NotRequired[str] + """ + The user agent of the browser from which the account representative accepted their service agreement. + """ diff --git a/stripe/params/_account_create_person_params.py b/stripe/params/_account_create_person_params.py new file mode 100644 index 000000000..d52502b95 --- /dev/null +++ b/stripe/params/_account_create_person_params.py @@ -0,0 +1,471 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class AccountCreatePersonParams(RequestOptions): + additional_tos_acceptances: NotRequired[ + "AccountCreatePersonParamsAdditionalTosAcceptances" + ] + """ + Details on the legal guardian's or authorizer's acceptance of the required Stripe agreements. + """ + address: NotRequired["AccountCreatePersonParamsAddress"] + """ + The person's address. + """ + address_kana: NotRequired["AccountCreatePersonParamsAddressKana"] + """ + The Kana variation of the person's address (Japan only). + """ + address_kanji: NotRequired["AccountCreatePersonParamsAddressKanji"] + """ + The Kanji variation of the person's address (Japan only). + """ + dob: NotRequired["Literal['']|AccountCreatePersonParamsDob"] + """ + The person's date of birth. + """ + documents: NotRequired["AccountCreatePersonParamsDocuments"] + """ + Documents that may be submitted to satisfy various informational requests. + """ + email: NotRequired[str] + """ + The person's email address. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + first_name: NotRequired[str] + """ + The person's first name. + """ + first_name_kana: NotRequired[str] + """ + The Kana variation of the person's first name (Japan only). + """ + first_name_kanji: NotRequired[str] + """ + The Kanji variation of the person's first name (Japan only). + """ + full_name_aliases: NotRequired["Literal['']|List[str]"] + """ + A list of alternate names or aliases that the person is known by. + """ + gender: NotRequired[str] + """ + The person's gender (International regulations require either "male" or "female"). + """ + id_number: NotRequired[str] + """ + The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://docs.stripe.com/js/tokens/create_token?type=pii). + """ + id_number_secondary: NotRequired[str] + """ + The person's secondary ID number, as appropriate for their country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://docs.stripe.com/js/tokens/create_token?type=pii). + """ + last_name: NotRequired[str] + """ + The person's last name. + """ + last_name_kana: NotRequired[str] + """ + The Kana variation of the person's last name (Japan only). + """ + last_name_kanji: NotRequired[str] + """ + The Kanji variation of the person's last name (Japan only). + """ + maiden_name: NotRequired[str] + """ + The person's maiden name. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + nationality: NotRequired[str] + """ + The country where the person is a national. Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)), or "XX" if unavailable. + """ + person_token: NotRequired[str] + """ + A [person token](https://docs.stripe.com/connect/account-tokens), used to securely provide details to the person. + """ + phone: NotRequired[str] + """ + The person's phone number. + """ + political_exposure: NotRequired[Literal["existing", "none"]] + """ + Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. + """ + registered_address: NotRequired[ + "AccountCreatePersonParamsRegisteredAddress" + ] + """ + The person's registered address. + """ + relationship: NotRequired["AccountCreatePersonParamsRelationship"] + """ + The relationship that this person has with the account's legal entity. + """ + ssn_last_4: NotRequired[str] + """ + The last four digits of the person's Social Security number (U.S. only). + """ + us_cfpb_data: NotRequired["AccountCreatePersonParamsUsCfpbData"] + """ + Demographic data related to the person. + """ + verification: NotRequired["AccountCreatePersonParamsVerification"] + """ + The person's verification status. + """ + + +class AccountCreatePersonParamsAdditionalTosAcceptances(TypedDict): + account: NotRequired[ + "AccountCreatePersonParamsAdditionalTosAcceptancesAccount" + ] + """ + Details on the legal guardian's acceptance of the main Stripe service agreement. + """ + + +class AccountCreatePersonParamsAdditionalTosAcceptancesAccount(TypedDict): + date: NotRequired[int] + """ + The Unix timestamp marking when the account representative accepted the service agreement. + """ + ip: NotRequired[str] + """ + The IP address from which the account representative accepted the service agreement. + """ + user_agent: NotRequired["Literal['']|str"] + """ + The user agent of the browser from which the account representative accepted the service agreement. + """ + + +class AccountCreatePersonParamsAddress(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. + """ + + +class AccountCreatePersonParamsAddressKana(TypedDict): + city: NotRequired[str] + """ + City or ward. + """ + 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] + """ + Block or building number. + """ + line2: NotRequired[str] + """ + Building details. + """ + postal_code: NotRequired[str] + """ + Postal code. + """ + state: NotRequired[str] + """ + Prefecture. + """ + town: NotRequired[str] + """ + Town or cho-me. + """ + + +class AccountCreatePersonParamsAddressKanji(TypedDict): + city: NotRequired[str] + """ + City or ward. + """ + 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] + """ + Block or building number. + """ + line2: NotRequired[str] + """ + Building details. + """ + postal_code: NotRequired[str] + """ + Postal code. + """ + state: NotRequired[str] + """ + Prefecture. + """ + town: NotRequired[str] + """ + Town or cho-me. + """ + + +class AccountCreatePersonParamsDob(TypedDict): + day: int + """ + The day of birth, between 1 and 31. + """ + month: int + """ + The month of birth, between 1 and 12. + """ + year: int + """ + The four-digit year of birth. + """ + + +class AccountCreatePersonParamsDocuments(TypedDict): + company_authorization: NotRequired[ + "AccountCreatePersonParamsDocumentsCompanyAuthorization" + ] + """ + One or more documents that demonstrate proof that this person is authorized to represent the company. + """ + passport: NotRequired["AccountCreatePersonParamsDocumentsPassport"] + """ + One or more documents showing the person's passport page with photo and personal data. + """ + visa: NotRequired["AccountCreatePersonParamsDocumentsVisa"] + """ + One or more documents showing the person's visa required for living in the country where they are residing. + """ + + +class AccountCreatePersonParamsDocumentsCompanyAuthorization(TypedDict): + files: NotRequired[List[str]] + """ + One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + """ + + +class AccountCreatePersonParamsDocumentsPassport(TypedDict): + files: NotRequired[List[str]] + """ + One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + """ + + +class AccountCreatePersonParamsDocumentsVisa(TypedDict): + files: NotRequired[List[str]] + """ + One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + """ + + +class AccountCreatePersonParamsRegisteredAddress(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. + """ + + +class AccountCreatePersonParamsRelationship(TypedDict): + authorizer: NotRequired[bool] + """ + Whether the person is the authorizer of the account's representative. + """ + director: NotRequired[bool] + """ + Whether the person is a director of the account's legal entity. Directors are typically members of the governing board of the company, or responsible for ensuring the company meets its regulatory obligations. + """ + executive: NotRequired[bool] + """ + Whether the person has significant responsibility to control, manage, or direct the organization. + """ + legal_guardian: NotRequired[bool] + """ + Whether the person is the legal guardian of the account's representative. + """ + owner: NotRequired[bool] + """ + Whether the person is an owner of the account's legal entity. + """ + percent_ownership: NotRequired["Literal['']|float"] + """ + The percent owned by the person of the account's legal entity. + """ + representative: NotRequired[bool] + """ + Whether the person is authorized as the primary representative of the account. This is the person nominated by the business to provide information about themselves, and general information about the account. There can only be one representative at any given time. At the time the account is created, this person should be set to the person responsible for opening the account. + """ + title: NotRequired[str] + """ + The person's title (e.g., CEO, Support Engineer). + """ + + +class AccountCreatePersonParamsUsCfpbData(TypedDict): + ethnicity_details: NotRequired[ + "AccountCreatePersonParamsUsCfpbDataEthnicityDetails" + ] + """ + The persons ethnicity details + """ + race_details: NotRequired["AccountCreatePersonParamsUsCfpbDataRaceDetails"] + """ + The persons race details + """ + self_identified_gender: NotRequired[str] + """ + The persons self-identified gender + """ + + +class AccountCreatePersonParamsUsCfpbDataEthnicityDetails(TypedDict): + ethnicity: NotRequired[ + List[ + Literal[ + "cuban", + "hispanic_or_latino", + "mexican", + "not_hispanic_or_latino", + "other_hispanic_or_latino", + "prefer_not_to_answer", + "puerto_rican", + ] + ] + ] + """ + The persons ethnicity + """ + ethnicity_other: NotRequired[str] + """ + Please specify your origin, when other is selected. + """ + + +class AccountCreatePersonParamsUsCfpbDataRaceDetails(TypedDict): + race: NotRequired[ + List[ + Literal[ + "african_american", + "american_indian_or_alaska_native", + "asian", + "asian_indian", + "black_or_african_american", + "chinese", + "ethiopian", + "filipino", + "guamanian_or_chamorro", + "haitian", + "jamaican", + "japanese", + "korean", + "native_hawaiian", + "native_hawaiian_or_other_pacific_islander", + "nigerian", + "other_asian", + "other_black_or_african_american", + "other_pacific_islander", + "prefer_not_to_answer", + "samoan", + "somali", + "vietnamese", + "white", + ] + ] + ] + """ + The persons race. + """ + race_other: NotRequired[str] + """ + Please specify your race, when other is selected. + """ + + +class AccountCreatePersonParamsVerification(TypedDict): + additional_document: NotRequired[ + "AccountCreatePersonParamsVerificationAdditionalDocument" + ] + """ + A document showing address, either a passport, local ID card, or utility bill from a well-known utility company. + """ + document: NotRequired["AccountCreatePersonParamsVerificationDocument"] + """ + An identifying document, either a passport or local ID card. + """ + + +class AccountCreatePersonParamsVerificationAdditionalDocument(TypedDict): + back: NotRequired[str] + """ + The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + """ + front: NotRequired[str] + """ + The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + """ + + +class AccountCreatePersonParamsVerificationDocument(TypedDict): + back: NotRequired[str] + """ + The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + """ + front: NotRequired[str] + """ + The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + """ diff --git a/stripe/params/_account_delete_external_account_params.py b/stripe/params/_account_delete_external_account_params.py new file mode 100644 index 000000000..dd702e9c1 --- /dev/null +++ b/stripe/params/_account_delete_external_account_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions + + +class AccountDeleteExternalAccountParams(RequestOptions): + pass diff --git a/stripe/params/_account_delete_params.py b/stripe/params/_account_delete_params.py new file mode 100644 index 000000000..9a587fb78 --- /dev/null +++ b/stripe/params/_account_delete_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions + + +class AccountDeleteParams(RequestOptions): + pass diff --git a/stripe/params/_account_delete_person_params.py b/stripe/params/_account_delete_person_params.py new file mode 100644 index 000000000..843ae3733 --- /dev/null +++ b/stripe/params/_account_delete_person_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions + + +class AccountDeletePersonParams(RequestOptions): + pass diff --git a/stripe/params/_account_external_account_create_params.py b/stripe/params/_account_external_account_create_params.py new file mode 100644 index 000000000..144d75853 --- /dev/null +++ b/stripe/params/_account_external_account_create_params.py @@ -0,0 +1,82 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import Dict, List, Union +from typing_extensions import Literal, NotRequired, TypedDict + + +class AccountExternalAccountCreateParams(TypedDict): + default_for_currency: NotRequired[bool] + """ + When set to true, or if this is the first external account added in this currency, this account becomes the default external account for its currency. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + external_account: Union[ + str, + "AccountExternalAccountCreateParamsCard", + "AccountExternalAccountCreateParamsBankAccount", + "AccountExternalAccountCreateParamsCardToken", + ] + """ + A token, like the ones returned by [Stripe.js](https://stripe.com/docs/js) or a dictionary containing a user's external account details (with the options shown below). Please refer to full [documentation](https://stripe.com/docs/api/external_accounts) instead. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + + +class AccountExternalAccountCreateParamsCard(TypedDict): + object: Literal["card"] + address_city: NotRequired[str] + address_country: NotRequired[str] + address_line1: NotRequired[str] + address_line2: NotRequired[str] + address_state: NotRequired[str] + address_zip: NotRequired[str] + currency: NotRequired[str] + cvc: NotRequired[str] + exp_month: int + exp_year: int + name: NotRequired[str] + number: str + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + """ + + +class AccountExternalAccountCreateParamsBankAccount(TypedDict): + object: Literal["bank_account"] + account_holder_name: NotRequired[str] + """ + The name of the person or business that owns the bank account.This field is required when attaching the bank account to a `Customer` object. + """ + account_holder_type: NotRequired[Literal["company", "individual"]] + """ + The type of entity that holds the account. It can be `company` or `individual`. This field is required when attaching the bank account to a `Customer` object. + """ + account_number: str + """ + The account number for the bank account, in string form. Must be a checking account. + """ + country: str + """ + The country in which the bank account is located. + """ + currency: NotRequired[str] + """ + The currency the bank account is in. This must be a country/currency pairing that [Stripe supports.](docs/payouts) + """ + routing_number: NotRequired[str] + """ + The routing number, sort code, or other country-appropriate institution number for the bank account. For US bank accounts, this is required and should be the ACH routing number, not the wire routing number. If you are providing an IBAN for `account_number`, this field is not required. + """ + + +class AccountExternalAccountCreateParamsCardToken(TypedDict): + object: Literal["card"] + currency: NotRequired[str] + token: str diff --git a/stripe/params/_account_external_account_delete_params.py b/stripe/params/_account_external_account_delete_params.py new file mode 100644 index 000000000..441739cba --- /dev/null +++ b/stripe/params/_account_external_account_delete_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class AccountExternalAccountDeleteParams(TypedDict): + pass diff --git a/stripe/params/_account_external_account_list_params.py b/stripe/params/_account_external_account_list_params.py new file mode 100644 index 000000000..1afd1d469 --- /dev/null +++ b/stripe/params/_account_external_account_list_params.py @@ -0,0 +1,27 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import Literal, NotRequired, TypedDict + + +class AccountExternalAccountListParams(TypedDict): + 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. + """ + object: NotRequired[Literal["bank_account", "card"]] + """ + Filter external accounts according to a particular object type. + """ + 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. + """ diff --git a/stripe/params/_account_external_account_retrieve_params.py b/stripe/params/_account_external_account_retrieve_params.py new file mode 100644 index 000000000..70ebac586 --- /dev/null +++ b/stripe/params/_account_external_account_retrieve_params.py @@ -0,0 +1,11 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import NotRequired, TypedDict + + +class AccountExternalAccountRetrieveParams(TypedDict): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_account_external_account_update_params.py b/stripe/params/_account_external_account_update_params.py new file mode 100644 index 000000000..04642cd79 --- /dev/null +++ b/stripe/params/_account_external_account_update_params.py @@ -0,0 +1,91 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class AccountExternalAccountUpdateParams(TypedDict): + account_holder_name: NotRequired[str] + """ + The name of the person or business that owns the bank account. + """ + account_holder_type: NotRequired[ + "Literal['']|Literal['company', 'individual']" + ] + """ + The type of entity that holds the account. This can be either `individual` or `company`. + """ + account_type: NotRequired[Literal["checking", "futsu", "savings", "toza"]] + """ + The bank account type. This can only be `checking` or `savings` in most countries. In Japan, this can only be `futsu` or `toza`. + """ + address_city: NotRequired[str] + """ + City/District/Suburb/Town/Village. + """ + address_country: NotRequired[str] + """ + Billing address country, if provided when creating card. + """ + address_line1: NotRequired[str] + """ + Address line 1 (Street address/PO Box/Company name). + """ + address_line2: NotRequired[str] + """ + Address line 2 (Apartment/Suite/Unit/Building). + """ + address_state: NotRequired[str] + """ + State/County/Province/Region. + """ + address_zip: NotRequired[str] + """ + ZIP or postal code. + """ + default_for_currency: NotRequired[bool] + """ + When set to true, this becomes the default external account for its currency. + """ + documents: NotRequired["AccountExternalAccountUpdateParamsDocuments"] + """ + Documents that may be submitted to satisfy various informational requests. + """ + exp_month: NotRequired[str] + """ + Two digit number representing the card's expiration month. + """ + exp_year: NotRequired[str] + """ + Four digit number representing the card's expiration year. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + name: NotRequired[str] + """ + Cardholder name. + """ + + +class AccountExternalAccountUpdateParamsDocuments(TypedDict): + bank_account_ownership_verification: NotRequired[ + "AccountExternalAccountUpdateParamsDocumentsBankAccountOwnershipVerification" + ] + """ + One or more documents that support the [Bank account ownership verification](https://support.stripe.com/questions/bank-account-ownership-verification) requirement. Must be a document associated with the bank account that displays the last 4 digits of the account number, either a statement or a check. + """ + + +class AccountExternalAccountUpdateParamsDocumentsBankAccountOwnershipVerification( + TypedDict, +): + files: NotRequired[List[str]] + """ + One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + """ diff --git a/stripe/params/_account_link_create_params.py b/stripe/params/_account_link_create_params.py new file mode 100644 index 000000000..175faa7ca --- /dev/null +++ b/stripe/params/_account_link_create_params.py @@ -0,0 +1,54 @@ +# -*- 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, TypedDict + + +class AccountLinkCreateParams(RequestOptions): + account: str + """ + The identifier of the account to create an account link for. + """ + collect: NotRequired[Literal["currently_due", "eventually_due"]] + """ + The collect parameter is deprecated. Use `collection_options` instead. + """ + collection_options: NotRequired["AccountLinkCreateParamsCollectionOptions"] + """ + Specifies the requirements that Stripe collects from connected accounts in the Connect Onboarding flow. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + refresh_url: NotRequired[str] + """ + The URL the user will be redirected to if the account link is expired, has been previously-visited, or is otherwise invalid. The URL you specify should attempt to generate a new account link with the same parameters used to create the original account link, then redirect the user to the new account link's URL so they can continue with Connect Onboarding. If a new account link cannot be generated or the redirect fails you should display a useful error to the user. + """ + return_url: NotRequired[str] + """ + The URL that the user will be redirected to upon leaving or completing the linked flow. + """ + type: Literal[ + "account_onboarding", + "account_update", + "capital_financing_offer", + "capital_financing_reporting", + ] + """ + The type of account link the user is requesting. + + You can create Account Links of type `account_update` only for connected accounts where your platform is responsible for collecting requirements, including Custom accounts. You can't create them for accounts that have access to a Stripe-hosted Dashboard. If you use [Connect embedded components](https://docs.stripe.com/connect/get-started-connect-embedded-components), you can include components that allow your connected accounts to update their own information. For an account without Stripe-hosted Dashboard access where Stripe is liable for negative balances, you must use embedded components. + """ + + +class AccountLinkCreateParamsCollectionOptions(TypedDict): + fields: NotRequired[Literal["currently_due", "eventually_due"]] + """ + Specifies whether the platform collects only currently_due requirements (`currently_due`) or both currently_due and eventually_due requirements (`eventually_due`). If you don't specify `collection_options`, the default value is `currently_due`. + """ + future_requirements: NotRequired[Literal["include", "omit"]] + """ + Specifies whether the platform collects future_requirements in addition to requirements in Connect Onboarding. The default value is `omit`. + """ diff --git a/stripe/params/_account_list_capabilities_params.py b/stripe/params/_account_list_capabilities_params.py new file mode 100644 index 000000000..390ea3815 --- /dev/null +++ b/stripe/params/_account_list_capabilities_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 AccountListCapabilitiesParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_account_list_external_accounts_params.py b/stripe/params/_account_list_external_accounts_params.py new file mode 100644 index 000000000..45f1f078b --- /dev/null +++ b/stripe/params/_account_list_external_accounts_params.py @@ -0,0 +1,28 @@ +# -*- 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 AccountListExternalAccountsParams(RequestOptions): + 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. + """ + object: NotRequired[Literal["bank_account", "card"]] + """ + Filter external accounts according to a particular object type. + """ + 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. + """ diff --git a/stripe/params/_account_list_params.py b/stripe/params/_account_list_params.py new file mode 100644 index 000000000..541093c07 --- /dev/null +++ b/stripe/params/_account_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 AccountListParams(RequestOptions): + created: NotRequired["AccountListParamsCreated|int"] + """ + Only return connected accounts that were created during the given date interval. + """ + 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 AccountListParamsCreated(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/_account_list_persons_params.py b/stripe/params/_account_list_persons_params.py new file mode 100644 index 000000000..fbd9cb28f --- /dev/null +++ b/stripe/params/_account_list_persons_params.py @@ -0,0 +1,55 @@ +# -*- 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 AccountListPersonsParams(RequestOptions): + 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. + """ + relationship: NotRequired["AccountListPersonsParamsRelationship"] + """ + Filters on the list of people returned based on the person's relationship to the account's company. + """ + 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 AccountListPersonsParamsRelationship(TypedDict): + authorizer: NotRequired[bool] + """ + A filter on the list of people returned based on whether these people are authorizers of the account's representative. + """ + director: NotRequired[bool] + """ + A filter on the list of people returned based on whether these people are directors of the account's company. + """ + executive: NotRequired[bool] + """ + A filter on the list of people returned based on whether these people are executives of the account's company. + """ + legal_guardian: NotRequired[bool] + """ + A filter on the list of people returned based on whether these people are legal guardians of the account's representative. + """ + owner: NotRequired[bool] + """ + A filter on the list of people returned based on whether these people are owners of the account's company. + """ + representative: NotRequired[bool] + """ + A filter on the list of people returned based on whether these people are the representative of the account's company. + """ diff --git a/stripe/params/_account_login_link_create_params.py b/stripe/params/_account_login_link_create_params.py new file mode 100644 index 000000000..f9a0ea384 --- /dev/null +++ b/stripe/params/_account_login_link_create_params.py @@ -0,0 +1,11 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import NotRequired, TypedDict + + +class AccountLoginLinkCreateParams(TypedDict): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_account_modify_capability_params.py b/stripe/params/_account_modify_capability_params.py new file mode 100644 index 000000000..ebbfa934a --- /dev/null +++ b/stripe/params/_account_modify_capability_params.py @@ -0,0 +1,18 @@ +# -*- 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 AccountModifyCapabilityParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + requested: NotRequired[bool] + """ + To request a new capability for an account, pass true. There can be a delay before the requested capability becomes active. If the capability has any activation requirements, the response includes them in the `requirements` arrays. + + If a capability isn't permanent, you can remove it from the account by passing false. Some capabilities are permanent after they've been requested. Attempting to remove a permanent capability returns an error. + """ diff --git a/stripe/params/_account_modify_external_account_params.py b/stripe/params/_account_modify_external_account_params.py new file mode 100644 index 000000000..682ec49ed --- /dev/null +++ b/stripe/params/_account_modify_external_account_params.py @@ -0,0 +1,92 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class AccountModifyExternalAccountParams(RequestOptions): + account_holder_name: NotRequired[str] + """ + The name of the person or business that owns the bank account. + """ + account_holder_type: NotRequired[ + "Literal['']|Literal['company', 'individual']" + ] + """ + The type of entity that holds the account. This can be either `individual` or `company`. + """ + account_type: NotRequired[Literal["checking", "futsu", "savings", "toza"]] + """ + The bank account type. This can only be `checking` or `savings` in most countries. In Japan, this can only be `futsu` or `toza`. + """ + address_city: NotRequired[str] + """ + City/District/Suburb/Town/Village. + """ + address_country: NotRequired[str] + """ + Billing address country, if provided when creating card. + """ + address_line1: NotRequired[str] + """ + Address line 1 (Street address/PO Box/Company name). + """ + address_line2: NotRequired[str] + """ + Address line 2 (Apartment/Suite/Unit/Building). + """ + address_state: NotRequired[str] + """ + State/County/Province/Region. + """ + address_zip: NotRequired[str] + """ + ZIP or postal code. + """ + default_for_currency: NotRequired[bool] + """ + When set to true, this becomes the default external account for its currency. + """ + documents: NotRequired["AccountModifyExternalAccountParamsDocuments"] + """ + Documents that may be submitted to satisfy various informational requests. + """ + exp_month: NotRequired[str] + """ + Two digit number representing the card's expiration month. + """ + exp_year: NotRequired[str] + """ + Four digit number representing the card's expiration year. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + name: NotRequired[str] + """ + Cardholder name. + """ + + +class AccountModifyExternalAccountParamsDocuments(TypedDict): + bank_account_ownership_verification: NotRequired[ + "AccountModifyExternalAccountParamsDocumentsBankAccountOwnershipVerification" + ] + """ + One or more documents that support the [Bank account ownership verification](https://support.stripe.com/questions/bank-account-ownership-verification) requirement. Must be a document associated with the bank account that displays the last 4 digits of the account number, either a statement or a check. + """ + + +class AccountModifyExternalAccountParamsDocumentsBankAccountOwnershipVerification( + TypedDict, +): + files: NotRequired[List[str]] + """ + One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + """ diff --git a/stripe/params/_account_modify_person_params.py b/stripe/params/_account_modify_person_params.py new file mode 100644 index 000000000..08a3455a9 --- /dev/null +++ b/stripe/params/_account_modify_person_params.py @@ -0,0 +1,471 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class AccountModifyPersonParams(RequestOptions): + additional_tos_acceptances: NotRequired[ + "AccountModifyPersonParamsAdditionalTosAcceptances" + ] + """ + Details on the legal guardian's or authorizer's acceptance of the required Stripe agreements. + """ + address: NotRequired["AccountModifyPersonParamsAddress"] + """ + The person's address. + """ + address_kana: NotRequired["AccountModifyPersonParamsAddressKana"] + """ + The Kana variation of the person's address (Japan only). + """ + address_kanji: NotRequired["AccountModifyPersonParamsAddressKanji"] + """ + The Kanji variation of the person's address (Japan only). + """ + dob: NotRequired["Literal['']|AccountModifyPersonParamsDob"] + """ + The person's date of birth. + """ + documents: NotRequired["AccountModifyPersonParamsDocuments"] + """ + Documents that may be submitted to satisfy various informational requests. + """ + email: NotRequired[str] + """ + The person's email address. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + first_name: NotRequired[str] + """ + The person's first name. + """ + first_name_kana: NotRequired[str] + """ + The Kana variation of the person's first name (Japan only). + """ + first_name_kanji: NotRequired[str] + """ + The Kanji variation of the person's first name (Japan only). + """ + full_name_aliases: NotRequired["Literal['']|List[str]"] + """ + A list of alternate names or aliases that the person is known by. + """ + gender: NotRequired[str] + """ + The person's gender (International regulations require either "male" or "female"). + """ + id_number: NotRequired[str] + """ + The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://docs.stripe.com/js/tokens/create_token?type=pii). + """ + id_number_secondary: NotRequired[str] + """ + The person's secondary ID number, as appropriate for their country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://docs.stripe.com/js/tokens/create_token?type=pii). + """ + last_name: NotRequired[str] + """ + The person's last name. + """ + last_name_kana: NotRequired[str] + """ + The Kana variation of the person's last name (Japan only). + """ + last_name_kanji: NotRequired[str] + """ + The Kanji variation of the person's last name (Japan only). + """ + maiden_name: NotRequired[str] + """ + The person's maiden name. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + nationality: NotRequired[str] + """ + The country where the person is a national. Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)), or "XX" if unavailable. + """ + person_token: NotRequired[str] + """ + A [person token](https://docs.stripe.com/connect/account-tokens), used to securely provide details to the person. + """ + phone: NotRequired[str] + """ + The person's phone number. + """ + political_exposure: NotRequired[Literal["existing", "none"]] + """ + Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. + """ + registered_address: NotRequired[ + "AccountModifyPersonParamsRegisteredAddress" + ] + """ + The person's registered address. + """ + relationship: NotRequired["AccountModifyPersonParamsRelationship"] + """ + The relationship that this person has with the account's legal entity. + """ + ssn_last_4: NotRequired[str] + """ + The last four digits of the person's Social Security number (U.S. only). + """ + us_cfpb_data: NotRequired["AccountModifyPersonParamsUsCfpbData"] + """ + Demographic data related to the person. + """ + verification: NotRequired["AccountModifyPersonParamsVerification"] + """ + The person's verification status. + """ + + +class AccountModifyPersonParamsAdditionalTosAcceptances(TypedDict): + account: NotRequired[ + "AccountModifyPersonParamsAdditionalTosAcceptancesAccount" + ] + """ + Details on the legal guardian's acceptance of the main Stripe service agreement. + """ + + +class AccountModifyPersonParamsAdditionalTosAcceptancesAccount(TypedDict): + date: NotRequired[int] + """ + The Unix timestamp marking when the account representative accepted the service agreement. + """ + ip: NotRequired[str] + """ + The IP address from which the account representative accepted the service agreement. + """ + user_agent: NotRequired["Literal['']|str"] + """ + The user agent of the browser from which the account representative accepted the service agreement. + """ + + +class AccountModifyPersonParamsAddress(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. + """ + + +class AccountModifyPersonParamsAddressKana(TypedDict): + city: NotRequired[str] + """ + City or ward. + """ + 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] + """ + Block or building number. + """ + line2: NotRequired[str] + """ + Building details. + """ + postal_code: NotRequired[str] + """ + Postal code. + """ + state: NotRequired[str] + """ + Prefecture. + """ + town: NotRequired[str] + """ + Town or cho-me. + """ + + +class AccountModifyPersonParamsAddressKanji(TypedDict): + city: NotRequired[str] + """ + City or ward. + """ + 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] + """ + Block or building number. + """ + line2: NotRequired[str] + """ + Building details. + """ + postal_code: NotRequired[str] + """ + Postal code. + """ + state: NotRequired[str] + """ + Prefecture. + """ + town: NotRequired[str] + """ + Town or cho-me. + """ + + +class AccountModifyPersonParamsDob(TypedDict): + day: int + """ + The day of birth, between 1 and 31. + """ + month: int + """ + The month of birth, between 1 and 12. + """ + year: int + """ + The four-digit year of birth. + """ + + +class AccountModifyPersonParamsDocuments(TypedDict): + company_authorization: NotRequired[ + "AccountModifyPersonParamsDocumentsCompanyAuthorization" + ] + """ + One or more documents that demonstrate proof that this person is authorized to represent the company. + """ + passport: NotRequired["AccountModifyPersonParamsDocumentsPassport"] + """ + One or more documents showing the person's passport page with photo and personal data. + """ + visa: NotRequired["AccountModifyPersonParamsDocumentsVisa"] + """ + One or more documents showing the person's visa required for living in the country where they are residing. + """ + + +class AccountModifyPersonParamsDocumentsCompanyAuthorization(TypedDict): + files: NotRequired[List[str]] + """ + One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + """ + + +class AccountModifyPersonParamsDocumentsPassport(TypedDict): + files: NotRequired[List[str]] + """ + One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + """ + + +class AccountModifyPersonParamsDocumentsVisa(TypedDict): + files: NotRequired[List[str]] + """ + One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + """ + + +class AccountModifyPersonParamsRegisteredAddress(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. + """ + + +class AccountModifyPersonParamsRelationship(TypedDict): + authorizer: NotRequired[bool] + """ + Whether the person is the authorizer of the account's representative. + """ + director: NotRequired[bool] + """ + Whether the person is a director of the account's legal entity. Directors are typically members of the governing board of the company, or responsible for ensuring the company meets its regulatory obligations. + """ + executive: NotRequired[bool] + """ + Whether the person has significant responsibility to control, manage, or direct the organization. + """ + legal_guardian: NotRequired[bool] + """ + Whether the person is the legal guardian of the account's representative. + """ + owner: NotRequired[bool] + """ + Whether the person is an owner of the account's legal entity. + """ + percent_ownership: NotRequired["Literal['']|float"] + """ + The percent owned by the person of the account's legal entity. + """ + representative: NotRequired[bool] + """ + Whether the person is authorized as the primary representative of the account. This is the person nominated by the business to provide information about themselves, and general information about the account. There can only be one representative at any given time. At the time the account is created, this person should be set to the person responsible for opening the account. + """ + title: NotRequired[str] + """ + The person's title (e.g., CEO, Support Engineer). + """ + + +class AccountModifyPersonParamsUsCfpbData(TypedDict): + ethnicity_details: NotRequired[ + "AccountModifyPersonParamsUsCfpbDataEthnicityDetails" + ] + """ + The persons ethnicity details + """ + race_details: NotRequired["AccountModifyPersonParamsUsCfpbDataRaceDetails"] + """ + The persons race details + """ + self_identified_gender: NotRequired[str] + """ + The persons self-identified gender + """ + + +class AccountModifyPersonParamsUsCfpbDataEthnicityDetails(TypedDict): + ethnicity: NotRequired[ + List[ + Literal[ + "cuban", + "hispanic_or_latino", + "mexican", + "not_hispanic_or_latino", + "other_hispanic_or_latino", + "prefer_not_to_answer", + "puerto_rican", + ] + ] + ] + """ + The persons ethnicity + """ + ethnicity_other: NotRequired[str] + """ + Please specify your origin, when other is selected. + """ + + +class AccountModifyPersonParamsUsCfpbDataRaceDetails(TypedDict): + race: NotRequired[ + List[ + Literal[ + "african_american", + "american_indian_or_alaska_native", + "asian", + "asian_indian", + "black_or_african_american", + "chinese", + "ethiopian", + "filipino", + "guamanian_or_chamorro", + "haitian", + "jamaican", + "japanese", + "korean", + "native_hawaiian", + "native_hawaiian_or_other_pacific_islander", + "nigerian", + "other_asian", + "other_black_or_african_american", + "other_pacific_islander", + "prefer_not_to_answer", + "samoan", + "somali", + "vietnamese", + "white", + ] + ] + ] + """ + The persons race. + """ + race_other: NotRequired[str] + """ + Please specify your race, when other is selected. + """ + + +class AccountModifyPersonParamsVerification(TypedDict): + additional_document: NotRequired[ + "AccountModifyPersonParamsVerificationAdditionalDocument" + ] + """ + A document showing address, either a passport, local ID card, or utility bill from a well-known utility company. + """ + document: NotRequired["AccountModifyPersonParamsVerificationDocument"] + """ + An identifying document, either a passport or local ID card. + """ + + +class AccountModifyPersonParamsVerificationAdditionalDocument(TypedDict): + back: NotRequired[str] + """ + The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + """ + front: NotRequired[str] + """ + The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + """ + + +class AccountModifyPersonParamsVerificationDocument(TypedDict): + back: NotRequired[str] + """ + The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + """ + front: NotRequired[str] + """ + The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + """ diff --git a/stripe/params/_account_notice_list_params.py b/stripe/params/_account_notice_list_params.py new file mode 100644 index 000000000..ec4569b92 --- /dev/null +++ b/stripe/params/_account_notice_list_params.py @@ -0,0 +1,28 @@ +# -*- 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 AccountNoticeListParams(RequestOptions): + 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. + """ + sent: NotRequired[bool] + """ + Set to false to only return unsent AccountNotices. + """ + 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. + """ diff --git a/stripe/params/_account_notice_modify_params.py b/stripe/params/_account_notice_modify_params.py new file mode 100644 index 000000000..3fb0f3304 --- /dev/null +++ b/stripe/params/_account_notice_modify_params.py @@ -0,0 +1,39 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import NotRequired, TypedDict + + +class AccountNoticeModifyParams(RequestOptions): + email: "AccountNoticeModifyParamsEmail" + """ + Information about the email you sent. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + sent_at: int + """ + Date when you sent the notice. + """ + + +class AccountNoticeModifyParamsEmail(TypedDict): + plain_text: str + """ + Content of the email in plain text. The copy must match exactly the language that Stripe Compliance has approved for use. + """ + recipient: str + """ + Email address of the recipient. + """ + subject: str + """ + Subject of the email. + """ diff --git a/stripe/params/_account_notice_retrieve_params.py b/stripe/params/_account_notice_retrieve_params.py new file mode 100644 index 000000000..9de77f7e4 --- /dev/null +++ b/stripe/params/_account_notice_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 AccountNoticeRetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_account_notice_update_params.py b/stripe/params/_account_notice_update_params.py new file mode 100644 index 000000000..9bc697cc4 --- /dev/null +++ b/stripe/params/_account_notice_update_params.py @@ -0,0 +1,38 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import Dict, List +from typing_extensions import NotRequired, TypedDict + + +class AccountNoticeUpdateParams(TypedDict): + email: "AccountNoticeUpdateParamsEmail" + """ + Information about the email you sent. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + sent_at: int + """ + Date when you sent the notice. + """ + + +class AccountNoticeUpdateParamsEmail(TypedDict): + plain_text: str + """ + Content of the email in plain text. The copy must match exactly the language that Stripe Compliance has approved for use. + """ + recipient: str + """ + Email address of the recipient. + """ + subject: str + """ + Subject of the email. + """ diff --git a/stripe/params/_account_person_create_params.py b/stripe/params/_account_person_create_params.py new file mode 100644 index 000000000..bf5abaf4c --- /dev/null +++ b/stripe/params/_account_person_create_params.py @@ -0,0 +1,470 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class AccountPersonCreateParams(TypedDict): + additional_tos_acceptances: NotRequired[ + "AccountPersonCreateParamsAdditionalTosAcceptances" + ] + """ + Details on the legal guardian's or authorizer's acceptance of the required Stripe agreements. + """ + address: NotRequired["AccountPersonCreateParamsAddress"] + """ + The person's address. + """ + address_kana: NotRequired["AccountPersonCreateParamsAddressKana"] + """ + The Kana variation of the person's address (Japan only). + """ + address_kanji: NotRequired["AccountPersonCreateParamsAddressKanji"] + """ + The Kanji variation of the person's address (Japan only). + """ + dob: NotRequired["Literal['']|AccountPersonCreateParamsDob"] + """ + The person's date of birth. + """ + documents: NotRequired["AccountPersonCreateParamsDocuments"] + """ + Documents that may be submitted to satisfy various informational requests. + """ + email: NotRequired[str] + """ + The person's email address. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + first_name: NotRequired[str] + """ + The person's first name. + """ + first_name_kana: NotRequired[str] + """ + The Kana variation of the person's first name (Japan only). + """ + first_name_kanji: NotRequired[str] + """ + The Kanji variation of the person's first name (Japan only). + """ + full_name_aliases: NotRequired["Literal['']|List[str]"] + """ + A list of alternate names or aliases that the person is known by. + """ + gender: NotRequired[str] + """ + The person's gender (International regulations require either "male" or "female"). + """ + id_number: NotRequired[str] + """ + The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://docs.stripe.com/js/tokens/create_token?type=pii). + """ + id_number_secondary: NotRequired[str] + """ + The person's secondary ID number, as appropriate for their country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://docs.stripe.com/js/tokens/create_token?type=pii). + """ + last_name: NotRequired[str] + """ + The person's last name. + """ + last_name_kana: NotRequired[str] + """ + The Kana variation of the person's last name (Japan only). + """ + last_name_kanji: NotRequired[str] + """ + The Kanji variation of the person's last name (Japan only). + """ + maiden_name: NotRequired[str] + """ + The person's maiden name. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + nationality: NotRequired[str] + """ + The country where the person is a national. Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)), or "XX" if unavailable. + """ + person_token: NotRequired[str] + """ + A [person token](https://docs.stripe.com/connect/account-tokens), used to securely provide details to the person. + """ + phone: NotRequired[str] + """ + The person's phone number. + """ + political_exposure: NotRequired[Literal["existing", "none"]] + """ + Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. + """ + registered_address: NotRequired[ + "AccountPersonCreateParamsRegisteredAddress" + ] + """ + The person's registered address. + """ + relationship: NotRequired["AccountPersonCreateParamsRelationship"] + """ + The relationship that this person has with the account's legal entity. + """ + ssn_last_4: NotRequired[str] + """ + The last four digits of the person's Social Security number (U.S. only). + """ + us_cfpb_data: NotRequired["AccountPersonCreateParamsUsCfpbData"] + """ + Demographic data related to the person. + """ + verification: NotRequired["AccountPersonCreateParamsVerification"] + """ + The person's verification status. + """ + + +class AccountPersonCreateParamsAdditionalTosAcceptances(TypedDict): + account: NotRequired[ + "AccountPersonCreateParamsAdditionalTosAcceptancesAccount" + ] + """ + Details on the legal guardian's acceptance of the main Stripe service agreement. + """ + + +class AccountPersonCreateParamsAdditionalTosAcceptancesAccount(TypedDict): + date: NotRequired[int] + """ + The Unix timestamp marking when the account representative accepted the service agreement. + """ + ip: NotRequired[str] + """ + The IP address from which the account representative accepted the service agreement. + """ + user_agent: NotRequired["Literal['']|str"] + """ + The user agent of the browser from which the account representative accepted the service agreement. + """ + + +class AccountPersonCreateParamsAddress(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. + """ + + +class AccountPersonCreateParamsAddressKana(TypedDict): + city: NotRequired[str] + """ + City or ward. + """ + 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] + """ + Block or building number. + """ + line2: NotRequired[str] + """ + Building details. + """ + postal_code: NotRequired[str] + """ + Postal code. + """ + state: NotRequired[str] + """ + Prefecture. + """ + town: NotRequired[str] + """ + Town or cho-me. + """ + + +class AccountPersonCreateParamsAddressKanji(TypedDict): + city: NotRequired[str] + """ + City or ward. + """ + 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] + """ + Block or building number. + """ + line2: NotRequired[str] + """ + Building details. + """ + postal_code: NotRequired[str] + """ + Postal code. + """ + state: NotRequired[str] + """ + Prefecture. + """ + town: NotRequired[str] + """ + Town or cho-me. + """ + + +class AccountPersonCreateParamsDob(TypedDict): + day: int + """ + The day of birth, between 1 and 31. + """ + month: int + """ + The month of birth, between 1 and 12. + """ + year: int + """ + The four-digit year of birth. + """ + + +class AccountPersonCreateParamsDocuments(TypedDict): + company_authorization: NotRequired[ + "AccountPersonCreateParamsDocumentsCompanyAuthorization" + ] + """ + One or more documents that demonstrate proof that this person is authorized to represent the company. + """ + passport: NotRequired["AccountPersonCreateParamsDocumentsPassport"] + """ + One or more documents showing the person's passport page with photo and personal data. + """ + visa: NotRequired["AccountPersonCreateParamsDocumentsVisa"] + """ + One or more documents showing the person's visa required for living in the country where they are residing. + """ + + +class AccountPersonCreateParamsDocumentsCompanyAuthorization(TypedDict): + files: NotRequired[List[str]] + """ + One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + """ + + +class AccountPersonCreateParamsDocumentsPassport(TypedDict): + files: NotRequired[List[str]] + """ + One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + """ + + +class AccountPersonCreateParamsDocumentsVisa(TypedDict): + files: NotRequired[List[str]] + """ + One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + """ + + +class AccountPersonCreateParamsRegisteredAddress(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. + """ + + +class AccountPersonCreateParamsRelationship(TypedDict): + authorizer: NotRequired[bool] + """ + Whether the person is the authorizer of the account's representative. + """ + director: NotRequired[bool] + """ + Whether the person is a director of the account's legal entity. Directors are typically members of the governing board of the company, or responsible for ensuring the company meets its regulatory obligations. + """ + executive: NotRequired[bool] + """ + Whether the person has significant responsibility to control, manage, or direct the organization. + """ + legal_guardian: NotRequired[bool] + """ + Whether the person is the legal guardian of the account's representative. + """ + owner: NotRequired[bool] + """ + Whether the person is an owner of the account's legal entity. + """ + percent_ownership: NotRequired["Literal['']|float"] + """ + The percent owned by the person of the account's legal entity. + """ + representative: NotRequired[bool] + """ + Whether the person is authorized as the primary representative of the account. This is the person nominated by the business to provide information about themselves, and general information about the account. There can only be one representative at any given time. At the time the account is created, this person should be set to the person responsible for opening the account. + """ + title: NotRequired[str] + """ + The person's title (e.g., CEO, Support Engineer). + """ + + +class AccountPersonCreateParamsUsCfpbData(TypedDict): + ethnicity_details: NotRequired[ + "AccountPersonCreateParamsUsCfpbDataEthnicityDetails" + ] + """ + The persons ethnicity details + """ + race_details: NotRequired["AccountPersonCreateParamsUsCfpbDataRaceDetails"] + """ + The persons race details + """ + self_identified_gender: NotRequired[str] + """ + The persons self-identified gender + """ + + +class AccountPersonCreateParamsUsCfpbDataEthnicityDetails(TypedDict): + ethnicity: NotRequired[ + List[ + Literal[ + "cuban", + "hispanic_or_latino", + "mexican", + "not_hispanic_or_latino", + "other_hispanic_or_latino", + "prefer_not_to_answer", + "puerto_rican", + ] + ] + ] + """ + The persons ethnicity + """ + ethnicity_other: NotRequired[str] + """ + Please specify your origin, when other is selected. + """ + + +class AccountPersonCreateParamsUsCfpbDataRaceDetails(TypedDict): + race: NotRequired[ + List[ + Literal[ + "african_american", + "american_indian_or_alaska_native", + "asian", + "asian_indian", + "black_or_african_american", + "chinese", + "ethiopian", + "filipino", + "guamanian_or_chamorro", + "haitian", + "jamaican", + "japanese", + "korean", + "native_hawaiian", + "native_hawaiian_or_other_pacific_islander", + "nigerian", + "other_asian", + "other_black_or_african_american", + "other_pacific_islander", + "prefer_not_to_answer", + "samoan", + "somali", + "vietnamese", + "white", + ] + ] + ] + """ + The persons race. + """ + race_other: NotRequired[str] + """ + Please specify your race, when other is selected. + """ + + +class AccountPersonCreateParamsVerification(TypedDict): + additional_document: NotRequired[ + "AccountPersonCreateParamsVerificationAdditionalDocument" + ] + """ + A document showing address, either a passport, local ID card, or utility bill from a well-known utility company. + """ + document: NotRequired["AccountPersonCreateParamsVerificationDocument"] + """ + An identifying document, either a passport or local ID card. + """ + + +class AccountPersonCreateParamsVerificationAdditionalDocument(TypedDict): + back: NotRequired[str] + """ + The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + """ + front: NotRequired[str] + """ + The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + """ + + +class AccountPersonCreateParamsVerificationDocument(TypedDict): + back: NotRequired[str] + """ + The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + """ + front: NotRequired[str] + """ + The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + """ diff --git a/stripe/params/_account_person_delete_params.py b/stripe/params/_account_person_delete_params.py new file mode 100644 index 000000000..14b51a6f5 --- /dev/null +++ b/stripe/params/_account_person_delete_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class AccountPersonDeleteParams(TypedDict): + pass diff --git a/stripe/params/_account_person_list_params.py b/stripe/params/_account_person_list_params.py new file mode 100644 index 000000000..053853a29 --- /dev/null +++ b/stripe/params/_account_person_list_params.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import NotRequired, TypedDict + + +class AccountPersonListParams(TypedDict): + 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. + """ + relationship: NotRequired["AccountPersonListParamsRelationship"] + """ + Filters on the list of people returned based on the person's relationship to the account's company. + """ + 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 AccountPersonListParamsRelationship(TypedDict): + authorizer: NotRequired[bool] + """ + A filter on the list of people returned based on whether these people are authorizers of the account's representative. + """ + director: NotRequired[bool] + """ + A filter on the list of people returned based on whether these people are directors of the account's company. + """ + executive: NotRequired[bool] + """ + A filter on the list of people returned based on whether these people are executives of the account's company. + """ + legal_guardian: NotRequired[bool] + """ + A filter on the list of people returned based on whether these people are legal guardians of the account's representative. + """ + owner: NotRequired[bool] + """ + A filter on the list of people returned based on whether these people are owners of the account's company. + """ + representative: NotRequired[bool] + """ + A filter on the list of people returned based on whether these people are the representative of the account's company. + """ diff --git a/stripe/params/_account_person_retrieve_params.py b/stripe/params/_account_person_retrieve_params.py new file mode 100644 index 000000000..aa5b0f94a --- /dev/null +++ b/stripe/params/_account_person_retrieve_params.py @@ -0,0 +1,11 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import NotRequired, TypedDict + + +class AccountPersonRetrieveParams(TypedDict): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_account_person_update_params.py b/stripe/params/_account_person_update_params.py new file mode 100644 index 000000000..c15713705 --- /dev/null +++ b/stripe/params/_account_person_update_params.py @@ -0,0 +1,470 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class AccountPersonUpdateParams(TypedDict): + additional_tos_acceptances: NotRequired[ + "AccountPersonUpdateParamsAdditionalTosAcceptances" + ] + """ + Details on the legal guardian's or authorizer's acceptance of the required Stripe agreements. + """ + address: NotRequired["AccountPersonUpdateParamsAddress"] + """ + The person's address. + """ + address_kana: NotRequired["AccountPersonUpdateParamsAddressKana"] + """ + The Kana variation of the person's address (Japan only). + """ + address_kanji: NotRequired["AccountPersonUpdateParamsAddressKanji"] + """ + The Kanji variation of the person's address (Japan only). + """ + dob: NotRequired["Literal['']|AccountPersonUpdateParamsDob"] + """ + The person's date of birth. + """ + documents: NotRequired["AccountPersonUpdateParamsDocuments"] + """ + Documents that may be submitted to satisfy various informational requests. + """ + email: NotRequired[str] + """ + The person's email address. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + first_name: NotRequired[str] + """ + The person's first name. + """ + first_name_kana: NotRequired[str] + """ + The Kana variation of the person's first name (Japan only). + """ + first_name_kanji: NotRequired[str] + """ + The Kanji variation of the person's first name (Japan only). + """ + full_name_aliases: NotRequired["Literal['']|List[str]"] + """ + A list of alternate names or aliases that the person is known by. + """ + gender: NotRequired[str] + """ + The person's gender (International regulations require either "male" or "female"). + """ + id_number: NotRequired[str] + """ + The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://docs.stripe.com/js/tokens/create_token?type=pii). + """ + id_number_secondary: NotRequired[str] + """ + The person's secondary ID number, as appropriate for their country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://docs.stripe.com/js/tokens/create_token?type=pii). + """ + last_name: NotRequired[str] + """ + The person's last name. + """ + last_name_kana: NotRequired[str] + """ + The Kana variation of the person's last name (Japan only). + """ + last_name_kanji: NotRequired[str] + """ + The Kanji variation of the person's last name (Japan only). + """ + maiden_name: NotRequired[str] + """ + The person's maiden name. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + nationality: NotRequired[str] + """ + The country where the person is a national. Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)), or "XX" if unavailable. + """ + person_token: NotRequired[str] + """ + A [person token](https://docs.stripe.com/connect/account-tokens), used to securely provide details to the person. + """ + phone: NotRequired[str] + """ + The person's phone number. + """ + political_exposure: NotRequired[Literal["existing", "none"]] + """ + Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. + """ + registered_address: NotRequired[ + "AccountPersonUpdateParamsRegisteredAddress" + ] + """ + The person's registered address. + """ + relationship: NotRequired["AccountPersonUpdateParamsRelationship"] + """ + The relationship that this person has with the account's legal entity. + """ + ssn_last_4: NotRequired[str] + """ + The last four digits of the person's Social Security number (U.S. only). + """ + us_cfpb_data: NotRequired["AccountPersonUpdateParamsUsCfpbData"] + """ + Demographic data related to the person. + """ + verification: NotRequired["AccountPersonUpdateParamsVerification"] + """ + The person's verification status. + """ + + +class AccountPersonUpdateParamsAdditionalTosAcceptances(TypedDict): + account: NotRequired[ + "AccountPersonUpdateParamsAdditionalTosAcceptancesAccount" + ] + """ + Details on the legal guardian's acceptance of the main Stripe service agreement. + """ + + +class AccountPersonUpdateParamsAdditionalTosAcceptancesAccount(TypedDict): + date: NotRequired[int] + """ + The Unix timestamp marking when the account representative accepted the service agreement. + """ + ip: NotRequired[str] + """ + The IP address from which the account representative accepted the service agreement. + """ + user_agent: NotRequired["Literal['']|str"] + """ + The user agent of the browser from which the account representative accepted the service agreement. + """ + + +class AccountPersonUpdateParamsAddress(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. + """ + + +class AccountPersonUpdateParamsAddressKana(TypedDict): + city: NotRequired[str] + """ + City or ward. + """ + 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] + """ + Block or building number. + """ + line2: NotRequired[str] + """ + Building details. + """ + postal_code: NotRequired[str] + """ + Postal code. + """ + state: NotRequired[str] + """ + Prefecture. + """ + town: NotRequired[str] + """ + Town or cho-me. + """ + + +class AccountPersonUpdateParamsAddressKanji(TypedDict): + city: NotRequired[str] + """ + City or ward. + """ + 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] + """ + Block or building number. + """ + line2: NotRequired[str] + """ + Building details. + """ + postal_code: NotRequired[str] + """ + Postal code. + """ + state: NotRequired[str] + """ + Prefecture. + """ + town: NotRequired[str] + """ + Town or cho-me. + """ + + +class AccountPersonUpdateParamsDob(TypedDict): + day: int + """ + The day of birth, between 1 and 31. + """ + month: int + """ + The month of birth, between 1 and 12. + """ + year: int + """ + The four-digit year of birth. + """ + + +class AccountPersonUpdateParamsDocuments(TypedDict): + company_authorization: NotRequired[ + "AccountPersonUpdateParamsDocumentsCompanyAuthorization" + ] + """ + One or more documents that demonstrate proof that this person is authorized to represent the company. + """ + passport: NotRequired["AccountPersonUpdateParamsDocumentsPassport"] + """ + One or more documents showing the person's passport page with photo and personal data. + """ + visa: NotRequired["AccountPersonUpdateParamsDocumentsVisa"] + """ + One or more documents showing the person's visa required for living in the country where they are residing. + """ + + +class AccountPersonUpdateParamsDocumentsCompanyAuthorization(TypedDict): + files: NotRequired[List[str]] + """ + One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + """ + + +class AccountPersonUpdateParamsDocumentsPassport(TypedDict): + files: NotRequired[List[str]] + """ + One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + """ + + +class AccountPersonUpdateParamsDocumentsVisa(TypedDict): + files: NotRequired[List[str]] + """ + One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + """ + + +class AccountPersonUpdateParamsRegisteredAddress(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. + """ + + +class AccountPersonUpdateParamsRelationship(TypedDict): + authorizer: NotRequired[bool] + """ + Whether the person is the authorizer of the account's representative. + """ + director: NotRequired[bool] + """ + Whether the person is a director of the account's legal entity. Directors are typically members of the governing board of the company, or responsible for ensuring the company meets its regulatory obligations. + """ + executive: NotRequired[bool] + """ + Whether the person has significant responsibility to control, manage, or direct the organization. + """ + legal_guardian: NotRequired[bool] + """ + Whether the person is the legal guardian of the account's representative. + """ + owner: NotRequired[bool] + """ + Whether the person is an owner of the account's legal entity. + """ + percent_ownership: NotRequired["Literal['']|float"] + """ + The percent owned by the person of the account's legal entity. + """ + representative: NotRequired[bool] + """ + Whether the person is authorized as the primary representative of the account. This is the person nominated by the business to provide information about themselves, and general information about the account. There can only be one representative at any given time. At the time the account is created, this person should be set to the person responsible for opening the account. + """ + title: NotRequired[str] + """ + The person's title (e.g., CEO, Support Engineer). + """ + + +class AccountPersonUpdateParamsUsCfpbData(TypedDict): + ethnicity_details: NotRequired[ + "AccountPersonUpdateParamsUsCfpbDataEthnicityDetails" + ] + """ + The persons ethnicity details + """ + race_details: NotRequired["AccountPersonUpdateParamsUsCfpbDataRaceDetails"] + """ + The persons race details + """ + self_identified_gender: NotRequired[str] + """ + The persons self-identified gender + """ + + +class AccountPersonUpdateParamsUsCfpbDataEthnicityDetails(TypedDict): + ethnicity: NotRequired[ + List[ + Literal[ + "cuban", + "hispanic_or_latino", + "mexican", + "not_hispanic_or_latino", + "other_hispanic_or_latino", + "prefer_not_to_answer", + "puerto_rican", + ] + ] + ] + """ + The persons ethnicity + """ + ethnicity_other: NotRequired[str] + """ + Please specify your origin, when other is selected. + """ + + +class AccountPersonUpdateParamsUsCfpbDataRaceDetails(TypedDict): + race: NotRequired[ + List[ + Literal[ + "african_american", + "american_indian_or_alaska_native", + "asian", + "asian_indian", + "black_or_african_american", + "chinese", + "ethiopian", + "filipino", + "guamanian_or_chamorro", + "haitian", + "jamaican", + "japanese", + "korean", + "native_hawaiian", + "native_hawaiian_or_other_pacific_islander", + "nigerian", + "other_asian", + "other_black_or_african_american", + "other_pacific_islander", + "prefer_not_to_answer", + "samoan", + "somali", + "vietnamese", + "white", + ] + ] + ] + """ + The persons race. + """ + race_other: NotRequired[str] + """ + Please specify your race, when other is selected. + """ + + +class AccountPersonUpdateParamsVerification(TypedDict): + additional_document: NotRequired[ + "AccountPersonUpdateParamsVerificationAdditionalDocument" + ] + """ + A document showing address, either a passport, local ID card, or utility bill from a well-known utility company. + """ + document: NotRequired["AccountPersonUpdateParamsVerificationDocument"] + """ + An identifying document, either a passport or local ID card. + """ + + +class AccountPersonUpdateParamsVerificationAdditionalDocument(TypedDict): + back: NotRequired[str] + """ + The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + """ + front: NotRequired[str] + """ + The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + """ + + +class AccountPersonUpdateParamsVerificationDocument(TypedDict): + back: NotRequired[str] + """ + The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + """ + front: NotRequired[str] + """ + The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + """ diff --git a/stripe/params/_account_persons_params.py b/stripe/params/_account_persons_params.py new file mode 100644 index 000000000..326548281 --- /dev/null +++ b/stripe/params/_account_persons_params.py @@ -0,0 +1,55 @@ +# -*- 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 AccountPersonsParams(RequestOptions): + 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. + """ + relationship: NotRequired["AccountPersonsParamsRelationship"] + """ + Filters on the list of people returned based on the person's relationship to the account's company. + """ + 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 AccountPersonsParamsRelationship(TypedDict): + authorizer: NotRequired[bool] + """ + A filter on the list of people returned based on whether these people are authorizers of the account's representative. + """ + director: NotRequired[bool] + """ + A filter on the list of people returned based on whether these people are directors of the account's company. + """ + executive: NotRequired[bool] + """ + A filter on the list of people returned based on whether these people are executives of the account's company. + """ + legal_guardian: NotRequired[bool] + """ + A filter on the list of people returned based on whether these people are legal guardians of the account's representative. + """ + owner: NotRequired[bool] + """ + A filter on the list of people returned based on whether these people are owners of the account's company. + """ + representative: NotRequired[bool] + """ + A filter on the list of people returned based on whether these people are the representative of the account's company. + """ diff --git a/stripe/params/_account_reject_params.py b/stripe/params/_account_reject_params.py new file mode 100644 index 000000000..d94d097b1 --- /dev/null +++ b/stripe/params/_account_reject_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 AccountRejectParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + reason: str + """ + The reason for rejecting the account. Can be `fraud`, `terms_of_service`, or `other`. + """ diff --git a/stripe/params/_account_retrieve_capability_params.py b/stripe/params/_account_retrieve_capability_params.py new file mode 100644 index 000000000..64072972d --- /dev/null +++ b/stripe/params/_account_retrieve_capability_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 AccountRetrieveCapabilityParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_account_retrieve_current_params.py b/stripe/params/_account_retrieve_current_params.py new file mode 100644 index 000000000..4ac5f8eeb --- /dev/null +++ b/stripe/params/_account_retrieve_current_params.py @@ -0,0 +1,11 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import NotRequired, TypedDict + + +class AccountRetrieveCurrentParams(TypedDict): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_account_retrieve_external_account_params.py b/stripe/params/_account_retrieve_external_account_params.py new file mode 100644 index 000000000..46990ff24 --- /dev/null +++ b/stripe/params/_account_retrieve_external_account_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 AccountRetrieveExternalAccountParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_account_retrieve_params.py b/stripe/params/_account_retrieve_params.py new file mode 100644 index 000000000..a9e3c8a22 --- /dev/null +++ b/stripe/params/_account_retrieve_params.py @@ -0,0 +1,11 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import NotRequired, TypedDict + + +class AccountRetrieveParams(TypedDict): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_account_retrieve_person_params.py b/stripe/params/_account_retrieve_person_params.py new file mode 100644 index 000000000..77eb3ff14 --- /dev/null +++ b/stripe/params/_account_retrieve_person_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 AccountRetrievePersonParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_account_session_create_params.py b/stripe/params/_account_session_create_params.py new file mode 100644 index 000000000..3ab9f3cd2 --- /dev/null +++ b/stripe/params/_account_session_create_params.py @@ -0,0 +1,980 @@ +# -*- 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, TypedDict + + +class AccountSessionCreateParams(RequestOptions): + account: str + """ + The identifier of the account to create an Account Session for. + """ + components: "AccountSessionCreateParamsComponents" + """ + Each key of the dictionary represents an embedded component, and each embedded component maps to its configuration (e.g. whether it has been enabled or not). + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + + +class AccountSessionCreateParamsComponents(TypedDict): + account_management: NotRequired[ + "AccountSessionCreateParamsComponentsAccountManagement" + ] + """ + Configuration for the [account management](https://docs.stripe.com/connect/supported-embedded-components/account-management/) embedded component. + """ + account_onboarding: NotRequired[ + "AccountSessionCreateParamsComponentsAccountOnboarding" + ] + """ + Configuration for the [account onboarding](https://docs.stripe.com/connect/supported-embedded-components/account-onboarding/) embedded component. + """ + app_install: NotRequired["AccountSessionCreateParamsComponentsAppInstall"] + """ + Configuration for the [app install](https://docs.stripe.com/connect/supported-embedded-components/app-install/) embedded component. + """ + app_viewport: NotRequired[ + "AccountSessionCreateParamsComponentsAppViewport" + ] + """ + Configuration for the [app viewport](https://docs.stripe.com/connect/supported-embedded-components/app-viewport/) embedded component. + """ + balance_report: NotRequired[ + "AccountSessionCreateParamsComponentsBalanceReport" + ] + """ + Configuration for the [balance report](https://docs.stripe.com/connect/supported-embedded-components/financial-reports#balance-report) embedded component. + """ + balances: NotRequired["AccountSessionCreateParamsComponentsBalances"] + """ + Configuration for the [balances](https://docs.stripe.com/connect/supported-embedded-components/balances/) embedded component. + """ + capital_financing: NotRequired[ + "AccountSessionCreateParamsComponentsCapitalFinancing" + ] + """ + Configuration for the [Capital financing](https://docs.stripe.com/connect/supported-embedded-components/capital-financing/) embedded component. + """ + capital_financing_application: NotRequired[ + "AccountSessionCreateParamsComponentsCapitalFinancingApplication" + ] + """ + Configuration for the [Capital financing application](https://docs.stripe.com/connect/supported-embedded-components/capital-financing-application/) embedded component. + """ + capital_financing_promotion: NotRequired[ + "AccountSessionCreateParamsComponentsCapitalFinancingPromotion" + ] + """ + Configuration for the [Capital financing promotion](https://docs.stripe.com/connect/supported-embedded-components/capital-financing-promotion/) embedded component. + """ + capital_overview: NotRequired[ + "AccountSessionCreateParamsComponentsCapitalOverview" + ] + """ + Configuration for the [Capital overview](https://docs.stripe.com/connect/supported-embedded-components/capital-overview/) embedded component. + """ + disputes_list: NotRequired[ + "AccountSessionCreateParamsComponentsDisputesList" + ] + """ + Configuration for the [disputes list](https://docs.stripe.com/connect/supported-embedded-components/disputes-list/) embedded component. + """ + documents: NotRequired["AccountSessionCreateParamsComponentsDocuments"] + """ + Configuration for the [documents](https://docs.stripe.com/connect/supported-embedded-components/documents/) embedded component. + """ + export_tax_transactions: NotRequired[ + "AccountSessionCreateParamsComponentsExportTaxTransactions" + ] + """ + Configuration for the [export tax transactions](https://docs.stripe.com/connect/supported-embedded-components/export-tax-transactions/) embedded component. + """ + financial_account: NotRequired[ + "AccountSessionCreateParamsComponentsFinancialAccount" + ] + """ + Configuration for the [financial account](https://docs.stripe.com/connect/supported-embedded-components/financial-account/) embedded component. + """ + financial_account_transactions: NotRequired[ + "AccountSessionCreateParamsComponentsFinancialAccountTransactions" + ] + """ + Configuration for the [financial account transactions](https://docs.stripe.com/connect/supported-embedded-components/financial-account-transactions/) embedded component. + """ + instant_payouts_promotion: NotRequired[ + "AccountSessionCreateParamsComponentsInstantPayoutsPromotion" + ] + """ + Configuration for the [instant payouts promotion](https://docs.stripe.com/connect/supported-embedded-components/instant-payouts-promotion/) embedded component. + """ + issuing_card: NotRequired[ + "AccountSessionCreateParamsComponentsIssuingCard" + ] + """ + Configuration for the [issuing card](https://docs.stripe.com/connect/supported-embedded-components/issuing-card/) embedded component. + """ + issuing_cards_list: NotRequired[ + "AccountSessionCreateParamsComponentsIssuingCardsList" + ] + """ + Configuration for the [issuing cards list](https://docs.stripe.com/connect/supported-embedded-components/issuing-cards-list/) embedded component. + """ + notification_banner: NotRequired[ + "AccountSessionCreateParamsComponentsNotificationBanner" + ] + """ + Configuration for the [notification banner](https://docs.stripe.com/connect/supported-embedded-components/notification-banner/) embedded component. + """ + payment_details: NotRequired[ + "AccountSessionCreateParamsComponentsPaymentDetails" + ] + """ + Configuration for the [payment details](https://docs.stripe.com/connect/supported-embedded-components/payment-details/) embedded component. + """ + payment_disputes: NotRequired[ + "AccountSessionCreateParamsComponentsPaymentDisputes" + ] + """ + Configuration for the [payment disputes](https://docs.stripe.com/connect/supported-embedded-components/payment-disputes/) embedded component. + """ + payment_method_settings: NotRequired[ + "AccountSessionCreateParamsComponentsPaymentMethodSettings" + ] + """ + Configuration for the [payment method settings](https://docs.stripe.com/connect/supported-embedded-components/payment-method-settings/) embedded component. + """ + payments: NotRequired["AccountSessionCreateParamsComponentsPayments"] + """ + Configuration for the [payments](https://docs.stripe.com/connect/supported-embedded-components/payments/) embedded component. + """ + payout_details: NotRequired[ + "AccountSessionCreateParamsComponentsPayoutDetails" + ] + """ + Configuration for the [payout details](https://docs.stripe.com/connect/supported-embedded-components/payout-details/) embedded component. + """ + payout_reconciliation_report: NotRequired[ + "AccountSessionCreateParamsComponentsPayoutReconciliationReport" + ] + """ + Configuration for the [payout reconciliation report](https://docs.stripe.com/connect/supported-embedded-components/financial-reports#payout-reconciliation-report) embedded component. + """ + payouts: NotRequired["AccountSessionCreateParamsComponentsPayouts"] + """ + Configuration for the [payouts](https://docs.stripe.com/connect/supported-embedded-components/payouts/) embedded component. + """ + payouts_list: NotRequired[ + "AccountSessionCreateParamsComponentsPayoutsList" + ] + """ + Configuration for the [payouts list](https://docs.stripe.com/connect/supported-embedded-components/payouts-list/) embedded component. + """ + product_tax_code_selector: NotRequired[ + "AccountSessionCreateParamsComponentsProductTaxCodeSelector" + ] + """ + Configuration for the [product tax code selector](https://docs.stripe.com/connect/supported-embedded-components/product-tax-code-selector/) embedded component. + """ + recipients: NotRequired["AccountSessionCreateParamsComponentsRecipients"] + """ + Configuration for the [recipients](https://docs.stripe.com/connect/supported-embedded-components/recipients/) embedded component. + """ + reporting_chart: NotRequired[ + "AccountSessionCreateParamsComponentsReportingChart" + ] + """ + Configuration for the [reporting chart](https://docs.stripe.com/connect/supported-embedded-components/reporting-chart/) embedded component. + """ + tax_registrations: NotRequired[ + "AccountSessionCreateParamsComponentsTaxRegistrations" + ] + """ + Configuration for the [tax registrations](https://docs.stripe.com/connect/supported-embedded-components/tax-registrations/) embedded component. + """ + tax_settings: NotRequired[ + "AccountSessionCreateParamsComponentsTaxSettings" + ] + """ + Configuration for the [tax settings](https://docs.stripe.com/connect/supported-embedded-components/tax-settings/) embedded component. + """ + tax_threshold_monitoring: NotRequired[ + "AccountSessionCreateParamsComponentsTaxThresholdMonitoring" + ] + """ + Configuration for the [tax threshold monitoring](https://docs.stripe.com/connect/supported-embedded-components/tax-threshold-monitoring/) embedded component. + """ + + +class AccountSessionCreateParamsComponentsAccountManagement(TypedDict): + enabled: bool + """ + Whether the embedded component is enabled. + """ + features: NotRequired[ + "AccountSessionCreateParamsComponentsAccountManagementFeatures" + ] + """ + The list of features enabled in the embedded component. + """ + + +class AccountSessionCreateParamsComponentsAccountManagementFeatures(TypedDict): + disable_stripe_user_authentication: NotRequired[bool] + """ + Whether Stripe user authentication is disabled. This value can only be `true` for accounts where `controller.requirement_collection` is `application` for the account. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to `true` and `disable_stripe_user_authentication` defaults to `false`. + """ + external_account_collection: NotRequired[bool] + """ + Whether external account collection is enabled. This feature can only be `false` for accounts where you're responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `true`. + """ + + +class AccountSessionCreateParamsComponentsAccountOnboarding(TypedDict): + enabled: bool + """ + Whether the embedded component is enabled. + """ + features: NotRequired[ + "AccountSessionCreateParamsComponentsAccountOnboardingFeatures" + ] + """ + The list of features enabled in the embedded component. + """ + + +class AccountSessionCreateParamsComponentsAccountOnboardingFeatures(TypedDict): + disable_stripe_user_authentication: NotRequired[bool] + """ + Whether Stripe user authentication is disabled. This value can only be `true` for accounts where `controller.requirement_collection` is `application` for the account. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to `true` and `disable_stripe_user_authentication` defaults to `false`. + """ + external_account_collection: NotRequired[bool] + """ + Whether external account collection is enabled. This feature can only be `false` for accounts where you're responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `true`. + """ + + +class AccountSessionCreateParamsComponentsAppInstall(TypedDict): + enabled: bool + """ + Whether the embedded component is enabled. + """ + features: NotRequired[ + "AccountSessionCreateParamsComponentsAppInstallFeatures" + ] + """ + The list of features enabled in the embedded component. + """ + + +class AccountSessionCreateParamsComponentsAppInstallFeatures(TypedDict): + allowed_apps: NotRequired["Literal['']|List[str]"] + """ + The list of apps allowed to be enabled in the embedded component. + """ + + +class AccountSessionCreateParamsComponentsAppViewport(TypedDict): + enabled: bool + """ + Whether the embedded component is enabled. + """ + features: NotRequired[ + "AccountSessionCreateParamsComponentsAppViewportFeatures" + ] + """ + The list of features enabled in the embedded component. + """ + + +class AccountSessionCreateParamsComponentsAppViewportFeatures(TypedDict): + allowed_apps: NotRequired["Literal['']|List[str]"] + """ + The list of apps allowed to be enabled in the embedded component. + """ + + +class AccountSessionCreateParamsComponentsBalanceReport(TypedDict): + enabled: bool + """ + Whether the embedded component is enabled. + """ + features: NotRequired[ + "AccountSessionCreateParamsComponentsBalanceReportFeatures" + ] + """ + An empty list, because this embedded component has no features. + """ + + +class AccountSessionCreateParamsComponentsBalanceReportFeatures(TypedDict): + pass + + +class AccountSessionCreateParamsComponentsBalances(TypedDict): + enabled: bool + """ + Whether the embedded component is enabled. + """ + features: NotRequired[ + "AccountSessionCreateParamsComponentsBalancesFeatures" + ] + """ + The list of features enabled in the embedded component. + """ + + +class AccountSessionCreateParamsComponentsBalancesFeatures(TypedDict): + disable_stripe_user_authentication: NotRequired[bool] + """ + Whether Stripe user authentication is disabled. This value can only be `true` for accounts where `controller.requirement_collection` is `application` for the account. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to `true` and `disable_stripe_user_authentication` defaults to `false`. + """ + edit_payout_schedule: NotRequired[bool] + """ + Whether to allow payout schedule to be changed. Defaults to `true` when `controller.losses.payments` is set to `stripe` for the account, otherwise `false`. + """ + external_account_collection: NotRequired[bool] + """ + Whether external account collection is enabled. This feature can only be `false` for accounts where you're responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `true`. + """ + instant_payouts: NotRequired[bool] + """ + Whether to allow creation of instant payouts. Defaults to `true` when `controller.losses.payments` is set to `stripe` for the account, otherwise `false`. + """ + standard_payouts: NotRequired[bool] + """ + Whether to allow creation of standard payouts. Defaults to `true` when `controller.losses.payments` is set to `stripe` for the account, otherwise `false`. + """ + + +class AccountSessionCreateParamsComponentsCapitalFinancing(TypedDict): + enabled: bool + """ + Whether the embedded component is enabled. + """ + features: NotRequired[ + "AccountSessionCreateParamsComponentsCapitalFinancingFeatures" + ] + """ + An empty list, because this embedded component has no features. + """ + + +class AccountSessionCreateParamsComponentsCapitalFinancingFeatures(TypedDict): + pass + + +class AccountSessionCreateParamsComponentsCapitalFinancingApplication( + TypedDict, +): + enabled: bool + """ + Whether the embedded component is enabled. + """ + features: NotRequired[ + "AccountSessionCreateParamsComponentsCapitalFinancingApplicationFeatures" + ] + """ + An empty list, because this embedded component has no features. + """ + + +class AccountSessionCreateParamsComponentsCapitalFinancingApplicationFeatures( + TypedDict, +): + pass + + +class AccountSessionCreateParamsComponentsCapitalFinancingPromotion(TypedDict): + enabled: bool + """ + Whether the embedded component is enabled. + """ + features: NotRequired[ + "AccountSessionCreateParamsComponentsCapitalFinancingPromotionFeatures" + ] + """ + An empty list, because this embedded component has no features. + """ + + +class AccountSessionCreateParamsComponentsCapitalFinancingPromotionFeatures( + TypedDict, +): + pass + + +class AccountSessionCreateParamsComponentsCapitalOverview(TypedDict): + enabled: bool + """ + Whether the embedded component is enabled. + """ + features: NotRequired[ + "AccountSessionCreateParamsComponentsCapitalOverviewFeatures" + ] + """ + An empty list, because this embedded component has no features. + """ + + +class AccountSessionCreateParamsComponentsCapitalOverviewFeatures(TypedDict): + pass + + +class AccountSessionCreateParamsComponentsDisputesList(TypedDict): + enabled: bool + """ + Whether the embedded component is enabled. + """ + features: NotRequired[ + "AccountSessionCreateParamsComponentsDisputesListFeatures" + ] + """ + The list of features enabled in the embedded component. + """ + + +class AccountSessionCreateParamsComponentsDisputesListFeatures(TypedDict): + capture_payments: NotRequired[bool] + """ + Whether to allow capturing and cancelling payment intents. This is `true` by default. + """ + destination_on_behalf_of_charge_management: NotRequired[bool] + """ + Whether connected accounts can manage destination charges that are created on behalf of them. This is `false` by default. + """ + dispute_management: NotRequired[bool] + """ + Whether responding to disputes is enabled, including submitting evidence and accepting disputes. This is `true` by default. + """ + refund_management: NotRequired[bool] + """ + Whether sending refunds is enabled. This is `true` by default. + """ + + +class AccountSessionCreateParamsComponentsDocuments(TypedDict): + enabled: bool + """ + Whether the embedded component is enabled. + """ + features: NotRequired[ + "AccountSessionCreateParamsComponentsDocumentsFeatures" + ] + """ + An empty list, because this embedded component has no features. + """ + + +class AccountSessionCreateParamsComponentsDocumentsFeatures(TypedDict): + pass + + +class AccountSessionCreateParamsComponentsExportTaxTransactions(TypedDict): + enabled: bool + """ + Whether the embedded component is enabled. + """ + features: NotRequired[ + "AccountSessionCreateParamsComponentsExportTaxTransactionsFeatures" + ] + """ + An empty list, because this embedded component has no features. + """ + + +class AccountSessionCreateParamsComponentsExportTaxTransactionsFeatures( + TypedDict, +): + pass + + +class AccountSessionCreateParamsComponentsFinancialAccount(TypedDict): + enabled: bool + """ + Whether the embedded component is enabled. + """ + features: NotRequired[ + "AccountSessionCreateParamsComponentsFinancialAccountFeatures" + ] + """ + The list of features enabled in the embedded component. + """ + + +class AccountSessionCreateParamsComponentsFinancialAccountFeatures(TypedDict): + disable_stripe_user_authentication: NotRequired[bool] + """ + Whether Stripe user authentication is disabled. This value can only be `true` for accounts where `controller.requirement_collection` is `application` for the account. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to `true` and `disable_stripe_user_authentication` defaults to `false`. + """ + external_account_collection: NotRequired[bool] + """ + Whether external account collection is enabled. This feature can only be `false` for accounts where you're responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `true`. + """ + send_money: NotRequired[bool] + """ + Whether to allow sending money. + """ + transfer_balance: NotRequired[bool] + """ + Whether to allow transferring balance. + """ + + +class AccountSessionCreateParamsComponentsFinancialAccountTransactions( + TypedDict, +): + enabled: bool + """ + Whether the embedded component is enabled. + """ + features: NotRequired[ + "AccountSessionCreateParamsComponentsFinancialAccountTransactionsFeatures" + ] + """ + The list of features enabled in the embedded component. + """ + + +class AccountSessionCreateParamsComponentsFinancialAccountTransactionsFeatures( + TypedDict, +): + card_spend_dispute_management: NotRequired[bool] + """ + Whether to allow card spend dispute management features. + """ + + +class AccountSessionCreateParamsComponentsInstantPayoutsPromotion(TypedDict): + enabled: bool + """ + Whether the embedded component is enabled. + """ + features: NotRequired[ + "AccountSessionCreateParamsComponentsInstantPayoutsPromotionFeatures" + ] + """ + The list of features enabled in the embedded component. + """ + + +class AccountSessionCreateParamsComponentsInstantPayoutsPromotionFeatures( + TypedDict, +): + disable_stripe_user_authentication: NotRequired[bool] + """ + Whether Stripe user authentication is disabled. This value can only be `true` for accounts where `controller.requirement_collection` is `application` for the account. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to `true` and `disable_stripe_user_authentication` defaults to `false`. + """ + external_account_collection: NotRequired[bool] + """ + Whether external account collection is enabled. This feature can only be `false` for accounts where you're responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `true`. + """ + instant_payouts: NotRequired[bool] + """ + Whether to allow creation of instant payouts. Defaults to `true` when `controller.losses.payments` is set to `stripe` for the account, otherwise `false`. + """ + + +class AccountSessionCreateParamsComponentsIssuingCard(TypedDict): + enabled: bool + """ + Whether the embedded component is enabled. + """ + features: NotRequired[ + "AccountSessionCreateParamsComponentsIssuingCardFeatures" + ] + """ + The list of features enabled in the embedded component. + """ + + +class AccountSessionCreateParamsComponentsIssuingCardFeatures(TypedDict): + card_management: NotRequired[bool] + """ + Whether to allow card management features. + """ + card_spend_dispute_management: NotRequired[bool] + """ + Whether to allow card spend dispute management features. + """ + cardholder_management: NotRequired[bool] + """ + Whether to allow cardholder management features. + """ + spend_control_management: NotRequired[bool] + """ + Whether to allow spend control management features. + """ + + +class AccountSessionCreateParamsComponentsIssuingCardsList(TypedDict): + enabled: bool + """ + Whether the embedded component is enabled. + """ + features: NotRequired[ + "AccountSessionCreateParamsComponentsIssuingCardsListFeatures" + ] + """ + The list of features enabled in the embedded component. + """ + + +class AccountSessionCreateParamsComponentsIssuingCardsListFeatures(TypedDict): + card_management: NotRequired[bool] + """ + Whether to allow card management features. + """ + card_spend_dispute_management: NotRequired[bool] + """ + Whether to allow card spend dispute management features. + """ + cardholder_management: NotRequired[bool] + """ + Whether to allow cardholder management features. + """ + disable_stripe_user_authentication: NotRequired[bool] + """ + Whether Stripe user authentication is disabled. This value can only be `true` for accounts where `controller.requirement_collection` is `application` for the account. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to `true` and `disable_stripe_user_authentication` defaults to `false`. + """ + spend_control_management: NotRequired[bool] + """ + Whether to allow spend control management features. + """ + + +class AccountSessionCreateParamsComponentsNotificationBanner(TypedDict): + enabled: bool + """ + Whether the embedded component is enabled. + """ + features: NotRequired[ + "AccountSessionCreateParamsComponentsNotificationBannerFeatures" + ] + """ + The list of features enabled in the embedded component. + """ + + +class AccountSessionCreateParamsComponentsNotificationBannerFeatures( + TypedDict +): + disable_stripe_user_authentication: NotRequired[bool] + """ + Whether Stripe user authentication is disabled. This value can only be `true` for accounts where `controller.requirement_collection` is `application` for the account. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to `true` and `disable_stripe_user_authentication` defaults to `false`. + """ + external_account_collection: NotRequired[bool] + """ + Whether external account collection is enabled. This feature can only be `false` for accounts where you're responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `true`. + """ + + +class AccountSessionCreateParamsComponentsPaymentDetails(TypedDict): + enabled: bool + """ + Whether the embedded component is enabled. + """ + features: NotRequired[ + "AccountSessionCreateParamsComponentsPaymentDetailsFeatures" + ] + """ + The list of features enabled in the embedded component. + """ + + +class AccountSessionCreateParamsComponentsPaymentDetailsFeatures(TypedDict): + capture_payments: NotRequired[bool] + """ + Whether to allow capturing and cancelling payment intents. This is `true` by default. + """ + destination_on_behalf_of_charge_management: NotRequired[bool] + """ + Whether connected accounts can manage destination charges that are created on behalf of them. This is `false` by default. + """ + dispute_management: NotRequired[bool] + """ + Whether responding to disputes is enabled, including submitting evidence and accepting disputes. This is `true` by default. + """ + refund_management: NotRequired[bool] + """ + Whether sending refunds is enabled. This is `true` by default. + """ + + +class AccountSessionCreateParamsComponentsPaymentDisputes(TypedDict): + enabled: bool + """ + Whether the embedded component is enabled. + """ + features: NotRequired[ + "AccountSessionCreateParamsComponentsPaymentDisputesFeatures" + ] + """ + The list of features enabled in the embedded component. + """ + + +class AccountSessionCreateParamsComponentsPaymentDisputesFeatures(TypedDict): + destination_on_behalf_of_charge_management: NotRequired[bool] + """ + Whether connected accounts can manage destination charges that are created on behalf of them. This is `false` by default. + """ + dispute_management: NotRequired[bool] + """ + Whether responding to disputes is enabled, including submitting evidence and accepting disputes. This is `true` by default. + """ + refund_management: NotRequired[bool] + """ + Whether sending refunds is enabled. This is `true` by default. + """ + + +class AccountSessionCreateParamsComponentsPaymentMethodSettings(TypedDict): + enabled: bool + """ + Whether the embedded component is enabled. + """ + features: NotRequired[ + "AccountSessionCreateParamsComponentsPaymentMethodSettingsFeatures" + ] + """ + An empty list, because this embedded component has no features. + """ + + +class AccountSessionCreateParamsComponentsPaymentMethodSettingsFeatures( + TypedDict, +): + pass + + +class AccountSessionCreateParamsComponentsPayments(TypedDict): + enabled: bool + """ + Whether the embedded component is enabled. + """ + features: NotRequired[ + "AccountSessionCreateParamsComponentsPaymentsFeatures" + ] + """ + The list of features enabled in the embedded component. + """ + + +class AccountSessionCreateParamsComponentsPaymentsFeatures(TypedDict): + capture_payments: NotRequired[bool] + """ + Whether to allow capturing and cancelling payment intents. This is `true` by default. + """ + destination_on_behalf_of_charge_management: NotRequired[bool] + """ + Whether connected accounts can manage destination charges that are created on behalf of them. This is `false` by default. + """ + dispute_management: NotRequired[bool] + """ + Whether responding to disputes is enabled, including submitting evidence and accepting disputes. This is `true` by default. + """ + refund_management: NotRequired[bool] + """ + Whether sending refunds is enabled. This is `true` by default. + """ + + +class AccountSessionCreateParamsComponentsPayoutDetails(TypedDict): + enabled: bool + """ + Whether the embedded component is enabled. + """ + features: NotRequired[ + "AccountSessionCreateParamsComponentsPayoutDetailsFeatures" + ] + """ + An empty list, because this embedded component has no features. + """ + + +class AccountSessionCreateParamsComponentsPayoutDetailsFeatures(TypedDict): + pass + + +class AccountSessionCreateParamsComponentsPayoutReconciliationReport( + TypedDict +): + enabled: bool + """ + Whether the embedded component is enabled. + """ + features: NotRequired[ + "AccountSessionCreateParamsComponentsPayoutReconciliationReportFeatures" + ] + """ + An empty list, because this embedded component has no features. + """ + + +class AccountSessionCreateParamsComponentsPayoutReconciliationReportFeatures( + TypedDict, +): + pass + + +class AccountSessionCreateParamsComponentsPayouts(TypedDict): + enabled: bool + """ + Whether the embedded component is enabled. + """ + features: NotRequired[ + "AccountSessionCreateParamsComponentsPayoutsFeatures" + ] + """ + The list of features enabled in the embedded component. + """ + + +class AccountSessionCreateParamsComponentsPayoutsFeatures(TypedDict): + disable_stripe_user_authentication: NotRequired[bool] + """ + Whether Stripe user authentication is disabled. This value can only be `true` for accounts where `controller.requirement_collection` is `application` for the account. The default value is the opposite of the `external_account_collection` value. For example, if you don't set `external_account_collection`, it defaults to `true` and `disable_stripe_user_authentication` defaults to `false`. + """ + edit_payout_schedule: NotRequired[bool] + """ + Whether to allow payout schedule to be changed. Defaults to `true` when `controller.losses.payments` is set to `stripe` for the account, otherwise `false`. + """ + external_account_collection: NotRequired[bool] + """ + Whether external account collection is enabled. This feature can only be `false` for accounts where you're responsible for collecting updated information when requirements are due or change, like Custom accounts. The default value for this feature is `true`. + """ + instant_payouts: NotRequired[bool] + """ + Whether to allow creation of instant payouts. Defaults to `true` when `controller.losses.payments` is set to `stripe` for the account, otherwise `false`. + """ + standard_payouts: NotRequired[bool] + """ + Whether to allow creation of standard payouts. Defaults to `true` when `controller.losses.payments` is set to `stripe` for the account, otherwise `false`. + """ + + +class AccountSessionCreateParamsComponentsPayoutsList(TypedDict): + enabled: bool + """ + Whether the embedded component is enabled. + """ + features: NotRequired[ + "AccountSessionCreateParamsComponentsPayoutsListFeatures" + ] + """ + An empty list, because this embedded component has no features. + """ + + +class AccountSessionCreateParamsComponentsPayoutsListFeatures(TypedDict): + pass + + +class AccountSessionCreateParamsComponentsProductTaxCodeSelector(TypedDict): + enabled: bool + """ + Whether the embedded component is enabled. + """ + features: NotRequired[ + "AccountSessionCreateParamsComponentsProductTaxCodeSelectorFeatures" + ] + """ + An empty list, because this embedded component has no features. + """ + + +class AccountSessionCreateParamsComponentsProductTaxCodeSelectorFeatures( + TypedDict, +): + pass + + +class AccountSessionCreateParamsComponentsRecipients(TypedDict): + enabled: bool + """ + Whether the embedded component is enabled. + """ + features: NotRequired[ + "AccountSessionCreateParamsComponentsRecipientsFeatures" + ] + + +class AccountSessionCreateParamsComponentsRecipientsFeatures(TypedDict): + send_money: NotRequired[bool] + """ + Whether to allow sending money. + """ + + +class AccountSessionCreateParamsComponentsReportingChart(TypedDict): + enabled: bool + """ + Whether the embedded component is enabled. + """ + features: NotRequired[ + "AccountSessionCreateParamsComponentsReportingChartFeatures" + ] + """ + An empty list, because this embedded component has no features. + """ + + +class AccountSessionCreateParamsComponentsReportingChartFeatures(TypedDict): + pass + + +class AccountSessionCreateParamsComponentsTaxRegistrations(TypedDict): + enabled: bool + """ + Whether the embedded component is enabled. + """ + features: NotRequired[ + "AccountSessionCreateParamsComponentsTaxRegistrationsFeatures" + ] + """ + An empty list, because this embedded component has no features. + """ + + +class AccountSessionCreateParamsComponentsTaxRegistrationsFeatures(TypedDict): + pass + + +class AccountSessionCreateParamsComponentsTaxSettings(TypedDict): + enabled: bool + """ + Whether the embedded component is enabled. + """ + features: NotRequired[ + "AccountSessionCreateParamsComponentsTaxSettingsFeatures" + ] + """ + An empty list, because this embedded component has no features. + """ + + +class AccountSessionCreateParamsComponentsTaxSettingsFeatures(TypedDict): + pass + + +class AccountSessionCreateParamsComponentsTaxThresholdMonitoring(TypedDict): + enabled: bool + """ + Whether the embedded component is enabled. + """ + features: NotRequired[ + "AccountSessionCreateParamsComponentsTaxThresholdMonitoringFeatures" + ] + """ + An empty list, because this embedded component has no features. + """ + + +class AccountSessionCreateParamsComponentsTaxThresholdMonitoringFeatures( + TypedDict, +): + pass diff --git a/stripe/params/_account_update_params.py b/stripe/params/_account_update_params.py new file mode 100644 index 000000000..269cef2e9 --- /dev/null +++ b/stripe/params/_account_update_params.py @@ -0,0 +1,2155 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class AccountUpdateParams(TypedDict): + account_token: NotRequired[str] + """ + An [account token](https://stripe.com/docs/api#create_account_token), used to securely provide details to the account. + """ + business_profile: NotRequired["AccountUpdateParamsBusinessProfile"] + """ + Business information about the account. + """ + business_type: NotRequired[ + Literal["company", "government_entity", "individual", "non_profit"] + ] + """ + The business type. Once you create an [Account Link](https://docs.stripe.com/api/account_links) or [Account Session](https://docs.stripe.com/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](https://docs.stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. + """ + capabilities: NotRequired["AccountUpdateParamsCapabilities"] + """ + Each key of the dictionary represents a capability, and each capability + maps to its settings (for example, whether it has been requested or not). Each + capability is inactive until you have provided its specific + requirements and Stripe has verified them. An account might have some + of its requested capabilities be active and some be inactive. + + Required when [account.controller.stripe_dashboard.type](https://docs.stripe.com/api/accounts/create#create_account-controller-dashboard-type) + is `none`, which includes Custom accounts. + """ + company: NotRequired["AccountUpdateParamsCompany"] + """ + Information about the company or business. This field is available for any `business_type`. Once you create an [Account Link](https://docs.stripe.com/api/account_links) or [Account Session](https://docs.stripe.com/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](https://docs.stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. + """ + default_currency: NotRequired[str] + """ + Three-letter ISO currency code representing the default currency for the account. This must be a currency that [Stripe supports in the account's country](https://docs.stripe.com/payouts). + """ + documents: NotRequired["AccountUpdateParamsDocuments"] + """ + Documents that may be submitted to satisfy various informational requests. + """ + email: NotRequired[str] + """ + The email address of the account holder. This is only to make the account easier to identify to you. If [controller.requirement_collection](https://docs.stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts, Stripe doesn't email the account without your consent. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + external_account: NotRequired[ + "Literal['']|str|AccountUpdateParamsBankAccount|AccountUpdateParamsCard|AccountUpdateParamsCardToken" + ] + """ + A card or bank account to attach to the account for receiving [payouts](https://docs.stripe.com/connect/bank-debit-card-payouts) (you won't be able to use it for top-ups). You can provide either a token, like the ones returned by [Stripe.js](https://docs.stripe.com/js), or a dictionary, as documented in the `external_account` parameter for [bank account](https://docs.stripe.com/api#account_create_bank_account) creation. + + By default, providing an external account sets it as the new default external account for its currency, and deletes the old default if one exists. To add additional external accounts without replacing the existing default for the currency, use the [bank account](https://docs.stripe.com/api#account_create_bank_account) or [card creation](https://docs.stripe.com/api#account_create_card) APIs. After you create an [Account Link](https://docs.stripe.com/api/account_links) or [Account Session](https://docs.stripe.com/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](https://docs.stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. + """ + groups: NotRequired["AccountUpdateParamsGroups"] + """ + A hash of account group type to tokens. These are account groups this account should be added to. + """ + individual: NotRequired["AccountUpdateParamsIndividual"] + """ + Information about the person represented by the account. This field is null unless `business_type` is set to `individual`. Once you create an [Account Link](https://docs.stripe.com/api/account_links) or [Account Session](https://docs.stripe.com/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](https://docs.stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + risk_controls: NotRequired["AccountUpdateParamsRiskControls"] + """ + A hash to configure risk controls on the account. Please see [this page for more details](https://docs.stripe.com/connect/pausing-payments-or-payouts-on-connected-accounts). + """ + settings: NotRequired["AccountUpdateParamsSettings"] + """ + Options for customizing how the account functions within Stripe. + """ + tos_acceptance: NotRequired["AccountUpdateParamsTosAcceptance"] + """ + Details on the account's acceptance of the [Stripe Services Agreement](https://docs.stripe.com/connect/updating-accounts#tos-acceptance). This property can only be updated for accounts where [controller.requirement_collection](https://docs.stripe.com/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. This property defaults to a `full` service agreement when empty. + """ + + +class AccountUpdateParamsBusinessProfile(TypedDict): + annual_revenue: NotRequired[ + "AccountUpdateParamsBusinessProfileAnnualRevenue" + ] + """ + The applicant's gross annual revenue for its preceding fiscal year. + """ + estimated_worker_count: NotRequired[int] + """ + An estimated upper bound of employees, contractors, vendors, etc. currently working for the business. + """ + mcc: NotRequired[str] + """ + [The merchant category code for the account](https://docs.stripe.com/connect/setting-mcc). MCCs are used to classify businesses based on the goods or services they provide. + """ + minority_owned_business_designation: NotRequired[ + List[ + Literal[ + "lgbtqi_owned_business", + "minority_owned_business", + "none_of_these_apply", + "prefer_not_to_answer", + "women_owned_business", + ] + ] + ] + """ + Whether the business is a minority-owned, women-owned, and/or LGBTQI+ -owned business. + """ + monthly_estimated_revenue: NotRequired[ + "AccountUpdateParamsBusinessProfileMonthlyEstimatedRevenue" + ] + """ + An estimate of the monthly revenue of the business. Only accepted for accounts in Brazil and India. + """ + name: NotRequired[str] + """ + The customer-facing business name. + """ + product_description: NotRequired[str] + """ + Internal-only description of the product sold by, or service provided by, the business. Used by Stripe for risk and underwriting purposes. + """ + support_address: NotRequired[ + "AccountUpdateParamsBusinessProfileSupportAddress" + ] + """ + A publicly available mailing address for sending support issues to. + """ + support_email: NotRequired[str] + """ + A publicly available email address for sending support issues to. + """ + support_phone: NotRequired[str] + """ + A publicly available phone number to call with support issues. + """ + support_url: NotRequired["Literal['']|str"] + """ + A publicly available website for handling support issues. + """ + url: NotRequired[str] + """ + The business's publicly available website. + """ + + +class AccountUpdateParamsBusinessProfileAnnualRevenue(TypedDict): + amount: int + """ + A non-negative integer representing the amount in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal). + """ + 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). + """ + fiscal_year_end: str + """ + The close-out date of the preceding fiscal year in ISO 8601 format. E.g. 2023-12-31 for the 31st of December, 2023. + """ + + +class AccountUpdateParamsBusinessProfileMonthlyEstimatedRevenue(TypedDict): + amount: int + """ + A non-negative integer representing how much to charge in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal). + """ + 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). + """ + + +class AccountUpdateParamsBusinessProfileSupportAddress(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. + """ + + +class AccountUpdateParamsCapabilities(TypedDict): + acss_debit_payments: NotRequired[ + "AccountUpdateParamsCapabilitiesAcssDebitPayments" + ] + """ + The acss_debit_payments capability. + """ + affirm_payments: NotRequired[ + "AccountUpdateParamsCapabilitiesAffirmPayments" + ] + """ + The affirm_payments capability. + """ + afterpay_clearpay_payments: NotRequired[ + "AccountUpdateParamsCapabilitiesAfterpayClearpayPayments" + ] + """ + The afterpay_clearpay_payments capability. + """ + alma_payments: NotRequired["AccountUpdateParamsCapabilitiesAlmaPayments"] + """ + The alma_payments capability. + """ + amazon_pay_payments: NotRequired[ + "AccountUpdateParamsCapabilitiesAmazonPayPayments" + ] + """ + The amazon_pay_payments capability. + """ + au_becs_debit_payments: NotRequired[ + "AccountUpdateParamsCapabilitiesAuBecsDebitPayments" + ] + """ + The au_becs_debit_payments capability. + """ + automatic_indirect_tax: NotRequired[ + "AccountUpdateParamsCapabilitiesAutomaticIndirectTax" + ] + """ + The automatic_indirect_tax capability. + """ + bacs_debit_payments: NotRequired[ + "AccountUpdateParamsCapabilitiesBacsDebitPayments" + ] + """ + The bacs_debit_payments capability. + """ + bancontact_payments: NotRequired[ + "AccountUpdateParamsCapabilitiesBancontactPayments" + ] + """ + The bancontact_payments capability. + """ + bank_transfer_payments: NotRequired[ + "AccountUpdateParamsCapabilitiesBankTransferPayments" + ] + """ + The bank_transfer_payments capability. + """ + billie_payments: NotRequired[ + "AccountUpdateParamsCapabilitiesBilliePayments" + ] + """ + The billie_payments capability. + """ + blik_payments: NotRequired["AccountUpdateParamsCapabilitiesBlikPayments"] + """ + The blik_payments capability. + """ + boleto_payments: NotRequired[ + "AccountUpdateParamsCapabilitiesBoletoPayments" + ] + """ + The boleto_payments capability. + """ + card_issuing: NotRequired["AccountUpdateParamsCapabilitiesCardIssuing"] + """ + The card_issuing capability. + """ + card_payments: NotRequired["AccountUpdateParamsCapabilitiesCardPayments"] + """ + The card_payments capability. + """ + cartes_bancaires_payments: NotRequired[ + "AccountUpdateParamsCapabilitiesCartesBancairesPayments" + ] + """ + The cartes_bancaires_payments capability. + """ + cashapp_payments: NotRequired[ + "AccountUpdateParamsCapabilitiesCashappPayments" + ] + """ + The cashapp_payments capability. + """ + crypto_payments: NotRequired[ + "AccountUpdateParamsCapabilitiesCryptoPayments" + ] + """ + The crypto_payments capability. + """ + eps_payments: NotRequired["AccountUpdateParamsCapabilitiesEpsPayments"] + """ + The eps_payments capability. + """ + fpx_payments: NotRequired["AccountUpdateParamsCapabilitiesFpxPayments"] + """ + The fpx_payments capability. + """ + gb_bank_transfer_payments: NotRequired[ + "AccountUpdateParamsCapabilitiesGbBankTransferPayments" + ] + """ + The gb_bank_transfer_payments capability. + """ + giropay_payments: NotRequired[ + "AccountUpdateParamsCapabilitiesGiropayPayments" + ] + """ + The giropay_payments capability. + """ + gopay_payments: NotRequired["AccountUpdateParamsCapabilitiesGopayPayments"] + """ + The gopay_payments capability. + """ + grabpay_payments: NotRequired[ + "AccountUpdateParamsCapabilitiesGrabpayPayments" + ] + """ + The grabpay_payments capability. + """ + id_bank_transfer_payments: NotRequired[ + "AccountUpdateParamsCapabilitiesIdBankTransferPayments" + ] + """ + The id_bank_transfer_payments capability. + """ + id_bank_transfer_payments_bca: NotRequired[ + "AccountUpdateParamsCapabilitiesIdBankTransferPaymentsBca" + ] + """ + The id_bank_transfer_payments_bca capability. + """ + ideal_payments: NotRequired["AccountUpdateParamsCapabilitiesIdealPayments"] + """ + The ideal_payments capability. + """ + india_international_payments: NotRequired[ + "AccountUpdateParamsCapabilitiesIndiaInternationalPayments" + ] + """ + The india_international_payments capability. + """ + jcb_payments: NotRequired["AccountUpdateParamsCapabilitiesJcbPayments"] + """ + The jcb_payments capability. + """ + jp_bank_transfer_payments: NotRequired[ + "AccountUpdateParamsCapabilitiesJpBankTransferPayments" + ] + """ + The jp_bank_transfer_payments capability. + """ + kakao_pay_payments: NotRequired[ + "AccountUpdateParamsCapabilitiesKakaoPayPayments" + ] + """ + The kakao_pay_payments capability. + """ + klarna_payments: NotRequired[ + "AccountUpdateParamsCapabilitiesKlarnaPayments" + ] + """ + The klarna_payments capability. + """ + konbini_payments: NotRequired[ + "AccountUpdateParamsCapabilitiesKonbiniPayments" + ] + """ + The konbini_payments capability. + """ + kr_card_payments: NotRequired[ + "AccountUpdateParamsCapabilitiesKrCardPayments" + ] + """ + The kr_card_payments capability. + """ + legacy_payments: NotRequired[ + "AccountUpdateParamsCapabilitiesLegacyPayments" + ] + """ + The legacy_payments capability. + """ + link_payments: NotRequired["AccountUpdateParamsCapabilitiesLinkPayments"] + """ + The link_payments capability. + """ + mb_way_payments: NotRequired[ + "AccountUpdateParamsCapabilitiesMbWayPayments" + ] + """ + The mb_way_payments capability. + """ + mobilepay_payments: NotRequired[ + "AccountUpdateParamsCapabilitiesMobilepayPayments" + ] + """ + The mobilepay_payments capability. + """ + multibanco_payments: NotRequired[ + "AccountUpdateParamsCapabilitiesMultibancoPayments" + ] + """ + The multibanco_payments capability. + """ + mx_bank_transfer_payments: NotRequired[ + "AccountUpdateParamsCapabilitiesMxBankTransferPayments" + ] + """ + The mx_bank_transfer_payments capability. + """ + naver_pay_payments: NotRequired[ + "AccountUpdateParamsCapabilitiesNaverPayPayments" + ] + """ + The naver_pay_payments capability. + """ + nz_bank_account_becs_debit_payments: NotRequired[ + "AccountUpdateParamsCapabilitiesNzBankAccountBecsDebitPayments" + ] + """ + The nz_bank_account_becs_debit_payments capability. + """ + oxxo_payments: NotRequired["AccountUpdateParamsCapabilitiesOxxoPayments"] + """ + The oxxo_payments capability. + """ + p24_payments: NotRequired["AccountUpdateParamsCapabilitiesP24Payments"] + """ + The p24_payments capability. + """ + pay_by_bank_payments: NotRequired[ + "AccountUpdateParamsCapabilitiesPayByBankPayments" + ] + """ + The pay_by_bank_payments capability. + """ + payco_payments: NotRequired["AccountUpdateParamsCapabilitiesPaycoPayments"] + """ + The payco_payments capability. + """ + paynow_payments: NotRequired[ + "AccountUpdateParamsCapabilitiesPaynowPayments" + ] + """ + The paynow_payments capability. + """ + paypal_payments: NotRequired[ + "AccountUpdateParamsCapabilitiesPaypalPayments" + ] + """ + The paypal_payments capability. + """ + paypay_payments: NotRequired[ + "AccountUpdateParamsCapabilitiesPaypayPayments" + ] + """ + The paypay_payments capability. + """ + payto_payments: NotRequired["AccountUpdateParamsCapabilitiesPaytoPayments"] + """ + The payto_payments capability. + """ + pix_payments: NotRequired["AccountUpdateParamsCapabilitiesPixPayments"] + """ + The pix_payments capability. + """ + promptpay_payments: NotRequired[ + "AccountUpdateParamsCapabilitiesPromptpayPayments" + ] + """ + The promptpay_payments capability. + """ + qris_payments: NotRequired["AccountUpdateParamsCapabilitiesQrisPayments"] + """ + The qris_payments capability. + """ + rechnung_payments: NotRequired[ + "AccountUpdateParamsCapabilitiesRechnungPayments" + ] + """ + The rechnung_payments capability. + """ + revolut_pay_payments: NotRequired[ + "AccountUpdateParamsCapabilitiesRevolutPayPayments" + ] + """ + The revolut_pay_payments capability. + """ + samsung_pay_payments: NotRequired[ + "AccountUpdateParamsCapabilitiesSamsungPayPayments" + ] + """ + The samsung_pay_payments capability. + """ + satispay_payments: NotRequired[ + "AccountUpdateParamsCapabilitiesSatispayPayments" + ] + """ + The satispay_payments capability. + """ + sepa_bank_transfer_payments: NotRequired[ + "AccountUpdateParamsCapabilitiesSepaBankTransferPayments" + ] + """ + The sepa_bank_transfer_payments capability. + """ + sepa_debit_payments: NotRequired[ + "AccountUpdateParamsCapabilitiesSepaDebitPayments" + ] + """ + The sepa_debit_payments capability. + """ + shopeepay_payments: NotRequired[ + "AccountUpdateParamsCapabilitiesShopeepayPayments" + ] + """ + The shopeepay_payments capability. + """ + sofort_payments: NotRequired[ + "AccountUpdateParamsCapabilitiesSofortPayments" + ] + """ + The sofort_payments capability. + """ + stripe_balance_payments: NotRequired[ + "AccountUpdateParamsCapabilitiesStripeBalancePayments" + ] + """ + The stripe_balance_payments capability. + """ + swish_payments: NotRequired["AccountUpdateParamsCapabilitiesSwishPayments"] + """ + The swish_payments capability. + """ + tax_reporting_us_1099_k: NotRequired[ + "AccountUpdateParamsCapabilitiesTaxReportingUs1099K" + ] + """ + The tax_reporting_us_1099_k capability. + """ + tax_reporting_us_1099_misc: NotRequired[ + "AccountUpdateParamsCapabilitiesTaxReportingUs1099Misc" + ] + """ + The tax_reporting_us_1099_misc capability. + """ + transfers: NotRequired["AccountUpdateParamsCapabilitiesTransfers"] + """ + The transfers capability. + """ + treasury: NotRequired["AccountUpdateParamsCapabilitiesTreasury"] + """ + The treasury capability. + """ + treasury_evolve: NotRequired[ + "AccountUpdateParamsCapabilitiesTreasuryEvolve" + ] + """ + The treasury_evolve capability. + """ + treasury_fifth_third: NotRequired[ + "AccountUpdateParamsCapabilitiesTreasuryFifthThird" + ] + """ + The treasury_fifth_third capability. + """ + treasury_goldman_sachs: NotRequired[ + "AccountUpdateParamsCapabilitiesTreasuryGoldmanSachs" + ] + """ + The treasury_goldman_sachs capability. + """ + twint_payments: NotRequired["AccountUpdateParamsCapabilitiesTwintPayments"] + """ + The twint_payments capability. + """ + us_bank_account_ach_payments: NotRequired[ + "AccountUpdateParamsCapabilitiesUsBankAccountAchPayments" + ] + """ + The us_bank_account_ach_payments capability. + """ + us_bank_transfer_payments: NotRequired[ + "AccountUpdateParamsCapabilitiesUsBankTransferPayments" + ] + """ + The us_bank_transfer_payments capability. + """ + zip_payments: NotRequired["AccountUpdateParamsCapabilitiesZipPayments"] + """ + The zip_payments capability. + """ + + +class AccountUpdateParamsCapabilitiesAcssDebitPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountUpdateParamsCapabilitiesAffirmPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountUpdateParamsCapabilitiesAfterpayClearpayPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountUpdateParamsCapabilitiesAlmaPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountUpdateParamsCapabilitiesAmazonPayPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountUpdateParamsCapabilitiesAuBecsDebitPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountUpdateParamsCapabilitiesAutomaticIndirectTax(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountUpdateParamsCapabilitiesBacsDebitPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountUpdateParamsCapabilitiesBancontactPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountUpdateParamsCapabilitiesBankTransferPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountUpdateParamsCapabilitiesBilliePayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountUpdateParamsCapabilitiesBlikPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountUpdateParamsCapabilitiesBoletoPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountUpdateParamsCapabilitiesCardIssuing(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountUpdateParamsCapabilitiesCardPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountUpdateParamsCapabilitiesCartesBancairesPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountUpdateParamsCapabilitiesCashappPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountUpdateParamsCapabilitiesCryptoPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountUpdateParamsCapabilitiesEpsPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountUpdateParamsCapabilitiesFpxPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountUpdateParamsCapabilitiesGbBankTransferPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountUpdateParamsCapabilitiesGiropayPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountUpdateParamsCapabilitiesGopayPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountUpdateParamsCapabilitiesGrabpayPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountUpdateParamsCapabilitiesIdBankTransferPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountUpdateParamsCapabilitiesIdBankTransferPaymentsBca(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountUpdateParamsCapabilitiesIdealPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountUpdateParamsCapabilitiesIndiaInternationalPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountUpdateParamsCapabilitiesJcbPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountUpdateParamsCapabilitiesJpBankTransferPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountUpdateParamsCapabilitiesKakaoPayPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountUpdateParamsCapabilitiesKlarnaPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountUpdateParamsCapabilitiesKonbiniPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountUpdateParamsCapabilitiesKrCardPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountUpdateParamsCapabilitiesLegacyPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountUpdateParamsCapabilitiesLinkPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountUpdateParamsCapabilitiesMbWayPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountUpdateParamsCapabilitiesMobilepayPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountUpdateParamsCapabilitiesMultibancoPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountUpdateParamsCapabilitiesMxBankTransferPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountUpdateParamsCapabilitiesNaverPayPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountUpdateParamsCapabilitiesNzBankAccountBecsDebitPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountUpdateParamsCapabilitiesOxxoPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountUpdateParamsCapabilitiesP24Payments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountUpdateParamsCapabilitiesPayByBankPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountUpdateParamsCapabilitiesPaycoPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountUpdateParamsCapabilitiesPaynowPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountUpdateParamsCapabilitiesPaypalPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountUpdateParamsCapabilitiesPaypayPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountUpdateParamsCapabilitiesPaytoPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountUpdateParamsCapabilitiesPixPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountUpdateParamsCapabilitiesPromptpayPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountUpdateParamsCapabilitiesQrisPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountUpdateParamsCapabilitiesRechnungPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountUpdateParamsCapabilitiesRevolutPayPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountUpdateParamsCapabilitiesSamsungPayPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountUpdateParamsCapabilitiesSatispayPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountUpdateParamsCapabilitiesSepaBankTransferPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountUpdateParamsCapabilitiesSepaDebitPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountUpdateParamsCapabilitiesShopeepayPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountUpdateParamsCapabilitiesSofortPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountUpdateParamsCapabilitiesStripeBalancePayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountUpdateParamsCapabilitiesSwishPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountUpdateParamsCapabilitiesTaxReportingUs1099K(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountUpdateParamsCapabilitiesTaxReportingUs1099Misc(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountUpdateParamsCapabilitiesTransfers(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountUpdateParamsCapabilitiesTreasury(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountUpdateParamsCapabilitiesTreasuryEvolve(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountUpdateParamsCapabilitiesTreasuryFifthThird(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountUpdateParamsCapabilitiesTreasuryGoldmanSachs(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountUpdateParamsCapabilitiesTwintPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountUpdateParamsCapabilitiesUsBankAccountAchPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountUpdateParamsCapabilitiesUsBankTransferPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountUpdateParamsCapabilitiesZipPayments(TypedDict): + requested: NotRequired[bool] + """ + Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + """ + + +class AccountUpdateParamsCompany(TypedDict): + address: NotRequired["AccountUpdateParamsCompanyAddress"] + """ + The company's primary address. + """ + address_kana: NotRequired["AccountUpdateParamsCompanyAddressKana"] + """ + The Kana variation of the company's primary address (Japan only). + """ + address_kanji: NotRequired["AccountUpdateParamsCompanyAddressKanji"] + """ + The Kanji variation of the company's primary address (Japan only). + """ + directors_provided: NotRequired[bool] + """ + Whether the company's directors have been provided. Set this Boolean to `true` after creating all the company's directors with [the Persons API](https://docs.stripe.com/api/persons) for accounts with a `relationship.director` requirement. This value is not automatically set to `true` after creating directors, so it needs to be updated to indicate all directors have been provided. + """ + directorship_declaration: NotRequired[ + "AccountUpdateParamsCompanyDirectorshipDeclaration" + ] + """ + This hash is used to attest that the directors information provided to Stripe is both current and correct. + """ + executives_provided: NotRequired[bool] + """ + Whether the company's executives have been provided. Set this Boolean to `true` after creating all the company's executives with [the Persons API](https://docs.stripe.com/api/persons) for accounts with a `relationship.executive` requirement. + """ + export_license_id: NotRequired[str] + """ + The export license ID number of the company, also referred as Import Export Code (India only). + """ + export_purpose_code: NotRequired[str] + """ + The purpose code to use for export transactions (India only). + """ + name: NotRequired[str] + """ + The company's legal name. + """ + name_kana: NotRequired[str] + """ + The Kana variation of the company's legal name (Japan only). + """ + name_kanji: NotRequired[str] + """ + The Kanji variation of the company's legal name (Japan only). + """ + owners_provided: NotRequired[bool] + """ + Whether the company's owners have been provided. Set this Boolean to `true` after creating all the company's owners with [the Persons API](https://docs.stripe.com/api/persons) for accounts with a `relationship.owner` requirement. + """ + ownership_declaration: NotRequired[ + "AccountUpdateParamsCompanyOwnershipDeclaration" + ] + """ + This hash is used to attest that the beneficial owner information provided to Stripe is both current and correct. + """ + ownership_exemption_reason: NotRequired[ + "Literal['']|Literal['qualified_entity_exceeds_ownership_threshold', 'qualifies_as_financial_institution']" + ] + """ + This value is used to determine if a business is exempt from providing ultimate beneficial owners. See [this support article](https://support.stripe.com/questions/exemption-from-providing-ownership-details) and [changelog](https://docs.stripe.com/changelog/acacia/2025-01-27/ownership-exemption-reason-accounts-api) for more details. + """ + phone: NotRequired[str] + """ + The company's phone number (used for verification). + """ + registration_date: NotRequired[ + "Literal['']|AccountUpdateParamsCompanyRegistrationDate" + ] + registration_number: NotRequired[str] + """ + The identification number given to a company when it is registered or incorporated, if distinct from the identification number used for filing taxes. (Examples are the CIN for companies and LLP IN for partnerships in India, and the Company Registration Number in Hong Kong). + """ + structure: NotRequired[ + "Literal['']|Literal['free_zone_establishment', 'free_zone_llc', 'government_instrumentality', 'governmental_unit', 'incorporated_non_profit', 'incorporated_partnership', 'limited_liability_partnership', 'llc', 'multi_member_llc', 'private_company', 'private_corporation', 'private_partnership', 'public_company', 'public_corporation', 'public_partnership', 'registered_charity', 'single_member_llc', 'sole_establishment', 'sole_proprietorship', 'tax_exempt_government_instrumentality', 'unincorporated_association', 'unincorporated_non_profit', 'unincorporated_partnership']" + ] + """ + The category identifying the legal structure of the company or legal entity. See [Business structure](https://docs.stripe.com/connect/identity-verification#business-structure) for more details. Pass an empty string to unset this value. + """ + tax_id: NotRequired[str] + """ + The business ID number of the company, as appropriate for the company's country. (Examples are an Employer ID Number in the U.S., a Business Number in Canada, or a Company Number in the UK.) + """ + tax_id_registrar: NotRequired[str] + """ + The jurisdiction in which the `tax_id` is registered (Germany-based companies only). + """ + vat_id: NotRequired[str] + """ + The VAT number of the company. + """ + verification: NotRequired["AccountUpdateParamsCompanyVerification"] + """ + Information on the verification state of the company. + """ + + +class AccountUpdateParamsCompanyAddress(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. + """ + + +class AccountUpdateParamsCompanyAddressKana(TypedDict): + city: NotRequired[str] + """ + City or ward. + """ + 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] + """ + Block or building number. + """ + line2: NotRequired[str] + """ + Building details. + """ + postal_code: NotRequired[str] + """ + Postal code. + """ + state: NotRequired[str] + """ + Prefecture. + """ + town: NotRequired[str] + """ + Town or cho-me. + """ + + +class AccountUpdateParamsCompanyAddressKanji(TypedDict): + city: NotRequired[str] + """ + City or ward. + """ + 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] + """ + Block or building number. + """ + line2: NotRequired[str] + """ + Building details. + """ + postal_code: NotRequired[str] + """ + Postal code. + """ + state: NotRequired[str] + """ + Prefecture. + """ + town: NotRequired[str] + """ + Town or cho-me. + """ + + +class AccountUpdateParamsCompanyDirectorshipDeclaration(TypedDict): + date: NotRequired[int] + """ + The Unix timestamp marking when the directorship declaration attestation was made. + """ + ip: NotRequired[str] + """ + The IP address from which the directorship declaration attestation was made. + """ + user_agent: NotRequired[str] + """ + The user agent of the browser from which the directorship declaration attestation was made. + """ + + +class AccountUpdateParamsCompanyOwnershipDeclaration(TypedDict): + date: NotRequired[int] + """ + The Unix timestamp marking when the beneficial owner attestation was made. + """ + ip: NotRequired[str] + """ + The IP address from which the beneficial owner attestation was made. + """ + user_agent: NotRequired[str] + """ + The user agent of the browser from which the beneficial owner attestation was made. + """ + + +class AccountUpdateParamsCompanyRegistrationDate(TypedDict): + day: int + """ + The day of registration, between 1 and 31. + """ + month: int + """ + The month of registration, between 1 and 12. + """ + year: int + """ + The four-digit year of registration. + """ + + +class AccountUpdateParamsCompanyVerification(TypedDict): + document: NotRequired["AccountUpdateParamsCompanyVerificationDocument"] + """ + A document verifying the business. + """ + + +class AccountUpdateParamsCompanyVerificationDocument(TypedDict): + back: NotRequired[str] + """ + The back of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + """ + front: NotRequired[str] + """ + The front of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + """ + + +class AccountUpdateParamsDocuments(TypedDict): + bank_account_ownership_verification: NotRequired[ + "AccountUpdateParamsDocumentsBankAccountOwnershipVerification" + ] + """ + One or more documents that support the [Bank account ownership verification](https://support.stripe.com/questions/bank-account-ownership-verification) requirement. Must be a document associated with the account's primary active bank account that displays the last 4 digits of the account number, either a statement or a check. + """ + company_license: NotRequired["AccountUpdateParamsDocumentsCompanyLicense"] + """ + One or more documents that demonstrate proof of a company's license to operate. + """ + company_memorandum_of_association: NotRequired[ + "AccountUpdateParamsDocumentsCompanyMemorandumOfAssociation" + ] + """ + One or more documents showing the company's Memorandum of Association. + """ + company_ministerial_decree: NotRequired[ + "AccountUpdateParamsDocumentsCompanyMinisterialDecree" + ] + """ + (Certain countries only) One or more documents showing the ministerial decree legalizing the company's establishment. + """ + company_registration_verification: NotRequired[ + "AccountUpdateParamsDocumentsCompanyRegistrationVerification" + ] + """ + One or more documents that demonstrate proof of a company's registration with the appropriate local authorities. + """ + company_tax_id_verification: NotRequired[ + "AccountUpdateParamsDocumentsCompanyTaxIdVerification" + ] + """ + One or more documents that demonstrate proof of a company's tax ID. + """ + proof_of_address: NotRequired["AccountUpdateParamsDocumentsProofOfAddress"] + """ + One or more documents that demonstrate proof of address. + """ + proof_of_registration: NotRequired[ + "AccountUpdateParamsDocumentsProofOfRegistration" + ] + """ + One or more documents showing the company's proof of registration with the national business registry. + """ + proof_of_ultimate_beneficial_ownership: NotRequired[ + "AccountUpdateParamsDocumentsProofOfUltimateBeneficialOwnership" + ] + """ + One or more documents that demonstrate proof of ultimate beneficial ownership. + """ + + +class AccountUpdateParamsDocumentsBankAccountOwnershipVerification(TypedDict): + files: NotRequired[List[str]] + """ + One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + """ + + +class AccountUpdateParamsDocumentsCompanyLicense(TypedDict): + files: NotRequired[List[str]] + """ + One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + """ + + +class AccountUpdateParamsDocumentsCompanyMemorandumOfAssociation(TypedDict): + files: NotRequired[List[str]] + """ + One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + """ + + +class AccountUpdateParamsDocumentsCompanyMinisterialDecree(TypedDict): + files: NotRequired[List[str]] + """ + One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + """ + + +class AccountUpdateParamsDocumentsCompanyRegistrationVerification(TypedDict): + files: NotRequired[List[str]] + """ + One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + """ + + +class AccountUpdateParamsDocumentsCompanyTaxIdVerification(TypedDict): + files: NotRequired[List[str]] + """ + One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + """ + + +class AccountUpdateParamsDocumentsProofOfAddress(TypedDict): + files: NotRequired[List[str]] + """ + One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + """ + + +class AccountUpdateParamsDocumentsProofOfRegistration(TypedDict): + files: NotRequired[List[str]] + """ + One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + """ + + +class AccountUpdateParamsDocumentsProofOfUltimateBeneficialOwnership( + TypedDict +): + files: NotRequired[List[str]] + """ + One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + """ + + +class AccountUpdateParamsBankAccount(TypedDict): + object: Literal["bank_account"] + account_holder_name: NotRequired[str] + """ + The name of the person or business that owns the bank account.This field is required when attaching the bank account to a `Customer` object. + """ + account_holder_type: NotRequired[Literal["company", "individual"]] + """ + The type of entity that holds the account. It can be `company` or `individual`. This field is required when attaching the bank account to a `Customer` object. + """ + account_number: str + """ + The account number for the bank account, in string form. Must be a checking account. + """ + country: str + """ + The country in which the bank account is located. + """ + currency: NotRequired[str] + """ + The currency the bank account is in. This must be a country/currency pairing that [Stripe supports.](docs/payouts) + """ + routing_number: NotRequired[str] + """ + The routing number, sort code, or other country-appropriate institution number for the bank account. For US bank accounts, this is required and should be the ACH routing number, not the wire routing number. If you are providing an IBAN for `account_number`, this field is not required. + """ + + +class AccountUpdateParamsCard(TypedDict): + object: Literal["card"] + address_city: NotRequired[str] + address_country: NotRequired[str] + address_line1: NotRequired[str] + address_line2: NotRequired[str] + address_state: NotRequired[str] + address_zip: NotRequired[str] + currency: NotRequired[str] + cvc: NotRequired[str] + exp_month: int + exp_year: int + name: NotRequired[str] + number: str + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + """ + default_for_currency: NotRequired[bool] + + +class AccountUpdateParamsCardToken(TypedDict): + object: Literal["card"] + currency: NotRequired[str] + token: str + + +class AccountUpdateParamsGroups(TypedDict): + payments_pricing: NotRequired["Literal['']|str"] + """ + The group the account is in to determine their payments pricing, and null if the account is on customized pricing. [See the Platform pricing tool documentation](https://stripe.com/docs/connect/platform-pricing-tools) for details. + """ + + +class AccountUpdateParamsIndividual(TypedDict): + address: NotRequired["AccountUpdateParamsIndividualAddress"] + """ + The individual's primary address. + """ + address_kana: NotRequired["AccountUpdateParamsIndividualAddressKana"] + """ + The Kana variation of the individual's primary address (Japan only). + """ + address_kanji: NotRequired["AccountUpdateParamsIndividualAddressKanji"] + """ + The Kanji variation of the individual's primary address (Japan only). + """ + dob: NotRequired["Literal['']|AccountUpdateParamsIndividualDob"] + """ + The individual's date of birth. + """ + email: NotRequired[str] + """ + The individual's email address. + """ + first_name: NotRequired[str] + """ + The individual's first name. + """ + first_name_kana: NotRequired[str] + """ + The Kana variation of the individual's first name (Japan only). + """ + first_name_kanji: NotRequired[str] + """ + The Kanji variation of the individual's first name (Japan only). + """ + full_name_aliases: NotRequired["Literal['']|List[str]"] + """ + A list of alternate names or aliases that the individual is known by. + """ + gender: NotRequired[str] + """ + The individual's gender + """ + id_number: NotRequired[str] + """ + The government-issued ID number of the individual, as appropriate for the representative's country. (Examples are a Social Security Number in the U.S., or a Social Insurance Number in Canada). Instead of the number itself, you can also provide a [PII token created with Stripe.js](https://docs.stripe.com/js/tokens/create_token?type=pii). + """ + id_number_secondary: NotRequired[str] + """ + The government-issued secondary ID number of the individual, as appropriate for the representative's country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token created with Stripe.js](https://docs.stripe.com/js/tokens/create_token?type=pii). + """ + last_name: NotRequired[str] + """ + The individual's last name. + """ + last_name_kana: NotRequired[str] + """ + The Kana variation of the individual's last name (Japan only). + """ + last_name_kanji: NotRequired[str] + """ + The Kanji variation of the individual's last name (Japan only). + """ + maiden_name: NotRequired[str] + """ + The individual's maiden name. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + phone: NotRequired[str] + """ + The individual's phone number. + """ + political_exposure: NotRequired[Literal["existing", "none"]] + """ + Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. + """ + registered_address: NotRequired[ + "AccountUpdateParamsIndividualRegisteredAddress" + ] + """ + The individual's registered address. + """ + relationship: NotRequired["AccountUpdateParamsIndividualRelationship"] + """ + Describes the person's relationship to the account. + """ + ssn_last_4: NotRequired[str] + """ + The last four digits of the individual's Social Security Number (U.S. only). + """ + verification: NotRequired["AccountUpdateParamsIndividualVerification"] + """ + The individual's verification document information. + """ + + +class AccountUpdateParamsIndividualAddress(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. + """ + + +class AccountUpdateParamsIndividualAddressKana(TypedDict): + city: NotRequired[str] + """ + City or ward. + """ + 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] + """ + Block or building number. + """ + line2: NotRequired[str] + """ + Building details. + """ + postal_code: NotRequired[str] + """ + Postal code. + """ + state: NotRequired[str] + """ + Prefecture. + """ + town: NotRequired[str] + """ + Town or cho-me. + """ + + +class AccountUpdateParamsIndividualAddressKanji(TypedDict): + city: NotRequired[str] + """ + City or ward. + """ + 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] + """ + Block or building number. + """ + line2: NotRequired[str] + """ + Building details. + """ + postal_code: NotRequired[str] + """ + Postal code. + """ + state: NotRequired[str] + """ + Prefecture. + """ + town: NotRequired[str] + """ + Town or cho-me. + """ + + +class AccountUpdateParamsIndividualDob(TypedDict): + day: int + """ + The day of birth, between 1 and 31. + """ + month: int + """ + The month of birth, between 1 and 12. + """ + year: int + """ + The four-digit year of birth. + """ + + +class AccountUpdateParamsIndividualRegisteredAddress(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. + """ + + +class AccountUpdateParamsIndividualRelationship(TypedDict): + director: NotRequired[bool] + """ + Whether the person is a director of the account's legal entity. Directors are typically members of the governing board of the company, or responsible for ensuring the company meets its regulatory obligations. + """ + executive: NotRequired[bool] + """ + Whether the person has significant responsibility to control, manage, or direct the organization. + """ + owner: NotRequired[bool] + """ + Whether the person is an owner of the account's legal entity. + """ + percent_ownership: NotRequired["Literal['']|float"] + """ + The percent owned by the person of the account's legal entity. + """ + title: NotRequired[str] + """ + The person's title (e.g., CEO, Support Engineer). + """ + + +class AccountUpdateParamsIndividualVerification(TypedDict): + additional_document: NotRequired[ + "AccountUpdateParamsIndividualVerificationAdditionalDocument" + ] + """ + A document showing address, either a passport, local ID card, or utility bill from a well-known utility company. + """ + document: NotRequired["AccountUpdateParamsIndividualVerificationDocument"] + """ + An identifying document, either a passport or local ID card. + """ + + +class AccountUpdateParamsIndividualVerificationAdditionalDocument(TypedDict): + back: NotRequired[str] + """ + The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + """ + front: NotRequired[str] + """ + The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + """ + + +class AccountUpdateParamsIndividualVerificationDocument(TypedDict): + back: NotRequired[str] + """ + The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + """ + front: NotRequired[str] + """ + The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + """ + + +class AccountUpdateParamsRiskControls(TypedDict): + charges: NotRequired["AccountUpdateParamsRiskControlsCharges"] + """ + Represents the risk control status of charges. Please see [this page for more details](https://stripe.com/docs/connect/pausing-payments-or-payouts-on-connected-accounts). + """ + payouts: NotRequired["AccountUpdateParamsRiskControlsPayouts"] + """ + Represents the risk control status of payouts. Please see [this page for more details](https://stripe.com/docs/connect/pausing-payments-or-payouts-on-connected-accounts). + """ + + +class AccountUpdateParamsRiskControlsCharges(TypedDict): + pause_requested: NotRequired[bool] + """ + To request to pause a risk control, pass `true`. To request to unpause a risk control, pass `false`. + There can be a delay before the risk control is paused or unpaused. + """ + + +class AccountUpdateParamsRiskControlsPayouts(TypedDict): + pause_requested: NotRequired[bool] + """ + To request to pause a risk control, pass `true`. To request to unpause a risk control, pass `false`. + There can be a delay before the risk control is paused or unpaused. + """ + + +class AccountUpdateParamsSettings(TypedDict): + bacs_debit_payments: NotRequired[ + "AccountUpdateParamsSettingsBacsDebitPayments" + ] + """ + Settings specific to Bacs Direct Debit payments. + """ + bank_bca_onboarding: NotRequired[ + "AccountUpdateParamsSettingsBankBcaOnboarding" + ] + """ + Settings specific to bank BCA onboarding for Indonesia bank transfers payments method. + """ + branding: NotRequired["AccountUpdateParamsSettingsBranding"] + """ + Settings used to apply the account's branding to email receipts, invoices, Checkout, and other products. + """ + capital: NotRequired["AccountUpdateParamsSettingsCapital"] + """ + Settings specific to the account's use of the Capital product. + """ + card_issuing: NotRequired["AccountUpdateParamsSettingsCardIssuing"] + """ + Settings specific to the account's use of the Card Issuing product. + """ + card_payments: NotRequired["AccountUpdateParamsSettingsCardPayments"] + """ + Settings specific to card charging on the account. + """ + invoices: NotRequired["AccountUpdateParamsSettingsInvoices"] + """ + Settings specific to the account's use of Invoices. + """ + payments: NotRequired["AccountUpdateParamsSettingsPayments"] + """ + Settings that apply across payment methods for charging on the account. + """ + payouts: NotRequired["AccountUpdateParamsSettingsPayouts"] + """ + Settings specific to the account's payouts. + """ + tax_forms: NotRequired["AccountUpdateParamsSettingsTaxForms"] + """ + Settings specific to the account's tax forms. + """ + treasury: NotRequired["AccountUpdateParamsSettingsTreasury"] + """ + Settings specific to the account's Treasury FinancialAccounts. + """ + + +class AccountUpdateParamsSettingsBacsDebitPayments(TypedDict): + display_name: NotRequired[str] + """ + The Bacs Direct Debit Display Name for this account. For payments made with Bacs Direct Debit, this name appears on the mandate as the statement descriptor. Mobile banking apps display it as the name of the business. To use custom branding, set the Bacs Direct Debit Display Name during or right after creation. Custom branding incurs an additional monthly fee for the platform. If you don't set the display name before requesting Bacs capability, it's automatically set as "Stripe" and the account is onboarded to Stripe branding, which is free. + """ + + +class AccountUpdateParamsSettingsBankBcaOnboarding(TypedDict): + account_holder_name: NotRequired[str] + """ + Bank BCA business account holder name + """ + business_account_number: NotRequired[str] + """ + Bank BCA business account number + """ + + +class AccountUpdateParamsSettingsBranding(TypedDict): + icon: NotRequired[str] + """ + (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) An icon for the account. Must be square and at least 128px x 128px. + """ + logo: NotRequired[str] + """ + (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) A logo for the account that will be used in Checkout instead of the icon and without the account's name next to it if provided. Must be at least 128px x 128px. + """ + primary_color: NotRequired[str] + """ + A CSS hex color value representing the primary branding color for this account. + """ + secondary_color: NotRequired[str] + """ + A CSS hex color value representing the secondary branding color for this account. + """ + + +class AccountUpdateParamsSettingsCapital(TypedDict): + payout_destination: NotRequired[Dict[str, str]] + """ + Per-currency mapping of user-selected destination accounts used to pay out loans. + """ + payout_destination_selector: NotRequired[Dict[str, List[str]]] + """ + Per-currency mapping of all destination accounts eligible to receive Capital financing payouts. + """ + + +class AccountUpdateParamsSettingsCardIssuing(TypedDict): + tos_acceptance: NotRequired[ + "AccountUpdateParamsSettingsCardIssuingTosAcceptance" + ] + """ + Details on the account's acceptance of the [Stripe Issuing Terms and Disclosures](https://docs.stripe.com/issuing/connect/tos_acceptance). + """ + + +class AccountUpdateParamsSettingsCardIssuingTosAcceptance(TypedDict): + date: NotRequired[int] + """ + The Unix timestamp marking when the account representative accepted the service agreement. + """ + ip: NotRequired[str] + """ + The IP address from which the account representative accepted the service agreement. + """ + user_agent: NotRequired["Literal['']|str"] + """ + The user agent of the browser from which the account representative accepted the service agreement. + """ + + +class AccountUpdateParamsSettingsCardPayments(TypedDict): + decline_on: NotRequired["AccountUpdateParamsSettingsCardPaymentsDeclineOn"] + """ + Automatically declines certain charge types regardless of whether the card issuer accepted or declined the charge. + """ + statement_descriptor_prefix: NotRequired[str] + """ + The default text that appears on credit card statements when a charge is made. This field prefixes any dynamic `statement_descriptor` specified on the charge. `statement_descriptor_prefix` is useful for maximizing descriptor space for the dynamic portion. + """ + statement_descriptor_prefix_kana: NotRequired["Literal['']|str"] + """ + The Kana variation of the default text that appears on credit card statements when a charge is made (Japan only). This field prefixes any dynamic `statement_descriptor_suffix_kana` specified on the charge. `statement_descriptor_prefix_kana` is useful for maximizing descriptor space for the dynamic portion. + """ + statement_descriptor_prefix_kanji: NotRequired["Literal['']|str"] + """ + The Kanji variation of the default text that appears on credit card statements when a charge is made (Japan only). This field prefixes any dynamic `statement_descriptor_suffix_kanji` specified on the charge. `statement_descriptor_prefix_kanji` is useful for maximizing descriptor space for the dynamic portion. + """ + + +class AccountUpdateParamsSettingsCardPaymentsDeclineOn(TypedDict): + avs_failure: NotRequired[bool] + """ + Whether Stripe automatically declines charges with an incorrect ZIP or postal code. This setting only applies when a ZIP or postal code is provided and they fail bank verification. + """ + cvc_failure: NotRequired[bool] + """ + Whether Stripe automatically declines charges with an incorrect CVC. This setting only applies when a CVC is provided and it fails bank verification. + """ + + +class AccountUpdateParamsSettingsInvoices(TypedDict): + default_account_tax_ids: NotRequired["Literal['']|List[str]"] + """ + The list of default Account Tax IDs to automatically include on invoices. Account Tax IDs get added when an invoice is finalized. + """ + hosted_payment_method_save: NotRequired[ + Literal["always", "never", "offer"] + ] + """ + Whether payment methods should be saved when a payment is completed for a one-time invoices on a hosted invoice page. + """ + + +class AccountUpdateParamsSettingsPayments(TypedDict): + statement_descriptor: NotRequired[str] + """ + The default text that appears on statements for non-card charges outside of Japan. For card charges, if you don't set a `statement_descriptor_prefix`, this text is also used as the statement descriptor prefix. In that case, if concatenating the statement descriptor suffix causes the combined statement descriptor to exceed 22 characters, we truncate the `statement_descriptor` text to limit the full descriptor to 22 characters. For more information about statement descriptors and their requirements, see the [account settings documentation](https://docs.stripe.com/get-started/account/statement-descriptors). + """ + statement_descriptor_kana: NotRequired[str] + """ + The Kana variation of `statement_descriptor` used for charges in Japan. Japanese statement descriptors have [special requirements](https://docs.stripe.com/get-started/account/statement-descriptors#set-japanese-statement-descriptors). + """ + statement_descriptor_kanji: NotRequired[str] + """ + The Kanji variation of `statement_descriptor` used for charges in Japan. Japanese statement descriptors have [special requirements](https://docs.stripe.com/get-started/account/statement-descriptors#set-japanese-statement-descriptors). + """ + + +class AccountUpdateParamsSettingsPayouts(TypedDict): + debit_negative_balances: NotRequired[bool] + """ + A Boolean indicating whether Stripe should try to reclaim negative balances from an attached bank account. For details, see [Understanding Connect Account Balances](https://docs.stripe.com/connect/account-balances). + """ + schedule: NotRequired["AccountUpdateParamsSettingsPayoutsSchedule"] + """ + Details on when funds from charges are available, and when they are paid out to an external account. For details, see our [Setting Bank and Debit Card Payouts](https://docs.stripe.com/connect/bank-transfers#payout-information) documentation. + """ + statement_descriptor: NotRequired[str] + """ + The text that appears on the bank account statement for payouts. If not set, this defaults to the platform's bank descriptor as set in the Dashboard. + """ + + +class AccountUpdateParamsSettingsPayoutsSchedule(TypedDict): + delay_days: NotRequired["Literal['minimum']|int"] + """ + The number of days charge funds are held before being paid out. May also be set to `minimum`, representing the lowest available value for the account country. Default is `minimum`. The `delay_days` parameter remains at the last configured value if `interval` is `manual`. [Learn more about controlling payout delay days](https://docs.stripe.com/connect/manage-payout-schedule). + """ + interval: NotRequired[Literal["daily", "manual", "monthly", "weekly"]] + """ + How frequently available funds are paid out. One of: `daily`, `manual`, `weekly`, or `monthly`. Default is `daily`. + """ + monthly_anchor: NotRequired[int] + """ + The day of the month when available funds are paid out, specified as a number between 1--31. Payouts nominally scheduled between the 29th and 31st of the month are instead sent on the last day of a shorter month. Required and applicable only if `interval` is `monthly`. + """ + monthly_payout_days: NotRequired[List[int]] + """ + The days of the month when available funds are paid out, specified as an array of numbers between 1--31. Payouts nominally scheduled between the 29th and 31st of the month are instead sent on the last day of a shorter month. Required and applicable only if `interval` is `monthly` and `monthly_anchor` is not set. + """ + weekly_anchor: NotRequired[ + Literal[ + "friday", + "monday", + "saturday", + "sunday", + "thursday", + "tuesday", + "wednesday", + ] + ] + """ + The day of the week when available funds are paid out, specified as `monday`, `tuesday`, etc. Required and applicable only if `interval` is `weekly`. + """ + weekly_payout_days: NotRequired[ + List[Literal["friday", "monday", "thursday", "tuesday", "wednesday"]] + ] + """ + The days of the week when available funds are paid out, specified as an array, e.g., [`monday`, `tuesday`]. Required and applicable only if `interval` is `weekly`. + """ + + +class AccountUpdateParamsSettingsTaxForms(TypedDict): + consented_to_paperless_delivery: NotRequired[bool] + """ + Whether the account opted out of receiving their tax forms by postal delivery. + """ + + +class AccountUpdateParamsSettingsTreasury(TypedDict): + tos_acceptance: NotRequired[ + "AccountUpdateParamsSettingsTreasuryTosAcceptance" + ] + """ + Details on the account's acceptance of the Stripe Treasury Services Agreement. + """ + + +class AccountUpdateParamsSettingsTreasuryTosAcceptance(TypedDict): + date: NotRequired[int] + """ + The Unix timestamp marking when the account representative accepted the service agreement. + """ + ip: NotRequired[str] + """ + The IP address from which the account representative accepted the service agreement. + """ + user_agent: NotRequired["Literal['']|str"] + """ + The user agent of the browser from which the account representative accepted the service agreement. + """ + + +class AccountUpdateParamsTosAcceptance(TypedDict): + date: NotRequired[int] + """ + The Unix timestamp marking when the account representative accepted their service agreement. + """ + ip: NotRequired[str] + """ + The IP address from which the account representative accepted their service agreement. + """ + service_agreement: NotRequired[str] + """ + The user's service agreement type. + """ + user_agent: NotRequired[str] + """ + The user agent of the browser from which the account representative accepted their service agreement. + """ diff --git a/stripe/params/_apple_pay_domain_create_params.py b/stripe/params/_apple_pay_domain_create_params.py new file mode 100644 index 000000000..42db145a2 --- /dev/null +++ b/stripe/params/_apple_pay_domain_create_params.py @@ -0,0 +1,13 @@ +# -*- 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 ApplePayDomainCreateParams(RequestOptions): + domain_name: str + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_apple_pay_domain_delete_params.py b/stripe/params/_apple_pay_domain_delete_params.py new file mode 100644 index 000000000..11099305a --- /dev/null +++ b/stripe/params/_apple_pay_domain_delete_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions + + +class ApplePayDomainDeleteParams(RequestOptions): + pass diff --git a/stripe/params/_apple_pay_domain_list_params.py b/stripe/params/_apple_pay_domain_list_params.py new file mode 100644 index 000000000..c301315ac --- /dev/null +++ b/stripe/params/_apple_pay_domain_list_params.py @@ -0,0 +1,25 @@ +# -*- 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 ApplePayDomainListParams(RequestOptions): + domain_name: NotRequired[str] + 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. + """ diff --git a/stripe/params/_apple_pay_domain_retrieve_params.py b/stripe/params/_apple_pay_domain_retrieve_params.py new file mode 100644 index 000000000..6730ed447 --- /dev/null +++ b/stripe/params/_apple_pay_domain_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 ApplePayDomainRetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_application_fee_create_refund_params.py b/stripe/params/_application_fee_create_refund_params.py new file mode 100644 index 000000000..4d209e6a4 --- /dev/null +++ b/stripe/params/_application_fee_create_refund_params.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import NotRequired + + +class ApplicationFeeCreateRefundParams(RequestOptions): + amount: NotRequired[int] + """ + A positive integer, in _cents (or local equivalent)_, representing how much of this fee to refund. Can refund only up to the remaining unrefunded amount of the fee. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ diff --git a/stripe/params/_application_fee_list_params.py b/stripe/params/_application_fee_list_params.py new file mode 100644 index 000000000..988ecd888 --- /dev/null +++ b/stripe/params/_application_fee_list_params.py @@ -0,0 +1,51 @@ +# -*- 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 ApplicationFeeListParams(RequestOptions): + charge: NotRequired[str] + """ + Only return application fees for the charge specified by this charge ID. + """ + created: NotRequired["ApplicationFeeListParamsCreated|int"] + """ + Only return applications fees that were created during the given date interval. + """ + 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 ApplicationFeeListParamsCreated(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/_application_fee_list_refunds_params.py b/stripe/params/_application_fee_list_refunds_params.py new file mode 100644 index 000000000..e109a31fa --- /dev/null +++ b/stripe/params/_application_fee_list_refunds_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 ApplicationFeeListRefundsParams(RequestOptions): + 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. + """ diff --git a/stripe/params/_application_fee_modify_refund_params.py b/stripe/params/_application_fee_modify_refund_params.py new file mode 100644 index 000000000..a0b49b616 --- /dev/null +++ b/stripe/params/_application_fee_modify_refund_params.py @@ -0,0 +1,16 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import Literal, NotRequired + + +class ApplicationFeeModifyRefundParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ diff --git a/stripe/params/_application_fee_refund_create_params.py b/stripe/params/_application_fee_refund_create_params.py new file mode 100644 index 000000000..6f7a75697 --- /dev/null +++ b/stripe/params/_application_fee_refund_create_params.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import Dict, List +from typing_extensions import NotRequired, TypedDict + + +class ApplicationFeeRefundCreateParams(TypedDict): + amount: NotRequired[int] + """ + A positive integer, in _cents (or local equivalent)_, representing how much of this fee to refund. Can refund only up to the remaining unrefunded amount of the fee. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ diff --git a/stripe/params/_application_fee_refund_list_params.py b/stripe/params/_application_fee_refund_list_params.py new file mode 100644 index 000000000..d19af68bd --- /dev/null +++ b/stripe/params/_application_fee_refund_list_params.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import NotRequired, TypedDict + + +class ApplicationFeeRefundListParams(TypedDict): + 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. + """ diff --git a/stripe/params/_application_fee_refund_params.py b/stripe/params/_application_fee_refund_params.py new file mode 100644 index 000000000..66e53b611 --- /dev/null +++ b/stripe/params/_application_fee_refund_params.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import NotRequired + + +class ApplicationFeeRefundParams(RequestOptions): + amount: NotRequired[int] + """ + A positive integer, in _cents (or local equivalent)_, representing how much of this fee to refund. Can refund only up to the remaining unrefunded amount of the fee. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ diff --git a/stripe/params/_application_fee_refund_retrieve_params.py b/stripe/params/_application_fee_refund_retrieve_params.py new file mode 100644 index 000000000..440811579 --- /dev/null +++ b/stripe/params/_application_fee_refund_retrieve_params.py @@ -0,0 +1,11 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import NotRequired, TypedDict + + +class ApplicationFeeRefundRetrieveParams(TypedDict): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_application_fee_refund_update_params.py b/stripe/params/_application_fee_refund_update_params.py new file mode 100644 index 000000000..9d2a63eb6 --- /dev/null +++ b/stripe/params/_application_fee_refund_update_params.py @@ -0,0 +1,15 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class ApplicationFeeRefundUpdateParams(TypedDict): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ diff --git a/stripe/params/_application_fee_retrieve_params.py b/stripe/params/_application_fee_retrieve_params.py new file mode 100644 index 000000000..f569febcf --- /dev/null +++ b/stripe/params/_application_fee_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 ApplicationFeeRetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_application_fee_retrieve_refund_params.py b/stripe/params/_application_fee_retrieve_refund_params.py new file mode 100644 index 000000000..b4ec7af1b --- /dev/null +++ b/stripe/params/_application_fee_retrieve_refund_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 ApplicationFeeRetrieveRefundParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_balance_retrieve_params.py b/stripe/params/_balance_retrieve_params.py new file mode 100644 index 000000000..2c3d9a3b2 --- /dev/null +++ b/stripe/params/_balance_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 BalanceRetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_balance_settings_modify_params.py b/stripe/params/_balance_settings_modify_params.py new file mode 100644 index 000000000..86ae9e1bc --- /dev/null +++ b/stripe/params/_balance_settings_modify_params.py @@ -0,0 +1,74 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List, Union +from typing_extensions import Literal, NotRequired, TypedDict + + +class BalanceSettingsModifyParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + payments: NotRequired["BalanceSettingsModifyParamsPayments"] + """ + Settings that apply to the [Payments Balance](https://docs.stripe.com/api/balance). + """ + + +class BalanceSettingsModifyParamsPayments(TypedDict): + debit_negative_balances: NotRequired[bool] + """ + A Boolean indicating whether Stripe should try to reclaim negative balances from an attached bank account. For details, see [Understanding Connect Account Balances](https://docs.stripe.com/connect/account-balances). + """ + payouts: NotRequired["BalanceSettingsModifyParamsPaymentsPayouts"] + """ + Settings specific to the account's payouts. + """ + settlement_timing: NotRequired[ + "BalanceSettingsModifyParamsPaymentsSettlementTiming" + ] + """ + Settings related to the account's balance settlement timing. + """ + + +class BalanceSettingsModifyParamsPaymentsPayouts(TypedDict): + minimum_balance_by_currency: NotRequired[ + "Literal['']|Dict[str, Union[Literal[''], int]]" + ] + """ + The minimum balance amount to retain per currency after automatic payouts. Only funds that exceed these amounts are paid out. Learn more about the [minimum balances for automatic payouts](https://docs.stripe.com/payouts/minimum-balances-for-automatic-payouts). + """ + schedule: NotRequired["BalanceSettingsModifyParamsPaymentsPayoutsSchedule"] + """ + Details on when funds from charges are available, and when they are paid out to an external account. For details, see our [Setting Bank and Debit Card Payouts](https://docs.stripe.com/connect/bank-transfers#payout-information) documentation. + """ + statement_descriptor: NotRequired[str] + """ + The text that appears on the bank account statement for payouts. If not set, this defaults to the platform's bank descriptor as set in the Dashboard. + """ + + +class BalanceSettingsModifyParamsPaymentsPayoutsSchedule(TypedDict): + interval: NotRequired[Literal["daily", "manual", "monthly", "weekly"]] + """ + How frequently available funds are paid out. One of: `daily`, `manual`, `weekly`, or `monthly`. Default is `daily`. + """ + monthly_payout_days: NotRequired[List[int]] + """ + The days of the month when available funds are paid out, specified as an array of numbers between 1--31. Payouts nominally scheduled between the 29th and 31st of the month are instead sent on the last day of a shorter month. Required and applicable only if `interval` is `monthly`. + """ + weekly_payout_days: NotRequired[ + List[Literal["friday", "monday", "thursday", "tuesday", "wednesday"]] + ] + """ + The days of the week when available funds are paid out, specified as an array, e.g., [`monday`, `tuesday`]. Required and applicable only if `interval` is `weekly`. + """ + + +class BalanceSettingsModifyParamsPaymentsSettlementTiming(TypedDict): + delay_days_override: NotRequired["Literal['']|int"] + """ + Change `delay_days` for this account, which determines the number of days charge funds are held before becoming available. The maximum value is 31. Passing an empty string to `delay_days_override` will return `delay_days` to the default, which is the lowest available value for the account. [Learn more about controlling delay days](https://docs.stripe.com/connect/manage-payout-schedule). + """ diff --git a/stripe/params/_balance_settings_retrieve_params.py b/stripe/params/_balance_settings_retrieve_params.py new file mode 100644 index 000000000..a47e2c01c --- /dev/null +++ b/stripe/params/_balance_settings_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 BalanceSettingsRetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_balance_settings_update_params.py b/stripe/params/_balance_settings_update_params.py new file mode 100644 index 000000000..24bbf7821 --- /dev/null +++ b/stripe/params/_balance_settings_update_params.py @@ -0,0 +1,73 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import Dict, List, Union +from typing_extensions import Literal, NotRequired, TypedDict + + +class BalanceSettingsUpdateParams(TypedDict): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + payments: NotRequired["BalanceSettingsUpdateParamsPayments"] + """ + Settings that apply to the [Payments Balance](https://docs.stripe.com/api/balance). + """ + + +class BalanceSettingsUpdateParamsPayments(TypedDict): + debit_negative_balances: NotRequired[bool] + """ + A Boolean indicating whether Stripe should try to reclaim negative balances from an attached bank account. For details, see [Understanding Connect Account Balances](https://docs.stripe.com/connect/account-balances). + """ + payouts: NotRequired["BalanceSettingsUpdateParamsPaymentsPayouts"] + """ + Settings specific to the account's payouts. + """ + settlement_timing: NotRequired[ + "BalanceSettingsUpdateParamsPaymentsSettlementTiming" + ] + """ + Settings related to the account's balance settlement timing. + """ + + +class BalanceSettingsUpdateParamsPaymentsPayouts(TypedDict): + minimum_balance_by_currency: NotRequired[ + "Literal['']|Dict[str, Union[Literal[''], int]]" + ] + """ + The minimum balance amount to retain per currency after automatic payouts. Only funds that exceed these amounts are paid out. Learn more about the [minimum balances for automatic payouts](https://docs.stripe.com/payouts/minimum-balances-for-automatic-payouts). + """ + schedule: NotRequired["BalanceSettingsUpdateParamsPaymentsPayoutsSchedule"] + """ + Details on when funds from charges are available, and when they are paid out to an external account. For details, see our [Setting Bank and Debit Card Payouts](https://docs.stripe.com/connect/bank-transfers#payout-information) documentation. + """ + statement_descriptor: NotRequired[str] + """ + The text that appears on the bank account statement for payouts. If not set, this defaults to the platform's bank descriptor as set in the Dashboard. + """ + + +class BalanceSettingsUpdateParamsPaymentsPayoutsSchedule(TypedDict): + interval: NotRequired[Literal["daily", "manual", "monthly", "weekly"]] + """ + How frequently available funds are paid out. One of: `daily`, `manual`, `weekly`, or `monthly`. Default is `daily`. + """ + monthly_payout_days: NotRequired[List[int]] + """ + The days of the month when available funds are paid out, specified as an array of numbers between 1--31. Payouts nominally scheduled between the 29th and 31st of the month are instead sent on the last day of a shorter month. Required and applicable only if `interval` is `monthly`. + """ + weekly_payout_days: NotRequired[ + List[Literal["friday", "monday", "thursday", "tuesday", "wednesday"]] + ] + """ + The days of the week when available funds are paid out, specified as an array, e.g., [`monday`, `tuesday`]. Required and applicable only if `interval` is `weekly`. + """ + + +class BalanceSettingsUpdateParamsPaymentsSettlementTiming(TypedDict): + delay_days_override: NotRequired["Literal['']|int"] + """ + Change `delay_days` for this account, which determines the number of days charge funds are held before becoming available. The maximum value is 31. Passing an empty string to `delay_days_override` will return `delay_days` to the default, which is the lowest available value for the account. [Learn more about controlling delay days](https://docs.stripe.com/connect/manage-payout-schedule). + """ diff --git a/stripe/params/_balance_transaction_list_params.py b/stripe/params/_balance_transaction_list_params.py new file mode 100644 index 000000000..4c154b4cb --- /dev/null +++ b/stripe/params/_balance_transaction_list_params.py @@ -0,0 +1,63 @@ +# -*- 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 BalanceTransactionListParams(RequestOptions): + created: NotRequired["BalanceTransactionListParamsCreated|int"] + """ + Only return transactions that were created during the given date interval. + """ + currency: NotRequired[str] + """ + Only return transactions in a certain currency. 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). + """ + 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. + """ + payout: NotRequired[str] + """ + For automatic Stripe payouts only, only returns transactions that were paid out on the specified payout ID. + """ + source: NotRequired[str] + """ + Only returns the original transaction. + """ + 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. + """ + type: NotRequired[str] + """ + Only returns transactions of the given type. One of: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `climate_order_purchase`, `climate_order_refund`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `obligation_outbound`, `obligation_reversal_inbound`, `payment`, `payment_failure_refund`, `payment_network_reserve_hold`, `payment_network_reserve_release`, `payment_refund`, `payment_reversal`, `payment_unreconciled`, `payout`, `payout_cancel`, `payout_failure`, `payout_minimum_balance_hold`, `payout_minimum_balance_release`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `stripe_fee`, `stripe_fx_fee`, `stripe_balance_payment_debit`, `stripe_balance_payment_debit_reversal`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`. + """ + + +class BalanceTransactionListParamsCreated(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/_balance_transaction_retrieve_params.py b/stripe/params/_balance_transaction_retrieve_params.py new file mode 100644 index 000000000..b674c88c0 --- /dev/null +++ b/stripe/params/_balance_transaction_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 BalanceTransactionRetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_bank_account_delete_params.py b/stripe/params/_bank_account_delete_params.py new file mode 100644 index 000000000..e804f5bf6 --- /dev/null +++ b/stripe/params/_bank_account_delete_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions + + +class BankAccountDeleteParams(RequestOptions): + pass diff --git a/stripe/params/_card_delete_params.py b/stripe/params/_card_delete_params.py new file mode 100644 index 000000000..6e56a15f5 --- /dev/null +++ b/stripe/params/_card_delete_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions + + +class CardDeleteParams(RequestOptions): + pass diff --git a/stripe/params/_charge_capture_params.py b/stripe/params/_charge_capture_params.py new file mode 100644 index 000000000..06cfc7366 --- /dev/null +++ b/stripe/params/_charge_capture_params.py @@ -0,0 +1,763 @@ +# -*- 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, TypedDict + + +class ChargeCaptureParams(RequestOptions): + amount: NotRequired[int] + """ + The amount to capture, which must be less than or equal to the original amount. + """ + application_fee: NotRequired[int] + """ + An application fee to add on to this charge. + """ + application_fee_amount: NotRequired[int] + """ + An application fee amount to add on to this charge, which must be less than or equal to the original amount. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + payment_details: NotRequired["ChargeCaptureParamsPaymentDetails"] + """ + Provides industry-specific information about the charge. + """ + receipt_email: NotRequired[str] + """ + The email address to send this charge's receipt to. This will override the previously-specified email address for this charge, if one was set. Receipts will not be sent in test mode. + """ + statement_descriptor: NotRequired[str] + """ + For a non-card charge, text that appears on the customer's statement as the statement descriptor. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see [the Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors). + + For a card charge, this value is ignored unless you don't specify a `statement_descriptor_suffix`, in which case this value is used as the suffix. + """ + statement_descriptor_suffix: NotRequired[str] + """ + Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. If the account has no prefix value, the suffix is concatenated to the account's statement descriptor. + """ + transfer_data: NotRequired["ChargeCaptureParamsTransferData"] + """ + An optional dictionary including the account to automatically transfer to as part of a destination charge. [See the Connect documentation](https://stripe.com/docs/connect/destination-charges) for details. + """ + transfer_group: NotRequired[str] + """ + A string that identifies this transaction as part of a group. `transfer_group` may only be provided if it has not been set. See the [Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-options) for details. + """ + + +class ChargeCaptureParamsPaymentDetails(TypedDict): + car_rental: NotRequired["ChargeCaptureParamsPaymentDetailsCarRental"] + """ + Car rental details for this PaymentIntent. + """ + customer_reference: NotRequired["Literal['']|str"] + """ + Some customers might be required by their company or organization to provide this information. If so, provide this value. Otherwise you can ignore this field. + """ + event_details: NotRequired["ChargeCaptureParamsPaymentDetailsEventDetails"] + """ + Event details for this PaymentIntent + """ + flight: NotRequired["ChargeCaptureParamsPaymentDetailsFlight"] + """ + Flight reservation details for this PaymentIntent + """ + lodging: NotRequired["ChargeCaptureParamsPaymentDetailsLodging"] + """ + Lodging reservation details for this PaymentIntent + """ + order_reference: NotRequired["Literal['']|str"] + """ + A unique value assigned by the business to identify the transaction. + """ + subscription: NotRequired["ChargeCaptureParamsPaymentDetailsSubscription"] + """ + Subscription details for this PaymentIntent + """ + + +class ChargeCaptureParamsPaymentDetailsCarRental(TypedDict): + affiliate: NotRequired[ + "ChargeCaptureParamsPaymentDetailsCarRentalAffiliate" + ] + """ + Affiliate details for this purchase. + """ + booking_number: str + """ + The booking number associated with the car rental. + """ + car_class_code: NotRequired[str] + """ + Class code of the car. + """ + car_make: NotRequired[str] + """ + Make of the car. + """ + car_model: NotRequired[str] + """ + Model of the car. + """ + company: NotRequired[str] + """ + The name of the rental car company. + """ + customer_service_phone_number: NotRequired[str] + """ + The customer service phone number of the car rental company. + """ + days_rented: int + """ + Number of days the car is being rented. + """ + delivery: NotRequired["ChargeCaptureParamsPaymentDetailsCarRentalDelivery"] + """ + Delivery details for this purchase. + """ + distance: NotRequired["ChargeCaptureParamsPaymentDetailsCarRentalDistance"] + """ + The details of the distance traveled during the rental period. + """ + drivers: NotRequired[ + List["ChargeCaptureParamsPaymentDetailsCarRentalDriver"] + ] + """ + The details of the passengers in the travel reservation + """ + extra_charges: NotRequired[ + List[ + Literal[ + "extra_mileage", + "gas", + "late_return", + "one_way_service", + "parking_violation", + ] + ] + ] + """ + List of additional charges being billed. + """ + no_show: NotRequired[bool] + """ + Indicates if the customer did not keep nor cancel their booking. + """ + pickup_address: NotRequired[ + "ChargeCaptureParamsPaymentDetailsCarRentalPickupAddress" + ] + """ + Car pick-up address. + """ + pickup_at: int + """ + Car pick-up time. Measured in seconds since the Unix epoch. + """ + pickup_location_name: NotRequired[str] + """ + Name of the pickup location. + """ + rate_amount: NotRequired[int] + """ + Rental rate. + """ + rate_interval: NotRequired[Literal["day", "month", "week"]] + """ + The frequency at which the rate amount is applied. One of `day`, `week` or `month` + """ + renter_name: NotRequired[str] + """ + The name of the person or entity renting the car. + """ + return_address: NotRequired[ + "ChargeCaptureParamsPaymentDetailsCarRentalReturnAddress" + ] + """ + Car return address. + """ + return_at: int + """ + Car return time. Measured in seconds since the Unix epoch. + """ + return_location_name: NotRequired[str] + """ + Name of the return location. + """ + tax_exempt: NotRequired[bool] + """ + Indicates whether the goods or services are tax-exempt or tax is not collected. + """ + vehicle_identification_number: NotRequired[str] + """ + The vehicle identification number. + """ + + +class ChargeCaptureParamsPaymentDetailsCarRentalAffiliate(TypedDict): + name: str + """ + The name of the affiliate that originated the purchase. + """ + + +class ChargeCaptureParamsPaymentDetailsCarRentalDelivery(TypedDict): + mode: NotRequired[Literal["email", "phone", "pickup", "post"]] + """ + The delivery method for the payment + """ + recipient: NotRequired[ + "ChargeCaptureParamsPaymentDetailsCarRentalDeliveryRecipient" + ] + """ + Details of the recipient. + """ + + +class ChargeCaptureParamsPaymentDetailsCarRentalDeliveryRecipient(TypedDict): + email: NotRequired[str] + """ + The email of the recipient the ticket is delivered to. + """ + name: NotRequired[str] + """ + The name of the recipient the ticket is delivered to. + """ + phone: NotRequired[str] + """ + The phone number of the recipient the ticket is delivered to. + """ + + +class ChargeCaptureParamsPaymentDetailsCarRentalDistance(TypedDict): + amount: NotRequired[int] + """ + Distance traveled. + """ + unit: NotRequired[Literal["kilometers", "miles"]] + """ + Unit of measurement for the distance traveled. One of `miles` or `kilometers`. + """ + + +class ChargeCaptureParamsPaymentDetailsCarRentalDriver(TypedDict): + driver_identification_number: NotRequired[str] + """ + Driver's identification number. + """ + driver_tax_number: NotRequired[str] + """ + Driver's tax number. + """ + name: str + """ + Full name of the person or entity on the car reservation. + """ + + +class ChargeCaptureParamsPaymentDetailsCarRentalPickupAddress(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. + """ + + +class ChargeCaptureParamsPaymentDetailsCarRentalReturnAddress(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. + """ + + +class ChargeCaptureParamsPaymentDetailsEventDetails(TypedDict): + access_controlled_venue: NotRequired[bool] + """ + Indicates if the tickets are digitally checked when entering the venue. + """ + address: NotRequired[ + "ChargeCaptureParamsPaymentDetailsEventDetailsAddress" + ] + """ + The event location's address. + """ + affiliate: NotRequired[ + "ChargeCaptureParamsPaymentDetailsEventDetailsAffiliate" + ] + """ + Affiliate details for this purchase. + """ + company: NotRequired[str] + """ + The name of the company + """ + delivery: NotRequired[ + "ChargeCaptureParamsPaymentDetailsEventDetailsDelivery" + ] + """ + Delivery details for this purchase. + """ + ends_at: NotRequired[int] + """ + Event end time. Measured in seconds since the Unix epoch. + """ + genre: NotRequired[str] + """ + Type of the event entertainment (concert, sports event etc) + """ + name: str + """ + The name of the event. + """ + starts_at: NotRequired[int] + """ + Event start time. Measured in seconds since the Unix epoch. + """ + + +class ChargeCaptureParamsPaymentDetailsEventDetailsAddress(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. + """ + + +class ChargeCaptureParamsPaymentDetailsEventDetailsAffiliate(TypedDict): + name: str + """ + The name of the affiliate that originated the purchase. + """ + + +class ChargeCaptureParamsPaymentDetailsEventDetailsDelivery(TypedDict): + mode: NotRequired[Literal["email", "phone", "pickup", "post"]] + """ + The delivery method for the payment + """ + recipient: NotRequired[ + "ChargeCaptureParamsPaymentDetailsEventDetailsDeliveryRecipient" + ] + """ + Details of the recipient. + """ + + +class ChargeCaptureParamsPaymentDetailsEventDetailsDeliveryRecipient( + TypedDict +): + email: NotRequired[str] + """ + The email of the recipient the ticket is delivered to. + """ + name: NotRequired[str] + """ + The name of the recipient the ticket is delivered to. + """ + phone: NotRequired[str] + """ + The phone number of the recipient the ticket is delivered to. + """ + + +class ChargeCaptureParamsPaymentDetailsFlight(TypedDict): + affiliate: NotRequired["ChargeCaptureParamsPaymentDetailsFlightAffiliate"] + """ + Affiliate details for this purchase. + """ + agency_number: NotRequired[str] + """ + The agency number (i.e. International Air Transport Association (IATA) agency number) of the travel agency that made the booking. + """ + carrier: NotRequired[str] + """ + The International Air Transport Association (IATA) carrier code of the carrier that issued the ticket. + """ + delivery: NotRequired["ChargeCaptureParamsPaymentDetailsFlightDelivery"] + """ + Delivery details for this purchase. + """ + passenger_name: NotRequired[str] + """ + The name of the person or entity on the reservation. + """ + passengers: NotRequired[ + List["ChargeCaptureParamsPaymentDetailsFlightPassenger"] + ] + """ + The details of the passengers in the travel reservation. + """ + segments: List["ChargeCaptureParamsPaymentDetailsFlightSegment"] + """ + The individual flight segments associated with the trip. + """ + ticket_number: NotRequired[str] + """ + The ticket number associated with the travel reservation. + """ + + +class ChargeCaptureParamsPaymentDetailsFlightAffiliate(TypedDict): + name: str + """ + The name of the affiliate that originated the purchase. + """ + + +class ChargeCaptureParamsPaymentDetailsFlightDelivery(TypedDict): + mode: NotRequired[Literal["email", "phone", "pickup", "post"]] + """ + The delivery method for the payment + """ + recipient: NotRequired[ + "ChargeCaptureParamsPaymentDetailsFlightDeliveryRecipient" + ] + """ + Details of the recipient. + """ + + +class ChargeCaptureParamsPaymentDetailsFlightDeliveryRecipient(TypedDict): + email: NotRequired[str] + """ + The email of the recipient the ticket is delivered to. + """ + name: NotRequired[str] + """ + The name of the recipient the ticket is delivered to. + """ + phone: NotRequired[str] + """ + The phone number of the recipient the ticket is delivered to. + """ + + +class ChargeCaptureParamsPaymentDetailsFlightPassenger(TypedDict): + name: str + """ + Full name of the person or entity on the flight reservation. + """ + + +class ChargeCaptureParamsPaymentDetailsFlightSegment(TypedDict): + amount: NotRequired[int] + """ + The flight segment amount. + """ + arrival_airport: NotRequired[str] + """ + The International Air Transport Association (IATA) airport code for the arrival airport. + """ + arrives_at: NotRequired[int] + """ + The arrival time for the flight segment. Measured in seconds since the Unix epoch. + """ + carrier: NotRequired[str] + """ + The International Air Transport Association (IATA) carrier code of the carrier operating the flight segment. + """ + departs_at: int + """ + The departure time for the flight segment. Measured in seconds since the Unix epoch. + """ + departure_airport: NotRequired[str] + """ + The International Air Transport Association (IATA) airport code for the departure airport. + """ + flight_number: NotRequired[str] + """ + The flight number associated with the segment + """ + service_class: NotRequired[ + Literal["business", "economy", "first", "premium_economy"] + ] + """ + The fare class for the segment. + """ + + +class ChargeCaptureParamsPaymentDetailsLodging(TypedDict): + address: NotRequired["ChargeCaptureParamsPaymentDetailsLodgingAddress"] + """ + The lodging location's address. + """ + adults: NotRequired[int] + """ + The number of adults on the booking + """ + affiliate: NotRequired["ChargeCaptureParamsPaymentDetailsLodgingAffiliate"] + """ + Affiliate details for this purchase. + """ + booking_number: NotRequired[str] + """ + The booking number associated with the lodging reservation. + """ + category: NotRequired[Literal["hotel", "vacation_rental"]] + """ + The lodging category + """ + checkin_at: int + """ + Lodging check-in time. Measured in seconds since the Unix epoch. + """ + checkout_at: int + """ + Lodging check-out time. Measured in seconds since the Unix epoch. + """ + customer_service_phone_number: NotRequired[str] + """ + The customer service phone number of the lodging company. + """ + daily_room_rate_amount: NotRequired[int] + """ + The daily lodging room rate. + """ + delivery: NotRequired["ChargeCaptureParamsPaymentDetailsLodgingDelivery"] + """ + Delivery details for this purchase. + """ + extra_charges: NotRequired[ + List[ + Literal[ + "gift_shop", + "laundry", + "mini_bar", + "other", + "restaurant", + "telephone", + ] + ] + ] + """ + List of additional charges being billed. + """ + fire_safety_act_compliance: NotRequired[bool] + """ + Indicates whether the lodging location is compliant with the Fire Safety Act. + """ + name: NotRequired[str] + """ + The name of the lodging location. + """ + no_show: NotRequired[bool] + """ + Indicates if the customer did not keep their booking while failing to cancel the reservation. + """ + number_of_rooms: NotRequired[int] + """ + The number of rooms on the booking + """ + passengers: NotRequired[ + List["ChargeCaptureParamsPaymentDetailsLodgingPassenger"] + ] + """ + The details of the passengers in the travel reservation + """ + property_phone_number: NotRequired[str] + """ + The phone number of the lodging location. + """ + room_class: NotRequired[str] + """ + The room class for this purchase. + """ + room_nights: NotRequired[int] + """ + The number of room nights + """ + total_room_tax_amount: NotRequired[int] + """ + The total tax amount associating with the room reservation. + """ + total_tax_amount: NotRequired[int] + """ + The total tax amount + """ + + +class ChargeCaptureParamsPaymentDetailsLodgingAddress(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. + """ + + +class ChargeCaptureParamsPaymentDetailsLodgingAffiliate(TypedDict): + name: str + """ + The name of the affiliate that originated the purchase. + """ + + +class ChargeCaptureParamsPaymentDetailsLodgingDelivery(TypedDict): + mode: NotRequired[Literal["email", "phone", "pickup", "post"]] + """ + The delivery method for the payment + """ + recipient: NotRequired[ + "ChargeCaptureParamsPaymentDetailsLodgingDeliveryRecipient" + ] + """ + Details of the recipient. + """ + + +class ChargeCaptureParamsPaymentDetailsLodgingDeliveryRecipient(TypedDict): + email: NotRequired[str] + """ + The email of the recipient the ticket is delivered to. + """ + name: NotRequired[str] + """ + The name of the recipient the ticket is delivered to. + """ + phone: NotRequired[str] + """ + The phone number of the recipient the ticket is delivered to. + """ + + +class ChargeCaptureParamsPaymentDetailsLodgingPassenger(TypedDict): + name: str + """ + Full name of the person or entity on the lodging reservation. + """ + + +class ChargeCaptureParamsPaymentDetailsSubscription(TypedDict): + affiliate: NotRequired[ + "ChargeCaptureParamsPaymentDetailsSubscriptionAffiliate" + ] + """ + Affiliate details for this purchase. + """ + auto_renewal: NotRequired[bool] + """ + Info whether the subscription will be auto renewed upon expiry. + """ + billing_interval: NotRequired[ + "ChargeCaptureParamsPaymentDetailsSubscriptionBillingInterval" + ] + """ + Subscription billing details for this purchase. + """ + ends_at: NotRequired[int] + """ + Subscription end time. Measured in seconds since the Unix epoch. + """ + name: str + """ + Name of the product on subscription. e.g. Apple Music Subscription + """ + starts_at: NotRequired[int] + """ + Subscription start time. Measured in seconds since the Unix epoch. + """ + + +class ChargeCaptureParamsPaymentDetailsSubscriptionAffiliate(TypedDict): + name: str + """ + The name of the affiliate that originated the purchase. + """ + + +class ChargeCaptureParamsPaymentDetailsSubscriptionBillingInterval(TypedDict): + count: int + """ + The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + """ + interval: Literal["day", "month", "week", "year"] + """ + Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + """ + + +class ChargeCaptureParamsTransferData(TypedDict): + amount: NotRequired[int] + """ + The amount transferred to the destination account, if specified. By default, the entire charge amount is transferred to the destination account. + """ diff --git a/stripe/params/_charge_create_params.py b/stripe/params/_charge_create_params.py new file mode 100644 index 000000000..a305b0f81 --- /dev/null +++ b/stripe/params/_charge_create_params.py @@ -0,0 +1,159 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class ChargeCreateParams(RequestOptions): + amount: NotRequired[int] + """ + Amount intended to be collected by this payment. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). + """ + application_fee: NotRequired[int] + application_fee_amount: NotRequired[int] + """ + A fee in cents (or local equivalent) that will be applied to the charge and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the `Stripe-Account` header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/connect/direct-charges#collect-fees). + """ + capture: NotRequired[bool] + """ + Whether to immediately capture the charge. Defaults to `true`. When `false`, the charge issues an authorization (or pre-authorization), and will need to be [captured](https://stripe.com/docs/api#capture_charge) later. Uncaptured charges expire after a set number of days (7 by default). For more information, see the [authorizing charges and settling later](https://stripe.com/docs/charges/placing-a-hold) documentation. + """ + currency: NotRequired[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). + """ + customer: NotRequired[str] + """ + The ID of an existing customer that will be charged in this request. + """ + description: NotRequired[str] + """ + An arbitrary string which you can attach to a `Charge` object. It is displayed when in the web interface alongside the charge. Note that if you use Stripe to send automatic email receipts to your customers, your receipt emails will include the `description` of the charge(s) that they are describing. + """ + destination: NotRequired["ChargeCreateParamsDestination"] + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + on_behalf_of: NotRequired[str] + """ + The Stripe account ID for which these funds are intended. Automatically set if you use the `destination` parameter. For details, see [Creating Separate Charges and Transfers](https://stripe.com/docs/connect/separate-charges-and-transfers#settlement-merchant). + """ + radar_options: NotRequired["ChargeCreateParamsRadarOptions"] + """ + Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. + """ + receipt_email: NotRequired[str] + """ + The email address to which this charge's [receipt](https://stripe.com/docs/dashboard/receipts) will be sent. The receipt will not be sent until the charge is paid, and no receipts will be sent for test mode charges. If this charge is for a [Customer](https://stripe.com/docs/api/customers/object), the email address specified here will override the customer's email address. If `receipt_email` is specified for a charge in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). + """ + shipping: NotRequired["ChargeCreateParamsShipping"] + """ + Shipping information for the charge. Helps prevent fraud on charges for physical goods. + """ + source: NotRequired[str] + """ + A payment source to be charged. This can be the ID of a [card](https://stripe.com/docs/api#cards) (i.e., credit or debit card), a [bank account](https://stripe.com/docs/api#bank_accounts), a [source](https://stripe.com/docs/api#sources), a [token](https://stripe.com/docs/api#tokens), or a [connected account](https://stripe.com/docs/connect/account-debits#charging-a-connected-account). For certain sources---namely, [cards](https://stripe.com/docs/api#cards), [bank accounts](https://stripe.com/docs/api#bank_accounts), and attached [sources](https://stripe.com/docs/api#sources)---you must also pass the ID of the associated customer. + """ + statement_descriptor: NotRequired[str] + """ + For a non-card charge, text that appears on the customer's statement as the statement descriptor. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see [the Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors). + + For a card charge, this value is ignored unless you don't specify a `statement_descriptor_suffix`, in which case this value is used as the suffix. + """ + statement_descriptor_suffix: NotRequired[str] + """ + Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. If the account has no prefix value, the suffix is concatenated to the account's statement descriptor. + """ + transfer_data: NotRequired["ChargeCreateParamsTransferData"] + """ + An optional dictionary including the account to automatically transfer to as part of a destination charge. [See the Connect documentation](https://stripe.com/docs/connect/destination-charges) for details. + """ + transfer_group: NotRequired[str] + """ + A string that identifies this transaction as part of a group. For details, see [Grouping transactions](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-options). + """ + + +class ChargeCreateParamsDestination(TypedDict): + account: str + """ + ID of an existing, connected Stripe account. + """ + amount: NotRequired[int] + """ + The amount to transfer to the destination account without creating an `Application Fee` object. Cannot be combined with the `application_fee` parameter. Must be less than or equal to the charge amount. + """ + + +class ChargeCreateParamsRadarOptions(TypedDict): + session: NotRequired[str] + """ + A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. + """ + + +class ChargeCreateParamsShipping(TypedDict): + address: "ChargeCreateParamsShippingAddress" + """ + Shipping address. + """ + carrier: NotRequired[str] + """ + The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. + """ + name: str + """ + Recipient name. + """ + phone: NotRequired[str] + """ + Recipient phone (including extension). + """ + tracking_number: NotRequired[str] + """ + The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. + """ + + +class ChargeCreateParamsShippingAddress(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. + """ + + +class ChargeCreateParamsTransferData(TypedDict): + amount: NotRequired[int] + """ + The amount transferred to the destination account, if specified. By default, the entire charge amount is transferred to the destination account. + """ + destination: str + """ + ID of an existing, connected Stripe account. + """ diff --git a/stripe/params/_charge_list_params.py b/stripe/params/_charge_list_params.py new file mode 100644 index 000000000..748fb6b51 --- /dev/null +++ b/stripe/params/_charge_list_params.py @@ -0,0 +1,59 @@ +# -*- 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 ChargeListParams(RequestOptions): + created: NotRequired["ChargeListParamsCreated|int"] + """ + Only return charges that were created during the given date interval. + """ + customer: NotRequired[str] + """ + Only return charges for the customer specified by this customer ID. + """ + 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. + """ + payment_intent: NotRequired[str] + """ + Only return charges that were created by the PaymentIntent specified by this PaymentIntent ID. + """ + 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. + """ + transfer_group: NotRequired[str] + """ + Only return charges for this transfer group, limited to 100. + """ + + +class ChargeListParamsCreated(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/_charge_list_refunds_params.py b/stripe/params/_charge_list_refunds_params.py new file mode 100644 index 000000000..6971b3ca5 --- /dev/null +++ b/stripe/params/_charge_list_refunds_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 ChargeListRefundsParams(RequestOptions): + 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. + """ diff --git a/stripe/params/_charge_modify_params.py b/stripe/params/_charge_modify_params.py new file mode 100644 index 000000000..fffde305e --- /dev/null +++ b/stripe/params/_charge_modify_params.py @@ -0,0 +1,803 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List, Union +from typing_extensions import Literal, NotRequired, TypedDict + + +class ChargeModifyParams(RequestOptions): + customer: NotRequired[str] + """ + The ID of an existing customer that will be associated with this request. This field may only be updated if there is no existing associated customer with this charge. + """ + description: NotRequired[str] + """ + An arbitrary string which you can attach to a charge object. It is displayed when in the web interface alongside the charge. Note that if you use Stripe to send automatic email receipts to your customers, your receipt emails will include the `description` of the charge(s) that they are describing. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + fraud_details: NotRequired["ChargeModifyParamsFraudDetails"] + """ + A set of key-value pairs you can attach to a charge giving information about its riskiness. If you believe a charge is fraudulent, include a `user_report` key with a value of `fraudulent`. If you believe a charge is safe, include a `user_report` key with a value of `safe`. Stripe will use the information you send to improve our fraud detection algorithms. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + payment_details: NotRequired["ChargeModifyParamsPaymentDetails"] + """ + Provides industry-specific information about the charge. + """ + receipt_email: NotRequired[str] + """ + This is the email address that the receipt for this charge will be sent to. If this field is updated, then a new email receipt will be sent to the updated address. + """ + shipping: NotRequired["ChargeModifyParamsShipping"] + """ + Shipping information for the charge. Helps prevent fraud on charges for physical goods. + """ + transfer_group: NotRequired[str] + """ + A string that identifies this transaction as part of a group. `transfer_group` may only be provided if it has not been set. See the [Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-options) for details. + """ + + +class ChargeModifyParamsFraudDetails(TypedDict): + user_report: Union[Literal[""], Literal["fraudulent", "safe"]] + """ + Either `safe` or `fraudulent`. + """ + + +class ChargeModifyParamsPaymentDetails(TypedDict): + car_rental: NotRequired["ChargeModifyParamsPaymentDetailsCarRental"] + """ + Car rental details for this PaymentIntent. + """ + customer_reference: NotRequired["Literal['']|str"] + """ + Some customers might be required by their company or organization to provide this information. If so, provide this value. Otherwise you can ignore this field. + """ + event_details: NotRequired["ChargeModifyParamsPaymentDetailsEventDetails"] + """ + Event details for this PaymentIntent + """ + flight: NotRequired["ChargeModifyParamsPaymentDetailsFlight"] + """ + Flight reservation details for this PaymentIntent + """ + lodging: NotRequired["ChargeModifyParamsPaymentDetailsLodging"] + """ + Lodging reservation details for this PaymentIntent + """ + order_reference: NotRequired["Literal['']|str"] + """ + A unique value assigned by the business to identify the transaction. + """ + subscription: NotRequired["ChargeModifyParamsPaymentDetailsSubscription"] + """ + Subscription details for this PaymentIntent + """ + + +class ChargeModifyParamsPaymentDetailsCarRental(TypedDict): + affiliate: NotRequired[ + "ChargeModifyParamsPaymentDetailsCarRentalAffiliate" + ] + """ + Affiliate details for this purchase. + """ + booking_number: str + """ + The booking number associated with the car rental. + """ + car_class_code: NotRequired[str] + """ + Class code of the car. + """ + car_make: NotRequired[str] + """ + Make of the car. + """ + car_model: NotRequired[str] + """ + Model of the car. + """ + company: NotRequired[str] + """ + The name of the rental car company. + """ + customer_service_phone_number: NotRequired[str] + """ + The customer service phone number of the car rental company. + """ + days_rented: int + """ + Number of days the car is being rented. + """ + delivery: NotRequired["ChargeModifyParamsPaymentDetailsCarRentalDelivery"] + """ + Delivery details for this purchase. + """ + distance: NotRequired["ChargeModifyParamsPaymentDetailsCarRentalDistance"] + """ + The details of the distance traveled during the rental period. + """ + drivers: NotRequired[ + List["ChargeModifyParamsPaymentDetailsCarRentalDriver"] + ] + """ + The details of the passengers in the travel reservation + """ + extra_charges: NotRequired[ + List[ + Literal[ + "extra_mileage", + "gas", + "late_return", + "one_way_service", + "parking_violation", + ] + ] + ] + """ + List of additional charges being billed. + """ + no_show: NotRequired[bool] + """ + Indicates if the customer did not keep nor cancel their booking. + """ + pickup_address: NotRequired[ + "ChargeModifyParamsPaymentDetailsCarRentalPickupAddress" + ] + """ + Car pick-up address. + """ + pickup_at: int + """ + Car pick-up time. Measured in seconds since the Unix epoch. + """ + pickup_location_name: NotRequired[str] + """ + Name of the pickup location. + """ + rate_amount: NotRequired[int] + """ + Rental rate. + """ + rate_interval: NotRequired[Literal["day", "month", "week"]] + """ + The frequency at which the rate amount is applied. One of `day`, `week` or `month` + """ + renter_name: NotRequired[str] + """ + The name of the person or entity renting the car. + """ + return_address: NotRequired[ + "ChargeModifyParamsPaymentDetailsCarRentalReturnAddress" + ] + """ + Car return address. + """ + return_at: int + """ + Car return time. Measured in seconds since the Unix epoch. + """ + return_location_name: NotRequired[str] + """ + Name of the return location. + """ + tax_exempt: NotRequired[bool] + """ + Indicates whether the goods or services are tax-exempt or tax is not collected. + """ + vehicle_identification_number: NotRequired[str] + """ + The vehicle identification number. + """ + + +class ChargeModifyParamsPaymentDetailsCarRentalAffiliate(TypedDict): + name: str + """ + The name of the affiliate that originated the purchase. + """ + + +class ChargeModifyParamsPaymentDetailsCarRentalDelivery(TypedDict): + mode: NotRequired[Literal["email", "phone", "pickup", "post"]] + """ + The delivery method for the payment + """ + recipient: NotRequired[ + "ChargeModifyParamsPaymentDetailsCarRentalDeliveryRecipient" + ] + """ + Details of the recipient. + """ + + +class ChargeModifyParamsPaymentDetailsCarRentalDeliveryRecipient(TypedDict): + email: NotRequired[str] + """ + The email of the recipient the ticket is delivered to. + """ + name: NotRequired[str] + """ + The name of the recipient the ticket is delivered to. + """ + phone: NotRequired[str] + """ + The phone number of the recipient the ticket is delivered to. + """ + + +class ChargeModifyParamsPaymentDetailsCarRentalDistance(TypedDict): + amount: NotRequired[int] + """ + Distance traveled. + """ + unit: NotRequired[Literal["kilometers", "miles"]] + """ + Unit of measurement for the distance traveled. One of `miles` or `kilometers`. + """ + + +class ChargeModifyParamsPaymentDetailsCarRentalDriver(TypedDict): + driver_identification_number: NotRequired[str] + """ + Driver's identification number. + """ + driver_tax_number: NotRequired[str] + """ + Driver's tax number. + """ + name: str + """ + Full name of the person or entity on the car reservation. + """ + + +class ChargeModifyParamsPaymentDetailsCarRentalPickupAddress(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. + """ + + +class ChargeModifyParamsPaymentDetailsCarRentalReturnAddress(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. + """ + + +class ChargeModifyParamsPaymentDetailsEventDetails(TypedDict): + access_controlled_venue: NotRequired[bool] + """ + Indicates if the tickets are digitally checked when entering the venue. + """ + address: NotRequired["ChargeModifyParamsPaymentDetailsEventDetailsAddress"] + """ + The event location's address. + """ + affiliate: NotRequired[ + "ChargeModifyParamsPaymentDetailsEventDetailsAffiliate" + ] + """ + Affiliate details for this purchase. + """ + company: NotRequired[str] + """ + The name of the company + """ + delivery: NotRequired[ + "ChargeModifyParamsPaymentDetailsEventDetailsDelivery" + ] + """ + Delivery details for this purchase. + """ + ends_at: NotRequired[int] + """ + Event end time. Measured in seconds since the Unix epoch. + """ + genre: NotRequired[str] + """ + Type of the event entertainment (concert, sports event etc) + """ + name: str + """ + The name of the event. + """ + starts_at: NotRequired[int] + """ + Event start time. Measured in seconds since the Unix epoch. + """ + + +class ChargeModifyParamsPaymentDetailsEventDetailsAddress(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. + """ + + +class ChargeModifyParamsPaymentDetailsEventDetailsAffiliate(TypedDict): + name: str + """ + The name of the affiliate that originated the purchase. + """ + + +class ChargeModifyParamsPaymentDetailsEventDetailsDelivery(TypedDict): + mode: NotRequired[Literal["email", "phone", "pickup", "post"]] + """ + The delivery method for the payment + """ + recipient: NotRequired[ + "ChargeModifyParamsPaymentDetailsEventDetailsDeliveryRecipient" + ] + """ + Details of the recipient. + """ + + +class ChargeModifyParamsPaymentDetailsEventDetailsDeliveryRecipient(TypedDict): + email: NotRequired[str] + """ + The email of the recipient the ticket is delivered to. + """ + name: NotRequired[str] + """ + The name of the recipient the ticket is delivered to. + """ + phone: NotRequired[str] + """ + The phone number of the recipient the ticket is delivered to. + """ + + +class ChargeModifyParamsPaymentDetailsFlight(TypedDict): + affiliate: NotRequired["ChargeModifyParamsPaymentDetailsFlightAffiliate"] + """ + Affiliate details for this purchase. + """ + agency_number: NotRequired[str] + """ + The agency number (i.e. International Air Transport Association (IATA) agency number) of the travel agency that made the booking. + """ + carrier: NotRequired[str] + """ + The International Air Transport Association (IATA) carrier code of the carrier that issued the ticket. + """ + delivery: NotRequired["ChargeModifyParamsPaymentDetailsFlightDelivery"] + """ + Delivery details for this purchase. + """ + passenger_name: NotRequired[str] + """ + The name of the person or entity on the reservation. + """ + passengers: NotRequired[ + List["ChargeModifyParamsPaymentDetailsFlightPassenger"] + ] + """ + The details of the passengers in the travel reservation. + """ + segments: List["ChargeModifyParamsPaymentDetailsFlightSegment"] + """ + The individual flight segments associated with the trip. + """ + ticket_number: NotRequired[str] + """ + The ticket number associated with the travel reservation. + """ + + +class ChargeModifyParamsPaymentDetailsFlightAffiliate(TypedDict): + name: str + """ + The name of the affiliate that originated the purchase. + """ + + +class ChargeModifyParamsPaymentDetailsFlightDelivery(TypedDict): + mode: NotRequired[Literal["email", "phone", "pickup", "post"]] + """ + The delivery method for the payment + """ + recipient: NotRequired[ + "ChargeModifyParamsPaymentDetailsFlightDeliveryRecipient" + ] + """ + Details of the recipient. + """ + + +class ChargeModifyParamsPaymentDetailsFlightDeliveryRecipient(TypedDict): + email: NotRequired[str] + """ + The email of the recipient the ticket is delivered to. + """ + name: NotRequired[str] + """ + The name of the recipient the ticket is delivered to. + """ + phone: NotRequired[str] + """ + The phone number of the recipient the ticket is delivered to. + """ + + +class ChargeModifyParamsPaymentDetailsFlightPassenger(TypedDict): + name: str + """ + Full name of the person or entity on the flight reservation. + """ + + +class ChargeModifyParamsPaymentDetailsFlightSegment(TypedDict): + amount: NotRequired[int] + """ + The flight segment amount. + """ + arrival_airport: NotRequired[str] + """ + The International Air Transport Association (IATA) airport code for the arrival airport. + """ + arrives_at: NotRequired[int] + """ + The arrival time for the flight segment. Measured in seconds since the Unix epoch. + """ + carrier: NotRequired[str] + """ + The International Air Transport Association (IATA) carrier code of the carrier operating the flight segment. + """ + departs_at: int + """ + The departure time for the flight segment. Measured in seconds since the Unix epoch. + """ + departure_airport: NotRequired[str] + """ + The International Air Transport Association (IATA) airport code for the departure airport. + """ + flight_number: NotRequired[str] + """ + The flight number associated with the segment + """ + service_class: NotRequired[ + Literal["business", "economy", "first", "premium_economy"] + ] + """ + The fare class for the segment. + """ + + +class ChargeModifyParamsPaymentDetailsLodging(TypedDict): + address: NotRequired["ChargeModifyParamsPaymentDetailsLodgingAddress"] + """ + The lodging location's address. + """ + adults: NotRequired[int] + """ + The number of adults on the booking + """ + affiliate: NotRequired["ChargeModifyParamsPaymentDetailsLodgingAffiliate"] + """ + Affiliate details for this purchase. + """ + booking_number: NotRequired[str] + """ + The booking number associated with the lodging reservation. + """ + category: NotRequired[Literal["hotel", "vacation_rental"]] + """ + The lodging category + """ + checkin_at: int + """ + Lodging check-in time. Measured in seconds since the Unix epoch. + """ + checkout_at: int + """ + Lodging check-out time. Measured in seconds since the Unix epoch. + """ + customer_service_phone_number: NotRequired[str] + """ + The customer service phone number of the lodging company. + """ + daily_room_rate_amount: NotRequired[int] + """ + The daily lodging room rate. + """ + delivery: NotRequired["ChargeModifyParamsPaymentDetailsLodgingDelivery"] + """ + Delivery details for this purchase. + """ + extra_charges: NotRequired[ + List[ + Literal[ + "gift_shop", + "laundry", + "mini_bar", + "other", + "restaurant", + "telephone", + ] + ] + ] + """ + List of additional charges being billed. + """ + fire_safety_act_compliance: NotRequired[bool] + """ + Indicates whether the lodging location is compliant with the Fire Safety Act. + """ + name: NotRequired[str] + """ + The name of the lodging location. + """ + no_show: NotRequired[bool] + """ + Indicates if the customer did not keep their booking while failing to cancel the reservation. + """ + number_of_rooms: NotRequired[int] + """ + The number of rooms on the booking + """ + passengers: NotRequired[ + List["ChargeModifyParamsPaymentDetailsLodgingPassenger"] + ] + """ + The details of the passengers in the travel reservation + """ + property_phone_number: NotRequired[str] + """ + The phone number of the lodging location. + """ + room_class: NotRequired[str] + """ + The room class for this purchase. + """ + room_nights: NotRequired[int] + """ + The number of room nights + """ + total_room_tax_amount: NotRequired[int] + """ + The total tax amount associating with the room reservation. + """ + total_tax_amount: NotRequired[int] + """ + The total tax amount + """ + + +class ChargeModifyParamsPaymentDetailsLodgingAddress(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. + """ + + +class ChargeModifyParamsPaymentDetailsLodgingAffiliate(TypedDict): + name: str + """ + The name of the affiliate that originated the purchase. + """ + + +class ChargeModifyParamsPaymentDetailsLodgingDelivery(TypedDict): + mode: NotRequired[Literal["email", "phone", "pickup", "post"]] + """ + The delivery method for the payment + """ + recipient: NotRequired[ + "ChargeModifyParamsPaymentDetailsLodgingDeliveryRecipient" + ] + """ + Details of the recipient. + """ + + +class ChargeModifyParamsPaymentDetailsLodgingDeliveryRecipient(TypedDict): + email: NotRequired[str] + """ + The email of the recipient the ticket is delivered to. + """ + name: NotRequired[str] + """ + The name of the recipient the ticket is delivered to. + """ + phone: NotRequired[str] + """ + The phone number of the recipient the ticket is delivered to. + """ + + +class ChargeModifyParamsPaymentDetailsLodgingPassenger(TypedDict): + name: str + """ + Full name of the person or entity on the lodging reservation. + """ + + +class ChargeModifyParamsPaymentDetailsSubscription(TypedDict): + affiliate: NotRequired[ + "ChargeModifyParamsPaymentDetailsSubscriptionAffiliate" + ] + """ + Affiliate details for this purchase. + """ + auto_renewal: NotRequired[bool] + """ + Info whether the subscription will be auto renewed upon expiry. + """ + billing_interval: NotRequired[ + "ChargeModifyParamsPaymentDetailsSubscriptionBillingInterval" + ] + """ + Subscription billing details for this purchase. + """ + ends_at: NotRequired[int] + """ + Subscription end time. Measured in seconds since the Unix epoch. + """ + name: str + """ + Name of the product on subscription. e.g. Apple Music Subscription + """ + starts_at: NotRequired[int] + """ + Subscription start time. Measured in seconds since the Unix epoch. + """ + + +class ChargeModifyParamsPaymentDetailsSubscriptionAffiliate(TypedDict): + name: str + """ + The name of the affiliate that originated the purchase. + """ + + +class ChargeModifyParamsPaymentDetailsSubscriptionBillingInterval(TypedDict): + count: int + """ + The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + """ + interval: Literal["day", "month", "week", "year"] + """ + Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + """ + + +class ChargeModifyParamsShipping(TypedDict): + address: "ChargeModifyParamsShippingAddress" + """ + Shipping address. + """ + carrier: NotRequired[str] + """ + The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. + """ + name: str + """ + Recipient name. + """ + phone: NotRequired[str] + """ + Recipient phone (including extension). + """ + tracking_number: NotRequired[str] + """ + The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. + """ + + +class ChargeModifyParamsShippingAddress(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. + """ diff --git a/stripe/params/_charge_retrieve_params.py b/stripe/params/_charge_retrieve_params.py new file mode 100644 index 000000000..7f47da1dc --- /dev/null +++ b/stripe/params/_charge_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 ChargeRetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_charge_retrieve_refund_params.py b/stripe/params/_charge_retrieve_refund_params.py new file mode 100644 index 000000000..8e05f9faf --- /dev/null +++ b/stripe/params/_charge_retrieve_refund_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 ChargeRetrieveRefundParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_charge_search_params.py b/stripe/params/_charge_search_params.py new file mode 100644 index 000000000..a936ec939 --- /dev/null +++ b/stripe/params/_charge_search_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 ChargeSearchParams(RequestOptions): + 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. + """ + page: NotRequired[str] + """ + A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + """ + query: str + """ + The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for charges](https://stripe.com/docs/search#query-fields-for-charges). + """ diff --git a/stripe/params/_charge_update_params.py b/stripe/params/_charge_update_params.py new file mode 100644 index 000000000..e515c7fe9 --- /dev/null +++ b/stripe/params/_charge_update_params.py @@ -0,0 +1,802 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import Dict, List, Union +from typing_extensions import Literal, NotRequired, TypedDict + + +class ChargeUpdateParams(TypedDict): + customer: NotRequired[str] + """ + The ID of an existing customer that will be associated with this request. This field may only be updated if there is no existing associated customer with this charge. + """ + description: NotRequired[str] + """ + An arbitrary string which you can attach to a charge object. It is displayed when in the web interface alongside the charge. Note that if you use Stripe to send automatic email receipts to your customers, your receipt emails will include the `description` of the charge(s) that they are describing. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + fraud_details: NotRequired["ChargeUpdateParamsFraudDetails"] + """ + A set of key-value pairs you can attach to a charge giving information about its riskiness. If you believe a charge is fraudulent, include a `user_report` key with a value of `fraudulent`. If you believe a charge is safe, include a `user_report` key with a value of `safe`. Stripe will use the information you send to improve our fraud detection algorithms. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + payment_details: NotRequired["ChargeUpdateParamsPaymentDetails"] + """ + Provides industry-specific information about the charge. + """ + receipt_email: NotRequired[str] + """ + This is the email address that the receipt for this charge will be sent to. If this field is updated, then a new email receipt will be sent to the updated address. + """ + shipping: NotRequired["ChargeUpdateParamsShipping"] + """ + Shipping information for the charge. Helps prevent fraud on charges for physical goods. + """ + transfer_group: NotRequired[str] + """ + A string that identifies this transaction as part of a group. `transfer_group` may only be provided if it has not been set. See the [Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-options) for details. + """ + + +class ChargeUpdateParamsFraudDetails(TypedDict): + user_report: Union[Literal[""], Literal["fraudulent", "safe"]] + """ + Either `safe` or `fraudulent`. + """ + + +class ChargeUpdateParamsPaymentDetails(TypedDict): + car_rental: NotRequired["ChargeUpdateParamsPaymentDetailsCarRental"] + """ + Car rental details for this PaymentIntent. + """ + customer_reference: NotRequired["Literal['']|str"] + """ + Some customers might be required by their company or organization to provide this information. If so, provide this value. Otherwise you can ignore this field. + """ + event_details: NotRequired["ChargeUpdateParamsPaymentDetailsEventDetails"] + """ + Event details for this PaymentIntent + """ + flight: NotRequired["ChargeUpdateParamsPaymentDetailsFlight"] + """ + Flight reservation details for this PaymentIntent + """ + lodging: NotRequired["ChargeUpdateParamsPaymentDetailsLodging"] + """ + Lodging reservation details for this PaymentIntent + """ + order_reference: NotRequired["Literal['']|str"] + """ + A unique value assigned by the business to identify the transaction. + """ + subscription: NotRequired["ChargeUpdateParamsPaymentDetailsSubscription"] + """ + Subscription details for this PaymentIntent + """ + + +class ChargeUpdateParamsPaymentDetailsCarRental(TypedDict): + affiliate: NotRequired[ + "ChargeUpdateParamsPaymentDetailsCarRentalAffiliate" + ] + """ + Affiliate details for this purchase. + """ + booking_number: str + """ + The booking number associated with the car rental. + """ + car_class_code: NotRequired[str] + """ + Class code of the car. + """ + car_make: NotRequired[str] + """ + Make of the car. + """ + car_model: NotRequired[str] + """ + Model of the car. + """ + company: NotRequired[str] + """ + The name of the rental car company. + """ + customer_service_phone_number: NotRequired[str] + """ + The customer service phone number of the car rental company. + """ + days_rented: int + """ + Number of days the car is being rented. + """ + delivery: NotRequired["ChargeUpdateParamsPaymentDetailsCarRentalDelivery"] + """ + Delivery details for this purchase. + """ + distance: NotRequired["ChargeUpdateParamsPaymentDetailsCarRentalDistance"] + """ + The details of the distance traveled during the rental period. + """ + drivers: NotRequired[ + List["ChargeUpdateParamsPaymentDetailsCarRentalDriver"] + ] + """ + The details of the passengers in the travel reservation + """ + extra_charges: NotRequired[ + List[ + Literal[ + "extra_mileage", + "gas", + "late_return", + "one_way_service", + "parking_violation", + ] + ] + ] + """ + List of additional charges being billed. + """ + no_show: NotRequired[bool] + """ + Indicates if the customer did not keep nor cancel their booking. + """ + pickup_address: NotRequired[ + "ChargeUpdateParamsPaymentDetailsCarRentalPickupAddress" + ] + """ + Car pick-up address. + """ + pickup_at: int + """ + Car pick-up time. Measured in seconds since the Unix epoch. + """ + pickup_location_name: NotRequired[str] + """ + Name of the pickup location. + """ + rate_amount: NotRequired[int] + """ + Rental rate. + """ + rate_interval: NotRequired[Literal["day", "month", "week"]] + """ + The frequency at which the rate amount is applied. One of `day`, `week` or `month` + """ + renter_name: NotRequired[str] + """ + The name of the person or entity renting the car. + """ + return_address: NotRequired[ + "ChargeUpdateParamsPaymentDetailsCarRentalReturnAddress" + ] + """ + Car return address. + """ + return_at: int + """ + Car return time. Measured in seconds since the Unix epoch. + """ + return_location_name: NotRequired[str] + """ + Name of the return location. + """ + tax_exempt: NotRequired[bool] + """ + Indicates whether the goods or services are tax-exempt or tax is not collected. + """ + vehicle_identification_number: NotRequired[str] + """ + The vehicle identification number. + """ + + +class ChargeUpdateParamsPaymentDetailsCarRentalAffiliate(TypedDict): + name: str + """ + The name of the affiliate that originated the purchase. + """ + + +class ChargeUpdateParamsPaymentDetailsCarRentalDelivery(TypedDict): + mode: NotRequired[Literal["email", "phone", "pickup", "post"]] + """ + The delivery method for the payment + """ + recipient: NotRequired[ + "ChargeUpdateParamsPaymentDetailsCarRentalDeliveryRecipient" + ] + """ + Details of the recipient. + """ + + +class ChargeUpdateParamsPaymentDetailsCarRentalDeliveryRecipient(TypedDict): + email: NotRequired[str] + """ + The email of the recipient the ticket is delivered to. + """ + name: NotRequired[str] + """ + The name of the recipient the ticket is delivered to. + """ + phone: NotRequired[str] + """ + The phone number of the recipient the ticket is delivered to. + """ + + +class ChargeUpdateParamsPaymentDetailsCarRentalDistance(TypedDict): + amount: NotRequired[int] + """ + Distance traveled. + """ + unit: NotRequired[Literal["kilometers", "miles"]] + """ + Unit of measurement for the distance traveled. One of `miles` or `kilometers`. + """ + + +class ChargeUpdateParamsPaymentDetailsCarRentalDriver(TypedDict): + driver_identification_number: NotRequired[str] + """ + Driver's identification number. + """ + driver_tax_number: NotRequired[str] + """ + Driver's tax number. + """ + name: str + """ + Full name of the person or entity on the car reservation. + """ + + +class ChargeUpdateParamsPaymentDetailsCarRentalPickupAddress(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. + """ + + +class ChargeUpdateParamsPaymentDetailsCarRentalReturnAddress(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. + """ + + +class ChargeUpdateParamsPaymentDetailsEventDetails(TypedDict): + access_controlled_venue: NotRequired[bool] + """ + Indicates if the tickets are digitally checked when entering the venue. + """ + address: NotRequired["ChargeUpdateParamsPaymentDetailsEventDetailsAddress"] + """ + The event location's address. + """ + affiliate: NotRequired[ + "ChargeUpdateParamsPaymentDetailsEventDetailsAffiliate" + ] + """ + Affiliate details for this purchase. + """ + company: NotRequired[str] + """ + The name of the company + """ + delivery: NotRequired[ + "ChargeUpdateParamsPaymentDetailsEventDetailsDelivery" + ] + """ + Delivery details for this purchase. + """ + ends_at: NotRequired[int] + """ + Event end time. Measured in seconds since the Unix epoch. + """ + genre: NotRequired[str] + """ + Type of the event entertainment (concert, sports event etc) + """ + name: str + """ + The name of the event. + """ + starts_at: NotRequired[int] + """ + Event start time. Measured in seconds since the Unix epoch. + """ + + +class ChargeUpdateParamsPaymentDetailsEventDetailsAddress(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. + """ + + +class ChargeUpdateParamsPaymentDetailsEventDetailsAffiliate(TypedDict): + name: str + """ + The name of the affiliate that originated the purchase. + """ + + +class ChargeUpdateParamsPaymentDetailsEventDetailsDelivery(TypedDict): + mode: NotRequired[Literal["email", "phone", "pickup", "post"]] + """ + The delivery method for the payment + """ + recipient: NotRequired[ + "ChargeUpdateParamsPaymentDetailsEventDetailsDeliveryRecipient" + ] + """ + Details of the recipient. + """ + + +class ChargeUpdateParamsPaymentDetailsEventDetailsDeliveryRecipient(TypedDict): + email: NotRequired[str] + """ + The email of the recipient the ticket is delivered to. + """ + name: NotRequired[str] + """ + The name of the recipient the ticket is delivered to. + """ + phone: NotRequired[str] + """ + The phone number of the recipient the ticket is delivered to. + """ + + +class ChargeUpdateParamsPaymentDetailsFlight(TypedDict): + affiliate: NotRequired["ChargeUpdateParamsPaymentDetailsFlightAffiliate"] + """ + Affiliate details for this purchase. + """ + agency_number: NotRequired[str] + """ + The agency number (i.e. International Air Transport Association (IATA) agency number) of the travel agency that made the booking. + """ + carrier: NotRequired[str] + """ + The International Air Transport Association (IATA) carrier code of the carrier that issued the ticket. + """ + delivery: NotRequired["ChargeUpdateParamsPaymentDetailsFlightDelivery"] + """ + Delivery details for this purchase. + """ + passenger_name: NotRequired[str] + """ + The name of the person or entity on the reservation. + """ + passengers: NotRequired[ + List["ChargeUpdateParamsPaymentDetailsFlightPassenger"] + ] + """ + The details of the passengers in the travel reservation. + """ + segments: List["ChargeUpdateParamsPaymentDetailsFlightSegment"] + """ + The individual flight segments associated with the trip. + """ + ticket_number: NotRequired[str] + """ + The ticket number associated with the travel reservation. + """ + + +class ChargeUpdateParamsPaymentDetailsFlightAffiliate(TypedDict): + name: str + """ + The name of the affiliate that originated the purchase. + """ + + +class ChargeUpdateParamsPaymentDetailsFlightDelivery(TypedDict): + mode: NotRequired[Literal["email", "phone", "pickup", "post"]] + """ + The delivery method for the payment + """ + recipient: NotRequired[ + "ChargeUpdateParamsPaymentDetailsFlightDeliveryRecipient" + ] + """ + Details of the recipient. + """ + + +class ChargeUpdateParamsPaymentDetailsFlightDeliveryRecipient(TypedDict): + email: NotRequired[str] + """ + The email of the recipient the ticket is delivered to. + """ + name: NotRequired[str] + """ + The name of the recipient the ticket is delivered to. + """ + phone: NotRequired[str] + """ + The phone number of the recipient the ticket is delivered to. + """ + + +class ChargeUpdateParamsPaymentDetailsFlightPassenger(TypedDict): + name: str + """ + Full name of the person or entity on the flight reservation. + """ + + +class ChargeUpdateParamsPaymentDetailsFlightSegment(TypedDict): + amount: NotRequired[int] + """ + The flight segment amount. + """ + arrival_airport: NotRequired[str] + """ + The International Air Transport Association (IATA) airport code for the arrival airport. + """ + arrives_at: NotRequired[int] + """ + The arrival time for the flight segment. Measured in seconds since the Unix epoch. + """ + carrier: NotRequired[str] + """ + The International Air Transport Association (IATA) carrier code of the carrier operating the flight segment. + """ + departs_at: int + """ + The departure time for the flight segment. Measured in seconds since the Unix epoch. + """ + departure_airport: NotRequired[str] + """ + The International Air Transport Association (IATA) airport code for the departure airport. + """ + flight_number: NotRequired[str] + """ + The flight number associated with the segment + """ + service_class: NotRequired[ + Literal["business", "economy", "first", "premium_economy"] + ] + """ + The fare class for the segment. + """ + + +class ChargeUpdateParamsPaymentDetailsLodging(TypedDict): + address: NotRequired["ChargeUpdateParamsPaymentDetailsLodgingAddress"] + """ + The lodging location's address. + """ + adults: NotRequired[int] + """ + The number of adults on the booking + """ + affiliate: NotRequired["ChargeUpdateParamsPaymentDetailsLodgingAffiliate"] + """ + Affiliate details for this purchase. + """ + booking_number: NotRequired[str] + """ + The booking number associated with the lodging reservation. + """ + category: NotRequired[Literal["hotel", "vacation_rental"]] + """ + The lodging category + """ + checkin_at: int + """ + Lodging check-in time. Measured in seconds since the Unix epoch. + """ + checkout_at: int + """ + Lodging check-out time. Measured in seconds since the Unix epoch. + """ + customer_service_phone_number: NotRequired[str] + """ + The customer service phone number of the lodging company. + """ + daily_room_rate_amount: NotRequired[int] + """ + The daily lodging room rate. + """ + delivery: NotRequired["ChargeUpdateParamsPaymentDetailsLodgingDelivery"] + """ + Delivery details for this purchase. + """ + extra_charges: NotRequired[ + List[ + Literal[ + "gift_shop", + "laundry", + "mini_bar", + "other", + "restaurant", + "telephone", + ] + ] + ] + """ + List of additional charges being billed. + """ + fire_safety_act_compliance: NotRequired[bool] + """ + Indicates whether the lodging location is compliant with the Fire Safety Act. + """ + name: NotRequired[str] + """ + The name of the lodging location. + """ + no_show: NotRequired[bool] + """ + Indicates if the customer did not keep their booking while failing to cancel the reservation. + """ + number_of_rooms: NotRequired[int] + """ + The number of rooms on the booking + """ + passengers: NotRequired[ + List["ChargeUpdateParamsPaymentDetailsLodgingPassenger"] + ] + """ + The details of the passengers in the travel reservation + """ + property_phone_number: NotRequired[str] + """ + The phone number of the lodging location. + """ + room_class: NotRequired[str] + """ + The room class for this purchase. + """ + room_nights: NotRequired[int] + """ + The number of room nights + """ + total_room_tax_amount: NotRequired[int] + """ + The total tax amount associating with the room reservation. + """ + total_tax_amount: NotRequired[int] + """ + The total tax amount + """ + + +class ChargeUpdateParamsPaymentDetailsLodgingAddress(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. + """ + + +class ChargeUpdateParamsPaymentDetailsLodgingAffiliate(TypedDict): + name: str + """ + The name of the affiliate that originated the purchase. + """ + + +class ChargeUpdateParamsPaymentDetailsLodgingDelivery(TypedDict): + mode: NotRequired[Literal["email", "phone", "pickup", "post"]] + """ + The delivery method for the payment + """ + recipient: NotRequired[ + "ChargeUpdateParamsPaymentDetailsLodgingDeliveryRecipient" + ] + """ + Details of the recipient. + """ + + +class ChargeUpdateParamsPaymentDetailsLodgingDeliveryRecipient(TypedDict): + email: NotRequired[str] + """ + The email of the recipient the ticket is delivered to. + """ + name: NotRequired[str] + """ + The name of the recipient the ticket is delivered to. + """ + phone: NotRequired[str] + """ + The phone number of the recipient the ticket is delivered to. + """ + + +class ChargeUpdateParamsPaymentDetailsLodgingPassenger(TypedDict): + name: str + """ + Full name of the person or entity on the lodging reservation. + """ + + +class ChargeUpdateParamsPaymentDetailsSubscription(TypedDict): + affiliate: NotRequired[ + "ChargeUpdateParamsPaymentDetailsSubscriptionAffiliate" + ] + """ + Affiliate details for this purchase. + """ + auto_renewal: NotRequired[bool] + """ + Info whether the subscription will be auto renewed upon expiry. + """ + billing_interval: NotRequired[ + "ChargeUpdateParamsPaymentDetailsSubscriptionBillingInterval" + ] + """ + Subscription billing details for this purchase. + """ + ends_at: NotRequired[int] + """ + Subscription end time. Measured in seconds since the Unix epoch. + """ + name: str + """ + Name of the product on subscription. e.g. Apple Music Subscription + """ + starts_at: NotRequired[int] + """ + Subscription start time. Measured in seconds since the Unix epoch. + """ + + +class ChargeUpdateParamsPaymentDetailsSubscriptionAffiliate(TypedDict): + name: str + """ + The name of the affiliate that originated the purchase. + """ + + +class ChargeUpdateParamsPaymentDetailsSubscriptionBillingInterval(TypedDict): + count: int + """ + The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + """ + interval: Literal["day", "month", "week", "year"] + """ + Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + """ + + +class ChargeUpdateParamsShipping(TypedDict): + address: "ChargeUpdateParamsShippingAddress" + """ + Shipping address. + """ + carrier: NotRequired[str] + """ + The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. + """ + name: str + """ + Recipient name. + """ + phone: NotRequired[str] + """ + Recipient phone (including extension). + """ + tracking_number: NotRequired[str] + """ + The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. + """ + + +class ChargeUpdateParamsShippingAddress(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. + """ diff --git a/stripe/params/_confirmation_token_create_params.py b/stripe/params/_confirmation_token_create_params.py new file mode 100644 index 000000000..f5bb6998e --- /dev/null +++ b/stripe/params/_confirmation_token_create_params.py @@ -0,0 +1,1045 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class ConfirmationTokenCreateParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + payment_method: NotRequired[str] + """ + ID of an existing PaymentMethod. + """ + payment_method_data: NotRequired[ + "ConfirmationTokenCreateParamsPaymentMethodData" + ] + """ + If provided, this hash will be used to create a PaymentMethod. + """ + payment_method_options: NotRequired[ + "ConfirmationTokenCreateParamsPaymentMethodOptions" + ] + """ + Payment-method-specific configuration for this ConfirmationToken. + """ + return_url: NotRequired[str] + """ + Return URL used to confirm the Intent. + """ + setup_future_usage: NotRequired[Literal["off_session", "on_session"]] + """ + Indicates that you intend to make future payments with this ConfirmationToken's payment method. + + The presence of this property will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. + """ + shipping: NotRequired["ConfirmationTokenCreateParamsShipping"] + """ + Shipping information for this ConfirmationToken. + """ + + +class ConfirmationTokenCreateParamsPaymentMethodData(TypedDict): + acss_debit: NotRequired[ + "ConfirmationTokenCreateParamsPaymentMethodDataAcssDebit" + ] + """ + If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method. + """ + affirm: NotRequired["ConfirmationTokenCreateParamsPaymentMethodDataAffirm"] + """ + If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method. + """ + afterpay_clearpay: NotRequired[ + "ConfirmationTokenCreateParamsPaymentMethodDataAfterpayClearpay" + ] + """ + If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method. + """ + alipay: NotRequired["ConfirmationTokenCreateParamsPaymentMethodDataAlipay"] + """ + If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. + """ + allow_redisplay: NotRequired[Literal["always", "limited", "unspecified"]] + """ + This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`. + """ + alma: NotRequired["ConfirmationTokenCreateParamsPaymentMethodDataAlma"] + """ + If this is a Alma PaymentMethod, this hash contains details about the Alma payment method. + """ + amazon_pay: NotRequired[ + "ConfirmationTokenCreateParamsPaymentMethodDataAmazonPay" + ] + """ + If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method. + """ + au_becs_debit: NotRequired[ + "ConfirmationTokenCreateParamsPaymentMethodDataAuBecsDebit" + ] + """ + If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. + """ + bacs_debit: NotRequired[ + "ConfirmationTokenCreateParamsPaymentMethodDataBacsDebit" + ] + """ + If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account. + """ + bancontact: NotRequired[ + "ConfirmationTokenCreateParamsPaymentMethodDataBancontact" + ] + """ + If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method. + """ + billie: NotRequired["ConfirmationTokenCreateParamsPaymentMethodDataBillie"] + """ + If this is a `billie` PaymentMethod, this hash contains details about the Billie payment method. + """ + billing_details: NotRequired[ + "ConfirmationTokenCreateParamsPaymentMethodDataBillingDetails" + ] + """ + Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. + """ + blik: NotRequired["ConfirmationTokenCreateParamsPaymentMethodDataBlik"] + """ + If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method. + """ + boleto: NotRequired["ConfirmationTokenCreateParamsPaymentMethodDataBoleto"] + """ + If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method. + """ + cashapp: NotRequired[ + "ConfirmationTokenCreateParamsPaymentMethodDataCashapp" + ] + """ + If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. + """ + crypto: NotRequired["ConfirmationTokenCreateParamsPaymentMethodDataCrypto"] + """ + If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment method. + """ + customer_balance: NotRequired[ + "ConfirmationTokenCreateParamsPaymentMethodDataCustomerBalance" + ] + """ + If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. + """ + eps: NotRequired["ConfirmationTokenCreateParamsPaymentMethodDataEps"] + """ + If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. + """ + fpx: NotRequired["ConfirmationTokenCreateParamsPaymentMethodDataFpx"] + """ + If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method. + """ + giropay: NotRequired[ + "ConfirmationTokenCreateParamsPaymentMethodDataGiropay" + ] + """ + If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method. + """ + gopay: NotRequired["ConfirmationTokenCreateParamsPaymentMethodDataGopay"] + """ + If this is a Gopay PaymentMethod, this hash contains details about the Gopay payment method. + """ + grabpay: NotRequired[ + "ConfirmationTokenCreateParamsPaymentMethodDataGrabpay" + ] + """ + If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method. + """ + id_bank_transfer: NotRequired[ + "ConfirmationTokenCreateParamsPaymentMethodDataIdBankTransfer" + ] + """ + If this is an `IdBankTransfer` PaymentMethod, this hash contains details about the IdBankTransfer payment method. + """ + ideal: NotRequired["ConfirmationTokenCreateParamsPaymentMethodDataIdeal"] + """ + If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. + """ + interac_present: NotRequired[ + "ConfirmationTokenCreateParamsPaymentMethodDataInteracPresent" + ] + """ + If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. + """ + kakao_pay: NotRequired[ + "ConfirmationTokenCreateParamsPaymentMethodDataKakaoPay" + ] + """ + If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method. + """ + klarna: NotRequired["ConfirmationTokenCreateParamsPaymentMethodDataKlarna"] + """ + If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method. + """ + konbini: NotRequired[ + "ConfirmationTokenCreateParamsPaymentMethodDataKonbini" + ] + """ + If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. + """ + kr_card: NotRequired[ + "ConfirmationTokenCreateParamsPaymentMethodDataKrCard" + ] + """ + If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method. + """ + link: NotRequired["ConfirmationTokenCreateParamsPaymentMethodDataLink"] + """ + If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. + """ + mb_way: NotRequired["ConfirmationTokenCreateParamsPaymentMethodDataMbWay"] + """ + If this is a MB WAY PaymentMethod, this hash contains details about the MB WAY payment method. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + mobilepay: NotRequired[ + "ConfirmationTokenCreateParamsPaymentMethodDataMobilepay" + ] + """ + If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method. + """ + multibanco: NotRequired[ + "ConfirmationTokenCreateParamsPaymentMethodDataMultibanco" + ] + """ + If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method. + """ + naver_pay: NotRequired[ + "ConfirmationTokenCreateParamsPaymentMethodDataNaverPay" + ] + """ + If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method. + """ + nz_bank_account: NotRequired[ + "ConfirmationTokenCreateParamsPaymentMethodDataNzBankAccount" + ] + """ + If this is an nz_bank_account PaymentMethod, this hash contains details about the nz_bank_account payment method. + """ + oxxo: NotRequired["ConfirmationTokenCreateParamsPaymentMethodDataOxxo"] + """ + If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. + """ + p24: NotRequired["ConfirmationTokenCreateParamsPaymentMethodDataP24"] + """ + If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. + """ + pay_by_bank: NotRequired[ + "ConfirmationTokenCreateParamsPaymentMethodDataPayByBank" + ] + """ + If this is a `pay_by_bank` PaymentMethod, this hash contains details about the PayByBank payment method. + """ + payco: NotRequired["ConfirmationTokenCreateParamsPaymentMethodDataPayco"] + """ + If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method. + """ + paynow: NotRequired["ConfirmationTokenCreateParamsPaymentMethodDataPaynow"] + """ + If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method. + """ + paypal: NotRequired["ConfirmationTokenCreateParamsPaymentMethodDataPaypal"] + """ + If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method. + """ + paypay: NotRequired["ConfirmationTokenCreateParamsPaymentMethodDataPaypay"] + """ + If this is a `paypay` PaymentMethod, this hash contains details about the PayPay payment method. + """ + payto: NotRequired["ConfirmationTokenCreateParamsPaymentMethodDataPayto"] + """ + If this is a `payto` PaymentMethod, this hash contains details about the PayTo payment method. + """ + pix: NotRequired["ConfirmationTokenCreateParamsPaymentMethodDataPix"] + """ + If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method. + """ + promptpay: NotRequired[ + "ConfirmationTokenCreateParamsPaymentMethodDataPromptpay" + ] + """ + If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method. + """ + qris: NotRequired["ConfirmationTokenCreateParamsPaymentMethodDataQris"] + """ + If this is a `qris` PaymentMethod, this hash contains details about the QRIS payment method. + """ + radar_options: NotRequired[ + "ConfirmationTokenCreateParamsPaymentMethodDataRadarOptions" + ] + """ + Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. + """ + rechnung: NotRequired[ + "ConfirmationTokenCreateParamsPaymentMethodDataRechnung" + ] + """ + If this is a `rechnung` PaymentMethod, this hash contains details about the Rechnung payment method. + """ + revolut_pay: NotRequired[ + "ConfirmationTokenCreateParamsPaymentMethodDataRevolutPay" + ] + """ + If this is a `revolut_pay` PaymentMethod, this hash contains details about the Revolut Pay payment method. + """ + samsung_pay: NotRequired[ + "ConfirmationTokenCreateParamsPaymentMethodDataSamsungPay" + ] + """ + If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method. + """ + satispay: NotRequired[ + "ConfirmationTokenCreateParamsPaymentMethodDataSatispay" + ] + """ + If this is a `satispay` PaymentMethod, this hash contains details about the Satispay payment method. + """ + sepa_debit: NotRequired[ + "ConfirmationTokenCreateParamsPaymentMethodDataSepaDebit" + ] + """ + If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. + """ + shopeepay: NotRequired[ + "ConfirmationTokenCreateParamsPaymentMethodDataShopeepay" + ] + """ + If this is a Shopeepay PaymentMethod, this hash contains details about the Shopeepay payment method. + """ + sofort: NotRequired["ConfirmationTokenCreateParamsPaymentMethodDataSofort"] + """ + If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. + """ + stripe_balance: NotRequired[ + "ConfirmationTokenCreateParamsPaymentMethodDataStripeBalance" + ] + """ + This hash contains details about the Stripe balance payment method. + """ + swish: NotRequired["ConfirmationTokenCreateParamsPaymentMethodDataSwish"] + """ + If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method. + """ + twint: NotRequired["ConfirmationTokenCreateParamsPaymentMethodDataTwint"] + """ + If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method. + """ + type: Literal[ + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "alma", + "amazon_pay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "billie", + "blik", + "boleto", + "cashapp", + "crypto", + "customer_balance", + "eps", + "fpx", + "giropay", + "gopay", + "grabpay", + "id_bank_transfer", + "ideal", + "kakao_pay", + "klarna", + "konbini", + "kr_card", + "link", + "mb_way", + "mobilepay", + "multibanco", + "naver_pay", + "nz_bank_account", + "oxxo", + "p24", + "pay_by_bank", + "payco", + "paynow", + "paypal", + "paypay", + "payto", + "pix", + "promptpay", + "qris", + "rechnung", + "revolut_pay", + "samsung_pay", + "satispay", + "sepa_debit", + "shopeepay", + "sofort", + "stripe_balance", + "swish", + "twint", + "us_bank_account", + "wechat_pay", + "zip", + ] + """ + The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. + """ + us_bank_account: NotRequired[ + "ConfirmationTokenCreateParamsPaymentMethodDataUsBankAccount" + ] + """ + If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. + """ + wechat_pay: NotRequired[ + "ConfirmationTokenCreateParamsPaymentMethodDataWechatPay" + ] + """ + If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method. + """ + zip: NotRequired["ConfirmationTokenCreateParamsPaymentMethodDataZip"] + """ + If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method. + """ + + +class ConfirmationTokenCreateParamsPaymentMethodDataAcssDebit(TypedDict): + account_number: str + """ + Customer's bank account number. + """ + institution_number: str + """ + Institution number of the customer's bank. + """ + transit_number: str + """ + Transit number of the customer's bank. + """ + + +class ConfirmationTokenCreateParamsPaymentMethodDataAffirm(TypedDict): + pass + + +class ConfirmationTokenCreateParamsPaymentMethodDataAfterpayClearpay( + TypedDict +): + pass + + +class ConfirmationTokenCreateParamsPaymentMethodDataAlipay(TypedDict): + pass + + +class ConfirmationTokenCreateParamsPaymentMethodDataAlma(TypedDict): + pass + + +class ConfirmationTokenCreateParamsPaymentMethodDataAmazonPay(TypedDict): + pass + + +class ConfirmationTokenCreateParamsPaymentMethodDataAuBecsDebit(TypedDict): + account_number: str + """ + The account number for the bank account. + """ + bsb_number: str + """ + Bank-State-Branch number of the bank account. + """ + + +class ConfirmationTokenCreateParamsPaymentMethodDataBacsDebit(TypedDict): + account_number: NotRequired[str] + """ + Account number of the bank account that the funds will be debited from. + """ + sort_code: NotRequired[str] + """ + Sort code of the bank account. (e.g., `10-20-30`) + """ + + +class ConfirmationTokenCreateParamsPaymentMethodDataBancontact(TypedDict): + pass + + +class ConfirmationTokenCreateParamsPaymentMethodDataBillie(TypedDict): + pass + + +class ConfirmationTokenCreateParamsPaymentMethodDataBillingDetails(TypedDict): + address: NotRequired[ + "Literal['']|ConfirmationTokenCreateParamsPaymentMethodDataBillingDetailsAddress" + ] + """ + Billing address. + """ + email: NotRequired["Literal['']|str"] + """ + Email address. + """ + name: NotRequired["Literal['']|str"] + """ + Full name. + """ + phone: NotRequired["Literal['']|str"] + """ + Billing phone number (including extension). + """ + tax_id: NotRequired[str] + """ + Taxpayer identification number. Used only for transactions between LATAM buyers and non-LATAM sellers. + """ + + +class ConfirmationTokenCreateParamsPaymentMethodDataBillingDetailsAddress( + 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. + """ + + +class ConfirmationTokenCreateParamsPaymentMethodDataBlik(TypedDict): + pass + + +class ConfirmationTokenCreateParamsPaymentMethodDataBoleto(TypedDict): + tax_id: str + """ + The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers) + """ + + +class ConfirmationTokenCreateParamsPaymentMethodDataCashapp(TypedDict): + pass + + +class ConfirmationTokenCreateParamsPaymentMethodDataCrypto(TypedDict): + pass + + +class ConfirmationTokenCreateParamsPaymentMethodDataCustomerBalance(TypedDict): + pass + + +class ConfirmationTokenCreateParamsPaymentMethodDataEps(TypedDict): + bank: NotRequired[ + Literal[ + "arzte_und_apotheker_bank", + "austrian_anadi_bank_ag", + "bank_austria", + "bankhaus_carl_spangler", + "bankhaus_schelhammer_und_schattera_ag", + "bawag_psk_ag", + "bks_bank_ag", + "brull_kallmus_bank_ag", + "btv_vier_lander_bank", + "capital_bank_grawe_gruppe_ag", + "deutsche_bank_ag", + "dolomitenbank", + "easybank_ag", + "erste_bank_und_sparkassen", + "hypo_alpeadriabank_international_ag", + "hypo_bank_burgenland_aktiengesellschaft", + "hypo_noe_lb_fur_niederosterreich_u_wien", + "hypo_oberosterreich_salzburg_steiermark", + "hypo_tirol_bank_ag", + "hypo_vorarlberg_bank_ag", + "marchfelder_bank", + "oberbank_ag", + "raiffeisen_bankengruppe_osterreich", + "schoellerbank_ag", + "sparda_bank_wien", + "volksbank_gruppe", + "volkskreditbank_ag", + "vr_bank_braunau", + ] + ] + """ + The customer's bank. + """ + + +class ConfirmationTokenCreateParamsPaymentMethodDataFpx(TypedDict): + account_holder_type: NotRequired[Literal["company", "individual"]] + """ + Account holder type for FPX transaction + """ + bank: Literal[ + "affin_bank", + "agrobank", + "alliance_bank", + "ambank", + "bank_islam", + "bank_muamalat", + "bank_of_china", + "bank_rakyat", + "bsn", + "cimb", + "deutsche_bank", + "hong_leong_bank", + "hsbc", + "kfh", + "maybank2e", + "maybank2u", + "ocbc", + "pb_enterprise", + "public_bank", + "rhb", + "standard_chartered", + "uob", + ] + """ + The customer's bank. + """ + + +class ConfirmationTokenCreateParamsPaymentMethodDataGiropay(TypedDict): + pass + + +class ConfirmationTokenCreateParamsPaymentMethodDataGopay(TypedDict): + pass + + +class ConfirmationTokenCreateParamsPaymentMethodDataGrabpay(TypedDict): + pass + + +class ConfirmationTokenCreateParamsPaymentMethodDataIdBankTransfer(TypedDict): + bank: NotRequired[Literal["bca", "bni", "bri", "cimb", "permata"]] + """ + Bank where the account is held. + """ + + +class ConfirmationTokenCreateParamsPaymentMethodDataIdeal(TypedDict): + bank: NotRequired[ + Literal[ + "abn_amro", + "asn_bank", + "bunq", + "buut", + "handelsbanken", + "ing", + "knab", + "moneyou", + "n26", + "nn", + "rabobank", + "regiobank", + "revolut", + "sns_bank", + "triodos_bank", + "van_lanschot", + "yoursafe", + ] + ] + """ + The customer's bank. Only use this parameter for existing customers. Don't use it for new customers. + """ + + +class ConfirmationTokenCreateParamsPaymentMethodDataInteracPresent(TypedDict): + pass + + +class ConfirmationTokenCreateParamsPaymentMethodDataKakaoPay(TypedDict): + pass + + +class ConfirmationTokenCreateParamsPaymentMethodDataKlarna(TypedDict): + dob: NotRequired["ConfirmationTokenCreateParamsPaymentMethodDataKlarnaDob"] + """ + Customer's date of birth + """ + + +class ConfirmationTokenCreateParamsPaymentMethodDataKlarnaDob(TypedDict): + day: int + """ + The day of birth, between 1 and 31. + """ + month: int + """ + The month of birth, between 1 and 12. + """ + year: int + """ + The four-digit year of birth. + """ + + +class ConfirmationTokenCreateParamsPaymentMethodDataKonbini(TypedDict): + pass + + +class ConfirmationTokenCreateParamsPaymentMethodDataKrCard(TypedDict): + pass + + +class ConfirmationTokenCreateParamsPaymentMethodDataLink(TypedDict): + pass + + +class ConfirmationTokenCreateParamsPaymentMethodDataMbWay(TypedDict): + pass + + +class ConfirmationTokenCreateParamsPaymentMethodDataMobilepay(TypedDict): + pass + + +class ConfirmationTokenCreateParamsPaymentMethodDataMultibanco(TypedDict): + pass + + +class ConfirmationTokenCreateParamsPaymentMethodDataNaverPay(TypedDict): + funding: NotRequired[Literal["card", "points"]] + """ + Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`. + """ + + +class ConfirmationTokenCreateParamsPaymentMethodDataNzBankAccount(TypedDict): + account_holder_name: NotRequired[str] + """ + The name on the bank account. Only required if the account holder name is different from the name of the authorized signatory collected in the PaymentMethod's billing details. + """ + account_number: str + """ + The account number for the bank account. + """ + bank_code: str + """ + The numeric code for the bank account's bank. + """ + branch_code: str + """ + The numeric code for the bank account's bank branch. + """ + reference: NotRequired[str] + suffix: str + """ + The suffix of the bank account number. + """ + + +class ConfirmationTokenCreateParamsPaymentMethodDataOxxo(TypedDict): + pass + + +class ConfirmationTokenCreateParamsPaymentMethodDataP24(TypedDict): + bank: NotRequired[ + Literal[ + "alior_bank", + "bank_millennium", + "bank_nowy_bfg_sa", + "bank_pekao_sa", + "banki_spbdzielcze", + "blik", + "bnp_paribas", + "boz", + "citi_handlowy", + "credit_agricole", + "envelobank", + "etransfer_pocztowy24", + "getin_bank", + "ideabank", + "ing", + "inteligo", + "mbank_mtransfer", + "nest_przelew", + "noble_pay", + "pbac_z_ipko", + "plus_bank", + "santander_przelew24", + "tmobile_usbugi_bankowe", + "toyota_bank", + "velobank", + "volkswagen_bank", + ] + ] + """ + The customer's bank. + """ + + +class ConfirmationTokenCreateParamsPaymentMethodDataPayByBank(TypedDict): + pass + + +class ConfirmationTokenCreateParamsPaymentMethodDataPayco(TypedDict): + pass + + +class ConfirmationTokenCreateParamsPaymentMethodDataPaynow(TypedDict): + pass + + +class ConfirmationTokenCreateParamsPaymentMethodDataPaypal(TypedDict): + pass + + +class ConfirmationTokenCreateParamsPaymentMethodDataPaypay(TypedDict): + pass + + +class ConfirmationTokenCreateParamsPaymentMethodDataPayto(TypedDict): + account_number: NotRequired[str] + """ + The account number for the bank account. + """ + bsb_number: NotRequired[str] + """ + Bank-State-Branch number of the bank account. + """ + pay_id: NotRequired[str] + """ + The PayID alias for the bank account. + """ + + +class ConfirmationTokenCreateParamsPaymentMethodDataPix(TypedDict): + pass + + +class ConfirmationTokenCreateParamsPaymentMethodDataPromptpay(TypedDict): + pass + + +class ConfirmationTokenCreateParamsPaymentMethodDataQris(TypedDict): + pass + + +class ConfirmationTokenCreateParamsPaymentMethodDataRadarOptions(TypedDict): + session: NotRequired[str] + """ + A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. + """ + + +class ConfirmationTokenCreateParamsPaymentMethodDataRechnung(TypedDict): + dob: "ConfirmationTokenCreateParamsPaymentMethodDataRechnungDob" + """ + Customer's date of birth + """ + + +class ConfirmationTokenCreateParamsPaymentMethodDataRechnungDob(TypedDict): + day: int + """ + The day of birth, between 1 and 31. + """ + month: int + """ + The month of birth, between 1 and 12. + """ + year: int + """ + The four-digit year of birth. + """ + + +class ConfirmationTokenCreateParamsPaymentMethodDataRevolutPay(TypedDict): + pass + + +class ConfirmationTokenCreateParamsPaymentMethodDataSamsungPay(TypedDict): + pass + + +class ConfirmationTokenCreateParamsPaymentMethodDataSatispay(TypedDict): + pass + + +class ConfirmationTokenCreateParamsPaymentMethodDataSepaDebit(TypedDict): + iban: str + """ + IBAN of the bank account. + """ + + +class ConfirmationTokenCreateParamsPaymentMethodDataShopeepay(TypedDict): + pass + + +class ConfirmationTokenCreateParamsPaymentMethodDataSofort(TypedDict): + country: Literal["AT", "BE", "DE", "ES", "IT", "NL"] + """ + Two-letter ISO code representing the country the bank account is located in. + """ + + +class ConfirmationTokenCreateParamsPaymentMethodDataStripeBalance(TypedDict): + account: NotRequired[str] + """ + The connected account ID whose Stripe balance to use as the source of payment + """ + source_type: NotRequired[Literal["bank_account", "card", "fpx"]] + """ + The [source_type](https://docs.stripe.com/api/balance/balance_object#balance_object-available-source_types) of the balance + """ + + +class ConfirmationTokenCreateParamsPaymentMethodDataSwish(TypedDict): + pass + + +class ConfirmationTokenCreateParamsPaymentMethodDataTwint(TypedDict): + pass + + +class ConfirmationTokenCreateParamsPaymentMethodDataUsBankAccount(TypedDict): + account_holder_type: NotRequired[Literal["company", "individual"]] + """ + Account holder type: individual or company. + """ + account_number: NotRequired[str] + """ + Account number of the bank account. + """ + account_type: NotRequired[Literal["checking", "savings"]] + """ + Account type: checkings or savings. Defaults to checking if omitted. + """ + financial_connections_account: NotRequired[str] + """ + The ID of a Financial Connections Account to use as a payment method. + """ + routing_number: NotRequired[str] + """ + Routing number of the bank account. + """ + + +class ConfirmationTokenCreateParamsPaymentMethodDataWechatPay(TypedDict): + pass + + +class ConfirmationTokenCreateParamsPaymentMethodDataZip(TypedDict): + pass + + +class ConfirmationTokenCreateParamsPaymentMethodOptions(TypedDict): + card: NotRequired["ConfirmationTokenCreateParamsPaymentMethodOptionsCard"] + """ + Configuration for any card payments confirmed using this ConfirmationToken. + """ + + +class ConfirmationTokenCreateParamsPaymentMethodOptionsCard(TypedDict): + installments: NotRequired[ + "ConfirmationTokenCreateParamsPaymentMethodOptionsCardInstallments" + ] + """ + Installment configuration for payments confirmed using this ConfirmationToken. + """ + + +class ConfirmationTokenCreateParamsPaymentMethodOptionsCardInstallments( + TypedDict, +): + plan: ( + "ConfirmationTokenCreateParamsPaymentMethodOptionsCardInstallmentsPlan" + ) + """ + The selected installment plan to use for this payment attempt. + This parameter can only be provided during confirmation. + """ + + +class ConfirmationTokenCreateParamsPaymentMethodOptionsCardInstallmentsPlan( + TypedDict, +): + count: NotRequired[int] + """ + For `fixed_count` installment plans, this is required. It represents the number of installment payments your customer will make to their credit card. + """ + interval: NotRequired[Literal["month"]] + """ + For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card. + One of `month`. + """ + type: Literal["bonus", "fixed_count", "revolving"] + """ + Type of installment plan, one of `fixed_count`, `bonus`, or `revolving`. + """ + + +class ConfirmationTokenCreateParamsShipping(TypedDict): + address: "ConfirmationTokenCreateParamsShippingAddress" + """ + Shipping address + """ + name: str + """ + Recipient name. + """ + phone: NotRequired["Literal['']|str"] + """ + Recipient phone (including extension) + """ + + +class ConfirmationTokenCreateParamsShippingAddress(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. + """ diff --git a/stripe/params/_confirmation_token_retrieve_params.py b/stripe/params/_confirmation_token_retrieve_params.py new file mode 100644 index 000000000..f2725628a --- /dev/null +++ b/stripe/params/_confirmation_token_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 ConfirmationTokenRetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_country_spec_list_params.py b/stripe/params/_country_spec_list_params.py new file mode 100644 index 000000000..33261a593 --- /dev/null +++ b/stripe/params/_country_spec_list_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 CountrySpecListParams(RequestOptions): + 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. + """ diff --git a/stripe/params/_country_spec_retrieve_params.py b/stripe/params/_country_spec_retrieve_params.py new file mode 100644 index 000000000..cecc86f31 --- /dev/null +++ b/stripe/params/_country_spec_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 CountrySpecRetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_coupon_create_params.py b/stripe/params/_coupon_create_params.py new file mode 100644 index 000000000..8ebf24da1 --- /dev/null +++ b/stripe/params/_coupon_create_params.py @@ -0,0 +1,91 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Any, Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class CouponCreateParams(RequestOptions): + amount_off: NotRequired[int] + """ + A positive integer representing the amount to subtract from an invoice total (required if `percent_off` is not passed). + """ + applies_to: NotRequired["CouponCreateParamsAppliesTo"] + """ + A hash containing directions for what this Coupon will apply discounts to. + """ + currency: NotRequired[str] + """ + Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) of the `amount_off` parameter (required if `amount_off` is passed). + """ + currency_options: NotRequired[ + Dict[str, "CouponCreateParamsCurrencyOptions"] + ] + """ + Coupons defined in each available currency option (only supported if `amount_off` is passed). Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). + """ + duration: NotRequired[Literal["forever", "once", "repeating"]] + """ + Specifies how long the discount will be in effect if used on a subscription. Defaults to `once`. + """ + duration_in_months: NotRequired[int] + """ + Required only if `duration` is `repeating`, in which case it must be a positive integer that specifies the number of months the discount will be in effect. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + id: NotRequired[str] + """ + Unique string of your choice that will be used to identify this coupon when applying it to a customer. If you don't want to specify a particular code, you can leave the ID blank and we'll generate a random code for you. + """ + max_redemptions: NotRequired[int] + """ + A positive integer specifying the number of times the coupon can be redeemed before it's no longer valid. For example, you might have a 50% off coupon that the first 20 readers of your blog can use. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + name: NotRequired[str] + """ + Name of the coupon displayed to customers on, for instance invoices, or receipts. By default the `id` is shown if `name` is not set. + """ + percent_off: NotRequired[float] + """ + A positive float larger than 0, and smaller or equal to 100, that represents the discount the coupon will apply (required if `amount_off` is not passed). + """ + redeem_by: NotRequired[int] + """ + Unix timestamp specifying the last time at which the coupon can be redeemed. After the redeem_by date, the coupon can no longer be applied to new customers. + """ + script: NotRequired["CouponCreateParamsScript"] + """ + Configuration of the [script](https://docs.stripe.com/billing/subscriptions/script-coupons) used to calculate the discount. + """ + + +class CouponCreateParamsAppliesTo(TypedDict): + products: NotRequired[List[str]] + """ + An array of Product IDs that this Coupon will apply to. + """ + + +class CouponCreateParamsCurrencyOptions(TypedDict): + amount_off: int + """ + A positive integer representing the amount to subtract from an invoice total. + """ + + +class CouponCreateParamsScript(TypedDict): + configuration: Dict[str, Any] + """ + The configuration values of the script. The keys and values are specific to the script implementation. + """ + id: str + """ + The script implementation ID for this coupon. + """ diff --git a/stripe/params/_coupon_delete_params.py b/stripe/params/_coupon_delete_params.py new file mode 100644 index 000000000..2b64b4dc4 --- /dev/null +++ b/stripe/params/_coupon_delete_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions + + +class CouponDeleteParams(RequestOptions): + pass diff --git a/stripe/params/_coupon_list_params.py b/stripe/params/_coupon_list_params.py new file mode 100644 index 000000000..bf133f0e5 --- /dev/null +++ b/stripe/params/_coupon_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 CouponListParams(RequestOptions): + created: NotRequired["CouponListParamsCreated|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 CouponListParamsCreated(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/_coupon_modify_params.py b/stripe/params/_coupon_modify_params.py new file mode 100644 index 000000000..3a40e77aa --- /dev/null +++ b/stripe/params/_coupon_modify_params.py @@ -0,0 +1,33 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class CouponModifyParams(RequestOptions): + currency_options: NotRequired[ + Dict[str, "CouponModifyParamsCurrencyOptions"] + ] + """ + Coupons defined in each available currency option (only supported if the coupon is amount-based). Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + name: NotRequired[str] + """ + Name of the coupon displayed to customers on, for instance invoices, or receipts. By default the `id` is shown if `name` is not set. + """ + + +class CouponModifyParamsCurrencyOptions(TypedDict): + amount_off: int + """ + A positive integer representing the amount to subtract from an invoice total. + """ diff --git a/stripe/params/_coupon_retrieve_params.py b/stripe/params/_coupon_retrieve_params.py new file mode 100644 index 000000000..34e1a8e85 --- /dev/null +++ b/stripe/params/_coupon_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 CouponRetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_coupon_update_params.py b/stripe/params/_coupon_update_params.py new file mode 100644 index 000000000..bbd7d067b --- /dev/null +++ b/stripe/params/_coupon_update_params.py @@ -0,0 +1,32 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class CouponUpdateParams(TypedDict): + currency_options: NotRequired[ + Dict[str, "CouponUpdateParamsCurrencyOptions"] + ] + """ + Coupons defined in each available currency option (only supported if the coupon is amount-based). Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + name: NotRequired[str] + """ + Name of the coupon displayed to customers on, for instance invoices, or receipts. By default the `id` is shown if `name` is not set. + """ + + +class CouponUpdateParamsCurrencyOptions(TypedDict): + amount_off: int + """ + A positive integer representing the amount to subtract from an invoice total. + """ diff --git a/stripe/params/_credit_note_create_params.py b/stripe/params/_credit_note_create_params.py new file mode 100644 index 000000000..349d1d6f0 --- /dev/null +++ b/stripe/params/_credit_note_create_params.py @@ -0,0 +1,163 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class CreditNoteCreateParams(RequestOptions): + amount: NotRequired[int] + """ + The integer amount in cents (or local equivalent) representing the total amount of the credit note. One of `amount`, `lines`, or `shipping_cost` must be provided. + """ + credit_amount: NotRequired[int] + """ + The integer amount in cents (or local equivalent) representing the amount to credit the customer's balance, which will be automatically applied to their next invoice. + """ + effective_at: NotRequired[int] + """ + The date when this credit note is in effect. Same as `created` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the credit note PDF. + """ + email_type: NotRequired[Literal["credit_note", "none"]] + """ + Type of email to send to the customer, one of `credit_note` or `none` and the default is `credit_note`. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + invoice: str + """ + ID of the invoice. + """ + lines: NotRequired[List["CreditNoteCreateParamsLine"]] + """ + Line items that make up the credit note. One of `amount`, `lines`, or `shipping_cost` must be provided. + """ + memo: NotRequired[str] + """ + The credit note's memo appears on the credit note PDF. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + out_of_band_amount: NotRequired[int] + """ + The integer amount in cents (or local equivalent) representing the amount that is credited outside of Stripe. + """ + reason: NotRequired[ + Literal[ + "duplicate", "fraudulent", "order_change", "product_unsatisfactory" + ] + ] + """ + Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory` + """ + refund_amount: NotRequired[int] + """ + The integer amount in cents (or local equivalent) representing the amount to refund. If set, a refund will be created for the charge associated with the invoice. + """ + refunds: NotRequired[List["CreditNoteCreateParamsRefund"]] + """ + Refunds to link to this credit note. + """ + shipping_cost: NotRequired["CreditNoteCreateParamsShippingCost"] + """ + When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note. One of `amount`, `lines`, or `shipping_cost` must be provided. + """ + + +class CreditNoteCreateParamsLine(TypedDict): + amount: NotRequired[int] + """ + The line item amount to credit. Only valid when `type` is `invoice_line_item`. If invoice is set up with `automatic_tax[enabled]=true`, this amount is tax exclusive + """ + description: NotRequired[str] + """ + The description of the credit note line item. Only valid when the `type` is `custom_line_item`. + """ + invoice_line_item: NotRequired[str] + """ + The invoice line item to credit. Only valid when the `type` is `invoice_line_item`. + """ + quantity: NotRequired[int] + """ + The line item quantity to credit. + """ + tax_amounts: NotRequired[ + "Literal['']|List[CreditNoteCreateParamsLineTaxAmount]" + ] + """ + A list of up to 10 tax amounts for the credit note line item. Cannot be mixed with `tax_rates`. + """ + tax_rates: NotRequired["Literal['']|List[str]"] + """ + The tax rates which apply to the credit note line item. Only valid when the `type` is `custom_line_item` and cannot be mixed with `tax_amounts`. + """ + type: Literal["custom_line_item", "invoice_line_item"] + """ + Type of the credit note line item, one of `invoice_line_item` or `custom_line_item` + """ + unit_amount: NotRequired[int] + """ + The integer unit amount in cents (or local equivalent) of the credit note line item. This `unit_amount` will be multiplied by the quantity to get the full amount to credit for this line item. Only valid when `type` is `custom_line_item`. + """ + unit_amount_decimal: NotRequired[str] + """ + Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + """ + + +class CreditNoteCreateParamsLineTaxAmount(TypedDict): + amount: int + """ + The amount, in cents (or local equivalent), of the tax. + """ + tax_rate: str + """ + The id of the tax rate for this tax amount. The tax rate must have been automatically created by Stripe. + """ + taxable_amount: int + """ + The amount on which tax is calculated, in cents (or local equivalent). + """ + + +class CreditNoteCreateParamsRefund(TypedDict): + amount_refunded: NotRequired[int] + """ + Amount of the refund that applies to this credit note, in cents (or local equivalent). Defaults to the entire refund amount. + """ + payment_record_refund: NotRequired[ + "CreditNoteCreateParamsRefundPaymentRecordRefund" + ] + """ + The PaymentRecord refund details to link to this credit note. Required when `type` is `payment_record_refund`. + """ + refund: NotRequired[str] + """ + ID of an existing refund to link this credit note to. Required when `type` is `refund`. + """ + type: NotRequired[Literal["payment_record_refund", "refund"]] + """ + Type of the refund, one of `refund` or `payment_record_refund`. Defaults to `refund`. + """ + + +class CreditNoteCreateParamsRefundPaymentRecordRefund(TypedDict): + payment_record: str + """ + The ID of the PaymentRecord with the refund to link to this credit note. + """ + refund_group: str + """ + The PaymentRecord refund group to link to this credit note. For refunds processed off-Stripe, this will correspond to the `processor_details.custom.refund_reference` field provided when reporting the refund on the PaymentRecord. + """ + + +class CreditNoteCreateParamsShippingCost(TypedDict): + shipping_rate: NotRequired[str] + """ + The ID of the shipping rate to use for this order. + """ diff --git a/stripe/params/_credit_note_line_item_list_params.py b/stripe/params/_credit_note_line_item_list_params.py new file mode 100644 index 000000000..4eda752b3 --- /dev/null +++ b/stripe/params/_credit_note_line_item_list_params.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import NotRequired, TypedDict + + +class CreditNoteLineItemListParams(TypedDict): + 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. + """ diff --git a/stripe/params/_credit_note_list_lines_params.py b/stripe/params/_credit_note_list_lines_params.py new file mode 100644 index 000000000..4eb8eacce --- /dev/null +++ b/stripe/params/_credit_note_list_lines_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 CreditNoteListLinesParams(RequestOptions): + 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. + """ diff --git a/stripe/params/_credit_note_list_params.py b/stripe/params/_credit_note_list_params.py new file mode 100644 index 000000000..35ac6e801 --- /dev/null +++ b/stripe/params/_credit_note_list_params.py @@ -0,0 +1,59 @@ +# -*- 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 CreditNoteListParams(RequestOptions): + created: NotRequired["CreditNoteListParamsCreated|int"] + """ + Only return credit notes that were created during the given date interval. + """ + customer: NotRequired[str] + """ + Only return credit notes for the customer specified by this customer ID. + """ + customer_account: NotRequired[str] + """ + Only return credit notes for the account specified by this account ID. + """ + 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. + """ + invoice: NotRequired[str] + """ + Only return credit notes for the invoice specified by this invoice ID. + """ + 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 CreditNoteListParamsCreated(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/_credit_note_modify_params.py b/stripe/params/_credit_note_modify_params.py new file mode 100644 index 000000000..7b53aa673 --- /dev/null +++ b/stripe/params/_credit_note_modify_params.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import NotRequired + + +class CreditNoteModifyParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + memo: NotRequired[str] + """ + Credit note memo. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ diff --git a/stripe/params/_credit_note_preview_lines_list_params.py b/stripe/params/_credit_note_preview_lines_list_params.py new file mode 100644 index 000000000..337f7e9d3 --- /dev/null +++ b/stripe/params/_credit_note_preview_lines_list_params.py @@ -0,0 +1,174 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class CreditNotePreviewLinesListParams(TypedDict): + amount: NotRequired[int] + """ + The integer amount in cents (or local equivalent) representing the total amount of the credit note. One of `amount`, `lines`, or `shipping_cost` must be provided. + """ + credit_amount: NotRequired[int] + """ + The integer amount in cents (or local equivalent) representing the amount to credit the customer's balance, which will be automatically applied to their next invoice. + """ + effective_at: NotRequired[int] + """ + The date when this credit note is in effect. Same as `created` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the credit note PDF. + """ + email_type: NotRequired[Literal["credit_note", "none"]] + """ + Type of email to send to the customer, one of `credit_note` or `none` and the default is `credit_note`. + """ + 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. + """ + invoice: str + """ + ID of the invoice. + """ + 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. + """ + lines: NotRequired[List["CreditNotePreviewLinesListParamsLine"]] + """ + Line items that make up the credit note. One of `amount`, `lines`, or `shipping_cost` must be provided. + """ + memo: NotRequired[str] + """ + The credit note's memo appears on the credit note PDF. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + out_of_band_amount: NotRequired[int] + """ + The integer amount in cents (or local equivalent) representing the amount that is credited outside of Stripe. + """ + reason: NotRequired[ + Literal[ + "duplicate", "fraudulent", "order_change", "product_unsatisfactory" + ] + ] + """ + Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory` + """ + refund_amount: NotRequired[int] + """ + The integer amount in cents (or local equivalent) representing the amount to refund. If set, a refund will be created for the charge associated with the invoice. + """ + refunds: NotRequired[List["CreditNotePreviewLinesListParamsRefund"]] + """ + Refunds to link to this credit note. + """ + shipping_cost: NotRequired["CreditNotePreviewLinesListParamsShippingCost"] + """ + When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note. One of `amount`, `lines`, or `shipping_cost` must be provided. + """ + 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 CreditNotePreviewLinesListParamsLine(TypedDict): + amount: NotRequired[int] + """ + The line item amount to credit. Only valid when `type` is `invoice_line_item`. If invoice is set up with `automatic_tax[enabled]=true`, this amount is tax exclusive + """ + description: NotRequired[str] + """ + The description of the credit note line item. Only valid when the `type` is `custom_line_item`. + """ + invoice_line_item: NotRequired[str] + """ + The invoice line item to credit. Only valid when the `type` is `invoice_line_item`. + """ + quantity: NotRequired[int] + """ + The line item quantity to credit. + """ + tax_amounts: NotRequired[ + "Literal['']|List[CreditNotePreviewLinesListParamsLineTaxAmount]" + ] + """ + A list of up to 10 tax amounts for the credit note line item. Cannot be mixed with `tax_rates`. + """ + tax_rates: NotRequired["Literal['']|List[str]"] + """ + The tax rates which apply to the credit note line item. Only valid when the `type` is `custom_line_item` and cannot be mixed with `tax_amounts`. + """ + type: Literal["custom_line_item", "invoice_line_item"] + """ + Type of the credit note line item, one of `invoice_line_item` or `custom_line_item` + """ + unit_amount: NotRequired[int] + """ + The integer unit amount in cents (or local equivalent) of the credit note line item. This `unit_amount` will be multiplied by the quantity to get the full amount to credit for this line item. Only valid when `type` is `custom_line_item`. + """ + unit_amount_decimal: NotRequired[str] + """ + Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + """ + + +class CreditNotePreviewLinesListParamsLineTaxAmount(TypedDict): + amount: int + """ + The amount, in cents (or local equivalent), of the tax. + """ + tax_rate: str + """ + The id of the tax rate for this tax amount. The tax rate must have been automatically created by Stripe. + """ + taxable_amount: int + """ + The amount on which tax is calculated, in cents (or local equivalent). + """ + + +class CreditNotePreviewLinesListParamsRefund(TypedDict): + amount_refunded: NotRequired[int] + """ + Amount of the refund that applies to this credit note, in cents (or local equivalent). Defaults to the entire refund amount. + """ + payment_record_refund: NotRequired[ + "CreditNotePreviewLinesListParamsRefundPaymentRecordRefund" + ] + """ + The PaymentRecord refund details to link to this credit note. Required when `type` is `payment_record_refund`. + """ + refund: NotRequired[str] + """ + ID of an existing refund to link this credit note to. Required when `type` is `refund`. + """ + type: NotRequired[Literal["payment_record_refund", "refund"]] + """ + Type of the refund, one of `refund` or `payment_record_refund`. Defaults to `refund`. + """ + + +class CreditNotePreviewLinesListParamsRefundPaymentRecordRefund(TypedDict): + payment_record: str + """ + The ID of the PaymentRecord with the refund to link to this credit note. + """ + refund_group: str + """ + The PaymentRecord refund group to link to this credit note. For refunds processed off-Stripe, this will correspond to the `processor_details.custom.refund_reference` field provided when reporting the refund on the PaymentRecord. + """ + + +class CreditNotePreviewLinesListParamsShippingCost(TypedDict): + shipping_rate: NotRequired[str] + """ + The ID of the shipping rate to use for this order. + """ diff --git a/stripe/params/_credit_note_preview_lines_params.py b/stripe/params/_credit_note_preview_lines_params.py new file mode 100644 index 000000000..c1a761dc3 --- /dev/null +++ b/stripe/params/_credit_note_preview_lines_params.py @@ -0,0 +1,175 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class CreditNotePreviewLinesParams(RequestOptions): + amount: NotRequired[int] + """ + The integer amount in cents (or local equivalent) representing the total amount of the credit note. One of `amount`, `lines`, or `shipping_cost` must be provided. + """ + credit_amount: NotRequired[int] + """ + The integer amount in cents (or local equivalent) representing the amount to credit the customer's balance, which will be automatically applied to their next invoice. + """ + effective_at: NotRequired[int] + """ + The date when this credit note is in effect. Same as `created` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the credit note PDF. + """ + email_type: NotRequired[Literal["credit_note", "none"]] + """ + Type of email to send to the customer, one of `credit_note` or `none` and the default is `credit_note`. + """ + 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. + """ + invoice: str + """ + ID of the invoice. + """ + 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. + """ + lines: NotRequired[List["CreditNotePreviewLinesParamsLine"]] + """ + Line items that make up the credit note. One of `amount`, `lines`, or `shipping_cost` must be provided. + """ + memo: NotRequired[str] + """ + The credit note's memo appears on the credit note PDF. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + out_of_band_amount: NotRequired[int] + """ + The integer amount in cents (or local equivalent) representing the amount that is credited outside of Stripe. + """ + reason: NotRequired[ + Literal[ + "duplicate", "fraudulent", "order_change", "product_unsatisfactory" + ] + ] + """ + Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory` + """ + refund_amount: NotRequired[int] + """ + The integer amount in cents (or local equivalent) representing the amount to refund. If set, a refund will be created for the charge associated with the invoice. + """ + refunds: NotRequired[List["CreditNotePreviewLinesParamsRefund"]] + """ + Refunds to link to this credit note. + """ + shipping_cost: NotRequired["CreditNotePreviewLinesParamsShippingCost"] + """ + When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note. One of `amount`, `lines`, or `shipping_cost` must be provided. + """ + 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 CreditNotePreviewLinesParamsLine(TypedDict): + amount: NotRequired[int] + """ + The line item amount to credit. Only valid when `type` is `invoice_line_item`. If invoice is set up with `automatic_tax[enabled]=true`, this amount is tax exclusive + """ + description: NotRequired[str] + """ + The description of the credit note line item. Only valid when the `type` is `custom_line_item`. + """ + invoice_line_item: NotRequired[str] + """ + The invoice line item to credit. Only valid when the `type` is `invoice_line_item`. + """ + quantity: NotRequired[int] + """ + The line item quantity to credit. + """ + tax_amounts: NotRequired[ + "Literal['']|List[CreditNotePreviewLinesParamsLineTaxAmount]" + ] + """ + A list of up to 10 tax amounts for the credit note line item. Cannot be mixed with `tax_rates`. + """ + tax_rates: NotRequired["Literal['']|List[str]"] + """ + The tax rates which apply to the credit note line item. Only valid when the `type` is `custom_line_item` and cannot be mixed with `tax_amounts`. + """ + type: Literal["custom_line_item", "invoice_line_item"] + """ + Type of the credit note line item, one of `invoice_line_item` or `custom_line_item` + """ + unit_amount: NotRequired[int] + """ + The integer unit amount in cents (or local equivalent) of the credit note line item. This `unit_amount` will be multiplied by the quantity to get the full amount to credit for this line item. Only valid when `type` is `custom_line_item`. + """ + unit_amount_decimal: NotRequired[str] + """ + Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + """ + + +class CreditNotePreviewLinesParamsLineTaxAmount(TypedDict): + amount: int + """ + The amount, in cents (or local equivalent), of the tax. + """ + tax_rate: str + """ + The id of the tax rate for this tax amount. The tax rate must have been automatically created by Stripe. + """ + taxable_amount: int + """ + The amount on which tax is calculated, in cents (or local equivalent). + """ + + +class CreditNotePreviewLinesParamsRefund(TypedDict): + amount_refunded: NotRequired[int] + """ + Amount of the refund that applies to this credit note, in cents (or local equivalent). Defaults to the entire refund amount. + """ + payment_record_refund: NotRequired[ + "CreditNotePreviewLinesParamsRefundPaymentRecordRefund" + ] + """ + The PaymentRecord refund details to link to this credit note. Required when `type` is `payment_record_refund`. + """ + refund: NotRequired[str] + """ + ID of an existing refund to link this credit note to. Required when `type` is `refund`. + """ + type: NotRequired[Literal["payment_record_refund", "refund"]] + """ + Type of the refund, one of `refund` or `payment_record_refund`. Defaults to `refund`. + """ + + +class CreditNotePreviewLinesParamsRefundPaymentRecordRefund(TypedDict): + payment_record: str + """ + The ID of the PaymentRecord with the refund to link to this credit note. + """ + refund_group: str + """ + The PaymentRecord refund group to link to this credit note. For refunds processed off-Stripe, this will correspond to the `processor_details.custom.refund_reference` field provided when reporting the refund on the PaymentRecord. + """ + + +class CreditNotePreviewLinesParamsShippingCost(TypedDict): + shipping_rate: NotRequired[str] + """ + The ID of the shipping rate to use for this order. + """ diff --git a/stripe/params/_credit_note_preview_params.py b/stripe/params/_credit_note_preview_params.py new file mode 100644 index 000000000..9626dba96 --- /dev/null +++ b/stripe/params/_credit_note_preview_params.py @@ -0,0 +1,163 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class CreditNotePreviewParams(RequestOptions): + amount: NotRequired[int] + """ + The integer amount in cents (or local equivalent) representing the total amount of the credit note. One of `amount`, `lines`, or `shipping_cost` must be provided. + """ + credit_amount: NotRequired[int] + """ + The integer amount in cents (or local equivalent) representing the amount to credit the customer's balance, which will be automatically applied to their next invoice. + """ + effective_at: NotRequired[int] + """ + The date when this credit note is in effect. Same as `created` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the credit note PDF. + """ + email_type: NotRequired[Literal["credit_note", "none"]] + """ + Type of email to send to the customer, one of `credit_note` or `none` and the default is `credit_note`. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + invoice: str + """ + ID of the invoice. + """ + lines: NotRequired[List["CreditNotePreviewParamsLine"]] + """ + Line items that make up the credit note. One of `amount`, `lines`, or `shipping_cost` must be provided. + """ + memo: NotRequired[str] + """ + The credit note's memo appears on the credit note PDF. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + out_of_band_amount: NotRequired[int] + """ + The integer amount in cents (or local equivalent) representing the amount that is credited outside of Stripe. + """ + reason: NotRequired[ + Literal[ + "duplicate", "fraudulent", "order_change", "product_unsatisfactory" + ] + ] + """ + Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory` + """ + refund_amount: NotRequired[int] + """ + The integer amount in cents (or local equivalent) representing the amount to refund. If set, a refund will be created for the charge associated with the invoice. + """ + refunds: NotRequired[List["CreditNotePreviewParamsRefund"]] + """ + Refunds to link to this credit note. + """ + shipping_cost: NotRequired["CreditNotePreviewParamsShippingCost"] + """ + When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note. One of `amount`, `lines`, or `shipping_cost` must be provided. + """ + + +class CreditNotePreviewParamsLine(TypedDict): + amount: NotRequired[int] + """ + The line item amount to credit. Only valid when `type` is `invoice_line_item`. If invoice is set up with `automatic_tax[enabled]=true`, this amount is tax exclusive + """ + description: NotRequired[str] + """ + The description of the credit note line item. Only valid when the `type` is `custom_line_item`. + """ + invoice_line_item: NotRequired[str] + """ + The invoice line item to credit. Only valid when the `type` is `invoice_line_item`. + """ + quantity: NotRequired[int] + """ + The line item quantity to credit. + """ + tax_amounts: NotRequired[ + "Literal['']|List[CreditNotePreviewParamsLineTaxAmount]" + ] + """ + A list of up to 10 tax amounts for the credit note line item. Cannot be mixed with `tax_rates`. + """ + tax_rates: NotRequired["Literal['']|List[str]"] + """ + The tax rates which apply to the credit note line item. Only valid when the `type` is `custom_line_item` and cannot be mixed with `tax_amounts`. + """ + type: Literal["custom_line_item", "invoice_line_item"] + """ + Type of the credit note line item, one of `invoice_line_item` or `custom_line_item` + """ + unit_amount: NotRequired[int] + """ + The integer unit amount in cents (or local equivalent) of the credit note line item. This `unit_amount` will be multiplied by the quantity to get the full amount to credit for this line item. Only valid when `type` is `custom_line_item`. + """ + unit_amount_decimal: NotRequired[str] + """ + Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + """ + + +class CreditNotePreviewParamsLineTaxAmount(TypedDict): + amount: int + """ + The amount, in cents (or local equivalent), of the tax. + """ + tax_rate: str + """ + The id of the tax rate for this tax amount. The tax rate must have been automatically created by Stripe. + """ + taxable_amount: int + """ + The amount on which tax is calculated, in cents (or local equivalent). + """ + + +class CreditNotePreviewParamsRefund(TypedDict): + amount_refunded: NotRequired[int] + """ + Amount of the refund that applies to this credit note, in cents (or local equivalent). Defaults to the entire refund amount. + """ + payment_record_refund: NotRequired[ + "CreditNotePreviewParamsRefundPaymentRecordRefund" + ] + """ + The PaymentRecord refund details to link to this credit note. Required when `type` is `payment_record_refund`. + """ + refund: NotRequired[str] + """ + ID of an existing refund to link this credit note to. Required when `type` is `refund`. + """ + type: NotRequired[Literal["payment_record_refund", "refund"]] + """ + Type of the refund, one of `refund` or `payment_record_refund`. Defaults to `refund`. + """ + + +class CreditNotePreviewParamsRefundPaymentRecordRefund(TypedDict): + payment_record: str + """ + The ID of the PaymentRecord with the refund to link to this credit note. + """ + refund_group: str + """ + The PaymentRecord refund group to link to this credit note. For refunds processed off-Stripe, this will correspond to the `processor_details.custom.refund_reference` field provided when reporting the refund on the PaymentRecord. + """ + + +class CreditNotePreviewParamsShippingCost(TypedDict): + shipping_rate: NotRequired[str] + """ + The ID of the shipping rate to use for this order. + """ diff --git a/stripe/params/_credit_note_retrieve_params.py b/stripe/params/_credit_note_retrieve_params.py new file mode 100644 index 000000000..0fabf9b71 --- /dev/null +++ b/stripe/params/_credit_note_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 CreditNoteRetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_credit_note_update_params.py b/stripe/params/_credit_note_update_params.py new file mode 100644 index 000000000..240ca2645 --- /dev/null +++ b/stripe/params/_credit_note_update_params.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import Dict, List +from typing_extensions import NotRequired, TypedDict + + +class CreditNoteUpdateParams(TypedDict): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + memo: NotRequired[str] + """ + Credit note memo. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ diff --git a/stripe/params/_credit_note_void_credit_note_params.py b/stripe/params/_credit_note_void_credit_note_params.py new file mode 100644 index 000000000..5b9df8309 --- /dev/null +++ b/stripe/params/_credit_note_void_credit_note_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 CreditNoteVoidCreditNoteParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_customer_balance_transaction_create_params.py b/stripe/params/_customer_balance_transaction_create_params.py new file mode 100644 index 000000000..4795d1b73 --- /dev/null +++ b/stripe/params/_customer_balance_transaction_create_params.py @@ -0,0 +1,27 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class CustomerBalanceTransactionCreateParams(TypedDict): + amount: int + """ + The integer amount in **cents (or local equivalent)** to apply to the customer's credit balance. + """ + 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). Specifies the [`invoice_credit_balance`](https://stripe.com/docs/api/customers/object#customer_object-invoice_credit_balance) that this transaction will apply to. If the customer's `currency` is not set, it will be updated to this value. + """ + description: NotRequired[str] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ diff --git a/stripe/params/_customer_balance_transaction_list_params.py b/stripe/params/_customer_balance_transaction_list_params.py new file mode 100644 index 000000000..6ef239a18 --- /dev/null +++ b/stripe/params/_customer_balance_transaction_list_params.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import NotRequired, TypedDict + + +class CustomerBalanceTransactionListParams(TypedDict): + 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. + """ diff --git a/stripe/params/_customer_balance_transaction_retrieve_params.py b/stripe/params/_customer_balance_transaction_retrieve_params.py new file mode 100644 index 000000000..bf34aed7d --- /dev/null +++ b/stripe/params/_customer_balance_transaction_retrieve_params.py @@ -0,0 +1,11 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import NotRequired, TypedDict + + +class CustomerBalanceTransactionRetrieveParams(TypedDict): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_customer_balance_transaction_update_params.py b/stripe/params/_customer_balance_transaction_update_params.py new file mode 100644 index 000000000..d4766b557 --- /dev/null +++ b/stripe/params/_customer_balance_transaction_update_params.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class CustomerBalanceTransactionUpdateParams(TypedDict): + description: NotRequired[str] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ diff --git a/stripe/params/_customer_cash_balance_retrieve_params.py b/stripe/params/_customer_cash_balance_retrieve_params.py new file mode 100644 index 000000000..f94c43324 --- /dev/null +++ b/stripe/params/_customer_cash_balance_retrieve_params.py @@ -0,0 +1,11 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import NotRequired, TypedDict + + +class CustomerCashBalanceRetrieveParams(TypedDict): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_customer_cash_balance_transaction_list_params.py b/stripe/params/_customer_cash_balance_transaction_list_params.py new file mode 100644 index 000000000..c0c9d4e7c --- /dev/null +++ b/stripe/params/_customer_cash_balance_transaction_list_params.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import NotRequired, TypedDict + + +class CustomerCashBalanceTransactionListParams(TypedDict): + 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. + """ diff --git a/stripe/params/_customer_cash_balance_transaction_retrieve_params.py b/stripe/params/_customer_cash_balance_transaction_retrieve_params.py new file mode 100644 index 000000000..c0d01026a --- /dev/null +++ b/stripe/params/_customer_cash_balance_transaction_retrieve_params.py @@ -0,0 +1,11 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import NotRequired, TypedDict + + +class CustomerCashBalanceTransactionRetrieveParams(TypedDict): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_customer_cash_balance_update_params.py b/stripe/params/_customer_cash_balance_update_params.py new file mode 100644 index 000000000..2f1bd2ced --- /dev/null +++ b/stripe/params/_customer_cash_balance_update_params.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import Literal, NotRequired, TypedDict + + +class CustomerCashBalanceUpdateParams(TypedDict): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + settings: NotRequired["CustomerCashBalanceUpdateParamsSettings"] + """ + A hash of settings for this cash balance. + """ + + +class CustomerCashBalanceUpdateParamsSettings(TypedDict): + reconciliation_mode: NotRequired[ + Literal["automatic", "manual", "merchant_default"] + ] + """ + Controls how funds transferred by the customer are applied to payment intents and invoices. Valid options are `automatic`, `manual`, or `merchant_default`. For more information about these reconciliation modes, see [Reconciliation](https://stripe.com/docs/payments/customer-balance/reconciliation). + """ diff --git a/stripe/params/_customer_create_balance_transaction_params.py b/stripe/params/_customer_create_balance_transaction_params.py new file mode 100644 index 000000000..7d979c0a6 --- /dev/null +++ b/stripe/params/_customer_create_balance_transaction_params.py @@ -0,0 +1,28 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import Literal, NotRequired + + +class CustomerCreateBalanceTransactionParams(RequestOptions): + amount: int + """ + The integer amount in **cents (or local equivalent)** to apply to the customer's credit balance. + """ + 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). Specifies the [`invoice_credit_balance`](https://stripe.com/docs/api/customers/object#customer_object-invoice_credit_balance) that this transaction will apply to. If the customer's `currency` is not set, it will be updated to this value. + """ + description: NotRequired[str] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ diff --git a/stripe/params/_customer_create_funding_instructions_params.py b/stripe/params/_customer_create_funding_instructions_params.py new file mode 100644 index 000000000..a2792948c --- /dev/null +++ b/stripe/params/_customer_create_funding_instructions_params.py @@ -0,0 +1,60 @@ +# -*- 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, TypedDict + + +class CustomerCreateFundingInstructionsParams(RequestOptions): + bank_transfer: "CustomerCreateFundingInstructionsParamsBankTransfer" + """ + Additional parameters for `bank_transfer` funding types + """ + 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. + """ + funding_type: Literal["bank_transfer"] + """ + The `funding_type` to get the instructions for. + """ + + +class CustomerCreateFundingInstructionsParamsBankTransfer(TypedDict): + eu_bank_transfer: NotRequired[ + "CustomerCreateFundingInstructionsParamsBankTransferEuBankTransfer" + ] + """ + Configuration for eu_bank_transfer funding type. + """ + requested_address_types: NotRequired[ + List[Literal["iban", "sort_code", "spei", "zengin"]] + ] + """ + List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned. + + Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`. + """ + type: Literal[ + "eu_bank_transfer", + "gb_bank_transfer", + "jp_bank_transfer", + "mx_bank_transfer", + "us_bank_transfer", + ] + """ + The type of the `bank_transfer` + """ + + +class CustomerCreateFundingInstructionsParamsBankTransferEuBankTransfer( + TypedDict, +): + country: str + """ + The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. + """ diff --git a/stripe/params/_customer_create_params.py b/stripe/params/_customer_create_params.py new file mode 100644 index 000000000..3d7ae3df9 --- /dev/null +++ b/stripe/params/_customer_create_params.py @@ -0,0 +1,357 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class CustomerCreateParams(RequestOptions): + address: NotRequired["Literal['']|CustomerCreateParamsAddress"] + """ + The customer's address. + """ + balance: NotRequired[int] + """ + An integer amount in cents (or local equivalent) that represents the customer's current balance, which affect the customer's future invoices. A negative amount represents a credit that decreases the amount due on an invoice; a positive amount increases the amount due on an invoice. + """ + business_name: NotRequired["Literal['']|str"] + """ + The customer's business name. This may be up to *150 characters*. + """ + cash_balance: NotRequired["CustomerCreateParamsCashBalance"] + """ + Balance information and default balance settings for this customer. + """ + description: NotRequired[str] + """ + An arbitrary string that you can attach to a customer object. It is displayed alongside the customer in the dashboard. + """ + email: NotRequired[str] + """ + Customer's email address. It's displayed alongside the customer in your dashboard and can be useful for searching and tracking. This may be up to *512 characters*. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + individual_name: NotRequired["Literal['']|str"] + """ + The customer's full name. This may be up to *150 characters*. + """ + invoice_prefix: NotRequired[str] + """ + The prefix for the customer used to generate unique invoice numbers. Must be 3–12 uppercase letters or numbers. + """ + invoice_settings: NotRequired["CustomerCreateParamsInvoiceSettings"] + """ + Default invoice settings for this customer. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + name: NotRequired[str] + """ + The customer's full name or business name. + """ + next_invoice_sequence: NotRequired[int] + """ + The sequence to be used on the customer's next invoice. Defaults to 1. + """ + payment_method: NotRequired[str] + phone: NotRequired[str] + """ + The customer's phone number. + """ + preferred_locales: NotRequired[List[str]] + """ + Customer's preferred languages, ordered by preference. + """ + shipping: NotRequired["Literal['']|CustomerCreateParamsShipping"] + """ + The customer's shipping information. Appears on invoices emailed to this customer. + """ + source: NotRequired[str] + tax: NotRequired["CustomerCreateParamsTax"] + """ + Tax details about the customer. + """ + tax_exempt: NotRequired["Literal['']|Literal['exempt', 'none', 'reverse']"] + """ + The customer's tax exemption. One of `none`, `exempt`, or `reverse`. + """ + tax_id_data: NotRequired[List["CustomerCreateParamsTaxIdDatum"]] + """ + The customer's tax IDs. + """ + test_clock: NotRequired[str] + """ + ID of the test clock to attach to the customer. + """ + validate: NotRequired[bool] + + +class CustomerCreateParamsAddress(TypedDict): + city: NotRequired[str] + """ + City, district, suburb, town, or village. + """ + country: NotRequired[str] + """ + A freeform text field for the country. However, in order to activate some tax features, the format should be a 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. + """ + + +class CustomerCreateParamsCashBalance(TypedDict): + settings: NotRequired["CustomerCreateParamsCashBalanceSettings"] + """ + Settings controlling the behavior of the customer's cash balance, + such as reconciliation of funds received. + """ + + +class CustomerCreateParamsCashBalanceSettings(TypedDict): + reconciliation_mode: NotRequired[ + Literal["automatic", "manual", "merchant_default"] + ] + """ + Controls how funds transferred by the customer are applied to payment intents and invoices. Valid options are `automatic`, `manual`, or `merchant_default`. For more information about these reconciliation modes, see [Reconciliation](https://stripe.com/docs/payments/customer-balance/reconciliation). + """ + + +class CustomerCreateParamsInvoiceSettings(TypedDict): + custom_fields: NotRequired[ + "Literal['']|List[CustomerCreateParamsInvoiceSettingsCustomField]" + ] + """ + The list of up to 4 default custom fields to be displayed on invoices for this customer. When updating, pass an empty string to remove previously-defined fields. + """ + default_payment_method: NotRequired[str] + """ + ID of a payment method that's attached to the customer, to be used as the customer's default payment method for subscriptions and invoices. + """ + footer: NotRequired[str] + """ + Default footer to be displayed on invoices for this customer. + """ + rendering_options: NotRequired[ + "Literal['']|CustomerCreateParamsInvoiceSettingsRenderingOptions" + ] + """ + Default options for invoice PDF rendering for this customer. + """ + + +class CustomerCreateParamsInvoiceSettingsCustomField(TypedDict): + name: str + """ + The name of the custom field. This may be up to 40 characters. + """ + value: str + """ + The value of the custom field. This may be up to 140 characters. + """ + + +class CustomerCreateParamsInvoiceSettingsRenderingOptions(TypedDict): + amount_tax_display: NotRequired[ + "Literal['']|Literal['exclude_tax', 'include_inclusive_tax']" + ] + """ + How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One of `exclude_tax` or `include_inclusive_tax`. `include_inclusive_tax` will include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. `exclude_tax` will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts. + """ + template: NotRequired[str] + """ + ID of the invoice rendering template to use for future invoices. + """ + + +class CustomerCreateParamsShipping(TypedDict): + address: "CustomerCreateParamsShippingAddress" + """ + Customer shipping address. + """ + name: str + """ + Customer name. + """ + phone: NotRequired[str] + """ + Customer phone (including extension). + """ + + +class CustomerCreateParamsShippingAddress(TypedDict): + city: NotRequired[str] + """ + City, district, suburb, town, or village. + """ + country: NotRequired[str] + """ + A freeform text field for the country. However, in order to activate some tax features, the format should be a 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. + """ + + +class CustomerCreateParamsTax(TypedDict): + ip_address: NotRequired["Literal['']|str"] + """ + A recent IP address of the customer used for tax reporting and tax location inference. Stripe recommends updating the IP address when a new PaymentMethod is attached or the address field on the customer is updated. We recommend against updating this field more frequently since it could result in unexpected tax location/reporting outcomes. + """ + validate_location: NotRequired[Literal["deferred", "immediately"]] + """ + A flag that indicates when Stripe should validate the customer tax location. Defaults to `deferred`. + """ + + +class CustomerCreateParamsTaxIdDatum(TypedDict): + type: Literal[ + "ad_nrt", + "ae_trn", + "al_tin", + "am_tin", + "ao_tin", + "ar_cuit", + "au_abn", + "au_arn", + "aw_tin", + "az_tin", + "ba_tin", + "bb_tin", + "bd_bin", + "bf_ifu", + "bg_uic", + "bh_vat", + "bj_ifu", + "bo_tin", + "br_cnpj", + "br_cpf", + "bs_tin", + "by_tin", + "ca_bn", + "ca_gst_hst", + "ca_pst_bc", + "ca_pst_mb", + "ca_pst_sk", + "ca_qst", + "cd_nif", + "ch_uid", + "ch_vat", + "cl_tin", + "cm_niu", + "cn_tin", + "co_nit", + "cr_tin", + "cv_nif", + "de_stn", + "do_rcn", + "ec_ruc", + "eg_tin", + "es_cif", + "et_tin", + "eu_oss_vat", + "eu_vat", + "gb_vat", + "ge_vat", + "gn_nif", + "hk_br", + "hr_oib", + "hu_tin", + "id_npwp", + "il_vat", + "in_gst", + "is_vat", + "jp_cn", + "jp_rn", + "jp_trn", + "ke_pin", + "kg_tin", + "kh_tin", + "kr_brn", + "kz_bin", + "la_tin", + "li_uid", + "li_vat", + "ma_vat", + "md_vat", + "me_pib", + "mk_vat", + "mr_nif", + "mx_rfc", + "my_frp", + "my_itn", + "my_sst", + "ng_tin", + "no_vat", + "no_voec", + "np_pan", + "nz_gst", + "om_vat", + "pe_ruc", + "ph_tin", + "ro_tin", + "rs_pib", + "ru_inn", + "ru_kpp", + "sa_vat", + "sg_gst", + "sg_uen", + "si_tin", + "sn_ninea", + "sr_fin", + "sv_nit", + "th_vat", + "tj_tin", + "tr_tin", + "tw_vat", + "tz_vat", + "ua_vat", + "ug_tin", + "us_ein", + "uy_ruc", + "uz_tin", + "uz_vat", + "ve_rif", + "vn_tin", + "za_vat", + "zm_tin", + "zw_tin", + ] + """ + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `al_tin`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `aw_tin`, `az_tin`, `ba_tin`, `bb_tin`, `bd_bin`, `bf_ifu`, `bg_uic`, `bh_vat`, `bj_ifu`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cm_niu`, `cn_tin`, `co_nit`, `cr_tin`, `cv_nif`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `et_tin`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kg_tin`, `kh_tin`, `kr_brn`, `kz_bin`, `la_tin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin` + """ + value: str + """ + Value of the tax ID. + """ diff --git a/stripe/params/_customer_create_source_params.py b/stripe/params/_customer_create_source_params.py new file mode 100644 index 000000000..80318b03a --- /dev/null +++ b/stripe/params/_customer_create_source_params.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import NotRequired + + +class CustomerCreateSourceParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + source: str + """ + Please refer to full [documentation](https://stripe.com/docs/api) instead. + """ + validate: NotRequired[bool] diff --git a/stripe/params/_customer_create_tax_id_params.py b/stripe/params/_customer_create_tax_id_params.py new file mode 100644 index 000000000..ddaa0246d --- /dev/null +++ b/stripe/params/_customer_create_tax_id_params.py @@ -0,0 +1,131 @@ +# -*- 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 CustomerCreateTaxIdParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + type: Literal[ + "ad_nrt", + "ae_trn", + "al_tin", + "am_tin", + "ao_tin", + "ar_cuit", + "au_abn", + "au_arn", + "aw_tin", + "az_tin", + "ba_tin", + "bb_tin", + "bd_bin", + "bf_ifu", + "bg_uic", + "bh_vat", + "bj_ifu", + "bo_tin", + "br_cnpj", + "br_cpf", + "bs_tin", + "by_tin", + "ca_bn", + "ca_gst_hst", + "ca_pst_bc", + "ca_pst_mb", + "ca_pst_sk", + "ca_qst", + "cd_nif", + "ch_uid", + "ch_vat", + "cl_tin", + "cm_niu", + "cn_tin", + "co_nit", + "cr_tin", + "cv_nif", + "de_stn", + "do_rcn", + "ec_ruc", + "eg_tin", + "es_cif", + "et_tin", + "eu_oss_vat", + "eu_vat", + "gb_vat", + "ge_vat", + "gn_nif", + "hk_br", + "hr_oib", + "hu_tin", + "id_npwp", + "il_vat", + "in_gst", + "is_vat", + "jp_cn", + "jp_rn", + "jp_trn", + "ke_pin", + "kg_tin", + "kh_tin", + "kr_brn", + "kz_bin", + "la_tin", + "li_uid", + "li_vat", + "ma_vat", + "md_vat", + "me_pib", + "mk_vat", + "mr_nif", + "mx_rfc", + "my_frp", + "my_itn", + "my_sst", + "ng_tin", + "no_vat", + "no_voec", + "np_pan", + "nz_gst", + "om_vat", + "pe_ruc", + "ph_tin", + "ro_tin", + "rs_pib", + "ru_inn", + "ru_kpp", + "sa_vat", + "sg_gst", + "sg_uen", + "si_tin", + "sn_ninea", + "sr_fin", + "sv_nit", + "th_vat", + "tj_tin", + "tr_tin", + "tw_vat", + "tz_vat", + "ua_vat", + "ug_tin", + "us_ein", + "uy_ruc", + "uz_tin", + "uz_vat", + "ve_rif", + "vn_tin", + "za_vat", + "zm_tin", + "zw_tin", + ] + """ + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `al_tin`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `aw_tin`, `az_tin`, `ba_tin`, `bb_tin`, `bd_bin`, `bf_ifu`, `bg_uic`, `bh_vat`, `bj_ifu`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cm_niu`, `cn_tin`, `co_nit`, `cr_tin`, `cv_nif`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `et_tin`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kg_tin`, `kh_tin`, `kr_brn`, `kz_bin`, `la_tin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin` + """ + value: str + """ + Value of the tax ID. + """ diff --git a/stripe/params/_customer_delete_discount_params.py b/stripe/params/_customer_delete_discount_params.py new file mode 100644 index 000000000..5097006c3 --- /dev/null +++ b/stripe/params/_customer_delete_discount_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions + + +class CustomerDeleteDiscountParams(RequestOptions): + pass diff --git a/stripe/params/_customer_delete_params.py b/stripe/params/_customer_delete_params.py new file mode 100644 index 000000000..ac50ae632 --- /dev/null +++ b/stripe/params/_customer_delete_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions + + +class CustomerDeleteParams(RequestOptions): + pass diff --git a/stripe/params/_customer_delete_source_params.py b/stripe/params/_customer_delete_source_params.py new file mode 100644 index 000000000..b1bf34844 --- /dev/null +++ b/stripe/params/_customer_delete_source_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 CustomerDeleteSourceParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_customer_delete_tax_id_params.py b/stripe/params/_customer_delete_tax_id_params.py new file mode 100644 index 000000000..362ba6fe6 --- /dev/null +++ b/stripe/params/_customer_delete_tax_id_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions + + +class CustomerDeleteTaxIdParams(RequestOptions): + pass diff --git a/stripe/params/_customer_fund_cash_balance_params.py b/stripe/params/_customer_fund_cash_balance_params.py new file mode 100644 index 000000000..50645a32f --- /dev/null +++ b/stripe/params/_customer_fund_cash_balance_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 CustomerFundCashBalanceParams(RequestOptions): + amount: int + """ + Amount to be used for this test cash balance transaction. A positive integer representing how much to fund in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to fund $1.00 or 100 to fund ¥100, a zero-decimal currency). + """ + 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. + """ + reference: NotRequired[str] + """ + A description of the test funding. This simulates free-text references supplied by customers when making bank transfers to their cash balance. You can use this to test how Stripe's [reconciliation algorithm](https://stripe.com/docs/payments/customer-balance/reconciliation) applies to different user inputs. + """ diff --git a/stripe/params/_customer_funding_instructions_create_params.py b/stripe/params/_customer_funding_instructions_create_params.py new file mode 100644 index 000000000..24d23ad43 --- /dev/null +++ b/stripe/params/_customer_funding_instructions_create_params.py @@ -0,0 +1,59 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import Literal, NotRequired, TypedDict + + +class CustomerFundingInstructionsCreateParams(TypedDict): + bank_transfer: "CustomerFundingInstructionsCreateParamsBankTransfer" + """ + Additional parameters for `bank_transfer` funding types + """ + 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. + """ + funding_type: Literal["bank_transfer"] + """ + The `funding_type` to get the instructions for. + """ + + +class CustomerFundingInstructionsCreateParamsBankTransfer(TypedDict): + eu_bank_transfer: NotRequired[ + "CustomerFundingInstructionsCreateParamsBankTransferEuBankTransfer" + ] + """ + Configuration for eu_bank_transfer funding type. + """ + requested_address_types: NotRequired[ + List[Literal["iban", "sort_code", "spei", "zengin"]] + ] + """ + List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned. + + Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`. + """ + type: Literal[ + "eu_bank_transfer", + "gb_bank_transfer", + "jp_bank_transfer", + "mx_bank_transfer", + "us_bank_transfer", + ] + """ + The type of the `bank_transfer` + """ + + +class CustomerFundingInstructionsCreateParamsBankTransferEuBankTransfer( + TypedDict, +): + country: str + """ + The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. + """ diff --git a/stripe/params/_customer_list_balance_transactions_params.py b/stripe/params/_customer_list_balance_transactions_params.py new file mode 100644 index 000000000..258153525 --- /dev/null +++ b/stripe/params/_customer_list_balance_transactions_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 CustomerListBalanceTransactionsParams(RequestOptions): + 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. + """ diff --git a/stripe/params/_customer_list_cash_balance_transactions_params.py b/stripe/params/_customer_list_cash_balance_transactions_params.py new file mode 100644 index 000000000..7b41fc856 --- /dev/null +++ b/stripe/params/_customer_list_cash_balance_transactions_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 CustomerListCashBalanceTransactionsParams(RequestOptions): + 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. + """ diff --git a/stripe/params/_customer_list_params.py b/stripe/params/_customer_list_params.py new file mode 100644 index 000000000..84a76a03b --- /dev/null +++ b/stripe/params/_customer_list_params.py @@ -0,0 +1,55 @@ +# -*- 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 CustomerListParams(RequestOptions): + created: NotRequired["CustomerListParamsCreated|int"] + """ + Only return customers that were created during the given date interval. + """ + email: NotRequired[str] + """ + A case-sensitive filter on the list based on the customer's `email` field. The value must be a string. + """ + 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. + """ + test_clock: NotRequired[str] + """ + Provides a list of customers that are associated with the specified test clock. The response will not include customers with test clocks if this parameter is not set. + """ + + +class CustomerListParamsCreated(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/_customer_list_payment_methods_params.py b/stripe/params/_customer_list_payment_methods_params.py new file mode 100644 index 000000000..b8ec4ceb6 --- /dev/null +++ b/stripe/params/_customer_list_payment_methods_params.py @@ -0,0 +1,92 @@ +# -*- 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 CustomerListPaymentMethodsParams(RequestOptions): + allow_redisplay: NotRequired[Literal["always", "limited", "unspecified"]] + """ + This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. + """ + 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. + """ + type: NotRequired[ + Literal[ + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "alma", + "amazon_pay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "billie", + "blik", + "boleto", + "card", + "cashapp", + "crypto", + "customer_balance", + "eps", + "fpx", + "giropay", + "gopay", + "grabpay", + "id_bank_transfer", + "ideal", + "kakao_pay", + "klarna", + "konbini", + "kr_card", + "link", + "mb_way", + "mobilepay", + "multibanco", + "naver_pay", + "nz_bank_account", + "oxxo", + "p24", + "pay_by_bank", + "payco", + "paynow", + "paypal", + "paypay", + "payto", + "pix", + "promptpay", + "qris", + "rechnung", + "revolut_pay", + "samsung_pay", + "satispay", + "sepa_debit", + "shopeepay", + "sofort", + "stripe_balance", + "swish", + "twint", + "us_bank_account", + "wechat_pay", + "zip", + ] + ] + """ + An optional filter on the list, based on the object `type` field. Without the filter, the list includes all current and future payment method types. If your integration expects only one type of payment method in the response, make sure to provide a type value in the request. + """ diff --git a/stripe/params/_customer_list_sources_params.py b/stripe/params/_customer_list_sources_params.py new file mode 100644 index 000000000..8e372def6 --- /dev/null +++ b/stripe/params/_customer_list_sources_params.py @@ -0,0 +1,28 @@ +# -*- 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 CustomerListSourcesParams(RequestOptions): + 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. + """ + object: NotRequired[str] + """ + Filter sources according to a particular object type. + """ + 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. + """ diff --git a/stripe/params/_customer_list_tax_ids_params.py b/stripe/params/_customer_list_tax_ids_params.py new file mode 100644 index 000000000..48e701b90 --- /dev/null +++ b/stripe/params/_customer_list_tax_ids_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 CustomerListTaxIdsParams(RequestOptions): + 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. + """ diff --git a/stripe/params/_customer_modify_balance_transaction_params.py b/stripe/params/_customer_modify_balance_transaction_params.py new file mode 100644 index 000000000..9201b6263 --- /dev/null +++ b/stripe/params/_customer_modify_balance_transaction_params.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import Literal, NotRequired + + +class CustomerModifyBalanceTransactionParams(RequestOptions): + description: NotRequired[str] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ diff --git a/stripe/params/_customer_modify_cash_balance_params.py b/stripe/params/_customer_modify_cash_balance_params.py new file mode 100644 index 000000000..825733e11 --- /dev/null +++ b/stripe/params/_customer_modify_cash_balance_params.py @@ -0,0 +1,25 @@ +# -*- 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, TypedDict + + +class CustomerModifyCashBalanceParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + settings: NotRequired["CustomerModifyCashBalanceParamsSettings"] + """ + A hash of settings for this cash balance. + """ + + +class CustomerModifyCashBalanceParamsSettings(TypedDict): + reconciliation_mode: NotRequired[ + Literal["automatic", "manual", "merchant_default"] + ] + """ + Controls how funds transferred by the customer are applied to payment intents and invoices. Valid options are `automatic`, `manual`, or `merchant_default`. For more information about these reconciliation modes, see [Reconciliation](https://stripe.com/docs/payments/customer-balance/reconciliation). + """ diff --git a/stripe/params/_customer_modify_params.py b/stripe/params/_customer_modify_params.py new file mode 100644 index 000000000..4e1f5e8be --- /dev/null +++ b/stripe/params/_customer_modify_params.py @@ -0,0 +1,234 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class CustomerModifyParams(RequestOptions): + address: NotRequired["Literal['']|CustomerModifyParamsAddress"] + """ + The customer's address. + """ + balance: NotRequired[int] + """ + An integer amount in cents (or local equivalent) that represents the customer's current balance, which affect the customer's future invoices. A negative amount represents a credit that decreases the amount due on an invoice; a positive amount increases the amount due on an invoice. + """ + business_name: NotRequired["Literal['']|str"] + """ + The customer's business name. This may be up to *150 characters*. + """ + cash_balance: NotRequired["CustomerModifyParamsCashBalance"] + """ + Balance information and default balance settings for this customer. + """ + default_source: NotRequired[str] + """ + If you are using payment methods created via the PaymentMethods API, see the [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/update#update_customer-invoice_settings-default_payment_method) parameter. + + Provide the ID of a payment source already attached to this customer to make it this customer's default payment source. + + If you want to add a new payment source and make it the default, see the [source](https://stripe.com/docs/api/customers/update#update_customer-source) property. + """ + description: NotRequired[str] + """ + An arbitrary string that you can attach to a customer object. It is displayed alongside the customer in the dashboard. + """ + email: NotRequired[str] + """ + Customer's email address. It's displayed alongside the customer in your dashboard and can be useful for searching and tracking. This may be up to *512 characters*. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + individual_name: NotRequired["Literal['']|str"] + """ + The customer's full name. This may be up to *150 characters*. + """ + invoice_prefix: NotRequired[str] + """ + The prefix for the customer used to generate unique invoice numbers. Must be 3–12 uppercase letters or numbers. + """ + invoice_settings: NotRequired["CustomerModifyParamsInvoiceSettings"] + """ + Default invoice settings for this customer. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + name: NotRequired[str] + """ + The customer's full name or business name. + """ + next_invoice_sequence: NotRequired[int] + """ + The sequence to be used on the customer's next invoice. Defaults to 1. + """ + phone: NotRequired[str] + """ + The customer's phone number. + """ + preferred_locales: NotRequired[List[str]] + """ + Customer's preferred languages, ordered by preference. + """ + shipping: NotRequired["Literal['']|CustomerModifyParamsShipping"] + """ + The customer's shipping information. Appears on invoices emailed to this customer. + """ + source: NotRequired[str] + tax: NotRequired["CustomerModifyParamsTax"] + """ + Tax details about the customer. + """ + tax_exempt: NotRequired["Literal['']|Literal['exempt', 'none', 'reverse']"] + """ + The customer's tax exemption. One of `none`, `exempt`, or `reverse`. + """ + validate: NotRequired[bool] + + +class CustomerModifyParamsAddress(TypedDict): + city: NotRequired[str] + """ + City, district, suburb, town, or village. + """ + country: NotRequired[str] + """ + A freeform text field for the country. However, in order to activate some tax features, the format should be a 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. + """ + + +class CustomerModifyParamsCashBalance(TypedDict): + settings: NotRequired["CustomerModifyParamsCashBalanceSettings"] + """ + Settings controlling the behavior of the customer's cash balance, + such as reconciliation of funds received. + """ + + +class CustomerModifyParamsCashBalanceSettings(TypedDict): + reconciliation_mode: NotRequired[ + Literal["automatic", "manual", "merchant_default"] + ] + """ + Controls how funds transferred by the customer are applied to payment intents and invoices. Valid options are `automatic`, `manual`, or `merchant_default`. For more information about these reconciliation modes, see [Reconciliation](https://stripe.com/docs/payments/customer-balance/reconciliation). + """ + + +class CustomerModifyParamsInvoiceSettings(TypedDict): + custom_fields: NotRequired[ + "Literal['']|List[CustomerModifyParamsInvoiceSettingsCustomField]" + ] + """ + The list of up to 4 default custom fields to be displayed on invoices for this customer. When updating, pass an empty string to remove previously-defined fields. + """ + default_payment_method: NotRequired[str] + """ + ID of a payment method that's attached to the customer, to be used as the customer's default payment method for subscriptions and invoices. + """ + footer: NotRequired[str] + """ + Default footer to be displayed on invoices for this customer. + """ + rendering_options: NotRequired[ + "Literal['']|CustomerModifyParamsInvoiceSettingsRenderingOptions" + ] + """ + Default options for invoice PDF rendering for this customer. + """ + + +class CustomerModifyParamsInvoiceSettingsCustomField(TypedDict): + name: str + """ + The name of the custom field. This may be up to 40 characters. + """ + value: str + """ + The value of the custom field. This may be up to 140 characters. + """ + + +class CustomerModifyParamsInvoiceSettingsRenderingOptions(TypedDict): + amount_tax_display: NotRequired[ + "Literal['']|Literal['exclude_tax', 'include_inclusive_tax']" + ] + """ + How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One of `exclude_tax` or `include_inclusive_tax`. `include_inclusive_tax` will include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. `exclude_tax` will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts. + """ + template: NotRequired[str] + """ + ID of the invoice rendering template to use for future invoices. + """ + + +class CustomerModifyParamsShipping(TypedDict): + address: "CustomerModifyParamsShippingAddress" + """ + Customer shipping address. + """ + name: str + """ + Customer name. + """ + phone: NotRequired[str] + """ + Customer phone (including extension). + """ + + +class CustomerModifyParamsShippingAddress(TypedDict): + city: NotRequired[str] + """ + City, district, suburb, town, or village. + """ + country: NotRequired[str] + """ + A freeform text field for the country. However, in order to activate some tax features, the format should be a 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. + """ + + +class CustomerModifyParamsTax(TypedDict): + ip_address: NotRequired["Literal['']|str"] + """ + A recent IP address of the customer used for tax reporting and tax location inference. Stripe recommends updating the IP address when a new PaymentMethod is attached or the address field on the customer is updated. We recommend against updating this field more frequently since it could result in unexpected tax location/reporting outcomes. + """ + validate_location: NotRequired[Literal["auto", "deferred", "immediately"]] + """ + A flag that indicates when Stripe should validate the customer tax location. Defaults to `auto`. + """ diff --git a/stripe/params/_customer_modify_source_params.py b/stripe/params/_customer_modify_source_params.py new file mode 100644 index 000000000..844a6a70a --- /dev/null +++ b/stripe/params/_customer_modify_source_params.py @@ -0,0 +1,107 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class CustomerModifySourceParams(RequestOptions): + account_holder_name: NotRequired[str] + """ + The name of the person or business that owns the bank account. + """ + account_holder_type: NotRequired[Literal["company", "individual"]] + """ + The type of entity that holds the account. This can be either `individual` or `company`. + """ + address_city: NotRequired[str] + """ + City/District/Suburb/Town/Village. + """ + address_country: NotRequired[str] + """ + Billing address country, if provided when creating card. + """ + address_line1: NotRequired[str] + """ + Address line 1 (Street address/PO Box/Company name). + """ + address_line2: NotRequired[str] + """ + Address line 2 (Apartment/Suite/Unit/Building). + """ + address_state: NotRequired[str] + """ + State/County/Province/Region. + """ + address_zip: NotRequired[str] + """ + ZIP or postal code. + """ + exp_month: NotRequired[str] + """ + Two digit number representing the card's expiration month. + """ + exp_year: NotRequired[str] + """ + Four digit number representing the card's expiration year. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + name: NotRequired[str] + """ + Cardholder name. + """ + owner: NotRequired["CustomerModifySourceParamsOwner"] + + +class CustomerModifySourceParamsOwner(TypedDict): + address: NotRequired["CustomerModifySourceParamsOwnerAddress"] + """ + Owner's address. + """ + email: NotRequired[str] + """ + Owner's email address. + """ + name: NotRequired[str] + """ + Owner's full name. + """ + phone: NotRequired[str] + """ + Owner's phone number. + """ + + +class CustomerModifySourceParamsOwnerAddress(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. + """ diff --git a/stripe/params/_customer_payment_method_list_params.py b/stripe/params/_customer_payment_method_list_params.py new file mode 100644 index 000000000..9748fad0e --- /dev/null +++ b/stripe/params/_customer_payment_method_list_params.py @@ -0,0 +1,91 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import Literal, NotRequired, TypedDict + + +class CustomerPaymentMethodListParams(TypedDict): + allow_redisplay: NotRequired[Literal["always", "limited", "unspecified"]] + """ + This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. + """ + 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. + """ + type: NotRequired[ + Literal[ + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "alma", + "amazon_pay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "billie", + "blik", + "boleto", + "card", + "cashapp", + "crypto", + "customer_balance", + "eps", + "fpx", + "giropay", + "gopay", + "grabpay", + "id_bank_transfer", + "ideal", + "kakao_pay", + "klarna", + "konbini", + "kr_card", + "link", + "mb_way", + "mobilepay", + "multibanco", + "naver_pay", + "nz_bank_account", + "oxxo", + "p24", + "pay_by_bank", + "payco", + "paynow", + "paypal", + "paypay", + "payto", + "pix", + "promptpay", + "qris", + "rechnung", + "revolut_pay", + "samsung_pay", + "satispay", + "sepa_debit", + "shopeepay", + "sofort", + "stripe_balance", + "swish", + "twint", + "us_bank_account", + "wechat_pay", + "zip", + ] + ] + """ + An optional filter on the list, based on the object `type` field. Without the filter, the list includes all current and future payment method types. If your integration expects only one type of payment method in the response, make sure to provide a type value in the request. + """ diff --git a/stripe/params/_customer_payment_method_retrieve_params.py b/stripe/params/_customer_payment_method_retrieve_params.py new file mode 100644 index 000000000..2be20f68b --- /dev/null +++ b/stripe/params/_customer_payment_method_retrieve_params.py @@ -0,0 +1,11 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import NotRequired, TypedDict + + +class CustomerPaymentMethodRetrieveParams(TypedDict): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_customer_payment_source_create_params.py b/stripe/params/_customer_payment_source_create_params.py new file mode 100644 index 000000000..20c45c9f8 --- /dev/null +++ b/stripe/params/_customer_payment_source_create_params.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import Dict, List +from typing_extensions import NotRequired, TypedDict + + +class CustomerPaymentSourceCreateParams(TypedDict): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + source: str + """ + Please refer to full [documentation](https://stripe.com/docs/api) instead. + """ + validate: NotRequired[bool] diff --git a/stripe/params/_customer_payment_source_delete_params.py b/stripe/params/_customer_payment_source_delete_params.py new file mode 100644 index 000000000..b7c9db285 --- /dev/null +++ b/stripe/params/_customer_payment_source_delete_params.py @@ -0,0 +1,11 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import NotRequired, TypedDict + + +class CustomerPaymentSourceDeleteParams(TypedDict): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_customer_payment_source_list_params.py b/stripe/params/_customer_payment_source_list_params.py new file mode 100644 index 000000000..50e7d599f --- /dev/null +++ b/stripe/params/_customer_payment_source_list_params.py @@ -0,0 +1,27 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import NotRequired, TypedDict + + +class CustomerPaymentSourceListParams(TypedDict): + 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. + """ + object: NotRequired[str] + """ + Filter sources according to a particular object type. + """ + 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. + """ diff --git a/stripe/params/_customer_payment_source_retrieve_params.py b/stripe/params/_customer_payment_source_retrieve_params.py new file mode 100644 index 000000000..20b7bc4df --- /dev/null +++ b/stripe/params/_customer_payment_source_retrieve_params.py @@ -0,0 +1,11 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import NotRequired, TypedDict + + +class CustomerPaymentSourceRetrieveParams(TypedDict): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_customer_payment_source_update_params.py b/stripe/params/_customer_payment_source_update_params.py new file mode 100644 index 000000000..33e5b3520 --- /dev/null +++ b/stripe/params/_customer_payment_source_update_params.py @@ -0,0 +1,106 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class CustomerPaymentSourceUpdateParams(TypedDict): + account_holder_name: NotRequired[str] + """ + The name of the person or business that owns the bank account. + """ + account_holder_type: NotRequired[Literal["company", "individual"]] + """ + The type of entity that holds the account. This can be either `individual` or `company`. + """ + address_city: NotRequired[str] + """ + City/District/Suburb/Town/Village. + """ + address_country: NotRequired[str] + """ + Billing address country, if provided when creating card. + """ + address_line1: NotRequired[str] + """ + Address line 1 (Street address/PO Box/Company name). + """ + address_line2: NotRequired[str] + """ + Address line 2 (Apartment/Suite/Unit/Building). + """ + address_state: NotRequired[str] + """ + State/County/Province/Region. + """ + address_zip: NotRequired[str] + """ + ZIP or postal code. + """ + exp_month: NotRequired[str] + """ + Two digit number representing the card's expiration month. + """ + exp_year: NotRequired[str] + """ + Four digit number representing the card's expiration year. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + name: NotRequired[str] + """ + Cardholder name. + """ + owner: NotRequired["CustomerPaymentSourceUpdateParamsOwner"] + + +class CustomerPaymentSourceUpdateParamsOwner(TypedDict): + address: NotRequired["CustomerPaymentSourceUpdateParamsOwnerAddress"] + """ + Owner's address. + """ + email: NotRequired[str] + """ + Owner's email address. + """ + name: NotRequired[str] + """ + Owner's full name. + """ + phone: NotRequired[str] + """ + Owner's phone number. + """ + + +class CustomerPaymentSourceUpdateParamsOwnerAddress(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. + """ diff --git a/stripe/params/_customer_payment_source_verify_params.py b/stripe/params/_customer_payment_source_verify_params.py new file mode 100644 index 000000000..91b036c75 --- /dev/null +++ b/stripe/params/_customer_payment_source_verify_params.py @@ -0,0 +1,15 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import NotRequired, TypedDict + + +class CustomerPaymentSourceVerifyParams(TypedDict): + amounts: NotRequired[List[int]] + """ + Two positive integers, in *cents*, equal to the values of the microdeposits sent to the bank account. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_customer_retrieve_balance_transaction_params.py b/stripe/params/_customer_retrieve_balance_transaction_params.py new file mode 100644 index 000000000..c945e82db --- /dev/null +++ b/stripe/params/_customer_retrieve_balance_transaction_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 CustomerRetrieveBalanceTransactionParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_customer_retrieve_cash_balance_params.py b/stripe/params/_customer_retrieve_cash_balance_params.py new file mode 100644 index 000000000..be8d5f6e0 --- /dev/null +++ b/stripe/params/_customer_retrieve_cash_balance_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 CustomerRetrieveCashBalanceParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_customer_retrieve_cash_balance_transaction_params.py b/stripe/params/_customer_retrieve_cash_balance_transaction_params.py new file mode 100644 index 000000000..9f175a328 --- /dev/null +++ b/stripe/params/_customer_retrieve_cash_balance_transaction_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 CustomerRetrieveCashBalanceTransactionParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_customer_retrieve_params.py b/stripe/params/_customer_retrieve_params.py new file mode 100644 index 000000000..17e5db37d --- /dev/null +++ b/stripe/params/_customer_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 CustomerRetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_customer_retrieve_payment_method_params.py b/stripe/params/_customer_retrieve_payment_method_params.py new file mode 100644 index 000000000..27ef7b927 --- /dev/null +++ b/stripe/params/_customer_retrieve_payment_method_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 CustomerRetrievePaymentMethodParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_customer_retrieve_source_params.py b/stripe/params/_customer_retrieve_source_params.py new file mode 100644 index 000000000..2a9969e44 --- /dev/null +++ b/stripe/params/_customer_retrieve_source_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 CustomerRetrieveSourceParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_customer_retrieve_tax_id_params.py b/stripe/params/_customer_retrieve_tax_id_params.py new file mode 100644 index 000000000..84b95c4b4 --- /dev/null +++ b/stripe/params/_customer_retrieve_tax_id_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 CustomerRetrieveTaxIdParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_customer_search_params.py b/stripe/params/_customer_search_params.py new file mode 100644 index 000000000..7cb556101 --- /dev/null +++ b/stripe/params/_customer_search_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 CustomerSearchParams(RequestOptions): + 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. + """ + page: NotRequired[str] + """ + A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + """ + query: str + """ + The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for customers](https://stripe.com/docs/search#query-fields-for-customers). + """ diff --git a/stripe/params/_customer_session_create_params.py b/stripe/params/_customer_session_create_params.py new file mode 100644 index 000000000..89041dc2b --- /dev/null +++ b/stripe/params/_customer_session_create_params.py @@ -0,0 +1,109 @@ +# -*- 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, TypedDict + + +class CustomerSessionCreateParams(RequestOptions): + components: "CustomerSessionCreateParamsComponents" + """ + Configuration for each component. Exactly 1 component must be enabled. + """ + customer: NotRequired[str] + """ + The ID of an existing customer for which to create the Customer Session. + """ + customer_account: NotRequired[str] + """ + The ID of an existing Account for which to create the Customer Session. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + + +class CustomerSessionCreateParamsComponents(TypedDict): + buy_button: NotRequired["CustomerSessionCreateParamsComponentsBuyButton"] + """ + Configuration for buy button. + """ + payment_element: NotRequired[ + "CustomerSessionCreateParamsComponentsPaymentElement" + ] + """ + Configuration for the Payment Element. + """ + pricing_table: NotRequired[ + "CustomerSessionCreateParamsComponentsPricingTable" + ] + """ + Configuration for the pricing table. + """ + + +class CustomerSessionCreateParamsComponentsBuyButton(TypedDict): + enabled: bool + """ + Whether the buy button is enabled. + """ + + +class CustomerSessionCreateParamsComponentsPaymentElement(TypedDict): + enabled: bool + """ + Whether the Payment Element is enabled. + """ + features: NotRequired[ + "CustomerSessionCreateParamsComponentsPaymentElementFeatures" + ] + """ + This hash defines whether the Payment Element supports certain features. + """ + + +class CustomerSessionCreateParamsComponentsPaymentElementFeatures(TypedDict): + payment_method_allow_redisplay_filters: NotRequired[ + List[Literal["always", "limited", "unspecified"]] + ] + """ + A list of [`allow_redisplay`](https://docs.stripe.com/api/payment_methods/object#payment_method_object-allow_redisplay) values that controls which saved payment methods the Payment Element displays by filtering to only show payment methods with an `allow_redisplay` value that is present in this list. + + If not specified, defaults to ["always"]. In order to display all saved payment methods, specify ["always", "limited", "unspecified"]. + """ + payment_method_redisplay: NotRequired[Literal["disabled", "enabled"]] + """ + Controls whether or not the Payment Element shows saved payment methods. This parameter defaults to `disabled`. + """ + payment_method_redisplay_limit: NotRequired[int] + """ + Determines the max number of saved payment methods for the Payment Element to display. This parameter defaults to `3`. The maximum redisplay limit is `10`. + """ + payment_method_remove: NotRequired[Literal["disabled", "enabled"]] + """ + Controls whether the Payment Element displays the option to remove a saved payment method. This parameter defaults to `disabled`. + + Allowing buyers to remove their saved payment methods impacts subscriptions that depend on that payment method. Removing the payment method detaches the [`customer` object](https://docs.stripe.com/api/payment_methods/object#payment_method_object-customer) from that [PaymentMethod](https://docs.stripe.com/api/payment_methods). + """ + payment_method_save: NotRequired[Literal["disabled", "enabled"]] + """ + Controls whether the Payment Element displays a checkbox offering to save a new payment method. This parameter defaults to `disabled`. + + If a customer checks the box, the [`allow_redisplay`](https://docs.stripe.com/api/payment_methods/object#payment_method_object-allow_redisplay) value on the PaymentMethod is set to `'always'` at confirmation time. For PaymentIntents, the [`setup_future_usage`](https://docs.stripe.com/api/payment_intents/object#payment_intent_object-setup_future_usage) value is also set to the value defined in `payment_method_save_usage`. + """ + payment_method_save_usage: NotRequired[ + Literal["off_session", "on_session"] + ] + """ + When using PaymentIntents and the customer checks the save checkbox, this field determines the [`setup_future_usage`](https://docs.stripe.com/api/payment_intents/object#payment_intent_object-setup_future_usage) value used to confirm the PaymentIntent. + + When using SetupIntents, directly configure the [`usage`](https://docs.stripe.com/api/setup_intents/object#setup_intent_object-usage) value on SetupIntent creation. + """ + + +class CustomerSessionCreateParamsComponentsPricingTable(TypedDict): + enabled: bool + """ + Whether the pricing table is enabled. + """ diff --git a/stripe/params/_customer_tax_id_create_params.py b/stripe/params/_customer_tax_id_create_params.py new file mode 100644 index 000000000..f30e900c9 --- /dev/null +++ b/stripe/params/_customer_tax_id_create_params.py @@ -0,0 +1,130 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import Literal, NotRequired, TypedDict + + +class CustomerTaxIdCreateParams(TypedDict): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + type: Literal[ + "ad_nrt", + "ae_trn", + "al_tin", + "am_tin", + "ao_tin", + "ar_cuit", + "au_abn", + "au_arn", + "aw_tin", + "az_tin", + "ba_tin", + "bb_tin", + "bd_bin", + "bf_ifu", + "bg_uic", + "bh_vat", + "bj_ifu", + "bo_tin", + "br_cnpj", + "br_cpf", + "bs_tin", + "by_tin", + "ca_bn", + "ca_gst_hst", + "ca_pst_bc", + "ca_pst_mb", + "ca_pst_sk", + "ca_qst", + "cd_nif", + "ch_uid", + "ch_vat", + "cl_tin", + "cm_niu", + "cn_tin", + "co_nit", + "cr_tin", + "cv_nif", + "de_stn", + "do_rcn", + "ec_ruc", + "eg_tin", + "es_cif", + "et_tin", + "eu_oss_vat", + "eu_vat", + "gb_vat", + "ge_vat", + "gn_nif", + "hk_br", + "hr_oib", + "hu_tin", + "id_npwp", + "il_vat", + "in_gst", + "is_vat", + "jp_cn", + "jp_rn", + "jp_trn", + "ke_pin", + "kg_tin", + "kh_tin", + "kr_brn", + "kz_bin", + "la_tin", + "li_uid", + "li_vat", + "ma_vat", + "md_vat", + "me_pib", + "mk_vat", + "mr_nif", + "mx_rfc", + "my_frp", + "my_itn", + "my_sst", + "ng_tin", + "no_vat", + "no_voec", + "np_pan", + "nz_gst", + "om_vat", + "pe_ruc", + "ph_tin", + "ro_tin", + "rs_pib", + "ru_inn", + "ru_kpp", + "sa_vat", + "sg_gst", + "sg_uen", + "si_tin", + "sn_ninea", + "sr_fin", + "sv_nit", + "th_vat", + "tj_tin", + "tr_tin", + "tw_vat", + "tz_vat", + "ua_vat", + "ug_tin", + "us_ein", + "uy_ruc", + "uz_tin", + "uz_vat", + "ve_rif", + "vn_tin", + "za_vat", + "zm_tin", + "zw_tin", + ] + """ + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `al_tin`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `aw_tin`, `az_tin`, `ba_tin`, `bb_tin`, `bd_bin`, `bf_ifu`, `bg_uic`, `bh_vat`, `bj_ifu`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cm_niu`, `cn_tin`, `co_nit`, `cr_tin`, `cv_nif`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `et_tin`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kg_tin`, `kh_tin`, `kr_brn`, `kz_bin`, `la_tin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin` + """ + value: str + """ + Value of the tax ID. + """ diff --git a/stripe/params/_customer_tax_id_delete_params.py b/stripe/params/_customer_tax_id_delete_params.py new file mode 100644 index 000000000..e301b4e49 --- /dev/null +++ b/stripe/params/_customer_tax_id_delete_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class CustomerTaxIdDeleteParams(TypedDict): + pass diff --git a/stripe/params/_customer_tax_id_list_params.py b/stripe/params/_customer_tax_id_list_params.py new file mode 100644 index 000000000..cf87ac1c0 --- /dev/null +++ b/stripe/params/_customer_tax_id_list_params.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import NotRequired, TypedDict + + +class CustomerTaxIdListParams(TypedDict): + 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. + """ diff --git a/stripe/params/_customer_tax_id_retrieve_params.py b/stripe/params/_customer_tax_id_retrieve_params.py new file mode 100644 index 000000000..8f5adeff6 --- /dev/null +++ b/stripe/params/_customer_tax_id_retrieve_params.py @@ -0,0 +1,11 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import NotRequired, TypedDict + + +class CustomerTaxIdRetrieveParams(TypedDict): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_customer_update_params.py b/stripe/params/_customer_update_params.py new file mode 100644 index 000000000..b325846dc --- /dev/null +++ b/stripe/params/_customer_update_params.py @@ -0,0 +1,233 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class CustomerUpdateParams(TypedDict): + address: NotRequired["Literal['']|CustomerUpdateParamsAddress"] + """ + The customer's address. + """ + balance: NotRequired[int] + """ + An integer amount in cents (or local equivalent) that represents the customer's current balance, which affect the customer's future invoices. A negative amount represents a credit that decreases the amount due on an invoice; a positive amount increases the amount due on an invoice. + """ + business_name: NotRequired["Literal['']|str"] + """ + The customer's business name. This may be up to *150 characters*. + """ + cash_balance: NotRequired["CustomerUpdateParamsCashBalance"] + """ + Balance information and default balance settings for this customer. + """ + default_source: NotRequired[str] + """ + If you are using payment methods created via the PaymentMethods API, see the [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/update#update_customer-invoice_settings-default_payment_method) parameter. + + Provide the ID of a payment source already attached to this customer to make it this customer's default payment source. + + If you want to add a new payment source and make it the default, see the [source](https://stripe.com/docs/api/customers/update#update_customer-source) property. + """ + description: NotRequired[str] + """ + An arbitrary string that you can attach to a customer object. It is displayed alongside the customer in the dashboard. + """ + email: NotRequired[str] + """ + Customer's email address. It's displayed alongside the customer in your dashboard and can be useful for searching and tracking. This may be up to *512 characters*. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + individual_name: NotRequired["Literal['']|str"] + """ + The customer's full name. This may be up to *150 characters*. + """ + invoice_prefix: NotRequired[str] + """ + The prefix for the customer used to generate unique invoice numbers. Must be 3–12 uppercase letters or numbers. + """ + invoice_settings: NotRequired["CustomerUpdateParamsInvoiceSettings"] + """ + Default invoice settings for this customer. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + name: NotRequired[str] + """ + The customer's full name or business name. + """ + next_invoice_sequence: NotRequired[int] + """ + The sequence to be used on the customer's next invoice. Defaults to 1. + """ + phone: NotRequired[str] + """ + The customer's phone number. + """ + preferred_locales: NotRequired[List[str]] + """ + Customer's preferred languages, ordered by preference. + """ + shipping: NotRequired["Literal['']|CustomerUpdateParamsShipping"] + """ + The customer's shipping information. Appears on invoices emailed to this customer. + """ + source: NotRequired[str] + tax: NotRequired["CustomerUpdateParamsTax"] + """ + Tax details about the customer. + """ + tax_exempt: NotRequired["Literal['']|Literal['exempt', 'none', 'reverse']"] + """ + The customer's tax exemption. One of `none`, `exempt`, or `reverse`. + """ + validate: NotRequired[bool] + + +class CustomerUpdateParamsAddress(TypedDict): + city: NotRequired[str] + """ + City, district, suburb, town, or village. + """ + country: NotRequired[str] + """ + A freeform text field for the country. However, in order to activate some tax features, the format should be a 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. + """ + + +class CustomerUpdateParamsCashBalance(TypedDict): + settings: NotRequired["CustomerUpdateParamsCashBalanceSettings"] + """ + Settings controlling the behavior of the customer's cash balance, + such as reconciliation of funds received. + """ + + +class CustomerUpdateParamsCashBalanceSettings(TypedDict): + reconciliation_mode: NotRequired[ + Literal["automatic", "manual", "merchant_default"] + ] + """ + Controls how funds transferred by the customer are applied to payment intents and invoices. Valid options are `automatic`, `manual`, or `merchant_default`. For more information about these reconciliation modes, see [Reconciliation](https://stripe.com/docs/payments/customer-balance/reconciliation). + """ + + +class CustomerUpdateParamsInvoiceSettings(TypedDict): + custom_fields: NotRequired[ + "Literal['']|List[CustomerUpdateParamsInvoiceSettingsCustomField]" + ] + """ + The list of up to 4 default custom fields to be displayed on invoices for this customer. When updating, pass an empty string to remove previously-defined fields. + """ + default_payment_method: NotRequired[str] + """ + ID of a payment method that's attached to the customer, to be used as the customer's default payment method for subscriptions and invoices. + """ + footer: NotRequired[str] + """ + Default footer to be displayed on invoices for this customer. + """ + rendering_options: NotRequired[ + "Literal['']|CustomerUpdateParamsInvoiceSettingsRenderingOptions" + ] + """ + Default options for invoice PDF rendering for this customer. + """ + + +class CustomerUpdateParamsInvoiceSettingsCustomField(TypedDict): + name: str + """ + The name of the custom field. This may be up to 40 characters. + """ + value: str + """ + The value of the custom field. This may be up to 140 characters. + """ + + +class CustomerUpdateParamsInvoiceSettingsRenderingOptions(TypedDict): + amount_tax_display: NotRequired[ + "Literal['']|Literal['exclude_tax', 'include_inclusive_tax']" + ] + """ + How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One of `exclude_tax` or `include_inclusive_tax`. `include_inclusive_tax` will include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. `exclude_tax` will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts. + """ + template: NotRequired[str] + """ + ID of the invoice rendering template to use for future invoices. + """ + + +class CustomerUpdateParamsShipping(TypedDict): + address: "CustomerUpdateParamsShippingAddress" + """ + Customer shipping address. + """ + name: str + """ + Customer name. + """ + phone: NotRequired[str] + """ + Customer phone (including extension). + """ + + +class CustomerUpdateParamsShippingAddress(TypedDict): + city: NotRequired[str] + """ + City, district, suburb, town, or village. + """ + country: NotRequired[str] + """ + A freeform text field for the country. However, in order to activate some tax features, the format should be a 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. + """ + + +class CustomerUpdateParamsTax(TypedDict): + ip_address: NotRequired["Literal['']|str"] + """ + A recent IP address of the customer used for tax reporting and tax location inference. Stripe recommends updating the IP address when a new PaymentMethod is attached or the address field on the customer is updated. We recommend against updating this field more frequently since it could result in unexpected tax location/reporting outcomes. + """ + validate_location: NotRequired[Literal["auto", "deferred", "immediately"]] + """ + A flag that indicates when Stripe should validate the customer tax location. Defaults to `auto`. + """ diff --git a/stripe/params/_dispute_close_params.py b/stripe/params/_dispute_close_params.py new file mode 100644 index 000000000..41118c009 --- /dev/null +++ b/stripe/params/_dispute_close_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 DisputeCloseParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_dispute_list_params.py b/stripe/params/_dispute_list_params.py new file mode 100644 index 000000000..e70d16e7f --- /dev/null +++ b/stripe/params/_dispute_list_params.py @@ -0,0 +1,55 @@ +# -*- 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 DisputeListParams(RequestOptions): + charge: NotRequired[str] + """ + Only return disputes associated to the charge specified by this charge ID. + """ + created: NotRequired["DisputeListParamsCreated|int"] + """ + Only return disputes that were created during the given date interval. + """ + 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. + """ + payment_intent: NotRequired[str] + """ + Only return disputes associated to the PaymentIntent specified by this PaymentIntent ID. + """ + 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 DisputeListParamsCreated(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/_dispute_modify_params.py b/stripe/params/_dispute_modify_params.py new file mode 100644 index 000000000..e8542c553 --- /dev/null +++ b/stripe/params/_dispute_modify_params.py @@ -0,0 +1,329 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class DisputeModifyParams(RequestOptions): + evidence: NotRequired["DisputeModifyParamsEvidence"] + """ + Evidence to upload, to respond to a dispute. Updating any field in the hash will submit all fields in the hash for review. The combined character count of all fields is limited to 150,000. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + intended_submission_method: NotRequired[ + Literal[ + "manual", + "prefer_manual", + "prefer_smart_disputes", + "smart_disputes", + ] + ] + """ + Intended submission method for the dispute. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + submit: NotRequired[bool] + """ + Whether to immediately submit evidence to the bank. If `false`, evidence is staged on the dispute. Staged evidence is visible in the API and Dashboard, and can be submitted to the bank by making another request with this attribute set to `true` (the default). + """ + + +class DisputeModifyParamsEvidence(TypedDict): + access_activity_log: NotRequired[str] + """ + Any server or activity logs showing proof that the customer accessed or downloaded the purchased digital product. This information should include IP addresses, corresponding timestamps, and any detailed recorded activity. Has a maximum character count of 20,000. + """ + billing_address: NotRequired[str] + """ + The billing address provided by the customer. + """ + cancellation_policy: NotRequired[str] + """ + (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Your subscription cancellation policy, as shown to the customer. + """ + cancellation_policy_disclosure: NotRequired[str] + """ + An explanation of how and when the customer was shown your refund policy prior to purchase. Has a maximum character count of 20,000. + """ + cancellation_rebuttal: NotRequired[str] + """ + A justification for why the customer's subscription was not canceled. Has a maximum character count of 20,000. + """ + customer_communication: NotRequired[str] + """ + (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any communication with the customer that you feel is relevant to your case. Examples include emails proving that the customer received the product or service, or demonstrating their use of or satisfaction with the product or service. + """ + customer_email_address: NotRequired[str] + """ + The email address of the customer. + """ + customer_name: NotRequired[str] + """ + The name of the customer. + """ + customer_purchase_ip: NotRequired[str] + """ + The IP address that the customer used when making the purchase. + """ + customer_signature: NotRequired[str] + """ + (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) A relevant document or contract showing the customer's signature. + """ + duplicate_charge_documentation: NotRequired[str] + """ + (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Documentation for the prior charge that can uniquely identify the charge, such as a receipt, shipping label, work order, etc. This document should be paired with a similar document from the disputed payment that proves the two payments are separate. + """ + duplicate_charge_explanation: NotRequired[str] + """ + An explanation of the difference between the disputed charge versus the prior charge that appears to be a duplicate. Has a maximum character count of 20,000. + """ + duplicate_charge_id: NotRequired[str] + """ + The Stripe ID for the prior charge which appears to be a duplicate of the disputed charge. + """ + enhanced_evidence: NotRequired[ + "Literal['']|DisputeModifyParamsEvidenceEnhancedEvidence" + ] + """ + Additional evidence for qualifying evidence programs. + """ + product_description: NotRequired[str] + """ + A description of the product or service that was sold. Has a maximum character count of 20,000. + """ + receipt: NotRequired[str] + """ + (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any receipt or message sent to the customer notifying them of the charge. + """ + refund_policy: NotRequired[str] + """ + (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Your refund policy, as shown to the customer. + """ + refund_policy_disclosure: NotRequired[str] + """ + Documentation demonstrating that the customer was shown your refund policy prior to purchase. Has a maximum character count of 20,000. + """ + refund_refusal_explanation: NotRequired[str] + """ + A justification for why the customer is not entitled to a refund. Has a maximum character count of 20,000. + """ + service_date: NotRequired[str] + """ + The date on which the customer received or began receiving the purchased service, in a clear human-readable format. + """ + service_documentation: NotRequired[str] + """ + (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Documentation showing proof that a service was provided to the customer. This could include a copy of a signed contract, work order, or other form of written agreement. + """ + shipping_address: NotRequired[str] + """ + The address to which a physical product was shipped. You should try to include as complete address information as possible. + """ + shipping_carrier: NotRequired[str] + """ + The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. If multiple carriers were used for this purchase, please separate them with commas. + """ + shipping_date: NotRequired[str] + """ + The date on which a physical product began its route to the shipping address, in a clear human-readable format. + """ + shipping_documentation: NotRequired[str] + """ + (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Documentation showing proof that a product was shipped to the customer at the same address the customer provided to you. This could include a copy of the shipment receipt, shipping label, etc. It should show the customer's full shipping address, if possible. + """ + shipping_tracking_number: NotRequired[str] + """ + The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. + """ + uncategorized_file: NotRequired[str] + """ + (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any additional evidence or statements. + """ + uncategorized_text: NotRequired[str] + """ + Any additional evidence or statements. Has a maximum character count of 20,000. + """ + + +class DisputeModifyParamsEvidenceEnhancedEvidence(TypedDict): + visa_compelling_evidence_3: NotRequired[ + "DisputeModifyParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3" + ] + """ + Evidence provided for Visa Compelling Evidence 3.0 evidence submission. + """ + visa_compliance: NotRequired[ + "DisputeModifyParamsEvidenceEnhancedEvidenceVisaCompliance" + ] + """ + Evidence provided for Visa compliance evidence submission. + """ + + +class DisputeModifyParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3( + TypedDict, +): + disputed_transaction: NotRequired[ + "DisputeModifyParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3DisputedTransaction" + ] + """ + Disputed transaction details for Visa Compelling Evidence 3.0 evidence submission. + """ + prior_undisputed_transactions: NotRequired[ + List[ + "DisputeModifyParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3PriorUndisputedTransaction" + ] + ] + """ + List of exactly two prior undisputed transaction objects for Visa Compelling Evidence 3.0 evidence submission. + """ + + +class DisputeModifyParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3DisputedTransaction( + TypedDict, +): + customer_account_id: NotRequired["Literal['']|str"] + """ + User Account ID used to log into business platform. Must be recognizable by the user. + """ + customer_device_fingerprint: NotRequired["Literal['']|str"] + """ + Unique identifier of the cardholder's device derived from a combination of at least two hardware and software attributes. Must be at least 20 characters. + """ + customer_device_id: NotRequired["Literal['']|str"] + """ + Unique identifier of the cardholder's device such as a device serial number (e.g., International Mobile Equipment Identity [IMEI]). Must be at least 15 characters. + """ + customer_email_address: NotRequired["Literal['']|str"] + """ + The email address of the customer. + """ + customer_purchase_ip: NotRequired["Literal['']|str"] + """ + The IP address that the customer used when making the purchase. + """ + merchandise_or_services: NotRequired[Literal["merchandise", "services"]] + """ + Categorization of disputed payment. + """ + product_description: NotRequired["Literal['']|str"] + """ + A description of the product or service that was sold. + """ + shipping_address: NotRequired[ + "DisputeModifyParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3DisputedTransactionShippingAddress" + ] + """ + The address to which a physical product was shipped. All fields are required for Visa Compelling Evidence 3.0 evidence submission. + """ + + +class DisputeModifyParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3DisputedTransactionShippingAddress( + TypedDict, +): + city: NotRequired["Literal['']|str"] + """ + City, district, suburb, town, or village. + """ + country: NotRequired["Literal['']|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, county, province, or region. + """ + + +class DisputeModifyParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3PriorUndisputedTransaction( + TypedDict, +): + charge: str + """ + Stripe charge ID for the Visa Compelling Evidence 3.0 eligible prior charge. + """ + customer_account_id: NotRequired["Literal['']|str"] + """ + User Account ID used to log into business platform. Must be recognizable by the user. + """ + customer_device_fingerprint: NotRequired["Literal['']|str"] + """ + Unique identifier of the cardholder's device derived from a combination of at least two hardware and software attributes. Must be at least 20 characters. + """ + customer_device_id: NotRequired["Literal['']|str"] + """ + Unique identifier of the cardholder's device such as a device serial number (e.g., International Mobile Equipment Identity [IMEI]). Must be at least 15 characters. + """ + customer_email_address: NotRequired["Literal['']|str"] + """ + The email address of the customer. + """ + customer_purchase_ip: NotRequired["Literal['']|str"] + """ + The IP address that the customer used when making the purchase. + """ + product_description: NotRequired["Literal['']|str"] + """ + A description of the product or service that was sold. + """ + shipping_address: NotRequired[ + "DisputeModifyParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3PriorUndisputedTransactionShippingAddress" + ] + """ + The address to which a physical product was shipped. All fields are required for Visa Compelling Evidence 3.0 evidence submission. + """ + + +class DisputeModifyParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3PriorUndisputedTransactionShippingAddress( + TypedDict, +): + city: NotRequired["Literal['']|str"] + """ + City, district, suburb, town, or village. + """ + country: NotRequired["Literal['']|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, county, province, or region. + """ + + +class DisputeModifyParamsEvidenceEnhancedEvidenceVisaCompliance(TypedDict): + fee_acknowledged: NotRequired[bool] + """ + A field acknowledging the fee incurred when countering a Visa compliance dispute. If this field is set to true, evidence can be submitted for the compliance dispute. Stripe collects a 500 USD (or local equivalent) amount to cover the network costs associated with resolving compliance disputes. Stripe refunds the 500 USD network fee if you win the dispute. + """ diff --git a/stripe/params/_dispute_retrieve_params.py b/stripe/params/_dispute_retrieve_params.py new file mode 100644 index 000000000..5d350dc83 --- /dev/null +++ b/stripe/params/_dispute_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 DisputeRetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_dispute_update_params.py b/stripe/params/_dispute_update_params.py new file mode 100644 index 000000000..ef8ec6e44 --- /dev/null +++ b/stripe/params/_dispute_update_params.py @@ -0,0 +1,328 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class DisputeUpdateParams(TypedDict): + evidence: NotRequired["DisputeUpdateParamsEvidence"] + """ + Evidence to upload, to respond to a dispute. Updating any field in the hash will submit all fields in the hash for review. The combined character count of all fields is limited to 150,000. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + intended_submission_method: NotRequired[ + Literal[ + "manual", + "prefer_manual", + "prefer_smart_disputes", + "smart_disputes", + ] + ] + """ + Intended submission method for the dispute. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + submit: NotRequired[bool] + """ + Whether to immediately submit evidence to the bank. If `false`, evidence is staged on the dispute. Staged evidence is visible in the API and Dashboard, and can be submitted to the bank by making another request with this attribute set to `true` (the default). + """ + + +class DisputeUpdateParamsEvidence(TypedDict): + access_activity_log: NotRequired[str] + """ + Any server or activity logs showing proof that the customer accessed or downloaded the purchased digital product. This information should include IP addresses, corresponding timestamps, and any detailed recorded activity. Has a maximum character count of 20,000. + """ + billing_address: NotRequired[str] + """ + The billing address provided by the customer. + """ + cancellation_policy: NotRequired[str] + """ + (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Your subscription cancellation policy, as shown to the customer. + """ + cancellation_policy_disclosure: NotRequired[str] + """ + An explanation of how and when the customer was shown your refund policy prior to purchase. Has a maximum character count of 20,000. + """ + cancellation_rebuttal: NotRequired[str] + """ + A justification for why the customer's subscription was not canceled. Has a maximum character count of 20,000. + """ + customer_communication: NotRequired[str] + """ + (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any communication with the customer that you feel is relevant to your case. Examples include emails proving that the customer received the product or service, or demonstrating their use of or satisfaction with the product or service. + """ + customer_email_address: NotRequired[str] + """ + The email address of the customer. + """ + customer_name: NotRequired[str] + """ + The name of the customer. + """ + customer_purchase_ip: NotRequired[str] + """ + The IP address that the customer used when making the purchase. + """ + customer_signature: NotRequired[str] + """ + (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) A relevant document or contract showing the customer's signature. + """ + duplicate_charge_documentation: NotRequired[str] + """ + (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Documentation for the prior charge that can uniquely identify the charge, such as a receipt, shipping label, work order, etc. This document should be paired with a similar document from the disputed payment that proves the two payments are separate. + """ + duplicate_charge_explanation: NotRequired[str] + """ + An explanation of the difference between the disputed charge versus the prior charge that appears to be a duplicate. Has a maximum character count of 20,000. + """ + duplicate_charge_id: NotRequired[str] + """ + The Stripe ID for the prior charge which appears to be a duplicate of the disputed charge. + """ + enhanced_evidence: NotRequired[ + "Literal['']|DisputeUpdateParamsEvidenceEnhancedEvidence" + ] + """ + Additional evidence for qualifying evidence programs. + """ + product_description: NotRequired[str] + """ + A description of the product or service that was sold. Has a maximum character count of 20,000. + """ + receipt: NotRequired[str] + """ + (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any receipt or message sent to the customer notifying them of the charge. + """ + refund_policy: NotRequired[str] + """ + (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Your refund policy, as shown to the customer. + """ + refund_policy_disclosure: NotRequired[str] + """ + Documentation demonstrating that the customer was shown your refund policy prior to purchase. Has a maximum character count of 20,000. + """ + refund_refusal_explanation: NotRequired[str] + """ + A justification for why the customer is not entitled to a refund. Has a maximum character count of 20,000. + """ + service_date: NotRequired[str] + """ + The date on which the customer received or began receiving the purchased service, in a clear human-readable format. + """ + service_documentation: NotRequired[str] + """ + (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Documentation showing proof that a service was provided to the customer. This could include a copy of a signed contract, work order, or other form of written agreement. + """ + shipping_address: NotRequired[str] + """ + The address to which a physical product was shipped. You should try to include as complete address information as possible. + """ + shipping_carrier: NotRequired[str] + """ + The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. If multiple carriers were used for this purchase, please separate them with commas. + """ + shipping_date: NotRequired[str] + """ + The date on which a physical product began its route to the shipping address, in a clear human-readable format. + """ + shipping_documentation: NotRequired[str] + """ + (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Documentation showing proof that a product was shipped to the customer at the same address the customer provided to you. This could include a copy of the shipment receipt, shipping label, etc. It should show the customer's full shipping address, if possible. + """ + shipping_tracking_number: NotRequired[str] + """ + The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. + """ + uncategorized_file: NotRequired[str] + """ + (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any additional evidence or statements. + """ + uncategorized_text: NotRequired[str] + """ + Any additional evidence or statements. Has a maximum character count of 20,000. + """ + + +class DisputeUpdateParamsEvidenceEnhancedEvidence(TypedDict): + visa_compelling_evidence_3: NotRequired[ + "DisputeUpdateParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3" + ] + """ + Evidence provided for Visa Compelling Evidence 3.0 evidence submission. + """ + visa_compliance: NotRequired[ + "DisputeUpdateParamsEvidenceEnhancedEvidenceVisaCompliance" + ] + """ + Evidence provided for Visa compliance evidence submission. + """ + + +class DisputeUpdateParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3( + TypedDict, +): + disputed_transaction: NotRequired[ + "DisputeUpdateParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3DisputedTransaction" + ] + """ + Disputed transaction details for Visa Compelling Evidence 3.0 evidence submission. + """ + prior_undisputed_transactions: NotRequired[ + List[ + "DisputeUpdateParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3PriorUndisputedTransaction" + ] + ] + """ + List of exactly two prior undisputed transaction objects for Visa Compelling Evidence 3.0 evidence submission. + """ + + +class DisputeUpdateParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3DisputedTransaction( + TypedDict, +): + customer_account_id: NotRequired["Literal['']|str"] + """ + User Account ID used to log into business platform. Must be recognizable by the user. + """ + customer_device_fingerprint: NotRequired["Literal['']|str"] + """ + Unique identifier of the cardholder's device derived from a combination of at least two hardware and software attributes. Must be at least 20 characters. + """ + customer_device_id: NotRequired["Literal['']|str"] + """ + Unique identifier of the cardholder's device such as a device serial number (e.g., International Mobile Equipment Identity [IMEI]). Must be at least 15 characters. + """ + customer_email_address: NotRequired["Literal['']|str"] + """ + The email address of the customer. + """ + customer_purchase_ip: NotRequired["Literal['']|str"] + """ + The IP address that the customer used when making the purchase. + """ + merchandise_or_services: NotRequired[Literal["merchandise", "services"]] + """ + Categorization of disputed payment. + """ + product_description: NotRequired["Literal['']|str"] + """ + A description of the product or service that was sold. + """ + shipping_address: NotRequired[ + "DisputeUpdateParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3DisputedTransactionShippingAddress" + ] + """ + The address to which a physical product was shipped. All fields are required for Visa Compelling Evidence 3.0 evidence submission. + """ + + +class DisputeUpdateParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3DisputedTransactionShippingAddress( + TypedDict, +): + city: NotRequired["Literal['']|str"] + """ + City, district, suburb, town, or village. + """ + country: NotRequired["Literal['']|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, county, province, or region. + """ + + +class DisputeUpdateParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3PriorUndisputedTransaction( + TypedDict, +): + charge: str + """ + Stripe charge ID for the Visa Compelling Evidence 3.0 eligible prior charge. + """ + customer_account_id: NotRequired["Literal['']|str"] + """ + User Account ID used to log into business platform. Must be recognizable by the user. + """ + customer_device_fingerprint: NotRequired["Literal['']|str"] + """ + Unique identifier of the cardholder's device derived from a combination of at least two hardware and software attributes. Must be at least 20 characters. + """ + customer_device_id: NotRequired["Literal['']|str"] + """ + Unique identifier of the cardholder's device such as a device serial number (e.g., International Mobile Equipment Identity [IMEI]). Must be at least 15 characters. + """ + customer_email_address: NotRequired["Literal['']|str"] + """ + The email address of the customer. + """ + customer_purchase_ip: NotRequired["Literal['']|str"] + """ + The IP address that the customer used when making the purchase. + """ + product_description: NotRequired["Literal['']|str"] + """ + A description of the product or service that was sold. + """ + shipping_address: NotRequired[ + "DisputeUpdateParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3PriorUndisputedTransactionShippingAddress" + ] + """ + The address to which a physical product was shipped. All fields are required for Visa Compelling Evidence 3.0 evidence submission. + """ + + +class DisputeUpdateParamsEvidenceEnhancedEvidenceVisaCompellingEvidence3PriorUndisputedTransactionShippingAddress( + TypedDict, +): + city: NotRequired["Literal['']|str"] + """ + City, district, suburb, town, or village. + """ + country: NotRequired["Literal['']|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, county, province, or region. + """ + + +class DisputeUpdateParamsEvidenceEnhancedEvidenceVisaCompliance(TypedDict): + fee_acknowledged: NotRequired[bool] + """ + A field acknowledging the fee incurred when countering a Visa compliance dispute. If this field is set to true, evidence can be submitted for the compliance dispute. Stripe collects a 500 USD (or local equivalent) amount to cover the network costs associated with resolving compliance disputes. Stripe refunds the 500 USD network fee if you win the dispute. + """ diff --git a/stripe/params/_ephemeral_key_create_params.py b/stripe/params/_ephemeral_key_create_params.py new file mode 100644 index 000000000..6272d6182 --- /dev/null +++ b/stripe/params/_ephemeral_key_create_params.py @@ -0,0 +1,27 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import NotRequired, TypedDict + + +class EphemeralKeyCreateParams(TypedDict): + customer: NotRequired[str] + """ + The ID of the Customer you'd like to modify using the resulting ephemeral key. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + issuing_card: NotRequired[str] + """ + The ID of the Issuing Card you'd like to access using the resulting ephemeral key. + """ + nonce: NotRequired[str] + """ + A single-use token, created by Stripe.js, used for creating ephemeral keys for Issuing Cards without exchanging sensitive information. + """ + verification_session: NotRequired[str] + """ + The ID of the Identity VerificationSession you'd like to access using the resulting ephemeral key + """ diff --git a/stripe/params/_ephemeral_key_delete_params.py b/stripe/params/_ephemeral_key_delete_params.py new file mode 100644 index 000000000..d2381956f --- /dev/null +++ b/stripe/params/_ephemeral_key_delete_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 EphemeralKeyDeleteParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_event_list_params.py b/stripe/params/_event_list_params.py new file mode 100644 index 000000000..5d77d5dee --- /dev/null +++ b/stripe/params/_event_list_params.py @@ -0,0 +1,59 @@ +# -*- 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 EventListParams(RequestOptions): + created: NotRequired["EventListParamsCreated|int"] + """ + Only return events that were created during the given date interval. + """ + delivery_success: NotRequired[bool] + """ + Filter events by whether all webhooks were successfully delivered. If false, events which are still pending or have failed all delivery attempts to a webhook endpoint will be returned. + """ + 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. + """ + type: NotRequired[str] + """ + A string containing a specific event name, or group of events using * as a wildcard. The list will be filtered to include only events with a matching event property. + """ + types: NotRequired[List[str]] + """ + An array of up to 20 strings containing specific event names. The list will be filtered to include only events with a matching event property. You may pass either `type` or `types`, but not both. + """ + + +class EventListParamsCreated(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/_event_retrieve_params.py b/stripe/params/_event_retrieve_params.py new file mode 100644 index 000000000..230d7aaa5 --- /dev/null +++ b/stripe/params/_event_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 EventRetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_exchange_rate_list_params.py b/stripe/params/_exchange_rate_list_params.py new file mode 100644 index 000000000..831dc8da5 --- /dev/null +++ b/stripe/params/_exchange_rate_list_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 ExchangeRateListParams(RequestOptions): + ending_before: NotRequired[str] + """ + A cursor for use in pagination. `ending_before` is the currency that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with the exchange rate for currency X 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 total number of supported payout currencies, and the default is the max. + """ + starting_after: NotRequired[str] + """ + A cursor for use in pagination. `starting_after` is the currency that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with the exchange rate for currency X, your subsequent call can include `starting_after=X` in order to fetch the next page of the list. + """ diff --git a/stripe/params/_exchange_rate_retrieve_params.py b/stripe/params/_exchange_rate_retrieve_params.py new file mode 100644 index 000000000..01b55a219 --- /dev/null +++ b/stripe/params/_exchange_rate_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 ExchangeRateRetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_external_account_create_params.py b/stripe/params/_external_account_create_params.py new file mode 100644 index 000000000..dd7cdd0d3 --- /dev/null +++ b/stripe/params/_external_account_create_params.py @@ -0,0 +1,82 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import Dict, List, Union +from typing_extensions import Literal, NotRequired, TypedDict + + +class ExternalAccountCreateParams(TypedDict): + default_for_currency: NotRequired[bool] + """ + When set to true, or if this is the first external account added in this currency, this account becomes the default external account for its currency. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + external_account: Union[ + str, + "ExternalAccountCreateParamsCard", + "ExternalAccountCreateParamsBankAccount", + "ExternalAccountCreateParamsCardToken", + ] + """ + Either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary containing a user's external account details (with the options shown below). + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + + +class ExternalAccountCreateParamsCard(TypedDict): + object: Literal["card"] + address_city: NotRequired[str] + address_country: NotRequired[str] + address_line1: NotRequired[str] + address_line2: NotRequired[str] + address_state: NotRequired[str] + address_zip: NotRequired[str] + currency: NotRequired[str] + cvc: NotRequired[str] + exp_month: int + exp_year: int + name: NotRequired[str] + number: str + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + """ + + +class ExternalAccountCreateParamsBankAccount(TypedDict): + object: Literal["bank_account"] + account_holder_name: NotRequired[str] + """ + The name of the person or business that owns the bank account.This field is required when attaching the bank account to a `Customer` object. + """ + account_holder_type: NotRequired[Literal["company", "individual"]] + """ + The type of entity that holds the account. It can be `company` or `individual`. This field is required when attaching the bank account to a `Customer` object. + """ + account_number: str + """ + The account number for the bank account, in string form. Must be a checking account. + """ + country: str + """ + The country in which the bank account is located. + """ + currency: NotRequired[str] + """ + The currency the bank account is in. This must be a country/currency pairing that [Stripe supports.](docs/payouts) + """ + routing_number: NotRequired[str] + """ + The routing number, sort code, or other country-appropriate institution number for the bank account. For US bank accounts, this is required and should be the ACH routing number, not the wire routing number. If you are providing an IBAN for `account_number`, this field is not required. + """ + + +class ExternalAccountCreateParamsCardToken(TypedDict): + object: Literal["card"] + currency: NotRequired[str] + token: str diff --git a/stripe/params/_external_account_delete_params.py b/stripe/params/_external_account_delete_params.py new file mode 100644 index 000000000..17ed14653 --- /dev/null +++ b/stripe/params/_external_account_delete_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class ExternalAccountDeleteParams(TypedDict): + pass diff --git a/stripe/params/_external_account_list_params.py b/stripe/params/_external_account_list_params.py new file mode 100644 index 000000000..150de5801 --- /dev/null +++ b/stripe/params/_external_account_list_params.py @@ -0,0 +1,27 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import Literal, NotRequired, TypedDict + + +class ExternalAccountListParams(TypedDict): + 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. + """ + object: NotRequired[Literal["bank_account", "card"]] + """ + Filter external accounts according to a particular object type. + """ + 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. + """ diff --git a/stripe/params/_external_account_retrieve_params.py b/stripe/params/_external_account_retrieve_params.py new file mode 100644 index 000000000..93bc3e9b9 --- /dev/null +++ b/stripe/params/_external_account_retrieve_params.py @@ -0,0 +1,11 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import NotRequired, TypedDict + + +class ExternalAccountRetrieveParams(TypedDict): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_external_account_update_params.py b/stripe/params/_external_account_update_params.py new file mode 100644 index 000000000..e16b66d1c --- /dev/null +++ b/stripe/params/_external_account_update_params.py @@ -0,0 +1,91 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class ExternalAccountUpdateParams(TypedDict): + account_holder_name: NotRequired[str] + """ + The name of the person or business that owns the bank account. + """ + account_holder_type: NotRequired[ + "Literal['']|Literal['company', 'individual']" + ] + """ + The type of entity that holds the account. This can be either `individual` or `company`. + """ + account_type: NotRequired[Literal["checking", "futsu", "savings", "toza"]] + """ + The bank account type. This can only be `checking` or `savings` in most countries. In Japan, this can only be `futsu` or `toza`. + """ + address_city: NotRequired[str] + """ + City/District/Suburb/Town/Village. + """ + address_country: NotRequired[str] + """ + Billing address country, if provided when creating card. + """ + address_line1: NotRequired[str] + """ + Address line 1 (Street address/PO Box/Company name). + """ + address_line2: NotRequired[str] + """ + Address line 2 (Apartment/Suite/Unit/Building). + """ + address_state: NotRequired[str] + """ + State/County/Province/Region. + """ + address_zip: NotRequired[str] + """ + ZIP or postal code. + """ + default_for_currency: NotRequired[bool] + """ + When set to true, this becomes the default external account for its currency. + """ + documents: NotRequired["ExternalAccountUpdateParamsDocuments"] + """ + Documents that may be submitted to satisfy various informational requests. + """ + exp_month: NotRequired[str] + """ + Two digit number representing the card's expiration month. + """ + exp_year: NotRequired[str] + """ + Four digit number representing the card's expiration year. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + name: NotRequired[str] + """ + Cardholder name. + """ + + +class ExternalAccountUpdateParamsDocuments(TypedDict): + bank_account_ownership_verification: NotRequired[ + "ExternalAccountUpdateParamsDocumentsBankAccountOwnershipVerification" + ] + """ + One or more documents that support the [Bank account ownership verification](https://support.stripe.com/questions/bank-account-ownership-verification) requirement. Must be a document associated with the bank account that displays the last 4 digits of the account number, either a statement or a check. + """ + + +class ExternalAccountUpdateParamsDocumentsBankAccountOwnershipVerification( + TypedDict, +): + files: NotRequired[List[str]] + """ + One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + """ diff --git a/stripe/params/_file_create_params.py b/stripe/params/_file_create_params.py new file mode 100644 index 000000000..3309e4b51 --- /dev/null +++ b/stripe/params/_file_create_params.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Any, Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class FileCreateParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + file: Any + """ + A file to upload. Make sure that the specifications follow RFC 2388, which defines file transfers for the `multipart/form-data` protocol. + """ + file_link_data: NotRequired["FileCreateParamsFileLinkData"] + """ + Optional parameters that automatically create a [file link](https://stripe.com/docs/api#file_links) for the newly created file. + """ + purpose: Literal[ + "account_requirement", + "additional_verification", + "business_icon", + "business_logo", + "customer_signature", + "dispute_evidence", + "identity_document", + "issuing_regulatory_reporting", + "pci_document", + "tax_document_user_upload", + "terminal_android_apk", + "terminal_reader_splashscreen", + ] + """ + The [purpose](https://stripe.com/docs/file-upload#uploading-a-file) of the uploaded file. + """ + + +class FileCreateParamsFileLinkData(TypedDict): + create: bool + """ + Set this to `true` to create a file link for the newly created file. Creating a link is only possible when the file's `purpose` is one of the following: `business_icon`, `business_logo`, `customer_signature`, `dispute_evidence`, `issuing_regulatory_reporting`, `pci_document`, `tax_document_user_upload`, `terminal_android_apk`, or `terminal_reader_splashscreen`. + """ + expires_at: NotRequired[int] + """ + The link isn't available after this future timestamp. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ diff --git a/stripe/params/_file_link_create_params.py b/stripe/params/_file_link_create_params.py new file mode 100644 index 000000000..08c6e4489 --- /dev/null +++ b/stripe/params/_file_link_create_params.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import Literal, NotRequired + + +class FileLinkCreateParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + expires_at: NotRequired[int] + """ + The link isn't usable after this future timestamp. + """ + file: str + """ + The ID of the file. The file's `purpose` must be one of the following: `business_icon`, `business_logo`, `customer_signature`, `dispute_evidence`, `finance_report_run`, `financial_account_statement`, `identity_document_downloadable`, `issuing_regulatory_reporting`, `pci_document`, `selfie`, `sigma_scheduled_query`, `tax_document_user_upload`, `terminal_android_apk`, or `terminal_reader_splashscreen`. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ diff --git a/stripe/params/_file_link_list_params.py b/stripe/params/_file_link_list_params.py new file mode 100644 index 000000000..4f1e83545 --- /dev/null +++ b/stripe/params/_file_link_list_params.py @@ -0,0 +1,55 @@ +# -*- 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 FileLinkListParams(RequestOptions): + created: NotRequired["FileLinkListParamsCreated|int"] + """ + Only return links that were created during the given date interval. + """ + 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. + """ + expired: NotRequired[bool] + """ + Filter links by their expiration status. By default, Stripe returns all links. + """ + file: NotRequired[str] + """ + Only return links for the given file. + """ + 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 FileLinkListParamsCreated(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/_file_link_modify_params.py b/stripe/params/_file_link_modify_params.py new file mode 100644 index 000000000..2dda56a17 --- /dev/null +++ b/stripe/params/_file_link_modify_params.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import Literal, NotRequired + + +class FileLinkModifyParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + expires_at: NotRequired["Literal['']|Literal['now']|int"] + """ + A future timestamp after which the link will no longer be usable, or `now` to expire the link immediately. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ diff --git a/stripe/params/_file_link_retrieve_params.py b/stripe/params/_file_link_retrieve_params.py new file mode 100644 index 000000000..5dc4880e4 --- /dev/null +++ b/stripe/params/_file_link_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 FileLinkRetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_file_link_update_params.py b/stripe/params/_file_link_update_params.py new file mode 100644 index 000000000..0c5ee8a36 --- /dev/null +++ b/stripe/params/_file_link_update_params.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class FileLinkUpdateParams(TypedDict): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + expires_at: NotRequired["Literal['']|Literal['now']|int"] + """ + A future timestamp after which the link will no longer be usable, or `now` to expire the link immediately. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ diff --git a/stripe/params/_file_list_params.py b/stripe/params/_file_list_params.py new file mode 100644 index 000000000..527f12cbe --- /dev/null +++ b/stripe/params/_file_list_params.py @@ -0,0 +1,72 @@ +# -*- 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, TypedDict + + +class FileListParams(RequestOptions): + created: NotRequired["FileListParamsCreated|int"] + """ + Only return files that were created during the given date interval. + """ + 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. + """ + purpose: NotRequired[ + Literal[ + "account_requirement", + "additional_verification", + "business_icon", + "business_logo", + "customer_signature", + "dispute_evidence", + "document_provider_identity_document", + "finance_report_run", + "financial_account_statement", + "identity_document", + "identity_document_downloadable", + "issuing_regulatory_reporting", + "pci_document", + "selfie", + "sigma_scheduled_query", + "tax_document_user_upload", + "terminal_android_apk", + "terminal_reader_splashscreen", + ] + ] + """ + Filter queries by the file purpose. If you don't provide a purpose, the queries return unfiltered files. + """ + 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 FileListParamsCreated(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/_file_retrieve_params.py b/stripe/params/_file_retrieve_params.py new file mode 100644 index 000000000..a973a3521 --- /dev/null +++ b/stripe/params/_file_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 FileRetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_fx_quote_create_params.py b/stripe/params/_fx_quote_create_params.py new file mode 100644 index 000000000..c47eb4308 --- /dev/null +++ b/stripe/params/_fx_quote_create_params.py @@ -0,0 +1,69 @@ +# -*- 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, TypedDict + + +class FxQuoteCreateParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + from_currencies: List[str] + """ + A list of three letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be [supported currencies](https://stripe.com/docs/currencies). + """ + lock_duration: Literal["day", "five_minutes", "hour", "none"] + """ + The duration that you wish the quote to be locked for. The quote will be usable for the duration specified. The default is `none`. The maximum is 1 day. + """ + to_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). + """ + usage: NotRequired["FxQuoteCreateParamsUsage"] + """ + The usage specific information for the quote. + """ + + +class FxQuoteCreateParamsUsage(TypedDict): + payment: NotRequired["FxQuoteCreateParamsUsagePayment"] + """ + The payment transaction details that are intended for the FX Quote. + """ + transfer: NotRequired["FxQuoteCreateParamsUsageTransfer"] + """ + The transfer transaction details that are intended for the FX Quote. + """ + type: Literal["payment", "transfer"] + """ + Which transaction the FX Quote will be used for + + Can be “payment” | “transfer” + """ + + +class FxQuoteCreateParamsUsagePayment(TypedDict): + destination: NotRequired[str] + """ + The Stripe account ID that the funds will be transferred to. + + This field should match the account ID that would be used in the PaymentIntent's transfer_data[destination] field. + """ + on_behalf_of: NotRequired[str] + """ + The Stripe account ID that these funds are intended for. + + This field should match the account ID that would be used in the PaymentIntent's on_behalf_of field. + """ + + +class FxQuoteCreateParamsUsageTransfer(TypedDict): + destination: str + """ + The Stripe account ID that the funds will be transferred to. + + This field should match the account ID that would be used in the Transfer's destination field. + """ diff --git a/stripe/params/_fx_quote_list_params.py b/stripe/params/_fx_quote_list_params.py new file mode 100644 index 000000000..cb19c0fc5 --- /dev/null +++ b/stripe/params/_fx_quote_list_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 FxQuoteListParams(RequestOptions): + 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. + """ diff --git a/stripe/params/_fx_quote_retrieve_params.py b/stripe/params/_fx_quote_retrieve_params.py new file mode 100644 index 000000000..f2efcc646 --- /dev/null +++ b/stripe/params/_fx_quote_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 FxQuoteRetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_invoice_add_lines_params.py b/stripe/params/_invoice_add_lines_params.py new file mode 100644 index 000000000..8d9005192 --- /dev/null +++ b/stripe/params/_invoice_add_lines_params.py @@ -0,0 +1,295 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class InvoiceAddLinesParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + invoice_metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + lines: List["InvoiceAddLinesParamsLine"] + """ + The line items to add. + """ + + +class InvoiceAddLinesParamsLine(TypedDict): + amount: NotRequired[int] + """ + The integer amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. If you want to apply a credit to the customer's account, pass a negative amount. + """ + description: NotRequired[str] + """ + An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking. + """ + discountable: NotRequired[bool] + """ + Controls whether discounts apply to this line item. Defaults to false for prorations or negative line items, and true for all other line items. Cannot be set to true for prorations. + """ + discounts: NotRequired[ + "Literal['']|List[InvoiceAddLinesParamsLineDiscount]" + ] + """ + The coupons, promotion codes & existing discounts which apply to the line item. Item discounts are applied before invoice discounts. Pass an empty string to remove previously-defined discounts. + """ + invoice_item: NotRequired[str] + """ + ID of an unassigned invoice item to assign to this invoice. If not provided, a new item will be created. + """ + margins: NotRequired["Literal['']|List[str]"] + """ + The IDs of the margins to apply to the line item. When set, the `default_margins` on the invoice do not apply to this line item. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + period: NotRequired["InvoiceAddLinesParamsLinePeriod"] + """ + The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details. + """ + price_data: NotRequired["InvoiceAddLinesParamsLinePriceData"] + """ + Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + """ + pricing: NotRequired["InvoiceAddLinesParamsLinePricing"] + """ + The pricing information for the invoice item. + """ + quantity: NotRequired[int] + """ + Non-negative integer. The quantity of units for the line item. + """ + tax_amounts: NotRequired[ + "Literal['']|List[InvoiceAddLinesParamsLineTaxAmount]" + ] + """ + A list of up to 10 tax amounts for this line item. This can be useful if you calculate taxes on your own or use a third-party to calculate them. You cannot set tax amounts if any line item has [tax_rates](https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-tax_rates) or if the invoice has [default_tax_rates](https://stripe.com/docs/api/invoices/object#invoice_object-default_tax_rates) or uses [automatic tax](https://stripe.com/docs/tax/invoicing). Pass an empty string to remove previously defined tax amounts. + """ + tax_rates: NotRequired["Literal['']|List[str]"] + """ + The tax rates which apply to the line item. When set, the `default_tax_rates` on the invoice do not apply to this line item. Pass an empty string to remove previously-defined tax rates. + """ + + +class InvoiceAddLinesParamsLineDiscount(TypedDict): + coupon: NotRequired[str] + """ + ID of the coupon to create a new discount for. + """ + discount: NotRequired[str] + """ + ID of an existing discount on the object (or one of its ancestors) to reuse. + """ + discount_end: NotRequired["InvoiceAddLinesParamsLineDiscountDiscountEnd"] + """ + Details to determine how long the discount should be applied for. + """ + promotion_code: NotRequired[str] + """ + ID of the promotion code to create a new discount for. + """ + + +class InvoiceAddLinesParamsLineDiscountDiscountEnd(TypedDict): + duration: NotRequired[ + "InvoiceAddLinesParamsLineDiscountDiscountEndDuration" + ] + """ + Time span for the redeemed discount. + """ + timestamp: NotRequired[int] + """ + A precise Unix timestamp for the discount to end. Must be in the future. + """ + type: Literal["duration", "timestamp"] + """ + The type of calculation made to determine when the discount ends. + """ + + +class InvoiceAddLinesParamsLineDiscountDiscountEndDuration(TypedDict): + interval: Literal["day", "month", "week", "year"] + """ + Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + """ + interval_count: int + """ + The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + """ + + +class InvoiceAddLinesParamsLinePeriod(TypedDict): + end: int + """ + The end of the period, which must be greater than or equal to the start. This value is inclusive. + """ + start: int + """ + The start of the period. This value is inclusive. + """ + + +class InvoiceAddLinesParamsLinePriceData(TypedDict): + 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). + """ + product: NotRequired[str] + """ + The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to. One of `product` or `product_data` is required. + """ + product_data: NotRequired["InvoiceAddLinesParamsLinePriceDataProductData"] + """ + Data used to generate a new [Product](https://docs.stripe.com/api/products) object inline. One of `product` or `product_data` is required. + """ + tax_behavior: NotRequired[Literal["exclusive", "inclusive", "unspecified"]] + """ + Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + """ + unit_amount: NotRequired[int] + """ + A non-negative integer in cents (or local equivalent) representing how much to charge. One of `unit_amount` or `unit_amount_decimal` is required. + """ + unit_amount_decimal: NotRequired[str] + """ + Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + """ + + +class InvoiceAddLinesParamsLinePriceDataProductData(TypedDict): + description: NotRequired[str] + """ + The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. + """ + images: NotRequired[List[str]] + """ + A list of up to 8 URLs of images for this product, meant to be displayable to the customer. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + name: str + """ + The product's name, meant to be displayable to the customer. + """ + tax_code: NotRequired[str] + """ + A [tax code](https://stripe.com/docs/tax/tax-categories) ID. + """ + unit_label: NotRequired[str] + """ + A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal. + """ + + +class InvoiceAddLinesParamsLinePricing(TypedDict): + price: NotRequired[str] + """ + The ID of the price object. + """ + + +class InvoiceAddLinesParamsLineTaxAmount(TypedDict): + amount: int + """ + The amount, in cents (or local equivalent), of the tax. + """ + tax_rate_data: "InvoiceAddLinesParamsLineTaxAmountTaxRateData" + """ + Data to find or create a TaxRate object. + + Stripe automatically creates or reuses a TaxRate object for each tax amount. If the `tax_rate_data` exactly matches a previous value, Stripe will reuse the TaxRate object. TaxRate objects created automatically by Stripe are immediately archived, do not appear in the line item's `tax_rates`, and cannot be directly added to invoices, payments, or line items. + """ + taxability_reason: NotRequired[ + Literal[ + "customer_exempt", + "not_collecting", + "not_subject_to_tax", + "not_supported", + "portion_product_exempt", + "portion_reduced_rated", + "portion_standard_rated", + "product_exempt", + "product_exempt_holiday", + "proportionally_rated", + "reduced_rated", + "reverse_charge", + "standard_rated", + "taxable_basis_reduced", + "zero_rated", + ] + ] + """ + The reasoning behind this tax, for example, if the product is tax exempt. + """ + taxable_amount: int + """ + The amount on which tax is calculated, in cents (or local equivalent). + """ + + +class InvoiceAddLinesParamsLineTaxAmountTaxRateData(TypedDict): + country: NotRequired[str] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + description: NotRequired[str] + """ + An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers. + """ + display_name: str + """ + The display name of the tax rate, which will be shown to users. + """ + inclusive: bool + """ + This specifies if the tax rate is inclusive or exclusive. + """ + jurisdiction: NotRequired[str] + """ + The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer's invoice. + """ + jurisdiction_level: NotRequired[ + Literal["city", "country", "county", "district", "multiple", "state"] + ] + """ + The level of the jurisdiction that imposes this tax rate. + """ + percentage: float + """ + The statutory tax rate percent. This field accepts decimal values between 0 and 100 inclusive with at most 4 decimal places. To accommodate fixed-amount taxes, set the percentage to zero. Stripe will not display zero percentages on the invoice unless the `amount` of the tax is also zero. + """ + state: NotRequired[str] + """ + [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States. + """ + tax_type: NotRequired[ + Literal[ + "amusement_tax", + "communications_tax", + "gst", + "hst", + "igst", + "jct", + "lease_tax", + "pst", + "qst", + "retail_delivery_fee", + "rst", + "sales_tax", + "service_tax", + "vat", + ] + ] + """ + The high-level tax type, such as `vat` or `sales_tax`. + """ diff --git a/stripe/params/_invoice_attach_payment_params.py b/stripe/params/_invoice_attach_payment_params.py new file mode 100644 index 000000000..8481bb77d --- /dev/null +++ b/stripe/params/_invoice_attach_payment_params.py @@ -0,0 +1,57 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class InvoiceAttachPaymentParams(RequestOptions): + amount_requested: NotRequired[int] + """ + The portion of the `amount` on the PaymentIntent or out of band payment to apply to this invoice. It defaults to the entire amount. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + payment_intent: NotRequired[str] + """ + The ID of the PaymentIntent to attach to the invoice. + """ + payment_record: NotRequired[str] + """ + The ID of the PaymentRecord to attach to the invoice. + """ + payment_record_data: NotRequired[ + "InvoiceAttachPaymentParamsPaymentRecordData" + ] + """ + The PaymentRecord data for attaching an out of band payment to the invoice. + """ + + +class InvoiceAttachPaymentParamsPaymentRecordData(TypedDict): + amount: int + """ + The amount that was paid out of band. + """ + currency: str + """ + The currency that was paid out of band. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + money_movement_type: str + """ + The type of money movement for this out of band payment record. + """ + paid_at: NotRequired[int] + """ + The timestamp when this out of band payment was paid. + """ + payment_reference: NotRequired[str] + """ + The reference for this out of band payment record. + """ diff --git a/stripe/params/_invoice_create_params.py b/stripe/params/_invoice_create_params.py new file mode 100644 index 000000000..683986bb9 --- /dev/null +++ b/stripe/params/_invoice_create_params.py @@ -0,0 +1,797 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class InvoiceCreateParams(RequestOptions): + account_tax_ids: NotRequired["Literal['']|List[str]"] + """ + The account tax IDs associated with the invoice. Only editable when the invoice is a draft. + """ + amounts_due: NotRequired["Literal['']|List[InvoiceCreateParamsAmountsDue]"] + """ + List of expected payments and corresponding due dates. Valid only for invoices where `collection_method=send_invoice`. + """ + application_fee_amount: NotRequired[int] + """ + A fee in cents (or local equivalent) that will be applied to the invoice and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/billing/invoices/connect#collecting-fees). + """ + auto_advance: NotRequired[bool] + """ + Controls whether Stripe performs [automatic collection](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection) of the invoice. If `false`, the invoice's state doesn't automatically advance without an explicit action. Defaults to false. + """ + automatic_tax: NotRequired["InvoiceCreateParamsAutomaticTax"] + """ + Settings for automatic tax lookup for this invoice. + """ + automatically_finalizes_at: NotRequired[int] + """ + The time when this invoice should be scheduled to finalize (up to 5 years in the future). The invoice is finalized at this time if it's still in draft state. + """ + collection_method: NotRequired[ + Literal["charge_automatically", "send_invoice"] + ] + """ + Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this invoice using the default source attached to the customer. When sending an invoice, Stripe will email this invoice to the customer with payment instructions. Defaults to `charge_automatically`. + """ + currency: NotRequired[str] + """ + The currency to create this invoice in. Defaults to that of `customer` if not specified. + """ + custom_fields: NotRequired[ + "Literal['']|List[InvoiceCreateParamsCustomField]" + ] + """ + A list of up to 4 custom fields to be displayed on the invoice. + """ + customer: NotRequired[str] + """ + The ID of the customer who will be billed. + """ + customer_account: NotRequired[str] + """ + The ID of the account who will be billed. + """ + days_until_due: NotRequired[int] + """ + The number of days from when the invoice is created until it is due. Valid only for invoices where `collection_method=send_invoice`. + """ + default_margins: NotRequired[List[str]] + """ + The ids of the margins to apply to the invoice. Can be overridden by line item `margins`. + """ + default_payment_method: NotRequired[str] + """ + ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings. + """ + default_source: NotRequired[str] + """ + ID of the default payment source for the invoice. It must belong to the customer associated with the invoice and be in a chargeable state. If not set, defaults to the subscription's default source, if any, or to the customer's default source. + """ + default_tax_rates: NotRequired[List[str]] + """ + The tax rates that will apply to any line item that does not have `tax_rates` set. + """ + description: NotRequired[str] + """ + An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard. + """ + discounts: NotRequired["Literal['']|List[InvoiceCreateParamsDiscount]"] + """ + The coupons and promotion codes to redeem into discounts for the invoice. If not specified, inherits the discount from the invoice's customer. Pass an empty string to avoid inheriting any discounts. + """ + due_date: NotRequired[int] + """ + The date on which payment for this invoice is due. Valid only for invoices where `collection_method=send_invoice`. + """ + effective_at: NotRequired[int] + """ + The date when this invoice is in effect. Same as `finalized_at` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the invoice PDF and receipt. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + footer: NotRequired[str] + """ + Footer to be displayed on the invoice. + """ + from_invoice: NotRequired["InvoiceCreateParamsFromInvoice"] + """ + Revise an existing invoice. The new invoice will be created in `status=draft`. See the [revision documentation](https://stripe.com/docs/invoicing/invoice-revisions) for more details. + """ + issuer: NotRequired["InvoiceCreateParamsIssuer"] + """ + The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + number: NotRequired[str] + """ + Set the number for this invoice. If no number is present then a number will be assigned automatically when the invoice is finalized. In many markets, regulations require invoices to be unique, sequential and / or gapless. You are responsible for ensuring this is true across all your different invoicing systems in the event that you edit the invoice number using our API. If you use only Stripe for your invoices and do not change invoice numbers, Stripe handles this aspect of compliance for you automatically. + """ + on_behalf_of: NotRequired[str] + """ + The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the [Invoices with Connect](https://stripe.com/docs/billing/invoices/connect) documentation for details. + """ + payment_settings: NotRequired["InvoiceCreateParamsPaymentSettings"] + """ + Configuration settings for the PaymentIntent that is generated when the invoice is finalized. + """ + pending_invoice_items_behavior: NotRequired[Literal["exclude", "include"]] + """ + How to handle pending invoice items on invoice creation. Defaults to `exclude` if the parameter is omitted. + """ + rendering: NotRequired["InvoiceCreateParamsRendering"] + """ + The rendering-related settings that control how the invoice is displayed on customer-facing surfaces such as PDF and Hosted Invoice Page. + """ + shipping_cost: NotRequired["InvoiceCreateParamsShippingCost"] + """ + Settings for the cost of shipping for this invoice. + """ + shipping_details: NotRequired["InvoiceCreateParamsShippingDetails"] + """ + Shipping details for the invoice. The Invoice PDF will use the `shipping_details` value if it is set, otherwise the PDF will render the shipping address from the customer. + """ + statement_descriptor: NotRequired[str] + """ + Extra information about a charge for the customer's credit card statement. It must contain at least one letter. If not specified and this invoice is part of a subscription, the default `statement_descriptor` will be set to the first subscription item's product's `statement_descriptor`. + """ + subscription: NotRequired[str] + """ + The ID of the subscription to invoice, if any. If set, the created invoice will only include pending invoice items for that subscription. The subscription's billing cycle and regular subscription events won't be affected. + """ + transfer_data: NotRequired["InvoiceCreateParamsTransferData"] + """ + If specified, the funds from the invoice will be transferred to the destination and the ID of the resulting transfer will be found on the invoice's charge. + """ + + +class InvoiceCreateParamsAmountsDue(TypedDict): + amount: int + """ + The amount in cents (or local equivalent). + """ + days_until_due: NotRequired[int] + """ + Number of days from when invoice is finalized until the payment is due. + """ + description: str + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ + due_date: NotRequired[int] + """ + Date on which a payment plan's payment is due. + """ + + +class InvoiceCreateParamsAutomaticTax(TypedDict): + enabled: bool + """ + Whether Stripe automatically computes tax on this invoice. Note that incompatible invoice items (invoice items with manually specified [tax rates](https://stripe.com/docs/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices. + """ + liability: NotRequired["InvoiceCreateParamsAutomaticTaxLiability"] + """ + The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + """ + + +class InvoiceCreateParamsAutomaticTaxLiability(TypedDict): + account: NotRequired[str] + """ + The connected account being referenced when `type` is `account`. + """ + type: Literal["account", "self"] + """ + Type of the account referenced in the request. + """ + + +class InvoiceCreateParamsCustomField(TypedDict): + name: str + """ + The name of the custom field. This may be up to 40 characters. + """ + value: str + """ + The value of the custom field. This may be up to 140 characters. + """ + + +class InvoiceCreateParamsDiscount(TypedDict): + coupon: NotRequired[str] + """ + ID of the coupon to create a new discount for. + """ + discount: NotRequired[str] + """ + ID of an existing discount on the object (or one of its ancestors) to reuse. + """ + discount_end: NotRequired["InvoiceCreateParamsDiscountDiscountEnd"] + """ + Details to determine how long the discount should be applied for. + """ + promotion_code: NotRequired[str] + """ + ID of the promotion code to create a new discount for. + """ + + +class InvoiceCreateParamsDiscountDiscountEnd(TypedDict): + duration: NotRequired["InvoiceCreateParamsDiscountDiscountEndDuration"] + """ + Time span for the redeemed discount. + """ + timestamp: NotRequired[int] + """ + A precise Unix timestamp for the discount to end. Must be in the future. + """ + type: Literal["duration", "timestamp"] + """ + The type of calculation made to determine when the discount ends. + """ + + +class InvoiceCreateParamsDiscountDiscountEndDuration(TypedDict): + interval: Literal["day", "month", "week", "year"] + """ + Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + """ + interval_count: int + """ + The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + """ + + +class InvoiceCreateParamsFromInvoice(TypedDict): + action: Literal["revision"] + """ + The relation between the new invoice and the original invoice. Currently, only 'revision' is permitted + """ + invoice: str + """ + The `id` of the invoice that will be cloned. + """ + + +class InvoiceCreateParamsIssuer(TypedDict): + account: NotRequired[str] + """ + The connected account being referenced when `type` is `account`. + """ + type: Literal["account", "self"] + """ + Type of the account referenced in the request. + """ + + +class InvoiceCreateParamsPaymentSettings(TypedDict): + default_mandate: NotRequired["Literal['']|str"] + """ + ID of the mandate to be used for this invoice. It must correspond to the payment method used to pay the invoice, including the invoice's default_payment_method or default_source, if set. + """ + payment_method_options: NotRequired[ + "InvoiceCreateParamsPaymentSettingsPaymentMethodOptions" + ] + """ + Payment-method-specific configuration to provide to the invoice's PaymentIntent. + """ + payment_method_types: NotRequired[ + "Literal['']|List[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'affirm', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'boleto', 'card', 'cashapp', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'id_bank_transfer', 'ideal', 'jp_credit_transfer', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'multibanco', 'naver_pay', 'nz_bank_account', 'p24', 'payco', 'paynow', 'paypal', 'pix', 'promptpay', 'revolut_pay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'stripe_balance', 'swish', 'upi', 'us_bank_account', 'wechat_pay']]" + ] + """ + The list of payment method types (e.g. card) to provide to the invoice's PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice's default payment method, the subscription's default payment method, the customer's default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). + """ + + +class InvoiceCreateParamsPaymentSettingsPaymentMethodOptions(TypedDict): + acss_debit: NotRequired[ + "Literal['']|InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsAcssDebit" + ] + """ + If paying by `acss_debit`, this sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice's PaymentIntent. + """ + bancontact: NotRequired[ + "Literal['']|InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsBancontact" + ] + """ + If paying by `bancontact`, this sub-hash contains details about the Bancontact payment method options to pass to the invoice's PaymentIntent. + """ + card: NotRequired[ + "Literal['']|InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsCard" + ] + """ + If paying by `card`, this sub-hash contains details about the Card payment method options to pass to the invoice's PaymentIntent. + """ + customer_balance: NotRequired[ + "Literal['']|InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsCustomerBalance" + ] + """ + If paying by `customer_balance`, this sub-hash contains details about the Bank transfer payment method options to pass to the invoice's PaymentIntent. + """ + id_bank_transfer: NotRequired[ + "Literal['']|InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsIdBankTransfer" + ] + """ + If paying by `id_bank_transfer`, this sub-hash contains details about the Indonesia bank transfer payment method options to pass to the invoice's PaymentIntent. + """ + konbini: NotRequired[ + "Literal['']|InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsKonbini" + ] + """ + If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice's PaymentIntent. + """ + pix: NotRequired[ + "Literal['']|InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsPix" + ] + """ + If paying by `pix`, this sub-hash contains details about the Pix payment method options to pass to the invoice's PaymentIntent. + """ + sepa_debit: NotRequired[ + "Literal['']|InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsSepaDebit" + ] + """ + If paying by `sepa_debit`, this sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice's PaymentIntent. + """ + upi: NotRequired[ + "Literal['']|InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsUpi" + ] + """ + If paying by `upi`, this sub-hash contains details about the UPI payment method options to pass to the invoice's PaymentIntent. + """ + us_bank_account: NotRequired[ + "Literal['']|InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccount" + ] + """ + If paying by `us_bank_account`, this sub-hash contains details about the ACH direct debit payment method options to pass to the invoice's PaymentIntent. + """ + + +class InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsAcssDebit( + TypedDict, +): + mandate_options: NotRequired[ + "InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions" + ] + """ + Additional fields for Mandate creation + """ + verification_method: NotRequired[ + Literal["automatic", "instant", "microdeposits"] + ] + """ + Verification method for the intent + """ + + +class InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions( + TypedDict, +): + transaction_type: NotRequired[Literal["business", "personal"]] + """ + Transaction type of the mandate. + """ + + +class InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsBancontact( + TypedDict, +): + preferred_language: NotRequired[Literal["de", "en", "fr", "nl"]] + """ + Preferred language of the Bancontact authorization page that the customer is redirected to. + """ + + +class InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsCard(TypedDict): + installments: NotRequired[ + "InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsCardInstallments" + ] + """ + Installment configuration for payments attempted on this invoice. + + For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments). + """ + request_three_d_secure: NotRequired[ + Literal["any", "automatic", "challenge"] + ] + """ + We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + """ + + +class InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsCardInstallments( + TypedDict, +): + enabled: NotRequired[bool] + """ + Setting to true enables installments for this invoice. + Setting to false will prevent any selected plan from applying to a payment. + """ + plan: NotRequired[ + "Literal['']|InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsCardInstallmentsPlan" + ] + """ + The selected installment plan to use for this invoice. + """ + + +class InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsCardInstallmentsPlan( + TypedDict, +): + count: NotRequired[int] + """ + For `fixed_count` installment plans, this is required. It represents the number of installment payments your customer will make to their credit card. + """ + interval: NotRequired[Literal["month"]] + """ + For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card. + One of `month`. + """ + type: Literal["bonus", "fixed_count", "revolving"] + """ + Type of installment plan, one of `fixed_count`, `bonus`, or `revolving`. + """ + + +class InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsCustomerBalance( + TypedDict, +): + bank_transfer: NotRequired[ + "InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransfer" + ] + """ + Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. + """ + funding_type: NotRequired[str] + """ + The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. + """ + + +class InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransfer( + TypedDict, +): + eu_bank_transfer: NotRequired[ + "InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer" + ] + """ + Configuration for eu_bank_transfer funding type. + """ + type: NotRequired[str] + """ + The bank transfer type that can be used for funding. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. + """ + + +class InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer( + TypedDict, +): + country: str + """ + The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. + """ + + +class InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsIdBankTransfer( + TypedDict, +): + pass + + +class InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsKonbini(TypedDict): + pass + + +class InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsPix(TypedDict): + amount_includes_iof: NotRequired[Literal["always", "never"]] + """ + Determines if the amount includes the IOF tax. Defaults to `never`. + """ + + +class InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsSepaDebit( + TypedDict, +): + pass + + +class InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsUpi(TypedDict): + mandate_options: NotRequired[ + "InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsUpiMandateOptions" + ] + """ + Configuration options for setting up an eMandate + """ + + +class InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsUpiMandateOptions( + TypedDict, +): + amount: NotRequired[int] + """ + Amount to be charged for future payments. + """ + amount_type: NotRequired[Literal["fixed", "maximum"]] + """ + One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. + """ + description: NotRequired[str] + """ + A description of the mandate or subscription that is meant to be displayed to the customer. + """ + end_date: NotRequired[int] + """ + End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. + """ + + +class InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccount( + TypedDict, +): + financial_connections: NotRequired[ + "InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections" + ] + """ + Additional fields for Financial Connections Session creation + """ + verification_method: NotRequired[ + Literal["automatic", "instant", "microdeposits"] + ] + """ + Verification method for the intent + """ + + +class InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections( + TypedDict, +): + filters: NotRequired[ + "InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters" + ] + """ + Provide filters for the linked accounts that the customer can select for the payment method. + """ + permissions: NotRequired[ + List[ + Literal["balances", "ownership", "payment_method", "transactions"] + ] + ] + """ + The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. + """ + prefetch: NotRequired[ + List[ + Literal[ + "balances", "inferred_balances", "ownership", "transactions" + ] + ] + ] + """ + List of data features that you would like to retrieve upon account creation. + """ + + +class InvoiceCreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters( + TypedDict, +): + account_subcategories: NotRequired[List[Literal["checking", "savings"]]] + """ + The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`. + """ + institution: NotRequired[str] + """ + ID of the institution to use to filter for selectable accounts. + """ + + +class InvoiceCreateParamsRendering(TypedDict): + amount_tax_display: NotRequired[ + "Literal['']|Literal['exclude_tax', 'include_inclusive_tax']" + ] + """ + How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One of `exclude_tax` or `include_inclusive_tax`. `include_inclusive_tax` will include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. `exclude_tax` will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts. + """ + pdf: NotRequired["InvoiceCreateParamsRenderingPdf"] + """ + Invoice pdf rendering options + """ + template: NotRequired[str] + """ + ID of the invoice rendering template to use for this invoice. + """ + template_version: NotRequired["Literal['']|int"] + """ + The specific version of invoice rendering template to use for this invoice. + """ + + +class InvoiceCreateParamsRenderingPdf(TypedDict): + page_size: NotRequired[Literal["a4", "auto", "letter"]] + """ + Page size for invoice PDF. Can be set to `a4`, `letter`, or `auto`. + If set to `auto`, invoice PDF page size defaults to `a4` for customers with + Japanese locale and `letter` for customers with other locales. + """ + + +class InvoiceCreateParamsShippingCost(TypedDict): + shipping_rate: NotRequired[str] + """ + The ID of the shipping rate to use for this order. + """ + shipping_rate_data: NotRequired[ + "InvoiceCreateParamsShippingCostShippingRateData" + ] + """ + Parameters to create a new ad-hoc shipping rate for this order. + """ + + +class InvoiceCreateParamsShippingCostShippingRateData(TypedDict): + delivery_estimate: NotRequired[ + "InvoiceCreateParamsShippingCostShippingRateDataDeliveryEstimate" + ] + """ + The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions. + """ + display_name: str + """ + The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions. + """ + fixed_amount: NotRequired[ + "InvoiceCreateParamsShippingCostShippingRateDataFixedAmount" + ] + """ + Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + tax_behavior: NotRequired[Literal["exclusive", "inclusive", "unspecified"]] + """ + Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + """ + tax_code: NotRequired[str] + """ + A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`. + """ + type: NotRequired[Literal["fixed_amount"]] + """ + The type of calculation to use on the shipping rate. + """ + + +class InvoiceCreateParamsShippingCostShippingRateDataDeliveryEstimate( + TypedDict, +): + maximum: NotRequired[ + "InvoiceCreateParamsShippingCostShippingRateDataDeliveryEstimateMaximum" + ] + """ + The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite. + """ + minimum: NotRequired[ + "InvoiceCreateParamsShippingCostShippingRateDataDeliveryEstimateMinimum" + ] + """ + The lower bound of the estimated range. If empty, represents no lower bound. + """ + + +class InvoiceCreateParamsShippingCostShippingRateDataDeliveryEstimateMaximum( + TypedDict, +): + unit: Literal["business_day", "day", "hour", "month", "week"] + """ + A unit of time. + """ + value: int + """ + Must be greater than 0. + """ + + +class InvoiceCreateParamsShippingCostShippingRateDataDeliveryEstimateMinimum( + TypedDict, +): + unit: Literal["business_day", "day", "hour", "month", "week"] + """ + A unit of time. + """ + value: int + """ + Must be greater than 0. + """ + + +class InvoiceCreateParamsShippingCostShippingRateDataFixedAmount(TypedDict): + amount: int + """ + A non-negative integer in cents representing how much to charge. + """ + 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). + """ + currency_options: NotRequired[ + Dict[ + str, + "InvoiceCreateParamsShippingCostShippingRateDataFixedAmountCurrencyOptions", + ] + ] + """ + Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). + """ + + +class InvoiceCreateParamsShippingCostShippingRateDataFixedAmountCurrencyOptions( + TypedDict, +): + amount: int + """ + A non-negative integer in cents representing how much to charge. + """ + tax_behavior: NotRequired[Literal["exclusive", "inclusive", "unspecified"]] + """ + Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + """ + + +class InvoiceCreateParamsShippingDetails(TypedDict): + address: "InvoiceCreateParamsShippingDetailsAddress" + """ + Shipping address + """ + name: str + """ + Recipient name. + """ + phone: NotRequired["Literal['']|str"] + """ + Recipient phone (including extension) + """ + + +class InvoiceCreateParamsShippingDetailsAddress(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. + """ + + +class InvoiceCreateParamsTransferData(TypedDict): + amount: NotRequired[int] + """ + The amount that will be transferred automatically when the invoice is paid. If no amount is set, the full amount is transferred. + """ + destination: str + """ + ID of an existing, connected Stripe account. + """ diff --git a/stripe/params/_invoice_create_preview_params.py b/stripe/params/_invoice_create_preview_params.py new file mode 100644 index 000000000..af2ef90ab --- /dev/null +++ b/stripe/params/_invoice_create_preview_params.py @@ -0,0 +1,2167 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class InvoiceCreatePreviewParams(RequestOptions): + automatic_tax: NotRequired["InvoiceCreatePreviewParamsAutomaticTax"] + """ + Settings for automatic tax lookup for this invoice preview. + """ + billing_cadence: NotRequired[str] + """ + The identifier of the billing cadence for which you'd like to retrieve the upcoming invoice.Cannot be provided when `subscription`, `schedule`, `subscription_details` or `schedule_details` are provided. + """ + currency: NotRequired[str] + """ + The currency to preview this invoice in. Defaults to that of `customer` if not specified. + """ + customer: NotRequired[str] + """ + The identifier of the customer whose upcoming invoice you'd like to retrieve. If `automatic_tax` is enabled then one of `customer`, `customer_details`, `subscription`, or `schedule` must be set. + """ + customer_account: NotRequired[str] + """ + The identifier of the account whose upcoming invoice you'd like to retrieve. If `automatic_tax` is enabled then one of `customer`, `customer_account`, `customer_details`, `subscription`, or `schedule` must be set. + """ + customer_details: NotRequired["InvoiceCreatePreviewParamsCustomerDetails"] + """ + Details about the customer you want to invoice or overrides for an existing customer. If `automatic_tax` is enabled then one of `customer`, `customer_details`, `subscription`, or `schedule` must be set. + """ + discounts: NotRequired[ + "Literal['']|List[InvoiceCreatePreviewParamsDiscount]" + ] + """ + The coupons to redeem into discounts for the invoice preview. If not specified, inherits the discount from the subscription or customer. This works for both coupons directly applied to an invoice and coupons applied to a subscription. Pass an empty string to avoid inheriting any discounts. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + invoice_items: NotRequired[List["InvoiceCreatePreviewParamsInvoiceItem"]] + """ + List of invoice items to add or update in the upcoming invoice preview (up to 250). + """ + issuer: NotRequired["InvoiceCreatePreviewParamsIssuer"] + """ + The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + """ + on_behalf_of: NotRequired["Literal['']|str"] + """ + The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the [Invoices with Connect](https://stripe.com/docs/billing/invoices/connect) documentation for details. + """ + preview_mode: NotRequired[Literal["next", "recurring"]] + """ + Customizes the types of values to include when calculating the invoice. Defaults to `next` if unspecified. + """ + schedule: NotRequired[str] + """ + The identifier of the schedule whose upcoming invoice you'd like to retrieve. Cannot be used with subscription or subscription fields. + """ + schedule_details: NotRequired["InvoiceCreatePreviewParamsScheduleDetails"] + """ + The schedule creation or modification params to apply as a preview. Cannot be used with `subscription` or `subscription_` prefixed fields. + """ + subscription: NotRequired[str] + """ + The identifier of the subscription for which you'd like to retrieve the upcoming invoice. If not provided, but a `subscription_details.items` is provided, you will preview creating a subscription with those items. If neither `subscription` nor `subscription_details.items` is provided, you will retrieve the next upcoming invoice from among the customer's subscriptions. + """ + subscription_details: NotRequired[ + "InvoiceCreatePreviewParamsSubscriptionDetails" + ] + """ + The subscription creation or modification params to apply as a preview. Cannot be used with `schedule` or `schedule_details` fields. + """ + + +class InvoiceCreatePreviewParamsAutomaticTax(TypedDict): + enabled: bool + """ + Whether Stripe automatically computes tax on this invoice. Note that incompatible invoice items (invoice items with manually specified [tax rates](https://stripe.com/docs/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices. + """ + liability: NotRequired["InvoiceCreatePreviewParamsAutomaticTaxLiability"] + """ + The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + """ + + +class InvoiceCreatePreviewParamsAutomaticTaxLiability(TypedDict): + account: NotRequired[str] + """ + The connected account being referenced when `type` is `account`. + """ + type: Literal["account", "self"] + """ + Type of the account referenced in the request. + """ + + +class InvoiceCreatePreviewParamsCustomerDetails(TypedDict): + address: NotRequired[ + "Literal['']|InvoiceCreatePreviewParamsCustomerDetailsAddress" + ] + """ + The customer's address. + """ + shipping: NotRequired[ + "Literal['']|InvoiceCreatePreviewParamsCustomerDetailsShipping" + ] + """ + The customer's shipping information. Appears on invoices emailed to this customer. + """ + tax: NotRequired["InvoiceCreatePreviewParamsCustomerDetailsTax"] + """ + Tax details about the customer. + """ + tax_exempt: NotRequired["Literal['']|Literal['exempt', 'none', 'reverse']"] + """ + The customer's tax exemption. One of `none`, `exempt`, or `reverse`. + """ + tax_ids: NotRequired[ + List["InvoiceCreatePreviewParamsCustomerDetailsTaxId"] + ] + """ + The customer's tax IDs. + """ + + +class InvoiceCreatePreviewParamsCustomerDetailsAddress(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. + """ + + +class InvoiceCreatePreviewParamsCustomerDetailsShipping(TypedDict): + address: "InvoiceCreatePreviewParamsCustomerDetailsShippingAddress" + """ + Customer shipping address. + """ + name: str + """ + Customer name. + """ + phone: NotRequired[str] + """ + Customer phone (including extension). + """ + + +class InvoiceCreatePreviewParamsCustomerDetailsShippingAddress(TypedDict): + city: NotRequired[str] + """ + City, district, suburb, town, or village. + """ + country: NotRequired[str] + """ + A freeform text field for the country. However, in order to activate some tax features, the format should be a 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. + """ + + +class InvoiceCreatePreviewParamsCustomerDetailsTax(TypedDict): + ip_address: NotRequired["Literal['']|str"] + """ + A recent IP address of the customer used for tax reporting and tax location inference. Stripe recommends updating the IP address when a new PaymentMethod is attached or the address field on the customer is updated. We recommend against updating this field more frequently since it could result in unexpected tax location/reporting outcomes. + """ + + +class InvoiceCreatePreviewParamsCustomerDetailsTaxId(TypedDict): + type: Literal[ + "ad_nrt", + "ae_trn", + "al_tin", + "am_tin", + "ao_tin", + "ar_cuit", + "au_abn", + "au_arn", + "aw_tin", + "az_tin", + "ba_tin", + "bb_tin", + "bd_bin", + "bf_ifu", + "bg_uic", + "bh_vat", + "bj_ifu", + "bo_tin", + "br_cnpj", + "br_cpf", + "bs_tin", + "by_tin", + "ca_bn", + "ca_gst_hst", + "ca_pst_bc", + "ca_pst_mb", + "ca_pst_sk", + "ca_qst", + "cd_nif", + "ch_uid", + "ch_vat", + "cl_tin", + "cm_niu", + "cn_tin", + "co_nit", + "cr_tin", + "cv_nif", + "de_stn", + "do_rcn", + "ec_ruc", + "eg_tin", + "es_cif", + "et_tin", + "eu_oss_vat", + "eu_vat", + "gb_vat", + "ge_vat", + "gn_nif", + "hk_br", + "hr_oib", + "hu_tin", + "id_npwp", + "il_vat", + "in_gst", + "is_vat", + "jp_cn", + "jp_rn", + "jp_trn", + "ke_pin", + "kg_tin", + "kh_tin", + "kr_brn", + "kz_bin", + "la_tin", + "li_uid", + "li_vat", + "ma_vat", + "md_vat", + "me_pib", + "mk_vat", + "mr_nif", + "mx_rfc", + "my_frp", + "my_itn", + "my_sst", + "ng_tin", + "no_vat", + "no_voec", + "np_pan", + "nz_gst", + "om_vat", + "pe_ruc", + "ph_tin", + "ro_tin", + "rs_pib", + "ru_inn", + "ru_kpp", + "sa_vat", + "sg_gst", + "sg_uen", + "si_tin", + "sn_ninea", + "sr_fin", + "sv_nit", + "th_vat", + "tj_tin", + "tr_tin", + "tw_vat", + "tz_vat", + "ua_vat", + "ug_tin", + "us_ein", + "uy_ruc", + "uz_tin", + "uz_vat", + "ve_rif", + "vn_tin", + "za_vat", + "zm_tin", + "zw_tin", + ] + """ + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `al_tin`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `aw_tin`, `az_tin`, `ba_tin`, `bb_tin`, `bd_bin`, `bf_ifu`, `bg_uic`, `bh_vat`, `bj_ifu`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cm_niu`, `cn_tin`, `co_nit`, `cr_tin`, `cv_nif`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `et_tin`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kg_tin`, `kh_tin`, `kr_brn`, `kz_bin`, `la_tin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin` + """ + value: str + """ + Value of the tax ID. + """ + + +class InvoiceCreatePreviewParamsDiscount(TypedDict): + coupon: NotRequired[str] + """ + ID of the coupon to create a new discount for. + """ + discount: NotRequired[str] + """ + ID of an existing discount on the object (or one of its ancestors) to reuse. + """ + discount_end: NotRequired["InvoiceCreatePreviewParamsDiscountDiscountEnd"] + """ + Details to determine how long the discount should be applied for. + """ + promotion_code: NotRequired[str] + """ + ID of the promotion code to create a new discount for. + """ + + +class InvoiceCreatePreviewParamsDiscountDiscountEnd(TypedDict): + duration: NotRequired[ + "InvoiceCreatePreviewParamsDiscountDiscountEndDuration" + ] + """ + Time span for the redeemed discount. + """ + timestamp: NotRequired[int] + """ + A precise Unix timestamp for the discount to end. Must be in the future. + """ + type: Literal["duration", "timestamp"] + """ + The type of calculation made to determine when the discount ends. + """ + + +class InvoiceCreatePreviewParamsDiscountDiscountEndDuration(TypedDict): + interval: Literal["day", "month", "week", "year"] + """ + Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + """ + interval_count: int + """ + The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + """ + + +class InvoiceCreatePreviewParamsInvoiceItem(TypedDict): + amount: NotRequired[int] + """ + The integer amount in cents (or local equivalent) of previewed invoice item. + """ + currency: NotRequired[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). Only applicable to new invoice items. + """ + description: NotRequired[str] + """ + An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking. + """ + discountable: NotRequired[bool] + """ + Explicitly controls whether discounts apply to this invoice item. Defaults to true, except for negative invoice items. + """ + discounts: NotRequired[ + "Literal['']|List[InvoiceCreatePreviewParamsInvoiceItemDiscount]" + ] + """ + The coupons to redeem into discounts for the invoice item in the preview. + """ + invoiceitem: NotRequired[str] + """ + The ID of the invoice item to update in preview. If not specified, a new invoice item will be added to the preview of the upcoming invoice. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + period: NotRequired["InvoiceCreatePreviewParamsInvoiceItemPeriod"] + """ + The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details. + """ + price: NotRequired[str] + """ + The ID of the price object. One of `price` or `price_data` is required. + """ + price_data: NotRequired["InvoiceCreatePreviewParamsInvoiceItemPriceData"] + """ + Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. + """ + quantity: NotRequired[int] + """ + Non-negative integer. The quantity of units for the invoice item. + """ + tax_behavior: NotRequired[Literal["exclusive", "inclusive", "unspecified"]] + """ + Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + """ + tax_code: NotRequired["Literal['']|str"] + """ + A [tax code](https://stripe.com/docs/tax/tax-categories) ID. + """ + tax_rates: NotRequired["Literal['']|List[str]"] + """ + The tax rates that apply to the item. When set, any `default_tax_rates` do not apply to this item. + """ + unit_amount: NotRequired[int] + """ + The integer unit amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. This unit_amount will be multiplied by the quantity to get the full amount. If you want to apply a credit to the customer's account, pass a negative unit_amount. + """ + unit_amount_decimal: NotRequired[str] + """ + Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + """ + + +class InvoiceCreatePreviewParamsInvoiceItemDiscount(TypedDict): + coupon: NotRequired[str] + """ + ID of the coupon to create a new discount for. + """ + discount: NotRequired[str] + """ + ID of an existing discount on the object (or one of its ancestors) to reuse. + """ + discount_end: NotRequired[ + "InvoiceCreatePreviewParamsInvoiceItemDiscountDiscountEnd" + ] + """ + Details to determine how long the discount should be applied for. + """ + promotion_code: NotRequired[str] + """ + ID of the promotion code to create a new discount for. + """ + + +class InvoiceCreatePreviewParamsInvoiceItemDiscountDiscountEnd(TypedDict): + duration: NotRequired[ + "InvoiceCreatePreviewParamsInvoiceItemDiscountDiscountEndDuration" + ] + """ + Time span for the redeemed discount. + """ + timestamp: NotRequired[int] + """ + A precise Unix timestamp for the discount to end. Must be in the future. + """ + type: Literal["duration", "timestamp"] + """ + The type of calculation made to determine when the discount ends. + """ + + +class InvoiceCreatePreviewParamsInvoiceItemDiscountDiscountEndDuration( + TypedDict, +): + interval: Literal["day", "month", "week", "year"] + """ + Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + """ + interval_count: int + """ + The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + """ + + +class InvoiceCreatePreviewParamsInvoiceItemPeriod(TypedDict): + end: int + """ + The end of the period, which must be greater than or equal to the start. This value is inclusive. + """ + start: int + """ + The start of the period. This value is inclusive. + """ + + +class InvoiceCreatePreviewParamsInvoiceItemPriceData(TypedDict): + 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). + """ + product: str + """ + The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to. + """ + tax_behavior: NotRequired[Literal["exclusive", "inclusive", "unspecified"]] + """ + Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + """ + unit_amount: NotRequired[int] + """ + A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + """ + unit_amount_decimal: NotRequired[str] + """ + Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + """ + + +class InvoiceCreatePreviewParamsIssuer(TypedDict): + account: NotRequired[str] + """ + The connected account being referenced when `type` is `account`. + """ + type: Literal["account", "self"] + """ + Type of the account referenced in the request. + """ + + +class InvoiceCreatePreviewParamsScheduleDetails(TypedDict): + amendments: NotRequired[ + List["InvoiceCreatePreviewParamsScheduleDetailsAmendment"] + ] + """ + Changes to apply to the phases of the subscription schedule, in the order provided. + """ + billing_behavior: NotRequired[ + Literal["prorate_on_next_phase", "prorate_up_front"] + ] + """ + Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front. + """ + billing_mode: NotRequired[ + "InvoiceCreatePreviewParamsScheduleDetailsBillingMode" + ] + """ + Controls how prorations and invoices for subscriptions are calculated and orchestrated. + """ + end_behavior: NotRequired[Literal["cancel", "release"]] + """ + Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running. `cancel` will end the subscription schedule and cancel the underlying subscription. + """ + phases: NotRequired[List["InvoiceCreatePreviewParamsScheduleDetailsPhase"]] + """ + List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase. + """ + prebilling: NotRequired[ + "Literal['']|List[InvoiceCreatePreviewParamsScheduleDetailsPrebilling]" + ] + """ + Provide any time periods to bill in advance. + """ + proration_behavior: NotRequired[ + Literal["always_invoice", "create_prorations", "none"] + ] + """ + In cases where the `schedule_details` params update the currently active phase, specifies if and how to prorate at the time of the request. + """ + + +class InvoiceCreatePreviewParamsScheduleDetailsAmendment(TypedDict): + amendment_end: NotRequired[ + "InvoiceCreatePreviewParamsScheduleDetailsAmendmentAmendmentEnd" + ] + """ + Details to identify the end of the time range modified by the proposed change. If not supplied, the amendment is considered a point-in-time operation that only affects the exact timestamp at `amendment_start`, and a restricted set of attributes is supported on the amendment. + """ + amendment_start: ( + "InvoiceCreatePreviewParamsScheduleDetailsAmendmentAmendmentStart" + ) + """ + Details to identify the earliest timestamp where the proposed change should take effect. + """ + billing_cycle_anchor: NotRequired[Literal["amendment_start", "automatic"]] + """ + For point-in-time amendments (having no `amendment_end`), this attribute lets you set or remove whether the subscription's billing cycle anchor is reset at the `amendment_start` timestamp.For time-span based amendments (having both `amendment_start` and `amendment_end`), the only value valid is `automatic`, which removes any previously configured billing cycle anchor resets scheduled to occur during the window of time spanned by the amendment. + """ + discount_actions: NotRequired[ + List[ + "InvoiceCreatePreviewParamsScheduleDetailsAmendmentDiscountAction" + ] + ] + """ + Changes to the coupons being redeemed or discounts being applied during the amendment time span. + """ + item_actions: NotRequired[ + List["InvoiceCreatePreviewParamsScheduleDetailsAmendmentItemAction"] + ] + """ + Changes to the subscription items during the amendment time span. + """ + metadata_actions: NotRequired[ + List[ + "InvoiceCreatePreviewParamsScheduleDetailsAmendmentMetadataAction" + ] + ] + """ + Instructions for how to modify phase metadata + """ + proration_behavior: NotRequired[ + Literal["always_invoice", "create_prorations", "none"] + ] + """ + Changes to how Stripe handles prorations during the amendment time span. Affects if and how prorations are created when a future phase starts. In cases where the amendment changes the currently active phase, it is used to determine whether or how to prorate now, at the time of the request. Also supported as a point-in-time operation when `amendment_end` is `null`. + """ + set_pause_collection: NotRequired[ + "InvoiceCreatePreviewParamsScheduleDetailsAmendmentSetPauseCollection" + ] + """ + Defines how to pause collection for the underlying subscription throughout the duration of the amendment. + """ + set_schedule_end: NotRequired[Literal["amendment_end", "amendment_start"]] + """ + Ends the subscription schedule early as dictated by either the accompanying amendment's start or end. + """ + trial_settings: NotRequired[ + "InvoiceCreatePreviewParamsScheduleDetailsAmendmentTrialSettings" + ] + """ + Settings related to subscription trials. + """ + + +class InvoiceCreatePreviewParamsScheduleDetailsAmendmentAmendmentEnd( + TypedDict +): + discount_end: NotRequired[ + "InvoiceCreatePreviewParamsScheduleDetailsAmendmentAmendmentEndDiscountEnd" + ] + """ + Use the `end` time of a given discount. + """ + duration: NotRequired[ + "InvoiceCreatePreviewParamsScheduleDetailsAmendmentAmendmentEndDuration" + ] + """ + Time span for the amendment starting from the `amendment_start`. + """ + timestamp: NotRequired[int] + """ + A precise Unix timestamp for the amendment to end. Must be after the `amendment_start`. + """ + type: Literal[ + "discount_end", + "duration", + "schedule_end", + "timestamp", + "trial_end", + "trial_start", + "upcoming_invoice", + ] + """ + Select one of three ways to pass the `amendment_end`. + """ + + +class InvoiceCreatePreviewParamsScheduleDetailsAmendmentAmendmentEndDiscountEnd( + TypedDict, +): + discount: str + """ + The ID of a specific discount. + """ + + +class InvoiceCreatePreviewParamsScheduleDetailsAmendmentAmendmentEndDuration( + TypedDict, +): + interval: Literal["day", "month", "week", "year"] + """ + Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + """ + interval_count: int + """ + The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + """ + + +class InvoiceCreatePreviewParamsScheduleDetailsAmendmentAmendmentStart( + TypedDict, +): + amendment_end: NotRequired[ + "InvoiceCreatePreviewParamsScheduleDetailsAmendmentAmendmentStartAmendmentEnd" + ] + """ + Details of another amendment in the same array, immediately after which this amendment should begin. + """ + discount_end: NotRequired[ + "InvoiceCreatePreviewParamsScheduleDetailsAmendmentAmendmentStartDiscountEnd" + ] + """ + Use the `end` time of a given discount. + """ + timestamp: NotRequired[int] + """ + A precise Unix timestamp for the amendment to start. + """ + type: Literal[ + "amendment_end", + "discount_end", + "now", + "schedule_end", + "timestamp", + "trial_end", + "trial_start", + "upcoming_invoice", + ] + """ + Select one of three ways to pass the `amendment_start`. + """ + + +class InvoiceCreatePreviewParamsScheduleDetailsAmendmentAmendmentStartAmendmentEnd( + TypedDict, +): + index: int + """ + The position of the previous amendment in the `amendments` array after which this amendment should begin. Indexes start from 0 and must be less than the index of the current amendment in the array. + """ + + +class InvoiceCreatePreviewParamsScheduleDetailsAmendmentAmendmentStartDiscountEnd( + TypedDict, +): + discount: str + """ + The ID of a specific discount. + """ + + +class InvoiceCreatePreviewParamsScheduleDetailsAmendmentDiscountAction( + TypedDict, +): + add: NotRequired[ + "InvoiceCreatePreviewParamsScheduleDetailsAmendmentDiscountActionAdd" + ] + """ + Details of the discount to add. + """ + remove: NotRequired[ + "InvoiceCreatePreviewParamsScheduleDetailsAmendmentDiscountActionRemove" + ] + """ + Details of the discount to remove. + """ + set: NotRequired[ + "InvoiceCreatePreviewParamsScheduleDetailsAmendmentDiscountActionSet" + ] + """ + Details of the discount to replace the existing discounts with. + """ + type: Literal["add", "remove", "set"] + """ + Determines the type of discount action. + """ + + +class InvoiceCreatePreviewParamsScheduleDetailsAmendmentDiscountActionAdd( + TypedDict, +): + coupon: NotRequired[str] + """ + The coupon code to redeem. + """ + discount: NotRequired[str] + """ + An ID of an existing discount for a coupon that was already redeemed. + """ + discount_end: NotRequired[ + "InvoiceCreatePreviewParamsScheduleDetailsAmendmentDiscountActionAddDiscountEnd" + ] + """ + Details to determine how long the discount should be applied for. + """ + index: NotRequired[int] + """ + The index, starting at 0, at which to position the new discount. When not supplied, Stripe defaults to appending the discount to the end of the `discounts` array. + """ + promotion_code: NotRequired[str] + """ + The promotion code to redeem. + """ + + +class InvoiceCreatePreviewParamsScheduleDetailsAmendmentDiscountActionAddDiscountEnd( + TypedDict, +): + type: Literal["amendment_end"] + """ + The type of calculation made to determine when the discount ends. + """ + + +class InvoiceCreatePreviewParamsScheduleDetailsAmendmentDiscountActionRemove( + TypedDict, +): + coupon: NotRequired[str] + """ + The coupon code to remove from the `discounts` array. + """ + discount: NotRequired[str] + """ + The ID of a discount to remove from the `discounts` array. + """ + promotion_code: NotRequired[str] + """ + The ID of a promotion code to remove from the `discounts` array. + """ + + +class InvoiceCreatePreviewParamsScheduleDetailsAmendmentDiscountActionSet( + TypedDict, +): + coupon: NotRequired[str] + """ + The coupon code to replace the `discounts` array with. + """ + discount: NotRequired[str] + """ + An ID of an existing discount to replace the `discounts` array with. + """ + promotion_code: NotRequired[str] + """ + An ID of an existing promotion code to replace the `discounts` array with. + """ + + +class InvoiceCreatePreviewParamsScheduleDetailsAmendmentItemAction(TypedDict): + add: NotRequired[ + "InvoiceCreatePreviewParamsScheduleDetailsAmendmentItemActionAdd" + ] + """ + Details of the subscription item to add. If an item with the same `price` exists, it will be replaced by this new item. Otherwise, it adds the new item. + """ + remove: NotRequired[ + "InvoiceCreatePreviewParamsScheduleDetailsAmendmentItemActionRemove" + ] + """ + Details of the subscription item to remove. + """ + set: NotRequired[ + "InvoiceCreatePreviewParamsScheduleDetailsAmendmentItemActionSet" + ] + """ + Details of the subscription item to replace the existing items with. If an item with the `set[price]` already exists, the `items` array is not cleared. Instead, all of the other `set` properties that are passed in this request will replace the existing values for the configuration item. + """ + type: Literal["add", "remove", "set"] + """ + Determines the type of item action. + """ + + +class InvoiceCreatePreviewParamsScheduleDetailsAmendmentItemActionAdd( + TypedDict, +): + discounts: NotRequired[ + List[ + "InvoiceCreatePreviewParamsScheduleDetailsAmendmentItemActionAddDiscount" + ] + ] + """ + The discounts applied to the item. Subscription item discounts are applied before subscription discounts. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + price: str + """ + The ID of the price object. + """ + quantity: NotRequired[int] + """ + Quantity for this item. + """ + tax_rates: NotRequired[List[str]] + """ + The tax rates that apply to this subscription item. When set, the `default_tax_rates` on the subscription do not apply to this `subscription_item`. + """ + trial: NotRequired[ + "InvoiceCreatePreviewParamsScheduleDetailsAmendmentItemActionAddTrial" + ] + """ + Options that configure the trial on the subscription item. + """ + + +class InvoiceCreatePreviewParamsScheduleDetailsAmendmentItemActionAddDiscount( + TypedDict, +): + coupon: NotRequired[str] + """ + ID of the coupon to create a new discount for. + """ + discount: NotRequired[str] + """ + ID of an existing discount on the object (or one of its ancestors) to reuse. + """ + discount_end: NotRequired[ + "InvoiceCreatePreviewParamsScheduleDetailsAmendmentItemActionAddDiscountDiscountEnd" + ] + """ + Details to determine how long the discount should be applied for. + """ + promotion_code: NotRequired[str] + """ + ID of the promotion code to create a new discount for. + """ + + +class InvoiceCreatePreviewParamsScheduleDetailsAmendmentItemActionAddDiscountDiscountEnd( + TypedDict, +): + duration: NotRequired[ + "InvoiceCreatePreviewParamsScheduleDetailsAmendmentItemActionAddDiscountDiscountEndDuration" + ] + """ + Time span for the redeemed discount. + """ + timestamp: NotRequired[int] + """ + A precise Unix timestamp for the discount to end. Must be in the future. + """ + type: Literal["duration", "timestamp"] + """ + The type of calculation made to determine when the discount ends. + """ + + +class InvoiceCreatePreviewParamsScheduleDetailsAmendmentItemActionAddDiscountDiscountEndDuration( + TypedDict, +): + interval: Literal["day", "month", "week", "year"] + """ + Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + """ + interval_count: int + """ + The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + """ + + +class InvoiceCreatePreviewParamsScheduleDetailsAmendmentItemActionAddTrial( + TypedDict, +): + converts_to: NotRequired[List[str]] + """ + List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. + """ + type: Literal["free", "paid"] + """ + Determines the type of trial for this item. + """ + + +class InvoiceCreatePreviewParamsScheduleDetailsAmendmentItemActionRemove( + TypedDict, +): + price: str + """ + ID of a price to remove. + """ + + +class InvoiceCreatePreviewParamsScheduleDetailsAmendmentItemActionSet( + TypedDict, +): + discounts: NotRequired[ + List[ + "InvoiceCreatePreviewParamsScheduleDetailsAmendmentItemActionSetDiscount" + ] + ] + """ + If an item with the `price` already exists, passing this will override the `discounts` array on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `discounts`. + """ + metadata: NotRequired[Dict[str, str]] + """ + If an item with the `price` already exists, passing this will override the `metadata` on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `metadata`. + """ + price: str + """ + The ID of the price object. + """ + quantity: NotRequired[int] + """ + If an item with the `price` already exists, passing this will override the quantity on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `quantity`. + """ + tax_rates: NotRequired[List[str]] + """ + If an item with the `price` already exists, passing this will override the `tax_rates` array on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `tax_rates`. + """ + trial: NotRequired[ + "InvoiceCreatePreviewParamsScheduleDetailsAmendmentItemActionSetTrial" + ] + """ + If an item with the `price` already exists, passing this will override the `trial` configuration on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `trial`. + """ + + +class InvoiceCreatePreviewParamsScheduleDetailsAmendmentItemActionSetDiscount( + TypedDict, +): + coupon: NotRequired[str] + """ + ID of the coupon to create a new discount for. + """ + discount: NotRequired[str] + """ + ID of an existing discount on the object (or one of its ancestors) to reuse. + """ + discount_end: NotRequired[ + "InvoiceCreatePreviewParamsScheduleDetailsAmendmentItemActionSetDiscountDiscountEnd" + ] + """ + Details to determine how long the discount should be applied for. + """ + promotion_code: NotRequired[str] + """ + ID of the promotion code to create a new discount for. + """ + + +class InvoiceCreatePreviewParamsScheduleDetailsAmendmentItemActionSetDiscountDiscountEnd( + TypedDict, +): + duration: NotRequired[ + "InvoiceCreatePreviewParamsScheduleDetailsAmendmentItemActionSetDiscountDiscountEndDuration" + ] + """ + Time span for the redeemed discount. + """ + timestamp: NotRequired[int] + """ + A precise Unix timestamp for the discount to end. Must be in the future. + """ + type: Literal["duration", "timestamp"] + """ + The type of calculation made to determine when the discount ends. + """ + + +class InvoiceCreatePreviewParamsScheduleDetailsAmendmentItemActionSetDiscountDiscountEndDuration( + TypedDict, +): + interval: Literal["day", "month", "week", "year"] + """ + Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + """ + interval_count: int + """ + The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + """ + + +class InvoiceCreatePreviewParamsScheduleDetailsAmendmentItemActionSetTrial( + TypedDict, +): + converts_to: NotRequired[List[str]] + """ + List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. + """ + type: Literal["free", "paid"] + """ + Determines the type of trial for this item. + """ + + +class InvoiceCreatePreviewParamsScheduleDetailsAmendmentMetadataAction( + TypedDict, +): + add: NotRequired[Dict[str, str]] + """ + Key-value pairs to add to schedule phase metadata. These values will merge with existing schedule phase metadata. + """ + remove: NotRequired[List[str]] + """ + Keys to remove from schedule phase metadata. + """ + set: NotRequired["Literal['']|Dict[str, str]"] + """ + Key-value pairs to set as schedule phase metadata. Existing schedule phase metadata will be overwritten. + """ + type: Literal["add", "remove", "set"] + """ + Select one of three ways to update phase-level `metadata` on subscription schedules. + """ + + +class InvoiceCreatePreviewParamsScheduleDetailsAmendmentSetPauseCollection( + TypedDict, +): + set: NotRequired[ + "InvoiceCreatePreviewParamsScheduleDetailsAmendmentSetPauseCollectionSet" + ] + """ + Details of the pause_collection behavior to apply to the amendment. + """ + type: Literal["remove", "set"] + """ + Determines the type of the pause_collection amendment. + """ + + +class InvoiceCreatePreviewParamsScheduleDetailsAmendmentSetPauseCollectionSet( + TypedDict, +): + behavior: Literal["keep_as_draft", "mark_uncollectible", "void"] + """ + The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. + """ + + +class InvoiceCreatePreviewParamsScheduleDetailsAmendmentTrialSettings( + TypedDict, +): + end_behavior: NotRequired[ + "InvoiceCreatePreviewParamsScheduleDetailsAmendmentTrialSettingsEndBehavior" + ] + """ + Defines how the subscription should behave when a trial ends. + """ + + +class InvoiceCreatePreviewParamsScheduleDetailsAmendmentTrialSettingsEndBehavior( + TypedDict, +): + prorate_up_front: NotRequired[Literal["defer", "include"]] + """ + Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`. + """ + + +class InvoiceCreatePreviewParamsScheduleDetailsBillingMode(TypedDict): + flexible: NotRequired[ + "InvoiceCreatePreviewParamsScheduleDetailsBillingModeFlexible" + ] + """ + Configure behavior for flexible billing mode. + """ + type: Literal["classic", "flexible"] + """ + Controls the calculation and orchestration of prorations and invoices for subscriptions. If no value is passed, the default is `flexible`. + """ + + +class InvoiceCreatePreviewParamsScheduleDetailsBillingModeFlexible(TypedDict): + proration_discounts: NotRequired[Literal["included", "itemized"]] + """ + Controls how invoices and invoice items display proration amounts and discount amounts. + """ + + +class InvoiceCreatePreviewParamsScheduleDetailsPhase(TypedDict): + add_invoice_items: NotRequired[ + List["InvoiceCreatePreviewParamsScheduleDetailsPhaseAddInvoiceItem"] + ] + """ + A list of prices and quantities that will generate invoice items appended to the next invoice for this phase. You may pass up to 20 items. + """ + application_fee_percent: NotRequired[float] + """ + A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). + """ + automatic_tax: NotRequired[ + "InvoiceCreatePreviewParamsScheduleDetailsPhaseAutomaticTax" + ] + """ + Automatic tax settings for this phase. + """ + billing_cycle_anchor: NotRequired[Literal["automatic", "phase_start"]] + """ + Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). + """ + billing_thresholds: NotRequired[ + "Literal['']|InvoiceCreatePreviewParamsScheduleDetailsPhaseBillingThresholds" + ] + """ + Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. + """ + collection_method: NotRequired[ + Literal["charge_automatically", "send_invoice"] + ] + """ + Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically` on creation. + """ + currency: NotRequired[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). + """ + default_payment_method: NotRequired[str] + """ + ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings. + """ + default_tax_rates: NotRequired["Literal['']|List[str]"] + """ + A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will set the Subscription's [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates), which means they will be the Invoice's [`default_tax_rates`](https://stripe.com/docs/api/invoices/create#create_invoice-default_tax_rates) for any Invoices issued by the Subscription during this Phase. + """ + description: NotRequired["Literal['']|str"] + """ + Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. + """ + discounts: NotRequired[ + "Literal['']|List[InvoiceCreatePreviewParamsScheduleDetailsPhaseDiscount]" + ] + """ + The coupons to redeem into discounts for the schedule phase. If not specified, inherits the discount from the subscription's customer. Pass an empty string to avoid inheriting any discounts. + """ + duration: NotRequired[ + "InvoiceCreatePreviewParamsScheduleDetailsPhaseDuration" + ] + """ + The number of intervals the phase should last. If set, `end_date` must not be set. + """ + end_date: NotRequired["int|Literal['now']"] + """ + The date at which this phase of the subscription schedule ends. If set, `iterations` must not be set. + """ + invoice_settings: NotRequired[ + "InvoiceCreatePreviewParamsScheduleDetailsPhaseInvoiceSettings" + ] + """ + All invoices will be billed using the specified settings. + """ + items: List["InvoiceCreatePreviewParamsScheduleDetailsPhaseItem"] + """ + List of configuration items, each with an attached price, to apply during this phase of the subscription schedule. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a phase. Metadata on a schedule's phase will update the underlying subscription's `metadata` when the phase is entered, adding new keys and replacing existing keys in the subscription's `metadata`. Individual keys in the subscription's `metadata` can be unset by posting an empty value to them in the phase's `metadata`. To unset all keys in the subscription's `metadata`, update the subscription directly or unset every key individually from the phase's `metadata`. + """ + on_behalf_of: NotRequired[str] + """ + The account on behalf of which to charge, for each of the associated subscription's invoices. + """ + pause_collection: NotRequired[ + "InvoiceCreatePreviewParamsScheduleDetailsPhasePauseCollection" + ] + """ + If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment). + """ + proration_behavior: NotRequired[ + Literal["always_invoice", "create_prorations", "none"] + ] + """ + Controls whether the subscription schedule should create [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when transitioning to this phase if there is a difference in billing configuration. It's different from the request-level [proration_behavior](https://stripe.com/docs/api/subscription_schedules/update#update_subscription_schedule-proration_behavior) parameter which controls what happens if the update request affects the billing configuration (item price, quantity, etc.) of the current phase. + """ + start_date: NotRequired["int|Literal['now']"] + """ + The date at which this phase of the subscription schedule starts or `now`. Must be set on the first phase. + """ + transfer_data: NotRequired[ + "InvoiceCreatePreviewParamsScheduleDetailsPhaseTransferData" + ] + """ + The data with which to automatically create a Transfer for each of the associated subscription's invoices. + """ + trial: NotRequired[bool] + """ + If set to true the entire phase is counted as a trial and the customer will not be charged for any fees. + """ + trial_continuation: NotRequired[Literal["continue", "none"]] + """ + Specify trial behavior when crossing phase boundaries + """ + trial_end: NotRequired["int|Literal['now']"] + """ + Sets the phase to trialing from the start date to this date. Must be before the phase end date, can not be combined with `trial` + """ + trial_settings: NotRequired[ + "InvoiceCreatePreviewParamsScheduleDetailsPhaseTrialSettings" + ] + """ + Settings related to subscription trials. + """ + + +class InvoiceCreatePreviewParamsScheduleDetailsPhaseAddInvoiceItem(TypedDict): + discounts: NotRequired[ + List[ + "InvoiceCreatePreviewParamsScheduleDetailsPhaseAddInvoiceItemDiscount" + ] + ] + """ + The coupons to redeem into discounts for the item. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + period: NotRequired[ + "InvoiceCreatePreviewParamsScheduleDetailsPhaseAddInvoiceItemPeriod" + ] + """ + The period associated with this invoice item. If not set, `period.start.type` defaults to `max_item_period_start` and `period.end.type` defaults to `min_item_period_end`. + """ + price: NotRequired[str] + """ + The ID of the price object. One of `price` or `price_data` is required. + """ + price_data: NotRequired[ + "InvoiceCreatePreviewParamsScheduleDetailsPhaseAddInvoiceItemPriceData" + ] + """ + Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. + """ + quantity: NotRequired[int] + """ + Quantity for this item. Defaults to 1. + """ + tax_rates: NotRequired["Literal['']|List[str]"] + """ + The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item. + """ + + +class InvoiceCreatePreviewParamsScheduleDetailsPhaseAddInvoiceItemDiscount( + TypedDict, +): + coupon: NotRequired[str] + """ + ID of the coupon to create a new discount for. + """ + discount: NotRequired[str] + """ + ID of an existing discount on the object (or one of its ancestors) to reuse. + """ + discount_end: NotRequired[ + "InvoiceCreatePreviewParamsScheduleDetailsPhaseAddInvoiceItemDiscountDiscountEnd" + ] + """ + Details to determine how long the discount should be applied for. + """ + promotion_code: NotRequired[str] + """ + ID of the promotion code to create a new discount for. + """ + + +class InvoiceCreatePreviewParamsScheduleDetailsPhaseAddInvoiceItemDiscountDiscountEnd( + TypedDict, +): + duration: NotRequired[ + "InvoiceCreatePreviewParamsScheduleDetailsPhaseAddInvoiceItemDiscountDiscountEndDuration" + ] + """ + Time span for the redeemed discount. + """ + timestamp: NotRequired[int] + """ + A precise Unix timestamp for the discount to end. Must be in the future. + """ + type: Literal["duration", "timestamp"] + """ + The type of calculation made to determine when the discount ends. + """ + + +class InvoiceCreatePreviewParamsScheduleDetailsPhaseAddInvoiceItemDiscountDiscountEndDuration( + TypedDict, +): + interval: Literal["day", "month", "week", "year"] + """ + Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + """ + interval_count: int + """ + The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + """ + + +class InvoiceCreatePreviewParamsScheduleDetailsPhaseAddInvoiceItemPeriod( + TypedDict, +): + end: ( + "InvoiceCreatePreviewParamsScheduleDetailsPhaseAddInvoiceItemPeriodEnd" + ) + """ + End of the invoice item period. + """ + start: "InvoiceCreatePreviewParamsScheduleDetailsPhaseAddInvoiceItemPeriodStart" + """ + Start of the invoice item period. + """ + + +class InvoiceCreatePreviewParamsScheduleDetailsPhaseAddInvoiceItemPeriodEnd( + TypedDict, +): + timestamp: NotRequired[int] + """ + A precise Unix timestamp for the end of the invoice item period. Must be greater than or equal to `period.start`. + """ + type: Literal["min_item_period_end", "phase_end", "timestamp"] + """ + Select how to calculate the end of the invoice item period. + """ + + +class InvoiceCreatePreviewParamsScheduleDetailsPhaseAddInvoiceItemPeriodStart( + TypedDict, +): + timestamp: NotRequired[int] + """ + A precise Unix timestamp for the start of the invoice item period. Must be less than or equal to `period.end`. + """ + type: Literal["max_item_period_start", "phase_start", "timestamp"] + """ + Select how to calculate the start of the invoice item period. + """ + + +class InvoiceCreatePreviewParamsScheduleDetailsPhaseAddInvoiceItemPriceData( + TypedDict, +): + 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). + """ + product: str + """ + The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to. + """ + tax_behavior: NotRequired[Literal["exclusive", "inclusive", "unspecified"]] + """ + Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + """ + unit_amount: NotRequired[int] + """ + A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge or a negative integer representing the amount to credit to the customer. + """ + unit_amount_decimal: NotRequired[str] + """ + Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + """ + + +class InvoiceCreatePreviewParamsScheduleDetailsPhaseAutomaticTax(TypedDict): + enabled: bool + """ + Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription. + """ + liability: NotRequired[ + "InvoiceCreatePreviewParamsScheduleDetailsPhaseAutomaticTaxLiability" + ] + """ + The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + """ + + +class InvoiceCreatePreviewParamsScheduleDetailsPhaseAutomaticTaxLiability( + TypedDict, +): + account: NotRequired[str] + """ + The connected account being referenced when `type` is `account`. + """ + type: Literal["account", "self"] + """ + Type of the account referenced in the request. + """ + + +class InvoiceCreatePreviewParamsScheduleDetailsPhaseBillingThresholds( + TypedDict, +): + amount_gte: NotRequired[int] + """ + Monetary threshold that triggers the subscription to advance to a new billing period + """ + reset_billing_cycle_anchor: NotRequired[bool] + """ + Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. + """ + + +class InvoiceCreatePreviewParamsScheduleDetailsPhaseDiscount(TypedDict): + coupon: NotRequired[str] + """ + ID of the coupon to create a new discount for. + """ + discount: NotRequired[str] + """ + ID of an existing discount on the object (or one of its ancestors) to reuse. + """ + discount_end: NotRequired[ + "InvoiceCreatePreviewParamsScheduleDetailsPhaseDiscountDiscountEnd" + ] + """ + Details to determine how long the discount should be applied for. + """ + promotion_code: NotRequired[str] + """ + ID of the promotion code to create a new discount for. + """ + + +class InvoiceCreatePreviewParamsScheduleDetailsPhaseDiscountDiscountEnd( + TypedDict, +): + duration: NotRequired[ + "InvoiceCreatePreviewParamsScheduleDetailsPhaseDiscountDiscountEndDuration" + ] + """ + Time span for the redeemed discount. + """ + timestamp: NotRequired[int] + """ + A precise Unix timestamp for the discount to end. Must be in the future. + """ + type: Literal["duration", "timestamp"] + """ + The type of calculation made to determine when the discount ends. + """ + + +class InvoiceCreatePreviewParamsScheduleDetailsPhaseDiscountDiscountEndDuration( + TypedDict, +): + interval: Literal["day", "month", "week", "year"] + """ + Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + """ + interval_count: int + """ + The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + """ + + +class InvoiceCreatePreviewParamsScheduleDetailsPhaseDuration(TypedDict): + interval: Literal["day", "month", "week", "year"] + """ + Specifies phase duration. Either `day`, `week`, `month` or `year`. + """ + interval_count: NotRequired[int] + """ + The multiplier applied to the interval. + """ + + +class InvoiceCreatePreviewParamsScheduleDetailsPhaseInvoiceSettings(TypedDict): + account_tax_ids: NotRequired["Literal['']|List[str]"] + """ + The account tax IDs associated with this phase of the subscription schedule. Will be set on invoices generated by this phase of the subscription schedule. + """ + days_until_due: NotRequired[int] + """ + Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `billing=charge_automatically`. + """ + issuer: NotRequired[ + "InvoiceCreatePreviewParamsScheduleDetailsPhaseInvoiceSettingsIssuer" + ] + """ + The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + """ + + +class InvoiceCreatePreviewParamsScheduleDetailsPhaseInvoiceSettingsIssuer( + TypedDict, +): + account: NotRequired[str] + """ + The connected account being referenced when `type` is `account`. + """ + type: Literal["account", "self"] + """ + Type of the account referenced in the request. + """ + + +class InvoiceCreatePreviewParamsScheduleDetailsPhaseItem(TypedDict): + billing_thresholds: NotRequired[ + "Literal['']|InvoiceCreatePreviewParamsScheduleDetailsPhaseItemBillingThresholds" + ] + """ + Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. + """ + discounts: NotRequired[ + "Literal['']|List[InvoiceCreatePreviewParamsScheduleDetailsPhaseItemDiscount]" + ] + """ + The coupons to redeem into discounts for the subscription item. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a configuration item. Metadata on a configuration item will update the underlying subscription item's `metadata` when the phase is entered, adding new keys and replacing existing keys. Individual keys in the subscription item's `metadata` can be unset by posting an empty value to them in the configuration item's `metadata`. To unset all keys in the subscription item's `metadata`, update the subscription item directly or unset every key individually from the configuration item's `metadata`. + """ + plan: NotRequired[str] + """ + The plan ID to subscribe to. You may specify the same ID in `plan` and `price`. + """ + price: NotRequired[str] + """ + The ID of the price object. + """ + price_data: NotRequired[ + "InvoiceCreatePreviewParamsScheduleDetailsPhaseItemPriceData" + ] + """ + Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + """ + quantity: NotRequired[int] + """ + Quantity for the given price. Can be set only if the price's `usage_type` is `licensed` and not `metered`. + """ + tax_rates: NotRequired["Literal['']|List[str]"] + """ + A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. + """ + trial: NotRequired[ + "InvoiceCreatePreviewParamsScheduleDetailsPhaseItemTrial" + ] + """ + Options that configure the trial on the subscription item. + """ + + +class InvoiceCreatePreviewParamsScheduleDetailsPhaseItemBillingThresholds( + TypedDict, +): + usage_gte: int + """ + Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)) + """ + + +class InvoiceCreatePreviewParamsScheduleDetailsPhaseItemDiscount(TypedDict): + coupon: NotRequired[str] + """ + ID of the coupon to create a new discount for. + """ + discount: NotRequired[str] + """ + ID of an existing discount on the object (or one of its ancestors) to reuse. + """ + discount_end: NotRequired[ + "InvoiceCreatePreviewParamsScheduleDetailsPhaseItemDiscountDiscountEnd" + ] + """ + Details to determine how long the discount should be applied for. + """ + promotion_code: NotRequired[str] + """ + ID of the promotion code to create a new discount for. + """ + + +class InvoiceCreatePreviewParamsScheduleDetailsPhaseItemDiscountDiscountEnd( + TypedDict, +): + duration: NotRequired[ + "InvoiceCreatePreviewParamsScheduleDetailsPhaseItemDiscountDiscountEndDuration" + ] + """ + Time span for the redeemed discount. + """ + timestamp: NotRequired[int] + """ + A precise Unix timestamp for the discount to end. Must be in the future. + """ + type: Literal["duration", "timestamp"] + """ + The type of calculation made to determine when the discount ends. + """ + + +class InvoiceCreatePreviewParamsScheduleDetailsPhaseItemDiscountDiscountEndDuration( + TypedDict, +): + interval: Literal["day", "month", "week", "year"] + """ + Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + """ + interval_count: int + """ + The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + """ + + +class InvoiceCreatePreviewParamsScheduleDetailsPhaseItemPriceData(TypedDict): + 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). + """ + product: str + """ + The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to. + """ + recurring: ( + "InvoiceCreatePreviewParamsScheduleDetailsPhaseItemPriceDataRecurring" + ) + """ + The recurring components of a price such as `interval` and `interval_count`. + """ + tax_behavior: NotRequired[Literal["exclusive", "inclusive", "unspecified"]] + """ + Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + """ + unit_amount: NotRequired[int] + """ + A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + """ + unit_amount_decimal: NotRequired[str] + """ + Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + """ + + +class InvoiceCreatePreviewParamsScheduleDetailsPhaseItemPriceDataRecurring( + TypedDict, +): + interval: Literal["day", "month", "week", "year"] + """ + Specifies billing frequency. Either `day`, `week`, `month` or `year`. + """ + interval_count: NotRequired[int] + """ + The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). + """ + + +class InvoiceCreatePreviewParamsScheduleDetailsPhaseItemTrial(TypedDict): + converts_to: NotRequired[List[str]] + """ + List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. + """ + type: Literal["free", "paid"] + """ + Determines the type of trial for this item. + """ + + +class InvoiceCreatePreviewParamsScheduleDetailsPhasePauseCollection(TypedDict): + behavior: Literal["keep_as_draft", "mark_uncollectible", "void"] + """ + The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. + """ + + +class InvoiceCreatePreviewParamsScheduleDetailsPhaseTransferData(TypedDict): + amount_percent: NotRequired[float] + """ + A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. + """ + destination: str + """ + ID of an existing, connected Stripe account. + """ + + +class InvoiceCreatePreviewParamsScheduleDetailsPhaseTrialSettings(TypedDict): + end_behavior: NotRequired[ + "InvoiceCreatePreviewParamsScheduleDetailsPhaseTrialSettingsEndBehavior" + ] + """ + Defines how the subscription should behave when a trial ends. + """ + + +class InvoiceCreatePreviewParamsScheduleDetailsPhaseTrialSettingsEndBehavior( + TypedDict, +): + prorate_up_front: NotRequired[Literal["defer", "include"]] + """ + Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`. + """ + + +class InvoiceCreatePreviewParamsScheduleDetailsPrebilling(TypedDict): + bill_until: NotRequired[ + "InvoiceCreatePreviewParamsScheduleDetailsPrebillingBillUntil" + ] + """ + The end of the prebilled time period. + """ + iterations: NotRequired[int] + """ + This is used to determine the number of billing cycles to prebill. + """ + + +class InvoiceCreatePreviewParamsScheduleDetailsPrebillingBillUntil(TypedDict): + amendment_end: NotRequired[ + "InvoiceCreatePreviewParamsScheduleDetailsPrebillingBillUntilAmendmentEnd" + ] + """ + End the prebilled period when a specified amendment ends. + """ + duration: NotRequired[ + "InvoiceCreatePreviewParamsScheduleDetailsPrebillingBillUntilDuration" + ] + """ + Time span for prebilling, starting from `bill_from`. + """ + timestamp: NotRequired[int] + """ + End the prebilled period at a precise integer timestamp, starting from the Unix epoch. + """ + type: Literal["amendment_end", "duration", "schedule_end", "timestamp"] + """ + Select one of several ways to pass the `bill_until` value. + """ + + +class InvoiceCreatePreviewParamsScheduleDetailsPrebillingBillUntilAmendmentEnd( + TypedDict, +): + index: int + """ + The position of the amendment in the `amendments` array at which prebilling should end. Indexes start from 0 and must be less than the total number of supplied amendments. + """ + + +class InvoiceCreatePreviewParamsScheduleDetailsPrebillingBillUntilDuration( + TypedDict, +): + interval: Literal["day", "month", "week", "year"] + """ + Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + """ + interval_count: int + """ + The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + """ + + +class InvoiceCreatePreviewParamsSubscriptionDetails(TypedDict): + billing_cycle_anchor: NotRequired["Literal['now', 'unchanged']|int"] + """ + For new subscriptions, a future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. For existing subscriptions, the value can only be set to `now` or `unchanged`. + """ + billing_mode: NotRequired[ + "InvoiceCreatePreviewParamsSubscriptionDetailsBillingMode" + ] + """ + Controls how prorations and invoices for subscriptions are calculated and orchestrated. + """ + billing_schedules: NotRequired[ + "Literal['']|List[InvoiceCreatePreviewParamsSubscriptionDetailsBillingSchedule]" + ] + """ + Sets the billing schedules for the subscription. + """ + cancel_at: NotRequired[ + "Literal['']|int|Literal['max_period_end', 'min_period_end']" + ] + """ + A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period. + """ + cancel_at_period_end: NotRequired[bool] + """ + Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. + """ + cancel_now: NotRequired[bool] + """ + This simulates the subscription being canceled or expired immediately. + """ + default_tax_rates: NotRequired["Literal['']|List[str]"] + """ + If provided, the invoice returned will preview updating or creating a subscription with these default tax rates. The default tax rates will apply to any line item that does not have `tax_rates` set. + """ + items: NotRequired[ + List["InvoiceCreatePreviewParamsSubscriptionDetailsItem"] + ] + """ + A list of up to 20 subscription items, each with an attached price. + """ + prebilling: NotRequired[ + "InvoiceCreatePreviewParamsSubscriptionDetailsPrebilling" + ] + """ + The pre-billing to apply to the subscription as a preview. + """ + proration_behavior: NotRequired[ + Literal["always_invoice", "create_prorations", "none"] + ] + """ + Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`. + """ + proration_date: NotRequired[int] + """ + If previewing an update to a subscription, and doing proration, `subscription_details.proration_date` forces the proration to be calculated as though the update was done at the specified time. The time given must be within the current subscription period and within the current phase of the schedule backing this subscription, if the schedule exists. If set, `subscription`, and one of `subscription_details.items`, or `subscription_details.trial_end` are required. Also, `subscription_details.proration_behavior` cannot be set to 'none'. + """ + resume_at: NotRequired[Literal["now"]] + """ + For paused subscriptions, setting `subscription_details.resume_at` to `now` will preview the invoice that will be generated if the subscription is resumed. + """ + start_date: NotRequired[int] + """ + Date a subscription is intended to start (can be future or past). + """ + trial_end: NotRequired["Literal['now']|int"] + """ + If provided, the invoice returned will preview updating or creating a subscription with that trial end. If set, one of `subscription_details.items` or `subscription` is required. + """ + + +class InvoiceCreatePreviewParamsSubscriptionDetailsBillingMode(TypedDict): + flexible: NotRequired[ + "InvoiceCreatePreviewParamsSubscriptionDetailsBillingModeFlexible" + ] + """ + Configure behavior for flexible billing mode. + """ + type: Literal["classic", "flexible"] + """ + Controls the calculation and orchestration of prorations and invoices for subscriptions. If no value is passed, the default is `flexible`. + """ + + +class InvoiceCreatePreviewParamsSubscriptionDetailsBillingModeFlexible( + TypedDict, +): + proration_discounts: NotRequired[Literal["included", "itemized"]] + """ + Controls how invoices and invoice items display proration amounts and discount amounts. + """ + + +class InvoiceCreatePreviewParamsSubscriptionDetailsBillingSchedule(TypedDict): + applies_to: NotRequired[ + List[ + "InvoiceCreatePreviewParamsSubscriptionDetailsBillingScheduleAppliesTo" + ] + ] + """ + Configure billing schedule differently for individual subscription items. + """ + bill_until: NotRequired[ + "InvoiceCreatePreviewParamsSubscriptionDetailsBillingScheduleBillUntil" + ] + """ + The end date for the billing schedule. + """ + key: NotRequired[str] + """ + Specify a key for the billing schedule. Must be unique to this field, alphanumeric, and up to 200 characters. If not provided, a unique key will be generated. + """ + + +class InvoiceCreatePreviewParamsSubscriptionDetailsBillingScheduleAppliesTo( + TypedDict, +): + price: NotRequired[str] + """ + The ID of the price object. + """ + type: Literal["price"] + """ + Controls which subscription items the billing schedule applies to. + """ + + +class InvoiceCreatePreviewParamsSubscriptionDetailsBillingScheduleBillUntil( + TypedDict, +): + duration: NotRequired[ + "InvoiceCreatePreviewParamsSubscriptionDetailsBillingScheduleBillUntilDuration" + ] + """ + Specifies the billing period. + """ + timestamp: NotRequired[int] + """ + The end date of the billing schedule. + """ + type: Literal["duration", "timestamp"] + """ + Describes how the billing schedule will determine the end date. Either `duration` or `timestamp`. + """ + + +class InvoiceCreatePreviewParamsSubscriptionDetailsBillingScheduleBillUntilDuration( + TypedDict, +): + interval: Literal["day", "month", "week", "year"] + """ + Specifies billing duration. Either `day`, `week`, `month` or `year`. + """ + interval_count: NotRequired[int] + """ + The multiplier applied to the interval. + """ + + +class InvoiceCreatePreviewParamsSubscriptionDetailsItem(TypedDict): + billing_thresholds: NotRequired[ + "Literal['']|InvoiceCreatePreviewParamsSubscriptionDetailsItemBillingThresholds" + ] + """ + Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. + """ + clear_usage: NotRequired[bool] + """ + Delete all usage for a given subscription item. You must pass this when deleting a usage records subscription item. `clear_usage` has no effect if the plan has a billing meter attached. + """ + deleted: NotRequired[bool] + """ + A flag that, if set to `true`, will delete the specified item. + """ + discounts: NotRequired[ + "Literal['']|List[InvoiceCreatePreviewParamsSubscriptionDetailsItemDiscount]" + ] + """ + The coupons to redeem into discounts for the subscription item. + """ + id: NotRequired[str] + """ + Subscription item to update. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + plan: NotRequired[str] + """ + Plan ID for this item, as a string. + """ + price: NotRequired[str] + """ + The ID of the price object. One of `price` or `price_data` is required. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided. + """ + price_data: NotRequired[ + "InvoiceCreatePreviewParamsSubscriptionDetailsItemPriceData" + ] + """ + Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. + """ + quantity: NotRequired[int] + """ + Quantity for this item. + """ + tax_rates: NotRequired["Literal['']|List[str]"] + """ + A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. + """ + + +class InvoiceCreatePreviewParamsSubscriptionDetailsItemBillingThresholds( + TypedDict, +): + usage_gte: int + """ + Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)) + """ + + +class InvoiceCreatePreviewParamsSubscriptionDetailsItemDiscount(TypedDict): + coupon: NotRequired[str] + """ + ID of the coupon to create a new discount for. + """ + discount: NotRequired[str] + """ + ID of an existing discount on the object (or one of its ancestors) to reuse. + """ + discount_end: NotRequired[ + "InvoiceCreatePreviewParamsSubscriptionDetailsItemDiscountDiscountEnd" + ] + """ + Details to determine how long the discount should be applied for. + """ + promotion_code: NotRequired[str] + """ + ID of the promotion code to create a new discount for. + """ + + +class InvoiceCreatePreviewParamsSubscriptionDetailsItemDiscountDiscountEnd( + TypedDict, +): + duration: NotRequired[ + "InvoiceCreatePreviewParamsSubscriptionDetailsItemDiscountDiscountEndDuration" + ] + """ + Time span for the redeemed discount. + """ + timestamp: NotRequired[int] + """ + A precise Unix timestamp for the discount to end. Must be in the future. + """ + type: Literal["duration", "timestamp"] + """ + The type of calculation made to determine when the discount ends. + """ + + +class InvoiceCreatePreviewParamsSubscriptionDetailsItemDiscountDiscountEndDuration( + TypedDict, +): + interval: Literal["day", "month", "week", "year"] + """ + Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + """ + interval_count: int + """ + The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + """ + + +class InvoiceCreatePreviewParamsSubscriptionDetailsItemPriceData(TypedDict): + 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). + """ + product: str + """ + The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to. + """ + recurring: ( + "InvoiceCreatePreviewParamsSubscriptionDetailsItemPriceDataRecurring" + ) + """ + The recurring components of a price such as `interval` and `interval_count`. + """ + tax_behavior: NotRequired[Literal["exclusive", "inclusive", "unspecified"]] + """ + Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + """ + unit_amount: NotRequired[int] + """ + A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + """ + unit_amount_decimal: NotRequired[str] + """ + Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + """ + + +class InvoiceCreatePreviewParamsSubscriptionDetailsItemPriceDataRecurring( + TypedDict, +): + interval: Literal["day", "month", "week", "year"] + """ + Specifies billing frequency. Either `day`, `week`, `month` or `year`. + """ + interval_count: NotRequired[int] + """ + The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). + """ + + +class InvoiceCreatePreviewParamsSubscriptionDetailsPrebilling(TypedDict): + iterations: int + """ + This is used to determine the number of billing cycles to prebill. + """ diff --git a/stripe/params/_invoice_delete_params.py b/stripe/params/_invoice_delete_params.py new file mode 100644 index 000000000..b619378c0 --- /dev/null +++ b/stripe/params/_invoice_delete_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions + + +class InvoiceDeleteParams(RequestOptions): + pass diff --git a/stripe/params/_invoice_finalize_invoice_params.py b/stripe/params/_invoice_finalize_invoice_params.py new file mode 100644 index 000000000..14613f6eb --- /dev/null +++ b/stripe/params/_invoice_finalize_invoice_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 InvoiceFinalizeInvoiceParams(RequestOptions): + auto_advance: NotRequired[bool] + """ + Controls whether Stripe performs [automatic collection](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection) of the invoice. If `false`, the invoice's state doesn't automatically advance without an explicit action. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_invoice_item_create_params.py b/stripe/params/_invoice_item_create_params.py new file mode 100644 index 000000000..4dd9acdb1 --- /dev/null +++ b/stripe/params/_invoice_item_create_params.py @@ -0,0 +1,174 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class InvoiceItemCreateParams(RequestOptions): + amount: NotRequired[int] + """ + The integer amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. Passing in a negative `amount` will reduce the `amount_due` on the invoice. + """ + currency: NotRequired[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). + """ + customer: NotRequired[str] + """ + The ID of the customer who will be billed when this invoice item is billed. + """ + customer_account: NotRequired[str] + """ + The ID of the account who will be billed when this invoice item is billed. + """ + description: NotRequired[str] + """ + An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking. + """ + discountable: NotRequired[bool] + """ + Controls whether discounts apply to this invoice item. Defaults to false for prorations or negative invoice items, and true for all other invoice items. + """ + discounts: NotRequired["Literal['']|List[InvoiceItemCreateParamsDiscount]"] + """ + The coupons and promotion codes to redeem into discounts for the invoice item or invoice line item. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + invoice: NotRequired[str] + """ + The ID of an existing invoice to add this invoice item to. For subscription invoices, when left blank, the invoice item will be added to the next upcoming scheduled invoice. For standalone invoices, the invoice item won't be automatically added unless you pass `pending_invoice_item_behavior: 'include'` when creating the invoice. This is useful when adding invoice items in response to an invoice.created webhook. You can only add invoice items to draft invoices and there is a maximum of 250 items per invoice. + """ + margins: NotRequired[List[str]] + """ + The ids of the margins to apply to the invoice item. When set, the `default_margins` on the invoice do not apply to this invoice item. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + period: NotRequired["InvoiceItemCreateParamsPeriod"] + """ + The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details. + """ + price_data: NotRequired["InvoiceItemCreateParamsPriceData"] + """ + Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + """ + pricing: NotRequired["InvoiceItemCreateParamsPricing"] + """ + The pricing information for the invoice item. + """ + quantity: NotRequired[int] + """ + Non-negative integer. The quantity of units for the invoice item. + """ + subscription: NotRequired[str] + """ + The ID of a subscription to add this invoice item to. When left blank, the invoice item is added to the next upcoming scheduled invoice. When set, scheduled invoices for subscriptions other than the specified subscription will ignore the invoice item. Use this when you want to express that an invoice item has been accrued within the context of a particular subscription. + """ + tax_behavior: NotRequired[Literal["exclusive", "inclusive", "unspecified"]] + """ + Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + """ + tax_code: NotRequired["Literal['']|str"] + """ + A [tax code](https://stripe.com/docs/tax/tax-categories) ID. + """ + tax_rates: NotRequired[List[str]] + """ + The tax rates which apply to the invoice item. When set, the `default_tax_rates` on the invoice do not apply to this invoice item. + """ + unit_amount_decimal: NotRequired[str] + """ + The decimal unit amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. This `unit_amount_decimal` will be multiplied by the quantity to get the full amount. Passing in a negative `unit_amount_decimal` will reduce the `amount_due` on the invoice. Accepts at most 12 decimal places. + """ + + +class InvoiceItemCreateParamsDiscount(TypedDict): + coupon: NotRequired[str] + """ + ID of the coupon to create a new discount for. + """ + discount: NotRequired[str] + """ + ID of an existing discount on the object (or one of its ancestors) to reuse. + """ + discount_end: NotRequired["InvoiceItemCreateParamsDiscountDiscountEnd"] + """ + Details to determine how long the discount should be applied for. + """ + promotion_code: NotRequired[str] + """ + ID of the promotion code to create a new discount for. + """ + + +class InvoiceItemCreateParamsDiscountDiscountEnd(TypedDict): + duration: NotRequired["InvoiceItemCreateParamsDiscountDiscountEndDuration"] + """ + Time span for the redeemed discount. + """ + timestamp: NotRequired[int] + """ + A precise Unix timestamp for the discount to end. Must be in the future. + """ + type: Literal["duration", "timestamp"] + """ + The type of calculation made to determine when the discount ends. + """ + + +class InvoiceItemCreateParamsDiscountDiscountEndDuration(TypedDict): + interval: Literal["day", "month", "week", "year"] + """ + Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + """ + interval_count: int + """ + The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + """ + + +class InvoiceItemCreateParamsPeriod(TypedDict): + end: int + """ + The end of the period, which must be greater than or equal to the start. This value is inclusive. + """ + start: int + """ + The start of the period. This value is inclusive. + """ + + +class InvoiceItemCreateParamsPriceData(TypedDict): + 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). + """ + product: str + """ + The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to. + """ + tax_behavior: NotRequired[Literal["exclusive", "inclusive", "unspecified"]] + """ + Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + """ + unit_amount: NotRequired[int] + """ + A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + """ + unit_amount_decimal: NotRequired[str] + """ + Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + """ + + +class InvoiceItemCreateParamsPricing(TypedDict): + price: NotRequired[str] + """ + The ID of the price object. + """ diff --git a/stripe/params/_invoice_item_delete_params.py b/stripe/params/_invoice_item_delete_params.py new file mode 100644 index 000000000..9a5e9f0ce --- /dev/null +++ b/stripe/params/_invoice_item_delete_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions + + +class InvoiceItemDeleteParams(RequestOptions): + pass diff --git a/stripe/params/_invoice_item_list_params.py b/stripe/params/_invoice_item_list_params.py new file mode 100644 index 000000000..2febdaaec --- /dev/null +++ b/stripe/params/_invoice_item_list_params.py @@ -0,0 +1,63 @@ +# -*- 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 InvoiceItemListParams(RequestOptions): + created: NotRequired["InvoiceItemListParamsCreated|int"] + """ + Only return invoice items that were created during the given date interval. + """ + customer: NotRequired[str] + """ + The identifier of the customer whose invoice items to return. If none is provided, all invoice items will be returned. + """ + customer_account: NotRequired[str] + """ + The identifier of the account whose invoice items to return. If none is provided, all invoice items will be returned. + """ + 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. + """ + invoice: NotRequired[str] + """ + Only return invoice items belonging to this invoice. If none is provided, all invoice items will be returned. If specifying an invoice, no customer identifier is needed. + """ + 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. + """ + pending: NotRequired[bool] + """ + Set to `true` to only show pending invoice items, which are not yet attached to any invoices. Set to `false` to only show invoice items already attached to invoices. If unspecified, no filter is applied. + """ + 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 InvoiceItemListParamsCreated(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/_invoice_item_modify_params.py b/stripe/params/_invoice_item_modify_params.py new file mode 100644 index 000000000..e8eb0d87c --- /dev/null +++ b/stripe/params/_invoice_item_modify_params.py @@ -0,0 +1,154 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class InvoiceItemModifyParams(RequestOptions): + amount: NotRequired[int] + """ + The integer amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. If you want to apply a credit to the customer's account, pass a negative amount. + """ + description: NotRequired[str] + """ + An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking. + """ + discountable: NotRequired[bool] + """ + Controls whether discounts apply to this invoice item. Defaults to false for prorations or negative invoice items, and true for all other invoice items. Cannot be set to true for prorations. + """ + discounts: NotRequired["Literal['']|List[InvoiceItemModifyParamsDiscount]"] + """ + The coupons, promotion codes & existing discounts which apply to the invoice item or invoice line item. Item discounts are applied before invoice discounts. Pass an empty string to remove previously-defined discounts. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + margins: NotRequired["Literal['']|List[str]"] + """ + The ids of the margins to apply to the invoice item. When set, the `default_margins` on the invoice do not apply to this invoice item. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + period: NotRequired["InvoiceItemModifyParamsPeriod"] + """ + The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details. + """ + price_data: NotRequired["InvoiceItemModifyParamsPriceData"] + """ + Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + """ + pricing: NotRequired["InvoiceItemModifyParamsPricing"] + """ + The pricing information for the invoice item. + """ + quantity: NotRequired[int] + """ + Non-negative integer. The quantity of units for the invoice item. + """ + tax_behavior: NotRequired[Literal["exclusive", "inclusive", "unspecified"]] + """ + Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + """ + tax_code: NotRequired["Literal['']|str"] + """ + A [tax code](https://stripe.com/docs/tax/tax-categories) ID. + """ + tax_rates: NotRequired["Literal['']|List[str]"] + """ + The tax rates which apply to the invoice item. When set, the `default_tax_rates` on the invoice do not apply to this invoice item. Pass an empty string to remove previously-defined tax rates. + """ + unit_amount_decimal: NotRequired[str] + """ + The decimal unit amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. This `unit_amount_decimal` will be multiplied by the quantity to get the full amount. Passing in a negative `unit_amount_decimal` will reduce the `amount_due` on the invoice. Accepts at most 12 decimal places. + """ + + +class InvoiceItemModifyParamsDiscount(TypedDict): + coupon: NotRequired[str] + """ + ID of the coupon to create a new discount for. + """ + discount: NotRequired[str] + """ + ID of an existing discount on the object (or one of its ancestors) to reuse. + """ + discount_end: NotRequired["InvoiceItemModifyParamsDiscountDiscountEnd"] + """ + Details to determine how long the discount should be applied for. + """ + promotion_code: NotRequired[str] + """ + ID of the promotion code to create a new discount for. + """ + + +class InvoiceItemModifyParamsDiscountDiscountEnd(TypedDict): + duration: NotRequired["InvoiceItemModifyParamsDiscountDiscountEndDuration"] + """ + Time span for the redeemed discount. + """ + timestamp: NotRequired[int] + """ + A precise Unix timestamp for the discount to end. Must be in the future. + """ + type: Literal["duration", "timestamp"] + """ + The type of calculation made to determine when the discount ends. + """ + + +class InvoiceItemModifyParamsDiscountDiscountEndDuration(TypedDict): + interval: Literal["day", "month", "week", "year"] + """ + Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + """ + interval_count: int + """ + The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + """ + + +class InvoiceItemModifyParamsPeriod(TypedDict): + end: int + """ + The end of the period, which must be greater than or equal to the start. This value is inclusive. + """ + start: int + """ + The start of the period. This value is inclusive. + """ + + +class InvoiceItemModifyParamsPriceData(TypedDict): + 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). + """ + product: str + """ + The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to. + """ + tax_behavior: NotRequired[Literal["exclusive", "inclusive", "unspecified"]] + """ + Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + """ + unit_amount: NotRequired[int] + """ + A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + """ + unit_amount_decimal: NotRequired[str] + """ + Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + """ + + +class InvoiceItemModifyParamsPricing(TypedDict): + price: NotRequired[str] + """ + The ID of the price object. + """ diff --git a/stripe/params/_invoice_item_retrieve_params.py b/stripe/params/_invoice_item_retrieve_params.py new file mode 100644 index 000000000..122342c65 --- /dev/null +++ b/stripe/params/_invoice_item_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 InvoiceItemRetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_invoice_item_update_params.py b/stripe/params/_invoice_item_update_params.py new file mode 100644 index 000000000..8d6baabbf --- /dev/null +++ b/stripe/params/_invoice_item_update_params.py @@ -0,0 +1,153 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class InvoiceItemUpdateParams(TypedDict): + amount: NotRequired[int] + """ + The integer amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. If you want to apply a credit to the customer's account, pass a negative amount. + """ + description: NotRequired[str] + """ + An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking. + """ + discountable: NotRequired[bool] + """ + Controls whether discounts apply to this invoice item. Defaults to false for prorations or negative invoice items, and true for all other invoice items. Cannot be set to true for prorations. + """ + discounts: NotRequired["Literal['']|List[InvoiceItemUpdateParamsDiscount]"] + """ + The coupons, promotion codes & existing discounts which apply to the invoice item or invoice line item. Item discounts are applied before invoice discounts. Pass an empty string to remove previously-defined discounts. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + margins: NotRequired["Literal['']|List[str]"] + """ + The ids of the margins to apply to the invoice item. When set, the `default_margins` on the invoice do not apply to this invoice item. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + period: NotRequired["InvoiceItemUpdateParamsPeriod"] + """ + The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details. + """ + price_data: NotRequired["InvoiceItemUpdateParamsPriceData"] + """ + Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + """ + pricing: NotRequired["InvoiceItemUpdateParamsPricing"] + """ + The pricing information for the invoice item. + """ + quantity: NotRequired[int] + """ + Non-negative integer. The quantity of units for the invoice item. + """ + tax_behavior: NotRequired[Literal["exclusive", "inclusive", "unspecified"]] + """ + Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + """ + tax_code: NotRequired["Literal['']|str"] + """ + A [tax code](https://stripe.com/docs/tax/tax-categories) ID. + """ + tax_rates: NotRequired["Literal['']|List[str]"] + """ + The tax rates which apply to the invoice item. When set, the `default_tax_rates` on the invoice do not apply to this invoice item. Pass an empty string to remove previously-defined tax rates. + """ + unit_amount_decimal: NotRequired[str] + """ + The decimal unit amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. This `unit_amount_decimal` will be multiplied by the quantity to get the full amount. Passing in a negative `unit_amount_decimal` will reduce the `amount_due` on the invoice. Accepts at most 12 decimal places. + """ + + +class InvoiceItemUpdateParamsDiscount(TypedDict): + coupon: NotRequired[str] + """ + ID of the coupon to create a new discount for. + """ + discount: NotRequired[str] + """ + ID of an existing discount on the object (or one of its ancestors) to reuse. + """ + discount_end: NotRequired["InvoiceItemUpdateParamsDiscountDiscountEnd"] + """ + Details to determine how long the discount should be applied for. + """ + promotion_code: NotRequired[str] + """ + ID of the promotion code to create a new discount for. + """ + + +class InvoiceItemUpdateParamsDiscountDiscountEnd(TypedDict): + duration: NotRequired["InvoiceItemUpdateParamsDiscountDiscountEndDuration"] + """ + Time span for the redeemed discount. + """ + timestamp: NotRequired[int] + """ + A precise Unix timestamp for the discount to end. Must be in the future. + """ + type: Literal["duration", "timestamp"] + """ + The type of calculation made to determine when the discount ends. + """ + + +class InvoiceItemUpdateParamsDiscountDiscountEndDuration(TypedDict): + interval: Literal["day", "month", "week", "year"] + """ + Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + """ + interval_count: int + """ + The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + """ + + +class InvoiceItemUpdateParamsPeriod(TypedDict): + end: int + """ + The end of the period, which must be greater than or equal to the start. This value is inclusive. + """ + start: int + """ + The start of the period. This value is inclusive. + """ + + +class InvoiceItemUpdateParamsPriceData(TypedDict): + 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). + """ + product: str + """ + The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to. + """ + tax_behavior: NotRequired[Literal["exclusive", "inclusive", "unspecified"]] + """ + Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + """ + unit_amount: NotRequired[int] + """ + A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + """ + unit_amount_decimal: NotRequired[str] + """ + Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + """ + + +class InvoiceItemUpdateParamsPricing(TypedDict): + price: NotRequired[str] + """ + The ID of the price object. + """ diff --git a/stripe/params/_invoice_line_item_list_params.py b/stripe/params/_invoice_line_item_list_params.py new file mode 100644 index 000000000..c7800702b --- /dev/null +++ b/stripe/params/_invoice_line_item_list_params.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import NotRequired, TypedDict + + +class InvoiceLineItemListParams(TypedDict): + 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. + """ diff --git a/stripe/params/_invoice_line_item_update_params.py b/stripe/params/_invoice_line_item_update_params.py new file mode 100644 index 000000000..96fd03d7c --- /dev/null +++ b/stripe/params/_invoice_line_item_update_params.py @@ -0,0 +1,281 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class InvoiceLineItemUpdateParams(TypedDict): + amount: NotRequired[int] + """ + The integer amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. If you want to apply a credit to the customer's account, pass a negative amount. + """ + description: NotRequired[str] + """ + An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking. + """ + discountable: NotRequired[bool] + """ + Controls whether discounts apply to this line item. Defaults to false for prorations or negative line items, and true for all other line items. Cannot be set to true for prorations. + """ + discounts: NotRequired[ + "Literal['']|List[InvoiceLineItemUpdateParamsDiscount]" + ] + """ + The coupons, promotion codes & existing discounts which apply to the line item. Item discounts are applied before invoice discounts. Pass an empty string to remove previously-defined discounts. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + margins: NotRequired["Literal['']|List[str]"] + """ + The IDs of the margins to apply to the line item. When set, the `default_margins` on the invoice do not apply to this line item. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. For [type=subscription](https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-type) line items, the incoming metadata specified on the request is directly used to set this value, in contrast to [type=invoiceitem](api/invoices/line_item#invoice_line_item_object-type) line items, where any existing metadata on the invoice line is merged with the incoming data. + """ + period: NotRequired["InvoiceLineItemUpdateParamsPeriod"] + """ + The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details. + """ + price_data: NotRequired["InvoiceLineItemUpdateParamsPriceData"] + """ + Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + """ + pricing: NotRequired["InvoiceLineItemUpdateParamsPricing"] + """ + The pricing information for the invoice item. + """ + quantity: NotRequired[int] + """ + Non-negative integer. The quantity of units for the line item. + """ + tax_amounts: NotRequired[ + "Literal['']|List[InvoiceLineItemUpdateParamsTaxAmount]" + ] + """ + A list of up to 10 tax amounts for this line item. This can be useful if you calculate taxes on your own or use a third-party to calculate them. You cannot set tax amounts if any line item has [tax_rates](https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-tax_rates) or if the invoice has [default_tax_rates](https://stripe.com/docs/api/invoices/object#invoice_object-default_tax_rates) or uses [automatic tax](https://stripe.com/docs/tax/invoicing). Pass an empty string to remove previously defined tax amounts. + """ + tax_rates: NotRequired["Literal['']|List[str]"] + """ + The tax rates which apply to the line item. When set, the `default_tax_rates` on the invoice do not apply to this line item. Pass an empty string to remove previously-defined tax rates. + """ + + +class InvoiceLineItemUpdateParamsDiscount(TypedDict): + coupon: NotRequired[str] + """ + ID of the coupon to create a new discount for. + """ + discount: NotRequired[str] + """ + ID of an existing discount on the object (or one of its ancestors) to reuse. + """ + discount_end: NotRequired["InvoiceLineItemUpdateParamsDiscountDiscountEnd"] + """ + Details to determine how long the discount should be applied for. + """ + promotion_code: NotRequired[str] + """ + ID of the promotion code to create a new discount for. + """ + + +class InvoiceLineItemUpdateParamsDiscountDiscountEnd(TypedDict): + duration: NotRequired[ + "InvoiceLineItemUpdateParamsDiscountDiscountEndDuration" + ] + """ + Time span for the redeemed discount. + """ + timestamp: NotRequired[int] + """ + A precise Unix timestamp for the discount to end. Must be in the future. + """ + type: Literal["duration", "timestamp"] + """ + The type of calculation made to determine when the discount ends. + """ + + +class InvoiceLineItemUpdateParamsDiscountDiscountEndDuration(TypedDict): + interval: Literal["day", "month", "week", "year"] + """ + Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + """ + interval_count: int + """ + The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + """ + + +class InvoiceLineItemUpdateParamsPeriod(TypedDict): + end: int + """ + The end of the period, which must be greater than or equal to the start. This value is inclusive. + """ + start: int + """ + The start of the period. This value is inclusive. + """ + + +class InvoiceLineItemUpdateParamsPriceData(TypedDict): + 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). + """ + product: NotRequired[str] + """ + The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to. One of `product` or `product_data` is required. + """ + product_data: NotRequired[ + "InvoiceLineItemUpdateParamsPriceDataProductData" + ] + """ + Data used to generate a new [Product](https://docs.stripe.com/api/products) object inline. One of `product` or `product_data` is required. + """ + tax_behavior: NotRequired[Literal["exclusive", "inclusive", "unspecified"]] + """ + Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + """ + unit_amount: NotRequired[int] + """ + A non-negative integer in cents (or local equivalent) representing how much to charge. One of `unit_amount` or `unit_amount_decimal` is required. + """ + unit_amount_decimal: NotRequired[str] + """ + Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + """ + + +class InvoiceLineItemUpdateParamsPriceDataProductData(TypedDict): + description: NotRequired[str] + """ + The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. + """ + images: NotRequired[List[str]] + """ + A list of up to 8 URLs of images for this product, meant to be displayable to the customer. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + name: str + """ + The product's name, meant to be displayable to the customer. + """ + tax_code: NotRequired[str] + """ + A [tax code](https://stripe.com/docs/tax/tax-categories) ID. + """ + unit_label: NotRequired[str] + """ + A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal. + """ + + +class InvoiceLineItemUpdateParamsPricing(TypedDict): + price: NotRequired[str] + """ + The ID of the price object. + """ + + +class InvoiceLineItemUpdateParamsTaxAmount(TypedDict): + amount: int + """ + The amount, in cents (or local equivalent), of the tax. + """ + tax_rate_data: "InvoiceLineItemUpdateParamsTaxAmountTaxRateData" + """ + Data to find or create a TaxRate object. + + Stripe automatically creates or reuses a TaxRate object for each tax amount. If the `tax_rate_data` exactly matches a previous value, Stripe will reuse the TaxRate object. TaxRate objects created automatically by Stripe are immediately archived, do not appear in the line item's `tax_rates`, and cannot be directly added to invoices, payments, or line items. + """ + taxability_reason: NotRequired[ + Literal[ + "customer_exempt", + "not_collecting", + "not_subject_to_tax", + "not_supported", + "portion_product_exempt", + "portion_reduced_rated", + "portion_standard_rated", + "product_exempt", + "product_exempt_holiday", + "proportionally_rated", + "reduced_rated", + "reverse_charge", + "standard_rated", + "taxable_basis_reduced", + "zero_rated", + ] + ] + """ + The reasoning behind this tax, for example, if the product is tax exempt. + """ + taxable_amount: int + """ + The amount on which tax is calculated, in cents (or local equivalent). + """ + + +class InvoiceLineItemUpdateParamsTaxAmountTaxRateData(TypedDict): + country: NotRequired[str] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + description: NotRequired[str] + """ + An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers. + """ + display_name: str + """ + The display name of the tax rate, which will be shown to users. + """ + inclusive: bool + """ + This specifies if the tax rate is inclusive or exclusive. + """ + jurisdiction: NotRequired[str] + """ + The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer's invoice. + """ + jurisdiction_level: NotRequired[ + Literal["city", "country", "county", "district", "multiple", "state"] + ] + """ + The level of the jurisdiction that imposes this tax rate. + """ + percentage: float + """ + The statutory tax rate percent. This field accepts decimal values between 0 and 100 inclusive with at most 4 decimal places. To accommodate fixed-amount taxes, set the percentage to zero. Stripe will not display zero percentages on the invoice unless the `amount` of the tax is also zero. + """ + state: NotRequired[str] + """ + [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States. + """ + tax_type: NotRequired[ + Literal[ + "amusement_tax", + "communications_tax", + "gst", + "hst", + "igst", + "jct", + "lease_tax", + "pst", + "qst", + "retail_delivery_fee", + "rst", + "sales_tax", + "service_tax", + "vat", + ] + ] + """ + The high-level tax type, such as `vat` or `sales_tax`. + """ diff --git a/stripe/params/_invoice_list_lines_params.py b/stripe/params/_invoice_list_lines_params.py new file mode 100644 index 000000000..2139c9a74 --- /dev/null +++ b/stripe/params/_invoice_list_lines_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 InvoiceListLinesParams(RequestOptions): + 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. + """ diff --git a/stripe/params/_invoice_list_params.py b/stripe/params/_invoice_list_params.py new file mode 100644 index 000000000..3196156e5 --- /dev/null +++ b/stripe/params/_invoice_list_params.py @@ -0,0 +1,95 @@ +# -*- 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, TypedDict + + +class InvoiceListParams(RequestOptions): + billing_cadence: NotRequired[str] + """ + Only return invoices for the cadence specified by this billing cadence ID. + """ + collection_method: NotRequired[ + Literal["charge_automatically", "send_invoice"] + ] + """ + The collection method of the invoice to retrieve. Either `charge_automatically` or `send_invoice`. + """ + created: NotRequired["InvoiceListParamsCreated|int"] + """ + Only return invoices that were created during the given date interval. + """ + customer: NotRequired[str] + """ + Only return invoices for the customer specified by this customer ID. + """ + customer_account: NotRequired[str] + """ + Only return invoices for the account specified by this account ID. + """ + due_date: NotRequired["InvoiceListParamsDueDate|int"] + 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. + """ + status: NotRequired[ + Literal["draft", "open", "paid", "uncollectible", "void"] + ] + """ + The status of the invoice, one of `draft`, `open`, `paid`, `uncollectible`, or `void`. [Learn more](https://stripe.com/docs/billing/invoices/workflow#workflow-overview) + """ + subscription: NotRequired[str] + """ + Only return invoices for the subscription specified by this subscription ID. + """ + + +class InvoiceListParamsCreated(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) + """ + + +class InvoiceListParamsDueDate(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/_invoice_mark_uncollectible_params.py b/stripe/params/_invoice_mark_uncollectible_params.py new file mode 100644 index 000000000..c9aa57443 --- /dev/null +++ b/stripe/params/_invoice_mark_uncollectible_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 InvoiceMarkUncollectibleParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_invoice_modify_params.py b/stripe/params/_invoice_modify_params.py new file mode 100644 index 000000000..c6e4d8622 --- /dev/null +++ b/stripe/params/_invoice_modify_params.py @@ -0,0 +1,764 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class InvoiceModifyParams(RequestOptions): + account_tax_ids: NotRequired["Literal['']|List[str]"] + """ + The account tax IDs associated with the invoice. Only editable when the invoice is a draft. + """ + amounts_due: NotRequired["Literal['']|List[InvoiceModifyParamsAmountsDue]"] + """ + List of expected payments and corresponding due dates. Valid only for invoices where `collection_method=send_invoice`. + """ + application_fee_amount: NotRequired[int] + """ + A fee in cents (or local equivalent) that will be applied to the invoice and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/billing/invoices/connect#collecting-fees). + """ + auto_advance: NotRequired[bool] + """ + Controls whether Stripe performs [automatic collection](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection) of the invoice. + """ + automatic_tax: NotRequired["InvoiceModifyParamsAutomaticTax"] + """ + Settings for automatic tax lookup for this invoice. + """ + automatically_finalizes_at: NotRequired[int] + """ + The time when this invoice should be scheduled to finalize (up to 5 years in the future). The invoice is finalized at this time if it's still in draft state. To turn off automatic finalization, set `auto_advance` to false. + """ + collection_method: NotRequired[ + Literal["charge_automatically", "send_invoice"] + ] + """ + Either `charge_automatically` or `send_invoice`. This field can be updated only on `draft` invoices. + """ + custom_fields: NotRequired[ + "Literal['']|List[InvoiceModifyParamsCustomField]" + ] + """ + A list of up to 4 custom fields to be displayed on the invoice. If a value for `custom_fields` is specified, the list specified will replace the existing custom field list on this invoice. Pass an empty string to remove previously-defined fields. + """ + days_until_due: NotRequired[int] + """ + The number of days from which the invoice is created until it is due. Only valid for invoices where `collection_method=send_invoice`. This field can only be updated on `draft` invoices. + """ + default_margins: NotRequired["Literal['']|List[str]"] + """ + The ids of the margins to apply to the invoice. Can be overridden by line item `margins`. + """ + default_payment_method: NotRequired[str] + """ + ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings. + """ + default_source: NotRequired["Literal['']|str"] + """ + ID of the default payment source for the invoice. It must belong to the customer associated with the invoice and be in a chargeable state. If not set, defaults to the subscription's default source, if any, or to the customer's default source. + """ + default_tax_rates: NotRequired["Literal['']|List[str]"] + """ + The tax rates that will apply to any line item that does not have `tax_rates` set. Pass an empty string to remove previously-defined tax rates. + """ + description: NotRequired[str] + """ + An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard. + """ + discounts: NotRequired["Literal['']|List[InvoiceModifyParamsDiscount]"] + """ + The discounts that will apply to the invoice. Pass an empty string to remove previously-defined discounts. + """ + due_date: NotRequired[int] + """ + The date on which payment for this invoice is due. Only valid for invoices where `collection_method=send_invoice`. This field can only be updated on `draft` invoices. + """ + effective_at: NotRequired["Literal['']|int"] + """ + The date when this invoice is in effect. Same as `finalized_at` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the invoice PDF and receipt. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + footer: NotRequired[str] + """ + Footer to be displayed on the invoice. + """ + issuer: NotRequired["InvoiceModifyParamsIssuer"] + """ + The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + number: NotRequired["Literal['']|str"] + """ + Set the number for this invoice. If no number is present then a number will be assigned automatically when the invoice is finalized. In many markets, regulations require invoices to be unique, sequential and / or gapless. You are responsible for ensuring this is true across all your different invoicing systems in the event that you edit the invoice number using our API. If you use only Stripe for your invoices and do not change invoice numbers, Stripe handles this aspect of compliance for you automatically. + """ + on_behalf_of: NotRequired["Literal['']|str"] + """ + The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the [Invoices with Connect](https://stripe.com/docs/billing/invoices/connect) documentation for details. + """ + payment_settings: NotRequired["InvoiceModifyParamsPaymentSettings"] + """ + Configuration settings for the PaymentIntent that is generated when the invoice is finalized. + """ + rendering: NotRequired["InvoiceModifyParamsRendering"] + """ + The rendering-related settings that control how the invoice is displayed on customer-facing surfaces such as PDF and Hosted Invoice Page. + """ + shipping_cost: NotRequired["Literal['']|InvoiceModifyParamsShippingCost"] + """ + Settings for the cost of shipping for this invoice. + """ + shipping_details: NotRequired[ + "Literal['']|InvoiceModifyParamsShippingDetails" + ] + """ + Shipping details for the invoice. The Invoice PDF will use the `shipping_details` value if it is set, otherwise the PDF will render the shipping address from the customer. + """ + statement_descriptor: NotRequired[str] + """ + Extra information about a charge for the customer's credit card statement. It must contain at least one letter. If not specified and this invoice is part of a subscription, the default `statement_descriptor` will be set to the first subscription item's product's `statement_descriptor`. + """ + transfer_data: NotRequired["Literal['']|InvoiceModifyParamsTransferData"] + """ + If specified, the funds from the invoice will be transferred to the destination and the ID of the resulting transfer will be found on the invoice's charge. This will be unset if you POST an empty value. + """ + + +class InvoiceModifyParamsAmountsDue(TypedDict): + amount: int + """ + The amount in cents (or local equivalent). + """ + days_until_due: NotRequired[int] + """ + Number of days from when invoice is finalized until the payment is due. + """ + description: str + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ + due_date: NotRequired[int] + """ + Date on which a payment plan's payment is due. + """ + + +class InvoiceModifyParamsAutomaticTax(TypedDict): + enabled: bool + """ + Whether Stripe automatically computes tax on this invoice. Note that incompatible invoice items (invoice items with manually specified [tax rates](https://stripe.com/docs/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices. + """ + liability: NotRequired["InvoiceModifyParamsAutomaticTaxLiability"] + """ + The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + """ + + +class InvoiceModifyParamsAutomaticTaxLiability(TypedDict): + account: NotRequired[str] + """ + The connected account being referenced when `type` is `account`. + """ + type: Literal["account", "self"] + """ + Type of the account referenced in the request. + """ + + +class InvoiceModifyParamsCustomField(TypedDict): + name: str + """ + The name of the custom field. This may be up to 40 characters. + """ + value: str + """ + The value of the custom field. This may be up to 140 characters. + """ + + +class InvoiceModifyParamsDiscount(TypedDict): + coupon: NotRequired[str] + """ + ID of the coupon to create a new discount for. + """ + discount: NotRequired[str] + """ + ID of an existing discount on the object (or one of its ancestors) to reuse. + """ + discount_end: NotRequired["InvoiceModifyParamsDiscountDiscountEnd"] + """ + Details to determine how long the discount should be applied for. + """ + promotion_code: NotRequired[str] + """ + ID of the promotion code to create a new discount for. + """ + + +class InvoiceModifyParamsDiscountDiscountEnd(TypedDict): + duration: NotRequired["InvoiceModifyParamsDiscountDiscountEndDuration"] + """ + Time span for the redeemed discount. + """ + timestamp: NotRequired[int] + """ + A precise Unix timestamp for the discount to end. Must be in the future. + """ + type: Literal["duration", "timestamp"] + """ + The type of calculation made to determine when the discount ends. + """ + + +class InvoiceModifyParamsDiscountDiscountEndDuration(TypedDict): + interval: Literal["day", "month", "week", "year"] + """ + Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + """ + interval_count: int + """ + The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + """ + + +class InvoiceModifyParamsIssuer(TypedDict): + account: NotRequired[str] + """ + The connected account being referenced when `type` is `account`. + """ + type: Literal["account", "self"] + """ + Type of the account referenced in the request. + """ + + +class InvoiceModifyParamsPaymentSettings(TypedDict): + default_mandate: NotRequired["Literal['']|str"] + """ + ID of the mandate to be used for this invoice. It must correspond to the payment method used to pay the invoice, including the invoice's default_payment_method or default_source, if set. + """ + payment_method_options: NotRequired[ + "InvoiceModifyParamsPaymentSettingsPaymentMethodOptions" + ] + """ + Payment-method-specific configuration to provide to the invoice's PaymentIntent. + """ + payment_method_types: NotRequired[ + "Literal['']|List[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'affirm', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'boleto', 'card', 'cashapp', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'id_bank_transfer', 'ideal', 'jp_credit_transfer', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'multibanco', 'naver_pay', 'nz_bank_account', 'p24', 'payco', 'paynow', 'paypal', 'pix', 'promptpay', 'revolut_pay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'stripe_balance', 'swish', 'upi', 'us_bank_account', 'wechat_pay']]" + ] + """ + The list of payment method types (e.g. card) to provide to the invoice's PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice's default payment method, the subscription's default payment method, the customer's default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). + """ + + +class InvoiceModifyParamsPaymentSettingsPaymentMethodOptions(TypedDict): + acss_debit: NotRequired[ + "Literal['']|InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsAcssDebit" + ] + """ + If paying by `acss_debit`, this sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice's PaymentIntent. + """ + bancontact: NotRequired[ + "Literal['']|InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsBancontact" + ] + """ + If paying by `bancontact`, this sub-hash contains details about the Bancontact payment method options to pass to the invoice's PaymentIntent. + """ + card: NotRequired[ + "Literal['']|InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsCard" + ] + """ + If paying by `card`, this sub-hash contains details about the Card payment method options to pass to the invoice's PaymentIntent. + """ + customer_balance: NotRequired[ + "Literal['']|InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsCustomerBalance" + ] + """ + If paying by `customer_balance`, this sub-hash contains details about the Bank transfer payment method options to pass to the invoice's PaymentIntent. + """ + id_bank_transfer: NotRequired[ + "Literal['']|InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsIdBankTransfer" + ] + """ + If paying by `id_bank_transfer`, this sub-hash contains details about the Indonesia bank transfer payment method options to pass to the invoice's PaymentIntent. + """ + konbini: NotRequired[ + "Literal['']|InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsKonbini" + ] + """ + If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice's PaymentIntent. + """ + pix: NotRequired[ + "Literal['']|InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsPix" + ] + """ + If paying by `pix`, this sub-hash contains details about the Pix payment method options to pass to the invoice's PaymentIntent. + """ + sepa_debit: NotRequired[ + "Literal['']|InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsSepaDebit" + ] + """ + If paying by `sepa_debit`, this sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice's PaymentIntent. + """ + upi: NotRequired[ + "Literal['']|InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsUpi" + ] + """ + If paying by `upi`, this sub-hash contains details about the UPI payment method options to pass to the invoice's PaymentIntent. + """ + us_bank_account: NotRequired[ + "Literal['']|InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsUsBankAccount" + ] + """ + If paying by `us_bank_account`, this sub-hash contains details about the ACH direct debit payment method options to pass to the invoice's PaymentIntent. + """ + + +class InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsAcssDebit( + TypedDict, +): + mandate_options: NotRequired[ + "InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions" + ] + """ + Additional fields for Mandate creation + """ + verification_method: NotRequired[ + Literal["automatic", "instant", "microdeposits"] + ] + """ + Verification method for the intent + """ + + +class InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions( + TypedDict, +): + transaction_type: NotRequired[Literal["business", "personal"]] + """ + Transaction type of the mandate. + """ + + +class InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsBancontact( + TypedDict, +): + preferred_language: NotRequired[Literal["de", "en", "fr", "nl"]] + """ + Preferred language of the Bancontact authorization page that the customer is redirected to. + """ + + +class InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsCard(TypedDict): + installments: NotRequired[ + "InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsCardInstallments" + ] + """ + Installment configuration for payments attempted on this invoice. + + For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments). + """ + request_three_d_secure: NotRequired[ + Literal["any", "automatic", "challenge"] + ] + """ + We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + """ + + +class InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsCardInstallments( + TypedDict, +): + enabled: NotRequired[bool] + """ + Setting to true enables installments for this invoice. + Setting to false will prevent any selected plan from applying to a payment. + """ + plan: NotRequired[ + "Literal['']|InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsCardInstallmentsPlan" + ] + """ + The selected installment plan to use for this invoice. + """ + + +class InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsCardInstallmentsPlan( + TypedDict, +): + count: NotRequired[int] + """ + For `fixed_count` installment plans, this is required. It represents the number of installment payments your customer will make to their credit card. + """ + interval: NotRequired[Literal["month"]] + """ + For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card. + One of `month`. + """ + type: Literal["bonus", "fixed_count", "revolving"] + """ + Type of installment plan, one of `fixed_count`, `bonus`, or `revolving`. + """ + + +class InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsCustomerBalance( + TypedDict, +): + bank_transfer: NotRequired[ + "InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransfer" + ] + """ + Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. + """ + funding_type: NotRequired[str] + """ + The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. + """ + + +class InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransfer( + TypedDict, +): + eu_bank_transfer: NotRequired[ + "InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer" + ] + """ + Configuration for eu_bank_transfer funding type. + """ + type: NotRequired[str] + """ + The bank transfer type that can be used for funding. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. + """ + + +class InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer( + TypedDict, +): + country: str + """ + The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. + """ + + +class InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsIdBankTransfer( + TypedDict, +): + pass + + +class InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsKonbini(TypedDict): + pass + + +class InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsPix(TypedDict): + amount_includes_iof: NotRequired[Literal["always", "never"]] + """ + Determines if the amount includes the IOF tax. Defaults to `never`. + """ + + +class InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsSepaDebit( + TypedDict, +): + pass + + +class InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsUpi(TypedDict): + mandate_options: NotRequired[ + "InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsUpiMandateOptions" + ] + """ + Configuration options for setting up an eMandate + """ + + +class InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsUpiMandateOptions( + TypedDict, +): + amount: NotRequired[int] + """ + Amount to be charged for future payments. + """ + amount_type: NotRequired[Literal["fixed", "maximum"]] + """ + One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. + """ + description: NotRequired[str] + """ + A description of the mandate or subscription that is meant to be displayed to the customer. + """ + end_date: NotRequired[int] + """ + End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. + """ + + +class InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsUsBankAccount( + TypedDict, +): + financial_connections: NotRequired[ + "InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections" + ] + """ + Additional fields for Financial Connections Session creation + """ + verification_method: NotRequired[ + Literal["automatic", "instant", "microdeposits"] + ] + """ + Verification method for the intent + """ + + +class InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections( + TypedDict, +): + filters: NotRequired[ + "InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters" + ] + """ + Provide filters for the linked accounts that the customer can select for the payment method. + """ + permissions: NotRequired[ + List[ + Literal["balances", "ownership", "payment_method", "transactions"] + ] + ] + """ + The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. + """ + prefetch: NotRequired[ + List[ + Literal[ + "balances", "inferred_balances", "ownership", "transactions" + ] + ] + ] + """ + List of data features that you would like to retrieve upon account creation. + """ + + +class InvoiceModifyParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters( + TypedDict, +): + account_subcategories: NotRequired[List[Literal["checking", "savings"]]] + """ + The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`. + """ + institution: NotRequired[str] + """ + ID of the institution to use to filter for selectable accounts. + """ + + +class InvoiceModifyParamsRendering(TypedDict): + amount_tax_display: NotRequired[ + "Literal['']|Literal['exclude_tax', 'include_inclusive_tax']" + ] + """ + How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One of `exclude_tax` or `include_inclusive_tax`. `include_inclusive_tax` will include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. `exclude_tax` will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts. + """ + pdf: NotRequired["InvoiceModifyParamsRenderingPdf"] + """ + Invoice pdf rendering options + """ + template: NotRequired[str] + """ + ID of the invoice rendering template to use for this invoice. + """ + template_version: NotRequired["Literal['']|int"] + """ + The specific version of invoice rendering template to use for this invoice. + """ + + +class InvoiceModifyParamsRenderingPdf(TypedDict): + page_size: NotRequired[Literal["a4", "auto", "letter"]] + """ + Page size for invoice PDF. Can be set to `a4`, `letter`, or `auto`. + If set to `auto`, invoice PDF page size defaults to `a4` for customers with + Japanese locale and `letter` for customers with other locales. + """ + + +class InvoiceModifyParamsShippingCost(TypedDict): + shipping_rate: NotRequired[str] + """ + The ID of the shipping rate to use for this order. + """ + shipping_rate_data: NotRequired[ + "InvoiceModifyParamsShippingCostShippingRateData" + ] + """ + Parameters to create a new ad-hoc shipping rate for this order. + """ + + +class InvoiceModifyParamsShippingCostShippingRateData(TypedDict): + delivery_estimate: NotRequired[ + "InvoiceModifyParamsShippingCostShippingRateDataDeliveryEstimate" + ] + """ + The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions. + """ + display_name: str + """ + The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions. + """ + fixed_amount: NotRequired[ + "InvoiceModifyParamsShippingCostShippingRateDataFixedAmount" + ] + """ + Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + tax_behavior: NotRequired[Literal["exclusive", "inclusive", "unspecified"]] + """ + Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + """ + tax_code: NotRequired[str] + """ + A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`. + """ + type: NotRequired[Literal["fixed_amount"]] + """ + The type of calculation to use on the shipping rate. + """ + + +class InvoiceModifyParamsShippingCostShippingRateDataDeliveryEstimate( + TypedDict, +): + maximum: NotRequired[ + "InvoiceModifyParamsShippingCostShippingRateDataDeliveryEstimateMaximum" + ] + """ + The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite. + """ + minimum: NotRequired[ + "InvoiceModifyParamsShippingCostShippingRateDataDeliveryEstimateMinimum" + ] + """ + The lower bound of the estimated range. If empty, represents no lower bound. + """ + + +class InvoiceModifyParamsShippingCostShippingRateDataDeliveryEstimateMaximum( + TypedDict, +): + unit: Literal["business_day", "day", "hour", "month", "week"] + """ + A unit of time. + """ + value: int + """ + Must be greater than 0. + """ + + +class InvoiceModifyParamsShippingCostShippingRateDataDeliveryEstimateMinimum( + TypedDict, +): + unit: Literal["business_day", "day", "hour", "month", "week"] + """ + A unit of time. + """ + value: int + """ + Must be greater than 0. + """ + + +class InvoiceModifyParamsShippingCostShippingRateDataFixedAmount(TypedDict): + amount: int + """ + A non-negative integer in cents representing how much to charge. + """ + 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). + """ + currency_options: NotRequired[ + Dict[ + str, + "InvoiceModifyParamsShippingCostShippingRateDataFixedAmountCurrencyOptions", + ] + ] + """ + Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). + """ + + +class InvoiceModifyParamsShippingCostShippingRateDataFixedAmountCurrencyOptions( + TypedDict, +): + amount: int + """ + A non-negative integer in cents representing how much to charge. + """ + tax_behavior: NotRequired[Literal["exclusive", "inclusive", "unspecified"]] + """ + Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + """ + + +class InvoiceModifyParamsShippingDetails(TypedDict): + address: "InvoiceModifyParamsShippingDetailsAddress" + """ + Shipping address + """ + name: str + """ + Recipient name. + """ + phone: NotRequired["Literal['']|str"] + """ + Recipient phone (including extension) + """ + + +class InvoiceModifyParamsShippingDetailsAddress(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. + """ + + +class InvoiceModifyParamsTransferData(TypedDict): + amount: NotRequired[int] + """ + The amount that will be transferred automatically when the invoice is paid. If no amount is set, the full amount is transferred. + """ + destination: str + """ + ID of an existing, connected Stripe account. + """ diff --git a/stripe/params/_invoice_pay_params.py b/stripe/params/_invoice_pay_params.py new file mode 100644 index 000000000..2e7735a37 --- /dev/null +++ b/stripe/params/_invoice_pay_params.py @@ -0,0 +1,38 @@ +# -*- 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 InvoicePayParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + forgive: NotRequired[bool] + """ + In cases where the source used to pay the invoice has insufficient funds, passing `forgive=true` controls whether a charge should be attempted for the full amount available on the source, up to the amount to fully pay the invoice. This effectively forgives the difference between the amount available on the source and the amount due. + + Passing `forgive=false` will fail the charge if the source hasn't been pre-funded with the right amount. An example for this case is with ACH Credit Transfers and wires: if the amount wired is less than the amount due by a small amount, you might want to forgive the difference. Defaults to `false`. + """ + mandate: NotRequired["Literal['']|str"] + """ + ID of the mandate to be used for this invoice. It must correspond to the payment method used to pay the invoice, including the payment_method param or the invoice's default_payment_method or default_source, if set. + """ + off_session: NotRequired[bool] + """ + Indicates if a customer is on or off-session while an invoice payment is attempted. Defaults to `true` (off-session). + """ + paid_out_of_band: NotRequired[bool] + """ + Boolean representing whether an invoice is paid outside of Stripe. This will result in no charge being made. Defaults to `false`. + """ + payment_method: NotRequired[str] + """ + A PaymentMethod to be charged. The PaymentMethod must be the ID of a PaymentMethod belonging to the customer associated with the invoice being paid. + """ + source: NotRequired[str] + """ + A payment source to be charged. The source must be the ID of a source belonging to the customer associated with the invoice being paid. + """ diff --git a/stripe/params/_invoice_payment_list_params.py b/stripe/params/_invoice_payment_list_params.py new file mode 100644 index 000000000..cf5327031 --- /dev/null +++ b/stripe/params/_invoice_payment_list_params.py @@ -0,0 +1,51 @@ +# -*- 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, TypedDict + + +class InvoicePaymentListParams(RequestOptions): + 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. + """ + invoice: NotRequired[str] + """ + The identifier of the invoice whose payments to return. + """ + 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. + """ + payment: NotRequired["InvoicePaymentListParamsPayment"] + """ + The payment details of the invoice payments to return. + """ + 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. + """ + status: NotRequired[Literal["canceled", "open", "paid"]] + """ + The status of the invoice payments to return. + """ + + +class InvoicePaymentListParamsPayment(TypedDict): + payment_intent: NotRequired[str] + """ + Only return invoice payments associated by this payment intent ID. + """ + payment_record: NotRequired[str] + """ + Only return invoice payments associated by this payment record ID. + """ + type: Literal["payment_intent", "payment_record"] + """ + Only return invoice payments associated by this payment type. + """ diff --git a/stripe/params/_invoice_payment_retrieve_params.py b/stripe/params/_invoice_payment_retrieve_params.py new file mode 100644 index 000000000..c0096c5a2 --- /dev/null +++ b/stripe/params/_invoice_payment_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 InvoicePaymentRetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_invoice_remove_lines_params.py b/stripe/params/_invoice_remove_lines_params.py new file mode 100644 index 000000000..b6796164e --- /dev/null +++ b/stripe/params/_invoice_remove_lines_params.py @@ -0,0 +1,31 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class InvoiceRemoveLinesParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + invoice_metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + lines: List["InvoiceRemoveLinesParamsLine"] + """ + The line items to remove. + """ + + +class InvoiceRemoveLinesParamsLine(TypedDict): + behavior: Literal["delete", "unassign"] + """ + Either `delete` or `unassign`. Deleted line items are permanently deleted. Unassigned line items can be reassigned to an invoice. + """ + id: str + """ + ID of an existing line item to remove from this invoice. + """ diff --git a/stripe/params/_invoice_rendering_template_archive_params.py b/stripe/params/_invoice_rendering_template_archive_params.py new file mode 100644 index 000000000..cdcf6bd91 --- /dev/null +++ b/stripe/params/_invoice_rendering_template_archive_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 InvoiceRenderingTemplateArchiveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_invoice_rendering_template_list_params.py b/stripe/params/_invoice_rendering_template_list_params.py new file mode 100644 index 000000000..b50b24c5c --- /dev/null +++ b/stripe/params/_invoice_rendering_template_list_params.py @@ -0,0 +1,25 @@ +# -*- 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 InvoiceRenderingTemplateListParams(RequestOptions): + 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. + """ + status: NotRequired[Literal["active", "archived"]] diff --git a/stripe/params/_invoice_rendering_template_retrieve_params.py b/stripe/params/_invoice_rendering_template_retrieve_params.py new file mode 100644 index 000000000..20692e768 --- /dev/null +++ b/stripe/params/_invoice_rendering_template_retrieve_params.py @@ -0,0 +1,13 @@ +# -*- 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 InvoiceRenderingTemplateRetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + version: NotRequired[int] diff --git a/stripe/params/_invoice_rendering_template_unarchive_params.py b/stripe/params/_invoice_rendering_template_unarchive_params.py new file mode 100644 index 000000000..3408ed102 --- /dev/null +++ b/stripe/params/_invoice_rendering_template_unarchive_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 InvoiceRenderingTemplateUnarchiveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_invoice_retrieve_params.py b/stripe/params/_invoice_retrieve_params.py new file mode 100644 index 000000000..fe75326cd --- /dev/null +++ b/stripe/params/_invoice_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 InvoiceRetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_invoice_search_params.py b/stripe/params/_invoice_search_params.py new file mode 100644 index 000000000..1ee516f8f --- /dev/null +++ b/stripe/params/_invoice_search_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 InvoiceSearchParams(RequestOptions): + 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. + """ + page: NotRequired[str] + """ + A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + """ + query: str + """ + The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for invoices](https://stripe.com/docs/search#query-fields-for-invoices). + """ diff --git a/stripe/params/_invoice_send_invoice_params.py b/stripe/params/_invoice_send_invoice_params.py new file mode 100644 index 000000000..e830d69c4 --- /dev/null +++ b/stripe/params/_invoice_send_invoice_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 InvoiceSendInvoiceParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_invoice_update_lines_params.py b/stripe/params/_invoice_update_lines_params.py new file mode 100644 index 000000000..2c9ce811c --- /dev/null +++ b/stripe/params/_invoice_update_lines_params.py @@ -0,0 +1,299 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class InvoiceUpdateLinesParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + invoice_metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. For [type=subscription](https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-type) line items, the incoming metadata specified on the request is directly used to set this value, in contrast to [type=invoiceitem](api/invoices/line_item#invoice_line_item_object-type) line items, where any existing metadata on the invoice line is merged with the incoming data. + """ + lines: List["InvoiceUpdateLinesParamsLine"] + """ + The line items to update. + """ + + +class InvoiceUpdateLinesParamsLine(TypedDict): + amount: NotRequired[int] + """ + The integer amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. If you want to apply a credit to the customer's account, pass a negative amount. + """ + description: NotRequired[str] + """ + An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking. + """ + discountable: NotRequired[bool] + """ + Controls whether discounts apply to this line item. Defaults to false for prorations or negative line items, and true for all other line items. Cannot be set to true for prorations. + """ + discounts: NotRequired[ + "Literal['']|List[InvoiceUpdateLinesParamsLineDiscount]" + ] + """ + The coupons, promotion codes & existing discounts which apply to the line item. Item discounts are applied before invoice discounts. Pass an empty string to remove previously-defined discounts. + """ + id: str + """ + ID of an existing line item on the invoice. + """ + margins: NotRequired["Literal['']|List[str]"] + """ + The IDs of the margins to apply to the line item. When set, the `default_margins` on the invoice do not apply to this line item. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. For [type=subscription](https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-type) line items, the incoming metadata specified on the request is directly used to set this value, in contrast to [type=invoiceitem](api/invoices/line_item#invoice_line_item_object-type) line items, where any existing metadata on the invoice line is merged with the incoming data. + """ + period: NotRequired["InvoiceUpdateLinesParamsLinePeriod"] + """ + The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details. + """ + price_data: NotRequired["InvoiceUpdateLinesParamsLinePriceData"] + """ + Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + """ + pricing: NotRequired["InvoiceUpdateLinesParamsLinePricing"] + """ + The pricing information for the invoice item. + """ + quantity: NotRequired[int] + """ + Non-negative integer. The quantity of units for the line item. + """ + tax_amounts: NotRequired[ + "Literal['']|List[InvoiceUpdateLinesParamsLineTaxAmount]" + ] + """ + A list of up to 10 tax amounts for this line item. This can be useful if you calculate taxes on your own or use a third-party to calculate them. You cannot set tax amounts if any line item has [tax_rates](https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-tax_rates) or if the invoice has [default_tax_rates](https://stripe.com/docs/api/invoices/object#invoice_object-default_tax_rates) or uses [automatic tax](https://stripe.com/docs/tax/invoicing). Pass an empty string to remove previously defined tax amounts. + """ + tax_rates: NotRequired["Literal['']|List[str]"] + """ + The tax rates which apply to the line item. When set, the `default_tax_rates` on the invoice do not apply to this line item. Pass an empty string to remove previously-defined tax rates. + """ + + +class InvoiceUpdateLinesParamsLineDiscount(TypedDict): + coupon: NotRequired[str] + """ + ID of the coupon to create a new discount for. + """ + discount: NotRequired[str] + """ + ID of an existing discount on the object (or one of its ancestors) to reuse. + """ + discount_end: NotRequired[ + "InvoiceUpdateLinesParamsLineDiscountDiscountEnd" + ] + """ + Details to determine how long the discount should be applied for. + """ + promotion_code: NotRequired[str] + """ + ID of the promotion code to create a new discount for. + """ + + +class InvoiceUpdateLinesParamsLineDiscountDiscountEnd(TypedDict): + duration: NotRequired[ + "InvoiceUpdateLinesParamsLineDiscountDiscountEndDuration" + ] + """ + Time span for the redeemed discount. + """ + timestamp: NotRequired[int] + """ + A precise Unix timestamp for the discount to end. Must be in the future. + """ + type: Literal["duration", "timestamp"] + """ + The type of calculation made to determine when the discount ends. + """ + + +class InvoiceUpdateLinesParamsLineDiscountDiscountEndDuration(TypedDict): + interval: Literal["day", "month", "week", "year"] + """ + Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + """ + interval_count: int + """ + The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + """ + + +class InvoiceUpdateLinesParamsLinePeriod(TypedDict): + end: int + """ + The end of the period, which must be greater than or equal to the start. This value is inclusive. + """ + start: int + """ + The start of the period. This value is inclusive. + """ + + +class InvoiceUpdateLinesParamsLinePriceData(TypedDict): + 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). + """ + product: NotRequired[str] + """ + The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to. One of `product` or `product_data` is required. + """ + product_data: NotRequired[ + "InvoiceUpdateLinesParamsLinePriceDataProductData" + ] + """ + Data used to generate a new [Product](https://docs.stripe.com/api/products) object inline. One of `product` or `product_data` is required. + """ + tax_behavior: NotRequired[Literal["exclusive", "inclusive", "unspecified"]] + """ + Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + """ + unit_amount: NotRequired[int] + """ + A non-negative integer in cents (or local equivalent) representing how much to charge. One of `unit_amount` or `unit_amount_decimal` is required. + """ + unit_amount_decimal: NotRequired[str] + """ + Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + """ + + +class InvoiceUpdateLinesParamsLinePriceDataProductData(TypedDict): + description: NotRequired[str] + """ + The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. + """ + images: NotRequired[List[str]] + """ + A list of up to 8 URLs of images for this product, meant to be displayable to the customer. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + name: str + """ + The product's name, meant to be displayable to the customer. + """ + tax_code: NotRequired[str] + """ + A [tax code](https://stripe.com/docs/tax/tax-categories) ID. + """ + unit_label: NotRequired[str] + """ + A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal. + """ + + +class InvoiceUpdateLinesParamsLinePricing(TypedDict): + price: NotRequired[str] + """ + The ID of the price object. + """ + + +class InvoiceUpdateLinesParamsLineTaxAmount(TypedDict): + amount: int + """ + The amount, in cents (or local equivalent), of the tax. + """ + tax_rate_data: "InvoiceUpdateLinesParamsLineTaxAmountTaxRateData" + """ + Data to find or create a TaxRate object. + + Stripe automatically creates or reuses a TaxRate object for each tax amount. If the `tax_rate_data` exactly matches a previous value, Stripe will reuse the TaxRate object. TaxRate objects created automatically by Stripe are immediately archived, do not appear in the line item's `tax_rates`, and cannot be directly added to invoices, payments, or line items. + """ + taxability_reason: NotRequired[ + Literal[ + "customer_exempt", + "not_collecting", + "not_subject_to_tax", + "not_supported", + "portion_product_exempt", + "portion_reduced_rated", + "portion_standard_rated", + "product_exempt", + "product_exempt_holiday", + "proportionally_rated", + "reduced_rated", + "reverse_charge", + "standard_rated", + "taxable_basis_reduced", + "zero_rated", + ] + ] + """ + The reasoning behind this tax, for example, if the product is tax exempt. + """ + taxable_amount: int + """ + The amount on which tax is calculated, in cents (or local equivalent). + """ + + +class InvoiceUpdateLinesParamsLineTaxAmountTaxRateData(TypedDict): + country: NotRequired[str] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + description: NotRequired[str] + """ + An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers. + """ + display_name: str + """ + The display name of the tax rate, which will be shown to users. + """ + inclusive: bool + """ + This specifies if the tax rate is inclusive or exclusive. + """ + jurisdiction: NotRequired[str] + """ + The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer's invoice. + """ + jurisdiction_level: NotRequired[ + Literal["city", "country", "county", "district", "multiple", "state"] + ] + """ + The level of the jurisdiction that imposes this tax rate. + """ + percentage: float + """ + The statutory tax rate percent. This field accepts decimal values between 0 and 100 inclusive with at most 4 decimal places. To accommodate fixed-amount taxes, set the percentage to zero. Stripe will not display zero percentages on the invoice unless the `amount` of the tax is also zero. + """ + state: NotRequired[str] + """ + [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States. + """ + tax_type: NotRequired[ + Literal[ + "amusement_tax", + "communications_tax", + "gst", + "hst", + "igst", + "jct", + "lease_tax", + "pst", + "qst", + "retail_delivery_fee", + "rst", + "sales_tax", + "service_tax", + "vat", + ] + ] + """ + The high-level tax type, such as `vat` or `sales_tax`. + """ diff --git a/stripe/params/_invoice_update_params.py b/stripe/params/_invoice_update_params.py new file mode 100644 index 000000000..961d72f89 --- /dev/null +++ b/stripe/params/_invoice_update_params.py @@ -0,0 +1,763 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class InvoiceUpdateParams(TypedDict): + account_tax_ids: NotRequired["Literal['']|List[str]"] + """ + The account tax IDs associated with the invoice. Only editable when the invoice is a draft. + """ + amounts_due: NotRequired["Literal['']|List[InvoiceUpdateParamsAmountsDue]"] + """ + List of expected payments and corresponding due dates. Valid only for invoices where `collection_method=send_invoice`. + """ + application_fee_amount: NotRequired[int] + """ + A fee in cents (or local equivalent) that will be applied to the invoice and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/billing/invoices/connect#collecting-fees). + """ + auto_advance: NotRequired[bool] + """ + Controls whether Stripe performs [automatic collection](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection) of the invoice. + """ + automatic_tax: NotRequired["InvoiceUpdateParamsAutomaticTax"] + """ + Settings for automatic tax lookup for this invoice. + """ + automatically_finalizes_at: NotRequired[int] + """ + The time when this invoice should be scheduled to finalize (up to 5 years in the future). The invoice is finalized at this time if it's still in draft state. To turn off automatic finalization, set `auto_advance` to false. + """ + collection_method: NotRequired[ + Literal["charge_automatically", "send_invoice"] + ] + """ + Either `charge_automatically` or `send_invoice`. This field can be updated only on `draft` invoices. + """ + custom_fields: NotRequired[ + "Literal['']|List[InvoiceUpdateParamsCustomField]" + ] + """ + A list of up to 4 custom fields to be displayed on the invoice. If a value for `custom_fields` is specified, the list specified will replace the existing custom field list on this invoice. Pass an empty string to remove previously-defined fields. + """ + days_until_due: NotRequired[int] + """ + The number of days from which the invoice is created until it is due. Only valid for invoices where `collection_method=send_invoice`. This field can only be updated on `draft` invoices. + """ + default_margins: NotRequired["Literal['']|List[str]"] + """ + The ids of the margins to apply to the invoice. Can be overridden by line item `margins`. + """ + default_payment_method: NotRequired[str] + """ + ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings. + """ + default_source: NotRequired["Literal['']|str"] + """ + ID of the default payment source for the invoice. It must belong to the customer associated with the invoice and be in a chargeable state. If not set, defaults to the subscription's default source, if any, or to the customer's default source. + """ + default_tax_rates: NotRequired["Literal['']|List[str]"] + """ + The tax rates that will apply to any line item that does not have `tax_rates` set. Pass an empty string to remove previously-defined tax rates. + """ + description: NotRequired[str] + """ + An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard. + """ + discounts: NotRequired["Literal['']|List[InvoiceUpdateParamsDiscount]"] + """ + The discounts that will apply to the invoice. Pass an empty string to remove previously-defined discounts. + """ + due_date: NotRequired[int] + """ + The date on which payment for this invoice is due. Only valid for invoices where `collection_method=send_invoice`. This field can only be updated on `draft` invoices. + """ + effective_at: NotRequired["Literal['']|int"] + """ + The date when this invoice is in effect. Same as `finalized_at` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the invoice PDF and receipt. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + footer: NotRequired[str] + """ + Footer to be displayed on the invoice. + """ + issuer: NotRequired["InvoiceUpdateParamsIssuer"] + """ + The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + number: NotRequired["Literal['']|str"] + """ + Set the number for this invoice. If no number is present then a number will be assigned automatically when the invoice is finalized. In many markets, regulations require invoices to be unique, sequential and / or gapless. You are responsible for ensuring this is true across all your different invoicing systems in the event that you edit the invoice number using our API. If you use only Stripe for your invoices and do not change invoice numbers, Stripe handles this aspect of compliance for you automatically. + """ + on_behalf_of: NotRequired["Literal['']|str"] + """ + The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the [Invoices with Connect](https://stripe.com/docs/billing/invoices/connect) documentation for details. + """ + payment_settings: NotRequired["InvoiceUpdateParamsPaymentSettings"] + """ + Configuration settings for the PaymentIntent that is generated when the invoice is finalized. + """ + rendering: NotRequired["InvoiceUpdateParamsRendering"] + """ + The rendering-related settings that control how the invoice is displayed on customer-facing surfaces such as PDF and Hosted Invoice Page. + """ + shipping_cost: NotRequired["Literal['']|InvoiceUpdateParamsShippingCost"] + """ + Settings for the cost of shipping for this invoice. + """ + shipping_details: NotRequired[ + "Literal['']|InvoiceUpdateParamsShippingDetails" + ] + """ + Shipping details for the invoice. The Invoice PDF will use the `shipping_details` value if it is set, otherwise the PDF will render the shipping address from the customer. + """ + statement_descriptor: NotRequired[str] + """ + Extra information about a charge for the customer's credit card statement. It must contain at least one letter. If not specified and this invoice is part of a subscription, the default `statement_descriptor` will be set to the first subscription item's product's `statement_descriptor`. + """ + transfer_data: NotRequired["Literal['']|InvoiceUpdateParamsTransferData"] + """ + If specified, the funds from the invoice will be transferred to the destination and the ID of the resulting transfer will be found on the invoice's charge. This will be unset if you POST an empty value. + """ + + +class InvoiceUpdateParamsAmountsDue(TypedDict): + amount: int + """ + The amount in cents (or local equivalent). + """ + days_until_due: NotRequired[int] + """ + Number of days from when invoice is finalized until the payment is due. + """ + description: str + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ + due_date: NotRequired[int] + """ + Date on which a payment plan's payment is due. + """ + + +class InvoiceUpdateParamsAutomaticTax(TypedDict): + enabled: bool + """ + Whether Stripe automatically computes tax on this invoice. Note that incompatible invoice items (invoice items with manually specified [tax rates](https://stripe.com/docs/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices. + """ + liability: NotRequired["InvoiceUpdateParamsAutomaticTaxLiability"] + """ + The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + """ + + +class InvoiceUpdateParamsAutomaticTaxLiability(TypedDict): + account: NotRequired[str] + """ + The connected account being referenced when `type` is `account`. + """ + type: Literal["account", "self"] + """ + Type of the account referenced in the request. + """ + + +class InvoiceUpdateParamsCustomField(TypedDict): + name: str + """ + The name of the custom field. This may be up to 40 characters. + """ + value: str + """ + The value of the custom field. This may be up to 140 characters. + """ + + +class InvoiceUpdateParamsDiscount(TypedDict): + coupon: NotRequired[str] + """ + ID of the coupon to create a new discount for. + """ + discount: NotRequired[str] + """ + ID of an existing discount on the object (or one of its ancestors) to reuse. + """ + discount_end: NotRequired["InvoiceUpdateParamsDiscountDiscountEnd"] + """ + Details to determine how long the discount should be applied for. + """ + promotion_code: NotRequired[str] + """ + ID of the promotion code to create a new discount for. + """ + + +class InvoiceUpdateParamsDiscountDiscountEnd(TypedDict): + duration: NotRequired["InvoiceUpdateParamsDiscountDiscountEndDuration"] + """ + Time span for the redeemed discount. + """ + timestamp: NotRequired[int] + """ + A precise Unix timestamp for the discount to end. Must be in the future. + """ + type: Literal["duration", "timestamp"] + """ + The type of calculation made to determine when the discount ends. + """ + + +class InvoiceUpdateParamsDiscountDiscountEndDuration(TypedDict): + interval: Literal["day", "month", "week", "year"] + """ + Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + """ + interval_count: int + """ + The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + """ + + +class InvoiceUpdateParamsIssuer(TypedDict): + account: NotRequired[str] + """ + The connected account being referenced when `type` is `account`. + """ + type: Literal["account", "self"] + """ + Type of the account referenced in the request. + """ + + +class InvoiceUpdateParamsPaymentSettings(TypedDict): + default_mandate: NotRequired["Literal['']|str"] + """ + ID of the mandate to be used for this invoice. It must correspond to the payment method used to pay the invoice, including the invoice's default_payment_method or default_source, if set. + """ + payment_method_options: NotRequired[ + "InvoiceUpdateParamsPaymentSettingsPaymentMethodOptions" + ] + """ + Payment-method-specific configuration to provide to the invoice's PaymentIntent. + """ + payment_method_types: NotRequired[ + "Literal['']|List[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'affirm', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'boleto', 'card', 'cashapp', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'id_bank_transfer', 'ideal', 'jp_credit_transfer', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'multibanco', 'naver_pay', 'nz_bank_account', 'p24', 'payco', 'paynow', 'paypal', 'pix', 'promptpay', 'revolut_pay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'stripe_balance', 'swish', 'upi', 'us_bank_account', 'wechat_pay']]" + ] + """ + The list of payment method types (e.g. card) to provide to the invoice's PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice's default payment method, the subscription's default payment method, the customer's default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). + """ + + +class InvoiceUpdateParamsPaymentSettingsPaymentMethodOptions(TypedDict): + acss_debit: NotRequired[ + "Literal['']|InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsAcssDebit" + ] + """ + If paying by `acss_debit`, this sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice's PaymentIntent. + """ + bancontact: NotRequired[ + "Literal['']|InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsBancontact" + ] + """ + If paying by `bancontact`, this sub-hash contains details about the Bancontact payment method options to pass to the invoice's PaymentIntent. + """ + card: NotRequired[ + "Literal['']|InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsCard" + ] + """ + If paying by `card`, this sub-hash contains details about the Card payment method options to pass to the invoice's PaymentIntent. + """ + customer_balance: NotRequired[ + "Literal['']|InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsCustomerBalance" + ] + """ + If paying by `customer_balance`, this sub-hash contains details about the Bank transfer payment method options to pass to the invoice's PaymentIntent. + """ + id_bank_transfer: NotRequired[ + "Literal['']|InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsIdBankTransfer" + ] + """ + If paying by `id_bank_transfer`, this sub-hash contains details about the Indonesia bank transfer payment method options to pass to the invoice's PaymentIntent. + """ + konbini: NotRequired[ + "Literal['']|InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsKonbini" + ] + """ + If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice's PaymentIntent. + """ + pix: NotRequired[ + "Literal['']|InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsPix" + ] + """ + If paying by `pix`, this sub-hash contains details about the Pix payment method options to pass to the invoice's PaymentIntent. + """ + sepa_debit: NotRequired[ + "Literal['']|InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsSepaDebit" + ] + """ + If paying by `sepa_debit`, this sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice's PaymentIntent. + """ + upi: NotRequired[ + "Literal['']|InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsUpi" + ] + """ + If paying by `upi`, this sub-hash contains details about the UPI payment method options to pass to the invoice's PaymentIntent. + """ + us_bank_account: NotRequired[ + "Literal['']|InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsUsBankAccount" + ] + """ + If paying by `us_bank_account`, this sub-hash contains details about the ACH direct debit payment method options to pass to the invoice's PaymentIntent. + """ + + +class InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsAcssDebit( + TypedDict, +): + mandate_options: NotRequired[ + "InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions" + ] + """ + Additional fields for Mandate creation + """ + verification_method: NotRequired[ + Literal["automatic", "instant", "microdeposits"] + ] + """ + Verification method for the intent + """ + + +class InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions( + TypedDict, +): + transaction_type: NotRequired[Literal["business", "personal"]] + """ + Transaction type of the mandate. + """ + + +class InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsBancontact( + TypedDict, +): + preferred_language: NotRequired[Literal["de", "en", "fr", "nl"]] + """ + Preferred language of the Bancontact authorization page that the customer is redirected to. + """ + + +class InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsCard(TypedDict): + installments: NotRequired[ + "InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsCardInstallments" + ] + """ + Installment configuration for payments attempted on this invoice. + + For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments). + """ + request_three_d_secure: NotRequired[ + Literal["any", "automatic", "challenge"] + ] + """ + We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + """ + + +class InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsCardInstallments( + TypedDict, +): + enabled: NotRequired[bool] + """ + Setting to true enables installments for this invoice. + Setting to false will prevent any selected plan from applying to a payment. + """ + plan: NotRequired[ + "Literal['']|InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsCardInstallmentsPlan" + ] + """ + The selected installment plan to use for this invoice. + """ + + +class InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsCardInstallmentsPlan( + TypedDict, +): + count: NotRequired[int] + """ + For `fixed_count` installment plans, this is required. It represents the number of installment payments your customer will make to their credit card. + """ + interval: NotRequired[Literal["month"]] + """ + For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card. + One of `month`. + """ + type: Literal["bonus", "fixed_count", "revolving"] + """ + Type of installment plan, one of `fixed_count`, `bonus`, or `revolving`. + """ + + +class InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsCustomerBalance( + TypedDict, +): + bank_transfer: NotRequired[ + "InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransfer" + ] + """ + Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. + """ + funding_type: NotRequired[str] + """ + The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. + """ + + +class InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransfer( + TypedDict, +): + eu_bank_transfer: NotRequired[ + "InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer" + ] + """ + Configuration for eu_bank_transfer funding type. + """ + type: NotRequired[str] + """ + The bank transfer type that can be used for funding. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. + """ + + +class InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer( + TypedDict, +): + country: str + """ + The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. + """ + + +class InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsIdBankTransfer( + TypedDict, +): + pass + + +class InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsKonbini(TypedDict): + pass + + +class InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsPix(TypedDict): + amount_includes_iof: NotRequired[Literal["always", "never"]] + """ + Determines if the amount includes the IOF tax. Defaults to `never`. + """ + + +class InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsSepaDebit( + TypedDict, +): + pass + + +class InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsUpi(TypedDict): + mandate_options: NotRequired[ + "InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsUpiMandateOptions" + ] + """ + Configuration options for setting up an eMandate + """ + + +class InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsUpiMandateOptions( + TypedDict, +): + amount: NotRequired[int] + """ + Amount to be charged for future payments. + """ + amount_type: NotRequired[Literal["fixed", "maximum"]] + """ + One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. + """ + description: NotRequired[str] + """ + A description of the mandate or subscription that is meant to be displayed to the customer. + """ + end_date: NotRequired[int] + """ + End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. + """ + + +class InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsUsBankAccount( + TypedDict, +): + financial_connections: NotRequired[ + "InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections" + ] + """ + Additional fields for Financial Connections Session creation + """ + verification_method: NotRequired[ + Literal["automatic", "instant", "microdeposits"] + ] + """ + Verification method for the intent + """ + + +class InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections( + TypedDict, +): + filters: NotRequired[ + "InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters" + ] + """ + Provide filters for the linked accounts that the customer can select for the payment method. + """ + permissions: NotRequired[ + List[ + Literal["balances", "ownership", "payment_method", "transactions"] + ] + ] + """ + The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. + """ + prefetch: NotRequired[ + List[ + Literal[ + "balances", "inferred_balances", "ownership", "transactions" + ] + ] + ] + """ + List of data features that you would like to retrieve upon account creation. + """ + + +class InvoiceUpdateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters( + TypedDict, +): + account_subcategories: NotRequired[List[Literal["checking", "savings"]]] + """ + The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`. + """ + institution: NotRequired[str] + """ + ID of the institution to use to filter for selectable accounts. + """ + + +class InvoiceUpdateParamsRendering(TypedDict): + amount_tax_display: NotRequired[ + "Literal['']|Literal['exclude_tax', 'include_inclusive_tax']" + ] + """ + How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One of `exclude_tax` or `include_inclusive_tax`. `include_inclusive_tax` will include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. `exclude_tax` will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts. + """ + pdf: NotRequired["InvoiceUpdateParamsRenderingPdf"] + """ + Invoice pdf rendering options + """ + template: NotRequired[str] + """ + ID of the invoice rendering template to use for this invoice. + """ + template_version: NotRequired["Literal['']|int"] + """ + The specific version of invoice rendering template to use for this invoice. + """ + + +class InvoiceUpdateParamsRenderingPdf(TypedDict): + page_size: NotRequired[Literal["a4", "auto", "letter"]] + """ + Page size for invoice PDF. Can be set to `a4`, `letter`, or `auto`. + If set to `auto`, invoice PDF page size defaults to `a4` for customers with + Japanese locale and `letter` for customers with other locales. + """ + + +class InvoiceUpdateParamsShippingCost(TypedDict): + shipping_rate: NotRequired[str] + """ + The ID of the shipping rate to use for this order. + """ + shipping_rate_data: NotRequired[ + "InvoiceUpdateParamsShippingCostShippingRateData" + ] + """ + Parameters to create a new ad-hoc shipping rate for this order. + """ + + +class InvoiceUpdateParamsShippingCostShippingRateData(TypedDict): + delivery_estimate: NotRequired[ + "InvoiceUpdateParamsShippingCostShippingRateDataDeliveryEstimate" + ] + """ + The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions. + """ + display_name: str + """ + The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions. + """ + fixed_amount: NotRequired[ + "InvoiceUpdateParamsShippingCostShippingRateDataFixedAmount" + ] + """ + Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + tax_behavior: NotRequired[Literal["exclusive", "inclusive", "unspecified"]] + """ + Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + """ + tax_code: NotRequired[str] + """ + A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`. + """ + type: NotRequired[Literal["fixed_amount"]] + """ + The type of calculation to use on the shipping rate. + """ + + +class InvoiceUpdateParamsShippingCostShippingRateDataDeliveryEstimate( + TypedDict, +): + maximum: NotRequired[ + "InvoiceUpdateParamsShippingCostShippingRateDataDeliveryEstimateMaximum" + ] + """ + The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite. + """ + minimum: NotRequired[ + "InvoiceUpdateParamsShippingCostShippingRateDataDeliveryEstimateMinimum" + ] + """ + The lower bound of the estimated range. If empty, represents no lower bound. + """ + + +class InvoiceUpdateParamsShippingCostShippingRateDataDeliveryEstimateMaximum( + TypedDict, +): + unit: Literal["business_day", "day", "hour", "month", "week"] + """ + A unit of time. + """ + value: int + """ + Must be greater than 0. + """ + + +class InvoiceUpdateParamsShippingCostShippingRateDataDeliveryEstimateMinimum( + TypedDict, +): + unit: Literal["business_day", "day", "hour", "month", "week"] + """ + A unit of time. + """ + value: int + """ + Must be greater than 0. + """ + + +class InvoiceUpdateParamsShippingCostShippingRateDataFixedAmount(TypedDict): + amount: int + """ + A non-negative integer in cents representing how much to charge. + """ + 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). + """ + currency_options: NotRequired[ + Dict[ + str, + "InvoiceUpdateParamsShippingCostShippingRateDataFixedAmountCurrencyOptions", + ] + ] + """ + Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). + """ + + +class InvoiceUpdateParamsShippingCostShippingRateDataFixedAmountCurrencyOptions( + TypedDict, +): + amount: int + """ + A non-negative integer in cents representing how much to charge. + """ + tax_behavior: NotRequired[Literal["exclusive", "inclusive", "unspecified"]] + """ + Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + """ + + +class InvoiceUpdateParamsShippingDetails(TypedDict): + address: "InvoiceUpdateParamsShippingDetailsAddress" + """ + Shipping address + """ + name: str + """ + Recipient name. + """ + phone: NotRequired["Literal['']|str"] + """ + Recipient phone (including extension) + """ + + +class InvoiceUpdateParamsShippingDetailsAddress(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. + """ + + +class InvoiceUpdateParamsTransferData(TypedDict): + amount: NotRequired[int] + """ + The amount that will be transferred automatically when the invoice is paid. If no amount is set, the full amount is transferred. + """ + destination: str + """ + ID of an existing, connected Stripe account. + """ diff --git a/stripe/params/_invoice_void_invoice_params.py b/stripe/params/_invoice_void_invoice_params.py new file mode 100644 index 000000000..d909a51ec --- /dev/null +++ b/stripe/params/_invoice_void_invoice_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 InvoiceVoidInvoiceParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_mandate_list_params.py b/stripe/params/_mandate_list_params.py new file mode 100644 index 000000000..f92b5ab4d --- /dev/null +++ b/stripe/params/_mandate_list_params.py @@ -0,0 +1,33 @@ +# -*- 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 MandateListParams(RequestOptions): + 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. + """ + on_behalf_of: NotRequired[str] + """ + The Stripe account ID that the mandates are intended for. Learn more about the [use case for connected accounts payments](https://stripe.com/docs/payments/connected-accounts). + """ + payment_method: str + 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. + """ + status: Literal["active", "inactive", "pending"] + """ + The status of the mandates to retrieve. Status indicates whether or not you can use it to initiate a payment, and can have a value of `active`, `pending`, or `inactive`. + """ diff --git a/stripe/params/_mandate_retrieve_params.py b/stripe/params/_mandate_retrieve_params.py new file mode 100644 index 000000000..5fafa6630 --- /dev/null +++ b/stripe/params/_mandate_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 MandateRetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_margin_create_params.py b/stripe/params/_margin_create_params.py new file mode 100644 index 000000000..2869defba --- /dev/null +++ b/stripe/params/_margin_create_params.py @@ -0,0 +1,28 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import NotRequired + + +class MarginCreateParams(RequestOptions): + active: NotRequired[bool] + """ + Whether the margin can be applied to invoices, invoice items, or invoice line items or not. Defaults to `true`. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + name: NotRequired[str] + """ + Name of the margin, which is displayed to customers, such as on invoices. + """ + percent_off: float + """ + Percent that will be taken off the subtotal before tax (after all other discounts and promotions) of any invoice to which the margin is applied. + """ diff --git a/stripe/params/_margin_list_params.py b/stripe/params/_margin_list_params.py new file mode 100644 index 000000000..2ea8ec295 --- /dev/null +++ b/stripe/params/_margin_list_params.py @@ -0,0 +1,28 @@ +# -*- 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 MarginListParams(RequestOptions): + active: NotRequired[bool] + """ + Only return margins that are active or inactive. For example, pass `true` to only list active margins. + """ + 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. + """ diff --git a/stripe/params/_margin_modify_params.py b/stripe/params/_margin_modify_params.py new file mode 100644 index 000000000..3c24d2a19 --- /dev/null +++ b/stripe/params/_margin_modify_params.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import NotRequired + + +class MarginModifyParams(RequestOptions): + active: NotRequired[bool] + """ + Whether the margin can be applied to invoices, invoice items, or invoice line items or not. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + name: NotRequired[str] + """ + Name of the margin, which is displayed to customers, such as on invoices. + """ diff --git a/stripe/params/_margin_retrieve_params.py b/stripe/params/_margin_retrieve_params.py new file mode 100644 index 000000000..12ac30aac --- /dev/null +++ b/stripe/params/_margin_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 MarginRetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_margin_update_params.py b/stripe/params/_margin_update_params.py new file mode 100644 index 000000000..e1594e34d --- /dev/null +++ b/stripe/params/_margin_update_params.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import Dict, List +from typing_extensions import NotRequired, TypedDict + + +class MarginUpdateParams(TypedDict): + active: NotRequired[bool] + """ + Whether the margin can be applied to invoices, invoice items, or invoice line items or not. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + name: NotRequired[str] + """ + Name of the margin, which is displayed to customers, such as on invoices. + """ diff --git a/stripe/params/_order_cancel_params.py b/stripe/params/_order_cancel_params.py new file mode 100644 index 000000000..ba99988d5 --- /dev/null +++ b/stripe/params/_order_cancel_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 OrderCancelParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_order_create_params.py b/stripe/params/_order_create_params.py new file mode 100644 index 000000000..b7aa3b710 --- /dev/null +++ b/stripe/params/_order_create_params.py @@ -0,0 +1,1409 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class OrderCreateParams(RequestOptions): + automatic_tax: NotRequired["OrderCreateParamsAutomaticTax"] + """ + Settings for automatic tax calculation for this order. + """ + billing_details: NotRequired["Literal['']|OrderCreateParamsBillingDetails"] + """ + Billing details for the customer. If a customer is provided, this will be automatically populated with values from that customer if override values are not provided. + """ + 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). + """ + customer: NotRequired[str] + """ + The customer associated with this order. + """ + description: NotRequired[str] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ + discounts: NotRequired["Literal['']|List[OrderCreateParamsDiscount]"] + """ + The coupons, promotion codes, and/or discounts to apply to the order. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + ip_address: NotRequired[str] + """ + The IP address of the purchaser for this order. + """ + line_items: List["OrderCreateParamsLineItem"] + """ + A list of line items the customer is ordering. Each line item includes information about the product, the quantity, and the resulting cost. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + payment: NotRequired["OrderCreateParamsPayment"] + """ + Payment information associated with the order, including payment settings. + """ + shipping_cost: NotRequired["Literal['']|OrderCreateParamsShippingCost"] + """ + Settings for the customer cost of shipping for this order. + """ + shipping_details: NotRequired[ + "Literal['']|OrderCreateParamsShippingDetails" + ] + """ + Shipping details for the order. + """ + tax_details: NotRequired["OrderCreateParamsTaxDetails"] + """ + Additional tax details about the purchaser to be used for this order. + """ + + +class OrderCreateParamsAutomaticTax(TypedDict): + enabled: bool + """ + Enable automatic tax calculation which will automatically compute tax rates on this order. + """ + + +class OrderCreateParamsBillingDetails(TypedDict): + address: NotRequired["OrderCreateParamsBillingDetailsAddress"] + """ + The billing address provided by the customer. + """ + email: NotRequired[str] + """ + The billing email provided by the customer. + """ + name: NotRequired[str] + """ + The billing name provided by the customer. + """ + phone: NotRequired[str] + """ + The billing phone number provided by the customer. + """ + + +class OrderCreateParamsBillingDetailsAddress(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/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 OrderCreateParamsDiscount(TypedDict): + coupon: NotRequired[str] + """ + ID of the coupon to create a new discount for. + """ + discount: NotRequired[str] + """ + ID of an existing discount on the object (or one of its ancestors) to reuse. + """ + promotion_code: NotRequired[str] + """ + ID of the promotion code to create a new discount for. + """ + + +class OrderCreateParamsLineItem(TypedDict): + description: NotRequired[str] + """ + The description for the line item. Will default to the name of the associated product. + """ + discounts: NotRequired[ + "Literal['']|List[OrderCreateParamsLineItemDiscount]" + ] + """ + The discounts applied to this line item. + """ + price: NotRequired[str] + """ + The ID of a [Price](https://docs.stripe.com/api/prices) to add to the Order. + + The `price` parameter is an alternative to using the `product` parameter. If each of your products are sold at a single price, you can set `Product.default_price` and then pass the `product` parameter when creating a line item. If your products are sold at several possible prices, use the `price` parameter to explicitly specify which one to use. + """ + price_data: NotRequired["OrderCreateParamsLineItemPriceData"] + """ + Data used to generate a new Price object inline. + + The `price_data` parameter is an alternative to using the `product` or `price` parameters. If you create a Product upfront and configure a `Product.default_price`, pass the `product` parameter when creating a line item. If you prefer not to define Products upfront, or if you charge variable prices, pass the `price_data` parameter to describe the price for this line item. + + Each time you pass `price_data` we create a Price for the Product. This Price is hidden in both the Dashboard and API lists and cannot be reused. + """ + product: NotRequired[str] + """ + The ID of a [Product](https://docs.stripe.com/api/products) to add to the Order. + + The Product must have a `default_price` specified. Otherwise, specify the price by passing the `price` or `price_data` parameter. + """ + product_data: NotRequired["OrderCreateParamsLineItemProductData"] + """ + Defines a [Product](https://docs.stripe.com/api/products) inline and adds it to the Order. + + `product_data` is an alternative to the `product` parameter. If you created a Product upfront, use the `product` parameter to refer to the existing Product. But if you prefer not to create Products upfront, pass the `product_data` parameter to define a Product inline as part of configuring the Order. + + `product_data` automatically creates a Product, just as if you had manually created the Product. If a Product with the same ID already exists, then `product_data` re-uses it to avoid duplicates. + """ + quantity: NotRequired[int] + """ + The quantity of the line item. + """ + tax_rates: NotRequired["Literal['']|List[str]"] + """ + The tax rates applied to this line item. + """ + + +class OrderCreateParamsLineItemDiscount(TypedDict): + coupon: NotRequired[str] + """ + ID of the coupon to create a new discount for. + """ + discount: NotRequired[str] + """ + ID of an existing discount on the object (or one of its ancestors) to reuse. + """ + + +class OrderCreateParamsLineItemPriceData(TypedDict): + currency: NotRequired[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). + """ + product: NotRequired[str] + """ + ID of the [Product](https://docs.stripe.com/api/products) this [Price](https://docs.stripe.com/api/prices) belongs to. + + Use this to implement a variable-pricing model in your integration. This is required if `product_data` is not specified. + """ + tax_behavior: NotRequired[Literal["exclusive", "inclusive", "unspecified"]] + """ + Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + """ + unit_amount: NotRequired[int] + """ + A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + """ + unit_amount_decimal: NotRequired[str] + """ + Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + """ + + +class OrderCreateParamsLineItemProductData(TypedDict): + description: NotRequired["Literal['']|str"] + """ + The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. + """ + id: str + """ + A unique identifier for this product. + + `product_data` automatically creates a Product with this ID. If a Product with the same ID already exists, then `product_data` re-uses it to avoid duplicates. If any of the fields in the existing Product are different from the values in `product_data`, `product_data` updates the existing Product with the new information. So set `product_data[id]` to the same string every time you sell the same product, but don't re-use the same string for different products. + """ + images: NotRequired["Literal['']|List[str]"] + """ + A list of up to 8 URLs of images for this product, meant to be displayable to the customer. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + name: str + """ + The product's name, meant to be displayable to the customer. + """ + package_dimensions: NotRequired[ + "Literal['']|OrderCreateParamsLineItemProductDataPackageDimensions" + ] + """ + The dimensions of this product for shipping purposes. + """ + shippable: NotRequired[bool] + """ + Whether this product is shipped (i.e., physical goods). + """ + tax_code: NotRequired["Literal['']|str"] + """ + A [tax code](https://stripe.com/docs/tax/tax-categories) ID. + """ + url: NotRequired["Literal['']|str"] + """ + A URL of a publicly-accessible webpage for this product. + """ + + +class OrderCreateParamsLineItemProductDataPackageDimensions(TypedDict): + height: float + """ + Height, in inches. Maximum precision is 2 decimal places. + """ + length: float + """ + Length, in inches. Maximum precision is 2 decimal places. + """ + weight: float + """ + Weight, in ounces. Maximum precision is 2 decimal places. + """ + width: float + """ + Width, in inches. Maximum precision is 2 decimal places. + """ + + +class OrderCreateParamsPayment(TypedDict): + settings: "OrderCreateParamsPaymentSettings" + """ + Settings describing how the order should configure generated PaymentIntents. + """ + + +class OrderCreateParamsPaymentSettings(TypedDict): + application_fee_amount: NotRequired[int] + """ + The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. + """ + payment_method_options: NotRequired[ + "OrderCreateParamsPaymentSettingsPaymentMethodOptions" + ] + """ + PaymentMethod-specific configuration to provide to the order's PaymentIntent. + """ + payment_method_types: NotRequired[ + List[ + Literal[ + "acss_debit", + "afterpay_clearpay", + "alipay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "card", + "customer_balance", + "eps", + "fpx", + "giropay", + "grabpay", + "ideal", + "klarna", + "link", + "oxxo", + "p24", + "paypal", + "sepa_debit", + "sofort", + "wechat_pay", + ] + ] + ] + """ + The list of [payment method types](https://stripe.com/docs/payments/payment-methods/overview) to provide to the order's PaymentIntent. Do not include this attribute if you prefer to manage your payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). + """ + return_url: NotRequired[str] + """ + The URL to redirect the customer to after they authenticate their payment. + """ + statement_descriptor: NotRequired[str] + """ + For non-card charges, you can use this value as the complete description that appears on your customers' statements. Must contain at least one letter, maximum 22 characters. + """ + statement_descriptor_suffix: NotRequired[str] + """ + Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that's set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. + """ + transfer_data: NotRequired["OrderCreateParamsPaymentSettingsTransferData"] + """ + Provides configuration for completing a transfer for the order after it is paid. + """ + + +class OrderCreateParamsPaymentSettingsPaymentMethodOptions(TypedDict): + acss_debit: NotRequired[ + "OrderCreateParamsPaymentSettingsPaymentMethodOptionsAcssDebit" + ] + """ + If paying by `acss_debit`, this sub-hash contains details about the ACSS Debit payment method options to pass to the order's PaymentIntent. + """ + afterpay_clearpay: NotRequired[ + "OrderCreateParamsPaymentSettingsPaymentMethodOptionsAfterpayClearpay" + ] + """ + If paying by `afterpay_clearpay`, this sub-hash contains details about the AfterpayClearpay payment method options to pass to the order's PaymentIntent. + """ + alipay: NotRequired[ + "OrderCreateParamsPaymentSettingsPaymentMethodOptionsAlipay" + ] + """ + If paying by `alipay`, this sub-hash contains details about the Alipay payment method options to pass to the order's PaymentIntent. + """ + bancontact: NotRequired[ + "OrderCreateParamsPaymentSettingsPaymentMethodOptionsBancontact" + ] + """ + If paying by `bancontact`, this sub-hash contains details about the Bancontact payment method options to pass to the order's PaymentIntent. + """ + card: NotRequired[ + "OrderCreateParamsPaymentSettingsPaymentMethodOptionsCard" + ] + """ + If paying by `card`, this sub-hash contains details about the Card payment method options to pass to the order's PaymentIntent. + """ + customer_balance: NotRequired[ + "OrderCreateParamsPaymentSettingsPaymentMethodOptionsCustomerBalance" + ] + """ + If paying by `customer_balance`, this sub-hash contains details about the Customer Balance payment method options to pass to the order's PaymentIntent. + """ + ideal: NotRequired[ + "OrderCreateParamsPaymentSettingsPaymentMethodOptionsIdeal" + ] + """ + If paying by `ideal`, this sub-hash contains details about the iDEAL payment method options to pass to the order's PaymentIntent. + """ + klarna: NotRequired[ + "OrderCreateParamsPaymentSettingsPaymentMethodOptionsKlarna" + ] + """ + If paying by `klarna`, this sub-hash contains details about the Klarna payment method options to pass to the order's PaymentIntent. + """ + link: NotRequired[ + "OrderCreateParamsPaymentSettingsPaymentMethodOptionsLink" + ] + """ + If paying by `link`, this sub-hash contains details about the Link payment method options to pass to the order's PaymentIntent. + """ + oxxo: NotRequired[ + "OrderCreateParamsPaymentSettingsPaymentMethodOptionsOxxo" + ] + """ + If paying by `oxxo`, this sub-hash contains details about the OXXO payment method options to pass to the order's PaymentIntent. + """ + p24: NotRequired["OrderCreateParamsPaymentSettingsPaymentMethodOptionsP24"] + """ + If paying by `p24`, this sub-hash contains details about the P24 payment method options to pass to the order's PaymentIntent. + """ + paypal: NotRequired[ + "OrderCreateParamsPaymentSettingsPaymentMethodOptionsPaypal" + ] + """ + If paying by `paypal`, this sub-hash contains details about the PayPal payment method options to pass to the order's PaymentIntent. + """ + sepa_debit: NotRequired[ + "OrderCreateParamsPaymentSettingsPaymentMethodOptionsSepaDebit" + ] + """ + If paying by `sepa_debit`, this sub-hash contains details about the SEPA Debit payment method options to pass to the order's PaymentIntent. + """ + sofort: NotRequired[ + "OrderCreateParamsPaymentSettingsPaymentMethodOptionsSofort" + ] + """ + If paying by `sofort`, this sub-hash contains details about the Sofort payment method options to pass to the order's PaymentIntent. + """ + wechat_pay: NotRequired[ + "OrderCreateParamsPaymentSettingsPaymentMethodOptionsWechatPay" + ] + """ + If paying by `wechat_pay`, this sub-hash contains details about the WeChat Pay payment method options to pass to the order's PaymentIntent. + """ + + +class OrderCreateParamsPaymentSettingsPaymentMethodOptionsAcssDebit(TypedDict): + mandate_options: NotRequired[ + "OrderCreateParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions" + ] + """ + Additional fields for Mandate creation + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session', 'on_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + target_date: NotRequired[str] + """ + Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + """ + verification_method: NotRequired[ + Literal["automatic", "instant", "microdeposits"] + ] + """ + Bank account verification method. + """ + + +class OrderCreateParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions( + TypedDict, +): + custom_mandate_url: NotRequired["Literal['']|str"] + """ + A URL for custom mandate text to render during confirmation step. + The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent, + or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent. + """ + interval_description: NotRequired[str] + """ + Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'. + """ + payment_schedule: NotRequired[Literal["combined", "interval", "sporadic"]] + """ + Payment schedule for the mandate. + """ + transaction_type: NotRequired[Literal["business", "personal"]] + """ + Transaction type of the mandate. + """ + + +class OrderCreateParamsPaymentSettingsPaymentMethodOptionsAfterpayClearpay( + TypedDict, +): + capture_method: NotRequired[ + Literal["automatic", "automatic_async", "manual"] + ] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + reference: NotRequired[str] + """ + An internal identifier or reference this payment corresponds to. The identifier is limited to 128 characters and may contain only letters, digits, underscores, backslashes and dashes. + """ + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with the payment method. + + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the order's Customer, if present, after the order's PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + + If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. + """ + + +class OrderCreateParamsPaymentSettingsPaymentMethodOptionsAlipay(TypedDict): + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class OrderCreateParamsPaymentSettingsPaymentMethodOptionsBancontact( + TypedDict +): + preferred_language: NotRequired[Literal["de", "en", "fr", "nl"]] + """ + Preferred language of the Bancontact authorization page that the customer is redirected to. + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class OrderCreateParamsPaymentSettingsPaymentMethodOptionsCard(TypedDict): + capture_method: NotRequired[ + Literal["automatic", "automatic_async", "manual"] + ] + """ + Controls when the funds will be captured from the customer's account. + """ + setup_future_usage: NotRequired[ + Literal["none", "off_session", "on_session"] + ] + """ + Indicates that you intend to make future payments with the payment method. + + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the order's Customer, if present, after the order's PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + + If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. + """ + + +class OrderCreateParamsPaymentSettingsPaymentMethodOptionsCustomerBalance( + TypedDict, +): + bank_transfer: NotRequired[ + "OrderCreateParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransfer" + ] + """ + Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. + """ + funding_type: NotRequired[Literal["bank_transfer"]] + """ + The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. + """ + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class OrderCreateParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransfer( + TypedDict, +): + eu_bank_transfer: NotRequired[ + "OrderCreateParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer" + ] + """ + Configuration for the eu_bank_transfer funding type. + """ + requested_address_types: NotRequired[ + List[ + Literal[ + "aba", "iban", "sepa", "sort_code", "spei", "swift", "zengin" + ] + ] + ] + """ + List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned. + + Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`. + """ + type: Literal[ + "eu_bank_transfer", + "gb_bank_transfer", + "jp_bank_transfer", + "mx_bank_transfer", + "us_bank_transfer", + ] + """ + The list of bank transfer types that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. + """ + + +class OrderCreateParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer( + TypedDict, +): + country: str + """ + The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. + """ + + +class OrderCreateParamsPaymentSettingsPaymentMethodOptionsIdeal(TypedDict): + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class OrderCreateParamsPaymentSettingsPaymentMethodOptionsKlarna(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + on_demand: NotRequired[ + "OrderCreateParamsPaymentSettingsPaymentMethodOptionsKlarnaOnDemand" + ] + """ + On-demand details if setting up or charging an on-demand payment. + """ + preferred_locale: NotRequired[ + Literal[ + "cs-CZ", + "da-DK", + "de-AT", + "de-CH", + "de-DE", + "el-GR", + "en-AT", + "en-AU", + "en-BE", + "en-CA", + "en-CH", + "en-CZ", + "en-DE", + "en-DK", + "en-ES", + "en-FI", + "en-FR", + "en-GB", + "en-GR", + "en-IE", + "en-IT", + "en-NL", + "en-NO", + "en-NZ", + "en-PL", + "en-PT", + "en-RO", + "en-SE", + "en-US", + "es-ES", + "es-US", + "fi-FI", + "fr-BE", + "fr-CA", + "fr-CH", + "fr-FR", + "it-CH", + "it-IT", + "nb-NO", + "nl-BE", + "nl-NL", + "pl-PL", + "pt-PT", + "ro-RO", + "sv-FI", + "sv-SE", + ] + ] + """ + Preferred language of the Klarna authorization page that the customer is redirected to + """ + setup_future_usage: NotRequired[ + Literal["none", "off_session", "on_session"] + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + subscriptions: NotRequired[ + "Literal['']|List[OrderCreateParamsPaymentSettingsPaymentMethodOptionsKlarnaSubscription]" + ] + """ + Subscription details if setting up or charging a subscription. + """ + + +class OrderCreateParamsPaymentSettingsPaymentMethodOptionsKlarnaOnDemand( + TypedDict, +): + average_amount: NotRequired[int] + """ + Your average amount value. You can use a value across your customer base, or segment based on customer type, country, etc. + """ + maximum_amount: NotRequired[int] + """ + The maximum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. + """ + minimum_amount: NotRequired[int] + """ + The lowest or minimum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. + """ + purchase_interval: NotRequired[Literal["day", "month", "week", "year"]] + """ + Interval at which the customer is making purchases + """ + purchase_interval_count: NotRequired[int] + """ + The number of `purchase_interval` between charges + """ + + +class OrderCreateParamsPaymentSettingsPaymentMethodOptionsKlarnaSubscription( + TypedDict, +): + interval: Literal["day", "month", "week", "year"] + """ + Unit of time between subscription charges. + """ + interval_count: NotRequired[int] + """ + The number of intervals (specified in the `interval` attribute) between subscription charges. For example, `interval=month` and `interval_count=3` charges every 3 months. + """ + name: NotRequired[str] + """ + Name for subscription. + """ + next_billing: NotRequired[ + "OrderCreateParamsPaymentSettingsPaymentMethodOptionsKlarnaSubscriptionNextBilling" + ] + """ + Describes the upcoming charge for this subscription. + """ + reference: str + """ + A non-customer-facing reference to correlate subscription charges in the Klarna app. Use a value that persists across subscription charges. + """ + + +class OrderCreateParamsPaymentSettingsPaymentMethodOptionsKlarnaSubscriptionNextBilling( + TypedDict, +): + amount: int + """ + The amount of the next charge for the subscription. + """ + date: str + """ + The date of the next charge for the subscription in YYYY-MM-DD format. + """ + + +class OrderCreateParamsPaymentSettingsPaymentMethodOptionsLink(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + persistent_token: NotRequired[str] + """ + [Deprecated] This is a legacy parameter that no longer has any function. + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class OrderCreateParamsPaymentSettingsPaymentMethodOptionsOxxo(TypedDict): + expires_after_days: NotRequired[int] + """ + The number of calendar days before an OXXO voucher expires. For example, if you create an OXXO voucher on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time. + """ + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class OrderCreateParamsPaymentSettingsPaymentMethodOptionsP24(TypedDict): + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + tos_shown_and_accepted: NotRequired[bool] + """ + Confirm that the payer has accepted the P24 terms and conditions. + """ + + +class OrderCreateParamsPaymentSettingsPaymentMethodOptionsPaypal(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds will be captured from the customer's account. + """ + line_items: NotRequired[ + List[ + "OrderCreateParamsPaymentSettingsPaymentMethodOptionsPaypalLineItem" + ] + ] + """ + The line items purchased by the customer. + """ + preferred_locale: NotRequired[ + Literal[ + "cs-CZ", + "da-DK", + "de-AT", + "de-DE", + "de-LU", + "el-GR", + "en-GB", + "en-US", + "es-ES", + "fi-FI", + "fr-BE", + "fr-FR", + "fr-LU", + "hu-HU", + "it-IT", + "nl-BE", + "nl-NL", + "pl-PL", + "pt-PT", + "sk-SK", + "sv-SE", + ] + ] + """ + [Preferred locale](https://stripe.com/docs/payments/paypal/supported-locales) of the PayPal checkout page that the customer is redirected to. + """ + reference: NotRequired[str] + """ + A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. + """ + reference_id: NotRequired[str] + """ + A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. + """ + risk_correlation_id: NotRequired[str] + """ + The risk correlation ID for an on-session payment using a saved PayPal payment method. + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + subsellers: NotRequired[List[str]] + """ + The Stripe connected account IDs of the sellers on the platform for this transaction (optional). Only allowed when [separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) are used. + """ + + +class OrderCreateParamsPaymentSettingsPaymentMethodOptionsPaypalLineItem( + TypedDict, +): + category: NotRequired[ + Literal["digital_goods", "donation", "physical_goods"] + ] + """ + Type of the line item. + """ + description: NotRequired[str] + """ + Description of the line item. + """ + name: str + """ + Descriptive name of the line item. + """ + quantity: int + """ + Quantity of the line item. Must be a positive number. + """ + sku: NotRequired[str] + """ + Client facing stock keeping unit, article number or similar. + """ + sold_by: NotRequired[str] + """ + The Stripe account ID of the connected account that sells the item. + """ + tax: NotRequired[ + "OrderCreateParamsPaymentSettingsPaymentMethodOptionsPaypalLineItemTax" + ] + """ + The tax information for the line item. + """ + unit_amount: int + """ + Price for a single unit of the line item in minor units. Cannot be a negative number. + """ + + +class OrderCreateParamsPaymentSettingsPaymentMethodOptionsPaypalLineItemTax( + TypedDict, +): + amount: int + """ + The tax for a single unit of the line item in minor units. Cannot be a negative number. + """ + behavior: Literal["exclusive", "inclusive"] + """ + The tax behavior for the line item. + """ + + +class OrderCreateParamsPaymentSettingsPaymentMethodOptionsSepaDebit(TypedDict): + mandate_options: NotRequired[ + "OrderCreateParamsPaymentSettingsPaymentMethodOptionsSepaDebitMandateOptions" + ] + """ + Additional fields for Mandate creation + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session', 'on_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + target_date: NotRequired[str] + """ + Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + """ + + +class OrderCreateParamsPaymentSettingsPaymentMethodOptionsSepaDebitMandateOptions( + TypedDict, +): + reference_prefix: NotRequired["Literal['']|str"] + """ + Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'. + """ + + +class OrderCreateParamsPaymentSettingsPaymentMethodOptionsSofort(TypedDict): + preferred_language: NotRequired[ + "Literal['']|Literal['de', 'en', 'es', 'fr', 'it', 'nl', 'pl']" + ] + """ + Language shown to the payer on redirect. + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class OrderCreateParamsPaymentSettingsPaymentMethodOptionsWechatPay(TypedDict): + app_id: NotRequired[str] + """ + The app ID registered with WeChat Pay. Only required when client is ios or android. + """ + client: NotRequired[Literal["android", "ios", "web"]] + """ + The client type that the end customer will pay from + """ + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class OrderCreateParamsPaymentSettingsTransferData(TypedDict): + amount: NotRequired[int] + """ + The amount that will be transferred automatically when the order is paid. If no amount is set, the full amount is transferred. There cannot be any line items with recurring prices when using this field. + """ + destination: str + """ + ID of the Connected account receiving the transfer. + """ + + +class OrderCreateParamsShippingCost(TypedDict): + shipping_rate: NotRequired[str] + """ + The ID of the shipping rate to use for this order. + """ + shipping_rate_data: NotRequired[ + "OrderCreateParamsShippingCostShippingRateData" + ] + """ + Parameters to create a new ad-hoc shipping rate for this order. + """ + + +class OrderCreateParamsShippingCostShippingRateData(TypedDict): + delivery_estimate: NotRequired[ + "OrderCreateParamsShippingCostShippingRateDataDeliveryEstimate" + ] + """ + The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions. + """ + display_name: str + """ + The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions. + """ + fixed_amount: NotRequired[ + "OrderCreateParamsShippingCostShippingRateDataFixedAmount" + ] + """ + Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + tax_behavior: NotRequired[Literal["exclusive", "inclusive", "unspecified"]] + """ + Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + """ + tax_code: NotRequired[str] + """ + A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`. + """ + type: NotRequired[Literal["fixed_amount"]] + """ + The type of calculation to use on the shipping rate. + """ + + +class OrderCreateParamsShippingCostShippingRateDataDeliveryEstimate(TypedDict): + maximum: NotRequired[ + "OrderCreateParamsShippingCostShippingRateDataDeliveryEstimateMaximum" + ] + """ + The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite. + """ + minimum: NotRequired[ + "OrderCreateParamsShippingCostShippingRateDataDeliveryEstimateMinimum" + ] + """ + The lower bound of the estimated range. If empty, represents no lower bound. + """ + + +class OrderCreateParamsShippingCostShippingRateDataDeliveryEstimateMaximum( + TypedDict, +): + unit: Literal["business_day", "day", "hour", "month", "week"] + """ + A unit of time. + """ + value: int + """ + Must be greater than 0. + """ + + +class OrderCreateParamsShippingCostShippingRateDataDeliveryEstimateMinimum( + TypedDict, +): + unit: Literal["business_day", "day", "hour", "month", "week"] + """ + A unit of time. + """ + value: int + """ + Must be greater than 0. + """ + + +class OrderCreateParamsShippingCostShippingRateDataFixedAmount(TypedDict): + amount: int + """ + A non-negative integer in cents representing how much to charge. + """ + 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). + """ + currency_options: NotRequired[ + Dict[ + str, + "OrderCreateParamsShippingCostShippingRateDataFixedAmountCurrencyOptions", + ] + ] + """ + Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). + """ + + +class OrderCreateParamsShippingCostShippingRateDataFixedAmountCurrencyOptions( + TypedDict, +): + amount: int + """ + A non-negative integer in cents representing how much to charge. + """ + tax_behavior: NotRequired[Literal["exclusive", "inclusive", "unspecified"]] + """ + Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + """ + + +class OrderCreateParamsShippingDetails(TypedDict): + address: "OrderCreateParamsShippingDetailsAddress" + """ + The shipping address for the order. + """ + name: str + """ + The name of the recipient of the order. + """ + phone: NotRequired["Literal['']|str"] + """ + The phone number (including extension) for the recipient of the order. + """ + + +class OrderCreateParamsShippingDetailsAddress(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/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 OrderCreateParamsTaxDetails(TypedDict): + tax_exempt: NotRequired["Literal['']|Literal['exempt', 'none', 'reverse']"] + """ + The purchaser's tax exemption status. One of `none`, `exempt`, or `reverse`. + """ + tax_ids: NotRequired[List["OrderCreateParamsTaxDetailsTaxId"]] + """ + The purchaser's tax IDs to be used for this order. + """ + + +class OrderCreateParamsTaxDetailsTaxId(TypedDict): + type: Literal[ + "ad_nrt", + "ae_trn", + "al_tin", + "am_tin", + "ao_tin", + "ar_cuit", + "au_abn", + "au_arn", + "aw_tin", + "az_tin", + "ba_tin", + "bb_tin", + "bd_bin", + "bf_ifu", + "bg_uic", + "bh_vat", + "bj_ifu", + "bo_tin", + "br_cnpj", + "br_cpf", + "bs_tin", + "by_tin", + "ca_bn", + "ca_gst_hst", + "ca_pst_bc", + "ca_pst_mb", + "ca_pst_sk", + "ca_qst", + "cd_nif", + "ch_uid", + "ch_vat", + "cl_tin", + "cm_niu", + "cn_tin", + "co_nit", + "cr_tin", + "cv_nif", + "de_stn", + "do_rcn", + "ec_ruc", + "eg_tin", + "es_cif", + "et_tin", + "eu_oss_vat", + "eu_vat", + "gb_vat", + "ge_vat", + "gn_nif", + "hk_br", + "hr_oib", + "hu_tin", + "id_npwp", + "il_vat", + "in_gst", + "is_vat", + "jp_cn", + "jp_rn", + "jp_trn", + "ke_pin", + "kg_tin", + "kh_tin", + "kr_brn", + "kz_bin", + "la_tin", + "li_uid", + "li_vat", + "ma_vat", + "md_vat", + "me_pib", + "mk_vat", + "mr_nif", + "mx_rfc", + "my_frp", + "my_itn", + "my_sst", + "ng_tin", + "no_vat", + "no_voec", + "np_pan", + "nz_gst", + "om_vat", + "pe_ruc", + "ph_tin", + "ro_tin", + "rs_pib", + "ru_inn", + "ru_kpp", + "sa_vat", + "sg_gst", + "sg_uen", + "si_tin", + "sn_ninea", + "sr_fin", + "sv_nit", + "th_vat", + "tj_tin", + "tr_tin", + "tw_vat", + "tz_vat", + "ua_vat", + "ug_tin", + "us_ein", + "uy_ruc", + "uz_tin", + "uz_vat", + "ve_rif", + "vn_tin", + "za_vat", + "zm_tin", + "zw_tin", + ] + """ + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `al_tin`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `aw_tin`, `az_tin`, `ba_tin`, `bb_tin`, `bd_bin`, `bf_ifu`, `bg_uic`, `bh_vat`, `bj_ifu`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cm_niu`, `cn_tin`, `co_nit`, `cr_tin`, `cv_nif`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `et_tin`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kg_tin`, `kh_tin`, `kr_brn`, `kz_bin`, `la_tin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin` + """ + value: str + """ + Value of the tax ID. + """ diff --git a/stripe/params/_order_line_item_list_params.py b/stripe/params/_order_line_item_list_params.py new file mode 100644 index 000000000..cf3d38bd7 --- /dev/null +++ b/stripe/params/_order_line_item_list_params.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import NotRequired, TypedDict + + +class OrderLineItemListParams(TypedDict): + 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. + """ diff --git a/stripe/params/_order_list_line_items_params.py b/stripe/params/_order_list_line_items_params.py new file mode 100644 index 000000000..6cda382a7 --- /dev/null +++ b/stripe/params/_order_list_line_items_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 OrderListLineItemsParams(RequestOptions): + 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. + """ diff --git a/stripe/params/_order_list_params.py b/stripe/params/_order_list_params.py new file mode 100644 index 000000000..54f604437 --- /dev/null +++ b/stripe/params/_order_list_params.py @@ -0,0 +1,28 @@ +# -*- 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 OrderListParams(RequestOptions): + customer: NotRequired[str] + """ + Only return orders for the given customer. + """ + 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. + """ diff --git a/stripe/params/_order_modify_params.py b/stripe/params/_order_modify_params.py new file mode 100644 index 000000000..cb7902dc1 --- /dev/null +++ b/stripe/params/_order_modify_params.py @@ -0,0 +1,1417 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class OrderModifyParams(RequestOptions): + automatic_tax: NotRequired["OrderModifyParamsAutomaticTax"] + """ + Settings for automatic tax calculation for this order. + """ + billing_details: NotRequired["Literal['']|OrderModifyParamsBillingDetails"] + """ + Billing details for the customer. If a customer is provided, this will be automatically populated with values from that customer if override values are not provided. + """ + currency: NotRequired[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). + """ + customer: NotRequired[str] + """ + The customer associated with this order. + """ + description: NotRequired["Literal['']|str"] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ + discounts: NotRequired["Literal['']|List[OrderModifyParamsDiscount]"] + """ + The coupons, promotion codes, and/or discounts to apply to the order. Pass the empty string `""` to unset this field. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + ip_address: NotRequired[str] + """ + The IP address of the purchaser for this order. + """ + line_items: NotRequired[List["OrderModifyParamsLineItem"]] + """ + A list of line items the customer is ordering. Each line item includes information about the product, the quantity, and the resulting cost. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + payment: NotRequired["OrderModifyParamsPayment"] + """ + Payment information associated with the order, including payment settings. + """ + shipping_cost: NotRequired["Literal['']|OrderModifyParamsShippingCost"] + """ + Settings for the customer cost of shipping for this order. + """ + shipping_details: NotRequired[ + "Literal['']|OrderModifyParamsShippingDetails" + ] + """ + Shipping details for the order. + """ + tax_details: NotRequired["OrderModifyParamsTaxDetails"] + """ + Additional tax details about the purchaser to be used for this order. + """ + + +class OrderModifyParamsAutomaticTax(TypedDict): + enabled: bool + """ + Enable automatic tax calculation which will automatically compute tax rates on this order. + """ + + +class OrderModifyParamsBillingDetails(TypedDict): + address: NotRequired["OrderModifyParamsBillingDetailsAddress"] + """ + The billing address provided by the customer. + """ + email: NotRequired[str] + """ + The billing email provided by the customer. + """ + name: NotRequired[str] + """ + The billing name provided by the customer. + """ + phone: NotRequired[str] + """ + The billing phone number provided by the customer. + """ + + +class OrderModifyParamsBillingDetailsAddress(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/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 OrderModifyParamsDiscount(TypedDict): + coupon: NotRequired[str] + """ + ID of the coupon to create a new discount for. + """ + discount: NotRequired[str] + """ + ID of an existing discount on the object (or one of its ancestors) to reuse. + """ + promotion_code: NotRequired[str] + """ + ID of the promotion code to create a new discount for. + """ + + +class OrderModifyParamsLineItem(TypedDict): + description: NotRequired[str] + """ + The description for the line item. Will default to the name of the associated product. + """ + discounts: NotRequired[ + "Literal['']|List[OrderModifyParamsLineItemDiscount]" + ] + """ + The discounts applied to this line item. + """ + id: NotRequired[str] + """ + The ID of an existing line item on the order. + """ + price: NotRequired[str] + """ + The ID of a [Price](https://docs.stripe.com/api/prices) to add to the Order. + + The `price` parameter is an alternative to using the `product` parameter. If each of your products are sold at a single price, you can set `Product.default_price` and then pass the `product` parameter when creating a line item. If your products are sold at several possible prices, use the `price` parameter to explicitly specify which one to use. + """ + price_data: NotRequired["OrderModifyParamsLineItemPriceData"] + """ + Data used to generate a new Price object inline. + + The `price_data` parameter is an alternative to using the `product` or `price` parameters. If you create a Product upfront and configure a `Product.default_price`, pass the `product` parameter when creating a line item. If you prefer not to define Products upfront, or if you charge variable prices, pass the `price_data` parameter to describe the price for this line item. + + Each time you pass `price_data` we create a Price for the Product. This Price is hidden in both the Dashboard and API lists and cannot be reused. + """ + product: NotRequired[str] + """ + The ID of a [Product](https://docs.stripe.com/api/products) to add to the Order. + + The Product must have a `default_price` specified. Otherwise, specify the price by passing the `price` or `price_data` parameter. + """ + product_data: NotRequired["OrderModifyParamsLineItemProductData"] + """ + Defines a [Product](https://docs.stripe.com/api/products) inline and adds it to the Order. + + `product_data` is an alternative to the `product` parameter. If you created a Product upfront, use the `product` parameter to refer to the existing Product. But if you prefer not to create Products upfront, pass the `product_data` parameter to define a Product inline as part of configuring the Order. + + `product_data` automatically creates a Product, just as if you had manually created the Product. If a Product with the same ID already exists, then `product_data` re-uses it to avoid duplicates. + """ + quantity: NotRequired[int] + """ + The quantity of the line item. + """ + tax_rates: NotRequired["Literal['']|List[str]"] + """ + The tax rates applied to this line item. + """ + + +class OrderModifyParamsLineItemDiscount(TypedDict): + coupon: NotRequired[str] + """ + ID of the coupon to create a new discount for. + """ + discount: NotRequired[str] + """ + ID of an existing discount on the object (or one of its ancestors) to reuse. + """ + + +class OrderModifyParamsLineItemPriceData(TypedDict): + currency: NotRequired[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). + """ + product: NotRequired[str] + """ + ID of the [Product](https://docs.stripe.com/api/products) this [Price](https://docs.stripe.com/api/prices) belongs to. + + Use this to implement a variable-pricing model in your integration. This is required if `product_data` is not specified. + """ + tax_behavior: NotRequired[Literal["exclusive", "inclusive", "unspecified"]] + """ + Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + """ + unit_amount: NotRequired[int] + """ + A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + """ + unit_amount_decimal: NotRequired[str] + """ + Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + """ + + +class OrderModifyParamsLineItemProductData(TypedDict): + description: NotRequired["Literal['']|str"] + """ + The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. + """ + id: str + """ + A unique identifier for this product. + + `product_data` automatically creates a Product with this ID. If a Product with the same ID already exists, then `product_data` re-uses it to avoid duplicates. If any of the fields in the existing Product are different from the values in `product_data`, `product_data` updates the existing Product with the new information. So set `product_data[id]` to the same string every time you sell the same product, but don't re-use the same string for different products. + """ + images: NotRequired["Literal['']|List[str]"] + """ + A list of up to 8 URLs of images for this product, meant to be displayable to the customer. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + name: str + """ + The product's name, meant to be displayable to the customer. + """ + package_dimensions: NotRequired[ + "Literal['']|OrderModifyParamsLineItemProductDataPackageDimensions" + ] + """ + The dimensions of this product for shipping purposes. + """ + shippable: NotRequired[bool] + """ + Whether this product is shipped (i.e., physical goods). + """ + tax_code: NotRequired["Literal['']|str"] + """ + A [tax code](https://stripe.com/docs/tax/tax-categories) ID. + """ + url: NotRequired["Literal['']|str"] + """ + A URL of a publicly-accessible webpage for this product. + """ + + +class OrderModifyParamsLineItemProductDataPackageDimensions(TypedDict): + height: float + """ + Height, in inches. Maximum precision is 2 decimal places. + """ + length: float + """ + Length, in inches. Maximum precision is 2 decimal places. + """ + weight: float + """ + Weight, in ounces. Maximum precision is 2 decimal places. + """ + width: float + """ + Width, in inches. Maximum precision is 2 decimal places. + """ + + +class OrderModifyParamsPayment(TypedDict): + settings: "OrderModifyParamsPaymentSettings" + """ + Settings describing how the order should configure generated PaymentIntents. + """ + + +class OrderModifyParamsPaymentSettings(TypedDict): + application_fee_amount: NotRequired["Literal['']|int"] + """ + The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. + """ + payment_method_options: NotRequired[ + "OrderModifyParamsPaymentSettingsPaymentMethodOptions" + ] + """ + PaymentMethod-specific configuration to provide to the order's PaymentIntent. + """ + payment_method_types: NotRequired[ + List[ + Literal[ + "acss_debit", + "afterpay_clearpay", + "alipay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "card", + "customer_balance", + "eps", + "fpx", + "giropay", + "grabpay", + "ideal", + "klarna", + "link", + "oxxo", + "p24", + "paypal", + "sepa_debit", + "sofort", + "wechat_pay", + ] + ] + ] + """ + The list of [payment method types](https://stripe.com/docs/payments/payment-methods/overview) to provide to the order's PaymentIntent. Do not include this attribute if you prefer to manage your payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). + """ + return_url: NotRequired["Literal['']|str"] + """ + The URL to redirect the customer to after they authenticate their payment. + """ + statement_descriptor: NotRequired[str] + """ + For non-card charges, you can use this value as the complete description that appears on your customers' statements. Must contain at least one letter, maximum 22 characters. + """ + statement_descriptor_suffix: NotRequired[str] + """ + Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that's set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. + """ + transfer_data: NotRequired[ + "Literal['']|OrderModifyParamsPaymentSettingsTransferData" + ] + """ + Provides configuration for completing a transfer for the order after it is paid. + """ + + +class OrderModifyParamsPaymentSettingsPaymentMethodOptions(TypedDict): + acss_debit: NotRequired[ + "Literal['']|OrderModifyParamsPaymentSettingsPaymentMethodOptionsAcssDebit" + ] + """ + If paying by `acss_debit`, this sub-hash contains details about the ACSS Debit payment method options to pass to the order's PaymentIntent. + """ + afterpay_clearpay: NotRequired[ + "Literal['']|OrderModifyParamsPaymentSettingsPaymentMethodOptionsAfterpayClearpay" + ] + """ + If paying by `afterpay_clearpay`, this sub-hash contains details about the AfterpayClearpay payment method options to pass to the order's PaymentIntent. + """ + alipay: NotRequired[ + "Literal['']|OrderModifyParamsPaymentSettingsPaymentMethodOptionsAlipay" + ] + """ + If paying by `alipay`, this sub-hash contains details about the Alipay payment method options to pass to the order's PaymentIntent. + """ + bancontact: NotRequired[ + "Literal['']|OrderModifyParamsPaymentSettingsPaymentMethodOptionsBancontact" + ] + """ + If paying by `bancontact`, this sub-hash contains details about the Bancontact payment method options to pass to the order's PaymentIntent. + """ + card: NotRequired[ + "Literal['']|OrderModifyParamsPaymentSettingsPaymentMethodOptionsCard" + ] + """ + If paying by `card`, this sub-hash contains details about the Card payment method options to pass to the order's PaymentIntent. + """ + customer_balance: NotRequired[ + "Literal['']|OrderModifyParamsPaymentSettingsPaymentMethodOptionsCustomerBalance" + ] + """ + If paying by `customer_balance`, this sub-hash contains details about the Customer Balance payment method options to pass to the order's PaymentIntent. + """ + ideal: NotRequired[ + "Literal['']|OrderModifyParamsPaymentSettingsPaymentMethodOptionsIdeal" + ] + """ + If paying by `ideal`, this sub-hash contains details about the iDEAL payment method options to pass to the order's PaymentIntent. + """ + klarna: NotRequired[ + "Literal['']|OrderModifyParamsPaymentSettingsPaymentMethodOptionsKlarna" + ] + """ + If paying by `klarna`, this sub-hash contains details about the Klarna payment method options to pass to the order's PaymentIntent. + """ + link: NotRequired[ + "Literal['']|OrderModifyParamsPaymentSettingsPaymentMethodOptionsLink" + ] + """ + If paying by `link`, this sub-hash contains details about the Link payment method options to pass to the order's PaymentIntent. + """ + oxxo: NotRequired[ + "Literal['']|OrderModifyParamsPaymentSettingsPaymentMethodOptionsOxxo" + ] + """ + If paying by `oxxo`, this sub-hash contains details about the OXXO payment method options to pass to the order's PaymentIntent. + """ + p24: NotRequired[ + "Literal['']|OrderModifyParamsPaymentSettingsPaymentMethodOptionsP24" + ] + """ + If paying by `p24`, this sub-hash contains details about the P24 payment method options to pass to the order's PaymentIntent. + """ + paypal: NotRequired[ + "Literal['']|OrderModifyParamsPaymentSettingsPaymentMethodOptionsPaypal" + ] + """ + If paying by `paypal`, this sub-hash contains details about the PayPal payment method options to pass to the order's PaymentIntent. + """ + sepa_debit: NotRequired[ + "Literal['']|OrderModifyParamsPaymentSettingsPaymentMethodOptionsSepaDebit" + ] + """ + If paying by `sepa_debit`, this sub-hash contains details about the SEPA Debit payment method options to pass to the order's PaymentIntent. + """ + sofort: NotRequired[ + "Literal['']|OrderModifyParamsPaymentSettingsPaymentMethodOptionsSofort" + ] + """ + If paying by `sofort`, this sub-hash contains details about the Sofort payment method options to pass to the order's PaymentIntent. + """ + wechat_pay: NotRequired[ + "Literal['']|OrderModifyParamsPaymentSettingsPaymentMethodOptionsWechatPay" + ] + """ + If paying by `wechat_pay`, this sub-hash contains details about the WeChat Pay payment method options to pass to the order's PaymentIntent. + """ + + +class OrderModifyParamsPaymentSettingsPaymentMethodOptionsAcssDebit(TypedDict): + mandate_options: NotRequired[ + "OrderModifyParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions" + ] + """ + Additional fields for Mandate creation + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session', 'on_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + target_date: NotRequired[str] + """ + Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + """ + verification_method: NotRequired[ + Literal["automatic", "instant", "microdeposits"] + ] + """ + Bank account verification method. + """ + + +class OrderModifyParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions( + TypedDict, +): + custom_mandate_url: NotRequired["Literal['']|str"] + """ + A URL for custom mandate text to render during confirmation step. + The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent, + or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent. + """ + interval_description: NotRequired[str] + """ + Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'. + """ + payment_schedule: NotRequired[Literal["combined", "interval", "sporadic"]] + """ + Payment schedule for the mandate. + """ + transaction_type: NotRequired[Literal["business", "personal"]] + """ + Transaction type of the mandate. + """ + + +class OrderModifyParamsPaymentSettingsPaymentMethodOptionsAfterpayClearpay( + TypedDict, +): + capture_method: NotRequired[ + Literal["automatic", "automatic_async", "manual"] + ] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + reference: NotRequired[str] + """ + An internal identifier or reference this payment corresponds to. The identifier is limited to 128 characters and may contain only letters, digits, underscores, backslashes and dashes. + """ + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with the payment method. + + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the order's Customer, if present, after the order's PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + + If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. + """ + + +class OrderModifyParamsPaymentSettingsPaymentMethodOptionsAlipay(TypedDict): + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class OrderModifyParamsPaymentSettingsPaymentMethodOptionsBancontact( + TypedDict +): + preferred_language: NotRequired[Literal["de", "en", "fr", "nl"]] + """ + Preferred language of the Bancontact authorization page that the customer is redirected to. + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class OrderModifyParamsPaymentSettingsPaymentMethodOptionsCard(TypedDict): + capture_method: NotRequired[ + Literal["automatic", "automatic_async", "manual"] + ] + """ + Controls when the funds will be captured from the customer's account. + """ + setup_future_usage: NotRequired[ + Literal["none", "off_session", "on_session"] + ] + """ + Indicates that you intend to make future payments with the payment method. + + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the order's Customer, if present, after the order's PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + + If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. + """ + + +class OrderModifyParamsPaymentSettingsPaymentMethodOptionsCustomerBalance( + TypedDict, +): + bank_transfer: NotRequired[ + "OrderModifyParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransfer" + ] + """ + Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. + """ + funding_type: NotRequired[Literal["bank_transfer"]] + """ + The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. + """ + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class OrderModifyParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransfer( + TypedDict, +): + eu_bank_transfer: NotRequired[ + "OrderModifyParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer" + ] + """ + Configuration for the eu_bank_transfer funding type. + """ + requested_address_types: NotRequired[ + List[ + Literal[ + "aba", "iban", "sepa", "sort_code", "spei", "swift", "zengin" + ] + ] + ] + """ + List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned. + + Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`. + """ + type: Literal[ + "eu_bank_transfer", + "gb_bank_transfer", + "jp_bank_transfer", + "mx_bank_transfer", + "us_bank_transfer", + ] + """ + The list of bank transfer types that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. + """ + + +class OrderModifyParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer( + TypedDict, +): + country: str + """ + The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. + """ + + +class OrderModifyParamsPaymentSettingsPaymentMethodOptionsIdeal(TypedDict): + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class OrderModifyParamsPaymentSettingsPaymentMethodOptionsKlarna(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + on_demand: NotRequired[ + "OrderModifyParamsPaymentSettingsPaymentMethodOptionsKlarnaOnDemand" + ] + """ + On-demand details if setting up or charging an on-demand payment. + """ + preferred_locale: NotRequired[ + Literal[ + "cs-CZ", + "da-DK", + "de-AT", + "de-CH", + "de-DE", + "el-GR", + "en-AT", + "en-AU", + "en-BE", + "en-CA", + "en-CH", + "en-CZ", + "en-DE", + "en-DK", + "en-ES", + "en-FI", + "en-FR", + "en-GB", + "en-GR", + "en-IE", + "en-IT", + "en-NL", + "en-NO", + "en-NZ", + "en-PL", + "en-PT", + "en-RO", + "en-SE", + "en-US", + "es-ES", + "es-US", + "fi-FI", + "fr-BE", + "fr-CA", + "fr-CH", + "fr-FR", + "it-CH", + "it-IT", + "nb-NO", + "nl-BE", + "nl-NL", + "pl-PL", + "pt-PT", + "ro-RO", + "sv-FI", + "sv-SE", + ] + ] + """ + Preferred language of the Klarna authorization page that the customer is redirected to + """ + setup_future_usage: NotRequired[ + Literal["none", "off_session", "on_session"] + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + subscriptions: NotRequired[ + "Literal['']|List[OrderModifyParamsPaymentSettingsPaymentMethodOptionsKlarnaSubscription]" + ] + """ + Subscription details if setting up or charging a subscription. + """ + + +class OrderModifyParamsPaymentSettingsPaymentMethodOptionsKlarnaOnDemand( + TypedDict, +): + average_amount: NotRequired[int] + """ + Your average amount value. You can use a value across your customer base, or segment based on customer type, country, etc. + """ + maximum_amount: NotRequired[int] + """ + The maximum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. + """ + minimum_amount: NotRequired[int] + """ + The lowest or minimum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. + """ + purchase_interval: NotRequired[Literal["day", "month", "week", "year"]] + """ + Interval at which the customer is making purchases + """ + purchase_interval_count: NotRequired[int] + """ + The number of `purchase_interval` between charges + """ + + +class OrderModifyParamsPaymentSettingsPaymentMethodOptionsKlarnaSubscription( + TypedDict, +): + interval: Literal["day", "month", "week", "year"] + """ + Unit of time between subscription charges. + """ + interval_count: NotRequired[int] + """ + The number of intervals (specified in the `interval` attribute) between subscription charges. For example, `interval=month` and `interval_count=3` charges every 3 months. + """ + name: NotRequired[str] + """ + Name for subscription. + """ + next_billing: NotRequired[ + "OrderModifyParamsPaymentSettingsPaymentMethodOptionsKlarnaSubscriptionNextBilling" + ] + """ + Describes the upcoming charge for this subscription. + """ + reference: str + """ + A non-customer-facing reference to correlate subscription charges in the Klarna app. Use a value that persists across subscription charges. + """ + + +class OrderModifyParamsPaymentSettingsPaymentMethodOptionsKlarnaSubscriptionNextBilling( + TypedDict, +): + amount: int + """ + The amount of the next charge for the subscription. + """ + date: str + """ + The date of the next charge for the subscription in YYYY-MM-DD format. + """ + + +class OrderModifyParamsPaymentSettingsPaymentMethodOptionsLink(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + persistent_token: NotRequired[str] + """ + [Deprecated] This is a legacy parameter that no longer has any function. + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class OrderModifyParamsPaymentSettingsPaymentMethodOptionsOxxo(TypedDict): + expires_after_days: NotRequired[int] + """ + The number of calendar days before an OXXO voucher expires. For example, if you create an OXXO voucher on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time. + """ + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class OrderModifyParamsPaymentSettingsPaymentMethodOptionsP24(TypedDict): + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + tos_shown_and_accepted: NotRequired[bool] + """ + Confirm that the payer has accepted the P24 terms and conditions. + """ + + +class OrderModifyParamsPaymentSettingsPaymentMethodOptionsPaypal(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds will be captured from the customer's account. + """ + line_items: NotRequired[ + List[ + "OrderModifyParamsPaymentSettingsPaymentMethodOptionsPaypalLineItem" + ] + ] + """ + The line items purchased by the customer. + """ + preferred_locale: NotRequired[ + Literal[ + "cs-CZ", + "da-DK", + "de-AT", + "de-DE", + "de-LU", + "el-GR", + "en-GB", + "en-US", + "es-ES", + "fi-FI", + "fr-BE", + "fr-FR", + "fr-LU", + "hu-HU", + "it-IT", + "nl-BE", + "nl-NL", + "pl-PL", + "pt-PT", + "sk-SK", + "sv-SE", + ] + ] + """ + [Preferred locale](https://stripe.com/docs/payments/paypal/supported-locales) of the PayPal checkout page that the customer is redirected to. + """ + reference: NotRequired[str] + """ + A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. + """ + reference_id: NotRequired[str] + """ + A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. + """ + risk_correlation_id: NotRequired[str] + """ + The risk correlation ID for an on-session payment using a saved PayPal payment method. + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + subsellers: NotRequired[List[str]] + """ + The Stripe connected account IDs of the sellers on the platform for this transaction (optional). Only allowed when [separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) are used. + """ + + +class OrderModifyParamsPaymentSettingsPaymentMethodOptionsPaypalLineItem( + TypedDict, +): + category: NotRequired[ + Literal["digital_goods", "donation", "physical_goods"] + ] + """ + Type of the line item. + """ + description: NotRequired[str] + """ + Description of the line item. + """ + name: str + """ + Descriptive name of the line item. + """ + quantity: int + """ + Quantity of the line item. Must be a positive number. + """ + sku: NotRequired[str] + """ + Client facing stock keeping unit, article number or similar. + """ + sold_by: NotRequired[str] + """ + The Stripe account ID of the connected account that sells the item. + """ + tax: NotRequired[ + "OrderModifyParamsPaymentSettingsPaymentMethodOptionsPaypalLineItemTax" + ] + """ + The tax information for the line item. + """ + unit_amount: int + """ + Price for a single unit of the line item in minor units. Cannot be a negative number. + """ + + +class OrderModifyParamsPaymentSettingsPaymentMethodOptionsPaypalLineItemTax( + TypedDict, +): + amount: int + """ + The tax for a single unit of the line item in minor units. Cannot be a negative number. + """ + behavior: Literal["exclusive", "inclusive"] + """ + The tax behavior for the line item. + """ + + +class OrderModifyParamsPaymentSettingsPaymentMethodOptionsSepaDebit(TypedDict): + mandate_options: NotRequired[ + "OrderModifyParamsPaymentSettingsPaymentMethodOptionsSepaDebitMandateOptions" + ] + """ + Additional fields for Mandate creation + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session', 'on_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + target_date: NotRequired[str] + """ + Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + """ + + +class OrderModifyParamsPaymentSettingsPaymentMethodOptionsSepaDebitMandateOptions( + TypedDict, +): + reference_prefix: NotRequired["Literal['']|str"] + """ + Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'. + """ + + +class OrderModifyParamsPaymentSettingsPaymentMethodOptionsSofort(TypedDict): + preferred_language: NotRequired[ + "Literal['']|Literal['de', 'en', 'es', 'fr', 'it', 'nl', 'pl']" + ] + """ + Language shown to the payer on redirect. + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class OrderModifyParamsPaymentSettingsPaymentMethodOptionsWechatPay(TypedDict): + app_id: NotRequired[str] + """ + The app ID registered with WeChat Pay. Only required when client is ios or android. + """ + client: NotRequired[Literal["android", "ios", "web"]] + """ + The client type that the end customer will pay from + """ + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class OrderModifyParamsPaymentSettingsTransferData(TypedDict): + amount: NotRequired[int] + """ + The amount that will be transferred automatically when the order is paid. If no amount is set, the full amount is transferred. There cannot be any line items with recurring prices when using this field. + """ + destination: str + """ + ID of the Connected account receiving the transfer. + """ + + +class OrderModifyParamsShippingCost(TypedDict): + shipping_rate: NotRequired[str] + """ + The ID of the shipping rate to use for this order. + """ + shipping_rate_data: NotRequired[ + "OrderModifyParamsShippingCostShippingRateData" + ] + """ + Parameters to create a new ad-hoc shipping rate for this order. + """ + + +class OrderModifyParamsShippingCostShippingRateData(TypedDict): + delivery_estimate: NotRequired[ + "OrderModifyParamsShippingCostShippingRateDataDeliveryEstimate" + ] + """ + The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions. + """ + display_name: str + """ + The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions. + """ + fixed_amount: NotRequired[ + "OrderModifyParamsShippingCostShippingRateDataFixedAmount" + ] + """ + Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + tax_behavior: NotRequired[Literal["exclusive", "inclusive", "unspecified"]] + """ + Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + """ + tax_code: NotRequired[str] + """ + A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`. + """ + type: NotRequired[Literal["fixed_amount"]] + """ + The type of calculation to use on the shipping rate. + """ + + +class OrderModifyParamsShippingCostShippingRateDataDeliveryEstimate(TypedDict): + maximum: NotRequired[ + "OrderModifyParamsShippingCostShippingRateDataDeliveryEstimateMaximum" + ] + """ + The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite. + """ + minimum: NotRequired[ + "OrderModifyParamsShippingCostShippingRateDataDeliveryEstimateMinimum" + ] + """ + The lower bound of the estimated range. If empty, represents no lower bound. + """ + + +class OrderModifyParamsShippingCostShippingRateDataDeliveryEstimateMaximum( + TypedDict, +): + unit: Literal["business_day", "day", "hour", "month", "week"] + """ + A unit of time. + """ + value: int + """ + Must be greater than 0. + """ + + +class OrderModifyParamsShippingCostShippingRateDataDeliveryEstimateMinimum( + TypedDict, +): + unit: Literal["business_day", "day", "hour", "month", "week"] + """ + A unit of time. + """ + value: int + """ + Must be greater than 0. + """ + + +class OrderModifyParamsShippingCostShippingRateDataFixedAmount(TypedDict): + amount: int + """ + A non-negative integer in cents representing how much to charge. + """ + 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). + """ + currency_options: NotRequired[ + Dict[ + str, + "OrderModifyParamsShippingCostShippingRateDataFixedAmountCurrencyOptions", + ] + ] + """ + Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). + """ + + +class OrderModifyParamsShippingCostShippingRateDataFixedAmountCurrencyOptions( + TypedDict, +): + amount: int + """ + A non-negative integer in cents representing how much to charge. + """ + tax_behavior: NotRequired[Literal["exclusive", "inclusive", "unspecified"]] + """ + Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + """ + + +class OrderModifyParamsShippingDetails(TypedDict): + address: "OrderModifyParamsShippingDetailsAddress" + """ + The shipping address for the order. + """ + name: str + """ + The name of the recipient of the order. + """ + phone: NotRequired["Literal['']|str"] + """ + The phone number (including extension) for the recipient of the order. + """ + + +class OrderModifyParamsShippingDetailsAddress(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/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 OrderModifyParamsTaxDetails(TypedDict): + tax_exempt: NotRequired["Literal['']|Literal['exempt', 'none', 'reverse']"] + """ + The purchaser's tax exemption status. One of `none`, `exempt`, or `reverse`. + """ + tax_ids: NotRequired[List["OrderModifyParamsTaxDetailsTaxId"]] + """ + The purchaser's tax IDs to be used for this order. + """ + + +class OrderModifyParamsTaxDetailsTaxId(TypedDict): + type: Literal[ + "ad_nrt", + "ae_trn", + "al_tin", + "am_tin", + "ao_tin", + "ar_cuit", + "au_abn", + "au_arn", + "aw_tin", + "az_tin", + "ba_tin", + "bb_tin", + "bd_bin", + "bf_ifu", + "bg_uic", + "bh_vat", + "bj_ifu", + "bo_tin", + "br_cnpj", + "br_cpf", + "bs_tin", + "by_tin", + "ca_bn", + "ca_gst_hst", + "ca_pst_bc", + "ca_pst_mb", + "ca_pst_sk", + "ca_qst", + "cd_nif", + "ch_uid", + "ch_vat", + "cl_tin", + "cm_niu", + "cn_tin", + "co_nit", + "cr_tin", + "cv_nif", + "de_stn", + "do_rcn", + "ec_ruc", + "eg_tin", + "es_cif", + "et_tin", + "eu_oss_vat", + "eu_vat", + "gb_vat", + "ge_vat", + "gn_nif", + "hk_br", + "hr_oib", + "hu_tin", + "id_npwp", + "il_vat", + "in_gst", + "is_vat", + "jp_cn", + "jp_rn", + "jp_trn", + "ke_pin", + "kg_tin", + "kh_tin", + "kr_brn", + "kz_bin", + "la_tin", + "li_uid", + "li_vat", + "ma_vat", + "md_vat", + "me_pib", + "mk_vat", + "mr_nif", + "mx_rfc", + "my_frp", + "my_itn", + "my_sst", + "ng_tin", + "no_vat", + "no_voec", + "np_pan", + "nz_gst", + "om_vat", + "pe_ruc", + "ph_tin", + "ro_tin", + "rs_pib", + "ru_inn", + "ru_kpp", + "sa_vat", + "sg_gst", + "sg_uen", + "si_tin", + "sn_ninea", + "sr_fin", + "sv_nit", + "th_vat", + "tj_tin", + "tr_tin", + "tw_vat", + "tz_vat", + "ua_vat", + "ug_tin", + "us_ein", + "uy_ruc", + "uz_tin", + "uz_vat", + "ve_rif", + "vn_tin", + "za_vat", + "zm_tin", + "zw_tin", + ] + """ + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `al_tin`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `aw_tin`, `az_tin`, `ba_tin`, `bb_tin`, `bd_bin`, `bf_ifu`, `bg_uic`, `bh_vat`, `bj_ifu`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cm_niu`, `cn_tin`, `co_nit`, `cr_tin`, `cv_nif`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `et_tin`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kg_tin`, `kh_tin`, `kr_brn`, `kz_bin`, `la_tin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin` + """ + value: str + """ + Value of the tax ID. + """ diff --git a/stripe/params/_order_reopen_params.py b/stripe/params/_order_reopen_params.py new file mode 100644 index 000000000..e0eeacf49 --- /dev/null +++ b/stripe/params/_order_reopen_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 OrderReopenParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_order_retrieve_params.py b/stripe/params/_order_retrieve_params.py new file mode 100644 index 000000000..9364635f9 --- /dev/null +++ b/stripe/params/_order_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 OrderRetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_order_submit_params.py b/stripe/params/_order_submit_params.py new file mode 100644 index 000000000..7039d2885 --- /dev/null +++ b/stripe/params/_order_submit_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 OrderSubmitParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + expected_total: int + """ + `expected_total` should always be set to the order's `amount_total` field. If they don't match, submitting the order will fail. This helps detect race conditions where something else concurrently modifies the order. + """ diff --git a/stripe/params/_order_update_params.py b/stripe/params/_order_update_params.py new file mode 100644 index 000000000..e78699671 --- /dev/null +++ b/stripe/params/_order_update_params.py @@ -0,0 +1,1416 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class OrderUpdateParams(TypedDict): + automatic_tax: NotRequired["OrderUpdateParamsAutomaticTax"] + """ + Settings for automatic tax calculation for this order. + """ + billing_details: NotRequired["Literal['']|OrderUpdateParamsBillingDetails"] + """ + Billing details for the customer. If a customer is provided, this will be automatically populated with values from that customer if override values are not provided. + """ + currency: NotRequired[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). + """ + customer: NotRequired[str] + """ + The customer associated with this order. + """ + description: NotRequired["Literal['']|str"] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ + discounts: NotRequired["Literal['']|List[OrderUpdateParamsDiscount]"] + """ + The coupons, promotion codes, and/or discounts to apply to the order. Pass the empty string `""` to unset this field. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + ip_address: NotRequired[str] + """ + The IP address of the purchaser for this order. + """ + line_items: NotRequired[List["OrderUpdateParamsLineItem"]] + """ + A list of line items the customer is ordering. Each line item includes information about the product, the quantity, and the resulting cost. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + payment: NotRequired["OrderUpdateParamsPayment"] + """ + Payment information associated with the order, including payment settings. + """ + shipping_cost: NotRequired["Literal['']|OrderUpdateParamsShippingCost"] + """ + Settings for the customer cost of shipping for this order. + """ + shipping_details: NotRequired[ + "Literal['']|OrderUpdateParamsShippingDetails" + ] + """ + Shipping details for the order. + """ + tax_details: NotRequired["OrderUpdateParamsTaxDetails"] + """ + Additional tax details about the purchaser to be used for this order. + """ + + +class OrderUpdateParamsAutomaticTax(TypedDict): + enabled: bool + """ + Enable automatic tax calculation which will automatically compute tax rates on this order. + """ + + +class OrderUpdateParamsBillingDetails(TypedDict): + address: NotRequired["OrderUpdateParamsBillingDetailsAddress"] + """ + The billing address provided by the customer. + """ + email: NotRequired[str] + """ + The billing email provided by the customer. + """ + name: NotRequired[str] + """ + The billing name provided by the customer. + """ + phone: NotRequired[str] + """ + The billing phone number provided by the customer. + """ + + +class OrderUpdateParamsBillingDetailsAddress(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/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 OrderUpdateParamsDiscount(TypedDict): + coupon: NotRequired[str] + """ + ID of the coupon to create a new discount for. + """ + discount: NotRequired[str] + """ + ID of an existing discount on the object (or one of its ancestors) to reuse. + """ + promotion_code: NotRequired[str] + """ + ID of the promotion code to create a new discount for. + """ + + +class OrderUpdateParamsLineItem(TypedDict): + description: NotRequired[str] + """ + The description for the line item. Will default to the name of the associated product. + """ + discounts: NotRequired[ + "Literal['']|List[OrderUpdateParamsLineItemDiscount]" + ] + """ + The discounts applied to this line item. + """ + id: NotRequired[str] + """ + The ID of an existing line item on the order. + """ + price: NotRequired[str] + """ + The ID of a [Price](https://docs.stripe.com/api/prices) to add to the Order. + + The `price` parameter is an alternative to using the `product` parameter. If each of your products are sold at a single price, you can set `Product.default_price` and then pass the `product` parameter when creating a line item. If your products are sold at several possible prices, use the `price` parameter to explicitly specify which one to use. + """ + price_data: NotRequired["OrderUpdateParamsLineItemPriceData"] + """ + Data used to generate a new Price object inline. + + The `price_data` parameter is an alternative to using the `product` or `price` parameters. If you create a Product upfront and configure a `Product.default_price`, pass the `product` parameter when creating a line item. If you prefer not to define Products upfront, or if you charge variable prices, pass the `price_data` parameter to describe the price for this line item. + + Each time you pass `price_data` we create a Price for the Product. This Price is hidden in both the Dashboard and API lists and cannot be reused. + """ + product: NotRequired[str] + """ + The ID of a [Product](https://docs.stripe.com/api/products) to add to the Order. + + The Product must have a `default_price` specified. Otherwise, specify the price by passing the `price` or `price_data` parameter. + """ + product_data: NotRequired["OrderUpdateParamsLineItemProductData"] + """ + Defines a [Product](https://docs.stripe.com/api/products) inline and adds it to the Order. + + `product_data` is an alternative to the `product` parameter. If you created a Product upfront, use the `product` parameter to refer to the existing Product. But if you prefer not to create Products upfront, pass the `product_data` parameter to define a Product inline as part of configuring the Order. + + `product_data` automatically creates a Product, just as if you had manually created the Product. If a Product with the same ID already exists, then `product_data` re-uses it to avoid duplicates. + """ + quantity: NotRequired[int] + """ + The quantity of the line item. + """ + tax_rates: NotRequired["Literal['']|List[str]"] + """ + The tax rates applied to this line item. + """ + + +class OrderUpdateParamsLineItemDiscount(TypedDict): + coupon: NotRequired[str] + """ + ID of the coupon to create a new discount for. + """ + discount: NotRequired[str] + """ + ID of an existing discount on the object (or one of its ancestors) to reuse. + """ + + +class OrderUpdateParamsLineItemPriceData(TypedDict): + currency: NotRequired[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). + """ + product: NotRequired[str] + """ + ID of the [Product](https://docs.stripe.com/api/products) this [Price](https://docs.stripe.com/api/prices) belongs to. + + Use this to implement a variable-pricing model in your integration. This is required if `product_data` is not specified. + """ + tax_behavior: NotRequired[Literal["exclusive", "inclusive", "unspecified"]] + """ + Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + """ + unit_amount: NotRequired[int] + """ + A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + """ + unit_amount_decimal: NotRequired[str] + """ + Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + """ + + +class OrderUpdateParamsLineItemProductData(TypedDict): + description: NotRequired["Literal['']|str"] + """ + The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. + """ + id: str + """ + A unique identifier for this product. + + `product_data` automatically creates a Product with this ID. If a Product with the same ID already exists, then `product_data` re-uses it to avoid duplicates. If any of the fields in the existing Product are different from the values in `product_data`, `product_data` updates the existing Product with the new information. So set `product_data[id]` to the same string every time you sell the same product, but don't re-use the same string for different products. + """ + images: NotRequired["Literal['']|List[str]"] + """ + A list of up to 8 URLs of images for this product, meant to be displayable to the customer. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + name: str + """ + The product's name, meant to be displayable to the customer. + """ + package_dimensions: NotRequired[ + "Literal['']|OrderUpdateParamsLineItemProductDataPackageDimensions" + ] + """ + The dimensions of this product for shipping purposes. + """ + shippable: NotRequired[bool] + """ + Whether this product is shipped (i.e., physical goods). + """ + tax_code: NotRequired["Literal['']|str"] + """ + A [tax code](https://stripe.com/docs/tax/tax-categories) ID. + """ + url: NotRequired["Literal['']|str"] + """ + A URL of a publicly-accessible webpage for this product. + """ + + +class OrderUpdateParamsLineItemProductDataPackageDimensions(TypedDict): + height: float + """ + Height, in inches. Maximum precision is 2 decimal places. + """ + length: float + """ + Length, in inches. Maximum precision is 2 decimal places. + """ + weight: float + """ + Weight, in ounces. Maximum precision is 2 decimal places. + """ + width: float + """ + Width, in inches. Maximum precision is 2 decimal places. + """ + + +class OrderUpdateParamsPayment(TypedDict): + settings: "OrderUpdateParamsPaymentSettings" + """ + Settings describing how the order should configure generated PaymentIntents. + """ + + +class OrderUpdateParamsPaymentSettings(TypedDict): + application_fee_amount: NotRequired["Literal['']|int"] + """ + The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. + """ + payment_method_options: NotRequired[ + "OrderUpdateParamsPaymentSettingsPaymentMethodOptions" + ] + """ + PaymentMethod-specific configuration to provide to the order's PaymentIntent. + """ + payment_method_types: NotRequired[ + List[ + Literal[ + "acss_debit", + "afterpay_clearpay", + "alipay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "card", + "customer_balance", + "eps", + "fpx", + "giropay", + "grabpay", + "ideal", + "klarna", + "link", + "oxxo", + "p24", + "paypal", + "sepa_debit", + "sofort", + "wechat_pay", + ] + ] + ] + """ + The list of [payment method types](https://stripe.com/docs/payments/payment-methods/overview) to provide to the order's PaymentIntent. Do not include this attribute if you prefer to manage your payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). + """ + return_url: NotRequired["Literal['']|str"] + """ + The URL to redirect the customer to after they authenticate their payment. + """ + statement_descriptor: NotRequired[str] + """ + For non-card charges, you can use this value as the complete description that appears on your customers' statements. Must contain at least one letter, maximum 22 characters. + """ + statement_descriptor_suffix: NotRequired[str] + """ + Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that's set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. + """ + transfer_data: NotRequired[ + "Literal['']|OrderUpdateParamsPaymentSettingsTransferData" + ] + """ + Provides configuration for completing a transfer for the order after it is paid. + """ + + +class OrderUpdateParamsPaymentSettingsPaymentMethodOptions(TypedDict): + acss_debit: NotRequired[ + "Literal['']|OrderUpdateParamsPaymentSettingsPaymentMethodOptionsAcssDebit" + ] + """ + If paying by `acss_debit`, this sub-hash contains details about the ACSS Debit payment method options to pass to the order's PaymentIntent. + """ + afterpay_clearpay: NotRequired[ + "Literal['']|OrderUpdateParamsPaymentSettingsPaymentMethodOptionsAfterpayClearpay" + ] + """ + If paying by `afterpay_clearpay`, this sub-hash contains details about the AfterpayClearpay payment method options to pass to the order's PaymentIntent. + """ + alipay: NotRequired[ + "Literal['']|OrderUpdateParamsPaymentSettingsPaymentMethodOptionsAlipay" + ] + """ + If paying by `alipay`, this sub-hash contains details about the Alipay payment method options to pass to the order's PaymentIntent. + """ + bancontact: NotRequired[ + "Literal['']|OrderUpdateParamsPaymentSettingsPaymentMethodOptionsBancontact" + ] + """ + If paying by `bancontact`, this sub-hash contains details about the Bancontact payment method options to pass to the order's PaymentIntent. + """ + card: NotRequired[ + "Literal['']|OrderUpdateParamsPaymentSettingsPaymentMethodOptionsCard" + ] + """ + If paying by `card`, this sub-hash contains details about the Card payment method options to pass to the order's PaymentIntent. + """ + customer_balance: NotRequired[ + "Literal['']|OrderUpdateParamsPaymentSettingsPaymentMethodOptionsCustomerBalance" + ] + """ + If paying by `customer_balance`, this sub-hash contains details about the Customer Balance payment method options to pass to the order's PaymentIntent. + """ + ideal: NotRequired[ + "Literal['']|OrderUpdateParamsPaymentSettingsPaymentMethodOptionsIdeal" + ] + """ + If paying by `ideal`, this sub-hash contains details about the iDEAL payment method options to pass to the order's PaymentIntent. + """ + klarna: NotRequired[ + "Literal['']|OrderUpdateParamsPaymentSettingsPaymentMethodOptionsKlarna" + ] + """ + If paying by `klarna`, this sub-hash contains details about the Klarna payment method options to pass to the order's PaymentIntent. + """ + link: NotRequired[ + "Literal['']|OrderUpdateParamsPaymentSettingsPaymentMethodOptionsLink" + ] + """ + If paying by `link`, this sub-hash contains details about the Link payment method options to pass to the order's PaymentIntent. + """ + oxxo: NotRequired[ + "Literal['']|OrderUpdateParamsPaymentSettingsPaymentMethodOptionsOxxo" + ] + """ + If paying by `oxxo`, this sub-hash contains details about the OXXO payment method options to pass to the order's PaymentIntent. + """ + p24: NotRequired[ + "Literal['']|OrderUpdateParamsPaymentSettingsPaymentMethodOptionsP24" + ] + """ + If paying by `p24`, this sub-hash contains details about the P24 payment method options to pass to the order's PaymentIntent. + """ + paypal: NotRequired[ + "Literal['']|OrderUpdateParamsPaymentSettingsPaymentMethodOptionsPaypal" + ] + """ + If paying by `paypal`, this sub-hash contains details about the PayPal payment method options to pass to the order's PaymentIntent. + """ + sepa_debit: NotRequired[ + "Literal['']|OrderUpdateParamsPaymentSettingsPaymentMethodOptionsSepaDebit" + ] + """ + If paying by `sepa_debit`, this sub-hash contains details about the SEPA Debit payment method options to pass to the order's PaymentIntent. + """ + sofort: NotRequired[ + "Literal['']|OrderUpdateParamsPaymentSettingsPaymentMethodOptionsSofort" + ] + """ + If paying by `sofort`, this sub-hash contains details about the Sofort payment method options to pass to the order's PaymentIntent. + """ + wechat_pay: NotRequired[ + "Literal['']|OrderUpdateParamsPaymentSettingsPaymentMethodOptionsWechatPay" + ] + """ + If paying by `wechat_pay`, this sub-hash contains details about the WeChat Pay payment method options to pass to the order's PaymentIntent. + """ + + +class OrderUpdateParamsPaymentSettingsPaymentMethodOptionsAcssDebit(TypedDict): + mandate_options: NotRequired[ + "OrderUpdateParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions" + ] + """ + Additional fields for Mandate creation + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session', 'on_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + target_date: NotRequired[str] + """ + Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + """ + verification_method: NotRequired[ + Literal["automatic", "instant", "microdeposits"] + ] + """ + Bank account verification method. + """ + + +class OrderUpdateParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions( + TypedDict, +): + custom_mandate_url: NotRequired["Literal['']|str"] + """ + A URL for custom mandate text to render during confirmation step. + The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent, + or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent. + """ + interval_description: NotRequired[str] + """ + Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'. + """ + payment_schedule: NotRequired[Literal["combined", "interval", "sporadic"]] + """ + Payment schedule for the mandate. + """ + transaction_type: NotRequired[Literal["business", "personal"]] + """ + Transaction type of the mandate. + """ + + +class OrderUpdateParamsPaymentSettingsPaymentMethodOptionsAfterpayClearpay( + TypedDict, +): + capture_method: NotRequired[ + Literal["automatic", "automatic_async", "manual"] + ] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + reference: NotRequired[str] + """ + An internal identifier or reference this payment corresponds to. The identifier is limited to 128 characters and may contain only letters, digits, underscores, backslashes and dashes. + """ + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with the payment method. + + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the order's Customer, if present, after the order's PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + + If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. + """ + + +class OrderUpdateParamsPaymentSettingsPaymentMethodOptionsAlipay(TypedDict): + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class OrderUpdateParamsPaymentSettingsPaymentMethodOptionsBancontact( + TypedDict +): + preferred_language: NotRequired[Literal["de", "en", "fr", "nl"]] + """ + Preferred language of the Bancontact authorization page that the customer is redirected to. + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class OrderUpdateParamsPaymentSettingsPaymentMethodOptionsCard(TypedDict): + capture_method: NotRequired[ + Literal["automatic", "automatic_async", "manual"] + ] + """ + Controls when the funds will be captured from the customer's account. + """ + setup_future_usage: NotRequired[ + Literal["none", "off_session", "on_session"] + ] + """ + Indicates that you intend to make future payments with the payment method. + + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the order's Customer, if present, after the order's PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + + If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. + """ + + +class OrderUpdateParamsPaymentSettingsPaymentMethodOptionsCustomerBalance( + TypedDict, +): + bank_transfer: NotRequired[ + "OrderUpdateParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransfer" + ] + """ + Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. + """ + funding_type: NotRequired[Literal["bank_transfer"]] + """ + The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. + """ + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class OrderUpdateParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransfer( + TypedDict, +): + eu_bank_transfer: NotRequired[ + "OrderUpdateParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer" + ] + """ + Configuration for the eu_bank_transfer funding type. + """ + requested_address_types: NotRequired[ + List[ + Literal[ + "aba", "iban", "sepa", "sort_code", "spei", "swift", "zengin" + ] + ] + ] + """ + List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned. + + Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`. + """ + type: Literal[ + "eu_bank_transfer", + "gb_bank_transfer", + "jp_bank_transfer", + "mx_bank_transfer", + "us_bank_transfer", + ] + """ + The list of bank transfer types that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. + """ + + +class OrderUpdateParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer( + TypedDict, +): + country: str + """ + The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. + """ + + +class OrderUpdateParamsPaymentSettingsPaymentMethodOptionsIdeal(TypedDict): + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class OrderUpdateParamsPaymentSettingsPaymentMethodOptionsKlarna(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + on_demand: NotRequired[ + "OrderUpdateParamsPaymentSettingsPaymentMethodOptionsKlarnaOnDemand" + ] + """ + On-demand details if setting up or charging an on-demand payment. + """ + preferred_locale: NotRequired[ + Literal[ + "cs-CZ", + "da-DK", + "de-AT", + "de-CH", + "de-DE", + "el-GR", + "en-AT", + "en-AU", + "en-BE", + "en-CA", + "en-CH", + "en-CZ", + "en-DE", + "en-DK", + "en-ES", + "en-FI", + "en-FR", + "en-GB", + "en-GR", + "en-IE", + "en-IT", + "en-NL", + "en-NO", + "en-NZ", + "en-PL", + "en-PT", + "en-RO", + "en-SE", + "en-US", + "es-ES", + "es-US", + "fi-FI", + "fr-BE", + "fr-CA", + "fr-CH", + "fr-FR", + "it-CH", + "it-IT", + "nb-NO", + "nl-BE", + "nl-NL", + "pl-PL", + "pt-PT", + "ro-RO", + "sv-FI", + "sv-SE", + ] + ] + """ + Preferred language of the Klarna authorization page that the customer is redirected to + """ + setup_future_usage: NotRequired[ + Literal["none", "off_session", "on_session"] + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + subscriptions: NotRequired[ + "Literal['']|List[OrderUpdateParamsPaymentSettingsPaymentMethodOptionsKlarnaSubscription]" + ] + """ + Subscription details if setting up or charging a subscription. + """ + + +class OrderUpdateParamsPaymentSettingsPaymentMethodOptionsKlarnaOnDemand( + TypedDict, +): + average_amount: NotRequired[int] + """ + Your average amount value. You can use a value across your customer base, or segment based on customer type, country, etc. + """ + maximum_amount: NotRequired[int] + """ + The maximum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. + """ + minimum_amount: NotRequired[int] + """ + The lowest or minimum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. + """ + purchase_interval: NotRequired[Literal["day", "month", "week", "year"]] + """ + Interval at which the customer is making purchases + """ + purchase_interval_count: NotRequired[int] + """ + The number of `purchase_interval` between charges + """ + + +class OrderUpdateParamsPaymentSettingsPaymentMethodOptionsKlarnaSubscription( + TypedDict, +): + interval: Literal["day", "month", "week", "year"] + """ + Unit of time between subscription charges. + """ + interval_count: NotRequired[int] + """ + The number of intervals (specified in the `interval` attribute) between subscription charges. For example, `interval=month` and `interval_count=3` charges every 3 months. + """ + name: NotRequired[str] + """ + Name for subscription. + """ + next_billing: NotRequired[ + "OrderUpdateParamsPaymentSettingsPaymentMethodOptionsKlarnaSubscriptionNextBilling" + ] + """ + Describes the upcoming charge for this subscription. + """ + reference: str + """ + A non-customer-facing reference to correlate subscription charges in the Klarna app. Use a value that persists across subscription charges. + """ + + +class OrderUpdateParamsPaymentSettingsPaymentMethodOptionsKlarnaSubscriptionNextBilling( + TypedDict, +): + amount: int + """ + The amount of the next charge for the subscription. + """ + date: str + """ + The date of the next charge for the subscription in YYYY-MM-DD format. + """ + + +class OrderUpdateParamsPaymentSettingsPaymentMethodOptionsLink(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + persistent_token: NotRequired[str] + """ + [Deprecated] This is a legacy parameter that no longer has any function. + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class OrderUpdateParamsPaymentSettingsPaymentMethodOptionsOxxo(TypedDict): + expires_after_days: NotRequired[int] + """ + The number of calendar days before an OXXO voucher expires. For example, if you create an OXXO voucher on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time. + """ + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class OrderUpdateParamsPaymentSettingsPaymentMethodOptionsP24(TypedDict): + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + tos_shown_and_accepted: NotRequired[bool] + """ + Confirm that the payer has accepted the P24 terms and conditions. + """ + + +class OrderUpdateParamsPaymentSettingsPaymentMethodOptionsPaypal(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds will be captured from the customer's account. + """ + line_items: NotRequired[ + List[ + "OrderUpdateParamsPaymentSettingsPaymentMethodOptionsPaypalLineItem" + ] + ] + """ + The line items purchased by the customer. + """ + preferred_locale: NotRequired[ + Literal[ + "cs-CZ", + "da-DK", + "de-AT", + "de-DE", + "de-LU", + "el-GR", + "en-GB", + "en-US", + "es-ES", + "fi-FI", + "fr-BE", + "fr-FR", + "fr-LU", + "hu-HU", + "it-IT", + "nl-BE", + "nl-NL", + "pl-PL", + "pt-PT", + "sk-SK", + "sv-SE", + ] + ] + """ + [Preferred locale](https://stripe.com/docs/payments/paypal/supported-locales) of the PayPal checkout page that the customer is redirected to. + """ + reference: NotRequired[str] + """ + A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. + """ + reference_id: NotRequired[str] + """ + A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. + """ + risk_correlation_id: NotRequired[str] + """ + The risk correlation ID for an on-session payment using a saved PayPal payment method. + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + subsellers: NotRequired[List[str]] + """ + The Stripe connected account IDs of the sellers on the platform for this transaction (optional). Only allowed when [separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) are used. + """ + + +class OrderUpdateParamsPaymentSettingsPaymentMethodOptionsPaypalLineItem( + TypedDict, +): + category: NotRequired[ + Literal["digital_goods", "donation", "physical_goods"] + ] + """ + Type of the line item. + """ + description: NotRequired[str] + """ + Description of the line item. + """ + name: str + """ + Descriptive name of the line item. + """ + quantity: int + """ + Quantity of the line item. Must be a positive number. + """ + sku: NotRequired[str] + """ + Client facing stock keeping unit, article number or similar. + """ + sold_by: NotRequired[str] + """ + The Stripe account ID of the connected account that sells the item. + """ + tax: NotRequired[ + "OrderUpdateParamsPaymentSettingsPaymentMethodOptionsPaypalLineItemTax" + ] + """ + The tax information for the line item. + """ + unit_amount: int + """ + Price for a single unit of the line item in minor units. Cannot be a negative number. + """ + + +class OrderUpdateParamsPaymentSettingsPaymentMethodOptionsPaypalLineItemTax( + TypedDict, +): + amount: int + """ + The tax for a single unit of the line item in minor units. Cannot be a negative number. + """ + behavior: Literal["exclusive", "inclusive"] + """ + The tax behavior for the line item. + """ + + +class OrderUpdateParamsPaymentSettingsPaymentMethodOptionsSepaDebit(TypedDict): + mandate_options: NotRequired[ + "OrderUpdateParamsPaymentSettingsPaymentMethodOptionsSepaDebitMandateOptions" + ] + """ + Additional fields for Mandate creation + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session', 'on_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + target_date: NotRequired[str] + """ + Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + """ + + +class OrderUpdateParamsPaymentSettingsPaymentMethodOptionsSepaDebitMandateOptions( + TypedDict, +): + reference_prefix: NotRequired["Literal['']|str"] + """ + Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'. + """ + + +class OrderUpdateParamsPaymentSettingsPaymentMethodOptionsSofort(TypedDict): + preferred_language: NotRequired[ + "Literal['']|Literal['de', 'en', 'es', 'fr', 'it', 'nl', 'pl']" + ] + """ + Language shown to the payer on redirect. + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class OrderUpdateParamsPaymentSettingsPaymentMethodOptionsWechatPay(TypedDict): + app_id: NotRequired[str] + """ + The app ID registered with WeChat Pay. Only required when client is ios or android. + """ + client: NotRequired[Literal["android", "ios", "web"]] + """ + The client type that the end customer will pay from + """ + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class OrderUpdateParamsPaymentSettingsTransferData(TypedDict): + amount: NotRequired[int] + """ + The amount that will be transferred automatically when the order is paid. If no amount is set, the full amount is transferred. There cannot be any line items with recurring prices when using this field. + """ + destination: str + """ + ID of the Connected account receiving the transfer. + """ + + +class OrderUpdateParamsShippingCost(TypedDict): + shipping_rate: NotRequired[str] + """ + The ID of the shipping rate to use for this order. + """ + shipping_rate_data: NotRequired[ + "OrderUpdateParamsShippingCostShippingRateData" + ] + """ + Parameters to create a new ad-hoc shipping rate for this order. + """ + + +class OrderUpdateParamsShippingCostShippingRateData(TypedDict): + delivery_estimate: NotRequired[ + "OrderUpdateParamsShippingCostShippingRateDataDeliveryEstimate" + ] + """ + The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions. + """ + display_name: str + """ + The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions. + """ + fixed_amount: NotRequired[ + "OrderUpdateParamsShippingCostShippingRateDataFixedAmount" + ] + """ + Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + tax_behavior: NotRequired[Literal["exclusive", "inclusive", "unspecified"]] + """ + Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + """ + tax_code: NotRequired[str] + """ + A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`. + """ + type: NotRequired[Literal["fixed_amount"]] + """ + The type of calculation to use on the shipping rate. + """ + + +class OrderUpdateParamsShippingCostShippingRateDataDeliveryEstimate(TypedDict): + maximum: NotRequired[ + "OrderUpdateParamsShippingCostShippingRateDataDeliveryEstimateMaximum" + ] + """ + The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite. + """ + minimum: NotRequired[ + "OrderUpdateParamsShippingCostShippingRateDataDeliveryEstimateMinimum" + ] + """ + The lower bound of the estimated range. If empty, represents no lower bound. + """ + + +class OrderUpdateParamsShippingCostShippingRateDataDeliveryEstimateMaximum( + TypedDict, +): + unit: Literal["business_day", "day", "hour", "month", "week"] + """ + A unit of time. + """ + value: int + """ + Must be greater than 0. + """ + + +class OrderUpdateParamsShippingCostShippingRateDataDeliveryEstimateMinimum( + TypedDict, +): + unit: Literal["business_day", "day", "hour", "month", "week"] + """ + A unit of time. + """ + value: int + """ + Must be greater than 0. + """ + + +class OrderUpdateParamsShippingCostShippingRateDataFixedAmount(TypedDict): + amount: int + """ + A non-negative integer in cents representing how much to charge. + """ + 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). + """ + currency_options: NotRequired[ + Dict[ + str, + "OrderUpdateParamsShippingCostShippingRateDataFixedAmountCurrencyOptions", + ] + ] + """ + Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). + """ + + +class OrderUpdateParamsShippingCostShippingRateDataFixedAmountCurrencyOptions( + TypedDict, +): + amount: int + """ + A non-negative integer in cents representing how much to charge. + """ + tax_behavior: NotRequired[Literal["exclusive", "inclusive", "unspecified"]] + """ + Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + """ + + +class OrderUpdateParamsShippingDetails(TypedDict): + address: "OrderUpdateParamsShippingDetailsAddress" + """ + The shipping address for the order. + """ + name: str + """ + The name of the recipient of the order. + """ + phone: NotRequired["Literal['']|str"] + """ + The phone number (including extension) for the recipient of the order. + """ + + +class OrderUpdateParamsShippingDetailsAddress(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/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 OrderUpdateParamsTaxDetails(TypedDict): + tax_exempt: NotRequired["Literal['']|Literal['exempt', 'none', 'reverse']"] + """ + The purchaser's tax exemption status. One of `none`, `exempt`, or `reverse`. + """ + tax_ids: NotRequired[List["OrderUpdateParamsTaxDetailsTaxId"]] + """ + The purchaser's tax IDs to be used for this order. + """ + + +class OrderUpdateParamsTaxDetailsTaxId(TypedDict): + type: Literal[ + "ad_nrt", + "ae_trn", + "al_tin", + "am_tin", + "ao_tin", + "ar_cuit", + "au_abn", + "au_arn", + "aw_tin", + "az_tin", + "ba_tin", + "bb_tin", + "bd_bin", + "bf_ifu", + "bg_uic", + "bh_vat", + "bj_ifu", + "bo_tin", + "br_cnpj", + "br_cpf", + "bs_tin", + "by_tin", + "ca_bn", + "ca_gst_hst", + "ca_pst_bc", + "ca_pst_mb", + "ca_pst_sk", + "ca_qst", + "cd_nif", + "ch_uid", + "ch_vat", + "cl_tin", + "cm_niu", + "cn_tin", + "co_nit", + "cr_tin", + "cv_nif", + "de_stn", + "do_rcn", + "ec_ruc", + "eg_tin", + "es_cif", + "et_tin", + "eu_oss_vat", + "eu_vat", + "gb_vat", + "ge_vat", + "gn_nif", + "hk_br", + "hr_oib", + "hu_tin", + "id_npwp", + "il_vat", + "in_gst", + "is_vat", + "jp_cn", + "jp_rn", + "jp_trn", + "ke_pin", + "kg_tin", + "kh_tin", + "kr_brn", + "kz_bin", + "la_tin", + "li_uid", + "li_vat", + "ma_vat", + "md_vat", + "me_pib", + "mk_vat", + "mr_nif", + "mx_rfc", + "my_frp", + "my_itn", + "my_sst", + "ng_tin", + "no_vat", + "no_voec", + "np_pan", + "nz_gst", + "om_vat", + "pe_ruc", + "ph_tin", + "ro_tin", + "rs_pib", + "ru_inn", + "ru_kpp", + "sa_vat", + "sg_gst", + "sg_uen", + "si_tin", + "sn_ninea", + "sr_fin", + "sv_nit", + "th_vat", + "tj_tin", + "tr_tin", + "tw_vat", + "tz_vat", + "ua_vat", + "ug_tin", + "us_ein", + "uy_ruc", + "uz_tin", + "uz_vat", + "ve_rif", + "vn_tin", + "za_vat", + "zm_tin", + "zw_tin", + ] + """ + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `al_tin`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `aw_tin`, `az_tin`, `ba_tin`, `bb_tin`, `bd_bin`, `bf_ifu`, `bg_uic`, `bh_vat`, `bj_ifu`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cm_niu`, `cn_tin`, `co_nit`, `cr_tin`, `cv_nif`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `et_tin`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kg_tin`, `kh_tin`, `kr_brn`, `kz_bin`, `la_tin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin` + """ + value: str + """ + Value of the tax ID. + """ diff --git a/stripe/params/_payment_attempt_record_list_params.py b/stripe/params/_payment_attempt_record_list_params.py new file mode 100644 index 000000000..9993a6b2d --- /dev/null +++ b/stripe/params/_payment_attempt_record_list_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 PaymentAttemptRecordListParams(RequestOptions): + 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. + """ + payment_record: str + """ + The ID of the Payment Record. + """ diff --git a/stripe/params/_payment_attempt_record_retrieve_params.py b/stripe/params/_payment_attempt_record_retrieve_params.py new file mode 100644 index 000000000..ac1885172 --- /dev/null +++ b/stripe/params/_payment_attempt_record_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 PaymentAttemptRecordRetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_payment_intent_amount_details_line_item_list_params.py b/stripe/params/_payment_intent_amount_details_line_item_list_params.py new file mode 100644 index 000000000..08f66fc06 --- /dev/null +++ b/stripe/params/_payment_intent_amount_details_line_item_list_params.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import NotRequired, TypedDict + + +class PaymentIntentAmountDetailsLineItemListParams(TypedDict): + 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. + """ diff --git a/stripe/params/_payment_intent_apply_customer_balance_params.py b/stripe/params/_payment_intent_apply_customer_balance_params.py new file mode 100644 index 000000000..f3f3b05cc --- /dev/null +++ b/stripe/params/_payment_intent_apply_customer_balance_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 PaymentIntentApplyCustomerBalanceParams(RequestOptions): + amount: NotRequired[int] + """ + Amount that you intend to apply to this PaymentIntent from the customer's cash balance. If the PaymentIntent was created by an Invoice, the full amount of the PaymentIntent is applied regardless of this parameter. + + A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (for example, 100 cents to charge 1 USD or 100 to charge 100 JPY, a zero-decimal currency). The maximum amount is the amount of the PaymentIntent. + + When you omit the amount, it defaults to the remaining amount requested on the PaymentIntent. + """ + currency: NotRequired[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. + """ diff --git a/stripe/params/_payment_intent_cancel_params.py b/stripe/params/_payment_intent_cancel_params.py new file mode 100644 index 000000000..427711c1d --- /dev/null +++ b/stripe/params/_payment_intent_cancel_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 PaymentIntentCancelParams(RequestOptions): + cancellation_reason: NotRequired[ + Literal[ + "abandoned", "duplicate", "fraudulent", "requested_by_customer" + ] + ] + """ + Reason for canceling this PaymentIntent. Possible values are: `duplicate`, `fraudulent`, `requested_by_customer`, or `abandoned` + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_payment_intent_capture_params.py b/stripe/params/_payment_intent_capture_params.py new file mode 100644 index 000000000..443f35918 --- /dev/null +++ b/stripe/params/_payment_intent_capture_params.py @@ -0,0 +1,995 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List, Union +from typing_extensions import Literal, NotRequired, TypedDict + + +class PaymentIntentCaptureParams(RequestOptions): + amount_details: NotRequired["PaymentIntentCaptureParamsAmountDetails"] + """ + Provides industry-specific information about the amount. + """ + amount_to_capture: NotRequired[int] + """ + The amount to capture from the PaymentIntent, which must be less than or equal to the original amount. Defaults to the full `amount_capturable` if it's not provided. + """ + application_fee_amount: NotRequired[int] + """ + The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total amount captured. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + final_capture: NotRequired[bool] + """ + Defaults to `true`. When capturing a PaymentIntent, setting `final_capture` to `false` notifies Stripe to not release the remaining uncaptured funds to make sure that they're captured in future requests. You can only use this setting when [multicapture](https://stripe.com/docs/payments/multicapture) is available for PaymentIntents. + """ + hooks: NotRequired["PaymentIntentCaptureParamsHooks"] + """ + Automations to be run during the PaymentIntent lifecycle + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + payment_details: NotRequired[ + "Literal['']|PaymentIntentCaptureParamsPaymentDetails" + ] + """ + Provides industry-specific information about the charge. + """ + statement_descriptor: NotRequired[str] + """ + Text that appears on the customer's statement as the statement descriptor for a non-card charge. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see [the Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors). + + Setting this value for a card charge returns an error. For card charges, set the [statement_descriptor_suffix](https://docs.stripe.com/get-started/account/statement-descriptors#dynamic) instead. + """ + statement_descriptor_suffix: NotRequired[str] + """ + Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. + """ + transfer_data: NotRequired["PaymentIntentCaptureParamsTransferData"] + """ + The parameters that you can use to automatically create a transfer after the payment + is captured. Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + """ + + +class PaymentIntentCaptureParamsAmountDetails(TypedDict): + discount_amount: NotRequired["Literal['']|int"] + """ + The total discount applied on the transaction. + """ + line_items: NotRequired[ + "Literal['']|List[PaymentIntentCaptureParamsAmountDetailsLineItem]" + ] + """ + A list of line items, each containing information about a product in the PaymentIntent. There is a maximum of 100 line items. + """ + shipping: NotRequired[ + "Literal['']|PaymentIntentCaptureParamsAmountDetailsShipping" + ] + """ + Contains information about the shipping portion of the amount. + """ + tax: NotRequired["Literal['']|PaymentIntentCaptureParamsAmountDetailsTax"] + """ + Contains information about the tax portion of the amount. + """ + + +class PaymentIntentCaptureParamsAmountDetailsLineItem(TypedDict): + discount_amount: NotRequired[int] + """ + The amount an item was discounted for. Positive integer. + """ + payment_method_options: NotRequired[ + "PaymentIntentCaptureParamsAmountDetailsLineItemPaymentMethodOptions" + ] + """ + Payment method-specific information for line items. + """ + product_code: NotRequired[str] + """ + Unique identifier of the product. At most 12 characters long. + """ + product_name: str + """ + Name of the product. At most 100 characters long. + """ + quantity: int + """ + Number of items of the product. Positive integer. + """ + tax: NotRequired["PaymentIntentCaptureParamsAmountDetailsLineItemTax"] + """ + Contains information about the tax on the item. + """ + unit_cost: int + """ + Cost of the product. Non-negative integer. + """ + unit_of_measure: NotRequired[str] + """ + A unit of measure for the line item, such as gallons, feet, meters, etc. + """ + + +class PaymentIntentCaptureParamsAmountDetailsLineItemPaymentMethodOptions( + TypedDict, +): + card: NotRequired[ + "PaymentIntentCaptureParamsAmountDetailsLineItemPaymentMethodOptionsCard" + ] + """ + This sub-hash contains line item details that are specific to `card` payment method." + """ + card_present: NotRequired[ + "PaymentIntentCaptureParamsAmountDetailsLineItemPaymentMethodOptionsCardPresent" + ] + """ + This sub-hash contains line item details that are specific to `card_present` payment method." + """ + klarna: NotRequired[ + "PaymentIntentCaptureParamsAmountDetailsLineItemPaymentMethodOptionsKlarna" + ] + """ + This sub-hash contains line item details that are specific to `klarna` payment method." + """ + paypal: NotRequired[ + "PaymentIntentCaptureParamsAmountDetailsLineItemPaymentMethodOptionsPaypal" + ] + """ + This sub-hash contains line item details that are specific to `paypal` payment method." + """ + + +class PaymentIntentCaptureParamsAmountDetailsLineItemPaymentMethodOptionsCard( + TypedDict, +): + commodity_code: NotRequired[str] + """ + Identifier that categorizes the items being purchased using a standardized commodity scheme such as (but not limited to) UNSPSC, NAICS, NAPCS, etc. + """ + + +class PaymentIntentCaptureParamsAmountDetailsLineItemPaymentMethodOptionsCardPresent( + TypedDict, +): + commodity_code: NotRequired[str] + """ + Identifier that categorizes the items being purchased using a standardized commodity scheme such as (but not limited to) UNSPSC, NAICS, NAPCS, etc. + """ + + +class PaymentIntentCaptureParamsAmountDetailsLineItemPaymentMethodOptionsKlarna( + TypedDict, +): + image_url: NotRequired[str] + """ + URL to an image for the product. Max length, 4096 characters. + """ + product_url: NotRequired[str] + """ + URL to the product page. Max length, 4096 characters. + """ + subscription_reference: NotRequired[str] + """ + Reference for the subscription this line item is for. + """ + + +class PaymentIntentCaptureParamsAmountDetailsLineItemPaymentMethodOptionsPaypal( + TypedDict, +): + category: NotRequired[ + Literal["digital_goods", "donation", "physical_goods"] + ] + """ + Type of the line item. + """ + description: NotRequired[str] + """ + Description of the line item. + """ + sold_by: NotRequired[str] + """ + The Stripe account ID of the connected account that sells the item. + """ + + +class PaymentIntentCaptureParamsAmountDetailsLineItemTax(TypedDict): + total_tax_amount: int + """ + The total tax on an item. Non-negative integer. + """ + + +class PaymentIntentCaptureParamsAmountDetailsShipping(TypedDict): + amount: NotRequired["Literal['']|int"] + """ + Portion of the amount that is for shipping. + """ + from_postal_code: NotRequired["Literal['']|str"] + """ + The postal code that represents the shipping source. + """ + to_postal_code: NotRequired["Literal['']|str"] + """ + The postal code that represents the shipping destination. + """ + + +class PaymentIntentCaptureParamsAmountDetailsTax(TypedDict): + total_tax_amount: int + """ + Total portion of the amount that is for tax. + """ + + +class PaymentIntentCaptureParamsHooks(TypedDict): + inputs: NotRequired["PaymentIntentCaptureParamsHooksInputs"] + """ + Arguments passed in automations + """ + + +class PaymentIntentCaptureParamsHooksInputs(TypedDict): + tax: NotRequired["PaymentIntentCaptureParamsHooksInputsTax"] + """ + Tax arguments for automations + """ + + +class PaymentIntentCaptureParamsHooksInputsTax(TypedDict): + calculation: Union[Literal[""], str] + """ + The [TaxCalculation](https://stripe.com/docs/api/tax/calculations) id + """ + + +class PaymentIntentCaptureParamsPaymentDetails(TypedDict): + car_rental: NotRequired[ + "PaymentIntentCaptureParamsPaymentDetailsCarRental" + ] + """ + Car rental details for this PaymentIntent. + """ + customer_reference: NotRequired["Literal['']|str"] + """ + Some customers might be required by their company or organization to provide this information. If so, provide this value. Otherwise you can ignore this field. + """ + event_details: NotRequired[ + "PaymentIntentCaptureParamsPaymentDetailsEventDetails" + ] + """ + Event details for this PaymentIntent + """ + flight: NotRequired["PaymentIntentCaptureParamsPaymentDetailsFlight"] + """ + Flight reservation details for this PaymentIntent + """ + lodging: NotRequired["PaymentIntentCaptureParamsPaymentDetailsLodging"] + """ + Lodging reservation details for this PaymentIntent + """ + order_reference: NotRequired["Literal['']|str"] + """ + A unique value assigned by the business to identify the transaction. + """ + subscription: NotRequired[ + "PaymentIntentCaptureParamsPaymentDetailsSubscription" + ] + """ + Subscription details for this PaymentIntent + """ + + +class PaymentIntentCaptureParamsPaymentDetailsCarRental(TypedDict): + affiliate: NotRequired[ + "PaymentIntentCaptureParamsPaymentDetailsCarRentalAffiliate" + ] + """ + Affiliate details for this purchase. + """ + booking_number: str + """ + The booking number associated with the car rental. + """ + car_class_code: NotRequired[str] + """ + Class code of the car. + """ + car_make: NotRequired[str] + """ + Make of the car. + """ + car_model: NotRequired[str] + """ + Model of the car. + """ + company: NotRequired[str] + """ + The name of the rental car company. + """ + customer_service_phone_number: NotRequired[str] + """ + The customer service phone number of the car rental company. + """ + days_rented: int + """ + Number of days the car is being rented. + """ + delivery: NotRequired[ + "PaymentIntentCaptureParamsPaymentDetailsCarRentalDelivery" + ] + """ + Delivery details for this purchase. + """ + distance: NotRequired[ + "PaymentIntentCaptureParamsPaymentDetailsCarRentalDistance" + ] + """ + The details of the distance traveled during the rental period. + """ + drivers: NotRequired[ + List["PaymentIntentCaptureParamsPaymentDetailsCarRentalDriver"] + ] + """ + The details of the passengers in the travel reservation + """ + extra_charges: NotRequired[ + List[ + Literal[ + "extra_mileage", + "gas", + "late_return", + "one_way_service", + "parking_violation", + ] + ] + ] + """ + List of additional charges being billed. + """ + no_show: NotRequired[bool] + """ + Indicates if the customer did not keep nor cancel their booking. + """ + pickup_address: NotRequired[ + "PaymentIntentCaptureParamsPaymentDetailsCarRentalPickupAddress" + ] + """ + Car pick-up address. + """ + pickup_at: int + """ + Car pick-up time. Measured in seconds since the Unix epoch. + """ + pickup_location_name: NotRequired[str] + """ + Name of the pickup location. + """ + rate_amount: NotRequired[int] + """ + Rental rate. + """ + rate_interval: NotRequired[Literal["day", "month", "week"]] + """ + The frequency at which the rate amount is applied. One of `day`, `week` or `month` + """ + renter_name: NotRequired[str] + """ + The name of the person or entity renting the car. + """ + return_address: NotRequired[ + "PaymentIntentCaptureParamsPaymentDetailsCarRentalReturnAddress" + ] + """ + Car return address. + """ + return_at: int + """ + Car return time. Measured in seconds since the Unix epoch. + """ + return_location_name: NotRequired[str] + """ + Name of the return location. + """ + tax_exempt: NotRequired[bool] + """ + Indicates whether the goods or services are tax-exempt or tax is not collected. + """ + vehicle_identification_number: NotRequired[str] + """ + The vehicle identification number. + """ + + +class PaymentIntentCaptureParamsPaymentDetailsCarRentalAffiliate(TypedDict): + name: str + """ + The name of the affiliate that originated the purchase. + """ + + +class PaymentIntentCaptureParamsPaymentDetailsCarRentalDelivery(TypedDict): + mode: NotRequired[Literal["email", "phone", "pickup", "post"]] + """ + The delivery method for the payment + """ + recipient: NotRequired[ + "PaymentIntentCaptureParamsPaymentDetailsCarRentalDeliveryRecipient" + ] + """ + Details of the recipient. + """ + + +class PaymentIntentCaptureParamsPaymentDetailsCarRentalDeliveryRecipient( + TypedDict, +): + email: NotRequired[str] + """ + The email of the recipient the ticket is delivered to. + """ + name: NotRequired[str] + """ + The name of the recipient the ticket is delivered to. + """ + phone: NotRequired[str] + """ + The phone number of the recipient the ticket is delivered to. + """ + + +class PaymentIntentCaptureParamsPaymentDetailsCarRentalDistance(TypedDict): + amount: NotRequired[int] + """ + Distance traveled. + """ + unit: NotRequired[Literal["kilometers", "miles"]] + """ + Unit of measurement for the distance traveled. One of `miles` or `kilometers`. + """ + + +class PaymentIntentCaptureParamsPaymentDetailsCarRentalDriver(TypedDict): + driver_identification_number: NotRequired[str] + """ + Driver's identification number. + """ + driver_tax_number: NotRequired[str] + """ + Driver's tax number. + """ + name: str + """ + Full name of the person or entity on the car reservation. + """ + + +class PaymentIntentCaptureParamsPaymentDetailsCarRentalPickupAddress( + 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. + """ + + +class PaymentIntentCaptureParamsPaymentDetailsCarRentalReturnAddress( + 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. + """ + + +class PaymentIntentCaptureParamsPaymentDetailsEventDetails(TypedDict): + access_controlled_venue: NotRequired[bool] + """ + Indicates if the tickets are digitally checked when entering the venue. + """ + address: NotRequired[ + "PaymentIntentCaptureParamsPaymentDetailsEventDetailsAddress" + ] + """ + The event location's address. + """ + affiliate: NotRequired[ + "PaymentIntentCaptureParamsPaymentDetailsEventDetailsAffiliate" + ] + """ + Affiliate details for this purchase. + """ + company: NotRequired[str] + """ + The name of the company + """ + delivery: NotRequired[ + "PaymentIntentCaptureParamsPaymentDetailsEventDetailsDelivery" + ] + """ + Delivery details for this purchase. + """ + ends_at: NotRequired[int] + """ + Event end time. Measured in seconds since the Unix epoch. + """ + genre: NotRequired[str] + """ + Type of the event entertainment (concert, sports event etc) + """ + name: str + """ + The name of the event. + """ + starts_at: NotRequired[int] + """ + Event start time. Measured in seconds since the Unix epoch. + """ + + +class PaymentIntentCaptureParamsPaymentDetailsEventDetailsAddress(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. + """ + + +class PaymentIntentCaptureParamsPaymentDetailsEventDetailsAffiliate(TypedDict): + name: str + """ + The name of the affiliate that originated the purchase. + """ + + +class PaymentIntentCaptureParamsPaymentDetailsEventDetailsDelivery(TypedDict): + mode: NotRequired[Literal["email", "phone", "pickup", "post"]] + """ + The delivery method for the payment + """ + recipient: NotRequired[ + "PaymentIntentCaptureParamsPaymentDetailsEventDetailsDeliveryRecipient" + ] + """ + Details of the recipient. + """ + + +class PaymentIntentCaptureParamsPaymentDetailsEventDetailsDeliveryRecipient( + TypedDict, +): + email: NotRequired[str] + """ + The email of the recipient the ticket is delivered to. + """ + name: NotRequired[str] + """ + The name of the recipient the ticket is delivered to. + """ + phone: NotRequired[str] + """ + The phone number of the recipient the ticket is delivered to. + """ + + +class PaymentIntentCaptureParamsPaymentDetailsFlight(TypedDict): + affiliate: NotRequired[ + "PaymentIntentCaptureParamsPaymentDetailsFlightAffiliate" + ] + """ + Affiliate details for this purchase. + """ + agency_number: NotRequired[str] + """ + The agency number (i.e. International Air Transport Association (IATA) agency number) of the travel agency that made the booking. + """ + carrier: NotRequired[str] + """ + The International Air Transport Association (IATA) carrier code of the carrier that issued the ticket. + """ + delivery: NotRequired[ + "PaymentIntentCaptureParamsPaymentDetailsFlightDelivery" + ] + """ + Delivery details for this purchase. + """ + passenger_name: NotRequired[str] + """ + The name of the person or entity on the reservation. + """ + passengers: NotRequired[ + List["PaymentIntentCaptureParamsPaymentDetailsFlightPassenger"] + ] + """ + The details of the passengers in the travel reservation. + """ + segments: List["PaymentIntentCaptureParamsPaymentDetailsFlightSegment"] + """ + The individual flight segments associated with the trip. + """ + ticket_number: NotRequired[str] + """ + The ticket number associated with the travel reservation. + """ + + +class PaymentIntentCaptureParamsPaymentDetailsFlightAffiliate(TypedDict): + name: str + """ + The name of the affiliate that originated the purchase. + """ + + +class PaymentIntentCaptureParamsPaymentDetailsFlightDelivery(TypedDict): + mode: NotRequired[Literal["email", "phone", "pickup", "post"]] + """ + The delivery method for the payment + """ + recipient: NotRequired[ + "PaymentIntentCaptureParamsPaymentDetailsFlightDeliveryRecipient" + ] + """ + Details of the recipient. + """ + + +class PaymentIntentCaptureParamsPaymentDetailsFlightDeliveryRecipient( + TypedDict, +): + email: NotRequired[str] + """ + The email of the recipient the ticket is delivered to. + """ + name: NotRequired[str] + """ + The name of the recipient the ticket is delivered to. + """ + phone: NotRequired[str] + """ + The phone number of the recipient the ticket is delivered to. + """ + + +class PaymentIntentCaptureParamsPaymentDetailsFlightPassenger(TypedDict): + name: str + """ + Full name of the person or entity on the flight reservation. + """ + + +class PaymentIntentCaptureParamsPaymentDetailsFlightSegment(TypedDict): + amount: NotRequired[int] + """ + The flight segment amount. + """ + arrival_airport: NotRequired[str] + """ + The International Air Transport Association (IATA) airport code for the arrival airport. + """ + arrives_at: NotRequired[int] + """ + The arrival time for the flight segment. Measured in seconds since the Unix epoch. + """ + carrier: NotRequired[str] + """ + The International Air Transport Association (IATA) carrier code of the carrier operating the flight segment. + """ + departs_at: int + """ + The departure time for the flight segment. Measured in seconds since the Unix epoch. + """ + departure_airport: NotRequired[str] + """ + The International Air Transport Association (IATA) airport code for the departure airport. + """ + flight_number: NotRequired[str] + """ + The flight number associated with the segment + """ + service_class: NotRequired[ + Literal["business", "economy", "first", "premium_economy"] + ] + """ + The fare class for the segment. + """ + + +class PaymentIntentCaptureParamsPaymentDetailsLodging(TypedDict): + address: NotRequired[ + "PaymentIntentCaptureParamsPaymentDetailsLodgingAddress" + ] + """ + The lodging location's address. + """ + adults: NotRequired[int] + """ + The number of adults on the booking + """ + affiliate: NotRequired[ + "PaymentIntentCaptureParamsPaymentDetailsLodgingAffiliate" + ] + """ + Affiliate details for this purchase. + """ + booking_number: NotRequired[str] + """ + The booking number associated with the lodging reservation. + """ + category: NotRequired[Literal["hotel", "vacation_rental"]] + """ + The lodging category + """ + checkin_at: int + """ + Lodging check-in time. Measured in seconds since the Unix epoch. + """ + checkout_at: int + """ + Lodging check-out time. Measured in seconds since the Unix epoch. + """ + customer_service_phone_number: NotRequired[str] + """ + The customer service phone number of the lodging company. + """ + daily_room_rate_amount: NotRequired[int] + """ + The daily lodging room rate. + """ + delivery: NotRequired[ + "PaymentIntentCaptureParamsPaymentDetailsLodgingDelivery" + ] + """ + Delivery details for this purchase. + """ + extra_charges: NotRequired[ + List[ + Literal[ + "gift_shop", + "laundry", + "mini_bar", + "other", + "restaurant", + "telephone", + ] + ] + ] + """ + List of additional charges being billed. + """ + fire_safety_act_compliance: NotRequired[bool] + """ + Indicates whether the lodging location is compliant with the Fire Safety Act. + """ + name: NotRequired[str] + """ + The name of the lodging location. + """ + no_show: NotRequired[bool] + """ + Indicates if the customer did not keep their booking while failing to cancel the reservation. + """ + number_of_rooms: NotRequired[int] + """ + The number of rooms on the booking + """ + passengers: NotRequired[ + List["PaymentIntentCaptureParamsPaymentDetailsLodgingPassenger"] + ] + """ + The details of the passengers in the travel reservation + """ + property_phone_number: NotRequired[str] + """ + The phone number of the lodging location. + """ + room_class: NotRequired[str] + """ + The room class for this purchase. + """ + room_nights: NotRequired[int] + """ + The number of room nights + """ + total_room_tax_amount: NotRequired[int] + """ + The total tax amount associating with the room reservation. + """ + total_tax_amount: NotRequired[int] + """ + The total tax amount + """ + + +class PaymentIntentCaptureParamsPaymentDetailsLodgingAddress(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. + """ + + +class PaymentIntentCaptureParamsPaymentDetailsLodgingAffiliate(TypedDict): + name: str + """ + The name of the affiliate that originated the purchase. + """ + + +class PaymentIntentCaptureParamsPaymentDetailsLodgingDelivery(TypedDict): + mode: NotRequired[Literal["email", "phone", "pickup", "post"]] + """ + The delivery method for the payment + """ + recipient: NotRequired[ + "PaymentIntentCaptureParamsPaymentDetailsLodgingDeliveryRecipient" + ] + """ + Details of the recipient. + """ + + +class PaymentIntentCaptureParamsPaymentDetailsLodgingDeliveryRecipient( + TypedDict, +): + email: NotRequired[str] + """ + The email of the recipient the ticket is delivered to. + """ + name: NotRequired[str] + """ + The name of the recipient the ticket is delivered to. + """ + phone: NotRequired[str] + """ + The phone number of the recipient the ticket is delivered to. + """ + + +class PaymentIntentCaptureParamsPaymentDetailsLodgingPassenger(TypedDict): + name: str + """ + Full name of the person or entity on the lodging reservation. + """ + + +class PaymentIntentCaptureParamsPaymentDetailsSubscription(TypedDict): + affiliate: NotRequired[ + "PaymentIntentCaptureParamsPaymentDetailsSubscriptionAffiliate" + ] + """ + Affiliate details for this purchase. + """ + auto_renewal: NotRequired[bool] + """ + Info whether the subscription will be auto renewed upon expiry. + """ + billing_interval: NotRequired[ + "PaymentIntentCaptureParamsPaymentDetailsSubscriptionBillingInterval" + ] + """ + Subscription billing details for this purchase. + """ + ends_at: NotRequired[int] + """ + Subscription end time. Measured in seconds since the Unix epoch. + """ + name: str + """ + Name of the product on subscription. e.g. Apple Music Subscription + """ + starts_at: NotRequired[int] + """ + Subscription start time. Measured in seconds since the Unix epoch. + """ + + +class PaymentIntentCaptureParamsPaymentDetailsSubscriptionAffiliate(TypedDict): + name: str + """ + The name of the affiliate that originated the purchase. + """ + + +class PaymentIntentCaptureParamsPaymentDetailsSubscriptionBillingInterval( + TypedDict, +): + count: int + """ + The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + """ + interval: Literal["day", "month", "week", "year"] + """ + Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + """ + + +class PaymentIntentCaptureParamsTransferData(TypedDict): + amount: NotRequired[int] + """ + The amount that will be transferred automatically when a charge succeeds. + """ diff --git a/stripe/params/_payment_intent_confirm_params.py b/stripe/params/_payment_intent_confirm_params.py new file mode 100644 index 000000000..25c31d7e2 --- /dev/null +++ b/stripe/params/_payment_intent_confirm_params.py @@ -0,0 +1,4385 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List, Union +from typing_extensions import Literal, NotRequired, TypedDict + + +class PaymentIntentConfirmParams(RequestOptions): + amount_details: NotRequired[ + "Literal['']|PaymentIntentConfirmParamsAmountDetails" + ] + """ + Provides industry-specific information about the amount. + """ + application_fee_amount: NotRequired["Literal['']|int"] + """ + The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total amount captured. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + """ + capture_method: NotRequired[ + Literal["automatic", "automatic_async", "manual"] + ] + """ + Controls when the funds will be captured from the customer's account. + """ + confirmation_token: NotRequired[str] + """ + ID of the ConfirmationToken used to confirm this PaymentIntent. + + If the provided ConfirmationToken contains properties that are also being provided in this request, such as `payment_method`, then the values in this request will take precedence. + """ + error_on_requires_action: NotRequired[bool] + """ + Set to `true` to fail the payment attempt if the PaymentIntent transitions into `requires_action`. This parameter is intended for simpler integrations that do not handle customer actions, like [saving cards without authentication](https://stripe.com/docs/payments/save-card-without-authentication). + """ + excluded_payment_method_types: NotRequired[ + "Literal['']|List[Literal['acss_debit', 'affirm', 'afterpay_clearpay', 'alipay', 'alma', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'billie', 'blik', 'boleto', 'card', 'cashapp', 'crypto', 'customer_balance', 'eps', 'fpx', 'giropay', 'gopay', 'grabpay', 'id_bank_transfer', 'ideal', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'mb_way', 'mobilepay', 'multibanco', 'naver_pay', 'nz_bank_account', 'oxxo', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'paypay', 'payto', 'pix', 'promptpay', 'qris', 'rechnung', 'revolut_pay', 'samsung_pay', 'satispay', 'sepa_debit', 'shopeepay', 'sofort', 'stripe_balance', 'swish', 'twint', 'us_bank_account', 'wechat_pay', 'zip']]" + ] + """ + The list of payment method types to exclude from use with this payment. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + fx_quote: NotRequired[str] + """ + The FX rate in the quote is validated and used to convert the presentment amount to the settlement amount. + """ + hooks: NotRequired["PaymentIntentConfirmParamsHooks"] + """ + Automations to be run during the PaymentIntent lifecycle + """ + mandate: NotRequired[str] + """ + ID of the mandate that's used for this payment. + """ + mandate_data: NotRequired[ + "Literal['']|PaymentIntentConfirmParamsMandateData" + ] + off_session: NotRequired["bool|Literal['one_off', 'recurring']"] + """ + Set to `true` to indicate that the customer isn't in your checkout flow during this payment attempt and can't authenticate. Use this parameter in scenarios where you collect card details and [charge them later](https://stripe.com/docs/payments/cards/charging-saved-cards). + """ + payment_details: NotRequired[ + "Literal['']|PaymentIntentConfirmParamsPaymentDetails" + ] + """ + Provides industry-specific information about the charge. + """ + payment_method: NotRequired[str] + """ + ID of the payment method (a PaymentMethod, Card, or [compatible Source](https://stripe.com/docs/payments/payment-methods/transitioning#compatibility) object) to attach to this PaymentIntent. + If the payment method is attached to a Customer, it must match the [customer](https://stripe.com/docs/api#create_payment_intent-customer) that is set on this PaymentIntent. + """ + payment_method_data: NotRequired[ + "PaymentIntentConfirmParamsPaymentMethodData" + ] + """ + If provided, this hash will be used to create a PaymentMethod. The new PaymentMethod will appear + in the [payment_method](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-payment_method) + property on the PaymentIntent. + """ + payment_method_options: NotRequired[ + "PaymentIntentConfirmParamsPaymentMethodOptions" + ] + """ + Payment method-specific configuration for this PaymentIntent. + """ + payment_method_types: NotRequired[List[str]] + """ + The list of payment method types (for example, a card) that this PaymentIntent can use. Use `automatic_payment_methods` to manage payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). A list of valid payment method types can be found [here](https://docs.stripe.com/api/payment_methods/object#payment_method_object-type). + """ + radar_options: NotRequired["PaymentIntentConfirmParamsRadarOptions"] + """ + Options to configure Radar. Learn more about [Radar Sessions](https://stripe.com/docs/radar/radar-session). + """ + receipt_email: NotRequired["Literal['']|str"] + """ + Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). + """ + return_url: NotRequired[str] + """ + The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. + If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. + This parameter is only used for cards and other redirect-based payment methods. + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['off_session', 'on_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + shipping: NotRequired["Literal['']|PaymentIntentConfirmParamsShipping"] + """ + Shipping information for this PaymentIntent. + """ + use_stripe_sdk: NotRequired[bool] + """ + Set to `true` when confirming server-side and using Stripe.js, iOS, or Android client-side SDKs to handle the next actions. + """ + + +class PaymentIntentConfirmParamsAmountDetails(TypedDict): + discount_amount: NotRequired["Literal['']|int"] + """ + The total discount applied on the transaction. + """ + line_items: NotRequired[ + "Literal['']|List[PaymentIntentConfirmParamsAmountDetailsLineItem]" + ] + """ + A list of line items, each containing information about a product in the PaymentIntent. There is a maximum of 100 line items. + """ + shipping: NotRequired[ + "Literal['']|PaymentIntentConfirmParamsAmountDetailsShipping" + ] + """ + Contains information about the shipping portion of the amount. + """ + tax: NotRequired["Literal['']|PaymentIntentConfirmParamsAmountDetailsTax"] + """ + Contains information about the tax portion of the amount. + """ + + +class PaymentIntentConfirmParamsAmountDetailsLineItem(TypedDict): + discount_amount: NotRequired[int] + """ + The amount an item was discounted for. Positive integer. + """ + payment_method_options: NotRequired[ + "PaymentIntentConfirmParamsAmountDetailsLineItemPaymentMethodOptions" + ] + """ + Payment method-specific information for line items. + """ + product_code: NotRequired[str] + """ + Unique identifier of the product. At most 12 characters long. + """ + product_name: str + """ + Name of the product. At most 100 characters long. + """ + quantity: int + """ + Number of items of the product. Positive integer. + """ + tax: NotRequired["PaymentIntentConfirmParamsAmountDetailsLineItemTax"] + """ + Contains information about the tax on the item. + """ + unit_cost: int + """ + Cost of the product. Non-negative integer. + """ + unit_of_measure: NotRequired[str] + """ + A unit of measure for the line item, such as gallons, feet, meters, etc. + """ + + +class PaymentIntentConfirmParamsAmountDetailsLineItemPaymentMethodOptions( + TypedDict, +): + card: NotRequired[ + "PaymentIntentConfirmParamsAmountDetailsLineItemPaymentMethodOptionsCard" + ] + """ + This sub-hash contains line item details that are specific to `card` payment method." + """ + card_present: NotRequired[ + "PaymentIntentConfirmParamsAmountDetailsLineItemPaymentMethodOptionsCardPresent" + ] + """ + This sub-hash contains line item details that are specific to `card_present` payment method." + """ + klarna: NotRequired[ + "PaymentIntentConfirmParamsAmountDetailsLineItemPaymentMethodOptionsKlarna" + ] + """ + This sub-hash contains line item details that are specific to `klarna` payment method." + """ + paypal: NotRequired[ + "PaymentIntentConfirmParamsAmountDetailsLineItemPaymentMethodOptionsPaypal" + ] + """ + This sub-hash contains line item details that are specific to `paypal` payment method." + """ + + +class PaymentIntentConfirmParamsAmountDetailsLineItemPaymentMethodOptionsCard( + TypedDict, +): + commodity_code: NotRequired[str] + """ + Identifier that categorizes the items being purchased using a standardized commodity scheme such as (but not limited to) UNSPSC, NAICS, NAPCS, etc. + """ + + +class PaymentIntentConfirmParamsAmountDetailsLineItemPaymentMethodOptionsCardPresent( + TypedDict, +): + commodity_code: NotRequired[str] + """ + Identifier that categorizes the items being purchased using a standardized commodity scheme such as (but not limited to) UNSPSC, NAICS, NAPCS, etc. + """ + + +class PaymentIntentConfirmParamsAmountDetailsLineItemPaymentMethodOptionsKlarna( + TypedDict, +): + image_url: NotRequired[str] + """ + URL to an image for the product. Max length, 4096 characters. + """ + product_url: NotRequired[str] + """ + URL to the product page. Max length, 4096 characters. + """ + subscription_reference: NotRequired[str] + """ + Reference for the subscription this line item is for. + """ + + +class PaymentIntentConfirmParamsAmountDetailsLineItemPaymentMethodOptionsPaypal( + TypedDict, +): + category: NotRequired[ + Literal["digital_goods", "donation", "physical_goods"] + ] + """ + Type of the line item. + """ + description: NotRequired[str] + """ + Description of the line item. + """ + sold_by: NotRequired[str] + """ + The Stripe account ID of the connected account that sells the item. + """ + + +class PaymentIntentConfirmParamsAmountDetailsLineItemTax(TypedDict): + total_tax_amount: int + """ + The total tax on an item. Non-negative integer. + """ + + +class PaymentIntentConfirmParamsAmountDetailsShipping(TypedDict): + amount: NotRequired["Literal['']|int"] + """ + Portion of the amount that is for shipping. + """ + from_postal_code: NotRequired["Literal['']|str"] + """ + The postal code that represents the shipping source. + """ + to_postal_code: NotRequired["Literal['']|str"] + """ + The postal code that represents the shipping destination. + """ + + +class PaymentIntentConfirmParamsAmountDetailsTax(TypedDict): + total_tax_amount: int + """ + Total portion of the amount that is for tax. + """ + + +class PaymentIntentConfirmParamsHooks(TypedDict): + inputs: NotRequired["PaymentIntentConfirmParamsHooksInputs"] + """ + Arguments passed in automations + """ + + +class PaymentIntentConfirmParamsHooksInputs(TypedDict): + tax: NotRequired["PaymentIntentConfirmParamsHooksInputsTax"] + """ + Tax arguments for automations + """ + + +class PaymentIntentConfirmParamsHooksInputsTax(TypedDict): + calculation: Union[Literal[""], str] + """ + The [TaxCalculation](https://stripe.com/docs/api/tax/calculations) id + """ + + +class PaymentIntentConfirmParamsMandateData(TypedDict): + customer_acceptance: NotRequired[ + "PaymentIntentConfirmParamsMandateDataCustomerAcceptance" + ] + """ + This hash contains details about the customer acceptance of the Mandate. + """ + + +class PaymentIntentConfirmParamsMandateDataCustomerAcceptance(TypedDict): + accepted_at: NotRequired[int] + """ + The time at which the customer accepted the Mandate. + """ + offline: NotRequired[ + "PaymentIntentConfirmParamsMandateDataCustomerAcceptanceOffline" + ] + """ + If this is a Mandate accepted offline, this hash contains details about the offline acceptance. + """ + online: NotRequired[ + "PaymentIntentConfirmParamsMandateDataCustomerAcceptanceOnline" + ] + """ + If this is a Mandate accepted online, this hash contains details about the online acceptance. + """ + type: Literal["offline", "online"] + """ + The type of customer acceptance information included with the Mandate. One of `online` or `offline`. + """ + + +class PaymentIntentConfirmParamsMandateDataCustomerAcceptanceOffline( + TypedDict +): + pass + + +class PaymentIntentConfirmParamsMandateDataCustomerAcceptanceOnline(TypedDict): + ip_address: NotRequired[str] + """ + The IP address from which the Mandate was accepted by the customer. + """ + user_agent: NotRequired[str] + """ + The user agent of the browser from which the Mandate was accepted by the customer. + """ + + +class PaymentIntentConfirmParamsPaymentDetails(TypedDict): + car_rental: NotRequired[ + "PaymentIntentConfirmParamsPaymentDetailsCarRental" + ] + """ + Car rental details for this PaymentIntent. + """ + customer_reference: NotRequired["Literal['']|str"] + """ + Some customers might be required by their company or organization to provide this information. If so, provide this value. Otherwise you can ignore this field. + """ + event_details: NotRequired[ + "PaymentIntentConfirmParamsPaymentDetailsEventDetails" + ] + """ + Event details for this PaymentIntent + """ + flight: NotRequired["PaymentIntentConfirmParamsPaymentDetailsFlight"] + """ + Flight reservation details for this PaymentIntent + """ + lodging: NotRequired["PaymentIntentConfirmParamsPaymentDetailsLodging"] + """ + Lodging reservation details for this PaymentIntent + """ + order_reference: NotRequired["Literal['']|str"] + """ + A unique value assigned by the business to identify the transaction. + """ + subscription: NotRequired[ + "PaymentIntentConfirmParamsPaymentDetailsSubscription" + ] + """ + Subscription details for this PaymentIntent + """ + + +class PaymentIntentConfirmParamsPaymentDetailsCarRental(TypedDict): + affiliate: NotRequired[ + "PaymentIntentConfirmParamsPaymentDetailsCarRentalAffiliate" + ] + """ + Affiliate details for this purchase. + """ + booking_number: str + """ + The booking number associated with the car rental. + """ + car_class_code: NotRequired[str] + """ + Class code of the car. + """ + car_make: NotRequired[str] + """ + Make of the car. + """ + car_model: NotRequired[str] + """ + Model of the car. + """ + company: NotRequired[str] + """ + The name of the rental car company. + """ + customer_service_phone_number: NotRequired[str] + """ + The customer service phone number of the car rental company. + """ + days_rented: int + """ + Number of days the car is being rented. + """ + delivery: NotRequired[ + "PaymentIntentConfirmParamsPaymentDetailsCarRentalDelivery" + ] + """ + Delivery details for this purchase. + """ + distance: NotRequired[ + "PaymentIntentConfirmParamsPaymentDetailsCarRentalDistance" + ] + """ + The details of the distance traveled during the rental period. + """ + drivers: NotRequired[ + List["PaymentIntentConfirmParamsPaymentDetailsCarRentalDriver"] + ] + """ + The details of the passengers in the travel reservation + """ + extra_charges: NotRequired[ + List[ + Literal[ + "extra_mileage", + "gas", + "late_return", + "one_way_service", + "parking_violation", + ] + ] + ] + """ + List of additional charges being billed. + """ + no_show: NotRequired[bool] + """ + Indicates if the customer did not keep nor cancel their booking. + """ + pickup_address: NotRequired[ + "PaymentIntentConfirmParamsPaymentDetailsCarRentalPickupAddress" + ] + """ + Car pick-up address. + """ + pickup_at: int + """ + Car pick-up time. Measured in seconds since the Unix epoch. + """ + pickup_location_name: NotRequired[str] + """ + Name of the pickup location. + """ + rate_amount: NotRequired[int] + """ + Rental rate. + """ + rate_interval: NotRequired[Literal["day", "month", "week"]] + """ + The frequency at which the rate amount is applied. One of `day`, `week` or `month` + """ + renter_name: NotRequired[str] + """ + The name of the person or entity renting the car. + """ + return_address: NotRequired[ + "PaymentIntentConfirmParamsPaymentDetailsCarRentalReturnAddress" + ] + """ + Car return address. + """ + return_at: int + """ + Car return time. Measured in seconds since the Unix epoch. + """ + return_location_name: NotRequired[str] + """ + Name of the return location. + """ + tax_exempt: NotRequired[bool] + """ + Indicates whether the goods or services are tax-exempt or tax is not collected. + """ + vehicle_identification_number: NotRequired[str] + """ + The vehicle identification number. + """ + + +class PaymentIntentConfirmParamsPaymentDetailsCarRentalAffiliate(TypedDict): + name: str + """ + The name of the affiliate that originated the purchase. + """ + + +class PaymentIntentConfirmParamsPaymentDetailsCarRentalDelivery(TypedDict): + mode: NotRequired[Literal["email", "phone", "pickup", "post"]] + """ + The delivery method for the payment + """ + recipient: NotRequired[ + "PaymentIntentConfirmParamsPaymentDetailsCarRentalDeliveryRecipient" + ] + """ + Details of the recipient. + """ + + +class PaymentIntentConfirmParamsPaymentDetailsCarRentalDeliveryRecipient( + TypedDict, +): + email: NotRequired[str] + """ + The email of the recipient the ticket is delivered to. + """ + name: NotRequired[str] + """ + The name of the recipient the ticket is delivered to. + """ + phone: NotRequired[str] + """ + The phone number of the recipient the ticket is delivered to. + """ + + +class PaymentIntentConfirmParamsPaymentDetailsCarRentalDistance(TypedDict): + amount: NotRequired[int] + """ + Distance traveled. + """ + unit: NotRequired[Literal["kilometers", "miles"]] + """ + Unit of measurement for the distance traveled. One of `miles` or `kilometers`. + """ + + +class PaymentIntentConfirmParamsPaymentDetailsCarRentalDriver(TypedDict): + driver_identification_number: NotRequired[str] + """ + Driver's identification number. + """ + driver_tax_number: NotRequired[str] + """ + Driver's tax number. + """ + name: str + """ + Full name of the person or entity on the car reservation. + """ + + +class PaymentIntentConfirmParamsPaymentDetailsCarRentalPickupAddress( + 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. + """ + + +class PaymentIntentConfirmParamsPaymentDetailsCarRentalReturnAddress( + 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. + """ + + +class PaymentIntentConfirmParamsPaymentDetailsEventDetails(TypedDict): + access_controlled_venue: NotRequired[bool] + """ + Indicates if the tickets are digitally checked when entering the venue. + """ + address: NotRequired[ + "PaymentIntentConfirmParamsPaymentDetailsEventDetailsAddress" + ] + """ + The event location's address. + """ + affiliate: NotRequired[ + "PaymentIntentConfirmParamsPaymentDetailsEventDetailsAffiliate" + ] + """ + Affiliate details for this purchase. + """ + company: NotRequired[str] + """ + The name of the company + """ + delivery: NotRequired[ + "PaymentIntentConfirmParamsPaymentDetailsEventDetailsDelivery" + ] + """ + Delivery details for this purchase. + """ + ends_at: NotRequired[int] + """ + Event end time. Measured in seconds since the Unix epoch. + """ + genre: NotRequired[str] + """ + Type of the event entertainment (concert, sports event etc) + """ + name: str + """ + The name of the event. + """ + starts_at: NotRequired[int] + """ + Event start time. Measured in seconds since the Unix epoch. + """ + + +class PaymentIntentConfirmParamsPaymentDetailsEventDetailsAddress(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. + """ + + +class PaymentIntentConfirmParamsPaymentDetailsEventDetailsAffiliate(TypedDict): + name: str + """ + The name of the affiliate that originated the purchase. + """ + + +class PaymentIntentConfirmParamsPaymentDetailsEventDetailsDelivery(TypedDict): + mode: NotRequired[Literal["email", "phone", "pickup", "post"]] + """ + The delivery method for the payment + """ + recipient: NotRequired[ + "PaymentIntentConfirmParamsPaymentDetailsEventDetailsDeliveryRecipient" + ] + """ + Details of the recipient. + """ + + +class PaymentIntentConfirmParamsPaymentDetailsEventDetailsDeliveryRecipient( + TypedDict, +): + email: NotRequired[str] + """ + The email of the recipient the ticket is delivered to. + """ + name: NotRequired[str] + """ + The name of the recipient the ticket is delivered to. + """ + phone: NotRequired[str] + """ + The phone number of the recipient the ticket is delivered to. + """ + + +class PaymentIntentConfirmParamsPaymentDetailsFlight(TypedDict): + affiliate: NotRequired[ + "PaymentIntentConfirmParamsPaymentDetailsFlightAffiliate" + ] + """ + Affiliate details for this purchase. + """ + agency_number: NotRequired[str] + """ + The agency number (i.e. International Air Transport Association (IATA) agency number) of the travel agency that made the booking. + """ + carrier: NotRequired[str] + """ + The International Air Transport Association (IATA) carrier code of the carrier that issued the ticket. + """ + delivery: NotRequired[ + "PaymentIntentConfirmParamsPaymentDetailsFlightDelivery" + ] + """ + Delivery details for this purchase. + """ + passenger_name: NotRequired[str] + """ + The name of the person or entity on the reservation. + """ + passengers: NotRequired[ + List["PaymentIntentConfirmParamsPaymentDetailsFlightPassenger"] + ] + """ + The details of the passengers in the travel reservation. + """ + segments: List["PaymentIntentConfirmParamsPaymentDetailsFlightSegment"] + """ + The individual flight segments associated with the trip. + """ + ticket_number: NotRequired[str] + """ + The ticket number associated with the travel reservation. + """ + + +class PaymentIntentConfirmParamsPaymentDetailsFlightAffiliate(TypedDict): + name: str + """ + The name of the affiliate that originated the purchase. + """ + + +class PaymentIntentConfirmParamsPaymentDetailsFlightDelivery(TypedDict): + mode: NotRequired[Literal["email", "phone", "pickup", "post"]] + """ + The delivery method for the payment + """ + recipient: NotRequired[ + "PaymentIntentConfirmParamsPaymentDetailsFlightDeliveryRecipient" + ] + """ + Details of the recipient. + """ + + +class PaymentIntentConfirmParamsPaymentDetailsFlightDeliveryRecipient( + TypedDict, +): + email: NotRequired[str] + """ + The email of the recipient the ticket is delivered to. + """ + name: NotRequired[str] + """ + The name of the recipient the ticket is delivered to. + """ + phone: NotRequired[str] + """ + The phone number of the recipient the ticket is delivered to. + """ + + +class PaymentIntentConfirmParamsPaymentDetailsFlightPassenger(TypedDict): + name: str + """ + Full name of the person or entity on the flight reservation. + """ + + +class PaymentIntentConfirmParamsPaymentDetailsFlightSegment(TypedDict): + amount: NotRequired[int] + """ + The flight segment amount. + """ + arrival_airport: NotRequired[str] + """ + The International Air Transport Association (IATA) airport code for the arrival airport. + """ + arrives_at: NotRequired[int] + """ + The arrival time for the flight segment. Measured in seconds since the Unix epoch. + """ + carrier: NotRequired[str] + """ + The International Air Transport Association (IATA) carrier code of the carrier operating the flight segment. + """ + departs_at: int + """ + The departure time for the flight segment. Measured in seconds since the Unix epoch. + """ + departure_airport: NotRequired[str] + """ + The International Air Transport Association (IATA) airport code for the departure airport. + """ + flight_number: NotRequired[str] + """ + The flight number associated with the segment + """ + service_class: NotRequired[ + Literal["business", "economy", "first", "premium_economy"] + ] + """ + The fare class for the segment. + """ + + +class PaymentIntentConfirmParamsPaymentDetailsLodging(TypedDict): + address: NotRequired[ + "PaymentIntentConfirmParamsPaymentDetailsLodgingAddress" + ] + """ + The lodging location's address. + """ + adults: NotRequired[int] + """ + The number of adults on the booking + """ + affiliate: NotRequired[ + "PaymentIntentConfirmParamsPaymentDetailsLodgingAffiliate" + ] + """ + Affiliate details for this purchase. + """ + booking_number: NotRequired[str] + """ + The booking number associated with the lodging reservation. + """ + category: NotRequired[Literal["hotel", "vacation_rental"]] + """ + The lodging category + """ + checkin_at: int + """ + Lodging check-in time. Measured in seconds since the Unix epoch. + """ + checkout_at: int + """ + Lodging check-out time. Measured in seconds since the Unix epoch. + """ + customer_service_phone_number: NotRequired[str] + """ + The customer service phone number of the lodging company. + """ + daily_room_rate_amount: NotRequired[int] + """ + The daily lodging room rate. + """ + delivery: NotRequired[ + "PaymentIntentConfirmParamsPaymentDetailsLodgingDelivery" + ] + """ + Delivery details for this purchase. + """ + extra_charges: NotRequired[ + List[ + Literal[ + "gift_shop", + "laundry", + "mini_bar", + "other", + "restaurant", + "telephone", + ] + ] + ] + """ + List of additional charges being billed. + """ + fire_safety_act_compliance: NotRequired[bool] + """ + Indicates whether the lodging location is compliant with the Fire Safety Act. + """ + name: NotRequired[str] + """ + The name of the lodging location. + """ + no_show: NotRequired[bool] + """ + Indicates if the customer did not keep their booking while failing to cancel the reservation. + """ + number_of_rooms: NotRequired[int] + """ + The number of rooms on the booking + """ + passengers: NotRequired[ + List["PaymentIntentConfirmParamsPaymentDetailsLodgingPassenger"] + ] + """ + The details of the passengers in the travel reservation + """ + property_phone_number: NotRequired[str] + """ + The phone number of the lodging location. + """ + room_class: NotRequired[str] + """ + The room class for this purchase. + """ + room_nights: NotRequired[int] + """ + The number of room nights + """ + total_room_tax_amount: NotRequired[int] + """ + The total tax amount associating with the room reservation. + """ + total_tax_amount: NotRequired[int] + """ + The total tax amount + """ + + +class PaymentIntentConfirmParamsPaymentDetailsLodgingAddress(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. + """ + + +class PaymentIntentConfirmParamsPaymentDetailsLodgingAffiliate(TypedDict): + name: str + """ + The name of the affiliate that originated the purchase. + """ + + +class PaymentIntentConfirmParamsPaymentDetailsLodgingDelivery(TypedDict): + mode: NotRequired[Literal["email", "phone", "pickup", "post"]] + """ + The delivery method for the payment + """ + recipient: NotRequired[ + "PaymentIntentConfirmParamsPaymentDetailsLodgingDeliveryRecipient" + ] + """ + Details of the recipient. + """ + + +class PaymentIntentConfirmParamsPaymentDetailsLodgingDeliveryRecipient( + TypedDict, +): + email: NotRequired[str] + """ + The email of the recipient the ticket is delivered to. + """ + name: NotRequired[str] + """ + The name of the recipient the ticket is delivered to. + """ + phone: NotRequired[str] + """ + The phone number of the recipient the ticket is delivered to. + """ + + +class PaymentIntentConfirmParamsPaymentDetailsLodgingPassenger(TypedDict): + name: str + """ + Full name of the person or entity on the lodging reservation. + """ + + +class PaymentIntentConfirmParamsPaymentDetailsSubscription(TypedDict): + affiliate: NotRequired[ + "PaymentIntentConfirmParamsPaymentDetailsSubscriptionAffiliate" + ] + """ + Affiliate details for this purchase. + """ + auto_renewal: NotRequired[bool] + """ + Info whether the subscription will be auto renewed upon expiry. + """ + billing_interval: NotRequired[ + "PaymentIntentConfirmParamsPaymentDetailsSubscriptionBillingInterval" + ] + """ + Subscription billing details for this purchase. + """ + ends_at: NotRequired[int] + """ + Subscription end time. Measured in seconds since the Unix epoch. + """ + name: str + """ + Name of the product on subscription. e.g. Apple Music Subscription + """ + starts_at: NotRequired[int] + """ + Subscription start time. Measured in seconds since the Unix epoch. + """ + + +class PaymentIntentConfirmParamsPaymentDetailsSubscriptionAffiliate(TypedDict): + name: str + """ + The name of the affiliate that originated the purchase. + """ + + +class PaymentIntentConfirmParamsPaymentDetailsSubscriptionBillingInterval( + TypedDict, +): + count: int + """ + The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + """ + interval: Literal["day", "month", "week", "year"] + """ + Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + """ + + +class PaymentIntentConfirmParamsPaymentMethodData(TypedDict): + acss_debit: NotRequired[ + "PaymentIntentConfirmParamsPaymentMethodDataAcssDebit" + ] + """ + If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method. + """ + affirm: NotRequired["PaymentIntentConfirmParamsPaymentMethodDataAffirm"] + """ + If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method. + """ + afterpay_clearpay: NotRequired[ + "PaymentIntentConfirmParamsPaymentMethodDataAfterpayClearpay" + ] + """ + If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method. + """ + alipay: NotRequired["PaymentIntentConfirmParamsPaymentMethodDataAlipay"] + """ + If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. + """ + allow_redisplay: NotRequired[Literal["always", "limited", "unspecified"]] + """ + This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`. + """ + alma: NotRequired["PaymentIntentConfirmParamsPaymentMethodDataAlma"] + """ + If this is a Alma PaymentMethod, this hash contains details about the Alma payment method. + """ + amazon_pay: NotRequired[ + "PaymentIntentConfirmParamsPaymentMethodDataAmazonPay" + ] + """ + If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method. + """ + au_becs_debit: NotRequired[ + "PaymentIntentConfirmParamsPaymentMethodDataAuBecsDebit" + ] + """ + If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. + """ + bacs_debit: NotRequired[ + "PaymentIntentConfirmParamsPaymentMethodDataBacsDebit" + ] + """ + If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account. + """ + bancontact: NotRequired[ + "PaymentIntentConfirmParamsPaymentMethodDataBancontact" + ] + """ + If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method. + """ + billie: NotRequired["PaymentIntentConfirmParamsPaymentMethodDataBillie"] + """ + If this is a `billie` PaymentMethod, this hash contains details about the Billie payment method. + """ + billing_details: NotRequired[ + "PaymentIntentConfirmParamsPaymentMethodDataBillingDetails" + ] + """ + Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. + """ + blik: NotRequired["PaymentIntentConfirmParamsPaymentMethodDataBlik"] + """ + If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method. + """ + boleto: NotRequired["PaymentIntentConfirmParamsPaymentMethodDataBoleto"] + """ + If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method. + """ + cashapp: NotRequired["PaymentIntentConfirmParamsPaymentMethodDataCashapp"] + """ + If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. + """ + crypto: NotRequired["PaymentIntentConfirmParamsPaymentMethodDataCrypto"] + """ + If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment method. + """ + customer_balance: NotRequired[ + "PaymentIntentConfirmParamsPaymentMethodDataCustomerBalance" + ] + """ + If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. + """ + eps: NotRequired["PaymentIntentConfirmParamsPaymentMethodDataEps"] + """ + If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. + """ + fpx: NotRequired["PaymentIntentConfirmParamsPaymentMethodDataFpx"] + """ + If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method. + """ + giropay: NotRequired["PaymentIntentConfirmParamsPaymentMethodDataGiropay"] + """ + If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method. + """ + gopay: NotRequired["PaymentIntentConfirmParamsPaymentMethodDataGopay"] + """ + If this is a Gopay PaymentMethod, this hash contains details about the Gopay payment method. + """ + grabpay: NotRequired["PaymentIntentConfirmParamsPaymentMethodDataGrabpay"] + """ + If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method. + """ + id_bank_transfer: NotRequired[ + "PaymentIntentConfirmParamsPaymentMethodDataIdBankTransfer" + ] + """ + If this is an `IdBankTransfer` PaymentMethod, this hash contains details about the IdBankTransfer payment method. + """ + ideal: NotRequired["PaymentIntentConfirmParamsPaymentMethodDataIdeal"] + """ + If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. + """ + interac_present: NotRequired[ + "PaymentIntentConfirmParamsPaymentMethodDataInteracPresent" + ] + """ + If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. + """ + kakao_pay: NotRequired[ + "PaymentIntentConfirmParamsPaymentMethodDataKakaoPay" + ] + """ + If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method. + """ + klarna: NotRequired["PaymentIntentConfirmParamsPaymentMethodDataKlarna"] + """ + If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method. + """ + konbini: NotRequired["PaymentIntentConfirmParamsPaymentMethodDataKonbini"] + """ + If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. + """ + kr_card: NotRequired["PaymentIntentConfirmParamsPaymentMethodDataKrCard"] + """ + If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method. + """ + link: NotRequired["PaymentIntentConfirmParamsPaymentMethodDataLink"] + """ + If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. + """ + mb_way: NotRequired["PaymentIntentConfirmParamsPaymentMethodDataMbWay"] + """ + If this is a MB WAY PaymentMethod, this hash contains details about the MB WAY payment method. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + mobilepay: NotRequired[ + "PaymentIntentConfirmParamsPaymentMethodDataMobilepay" + ] + """ + If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method. + """ + multibanco: NotRequired[ + "PaymentIntentConfirmParamsPaymentMethodDataMultibanco" + ] + """ + If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method. + """ + naver_pay: NotRequired[ + "PaymentIntentConfirmParamsPaymentMethodDataNaverPay" + ] + """ + If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method. + """ + nz_bank_account: NotRequired[ + "PaymentIntentConfirmParamsPaymentMethodDataNzBankAccount" + ] + """ + If this is an nz_bank_account PaymentMethod, this hash contains details about the nz_bank_account payment method. + """ + oxxo: NotRequired["PaymentIntentConfirmParamsPaymentMethodDataOxxo"] + """ + If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. + """ + p24: NotRequired["PaymentIntentConfirmParamsPaymentMethodDataP24"] + """ + If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. + """ + pay_by_bank: NotRequired[ + "PaymentIntentConfirmParamsPaymentMethodDataPayByBank" + ] + """ + If this is a `pay_by_bank` PaymentMethod, this hash contains details about the PayByBank payment method. + """ + payco: NotRequired["PaymentIntentConfirmParamsPaymentMethodDataPayco"] + """ + If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method. + """ + paynow: NotRequired["PaymentIntentConfirmParamsPaymentMethodDataPaynow"] + """ + If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method. + """ + paypal: NotRequired["PaymentIntentConfirmParamsPaymentMethodDataPaypal"] + """ + If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method. + """ + paypay: NotRequired["PaymentIntentConfirmParamsPaymentMethodDataPaypay"] + """ + If this is a `paypay` PaymentMethod, this hash contains details about the PayPay payment method. + """ + payto: NotRequired["PaymentIntentConfirmParamsPaymentMethodDataPayto"] + """ + If this is a `payto` PaymentMethod, this hash contains details about the PayTo payment method. + """ + pix: NotRequired["PaymentIntentConfirmParamsPaymentMethodDataPix"] + """ + If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method. + """ + promptpay: NotRequired[ + "PaymentIntentConfirmParamsPaymentMethodDataPromptpay" + ] + """ + If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method. + """ + qris: NotRequired["PaymentIntentConfirmParamsPaymentMethodDataQris"] + """ + If this is a `qris` PaymentMethod, this hash contains details about the QRIS payment method. + """ + radar_options: NotRequired[ + "PaymentIntentConfirmParamsPaymentMethodDataRadarOptions" + ] + """ + Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. + """ + rechnung: NotRequired[ + "PaymentIntentConfirmParamsPaymentMethodDataRechnung" + ] + """ + If this is a `rechnung` PaymentMethod, this hash contains details about the Rechnung payment method. + """ + revolut_pay: NotRequired[ + "PaymentIntentConfirmParamsPaymentMethodDataRevolutPay" + ] + """ + If this is a `revolut_pay` PaymentMethod, this hash contains details about the Revolut Pay payment method. + """ + samsung_pay: NotRequired[ + "PaymentIntentConfirmParamsPaymentMethodDataSamsungPay" + ] + """ + If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method. + """ + satispay: NotRequired[ + "PaymentIntentConfirmParamsPaymentMethodDataSatispay" + ] + """ + If this is a `satispay` PaymentMethod, this hash contains details about the Satispay payment method. + """ + sepa_debit: NotRequired[ + "PaymentIntentConfirmParamsPaymentMethodDataSepaDebit" + ] + """ + If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. + """ + shopeepay: NotRequired[ + "PaymentIntentConfirmParamsPaymentMethodDataShopeepay" + ] + """ + If this is a Shopeepay PaymentMethod, this hash contains details about the Shopeepay payment method. + """ + sofort: NotRequired["PaymentIntentConfirmParamsPaymentMethodDataSofort"] + """ + If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. + """ + stripe_balance: NotRequired[ + "PaymentIntentConfirmParamsPaymentMethodDataStripeBalance" + ] + """ + This hash contains details about the Stripe balance payment method. + """ + swish: NotRequired["PaymentIntentConfirmParamsPaymentMethodDataSwish"] + """ + If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method. + """ + twint: NotRequired["PaymentIntentConfirmParamsPaymentMethodDataTwint"] + """ + If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method. + """ + type: Literal[ + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "alma", + "amazon_pay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "billie", + "blik", + "boleto", + "cashapp", + "crypto", + "customer_balance", + "eps", + "fpx", + "giropay", + "gopay", + "grabpay", + "id_bank_transfer", + "ideal", + "kakao_pay", + "klarna", + "konbini", + "kr_card", + "link", + "mb_way", + "mobilepay", + "multibanco", + "naver_pay", + "nz_bank_account", + "oxxo", + "p24", + "pay_by_bank", + "payco", + "paynow", + "paypal", + "paypay", + "payto", + "pix", + "promptpay", + "qris", + "rechnung", + "revolut_pay", + "samsung_pay", + "satispay", + "sepa_debit", + "shopeepay", + "sofort", + "stripe_balance", + "swish", + "twint", + "us_bank_account", + "wechat_pay", + "zip", + ] + """ + The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. + """ + us_bank_account: NotRequired[ + "PaymentIntentConfirmParamsPaymentMethodDataUsBankAccount" + ] + """ + If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. + """ + wechat_pay: NotRequired[ + "PaymentIntentConfirmParamsPaymentMethodDataWechatPay" + ] + """ + If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method. + """ + zip: NotRequired["PaymentIntentConfirmParamsPaymentMethodDataZip"] + """ + If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method. + """ + + +class PaymentIntentConfirmParamsPaymentMethodDataAcssDebit(TypedDict): + account_number: str + """ + Customer's bank account number. + """ + institution_number: str + """ + Institution number of the customer's bank. + """ + transit_number: str + """ + Transit number of the customer's bank. + """ + + +class PaymentIntentConfirmParamsPaymentMethodDataAffirm(TypedDict): + pass + + +class PaymentIntentConfirmParamsPaymentMethodDataAfterpayClearpay(TypedDict): + pass + + +class PaymentIntentConfirmParamsPaymentMethodDataAlipay(TypedDict): + pass + + +class PaymentIntentConfirmParamsPaymentMethodDataAlma(TypedDict): + pass + + +class PaymentIntentConfirmParamsPaymentMethodDataAmazonPay(TypedDict): + pass + + +class PaymentIntentConfirmParamsPaymentMethodDataAuBecsDebit(TypedDict): + account_number: str + """ + The account number for the bank account. + """ + bsb_number: str + """ + Bank-State-Branch number of the bank account. + """ + + +class PaymentIntentConfirmParamsPaymentMethodDataBacsDebit(TypedDict): + account_number: NotRequired[str] + """ + Account number of the bank account that the funds will be debited from. + """ + sort_code: NotRequired[str] + """ + Sort code of the bank account. (e.g., `10-20-30`) + """ + + +class PaymentIntentConfirmParamsPaymentMethodDataBancontact(TypedDict): + pass + + +class PaymentIntentConfirmParamsPaymentMethodDataBillie(TypedDict): + pass + + +class PaymentIntentConfirmParamsPaymentMethodDataBillingDetails(TypedDict): + address: NotRequired[ + "Literal['']|PaymentIntentConfirmParamsPaymentMethodDataBillingDetailsAddress" + ] + """ + Billing address. + """ + email: NotRequired["Literal['']|str"] + """ + Email address. + """ + name: NotRequired["Literal['']|str"] + """ + Full name. + """ + phone: NotRequired["Literal['']|str"] + """ + Billing phone number (including extension). + """ + tax_id: NotRequired[str] + """ + Taxpayer identification number. Used only for transactions between LATAM buyers and non-LATAM sellers. + """ + + +class PaymentIntentConfirmParamsPaymentMethodDataBillingDetailsAddress( + 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. + """ + + +class PaymentIntentConfirmParamsPaymentMethodDataBlik(TypedDict): + pass + + +class PaymentIntentConfirmParamsPaymentMethodDataBoleto(TypedDict): + tax_id: str + """ + The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers) + """ + + +class PaymentIntentConfirmParamsPaymentMethodDataCashapp(TypedDict): + pass + + +class PaymentIntentConfirmParamsPaymentMethodDataCrypto(TypedDict): + pass + + +class PaymentIntentConfirmParamsPaymentMethodDataCustomerBalance(TypedDict): + pass + + +class PaymentIntentConfirmParamsPaymentMethodDataEps(TypedDict): + bank: NotRequired[ + Literal[ + "arzte_und_apotheker_bank", + "austrian_anadi_bank_ag", + "bank_austria", + "bankhaus_carl_spangler", + "bankhaus_schelhammer_und_schattera_ag", + "bawag_psk_ag", + "bks_bank_ag", + "brull_kallmus_bank_ag", + "btv_vier_lander_bank", + "capital_bank_grawe_gruppe_ag", + "deutsche_bank_ag", + "dolomitenbank", + "easybank_ag", + "erste_bank_und_sparkassen", + "hypo_alpeadriabank_international_ag", + "hypo_bank_burgenland_aktiengesellschaft", + "hypo_noe_lb_fur_niederosterreich_u_wien", + "hypo_oberosterreich_salzburg_steiermark", + "hypo_tirol_bank_ag", + "hypo_vorarlberg_bank_ag", + "marchfelder_bank", + "oberbank_ag", + "raiffeisen_bankengruppe_osterreich", + "schoellerbank_ag", + "sparda_bank_wien", + "volksbank_gruppe", + "volkskreditbank_ag", + "vr_bank_braunau", + ] + ] + """ + The customer's bank. + """ + + +class PaymentIntentConfirmParamsPaymentMethodDataFpx(TypedDict): + account_holder_type: NotRequired[Literal["company", "individual"]] + """ + Account holder type for FPX transaction + """ + bank: Literal[ + "affin_bank", + "agrobank", + "alliance_bank", + "ambank", + "bank_islam", + "bank_muamalat", + "bank_of_china", + "bank_rakyat", + "bsn", + "cimb", + "deutsche_bank", + "hong_leong_bank", + "hsbc", + "kfh", + "maybank2e", + "maybank2u", + "ocbc", + "pb_enterprise", + "public_bank", + "rhb", + "standard_chartered", + "uob", + ] + """ + The customer's bank. + """ + + +class PaymentIntentConfirmParamsPaymentMethodDataGiropay(TypedDict): + pass + + +class PaymentIntentConfirmParamsPaymentMethodDataGopay(TypedDict): + pass + + +class PaymentIntentConfirmParamsPaymentMethodDataGrabpay(TypedDict): + pass + + +class PaymentIntentConfirmParamsPaymentMethodDataIdBankTransfer(TypedDict): + bank: NotRequired[Literal["bca", "bni", "bri", "cimb", "permata"]] + """ + Bank where the account is held. + """ + + +class PaymentIntentConfirmParamsPaymentMethodDataIdeal(TypedDict): + bank: NotRequired[ + Literal[ + "abn_amro", + "asn_bank", + "bunq", + "buut", + "handelsbanken", + "ing", + "knab", + "moneyou", + "n26", + "nn", + "rabobank", + "regiobank", + "revolut", + "sns_bank", + "triodos_bank", + "van_lanschot", + "yoursafe", + ] + ] + """ + The customer's bank. Only use this parameter for existing customers. Don't use it for new customers. + """ + + +class PaymentIntentConfirmParamsPaymentMethodDataInteracPresent(TypedDict): + pass + + +class PaymentIntentConfirmParamsPaymentMethodDataKakaoPay(TypedDict): + pass + + +class PaymentIntentConfirmParamsPaymentMethodDataKlarna(TypedDict): + dob: NotRequired["PaymentIntentConfirmParamsPaymentMethodDataKlarnaDob"] + """ + Customer's date of birth + """ + + +class PaymentIntentConfirmParamsPaymentMethodDataKlarnaDob(TypedDict): + day: int + """ + The day of birth, between 1 and 31. + """ + month: int + """ + The month of birth, between 1 and 12. + """ + year: int + """ + The four-digit year of birth. + """ + + +class PaymentIntentConfirmParamsPaymentMethodDataKonbini(TypedDict): + pass + + +class PaymentIntentConfirmParamsPaymentMethodDataKrCard(TypedDict): + pass + + +class PaymentIntentConfirmParamsPaymentMethodDataLink(TypedDict): + pass + + +class PaymentIntentConfirmParamsPaymentMethodDataMbWay(TypedDict): + pass + + +class PaymentIntentConfirmParamsPaymentMethodDataMobilepay(TypedDict): + pass + + +class PaymentIntentConfirmParamsPaymentMethodDataMultibanco(TypedDict): + pass + + +class PaymentIntentConfirmParamsPaymentMethodDataNaverPay(TypedDict): + funding: NotRequired[Literal["card", "points"]] + """ + Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`. + """ + + +class PaymentIntentConfirmParamsPaymentMethodDataNzBankAccount(TypedDict): + account_holder_name: NotRequired[str] + """ + The name on the bank account. Only required if the account holder name is different from the name of the authorized signatory collected in the PaymentMethod's billing details. + """ + account_number: str + """ + The account number for the bank account. + """ + bank_code: str + """ + The numeric code for the bank account's bank. + """ + branch_code: str + """ + The numeric code for the bank account's bank branch. + """ + reference: NotRequired[str] + suffix: str + """ + The suffix of the bank account number. + """ + + +class PaymentIntentConfirmParamsPaymentMethodDataOxxo(TypedDict): + pass + + +class PaymentIntentConfirmParamsPaymentMethodDataP24(TypedDict): + bank: NotRequired[ + Literal[ + "alior_bank", + "bank_millennium", + "bank_nowy_bfg_sa", + "bank_pekao_sa", + "banki_spbdzielcze", + "blik", + "bnp_paribas", + "boz", + "citi_handlowy", + "credit_agricole", + "envelobank", + "etransfer_pocztowy24", + "getin_bank", + "ideabank", + "ing", + "inteligo", + "mbank_mtransfer", + "nest_przelew", + "noble_pay", + "pbac_z_ipko", + "plus_bank", + "santander_przelew24", + "tmobile_usbugi_bankowe", + "toyota_bank", + "velobank", + "volkswagen_bank", + ] + ] + """ + The customer's bank. + """ + + +class PaymentIntentConfirmParamsPaymentMethodDataPayByBank(TypedDict): + pass + + +class PaymentIntentConfirmParamsPaymentMethodDataPayco(TypedDict): + pass + + +class PaymentIntentConfirmParamsPaymentMethodDataPaynow(TypedDict): + pass + + +class PaymentIntentConfirmParamsPaymentMethodDataPaypal(TypedDict): + pass + + +class PaymentIntentConfirmParamsPaymentMethodDataPaypay(TypedDict): + pass + + +class PaymentIntentConfirmParamsPaymentMethodDataPayto(TypedDict): + account_number: NotRequired[str] + """ + The account number for the bank account. + """ + bsb_number: NotRequired[str] + """ + Bank-State-Branch number of the bank account. + """ + pay_id: NotRequired[str] + """ + The PayID alias for the bank account. + """ + + +class PaymentIntentConfirmParamsPaymentMethodDataPix(TypedDict): + pass + + +class PaymentIntentConfirmParamsPaymentMethodDataPromptpay(TypedDict): + pass + + +class PaymentIntentConfirmParamsPaymentMethodDataQris(TypedDict): + pass + + +class PaymentIntentConfirmParamsPaymentMethodDataRadarOptions(TypedDict): + session: NotRequired[str] + """ + A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. + """ + + +class PaymentIntentConfirmParamsPaymentMethodDataRechnung(TypedDict): + dob: "PaymentIntentConfirmParamsPaymentMethodDataRechnungDob" + """ + Customer's date of birth + """ + + +class PaymentIntentConfirmParamsPaymentMethodDataRechnungDob(TypedDict): + day: int + """ + The day of birth, between 1 and 31. + """ + month: int + """ + The month of birth, between 1 and 12. + """ + year: int + """ + The four-digit year of birth. + """ + + +class PaymentIntentConfirmParamsPaymentMethodDataRevolutPay(TypedDict): + pass + + +class PaymentIntentConfirmParamsPaymentMethodDataSamsungPay(TypedDict): + pass + + +class PaymentIntentConfirmParamsPaymentMethodDataSatispay(TypedDict): + pass + + +class PaymentIntentConfirmParamsPaymentMethodDataSepaDebit(TypedDict): + iban: str + """ + IBAN of the bank account. + """ + + +class PaymentIntentConfirmParamsPaymentMethodDataShopeepay(TypedDict): + pass + + +class PaymentIntentConfirmParamsPaymentMethodDataSofort(TypedDict): + country: Literal["AT", "BE", "DE", "ES", "IT", "NL"] + """ + Two-letter ISO code representing the country the bank account is located in. + """ + + +class PaymentIntentConfirmParamsPaymentMethodDataStripeBalance(TypedDict): + account: NotRequired[str] + """ + The connected account ID whose Stripe balance to use as the source of payment + """ + source_type: NotRequired[Literal["bank_account", "card", "fpx"]] + """ + The [source_type](https://docs.stripe.com/api/balance/balance_object#balance_object-available-source_types) of the balance + """ + + +class PaymentIntentConfirmParamsPaymentMethodDataSwish(TypedDict): + pass + + +class PaymentIntentConfirmParamsPaymentMethodDataTwint(TypedDict): + pass + + +class PaymentIntentConfirmParamsPaymentMethodDataUsBankAccount(TypedDict): + account_holder_type: NotRequired[Literal["company", "individual"]] + """ + Account holder type: individual or company. + """ + account_number: NotRequired[str] + """ + Account number of the bank account. + """ + account_type: NotRequired[Literal["checking", "savings"]] + """ + Account type: checkings or savings. Defaults to checking if omitted. + """ + financial_connections_account: NotRequired[str] + """ + The ID of a Financial Connections Account to use as a payment method. + """ + routing_number: NotRequired[str] + """ + Routing number of the bank account. + """ + + +class PaymentIntentConfirmParamsPaymentMethodDataWechatPay(TypedDict): + pass + + +class PaymentIntentConfirmParamsPaymentMethodDataZip(TypedDict): + pass + + +class PaymentIntentConfirmParamsPaymentMethodOptions(TypedDict): + acss_debit: NotRequired[ + "Literal['']|PaymentIntentConfirmParamsPaymentMethodOptionsAcssDebit" + ] + """ + If this is a `acss_debit` PaymentMethod, this sub-hash contains details about the ACSS Debit payment method options. + """ + affirm: NotRequired[ + "Literal['']|PaymentIntentConfirmParamsPaymentMethodOptionsAffirm" + ] + """ + If this is an `affirm` PaymentMethod, this sub-hash contains details about the Affirm payment method options. + """ + afterpay_clearpay: NotRequired[ + "Literal['']|PaymentIntentConfirmParamsPaymentMethodOptionsAfterpayClearpay" + ] + """ + If this is a `afterpay_clearpay` PaymentMethod, this sub-hash contains details about the Afterpay Clearpay payment method options. + """ + alipay: NotRequired[ + "Literal['']|PaymentIntentConfirmParamsPaymentMethodOptionsAlipay" + ] + """ + If this is a `alipay` PaymentMethod, this sub-hash contains details about the Alipay payment method options. + """ + alma: NotRequired[ + "Literal['']|PaymentIntentConfirmParamsPaymentMethodOptionsAlma" + ] + """ + If this is a `alma` PaymentMethod, this sub-hash contains details about the Alma payment method options. + """ + amazon_pay: NotRequired[ + "Literal['']|PaymentIntentConfirmParamsPaymentMethodOptionsAmazonPay" + ] + """ + If this is a `amazon_pay` PaymentMethod, this sub-hash contains details about the Amazon Pay payment method options. + """ + au_becs_debit: NotRequired[ + "Literal['']|PaymentIntentConfirmParamsPaymentMethodOptionsAuBecsDebit" + ] + """ + If this is a `au_becs_debit` PaymentMethod, this sub-hash contains details about the AU BECS Direct Debit payment method options. + """ + bacs_debit: NotRequired[ + "Literal['']|PaymentIntentConfirmParamsPaymentMethodOptionsBacsDebit" + ] + """ + If this is a `bacs_debit` PaymentMethod, this sub-hash contains details about the BACS Debit payment method options. + """ + bancontact: NotRequired[ + "Literal['']|PaymentIntentConfirmParamsPaymentMethodOptionsBancontact" + ] + """ + If this is a `bancontact` PaymentMethod, this sub-hash contains details about the Bancontact payment method options. + """ + billie: NotRequired[ + "Literal['']|PaymentIntentConfirmParamsPaymentMethodOptionsBillie" + ] + """ + If this is a `billie` PaymentMethod, this sub-hash contains details about the Billie payment method options. + """ + blik: NotRequired[ + "Literal['']|PaymentIntentConfirmParamsPaymentMethodOptionsBlik" + ] + """ + If this is a `blik` PaymentMethod, this sub-hash contains details about the BLIK payment method options. + """ + boleto: NotRequired[ + "Literal['']|PaymentIntentConfirmParamsPaymentMethodOptionsBoleto" + ] + """ + If this is a `boleto` PaymentMethod, this sub-hash contains details about the Boleto payment method options. + """ + card: NotRequired[ + "Literal['']|PaymentIntentConfirmParamsPaymentMethodOptionsCard" + ] + """ + Configuration for any card payments attempted on this PaymentIntent. + """ + card_present: NotRequired[ + "Literal['']|PaymentIntentConfirmParamsPaymentMethodOptionsCardPresent" + ] + """ + If this is a `card_present` PaymentMethod, this sub-hash contains details about the Card Present payment method options. + """ + cashapp: NotRequired[ + "Literal['']|PaymentIntentConfirmParamsPaymentMethodOptionsCashapp" + ] + """ + If this is a `cashapp` PaymentMethod, this sub-hash contains details about the Cash App Pay payment method options. + """ + crypto: NotRequired[ + "Literal['']|PaymentIntentConfirmParamsPaymentMethodOptionsCrypto" + ] + """ + If this is a `crypto` PaymentMethod, this sub-hash contains details about the Crypto payment method options. + """ + customer_balance: NotRequired[ + "Literal['']|PaymentIntentConfirmParamsPaymentMethodOptionsCustomerBalance" + ] + """ + If this is a `customer balance` PaymentMethod, this sub-hash contains details about the customer balance payment method options. + """ + eps: NotRequired[ + "Literal['']|PaymentIntentConfirmParamsPaymentMethodOptionsEps" + ] + """ + If this is a `eps` PaymentMethod, this sub-hash contains details about the EPS payment method options. + """ + fpx: NotRequired[ + "Literal['']|PaymentIntentConfirmParamsPaymentMethodOptionsFpx" + ] + """ + If this is a `fpx` PaymentMethod, this sub-hash contains details about the FPX payment method options. + """ + giropay: NotRequired[ + "Literal['']|PaymentIntentConfirmParamsPaymentMethodOptionsGiropay" + ] + """ + If this is a `giropay` PaymentMethod, this sub-hash contains details about the Giropay payment method options. + """ + gopay: NotRequired[ + "Literal['']|PaymentIntentConfirmParamsPaymentMethodOptionsGopay" + ] + """ + If this is a `gopay` PaymentMethod, this sub-hash contains details about the Gopay payment method options. + """ + grabpay: NotRequired[ + "Literal['']|PaymentIntentConfirmParamsPaymentMethodOptionsGrabpay" + ] + """ + If this is a `grabpay` PaymentMethod, this sub-hash contains details about the Grabpay payment method options. + """ + id_bank_transfer: NotRequired[ + "Literal['']|PaymentIntentConfirmParamsPaymentMethodOptionsIdBankTransfer" + ] + """ + If this is a `id_bank_transfer` PaymentMethod, this sub-hash contains details about the Indonesia Bank Transfer payment method options. + """ + ideal: NotRequired[ + "Literal['']|PaymentIntentConfirmParamsPaymentMethodOptionsIdeal" + ] + """ + If this is a `ideal` PaymentMethod, this sub-hash contains details about the Ideal payment method options. + """ + interac_present: NotRequired[ + "Literal['']|PaymentIntentConfirmParamsPaymentMethodOptionsInteracPresent" + ] + """ + If this is a `interac_present` PaymentMethod, this sub-hash contains details about the Card Present payment method options. + """ + kakao_pay: NotRequired[ + "Literal['']|PaymentIntentConfirmParamsPaymentMethodOptionsKakaoPay" + ] + """ + If this is a `kakao_pay` PaymentMethod, this sub-hash contains details about the Kakao Pay payment method options. + """ + klarna: NotRequired[ + "Literal['']|PaymentIntentConfirmParamsPaymentMethodOptionsKlarna" + ] + """ + If this is a `klarna` PaymentMethod, this sub-hash contains details about the Klarna payment method options. + """ + konbini: NotRequired[ + "Literal['']|PaymentIntentConfirmParamsPaymentMethodOptionsKonbini" + ] + """ + If this is a `konbini` PaymentMethod, this sub-hash contains details about the Konbini payment method options. + """ + kr_card: NotRequired[ + "Literal['']|PaymentIntentConfirmParamsPaymentMethodOptionsKrCard" + ] + """ + If this is a `kr_card` PaymentMethod, this sub-hash contains details about the KR Card payment method options. + """ + link: NotRequired[ + "Literal['']|PaymentIntentConfirmParamsPaymentMethodOptionsLink" + ] + """ + If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options. + """ + mb_way: NotRequired[ + "Literal['']|PaymentIntentConfirmParamsPaymentMethodOptionsMbWay" + ] + """ + If this is a `mb_way` PaymentMethod, this sub-hash contains details about the MB WAY payment method options. + """ + mobilepay: NotRequired[ + "Literal['']|PaymentIntentConfirmParamsPaymentMethodOptionsMobilepay" + ] + """ + If this is a `MobilePay` PaymentMethod, this sub-hash contains details about the MobilePay payment method options. + """ + multibanco: NotRequired[ + "Literal['']|PaymentIntentConfirmParamsPaymentMethodOptionsMultibanco" + ] + """ + If this is a `multibanco` PaymentMethod, this sub-hash contains details about the Multibanco payment method options. + """ + naver_pay: NotRequired[ + "Literal['']|PaymentIntentConfirmParamsPaymentMethodOptionsNaverPay" + ] + """ + If this is a `naver_pay` PaymentMethod, this sub-hash contains details about the Naver Pay payment method options. + """ + nz_bank_account: NotRequired[ + "Literal['']|PaymentIntentConfirmParamsPaymentMethodOptionsNzBankAccount" + ] + """ + If this is a `nz_bank_account` PaymentMethod, this sub-hash contains details about the NZ BECS Direct Debit payment method options. + """ + oxxo: NotRequired[ + "Literal['']|PaymentIntentConfirmParamsPaymentMethodOptionsOxxo" + ] + """ + If this is a `oxxo` PaymentMethod, this sub-hash contains details about the OXXO payment method options. + """ + p24: NotRequired[ + "Literal['']|PaymentIntentConfirmParamsPaymentMethodOptionsP24" + ] + """ + If this is a `p24` PaymentMethod, this sub-hash contains details about the Przelewy24 payment method options. + """ + pay_by_bank: NotRequired[ + "Literal['']|PaymentIntentConfirmParamsPaymentMethodOptionsPayByBank" + ] + """ + If this is a `pay_by_bank` PaymentMethod, this sub-hash contains details about the PayByBank payment method options. + """ + payco: NotRequired[ + "Literal['']|PaymentIntentConfirmParamsPaymentMethodOptionsPayco" + ] + """ + If this is a `payco` PaymentMethod, this sub-hash contains details about the PAYCO payment method options. + """ + paynow: NotRequired[ + "Literal['']|PaymentIntentConfirmParamsPaymentMethodOptionsPaynow" + ] + """ + If this is a `paynow` PaymentMethod, this sub-hash contains details about the PayNow payment method options. + """ + paypal: NotRequired[ + "Literal['']|PaymentIntentConfirmParamsPaymentMethodOptionsPaypal" + ] + """ + If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options. + """ + paypay: NotRequired[ + "Literal['']|PaymentIntentConfirmParamsPaymentMethodOptionsPaypay" + ] + """ + If this is a `paypay` PaymentMethod, this sub-hash contains details about the PayPay payment method options. + """ + payto: NotRequired[ + "Literal['']|PaymentIntentConfirmParamsPaymentMethodOptionsPayto" + ] + """ + If this is a `payto` PaymentMethod, this sub-hash contains details about the PayTo payment method options. + """ + pix: NotRequired[ + "Literal['']|PaymentIntentConfirmParamsPaymentMethodOptionsPix" + ] + """ + If this is a `pix` PaymentMethod, this sub-hash contains details about the Pix payment method options. + """ + promptpay: NotRequired[ + "Literal['']|PaymentIntentConfirmParamsPaymentMethodOptionsPromptpay" + ] + """ + If this is a `promptpay` PaymentMethod, this sub-hash contains details about the PromptPay payment method options. + """ + qris: NotRequired[ + "Literal['']|PaymentIntentConfirmParamsPaymentMethodOptionsQris" + ] + """ + If this is a `qris` PaymentMethod, this sub-hash contains details about the QRIS payment method options. + """ + rechnung: NotRequired[ + "Literal['']|PaymentIntentConfirmParamsPaymentMethodOptionsRechnung" + ] + """ + If this is a `rechnung` PaymentMethod, this sub-hash contains details about the Rechnung payment method options. + """ + revolut_pay: NotRequired[ + "Literal['']|PaymentIntentConfirmParamsPaymentMethodOptionsRevolutPay" + ] + """ + If this is a `revolut_pay` PaymentMethod, this sub-hash contains details about the Revolut Pay payment method options. + """ + samsung_pay: NotRequired[ + "Literal['']|PaymentIntentConfirmParamsPaymentMethodOptionsSamsungPay" + ] + """ + If this is a `samsung_pay` PaymentMethod, this sub-hash contains details about the Samsung Pay payment method options. + """ + satispay: NotRequired[ + "Literal['']|PaymentIntentConfirmParamsPaymentMethodOptionsSatispay" + ] + """ + If this is a `satispay` PaymentMethod, this sub-hash contains details about the Satispay payment method options. + """ + sepa_debit: NotRequired[ + "Literal['']|PaymentIntentConfirmParamsPaymentMethodOptionsSepaDebit" + ] + """ + If this is a `sepa_debit` PaymentIntent, this sub-hash contains details about the SEPA Debit payment method options. + """ + shopeepay: NotRequired[ + "Literal['']|PaymentIntentConfirmParamsPaymentMethodOptionsShopeepay" + ] + """ + If this is a `shopeepay` PaymentMethod, this sub-hash contains details about the ShopeePay payment method options. + """ + sofort: NotRequired[ + "Literal['']|PaymentIntentConfirmParamsPaymentMethodOptionsSofort" + ] + """ + If this is a `sofort` PaymentMethod, this sub-hash contains details about the SOFORT payment method options. + """ + stripe_balance: NotRequired[ + "Literal['']|PaymentIntentConfirmParamsPaymentMethodOptionsStripeBalance" + ] + """ + If this is a `stripe_balance` PaymentMethod, this sub-hash contains details about the Stripe Balance payment method options. + """ + swish: NotRequired[ + "Literal['']|PaymentIntentConfirmParamsPaymentMethodOptionsSwish" + ] + """ + If this is a `Swish` PaymentMethod, this sub-hash contains details about the Swish payment method options. + """ + twint: NotRequired[ + "Literal['']|PaymentIntentConfirmParamsPaymentMethodOptionsTwint" + ] + """ + If this is a `twint` PaymentMethod, this sub-hash contains details about the TWINT payment method options. + """ + us_bank_account: NotRequired[ + "Literal['']|PaymentIntentConfirmParamsPaymentMethodOptionsUsBankAccount" + ] + """ + If this is a `us_bank_account` PaymentMethod, this sub-hash contains details about the US bank account payment method options. + """ + wechat_pay: NotRequired[ + "Literal['']|PaymentIntentConfirmParamsPaymentMethodOptionsWechatPay" + ] + """ + If this is a `wechat_pay` PaymentMethod, this sub-hash contains details about the WeChat Pay payment method options. + """ + zip: NotRequired[ + "Literal['']|PaymentIntentConfirmParamsPaymentMethodOptionsZip" + ] + """ + If this is a `zip` PaymentMethod, this sub-hash contains details about the Zip payment method options. + """ + + +class PaymentIntentConfirmParamsPaymentMethodOptionsAcssDebit(TypedDict): + mandate_options: NotRequired[ + "PaymentIntentConfirmParamsPaymentMethodOptionsAcssDebitMandateOptions" + ] + """ + Additional fields for Mandate creation + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session', 'on_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + target_date: NotRequired[str] + """ + Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + """ + verification_method: NotRequired[ + Literal["automatic", "instant", "microdeposits"] + ] + """ + Bank account verification method. + """ + + +class PaymentIntentConfirmParamsPaymentMethodOptionsAcssDebitMandateOptions( + TypedDict, +): + custom_mandate_url: NotRequired["Literal['']|str"] + """ + A URL for custom mandate text to render during confirmation step. + The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent, + or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent. + """ + interval_description: NotRequired[str] + """ + Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'. + """ + payment_schedule: NotRequired[Literal["combined", "interval", "sporadic"]] + """ + Payment schedule for the mandate. + """ + transaction_type: NotRequired[Literal["business", "personal"]] + """ + Transaction type of the mandate. + """ + + +class PaymentIntentConfirmParamsPaymentMethodOptionsAffirm(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + preferred_locale: NotRequired[str] + """ + Preferred language of the Affirm authorization page that the customer is redirected to. + """ + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentConfirmParamsPaymentMethodOptionsAfterpayClearpay( + TypedDict +): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + reference: NotRequired[str] + """ + An internal identifier or reference that this payment corresponds to. You must limit the identifier to 128 characters, and it can only contain letters, numbers, underscores, backslashes, and dashes. + This field differs from the statement descriptor and item name. + """ + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentConfirmParamsPaymentMethodOptionsAlipay(TypedDict): + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentConfirmParamsPaymentMethodOptionsAlma(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + + +class PaymentIntentConfirmParamsPaymentMethodOptionsAmazonPay(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + """ + + +class PaymentIntentConfirmParamsPaymentMethodOptionsAuBecsDebit(TypedDict): + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session', 'on_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + target_date: NotRequired[str] + """ + Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + """ + + +class PaymentIntentConfirmParamsPaymentMethodOptionsBacsDebit(TypedDict): + mandate_options: NotRequired[ + "PaymentIntentConfirmParamsPaymentMethodOptionsBacsDebitMandateOptions" + ] + """ + Additional fields for Mandate creation + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session', 'on_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + target_date: NotRequired[str] + """ + Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + """ + + +class PaymentIntentConfirmParamsPaymentMethodOptionsBacsDebitMandateOptions( + TypedDict, +): + reference_prefix: NotRequired["Literal['']|str"] + """ + Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'. + """ + + +class PaymentIntentConfirmParamsPaymentMethodOptionsBancontact(TypedDict): + preferred_language: NotRequired[Literal["de", "en", "fr", "nl"]] + """ + Preferred language of the Bancontact authorization page that the customer is redirected to. + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentConfirmParamsPaymentMethodOptionsBillie(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + + +class PaymentIntentConfirmParamsPaymentMethodOptionsBlik(TypedDict): + code: NotRequired[str] + """ + The 6-digit BLIK code that a customer has generated using their banking application. Can only be set on confirmation. + """ + setup_future_usage: NotRequired["Literal['']|Literal['none']"] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentConfirmParamsPaymentMethodOptionsBoleto(TypedDict): + expires_after_days: NotRequired[int] + """ + The number of calendar days before a Boleto voucher expires. For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto invoice will expire on Wednesday at 23:59 America/Sao_Paulo time. + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session', 'on_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentConfirmParamsPaymentMethodOptionsCard(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + cvc_token: NotRequired[str] + """ + A single-use `cvc_update` Token that represents a card CVC value. When provided, the CVC value will be verified during the card payment attempt. This parameter can only be provided during confirmation. + """ + installments: NotRequired[ + "PaymentIntentConfirmParamsPaymentMethodOptionsCardInstallments" + ] + """ + Installment configuration for payments attempted on this PaymentIntent. + + For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments). + """ + mandate_options: NotRequired[ + "PaymentIntentConfirmParamsPaymentMethodOptionsCardMandateOptions" + ] + """ + Configuration options for setting up an eMandate for cards issued in India. + """ + moto: NotRequired[bool] + """ + When specified, this parameter indicates that a transaction will be marked + as MOTO (Mail Order Telephone Order) and thus out of scope for SCA. This + parameter can only be provided during confirmation. + """ + network: NotRequired[ + Literal[ + "amex", + "cartes_bancaires", + "diners", + "discover", + "eftpos_au", + "girocard", + "interac", + "jcb", + "link", + "mastercard", + "unionpay", + "unknown", + "visa", + ] + ] + """ + Selected network to process this PaymentIntent on. Depends on the available networks of the card attached to the PaymentIntent. Can be only set confirm-time. + """ + request_decremental_authorization: NotRequired[ + Literal["if_available", "never"] + ] + """ + Request ability to [decrement the authorization](https://stripe.com/docs/payments/decremental-authorization) for this PaymentIntent. + """ + request_extended_authorization: NotRequired[ + Literal["if_available", "never"] + ] + """ + Request ability to [capture beyond the standard authorization validity window](https://stripe.com/docs/payments/extended-authorization) for this PaymentIntent. + """ + request_incremental_authorization: NotRequired[ + Literal["if_available", "never"] + ] + """ + Request ability to [increment the authorization](https://stripe.com/docs/payments/incremental-authorization) for this PaymentIntent. + """ + request_multicapture: NotRequired[Literal["if_available", "never"]] + """ + Request ability to make [multiple captures](https://stripe.com/docs/payments/multicapture) for this PaymentIntent. + """ + request_overcapture: NotRequired[Literal["if_available", "never"]] + """ + Request ability to [overcapture](https://stripe.com/docs/payments/overcapture) for this PaymentIntent. + """ + request_partial_authorization: NotRequired[ + Literal["if_available", "never"] + ] + """ + Request partial authorization on this PaymentIntent. + """ + request_three_d_secure: NotRequired[ + Literal["any", "automatic", "challenge"] + ] + """ + We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + """ + require_cvc_recollection: NotRequired[bool] + """ + When enabled, using a card that is attached to a customer will require the CVC to be provided again (i.e. using the cvc_token parameter). + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session', 'on_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + statement_descriptor_suffix_kana: NotRequired["Literal['']|str"] + """ + Provides information about a card payment that customers see on their statements. Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor that's set on the account to form the complete statement descriptor. Maximum 22 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 22 characters. + """ + statement_descriptor_suffix_kanji: NotRequired["Literal['']|str"] + """ + Provides information about a card payment that customers see on their statements. Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement descriptor that's set on the account to form the complete statement descriptor. Maximum 17 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 17 characters. + """ + statement_details: NotRequired[ + "Literal['']|PaymentIntentConfirmParamsPaymentMethodOptionsCardStatementDetails" + ] + """ + Statement details for this payment intent. You can use this to override the merchant details shown on your customers' statements. + """ + three_d_secure: NotRequired[ + "PaymentIntentConfirmParamsPaymentMethodOptionsCardThreeDSecure" + ] + """ + If 3D Secure authentication was performed with a third-party provider, + the authentication details to use for this payment. + """ + + +class PaymentIntentConfirmParamsPaymentMethodOptionsCardInstallments( + TypedDict +): + enabled: NotRequired[bool] + """ + Setting to true enables installments for this PaymentIntent. + This will cause the response to contain a list of available installment plans. + Setting to false will prevent any selected plan from applying to a charge. + """ + plan: NotRequired[ + "Literal['']|PaymentIntentConfirmParamsPaymentMethodOptionsCardInstallmentsPlan" + ] + """ + The selected installment plan to use for this payment attempt. + This parameter can only be provided during confirmation. + """ + + +class PaymentIntentConfirmParamsPaymentMethodOptionsCardInstallmentsPlan( + TypedDict, +): + count: NotRequired[int] + """ + For `fixed_count` installment plans, this is required. It represents the number of installment payments your customer will make to their credit card. + """ + interval: NotRequired[Literal["month"]] + """ + For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card. + One of `month`. + """ + type: Literal["bonus", "fixed_count", "revolving"] + """ + Type of installment plan, one of `fixed_count`, `bonus`, or `revolving`. + """ + + +class PaymentIntentConfirmParamsPaymentMethodOptionsCardMandateOptions( + TypedDict, +): + amount: int + """ + Amount to be charged for future payments. + """ + amount_type: Literal["fixed", "maximum"] + """ + One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. + """ + description: NotRequired[str] + """ + A description of the mandate or subscription that is meant to be displayed to the customer. + """ + end_date: NotRequired[int] + """ + End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. + """ + interval: Literal["day", "month", "sporadic", "week", "year"] + """ + Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`. + """ + interval_count: NotRequired[int] + """ + The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`. + """ + reference: str + """ + Unique identifier for the mandate or subscription. + """ + start_date: int + """ + Start date of the mandate or subscription. Start date should not be lesser than yesterday. + """ + supported_types: NotRequired[List[Literal["india"]]] + """ + Specifies the type of mandates supported. Possible values are `india`. + """ + + +class PaymentIntentConfirmParamsPaymentMethodOptionsCardStatementDetails( + TypedDict, +): + address: NotRequired[ + "PaymentIntentConfirmParamsPaymentMethodOptionsCardStatementDetailsAddress" + ] + """ + Please pass in an address that is within your Stripe user account country + """ + phone: NotRequired[str] + """ + Phone number (e.g., a toll-free number that customers can call) + """ + + +class PaymentIntentConfirmParamsPaymentMethodOptionsCardStatementDetailsAddress( + 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. + """ + + +class PaymentIntentConfirmParamsPaymentMethodOptionsCardThreeDSecure( + TypedDict +): + ares_trans_status: NotRequired[Literal["A", "C", "I", "N", "R", "U", "Y"]] + """ + The `transStatus` returned from the card Issuer's ACS in the ARes. + """ + cryptogram: str + """ + The cryptogram, also known as the "authentication value" (AAV, CAVV or + AEVV). This value is 20 bytes, base64-encoded into a 28-character string. + (Most 3D Secure providers will return the base64-encoded version, which + is what you should specify here.) + """ + electronic_commerce_indicator: NotRequired[ + Literal["01", "02", "05", "06", "07"] + ] + """ + The Electronic Commerce Indicator (ECI) is returned by your 3D Secure + provider and indicates what degree of authentication was performed. + """ + exemption_indicator: NotRequired[Literal["low_risk", "none"]] + """ + The exemption requested via 3DS and accepted by the issuer at authentication time. + """ + network_options: NotRequired[ + "PaymentIntentConfirmParamsPaymentMethodOptionsCardThreeDSecureNetworkOptions" + ] + """ + Network specific 3DS fields. Network specific arguments require an + explicit card brand choice. The parameter `payment_method_options.card.network`` + must be populated accordingly + """ + requestor_challenge_indicator: NotRequired[str] + """ + The challenge indicator (`threeDSRequestorChallengeInd`) which was requested in the + AReq sent to the card Issuer's ACS. A string containing 2 digits from 01-99. + """ + transaction_id: str + """ + For 3D Secure 1, the XID. For 3D Secure 2, the Directory Server + Transaction ID (dsTransID). + """ + version: Literal["1.0.2", "2.1.0", "2.2.0"] + """ + The version of 3D Secure that was performed. + """ + + +class PaymentIntentConfirmParamsPaymentMethodOptionsCardThreeDSecureNetworkOptions( + TypedDict, +): + cartes_bancaires: NotRequired[ + "PaymentIntentConfirmParamsPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancaires" + ] + """ + Cartes Bancaires-specific 3DS fields. + """ + + +class PaymentIntentConfirmParamsPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancaires( + TypedDict, +): + cb_avalgo: Literal["0", "1", "2", "3", "4", "A"] + """ + The cryptogram calculation algorithm used by the card Issuer's ACS + to calculate the Authentication cryptogram. Also known as `cavvAlgorithm`. + messageExtension: CB-AVALGO + """ + cb_exemption: NotRequired[str] + """ + The exemption indicator returned from Cartes Bancaires in the ARes. + message extension: CB-EXEMPTION; string (4 characters) + This is a 3 byte bitmap (low significant byte first and most significant + bit first) that has been Base64 encoded + """ + cb_score: NotRequired[int] + """ + The risk score returned from Cartes Bancaires in the ARes. + message extension: CB-SCORE; numeric value 0-99 + """ + + +class PaymentIntentConfirmParamsPaymentMethodOptionsCardPresent(TypedDict): + request_extended_authorization: NotRequired[bool] + """ + Request ability to capture this payment beyond the standard [authorization validity window](https://stripe.com/docs/terminal/features/extended-authorizations#authorization-validity) + """ + request_incremental_authorization_support: NotRequired[bool] + """ + Request ability to [increment](https://stripe.com/docs/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://stripe.com/docs/api/payment_intents/confirm) response to verify support. + """ + routing: NotRequired[ + "PaymentIntentConfirmParamsPaymentMethodOptionsCardPresentRouting" + ] + """ + Network routing priority on co-branded EMV cards supporting domestic debit and international card schemes. + """ + + +class PaymentIntentConfirmParamsPaymentMethodOptionsCardPresentRouting( + TypedDict, +): + requested_priority: NotRequired[Literal["domestic", "international"]] + """ + Routing requested priority + """ + + +class PaymentIntentConfirmParamsPaymentMethodOptionsCashapp(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session', 'on_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentConfirmParamsPaymentMethodOptionsCrypto(TypedDict): + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentConfirmParamsPaymentMethodOptionsCustomerBalance(TypedDict): + bank_transfer: NotRequired[ + "PaymentIntentConfirmParamsPaymentMethodOptionsCustomerBalanceBankTransfer" + ] + """ + Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. + """ + funding_type: NotRequired[Literal["bank_transfer"]] + """ + The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. + """ + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentConfirmParamsPaymentMethodOptionsCustomerBalanceBankTransfer( + TypedDict, +): + eu_bank_transfer: NotRequired[ + "PaymentIntentConfirmParamsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer" + ] + """ + Configuration for the eu_bank_transfer funding type. + """ + requested_address_types: NotRequired[ + List[ + Literal[ + "aba", "iban", "sepa", "sort_code", "spei", "swift", "zengin" + ] + ] + ] + """ + List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned. + + Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`. + """ + type: Literal[ + "eu_bank_transfer", + "gb_bank_transfer", + "jp_bank_transfer", + "mx_bank_transfer", + "us_bank_transfer", + ] + """ + The list of bank transfer types that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. + """ + + +class PaymentIntentConfirmParamsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer( + TypedDict, +): + country: str + """ + The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. + """ + + +class PaymentIntentConfirmParamsPaymentMethodOptionsEps(TypedDict): + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentConfirmParamsPaymentMethodOptionsFpx(TypedDict): + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentConfirmParamsPaymentMethodOptionsGiropay(TypedDict): + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentConfirmParamsPaymentMethodOptionsGopay(TypedDict): + setup_future_usage: NotRequired[Literal["none", "off_session"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentConfirmParamsPaymentMethodOptionsGrabpay(TypedDict): + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentConfirmParamsPaymentMethodOptionsIdBankTransfer(TypedDict): + expires_after: NotRequired[int] + """ + The UNIX timestamp until which the virtual bank account is valid. Permitted range is from 5 minutes from now until 31 days from now. If unset, it defaults to 3 days from now. + """ + expires_at: NotRequired[int] + """ + The UNIX timestamp until which the virtual bank account is valid. Permitted range is from now until 30 days from now. If unset, it defaults to 1 days from now. + """ + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentConfirmParamsPaymentMethodOptionsIdeal(TypedDict): + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentConfirmParamsPaymentMethodOptionsInteracPresent(TypedDict): + pass + + +class PaymentIntentConfirmParamsPaymentMethodOptionsKakaoPay(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + """ + + +class PaymentIntentConfirmParamsPaymentMethodOptionsKlarna(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + on_demand: NotRequired[ + "PaymentIntentConfirmParamsPaymentMethodOptionsKlarnaOnDemand" + ] + """ + On-demand details if setting up or charging an on-demand payment. + """ + preferred_locale: NotRequired[ + Literal[ + "cs-CZ", + "da-DK", + "de-AT", + "de-CH", + "de-DE", + "el-GR", + "en-AT", + "en-AU", + "en-BE", + "en-CA", + "en-CH", + "en-CZ", + "en-DE", + "en-DK", + "en-ES", + "en-FI", + "en-FR", + "en-GB", + "en-GR", + "en-IE", + "en-IT", + "en-NL", + "en-NO", + "en-NZ", + "en-PL", + "en-PT", + "en-RO", + "en-SE", + "en-US", + "es-ES", + "es-US", + "fi-FI", + "fr-BE", + "fr-CA", + "fr-CH", + "fr-FR", + "it-CH", + "it-IT", + "nb-NO", + "nl-BE", + "nl-NL", + "pl-PL", + "pt-PT", + "ro-RO", + "sv-FI", + "sv-SE", + ] + ] + """ + Preferred language of the Klarna authorization page that the customer is redirected to + """ + setup_future_usage: NotRequired[ + Literal["none", "off_session", "on_session"] + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + subscriptions: NotRequired[ + "Literal['']|List[PaymentIntentConfirmParamsPaymentMethodOptionsKlarnaSubscription]" + ] + """ + Subscription details if setting up or charging a subscription. + """ + + +class PaymentIntentConfirmParamsPaymentMethodOptionsKlarnaOnDemand(TypedDict): + average_amount: NotRequired[int] + """ + Your average amount value. You can use a value across your customer base, or segment based on customer type, country, etc. + """ + maximum_amount: NotRequired[int] + """ + The maximum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. + """ + minimum_amount: NotRequired[int] + """ + The lowest or minimum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. + """ + purchase_interval: NotRequired[Literal["day", "month", "week", "year"]] + """ + Interval at which the customer is making purchases + """ + purchase_interval_count: NotRequired[int] + """ + The number of `purchase_interval` between charges + """ + + +class PaymentIntentConfirmParamsPaymentMethodOptionsKlarnaSubscription( + TypedDict, +): + interval: Literal["day", "month", "week", "year"] + """ + Unit of time between subscription charges. + """ + interval_count: NotRequired[int] + """ + The number of intervals (specified in the `interval` attribute) between subscription charges. For example, `interval=month` and `interval_count=3` charges every 3 months. + """ + name: NotRequired[str] + """ + Name for subscription. + """ + next_billing: NotRequired[ + "PaymentIntentConfirmParamsPaymentMethodOptionsKlarnaSubscriptionNextBilling" + ] + """ + Describes the upcoming charge for this subscription. + """ + reference: str + """ + A non-customer-facing reference to correlate subscription charges in the Klarna app. Use a value that persists across subscription charges. + """ + + +class PaymentIntentConfirmParamsPaymentMethodOptionsKlarnaSubscriptionNextBilling( + TypedDict, +): + amount: int + """ + The amount of the next charge for the subscription. + """ + date: str + """ + The date of the next charge for the subscription in YYYY-MM-DD format. + """ + + +class PaymentIntentConfirmParamsPaymentMethodOptionsKonbini(TypedDict): + confirmation_number: NotRequired["Literal['']|str"] + """ + An optional 10 to 11 digit numeric-only string determining the confirmation code at applicable convenience stores. Must not consist of only zeroes and could be rejected in case of insufficient uniqueness. We recommend to use the customer's phone number. + """ + expires_after_days: NotRequired["Literal['']|int"] + """ + The number of calendar days (between 1 and 60) after which Konbini payment instructions will expire. For example, if a PaymentIntent is confirmed with Konbini and `expires_after_days` set to 2 on Monday JST, the instructions will expire on Wednesday 23:59:59 JST. Defaults to 3 days. + """ + expires_at: NotRequired["Literal['']|int"] + """ + The timestamp at which the Konbini payment instructions will expire. Only one of `expires_after_days` or `expires_at` may be set. + """ + product_description: NotRequired["Literal['']|str"] + """ + A product descriptor of up to 22 characters, which will appear to customers at the convenience store. + """ + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentConfirmParamsPaymentMethodOptionsKrCard(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + """ + + +class PaymentIntentConfirmParamsPaymentMethodOptionsLink(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + persistent_token: NotRequired[str] + """ + [Deprecated] This is a legacy parameter that no longer has any function. + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentConfirmParamsPaymentMethodOptionsMbWay(TypedDict): + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentConfirmParamsPaymentMethodOptionsMobilepay(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentConfirmParamsPaymentMethodOptionsMultibanco(TypedDict): + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentConfirmParamsPaymentMethodOptionsNaverPay(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + """ + + +class PaymentIntentConfirmParamsPaymentMethodOptionsNzBankAccount(TypedDict): + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session', 'on_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + target_date: NotRequired[str] + """ + Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + """ + + +class PaymentIntentConfirmParamsPaymentMethodOptionsOxxo(TypedDict): + expires_after_days: NotRequired[int] + """ + The number of calendar days before an OXXO voucher expires. For example, if you create an OXXO voucher on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time. + """ + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentConfirmParamsPaymentMethodOptionsP24(TypedDict): + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + tos_shown_and_accepted: NotRequired[bool] + """ + Confirm that the payer has accepted the P24 terms and conditions. + """ + + +class PaymentIntentConfirmParamsPaymentMethodOptionsPayByBank(TypedDict): + pass + + +class PaymentIntentConfirmParamsPaymentMethodOptionsPayco(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + + +class PaymentIntentConfirmParamsPaymentMethodOptionsPaynow(TypedDict): + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentConfirmParamsPaymentMethodOptionsPaypal(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds will be captured from the customer's account. + """ + line_items: NotRequired[ + List["PaymentIntentConfirmParamsPaymentMethodOptionsPaypalLineItem"] + ] + """ + The line items purchased by the customer. + """ + preferred_locale: NotRequired[ + Literal[ + "cs-CZ", + "da-DK", + "de-AT", + "de-DE", + "de-LU", + "el-GR", + "en-GB", + "en-US", + "es-ES", + "fi-FI", + "fr-BE", + "fr-FR", + "fr-LU", + "hu-HU", + "it-IT", + "nl-BE", + "nl-NL", + "pl-PL", + "pt-PT", + "sk-SK", + "sv-SE", + ] + ] + """ + [Preferred locale](https://stripe.com/docs/payments/paypal/supported-locales) of the PayPal checkout page that the customer is redirected to. + """ + reference: NotRequired[str] + """ + A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. + """ + reference_id: NotRequired[str] + """ + A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. + """ + risk_correlation_id: NotRequired[str] + """ + The risk correlation ID for an on-session payment using a saved PayPal payment method. + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + subsellers: NotRequired[List[str]] + """ + The Stripe connected account IDs of the sellers on the platform for this transaction (optional). Only allowed when [separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) are used. + """ + + +class PaymentIntentConfirmParamsPaymentMethodOptionsPaypalLineItem(TypedDict): + category: NotRequired[ + Literal["digital_goods", "donation", "physical_goods"] + ] + """ + Type of the line item. + """ + description: NotRequired[str] + """ + Description of the line item. + """ + name: str + """ + Descriptive name of the line item. + """ + quantity: int + """ + Quantity of the line item. Must be a positive number. + """ + sku: NotRequired[str] + """ + Client facing stock keeping unit, article number or similar. + """ + sold_by: NotRequired[str] + """ + The Stripe account ID of the connected account that sells the item. + """ + tax: NotRequired[ + "PaymentIntentConfirmParamsPaymentMethodOptionsPaypalLineItemTax" + ] + """ + The tax information for the line item. + """ + unit_amount: int + """ + Price for a single unit of the line item in minor units. Cannot be a negative number. + """ + + +class PaymentIntentConfirmParamsPaymentMethodOptionsPaypalLineItemTax( + TypedDict, +): + amount: int + """ + The tax for a single unit of the line item in minor units. Cannot be a negative number. + """ + behavior: Literal["exclusive", "inclusive"] + """ + The tax behavior for the line item. + """ + + +class PaymentIntentConfirmParamsPaymentMethodOptionsPaypay(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + + +class PaymentIntentConfirmParamsPaymentMethodOptionsPayto(TypedDict): + mandate_options: NotRequired[ + "PaymentIntentConfirmParamsPaymentMethodOptionsPaytoMandateOptions" + ] + """ + Additional fields for Mandate creation. Only `purpose` field is configurable for PayTo PaymentIntent with `setup_future_usage=none`. Other fields are only applicable to PayTo PaymentIntent with `setup_future_usage=off_session` + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentConfirmParamsPaymentMethodOptionsPaytoMandateOptions( + TypedDict, +): + amount: NotRequired[int] + """ + Amount that will be collected. It is required when `amount_type` is `fixed`. + """ + amount_type: NotRequired[Literal["fixed", "maximum"]] + """ + The type of amount that will be collected. The amount charged must be exact or up to the value of `amount` param for `fixed` or `maximum` type respectively. + """ + end_date: NotRequired[str] + """ + Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no end date. + """ + payment_schedule: NotRequired[ + Literal[ + "adhoc", + "annual", + "daily", + "fortnightly", + "monthly", + "quarterly", + "semi_annual", + "weekly", + ] + ] + """ + The periodicity at which payments will be collected. + """ + payments_per_period: NotRequired[int] + """ + The number of payments that will be made during a payment period. Defaults to 1 except for when `payment_schedule` is `adhoc`. In that case, it defaults to no limit. + """ + purpose: NotRequired[ + Literal[ + "dependant_support", + "government", + "loan", + "mortgage", + "other", + "pension", + "personal", + "retail", + "salary", + "tax", + "utility", + ] + ] + """ + The purpose for which payments are made. Defaults to retail. + """ + + +class PaymentIntentConfirmParamsPaymentMethodOptionsPix(TypedDict): + amount_includes_iof: NotRequired[Literal["always", "never"]] + """ + Determines if the amount includes the IOF tax. Defaults to `never`. + """ + expires_after_seconds: NotRequired[int] + """ + The number of seconds (between 10 and 1209600) after which Pix payment will expire. Defaults to 86400 seconds. + """ + expires_at: NotRequired[int] + """ + The timestamp at which the Pix expires (between 10 and 1209600 seconds in the future). Defaults to 1 day in the future. + """ + mandate_options: NotRequired[ + "PaymentIntentConfirmParamsPaymentMethodOptionsPixMandateOptions" + ] + """ + Additional fields for mandate creation. Only applicable when `setup_future_usage=off_session`. + """ + setup_future_usage: NotRequired[Literal["none", "off_session"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentConfirmParamsPaymentMethodOptionsPixMandateOptions( + TypedDict, +): + amount: NotRequired[int] + """ + Amount to be charged for future payments. Required when `amount_type=fixed`. If not provided for `amount_type=maximum`, defaults to 40000. + """ + amount_includes_iof: NotRequired[Literal["always", "never"]] + """ + Determines if the amount includes the IOF tax. Defaults to `never`. + """ + amount_type: NotRequired[Literal["fixed", "maximum"]] + """ + Type of amount. Defaults to `maximum`. + """ + currency: NotRequired[str] + """ + Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Only `brl` is supported currently. + """ + end_date: NotRequired[str] + """ + Date when the mandate expires and no further payments will be charged, in `YYYY-MM-DD`. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. + """ + payment_schedule: NotRequired[ + Literal["halfyearly", "monthly", "quarterly", "weekly", "yearly"] + ] + """ + Schedule at which the future payments will be charged. Defaults to `weekly`. + """ + reference: NotRequired[str] + """ + Subscription name displayed to buyers in their bank app. Defaults to the displayable business name. + """ + start_date: NotRequired[str] + """ + Start date of the mandate, in `YYYY-MM-DD`. Start date should be at least 3 days in the future. Defaults to 3 days after the current date. + """ + + +class PaymentIntentConfirmParamsPaymentMethodOptionsPromptpay(TypedDict): + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentConfirmParamsPaymentMethodOptionsQris(TypedDict): + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentConfirmParamsPaymentMethodOptionsRechnung(TypedDict): + pass + + +class PaymentIntentConfirmParamsPaymentMethodOptionsRevolutPay(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + """ + + +class PaymentIntentConfirmParamsPaymentMethodOptionsSamsungPay(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + + +class PaymentIntentConfirmParamsPaymentMethodOptionsSatispay(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + + +class PaymentIntentConfirmParamsPaymentMethodOptionsSepaDebit(TypedDict): + mandate_options: NotRequired[ + "PaymentIntentConfirmParamsPaymentMethodOptionsSepaDebitMandateOptions" + ] + """ + Additional fields for Mandate creation + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session', 'on_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + target_date: NotRequired[str] + """ + Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + """ + + +class PaymentIntentConfirmParamsPaymentMethodOptionsSepaDebitMandateOptions( + TypedDict, +): + reference_prefix: NotRequired["Literal['']|str"] + """ + Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'. + """ + + +class PaymentIntentConfirmParamsPaymentMethodOptionsShopeepay(TypedDict): + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentConfirmParamsPaymentMethodOptionsSofort(TypedDict): + preferred_language: NotRequired[ + "Literal['']|Literal['de', 'en', 'es', 'fr', 'it', 'nl', 'pl']" + ] + """ + Language shown to the payer on redirect. + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentConfirmParamsPaymentMethodOptionsStripeBalance(TypedDict): + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentConfirmParamsPaymentMethodOptionsSwish(TypedDict): + reference: NotRequired["Literal['']|str"] + """ + A reference for this payment to be displayed in the Swish app. + """ + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentConfirmParamsPaymentMethodOptionsTwint(TypedDict): + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentConfirmParamsPaymentMethodOptionsUsBankAccount(TypedDict): + financial_connections: NotRequired[ + "PaymentIntentConfirmParamsPaymentMethodOptionsUsBankAccountFinancialConnections" + ] + """ + Additional fields for Financial Connections Session creation + """ + mandate_options: NotRequired[ + "PaymentIntentConfirmParamsPaymentMethodOptionsUsBankAccountMandateOptions" + ] + """ + Additional fields for Mandate creation + """ + networks: NotRequired[ + "PaymentIntentConfirmParamsPaymentMethodOptionsUsBankAccountNetworks" + ] + """ + Additional fields for network related functions + """ + preferred_settlement_speed: NotRequired[ + "Literal['']|Literal['fastest', 'standard']" + ] + """ + Preferred transaction settlement speed + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session', 'on_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + target_date: NotRequired[str] + """ + Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + """ + verification_method: NotRequired[ + Literal["automatic", "instant", "microdeposits"] + ] + """ + Bank account verification method. + """ + + +class PaymentIntentConfirmParamsPaymentMethodOptionsUsBankAccountFinancialConnections( + TypedDict, +): + filters: NotRequired[ + "PaymentIntentConfirmParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters" + ] + """ + Provide filters for the linked accounts that the customer can select for the payment method. + """ + manual_entry: NotRequired[ + "PaymentIntentConfirmParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsManualEntry" + ] + """ + Customize manual entry behavior + """ + permissions: NotRequired[ + List[ + Literal["balances", "ownership", "payment_method", "transactions"] + ] + ] + """ + The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. + """ + prefetch: NotRequired[ + List[ + Literal[ + "balances", "inferred_balances", "ownership", "transactions" + ] + ] + ] + """ + List of data features that you would like to retrieve upon account creation. + """ + return_url: NotRequired[str] + """ + For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. + """ + + +class PaymentIntentConfirmParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters( + TypedDict, +): + account_subcategories: NotRequired[List[Literal["checking", "savings"]]] + """ + The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`. + """ + institution: NotRequired[str] + """ + ID of the institution to use to filter for selectable accounts. + """ + + +class PaymentIntentConfirmParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsManualEntry( + TypedDict, +): + mode: Literal["automatic", "custom"] + """ + Settings for configuring manual entry of account details. + """ + + +class PaymentIntentConfirmParamsPaymentMethodOptionsUsBankAccountMandateOptions( + TypedDict, +): + collection_method: NotRequired["Literal['']|Literal['paper']"] + """ + The method used to collect offline mandate customer acceptance. + """ + + +class PaymentIntentConfirmParamsPaymentMethodOptionsUsBankAccountNetworks( + TypedDict, +): + requested: NotRequired[List[Literal["ach", "us_domestic_wire"]]] + """ + Triggers validations to run across the selected networks + """ + + +class PaymentIntentConfirmParamsPaymentMethodOptionsWechatPay(TypedDict): + app_id: NotRequired[str] + """ + The app ID registered with WeChat Pay. Only required when client is ios or android. + """ + client: NotRequired[Literal["android", "ios", "web"]] + """ + The client type that the end customer will pay from + """ + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentConfirmParamsPaymentMethodOptionsZip(TypedDict): + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentConfirmParamsRadarOptions(TypedDict): + session: NotRequired[str] + """ + A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. + """ + + +class PaymentIntentConfirmParamsShipping(TypedDict): + address: "PaymentIntentConfirmParamsShippingAddress" + """ + Shipping address. + """ + carrier: NotRequired[str] + """ + The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. + """ + name: str + """ + Recipient name. + """ + phone: NotRequired[str] + """ + Recipient phone (including extension). + """ + tracking_number: NotRequired[str] + """ + The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. + """ + + +class PaymentIntentConfirmParamsShippingAddress(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. + """ diff --git a/stripe/params/_payment_intent_create_params.py b/stripe/params/_payment_intent_create_params.py new file mode 100644 index 000000000..734f66923 --- /dev/null +++ b/stripe/params/_payment_intent_create_params.py @@ -0,0 +1,4532 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List, Union +from typing_extensions import Literal, NotRequired, TypedDict + + +class PaymentIntentCreateParams(RequestOptions): + amount: int + """ + Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). + """ + amount_details: NotRequired["PaymentIntentCreateParamsAmountDetails"] + """ + Provides industry-specific information about the amount. + """ + application_fee_amount: NotRequired[int] + """ + The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total amount captured. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + """ + automatic_payment_methods: NotRequired[ + "PaymentIntentCreateParamsAutomaticPaymentMethods" + ] + """ + When you enable this parameter, this PaymentIntent accepts payment methods that you enable in the Dashboard and that are compatible with this PaymentIntent's other parameters. + """ + capture_method: NotRequired[ + Literal["automatic", "automatic_async", "manual"] + ] + """ + Controls when the funds will be captured from the customer's account. + """ + confirm: NotRequired[bool] + """ + Set to `true` to attempt to [confirm this PaymentIntent](https://stripe.com/docs/api/payment_intents/confirm) immediately. This parameter defaults to `false`. When creating and confirming a PaymentIntent at the same time, you can also provide the parameters available in the [Confirm API](https://stripe.com/docs/api/payment_intents/confirm). + """ + confirmation_method: NotRequired[Literal["automatic", "manual"]] + """ + Describes whether we can confirm this PaymentIntent automatically, or if it requires customer action to confirm the payment. + """ + confirmation_token: NotRequired[str] + """ + ID of the ConfirmationToken used to confirm this PaymentIntent. + + If the provided ConfirmationToken contains properties that are also being provided in this request, such as `payment_method`, then the values in this request will take precedence. + """ + 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). + """ + customer: NotRequired[str] + """ + ID of the Customer this PaymentIntent belongs to, if one exists. + + Payment methods attached to other Customers cannot be used with this PaymentIntent. + + If [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) is set and this PaymentIntent's payment method is not `card_present`, then the payment method attaches to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + """ + customer_account: NotRequired[str] + """ + ID of the Account this PaymentIntent belongs to, if one exists. + + Payment methods attached to other Accounts cannot be used with this PaymentIntent. + + If [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) is set and this PaymentIntent's payment method is not `card_present`, then the payment method attaches to the Account after the PaymentIntent has been confirmed and any required actions from the user are complete. If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Account instead. + """ + description: NotRequired[str] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ + error_on_requires_action: NotRequired[bool] + """ + Set to `true` to fail the payment attempt if the PaymentIntent transitions into `requires_action`. Use this parameter for simpler integrations that don't handle customer actions, such as [saving cards without authentication](https://stripe.com/docs/payments/save-card-without-authentication). This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). + """ + excluded_payment_method_types: NotRequired[ + List[ + Literal[ + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "alma", + "amazon_pay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "billie", + "blik", + "boleto", + "card", + "cashapp", + "crypto", + "customer_balance", + "eps", + "fpx", + "giropay", + "gopay", + "grabpay", + "id_bank_transfer", + "ideal", + "kakao_pay", + "klarna", + "konbini", + "kr_card", + "mb_way", + "mobilepay", + "multibanco", + "naver_pay", + "nz_bank_account", + "oxxo", + "p24", + "pay_by_bank", + "payco", + "paynow", + "paypal", + "paypay", + "payto", + "pix", + "promptpay", + "qris", + "rechnung", + "revolut_pay", + "samsung_pay", + "satispay", + "sepa_debit", + "shopeepay", + "sofort", + "stripe_balance", + "swish", + "twint", + "us_bank_account", + "wechat_pay", + "zip", + ] + ] + ] + """ + The list of payment method types to exclude from use with this payment. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + fx_quote: NotRequired[str] + """ + The FX rate in the quote is validated and used to convert the presentment amount to the settlement amount. + """ + hooks: NotRequired["PaymentIntentCreateParamsHooks"] + """ + Automations to be run during the PaymentIntent lifecycle + """ + mandate: NotRequired[str] + """ + ID of the mandate that's used for this payment. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). + """ + mandate_data: NotRequired[ + "Literal['']|PaymentIntentCreateParamsMandateData" + ] + """ + This hash contains details about the Mandate to create. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + off_session: NotRequired["bool|Literal['one_off', 'recurring']"] + """ + Set to `true` to indicate that the customer isn't in your checkout flow during this payment attempt and can't authenticate. Use this parameter in scenarios where you collect card details and [charge them later](https://stripe.com/docs/payments/cards/charging-saved-cards). This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). + """ + on_behalf_of: NotRequired[str] + """ + The Stripe account ID that these funds are intended for. Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + """ + payment_details: NotRequired["PaymentIntentCreateParamsPaymentDetails"] + """ + Provides industry-specific information about the charge. + """ + payment_method: NotRequired[str] + """ + ID of the payment method (a PaymentMethod, Card, or [compatible Source](https://stripe.com/docs/payments/payment-methods#compatibility) object) to attach to this PaymentIntent. + + If you don't provide the `payment_method` parameter or the `source` parameter with `confirm=true`, `source` automatically populates with `customer.default_source` to improve migration for users of the Charges API. We recommend that you explicitly provide the `payment_method` moving forward. + If the payment method is attached to a Customer, you must also provide the ID of that Customer as the [customer](https://stripe.com/docs/api#create_payment_intent-customer) parameter of this PaymentIntent. + end + """ + payment_method_configuration: NotRequired[str] + """ + The ID of the [payment method configuration](https://stripe.com/docs/api/payment_method_configurations) to use with this PaymentIntent. + """ + payment_method_data: NotRequired[ + "PaymentIntentCreateParamsPaymentMethodData" + ] + """ + If provided, this hash will be used to create a PaymentMethod. The new PaymentMethod will appear + in the [payment_method](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-payment_method) + property on the PaymentIntent. + """ + payment_method_options: NotRequired[ + "PaymentIntentCreateParamsPaymentMethodOptions" + ] + """ + Payment method-specific configuration for this PaymentIntent. + """ + payment_method_types: NotRequired[List[str]] + """ + The list of payment method types (for example, a card) that this PaymentIntent can use. If you don't provide this, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). A list of valid payment method types can be found [here](https://docs.stripe.com/api/payment_methods/object#payment_method_object-type). + """ + radar_options: NotRequired["PaymentIntentCreateParamsRadarOptions"] + """ + Options to configure Radar. Learn more about [Radar Sessions](https://stripe.com/docs/radar/radar-session). + """ + receipt_email: NotRequired[str] + """ + Email address to send the receipt to. If you specify `receipt_email` for a payment in live mode, you send a receipt regardless of your [email settings](https://dashboard.stripe.com/account/emails). + """ + return_url: NotRequired[str] + """ + The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). + """ + secret_key_confirmation: NotRequired[Literal["optional", "required"]] + """ + Indicates whether confirmation for this PaymentIntent using a secret key is `required` or `optional`. + """ + setup_future_usage: NotRequired[Literal["off_session", "on_session"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + """ + shipping: NotRequired["PaymentIntentCreateParamsShipping"] + """ + Shipping information for this PaymentIntent. + """ + statement_descriptor: NotRequired[str] + """ + Text that appears on the customer's statement as the statement descriptor for a non-card charge. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see [the Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors). + + Setting this value for a card charge returns an error. For card charges, set the [statement_descriptor_suffix](https://docs.stripe.com/get-started/account/statement-descriptors#dynamic) instead. + """ + statement_descriptor_suffix: NotRequired[str] + """ + Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. + """ + transfer_data: NotRequired["PaymentIntentCreateParamsTransferData"] + """ + The parameters that you can use to automatically create a Transfer. + Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + """ + transfer_group: NotRequired[str] + """ + A string that identifies the resulting payment as part of a group. Learn more about the [use case for connected accounts](https://stripe.com/docs/connect/separate-charges-and-transfers). + """ + use_stripe_sdk: NotRequired[bool] + """ + Set to `true` when confirming server-side and using Stripe.js, iOS, or Android client-side SDKs to handle the next actions. + """ + + +class PaymentIntentCreateParamsAmountDetails(TypedDict): + discount_amount: NotRequired["Literal['']|int"] + """ + The total discount applied on the transaction. + """ + line_items: NotRequired[ + "Literal['']|List[PaymentIntentCreateParamsAmountDetailsLineItem]" + ] + """ + A list of line items, each containing information about a product in the PaymentIntent. There is a maximum of 100 line items. + """ + shipping: NotRequired[ + "Literal['']|PaymentIntentCreateParamsAmountDetailsShipping" + ] + """ + Contains information about the shipping portion of the amount. + """ + tax: NotRequired["Literal['']|PaymentIntentCreateParamsAmountDetailsTax"] + """ + Contains information about the tax portion of the amount. + """ + + +class PaymentIntentCreateParamsAmountDetailsLineItem(TypedDict): + discount_amount: NotRequired[int] + """ + The amount an item was discounted for. Positive integer. + """ + payment_method_options: NotRequired[ + "PaymentIntentCreateParamsAmountDetailsLineItemPaymentMethodOptions" + ] + """ + Payment method-specific information for line items. + """ + product_code: NotRequired[str] + """ + Unique identifier of the product. At most 12 characters long. + """ + product_name: str + """ + Name of the product. At most 100 characters long. + """ + quantity: int + """ + Number of items of the product. Positive integer. + """ + tax: NotRequired["PaymentIntentCreateParamsAmountDetailsLineItemTax"] + """ + Contains information about the tax on the item. + """ + unit_cost: int + """ + Cost of the product. Non-negative integer. + """ + unit_of_measure: NotRequired[str] + """ + A unit of measure for the line item, such as gallons, feet, meters, etc. + """ + + +class PaymentIntentCreateParamsAmountDetailsLineItemPaymentMethodOptions( + TypedDict, +): + card: NotRequired[ + "PaymentIntentCreateParamsAmountDetailsLineItemPaymentMethodOptionsCard" + ] + """ + This sub-hash contains line item details that are specific to `card` payment method." + """ + card_present: NotRequired[ + "PaymentIntentCreateParamsAmountDetailsLineItemPaymentMethodOptionsCardPresent" + ] + """ + This sub-hash contains line item details that are specific to `card_present` payment method." + """ + klarna: NotRequired[ + "PaymentIntentCreateParamsAmountDetailsLineItemPaymentMethodOptionsKlarna" + ] + """ + This sub-hash contains line item details that are specific to `klarna` payment method." + """ + paypal: NotRequired[ + "PaymentIntentCreateParamsAmountDetailsLineItemPaymentMethodOptionsPaypal" + ] + """ + This sub-hash contains line item details that are specific to `paypal` payment method." + """ + + +class PaymentIntentCreateParamsAmountDetailsLineItemPaymentMethodOptionsCard( + TypedDict, +): + commodity_code: NotRequired[str] + """ + Identifier that categorizes the items being purchased using a standardized commodity scheme such as (but not limited to) UNSPSC, NAICS, NAPCS, etc. + """ + + +class PaymentIntentCreateParamsAmountDetailsLineItemPaymentMethodOptionsCardPresent( + TypedDict, +): + commodity_code: NotRequired[str] + """ + Identifier that categorizes the items being purchased using a standardized commodity scheme such as (but not limited to) UNSPSC, NAICS, NAPCS, etc. + """ + + +class PaymentIntentCreateParamsAmountDetailsLineItemPaymentMethodOptionsKlarna( + TypedDict, +): + image_url: NotRequired[str] + """ + URL to an image for the product. Max length, 4096 characters. + """ + product_url: NotRequired[str] + """ + URL to the product page. Max length, 4096 characters. + """ + subscription_reference: NotRequired[str] + """ + Reference for the subscription this line item is for. + """ + + +class PaymentIntentCreateParamsAmountDetailsLineItemPaymentMethodOptionsPaypal( + TypedDict, +): + category: NotRequired[ + Literal["digital_goods", "donation", "physical_goods"] + ] + """ + Type of the line item. + """ + description: NotRequired[str] + """ + Description of the line item. + """ + sold_by: NotRequired[str] + """ + The Stripe account ID of the connected account that sells the item. + """ + + +class PaymentIntentCreateParamsAmountDetailsLineItemTax(TypedDict): + total_tax_amount: int + """ + The total tax on an item. Non-negative integer. + """ + + +class PaymentIntentCreateParamsAmountDetailsShipping(TypedDict): + amount: NotRequired["Literal['']|int"] + """ + Portion of the amount that is for shipping. + """ + from_postal_code: NotRequired["Literal['']|str"] + """ + The postal code that represents the shipping source. + """ + to_postal_code: NotRequired["Literal['']|str"] + """ + The postal code that represents the shipping destination. + """ + + +class PaymentIntentCreateParamsAmountDetailsTax(TypedDict): + total_tax_amount: int + """ + Total portion of the amount that is for tax. + """ + + +class PaymentIntentCreateParamsAutomaticPaymentMethods(TypedDict): + allow_redirects: NotRequired[Literal["always", "never"]] + """ + Controls whether this PaymentIntent will accept redirect-based payment methods. + + Redirect-based payment methods may require your customer to be redirected to a payment method's app or site for authentication or additional steps. To [confirm](https://stripe.com/docs/api/payment_intents/confirm) this PaymentIntent, you may be required to provide a `return_url` to redirect customers back to your site after they authenticate or complete the payment. + """ + enabled: bool + """ + Whether this feature is enabled. + """ + + +class PaymentIntentCreateParamsHooks(TypedDict): + inputs: NotRequired["PaymentIntentCreateParamsHooksInputs"] + """ + Arguments passed in automations + """ + + +class PaymentIntentCreateParamsHooksInputs(TypedDict): + tax: NotRequired["PaymentIntentCreateParamsHooksInputsTax"] + """ + Tax arguments for automations + """ + + +class PaymentIntentCreateParamsHooksInputsTax(TypedDict): + calculation: Union[Literal[""], str] + """ + The [TaxCalculation](https://stripe.com/docs/api/tax/calculations) id + """ + + +class PaymentIntentCreateParamsMandateData(TypedDict): + customer_acceptance: ( + "PaymentIntentCreateParamsMandateDataCustomerAcceptance" + ) + """ + This hash contains details about the customer acceptance of the Mandate. + """ + + +class PaymentIntentCreateParamsMandateDataCustomerAcceptance(TypedDict): + accepted_at: NotRequired[int] + """ + The time at which the customer accepted the Mandate. + """ + offline: NotRequired[ + "PaymentIntentCreateParamsMandateDataCustomerAcceptanceOffline" + ] + """ + If this is a Mandate accepted offline, this hash contains details about the offline acceptance. + """ + online: NotRequired[ + "PaymentIntentCreateParamsMandateDataCustomerAcceptanceOnline" + ] + """ + If this is a Mandate accepted online, this hash contains details about the online acceptance. + """ + type: Literal["offline", "online"] + """ + The type of customer acceptance information included with the Mandate. One of `online` or `offline`. + """ + + +class PaymentIntentCreateParamsMandateDataCustomerAcceptanceOffline(TypedDict): + pass + + +class PaymentIntentCreateParamsMandateDataCustomerAcceptanceOnline(TypedDict): + ip_address: str + """ + The IP address from which the Mandate was accepted by the customer. + """ + user_agent: str + """ + The user agent of the browser from which the Mandate was accepted by the customer. + """ + + +class PaymentIntentCreateParamsPaymentDetails(TypedDict): + car_rental: NotRequired["PaymentIntentCreateParamsPaymentDetailsCarRental"] + """ + Car rental details for this PaymentIntent. + """ + customer_reference: NotRequired["Literal['']|str"] + """ + Some customers might be required by their company or organization to provide this information. If so, provide this value. Otherwise you can ignore this field. + """ + event_details: NotRequired[ + "PaymentIntentCreateParamsPaymentDetailsEventDetails" + ] + """ + Event details for this PaymentIntent + """ + flight: NotRequired["PaymentIntentCreateParamsPaymentDetailsFlight"] + """ + Flight reservation details for this PaymentIntent + """ + lodging: NotRequired["PaymentIntentCreateParamsPaymentDetailsLodging"] + """ + Lodging reservation details for this PaymentIntent + """ + order_reference: NotRequired["Literal['']|str"] + """ + A unique value assigned by the business to identify the transaction. + """ + subscription: NotRequired[ + "PaymentIntentCreateParamsPaymentDetailsSubscription" + ] + """ + Subscription details for this PaymentIntent + """ + + +class PaymentIntentCreateParamsPaymentDetailsCarRental(TypedDict): + affiliate: NotRequired[ + "PaymentIntentCreateParamsPaymentDetailsCarRentalAffiliate" + ] + """ + Affiliate details for this purchase. + """ + booking_number: str + """ + The booking number associated with the car rental. + """ + car_class_code: NotRequired[str] + """ + Class code of the car. + """ + car_make: NotRequired[str] + """ + Make of the car. + """ + car_model: NotRequired[str] + """ + Model of the car. + """ + company: NotRequired[str] + """ + The name of the rental car company. + """ + customer_service_phone_number: NotRequired[str] + """ + The customer service phone number of the car rental company. + """ + days_rented: int + """ + Number of days the car is being rented. + """ + delivery: NotRequired[ + "PaymentIntentCreateParamsPaymentDetailsCarRentalDelivery" + ] + """ + Delivery details for this purchase. + """ + distance: NotRequired[ + "PaymentIntentCreateParamsPaymentDetailsCarRentalDistance" + ] + """ + The details of the distance traveled during the rental period. + """ + drivers: NotRequired[ + List["PaymentIntentCreateParamsPaymentDetailsCarRentalDriver"] + ] + """ + The details of the passengers in the travel reservation + """ + extra_charges: NotRequired[ + List[ + Literal[ + "extra_mileage", + "gas", + "late_return", + "one_way_service", + "parking_violation", + ] + ] + ] + """ + List of additional charges being billed. + """ + no_show: NotRequired[bool] + """ + Indicates if the customer did not keep nor cancel their booking. + """ + pickup_address: NotRequired[ + "PaymentIntentCreateParamsPaymentDetailsCarRentalPickupAddress" + ] + """ + Car pick-up address. + """ + pickup_at: int + """ + Car pick-up time. Measured in seconds since the Unix epoch. + """ + pickup_location_name: NotRequired[str] + """ + Name of the pickup location. + """ + rate_amount: NotRequired[int] + """ + Rental rate. + """ + rate_interval: NotRequired[Literal["day", "month", "week"]] + """ + The frequency at which the rate amount is applied. One of `day`, `week` or `month` + """ + renter_name: NotRequired[str] + """ + The name of the person or entity renting the car. + """ + return_address: NotRequired[ + "PaymentIntentCreateParamsPaymentDetailsCarRentalReturnAddress" + ] + """ + Car return address. + """ + return_at: int + """ + Car return time. Measured in seconds since the Unix epoch. + """ + return_location_name: NotRequired[str] + """ + Name of the return location. + """ + tax_exempt: NotRequired[bool] + """ + Indicates whether the goods or services are tax-exempt or tax is not collected. + """ + vehicle_identification_number: NotRequired[str] + """ + The vehicle identification number. + """ + + +class PaymentIntentCreateParamsPaymentDetailsCarRentalAffiliate(TypedDict): + name: str + """ + The name of the affiliate that originated the purchase. + """ + + +class PaymentIntentCreateParamsPaymentDetailsCarRentalDelivery(TypedDict): + mode: NotRequired[Literal["email", "phone", "pickup", "post"]] + """ + The delivery method for the payment + """ + recipient: NotRequired[ + "PaymentIntentCreateParamsPaymentDetailsCarRentalDeliveryRecipient" + ] + """ + Details of the recipient. + """ + + +class PaymentIntentCreateParamsPaymentDetailsCarRentalDeliveryRecipient( + TypedDict, +): + email: NotRequired[str] + """ + The email of the recipient the ticket is delivered to. + """ + name: NotRequired[str] + """ + The name of the recipient the ticket is delivered to. + """ + phone: NotRequired[str] + """ + The phone number of the recipient the ticket is delivered to. + """ + + +class PaymentIntentCreateParamsPaymentDetailsCarRentalDistance(TypedDict): + amount: NotRequired[int] + """ + Distance traveled. + """ + unit: NotRequired[Literal["kilometers", "miles"]] + """ + Unit of measurement for the distance traveled. One of `miles` or `kilometers`. + """ + + +class PaymentIntentCreateParamsPaymentDetailsCarRentalDriver(TypedDict): + driver_identification_number: NotRequired[str] + """ + Driver's identification number. + """ + driver_tax_number: NotRequired[str] + """ + Driver's tax number. + """ + name: str + """ + Full name of the person or entity on the car reservation. + """ + + +class PaymentIntentCreateParamsPaymentDetailsCarRentalPickupAddress(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. + """ + + +class PaymentIntentCreateParamsPaymentDetailsCarRentalReturnAddress(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. + """ + + +class PaymentIntentCreateParamsPaymentDetailsEventDetails(TypedDict): + access_controlled_venue: NotRequired[bool] + """ + Indicates if the tickets are digitally checked when entering the venue. + """ + address: NotRequired[ + "PaymentIntentCreateParamsPaymentDetailsEventDetailsAddress" + ] + """ + The event location's address. + """ + affiliate: NotRequired[ + "PaymentIntentCreateParamsPaymentDetailsEventDetailsAffiliate" + ] + """ + Affiliate details for this purchase. + """ + company: NotRequired[str] + """ + The name of the company + """ + delivery: NotRequired[ + "PaymentIntentCreateParamsPaymentDetailsEventDetailsDelivery" + ] + """ + Delivery details for this purchase. + """ + ends_at: NotRequired[int] + """ + Event end time. Measured in seconds since the Unix epoch. + """ + genre: NotRequired[str] + """ + Type of the event entertainment (concert, sports event etc) + """ + name: str + """ + The name of the event. + """ + starts_at: NotRequired[int] + """ + Event start time. Measured in seconds since the Unix epoch. + """ + + +class PaymentIntentCreateParamsPaymentDetailsEventDetailsAddress(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. + """ + + +class PaymentIntentCreateParamsPaymentDetailsEventDetailsAffiliate(TypedDict): + name: str + """ + The name of the affiliate that originated the purchase. + """ + + +class PaymentIntentCreateParamsPaymentDetailsEventDetailsDelivery(TypedDict): + mode: NotRequired[Literal["email", "phone", "pickup", "post"]] + """ + The delivery method for the payment + """ + recipient: NotRequired[ + "PaymentIntentCreateParamsPaymentDetailsEventDetailsDeliveryRecipient" + ] + """ + Details of the recipient. + """ + + +class PaymentIntentCreateParamsPaymentDetailsEventDetailsDeliveryRecipient( + TypedDict, +): + email: NotRequired[str] + """ + The email of the recipient the ticket is delivered to. + """ + name: NotRequired[str] + """ + The name of the recipient the ticket is delivered to. + """ + phone: NotRequired[str] + """ + The phone number of the recipient the ticket is delivered to. + """ + + +class PaymentIntentCreateParamsPaymentDetailsFlight(TypedDict): + affiliate: NotRequired[ + "PaymentIntentCreateParamsPaymentDetailsFlightAffiliate" + ] + """ + Affiliate details for this purchase. + """ + agency_number: NotRequired[str] + """ + The agency number (i.e. International Air Transport Association (IATA) agency number) of the travel agency that made the booking. + """ + carrier: NotRequired[str] + """ + The International Air Transport Association (IATA) carrier code of the carrier that issued the ticket. + """ + delivery: NotRequired[ + "PaymentIntentCreateParamsPaymentDetailsFlightDelivery" + ] + """ + Delivery details for this purchase. + """ + passenger_name: NotRequired[str] + """ + The name of the person or entity on the reservation. + """ + passengers: NotRequired[ + List["PaymentIntentCreateParamsPaymentDetailsFlightPassenger"] + ] + """ + The details of the passengers in the travel reservation. + """ + segments: List["PaymentIntentCreateParamsPaymentDetailsFlightSegment"] + """ + The individual flight segments associated with the trip. + """ + ticket_number: NotRequired[str] + """ + The ticket number associated with the travel reservation. + """ + + +class PaymentIntentCreateParamsPaymentDetailsFlightAffiliate(TypedDict): + name: str + """ + The name of the affiliate that originated the purchase. + """ + + +class PaymentIntentCreateParamsPaymentDetailsFlightDelivery(TypedDict): + mode: NotRequired[Literal["email", "phone", "pickup", "post"]] + """ + The delivery method for the payment + """ + recipient: NotRequired[ + "PaymentIntentCreateParamsPaymentDetailsFlightDeliveryRecipient" + ] + """ + Details of the recipient. + """ + + +class PaymentIntentCreateParamsPaymentDetailsFlightDeliveryRecipient( + TypedDict +): + email: NotRequired[str] + """ + The email of the recipient the ticket is delivered to. + """ + name: NotRequired[str] + """ + The name of the recipient the ticket is delivered to. + """ + phone: NotRequired[str] + """ + The phone number of the recipient the ticket is delivered to. + """ + + +class PaymentIntentCreateParamsPaymentDetailsFlightPassenger(TypedDict): + name: str + """ + Full name of the person or entity on the flight reservation. + """ + + +class PaymentIntentCreateParamsPaymentDetailsFlightSegment(TypedDict): + amount: NotRequired[int] + """ + The flight segment amount. + """ + arrival_airport: NotRequired[str] + """ + The International Air Transport Association (IATA) airport code for the arrival airport. + """ + arrives_at: NotRequired[int] + """ + The arrival time for the flight segment. Measured in seconds since the Unix epoch. + """ + carrier: NotRequired[str] + """ + The International Air Transport Association (IATA) carrier code of the carrier operating the flight segment. + """ + departs_at: int + """ + The departure time for the flight segment. Measured in seconds since the Unix epoch. + """ + departure_airport: NotRequired[str] + """ + The International Air Transport Association (IATA) airport code for the departure airport. + """ + flight_number: NotRequired[str] + """ + The flight number associated with the segment + """ + service_class: NotRequired[ + Literal["business", "economy", "first", "premium_economy"] + ] + """ + The fare class for the segment. + """ + + +class PaymentIntentCreateParamsPaymentDetailsLodging(TypedDict): + address: NotRequired[ + "PaymentIntentCreateParamsPaymentDetailsLodgingAddress" + ] + """ + The lodging location's address. + """ + adults: NotRequired[int] + """ + The number of adults on the booking + """ + affiliate: NotRequired[ + "PaymentIntentCreateParamsPaymentDetailsLodgingAffiliate" + ] + """ + Affiliate details for this purchase. + """ + booking_number: NotRequired[str] + """ + The booking number associated with the lodging reservation. + """ + category: NotRequired[Literal["hotel", "vacation_rental"]] + """ + The lodging category + """ + checkin_at: int + """ + Lodging check-in time. Measured in seconds since the Unix epoch. + """ + checkout_at: int + """ + Lodging check-out time. Measured in seconds since the Unix epoch. + """ + customer_service_phone_number: NotRequired[str] + """ + The customer service phone number of the lodging company. + """ + daily_room_rate_amount: NotRequired[int] + """ + The daily lodging room rate. + """ + delivery: NotRequired[ + "PaymentIntentCreateParamsPaymentDetailsLodgingDelivery" + ] + """ + Delivery details for this purchase. + """ + extra_charges: NotRequired[ + List[ + Literal[ + "gift_shop", + "laundry", + "mini_bar", + "other", + "restaurant", + "telephone", + ] + ] + ] + """ + List of additional charges being billed. + """ + fire_safety_act_compliance: NotRequired[bool] + """ + Indicates whether the lodging location is compliant with the Fire Safety Act. + """ + name: NotRequired[str] + """ + The name of the lodging location. + """ + no_show: NotRequired[bool] + """ + Indicates if the customer did not keep their booking while failing to cancel the reservation. + """ + number_of_rooms: NotRequired[int] + """ + The number of rooms on the booking + """ + passengers: NotRequired[ + List["PaymentIntentCreateParamsPaymentDetailsLodgingPassenger"] + ] + """ + The details of the passengers in the travel reservation + """ + property_phone_number: NotRequired[str] + """ + The phone number of the lodging location. + """ + room_class: NotRequired[str] + """ + The room class for this purchase. + """ + room_nights: NotRequired[int] + """ + The number of room nights + """ + total_room_tax_amount: NotRequired[int] + """ + The total tax amount associating with the room reservation. + """ + total_tax_amount: NotRequired[int] + """ + The total tax amount + """ + + +class PaymentIntentCreateParamsPaymentDetailsLodgingAddress(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. + """ + + +class PaymentIntentCreateParamsPaymentDetailsLodgingAffiliate(TypedDict): + name: str + """ + The name of the affiliate that originated the purchase. + """ + + +class PaymentIntentCreateParamsPaymentDetailsLodgingDelivery(TypedDict): + mode: NotRequired[Literal["email", "phone", "pickup", "post"]] + """ + The delivery method for the payment + """ + recipient: NotRequired[ + "PaymentIntentCreateParamsPaymentDetailsLodgingDeliveryRecipient" + ] + """ + Details of the recipient. + """ + + +class PaymentIntentCreateParamsPaymentDetailsLodgingDeliveryRecipient( + TypedDict, +): + email: NotRequired[str] + """ + The email of the recipient the ticket is delivered to. + """ + name: NotRequired[str] + """ + The name of the recipient the ticket is delivered to. + """ + phone: NotRequired[str] + """ + The phone number of the recipient the ticket is delivered to. + """ + + +class PaymentIntentCreateParamsPaymentDetailsLodgingPassenger(TypedDict): + name: str + """ + Full name of the person or entity on the lodging reservation. + """ + + +class PaymentIntentCreateParamsPaymentDetailsSubscription(TypedDict): + affiliate: NotRequired[ + "PaymentIntentCreateParamsPaymentDetailsSubscriptionAffiliate" + ] + """ + Affiliate details for this purchase. + """ + auto_renewal: NotRequired[bool] + """ + Info whether the subscription will be auto renewed upon expiry. + """ + billing_interval: NotRequired[ + "PaymentIntentCreateParamsPaymentDetailsSubscriptionBillingInterval" + ] + """ + Subscription billing details for this purchase. + """ + ends_at: NotRequired[int] + """ + Subscription end time. Measured in seconds since the Unix epoch. + """ + name: str + """ + Name of the product on subscription. e.g. Apple Music Subscription + """ + starts_at: NotRequired[int] + """ + Subscription start time. Measured in seconds since the Unix epoch. + """ + + +class PaymentIntentCreateParamsPaymentDetailsSubscriptionAffiliate(TypedDict): + name: str + """ + The name of the affiliate that originated the purchase. + """ + + +class PaymentIntentCreateParamsPaymentDetailsSubscriptionBillingInterval( + TypedDict, +): + count: int + """ + The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + """ + interval: Literal["day", "month", "week", "year"] + """ + Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + """ + + +class PaymentIntentCreateParamsPaymentMethodData(TypedDict): + acss_debit: NotRequired[ + "PaymentIntentCreateParamsPaymentMethodDataAcssDebit" + ] + """ + If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method. + """ + affirm: NotRequired["PaymentIntentCreateParamsPaymentMethodDataAffirm"] + """ + If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method. + """ + afterpay_clearpay: NotRequired[ + "PaymentIntentCreateParamsPaymentMethodDataAfterpayClearpay" + ] + """ + If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method. + """ + alipay: NotRequired["PaymentIntentCreateParamsPaymentMethodDataAlipay"] + """ + If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. + """ + allow_redisplay: NotRequired[Literal["always", "limited", "unspecified"]] + """ + This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`. + """ + alma: NotRequired["PaymentIntentCreateParamsPaymentMethodDataAlma"] + """ + If this is a Alma PaymentMethod, this hash contains details about the Alma payment method. + """ + amazon_pay: NotRequired[ + "PaymentIntentCreateParamsPaymentMethodDataAmazonPay" + ] + """ + If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method. + """ + au_becs_debit: NotRequired[ + "PaymentIntentCreateParamsPaymentMethodDataAuBecsDebit" + ] + """ + If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. + """ + bacs_debit: NotRequired[ + "PaymentIntentCreateParamsPaymentMethodDataBacsDebit" + ] + """ + If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account. + """ + bancontact: NotRequired[ + "PaymentIntentCreateParamsPaymentMethodDataBancontact" + ] + """ + If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method. + """ + billie: NotRequired["PaymentIntentCreateParamsPaymentMethodDataBillie"] + """ + If this is a `billie` PaymentMethod, this hash contains details about the Billie payment method. + """ + billing_details: NotRequired[ + "PaymentIntentCreateParamsPaymentMethodDataBillingDetails" + ] + """ + Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. + """ + blik: NotRequired["PaymentIntentCreateParamsPaymentMethodDataBlik"] + """ + If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method. + """ + boleto: NotRequired["PaymentIntentCreateParamsPaymentMethodDataBoleto"] + """ + If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method. + """ + cashapp: NotRequired["PaymentIntentCreateParamsPaymentMethodDataCashapp"] + """ + If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. + """ + crypto: NotRequired["PaymentIntentCreateParamsPaymentMethodDataCrypto"] + """ + If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment method. + """ + customer_balance: NotRequired[ + "PaymentIntentCreateParamsPaymentMethodDataCustomerBalance" + ] + """ + If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. + """ + eps: NotRequired["PaymentIntentCreateParamsPaymentMethodDataEps"] + """ + If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. + """ + fpx: NotRequired["PaymentIntentCreateParamsPaymentMethodDataFpx"] + """ + If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method. + """ + giropay: NotRequired["PaymentIntentCreateParamsPaymentMethodDataGiropay"] + """ + If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method. + """ + gopay: NotRequired["PaymentIntentCreateParamsPaymentMethodDataGopay"] + """ + If this is a Gopay PaymentMethod, this hash contains details about the Gopay payment method. + """ + grabpay: NotRequired["PaymentIntentCreateParamsPaymentMethodDataGrabpay"] + """ + If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method. + """ + id_bank_transfer: NotRequired[ + "PaymentIntentCreateParamsPaymentMethodDataIdBankTransfer" + ] + """ + If this is an `IdBankTransfer` PaymentMethod, this hash contains details about the IdBankTransfer payment method. + """ + ideal: NotRequired["PaymentIntentCreateParamsPaymentMethodDataIdeal"] + """ + If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. + """ + interac_present: NotRequired[ + "PaymentIntentCreateParamsPaymentMethodDataInteracPresent" + ] + """ + If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. + """ + kakao_pay: NotRequired[ + "PaymentIntentCreateParamsPaymentMethodDataKakaoPay" + ] + """ + If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method. + """ + klarna: NotRequired["PaymentIntentCreateParamsPaymentMethodDataKlarna"] + """ + If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method. + """ + konbini: NotRequired["PaymentIntentCreateParamsPaymentMethodDataKonbini"] + """ + If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. + """ + kr_card: NotRequired["PaymentIntentCreateParamsPaymentMethodDataKrCard"] + """ + If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method. + """ + link: NotRequired["PaymentIntentCreateParamsPaymentMethodDataLink"] + """ + If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. + """ + mb_way: NotRequired["PaymentIntentCreateParamsPaymentMethodDataMbWay"] + """ + If this is a MB WAY PaymentMethod, this hash contains details about the MB WAY payment method. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + mobilepay: NotRequired[ + "PaymentIntentCreateParamsPaymentMethodDataMobilepay" + ] + """ + If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method. + """ + multibanco: NotRequired[ + "PaymentIntentCreateParamsPaymentMethodDataMultibanco" + ] + """ + If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method. + """ + naver_pay: NotRequired[ + "PaymentIntentCreateParamsPaymentMethodDataNaverPay" + ] + """ + If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method. + """ + nz_bank_account: NotRequired[ + "PaymentIntentCreateParamsPaymentMethodDataNzBankAccount" + ] + """ + If this is an nz_bank_account PaymentMethod, this hash contains details about the nz_bank_account payment method. + """ + oxxo: NotRequired["PaymentIntentCreateParamsPaymentMethodDataOxxo"] + """ + If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. + """ + p24: NotRequired["PaymentIntentCreateParamsPaymentMethodDataP24"] + """ + If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. + """ + pay_by_bank: NotRequired[ + "PaymentIntentCreateParamsPaymentMethodDataPayByBank" + ] + """ + If this is a `pay_by_bank` PaymentMethod, this hash contains details about the PayByBank payment method. + """ + payco: NotRequired["PaymentIntentCreateParamsPaymentMethodDataPayco"] + """ + If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method. + """ + paynow: NotRequired["PaymentIntentCreateParamsPaymentMethodDataPaynow"] + """ + If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method. + """ + paypal: NotRequired["PaymentIntentCreateParamsPaymentMethodDataPaypal"] + """ + If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method. + """ + paypay: NotRequired["PaymentIntentCreateParamsPaymentMethodDataPaypay"] + """ + If this is a `paypay` PaymentMethod, this hash contains details about the PayPay payment method. + """ + payto: NotRequired["PaymentIntentCreateParamsPaymentMethodDataPayto"] + """ + If this is a `payto` PaymentMethod, this hash contains details about the PayTo payment method. + """ + pix: NotRequired["PaymentIntentCreateParamsPaymentMethodDataPix"] + """ + If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method. + """ + promptpay: NotRequired[ + "PaymentIntentCreateParamsPaymentMethodDataPromptpay" + ] + """ + If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method. + """ + qris: NotRequired["PaymentIntentCreateParamsPaymentMethodDataQris"] + """ + If this is a `qris` PaymentMethod, this hash contains details about the QRIS payment method. + """ + radar_options: NotRequired[ + "PaymentIntentCreateParamsPaymentMethodDataRadarOptions" + ] + """ + Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. + """ + rechnung: NotRequired["PaymentIntentCreateParamsPaymentMethodDataRechnung"] + """ + If this is a `rechnung` PaymentMethod, this hash contains details about the Rechnung payment method. + """ + revolut_pay: NotRequired[ + "PaymentIntentCreateParamsPaymentMethodDataRevolutPay" + ] + """ + If this is a `revolut_pay` PaymentMethod, this hash contains details about the Revolut Pay payment method. + """ + samsung_pay: NotRequired[ + "PaymentIntentCreateParamsPaymentMethodDataSamsungPay" + ] + """ + If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method. + """ + satispay: NotRequired["PaymentIntentCreateParamsPaymentMethodDataSatispay"] + """ + If this is a `satispay` PaymentMethod, this hash contains details about the Satispay payment method. + """ + sepa_debit: NotRequired[ + "PaymentIntentCreateParamsPaymentMethodDataSepaDebit" + ] + """ + If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. + """ + shopeepay: NotRequired[ + "PaymentIntentCreateParamsPaymentMethodDataShopeepay" + ] + """ + If this is a Shopeepay PaymentMethod, this hash contains details about the Shopeepay payment method. + """ + sofort: NotRequired["PaymentIntentCreateParamsPaymentMethodDataSofort"] + """ + If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. + """ + stripe_balance: NotRequired[ + "PaymentIntentCreateParamsPaymentMethodDataStripeBalance" + ] + """ + This hash contains details about the Stripe balance payment method. + """ + swish: NotRequired["PaymentIntentCreateParamsPaymentMethodDataSwish"] + """ + If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method. + """ + twint: NotRequired["PaymentIntentCreateParamsPaymentMethodDataTwint"] + """ + If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method. + """ + type: Literal[ + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "alma", + "amazon_pay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "billie", + "blik", + "boleto", + "cashapp", + "crypto", + "customer_balance", + "eps", + "fpx", + "giropay", + "gopay", + "grabpay", + "id_bank_transfer", + "ideal", + "kakao_pay", + "klarna", + "konbini", + "kr_card", + "link", + "mb_way", + "mobilepay", + "multibanco", + "naver_pay", + "nz_bank_account", + "oxxo", + "p24", + "pay_by_bank", + "payco", + "paynow", + "paypal", + "paypay", + "payto", + "pix", + "promptpay", + "qris", + "rechnung", + "revolut_pay", + "samsung_pay", + "satispay", + "sepa_debit", + "shopeepay", + "sofort", + "stripe_balance", + "swish", + "twint", + "us_bank_account", + "wechat_pay", + "zip", + ] + """ + The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. + """ + us_bank_account: NotRequired[ + "PaymentIntentCreateParamsPaymentMethodDataUsBankAccount" + ] + """ + If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. + """ + wechat_pay: NotRequired[ + "PaymentIntentCreateParamsPaymentMethodDataWechatPay" + ] + """ + If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method. + """ + zip: NotRequired["PaymentIntentCreateParamsPaymentMethodDataZip"] + """ + If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method. + """ + + +class PaymentIntentCreateParamsPaymentMethodDataAcssDebit(TypedDict): + account_number: str + """ + Customer's bank account number. + """ + institution_number: str + """ + Institution number of the customer's bank. + """ + transit_number: str + """ + Transit number of the customer's bank. + """ + + +class PaymentIntentCreateParamsPaymentMethodDataAffirm(TypedDict): + pass + + +class PaymentIntentCreateParamsPaymentMethodDataAfterpayClearpay(TypedDict): + pass + + +class PaymentIntentCreateParamsPaymentMethodDataAlipay(TypedDict): + pass + + +class PaymentIntentCreateParamsPaymentMethodDataAlma(TypedDict): + pass + + +class PaymentIntentCreateParamsPaymentMethodDataAmazonPay(TypedDict): + pass + + +class PaymentIntentCreateParamsPaymentMethodDataAuBecsDebit(TypedDict): + account_number: str + """ + The account number for the bank account. + """ + bsb_number: str + """ + Bank-State-Branch number of the bank account. + """ + + +class PaymentIntentCreateParamsPaymentMethodDataBacsDebit(TypedDict): + account_number: NotRequired[str] + """ + Account number of the bank account that the funds will be debited from. + """ + sort_code: NotRequired[str] + """ + Sort code of the bank account. (e.g., `10-20-30`) + """ + + +class PaymentIntentCreateParamsPaymentMethodDataBancontact(TypedDict): + pass + + +class PaymentIntentCreateParamsPaymentMethodDataBillie(TypedDict): + pass + + +class PaymentIntentCreateParamsPaymentMethodDataBillingDetails(TypedDict): + address: NotRequired[ + "Literal['']|PaymentIntentCreateParamsPaymentMethodDataBillingDetailsAddress" + ] + """ + Billing address. + """ + email: NotRequired["Literal['']|str"] + """ + Email address. + """ + name: NotRequired["Literal['']|str"] + """ + Full name. + """ + phone: NotRequired["Literal['']|str"] + """ + Billing phone number (including extension). + """ + tax_id: NotRequired[str] + """ + Taxpayer identification number. Used only for transactions between LATAM buyers and non-LATAM sellers. + """ + + +class PaymentIntentCreateParamsPaymentMethodDataBillingDetailsAddress( + 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. + """ + + +class PaymentIntentCreateParamsPaymentMethodDataBlik(TypedDict): + pass + + +class PaymentIntentCreateParamsPaymentMethodDataBoleto(TypedDict): + tax_id: str + """ + The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers) + """ + + +class PaymentIntentCreateParamsPaymentMethodDataCashapp(TypedDict): + pass + + +class PaymentIntentCreateParamsPaymentMethodDataCrypto(TypedDict): + pass + + +class PaymentIntentCreateParamsPaymentMethodDataCustomerBalance(TypedDict): + pass + + +class PaymentIntentCreateParamsPaymentMethodDataEps(TypedDict): + bank: NotRequired[ + Literal[ + "arzte_und_apotheker_bank", + "austrian_anadi_bank_ag", + "bank_austria", + "bankhaus_carl_spangler", + "bankhaus_schelhammer_und_schattera_ag", + "bawag_psk_ag", + "bks_bank_ag", + "brull_kallmus_bank_ag", + "btv_vier_lander_bank", + "capital_bank_grawe_gruppe_ag", + "deutsche_bank_ag", + "dolomitenbank", + "easybank_ag", + "erste_bank_und_sparkassen", + "hypo_alpeadriabank_international_ag", + "hypo_bank_burgenland_aktiengesellschaft", + "hypo_noe_lb_fur_niederosterreich_u_wien", + "hypo_oberosterreich_salzburg_steiermark", + "hypo_tirol_bank_ag", + "hypo_vorarlberg_bank_ag", + "marchfelder_bank", + "oberbank_ag", + "raiffeisen_bankengruppe_osterreich", + "schoellerbank_ag", + "sparda_bank_wien", + "volksbank_gruppe", + "volkskreditbank_ag", + "vr_bank_braunau", + ] + ] + """ + The customer's bank. + """ + + +class PaymentIntentCreateParamsPaymentMethodDataFpx(TypedDict): + account_holder_type: NotRequired[Literal["company", "individual"]] + """ + Account holder type for FPX transaction + """ + bank: Literal[ + "affin_bank", + "agrobank", + "alliance_bank", + "ambank", + "bank_islam", + "bank_muamalat", + "bank_of_china", + "bank_rakyat", + "bsn", + "cimb", + "deutsche_bank", + "hong_leong_bank", + "hsbc", + "kfh", + "maybank2e", + "maybank2u", + "ocbc", + "pb_enterprise", + "public_bank", + "rhb", + "standard_chartered", + "uob", + ] + """ + The customer's bank. + """ + + +class PaymentIntentCreateParamsPaymentMethodDataGiropay(TypedDict): + pass + + +class PaymentIntentCreateParamsPaymentMethodDataGopay(TypedDict): + pass + + +class PaymentIntentCreateParamsPaymentMethodDataGrabpay(TypedDict): + pass + + +class PaymentIntentCreateParamsPaymentMethodDataIdBankTransfer(TypedDict): + bank: NotRequired[Literal["bca", "bni", "bri", "cimb", "permata"]] + """ + Bank where the account is held. + """ + + +class PaymentIntentCreateParamsPaymentMethodDataIdeal(TypedDict): + bank: NotRequired[ + Literal[ + "abn_amro", + "asn_bank", + "bunq", + "buut", + "handelsbanken", + "ing", + "knab", + "moneyou", + "n26", + "nn", + "rabobank", + "regiobank", + "revolut", + "sns_bank", + "triodos_bank", + "van_lanschot", + "yoursafe", + ] + ] + """ + The customer's bank. Only use this parameter for existing customers. Don't use it for new customers. + """ + + +class PaymentIntentCreateParamsPaymentMethodDataInteracPresent(TypedDict): + pass + + +class PaymentIntentCreateParamsPaymentMethodDataKakaoPay(TypedDict): + pass + + +class PaymentIntentCreateParamsPaymentMethodDataKlarna(TypedDict): + dob: NotRequired["PaymentIntentCreateParamsPaymentMethodDataKlarnaDob"] + """ + Customer's date of birth + """ + + +class PaymentIntentCreateParamsPaymentMethodDataKlarnaDob(TypedDict): + day: int + """ + The day of birth, between 1 and 31. + """ + month: int + """ + The month of birth, between 1 and 12. + """ + year: int + """ + The four-digit year of birth. + """ + + +class PaymentIntentCreateParamsPaymentMethodDataKonbini(TypedDict): + pass + + +class PaymentIntentCreateParamsPaymentMethodDataKrCard(TypedDict): + pass + + +class PaymentIntentCreateParamsPaymentMethodDataLink(TypedDict): + pass + + +class PaymentIntentCreateParamsPaymentMethodDataMbWay(TypedDict): + pass + + +class PaymentIntentCreateParamsPaymentMethodDataMobilepay(TypedDict): + pass + + +class PaymentIntentCreateParamsPaymentMethodDataMultibanco(TypedDict): + pass + + +class PaymentIntentCreateParamsPaymentMethodDataNaverPay(TypedDict): + funding: NotRequired[Literal["card", "points"]] + """ + Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`. + """ + + +class PaymentIntentCreateParamsPaymentMethodDataNzBankAccount(TypedDict): + account_holder_name: NotRequired[str] + """ + The name on the bank account. Only required if the account holder name is different from the name of the authorized signatory collected in the PaymentMethod's billing details. + """ + account_number: str + """ + The account number for the bank account. + """ + bank_code: str + """ + The numeric code for the bank account's bank. + """ + branch_code: str + """ + The numeric code for the bank account's bank branch. + """ + reference: NotRequired[str] + suffix: str + """ + The suffix of the bank account number. + """ + + +class PaymentIntentCreateParamsPaymentMethodDataOxxo(TypedDict): + pass + + +class PaymentIntentCreateParamsPaymentMethodDataP24(TypedDict): + bank: NotRequired[ + Literal[ + "alior_bank", + "bank_millennium", + "bank_nowy_bfg_sa", + "bank_pekao_sa", + "banki_spbdzielcze", + "blik", + "bnp_paribas", + "boz", + "citi_handlowy", + "credit_agricole", + "envelobank", + "etransfer_pocztowy24", + "getin_bank", + "ideabank", + "ing", + "inteligo", + "mbank_mtransfer", + "nest_przelew", + "noble_pay", + "pbac_z_ipko", + "plus_bank", + "santander_przelew24", + "tmobile_usbugi_bankowe", + "toyota_bank", + "velobank", + "volkswagen_bank", + ] + ] + """ + The customer's bank. + """ + + +class PaymentIntentCreateParamsPaymentMethodDataPayByBank(TypedDict): + pass + + +class PaymentIntentCreateParamsPaymentMethodDataPayco(TypedDict): + pass + + +class PaymentIntentCreateParamsPaymentMethodDataPaynow(TypedDict): + pass + + +class PaymentIntentCreateParamsPaymentMethodDataPaypal(TypedDict): + pass + + +class PaymentIntentCreateParamsPaymentMethodDataPaypay(TypedDict): + pass + + +class PaymentIntentCreateParamsPaymentMethodDataPayto(TypedDict): + account_number: NotRequired[str] + """ + The account number for the bank account. + """ + bsb_number: NotRequired[str] + """ + Bank-State-Branch number of the bank account. + """ + pay_id: NotRequired[str] + """ + The PayID alias for the bank account. + """ + + +class PaymentIntentCreateParamsPaymentMethodDataPix(TypedDict): + pass + + +class PaymentIntentCreateParamsPaymentMethodDataPromptpay(TypedDict): + pass + + +class PaymentIntentCreateParamsPaymentMethodDataQris(TypedDict): + pass + + +class PaymentIntentCreateParamsPaymentMethodDataRadarOptions(TypedDict): + session: NotRequired[str] + """ + A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. + """ + + +class PaymentIntentCreateParamsPaymentMethodDataRechnung(TypedDict): + dob: "PaymentIntentCreateParamsPaymentMethodDataRechnungDob" + """ + Customer's date of birth + """ + + +class PaymentIntentCreateParamsPaymentMethodDataRechnungDob(TypedDict): + day: int + """ + The day of birth, between 1 and 31. + """ + month: int + """ + The month of birth, between 1 and 12. + """ + year: int + """ + The four-digit year of birth. + """ + + +class PaymentIntentCreateParamsPaymentMethodDataRevolutPay(TypedDict): + pass + + +class PaymentIntentCreateParamsPaymentMethodDataSamsungPay(TypedDict): + pass + + +class PaymentIntentCreateParamsPaymentMethodDataSatispay(TypedDict): + pass + + +class PaymentIntentCreateParamsPaymentMethodDataSepaDebit(TypedDict): + iban: str + """ + IBAN of the bank account. + """ + + +class PaymentIntentCreateParamsPaymentMethodDataShopeepay(TypedDict): + pass + + +class PaymentIntentCreateParamsPaymentMethodDataSofort(TypedDict): + country: Literal["AT", "BE", "DE", "ES", "IT", "NL"] + """ + Two-letter ISO code representing the country the bank account is located in. + """ + + +class PaymentIntentCreateParamsPaymentMethodDataStripeBalance(TypedDict): + account: NotRequired[str] + """ + The connected account ID whose Stripe balance to use as the source of payment + """ + source_type: NotRequired[Literal["bank_account", "card", "fpx"]] + """ + The [source_type](https://docs.stripe.com/api/balance/balance_object#balance_object-available-source_types) of the balance + """ + + +class PaymentIntentCreateParamsPaymentMethodDataSwish(TypedDict): + pass + + +class PaymentIntentCreateParamsPaymentMethodDataTwint(TypedDict): + pass + + +class PaymentIntentCreateParamsPaymentMethodDataUsBankAccount(TypedDict): + account_holder_type: NotRequired[Literal["company", "individual"]] + """ + Account holder type: individual or company. + """ + account_number: NotRequired[str] + """ + Account number of the bank account. + """ + account_type: NotRequired[Literal["checking", "savings"]] + """ + Account type: checkings or savings. Defaults to checking if omitted. + """ + financial_connections_account: NotRequired[str] + """ + The ID of a Financial Connections Account to use as a payment method. + """ + routing_number: NotRequired[str] + """ + Routing number of the bank account. + """ + + +class PaymentIntentCreateParamsPaymentMethodDataWechatPay(TypedDict): + pass + + +class PaymentIntentCreateParamsPaymentMethodDataZip(TypedDict): + pass + + +class PaymentIntentCreateParamsPaymentMethodOptions(TypedDict): + acss_debit: NotRequired[ + "Literal['']|PaymentIntentCreateParamsPaymentMethodOptionsAcssDebit" + ] + """ + If this is a `acss_debit` PaymentMethod, this sub-hash contains details about the ACSS Debit payment method options. + """ + affirm: NotRequired[ + "Literal['']|PaymentIntentCreateParamsPaymentMethodOptionsAffirm" + ] + """ + If this is an `affirm` PaymentMethod, this sub-hash contains details about the Affirm payment method options. + """ + afterpay_clearpay: NotRequired[ + "Literal['']|PaymentIntentCreateParamsPaymentMethodOptionsAfterpayClearpay" + ] + """ + If this is a `afterpay_clearpay` PaymentMethod, this sub-hash contains details about the Afterpay Clearpay payment method options. + """ + alipay: NotRequired[ + "Literal['']|PaymentIntentCreateParamsPaymentMethodOptionsAlipay" + ] + """ + If this is a `alipay` PaymentMethod, this sub-hash contains details about the Alipay payment method options. + """ + alma: NotRequired[ + "Literal['']|PaymentIntentCreateParamsPaymentMethodOptionsAlma" + ] + """ + If this is a `alma` PaymentMethod, this sub-hash contains details about the Alma payment method options. + """ + amazon_pay: NotRequired[ + "Literal['']|PaymentIntentCreateParamsPaymentMethodOptionsAmazonPay" + ] + """ + If this is a `amazon_pay` PaymentMethod, this sub-hash contains details about the Amazon Pay payment method options. + """ + au_becs_debit: NotRequired[ + "Literal['']|PaymentIntentCreateParamsPaymentMethodOptionsAuBecsDebit" + ] + """ + If this is a `au_becs_debit` PaymentMethod, this sub-hash contains details about the AU BECS Direct Debit payment method options. + """ + bacs_debit: NotRequired[ + "Literal['']|PaymentIntentCreateParamsPaymentMethodOptionsBacsDebit" + ] + """ + If this is a `bacs_debit` PaymentMethod, this sub-hash contains details about the BACS Debit payment method options. + """ + bancontact: NotRequired[ + "Literal['']|PaymentIntentCreateParamsPaymentMethodOptionsBancontact" + ] + """ + If this is a `bancontact` PaymentMethod, this sub-hash contains details about the Bancontact payment method options. + """ + billie: NotRequired[ + "Literal['']|PaymentIntentCreateParamsPaymentMethodOptionsBillie" + ] + """ + If this is a `billie` PaymentMethod, this sub-hash contains details about the Billie payment method options. + """ + blik: NotRequired[ + "Literal['']|PaymentIntentCreateParamsPaymentMethodOptionsBlik" + ] + """ + If this is a `blik` PaymentMethod, this sub-hash contains details about the BLIK payment method options. + """ + boleto: NotRequired[ + "Literal['']|PaymentIntentCreateParamsPaymentMethodOptionsBoleto" + ] + """ + If this is a `boleto` PaymentMethod, this sub-hash contains details about the Boleto payment method options. + """ + card: NotRequired[ + "Literal['']|PaymentIntentCreateParamsPaymentMethodOptionsCard" + ] + """ + Configuration for any card payments attempted on this PaymentIntent. + """ + card_present: NotRequired[ + "Literal['']|PaymentIntentCreateParamsPaymentMethodOptionsCardPresent" + ] + """ + If this is a `card_present` PaymentMethod, this sub-hash contains details about the Card Present payment method options. + """ + cashapp: NotRequired[ + "Literal['']|PaymentIntentCreateParamsPaymentMethodOptionsCashapp" + ] + """ + If this is a `cashapp` PaymentMethod, this sub-hash contains details about the Cash App Pay payment method options. + """ + crypto: NotRequired[ + "Literal['']|PaymentIntentCreateParamsPaymentMethodOptionsCrypto" + ] + """ + If this is a `crypto` PaymentMethod, this sub-hash contains details about the Crypto payment method options. + """ + customer_balance: NotRequired[ + "Literal['']|PaymentIntentCreateParamsPaymentMethodOptionsCustomerBalance" + ] + """ + If this is a `customer balance` PaymentMethod, this sub-hash contains details about the customer balance payment method options. + """ + eps: NotRequired[ + "Literal['']|PaymentIntentCreateParamsPaymentMethodOptionsEps" + ] + """ + If this is a `eps` PaymentMethod, this sub-hash contains details about the EPS payment method options. + """ + fpx: NotRequired[ + "Literal['']|PaymentIntentCreateParamsPaymentMethodOptionsFpx" + ] + """ + If this is a `fpx` PaymentMethod, this sub-hash contains details about the FPX payment method options. + """ + giropay: NotRequired[ + "Literal['']|PaymentIntentCreateParamsPaymentMethodOptionsGiropay" + ] + """ + If this is a `giropay` PaymentMethod, this sub-hash contains details about the Giropay payment method options. + """ + gopay: NotRequired[ + "Literal['']|PaymentIntentCreateParamsPaymentMethodOptionsGopay" + ] + """ + If this is a `gopay` PaymentMethod, this sub-hash contains details about the Gopay payment method options. + """ + grabpay: NotRequired[ + "Literal['']|PaymentIntentCreateParamsPaymentMethodOptionsGrabpay" + ] + """ + If this is a `grabpay` PaymentMethod, this sub-hash contains details about the Grabpay payment method options. + """ + id_bank_transfer: NotRequired[ + "Literal['']|PaymentIntentCreateParamsPaymentMethodOptionsIdBankTransfer" + ] + """ + If this is a `id_bank_transfer` PaymentMethod, this sub-hash contains details about the Indonesia Bank Transfer payment method options. + """ + ideal: NotRequired[ + "Literal['']|PaymentIntentCreateParamsPaymentMethodOptionsIdeal" + ] + """ + If this is a `ideal` PaymentMethod, this sub-hash contains details about the Ideal payment method options. + """ + interac_present: NotRequired[ + "Literal['']|PaymentIntentCreateParamsPaymentMethodOptionsInteracPresent" + ] + """ + If this is a `interac_present` PaymentMethod, this sub-hash contains details about the Card Present payment method options. + """ + kakao_pay: NotRequired[ + "Literal['']|PaymentIntentCreateParamsPaymentMethodOptionsKakaoPay" + ] + """ + If this is a `kakao_pay` PaymentMethod, this sub-hash contains details about the Kakao Pay payment method options. + """ + klarna: NotRequired[ + "Literal['']|PaymentIntentCreateParamsPaymentMethodOptionsKlarna" + ] + """ + If this is a `klarna` PaymentMethod, this sub-hash contains details about the Klarna payment method options. + """ + konbini: NotRequired[ + "Literal['']|PaymentIntentCreateParamsPaymentMethodOptionsKonbini" + ] + """ + If this is a `konbini` PaymentMethod, this sub-hash contains details about the Konbini payment method options. + """ + kr_card: NotRequired[ + "Literal['']|PaymentIntentCreateParamsPaymentMethodOptionsKrCard" + ] + """ + If this is a `kr_card` PaymentMethod, this sub-hash contains details about the KR Card payment method options. + """ + link: NotRequired[ + "Literal['']|PaymentIntentCreateParamsPaymentMethodOptionsLink" + ] + """ + If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options. + """ + mb_way: NotRequired[ + "Literal['']|PaymentIntentCreateParamsPaymentMethodOptionsMbWay" + ] + """ + If this is a `mb_way` PaymentMethod, this sub-hash contains details about the MB WAY payment method options. + """ + mobilepay: NotRequired[ + "Literal['']|PaymentIntentCreateParamsPaymentMethodOptionsMobilepay" + ] + """ + If this is a `MobilePay` PaymentMethod, this sub-hash contains details about the MobilePay payment method options. + """ + multibanco: NotRequired[ + "Literal['']|PaymentIntentCreateParamsPaymentMethodOptionsMultibanco" + ] + """ + If this is a `multibanco` PaymentMethod, this sub-hash contains details about the Multibanco payment method options. + """ + naver_pay: NotRequired[ + "Literal['']|PaymentIntentCreateParamsPaymentMethodOptionsNaverPay" + ] + """ + If this is a `naver_pay` PaymentMethod, this sub-hash contains details about the Naver Pay payment method options. + """ + nz_bank_account: NotRequired[ + "Literal['']|PaymentIntentCreateParamsPaymentMethodOptionsNzBankAccount" + ] + """ + If this is a `nz_bank_account` PaymentMethod, this sub-hash contains details about the NZ BECS Direct Debit payment method options. + """ + oxxo: NotRequired[ + "Literal['']|PaymentIntentCreateParamsPaymentMethodOptionsOxxo" + ] + """ + If this is a `oxxo` PaymentMethod, this sub-hash contains details about the OXXO payment method options. + """ + p24: NotRequired[ + "Literal['']|PaymentIntentCreateParamsPaymentMethodOptionsP24" + ] + """ + If this is a `p24` PaymentMethod, this sub-hash contains details about the Przelewy24 payment method options. + """ + pay_by_bank: NotRequired[ + "Literal['']|PaymentIntentCreateParamsPaymentMethodOptionsPayByBank" + ] + """ + If this is a `pay_by_bank` PaymentMethod, this sub-hash contains details about the PayByBank payment method options. + """ + payco: NotRequired[ + "Literal['']|PaymentIntentCreateParamsPaymentMethodOptionsPayco" + ] + """ + If this is a `payco` PaymentMethod, this sub-hash contains details about the PAYCO payment method options. + """ + paynow: NotRequired[ + "Literal['']|PaymentIntentCreateParamsPaymentMethodOptionsPaynow" + ] + """ + If this is a `paynow` PaymentMethod, this sub-hash contains details about the PayNow payment method options. + """ + paypal: NotRequired[ + "Literal['']|PaymentIntentCreateParamsPaymentMethodOptionsPaypal" + ] + """ + If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options. + """ + paypay: NotRequired[ + "Literal['']|PaymentIntentCreateParamsPaymentMethodOptionsPaypay" + ] + """ + If this is a `paypay` PaymentMethod, this sub-hash contains details about the PayPay payment method options. + """ + payto: NotRequired[ + "Literal['']|PaymentIntentCreateParamsPaymentMethodOptionsPayto" + ] + """ + If this is a `payto` PaymentMethod, this sub-hash contains details about the PayTo payment method options. + """ + pix: NotRequired[ + "Literal['']|PaymentIntentCreateParamsPaymentMethodOptionsPix" + ] + """ + If this is a `pix` PaymentMethod, this sub-hash contains details about the Pix payment method options. + """ + promptpay: NotRequired[ + "Literal['']|PaymentIntentCreateParamsPaymentMethodOptionsPromptpay" + ] + """ + If this is a `promptpay` PaymentMethod, this sub-hash contains details about the PromptPay payment method options. + """ + qris: NotRequired[ + "Literal['']|PaymentIntentCreateParamsPaymentMethodOptionsQris" + ] + """ + If this is a `qris` PaymentMethod, this sub-hash contains details about the QRIS payment method options. + """ + rechnung: NotRequired[ + "Literal['']|PaymentIntentCreateParamsPaymentMethodOptionsRechnung" + ] + """ + If this is a `rechnung` PaymentMethod, this sub-hash contains details about the Rechnung payment method options. + """ + revolut_pay: NotRequired[ + "Literal['']|PaymentIntentCreateParamsPaymentMethodOptionsRevolutPay" + ] + """ + If this is a `revolut_pay` PaymentMethod, this sub-hash contains details about the Revolut Pay payment method options. + """ + samsung_pay: NotRequired[ + "Literal['']|PaymentIntentCreateParamsPaymentMethodOptionsSamsungPay" + ] + """ + If this is a `samsung_pay` PaymentMethod, this sub-hash contains details about the Samsung Pay payment method options. + """ + satispay: NotRequired[ + "Literal['']|PaymentIntentCreateParamsPaymentMethodOptionsSatispay" + ] + """ + If this is a `satispay` PaymentMethod, this sub-hash contains details about the Satispay payment method options. + """ + sepa_debit: NotRequired[ + "Literal['']|PaymentIntentCreateParamsPaymentMethodOptionsSepaDebit" + ] + """ + If this is a `sepa_debit` PaymentIntent, this sub-hash contains details about the SEPA Debit payment method options. + """ + shopeepay: NotRequired[ + "Literal['']|PaymentIntentCreateParamsPaymentMethodOptionsShopeepay" + ] + """ + If this is a `shopeepay` PaymentMethod, this sub-hash contains details about the ShopeePay payment method options. + """ + sofort: NotRequired[ + "Literal['']|PaymentIntentCreateParamsPaymentMethodOptionsSofort" + ] + """ + If this is a `sofort` PaymentMethod, this sub-hash contains details about the SOFORT payment method options. + """ + stripe_balance: NotRequired[ + "Literal['']|PaymentIntentCreateParamsPaymentMethodOptionsStripeBalance" + ] + """ + If this is a `stripe_balance` PaymentMethod, this sub-hash contains details about the Stripe Balance payment method options. + """ + swish: NotRequired[ + "Literal['']|PaymentIntentCreateParamsPaymentMethodOptionsSwish" + ] + """ + If this is a `Swish` PaymentMethod, this sub-hash contains details about the Swish payment method options. + """ + twint: NotRequired[ + "Literal['']|PaymentIntentCreateParamsPaymentMethodOptionsTwint" + ] + """ + If this is a `twint` PaymentMethod, this sub-hash contains details about the TWINT payment method options. + """ + us_bank_account: NotRequired[ + "Literal['']|PaymentIntentCreateParamsPaymentMethodOptionsUsBankAccount" + ] + """ + If this is a `us_bank_account` PaymentMethod, this sub-hash contains details about the US bank account payment method options. + """ + wechat_pay: NotRequired[ + "Literal['']|PaymentIntentCreateParamsPaymentMethodOptionsWechatPay" + ] + """ + If this is a `wechat_pay` PaymentMethod, this sub-hash contains details about the WeChat Pay payment method options. + """ + zip: NotRequired[ + "Literal['']|PaymentIntentCreateParamsPaymentMethodOptionsZip" + ] + """ + If this is a `zip` PaymentMethod, this sub-hash contains details about the Zip payment method options. + """ + + +class PaymentIntentCreateParamsPaymentMethodOptionsAcssDebit(TypedDict): + mandate_options: NotRequired[ + "PaymentIntentCreateParamsPaymentMethodOptionsAcssDebitMandateOptions" + ] + """ + Additional fields for Mandate creation + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session', 'on_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + target_date: NotRequired[str] + """ + Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + """ + verification_method: NotRequired[ + Literal["automatic", "instant", "microdeposits"] + ] + """ + Bank account verification method. + """ + + +class PaymentIntentCreateParamsPaymentMethodOptionsAcssDebitMandateOptions( + TypedDict, +): + custom_mandate_url: NotRequired["Literal['']|str"] + """ + A URL for custom mandate text to render during confirmation step. + The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent, + or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent. + """ + interval_description: NotRequired[str] + """ + Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'. + """ + payment_schedule: NotRequired[Literal["combined", "interval", "sporadic"]] + """ + Payment schedule for the mandate. + """ + transaction_type: NotRequired[Literal["business", "personal"]] + """ + Transaction type of the mandate. + """ + + +class PaymentIntentCreateParamsPaymentMethodOptionsAffirm(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + preferred_locale: NotRequired[str] + """ + Preferred language of the Affirm authorization page that the customer is redirected to. + """ + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentCreateParamsPaymentMethodOptionsAfterpayClearpay(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + reference: NotRequired[str] + """ + An internal identifier or reference that this payment corresponds to. You must limit the identifier to 128 characters, and it can only contain letters, numbers, underscores, backslashes, and dashes. + This field differs from the statement descriptor and item name. + """ + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentCreateParamsPaymentMethodOptionsAlipay(TypedDict): + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentCreateParamsPaymentMethodOptionsAlma(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + + +class PaymentIntentCreateParamsPaymentMethodOptionsAmazonPay(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + """ + + +class PaymentIntentCreateParamsPaymentMethodOptionsAuBecsDebit(TypedDict): + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session', 'on_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + target_date: NotRequired[str] + """ + Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + """ + + +class PaymentIntentCreateParamsPaymentMethodOptionsBacsDebit(TypedDict): + mandate_options: NotRequired[ + "PaymentIntentCreateParamsPaymentMethodOptionsBacsDebitMandateOptions" + ] + """ + Additional fields for Mandate creation + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session', 'on_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + target_date: NotRequired[str] + """ + Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + """ + + +class PaymentIntentCreateParamsPaymentMethodOptionsBacsDebitMandateOptions( + TypedDict, +): + reference_prefix: NotRequired["Literal['']|str"] + """ + Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'. + """ + + +class PaymentIntentCreateParamsPaymentMethodOptionsBancontact(TypedDict): + preferred_language: NotRequired[Literal["de", "en", "fr", "nl"]] + """ + Preferred language of the Bancontact authorization page that the customer is redirected to. + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentCreateParamsPaymentMethodOptionsBillie(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + + +class PaymentIntentCreateParamsPaymentMethodOptionsBlik(TypedDict): + code: NotRequired[str] + """ + The 6-digit BLIK code that a customer has generated using their banking application. Can only be set on confirmation. + """ + setup_future_usage: NotRequired["Literal['']|Literal['none']"] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentCreateParamsPaymentMethodOptionsBoleto(TypedDict): + expires_after_days: NotRequired[int] + """ + The number of calendar days before a Boleto voucher expires. For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto invoice will expire on Wednesday at 23:59 America/Sao_Paulo time. + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session', 'on_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentCreateParamsPaymentMethodOptionsCard(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + cvc_token: NotRequired[str] + """ + A single-use `cvc_update` Token that represents a card CVC value. When provided, the CVC value will be verified during the card payment attempt. This parameter can only be provided during confirmation. + """ + installments: NotRequired[ + "PaymentIntentCreateParamsPaymentMethodOptionsCardInstallments" + ] + """ + Installment configuration for payments attempted on this PaymentIntent. + + For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments). + """ + mandate_options: NotRequired[ + "PaymentIntentCreateParamsPaymentMethodOptionsCardMandateOptions" + ] + """ + Configuration options for setting up an eMandate for cards issued in India. + """ + moto: NotRequired[bool] + """ + When specified, this parameter indicates that a transaction will be marked + as MOTO (Mail Order Telephone Order) and thus out of scope for SCA. This + parameter can only be provided during confirmation. + """ + network: NotRequired[ + Literal[ + "amex", + "cartes_bancaires", + "diners", + "discover", + "eftpos_au", + "girocard", + "interac", + "jcb", + "link", + "mastercard", + "unionpay", + "unknown", + "visa", + ] + ] + """ + Selected network to process this PaymentIntent on. Depends on the available networks of the card attached to the PaymentIntent. Can be only set confirm-time. + """ + request_decremental_authorization: NotRequired[ + Literal["if_available", "never"] + ] + """ + Request ability to [decrement the authorization](https://stripe.com/docs/payments/decremental-authorization) for this PaymentIntent. + """ + request_extended_authorization: NotRequired[ + Literal["if_available", "never"] + ] + """ + Request ability to [capture beyond the standard authorization validity window](https://stripe.com/docs/payments/extended-authorization) for this PaymentIntent. + """ + request_incremental_authorization: NotRequired[ + Literal["if_available", "never"] + ] + """ + Request ability to [increment the authorization](https://stripe.com/docs/payments/incremental-authorization) for this PaymentIntent. + """ + request_multicapture: NotRequired[Literal["if_available", "never"]] + """ + Request ability to make [multiple captures](https://stripe.com/docs/payments/multicapture) for this PaymentIntent. + """ + request_overcapture: NotRequired[Literal["if_available", "never"]] + """ + Request ability to [overcapture](https://stripe.com/docs/payments/overcapture) for this PaymentIntent. + """ + request_partial_authorization: NotRequired[ + Literal["if_available", "never"] + ] + """ + Request partial authorization on this PaymentIntent. + """ + request_three_d_secure: NotRequired[ + Literal["any", "automatic", "challenge"] + ] + """ + We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + """ + require_cvc_recollection: NotRequired[bool] + """ + When enabled, using a card that is attached to a customer will require the CVC to be provided again (i.e. using the cvc_token parameter). + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session', 'on_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + statement_descriptor_suffix_kana: NotRequired["Literal['']|str"] + """ + Provides information about a card payment that customers see on their statements. Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor that's set on the account to form the complete statement descriptor. Maximum 22 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 22 characters. + """ + statement_descriptor_suffix_kanji: NotRequired["Literal['']|str"] + """ + Provides information about a card payment that customers see on their statements. Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement descriptor that's set on the account to form the complete statement descriptor. Maximum 17 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 17 characters. + """ + statement_details: NotRequired[ + "Literal['']|PaymentIntentCreateParamsPaymentMethodOptionsCardStatementDetails" + ] + """ + Statement details for this payment intent. You can use this to override the merchant details shown on your customers' statements. + """ + three_d_secure: NotRequired[ + "PaymentIntentCreateParamsPaymentMethodOptionsCardThreeDSecure" + ] + """ + If 3D Secure authentication was performed with a third-party provider, + the authentication details to use for this payment. + """ + + +class PaymentIntentCreateParamsPaymentMethodOptionsCardInstallments(TypedDict): + enabled: NotRequired[bool] + """ + Setting to true enables installments for this PaymentIntent. + This will cause the response to contain a list of available installment plans. + Setting to false will prevent any selected plan from applying to a charge. + """ + plan: NotRequired[ + "Literal['']|PaymentIntentCreateParamsPaymentMethodOptionsCardInstallmentsPlan" + ] + """ + The selected installment plan to use for this payment attempt. + This parameter can only be provided during confirmation. + """ + + +class PaymentIntentCreateParamsPaymentMethodOptionsCardInstallmentsPlan( + TypedDict, +): + count: NotRequired[int] + """ + For `fixed_count` installment plans, this is required. It represents the number of installment payments your customer will make to their credit card. + """ + interval: NotRequired[Literal["month"]] + """ + For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card. + One of `month`. + """ + type: Literal["bonus", "fixed_count", "revolving"] + """ + Type of installment plan, one of `fixed_count`, `bonus`, or `revolving`. + """ + + +class PaymentIntentCreateParamsPaymentMethodOptionsCardMandateOptions( + TypedDict, +): + amount: int + """ + Amount to be charged for future payments. + """ + amount_type: Literal["fixed", "maximum"] + """ + One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. + """ + description: NotRequired[str] + """ + A description of the mandate or subscription that is meant to be displayed to the customer. + """ + end_date: NotRequired[int] + """ + End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. + """ + interval: Literal["day", "month", "sporadic", "week", "year"] + """ + Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`. + """ + interval_count: NotRequired[int] + """ + The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`. + """ + reference: str + """ + Unique identifier for the mandate or subscription. + """ + start_date: int + """ + Start date of the mandate or subscription. Start date should not be lesser than yesterday. + """ + supported_types: NotRequired[List[Literal["india"]]] + """ + Specifies the type of mandates supported. Possible values are `india`. + """ + + +class PaymentIntentCreateParamsPaymentMethodOptionsCardStatementDetails( + TypedDict, +): + address: NotRequired[ + "PaymentIntentCreateParamsPaymentMethodOptionsCardStatementDetailsAddress" + ] + """ + Please pass in an address that is within your Stripe user account country + """ + phone: NotRequired[str] + """ + Phone number (e.g., a toll-free number that customers can call) + """ + + +class PaymentIntentCreateParamsPaymentMethodOptionsCardStatementDetailsAddress( + 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. + """ + + +class PaymentIntentCreateParamsPaymentMethodOptionsCardThreeDSecure(TypedDict): + ares_trans_status: NotRequired[Literal["A", "C", "I", "N", "R", "U", "Y"]] + """ + The `transStatus` returned from the card Issuer's ACS in the ARes. + """ + cryptogram: str + """ + The cryptogram, also known as the "authentication value" (AAV, CAVV or + AEVV). This value is 20 bytes, base64-encoded into a 28-character string. + (Most 3D Secure providers will return the base64-encoded version, which + is what you should specify here.) + """ + electronic_commerce_indicator: NotRequired[ + Literal["01", "02", "05", "06", "07"] + ] + """ + The Electronic Commerce Indicator (ECI) is returned by your 3D Secure + provider and indicates what degree of authentication was performed. + """ + exemption_indicator: NotRequired[Literal["low_risk", "none"]] + """ + The exemption requested via 3DS and accepted by the issuer at authentication time. + """ + network_options: NotRequired[ + "PaymentIntentCreateParamsPaymentMethodOptionsCardThreeDSecureNetworkOptions" + ] + """ + Network specific 3DS fields. Network specific arguments require an + explicit card brand choice. The parameter `payment_method_options.card.network`` + must be populated accordingly + """ + requestor_challenge_indicator: NotRequired[str] + """ + The challenge indicator (`threeDSRequestorChallengeInd`) which was requested in the + AReq sent to the card Issuer's ACS. A string containing 2 digits from 01-99. + """ + transaction_id: str + """ + For 3D Secure 1, the XID. For 3D Secure 2, the Directory Server + Transaction ID (dsTransID). + """ + version: Literal["1.0.2", "2.1.0", "2.2.0"] + """ + The version of 3D Secure that was performed. + """ + + +class PaymentIntentCreateParamsPaymentMethodOptionsCardThreeDSecureNetworkOptions( + TypedDict, +): + cartes_bancaires: NotRequired[ + "PaymentIntentCreateParamsPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancaires" + ] + """ + Cartes Bancaires-specific 3DS fields. + """ + + +class PaymentIntentCreateParamsPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancaires( + TypedDict, +): + cb_avalgo: Literal["0", "1", "2", "3", "4", "A"] + """ + The cryptogram calculation algorithm used by the card Issuer's ACS + to calculate the Authentication cryptogram. Also known as `cavvAlgorithm`. + messageExtension: CB-AVALGO + """ + cb_exemption: NotRequired[str] + """ + The exemption indicator returned from Cartes Bancaires in the ARes. + message extension: CB-EXEMPTION; string (4 characters) + This is a 3 byte bitmap (low significant byte first and most significant + bit first) that has been Base64 encoded + """ + cb_score: NotRequired[int] + """ + The risk score returned from Cartes Bancaires in the ARes. + message extension: CB-SCORE; numeric value 0-99 + """ + + +class PaymentIntentCreateParamsPaymentMethodOptionsCardPresent(TypedDict): + request_extended_authorization: NotRequired[bool] + """ + Request ability to capture this payment beyond the standard [authorization validity window](https://stripe.com/docs/terminal/features/extended-authorizations#authorization-validity) + """ + request_incremental_authorization_support: NotRequired[bool] + """ + Request ability to [increment](https://stripe.com/docs/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://stripe.com/docs/api/payment_intents/confirm) response to verify support. + """ + routing: NotRequired[ + "PaymentIntentCreateParamsPaymentMethodOptionsCardPresentRouting" + ] + """ + Network routing priority on co-branded EMV cards supporting domestic debit and international card schemes. + """ + + +class PaymentIntentCreateParamsPaymentMethodOptionsCardPresentRouting( + TypedDict, +): + requested_priority: NotRequired[Literal["domestic", "international"]] + """ + Routing requested priority + """ + + +class PaymentIntentCreateParamsPaymentMethodOptionsCashapp(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session', 'on_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentCreateParamsPaymentMethodOptionsCrypto(TypedDict): + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentCreateParamsPaymentMethodOptionsCustomerBalance(TypedDict): + bank_transfer: NotRequired[ + "PaymentIntentCreateParamsPaymentMethodOptionsCustomerBalanceBankTransfer" + ] + """ + Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. + """ + funding_type: NotRequired[Literal["bank_transfer"]] + """ + The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. + """ + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentCreateParamsPaymentMethodOptionsCustomerBalanceBankTransfer( + TypedDict, +): + eu_bank_transfer: NotRequired[ + "PaymentIntentCreateParamsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer" + ] + """ + Configuration for the eu_bank_transfer funding type. + """ + requested_address_types: NotRequired[ + List[ + Literal[ + "aba", "iban", "sepa", "sort_code", "spei", "swift", "zengin" + ] + ] + ] + """ + List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned. + + Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`. + """ + type: Literal[ + "eu_bank_transfer", + "gb_bank_transfer", + "jp_bank_transfer", + "mx_bank_transfer", + "us_bank_transfer", + ] + """ + The list of bank transfer types that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. + """ + + +class PaymentIntentCreateParamsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer( + TypedDict, +): + country: str + """ + The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. + """ + + +class PaymentIntentCreateParamsPaymentMethodOptionsEps(TypedDict): + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentCreateParamsPaymentMethodOptionsFpx(TypedDict): + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentCreateParamsPaymentMethodOptionsGiropay(TypedDict): + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentCreateParamsPaymentMethodOptionsGopay(TypedDict): + setup_future_usage: NotRequired[Literal["none", "off_session"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentCreateParamsPaymentMethodOptionsGrabpay(TypedDict): + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentCreateParamsPaymentMethodOptionsIdBankTransfer(TypedDict): + expires_after: NotRequired[int] + """ + The UNIX timestamp until which the virtual bank account is valid. Permitted range is from 5 minutes from now until 31 days from now. If unset, it defaults to 3 days from now. + """ + expires_at: NotRequired[int] + """ + The UNIX timestamp until which the virtual bank account is valid. Permitted range is from now until 30 days from now. If unset, it defaults to 1 days from now. + """ + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentCreateParamsPaymentMethodOptionsIdeal(TypedDict): + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentCreateParamsPaymentMethodOptionsInteracPresent(TypedDict): + pass + + +class PaymentIntentCreateParamsPaymentMethodOptionsKakaoPay(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + """ + + +class PaymentIntentCreateParamsPaymentMethodOptionsKlarna(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + on_demand: NotRequired[ + "PaymentIntentCreateParamsPaymentMethodOptionsKlarnaOnDemand" + ] + """ + On-demand details if setting up or charging an on-demand payment. + """ + preferred_locale: NotRequired[ + Literal[ + "cs-CZ", + "da-DK", + "de-AT", + "de-CH", + "de-DE", + "el-GR", + "en-AT", + "en-AU", + "en-BE", + "en-CA", + "en-CH", + "en-CZ", + "en-DE", + "en-DK", + "en-ES", + "en-FI", + "en-FR", + "en-GB", + "en-GR", + "en-IE", + "en-IT", + "en-NL", + "en-NO", + "en-NZ", + "en-PL", + "en-PT", + "en-RO", + "en-SE", + "en-US", + "es-ES", + "es-US", + "fi-FI", + "fr-BE", + "fr-CA", + "fr-CH", + "fr-FR", + "it-CH", + "it-IT", + "nb-NO", + "nl-BE", + "nl-NL", + "pl-PL", + "pt-PT", + "ro-RO", + "sv-FI", + "sv-SE", + ] + ] + """ + Preferred language of the Klarna authorization page that the customer is redirected to + """ + setup_future_usage: NotRequired[ + Literal["none", "off_session", "on_session"] + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + subscriptions: NotRequired[ + "Literal['']|List[PaymentIntentCreateParamsPaymentMethodOptionsKlarnaSubscription]" + ] + """ + Subscription details if setting up or charging a subscription. + """ + + +class PaymentIntentCreateParamsPaymentMethodOptionsKlarnaOnDemand(TypedDict): + average_amount: NotRequired[int] + """ + Your average amount value. You can use a value across your customer base, or segment based on customer type, country, etc. + """ + maximum_amount: NotRequired[int] + """ + The maximum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. + """ + minimum_amount: NotRequired[int] + """ + The lowest or minimum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. + """ + purchase_interval: NotRequired[Literal["day", "month", "week", "year"]] + """ + Interval at which the customer is making purchases + """ + purchase_interval_count: NotRequired[int] + """ + The number of `purchase_interval` between charges + """ + + +class PaymentIntentCreateParamsPaymentMethodOptionsKlarnaSubscription( + TypedDict, +): + interval: Literal["day", "month", "week", "year"] + """ + Unit of time between subscription charges. + """ + interval_count: NotRequired[int] + """ + The number of intervals (specified in the `interval` attribute) between subscription charges. For example, `interval=month` and `interval_count=3` charges every 3 months. + """ + name: NotRequired[str] + """ + Name for subscription. + """ + next_billing: NotRequired[ + "PaymentIntentCreateParamsPaymentMethodOptionsKlarnaSubscriptionNextBilling" + ] + """ + Describes the upcoming charge for this subscription. + """ + reference: str + """ + A non-customer-facing reference to correlate subscription charges in the Klarna app. Use a value that persists across subscription charges. + """ + + +class PaymentIntentCreateParamsPaymentMethodOptionsKlarnaSubscriptionNextBilling( + TypedDict, +): + amount: int + """ + The amount of the next charge for the subscription. + """ + date: str + """ + The date of the next charge for the subscription in YYYY-MM-DD format. + """ + + +class PaymentIntentCreateParamsPaymentMethodOptionsKonbini(TypedDict): + confirmation_number: NotRequired["Literal['']|str"] + """ + An optional 10 to 11 digit numeric-only string determining the confirmation code at applicable convenience stores. Must not consist of only zeroes and could be rejected in case of insufficient uniqueness. We recommend to use the customer's phone number. + """ + expires_after_days: NotRequired["Literal['']|int"] + """ + The number of calendar days (between 1 and 60) after which Konbini payment instructions will expire. For example, if a PaymentIntent is confirmed with Konbini and `expires_after_days` set to 2 on Monday JST, the instructions will expire on Wednesday 23:59:59 JST. Defaults to 3 days. + """ + expires_at: NotRequired["Literal['']|int"] + """ + The timestamp at which the Konbini payment instructions will expire. Only one of `expires_after_days` or `expires_at` may be set. + """ + product_description: NotRequired["Literal['']|str"] + """ + A product descriptor of up to 22 characters, which will appear to customers at the convenience store. + """ + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentCreateParamsPaymentMethodOptionsKrCard(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + """ + + +class PaymentIntentCreateParamsPaymentMethodOptionsLink(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + persistent_token: NotRequired[str] + """ + [Deprecated] This is a legacy parameter that no longer has any function. + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentCreateParamsPaymentMethodOptionsMbWay(TypedDict): + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentCreateParamsPaymentMethodOptionsMobilepay(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentCreateParamsPaymentMethodOptionsMultibanco(TypedDict): + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentCreateParamsPaymentMethodOptionsNaverPay(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + """ + + +class PaymentIntentCreateParamsPaymentMethodOptionsNzBankAccount(TypedDict): + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session', 'on_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + target_date: NotRequired[str] + """ + Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + """ + + +class PaymentIntentCreateParamsPaymentMethodOptionsOxxo(TypedDict): + expires_after_days: NotRequired[int] + """ + The number of calendar days before an OXXO voucher expires. For example, if you create an OXXO voucher on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time. + """ + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentCreateParamsPaymentMethodOptionsP24(TypedDict): + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + tos_shown_and_accepted: NotRequired[bool] + """ + Confirm that the payer has accepted the P24 terms and conditions. + """ + + +class PaymentIntentCreateParamsPaymentMethodOptionsPayByBank(TypedDict): + pass + + +class PaymentIntentCreateParamsPaymentMethodOptionsPayco(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + + +class PaymentIntentCreateParamsPaymentMethodOptionsPaynow(TypedDict): + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentCreateParamsPaymentMethodOptionsPaypal(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds will be captured from the customer's account. + """ + line_items: NotRequired[ + List["PaymentIntentCreateParamsPaymentMethodOptionsPaypalLineItem"] + ] + """ + The line items purchased by the customer. + """ + preferred_locale: NotRequired[ + Literal[ + "cs-CZ", + "da-DK", + "de-AT", + "de-DE", + "de-LU", + "el-GR", + "en-GB", + "en-US", + "es-ES", + "fi-FI", + "fr-BE", + "fr-FR", + "fr-LU", + "hu-HU", + "it-IT", + "nl-BE", + "nl-NL", + "pl-PL", + "pt-PT", + "sk-SK", + "sv-SE", + ] + ] + """ + [Preferred locale](https://stripe.com/docs/payments/paypal/supported-locales) of the PayPal checkout page that the customer is redirected to. + """ + reference: NotRequired[str] + """ + A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. + """ + reference_id: NotRequired[str] + """ + A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. + """ + risk_correlation_id: NotRequired[str] + """ + The risk correlation ID for an on-session payment using a saved PayPal payment method. + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + subsellers: NotRequired[List[str]] + """ + The Stripe connected account IDs of the sellers on the platform for this transaction (optional). Only allowed when [separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) are used. + """ + + +class PaymentIntentCreateParamsPaymentMethodOptionsPaypalLineItem(TypedDict): + category: NotRequired[ + Literal["digital_goods", "donation", "physical_goods"] + ] + """ + Type of the line item. + """ + description: NotRequired[str] + """ + Description of the line item. + """ + name: str + """ + Descriptive name of the line item. + """ + quantity: int + """ + Quantity of the line item. Must be a positive number. + """ + sku: NotRequired[str] + """ + Client facing stock keeping unit, article number or similar. + """ + sold_by: NotRequired[str] + """ + The Stripe account ID of the connected account that sells the item. + """ + tax: NotRequired[ + "PaymentIntentCreateParamsPaymentMethodOptionsPaypalLineItemTax" + ] + """ + The tax information for the line item. + """ + unit_amount: int + """ + Price for a single unit of the line item in minor units. Cannot be a negative number. + """ + + +class PaymentIntentCreateParamsPaymentMethodOptionsPaypalLineItemTax( + TypedDict +): + amount: int + """ + The tax for a single unit of the line item in minor units. Cannot be a negative number. + """ + behavior: Literal["exclusive", "inclusive"] + """ + The tax behavior for the line item. + """ + + +class PaymentIntentCreateParamsPaymentMethodOptionsPaypay(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + + +class PaymentIntentCreateParamsPaymentMethodOptionsPayto(TypedDict): + mandate_options: NotRequired[ + "PaymentIntentCreateParamsPaymentMethodOptionsPaytoMandateOptions" + ] + """ + Additional fields for Mandate creation. Only `purpose` field is configurable for PayTo PaymentIntent with `setup_future_usage=none`. Other fields are only applicable to PayTo PaymentIntent with `setup_future_usage=off_session` + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentCreateParamsPaymentMethodOptionsPaytoMandateOptions( + TypedDict, +): + amount: NotRequired[int] + """ + Amount that will be collected. It is required when `amount_type` is `fixed`. + """ + amount_type: NotRequired[Literal["fixed", "maximum"]] + """ + The type of amount that will be collected. The amount charged must be exact or up to the value of `amount` param for `fixed` or `maximum` type respectively. + """ + end_date: NotRequired[str] + """ + Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no end date. + """ + payment_schedule: NotRequired[ + Literal[ + "adhoc", + "annual", + "daily", + "fortnightly", + "monthly", + "quarterly", + "semi_annual", + "weekly", + ] + ] + """ + The periodicity at which payments will be collected. + """ + payments_per_period: NotRequired[int] + """ + The number of payments that will be made during a payment period. Defaults to 1 except for when `payment_schedule` is `adhoc`. In that case, it defaults to no limit. + """ + purpose: NotRequired[ + Literal[ + "dependant_support", + "government", + "loan", + "mortgage", + "other", + "pension", + "personal", + "retail", + "salary", + "tax", + "utility", + ] + ] + """ + The purpose for which payments are made. Defaults to retail. + """ + + +class PaymentIntentCreateParamsPaymentMethodOptionsPix(TypedDict): + amount_includes_iof: NotRequired[Literal["always", "never"]] + """ + Determines if the amount includes the IOF tax. Defaults to `never`. + """ + expires_after_seconds: NotRequired[int] + """ + The number of seconds (between 10 and 1209600) after which Pix payment will expire. Defaults to 86400 seconds. + """ + expires_at: NotRequired[int] + """ + The timestamp at which the Pix expires (between 10 and 1209600 seconds in the future). Defaults to 1 day in the future. + """ + mandate_options: NotRequired[ + "PaymentIntentCreateParamsPaymentMethodOptionsPixMandateOptions" + ] + """ + Additional fields for mandate creation. Only applicable when `setup_future_usage=off_session`. + """ + setup_future_usage: NotRequired[Literal["none", "off_session"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentCreateParamsPaymentMethodOptionsPixMandateOptions( + TypedDict +): + amount: NotRequired[int] + """ + Amount to be charged for future payments. Required when `amount_type=fixed`. If not provided for `amount_type=maximum`, defaults to 40000. + """ + amount_includes_iof: NotRequired[Literal["always", "never"]] + """ + Determines if the amount includes the IOF tax. Defaults to `never`. + """ + amount_type: NotRequired[Literal["fixed", "maximum"]] + """ + Type of amount. Defaults to `maximum`. + """ + currency: NotRequired[str] + """ + Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Only `brl` is supported currently. + """ + end_date: NotRequired[str] + """ + Date when the mandate expires and no further payments will be charged, in `YYYY-MM-DD`. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. + """ + payment_schedule: NotRequired[ + Literal["halfyearly", "monthly", "quarterly", "weekly", "yearly"] + ] + """ + Schedule at which the future payments will be charged. Defaults to `weekly`. + """ + reference: NotRequired[str] + """ + Subscription name displayed to buyers in their bank app. Defaults to the displayable business name. + """ + start_date: NotRequired[str] + """ + Start date of the mandate, in `YYYY-MM-DD`. Start date should be at least 3 days in the future. Defaults to 3 days after the current date. + """ + + +class PaymentIntentCreateParamsPaymentMethodOptionsPromptpay(TypedDict): + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentCreateParamsPaymentMethodOptionsQris(TypedDict): + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentCreateParamsPaymentMethodOptionsRechnung(TypedDict): + pass + + +class PaymentIntentCreateParamsPaymentMethodOptionsRevolutPay(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + """ + + +class PaymentIntentCreateParamsPaymentMethodOptionsSamsungPay(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + + +class PaymentIntentCreateParamsPaymentMethodOptionsSatispay(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + + +class PaymentIntentCreateParamsPaymentMethodOptionsSepaDebit(TypedDict): + mandate_options: NotRequired[ + "PaymentIntentCreateParamsPaymentMethodOptionsSepaDebitMandateOptions" + ] + """ + Additional fields for Mandate creation + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session', 'on_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + target_date: NotRequired[str] + """ + Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + """ + + +class PaymentIntentCreateParamsPaymentMethodOptionsSepaDebitMandateOptions( + TypedDict, +): + reference_prefix: NotRequired["Literal['']|str"] + """ + Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'. + """ + + +class PaymentIntentCreateParamsPaymentMethodOptionsShopeepay(TypedDict): + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentCreateParamsPaymentMethodOptionsSofort(TypedDict): + preferred_language: NotRequired[ + "Literal['']|Literal['de', 'en', 'es', 'fr', 'it', 'nl', 'pl']" + ] + """ + Language shown to the payer on redirect. + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentCreateParamsPaymentMethodOptionsStripeBalance(TypedDict): + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentCreateParamsPaymentMethodOptionsSwish(TypedDict): + reference: NotRequired["Literal['']|str"] + """ + A reference for this payment to be displayed in the Swish app. + """ + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentCreateParamsPaymentMethodOptionsTwint(TypedDict): + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentCreateParamsPaymentMethodOptionsUsBankAccount(TypedDict): + financial_connections: NotRequired[ + "PaymentIntentCreateParamsPaymentMethodOptionsUsBankAccountFinancialConnections" + ] + """ + Additional fields for Financial Connections Session creation + """ + mandate_options: NotRequired[ + "PaymentIntentCreateParamsPaymentMethodOptionsUsBankAccountMandateOptions" + ] + """ + Additional fields for Mandate creation + """ + networks: NotRequired[ + "PaymentIntentCreateParamsPaymentMethodOptionsUsBankAccountNetworks" + ] + """ + Additional fields for network related functions + """ + preferred_settlement_speed: NotRequired[ + "Literal['']|Literal['fastest', 'standard']" + ] + """ + Preferred transaction settlement speed + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session', 'on_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + target_date: NotRequired[str] + """ + Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + """ + verification_method: NotRequired[ + Literal["automatic", "instant", "microdeposits"] + ] + """ + Bank account verification method. + """ + + +class PaymentIntentCreateParamsPaymentMethodOptionsUsBankAccountFinancialConnections( + TypedDict, +): + filters: NotRequired[ + "PaymentIntentCreateParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters" + ] + """ + Provide filters for the linked accounts that the customer can select for the payment method. + """ + manual_entry: NotRequired[ + "PaymentIntentCreateParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsManualEntry" + ] + """ + Customize manual entry behavior + """ + permissions: NotRequired[ + List[ + Literal["balances", "ownership", "payment_method", "transactions"] + ] + ] + """ + The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. + """ + prefetch: NotRequired[ + List[ + Literal[ + "balances", "inferred_balances", "ownership", "transactions" + ] + ] + ] + """ + List of data features that you would like to retrieve upon account creation. + """ + return_url: NotRequired[str] + """ + For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. + """ + + +class PaymentIntentCreateParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters( + TypedDict, +): + account_subcategories: NotRequired[List[Literal["checking", "savings"]]] + """ + The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`. + """ + institution: NotRequired[str] + """ + ID of the institution to use to filter for selectable accounts. + """ + + +class PaymentIntentCreateParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsManualEntry( + TypedDict, +): + mode: Literal["automatic", "custom"] + """ + Settings for configuring manual entry of account details. + """ + + +class PaymentIntentCreateParamsPaymentMethodOptionsUsBankAccountMandateOptions( + TypedDict, +): + collection_method: NotRequired["Literal['']|Literal['paper']"] + """ + The method used to collect offline mandate customer acceptance. + """ + + +class PaymentIntentCreateParamsPaymentMethodOptionsUsBankAccountNetworks( + TypedDict, +): + requested: NotRequired[List[Literal["ach", "us_domestic_wire"]]] + """ + Triggers validations to run across the selected networks + """ + + +class PaymentIntentCreateParamsPaymentMethodOptionsWechatPay(TypedDict): + app_id: NotRequired[str] + """ + The app ID registered with WeChat Pay. Only required when client is ios or android. + """ + client: NotRequired[Literal["android", "ios", "web"]] + """ + The client type that the end customer will pay from + """ + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentCreateParamsPaymentMethodOptionsZip(TypedDict): + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentCreateParamsRadarOptions(TypedDict): + session: NotRequired[str] + """ + A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. + """ + + +class PaymentIntentCreateParamsShipping(TypedDict): + address: "PaymentIntentCreateParamsShippingAddress" + """ + Shipping address. + """ + carrier: NotRequired[str] + """ + The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. + """ + name: str + """ + Recipient name. + """ + phone: NotRequired[str] + """ + Recipient phone (including extension). + """ + tracking_number: NotRequired[str] + """ + The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. + """ + + +class PaymentIntentCreateParamsShippingAddress(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. + """ + + +class PaymentIntentCreateParamsTransferData(TypedDict): + amount: NotRequired[int] + """ + The amount that will be transferred automatically when a charge succeeds. + The amount is capped at the total transaction amount and if no amount is set, + the full amount is transferred. + + If you intend to collect a fee and you need a more robust reporting experience, using + [application_fee_amount](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-application_fee_amount) + might be a better fit for your integration. + """ + destination: str + """ + If specified, successful charges will be attributed to the destination + account for tax reporting, and the funds from charges will be transferred + to the destination account. The ID of the resulting transfer will be + returned on the successful charge's `transfer` field. + """ diff --git a/stripe/params/_payment_intent_decrement_authorization_params.py b/stripe/params/_payment_intent_decrement_authorization_params.py new file mode 100644 index 000000000..529f0c812 --- /dev/null +++ b/stripe/params/_payment_intent_decrement_authorization_params.py @@ -0,0 +1,67 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List, Union +from typing_extensions import Literal, NotRequired, TypedDict + + +class PaymentIntentDecrementAuthorizationParams(RequestOptions): + amount: int + """ + The updated total amount that you intend to collect from the cardholder. This amount must be smaller than the currently authorized amount and greater than the already captured amount. + """ + application_fee_amount: NotRequired[int] + """ + The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total amount captured. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + """ + description: NotRequired[str] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + hooks: NotRequired["PaymentIntentDecrementAuthorizationParamsHooks"] + """ + Automations to be run during the PaymentIntent lifecycle + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + transfer_data: NotRequired[ + "PaymentIntentDecrementAuthorizationParamsTransferData" + ] + """ + The parameters used to automatically create a transfer after the payment is captured. + Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + """ + + +class PaymentIntentDecrementAuthorizationParamsHooks(TypedDict): + inputs: NotRequired["PaymentIntentDecrementAuthorizationParamsHooksInputs"] + """ + Arguments passed in automations + """ + + +class PaymentIntentDecrementAuthorizationParamsHooksInputs(TypedDict): + tax: NotRequired["PaymentIntentDecrementAuthorizationParamsHooksInputsTax"] + """ + Tax arguments for automations + """ + + +class PaymentIntentDecrementAuthorizationParamsHooksInputsTax(TypedDict): + calculation: Union[Literal[""], str] + """ + The [TaxCalculation](https://stripe.com/docs/api/tax/calculations) id + """ + + +class PaymentIntentDecrementAuthorizationParamsTransferData(TypedDict): + amount: NotRequired[int] + """ + The amount that will be transferred automatically when a charge succeeds. + """ diff --git a/stripe/params/_payment_intent_increment_authorization_params.py b/stripe/params/_payment_intent_increment_authorization_params.py new file mode 100644 index 000000000..2409c279e --- /dev/null +++ b/stripe/params/_payment_intent_increment_authorization_params.py @@ -0,0 +1,302 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List, Union +from typing_extensions import Literal, NotRequired, TypedDict + + +class PaymentIntentIncrementAuthorizationParams(RequestOptions): + amount: int + """ + The updated total amount that you intend to collect from the cardholder. This amount must be greater than the currently authorized amount. + """ + amount_details: NotRequired[ + "PaymentIntentIncrementAuthorizationParamsAmountDetails" + ] + """ + Provides industry-specific information about the amount. + """ + application_fee_amount: NotRequired[int] + """ + The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total amount captured. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + """ + description: NotRequired[str] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + hooks: NotRequired["PaymentIntentIncrementAuthorizationParamsHooks"] + """ + Automations to be run during the PaymentIntent lifecycle + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + payment_details: NotRequired[ + "PaymentIntentIncrementAuthorizationParamsPaymentDetails" + ] + """ + Provides industry-specific information about the charge. + """ + payment_method_options: NotRequired[ + "PaymentIntentIncrementAuthorizationParamsPaymentMethodOptions" + ] + """ + Payment method-specific configuration for this PaymentIntent. + """ + statement_descriptor: NotRequired[str] + """ + Text that appears on the customer's statement as the statement descriptor for a non-card or card charge. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see [the Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors). + """ + transfer_data: NotRequired[ + "PaymentIntentIncrementAuthorizationParamsTransferData" + ] + """ + The parameters used to automatically create a transfer after the payment is captured. + Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + """ + + +class PaymentIntentIncrementAuthorizationParamsAmountDetails(TypedDict): + discount_amount: NotRequired["Literal['']|int"] + """ + The total discount applied on the transaction. + """ + line_items: NotRequired[ + "Literal['']|List[PaymentIntentIncrementAuthorizationParamsAmountDetailsLineItem]" + ] + """ + A list of line items, each containing information about a product in the PaymentIntent. There is a maximum of 100 line items. + """ + shipping: NotRequired[ + "Literal['']|PaymentIntentIncrementAuthorizationParamsAmountDetailsShipping" + ] + """ + Contains information about the shipping portion of the amount. + """ + tax: NotRequired[ + "Literal['']|PaymentIntentIncrementAuthorizationParamsAmountDetailsTax" + ] + """ + Contains information about the tax portion of the amount. + """ + + +class PaymentIntentIncrementAuthorizationParamsAmountDetailsLineItem( + TypedDict +): + discount_amount: NotRequired[int] + """ + The amount an item was discounted for. Positive integer. + """ + payment_method_options: NotRequired[ + "PaymentIntentIncrementAuthorizationParamsAmountDetailsLineItemPaymentMethodOptions" + ] + """ + Payment method-specific information for line items. + """ + product_code: NotRequired[str] + """ + Unique identifier of the product. At most 12 characters long. + """ + product_name: str + """ + Name of the product. At most 100 characters long. + """ + quantity: int + """ + Number of items of the product. Positive integer. + """ + tax: NotRequired[ + "PaymentIntentIncrementAuthorizationParamsAmountDetailsLineItemTax" + ] + """ + Contains information about the tax on the item. + """ + unit_cost: int + """ + Cost of the product. Non-negative integer. + """ + unit_of_measure: NotRequired[str] + """ + A unit of measure for the line item, such as gallons, feet, meters, etc. + """ + + +class PaymentIntentIncrementAuthorizationParamsAmountDetailsLineItemPaymentMethodOptions( + TypedDict, +): + card: NotRequired[ + "PaymentIntentIncrementAuthorizationParamsAmountDetailsLineItemPaymentMethodOptionsCard" + ] + """ + This sub-hash contains line item details that are specific to `card` payment method." + """ + card_present: NotRequired[ + "PaymentIntentIncrementAuthorizationParamsAmountDetailsLineItemPaymentMethodOptionsCardPresent" + ] + """ + This sub-hash contains line item details that are specific to `card_present` payment method." + """ + klarna: NotRequired[ + "PaymentIntentIncrementAuthorizationParamsAmountDetailsLineItemPaymentMethodOptionsKlarna" + ] + """ + This sub-hash contains line item details that are specific to `klarna` payment method." + """ + paypal: NotRequired[ + "PaymentIntentIncrementAuthorizationParamsAmountDetailsLineItemPaymentMethodOptionsPaypal" + ] + """ + This sub-hash contains line item details that are specific to `paypal` payment method." + """ + + +class PaymentIntentIncrementAuthorizationParamsAmountDetailsLineItemPaymentMethodOptionsCard( + TypedDict, +): + commodity_code: NotRequired[str] + """ + Identifier that categorizes the items being purchased using a standardized commodity scheme such as (but not limited to) UNSPSC, NAICS, NAPCS, etc. + """ + + +class PaymentIntentIncrementAuthorizationParamsAmountDetailsLineItemPaymentMethodOptionsCardPresent( + TypedDict, +): + commodity_code: NotRequired[str] + """ + Identifier that categorizes the items being purchased using a standardized commodity scheme such as (but not limited to) UNSPSC, NAICS, NAPCS, etc. + """ + + +class PaymentIntentIncrementAuthorizationParamsAmountDetailsLineItemPaymentMethodOptionsKlarna( + TypedDict, +): + image_url: NotRequired[str] + """ + URL to an image for the product. Max length, 4096 characters. + """ + product_url: NotRequired[str] + """ + URL to the product page. Max length, 4096 characters. + """ + subscription_reference: NotRequired[str] + """ + Reference for the subscription this line item is for. + """ + + +class PaymentIntentIncrementAuthorizationParamsAmountDetailsLineItemPaymentMethodOptionsPaypal( + TypedDict, +): + category: NotRequired[ + Literal["digital_goods", "donation", "physical_goods"] + ] + """ + Type of the line item. + """ + description: NotRequired[str] + """ + Description of the line item. + """ + sold_by: NotRequired[str] + """ + The Stripe account ID of the connected account that sells the item. + """ + + +class PaymentIntentIncrementAuthorizationParamsAmountDetailsLineItemTax( + TypedDict, +): + total_tax_amount: int + """ + The total tax on an item. Non-negative integer. + """ + + +class PaymentIntentIncrementAuthorizationParamsAmountDetailsShipping( + TypedDict +): + amount: NotRequired["Literal['']|int"] + """ + Portion of the amount that is for shipping. + """ + from_postal_code: NotRequired["Literal['']|str"] + """ + The postal code that represents the shipping source. + """ + to_postal_code: NotRequired["Literal['']|str"] + """ + The postal code that represents the shipping destination. + """ + + +class PaymentIntentIncrementAuthorizationParamsAmountDetailsTax(TypedDict): + total_tax_amount: int + """ + Total portion of the amount that is for tax. + """ + + +class PaymentIntentIncrementAuthorizationParamsHooks(TypedDict): + inputs: NotRequired["PaymentIntentIncrementAuthorizationParamsHooksInputs"] + """ + Arguments passed in automations + """ + + +class PaymentIntentIncrementAuthorizationParamsHooksInputs(TypedDict): + tax: NotRequired["PaymentIntentIncrementAuthorizationParamsHooksInputsTax"] + """ + Tax arguments for automations + """ + + +class PaymentIntentIncrementAuthorizationParamsHooksInputsTax(TypedDict): + calculation: Union[Literal[""], str] + """ + The [TaxCalculation](https://stripe.com/docs/api/tax/calculations) id + """ + + +class PaymentIntentIncrementAuthorizationParamsPaymentDetails(TypedDict): + customer_reference: NotRequired["Literal['']|str"] + """ + Some customers might be required by their company or organization to provide this information. If so, provide this value. Otherwise you can ignore this field. + """ + order_reference: NotRequired["Literal['']|str"] + """ + A unique value assigned by the business to identify the transaction. + """ + + +class PaymentIntentIncrementAuthorizationParamsPaymentMethodOptions(TypedDict): + card: NotRequired[ + "PaymentIntentIncrementAuthorizationParamsPaymentMethodOptionsCard" + ] + """ + Configuration for any card payments attempted on this PaymentIntent. + """ + + +class PaymentIntentIncrementAuthorizationParamsPaymentMethodOptionsCard( + TypedDict, +): + request_partial_authorization: NotRequired[ + Literal["if_available", "never"] + ] + """ + Request partial authorization on this PaymentIntent. + """ + + +class PaymentIntentIncrementAuthorizationParamsTransferData(TypedDict): + amount: NotRequired[int] + """ + The amount that will be transferred automatically when a charge succeeds. + """ diff --git a/stripe/params/_payment_intent_list_amount_details_line_items_params.py b/stripe/params/_payment_intent_list_amount_details_line_items_params.py new file mode 100644 index 000000000..0dcb34ca0 --- /dev/null +++ b/stripe/params/_payment_intent_list_amount_details_line_items_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 PaymentIntentListAmountDetailsLineItemsParams(RequestOptions): + 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. + """ diff --git a/stripe/params/_payment_intent_list_params.py b/stripe/params/_payment_intent_list_params.py new file mode 100644 index 000000000..ed635ab53 --- /dev/null +++ b/stripe/params/_payment_intent_list_params.py @@ -0,0 +1,55 @@ +# -*- 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 PaymentIntentListParams(RequestOptions): + created: NotRequired["PaymentIntentListParamsCreated|int"] + """ + A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp or a dictionary with a number of different query options. + """ + customer: NotRequired[str] + """ + Only return PaymentIntents for the customer that this customer ID specifies. + """ + customer_account: NotRequired[str] + """ + Only return PaymentIntents for the account that this ID specifies. + """ + 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 PaymentIntentListParamsCreated(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/_payment_intent_modify_params.py b/stripe/params/_payment_intent_modify_params.py new file mode 100644 index 000000000..a8be3455f --- /dev/null +++ b/stripe/params/_payment_intent_modify_params.py @@ -0,0 +1,4370 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List, Union +from typing_extensions import Literal, NotRequired, TypedDict + + +class PaymentIntentModifyParams(RequestOptions): + amount: NotRequired[int] + """ + Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). + """ + amount_details: NotRequired[ + "Literal['']|PaymentIntentModifyParamsAmountDetails" + ] + """ + Provides industry-specific information about the amount. + """ + application_fee_amount: NotRequired["Literal['']|int"] + """ + The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total amount captured. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + """ + capture_method: NotRequired[ + Literal["automatic", "automatic_async", "manual"] + ] + """ + Controls when the funds will be captured from the customer's account. + """ + currency: NotRequired[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). + """ + customer: NotRequired[str] + """ + ID of the Customer this PaymentIntent belongs to, if one exists. + + Payment methods attached to other Customers cannot be used with this PaymentIntent. + + If [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) is set and this PaymentIntent's payment method is not `card_present`, then the payment method attaches to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + """ + customer_account: NotRequired[str] + """ + ID of the Account this PaymentIntent belongs to, if one exists. + + Payment methods attached to other Accounts cannot be used with this PaymentIntent. + + If [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) is set and this PaymentIntent's payment method is not `card_present`, then the payment method attaches to the Account after the PaymentIntent has been confirmed and any required actions from the user are complete. If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Account instead. + """ + description: NotRequired[str] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ + excluded_payment_method_types: NotRequired[ + "Literal['']|List[Literal['acss_debit', 'affirm', 'afterpay_clearpay', 'alipay', 'alma', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'billie', 'blik', 'boleto', 'card', 'cashapp', 'crypto', 'customer_balance', 'eps', 'fpx', 'giropay', 'gopay', 'grabpay', 'id_bank_transfer', 'ideal', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'mb_way', 'mobilepay', 'multibanco', 'naver_pay', 'nz_bank_account', 'oxxo', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'paypay', 'payto', 'pix', 'promptpay', 'qris', 'rechnung', 'revolut_pay', 'samsung_pay', 'satispay', 'sepa_debit', 'shopeepay', 'sofort', 'stripe_balance', 'swish', 'twint', 'us_bank_account', 'wechat_pay', 'zip']]" + ] + """ + The list of payment method types to exclude from use with this payment. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + fx_quote: NotRequired[str] + """ + The FX rate in the quote is validated and used to convert the presentment amount to the settlement amount. + """ + hooks: NotRequired["PaymentIntentModifyParamsHooks"] + """ + Automations to be run during the PaymentIntent lifecycle + """ + mandate_data: NotRequired["PaymentIntentModifyParamsMandateData"] + """ + This hash contains details about the Mandate to create. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + payment_details: NotRequired[ + "Literal['']|PaymentIntentModifyParamsPaymentDetails" + ] + """ + Provides industry-specific information about the charge. + """ + payment_method: NotRequired[str] + payment_method_configuration: NotRequired[str] + """ + The ID of the [payment method configuration](https://stripe.com/docs/api/payment_method_configurations) to use with this PaymentIntent. + """ + payment_method_data: NotRequired[ + "PaymentIntentModifyParamsPaymentMethodData" + ] + """ + If provided, this hash will be used to create a PaymentMethod. The new PaymentMethod will appear + in the [payment_method](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-payment_method) + property on the PaymentIntent. + """ + payment_method_options: NotRequired[ + "PaymentIntentModifyParamsPaymentMethodOptions" + ] + """ + Payment-method-specific configuration for this PaymentIntent. + """ + payment_method_types: NotRequired[List[str]] + """ + The list of payment method types (for example, card) that this PaymentIntent can use. Use `automatic_payment_methods` to manage payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). A list of valid payment method types can be found [here](https://docs.stripe.com/api/payment_methods/object#payment_method_object-type). + """ + receipt_email: NotRequired["Literal['']|str"] + """ + Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['off_session', 'on_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + shipping: NotRequired["Literal['']|PaymentIntentModifyParamsShipping"] + """ + Shipping information for this PaymentIntent. + """ + statement_descriptor: NotRequired[str] + """ + Text that appears on the customer's statement as the statement descriptor for a non-card charge. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see [the Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors). + + Setting this value for a card charge returns an error. For card charges, set the [statement_descriptor_suffix](https://docs.stripe.com/get-started/account/statement-descriptors#dynamic) instead. + """ + statement_descriptor_suffix: NotRequired[str] + """ + Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. + """ + transfer_data: NotRequired["PaymentIntentModifyParamsTransferData"] + """ + Use this parameter to automatically create a Transfer when the payment succeeds. Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + """ + transfer_group: NotRequired[str] + """ + A string that identifies the resulting payment as part of a group. You can only provide `transfer_group` if it hasn't been set. Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + """ + + +class PaymentIntentModifyParamsAmountDetails(TypedDict): + discount_amount: NotRequired["Literal['']|int"] + """ + The total discount applied on the transaction. + """ + line_items: NotRequired[ + "Literal['']|List[PaymentIntentModifyParamsAmountDetailsLineItem]" + ] + """ + A list of line items, each containing information about a product in the PaymentIntent. There is a maximum of 100 line items. + """ + shipping: NotRequired[ + "Literal['']|PaymentIntentModifyParamsAmountDetailsShipping" + ] + """ + Contains information about the shipping portion of the amount. + """ + tax: NotRequired["Literal['']|PaymentIntentModifyParamsAmountDetailsTax"] + """ + Contains information about the tax portion of the amount. + """ + + +class PaymentIntentModifyParamsAmountDetailsLineItem(TypedDict): + discount_amount: NotRequired[int] + """ + The amount an item was discounted for. Positive integer. + """ + payment_method_options: NotRequired[ + "PaymentIntentModifyParamsAmountDetailsLineItemPaymentMethodOptions" + ] + """ + Payment method-specific information for line items. + """ + product_code: NotRequired[str] + """ + Unique identifier of the product. At most 12 characters long. + """ + product_name: str + """ + Name of the product. At most 100 characters long. + """ + quantity: int + """ + Number of items of the product. Positive integer. + """ + tax: NotRequired["PaymentIntentModifyParamsAmountDetailsLineItemTax"] + """ + Contains information about the tax on the item. + """ + unit_cost: int + """ + Cost of the product. Non-negative integer. + """ + unit_of_measure: NotRequired[str] + """ + A unit of measure for the line item, such as gallons, feet, meters, etc. + """ + + +class PaymentIntentModifyParamsAmountDetailsLineItemPaymentMethodOptions( + TypedDict, +): + card: NotRequired[ + "PaymentIntentModifyParamsAmountDetailsLineItemPaymentMethodOptionsCard" + ] + """ + This sub-hash contains line item details that are specific to `card` payment method." + """ + card_present: NotRequired[ + "PaymentIntentModifyParamsAmountDetailsLineItemPaymentMethodOptionsCardPresent" + ] + """ + This sub-hash contains line item details that are specific to `card_present` payment method." + """ + klarna: NotRequired[ + "PaymentIntentModifyParamsAmountDetailsLineItemPaymentMethodOptionsKlarna" + ] + """ + This sub-hash contains line item details that are specific to `klarna` payment method." + """ + paypal: NotRequired[ + "PaymentIntentModifyParamsAmountDetailsLineItemPaymentMethodOptionsPaypal" + ] + """ + This sub-hash contains line item details that are specific to `paypal` payment method." + """ + + +class PaymentIntentModifyParamsAmountDetailsLineItemPaymentMethodOptionsCard( + TypedDict, +): + commodity_code: NotRequired[str] + """ + Identifier that categorizes the items being purchased using a standardized commodity scheme such as (but not limited to) UNSPSC, NAICS, NAPCS, etc. + """ + + +class PaymentIntentModifyParamsAmountDetailsLineItemPaymentMethodOptionsCardPresent( + TypedDict, +): + commodity_code: NotRequired[str] + """ + Identifier that categorizes the items being purchased using a standardized commodity scheme such as (but not limited to) UNSPSC, NAICS, NAPCS, etc. + """ + + +class PaymentIntentModifyParamsAmountDetailsLineItemPaymentMethodOptionsKlarna( + TypedDict, +): + image_url: NotRequired[str] + """ + URL to an image for the product. Max length, 4096 characters. + """ + product_url: NotRequired[str] + """ + URL to the product page. Max length, 4096 characters. + """ + subscription_reference: NotRequired[str] + """ + Reference for the subscription this line item is for. + """ + + +class PaymentIntentModifyParamsAmountDetailsLineItemPaymentMethodOptionsPaypal( + TypedDict, +): + category: NotRequired[ + Literal["digital_goods", "donation", "physical_goods"] + ] + """ + Type of the line item. + """ + description: NotRequired[str] + """ + Description of the line item. + """ + sold_by: NotRequired[str] + """ + The Stripe account ID of the connected account that sells the item. + """ + + +class PaymentIntentModifyParamsAmountDetailsLineItemTax(TypedDict): + total_tax_amount: int + """ + The total tax on an item. Non-negative integer. + """ + + +class PaymentIntentModifyParamsAmountDetailsShipping(TypedDict): + amount: NotRequired["Literal['']|int"] + """ + Portion of the amount that is for shipping. + """ + from_postal_code: NotRequired["Literal['']|str"] + """ + The postal code that represents the shipping source. + """ + to_postal_code: NotRequired["Literal['']|str"] + """ + The postal code that represents the shipping destination. + """ + + +class PaymentIntentModifyParamsAmountDetailsTax(TypedDict): + total_tax_amount: int + """ + Total portion of the amount that is for tax. + """ + + +class PaymentIntentModifyParamsHooks(TypedDict): + inputs: NotRequired["PaymentIntentModifyParamsHooksInputs"] + """ + Arguments passed in automations + """ + + +class PaymentIntentModifyParamsHooksInputs(TypedDict): + tax: NotRequired["PaymentIntentModifyParamsHooksInputsTax"] + """ + Tax arguments for automations + """ + + +class PaymentIntentModifyParamsHooksInputsTax(TypedDict): + calculation: Union[Literal[""], str] + """ + The [TaxCalculation](https://stripe.com/docs/api/tax/calculations) id + """ + + +class PaymentIntentModifyParamsMandateData(TypedDict): + customer_acceptance: ( + "PaymentIntentModifyParamsMandateDataCustomerAcceptance" + ) + """ + This hash contains details about the customer acceptance of the Mandate. + """ + + +class PaymentIntentModifyParamsMandateDataCustomerAcceptance(TypedDict): + online: "PaymentIntentModifyParamsMandateDataCustomerAcceptanceOnline" + """ + If this is a Mandate accepted online, this hash contains details about the online acceptance. + """ + type: Literal["online"] + """ + The type of customer acceptance information included with the Mandate. + """ + + +class PaymentIntentModifyParamsMandateDataCustomerAcceptanceOnline(TypedDict): + ip_address: NotRequired[str] + """ + The IP address from which the Mandate was accepted by the customer. + """ + user_agent: NotRequired[str] + """ + The user agent of the browser from which the Mandate was accepted by the customer. + """ + + +class PaymentIntentModifyParamsPaymentDetails(TypedDict): + car_rental: NotRequired["PaymentIntentModifyParamsPaymentDetailsCarRental"] + """ + Car rental details for this PaymentIntent. + """ + customer_reference: NotRequired["Literal['']|str"] + """ + Some customers might be required by their company or organization to provide this information. If so, provide this value. Otherwise you can ignore this field. + """ + event_details: NotRequired[ + "PaymentIntentModifyParamsPaymentDetailsEventDetails" + ] + """ + Event details for this PaymentIntent + """ + flight: NotRequired["PaymentIntentModifyParamsPaymentDetailsFlight"] + """ + Flight reservation details for this PaymentIntent + """ + lodging: NotRequired["PaymentIntentModifyParamsPaymentDetailsLodging"] + """ + Lodging reservation details for this PaymentIntent + """ + order_reference: NotRequired["Literal['']|str"] + """ + A unique value assigned by the business to identify the transaction. + """ + subscription: NotRequired[ + "PaymentIntentModifyParamsPaymentDetailsSubscription" + ] + """ + Subscription details for this PaymentIntent + """ + + +class PaymentIntentModifyParamsPaymentDetailsCarRental(TypedDict): + affiliate: NotRequired[ + "PaymentIntentModifyParamsPaymentDetailsCarRentalAffiliate" + ] + """ + Affiliate details for this purchase. + """ + booking_number: str + """ + The booking number associated with the car rental. + """ + car_class_code: NotRequired[str] + """ + Class code of the car. + """ + car_make: NotRequired[str] + """ + Make of the car. + """ + car_model: NotRequired[str] + """ + Model of the car. + """ + company: NotRequired[str] + """ + The name of the rental car company. + """ + customer_service_phone_number: NotRequired[str] + """ + The customer service phone number of the car rental company. + """ + days_rented: int + """ + Number of days the car is being rented. + """ + delivery: NotRequired[ + "PaymentIntentModifyParamsPaymentDetailsCarRentalDelivery" + ] + """ + Delivery details for this purchase. + """ + distance: NotRequired[ + "PaymentIntentModifyParamsPaymentDetailsCarRentalDistance" + ] + """ + The details of the distance traveled during the rental period. + """ + drivers: NotRequired[ + List["PaymentIntentModifyParamsPaymentDetailsCarRentalDriver"] + ] + """ + The details of the passengers in the travel reservation + """ + extra_charges: NotRequired[ + List[ + Literal[ + "extra_mileage", + "gas", + "late_return", + "one_way_service", + "parking_violation", + ] + ] + ] + """ + List of additional charges being billed. + """ + no_show: NotRequired[bool] + """ + Indicates if the customer did not keep nor cancel their booking. + """ + pickup_address: NotRequired[ + "PaymentIntentModifyParamsPaymentDetailsCarRentalPickupAddress" + ] + """ + Car pick-up address. + """ + pickup_at: int + """ + Car pick-up time. Measured in seconds since the Unix epoch. + """ + pickup_location_name: NotRequired[str] + """ + Name of the pickup location. + """ + rate_amount: NotRequired[int] + """ + Rental rate. + """ + rate_interval: NotRequired[Literal["day", "month", "week"]] + """ + The frequency at which the rate amount is applied. One of `day`, `week` or `month` + """ + renter_name: NotRequired[str] + """ + The name of the person or entity renting the car. + """ + return_address: NotRequired[ + "PaymentIntentModifyParamsPaymentDetailsCarRentalReturnAddress" + ] + """ + Car return address. + """ + return_at: int + """ + Car return time. Measured in seconds since the Unix epoch. + """ + return_location_name: NotRequired[str] + """ + Name of the return location. + """ + tax_exempt: NotRequired[bool] + """ + Indicates whether the goods or services are tax-exempt or tax is not collected. + """ + vehicle_identification_number: NotRequired[str] + """ + The vehicle identification number. + """ + + +class PaymentIntentModifyParamsPaymentDetailsCarRentalAffiliate(TypedDict): + name: str + """ + The name of the affiliate that originated the purchase. + """ + + +class PaymentIntentModifyParamsPaymentDetailsCarRentalDelivery(TypedDict): + mode: NotRequired[Literal["email", "phone", "pickup", "post"]] + """ + The delivery method for the payment + """ + recipient: NotRequired[ + "PaymentIntentModifyParamsPaymentDetailsCarRentalDeliveryRecipient" + ] + """ + Details of the recipient. + """ + + +class PaymentIntentModifyParamsPaymentDetailsCarRentalDeliveryRecipient( + TypedDict, +): + email: NotRequired[str] + """ + The email of the recipient the ticket is delivered to. + """ + name: NotRequired[str] + """ + The name of the recipient the ticket is delivered to. + """ + phone: NotRequired[str] + """ + The phone number of the recipient the ticket is delivered to. + """ + + +class PaymentIntentModifyParamsPaymentDetailsCarRentalDistance(TypedDict): + amount: NotRequired[int] + """ + Distance traveled. + """ + unit: NotRequired[Literal["kilometers", "miles"]] + """ + Unit of measurement for the distance traveled. One of `miles` or `kilometers`. + """ + + +class PaymentIntentModifyParamsPaymentDetailsCarRentalDriver(TypedDict): + driver_identification_number: NotRequired[str] + """ + Driver's identification number. + """ + driver_tax_number: NotRequired[str] + """ + Driver's tax number. + """ + name: str + """ + Full name of the person or entity on the car reservation. + """ + + +class PaymentIntentModifyParamsPaymentDetailsCarRentalPickupAddress(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. + """ + + +class PaymentIntentModifyParamsPaymentDetailsCarRentalReturnAddress(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. + """ + + +class PaymentIntentModifyParamsPaymentDetailsEventDetails(TypedDict): + access_controlled_venue: NotRequired[bool] + """ + Indicates if the tickets are digitally checked when entering the venue. + """ + address: NotRequired[ + "PaymentIntentModifyParamsPaymentDetailsEventDetailsAddress" + ] + """ + The event location's address. + """ + affiliate: NotRequired[ + "PaymentIntentModifyParamsPaymentDetailsEventDetailsAffiliate" + ] + """ + Affiliate details for this purchase. + """ + company: NotRequired[str] + """ + The name of the company + """ + delivery: NotRequired[ + "PaymentIntentModifyParamsPaymentDetailsEventDetailsDelivery" + ] + """ + Delivery details for this purchase. + """ + ends_at: NotRequired[int] + """ + Event end time. Measured in seconds since the Unix epoch. + """ + genre: NotRequired[str] + """ + Type of the event entertainment (concert, sports event etc) + """ + name: str + """ + The name of the event. + """ + starts_at: NotRequired[int] + """ + Event start time. Measured in seconds since the Unix epoch. + """ + + +class PaymentIntentModifyParamsPaymentDetailsEventDetailsAddress(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. + """ + + +class PaymentIntentModifyParamsPaymentDetailsEventDetailsAffiliate(TypedDict): + name: str + """ + The name of the affiliate that originated the purchase. + """ + + +class PaymentIntentModifyParamsPaymentDetailsEventDetailsDelivery(TypedDict): + mode: NotRequired[Literal["email", "phone", "pickup", "post"]] + """ + The delivery method for the payment + """ + recipient: NotRequired[ + "PaymentIntentModifyParamsPaymentDetailsEventDetailsDeliveryRecipient" + ] + """ + Details of the recipient. + """ + + +class PaymentIntentModifyParamsPaymentDetailsEventDetailsDeliveryRecipient( + TypedDict, +): + email: NotRequired[str] + """ + The email of the recipient the ticket is delivered to. + """ + name: NotRequired[str] + """ + The name of the recipient the ticket is delivered to. + """ + phone: NotRequired[str] + """ + The phone number of the recipient the ticket is delivered to. + """ + + +class PaymentIntentModifyParamsPaymentDetailsFlight(TypedDict): + affiliate: NotRequired[ + "PaymentIntentModifyParamsPaymentDetailsFlightAffiliate" + ] + """ + Affiliate details for this purchase. + """ + agency_number: NotRequired[str] + """ + The agency number (i.e. International Air Transport Association (IATA) agency number) of the travel agency that made the booking. + """ + carrier: NotRequired[str] + """ + The International Air Transport Association (IATA) carrier code of the carrier that issued the ticket. + """ + delivery: NotRequired[ + "PaymentIntentModifyParamsPaymentDetailsFlightDelivery" + ] + """ + Delivery details for this purchase. + """ + passenger_name: NotRequired[str] + """ + The name of the person or entity on the reservation. + """ + passengers: NotRequired[ + List["PaymentIntentModifyParamsPaymentDetailsFlightPassenger"] + ] + """ + The details of the passengers in the travel reservation. + """ + segments: List["PaymentIntentModifyParamsPaymentDetailsFlightSegment"] + """ + The individual flight segments associated with the trip. + """ + ticket_number: NotRequired[str] + """ + The ticket number associated with the travel reservation. + """ + + +class PaymentIntentModifyParamsPaymentDetailsFlightAffiliate(TypedDict): + name: str + """ + The name of the affiliate that originated the purchase. + """ + + +class PaymentIntentModifyParamsPaymentDetailsFlightDelivery(TypedDict): + mode: NotRequired[Literal["email", "phone", "pickup", "post"]] + """ + The delivery method for the payment + """ + recipient: NotRequired[ + "PaymentIntentModifyParamsPaymentDetailsFlightDeliveryRecipient" + ] + """ + Details of the recipient. + """ + + +class PaymentIntentModifyParamsPaymentDetailsFlightDeliveryRecipient( + TypedDict +): + email: NotRequired[str] + """ + The email of the recipient the ticket is delivered to. + """ + name: NotRequired[str] + """ + The name of the recipient the ticket is delivered to. + """ + phone: NotRequired[str] + """ + The phone number of the recipient the ticket is delivered to. + """ + + +class PaymentIntentModifyParamsPaymentDetailsFlightPassenger(TypedDict): + name: str + """ + Full name of the person or entity on the flight reservation. + """ + + +class PaymentIntentModifyParamsPaymentDetailsFlightSegment(TypedDict): + amount: NotRequired[int] + """ + The flight segment amount. + """ + arrival_airport: NotRequired[str] + """ + The International Air Transport Association (IATA) airport code for the arrival airport. + """ + arrives_at: NotRequired[int] + """ + The arrival time for the flight segment. Measured in seconds since the Unix epoch. + """ + carrier: NotRequired[str] + """ + The International Air Transport Association (IATA) carrier code of the carrier operating the flight segment. + """ + departs_at: int + """ + The departure time for the flight segment. Measured in seconds since the Unix epoch. + """ + departure_airport: NotRequired[str] + """ + The International Air Transport Association (IATA) airport code for the departure airport. + """ + flight_number: NotRequired[str] + """ + The flight number associated with the segment + """ + service_class: NotRequired[ + Literal["business", "economy", "first", "premium_economy"] + ] + """ + The fare class for the segment. + """ + + +class PaymentIntentModifyParamsPaymentDetailsLodging(TypedDict): + address: NotRequired[ + "PaymentIntentModifyParamsPaymentDetailsLodgingAddress" + ] + """ + The lodging location's address. + """ + adults: NotRequired[int] + """ + The number of adults on the booking + """ + affiliate: NotRequired[ + "PaymentIntentModifyParamsPaymentDetailsLodgingAffiliate" + ] + """ + Affiliate details for this purchase. + """ + booking_number: NotRequired[str] + """ + The booking number associated with the lodging reservation. + """ + category: NotRequired[Literal["hotel", "vacation_rental"]] + """ + The lodging category + """ + checkin_at: int + """ + Lodging check-in time. Measured in seconds since the Unix epoch. + """ + checkout_at: int + """ + Lodging check-out time. Measured in seconds since the Unix epoch. + """ + customer_service_phone_number: NotRequired[str] + """ + The customer service phone number of the lodging company. + """ + daily_room_rate_amount: NotRequired[int] + """ + The daily lodging room rate. + """ + delivery: NotRequired[ + "PaymentIntentModifyParamsPaymentDetailsLodgingDelivery" + ] + """ + Delivery details for this purchase. + """ + extra_charges: NotRequired[ + List[ + Literal[ + "gift_shop", + "laundry", + "mini_bar", + "other", + "restaurant", + "telephone", + ] + ] + ] + """ + List of additional charges being billed. + """ + fire_safety_act_compliance: NotRequired[bool] + """ + Indicates whether the lodging location is compliant with the Fire Safety Act. + """ + name: NotRequired[str] + """ + The name of the lodging location. + """ + no_show: NotRequired[bool] + """ + Indicates if the customer did not keep their booking while failing to cancel the reservation. + """ + number_of_rooms: NotRequired[int] + """ + The number of rooms on the booking + """ + passengers: NotRequired[ + List["PaymentIntentModifyParamsPaymentDetailsLodgingPassenger"] + ] + """ + The details of the passengers in the travel reservation + """ + property_phone_number: NotRequired[str] + """ + The phone number of the lodging location. + """ + room_class: NotRequired[str] + """ + The room class for this purchase. + """ + room_nights: NotRequired[int] + """ + The number of room nights + """ + total_room_tax_amount: NotRequired[int] + """ + The total tax amount associating with the room reservation. + """ + total_tax_amount: NotRequired[int] + """ + The total tax amount + """ + + +class PaymentIntentModifyParamsPaymentDetailsLodgingAddress(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. + """ + + +class PaymentIntentModifyParamsPaymentDetailsLodgingAffiliate(TypedDict): + name: str + """ + The name of the affiliate that originated the purchase. + """ + + +class PaymentIntentModifyParamsPaymentDetailsLodgingDelivery(TypedDict): + mode: NotRequired[Literal["email", "phone", "pickup", "post"]] + """ + The delivery method for the payment + """ + recipient: NotRequired[ + "PaymentIntentModifyParamsPaymentDetailsLodgingDeliveryRecipient" + ] + """ + Details of the recipient. + """ + + +class PaymentIntentModifyParamsPaymentDetailsLodgingDeliveryRecipient( + TypedDict, +): + email: NotRequired[str] + """ + The email of the recipient the ticket is delivered to. + """ + name: NotRequired[str] + """ + The name of the recipient the ticket is delivered to. + """ + phone: NotRequired[str] + """ + The phone number of the recipient the ticket is delivered to. + """ + + +class PaymentIntentModifyParamsPaymentDetailsLodgingPassenger(TypedDict): + name: str + """ + Full name of the person or entity on the lodging reservation. + """ + + +class PaymentIntentModifyParamsPaymentDetailsSubscription(TypedDict): + affiliate: NotRequired[ + "PaymentIntentModifyParamsPaymentDetailsSubscriptionAffiliate" + ] + """ + Affiliate details for this purchase. + """ + auto_renewal: NotRequired[bool] + """ + Info whether the subscription will be auto renewed upon expiry. + """ + billing_interval: NotRequired[ + "PaymentIntentModifyParamsPaymentDetailsSubscriptionBillingInterval" + ] + """ + Subscription billing details for this purchase. + """ + ends_at: NotRequired[int] + """ + Subscription end time. Measured in seconds since the Unix epoch. + """ + name: str + """ + Name of the product on subscription. e.g. Apple Music Subscription + """ + starts_at: NotRequired[int] + """ + Subscription start time. Measured in seconds since the Unix epoch. + """ + + +class PaymentIntentModifyParamsPaymentDetailsSubscriptionAffiliate(TypedDict): + name: str + """ + The name of the affiliate that originated the purchase. + """ + + +class PaymentIntentModifyParamsPaymentDetailsSubscriptionBillingInterval( + TypedDict, +): + count: int + """ + The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + """ + interval: Literal["day", "month", "week", "year"] + """ + Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + """ + + +class PaymentIntentModifyParamsPaymentMethodData(TypedDict): + acss_debit: NotRequired[ + "PaymentIntentModifyParamsPaymentMethodDataAcssDebit" + ] + """ + If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method. + """ + affirm: NotRequired["PaymentIntentModifyParamsPaymentMethodDataAffirm"] + """ + If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method. + """ + afterpay_clearpay: NotRequired[ + "PaymentIntentModifyParamsPaymentMethodDataAfterpayClearpay" + ] + """ + If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method. + """ + alipay: NotRequired["PaymentIntentModifyParamsPaymentMethodDataAlipay"] + """ + If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. + """ + allow_redisplay: NotRequired[Literal["always", "limited", "unspecified"]] + """ + This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`. + """ + alma: NotRequired["PaymentIntentModifyParamsPaymentMethodDataAlma"] + """ + If this is a Alma PaymentMethod, this hash contains details about the Alma payment method. + """ + amazon_pay: NotRequired[ + "PaymentIntentModifyParamsPaymentMethodDataAmazonPay" + ] + """ + If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method. + """ + au_becs_debit: NotRequired[ + "PaymentIntentModifyParamsPaymentMethodDataAuBecsDebit" + ] + """ + If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. + """ + bacs_debit: NotRequired[ + "PaymentIntentModifyParamsPaymentMethodDataBacsDebit" + ] + """ + If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account. + """ + bancontact: NotRequired[ + "PaymentIntentModifyParamsPaymentMethodDataBancontact" + ] + """ + If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method. + """ + billie: NotRequired["PaymentIntentModifyParamsPaymentMethodDataBillie"] + """ + If this is a `billie` PaymentMethod, this hash contains details about the Billie payment method. + """ + billing_details: NotRequired[ + "PaymentIntentModifyParamsPaymentMethodDataBillingDetails" + ] + """ + Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. + """ + blik: NotRequired["PaymentIntentModifyParamsPaymentMethodDataBlik"] + """ + If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method. + """ + boleto: NotRequired["PaymentIntentModifyParamsPaymentMethodDataBoleto"] + """ + If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method. + """ + cashapp: NotRequired["PaymentIntentModifyParamsPaymentMethodDataCashapp"] + """ + If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. + """ + crypto: NotRequired["PaymentIntentModifyParamsPaymentMethodDataCrypto"] + """ + If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment method. + """ + customer_balance: NotRequired[ + "PaymentIntentModifyParamsPaymentMethodDataCustomerBalance" + ] + """ + If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. + """ + eps: NotRequired["PaymentIntentModifyParamsPaymentMethodDataEps"] + """ + If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. + """ + fpx: NotRequired["PaymentIntentModifyParamsPaymentMethodDataFpx"] + """ + If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method. + """ + giropay: NotRequired["PaymentIntentModifyParamsPaymentMethodDataGiropay"] + """ + If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method. + """ + gopay: NotRequired["PaymentIntentModifyParamsPaymentMethodDataGopay"] + """ + If this is a Gopay PaymentMethod, this hash contains details about the Gopay payment method. + """ + grabpay: NotRequired["PaymentIntentModifyParamsPaymentMethodDataGrabpay"] + """ + If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method. + """ + id_bank_transfer: NotRequired[ + "PaymentIntentModifyParamsPaymentMethodDataIdBankTransfer" + ] + """ + If this is an `IdBankTransfer` PaymentMethod, this hash contains details about the IdBankTransfer payment method. + """ + ideal: NotRequired["PaymentIntentModifyParamsPaymentMethodDataIdeal"] + """ + If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. + """ + interac_present: NotRequired[ + "PaymentIntentModifyParamsPaymentMethodDataInteracPresent" + ] + """ + If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. + """ + kakao_pay: NotRequired[ + "PaymentIntentModifyParamsPaymentMethodDataKakaoPay" + ] + """ + If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method. + """ + klarna: NotRequired["PaymentIntentModifyParamsPaymentMethodDataKlarna"] + """ + If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method. + """ + konbini: NotRequired["PaymentIntentModifyParamsPaymentMethodDataKonbini"] + """ + If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. + """ + kr_card: NotRequired["PaymentIntentModifyParamsPaymentMethodDataKrCard"] + """ + If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method. + """ + link: NotRequired["PaymentIntentModifyParamsPaymentMethodDataLink"] + """ + If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. + """ + mb_way: NotRequired["PaymentIntentModifyParamsPaymentMethodDataMbWay"] + """ + If this is a MB WAY PaymentMethod, this hash contains details about the MB WAY payment method. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + mobilepay: NotRequired[ + "PaymentIntentModifyParamsPaymentMethodDataMobilepay" + ] + """ + If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method. + """ + multibanco: NotRequired[ + "PaymentIntentModifyParamsPaymentMethodDataMultibanco" + ] + """ + If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method. + """ + naver_pay: NotRequired[ + "PaymentIntentModifyParamsPaymentMethodDataNaverPay" + ] + """ + If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method. + """ + nz_bank_account: NotRequired[ + "PaymentIntentModifyParamsPaymentMethodDataNzBankAccount" + ] + """ + If this is an nz_bank_account PaymentMethod, this hash contains details about the nz_bank_account payment method. + """ + oxxo: NotRequired["PaymentIntentModifyParamsPaymentMethodDataOxxo"] + """ + If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. + """ + p24: NotRequired["PaymentIntentModifyParamsPaymentMethodDataP24"] + """ + If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. + """ + pay_by_bank: NotRequired[ + "PaymentIntentModifyParamsPaymentMethodDataPayByBank" + ] + """ + If this is a `pay_by_bank` PaymentMethod, this hash contains details about the PayByBank payment method. + """ + payco: NotRequired["PaymentIntentModifyParamsPaymentMethodDataPayco"] + """ + If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method. + """ + paynow: NotRequired["PaymentIntentModifyParamsPaymentMethodDataPaynow"] + """ + If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method. + """ + paypal: NotRequired["PaymentIntentModifyParamsPaymentMethodDataPaypal"] + """ + If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method. + """ + paypay: NotRequired["PaymentIntentModifyParamsPaymentMethodDataPaypay"] + """ + If this is a `paypay` PaymentMethod, this hash contains details about the PayPay payment method. + """ + payto: NotRequired["PaymentIntentModifyParamsPaymentMethodDataPayto"] + """ + If this is a `payto` PaymentMethod, this hash contains details about the PayTo payment method. + """ + pix: NotRequired["PaymentIntentModifyParamsPaymentMethodDataPix"] + """ + If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method. + """ + promptpay: NotRequired[ + "PaymentIntentModifyParamsPaymentMethodDataPromptpay" + ] + """ + If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method. + """ + qris: NotRequired["PaymentIntentModifyParamsPaymentMethodDataQris"] + """ + If this is a `qris` PaymentMethod, this hash contains details about the QRIS payment method. + """ + radar_options: NotRequired[ + "PaymentIntentModifyParamsPaymentMethodDataRadarOptions" + ] + """ + Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. + """ + rechnung: NotRequired["PaymentIntentModifyParamsPaymentMethodDataRechnung"] + """ + If this is a `rechnung` PaymentMethod, this hash contains details about the Rechnung payment method. + """ + revolut_pay: NotRequired[ + "PaymentIntentModifyParamsPaymentMethodDataRevolutPay" + ] + """ + If this is a `revolut_pay` PaymentMethod, this hash contains details about the Revolut Pay payment method. + """ + samsung_pay: NotRequired[ + "PaymentIntentModifyParamsPaymentMethodDataSamsungPay" + ] + """ + If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method. + """ + satispay: NotRequired["PaymentIntentModifyParamsPaymentMethodDataSatispay"] + """ + If this is a `satispay` PaymentMethod, this hash contains details about the Satispay payment method. + """ + sepa_debit: NotRequired[ + "PaymentIntentModifyParamsPaymentMethodDataSepaDebit" + ] + """ + If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. + """ + shopeepay: NotRequired[ + "PaymentIntentModifyParamsPaymentMethodDataShopeepay" + ] + """ + If this is a Shopeepay PaymentMethod, this hash contains details about the Shopeepay payment method. + """ + sofort: NotRequired["PaymentIntentModifyParamsPaymentMethodDataSofort"] + """ + If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. + """ + stripe_balance: NotRequired[ + "PaymentIntentModifyParamsPaymentMethodDataStripeBalance" + ] + """ + This hash contains details about the Stripe balance payment method. + """ + swish: NotRequired["PaymentIntentModifyParamsPaymentMethodDataSwish"] + """ + If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method. + """ + twint: NotRequired["PaymentIntentModifyParamsPaymentMethodDataTwint"] + """ + If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method. + """ + type: Literal[ + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "alma", + "amazon_pay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "billie", + "blik", + "boleto", + "cashapp", + "crypto", + "customer_balance", + "eps", + "fpx", + "giropay", + "gopay", + "grabpay", + "id_bank_transfer", + "ideal", + "kakao_pay", + "klarna", + "konbini", + "kr_card", + "link", + "mb_way", + "mobilepay", + "multibanco", + "naver_pay", + "nz_bank_account", + "oxxo", + "p24", + "pay_by_bank", + "payco", + "paynow", + "paypal", + "paypay", + "payto", + "pix", + "promptpay", + "qris", + "rechnung", + "revolut_pay", + "samsung_pay", + "satispay", + "sepa_debit", + "shopeepay", + "sofort", + "stripe_balance", + "swish", + "twint", + "us_bank_account", + "wechat_pay", + "zip", + ] + """ + The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. + """ + us_bank_account: NotRequired[ + "PaymentIntentModifyParamsPaymentMethodDataUsBankAccount" + ] + """ + If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. + """ + wechat_pay: NotRequired[ + "PaymentIntentModifyParamsPaymentMethodDataWechatPay" + ] + """ + If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method. + """ + zip: NotRequired["PaymentIntentModifyParamsPaymentMethodDataZip"] + """ + If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method. + """ + + +class PaymentIntentModifyParamsPaymentMethodDataAcssDebit(TypedDict): + account_number: str + """ + Customer's bank account number. + """ + institution_number: str + """ + Institution number of the customer's bank. + """ + transit_number: str + """ + Transit number of the customer's bank. + """ + + +class PaymentIntentModifyParamsPaymentMethodDataAffirm(TypedDict): + pass + + +class PaymentIntentModifyParamsPaymentMethodDataAfterpayClearpay(TypedDict): + pass + + +class PaymentIntentModifyParamsPaymentMethodDataAlipay(TypedDict): + pass + + +class PaymentIntentModifyParamsPaymentMethodDataAlma(TypedDict): + pass + + +class PaymentIntentModifyParamsPaymentMethodDataAmazonPay(TypedDict): + pass + + +class PaymentIntentModifyParamsPaymentMethodDataAuBecsDebit(TypedDict): + account_number: str + """ + The account number for the bank account. + """ + bsb_number: str + """ + Bank-State-Branch number of the bank account. + """ + + +class PaymentIntentModifyParamsPaymentMethodDataBacsDebit(TypedDict): + account_number: NotRequired[str] + """ + Account number of the bank account that the funds will be debited from. + """ + sort_code: NotRequired[str] + """ + Sort code of the bank account. (e.g., `10-20-30`) + """ + + +class PaymentIntentModifyParamsPaymentMethodDataBancontact(TypedDict): + pass + + +class PaymentIntentModifyParamsPaymentMethodDataBillie(TypedDict): + pass + + +class PaymentIntentModifyParamsPaymentMethodDataBillingDetails(TypedDict): + address: NotRequired[ + "Literal['']|PaymentIntentModifyParamsPaymentMethodDataBillingDetailsAddress" + ] + """ + Billing address. + """ + email: NotRequired["Literal['']|str"] + """ + Email address. + """ + name: NotRequired["Literal['']|str"] + """ + Full name. + """ + phone: NotRequired["Literal['']|str"] + """ + Billing phone number (including extension). + """ + tax_id: NotRequired[str] + """ + Taxpayer identification number. Used only for transactions between LATAM buyers and non-LATAM sellers. + """ + + +class PaymentIntentModifyParamsPaymentMethodDataBillingDetailsAddress( + 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. + """ + + +class PaymentIntentModifyParamsPaymentMethodDataBlik(TypedDict): + pass + + +class PaymentIntentModifyParamsPaymentMethodDataBoleto(TypedDict): + tax_id: str + """ + The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers) + """ + + +class PaymentIntentModifyParamsPaymentMethodDataCashapp(TypedDict): + pass + + +class PaymentIntentModifyParamsPaymentMethodDataCrypto(TypedDict): + pass + + +class PaymentIntentModifyParamsPaymentMethodDataCustomerBalance(TypedDict): + pass + + +class PaymentIntentModifyParamsPaymentMethodDataEps(TypedDict): + bank: NotRequired[ + Literal[ + "arzte_und_apotheker_bank", + "austrian_anadi_bank_ag", + "bank_austria", + "bankhaus_carl_spangler", + "bankhaus_schelhammer_und_schattera_ag", + "bawag_psk_ag", + "bks_bank_ag", + "brull_kallmus_bank_ag", + "btv_vier_lander_bank", + "capital_bank_grawe_gruppe_ag", + "deutsche_bank_ag", + "dolomitenbank", + "easybank_ag", + "erste_bank_und_sparkassen", + "hypo_alpeadriabank_international_ag", + "hypo_bank_burgenland_aktiengesellschaft", + "hypo_noe_lb_fur_niederosterreich_u_wien", + "hypo_oberosterreich_salzburg_steiermark", + "hypo_tirol_bank_ag", + "hypo_vorarlberg_bank_ag", + "marchfelder_bank", + "oberbank_ag", + "raiffeisen_bankengruppe_osterreich", + "schoellerbank_ag", + "sparda_bank_wien", + "volksbank_gruppe", + "volkskreditbank_ag", + "vr_bank_braunau", + ] + ] + """ + The customer's bank. + """ + + +class PaymentIntentModifyParamsPaymentMethodDataFpx(TypedDict): + account_holder_type: NotRequired[Literal["company", "individual"]] + """ + Account holder type for FPX transaction + """ + bank: Literal[ + "affin_bank", + "agrobank", + "alliance_bank", + "ambank", + "bank_islam", + "bank_muamalat", + "bank_of_china", + "bank_rakyat", + "bsn", + "cimb", + "deutsche_bank", + "hong_leong_bank", + "hsbc", + "kfh", + "maybank2e", + "maybank2u", + "ocbc", + "pb_enterprise", + "public_bank", + "rhb", + "standard_chartered", + "uob", + ] + """ + The customer's bank. + """ + + +class PaymentIntentModifyParamsPaymentMethodDataGiropay(TypedDict): + pass + + +class PaymentIntentModifyParamsPaymentMethodDataGopay(TypedDict): + pass + + +class PaymentIntentModifyParamsPaymentMethodDataGrabpay(TypedDict): + pass + + +class PaymentIntentModifyParamsPaymentMethodDataIdBankTransfer(TypedDict): + bank: NotRequired[Literal["bca", "bni", "bri", "cimb", "permata"]] + """ + Bank where the account is held. + """ + + +class PaymentIntentModifyParamsPaymentMethodDataIdeal(TypedDict): + bank: NotRequired[ + Literal[ + "abn_amro", + "asn_bank", + "bunq", + "buut", + "handelsbanken", + "ing", + "knab", + "moneyou", + "n26", + "nn", + "rabobank", + "regiobank", + "revolut", + "sns_bank", + "triodos_bank", + "van_lanschot", + "yoursafe", + ] + ] + """ + The customer's bank. Only use this parameter for existing customers. Don't use it for new customers. + """ + + +class PaymentIntentModifyParamsPaymentMethodDataInteracPresent(TypedDict): + pass + + +class PaymentIntentModifyParamsPaymentMethodDataKakaoPay(TypedDict): + pass + + +class PaymentIntentModifyParamsPaymentMethodDataKlarna(TypedDict): + dob: NotRequired["PaymentIntentModifyParamsPaymentMethodDataKlarnaDob"] + """ + Customer's date of birth + """ + + +class PaymentIntentModifyParamsPaymentMethodDataKlarnaDob(TypedDict): + day: int + """ + The day of birth, between 1 and 31. + """ + month: int + """ + The month of birth, between 1 and 12. + """ + year: int + """ + The four-digit year of birth. + """ + + +class PaymentIntentModifyParamsPaymentMethodDataKonbini(TypedDict): + pass + + +class PaymentIntentModifyParamsPaymentMethodDataKrCard(TypedDict): + pass + + +class PaymentIntentModifyParamsPaymentMethodDataLink(TypedDict): + pass + + +class PaymentIntentModifyParamsPaymentMethodDataMbWay(TypedDict): + pass + + +class PaymentIntentModifyParamsPaymentMethodDataMobilepay(TypedDict): + pass + + +class PaymentIntentModifyParamsPaymentMethodDataMultibanco(TypedDict): + pass + + +class PaymentIntentModifyParamsPaymentMethodDataNaverPay(TypedDict): + funding: NotRequired[Literal["card", "points"]] + """ + Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`. + """ + + +class PaymentIntentModifyParamsPaymentMethodDataNzBankAccount(TypedDict): + account_holder_name: NotRequired[str] + """ + The name on the bank account. Only required if the account holder name is different from the name of the authorized signatory collected in the PaymentMethod's billing details. + """ + account_number: str + """ + The account number for the bank account. + """ + bank_code: str + """ + The numeric code for the bank account's bank. + """ + branch_code: str + """ + The numeric code for the bank account's bank branch. + """ + reference: NotRequired[str] + suffix: str + """ + The suffix of the bank account number. + """ + + +class PaymentIntentModifyParamsPaymentMethodDataOxxo(TypedDict): + pass + + +class PaymentIntentModifyParamsPaymentMethodDataP24(TypedDict): + bank: NotRequired[ + Literal[ + "alior_bank", + "bank_millennium", + "bank_nowy_bfg_sa", + "bank_pekao_sa", + "banki_spbdzielcze", + "blik", + "bnp_paribas", + "boz", + "citi_handlowy", + "credit_agricole", + "envelobank", + "etransfer_pocztowy24", + "getin_bank", + "ideabank", + "ing", + "inteligo", + "mbank_mtransfer", + "nest_przelew", + "noble_pay", + "pbac_z_ipko", + "plus_bank", + "santander_przelew24", + "tmobile_usbugi_bankowe", + "toyota_bank", + "velobank", + "volkswagen_bank", + ] + ] + """ + The customer's bank. + """ + + +class PaymentIntentModifyParamsPaymentMethodDataPayByBank(TypedDict): + pass + + +class PaymentIntentModifyParamsPaymentMethodDataPayco(TypedDict): + pass + + +class PaymentIntentModifyParamsPaymentMethodDataPaynow(TypedDict): + pass + + +class PaymentIntentModifyParamsPaymentMethodDataPaypal(TypedDict): + pass + + +class PaymentIntentModifyParamsPaymentMethodDataPaypay(TypedDict): + pass + + +class PaymentIntentModifyParamsPaymentMethodDataPayto(TypedDict): + account_number: NotRequired[str] + """ + The account number for the bank account. + """ + bsb_number: NotRequired[str] + """ + Bank-State-Branch number of the bank account. + """ + pay_id: NotRequired[str] + """ + The PayID alias for the bank account. + """ + + +class PaymentIntentModifyParamsPaymentMethodDataPix(TypedDict): + pass + + +class PaymentIntentModifyParamsPaymentMethodDataPromptpay(TypedDict): + pass + + +class PaymentIntentModifyParamsPaymentMethodDataQris(TypedDict): + pass + + +class PaymentIntentModifyParamsPaymentMethodDataRadarOptions(TypedDict): + session: NotRequired[str] + """ + A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. + """ + + +class PaymentIntentModifyParamsPaymentMethodDataRechnung(TypedDict): + dob: "PaymentIntentModifyParamsPaymentMethodDataRechnungDob" + """ + Customer's date of birth + """ + + +class PaymentIntentModifyParamsPaymentMethodDataRechnungDob(TypedDict): + day: int + """ + The day of birth, between 1 and 31. + """ + month: int + """ + The month of birth, between 1 and 12. + """ + year: int + """ + The four-digit year of birth. + """ + + +class PaymentIntentModifyParamsPaymentMethodDataRevolutPay(TypedDict): + pass + + +class PaymentIntentModifyParamsPaymentMethodDataSamsungPay(TypedDict): + pass + + +class PaymentIntentModifyParamsPaymentMethodDataSatispay(TypedDict): + pass + + +class PaymentIntentModifyParamsPaymentMethodDataSepaDebit(TypedDict): + iban: str + """ + IBAN of the bank account. + """ + + +class PaymentIntentModifyParamsPaymentMethodDataShopeepay(TypedDict): + pass + + +class PaymentIntentModifyParamsPaymentMethodDataSofort(TypedDict): + country: Literal["AT", "BE", "DE", "ES", "IT", "NL"] + """ + Two-letter ISO code representing the country the bank account is located in. + """ + + +class PaymentIntentModifyParamsPaymentMethodDataStripeBalance(TypedDict): + account: NotRequired[str] + """ + The connected account ID whose Stripe balance to use as the source of payment + """ + source_type: NotRequired[Literal["bank_account", "card", "fpx"]] + """ + The [source_type](https://docs.stripe.com/api/balance/balance_object#balance_object-available-source_types) of the balance + """ + + +class PaymentIntentModifyParamsPaymentMethodDataSwish(TypedDict): + pass + + +class PaymentIntentModifyParamsPaymentMethodDataTwint(TypedDict): + pass + + +class PaymentIntentModifyParamsPaymentMethodDataUsBankAccount(TypedDict): + account_holder_type: NotRequired[Literal["company", "individual"]] + """ + Account holder type: individual or company. + """ + account_number: NotRequired[str] + """ + Account number of the bank account. + """ + account_type: NotRequired[Literal["checking", "savings"]] + """ + Account type: checkings or savings. Defaults to checking if omitted. + """ + financial_connections_account: NotRequired[str] + """ + The ID of a Financial Connections Account to use as a payment method. + """ + routing_number: NotRequired[str] + """ + Routing number of the bank account. + """ + + +class PaymentIntentModifyParamsPaymentMethodDataWechatPay(TypedDict): + pass + + +class PaymentIntentModifyParamsPaymentMethodDataZip(TypedDict): + pass + + +class PaymentIntentModifyParamsPaymentMethodOptions(TypedDict): + acss_debit: NotRequired[ + "Literal['']|PaymentIntentModifyParamsPaymentMethodOptionsAcssDebit" + ] + """ + If this is a `acss_debit` PaymentMethod, this sub-hash contains details about the ACSS Debit payment method options. + """ + affirm: NotRequired[ + "Literal['']|PaymentIntentModifyParamsPaymentMethodOptionsAffirm" + ] + """ + If this is an `affirm` PaymentMethod, this sub-hash contains details about the Affirm payment method options. + """ + afterpay_clearpay: NotRequired[ + "Literal['']|PaymentIntentModifyParamsPaymentMethodOptionsAfterpayClearpay" + ] + """ + If this is a `afterpay_clearpay` PaymentMethod, this sub-hash contains details about the Afterpay Clearpay payment method options. + """ + alipay: NotRequired[ + "Literal['']|PaymentIntentModifyParamsPaymentMethodOptionsAlipay" + ] + """ + If this is a `alipay` PaymentMethod, this sub-hash contains details about the Alipay payment method options. + """ + alma: NotRequired[ + "Literal['']|PaymentIntentModifyParamsPaymentMethodOptionsAlma" + ] + """ + If this is a `alma` PaymentMethod, this sub-hash contains details about the Alma payment method options. + """ + amazon_pay: NotRequired[ + "Literal['']|PaymentIntentModifyParamsPaymentMethodOptionsAmazonPay" + ] + """ + If this is a `amazon_pay` PaymentMethod, this sub-hash contains details about the Amazon Pay payment method options. + """ + au_becs_debit: NotRequired[ + "Literal['']|PaymentIntentModifyParamsPaymentMethodOptionsAuBecsDebit" + ] + """ + If this is a `au_becs_debit` PaymentMethod, this sub-hash contains details about the AU BECS Direct Debit payment method options. + """ + bacs_debit: NotRequired[ + "Literal['']|PaymentIntentModifyParamsPaymentMethodOptionsBacsDebit" + ] + """ + If this is a `bacs_debit` PaymentMethod, this sub-hash contains details about the BACS Debit payment method options. + """ + bancontact: NotRequired[ + "Literal['']|PaymentIntentModifyParamsPaymentMethodOptionsBancontact" + ] + """ + If this is a `bancontact` PaymentMethod, this sub-hash contains details about the Bancontact payment method options. + """ + billie: NotRequired[ + "Literal['']|PaymentIntentModifyParamsPaymentMethodOptionsBillie" + ] + """ + If this is a `billie` PaymentMethod, this sub-hash contains details about the Billie payment method options. + """ + blik: NotRequired[ + "Literal['']|PaymentIntentModifyParamsPaymentMethodOptionsBlik" + ] + """ + If this is a `blik` PaymentMethod, this sub-hash contains details about the BLIK payment method options. + """ + boleto: NotRequired[ + "Literal['']|PaymentIntentModifyParamsPaymentMethodOptionsBoleto" + ] + """ + If this is a `boleto` PaymentMethod, this sub-hash contains details about the Boleto payment method options. + """ + card: NotRequired[ + "Literal['']|PaymentIntentModifyParamsPaymentMethodOptionsCard" + ] + """ + Configuration for any card payments attempted on this PaymentIntent. + """ + card_present: NotRequired[ + "Literal['']|PaymentIntentModifyParamsPaymentMethodOptionsCardPresent" + ] + """ + If this is a `card_present` PaymentMethod, this sub-hash contains details about the Card Present payment method options. + """ + cashapp: NotRequired[ + "Literal['']|PaymentIntentModifyParamsPaymentMethodOptionsCashapp" + ] + """ + If this is a `cashapp` PaymentMethod, this sub-hash contains details about the Cash App Pay payment method options. + """ + crypto: NotRequired[ + "Literal['']|PaymentIntentModifyParamsPaymentMethodOptionsCrypto" + ] + """ + If this is a `crypto` PaymentMethod, this sub-hash contains details about the Crypto payment method options. + """ + customer_balance: NotRequired[ + "Literal['']|PaymentIntentModifyParamsPaymentMethodOptionsCustomerBalance" + ] + """ + If this is a `customer balance` PaymentMethod, this sub-hash contains details about the customer balance payment method options. + """ + eps: NotRequired[ + "Literal['']|PaymentIntentModifyParamsPaymentMethodOptionsEps" + ] + """ + If this is a `eps` PaymentMethod, this sub-hash contains details about the EPS payment method options. + """ + fpx: NotRequired[ + "Literal['']|PaymentIntentModifyParamsPaymentMethodOptionsFpx" + ] + """ + If this is a `fpx` PaymentMethod, this sub-hash contains details about the FPX payment method options. + """ + giropay: NotRequired[ + "Literal['']|PaymentIntentModifyParamsPaymentMethodOptionsGiropay" + ] + """ + If this is a `giropay` PaymentMethod, this sub-hash contains details about the Giropay payment method options. + """ + gopay: NotRequired[ + "Literal['']|PaymentIntentModifyParamsPaymentMethodOptionsGopay" + ] + """ + If this is a `gopay` PaymentMethod, this sub-hash contains details about the Gopay payment method options. + """ + grabpay: NotRequired[ + "Literal['']|PaymentIntentModifyParamsPaymentMethodOptionsGrabpay" + ] + """ + If this is a `grabpay` PaymentMethod, this sub-hash contains details about the Grabpay payment method options. + """ + id_bank_transfer: NotRequired[ + "Literal['']|PaymentIntentModifyParamsPaymentMethodOptionsIdBankTransfer" + ] + """ + If this is a `id_bank_transfer` PaymentMethod, this sub-hash contains details about the Indonesia Bank Transfer payment method options. + """ + ideal: NotRequired[ + "Literal['']|PaymentIntentModifyParamsPaymentMethodOptionsIdeal" + ] + """ + If this is a `ideal` PaymentMethod, this sub-hash contains details about the Ideal payment method options. + """ + interac_present: NotRequired[ + "Literal['']|PaymentIntentModifyParamsPaymentMethodOptionsInteracPresent" + ] + """ + If this is a `interac_present` PaymentMethod, this sub-hash contains details about the Card Present payment method options. + """ + kakao_pay: NotRequired[ + "Literal['']|PaymentIntentModifyParamsPaymentMethodOptionsKakaoPay" + ] + """ + If this is a `kakao_pay` PaymentMethod, this sub-hash contains details about the Kakao Pay payment method options. + """ + klarna: NotRequired[ + "Literal['']|PaymentIntentModifyParamsPaymentMethodOptionsKlarna" + ] + """ + If this is a `klarna` PaymentMethod, this sub-hash contains details about the Klarna payment method options. + """ + konbini: NotRequired[ + "Literal['']|PaymentIntentModifyParamsPaymentMethodOptionsKonbini" + ] + """ + If this is a `konbini` PaymentMethod, this sub-hash contains details about the Konbini payment method options. + """ + kr_card: NotRequired[ + "Literal['']|PaymentIntentModifyParamsPaymentMethodOptionsKrCard" + ] + """ + If this is a `kr_card` PaymentMethod, this sub-hash contains details about the KR Card payment method options. + """ + link: NotRequired[ + "Literal['']|PaymentIntentModifyParamsPaymentMethodOptionsLink" + ] + """ + If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options. + """ + mb_way: NotRequired[ + "Literal['']|PaymentIntentModifyParamsPaymentMethodOptionsMbWay" + ] + """ + If this is a `mb_way` PaymentMethod, this sub-hash contains details about the MB WAY payment method options. + """ + mobilepay: NotRequired[ + "Literal['']|PaymentIntentModifyParamsPaymentMethodOptionsMobilepay" + ] + """ + If this is a `MobilePay` PaymentMethod, this sub-hash contains details about the MobilePay payment method options. + """ + multibanco: NotRequired[ + "Literal['']|PaymentIntentModifyParamsPaymentMethodOptionsMultibanco" + ] + """ + If this is a `multibanco` PaymentMethod, this sub-hash contains details about the Multibanco payment method options. + """ + naver_pay: NotRequired[ + "Literal['']|PaymentIntentModifyParamsPaymentMethodOptionsNaverPay" + ] + """ + If this is a `naver_pay` PaymentMethod, this sub-hash contains details about the Naver Pay payment method options. + """ + nz_bank_account: NotRequired[ + "Literal['']|PaymentIntentModifyParamsPaymentMethodOptionsNzBankAccount" + ] + """ + If this is a `nz_bank_account` PaymentMethod, this sub-hash contains details about the NZ BECS Direct Debit payment method options. + """ + oxxo: NotRequired[ + "Literal['']|PaymentIntentModifyParamsPaymentMethodOptionsOxxo" + ] + """ + If this is a `oxxo` PaymentMethod, this sub-hash contains details about the OXXO payment method options. + """ + p24: NotRequired[ + "Literal['']|PaymentIntentModifyParamsPaymentMethodOptionsP24" + ] + """ + If this is a `p24` PaymentMethod, this sub-hash contains details about the Przelewy24 payment method options. + """ + pay_by_bank: NotRequired[ + "Literal['']|PaymentIntentModifyParamsPaymentMethodOptionsPayByBank" + ] + """ + If this is a `pay_by_bank` PaymentMethod, this sub-hash contains details about the PayByBank payment method options. + """ + payco: NotRequired[ + "Literal['']|PaymentIntentModifyParamsPaymentMethodOptionsPayco" + ] + """ + If this is a `payco` PaymentMethod, this sub-hash contains details about the PAYCO payment method options. + """ + paynow: NotRequired[ + "Literal['']|PaymentIntentModifyParamsPaymentMethodOptionsPaynow" + ] + """ + If this is a `paynow` PaymentMethod, this sub-hash contains details about the PayNow payment method options. + """ + paypal: NotRequired[ + "Literal['']|PaymentIntentModifyParamsPaymentMethodOptionsPaypal" + ] + """ + If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options. + """ + paypay: NotRequired[ + "Literal['']|PaymentIntentModifyParamsPaymentMethodOptionsPaypay" + ] + """ + If this is a `paypay` PaymentMethod, this sub-hash contains details about the PayPay payment method options. + """ + payto: NotRequired[ + "Literal['']|PaymentIntentModifyParamsPaymentMethodOptionsPayto" + ] + """ + If this is a `payto` PaymentMethod, this sub-hash contains details about the PayTo payment method options. + """ + pix: NotRequired[ + "Literal['']|PaymentIntentModifyParamsPaymentMethodOptionsPix" + ] + """ + If this is a `pix` PaymentMethod, this sub-hash contains details about the Pix payment method options. + """ + promptpay: NotRequired[ + "Literal['']|PaymentIntentModifyParamsPaymentMethodOptionsPromptpay" + ] + """ + If this is a `promptpay` PaymentMethod, this sub-hash contains details about the PromptPay payment method options. + """ + qris: NotRequired[ + "Literal['']|PaymentIntentModifyParamsPaymentMethodOptionsQris" + ] + """ + If this is a `qris` PaymentMethod, this sub-hash contains details about the QRIS payment method options. + """ + rechnung: NotRequired[ + "Literal['']|PaymentIntentModifyParamsPaymentMethodOptionsRechnung" + ] + """ + If this is a `rechnung` PaymentMethod, this sub-hash contains details about the Rechnung payment method options. + """ + revolut_pay: NotRequired[ + "Literal['']|PaymentIntentModifyParamsPaymentMethodOptionsRevolutPay" + ] + """ + If this is a `revolut_pay` PaymentMethod, this sub-hash contains details about the Revolut Pay payment method options. + """ + samsung_pay: NotRequired[ + "Literal['']|PaymentIntentModifyParamsPaymentMethodOptionsSamsungPay" + ] + """ + If this is a `samsung_pay` PaymentMethod, this sub-hash contains details about the Samsung Pay payment method options. + """ + satispay: NotRequired[ + "Literal['']|PaymentIntentModifyParamsPaymentMethodOptionsSatispay" + ] + """ + If this is a `satispay` PaymentMethod, this sub-hash contains details about the Satispay payment method options. + """ + sepa_debit: NotRequired[ + "Literal['']|PaymentIntentModifyParamsPaymentMethodOptionsSepaDebit" + ] + """ + If this is a `sepa_debit` PaymentIntent, this sub-hash contains details about the SEPA Debit payment method options. + """ + shopeepay: NotRequired[ + "Literal['']|PaymentIntentModifyParamsPaymentMethodOptionsShopeepay" + ] + """ + If this is a `shopeepay` PaymentMethod, this sub-hash contains details about the ShopeePay payment method options. + """ + sofort: NotRequired[ + "Literal['']|PaymentIntentModifyParamsPaymentMethodOptionsSofort" + ] + """ + If this is a `sofort` PaymentMethod, this sub-hash contains details about the SOFORT payment method options. + """ + stripe_balance: NotRequired[ + "Literal['']|PaymentIntentModifyParamsPaymentMethodOptionsStripeBalance" + ] + """ + If this is a `stripe_balance` PaymentMethod, this sub-hash contains details about the Stripe Balance payment method options. + """ + swish: NotRequired[ + "Literal['']|PaymentIntentModifyParamsPaymentMethodOptionsSwish" + ] + """ + If this is a `Swish` PaymentMethod, this sub-hash contains details about the Swish payment method options. + """ + twint: NotRequired[ + "Literal['']|PaymentIntentModifyParamsPaymentMethodOptionsTwint" + ] + """ + If this is a `twint` PaymentMethod, this sub-hash contains details about the TWINT payment method options. + """ + us_bank_account: NotRequired[ + "Literal['']|PaymentIntentModifyParamsPaymentMethodOptionsUsBankAccount" + ] + """ + If this is a `us_bank_account` PaymentMethod, this sub-hash contains details about the US bank account payment method options. + """ + wechat_pay: NotRequired[ + "Literal['']|PaymentIntentModifyParamsPaymentMethodOptionsWechatPay" + ] + """ + If this is a `wechat_pay` PaymentMethod, this sub-hash contains details about the WeChat Pay payment method options. + """ + zip: NotRequired[ + "Literal['']|PaymentIntentModifyParamsPaymentMethodOptionsZip" + ] + """ + If this is a `zip` PaymentMethod, this sub-hash contains details about the Zip payment method options. + """ + + +class PaymentIntentModifyParamsPaymentMethodOptionsAcssDebit(TypedDict): + mandate_options: NotRequired[ + "PaymentIntentModifyParamsPaymentMethodOptionsAcssDebitMandateOptions" + ] + """ + Additional fields for Mandate creation + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session', 'on_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + target_date: NotRequired[str] + """ + Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + """ + verification_method: NotRequired[ + Literal["automatic", "instant", "microdeposits"] + ] + """ + Bank account verification method. + """ + + +class PaymentIntentModifyParamsPaymentMethodOptionsAcssDebitMandateOptions( + TypedDict, +): + custom_mandate_url: NotRequired["Literal['']|str"] + """ + A URL for custom mandate text to render during confirmation step. + The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent, + or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent. + """ + interval_description: NotRequired[str] + """ + Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'. + """ + payment_schedule: NotRequired[Literal["combined", "interval", "sporadic"]] + """ + Payment schedule for the mandate. + """ + transaction_type: NotRequired[Literal["business", "personal"]] + """ + Transaction type of the mandate. + """ + + +class PaymentIntentModifyParamsPaymentMethodOptionsAffirm(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + preferred_locale: NotRequired[str] + """ + Preferred language of the Affirm authorization page that the customer is redirected to. + """ + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentModifyParamsPaymentMethodOptionsAfterpayClearpay(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + reference: NotRequired[str] + """ + An internal identifier or reference that this payment corresponds to. You must limit the identifier to 128 characters, and it can only contain letters, numbers, underscores, backslashes, and dashes. + This field differs from the statement descriptor and item name. + """ + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentModifyParamsPaymentMethodOptionsAlipay(TypedDict): + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentModifyParamsPaymentMethodOptionsAlma(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + + +class PaymentIntentModifyParamsPaymentMethodOptionsAmazonPay(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + """ + + +class PaymentIntentModifyParamsPaymentMethodOptionsAuBecsDebit(TypedDict): + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session', 'on_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + target_date: NotRequired[str] + """ + Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + """ + + +class PaymentIntentModifyParamsPaymentMethodOptionsBacsDebit(TypedDict): + mandate_options: NotRequired[ + "PaymentIntentModifyParamsPaymentMethodOptionsBacsDebitMandateOptions" + ] + """ + Additional fields for Mandate creation + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session', 'on_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + target_date: NotRequired[str] + """ + Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + """ + + +class PaymentIntentModifyParamsPaymentMethodOptionsBacsDebitMandateOptions( + TypedDict, +): + reference_prefix: NotRequired["Literal['']|str"] + """ + Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'. + """ + + +class PaymentIntentModifyParamsPaymentMethodOptionsBancontact(TypedDict): + preferred_language: NotRequired[Literal["de", "en", "fr", "nl"]] + """ + Preferred language of the Bancontact authorization page that the customer is redirected to. + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentModifyParamsPaymentMethodOptionsBillie(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + + +class PaymentIntentModifyParamsPaymentMethodOptionsBlik(TypedDict): + code: NotRequired[str] + """ + The 6-digit BLIK code that a customer has generated using their banking application. Can only be set on confirmation. + """ + setup_future_usage: NotRequired["Literal['']|Literal['none']"] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentModifyParamsPaymentMethodOptionsBoleto(TypedDict): + expires_after_days: NotRequired[int] + """ + The number of calendar days before a Boleto voucher expires. For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto invoice will expire on Wednesday at 23:59 America/Sao_Paulo time. + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session', 'on_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentModifyParamsPaymentMethodOptionsCard(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + cvc_token: NotRequired[str] + """ + A single-use `cvc_update` Token that represents a card CVC value. When provided, the CVC value will be verified during the card payment attempt. This parameter can only be provided during confirmation. + """ + installments: NotRequired[ + "PaymentIntentModifyParamsPaymentMethodOptionsCardInstallments" + ] + """ + Installment configuration for payments attempted on this PaymentIntent. + + For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments). + """ + mandate_options: NotRequired[ + "PaymentIntentModifyParamsPaymentMethodOptionsCardMandateOptions" + ] + """ + Configuration options for setting up an eMandate for cards issued in India. + """ + moto: NotRequired[bool] + """ + When specified, this parameter indicates that a transaction will be marked + as MOTO (Mail Order Telephone Order) and thus out of scope for SCA. This + parameter can only be provided during confirmation. + """ + network: NotRequired[ + Literal[ + "amex", + "cartes_bancaires", + "diners", + "discover", + "eftpos_au", + "girocard", + "interac", + "jcb", + "link", + "mastercard", + "unionpay", + "unknown", + "visa", + ] + ] + """ + Selected network to process this PaymentIntent on. Depends on the available networks of the card attached to the PaymentIntent. Can be only set confirm-time. + """ + request_decremental_authorization: NotRequired[ + Literal["if_available", "never"] + ] + """ + Request ability to [decrement the authorization](https://stripe.com/docs/payments/decremental-authorization) for this PaymentIntent. + """ + request_extended_authorization: NotRequired[ + Literal["if_available", "never"] + ] + """ + Request ability to [capture beyond the standard authorization validity window](https://stripe.com/docs/payments/extended-authorization) for this PaymentIntent. + """ + request_incremental_authorization: NotRequired[ + Literal["if_available", "never"] + ] + """ + Request ability to [increment the authorization](https://stripe.com/docs/payments/incremental-authorization) for this PaymentIntent. + """ + request_multicapture: NotRequired[Literal["if_available", "never"]] + """ + Request ability to make [multiple captures](https://stripe.com/docs/payments/multicapture) for this PaymentIntent. + """ + request_overcapture: NotRequired[Literal["if_available", "never"]] + """ + Request ability to [overcapture](https://stripe.com/docs/payments/overcapture) for this PaymentIntent. + """ + request_partial_authorization: NotRequired[ + Literal["if_available", "never"] + ] + """ + Request partial authorization on this PaymentIntent. + """ + request_three_d_secure: NotRequired[ + Literal["any", "automatic", "challenge"] + ] + """ + We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + """ + require_cvc_recollection: NotRequired[bool] + """ + When enabled, using a card that is attached to a customer will require the CVC to be provided again (i.e. using the cvc_token parameter). + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session', 'on_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + statement_descriptor_suffix_kana: NotRequired["Literal['']|str"] + """ + Provides information about a card payment that customers see on their statements. Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor that's set on the account to form the complete statement descriptor. Maximum 22 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 22 characters. + """ + statement_descriptor_suffix_kanji: NotRequired["Literal['']|str"] + """ + Provides information about a card payment that customers see on their statements. Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement descriptor that's set on the account to form the complete statement descriptor. Maximum 17 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 17 characters. + """ + statement_details: NotRequired[ + "Literal['']|PaymentIntentModifyParamsPaymentMethodOptionsCardStatementDetails" + ] + """ + Statement details for this payment intent. You can use this to override the merchant details shown on your customers' statements. + """ + three_d_secure: NotRequired[ + "PaymentIntentModifyParamsPaymentMethodOptionsCardThreeDSecure" + ] + """ + If 3D Secure authentication was performed with a third-party provider, + the authentication details to use for this payment. + """ + + +class PaymentIntentModifyParamsPaymentMethodOptionsCardInstallments(TypedDict): + enabled: NotRequired[bool] + """ + Setting to true enables installments for this PaymentIntent. + This will cause the response to contain a list of available installment plans. + Setting to false will prevent any selected plan from applying to a charge. + """ + plan: NotRequired[ + "Literal['']|PaymentIntentModifyParamsPaymentMethodOptionsCardInstallmentsPlan" + ] + """ + The selected installment plan to use for this payment attempt. + This parameter can only be provided during confirmation. + """ + + +class PaymentIntentModifyParamsPaymentMethodOptionsCardInstallmentsPlan( + TypedDict, +): + count: NotRequired[int] + """ + For `fixed_count` installment plans, this is required. It represents the number of installment payments your customer will make to their credit card. + """ + interval: NotRequired[Literal["month"]] + """ + For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card. + One of `month`. + """ + type: Literal["bonus", "fixed_count", "revolving"] + """ + Type of installment plan, one of `fixed_count`, `bonus`, or `revolving`. + """ + + +class PaymentIntentModifyParamsPaymentMethodOptionsCardMandateOptions( + TypedDict, +): + amount: int + """ + Amount to be charged for future payments. + """ + amount_type: Literal["fixed", "maximum"] + """ + One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. + """ + description: NotRequired[str] + """ + A description of the mandate or subscription that is meant to be displayed to the customer. + """ + end_date: NotRequired[int] + """ + End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. + """ + interval: Literal["day", "month", "sporadic", "week", "year"] + """ + Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`. + """ + interval_count: NotRequired[int] + """ + The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`. + """ + reference: str + """ + Unique identifier for the mandate or subscription. + """ + start_date: int + """ + Start date of the mandate or subscription. Start date should not be lesser than yesterday. + """ + supported_types: NotRequired[List[Literal["india"]]] + """ + Specifies the type of mandates supported. Possible values are `india`. + """ + + +class PaymentIntentModifyParamsPaymentMethodOptionsCardStatementDetails( + TypedDict, +): + address: NotRequired[ + "PaymentIntentModifyParamsPaymentMethodOptionsCardStatementDetailsAddress" + ] + """ + Please pass in an address that is within your Stripe user account country + """ + phone: NotRequired[str] + """ + Phone number (e.g., a toll-free number that customers can call) + """ + + +class PaymentIntentModifyParamsPaymentMethodOptionsCardStatementDetailsAddress( + 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. + """ + + +class PaymentIntentModifyParamsPaymentMethodOptionsCardThreeDSecure(TypedDict): + ares_trans_status: NotRequired[Literal["A", "C", "I", "N", "R", "U", "Y"]] + """ + The `transStatus` returned from the card Issuer's ACS in the ARes. + """ + cryptogram: str + """ + The cryptogram, also known as the "authentication value" (AAV, CAVV or + AEVV). This value is 20 bytes, base64-encoded into a 28-character string. + (Most 3D Secure providers will return the base64-encoded version, which + is what you should specify here.) + """ + electronic_commerce_indicator: NotRequired[ + Literal["01", "02", "05", "06", "07"] + ] + """ + The Electronic Commerce Indicator (ECI) is returned by your 3D Secure + provider and indicates what degree of authentication was performed. + """ + exemption_indicator: NotRequired[Literal["low_risk", "none"]] + """ + The exemption requested via 3DS and accepted by the issuer at authentication time. + """ + network_options: NotRequired[ + "PaymentIntentModifyParamsPaymentMethodOptionsCardThreeDSecureNetworkOptions" + ] + """ + Network specific 3DS fields. Network specific arguments require an + explicit card brand choice. The parameter `payment_method_options.card.network`` + must be populated accordingly + """ + requestor_challenge_indicator: NotRequired[str] + """ + The challenge indicator (`threeDSRequestorChallengeInd`) which was requested in the + AReq sent to the card Issuer's ACS. A string containing 2 digits from 01-99. + """ + transaction_id: str + """ + For 3D Secure 1, the XID. For 3D Secure 2, the Directory Server + Transaction ID (dsTransID). + """ + version: Literal["1.0.2", "2.1.0", "2.2.0"] + """ + The version of 3D Secure that was performed. + """ + + +class PaymentIntentModifyParamsPaymentMethodOptionsCardThreeDSecureNetworkOptions( + TypedDict, +): + cartes_bancaires: NotRequired[ + "PaymentIntentModifyParamsPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancaires" + ] + """ + Cartes Bancaires-specific 3DS fields. + """ + + +class PaymentIntentModifyParamsPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancaires( + TypedDict, +): + cb_avalgo: Literal["0", "1", "2", "3", "4", "A"] + """ + The cryptogram calculation algorithm used by the card Issuer's ACS + to calculate the Authentication cryptogram. Also known as `cavvAlgorithm`. + messageExtension: CB-AVALGO + """ + cb_exemption: NotRequired[str] + """ + The exemption indicator returned from Cartes Bancaires in the ARes. + message extension: CB-EXEMPTION; string (4 characters) + This is a 3 byte bitmap (low significant byte first and most significant + bit first) that has been Base64 encoded + """ + cb_score: NotRequired[int] + """ + The risk score returned from Cartes Bancaires in the ARes. + message extension: CB-SCORE; numeric value 0-99 + """ + + +class PaymentIntentModifyParamsPaymentMethodOptionsCardPresent(TypedDict): + request_extended_authorization: NotRequired[bool] + """ + Request ability to capture this payment beyond the standard [authorization validity window](https://stripe.com/docs/terminal/features/extended-authorizations#authorization-validity) + """ + request_incremental_authorization_support: NotRequired[bool] + """ + Request ability to [increment](https://stripe.com/docs/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://stripe.com/docs/api/payment_intents/confirm) response to verify support. + """ + routing: NotRequired[ + "PaymentIntentModifyParamsPaymentMethodOptionsCardPresentRouting" + ] + """ + Network routing priority on co-branded EMV cards supporting domestic debit and international card schemes. + """ + + +class PaymentIntentModifyParamsPaymentMethodOptionsCardPresentRouting( + TypedDict, +): + requested_priority: NotRequired[Literal["domestic", "international"]] + """ + Routing requested priority + """ + + +class PaymentIntentModifyParamsPaymentMethodOptionsCashapp(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session', 'on_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentModifyParamsPaymentMethodOptionsCrypto(TypedDict): + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentModifyParamsPaymentMethodOptionsCustomerBalance(TypedDict): + bank_transfer: NotRequired[ + "PaymentIntentModifyParamsPaymentMethodOptionsCustomerBalanceBankTransfer" + ] + """ + Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. + """ + funding_type: NotRequired[Literal["bank_transfer"]] + """ + The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. + """ + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentModifyParamsPaymentMethodOptionsCustomerBalanceBankTransfer( + TypedDict, +): + eu_bank_transfer: NotRequired[ + "PaymentIntentModifyParamsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer" + ] + """ + Configuration for the eu_bank_transfer funding type. + """ + requested_address_types: NotRequired[ + List[ + Literal[ + "aba", "iban", "sepa", "sort_code", "spei", "swift", "zengin" + ] + ] + ] + """ + List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned. + + Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`. + """ + type: Literal[ + "eu_bank_transfer", + "gb_bank_transfer", + "jp_bank_transfer", + "mx_bank_transfer", + "us_bank_transfer", + ] + """ + The list of bank transfer types that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. + """ + + +class PaymentIntentModifyParamsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer( + TypedDict, +): + country: str + """ + The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. + """ + + +class PaymentIntentModifyParamsPaymentMethodOptionsEps(TypedDict): + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentModifyParamsPaymentMethodOptionsFpx(TypedDict): + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentModifyParamsPaymentMethodOptionsGiropay(TypedDict): + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentModifyParamsPaymentMethodOptionsGopay(TypedDict): + setup_future_usage: NotRequired[Literal["none", "off_session"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentModifyParamsPaymentMethodOptionsGrabpay(TypedDict): + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentModifyParamsPaymentMethodOptionsIdBankTransfer(TypedDict): + expires_after: NotRequired[int] + """ + The UNIX timestamp until which the virtual bank account is valid. Permitted range is from 5 minutes from now until 31 days from now. If unset, it defaults to 3 days from now. + """ + expires_at: NotRequired[int] + """ + The UNIX timestamp until which the virtual bank account is valid. Permitted range is from now until 30 days from now. If unset, it defaults to 1 days from now. + """ + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentModifyParamsPaymentMethodOptionsIdeal(TypedDict): + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentModifyParamsPaymentMethodOptionsInteracPresent(TypedDict): + pass + + +class PaymentIntentModifyParamsPaymentMethodOptionsKakaoPay(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + """ + + +class PaymentIntentModifyParamsPaymentMethodOptionsKlarna(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + on_demand: NotRequired[ + "PaymentIntentModifyParamsPaymentMethodOptionsKlarnaOnDemand" + ] + """ + On-demand details if setting up or charging an on-demand payment. + """ + preferred_locale: NotRequired[ + Literal[ + "cs-CZ", + "da-DK", + "de-AT", + "de-CH", + "de-DE", + "el-GR", + "en-AT", + "en-AU", + "en-BE", + "en-CA", + "en-CH", + "en-CZ", + "en-DE", + "en-DK", + "en-ES", + "en-FI", + "en-FR", + "en-GB", + "en-GR", + "en-IE", + "en-IT", + "en-NL", + "en-NO", + "en-NZ", + "en-PL", + "en-PT", + "en-RO", + "en-SE", + "en-US", + "es-ES", + "es-US", + "fi-FI", + "fr-BE", + "fr-CA", + "fr-CH", + "fr-FR", + "it-CH", + "it-IT", + "nb-NO", + "nl-BE", + "nl-NL", + "pl-PL", + "pt-PT", + "ro-RO", + "sv-FI", + "sv-SE", + ] + ] + """ + Preferred language of the Klarna authorization page that the customer is redirected to + """ + setup_future_usage: NotRequired[ + Literal["none", "off_session", "on_session"] + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + subscriptions: NotRequired[ + "Literal['']|List[PaymentIntentModifyParamsPaymentMethodOptionsKlarnaSubscription]" + ] + """ + Subscription details if setting up or charging a subscription. + """ + + +class PaymentIntentModifyParamsPaymentMethodOptionsKlarnaOnDemand(TypedDict): + average_amount: NotRequired[int] + """ + Your average amount value. You can use a value across your customer base, or segment based on customer type, country, etc. + """ + maximum_amount: NotRequired[int] + """ + The maximum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. + """ + minimum_amount: NotRequired[int] + """ + The lowest or minimum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. + """ + purchase_interval: NotRequired[Literal["day", "month", "week", "year"]] + """ + Interval at which the customer is making purchases + """ + purchase_interval_count: NotRequired[int] + """ + The number of `purchase_interval` between charges + """ + + +class PaymentIntentModifyParamsPaymentMethodOptionsKlarnaSubscription( + TypedDict, +): + interval: Literal["day", "month", "week", "year"] + """ + Unit of time between subscription charges. + """ + interval_count: NotRequired[int] + """ + The number of intervals (specified in the `interval` attribute) between subscription charges. For example, `interval=month` and `interval_count=3` charges every 3 months. + """ + name: NotRequired[str] + """ + Name for subscription. + """ + next_billing: NotRequired[ + "PaymentIntentModifyParamsPaymentMethodOptionsKlarnaSubscriptionNextBilling" + ] + """ + Describes the upcoming charge for this subscription. + """ + reference: str + """ + A non-customer-facing reference to correlate subscription charges in the Klarna app. Use a value that persists across subscription charges. + """ + + +class PaymentIntentModifyParamsPaymentMethodOptionsKlarnaSubscriptionNextBilling( + TypedDict, +): + amount: int + """ + The amount of the next charge for the subscription. + """ + date: str + """ + The date of the next charge for the subscription in YYYY-MM-DD format. + """ + + +class PaymentIntentModifyParamsPaymentMethodOptionsKonbini(TypedDict): + confirmation_number: NotRequired["Literal['']|str"] + """ + An optional 10 to 11 digit numeric-only string determining the confirmation code at applicable convenience stores. Must not consist of only zeroes and could be rejected in case of insufficient uniqueness. We recommend to use the customer's phone number. + """ + expires_after_days: NotRequired["Literal['']|int"] + """ + The number of calendar days (between 1 and 60) after which Konbini payment instructions will expire. For example, if a PaymentIntent is confirmed with Konbini and `expires_after_days` set to 2 on Monday JST, the instructions will expire on Wednesday 23:59:59 JST. Defaults to 3 days. + """ + expires_at: NotRequired["Literal['']|int"] + """ + The timestamp at which the Konbini payment instructions will expire. Only one of `expires_after_days` or `expires_at` may be set. + """ + product_description: NotRequired["Literal['']|str"] + """ + A product descriptor of up to 22 characters, which will appear to customers at the convenience store. + """ + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentModifyParamsPaymentMethodOptionsKrCard(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + """ + + +class PaymentIntentModifyParamsPaymentMethodOptionsLink(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + persistent_token: NotRequired[str] + """ + [Deprecated] This is a legacy parameter that no longer has any function. + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentModifyParamsPaymentMethodOptionsMbWay(TypedDict): + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentModifyParamsPaymentMethodOptionsMobilepay(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentModifyParamsPaymentMethodOptionsMultibanco(TypedDict): + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentModifyParamsPaymentMethodOptionsNaverPay(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + """ + + +class PaymentIntentModifyParamsPaymentMethodOptionsNzBankAccount(TypedDict): + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session', 'on_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + target_date: NotRequired[str] + """ + Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + """ + + +class PaymentIntentModifyParamsPaymentMethodOptionsOxxo(TypedDict): + expires_after_days: NotRequired[int] + """ + The number of calendar days before an OXXO voucher expires. For example, if you create an OXXO voucher on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time. + """ + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentModifyParamsPaymentMethodOptionsP24(TypedDict): + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + tos_shown_and_accepted: NotRequired[bool] + """ + Confirm that the payer has accepted the P24 terms and conditions. + """ + + +class PaymentIntentModifyParamsPaymentMethodOptionsPayByBank(TypedDict): + pass + + +class PaymentIntentModifyParamsPaymentMethodOptionsPayco(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + + +class PaymentIntentModifyParamsPaymentMethodOptionsPaynow(TypedDict): + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentModifyParamsPaymentMethodOptionsPaypal(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds will be captured from the customer's account. + """ + line_items: NotRequired[ + List["PaymentIntentModifyParamsPaymentMethodOptionsPaypalLineItem"] + ] + """ + The line items purchased by the customer. + """ + preferred_locale: NotRequired[ + Literal[ + "cs-CZ", + "da-DK", + "de-AT", + "de-DE", + "de-LU", + "el-GR", + "en-GB", + "en-US", + "es-ES", + "fi-FI", + "fr-BE", + "fr-FR", + "fr-LU", + "hu-HU", + "it-IT", + "nl-BE", + "nl-NL", + "pl-PL", + "pt-PT", + "sk-SK", + "sv-SE", + ] + ] + """ + [Preferred locale](https://stripe.com/docs/payments/paypal/supported-locales) of the PayPal checkout page that the customer is redirected to. + """ + reference: NotRequired[str] + """ + A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. + """ + reference_id: NotRequired[str] + """ + A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. + """ + risk_correlation_id: NotRequired[str] + """ + The risk correlation ID for an on-session payment using a saved PayPal payment method. + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + subsellers: NotRequired[List[str]] + """ + The Stripe connected account IDs of the sellers on the platform for this transaction (optional). Only allowed when [separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) are used. + """ + + +class PaymentIntentModifyParamsPaymentMethodOptionsPaypalLineItem(TypedDict): + category: NotRequired[ + Literal["digital_goods", "donation", "physical_goods"] + ] + """ + Type of the line item. + """ + description: NotRequired[str] + """ + Description of the line item. + """ + name: str + """ + Descriptive name of the line item. + """ + quantity: int + """ + Quantity of the line item. Must be a positive number. + """ + sku: NotRequired[str] + """ + Client facing stock keeping unit, article number or similar. + """ + sold_by: NotRequired[str] + """ + The Stripe account ID of the connected account that sells the item. + """ + tax: NotRequired[ + "PaymentIntentModifyParamsPaymentMethodOptionsPaypalLineItemTax" + ] + """ + The tax information for the line item. + """ + unit_amount: int + """ + Price for a single unit of the line item in minor units. Cannot be a negative number. + """ + + +class PaymentIntentModifyParamsPaymentMethodOptionsPaypalLineItemTax( + TypedDict +): + amount: int + """ + The tax for a single unit of the line item in minor units. Cannot be a negative number. + """ + behavior: Literal["exclusive", "inclusive"] + """ + The tax behavior for the line item. + """ + + +class PaymentIntentModifyParamsPaymentMethodOptionsPaypay(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + + +class PaymentIntentModifyParamsPaymentMethodOptionsPayto(TypedDict): + mandate_options: NotRequired[ + "PaymentIntentModifyParamsPaymentMethodOptionsPaytoMandateOptions" + ] + """ + Additional fields for Mandate creation. Only `purpose` field is configurable for PayTo PaymentIntent with `setup_future_usage=none`. Other fields are only applicable to PayTo PaymentIntent with `setup_future_usage=off_session` + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentModifyParamsPaymentMethodOptionsPaytoMandateOptions( + TypedDict, +): + amount: NotRequired[int] + """ + Amount that will be collected. It is required when `amount_type` is `fixed`. + """ + amount_type: NotRequired[Literal["fixed", "maximum"]] + """ + The type of amount that will be collected. The amount charged must be exact or up to the value of `amount` param for `fixed` or `maximum` type respectively. + """ + end_date: NotRequired[str] + """ + Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no end date. + """ + payment_schedule: NotRequired[ + Literal[ + "adhoc", + "annual", + "daily", + "fortnightly", + "monthly", + "quarterly", + "semi_annual", + "weekly", + ] + ] + """ + The periodicity at which payments will be collected. + """ + payments_per_period: NotRequired[int] + """ + The number of payments that will be made during a payment period. Defaults to 1 except for when `payment_schedule` is `adhoc`. In that case, it defaults to no limit. + """ + purpose: NotRequired[ + Literal[ + "dependant_support", + "government", + "loan", + "mortgage", + "other", + "pension", + "personal", + "retail", + "salary", + "tax", + "utility", + ] + ] + """ + The purpose for which payments are made. Defaults to retail. + """ + + +class PaymentIntentModifyParamsPaymentMethodOptionsPix(TypedDict): + amount_includes_iof: NotRequired[Literal["always", "never"]] + """ + Determines if the amount includes the IOF tax. Defaults to `never`. + """ + expires_after_seconds: NotRequired[int] + """ + The number of seconds (between 10 and 1209600) after which Pix payment will expire. Defaults to 86400 seconds. + """ + expires_at: NotRequired[int] + """ + The timestamp at which the Pix expires (between 10 and 1209600 seconds in the future). Defaults to 1 day in the future. + """ + mandate_options: NotRequired[ + "PaymentIntentModifyParamsPaymentMethodOptionsPixMandateOptions" + ] + """ + Additional fields for mandate creation. Only applicable when `setup_future_usage=off_session`. + """ + setup_future_usage: NotRequired[Literal["none", "off_session"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentModifyParamsPaymentMethodOptionsPixMandateOptions( + TypedDict +): + amount: NotRequired[int] + """ + Amount to be charged for future payments. Required when `amount_type=fixed`. If not provided for `amount_type=maximum`, defaults to 40000. + """ + amount_includes_iof: NotRequired[Literal["always", "never"]] + """ + Determines if the amount includes the IOF tax. Defaults to `never`. + """ + amount_type: NotRequired[Literal["fixed", "maximum"]] + """ + Type of amount. Defaults to `maximum`. + """ + currency: NotRequired[str] + """ + Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Only `brl` is supported currently. + """ + end_date: NotRequired[str] + """ + Date when the mandate expires and no further payments will be charged, in `YYYY-MM-DD`. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. + """ + payment_schedule: NotRequired[ + Literal["halfyearly", "monthly", "quarterly", "weekly", "yearly"] + ] + """ + Schedule at which the future payments will be charged. Defaults to `weekly`. + """ + reference: NotRequired[str] + """ + Subscription name displayed to buyers in their bank app. Defaults to the displayable business name. + """ + start_date: NotRequired[str] + """ + Start date of the mandate, in `YYYY-MM-DD`. Start date should be at least 3 days in the future. Defaults to 3 days after the current date. + """ + + +class PaymentIntentModifyParamsPaymentMethodOptionsPromptpay(TypedDict): + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentModifyParamsPaymentMethodOptionsQris(TypedDict): + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentModifyParamsPaymentMethodOptionsRechnung(TypedDict): + pass + + +class PaymentIntentModifyParamsPaymentMethodOptionsRevolutPay(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + """ + + +class PaymentIntentModifyParamsPaymentMethodOptionsSamsungPay(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + + +class PaymentIntentModifyParamsPaymentMethodOptionsSatispay(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + + +class PaymentIntentModifyParamsPaymentMethodOptionsSepaDebit(TypedDict): + mandate_options: NotRequired[ + "PaymentIntentModifyParamsPaymentMethodOptionsSepaDebitMandateOptions" + ] + """ + Additional fields for Mandate creation + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session', 'on_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + target_date: NotRequired[str] + """ + Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + """ + + +class PaymentIntentModifyParamsPaymentMethodOptionsSepaDebitMandateOptions( + TypedDict, +): + reference_prefix: NotRequired["Literal['']|str"] + """ + Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'. + """ + + +class PaymentIntentModifyParamsPaymentMethodOptionsShopeepay(TypedDict): + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentModifyParamsPaymentMethodOptionsSofort(TypedDict): + preferred_language: NotRequired[ + "Literal['']|Literal['de', 'en', 'es', 'fr', 'it', 'nl', 'pl']" + ] + """ + Language shown to the payer on redirect. + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentModifyParamsPaymentMethodOptionsStripeBalance(TypedDict): + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentModifyParamsPaymentMethodOptionsSwish(TypedDict): + reference: NotRequired["Literal['']|str"] + """ + A reference for this payment to be displayed in the Swish app. + """ + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentModifyParamsPaymentMethodOptionsTwint(TypedDict): + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentModifyParamsPaymentMethodOptionsUsBankAccount(TypedDict): + financial_connections: NotRequired[ + "PaymentIntentModifyParamsPaymentMethodOptionsUsBankAccountFinancialConnections" + ] + """ + Additional fields for Financial Connections Session creation + """ + mandate_options: NotRequired[ + "PaymentIntentModifyParamsPaymentMethodOptionsUsBankAccountMandateOptions" + ] + """ + Additional fields for Mandate creation + """ + networks: NotRequired[ + "PaymentIntentModifyParamsPaymentMethodOptionsUsBankAccountNetworks" + ] + """ + Additional fields for network related functions + """ + preferred_settlement_speed: NotRequired[ + "Literal['']|Literal['fastest', 'standard']" + ] + """ + Preferred transaction settlement speed + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session', 'on_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + target_date: NotRequired[str] + """ + Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + """ + verification_method: NotRequired[ + Literal["automatic", "instant", "microdeposits"] + ] + """ + Bank account verification method. + """ + + +class PaymentIntentModifyParamsPaymentMethodOptionsUsBankAccountFinancialConnections( + TypedDict, +): + filters: NotRequired[ + "PaymentIntentModifyParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters" + ] + """ + Provide filters for the linked accounts that the customer can select for the payment method. + """ + manual_entry: NotRequired[ + "PaymentIntentModifyParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsManualEntry" + ] + """ + Customize manual entry behavior + """ + permissions: NotRequired[ + List[ + Literal["balances", "ownership", "payment_method", "transactions"] + ] + ] + """ + The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. + """ + prefetch: NotRequired[ + List[ + Literal[ + "balances", "inferred_balances", "ownership", "transactions" + ] + ] + ] + """ + List of data features that you would like to retrieve upon account creation. + """ + return_url: NotRequired[str] + """ + For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. + """ + + +class PaymentIntentModifyParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters( + TypedDict, +): + account_subcategories: NotRequired[List[Literal["checking", "savings"]]] + """ + The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`. + """ + institution: NotRequired[str] + """ + ID of the institution to use to filter for selectable accounts. + """ + + +class PaymentIntentModifyParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsManualEntry( + TypedDict, +): + mode: Literal["automatic", "custom"] + """ + Settings for configuring manual entry of account details. + """ + + +class PaymentIntentModifyParamsPaymentMethodOptionsUsBankAccountMandateOptions( + TypedDict, +): + collection_method: NotRequired["Literal['']|Literal['paper']"] + """ + The method used to collect offline mandate customer acceptance. + """ + + +class PaymentIntentModifyParamsPaymentMethodOptionsUsBankAccountNetworks( + TypedDict, +): + requested: NotRequired[List[Literal["ach", "us_domestic_wire"]]] + """ + Triggers validations to run across the selected networks + """ + + +class PaymentIntentModifyParamsPaymentMethodOptionsWechatPay(TypedDict): + app_id: NotRequired[str] + """ + The app ID registered with WeChat Pay. Only required when client is ios or android. + """ + client: NotRequired[Literal["android", "ios", "web"]] + """ + The client type that the end customer will pay from + """ + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentModifyParamsPaymentMethodOptionsZip(TypedDict): + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentModifyParamsShipping(TypedDict): + address: "PaymentIntentModifyParamsShippingAddress" + """ + Shipping address. + """ + carrier: NotRequired[str] + """ + The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. + """ + name: str + """ + Recipient name. + """ + phone: NotRequired[str] + """ + Recipient phone (including extension). + """ + tracking_number: NotRequired[str] + """ + The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. + """ + + +class PaymentIntentModifyParamsShippingAddress(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. + """ + + +class PaymentIntentModifyParamsTransferData(TypedDict): + amount: NotRequired[int] + """ + The amount that will be transferred automatically when a charge succeeds. + """ diff --git a/stripe/params/_payment_intent_retrieve_params.py b/stripe/params/_payment_intent_retrieve_params.py new file mode 100644 index 000000000..ab9d23dd0 --- /dev/null +++ b/stripe/params/_payment_intent_retrieve_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 PaymentIntentRetrieveParams(RequestOptions): + client_secret: NotRequired[str] + """ + The client secret of the PaymentIntent. We require it if you use a publishable key to retrieve the source. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_payment_intent_search_params.py b/stripe/params/_payment_intent_search_params.py new file mode 100644 index 000000000..53c3cc376 --- /dev/null +++ b/stripe/params/_payment_intent_search_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 PaymentIntentSearchParams(RequestOptions): + 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. + """ + page: NotRequired[str] + """ + A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + """ + query: str + """ + The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for payment intents](https://stripe.com/docs/search#query-fields-for-payment-intents). + """ diff --git a/stripe/params/_payment_intent_trigger_action_params.py b/stripe/params/_payment_intent_trigger_action_params.py new file mode 100644 index 000000000..0ed2bd9af --- /dev/null +++ b/stripe/params/_payment_intent_trigger_action_params.py @@ -0,0 +1,27 @@ +# -*- 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, TypedDict + + +class PaymentIntentTriggerActionParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + scan_qr_code: NotRequired["PaymentIntentTriggerActionParamsScanQrCode"] + """ + True to simulate success, false to simulate failure. + """ + type: Literal["expire", "fund"] + """ + The type of action to be simulated. + """ + + +class PaymentIntentTriggerActionParamsScanQrCode(TypedDict): + result: NotRequired[Literal["failure", "success"]] + """ + Whether the QR Code scan's payment should succeed or fail. + """ diff --git a/stripe/params/_payment_intent_update_params.py b/stripe/params/_payment_intent_update_params.py new file mode 100644 index 000000000..2377db034 --- /dev/null +++ b/stripe/params/_payment_intent_update_params.py @@ -0,0 +1,4369 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import Dict, List, Union +from typing_extensions import Literal, NotRequired, TypedDict + + +class PaymentIntentUpdateParams(TypedDict): + amount: NotRequired[int] + """ + Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). + """ + amount_details: NotRequired[ + "Literal['']|PaymentIntentUpdateParamsAmountDetails" + ] + """ + Provides industry-specific information about the amount. + """ + application_fee_amount: NotRequired["Literal['']|int"] + """ + The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total amount captured. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + """ + capture_method: NotRequired[ + Literal["automatic", "automatic_async", "manual"] + ] + """ + Controls when the funds will be captured from the customer's account. + """ + currency: NotRequired[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). + """ + customer: NotRequired[str] + """ + ID of the Customer this PaymentIntent belongs to, if one exists. + + Payment methods attached to other Customers cannot be used with this PaymentIntent. + + If [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) is set and this PaymentIntent's payment method is not `card_present`, then the payment method attaches to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + """ + customer_account: NotRequired[str] + """ + ID of the Account this PaymentIntent belongs to, if one exists. + + Payment methods attached to other Accounts cannot be used with this PaymentIntent. + + If [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) is set and this PaymentIntent's payment method is not `card_present`, then the payment method attaches to the Account after the PaymentIntent has been confirmed and any required actions from the user are complete. If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Account instead. + """ + description: NotRequired[str] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ + excluded_payment_method_types: NotRequired[ + "Literal['']|List[Literal['acss_debit', 'affirm', 'afterpay_clearpay', 'alipay', 'alma', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'billie', 'blik', 'boleto', 'card', 'cashapp', 'crypto', 'customer_balance', 'eps', 'fpx', 'giropay', 'gopay', 'grabpay', 'id_bank_transfer', 'ideal', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'mb_way', 'mobilepay', 'multibanco', 'naver_pay', 'nz_bank_account', 'oxxo', 'p24', 'pay_by_bank', 'payco', 'paynow', 'paypal', 'paypay', 'payto', 'pix', 'promptpay', 'qris', 'rechnung', 'revolut_pay', 'samsung_pay', 'satispay', 'sepa_debit', 'shopeepay', 'sofort', 'stripe_balance', 'swish', 'twint', 'us_bank_account', 'wechat_pay', 'zip']]" + ] + """ + The list of payment method types to exclude from use with this payment. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + fx_quote: NotRequired[str] + """ + The FX rate in the quote is validated and used to convert the presentment amount to the settlement amount. + """ + hooks: NotRequired["PaymentIntentUpdateParamsHooks"] + """ + Automations to be run during the PaymentIntent lifecycle + """ + mandate_data: NotRequired["PaymentIntentUpdateParamsMandateData"] + """ + This hash contains details about the Mandate to create. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + payment_details: NotRequired[ + "Literal['']|PaymentIntentUpdateParamsPaymentDetails" + ] + """ + Provides industry-specific information about the charge. + """ + payment_method: NotRequired[str] + payment_method_configuration: NotRequired[str] + """ + The ID of the [payment method configuration](https://stripe.com/docs/api/payment_method_configurations) to use with this PaymentIntent. + """ + payment_method_data: NotRequired[ + "PaymentIntentUpdateParamsPaymentMethodData" + ] + """ + If provided, this hash will be used to create a PaymentMethod. The new PaymentMethod will appear + in the [payment_method](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-payment_method) + property on the PaymentIntent. + """ + payment_method_options: NotRequired[ + "PaymentIntentUpdateParamsPaymentMethodOptions" + ] + """ + Payment-method-specific configuration for this PaymentIntent. + """ + payment_method_types: NotRequired[List[str]] + """ + The list of payment method types (for example, card) that this PaymentIntent can use. Use `automatic_payment_methods` to manage payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). A list of valid payment method types can be found [here](https://docs.stripe.com/api/payment_methods/object#payment_method_object-type). + """ + receipt_email: NotRequired["Literal['']|str"] + """ + Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['off_session', 'on_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + shipping: NotRequired["Literal['']|PaymentIntentUpdateParamsShipping"] + """ + Shipping information for this PaymentIntent. + """ + statement_descriptor: NotRequired[str] + """ + Text that appears on the customer's statement as the statement descriptor for a non-card charge. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see [the Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors). + + Setting this value for a card charge returns an error. For card charges, set the [statement_descriptor_suffix](https://docs.stripe.com/get-started/account/statement-descriptors#dynamic) instead. + """ + statement_descriptor_suffix: NotRequired[str] + """ + Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. + """ + transfer_data: NotRequired["PaymentIntentUpdateParamsTransferData"] + """ + Use this parameter to automatically create a Transfer when the payment succeeds. Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + """ + transfer_group: NotRequired[str] + """ + A string that identifies the resulting payment as part of a group. You can only provide `transfer_group` if it hasn't been set. Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + """ + + +class PaymentIntentUpdateParamsAmountDetails(TypedDict): + discount_amount: NotRequired["Literal['']|int"] + """ + The total discount applied on the transaction. + """ + line_items: NotRequired[ + "Literal['']|List[PaymentIntentUpdateParamsAmountDetailsLineItem]" + ] + """ + A list of line items, each containing information about a product in the PaymentIntent. There is a maximum of 100 line items. + """ + shipping: NotRequired[ + "Literal['']|PaymentIntentUpdateParamsAmountDetailsShipping" + ] + """ + Contains information about the shipping portion of the amount. + """ + tax: NotRequired["Literal['']|PaymentIntentUpdateParamsAmountDetailsTax"] + """ + Contains information about the tax portion of the amount. + """ + + +class PaymentIntentUpdateParamsAmountDetailsLineItem(TypedDict): + discount_amount: NotRequired[int] + """ + The amount an item was discounted for. Positive integer. + """ + payment_method_options: NotRequired[ + "PaymentIntentUpdateParamsAmountDetailsLineItemPaymentMethodOptions" + ] + """ + Payment method-specific information for line items. + """ + product_code: NotRequired[str] + """ + Unique identifier of the product. At most 12 characters long. + """ + product_name: str + """ + Name of the product. At most 100 characters long. + """ + quantity: int + """ + Number of items of the product. Positive integer. + """ + tax: NotRequired["PaymentIntentUpdateParamsAmountDetailsLineItemTax"] + """ + Contains information about the tax on the item. + """ + unit_cost: int + """ + Cost of the product. Non-negative integer. + """ + unit_of_measure: NotRequired[str] + """ + A unit of measure for the line item, such as gallons, feet, meters, etc. + """ + + +class PaymentIntentUpdateParamsAmountDetailsLineItemPaymentMethodOptions( + TypedDict, +): + card: NotRequired[ + "PaymentIntentUpdateParamsAmountDetailsLineItemPaymentMethodOptionsCard" + ] + """ + This sub-hash contains line item details that are specific to `card` payment method." + """ + card_present: NotRequired[ + "PaymentIntentUpdateParamsAmountDetailsLineItemPaymentMethodOptionsCardPresent" + ] + """ + This sub-hash contains line item details that are specific to `card_present` payment method." + """ + klarna: NotRequired[ + "PaymentIntentUpdateParamsAmountDetailsLineItemPaymentMethodOptionsKlarna" + ] + """ + This sub-hash contains line item details that are specific to `klarna` payment method." + """ + paypal: NotRequired[ + "PaymentIntentUpdateParamsAmountDetailsLineItemPaymentMethodOptionsPaypal" + ] + """ + This sub-hash contains line item details that are specific to `paypal` payment method." + """ + + +class PaymentIntentUpdateParamsAmountDetailsLineItemPaymentMethodOptionsCard( + TypedDict, +): + commodity_code: NotRequired[str] + """ + Identifier that categorizes the items being purchased using a standardized commodity scheme such as (but not limited to) UNSPSC, NAICS, NAPCS, etc. + """ + + +class PaymentIntentUpdateParamsAmountDetailsLineItemPaymentMethodOptionsCardPresent( + TypedDict, +): + commodity_code: NotRequired[str] + """ + Identifier that categorizes the items being purchased using a standardized commodity scheme such as (but not limited to) UNSPSC, NAICS, NAPCS, etc. + """ + + +class PaymentIntentUpdateParamsAmountDetailsLineItemPaymentMethodOptionsKlarna( + TypedDict, +): + image_url: NotRequired[str] + """ + URL to an image for the product. Max length, 4096 characters. + """ + product_url: NotRequired[str] + """ + URL to the product page. Max length, 4096 characters. + """ + subscription_reference: NotRequired[str] + """ + Reference for the subscription this line item is for. + """ + + +class PaymentIntentUpdateParamsAmountDetailsLineItemPaymentMethodOptionsPaypal( + TypedDict, +): + category: NotRequired[ + Literal["digital_goods", "donation", "physical_goods"] + ] + """ + Type of the line item. + """ + description: NotRequired[str] + """ + Description of the line item. + """ + sold_by: NotRequired[str] + """ + The Stripe account ID of the connected account that sells the item. + """ + + +class PaymentIntentUpdateParamsAmountDetailsLineItemTax(TypedDict): + total_tax_amount: int + """ + The total tax on an item. Non-negative integer. + """ + + +class PaymentIntentUpdateParamsAmountDetailsShipping(TypedDict): + amount: NotRequired["Literal['']|int"] + """ + Portion of the amount that is for shipping. + """ + from_postal_code: NotRequired["Literal['']|str"] + """ + The postal code that represents the shipping source. + """ + to_postal_code: NotRequired["Literal['']|str"] + """ + The postal code that represents the shipping destination. + """ + + +class PaymentIntentUpdateParamsAmountDetailsTax(TypedDict): + total_tax_amount: int + """ + Total portion of the amount that is for tax. + """ + + +class PaymentIntentUpdateParamsHooks(TypedDict): + inputs: NotRequired["PaymentIntentUpdateParamsHooksInputs"] + """ + Arguments passed in automations + """ + + +class PaymentIntentUpdateParamsHooksInputs(TypedDict): + tax: NotRequired["PaymentIntentUpdateParamsHooksInputsTax"] + """ + Tax arguments for automations + """ + + +class PaymentIntentUpdateParamsHooksInputsTax(TypedDict): + calculation: Union[Literal[""], str] + """ + The [TaxCalculation](https://stripe.com/docs/api/tax/calculations) id + """ + + +class PaymentIntentUpdateParamsMandateData(TypedDict): + customer_acceptance: ( + "PaymentIntentUpdateParamsMandateDataCustomerAcceptance" + ) + """ + This hash contains details about the customer acceptance of the Mandate. + """ + + +class PaymentIntentUpdateParamsMandateDataCustomerAcceptance(TypedDict): + online: "PaymentIntentUpdateParamsMandateDataCustomerAcceptanceOnline" + """ + If this is a Mandate accepted online, this hash contains details about the online acceptance. + """ + type: Literal["online"] + """ + The type of customer acceptance information included with the Mandate. + """ + + +class PaymentIntentUpdateParamsMandateDataCustomerAcceptanceOnline(TypedDict): + ip_address: NotRequired[str] + """ + The IP address from which the Mandate was accepted by the customer. + """ + user_agent: NotRequired[str] + """ + The user agent of the browser from which the Mandate was accepted by the customer. + """ + + +class PaymentIntentUpdateParamsPaymentDetails(TypedDict): + car_rental: NotRequired["PaymentIntentUpdateParamsPaymentDetailsCarRental"] + """ + Car rental details for this PaymentIntent. + """ + customer_reference: NotRequired["Literal['']|str"] + """ + Some customers might be required by their company or organization to provide this information. If so, provide this value. Otherwise you can ignore this field. + """ + event_details: NotRequired[ + "PaymentIntentUpdateParamsPaymentDetailsEventDetails" + ] + """ + Event details for this PaymentIntent + """ + flight: NotRequired["PaymentIntentUpdateParamsPaymentDetailsFlight"] + """ + Flight reservation details for this PaymentIntent + """ + lodging: NotRequired["PaymentIntentUpdateParamsPaymentDetailsLodging"] + """ + Lodging reservation details for this PaymentIntent + """ + order_reference: NotRequired["Literal['']|str"] + """ + A unique value assigned by the business to identify the transaction. + """ + subscription: NotRequired[ + "PaymentIntentUpdateParamsPaymentDetailsSubscription" + ] + """ + Subscription details for this PaymentIntent + """ + + +class PaymentIntentUpdateParamsPaymentDetailsCarRental(TypedDict): + affiliate: NotRequired[ + "PaymentIntentUpdateParamsPaymentDetailsCarRentalAffiliate" + ] + """ + Affiliate details for this purchase. + """ + booking_number: str + """ + The booking number associated with the car rental. + """ + car_class_code: NotRequired[str] + """ + Class code of the car. + """ + car_make: NotRequired[str] + """ + Make of the car. + """ + car_model: NotRequired[str] + """ + Model of the car. + """ + company: NotRequired[str] + """ + The name of the rental car company. + """ + customer_service_phone_number: NotRequired[str] + """ + The customer service phone number of the car rental company. + """ + days_rented: int + """ + Number of days the car is being rented. + """ + delivery: NotRequired[ + "PaymentIntentUpdateParamsPaymentDetailsCarRentalDelivery" + ] + """ + Delivery details for this purchase. + """ + distance: NotRequired[ + "PaymentIntentUpdateParamsPaymentDetailsCarRentalDistance" + ] + """ + The details of the distance traveled during the rental period. + """ + drivers: NotRequired[ + List["PaymentIntentUpdateParamsPaymentDetailsCarRentalDriver"] + ] + """ + The details of the passengers in the travel reservation + """ + extra_charges: NotRequired[ + List[ + Literal[ + "extra_mileage", + "gas", + "late_return", + "one_way_service", + "parking_violation", + ] + ] + ] + """ + List of additional charges being billed. + """ + no_show: NotRequired[bool] + """ + Indicates if the customer did not keep nor cancel their booking. + """ + pickup_address: NotRequired[ + "PaymentIntentUpdateParamsPaymentDetailsCarRentalPickupAddress" + ] + """ + Car pick-up address. + """ + pickup_at: int + """ + Car pick-up time. Measured in seconds since the Unix epoch. + """ + pickup_location_name: NotRequired[str] + """ + Name of the pickup location. + """ + rate_amount: NotRequired[int] + """ + Rental rate. + """ + rate_interval: NotRequired[Literal["day", "month", "week"]] + """ + The frequency at which the rate amount is applied. One of `day`, `week` or `month` + """ + renter_name: NotRequired[str] + """ + The name of the person or entity renting the car. + """ + return_address: NotRequired[ + "PaymentIntentUpdateParamsPaymentDetailsCarRentalReturnAddress" + ] + """ + Car return address. + """ + return_at: int + """ + Car return time. Measured in seconds since the Unix epoch. + """ + return_location_name: NotRequired[str] + """ + Name of the return location. + """ + tax_exempt: NotRequired[bool] + """ + Indicates whether the goods or services are tax-exempt or tax is not collected. + """ + vehicle_identification_number: NotRequired[str] + """ + The vehicle identification number. + """ + + +class PaymentIntentUpdateParamsPaymentDetailsCarRentalAffiliate(TypedDict): + name: str + """ + The name of the affiliate that originated the purchase. + """ + + +class PaymentIntentUpdateParamsPaymentDetailsCarRentalDelivery(TypedDict): + mode: NotRequired[Literal["email", "phone", "pickup", "post"]] + """ + The delivery method for the payment + """ + recipient: NotRequired[ + "PaymentIntentUpdateParamsPaymentDetailsCarRentalDeliveryRecipient" + ] + """ + Details of the recipient. + """ + + +class PaymentIntentUpdateParamsPaymentDetailsCarRentalDeliveryRecipient( + TypedDict, +): + email: NotRequired[str] + """ + The email of the recipient the ticket is delivered to. + """ + name: NotRequired[str] + """ + The name of the recipient the ticket is delivered to. + """ + phone: NotRequired[str] + """ + The phone number of the recipient the ticket is delivered to. + """ + + +class PaymentIntentUpdateParamsPaymentDetailsCarRentalDistance(TypedDict): + amount: NotRequired[int] + """ + Distance traveled. + """ + unit: NotRequired[Literal["kilometers", "miles"]] + """ + Unit of measurement for the distance traveled. One of `miles` or `kilometers`. + """ + + +class PaymentIntentUpdateParamsPaymentDetailsCarRentalDriver(TypedDict): + driver_identification_number: NotRequired[str] + """ + Driver's identification number. + """ + driver_tax_number: NotRequired[str] + """ + Driver's tax number. + """ + name: str + """ + Full name of the person or entity on the car reservation. + """ + + +class PaymentIntentUpdateParamsPaymentDetailsCarRentalPickupAddress(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. + """ + + +class PaymentIntentUpdateParamsPaymentDetailsCarRentalReturnAddress(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. + """ + + +class PaymentIntentUpdateParamsPaymentDetailsEventDetails(TypedDict): + access_controlled_venue: NotRequired[bool] + """ + Indicates if the tickets are digitally checked when entering the venue. + """ + address: NotRequired[ + "PaymentIntentUpdateParamsPaymentDetailsEventDetailsAddress" + ] + """ + The event location's address. + """ + affiliate: NotRequired[ + "PaymentIntentUpdateParamsPaymentDetailsEventDetailsAffiliate" + ] + """ + Affiliate details for this purchase. + """ + company: NotRequired[str] + """ + The name of the company + """ + delivery: NotRequired[ + "PaymentIntentUpdateParamsPaymentDetailsEventDetailsDelivery" + ] + """ + Delivery details for this purchase. + """ + ends_at: NotRequired[int] + """ + Event end time. Measured in seconds since the Unix epoch. + """ + genre: NotRequired[str] + """ + Type of the event entertainment (concert, sports event etc) + """ + name: str + """ + The name of the event. + """ + starts_at: NotRequired[int] + """ + Event start time. Measured in seconds since the Unix epoch. + """ + + +class PaymentIntentUpdateParamsPaymentDetailsEventDetailsAddress(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. + """ + + +class PaymentIntentUpdateParamsPaymentDetailsEventDetailsAffiliate(TypedDict): + name: str + """ + The name of the affiliate that originated the purchase. + """ + + +class PaymentIntentUpdateParamsPaymentDetailsEventDetailsDelivery(TypedDict): + mode: NotRequired[Literal["email", "phone", "pickup", "post"]] + """ + The delivery method for the payment + """ + recipient: NotRequired[ + "PaymentIntentUpdateParamsPaymentDetailsEventDetailsDeliveryRecipient" + ] + """ + Details of the recipient. + """ + + +class PaymentIntentUpdateParamsPaymentDetailsEventDetailsDeliveryRecipient( + TypedDict, +): + email: NotRequired[str] + """ + The email of the recipient the ticket is delivered to. + """ + name: NotRequired[str] + """ + The name of the recipient the ticket is delivered to. + """ + phone: NotRequired[str] + """ + The phone number of the recipient the ticket is delivered to. + """ + + +class PaymentIntentUpdateParamsPaymentDetailsFlight(TypedDict): + affiliate: NotRequired[ + "PaymentIntentUpdateParamsPaymentDetailsFlightAffiliate" + ] + """ + Affiliate details for this purchase. + """ + agency_number: NotRequired[str] + """ + The agency number (i.e. International Air Transport Association (IATA) agency number) of the travel agency that made the booking. + """ + carrier: NotRequired[str] + """ + The International Air Transport Association (IATA) carrier code of the carrier that issued the ticket. + """ + delivery: NotRequired[ + "PaymentIntentUpdateParamsPaymentDetailsFlightDelivery" + ] + """ + Delivery details for this purchase. + """ + passenger_name: NotRequired[str] + """ + The name of the person or entity on the reservation. + """ + passengers: NotRequired[ + List["PaymentIntentUpdateParamsPaymentDetailsFlightPassenger"] + ] + """ + The details of the passengers in the travel reservation. + """ + segments: List["PaymentIntentUpdateParamsPaymentDetailsFlightSegment"] + """ + The individual flight segments associated with the trip. + """ + ticket_number: NotRequired[str] + """ + The ticket number associated with the travel reservation. + """ + + +class PaymentIntentUpdateParamsPaymentDetailsFlightAffiliate(TypedDict): + name: str + """ + The name of the affiliate that originated the purchase. + """ + + +class PaymentIntentUpdateParamsPaymentDetailsFlightDelivery(TypedDict): + mode: NotRequired[Literal["email", "phone", "pickup", "post"]] + """ + The delivery method for the payment + """ + recipient: NotRequired[ + "PaymentIntentUpdateParamsPaymentDetailsFlightDeliveryRecipient" + ] + """ + Details of the recipient. + """ + + +class PaymentIntentUpdateParamsPaymentDetailsFlightDeliveryRecipient( + TypedDict +): + email: NotRequired[str] + """ + The email of the recipient the ticket is delivered to. + """ + name: NotRequired[str] + """ + The name of the recipient the ticket is delivered to. + """ + phone: NotRequired[str] + """ + The phone number of the recipient the ticket is delivered to. + """ + + +class PaymentIntentUpdateParamsPaymentDetailsFlightPassenger(TypedDict): + name: str + """ + Full name of the person or entity on the flight reservation. + """ + + +class PaymentIntentUpdateParamsPaymentDetailsFlightSegment(TypedDict): + amount: NotRequired[int] + """ + The flight segment amount. + """ + arrival_airport: NotRequired[str] + """ + The International Air Transport Association (IATA) airport code for the arrival airport. + """ + arrives_at: NotRequired[int] + """ + The arrival time for the flight segment. Measured in seconds since the Unix epoch. + """ + carrier: NotRequired[str] + """ + The International Air Transport Association (IATA) carrier code of the carrier operating the flight segment. + """ + departs_at: int + """ + The departure time for the flight segment. Measured in seconds since the Unix epoch. + """ + departure_airport: NotRequired[str] + """ + The International Air Transport Association (IATA) airport code for the departure airport. + """ + flight_number: NotRequired[str] + """ + The flight number associated with the segment + """ + service_class: NotRequired[ + Literal["business", "economy", "first", "premium_economy"] + ] + """ + The fare class for the segment. + """ + + +class PaymentIntentUpdateParamsPaymentDetailsLodging(TypedDict): + address: NotRequired[ + "PaymentIntentUpdateParamsPaymentDetailsLodgingAddress" + ] + """ + The lodging location's address. + """ + adults: NotRequired[int] + """ + The number of adults on the booking + """ + affiliate: NotRequired[ + "PaymentIntentUpdateParamsPaymentDetailsLodgingAffiliate" + ] + """ + Affiliate details for this purchase. + """ + booking_number: NotRequired[str] + """ + The booking number associated with the lodging reservation. + """ + category: NotRequired[Literal["hotel", "vacation_rental"]] + """ + The lodging category + """ + checkin_at: int + """ + Lodging check-in time. Measured in seconds since the Unix epoch. + """ + checkout_at: int + """ + Lodging check-out time. Measured in seconds since the Unix epoch. + """ + customer_service_phone_number: NotRequired[str] + """ + The customer service phone number of the lodging company. + """ + daily_room_rate_amount: NotRequired[int] + """ + The daily lodging room rate. + """ + delivery: NotRequired[ + "PaymentIntentUpdateParamsPaymentDetailsLodgingDelivery" + ] + """ + Delivery details for this purchase. + """ + extra_charges: NotRequired[ + List[ + Literal[ + "gift_shop", + "laundry", + "mini_bar", + "other", + "restaurant", + "telephone", + ] + ] + ] + """ + List of additional charges being billed. + """ + fire_safety_act_compliance: NotRequired[bool] + """ + Indicates whether the lodging location is compliant with the Fire Safety Act. + """ + name: NotRequired[str] + """ + The name of the lodging location. + """ + no_show: NotRequired[bool] + """ + Indicates if the customer did not keep their booking while failing to cancel the reservation. + """ + number_of_rooms: NotRequired[int] + """ + The number of rooms on the booking + """ + passengers: NotRequired[ + List["PaymentIntentUpdateParamsPaymentDetailsLodgingPassenger"] + ] + """ + The details of the passengers in the travel reservation + """ + property_phone_number: NotRequired[str] + """ + The phone number of the lodging location. + """ + room_class: NotRequired[str] + """ + The room class for this purchase. + """ + room_nights: NotRequired[int] + """ + The number of room nights + """ + total_room_tax_amount: NotRequired[int] + """ + The total tax amount associating with the room reservation. + """ + total_tax_amount: NotRequired[int] + """ + The total tax amount + """ + + +class PaymentIntentUpdateParamsPaymentDetailsLodgingAddress(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. + """ + + +class PaymentIntentUpdateParamsPaymentDetailsLodgingAffiliate(TypedDict): + name: str + """ + The name of the affiliate that originated the purchase. + """ + + +class PaymentIntentUpdateParamsPaymentDetailsLodgingDelivery(TypedDict): + mode: NotRequired[Literal["email", "phone", "pickup", "post"]] + """ + The delivery method for the payment + """ + recipient: NotRequired[ + "PaymentIntentUpdateParamsPaymentDetailsLodgingDeliveryRecipient" + ] + """ + Details of the recipient. + """ + + +class PaymentIntentUpdateParamsPaymentDetailsLodgingDeliveryRecipient( + TypedDict, +): + email: NotRequired[str] + """ + The email of the recipient the ticket is delivered to. + """ + name: NotRequired[str] + """ + The name of the recipient the ticket is delivered to. + """ + phone: NotRequired[str] + """ + The phone number of the recipient the ticket is delivered to. + """ + + +class PaymentIntentUpdateParamsPaymentDetailsLodgingPassenger(TypedDict): + name: str + """ + Full name of the person or entity on the lodging reservation. + """ + + +class PaymentIntentUpdateParamsPaymentDetailsSubscription(TypedDict): + affiliate: NotRequired[ + "PaymentIntentUpdateParamsPaymentDetailsSubscriptionAffiliate" + ] + """ + Affiliate details for this purchase. + """ + auto_renewal: NotRequired[bool] + """ + Info whether the subscription will be auto renewed upon expiry. + """ + billing_interval: NotRequired[ + "PaymentIntentUpdateParamsPaymentDetailsSubscriptionBillingInterval" + ] + """ + Subscription billing details for this purchase. + """ + ends_at: NotRequired[int] + """ + Subscription end time. Measured in seconds since the Unix epoch. + """ + name: str + """ + Name of the product on subscription. e.g. Apple Music Subscription + """ + starts_at: NotRequired[int] + """ + Subscription start time. Measured in seconds since the Unix epoch. + """ + + +class PaymentIntentUpdateParamsPaymentDetailsSubscriptionAffiliate(TypedDict): + name: str + """ + The name of the affiliate that originated the purchase. + """ + + +class PaymentIntentUpdateParamsPaymentDetailsSubscriptionBillingInterval( + TypedDict, +): + count: int + """ + The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + """ + interval: Literal["day", "month", "week", "year"] + """ + Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + """ + + +class PaymentIntentUpdateParamsPaymentMethodData(TypedDict): + acss_debit: NotRequired[ + "PaymentIntentUpdateParamsPaymentMethodDataAcssDebit" + ] + """ + If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method. + """ + affirm: NotRequired["PaymentIntentUpdateParamsPaymentMethodDataAffirm"] + """ + If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method. + """ + afterpay_clearpay: NotRequired[ + "PaymentIntentUpdateParamsPaymentMethodDataAfterpayClearpay" + ] + """ + If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method. + """ + alipay: NotRequired["PaymentIntentUpdateParamsPaymentMethodDataAlipay"] + """ + If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. + """ + allow_redisplay: NotRequired[Literal["always", "limited", "unspecified"]] + """ + This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`. + """ + alma: NotRequired["PaymentIntentUpdateParamsPaymentMethodDataAlma"] + """ + If this is a Alma PaymentMethod, this hash contains details about the Alma payment method. + """ + amazon_pay: NotRequired[ + "PaymentIntentUpdateParamsPaymentMethodDataAmazonPay" + ] + """ + If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method. + """ + au_becs_debit: NotRequired[ + "PaymentIntentUpdateParamsPaymentMethodDataAuBecsDebit" + ] + """ + If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. + """ + bacs_debit: NotRequired[ + "PaymentIntentUpdateParamsPaymentMethodDataBacsDebit" + ] + """ + If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account. + """ + bancontact: NotRequired[ + "PaymentIntentUpdateParamsPaymentMethodDataBancontact" + ] + """ + If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method. + """ + billie: NotRequired["PaymentIntentUpdateParamsPaymentMethodDataBillie"] + """ + If this is a `billie` PaymentMethod, this hash contains details about the Billie payment method. + """ + billing_details: NotRequired[ + "PaymentIntentUpdateParamsPaymentMethodDataBillingDetails" + ] + """ + Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. + """ + blik: NotRequired["PaymentIntentUpdateParamsPaymentMethodDataBlik"] + """ + If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method. + """ + boleto: NotRequired["PaymentIntentUpdateParamsPaymentMethodDataBoleto"] + """ + If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method. + """ + cashapp: NotRequired["PaymentIntentUpdateParamsPaymentMethodDataCashapp"] + """ + If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. + """ + crypto: NotRequired["PaymentIntentUpdateParamsPaymentMethodDataCrypto"] + """ + If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment method. + """ + customer_balance: NotRequired[ + "PaymentIntentUpdateParamsPaymentMethodDataCustomerBalance" + ] + """ + If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. + """ + eps: NotRequired["PaymentIntentUpdateParamsPaymentMethodDataEps"] + """ + If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. + """ + fpx: NotRequired["PaymentIntentUpdateParamsPaymentMethodDataFpx"] + """ + If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method. + """ + giropay: NotRequired["PaymentIntentUpdateParamsPaymentMethodDataGiropay"] + """ + If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method. + """ + gopay: NotRequired["PaymentIntentUpdateParamsPaymentMethodDataGopay"] + """ + If this is a Gopay PaymentMethod, this hash contains details about the Gopay payment method. + """ + grabpay: NotRequired["PaymentIntentUpdateParamsPaymentMethodDataGrabpay"] + """ + If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method. + """ + id_bank_transfer: NotRequired[ + "PaymentIntentUpdateParamsPaymentMethodDataIdBankTransfer" + ] + """ + If this is an `IdBankTransfer` PaymentMethod, this hash contains details about the IdBankTransfer payment method. + """ + ideal: NotRequired["PaymentIntentUpdateParamsPaymentMethodDataIdeal"] + """ + If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. + """ + interac_present: NotRequired[ + "PaymentIntentUpdateParamsPaymentMethodDataInteracPresent" + ] + """ + If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. + """ + kakao_pay: NotRequired[ + "PaymentIntentUpdateParamsPaymentMethodDataKakaoPay" + ] + """ + If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method. + """ + klarna: NotRequired["PaymentIntentUpdateParamsPaymentMethodDataKlarna"] + """ + If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method. + """ + konbini: NotRequired["PaymentIntentUpdateParamsPaymentMethodDataKonbini"] + """ + If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. + """ + kr_card: NotRequired["PaymentIntentUpdateParamsPaymentMethodDataKrCard"] + """ + If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method. + """ + link: NotRequired["PaymentIntentUpdateParamsPaymentMethodDataLink"] + """ + If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. + """ + mb_way: NotRequired["PaymentIntentUpdateParamsPaymentMethodDataMbWay"] + """ + If this is a MB WAY PaymentMethod, this hash contains details about the MB WAY payment method. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + mobilepay: NotRequired[ + "PaymentIntentUpdateParamsPaymentMethodDataMobilepay" + ] + """ + If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method. + """ + multibanco: NotRequired[ + "PaymentIntentUpdateParamsPaymentMethodDataMultibanco" + ] + """ + If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method. + """ + naver_pay: NotRequired[ + "PaymentIntentUpdateParamsPaymentMethodDataNaverPay" + ] + """ + If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method. + """ + nz_bank_account: NotRequired[ + "PaymentIntentUpdateParamsPaymentMethodDataNzBankAccount" + ] + """ + If this is an nz_bank_account PaymentMethod, this hash contains details about the nz_bank_account payment method. + """ + oxxo: NotRequired["PaymentIntentUpdateParamsPaymentMethodDataOxxo"] + """ + If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. + """ + p24: NotRequired["PaymentIntentUpdateParamsPaymentMethodDataP24"] + """ + If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. + """ + pay_by_bank: NotRequired[ + "PaymentIntentUpdateParamsPaymentMethodDataPayByBank" + ] + """ + If this is a `pay_by_bank` PaymentMethod, this hash contains details about the PayByBank payment method. + """ + payco: NotRequired["PaymentIntentUpdateParamsPaymentMethodDataPayco"] + """ + If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method. + """ + paynow: NotRequired["PaymentIntentUpdateParamsPaymentMethodDataPaynow"] + """ + If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method. + """ + paypal: NotRequired["PaymentIntentUpdateParamsPaymentMethodDataPaypal"] + """ + If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method. + """ + paypay: NotRequired["PaymentIntentUpdateParamsPaymentMethodDataPaypay"] + """ + If this is a `paypay` PaymentMethod, this hash contains details about the PayPay payment method. + """ + payto: NotRequired["PaymentIntentUpdateParamsPaymentMethodDataPayto"] + """ + If this is a `payto` PaymentMethod, this hash contains details about the PayTo payment method. + """ + pix: NotRequired["PaymentIntentUpdateParamsPaymentMethodDataPix"] + """ + If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method. + """ + promptpay: NotRequired[ + "PaymentIntentUpdateParamsPaymentMethodDataPromptpay" + ] + """ + If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method. + """ + qris: NotRequired["PaymentIntentUpdateParamsPaymentMethodDataQris"] + """ + If this is a `qris` PaymentMethod, this hash contains details about the QRIS payment method. + """ + radar_options: NotRequired[ + "PaymentIntentUpdateParamsPaymentMethodDataRadarOptions" + ] + """ + Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. + """ + rechnung: NotRequired["PaymentIntentUpdateParamsPaymentMethodDataRechnung"] + """ + If this is a `rechnung` PaymentMethod, this hash contains details about the Rechnung payment method. + """ + revolut_pay: NotRequired[ + "PaymentIntentUpdateParamsPaymentMethodDataRevolutPay" + ] + """ + If this is a `revolut_pay` PaymentMethod, this hash contains details about the Revolut Pay payment method. + """ + samsung_pay: NotRequired[ + "PaymentIntentUpdateParamsPaymentMethodDataSamsungPay" + ] + """ + If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method. + """ + satispay: NotRequired["PaymentIntentUpdateParamsPaymentMethodDataSatispay"] + """ + If this is a `satispay` PaymentMethod, this hash contains details about the Satispay payment method. + """ + sepa_debit: NotRequired[ + "PaymentIntentUpdateParamsPaymentMethodDataSepaDebit" + ] + """ + If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. + """ + shopeepay: NotRequired[ + "PaymentIntentUpdateParamsPaymentMethodDataShopeepay" + ] + """ + If this is a Shopeepay PaymentMethod, this hash contains details about the Shopeepay payment method. + """ + sofort: NotRequired["PaymentIntentUpdateParamsPaymentMethodDataSofort"] + """ + If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. + """ + stripe_balance: NotRequired[ + "PaymentIntentUpdateParamsPaymentMethodDataStripeBalance" + ] + """ + This hash contains details about the Stripe balance payment method. + """ + swish: NotRequired["PaymentIntentUpdateParamsPaymentMethodDataSwish"] + """ + If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method. + """ + twint: NotRequired["PaymentIntentUpdateParamsPaymentMethodDataTwint"] + """ + If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method. + """ + type: Literal[ + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "alma", + "amazon_pay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "billie", + "blik", + "boleto", + "cashapp", + "crypto", + "customer_balance", + "eps", + "fpx", + "giropay", + "gopay", + "grabpay", + "id_bank_transfer", + "ideal", + "kakao_pay", + "klarna", + "konbini", + "kr_card", + "link", + "mb_way", + "mobilepay", + "multibanco", + "naver_pay", + "nz_bank_account", + "oxxo", + "p24", + "pay_by_bank", + "payco", + "paynow", + "paypal", + "paypay", + "payto", + "pix", + "promptpay", + "qris", + "rechnung", + "revolut_pay", + "samsung_pay", + "satispay", + "sepa_debit", + "shopeepay", + "sofort", + "stripe_balance", + "swish", + "twint", + "us_bank_account", + "wechat_pay", + "zip", + ] + """ + The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. + """ + us_bank_account: NotRequired[ + "PaymentIntentUpdateParamsPaymentMethodDataUsBankAccount" + ] + """ + If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. + """ + wechat_pay: NotRequired[ + "PaymentIntentUpdateParamsPaymentMethodDataWechatPay" + ] + """ + If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method. + """ + zip: NotRequired["PaymentIntentUpdateParamsPaymentMethodDataZip"] + """ + If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method. + """ + + +class PaymentIntentUpdateParamsPaymentMethodDataAcssDebit(TypedDict): + account_number: str + """ + Customer's bank account number. + """ + institution_number: str + """ + Institution number of the customer's bank. + """ + transit_number: str + """ + Transit number of the customer's bank. + """ + + +class PaymentIntentUpdateParamsPaymentMethodDataAffirm(TypedDict): + pass + + +class PaymentIntentUpdateParamsPaymentMethodDataAfterpayClearpay(TypedDict): + pass + + +class PaymentIntentUpdateParamsPaymentMethodDataAlipay(TypedDict): + pass + + +class PaymentIntentUpdateParamsPaymentMethodDataAlma(TypedDict): + pass + + +class PaymentIntentUpdateParamsPaymentMethodDataAmazonPay(TypedDict): + pass + + +class PaymentIntentUpdateParamsPaymentMethodDataAuBecsDebit(TypedDict): + account_number: str + """ + The account number for the bank account. + """ + bsb_number: str + """ + Bank-State-Branch number of the bank account. + """ + + +class PaymentIntentUpdateParamsPaymentMethodDataBacsDebit(TypedDict): + account_number: NotRequired[str] + """ + Account number of the bank account that the funds will be debited from. + """ + sort_code: NotRequired[str] + """ + Sort code of the bank account. (e.g., `10-20-30`) + """ + + +class PaymentIntentUpdateParamsPaymentMethodDataBancontact(TypedDict): + pass + + +class PaymentIntentUpdateParamsPaymentMethodDataBillie(TypedDict): + pass + + +class PaymentIntentUpdateParamsPaymentMethodDataBillingDetails(TypedDict): + address: NotRequired[ + "Literal['']|PaymentIntentUpdateParamsPaymentMethodDataBillingDetailsAddress" + ] + """ + Billing address. + """ + email: NotRequired["Literal['']|str"] + """ + Email address. + """ + name: NotRequired["Literal['']|str"] + """ + Full name. + """ + phone: NotRequired["Literal['']|str"] + """ + Billing phone number (including extension). + """ + tax_id: NotRequired[str] + """ + Taxpayer identification number. Used only for transactions between LATAM buyers and non-LATAM sellers. + """ + + +class PaymentIntentUpdateParamsPaymentMethodDataBillingDetailsAddress( + 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. + """ + + +class PaymentIntentUpdateParamsPaymentMethodDataBlik(TypedDict): + pass + + +class PaymentIntentUpdateParamsPaymentMethodDataBoleto(TypedDict): + tax_id: str + """ + The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers) + """ + + +class PaymentIntentUpdateParamsPaymentMethodDataCashapp(TypedDict): + pass + + +class PaymentIntentUpdateParamsPaymentMethodDataCrypto(TypedDict): + pass + + +class PaymentIntentUpdateParamsPaymentMethodDataCustomerBalance(TypedDict): + pass + + +class PaymentIntentUpdateParamsPaymentMethodDataEps(TypedDict): + bank: NotRequired[ + Literal[ + "arzte_und_apotheker_bank", + "austrian_anadi_bank_ag", + "bank_austria", + "bankhaus_carl_spangler", + "bankhaus_schelhammer_und_schattera_ag", + "bawag_psk_ag", + "bks_bank_ag", + "brull_kallmus_bank_ag", + "btv_vier_lander_bank", + "capital_bank_grawe_gruppe_ag", + "deutsche_bank_ag", + "dolomitenbank", + "easybank_ag", + "erste_bank_und_sparkassen", + "hypo_alpeadriabank_international_ag", + "hypo_bank_burgenland_aktiengesellschaft", + "hypo_noe_lb_fur_niederosterreich_u_wien", + "hypo_oberosterreich_salzburg_steiermark", + "hypo_tirol_bank_ag", + "hypo_vorarlberg_bank_ag", + "marchfelder_bank", + "oberbank_ag", + "raiffeisen_bankengruppe_osterreich", + "schoellerbank_ag", + "sparda_bank_wien", + "volksbank_gruppe", + "volkskreditbank_ag", + "vr_bank_braunau", + ] + ] + """ + The customer's bank. + """ + + +class PaymentIntentUpdateParamsPaymentMethodDataFpx(TypedDict): + account_holder_type: NotRequired[Literal["company", "individual"]] + """ + Account holder type for FPX transaction + """ + bank: Literal[ + "affin_bank", + "agrobank", + "alliance_bank", + "ambank", + "bank_islam", + "bank_muamalat", + "bank_of_china", + "bank_rakyat", + "bsn", + "cimb", + "deutsche_bank", + "hong_leong_bank", + "hsbc", + "kfh", + "maybank2e", + "maybank2u", + "ocbc", + "pb_enterprise", + "public_bank", + "rhb", + "standard_chartered", + "uob", + ] + """ + The customer's bank. + """ + + +class PaymentIntentUpdateParamsPaymentMethodDataGiropay(TypedDict): + pass + + +class PaymentIntentUpdateParamsPaymentMethodDataGopay(TypedDict): + pass + + +class PaymentIntentUpdateParamsPaymentMethodDataGrabpay(TypedDict): + pass + + +class PaymentIntentUpdateParamsPaymentMethodDataIdBankTransfer(TypedDict): + bank: NotRequired[Literal["bca", "bni", "bri", "cimb", "permata"]] + """ + Bank where the account is held. + """ + + +class PaymentIntentUpdateParamsPaymentMethodDataIdeal(TypedDict): + bank: NotRequired[ + Literal[ + "abn_amro", + "asn_bank", + "bunq", + "buut", + "handelsbanken", + "ing", + "knab", + "moneyou", + "n26", + "nn", + "rabobank", + "regiobank", + "revolut", + "sns_bank", + "triodos_bank", + "van_lanschot", + "yoursafe", + ] + ] + """ + The customer's bank. Only use this parameter for existing customers. Don't use it for new customers. + """ + + +class PaymentIntentUpdateParamsPaymentMethodDataInteracPresent(TypedDict): + pass + + +class PaymentIntentUpdateParamsPaymentMethodDataKakaoPay(TypedDict): + pass + + +class PaymentIntentUpdateParamsPaymentMethodDataKlarna(TypedDict): + dob: NotRequired["PaymentIntentUpdateParamsPaymentMethodDataKlarnaDob"] + """ + Customer's date of birth + """ + + +class PaymentIntentUpdateParamsPaymentMethodDataKlarnaDob(TypedDict): + day: int + """ + The day of birth, between 1 and 31. + """ + month: int + """ + The month of birth, between 1 and 12. + """ + year: int + """ + The four-digit year of birth. + """ + + +class PaymentIntentUpdateParamsPaymentMethodDataKonbini(TypedDict): + pass + + +class PaymentIntentUpdateParamsPaymentMethodDataKrCard(TypedDict): + pass + + +class PaymentIntentUpdateParamsPaymentMethodDataLink(TypedDict): + pass + + +class PaymentIntentUpdateParamsPaymentMethodDataMbWay(TypedDict): + pass + + +class PaymentIntentUpdateParamsPaymentMethodDataMobilepay(TypedDict): + pass + + +class PaymentIntentUpdateParamsPaymentMethodDataMultibanco(TypedDict): + pass + + +class PaymentIntentUpdateParamsPaymentMethodDataNaverPay(TypedDict): + funding: NotRequired[Literal["card", "points"]] + """ + Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`. + """ + + +class PaymentIntentUpdateParamsPaymentMethodDataNzBankAccount(TypedDict): + account_holder_name: NotRequired[str] + """ + The name on the bank account. Only required if the account holder name is different from the name of the authorized signatory collected in the PaymentMethod's billing details. + """ + account_number: str + """ + The account number for the bank account. + """ + bank_code: str + """ + The numeric code for the bank account's bank. + """ + branch_code: str + """ + The numeric code for the bank account's bank branch. + """ + reference: NotRequired[str] + suffix: str + """ + The suffix of the bank account number. + """ + + +class PaymentIntentUpdateParamsPaymentMethodDataOxxo(TypedDict): + pass + + +class PaymentIntentUpdateParamsPaymentMethodDataP24(TypedDict): + bank: NotRequired[ + Literal[ + "alior_bank", + "bank_millennium", + "bank_nowy_bfg_sa", + "bank_pekao_sa", + "banki_spbdzielcze", + "blik", + "bnp_paribas", + "boz", + "citi_handlowy", + "credit_agricole", + "envelobank", + "etransfer_pocztowy24", + "getin_bank", + "ideabank", + "ing", + "inteligo", + "mbank_mtransfer", + "nest_przelew", + "noble_pay", + "pbac_z_ipko", + "plus_bank", + "santander_przelew24", + "tmobile_usbugi_bankowe", + "toyota_bank", + "velobank", + "volkswagen_bank", + ] + ] + """ + The customer's bank. + """ + + +class PaymentIntentUpdateParamsPaymentMethodDataPayByBank(TypedDict): + pass + + +class PaymentIntentUpdateParamsPaymentMethodDataPayco(TypedDict): + pass + + +class PaymentIntentUpdateParamsPaymentMethodDataPaynow(TypedDict): + pass + + +class PaymentIntentUpdateParamsPaymentMethodDataPaypal(TypedDict): + pass + + +class PaymentIntentUpdateParamsPaymentMethodDataPaypay(TypedDict): + pass + + +class PaymentIntentUpdateParamsPaymentMethodDataPayto(TypedDict): + account_number: NotRequired[str] + """ + The account number for the bank account. + """ + bsb_number: NotRequired[str] + """ + Bank-State-Branch number of the bank account. + """ + pay_id: NotRequired[str] + """ + The PayID alias for the bank account. + """ + + +class PaymentIntentUpdateParamsPaymentMethodDataPix(TypedDict): + pass + + +class PaymentIntentUpdateParamsPaymentMethodDataPromptpay(TypedDict): + pass + + +class PaymentIntentUpdateParamsPaymentMethodDataQris(TypedDict): + pass + + +class PaymentIntentUpdateParamsPaymentMethodDataRadarOptions(TypedDict): + session: NotRequired[str] + """ + A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. + """ + + +class PaymentIntentUpdateParamsPaymentMethodDataRechnung(TypedDict): + dob: "PaymentIntentUpdateParamsPaymentMethodDataRechnungDob" + """ + Customer's date of birth + """ + + +class PaymentIntentUpdateParamsPaymentMethodDataRechnungDob(TypedDict): + day: int + """ + The day of birth, between 1 and 31. + """ + month: int + """ + The month of birth, between 1 and 12. + """ + year: int + """ + The four-digit year of birth. + """ + + +class PaymentIntentUpdateParamsPaymentMethodDataRevolutPay(TypedDict): + pass + + +class PaymentIntentUpdateParamsPaymentMethodDataSamsungPay(TypedDict): + pass + + +class PaymentIntentUpdateParamsPaymentMethodDataSatispay(TypedDict): + pass + + +class PaymentIntentUpdateParamsPaymentMethodDataSepaDebit(TypedDict): + iban: str + """ + IBAN of the bank account. + """ + + +class PaymentIntentUpdateParamsPaymentMethodDataShopeepay(TypedDict): + pass + + +class PaymentIntentUpdateParamsPaymentMethodDataSofort(TypedDict): + country: Literal["AT", "BE", "DE", "ES", "IT", "NL"] + """ + Two-letter ISO code representing the country the bank account is located in. + """ + + +class PaymentIntentUpdateParamsPaymentMethodDataStripeBalance(TypedDict): + account: NotRequired[str] + """ + The connected account ID whose Stripe balance to use as the source of payment + """ + source_type: NotRequired[Literal["bank_account", "card", "fpx"]] + """ + The [source_type](https://docs.stripe.com/api/balance/balance_object#balance_object-available-source_types) of the balance + """ + + +class PaymentIntentUpdateParamsPaymentMethodDataSwish(TypedDict): + pass + + +class PaymentIntentUpdateParamsPaymentMethodDataTwint(TypedDict): + pass + + +class PaymentIntentUpdateParamsPaymentMethodDataUsBankAccount(TypedDict): + account_holder_type: NotRequired[Literal["company", "individual"]] + """ + Account holder type: individual or company. + """ + account_number: NotRequired[str] + """ + Account number of the bank account. + """ + account_type: NotRequired[Literal["checking", "savings"]] + """ + Account type: checkings or savings. Defaults to checking if omitted. + """ + financial_connections_account: NotRequired[str] + """ + The ID of a Financial Connections Account to use as a payment method. + """ + routing_number: NotRequired[str] + """ + Routing number of the bank account. + """ + + +class PaymentIntentUpdateParamsPaymentMethodDataWechatPay(TypedDict): + pass + + +class PaymentIntentUpdateParamsPaymentMethodDataZip(TypedDict): + pass + + +class PaymentIntentUpdateParamsPaymentMethodOptions(TypedDict): + acss_debit: NotRequired[ + "Literal['']|PaymentIntentUpdateParamsPaymentMethodOptionsAcssDebit" + ] + """ + If this is a `acss_debit` PaymentMethod, this sub-hash contains details about the ACSS Debit payment method options. + """ + affirm: NotRequired[ + "Literal['']|PaymentIntentUpdateParamsPaymentMethodOptionsAffirm" + ] + """ + If this is an `affirm` PaymentMethod, this sub-hash contains details about the Affirm payment method options. + """ + afterpay_clearpay: NotRequired[ + "Literal['']|PaymentIntentUpdateParamsPaymentMethodOptionsAfterpayClearpay" + ] + """ + If this is a `afterpay_clearpay` PaymentMethod, this sub-hash contains details about the Afterpay Clearpay payment method options. + """ + alipay: NotRequired[ + "Literal['']|PaymentIntentUpdateParamsPaymentMethodOptionsAlipay" + ] + """ + If this is a `alipay` PaymentMethod, this sub-hash contains details about the Alipay payment method options. + """ + alma: NotRequired[ + "Literal['']|PaymentIntentUpdateParamsPaymentMethodOptionsAlma" + ] + """ + If this is a `alma` PaymentMethod, this sub-hash contains details about the Alma payment method options. + """ + amazon_pay: NotRequired[ + "Literal['']|PaymentIntentUpdateParamsPaymentMethodOptionsAmazonPay" + ] + """ + If this is a `amazon_pay` PaymentMethod, this sub-hash contains details about the Amazon Pay payment method options. + """ + au_becs_debit: NotRequired[ + "Literal['']|PaymentIntentUpdateParamsPaymentMethodOptionsAuBecsDebit" + ] + """ + If this is a `au_becs_debit` PaymentMethod, this sub-hash contains details about the AU BECS Direct Debit payment method options. + """ + bacs_debit: NotRequired[ + "Literal['']|PaymentIntentUpdateParamsPaymentMethodOptionsBacsDebit" + ] + """ + If this is a `bacs_debit` PaymentMethod, this sub-hash contains details about the BACS Debit payment method options. + """ + bancontact: NotRequired[ + "Literal['']|PaymentIntentUpdateParamsPaymentMethodOptionsBancontact" + ] + """ + If this is a `bancontact` PaymentMethod, this sub-hash contains details about the Bancontact payment method options. + """ + billie: NotRequired[ + "Literal['']|PaymentIntentUpdateParamsPaymentMethodOptionsBillie" + ] + """ + If this is a `billie` PaymentMethod, this sub-hash contains details about the Billie payment method options. + """ + blik: NotRequired[ + "Literal['']|PaymentIntentUpdateParamsPaymentMethodOptionsBlik" + ] + """ + If this is a `blik` PaymentMethod, this sub-hash contains details about the BLIK payment method options. + """ + boleto: NotRequired[ + "Literal['']|PaymentIntentUpdateParamsPaymentMethodOptionsBoleto" + ] + """ + If this is a `boleto` PaymentMethod, this sub-hash contains details about the Boleto payment method options. + """ + card: NotRequired[ + "Literal['']|PaymentIntentUpdateParamsPaymentMethodOptionsCard" + ] + """ + Configuration for any card payments attempted on this PaymentIntent. + """ + card_present: NotRequired[ + "Literal['']|PaymentIntentUpdateParamsPaymentMethodOptionsCardPresent" + ] + """ + If this is a `card_present` PaymentMethod, this sub-hash contains details about the Card Present payment method options. + """ + cashapp: NotRequired[ + "Literal['']|PaymentIntentUpdateParamsPaymentMethodOptionsCashapp" + ] + """ + If this is a `cashapp` PaymentMethod, this sub-hash contains details about the Cash App Pay payment method options. + """ + crypto: NotRequired[ + "Literal['']|PaymentIntentUpdateParamsPaymentMethodOptionsCrypto" + ] + """ + If this is a `crypto` PaymentMethod, this sub-hash contains details about the Crypto payment method options. + """ + customer_balance: NotRequired[ + "Literal['']|PaymentIntentUpdateParamsPaymentMethodOptionsCustomerBalance" + ] + """ + If this is a `customer balance` PaymentMethod, this sub-hash contains details about the customer balance payment method options. + """ + eps: NotRequired[ + "Literal['']|PaymentIntentUpdateParamsPaymentMethodOptionsEps" + ] + """ + If this is a `eps` PaymentMethod, this sub-hash contains details about the EPS payment method options. + """ + fpx: NotRequired[ + "Literal['']|PaymentIntentUpdateParamsPaymentMethodOptionsFpx" + ] + """ + If this is a `fpx` PaymentMethod, this sub-hash contains details about the FPX payment method options. + """ + giropay: NotRequired[ + "Literal['']|PaymentIntentUpdateParamsPaymentMethodOptionsGiropay" + ] + """ + If this is a `giropay` PaymentMethod, this sub-hash contains details about the Giropay payment method options. + """ + gopay: NotRequired[ + "Literal['']|PaymentIntentUpdateParamsPaymentMethodOptionsGopay" + ] + """ + If this is a `gopay` PaymentMethod, this sub-hash contains details about the Gopay payment method options. + """ + grabpay: NotRequired[ + "Literal['']|PaymentIntentUpdateParamsPaymentMethodOptionsGrabpay" + ] + """ + If this is a `grabpay` PaymentMethod, this sub-hash contains details about the Grabpay payment method options. + """ + id_bank_transfer: NotRequired[ + "Literal['']|PaymentIntentUpdateParamsPaymentMethodOptionsIdBankTransfer" + ] + """ + If this is a `id_bank_transfer` PaymentMethod, this sub-hash contains details about the Indonesia Bank Transfer payment method options. + """ + ideal: NotRequired[ + "Literal['']|PaymentIntentUpdateParamsPaymentMethodOptionsIdeal" + ] + """ + If this is a `ideal` PaymentMethod, this sub-hash contains details about the Ideal payment method options. + """ + interac_present: NotRequired[ + "Literal['']|PaymentIntentUpdateParamsPaymentMethodOptionsInteracPresent" + ] + """ + If this is a `interac_present` PaymentMethod, this sub-hash contains details about the Card Present payment method options. + """ + kakao_pay: NotRequired[ + "Literal['']|PaymentIntentUpdateParamsPaymentMethodOptionsKakaoPay" + ] + """ + If this is a `kakao_pay` PaymentMethod, this sub-hash contains details about the Kakao Pay payment method options. + """ + klarna: NotRequired[ + "Literal['']|PaymentIntentUpdateParamsPaymentMethodOptionsKlarna" + ] + """ + If this is a `klarna` PaymentMethod, this sub-hash contains details about the Klarna payment method options. + """ + konbini: NotRequired[ + "Literal['']|PaymentIntentUpdateParamsPaymentMethodOptionsKonbini" + ] + """ + If this is a `konbini` PaymentMethod, this sub-hash contains details about the Konbini payment method options. + """ + kr_card: NotRequired[ + "Literal['']|PaymentIntentUpdateParamsPaymentMethodOptionsKrCard" + ] + """ + If this is a `kr_card` PaymentMethod, this sub-hash contains details about the KR Card payment method options. + """ + link: NotRequired[ + "Literal['']|PaymentIntentUpdateParamsPaymentMethodOptionsLink" + ] + """ + If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options. + """ + mb_way: NotRequired[ + "Literal['']|PaymentIntentUpdateParamsPaymentMethodOptionsMbWay" + ] + """ + If this is a `mb_way` PaymentMethod, this sub-hash contains details about the MB WAY payment method options. + """ + mobilepay: NotRequired[ + "Literal['']|PaymentIntentUpdateParamsPaymentMethodOptionsMobilepay" + ] + """ + If this is a `MobilePay` PaymentMethod, this sub-hash contains details about the MobilePay payment method options. + """ + multibanco: NotRequired[ + "Literal['']|PaymentIntentUpdateParamsPaymentMethodOptionsMultibanco" + ] + """ + If this is a `multibanco` PaymentMethod, this sub-hash contains details about the Multibanco payment method options. + """ + naver_pay: NotRequired[ + "Literal['']|PaymentIntentUpdateParamsPaymentMethodOptionsNaverPay" + ] + """ + If this is a `naver_pay` PaymentMethod, this sub-hash contains details about the Naver Pay payment method options. + """ + nz_bank_account: NotRequired[ + "Literal['']|PaymentIntentUpdateParamsPaymentMethodOptionsNzBankAccount" + ] + """ + If this is a `nz_bank_account` PaymentMethod, this sub-hash contains details about the NZ BECS Direct Debit payment method options. + """ + oxxo: NotRequired[ + "Literal['']|PaymentIntentUpdateParamsPaymentMethodOptionsOxxo" + ] + """ + If this is a `oxxo` PaymentMethod, this sub-hash contains details about the OXXO payment method options. + """ + p24: NotRequired[ + "Literal['']|PaymentIntentUpdateParamsPaymentMethodOptionsP24" + ] + """ + If this is a `p24` PaymentMethod, this sub-hash contains details about the Przelewy24 payment method options. + """ + pay_by_bank: NotRequired[ + "Literal['']|PaymentIntentUpdateParamsPaymentMethodOptionsPayByBank" + ] + """ + If this is a `pay_by_bank` PaymentMethod, this sub-hash contains details about the PayByBank payment method options. + """ + payco: NotRequired[ + "Literal['']|PaymentIntentUpdateParamsPaymentMethodOptionsPayco" + ] + """ + If this is a `payco` PaymentMethod, this sub-hash contains details about the PAYCO payment method options. + """ + paynow: NotRequired[ + "Literal['']|PaymentIntentUpdateParamsPaymentMethodOptionsPaynow" + ] + """ + If this is a `paynow` PaymentMethod, this sub-hash contains details about the PayNow payment method options. + """ + paypal: NotRequired[ + "Literal['']|PaymentIntentUpdateParamsPaymentMethodOptionsPaypal" + ] + """ + If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options. + """ + paypay: NotRequired[ + "Literal['']|PaymentIntentUpdateParamsPaymentMethodOptionsPaypay" + ] + """ + If this is a `paypay` PaymentMethod, this sub-hash contains details about the PayPay payment method options. + """ + payto: NotRequired[ + "Literal['']|PaymentIntentUpdateParamsPaymentMethodOptionsPayto" + ] + """ + If this is a `payto` PaymentMethod, this sub-hash contains details about the PayTo payment method options. + """ + pix: NotRequired[ + "Literal['']|PaymentIntentUpdateParamsPaymentMethodOptionsPix" + ] + """ + If this is a `pix` PaymentMethod, this sub-hash contains details about the Pix payment method options. + """ + promptpay: NotRequired[ + "Literal['']|PaymentIntentUpdateParamsPaymentMethodOptionsPromptpay" + ] + """ + If this is a `promptpay` PaymentMethod, this sub-hash contains details about the PromptPay payment method options. + """ + qris: NotRequired[ + "Literal['']|PaymentIntentUpdateParamsPaymentMethodOptionsQris" + ] + """ + If this is a `qris` PaymentMethod, this sub-hash contains details about the QRIS payment method options. + """ + rechnung: NotRequired[ + "Literal['']|PaymentIntentUpdateParamsPaymentMethodOptionsRechnung" + ] + """ + If this is a `rechnung` PaymentMethod, this sub-hash contains details about the Rechnung payment method options. + """ + revolut_pay: NotRequired[ + "Literal['']|PaymentIntentUpdateParamsPaymentMethodOptionsRevolutPay" + ] + """ + If this is a `revolut_pay` PaymentMethod, this sub-hash contains details about the Revolut Pay payment method options. + """ + samsung_pay: NotRequired[ + "Literal['']|PaymentIntentUpdateParamsPaymentMethodOptionsSamsungPay" + ] + """ + If this is a `samsung_pay` PaymentMethod, this sub-hash contains details about the Samsung Pay payment method options. + """ + satispay: NotRequired[ + "Literal['']|PaymentIntentUpdateParamsPaymentMethodOptionsSatispay" + ] + """ + If this is a `satispay` PaymentMethod, this sub-hash contains details about the Satispay payment method options. + """ + sepa_debit: NotRequired[ + "Literal['']|PaymentIntentUpdateParamsPaymentMethodOptionsSepaDebit" + ] + """ + If this is a `sepa_debit` PaymentIntent, this sub-hash contains details about the SEPA Debit payment method options. + """ + shopeepay: NotRequired[ + "Literal['']|PaymentIntentUpdateParamsPaymentMethodOptionsShopeepay" + ] + """ + If this is a `shopeepay` PaymentMethod, this sub-hash contains details about the ShopeePay payment method options. + """ + sofort: NotRequired[ + "Literal['']|PaymentIntentUpdateParamsPaymentMethodOptionsSofort" + ] + """ + If this is a `sofort` PaymentMethod, this sub-hash contains details about the SOFORT payment method options. + """ + stripe_balance: NotRequired[ + "Literal['']|PaymentIntentUpdateParamsPaymentMethodOptionsStripeBalance" + ] + """ + If this is a `stripe_balance` PaymentMethod, this sub-hash contains details about the Stripe Balance payment method options. + """ + swish: NotRequired[ + "Literal['']|PaymentIntentUpdateParamsPaymentMethodOptionsSwish" + ] + """ + If this is a `Swish` PaymentMethod, this sub-hash contains details about the Swish payment method options. + """ + twint: NotRequired[ + "Literal['']|PaymentIntentUpdateParamsPaymentMethodOptionsTwint" + ] + """ + If this is a `twint` PaymentMethod, this sub-hash contains details about the TWINT payment method options. + """ + us_bank_account: NotRequired[ + "Literal['']|PaymentIntentUpdateParamsPaymentMethodOptionsUsBankAccount" + ] + """ + If this is a `us_bank_account` PaymentMethod, this sub-hash contains details about the US bank account payment method options. + """ + wechat_pay: NotRequired[ + "Literal['']|PaymentIntentUpdateParamsPaymentMethodOptionsWechatPay" + ] + """ + If this is a `wechat_pay` PaymentMethod, this sub-hash contains details about the WeChat Pay payment method options. + """ + zip: NotRequired[ + "Literal['']|PaymentIntentUpdateParamsPaymentMethodOptionsZip" + ] + """ + If this is a `zip` PaymentMethod, this sub-hash contains details about the Zip payment method options. + """ + + +class PaymentIntentUpdateParamsPaymentMethodOptionsAcssDebit(TypedDict): + mandate_options: NotRequired[ + "PaymentIntentUpdateParamsPaymentMethodOptionsAcssDebitMandateOptions" + ] + """ + Additional fields for Mandate creation + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session', 'on_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + target_date: NotRequired[str] + """ + Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + """ + verification_method: NotRequired[ + Literal["automatic", "instant", "microdeposits"] + ] + """ + Bank account verification method. + """ + + +class PaymentIntentUpdateParamsPaymentMethodOptionsAcssDebitMandateOptions( + TypedDict, +): + custom_mandate_url: NotRequired["Literal['']|str"] + """ + A URL for custom mandate text to render during confirmation step. + The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent, + or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent. + """ + interval_description: NotRequired[str] + """ + Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'. + """ + payment_schedule: NotRequired[Literal["combined", "interval", "sporadic"]] + """ + Payment schedule for the mandate. + """ + transaction_type: NotRequired[Literal["business", "personal"]] + """ + Transaction type of the mandate. + """ + + +class PaymentIntentUpdateParamsPaymentMethodOptionsAffirm(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + preferred_locale: NotRequired[str] + """ + Preferred language of the Affirm authorization page that the customer is redirected to. + """ + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentUpdateParamsPaymentMethodOptionsAfterpayClearpay(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + reference: NotRequired[str] + """ + An internal identifier or reference that this payment corresponds to. You must limit the identifier to 128 characters, and it can only contain letters, numbers, underscores, backslashes, and dashes. + This field differs from the statement descriptor and item name. + """ + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentUpdateParamsPaymentMethodOptionsAlipay(TypedDict): + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentUpdateParamsPaymentMethodOptionsAlma(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + + +class PaymentIntentUpdateParamsPaymentMethodOptionsAmazonPay(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + """ + + +class PaymentIntentUpdateParamsPaymentMethodOptionsAuBecsDebit(TypedDict): + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session', 'on_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + target_date: NotRequired[str] + """ + Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + """ + + +class PaymentIntentUpdateParamsPaymentMethodOptionsBacsDebit(TypedDict): + mandate_options: NotRequired[ + "PaymentIntentUpdateParamsPaymentMethodOptionsBacsDebitMandateOptions" + ] + """ + Additional fields for Mandate creation + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session', 'on_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + target_date: NotRequired[str] + """ + Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + """ + + +class PaymentIntentUpdateParamsPaymentMethodOptionsBacsDebitMandateOptions( + TypedDict, +): + reference_prefix: NotRequired["Literal['']|str"] + """ + Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'. + """ + + +class PaymentIntentUpdateParamsPaymentMethodOptionsBancontact(TypedDict): + preferred_language: NotRequired[Literal["de", "en", "fr", "nl"]] + """ + Preferred language of the Bancontact authorization page that the customer is redirected to. + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentUpdateParamsPaymentMethodOptionsBillie(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + + +class PaymentIntentUpdateParamsPaymentMethodOptionsBlik(TypedDict): + code: NotRequired[str] + """ + The 6-digit BLIK code that a customer has generated using their banking application. Can only be set on confirmation. + """ + setup_future_usage: NotRequired["Literal['']|Literal['none']"] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentUpdateParamsPaymentMethodOptionsBoleto(TypedDict): + expires_after_days: NotRequired[int] + """ + The number of calendar days before a Boleto voucher expires. For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto invoice will expire on Wednesday at 23:59 America/Sao_Paulo time. + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session', 'on_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentUpdateParamsPaymentMethodOptionsCard(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + cvc_token: NotRequired[str] + """ + A single-use `cvc_update` Token that represents a card CVC value. When provided, the CVC value will be verified during the card payment attempt. This parameter can only be provided during confirmation. + """ + installments: NotRequired[ + "PaymentIntentUpdateParamsPaymentMethodOptionsCardInstallments" + ] + """ + Installment configuration for payments attempted on this PaymentIntent. + + For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments). + """ + mandate_options: NotRequired[ + "PaymentIntentUpdateParamsPaymentMethodOptionsCardMandateOptions" + ] + """ + Configuration options for setting up an eMandate for cards issued in India. + """ + moto: NotRequired[bool] + """ + When specified, this parameter indicates that a transaction will be marked + as MOTO (Mail Order Telephone Order) and thus out of scope for SCA. This + parameter can only be provided during confirmation. + """ + network: NotRequired[ + Literal[ + "amex", + "cartes_bancaires", + "diners", + "discover", + "eftpos_au", + "girocard", + "interac", + "jcb", + "link", + "mastercard", + "unionpay", + "unknown", + "visa", + ] + ] + """ + Selected network to process this PaymentIntent on. Depends on the available networks of the card attached to the PaymentIntent. Can be only set confirm-time. + """ + request_decremental_authorization: NotRequired[ + Literal["if_available", "never"] + ] + """ + Request ability to [decrement the authorization](https://stripe.com/docs/payments/decremental-authorization) for this PaymentIntent. + """ + request_extended_authorization: NotRequired[ + Literal["if_available", "never"] + ] + """ + Request ability to [capture beyond the standard authorization validity window](https://stripe.com/docs/payments/extended-authorization) for this PaymentIntent. + """ + request_incremental_authorization: NotRequired[ + Literal["if_available", "never"] + ] + """ + Request ability to [increment the authorization](https://stripe.com/docs/payments/incremental-authorization) for this PaymentIntent. + """ + request_multicapture: NotRequired[Literal["if_available", "never"]] + """ + Request ability to make [multiple captures](https://stripe.com/docs/payments/multicapture) for this PaymentIntent. + """ + request_overcapture: NotRequired[Literal["if_available", "never"]] + """ + Request ability to [overcapture](https://stripe.com/docs/payments/overcapture) for this PaymentIntent. + """ + request_partial_authorization: NotRequired[ + Literal["if_available", "never"] + ] + """ + Request partial authorization on this PaymentIntent. + """ + request_three_d_secure: NotRequired[ + Literal["any", "automatic", "challenge"] + ] + """ + We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + """ + require_cvc_recollection: NotRequired[bool] + """ + When enabled, using a card that is attached to a customer will require the CVC to be provided again (i.e. using the cvc_token parameter). + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session', 'on_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + statement_descriptor_suffix_kana: NotRequired["Literal['']|str"] + """ + Provides information about a card payment that customers see on their statements. Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor that's set on the account to form the complete statement descriptor. Maximum 22 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 22 characters. + """ + statement_descriptor_suffix_kanji: NotRequired["Literal['']|str"] + """ + Provides information about a card payment that customers see on their statements. Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement descriptor that's set on the account to form the complete statement descriptor. Maximum 17 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 17 characters. + """ + statement_details: NotRequired[ + "Literal['']|PaymentIntentUpdateParamsPaymentMethodOptionsCardStatementDetails" + ] + """ + Statement details for this payment intent. You can use this to override the merchant details shown on your customers' statements. + """ + three_d_secure: NotRequired[ + "PaymentIntentUpdateParamsPaymentMethodOptionsCardThreeDSecure" + ] + """ + If 3D Secure authentication was performed with a third-party provider, + the authentication details to use for this payment. + """ + + +class PaymentIntentUpdateParamsPaymentMethodOptionsCardInstallments(TypedDict): + enabled: NotRequired[bool] + """ + Setting to true enables installments for this PaymentIntent. + This will cause the response to contain a list of available installment plans. + Setting to false will prevent any selected plan from applying to a charge. + """ + plan: NotRequired[ + "Literal['']|PaymentIntentUpdateParamsPaymentMethodOptionsCardInstallmentsPlan" + ] + """ + The selected installment plan to use for this payment attempt. + This parameter can only be provided during confirmation. + """ + + +class PaymentIntentUpdateParamsPaymentMethodOptionsCardInstallmentsPlan( + TypedDict, +): + count: NotRequired[int] + """ + For `fixed_count` installment plans, this is required. It represents the number of installment payments your customer will make to their credit card. + """ + interval: NotRequired[Literal["month"]] + """ + For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card. + One of `month`. + """ + type: Literal["bonus", "fixed_count", "revolving"] + """ + Type of installment plan, one of `fixed_count`, `bonus`, or `revolving`. + """ + + +class PaymentIntentUpdateParamsPaymentMethodOptionsCardMandateOptions( + TypedDict, +): + amount: int + """ + Amount to be charged for future payments. + """ + amount_type: Literal["fixed", "maximum"] + """ + One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. + """ + description: NotRequired[str] + """ + A description of the mandate or subscription that is meant to be displayed to the customer. + """ + end_date: NotRequired[int] + """ + End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. + """ + interval: Literal["day", "month", "sporadic", "week", "year"] + """ + Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`. + """ + interval_count: NotRequired[int] + """ + The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`. + """ + reference: str + """ + Unique identifier for the mandate or subscription. + """ + start_date: int + """ + Start date of the mandate or subscription. Start date should not be lesser than yesterday. + """ + supported_types: NotRequired[List[Literal["india"]]] + """ + Specifies the type of mandates supported. Possible values are `india`. + """ + + +class PaymentIntentUpdateParamsPaymentMethodOptionsCardStatementDetails( + TypedDict, +): + address: NotRequired[ + "PaymentIntentUpdateParamsPaymentMethodOptionsCardStatementDetailsAddress" + ] + """ + Please pass in an address that is within your Stripe user account country + """ + phone: NotRequired[str] + """ + Phone number (e.g., a toll-free number that customers can call) + """ + + +class PaymentIntentUpdateParamsPaymentMethodOptionsCardStatementDetailsAddress( + 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. + """ + + +class PaymentIntentUpdateParamsPaymentMethodOptionsCardThreeDSecure(TypedDict): + ares_trans_status: NotRequired[Literal["A", "C", "I", "N", "R", "U", "Y"]] + """ + The `transStatus` returned from the card Issuer's ACS in the ARes. + """ + cryptogram: str + """ + The cryptogram, also known as the "authentication value" (AAV, CAVV or + AEVV). This value is 20 bytes, base64-encoded into a 28-character string. + (Most 3D Secure providers will return the base64-encoded version, which + is what you should specify here.) + """ + electronic_commerce_indicator: NotRequired[ + Literal["01", "02", "05", "06", "07"] + ] + """ + The Electronic Commerce Indicator (ECI) is returned by your 3D Secure + provider and indicates what degree of authentication was performed. + """ + exemption_indicator: NotRequired[Literal["low_risk", "none"]] + """ + The exemption requested via 3DS and accepted by the issuer at authentication time. + """ + network_options: NotRequired[ + "PaymentIntentUpdateParamsPaymentMethodOptionsCardThreeDSecureNetworkOptions" + ] + """ + Network specific 3DS fields. Network specific arguments require an + explicit card brand choice. The parameter `payment_method_options.card.network`` + must be populated accordingly + """ + requestor_challenge_indicator: NotRequired[str] + """ + The challenge indicator (`threeDSRequestorChallengeInd`) which was requested in the + AReq sent to the card Issuer's ACS. A string containing 2 digits from 01-99. + """ + transaction_id: str + """ + For 3D Secure 1, the XID. For 3D Secure 2, the Directory Server + Transaction ID (dsTransID). + """ + version: Literal["1.0.2", "2.1.0", "2.2.0"] + """ + The version of 3D Secure that was performed. + """ + + +class PaymentIntentUpdateParamsPaymentMethodOptionsCardThreeDSecureNetworkOptions( + TypedDict, +): + cartes_bancaires: NotRequired[ + "PaymentIntentUpdateParamsPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancaires" + ] + """ + Cartes Bancaires-specific 3DS fields. + """ + + +class PaymentIntentUpdateParamsPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancaires( + TypedDict, +): + cb_avalgo: Literal["0", "1", "2", "3", "4", "A"] + """ + The cryptogram calculation algorithm used by the card Issuer's ACS + to calculate the Authentication cryptogram. Also known as `cavvAlgorithm`. + messageExtension: CB-AVALGO + """ + cb_exemption: NotRequired[str] + """ + The exemption indicator returned from Cartes Bancaires in the ARes. + message extension: CB-EXEMPTION; string (4 characters) + This is a 3 byte bitmap (low significant byte first and most significant + bit first) that has been Base64 encoded + """ + cb_score: NotRequired[int] + """ + The risk score returned from Cartes Bancaires in the ARes. + message extension: CB-SCORE; numeric value 0-99 + """ + + +class PaymentIntentUpdateParamsPaymentMethodOptionsCardPresent(TypedDict): + request_extended_authorization: NotRequired[bool] + """ + Request ability to capture this payment beyond the standard [authorization validity window](https://stripe.com/docs/terminal/features/extended-authorizations#authorization-validity) + """ + request_incremental_authorization_support: NotRequired[bool] + """ + Request ability to [increment](https://stripe.com/docs/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://stripe.com/docs/api/payment_intents/confirm) response to verify support. + """ + routing: NotRequired[ + "PaymentIntentUpdateParamsPaymentMethodOptionsCardPresentRouting" + ] + """ + Network routing priority on co-branded EMV cards supporting domestic debit and international card schemes. + """ + + +class PaymentIntentUpdateParamsPaymentMethodOptionsCardPresentRouting( + TypedDict, +): + requested_priority: NotRequired[Literal["domestic", "international"]] + """ + Routing requested priority + """ + + +class PaymentIntentUpdateParamsPaymentMethodOptionsCashapp(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session', 'on_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentUpdateParamsPaymentMethodOptionsCrypto(TypedDict): + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentUpdateParamsPaymentMethodOptionsCustomerBalance(TypedDict): + bank_transfer: NotRequired[ + "PaymentIntentUpdateParamsPaymentMethodOptionsCustomerBalanceBankTransfer" + ] + """ + Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. + """ + funding_type: NotRequired[Literal["bank_transfer"]] + """ + The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. + """ + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentUpdateParamsPaymentMethodOptionsCustomerBalanceBankTransfer( + TypedDict, +): + eu_bank_transfer: NotRequired[ + "PaymentIntentUpdateParamsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer" + ] + """ + Configuration for the eu_bank_transfer funding type. + """ + requested_address_types: NotRequired[ + List[ + Literal[ + "aba", "iban", "sepa", "sort_code", "spei", "swift", "zengin" + ] + ] + ] + """ + List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned. + + Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`. + """ + type: Literal[ + "eu_bank_transfer", + "gb_bank_transfer", + "jp_bank_transfer", + "mx_bank_transfer", + "us_bank_transfer", + ] + """ + The list of bank transfer types that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. + """ + + +class PaymentIntentUpdateParamsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer( + TypedDict, +): + country: str + """ + The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. + """ + + +class PaymentIntentUpdateParamsPaymentMethodOptionsEps(TypedDict): + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentUpdateParamsPaymentMethodOptionsFpx(TypedDict): + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentUpdateParamsPaymentMethodOptionsGiropay(TypedDict): + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentUpdateParamsPaymentMethodOptionsGopay(TypedDict): + setup_future_usage: NotRequired[Literal["none", "off_session"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentUpdateParamsPaymentMethodOptionsGrabpay(TypedDict): + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentUpdateParamsPaymentMethodOptionsIdBankTransfer(TypedDict): + expires_after: NotRequired[int] + """ + The UNIX timestamp until which the virtual bank account is valid. Permitted range is from 5 minutes from now until 31 days from now. If unset, it defaults to 3 days from now. + """ + expires_at: NotRequired[int] + """ + The UNIX timestamp until which the virtual bank account is valid. Permitted range is from now until 30 days from now. If unset, it defaults to 1 days from now. + """ + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentUpdateParamsPaymentMethodOptionsIdeal(TypedDict): + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentUpdateParamsPaymentMethodOptionsInteracPresent(TypedDict): + pass + + +class PaymentIntentUpdateParamsPaymentMethodOptionsKakaoPay(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + """ + + +class PaymentIntentUpdateParamsPaymentMethodOptionsKlarna(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + on_demand: NotRequired[ + "PaymentIntentUpdateParamsPaymentMethodOptionsKlarnaOnDemand" + ] + """ + On-demand details if setting up or charging an on-demand payment. + """ + preferred_locale: NotRequired[ + Literal[ + "cs-CZ", + "da-DK", + "de-AT", + "de-CH", + "de-DE", + "el-GR", + "en-AT", + "en-AU", + "en-BE", + "en-CA", + "en-CH", + "en-CZ", + "en-DE", + "en-DK", + "en-ES", + "en-FI", + "en-FR", + "en-GB", + "en-GR", + "en-IE", + "en-IT", + "en-NL", + "en-NO", + "en-NZ", + "en-PL", + "en-PT", + "en-RO", + "en-SE", + "en-US", + "es-ES", + "es-US", + "fi-FI", + "fr-BE", + "fr-CA", + "fr-CH", + "fr-FR", + "it-CH", + "it-IT", + "nb-NO", + "nl-BE", + "nl-NL", + "pl-PL", + "pt-PT", + "ro-RO", + "sv-FI", + "sv-SE", + ] + ] + """ + Preferred language of the Klarna authorization page that the customer is redirected to + """ + setup_future_usage: NotRequired[ + Literal["none", "off_session", "on_session"] + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + subscriptions: NotRequired[ + "Literal['']|List[PaymentIntentUpdateParamsPaymentMethodOptionsKlarnaSubscription]" + ] + """ + Subscription details if setting up or charging a subscription. + """ + + +class PaymentIntentUpdateParamsPaymentMethodOptionsKlarnaOnDemand(TypedDict): + average_amount: NotRequired[int] + """ + Your average amount value. You can use a value across your customer base, or segment based on customer type, country, etc. + """ + maximum_amount: NotRequired[int] + """ + The maximum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. + """ + minimum_amount: NotRequired[int] + """ + The lowest or minimum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. + """ + purchase_interval: NotRequired[Literal["day", "month", "week", "year"]] + """ + Interval at which the customer is making purchases + """ + purchase_interval_count: NotRequired[int] + """ + The number of `purchase_interval` between charges + """ + + +class PaymentIntentUpdateParamsPaymentMethodOptionsKlarnaSubscription( + TypedDict, +): + interval: Literal["day", "month", "week", "year"] + """ + Unit of time between subscription charges. + """ + interval_count: NotRequired[int] + """ + The number of intervals (specified in the `interval` attribute) between subscription charges. For example, `interval=month` and `interval_count=3` charges every 3 months. + """ + name: NotRequired[str] + """ + Name for subscription. + """ + next_billing: NotRequired[ + "PaymentIntentUpdateParamsPaymentMethodOptionsKlarnaSubscriptionNextBilling" + ] + """ + Describes the upcoming charge for this subscription. + """ + reference: str + """ + A non-customer-facing reference to correlate subscription charges in the Klarna app. Use a value that persists across subscription charges. + """ + + +class PaymentIntentUpdateParamsPaymentMethodOptionsKlarnaSubscriptionNextBilling( + TypedDict, +): + amount: int + """ + The amount of the next charge for the subscription. + """ + date: str + """ + The date of the next charge for the subscription in YYYY-MM-DD format. + """ + + +class PaymentIntentUpdateParamsPaymentMethodOptionsKonbini(TypedDict): + confirmation_number: NotRequired["Literal['']|str"] + """ + An optional 10 to 11 digit numeric-only string determining the confirmation code at applicable convenience stores. Must not consist of only zeroes and could be rejected in case of insufficient uniqueness. We recommend to use the customer's phone number. + """ + expires_after_days: NotRequired["Literal['']|int"] + """ + The number of calendar days (between 1 and 60) after which Konbini payment instructions will expire. For example, if a PaymentIntent is confirmed with Konbini and `expires_after_days` set to 2 on Monday JST, the instructions will expire on Wednesday 23:59:59 JST. Defaults to 3 days. + """ + expires_at: NotRequired["Literal['']|int"] + """ + The timestamp at which the Konbini payment instructions will expire. Only one of `expires_after_days` or `expires_at` may be set. + """ + product_description: NotRequired["Literal['']|str"] + """ + A product descriptor of up to 22 characters, which will appear to customers at the convenience store. + """ + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentUpdateParamsPaymentMethodOptionsKrCard(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + """ + + +class PaymentIntentUpdateParamsPaymentMethodOptionsLink(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + persistent_token: NotRequired[str] + """ + [Deprecated] This is a legacy parameter that no longer has any function. + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentUpdateParamsPaymentMethodOptionsMbWay(TypedDict): + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentUpdateParamsPaymentMethodOptionsMobilepay(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentUpdateParamsPaymentMethodOptionsMultibanco(TypedDict): + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentUpdateParamsPaymentMethodOptionsNaverPay(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + """ + + +class PaymentIntentUpdateParamsPaymentMethodOptionsNzBankAccount(TypedDict): + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session', 'on_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + target_date: NotRequired[str] + """ + Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + """ + + +class PaymentIntentUpdateParamsPaymentMethodOptionsOxxo(TypedDict): + expires_after_days: NotRequired[int] + """ + The number of calendar days before an OXXO voucher expires. For example, if you create an OXXO voucher on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time. + """ + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentUpdateParamsPaymentMethodOptionsP24(TypedDict): + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + tos_shown_and_accepted: NotRequired[bool] + """ + Confirm that the payer has accepted the P24 terms and conditions. + """ + + +class PaymentIntentUpdateParamsPaymentMethodOptionsPayByBank(TypedDict): + pass + + +class PaymentIntentUpdateParamsPaymentMethodOptionsPayco(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + + +class PaymentIntentUpdateParamsPaymentMethodOptionsPaynow(TypedDict): + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentUpdateParamsPaymentMethodOptionsPaypal(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds will be captured from the customer's account. + """ + line_items: NotRequired[ + List["PaymentIntentUpdateParamsPaymentMethodOptionsPaypalLineItem"] + ] + """ + The line items purchased by the customer. + """ + preferred_locale: NotRequired[ + Literal[ + "cs-CZ", + "da-DK", + "de-AT", + "de-DE", + "de-LU", + "el-GR", + "en-GB", + "en-US", + "es-ES", + "fi-FI", + "fr-BE", + "fr-FR", + "fr-LU", + "hu-HU", + "it-IT", + "nl-BE", + "nl-NL", + "pl-PL", + "pt-PT", + "sk-SK", + "sv-SE", + ] + ] + """ + [Preferred locale](https://stripe.com/docs/payments/paypal/supported-locales) of the PayPal checkout page that the customer is redirected to. + """ + reference: NotRequired[str] + """ + A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. + """ + reference_id: NotRequired[str] + """ + A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. + """ + risk_correlation_id: NotRequired[str] + """ + The risk correlation ID for an on-session payment using a saved PayPal payment method. + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + subsellers: NotRequired[List[str]] + """ + The Stripe connected account IDs of the sellers on the platform for this transaction (optional). Only allowed when [separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) are used. + """ + + +class PaymentIntentUpdateParamsPaymentMethodOptionsPaypalLineItem(TypedDict): + category: NotRequired[ + Literal["digital_goods", "donation", "physical_goods"] + ] + """ + Type of the line item. + """ + description: NotRequired[str] + """ + Description of the line item. + """ + name: str + """ + Descriptive name of the line item. + """ + quantity: int + """ + Quantity of the line item. Must be a positive number. + """ + sku: NotRequired[str] + """ + Client facing stock keeping unit, article number or similar. + """ + sold_by: NotRequired[str] + """ + The Stripe account ID of the connected account that sells the item. + """ + tax: NotRequired[ + "PaymentIntentUpdateParamsPaymentMethodOptionsPaypalLineItemTax" + ] + """ + The tax information for the line item. + """ + unit_amount: int + """ + Price for a single unit of the line item in minor units. Cannot be a negative number. + """ + + +class PaymentIntentUpdateParamsPaymentMethodOptionsPaypalLineItemTax( + TypedDict +): + amount: int + """ + The tax for a single unit of the line item in minor units. Cannot be a negative number. + """ + behavior: Literal["exclusive", "inclusive"] + """ + The tax behavior for the line item. + """ + + +class PaymentIntentUpdateParamsPaymentMethodOptionsPaypay(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + + +class PaymentIntentUpdateParamsPaymentMethodOptionsPayto(TypedDict): + mandate_options: NotRequired[ + "PaymentIntentUpdateParamsPaymentMethodOptionsPaytoMandateOptions" + ] + """ + Additional fields for Mandate creation. Only `purpose` field is configurable for PayTo PaymentIntent with `setup_future_usage=none`. Other fields are only applicable to PayTo PaymentIntent with `setup_future_usage=off_session` + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentUpdateParamsPaymentMethodOptionsPaytoMandateOptions( + TypedDict, +): + amount: NotRequired[int] + """ + Amount that will be collected. It is required when `amount_type` is `fixed`. + """ + amount_type: NotRequired[Literal["fixed", "maximum"]] + """ + The type of amount that will be collected. The amount charged must be exact or up to the value of `amount` param for `fixed` or `maximum` type respectively. + """ + end_date: NotRequired[str] + """ + Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no end date. + """ + payment_schedule: NotRequired[ + Literal[ + "adhoc", + "annual", + "daily", + "fortnightly", + "monthly", + "quarterly", + "semi_annual", + "weekly", + ] + ] + """ + The periodicity at which payments will be collected. + """ + payments_per_period: NotRequired[int] + """ + The number of payments that will be made during a payment period. Defaults to 1 except for when `payment_schedule` is `adhoc`. In that case, it defaults to no limit. + """ + purpose: NotRequired[ + Literal[ + "dependant_support", + "government", + "loan", + "mortgage", + "other", + "pension", + "personal", + "retail", + "salary", + "tax", + "utility", + ] + ] + """ + The purpose for which payments are made. Defaults to retail. + """ + + +class PaymentIntentUpdateParamsPaymentMethodOptionsPix(TypedDict): + amount_includes_iof: NotRequired[Literal["always", "never"]] + """ + Determines if the amount includes the IOF tax. Defaults to `never`. + """ + expires_after_seconds: NotRequired[int] + """ + The number of seconds (between 10 and 1209600) after which Pix payment will expire. Defaults to 86400 seconds. + """ + expires_at: NotRequired[int] + """ + The timestamp at which the Pix expires (between 10 and 1209600 seconds in the future). Defaults to 1 day in the future. + """ + mandate_options: NotRequired[ + "PaymentIntentUpdateParamsPaymentMethodOptionsPixMandateOptions" + ] + """ + Additional fields for mandate creation. Only applicable when `setup_future_usage=off_session`. + """ + setup_future_usage: NotRequired[Literal["none", "off_session"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentUpdateParamsPaymentMethodOptionsPixMandateOptions( + TypedDict +): + amount: NotRequired[int] + """ + Amount to be charged for future payments. Required when `amount_type=fixed`. If not provided for `amount_type=maximum`, defaults to 40000. + """ + amount_includes_iof: NotRequired[Literal["always", "never"]] + """ + Determines if the amount includes the IOF tax. Defaults to `never`. + """ + amount_type: NotRequired[Literal["fixed", "maximum"]] + """ + Type of amount. Defaults to `maximum`. + """ + currency: NotRequired[str] + """ + Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Only `brl` is supported currently. + """ + end_date: NotRequired[str] + """ + Date when the mandate expires and no further payments will be charged, in `YYYY-MM-DD`. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. + """ + payment_schedule: NotRequired[ + Literal["halfyearly", "monthly", "quarterly", "weekly", "yearly"] + ] + """ + Schedule at which the future payments will be charged. Defaults to `weekly`. + """ + reference: NotRequired[str] + """ + Subscription name displayed to buyers in their bank app. Defaults to the displayable business name. + """ + start_date: NotRequired[str] + """ + Start date of the mandate, in `YYYY-MM-DD`. Start date should be at least 3 days in the future. Defaults to 3 days after the current date. + """ + + +class PaymentIntentUpdateParamsPaymentMethodOptionsPromptpay(TypedDict): + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentUpdateParamsPaymentMethodOptionsQris(TypedDict): + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentUpdateParamsPaymentMethodOptionsRechnung(TypedDict): + pass + + +class PaymentIntentUpdateParamsPaymentMethodOptionsRevolutPay(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + """ + + +class PaymentIntentUpdateParamsPaymentMethodOptionsSamsungPay(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + + +class PaymentIntentUpdateParamsPaymentMethodOptionsSatispay(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds are captured from the customer's account. + + If provided, this parameter overrides the behavior of the top-level [capture_method](https://docs.stripe.com/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + + If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + """ + + +class PaymentIntentUpdateParamsPaymentMethodOptionsSepaDebit(TypedDict): + mandate_options: NotRequired[ + "PaymentIntentUpdateParamsPaymentMethodOptionsSepaDebitMandateOptions" + ] + """ + Additional fields for Mandate creation + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session', 'on_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + target_date: NotRequired[str] + """ + Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + """ + + +class PaymentIntentUpdateParamsPaymentMethodOptionsSepaDebitMandateOptions( + TypedDict, +): + reference_prefix: NotRequired["Literal['']|str"] + """ + Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'. + """ + + +class PaymentIntentUpdateParamsPaymentMethodOptionsShopeepay(TypedDict): + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentUpdateParamsPaymentMethodOptionsSofort(TypedDict): + preferred_language: NotRequired[ + "Literal['']|Literal['de', 'en', 'es', 'fr', 'it', 'nl', 'pl']" + ] + """ + Language shown to the payer on redirect. + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentUpdateParamsPaymentMethodOptionsStripeBalance(TypedDict): + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentUpdateParamsPaymentMethodOptionsSwish(TypedDict): + reference: NotRequired["Literal['']|str"] + """ + A reference for this payment to be displayed in the Swish app. + """ + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentUpdateParamsPaymentMethodOptionsTwint(TypedDict): + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentUpdateParamsPaymentMethodOptionsUsBankAccount(TypedDict): + financial_connections: NotRequired[ + "PaymentIntentUpdateParamsPaymentMethodOptionsUsBankAccountFinancialConnections" + ] + """ + Additional fields for Financial Connections Session creation + """ + mandate_options: NotRequired[ + "PaymentIntentUpdateParamsPaymentMethodOptionsUsBankAccountMandateOptions" + ] + """ + Additional fields for Mandate creation + """ + networks: NotRequired[ + "PaymentIntentUpdateParamsPaymentMethodOptionsUsBankAccountNetworks" + ] + """ + Additional fields for network related functions + """ + preferred_settlement_speed: NotRequired[ + "Literal['']|Literal['fastest', 'standard']" + ] + """ + Preferred transaction settlement speed + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session', 'on_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + target_date: NotRequired[str] + """ + Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + """ + verification_method: NotRequired[ + Literal["automatic", "instant", "microdeposits"] + ] + """ + Bank account verification method. + """ + + +class PaymentIntentUpdateParamsPaymentMethodOptionsUsBankAccountFinancialConnections( + TypedDict, +): + filters: NotRequired[ + "PaymentIntentUpdateParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters" + ] + """ + Provide filters for the linked accounts that the customer can select for the payment method. + """ + manual_entry: NotRequired[ + "PaymentIntentUpdateParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsManualEntry" + ] + """ + Customize manual entry behavior + """ + permissions: NotRequired[ + List[ + Literal["balances", "ownership", "payment_method", "transactions"] + ] + ] + """ + The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. + """ + prefetch: NotRequired[ + List[ + Literal[ + "balances", "inferred_balances", "ownership", "transactions" + ] + ] + ] + """ + List of data features that you would like to retrieve upon account creation. + """ + return_url: NotRequired[str] + """ + For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. + """ + + +class PaymentIntentUpdateParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters( + TypedDict, +): + account_subcategories: NotRequired[List[Literal["checking", "savings"]]] + """ + The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`. + """ + institution: NotRequired[str] + """ + ID of the institution to use to filter for selectable accounts. + """ + + +class PaymentIntentUpdateParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsManualEntry( + TypedDict, +): + mode: Literal["automatic", "custom"] + """ + Settings for configuring manual entry of account details. + """ + + +class PaymentIntentUpdateParamsPaymentMethodOptionsUsBankAccountMandateOptions( + TypedDict, +): + collection_method: NotRequired["Literal['']|Literal['paper']"] + """ + The method used to collect offline mandate customer acceptance. + """ + + +class PaymentIntentUpdateParamsPaymentMethodOptionsUsBankAccountNetworks( + TypedDict, +): + requested: NotRequired[List[Literal["ach", "us_domestic_wire"]]] + """ + Triggers validations to run across the selected networks + """ + + +class PaymentIntentUpdateParamsPaymentMethodOptionsWechatPay(TypedDict): + app_id: NotRequired[str] + """ + The app ID registered with WeChat Pay. Only required when client is ios or android. + """ + client: NotRequired[Literal["android", "ios", "web"]] + """ + The client type that the end customer will pay from + """ + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentUpdateParamsPaymentMethodOptionsZip(TypedDict): + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + + +class PaymentIntentUpdateParamsShipping(TypedDict): + address: "PaymentIntentUpdateParamsShippingAddress" + """ + Shipping address. + """ + carrier: NotRequired[str] + """ + The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. + """ + name: str + """ + Recipient name. + """ + phone: NotRequired[str] + """ + Recipient phone (including extension). + """ + tracking_number: NotRequired[str] + """ + The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. + """ + + +class PaymentIntentUpdateParamsShippingAddress(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. + """ + + +class PaymentIntentUpdateParamsTransferData(TypedDict): + amount: NotRequired[int] + """ + The amount that will be transferred automatically when a charge succeeds. + """ diff --git a/stripe/params/_payment_intent_verify_microdeposits_params.py b/stripe/params/_payment_intent_verify_microdeposits_params.py new file mode 100644 index 000000000..d00db29ba --- /dev/null +++ b/stripe/params/_payment_intent_verify_microdeposits_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 PaymentIntentVerifyMicrodepositsParams(RequestOptions): + amounts: NotRequired[List[int]] + """ + Two positive integers, in *cents*, equal to the values of the microdeposits sent to the bank account. + """ + descriptor_code: NotRequired[str] + """ + A six-character code starting with SM present in the microdeposit sent to the bank account. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_payment_link_create_params.py b/stripe/params/_payment_link_create_params.py new file mode 100644 index 000000000..3f3cb469a --- /dev/null +++ b/stripe/params/_payment_link_create_params.py @@ -0,0 +1,1061 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class PaymentLinkCreateParams(RequestOptions): + after_completion: NotRequired["PaymentLinkCreateParamsAfterCompletion"] + """ + Behavior after the purchase is complete. + """ + allow_promotion_codes: NotRequired[bool] + """ + Enables user redeemable promotion codes. + """ + application_fee_amount: NotRequired[int] + """ + The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. Can only be applied when there are no line items with recurring prices. + """ + application_fee_percent: NotRequired[float] + """ + A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. There must be at least 1 line item with a recurring price to use this field. + """ + automatic_tax: NotRequired["PaymentLinkCreateParamsAutomaticTax"] + """ + Configuration for automatic tax collection. + """ + billing_address_collection: NotRequired[Literal["auto", "required"]] + """ + Configuration for collecting the customer's billing address. Defaults to `auto`. + """ + consent_collection: NotRequired["PaymentLinkCreateParamsConsentCollection"] + """ + Configure fields to gather active consent from customers. + """ + currency: NotRequired[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) and supported by each line item's price. + """ + custom_fields: NotRequired[List["PaymentLinkCreateParamsCustomField"]] + """ + Collect additional information from your customer using custom fields. Up to 3 fields are supported. + """ + custom_text: NotRequired["PaymentLinkCreateParamsCustomText"] + """ + Display additional text for your customers using custom text. + """ + customer_creation: NotRequired[Literal["always", "if_required"]] + """ + Configures whether [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link create a [Customer](https://stripe.com/docs/api/customers). + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + inactive_message: NotRequired[str] + """ + The custom message to be displayed to a customer when a payment link is no longer active. + """ + invoice_creation: NotRequired["PaymentLinkCreateParamsInvoiceCreation"] + """ + Generate a post-purchase Invoice for one-time payments. + """ + line_items: List["PaymentLinkCreateParamsLineItem"] + """ + The line items representing what is being sold. Each line item represents an item being sold. Up to 20 line items are supported. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. Metadata associated with this Payment Link will automatically be copied to [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link. + """ + on_behalf_of: NotRequired[str] + """ + The account on behalf of which to charge. + """ + optional_items: NotRequired[List["PaymentLinkCreateParamsOptionalItem"]] + """ + A list of optional items the customer can add to their order at checkout. Use this parameter to pass one-time or recurring [Prices](https://stripe.com/docs/api/prices). + There is a maximum of 10 optional items allowed on a payment link, and the existing limits on the number of line items allowed on a payment link apply to the combined number of line items and optional items. + There is a maximum of 20 combined line items and optional items. + """ + payment_intent_data: NotRequired[ + "PaymentLinkCreateParamsPaymentIntentData" + ] + """ + A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in `payment` mode. + """ + payment_method_collection: NotRequired[Literal["always", "if_required"]] + """ + Specify whether Checkout should collect a payment method. When set to `if_required`, Checkout will not collect a payment method when the total due for the session is 0.This may occur if the Checkout Session includes a free trial or a discount. + + Can only be set in `subscription` mode. Defaults to `always`. + + If you'd like information on how to collect a payment method outside of Checkout, read the guide on [configuring subscriptions with a free trial](https://stripe.com/docs/payments/checkout/free-trials). + """ + payment_method_types: NotRequired[ + List[ + Literal[ + "affirm", + "afterpay_clearpay", + "alipay", + "alma", + "au_becs_debit", + "bacs_debit", + "bancontact", + "billie", + "blik", + "boleto", + "card", + "cashapp", + "eps", + "fpx", + "giropay", + "gopay", + "grabpay", + "ideal", + "klarna", + "konbini", + "link", + "mb_way", + "mobilepay", + "multibanco", + "oxxo", + "p24", + "pay_by_bank", + "paynow", + "paypal", + "paypay", + "payto", + "pix", + "promptpay", + "qris", + "rechnung", + "satispay", + "sepa_debit", + "shopeepay", + "sofort", + "swish", + "twint", + "us_bank_account", + "wechat_pay", + "zip", + ] + ] + ] + """ + The list of payment method types that customers can use. If no value is passed, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods) (20+ payment methods [supported](https://stripe.com/docs/payments/payment-methods/integration-options#payment-method-product-support)). + """ + phone_number_collection: NotRequired[ + "PaymentLinkCreateParamsPhoneNumberCollection" + ] + """ + Controls phone number collection settings during checkout. + + We recommend that you review your privacy policy and check with your legal contacts. + """ + restrictions: NotRequired["PaymentLinkCreateParamsRestrictions"] + """ + Settings that restrict the usage of a payment link. + """ + shipping_address_collection: NotRequired[ + "PaymentLinkCreateParamsShippingAddressCollection" + ] + """ + Configuration for collecting the customer's shipping address. + """ + shipping_options: NotRequired[ + List["PaymentLinkCreateParamsShippingOption"] + ] + """ + The shipping rate options to apply to [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link. + """ + submit_type: NotRequired[ + Literal["auto", "book", "donate", "pay", "subscribe"] + ] + """ + Describes the type of transaction being performed in order to customize relevant text on the page, such as the submit button. Changing this value will also affect the hostname in the [url](https://stripe.com/docs/api/payment_links/payment_links/object#url) property (example: `donate.stripe.com`). + """ + subscription_data: NotRequired["PaymentLinkCreateParamsSubscriptionData"] + """ + When creating a subscription, the specified configuration data will be used. There must be at least one line item with a recurring price to use `subscription_data`. + """ + tax_id_collection: NotRequired["PaymentLinkCreateParamsTaxIdCollection"] + """ + Controls tax ID collection during checkout. + """ + transfer_data: NotRequired["PaymentLinkCreateParamsTransferData"] + """ + The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to. + """ + + +class PaymentLinkCreateParamsAfterCompletion(TypedDict): + hosted_confirmation: NotRequired[ + "PaymentLinkCreateParamsAfterCompletionHostedConfirmation" + ] + """ + Configuration when `type=hosted_confirmation`. + """ + redirect: NotRequired["PaymentLinkCreateParamsAfterCompletionRedirect"] + """ + Configuration when `type=redirect`. + """ + type: Literal["hosted_confirmation", "redirect"] + """ + The specified behavior after the purchase is complete. Either `redirect` or `hosted_confirmation`. + """ + + +class PaymentLinkCreateParamsAfterCompletionHostedConfirmation(TypedDict): + custom_message: NotRequired[str] + """ + A custom message to display to the customer after the purchase is complete. + """ + + +class PaymentLinkCreateParamsAfterCompletionRedirect(TypedDict): + url: str + """ + The URL the customer will be redirected to after the purchase is complete. You can embed `{CHECKOUT_SESSION_ID}` into the URL to have the `id` of the completed [checkout session](https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-id) included. + """ + + +class PaymentLinkCreateParamsAutomaticTax(TypedDict): + enabled: bool + """ + Set to `true` to [calculate tax automatically](https://docs.stripe.com/tax) using the customer's location. + + Enabling this parameter causes the payment link to collect any billing address information necessary for tax calculation. + """ + liability: NotRequired["PaymentLinkCreateParamsAutomaticTaxLiability"] + """ + The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + """ + + +class PaymentLinkCreateParamsAutomaticTaxLiability(TypedDict): + account: NotRequired[str] + """ + The connected account being referenced when `type` is `account`. + """ + type: Literal["account", "self"] + """ + Type of the account referenced in the request. + """ + + +class PaymentLinkCreateParamsConsentCollection(TypedDict): + payment_method_reuse_agreement: NotRequired[ + "PaymentLinkCreateParamsConsentCollectionPaymentMethodReuseAgreement" + ] + """ + Determines the display of payment method reuse agreement text in the UI. If set to `hidden`, it will hide legal text related to the reuse of a payment method. + """ + promotions: NotRequired[Literal["auto", "none"]] + """ + If set to `auto`, enables the collection of customer consent for promotional communications. The Checkout + Session will determine whether to display an option to opt into promotional communication + from the merchant depending on the customer's locale. Only available to US merchants. + """ + terms_of_service: NotRequired[Literal["none", "required"]] + """ + If set to `required`, it requires customers to check a terms of service checkbox before being able to pay. + There must be a valid terms of service URL set in your [Dashboard settings](https://dashboard.stripe.com/settings/public). + """ + + +class PaymentLinkCreateParamsConsentCollectionPaymentMethodReuseAgreement( + TypedDict, +): + position: Literal["auto", "hidden"] + """ + Determines the position and visibility of the payment method reuse agreement in the UI. When set to `auto`, Stripe's + defaults will be used. When set to `hidden`, the payment method reuse agreement text will always be hidden in the UI. + """ + + +class PaymentLinkCreateParamsCustomField(TypedDict): + dropdown: NotRequired["PaymentLinkCreateParamsCustomFieldDropdown"] + """ + Configuration for `type=dropdown` fields. + """ + key: str + """ + String of your choice that your integration can use to reconcile this field. Must be unique to this field, alphanumeric, and up to 200 characters. + """ + label: "PaymentLinkCreateParamsCustomFieldLabel" + """ + The label for the field, displayed to the customer. + """ + numeric: NotRequired["PaymentLinkCreateParamsCustomFieldNumeric"] + """ + Configuration for `type=numeric` fields. + """ + optional: NotRequired[bool] + """ + Whether the customer is required to complete the field before completing the Checkout Session. Defaults to `false`. + """ + text: NotRequired["PaymentLinkCreateParamsCustomFieldText"] + """ + Configuration for `type=text` fields. + """ + type: Literal["dropdown", "numeric", "text"] + """ + The type of the field. + """ + + +class PaymentLinkCreateParamsCustomFieldDropdown(TypedDict): + default_value: NotRequired[str] + """ + The value that will pre-fill the field on the payment page.Must match a `value` in the `options` array. + """ + options: List["PaymentLinkCreateParamsCustomFieldDropdownOption"] + """ + The options available for the customer to select. Up to 200 options allowed. + """ + + +class PaymentLinkCreateParamsCustomFieldDropdownOption(TypedDict): + label: str + """ + The label for the option, displayed to the customer. Up to 100 characters. + """ + value: str + """ + The value for this option, not displayed to the customer, used by your integration to reconcile the option selected by the customer. Must be unique to this option, alphanumeric, and up to 100 characters. + """ + + +class PaymentLinkCreateParamsCustomFieldLabel(TypedDict): + custom: str + """ + Custom text for the label, displayed to the customer. Up to 50 characters. + """ + type: Literal["custom"] + """ + The type of the label. + """ + + +class PaymentLinkCreateParamsCustomFieldNumeric(TypedDict): + default_value: NotRequired[str] + """ + The value that will pre-fill the field on the payment page. + """ + maximum_length: NotRequired[int] + """ + The maximum character length constraint for the customer's input. + """ + minimum_length: NotRequired[int] + """ + The minimum character length requirement for the customer's input. + """ + + +class PaymentLinkCreateParamsCustomFieldText(TypedDict): + default_value: NotRequired[str] + """ + The value that will pre-fill the field on the payment page. + """ + maximum_length: NotRequired[int] + """ + The maximum character length constraint for the customer's input. + """ + minimum_length: NotRequired[int] + """ + The minimum character length requirement for the customer's input. + """ + + +class PaymentLinkCreateParamsCustomText(TypedDict): + after_submit: NotRequired[ + "Literal['']|PaymentLinkCreateParamsCustomTextAfterSubmit" + ] + """ + Custom text that should be displayed after the payment confirmation button. + """ + shipping_address: NotRequired[ + "Literal['']|PaymentLinkCreateParamsCustomTextShippingAddress" + ] + """ + Custom text that should be displayed alongside shipping address collection. + """ + submit: NotRequired["Literal['']|PaymentLinkCreateParamsCustomTextSubmit"] + """ + Custom text that should be displayed alongside the payment confirmation button. + """ + terms_of_service_acceptance: NotRequired[ + "Literal['']|PaymentLinkCreateParamsCustomTextTermsOfServiceAcceptance" + ] + """ + Custom text that should be displayed in place of the default terms of service agreement text. + """ + + +class PaymentLinkCreateParamsCustomTextAfterSubmit(TypedDict): + message: str + """ + Text may be up to 1200 characters in length. + """ + + +class PaymentLinkCreateParamsCustomTextShippingAddress(TypedDict): + message: str + """ + Text may be up to 1200 characters in length. + """ + + +class PaymentLinkCreateParamsCustomTextSubmit(TypedDict): + message: str + """ + Text may be up to 1200 characters in length. + """ + + +class PaymentLinkCreateParamsCustomTextTermsOfServiceAcceptance(TypedDict): + message: str + """ + Text may be up to 1200 characters in length. + """ + + +class PaymentLinkCreateParamsInvoiceCreation(TypedDict): + enabled: bool + """ + Whether the feature is enabled + """ + invoice_data: NotRequired[ + "PaymentLinkCreateParamsInvoiceCreationInvoiceData" + ] + """ + Invoice PDF configuration. + """ + + +class PaymentLinkCreateParamsInvoiceCreationInvoiceData(TypedDict): + account_tax_ids: NotRequired["Literal['']|List[str]"] + """ + The account tax IDs associated with the invoice. + """ + custom_fields: NotRequired[ + "Literal['']|List[PaymentLinkCreateParamsInvoiceCreationInvoiceDataCustomField]" + ] + """ + Default custom fields to be displayed on invoices for this customer. + """ + description: NotRequired[str] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ + footer: NotRequired[str] + """ + Default footer to be displayed on invoices for this customer. + """ + issuer: NotRequired[ + "PaymentLinkCreateParamsInvoiceCreationInvoiceDataIssuer" + ] + """ + The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + rendering_options: NotRequired[ + "Literal['']|PaymentLinkCreateParamsInvoiceCreationInvoiceDataRenderingOptions" + ] + """ + Default options for invoice PDF rendering for this customer. + """ + + +class PaymentLinkCreateParamsInvoiceCreationInvoiceDataCustomField(TypedDict): + name: str + """ + The name of the custom field. This may be up to 40 characters. + """ + value: str + """ + The value of the custom field. This may be up to 140 characters. + """ + + +class PaymentLinkCreateParamsInvoiceCreationInvoiceDataIssuer(TypedDict): + account: NotRequired[str] + """ + The connected account being referenced when `type` is `account`. + """ + type: Literal["account", "self"] + """ + Type of the account referenced in the request. + """ + + +class PaymentLinkCreateParamsInvoiceCreationInvoiceDataRenderingOptions( + TypedDict, +): + amount_tax_display: NotRequired[ + "Literal['']|Literal['exclude_tax', 'include_inclusive_tax']" + ] + """ + How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One of `exclude_tax` or `include_inclusive_tax`. `include_inclusive_tax` will include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. `exclude_tax` will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts. + """ + template: NotRequired[str] + """ + ID of the invoice rendering template to use for this invoice. + """ + + +class PaymentLinkCreateParamsLineItem(TypedDict): + adjustable_quantity: NotRequired[ + "PaymentLinkCreateParamsLineItemAdjustableQuantity" + ] + """ + When set, provides configuration for this item's quantity to be adjusted by the customer during checkout. + """ + price: NotRequired[str] + """ + The ID of the [Price](https://stripe.com/docs/api/prices) or [Plan](https://stripe.com/docs/api/plans) object. One of `price` or `price_data` is required. + """ + price_data: NotRequired["PaymentLinkCreateParamsLineItemPriceData"] + """ + Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. + """ + quantity: int + """ + The quantity of the line item being purchased. + """ + + +class PaymentLinkCreateParamsLineItemAdjustableQuantity(TypedDict): + enabled: bool + """ + Set to true if the quantity can be adjusted to any non-negative Integer. + """ + maximum: NotRequired[int] + """ + The maximum quantity the customer can purchase. By default this value is 99. You can specify a value up to 999999. + """ + minimum: NotRequired[int] + """ + The minimum quantity the customer can purchase. By default this value is 0. If there is only one item in the cart then that item's quantity cannot go down to 0. + """ + + +class PaymentLinkCreateParamsLineItemPriceData(TypedDict): + 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). + """ + product: NotRequired[str] + """ + The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to. One of `product` or `product_data` is required. + """ + product_data: NotRequired[ + "PaymentLinkCreateParamsLineItemPriceDataProductData" + ] + """ + Data used to generate a new [Product](https://docs.stripe.com/api/products) object inline. One of `product` or `product_data` is required. + """ + recurring: NotRequired["PaymentLinkCreateParamsLineItemPriceDataRecurring"] + """ + The recurring components of a price such as `interval` and `interval_count`. + """ + tax_behavior: NotRequired[Literal["exclusive", "inclusive", "unspecified"]] + """ + Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + """ + unit_amount: NotRequired[int] + """ + A non-negative integer in cents (or local equivalent) representing how much to charge. One of `unit_amount` or `unit_amount_decimal` is required. + """ + unit_amount_decimal: NotRequired[str] + """ + Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + """ + + +class PaymentLinkCreateParamsLineItemPriceDataProductData(TypedDict): + description: NotRequired[str] + """ + The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. + """ + images: NotRequired[List[str]] + """ + A list of up to 8 URLs of images for this product, meant to be displayable to the customer. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + name: str + """ + The product's name, meant to be displayable to the customer. + """ + tax_code: NotRequired[str] + """ + A [tax code](https://stripe.com/docs/tax/tax-categories) ID. + """ + unit_label: NotRequired[str] + """ + A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal. + """ + + +class PaymentLinkCreateParamsLineItemPriceDataRecurring(TypedDict): + interval: Literal["day", "month", "week", "year"] + """ + Specifies billing frequency. Either `day`, `week`, `month` or `year`. + """ + interval_count: NotRequired[int] + """ + The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). + """ + + +class PaymentLinkCreateParamsOptionalItem(TypedDict): + adjustable_quantity: NotRequired[ + "PaymentLinkCreateParamsOptionalItemAdjustableQuantity" + ] + """ + When set, provides configuration for the customer to adjust the quantity of the line item created when a customer chooses to add this optional item to their order. + """ + price: str + """ + The ID of the [Price](https://stripe.com/docs/api/prices) or [Plan](https://stripe.com/docs/api/plans) object. + """ + quantity: int + """ + The initial quantity of the line item created when a customer chooses to add this optional item to their order. + """ + + +class PaymentLinkCreateParamsOptionalItemAdjustableQuantity(TypedDict): + enabled: bool + """ + Set to true if the quantity can be adjusted to any non-negative integer. + """ + maximum: NotRequired[int] + """ + The maximum quantity of this item the customer can purchase. By default this value is 99. + """ + minimum: NotRequired[int] + """ + The minimum quantity of this item the customer must purchase, if they choose to purchase it. Because this item is optional, the customer will always be able to remove it from their order, even if the `minimum` configured here is greater than 0. By default this value is 0. + """ + + +class PaymentLinkCreateParamsPaymentIntentData(TypedDict): + capture_method: NotRequired[ + Literal["automatic", "automatic_async", "manual"] + ] + """ + Controls when the funds will be captured from the customer's account. + """ + description: NotRequired[str] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will declaratively set metadata on [Payment Intents](https://stripe.com/docs/api/payment_intents) generated from this payment link. Unlike object-level metadata, this field is declarative. Updates will clear prior values. + """ + setup_future_usage: NotRequired[Literal["off_session", "on_session"]] + """ + Indicates that you intend to [make future payments](https://stripe.com/docs/payments/payment-intents#future-usage) with the payment method collected by this Checkout Session. + + When setting this to `on_session`, Checkout will show a notice to the customer that their payment details will be saved. + + When setting this to `off_session`, Checkout will show a notice to the customer that their payment details will be saved and used for future payments. + + If a Customer has been provided or Checkout creates a new Customer,Checkout will attach the payment method to the Customer. + + If Checkout does not create a Customer, the payment method is not attached to a Customer. To reuse the payment method, you can retrieve it from the Checkout Session's PaymentIntent. + + When processing card payments, Checkout also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as SCA. + """ + statement_descriptor: NotRequired[str] + """ + Text that appears on the customer's statement as the statement descriptor for a non-card charge. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see [the Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors). + + Setting this value for a card charge returns an error. For card charges, set the [statement_descriptor_suffix](https://docs.stripe.com/get-started/account/statement-descriptors#dynamic) instead. + """ + statement_descriptor_suffix: NotRequired[str] + """ + Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. + """ + transfer_group: NotRequired[str] + """ + A string that identifies the resulting payment as part of a group. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/connect/separate-charges-and-transfers) for details. + """ + + +class PaymentLinkCreateParamsPhoneNumberCollection(TypedDict): + enabled: bool + """ + Set to `true` to enable phone number collection. + """ + + +class PaymentLinkCreateParamsRestrictions(TypedDict): + completed_sessions: "PaymentLinkCreateParamsRestrictionsCompletedSessions" + """ + Configuration for the `completed_sessions` restriction type. + """ + + +class PaymentLinkCreateParamsRestrictionsCompletedSessions(TypedDict): + limit: int + """ + The maximum number of checkout sessions that can be completed for the `completed_sessions` restriction to be met. + """ + + +class PaymentLinkCreateParamsShippingAddressCollection(TypedDict): + allowed_countries: List[ + Literal[ + "AC", + "AD", + "AE", + "AF", + "AG", + "AI", + "AL", + "AM", + "AO", + "AQ", + "AR", + "AT", + "AU", + "AW", + "AX", + "AZ", + "BA", + "BB", + "BD", + "BE", + "BF", + "BG", + "BH", + "BI", + "BJ", + "BL", + "BM", + "BN", + "BO", + "BQ", + "BR", + "BS", + "BT", + "BV", + "BW", + "BY", + "BZ", + "CA", + "CD", + "CF", + "CG", + "CH", + "CI", + "CK", + "CL", + "CM", + "CN", + "CO", + "CR", + "CV", + "CW", + "CY", + "CZ", + "DE", + "DJ", + "DK", + "DM", + "DO", + "DZ", + "EC", + "EE", + "EG", + "EH", + "ER", + "ES", + "ET", + "FI", + "FJ", + "FK", + "FO", + "FR", + "GA", + "GB", + "GD", + "GE", + "GF", + "GG", + "GH", + "GI", + "GL", + "GM", + "GN", + "GP", + "GQ", + "GR", + "GS", + "GT", + "GU", + "GW", + "GY", + "HK", + "HN", + "HR", + "HT", + "HU", + "ID", + "IE", + "IL", + "IM", + "IN", + "IO", + "IQ", + "IS", + "IT", + "JE", + "JM", + "JO", + "JP", + "KE", + "KG", + "KH", + "KI", + "KM", + "KN", + "KR", + "KW", + "KY", + "KZ", + "LA", + "LB", + "LC", + "LI", + "LK", + "LR", + "LS", + "LT", + "LU", + "LV", + "LY", + "MA", + "MC", + "MD", + "ME", + "MF", + "MG", + "MK", + "ML", + "MM", + "MN", + "MO", + "MQ", + "MR", + "MS", + "MT", + "MU", + "MV", + "MW", + "MX", + "MY", + "MZ", + "NA", + "NC", + "NE", + "NG", + "NI", + "NL", + "NO", + "NP", + "NR", + "NU", + "NZ", + "OM", + "PA", + "PE", + "PF", + "PG", + "PH", + "PK", + "PL", + "PM", + "PN", + "PR", + "PS", + "PT", + "PY", + "QA", + "RE", + "RO", + "RS", + "RU", + "RW", + "SA", + "SB", + "SC", + "SD", + "SE", + "SG", + "SH", + "SI", + "SJ", + "SK", + "SL", + "SM", + "SN", + "SO", + "SR", + "SS", + "ST", + "SV", + "SX", + "SZ", + "TA", + "TC", + "TD", + "TF", + "TG", + "TH", + "TJ", + "TK", + "TL", + "TM", + "TN", + "TO", + "TR", + "TT", + "TV", + "TW", + "TZ", + "UA", + "UG", + "US", + "UY", + "UZ", + "VA", + "VC", + "VE", + "VG", + "VN", + "VU", + "WF", + "WS", + "XK", + "YE", + "YT", + "ZA", + "ZM", + "ZW", + "ZZ", + ] + ] + """ + An array of two-letter ISO country codes representing which countries Checkout should provide as options for + shipping locations. + """ + + +class PaymentLinkCreateParamsShippingOption(TypedDict): + shipping_rate: NotRequired[str] + """ + The ID of the Shipping Rate to use for this shipping option. + """ + + +class PaymentLinkCreateParamsSubscriptionData(TypedDict): + description: NotRequired[str] + """ + The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. + """ + invoice_settings: NotRequired[ + "PaymentLinkCreateParamsSubscriptionDataInvoiceSettings" + ] + """ + All invoices will be billed using the specified settings. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will declaratively set metadata on [Subscriptions](https://stripe.com/docs/api/subscriptions) generated from this payment link. Unlike object-level metadata, this field is declarative. Updates will clear prior values. + """ + trial_period_days: NotRequired[int] + """ + Integer representing the number of trial period days before the customer is charged for the first time. Has to be at least 1. + """ + trial_settings: NotRequired[ + "PaymentLinkCreateParamsSubscriptionDataTrialSettings" + ] + """ + Settings related to subscription trials. + """ + + +class PaymentLinkCreateParamsSubscriptionDataInvoiceSettings(TypedDict): + issuer: NotRequired[ + "PaymentLinkCreateParamsSubscriptionDataInvoiceSettingsIssuer" + ] + """ + The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + """ + + +class PaymentLinkCreateParamsSubscriptionDataInvoiceSettingsIssuer(TypedDict): + account: NotRequired[str] + """ + The connected account being referenced when `type` is `account`. + """ + type: Literal["account", "self"] + """ + Type of the account referenced in the request. + """ + + +class PaymentLinkCreateParamsSubscriptionDataTrialSettings(TypedDict): + end_behavior: ( + "PaymentLinkCreateParamsSubscriptionDataTrialSettingsEndBehavior" + ) + """ + Defines how the subscription should behave when the user's free trial ends. + """ + + +class PaymentLinkCreateParamsSubscriptionDataTrialSettingsEndBehavior( + TypedDict, +): + missing_payment_method: Literal["cancel", "create_invoice", "pause"] + """ + Indicates how the subscription should change when the trial ends if the user did not provide a payment method. + """ + + +class PaymentLinkCreateParamsTaxIdCollection(TypedDict): + enabled: bool + """ + Enable tax ID collection during checkout. Defaults to `false`. + """ + required: NotRequired[Literal["if_supported", "never"]] + """ + Describes whether a tax ID is required during checkout. Defaults to `never`. + """ + + +class PaymentLinkCreateParamsTransferData(TypedDict): + amount: NotRequired[int] + """ + The amount that will be transferred automatically when a charge succeeds. + """ + destination: str + """ + If specified, successful charges will be attributed to the destination + account for tax reporting, and the funds from charges will be transferred + to the destination account. The ID of the resulting transfer will be + returned on the successful charge's `transfer` field. + """ diff --git a/stripe/params/_payment_link_line_item_list_params.py b/stripe/params/_payment_link_line_item_list_params.py new file mode 100644 index 000000000..8f57382c4 --- /dev/null +++ b/stripe/params/_payment_link_line_item_list_params.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import NotRequired, TypedDict + + +class PaymentLinkLineItemListParams(TypedDict): + 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. + """ diff --git a/stripe/params/_payment_link_list_line_items_params.py b/stripe/params/_payment_link_list_line_items_params.py new file mode 100644 index 000000000..8defb5211 --- /dev/null +++ b/stripe/params/_payment_link_list_line_items_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 PaymentLinkListLineItemsParams(RequestOptions): + 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. + """ diff --git a/stripe/params/_payment_link_list_params.py b/stripe/params/_payment_link_list_params.py new file mode 100644 index 000000000..bc7689ecb --- /dev/null +++ b/stripe/params/_payment_link_list_params.py @@ -0,0 +1,28 @@ +# -*- 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 PaymentLinkListParams(RequestOptions): + active: NotRequired[bool] + """ + Only return payment links that are active or inactive (e.g., pass `false` to list all inactive payment links). + """ + 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. + """ diff --git a/stripe/params/_payment_link_modify_params.py b/stripe/params/_payment_link_modify_params.py new file mode 100644 index 000000000..1cdef040e --- /dev/null +++ b/stripe/params/_payment_link_modify_params.py @@ -0,0 +1,804 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class PaymentLinkModifyParams(RequestOptions): + active: NotRequired[bool] + """ + Whether the payment link's `url` is active. If `false`, customers visiting the URL will be shown a page saying that the link has been deactivated. + """ + after_completion: NotRequired["PaymentLinkModifyParamsAfterCompletion"] + """ + Behavior after the purchase is complete. + """ + allow_promotion_codes: NotRequired[bool] + """ + Enables user redeemable promotion codes. + """ + automatic_tax: NotRequired["PaymentLinkModifyParamsAutomaticTax"] + """ + Configuration for automatic tax collection. + """ + billing_address_collection: NotRequired[Literal["auto", "required"]] + """ + Configuration for collecting the customer's billing address. Defaults to `auto`. + """ + custom_fields: NotRequired[ + "Literal['']|List[PaymentLinkModifyParamsCustomField]" + ] + """ + Collect additional information from your customer using custom fields. Up to 3 fields are supported. + """ + custom_text: NotRequired["PaymentLinkModifyParamsCustomText"] + """ + Display additional text for your customers using custom text. + """ + customer_creation: NotRequired[Literal["always", "if_required"]] + """ + Configures whether [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link create a [Customer](https://stripe.com/docs/api/customers). + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + inactive_message: NotRequired["Literal['']|str"] + """ + The custom message to be displayed to a customer when a payment link is no longer active. + """ + invoice_creation: NotRequired["PaymentLinkModifyParamsInvoiceCreation"] + """ + Generate a post-purchase Invoice for one-time payments. + """ + line_items: NotRequired[List["PaymentLinkModifyParamsLineItem"]] + """ + The line items representing what is being sold. Each line item represents an item being sold. Up to 20 line items are supported. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. Metadata associated with this Payment Link will automatically be copied to [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link. + """ + payment_intent_data: NotRequired[ + "PaymentLinkModifyParamsPaymentIntentData" + ] + """ + A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in `payment` mode. + """ + payment_method_collection: NotRequired[Literal["always", "if_required"]] + """ + Specify whether Checkout should collect a payment method. When set to `if_required`, Checkout will not collect a payment method when the total due for the session is 0.This may occur if the Checkout Session includes a free trial or a discount. + + Can only be set in `subscription` mode. Defaults to `always`. + + If you'd like information on how to collect a payment method outside of Checkout, read the guide on [configuring subscriptions with a free trial](https://stripe.com/docs/payments/checkout/free-trials). + """ + payment_method_types: NotRequired[ + "Literal['']|List[Literal['affirm', 'afterpay_clearpay', 'alipay', 'alma', 'au_becs_debit', 'bacs_debit', 'bancontact', 'billie', 'blik', 'boleto', 'card', 'cashapp', 'eps', 'fpx', 'giropay', 'gopay', 'grabpay', 'ideal', 'klarna', 'konbini', 'link', 'mb_way', 'mobilepay', 'multibanco', 'oxxo', 'p24', 'pay_by_bank', 'paynow', 'paypal', 'paypay', 'payto', 'pix', 'promptpay', 'qris', 'rechnung', 'satispay', 'sepa_debit', 'shopeepay', 'sofort', 'swish', 'twint', 'us_bank_account', 'wechat_pay', 'zip']]" + ] + """ + The list of payment method types that customers can use. Pass an empty string to enable dynamic payment methods that use your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). + """ + phone_number_collection: NotRequired[ + "PaymentLinkModifyParamsPhoneNumberCollection" + ] + """ + Controls phone number collection settings during checkout. + + We recommend that you review your privacy policy and check with your legal contacts. + """ + restrictions: NotRequired[ + "Literal['']|PaymentLinkModifyParamsRestrictions" + ] + """ + Settings that restrict the usage of a payment link. + """ + shipping_address_collection: NotRequired[ + "Literal['']|PaymentLinkModifyParamsShippingAddressCollection" + ] + """ + Configuration for collecting the customer's shipping address. + """ + submit_type: NotRequired[ + Literal["auto", "book", "donate", "pay", "subscribe"] + ] + """ + Describes the type of transaction being performed in order to customize relevant text on the page, such as the submit button. Changing this value will also affect the hostname in the [url](https://stripe.com/docs/api/payment_links/payment_links/object#url) property (example: `donate.stripe.com`). + """ + subscription_data: NotRequired["PaymentLinkModifyParamsSubscriptionData"] + """ + When creating a subscription, the specified configuration data will be used. There must be at least one line item with a recurring price to use `subscription_data`. + """ + tax_id_collection: NotRequired["PaymentLinkModifyParamsTaxIdCollection"] + """ + Controls tax ID collection during checkout. + """ + + +class PaymentLinkModifyParamsAfterCompletion(TypedDict): + hosted_confirmation: NotRequired[ + "PaymentLinkModifyParamsAfterCompletionHostedConfirmation" + ] + """ + Configuration when `type=hosted_confirmation`. + """ + redirect: NotRequired["PaymentLinkModifyParamsAfterCompletionRedirect"] + """ + Configuration when `type=redirect`. + """ + type: Literal["hosted_confirmation", "redirect"] + """ + The specified behavior after the purchase is complete. Either `redirect` or `hosted_confirmation`. + """ + + +class PaymentLinkModifyParamsAfterCompletionHostedConfirmation(TypedDict): + custom_message: NotRequired[str] + """ + A custom message to display to the customer after the purchase is complete. + """ + + +class PaymentLinkModifyParamsAfterCompletionRedirect(TypedDict): + url: str + """ + The URL the customer will be redirected to after the purchase is complete. You can embed `{CHECKOUT_SESSION_ID}` into the URL to have the `id` of the completed [checkout session](https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-id) included. + """ + + +class PaymentLinkModifyParamsAutomaticTax(TypedDict): + enabled: bool + """ + Set to `true` to [calculate tax automatically](https://docs.stripe.com/tax) using the customer's location. + + Enabling this parameter causes the payment link to collect any billing address information necessary for tax calculation. + """ + liability: NotRequired["PaymentLinkModifyParamsAutomaticTaxLiability"] + """ + The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + """ + + +class PaymentLinkModifyParamsAutomaticTaxLiability(TypedDict): + account: NotRequired[str] + """ + The connected account being referenced when `type` is `account`. + """ + type: Literal["account", "self"] + """ + Type of the account referenced in the request. + """ + + +class PaymentLinkModifyParamsCustomField(TypedDict): + dropdown: NotRequired["PaymentLinkModifyParamsCustomFieldDropdown"] + """ + Configuration for `type=dropdown` fields. + """ + key: str + """ + String of your choice that your integration can use to reconcile this field. Must be unique to this field, alphanumeric, and up to 200 characters. + """ + label: "PaymentLinkModifyParamsCustomFieldLabel" + """ + The label for the field, displayed to the customer. + """ + numeric: NotRequired["PaymentLinkModifyParamsCustomFieldNumeric"] + """ + Configuration for `type=numeric` fields. + """ + optional: NotRequired[bool] + """ + Whether the customer is required to complete the field before completing the Checkout Session. Defaults to `false`. + """ + text: NotRequired["PaymentLinkModifyParamsCustomFieldText"] + """ + Configuration for `type=text` fields. + """ + type: Literal["dropdown", "numeric", "text"] + """ + The type of the field. + """ + + +class PaymentLinkModifyParamsCustomFieldDropdown(TypedDict): + default_value: NotRequired[str] + """ + The value that will pre-fill the field on the payment page.Must match a `value` in the `options` array. + """ + options: List["PaymentLinkModifyParamsCustomFieldDropdownOption"] + """ + The options available for the customer to select. Up to 200 options allowed. + """ + + +class PaymentLinkModifyParamsCustomFieldDropdownOption(TypedDict): + label: str + """ + The label for the option, displayed to the customer. Up to 100 characters. + """ + value: str + """ + The value for this option, not displayed to the customer, used by your integration to reconcile the option selected by the customer. Must be unique to this option, alphanumeric, and up to 100 characters. + """ + + +class PaymentLinkModifyParamsCustomFieldLabel(TypedDict): + custom: str + """ + Custom text for the label, displayed to the customer. Up to 50 characters. + """ + type: Literal["custom"] + """ + The type of the label. + """ + + +class PaymentLinkModifyParamsCustomFieldNumeric(TypedDict): + default_value: NotRequired[str] + """ + The value that will pre-fill the field on the payment page. + """ + maximum_length: NotRequired[int] + """ + The maximum character length constraint for the customer's input. + """ + minimum_length: NotRequired[int] + """ + The minimum character length requirement for the customer's input. + """ + + +class PaymentLinkModifyParamsCustomFieldText(TypedDict): + default_value: NotRequired[str] + """ + The value that will pre-fill the field on the payment page. + """ + maximum_length: NotRequired[int] + """ + The maximum character length constraint for the customer's input. + """ + minimum_length: NotRequired[int] + """ + The minimum character length requirement for the customer's input. + """ + + +class PaymentLinkModifyParamsCustomText(TypedDict): + after_submit: NotRequired[ + "Literal['']|PaymentLinkModifyParamsCustomTextAfterSubmit" + ] + """ + Custom text that should be displayed after the payment confirmation button. + """ + shipping_address: NotRequired[ + "Literal['']|PaymentLinkModifyParamsCustomTextShippingAddress" + ] + """ + Custom text that should be displayed alongside shipping address collection. + """ + submit: NotRequired["Literal['']|PaymentLinkModifyParamsCustomTextSubmit"] + """ + Custom text that should be displayed alongside the payment confirmation button. + """ + terms_of_service_acceptance: NotRequired[ + "Literal['']|PaymentLinkModifyParamsCustomTextTermsOfServiceAcceptance" + ] + """ + Custom text that should be displayed in place of the default terms of service agreement text. + """ + + +class PaymentLinkModifyParamsCustomTextAfterSubmit(TypedDict): + message: str + """ + Text may be up to 1200 characters in length. + """ + + +class PaymentLinkModifyParamsCustomTextShippingAddress(TypedDict): + message: str + """ + Text may be up to 1200 characters in length. + """ + + +class PaymentLinkModifyParamsCustomTextSubmit(TypedDict): + message: str + """ + Text may be up to 1200 characters in length. + """ + + +class PaymentLinkModifyParamsCustomTextTermsOfServiceAcceptance(TypedDict): + message: str + """ + Text may be up to 1200 characters in length. + """ + + +class PaymentLinkModifyParamsInvoiceCreation(TypedDict): + enabled: bool + """ + Whether the feature is enabled + """ + invoice_data: NotRequired[ + "PaymentLinkModifyParamsInvoiceCreationInvoiceData" + ] + """ + Invoice PDF configuration. + """ + + +class PaymentLinkModifyParamsInvoiceCreationInvoiceData(TypedDict): + account_tax_ids: NotRequired["Literal['']|List[str]"] + """ + The account tax IDs associated with the invoice. + """ + custom_fields: NotRequired[ + "Literal['']|List[PaymentLinkModifyParamsInvoiceCreationInvoiceDataCustomField]" + ] + """ + Default custom fields to be displayed on invoices for this customer. + """ + description: NotRequired[str] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ + footer: NotRequired[str] + """ + Default footer to be displayed on invoices for this customer. + """ + issuer: NotRequired[ + "PaymentLinkModifyParamsInvoiceCreationInvoiceDataIssuer" + ] + """ + The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + rendering_options: NotRequired[ + "Literal['']|PaymentLinkModifyParamsInvoiceCreationInvoiceDataRenderingOptions" + ] + """ + Default options for invoice PDF rendering for this customer. + """ + + +class PaymentLinkModifyParamsInvoiceCreationInvoiceDataCustomField(TypedDict): + name: str + """ + The name of the custom field. This may be up to 40 characters. + """ + value: str + """ + The value of the custom field. This may be up to 140 characters. + """ + + +class PaymentLinkModifyParamsInvoiceCreationInvoiceDataIssuer(TypedDict): + account: NotRequired[str] + """ + The connected account being referenced when `type` is `account`. + """ + type: Literal["account", "self"] + """ + Type of the account referenced in the request. + """ + + +class PaymentLinkModifyParamsInvoiceCreationInvoiceDataRenderingOptions( + TypedDict, +): + amount_tax_display: NotRequired[ + "Literal['']|Literal['exclude_tax', 'include_inclusive_tax']" + ] + """ + How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One of `exclude_tax` or `include_inclusive_tax`. `include_inclusive_tax` will include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. `exclude_tax` will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts. + """ + template: NotRequired[str] + """ + ID of the invoice rendering template to use for this invoice. + """ + + +class PaymentLinkModifyParamsLineItem(TypedDict): + adjustable_quantity: NotRequired[ + "PaymentLinkModifyParamsLineItemAdjustableQuantity" + ] + """ + When set, provides configuration for this item's quantity to be adjusted by the customer during checkout. + """ + id: str + """ + The ID of an existing line item on the payment link. + """ + quantity: NotRequired[int] + """ + The quantity of the line item being purchased. + """ + + +class PaymentLinkModifyParamsLineItemAdjustableQuantity(TypedDict): + enabled: bool + """ + Set to true if the quantity can be adjusted to any non-negative Integer. + """ + maximum: NotRequired[int] + """ + The maximum quantity the customer can purchase. By default this value is 99. You can specify a value up to 999999. + """ + minimum: NotRequired[int] + """ + The minimum quantity the customer can purchase. By default this value is 0. If there is only one item in the cart then that item's quantity cannot go down to 0. + """ + + +class PaymentLinkModifyParamsPaymentIntentData(TypedDict): + description: NotRequired["Literal['']|str"] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will declaratively set metadata on [Payment Intents](https://stripe.com/docs/api/payment_intents) generated from this payment link. Unlike object-level metadata, this field is declarative. Updates will clear prior values. + """ + statement_descriptor: NotRequired["Literal['']|str"] + """ + Text that appears on the customer's statement as the statement descriptor for a non-card charge. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see [the Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors). + + Setting this value for a card charge returns an error. For card charges, set the [statement_descriptor_suffix](https://docs.stripe.com/get-started/account/statement-descriptors#dynamic) instead. + """ + statement_descriptor_suffix: NotRequired["Literal['']|str"] + """ + Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. + """ + transfer_group: NotRequired["Literal['']|str"] + """ + A string that identifies the resulting payment as part of a group. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/connect/separate-charges-and-transfers) for details. + """ + + +class PaymentLinkModifyParamsPhoneNumberCollection(TypedDict): + enabled: bool + """ + Set to `true` to enable phone number collection. + """ + + +class PaymentLinkModifyParamsRestrictions(TypedDict): + completed_sessions: "PaymentLinkModifyParamsRestrictionsCompletedSessions" + """ + Configuration for the `completed_sessions` restriction type. + """ + + +class PaymentLinkModifyParamsRestrictionsCompletedSessions(TypedDict): + limit: int + """ + The maximum number of checkout sessions that can be completed for the `completed_sessions` restriction to be met. + """ + + +class PaymentLinkModifyParamsShippingAddressCollection(TypedDict): + allowed_countries: List[ + Literal[ + "AC", + "AD", + "AE", + "AF", + "AG", + "AI", + "AL", + "AM", + "AO", + "AQ", + "AR", + "AT", + "AU", + "AW", + "AX", + "AZ", + "BA", + "BB", + "BD", + "BE", + "BF", + "BG", + "BH", + "BI", + "BJ", + "BL", + "BM", + "BN", + "BO", + "BQ", + "BR", + "BS", + "BT", + "BV", + "BW", + "BY", + "BZ", + "CA", + "CD", + "CF", + "CG", + "CH", + "CI", + "CK", + "CL", + "CM", + "CN", + "CO", + "CR", + "CV", + "CW", + "CY", + "CZ", + "DE", + "DJ", + "DK", + "DM", + "DO", + "DZ", + "EC", + "EE", + "EG", + "EH", + "ER", + "ES", + "ET", + "FI", + "FJ", + "FK", + "FO", + "FR", + "GA", + "GB", + "GD", + "GE", + "GF", + "GG", + "GH", + "GI", + "GL", + "GM", + "GN", + "GP", + "GQ", + "GR", + "GS", + "GT", + "GU", + "GW", + "GY", + "HK", + "HN", + "HR", + "HT", + "HU", + "ID", + "IE", + "IL", + "IM", + "IN", + "IO", + "IQ", + "IS", + "IT", + "JE", + "JM", + "JO", + "JP", + "KE", + "KG", + "KH", + "KI", + "KM", + "KN", + "KR", + "KW", + "KY", + "KZ", + "LA", + "LB", + "LC", + "LI", + "LK", + "LR", + "LS", + "LT", + "LU", + "LV", + "LY", + "MA", + "MC", + "MD", + "ME", + "MF", + "MG", + "MK", + "ML", + "MM", + "MN", + "MO", + "MQ", + "MR", + "MS", + "MT", + "MU", + "MV", + "MW", + "MX", + "MY", + "MZ", + "NA", + "NC", + "NE", + "NG", + "NI", + "NL", + "NO", + "NP", + "NR", + "NU", + "NZ", + "OM", + "PA", + "PE", + "PF", + "PG", + "PH", + "PK", + "PL", + "PM", + "PN", + "PR", + "PS", + "PT", + "PY", + "QA", + "RE", + "RO", + "RS", + "RU", + "RW", + "SA", + "SB", + "SC", + "SD", + "SE", + "SG", + "SH", + "SI", + "SJ", + "SK", + "SL", + "SM", + "SN", + "SO", + "SR", + "SS", + "ST", + "SV", + "SX", + "SZ", + "TA", + "TC", + "TD", + "TF", + "TG", + "TH", + "TJ", + "TK", + "TL", + "TM", + "TN", + "TO", + "TR", + "TT", + "TV", + "TW", + "TZ", + "UA", + "UG", + "US", + "UY", + "UZ", + "VA", + "VC", + "VE", + "VG", + "VN", + "VU", + "WF", + "WS", + "XK", + "YE", + "YT", + "ZA", + "ZM", + "ZW", + "ZZ", + ] + ] + """ + An array of two-letter ISO country codes representing which countries Checkout should provide as options for + shipping locations. + """ + + +class PaymentLinkModifyParamsSubscriptionData(TypedDict): + invoice_settings: NotRequired[ + "PaymentLinkModifyParamsSubscriptionDataInvoiceSettings" + ] + """ + All invoices will be billed using the specified settings. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will declaratively set metadata on [Subscriptions](https://stripe.com/docs/api/subscriptions) generated from this payment link. Unlike object-level metadata, this field is declarative. Updates will clear prior values. + """ + trial_period_days: NotRequired["Literal['']|int"] + """ + Integer representing the number of trial period days before the customer is charged for the first time. Has to be at least 1. + """ + trial_settings: NotRequired[ + "Literal['']|PaymentLinkModifyParamsSubscriptionDataTrialSettings" + ] + """ + Settings related to subscription trials. + """ + + +class PaymentLinkModifyParamsSubscriptionDataInvoiceSettings(TypedDict): + issuer: NotRequired[ + "PaymentLinkModifyParamsSubscriptionDataInvoiceSettingsIssuer" + ] + """ + The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + """ + + +class PaymentLinkModifyParamsSubscriptionDataInvoiceSettingsIssuer(TypedDict): + account: NotRequired[str] + """ + The connected account being referenced when `type` is `account`. + """ + type: Literal["account", "self"] + """ + Type of the account referenced in the request. + """ + + +class PaymentLinkModifyParamsSubscriptionDataTrialSettings(TypedDict): + end_behavior: ( + "PaymentLinkModifyParamsSubscriptionDataTrialSettingsEndBehavior" + ) + """ + Defines how the subscription should behave when the user's free trial ends. + """ + + +class PaymentLinkModifyParamsSubscriptionDataTrialSettingsEndBehavior( + TypedDict, +): + missing_payment_method: Literal["cancel", "create_invoice", "pause"] + """ + Indicates how the subscription should change when the trial ends if the user did not provide a payment method. + """ + + +class PaymentLinkModifyParamsTaxIdCollection(TypedDict): + enabled: bool + """ + Enable tax ID collection during checkout. Defaults to `false`. + """ + required: NotRequired[Literal["if_supported", "never"]] + """ + Describes whether a tax ID is required during checkout. Defaults to `never`. + """ diff --git a/stripe/params/_payment_link_retrieve_params.py b/stripe/params/_payment_link_retrieve_params.py new file mode 100644 index 000000000..c73ebaf77 --- /dev/null +++ b/stripe/params/_payment_link_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 PaymentLinkRetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_payment_link_update_params.py b/stripe/params/_payment_link_update_params.py new file mode 100644 index 000000000..1e475a944 --- /dev/null +++ b/stripe/params/_payment_link_update_params.py @@ -0,0 +1,803 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class PaymentLinkUpdateParams(TypedDict): + active: NotRequired[bool] + """ + Whether the payment link's `url` is active. If `false`, customers visiting the URL will be shown a page saying that the link has been deactivated. + """ + after_completion: NotRequired["PaymentLinkUpdateParamsAfterCompletion"] + """ + Behavior after the purchase is complete. + """ + allow_promotion_codes: NotRequired[bool] + """ + Enables user redeemable promotion codes. + """ + automatic_tax: NotRequired["PaymentLinkUpdateParamsAutomaticTax"] + """ + Configuration for automatic tax collection. + """ + billing_address_collection: NotRequired[Literal["auto", "required"]] + """ + Configuration for collecting the customer's billing address. Defaults to `auto`. + """ + custom_fields: NotRequired[ + "Literal['']|List[PaymentLinkUpdateParamsCustomField]" + ] + """ + Collect additional information from your customer using custom fields. Up to 3 fields are supported. + """ + custom_text: NotRequired["PaymentLinkUpdateParamsCustomText"] + """ + Display additional text for your customers using custom text. + """ + customer_creation: NotRequired[Literal["always", "if_required"]] + """ + Configures whether [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link create a [Customer](https://stripe.com/docs/api/customers). + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + inactive_message: NotRequired["Literal['']|str"] + """ + The custom message to be displayed to a customer when a payment link is no longer active. + """ + invoice_creation: NotRequired["PaymentLinkUpdateParamsInvoiceCreation"] + """ + Generate a post-purchase Invoice for one-time payments. + """ + line_items: NotRequired[List["PaymentLinkUpdateParamsLineItem"]] + """ + The line items representing what is being sold. Each line item represents an item being sold. Up to 20 line items are supported. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. Metadata associated with this Payment Link will automatically be copied to [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link. + """ + payment_intent_data: NotRequired[ + "PaymentLinkUpdateParamsPaymentIntentData" + ] + """ + A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in `payment` mode. + """ + payment_method_collection: NotRequired[Literal["always", "if_required"]] + """ + Specify whether Checkout should collect a payment method. When set to `if_required`, Checkout will not collect a payment method when the total due for the session is 0.This may occur if the Checkout Session includes a free trial or a discount. + + Can only be set in `subscription` mode. Defaults to `always`. + + If you'd like information on how to collect a payment method outside of Checkout, read the guide on [configuring subscriptions with a free trial](https://stripe.com/docs/payments/checkout/free-trials). + """ + payment_method_types: NotRequired[ + "Literal['']|List[Literal['affirm', 'afterpay_clearpay', 'alipay', 'alma', 'au_becs_debit', 'bacs_debit', 'bancontact', 'billie', 'blik', 'boleto', 'card', 'cashapp', 'eps', 'fpx', 'giropay', 'gopay', 'grabpay', 'ideal', 'klarna', 'konbini', 'link', 'mb_way', 'mobilepay', 'multibanco', 'oxxo', 'p24', 'pay_by_bank', 'paynow', 'paypal', 'paypay', 'payto', 'pix', 'promptpay', 'qris', 'rechnung', 'satispay', 'sepa_debit', 'shopeepay', 'sofort', 'swish', 'twint', 'us_bank_account', 'wechat_pay', 'zip']]" + ] + """ + The list of payment method types that customers can use. Pass an empty string to enable dynamic payment methods that use your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). + """ + phone_number_collection: NotRequired[ + "PaymentLinkUpdateParamsPhoneNumberCollection" + ] + """ + Controls phone number collection settings during checkout. + + We recommend that you review your privacy policy and check with your legal contacts. + """ + restrictions: NotRequired[ + "Literal['']|PaymentLinkUpdateParamsRestrictions" + ] + """ + Settings that restrict the usage of a payment link. + """ + shipping_address_collection: NotRequired[ + "Literal['']|PaymentLinkUpdateParamsShippingAddressCollection" + ] + """ + Configuration for collecting the customer's shipping address. + """ + submit_type: NotRequired[ + Literal["auto", "book", "donate", "pay", "subscribe"] + ] + """ + Describes the type of transaction being performed in order to customize relevant text on the page, such as the submit button. Changing this value will also affect the hostname in the [url](https://stripe.com/docs/api/payment_links/payment_links/object#url) property (example: `donate.stripe.com`). + """ + subscription_data: NotRequired["PaymentLinkUpdateParamsSubscriptionData"] + """ + When creating a subscription, the specified configuration data will be used. There must be at least one line item with a recurring price to use `subscription_data`. + """ + tax_id_collection: NotRequired["PaymentLinkUpdateParamsTaxIdCollection"] + """ + Controls tax ID collection during checkout. + """ + + +class PaymentLinkUpdateParamsAfterCompletion(TypedDict): + hosted_confirmation: NotRequired[ + "PaymentLinkUpdateParamsAfterCompletionHostedConfirmation" + ] + """ + Configuration when `type=hosted_confirmation`. + """ + redirect: NotRequired["PaymentLinkUpdateParamsAfterCompletionRedirect"] + """ + Configuration when `type=redirect`. + """ + type: Literal["hosted_confirmation", "redirect"] + """ + The specified behavior after the purchase is complete. Either `redirect` or `hosted_confirmation`. + """ + + +class PaymentLinkUpdateParamsAfterCompletionHostedConfirmation(TypedDict): + custom_message: NotRequired[str] + """ + A custom message to display to the customer after the purchase is complete. + """ + + +class PaymentLinkUpdateParamsAfterCompletionRedirect(TypedDict): + url: str + """ + The URL the customer will be redirected to after the purchase is complete. You can embed `{CHECKOUT_SESSION_ID}` into the URL to have the `id` of the completed [checkout session](https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-id) included. + """ + + +class PaymentLinkUpdateParamsAutomaticTax(TypedDict): + enabled: bool + """ + Set to `true` to [calculate tax automatically](https://docs.stripe.com/tax) using the customer's location. + + Enabling this parameter causes the payment link to collect any billing address information necessary for tax calculation. + """ + liability: NotRequired["PaymentLinkUpdateParamsAutomaticTaxLiability"] + """ + The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + """ + + +class PaymentLinkUpdateParamsAutomaticTaxLiability(TypedDict): + account: NotRequired[str] + """ + The connected account being referenced when `type` is `account`. + """ + type: Literal["account", "self"] + """ + Type of the account referenced in the request. + """ + + +class PaymentLinkUpdateParamsCustomField(TypedDict): + dropdown: NotRequired["PaymentLinkUpdateParamsCustomFieldDropdown"] + """ + Configuration for `type=dropdown` fields. + """ + key: str + """ + String of your choice that your integration can use to reconcile this field. Must be unique to this field, alphanumeric, and up to 200 characters. + """ + label: "PaymentLinkUpdateParamsCustomFieldLabel" + """ + The label for the field, displayed to the customer. + """ + numeric: NotRequired["PaymentLinkUpdateParamsCustomFieldNumeric"] + """ + Configuration for `type=numeric` fields. + """ + optional: NotRequired[bool] + """ + Whether the customer is required to complete the field before completing the Checkout Session. Defaults to `false`. + """ + text: NotRequired["PaymentLinkUpdateParamsCustomFieldText"] + """ + Configuration for `type=text` fields. + """ + type: Literal["dropdown", "numeric", "text"] + """ + The type of the field. + """ + + +class PaymentLinkUpdateParamsCustomFieldDropdown(TypedDict): + default_value: NotRequired[str] + """ + The value that will pre-fill the field on the payment page.Must match a `value` in the `options` array. + """ + options: List["PaymentLinkUpdateParamsCustomFieldDropdownOption"] + """ + The options available for the customer to select. Up to 200 options allowed. + """ + + +class PaymentLinkUpdateParamsCustomFieldDropdownOption(TypedDict): + label: str + """ + The label for the option, displayed to the customer. Up to 100 characters. + """ + value: str + """ + The value for this option, not displayed to the customer, used by your integration to reconcile the option selected by the customer. Must be unique to this option, alphanumeric, and up to 100 characters. + """ + + +class PaymentLinkUpdateParamsCustomFieldLabel(TypedDict): + custom: str + """ + Custom text for the label, displayed to the customer. Up to 50 characters. + """ + type: Literal["custom"] + """ + The type of the label. + """ + + +class PaymentLinkUpdateParamsCustomFieldNumeric(TypedDict): + default_value: NotRequired[str] + """ + The value that will pre-fill the field on the payment page. + """ + maximum_length: NotRequired[int] + """ + The maximum character length constraint for the customer's input. + """ + minimum_length: NotRequired[int] + """ + The minimum character length requirement for the customer's input. + """ + + +class PaymentLinkUpdateParamsCustomFieldText(TypedDict): + default_value: NotRequired[str] + """ + The value that will pre-fill the field on the payment page. + """ + maximum_length: NotRequired[int] + """ + The maximum character length constraint for the customer's input. + """ + minimum_length: NotRequired[int] + """ + The minimum character length requirement for the customer's input. + """ + + +class PaymentLinkUpdateParamsCustomText(TypedDict): + after_submit: NotRequired[ + "Literal['']|PaymentLinkUpdateParamsCustomTextAfterSubmit" + ] + """ + Custom text that should be displayed after the payment confirmation button. + """ + shipping_address: NotRequired[ + "Literal['']|PaymentLinkUpdateParamsCustomTextShippingAddress" + ] + """ + Custom text that should be displayed alongside shipping address collection. + """ + submit: NotRequired["Literal['']|PaymentLinkUpdateParamsCustomTextSubmit"] + """ + Custom text that should be displayed alongside the payment confirmation button. + """ + terms_of_service_acceptance: NotRequired[ + "Literal['']|PaymentLinkUpdateParamsCustomTextTermsOfServiceAcceptance" + ] + """ + Custom text that should be displayed in place of the default terms of service agreement text. + """ + + +class PaymentLinkUpdateParamsCustomTextAfterSubmit(TypedDict): + message: str + """ + Text may be up to 1200 characters in length. + """ + + +class PaymentLinkUpdateParamsCustomTextShippingAddress(TypedDict): + message: str + """ + Text may be up to 1200 characters in length. + """ + + +class PaymentLinkUpdateParamsCustomTextSubmit(TypedDict): + message: str + """ + Text may be up to 1200 characters in length. + """ + + +class PaymentLinkUpdateParamsCustomTextTermsOfServiceAcceptance(TypedDict): + message: str + """ + Text may be up to 1200 characters in length. + """ + + +class PaymentLinkUpdateParamsInvoiceCreation(TypedDict): + enabled: bool + """ + Whether the feature is enabled + """ + invoice_data: NotRequired[ + "PaymentLinkUpdateParamsInvoiceCreationInvoiceData" + ] + """ + Invoice PDF configuration. + """ + + +class PaymentLinkUpdateParamsInvoiceCreationInvoiceData(TypedDict): + account_tax_ids: NotRequired["Literal['']|List[str]"] + """ + The account tax IDs associated with the invoice. + """ + custom_fields: NotRequired[ + "Literal['']|List[PaymentLinkUpdateParamsInvoiceCreationInvoiceDataCustomField]" + ] + """ + Default custom fields to be displayed on invoices for this customer. + """ + description: NotRequired[str] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ + footer: NotRequired[str] + """ + Default footer to be displayed on invoices for this customer. + """ + issuer: NotRequired[ + "PaymentLinkUpdateParamsInvoiceCreationInvoiceDataIssuer" + ] + """ + The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + rendering_options: NotRequired[ + "Literal['']|PaymentLinkUpdateParamsInvoiceCreationInvoiceDataRenderingOptions" + ] + """ + Default options for invoice PDF rendering for this customer. + """ + + +class PaymentLinkUpdateParamsInvoiceCreationInvoiceDataCustomField(TypedDict): + name: str + """ + The name of the custom field. This may be up to 40 characters. + """ + value: str + """ + The value of the custom field. This may be up to 140 characters. + """ + + +class PaymentLinkUpdateParamsInvoiceCreationInvoiceDataIssuer(TypedDict): + account: NotRequired[str] + """ + The connected account being referenced when `type` is `account`. + """ + type: Literal["account", "self"] + """ + Type of the account referenced in the request. + """ + + +class PaymentLinkUpdateParamsInvoiceCreationInvoiceDataRenderingOptions( + TypedDict, +): + amount_tax_display: NotRequired[ + "Literal['']|Literal['exclude_tax', 'include_inclusive_tax']" + ] + """ + How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One of `exclude_tax` or `include_inclusive_tax`. `include_inclusive_tax` will include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. `exclude_tax` will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts. + """ + template: NotRequired[str] + """ + ID of the invoice rendering template to use for this invoice. + """ + + +class PaymentLinkUpdateParamsLineItem(TypedDict): + adjustable_quantity: NotRequired[ + "PaymentLinkUpdateParamsLineItemAdjustableQuantity" + ] + """ + When set, provides configuration for this item's quantity to be adjusted by the customer during checkout. + """ + id: str + """ + The ID of an existing line item on the payment link. + """ + quantity: NotRequired[int] + """ + The quantity of the line item being purchased. + """ + + +class PaymentLinkUpdateParamsLineItemAdjustableQuantity(TypedDict): + enabled: bool + """ + Set to true if the quantity can be adjusted to any non-negative Integer. + """ + maximum: NotRequired[int] + """ + The maximum quantity the customer can purchase. By default this value is 99. You can specify a value up to 999999. + """ + minimum: NotRequired[int] + """ + The minimum quantity the customer can purchase. By default this value is 0. If there is only one item in the cart then that item's quantity cannot go down to 0. + """ + + +class PaymentLinkUpdateParamsPaymentIntentData(TypedDict): + description: NotRequired["Literal['']|str"] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will declaratively set metadata on [Payment Intents](https://stripe.com/docs/api/payment_intents) generated from this payment link. Unlike object-level metadata, this field is declarative. Updates will clear prior values. + """ + statement_descriptor: NotRequired["Literal['']|str"] + """ + Text that appears on the customer's statement as the statement descriptor for a non-card charge. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see [the Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors). + + Setting this value for a card charge returns an error. For card charges, set the [statement_descriptor_suffix](https://docs.stripe.com/get-started/account/statement-descriptors#dynamic) instead. + """ + statement_descriptor_suffix: NotRequired["Literal['']|str"] + """ + Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. + """ + transfer_group: NotRequired["Literal['']|str"] + """ + A string that identifies the resulting payment as part of a group. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/connect/separate-charges-and-transfers) for details. + """ + + +class PaymentLinkUpdateParamsPhoneNumberCollection(TypedDict): + enabled: bool + """ + Set to `true` to enable phone number collection. + """ + + +class PaymentLinkUpdateParamsRestrictions(TypedDict): + completed_sessions: "PaymentLinkUpdateParamsRestrictionsCompletedSessions" + """ + Configuration for the `completed_sessions` restriction type. + """ + + +class PaymentLinkUpdateParamsRestrictionsCompletedSessions(TypedDict): + limit: int + """ + The maximum number of checkout sessions that can be completed for the `completed_sessions` restriction to be met. + """ + + +class PaymentLinkUpdateParamsShippingAddressCollection(TypedDict): + allowed_countries: List[ + Literal[ + "AC", + "AD", + "AE", + "AF", + "AG", + "AI", + "AL", + "AM", + "AO", + "AQ", + "AR", + "AT", + "AU", + "AW", + "AX", + "AZ", + "BA", + "BB", + "BD", + "BE", + "BF", + "BG", + "BH", + "BI", + "BJ", + "BL", + "BM", + "BN", + "BO", + "BQ", + "BR", + "BS", + "BT", + "BV", + "BW", + "BY", + "BZ", + "CA", + "CD", + "CF", + "CG", + "CH", + "CI", + "CK", + "CL", + "CM", + "CN", + "CO", + "CR", + "CV", + "CW", + "CY", + "CZ", + "DE", + "DJ", + "DK", + "DM", + "DO", + "DZ", + "EC", + "EE", + "EG", + "EH", + "ER", + "ES", + "ET", + "FI", + "FJ", + "FK", + "FO", + "FR", + "GA", + "GB", + "GD", + "GE", + "GF", + "GG", + "GH", + "GI", + "GL", + "GM", + "GN", + "GP", + "GQ", + "GR", + "GS", + "GT", + "GU", + "GW", + "GY", + "HK", + "HN", + "HR", + "HT", + "HU", + "ID", + "IE", + "IL", + "IM", + "IN", + "IO", + "IQ", + "IS", + "IT", + "JE", + "JM", + "JO", + "JP", + "KE", + "KG", + "KH", + "KI", + "KM", + "KN", + "KR", + "KW", + "KY", + "KZ", + "LA", + "LB", + "LC", + "LI", + "LK", + "LR", + "LS", + "LT", + "LU", + "LV", + "LY", + "MA", + "MC", + "MD", + "ME", + "MF", + "MG", + "MK", + "ML", + "MM", + "MN", + "MO", + "MQ", + "MR", + "MS", + "MT", + "MU", + "MV", + "MW", + "MX", + "MY", + "MZ", + "NA", + "NC", + "NE", + "NG", + "NI", + "NL", + "NO", + "NP", + "NR", + "NU", + "NZ", + "OM", + "PA", + "PE", + "PF", + "PG", + "PH", + "PK", + "PL", + "PM", + "PN", + "PR", + "PS", + "PT", + "PY", + "QA", + "RE", + "RO", + "RS", + "RU", + "RW", + "SA", + "SB", + "SC", + "SD", + "SE", + "SG", + "SH", + "SI", + "SJ", + "SK", + "SL", + "SM", + "SN", + "SO", + "SR", + "SS", + "ST", + "SV", + "SX", + "SZ", + "TA", + "TC", + "TD", + "TF", + "TG", + "TH", + "TJ", + "TK", + "TL", + "TM", + "TN", + "TO", + "TR", + "TT", + "TV", + "TW", + "TZ", + "UA", + "UG", + "US", + "UY", + "UZ", + "VA", + "VC", + "VE", + "VG", + "VN", + "VU", + "WF", + "WS", + "XK", + "YE", + "YT", + "ZA", + "ZM", + "ZW", + "ZZ", + ] + ] + """ + An array of two-letter ISO country codes representing which countries Checkout should provide as options for + shipping locations. + """ + + +class PaymentLinkUpdateParamsSubscriptionData(TypedDict): + invoice_settings: NotRequired[ + "PaymentLinkUpdateParamsSubscriptionDataInvoiceSettings" + ] + """ + All invoices will be billed using the specified settings. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will declaratively set metadata on [Subscriptions](https://stripe.com/docs/api/subscriptions) generated from this payment link. Unlike object-level metadata, this field is declarative. Updates will clear prior values. + """ + trial_period_days: NotRequired["Literal['']|int"] + """ + Integer representing the number of trial period days before the customer is charged for the first time. Has to be at least 1. + """ + trial_settings: NotRequired[ + "Literal['']|PaymentLinkUpdateParamsSubscriptionDataTrialSettings" + ] + """ + Settings related to subscription trials. + """ + + +class PaymentLinkUpdateParamsSubscriptionDataInvoiceSettings(TypedDict): + issuer: NotRequired[ + "PaymentLinkUpdateParamsSubscriptionDataInvoiceSettingsIssuer" + ] + """ + The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + """ + + +class PaymentLinkUpdateParamsSubscriptionDataInvoiceSettingsIssuer(TypedDict): + account: NotRequired[str] + """ + The connected account being referenced when `type` is `account`. + """ + type: Literal["account", "self"] + """ + Type of the account referenced in the request. + """ + + +class PaymentLinkUpdateParamsSubscriptionDataTrialSettings(TypedDict): + end_behavior: ( + "PaymentLinkUpdateParamsSubscriptionDataTrialSettingsEndBehavior" + ) + """ + Defines how the subscription should behave when the user's free trial ends. + """ + + +class PaymentLinkUpdateParamsSubscriptionDataTrialSettingsEndBehavior( + TypedDict, +): + missing_payment_method: Literal["cancel", "create_invoice", "pause"] + """ + Indicates how the subscription should change when the trial ends if the user did not provide a payment method. + """ + + +class PaymentLinkUpdateParamsTaxIdCollection(TypedDict): + enabled: bool + """ + Enable tax ID collection during checkout. Defaults to `false`. + """ + required: NotRequired[Literal["if_supported", "never"]] + """ + Describes whether a tax ID is required during checkout. Defaults to `never`. + """ diff --git a/stripe/params/_payment_method_attach_params.py b/stripe/params/_payment_method_attach_params.py new file mode 100644 index 000000000..bde9583a3 --- /dev/null +++ b/stripe/params/_payment_method_attach_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 PaymentMethodAttachParams(RequestOptions): + customer: NotRequired[str] + """ + The ID of the customer to which to attach the PaymentMethod. + """ + customer_account: NotRequired[str] + """ + The ID of the account to which to attach the PaymentMethod. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_payment_method_configuration_create_params.py b/stripe/params/_payment_method_configuration_create_params.py new file mode 100644 index 000000000..feaec7f07 --- /dev/null +++ b/stripe/params/_payment_method_configuration_create_params.py @@ -0,0 +1,1284 @@ +# -*- 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, TypedDict + + +class PaymentMethodConfigurationCreateParams(RequestOptions): + acss_debit: NotRequired["PaymentMethodConfigurationCreateParamsAcssDebit"] + """ + Canadian pre-authorized debit payments, check this [page](https://stripe.com/docs/payments/acss-debit) for more details like country availability. + """ + affirm: NotRequired["PaymentMethodConfigurationCreateParamsAffirm"] + """ + [Affirm](https://www.affirm.com/) gives your customers a way to split purchases over a series of payments. Depending on the purchase, they can pay with four interest-free payments (Split Pay) or pay over a longer term (Installments), which might include interest. Check this [page](https://stripe.com/docs/payments/affirm) for more details like country availability. + """ + afterpay_clearpay: NotRequired[ + "PaymentMethodConfigurationCreateParamsAfterpayClearpay" + ] + """ + Afterpay gives your customers a way to pay for purchases in installments, check this [page](https://stripe.com/docs/payments/afterpay-clearpay) for more details like country availability. Afterpay is particularly popular among businesses selling fashion, beauty, and sports products. + """ + alipay: NotRequired["PaymentMethodConfigurationCreateParamsAlipay"] + """ + Alipay is a digital wallet in China that has more than a billion active users worldwide. Alipay users can pay on the web or on a mobile device using login credentials or their Alipay app. Alipay has a low dispute rate and reduces fraud by authenticating payments using the customer's login credentials. Check this [page](https://stripe.com/docs/payments/alipay) for more details. + """ + alma: NotRequired["PaymentMethodConfigurationCreateParamsAlma"] + """ + Alma is a Buy Now, Pay Later payment method that offers customers the ability to pay in 2, 3, or 4 installments. + """ + amazon_pay: NotRequired["PaymentMethodConfigurationCreateParamsAmazonPay"] + """ + Amazon Pay is a wallet payment method that lets your customers check out the same way as on Amazon. + """ + apple_pay: NotRequired["PaymentMethodConfigurationCreateParamsApplePay"] + """ + Stripe users can accept [Apple Pay](https://stripe.com/payments/apple-pay) in iOS applications in iOS 9 and later, and on the web in Safari starting with iOS 10 or macOS Sierra. There are no additional fees to process Apple Pay payments, and the [pricing](https://stripe.com/pricing) is the same as other card transactions. Check this [page](https://stripe.com/docs/apple-pay) for more details. + """ + apple_pay_later: NotRequired[ + "PaymentMethodConfigurationCreateParamsApplePayLater" + ] + """ + Apple Pay Later, a payment method for customers to buy now and pay later, gives your customers a way to split purchases into four installments across six weeks. + """ + au_becs_debit: NotRequired[ + "PaymentMethodConfigurationCreateParamsAuBecsDebit" + ] + """ + Stripe users in Australia can accept Bulk Electronic Clearing System (BECS) direct debit payments from customers with an Australian bank account. Check this [page](https://stripe.com/docs/payments/au-becs-debit) for more details. + """ + bacs_debit: NotRequired["PaymentMethodConfigurationCreateParamsBacsDebit"] + """ + Stripe users in the UK can accept Bacs Direct Debit payments from customers with a UK bank account, check this [page](https://stripe.com/docs/payments/payment-methods/bacs-debit) for more details. + """ + bancontact: NotRequired["PaymentMethodConfigurationCreateParamsBancontact"] + """ + Bancontact is the most popular online payment method in Belgium, with over 15 million cards in circulation. [Customers](https://stripe.com/docs/api/customers) use a Bancontact card or mobile app linked to a Belgian bank account to make online payments that are secure, guaranteed, and confirmed immediately. Check this [page](https://stripe.com/docs/payments/bancontact) for more details. + """ + billie: NotRequired["PaymentMethodConfigurationCreateParamsBillie"] + """ + Billie is a [single-use](https://docs.stripe.com/payments/payment-methods#usage) payment method that offers businesses Pay by Invoice where they offer payment terms ranging from 7-120 days. Customers are redirected from your website or app, authorize the payment with Billie, then return to your website or app. You get [immediate notification](https://docs.stripe.com/payments/payment-methods#payment-notification) of whether the payment succeeded or failed. + """ + blik: NotRequired["PaymentMethodConfigurationCreateParamsBlik"] + """ + BLIK is a [single use](https://stripe.com/docs/payments/payment-methods#usage) payment method that requires customers to authenticate their payments. When customers want to pay online using BLIK, they request a six-digit code from their banking application and enter it into the payment collection form. Check this [page](https://stripe.com/docs/payments/blik) for more details. + """ + boleto: NotRequired["PaymentMethodConfigurationCreateParamsBoleto"] + """ + Boleto is an official (regulated by the Central Bank of Brazil) payment method in Brazil. Check this [page](https://stripe.com/docs/payments/boleto) for more details. + """ + card: NotRequired["PaymentMethodConfigurationCreateParamsCard"] + """ + Cards are a popular way for consumers and businesses to pay online or in person. Stripe supports global and local card networks. + """ + cartes_bancaires: NotRequired[ + "PaymentMethodConfigurationCreateParamsCartesBancaires" + ] + """ + Cartes Bancaires is France's local card network. More than 95% of these cards are co-branded with either Visa or Mastercard, meaning you can process these cards over either Cartes Bancaires or the Visa or Mastercard networks. Check this [page](https://stripe.com/docs/payments/cartes-bancaires) for more details. + """ + cashapp: NotRequired["PaymentMethodConfigurationCreateParamsCashapp"] + """ + Cash App is a popular consumer app in the US that allows customers to bank, invest, send, and receive money using their digital wallet. Check this [page](https://stripe.com/docs/payments/cash-app-pay) for more details. + """ + customer_balance: NotRequired[ + "PaymentMethodConfigurationCreateParamsCustomerBalance" + ] + """ + Uses a customer's [cash balance](https://stripe.com/docs/payments/customer-balance) for the payment. The cash balance can be funded via a bank transfer. Check this [page](https://stripe.com/docs/payments/bank-transfers) for more details. + """ + eps: NotRequired["PaymentMethodConfigurationCreateParamsEps"] + """ + EPS is an Austria-based payment method that allows customers to complete transactions online using their bank credentials. EPS is supported by all Austrian banks and is accepted by over 80% of Austrian online retailers. Check this [page](https://stripe.com/docs/payments/eps) for more details. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + fpx: NotRequired["PaymentMethodConfigurationCreateParamsFpx"] + """ + Financial Process Exchange (FPX) is a Malaysia-based payment method that allows customers to complete transactions online using their bank credentials. Bank Negara Malaysia (BNM), the Central Bank of Malaysia, and eleven other major Malaysian financial institutions are members of the PayNet Group, which owns and operates FPX. It is one of the most popular online payment methods in Malaysia, with nearly 90 million transactions in 2018 according to BNM. Check this [page](https://stripe.com/docs/payments/fpx) for more details. + """ + fr_meal_voucher_conecs: NotRequired[ + "PaymentMethodConfigurationCreateParamsFrMealVoucherConecs" + ] + """ + Meal vouchers in France, or “titres-restaurant”, is a local benefits program commonly offered by employers for their employees to purchase prepared food and beverages on working days. Check this [page](https://stripe.com/docs/payments/benefits/fr-meal-vouchers) for more details. + """ + giropay: NotRequired["PaymentMethodConfigurationCreateParamsGiropay"] + """ + giropay is a German payment method based on online banking, introduced in 2006. It allows customers to complete transactions online using their online banking environment, with funds debited from their bank account. Depending on their bank, customers confirm payments on giropay using a second factor of authentication or a PIN. giropay accounts for 10% of online checkouts in Germany. Check this [page](https://stripe.com/docs/payments/giropay) for more details. + """ + google_pay: NotRequired["PaymentMethodConfigurationCreateParamsGooglePay"] + """ + Google Pay allows customers to make payments in your app or website using any credit or debit card saved to their Google Account, including those from Google Play, YouTube, Chrome, or an Android device. Use the Google Pay API to request any credit or debit card stored in your customer's Google account. Check this [page](https://stripe.com/docs/google-pay) for more details. + """ + gopay: NotRequired["PaymentMethodConfigurationCreateParamsGopay"] + """ + GoPay is a [single use](https://stripe.com/docs/payments/payment-methods#usage) digital wallet payment method popular in Indonesia. When paying with GoPay, customers authenticate and approve payments using the Gojek app. Desktop checkout is performed by scanning a QR code. When checking out on mobile, customers are redirected to the Gojek app to confirm payment. + """ + grabpay: NotRequired["PaymentMethodConfigurationCreateParamsGrabpay"] + """ + GrabPay is a payment method developed by [Grab](https://www.grab.com/sg/consumer/finance/pay/). GrabPay is a digital wallet - customers maintain a balance in their wallets that they pay out with. Check this [page](https://stripe.com/docs/payments/grabpay) for more details. + """ + id_bank_transfer: NotRequired[ + "PaymentMethodConfigurationCreateParamsIdBankTransfer" + ] + """ + Stripe users in Indonesia can receive bank transfers from customers in Indonesia. Bank transfers are a popular B2C and B2B payment method in Indonesia. + """ + ideal: NotRequired["PaymentMethodConfigurationCreateParamsIdeal"] + """ + iDEAL is a Netherlands-based payment method that allows customers to complete transactions online using their bank credentials. All major Dutch banks are members of Currence, the scheme that operates iDEAL, making it the most popular online payment method in the Netherlands with a share of online transactions close to 55%. Check this [page](https://stripe.com/docs/payments/ideal) for more details. + """ + jcb: NotRequired["PaymentMethodConfigurationCreateParamsJcb"] + """ + JCB is a credit card company based in Japan. JCB is currently available in Japan to businesses approved by JCB, and available to all businesses in Australia, Canada, Hong Kong, Japan, New Zealand, Singapore, Switzerland, United Kingdom, United States, and all countries in the European Economic Area except Iceland. Check this [page](https://support.stripe.com/questions/accepting-japan-credit-bureau-%28jcb%29-payments) for more details. + """ + kakao_pay: NotRequired["PaymentMethodConfigurationCreateParamsKakaoPay"] + """ + Kakao Pay is a popular local wallet available in South Korea. + """ + klarna: NotRequired["PaymentMethodConfigurationCreateParamsKlarna"] + """ + Klarna gives customers a range of [payment options](https://stripe.com/docs/payments/klarna#payment-options) during checkout. Available payment options vary depending on the customer's billing address and the transaction amount. These payment options make it convenient for customers to purchase items in all price ranges. Check this [page](https://stripe.com/docs/payments/klarna) for more details. + """ + konbini: NotRequired["PaymentMethodConfigurationCreateParamsKonbini"] + """ + Konbini allows customers in Japan to pay for bills and online purchases at convenience stores with cash. Check this [page](https://stripe.com/docs/payments/konbini) for more details. + """ + kr_card: NotRequired["PaymentMethodConfigurationCreateParamsKrCard"] + """ + Korean cards let users pay using locally issued cards from South Korea. + """ + link: NotRequired["PaymentMethodConfigurationCreateParamsLink"] + """ + [Link](https://stripe.com/docs/payments/link) is a payment method network. With Link, users save their payment details once, then reuse that information to pay with one click for any business on the network. + """ + mobilepay: NotRequired["PaymentMethodConfigurationCreateParamsMobilepay"] + """ + MobilePay is a [single-use](https://stripe.com/docs/payments/payment-methods#usage) card wallet payment method used in Denmark and Finland. It allows customers to [authenticate and approve](https://stripe.com/docs/payments/payment-methods#customer-actions) payments using the MobilePay app. Check this [page](https://stripe.com/docs/payments/mobilepay) for more details. + """ + multibanco: NotRequired["PaymentMethodConfigurationCreateParamsMultibanco"] + """ + Stripe users in Europe and the United States can accept Multibanco payments from customers in Portugal using [Sources](https://stripe.com/docs/sources)—a single integration path for creating payments using any supported method. + """ + name: NotRequired[str] + """ + Configuration name. + """ + naver_pay: NotRequired["PaymentMethodConfigurationCreateParamsNaverPay"] + """ + Naver Pay is a popular local wallet available in South Korea. + """ + nz_bank_account: NotRequired[ + "PaymentMethodConfigurationCreateParamsNzBankAccount" + ] + """ + Stripe users in New Zealand can accept Bulk Electronic Clearing System (BECS) direct debit payments from customers with a New Zeland bank account. Check this [page](https://stripe.com/docs/payments/nz-bank-account) for more details. + """ + oxxo: NotRequired["PaymentMethodConfigurationCreateParamsOxxo"] + """ + OXXO is a Mexican chain of convenience stores with thousands of locations across Latin America and represents nearly 20% of online transactions in Mexico. OXXO allows customers to pay bills and online purchases in-store with cash. Check this [page](https://stripe.com/docs/payments/oxxo) for more details. + """ + p24: NotRequired["PaymentMethodConfigurationCreateParamsP24"] + """ + Przelewy24 is a Poland-based payment method aggregator that allows customers to complete transactions online using bank transfers and other methods. Bank transfers account for 30% of online payments in Poland and Przelewy24 provides a way for customers to pay with over 165 banks. Check this [page](https://stripe.com/docs/payments/p24) for more details. + """ + parent: NotRequired[str] + """ + Configuration's parent configuration. Specify to create a child configuration. + """ + pay_by_bank: NotRequired["PaymentMethodConfigurationCreateParamsPayByBank"] + """ + Pay by bank is a redirect payment method backed by bank transfers. A customer is redirected to their bank to authorize a bank transfer for a given amount. This removes a lot of the error risks inherent in waiting for the customer to initiate a transfer themselves, and is less expensive than card payments. + """ + payco: NotRequired["PaymentMethodConfigurationCreateParamsPayco"] + """ + PAYCO is a [single-use](https://docs.stripe.com/payments/payment-methods#usage local wallet available in South Korea. + """ + paynow: NotRequired["PaymentMethodConfigurationCreateParamsPaynow"] + """ + PayNow is a Singapore-based payment method that allows customers to make a payment using their preferred app from participating banks and participating non-bank financial institutions. Check this [page](https://stripe.com/docs/payments/paynow) for more details. + """ + paypal: NotRequired["PaymentMethodConfigurationCreateParamsPaypal"] + """ + PayPal, a digital wallet popular with customers in Europe, allows your customers worldwide to pay using their PayPal account. Check this [page](https://stripe.com/docs/payments/paypal) for more details. + """ + paypay: NotRequired["PaymentMethodConfigurationCreateParamsPaypay"] + """ + Customers can pay with PayPay online or using the PayPay app. + """ + payto: NotRequired["PaymentMethodConfigurationCreateParamsPayto"] + """ + PayTo is a [real-time](https://docs.stripe.com/payments/real-time) payment method that enables customers in Australia to pay by providing their bank account details. Customers must accept a mandate authorizing you to debit their account. Check this [page](https://docs.stripe.com/payments/payto) for more details. + """ + pix: NotRequired["PaymentMethodConfigurationCreateParamsPix"] + """ + Pix is a payment method popular in Brazil. When paying with Pix, customers authenticate and approve payments by scanning a QR code in their preferred banking app. Check this [page](https://docs.stripe.com/payments/pix) for more details. + """ + promptpay: NotRequired["PaymentMethodConfigurationCreateParamsPromptpay"] + """ + PromptPay is a Thailand-based payment method that allows customers to make a payment using their preferred app from participating banks. Check this [page](https://stripe.com/docs/payments/promptpay) for more details. + """ + qris: NotRequired["PaymentMethodConfigurationCreateParamsQris"] + """ + QRIS is a [real-time](https://docs.stripe.com/payments/real-time) payment method popular in Indonesia. When paying with QRIS, customers authenticate and approve payments by scanning a QR code in their preferred digital wallet app. + """ + revolut_pay: NotRequired[ + "PaymentMethodConfigurationCreateParamsRevolutPay" + ] + """ + Revolut Pay, developed by Revolut, a global finance app, is a digital wallet payment method. Revolut Pay uses the customer's stored balance or cards to fund the payment, and offers the option for non-Revolut customers to save their details after their first purchase. + """ + samsung_pay: NotRequired[ + "PaymentMethodConfigurationCreateParamsSamsungPay" + ] + """ + Samsung Pay is a [single-use](https://docs.stripe.com/payments/payment-methods#usage local wallet available in South Korea. + """ + satispay: NotRequired["PaymentMethodConfigurationCreateParamsSatispay"] + """ + Satispay is a [single-use](https://docs.stripe.com/payments/payment-methods#usage) payment method where customers are required to [authenticate](https://docs.stripe.com/payments/payment-methods#customer-actions) their payment. Customers pay by being redirected from your website or app, authorizing the payment with Satispay, then returning to your website or app. You get [immediate notification](https://docs.stripe.com/payments/payment-methods#payment-notification) of whether the payment succeeded or failed. + """ + sepa_debit: NotRequired["PaymentMethodConfigurationCreateParamsSepaDebit"] + """ + The [Single Euro Payments Area (SEPA)](https://en.wikipedia.org/wiki/Single_Euro_Payments_Area) is an initiative of the European Union to simplify payments within and across member countries. SEPA established and enforced banking standards to allow for the direct debiting of every EUR-denominated bank account within the SEPA region, check this [page](https://stripe.com/docs/payments/sepa-debit) for more details. + """ + shopeepay: NotRequired["PaymentMethodConfigurationCreateParamsShopeepay"] + """ + ShopeePay is a [single use](https://stripe.com/docs/payments/payment-methods#usage) digital wallet payment method popular in Indonesia. When paying with GoPay, customers authenticate and approve payments using the Shopee app. Desktop checkout is performed by scanning a QR code. When checking out on mobile, customers are redirected to the Shopee app to confirm payment. + """ + sofort: NotRequired["PaymentMethodConfigurationCreateParamsSofort"] + """ + Stripe users in Europe and the United States can use the [Payment Intents API](https://stripe.com/docs/payments/payment-intents)—a single integration path for creating payments using any supported method—to accept [Sofort](https://www.sofort.com/) payments from customers. Check this [page](https://stripe.com/docs/payments/sofort) for more details. + """ + swish: NotRequired["PaymentMethodConfigurationCreateParamsSwish"] + """ + Swish is a [real-time](https://stripe.com/docs/payments/real-time) payment method popular in Sweden. It allows customers to [authenticate and approve](https://stripe.com/docs/payments/payment-methods#customer-actions) payments using the Swish mobile app and the Swedish BankID mobile app. Check this [page](https://stripe.com/docs/payments/swish) for more details. + """ + twint: NotRequired["PaymentMethodConfigurationCreateParamsTwint"] + """ + Twint is a payment method popular in Switzerland. It allows customers to pay using their mobile phone. Check this [page](https://docs.stripe.com/payments/twint) for more details. + """ + us_bank_account: NotRequired[ + "PaymentMethodConfigurationCreateParamsUsBankAccount" + ] + """ + Stripe users in the United States can accept ACH direct debit payments from customers with a US bank account using the Automated Clearing House (ACH) payments system operated by Nacha. Check this [page](https://stripe.com/docs/payments/ach-direct-debit) for more details. + """ + wechat_pay: NotRequired["PaymentMethodConfigurationCreateParamsWechatPay"] + """ + WeChat, owned by Tencent, is China's leading mobile app with over 1 billion monthly active users. Chinese consumers can use WeChat Pay to pay for goods and services inside of businesses' apps and websites. WeChat Pay users buy most frequently in gaming, e-commerce, travel, online education, and food/nutrition. Check this [page](https://stripe.com/docs/payments/wechat-pay) for more details. + """ + zip: NotRequired["PaymentMethodConfigurationCreateParamsZip"] + """ + Zip gives your customers a way to split purchases over a series of payments. Check this [page](https://stripe.com/docs/payments/zip) for more details like country availability. + """ + + +class PaymentMethodConfigurationCreateParamsAcssDebit(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationCreateParamsAcssDebitDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationCreateParamsAcssDebitDisplayPreference( + TypedDict, +): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationCreateParamsAffirm(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationCreateParamsAffirmDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationCreateParamsAffirmDisplayPreference(TypedDict): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationCreateParamsAfterpayClearpay(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationCreateParamsAfterpayClearpayDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationCreateParamsAfterpayClearpayDisplayPreference( + TypedDict, +): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationCreateParamsAlipay(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationCreateParamsAlipayDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationCreateParamsAlipayDisplayPreference(TypedDict): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationCreateParamsAlma(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationCreateParamsAlmaDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationCreateParamsAlmaDisplayPreference(TypedDict): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationCreateParamsAmazonPay(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationCreateParamsAmazonPayDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationCreateParamsAmazonPayDisplayPreference( + TypedDict, +): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationCreateParamsApplePay(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationCreateParamsApplePayDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationCreateParamsApplePayDisplayPreference( + TypedDict, +): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationCreateParamsApplePayLater(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationCreateParamsApplePayLaterDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationCreateParamsApplePayLaterDisplayPreference( + TypedDict, +): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationCreateParamsAuBecsDebit(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationCreateParamsAuBecsDebitDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationCreateParamsAuBecsDebitDisplayPreference( + TypedDict, +): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationCreateParamsBacsDebit(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationCreateParamsBacsDebitDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationCreateParamsBacsDebitDisplayPreference( + TypedDict, +): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationCreateParamsBancontact(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationCreateParamsBancontactDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationCreateParamsBancontactDisplayPreference( + TypedDict, +): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationCreateParamsBillie(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationCreateParamsBillieDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationCreateParamsBillieDisplayPreference(TypedDict): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationCreateParamsBlik(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationCreateParamsBlikDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationCreateParamsBlikDisplayPreference(TypedDict): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationCreateParamsBoleto(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationCreateParamsBoletoDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationCreateParamsBoletoDisplayPreference(TypedDict): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationCreateParamsCard(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationCreateParamsCardDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationCreateParamsCardDisplayPreference(TypedDict): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationCreateParamsCartesBancaires(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationCreateParamsCartesBancairesDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationCreateParamsCartesBancairesDisplayPreference( + TypedDict, +): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationCreateParamsCashapp(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationCreateParamsCashappDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationCreateParamsCashappDisplayPreference( + TypedDict +): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationCreateParamsCustomerBalance(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationCreateParamsCustomerBalanceDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationCreateParamsCustomerBalanceDisplayPreference( + TypedDict, +): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationCreateParamsEps(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationCreateParamsEpsDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationCreateParamsEpsDisplayPreference(TypedDict): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationCreateParamsFpx(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationCreateParamsFpxDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationCreateParamsFpxDisplayPreference(TypedDict): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationCreateParamsFrMealVoucherConecs(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationCreateParamsFrMealVoucherConecsDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationCreateParamsFrMealVoucherConecsDisplayPreference( + TypedDict, +): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationCreateParamsGiropay(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationCreateParamsGiropayDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationCreateParamsGiropayDisplayPreference( + TypedDict +): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationCreateParamsGooglePay(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationCreateParamsGooglePayDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationCreateParamsGooglePayDisplayPreference( + TypedDict, +): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationCreateParamsGopay(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationCreateParamsGopayDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationCreateParamsGopayDisplayPreference(TypedDict): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationCreateParamsGrabpay(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationCreateParamsGrabpayDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationCreateParamsGrabpayDisplayPreference( + TypedDict +): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationCreateParamsIdBankTransfer(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationCreateParamsIdBankTransferDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationCreateParamsIdBankTransferDisplayPreference( + TypedDict, +): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationCreateParamsIdeal(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationCreateParamsIdealDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationCreateParamsIdealDisplayPreference(TypedDict): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationCreateParamsJcb(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationCreateParamsJcbDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationCreateParamsJcbDisplayPreference(TypedDict): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationCreateParamsKakaoPay(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationCreateParamsKakaoPayDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationCreateParamsKakaoPayDisplayPreference( + TypedDict, +): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationCreateParamsKlarna(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationCreateParamsKlarnaDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationCreateParamsKlarnaDisplayPreference(TypedDict): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationCreateParamsKonbini(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationCreateParamsKonbiniDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationCreateParamsKonbiniDisplayPreference( + TypedDict +): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationCreateParamsKrCard(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationCreateParamsKrCardDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationCreateParamsKrCardDisplayPreference(TypedDict): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationCreateParamsLink(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationCreateParamsLinkDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationCreateParamsLinkDisplayPreference(TypedDict): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationCreateParamsMobilepay(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationCreateParamsMobilepayDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationCreateParamsMobilepayDisplayPreference( + TypedDict, +): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationCreateParamsMultibanco(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationCreateParamsMultibancoDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationCreateParamsMultibancoDisplayPreference( + TypedDict, +): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationCreateParamsNaverPay(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationCreateParamsNaverPayDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationCreateParamsNaverPayDisplayPreference( + TypedDict, +): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationCreateParamsNzBankAccount(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationCreateParamsNzBankAccountDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationCreateParamsNzBankAccountDisplayPreference( + TypedDict, +): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationCreateParamsOxxo(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationCreateParamsOxxoDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationCreateParamsOxxoDisplayPreference(TypedDict): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationCreateParamsP24(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationCreateParamsP24DisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationCreateParamsP24DisplayPreference(TypedDict): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationCreateParamsPayByBank(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationCreateParamsPayByBankDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationCreateParamsPayByBankDisplayPreference( + TypedDict, +): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationCreateParamsPayco(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationCreateParamsPaycoDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationCreateParamsPaycoDisplayPreference(TypedDict): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationCreateParamsPaynow(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationCreateParamsPaynowDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationCreateParamsPaynowDisplayPreference(TypedDict): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationCreateParamsPaypal(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationCreateParamsPaypalDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationCreateParamsPaypalDisplayPreference(TypedDict): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationCreateParamsPaypay(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationCreateParamsPaypayDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationCreateParamsPaypayDisplayPreference(TypedDict): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationCreateParamsPayto(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationCreateParamsPaytoDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationCreateParamsPaytoDisplayPreference(TypedDict): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationCreateParamsPix(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationCreateParamsPixDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationCreateParamsPixDisplayPreference(TypedDict): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationCreateParamsPromptpay(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationCreateParamsPromptpayDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationCreateParamsPromptpayDisplayPreference( + TypedDict, +): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationCreateParamsQris(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationCreateParamsQrisDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationCreateParamsQrisDisplayPreference(TypedDict): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationCreateParamsRevolutPay(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationCreateParamsRevolutPayDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationCreateParamsRevolutPayDisplayPreference( + TypedDict, +): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationCreateParamsSamsungPay(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationCreateParamsSamsungPayDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationCreateParamsSamsungPayDisplayPreference( + TypedDict, +): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationCreateParamsSatispay(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationCreateParamsSatispayDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationCreateParamsSatispayDisplayPreference( + TypedDict, +): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationCreateParamsSepaDebit(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationCreateParamsSepaDebitDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationCreateParamsSepaDebitDisplayPreference( + TypedDict, +): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationCreateParamsShopeepay(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationCreateParamsShopeepayDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationCreateParamsShopeepayDisplayPreference( + TypedDict, +): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationCreateParamsSofort(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationCreateParamsSofortDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationCreateParamsSofortDisplayPreference(TypedDict): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationCreateParamsSwish(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationCreateParamsSwishDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationCreateParamsSwishDisplayPreference(TypedDict): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationCreateParamsTwint(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationCreateParamsTwintDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationCreateParamsTwintDisplayPreference(TypedDict): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationCreateParamsUsBankAccount(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationCreateParamsUsBankAccountDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationCreateParamsUsBankAccountDisplayPreference( + TypedDict, +): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationCreateParamsWechatPay(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationCreateParamsWechatPayDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationCreateParamsWechatPayDisplayPreference( + TypedDict, +): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationCreateParamsZip(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationCreateParamsZipDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationCreateParamsZipDisplayPreference(TypedDict): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ diff --git a/stripe/params/_payment_method_configuration_list_params.py b/stripe/params/_payment_method_configuration_list_params.py new file mode 100644 index 000000000..260d38878 --- /dev/null +++ b/stripe/params/_payment_method_configuration_list_params.py @@ -0,0 +1,28 @@ +# -*- 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 PaymentMethodConfigurationListParams(RequestOptions): + application: NotRequired["Literal['']|str"] + """ + The Connect application to filter by. + """ + 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. + """ diff --git a/stripe/params/_payment_method_configuration_modify_params.py b/stripe/params/_payment_method_configuration_modify_params.py new file mode 100644 index 000000000..4d2ee1627 --- /dev/null +++ b/stripe/params/_payment_method_configuration_modify_params.py @@ -0,0 +1,1284 @@ +# -*- 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, TypedDict + + +class PaymentMethodConfigurationModifyParams(RequestOptions): + acss_debit: NotRequired["PaymentMethodConfigurationModifyParamsAcssDebit"] + """ + Canadian pre-authorized debit payments, check this [page](https://stripe.com/docs/payments/acss-debit) for more details like country availability. + """ + active: NotRequired[bool] + """ + Whether the configuration can be used for new payments. + """ + affirm: NotRequired["PaymentMethodConfigurationModifyParamsAffirm"] + """ + [Affirm](https://www.affirm.com/) gives your customers a way to split purchases over a series of payments. Depending on the purchase, they can pay with four interest-free payments (Split Pay) or pay over a longer term (Installments), which might include interest. Check this [page](https://stripe.com/docs/payments/affirm) for more details like country availability. + """ + afterpay_clearpay: NotRequired[ + "PaymentMethodConfigurationModifyParamsAfterpayClearpay" + ] + """ + Afterpay gives your customers a way to pay for purchases in installments, check this [page](https://stripe.com/docs/payments/afterpay-clearpay) for more details like country availability. Afterpay is particularly popular among businesses selling fashion, beauty, and sports products. + """ + alipay: NotRequired["PaymentMethodConfigurationModifyParamsAlipay"] + """ + Alipay is a digital wallet in China that has more than a billion active users worldwide. Alipay users can pay on the web or on a mobile device using login credentials or their Alipay app. Alipay has a low dispute rate and reduces fraud by authenticating payments using the customer's login credentials. Check this [page](https://stripe.com/docs/payments/alipay) for more details. + """ + alma: NotRequired["PaymentMethodConfigurationModifyParamsAlma"] + """ + Alma is a Buy Now, Pay Later payment method that offers customers the ability to pay in 2, 3, or 4 installments. + """ + amazon_pay: NotRequired["PaymentMethodConfigurationModifyParamsAmazonPay"] + """ + Amazon Pay is a wallet payment method that lets your customers check out the same way as on Amazon. + """ + apple_pay: NotRequired["PaymentMethodConfigurationModifyParamsApplePay"] + """ + Stripe users can accept [Apple Pay](https://stripe.com/payments/apple-pay) in iOS applications in iOS 9 and later, and on the web in Safari starting with iOS 10 or macOS Sierra. There are no additional fees to process Apple Pay payments, and the [pricing](https://stripe.com/pricing) is the same as other card transactions. Check this [page](https://stripe.com/docs/apple-pay) for more details. + """ + apple_pay_later: NotRequired[ + "PaymentMethodConfigurationModifyParamsApplePayLater" + ] + """ + Apple Pay Later, a payment method for customers to buy now and pay later, gives your customers a way to split purchases into four installments across six weeks. + """ + au_becs_debit: NotRequired[ + "PaymentMethodConfigurationModifyParamsAuBecsDebit" + ] + """ + Stripe users in Australia can accept Bulk Electronic Clearing System (BECS) direct debit payments from customers with an Australian bank account. Check this [page](https://stripe.com/docs/payments/au-becs-debit) for more details. + """ + bacs_debit: NotRequired["PaymentMethodConfigurationModifyParamsBacsDebit"] + """ + Stripe users in the UK can accept Bacs Direct Debit payments from customers with a UK bank account, check this [page](https://stripe.com/docs/payments/payment-methods/bacs-debit) for more details. + """ + bancontact: NotRequired["PaymentMethodConfigurationModifyParamsBancontact"] + """ + Bancontact is the most popular online payment method in Belgium, with over 15 million cards in circulation. [Customers](https://stripe.com/docs/api/customers) use a Bancontact card or mobile app linked to a Belgian bank account to make online payments that are secure, guaranteed, and confirmed immediately. Check this [page](https://stripe.com/docs/payments/bancontact) for more details. + """ + billie: NotRequired["PaymentMethodConfigurationModifyParamsBillie"] + """ + Billie is a [single-use](https://docs.stripe.com/payments/payment-methods#usage) payment method that offers businesses Pay by Invoice where they offer payment terms ranging from 7-120 days. Customers are redirected from your website or app, authorize the payment with Billie, then return to your website or app. You get [immediate notification](https://docs.stripe.com/payments/payment-methods#payment-notification) of whether the payment succeeded or failed. + """ + blik: NotRequired["PaymentMethodConfigurationModifyParamsBlik"] + """ + BLIK is a [single use](https://stripe.com/docs/payments/payment-methods#usage) payment method that requires customers to authenticate their payments. When customers want to pay online using BLIK, they request a six-digit code from their banking application and enter it into the payment collection form. Check this [page](https://stripe.com/docs/payments/blik) for more details. + """ + boleto: NotRequired["PaymentMethodConfigurationModifyParamsBoleto"] + """ + Boleto is an official (regulated by the Central Bank of Brazil) payment method in Brazil. Check this [page](https://stripe.com/docs/payments/boleto) for more details. + """ + card: NotRequired["PaymentMethodConfigurationModifyParamsCard"] + """ + Cards are a popular way for consumers and businesses to pay online or in person. Stripe supports global and local card networks. + """ + cartes_bancaires: NotRequired[ + "PaymentMethodConfigurationModifyParamsCartesBancaires" + ] + """ + Cartes Bancaires is France's local card network. More than 95% of these cards are co-branded with either Visa or Mastercard, meaning you can process these cards over either Cartes Bancaires or the Visa or Mastercard networks. Check this [page](https://stripe.com/docs/payments/cartes-bancaires) for more details. + """ + cashapp: NotRequired["PaymentMethodConfigurationModifyParamsCashapp"] + """ + Cash App is a popular consumer app in the US that allows customers to bank, invest, send, and receive money using their digital wallet. Check this [page](https://stripe.com/docs/payments/cash-app-pay) for more details. + """ + customer_balance: NotRequired[ + "PaymentMethodConfigurationModifyParamsCustomerBalance" + ] + """ + Uses a customer's [cash balance](https://stripe.com/docs/payments/customer-balance) for the payment. The cash balance can be funded via a bank transfer. Check this [page](https://stripe.com/docs/payments/bank-transfers) for more details. + """ + eps: NotRequired["PaymentMethodConfigurationModifyParamsEps"] + """ + EPS is an Austria-based payment method that allows customers to complete transactions online using their bank credentials. EPS is supported by all Austrian banks and is accepted by over 80% of Austrian online retailers. Check this [page](https://stripe.com/docs/payments/eps) for more details. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + fpx: NotRequired["PaymentMethodConfigurationModifyParamsFpx"] + """ + Financial Process Exchange (FPX) is a Malaysia-based payment method that allows customers to complete transactions online using their bank credentials. Bank Negara Malaysia (BNM), the Central Bank of Malaysia, and eleven other major Malaysian financial institutions are members of the PayNet Group, which owns and operates FPX. It is one of the most popular online payment methods in Malaysia, with nearly 90 million transactions in 2018 according to BNM. Check this [page](https://stripe.com/docs/payments/fpx) for more details. + """ + fr_meal_voucher_conecs: NotRequired[ + "PaymentMethodConfigurationModifyParamsFrMealVoucherConecs" + ] + """ + Meal vouchers in France, or “titres-restaurant”, is a local benefits program commonly offered by employers for their employees to purchase prepared food and beverages on working days. Check this [page](https://stripe.com/docs/payments/benefits/fr-meal-vouchers) for more details. + """ + giropay: NotRequired["PaymentMethodConfigurationModifyParamsGiropay"] + """ + giropay is a German payment method based on online banking, introduced in 2006. It allows customers to complete transactions online using their online banking environment, with funds debited from their bank account. Depending on their bank, customers confirm payments on giropay using a second factor of authentication or a PIN. giropay accounts for 10% of online checkouts in Germany. Check this [page](https://stripe.com/docs/payments/giropay) for more details. + """ + google_pay: NotRequired["PaymentMethodConfigurationModifyParamsGooglePay"] + """ + Google Pay allows customers to make payments in your app or website using any credit or debit card saved to their Google Account, including those from Google Play, YouTube, Chrome, or an Android device. Use the Google Pay API to request any credit or debit card stored in your customer's Google account. Check this [page](https://stripe.com/docs/google-pay) for more details. + """ + gopay: NotRequired["PaymentMethodConfigurationModifyParamsGopay"] + """ + GoPay is a [single use](https://stripe.com/docs/payments/payment-methods#usage) digital wallet payment method popular in Indonesia. When paying with GoPay, customers authenticate and approve payments using the Gojek app. Desktop checkout is performed by scanning a QR code. When checking out on mobile, customers are redirected to the Gojek app to confirm payment. + """ + grabpay: NotRequired["PaymentMethodConfigurationModifyParamsGrabpay"] + """ + GrabPay is a payment method developed by [Grab](https://www.grab.com/sg/consumer/finance/pay/). GrabPay is a digital wallet - customers maintain a balance in their wallets that they pay out with. Check this [page](https://stripe.com/docs/payments/grabpay) for more details. + """ + id_bank_transfer: NotRequired[ + "PaymentMethodConfigurationModifyParamsIdBankTransfer" + ] + """ + Stripe users in Indonesia can receive bank transfers from customers in Indonesia. Bank transfers are a popular B2C and B2B payment method in Indonesia. + """ + ideal: NotRequired["PaymentMethodConfigurationModifyParamsIdeal"] + """ + iDEAL is a Netherlands-based payment method that allows customers to complete transactions online using their bank credentials. All major Dutch banks are members of Currence, the scheme that operates iDEAL, making it the most popular online payment method in the Netherlands with a share of online transactions close to 55%. Check this [page](https://stripe.com/docs/payments/ideal) for more details. + """ + jcb: NotRequired["PaymentMethodConfigurationModifyParamsJcb"] + """ + JCB is a credit card company based in Japan. JCB is currently available in Japan to businesses approved by JCB, and available to all businesses in Australia, Canada, Hong Kong, Japan, New Zealand, Singapore, Switzerland, United Kingdom, United States, and all countries in the European Economic Area except Iceland. Check this [page](https://support.stripe.com/questions/accepting-japan-credit-bureau-%28jcb%29-payments) for more details. + """ + kakao_pay: NotRequired["PaymentMethodConfigurationModifyParamsKakaoPay"] + """ + Kakao Pay is a popular local wallet available in South Korea. + """ + klarna: NotRequired["PaymentMethodConfigurationModifyParamsKlarna"] + """ + Klarna gives customers a range of [payment options](https://stripe.com/docs/payments/klarna#payment-options) during checkout. Available payment options vary depending on the customer's billing address and the transaction amount. These payment options make it convenient for customers to purchase items in all price ranges. Check this [page](https://stripe.com/docs/payments/klarna) for more details. + """ + konbini: NotRequired["PaymentMethodConfigurationModifyParamsKonbini"] + """ + Konbini allows customers in Japan to pay for bills and online purchases at convenience stores with cash. Check this [page](https://stripe.com/docs/payments/konbini) for more details. + """ + kr_card: NotRequired["PaymentMethodConfigurationModifyParamsKrCard"] + """ + Korean cards let users pay using locally issued cards from South Korea. + """ + link: NotRequired["PaymentMethodConfigurationModifyParamsLink"] + """ + [Link](https://stripe.com/docs/payments/link) is a payment method network. With Link, users save their payment details once, then reuse that information to pay with one click for any business on the network. + """ + mobilepay: NotRequired["PaymentMethodConfigurationModifyParamsMobilepay"] + """ + MobilePay is a [single-use](https://stripe.com/docs/payments/payment-methods#usage) card wallet payment method used in Denmark and Finland. It allows customers to [authenticate and approve](https://stripe.com/docs/payments/payment-methods#customer-actions) payments using the MobilePay app. Check this [page](https://stripe.com/docs/payments/mobilepay) for more details. + """ + multibanco: NotRequired["PaymentMethodConfigurationModifyParamsMultibanco"] + """ + Stripe users in Europe and the United States can accept Multibanco payments from customers in Portugal using [Sources](https://stripe.com/docs/sources)—a single integration path for creating payments using any supported method. + """ + name: NotRequired[str] + """ + Configuration name. + """ + naver_pay: NotRequired["PaymentMethodConfigurationModifyParamsNaverPay"] + """ + Naver Pay is a popular local wallet available in South Korea. + """ + nz_bank_account: NotRequired[ + "PaymentMethodConfigurationModifyParamsNzBankAccount" + ] + """ + Stripe users in New Zealand can accept Bulk Electronic Clearing System (BECS) direct debit payments from customers with a New Zeland bank account. Check this [page](https://stripe.com/docs/payments/nz-bank-account) for more details. + """ + oxxo: NotRequired["PaymentMethodConfigurationModifyParamsOxxo"] + """ + OXXO is a Mexican chain of convenience stores with thousands of locations across Latin America and represents nearly 20% of online transactions in Mexico. OXXO allows customers to pay bills and online purchases in-store with cash. Check this [page](https://stripe.com/docs/payments/oxxo) for more details. + """ + p24: NotRequired["PaymentMethodConfigurationModifyParamsP24"] + """ + Przelewy24 is a Poland-based payment method aggregator that allows customers to complete transactions online using bank transfers and other methods. Bank transfers account for 30% of online payments in Poland and Przelewy24 provides a way for customers to pay with over 165 banks. Check this [page](https://stripe.com/docs/payments/p24) for more details. + """ + pay_by_bank: NotRequired["PaymentMethodConfigurationModifyParamsPayByBank"] + """ + Pay by bank is a redirect payment method backed by bank transfers. A customer is redirected to their bank to authorize a bank transfer for a given amount. This removes a lot of the error risks inherent in waiting for the customer to initiate a transfer themselves, and is less expensive than card payments. + """ + payco: NotRequired["PaymentMethodConfigurationModifyParamsPayco"] + """ + PAYCO is a [single-use](https://docs.stripe.com/payments/payment-methods#usage local wallet available in South Korea. + """ + paynow: NotRequired["PaymentMethodConfigurationModifyParamsPaynow"] + """ + PayNow is a Singapore-based payment method that allows customers to make a payment using their preferred app from participating banks and participating non-bank financial institutions. Check this [page](https://stripe.com/docs/payments/paynow) for more details. + """ + paypal: NotRequired["PaymentMethodConfigurationModifyParamsPaypal"] + """ + PayPal, a digital wallet popular with customers in Europe, allows your customers worldwide to pay using their PayPal account. Check this [page](https://stripe.com/docs/payments/paypal) for more details. + """ + paypay: NotRequired["PaymentMethodConfigurationModifyParamsPaypay"] + """ + Customers can pay with PayPay online or using the PayPay app. + """ + payto: NotRequired["PaymentMethodConfigurationModifyParamsPayto"] + """ + PayTo is a [real-time](https://docs.stripe.com/payments/real-time) payment method that enables customers in Australia to pay by providing their bank account details. Customers must accept a mandate authorizing you to debit their account. Check this [page](https://docs.stripe.com/payments/payto) for more details. + """ + pix: NotRequired["PaymentMethodConfigurationModifyParamsPix"] + """ + Pix is a payment method popular in Brazil. When paying with Pix, customers authenticate and approve payments by scanning a QR code in their preferred banking app. Check this [page](https://docs.stripe.com/payments/pix) for more details. + """ + promptpay: NotRequired["PaymentMethodConfigurationModifyParamsPromptpay"] + """ + PromptPay is a Thailand-based payment method that allows customers to make a payment using their preferred app from participating banks. Check this [page](https://stripe.com/docs/payments/promptpay) for more details. + """ + qris: NotRequired["PaymentMethodConfigurationModifyParamsQris"] + """ + QRIS is a [real-time](https://docs.stripe.com/payments/real-time) payment method popular in Indonesia. When paying with QRIS, customers authenticate and approve payments by scanning a QR code in their preferred digital wallet app. + """ + revolut_pay: NotRequired[ + "PaymentMethodConfigurationModifyParamsRevolutPay" + ] + """ + Revolut Pay, developed by Revolut, a global finance app, is a digital wallet payment method. Revolut Pay uses the customer's stored balance or cards to fund the payment, and offers the option for non-Revolut customers to save their details after their first purchase. + """ + samsung_pay: NotRequired[ + "PaymentMethodConfigurationModifyParamsSamsungPay" + ] + """ + Samsung Pay is a [single-use](https://docs.stripe.com/payments/payment-methods#usage local wallet available in South Korea. + """ + satispay: NotRequired["PaymentMethodConfigurationModifyParamsSatispay"] + """ + Satispay is a [single-use](https://docs.stripe.com/payments/payment-methods#usage) payment method where customers are required to [authenticate](https://docs.stripe.com/payments/payment-methods#customer-actions) their payment. Customers pay by being redirected from your website or app, authorizing the payment with Satispay, then returning to your website or app. You get [immediate notification](https://docs.stripe.com/payments/payment-methods#payment-notification) of whether the payment succeeded or failed. + """ + sepa_debit: NotRequired["PaymentMethodConfigurationModifyParamsSepaDebit"] + """ + The [Single Euro Payments Area (SEPA)](https://en.wikipedia.org/wiki/Single_Euro_Payments_Area) is an initiative of the European Union to simplify payments within and across member countries. SEPA established and enforced banking standards to allow for the direct debiting of every EUR-denominated bank account within the SEPA region, check this [page](https://stripe.com/docs/payments/sepa-debit) for more details. + """ + shopeepay: NotRequired["PaymentMethodConfigurationModifyParamsShopeepay"] + """ + ShopeePay is a [single use](https://stripe.com/docs/payments/payment-methods#usage) digital wallet payment method popular in Indonesia. When paying with GoPay, customers authenticate and approve payments using the Shopee app. Desktop checkout is performed by scanning a QR code. When checking out on mobile, customers are redirected to the Shopee app to confirm payment. + """ + sofort: NotRequired["PaymentMethodConfigurationModifyParamsSofort"] + """ + Stripe users in Europe and the United States can use the [Payment Intents API](https://stripe.com/docs/payments/payment-intents)—a single integration path for creating payments using any supported method—to accept [Sofort](https://www.sofort.com/) payments from customers. Check this [page](https://stripe.com/docs/payments/sofort) for more details. + """ + swish: NotRequired["PaymentMethodConfigurationModifyParamsSwish"] + """ + Swish is a [real-time](https://stripe.com/docs/payments/real-time) payment method popular in Sweden. It allows customers to [authenticate and approve](https://stripe.com/docs/payments/payment-methods#customer-actions) payments using the Swish mobile app and the Swedish BankID mobile app. Check this [page](https://stripe.com/docs/payments/swish) for more details. + """ + twint: NotRequired["PaymentMethodConfigurationModifyParamsTwint"] + """ + Twint is a payment method popular in Switzerland. It allows customers to pay using their mobile phone. Check this [page](https://docs.stripe.com/payments/twint) for more details. + """ + us_bank_account: NotRequired[ + "PaymentMethodConfigurationModifyParamsUsBankAccount" + ] + """ + Stripe users in the United States can accept ACH direct debit payments from customers with a US bank account using the Automated Clearing House (ACH) payments system operated by Nacha. Check this [page](https://stripe.com/docs/payments/ach-direct-debit) for more details. + """ + wechat_pay: NotRequired["PaymentMethodConfigurationModifyParamsWechatPay"] + """ + WeChat, owned by Tencent, is China's leading mobile app with over 1 billion monthly active users. Chinese consumers can use WeChat Pay to pay for goods and services inside of businesses' apps and websites. WeChat Pay users buy most frequently in gaming, e-commerce, travel, online education, and food/nutrition. Check this [page](https://stripe.com/docs/payments/wechat-pay) for more details. + """ + zip: NotRequired["PaymentMethodConfigurationModifyParamsZip"] + """ + Zip gives your customers a way to split purchases over a series of payments. Check this [page](https://stripe.com/docs/payments/zip) for more details like country availability. + """ + + +class PaymentMethodConfigurationModifyParamsAcssDebit(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationModifyParamsAcssDebitDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationModifyParamsAcssDebitDisplayPreference( + TypedDict, +): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationModifyParamsAffirm(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationModifyParamsAffirmDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationModifyParamsAffirmDisplayPreference(TypedDict): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationModifyParamsAfterpayClearpay(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationModifyParamsAfterpayClearpayDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationModifyParamsAfterpayClearpayDisplayPreference( + TypedDict, +): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationModifyParamsAlipay(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationModifyParamsAlipayDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationModifyParamsAlipayDisplayPreference(TypedDict): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationModifyParamsAlma(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationModifyParamsAlmaDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationModifyParamsAlmaDisplayPreference(TypedDict): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationModifyParamsAmazonPay(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationModifyParamsAmazonPayDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationModifyParamsAmazonPayDisplayPreference( + TypedDict, +): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationModifyParamsApplePay(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationModifyParamsApplePayDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationModifyParamsApplePayDisplayPreference( + TypedDict, +): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationModifyParamsApplePayLater(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationModifyParamsApplePayLaterDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationModifyParamsApplePayLaterDisplayPreference( + TypedDict, +): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationModifyParamsAuBecsDebit(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationModifyParamsAuBecsDebitDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationModifyParamsAuBecsDebitDisplayPreference( + TypedDict, +): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationModifyParamsBacsDebit(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationModifyParamsBacsDebitDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationModifyParamsBacsDebitDisplayPreference( + TypedDict, +): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationModifyParamsBancontact(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationModifyParamsBancontactDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationModifyParamsBancontactDisplayPreference( + TypedDict, +): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationModifyParamsBillie(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationModifyParamsBillieDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationModifyParamsBillieDisplayPreference(TypedDict): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationModifyParamsBlik(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationModifyParamsBlikDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationModifyParamsBlikDisplayPreference(TypedDict): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationModifyParamsBoleto(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationModifyParamsBoletoDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationModifyParamsBoletoDisplayPreference(TypedDict): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationModifyParamsCard(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationModifyParamsCardDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationModifyParamsCardDisplayPreference(TypedDict): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationModifyParamsCartesBancaires(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationModifyParamsCartesBancairesDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationModifyParamsCartesBancairesDisplayPreference( + TypedDict, +): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationModifyParamsCashapp(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationModifyParamsCashappDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationModifyParamsCashappDisplayPreference( + TypedDict +): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationModifyParamsCustomerBalance(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationModifyParamsCustomerBalanceDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationModifyParamsCustomerBalanceDisplayPreference( + TypedDict, +): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationModifyParamsEps(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationModifyParamsEpsDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationModifyParamsEpsDisplayPreference(TypedDict): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationModifyParamsFpx(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationModifyParamsFpxDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationModifyParamsFpxDisplayPreference(TypedDict): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationModifyParamsFrMealVoucherConecs(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationModifyParamsFrMealVoucherConecsDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationModifyParamsFrMealVoucherConecsDisplayPreference( + TypedDict, +): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationModifyParamsGiropay(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationModifyParamsGiropayDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationModifyParamsGiropayDisplayPreference( + TypedDict +): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationModifyParamsGooglePay(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationModifyParamsGooglePayDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationModifyParamsGooglePayDisplayPreference( + TypedDict, +): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationModifyParamsGopay(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationModifyParamsGopayDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationModifyParamsGopayDisplayPreference(TypedDict): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationModifyParamsGrabpay(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationModifyParamsGrabpayDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationModifyParamsGrabpayDisplayPreference( + TypedDict +): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationModifyParamsIdBankTransfer(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationModifyParamsIdBankTransferDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationModifyParamsIdBankTransferDisplayPreference( + TypedDict, +): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationModifyParamsIdeal(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationModifyParamsIdealDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationModifyParamsIdealDisplayPreference(TypedDict): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationModifyParamsJcb(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationModifyParamsJcbDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationModifyParamsJcbDisplayPreference(TypedDict): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationModifyParamsKakaoPay(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationModifyParamsKakaoPayDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationModifyParamsKakaoPayDisplayPreference( + TypedDict, +): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationModifyParamsKlarna(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationModifyParamsKlarnaDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationModifyParamsKlarnaDisplayPreference(TypedDict): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationModifyParamsKonbini(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationModifyParamsKonbiniDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationModifyParamsKonbiniDisplayPreference( + TypedDict +): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationModifyParamsKrCard(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationModifyParamsKrCardDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationModifyParamsKrCardDisplayPreference(TypedDict): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationModifyParamsLink(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationModifyParamsLinkDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationModifyParamsLinkDisplayPreference(TypedDict): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationModifyParamsMobilepay(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationModifyParamsMobilepayDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationModifyParamsMobilepayDisplayPreference( + TypedDict, +): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationModifyParamsMultibanco(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationModifyParamsMultibancoDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationModifyParamsMultibancoDisplayPreference( + TypedDict, +): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationModifyParamsNaverPay(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationModifyParamsNaverPayDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationModifyParamsNaverPayDisplayPreference( + TypedDict, +): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationModifyParamsNzBankAccount(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationModifyParamsNzBankAccountDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationModifyParamsNzBankAccountDisplayPreference( + TypedDict, +): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationModifyParamsOxxo(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationModifyParamsOxxoDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationModifyParamsOxxoDisplayPreference(TypedDict): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationModifyParamsP24(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationModifyParamsP24DisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationModifyParamsP24DisplayPreference(TypedDict): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationModifyParamsPayByBank(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationModifyParamsPayByBankDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationModifyParamsPayByBankDisplayPreference( + TypedDict, +): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationModifyParamsPayco(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationModifyParamsPaycoDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationModifyParamsPaycoDisplayPreference(TypedDict): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationModifyParamsPaynow(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationModifyParamsPaynowDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationModifyParamsPaynowDisplayPreference(TypedDict): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationModifyParamsPaypal(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationModifyParamsPaypalDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationModifyParamsPaypalDisplayPreference(TypedDict): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationModifyParamsPaypay(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationModifyParamsPaypayDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationModifyParamsPaypayDisplayPreference(TypedDict): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationModifyParamsPayto(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationModifyParamsPaytoDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationModifyParamsPaytoDisplayPreference(TypedDict): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationModifyParamsPix(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationModifyParamsPixDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationModifyParamsPixDisplayPreference(TypedDict): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationModifyParamsPromptpay(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationModifyParamsPromptpayDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationModifyParamsPromptpayDisplayPreference( + TypedDict, +): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationModifyParamsQris(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationModifyParamsQrisDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationModifyParamsQrisDisplayPreference(TypedDict): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationModifyParamsRevolutPay(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationModifyParamsRevolutPayDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationModifyParamsRevolutPayDisplayPreference( + TypedDict, +): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationModifyParamsSamsungPay(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationModifyParamsSamsungPayDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationModifyParamsSamsungPayDisplayPreference( + TypedDict, +): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationModifyParamsSatispay(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationModifyParamsSatispayDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationModifyParamsSatispayDisplayPreference( + TypedDict, +): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationModifyParamsSepaDebit(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationModifyParamsSepaDebitDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationModifyParamsSepaDebitDisplayPreference( + TypedDict, +): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationModifyParamsShopeepay(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationModifyParamsShopeepayDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationModifyParamsShopeepayDisplayPreference( + TypedDict, +): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationModifyParamsSofort(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationModifyParamsSofortDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationModifyParamsSofortDisplayPreference(TypedDict): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationModifyParamsSwish(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationModifyParamsSwishDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationModifyParamsSwishDisplayPreference(TypedDict): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationModifyParamsTwint(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationModifyParamsTwintDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationModifyParamsTwintDisplayPreference(TypedDict): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationModifyParamsUsBankAccount(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationModifyParamsUsBankAccountDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationModifyParamsUsBankAccountDisplayPreference( + TypedDict, +): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationModifyParamsWechatPay(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationModifyParamsWechatPayDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationModifyParamsWechatPayDisplayPreference( + TypedDict, +): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationModifyParamsZip(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationModifyParamsZipDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationModifyParamsZipDisplayPreference(TypedDict): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ diff --git a/stripe/params/_payment_method_configuration_retrieve_params.py b/stripe/params/_payment_method_configuration_retrieve_params.py new file mode 100644 index 000000000..49c5f0256 --- /dev/null +++ b/stripe/params/_payment_method_configuration_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 PaymentMethodConfigurationRetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_payment_method_configuration_update_params.py b/stripe/params/_payment_method_configuration_update_params.py new file mode 100644 index 000000000..bfdb7b680 --- /dev/null +++ b/stripe/params/_payment_method_configuration_update_params.py @@ -0,0 +1,1283 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import Literal, NotRequired, TypedDict + + +class PaymentMethodConfigurationUpdateParams(TypedDict): + acss_debit: NotRequired["PaymentMethodConfigurationUpdateParamsAcssDebit"] + """ + Canadian pre-authorized debit payments, check this [page](https://stripe.com/docs/payments/acss-debit) for more details like country availability. + """ + active: NotRequired[bool] + """ + Whether the configuration can be used for new payments. + """ + affirm: NotRequired["PaymentMethodConfigurationUpdateParamsAffirm"] + """ + [Affirm](https://www.affirm.com/) gives your customers a way to split purchases over a series of payments. Depending on the purchase, they can pay with four interest-free payments (Split Pay) or pay over a longer term (Installments), which might include interest. Check this [page](https://stripe.com/docs/payments/affirm) for more details like country availability. + """ + afterpay_clearpay: NotRequired[ + "PaymentMethodConfigurationUpdateParamsAfterpayClearpay" + ] + """ + Afterpay gives your customers a way to pay for purchases in installments, check this [page](https://stripe.com/docs/payments/afterpay-clearpay) for more details like country availability. Afterpay is particularly popular among businesses selling fashion, beauty, and sports products. + """ + alipay: NotRequired["PaymentMethodConfigurationUpdateParamsAlipay"] + """ + Alipay is a digital wallet in China that has more than a billion active users worldwide. Alipay users can pay on the web or on a mobile device using login credentials or their Alipay app. Alipay has a low dispute rate and reduces fraud by authenticating payments using the customer's login credentials. Check this [page](https://stripe.com/docs/payments/alipay) for more details. + """ + alma: NotRequired["PaymentMethodConfigurationUpdateParamsAlma"] + """ + Alma is a Buy Now, Pay Later payment method that offers customers the ability to pay in 2, 3, or 4 installments. + """ + amazon_pay: NotRequired["PaymentMethodConfigurationUpdateParamsAmazonPay"] + """ + Amazon Pay is a wallet payment method that lets your customers check out the same way as on Amazon. + """ + apple_pay: NotRequired["PaymentMethodConfigurationUpdateParamsApplePay"] + """ + Stripe users can accept [Apple Pay](https://stripe.com/payments/apple-pay) in iOS applications in iOS 9 and later, and on the web in Safari starting with iOS 10 or macOS Sierra. There are no additional fees to process Apple Pay payments, and the [pricing](https://stripe.com/pricing) is the same as other card transactions. Check this [page](https://stripe.com/docs/apple-pay) for more details. + """ + apple_pay_later: NotRequired[ + "PaymentMethodConfigurationUpdateParamsApplePayLater" + ] + """ + Apple Pay Later, a payment method for customers to buy now and pay later, gives your customers a way to split purchases into four installments across six weeks. + """ + au_becs_debit: NotRequired[ + "PaymentMethodConfigurationUpdateParamsAuBecsDebit" + ] + """ + Stripe users in Australia can accept Bulk Electronic Clearing System (BECS) direct debit payments from customers with an Australian bank account. Check this [page](https://stripe.com/docs/payments/au-becs-debit) for more details. + """ + bacs_debit: NotRequired["PaymentMethodConfigurationUpdateParamsBacsDebit"] + """ + Stripe users in the UK can accept Bacs Direct Debit payments from customers with a UK bank account, check this [page](https://stripe.com/docs/payments/payment-methods/bacs-debit) for more details. + """ + bancontact: NotRequired["PaymentMethodConfigurationUpdateParamsBancontact"] + """ + Bancontact is the most popular online payment method in Belgium, with over 15 million cards in circulation. [Customers](https://stripe.com/docs/api/customers) use a Bancontact card or mobile app linked to a Belgian bank account to make online payments that are secure, guaranteed, and confirmed immediately. Check this [page](https://stripe.com/docs/payments/bancontact) for more details. + """ + billie: NotRequired["PaymentMethodConfigurationUpdateParamsBillie"] + """ + Billie is a [single-use](https://docs.stripe.com/payments/payment-methods#usage) payment method that offers businesses Pay by Invoice where they offer payment terms ranging from 7-120 days. Customers are redirected from your website or app, authorize the payment with Billie, then return to your website or app. You get [immediate notification](https://docs.stripe.com/payments/payment-methods#payment-notification) of whether the payment succeeded or failed. + """ + blik: NotRequired["PaymentMethodConfigurationUpdateParamsBlik"] + """ + BLIK is a [single use](https://stripe.com/docs/payments/payment-methods#usage) payment method that requires customers to authenticate their payments. When customers want to pay online using BLIK, they request a six-digit code from their banking application and enter it into the payment collection form. Check this [page](https://stripe.com/docs/payments/blik) for more details. + """ + boleto: NotRequired["PaymentMethodConfigurationUpdateParamsBoleto"] + """ + Boleto is an official (regulated by the Central Bank of Brazil) payment method in Brazil. Check this [page](https://stripe.com/docs/payments/boleto) for more details. + """ + card: NotRequired["PaymentMethodConfigurationUpdateParamsCard"] + """ + Cards are a popular way for consumers and businesses to pay online or in person. Stripe supports global and local card networks. + """ + cartes_bancaires: NotRequired[ + "PaymentMethodConfigurationUpdateParamsCartesBancaires" + ] + """ + Cartes Bancaires is France's local card network. More than 95% of these cards are co-branded with either Visa or Mastercard, meaning you can process these cards over either Cartes Bancaires or the Visa or Mastercard networks. Check this [page](https://stripe.com/docs/payments/cartes-bancaires) for more details. + """ + cashapp: NotRequired["PaymentMethodConfigurationUpdateParamsCashapp"] + """ + Cash App is a popular consumer app in the US that allows customers to bank, invest, send, and receive money using their digital wallet. Check this [page](https://stripe.com/docs/payments/cash-app-pay) for more details. + """ + customer_balance: NotRequired[ + "PaymentMethodConfigurationUpdateParamsCustomerBalance" + ] + """ + Uses a customer's [cash balance](https://stripe.com/docs/payments/customer-balance) for the payment. The cash balance can be funded via a bank transfer. Check this [page](https://stripe.com/docs/payments/bank-transfers) for more details. + """ + eps: NotRequired["PaymentMethodConfigurationUpdateParamsEps"] + """ + EPS is an Austria-based payment method that allows customers to complete transactions online using their bank credentials. EPS is supported by all Austrian banks and is accepted by over 80% of Austrian online retailers. Check this [page](https://stripe.com/docs/payments/eps) for more details. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + fpx: NotRequired["PaymentMethodConfigurationUpdateParamsFpx"] + """ + Financial Process Exchange (FPX) is a Malaysia-based payment method that allows customers to complete transactions online using their bank credentials. Bank Negara Malaysia (BNM), the Central Bank of Malaysia, and eleven other major Malaysian financial institutions are members of the PayNet Group, which owns and operates FPX. It is one of the most popular online payment methods in Malaysia, with nearly 90 million transactions in 2018 according to BNM. Check this [page](https://stripe.com/docs/payments/fpx) for more details. + """ + fr_meal_voucher_conecs: NotRequired[ + "PaymentMethodConfigurationUpdateParamsFrMealVoucherConecs" + ] + """ + Meal vouchers in France, or “titres-restaurant”, is a local benefits program commonly offered by employers for their employees to purchase prepared food and beverages on working days. Check this [page](https://stripe.com/docs/payments/benefits/fr-meal-vouchers) for more details. + """ + giropay: NotRequired["PaymentMethodConfigurationUpdateParamsGiropay"] + """ + giropay is a German payment method based on online banking, introduced in 2006. It allows customers to complete transactions online using their online banking environment, with funds debited from their bank account. Depending on their bank, customers confirm payments on giropay using a second factor of authentication or a PIN. giropay accounts for 10% of online checkouts in Germany. Check this [page](https://stripe.com/docs/payments/giropay) for more details. + """ + google_pay: NotRequired["PaymentMethodConfigurationUpdateParamsGooglePay"] + """ + Google Pay allows customers to make payments in your app or website using any credit or debit card saved to their Google Account, including those from Google Play, YouTube, Chrome, or an Android device. Use the Google Pay API to request any credit or debit card stored in your customer's Google account. Check this [page](https://stripe.com/docs/google-pay) for more details. + """ + gopay: NotRequired["PaymentMethodConfigurationUpdateParamsGopay"] + """ + GoPay is a [single use](https://stripe.com/docs/payments/payment-methods#usage) digital wallet payment method popular in Indonesia. When paying with GoPay, customers authenticate and approve payments using the Gojek app. Desktop checkout is performed by scanning a QR code. When checking out on mobile, customers are redirected to the Gojek app to confirm payment. + """ + grabpay: NotRequired["PaymentMethodConfigurationUpdateParamsGrabpay"] + """ + GrabPay is a payment method developed by [Grab](https://www.grab.com/sg/consumer/finance/pay/). GrabPay is a digital wallet - customers maintain a balance in their wallets that they pay out with. Check this [page](https://stripe.com/docs/payments/grabpay) for more details. + """ + id_bank_transfer: NotRequired[ + "PaymentMethodConfigurationUpdateParamsIdBankTransfer" + ] + """ + Stripe users in Indonesia can receive bank transfers from customers in Indonesia. Bank transfers are a popular B2C and B2B payment method in Indonesia. + """ + ideal: NotRequired["PaymentMethodConfigurationUpdateParamsIdeal"] + """ + iDEAL is a Netherlands-based payment method that allows customers to complete transactions online using their bank credentials. All major Dutch banks are members of Currence, the scheme that operates iDEAL, making it the most popular online payment method in the Netherlands with a share of online transactions close to 55%. Check this [page](https://stripe.com/docs/payments/ideal) for more details. + """ + jcb: NotRequired["PaymentMethodConfigurationUpdateParamsJcb"] + """ + JCB is a credit card company based in Japan. JCB is currently available in Japan to businesses approved by JCB, and available to all businesses in Australia, Canada, Hong Kong, Japan, New Zealand, Singapore, Switzerland, United Kingdom, United States, and all countries in the European Economic Area except Iceland. Check this [page](https://support.stripe.com/questions/accepting-japan-credit-bureau-%28jcb%29-payments) for more details. + """ + kakao_pay: NotRequired["PaymentMethodConfigurationUpdateParamsKakaoPay"] + """ + Kakao Pay is a popular local wallet available in South Korea. + """ + klarna: NotRequired["PaymentMethodConfigurationUpdateParamsKlarna"] + """ + Klarna gives customers a range of [payment options](https://stripe.com/docs/payments/klarna#payment-options) during checkout. Available payment options vary depending on the customer's billing address and the transaction amount. These payment options make it convenient for customers to purchase items in all price ranges. Check this [page](https://stripe.com/docs/payments/klarna) for more details. + """ + konbini: NotRequired["PaymentMethodConfigurationUpdateParamsKonbini"] + """ + Konbini allows customers in Japan to pay for bills and online purchases at convenience stores with cash. Check this [page](https://stripe.com/docs/payments/konbini) for more details. + """ + kr_card: NotRequired["PaymentMethodConfigurationUpdateParamsKrCard"] + """ + Korean cards let users pay using locally issued cards from South Korea. + """ + link: NotRequired["PaymentMethodConfigurationUpdateParamsLink"] + """ + [Link](https://stripe.com/docs/payments/link) is a payment method network. With Link, users save their payment details once, then reuse that information to pay with one click for any business on the network. + """ + mobilepay: NotRequired["PaymentMethodConfigurationUpdateParamsMobilepay"] + """ + MobilePay is a [single-use](https://stripe.com/docs/payments/payment-methods#usage) card wallet payment method used in Denmark and Finland. It allows customers to [authenticate and approve](https://stripe.com/docs/payments/payment-methods#customer-actions) payments using the MobilePay app. Check this [page](https://stripe.com/docs/payments/mobilepay) for more details. + """ + multibanco: NotRequired["PaymentMethodConfigurationUpdateParamsMultibanco"] + """ + Stripe users in Europe and the United States can accept Multibanco payments from customers in Portugal using [Sources](https://stripe.com/docs/sources)—a single integration path for creating payments using any supported method. + """ + name: NotRequired[str] + """ + Configuration name. + """ + naver_pay: NotRequired["PaymentMethodConfigurationUpdateParamsNaverPay"] + """ + Naver Pay is a popular local wallet available in South Korea. + """ + nz_bank_account: NotRequired[ + "PaymentMethodConfigurationUpdateParamsNzBankAccount" + ] + """ + Stripe users in New Zealand can accept Bulk Electronic Clearing System (BECS) direct debit payments from customers with a New Zeland bank account. Check this [page](https://stripe.com/docs/payments/nz-bank-account) for more details. + """ + oxxo: NotRequired["PaymentMethodConfigurationUpdateParamsOxxo"] + """ + OXXO is a Mexican chain of convenience stores with thousands of locations across Latin America and represents nearly 20% of online transactions in Mexico. OXXO allows customers to pay bills and online purchases in-store with cash. Check this [page](https://stripe.com/docs/payments/oxxo) for more details. + """ + p24: NotRequired["PaymentMethodConfigurationUpdateParamsP24"] + """ + Przelewy24 is a Poland-based payment method aggregator that allows customers to complete transactions online using bank transfers and other methods. Bank transfers account for 30% of online payments in Poland and Przelewy24 provides a way for customers to pay with over 165 banks. Check this [page](https://stripe.com/docs/payments/p24) for more details. + """ + pay_by_bank: NotRequired["PaymentMethodConfigurationUpdateParamsPayByBank"] + """ + Pay by bank is a redirect payment method backed by bank transfers. A customer is redirected to their bank to authorize a bank transfer for a given amount. This removes a lot of the error risks inherent in waiting for the customer to initiate a transfer themselves, and is less expensive than card payments. + """ + payco: NotRequired["PaymentMethodConfigurationUpdateParamsPayco"] + """ + PAYCO is a [single-use](https://docs.stripe.com/payments/payment-methods#usage local wallet available in South Korea. + """ + paynow: NotRequired["PaymentMethodConfigurationUpdateParamsPaynow"] + """ + PayNow is a Singapore-based payment method that allows customers to make a payment using their preferred app from participating banks and participating non-bank financial institutions. Check this [page](https://stripe.com/docs/payments/paynow) for more details. + """ + paypal: NotRequired["PaymentMethodConfigurationUpdateParamsPaypal"] + """ + PayPal, a digital wallet popular with customers in Europe, allows your customers worldwide to pay using their PayPal account. Check this [page](https://stripe.com/docs/payments/paypal) for more details. + """ + paypay: NotRequired["PaymentMethodConfigurationUpdateParamsPaypay"] + """ + Customers can pay with PayPay online or using the PayPay app. + """ + payto: NotRequired["PaymentMethodConfigurationUpdateParamsPayto"] + """ + PayTo is a [real-time](https://docs.stripe.com/payments/real-time) payment method that enables customers in Australia to pay by providing their bank account details. Customers must accept a mandate authorizing you to debit their account. Check this [page](https://docs.stripe.com/payments/payto) for more details. + """ + pix: NotRequired["PaymentMethodConfigurationUpdateParamsPix"] + """ + Pix is a payment method popular in Brazil. When paying with Pix, customers authenticate and approve payments by scanning a QR code in their preferred banking app. Check this [page](https://docs.stripe.com/payments/pix) for more details. + """ + promptpay: NotRequired["PaymentMethodConfigurationUpdateParamsPromptpay"] + """ + PromptPay is a Thailand-based payment method that allows customers to make a payment using their preferred app from participating banks. Check this [page](https://stripe.com/docs/payments/promptpay) for more details. + """ + qris: NotRequired["PaymentMethodConfigurationUpdateParamsQris"] + """ + QRIS is a [real-time](https://docs.stripe.com/payments/real-time) payment method popular in Indonesia. When paying with QRIS, customers authenticate and approve payments by scanning a QR code in their preferred digital wallet app. + """ + revolut_pay: NotRequired[ + "PaymentMethodConfigurationUpdateParamsRevolutPay" + ] + """ + Revolut Pay, developed by Revolut, a global finance app, is a digital wallet payment method. Revolut Pay uses the customer's stored balance or cards to fund the payment, and offers the option for non-Revolut customers to save their details after their first purchase. + """ + samsung_pay: NotRequired[ + "PaymentMethodConfigurationUpdateParamsSamsungPay" + ] + """ + Samsung Pay is a [single-use](https://docs.stripe.com/payments/payment-methods#usage local wallet available in South Korea. + """ + satispay: NotRequired["PaymentMethodConfigurationUpdateParamsSatispay"] + """ + Satispay is a [single-use](https://docs.stripe.com/payments/payment-methods#usage) payment method where customers are required to [authenticate](https://docs.stripe.com/payments/payment-methods#customer-actions) their payment. Customers pay by being redirected from your website or app, authorizing the payment with Satispay, then returning to your website or app. You get [immediate notification](https://docs.stripe.com/payments/payment-methods#payment-notification) of whether the payment succeeded or failed. + """ + sepa_debit: NotRequired["PaymentMethodConfigurationUpdateParamsSepaDebit"] + """ + The [Single Euro Payments Area (SEPA)](https://en.wikipedia.org/wiki/Single_Euro_Payments_Area) is an initiative of the European Union to simplify payments within and across member countries. SEPA established and enforced banking standards to allow for the direct debiting of every EUR-denominated bank account within the SEPA region, check this [page](https://stripe.com/docs/payments/sepa-debit) for more details. + """ + shopeepay: NotRequired["PaymentMethodConfigurationUpdateParamsShopeepay"] + """ + ShopeePay is a [single use](https://stripe.com/docs/payments/payment-methods#usage) digital wallet payment method popular in Indonesia. When paying with GoPay, customers authenticate and approve payments using the Shopee app. Desktop checkout is performed by scanning a QR code. When checking out on mobile, customers are redirected to the Shopee app to confirm payment. + """ + sofort: NotRequired["PaymentMethodConfigurationUpdateParamsSofort"] + """ + Stripe users in Europe and the United States can use the [Payment Intents API](https://stripe.com/docs/payments/payment-intents)—a single integration path for creating payments using any supported method—to accept [Sofort](https://www.sofort.com/) payments from customers. Check this [page](https://stripe.com/docs/payments/sofort) for more details. + """ + swish: NotRequired["PaymentMethodConfigurationUpdateParamsSwish"] + """ + Swish is a [real-time](https://stripe.com/docs/payments/real-time) payment method popular in Sweden. It allows customers to [authenticate and approve](https://stripe.com/docs/payments/payment-methods#customer-actions) payments using the Swish mobile app and the Swedish BankID mobile app. Check this [page](https://stripe.com/docs/payments/swish) for more details. + """ + twint: NotRequired["PaymentMethodConfigurationUpdateParamsTwint"] + """ + Twint is a payment method popular in Switzerland. It allows customers to pay using their mobile phone. Check this [page](https://docs.stripe.com/payments/twint) for more details. + """ + us_bank_account: NotRequired[ + "PaymentMethodConfigurationUpdateParamsUsBankAccount" + ] + """ + Stripe users in the United States can accept ACH direct debit payments from customers with a US bank account using the Automated Clearing House (ACH) payments system operated by Nacha. Check this [page](https://stripe.com/docs/payments/ach-direct-debit) for more details. + """ + wechat_pay: NotRequired["PaymentMethodConfigurationUpdateParamsWechatPay"] + """ + WeChat, owned by Tencent, is China's leading mobile app with over 1 billion monthly active users. Chinese consumers can use WeChat Pay to pay for goods and services inside of businesses' apps and websites. WeChat Pay users buy most frequently in gaming, e-commerce, travel, online education, and food/nutrition. Check this [page](https://stripe.com/docs/payments/wechat-pay) for more details. + """ + zip: NotRequired["PaymentMethodConfigurationUpdateParamsZip"] + """ + Zip gives your customers a way to split purchases over a series of payments. Check this [page](https://stripe.com/docs/payments/zip) for more details like country availability. + """ + + +class PaymentMethodConfigurationUpdateParamsAcssDebit(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationUpdateParamsAcssDebitDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationUpdateParamsAcssDebitDisplayPreference( + TypedDict, +): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationUpdateParamsAffirm(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationUpdateParamsAffirmDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationUpdateParamsAffirmDisplayPreference(TypedDict): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationUpdateParamsAfterpayClearpay(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationUpdateParamsAfterpayClearpayDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationUpdateParamsAfterpayClearpayDisplayPreference( + TypedDict, +): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationUpdateParamsAlipay(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationUpdateParamsAlipayDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationUpdateParamsAlipayDisplayPreference(TypedDict): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationUpdateParamsAlma(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationUpdateParamsAlmaDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationUpdateParamsAlmaDisplayPreference(TypedDict): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationUpdateParamsAmazonPay(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationUpdateParamsAmazonPayDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationUpdateParamsAmazonPayDisplayPreference( + TypedDict, +): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationUpdateParamsApplePay(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationUpdateParamsApplePayDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationUpdateParamsApplePayDisplayPreference( + TypedDict, +): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationUpdateParamsApplePayLater(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationUpdateParamsApplePayLaterDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationUpdateParamsApplePayLaterDisplayPreference( + TypedDict, +): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationUpdateParamsAuBecsDebit(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationUpdateParamsAuBecsDebitDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationUpdateParamsAuBecsDebitDisplayPreference( + TypedDict, +): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationUpdateParamsBacsDebit(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationUpdateParamsBacsDebitDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationUpdateParamsBacsDebitDisplayPreference( + TypedDict, +): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationUpdateParamsBancontact(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationUpdateParamsBancontactDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationUpdateParamsBancontactDisplayPreference( + TypedDict, +): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationUpdateParamsBillie(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationUpdateParamsBillieDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationUpdateParamsBillieDisplayPreference(TypedDict): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationUpdateParamsBlik(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationUpdateParamsBlikDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationUpdateParamsBlikDisplayPreference(TypedDict): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationUpdateParamsBoleto(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationUpdateParamsBoletoDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationUpdateParamsBoletoDisplayPreference(TypedDict): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationUpdateParamsCard(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationUpdateParamsCardDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationUpdateParamsCardDisplayPreference(TypedDict): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationUpdateParamsCartesBancaires(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationUpdateParamsCartesBancairesDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationUpdateParamsCartesBancairesDisplayPreference( + TypedDict, +): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationUpdateParamsCashapp(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationUpdateParamsCashappDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationUpdateParamsCashappDisplayPreference( + TypedDict +): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationUpdateParamsCustomerBalance(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationUpdateParamsCustomerBalanceDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationUpdateParamsCustomerBalanceDisplayPreference( + TypedDict, +): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationUpdateParamsEps(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationUpdateParamsEpsDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationUpdateParamsEpsDisplayPreference(TypedDict): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationUpdateParamsFpx(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationUpdateParamsFpxDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationUpdateParamsFpxDisplayPreference(TypedDict): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationUpdateParamsFrMealVoucherConecs(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationUpdateParamsFrMealVoucherConecsDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationUpdateParamsFrMealVoucherConecsDisplayPreference( + TypedDict, +): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationUpdateParamsGiropay(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationUpdateParamsGiropayDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationUpdateParamsGiropayDisplayPreference( + TypedDict +): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationUpdateParamsGooglePay(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationUpdateParamsGooglePayDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationUpdateParamsGooglePayDisplayPreference( + TypedDict, +): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationUpdateParamsGopay(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationUpdateParamsGopayDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationUpdateParamsGopayDisplayPreference(TypedDict): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationUpdateParamsGrabpay(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationUpdateParamsGrabpayDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationUpdateParamsGrabpayDisplayPreference( + TypedDict +): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationUpdateParamsIdBankTransfer(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationUpdateParamsIdBankTransferDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationUpdateParamsIdBankTransferDisplayPreference( + TypedDict, +): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationUpdateParamsIdeal(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationUpdateParamsIdealDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationUpdateParamsIdealDisplayPreference(TypedDict): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationUpdateParamsJcb(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationUpdateParamsJcbDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationUpdateParamsJcbDisplayPreference(TypedDict): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationUpdateParamsKakaoPay(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationUpdateParamsKakaoPayDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationUpdateParamsKakaoPayDisplayPreference( + TypedDict, +): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationUpdateParamsKlarna(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationUpdateParamsKlarnaDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationUpdateParamsKlarnaDisplayPreference(TypedDict): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationUpdateParamsKonbini(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationUpdateParamsKonbiniDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationUpdateParamsKonbiniDisplayPreference( + TypedDict +): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationUpdateParamsKrCard(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationUpdateParamsKrCardDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationUpdateParamsKrCardDisplayPreference(TypedDict): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationUpdateParamsLink(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationUpdateParamsLinkDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationUpdateParamsLinkDisplayPreference(TypedDict): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationUpdateParamsMobilepay(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationUpdateParamsMobilepayDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationUpdateParamsMobilepayDisplayPreference( + TypedDict, +): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationUpdateParamsMultibanco(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationUpdateParamsMultibancoDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationUpdateParamsMultibancoDisplayPreference( + TypedDict, +): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationUpdateParamsNaverPay(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationUpdateParamsNaverPayDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationUpdateParamsNaverPayDisplayPreference( + TypedDict, +): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationUpdateParamsNzBankAccount(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationUpdateParamsNzBankAccountDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationUpdateParamsNzBankAccountDisplayPreference( + TypedDict, +): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationUpdateParamsOxxo(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationUpdateParamsOxxoDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationUpdateParamsOxxoDisplayPreference(TypedDict): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationUpdateParamsP24(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationUpdateParamsP24DisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationUpdateParamsP24DisplayPreference(TypedDict): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationUpdateParamsPayByBank(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationUpdateParamsPayByBankDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationUpdateParamsPayByBankDisplayPreference( + TypedDict, +): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationUpdateParamsPayco(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationUpdateParamsPaycoDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationUpdateParamsPaycoDisplayPreference(TypedDict): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationUpdateParamsPaynow(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationUpdateParamsPaynowDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationUpdateParamsPaynowDisplayPreference(TypedDict): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationUpdateParamsPaypal(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationUpdateParamsPaypalDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationUpdateParamsPaypalDisplayPreference(TypedDict): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationUpdateParamsPaypay(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationUpdateParamsPaypayDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationUpdateParamsPaypayDisplayPreference(TypedDict): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationUpdateParamsPayto(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationUpdateParamsPaytoDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationUpdateParamsPaytoDisplayPreference(TypedDict): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationUpdateParamsPix(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationUpdateParamsPixDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationUpdateParamsPixDisplayPreference(TypedDict): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationUpdateParamsPromptpay(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationUpdateParamsPromptpayDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationUpdateParamsPromptpayDisplayPreference( + TypedDict, +): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationUpdateParamsQris(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationUpdateParamsQrisDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationUpdateParamsQrisDisplayPreference(TypedDict): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationUpdateParamsRevolutPay(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationUpdateParamsRevolutPayDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationUpdateParamsRevolutPayDisplayPreference( + TypedDict, +): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationUpdateParamsSamsungPay(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationUpdateParamsSamsungPayDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationUpdateParamsSamsungPayDisplayPreference( + TypedDict, +): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationUpdateParamsSatispay(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationUpdateParamsSatispayDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationUpdateParamsSatispayDisplayPreference( + TypedDict, +): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationUpdateParamsSepaDebit(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationUpdateParamsSepaDebitDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationUpdateParamsSepaDebitDisplayPreference( + TypedDict, +): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationUpdateParamsShopeepay(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationUpdateParamsShopeepayDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationUpdateParamsShopeepayDisplayPreference( + TypedDict, +): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationUpdateParamsSofort(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationUpdateParamsSofortDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationUpdateParamsSofortDisplayPreference(TypedDict): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationUpdateParamsSwish(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationUpdateParamsSwishDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationUpdateParamsSwishDisplayPreference(TypedDict): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationUpdateParamsTwint(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationUpdateParamsTwintDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationUpdateParamsTwintDisplayPreference(TypedDict): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationUpdateParamsUsBankAccount(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationUpdateParamsUsBankAccountDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationUpdateParamsUsBankAccountDisplayPreference( + TypedDict, +): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationUpdateParamsWechatPay(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationUpdateParamsWechatPayDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationUpdateParamsWechatPayDisplayPreference( + TypedDict, +): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ + + +class PaymentMethodConfigurationUpdateParamsZip(TypedDict): + display_preference: NotRequired[ + "PaymentMethodConfigurationUpdateParamsZipDisplayPreference" + ] + """ + Whether or not the payment method should be displayed. + """ + + +class PaymentMethodConfigurationUpdateParamsZipDisplayPreference(TypedDict): + preference: NotRequired[Literal["none", "off", "on"]] + """ + The account's preference for whether or not to display this payment method. + """ diff --git a/stripe/params/_payment_method_create_params.py b/stripe/params/_payment_method_create_params.py new file mode 100644 index 000000000..334d5b7fa --- /dev/null +++ b/stripe/params/_payment_method_create_params.py @@ -0,0 +1,905 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class PaymentMethodCreateParams(RequestOptions): + acss_debit: NotRequired["PaymentMethodCreateParamsAcssDebit"] + """ + If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method. + """ + affirm: NotRequired["PaymentMethodCreateParamsAffirm"] + """ + If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method. + """ + afterpay_clearpay: NotRequired["PaymentMethodCreateParamsAfterpayClearpay"] + """ + If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method. + """ + alipay: NotRequired["PaymentMethodCreateParamsAlipay"] + """ + If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. + """ + allow_redisplay: NotRequired[Literal["always", "limited", "unspecified"]] + """ + This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`. + """ + alma: NotRequired["PaymentMethodCreateParamsAlma"] + """ + If this is a Alma PaymentMethod, this hash contains details about the Alma payment method. + """ + amazon_pay: NotRequired["PaymentMethodCreateParamsAmazonPay"] + """ + If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method. + """ + au_becs_debit: NotRequired["PaymentMethodCreateParamsAuBecsDebit"] + """ + If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. + """ + bacs_debit: NotRequired["PaymentMethodCreateParamsBacsDebit"] + """ + If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account. + """ + bancontact: NotRequired["PaymentMethodCreateParamsBancontact"] + """ + If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method. + """ + billie: NotRequired["PaymentMethodCreateParamsBillie"] + """ + If this is a `billie` PaymentMethod, this hash contains details about the Billie payment method. + """ + billing_details: NotRequired["PaymentMethodCreateParamsBillingDetails"] + """ + Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. + """ + blik: NotRequired["PaymentMethodCreateParamsBlik"] + """ + If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method. + """ + boleto: NotRequired["PaymentMethodCreateParamsBoleto"] + """ + If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method. + """ + card: NotRequired["PaymentMethodCreateParamsCard"] + """ + If this is a `card` PaymentMethod, this hash contains the user's card details. For backwards compatibility, you can alternatively provide a Stripe token (e.g., for Apple Pay, Amex Express Checkout, or legacy Checkout) into the card hash with format `card: {token: "tok_visa"}`. When providing a card number, you must meet the requirements for [PCI compliance](https://stripe.com/docs/security#validating-pci-compliance). We strongly recommend using Stripe.js instead of interacting with this API directly. + """ + cashapp: NotRequired["PaymentMethodCreateParamsCashapp"] + """ + If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. + """ + crypto: NotRequired["PaymentMethodCreateParamsCrypto"] + """ + If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment method. + """ + customer: NotRequired[str] + """ + The `Customer` to whom the original PaymentMethod is attached. + """ + customer_balance: NotRequired["PaymentMethodCreateParamsCustomerBalance"] + """ + If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. + """ + eps: NotRequired["PaymentMethodCreateParamsEps"] + """ + If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + fpx: NotRequired["PaymentMethodCreateParamsFpx"] + """ + If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method. + """ + giropay: NotRequired["PaymentMethodCreateParamsGiropay"] + """ + If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method. + """ + gopay: NotRequired["PaymentMethodCreateParamsGopay"] + """ + If this is a Gopay PaymentMethod, this hash contains details about the Gopay payment method. + """ + grabpay: NotRequired["PaymentMethodCreateParamsGrabpay"] + """ + If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method. + """ + id_bank_transfer: NotRequired["PaymentMethodCreateParamsIdBankTransfer"] + """ + If this is an `IdBankTransfer` PaymentMethod, this hash contains details about the IdBankTransfer payment method. + """ + ideal: NotRequired["PaymentMethodCreateParamsIdeal"] + """ + If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. + """ + interac_present: NotRequired["PaymentMethodCreateParamsInteracPresent"] + """ + If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. + """ + kakao_pay: NotRequired["PaymentMethodCreateParamsKakaoPay"] + """ + If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method. + """ + klarna: NotRequired["PaymentMethodCreateParamsKlarna"] + """ + If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method. + """ + konbini: NotRequired["PaymentMethodCreateParamsKonbini"] + """ + If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. + """ + kr_card: NotRequired["PaymentMethodCreateParamsKrCard"] + """ + If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method. + """ + link: NotRequired["PaymentMethodCreateParamsLink"] + """ + If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. + """ + mb_way: NotRequired["PaymentMethodCreateParamsMbWay"] + """ + If this is a MB WAY PaymentMethod, this hash contains details about the MB WAY payment method. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + mobilepay: NotRequired["PaymentMethodCreateParamsMobilepay"] + """ + If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method. + """ + multibanco: NotRequired["PaymentMethodCreateParamsMultibanco"] + """ + If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method. + """ + naver_pay: NotRequired["PaymentMethodCreateParamsNaverPay"] + """ + If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method. + """ + nz_bank_account: NotRequired["PaymentMethodCreateParamsNzBankAccount"] + """ + If this is an nz_bank_account PaymentMethod, this hash contains details about the nz_bank_account payment method. + """ + oxxo: NotRequired["PaymentMethodCreateParamsOxxo"] + """ + If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. + """ + p24: NotRequired["PaymentMethodCreateParamsP24"] + """ + If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. + """ + pay_by_bank: NotRequired["PaymentMethodCreateParamsPayByBank"] + """ + If this is a `pay_by_bank` PaymentMethod, this hash contains details about the PayByBank payment method. + """ + payco: NotRequired["PaymentMethodCreateParamsPayco"] + """ + If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method. + """ + payment_method: NotRequired[str] + """ + The PaymentMethod to share. + """ + paynow: NotRequired["PaymentMethodCreateParamsPaynow"] + """ + If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method. + """ + paypal: NotRequired["PaymentMethodCreateParamsPaypal"] + """ + If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method. + """ + paypay: NotRequired["PaymentMethodCreateParamsPaypay"] + """ + If this is a `paypay` PaymentMethod, this hash contains details about the PayPay payment method. + """ + payto: NotRequired["PaymentMethodCreateParamsPayto"] + """ + If this is a `payto` PaymentMethod, this hash contains details about the PayTo payment method. + """ + pix: NotRequired["PaymentMethodCreateParamsPix"] + """ + If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method. + """ + promptpay: NotRequired["PaymentMethodCreateParamsPromptpay"] + """ + If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method. + """ + qris: NotRequired["PaymentMethodCreateParamsQris"] + """ + If this is a `qris` PaymentMethod, this hash contains details about the QRIS payment method. + """ + radar_options: NotRequired["PaymentMethodCreateParamsRadarOptions"] + """ + Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. + """ + rechnung: NotRequired["PaymentMethodCreateParamsRechnung"] + """ + If this is a `rechnung` PaymentMethod, this hash contains details about the Rechnung payment method. + """ + revolut_pay: NotRequired["PaymentMethodCreateParamsRevolutPay"] + """ + If this is a `revolut_pay` PaymentMethod, this hash contains details about the Revolut Pay payment method. + """ + samsung_pay: NotRequired["PaymentMethodCreateParamsSamsungPay"] + """ + If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method. + """ + satispay: NotRequired["PaymentMethodCreateParamsSatispay"] + """ + If this is a `satispay` PaymentMethod, this hash contains details about the Satispay payment method. + """ + sepa_debit: NotRequired["PaymentMethodCreateParamsSepaDebit"] + """ + If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. + """ + shopeepay: NotRequired["PaymentMethodCreateParamsShopeepay"] + """ + If this is a Shopeepay PaymentMethod, this hash contains details about the Shopeepay payment method. + """ + sofort: NotRequired["PaymentMethodCreateParamsSofort"] + """ + If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. + """ + stripe_balance: NotRequired["PaymentMethodCreateParamsStripeBalance"] + """ + This hash contains details about the Stripe balance payment method. + """ + swish: NotRequired["PaymentMethodCreateParamsSwish"] + """ + If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method. + """ + twint: NotRequired["PaymentMethodCreateParamsTwint"] + """ + If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method. + """ + type: NotRequired[ + Literal[ + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "alma", + "amazon_pay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "billie", + "blik", + "boleto", + "card", + "cashapp", + "crypto", + "customer_balance", + "eps", + "fpx", + "giropay", + "gopay", + "grabpay", + "id_bank_transfer", + "ideal", + "kakao_pay", + "klarna", + "konbini", + "kr_card", + "link", + "mb_way", + "mobilepay", + "multibanco", + "naver_pay", + "nz_bank_account", + "oxxo", + "p24", + "pay_by_bank", + "payco", + "paynow", + "paypal", + "paypay", + "payto", + "pix", + "promptpay", + "qris", + "rechnung", + "revolut_pay", + "samsung_pay", + "satispay", + "sepa_debit", + "shopeepay", + "sofort", + "stripe_balance", + "swish", + "twint", + "us_bank_account", + "wechat_pay", + "zip", + ] + ] + """ + The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. + """ + us_bank_account: NotRequired["PaymentMethodCreateParamsUsBankAccount"] + """ + If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. + """ + wechat_pay: NotRequired["PaymentMethodCreateParamsWechatPay"] + """ + If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method. + """ + zip: NotRequired["PaymentMethodCreateParamsZip"] + """ + If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method. + """ + + +class PaymentMethodCreateParamsAcssDebit(TypedDict): + account_number: str + """ + Customer's bank account number. + """ + institution_number: str + """ + Institution number of the customer's bank. + """ + transit_number: str + """ + Transit number of the customer's bank. + """ + + +class PaymentMethodCreateParamsAffirm(TypedDict): + pass + + +class PaymentMethodCreateParamsAfterpayClearpay(TypedDict): + pass + + +class PaymentMethodCreateParamsAlipay(TypedDict): + pass + + +class PaymentMethodCreateParamsAlma(TypedDict): + pass + + +class PaymentMethodCreateParamsAmazonPay(TypedDict): + pass + + +class PaymentMethodCreateParamsAuBecsDebit(TypedDict): + account_number: str + """ + The account number for the bank account. + """ + bsb_number: str + """ + Bank-State-Branch number of the bank account. + """ + + +class PaymentMethodCreateParamsBacsDebit(TypedDict): + account_number: NotRequired[str] + """ + Account number of the bank account that the funds will be debited from. + """ + sort_code: NotRequired[str] + """ + Sort code of the bank account. (e.g., `10-20-30`) + """ + + +class PaymentMethodCreateParamsBancontact(TypedDict): + pass + + +class PaymentMethodCreateParamsBillie(TypedDict): + pass + + +class PaymentMethodCreateParamsBillingDetails(TypedDict): + address: NotRequired[ + "Literal['']|PaymentMethodCreateParamsBillingDetailsAddress" + ] + """ + Billing address. + """ + email: NotRequired["Literal['']|str"] + """ + Email address. + """ + name: NotRequired["Literal['']|str"] + """ + Full name. + """ + phone: NotRequired["Literal['']|str"] + """ + Billing phone number (including extension). + """ + tax_id: NotRequired[str] + """ + Taxpayer identification number. Used only for transactions between LATAM buyers and non-LATAM sellers. + """ + + +class PaymentMethodCreateParamsBillingDetailsAddress(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. + """ + + +class PaymentMethodCreateParamsBlik(TypedDict): + pass + + +class PaymentMethodCreateParamsBoleto(TypedDict): + tax_id: str + """ + The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers) + """ + + +class PaymentMethodCreateParamsCard(TypedDict): + cvc: NotRequired[str] + """ + The card's CVC. It is highly recommended to always include this value. + """ + exp_month: NotRequired[int] + """ + Two-digit number representing the card's expiration month. + """ + exp_year: NotRequired[int] + """ + Four-digit number representing the card's expiration year. + """ + networks: NotRequired["PaymentMethodCreateParamsCardNetworks"] + """ + Contains information about card networks used to process the payment. + """ + number: NotRequired[str] + """ + The card number, as a string without any separators. + """ + token: NotRequired[str] + """ + For backwards compatibility, you can alternatively provide a Stripe token (e.g., for Apple Pay, Amex Express Checkout, or legacy Checkout) into the card hash with format card: {token: "tok_visa"}. + """ + + +class PaymentMethodCreateParamsCardNetworks(TypedDict): + preferred: NotRequired[Literal["cartes_bancaires", "mastercard", "visa"]] + """ + The customer's preferred card network for co-branded cards. Supports `cartes_bancaires`, `mastercard`, or `visa`. Selection of a network that does not apply to the card will be stored as `invalid_preference` on the card. + """ + + +class PaymentMethodCreateParamsCashapp(TypedDict): + pass + + +class PaymentMethodCreateParamsCrypto(TypedDict): + pass + + +class PaymentMethodCreateParamsCustomerBalance(TypedDict): + pass + + +class PaymentMethodCreateParamsEps(TypedDict): + bank: NotRequired[ + Literal[ + "arzte_und_apotheker_bank", + "austrian_anadi_bank_ag", + "bank_austria", + "bankhaus_carl_spangler", + "bankhaus_schelhammer_und_schattera_ag", + "bawag_psk_ag", + "bks_bank_ag", + "brull_kallmus_bank_ag", + "btv_vier_lander_bank", + "capital_bank_grawe_gruppe_ag", + "deutsche_bank_ag", + "dolomitenbank", + "easybank_ag", + "erste_bank_und_sparkassen", + "hypo_alpeadriabank_international_ag", + "hypo_bank_burgenland_aktiengesellschaft", + "hypo_noe_lb_fur_niederosterreich_u_wien", + "hypo_oberosterreich_salzburg_steiermark", + "hypo_tirol_bank_ag", + "hypo_vorarlberg_bank_ag", + "marchfelder_bank", + "oberbank_ag", + "raiffeisen_bankengruppe_osterreich", + "schoellerbank_ag", + "sparda_bank_wien", + "volksbank_gruppe", + "volkskreditbank_ag", + "vr_bank_braunau", + ] + ] + """ + The customer's bank. + """ + + +class PaymentMethodCreateParamsFpx(TypedDict): + account_holder_type: NotRequired[Literal["company", "individual"]] + """ + Account holder type for FPX transaction + """ + bank: Literal[ + "affin_bank", + "agrobank", + "alliance_bank", + "ambank", + "bank_islam", + "bank_muamalat", + "bank_of_china", + "bank_rakyat", + "bsn", + "cimb", + "deutsche_bank", + "hong_leong_bank", + "hsbc", + "kfh", + "maybank2e", + "maybank2u", + "ocbc", + "pb_enterprise", + "public_bank", + "rhb", + "standard_chartered", + "uob", + ] + """ + The customer's bank. + """ + + +class PaymentMethodCreateParamsGiropay(TypedDict): + pass + + +class PaymentMethodCreateParamsGopay(TypedDict): + pass + + +class PaymentMethodCreateParamsGrabpay(TypedDict): + pass + + +class PaymentMethodCreateParamsIdBankTransfer(TypedDict): + bank: NotRequired[Literal["bca", "bni", "bri", "cimb", "permata"]] + """ + Bank where the account is held. + """ + + +class PaymentMethodCreateParamsIdeal(TypedDict): + bank: NotRequired[ + Literal[ + "abn_amro", + "asn_bank", + "bunq", + "buut", + "handelsbanken", + "ing", + "knab", + "moneyou", + "n26", + "nn", + "rabobank", + "regiobank", + "revolut", + "sns_bank", + "triodos_bank", + "van_lanschot", + "yoursafe", + ] + ] + """ + The customer's bank. Only use this parameter for existing customers. Don't use it for new customers. + """ + + +class PaymentMethodCreateParamsInteracPresent(TypedDict): + pass + + +class PaymentMethodCreateParamsKakaoPay(TypedDict): + pass + + +class PaymentMethodCreateParamsKlarna(TypedDict): + dob: NotRequired["PaymentMethodCreateParamsKlarnaDob"] + """ + Customer's date of birth + """ + + +class PaymentMethodCreateParamsKlarnaDob(TypedDict): + day: int + """ + The day of birth, between 1 and 31. + """ + month: int + """ + The month of birth, between 1 and 12. + """ + year: int + """ + The four-digit year of birth. + """ + + +class PaymentMethodCreateParamsKonbini(TypedDict): + pass + + +class PaymentMethodCreateParamsKrCard(TypedDict): + pass + + +class PaymentMethodCreateParamsLink(TypedDict): + pass + + +class PaymentMethodCreateParamsMbWay(TypedDict): + pass + + +class PaymentMethodCreateParamsMobilepay(TypedDict): + pass + + +class PaymentMethodCreateParamsMultibanco(TypedDict): + pass + + +class PaymentMethodCreateParamsNaverPay(TypedDict): + funding: NotRequired[Literal["card", "points"]] + """ + Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`. + """ + + +class PaymentMethodCreateParamsNzBankAccount(TypedDict): + account_holder_name: NotRequired[str] + """ + The name on the bank account. Only required if the account holder name is different from the name of the authorized signatory collected in the PaymentMethod's billing details. + """ + account_number: str + """ + The account number for the bank account. + """ + bank_code: str + """ + The numeric code for the bank account's bank. + """ + branch_code: str + """ + The numeric code for the bank account's bank branch. + """ + reference: NotRequired[str] + suffix: str + """ + The suffix of the bank account number. + """ + + +class PaymentMethodCreateParamsOxxo(TypedDict): + pass + + +class PaymentMethodCreateParamsP24(TypedDict): + bank: NotRequired[ + Literal[ + "alior_bank", + "bank_millennium", + "bank_nowy_bfg_sa", + "bank_pekao_sa", + "banki_spbdzielcze", + "blik", + "bnp_paribas", + "boz", + "citi_handlowy", + "credit_agricole", + "envelobank", + "etransfer_pocztowy24", + "getin_bank", + "ideabank", + "ing", + "inteligo", + "mbank_mtransfer", + "nest_przelew", + "noble_pay", + "pbac_z_ipko", + "plus_bank", + "santander_przelew24", + "tmobile_usbugi_bankowe", + "toyota_bank", + "velobank", + "volkswagen_bank", + ] + ] + """ + The customer's bank. + """ + + +class PaymentMethodCreateParamsPayByBank(TypedDict): + pass + + +class PaymentMethodCreateParamsPayco(TypedDict): + pass + + +class PaymentMethodCreateParamsPaynow(TypedDict): + pass + + +class PaymentMethodCreateParamsPaypal(TypedDict): + pass + + +class PaymentMethodCreateParamsPaypay(TypedDict): + pass + + +class PaymentMethodCreateParamsPayto(TypedDict): + account_number: NotRequired[str] + """ + The account number for the bank account. + """ + bsb_number: NotRequired[str] + """ + Bank-State-Branch number of the bank account. + """ + pay_id: NotRequired[str] + """ + The PayID alias for the bank account. + """ + + +class PaymentMethodCreateParamsPix(TypedDict): + pass + + +class PaymentMethodCreateParamsPromptpay(TypedDict): + pass + + +class PaymentMethodCreateParamsQris(TypedDict): + pass + + +class PaymentMethodCreateParamsRadarOptions(TypedDict): + session: NotRequired[str] + """ + A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. + """ + + +class PaymentMethodCreateParamsRechnung(TypedDict): + dob: "PaymentMethodCreateParamsRechnungDob" + """ + Customer's date of birth + """ + + +class PaymentMethodCreateParamsRechnungDob(TypedDict): + day: int + """ + The day of birth, between 1 and 31. + """ + month: int + """ + The month of birth, between 1 and 12. + """ + year: int + """ + The four-digit year of birth. + """ + + +class PaymentMethodCreateParamsRevolutPay(TypedDict): + pass + + +class PaymentMethodCreateParamsSamsungPay(TypedDict): + pass + + +class PaymentMethodCreateParamsSatispay(TypedDict): + pass + + +class PaymentMethodCreateParamsSepaDebit(TypedDict): + iban: str + """ + IBAN of the bank account. + """ + + +class PaymentMethodCreateParamsShopeepay(TypedDict): + pass + + +class PaymentMethodCreateParamsSofort(TypedDict): + country: Literal["AT", "BE", "DE", "ES", "IT", "NL"] + """ + Two-letter ISO code representing the country the bank account is located in. + """ + + +class PaymentMethodCreateParamsStripeBalance(TypedDict): + account: NotRequired[str] + """ + The connected account ID whose Stripe balance to use as the source of payment + """ + source_type: NotRequired[Literal["bank_account", "card", "fpx"]] + """ + The [source_type](https://docs.stripe.com/api/balance/balance_object#balance_object-available-source_types) of the balance + """ + + +class PaymentMethodCreateParamsSwish(TypedDict): + pass + + +class PaymentMethodCreateParamsTwint(TypedDict): + pass + + +class PaymentMethodCreateParamsUsBankAccount(TypedDict): + account_holder_type: NotRequired[Literal["company", "individual"]] + """ + Account holder type: individual or company. + """ + account_number: NotRequired[str] + """ + Account number of the bank account. + """ + account_type: NotRequired[Literal["checking", "savings"]] + """ + Account type: checkings or savings. Defaults to checking if omitted. + """ + financial_connections_account: NotRequired[str] + """ + The ID of a Financial Connections Account to use as a payment method. + """ + routing_number: NotRequired[str] + """ + Routing number of the bank account. + """ + + +class PaymentMethodCreateParamsWechatPay(TypedDict): + pass + + +class PaymentMethodCreateParamsZip(TypedDict): + pass diff --git a/stripe/params/_payment_method_detach_params.py b/stripe/params/_payment_method_detach_params.py new file mode 100644 index 000000000..5bb35345f --- /dev/null +++ b/stripe/params/_payment_method_detach_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 PaymentMethodDetachParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_payment_method_domain_create_params.py b/stripe/params/_payment_method_domain_create_params.py new file mode 100644 index 000000000..5d5ac32fe --- /dev/null +++ b/stripe/params/_payment_method_domain_create_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 PaymentMethodDomainCreateParams(RequestOptions): + domain_name: str + """ + The domain name that this payment method domain object represents. + """ + enabled: NotRequired[bool] + """ + Whether this payment method domain is enabled. If the domain is not enabled, payment methods that require a payment method domain will not appear in Elements or Embedded Checkout. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_payment_method_domain_list_params.py b/stripe/params/_payment_method_domain_list_params.py new file mode 100644 index 000000000..bd52dd55f --- /dev/null +++ b/stripe/params/_payment_method_domain_list_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 NotRequired + + +class PaymentMethodDomainListParams(RequestOptions): + domain_name: NotRequired[str] + """ + The domain name that this payment method domain object represents. + """ + enabled: NotRequired[bool] + """ + Whether this payment method domain is enabled. If the domain is not enabled, payment methods will not appear in Elements or Embedded Checkout + """ + 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. + """ diff --git a/stripe/params/_payment_method_domain_modify_params.py b/stripe/params/_payment_method_domain_modify_params.py new file mode 100644 index 000000000..a0079efbc --- /dev/null +++ b/stripe/params/_payment_method_domain_modify_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 PaymentMethodDomainModifyParams(RequestOptions): + enabled: NotRequired[bool] + """ + Whether this payment method domain is enabled. If the domain is not enabled, payment methods that require a payment method domain will not appear in Elements or Embedded Checkout. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_payment_method_domain_retrieve_params.py b/stripe/params/_payment_method_domain_retrieve_params.py new file mode 100644 index 000000000..43fca1500 --- /dev/null +++ b/stripe/params/_payment_method_domain_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 PaymentMethodDomainRetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_payment_method_domain_update_params.py b/stripe/params/_payment_method_domain_update_params.py new file mode 100644 index 000000000..1a4135bf5 --- /dev/null +++ b/stripe/params/_payment_method_domain_update_params.py @@ -0,0 +1,15 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import NotRequired, TypedDict + + +class PaymentMethodDomainUpdateParams(TypedDict): + enabled: NotRequired[bool] + """ + Whether this payment method domain is enabled. If the domain is not enabled, payment methods that require a payment method domain will not appear in Elements or Embedded Checkout. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_payment_method_domain_validate_params.py b/stripe/params/_payment_method_domain_validate_params.py new file mode 100644 index 000000000..ca4d58a75 --- /dev/null +++ b/stripe/params/_payment_method_domain_validate_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 PaymentMethodDomainValidateParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_payment_method_list_params.py b/stripe/params/_payment_method_list_params.py new file mode 100644 index 000000000..1ffdd5d19 --- /dev/null +++ b/stripe/params/_payment_method_list_params.py @@ -0,0 +1,92 @@ +# -*- 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 PaymentMethodListParams(RequestOptions): + customer: NotRequired[str] + """ + The ID of the customer whose PaymentMethods will be retrieved. + """ + 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. + """ + type: NotRequired[ + Literal[ + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "alma", + "amazon_pay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "billie", + "blik", + "boleto", + "card", + "cashapp", + "crypto", + "customer_balance", + "eps", + "fpx", + "giropay", + "gopay", + "grabpay", + "id_bank_transfer", + "ideal", + "kakao_pay", + "klarna", + "konbini", + "kr_card", + "link", + "mb_way", + "mobilepay", + "multibanco", + "naver_pay", + "nz_bank_account", + "oxxo", + "p24", + "pay_by_bank", + "payco", + "paynow", + "paypal", + "paypay", + "payto", + "pix", + "promptpay", + "qris", + "rechnung", + "revolut_pay", + "samsung_pay", + "satispay", + "sepa_debit", + "shopeepay", + "sofort", + "stripe_balance", + "swish", + "twint", + "us_bank_account", + "wechat_pay", + "zip", + ] + ] + """ + An optional filter on the list, based on the object `type` field. Without the filter, the list includes all current and future payment method types. If your integration expects only one type of payment method in the response, make sure to provide a type value in the request. + """ diff --git a/stripe/params/_payment_method_modify_params.py b/stripe/params/_payment_method_modify_params.py new file mode 100644 index 000000000..4cd37b02a --- /dev/null +++ b/stripe/params/_payment_method_modify_params.py @@ -0,0 +1,138 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class PaymentMethodModifyParams(RequestOptions): + allow_redisplay: NotRequired[Literal["always", "limited", "unspecified"]] + """ + This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`. + """ + billing_details: NotRequired["PaymentMethodModifyParamsBillingDetails"] + """ + Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. + """ + card: NotRequired["PaymentMethodModifyParamsCard"] + """ + If this is a `card` PaymentMethod, this hash contains the user's card details. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + payto: NotRequired["PaymentMethodModifyParamsPayto"] + """ + If this is a `payto` PaymentMethod, this hash contains details about the PayTo payment method. + """ + us_bank_account: NotRequired["PaymentMethodModifyParamsUsBankAccount"] + """ + If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. + """ + + +class PaymentMethodModifyParamsBillingDetails(TypedDict): + address: NotRequired[ + "Literal['']|PaymentMethodModifyParamsBillingDetailsAddress" + ] + """ + Billing address. + """ + email: NotRequired["Literal['']|str"] + """ + Email address. + """ + name: NotRequired["Literal['']|str"] + """ + Full name. + """ + phone: NotRequired["Literal['']|str"] + """ + Billing phone number (including extension). + """ + tax_id: NotRequired[str] + """ + Taxpayer identification number. Used only for transactions between LATAM buyers and non-LATAM sellers. + """ + + +class PaymentMethodModifyParamsBillingDetailsAddress(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. + """ + + +class PaymentMethodModifyParamsCard(TypedDict): + exp_month: NotRequired[int] + """ + Two-digit number representing the card's expiration month. + """ + exp_year: NotRequired[int] + """ + Four-digit number representing the card's expiration year. + """ + networks: NotRequired["PaymentMethodModifyParamsCardNetworks"] + """ + Contains information about card networks used to process the payment. + """ + + +class PaymentMethodModifyParamsCardNetworks(TypedDict): + preferred: NotRequired[ + "Literal['']|Literal['cartes_bancaires', 'mastercard', 'visa']" + ] + """ + The customer's preferred card network for co-branded cards. Supports `cartes_bancaires`, `mastercard`, or `visa`. Selection of a network that does not apply to the card will be stored as `invalid_preference` on the card. + """ + + +class PaymentMethodModifyParamsPayto(TypedDict): + account_number: NotRequired[str] + """ + The account number for the bank account. + """ + bsb_number: NotRequired[str] + """ + Bank-State-Branch number of the bank account. + """ + pay_id: NotRequired[str] + """ + The PayID alias for the bank account. + """ + + +class PaymentMethodModifyParamsUsBankAccount(TypedDict): + account_holder_type: NotRequired[Literal["company", "individual"]] + """ + Bank account holder type. + """ + account_type: NotRequired[Literal["checking", "savings"]] + """ + Bank account type. + """ diff --git a/stripe/params/_payment_method_retrieve_params.py b/stripe/params/_payment_method_retrieve_params.py new file mode 100644 index 000000000..39b976dbb --- /dev/null +++ b/stripe/params/_payment_method_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 PaymentMethodRetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_payment_method_update_params.py b/stripe/params/_payment_method_update_params.py new file mode 100644 index 000000000..c37a0cfba --- /dev/null +++ b/stripe/params/_payment_method_update_params.py @@ -0,0 +1,137 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class PaymentMethodUpdateParams(TypedDict): + allow_redisplay: NotRequired[Literal["always", "limited", "unspecified"]] + """ + This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`. + """ + billing_details: NotRequired["PaymentMethodUpdateParamsBillingDetails"] + """ + Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. + """ + card: NotRequired["PaymentMethodUpdateParamsCard"] + """ + If this is a `card` PaymentMethod, this hash contains the user's card details. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + payto: NotRequired["PaymentMethodUpdateParamsPayto"] + """ + If this is a `payto` PaymentMethod, this hash contains details about the PayTo payment method. + """ + us_bank_account: NotRequired["PaymentMethodUpdateParamsUsBankAccount"] + """ + If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. + """ + + +class PaymentMethodUpdateParamsBillingDetails(TypedDict): + address: NotRequired[ + "Literal['']|PaymentMethodUpdateParamsBillingDetailsAddress" + ] + """ + Billing address. + """ + email: NotRequired["Literal['']|str"] + """ + Email address. + """ + name: NotRequired["Literal['']|str"] + """ + Full name. + """ + phone: NotRequired["Literal['']|str"] + """ + Billing phone number (including extension). + """ + tax_id: NotRequired[str] + """ + Taxpayer identification number. Used only for transactions between LATAM buyers and non-LATAM sellers. + """ + + +class PaymentMethodUpdateParamsBillingDetailsAddress(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. + """ + + +class PaymentMethodUpdateParamsCard(TypedDict): + exp_month: NotRequired[int] + """ + Two-digit number representing the card's expiration month. + """ + exp_year: NotRequired[int] + """ + Four-digit number representing the card's expiration year. + """ + networks: NotRequired["PaymentMethodUpdateParamsCardNetworks"] + """ + Contains information about card networks used to process the payment. + """ + + +class PaymentMethodUpdateParamsCardNetworks(TypedDict): + preferred: NotRequired[ + "Literal['']|Literal['cartes_bancaires', 'mastercard', 'visa']" + ] + """ + The customer's preferred card network for co-branded cards. Supports `cartes_bancaires`, `mastercard`, or `visa`. Selection of a network that does not apply to the card will be stored as `invalid_preference` on the card. + """ + + +class PaymentMethodUpdateParamsPayto(TypedDict): + account_number: NotRequired[str] + """ + The account number for the bank account. + """ + bsb_number: NotRequired[str] + """ + Bank-State-Branch number of the bank account. + """ + pay_id: NotRequired[str] + """ + The PayID alias for the bank account. + """ + + +class PaymentMethodUpdateParamsUsBankAccount(TypedDict): + account_holder_type: NotRequired[Literal["company", "individual"]] + """ + Bank account holder type. + """ + account_type: NotRequired[Literal["checking", "savings"]] + """ + Bank account type. + """ diff --git a/stripe/params/_payment_record_report_payment_attempt_canceled_params.py b/stripe/params/_payment_record_report_payment_attempt_canceled_params.py new file mode 100644 index 000000000..6e464723b --- /dev/null +++ b/stripe/params/_payment_record_report_payment_attempt_canceled_params.py @@ -0,0 +1,17 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import Literal, NotRequired + + +class PaymentRecordReportPaymentAttemptCanceledParams(RequestOptions): + canceled_at: int + """ + When the reported payment was canceled. Measured in seconds since the Unix epoch. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] diff --git a/stripe/params/_payment_record_report_payment_attempt_failed_params.py b/stripe/params/_payment_record_report_payment_attempt_failed_params.py new file mode 100644 index 000000000..2c6b2ee25 --- /dev/null +++ b/stripe/params/_payment_record_report_payment_attempt_failed_params.py @@ -0,0 +1,17 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import Literal, NotRequired + + +class PaymentRecordReportPaymentAttemptFailedParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + failed_at: int + """ + When the reported payment failed. Measured in seconds since the Unix epoch. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] diff --git a/stripe/params/_payment_record_report_payment_attempt_guaranteed_params.py b/stripe/params/_payment_record_report_payment_attempt_guaranteed_params.py new file mode 100644 index 000000000..d43676a62 --- /dev/null +++ b/stripe/params/_payment_record_report_payment_attempt_guaranteed_params.py @@ -0,0 +1,17 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import Literal, NotRequired + + +class PaymentRecordReportPaymentAttemptGuaranteedParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + guaranteed_at: int + """ + When the reported payment was guaranteed. Measured in seconds since the Unix epoch. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] diff --git a/stripe/params/_payment_record_report_payment_attempt_informational_params.py b/stripe/params/_payment_record_report_payment_attempt_informational_params.py new file mode 100644 index 000000000..462f2e145 --- /dev/null +++ b/stripe/params/_payment_record_report_payment_attempt_informational_params.py @@ -0,0 +1,101 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class PaymentRecordReportPaymentAttemptInformationalParams(RequestOptions): + customer_details: NotRequired[ + "PaymentRecordReportPaymentAttemptInformationalParamsCustomerDetails" + ] + """ + Customer information for this payment. + """ + description: NotRequired["Literal['']|str"] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + shipping_details: NotRequired[ + "Literal['']|PaymentRecordReportPaymentAttemptInformationalParamsShippingDetails" + ] + """ + Shipping information for this payment. + """ + + +class PaymentRecordReportPaymentAttemptInformationalParamsCustomerDetails( + TypedDict, +): + customer: NotRequired[str] + """ + The customer who made the payment. + """ + email: NotRequired[str] + """ + The customer's phone number. + """ + name: NotRequired[str] + """ + The customer's name. + """ + phone: NotRequired[str] + """ + The customer's phone number. + """ + + +class PaymentRecordReportPaymentAttemptInformationalParamsShippingDetails( + TypedDict, +): + address: NotRequired[ + "PaymentRecordReportPaymentAttemptInformationalParamsShippingDetailsAddress" + ] + """ + The physical shipping address. + """ + name: NotRequired[str] + """ + The shipping recipient's name. + """ + phone: NotRequired[str] + """ + The shipping recipient's phone number. + """ + + +class PaymentRecordReportPaymentAttemptInformationalParamsShippingDetailsAddress( + 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. + """ diff --git a/stripe/params/_payment_record_report_payment_attempt_params.py b/stripe/params/_payment_record_report_payment_attempt_params.py new file mode 100644 index 000000000..e4eca9b5c --- /dev/null +++ b/stripe/params/_payment_record_report_payment_attempt_params.py @@ -0,0 +1,196 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class PaymentRecordReportPaymentAttemptParams(RequestOptions): + description: NotRequired[str] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + failed: NotRequired["PaymentRecordReportPaymentAttemptParamsFailed"] + """ + Information about the payment attempt failure. + """ + guaranteed: NotRequired[ + "PaymentRecordReportPaymentAttemptParamsGuaranteed" + ] + """ + Information about the payment attempt guarantee. + """ + initiated_at: int + """ + When the reported payment was initiated. Measured in seconds since the Unix epoch. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + outcome: NotRequired[Literal["failed", "guaranteed"]] + """ + The outcome of the reported payment. + """ + payment_method_details: NotRequired[ + "PaymentRecordReportPaymentAttemptParamsPaymentMethodDetails" + ] + """ + Information about the Payment Method debited for this payment. + """ + shipping_details: NotRequired[ + "PaymentRecordReportPaymentAttemptParamsShippingDetails" + ] + """ + Shipping information for this payment. + """ + + +class PaymentRecordReportPaymentAttemptParamsFailed(TypedDict): + failed_at: int + """ + When the reported payment failed. Measured in seconds since the Unix epoch. + """ + + +class PaymentRecordReportPaymentAttemptParamsGuaranteed(TypedDict): + guaranteed_at: int + """ + When the reported payment was guaranteed. Measured in seconds since the Unix epoch. + """ + + +class PaymentRecordReportPaymentAttemptParamsPaymentMethodDetails(TypedDict): + billing_details: NotRequired[ + "PaymentRecordReportPaymentAttemptParamsPaymentMethodDetailsBillingDetails" + ] + """ + The billing details associated with the method of payment. + """ + custom: NotRequired[ + "PaymentRecordReportPaymentAttemptParamsPaymentMethodDetailsCustom" + ] + """ + Information about the custom (user-defined) payment method used to make this payment. + """ + payment_method: NotRequired[str] + """ + ID of the Stripe Payment Method used to make this payment. + """ + type: NotRequired[Literal["custom"]] + """ + The type of the payment method details. An additional hash is included on the payment_method_details with a name matching this value. It contains additional information specific to the type. + """ + + +class PaymentRecordReportPaymentAttemptParamsPaymentMethodDetailsBillingDetails( + TypedDict, +): + address: NotRequired[ + "PaymentRecordReportPaymentAttemptParamsPaymentMethodDetailsBillingDetailsAddress" + ] + """ + The billing address associated with the method of payment. + """ + email: NotRequired[str] + """ + The billing email associated with the method of payment. + """ + name: NotRequired[str] + """ + The billing name associated with the method of payment. + """ + phone: NotRequired[str] + """ + The billing phone number associated with the method of payment. + """ + + +class PaymentRecordReportPaymentAttemptParamsPaymentMethodDetailsBillingDetailsAddress( + 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. + """ + + +class PaymentRecordReportPaymentAttemptParamsPaymentMethodDetailsCustom( + TypedDict, +): + display_name: NotRequired[str] + """ + Display name for the custom (user-defined) payment method type used to make this payment. + """ + type: NotRequired[str] + """ + The custom payment method type associated with this payment. + """ + + +class PaymentRecordReportPaymentAttemptParamsShippingDetails(TypedDict): + address: NotRequired[ + "PaymentRecordReportPaymentAttemptParamsShippingDetailsAddress" + ] + """ + The physical shipping address. + """ + name: NotRequired[str] + """ + The shipping recipient's name. + """ + phone: NotRequired[str] + """ + The shipping recipient's phone number. + """ + + +class PaymentRecordReportPaymentAttemptParamsShippingDetailsAddress(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. + """ diff --git a/stripe/params/_payment_record_report_payment_params.py b/stripe/params/_payment_record_report_payment_params.py new file mode 100644 index 000000000..bccfe8745 --- /dev/null +++ b/stripe/params/_payment_record_report_payment_params.py @@ -0,0 +1,262 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class PaymentRecordReportPaymentParams(RequestOptions): + amount_requested: "PaymentRecordReportPaymentParamsAmountRequested" + """ + The amount you initially requested for this payment. + """ + customer_details: NotRequired[ + "PaymentRecordReportPaymentParamsCustomerDetails" + ] + """ + Customer information for this payment. + """ + customer_presence: NotRequired[Literal["off_session", "on_session"]] + """ + Indicates whether the customer was present in your checkout flow during this payment. + """ + description: NotRequired[str] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + failed: NotRequired["PaymentRecordReportPaymentParamsFailed"] + """ + Information about the payment attempt failure. + """ + guaranteed: NotRequired["PaymentRecordReportPaymentParamsGuaranteed"] + """ + Information about the payment attempt guarantee. + """ + initiated_at: int + """ + When the reported payment was initiated. Measured in seconds since the Unix epoch. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + outcome: NotRequired[Literal["failed", "guaranteed"]] + """ + The outcome of the reported payment. + """ + payment_method_details: ( + "PaymentRecordReportPaymentParamsPaymentMethodDetails" + ) + """ + Information about the Payment Method debited for this payment. + """ + processor_details: NotRequired[ + "PaymentRecordReportPaymentParamsProcessorDetails" + ] + """ + Processor information for this payment. + """ + shipping_details: NotRequired[ + "PaymentRecordReportPaymentParamsShippingDetails" + ] + """ + Shipping information for this payment. + """ + + +class PaymentRecordReportPaymentParamsAmountRequested(TypedDict): + 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). + """ + value: int + """ + A positive integer representing the amount in the currency's [minor unit](https://stripe.com/docs/currencies#zero-decimal). For example, `100` can represent 1 USD or 100 JPY. + """ + + +class PaymentRecordReportPaymentParamsCustomerDetails(TypedDict): + customer: NotRequired[str] + """ + The customer who made the payment. + """ + email: NotRequired[str] + """ + The customer's phone number. + """ + name: NotRequired[str] + """ + The customer's name. + """ + phone: NotRequired[str] + """ + The customer's phone number. + """ + + +class PaymentRecordReportPaymentParamsFailed(TypedDict): + failed_at: int + """ + When the reported payment failed. Measured in seconds since the Unix epoch. + """ + + +class PaymentRecordReportPaymentParamsGuaranteed(TypedDict): + guaranteed_at: int + """ + When the reported payment was guaranteed. Measured in seconds since the Unix epoch. + """ + + +class PaymentRecordReportPaymentParamsPaymentMethodDetails(TypedDict): + billing_details: NotRequired[ + "PaymentRecordReportPaymentParamsPaymentMethodDetailsBillingDetails" + ] + """ + The billing details associated with the method of payment. + """ + custom: NotRequired[ + "PaymentRecordReportPaymentParamsPaymentMethodDetailsCustom" + ] + """ + Information about the custom (user-defined) payment method used to make this payment. + """ + payment_method: NotRequired[str] + """ + ID of the Stripe Payment Method used to make this payment. + """ + type: NotRequired[Literal["custom"]] + """ + The type of the payment method details. An additional hash is included on the payment_method_details with a name matching this value. It contains additional information specific to the type. + """ + + +class PaymentRecordReportPaymentParamsPaymentMethodDetailsBillingDetails( + TypedDict, +): + address: NotRequired[ + "PaymentRecordReportPaymentParamsPaymentMethodDetailsBillingDetailsAddress" + ] + """ + The billing address associated with the method of payment. + """ + email: NotRequired[str] + """ + The billing email associated with the method of payment. + """ + name: NotRequired[str] + """ + The billing name associated with the method of payment. + """ + phone: NotRequired[str] + """ + The billing phone number associated with the method of payment. + """ + + +class PaymentRecordReportPaymentParamsPaymentMethodDetailsBillingDetailsAddress( + 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. + """ + + +class PaymentRecordReportPaymentParamsPaymentMethodDetailsCustom(TypedDict): + display_name: NotRequired[str] + """ + Display name for the custom (user-defined) payment method type used to make this payment. + """ + type: NotRequired[str] + """ + The custom payment method type associated with this payment. + """ + + +class PaymentRecordReportPaymentParamsProcessorDetails(TypedDict): + custom: NotRequired[ + "PaymentRecordReportPaymentParamsProcessorDetailsCustom" + ] + """ + Information about the custom processor used to make this payment. + """ + type: Literal["custom"] + """ + The type of the processor details. An additional hash is included on processor_details with a name matching this value. It contains additional information specific to the processor. + """ + + +class PaymentRecordReportPaymentParamsProcessorDetailsCustom(TypedDict): + payment_reference: str + """ + An opaque string for manual reconciliation of this payment, for example a check number or a payment processor ID. + """ + + +class PaymentRecordReportPaymentParamsShippingDetails(TypedDict): + address: NotRequired[ + "PaymentRecordReportPaymentParamsShippingDetailsAddress" + ] + """ + The physical shipping address. + """ + name: NotRequired[str] + """ + The shipping recipient's name. + """ + phone: NotRequired[str] + """ + The shipping recipient's phone number. + """ + + +class PaymentRecordReportPaymentParamsShippingDetailsAddress(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. + """ diff --git a/stripe/params/_payment_record_retrieve_params.py b/stripe/params/_payment_record_retrieve_params.py new file mode 100644 index 000000000..98d352b07 --- /dev/null +++ b/stripe/params/_payment_record_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 PaymentRecordRetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_payout_cancel_params.py b/stripe/params/_payout_cancel_params.py new file mode 100644 index 000000000..937a5b099 --- /dev/null +++ b/stripe/params/_payout_cancel_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 PayoutCancelParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_payout_create_params.py b/stripe/params/_payout_create_params.py new file mode 100644 index 000000000..9df088fda --- /dev/null +++ b/stripe/params/_payout_create_params.py @@ -0,0 +1,48 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import Literal, NotRequired + + +class PayoutCreateParams(RequestOptions): + amount: int + """ + A positive integer in cents representing how much to payout. + """ + 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). + """ + description: NotRequired[str] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ + destination: NotRequired[str] + """ + The ID of a bank account or a card to send the payout to. If you don't provide a destination, we use the default external account for the specified currency. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + method: NotRequired[Literal["instant", "standard"]] + """ + The method used to send this payout, which is `standard` or `instant`. We support `instant` for payouts to debit cards and bank accounts in certain countries. Learn more about [bank support for Instant Payouts](https://stripe.com/docs/payouts/instant-payouts-banks). + """ + payout_method: NotRequired[str] + """ + The ID of a v2 FinancialAccount to send funds to. + """ + source_type: NotRequired[Literal["bank_account", "card", "fpx"]] + """ + The balance type of your Stripe balance to draw this payout from. Balances for different payment sources are kept separately. You can find the amounts with the Balances API. One of `bank_account`, `card`, or `fpx`. + """ + statement_descriptor: NotRequired[str] + """ + A string that displays on the recipient's bank or card statement (up to 22 characters). A `statement_descriptor` that's longer than 22 characters return an error. Most banks truncate this information and display it inconsistently. Some banks might not display it at all. + """ diff --git a/stripe/params/_payout_list_params.py b/stripe/params/_payout_list_params.py new file mode 100644 index 000000000..e60283906 --- /dev/null +++ b/stripe/params/_payout_list_params.py @@ -0,0 +1,78 @@ +# -*- 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 PayoutListParams(RequestOptions): + arrival_date: NotRequired["PayoutListParamsArrivalDate|int"] + """ + Only return payouts that are expected to arrive during the given date interval. + """ + created: NotRequired["PayoutListParamsCreated|int"] + """ + Only return payouts that were created during the given date interval. + """ + destination: NotRequired[str] + """ + The ID of an external account - only return payouts sent to this external account. + """ + 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. + """ + status: NotRequired[str] + """ + Only return payouts that have the given status: `pending`, `paid`, `failed`, or `canceled`. + """ + + +class PayoutListParamsArrivalDate(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) + """ + + +class PayoutListParamsCreated(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/_payout_modify_params.py b/stripe/params/_payout_modify_params.py new file mode 100644 index 000000000..732d10bd7 --- /dev/null +++ b/stripe/params/_payout_modify_params.py @@ -0,0 +1,16 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import Literal, NotRequired + + +class PayoutModifyParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ diff --git a/stripe/params/_payout_retrieve_params.py b/stripe/params/_payout_retrieve_params.py new file mode 100644 index 000000000..1f76e5747 --- /dev/null +++ b/stripe/params/_payout_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 PayoutRetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_payout_reverse_params.py b/stripe/params/_payout_reverse_params.py new file mode 100644 index 000000000..2e95e113a --- /dev/null +++ b/stripe/params/_payout_reverse_params.py @@ -0,0 +1,16 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import NotRequired + + +class PayoutReverseParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ diff --git a/stripe/params/_payout_update_params.py b/stripe/params/_payout_update_params.py new file mode 100644 index 000000000..04a99d7da --- /dev/null +++ b/stripe/params/_payout_update_params.py @@ -0,0 +1,15 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class PayoutUpdateParams(TypedDict): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ diff --git a/stripe/params/_plan_create_params.py b/stripe/params/_plan_create_params.py new file mode 100644 index 000000000..43c20a246 --- /dev/null +++ b/stripe/params/_plan_create_params.py @@ -0,0 +1,144 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List, Union +from typing_extensions import Literal, NotRequired, TypedDict + + +class PlanCreateParams(RequestOptions): + active: NotRequired[bool] + """ + Whether the plan is currently available for new subscriptions. Defaults to `true`. + """ + amount: NotRequired[int] + """ + A positive integer in cents (or local equivalent) (or 0 for a free plan) representing how much to charge on a recurring basis. + """ + amount_decimal: NotRequired[str] + """ + Same as `amount`, but accepts a decimal value with at most 12 decimal places. Only one of `amount` and `amount_decimal` can be set. + """ + billing_scheme: NotRequired[Literal["per_unit", "tiered"]] + """ + Describes how to compute the price per period. Either `per_unit` or `tiered`. `per_unit` indicates that the fixed amount (specified in `amount`) will be charged per unit in `quantity` (for plans with `usage_type=licensed`), or per unit of total usage (for plans with `usage_type=metered`). `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the `tiers` and `tiers_mode` attributes. + """ + 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. + """ + id: NotRequired[str] + """ + An identifier randomly generated by Stripe. Used to identify this plan when subscribing a customer. You can optionally override this ID, but the ID must be unique across all plans in your Stripe account. You can, however, use the same plan ID in both live and test modes. + """ + interval: Literal["day", "month", "week", "year"] + """ + Specifies billing frequency. Either `day`, `week`, `month` or `year`. + """ + interval_count: NotRequired[int] + """ + The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + meter: NotRequired[str] + """ + The meter tracking the usage of a metered price + """ + nickname: NotRequired[str] + """ + A brief description of the plan, hidden from customers. + """ + product: NotRequired["PlanCreateParamsProduct|str"] + tiers: NotRequired[List["PlanCreateParamsTier"]] + """ + Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. + """ + tiers_mode: NotRequired[Literal["graduated", "volume"]] + """ + Defines if the tiering price should be `graduated` or `volume` based. In `volume`-based tiering, the maximum quantity within a period determines the per unit price, in `graduated` tiering pricing can successively change as the quantity grows. + """ + transform_usage: NotRequired["PlanCreateParamsTransformUsage"] + """ + Apply a transformation to the reported usage or set quantity before computing the billed price. Cannot be combined with `tiers`. + """ + trial_period_days: NotRequired[int] + """ + Default number of trial days when subscribing a customer to this plan using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan). + """ + usage_type: NotRequired[Literal["licensed", "metered"]] + """ + Configures how the quantity per period should be determined. Can be either `metered` or `licensed`. `licensed` automatically bills the `quantity` set when adding it to a subscription. `metered` aggregates the total usage based on usage records. Defaults to `licensed`. + """ + + +class PlanCreateParamsProduct(TypedDict): + active: NotRequired[bool] + """ + Whether the product is currently available for purchase. Defaults to `true`. + """ + id: NotRequired[str] + """ + The identifier for the product. Must be unique. If not provided, an identifier will be randomly generated. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + name: str + """ + The product's name, meant to be displayable to the customer. + """ + statement_descriptor: NotRequired[str] + """ + An arbitrary string to be displayed on your customer's credit card or bank statement. While most banks display this information consistently, some may display it incorrectly or not at all. + + This may be up to 22 characters. The statement description may not include `<`, `>`, `\\`, `"`, `'` characters, and will appear on your customer's statement in capital letters. Non-ASCII characters are automatically stripped. + """ + tax_code: NotRequired[str] + """ + A [tax code](https://stripe.com/docs/tax/tax-categories) ID. + """ + unit_label: NotRequired[str] + """ + A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal. + """ + + +class PlanCreateParamsTier(TypedDict): + flat_amount: NotRequired[int] + """ + The flat billing amount for an entire tier, regardless of the number of units in the tier. + """ + flat_amount_decimal: NotRequired[str] + """ + Same as `flat_amount`, but accepts a decimal value representing an integer in the minor units of the currency. Only one of `flat_amount` and `flat_amount_decimal` can be set. + """ + unit_amount: NotRequired[int] + """ + The per unit billing amount for each individual unit for which this tier applies. + """ + unit_amount_decimal: NotRequired[str] + """ + Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + """ + up_to: Union[Literal["inf"], int] + """ + Specifies the upper bound of this tier. The lower bound of a tier is the upper bound of the previous tier adding one. Use `inf` to define a fallback tier. + """ + + +class PlanCreateParamsTransformUsage(TypedDict): + divide_by: int + """ + Divide usage by this number. + """ + round: Literal["down", "up"] + """ + After division, either round the result `up` or `down`. + """ diff --git a/stripe/params/_plan_delete_params.py b/stripe/params/_plan_delete_params.py new file mode 100644 index 000000000..7980a799b --- /dev/null +++ b/stripe/params/_plan_delete_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions + + +class PlanDeleteParams(RequestOptions): + pass diff --git a/stripe/params/_plan_list_params.py b/stripe/params/_plan_list_params.py new file mode 100644 index 000000000..e33e7ce1a --- /dev/null +++ b/stripe/params/_plan_list_params.py @@ -0,0 +1,55 @@ +# -*- 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 PlanListParams(RequestOptions): + active: NotRequired[bool] + """ + Only return plans that are active or inactive (e.g., pass `false` to list all inactive plans). + """ + created: NotRequired["PlanListParamsCreated|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. + """ + product: NotRequired[str] + """ + Only return plans for the given product. + """ + 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 PlanListParamsCreated(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/_plan_modify_params.py b/stripe/params/_plan_modify_params.py new file mode 100644 index 000000000..c9efc214b --- /dev/null +++ b/stripe/params/_plan_modify_params.py @@ -0,0 +1,32 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import Literal, NotRequired + + +class PlanModifyParams(RequestOptions): + active: NotRequired[bool] + """ + Whether the plan is currently available for new subscriptions. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + nickname: NotRequired[str] + """ + A brief description of the plan, hidden from customers. + """ + product: NotRequired[str] + """ + The product the plan belongs to. This cannot be changed once it has been used in a subscription or subscription schedule. + """ + trial_period_days: NotRequired[int] + """ + Default number of trial days when subscribing a customer to this plan using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan). + """ diff --git a/stripe/params/_plan_retrieve_params.py b/stripe/params/_plan_retrieve_params.py new file mode 100644 index 000000000..f1d5ea9e1 --- /dev/null +++ b/stripe/params/_plan_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 PlanRetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_plan_update_params.py b/stripe/params/_plan_update_params.py new file mode 100644 index 000000000..7c2ef5cf2 --- /dev/null +++ b/stripe/params/_plan_update_params.py @@ -0,0 +1,31 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class PlanUpdateParams(TypedDict): + active: NotRequired[bool] + """ + Whether the plan is currently available for new subscriptions. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + nickname: NotRequired[str] + """ + A brief description of the plan, hidden from customers. + """ + product: NotRequired[str] + """ + The product the plan belongs to. This cannot be changed once it has been used in a subscription or subscription schedule. + """ + trial_period_days: NotRequired[int] + """ + Default number of trial days when subscribing a customer to this plan using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan). + """ diff --git a/stripe/params/_price_create_params.py b/stripe/params/_price_create_params.py new file mode 100644 index 000000000..decaa2d7e --- /dev/null +++ b/stripe/params/_price_create_params.py @@ -0,0 +1,262 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List, Union +from typing_extensions import Literal, NotRequired, TypedDict + + +class PriceCreateParams(RequestOptions): + active: NotRequired[bool] + """ + Whether the price can be used for new purchases. Defaults to `true`. + """ + billing_scheme: NotRequired[Literal["per_unit", "tiered"]] + """ + Describes how to compute the price per period. Either `per_unit` or `tiered`. `per_unit` indicates that the fixed amount (specified in `unit_amount` or `unit_amount_decimal`) will be charged per unit in `quantity` (for prices with `usage_type=licensed`), or per unit of total usage (for prices with `usage_type=metered`). `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the `tiers` and `tiers_mode` attributes. + """ + 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). + """ + currency_options: NotRequired[ + Dict[str, "PriceCreateParamsCurrencyOptions"] + ] + """ + Prices defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). + """ + custom_unit_amount: NotRequired["PriceCreateParamsCustomUnitAmount"] + """ + When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + lookup_key: NotRequired[str] + """ + A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + nickname: NotRequired[str] + """ + A brief description of the price, hidden from customers. + """ + product: NotRequired[str] + """ + The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to. + """ + product_data: NotRequired["PriceCreateParamsProductData"] + """ + These fields can be used to create a new product that this price will belong to. + """ + recurring: NotRequired["PriceCreateParamsRecurring"] + """ + The recurring components of a price such as `interval` and `usage_type`. + """ + tax_behavior: NotRequired[Literal["exclusive", "inclusive", "unspecified"]] + """ + Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + """ + tiers: NotRequired[List["PriceCreateParamsTier"]] + """ + Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. + """ + tiers_mode: NotRequired[Literal["graduated", "volume"]] + """ + Defines if the tiering price should be `graduated` or `volume` based. In `volume`-based tiering, the maximum quantity within a period determines the per unit price, in `graduated` tiering pricing can successively change as the quantity grows. + """ + transfer_lookup_key: NotRequired[bool] + """ + If set to true, will atomically remove the lookup key from the existing price, and assign it to this price. + """ + transform_quantity: NotRequired["PriceCreateParamsTransformQuantity"] + """ + Apply a transformation to the reported usage or set quantity before computing the billed price. Cannot be combined with `tiers`. + """ + unit_amount: NotRequired[int] + """ + A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. One of `unit_amount`, `unit_amount_decimal`, or `custom_unit_amount` is required, unless `billing_scheme=tiered`. + """ + unit_amount_decimal: NotRequired[str] + """ + Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + """ + + +class PriceCreateParamsCurrencyOptions(TypedDict): + custom_unit_amount: NotRequired[ + "PriceCreateParamsCurrencyOptionsCustomUnitAmount" + ] + """ + When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. + """ + tax_behavior: NotRequired[Literal["exclusive", "inclusive", "unspecified"]] + """ + Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + """ + tiers: NotRequired[List["PriceCreateParamsCurrencyOptionsTier"]] + """ + Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. + """ + unit_amount: NotRequired[int] + """ + A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + """ + unit_amount_decimal: NotRequired[str] + """ + Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + """ + + +class PriceCreateParamsCurrencyOptionsCustomUnitAmount(TypedDict): + enabled: bool + """ + Pass in `true` to enable `custom_unit_amount`, otherwise omit `custom_unit_amount`. + """ + maximum: NotRequired[int] + """ + The maximum unit amount the customer can specify for this item. + """ + minimum: NotRequired[int] + """ + The minimum unit amount the customer can specify for this item. Must be at least the minimum charge amount. + """ + preset: NotRequired[int] + """ + The starting unit amount which can be updated by the customer. + """ + + +class PriceCreateParamsCurrencyOptionsTier(TypedDict): + flat_amount: NotRequired[int] + """ + The flat billing amount for an entire tier, regardless of the number of units in the tier. + """ + flat_amount_decimal: NotRequired[str] + """ + Same as `flat_amount`, but accepts a decimal value representing an integer in the minor units of the currency. Only one of `flat_amount` and `flat_amount_decimal` can be set. + """ + unit_amount: NotRequired[int] + """ + The per unit billing amount for each individual unit for which this tier applies. + """ + unit_amount_decimal: NotRequired[str] + """ + Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + """ + up_to: Union[Literal["inf"], int] + """ + Specifies the upper bound of this tier. The lower bound of a tier is the upper bound of the previous tier adding one. Use `inf` to define a fallback tier. + """ + + +class PriceCreateParamsCustomUnitAmount(TypedDict): + enabled: bool + """ + Pass in `true` to enable `custom_unit_amount`, otherwise omit `custom_unit_amount`. + """ + maximum: NotRequired[int] + """ + The maximum unit amount the customer can specify for this item. + """ + minimum: NotRequired[int] + """ + The minimum unit amount the customer can specify for this item. Must be at least the minimum charge amount. + """ + preset: NotRequired[int] + """ + The starting unit amount which can be updated by the customer. + """ + + +class PriceCreateParamsProductData(TypedDict): + active: NotRequired[bool] + """ + Whether the product is currently available for purchase. Defaults to `true`. + """ + id: NotRequired[str] + """ + The identifier for the product. Must be unique. If not provided, an identifier will be randomly generated. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + name: str + """ + The product's name, meant to be displayable to the customer. + """ + statement_descriptor: NotRequired[str] + """ + An arbitrary string to be displayed on your customer's credit card or bank statement. While most banks display this information consistently, some may display it incorrectly or not at all. + + This may be up to 22 characters. The statement description may not include `<`, `>`, `\\`, `"`, `'` characters, and will appear on your customer's statement in capital letters. Non-ASCII characters are automatically stripped. + """ + tax_code: NotRequired[str] + """ + A [tax code](https://stripe.com/docs/tax/tax-categories) ID. + """ + unit_label: NotRequired[str] + """ + A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal. + """ + + +class PriceCreateParamsRecurring(TypedDict): + interval: Literal["day", "month", "week", "year"] + """ + Specifies billing frequency. Either `day`, `week`, `month` or `year`. + """ + interval_count: NotRequired[int] + """ + The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). + """ + meter: NotRequired[str] + """ + The meter tracking the usage of a metered price + """ + trial_period_days: NotRequired[int] + """ + Default number of trial days when subscribing a customer to this price using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan). + """ + usage_type: NotRequired[Literal["licensed", "metered"]] + """ + Configures how the quantity per period should be determined. Can be either `metered` or `licensed`. `licensed` automatically bills the `quantity` set when adding it to a subscription. `metered` aggregates the total usage based on usage records. Defaults to `licensed`. + """ + + +class PriceCreateParamsTier(TypedDict): + flat_amount: NotRequired[int] + """ + The flat billing amount for an entire tier, regardless of the number of units in the tier. + """ + flat_amount_decimal: NotRequired[str] + """ + Same as `flat_amount`, but accepts a decimal value representing an integer in the minor units of the currency. Only one of `flat_amount` and `flat_amount_decimal` can be set. + """ + unit_amount: NotRequired[int] + """ + The per unit billing amount for each individual unit for which this tier applies. + """ + unit_amount_decimal: NotRequired[str] + """ + Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + """ + up_to: Union[Literal["inf"], int] + """ + Specifies the upper bound of this tier. The lower bound of a tier is the upper bound of the previous tier adding one. Use `inf` to define a fallback tier. + """ + + +class PriceCreateParamsTransformQuantity(TypedDict): + divide_by: int + """ + Divide usage by this number. + """ + round: Literal["down", "up"] + """ + After division, either round the result `up` or `down`. + """ diff --git a/stripe/params/_price_list_params.py b/stripe/params/_price_list_params.py new file mode 100644 index 000000000..e1df106d0 --- /dev/null +++ b/stripe/params/_price_list_params.py @@ -0,0 +1,86 @@ +# -*- 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, TypedDict + + +class PriceListParams(RequestOptions): + active: NotRequired[bool] + """ + Only return prices that are active or inactive (e.g., pass `false` to list all inactive prices). + """ + created: NotRequired["PriceListParamsCreated|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. + """ + currency: NotRequired[str] + """ + Only return prices for the given currency. + """ + 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. + """ + lookup_keys: NotRequired[List[str]] + """ + Only return the price with these lookup_keys, if any exist. You can specify up to 10 lookup_keys. + """ + product: NotRequired[str] + """ + Only return prices for the given product. + """ + recurring: NotRequired["PriceListParamsRecurring"] + """ + Only return prices with these recurring fields. + """ + 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. + """ + type: NotRequired[Literal["one_time", "recurring"]] + """ + Only return prices of type `recurring` or `one_time`. + """ + + +class PriceListParamsCreated(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) + """ + + +class PriceListParamsRecurring(TypedDict): + interval: NotRequired[Literal["day", "month", "week", "year"]] + """ + Filter by billing frequency. Either `day`, `week`, `month` or `year`. + """ + meter: NotRequired[str] + """ + Filter by the price's meter. + """ + usage_type: NotRequired[Literal["licensed", "metered"]] + """ + Filter by the usage type for this price. Can be either `metered` or `licensed`. + """ diff --git a/stripe/params/_price_modify_params.py b/stripe/params/_price_modify_params.py new file mode 100644 index 000000000..4057648b6 --- /dev/null +++ b/stripe/params/_price_modify_params.py @@ -0,0 +1,128 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List, Union +from typing_extensions import Literal, NotRequired, TypedDict + + +class PriceModifyParams(RequestOptions): + active: NotRequired[bool] + """ + Whether the price can be used for new purchases. Defaults to `true`. + """ + currency_options: NotRequired[ + "Literal['']|Dict[str, PriceModifyParamsCurrencyOptions]" + ] + """ + Prices defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + lookup_key: NotRequired[str] + """ + A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + migrate_to: NotRequired["Literal['']|PriceModifyParamsMigrateTo"] + """ + If specified, subscriptions using this price will be updated to use the new referenced price. + """ + nickname: NotRequired[str] + """ + A brief description of the price, hidden from customers. + """ + tax_behavior: NotRequired[Literal["exclusive", "inclusive", "unspecified"]] + """ + Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + """ + transfer_lookup_key: NotRequired[bool] + """ + If set to true, will atomically remove the lookup key from the existing price, and assign it to this price. + """ + + +class PriceModifyParamsCurrencyOptions(TypedDict): + custom_unit_amount: NotRequired[ + "PriceModifyParamsCurrencyOptionsCustomUnitAmount" + ] + """ + When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. + """ + tax_behavior: NotRequired[Literal["exclusive", "inclusive", "unspecified"]] + """ + Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + """ + tiers: NotRequired[List["PriceModifyParamsCurrencyOptionsTier"]] + """ + Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. + """ + unit_amount: NotRequired[int] + """ + A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + """ + unit_amount_decimal: NotRequired[str] + """ + Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + """ + + +class PriceModifyParamsCurrencyOptionsCustomUnitAmount(TypedDict): + enabled: bool + """ + Pass in `true` to enable `custom_unit_amount`, otherwise omit `custom_unit_amount`. + """ + maximum: NotRequired[int] + """ + The maximum unit amount the customer can specify for this item. + """ + minimum: NotRequired[int] + """ + The minimum unit amount the customer can specify for this item. Must be at least the minimum charge amount. + """ + preset: NotRequired[int] + """ + The starting unit amount which can be updated by the customer. + """ + + +class PriceModifyParamsCurrencyOptionsTier(TypedDict): + flat_amount: NotRequired[int] + """ + The flat billing amount for an entire tier, regardless of the number of units in the tier. + """ + flat_amount_decimal: NotRequired[str] + """ + Same as `flat_amount`, but accepts a decimal value representing an integer in the minor units of the currency. Only one of `flat_amount` and `flat_amount_decimal` can be set. + """ + unit_amount: NotRequired[int] + """ + The per unit billing amount for each individual unit for which this tier applies. + """ + unit_amount_decimal: NotRequired[str] + """ + Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + """ + up_to: Union[Literal["inf"], int] + """ + Specifies the upper bound of this tier. The lower bound of a tier is the upper bound of the previous tier adding one. Use `inf` to define a fallback tier. + """ + + +class PriceModifyParamsMigrateTo(TypedDict): + behavior: Literal["at_cycle_end"] + """ + The behavior controlling the point in the subscription lifecycle after which to migrate the price. Currently must be `at_cycle_end`. + """ + effective_after: NotRequired[int] + """ + The time after which subscriptions should start using the new price. + """ + price: str + """ + The ID of the price object. + """ diff --git a/stripe/params/_price_retrieve_params.py b/stripe/params/_price_retrieve_params.py new file mode 100644 index 000000000..e8138021b --- /dev/null +++ b/stripe/params/_price_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 PriceRetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_price_search_params.py b/stripe/params/_price_search_params.py new file mode 100644 index 000000000..f10b84c39 --- /dev/null +++ b/stripe/params/_price_search_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 PriceSearchParams(RequestOptions): + 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. + """ + page: NotRequired[str] + """ + A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + """ + query: str + """ + The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for prices](https://stripe.com/docs/search#query-fields-for-prices). + """ diff --git a/stripe/params/_price_update_params.py b/stripe/params/_price_update_params.py new file mode 100644 index 000000000..3949b899c --- /dev/null +++ b/stripe/params/_price_update_params.py @@ -0,0 +1,127 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import Dict, List, Union +from typing_extensions import Literal, NotRequired, TypedDict + + +class PriceUpdateParams(TypedDict): + active: NotRequired[bool] + """ + Whether the price can be used for new purchases. Defaults to `true`. + """ + currency_options: NotRequired[ + "Literal['']|Dict[str, PriceUpdateParamsCurrencyOptions]" + ] + """ + Prices defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + lookup_key: NotRequired[str] + """ + A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + migrate_to: NotRequired["Literal['']|PriceUpdateParamsMigrateTo"] + """ + If specified, subscriptions using this price will be updated to use the new referenced price. + """ + nickname: NotRequired[str] + """ + A brief description of the price, hidden from customers. + """ + tax_behavior: NotRequired[Literal["exclusive", "inclusive", "unspecified"]] + """ + Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + """ + transfer_lookup_key: NotRequired[bool] + """ + If set to true, will atomically remove the lookup key from the existing price, and assign it to this price. + """ + + +class PriceUpdateParamsCurrencyOptions(TypedDict): + custom_unit_amount: NotRequired[ + "PriceUpdateParamsCurrencyOptionsCustomUnitAmount" + ] + """ + When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. + """ + tax_behavior: NotRequired[Literal["exclusive", "inclusive", "unspecified"]] + """ + Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + """ + tiers: NotRequired[List["PriceUpdateParamsCurrencyOptionsTier"]] + """ + Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. + """ + unit_amount: NotRequired[int] + """ + A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + """ + unit_amount_decimal: NotRequired[str] + """ + Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + """ + + +class PriceUpdateParamsCurrencyOptionsCustomUnitAmount(TypedDict): + enabled: bool + """ + Pass in `true` to enable `custom_unit_amount`, otherwise omit `custom_unit_amount`. + """ + maximum: NotRequired[int] + """ + The maximum unit amount the customer can specify for this item. + """ + minimum: NotRequired[int] + """ + The minimum unit amount the customer can specify for this item. Must be at least the minimum charge amount. + """ + preset: NotRequired[int] + """ + The starting unit amount which can be updated by the customer. + """ + + +class PriceUpdateParamsCurrencyOptionsTier(TypedDict): + flat_amount: NotRequired[int] + """ + The flat billing amount for an entire tier, regardless of the number of units in the tier. + """ + flat_amount_decimal: NotRequired[str] + """ + Same as `flat_amount`, but accepts a decimal value representing an integer in the minor units of the currency. Only one of `flat_amount` and `flat_amount_decimal` can be set. + """ + unit_amount: NotRequired[int] + """ + The per unit billing amount for each individual unit for which this tier applies. + """ + unit_amount_decimal: NotRequired[str] + """ + Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + """ + up_to: Union[Literal["inf"], int] + """ + Specifies the upper bound of this tier. The lower bound of a tier is the upper bound of the previous tier adding one. Use `inf` to define a fallback tier. + """ + + +class PriceUpdateParamsMigrateTo(TypedDict): + behavior: Literal["at_cycle_end"] + """ + The behavior controlling the point in the subscription lifecycle after which to migrate the price. Currently must be `at_cycle_end`. + """ + effective_after: NotRequired[int] + """ + The time after which subscriptions should start using the new price. + """ + price: str + """ + The ID of the price object. + """ diff --git a/stripe/params/_product_create_feature_params.py b/stripe/params/_product_create_feature_params.py new file mode 100644 index 000000000..4ec04f542 --- /dev/null +++ b/stripe/params/_product_create_feature_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 ProductCreateFeatureParams(RequestOptions): + entitlement_feature: str + """ + The ID of the [Feature](https://stripe.com/docs/api/entitlements/feature) object attached to this product. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_product_create_params.py b/stripe/params/_product_create_params.py new file mode 100644 index 000000000..761f0fd6a --- /dev/null +++ b/stripe/params/_product_create_params.py @@ -0,0 +1,243 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List, Union +from typing_extensions import Literal, NotRequired, TypedDict + + +class ProductCreateParams(RequestOptions): + active: NotRequired[bool] + """ + Whether the product is currently available for purchase. Defaults to `true`. + """ + default_price_data: NotRequired["ProductCreateParamsDefaultPriceData"] + """ + Data used to generate a new [Price](https://stripe.com/docs/api/prices) object. This Price will be set as the default price for this product. + """ + description: NotRequired[str] + """ + The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + id: NotRequired[str] + """ + An identifier will be randomly generated by Stripe. You can optionally override this ID, but the ID must be unique across all products in your Stripe account. + """ + images: NotRequired[List[str]] + """ + A list of up to 8 URLs of images for this product, meant to be displayable to the customer. + """ + marketing_features: NotRequired[ + List["ProductCreateParamsMarketingFeature"] + ] + """ + A list of up to 15 marketing features for this product. These are displayed in [pricing tables](https://stripe.com/docs/payments/checkout/pricing-table). + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + name: str + """ + The product's name, meant to be displayable to the customer. + """ + package_dimensions: NotRequired["ProductCreateParamsPackageDimensions"] + """ + The dimensions of this product for shipping purposes. + """ + shippable: NotRequired[bool] + """ + Whether this product is shipped (i.e., physical goods). + """ + statement_descriptor: NotRequired[str] + """ + An arbitrary string to be displayed on your customer's credit card or bank statement. While most banks display this information consistently, some may display it incorrectly or not at all. + + This may be up to 22 characters. The statement description may not include `<`, `>`, `\\`, `"`, `'` characters, and will appear on your customer's statement in capital letters. Non-ASCII characters are automatically stripped. + It must contain at least one letter. Only used for subscription payments. + """ + tax_code: NotRequired[str] + """ + A [tax code](https://stripe.com/docs/tax/tax-categories) ID. + """ + type: NotRequired[Literal["good", "service"]] + """ + The type of the product. Defaults to `service` if not explicitly specified, enabling use of this product with Subscriptions and Plans. Set this parameter to `good` to use this product with Orders and SKUs. On API versions before `2018-02-05`, this field defaults to `good` for compatibility reasons. + """ + unit_label: NotRequired[str] + """ + A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal. + """ + url: NotRequired[str] + """ + A URL of a publicly-accessible webpage for this product. + """ + + +class ProductCreateParamsDefaultPriceData(TypedDict): + 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). + """ + currency_options: NotRequired[ + Dict[str, "ProductCreateParamsDefaultPriceDataCurrencyOptions"] + ] + """ + Prices defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). + """ + custom_unit_amount: NotRequired[ + "ProductCreateParamsDefaultPriceDataCustomUnitAmount" + ] + """ + When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + recurring: NotRequired["ProductCreateParamsDefaultPriceDataRecurring"] + """ + The recurring components of a price such as `interval` and `interval_count`. + """ + tax_behavior: NotRequired[Literal["exclusive", "inclusive", "unspecified"]] + """ + Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + """ + unit_amount: NotRequired[int] + """ + A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. One of `unit_amount`, `unit_amount_decimal`, or `custom_unit_amount` is required. + """ + unit_amount_decimal: NotRequired[str] + """ + Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + """ + + +class ProductCreateParamsDefaultPriceDataCurrencyOptions(TypedDict): + custom_unit_amount: NotRequired[ + "ProductCreateParamsDefaultPriceDataCurrencyOptionsCustomUnitAmount" + ] + """ + When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. + """ + tax_behavior: NotRequired[Literal["exclusive", "inclusive", "unspecified"]] + """ + Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + """ + tiers: NotRequired[ + List["ProductCreateParamsDefaultPriceDataCurrencyOptionsTier"] + ] + """ + Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. + """ + unit_amount: NotRequired[int] + """ + A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + """ + unit_amount_decimal: NotRequired[str] + """ + Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + """ + + +class ProductCreateParamsDefaultPriceDataCurrencyOptionsCustomUnitAmount( + TypedDict, +): + enabled: bool + """ + Pass in `true` to enable `custom_unit_amount`, otherwise omit `custom_unit_amount`. + """ + maximum: NotRequired[int] + """ + The maximum unit amount the customer can specify for this item. + """ + minimum: NotRequired[int] + """ + The minimum unit amount the customer can specify for this item. Must be at least the minimum charge amount. + """ + preset: NotRequired[int] + """ + The starting unit amount which can be updated by the customer. + """ + + +class ProductCreateParamsDefaultPriceDataCurrencyOptionsTier(TypedDict): + flat_amount: NotRequired[int] + """ + The flat billing amount for an entire tier, regardless of the number of units in the tier. + """ + flat_amount_decimal: NotRequired[str] + """ + Same as `flat_amount`, but accepts a decimal value representing an integer in the minor units of the currency. Only one of `flat_amount` and `flat_amount_decimal` can be set. + """ + unit_amount: NotRequired[int] + """ + The per unit billing amount for each individual unit for which this tier applies. + """ + unit_amount_decimal: NotRequired[str] + """ + Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + """ + up_to: Union[Literal["inf"], int] + """ + Specifies the upper bound of this tier. The lower bound of a tier is the upper bound of the previous tier adding one. Use `inf` to define a fallback tier. + """ + + +class ProductCreateParamsDefaultPriceDataCustomUnitAmount(TypedDict): + enabled: bool + """ + Pass in `true` to enable `custom_unit_amount`, otherwise omit `custom_unit_amount`. + """ + maximum: NotRequired[int] + """ + The maximum unit amount the customer can specify for this item. + """ + minimum: NotRequired[int] + """ + The minimum unit amount the customer can specify for this item. Must be at least the minimum charge amount. + """ + preset: NotRequired[int] + """ + The starting unit amount which can be updated by the customer. + """ + + +class ProductCreateParamsDefaultPriceDataRecurring(TypedDict): + interval: Literal["day", "month", "week", "year"] + """ + Specifies billing frequency. Either `day`, `week`, `month` or `year`. + """ + interval_count: NotRequired[int] + """ + The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). + """ + + +class ProductCreateParamsMarketingFeature(TypedDict): + name: str + """ + The marketing feature name. Up to 80 characters long. + """ + + +class ProductCreateParamsPackageDimensions(TypedDict): + height: float + """ + Height, in inches. Maximum precision is 2 decimal places. + """ + length: float + """ + Length, in inches. Maximum precision is 2 decimal places. + """ + weight: float + """ + Weight, in ounces. Maximum precision is 2 decimal places. + """ + width: float + """ + Width, in inches. Maximum precision is 2 decimal places. + """ diff --git a/stripe/params/_product_delete_feature_params.py b/stripe/params/_product_delete_feature_params.py new file mode 100644 index 000000000..354bb60a7 --- /dev/null +++ b/stripe/params/_product_delete_feature_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions + + +class ProductDeleteFeatureParams(RequestOptions): + pass diff --git a/stripe/params/_product_delete_params.py b/stripe/params/_product_delete_params.py new file mode 100644 index 000000000..b758f6bfb --- /dev/null +++ b/stripe/params/_product_delete_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions + + +class ProductDeleteParams(RequestOptions): + pass diff --git a/stripe/params/_product_feature_create_params.py b/stripe/params/_product_feature_create_params.py new file mode 100644 index 000000000..b52580ed9 --- /dev/null +++ b/stripe/params/_product_feature_create_params.py @@ -0,0 +1,15 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import NotRequired, TypedDict + + +class ProductFeatureCreateParams(TypedDict): + entitlement_feature: str + """ + The ID of the [Feature](https://stripe.com/docs/api/entitlements/feature) object attached to this product. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_product_feature_delete_params.py b/stripe/params/_product_feature_delete_params.py new file mode 100644 index 000000000..8cee6f289 --- /dev/null +++ b/stripe/params/_product_feature_delete_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class ProductFeatureDeleteParams(TypedDict): + pass diff --git a/stripe/params/_product_feature_list_params.py b/stripe/params/_product_feature_list_params.py new file mode 100644 index 000000000..6e35305b7 --- /dev/null +++ b/stripe/params/_product_feature_list_params.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import NotRequired, TypedDict + + +class ProductFeatureListParams(TypedDict): + 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. + """ diff --git a/stripe/params/_product_feature_retrieve_params.py b/stripe/params/_product_feature_retrieve_params.py new file mode 100644 index 000000000..d34196415 --- /dev/null +++ b/stripe/params/_product_feature_retrieve_params.py @@ -0,0 +1,11 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import NotRequired, TypedDict + + +class ProductFeatureRetrieveParams(TypedDict): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_product_list_features_params.py b/stripe/params/_product_list_features_params.py new file mode 100644 index 000000000..23b455651 --- /dev/null +++ b/stripe/params/_product_list_features_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 ProductListFeaturesParams(RequestOptions): + 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. + """ diff --git a/stripe/params/_product_list_params.py b/stripe/params/_product_list_params.py new file mode 100644 index 000000000..c52f65b89 --- /dev/null +++ b/stripe/params/_product_list_params.py @@ -0,0 +1,67 @@ +# -*- 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, TypedDict + + +class ProductListParams(RequestOptions): + active: NotRequired[bool] + """ + Only return products that are active or inactive (e.g., pass `false` to list all inactive products). + """ + created: NotRequired["ProductListParamsCreated|int"] + """ + Only return products that were created during the given date interval. + """ + 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. + """ + ids: NotRequired[List[str]] + """ + Only return products with the given IDs. Cannot be used with [starting_after](https://stripe.com/docs/api#list_products-starting_after) or [ending_before](https://stripe.com/docs/api#list_products-ending_before). + """ + 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. + """ + shippable: NotRequired[bool] + """ + Only return products that can be shipped (i.e., physical, not digital products). + """ + 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. + """ + type: NotRequired[Literal["good", "service"]] + """ + Only return products of this type. + """ + url: NotRequired[str] + """ + Only return products with the given url. + """ + + +class ProductListParamsCreated(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/_product_modify_params.py b/stripe/params/_product_modify_params.py new file mode 100644 index 000000000..1a7381951 --- /dev/null +++ b/stripe/params/_product_modify_params.py @@ -0,0 +1,97 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class ProductModifyParams(RequestOptions): + active: NotRequired[bool] + """ + Whether the product is available for purchase. + """ + default_price: NotRequired[str] + """ + The ID of the [Price](https://stripe.com/docs/api/prices) object that is the default price for this product. + """ + description: NotRequired["Literal['']|str"] + """ + The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + images: NotRequired["Literal['']|List[str]"] + """ + A list of up to 8 URLs of images for this product, meant to be displayable to the customer. + """ + marketing_features: NotRequired[ + "Literal['']|List[ProductModifyParamsMarketingFeature]" + ] + """ + A list of up to 15 marketing features for this product. These are displayed in [pricing tables](https://stripe.com/docs/payments/checkout/pricing-table). + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + name: NotRequired[str] + """ + The product's name, meant to be displayable to the customer. + """ + package_dimensions: NotRequired[ + "Literal['']|ProductModifyParamsPackageDimensions" + ] + """ + The dimensions of this product for shipping purposes. + """ + shippable: NotRequired[bool] + """ + Whether this product is shipped (i.e., physical goods). + """ + statement_descriptor: NotRequired[str] + """ + An arbitrary string to be displayed on your customer's credit card or bank statement. While most banks display this information consistently, some may display it incorrectly or not at all. + + This may be up to 22 characters. The statement description may not include `<`, `>`, `\\`, `"`, `'` characters, and will appear on your customer's statement in capital letters. Non-ASCII characters are automatically stripped. + It must contain at least one letter. May only be set if `type=service`. Only used for subscription payments. + """ + tax_code: NotRequired["Literal['']|str"] + """ + A [tax code](https://stripe.com/docs/tax/tax-categories) ID. + """ + unit_label: NotRequired["Literal['']|str"] + """ + A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal. May only be set if `type=service`. + """ + url: NotRequired["Literal['']|str"] + """ + A URL of a publicly-accessible webpage for this product. + """ + + +class ProductModifyParamsMarketingFeature(TypedDict): + name: str + """ + The marketing feature name. Up to 80 characters long. + """ + + +class ProductModifyParamsPackageDimensions(TypedDict): + height: float + """ + Height, in inches. Maximum precision is 2 decimal places. + """ + length: float + """ + Length, in inches. Maximum precision is 2 decimal places. + """ + weight: float + """ + Weight, in ounces. Maximum precision is 2 decimal places. + """ + width: float + """ + Width, in inches. Maximum precision is 2 decimal places. + """ diff --git a/stripe/params/_product_retrieve_feature_params.py b/stripe/params/_product_retrieve_feature_params.py new file mode 100644 index 000000000..7d3f8f208 --- /dev/null +++ b/stripe/params/_product_retrieve_feature_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 ProductRetrieveFeatureParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_product_retrieve_params.py b/stripe/params/_product_retrieve_params.py new file mode 100644 index 000000000..c9cc1bd6b --- /dev/null +++ b/stripe/params/_product_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 ProductRetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_product_search_params.py b/stripe/params/_product_search_params.py new file mode 100644 index 000000000..e9ac3e56b --- /dev/null +++ b/stripe/params/_product_search_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 ProductSearchParams(RequestOptions): + 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. + """ + page: NotRequired[str] + """ + A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + """ + query: str + """ + The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for products](https://stripe.com/docs/search#query-fields-for-products). + """ diff --git a/stripe/params/_product_update_params.py b/stripe/params/_product_update_params.py new file mode 100644 index 000000000..685966a0e --- /dev/null +++ b/stripe/params/_product_update_params.py @@ -0,0 +1,96 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class ProductUpdateParams(TypedDict): + active: NotRequired[bool] + """ + Whether the product is available for purchase. + """ + default_price: NotRequired[str] + """ + The ID of the [Price](https://stripe.com/docs/api/prices) object that is the default price for this product. + """ + description: NotRequired["Literal['']|str"] + """ + The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + images: NotRequired["Literal['']|List[str]"] + """ + A list of up to 8 URLs of images for this product, meant to be displayable to the customer. + """ + marketing_features: NotRequired[ + "Literal['']|List[ProductUpdateParamsMarketingFeature]" + ] + """ + A list of up to 15 marketing features for this product. These are displayed in [pricing tables](https://stripe.com/docs/payments/checkout/pricing-table). + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + name: NotRequired[str] + """ + The product's name, meant to be displayable to the customer. + """ + package_dimensions: NotRequired[ + "Literal['']|ProductUpdateParamsPackageDimensions" + ] + """ + The dimensions of this product for shipping purposes. + """ + shippable: NotRequired[bool] + """ + Whether this product is shipped (i.e., physical goods). + """ + statement_descriptor: NotRequired[str] + """ + An arbitrary string to be displayed on your customer's credit card or bank statement. While most banks display this information consistently, some may display it incorrectly or not at all. + + This may be up to 22 characters. The statement description may not include `<`, `>`, `\\`, `"`, `'` characters, and will appear on your customer's statement in capital letters. Non-ASCII characters are automatically stripped. + It must contain at least one letter. May only be set if `type=service`. Only used for subscription payments. + """ + tax_code: NotRequired["Literal['']|str"] + """ + A [tax code](https://stripe.com/docs/tax/tax-categories) ID. + """ + unit_label: NotRequired["Literal['']|str"] + """ + A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal. May only be set if `type=service`. + """ + url: NotRequired["Literal['']|str"] + """ + A URL of a publicly-accessible webpage for this product. + """ + + +class ProductUpdateParamsMarketingFeature(TypedDict): + name: str + """ + The marketing feature name. Up to 80 characters long. + """ + + +class ProductUpdateParamsPackageDimensions(TypedDict): + height: float + """ + Height, in inches. Maximum precision is 2 decimal places. + """ + length: float + """ + Length, in inches. Maximum precision is 2 decimal places. + """ + weight: float + """ + Weight, in ounces. Maximum precision is 2 decimal places. + """ + width: float + """ + Width, in inches. Maximum precision is 2 decimal places. + """ diff --git a/stripe/params/_promotion_code_create_params.py b/stripe/params/_promotion_code_create_params.py new file mode 100644 index 000000000..adc5087f1 --- /dev/null +++ b/stripe/params/_promotion_code_create_params.py @@ -0,0 +1,89 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class PromotionCodeCreateParams(RequestOptions): + active: NotRequired[bool] + """ + Whether the promotion code is currently active. + """ + code: NotRequired[str] + """ + The customer-facing code. Regardless of case, this code must be unique across all active promotion codes for a specific customer. Valid characters are lower case letters (a-z), upper case letters (A-Z), and digits (0-9). + + If left blank, we will generate one automatically. + """ + customer: NotRequired[str] + """ + The customer that this promotion code can be used by. If not set, the promotion code can be used by all customers. + """ + customer_account: NotRequired[str] + """ + The account that this promotion code can be used by. If not set, the promotion code can be used by all accounts. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + expires_at: NotRequired[int] + """ + The timestamp at which this promotion code will expire. If the coupon has specified a `redeems_by`, then this value cannot be after the coupon's `redeems_by`. + """ + max_redemptions: NotRequired[int] + """ + A positive integer specifying the number of times the promotion code can be redeemed. If the coupon has specified a `max_redemptions`, then this value cannot be greater than the coupon's `max_redemptions`. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + promotion: "PromotionCodeCreateParamsPromotion" + """ + The promotion referenced by this promotion code. + """ + restrictions: NotRequired["PromotionCodeCreateParamsRestrictions"] + """ + Settings that restrict the redemption of the promotion code. + """ + + +class PromotionCodeCreateParamsPromotion(TypedDict): + coupon: NotRequired[str] + """ + If promotion `type` is `coupon`, the coupon for this promotion code. + """ + type: Literal["coupon"] + """ + Specifies the type of promotion. + """ + + +class PromotionCodeCreateParamsRestrictions(TypedDict): + currency_options: NotRequired[ + Dict[str, "PromotionCodeCreateParamsRestrictionsCurrencyOptions"] + ] + """ + Promotion codes defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). + """ + first_time_transaction: NotRequired[bool] + """ + A Boolean indicating if the Promotion Code should only be redeemed for Customers without any successful payments or invoices + """ + minimum_amount: NotRequired[int] + """ + Minimum amount required to redeem this Promotion Code into a Coupon (e.g., a purchase must be $100 or more to work). + """ + minimum_amount_currency: NotRequired[str] + """ + Three-letter [ISO code](https://stripe.com/docs/currencies) for minimum_amount + """ + + +class PromotionCodeCreateParamsRestrictionsCurrencyOptions(TypedDict): + minimum_amount: NotRequired[int] + """ + Minimum amount required to redeem this Promotion Code into a Coupon (e.g., a purchase must be $100 or more to work). + """ diff --git a/stripe/params/_promotion_code_list_params.py b/stripe/params/_promotion_code_list_params.py new file mode 100644 index 000000000..a3d0a1755 --- /dev/null +++ b/stripe/params/_promotion_code_list_params.py @@ -0,0 +1,67 @@ +# -*- 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 PromotionCodeListParams(RequestOptions): + active: NotRequired[bool] + """ + Filter promotion codes by whether they are active. + """ + code: NotRequired[str] + """ + Only return promotion codes that have this case-insensitive code. + """ + coupon: NotRequired[str] + """ + Only return promotion codes for this coupon. + """ + created: NotRequired["PromotionCodeListParamsCreated|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. + """ + customer: NotRequired[str] + """ + Only return promotion codes that are restricted to this customer. + """ + customer_account: NotRequired[str] + """ + Only return promotion codes that are restricted to this account. + """ + 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 PromotionCodeListParamsCreated(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/_promotion_code_modify_params.py b/stripe/params/_promotion_code_modify_params.py new file mode 100644 index 000000000..671f7047d --- /dev/null +++ b/stripe/params/_promotion_code_modify_params.py @@ -0,0 +1,40 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class PromotionCodeModifyParams(RequestOptions): + active: NotRequired[bool] + """ + Whether the promotion code is currently active. A promotion code can only be reactivated when the coupon is still valid and the promotion code is otherwise redeemable. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + restrictions: NotRequired["PromotionCodeModifyParamsRestrictions"] + """ + Settings that restrict the redemption of the promotion code. + """ + + +class PromotionCodeModifyParamsRestrictions(TypedDict): + currency_options: NotRequired[ + Dict[str, "PromotionCodeModifyParamsRestrictionsCurrencyOptions"] + ] + """ + Promotion codes defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). + """ + + +class PromotionCodeModifyParamsRestrictionsCurrencyOptions(TypedDict): + minimum_amount: NotRequired[int] + """ + Minimum amount required to redeem this Promotion Code into a Coupon (e.g., a purchase must be $100 or more to work). + """ diff --git a/stripe/params/_promotion_code_retrieve_params.py b/stripe/params/_promotion_code_retrieve_params.py new file mode 100644 index 000000000..5129081a2 --- /dev/null +++ b/stripe/params/_promotion_code_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 PromotionCodeRetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_promotion_code_update_params.py b/stripe/params/_promotion_code_update_params.py new file mode 100644 index 000000000..9f05b1a79 --- /dev/null +++ b/stripe/params/_promotion_code_update_params.py @@ -0,0 +1,39 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class PromotionCodeUpdateParams(TypedDict): + active: NotRequired[bool] + """ + Whether the promotion code is currently active. A promotion code can only be reactivated when the coupon is still valid and the promotion code is otherwise redeemable. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + restrictions: NotRequired["PromotionCodeUpdateParamsRestrictions"] + """ + Settings that restrict the redemption of the promotion code. + """ + + +class PromotionCodeUpdateParamsRestrictions(TypedDict): + currency_options: NotRequired[ + Dict[str, "PromotionCodeUpdateParamsRestrictionsCurrencyOptions"] + ] + """ + Promotion codes defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). + """ + + +class PromotionCodeUpdateParamsRestrictionsCurrencyOptions(TypedDict): + minimum_amount: NotRequired[int] + """ + Minimum amount required to redeem this Promotion Code into a Coupon (e.g., a purchase must be $100 or more to work). + """ diff --git a/stripe/params/_quote_accept_params.py b/stripe/params/_quote_accept_params.py new file mode 100644 index 000000000..5199188cc --- /dev/null +++ b/stripe/params/_quote_accept_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 QuoteAcceptParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_quote_cancel_params.py b/stripe/params/_quote_cancel_params.py new file mode 100644 index 000000000..1797e4651 --- /dev/null +++ b/stripe/params/_quote_cancel_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 QuoteCancelParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_quote_computed_upfront_line_items_list_params.py b/stripe/params/_quote_computed_upfront_line_items_list_params.py new file mode 100644 index 000000000..6106ebe9e --- /dev/null +++ b/stripe/params/_quote_computed_upfront_line_items_list_params.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import NotRequired, TypedDict + + +class QuoteComputedUpfrontLineItemsListParams(TypedDict): + 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. + """ diff --git a/stripe/params/_quote_create_params.py b/stripe/params/_quote_create_params.py new file mode 100644 index 000000000..67b598562 --- /dev/null +++ b/stripe/params/_quote_create_params.py @@ -0,0 +1,1196 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class QuoteCreateParams(RequestOptions): + allow_backdated_lines: NotRequired[bool] + """ + Set to true to allow quote lines to have `starts_at` in the past if collection is paused between `starts_at` and now. + """ + application_fee_amount: NotRequired["Literal['']|int"] + """ + The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. There cannot be any line items with recurring prices when using this field. + """ + application_fee_percent: NotRequired["Literal['']|float"] + """ + A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. There must be at least 1 line item with a recurring price to use this field. + """ + automatic_tax: NotRequired["QuoteCreateParamsAutomaticTax"] + """ + Settings for automatic tax lookup for this quote and resulting invoices and subscriptions. + """ + collection_method: NotRequired[ + Literal["charge_automatically", "send_invoice"] + ] + """ + Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay invoices at the end of the subscription cycle or at invoice finalization using the default payment method attached to the subscription or customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`. + """ + customer: NotRequired[str] + """ + The customer for which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed. + """ + customer_account: NotRequired[str] + """ + The account for which this quote belongs to. A customer or account is required before finalizing the quote. Once specified, it cannot be changed. + """ + default_tax_rates: NotRequired["Literal['']|List[str]"] + """ + The tax rates that will apply to any line item that does not have `tax_rates` set. + """ + description: NotRequired["Literal['']|str"] + """ + A description that will be displayed on the quote PDF. If no value is passed, the default description configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used. + """ + discounts: NotRequired["Literal['']|List[QuoteCreateParamsDiscount]"] + """ + The discounts applied to the quote. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + expires_at: NotRequired[int] + """ + A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch. If no value is passed, the default expiration date configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used. + """ + footer: NotRequired["Literal['']|str"] + """ + A footer that will be displayed on the quote PDF. If no value is passed, the default footer configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used. + """ + from_quote: NotRequired["QuoteCreateParamsFromQuote"] + """ + Clone an existing quote. The new quote will be created in `status=draft`. When using this parameter, you cannot specify any other parameters except for `expires_at`. + """ + header: NotRequired["Literal['']|str"] + """ + A header that will be displayed on the quote PDF. If no value is passed, the default header configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used. + """ + invoice_settings: NotRequired["QuoteCreateParamsInvoiceSettings"] + """ + All invoices will be billed using the specified settings. + """ + line_items: NotRequired[List["QuoteCreateParamsLineItem"]] + """ + A list of line items the customer is being quoted for. Each line item includes information about the product, the quantity, and the resulting cost. + """ + lines: NotRequired[List["QuoteCreateParamsLine"]] + """ + A list of [quote lines](https://docs.stripe.com/api/quote_lines) on the quote. These lines describe changes, in the order provided, that will be used to create new subscription schedules or update existing subscription schedules when the quote is accepted. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + on_behalf_of: NotRequired["Literal['']|str"] + """ + The account on behalf of which to charge. + """ + subscription_data: NotRequired["QuoteCreateParamsSubscriptionData"] + """ + When creating a subscription or subscription schedule, the specified configuration data will be used. There must be at least one line item with a recurring price for a subscription or subscription schedule to be created. A subscription schedule is created if `subscription_data[effective_date]` is present and in the future, otherwise a subscription is created. + """ + subscription_data_overrides: NotRequired[ + List["QuoteCreateParamsSubscriptionDataOverride"] + ] + """ + List representing overrides for `subscription_data` configurations for specific subscription schedules. + """ + test_clock: NotRequired[str] + """ + ID of the test clock to attach to the quote. + """ + transfer_data: NotRequired["Literal['']|QuoteCreateParamsTransferData"] + """ + The data with which to automatically create a Transfer for each of the invoices. + """ + + +class QuoteCreateParamsAutomaticTax(TypedDict): + enabled: bool + """ + Controls whether Stripe will automatically compute tax on the resulting invoices or subscriptions as well as the quote itself. + """ + liability: NotRequired["QuoteCreateParamsAutomaticTaxLiability"] + """ + The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + """ + + +class QuoteCreateParamsAutomaticTaxLiability(TypedDict): + account: NotRequired[str] + """ + The connected account being referenced when `type` is `account`. + """ + type: Literal["account", "self"] + """ + Type of the account referenced in the request. + """ + + +class QuoteCreateParamsDiscount(TypedDict): + coupon: NotRequired[str] + """ + ID of the coupon to create a new discount for. + """ + discount: NotRequired[str] + """ + ID of an existing discount on the object (or one of its ancestors) to reuse. + """ + discount_end: NotRequired["QuoteCreateParamsDiscountDiscountEnd"] + """ + Details to determine how long the discount should be applied for. + """ + promotion_code: NotRequired[str] + """ + ID of the promotion code to create a new discount for. + """ + + +class QuoteCreateParamsDiscountDiscountEnd(TypedDict): + duration: NotRequired["QuoteCreateParamsDiscountDiscountEndDuration"] + """ + Time span for the redeemed discount. + """ + timestamp: NotRequired[int] + """ + A precise Unix timestamp for the discount to end. Must be in the future. + """ + type: Literal["duration", "timestamp"] + """ + The type of calculation made to determine when the discount ends. + """ + + +class QuoteCreateParamsDiscountDiscountEndDuration(TypedDict): + interval: Literal["day", "month", "week", "year"] + """ + Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + """ + interval_count: int + """ + The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + """ + + +class QuoteCreateParamsFromQuote(TypedDict): + is_revision: NotRequired[bool] + """ + Whether this quote is a revision of the previous quote. + """ + quote: str + """ + The `id` of the quote that will be cloned. + """ + + +class QuoteCreateParamsInvoiceSettings(TypedDict): + days_until_due: NotRequired[int] + """ + Number of days within which a customer must pay the invoice generated by this quote. This value will be `null` for quotes where `collection_method=charge_automatically`. + """ + issuer: NotRequired["QuoteCreateParamsInvoiceSettingsIssuer"] + """ + The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + """ + + +class QuoteCreateParamsInvoiceSettingsIssuer(TypedDict): + account: NotRequired[str] + """ + The connected account being referenced when `type` is `account`. + """ + type: Literal["account", "self"] + """ + Type of the account referenced in the request. + """ + + +class QuoteCreateParamsLineItem(TypedDict): + discounts: NotRequired[ + "Literal['']|List[QuoteCreateParamsLineItemDiscount]" + ] + """ + The discounts applied to this line item. + """ + price: NotRequired[str] + """ + The ID of the price object. One of `price` or `price_data` is required. + """ + price_data: NotRequired["QuoteCreateParamsLineItemPriceData"] + """ + Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. + """ + quantity: NotRequired[int] + """ + The quantity of the line item. + """ + tax_rates: NotRequired["Literal['']|List[str]"] + """ + The tax rates which apply to the line item. When set, the `default_tax_rates` on the quote do not apply to this line item. + """ + + +class QuoteCreateParamsLineItemDiscount(TypedDict): + coupon: NotRequired[str] + """ + ID of the coupon to create a new discount for. + """ + discount: NotRequired[str] + """ + ID of an existing discount on the object (or one of its ancestors) to reuse. + """ + discount_end: NotRequired["QuoteCreateParamsLineItemDiscountDiscountEnd"] + """ + Details to determine how long the discount should be applied for. + """ + promotion_code: NotRequired[str] + """ + ID of the promotion code to create a new discount for. + """ + + +class QuoteCreateParamsLineItemDiscountDiscountEnd(TypedDict): + duration: NotRequired[ + "QuoteCreateParamsLineItemDiscountDiscountEndDuration" + ] + """ + Time span for the redeemed discount. + """ + timestamp: NotRequired[int] + """ + A precise Unix timestamp for the discount to end. Must be in the future. + """ + type: Literal["duration", "timestamp"] + """ + The type of calculation made to determine when the discount ends. + """ + + +class QuoteCreateParamsLineItemDiscountDiscountEndDuration(TypedDict): + interval: Literal["day", "month", "week", "year"] + """ + Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + """ + interval_count: int + """ + The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + """ + + +class QuoteCreateParamsLineItemPriceData(TypedDict): + 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). + """ + product: str + """ + The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to. + """ + recurring: NotRequired["QuoteCreateParamsLineItemPriceDataRecurring"] + """ + The recurring components of a price such as `interval` and `interval_count`. + """ + tax_behavior: NotRequired[Literal["exclusive", "inclusive", "unspecified"]] + """ + Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + """ + unit_amount: NotRequired[int] + """ + A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + """ + unit_amount_decimal: NotRequired[str] + """ + Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + """ + + +class QuoteCreateParamsLineItemPriceDataRecurring(TypedDict): + interval: Literal["day", "month", "week", "year"] + """ + Specifies billing frequency. Either `day`, `week`, `month` or `year`. + """ + interval_count: NotRequired[int] + """ + The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). + """ + + +class QuoteCreateParamsLine(TypedDict): + actions: NotRequired[List["QuoteCreateParamsLineAction"]] + """ + An array of operations the quote line performs. + """ + applies_to: NotRequired["QuoteCreateParamsLineAppliesTo"] + """ + Details to identify the subscription schedule the quote line applies to. + """ + billing_cycle_anchor: NotRequired[Literal["automatic", "line_starts_at"]] + """ + For point-in-time quote lines (having no `ends_at` timestamp), this attribute lets you set or remove whether the subscription's billing cycle anchor is reset at the Quote Line `starts_at` timestamp.For time-span based quote lines (having both `starts_at` and `ends_at`), the only valid value is `automatic`, which removes any previously configured billing cycle anchor resets during the window of time spanning the quote line. + """ + cancel_subscription_schedule: NotRequired[ + "QuoteCreateParamsLineCancelSubscriptionSchedule" + ] + """ + A point-in-time operation that cancels an existing subscription schedule at the line's starts_at timestamp. Currently only compatible with `quote_acceptance_date` for `starts_at`. When using cancel_subscription_schedule, the subscription schedule on the quote remains unalterable, except for modifications to the metadata, collection_method or invoice_settings. + """ + ends_at: NotRequired["QuoteCreateParamsLineEndsAt"] + """ + Details to identify the end of the time range modified by the proposed change. If not supplied, the quote line is considered a point-in-time operation that only affects the exact timestamp at `starts_at`, and a restricted set of attributes is supported on the quote line. + """ + proration_behavior: NotRequired[ + Literal["always_invoice", "create_prorations", "none"] + ] + """ + Changes to how Stripe handles prorations during the quote line's time span. Affects if and how prorations are created when a future phase starts. + """ + set_pause_collection: NotRequired[ + "QuoteCreateParamsLineSetPauseCollection" + ] + """ + Defines how to pause collection for the underlying subscription throughout the duration of the amendment. + """ + set_schedule_end: NotRequired[Literal["line_ends_at", "line_starts_at"]] + """ + Timestamp helper to end the underlying schedule early, based on the acompanying line's start or end date. + """ + starts_at: NotRequired["QuoteCreateParamsLineStartsAt"] + """ + Details to identify the earliest timestamp where the proposed change should take effect. + """ + trial_settings: NotRequired["QuoteCreateParamsLineTrialSettings"] + """ + Settings related to subscription trials. + """ + + +class QuoteCreateParamsLineAction(TypedDict): + add_discount: NotRequired["QuoteCreateParamsLineActionAddDiscount"] + """ + Details for the `add_discount` type. + """ + add_item: NotRequired["QuoteCreateParamsLineActionAddItem"] + """ + Details for the `add_item` type. + """ + add_metadata: NotRequired[Dict[str, str]] + """ + Details for the `add_metadata` type: specify a hash of key-value pairs. + """ + remove_discount: NotRequired["QuoteCreateParamsLineActionRemoveDiscount"] + """ + Details for the `remove_discount` type. + """ + remove_item: NotRequired["QuoteCreateParamsLineActionRemoveItem"] + """ + Details for the `remove_item` type. + """ + remove_metadata: NotRequired[List[str]] + """ + Details for the `remove_metadata` type: specify an array of metadata keys. + """ + set_discounts: NotRequired[List["QuoteCreateParamsLineActionSetDiscount"]] + """ + Details for the `set_discounts` type. + """ + set_items: NotRequired[List["QuoteCreateParamsLineActionSetItem"]] + """ + Details for the `set_items` type. + """ + set_metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Details for the `set_metadata` type: specify an array of key-value pairs. + """ + type: Literal[ + "add_discount", + "add_item", + "add_metadata", + "clear_discounts", + "clear_metadata", + "remove_discount", + "remove_item", + "remove_metadata", + "set_discounts", + "set_items", + "set_metadata", + ] + """ + The type of action the quote line performs. + """ + + +class QuoteCreateParamsLineActionAddDiscount(TypedDict): + coupon: NotRequired[str] + """ + The coupon code to redeem. + """ + discount: NotRequired[str] + """ + An ID of an existing discount for a coupon that was already redeemed. + """ + discount_end: NotRequired[ + "QuoteCreateParamsLineActionAddDiscountDiscountEnd" + ] + """ + Details to determine how long the discount should be applied for. + """ + index: NotRequired[int] + """ + The index, starting at 0, at which to position the new discount. When not supplied, Stripe defaults to appending the discount to the end of the `discounts` array. + """ + promotion_code: NotRequired[str] + """ + The promotion code to redeem. + """ + + +class QuoteCreateParamsLineActionAddDiscountDiscountEnd(TypedDict): + type: Literal["line_ends_at"] + """ + The type of calculation made to determine when the discount ends. + """ + + +class QuoteCreateParamsLineActionAddItem(TypedDict): + discounts: NotRequired[List["QuoteCreateParamsLineActionAddItemDiscount"]] + """ + The discounts applied to the item. Subscription item discounts are applied before subscription discounts. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + price: str + """ + The ID of the price object. + """ + quantity: NotRequired[int] + """ + Quantity for this item. + """ + tax_rates: NotRequired[List[str]] + """ + The tax rates that apply to this subscription item. When set, the `default_tax_rates` on the subscription do not apply to this `subscription_item`. + """ + trial: NotRequired["QuoteCreateParamsLineActionAddItemTrial"] + """ + Options that configure the trial on the subscription item. + """ + + +class QuoteCreateParamsLineActionAddItemDiscount(TypedDict): + coupon: NotRequired[str] + """ + ID of the coupon to create a new discount for. + """ + discount: NotRequired[str] + """ + ID of an existing discount on the object (or one of its ancestors) to reuse. + """ + discount_end: NotRequired[ + "QuoteCreateParamsLineActionAddItemDiscountDiscountEnd" + ] + """ + Details to determine how long the discount should be applied for. + """ + promotion_code: NotRequired[str] + """ + ID of the promotion code to create a new discount for. + """ + + +class QuoteCreateParamsLineActionAddItemDiscountDiscountEnd(TypedDict): + duration: NotRequired[ + "QuoteCreateParamsLineActionAddItemDiscountDiscountEndDuration" + ] + """ + Time span for the redeemed discount. + """ + timestamp: NotRequired[int] + """ + A precise Unix timestamp for the discount to end. Must be in the future. + """ + type: Literal["duration", "timestamp"] + """ + The type of calculation made to determine when the discount ends. + """ + + +class QuoteCreateParamsLineActionAddItemDiscountDiscountEndDuration(TypedDict): + interval: Literal["day", "month", "week", "year"] + """ + Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + """ + interval_count: int + """ + The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + """ + + +class QuoteCreateParamsLineActionAddItemTrial(TypedDict): + converts_to: NotRequired[List[str]] + """ + List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. + """ + type: Literal["free", "paid"] + """ + Determines the type of trial for this item. + """ + + +class QuoteCreateParamsLineActionRemoveDiscount(TypedDict): + coupon: NotRequired[str] + """ + The coupon code to remove from the `discounts` array. + """ + discount: NotRequired[str] + """ + The ID of a discount to remove from the `discounts` array. + """ + promotion_code: NotRequired[str] + """ + The ID of a promotion code to remove from the `discounts` array. + """ + + +class QuoteCreateParamsLineActionRemoveItem(TypedDict): + price: str + """ + ID of a price to remove. + """ + + +class QuoteCreateParamsLineActionSetDiscount(TypedDict): + coupon: NotRequired[str] + """ + The coupon code to replace the `discounts` array with. + """ + discount: NotRequired[str] + """ + An ID of an existing discount to replace the `discounts` array with. + """ + promotion_code: NotRequired[str] + """ + An ID of an existing promotion code to replace the `discounts` array with. + """ + + +class QuoteCreateParamsLineActionSetItem(TypedDict): + discounts: NotRequired[List["QuoteCreateParamsLineActionSetItemDiscount"]] + """ + If an item with the `price` already exists, passing this will override the `discounts` array on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `discounts`. + """ + metadata: NotRequired[Dict[str, str]] + """ + If an item with the `price` already exists, passing this will override the `metadata` on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `metadata`. + """ + price: str + """ + The ID of the price object. + """ + quantity: NotRequired[int] + """ + If an item with the `price` already exists, passing this will override the quantity on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `quantity`. + """ + tax_rates: NotRequired[List[str]] + """ + If an item with the `price` already exists, passing this will override the `tax_rates` array on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `tax_rates`. + """ + trial: NotRequired["QuoteCreateParamsLineActionSetItemTrial"] + """ + If an item with the `price` already exists, passing this will override the `trial` configuration on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `trial`. + """ + + +class QuoteCreateParamsLineActionSetItemDiscount(TypedDict): + coupon: NotRequired[str] + """ + ID of the coupon to create a new discount for. + """ + discount: NotRequired[str] + """ + ID of an existing discount on the object (or one of its ancestors) to reuse. + """ + discount_end: NotRequired[ + "QuoteCreateParamsLineActionSetItemDiscountDiscountEnd" + ] + """ + Details to determine how long the discount should be applied for. + """ + promotion_code: NotRequired[str] + """ + ID of the promotion code to create a new discount for. + """ + + +class QuoteCreateParamsLineActionSetItemDiscountDiscountEnd(TypedDict): + duration: NotRequired[ + "QuoteCreateParamsLineActionSetItemDiscountDiscountEndDuration" + ] + """ + Time span for the redeemed discount. + """ + timestamp: NotRequired[int] + """ + A precise Unix timestamp for the discount to end. Must be in the future. + """ + type: Literal["duration", "timestamp"] + """ + The type of calculation made to determine when the discount ends. + """ + + +class QuoteCreateParamsLineActionSetItemDiscountDiscountEndDuration(TypedDict): + interval: Literal["day", "month", "week", "year"] + """ + Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + """ + interval_count: int + """ + The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + """ + + +class QuoteCreateParamsLineActionSetItemTrial(TypedDict): + converts_to: NotRequired[List[str]] + """ + List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. + """ + type: Literal["free", "paid"] + """ + Determines the type of trial for this item. + """ + + +class QuoteCreateParamsLineAppliesTo(TypedDict): + new_reference: NotRequired[str] + """ + A custom string that identifies a new subscription schedule being created upon quote acceptance. All quote lines with the same `new_reference` field will be applied to the creation of a new subscription schedule. + """ + subscription_schedule: NotRequired[str] + """ + The ID of the schedule the line applies to. + """ + type: Literal["new_reference", "subscription_schedule"] + """ + Describes whether the quote line is affecting a new schedule or an existing schedule. + """ + + +class QuoteCreateParamsLineCancelSubscriptionSchedule(TypedDict): + cancel_at: Literal["line_starts_at"] + """ + Timestamp helper to cancel the underlying schedule on the accompanying line's start date. Must be set to `line_starts_at`. + """ + invoice_now: NotRequired[bool] + """ + If the subscription schedule is `active`, indicates if a final invoice will be generated that contains any un-invoiced metered usage and new/pending proration invoice items. Boolean that defaults to `true`. + """ + prorate: NotRequired[bool] + """ + If the subscription schedule is `active`, indicates if the cancellation should be prorated. Boolean that defaults to `true`. + """ + + +class QuoteCreateParamsLineEndsAt(TypedDict): + discount_end: NotRequired["QuoteCreateParamsLineEndsAtDiscountEnd"] + """ + Use the `end` time of a given discount. + """ + duration: NotRequired["QuoteCreateParamsLineEndsAtDuration"] + """ + Time span for the quote line starting from the `starts_at` date. + """ + timestamp: NotRequired[int] + """ + A precise Unix timestamp. + """ + type: Literal[ + "billing_period_end", + "discount_end", + "duration", + "quote_acceptance_date", + "schedule_end", + "timestamp", + "upcoming_invoice", + ] + """ + Select a way to pass in `ends_at`. + """ + + +class QuoteCreateParamsLineEndsAtDiscountEnd(TypedDict): + discount: str + """ + The ID of a specific discount. + """ + + +class QuoteCreateParamsLineEndsAtDuration(TypedDict): + interval: Literal["day", "month", "week", "year"] + """ + Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + """ + interval_count: int + """ + The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + """ + + +class QuoteCreateParamsLineSetPauseCollection(TypedDict): + set: NotRequired["QuoteCreateParamsLineSetPauseCollectionSet"] + """ + Details of the pause_collection behavior to apply to the amendment. + """ + type: Literal["remove", "set"] + """ + Determines the type of the pause_collection amendment. + """ + + +class QuoteCreateParamsLineSetPauseCollectionSet(TypedDict): + behavior: Literal["keep_as_draft", "mark_uncollectible", "void"] + """ + The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. + """ + + +class QuoteCreateParamsLineStartsAt(TypedDict): + discount_end: NotRequired["QuoteCreateParamsLineStartsAtDiscountEnd"] + """ + Use the `end` time of a given discount. + """ + line_ends_at: NotRequired["QuoteCreateParamsLineStartsAtLineEndsAt"] + """ + The timestamp the given line ends at. + """ + timestamp: NotRequired[int] + """ + A precise Unix timestamp. + """ + type: Literal[ + "discount_end", + "line_ends_at", + "now", + "quote_acceptance_date", + "schedule_end", + "timestamp", + "upcoming_invoice", + ] + """ + Select a way to pass in `starts_at`. + """ + + +class QuoteCreateParamsLineStartsAtDiscountEnd(TypedDict): + discount: str + """ + The ID of a specific discount. + """ + + +class QuoteCreateParamsLineStartsAtLineEndsAt(TypedDict): + index: NotRequired[int] + """ + The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array. + """ + + +class QuoteCreateParamsLineTrialSettings(TypedDict): + end_behavior: NotRequired["QuoteCreateParamsLineTrialSettingsEndBehavior"] + """ + Defines how the subscription should behave when a trial ends. + """ + + +class QuoteCreateParamsLineTrialSettingsEndBehavior(TypedDict): + prorate_up_front: NotRequired[Literal["defer", "include"]] + """ + Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`. + """ + + +class QuoteCreateParamsSubscriptionData(TypedDict): + bill_on_acceptance: NotRequired[ + "QuoteCreateParamsSubscriptionDataBillOnAcceptance" + ] + """ + Describes the period to bill for upon accepting the quote. + """ + billing_behavior: NotRequired[ + Literal["prorate_on_next_phase", "prorate_up_front"] + ] + """ + Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front. + """ + billing_cycle_anchor: NotRequired["Literal['']|Literal['reset']"] + """ + When specified as `reset`, the subscription will always start a new billing period when the quote is accepted. + """ + billing_mode: NotRequired["QuoteCreateParamsSubscriptionDataBillingMode"] + """ + Controls how prorations and invoices for subscriptions are calculated and orchestrated. + """ + description: NotRequired[str] + """ + The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. + """ + effective_date: NotRequired[ + "Literal['']|Literal['current_period_end']|int" + ] + """ + When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. When updating a subscription, the date of which the subscription will be updated using a subscription schedule. The special value `current_period_end` can be provided to update a subscription at the end of its current period. The `effective_date` is ignored if it is in the past when the quote is accepted. + """ + end_behavior: NotRequired[Literal["cancel", "release"]] + """ + Behavior of the subscription schedule and underlying subscription when it ends. + """ + from_subscription: NotRequired[str] + """ + The id of a subscription that the quote will update. By default, the quote will contain the state of the subscription (such as line items, collection method and billing thresholds) unless overridden. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will set metadata on the subscription or subscription schedule when the quote is accepted. If a recurring price is included in `line_items`, this field will be passed to the resulting subscription's `metadata` field. If `subscription_data.effective_date` is used, this field will be passed to the resulting subscription schedule's `phases.metadata` field. Unlike object-level metadata, this field is declarative. Updates will clear prior values. + """ + prebilling: NotRequired[ + "Literal['']|QuoteCreateParamsSubscriptionDataPrebilling" + ] + """ + If specified, the invoicing for the given billing cycle iterations will be processed when the quote is accepted. Cannot be used with `effective_date`. + """ + proration_behavior: NotRequired[ + Literal["always_invoice", "create_prorations", "none"] + ] + """ + Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations). When creating a subscription, valid values are `create_prorations` or `none`. + + When updating a subscription, valid values are `create_prorations`, `none`, or `always_invoice`. + + Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`. + + Prorations can be disabled by passing `none`. + """ + trial_period_days: NotRequired["Literal['']|int"] + """ + Integer representing the number of trial period days before the customer is charged for the first time. + """ + + +class QuoteCreateParamsSubscriptionDataBillOnAcceptance(TypedDict): + bill_from: NotRequired[ + "QuoteCreateParamsSubscriptionDataBillOnAcceptanceBillFrom" + ] + """ + The start of the period to bill from when the Quote is accepted. + """ + bill_until: NotRequired[ + "QuoteCreateParamsSubscriptionDataBillOnAcceptanceBillUntil" + ] + """ + The end of the period to bill until when the Quote is accepted. + """ + + +class QuoteCreateParamsSubscriptionDataBillOnAcceptanceBillFrom(TypedDict): + line_starts_at: NotRequired[ + "QuoteCreateParamsSubscriptionDataBillOnAcceptanceBillFromLineStartsAt" + ] + """ + Details of a Quote line to start the bill period from. + """ + timestamp: NotRequired[int] + """ + A precise Unix timestamp. + """ + type: Literal[ + "line_starts_at", + "now", + "pause_collection_start", + "quote_acceptance_date", + "timestamp", + ] + """ + The type of method to specify the `bill_from` time. + """ + + +class QuoteCreateParamsSubscriptionDataBillOnAcceptanceBillFromLineStartsAt( + TypedDict, +): + id: NotRequired[str] + """ + The ID of a quote line. + """ + index: NotRequired[int] + """ + The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array. + """ + + +class QuoteCreateParamsSubscriptionDataBillOnAcceptanceBillUntil(TypedDict): + duration: NotRequired[ + "QuoteCreateParamsSubscriptionDataBillOnAcceptanceBillUntilDuration" + ] + """ + Details of the duration over which to bill. + """ + line_ends_at: NotRequired[ + "QuoteCreateParamsSubscriptionDataBillOnAcceptanceBillUntilLineEndsAt" + ] + """ + Details of a Quote line item from which to bill until. + """ + timestamp: NotRequired[int] + """ + A precise Unix timestamp. + """ + type: Literal[ + "duration", + "line_ends_at", + "schedule_end", + "timestamp", + "upcoming_invoice", + ] + """ + The type of method to specify the `bill_until` time. + """ + + +class QuoteCreateParamsSubscriptionDataBillOnAcceptanceBillUntilDuration( + TypedDict, +): + interval: Literal["day", "month", "week", "year"] + """ + Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + """ + interval_count: int + """ + The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + """ + + +class QuoteCreateParamsSubscriptionDataBillOnAcceptanceBillUntilLineEndsAt( + TypedDict, +): + id: NotRequired[str] + """ + The ID of a quote line. + """ + index: NotRequired[int] + """ + The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array. + """ + + +class QuoteCreateParamsSubscriptionDataBillingMode(TypedDict): + flexible: NotRequired[ + "QuoteCreateParamsSubscriptionDataBillingModeFlexible" + ] + """ + Configure behavior for flexible billing mode. + """ + type: Literal["classic", "flexible"] + """ + Controls the calculation and orchestration of prorations and invoices for subscriptions. If no value is passed, the default is `flexible`. + """ + + +class QuoteCreateParamsSubscriptionDataBillingModeFlexible(TypedDict): + proration_discounts: NotRequired[Literal["included", "itemized"]] + """ + Controls how invoices and invoice items display proration amounts and discount amounts. + """ + + +class QuoteCreateParamsSubscriptionDataPrebilling(TypedDict): + iterations: int + """ + This is used to determine the number of billing cycles to prebill. + """ + + +class QuoteCreateParamsSubscriptionDataOverride(TypedDict): + applies_to: "QuoteCreateParamsSubscriptionDataOverrideAppliesTo" + """ + Whether the override applies to an existing Subscription Schedule or a new Subscription Schedule. + """ + bill_on_acceptance: NotRequired[ + "QuoteCreateParamsSubscriptionDataOverrideBillOnAcceptance" + ] + """ + Describes the period to bill for upon accepting the quote. + """ + billing_behavior: NotRequired[ + Literal["prorate_on_next_phase", "prorate_up_front"] + ] + """ + Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front. + """ + customer: NotRequired[str] + """ + The customer the Subscription Data override applies to. This is only relevant when `applies_to.type=new_reference`. + """ + description: NotRequired[str] + """ + The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. + """ + end_behavior: NotRequired[Literal["cancel", "release"]] + """ + Behavior of the subscription schedule and underlying subscription when it ends. + """ + proration_behavior: NotRequired[ + Literal["always_invoice", "create_prorations", "none"] + ] + """ + Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations). When creating a subscription, valid values are `create_prorations` or `none`. + + When updating a subscription, valid values are `create_prorations`, `none`, or `always_invoice`. + + Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`. + + Prorations can be disabled by passing `none`. + """ + + +class QuoteCreateParamsSubscriptionDataOverrideAppliesTo(TypedDict): + new_reference: NotRequired[str] + """ + A custom string that identifies a new subscription schedule being created upon quote acceptance. All quote lines with the same `new_reference` field will be applied to the creation of a new subscription schedule. + """ + subscription_schedule: NotRequired[str] + """ + The ID of the schedule the line applies to. + """ + type: Literal["new_reference", "subscription_schedule"] + """ + Describes whether the quote line is affecting a new schedule or an existing schedule. + """ + + +class QuoteCreateParamsSubscriptionDataOverrideBillOnAcceptance(TypedDict): + bill_from: NotRequired[ + "QuoteCreateParamsSubscriptionDataOverrideBillOnAcceptanceBillFrom" + ] + """ + The start of the period to bill from when the Quote is accepted. + """ + bill_until: NotRequired[ + "QuoteCreateParamsSubscriptionDataOverrideBillOnAcceptanceBillUntil" + ] + """ + The end of the period to bill until when the Quote is accepted. + """ + + +class QuoteCreateParamsSubscriptionDataOverrideBillOnAcceptanceBillFrom( + TypedDict, +): + line_starts_at: NotRequired[ + "QuoteCreateParamsSubscriptionDataOverrideBillOnAcceptanceBillFromLineStartsAt" + ] + """ + Details of a Quote line to start the bill period from. + """ + timestamp: NotRequired[int] + """ + A precise Unix timestamp. + """ + type: Literal[ + "line_starts_at", + "now", + "pause_collection_start", + "quote_acceptance_date", + "timestamp", + ] + """ + The type of method to specify the `bill_from` time. + """ + + +class QuoteCreateParamsSubscriptionDataOverrideBillOnAcceptanceBillFromLineStartsAt( + TypedDict, +): + id: NotRequired[str] + """ + The ID of a quote line. + """ + index: NotRequired[int] + """ + The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array. + """ + + +class QuoteCreateParamsSubscriptionDataOverrideBillOnAcceptanceBillUntil( + TypedDict, +): + duration: NotRequired[ + "QuoteCreateParamsSubscriptionDataOverrideBillOnAcceptanceBillUntilDuration" + ] + """ + Details of the duration over which to bill. + """ + line_ends_at: NotRequired[ + "QuoteCreateParamsSubscriptionDataOverrideBillOnAcceptanceBillUntilLineEndsAt" + ] + """ + Details of a Quote line item from which to bill until. + """ + timestamp: NotRequired[int] + """ + A precise Unix timestamp. + """ + type: Literal[ + "duration", + "line_ends_at", + "schedule_end", + "timestamp", + "upcoming_invoice", + ] + """ + The type of method to specify the `bill_until` time. + """ + + +class QuoteCreateParamsSubscriptionDataOverrideBillOnAcceptanceBillUntilDuration( + TypedDict, +): + interval: Literal["day", "month", "week", "year"] + """ + Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + """ + interval_count: int + """ + The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + """ + + +class QuoteCreateParamsSubscriptionDataOverrideBillOnAcceptanceBillUntilLineEndsAt( + TypedDict, +): + id: NotRequired[str] + """ + The ID of a quote line. + """ + index: NotRequired[int] + """ + The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array. + """ + + +class QuoteCreateParamsTransferData(TypedDict): + amount: NotRequired[int] + """ + The amount that will be transferred automatically when the invoice is paid. If no amount is set, the full amount is transferred. There cannot be any line items with recurring prices when using this field. + """ + amount_percent: NotRequired[float] + """ + A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. There must be at least 1 line item with a recurring price to use this field. + """ + destination: str + """ + ID of an existing, connected Stripe account. + """ diff --git a/stripe/params/_quote_finalize_quote_params.py b/stripe/params/_quote_finalize_quote_params.py new file mode 100644 index 000000000..e07b0558d --- /dev/null +++ b/stripe/params/_quote_finalize_quote_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 QuoteFinalizeQuoteParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + expires_at: NotRequired[int] + """ + A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch. + """ diff --git a/stripe/params/_quote_line_item_list_params.py b/stripe/params/_quote_line_item_list_params.py new file mode 100644 index 000000000..b08ec8ec5 --- /dev/null +++ b/stripe/params/_quote_line_item_list_params.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import NotRequired, TypedDict + + +class QuoteLineItemListParams(TypedDict): + 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. + """ diff --git a/stripe/params/_quote_line_list_params.py b/stripe/params/_quote_line_list_params.py new file mode 100644 index 000000000..ca9bb8757 --- /dev/null +++ b/stripe/params/_quote_line_list_params.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import NotRequired, TypedDict + + +class QuoteLineListParams(TypedDict): + 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. + """ diff --git a/stripe/params/_quote_list_computed_upfront_line_items_params.py b/stripe/params/_quote_list_computed_upfront_line_items_params.py new file mode 100644 index 000000000..4f38ee12b --- /dev/null +++ b/stripe/params/_quote_list_computed_upfront_line_items_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 QuoteListComputedUpfrontLineItemsParams(RequestOptions): + 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. + """ diff --git a/stripe/params/_quote_list_line_items_params.py b/stripe/params/_quote_list_line_items_params.py new file mode 100644 index 000000000..1cbaa9e3b --- /dev/null +++ b/stripe/params/_quote_list_line_items_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 QuoteListLineItemsParams(RequestOptions): + 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. + """ diff --git a/stripe/params/_quote_list_lines_params.py b/stripe/params/_quote_list_lines_params.py new file mode 100644 index 000000000..c98580d8f --- /dev/null +++ b/stripe/params/_quote_list_lines_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 QuoteListLinesParams(RequestOptions): + 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. + """ diff --git a/stripe/params/_quote_list_params.py b/stripe/params/_quote_list_params.py new file mode 100644 index 000000000..ce09ee7f7 --- /dev/null +++ b/stripe/params/_quote_list_params.py @@ -0,0 +1,46 @@ +# -*- 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 QuoteListParams(RequestOptions): + customer: NotRequired[str] + """ + The ID of the customer whose quotes will be retrieved. + """ + customer_account: NotRequired[str] + """ + The ID of the account whose quotes will be retrieved. + """ + 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. + """ + from_subscription: NotRequired[str] + """ + The subscription which the quote updates. + """ + 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. + """ + status: NotRequired[ + Literal["accepted", "accepting", "canceled", "draft", "open", "stale"] + ] + """ + The status of the quote. + """ + test_clock: NotRequired[str] + """ + Provides a list of quotes that are associated with the specified test clock. The response will not include quotes with test clocks if this and the customer parameter is not set. + """ diff --git a/stripe/params/_quote_list_preview_invoice_lines_params.py b/stripe/params/_quote_list_preview_invoice_lines_params.py new file mode 100644 index 000000000..8331d726e --- /dev/null +++ b/stripe/params/_quote_list_preview_invoice_lines_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 QuoteListPreviewInvoiceLinesParams(RequestOptions): + 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. + """ diff --git a/stripe/params/_quote_list_preview_invoices_params.py b/stripe/params/_quote_list_preview_invoices_params.py new file mode 100644 index 000000000..3c491f19c --- /dev/null +++ b/stripe/params/_quote_list_preview_invoices_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 QuoteListPreviewInvoicesParams(RequestOptions): + 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. + """ diff --git a/stripe/params/_quote_list_preview_subscription_schedules_params.py b/stripe/params/_quote_list_preview_subscription_schedules_params.py new file mode 100644 index 000000000..f00ab4060 --- /dev/null +++ b/stripe/params/_quote_list_preview_subscription_schedules_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 QuoteListPreviewSubscriptionSchedulesParams(RequestOptions): + 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. + """ diff --git a/stripe/params/_quote_mark_draft_params.py b/stripe/params/_quote_mark_draft_params.py new file mode 100644 index 000000000..d181741dd --- /dev/null +++ b/stripe/params/_quote_mark_draft_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 QuoteMarkDraftParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_quote_mark_stale_params.py b/stripe/params/_quote_mark_stale_params.py new file mode 100644 index 000000000..2bbd432ec --- /dev/null +++ b/stripe/params/_quote_mark_stale_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 QuoteMarkStaleParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + reason: NotRequired[str] + """ + Reason the Quote is being marked stale. + """ diff --git a/stripe/params/_quote_modify_params.py b/stripe/params/_quote_modify_params.py new file mode 100644 index 000000000..0df3ae8b5 --- /dev/null +++ b/stripe/params/_quote_modify_params.py @@ -0,0 +1,1161 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class QuoteModifyParams(RequestOptions): + allow_backdated_lines: NotRequired[bool] + """ + Set to true to allow quote lines to have `starts_at` in the past if collection is paused between `starts_at` and now. + """ + application_fee_amount: NotRequired["Literal['']|int"] + """ + The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. There cannot be any line items with recurring prices when using this field. + """ + application_fee_percent: NotRequired["Literal['']|float"] + """ + A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. There must be at least 1 line item with a recurring price to use this field. + """ + automatic_tax: NotRequired["QuoteModifyParamsAutomaticTax"] + """ + Settings for automatic tax lookup for this quote and resulting invoices and subscriptions. + """ + collection_method: NotRequired[ + Literal["charge_automatically", "send_invoice"] + ] + """ + Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay invoices at the end of the subscription cycle or at invoice finalization using the default payment method attached to the subscription or customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`. + """ + customer: NotRequired[str] + """ + The customer for which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed. + """ + customer_account: NotRequired[str] + """ + The account for which this quote belongs to. A customer or account is required before finalizing the quote. Once specified, it cannot be changed. + """ + default_tax_rates: NotRequired["Literal['']|List[str]"] + """ + The tax rates that will apply to any line item that does not have `tax_rates` set. + """ + description: NotRequired["Literal['']|str"] + """ + A description that will be displayed on the quote PDF. + """ + discounts: NotRequired["Literal['']|List[QuoteModifyParamsDiscount]"] + """ + The discounts applied to the quote. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + expires_at: NotRequired[int] + """ + A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch. + """ + footer: NotRequired["Literal['']|str"] + """ + A footer that will be displayed on the quote PDF. + """ + header: NotRequired["Literal['']|str"] + """ + A header that will be displayed on the quote PDF. + """ + invoice_settings: NotRequired["QuoteModifyParamsInvoiceSettings"] + """ + All invoices will be billed using the specified settings. + """ + line_items: NotRequired[List["QuoteModifyParamsLineItem"]] + """ + A list of line items the customer is being quoted for. Each line item includes information about the product, the quantity, and the resulting cost. + """ + lines: NotRequired[List["QuoteModifyParamsLine"]] + """ + A list of [quote lines](https://docs.stripe.com/api/quote_lines) on the quote. These lines describe changes, in the order provided, that will be used to create new subscription schedules or update existing subscription schedules when the quote is accepted. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + on_behalf_of: NotRequired["Literal['']|str"] + """ + The account on behalf of which to charge. + """ + subscription_data: NotRequired["QuoteModifyParamsSubscriptionData"] + """ + When creating a subscription or subscription schedule, the specified configuration data will be used. There must be at least one line item with a recurring price for a subscription or subscription schedule to be created. A subscription schedule is created if `subscription_data[effective_date]` is present and in the future, otherwise a subscription is created. + """ + subscription_data_overrides: NotRequired[ + "Literal['']|List[QuoteModifyParamsSubscriptionDataOverride]" + ] + """ + List representing overrides for `subscription_data` configurations for specific subscription schedules. + """ + transfer_data: NotRequired["Literal['']|QuoteModifyParamsTransferData"] + """ + The data with which to automatically create a Transfer for each of the invoices. + """ + + +class QuoteModifyParamsAutomaticTax(TypedDict): + enabled: bool + """ + Controls whether Stripe will automatically compute tax on the resulting invoices or subscriptions as well as the quote itself. + """ + liability: NotRequired["QuoteModifyParamsAutomaticTaxLiability"] + """ + The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + """ + + +class QuoteModifyParamsAutomaticTaxLiability(TypedDict): + account: NotRequired[str] + """ + The connected account being referenced when `type` is `account`. + """ + type: Literal["account", "self"] + """ + Type of the account referenced in the request. + """ + + +class QuoteModifyParamsDiscount(TypedDict): + coupon: NotRequired[str] + """ + ID of the coupon to create a new discount for. + """ + discount: NotRequired[str] + """ + ID of an existing discount on the object (or one of its ancestors) to reuse. + """ + discount_end: NotRequired["QuoteModifyParamsDiscountDiscountEnd"] + """ + Details to determine how long the discount should be applied for. + """ + promotion_code: NotRequired[str] + """ + ID of the promotion code to create a new discount for. + """ + + +class QuoteModifyParamsDiscountDiscountEnd(TypedDict): + duration: NotRequired["QuoteModifyParamsDiscountDiscountEndDuration"] + """ + Time span for the redeemed discount. + """ + timestamp: NotRequired[int] + """ + A precise Unix timestamp for the discount to end. Must be in the future. + """ + type: Literal["duration", "timestamp"] + """ + The type of calculation made to determine when the discount ends. + """ + + +class QuoteModifyParamsDiscountDiscountEndDuration(TypedDict): + interval: Literal["day", "month", "week", "year"] + """ + Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + """ + interval_count: int + """ + The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + """ + + +class QuoteModifyParamsInvoiceSettings(TypedDict): + days_until_due: NotRequired[int] + """ + Number of days within which a customer must pay the invoice generated by this quote. This value will be `null` for quotes where `collection_method=charge_automatically`. + """ + issuer: NotRequired["QuoteModifyParamsInvoiceSettingsIssuer"] + """ + The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + """ + + +class QuoteModifyParamsInvoiceSettingsIssuer(TypedDict): + account: NotRequired[str] + """ + The connected account being referenced when `type` is `account`. + """ + type: Literal["account", "self"] + """ + Type of the account referenced in the request. + """ + + +class QuoteModifyParamsLineItem(TypedDict): + discounts: NotRequired[ + "Literal['']|List[QuoteModifyParamsLineItemDiscount]" + ] + """ + The discounts applied to this line item. + """ + id: NotRequired[str] + """ + The ID of an existing line item on the quote. + """ + price: NotRequired[str] + """ + The ID of the price object. One of `price` or `price_data` is required. + """ + price_data: NotRequired["QuoteModifyParamsLineItemPriceData"] + """ + Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. + """ + quantity: NotRequired[int] + """ + The quantity of the line item. + """ + tax_rates: NotRequired["Literal['']|List[str]"] + """ + The tax rates which apply to the line item. When set, the `default_tax_rates` on the quote do not apply to this line item. + """ + + +class QuoteModifyParamsLineItemDiscount(TypedDict): + coupon: NotRequired[str] + """ + ID of the coupon to create a new discount for. + """ + discount: NotRequired[str] + """ + ID of an existing discount on the object (or one of its ancestors) to reuse. + """ + discount_end: NotRequired["QuoteModifyParamsLineItemDiscountDiscountEnd"] + """ + Details to determine how long the discount should be applied for. + """ + promotion_code: NotRequired[str] + """ + ID of the promotion code to create a new discount for. + """ + + +class QuoteModifyParamsLineItemDiscountDiscountEnd(TypedDict): + duration: NotRequired[ + "QuoteModifyParamsLineItemDiscountDiscountEndDuration" + ] + """ + Time span for the redeemed discount. + """ + timestamp: NotRequired[int] + """ + A precise Unix timestamp for the discount to end. Must be in the future. + """ + type: Literal["duration", "timestamp"] + """ + The type of calculation made to determine when the discount ends. + """ + + +class QuoteModifyParamsLineItemDiscountDiscountEndDuration(TypedDict): + interval: Literal["day", "month", "week", "year"] + """ + Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + """ + interval_count: int + """ + The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + """ + + +class QuoteModifyParamsLineItemPriceData(TypedDict): + 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). + """ + product: str + """ + The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to. + """ + recurring: NotRequired["QuoteModifyParamsLineItemPriceDataRecurring"] + """ + The recurring components of a price such as `interval` and `interval_count`. + """ + tax_behavior: NotRequired[Literal["exclusive", "inclusive", "unspecified"]] + """ + Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + """ + unit_amount: NotRequired[int] + """ + A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + """ + unit_amount_decimal: NotRequired[str] + """ + Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + """ + + +class QuoteModifyParamsLineItemPriceDataRecurring(TypedDict): + interval: Literal["day", "month", "week", "year"] + """ + Specifies billing frequency. Either `day`, `week`, `month` or `year`. + """ + interval_count: NotRequired[int] + """ + The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). + """ + + +class QuoteModifyParamsLine(TypedDict): + actions: NotRequired[List["QuoteModifyParamsLineAction"]] + """ + An array of operations the quote line performs. + """ + applies_to: NotRequired["QuoteModifyParamsLineAppliesTo"] + """ + Details to identify the subscription schedule the quote line applies to. + """ + billing_cycle_anchor: NotRequired[Literal["automatic", "line_starts_at"]] + """ + For point-in-time quote lines (having no `ends_at` timestamp), this attribute lets you set or remove whether the subscription's billing cycle anchor is reset at the Quote Line `starts_at` timestamp.For time-span based quote lines (having both `starts_at` and `ends_at`), the only valid value is `automatic`, which removes any previously configured billing cycle anchor resets during the window of time spanning the quote line. + """ + cancel_subscription_schedule: NotRequired[ + "QuoteModifyParamsLineCancelSubscriptionSchedule" + ] + """ + A point-in-time operation that cancels an existing subscription schedule at the line's starts_at timestamp. Currently only compatible with `quote_acceptance_date` for `starts_at`. When using cancel_subscription_schedule, the subscription schedule on the quote remains unalterable, except for modifications to the metadata, collection_method or invoice_settings. + """ + ends_at: NotRequired["QuoteModifyParamsLineEndsAt"] + """ + Details to identify the end of the time range modified by the proposed change. If not supplied, the quote line is considered a point-in-time operation that only affects the exact timestamp at `starts_at`, and a restricted set of attributes is supported on the quote line. + """ + id: NotRequired[str] + """ + The ID of an existing line on the quote. + """ + proration_behavior: NotRequired[ + Literal["always_invoice", "create_prorations", "none"] + ] + """ + Changes to how Stripe handles prorations during the quote line's time span. Affects if and how prorations are created when a future phase starts. + """ + set_pause_collection: NotRequired[ + "QuoteModifyParamsLineSetPauseCollection" + ] + """ + Defines how to pause collection for the underlying subscription throughout the duration of the amendment. + """ + set_schedule_end: NotRequired[Literal["line_ends_at", "line_starts_at"]] + """ + Timestamp helper to end the underlying schedule early, based on the acompanying line's start or end date. + """ + starts_at: NotRequired["QuoteModifyParamsLineStartsAt"] + """ + Details to identify the earliest timestamp where the proposed change should take effect. + """ + trial_settings: NotRequired["QuoteModifyParamsLineTrialSettings"] + """ + Settings related to subscription trials. + """ + + +class QuoteModifyParamsLineAction(TypedDict): + add_discount: NotRequired["QuoteModifyParamsLineActionAddDiscount"] + """ + Details for the `add_discount` type. + """ + add_item: NotRequired["QuoteModifyParamsLineActionAddItem"] + """ + Details for the `add_item` type. + """ + add_metadata: NotRequired[Dict[str, str]] + """ + Details for the `add_metadata` type: specify a hash of key-value pairs. + """ + remove_discount: NotRequired["QuoteModifyParamsLineActionRemoveDiscount"] + """ + Details for the `remove_discount` type. + """ + remove_item: NotRequired["QuoteModifyParamsLineActionRemoveItem"] + """ + Details for the `remove_item` type. + """ + remove_metadata: NotRequired[List[str]] + """ + Details for the `remove_metadata` type: specify an array of metadata keys. + """ + set_discounts: NotRequired[List["QuoteModifyParamsLineActionSetDiscount"]] + """ + Details for the `set_discounts` type. + """ + set_items: NotRequired[List["QuoteModifyParamsLineActionSetItem"]] + """ + Details for the `set_items` type. + """ + set_metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Details for the `set_metadata` type: specify an array of key-value pairs. + """ + type: Literal[ + "add_discount", + "add_item", + "add_metadata", + "clear_discounts", + "clear_metadata", + "remove_discount", + "remove_item", + "remove_metadata", + "set_discounts", + "set_items", + "set_metadata", + ] + """ + The type of action the quote line performs. + """ + + +class QuoteModifyParamsLineActionAddDiscount(TypedDict): + coupon: NotRequired[str] + """ + The coupon code to redeem. + """ + discount: NotRequired[str] + """ + An ID of an existing discount for a coupon that was already redeemed. + """ + discount_end: NotRequired[ + "QuoteModifyParamsLineActionAddDiscountDiscountEnd" + ] + """ + Details to determine how long the discount should be applied for. + """ + index: NotRequired[int] + """ + The index, starting at 0, at which to position the new discount. When not supplied, Stripe defaults to appending the discount to the end of the `discounts` array. + """ + promotion_code: NotRequired[str] + """ + The promotion code to redeem. + """ + + +class QuoteModifyParamsLineActionAddDiscountDiscountEnd(TypedDict): + type: Literal["line_ends_at"] + """ + The type of calculation made to determine when the discount ends. + """ + + +class QuoteModifyParamsLineActionAddItem(TypedDict): + discounts: NotRequired[List["QuoteModifyParamsLineActionAddItemDiscount"]] + """ + The discounts applied to the item. Subscription item discounts are applied before subscription discounts. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + price: str + """ + The ID of the price object. + """ + quantity: NotRequired[int] + """ + Quantity for this item. + """ + tax_rates: NotRequired[List[str]] + """ + The tax rates that apply to this subscription item. When set, the `default_tax_rates` on the subscription do not apply to this `subscription_item`. + """ + trial: NotRequired["QuoteModifyParamsLineActionAddItemTrial"] + """ + Options that configure the trial on the subscription item. + """ + + +class QuoteModifyParamsLineActionAddItemDiscount(TypedDict): + coupon: NotRequired[str] + """ + ID of the coupon to create a new discount for. + """ + discount: NotRequired[str] + """ + ID of an existing discount on the object (or one of its ancestors) to reuse. + """ + discount_end: NotRequired[ + "QuoteModifyParamsLineActionAddItemDiscountDiscountEnd" + ] + """ + Details to determine how long the discount should be applied for. + """ + promotion_code: NotRequired[str] + """ + ID of the promotion code to create a new discount for. + """ + + +class QuoteModifyParamsLineActionAddItemDiscountDiscountEnd(TypedDict): + duration: NotRequired[ + "QuoteModifyParamsLineActionAddItemDiscountDiscountEndDuration" + ] + """ + Time span for the redeemed discount. + """ + timestamp: NotRequired[int] + """ + A precise Unix timestamp for the discount to end. Must be in the future. + """ + type: Literal["duration", "timestamp"] + """ + The type of calculation made to determine when the discount ends. + """ + + +class QuoteModifyParamsLineActionAddItemDiscountDiscountEndDuration(TypedDict): + interval: Literal["day", "month", "week", "year"] + """ + Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + """ + interval_count: int + """ + The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + """ + + +class QuoteModifyParamsLineActionAddItemTrial(TypedDict): + converts_to: NotRequired[List[str]] + """ + List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. + """ + type: Literal["free", "paid"] + """ + Determines the type of trial for this item. + """ + + +class QuoteModifyParamsLineActionRemoveDiscount(TypedDict): + coupon: NotRequired[str] + """ + The coupon code to remove from the `discounts` array. + """ + discount: NotRequired[str] + """ + The ID of a discount to remove from the `discounts` array. + """ + promotion_code: NotRequired[str] + """ + The ID of a promotion code to remove from the `discounts` array. + """ + + +class QuoteModifyParamsLineActionRemoveItem(TypedDict): + price: str + """ + ID of a price to remove. + """ + + +class QuoteModifyParamsLineActionSetDiscount(TypedDict): + coupon: NotRequired[str] + """ + The coupon code to replace the `discounts` array with. + """ + discount: NotRequired[str] + """ + An ID of an existing discount to replace the `discounts` array with. + """ + promotion_code: NotRequired[str] + """ + An ID of an existing promotion code to replace the `discounts` array with. + """ + + +class QuoteModifyParamsLineActionSetItem(TypedDict): + discounts: NotRequired[List["QuoteModifyParamsLineActionSetItemDiscount"]] + """ + If an item with the `price` already exists, passing this will override the `discounts` array on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `discounts`. + """ + metadata: NotRequired[Dict[str, str]] + """ + If an item with the `price` already exists, passing this will override the `metadata` on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `metadata`. + """ + price: str + """ + The ID of the price object. + """ + quantity: NotRequired[int] + """ + If an item with the `price` already exists, passing this will override the quantity on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `quantity`. + """ + tax_rates: NotRequired[List[str]] + """ + If an item with the `price` already exists, passing this will override the `tax_rates` array on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `tax_rates`. + """ + trial: NotRequired["QuoteModifyParamsLineActionSetItemTrial"] + """ + If an item with the `price` already exists, passing this will override the `trial` configuration on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `trial`. + """ + + +class QuoteModifyParamsLineActionSetItemDiscount(TypedDict): + coupon: NotRequired[str] + """ + ID of the coupon to create a new discount for. + """ + discount: NotRequired[str] + """ + ID of an existing discount on the object (or one of its ancestors) to reuse. + """ + discount_end: NotRequired[ + "QuoteModifyParamsLineActionSetItemDiscountDiscountEnd" + ] + """ + Details to determine how long the discount should be applied for. + """ + promotion_code: NotRequired[str] + """ + ID of the promotion code to create a new discount for. + """ + + +class QuoteModifyParamsLineActionSetItemDiscountDiscountEnd(TypedDict): + duration: NotRequired[ + "QuoteModifyParamsLineActionSetItemDiscountDiscountEndDuration" + ] + """ + Time span for the redeemed discount. + """ + timestamp: NotRequired[int] + """ + A precise Unix timestamp for the discount to end. Must be in the future. + """ + type: Literal["duration", "timestamp"] + """ + The type of calculation made to determine when the discount ends. + """ + + +class QuoteModifyParamsLineActionSetItemDiscountDiscountEndDuration(TypedDict): + interval: Literal["day", "month", "week", "year"] + """ + Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + """ + interval_count: int + """ + The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + """ + + +class QuoteModifyParamsLineActionSetItemTrial(TypedDict): + converts_to: NotRequired[List[str]] + """ + List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. + """ + type: Literal["free", "paid"] + """ + Determines the type of trial for this item. + """ + + +class QuoteModifyParamsLineAppliesTo(TypedDict): + new_reference: NotRequired[str] + """ + A custom string that identifies a new subscription schedule being created upon quote acceptance. All quote lines with the same `new_reference` field will be applied to the creation of a new subscription schedule. + """ + subscription_schedule: NotRequired[str] + """ + The ID of the schedule the line applies to. + """ + type: Literal["new_reference", "subscription_schedule"] + """ + Describes whether the quote line is affecting a new schedule or an existing schedule. + """ + + +class QuoteModifyParamsLineCancelSubscriptionSchedule(TypedDict): + cancel_at: Literal["line_starts_at"] + """ + Timestamp helper to cancel the underlying schedule on the accompanying line's start date. Must be set to `line_starts_at`. + """ + invoice_now: NotRequired[bool] + """ + If the subscription schedule is `active`, indicates if a final invoice will be generated that contains any un-invoiced metered usage and new/pending proration invoice items. Boolean that defaults to `true`. + """ + prorate: NotRequired[bool] + """ + If the subscription schedule is `active`, indicates if the cancellation should be prorated. Boolean that defaults to `true`. + """ + + +class QuoteModifyParamsLineEndsAt(TypedDict): + discount_end: NotRequired["QuoteModifyParamsLineEndsAtDiscountEnd"] + """ + Use the `end` time of a given discount. + """ + duration: NotRequired["QuoteModifyParamsLineEndsAtDuration"] + """ + Time span for the quote line starting from the `starts_at` date. + """ + timestamp: NotRequired[int] + """ + A precise Unix timestamp. + """ + type: Literal[ + "billing_period_end", + "discount_end", + "duration", + "quote_acceptance_date", + "schedule_end", + "timestamp", + "upcoming_invoice", + ] + """ + Select a way to pass in `ends_at`. + """ + + +class QuoteModifyParamsLineEndsAtDiscountEnd(TypedDict): + discount: str + """ + The ID of a specific discount. + """ + + +class QuoteModifyParamsLineEndsAtDuration(TypedDict): + interval: Literal["day", "month", "week", "year"] + """ + Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + """ + interval_count: int + """ + The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + """ + + +class QuoteModifyParamsLineSetPauseCollection(TypedDict): + set: NotRequired["QuoteModifyParamsLineSetPauseCollectionSet"] + """ + Details of the pause_collection behavior to apply to the amendment. + """ + type: Literal["remove", "set"] + """ + Determines the type of the pause_collection amendment. + """ + + +class QuoteModifyParamsLineSetPauseCollectionSet(TypedDict): + behavior: Literal["keep_as_draft", "mark_uncollectible", "void"] + """ + The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. + """ + + +class QuoteModifyParamsLineStartsAt(TypedDict): + discount_end: NotRequired["QuoteModifyParamsLineStartsAtDiscountEnd"] + """ + Use the `end` time of a given discount. + """ + line_ends_at: NotRequired["QuoteModifyParamsLineStartsAtLineEndsAt"] + """ + The timestamp the given line ends at. + """ + timestamp: NotRequired[int] + """ + A precise Unix timestamp. + """ + type: Literal[ + "discount_end", + "line_ends_at", + "now", + "quote_acceptance_date", + "schedule_end", + "timestamp", + "upcoming_invoice", + ] + """ + Select a way to pass in `starts_at`. + """ + + +class QuoteModifyParamsLineStartsAtDiscountEnd(TypedDict): + discount: str + """ + The ID of a specific discount. + """ + + +class QuoteModifyParamsLineStartsAtLineEndsAt(TypedDict): + id: NotRequired[str] + """ + The ID of a quote line. + """ + index: NotRequired[int] + """ + The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array. + """ + + +class QuoteModifyParamsLineTrialSettings(TypedDict): + end_behavior: NotRequired["QuoteModifyParamsLineTrialSettingsEndBehavior"] + """ + Defines how the subscription should behave when a trial ends. + """ + + +class QuoteModifyParamsLineTrialSettingsEndBehavior(TypedDict): + prorate_up_front: NotRequired[Literal["defer", "include"]] + """ + Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`. + """ + + +class QuoteModifyParamsSubscriptionData(TypedDict): + bill_on_acceptance: NotRequired[ + "Literal['']|QuoteModifyParamsSubscriptionDataBillOnAcceptance" + ] + """ + Describes the period to bill for upon accepting the quote. + """ + billing_behavior: NotRequired[ + Literal["prorate_on_next_phase", "prorate_up_front"] + ] + """ + Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front. + """ + billing_cycle_anchor: NotRequired["Literal['']|Literal['reset']"] + """ + When specified as `reset`, the subscription will always start a new billing period when the quote is accepted. + """ + description: NotRequired["Literal['']|str"] + """ + The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. + """ + effective_date: NotRequired[ + "Literal['']|Literal['current_period_end']|int" + ] + """ + When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. When updating a subscription, the date of which the subscription will be updated using a subscription schedule. The special value `current_period_end` can be provided to update a subscription at the end of its current period. The `effective_date` is ignored if it is in the past when the quote is accepted. + """ + end_behavior: NotRequired[Literal["cancel", "release"]] + """ + Behavior of the subscription schedule and underlying subscription when it ends. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will set metadata on the subscription or subscription schedule when the quote is accepted. If a recurring price is included in `line_items`, this field will be passed to the resulting subscription's `metadata` field. If `subscription_data.effective_date` is used, this field will be passed to the resulting subscription schedule's `phases.metadata` field. Unlike object-level metadata, this field is declarative. Updates will clear prior values. + """ + prebilling: NotRequired[ + "Literal['']|QuoteModifyParamsSubscriptionDataPrebilling" + ] + """ + If specified, the invoicing for the given billing cycle iterations will be processed when the quote is accepted. Cannot be used with `effective_date`. + """ + proration_behavior: NotRequired[ + Literal["always_invoice", "create_prorations", "none"] + ] + """ + Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations). When creating a subscription, valid values are `create_prorations` or `none`. + + When updating a subscription, valid values are `create_prorations`, `none`, or `always_invoice`. + + Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`. + + Prorations can be disabled by passing `none`. + """ + trial_period_days: NotRequired["Literal['']|int"] + """ + Integer representing the number of trial period days before the customer is charged for the first time. + """ + + +class QuoteModifyParamsSubscriptionDataBillOnAcceptance(TypedDict): + bill_from: NotRequired[ + "QuoteModifyParamsSubscriptionDataBillOnAcceptanceBillFrom" + ] + """ + The start of the period to bill from when the Quote is accepted. + """ + bill_until: NotRequired[ + "QuoteModifyParamsSubscriptionDataBillOnAcceptanceBillUntil" + ] + """ + The end of the period to bill until when the Quote is accepted. + """ + + +class QuoteModifyParamsSubscriptionDataBillOnAcceptanceBillFrom(TypedDict): + line_starts_at: NotRequired[ + "QuoteModifyParamsSubscriptionDataBillOnAcceptanceBillFromLineStartsAt" + ] + """ + Details of a Quote line to start the bill period from. + """ + timestamp: NotRequired[int] + """ + A precise Unix timestamp. + """ + type: Literal[ + "line_starts_at", + "now", + "pause_collection_start", + "quote_acceptance_date", + "timestamp", + ] + """ + The type of method to specify the `bill_from` time. + """ + + +class QuoteModifyParamsSubscriptionDataBillOnAcceptanceBillFromLineStartsAt( + TypedDict, +): + id: NotRequired[str] + """ + The ID of a quote line. + """ + index: NotRequired[int] + """ + The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array. + """ + + +class QuoteModifyParamsSubscriptionDataBillOnAcceptanceBillUntil(TypedDict): + duration: NotRequired[ + "QuoteModifyParamsSubscriptionDataBillOnAcceptanceBillUntilDuration" + ] + """ + Details of the duration over which to bill. + """ + line_ends_at: NotRequired[ + "QuoteModifyParamsSubscriptionDataBillOnAcceptanceBillUntilLineEndsAt" + ] + """ + Details of a Quote line item from which to bill until. + """ + timestamp: NotRequired[int] + """ + A precise Unix timestamp. + """ + type: Literal[ + "duration", + "line_ends_at", + "schedule_end", + "timestamp", + "upcoming_invoice", + ] + """ + The type of method to specify the `bill_until` time. + """ + + +class QuoteModifyParamsSubscriptionDataBillOnAcceptanceBillUntilDuration( + TypedDict, +): + interval: Literal["day", "month", "week", "year"] + """ + Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + """ + interval_count: int + """ + The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + """ + + +class QuoteModifyParamsSubscriptionDataBillOnAcceptanceBillUntilLineEndsAt( + TypedDict, +): + id: NotRequired[str] + """ + The ID of a quote line. + """ + index: NotRequired[int] + """ + The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array. + """ + + +class QuoteModifyParamsSubscriptionDataPrebilling(TypedDict): + iterations: int + """ + This is used to determine the number of billing cycles to prebill. + """ + + +class QuoteModifyParamsSubscriptionDataOverride(TypedDict): + applies_to: "QuoteModifyParamsSubscriptionDataOverrideAppliesTo" + """ + Whether the override applies to an existing Subscription Schedule or a new Subscription Schedule. + """ + bill_on_acceptance: NotRequired[ + "Literal['']|QuoteModifyParamsSubscriptionDataOverrideBillOnAcceptance" + ] + """ + Describes the period to bill for upon accepting the quote. + """ + billing_behavior: NotRequired[ + Literal["prorate_on_next_phase", "prorate_up_front"] + ] + """ + Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front. + """ + customer: NotRequired[str] + """ + The customer the Subscription Data override applies to. + """ + description: NotRequired["Literal['']|str"] + """ + The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. + """ + end_behavior: NotRequired[Literal["cancel", "release"]] + """ + Behavior of the subscription schedule and underlying subscription when it ends. + """ + proration_behavior: NotRequired[ + Literal["always_invoice", "create_prorations", "none"] + ] + """ + Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations). When creating a subscription, valid values are `create_prorations` or `none`. + + When updating a subscription, valid values are `create_prorations`, `none`, or `always_invoice`. + + Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`. + + Prorations can be disabled by passing `none`. + """ + + +class QuoteModifyParamsSubscriptionDataOverrideAppliesTo(TypedDict): + new_reference: NotRequired[str] + """ + A custom string that identifies a new subscription schedule being created upon quote acceptance. All quote lines with the same `new_reference` field will be applied to the creation of a new subscription schedule. + """ + subscription_schedule: NotRequired[str] + """ + The ID of the schedule the line applies to. + """ + type: Literal["new_reference", "subscription_schedule"] + """ + Describes whether the quote line is affecting a new schedule or an existing schedule. + """ + + +class QuoteModifyParamsSubscriptionDataOverrideBillOnAcceptance(TypedDict): + bill_from: NotRequired[ + "QuoteModifyParamsSubscriptionDataOverrideBillOnAcceptanceBillFrom" + ] + """ + The start of the period to bill from when the Quote is accepted. + """ + bill_until: NotRequired[ + "QuoteModifyParamsSubscriptionDataOverrideBillOnAcceptanceBillUntil" + ] + """ + The end of the period to bill until when the Quote is accepted. + """ + + +class QuoteModifyParamsSubscriptionDataOverrideBillOnAcceptanceBillFrom( + TypedDict, +): + line_starts_at: NotRequired[ + "QuoteModifyParamsSubscriptionDataOverrideBillOnAcceptanceBillFromLineStartsAt" + ] + """ + Details of a Quote line to start the bill period from. + """ + timestamp: NotRequired[int] + """ + A precise Unix timestamp. + """ + type: Literal[ + "line_starts_at", + "now", + "pause_collection_start", + "quote_acceptance_date", + "timestamp", + ] + """ + The type of method to specify the `bill_from` time. + """ + + +class QuoteModifyParamsSubscriptionDataOverrideBillOnAcceptanceBillFromLineStartsAt( + TypedDict, +): + id: NotRequired[str] + """ + The ID of a quote line. + """ + index: NotRequired[int] + """ + The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array. + """ + + +class QuoteModifyParamsSubscriptionDataOverrideBillOnAcceptanceBillUntil( + TypedDict, +): + duration: NotRequired[ + "QuoteModifyParamsSubscriptionDataOverrideBillOnAcceptanceBillUntilDuration" + ] + """ + Details of the duration over which to bill. + """ + line_ends_at: NotRequired[ + "QuoteModifyParamsSubscriptionDataOverrideBillOnAcceptanceBillUntilLineEndsAt" + ] + """ + Details of a Quote line item from which to bill until. + """ + timestamp: NotRequired[int] + """ + A precise Unix timestamp. + """ + type: Literal[ + "duration", + "line_ends_at", + "schedule_end", + "timestamp", + "upcoming_invoice", + ] + """ + The type of method to specify the `bill_until` time. + """ + + +class QuoteModifyParamsSubscriptionDataOverrideBillOnAcceptanceBillUntilDuration( + TypedDict, +): + interval: Literal["day", "month", "week", "year"] + """ + Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + """ + interval_count: int + """ + The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + """ + + +class QuoteModifyParamsSubscriptionDataOverrideBillOnAcceptanceBillUntilLineEndsAt( + TypedDict, +): + id: NotRequired[str] + """ + The ID of a quote line. + """ + index: NotRequired[int] + """ + The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array. + """ + + +class QuoteModifyParamsTransferData(TypedDict): + amount: NotRequired[int] + """ + The amount that will be transferred automatically when the invoice is paid. If no amount is set, the full amount is transferred. There cannot be any line items with recurring prices when using this field. + """ + amount_percent: NotRequired[float] + """ + A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. There must be at least 1 line item with a recurring price to use this field. + """ + destination: str + """ + ID of an existing, connected Stripe account. + """ diff --git a/stripe/params/_quote_pdf_params.py b/stripe/params/_quote_pdf_params.py new file mode 100644 index 000000000..2ac05dbfb --- /dev/null +++ b/stripe/params/_quote_pdf_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 QuotePdfParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_quote_preview_invoice_list_params.py b/stripe/params/_quote_preview_invoice_list_params.py new file mode 100644 index 000000000..8462b992c --- /dev/null +++ b/stripe/params/_quote_preview_invoice_list_params.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import NotRequired, TypedDict + + +class QuotePreviewInvoiceListParams(TypedDict): + 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. + """ diff --git a/stripe/params/_quote_preview_subscription_schedule_list_params.py b/stripe/params/_quote_preview_subscription_schedule_list_params.py new file mode 100644 index 000000000..1b30957f8 --- /dev/null +++ b/stripe/params/_quote_preview_subscription_schedule_list_params.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import NotRequired, TypedDict + + +class QuotePreviewSubscriptionScheduleListParams(TypedDict): + 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. + """ diff --git a/stripe/params/_quote_reestimate_params.py b/stripe/params/_quote_reestimate_params.py new file mode 100644 index 000000000..a4110e28b --- /dev/null +++ b/stripe/params/_quote_reestimate_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 QuoteReestimateParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_quote_retrieve_params.py b/stripe/params/_quote_retrieve_params.py new file mode 100644 index 000000000..744ea9ed3 --- /dev/null +++ b/stripe/params/_quote_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 QuoteRetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_quote_update_params.py b/stripe/params/_quote_update_params.py new file mode 100644 index 000000000..5e0406b44 --- /dev/null +++ b/stripe/params/_quote_update_params.py @@ -0,0 +1,1160 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class QuoteUpdateParams(TypedDict): + allow_backdated_lines: NotRequired[bool] + """ + Set to true to allow quote lines to have `starts_at` in the past if collection is paused between `starts_at` and now. + """ + application_fee_amount: NotRequired["Literal['']|int"] + """ + The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. There cannot be any line items with recurring prices when using this field. + """ + application_fee_percent: NotRequired["Literal['']|float"] + """ + A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. There must be at least 1 line item with a recurring price to use this field. + """ + automatic_tax: NotRequired["QuoteUpdateParamsAutomaticTax"] + """ + Settings for automatic tax lookup for this quote and resulting invoices and subscriptions. + """ + collection_method: NotRequired[ + Literal["charge_automatically", "send_invoice"] + ] + """ + Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay invoices at the end of the subscription cycle or at invoice finalization using the default payment method attached to the subscription or customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`. + """ + customer: NotRequired[str] + """ + The customer for which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed. + """ + customer_account: NotRequired[str] + """ + The account for which this quote belongs to. A customer or account is required before finalizing the quote. Once specified, it cannot be changed. + """ + default_tax_rates: NotRequired["Literal['']|List[str]"] + """ + The tax rates that will apply to any line item that does not have `tax_rates` set. + """ + description: NotRequired["Literal['']|str"] + """ + A description that will be displayed on the quote PDF. + """ + discounts: NotRequired["Literal['']|List[QuoteUpdateParamsDiscount]"] + """ + The discounts applied to the quote. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + expires_at: NotRequired[int] + """ + A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch. + """ + footer: NotRequired["Literal['']|str"] + """ + A footer that will be displayed on the quote PDF. + """ + header: NotRequired["Literal['']|str"] + """ + A header that will be displayed on the quote PDF. + """ + invoice_settings: NotRequired["QuoteUpdateParamsInvoiceSettings"] + """ + All invoices will be billed using the specified settings. + """ + line_items: NotRequired[List["QuoteUpdateParamsLineItem"]] + """ + A list of line items the customer is being quoted for. Each line item includes information about the product, the quantity, and the resulting cost. + """ + lines: NotRequired[List["QuoteUpdateParamsLine"]] + """ + A list of [quote lines](https://docs.stripe.com/api/quote_lines) on the quote. These lines describe changes, in the order provided, that will be used to create new subscription schedules or update existing subscription schedules when the quote is accepted. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + on_behalf_of: NotRequired["Literal['']|str"] + """ + The account on behalf of which to charge. + """ + subscription_data: NotRequired["QuoteUpdateParamsSubscriptionData"] + """ + When creating a subscription or subscription schedule, the specified configuration data will be used. There must be at least one line item with a recurring price for a subscription or subscription schedule to be created. A subscription schedule is created if `subscription_data[effective_date]` is present and in the future, otherwise a subscription is created. + """ + subscription_data_overrides: NotRequired[ + "Literal['']|List[QuoteUpdateParamsSubscriptionDataOverride]" + ] + """ + List representing overrides for `subscription_data` configurations for specific subscription schedules. + """ + transfer_data: NotRequired["Literal['']|QuoteUpdateParamsTransferData"] + """ + The data with which to automatically create a Transfer for each of the invoices. + """ + + +class QuoteUpdateParamsAutomaticTax(TypedDict): + enabled: bool + """ + Controls whether Stripe will automatically compute tax on the resulting invoices or subscriptions as well as the quote itself. + """ + liability: NotRequired["QuoteUpdateParamsAutomaticTaxLiability"] + """ + The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + """ + + +class QuoteUpdateParamsAutomaticTaxLiability(TypedDict): + account: NotRequired[str] + """ + The connected account being referenced when `type` is `account`. + """ + type: Literal["account", "self"] + """ + Type of the account referenced in the request. + """ + + +class QuoteUpdateParamsDiscount(TypedDict): + coupon: NotRequired[str] + """ + ID of the coupon to create a new discount for. + """ + discount: NotRequired[str] + """ + ID of an existing discount on the object (or one of its ancestors) to reuse. + """ + discount_end: NotRequired["QuoteUpdateParamsDiscountDiscountEnd"] + """ + Details to determine how long the discount should be applied for. + """ + promotion_code: NotRequired[str] + """ + ID of the promotion code to create a new discount for. + """ + + +class QuoteUpdateParamsDiscountDiscountEnd(TypedDict): + duration: NotRequired["QuoteUpdateParamsDiscountDiscountEndDuration"] + """ + Time span for the redeemed discount. + """ + timestamp: NotRequired[int] + """ + A precise Unix timestamp for the discount to end. Must be in the future. + """ + type: Literal["duration", "timestamp"] + """ + The type of calculation made to determine when the discount ends. + """ + + +class QuoteUpdateParamsDiscountDiscountEndDuration(TypedDict): + interval: Literal["day", "month", "week", "year"] + """ + Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + """ + interval_count: int + """ + The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + """ + + +class QuoteUpdateParamsInvoiceSettings(TypedDict): + days_until_due: NotRequired[int] + """ + Number of days within which a customer must pay the invoice generated by this quote. This value will be `null` for quotes where `collection_method=charge_automatically`. + """ + issuer: NotRequired["QuoteUpdateParamsInvoiceSettingsIssuer"] + """ + The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + """ + + +class QuoteUpdateParamsInvoiceSettingsIssuer(TypedDict): + account: NotRequired[str] + """ + The connected account being referenced when `type` is `account`. + """ + type: Literal["account", "self"] + """ + Type of the account referenced in the request. + """ + + +class QuoteUpdateParamsLineItem(TypedDict): + discounts: NotRequired[ + "Literal['']|List[QuoteUpdateParamsLineItemDiscount]" + ] + """ + The discounts applied to this line item. + """ + id: NotRequired[str] + """ + The ID of an existing line item on the quote. + """ + price: NotRequired[str] + """ + The ID of the price object. One of `price` or `price_data` is required. + """ + price_data: NotRequired["QuoteUpdateParamsLineItemPriceData"] + """ + Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. + """ + quantity: NotRequired[int] + """ + The quantity of the line item. + """ + tax_rates: NotRequired["Literal['']|List[str]"] + """ + The tax rates which apply to the line item. When set, the `default_tax_rates` on the quote do not apply to this line item. + """ + + +class QuoteUpdateParamsLineItemDiscount(TypedDict): + coupon: NotRequired[str] + """ + ID of the coupon to create a new discount for. + """ + discount: NotRequired[str] + """ + ID of an existing discount on the object (or one of its ancestors) to reuse. + """ + discount_end: NotRequired["QuoteUpdateParamsLineItemDiscountDiscountEnd"] + """ + Details to determine how long the discount should be applied for. + """ + promotion_code: NotRequired[str] + """ + ID of the promotion code to create a new discount for. + """ + + +class QuoteUpdateParamsLineItemDiscountDiscountEnd(TypedDict): + duration: NotRequired[ + "QuoteUpdateParamsLineItemDiscountDiscountEndDuration" + ] + """ + Time span for the redeemed discount. + """ + timestamp: NotRequired[int] + """ + A precise Unix timestamp for the discount to end. Must be in the future. + """ + type: Literal["duration", "timestamp"] + """ + The type of calculation made to determine when the discount ends. + """ + + +class QuoteUpdateParamsLineItemDiscountDiscountEndDuration(TypedDict): + interval: Literal["day", "month", "week", "year"] + """ + Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + """ + interval_count: int + """ + The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + """ + + +class QuoteUpdateParamsLineItemPriceData(TypedDict): + 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). + """ + product: str + """ + The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to. + """ + recurring: NotRequired["QuoteUpdateParamsLineItemPriceDataRecurring"] + """ + The recurring components of a price such as `interval` and `interval_count`. + """ + tax_behavior: NotRequired[Literal["exclusive", "inclusive", "unspecified"]] + """ + Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + """ + unit_amount: NotRequired[int] + """ + A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + """ + unit_amount_decimal: NotRequired[str] + """ + Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + """ + + +class QuoteUpdateParamsLineItemPriceDataRecurring(TypedDict): + interval: Literal["day", "month", "week", "year"] + """ + Specifies billing frequency. Either `day`, `week`, `month` or `year`. + """ + interval_count: NotRequired[int] + """ + The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). + """ + + +class QuoteUpdateParamsLine(TypedDict): + actions: NotRequired[List["QuoteUpdateParamsLineAction"]] + """ + An array of operations the quote line performs. + """ + applies_to: NotRequired["QuoteUpdateParamsLineAppliesTo"] + """ + Details to identify the subscription schedule the quote line applies to. + """ + billing_cycle_anchor: NotRequired[Literal["automatic", "line_starts_at"]] + """ + For point-in-time quote lines (having no `ends_at` timestamp), this attribute lets you set or remove whether the subscription's billing cycle anchor is reset at the Quote Line `starts_at` timestamp.For time-span based quote lines (having both `starts_at` and `ends_at`), the only valid value is `automatic`, which removes any previously configured billing cycle anchor resets during the window of time spanning the quote line. + """ + cancel_subscription_schedule: NotRequired[ + "QuoteUpdateParamsLineCancelSubscriptionSchedule" + ] + """ + A point-in-time operation that cancels an existing subscription schedule at the line's starts_at timestamp. Currently only compatible with `quote_acceptance_date` for `starts_at`. When using cancel_subscription_schedule, the subscription schedule on the quote remains unalterable, except for modifications to the metadata, collection_method or invoice_settings. + """ + ends_at: NotRequired["QuoteUpdateParamsLineEndsAt"] + """ + Details to identify the end of the time range modified by the proposed change. If not supplied, the quote line is considered a point-in-time operation that only affects the exact timestamp at `starts_at`, and a restricted set of attributes is supported on the quote line. + """ + id: NotRequired[str] + """ + The ID of an existing line on the quote. + """ + proration_behavior: NotRequired[ + Literal["always_invoice", "create_prorations", "none"] + ] + """ + Changes to how Stripe handles prorations during the quote line's time span. Affects if and how prorations are created when a future phase starts. + """ + set_pause_collection: NotRequired[ + "QuoteUpdateParamsLineSetPauseCollection" + ] + """ + Defines how to pause collection for the underlying subscription throughout the duration of the amendment. + """ + set_schedule_end: NotRequired[Literal["line_ends_at", "line_starts_at"]] + """ + Timestamp helper to end the underlying schedule early, based on the acompanying line's start or end date. + """ + starts_at: NotRequired["QuoteUpdateParamsLineStartsAt"] + """ + Details to identify the earliest timestamp where the proposed change should take effect. + """ + trial_settings: NotRequired["QuoteUpdateParamsLineTrialSettings"] + """ + Settings related to subscription trials. + """ + + +class QuoteUpdateParamsLineAction(TypedDict): + add_discount: NotRequired["QuoteUpdateParamsLineActionAddDiscount"] + """ + Details for the `add_discount` type. + """ + add_item: NotRequired["QuoteUpdateParamsLineActionAddItem"] + """ + Details for the `add_item` type. + """ + add_metadata: NotRequired[Dict[str, str]] + """ + Details for the `add_metadata` type: specify a hash of key-value pairs. + """ + remove_discount: NotRequired["QuoteUpdateParamsLineActionRemoveDiscount"] + """ + Details for the `remove_discount` type. + """ + remove_item: NotRequired["QuoteUpdateParamsLineActionRemoveItem"] + """ + Details for the `remove_item` type. + """ + remove_metadata: NotRequired[List[str]] + """ + Details for the `remove_metadata` type: specify an array of metadata keys. + """ + set_discounts: NotRequired[List["QuoteUpdateParamsLineActionSetDiscount"]] + """ + Details for the `set_discounts` type. + """ + set_items: NotRequired[List["QuoteUpdateParamsLineActionSetItem"]] + """ + Details for the `set_items` type. + """ + set_metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Details for the `set_metadata` type: specify an array of key-value pairs. + """ + type: Literal[ + "add_discount", + "add_item", + "add_metadata", + "clear_discounts", + "clear_metadata", + "remove_discount", + "remove_item", + "remove_metadata", + "set_discounts", + "set_items", + "set_metadata", + ] + """ + The type of action the quote line performs. + """ + + +class QuoteUpdateParamsLineActionAddDiscount(TypedDict): + coupon: NotRequired[str] + """ + The coupon code to redeem. + """ + discount: NotRequired[str] + """ + An ID of an existing discount for a coupon that was already redeemed. + """ + discount_end: NotRequired[ + "QuoteUpdateParamsLineActionAddDiscountDiscountEnd" + ] + """ + Details to determine how long the discount should be applied for. + """ + index: NotRequired[int] + """ + The index, starting at 0, at which to position the new discount. When not supplied, Stripe defaults to appending the discount to the end of the `discounts` array. + """ + promotion_code: NotRequired[str] + """ + The promotion code to redeem. + """ + + +class QuoteUpdateParamsLineActionAddDiscountDiscountEnd(TypedDict): + type: Literal["line_ends_at"] + """ + The type of calculation made to determine when the discount ends. + """ + + +class QuoteUpdateParamsLineActionAddItem(TypedDict): + discounts: NotRequired[List["QuoteUpdateParamsLineActionAddItemDiscount"]] + """ + The discounts applied to the item. Subscription item discounts are applied before subscription discounts. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + price: str + """ + The ID of the price object. + """ + quantity: NotRequired[int] + """ + Quantity for this item. + """ + tax_rates: NotRequired[List[str]] + """ + The tax rates that apply to this subscription item. When set, the `default_tax_rates` on the subscription do not apply to this `subscription_item`. + """ + trial: NotRequired["QuoteUpdateParamsLineActionAddItemTrial"] + """ + Options that configure the trial on the subscription item. + """ + + +class QuoteUpdateParamsLineActionAddItemDiscount(TypedDict): + coupon: NotRequired[str] + """ + ID of the coupon to create a new discount for. + """ + discount: NotRequired[str] + """ + ID of an existing discount on the object (or one of its ancestors) to reuse. + """ + discount_end: NotRequired[ + "QuoteUpdateParamsLineActionAddItemDiscountDiscountEnd" + ] + """ + Details to determine how long the discount should be applied for. + """ + promotion_code: NotRequired[str] + """ + ID of the promotion code to create a new discount for. + """ + + +class QuoteUpdateParamsLineActionAddItemDiscountDiscountEnd(TypedDict): + duration: NotRequired[ + "QuoteUpdateParamsLineActionAddItemDiscountDiscountEndDuration" + ] + """ + Time span for the redeemed discount. + """ + timestamp: NotRequired[int] + """ + A precise Unix timestamp for the discount to end. Must be in the future. + """ + type: Literal["duration", "timestamp"] + """ + The type of calculation made to determine when the discount ends. + """ + + +class QuoteUpdateParamsLineActionAddItemDiscountDiscountEndDuration(TypedDict): + interval: Literal["day", "month", "week", "year"] + """ + Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + """ + interval_count: int + """ + The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + """ + + +class QuoteUpdateParamsLineActionAddItemTrial(TypedDict): + converts_to: NotRequired[List[str]] + """ + List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. + """ + type: Literal["free", "paid"] + """ + Determines the type of trial for this item. + """ + + +class QuoteUpdateParamsLineActionRemoveDiscount(TypedDict): + coupon: NotRequired[str] + """ + The coupon code to remove from the `discounts` array. + """ + discount: NotRequired[str] + """ + The ID of a discount to remove from the `discounts` array. + """ + promotion_code: NotRequired[str] + """ + The ID of a promotion code to remove from the `discounts` array. + """ + + +class QuoteUpdateParamsLineActionRemoveItem(TypedDict): + price: str + """ + ID of a price to remove. + """ + + +class QuoteUpdateParamsLineActionSetDiscount(TypedDict): + coupon: NotRequired[str] + """ + The coupon code to replace the `discounts` array with. + """ + discount: NotRequired[str] + """ + An ID of an existing discount to replace the `discounts` array with. + """ + promotion_code: NotRequired[str] + """ + An ID of an existing promotion code to replace the `discounts` array with. + """ + + +class QuoteUpdateParamsLineActionSetItem(TypedDict): + discounts: NotRequired[List["QuoteUpdateParamsLineActionSetItemDiscount"]] + """ + If an item with the `price` already exists, passing this will override the `discounts` array on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `discounts`. + """ + metadata: NotRequired[Dict[str, str]] + """ + If an item with the `price` already exists, passing this will override the `metadata` on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `metadata`. + """ + price: str + """ + The ID of the price object. + """ + quantity: NotRequired[int] + """ + If an item with the `price` already exists, passing this will override the quantity on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `quantity`. + """ + tax_rates: NotRequired[List[str]] + """ + If an item with the `price` already exists, passing this will override the `tax_rates` array on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `tax_rates`. + """ + trial: NotRequired["QuoteUpdateParamsLineActionSetItemTrial"] + """ + If an item with the `price` already exists, passing this will override the `trial` configuration on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `trial`. + """ + + +class QuoteUpdateParamsLineActionSetItemDiscount(TypedDict): + coupon: NotRequired[str] + """ + ID of the coupon to create a new discount for. + """ + discount: NotRequired[str] + """ + ID of an existing discount on the object (or one of its ancestors) to reuse. + """ + discount_end: NotRequired[ + "QuoteUpdateParamsLineActionSetItemDiscountDiscountEnd" + ] + """ + Details to determine how long the discount should be applied for. + """ + promotion_code: NotRequired[str] + """ + ID of the promotion code to create a new discount for. + """ + + +class QuoteUpdateParamsLineActionSetItemDiscountDiscountEnd(TypedDict): + duration: NotRequired[ + "QuoteUpdateParamsLineActionSetItemDiscountDiscountEndDuration" + ] + """ + Time span for the redeemed discount. + """ + timestamp: NotRequired[int] + """ + A precise Unix timestamp for the discount to end. Must be in the future. + """ + type: Literal["duration", "timestamp"] + """ + The type of calculation made to determine when the discount ends. + """ + + +class QuoteUpdateParamsLineActionSetItemDiscountDiscountEndDuration(TypedDict): + interval: Literal["day", "month", "week", "year"] + """ + Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + """ + interval_count: int + """ + The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + """ + + +class QuoteUpdateParamsLineActionSetItemTrial(TypedDict): + converts_to: NotRequired[List[str]] + """ + List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. + """ + type: Literal["free", "paid"] + """ + Determines the type of trial for this item. + """ + + +class QuoteUpdateParamsLineAppliesTo(TypedDict): + new_reference: NotRequired[str] + """ + A custom string that identifies a new subscription schedule being created upon quote acceptance. All quote lines with the same `new_reference` field will be applied to the creation of a new subscription schedule. + """ + subscription_schedule: NotRequired[str] + """ + The ID of the schedule the line applies to. + """ + type: Literal["new_reference", "subscription_schedule"] + """ + Describes whether the quote line is affecting a new schedule or an existing schedule. + """ + + +class QuoteUpdateParamsLineCancelSubscriptionSchedule(TypedDict): + cancel_at: Literal["line_starts_at"] + """ + Timestamp helper to cancel the underlying schedule on the accompanying line's start date. Must be set to `line_starts_at`. + """ + invoice_now: NotRequired[bool] + """ + If the subscription schedule is `active`, indicates if a final invoice will be generated that contains any un-invoiced metered usage and new/pending proration invoice items. Boolean that defaults to `true`. + """ + prorate: NotRequired[bool] + """ + If the subscription schedule is `active`, indicates if the cancellation should be prorated. Boolean that defaults to `true`. + """ + + +class QuoteUpdateParamsLineEndsAt(TypedDict): + discount_end: NotRequired["QuoteUpdateParamsLineEndsAtDiscountEnd"] + """ + Use the `end` time of a given discount. + """ + duration: NotRequired["QuoteUpdateParamsLineEndsAtDuration"] + """ + Time span for the quote line starting from the `starts_at` date. + """ + timestamp: NotRequired[int] + """ + A precise Unix timestamp. + """ + type: Literal[ + "billing_period_end", + "discount_end", + "duration", + "quote_acceptance_date", + "schedule_end", + "timestamp", + "upcoming_invoice", + ] + """ + Select a way to pass in `ends_at`. + """ + + +class QuoteUpdateParamsLineEndsAtDiscountEnd(TypedDict): + discount: str + """ + The ID of a specific discount. + """ + + +class QuoteUpdateParamsLineEndsAtDuration(TypedDict): + interval: Literal["day", "month", "week", "year"] + """ + Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + """ + interval_count: int + """ + The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + """ + + +class QuoteUpdateParamsLineSetPauseCollection(TypedDict): + set: NotRequired["QuoteUpdateParamsLineSetPauseCollectionSet"] + """ + Details of the pause_collection behavior to apply to the amendment. + """ + type: Literal["remove", "set"] + """ + Determines the type of the pause_collection amendment. + """ + + +class QuoteUpdateParamsLineSetPauseCollectionSet(TypedDict): + behavior: Literal["keep_as_draft", "mark_uncollectible", "void"] + """ + The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. + """ + + +class QuoteUpdateParamsLineStartsAt(TypedDict): + discount_end: NotRequired["QuoteUpdateParamsLineStartsAtDiscountEnd"] + """ + Use the `end` time of a given discount. + """ + line_ends_at: NotRequired["QuoteUpdateParamsLineStartsAtLineEndsAt"] + """ + The timestamp the given line ends at. + """ + timestamp: NotRequired[int] + """ + A precise Unix timestamp. + """ + type: Literal[ + "discount_end", + "line_ends_at", + "now", + "quote_acceptance_date", + "schedule_end", + "timestamp", + "upcoming_invoice", + ] + """ + Select a way to pass in `starts_at`. + """ + + +class QuoteUpdateParamsLineStartsAtDiscountEnd(TypedDict): + discount: str + """ + The ID of a specific discount. + """ + + +class QuoteUpdateParamsLineStartsAtLineEndsAt(TypedDict): + id: NotRequired[str] + """ + The ID of a quote line. + """ + index: NotRequired[int] + """ + The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array. + """ + + +class QuoteUpdateParamsLineTrialSettings(TypedDict): + end_behavior: NotRequired["QuoteUpdateParamsLineTrialSettingsEndBehavior"] + """ + Defines how the subscription should behave when a trial ends. + """ + + +class QuoteUpdateParamsLineTrialSettingsEndBehavior(TypedDict): + prorate_up_front: NotRequired[Literal["defer", "include"]] + """ + Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`. + """ + + +class QuoteUpdateParamsSubscriptionData(TypedDict): + bill_on_acceptance: NotRequired[ + "Literal['']|QuoteUpdateParamsSubscriptionDataBillOnAcceptance" + ] + """ + Describes the period to bill for upon accepting the quote. + """ + billing_behavior: NotRequired[ + Literal["prorate_on_next_phase", "prorate_up_front"] + ] + """ + Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front. + """ + billing_cycle_anchor: NotRequired["Literal['']|Literal['reset']"] + """ + When specified as `reset`, the subscription will always start a new billing period when the quote is accepted. + """ + description: NotRequired["Literal['']|str"] + """ + The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. + """ + effective_date: NotRequired[ + "Literal['']|Literal['current_period_end']|int" + ] + """ + When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. When updating a subscription, the date of which the subscription will be updated using a subscription schedule. The special value `current_period_end` can be provided to update a subscription at the end of its current period. The `effective_date` is ignored if it is in the past when the quote is accepted. + """ + end_behavior: NotRequired[Literal["cancel", "release"]] + """ + Behavior of the subscription schedule and underlying subscription when it ends. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will set metadata on the subscription or subscription schedule when the quote is accepted. If a recurring price is included in `line_items`, this field will be passed to the resulting subscription's `metadata` field. If `subscription_data.effective_date` is used, this field will be passed to the resulting subscription schedule's `phases.metadata` field. Unlike object-level metadata, this field is declarative. Updates will clear prior values. + """ + prebilling: NotRequired[ + "Literal['']|QuoteUpdateParamsSubscriptionDataPrebilling" + ] + """ + If specified, the invoicing for the given billing cycle iterations will be processed when the quote is accepted. Cannot be used with `effective_date`. + """ + proration_behavior: NotRequired[ + Literal["always_invoice", "create_prorations", "none"] + ] + """ + Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations). When creating a subscription, valid values are `create_prorations` or `none`. + + When updating a subscription, valid values are `create_prorations`, `none`, or `always_invoice`. + + Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`. + + Prorations can be disabled by passing `none`. + """ + trial_period_days: NotRequired["Literal['']|int"] + """ + Integer representing the number of trial period days before the customer is charged for the first time. + """ + + +class QuoteUpdateParamsSubscriptionDataBillOnAcceptance(TypedDict): + bill_from: NotRequired[ + "QuoteUpdateParamsSubscriptionDataBillOnAcceptanceBillFrom" + ] + """ + The start of the period to bill from when the Quote is accepted. + """ + bill_until: NotRequired[ + "QuoteUpdateParamsSubscriptionDataBillOnAcceptanceBillUntil" + ] + """ + The end of the period to bill until when the Quote is accepted. + """ + + +class QuoteUpdateParamsSubscriptionDataBillOnAcceptanceBillFrom(TypedDict): + line_starts_at: NotRequired[ + "QuoteUpdateParamsSubscriptionDataBillOnAcceptanceBillFromLineStartsAt" + ] + """ + Details of a Quote line to start the bill period from. + """ + timestamp: NotRequired[int] + """ + A precise Unix timestamp. + """ + type: Literal[ + "line_starts_at", + "now", + "pause_collection_start", + "quote_acceptance_date", + "timestamp", + ] + """ + The type of method to specify the `bill_from` time. + """ + + +class QuoteUpdateParamsSubscriptionDataBillOnAcceptanceBillFromLineStartsAt( + TypedDict, +): + id: NotRequired[str] + """ + The ID of a quote line. + """ + index: NotRequired[int] + """ + The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array. + """ + + +class QuoteUpdateParamsSubscriptionDataBillOnAcceptanceBillUntil(TypedDict): + duration: NotRequired[ + "QuoteUpdateParamsSubscriptionDataBillOnAcceptanceBillUntilDuration" + ] + """ + Details of the duration over which to bill. + """ + line_ends_at: NotRequired[ + "QuoteUpdateParamsSubscriptionDataBillOnAcceptanceBillUntilLineEndsAt" + ] + """ + Details of a Quote line item from which to bill until. + """ + timestamp: NotRequired[int] + """ + A precise Unix timestamp. + """ + type: Literal[ + "duration", + "line_ends_at", + "schedule_end", + "timestamp", + "upcoming_invoice", + ] + """ + The type of method to specify the `bill_until` time. + """ + + +class QuoteUpdateParamsSubscriptionDataBillOnAcceptanceBillUntilDuration( + TypedDict, +): + interval: Literal["day", "month", "week", "year"] + """ + Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + """ + interval_count: int + """ + The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + """ + + +class QuoteUpdateParamsSubscriptionDataBillOnAcceptanceBillUntilLineEndsAt( + TypedDict, +): + id: NotRequired[str] + """ + The ID of a quote line. + """ + index: NotRequired[int] + """ + The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array. + """ + + +class QuoteUpdateParamsSubscriptionDataPrebilling(TypedDict): + iterations: int + """ + This is used to determine the number of billing cycles to prebill. + """ + + +class QuoteUpdateParamsSubscriptionDataOverride(TypedDict): + applies_to: "QuoteUpdateParamsSubscriptionDataOverrideAppliesTo" + """ + Whether the override applies to an existing Subscription Schedule or a new Subscription Schedule. + """ + bill_on_acceptance: NotRequired[ + "Literal['']|QuoteUpdateParamsSubscriptionDataOverrideBillOnAcceptance" + ] + """ + Describes the period to bill for upon accepting the quote. + """ + billing_behavior: NotRequired[ + Literal["prorate_on_next_phase", "prorate_up_front"] + ] + """ + Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front. + """ + customer: NotRequired[str] + """ + The customer the Subscription Data override applies to. + """ + description: NotRequired["Literal['']|str"] + """ + The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. + """ + end_behavior: NotRequired[Literal["cancel", "release"]] + """ + Behavior of the subscription schedule and underlying subscription when it ends. + """ + proration_behavior: NotRequired[ + Literal["always_invoice", "create_prorations", "none"] + ] + """ + Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations). When creating a subscription, valid values are `create_prorations` or `none`. + + When updating a subscription, valid values are `create_prorations`, `none`, or `always_invoice`. + + Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`. + + Prorations can be disabled by passing `none`. + """ + + +class QuoteUpdateParamsSubscriptionDataOverrideAppliesTo(TypedDict): + new_reference: NotRequired[str] + """ + A custom string that identifies a new subscription schedule being created upon quote acceptance. All quote lines with the same `new_reference` field will be applied to the creation of a new subscription schedule. + """ + subscription_schedule: NotRequired[str] + """ + The ID of the schedule the line applies to. + """ + type: Literal["new_reference", "subscription_schedule"] + """ + Describes whether the quote line is affecting a new schedule or an existing schedule. + """ + + +class QuoteUpdateParamsSubscriptionDataOverrideBillOnAcceptance(TypedDict): + bill_from: NotRequired[ + "QuoteUpdateParamsSubscriptionDataOverrideBillOnAcceptanceBillFrom" + ] + """ + The start of the period to bill from when the Quote is accepted. + """ + bill_until: NotRequired[ + "QuoteUpdateParamsSubscriptionDataOverrideBillOnAcceptanceBillUntil" + ] + """ + The end of the period to bill until when the Quote is accepted. + """ + + +class QuoteUpdateParamsSubscriptionDataOverrideBillOnAcceptanceBillFrom( + TypedDict, +): + line_starts_at: NotRequired[ + "QuoteUpdateParamsSubscriptionDataOverrideBillOnAcceptanceBillFromLineStartsAt" + ] + """ + Details of a Quote line to start the bill period from. + """ + timestamp: NotRequired[int] + """ + A precise Unix timestamp. + """ + type: Literal[ + "line_starts_at", + "now", + "pause_collection_start", + "quote_acceptance_date", + "timestamp", + ] + """ + The type of method to specify the `bill_from` time. + """ + + +class QuoteUpdateParamsSubscriptionDataOverrideBillOnAcceptanceBillFromLineStartsAt( + TypedDict, +): + id: NotRequired[str] + """ + The ID of a quote line. + """ + index: NotRequired[int] + """ + The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array. + """ + + +class QuoteUpdateParamsSubscriptionDataOverrideBillOnAcceptanceBillUntil( + TypedDict, +): + duration: NotRequired[ + "QuoteUpdateParamsSubscriptionDataOverrideBillOnAcceptanceBillUntilDuration" + ] + """ + Details of the duration over which to bill. + """ + line_ends_at: NotRequired[ + "QuoteUpdateParamsSubscriptionDataOverrideBillOnAcceptanceBillUntilLineEndsAt" + ] + """ + Details of a Quote line item from which to bill until. + """ + timestamp: NotRequired[int] + """ + A precise Unix timestamp. + """ + type: Literal[ + "duration", + "line_ends_at", + "schedule_end", + "timestamp", + "upcoming_invoice", + ] + """ + The type of method to specify the `bill_until` time. + """ + + +class QuoteUpdateParamsSubscriptionDataOverrideBillOnAcceptanceBillUntilDuration( + TypedDict, +): + interval: Literal["day", "month", "week", "year"] + """ + Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + """ + interval_count: int + """ + The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + """ + + +class QuoteUpdateParamsSubscriptionDataOverrideBillOnAcceptanceBillUntilLineEndsAt( + TypedDict, +): + id: NotRequired[str] + """ + The ID of a quote line. + """ + index: NotRequired[int] + """ + The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array. + """ + + +class QuoteUpdateParamsTransferData(TypedDict): + amount: NotRequired[int] + """ + The amount that will be transferred automatically when the invoice is paid. If no amount is set, the full amount is transferred. There cannot be any line items with recurring prices when using this field. + """ + amount_percent: NotRequired[float] + """ + A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. There must be at least 1 line item with a recurring price to use this field. + """ + destination: str + """ + ID of an existing, connected Stripe account. + """ diff --git a/stripe/params/_refund_cancel_params.py b/stripe/params/_refund_cancel_params.py new file mode 100644 index 000000000..277b3294e --- /dev/null +++ b/stripe/params/_refund_cancel_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 RefundCancelParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_refund_create_params.py b/stripe/params/_refund_create_params.py new file mode 100644 index 000000000..c8d7eac1b --- /dev/null +++ b/stripe/params/_refund_create_params.py @@ -0,0 +1,57 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import Literal, NotRequired + + +class RefundCreateParams(RequestOptions): + amount: NotRequired[int] + charge: NotRequired[str] + """ + The identifier of the charge to refund. + """ + currency: NotRequired[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). + """ + customer: NotRequired[str] + """ + Customer whose customer balance to refund from. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + instructions_email: NotRequired[str] + """ + For payment methods without native refund support (e.g., Konbini, PromptPay), use this email from the customer to receive refund instructions. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + origin: NotRequired[Literal["customer_balance"]] + """ + Origin of the refund + """ + payment_intent: NotRequired[str] + """ + The identifier of the PaymentIntent to refund. + """ + reason: NotRequired[ + Literal["duplicate", "fraudulent", "requested_by_customer"] + ] + """ + String indicating the reason for the refund. If set, possible values are `duplicate`, `fraudulent`, and `requested_by_customer`. If you believe the charge to be fraudulent, specifying `fraudulent` as the reason will add the associated card and email to your [block lists](https://stripe.com/docs/radar/lists), and will also help us improve our fraud detection algorithms. + """ + refund_application_fee: NotRequired[bool] + """ + Boolean indicating whether the application fee should be refunded when refunding this charge. If a full charge refund is given, the full application fee will be refunded. Otherwise, the application fee will be refunded in an amount proportional to the amount of the charge refunded. An application fee can be refunded only by the application that created the charge. + """ + reverse_transfer: NotRequired[bool] + """ + Boolean indicating whether the transfer should be reversed when refunding this charge. The transfer will be reversed proportionally to the amount being refunded (either the entire or partial amount). + + A transfer can be reversed only by the application that created the charge. + """ diff --git a/stripe/params/_refund_expire_params.py b/stripe/params/_refund_expire_params.py new file mode 100644 index 000000000..ae2ce2cc8 --- /dev/null +++ b/stripe/params/_refund_expire_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 RefundExpireParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_refund_list_params.py b/stripe/params/_refund_list_params.py new file mode 100644 index 000000000..e1d8aa2b2 --- /dev/null +++ b/stripe/params/_refund_list_params.py @@ -0,0 +1,55 @@ +# -*- 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 RefundListParams(RequestOptions): + charge: NotRequired[str] + """ + Only return refunds for the charge specified by this charge ID. + """ + created: NotRequired["RefundListParamsCreated|int"] + """ + Only return refunds that were created during the given date interval. + """ + 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. + """ + payment_intent: NotRequired[str] + """ + Only return refunds for the PaymentIntent specified by this ID. + """ + 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 RefundListParamsCreated(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/_refund_modify_params.py b/stripe/params/_refund_modify_params.py new file mode 100644 index 000000000..86df6e4ff --- /dev/null +++ b/stripe/params/_refund_modify_params.py @@ -0,0 +1,16 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import Literal, NotRequired + + +class RefundModifyParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ diff --git a/stripe/params/_refund_retrieve_params.py b/stripe/params/_refund_retrieve_params.py new file mode 100644 index 000000000..56741a7d1 --- /dev/null +++ b/stripe/params/_refund_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 RefundRetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_refund_update_params.py b/stripe/params/_refund_update_params.py new file mode 100644 index 000000000..615d175a3 --- /dev/null +++ b/stripe/params/_refund_update_params.py @@ -0,0 +1,15 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class RefundUpdateParams(TypedDict): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ diff --git a/stripe/params/_review_approve_params.py b/stripe/params/_review_approve_params.py new file mode 100644 index 000000000..c26e9f5b3 --- /dev/null +++ b/stripe/params/_review_approve_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 ReviewApproveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_review_list_params.py b/stripe/params/_review_list_params.py new file mode 100644 index 000000000..8590693df --- /dev/null +++ b/stripe/params/_review_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 ReviewListParams(RequestOptions): + created: NotRequired["ReviewListParamsCreated|int"] + """ + Only return reviews that were created during the given date interval. + """ + 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 ReviewListParamsCreated(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/_review_retrieve_params.py b/stripe/params/_review_retrieve_params.py new file mode 100644 index 000000000..7a1a3cabd --- /dev/null +++ b/stripe/params/_review_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 ReviewRetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_setup_attempt_list_params.py b/stripe/params/_setup_attempt_list_params.py new file mode 100644 index 000000000..afd60a4c6 --- /dev/null +++ b/stripe/params/_setup_attempt_list_params.py @@ -0,0 +1,54 @@ +# -*- 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 SetupAttemptListParams(RequestOptions): + created: NotRequired["SetupAttemptListParamsCreated|int"] + """ + A filter on the list, based on the object `created` field. The value + can be a string with an integer Unix timestamp or 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. + """ + setup_intent: str + """ + Only return SetupAttempts created by the SetupIntent specified by + this ID. + """ + 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 SetupAttemptListParamsCreated(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/_setup_intent_cancel_params.py b/stripe/params/_setup_intent_cancel_params.py new file mode 100644 index 000000000..76c796898 --- /dev/null +++ b/stripe/params/_setup_intent_cancel_params.py @@ -0,0 +1,18 @@ +# -*- 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 SetupIntentCancelParams(RequestOptions): + cancellation_reason: NotRequired[ + Literal["abandoned", "duplicate", "requested_by_customer"] + ] + """ + Reason for canceling this SetupIntent. Possible values are: `abandoned`, `requested_by_customer`, or `duplicate` + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_setup_intent_confirm_params.py b/stripe/params/_setup_intent_confirm_params.py new file mode 100644 index 000000000..feaaf5e11 --- /dev/null +++ b/stripe/params/_setup_intent_confirm_params.py @@ -0,0 +1,1684 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class SetupIntentConfirmParams(RequestOptions): + confirmation_token: NotRequired[str] + """ + ID of the ConfirmationToken used to confirm this SetupIntent. + + If the provided ConfirmationToken contains properties that are also being provided in this request, such as `payment_method`, then the values in this request will take precedence. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + mandate_data: NotRequired[ + "Literal['']|SetupIntentConfirmParamsMandateData" + ] + payment_method: NotRequired[str] + """ + ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent. + """ + payment_method_data: NotRequired[ + "SetupIntentConfirmParamsPaymentMethodData" + ] + """ + When included, this hash creates a PaymentMethod that is set as the [`payment_method`](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-payment_method) + value in the SetupIntent. + """ + payment_method_options: NotRequired[ + "SetupIntentConfirmParamsPaymentMethodOptions" + ] + """ + Payment method-specific configuration for this SetupIntent. + """ + return_url: NotRequired[str] + """ + The URL to redirect your customer back to after they authenticate on the payment method's app or site. + If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. + This parameter is only used for cards and other redirect-based payment methods. + """ + use_stripe_sdk: NotRequired[bool] + """ + Set to `true` when confirming server-side and using Stripe.js, iOS, or Android client-side SDKs to handle the next actions. + """ + + +class SetupIntentConfirmParamsMandateData(TypedDict): + customer_acceptance: NotRequired[ + "SetupIntentConfirmParamsMandateDataCustomerAcceptance" + ] + """ + This hash contains details about the customer acceptance of the Mandate. + """ + + +class SetupIntentConfirmParamsMandateDataCustomerAcceptance(TypedDict): + accepted_at: NotRequired[int] + """ + The time at which the customer accepted the Mandate. + """ + offline: NotRequired[ + "SetupIntentConfirmParamsMandateDataCustomerAcceptanceOffline" + ] + """ + If this is a Mandate accepted offline, this hash contains details about the offline acceptance. + """ + online: NotRequired[ + "SetupIntentConfirmParamsMandateDataCustomerAcceptanceOnline" + ] + """ + If this is a Mandate accepted online, this hash contains details about the online acceptance. + """ + type: Literal["offline", "online"] + """ + The type of customer acceptance information included with the Mandate. One of `online` or `offline`. + """ + + +class SetupIntentConfirmParamsMandateDataCustomerAcceptanceOffline(TypedDict): + pass + + +class SetupIntentConfirmParamsMandateDataCustomerAcceptanceOnline(TypedDict): + ip_address: NotRequired[str] + """ + The IP address from which the Mandate was accepted by the customer. + """ + user_agent: NotRequired[str] + """ + The user agent of the browser from which the Mandate was accepted by the customer. + """ + + +class SetupIntentConfirmParamsPaymentMethodData(TypedDict): + acss_debit: NotRequired[ + "SetupIntentConfirmParamsPaymentMethodDataAcssDebit" + ] + """ + If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method. + """ + affirm: NotRequired["SetupIntentConfirmParamsPaymentMethodDataAffirm"] + """ + If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method. + """ + afterpay_clearpay: NotRequired[ + "SetupIntentConfirmParamsPaymentMethodDataAfterpayClearpay" + ] + """ + If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method. + """ + alipay: NotRequired["SetupIntentConfirmParamsPaymentMethodDataAlipay"] + """ + If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. + """ + allow_redisplay: NotRequired[Literal["always", "limited", "unspecified"]] + """ + This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`. + """ + alma: NotRequired["SetupIntentConfirmParamsPaymentMethodDataAlma"] + """ + If this is a Alma PaymentMethod, this hash contains details about the Alma payment method. + """ + amazon_pay: NotRequired[ + "SetupIntentConfirmParamsPaymentMethodDataAmazonPay" + ] + """ + If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method. + """ + au_becs_debit: NotRequired[ + "SetupIntentConfirmParamsPaymentMethodDataAuBecsDebit" + ] + """ + If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. + """ + bacs_debit: NotRequired[ + "SetupIntentConfirmParamsPaymentMethodDataBacsDebit" + ] + """ + If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account. + """ + bancontact: NotRequired[ + "SetupIntentConfirmParamsPaymentMethodDataBancontact" + ] + """ + If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method. + """ + billie: NotRequired["SetupIntentConfirmParamsPaymentMethodDataBillie"] + """ + If this is a `billie` PaymentMethod, this hash contains details about the Billie payment method. + """ + billing_details: NotRequired[ + "SetupIntentConfirmParamsPaymentMethodDataBillingDetails" + ] + """ + Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. + """ + blik: NotRequired["SetupIntentConfirmParamsPaymentMethodDataBlik"] + """ + If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method. + """ + boleto: NotRequired["SetupIntentConfirmParamsPaymentMethodDataBoleto"] + """ + If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method. + """ + cashapp: NotRequired["SetupIntentConfirmParamsPaymentMethodDataCashapp"] + """ + If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. + """ + crypto: NotRequired["SetupIntentConfirmParamsPaymentMethodDataCrypto"] + """ + If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment method. + """ + customer_balance: NotRequired[ + "SetupIntentConfirmParamsPaymentMethodDataCustomerBalance" + ] + """ + If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. + """ + eps: NotRequired["SetupIntentConfirmParamsPaymentMethodDataEps"] + """ + If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. + """ + fpx: NotRequired["SetupIntentConfirmParamsPaymentMethodDataFpx"] + """ + If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method. + """ + giropay: NotRequired["SetupIntentConfirmParamsPaymentMethodDataGiropay"] + """ + If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method. + """ + gopay: NotRequired["SetupIntentConfirmParamsPaymentMethodDataGopay"] + """ + If this is a Gopay PaymentMethod, this hash contains details about the Gopay payment method. + """ + grabpay: NotRequired["SetupIntentConfirmParamsPaymentMethodDataGrabpay"] + """ + If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method. + """ + id_bank_transfer: NotRequired[ + "SetupIntentConfirmParamsPaymentMethodDataIdBankTransfer" + ] + """ + If this is an `IdBankTransfer` PaymentMethod, this hash contains details about the IdBankTransfer payment method. + """ + ideal: NotRequired["SetupIntentConfirmParamsPaymentMethodDataIdeal"] + """ + If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. + """ + interac_present: NotRequired[ + "SetupIntentConfirmParamsPaymentMethodDataInteracPresent" + ] + """ + If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. + """ + kakao_pay: NotRequired["SetupIntentConfirmParamsPaymentMethodDataKakaoPay"] + """ + If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method. + """ + klarna: NotRequired["SetupIntentConfirmParamsPaymentMethodDataKlarna"] + """ + If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method. + """ + konbini: NotRequired["SetupIntentConfirmParamsPaymentMethodDataKonbini"] + """ + If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. + """ + kr_card: NotRequired["SetupIntentConfirmParamsPaymentMethodDataKrCard"] + """ + If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method. + """ + link: NotRequired["SetupIntentConfirmParamsPaymentMethodDataLink"] + """ + If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. + """ + mb_way: NotRequired["SetupIntentConfirmParamsPaymentMethodDataMbWay"] + """ + If this is a MB WAY PaymentMethod, this hash contains details about the MB WAY payment method. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + mobilepay: NotRequired[ + "SetupIntentConfirmParamsPaymentMethodDataMobilepay" + ] + """ + If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method. + """ + multibanco: NotRequired[ + "SetupIntentConfirmParamsPaymentMethodDataMultibanco" + ] + """ + If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method. + """ + naver_pay: NotRequired["SetupIntentConfirmParamsPaymentMethodDataNaverPay"] + """ + If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method. + """ + nz_bank_account: NotRequired[ + "SetupIntentConfirmParamsPaymentMethodDataNzBankAccount" + ] + """ + If this is an nz_bank_account PaymentMethod, this hash contains details about the nz_bank_account payment method. + """ + oxxo: NotRequired["SetupIntentConfirmParamsPaymentMethodDataOxxo"] + """ + If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. + """ + p24: NotRequired["SetupIntentConfirmParamsPaymentMethodDataP24"] + """ + If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. + """ + pay_by_bank: NotRequired[ + "SetupIntentConfirmParamsPaymentMethodDataPayByBank" + ] + """ + If this is a `pay_by_bank` PaymentMethod, this hash contains details about the PayByBank payment method. + """ + payco: NotRequired["SetupIntentConfirmParamsPaymentMethodDataPayco"] + """ + If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method. + """ + paynow: NotRequired["SetupIntentConfirmParamsPaymentMethodDataPaynow"] + """ + If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method. + """ + paypal: NotRequired["SetupIntentConfirmParamsPaymentMethodDataPaypal"] + """ + If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method. + """ + paypay: NotRequired["SetupIntentConfirmParamsPaymentMethodDataPaypay"] + """ + If this is a `paypay` PaymentMethod, this hash contains details about the PayPay payment method. + """ + payto: NotRequired["SetupIntentConfirmParamsPaymentMethodDataPayto"] + """ + If this is a `payto` PaymentMethod, this hash contains details about the PayTo payment method. + """ + pix: NotRequired["SetupIntentConfirmParamsPaymentMethodDataPix"] + """ + If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method. + """ + promptpay: NotRequired[ + "SetupIntentConfirmParamsPaymentMethodDataPromptpay" + ] + """ + If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method. + """ + qris: NotRequired["SetupIntentConfirmParamsPaymentMethodDataQris"] + """ + If this is a `qris` PaymentMethod, this hash contains details about the QRIS payment method. + """ + radar_options: NotRequired[ + "SetupIntentConfirmParamsPaymentMethodDataRadarOptions" + ] + """ + Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. + """ + rechnung: NotRequired["SetupIntentConfirmParamsPaymentMethodDataRechnung"] + """ + If this is a `rechnung` PaymentMethod, this hash contains details about the Rechnung payment method. + """ + revolut_pay: NotRequired[ + "SetupIntentConfirmParamsPaymentMethodDataRevolutPay" + ] + """ + If this is a `revolut_pay` PaymentMethod, this hash contains details about the Revolut Pay payment method. + """ + samsung_pay: NotRequired[ + "SetupIntentConfirmParamsPaymentMethodDataSamsungPay" + ] + """ + If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method. + """ + satispay: NotRequired["SetupIntentConfirmParamsPaymentMethodDataSatispay"] + """ + If this is a `satispay` PaymentMethod, this hash contains details about the Satispay payment method. + """ + sepa_debit: NotRequired[ + "SetupIntentConfirmParamsPaymentMethodDataSepaDebit" + ] + """ + If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. + """ + shopeepay: NotRequired[ + "SetupIntentConfirmParamsPaymentMethodDataShopeepay" + ] + """ + If this is a Shopeepay PaymentMethod, this hash contains details about the Shopeepay payment method. + """ + sofort: NotRequired["SetupIntentConfirmParamsPaymentMethodDataSofort"] + """ + If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. + """ + stripe_balance: NotRequired[ + "SetupIntentConfirmParamsPaymentMethodDataStripeBalance" + ] + """ + This hash contains details about the Stripe balance payment method. + """ + swish: NotRequired["SetupIntentConfirmParamsPaymentMethodDataSwish"] + """ + If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method. + """ + twint: NotRequired["SetupIntentConfirmParamsPaymentMethodDataTwint"] + """ + If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method. + """ + type: Literal[ + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "alma", + "amazon_pay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "billie", + "blik", + "boleto", + "cashapp", + "crypto", + "customer_balance", + "eps", + "fpx", + "giropay", + "gopay", + "grabpay", + "id_bank_transfer", + "ideal", + "kakao_pay", + "klarna", + "konbini", + "kr_card", + "link", + "mb_way", + "mobilepay", + "multibanco", + "naver_pay", + "nz_bank_account", + "oxxo", + "p24", + "pay_by_bank", + "payco", + "paynow", + "paypal", + "paypay", + "payto", + "pix", + "promptpay", + "qris", + "rechnung", + "revolut_pay", + "samsung_pay", + "satispay", + "sepa_debit", + "shopeepay", + "sofort", + "stripe_balance", + "swish", + "twint", + "us_bank_account", + "wechat_pay", + "zip", + ] + """ + The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. + """ + us_bank_account: NotRequired[ + "SetupIntentConfirmParamsPaymentMethodDataUsBankAccount" + ] + """ + If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. + """ + wechat_pay: NotRequired[ + "SetupIntentConfirmParamsPaymentMethodDataWechatPay" + ] + """ + If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method. + """ + zip: NotRequired["SetupIntentConfirmParamsPaymentMethodDataZip"] + """ + If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method. + """ + + +class SetupIntentConfirmParamsPaymentMethodDataAcssDebit(TypedDict): + account_number: str + """ + Customer's bank account number. + """ + institution_number: str + """ + Institution number of the customer's bank. + """ + transit_number: str + """ + Transit number of the customer's bank. + """ + + +class SetupIntentConfirmParamsPaymentMethodDataAffirm(TypedDict): + pass + + +class SetupIntentConfirmParamsPaymentMethodDataAfterpayClearpay(TypedDict): + pass + + +class SetupIntentConfirmParamsPaymentMethodDataAlipay(TypedDict): + pass + + +class SetupIntentConfirmParamsPaymentMethodDataAlma(TypedDict): + pass + + +class SetupIntentConfirmParamsPaymentMethodDataAmazonPay(TypedDict): + pass + + +class SetupIntentConfirmParamsPaymentMethodDataAuBecsDebit(TypedDict): + account_number: str + """ + The account number for the bank account. + """ + bsb_number: str + """ + Bank-State-Branch number of the bank account. + """ + + +class SetupIntentConfirmParamsPaymentMethodDataBacsDebit(TypedDict): + account_number: NotRequired[str] + """ + Account number of the bank account that the funds will be debited from. + """ + sort_code: NotRequired[str] + """ + Sort code of the bank account. (e.g., `10-20-30`) + """ + + +class SetupIntentConfirmParamsPaymentMethodDataBancontact(TypedDict): + pass + + +class SetupIntentConfirmParamsPaymentMethodDataBillie(TypedDict): + pass + + +class SetupIntentConfirmParamsPaymentMethodDataBillingDetails(TypedDict): + address: NotRequired[ + "Literal['']|SetupIntentConfirmParamsPaymentMethodDataBillingDetailsAddress" + ] + """ + Billing address. + """ + email: NotRequired["Literal['']|str"] + """ + Email address. + """ + name: NotRequired["Literal['']|str"] + """ + Full name. + """ + phone: NotRequired["Literal['']|str"] + """ + Billing phone number (including extension). + """ + tax_id: NotRequired[str] + """ + Taxpayer identification number. Used only for transactions between LATAM buyers and non-LATAM sellers. + """ + + +class SetupIntentConfirmParamsPaymentMethodDataBillingDetailsAddress( + 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. + """ + + +class SetupIntentConfirmParamsPaymentMethodDataBlik(TypedDict): + pass + + +class SetupIntentConfirmParamsPaymentMethodDataBoleto(TypedDict): + tax_id: str + """ + The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers) + """ + + +class SetupIntentConfirmParamsPaymentMethodDataCashapp(TypedDict): + pass + + +class SetupIntentConfirmParamsPaymentMethodDataCrypto(TypedDict): + pass + + +class SetupIntentConfirmParamsPaymentMethodDataCustomerBalance(TypedDict): + pass + + +class SetupIntentConfirmParamsPaymentMethodDataEps(TypedDict): + bank: NotRequired[ + Literal[ + "arzte_und_apotheker_bank", + "austrian_anadi_bank_ag", + "bank_austria", + "bankhaus_carl_spangler", + "bankhaus_schelhammer_und_schattera_ag", + "bawag_psk_ag", + "bks_bank_ag", + "brull_kallmus_bank_ag", + "btv_vier_lander_bank", + "capital_bank_grawe_gruppe_ag", + "deutsche_bank_ag", + "dolomitenbank", + "easybank_ag", + "erste_bank_und_sparkassen", + "hypo_alpeadriabank_international_ag", + "hypo_bank_burgenland_aktiengesellschaft", + "hypo_noe_lb_fur_niederosterreich_u_wien", + "hypo_oberosterreich_salzburg_steiermark", + "hypo_tirol_bank_ag", + "hypo_vorarlberg_bank_ag", + "marchfelder_bank", + "oberbank_ag", + "raiffeisen_bankengruppe_osterreich", + "schoellerbank_ag", + "sparda_bank_wien", + "volksbank_gruppe", + "volkskreditbank_ag", + "vr_bank_braunau", + ] + ] + """ + The customer's bank. + """ + + +class SetupIntentConfirmParamsPaymentMethodDataFpx(TypedDict): + account_holder_type: NotRequired[Literal["company", "individual"]] + """ + Account holder type for FPX transaction + """ + bank: Literal[ + "affin_bank", + "agrobank", + "alliance_bank", + "ambank", + "bank_islam", + "bank_muamalat", + "bank_of_china", + "bank_rakyat", + "bsn", + "cimb", + "deutsche_bank", + "hong_leong_bank", + "hsbc", + "kfh", + "maybank2e", + "maybank2u", + "ocbc", + "pb_enterprise", + "public_bank", + "rhb", + "standard_chartered", + "uob", + ] + """ + The customer's bank. + """ + + +class SetupIntentConfirmParamsPaymentMethodDataGiropay(TypedDict): + pass + + +class SetupIntentConfirmParamsPaymentMethodDataGopay(TypedDict): + pass + + +class SetupIntentConfirmParamsPaymentMethodDataGrabpay(TypedDict): + pass + + +class SetupIntentConfirmParamsPaymentMethodDataIdBankTransfer(TypedDict): + bank: NotRequired[Literal["bca", "bni", "bri", "cimb", "permata"]] + """ + Bank where the account is held. + """ + + +class SetupIntentConfirmParamsPaymentMethodDataIdeal(TypedDict): + bank: NotRequired[ + Literal[ + "abn_amro", + "asn_bank", + "bunq", + "buut", + "handelsbanken", + "ing", + "knab", + "moneyou", + "n26", + "nn", + "rabobank", + "regiobank", + "revolut", + "sns_bank", + "triodos_bank", + "van_lanschot", + "yoursafe", + ] + ] + """ + The customer's bank. Only use this parameter for existing customers. Don't use it for new customers. + """ + + +class SetupIntentConfirmParamsPaymentMethodDataInteracPresent(TypedDict): + pass + + +class SetupIntentConfirmParamsPaymentMethodDataKakaoPay(TypedDict): + pass + + +class SetupIntentConfirmParamsPaymentMethodDataKlarna(TypedDict): + dob: NotRequired["SetupIntentConfirmParamsPaymentMethodDataKlarnaDob"] + """ + Customer's date of birth + """ + + +class SetupIntentConfirmParamsPaymentMethodDataKlarnaDob(TypedDict): + day: int + """ + The day of birth, between 1 and 31. + """ + month: int + """ + The month of birth, between 1 and 12. + """ + year: int + """ + The four-digit year of birth. + """ + + +class SetupIntentConfirmParamsPaymentMethodDataKonbini(TypedDict): + pass + + +class SetupIntentConfirmParamsPaymentMethodDataKrCard(TypedDict): + pass + + +class SetupIntentConfirmParamsPaymentMethodDataLink(TypedDict): + pass + + +class SetupIntentConfirmParamsPaymentMethodDataMbWay(TypedDict): + pass + + +class SetupIntentConfirmParamsPaymentMethodDataMobilepay(TypedDict): + pass + + +class SetupIntentConfirmParamsPaymentMethodDataMultibanco(TypedDict): + pass + + +class SetupIntentConfirmParamsPaymentMethodDataNaverPay(TypedDict): + funding: NotRequired[Literal["card", "points"]] + """ + Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`. + """ + + +class SetupIntentConfirmParamsPaymentMethodDataNzBankAccount(TypedDict): + account_holder_name: NotRequired[str] + """ + The name on the bank account. Only required if the account holder name is different from the name of the authorized signatory collected in the PaymentMethod's billing details. + """ + account_number: str + """ + The account number for the bank account. + """ + bank_code: str + """ + The numeric code for the bank account's bank. + """ + branch_code: str + """ + The numeric code for the bank account's bank branch. + """ + reference: NotRequired[str] + suffix: str + """ + The suffix of the bank account number. + """ + + +class SetupIntentConfirmParamsPaymentMethodDataOxxo(TypedDict): + pass + + +class SetupIntentConfirmParamsPaymentMethodDataP24(TypedDict): + bank: NotRequired[ + Literal[ + "alior_bank", + "bank_millennium", + "bank_nowy_bfg_sa", + "bank_pekao_sa", + "banki_spbdzielcze", + "blik", + "bnp_paribas", + "boz", + "citi_handlowy", + "credit_agricole", + "envelobank", + "etransfer_pocztowy24", + "getin_bank", + "ideabank", + "ing", + "inteligo", + "mbank_mtransfer", + "nest_przelew", + "noble_pay", + "pbac_z_ipko", + "plus_bank", + "santander_przelew24", + "tmobile_usbugi_bankowe", + "toyota_bank", + "velobank", + "volkswagen_bank", + ] + ] + """ + The customer's bank. + """ + + +class SetupIntentConfirmParamsPaymentMethodDataPayByBank(TypedDict): + pass + + +class SetupIntentConfirmParamsPaymentMethodDataPayco(TypedDict): + pass + + +class SetupIntentConfirmParamsPaymentMethodDataPaynow(TypedDict): + pass + + +class SetupIntentConfirmParamsPaymentMethodDataPaypal(TypedDict): + pass + + +class SetupIntentConfirmParamsPaymentMethodDataPaypay(TypedDict): + pass + + +class SetupIntentConfirmParamsPaymentMethodDataPayto(TypedDict): + account_number: NotRequired[str] + """ + The account number for the bank account. + """ + bsb_number: NotRequired[str] + """ + Bank-State-Branch number of the bank account. + """ + pay_id: NotRequired[str] + """ + The PayID alias for the bank account. + """ + + +class SetupIntentConfirmParamsPaymentMethodDataPix(TypedDict): + pass + + +class SetupIntentConfirmParamsPaymentMethodDataPromptpay(TypedDict): + pass + + +class SetupIntentConfirmParamsPaymentMethodDataQris(TypedDict): + pass + + +class SetupIntentConfirmParamsPaymentMethodDataRadarOptions(TypedDict): + session: NotRequired[str] + """ + A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. + """ + + +class SetupIntentConfirmParamsPaymentMethodDataRechnung(TypedDict): + dob: "SetupIntentConfirmParamsPaymentMethodDataRechnungDob" + """ + Customer's date of birth + """ + + +class SetupIntentConfirmParamsPaymentMethodDataRechnungDob(TypedDict): + day: int + """ + The day of birth, between 1 and 31. + """ + month: int + """ + The month of birth, between 1 and 12. + """ + year: int + """ + The four-digit year of birth. + """ + + +class SetupIntentConfirmParamsPaymentMethodDataRevolutPay(TypedDict): + pass + + +class SetupIntentConfirmParamsPaymentMethodDataSamsungPay(TypedDict): + pass + + +class SetupIntentConfirmParamsPaymentMethodDataSatispay(TypedDict): + pass + + +class SetupIntentConfirmParamsPaymentMethodDataSepaDebit(TypedDict): + iban: str + """ + IBAN of the bank account. + """ + + +class SetupIntentConfirmParamsPaymentMethodDataShopeepay(TypedDict): + pass + + +class SetupIntentConfirmParamsPaymentMethodDataSofort(TypedDict): + country: Literal["AT", "BE", "DE", "ES", "IT", "NL"] + """ + Two-letter ISO code representing the country the bank account is located in. + """ + + +class SetupIntentConfirmParamsPaymentMethodDataStripeBalance(TypedDict): + account: NotRequired[str] + """ + The connected account ID whose Stripe balance to use as the source of payment + """ + source_type: NotRequired[Literal["bank_account", "card", "fpx"]] + """ + The [source_type](https://docs.stripe.com/api/balance/balance_object#balance_object-available-source_types) of the balance + """ + + +class SetupIntentConfirmParamsPaymentMethodDataSwish(TypedDict): + pass + + +class SetupIntentConfirmParamsPaymentMethodDataTwint(TypedDict): + pass + + +class SetupIntentConfirmParamsPaymentMethodDataUsBankAccount(TypedDict): + account_holder_type: NotRequired[Literal["company", "individual"]] + """ + Account holder type: individual or company. + """ + account_number: NotRequired[str] + """ + Account number of the bank account. + """ + account_type: NotRequired[Literal["checking", "savings"]] + """ + Account type: checkings or savings. Defaults to checking if omitted. + """ + financial_connections_account: NotRequired[str] + """ + The ID of a Financial Connections Account to use as a payment method. + """ + routing_number: NotRequired[str] + """ + Routing number of the bank account. + """ + + +class SetupIntentConfirmParamsPaymentMethodDataWechatPay(TypedDict): + pass + + +class SetupIntentConfirmParamsPaymentMethodDataZip(TypedDict): + pass + + +class SetupIntentConfirmParamsPaymentMethodOptions(TypedDict): + acss_debit: NotRequired[ + "SetupIntentConfirmParamsPaymentMethodOptionsAcssDebit" + ] + """ + If this is a `acss_debit` SetupIntent, this sub-hash contains details about the ACSS Debit payment method options. + """ + amazon_pay: NotRequired[ + "SetupIntentConfirmParamsPaymentMethodOptionsAmazonPay" + ] + """ + If this is a `amazon_pay` SetupIntent, this sub-hash contains details about the AmazonPay payment method options. + """ + bacs_debit: NotRequired[ + "SetupIntentConfirmParamsPaymentMethodOptionsBacsDebit" + ] + """ + If this is a `bacs_debit` SetupIntent, this sub-hash contains details about the Bacs Debit payment method options. + """ + card: NotRequired["SetupIntentConfirmParamsPaymentMethodOptionsCard"] + """ + Configuration for any card setup attempted on this SetupIntent. + """ + card_present: NotRequired[ + "SetupIntentConfirmParamsPaymentMethodOptionsCardPresent" + ] + """ + If this is a `card_present` PaymentMethod, this sub-hash contains details about the card-present payment method options. + """ + klarna: NotRequired["SetupIntentConfirmParamsPaymentMethodOptionsKlarna"] + """ + If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method options. + """ + link: NotRequired["SetupIntentConfirmParamsPaymentMethodOptionsLink"] + """ + If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options. + """ + paypal: NotRequired["SetupIntentConfirmParamsPaymentMethodOptionsPaypal"] + """ + If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options. + """ + payto: NotRequired["SetupIntentConfirmParamsPaymentMethodOptionsPayto"] + """ + If this is a `payto` SetupIntent, this sub-hash contains details about the PayTo payment method options. + """ + pix: NotRequired["SetupIntentConfirmParamsPaymentMethodOptionsPix"] + """ + If this is a `pix` SetupIntent, this sub-hash contains details about the Pix payment method options. + """ + sepa_debit: NotRequired[ + "SetupIntentConfirmParamsPaymentMethodOptionsSepaDebit" + ] + """ + If this is a `sepa_debit` SetupIntent, this sub-hash contains details about the SEPA Debit payment method options. + """ + us_bank_account: NotRequired[ + "SetupIntentConfirmParamsPaymentMethodOptionsUsBankAccount" + ] + """ + If this is a `us_bank_account` SetupIntent, this sub-hash contains details about the US bank account payment method options. + """ + + +class SetupIntentConfirmParamsPaymentMethodOptionsAcssDebit(TypedDict): + currency: NotRequired[Literal["cad", "usd"]] + """ + 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). + """ + mandate_options: NotRequired[ + "SetupIntentConfirmParamsPaymentMethodOptionsAcssDebitMandateOptions" + ] + """ + Additional fields for Mandate creation + """ + verification_method: NotRequired[ + Literal["automatic", "instant", "microdeposits"] + ] + """ + Bank account verification method. + """ + + +class SetupIntentConfirmParamsPaymentMethodOptionsAcssDebitMandateOptions( + TypedDict, +): + custom_mandate_url: NotRequired["Literal['']|str"] + """ + A URL for custom mandate text to render during confirmation step. + The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent, + or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent. + """ + default_for: NotRequired[List[Literal["invoice", "subscription"]]] + """ + List of Stripe products where this mandate can be selected automatically. + """ + interval_description: NotRequired[str] + """ + Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'. + """ + payment_schedule: NotRequired[Literal["combined", "interval", "sporadic"]] + """ + Payment schedule for the mandate. + """ + transaction_type: NotRequired[Literal["business", "personal"]] + """ + Transaction type of the mandate. + """ + + +class SetupIntentConfirmParamsPaymentMethodOptionsAmazonPay(TypedDict): + pass + + +class SetupIntentConfirmParamsPaymentMethodOptionsBacsDebit(TypedDict): + mandate_options: NotRequired[ + "SetupIntentConfirmParamsPaymentMethodOptionsBacsDebitMandateOptions" + ] + """ + Additional fields for Mandate creation + """ + + +class SetupIntentConfirmParamsPaymentMethodOptionsBacsDebitMandateOptions( + TypedDict, +): + reference_prefix: NotRequired["Literal['']|str"] + """ + Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'. + """ + + +class SetupIntentConfirmParamsPaymentMethodOptionsCard(TypedDict): + mandate_options: NotRequired[ + "SetupIntentConfirmParamsPaymentMethodOptionsCardMandateOptions" + ] + """ + Configuration options for setting up an eMandate for cards issued in India. + """ + moto: NotRequired[bool] + """ + When specified, this parameter signals that a card has been collected + as MOTO (Mail Order Telephone Order) and thus out of scope for SCA. This + parameter can only be provided during confirmation. + """ + network: NotRequired[ + Literal[ + "amex", + "cartes_bancaires", + "diners", + "discover", + "eftpos_au", + "girocard", + "interac", + "jcb", + "link", + "mastercard", + "unionpay", + "unknown", + "visa", + ] + ] + """ + Selected network to process this SetupIntent on. Depends on the available networks of the card attached to the SetupIntent. Can be only set confirm-time. + """ + request_three_d_secure: NotRequired[ + Literal["any", "automatic", "challenge"] + ] + """ + We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + """ + three_d_secure: NotRequired[ + "SetupIntentConfirmParamsPaymentMethodOptionsCardThreeDSecure" + ] + """ + If 3D Secure authentication was performed with a third-party provider, + the authentication details to use for this setup. + """ + + +class SetupIntentConfirmParamsPaymentMethodOptionsCardMandateOptions( + TypedDict +): + amount: int + """ + Amount to be charged for future payments. + """ + amount_type: Literal["fixed", "maximum"] + """ + One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. + """ + currency: str + """ + Currency in which future payments will be charged. 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). + """ + description: NotRequired[str] + """ + A description of the mandate or subscription that is meant to be displayed to the customer. + """ + end_date: NotRequired[int] + """ + End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. + """ + interval: Literal["day", "month", "sporadic", "week", "year"] + """ + Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`. + """ + interval_count: NotRequired[int] + """ + The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`. + """ + reference: str + """ + Unique identifier for the mandate or subscription. + """ + start_date: int + """ + Start date of the mandate or subscription. Start date should not be lesser than yesterday. + """ + supported_types: NotRequired[List[Literal["india"]]] + """ + Specifies the type of mandates supported. Possible values are `india`. + """ + + +class SetupIntentConfirmParamsPaymentMethodOptionsCardThreeDSecure(TypedDict): + ares_trans_status: NotRequired[Literal["A", "C", "I", "N", "R", "U", "Y"]] + """ + The `transStatus` returned from the card Issuer's ACS in the ARes. + """ + cryptogram: NotRequired[str] + """ + The cryptogram, also known as the "authentication value" (AAV, CAVV or + AEVV). This value is 20 bytes, base64-encoded into a 28-character string. + (Most 3D Secure providers will return the base64-encoded version, which + is what you should specify here.) + """ + electronic_commerce_indicator: NotRequired[ + Literal["01", "02", "05", "06", "07"] + ] + """ + The Electronic Commerce Indicator (ECI) is returned by your 3D Secure + provider and indicates what degree of authentication was performed. + """ + network_options: NotRequired[ + "SetupIntentConfirmParamsPaymentMethodOptionsCardThreeDSecureNetworkOptions" + ] + """ + Network specific 3DS fields. Network specific arguments require an + explicit card brand choice. The parameter `payment_method_options.card.network`` + must be populated accordingly + """ + requestor_challenge_indicator: NotRequired[str] + """ + The challenge indicator (`threeDSRequestorChallengeInd`) which was requested in the + AReq sent to the card Issuer's ACS. A string containing 2 digits from 01-99. + """ + transaction_id: NotRequired[str] + """ + For 3D Secure 1, the XID. For 3D Secure 2, the Directory Server + Transaction ID (dsTransID). + """ + version: NotRequired[Literal["1.0.2", "2.1.0", "2.2.0"]] + """ + The version of 3D Secure that was performed. + """ + + +class SetupIntentConfirmParamsPaymentMethodOptionsCardThreeDSecureNetworkOptions( + TypedDict, +): + cartes_bancaires: NotRequired[ + "SetupIntentConfirmParamsPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancaires" + ] + """ + Cartes Bancaires-specific 3DS fields. + """ + + +class SetupIntentConfirmParamsPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancaires( + TypedDict, +): + cb_avalgo: Literal["0", "1", "2", "3", "4", "A"] + """ + The cryptogram calculation algorithm used by the card Issuer's ACS + to calculate the Authentication cryptogram. Also known as `cavvAlgorithm`. + messageExtension: CB-AVALGO + """ + cb_exemption: NotRequired[str] + """ + The exemption indicator returned from Cartes Bancaires in the ARes. + message extension: CB-EXEMPTION; string (4 characters) + This is a 3 byte bitmap (low significant byte first and most significant + bit first) that has been Base64 encoded + """ + cb_score: NotRequired[int] + """ + The risk score returned from Cartes Bancaires in the ARes. + message extension: CB-SCORE; numeric value 0-99 + """ + + +class SetupIntentConfirmParamsPaymentMethodOptionsCardPresent(TypedDict): + pass + + +class SetupIntentConfirmParamsPaymentMethodOptionsKlarna(TypedDict): + currency: NotRequired[str] + """ + The currency of the SetupIntent. Three letter ISO currency code. + """ + on_demand: NotRequired[ + "SetupIntentConfirmParamsPaymentMethodOptionsKlarnaOnDemand" + ] + """ + On-demand details if setting up a payment method for on-demand payments. + """ + preferred_locale: NotRequired[ + Literal[ + "cs-CZ", + "da-DK", + "de-AT", + "de-CH", + "de-DE", + "el-GR", + "en-AT", + "en-AU", + "en-BE", + "en-CA", + "en-CH", + "en-CZ", + "en-DE", + "en-DK", + "en-ES", + "en-FI", + "en-FR", + "en-GB", + "en-GR", + "en-IE", + "en-IT", + "en-NL", + "en-NO", + "en-NZ", + "en-PL", + "en-PT", + "en-RO", + "en-SE", + "en-US", + "es-ES", + "es-US", + "fi-FI", + "fr-BE", + "fr-CA", + "fr-CH", + "fr-FR", + "it-CH", + "it-IT", + "nb-NO", + "nl-BE", + "nl-NL", + "pl-PL", + "pt-PT", + "ro-RO", + "sv-FI", + "sv-SE", + ] + ] + """ + Preferred language of the Klarna authorization page that the customer is redirected to + """ + subscriptions: NotRequired[ + "Literal['']|List[SetupIntentConfirmParamsPaymentMethodOptionsKlarnaSubscription]" + ] + """ + Subscription details if setting up or charging a subscription + """ + + +class SetupIntentConfirmParamsPaymentMethodOptionsKlarnaOnDemand(TypedDict): + average_amount: NotRequired[int] + """ + Your average amount value. You can use a value across your customer base, or segment based on customer type, country, etc. + """ + maximum_amount: NotRequired[int] + """ + The maximum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. + """ + minimum_amount: NotRequired[int] + """ + The lowest or minimum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. + """ + purchase_interval: NotRequired[Literal["day", "month", "week", "year"]] + """ + Interval at which the customer is making purchases + """ + purchase_interval_count: NotRequired[int] + """ + The number of `purchase_interval` between charges + """ + + +class SetupIntentConfirmParamsPaymentMethodOptionsKlarnaSubscription( + TypedDict +): + interval: Literal["day", "month", "week", "year"] + """ + Unit of time between subscription charges. + """ + interval_count: NotRequired[int] + """ + The number of intervals (specified in the `interval` attribute) between subscription charges. For example, `interval=month` and `interval_count=3` charges every 3 months. + """ + name: NotRequired[str] + """ + Name for subscription. + """ + next_billing: "SetupIntentConfirmParamsPaymentMethodOptionsKlarnaSubscriptionNextBilling" + """ + Describes the upcoming charge for this subscription. + """ + reference: str + """ + A non-customer-facing reference to correlate subscription charges in the Klarna app. Use a value that persists across subscription charges. + """ + + +class SetupIntentConfirmParamsPaymentMethodOptionsKlarnaSubscriptionNextBilling( + TypedDict, +): + amount: int + """ + The amount of the next charge for the subscription. + """ + date: str + """ + The date of the next charge for the subscription in YYYY-MM-DD format. + """ + + +class SetupIntentConfirmParamsPaymentMethodOptionsLink(TypedDict): + persistent_token: NotRequired[str] + """ + [Deprecated] This is a legacy parameter that no longer has any function. + """ + + +class SetupIntentConfirmParamsPaymentMethodOptionsPaypal(TypedDict): + billing_agreement_id: NotRequired[str] + """ + The PayPal Billing Agreement ID (BAID). This is an ID generated by PayPal which represents the mandate between the merchant and the customer. + """ + currency: NotRequired[str] + subsellers: NotRequired[List[str]] + """ + The Stripe connected account IDs of the sellers on the platform for this transaction (optional). Only allowed when [separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) are used. + """ + + +class SetupIntentConfirmParamsPaymentMethodOptionsPayto(TypedDict): + mandate_options: NotRequired[ + "SetupIntentConfirmParamsPaymentMethodOptionsPaytoMandateOptions" + ] + """ + Additional fields for Mandate creation. + """ + + +class SetupIntentConfirmParamsPaymentMethodOptionsPaytoMandateOptions( + TypedDict, +): + amount: NotRequired[int] + """ + Amount that will be collected. It is required when `amount_type` is `fixed`. + """ + amount_type: NotRequired[Literal["fixed", "maximum"]] + """ + The type of amount that will be collected. The amount charged must be exact or up to the value of `amount` param for `fixed` or `maximum` type respectively. + """ + end_date: NotRequired[str] + """ + Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no end date. + """ + payment_schedule: NotRequired[ + Literal[ + "adhoc", + "annual", + "daily", + "fortnightly", + "monthly", + "quarterly", + "semi_annual", + "weekly", + ] + ] + """ + The periodicity at which payments will be collected. + """ + payments_per_period: NotRequired[int] + """ + The number of payments that will be made during a payment period. Defaults to 1 except for when `payment_schedule` is `adhoc`. In that case, it defaults to no limit. + """ + purpose: NotRequired[ + Literal[ + "dependant_support", + "government", + "loan", + "mortgage", + "other", + "pension", + "personal", + "retail", + "salary", + "tax", + "utility", + ] + ] + """ + The purpose for which payments are made. Defaults to retail. + """ + start_date: NotRequired[str] + """ + Date, in YYYY-MM-DD format, from which payments will be collected. Defaults to confirmation time. + """ + + +class SetupIntentConfirmParamsPaymentMethodOptionsPix(TypedDict): + mandate_options: NotRequired[ + "SetupIntentConfirmParamsPaymentMethodOptionsPixMandateOptions" + ] + """ + Additional fields for mandate creation. + """ + + +class SetupIntentConfirmParamsPaymentMethodOptionsPixMandateOptions(TypedDict): + amount: NotRequired[int] + """ + Amount to be charged for future payments. Required when `amount_type=fixed`. If not provided for `amount_type=maximum`, defaults to 40000. + """ + amount_includes_iof: NotRequired[Literal["always", "never"]] + """ + Determines if the amount includes the IOF tax. Defaults to `never`. + """ + amount_type: NotRequired[Literal["fixed", "maximum"]] + """ + Type of amount. Defaults to `maximum`. + """ + currency: NotRequired[str] + """ + Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Only `brl` is supported currently. + """ + end_date: NotRequired[str] + """ + Date when the mandate expires and no further payments will be charged, in `YYYY-MM-DD`. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. + """ + payment_schedule: NotRequired[ + Literal["halfyearly", "monthly", "quarterly", "weekly", "yearly"] + ] + """ + Schedule at which the future payments will be charged. Defaults to `weekly`. + """ + reference: NotRequired[str] + """ + Subscription name displayed to buyers in their bank app. Defaults to the displayable business name. + """ + start_date: NotRequired[str] + """ + Start date of the mandate, in `YYYY-MM-DD`. Start date should be at least 3 days in the future. Defaults to 3 days after the current date. + """ + + +class SetupIntentConfirmParamsPaymentMethodOptionsSepaDebit(TypedDict): + mandate_options: NotRequired[ + "SetupIntentConfirmParamsPaymentMethodOptionsSepaDebitMandateOptions" + ] + """ + Additional fields for Mandate creation + """ + + +class SetupIntentConfirmParamsPaymentMethodOptionsSepaDebitMandateOptions( + TypedDict, +): + reference_prefix: NotRequired["Literal['']|str"] + """ + Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'. + """ + + +class SetupIntentConfirmParamsPaymentMethodOptionsUsBankAccount(TypedDict): + financial_connections: NotRequired[ + "SetupIntentConfirmParamsPaymentMethodOptionsUsBankAccountFinancialConnections" + ] + """ + Additional fields for Financial Connections Session creation + """ + mandate_options: NotRequired[ + "SetupIntentConfirmParamsPaymentMethodOptionsUsBankAccountMandateOptions" + ] + """ + Additional fields for Mandate creation + """ + networks: NotRequired[ + "SetupIntentConfirmParamsPaymentMethodOptionsUsBankAccountNetworks" + ] + """ + Additional fields for network related functions + """ + verification_method: NotRequired[ + Literal["automatic", "instant", "microdeposits"] + ] + """ + Bank account verification method. + """ + + +class SetupIntentConfirmParamsPaymentMethodOptionsUsBankAccountFinancialConnections( + TypedDict, +): + filters: NotRequired[ + "SetupIntentConfirmParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters" + ] + """ + Provide filters for the linked accounts that the customer can select for the payment method. + """ + manual_entry: NotRequired[ + "SetupIntentConfirmParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsManualEntry" + ] + """ + Customize manual entry behavior + """ + permissions: NotRequired[ + List[ + Literal["balances", "ownership", "payment_method", "transactions"] + ] + ] + """ + The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. + """ + prefetch: NotRequired[ + List[ + Literal[ + "balances", "inferred_balances", "ownership", "transactions" + ] + ] + ] + """ + List of data features that you would like to retrieve upon account creation. + """ + return_url: NotRequired[str] + """ + For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. + """ + + +class SetupIntentConfirmParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters( + TypedDict, +): + account_subcategories: NotRequired[List[Literal["checking", "savings"]]] + """ + The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`. + """ + institution: NotRequired[str] + """ + ID of the institution to use to filter for selectable accounts. + """ + + +class SetupIntentConfirmParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsManualEntry( + TypedDict, +): + mode: Literal["automatic", "custom"] + """ + Settings for configuring manual entry of account details. + """ + + +class SetupIntentConfirmParamsPaymentMethodOptionsUsBankAccountMandateOptions( + TypedDict, +): + collection_method: NotRequired["Literal['']|Literal['paper']"] + """ + The method used to collect offline mandate customer acceptance. + """ + + +class SetupIntentConfirmParamsPaymentMethodOptionsUsBankAccountNetworks( + TypedDict, +): + requested: NotRequired[List[Literal["ach", "us_domestic_wire"]]] + """ + Triggers validations to run across the selected networks + """ diff --git a/stripe/params/_setup_intent_create_params.py b/stripe/params/_setup_intent_create_params.py new file mode 100644 index 000000000..56c0ee15b --- /dev/null +++ b/stripe/params/_setup_intent_create_params.py @@ -0,0 +1,1757 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class SetupIntentCreateParams(RequestOptions): + attach_to_self: NotRequired[bool] + """ + If present, the SetupIntent's payment method will be attached to the in-context Stripe Account. + + It can only be used for this Stripe Account's own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer. + """ + automatic_payment_methods: NotRequired[ + "SetupIntentCreateParamsAutomaticPaymentMethods" + ] + """ + When you enable this parameter, this SetupIntent accepts payment methods that you enable in the Dashboard and that are compatible with its other parameters. + """ + confirm: NotRequired[bool] + """ + Set to `true` to attempt to confirm this SetupIntent immediately. This parameter defaults to `false`. If a card is the attached payment method, you can provide a `return_url` in case further authentication is necessary. + """ + confirmation_token: NotRequired[str] + """ + ID of the ConfirmationToken used to confirm this SetupIntent. + + If the provided ConfirmationToken contains properties that are also being provided in this request, such as `payment_method`, then the values in this request will take precedence. + """ + customer: NotRequired[str] + """ + ID of the Customer this SetupIntent belongs to, if one exists. + + If present, the SetupIntent's payment method will be attached to the Customer on successful setup. Payment methods attached to other Customers cannot be used with this SetupIntent. + """ + customer_account: NotRequired[str] + """ + ID of the Account this SetupIntent belongs to, if one exists. + + If present, the SetupIntent's payment method will be attached to the Account on successful setup. Payment methods attached to other Accounts cannot be used with this SetupIntent. + """ + description: NotRequired[str] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + flow_directions: NotRequired[List[Literal["inbound", "outbound"]]] + """ + Indicates the directions of money movement for which this payment method is intended to be used. + + Include `inbound` if you intend to use the payment method as the origin to pull funds from. Include `outbound` if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes. + """ + mandate_data: NotRequired["Literal['']|SetupIntentCreateParamsMandateData"] + """ + This hash contains details about the mandate to create. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/setup_intents/create#create_setup_intent-confirm). + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + on_behalf_of: NotRequired[str] + """ + The Stripe account ID created for this SetupIntent. + """ + payment_method: NotRequired[str] + """ + ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent. + """ + payment_method_configuration: NotRequired[str] + """ + The ID of the [payment method configuration](https://stripe.com/docs/api/payment_method_configurations) to use with this SetupIntent. + """ + payment_method_data: NotRequired[ + "SetupIntentCreateParamsPaymentMethodData" + ] + """ + When included, this hash creates a PaymentMethod that is set as the [`payment_method`](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-payment_method) + value in the SetupIntent. + """ + payment_method_options: NotRequired[ + "SetupIntentCreateParamsPaymentMethodOptions" + ] + """ + Payment method-specific configuration for this SetupIntent. + """ + payment_method_types: NotRequired[List[str]] + """ + The list of payment method types (for example, card) that this SetupIntent can use. If you don't provide this, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). A list of valid payment method types can be found [here](https://docs.stripe.com/api/payment_methods/object#payment_method_object-type). + """ + return_url: NotRequired[str] + """ + The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. To redirect to a mobile application, you can alternatively supply an application URI scheme. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/setup_intents/create#create_setup_intent-confirm). + """ + single_use: NotRequired["SetupIntentCreateParamsSingleUse"] + """ + If you populate this hash, this SetupIntent generates a `single_use` mandate after successful completion. + + Single-use mandates are only valid for the following payment methods: `acss_debit`, `alipay`, `au_becs_debit`, `bacs_debit`, `bancontact`, `boleto`, `ideal`, `link`, `sepa_debit`, and `us_bank_account`. + """ + usage: NotRequired[Literal["off_session", "on_session"]] + """ + Indicates how the payment method is intended to be used in the future. If not provided, this value defaults to `off_session`. + """ + use_stripe_sdk: NotRequired[bool] + """ + Set to `true` when confirming server-side and using Stripe.js, iOS, or Android client-side SDKs to handle the next actions. + """ + + +class SetupIntentCreateParamsAutomaticPaymentMethods(TypedDict): + allow_redirects: NotRequired[Literal["always", "never"]] + """ + Controls whether this SetupIntent will accept redirect-based payment methods. + + Redirect-based payment methods may require your customer to be redirected to a payment method's app or site for authentication or additional steps. To [confirm](https://stripe.com/docs/api/setup_intents/confirm) this SetupIntent, you may be required to provide a `return_url` to redirect customers back to your site after they authenticate or complete the setup. + """ + enabled: bool + """ + Whether this feature is enabled. + """ + + +class SetupIntentCreateParamsMandateData(TypedDict): + customer_acceptance: "SetupIntentCreateParamsMandateDataCustomerAcceptance" + """ + This hash contains details about the customer acceptance of the Mandate. + """ + + +class SetupIntentCreateParamsMandateDataCustomerAcceptance(TypedDict): + accepted_at: NotRequired[int] + """ + The time at which the customer accepted the Mandate. + """ + offline: NotRequired[ + "SetupIntentCreateParamsMandateDataCustomerAcceptanceOffline" + ] + """ + If this is a Mandate accepted offline, this hash contains details about the offline acceptance. + """ + online: NotRequired[ + "SetupIntentCreateParamsMandateDataCustomerAcceptanceOnline" + ] + """ + If this is a Mandate accepted online, this hash contains details about the online acceptance. + """ + type: Literal["offline", "online"] + """ + The type of customer acceptance information included with the Mandate. One of `online` or `offline`. + """ + + +class SetupIntentCreateParamsMandateDataCustomerAcceptanceOffline(TypedDict): + pass + + +class SetupIntentCreateParamsMandateDataCustomerAcceptanceOnline(TypedDict): + ip_address: str + """ + The IP address from which the Mandate was accepted by the customer. + """ + user_agent: str + """ + The user agent of the browser from which the Mandate was accepted by the customer. + """ + + +class SetupIntentCreateParamsPaymentMethodData(TypedDict): + acss_debit: NotRequired[ + "SetupIntentCreateParamsPaymentMethodDataAcssDebit" + ] + """ + If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method. + """ + affirm: NotRequired["SetupIntentCreateParamsPaymentMethodDataAffirm"] + """ + If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method. + """ + afterpay_clearpay: NotRequired[ + "SetupIntentCreateParamsPaymentMethodDataAfterpayClearpay" + ] + """ + If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method. + """ + alipay: NotRequired["SetupIntentCreateParamsPaymentMethodDataAlipay"] + """ + If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. + """ + allow_redisplay: NotRequired[Literal["always", "limited", "unspecified"]] + """ + This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`. + """ + alma: NotRequired["SetupIntentCreateParamsPaymentMethodDataAlma"] + """ + If this is a Alma PaymentMethod, this hash contains details about the Alma payment method. + """ + amazon_pay: NotRequired[ + "SetupIntentCreateParamsPaymentMethodDataAmazonPay" + ] + """ + If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method. + """ + au_becs_debit: NotRequired[ + "SetupIntentCreateParamsPaymentMethodDataAuBecsDebit" + ] + """ + If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. + """ + bacs_debit: NotRequired[ + "SetupIntentCreateParamsPaymentMethodDataBacsDebit" + ] + """ + If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account. + """ + bancontact: NotRequired[ + "SetupIntentCreateParamsPaymentMethodDataBancontact" + ] + """ + If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method. + """ + billie: NotRequired["SetupIntentCreateParamsPaymentMethodDataBillie"] + """ + If this is a `billie` PaymentMethod, this hash contains details about the Billie payment method. + """ + billing_details: NotRequired[ + "SetupIntentCreateParamsPaymentMethodDataBillingDetails" + ] + """ + Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. + """ + blik: NotRequired["SetupIntentCreateParamsPaymentMethodDataBlik"] + """ + If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method. + """ + boleto: NotRequired["SetupIntentCreateParamsPaymentMethodDataBoleto"] + """ + If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method. + """ + cashapp: NotRequired["SetupIntentCreateParamsPaymentMethodDataCashapp"] + """ + If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. + """ + crypto: NotRequired["SetupIntentCreateParamsPaymentMethodDataCrypto"] + """ + If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment method. + """ + customer_balance: NotRequired[ + "SetupIntentCreateParamsPaymentMethodDataCustomerBalance" + ] + """ + If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. + """ + eps: NotRequired["SetupIntentCreateParamsPaymentMethodDataEps"] + """ + If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. + """ + fpx: NotRequired["SetupIntentCreateParamsPaymentMethodDataFpx"] + """ + If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method. + """ + giropay: NotRequired["SetupIntentCreateParamsPaymentMethodDataGiropay"] + """ + If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method. + """ + gopay: NotRequired["SetupIntentCreateParamsPaymentMethodDataGopay"] + """ + If this is a Gopay PaymentMethod, this hash contains details about the Gopay payment method. + """ + grabpay: NotRequired["SetupIntentCreateParamsPaymentMethodDataGrabpay"] + """ + If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method. + """ + id_bank_transfer: NotRequired[ + "SetupIntentCreateParamsPaymentMethodDataIdBankTransfer" + ] + """ + If this is an `IdBankTransfer` PaymentMethod, this hash contains details about the IdBankTransfer payment method. + """ + ideal: NotRequired["SetupIntentCreateParamsPaymentMethodDataIdeal"] + """ + If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. + """ + interac_present: NotRequired[ + "SetupIntentCreateParamsPaymentMethodDataInteracPresent" + ] + """ + If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. + """ + kakao_pay: NotRequired["SetupIntentCreateParamsPaymentMethodDataKakaoPay"] + """ + If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method. + """ + klarna: NotRequired["SetupIntentCreateParamsPaymentMethodDataKlarna"] + """ + If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method. + """ + konbini: NotRequired["SetupIntentCreateParamsPaymentMethodDataKonbini"] + """ + If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. + """ + kr_card: NotRequired["SetupIntentCreateParamsPaymentMethodDataKrCard"] + """ + If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method. + """ + link: NotRequired["SetupIntentCreateParamsPaymentMethodDataLink"] + """ + If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. + """ + mb_way: NotRequired["SetupIntentCreateParamsPaymentMethodDataMbWay"] + """ + If this is a MB WAY PaymentMethod, this hash contains details about the MB WAY payment method. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + mobilepay: NotRequired["SetupIntentCreateParamsPaymentMethodDataMobilepay"] + """ + If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method. + """ + multibanco: NotRequired[ + "SetupIntentCreateParamsPaymentMethodDataMultibanco" + ] + """ + If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method. + """ + naver_pay: NotRequired["SetupIntentCreateParamsPaymentMethodDataNaverPay"] + """ + If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method. + """ + nz_bank_account: NotRequired[ + "SetupIntentCreateParamsPaymentMethodDataNzBankAccount" + ] + """ + If this is an nz_bank_account PaymentMethod, this hash contains details about the nz_bank_account payment method. + """ + oxxo: NotRequired["SetupIntentCreateParamsPaymentMethodDataOxxo"] + """ + If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. + """ + p24: NotRequired["SetupIntentCreateParamsPaymentMethodDataP24"] + """ + If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. + """ + pay_by_bank: NotRequired[ + "SetupIntentCreateParamsPaymentMethodDataPayByBank" + ] + """ + If this is a `pay_by_bank` PaymentMethod, this hash contains details about the PayByBank payment method. + """ + payco: NotRequired["SetupIntentCreateParamsPaymentMethodDataPayco"] + """ + If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method. + """ + paynow: NotRequired["SetupIntentCreateParamsPaymentMethodDataPaynow"] + """ + If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method. + """ + paypal: NotRequired["SetupIntentCreateParamsPaymentMethodDataPaypal"] + """ + If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method. + """ + paypay: NotRequired["SetupIntentCreateParamsPaymentMethodDataPaypay"] + """ + If this is a `paypay` PaymentMethod, this hash contains details about the PayPay payment method. + """ + payto: NotRequired["SetupIntentCreateParamsPaymentMethodDataPayto"] + """ + If this is a `payto` PaymentMethod, this hash contains details about the PayTo payment method. + """ + pix: NotRequired["SetupIntentCreateParamsPaymentMethodDataPix"] + """ + If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method. + """ + promptpay: NotRequired["SetupIntentCreateParamsPaymentMethodDataPromptpay"] + """ + If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method. + """ + qris: NotRequired["SetupIntentCreateParamsPaymentMethodDataQris"] + """ + If this is a `qris` PaymentMethod, this hash contains details about the QRIS payment method. + """ + radar_options: NotRequired[ + "SetupIntentCreateParamsPaymentMethodDataRadarOptions" + ] + """ + Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. + """ + rechnung: NotRequired["SetupIntentCreateParamsPaymentMethodDataRechnung"] + """ + If this is a `rechnung` PaymentMethod, this hash contains details about the Rechnung payment method. + """ + revolut_pay: NotRequired[ + "SetupIntentCreateParamsPaymentMethodDataRevolutPay" + ] + """ + If this is a `revolut_pay` PaymentMethod, this hash contains details about the Revolut Pay payment method. + """ + samsung_pay: NotRequired[ + "SetupIntentCreateParamsPaymentMethodDataSamsungPay" + ] + """ + If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method. + """ + satispay: NotRequired["SetupIntentCreateParamsPaymentMethodDataSatispay"] + """ + If this is a `satispay` PaymentMethod, this hash contains details about the Satispay payment method. + """ + sepa_debit: NotRequired[ + "SetupIntentCreateParamsPaymentMethodDataSepaDebit" + ] + """ + If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. + """ + shopeepay: NotRequired["SetupIntentCreateParamsPaymentMethodDataShopeepay"] + """ + If this is a Shopeepay PaymentMethod, this hash contains details about the Shopeepay payment method. + """ + sofort: NotRequired["SetupIntentCreateParamsPaymentMethodDataSofort"] + """ + If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. + """ + stripe_balance: NotRequired[ + "SetupIntentCreateParamsPaymentMethodDataStripeBalance" + ] + """ + This hash contains details about the Stripe balance payment method. + """ + swish: NotRequired["SetupIntentCreateParamsPaymentMethodDataSwish"] + """ + If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method. + """ + twint: NotRequired["SetupIntentCreateParamsPaymentMethodDataTwint"] + """ + If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method. + """ + type: Literal[ + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "alma", + "amazon_pay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "billie", + "blik", + "boleto", + "cashapp", + "crypto", + "customer_balance", + "eps", + "fpx", + "giropay", + "gopay", + "grabpay", + "id_bank_transfer", + "ideal", + "kakao_pay", + "klarna", + "konbini", + "kr_card", + "link", + "mb_way", + "mobilepay", + "multibanco", + "naver_pay", + "nz_bank_account", + "oxxo", + "p24", + "pay_by_bank", + "payco", + "paynow", + "paypal", + "paypay", + "payto", + "pix", + "promptpay", + "qris", + "rechnung", + "revolut_pay", + "samsung_pay", + "satispay", + "sepa_debit", + "shopeepay", + "sofort", + "stripe_balance", + "swish", + "twint", + "us_bank_account", + "wechat_pay", + "zip", + ] + """ + The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. + """ + us_bank_account: NotRequired[ + "SetupIntentCreateParamsPaymentMethodDataUsBankAccount" + ] + """ + If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. + """ + wechat_pay: NotRequired[ + "SetupIntentCreateParamsPaymentMethodDataWechatPay" + ] + """ + If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method. + """ + zip: NotRequired["SetupIntentCreateParamsPaymentMethodDataZip"] + """ + If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method. + """ + + +class SetupIntentCreateParamsPaymentMethodDataAcssDebit(TypedDict): + account_number: str + """ + Customer's bank account number. + """ + institution_number: str + """ + Institution number of the customer's bank. + """ + transit_number: str + """ + Transit number of the customer's bank. + """ + + +class SetupIntentCreateParamsPaymentMethodDataAffirm(TypedDict): + pass + + +class SetupIntentCreateParamsPaymentMethodDataAfterpayClearpay(TypedDict): + pass + + +class SetupIntentCreateParamsPaymentMethodDataAlipay(TypedDict): + pass + + +class SetupIntentCreateParamsPaymentMethodDataAlma(TypedDict): + pass + + +class SetupIntentCreateParamsPaymentMethodDataAmazonPay(TypedDict): + pass + + +class SetupIntentCreateParamsPaymentMethodDataAuBecsDebit(TypedDict): + account_number: str + """ + The account number for the bank account. + """ + bsb_number: str + """ + Bank-State-Branch number of the bank account. + """ + + +class SetupIntentCreateParamsPaymentMethodDataBacsDebit(TypedDict): + account_number: NotRequired[str] + """ + Account number of the bank account that the funds will be debited from. + """ + sort_code: NotRequired[str] + """ + Sort code of the bank account. (e.g., `10-20-30`) + """ + + +class SetupIntentCreateParamsPaymentMethodDataBancontact(TypedDict): + pass + + +class SetupIntentCreateParamsPaymentMethodDataBillie(TypedDict): + pass + + +class SetupIntentCreateParamsPaymentMethodDataBillingDetails(TypedDict): + address: NotRequired[ + "Literal['']|SetupIntentCreateParamsPaymentMethodDataBillingDetailsAddress" + ] + """ + Billing address. + """ + email: NotRequired["Literal['']|str"] + """ + Email address. + """ + name: NotRequired["Literal['']|str"] + """ + Full name. + """ + phone: NotRequired["Literal['']|str"] + """ + Billing phone number (including extension). + """ + tax_id: NotRequired[str] + """ + Taxpayer identification number. Used only for transactions between LATAM buyers and non-LATAM sellers. + """ + + +class SetupIntentCreateParamsPaymentMethodDataBillingDetailsAddress(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. + """ + + +class SetupIntentCreateParamsPaymentMethodDataBlik(TypedDict): + pass + + +class SetupIntentCreateParamsPaymentMethodDataBoleto(TypedDict): + tax_id: str + """ + The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers) + """ + + +class SetupIntentCreateParamsPaymentMethodDataCashapp(TypedDict): + pass + + +class SetupIntentCreateParamsPaymentMethodDataCrypto(TypedDict): + pass + + +class SetupIntentCreateParamsPaymentMethodDataCustomerBalance(TypedDict): + pass + + +class SetupIntentCreateParamsPaymentMethodDataEps(TypedDict): + bank: NotRequired[ + Literal[ + "arzte_und_apotheker_bank", + "austrian_anadi_bank_ag", + "bank_austria", + "bankhaus_carl_spangler", + "bankhaus_schelhammer_und_schattera_ag", + "bawag_psk_ag", + "bks_bank_ag", + "brull_kallmus_bank_ag", + "btv_vier_lander_bank", + "capital_bank_grawe_gruppe_ag", + "deutsche_bank_ag", + "dolomitenbank", + "easybank_ag", + "erste_bank_und_sparkassen", + "hypo_alpeadriabank_international_ag", + "hypo_bank_burgenland_aktiengesellschaft", + "hypo_noe_lb_fur_niederosterreich_u_wien", + "hypo_oberosterreich_salzburg_steiermark", + "hypo_tirol_bank_ag", + "hypo_vorarlberg_bank_ag", + "marchfelder_bank", + "oberbank_ag", + "raiffeisen_bankengruppe_osterreich", + "schoellerbank_ag", + "sparda_bank_wien", + "volksbank_gruppe", + "volkskreditbank_ag", + "vr_bank_braunau", + ] + ] + """ + The customer's bank. + """ + + +class SetupIntentCreateParamsPaymentMethodDataFpx(TypedDict): + account_holder_type: NotRequired[Literal["company", "individual"]] + """ + Account holder type for FPX transaction + """ + bank: Literal[ + "affin_bank", + "agrobank", + "alliance_bank", + "ambank", + "bank_islam", + "bank_muamalat", + "bank_of_china", + "bank_rakyat", + "bsn", + "cimb", + "deutsche_bank", + "hong_leong_bank", + "hsbc", + "kfh", + "maybank2e", + "maybank2u", + "ocbc", + "pb_enterprise", + "public_bank", + "rhb", + "standard_chartered", + "uob", + ] + """ + The customer's bank. + """ + + +class SetupIntentCreateParamsPaymentMethodDataGiropay(TypedDict): + pass + + +class SetupIntentCreateParamsPaymentMethodDataGopay(TypedDict): + pass + + +class SetupIntentCreateParamsPaymentMethodDataGrabpay(TypedDict): + pass + + +class SetupIntentCreateParamsPaymentMethodDataIdBankTransfer(TypedDict): + bank: NotRequired[Literal["bca", "bni", "bri", "cimb", "permata"]] + """ + Bank where the account is held. + """ + + +class SetupIntentCreateParamsPaymentMethodDataIdeal(TypedDict): + bank: NotRequired[ + Literal[ + "abn_amro", + "asn_bank", + "bunq", + "buut", + "handelsbanken", + "ing", + "knab", + "moneyou", + "n26", + "nn", + "rabobank", + "regiobank", + "revolut", + "sns_bank", + "triodos_bank", + "van_lanschot", + "yoursafe", + ] + ] + """ + The customer's bank. Only use this parameter for existing customers. Don't use it for new customers. + """ + + +class SetupIntentCreateParamsPaymentMethodDataInteracPresent(TypedDict): + pass + + +class SetupIntentCreateParamsPaymentMethodDataKakaoPay(TypedDict): + pass + + +class SetupIntentCreateParamsPaymentMethodDataKlarna(TypedDict): + dob: NotRequired["SetupIntentCreateParamsPaymentMethodDataKlarnaDob"] + """ + Customer's date of birth + """ + + +class SetupIntentCreateParamsPaymentMethodDataKlarnaDob(TypedDict): + day: int + """ + The day of birth, between 1 and 31. + """ + month: int + """ + The month of birth, between 1 and 12. + """ + year: int + """ + The four-digit year of birth. + """ + + +class SetupIntentCreateParamsPaymentMethodDataKonbini(TypedDict): + pass + + +class SetupIntentCreateParamsPaymentMethodDataKrCard(TypedDict): + pass + + +class SetupIntentCreateParamsPaymentMethodDataLink(TypedDict): + pass + + +class SetupIntentCreateParamsPaymentMethodDataMbWay(TypedDict): + pass + + +class SetupIntentCreateParamsPaymentMethodDataMobilepay(TypedDict): + pass + + +class SetupIntentCreateParamsPaymentMethodDataMultibanco(TypedDict): + pass + + +class SetupIntentCreateParamsPaymentMethodDataNaverPay(TypedDict): + funding: NotRequired[Literal["card", "points"]] + """ + Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`. + """ + + +class SetupIntentCreateParamsPaymentMethodDataNzBankAccount(TypedDict): + account_holder_name: NotRequired[str] + """ + The name on the bank account. Only required if the account holder name is different from the name of the authorized signatory collected in the PaymentMethod's billing details. + """ + account_number: str + """ + The account number for the bank account. + """ + bank_code: str + """ + The numeric code for the bank account's bank. + """ + branch_code: str + """ + The numeric code for the bank account's bank branch. + """ + reference: NotRequired[str] + suffix: str + """ + The suffix of the bank account number. + """ + + +class SetupIntentCreateParamsPaymentMethodDataOxxo(TypedDict): + pass + + +class SetupIntentCreateParamsPaymentMethodDataP24(TypedDict): + bank: NotRequired[ + Literal[ + "alior_bank", + "bank_millennium", + "bank_nowy_bfg_sa", + "bank_pekao_sa", + "banki_spbdzielcze", + "blik", + "bnp_paribas", + "boz", + "citi_handlowy", + "credit_agricole", + "envelobank", + "etransfer_pocztowy24", + "getin_bank", + "ideabank", + "ing", + "inteligo", + "mbank_mtransfer", + "nest_przelew", + "noble_pay", + "pbac_z_ipko", + "plus_bank", + "santander_przelew24", + "tmobile_usbugi_bankowe", + "toyota_bank", + "velobank", + "volkswagen_bank", + ] + ] + """ + The customer's bank. + """ + + +class SetupIntentCreateParamsPaymentMethodDataPayByBank(TypedDict): + pass + + +class SetupIntentCreateParamsPaymentMethodDataPayco(TypedDict): + pass + + +class SetupIntentCreateParamsPaymentMethodDataPaynow(TypedDict): + pass + + +class SetupIntentCreateParamsPaymentMethodDataPaypal(TypedDict): + pass + + +class SetupIntentCreateParamsPaymentMethodDataPaypay(TypedDict): + pass + + +class SetupIntentCreateParamsPaymentMethodDataPayto(TypedDict): + account_number: NotRequired[str] + """ + The account number for the bank account. + """ + bsb_number: NotRequired[str] + """ + Bank-State-Branch number of the bank account. + """ + pay_id: NotRequired[str] + """ + The PayID alias for the bank account. + """ + + +class SetupIntentCreateParamsPaymentMethodDataPix(TypedDict): + pass + + +class SetupIntentCreateParamsPaymentMethodDataPromptpay(TypedDict): + pass + + +class SetupIntentCreateParamsPaymentMethodDataQris(TypedDict): + pass + + +class SetupIntentCreateParamsPaymentMethodDataRadarOptions(TypedDict): + session: NotRequired[str] + """ + A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. + """ + + +class SetupIntentCreateParamsPaymentMethodDataRechnung(TypedDict): + dob: "SetupIntentCreateParamsPaymentMethodDataRechnungDob" + """ + Customer's date of birth + """ + + +class SetupIntentCreateParamsPaymentMethodDataRechnungDob(TypedDict): + day: int + """ + The day of birth, between 1 and 31. + """ + month: int + """ + The month of birth, between 1 and 12. + """ + year: int + """ + The four-digit year of birth. + """ + + +class SetupIntentCreateParamsPaymentMethodDataRevolutPay(TypedDict): + pass + + +class SetupIntentCreateParamsPaymentMethodDataSamsungPay(TypedDict): + pass + + +class SetupIntentCreateParamsPaymentMethodDataSatispay(TypedDict): + pass + + +class SetupIntentCreateParamsPaymentMethodDataSepaDebit(TypedDict): + iban: str + """ + IBAN of the bank account. + """ + + +class SetupIntentCreateParamsPaymentMethodDataShopeepay(TypedDict): + pass + + +class SetupIntentCreateParamsPaymentMethodDataSofort(TypedDict): + country: Literal["AT", "BE", "DE", "ES", "IT", "NL"] + """ + Two-letter ISO code representing the country the bank account is located in. + """ + + +class SetupIntentCreateParamsPaymentMethodDataStripeBalance(TypedDict): + account: NotRequired[str] + """ + The connected account ID whose Stripe balance to use as the source of payment + """ + source_type: NotRequired[Literal["bank_account", "card", "fpx"]] + """ + The [source_type](https://docs.stripe.com/api/balance/balance_object#balance_object-available-source_types) of the balance + """ + + +class SetupIntentCreateParamsPaymentMethodDataSwish(TypedDict): + pass + + +class SetupIntentCreateParamsPaymentMethodDataTwint(TypedDict): + pass + + +class SetupIntentCreateParamsPaymentMethodDataUsBankAccount(TypedDict): + account_holder_type: NotRequired[Literal["company", "individual"]] + """ + Account holder type: individual or company. + """ + account_number: NotRequired[str] + """ + Account number of the bank account. + """ + account_type: NotRequired[Literal["checking", "savings"]] + """ + Account type: checkings or savings. Defaults to checking if omitted. + """ + financial_connections_account: NotRequired[str] + """ + The ID of a Financial Connections Account to use as a payment method. + """ + routing_number: NotRequired[str] + """ + Routing number of the bank account. + """ + + +class SetupIntentCreateParamsPaymentMethodDataWechatPay(TypedDict): + pass + + +class SetupIntentCreateParamsPaymentMethodDataZip(TypedDict): + pass + + +class SetupIntentCreateParamsPaymentMethodOptions(TypedDict): + acss_debit: NotRequired[ + "SetupIntentCreateParamsPaymentMethodOptionsAcssDebit" + ] + """ + If this is a `acss_debit` SetupIntent, this sub-hash contains details about the ACSS Debit payment method options. + """ + amazon_pay: NotRequired[ + "SetupIntentCreateParamsPaymentMethodOptionsAmazonPay" + ] + """ + If this is a `amazon_pay` SetupIntent, this sub-hash contains details about the AmazonPay payment method options. + """ + bacs_debit: NotRequired[ + "SetupIntentCreateParamsPaymentMethodOptionsBacsDebit" + ] + """ + If this is a `bacs_debit` SetupIntent, this sub-hash contains details about the Bacs Debit payment method options. + """ + card: NotRequired["SetupIntentCreateParamsPaymentMethodOptionsCard"] + """ + Configuration for any card setup attempted on this SetupIntent. + """ + card_present: NotRequired[ + "SetupIntentCreateParamsPaymentMethodOptionsCardPresent" + ] + """ + If this is a `card_present` PaymentMethod, this sub-hash contains details about the card-present payment method options. + """ + klarna: NotRequired["SetupIntentCreateParamsPaymentMethodOptionsKlarna"] + """ + If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method options. + """ + link: NotRequired["SetupIntentCreateParamsPaymentMethodOptionsLink"] + """ + If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options. + """ + paypal: NotRequired["SetupIntentCreateParamsPaymentMethodOptionsPaypal"] + """ + If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options. + """ + payto: NotRequired["SetupIntentCreateParamsPaymentMethodOptionsPayto"] + """ + If this is a `payto` SetupIntent, this sub-hash contains details about the PayTo payment method options. + """ + pix: NotRequired["SetupIntentCreateParamsPaymentMethodOptionsPix"] + """ + If this is a `pix` SetupIntent, this sub-hash contains details about the Pix payment method options. + """ + sepa_debit: NotRequired[ + "SetupIntentCreateParamsPaymentMethodOptionsSepaDebit" + ] + """ + If this is a `sepa_debit` SetupIntent, this sub-hash contains details about the SEPA Debit payment method options. + """ + us_bank_account: NotRequired[ + "SetupIntentCreateParamsPaymentMethodOptionsUsBankAccount" + ] + """ + If this is a `us_bank_account` SetupIntent, this sub-hash contains details about the US bank account payment method options. + """ + + +class SetupIntentCreateParamsPaymentMethodOptionsAcssDebit(TypedDict): + currency: NotRequired[Literal["cad", "usd"]] + """ + 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). + """ + mandate_options: NotRequired[ + "SetupIntentCreateParamsPaymentMethodOptionsAcssDebitMandateOptions" + ] + """ + Additional fields for Mandate creation + """ + verification_method: NotRequired[ + Literal["automatic", "instant", "microdeposits"] + ] + """ + Bank account verification method. + """ + + +class SetupIntentCreateParamsPaymentMethodOptionsAcssDebitMandateOptions( + TypedDict, +): + custom_mandate_url: NotRequired["Literal['']|str"] + """ + A URL for custom mandate text to render during confirmation step. + The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent, + or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent. + """ + default_for: NotRequired[List[Literal["invoice", "subscription"]]] + """ + List of Stripe products where this mandate can be selected automatically. + """ + interval_description: NotRequired[str] + """ + Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'. + """ + payment_schedule: NotRequired[Literal["combined", "interval", "sporadic"]] + """ + Payment schedule for the mandate. + """ + transaction_type: NotRequired[Literal["business", "personal"]] + """ + Transaction type of the mandate. + """ + + +class SetupIntentCreateParamsPaymentMethodOptionsAmazonPay(TypedDict): + pass + + +class SetupIntentCreateParamsPaymentMethodOptionsBacsDebit(TypedDict): + mandate_options: NotRequired[ + "SetupIntentCreateParamsPaymentMethodOptionsBacsDebitMandateOptions" + ] + """ + Additional fields for Mandate creation + """ + + +class SetupIntentCreateParamsPaymentMethodOptionsBacsDebitMandateOptions( + TypedDict, +): + reference_prefix: NotRequired["Literal['']|str"] + """ + Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'. + """ + + +class SetupIntentCreateParamsPaymentMethodOptionsCard(TypedDict): + mandate_options: NotRequired[ + "SetupIntentCreateParamsPaymentMethodOptionsCardMandateOptions" + ] + """ + Configuration options for setting up an eMandate for cards issued in India. + """ + moto: NotRequired[bool] + """ + When specified, this parameter signals that a card has been collected + as MOTO (Mail Order Telephone Order) and thus out of scope for SCA. This + parameter can only be provided during confirmation. + """ + network: NotRequired[ + Literal[ + "amex", + "cartes_bancaires", + "diners", + "discover", + "eftpos_au", + "girocard", + "interac", + "jcb", + "link", + "mastercard", + "unionpay", + "unknown", + "visa", + ] + ] + """ + Selected network to process this SetupIntent on. Depends on the available networks of the card attached to the SetupIntent. Can be only set confirm-time. + """ + request_three_d_secure: NotRequired[ + Literal["any", "automatic", "challenge"] + ] + """ + We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + """ + three_d_secure: NotRequired[ + "SetupIntentCreateParamsPaymentMethodOptionsCardThreeDSecure" + ] + """ + If 3D Secure authentication was performed with a third-party provider, + the authentication details to use for this setup. + """ + + +class SetupIntentCreateParamsPaymentMethodOptionsCardMandateOptions(TypedDict): + amount: int + """ + Amount to be charged for future payments. + """ + amount_type: Literal["fixed", "maximum"] + """ + One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. + """ + currency: str + """ + Currency in which future payments will be charged. 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). + """ + description: NotRequired[str] + """ + A description of the mandate or subscription that is meant to be displayed to the customer. + """ + end_date: NotRequired[int] + """ + End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. + """ + interval: Literal["day", "month", "sporadic", "week", "year"] + """ + Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`. + """ + interval_count: NotRequired[int] + """ + The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`. + """ + reference: str + """ + Unique identifier for the mandate or subscription. + """ + start_date: int + """ + Start date of the mandate or subscription. Start date should not be lesser than yesterday. + """ + supported_types: NotRequired[List[Literal["india"]]] + """ + Specifies the type of mandates supported. Possible values are `india`. + """ + + +class SetupIntentCreateParamsPaymentMethodOptionsCardThreeDSecure(TypedDict): + ares_trans_status: NotRequired[Literal["A", "C", "I", "N", "R", "U", "Y"]] + """ + The `transStatus` returned from the card Issuer's ACS in the ARes. + """ + cryptogram: NotRequired[str] + """ + The cryptogram, also known as the "authentication value" (AAV, CAVV or + AEVV). This value is 20 bytes, base64-encoded into a 28-character string. + (Most 3D Secure providers will return the base64-encoded version, which + is what you should specify here.) + """ + electronic_commerce_indicator: NotRequired[ + Literal["01", "02", "05", "06", "07"] + ] + """ + The Electronic Commerce Indicator (ECI) is returned by your 3D Secure + provider and indicates what degree of authentication was performed. + """ + network_options: NotRequired[ + "SetupIntentCreateParamsPaymentMethodOptionsCardThreeDSecureNetworkOptions" + ] + """ + Network specific 3DS fields. Network specific arguments require an + explicit card brand choice. The parameter `payment_method_options.card.network`` + must be populated accordingly + """ + requestor_challenge_indicator: NotRequired[str] + """ + The challenge indicator (`threeDSRequestorChallengeInd`) which was requested in the + AReq sent to the card Issuer's ACS. A string containing 2 digits from 01-99. + """ + transaction_id: NotRequired[str] + """ + For 3D Secure 1, the XID. For 3D Secure 2, the Directory Server + Transaction ID (dsTransID). + """ + version: NotRequired[Literal["1.0.2", "2.1.0", "2.2.0"]] + """ + The version of 3D Secure that was performed. + """ + + +class SetupIntentCreateParamsPaymentMethodOptionsCardThreeDSecureNetworkOptions( + TypedDict, +): + cartes_bancaires: NotRequired[ + "SetupIntentCreateParamsPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancaires" + ] + """ + Cartes Bancaires-specific 3DS fields. + """ + + +class SetupIntentCreateParamsPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancaires( + TypedDict, +): + cb_avalgo: Literal["0", "1", "2", "3", "4", "A"] + """ + The cryptogram calculation algorithm used by the card Issuer's ACS + to calculate the Authentication cryptogram. Also known as `cavvAlgorithm`. + messageExtension: CB-AVALGO + """ + cb_exemption: NotRequired[str] + """ + The exemption indicator returned from Cartes Bancaires in the ARes. + message extension: CB-EXEMPTION; string (4 characters) + This is a 3 byte bitmap (low significant byte first and most significant + bit first) that has been Base64 encoded + """ + cb_score: NotRequired[int] + """ + The risk score returned from Cartes Bancaires in the ARes. + message extension: CB-SCORE; numeric value 0-99 + """ + + +class SetupIntentCreateParamsPaymentMethodOptionsCardPresent(TypedDict): + pass + + +class SetupIntentCreateParamsPaymentMethodOptionsKlarna(TypedDict): + currency: NotRequired[str] + """ + The currency of the SetupIntent. Three letter ISO currency code. + """ + on_demand: NotRequired[ + "SetupIntentCreateParamsPaymentMethodOptionsKlarnaOnDemand" + ] + """ + On-demand details if setting up a payment method for on-demand payments. + """ + preferred_locale: NotRequired[ + Literal[ + "cs-CZ", + "da-DK", + "de-AT", + "de-CH", + "de-DE", + "el-GR", + "en-AT", + "en-AU", + "en-BE", + "en-CA", + "en-CH", + "en-CZ", + "en-DE", + "en-DK", + "en-ES", + "en-FI", + "en-FR", + "en-GB", + "en-GR", + "en-IE", + "en-IT", + "en-NL", + "en-NO", + "en-NZ", + "en-PL", + "en-PT", + "en-RO", + "en-SE", + "en-US", + "es-ES", + "es-US", + "fi-FI", + "fr-BE", + "fr-CA", + "fr-CH", + "fr-FR", + "it-CH", + "it-IT", + "nb-NO", + "nl-BE", + "nl-NL", + "pl-PL", + "pt-PT", + "ro-RO", + "sv-FI", + "sv-SE", + ] + ] + """ + Preferred language of the Klarna authorization page that the customer is redirected to + """ + subscriptions: NotRequired[ + "Literal['']|List[SetupIntentCreateParamsPaymentMethodOptionsKlarnaSubscription]" + ] + """ + Subscription details if setting up or charging a subscription + """ + + +class SetupIntentCreateParamsPaymentMethodOptionsKlarnaOnDemand(TypedDict): + average_amount: NotRequired[int] + """ + Your average amount value. You can use a value across your customer base, or segment based on customer type, country, etc. + """ + maximum_amount: NotRequired[int] + """ + The maximum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. + """ + minimum_amount: NotRequired[int] + """ + The lowest or minimum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. + """ + purchase_interval: NotRequired[Literal["day", "month", "week", "year"]] + """ + Interval at which the customer is making purchases + """ + purchase_interval_count: NotRequired[int] + """ + The number of `purchase_interval` between charges + """ + + +class SetupIntentCreateParamsPaymentMethodOptionsKlarnaSubscription(TypedDict): + interval: Literal["day", "month", "week", "year"] + """ + Unit of time between subscription charges. + """ + interval_count: NotRequired[int] + """ + The number of intervals (specified in the `interval` attribute) between subscription charges. For example, `interval=month` and `interval_count=3` charges every 3 months. + """ + name: NotRequired[str] + """ + Name for subscription. + """ + next_billing: "SetupIntentCreateParamsPaymentMethodOptionsKlarnaSubscriptionNextBilling" + """ + Describes the upcoming charge for this subscription. + """ + reference: str + """ + A non-customer-facing reference to correlate subscription charges in the Klarna app. Use a value that persists across subscription charges. + """ + + +class SetupIntentCreateParamsPaymentMethodOptionsKlarnaSubscriptionNextBilling( + TypedDict, +): + amount: int + """ + The amount of the next charge for the subscription. + """ + date: str + """ + The date of the next charge for the subscription in YYYY-MM-DD format. + """ + + +class SetupIntentCreateParamsPaymentMethodOptionsLink(TypedDict): + persistent_token: NotRequired[str] + """ + [Deprecated] This is a legacy parameter that no longer has any function. + """ + + +class SetupIntentCreateParamsPaymentMethodOptionsPaypal(TypedDict): + billing_agreement_id: NotRequired[str] + """ + The PayPal Billing Agreement ID (BAID). This is an ID generated by PayPal which represents the mandate between the merchant and the customer. + """ + currency: NotRequired[str] + subsellers: NotRequired[List[str]] + """ + The Stripe connected account IDs of the sellers on the platform for this transaction (optional). Only allowed when [separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) are used. + """ + + +class SetupIntentCreateParamsPaymentMethodOptionsPayto(TypedDict): + mandate_options: NotRequired[ + "SetupIntentCreateParamsPaymentMethodOptionsPaytoMandateOptions" + ] + """ + Additional fields for Mandate creation. + """ + + +class SetupIntentCreateParamsPaymentMethodOptionsPaytoMandateOptions( + TypedDict +): + amount: NotRequired[int] + """ + Amount that will be collected. It is required when `amount_type` is `fixed`. + """ + amount_type: NotRequired[Literal["fixed", "maximum"]] + """ + The type of amount that will be collected. The amount charged must be exact or up to the value of `amount` param for `fixed` or `maximum` type respectively. + """ + end_date: NotRequired[str] + """ + Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no end date. + """ + payment_schedule: NotRequired[ + Literal[ + "adhoc", + "annual", + "daily", + "fortnightly", + "monthly", + "quarterly", + "semi_annual", + "weekly", + ] + ] + """ + The periodicity at which payments will be collected. + """ + payments_per_period: NotRequired[int] + """ + The number of payments that will be made during a payment period. Defaults to 1 except for when `payment_schedule` is `adhoc`. In that case, it defaults to no limit. + """ + purpose: NotRequired[ + Literal[ + "dependant_support", + "government", + "loan", + "mortgage", + "other", + "pension", + "personal", + "retail", + "salary", + "tax", + "utility", + ] + ] + """ + The purpose for which payments are made. Defaults to retail. + """ + start_date: NotRequired[str] + """ + Date, in YYYY-MM-DD format, from which payments will be collected. Defaults to confirmation time. + """ + + +class SetupIntentCreateParamsPaymentMethodOptionsPix(TypedDict): + mandate_options: NotRequired[ + "SetupIntentCreateParamsPaymentMethodOptionsPixMandateOptions" + ] + """ + Additional fields for mandate creation. + """ + + +class SetupIntentCreateParamsPaymentMethodOptionsPixMandateOptions(TypedDict): + amount: NotRequired[int] + """ + Amount to be charged for future payments. Required when `amount_type=fixed`. If not provided for `amount_type=maximum`, defaults to 40000. + """ + amount_includes_iof: NotRequired[Literal["always", "never"]] + """ + Determines if the amount includes the IOF tax. Defaults to `never`. + """ + amount_type: NotRequired[Literal["fixed", "maximum"]] + """ + Type of amount. Defaults to `maximum`. + """ + currency: NotRequired[str] + """ + Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Only `brl` is supported currently. + """ + end_date: NotRequired[str] + """ + Date when the mandate expires and no further payments will be charged, in `YYYY-MM-DD`. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. + """ + payment_schedule: NotRequired[ + Literal["halfyearly", "monthly", "quarterly", "weekly", "yearly"] + ] + """ + Schedule at which the future payments will be charged. Defaults to `weekly`. + """ + reference: NotRequired[str] + """ + Subscription name displayed to buyers in their bank app. Defaults to the displayable business name. + """ + start_date: NotRequired[str] + """ + Start date of the mandate, in `YYYY-MM-DD`. Start date should be at least 3 days in the future. Defaults to 3 days after the current date. + """ + + +class SetupIntentCreateParamsPaymentMethodOptionsSepaDebit(TypedDict): + mandate_options: NotRequired[ + "SetupIntentCreateParamsPaymentMethodOptionsSepaDebitMandateOptions" + ] + """ + Additional fields for Mandate creation + """ + + +class SetupIntentCreateParamsPaymentMethodOptionsSepaDebitMandateOptions( + TypedDict, +): + reference_prefix: NotRequired["Literal['']|str"] + """ + Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'. + """ + + +class SetupIntentCreateParamsPaymentMethodOptionsUsBankAccount(TypedDict): + financial_connections: NotRequired[ + "SetupIntentCreateParamsPaymentMethodOptionsUsBankAccountFinancialConnections" + ] + """ + Additional fields for Financial Connections Session creation + """ + mandate_options: NotRequired[ + "SetupIntentCreateParamsPaymentMethodOptionsUsBankAccountMandateOptions" + ] + """ + Additional fields for Mandate creation + """ + networks: NotRequired[ + "SetupIntentCreateParamsPaymentMethodOptionsUsBankAccountNetworks" + ] + """ + Additional fields for network related functions + """ + verification_method: NotRequired[ + Literal["automatic", "instant", "microdeposits"] + ] + """ + Bank account verification method. + """ + + +class SetupIntentCreateParamsPaymentMethodOptionsUsBankAccountFinancialConnections( + TypedDict, +): + filters: NotRequired[ + "SetupIntentCreateParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters" + ] + """ + Provide filters for the linked accounts that the customer can select for the payment method. + """ + manual_entry: NotRequired[ + "SetupIntentCreateParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsManualEntry" + ] + """ + Customize manual entry behavior + """ + permissions: NotRequired[ + List[ + Literal["balances", "ownership", "payment_method", "transactions"] + ] + ] + """ + The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. + """ + prefetch: NotRequired[ + List[ + Literal[ + "balances", "inferred_balances", "ownership", "transactions" + ] + ] + ] + """ + List of data features that you would like to retrieve upon account creation. + """ + return_url: NotRequired[str] + """ + For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. + """ + + +class SetupIntentCreateParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters( + TypedDict, +): + account_subcategories: NotRequired[List[Literal["checking", "savings"]]] + """ + The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`. + """ + institution: NotRequired[str] + """ + ID of the institution to use to filter for selectable accounts. + """ + + +class SetupIntentCreateParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsManualEntry( + TypedDict, +): + mode: Literal["automatic", "custom"] + """ + Settings for configuring manual entry of account details. + """ + + +class SetupIntentCreateParamsPaymentMethodOptionsUsBankAccountMandateOptions( + TypedDict, +): + collection_method: NotRequired["Literal['']|Literal['paper']"] + """ + The method used to collect offline mandate customer acceptance. + """ + + +class SetupIntentCreateParamsPaymentMethodOptionsUsBankAccountNetworks( + TypedDict, +): + requested: NotRequired[List[Literal["ach", "us_domestic_wire"]]] + """ + Triggers validations to run across the selected networks + """ + + +class SetupIntentCreateParamsSingleUse(TypedDict): + amount: int + """ + Amount the customer is granting permission to collect later. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). + """ + 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/_setup_intent_list_params.py b/stripe/params/_setup_intent_list_params.py new file mode 100644 index 000000000..bb7a87ede --- /dev/null +++ b/stripe/params/_setup_intent_list_params.py @@ -0,0 +1,65 @@ +# -*- 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 SetupIntentListParams(RequestOptions): + attach_to_self: NotRequired[bool] + """ + If present, the SetupIntent's payment method will be attached to the in-context Stripe Account. + + It can only be used for this Stripe Account's own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer. + """ + created: NotRequired["SetupIntentListParamsCreated|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. + """ + customer: NotRequired[str] + """ + Only return SetupIntents for the customer specified by this customer ID. + """ + customer_account: NotRequired[str] + """ + Only return SetupIntents for the account specified by this customer ID. + """ + 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. + """ + payment_method: NotRequired[str] + """ + Only return SetupIntents that associate with the specified payment method. + """ + 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 SetupIntentListParamsCreated(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/_setup_intent_modify_params.py b/stripe/params/_setup_intent_modify_params.py new file mode 100644 index 000000000..61ab6344e --- /dev/null +++ b/stripe/params/_setup_intent_modify_params.py @@ -0,0 +1,1646 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class SetupIntentModifyParams(RequestOptions): + attach_to_self: NotRequired[bool] + """ + If present, the SetupIntent's payment method will be attached to the in-context Stripe Account. + + It can only be used for this Stripe Account's own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer. + """ + customer: NotRequired[str] + """ + ID of the Customer this SetupIntent belongs to, if one exists. + + If present, the SetupIntent's payment method will be attached to the Customer on successful setup. Payment methods attached to other Customers cannot be used with this SetupIntent. + """ + customer_account: NotRequired[str] + """ + ID of the Account this SetupIntent belongs to, if one exists. + + If present, the SetupIntent's payment method will be attached to the Account on successful setup. Payment methods attached to other Accounts cannot be used with this SetupIntent. + """ + description: NotRequired[str] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + flow_directions: NotRequired[List[Literal["inbound", "outbound"]]] + """ + Indicates the directions of money movement for which this payment method is intended to be used. + + Include `inbound` if you intend to use the payment method as the origin to pull funds from. Include `outbound` if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + payment_method: NotRequired[str] + """ + ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent. To unset this field to null, pass in an empty string. + """ + payment_method_configuration: NotRequired[str] + """ + The ID of the [payment method configuration](https://stripe.com/docs/api/payment_method_configurations) to use with this SetupIntent. + """ + payment_method_data: NotRequired[ + "SetupIntentModifyParamsPaymentMethodData" + ] + """ + When included, this hash creates a PaymentMethod that is set as the [`payment_method`](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-payment_method) + value in the SetupIntent. + """ + payment_method_options: NotRequired[ + "SetupIntentModifyParamsPaymentMethodOptions" + ] + """ + Payment method-specific configuration for this SetupIntent. + """ + payment_method_types: NotRequired[List[str]] + """ + The list of payment method types (for example, card) that this SetupIntent can set up. If you don't provide this, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). A list of valid payment method types can be found [here](https://docs.stripe.com/api/payment_methods/object#payment_method_object-type). + """ + + +class SetupIntentModifyParamsPaymentMethodData(TypedDict): + acss_debit: NotRequired[ + "SetupIntentModifyParamsPaymentMethodDataAcssDebit" + ] + """ + If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method. + """ + affirm: NotRequired["SetupIntentModifyParamsPaymentMethodDataAffirm"] + """ + If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method. + """ + afterpay_clearpay: NotRequired[ + "SetupIntentModifyParamsPaymentMethodDataAfterpayClearpay" + ] + """ + If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method. + """ + alipay: NotRequired["SetupIntentModifyParamsPaymentMethodDataAlipay"] + """ + If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. + """ + allow_redisplay: NotRequired[Literal["always", "limited", "unspecified"]] + """ + This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`. + """ + alma: NotRequired["SetupIntentModifyParamsPaymentMethodDataAlma"] + """ + If this is a Alma PaymentMethod, this hash contains details about the Alma payment method. + """ + amazon_pay: NotRequired[ + "SetupIntentModifyParamsPaymentMethodDataAmazonPay" + ] + """ + If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method. + """ + au_becs_debit: NotRequired[ + "SetupIntentModifyParamsPaymentMethodDataAuBecsDebit" + ] + """ + If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. + """ + bacs_debit: NotRequired[ + "SetupIntentModifyParamsPaymentMethodDataBacsDebit" + ] + """ + If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account. + """ + bancontact: NotRequired[ + "SetupIntentModifyParamsPaymentMethodDataBancontact" + ] + """ + If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method. + """ + billie: NotRequired["SetupIntentModifyParamsPaymentMethodDataBillie"] + """ + If this is a `billie` PaymentMethod, this hash contains details about the Billie payment method. + """ + billing_details: NotRequired[ + "SetupIntentModifyParamsPaymentMethodDataBillingDetails" + ] + """ + Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. + """ + blik: NotRequired["SetupIntentModifyParamsPaymentMethodDataBlik"] + """ + If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method. + """ + boleto: NotRequired["SetupIntentModifyParamsPaymentMethodDataBoleto"] + """ + If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method. + """ + cashapp: NotRequired["SetupIntentModifyParamsPaymentMethodDataCashapp"] + """ + If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. + """ + crypto: NotRequired["SetupIntentModifyParamsPaymentMethodDataCrypto"] + """ + If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment method. + """ + customer_balance: NotRequired[ + "SetupIntentModifyParamsPaymentMethodDataCustomerBalance" + ] + """ + If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. + """ + eps: NotRequired["SetupIntentModifyParamsPaymentMethodDataEps"] + """ + If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. + """ + fpx: NotRequired["SetupIntentModifyParamsPaymentMethodDataFpx"] + """ + If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method. + """ + giropay: NotRequired["SetupIntentModifyParamsPaymentMethodDataGiropay"] + """ + If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method. + """ + gopay: NotRequired["SetupIntentModifyParamsPaymentMethodDataGopay"] + """ + If this is a Gopay PaymentMethod, this hash contains details about the Gopay payment method. + """ + grabpay: NotRequired["SetupIntentModifyParamsPaymentMethodDataGrabpay"] + """ + If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method. + """ + id_bank_transfer: NotRequired[ + "SetupIntentModifyParamsPaymentMethodDataIdBankTransfer" + ] + """ + If this is an `IdBankTransfer` PaymentMethod, this hash contains details about the IdBankTransfer payment method. + """ + ideal: NotRequired["SetupIntentModifyParamsPaymentMethodDataIdeal"] + """ + If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. + """ + interac_present: NotRequired[ + "SetupIntentModifyParamsPaymentMethodDataInteracPresent" + ] + """ + If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. + """ + kakao_pay: NotRequired["SetupIntentModifyParamsPaymentMethodDataKakaoPay"] + """ + If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method. + """ + klarna: NotRequired["SetupIntentModifyParamsPaymentMethodDataKlarna"] + """ + If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method. + """ + konbini: NotRequired["SetupIntentModifyParamsPaymentMethodDataKonbini"] + """ + If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. + """ + kr_card: NotRequired["SetupIntentModifyParamsPaymentMethodDataKrCard"] + """ + If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method. + """ + link: NotRequired["SetupIntentModifyParamsPaymentMethodDataLink"] + """ + If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. + """ + mb_way: NotRequired["SetupIntentModifyParamsPaymentMethodDataMbWay"] + """ + If this is a MB WAY PaymentMethod, this hash contains details about the MB WAY payment method. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + mobilepay: NotRequired["SetupIntentModifyParamsPaymentMethodDataMobilepay"] + """ + If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method. + """ + multibanco: NotRequired[ + "SetupIntentModifyParamsPaymentMethodDataMultibanco" + ] + """ + If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method. + """ + naver_pay: NotRequired["SetupIntentModifyParamsPaymentMethodDataNaverPay"] + """ + If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method. + """ + nz_bank_account: NotRequired[ + "SetupIntentModifyParamsPaymentMethodDataNzBankAccount" + ] + """ + If this is an nz_bank_account PaymentMethod, this hash contains details about the nz_bank_account payment method. + """ + oxxo: NotRequired["SetupIntentModifyParamsPaymentMethodDataOxxo"] + """ + If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. + """ + p24: NotRequired["SetupIntentModifyParamsPaymentMethodDataP24"] + """ + If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. + """ + pay_by_bank: NotRequired[ + "SetupIntentModifyParamsPaymentMethodDataPayByBank" + ] + """ + If this is a `pay_by_bank` PaymentMethod, this hash contains details about the PayByBank payment method. + """ + payco: NotRequired["SetupIntentModifyParamsPaymentMethodDataPayco"] + """ + If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method. + """ + paynow: NotRequired["SetupIntentModifyParamsPaymentMethodDataPaynow"] + """ + If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method. + """ + paypal: NotRequired["SetupIntentModifyParamsPaymentMethodDataPaypal"] + """ + If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method. + """ + paypay: NotRequired["SetupIntentModifyParamsPaymentMethodDataPaypay"] + """ + If this is a `paypay` PaymentMethod, this hash contains details about the PayPay payment method. + """ + payto: NotRequired["SetupIntentModifyParamsPaymentMethodDataPayto"] + """ + If this is a `payto` PaymentMethod, this hash contains details about the PayTo payment method. + """ + pix: NotRequired["SetupIntentModifyParamsPaymentMethodDataPix"] + """ + If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method. + """ + promptpay: NotRequired["SetupIntentModifyParamsPaymentMethodDataPromptpay"] + """ + If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method. + """ + qris: NotRequired["SetupIntentModifyParamsPaymentMethodDataQris"] + """ + If this is a `qris` PaymentMethod, this hash contains details about the QRIS payment method. + """ + radar_options: NotRequired[ + "SetupIntentModifyParamsPaymentMethodDataRadarOptions" + ] + """ + Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. + """ + rechnung: NotRequired["SetupIntentModifyParamsPaymentMethodDataRechnung"] + """ + If this is a `rechnung` PaymentMethod, this hash contains details about the Rechnung payment method. + """ + revolut_pay: NotRequired[ + "SetupIntentModifyParamsPaymentMethodDataRevolutPay" + ] + """ + If this is a `revolut_pay` PaymentMethod, this hash contains details about the Revolut Pay payment method. + """ + samsung_pay: NotRequired[ + "SetupIntentModifyParamsPaymentMethodDataSamsungPay" + ] + """ + If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method. + """ + satispay: NotRequired["SetupIntentModifyParamsPaymentMethodDataSatispay"] + """ + If this is a `satispay` PaymentMethod, this hash contains details about the Satispay payment method. + """ + sepa_debit: NotRequired[ + "SetupIntentModifyParamsPaymentMethodDataSepaDebit" + ] + """ + If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. + """ + shopeepay: NotRequired["SetupIntentModifyParamsPaymentMethodDataShopeepay"] + """ + If this is a Shopeepay PaymentMethod, this hash contains details about the Shopeepay payment method. + """ + sofort: NotRequired["SetupIntentModifyParamsPaymentMethodDataSofort"] + """ + If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. + """ + stripe_balance: NotRequired[ + "SetupIntentModifyParamsPaymentMethodDataStripeBalance" + ] + """ + This hash contains details about the Stripe balance payment method. + """ + swish: NotRequired["SetupIntentModifyParamsPaymentMethodDataSwish"] + """ + If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method. + """ + twint: NotRequired["SetupIntentModifyParamsPaymentMethodDataTwint"] + """ + If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method. + """ + type: Literal[ + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "alma", + "amazon_pay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "billie", + "blik", + "boleto", + "cashapp", + "crypto", + "customer_balance", + "eps", + "fpx", + "giropay", + "gopay", + "grabpay", + "id_bank_transfer", + "ideal", + "kakao_pay", + "klarna", + "konbini", + "kr_card", + "link", + "mb_way", + "mobilepay", + "multibanco", + "naver_pay", + "nz_bank_account", + "oxxo", + "p24", + "pay_by_bank", + "payco", + "paynow", + "paypal", + "paypay", + "payto", + "pix", + "promptpay", + "qris", + "rechnung", + "revolut_pay", + "samsung_pay", + "satispay", + "sepa_debit", + "shopeepay", + "sofort", + "stripe_balance", + "swish", + "twint", + "us_bank_account", + "wechat_pay", + "zip", + ] + """ + The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. + """ + us_bank_account: NotRequired[ + "SetupIntentModifyParamsPaymentMethodDataUsBankAccount" + ] + """ + If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. + """ + wechat_pay: NotRequired[ + "SetupIntentModifyParamsPaymentMethodDataWechatPay" + ] + """ + If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method. + """ + zip: NotRequired["SetupIntentModifyParamsPaymentMethodDataZip"] + """ + If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method. + """ + + +class SetupIntentModifyParamsPaymentMethodDataAcssDebit(TypedDict): + account_number: str + """ + Customer's bank account number. + """ + institution_number: str + """ + Institution number of the customer's bank. + """ + transit_number: str + """ + Transit number of the customer's bank. + """ + + +class SetupIntentModifyParamsPaymentMethodDataAffirm(TypedDict): + pass + + +class SetupIntentModifyParamsPaymentMethodDataAfterpayClearpay(TypedDict): + pass + + +class SetupIntentModifyParamsPaymentMethodDataAlipay(TypedDict): + pass + + +class SetupIntentModifyParamsPaymentMethodDataAlma(TypedDict): + pass + + +class SetupIntentModifyParamsPaymentMethodDataAmazonPay(TypedDict): + pass + + +class SetupIntentModifyParamsPaymentMethodDataAuBecsDebit(TypedDict): + account_number: str + """ + The account number for the bank account. + """ + bsb_number: str + """ + Bank-State-Branch number of the bank account. + """ + + +class SetupIntentModifyParamsPaymentMethodDataBacsDebit(TypedDict): + account_number: NotRequired[str] + """ + Account number of the bank account that the funds will be debited from. + """ + sort_code: NotRequired[str] + """ + Sort code of the bank account. (e.g., `10-20-30`) + """ + + +class SetupIntentModifyParamsPaymentMethodDataBancontact(TypedDict): + pass + + +class SetupIntentModifyParamsPaymentMethodDataBillie(TypedDict): + pass + + +class SetupIntentModifyParamsPaymentMethodDataBillingDetails(TypedDict): + address: NotRequired[ + "Literal['']|SetupIntentModifyParamsPaymentMethodDataBillingDetailsAddress" + ] + """ + Billing address. + """ + email: NotRequired["Literal['']|str"] + """ + Email address. + """ + name: NotRequired["Literal['']|str"] + """ + Full name. + """ + phone: NotRequired["Literal['']|str"] + """ + Billing phone number (including extension). + """ + tax_id: NotRequired[str] + """ + Taxpayer identification number. Used only for transactions between LATAM buyers and non-LATAM sellers. + """ + + +class SetupIntentModifyParamsPaymentMethodDataBillingDetailsAddress(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. + """ + + +class SetupIntentModifyParamsPaymentMethodDataBlik(TypedDict): + pass + + +class SetupIntentModifyParamsPaymentMethodDataBoleto(TypedDict): + tax_id: str + """ + The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers) + """ + + +class SetupIntentModifyParamsPaymentMethodDataCashapp(TypedDict): + pass + + +class SetupIntentModifyParamsPaymentMethodDataCrypto(TypedDict): + pass + + +class SetupIntentModifyParamsPaymentMethodDataCustomerBalance(TypedDict): + pass + + +class SetupIntentModifyParamsPaymentMethodDataEps(TypedDict): + bank: NotRequired[ + Literal[ + "arzte_und_apotheker_bank", + "austrian_anadi_bank_ag", + "bank_austria", + "bankhaus_carl_spangler", + "bankhaus_schelhammer_und_schattera_ag", + "bawag_psk_ag", + "bks_bank_ag", + "brull_kallmus_bank_ag", + "btv_vier_lander_bank", + "capital_bank_grawe_gruppe_ag", + "deutsche_bank_ag", + "dolomitenbank", + "easybank_ag", + "erste_bank_und_sparkassen", + "hypo_alpeadriabank_international_ag", + "hypo_bank_burgenland_aktiengesellschaft", + "hypo_noe_lb_fur_niederosterreich_u_wien", + "hypo_oberosterreich_salzburg_steiermark", + "hypo_tirol_bank_ag", + "hypo_vorarlberg_bank_ag", + "marchfelder_bank", + "oberbank_ag", + "raiffeisen_bankengruppe_osterreich", + "schoellerbank_ag", + "sparda_bank_wien", + "volksbank_gruppe", + "volkskreditbank_ag", + "vr_bank_braunau", + ] + ] + """ + The customer's bank. + """ + + +class SetupIntentModifyParamsPaymentMethodDataFpx(TypedDict): + account_holder_type: NotRequired[Literal["company", "individual"]] + """ + Account holder type for FPX transaction + """ + bank: Literal[ + "affin_bank", + "agrobank", + "alliance_bank", + "ambank", + "bank_islam", + "bank_muamalat", + "bank_of_china", + "bank_rakyat", + "bsn", + "cimb", + "deutsche_bank", + "hong_leong_bank", + "hsbc", + "kfh", + "maybank2e", + "maybank2u", + "ocbc", + "pb_enterprise", + "public_bank", + "rhb", + "standard_chartered", + "uob", + ] + """ + The customer's bank. + """ + + +class SetupIntentModifyParamsPaymentMethodDataGiropay(TypedDict): + pass + + +class SetupIntentModifyParamsPaymentMethodDataGopay(TypedDict): + pass + + +class SetupIntentModifyParamsPaymentMethodDataGrabpay(TypedDict): + pass + + +class SetupIntentModifyParamsPaymentMethodDataIdBankTransfer(TypedDict): + bank: NotRequired[Literal["bca", "bni", "bri", "cimb", "permata"]] + """ + Bank where the account is held. + """ + + +class SetupIntentModifyParamsPaymentMethodDataIdeal(TypedDict): + bank: NotRequired[ + Literal[ + "abn_amro", + "asn_bank", + "bunq", + "buut", + "handelsbanken", + "ing", + "knab", + "moneyou", + "n26", + "nn", + "rabobank", + "regiobank", + "revolut", + "sns_bank", + "triodos_bank", + "van_lanschot", + "yoursafe", + ] + ] + """ + The customer's bank. Only use this parameter for existing customers. Don't use it for new customers. + """ + + +class SetupIntentModifyParamsPaymentMethodDataInteracPresent(TypedDict): + pass + + +class SetupIntentModifyParamsPaymentMethodDataKakaoPay(TypedDict): + pass + + +class SetupIntentModifyParamsPaymentMethodDataKlarna(TypedDict): + dob: NotRequired["SetupIntentModifyParamsPaymentMethodDataKlarnaDob"] + """ + Customer's date of birth + """ + + +class SetupIntentModifyParamsPaymentMethodDataKlarnaDob(TypedDict): + day: int + """ + The day of birth, between 1 and 31. + """ + month: int + """ + The month of birth, between 1 and 12. + """ + year: int + """ + The four-digit year of birth. + """ + + +class SetupIntentModifyParamsPaymentMethodDataKonbini(TypedDict): + pass + + +class SetupIntentModifyParamsPaymentMethodDataKrCard(TypedDict): + pass + + +class SetupIntentModifyParamsPaymentMethodDataLink(TypedDict): + pass + + +class SetupIntentModifyParamsPaymentMethodDataMbWay(TypedDict): + pass + + +class SetupIntentModifyParamsPaymentMethodDataMobilepay(TypedDict): + pass + + +class SetupIntentModifyParamsPaymentMethodDataMultibanco(TypedDict): + pass + + +class SetupIntentModifyParamsPaymentMethodDataNaverPay(TypedDict): + funding: NotRequired[Literal["card", "points"]] + """ + Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`. + """ + + +class SetupIntentModifyParamsPaymentMethodDataNzBankAccount(TypedDict): + account_holder_name: NotRequired[str] + """ + The name on the bank account. Only required if the account holder name is different from the name of the authorized signatory collected in the PaymentMethod's billing details. + """ + account_number: str + """ + The account number for the bank account. + """ + bank_code: str + """ + The numeric code for the bank account's bank. + """ + branch_code: str + """ + The numeric code for the bank account's bank branch. + """ + reference: NotRequired[str] + suffix: str + """ + The suffix of the bank account number. + """ + + +class SetupIntentModifyParamsPaymentMethodDataOxxo(TypedDict): + pass + + +class SetupIntentModifyParamsPaymentMethodDataP24(TypedDict): + bank: NotRequired[ + Literal[ + "alior_bank", + "bank_millennium", + "bank_nowy_bfg_sa", + "bank_pekao_sa", + "banki_spbdzielcze", + "blik", + "bnp_paribas", + "boz", + "citi_handlowy", + "credit_agricole", + "envelobank", + "etransfer_pocztowy24", + "getin_bank", + "ideabank", + "ing", + "inteligo", + "mbank_mtransfer", + "nest_przelew", + "noble_pay", + "pbac_z_ipko", + "plus_bank", + "santander_przelew24", + "tmobile_usbugi_bankowe", + "toyota_bank", + "velobank", + "volkswagen_bank", + ] + ] + """ + The customer's bank. + """ + + +class SetupIntentModifyParamsPaymentMethodDataPayByBank(TypedDict): + pass + + +class SetupIntentModifyParamsPaymentMethodDataPayco(TypedDict): + pass + + +class SetupIntentModifyParamsPaymentMethodDataPaynow(TypedDict): + pass + + +class SetupIntentModifyParamsPaymentMethodDataPaypal(TypedDict): + pass + + +class SetupIntentModifyParamsPaymentMethodDataPaypay(TypedDict): + pass + + +class SetupIntentModifyParamsPaymentMethodDataPayto(TypedDict): + account_number: NotRequired[str] + """ + The account number for the bank account. + """ + bsb_number: NotRequired[str] + """ + Bank-State-Branch number of the bank account. + """ + pay_id: NotRequired[str] + """ + The PayID alias for the bank account. + """ + + +class SetupIntentModifyParamsPaymentMethodDataPix(TypedDict): + pass + + +class SetupIntentModifyParamsPaymentMethodDataPromptpay(TypedDict): + pass + + +class SetupIntentModifyParamsPaymentMethodDataQris(TypedDict): + pass + + +class SetupIntentModifyParamsPaymentMethodDataRadarOptions(TypedDict): + session: NotRequired[str] + """ + A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. + """ + + +class SetupIntentModifyParamsPaymentMethodDataRechnung(TypedDict): + dob: "SetupIntentModifyParamsPaymentMethodDataRechnungDob" + """ + Customer's date of birth + """ + + +class SetupIntentModifyParamsPaymentMethodDataRechnungDob(TypedDict): + day: int + """ + The day of birth, between 1 and 31. + """ + month: int + """ + The month of birth, between 1 and 12. + """ + year: int + """ + The four-digit year of birth. + """ + + +class SetupIntentModifyParamsPaymentMethodDataRevolutPay(TypedDict): + pass + + +class SetupIntentModifyParamsPaymentMethodDataSamsungPay(TypedDict): + pass + + +class SetupIntentModifyParamsPaymentMethodDataSatispay(TypedDict): + pass + + +class SetupIntentModifyParamsPaymentMethodDataSepaDebit(TypedDict): + iban: str + """ + IBAN of the bank account. + """ + + +class SetupIntentModifyParamsPaymentMethodDataShopeepay(TypedDict): + pass + + +class SetupIntentModifyParamsPaymentMethodDataSofort(TypedDict): + country: Literal["AT", "BE", "DE", "ES", "IT", "NL"] + """ + Two-letter ISO code representing the country the bank account is located in. + """ + + +class SetupIntentModifyParamsPaymentMethodDataStripeBalance(TypedDict): + account: NotRequired[str] + """ + The connected account ID whose Stripe balance to use as the source of payment + """ + source_type: NotRequired[Literal["bank_account", "card", "fpx"]] + """ + The [source_type](https://docs.stripe.com/api/balance/balance_object#balance_object-available-source_types) of the balance + """ + + +class SetupIntentModifyParamsPaymentMethodDataSwish(TypedDict): + pass + + +class SetupIntentModifyParamsPaymentMethodDataTwint(TypedDict): + pass + + +class SetupIntentModifyParamsPaymentMethodDataUsBankAccount(TypedDict): + account_holder_type: NotRequired[Literal["company", "individual"]] + """ + Account holder type: individual or company. + """ + account_number: NotRequired[str] + """ + Account number of the bank account. + """ + account_type: NotRequired[Literal["checking", "savings"]] + """ + Account type: checkings or savings. Defaults to checking if omitted. + """ + financial_connections_account: NotRequired[str] + """ + The ID of a Financial Connections Account to use as a payment method. + """ + routing_number: NotRequired[str] + """ + Routing number of the bank account. + """ + + +class SetupIntentModifyParamsPaymentMethodDataWechatPay(TypedDict): + pass + + +class SetupIntentModifyParamsPaymentMethodDataZip(TypedDict): + pass + + +class SetupIntentModifyParamsPaymentMethodOptions(TypedDict): + acss_debit: NotRequired[ + "SetupIntentModifyParamsPaymentMethodOptionsAcssDebit" + ] + """ + If this is a `acss_debit` SetupIntent, this sub-hash contains details about the ACSS Debit payment method options. + """ + amazon_pay: NotRequired[ + "SetupIntentModifyParamsPaymentMethodOptionsAmazonPay" + ] + """ + If this is a `amazon_pay` SetupIntent, this sub-hash contains details about the AmazonPay payment method options. + """ + bacs_debit: NotRequired[ + "SetupIntentModifyParamsPaymentMethodOptionsBacsDebit" + ] + """ + If this is a `bacs_debit` SetupIntent, this sub-hash contains details about the Bacs Debit payment method options. + """ + card: NotRequired["SetupIntentModifyParamsPaymentMethodOptionsCard"] + """ + Configuration for any card setup attempted on this SetupIntent. + """ + card_present: NotRequired[ + "SetupIntentModifyParamsPaymentMethodOptionsCardPresent" + ] + """ + If this is a `card_present` PaymentMethod, this sub-hash contains details about the card-present payment method options. + """ + klarna: NotRequired["SetupIntentModifyParamsPaymentMethodOptionsKlarna"] + """ + If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method options. + """ + link: NotRequired["SetupIntentModifyParamsPaymentMethodOptionsLink"] + """ + If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options. + """ + paypal: NotRequired["SetupIntentModifyParamsPaymentMethodOptionsPaypal"] + """ + If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options. + """ + payto: NotRequired["SetupIntentModifyParamsPaymentMethodOptionsPayto"] + """ + If this is a `payto` SetupIntent, this sub-hash contains details about the PayTo payment method options. + """ + pix: NotRequired["SetupIntentModifyParamsPaymentMethodOptionsPix"] + """ + If this is a `pix` SetupIntent, this sub-hash contains details about the Pix payment method options. + """ + sepa_debit: NotRequired[ + "SetupIntentModifyParamsPaymentMethodOptionsSepaDebit" + ] + """ + If this is a `sepa_debit` SetupIntent, this sub-hash contains details about the SEPA Debit payment method options. + """ + us_bank_account: NotRequired[ + "SetupIntentModifyParamsPaymentMethodOptionsUsBankAccount" + ] + """ + If this is a `us_bank_account` SetupIntent, this sub-hash contains details about the US bank account payment method options. + """ + + +class SetupIntentModifyParamsPaymentMethodOptionsAcssDebit(TypedDict): + currency: NotRequired[Literal["cad", "usd"]] + """ + 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). + """ + mandate_options: NotRequired[ + "SetupIntentModifyParamsPaymentMethodOptionsAcssDebitMandateOptions" + ] + """ + Additional fields for Mandate creation + """ + verification_method: NotRequired[ + Literal["automatic", "instant", "microdeposits"] + ] + """ + Bank account verification method. + """ + + +class SetupIntentModifyParamsPaymentMethodOptionsAcssDebitMandateOptions( + TypedDict, +): + custom_mandate_url: NotRequired["Literal['']|str"] + """ + A URL for custom mandate text to render during confirmation step. + The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent, + or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent. + """ + default_for: NotRequired[List[Literal["invoice", "subscription"]]] + """ + List of Stripe products where this mandate can be selected automatically. + """ + interval_description: NotRequired[str] + """ + Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'. + """ + payment_schedule: NotRequired[Literal["combined", "interval", "sporadic"]] + """ + Payment schedule for the mandate. + """ + transaction_type: NotRequired[Literal["business", "personal"]] + """ + Transaction type of the mandate. + """ + + +class SetupIntentModifyParamsPaymentMethodOptionsAmazonPay(TypedDict): + pass + + +class SetupIntentModifyParamsPaymentMethodOptionsBacsDebit(TypedDict): + mandate_options: NotRequired[ + "SetupIntentModifyParamsPaymentMethodOptionsBacsDebitMandateOptions" + ] + """ + Additional fields for Mandate creation + """ + + +class SetupIntentModifyParamsPaymentMethodOptionsBacsDebitMandateOptions( + TypedDict, +): + reference_prefix: NotRequired["Literal['']|str"] + """ + Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'. + """ + + +class SetupIntentModifyParamsPaymentMethodOptionsCard(TypedDict): + mandate_options: NotRequired[ + "SetupIntentModifyParamsPaymentMethodOptionsCardMandateOptions" + ] + """ + Configuration options for setting up an eMandate for cards issued in India. + """ + moto: NotRequired[bool] + """ + When specified, this parameter signals that a card has been collected + as MOTO (Mail Order Telephone Order) and thus out of scope for SCA. This + parameter can only be provided during confirmation. + """ + network: NotRequired[ + Literal[ + "amex", + "cartes_bancaires", + "diners", + "discover", + "eftpos_au", + "girocard", + "interac", + "jcb", + "link", + "mastercard", + "unionpay", + "unknown", + "visa", + ] + ] + """ + Selected network to process this SetupIntent on. Depends on the available networks of the card attached to the SetupIntent. Can be only set confirm-time. + """ + request_three_d_secure: NotRequired[ + Literal["any", "automatic", "challenge"] + ] + """ + We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + """ + three_d_secure: NotRequired[ + "SetupIntentModifyParamsPaymentMethodOptionsCardThreeDSecure" + ] + """ + If 3D Secure authentication was performed with a third-party provider, + the authentication details to use for this setup. + """ + + +class SetupIntentModifyParamsPaymentMethodOptionsCardMandateOptions(TypedDict): + amount: int + """ + Amount to be charged for future payments. + """ + amount_type: Literal["fixed", "maximum"] + """ + One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. + """ + currency: str + """ + Currency in which future payments will be charged. 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). + """ + description: NotRequired[str] + """ + A description of the mandate or subscription that is meant to be displayed to the customer. + """ + end_date: NotRequired[int] + """ + End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. + """ + interval: Literal["day", "month", "sporadic", "week", "year"] + """ + Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`. + """ + interval_count: NotRequired[int] + """ + The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`. + """ + reference: str + """ + Unique identifier for the mandate or subscription. + """ + start_date: int + """ + Start date of the mandate or subscription. Start date should not be lesser than yesterday. + """ + supported_types: NotRequired[List[Literal["india"]]] + """ + Specifies the type of mandates supported. Possible values are `india`. + """ + + +class SetupIntentModifyParamsPaymentMethodOptionsCardThreeDSecure(TypedDict): + ares_trans_status: NotRequired[Literal["A", "C", "I", "N", "R", "U", "Y"]] + """ + The `transStatus` returned from the card Issuer's ACS in the ARes. + """ + cryptogram: NotRequired[str] + """ + The cryptogram, also known as the "authentication value" (AAV, CAVV or + AEVV). This value is 20 bytes, base64-encoded into a 28-character string. + (Most 3D Secure providers will return the base64-encoded version, which + is what you should specify here.) + """ + electronic_commerce_indicator: NotRequired[ + Literal["01", "02", "05", "06", "07"] + ] + """ + The Electronic Commerce Indicator (ECI) is returned by your 3D Secure + provider and indicates what degree of authentication was performed. + """ + network_options: NotRequired[ + "SetupIntentModifyParamsPaymentMethodOptionsCardThreeDSecureNetworkOptions" + ] + """ + Network specific 3DS fields. Network specific arguments require an + explicit card brand choice. The parameter `payment_method_options.card.network`` + must be populated accordingly + """ + requestor_challenge_indicator: NotRequired[str] + """ + The challenge indicator (`threeDSRequestorChallengeInd`) which was requested in the + AReq sent to the card Issuer's ACS. A string containing 2 digits from 01-99. + """ + transaction_id: NotRequired[str] + """ + For 3D Secure 1, the XID. For 3D Secure 2, the Directory Server + Transaction ID (dsTransID). + """ + version: NotRequired[Literal["1.0.2", "2.1.0", "2.2.0"]] + """ + The version of 3D Secure that was performed. + """ + + +class SetupIntentModifyParamsPaymentMethodOptionsCardThreeDSecureNetworkOptions( + TypedDict, +): + cartes_bancaires: NotRequired[ + "SetupIntentModifyParamsPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancaires" + ] + """ + Cartes Bancaires-specific 3DS fields. + """ + + +class SetupIntentModifyParamsPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancaires( + TypedDict, +): + cb_avalgo: Literal["0", "1", "2", "3", "4", "A"] + """ + The cryptogram calculation algorithm used by the card Issuer's ACS + to calculate the Authentication cryptogram. Also known as `cavvAlgorithm`. + messageExtension: CB-AVALGO + """ + cb_exemption: NotRequired[str] + """ + The exemption indicator returned from Cartes Bancaires in the ARes. + message extension: CB-EXEMPTION; string (4 characters) + This is a 3 byte bitmap (low significant byte first and most significant + bit first) that has been Base64 encoded + """ + cb_score: NotRequired[int] + """ + The risk score returned from Cartes Bancaires in the ARes. + message extension: CB-SCORE; numeric value 0-99 + """ + + +class SetupIntentModifyParamsPaymentMethodOptionsCardPresent(TypedDict): + pass + + +class SetupIntentModifyParamsPaymentMethodOptionsKlarna(TypedDict): + currency: NotRequired[str] + """ + The currency of the SetupIntent. Three letter ISO currency code. + """ + on_demand: NotRequired[ + "SetupIntentModifyParamsPaymentMethodOptionsKlarnaOnDemand" + ] + """ + On-demand details if setting up a payment method for on-demand payments. + """ + preferred_locale: NotRequired[ + Literal[ + "cs-CZ", + "da-DK", + "de-AT", + "de-CH", + "de-DE", + "el-GR", + "en-AT", + "en-AU", + "en-BE", + "en-CA", + "en-CH", + "en-CZ", + "en-DE", + "en-DK", + "en-ES", + "en-FI", + "en-FR", + "en-GB", + "en-GR", + "en-IE", + "en-IT", + "en-NL", + "en-NO", + "en-NZ", + "en-PL", + "en-PT", + "en-RO", + "en-SE", + "en-US", + "es-ES", + "es-US", + "fi-FI", + "fr-BE", + "fr-CA", + "fr-CH", + "fr-FR", + "it-CH", + "it-IT", + "nb-NO", + "nl-BE", + "nl-NL", + "pl-PL", + "pt-PT", + "ro-RO", + "sv-FI", + "sv-SE", + ] + ] + """ + Preferred language of the Klarna authorization page that the customer is redirected to + """ + subscriptions: NotRequired[ + "Literal['']|List[SetupIntentModifyParamsPaymentMethodOptionsKlarnaSubscription]" + ] + """ + Subscription details if setting up or charging a subscription + """ + + +class SetupIntentModifyParamsPaymentMethodOptionsKlarnaOnDemand(TypedDict): + average_amount: NotRequired[int] + """ + Your average amount value. You can use a value across your customer base, or segment based on customer type, country, etc. + """ + maximum_amount: NotRequired[int] + """ + The maximum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. + """ + minimum_amount: NotRequired[int] + """ + The lowest or minimum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. + """ + purchase_interval: NotRequired[Literal["day", "month", "week", "year"]] + """ + Interval at which the customer is making purchases + """ + purchase_interval_count: NotRequired[int] + """ + The number of `purchase_interval` between charges + """ + + +class SetupIntentModifyParamsPaymentMethodOptionsKlarnaSubscription(TypedDict): + interval: Literal["day", "month", "week", "year"] + """ + Unit of time between subscription charges. + """ + interval_count: NotRequired[int] + """ + The number of intervals (specified in the `interval` attribute) between subscription charges. For example, `interval=month` and `interval_count=3` charges every 3 months. + """ + name: NotRequired[str] + """ + Name for subscription. + """ + next_billing: "SetupIntentModifyParamsPaymentMethodOptionsKlarnaSubscriptionNextBilling" + """ + Describes the upcoming charge for this subscription. + """ + reference: str + """ + A non-customer-facing reference to correlate subscription charges in the Klarna app. Use a value that persists across subscription charges. + """ + + +class SetupIntentModifyParamsPaymentMethodOptionsKlarnaSubscriptionNextBilling( + TypedDict, +): + amount: int + """ + The amount of the next charge for the subscription. + """ + date: str + """ + The date of the next charge for the subscription in YYYY-MM-DD format. + """ + + +class SetupIntentModifyParamsPaymentMethodOptionsLink(TypedDict): + persistent_token: NotRequired[str] + """ + [Deprecated] This is a legacy parameter that no longer has any function. + """ + + +class SetupIntentModifyParamsPaymentMethodOptionsPaypal(TypedDict): + billing_agreement_id: NotRequired[str] + """ + The PayPal Billing Agreement ID (BAID). This is an ID generated by PayPal which represents the mandate between the merchant and the customer. + """ + currency: NotRequired[str] + subsellers: NotRequired[List[str]] + """ + The Stripe connected account IDs of the sellers on the platform for this transaction (optional). Only allowed when [separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) are used. + """ + + +class SetupIntentModifyParamsPaymentMethodOptionsPayto(TypedDict): + mandate_options: NotRequired[ + "SetupIntentModifyParamsPaymentMethodOptionsPaytoMandateOptions" + ] + """ + Additional fields for Mandate creation. + """ + + +class SetupIntentModifyParamsPaymentMethodOptionsPaytoMandateOptions( + TypedDict +): + amount: NotRequired[int] + """ + Amount that will be collected. It is required when `amount_type` is `fixed`. + """ + amount_type: NotRequired[Literal["fixed", "maximum"]] + """ + The type of amount that will be collected. The amount charged must be exact or up to the value of `amount` param for `fixed` or `maximum` type respectively. + """ + end_date: NotRequired[str] + """ + Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no end date. + """ + payment_schedule: NotRequired[ + Literal[ + "adhoc", + "annual", + "daily", + "fortnightly", + "monthly", + "quarterly", + "semi_annual", + "weekly", + ] + ] + """ + The periodicity at which payments will be collected. + """ + payments_per_period: NotRequired[int] + """ + The number of payments that will be made during a payment period. Defaults to 1 except for when `payment_schedule` is `adhoc`. In that case, it defaults to no limit. + """ + purpose: NotRequired[ + Literal[ + "dependant_support", + "government", + "loan", + "mortgage", + "other", + "pension", + "personal", + "retail", + "salary", + "tax", + "utility", + ] + ] + """ + The purpose for which payments are made. Defaults to retail. + """ + start_date: NotRequired[str] + """ + Date, in YYYY-MM-DD format, from which payments will be collected. Defaults to confirmation time. + """ + + +class SetupIntentModifyParamsPaymentMethodOptionsPix(TypedDict): + mandate_options: NotRequired[ + "SetupIntentModifyParamsPaymentMethodOptionsPixMandateOptions" + ] + """ + Additional fields for mandate creation. + """ + + +class SetupIntentModifyParamsPaymentMethodOptionsPixMandateOptions(TypedDict): + amount: NotRequired[int] + """ + Amount to be charged for future payments. Required when `amount_type=fixed`. If not provided for `amount_type=maximum`, defaults to 40000. + """ + amount_includes_iof: NotRequired[Literal["always", "never"]] + """ + Determines if the amount includes the IOF tax. Defaults to `never`. + """ + amount_type: NotRequired[Literal["fixed", "maximum"]] + """ + Type of amount. Defaults to `maximum`. + """ + currency: NotRequired[str] + """ + Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Only `brl` is supported currently. + """ + end_date: NotRequired[str] + """ + Date when the mandate expires and no further payments will be charged, in `YYYY-MM-DD`. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. + """ + payment_schedule: NotRequired[ + Literal["halfyearly", "monthly", "quarterly", "weekly", "yearly"] + ] + """ + Schedule at which the future payments will be charged. Defaults to `weekly`. + """ + reference: NotRequired[str] + """ + Subscription name displayed to buyers in their bank app. Defaults to the displayable business name. + """ + start_date: NotRequired[str] + """ + Start date of the mandate, in `YYYY-MM-DD`. Start date should be at least 3 days in the future. Defaults to 3 days after the current date. + """ + + +class SetupIntentModifyParamsPaymentMethodOptionsSepaDebit(TypedDict): + mandate_options: NotRequired[ + "SetupIntentModifyParamsPaymentMethodOptionsSepaDebitMandateOptions" + ] + """ + Additional fields for Mandate creation + """ + + +class SetupIntentModifyParamsPaymentMethodOptionsSepaDebitMandateOptions( + TypedDict, +): + reference_prefix: NotRequired["Literal['']|str"] + """ + Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'. + """ + + +class SetupIntentModifyParamsPaymentMethodOptionsUsBankAccount(TypedDict): + financial_connections: NotRequired[ + "SetupIntentModifyParamsPaymentMethodOptionsUsBankAccountFinancialConnections" + ] + """ + Additional fields for Financial Connections Session creation + """ + mandate_options: NotRequired[ + "SetupIntentModifyParamsPaymentMethodOptionsUsBankAccountMandateOptions" + ] + """ + Additional fields for Mandate creation + """ + networks: NotRequired[ + "SetupIntentModifyParamsPaymentMethodOptionsUsBankAccountNetworks" + ] + """ + Additional fields for network related functions + """ + verification_method: NotRequired[ + Literal["automatic", "instant", "microdeposits"] + ] + """ + Bank account verification method. + """ + + +class SetupIntentModifyParamsPaymentMethodOptionsUsBankAccountFinancialConnections( + TypedDict, +): + filters: NotRequired[ + "SetupIntentModifyParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters" + ] + """ + Provide filters for the linked accounts that the customer can select for the payment method. + """ + manual_entry: NotRequired[ + "SetupIntentModifyParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsManualEntry" + ] + """ + Customize manual entry behavior + """ + permissions: NotRequired[ + List[ + Literal["balances", "ownership", "payment_method", "transactions"] + ] + ] + """ + The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. + """ + prefetch: NotRequired[ + List[ + Literal[ + "balances", "inferred_balances", "ownership", "transactions" + ] + ] + ] + """ + List of data features that you would like to retrieve upon account creation. + """ + return_url: NotRequired[str] + """ + For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. + """ + + +class SetupIntentModifyParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters( + TypedDict, +): + account_subcategories: NotRequired[List[Literal["checking", "savings"]]] + """ + The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`. + """ + institution: NotRequired[str] + """ + ID of the institution to use to filter for selectable accounts. + """ + + +class SetupIntentModifyParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsManualEntry( + TypedDict, +): + mode: Literal["automatic", "custom"] + """ + Settings for configuring manual entry of account details. + """ + + +class SetupIntentModifyParamsPaymentMethodOptionsUsBankAccountMandateOptions( + TypedDict, +): + collection_method: NotRequired["Literal['']|Literal['paper']"] + """ + The method used to collect offline mandate customer acceptance. + """ + + +class SetupIntentModifyParamsPaymentMethodOptionsUsBankAccountNetworks( + TypedDict, +): + requested: NotRequired[List[Literal["ach", "us_domestic_wire"]]] + """ + Triggers validations to run across the selected networks + """ diff --git a/stripe/params/_setup_intent_retrieve_params.py b/stripe/params/_setup_intent_retrieve_params.py new file mode 100644 index 000000000..88c235d7c --- /dev/null +++ b/stripe/params/_setup_intent_retrieve_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 SetupIntentRetrieveParams(RequestOptions): + client_secret: NotRequired[str] + """ + The client secret of the SetupIntent. We require this string if you use a publishable key to retrieve the SetupIntent. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_setup_intent_update_params.py b/stripe/params/_setup_intent_update_params.py new file mode 100644 index 000000000..e0d9eaf5f --- /dev/null +++ b/stripe/params/_setup_intent_update_params.py @@ -0,0 +1,1645 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class SetupIntentUpdateParams(TypedDict): + attach_to_self: NotRequired[bool] + """ + If present, the SetupIntent's payment method will be attached to the in-context Stripe Account. + + It can only be used for this Stripe Account's own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer. + """ + customer: NotRequired[str] + """ + ID of the Customer this SetupIntent belongs to, if one exists. + + If present, the SetupIntent's payment method will be attached to the Customer on successful setup. Payment methods attached to other Customers cannot be used with this SetupIntent. + """ + customer_account: NotRequired[str] + """ + ID of the Account this SetupIntent belongs to, if one exists. + + If present, the SetupIntent's payment method will be attached to the Account on successful setup. Payment methods attached to other Accounts cannot be used with this SetupIntent. + """ + description: NotRequired[str] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + flow_directions: NotRequired[List[Literal["inbound", "outbound"]]] + """ + Indicates the directions of money movement for which this payment method is intended to be used. + + Include `inbound` if you intend to use the payment method as the origin to pull funds from. Include `outbound` if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + payment_method: NotRequired[str] + """ + ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent. To unset this field to null, pass in an empty string. + """ + payment_method_configuration: NotRequired[str] + """ + The ID of the [payment method configuration](https://stripe.com/docs/api/payment_method_configurations) to use with this SetupIntent. + """ + payment_method_data: NotRequired[ + "SetupIntentUpdateParamsPaymentMethodData" + ] + """ + When included, this hash creates a PaymentMethod that is set as the [`payment_method`](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-payment_method) + value in the SetupIntent. + """ + payment_method_options: NotRequired[ + "SetupIntentUpdateParamsPaymentMethodOptions" + ] + """ + Payment method-specific configuration for this SetupIntent. + """ + payment_method_types: NotRequired[List[str]] + """ + The list of payment method types (for example, card) that this SetupIntent can set up. If you don't provide this, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). A list of valid payment method types can be found [here](https://docs.stripe.com/api/payment_methods/object#payment_method_object-type). + """ + + +class SetupIntentUpdateParamsPaymentMethodData(TypedDict): + acss_debit: NotRequired[ + "SetupIntentUpdateParamsPaymentMethodDataAcssDebit" + ] + """ + If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method. + """ + affirm: NotRequired["SetupIntentUpdateParamsPaymentMethodDataAffirm"] + """ + If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method. + """ + afterpay_clearpay: NotRequired[ + "SetupIntentUpdateParamsPaymentMethodDataAfterpayClearpay" + ] + """ + If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method. + """ + alipay: NotRequired["SetupIntentUpdateParamsPaymentMethodDataAlipay"] + """ + If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. + """ + allow_redisplay: NotRequired[Literal["always", "limited", "unspecified"]] + """ + This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`. + """ + alma: NotRequired["SetupIntentUpdateParamsPaymentMethodDataAlma"] + """ + If this is a Alma PaymentMethod, this hash contains details about the Alma payment method. + """ + amazon_pay: NotRequired[ + "SetupIntentUpdateParamsPaymentMethodDataAmazonPay" + ] + """ + If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method. + """ + au_becs_debit: NotRequired[ + "SetupIntentUpdateParamsPaymentMethodDataAuBecsDebit" + ] + """ + If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. + """ + bacs_debit: NotRequired[ + "SetupIntentUpdateParamsPaymentMethodDataBacsDebit" + ] + """ + If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account. + """ + bancontact: NotRequired[ + "SetupIntentUpdateParamsPaymentMethodDataBancontact" + ] + """ + If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method. + """ + billie: NotRequired["SetupIntentUpdateParamsPaymentMethodDataBillie"] + """ + If this is a `billie` PaymentMethod, this hash contains details about the Billie payment method. + """ + billing_details: NotRequired[ + "SetupIntentUpdateParamsPaymentMethodDataBillingDetails" + ] + """ + Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. + """ + blik: NotRequired["SetupIntentUpdateParamsPaymentMethodDataBlik"] + """ + If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method. + """ + boleto: NotRequired["SetupIntentUpdateParamsPaymentMethodDataBoleto"] + """ + If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method. + """ + cashapp: NotRequired["SetupIntentUpdateParamsPaymentMethodDataCashapp"] + """ + If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. + """ + crypto: NotRequired["SetupIntentUpdateParamsPaymentMethodDataCrypto"] + """ + If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment method. + """ + customer_balance: NotRequired[ + "SetupIntentUpdateParamsPaymentMethodDataCustomerBalance" + ] + """ + If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. + """ + eps: NotRequired["SetupIntentUpdateParamsPaymentMethodDataEps"] + """ + If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. + """ + fpx: NotRequired["SetupIntentUpdateParamsPaymentMethodDataFpx"] + """ + If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method. + """ + giropay: NotRequired["SetupIntentUpdateParamsPaymentMethodDataGiropay"] + """ + If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method. + """ + gopay: NotRequired["SetupIntentUpdateParamsPaymentMethodDataGopay"] + """ + If this is a Gopay PaymentMethod, this hash contains details about the Gopay payment method. + """ + grabpay: NotRequired["SetupIntentUpdateParamsPaymentMethodDataGrabpay"] + """ + If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method. + """ + id_bank_transfer: NotRequired[ + "SetupIntentUpdateParamsPaymentMethodDataIdBankTransfer" + ] + """ + If this is an `IdBankTransfer` PaymentMethod, this hash contains details about the IdBankTransfer payment method. + """ + ideal: NotRequired["SetupIntentUpdateParamsPaymentMethodDataIdeal"] + """ + If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. + """ + interac_present: NotRequired[ + "SetupIntentUpdateParamsPaymentMethodDataInteracPresent" + ] + """ + If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. + """ + kakao_pay: NotRequired["SetupIntentUpdateParamsPaymentMethodDataKakaoPay"] + """ + If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method. + """ + klarna: NotRequired["SetupIntentUpdateParamsPaymentMethodDataKlarna"] + """ + If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method. + """ + konbini: NotRequired["SetupIntentUpdateParamsPaymentMethodDataKonbini"] + """ + If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. + """ + kr_card: NotRequired["SetupIntentUpdateParamsPaymentMethodDataKrCard"] + """ + If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method. + """ + link: NotRequired["SetupIntentUpdateParamsPaymentMethodDataLink"] + """ + If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. + """ + mb_way: NotRequired["SetupIntentUpdateParamsPaymentMethodDataMbWay"] + """ + If this is a MB WAY PaymentMethod, this hash contains details about the MB WAY payment method. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + mobilepay: NotRequired["SetupIntentUpdateParamsPaymentMethodDataMobilepay"] + """ + If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method. + """ + multibanco: NotRequired[ + "SetupIntentUpdateParamsPaymentMethodDataMultibanco" + ] + """ + If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method. + """ + naver_pay: NotRequired["SetupIntentUpdateParamsPaymentMethodDataNaverPay"] + """ + If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method. + """ + nz_bank_account: NotRequired[ + "SetupIntentUpdateParamsPaymentMethodDataNzBankAccount" + ] + """ + If this is an nz_bank_account PaymentMethod, this hash contains details about the nz_bank_account payment method. + """ + oxxo: NotRequired["SetupIntentUpdateParamsPaymentMethodDataOxxo"] + """ + If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. + """ + p24: NotRequired["SetupIntentUpdateParamsPaymentMethodDataP24"] + """ + If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. + """ + pay_by_bank: NotRequired[ + "SetupIntentUpdateParamsPaymentMethodDataPayByBank" + ] + """ + If this is a `pay_by_bank` PaymentMethod, this hash contains details about the PayByBank payment method. + """ + payco: NotRequired["SetupIntentUpdateParamsPaymentMethodDataPayco"] + """ + If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method. + """ + paynow: NotRequired["SetupIntentUpdateParamsPaymentMethodDataPaynow"] + """ + If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method. + """ + paypal: NotRequired["SetupIntentUpdateParamsPaymentMethodDataPaypal"] + """ + If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method. + """ + paypay: NotRequired["SetupIntentUpdateParamsPaymentMethodDataPaypay"] + """ + If this is a `paypay` PaymentMethod, this hash contains details about the PayPay payment method. + """ + payto: NotRequired["SetupIntentUpdateParamsPaymentMethodDataPayto"] + """ + If this is a `payto` PaymentMethod, this hash contains details about the PayTo payment method. + """ + pix: NotRequired["SetupIntentUpdateParamsPaymentMethodDataPix"] + """ + If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method. + """ + promptpay: NotRequired["SetupIntentUpdateParamsPaymentMethodDataPromptpay"] + """ + If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method. + """ + qris: NotRequired["SetupIntentUpdateParamsPaymentMethodDataQris"] + """ + If this is a `qris` PaymentMethod, this hash contains details about the QRIS payment method. + """ + radar_options: NotRequired[ + "SetupIntentUpdateParamsPaymentMethodDataRadarOptions" + ] + """ + Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. + """ + rechnung: NotRequired["SetupIntentUpdateParamsPaymentMethodDataRechnung"] + """ + If this is a `rechnung` PaymentMethod, this hash contains details about the Rechnung payment method. + """ + revolut_pay: NotRequired[ + "SetupIntentUpdateParamsPaymentMethodDataRevolutPay" + ] + """ + If this is a `revolut_pay` PaymentMethod, this hash contains details about the Revolut Pay payment method. + """ + samsung_pay: NotRequired[ + "SetupIntentUpdateParamsPaymentMethodDataSamsungPay" + ] + """ + If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method. + """ + satispay: NotRequired["SetupIntentUpdateParamsPaymentMethodDataSatispay"] + """ + If this is a `satispay` PaymentMethod, this hash contains details about the Satispay payment method. + """ + sepa_debit: NotRequired[ + "SetupIntentUpdateParamsPaymentMethodDataSepaDebit" + ] + """ + If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. + """ + shopeepay: NotRequired["SetupIntentUpdateParamsPaymentMethodDataShopeepay"] + """ + If this is a Shopeepay PaymentMethod, this hash contains details about the Shopeepay payment method. + """ + sofort: NotRequired["SetupIntentUpdateParamsPaymentMethodDataSofort"] + """ + If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. + """ + stripe_balance: NotRequired[ + "SetupIntentUpdateParamsPaymentMethodDataStripeBalance" + ] + """ + This hash contains details about the Stripe balance payment method. + """ + swish: NotRequired["SetupIntentUpdateParamsPaymentMethodDataSwish"] + """ + If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method. + """ + twint: NotRequired["SetupIntentUpdateParamsPaymentMethodDataTwint"] + """ + If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method. + """ + type: Literal[ + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "alma", + "amazon_pay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "billie", + "blik", + "boleto", + "cashapp", + "crypto", + "customer_balance", + "eps", + "fpx", + "giropay", + "gopay", + "grabpay", + "id_bank_transfer", + "ideal", + "kakao_pay", + "klarna", + "konbini", + "kr_card", + "link", + "mb_way", + "mobilepay", + "multibanco", + "naver_pay", + "nz_bank_account", + "oxxo", + "p24", + "pay_by_bank", + "payco", + "paynow", + "paypal", + "paypay", + "payto", + "pix", + "promptpay", + "qris", + "rechnung", + "revolut_pay", + "samsung_pay", + "satispay", + "sepa_debit", + "shopeepay", + "sofort", + "stripe_balance", + "swish", + "twint", + "us_bank_account", + "wechat_pay", + "zip", + ] + """ + The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. + """ + us_bank_account: NotRequired[ + "SetupIntentUpdateParamsPaymentMethodDataUsBankAccount" + ] + """ + If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. + """ + wechat_pay: NotRequired[ + "SetupIntentUpdateParamsPaymentMethodDataWechatPay" + ] + """ + If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method. + """ + zip: NotRequired["SetupIntentUpdateParamsPaymentMethodDataZip"] + """ + If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method. + """ + + +class SetupIntentUpdateParamsPaymentMethodDataAcssDebit(TypedDict): + account_number: str + """ + Customer's bank account number. + """ + institution_number: str + """ + Institution number of the customer's bank. + """ + transit_number: str + """ + Transit number of the customer's bank. + """ + + +class SetupIntentUpdateParamsPaymentMethodDataAffirm(TypedDict): + pass + + +class SetupIntentUpdateParamsPaymentMethodDataAfterpayClearpay(TypedDict): + pass + + +class SetupIntentUpdateParamsPaymentMethodDataAlipay(TypedDict): + pass + + +class SetupIntentUpdateParamsPaymentMethodDataAlma(TypedDict): + pass + + +class SetupIntentUpdateParamsPaymentMethodDataAmazonPay(TypedDict): + pass + + +class SetupIntentUpdateParamsPaymentMethodDataAuBecsDebit(TypedDict): + account_number: str + """ + The account number for the bank account. + """ + bsb_number: str + """ + Bank-State-Branch number of the bank account. + """ + + +class SetupIntentUpdateParamsPaymentMethodDataBacsDebit(TypedDict): + account_number: NotRequired[str] + """ + Account number of the bank account that the funds will be debited from. + """ + sort_code: NotRequired[str] + """ + Sort code of the bank account. (e.g., `10-20-30`) + """ + + +class SetupIntentUpdateParamsPaymentMethodDataBancontact(TypedDict): + pass + + +class SetupIntentUpdateParamsPaymentMethodDataBillie(TypedDict): + pass + + +class SetupIntentUpdateParamsPaymentMethodDataBillingDetails(TypedDict): + address: NotRequired[ + "Literal['']|SetupIntentUpdateParamsPaymentMethodDataBillingDetailsAddress" + ] + """ + Billing address. + """ + email: NotRequired["Literal['']|str"] + """ + Email address. + """ + name: NotRequired["Literal['']|str"] + """ + Full name. + """ + phone: NotRequired["Literal['']|str"] + """ + Billing phone number (including extension). + """ + tax_id: NotRequired[str] + """ + Taxpayer identification number. Used only for transactions between LATAM buyers and non-LATAM sellers. + """ + + +class SetupIntentUpdateParamsPaymentMethodDataBillingDetailsAddress(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. + """ + + +class SetupIntentUpdateParamsPaymentMethodDataBlik(TypedDict): + pass + + +class SetupIntentUpdateParamsPaymentMethodDataBoleto(TypedDict): + tax_id: str + """ + The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers) + """ + + +class SetupIntentUpdateParamsPaymentMethodDataCashapp(TypedDict): + pass + + +class SetupIntentUpdateParamsPaymentMethodDataCrypto(TypedDict): + pass + + +class SetupIntentUpdateParamsPaymentMethodDataCustomerBalance(TypedDict): + pass + + +class SetupIntentUpdateParamsPaymentMethodDataEps(TypedDict): + bank: NotRequired[ + Literal[ + "arzte_und_apotheker_bank", + "austrian_anadi_bank_ag", + "bank_austria", + "bankhaus_carl_spangler", + "bankhaus_schelhammer_und_schattera_ag", + "bawag_psk_ag", + "bks_bank_ag", + "brull_kallmus_bank_ag", + "btv_vier_lander_bank", + "capital_bank_grawe_gruppe_ag", + "deutsche_bank_ag", + "dolomitenbank", + "easybank_ag", + "erste_bank_und_sparkassen", + "hypo_alpeadriabank_international_ag", + "hypo_bank_burgenland_aktiengesellschaft", + "hypo_noe_lb_fur_niederosterreich_u_wien", + "hypo_oberosterreich_salzburg_steiermark", + "hypo_tirol_bank_ag", + "hypo_vorarlberg_bank_ag", + "marchfelder_bank", + "oberbank_ag", + "raiffeisen_bankengruppe_osterreich", + "schoellerbank_ag", + "sparda_bank_wien", + "volksbank_gruppe", + "volkskreditbank_ag", + "vr_bank_braunau", + ] + ] + """ + The customer's bank. + """ + + +class SetupIntentUpdateParamsPaymentMethodDataFpx(TypedDict): + account_holder_type: NotRequired[Literal["company", "individual"]] + """ + Account holder type for FPX transaction + """ + bank: Literal[ + "affin_bank", + "agrobank", + "alliance_bank", + "ambank", + "bank_islam", + "bank_muamalat", + "bank_of_china", + "bank_rakyat", + "bsn", + "cimb", + "deutsche_bank", + "hong_leong_bank", + "hsbc", + "kfh", + "maybank2e", + "maybank2u", + "ocbc", + "pb_enterprise", + "public_bank", + "rhb", + "standard_chartered", + "uob", + ] + """ + The customer's bank. + """ + + +class SetupIntentUpdateParamsPaymentMethodDataGiropay(TypedDict): + pass + + +class SetupIntentUpdateParamsPaymentMethodDataGopay(TypedDict): + pass + + +class SetupIntentUpdateParamsPaymentMethodDataGrabpay(TypedDict): + pass + + +class SetupIntentUpdateParamsPaymentMethodDataIdBankTransfer(TypedDict): + bank: NotRequired[Literal["bca", "bni", "bri", "cimb", "permata"]] + """ + Bank where the account is held. + """ + + +class SetupIntentUpdateParamsPaymentMethodDataIdeal(TypedDict): + bank: NotRequired[ + Literal[ + "abn_amro", + "asn_bank", + "bunq", + "buut", + "handelsbanken", + "ing", + "knab", + "moneyou", + "n26", + "nn", + "rabobank", + "regiobank", + "revolut", + "sns_bank", + "triodos_bank", + "van_lanschot", + "yoursafe", + ] + ] + """ + The customer's bank. Only use this parameter for existing customers. Don't use it for new customers. + """ + + +class SetupIntentUpdateParamsPaymentMethodDataInteracPresent(TypedDict): + pass + + +class SetupIntentUpdateParamsPaymentMethodDataKakaoPay(TypedDict): + pass + + +class SetupIntentUpdateParamsPaymentMethodDataKlarna(TypedDict): + dob: NotRequired["SetupIntentUpdateParamsPaymentMethodDataKlarnaDob"] + """ + Customer's date of birth + """ + + +class SetupIntentUpdateParamsPaymentMethodDataKlarnaDob(TypedDict): + day: int + """ + The day of birth, between 1 and 31. + """ + month: int + """ + The month of birth, between 1 and 12. + """ + year: int + """ + The four-digit year of birth. + """ + + +class SetupIntentUpdateParamsPaymentMethodDataKonbini(TypedDict): + pass + + +class SetupIntentUpdateParamsPaymentMethodDataKrCard(TypedDict): + pass + + +class SetupIntentUpdateParamsPaymentMethodDataLink(TypedDict): + pass + + +class SetupIntentUpdateParamsPaymentMethodDataMbWay(TypedDict): + pass + + +class SetupIntentUpdateParamsPaymentMethodDataMobilepay(TypedDict): + pass + + +class SetupIntentUpdateParamsPaymentMethodDataMultibanco(TypedDict): + pass + + +class SetupIntentUpdateParamsPaymentMethodDataNaverPay(TypedDict): + funding: NotRequired[Literal["card", "points"]] + """ + Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`. + """ + + +class SetupIntentUpdateParamsPaymentMethodDataNzBankAccount(TypedDict): + account_holder_name: NotRequired[str] + """ + The name on the bank account. Only required if the account holder name is different from the name of the authorized signatory collected in the PaymentMethod's billing details. + """ + account_number: str + """ + The account number for the bank account. + """ + bank_code: str + """ + The numeric code for the bank account's bank. + """ + branch_code: str + """ + The numeric code for the bank account's bank branch. + """ + reference: NotRequired[str] + suffix: str + """ + The suffix of the bank account number. + """ + + +class SetupIntentUpdateParamsPaymentMethodDataOxxo(TypedDict): + pass + + +class SetupIntentUpdateParamsPaymentMethodDataP24(TypedDict): + bank: NotRequired[ + Literal[ + "alior_bank", + "bank_millennium", + "bank_nowy_bfg_sa", + "bank_pekao_sa", + "banki_spbdzielcze", + "blik", + "bnp_paribas", + "boz", + "citi_handlowy", + "credit_agricole", + "envelobank", + "etransfer_pocztowy24", + "getin_bank", + "ideabank", + "ing", + "inteligo", + "mbank_mtransfer", + "nest_przelew", + "noble_pay", + "pbac_z_ipko", + "plus_bank", + "santander_przelew24", + "tmobile_usbugi_bankowe", + "toyota_bank", + "velobank", + "volkswagen_bank", + ] + ] + """ + The customer's bank. + """ + + +class SetupIntentUpdateParamsPaymentMethodDataPayByBank(TypedDict): + pass + + +class SetupIntentUpdateParamsPaymentMethodDataPayco(TypedDict): + pass + + +class SetupIntentUpdateParamsPaymentMethodDataPaynow(TypedDict): + pass + + +class SetupIntentUpdateParamsPaymentMethodDataPaypal(TypedDict): + pass + + +class SetupIntentUpdateParamsPaymentMethodDataPaypay(TypedDict): + pass + + +class SetupIntentUpdateParamsPaymentMethodDataPayto(TypedDict): + account_number: NotRequired[str] + """ + The account number for the bank account. + """ + bsb_number: NotRequired[str] + """ + Bank-State-Branch number of the bank account. + """ + pay_id: NotRequired[str] + """ + The PayID alias for the bank account. + """ + + +class SetupIntentUpdateParamsPaymentMethodDataPix(TypedDict): + pass + + +class SetupIntentUpdateParamsPaymentMethodDataPromptpay(TypedDict): + pass + + +class SetupIntentUpdateParamsPaymentMethodDataQris(TypedDict): + pass + + +class SetupIntentUpdateParamsPaymentMethodDataRadarOptions(TypedDict): + session: NotRequired[str] + """ + A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. + """ + + +class SetupIntentUpdateParamsPaymentMethodDataRechnung(TypedDict): + dob: "SetupIntentUpdateParamsPaymentMethodDataRechnungDob" + """ + Customer's date of birth + """ + + +class SetupIntentUpdateParamsPaymentMethodDataRechnungDob(TypedDict): + day: int + """ + The day of birth, between 1 and 31. + """ + month: int + """ + The month of birth, between 1 and 12. + """ + year: int + """ + The four-digit year of birth. + """ + + +class SetupIntentUpdateParamsPaymentMethodDataRevolutPay(TypedDict): + pass + + +class SetupIntentUpdateParamsPaymentMethodDataSamsungPay(TypedDict): + pass + + +class SetupIntentUpdateParamsPaymentMethodDataSatispay(TypedDict): + pass + + +class SetupIntentUpdateParamsPaymentMethodDataSepaDebit(TypedDict): + iban: str + """ + IBAN of the bank account. + """ + + +class SetupIntentUpdateParamsPaymentMethodDataShopeepay(TypedDict): + pass + + +class SetupIntentUpdateParamsPaymentMethodDataSofort(TypedDict): + country: Literal["AT", "BE", "DE", "ES", "IT", "NL"] + """ + Two-letter ISO code representing the country the bank account is located in. + """ + + +class SetupIntentUpdateParamsPaymentMethodDataStripeBalance(TypedDict): + account: NotRequired[str] + """ + The connected account ID whose Stripe balance to use as the source of payment + """ + source_type: NotRequired[Literal["bank_account", "card", "fpx"]] + """ + The [source_type](https://docs.stripe.com/api/balance/balance_object#balance_object-available-source_types) of the balance + """ + + +class SetupIntentUpdateParamsPaymentMethodDataSwish(TypedDict): + pass + + +class SetupIntentUpdateParamsPaymentMethodDataTwint(TypedDict): + pass + + +class SetupIntentUpdateParamsPaymentMethodDataUsBankAccount(TypedDict): + account_holder_type: NotRequired[Literal["company", "individual"]] + """ + Account holder type: individual or company. + """ + account_number: NotRequired[str] + """ + Account number of the bank account. + """ + account_type: NotRequired[Literal["checking", "savings"]] + """ + Account type: checkings or savings. Defaults to checking if omitted. + """ + financial_connections_account: NotRequired[str] + """ + The ID of a Financial Connections Account to use as a payment method. + """ + routing_number: NotRequired[str] + """ + Routing number of the bank account. + """ + + +class SetupIntentUpdateParamsPaymentMethodDataWechatPay(TypedDict): + pass + + +class SetupIntentUpdateParamsPaymentMethodDataZip(TypedDict): + pass + + +class SetupIntentUpdateParamsPaymentMethodOptions(TypedDict): + acss_debit: NotRequired[ + "SetupIntentUpdateParamsPaymentMethodOptionsAcssDebit" + ] + """ + If this is a `acss_debit` SetupIntent, this sub-hash contains details about the ACSS Debit payment method options. + """ + amazon_pay: NotRequired[ + "SetupIntentUpdateParamsPaymentMethodOptionsAmazonPay" + ] + """ + If this is a `amazon_pay` SetupIntent, this sub-hash contains details about the AmazonPay payment method options. + """ + bacs_debit: NotRequired[ + "SetupIntentUpdateParamsPaymentMethodOptionsBacsDebit" + ] + """ + If this is a `bacs_debit` SetupIntent, this sub-hash contains details about the Bacs Debit payment method options. + """ + card: NotRequired["SetupIntentUpdateParamsPaymentMethodOptionsCard"] + """ + Configuration for any card setup attempted on this SetupIntent. + """ + card_present: NotRequired[ + "SetupIntentUpdateParamsPaymentMethodOptionsCardPresent" + ] + """ + If this is a `card_present` PaymentMethod, this sub-hash contains details about the card-present payment method options. + """ + klarna: NotRequired["SetupIntentUpdateParamsPaymentMethodOptionsKlarna"] + """ + If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method options. + """ + link: NotRequired["SetupIntentUpdateParamsPaymentMethodOptionsLink"] + """ + If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options. + """ + paypal: NotRequired["SetupIntentUpdateParamsPaymentMethodOptionsPaypal"] + """ + If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options. + """ + payto: NotRequired["SetupIntentUpdateParamsPaymentMethodOptionsPayto"] + """ + If this is a `payto` SetupIntent, this sub-hash contains details about the PayTo payment method options. + """ + pix: NotRequired["SetupIntentUpdateParamsPaymentMethodOptionsPix"] + """ + If this is a `pix` SetupIntent, this sub-hash contains details about the Pix payment method options. + """ + sepa_debit: NotRequired[ + "SetupIntentUpdateParamsPaymentMethodOptionsSepaDebit" + ] + """ + If this is a `sepa_debit` SetupIntent, this sub-hash contains details about the SEPA Debit payment method options. + """ + us_bank_account: NotRequired[ + "SetupIntentUpdateParamsPaymentMethodOptionsUsBankAccount" + ] + """ + If this is a `us_bank_account` SetupIntent, this sub-hash contains details about the US bank account payment method options. + """ + + +class SetupIntentUpdateParamsPaymentMethodOptionsAcssDebit(TypedDict): + currency: NotRequired[Literal["cad", "usd"]] + """ + 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). + """ + mandate_options: NotRequired[ + "SetupIntentUpdateParamsPaymentMethodOptionsAcssDebitMandateOptions" + ] + """ + Additional fields for Mandate creation + """ + verification_method: NotRequired[ + Literal["automatic", "instant", "microdeposits"] + ] + """ + Bank account verification method. + """ + + +class SetupIntentUpdateParamsPaymentMethodOptionsAcssDebitMandateOptions( + TypedDict, +): + custom_mandate_url: NotRequired["Literal['']|str"] + """ + A URL for custom mandate text to render during confirmation step. + The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent, + or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent. + """ + default_for: NotRequired[List[Literal["invoice", "subscription"]]] + """ + List of Stripe products where this mandate can be selected automatically. + """ + interval_description: NotRequired[str] + """ + Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'. + """ + payment_schedule: NotRequired[Literal["combined", "interval", "sporadic"]] + """ + Payment schedule for the mandate. + """ + transaction_type: NotRequired[Literal["business", "personal"]] + """ + Transaction type of the mandate. + """ + + +class SetupIntentUpdateParamsPaymentMethodOptionsAmazonPay(TypedDict): + pass + + +class SetupIntentUpdateParamsPaymentMethodOptionsBacsDebit(TypedDict): + mandate_options: NotRequired[ + "SetupIntentUpdateParamsPaymentMethodOptionsBacsDebitMandateOptions" + ] + """ + Additional fields for Mandate creation + """ + + +class SetupIntentUpdateParamsPaymentMethodOptionsBacsDebitMandateOptions( + TypedDict, +): + reference_prefix: NotRequired["Literal['']|str"] + """ + Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'. + """ + + +class SetupIntentUpdateParamsPaymentMethodOptionsCard(TypedDict): + mandate_options: NotRequired[ + "SetupIntentUpdateParamsPaymentMethodOptionsCardMandateOptions" + ] + """ + Configuration options for setting up an eMandate for cards issued in India. + """ + moto: NotRequired[bool] + """ + When specified, this parameter signals that a card has been collected + as MOTO (Mail Order Telephone Order) and thus out of scope for SCA. This + parameter can only be provided during confirmation. + """ + network: NotRequired[ + Literal[ + "amex", + "cartes_bancaires", + "diners", + "discover", + "eftpos_au", + "girocard", + "interac", + "jcb", + "link", + "mastercard", + "unionpay", + "unknown", + "visa", + ] + ] + """ + Selected network to process this SetupIntent on. Depends on the available networks of the card attached to the SetupIntent. Can be only set confirm-time. + """ + request_three_d_secure: NotRequired[ + Literal["any", "automatic", "challenge"] + ] + """ + We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + """ + three_d_secure: NotRequired[ + "SetupIntentUpdateParamsPaymentMethodOptionsCardThreeDSecure" + ] + """ + If 3D Secure authentication was performed with a third-party provider, + the authentication details to use for this setup. + """ + + +class SetupIntentUpdateParamsPaymentMethodOptionsCardMandateOptions(TypedDict): + amount: int + """ + Amount to be charged for future payments. + """ + amount_type: Literal["fixed", "maximum"] + """ + One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. + """ + currency: str + """ + Currency in which future payments will be charged. 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). + """ + description: NotRequired[str] + """ + A description of the mandate or subscription that is meant to be displayed to the customer. + """ + end_date: NotRequired[int] + """ + End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. + """ + interval: Literal["day", "month", "sporadic", "week", "year"] + """ + Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`. + """ + interval_count: NotRequired[int] + """ + The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`. + """ + reference: str + """ + Unique identifier for the mandate or subscription. + """ + start_date: int + """ + Start date of the mandate or subscription. Start date should not be lesser than yesterday. + """ + supported_types: NotRequired[List[Literal["india"]]] + """ + Specifies the type of mandates supported. Possible values are `india`. + """ + + +class SetupIntentUpdateParamsPaymentMethodOptionsCardThreeDSecure(TypedDict): + ares_trans_status: NotRequired[Literal["A", "C", "I", "N", "R", "U", "Y"]] + """ + The `transStatus` returned from the card Issuer's ACS in the ARes. + """ + cryptogram: NotRequired[str] + """ + The cryptogram, also known as the "authentication value" (AAV, CAVV or + AEVV). This value is 20 bytes, base64-encoded into a 28-character string. + (Most 3D Secure providers will return the base64-encoded version, which + is what you should specify here.) + """ + electronic_commerce_indicator: NotRequired[ + Literal["01", "02", "05", "06", "07"] + ] + """ + The Electronic Commerce Indicator (ECI) is returned by your 3D Secure + provider and indicates what degree of authentication was performed. + """ + network_options: NotRequired[ + "SetupIntentUpdateParamsPaymentMethodOptionsCardThreeDSecureNetworkOptions" + ] + """ + Network specific 3DS fields. Network specific arguments require an + explicit card brand choice. The parameter `payment_method_options.card.network`` + must be populated accordingly + """ + requestor_challenge_indicator: NotRequired[str] + """ + The challenge indicator (`threeDSRequestorChallengeInd`) which was requested in the + AReq sent to the card Issuer's ACS. A string containing 2 digits from 01-99. + """ + transaction_id: NotRequired[str] + """ + For 3D Secure 1, the XID. For 3D Secure 2, the Directory Server + Transaction ID (dsTransID). + """ + version: NotRequired[Literal["1.0.2", "2.1.0", "2.2.0"]] + """ + The version of 3D Secure that was performed. + """ + + +class SetupIntentUpdateParamsPaymentMethodOptionsCardThreeDSecureNetworkOptions( + TypedDict, +): + cartes_bancaires: NotRequired[ + "SetupIntentUpdateParamsPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancaires" + ] + """ + Cartes Bancaires-specific 3DS fields. + """ + + +class SetupIntentUpdateParamsPaymentMethodOptionsCardThreeDSecureNetworkOptionsCartesBancaires( + TypedDict, +): + cb_avalgo: Literal["0", "1", "2", "3", "4", "A"] + """ + The cryptogram calculation algorithm used by the card Issuer's ACS + to calculate the Authentication cryptogram. Also known as `cavvAlgorithm`. + messageExtension: CB-AVALGO + """ + cb_exemption: NotRequired[str] + """ + The exemption indicator returned from Cartes Bancaires in the ARes. + message extension: CB-EXEMPTION; string (4 characters) + This is a 3 byte bitmap (low significant byte first and most significant + bit first) that has been Base64 encoded + """ + cb_score: NotRequired[int] + """ + The risk score returned from Cartes Bancaires in the ARes. + message extension: CB-SCORE; numeric value 0-99 + """ + + +class SetupIntentUpdateParamsPaymentMethodOptionsCardPresent(TypedDict): + pass + + +class SetupIntentUpdateParamsPaymentMethodOptionsKlarna(TypedDict): + currency: NotRequired[str] + """ + The currency of the SetupIntent. Three letter ISO currency code. + """ + on_demand: NotRequired[ + "SetupIntentUpdateParamsPaymentMethodOptionsKlarnaOnDemand" + ] + """ + On-demand details if setting up a payment method for on-demand payments. + """ + preferred_locale: NotRequired[ + Literal[ + "cs-CZ", + "da-DK", + "de-AT", + "de-CH", + "de-DE", + "el-GR", + "en-AT", + "en-AU", + "en-BE", + "en-CA", + "en-CH", + "en-CZ", + "en-DE", + "en-DK", + "en-ES", + "en-FI", + "en-FR", + "en-GB", + "en-GR", + "en-IE", + "en-IT", + "en-NL", + "en-NO", + "en-NZ", + "en-PL", + "en-PT", + "en-RO", + "en-SE", + "en-US", + "es-ES", + "es-US", + "fi-FI", + "fr-BE", + "fr-CA", + "fr-CH", + "fr-FR", + "it-CH", + "it-IT", + "nb-NO", + "nl-BE", + "nl-NL", + "pl-PL", + "pt-PT", + "ro-RO", + "sv-FI", + "sv-SE", + ] + ] + """ + Preferred language of the Klarna authorization page that the customer is redirected to + """ + subscriptions: NotRequired[ + "Literal['']|List[SetupIntentUpdateParamsPaymentMethodOptionsKlarnaSubscription]" + ] + """ + Subscription details if setting up or charging a subscription + """ + + +class SetupIntentUpdateParamsPaymentMethodOptionsKlarnaOnDemand(TypedDict): + average_amount: NotRequired[int] + """ + Your average amount value. You can use a value across your customer base, or segment based on customer type, country, etc. + """ + maximum_amount: NotRequired[int] + """ + The maximum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. + """ + minimum_amount: NotRequired[int] + """ + The lowest or minimum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc. + """ + purchase_interval: NotRequired[Literal["day", "month", "week", "year"]] + """ + Interval at which the customer is making purchases + """ + purchase_interval_count: NotRequired[int] + """ + The number of `purchase_interval` between charges + """ + + +class SetupIntentUpdateParamsPaymentMethodOptionsKlarnaSubscription(TypedDict): + interval: Literal["day", "month", "week", "year"] + """ + Unit of time between subscription charges. + """ + interval_count: NotRequired[int] + """ + The number of intervals (specified in the `interval` attribute) between subscription charges. For example, `interval=month` and `interval_count=3` charges every 3 months. + """ + name: NotRequired[str] + """ + Name for subscription. + """ + next_billing: "SetupIntentUpdateParamsPaymentMethodOptionsKlarnaSubscriptionNextBilling" + """ + Describes the upcoming charge for this subscription. + """ + reference: str + """ + A non-customer-facing reference to correlate subscription charges in the Klarna app. Use a value that persists across subscription charges. + """ + + +class SetupIntentUpdateParamsPaymentMethodOptionsKlarnaSubscriptionNextBilling( + TypedDict, +): + amount: int + """ + The amount of the next charge for the subscription. + """ + date: str + """ + The date of the next charge for the subscription in YYYY-MM-DD format. + """ + + +class SetupIntentUpdateParamsPaymentMethodOptionsLink(TypedDict): + persistent_token: NotRequired[str] + """ + [Deprecated] This is a legacy parameter that no longer has any function. + """ + + +class SetupIntentUpdateParamsPaymentMethodOptionsPaypal(TypedDict): + billing_agreement_id: NotRequired[str] + """ + The PayPal Billing Agreement ID (BAID). This is an ID generated by PayPal which represents the mandate between the merchant and the customer. + """ + currency: NotRequired[str] + subsellers: NotRequired[List[str]] + """ + The Stripe connected account IDs of the sellers on the platform for this transaction (optional). Only allowed when [separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) are used. + """ + + +class SetupIntentUpdateParamsPaymentMethodOptionsPayto(TypedDict): + mandate_options: NotRequired[ + "SetupIntentUpdateParamsPaymentMethodOptionsPaytoMandateOptions" + ] + """ + Additional fields for Mandate creation. + """ + + +class SetupIntentUpdateParamsPaymentMethodOptionsPaytoMandateOptions( + TypedDict +): + amount: NotRequired[int] + """ + Amount that will be collected. It is required when `amount_type` is `fixed`. + """ + amount_type: NotRequired[Literal["fixed", "maximum"]] + """ + The type of amount that will be collected. The amount charged must be exact or up to the value of `amount` param for `fixed` or `maximum` type respectively. + """ + end_date: NotRequired[str] + """ + Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no end date. + """ + payment_schedule: NotRequired[ + Literal[ + "adhoc", + "annual", + "daily", + "fortnightly", + "monthly", + "quarterly", + "semi_annual", + "weekly", + ] + ] + """ + The periodicity at which payments will be collected. + """ + payments_per_period: NotRequired[int] + """ + The number of payments that will be made during a payment period. Defaults to 1 except for when `payment_schedule` is `adhoc`. In that case, it defaults to no limit. + """ + purpose: NotRequired[ + Literal[ + "dependant_support", + "government", + "loan", + "mortgage", + "other", + "pension", + "personal", + "retail", + "salary", + "tax", + "utility", + ] + ] + """ + The purpose for which payments are made. Defaults to retail. + """ + start_date: NotRequired[str] + """ + Date, in YYYY-MM-DD format, from which payments will be collected. Defaults to confirmation time. + """ + + +class SetupIntentUpdateParamsPaymentMethodOptionsPix(TypedDict): + mandate_options: NotRequired[ + "SetupIntentUpdateParamsPaymentMethodOptionsPixMandateOptions" + ] + """ + Additional fields for mandate creation. + """ + + +class SetupIntentUpdateParamsPaymentMethodOptionsPixMandateOptions(TypedDict): + amount: NotRequired[int] + """ + Amount to be charged for future payments. Required when `amount_type=fixed`. If not provided for `amount_type=maximum`, defaults to 40000. + """ + amount_includes_iof: NotRequired[Literal["always", "never"]] + """ + Determines if the amount includes the IOF tax. Defaults to `never`. + """ + amount_type: NotRequired[Literal["fixed", "maximum"]] + """ + Type of amount. Defaults to `maximum`. + """ + currency: NotRequired[str] + """ + Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Only `brl` is supported currently. + """ + end_date: NotRequired[str] + """ + Date when the mandate expires and no further payments will be charged, in `YYYY-MM-DD`. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. + """ + payment_schedule: NotRequired[ + Literal["halfyearly", "monthly", "quarterly", "weekly", "yearly"] + ] + """ + Schedule at which the future payments will be charged. Defaults to `weekly`. + """ + reference: NotRequired[str] + """ + Subscription name displayed to buyers in their bank app. Defaults to the displayable business name. + """ + start_date: NotRequired[str] + """ + Start date of the mandate, in `YYYY-MM-DD`. Start date should be at least 3 days in the future. Defaults to 3 days after the current date. + """ + + +class SetupIntentUpdateParamsPaymentMethodOptionsSepaDebit(TypedDict): + mandate_options: NotRequired[ + "SetupIntentUpdateParamsPaymentMethodOptionsSepaDebitMandateOptions" + ] + """ + Additional fields for Mandate creation + """ + + +class SetupIntentUpdateParamsPaymentMethodOptionsSepaDebitMandateOptions( + TypedDict, +): + reference_prefix: NotRequired["Literal['']|str"] + """ + Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'. + """ + + +class SetupIntentUpdateParamsPaymentMethodOptionsUsBankAccount(TypedDict): + financial_connections: NotRequired[ + "SetupIntentUpdateParamsPaymentMethodOptionsUsBankAccountFinancialConnections" + ] + """ + Additional fields for Financial Connections Session creation + """ + mandate_options: NotRequired[ + "SetupIntentUpdateParamsPaymentMethodOptionsUsBankAccountMandateOptions" + ] + """ + Additional fields for Mandate creation + """ + networks: NotRequired[ + "SetupIntentUpdateParamsPaymentMethodOptionsUsBankAccountNetworks" + ] + """ + Additional fields for network related functions + """ + verification_method: NotRequired[ + Literal["automatic", "instant", "microdeposits"] + ] + """ + Bank account verification method. + """ + + +class SetupIntentUpdateParamsPaymentMethodOptionsUsBankAccountFinancialConnections( + TypedDict, +): + filters: NotRequired[ + "SetupIntentUpdateParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters" + ] + """ + Provide filters for the linked accounts that the customer can select for the payment method. + """ + manual_entry: NotRequired[ + "SetupIntentUpdateParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsManualEntry" + ] + """ + Customize manual entry behavior + """ + permissions: NotRequired[ + List[ + Literal["balances", "ownership", "payment_method", "transactions"] + ] + ] + """ + The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. + """ + prefetch: NotRequired[ + List[ + Literal[ + "balances", "inferred_balances", "ownership", "transactions" + ] + ] + ] + """ + List of data features that you would like to retrieve upon account creation. + """ + return_url: NotRequired[str] + """ + For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. + """ + + +class SetupIntentUpdateParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters( + TypedDict, +): + account_subcategories: NotRequired[List[Literal["checking", "savings"]]] + """ + The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`. + """ + institution: NotRequired[str] + """ + ID of the institution to use to filter for selectable accounts. + """ + + +class SetupIntentUpdateParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsManualEntry( + TypedDict, +): + mode: Literal["automatic", "custom"] + """ + Settings for configuring manual entry of account details. + """ + + +class SetupIntentUpdateParamsPaymentMethodOptionsUsBankAccountMandateOptions( + TypedDict, +): + collection_method: NotRequired["Literal['']|Literal['paper']"] + """ + The method used to collect offline mandate customer acceptance. + """ + + +class SetupIntentUpdateParamsPaymentMethodOptionsUsBankAccountNetworks( + TypedDict, +): + requested: NotRequired[List[Literal["ach", "us_domestic_wire"]]] + """ + Triggers validations to run across the selected networks + """ diff --git a/stripe/params/_setup_intent_verify_microdeposits_params.py b/stripe/params/_setup_intent_verify_microdeposits_params.py new file mode 100644 index 000000000..c53bc852c --- /dev/null +++ b/stripe/params/_setup_intent_verify_microdeposits_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 SetupIntentVerifyMicrodepositsParams(RequestOptions): + amounts: NotRequired[List[int]] + """ + Two positive integers, in *cents*, equal to the values of the microdeposits sent to the bank account. + """ + descriptor_code: NotRequired[str] + """ + A six-character code starting with SM present in the microdeposit sent to the bank account. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_shipping_rate_create_params.py b/stripe/params/_shipping_rate_create_params.py new file mode 100644 index 000000000..8697e7138 --- /dev/null +++ b/stripe/params/_shipping_rate_create_params.py @@ -0,0 +1,101 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class ShippingRateCreateParams(RequestOptions): + delivery_estimate: NotRequired["ShippingRateCreateParamsDeliveryEstimate"] + """ + The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions. + """ + display_name: str + """ + The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + fixed_amount: NotRequired["ShippingRateCreateParamsFixedAmount"] + """ + Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + tax_behavior: NotRequired[Literal["exclusive", "inclusive", "unspecified"]] + """ + Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + """ + tax_code: NotRequired[str] + """ + A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`. + """ + type: NotRequired[Literal["fixed_amount"]] + """ + The type of calculation to use on the shipping rate. + """ + + +class ShippingRateCreateParamsDeliveryEstimate(TypedDict): + maximum: NotRequired["ShippingRateCreateParamsDeliveryEstimateMaximum"] + """ + The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite. + """ + minimum: NotRequired["ShippingRateCreateParamsDeliveryEstimateMinimum"] + """ + The lower bound of the estimated range. If empty, represents no lower bound. + """ + + +class ShippingRateCreateParamsDeliveryEstimateMaximum(TypedDict): + unit: Literal["business_day", "day", "hour", "month", "week"] + """ + A unit of time. + """ + value: int + """ + Must be greater than 0. + """ + + +class ShippingRateCreateParamsDeliveryEstimateMinimum(TypedDict): + unit: Literal["business_day", "day", "hour", "month", "week"] + """ + A unit of time. + """ + value: int + """ + Must be greater than 0. + """ + + +class ShippingRateCreateParamsFixedAmount(TypedDict): + amount: int + """ + A non-negative integer in cents representing how much to charge. + """ + 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). + """ + currency_options: NotRequired[ + Dict[str, "ShippingRateCreateParamsFixedAmountCurrencyOptions"] + ] + """ + Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). + """ + + +class ShippingRateCreateParamsFixedAmountCurrencyOptions(TypedDict): + amount: int + """ + A non-negative integer in cents representing how much to charge. + """ + tax_behavior: NotRequired[Literal["exclusive", "inclusive", "unspecified"]] + """ + Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + """ diff --git a/stripe/params/_shipping_rate_list_params.py b/stripe/params/_shipping_rate_list_params.py new file mode 100644 index 000000000..4a0a8baa5 --- /dev/null +++ b/stripe/params/_shipping_rate_list_params.py @@ -0,0 +1,55 @@ +# -*- 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 ShippingRateListParams(RequestOptions): + active: NotRequired[bool] + """ + Only return shipping rates that are active or inactive. + """ + created: NotRequired["ShippingRateListParamsCreated|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. + """ + currency: NotRequired[str] + """ + Only return shipping rates for the given currency. + """ + 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 ShippingRateListParamsCreated(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/_shipping_rate_modify_params.py b/stripe/params/_shipping_rate_modify_params.py new file mode 100644 index 000000000..85f84f4bb --- /dev/null +++ b/stripe/params/_shipping_rate_modify_params.py @@ -0,0 +1,48 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class ShippingRateModifyParams(RequestOptions): + active: NotRequired[bool] + """ + Whether the shipping rate can be used for new purchases. Defaults to `true`. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + fixed_amount: NotRequired["ShippingRateModifyParamsFixedAmount"] + """ + Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + tax_behavior: NotRequired[Literal["exclusive", "inclusive", "unspecified"]] + """ + Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + """ + + +class ShippingRateModifyParamsFixedAmount(TypedDict): + currency_options: NotRequired[ + Dict[str, "ShippingRateModifyParamsFixedAmountCurrencyOptions"] + ] + """ + Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). + """ + + +class ShippingRateModifyParamsFixedAmountCurrencyOptions(TypedDict): + amount: NotRequired[int] + """ + A non-negative integer in cents representing how much to charge. + """ + tax_behavior: NotRequired[Literal["exclusive", "inclusive", "unspecified"]] + """ + Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + """ diff --git a/stripe/params/_shipping_rate_retrieve_params.py b/stripe/params/_shipping_rate_retrieve_params.py new file mode 100644 index 000000000..2cdc3e78b --- /dev/null +++ b/stripe/params/_shipping_rate_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 ShippingRateRetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_shipping_rate_update_params.py b/stripe/params/_shipping_rate_update_params.py new file mode 100644 index 000000000..bdfb36dc7 --- /dev/null +++ b/stripe/params/_shipping_rate_update_params.py @@ -0,0 +1,47 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class ShippingRateUpdateParams(TypedDict): + active: NotRequired[bool] + """ + Whether the shipping rate can be used for new purchases. Defaults to `true`. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + fixed_amount: NotRequired["ShippingRateUpdateParamsFixedAmount"] + """ + Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + tax_behavior: NotRequired[Literal["exclusive", "inclusive", "unspecified"]] + """ + Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + """ + + +class ShippingRateUpdateParamsFixedAmount(TypedDict): + currency_options: NotRequired[ + Dict[str, "ShippingRateUpdateParamsFixedAmountCurrencyOptions"] + ] + """ + Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). + """ + + +class ShippingRateUpdateParamsFixedAmountCurrencyOptions(TypedDict): + amount: NotRequired[int] + """ + A non-negative integer in cents representing how much to charge. + """ + tax_behavior: NotRequired[Literal["exclusive", "inclusive", "unspecified"]] + """ + Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + """ diff --git a/stripe/params/_source_create_params.py b/stripe/params/_source_create_params.py new file mode 100644 index 000000000..013849e76 --- /dev/null +++ b/stripe/params/_source_create_params.py @@ -0,0 +1,282 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class SourceCreateParams(RequestOptions): + amount: NotRequired[int] + """ + Amount associated with the source. This is the amount for which the source will be chargeable once ready. Required for `single_use` sources. Not supported for `receiver` type sources, where charge amount may not be specified until funds land. + """ + currency: NotRequired[str] + """ + Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) associated with the source. This is the currency for which the source will be chargeable once ready. + """ + customer: NotRequired[str] + """ + The `Customer` to whom the original source is attached to. Must be set when the original source is not a `Source` (e.g., `Card`). + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + flow: NotRequired[ + Literal["code_verification", "none", "receiver", "redirect"] + ] + """ + The authentication `flow` of the source to create. `flow` is one of `redirect`, `receiver`, `code_verification`, `none`. It is generally inferred unless a type supports multiple flows. + """ + mandate: NotRequired["SourceCreateParamsMandate"] + """ + Information about a mandate possibility attached to a source object (generally for bank debits) as well as its acceptance status. + """ + metadata: NotRequired[Dict[str, str]] + original_source: NotRequired[str] + """ + The source to share. + """ + owner: NotRequired["SourceCreateParamsOwner"] + """ + Information about the owner of the payment instrument that may be used or required by particular source types. + """ + receiver: NotRequired["SourceCreateParamsReceiver"] + """ + Optional parameters for the receiver flow. Can be set only if the source is a receiver (`flow` is `receiver`). + """ + redirect: NotRequired["SourceCreateParamsRedirect"] + """ + Parameters required for the redirect flow. Required if the source is authenticated by a redirect (`flow` is `redirect`). + """ + source_order: NotRequired["SourceCreateParamsSourceOrder"] + """ + Information about the items and shipping associated with the source. Required for transactional credit (for example Klarna) sources before you can charge it. + """ + statement_descriptor: NotRequired[str] + """ + An arbitrary string to be displayed on your customer's statement. As an example, if your website is `RunClub` and the item you're charging for is a race ticket, you may want to specify a `statement_descriptor` of `RunClub 5K race ticket.` While many payment types will display this information, some may not display it at all. + """ + token: NotRequired[str] + """ + An optional token used to create the source. When passed, token properties will override source parameters. + """ + type: NotRequired[str] + """ + The `type` of the source to create. Required unless `customer` and `original_source` are specified (see the [Cloning card Sources](https://stripe.com/docs/sources/connect#cloning-card-sources) guide) + """ + usage: NotRequired[Literal["reusable", "single_use"]] + + +class SourceCreateParamsMandate(TypedDict): + acceptance: NotRequired["SourceCreateParamsMandateAcceptance"] + """ + The parameters required to notify Stripe of a mandate acceptance or refusal by the customer. + """ + amount: NotRequired["Literal['']|int"] + """ + The amount specified by the mandate. (Leave null for a mandate covering all amounts) + """ + currency: NotRequired[str] + """ + The currency specified by the mandate. (Must match `currency` of the source) + """ + interval: NotRequired[Literal["one_time", "scheduled", "variable"]] + """ + The interval of debits permitted by the mandate. Either `one_time` (just permitting a single debit), `scheduled` (with debits on an agreed schedule or for clearly-defined events), or `variable`(for debits with any frequency) + """ + notification_method: NotRequired[ + Literal["deprecated_none", "email", "manual", "none", "stripe_email"] + ] + """ + The method Stripe should use to notify the customer of upcoming debit instructions and/or mandate confirmation as required by the underlying debit network. Either `email` (an email is sent directly to the customer), `manual` (a `source.mandate_notification` event is sent to your webhooks endpoint and you should handle the notification) or `none` (the underlying debit network does not require any notification). + """ + + +class SourceCreateParamsMandateAcceptance(TypedDict): + date: NotRequired[int] + """ + The Unix timestamp (in seconds) when the mandate was accepted or refused by the customer. + """ + ip: NotRequired[str] + """ + The IP address from which the mandate was accepted or refused by the customer. + """ + offline: NotRequired["SourceCreateParamsMandateAcceptanceOffline"] + """ + The parameters required to store a mandate accepted offline. Should only be set if `mandate[type]` is `offline` + """ + online: NotRequired["SourceCreateParamsMandateAcceptanceOnline"] + """ + The parameters required to store a mandate accepted online. Should only be set if `mandate[type]` is `online` + """ + status: Literal["accepted", "pending", "refused", "revoked"] + """ + The status of the mandate acceptance. Either `accepted` (the mandate was accepted) or `refused` (the mandate was refused). + """ + type: NotRequired[Literal["offline", "online"]] + """ + The type of acceptance information included with the mandate. Either `online` or `offline` + """ + user_agent: NotRequired[str] + """ + The user agent of the browser from which the mandate was accepted or refused by the customer. + """ + + +class SourceCreateParamsMandateAcceptanceOffline(TypedDict): + contact_email: str + """ + An email to contact you with if a copy of the mandate is requested, required if `type` is `offline`. + """ + + +class SourceCreateParamsMandateAcceptanceOnline(TypedDict): + date: NotRequired[int] + """ + The Unix timestamp (in seconds) when the mandate was accepted or refused by the customer. + """ + ip: NotRequired[str] + """ + The IP address from which the mandate was accepted or refused by the customer. + """ + user_agent: NotRequired[str] + """ + The user agent of the browser from which the mandate was accepted or refused by the customer. + """ + + +class SourceCreateParamsOwner(TypedDict): + address: NotRequired["SourceCreateParamsOwnerAddress"] + """ + Owner's address. + """ + email: NotRequired[str] + """ + Owner's email address. + """ + name: NotRequired[str] + """ + Owner's full name. + """ + phone: NotRequired[str] + """ + Owner's phone number. + """ + + +class SourceCreateParamsOwnerAddress(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. + """ + + +class SourceCreateParamsReceiver(TypedDict): + refund_attributes_method: NotRequired[Literal["email", "manual", "none"]] + """ + The method Stripe should use to request information needed to process a refund or mispayment. Either `email` (an email is sent directly to the customer) or `manual` (a `source.refund_attributes_required` event is sent to your webhooks endpoint). Refer to each payment method's documentation to learn which refund attributes may be required. + """ + + +class SourceCreateParamsRedirect(TypedDict): + return_url: str + """ + The URL you provide to redirect the customer back to you after they authenticated their payment. It can use your application URI scheme in the context of a mobile application. + """ + + +class SourceCreateParamsSourceOrder(TypedDict): + items: NotRequired[List["SourceCreateParamsSourceOrderItem"]] + """ + List of items constituting the order. + """ + shipping: NotRequired["SourceCreateParamsSourceOrderShipping"] + """ + Shipping address for the order. Required if any of the SKUs are for products that have `shippable` set to true. + """ + + +class SourceCreateParamsSourceOrderItem(TypedDict): + amount: NotRequired[int] + currency: NotRequired[str] + description: NotRequired[str] + parent: NotRequired[str] + """ + The ID of the SKU being ordered. + """ + quantity: NotRequired[int] + """ + The quantity of this order item. When type is `sku`, this is the number of instances of the SKU to be ordered. + """ + type: NotRequired[Literal["discount", "shipping", "sku", "tax"]] + + +class SourceCreateParamsSourceOrderShipping(TypedDict): + address: "SourceCreateParamsSourceOrderShippingAddress" + """ + Shipping address. + """ + carrier: NotRequired[str] + """ + The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. + """ + name: NotRequired[str] + """ + Recipient name. + """ + phone: NotRequired[str] + """ + Recipient phone (including extension). + """ + tracking_number: NotRequired[str] + """ + The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. + """ + + +class SourceCreateParamsSourceOrderShippingAddress(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: 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. + """ diff --git a/stripe/params/_source_detach_params.py b/stripe/params/_source_detach_params.py new file mode 100644 index 000000000..854bb41db --- /dev/null +++ b/stripe/params/_source_detach_params.py @@ -0,0 +1,11 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import NotRequired, TypedDict + + +class SourceDetachParams(TypedDict): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_source_list_source_transactions_params.py b/stripe/params/_source_list_source_transactions_params.py new file mode 100644 index 000000000..67310857c --- /dev/null +++ b/stripe/params/_source_list_source_transactions_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 SourceListSourceTransactionsParams(RequestOptions): + 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. + """ diff --git a/stripe/params/_source_modify_params.py b/stripe/params/_source_modify_params.py new file mode 100644 index 000000000..f57584e1d --- /dev/null +++ b/stripe/params/_source_modify_params.py @@ -0,0 +1,232 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class SourceModifyParams(RequestOptions): + amount: NotRequired[int] + """ + Amount associated with the source. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + mandate: NotRequired["SourceModifyParamsMandate"] + """ + Information about a mandate possibility attached to a source object (generally for bank debits) as well as its acceptance status. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + owner: NotRequired["SourceModifyParamsOwner"] + """ + Information about the owner of the payment instrument that may be used or required by particular source types. + """ + source_order: NotRequired["SourceModifyParamsSourceOrder"] + """ + Information about the items and shipping associated with the source. Required for transactional credit (for example Klarna) sources before you can charge it. + """ + + +class SourceModifyParamsMandate(TypedDict): + acceptance: NotRequired["SourceModifyParamsMandateAcceptance"] + """ + The parameters required to notify Stripe of a mandate acceptance or refusal by the customer. + """ + amount: NotRequired["Literal['']|int"] + """ + The amount specified by the mandate. (Leave null for a mandate covering all amounts) + """ + currency: NotRequired[str] + """ + The currency specified by the mandate. (Must match `currency` of the source) + """ + interval: NotRequired[Literal["one_time", "scheduled", "variable"]] + """ + The interval of debits permitted by the mandate. Either `one_time` (just permitting a single debit), `scheduled` (with debits on an agreed schedule or for clearly-defined events), or `variable`(for debits with any frequency) + """ + notification_method: NotRequired[ + Literal["deprecated_none", "email", "manual", "none", "stripe_email"] + ] + """ + The method Stripe should use to notify the customer of upcoming debit instructions and/or mandate confirmation as required by the underlying debit network. Either `email` (an email is sent directly to the customer), `manual` (a `source.mandate_notification` event is sent to your webhooks endpoint and you should handle the notification) or `none` (the underlying debit network does not require any notification). + """ + + +class SourceModifyParamsMandateAcceptance(TypedDict): + date: NotRequired[int] + """ + The Unix timestamp (in seconds) when the mandate was accepted or refused by the customer. + """ + ip: NotRequired[str] + """ + The IP address from which the mandate was accepted or refused by the customer. + """ + offline: NotRequired["SourceModifyParamsMandateAcceptanceOffline"] + """ + The parameters required to store a mandate accepted offline. Should only be set if `mandate[type]` is `offline` + """ + online: NotRequired["SourceModifyParamsMandateAcceptanceOnline"] + """ + The parameters required to store a mandate accepted online. Should only be set if `mandate[type]` is `online` + """ + status: Literal["accepted", "pending", "refused", "revoked"] + """ + The status of the mandate acceptance. Either `accepted` (the mandate was accepted) or `refused` (the mandate was refused). + """ + type: NotRequired[Literal["offline", "online"]] + """ + The type of acceptance information included with the mandate. Either `online` or `offline` + """ + user_agent: NotRequired[str] + """ + The user agent of the browser from which the mandate was accepted or refused by the customer. + """ + + +class SourceModifyParamsMandateAcceptanceOffline(TypedDict): + contact_email: str + """ + An email to contact you with if a copy of the mandate is requested, required if `type` is `offline`. + """ + + +class SourceModifyParamsMandateAcceptanceOnline(TypedDict): + date: NotRequired[int] + """ + The Unix timestamp (in seconds) when the mandate was accepted or refused by the customer. + """ + ip: NotRequired[str] + """ + The IP address from which the mandate was accepted or refused by the customer. + """ + user_agent: NotRequired[str] + """ + The user agent of the browser from which the mandate was accepted or refused by the customer. + """ + + +class SourceModifyParamsOwner(TypedDict): + address: NotRequired["SourceModifyParamsOwnerAddress"] + """ + Owner's address. + """ + email: NotRequired[str] + """ + Owner's email address. + """ + name: NotRequired[str] + """ + Owner's full name. + """ + phone: NotRequired[str] + """ + Owner's phone number. + """ + + +class SourceModifyParamsOwnerAddress(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. + """ + + +class SourceModifyParamsSourceOrder(TypedDict): + items: NotRequired[List["SourceModifyParamsSourceOrderItem"]] + """ + List of items constituting the order. + """ + shipping: NotRequired["SourceModifyParamsSourceOrderShipping"] + """ + Shipping address for the order. Required if any of the SKUs are for products that have `shippable` set to true. + """ + + +class SourceModifyParamsSourceOrderItem(TypedDict): + amount: NotRequired[int] + currency: NotRequired[str] + description: NotRequired[str] + parent: NotRequired[str] + """ + The ID of the SKU being ordered. + """ + quantity: NotRequired[int] + """ + The quantity of this order item. When type is `sku`, this is the number of instances of the SKU to be ordered. + """ + type: NotRequired[Literal["discount", "shipping", "sku", "tax"]] + + +class SourceModifyParamsSourceOrderShipping(TypedDict): + address: "SourceModifyParamsSourceOrderShippingAddress" + """ + Shipping address. + """ + carrier: NotRequired[str] + """ + The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. + """ + name: NotRequired[str] + """ + Recipient name. + """ + phone: NotRequired[str] + """ + Recipient phone (including extension). + """ + tracking_number: NotRequired[str] + """ + The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. + """ + + +class SourceModifyParamsSourceOrderShippingAddress(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: 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. + """ diff --git a/stripe/params/_source_retrieve_params.py b/stripe/params/_source_retrieve_params.py new file mode 100644 index 000000000..cea482bde --- /dev/null +++ b/stripe/params/_source_retrieve_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 SourceRetrieveParams(RequestOptions): + client_secret: NotRequired[str] + """ + The client secret of the source. Required if a publishable key is used to retrieve the source. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_source_transaction_list_params.py b/stripe/params/_source_transaction_list_params.py new file mode 100644 index 000000000..bdc215da3 --- /dev/null +++ b/stripe/params/_source_transaction_list_params.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import NotRequired, TypedDict + + +class SourceTransactionListParams(TypedDict): + 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. + """ diff --git a/stripe/params/_source_update_params.py b/stripe/params/_source_update_params.py new file mode 100644 index 000000000..ff800484c --- /dev/null +++ b/stripe/params/_source_update_params.py @@ -0,0 +1,231 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class SourceUpdateParams(TypedDict): + amount: NotRequired[int] + """ + Amount associated with the source. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + mandate: NotRequired["SourceUpdateParamsMandate"] + """ + Information about a mandate possibility attached to a source object (generally for bank debits) as well as its acceptance status. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + owner: NotRequired["SourceUpdateParamsOwner"] + """ + Information about the owner of the payment instrument that may be used or required by particular source types. + """ + source_order: NotRequired["SourceUpdateParamsSourceOrder"] + """ + Information about the items and shipping associated with the source. Required for transactional credit (for example Klarna) sources before you can charge it. + """ + + +class SourceUpdateParamsMandate(TypedDict): + acceptance: NotRequired["SourceUpdateParamsMandateAcceptance"] + """ + The parameters required to notify Stripe of a mandate acceptance or refusal by the customer. + """ + amount: NotRequired["Literal['']|int"] + """ + The amount specified by the mandate. (Leave null for a mandate covering all amounts) + """ + currency: NotRequired[str] + """ + The currency specified by the mandate. (Must match `currency` of the source) + """ + interval: NotRequired[Literal["one_time", "scheduled", "variable"]] + """ + The interval of debits permitted by the mandate. Either `one_time` (just permitting a single debit), `scheduled` (with debits on an agreed schedule or for clearly-defined events), or `variable`(for debits with any frequency) + """ + notification_method: NotRequired[ + Literal["deprecated_none", "email", "manual", "none", "stripe_email"] + ] + """ + The method Stripe should use to notify the customer of upcoming debit instructions and/or mandate confirmation as required by the underlying debit network. Either `email` (an email is sent directly to the customer), `manual` (a `source.mandate_notification` event is sent to your webhooks endpoint and you should handle the notification) or `none` (the underlying debit network does not require any notification). + """ + + +class SourceUpdateParamsMandateAcceptance(TypedDict): + date: NotRequired[int] + """ + The Unix timestamp (in seconds) when the mandate was accepted or refused by the customer. + """ + ip: NotRequired[str] + """ + The IP address from which the mandate was accepted or refused by the customer. + """ + offline: NotRequired["SourceUpdateParamsMandateAcceptanceOffline"] + """ + The parameters required to store a mandate accepted offline. Should only be set if `mandate[type]` is `offline` + """ + online: NotRequired["SourceUpdateParamsMandateAcceptanceOnline"] + """ + The parameters required to store a mandate accepted online. Should only be set if `mandate[type]` is `online` + """ + status: Literal["accepted", "pending", "refused", "revoked"] + """ + The status of the mandate acceptance. Either `accepted` (the mandate was accepted) or `refused` (the mandate was refused). + """ + type: NotRequired[Literal["offline", "online"]] + """ + The type of acceptance information included with the mandate. Either `online` or `offline` + """ + user_agent: NotRequired[str] + """ + The user agent of the browser from which the mandate was accepted or refused by the customer. + """ + + +class SourceUpdateParamsMandateAcceptanceOffline(TypedDict): + contact_email: str + """ + An email to contact you with if a copy of the mandate is requested, required if `type` is `offline`. + """ + + +class SourceUpdateParamsMandateAcceptanceOnline(TypedDict): + date: NotRequired[int] + """ + The Unix timestamp (in seconds) when the mandate was accepted or refused by the customer. + """ + ip: NotRequired[str] + """ + The IP address from which the mandate was accepted or refused by the customer. + """ + user_agent: NotRequired[str] + """ + The user agent of the browser from which the mandate was accepted or refused by the customer. + """ + + +class SourceUpdateParamsOwner(TypedDict): + address: NotRequired["SourceUpdateParamsOwnerAddress"] + """ + Owner's address. + """ + email: NotRequired[str] + """ + Owner's email address. + """ + name: NotRequired[str] + """ + Owner's full name. + """ + phone: NotRequired[str] + """ + Owner's phone number. + """ + + +class SourceUpdateParamsOwnerAddress(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. + """ + + +class SourceUpdateParamsSourceOrder(TypedDict): + items: NotRequired[List["SourceUpdateParamsSourceOrderItem"]] + """ + List of items constituting the order. + """ + shipping: NotRequired["SourceUpdateParamsSourceOrderShipping"] + """ + Shipping address for the order. Required if any of the SKUs are for products that have `shippable` set to true. + """ + + +class SourceUpdateParamsSourceOrderItem(TypedDict): + amount: NotRequired[int] + currency: NotRequired[str] + description: NotRequired[str] + parent: NotRequired[str] + """ + The ID of the SKU being ordered. + """ + quantity: NotRequired[int] + """ + The quantity of this order item. When type is `sku`, this is the number of instances of the SKU to be ordered. + """ + type: NotRequired[Literal["discount", "shipping", "sku", "tax"]] + + +class SourceUpdateParamsSourceOrderShipping(TypedDict): + address: "SourceUpdateParamsSourceOrderShippingAddress" + """ + Shipping address. + """ + carrier: NotRequired[str] + """ + The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. + """ + name: NotRequired[str] + """ + Recipient name. + """ + phone: NotRequired[str] + """ + Recipient phone (including extension). + """ + tracking_number: NotRequired[str] + """ + The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. + """ + + +class SourceUpdateParamsSourceOrderShippingAddress(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: 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. + """ diff --git a/stripe/params/_source_verify_params.py b/stripe/params/_source_verify_params.py new file mode 100644 index 000000000..81b9e83cc --- /dev/null +++ b/stripe/params/_source_verify_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 SourceVerifyParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + values: List[str] + """ + The values needed to verify the source. + """ diff --git a/stripe/params/_subscription_attach_cadence_params.py b/stripe/params/_subscription_attach_cadence_params.py new file mode 100644 index 000000000..094ad8779 --- /dev/null +++ b/stripe/params/_subscription_attach_cadence_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 SubscriptionAttachCadenceParams(RequestOptions): + billing_cadence: str + """ + The Billing Cadence which controls the timing of recurring invoice generation for this subscription. If unset, the subscription will bill according to its own configured schedule and create its own invoices. If set, this subscription will be billed by the cadence instead, potentially sharing invoices with the other subscriptions linked to that Cadence. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_subscription_cancel_params.py b/stripe/params/_subscription_cancel_params.py new file mode 100644 index 000000000..503bdb00e --- /dev/null +++ b/stripe/params/_subscription_cancel_params.py @@ -0,0 +1,39 @@ +# -*- 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, TypedDict + + +class SubscriptionCancelParams(RequestOptions): + cancellation_details: NotRequired[ + "SubscriptionCancelParamsCancellationDetails" + ] + """ + Details about why this subscription was cancelled + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + invoice_now: NotRequired[bool] + """ + Will generate a final invoice that invoices for any un-invoiced metered usage and new/pending proration invoice items. Defaults to `false`. + """ + prorate: NotRequired[bool] + """ + Will generate a proration invoice item that credits remaining unused time until the subscription period end. Defaults to `false`. + """ + + +class SubscriptionCancelParamsCancellationDetails(TypedDict): + comment: NotRequired["Literal['']|str"] + """ + Additional comments about why the user canceled the subscription, if the subscription was canceled explicitly by the user. + """ + feedback: NotRequired[ + "Literal['']|Literal['customer_service', 'low_quality', 'missing_features', 'other', 'switched_service', 'too_complex', 'too_expensive', 'unused']" + ] + """ + The customer submitted reason for why they canceled, if the subscription was canceled explicitly by the user. + """ diff --git a/stripe/params/_subscription_create_params.py b/stripe/params/_subscription_create_params.py new file mode 100644 index 000000000..a5bd33036 --- /dev/null +++ b/stripe/params/_subscription_create_params.py @@ -0,0 +1,1080 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class SubscriptionCreateParams(RequestOptions): + add_invoice_items: NotRequired[ + List["SubscriptionCreateParamsAddInvoiceItem"] + ] + """ + A list of prices and quantities that will generate invoice items appended to the next invoice for this subscription. You may pass up to 20 items. + """ + application_fee_percent: NotRequired["Literal['']|float"] + """ + A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). + """ + automatic_tax: NotRequired["SubscriptionCreateParamsAutomaticTax"] + """ + Automatic tax settings for this subscription. + """ + backdate_start_date: NotRequired[int] + """ + A past timestamp to backdate the subscription's start date to. If set, the first invoice will contain line items for the timespan between the start date and the current time. Can be combined with trials and the billing cycle anchor. + """ + billing_cadence: NotRequired[str] + """ + The Billing Cadence which controls the timing of recurring invoice generation for this subscription. If unset, the subscription will bill according to its own configured schedule and create its own invoices. If set, this subscription will be billed by the cadence instead, potentially sharing invoices with the other subscriptions linked to that Cadence. + """ + billing_cycle_anchor: NotRequired[int] + """ + A future timestamp in UTC format to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). The anchor is the reference point that aligns future billing cycle dates. It sets the day of week for `week` intervals, the day of month for `month` and `year` intervals, and the month of year for `year` intervals. + """ + billing_cycle_anchor_config: NotRequired[ + "SubscriptionCreateParamsBillingCycleAnchorConfig" + ] + """ + Mutually exclusive with billing_cycle_anchor and only valid with monthly and yearly price intervals. When provided, the billing_cycle_anchor is set to the next occurrence of the day_of_month at the hour, minute, and second UTC. + """ + billing_mode: NotRequired["SubscriptionCreateParamsBillingMode"] + """ + Controls how prorations and invoices for subscriptions are calculated and orchestrated. + """ + billing_schedules: NotRequired[ + List["SubscriptionCreateParamsBillingSchedule"] + ] + """ + Sets the billing schedules for the subscription. + """ + billing_thresholds: NotRequired[ + "Literal['']|SubscriptionCreateParamsBillingThresholds" + ] + """ + Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. + """ + cancel_at: NotRequired["int|Literal['max_period_end', 'min_period_end']"] + """ + A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period. + """ + cancel_at_period_end: NotRequired[bool] + """ + Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. + """ + collection_method: NotRequired[ + Literal["charge_automatically", "send_invoice"] + ] + """ + Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`. + """ + currency: NotRequired[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). + """ + customer: NotRequired[str] + """ + The identifier of the customer to subscribe. + """ + customer_account: NotRequired[str] + """ + The identifier of the account to subscribe. + """ + days_until_due: NotRequired[int] + """ + Number of days a customer has to pay invoices generated by this subscription. Valid only for subscriptions where `collection_method` is set to `send_invoice`. + """ + default_payment_method: NotRequired[str] + """ + ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over `default_source`. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). + """ + default_source: NotRequired[str] + """ + ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If `default_payment_method` is also set, `default_payment_method` will take precedence. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). + """ + default_tax_rates: NotRequired["Literal['']|List[str]"] + """ + The tax rates that will apply to any subscription item that does not have `tax_rates` set. Invoices created will have their `default_tax_rates` populated from the subscription. + """ + description: NotRequired[str] + """ + The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. + """ + discounts: NotRequired[ + "Literal['']|List[SubscriptionCreateParamsDiscount]" + ] + """ + The coupons to redeem into discounts for the subscription. If not specified or empty, inherits the discount from the subscription's customer. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + invoice_settings: NotRequired["SubscriptionCreateParamsInvoiceSettings"] + """ + All invoices will be billed using the specified settings. + """ + items: NotRequired[List["SubscriptionCreateParamsItem"]] + """ + A list of up to 20 subscription items, each with an attached price. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + off_session: NotRequired[bool] + """ + Indicates if a customer is on or off-session while an invoice payment is attempted. Defaults to `false` (on-session). + """ + on_behalf_of: NotRequired["Literal['']|str"] + """ + The account on behalf of which to charge, for each of the subscription's invoices. + """ + payment_behavior: NotRequired[ + Literal[ + "allow_incomplete", + "default_incomplete", + "error_if_incomplete", + "pending_if_incomplete", + ] + ] + """ + Only applies to subscriptions with `collection_method=charge_automatically`. + + Use `allow_incomplete` to create Subscriptions with `status=incomplete` if the first invoice can't be paid. Creating Subscriptions with this status allows you to manage scenarios where additional customer actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior. + + Use `default_incomplete` to create Subscriptions with `status=incomplete` when the first invoice requires payment, otherwise start as active. Subscriptions transition to `status=active` when successfully confirming the PaymentIntent on the first invoice. This allows simpler management of scenarios where additional customer actions are needed to pay a subscription's invoice, such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. If the PaymentIntent is not confirmed within 23 hours Subscriptions transition to `status=incomplete_expired`, which is a terminal state. + + Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's first invoice can't be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further customer action is needed, this parameter doesn't create a Subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more. + + `pending_if_incomplete` is only used with updates and cannot be passed when creating a Subscription. + + Subscriptions with `collection_method=send_invoice` are automatically activated regardless of the first Invoice status. + """ + payment_settings: NotRequired["SubscriptionCreateParamsPaymentSettings"] + """ + Payment settings to pass to invoices created by the subscription. + """ + pending_invoice_item_interval: NotRequired[ + "Literal['']|SubscriptionCreateParamsPendingInvoiceItemInterval" + ] + """ + Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval. + """ + prebilling: NotRequired["SubscriptionCreateParamsPrebilling"] + """ + If specified, the invoicing for the given billing cycle iterations will be processed now. + """ + proration_behavior: NotRequired[ + Literal["always_invoice", "create_prorations", "none"] + ] + """ + Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) resulting from the `billing_cycle_anchor`. If no value is passed, the default is `create_prorations`. + """ + transfer_data: NotRequired["SubscriptionCreateParamsTransferData"] + """ + If specified, the funds from the subscription's invoices will be transferred to the destination and the ID of the resulting transfers will be found on the resulting charges. + """ + trial_end: NotRequired["Literal['now']|int"] + """ + Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. If set, trial_end will override the default trial period of the plan the customer is being subscribed to. The special value `now` can be provided to end the customer's trial immediately. Can be at most two years from `billing_cycle_anchor`. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. + """ + trial_from_plan: NotRequired[bool] + """ + Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. + """ + trial_period_days: NotRequired[int] + """ + Integer representing the number of trial period days before the customer is charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. + """ + trial_settings: NotRequired["SubscriptionCreateParamsTrialSettings"] + """ + Settings related to subscription trials. + """ + + +class SubscriptionCreateParamsAddInvoiceItem(TypedDict): + discounts: NotRequired[ + List["SubscriptionCreateParamsAddInvoiceItemDiscount"] + ] + """ + The coupons to redeem into discounts for the item. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + period: NotRequired["SubscriptionCreateParamsAddInvoiceItemPeriod"] + """ + The period associated with this invoice item. If not set, `period.start.type` defaults to `max_item_period_start` and `period.end.type` defaults to `min_item_period_end`. + """ + price: NotRequired[str] + """ + The ID of the price object. One of `price` or `price_data` is required. + """ + price_data: NotRequired["SubscriptionCreateParamsAddInvoiceItemPriceData"] + """ + Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. + """ + quantity: NotRequired[int] + """ + Quantity for this item. Defaults to 1. + """ + tax_rates: NotRequired["Literal['']|List[str]"] + """ + The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item. + """ + + +class SubscriptionCreateParamsAddInvoiceItemDiscount(TypedDict): + coupon: NotRequired[str] + """ + ID of the coupon to create a new discount for. + """ + discount: NotRequired[str] + """ + ID of an existing discount on the object (or one of its ancestors) to reuse. + """ + discount_end: NotRequired[ + "SubscriptionCreateParamsAddInvoiceItemDiscountDiscountEnd" + ] + """ + Details to determine how long the discount should be applied for. + """ + promotion_code: NotRequired[str] + """ + ID of the promotion code to create a new discount for. + """ + + +class SubscriptionCreateParamsAddInvoiceItemDiscountDiscountEnd(TypedDict): + duration: NotRequired[ + "SubscriptionCreateParamsAddInvoiceItemDiscountDiscountEndDuration" + ] + """ + Time span for the redeemed discount. + """ + timestamp: NotRequired[int] + """ + A precise Unix timestamp for the discount to end. Must be in the future. + """ + type: Literal["duration", "timestamp"] + """ + The type of calculation made to determine when the discount ends. + """ + + +class SubscriptionCreateParamsAddInvoiceItemDiscountDiscountEndDuration( + TypedDict, +): + interval: Literal["day", "month", "week", "year"] + """ + Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + """ + interval_count: int + """ + The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + """ + + +class SubscriptionCreateParamsAddInvoiceItemPeriod(TypedDict): + end: "SubscriptionCreateParamsAddInvoiceItemPeriodEnd" + """ + End of the invoice item period. + """ + start: "SubscriptionCreateParamsAddInvoiceItemPeriodStart" + """ + Start of the invoice item period. + """ + + +class SubscriptionCreateParamsAddInvoiceItemPeriodEnd(TypedDict): + timestamp: NotRequired[int] + """ + A precise Unix timestamp for the end of the invoice item period. Must be greater than or equal to `period.start`. + """ + type: Literal["min_item_period_end", "timestamp"] + """ + Select how to calculate the end of the invoice item period. + """ + + +class SubscriptionCreateParamsAddInvoiceItemPeriodStart(TypedDict): + timestamp: NotRequired[int] + """ + A precise Unix timestamp for the start of the invoice item period. Must be less than or equal to `period.end`. + """ + type: Literal["max_item_period_start", "now", "timestamp"] + """ + Select how to calculate the start of the invoice item period. + """ + + +class SubscriptionCreateParamsAddInvoiceItemPriceData(TypedDict): + 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). + """ + product: str + """ + The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to. + """ + tax_behavior: NotRequired[Literal["exclusive", "inclusive", "unspecified"]] + """ + Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + """ + unit_amount: NotRequired[int] + """ + A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge or a negative integer representing the amount to credit to the customer. + """ + unit_amount_decimal: NotRequired[str] + """ + Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + """ + + +class SubscriptionCreateParamsAutomaticTax(TypedDict): + enabled: bool + """ + Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription. + """ + liability: NotRequired["SubscriptionCreateParamsAutomaticTaxLiability"] + """ + The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + """ + + +class SubscriptionCreateParamsAutomaticTaxLiability(TypedDict): + account: NotRequired[str] + """ + The connected account being referenced when `type` is `account`. + """ + type: Literal["account", "self"] + """ + Type of the account referenced in the request. + """ + + +class SubscriptionCreateParamsBillingCycleAnchorConfig(TypedDict): + day_of_month: int + """ + The day of the month the anchor should be. Ranges from 1 to 31. + """ + hour: NotRequired[int] + """ + The hour of the day the anchor should be. Ranges from 0 to 23. + """ + minute: NotRequired[int] + """ + The minute of the hour the anchor should be. Ranges from 0 to 59. + """ + month: NotRequired[int] + """ + The month to start full cycle periods. Ranges from 1 to 12. + """ + second: NotRequired[int] + """ + The second of the minute the anchor should be. Ranges from 0 to 59. + """ + + +class SubscriptionCreateParamsBillingMode(TypedDict): + flexible: NotRequired["SubscriptionCreateParamsBillingModeFlexible"] + """ + Configure behavior for flexible billing mode. + """ + type: Literal["classic", "flexible"] + """ + Controls the calculation and orchestration of prorations and invoices for subscriptions. If no value is passed, the default is `flexible`. + """ + + +class SubscriptionCreateParamsBillingModeFlexible(TypedDict): + proration_discounts: NotRequired[Literal["included", "itemized"]] + """ + Controls how invoices and invoice items display proration amounts and discount amounts. + """ + + +class SubscriptionCreateParamsBillingSchedule(TypedDict): + applies_to: NotRequired[ + List["SubscriptionCreateParamsBillingScheduleAppliesTo"] + ] + """ + Configure billing schedule differently for individual subscription items. + """ + bill_until: "SubscriptionCreateParamsBillingScheduleBillUntil" + """ + The end date for the billing schedule. + """ + key: NotRequired[str] + """ + Specify a key for the billing schedule. Must be unique to this field, alphanumeric, and up to 200 characters. If not provided, a unique key will be generated. + """ + + +class SubscriptionCreateParamsBillingScheduleAppliesTo(TypedDict): + price: NotRequired[str] + """ + The ID of the price object. + """ + type: Literal["price"] + """ + Controls which subscription items the billing schedule applies to. + """ + + +class SubscriptionCreateParamsBillingScheduleBillUntil(TypedDict): + duration: NotRequired[ + "SubscriptionCreateParamsBillingScheduleBillUntilDuration" + ] + """ + Specifies the billing period. + """ + timestamp: NotRequired[int] + """ + The end date of the billing schedule. + """ + type: Literal["duration", "timestamp"] + """ + Describes how the billing schedule will determine the end date. Either `duration` or `timestamp`. + """ + + +class SubscriptionCreateParamsBillingScheduleBillUntilDuration(TypedDict): + interval: Literal["day", "month", "week", "year"] + """ + Specifies billing duration. Either `day`, `week`, `month` or `year`. + """ + interval_count: NotRequired[int] + """ + The multiplier applied to the interval. + """ + + +class SubscriptionCreateParamsBillingThresholds(TypedDict): + amount_gte: NotRequired[int] + """ + Monetary threshold that triggers the subscription to advance to a new billing period + """ + reset_billing_cycle_anchor: NotRequired[bool] + """ + Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. + """ + + +class SubscriptionCreateParamsDiscount(TypedDict): + coupon: NotRequired[str] + """ + ID of the coupon to create a new discount for. + """ + discount: NotRequired[str] + """ + ID of an existing discount on the object (or one of its ancestors) to reuse. + """ + discount_end: NotRequired["SubscriptionCreateParamsDiscountDiscountEnd"] + """ + Details to determine how long the discount should be applied for. + """ + promotion_code: NotRequired[str] + """ + ID of the promotion code to create a new discount for. + """ + + +class SubscriptionCreateParamsDiscountDiscountEnd(TypedDict): + duration: NotRequired[ + "SubscriptionCreateParamsDiscountDiscountEndDuration" + ] + """ + Time span for the redeemed discount. + """ + timestamp: NotRequired[int] + """ + A precise Unix timestamp for the discount to end. Must be in the future. + """ + type: Literal["duration", "timestamp"] + """ + The type of calculation made to determine when the discount ends. + """ + + +class SubscriptionCreateParamsDiscountDiscountEndDuration(TypedDict): + interval: Literal["day", "month", "week", "year"] + """ + Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + """ + interval_count: int + """ + The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + """ + + +class SubscriptionCreateParamsInvoiceSettings(TypedDict): + account_tax_ids: NotRequired["Literal['']|List[str]"] + """ + The account tax IDs associated with the subscription. Will be set on invoices generated by the subscription. + """ + issuer: NotRequired["SubscriptionCreateParamsInvoiceSettingsIssuer"] + """ + The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + """ + + +class SubscriptionCreateParamsInvoiceSettingsIssuer(TypedDict): + account: NotRequired[str] + """ + The connected account being referenced when `type` is `account`. + """ + type: Literal["account", "self"] + """ + Type of the account referenced in the request. + """ + + +class SubscriptionCreateParamsItem(TypedDict): + billing_thresholds: NotRequired[ + "Literal['']|SubscriptionCreateParamsItemBillingThresholds" + ] + """ + Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. + """ + discounts: NotRequired[ + "Literal['']|List[SubscriptionCreateParamsItemDiscount]" + ] + """ + The coupons to redeem into discounts for the subscription item. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + plan: NotRequired[str] + """ + Plan ID for this item, as a string. + """ + price: NotRequired[str] + """ + The ID of the price object. + """ + price_data: NotRequired["SubscriptionCreateParamsItemPriceData"] + """ + Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + """ + quantity: NotRequired[int] + """ + Quantity for this item. + """ + tax_rates: NotRequired["Literal['']|List[str]"] + """ + A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. + """ + trial: NotRequired["SubscriptionCreateParamsItemTrial"] + """ + Define options to configure the trial on the subscription item. + """ + + +class SubscriptionCreateParamsItemBillingThresholds(TypedDict): + usage_gte: int + """ + Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)) + """ + + +class SubscriptionCreateParamsItemDiscount(TypedDict): + coupon: NotRequired[str] + """ + ID of the coupon to create a new discount for. + """ + discount: NotRequired[str] + """ + ID of an existing discount on the object (or one of its ancestors) to reuse. + """ + discount_end: NotRequired[ + "SubscriptionCreateParamsItemDiscountDiscountEnd" + ] + """ + Details to determine how long the discount should be applied for. + """ + promotion_code: NotRequired[str] + """ + ID of the promotion code to create a new discount for. + """ + + +class SubscriptionCreateParamsItemDiscountDiscountEnd(TypedDict): + duration: NotRequired[ + "SubscriptionCreateParamsItemDiscountDiscountEndDuration" + ] + """ + Time span for the redeemed discount. + """ + timestamp: NotRequired[int] + """ + A precise Unix timestamp for the discount to end. Must be in the future. + """ + type: Literal["duration", "timestamp"] + """ + The type of calculation made to determine when the discount ends. + """ + + +class SubscriptionCreateParamsItemDiscountDiscountEndDuration(TypedDict): + interval: Literal["day", "month", "week", "year"] + """ + Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + """ + interval_count: int + """ + The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + """ + + +class SubscriptionCreateParamsItemPriceData(TypedDict): + 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). + """ + product: str + """ + The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to. + """ + recurring: "SubscriptionCreateParamsItemPriceDataRecurring" + """ + The recurring components of a price such as `interval` and `interval_count`. + """ + tax_behavior: NotRequired[Literal["exclusive", "inclusive", "unspecified"]] + """ + Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + """ + unit_amount: NotRequired[int] + """ + A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + """ + unit_amount_decimal: NotRequired[str] + """ + Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + """ + + +class SubscriptionCreateParamsItemPriceDataRecurring(TypedDict): + interval: Literal["day", "month", "week", "year"] + """ + Specifies billing frequency. Either `day`, `week`, `month` or `year`. + """ + interval_count: NotRequired[int] + """ + The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). + """ + + +class SubscriptionCreateParamsItemTrial(TypedDict): + converts_to: NotRequired[List[str]] + """ + List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. + """ + type: Literal["free", "paid"] + """ + Determines the type of trial for this item. + """ + + +class SubscriptionCreateParamsPaymentSettings(TypedDict): + payment_method_options: NotRequired[ + "SubscriptionCreateParamsPaymentSettingsPaymentMethodOptions" + ] + """ + Payment-method-specific configuration to provide to invoices created by the subscription. + """ + payment_method_types: NotRequired[ + "Literal['']|List[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'affirm', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'boleto', 'card', 'cashapp', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'id_bank_transfer', 'ideal', 'jp_credit_transfer', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'multibanco', 'naver_pay', 'nz_bank_account', 'p24', 'payco', 'paynow', 'paypal', 'pix', 'promptpay', 'revolut_pay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'stripe_balance', 'swish', 'upi', 'us_bank_account', 'wechat_pay']]" + ] + """ + The list of payment method types (e.g. card) to provide to the invoice's PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice's default payment method, the subscription's default payment method, the customer's default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). Should not be specified with payment_method_configuration + """ + save_default_payment_method: NotRequired[Literal["off", "on_subscription"]] + """ + Configure whether Stripe updates `subscription.default_payment_method` when payment succeeds. Defaults to `off` if unspecified. + """ + + +class SubscriptionCreateParamsPaymentSettingsPaymentMethodOptions(TypedDict): + acss_debit: NotRequired[ + "Literal['']|SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsAcssDebit" + ] + """ + This sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice's PaymentIntent. + """ + bancontact: NotRequired[ + "Literal['']|SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsBancontact" + ] + """ + This sub-hash contains details about the Bancontact payment method options to pass to the invoice's PaymentIntent. + """ + card: NotRequired[ + "Literal['']|SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsCard" + ] + """ + This sub-hash contains details about the Card payment method options to pass to the invoice's PaymentIntent. + """ + customer_balance: NotRequired[ + "Literal['']|SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsCustomerBalance" + ] + """ + This sub-hash contains details about the Bank transfer payment method options to pass to the invoice's PaymentIntent. + """ + id_bank_transfer: NotRequired[ + "Literal['']|SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsIdBankTransfer" + ] + """ + This sub-hash contains details about the Indonesia bank transfer payment method options to pass to the invoice's PaymentIntent. + """ + konbini: NotRequired[ + "Literal['']|SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsKonbini" + ] + """ + This sub-hash contains details about the Konbini payment method options to pass to the invoice's PaymentIntent. + """ + pix: NotRequired[ + "Literal['']|SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsPix" + ] + """ + This sub-hash contains details about the Pix payment method options to pass to the invoice's PaymentIntent. + """ + sepa_debit: NotRequired[ + "Literal['']|SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsSepaDebit" + ] + """ + This sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice's PaymentIntent. + """ + upi: NotRequired[ + "Literal['']|SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsUpi" + ] + """ + This sub-hash contains details about the UPI payment method options to pass to the invoice's PaymentIntent. + """ + us_bank_account: NotRequired[ + "Literal['']|SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccount" + ] + """ + This sub-hash contains details about the ACH direct debit payment method options to pass to the invoice's PaymentIntent. + """ + + +class SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsAcssDebit( + TypedDict, +): + mandate_options: NotRequired[ + "SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions" + ] + """ + Additional fields for Mandate creation + """ + verification_method: NotRequired[ + Literal["automatic", "instant", "microdeposits"] + ] + """ + Verification method for the intent + """ + + +class SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions( + TypedDict, +): + transaction_type: NotRequired[Literal["business", "personal"]] + """ + Transaction type of the mandate. + """ + + +class SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsBancontact( + TypedDict, +): + preferred_language: NotRequired[Literal["de", "en", "fr", "nl"]] + """ + Preferred language of the Bancontact authorization page that the customer is redirected to. + """ + + +class SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsCard( + TypedDict, +): + mandate_options: NotRequired[ + "SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsCardMandateOptions" + ] + """ + Configuration options for setting up an eMandate for cards issued in India. + """ + network: NotRequired[ + Literal[ + "amex", + "cartes_bancaires", + "diners", + "discover", + "eftpos_au", + "girocard", + "interac", + "jcb", + "link", + "mastercard", + "unionpay", + "unknown", + "visa", + ] + ] + """ + Selected network to process this Subscription on. Depends on the available networks of the card attached to the Subscription. Can be only set confirm-time. + """ + request_three_d_secure: NotRequired[ + Literal["any", "automatic", "challenge"] + ] + """ + We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + """ + + +class SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsCardMandateOptions( + TypedDict, +): + amount: NotRequired[int] + """ + Amount to be charged for future payments. + """ + amount_type: NotRequired[Literal["fixed", "maximum"]] + """ + One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. + """ + description: NotRequired[str] + """ + A description of the mandate or subscription that is meant to be displayed to the customer. + """ + + +class SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsCustomerBalance( + TypedDict, +): + bank_transfer: NotRequired[ + "SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransfer" + ] + """ + Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. + """ + funding_type: NotRequired[str] + """ + The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. + """ + + +class SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransfer( + TypedDict, +): + eu_bank_transfer: NotRequired[ + "SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer" + ] + """ + Configuration for eu_bank_transfer funding type. + """ + type: NotRequired[str] + """ + The bank transfer type that can be used for funding. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. + """ + + +class SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer( + TypedDict, +): + country: str + """ + The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. + """ + + +class SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsIdBankTransfer( + TypedDict, +): + pass + + +class SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsKonbini( + TypedDict, +): + pass + + +class SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsPix( + TypedDict +): + mandate_options: NotRequired[ + "SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsPixMandateOptions" + ] + """ + Configuration options for setting up a mandate + """ + + +class SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsPixMandateOptions( + TypedDict, +): + amount: NotRequired[int] + """ + Amount to be charged for future payments. If not provided, defaults to 40000. + """ + amount_includes_iof: NotRequired[Literal["always", "never"]] + """ + Determines if the amount includes the IOF tax. Defaults to `never`. + """ + end_date: NotRequired[str] + """ + Date when the mandate expires and no further payments will be charged, in `YYYY-MM-DD`. If not provided, the mandate will be active until canceled. + """ + payment_schedule: NotRequired[ + Literal["halfyearly", "monthly", "quarterly", "weekly", "yearly"] + ] + """ + Schedule at which the future payments will be charged. Defaults to `weekly`. + """ + + +class SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsSepaDebit( + TypedDict, +): + pass + + +class SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsUpi( + TypedDict +): + mandate_options: NotRequired[ + "SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsUpiMandateOptions" + ] + """ + Configuration options for setting up an eMandate + """ + + +class SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsUpiMandateOptions( + TypedDict, +): + amount: NotRequired[int] + """ + Amount to be charged for future payments. + """ + amount_type: NotRequired[Literal["fixed", "maximum"]] + """ + One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. + """ + description: NotRequired[str] + """ + A description of the mandate or subscription that is meant to be displayed to the customer. + """ + end_date: NotRequired[int] + """ + End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. + """ + + +class SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccount( + TypedDict, +): + financial_connections: NotRequired[ + "SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections" + ] + """ + Additional fields for Financial Connections Session creation + """ + verification_method: NotRequired[ + Literal["automatic", "instant", "microdeposits"] + ] + """ + Verification method for the intent + """ + + +class SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections( + TypedDict, +): + filters: NotRequired[ + "SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters" + ] + """ + Provide filters for the linked accounts that the customer can select for the payment method. + """ + permissions: NotRequired[ + List[ + Literal["balances", "ownership", "payment_method", "transactions"] + ] + ] + """ + The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. + """ + prefetch: NotRequired[ + List[ + Literal[ + "balances", "inferred_balances", "ownership", "transactions" + ] + ] + ] + """ + List of data features that you would like to retrieve upon account creation. + """ + + +class SubscriptionCreateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters( + TypedDict, +): + account_subcategories: NotRequired[List[Literal["checking", "savings"]]] + """ + The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`. + """ + institution: NotRequired[str] + """ + ID of the institution to use to filter for selectable accounts. + """ + + +class SubscriptionCreateParamsPendingInvoiceItemInterval(TypedDict): + interval: Literal["day", "month", "week", "year"] + """ + Specifies invoicing frequency. Either `day`, `week`, `month` or `year`. + """ + interval_count: NotRequired[int] + """ + The number of intervals between invoices. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). + """ + + +class SubscriptionCreateParamsPrebilling(TypedDict): + iterations: int + """ + This is used to determine the number of billing cycles to prebill. + """ + update_behavior: NotRequired[Literal["prebill", "reset"]] + """ + Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`. + """ + + +class SubscriptionCreateParamsTransferData(TypedDict): + amount_percent: NotRequired[float] + """ + A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. + """ + destination: str + """ + ID of an existing, connected Stripe account. + """ + + +class SubscriptionCreateParamsTrialSettings(TypedDict): + end_behavior: "SubscriptionCreateParamsTrialSettingsEndBehavior" + """ + Defines how the subscription should behave when the user's free trial ends. + """ + + +class SubscriptionCreateParamsTrialSettingsEndBehavior(TypedDict): + missing_payment_method: Literal["cancel", "create_invoice", "pause"] + """ + Indicates how the subscription should change when the trial ends if the user did not provide a payment method. + """ diff --git a/stripe/params/_subscription_delete_discount_params.py b/stripe/params/_subscription_delete_discount_params.py new file mode 100644 index 000000000..79ade64ec --- /dev/null +++ b/stripe/params/_subscription_delete_discount_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions + + +class SubscriptionDeleteDiscountParams(RequestOptions): + pass diff --git a/stripe/params/_subscription_item_create_params.py b/stripe/params/_subscription_item_create_params.py new file mode 100644 index 000000000..918473a4c --- /dev/null +++ b/stripe/params/_subscription_item_create_params.py @@ -0,0 +1,188 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class SubscriptionItemCreateParams(RequestOptions): + billing_thresholds: NotRequired[ + "Literal['']|SubscriptionItemCreateParamsBillingThresholds" + ] + """ + Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. + """ + discounts: NotRequired[ + "Literal['']|List[SubscriptionItemCreateParamsDiscount]" + ] + """ + The coupons to redeem into discounts for the subscription item. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + payment_behavior: NotRequired[ + Literal[ + "allow_incomplete", + "default_incomplete", + "error_if_incomplete", + "pending_if_incomplete", + ] + ] + """ + Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior. + + Use `default_incomplete` to transition the subscription to `status=past_due` when payment is required and await explicit confirmation of the invoice's payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription's invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. + + Use `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes). + + Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://docs.stripe.com/changelog/2019-03-14) to learn more. + """ + plan: NotRequired[str] + """ + The identifier of the plan to add to the subscription. + """ + price: NotRequired[str] + """ + The ID of the price object. + """ + price_data: NotRequired["SubscriptionItemCreateParamsPriceData"] + """ + Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + """ + proration_behavior: NotRequired[ + Literal["always_invoice", "create_prorations", "none"] + ] + """ + Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`. + """ + proration_date: NotRequired[int] + """ + If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply the same proration that was previewed with the [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint. + """ + quantity: NotRequired[int] + """ + The quantity you'd like to apply to the subscription item you're creating. + """ + subscription: str + """ + The identifier of the subscription to modify. + """ + tax_rates: NotRequired["Literal['']|List[str]"] + """ + A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. + """ + trial: NotRequired["SubscriptionItemCreateParamsTrial"] + """ + Options that configure the trial on the subscription item. + """ + + +class SubscriptionItemCreateParamsBillingThresholds(TypedDict): + usage_gte: int + """ + Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)) + """ + + +class SubscriptionItemCreateParamsDiscount(TypedDict): + coupon: NotRequired[str] + """ + ID of the coupon to create a new discount for. + """ + discount: NotRequired[str] + """ + ID of an existing discount on the object (or one of its ancestors) to reuse. + """ + discount_end: NotRequired[ + "SubscriptionItemCreateParamsDiscountDiscountEnd" + ] + """ + Details to determine how long the discount should be applied for. + """ + promotion_code: NotRequired[str] + """ + ID of the promotion code to create a new discount for. + """ + + +class SubscriptionItemCreateParamsDiscountDiscountEnd(TypedDict): + duration: NotRequired[ + "SubscriptionItemCreateParamsDiscountDiscountEndDuration" + ] + """ + Time span for the redeemed discount. + """ + timestamp: NotRequired[int] + """ + A precise Unix timestamp for the discount to end. Must be in the future. + """ + type: Literal["duration", "timestamp"] + """ + The type of calculation made to determine when the discount ends. + """ + + +class SubscriptionItemCreateParamsDiscountDiscountEndDuration(TypedDict): + interval: Literal["day", "month", "week", "year"] + """ + Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + """ + interval_count: int + """ + The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + """ + + +class SubscriptionItemCreateParamsPriceData(TypedDict): + 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). + """ + product: str + """ + The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to. + """ + recurring: "SubscriptionItemCreateParamsPriceDataRecurring" + """ + The recurring components of a price such as `interval` and `interval_count`. + """ + tax_behavior: NotRequired[Literal["exclusive", "inclusive", "unspecified"]] + """ + Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + """ + unit_amount: NotRequired[int] + """ + A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + """ + unit_amount_decimal: NotRequired[str] + """ + Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + """ + + +class SubscriptionItemCreateParamsPriceDataRecurring(TypedDict): + interval: Literal["day", "month", "week", "year"] + """ + Specifies billing frequency. Either `day`, `week`, `month` or `year`. + """ + interval_count: NotRequired[int] + """ + The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). + """ + + +class SubscriptionItemCreateParamsTrial(TypedDict): + converts_to: NotRequired[List[str]] + """ + List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. + """ + type: Literal["free", "paid"] + """ + Determines the type of trial for this item. + """ diff --git a/stripe/params/_subscription_item_delete_params.py b/stripe/params/_subscription_item_delete_params.py new file mode 100644 index 000000000..2355bfe58 --- /dev/null +++ b/stripe/params/_subscription_item_delete_params.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing_extensions import Literal, NotRequired + + +class SubscriptionItemDeleteParams(RequestOptions): + clear_usage: NotRequired[bool] + """ + Delete all usage for the given subscription item. Allowed only when the current plan's `usage_type` is `metered`. + """ + proration_behavior: NotRequired[ + Literal["always_invoice", "create_prorations", "none"] + ] + """ + Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`. + """ + proration_date: NotRequired[int] + """ + If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply the same proration that was previewed with the [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint. + """ diff --git a/stripe/params/_subscription_item_list_params.py b/stripe/params/_subscription_item_list_params.py new file mode 100644 index 000000000..38b3a9352 --- /dev/null +++ b/stripe/params/_subscription_item_list_params.py @@ -0,0 +1,28 @@ +# -*- 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 SubscriptionItemListParams(RequestOptions): + 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. + """ + subscription: str + """ + The ID of the subscription whose items will be retrieved. + """ diff --git a/stripe/params/_subscription_item_modify_params.py b/stripe/params/_subscription_item_modify_params.py new file mode 100644 index 000000000..a4e987f86 --- /dev/null +++ b/stripe/params/_subscription_item_modify_params.py @@ -0,0 +1,173 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class SubscriptionItemModifyParams(RequestOptions): + billing_thresholds: NotRequired[ + "Literal['']|SubscriptionItemModifyParamsBillingThresholds" + ] + """ + Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. + """ + discounts: NotRequired[ + "Literal['']|List[SubscriptionItemModifyParamsDiscount]" + ] + """ + The coupons to redeem into discounts for the subscription item. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + off_session: NotRequired[bool] + """ + Indicates if a customer is on or off-session while an invoice payment is attempted. Defaults to `false` (on-session). + """ + payment_behavior: NotRequired[ + Literal[ + "allow_incomplete", + "default_incomplete", + "error_if_incomplete", + "pending_if_incomplete", + ] + ] + """ + Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior. + + Use `default_incomplete` to transition the subscription to `status=past_due` when payment is required and await explicit confirmation of the invoice's payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription's invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. + + Use `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes). + + Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://docs.stripe.com/changelog/2019-03-14) to learn more. + """ + plan: NotRequired[str] + """ + The identifier of the new plan for this subscription item. + """ + price: NotRequired[str] + """ + The ID of the price object. One of `price` or `price_data` is required. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided. + """ + price_data: NotRequired["SubscriptionItemModifyParamsPriceData"] + """ + Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. + """ + proration_behavior: NotRequired[ + Literal["always_invoice", "create_prorations", "none"] + ] + """ + Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`. + """ + proration_date: NotRequired[int] + """ + If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply the same proration that was previewed with the [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint. + """ + quantity: NotRequired[int] + """ + The quantity you'd like to apply to the subscription item you're creating. + """ + tax_rates: NotRequired["Literal['']|List[str]"] + """ + A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. + """ + + +class SubscriptionItemModifyParamsBillingThresholds(TypedDict): + usage_gte: int + """ + Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)) + """ + + +class SubscriptionItemModifyParamsDiscount(TypedDict): + coupon: NotRequired[str] + """ + ID of the coupon to create a new discount for. + """ + discount: NotRequired[str] + """ + ID of an existing discount on the object (or one of its ancestors) to reuse. + """ + discount_end: NotRequired[ + "SubscriptionItemModifyParamsDiscountDiscountEnd" + ] + """ + Details to determine how long the discount should be applied for. + """ + promotion_code: NotRequired[str] + """ + ID of the promotion code to create a new discount for. + """ + + +class SubscriptionItemModifyParamsDiscountDiscountEnd(TypedDict): + duration: NotRequired[ + "SubscriptionItemModifyParamsDiscountDiscountEndDuration" + ] + """ + Time span for the redeemed discount. + """ + timestamp: NotRequired[int] + """ + A precise Unix timestamp for the discount to end. Must be in the future. + """ + type: Literal["duration", "timestamp"] + """ + The type of calculation made to determine when the discount ends. + """ + + +class SubscriptionItemModifyParamsDiscountDiscountEndDuration(TypedDict): + interval: Literal["day", "month", "week", "year"] + """ + Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + """ + interval_count: int + """ + The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + """ + + +class SubscriptionItemModifyParamsPriceData(TypedDict): + 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). + """ + product: str + """ + The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to. + """ + recurring: "SubscriptionItemModifyParamsPriceDataRecurring" + """ + The recurring components of a price such as `interval` and `interval_count`. + """ + tax_behavior: NotRequired[Literal["exclusive", "inclusive", "unspecified"]] + """ + Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + """ + unit_amount: NotRequired[int] + """ + A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + """ + unit_amount_decimal: NotRequired[str] + """ + Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + """ + + +class SubscriptionItemModifyParamsPriceDataRecurring(TypedDict): + interval: Literal["day", "month", "week", "year"] + """ + Specifies billing frequency. Either `day`, `week`, `month` or `year`. + """ + interval_count: NotRequired[int] + """ + The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). + """ diff --git a/stripe/params/_subscription_item_retrieve_params.py b/stripe/params/_subscription_item_retrieve_params.py new file mode 100644 index 000000000..ae8d3d8ce --- /dev/null +++ b/stripe/params/_subscription_item_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 SubscriptionItemRetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_subscription_item_update_params.py b/stripe/params/_subscription_item_update_params.py new file mode 100644 index 000000000..056611b4a --- /dev/null +++ b/stripe/params/_subscription_item_update_params.py @@ -0,0 +1,172 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class SubscriptionItemUpdateParams(TypedDict): + billing_thresholds: NotRequired[ + "Literal['']|SubscriptionItemUpdateParamsBillingThresholds" + ] + """ + Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. + """ + discounts: NotRequired[ + "Literal['']|List[SubscriptionItemUpdateParamsDiscount]" + ] + """ + The coupons to redeem into discounts for the subscription item. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + off_session: NotRequired[bool] + """ + Indicates if a customer is on or off-session while an invoice payment is attempted. Defaults to `false` (on-session). + """ + payment_behavior: NotRequired[ + Literal[ + "allow_incomplete", + "default_incomplete", + "error_if_incomplete", + "pending_if_incomplete", + ] + ] + """ + Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior. + + Use `default_incomplete` to transition the subscription to `status=past_due` when payment is required and await explicit confirmation of the invoice's payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription's invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. + + Use `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes). + + Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://docs.stripe.com/changelog/2019-03-14) to learn more. + """ + plan: NotRequired[str] + """ + The identifier of the new plan for this subscription item. + """ + price: NotRequired[str] + """ + The ID of the price object. One of `price` or `price_data` is required. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided. + """ + price_data: NotRequired["SubscriptionItemUpdateParamsPriceData"] + """ + Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. + """ + proration_behavior: NotRequired[ + Literal["always_invoice", "create_prorations", "none"] + ] + """ + Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`. + """ + proration_date: NotRequired[int] + """ + If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply the same proration that was previewed with the [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint. + """ + quantity: NotRequired[int] + """ + The quantity you'd like to apply to the subscription item you're creating. + """ + tax_rates: NotRequired["Literal['']|List[str]"] + """ + A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. + """ + + +class SubscriptionItemUpdateParamsBillingThresholds(TypedDict): + usage_gte: int + """ + Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)) + """ + + +class SubscriptionItemUpdateParamsDiscount(TypedDict): + coupon: NotRequired[str] + """ + ID of the coupon to create a new discount for. + """ + discount: NotRequired[str] + """ + ID of an existing discount on the object (or one of its ancestors) to reuse. + """ + discount_end: NotRequired[ + "SubscriptionItemUpdateParamsDiscountDiscountEnd" + ] + """ + Details to determine how long the discount should be applied for. + """ + promotion_code: NotRequired[str] + """ + ID of the promotion code to create a new discount for. + """ + + +class SubscriptionItemUpdateParamsDiscountDiscountEnd(TypedDict): + duration: NotRequired[ + "SubscriptionItemUpdateParamsDiscountDiscountEndDuration" + ] + """ + Time span for the redeemed discount. + """ + timestamp: NotRequired[int] + """ + A precise Unix timestamp for the discount to end. Must be in the future. + """ + type: Literal["duration", "timestamp"] + """ + The type of calculation made to determine when the discount ends. + """ + + +class SubscriptionItemUpdateParamsDiscountDiscountEndDuration(TypedDict): + interval: Literal["day", "month", "week", "year"] + """ + Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + """ + interval_count: int + """ + The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + """ + + +class SubscriptionItemUpdateParamsPriceData(TypedDict): + 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). + """ + product: str + """ + The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to. + """ + recurring: "SubscriptionItemUpdateParamsPriceDataRecurring" + """ + The recurring components of a price such as `interval` and `interval_count`. + """ + tax_behavior: NotRequired[Literal["exclusive", "inclusive", "unspecified"]] + """ + Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + """ + unit_amount: NotRequired[int] + """ + A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + """ + unit_amount_decimal: NotRequired[str] + """ + Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + """ + + +class SubscriptionItemUpdateParamsPriceDataRecurring(TypedDict): + interval: Literal["day", "month", "week", "year"] + """ + Specifies billing frequency. Either `day`, `week`, `month` or `year`. + """ + interval_count: NotRequired[int] + """ + The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). + """ diff --git a/stripe/params/_subscription_list_params.py b/stripe/params/_subscription_list_params.py new file mode 100644 index 000000000..bac95b93e --- /dev/null +++ b/stripe/params/_subscription_list_params.py @@ -0,0 +1,151 @@ +# -*- 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, TypedDict + + +class SubscriptionListParams(RequestOptions): + automatic_tax: NotRequired["SubscriptionListParamsAutomaticTax"] + """ + Filter subscriptions by their automatic tax settings. + """ + collection_method: NotRequired[ + Literal["charge_automatically", "send_invoice"] + ] + """ + The collection method of the subscriptions to retrieve. Either `charge_automatically` or `send_invoice`. + """ + created: NotRequired["SubscriptionListParamsCreated|int"] + """ + Only return subscriptions that were created during the given date interval. + """ + current_period_end: NotRequired[ + "SubscriptionListParamsCurrentPeriodEnd|int" + ] + """ + Only return subscriptions whose minimum item current_period_end falls within the given date interval. + """ + current_period_start: NotRequired[ + "SubscriptionListParamsCurrentPeriodStart|int" + ] + """ + Only return subscriptions whose maximum item current_period_start falls within the given date interval. + """ + customer: NotRequired[str] + """ + The ID of the customer whose subscriptions will be retrieved. + """ + customer_account: NotRequired[str] + """ + The ID of the account whose subscriptions will be retrieved. + """ + 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. + """ + plan: NotRequired[str] + """ + The ID of the plan whose subscriptions will be retrieved. + """ + price: NotRequired[str] + """ + Filter for subscriptions that contain this recurring price ID. + """ + 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. + """ + status: NotRequired[ + Literal[ + "active", + "all", + "canceled", + "ended", + "incomplete", + "incomplete_expired", + "past_due", + "paused", + "trialing", + "unpaid", + ] + ] + """ + The status of the subscriptions to retrieve. Passing in a value of `canceled` will return all canceled subscriptions, including those belonging to deleted customers. Pass `ended` to find subscriptions that are canceled and subscriptions that are expired due to [incomplete payment](https://stripe.com/docs/billing/subscriptions/overview#subscription-statuses). Passing in a value of `all` will return subscriptions of all statuses. If no value is supplied, all subscriptions that have not been canceled are returned. + """ + test_clock: NotRequired[str] + """ + Filter for subscriptions that are associated with the specified test clock. The response will not include subscriptions with test clocks if this and the customer parameter is not set. + """ + + +class SubscriptionListParamsAutomaticTax(TypedDict): + enabled: bool + """ + Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription. + """ + + +class SubscriptionListParamsCreated(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) + """ + + +class SubscriptionListParamsCurrentPeriodEnd(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) + """ + + +class SubscriptionListParamsCurrentPeriodStart(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/_subscription_migrate_params.py b/stripe/params/_subscription_migrate_params.py new file mode 100644 index 000000000..fed3c5df5 --- /dev/null +++ b/stripe/params/_subscription_migrate_params.py @@ -0,0 +1,34 @@ +# -*- 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, TypedDict + + +class SubscriptionMigrateParams(RequestOptions): + billing_mode: "SubscriptionMigrateParamsBillingMode" + """ + Controls how prorations and invoices for subscriptions are calculated and orchestrated. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + + +class SubscriptionMigrateParamsBillingMode(TypedDict): + flexible: NotRequired["SubscriptionMigrateParamsBillingModeFlexible"] + """ + Configure behavior for flexible billing mode. + """ + type: Literal["flexible"] + """ + Controls the calculation and orchestration of prorations and invoices for subscriptions. + """ + + +class SubscriptionMigrateParamsBillingModeFlexible(TypedDict): + proration_discounts: NotRequired[Literal["included", "itemized"]] + """ + Controls how invoices and invoice items display proration amounts and discount amounts. + """ diff --git a/stripe/params/_subscription_modify_params.py b/stripe/params/_subscription_modify_params.py new file mode 100644 index 000000000..a30bb899f --- /dev/null +++ b/stripe/params/_subscription_modify_params.py @@ -0,0 +1,1046 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class SubscriptionModifyParams(RequestOptions): + add_invoice_items: NotRequired[ + List["SubscriptionModifyParamsAddInvoiceItem"] + ] + """ + A list of prices and quantities that will generate invoice items appended to the next invoice for this subscription. You may pass up to 20 items. + """ + application_fee_percent: NotRequired["Literal['']|float"] + """ + A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). + """ + automatic_tax: NotRequired["SubscriptionModifyParamsAutomaticTax"] + """ + Automatic tax settings for this subscription. We recommend you only include this parameter when the existing value is being changed. + """ + billing_cadence: NotRequired[str] + """ + The Billing Cadence which controls the timing of recurring invoice generation for this subscription. If unset, the subscription will bill according to its own configured schedule and create its own invoices. If set, this subscription will be billed by the cadence instead, potentially sharing invoices with the other subscriptions linked to that Cadence. + """ + billing_cycle_anchor: NotRequired[Literal["now", "unchanged"]] + """ + Either `now` or `unchanged`. Setting the value to `now` resets the subscription's billing cycle anchor to the current time (in UTC). For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). + """ + billing_schedules: NotRequired[ + "Literal['']|List[SubscriptionModifyParamsBillingSchedule]" + ] + """ + Sets the billing schedules for the subscription. + """ + billing_thresholds: NotRequired[ + "Literal['']|SubscriptionModifyParamsBillingThresholds" + ] + """ + Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. + """ + cancel_at: NotRequired[ + "Literal['']|int|Literal['max_period_end', 'min_period_end']" + ] + """ + A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period. + """ + cancel_at_period_end: NotRequired[bool] + """ + Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. + """ + cancellation_details: NotRequired[ + "SubscriptionModifyParamsCancellationDetails" + ] + """ + Details about why this subscription was cancelled + """ + collection_method: NotRequired[ + Literal["charge_automatically", "send_invoice"] + ] + """ + Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`. + """ + days_until_due: NotRequired[int] + """ + Number of days a customer has to pay invoices generated by this subscription. Valid only for subscriptions where `collection_method` is set to `send_invoice`. + """ + default_payment_method: NotRequired[str] + """ + ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over `default_source`. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). + """ + default_source: NotRequired["Literal['']|str"] + """ + ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If `default_payment_method` is also set, `default_payment_method` will take precedence. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). + """ + default_tax_rates: NotRequired["Literal['']|List[str]"] + """ + The tax rates that will apply to any subscription item that does not have `tax_rates` set. Invoices created will have their `default_tax_rates` populated from the subscription. Pass an empty string to remove previously-defined tax rates. + """ + description: NotRequired["Literal['']|str"] + """ + The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. + """ + discounts: NotRequired[ + "Literal['']|List[SubscriptionModifyParamsDiscount]" + ] + """ + The coupons to redeem into discounts for the subscription. If not specified or empty, inherits the discount from the subscription's customer. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + invoice_settings: NotRequired["SubscriptionModifyParamsInvoiceSettings"] + """ + All invoices will be billed using the specified settings. + """ + items: NotRequired[List["SubscriptionModifyParamsItem"]] + """ + A list of up to 20 subscription items, each with an attached price. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + off_session: NotRequired[bool] + """ + Indicates if a customer is on or off-session while an invoice payment is attempted. Defaults to `false` (on-session). + """ + on_behalf_of: NotRequired["Literal['']|str"] + """ + The account on behalf of which to charge, for each of the subscription's invoices. + """ + pause_collection: NotRequired[ + "Literal['']|SubscriptionModifyParamsPauseCollection" + ] + """ + If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment). + """ + payment_behavior: NotRequired[ + Literal[ + "allow_incomplete", + "default_incomplete", + "error_if_incomplete", + "pending_if_incomplete", + ] + ] + """ + Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior. + + Use `default_incomplete` to transition the subscription to `status=past_due` when payment is required and await explicit confirmation of the invoice's payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription's invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. + + Use `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes). + + Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://docs.stripe.com/changelog/2019-03-14) to learn more. + """ + payment_settings: NotRequired["SubscriptionModifyParamsPaymentSettings"] + """ + Payment settings to pass to invoices created by the subscription. + """ + pending_invoice_item_interval: NotRequired[ + "Literal['']|SubscriptionModifyParamsPendingInvoiceItemInterval" + ] + """ + Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval. + """ + prebilling: NotRequired["SubscriptionModifyParamsPrebilling"] + """ + If specified, the invoicing for the given billing cycle iterations will be processed now. + """ + proration_behavior: NotRequired[ + Literal["always_invoice", "create_prorations", "none"] + ] + """ + Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`. + """ + proration_date: NotRequired[int] + """ + If set, prorations will be calculated as though the subscription was updated at the given time. This can be used to apply exactly the same prorations that were previewed with the [create preview](https://stripe.com/docs/api/invoices/create_preview) endpoint. `proration_date` can also be used to implement custom proration logic, such as prorating by day instead of by second, by providing the time that you wish to use for proration calculations. + """ + transfer_data: NotRequired[ + "Literal['']|SubscriptionModifyParamsTransferData" + ] + """ + If specified, the funds from the subscription's invoices will be transferred to the destination and the ID of the resulting transfers will be found on the resulting charges. This will be unset if you POST an empty value. + """ + trial_end: NotRequired["Literal['now']|int"] + """ + Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. If set, `trial_end` will override the default trial period of the plan the customer is being subscribed to. The `billing_cycle_anchor` will be updated to the `trial_end` value. The special value `now` can be provided to end the customer's trial immediately. Can be at most two years from `billing_cycle_anchor`. + """ + trial_from_plan: NotRequired[bool] + """ + Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. + """ + trial_settings: NotRequired["SubscriptionModifyParamsTrialSettings"] + """ + Settings related to subscription trials. + """ + + +class SubscriptionModifyParamsAddInvoiceItem(TypedDict): + discounts: NotRequired[ + List["SubscriptionModifyParamsAddInvoiceItemDiscount"] + ] + """ + The coupons to redeem into discounts for the item. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + period: NotRequired["SubscriptionModifyParamsAddInvoiceItemPeriod"] + """ + The period associated with this invoice item. If not set, `period.start.type` defaults to `max_item_period_start` and `period.end.type` defaults to `min_item_period_end`. + """ + price: NotRequired[str] + """ + The ID of the price object. One of `price` or `price_data` is required. + """ + price_data: NotRequired["SubscriptionModifyParamsAddInvoiceItemPriceData"] + """ + Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. + """ + quantity: NotRequired[int] + """ + Quantity for this item. Defaults to 1. + """ + tax_rates: NotRequired["Literal['']|List[str]"] + """ + The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item. + """ + + +class SubscriptionModifyParamsAddInvoiceItemDiscount(TypedDict): + coupon: NotRequired[str] + """ + ID of the coupon to create a new discount for. + """ + discount: NotRequired[str] + """ + ID of an existing discount on the object (or one of its ancestors) to reuse. + """ + discount_end: NotRequired[ + "SubscriptionModifyParamsAddInvoiceItemDiscountDiscountEnd" + ] + """ + Details to determine how long the discount should be applied for. + """ + promotion_code: NotRequired[str] + """ + ID of the promotion code to create a new discount for. + """ + + +class SubscriptionModifyParamsAddInvoiceItemDiscountDiscountEnd(TypedDict): + duration: NotRequired[ + "SubscriptionModifyParamsAddInvoiceItemDiscountDiscountEndDuration" + ] + """ + Time span for the redeemed discount. + """ + timestamp: NotRequired[int] + """ + A precise Unix timestamp for the discount to end. Must be in the future. + """ + type: Literal["duration", "timestamp"] + """ + The type of calculation made to determine when the discount ends. + """ + + +class SubscriptionModifyParamsAddInvoiceItemDiscountDiscountEndDuration( + TypedDict, +): + interval: Literal["day", "month", "week", "year"] + """ + Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + """ + interval_count: int + """ + The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + """ + + +class SubscriptionModifyParamsAddInvoiceItemPeriod(TypedDict): + end: "SubscriptionModifyParamsAddInvoiceItemPeriodEnd" + """ + End of the invoice item period. + """ + start: "SubscriptionModifyParamsAddInvoiceItemPeriodStart" + """ + Start of the invoice item period. + """ + + +class SubscriptionModifyParamsAddInvoiceItemPeriodEnd(TypedDict): + timestamp: NotRequired[int] + """ + A precise Unix timestamp for the end of the invoice item period. Must be greater than or equal to `period.start`. + """ + type: Literal["min_item_period_end", "timestamp"] + """ + Select how to calculate the end of the invoice item period. + """ + + +class SubscriptionModifyParamsAddInvoiceItemPeriodStart(TypedDict): + timestamp: NotRequired[int] + """ + A precise Unix timestamp for the start of the invoice item period. Must be less than or equal to `period.end`. + """ + type: Literal["max_item_period_start", "now", "timestamp"] + """ + Select how to calculate the start of the invoice item period. + """ + + +class SubscriptionModifyParamsAddInvoiceItemPriceData(TypedDict): + 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). + """ + product: str + """ + The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to. + """ + tax_behavior: NotRequired[Literal["exclusive", "inclusive", "unspecified"]] + """ + Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + """ + unit_amount: NotRequired[int] + """ + A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge or a negative integer representing the amount to credit to the customer. + """ + unit_amount_decimal: NotRequired[str] + """ + Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + """ + + +class SubscriptionModifyParamsAutomaticTax(TypedDict): + enabled: bool + """ + Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription. + """ + liability: NotRequired["SubscriptionModifyParamsAutomaticTaxLiability"] + """ + The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + """ + + +class SubscriptionModifyParamsAutomaticTaxLiability(TypedDict): + account: NotRequired[str] + """ + The connected account being referenced when `type` is `account`. + """ + type: Literal["account", "self"] + """ + Type of the account referenced in the request. + """ + + +class SubscriptionModifyParamsBillingSchedule(TypedDict): + applies_to: NotRequired[ + List["SubscriptionModifyParamsBillingScheduleAppliesTo"] + ] + """ + Configure billing schedule differently for individual subscription items. + """ + bill_until: NotRequired["SubscriptionModifyParamsBillingScheduleBillUntil"] + """ + The end date for the billing schedule. + """ + key: NotRequired[str] + """ + Specify a key for the billing schedule. Must be unique to this field, alphanumeric, and up to 200 characters. If not provided, a unique key will be generated. + """ + + +class SubscriptionModifyParamsBillingScheduleAppliesTo(TypedDict): + price: NotRequired[str] + """ + The ID of the price object. + """ + type: Literal["price"] + """ + Controls which subscription items the billing schedule applies to. + """ + + +class SubscriptionModifyParamsBillingScheduleBillUntil(TypedDict): + duration: NotRequired[ + "SubscriptionModifyParamsBillingScheduleBillUntilDuration" + ] + """ + Specifies the billing period. + """ + timestamp: NotRequired[int] + """ + The end date of the billing schedule. + """ + type: Literal["duration", "timestamp"] + """ + Describes how the billing schedule will determine the end date. Either `duration` or `timestamp`. + """ + + +class SubscriptionModifyParamsBillingScheduleBillUntilDuration(TypedDict): + interval: Literal["day", "month", "week", "year"] + """ + Specifies billing duration. Either `day`, `week`, `month` or `year`. + """ + interval_count: NotRequired[int] + """ + The multiplier applied to the interval. + """ + + +class SubscriptionModifyParamsBillingThresholds(TypedDict): + amount_gte: NotRequired[int] + """ + Monetary threshold that triggers the subscription to advance to a new billing period + """ + reset_billing_cycle_anchor: NotRequired[bool] + """ + Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. + """ + + +class SubscriptionModifyParamsCancellationDetails(TypedDict): + comment: NotRequired["Literal['']|str"] + """ + Additional comments about why the user canceled the subscription, if the subscription was canceled explicitly by the user. + """ + feedback: NotRequired[ + "Literal['']|Literal['customer_service', 'low_quality', 'missing_features', 'other', 'switched_service', 'too_complex', 'too_expensive', 'unused']" + ] + """ + The customer submitted reason for why they canceled, if the subscription was canceled explicitly by the user. + """ + + +class SubscriptionModifyParamsDiscount(TypedDict): + coupon: NotRequired[str] + """ + ID of the coupon to create a new discount for. + """ + discount: NotRequired[str] + """ + ID of an existing discount on the object (or one of its ancestors) to reuse. + """ + discount_end: NotRequired["SubscriptionModifyParamsDiscountDiscountEnd"] + """ + Details to determine how long the discount should be applied for. + """ + promotion_code: NotRequired[str] + """ + ID of the promotion code to create a new discount for. + """ + + +class SubscriptionModifyParamsDiscountDiscountEnd(TypedDict): + duration: NotRequired[ + "SubscriptionModifyParamsDiscountDiscountEndDuration" + ] + """ + Time span for the redeemed discount. + """ + timestamp: NotRequired[int] + """ + A precise Unix timestamp for the discount to end. Must be in the future. + """ + type: Literal["duration", "timestamp"] + """ + The type of calculation made to determine when the discount ends. + """ + + +class SubscriptionModifyParamsDiscountDiscountEndDuration(TypedDict): + interval: Literal["day", "month", "week", "year"] + """ + Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + """ + interval_count: int + """ + The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + """ + + +class SubscriptionModifyParamsInvoiceSettings(TypedDict): + account_tax_ids: NotRequired["Literal['']|List[str]"] + """ + The account tax IDs associated with the subscription. Will be set on invoices generated by the subscription. + """ + issuer: NotRequired["SubscriptionModifyParamsInvoiceSettingsIssuer"] + """ + The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + """ + + +class SubscriptionModifyParamsInvoiceSettingsIssuer(TypedDict): + account: NotRequired[str] + """ + The connected account being referenced when `type` is `account`. + """ + type: Literal["account", "self"] + """ + Type of the account referenced in the request. + """ + + +class SubscriptionModifyParamsItem(TypedDict): + billing_thresholds: NotRequired[ + "Literal['']|SubscriptionModifyParamsItemBillingThresholds" + ] + """ + Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. + """ + clear_usage: NotRequired[bool] + """ + Delete all usage for a given subscription item. You must pass this when deleting a usage records subscription item. `clear_usage` has no effect if the plan has a billing meter attached. + """ + deleted: NotRequired[bool] + """ + A flag that, if set to `true`, will delete the specified item. + """ + discounts: NotRequired[ + "Literal['']|List[SubscriptionModifyParamsItemDiscount]" + ] + """ + The coupons to redeem into discounts for the subscription item. + """ + id: NotRequired[str] + """ + Subscription item to update. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + plan: NotRequired[str] + """ + Plan ID for this item, as a string. + """ + price: NotRequired[str] + """ + The ID of the price object. One of `price` or `price_data` is required. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided. + """ + price_data: NotRequired["SubscriptionModifyParamsItemPriceData"] + """ + Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. + """ + quantity: NotRequired[int] + """ + Quantity for this item. + """ + tax_rates: NotRequired["Literal['']|List[str]"] + """ + A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. + """ + + +class SubscriptionModifyParamsItemBillingThresholds(TypedDict): + usage_gte: int + """ + Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)) + """ + + +class SubscriptionModifyParamsItemDiscount(TypedDict): + coupon: NotRequired[str] + """ + ID of the coupon to create a new discount for. + """ + discount: NotRequired[str] + """ + ID of an existing discount on the object (or one of its ancestors) to reuse. + """ + discount_end: NotRequired[ + "SubscriptionModifyParamsItemDiscountDiscountEnd" + ] + """ + Details to determine how long the discount should be applied for. + """ + promotion_code: NotRequired[str] + """ + ID of the promotion code to create a new discount for. + """ + + +class SubscriptionModifyParamsItemDiscountDiscountEnd(TypedDict): + duration: NotRequired[ + "SubscriptionModifyParamsItemDiscountDiscountEndDuration" + ] + """ + Time span for the redeemed discount. + """ + timestamp: NotRequired[int] + """ + A precise Unix timestamp for the discount to end. Must be in the future. + """ + type: Literal["duration", "timestamp"] + """ + The type of calculation made to determine when the discount ends. + """ + + +class SubscriptionModifyParamsItemDiscountDiscountEndDuration(TypedDict): + interval: Literal["day", "month", "week", "year"] + """ + Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + """ + interval_count: int + """ + The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + """ + + +class SubscriptionModifyParamsItemPriceData(TypedDict): + 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). + """ + product: str + """ + The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to. + """ + recurring: "SubscriptionModifyParamsItemPriceDataRecurring" + """ + The recurring components of a price such as `interval` and `interval_count`. + """ + tax_behavior: NotRequired[Literal["exclusive", "inclusive", "unspecified"]] + """ + Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + """ + unit_amount: NotRequired[int] + """ + A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + """ + unit_amount_decimal: NotRequired[str] + """ + Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + """ + + +class SubscriptionModifyParamsItemPriceDataRecurring(TypedDict): + interval: Literal["day", "month", "week", "year"] + """ + Specifies billing frequency. Either `day`, `week`, `month` or `year`. + """ + interval_count: NotRequired[int] + """ + The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). + """ + + +class SubscriptionModifyParamsPauseCollection(TypedDict): + behavior: Literal["keep_as_draft", "mark_uncollectible", "void"] + """ + The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. + """ + resumes_at: NotRequired[int] + """ + The time after which the subscription will resume collecting payments. + """ + + +class SubscriptionModifyParamsPaymentSettings(TypedDict): + payment_method_options: NotRequired[ + "SubscriptionModifyParamsPaymentSettingsPaymentMethodOptions" + ] + """ + Payment-method-specific configuration to provide to invoices created by the subscription. + """ + payment_method_types: NotRequired[ + "Literal['']|List[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'affirm', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'boleto', 'card', 'cashapp', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'id_bank_transfer', 'ideal', 'jp_credit_transfer', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'multibanco', 'naver_pay', 'nz_bank_account', 'p24', 'payco', 'paynow', 'paypal', 'pix', 'promptpay', 'revolut_pay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'stripe_balance', 'swish', 'upi', 'us_bank_account', 'wechat_pay']]" + ] + """ + The list of payment method types (e.g. card) to provide to the invoice's PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice's default payment method, the subscription's default payment method, the customer's default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). Should not be specified with payment_method_configuration + """ + save_default_payment_method: NotRequired[Literal["off", "on_subscription"]] + """ + Configure whether Stripe updates `subscription.default_payment_method` when payment succeeds. Defaults to `off` if unspecified. + """ + + +class SubscriptionModifyParamsPaymentSettingsPaymentMethodOptions(TypedDict): + acss_debit: NotRequired[ + "Literal['']|SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsAcssDebit" + ] + """ + This sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice's PaymentIntent. + """ + bancontact: NotRequired[ + "Literal['']|SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsBancontact" + ] + """ + This sub-hash contains details about the Bancontact payment method options to pass to the invoice's PaymentIntent. + """ + card: NotRequired[ + "Literal['']|SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsCard" + ] + """ + This sub-hash contains details about the Card payment method options to pass to the invoice's PaymentIntent. + """ + customer_balance: NotRequired[ + "Literal['']|SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsCustomerBalance" + ] + """ + This sub-hash contains details about the Bank transfer payment method options to pass to the invoice's PaymentIntent. + """ + id_bank_transfer: NotRequired[ + "Literal['']|SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsIdBankTransfer" + ] + """ + This sub-hash contains details about the Indonesia bank transfer payment method options to pass to the invoice's PaymentIntent. + """ + konbini: NotRequired[ + "Literal['']|SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsKonbini" + ] + """ + This sub-hash contains details about the Konbini payment method options to pass to the invoice's PaymentIntent. + """ + pix: NotRequired[ + "Literal['']|SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsPix" + ] + """ + This sub-hash contains details about the Pix payment method options to pass to the invoice's PaymentIntent. + """ + sepa_debit: NotRequired[ + "Literal['']|SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsSepaDebit" + ] + """ + This sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice's PaymentIntent. + """ + upi: NotRequired[ + "Literal['']|SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsUpi" + ] + """ + This sub-hash contains details about the UPI payment method options to pass to the invoice's PaymentIntent. + """ + us_bank_account: NotRequired[ + "Literal['']|SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsUsBankAccount" + ] + """ + This sub-hash contains details about the ACH direct debit payment method options to pass to the invoice's PaymentIntent. + """ + + +class SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsAcssDebit( + TypedDict, +): + mandate_options: NotRequired[ + "SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions" + ] + """ + Additional fields for Mandate creation + """ + verification_method: NotRequired[ + Literal["automatic", "instant", "microdeposits"] + ] + """ + Verification method for the intent + """ + + +class SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions( + TypedDict, +): + transaction_type: NotRequired[Literal["business", "personal"]] + """ + Transaction type of the mandate. + """ + + +class SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsBancontact( + TypedDict, +): + preferred_language: NotRequired[Literal["de", "en", "fr", "nl"]] + """ + Preferred language of the Bancontact authorization page that the customer is redirected to. + """ + + +class SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsCard( + TypedDict, +): + mandate_options: NotRequired[ + "SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsCardMandateOptions" + ] + """ + Configuration options for setting up an eMandate for cards issued in India. + """ + network: NotRequired[ + Literal[ + "amex", + "cartes_bancaires", + "diners", + "discover", + "eftpos_au", + "girocard", + "interac", + "jcb", + "link", + "mastercard", + "unionpay", + "unknown", + "visa", + ] + ] + """ + Selected network to process this Subscription on. Depends on the available networks of the card attached to the Subscription. Can be only set confirm-time. + """ + request_three_d_secure: NotRequired[ + Literal["any", "automatic", "challenge"] + ] + """ + We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + """ + + +class SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsCardMandateOptions( + TypedDict, +): + amount: NotRequired[int] + """ + Amount to be charged for future payments. + """ + amount_type: NotRequired[Literal["fixed", "maximum"]] + """ + One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. + """ + description: NotRequired[str] + """ + A description of the mandate or subscription that is meant to be displayed to the customer. + """ + + +class SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsCustomerBalance( + TypedDict, +): + bank_transfer: NotRequired[ + "SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransfer" + ] + """ + Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. + """ + funding_type: NotRequired[str] + """ + The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. + """ + + +class SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransfer( + TypedDict, +): + eu_bank_transfer: NotRequired[ + "SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer" + ] + """ + Configuration for eu_bank_transfer funding type. + """ + type: NotRequired[str] + """ + The bank transfer type that can be used for funding. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. + """ + + +class SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer( + TypedDict, +): + country: str + """ + The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. + """ + + +class SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsIdBankTransfer( + TypedDict, +): + pass + + +class SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsKonbini( + TypedDict, +): + pass + + +class SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsPix( + TypedDict +): + mandate_options: NotRequired[ + "SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsPixMandateOptions" + ] + """ + Configuration options for setting up a mandate + """ + + +class SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsPixMandateOptions( + TypedDict, +): + amount: NotRequired[int] + """ + Amount to be charged for future payments. If not provided, defaults to 40000. + """ + amount_includes_iof: NotRequired[Literal["always", "never"]] + """ + Determines if the amount includes the IOF tax. Defaults to `never`. + """ + end_date: NotRequired[str] + """ + Date when the mandate expires and no further payments will be charged, in `YYYY-MM-DD`. If not provided, the mandate will be active until canceled. + """ + payment_schedule: NotRequired[ + Literal["halfyearly", "monthly", "quarterly", "weekly", "yearly"] + ] + """ + Schedule at which the future payments will be charged. Defaults to `weekly`. + """ + + +class SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsSepaDebit( + TypedDict, +): + pass + + +class SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsUpi( + TypedDict +): + mandate_options: NotRequired[ + "SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsUpiMandateOptions" + ] + """ + Configuration options for setting up an eMandate + """ + + +class SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsUpiMandateOptions( + TypedDict, +): + amount: NotRequired[int] + """ + Amount to be charged for future payments. + """ + amount_type: NotRequired[Literal["fixed", "maximum"]] + """ + One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. + """ + description: NotRequired[str] + """ + A description of the mandate or subscription that is meant to be displayed to the customer. + """ + end_date: NotRequired[int] + """ + End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. + """ + + +class SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsUsBankAccount( + TypedDict, +): + financial_connections: NotRequired[ + "SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections" + ] + """ + Additional fields for Financial Connections Session creation + """ + verification_method: NotRequired[ + Literal["automatic", "instant", "microdeposits"] + ] + """ + Verification method for the intent + """ + + +class SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections( + TypedDict, +): + filters: NotRequired[ + "SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters" + ] + """ + Provide filters for the linked accounts that the customer can select for the payment method. + """ + permissions: NotRequired[ + List[ + Literal["balances", "ownership", "payment_method", "transactions"] + ] + ] + """ + The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. + """ + prefetch: NotRequired[ + List[ + Literal[ + "balances", "inferred_balances", "ownership", "transactions" + ] + ] + ] + """ + List of data features that you would like to retrieve upon account creation. + """ + + +class SubscriptionModifyParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters( + TypedDict, +): + account_subcategories: NotRequired[List[Literal["checking", "savings"]]] + """ + The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`. + """ + institution: NotRequired[str] + """ + ID of the institution to use to filter for selectable accounts. + """ + + +class SubscriptionModifyParamsPendingInvoiceItemInterval(TypedDict): + interval: Literal["day", "month", "week", "year"] + """ + Specifies invoicing frequency. Either `day`, `week`, `month` or `year`. + """ + interval_count: NotRequired[int] + """ + The number of intervals between invoices. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). + """ + + +class SubscriptionModifyParamsPrebilling(TypedDict): + iterations: int + """ + This is used to determine the number of billing cycles to prebill. + """ + update_behavior: NotRequired[Literal["prebill", "reset"]] + """ + Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`. + """ + + +class SubscriptionModifyParamsTransferData(TypedDict): + amount_percent: NotRequired[float] + """ + A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. + """ + destination: str + """ + ID of an existing, connected Stripe account. + """ + + +class SubscriptionModifyParamsTrialSettings(TypedDict): + end_behavior: "SubscriptionModifyParamsTrialSettingsEndBehavior" + """ + Defines how the subscription should behave when the user's free trial ends. + """ + + +class SubscriptionModifyParamsTrialSettingsEndBehavior(TypedDict): + missing_payment_method: Literal["cancel", "create_invoice", "pause"] + """ + Indicates how the subscription should change when the trial ends if the user did not provide a payment method. + """ diff --git a/stripe/params/_subscription_resume_params.py b/stripe/params/_subscription_resume_params.py new file mode 100644 index 000000000..a74e3c7bb --- /dev/null +++ b/stripe/params/_subscription_resume_params.py @@ -0,0 +1,26 @@ +# -*- 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 SubscriptionResumeParams(RequestOptions): + billing_cycle_anchor: NotRequired[Literal["now", "unchanged"]] + """ + The billing cycle anchor that applies when the subscription is resumed. Either `now` or `unchanged`. The default is `now`. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + proration_behavior: NotRequired[ + Literal["always_invoice", "create_prorations", "none"] + ] + """ + Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) resulting from the `billing_cycle_anchor` being `unchanged`. When the `billing_cycle_anchor` is set to `now` (default value), no prorations are generated. If no value is passed, the default is `create_prorations`. + """ + proration_date: NotRequired[int] + """ + If set, prorations will be calculated as though the subscription was resumed at the given time. This can be used to apply exactly the same prorations that were previewed with the [create preview](https://stripe.com/docs/api/invoices/create_preview) endpoint. + """ diff --git a/stripe/params/_subscription_retrieve_params.py b/stripe/params/_subscription_retrieve_params.py new file mode 100644 index 000000000..17751ff49 --- /dev/null +++ b/stripe/params/_subscription_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 SubscriptionRetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_subscription_schedule_amend_params.py b/stripe/params/_subscription_schedule_amend_params.py new file mode 100644 index 000000000..c64458290 --- /dev/null +++ b/stripe/params/_subscription_schedule_amend_params.py @@ -0,0 +1,654 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class SubscriptionScheduleAmendParams(RequestOptions): + amendments: NotRequired[List["SubscriptionScheduleAmendParamsAmendment"]] + """ + Changes to apply to the phases of the subscription schedule, in the order provided. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + prebilling: NotRequired[ + "Literal['']|List[SubscriptionScheduleAmendParamsPrebilling]" + ] + """ + Provide any time periods to bill in advance. + """ + proration_behavior: NotRequired[ + Literal["always_invoice", "create_prorations", "none"] + ] + """ + In cases where the amendment changes the currently active phase, + specifies if and how to prorate at the time of the request. + """ + schedule_settings: NotRequired[ + "SubscriptionScheduleAmendParamsScheduleSettings" + ] + """ + Changes to apply to the subscription schedule. + """ + + +class SubscriptionScheduleAmendParamsAmendment(TypedDict): + amendment_end: NotRequired[ + "SubscriptionScheduleAmendParamsAmendmentAmendmentEnd" + ] + """ + Details to identify the end of the time range modified by the proposed change. If not supplied, the amendment is considered a point-in-time operation that only affects the exact timestamp at `amendment_start`, and a restricted set of attributes is supported on the amendment. + """ + amendment_start: "SubscriptionScheduleAmendParamsAmendmentAmendmentStart" + """ + Details to identify the earliest timestamp where the proposed change should take effect. + """ + billing_cycle_anchor: NotRequired[Literal["amendment_start", "automatic"]] + """ + For point-in-time amendments (having no `amendment_end`), this attribute lets you set or remove whether the subscription's billing cycle anchor is reset at the `amendment_start` timestamp.For time-span based amendments (having both `amendment_start` and `amendment_end`), the only value valid is `automatic`, which removes any previously configured billing cycle anchor resets scheduled to occur during the window of time spanned by the amendment. + """ + discount_actions: NotRequired[ + List["SubscriptionScheduleAmendParamsAmendmentDiscountAction"] + ] + """ + Changes to the coupons being redeemed or discounts being applied during the amendment time span. + """ + item_actions: NotRequired[ + List["SubscriptionScheduleAmendParamsAmendmentItemAction"] + ] + """ + Changes to the subscription items during the amendment time span. + """ + metadata_actions: NotRequired[ + List["SubscriptionScheduleAmendParamsAmendmentMetadataAction"] + ] + """ + Instructions for how to modify phase metadata + """ + proration_behavior: NotRequired[ + Literal["always_invoice", "create_prorations", "none"] + ] + """ + Changes to how Stripe handles prorations during the amendment time span. Affects if and how prorations are created when a future phase starts. In cases where the amendment changes the currently active phase, it is used to determine whether or how to prorate now, at the time of the request. Also supported as a point-in-time operation when `amendment_end` is `null`. + """ + set_pause_collection: NotRequired[ + "SubscriptionScheduleAmendParamsAmendmentSetPauseCollection" + ] + """ + Defines how to pause collection for the underlying subscription throughout the duration of the amendment. + """ + set_schedule_end: NotRequired[Literal["amendment_end", "amendment_start"]] + """ + Ends the subscription schedule early as dictated by either the accompanying amendment's start or end. + """ + trial_settings: NotRequired[ + "SubscriptionScheduleAmendParamsAmendmentTrialSettings" + ] + """ + Settings related to subscription trials. + """ + + +class SubscriptionScheduleAmendParamsAmendmentAmendmentEnd(TypedDict): + discount_end: NotRequired[ + "SubscriptionScheduleAmendParamsAmendmentAmendmentEndDiscountEnd" + ] + """ + Use the `end` time of a given discount. + """ + duration: NotRequired[ + "SubscriptionScheduleAmendParamsAmendmentAmendmentEndDuration" + ] + """ + Time span for the amendment starting from the `amendment_start`. + """ + timestamp: NotRequired[int] + """ + A precise Unix timestamp for the amendment to end. Must be after the `amendment_start`. + """ + type: Literal[ + "discount_end", + "duration", + "schedule_end", + "timestamp", + "trial_end", + "trial_start", + "upcoming_invoice", + ] + """ + Select one of three ways to pass the `amendment_end`. + """ + + +class SubscriptionScheduleAmendParamsAmendmentAmendmentEndDiscountEnd( + TypedDict, +): + discount: str + """ + The ID of a specific discount. + """ + + +class SubscriptionScheduleAmendParamsAmendmentAmendmentEndDuration(TypedDict): + interval: Literal["day", "month", "week", "year"] + """ + Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + """ + interval_count: int + """ + The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + """ + + +class SubscriptionScheduleAmendParamsAmendmentAmendmentStart(TypedDict): + amendment_end: NotRequired[ + "SubscriptionScheduleAmendParamsAmendmentAmendmentStartAmendmentEnd" + ] + """ + Details of another amendment in the same array, immediately after which this amendment should begin. + """ + discount_end: NotRequired[ + "SubscriptionScheduleAmendParamsAmendmentAmendmentStartDiscountEnd" + ] + """ + Use the `end` time of a given discount. + """ + timestamp: NotRequired[int] + """ + A precise Unix timestamp for the amendment to start. + """ + type: Literal[ + "amendment_end", + "discount_end", + "now", + "schedule_end", + "timestamp", + "trial_end", + "trial_start", + "upcoming_invoice", + ] + """ + Select one of three ways to pass the `amendment_start`. + """ + + +class SubscriptionScheduleAmendParamsAmendmentAmendmentStartAmendmentEnd( + TypedDict, +): + index: int + """ + The position of the previous amendment in the `amendments` array after which this amendment should begin. Indexes start from 0 and must be less than the index of the current amendment in the array. + """ + + +class SubscriptionScheduleAmendParamsAmendmentAmendmentStartDiscountEnd( + TypedDict, +): + discount: str + """ + The ID of a specific discount. + """ + + +class SubscriptionScheduleAmendParamsAmendmentDiscountAction(TypedDict): + add: NotRequired[ + "SubscriptionScheduleAmendParamsAmendmentDiscountActionAdd" + ] + """ + Details of the discount to add. + """ + remove: NotRequired[ + "SubscriptionScheduleAmendParamsAmendmentDiscountActionRemove" + ] + """ + Details of the discount to remove. + """ + set: NotRequired[ + "SubscriptionScheduleAmendParamsAmendmentDiscountActionSet" + ] + """ + Details of the discount to replace the existing discounts with. + """ + type: Literal["add", "remove", "set"] + """ + Determines the type of discount action. + """ + + +class SubscriptionScheduleAmendParamsAmendmentDiscountActionAdd(TypedDict): + coupon: NotRequired[str] + """ + The coupon code to redeem. + """ + discount: NotRequired[str] + """ + An ID of an existing discount for a coupon that was already redeemed. + """ + discount_end: NotRequired[ + "SubscriptionScheduleAmendParamsAmendmentDiscountActionAddDiscountEnd" + ] + """ + Details to determine how long the discount should be applied for. + """ + index: NotRequired[int] + """ + The index, starting at 0, at which to position the new discount. When not supplied, Stripe defaults to appending the discount to the end of the `discounts` array. + """ + promotion_code: NotRequired[str] + """ + The promotion code to redeem. + """ + + +class SubscriptionScheduleAmendParamsAmendmentDiscountActionAddDiscountEnd( + TypedDict, +): + type: Literal["amendment_end"] + """ + The type of calculation made to determine when the discount ends. + """ + + +class SubscriptionScheduleAmendParamsAmendmentDiscountActionRemove(TypedDict): + coupon: NotRequired[str] + """ + The coupon code to remove from the `discounts` array. + """ + discount: NotRequired[str] + """ + The ID of a discount to remove from the `discounts` array. + """ + promotion_code: NotRequired[str] + """ + The ID of a promotion code to remove from the `discounts` array. + """ + + +class SubscriptionScheduleAmendParamsAmendmentDiscountActionSet(TypedDict): + coupon: NotRequired[str] + """ + The coupon code to replace the `discounts` array with. + """ + discount: NotRequired[str] + """ + An ID of an existing discount to replace the `discounts` array with. + """ + promotion_code: NotRequired[str] + """ + An ID of an existing promotion code to replace the `discounts` array with. + """ + + +class SubscriptionScheduleAmendParamsAmendmentItemAction(TypedDict): + add: NotRequired["SubscriptionScheduleAmendParamsAmendmentItemActionAdd"] + """ + Details of the subscription item to add. If an item with the same `price` exists, it will be replaced by this new item. Otherwise, it adds the new item. + """ + remove: NotRequired[ + "SubscriptionScheduleAmendParamsAmendmentItemActionRemove" + ] + """ + Details of the subscription item to remove. + """ + set: NotRequired["SubscriptionScheduleAmendParamsAmendmentItemActionSet"] + """ + Details of the subscription item to replace the existing items with. If an item with the `set[price]` already exists, the `items` array is not cleared. Instead, all of the other `set` properties that are passed in this request will replace the existing values for the configuration item. + """ + type: Literal["add", "remove", "set"] + """ + Determines the type of item action. + """ + + +class SubscriptionScheduleAmendParamsAmendmentItemActionAdd(TypedDict): + discounts: NotRequired[ + List["SubscriptionScheduleAmendParamsAmendmentItemActionAddDiscount"] + ] + """ + The discounts applied to the item. Subscription item discounts are applied before subscription discounts. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + price: str + """ + The ID of the price object. + """ + quantity: NotRequired[int] + """ + Quantity for this item. + """ + tax_rates: NotRequired[List[str]] + """ + The tax rates that apply to this subscription item. When set, the `default_tax_rates` on the subscription do not apply to this `subscription_item`. + """ + trial: NotRequired[ + "SubscriptionScheduleAmendParamsAmendmentItemActionAddTrial" + ] + """ + Options that configure the trial on the subscription item. + """ + + +class SubscriptionScheduleAmendParamsAmendmentItemActionAddDiscount(TypedDict): + coupon: NotRequired[str] + """ + ID of the coupon to create a new discount for. + """ + discount: NotRequired[str] + """ + ID of an existing discount on the object (or one of its ancestors) to reuse. + """ + discount_end: NotRequired[ + "SubscriptionScheduleAmendParamsAmendmentItemActionAddDiscountDiscountEnd" + ] + """ + Details to determine how long the discount should be applied for. + """ + promotion_code: NotRequired[str] + """ + ID of the promotion code to create a new discount for. + """ + + +class SubscriptionScheduleAmendParamsAmendmentItemActionAddDiscountDiscountEnd( + TypedDict, +): + duration: NotRequired[ + "SubscriptionScheduleAmendParamsAmendmentItemActionAddDiscountDiscountEndDuration" + ] + """ + Time span for the redeemed discount. + """ + timestamp: NotRequired[int] + """ + A precise Unix timestamp for the discount to end. Must be in the future. + """ + type: Literal["duration", "timestamp"] + """ + The type of calculation made to determine when the discount ends. + """ + + +class SubscriptionScheduleAmendParamsAmendmentItemActionAddDiscountDiscountEndDuration( + TypedDict, +): + interval: Literal["day", "month", "week", "year"] + """ + Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + """ + interval_count: int + """ + The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + """ + + +class SubscriptionScheduleAmendParamsAmendmentItemActionAddTrial(TypedDict): + converts_to: NotRequired[List[str]] + """ + List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. + """ + type: Literal["free", "paid"] + """ + Determines the type of trial for this item. + """ + + +class SubscriptionScheduleAmendParamsAmendmentItemActionRemove(TypedDict): + price: str + """ + ID of a price to remove. + """ + + +class SubscriptionScheduleAmendParamsAmendmentItemActionSet(TypedDict): + discounts: NotRequired[ + List["SubscriptionScheduleAmendParamsAmendmentItemActionSetDiscount"] + ] + """ + If an item with the `price` already exists, passing this will override the `discounts` array on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `discounts`. + """ + metadata: NotRequired[Dict[str, str]] + """ + If an item with the `price` already exists, passing this will override the `metadata` on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `metadata`. + """ + price: str + """ + The ID of the price object. + """ + quantity: NotRequired[int] + """ + If an item with the `price` already exists, passing this will override the quantity on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `quantity`. + """ + tax_rates: NotRequired[List[str]] + """ + If an item with the `price` already exists, passing this will override the `tax_rates` array on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `tax_rates`. + """ + trial: NotRequired[ + "SubscriptionScheduleAmendParamsAmendmentItemActionSetTrial" + ] + """ + If an item with the `price` already exists, passing this will override the `trial` configuration on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `trial`. + """ + + +class SubscriptionScheduleAmendParamsAmendmentItemActionSetDiscount(TypedDict): + coupon: NotRequired[str] + """ + ID of the coupon to create a new discount for. + """ + discount: NotRequired[str] + """ + ID of an existing discount on the object (or one of its ancestors) to reuse. + """ + discount_end: NotRequired[ + "SubscriptionScheduleAmendParamsAmendmentItemActionSetDiscountDiscountEnd" + ] + """ + Details to determine how long the discount should be applied for. + """ + promotion_code: NotRequired[str] + """ + ID of the promotion code to create a new discount for. + """ + + +class SubscriptionScheduleAmendParamsAmendmentItemActionSetDiscountDiscountEnd( + TypedDict, +): + duration: NotRequired[ + "SubscriptionScheduleAmendParamsAmendmentItemActionSetDiscountDiscountEndDuration" + ] + """ + Time span for the redeemed discount. + """ + timestamp: NotRequired[int] + """ + A precise Unix timestamp for the discount to end. Must be in the future. + """ + type: Literal["duration", "timestamp"] + """ + The type of calculation made to determine when the discount ends. + """ + + +class SubscriptionScheduleAmendParamsAmendmentItemActionSetDiscountDiscountEndDuration( + TypedDict, +): + interval: Literal["day", "month", "week", "year"] + """ + Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + """ + interval_count: int + """ + The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + """ + + +class SubscriptionScheduleAmendParamsAmendmentItemActionSetTrial(TypedDict): + converts_to: NotRequired[List[str]] + """ + List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. + """ + type: Literal["free", "paid"] + """ + Determines the type of trial for this item. + """ + + +class SubscriptionScheduleAmendParamsAmendmentMetadataAction(TypedDict): + add: NotRequired[Dict[str, str]] + """ + Key-value pairs to add to schedule phase metadata. These values will merge with existing schedule phase metadata. + """ + remove: NotRequired[List[str]] + """ + Keys to remove from schedule phase metadata. + """ + set: NotRequired["Literal['']|Dict[str, str]"] + """ + Key-value pairs to set as schedule phase metadata. Existing schedule phase metadata will be overwritten. + """ + type: Literal["add", "remove", "set"] + """ + Select one of three ways to update phase-level `metadata` on subscription schedules. + """ + + +class SubscriptionScheduleAmendParamsAmendmentSetPauseCollection(TypedDict): + set: NotRequired[ + "SubscriptionScheduleAmendParamsAmendmentSetPauseCollectionSet" + ] + """ + Details of the pause_collection behavior to apply to the amendment. + """ + type: Literal["remove", "set"] + """ + Determines the type of the pause_collection amendment. + """ + + +class SubscriptionScheduleAmendParamsAmendmentSetPauseCollectionSet(TypedDict): + behavior: Literal["keep_as_draft", "mark_uncollectible", "void"] + """ + The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. + """ + + +class SubscriptionScheduleAmendParamsAmendmentTrialSettings(TypedDict): + end_behavior: NotRequired[ + "SubscriptionScheduleAmendParamsAmendmentTrialSettingsEndBehavior" + ] + """ + Defines how the subscription should behave when a trial ends. + """ + + +class SubscriptionScheduleAmendParamsAmendmentTrialSettingsEndBehavior( + TypedDict, +): + prorate_up_front: NotRequired[Literal["defer", "include"]] + """ + Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`. + """ + + +class SubscriptionScheduleAmendParamsPrebilling(TypedDict): + bill_from: NotRequired["SubscriptionScheduleAmendParamsPrebillingBillFrom"] + """ + The beginning of the prebilled time period. The default value is `now`. + """ + bill_until: NotRequired[ + "SubscriptionScheduleAmendParamsPrebillingBillUntil" + ] + """ + The end of the prebilled time period. + """ + invoice_at: NotRequired[Literal["now"]] + """ + When the prebilling invoice should be created. The default value is `now`. + """ + update_behavior: NotRequired[Literal["prebill", "reset"]] + """ + Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`. + """ + + +class SubscriptionScheduleAmendParamsPrebillingBillFrom(TypedDict): + amendment_start: NotRequired[ + "SubscriptionScheduleAmendParamsPrebillingBillFromAmendmentStart" + ] + """ + Start the prebilled period when a specified amendment begins. + """ + timestamp: NotRequired[int] + """ + Start the prebilled period at a precise integer timestamp, starting from the Unix epoch. + """ + type: Literal["amendment_start", "now", "timestamp"] + """ + Select one of several ways to pass the `bill_from` value. + """ + + +class SubscriptionScheduleAmendParamsPrebillingBillFromAmendmentStart( + TypedDict, +): + index: int + """ + The position of the amendment in the `amendments` array with which prebilling should begin. Indexes start from 0 and must be less than the total number of supplied amendments. + """ + + +class SubscriptionScheduleAmendParamsPrebillingBillUntil(TypedDict): + amendment_end: NotRequired[ + "SubscriptionScheduleAmendParamsPrebillingBillUntilAmendmentEnd" + ] + """ + End the prebilled period when a specified amendment ends. + """ + duration: NotRequired[ + "SubscriptionScheduleAmendParamsPrebillingBillUntilDuration" + ] + """ + Time span for prebilling, starting from `bill_from`. + """ + timestamp: NotRequired[int] + """ + End the prebilled period at a precise integer timestamp, starting from the Unix epoch. + """ + type: Literal["amendment_end", "duration", "schedule_end", "timestamp"] + """ + Select one of several ways to pass the `bill_until` value. + """ + + +class SubscriptionScheduleAmendParamsPrebillingBillUntilAmendmentEnd( + TypedDict +): + index: int + """ + The position of the amendment in the `amendments` array at which prebilling should end. Indexes start from 0 and must be less than the total number of supplied amendments. + """ + + +class SubscriptionScheduleAmendParamsPrebillingBillUntilDuration(TypedDict): + interval: Literal["day", "month", "week", "year"] + """ + Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + """ + interval_count: int + """ + The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + """ + + +class SubscriptionScheduleAmendParamsScheduleSettings(TypedDict): + end_behavior: NotRequired[Literal["cancel", "release"]] + """ + Behavior of the subscription schedule and underlying subscription when it ends. + """ diff --git a/stripe/params/_subscription_schedule_cancel_params.py b/stripe/params/_subscription_schedule_cancel_params.py new file mode 100644 index 000000000..dc84eac03 --- /dev/null +++ b/stripe/params/_subscription_schedule_cancel_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 SubscriptionScheduleCancelParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + invoice_now: NotRequired[bool] + """ + If the subscription schedule is `active`, indicates if a final invoice will be generated that contains any un-invoiced metered usage and new/pending proration invoice items. Defaults to `true`. + """ + prorate: NotRequired[bool] + """ + If the subscription schedule is `active`, indicates if the cancellation should be prorated. Defaults to `true`. + """ diff --git a/stripe/params/_subscription_schedule_create_params.py b/stripe/params/_subscription_schedule_create_params.py new file mode 100644 index 000000000..2a5b422c2 --- /dev/null +++ b/stripe/params/_subscription_schedule_create_params.py @@ -0,0 +1,804 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class SubscriptionScheduleCreateParams(RequestOptions): + billing_behavior: NotRequired[ + Literal["prorate_on_next_phase", "prorate_up_front"] + ] + """ + Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front. + """ + billing_mode: NotRequired["SubscriptionScheduleCreateParamsBillingMode"] + """ + Controls how prorations and invoices for subscriptions are calculated and orchestrated. + """ + customer: NotRequired[str] + """ + The identifier of the customer to create the subscription schedule for. + """ + customer_account: NotRequired[str] + """ + The identifier of the account to create the subscription schedule for. + """ + default_settings: NotRequired[ + "SubscriptionScheduleCreateParamsDefaultSettings" + ] + """ + Object representing the subscription schedule's default settings. + """ + end_behavior: NotRequired[Literal["cancel", "none", "release", "renew"]] + """ + Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running. `cancel` will end the subscription schedule and cancel the underlying subscription. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + from_subscription: NotRequired[str] + """ + Migrate an existing subscription to be managed by a subscription schedule. If this parameter is set, a subscription schedule will be created using the subscription's item(s), set to auto-renew using the subscription's interval. When using this parameter, other parameters (such as phase values) cannot be set. To create a subscription schedule with other modifications, we recommend making two separate API calls. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + phases: NotRequired[List["SubscriptionScheduleCreateParamsPhase"]] + """ + List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase. + """ + prebilling: NotRequired["SubscriptionScheduleCreateParamsPrebilling"] + """ + If specified, the invoicing for the given billing cycle iterations will be processed now. + """ + start_date: NotRequired["int|Literal['now']"] + """ + When the subscription schedule starts. We recommend using `now` so that it starts the subscription immediately. You can also use a Unix timestamp to backdate the subscription so that it starts on a past date, or set a future date for the subscription to start on. + """ + + +class SubscriptionScheduleCreateParamsBillingMode(TypedDict): + flexible: NotRequired[ + "SubscriptionScheduleCreateParamsBillingModeFlexible" + ] + """ + Configure behavior for flexible billing mode. + """ + type: Literal["classic", "flexible"] + """ + Controls the calculation and orchestration of prorations and invoices for subscriptions. If no value is passed, the default is `flexible`. + """ + + +class SubscriptionScheduleCreateParamsBillingModeFlexible(TypedDict): + proration_discounts: NotRequired[Literal["included", "itemized"]] + """ + Controls how invoices and invoice items display proration amounts and discount amounts. + """ + + +class SubscriptionScheduleCreateParamsDefaultSettings(TypedDict): + application_fee_percent: NotRequired[float] + """ + A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). + """ + automatic_tax: NotRequired[ + "SubscriptionScheduleCreateParamsDefaultSettingsAutomaticTax" + ] + """ + Default settings for automatic tax computation. + """ + billing_cycle_anchor: NotRequired[Literal["automatic", "phase_start"]] + """ + Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). + """ + billing_thresholds: NotRequired[ + "Literal['']|SubscriptionScheduleCreateParamsDefaultSettingsBillingThresholds" + ] + """ + Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. + """ + collection_method: NotRequired[ + Literal["charge_automatically", "send_invoice"] + ] + """ + Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically` on creation. + """ + default_payment_method: NotRequired[str] + """ + ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings. + """ + description: NotRequired["Literal['']|str"] + """ + Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. + """ + invoice_settings: NotRequired[ + "SubscriptionScheduleCreateParamsDefaultSettingsInvoiceSettings" + ] + """ + All invoices will be billed using the specified settings. + """ + on_behalf_of: NotRequired["Literal['']|str"] + """ + The account on behalf of which to charge, for each of the associated subscription's invoices. + """ + transfer_data: NotRequired[ + "Literal['']|SubscriptionScheduleCreateParamsDefaultSettingsTransferData" + ] + """ + The data with which to automatically create a Transfer for each of the associated subscription's invoices. + """ + + +class SubscriptionScheduleCreateParamsDefaultSettingsAutomaticTax(TypedDict): + enabled: bool + """ + Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription. + """ + liability: NotRequired[ + "SubscriptionScheduleCreateParamsDefaultSettingsAutomaticTaxLiability" + ] + """ + The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + """ + + +class SubscriptionScheduleCreateParamsDefaultSettingsAutomaticTaxLiability( + TypedDict, +): + account: NotRequired[str] + """ + The connected account being referenced when `type` is `account`. + """ + type: Literal["account", "self"] + """ + Type of the account referenced in the request. + """ + + +class SubscriptionScheduleCreateParamsDefaultSettingsBillingThresholds( + TypedDict, +): + amount_gte: NotRequired[int] + """ + Monetary threshold that triggers the subscription to advance to a new billing period + """ + reset_billing_cycle_anchor: NotRequired[bool] + """ + Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. + """ + + +class SubscriptionScheduleCreateParamsDefaultSettingsInvoiceSettings( + TypedDict +): + account_tax_ids: NotRequired["Literal['']|List[str]"] + """ + The account tax IDs associated with the subscription schedule. Will be set on invoices generated by the subscription schedule. + """ + days_until_due: NotRequired[int] + """ + Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `collection_method=charge_automatically`. + """ + issuer: NotRequired[ + "SubscriptionScheduleCreateParamsDefaultSettingsInvoiceSettingsIssuer" + ] + """ + The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + """ + + +class SubscriptionScheduleCreateParamsDefaultSettingsInvoiceSettingsIssuer( + TypedDict, +): + account: NotRequired[str] + """ + The connected account being referenced when `type` is `account`. + """ + type: Literal["account", "self"] + """ + Type of the account referenced in the request. + """ + + +class SubscriptionScheduleCreateParamsDefaultSettingsTransferData(TypedDict): + amount_percent: NotRequired[float] + """ + A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. + """ + destination: str + """ + ID of an existing, connected Stripe account. + """ + + +class SubscriptionScheduleCreateParamsPhase(TypedDict): + add_invoice_items: NotRequired[ + List["SubscriptionScheduleCreateParamsPhaseAddInvoiceItem"] + ] + """ + A list of prices and quantities that will generate invoice items appended to the next invoice for this phase. You may pass up to 20 items. + """ + application_fee_percent: NotRequired[float] + """ + A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). + """ + automatic_tax: NotRequired[ + "SubscriptionScheduleCreateParamsPhaseAutomaticTax" + ] + """ + Automatic tax settings for this phase. + """ + billing_cycle_anchor: NotRequired[Literal["automatic", "phase_start"]] + """ + Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). + """ + billing_thresholds: NotRequired[ + "Literal['']|SubscriptionScheduleCreateParamsPhaseBillingThresholds" + ] + """ + Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. + """ + collection_method: NotRequired[ + Literal["charge_automatically", "send_invoice"] + ] + """ + Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically` on creation. + """ + currency: NotRequired[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). + """ + default_payment_method: NotRequired[str] + """ + ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings. + """ + default_tax_rates: NotRequired["Literal['']|List[str]"] + """ + A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will set the Subscription's [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates), which means they will be the Invoice's [`default_tax_rates`](https://stripe.com/docs/api/invoices/create#create_invoice-default_tax_rates) for any Invoices issued by the Subscription during this Phase. + """ + description: NotRequired["Literal['']|str"] + """ + Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. + """ + discounts: NotRequired[ + "Literal['']|List[SubscriptionScheduleCreateParamsPhaseDiscount]" + ] + """ + The coupons to redeem into discounts for the schedule phase. If not specified, inherits the discount from the subscription's customer. Pass an empty string to avoid inheriting any discounts. + """ + duration: NotRequired["SubscriptionScheduleCreateParamsPhaseDuration"] + """ + The number of intervals the phase should last. If set, `end_date` must not be set. + """ + end_date: NotRequired[int] + """ + The date at which this phase of the subscription schedule ends. If set, `iterations` must not be set. + """ + invoice_settings: NotRequired[ + "SubscriptionScheduleCreateParamsPhaseInvoiceSettings" + ] + """ + All invoices will be billed using the specified settings. + """ + items: List["SubscriptionScheduleCreateParamsPhaseItem"] + """ + List of configuration items, each with an attached price, to apply during this phase of the subscription schedule. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a phase. Metadata on a schedule's phase will update the underlying subscription's `metadata` when the phase is entered, adding new keys and replacing existing keys in the subscription's `metadata`. Individual keys in the subscription's `metadata` can be unset by posting an empty value to them in the phase's `metadata`. To unset all keys in the subscription's `metadata`, update the subscription directly or unset every key individually from the phase's `metadata`. + """ + on_behalf_of: NotRequired[str] + """ + The account on behalf of which to charge, for each of the associated subscription's invoices. + """ + pause_collection: NotRequired[ + "SubscriptionScheduleCreateParamsPhasePauseCollection" + ] + """ + If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment). + """ + proration_behavior: NotRequired[ + Literal["always_invoice", "create_prorations", "none"] + ] + """ + Controls whether the subscription schedule should create [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when transitioning to this phase if there is a difference in billing configuration. It's different from the request-level [proration_behavior](https://stripe.com/docs/api/subscription_schedules/update#update_subscription_schedule-proration_behavior) parameter which controls what happens if the update request affects the billing configuration (item price, quantity, etc.) of the current phase. + """ + transfer_data: NotRequired[ + "SubscriptionScheduleCreateParamsPhaseTransferData" + ] + """ + The data with which to automatically create a Transfer for each of the associated subscription's invoices. + """ + trial: NotRequired[bool] + """ + If set to true the entire phase is counted as a trial and the customer will not be charged for any fees. + """ + trial_continuation: NotRequired[Literal["continue", "none"]] + """ + Specify trial behavior when crossing phase boundaries + """ + trial_end: NotRequired[int] + """ + Sets the phase to trialing from the start date to this date. Must be before the phase end date, can not be combined with `trial` + """ + trial_settings: NotRequired[ + "SubscriptionScheduleCreateParamsPhaseTrialSettings" + ] + """ + Settings related to subscription trials. + """ + + +class SubscriptionScheduleCreateParamsPhaseAddInvoiceItem(TypedDict): + discounts: NotRequired[ + List["SubscriptionScheduleCreateParamsPhaseAddInvoiceItemDiscount"] + ] + """ + The coupons to redeem into discounts for the item. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + period: NotRequired[ + "SubscriptionScheduleCreateParamsPhaseAddInvoiceItemPeriod" + ] + """ + The period associated with this invoice item. If not set, `period.start.type` defaults to `max_item_period_start` and `period.end.type` defaults to `min_item_period_end`. + """ + price: NotRequired[str] + """ + The ID of the price object. One of `price` or `price_data` is required. + """ + price_data: NotRequired[ + "SubscriptionScheduleCreateParamsPhaseAddInvoiceItemPriceData" + ] + """ + Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. + """ + quantity: NotRequired[int] + """ + Quantity for this item. Defaults to 1. + """ + tax_rates: NotRequired["Literal['']|List[str]"] + """ + The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item. + """ + + +class SubscriptionScheduleCreateParamsPhaseAddInvoiceItemDiscount(TypedDict): + coupon: NotRequired[str] + """ + ID of the coupon to create a new discount for. + """ + discount: NotRequired[str] + """ + ID of an existing discount on the object (or one of its ancestors) to reuse. + """ + discount_end: NotRequired[ + "SubscriptionScheduleCreateParamsPhaseAddInvoiceItemDiscountDiscountEnd" + ] + """ + Details to determine how long the discount should be applied for. + """ + promotion_code: NotRequired[str] + """ + ID of the promotion code to create a new discount for. + """ + + +class SubscriptionScheduleCreateParamsPhaseAddInvoiceItemDiscountDiscountEnd( + TypedDict, +): + duration: NotRequired[ + "SubscriptionScheduleCreateParamsPhaseAddInvoiceItemDiscountDiscountEndDuration" + ] + """ + Time span for the redeemed discount. + """ + timestamp: NotRequired[int] + """ + A precise Unix timestamp for the discount to end. Must be in the future. + """ + type: Literal["duration", "timestamp"] + """ + The type of calculation made to determine when the discount ends. + """ + + +class SubscriptionScheduleCreateParamsPhaseAddInvoiceItemDiscountDiscountEndDuration( + TypedDict, +): + interval: Literal["day", "month", "week", "year"] + """ + Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + """ + interval_count: int + """ + The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + """ + + +class SubscriptionScheduleCreateParamsPhaseAddInvoiceItemPeriod(TypedDict): + end: "SubscriptionScheduleCreateParamsPhaseAddInvoiceItemPeriodEnd" + """ + End of the invoice item period. + """ + start: "SubscriptionScheduleCreateParamsPhaseAddInvoiceItemPeriodStart" + """ + Start of the invoice item period. + """ + + +class SubscriptionScheduleCreateParamsPhaseAddInvoiceItemPeriodEnd(TypedDict): + timestamp: NotRequired[int] + """ + A precise Unix timestamp for the end of the invoice item period. Must be greater than or equal to `period.start`. + """ + type: Literal["min_item_period_end", "phase_end", "timestamp"] + """ + Select how to calculate the end of the invoice item period. + """ + + +class SubscriptionScheduleCreateParamsPhaseAddInvoiceItemPeriodStart( + TypedDict +): + timestamp: NotRequired[int] + """ + A precise Unix timestamp for the start of the invoice item period. Must be less than or equal to `period.end`. + """ + type: Literal["max_item_period_start", "phase_start", "timestamp"] + """ + Select how to calculate the start of the invoice item period. + """ + + +class SubscriptionScheduleCreateParamsPhaseAddInvoiceItemPriceData(TypedDict): + 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). + """ + product: str + """ + The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to. + """ + tax_behavior: NotRequired[Literal["exclusive", "inclusive", "unspecified"]] + """ + Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + """ + unit_amount: NotRequired[int] + """ + A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge or a negative integer representing the amount to credit to the customer. + """ + unit_amount_decimal: NotRequired[str] + """ + Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + """ + + +class SubscriptionScheduleCreateParamsPhaseAutomaticTax(TypedDict): + enabled: bool + """ + Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription. + """ + liability: NotRequired[ + "SubscriptionScheduleCreateParamsPhaseAutomaticTaxLiability" + ] + """ + The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + """ + + +class SubscriptionScheduleCreateParamsPhaseAutomaticTaxLiability(TypedDict): + account: NotRequired[str] + """ + The connected account being referenced when `type` is `account`. + """ + type: Literal["account", "self"] + """ + Type of the account referenced in the request. + """ + + +class SubscriptionScheduleCreateParamsPhaseBillingThresholds(TypedDict): + amount_gte: NotRequired[int] + """ + Monetary threshold that triggers the subscription to advance to a new billing period + """ + reset_billing_cycle_anchor: NotRequired[bool] + """ + Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. + """ + + +class SubscriptionScheduleCreateParamsPhaseDiscount(TypedDict): + coupon: NotRequired[str] + """ + ID of the coupon to create a new discount for. + """ + discount: NotRequired[str] + """ + ID of an existing discount on the object (or one of its ancestors) to reuse. + """ + discount_end: NotRequired[ + "SubscriptionScheduleCreateParamsPhaseDiscountDiscountEnd" + ] + """ + Details to determine how long the discount should be applied for. + """ + promotion_code: NotRequired[str] + """ + ID of the promotion code to create a new discount for. + """ + + +class SubscriptionScheduleCreateParamsPhaseDiscountDiscountEnd(TypedDict): + duration: NotRequired[ + "SubscriptionScheduleCreateParamsPhaseDiscountDiscountEndDuration" + ] + """ + Time span for the redeemed discount. + """ + timestamp: NotRequired[int] + """ + A precise Unix timestamp for the discount to end. Must be in the future. + """ + type: Literal["duration", "timestamp"] + """ + The type of calculation made to determine when the discount ends. + """ + + +class SubscriptionScheduleCreateParamsPhaseDiscountDiscountEndDuration( + TypedDict, +): + interval: Literal["day", "month", "week", "year"] + """ + Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + """ + interval_count: int + """ + The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + """ + + +class SubscriptionScheduleCreateParamsPhaseDuration(TypedDict): + interval: Literal["day", "month", "week", "year"] + """ + Specifies phase duration. Either `day`, `week`, `month` or `year`. + """ + interval_count: NotRequired[int] + """ + The multiplier applied to the interval. + """ + + +class SubscriptionScheduleCreateParamsPhaseInvoiceSettings(TypedDict): + account_tax_ids: NotRequired["Literal['']|List[str]"] + """ + The account tax IDs associated with this phase of the subscription schedule. Will be set on invoices generated by this phase of the subscription schedule. + """ + days_until_due: NotRequired[int] + """ + Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `billing=charge_automatically`. + """ + issuer: NotRequired[ + "SubscriptionScheduleCreateParamsPhaseInvoiceSettingsIssuer" + ] + """ + The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + """ + + +class SubscriptionScheduleCreateParamsPhaseInvoiceSettingsIssuer(TypedDict): + account: NotRequired[str] + """ + The connected account being referenced when `type` is `account`. + """ + type: Literal["account", "self"] + """ + Type of the account referenced in the request. + """ + + +class SubscriptionScheduleCreateParamsPhaseItem(TypedDict): + billing_thresholds: NotRequired[ + "Literal['']|SubscriptionScheduleCreateParamsPhaseItemBillingThresholds" + ] + """ + Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. + """ + discounts: NotRequired[ + "Literal['']|List[SubscriptionScheduleCreateParamsPhaseItemDiscount]" + ] + """ + The coupons to redeem into discounts for the subscription item. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a configuration item. Metadata on a configuration item will update the underlying subscription item's `metadata` when the phase is entered, adding new keys and replacing existing keys. Individual keys in the subscription item's `metadata` can be unset by posting an empty value to them in the configuration item's `metadata`. To unset all keys in the subscription item's `metadata`, update the subscription item directly or unset every key individually from the configuration item's `metadata`. + """ + plan: NotRequired[str] + """ + The plan ID to subscribe to. You may specify the same ID in `plan` and `price`. + """ + price: NotRequired[str] + """ + The ID of the price object. + """ + price_data: NotRequired[ + "SubscriptionScheduleCreateParamsPhaseItemPriceData" + ] + """ + Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + """ + quantity: NotRequired[int] + """ + Quantity for the given price. Can be set only if the price's `usage_type` is `licensed` and not `metered`. + """ + tax_rates: NotRequired["Literal['']|List[str]"] + """ + A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. + """ + trial: NotRequired["SubscriptionScheduleCreateParamsPhaseItemTrial"] + """ + Options that configure the trial on the subscription item. + """ + + +class SubscriptionScheduleCreateParamsPhaseItemBillingThresholds(TypedDict): + usage_gte: int + """ + Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)) + """ + + +class SubscriptionScheduleCreateParamsPhaseItemDiscount(TypedDict): + coupon: NotRequired[str] + """ + ID of the coupon to create a new discount for. + """ + discount: NotRequired[str] + """ + ID of an existing discount on the object (or one of its ancestors) to reuse. + """ + discount_end: NotRequired[ + "SubscriptionScheduleCreateParamsPhaseItemDiscountDiscountEnd" + ] + """ + Details to determine how long the discount should be applied for. + """ + promotion_code: NotRequired[str] + """ + ID of the promotion code to create a new discount for. + """ + + +class SubscriptionScheduleCreateParamsPhaseItemDiscountDiscountEnd(TypedDict): + duration: NotRequired[ + "SubscriptionScheduleCreateParamsPhaseItemDiscountDiscountEndDuration" + ] + """ + Time span for the redeemed discount. + """ + timestamp: NotRequired[int] + """ + A precise Unix timestamp for the discount to end. Must be in the future. + """ + type: Literal["duration", "timestamp"] + """ + The type of calculation made to determine when the discount ends. + """ + + +class SubscriptionScheduleCreateParamsPhaseItemDiscountDiscountEndDuration( + TypedDict, +): + interval: Literal["day", "month", "week", "year"] + """ + Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + """ + interval_count: int + """ + The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + """ + + +class SubscriptionScheduleCreateParamsPhaseItemPriceData(TypedDict): + 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). + """ + product: str + """ + The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to. + """ + recurring: "SubscriptionScheduleCreateParamsPhaseItemPriceDataRecurring" + """ + The recurring components of a price such as `interval` and `interval_count`. + """ + tax_behavior: NotRequired[Literal["exclusive", "inclusive", "unspecified"]] + """ + Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + """ + unit_amount: NotRequired[int] + """ + A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + """ + unit_amount_decimal: NotRequired[str] + """ + Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + """ + + +class SubscriptionScheduleCreateParamsPhaseItemPriceDataRecurring(TypedDict): + interval: Literal["day", "month", "week", "year"] + """ + Specifies billing frequency. Either `day`, `week`, `month` or `year`. + """ + interval_count: NotRequired[int] + """ + The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). + """ + + +class SubscriptionScheduleCreateParamsPhaseItemTrial(TypedDict): + converts_to: NotRequired[List[str]] + """ + List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. + """ + type: Literal["free", "paid"] + """ + Determines the type of trial for this item. + """ + + +class SubscriptionScheduleCreateParamsPhasePauseCollection(TypedDict): + behavior: Literal["keep_as_draft", "mark_uncollectible", "void"] + """ + The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. + """ + + +class SubscriptionScheduleCreateParamsPhaseTransferData(TypedDict): + amount_percent: NotRequired[float] + """ + A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. + """ + destination: str + """ + ID of an existing, connected Stripe account. + """ + + +class SubscriptionScheduleCreateParamsPhaseTrialSettings(TypedDict): + end_behavior: NotRequired[ + "SubscriptionScheduleCreateParamsPhaseTrialSettingsEndBehavior" + ] + """ + Defines how the subscription should behave when a trial ends. + """ + + +class SubscriptionScheduleCreateParamsPhaseTrialSettingsEndBehavior(TypedDict): + prorate_up_front: NotRequired[Literal["defer", "include"]] + """ + Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`. + """ + + +class SubscriptionScheduleCreateParamsPrebilling(TypedDict): + iterations: int + """ + This is used to determine the number of billing cycles to prebill. + """ + update_behavior: NotRequired[Literal["prebill", "reset"]] + """ + Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`. + """ diff --git a/stripe/params/_subscription_schedule_list_params.py b/stripe/params/_subscription_schedule_list_params.py new file mode 100644 index 000000000..b87767ab2 --- /dev/null +++ b/stripe/params/_subscription_schedule_list_params.py @@ -0,0 +1,128 @@ +# -*- 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 SubscriptionScheduleListParams(RequestOptions): + canceled_at: NotRequired["SubscriptionScheduleListParamsCanceledAt|int"] + """ + Only return subscription schedules that were created canceled the given date interval. + """ + completed_at: NotRequired["SubscriptionScheduleListParamsCompletedAt|int"] + """ + Only return subscription schedules that completed during the given date interval. + """ + created: NotRequired["SubscriptionScheduleListParamsCreated|int"] + """ + Only return subscription schedules that were created during the given date interval. + """ + customer: NotRequired[str] + """ + Only return subscription schedules for the given customer. + """ + customer_account: NotRequired[str] + """ + Only return subscription schedules for the given account. + """ + 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. + """ + released_at: NotRequired["SubscriptionScheduleListParamsReleasedAt|int"] + """ + Only return subscription schedules that were released during the given date interval. + """ + scheduled: NotRequired[bool] + """ + Only return subscription schedules that have not started yet. + """ + 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 SubscriptionScheduleListParamsCanceledAt(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) + """ + + +class SubscriptionScheduleListParamsCompletedAt(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) + """ + + +class SubscriptionScheduleListParamsCreated(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) + """ + + +class SubscriptionScheduleListParamsReleasedAt(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/_subscription_schedule_modify_params.py b/stripe/params/_subscription_schedule_modify_params.py new file mode 100644 index 000000000..5f49a3d02 --- /dev/null +++ b/stripe/params/_subscription_schedule_modify_params.py @@ -0,0 +1,774 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class SubscriptionScheduleModifyParams(RequestOptions): + billing_behavior: NotRequired[ + Literal["prorate_on_next_phase", "prorate_up_front"] + ] + """ + Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front. + """ + default_settings: NotRequired[ + "SubscriptionScheduleModifyParamsDefaultSettings" + ] + """ + Object representing the subscription schedule's default settings. + """ + end_behavior: NotRequired[Literal["cancel", "none", "release", "renew"]] + """ + Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running. `cancel` will end the subscription schedule and cancel the underlying subscription. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + phases: NotRequired[List["SubscriptionScheduleModifyParamsPhase"]] + """ + List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase. Note that past phases can be omitted. + """ + prebilling: NotRequired["SubscriptionScheduleModifyParamsPrebilling"] + """ + If specified, the invoicing for the given billing cycle iterations will be processed now. + """ + proration_behavior: NotRequired[ + Literal["always_invoice", "create_prorations", "none"] + ] + """ + If the update changes the billing configuration (item price, quantity, etc.) of the current phase, indicates how prorations from this change should be handled. The default value is `create_prorations`. + """ + + +class SubscriptionScheduleModifyParamsDefaultSettings(TypedDict): + application_fee_percent: NotRequired[float] + """ + A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). + """ + automatic_tax: NotRequired[ + "SubscriptionScheduleModifyParamsDefaultSettingsAutomaticTax" + ] + """ + Default settings for automatic tax computation. + """ + billing_cycle_anchor: NotRequired[Literal["automatic", "phase_start"]] + """ + Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). + """ + billing_thresholds: NotRequired[ + "Literal['']|SubscriptionScheduleModifyParamsDefaultSettingsBillingThresholds" + ] + """ + Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. + """ + collection_method: NotRequired[ + Literal["charge_automatically", "send_invoice"] + ] + """ + Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically` on creation. + """ + default_payment_method: NotRequired[str] + """ + ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings. + """ + description: NotRequired["Literal['']|str"] + """ + Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. + """ + invoice_settings: NotRequired[ + "SubscriptionScheduleModifyParamsDefaultSettingsInvoiceSettings" + ] + """ + All invoices will be billed using the specified settings. + """ + on_behalf_of: NotRequired["Literal['']|str"] + """ + The account on behalf of which to charge, for each of the associated subscription's invoices. + """ + transfer_data: NotRequired[ + "Literal['']|SubscriptionScheduleModifyParamsDefaultSettingsTransferData" + ] + """ + The data with which to automatically create a Transfer for each of the associated subscription's invoices. + """ + + +class SubscriptionScheduleModifyParamsDefaultSettingsAutomaticTax(TypedDict): + enabled: bool + """ + Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription. + """ + liability: NotRequired[ + "SubscriptionScheduleModifyParamsDefaultSettingsAutomaticTaxLiability" + ] + """ + The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + """ + + +class SubscriptionScheduleModifyParamsDefaultSettingsAutomaticTaxLiability( + TypedDict, +): + account: NotRequired[str] + """ + The connected account being referenced when `type` is `account`. + """ + type: Literal["account", "self"] + """ + Type of the account referenced in the request. + """ + + +class SubscriptionScheduleModifyParamsDefaultSettingsBillingThresholds( + TypedDict, +): + amount_gte: NotRequired[int] + """ + Monetary threshold that triggers the subscription to advance to a new billing period + """ + reset_billing_cycle_anchor: NotRequired[bool] + """ + Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. + """ + + +class SubscriptionScheduleModifyParamsDefaultSettingsInvoiceSettings( + TypedDict +): + account_tax_ids: NotRequired["Literal['']|List[str]"] + """ + The account tax IDs associated with the subscription schedule. Will be set on invoices generated by the subscription schedule. + """ + days_until_due: NotRequired[int] + """ + Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `collection_method=charge_automatically`. + """ + issuer: NotRequired[ + "SubscriptionScheduleModifyParamsDefaultSettingsInvoiceSettingsIssuer" + ] + """ + The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + """ + + +class SubscriptionScheduleModifyParamsDefaultSettingsInvoiceSettingsIssuer( + TypedDict, +): + account: NotRequired[str] + """ + The connected account being referenced when `type` is `account`. + """ + type: Literal["account", "self"] + """ + Type of the account referenced in the request. + """ + + +class SubscriptionScheduleModifyParamsDefaultSettingsTransferData(TypedDict): + amount_percent: NotRequired[float] + """ + A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. + """ + destination: str + """ + ID of an existing, connected Stripe account. + """ + + +class SubscriptionScheduleModifyParamsPhase(TypedDict): + add_invoice_items: NotRequired[ + List["SubscriptionScheduleModifyParamsPhaseAddInvoiceItem"] + ] + """ + A list of prices and quantities that will generate invoice items appended to the next invoice for this phase. You may pass up to 20 items. + """ + application_fee_percent: NotRequired[float] + """ + A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). + """ + automatic_tax: NotRequired[ + "SubscriptionScheduleModifyParamsPhaseAutomaticTax" + ] + """ + Automatic tax settings for this phase. + """ + billing_cycle_anchor: NotRequired[Literal["automatic", "phase_start"]] + """ + Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). + """ + billing_thresholds: NotRequired[ + "Literal['']|SubscriptionScheduleModifyParamsPhaseBillingThresholds" + ] + """ + Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. + """ + collection_method: NotRequired[ + Literal["charge_automatically", "send_invoice"] + ] + """ + Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically` on creation. + """ + currency: NotRequired[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). + """ + default_payment_method: NotRequired[str] + """ + ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings. + """ + default_tax_rates: NotRequired["Literal['']|List[str]"] + """ + A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will set the Subscription's [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates), which means they will be the Invoice's [`default_tax_rates`](https://stripe.com/docs/api/invoices/create#create_invoice-default_tax_rates) for any Invoices issued by the Subscription during this Phase. + """ + description: NotRequired["Literal['']|str"] + """ + Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. + """ + discounts: NotRequired[ + "Literal['']|List[SubscriptionScheduleModifyParamsPhaseDiscount]" + ] + """ + The coupons to redeem into discounts for the schedule phase. If not specified, inherits the discount from the subscription's customer. Pass an empty string to avoid inheriting any discounts. + """ + duration: NotRequired["SubscriptionScheduleModifyParamsPhaseDuration"] + """ + The number of intervals the phase should last. If set, `end_date` must not be set. + """ + end_date: NotRequired["int|Literal['now']"] + """ + The date at which this phase of the subscription schedule ends. If set, `iterations` must not be set. + """ + invoice_settings: NotRequired[ + "SubscriptionScheduleModifyParamsPhaseInvoiceSettings" + ] + """ + All invoices will be billed using the specified settings. + """ + items: List["SubscriptionScheduleModifyParamsPhaseItem"] + """ + List of configuration items, each with an attached price, to apply during this phase of the subscription schedule. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a phase. Metadata on a schedule's phase will update the underlying subscription's `metadata` when the phase is entered, adding new keys and replacing existing keys in the subscription's `metadata`. Individual keys in the subscription's `metadata` can be unset by posting an empty value to them in the phase's `metadata`. To unset all keys in the subscription's `metadata`, update the subscription directly or unset every key individually from the phase's `metadata`. + """ + on_behalf_of: NotRequired[str] + """ + The account on behalf of which to charge, for each of the associated subscription's invoices. + """ + pause_collection: NotRequired[ + "SubscriptionScheduleModifyParamsPhasePauseCollection" + ] + """ + If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment). + """ + proration_behavior: NotRequired[ + Literal["always_invoice", "create_prorations", "none"] + ] + """ + Controls whether the subscription schedule should create [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when transitioning to this phase if there is a difference in billing configuration. It's different from the request-level [proration_behavior](https://stripe.com/docs/api/subscription_schedules/update#update_subscription_schedule-proration_behavior) parameter which controls what happens if the update request affects the billing configuration (item price, quantity, etc.) of the current phase. + """ + start_date: NotRequired["int|Literal['now']"] + """ + The date at which this phase of the subscription schedule starts or `now`. Must be set on the first phase. + """ + transfer_data: NotRequired[ + "SubscriptionScheduleModifyParamsPhaseTransferData" + ] + """ + The data with which to automatically create a Transfer for each of the associated subscription's invoices. + """ + trial: NotRequired[bool] + """ + If set to true the entire phase is counted as a trial and the customer will not be charged for any fees. + """ + trial_continuation: NotRequired[Literal["continue", "none"]] + """ + Specify trial behavior when crossing phase boundaries + """ + trial_end: NotRequired["int|Literal['now']"] + """ + Sets the phase to trialing from the start date to this date. Must be before the phase end date, can not be combined with `trial` + """ + trial_settings: NotRequired[ + "SubscriptionScheduleModifyParamsPhaseTrialSettings" + ] + """ + Settings related to subscription trials. + """ + + +class SubscriptionScheduleModifyParamsPhaseAddInvoiceItem(TypedDict): + discounts: NotRequired[ + List["SubscriptionScheduleModifyParamsPhaseAddInvoiceItemDiscount"] + ] + """ + The coupons to redeem into discounts for the item. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + period: NotRequired[ + "SubscriptionScheduleModifyParamsPhaseAddInvoiceItemPeriod" + ] + """ + The period associated with this invoice item. If not set, `period.start.type` defaults to `max_item_period_start` and `period.end.type` defaults to `min_item_period_end`. + """ + price: NotRequired[str] + """ + The ID of the price object. One of `price` or `price_data` is required. + """ + price_data: NotRequired[ + "SubscriptionScheduleModifyParamsPhaseAddInvoiceItemPriceData" + ] + """ + Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. + """ + quantity: NotRequired[int] + """ + Quantity for this item. Defaults to 1. + """ + tax_rates: NotRequired["Literal['']|List[str]"] + """ + The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item. + """ + + +class SubscriptionScheduleModifyParamsPhaseAddInvoiceItemDiscount(TypedDict): + coupon: NotRequired[str] + """ + ID of the coupon to create a new discount for. + """ + discount: NotRequired[str] + """ + ID of an existing discount on the object (or one of its ancestors) to reuse. + """ + discount_end: NotRequired[ + "SubscriptionScheduleModifyParamsPhaseAddInvoiceItemDiscountDiscountEnd" + ] + """ + Details to determine how long the discount should be applied for. + """ + promotion_code: NotRequired[str] + """ + ID of the promotion code to create a new discount for. + """ + + +class SubscriptionScheduleModifyParamsPhaseAddInvoiceItemDiscountDiscountEnd( + TypedDict, +): + duration: NotRequired[ + "SubscriptionScheduleModifyParamsPhaseAddInvoiceItemDiscountDiscountEndDuration" + ] + """ + Time span for the redeemed discount. + """ + timestamp: NotRequired[int] + """ + A precise Unix timestamp for the discount to end. Must be in the future. + """ + type: Literal["duration", "timestamp"] + """ + The type of calculation made to determine when the discount ends. + """ + + +class SubscriptionScheduleModifyParamsPhaseAddInvoiceItemDiscountDiscountEndDuration( + TypedDict, +): + interval: Literal["day", "month", "week", "year"] + """ + Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + """ + interval_count: int + """ + The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + """ + + +class SubscriptionScheduleModifyParamsPhaseAddInvoiceItemPeriod(TypedDict): + end: "SubscriptionScheduleModifyParamsPhaseAddInvoiceItemPeriodEnd" + """ + End of the invoice item period. + """ + start: "SubscriptionScheduleModifyParamsPhaseAddInvoiceItemPeriodStart" + """ + Start of the invoice item period. + """ + + +class SubscriptionScheduleModifyParamsPhaseAddInvoiceItemPeriodEnd(TypedDict): + timestamp: NotRequired[int] + """ + A precise Unix timestamp for the end of the invoice item period. Must be greater than or equal to `period.start`. + """ + type: Literal["min_item_period_end", "phase_end", "timestamp"] + """ + Select how to calculate the end of the invoice item period. + """ + + +class SubscriptionScheduleModifyParamsPhaseAddInvoiceItemPeriodStart( + TypedDict +): + timestamp: NotRequired[int] + """ + A precise Unix timestamp for the start of the invoice item period. Must be less than or equal to `period.end`. + """ + type: Literal["max_item_period_start", "phase_start", "timestamp"] + """ + Select how to calculate the start of the invoice item period. + """ + + +class SubscriptionScheduleModifyParamsPhaseAddInvoiceItemPriceData(TypedDict): + 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). + """ + product: str + """ + The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to. + """ + tax_behavior: NotRequired[Literal["exclusive", "inclusive", "unspecified"]] + """ + Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + """ + unit_amount: NotRequired[int] + """ + A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge or a negative integer representing the amount to credit to the customer. + """ + unit_amount_decimal: NotRequired[str] + """ + Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + """ + + +class SubscriptionScheduleModifyParamsPhaseAutomaticTax(TypedDict): + enabled: bool + """ + Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription. + """ + liability: NotRequired[ + "SubscriptionScheduleModifyParamsPhaseAutomaticTaxLiability" + ] + """ + The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + """ + + +class SubscriptionScheduleModifyParamsPhaseAutomaticTaxLiability(TypedDict): + account: NotRequired[str] + """ + The connected account being referenced when `type` is `account`. + """ + type: Literal["account", "self"] + """ + Type of the account referenced in the request. + """ + + +class SubscriptionScheduleModifyParamsPhaseBillingThresholds(TypedDict): + amount_gte: NotRequired[int] + """ + Monetary threshold that triggers the subscription to advance to a new billing period + """ + reset_billing_cycle_anchor: NotRequired[bool] + """ + Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. + """ + + +class SubscriptionScheduleModifyParamsPhaseDiscount(TypedDict): + coupon: NotRequired[str] + """ + ID of the coupon to create a new discount for. + """ + discount: NotRequired[str] + """ + ID of an existing discount on the object (or one of its ancestors) to reuse. + """ + discount_end: NotRequired[ + "SubscriptionScheduleModifyParamsPhaseDiscountDiscountEnd" + ] + """ + Details to determine how long the discount should be applied for. + """ + promotion_code: NotRequired[str] + """ + ID of the promotion code to create a new discount for. + """ + + +class SubscriptionScheduleModifyParamsPhaseDiscountDiscountEnd(TypedDict): + duration: NotRequired[ + "SubscriptionScheduleModifyParamsPhaseDiscountDiscountEndDuration" + ] + """ + Time span for the redeemed discount. + """ + timestamp: NotRequired[int] + """ + A precise Unix timestamp for the discount to end. Must be in the future. + """ + type: Literal["duration", "timestamp"] + """ + The type of calculation made to determine when the discount ends. + """ + + +class SubscriptionScheduleModifyParamsPhaseDiscountDiscountEndDuration( + TypedDict, +): + interval: Literal["day", "month", "week", "year"] + """ + Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + """ + interval_count: int + """ + The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + """ + + +class SubscriptionScheduleModifyParamsPhaseDuration(TypedDict): + interval: Literal["day", "month", "week", "year"] + """ + Specifies phase duration. Either `day`, `week`, `month` or `year`. + """ + interval_count: NotRequired[int] + """ + The multiplier applied to the interval. + """ + + +class SubscriptionScheduleModifyParamsPhaseInvoiceSettings(TypedDict): + account_tax_ids: NotRequired["Literal['']|List[str]"] + """ + The account tax IDs associated with this phase of the subscription schedule. Will be set on invoices generated by this phase of the subscription schedule. + """ + days_until_due: NotRequired[int] + """ + Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `billing=charge_automatically`. + """ + issuer: NotRequired[ + "SubscriptionScheduleModifyParamsPhaseInvoiceSettingsIssuer" + ] + """ + The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + """ + + +class SubscriptionScheduleModifyParamsPhaseInvoiceSettingsIssuer(TypedDict): + account: NotRequired[str] + """ + The connected account being referenced when `type` is `account`. + """ + type: Literal["account", "self"] + """ + Type of the account referenced in the request. + """ + + +class SubscriptionScheduleModifyParamsPhaseItem(TypedDict): + billing_thresholds: NotRequired[ + "Literal['']|SubscriptionScheduleModifyParamsPhaseItemBillingThresholds" + ] + """ + Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. + """ + discounts: NotRequired[ + "Literal['']|List[SubscriptionScheduleModifyParamsPhaseItemDiscount]" + ] + """ + The coupons to redeem into discounts for the subscription item. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a configuration item. Metadata on a configuration item will update the underlying subscription item's `metadata` when the phase is entered, adding new keys and replacing existing keys. Individual keys in the subscription item's `metadata` can be unset by posting an empty value to them in the configuration item's `metadata`. To unset all keys in the subscription item's `metadata`, update the subscription item directly or unset every key individually from the configuration item's `metadata`. + """ + plan: NotRequired[str] + """ + The plan ID to subscribe to. You may specify the same ID in `plan` and `price`. + """ + price: NotRequired[str] + """ + The ID of the price object. + """ + price_data: NotRequired[ + "SubscriptionScheduleModifyParamsPhaseItemPriceData" + ] + """ + Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + """ + quantity: NotRequired[int] + """ + Quantity for the given price. Can be set only if the price's `usage_type` is `licensed` and not `metered`. + """ + tax_rates: NotRequired["Literal['']|List[str]"] + """ + A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. + """ + trial: NotRequired["SubscriptionScheduleModifyParamsPhaseItemTrial"] + """ + Options that configure the trial on the subscription item. + """ + + +class SubscriptionScheduleModifyParamsPhaseItemBillingThresholds(TypedDict): + usage_gte: int + """ + Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)) + """ + + +class SubscriptionScheduleModifyParamsPhaseItemDiscount(TypedDict): + coupon: NotRequired[str] + """ + ID of the coupon to create a new discount for. + """ + discount: NotRequired[str] + """ + ID of an existing discount on the object (or one of its ancestors) to reuse. + """ + discount_end: NotRequired[ + "SubscriptionScheduleModifyParamsPhaseItemDiscountDiscountEnd" + ] + """ + Details to determine how long the discount should be applied for. + """ + promotion_code: NotRequired[str] + """ + ID of the promotion code to create a new discount for. + """ + + +class SubscriptionScheduleModifyParamsPhaseItemDiscountDiscountEnd(TypedDict): + duration: NotRequired[ + "SubscriptionScheduleModifyParamsPhaseItemDiscountDiscountEndDuration" + ] + """ + Time span for the redeemed discount. + """ + timestamp: NotRequired[int] + """ + A precise Unix timestamp for the discount to end. Must be in the future. + """ + type: Literal["duration", "timestamp"] + """ + The type of calculation made to determine when the discount ends. + """ + + +class SubscriptionScheduleModifyParamsPhaseItemDiscountDiscountEndDuration( + TypedDict, +): + interval: Literal["day", "month", "week", "year"] + """ + Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + """ + interval_count: int + """ + The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + """ + + +class SubscriptionScheduleModifyParamsPhaseItemPriceData(TypedDict): + 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). + """ + product: str + """ + The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to. + """ + recurring: "SubscriptionScheduleModifyParamsPhaseItemPriceDataRecurring" + """ + The recurring components of a price such as `interval` and `interval_count`. + """ + tax_behavior: NotRequired[Literal["exclusive", "inclusive", "unspecified"]] + """ + Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + """ + unit_amount: NotRequired[int] + """ + A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + """ + unit_amount_decimal: NotRequired[str] + """ + Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + """ + + +class SubscriptionScheduleModifyParamsPhaseItemPriceDataRecurring(TypedDict): + interval: Literal["day", "month", "week", "year"] + """ + Specifies billing frequency. Either `day`, `week`, `month` or `year`. + """ + interval_count: NotRequired[int] + """ + The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). + """ + + +class SubscriptionScheduleModifyParamsPhaseItemTrial(TypedDict): + converts_to: NotRequired[List[str]] + """ + List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. + """ + type: Literal["free", "paid"] + """ + Determines the type of trial for this item. + """ + + +class SubscriptionScheduleModifyParamsPhasePauseCollection(TypedDict): + behavior: Literal["keep_as_draft", "mark_uncollectible", "void"] + """ + The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. + """ + + +class SubscriptionScheduleModifyParamsPhaseTransferData(TypedDict): + amount_percent: NotRequired[float] + """ + A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. + """ + destination: str + """ + ID of an existing, connected Stripe account. + """ + + +class SubscriptionScheduleModifyParamsPhaseTrialSettings(TypedDict): + end_behavior: NotRequired[ + "SubscriptionScheduleModifyParamsPhaseTrialSettingsEndBehavior" + ] + """ + Defines how the subscription should behave when a trial ends. + """ + + +class SubscriptionScheduleModifyParamsPhaseTrialSettingsEndBehavior(TypedDict): + prorate_up_front: NotRequired[Literal["defer", "include"]] + """ + Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`. + """ + + +class SubscriptionScheduleModifyParamsPrebilling(TypedDict): + iterations: int + """ + This is used to determine the number of billing cycles to prebill. + """ + update_behavior: NotRequired[Literal["prebill", "reset"]] + """ + Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`. + """ diff --git a/stripe/params/_subscription_schedule_release_params.py b/stripe/params/_subscription_schedule_release_params.py new file mode 100644 index 000000000..1c5e4aa98 --- /dev/null +++ b/stripe/params/_subscription_schedule_release_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 SubscriptionScheduleReleaseParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + preserve_cancel_date: NotRequired[bool] + """ + Keep any cancellation on the subscription that the schedule has set + """ diff --git a/stripe/params/_subscription_schedule_retrieve_params.py b/stripe/params/_subscription_schedule_retrieve_params.py new file mode 100644 index 000000000..8b7f12569 --- /dev/null +++ b/stripe/params/_subscription_schedule_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 SubscriptionScheduleRetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_subscription_schedule_update_params.py b/stripe/params/_subscription_schedule_update_params.py new file mode 100644 index 000000000..2cb948e36 --- /dev/null +++ b/stripe/params/_subscription_schedule_update_params.py @@ -0,0 +1,773 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class SubscriptionScheduleUpdateParams(TypedDict): + billing_behavior: NotRequired[ + Literal["prorate_on_next_phase", "prorate_up_front"] + ] + """ + Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front. + """ + default_settings: NotRequired[ + "SubscriptionScheduleUpdateParamsDefaultSettings" + ] + """ + Object representing the subscription schedule's default settings. + """ + end_behavior: NotRequired[Literal["cancel", "none", "release", "renew"]] + """ + Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running. `cancel` will end the subscription schedule and cancel the underlying subscription. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + phases: NotRequired[List["SubscriptionScheduleUpdateParamsPhase"]] + """ + List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase. Note that past phases can be omitted. + """ + prebilling: NotRequired["SubscriptionScheduleUpdateParamsPrebilling"] + """ + If specified, the invoicing for the given billing cycle iterations will be processed now. + """ + proration_behavior: NotRequired[ + Literal["always_invoice", "create_prorations", "none"] + ] + """ + If the update changes the billing configuration (item price, quantity, etc.) of the current phase, indicates how prorations from this change should be handled. The default value is `create_prorations`. + """ + + +class SubscriptionScheduleUpdateParamsDefaultSettings(TypedDict): + application_fee_percent: NotRequired[float] + """ + A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). + """ + automatic_tax: NotRequired[ + "SubscriptionScheduleUpdateParamsDefaultSettingsAutomaticTax" + ] + """ + Default settings for automatic tax computation. + """ + billing_cycle_anchor: NotRequired[Literal["automatic", "phase_start"]] + """ + Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). + """ + billing_thresholds: NotRequired[ + "Literal['']|SubscriptionScheduleUpdateParamsDefaultSettingsBillingThresholds" + ] + """ + Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. + """ + collection_method: NotRequired[ + Literal["charge_automatically", "send_invoice"] + ] + """ + Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically` on creation. + """ + default_payment_method: NotRequired[str] + """ + ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings. + """ + description: NotRequired["Literal['']|str"] + """ + Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. + """ + invoice_settings: NotRequired[ + "SubscriptionScheduleUpdateParamsDefaultSettingsInvoiceSettings" + ] + """ + All invoices will be billed using the specified settings. + """ + on_behalf_of: NotRequired["Literal['']|str"] + """ + The account on behalf of which to charge, for each of the associated subscription's invoices. + """ + transfer_data: NotRequired[ + "Literal['']|SubscriptionScheduleUpdateParamsDefaultSettingsTransferData" + ] + """ + The data with which to automatically create a Transfer for each of the associated subscription's invoices. + """ + + +class SubscriptionScheduleUpdateParamsDefaultSettingsAutomaticTax(TypedDict): + enabled: bool + """ + Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription. + """ + liability: NotRequired[ + "SubscriptionScheduleUpdateParamsDefaultSettingsAutomaticTaxLiability" + ] + """ + The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + """ + + +class SubscriptionScheduleUpdateParamsDefaultSettingsAutomaticTaxLiability( + TypedDict, +): + account: NotRequired[str] + """ + The connected account being referenced when `type` is `account`. + """ + type: Literal["account", "self"] + """ + Type of the account referenced in the request. + """ + + +class SubscriptionScheduleUpdateParamsDefaultSettingsBillingThresholds( + TypedDict, +): + amount_gte: NotRequired[int] + """ + Monetary threshold that triggers the subscription to advance to a new billing period + """ + reset_billing_cycle_anchor: NotRequired[bool] + """ + Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. + """ + + +class SubscriptionScheduleUpdateParamsDefaultSettingsInvoiceSettings( + TypedDict +): + account_tax_ids: NotRequired["Literal['']|List[str]"] + """ + The account tax IDs associated with the subscription schedule. Will be set on invoices generated by the subscription schedule. + """ + days_until_due: NotRequired[int] + """ + Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `collection_method=charge_automatically`. + """ + issuer: NotRequired[ + "SubscriptionScheduleUpdateParamsDefaultSettingsInvoiceSettingsIssuer" + ] + """ + The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + """ + + +class SubscriptionScheduleUpdateParamsDefaultSettingsInvoiceSettingsIssuer( + TypedDict, +): + account: NotRequired[str] + """ + The connected account being referenced when `type` is `account`. + """ + type: Literal["account", "self"] + """ + Type of the account referenced in the request. + """ + + +class SubscriptionScheduleUpdateParamsDefaultSettingsTransferData(TypedDict): + amount_percent: NotRequired[float] + """ + A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. + """ + destination: str + """ + ID of an existing, connected Stripe account. + """ + + +class SubscriptionScheduleUpdateParamsPhase(TypedDict): + add_invoice_items: NotRequired[ + List["SubscriptionScheduleUpdateParamsPhaseAddInvoiceItem"] + ] + """ + A list of prices and quantities that will generate invoice items appended to the next invoice for this phase. You may pass up to 20 items. + """ + application_fee_percent: NotRequired[float] + """ + A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). + """ + automatic_tax: NotRequired[ + "SubscriptionScheduleUpdateParamsPhaseAutomaticTax" + ] + """ + Automatic tax settings for this phase. + """ + billing_cycle_anchor: NotRequired[Literal["automatic", "phase_start"]] + """ + Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). + """ + billing_thresholds: NotRequired[ + "Literal['']|SubscriptionScheduleUpdateParamsPhaseBillingThresholds" + ] + """ + Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. + """ + collection_method: NotRequired[ + Literal["charge_automatically", "send_invoice"] + ] + """ + Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically` on creation. + """ + currency: NotRequired[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). + """ + default_payment_method: NotRequired[str] + """ + ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings. + """ + default_tax_rates: NotRequired["Literal['']|List[str]"] + """ + A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will set the Subscription's [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates), which means they will be the Invoice's [`default_tax_rates`](https://stripe.com/docs/api/invoices/create#create_invoice-default_tax_rates) for any Invoices issued by the Subscription during this Phase. + """ + description: NotRequired["Literal['']|str"] + """ + Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. + """ + discounts: NotRequired[ + "Literal['']|List[SubscriptionScheduleUpdateParamsPhaseDiscount]" + ] + """ + The coupons to redeem into discounts for the schedule phase. If not specified, inherits the discount from the subscription's customer. Pass an empty string to avoid inheriting any discounts. + """ + duration: NotRequired["SubscriptionScheduleUpdateParamsPhaseDuration"] + """ + The number of intervals the phase should last. If set, `end_date` must not be set. + """ + end_date: NotRequired["int|Literal['now']"] + """ + The date at which this phase of the subscription schedule ends. If set, `iterations` must not be set. + """ + invoice_settings: NotRequired[ + "SubscriptionScheduleUpdateParamsPhaseInvoiceSettings" + ] + """ + All invoices will be billed using the specified settings. + """ + items: List["SubscriptionScheduleUpdateParamsPhaseItem"] + """ + List of configuration items, each with an attached price, to apply during this phase of the subscription schedule. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a phase. Metadata on a schedule's phase will update the underlying subscription's `metadata` when the phase is entered, adding new keys and replacing existing keys in the subscription's `metadata`. Individual keys in the subscription's `metadata` can be unset by posting an empty value to them in the phase's `metadata`. To unset all keys in the subscription's `metadata`, update the subscription directly or unset every key individually from the phase's `metadata`. + """ + on_behalf_of: NotRequired[str] + """ + The account on behalf of which to charge, for each of the associated subscription's invoices. + """ + pause_collection: NotRequired[ + "SubscriptionScheduleUpdateParamsPhasePauseCollection" + ] + """ + If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment). + """ + proration_behavior: NotRequired[ + Literal["always_invoice", "create_prorations", "none"] + ] + """ + Controls whether the subscription schedule should create [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when transitioning to this phase if there is a difference in billing configuration. It's different from the request-level [proration_behavior](https://stripe.com/docs/api/subscription_schedules/update#update_subscription_schedule-proration_behavior) parameter which controls what happens if the update request affects the billing configuration (item price, quantity, etc.) of the current phase. + """ + start_date: NotRequired["int|Literal['now']"] + """ + The date at which this phase of the subscription schedule starts or `now`. Must be set on the first phase. + """ + transfer_data: NotRequired[ + "SubscriptionScheduleUpdateParamsPhaseTransferData" + ] + """ + The data with which to automatically create a Transfer for each of the associated subscription's invoices. + """ + trial: NotRequired[bool] + """ + If set to true the entire phase is counted as a trial and the customer will not be charged for any fees. + """ + trial_continuation: NotRequired[Literal["continue", "none"]] + """ + Specify trial behavior when crossing phase boundaries + """ + trial_end: NotRequired["int|Literal['now']"] + """ + Sets the phase to trialing from the start date to this date. Must be before the phase end date, can not be combined with `trial` + """ + trial_settings: NotRequired[ + "SubscriptionScheduleUpdateParamsPhaseTrialSettings" + ] + """ + Settings related to subscription trials. + """ + + +class SubscriptionScheduleUpdateParamsPhaseAddInvoiceItem(TypedDict): + discounts: NotRequired[ + List["SubscriptionScheduleUpdateParamsPhaseAddInvoiceItemDiscount"] + ] + """ + The coupons to redeem into discounts for the item. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + period: NotRequired[ + "SubscriptionScheduleUpdateParamsPhaseAddInvoiceItemPeriod" + ] + """ + The period associated with this invoice item. If not set, `period.start.type` defaults to `max_item_period_start` and `period.end.type` defaults to `min_item_period_end`. + """ + price: NotRequired[str] + """ + The ID of the price object. One of `price` or `price_data` is required. + """ + price_data: NotRequired[ + "SubscriptionScheduleUpdateParamsPhaseAddInvoiceItemPriceData" + ] + """ + Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. + """ + quantity: NotRequired[int] + """ + Quantity for this item. Defaults to 1. + """ + tax_rates: NotRequired["Literal['']|List[str]"] + """ + The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item. + """ + + +class SubscriptionScheduleUpdateParamsPhaseAddInvoiceItemDiscount(TypedDict): + coupon: NotRequired[str] + """ + ID of the coupon to create a new discount for. + """ + discount: NotRequired[str] + """ + ID of an existing discount on the object (or one of its ancestors) to reuse. + """ + discount_end: NotRequired[ + "SubscriptionScheduleUpdateParamsPhaseAddInvoiceItemDiscountDiscountEnd" + ] + """ + Details to determine how long the discount should be applied for. + """ + promotion_code: NotRequired[str] + """ + ID of the promotion code to create a new discount for. + """ + + +class SubscriptionScheduleUpdateParamsPhaseAddInvoiceItemDiscountDiscountEnd( + TypedDict, +): + duration: NotRequired[ + "SubscriptionScheduleUpdateParamsPhaseAddInvoiceItemDiscountDiscountEndDuration" + ] + """ + Time span for the redeemed discount. + """ + timestamp: NotRequired[int] + """ + A precise Unix timestamp for the discount to end. Must be in the future. + """ + type: Literal["duration", "timestamp"] + """ + The type of calculation made to determine when the discount ends. + """ + + +class SubscriptionScheduleUpdateParamsPhaseAddInvoiceItemDiscountDiscountEndDuration( + TypedDict, +): + interval: Literal["day", "month", "week", "year"] + """ + Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + """ + interval_count: int + """ + The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + """ + + +class SubscriptionScheduleUpdateParamsPhaseAddInvoiceItemPeriod(TypedDict): + end: "SubscriptionScheduleUpdateParamsPhaseAddInvoiceItemPeriodEnd" + """ + End of the invoice item period. + """ + start: "SubscriptionScheduleUpdateParamsPhaseAddInvoiceItemPeriodStart" + """ + Start of the invoice item period. + """ + + +class SubscriptionScheduleUpdateParamsPhaseAddInvoiceItemPeriodEnd(TypedDict): + timestamp: NotRequired[int] + """ + A precise Unix timestamp for the end of the invoice item period. Must be greater than or equal to `period.start`. + """ + type: Literal["min_item_period_end", "phase_end", "timestamp"] + """ + Select how to calculate the end of the invoice item period. + """ + + +class SubscriptionScheduleUpdateParamsPhaseAddInvoiceItemPeriodStart( + TypedDict +): + timestamp: NotRequired[int] + """ + A precise Unix timestamp for the start of the invoice item period. Must be less than or equal to `period.end`. + """ + type: Literal["max_item_period_start", "phase_start", "timestamp"] + """ + Select how to calculate the start of the invoice item period. + """ + + +class SubscriptionScheduleUpdateParamsPhaseAddInvoiceItemPriceData(TypedDict): + 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). + """ + product: str + """ + The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to. + """ + tax_behavior: NotRequired[Literal["exclusive", "inclusive", "unspecified"]] + """ + Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + """ + unit_amount: NotRequired[int] + """ + A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge or a negative integer representing the amount to credit to the customer. + """ + unit_amount_decimal: NotRequired[str] + """ + Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + """ + + +class SubscriptionScheduleUpdateParamsPhaseAutomaticTax(TypedDict): + enabled: bool + """ + Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription. + """ + liability: NotRequired[ + "SubscriptionScheduleUpdateParamsPhaseAutomaticTaxLiability" + ] + """ + The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + """ + + +class SubscriptionScheduleUpdateParamsPhaseAutomaticTaxLiability(TypedDict): + account: NotRequired[str] + """ + The connected account being referenced when `type` is `account`. + """ + type: Literal["account", "self"] + """ + Type of the account referenced in the request. + """ + + +class SubscriptionScheduleUpdateParamsPhaseBillingThresholds(TypedDict): + amount_gte: NotRequired[int] + """ + Monetary threshold that triggers the subscription to advance to a new billing period + """ + reset_billing_cycle_anchor: NotRequired[bool] + """ + Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. + """ + + +class SubscriptionScheduleUpdateParamsPhaseDiscount(TypedDict): + coupon: NotRequired[str] + """ + ID of the coupon to create a new discount for. + """ + discount: NotRequired[str] + """ + ID of an existing discount on the object (or one of its ancestors) to reuse. + """ + discount_end: NotRequired[ + "SubscriptionScheduleUpdateParamsPhaseDiscountDiscountEnd" + ] + """ + Details to determine how long the discount should be applied for. + """ + promotion_code: NotRequired[str] + """ + ID of the promotion code to create a new discount for. + """ + + +class SubscriptionScheduleUpdateParamsPhaseDiscountDiscountEnd(TypedDict): + duration: NotRequired[ + "SubscriptionScheduleUpdateParamsPhaseDiscountDiscountEndDuration" + ] + """ + Time span for the redeemed discount. + """ + timestamp: NotRequired[int] + """ + A precise Unix timestamp for the discount to end. Must be in the future. + """ + type: Literal["duration", "timestamp"] + """ + The type of calculation made to determine when the discount ends. + """ + + +class SubscriptionScheduleUpdateParamsPhaseDiscountDiscountEndDuration( + TypedDict, +): + interval: Literal["day", "month", "week", "year"] + """ + Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + """ + interval_count: int + """ + The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + """ + + +class SubscriptionScheduleUpdateParamsPhaseDuration(TypedDict): + interval: Literal["day", "month", "week", "year"] + """ + Specifies phase duration. Either `day`, `week`, `month` or `year`. + """ + interval_count: NotRequired[int] + """ + The multiplier applied to the interval. + """ + + +class SubscriptionScheduleUpdateParamsPhaseInvoiceSettings(TypedDict): + account_tax_ids: NotRequired["Literal['']|List[str]"] + """ + The account tax IDs associated with this phase of the subscription schedule. Will be set on invoices generated by this phase of the subscription schedule. + """ + days_until_due: NotRequired[int] + """ + Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `billing=charge_automatically`. + """ + issuer: NotRequired[ + "SubscriptionScheduleUpdateParamsPhaseInvoiceSettingsIssuer" + ] + """ + The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + """ + + +class SubscriptionScheduleUpdateParamsPhaseInvoiceSettingsIssuer(TypedDict): + account: NotRequired[str] + """ + The connected account being referenced when `type` is `account`. + """ + type: Literal["account", "self"] + """ + Type of the account referenced in the request. + """ + + +class SubscriptionScheduleUpdateParamsPhaseItem(TypedDict): + billing_thresholds: NotRequired[ + "Literal['']|SubscriptionScheduleUpdateParamsPhaseItemBillingThresholds" + ] + """ + Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. + """ + discounts: NotRequired[ + "Literal['']|List[SubscriptionScheduleUpdateParamsPhaseItemDiscount]" + ] + """ + The coupons to redeem into discounts for the subscription item. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a configuration item. Metadata on a configuration item will update the underlying subscription item's `metadata` when the phase is entered, adding new keys and replacing existing keys. Individual keys in the subscription item's `metadata` can be unset by posting an empty value to them in the configuration item's `metadata`. To unset all keys in the subscription item's `metadata`, update the subscription item directly or unset every key individually from the configuration item's `metadata`. + """ + plan: NotRequired[str] + """ + The plan ID to subscribe to. You may specify the same ID in `plan` and `price`. + """ + price: NotRequired[str] + """ + The ID of the price object. + """ + price_data: NotRequired[ + "SubscriptionScheduleUpdateParamsPhaseItemPriceData" + ] + """ + Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + """ + quantity: NotRequired[int] + """ + Quantity for the given price. Can be set only if the price's `usage_type` is `licensed` and not `metered`. + """ + tax_rates: NotRequired["Literal['']|List[str]"] + """ + A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. + """ + trial: NotRequired["SubscriptionScheduleUpdateParamsPhaseItemTrial"] + """ + Options that configure the trial on the subscription item. + """ + + +class SubscriptionScheduleUpdateParamsPhaseItemBillingThresholds(TypedDict): + usage_gte: int + """ + Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)) + """ + + +class SubscriptionScheduleUpdateParamsPhaseItemDiscount(TypedDict): + coupon: NotRequired[str] + """ + ID of the coupon to create a new discount for. + """ + discount: NotRequired[str] + """ + ID of an existing discount on the object (or one of its ancestors) to reuse. + """ + discount_end: NotRequired[ + "SubscriptionScheduleUpdateParamsPhaseItemDiscountDiscountEnd" + ] + """ + Details to determine how long the discount should be applied for. + """ + promotion_code: NotRequired[str] + """ + ID of the promotion code to create a new discount for. + """ + + +class SubscriptionScheduleUpdateParamsPhaseItemDiscountDiscountEnd(TypedDict): + duration: NotRequired[ + "SubscriptionScheduleUpdateParamsPhaseItemDiscountDiscountEndDuration" + ] + """ + Time span for the redeemed discount. + """ + timestamp: NotRequired[int] + """ + A precise Unix timestamp for the discount to end. Must be in the future. + """ + type: Literal["duration", "timestamp"] + """ + The type of calculation made to determine when the discount ends. + """ + + +class SubscriptionScheduleUpdateParamsPhaseItemDiscountDiscountEndDuration( + TypedDict, +): + interval: Literal["day", "month", "week", "year"] + """ + Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + """ + interval_count: int + """ + The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + """ + + +class SubscriptionScheduleUpdateParamsPhaseItemPriceData(TypedDict): + 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). + """ + product: str + """ + The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to. + """ + recurring: "SubscriptionScheduleUpdateParamsPhaseItemPriceDataRecurring" + """ + The recurring components of a price such as `interval` and `interval_count`. + """ + tax_behavior: NotRequired[Literal["exclusive", "inclusive", "unspecified"]] + """ + Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + """ + unit_amount: NotRequired[int] + """ + A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + """ + unit_amount_decimal: NotRequired[str] + """ + Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + """ + + +class SubscriptionScheduleUpdateParamsPhaseItemPriceDataRecurring(TypedDict): + interval: Literal["day", "month", "week", "year"] + """ + Specifies billing frequency. Either `day`, `week`, `month` or `year`. + """ + interval_count: NotRequired[int] + """ + The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). + """ + + +class SubscriptionScheduleUpdateParamsPhaseItemTrial(TypedDict): + converts_to: NotRequired[List[str]] + """ + List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. + """ + type: Literal["free", "paid"] + """ + Determines the type of trial for this item. + """ + + +class SubscriptionScheduleUpdateParamsPhasePauseCollection(TypedDict): + behavior: Literal["keep_as_draft", "mark_uncollectible", "void"] + """ + The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. + """ + + +class SubscriptionScheduleUpdateParamsPhaseTransferData(TypedDict): + amount_percent: NotRequired[float] + """ + A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. + """ + destination: str + """ + ID of an existing, connected Stripe account. + """ + + +class SubscriptionScheduleUpdateParamsPhaseTrialSettings(TypedDict): + end_behavior: NotRequired[ + "SubscriptionScheduleUpdateParamsPhaseTrialSettingsEndBehavior" + ] + """ + Defines how the subscription should behave when a trial ends. + """ + + +class SubscriptionScheduleUpdateParamsPhaseTrialSettingsEndBehavior(TypedDict): + prorate_up_front: NotRequired[Literal["defer", "include"]] + """ + Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`. + """ + + +class SubscriptionScheduleUpdateParamsPrebilling(TypedDict): + iterations: int + """ + This is used to determine the number of billing cycles to prebill. + """ + update_behavior: NotRequired[Literal["prebill", "reset"]] + """ + Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`. + """ diff --git a/stripe/params/_subscription_search_params.py b/stripe/params/_subscription_search_params.py new file mode 100644 index 000000000..7930e586c --- /dev/null +++ b/stripe/params/_subscription_search_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 SubscriptionSearchParams(RequestOptions): + 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. + """ + page: NotRequired[str] + """ + A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + """ + query: str + """ + The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for subscriptions](https://stripe.com/docs/search#query-fields-for-subscriptions). + """ diff --git a/stripe/params/_subscription_update_params.py b/stripe/params/_subscription_update_params.py new file mode 100644 index 000000000..5a5b5c34e --- /dev/null +++ b/stripe/params/_subscription_update_params.py @@ -0,0 +1,1045 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class SubscriptionUpdateParams(TypedDict): + add_invoice_items: NotRequired[ + List["SubscriptionUpdateParamsAddInvoiceItem"] + ] + """ + A list of prices and quantities that will generate invoice items appended to the next invoice for this subscription. You may pass up to 20 items. + """ + application_fee_percent: NotRequired["Literal['']|float"] + """ + A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). + """ + automatic_tax: NotRequired["SubscriptionUpdateParamsAutomaticTax"] + """ + Automatic tax settings for this subscription. We recommend you only include this parameter when the existing value is being changed. + """ + billing_cadence: NotRequired[str] + """ + The Billing Cadence which controls the timing of recurring invoice generation for this subscription. If unset, the subscription will bill according to its own configured schedule and create its own invoices. If set, this subscription will be billed by the cadence instead, potentially sharing invoices with the other subscriptions linked to that Cadence. + """ + billing_cycle_anchor: NotRequired[Literal["now", "unchanged"]] + """ + Either `now` or `unchanged`. Setting the value to `now` resets the subscription's billing cycle anchor to the current time (in UTC). For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). + """ + billing_schedules: NotRequired[ + "Literal['']|List[SubscriptionUpdateParamsBillingSchedule]" + ] + """ + Sets the billing schedules for the subscription. + """ + billing_thresholds: NotRequired[ + "Literal['']|SubscriptionUpdateParamsBillingThresholds" + ] + """ + Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. + """ + cancel_at: NotRequired[ + "Literal['']|int|Literal['max_period_end', 'min_period_end']" + ] + """ + A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period. + """ + cancel_at_period_end: NotRequired[bool] + """ + Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. + """ + cancellation_details: NotRequired[ + "SubscriptionUpdateParamsCancellationDetails" + ] + """ + Details about why this subscription was cancelled + """ + collection_method: NotRequired[ + Literal["charge_automatically", "send_invoice"] + ] + """ + Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`. + """ + days_until_due: NotRequired[int] + """ + Number of days a customer has to pay invoices generated by this subscription. Valid only for subscriptions where `collection_method` is set to `send_invoice`. + """ + default_payment_method: NotRequired[str] + """ + ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over `default_source`. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). + """ + default_source: NotRequired["Literal['']|str"] + """ + ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If `default_payment_method` is also set, `default_payment_method` will take precedence. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). + """ + default_tax_rates: NotRequired["Literal['']|List[str]"] + """ + The tax rates that will apply to any subscription item that does not have `tax_rates` set. Invoices created will have their `default_tax_rates` populated from the subscription. Pass an empty string to remove previously-defined tax rates. + """ + description: NotRequired["Literal['']|str"] + """ + The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. + """ + discounts: NotRequired[ + "Literal['']|List[SubscriptionUpdateParamsDiscount]" + ] + """ + The coupons to redeem into discounts for the subscription. If not specified or empty, inherits the discount from the subscription's customer. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + invoice_settings: NotRequired["SubscriptionUpdateParamsInvoiceSettings"] + """ + All invoices will be billed using the specified settings. + """ + items: NotRequired[List["SubscriptionUpdateParamsItem"]] + """ + A list of up to 20 subscription items, each with an attached price. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + off_session: NotRequired[bool] + """ + Indicates if a customer is on or off-session while an invoice payment is attempted. Defaults to `false` (on-session). + """ + on_behalf_of: NotRequired["Literal['']|str"] + """ + The account on behalf of which to charge, for each of the subscription's invoices. + """ + pause_collection: NotRequired[ + "Literal['']|SubscriptionUpdateParamsPauseCollection" + ] + """ + If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment). + """ + payment_behavior: NotRequired[ + Literal[ + "allow_incomplete", + "default_incomplete", + "error_if_incomplete", + "pending_if_incomplete", + ] + ] + """ + Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior. + + Use `default_incomplete` to transition the subscription to `status=past_due` when payment is required and await explicit confirmation of the invoice's payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription's invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. + + Use `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes). + + Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://docs.stripe.com/changelog/2019-03-14) to learn more. + """ + payment_settings: NotRequired["SubscriptionUpdateParamsPaymentSettings"] + """ + Payment settings to pass to invoices created by the subscription. + """ + pending_invoice_item_interval: NotRequired[ + "Literal['']|SubscriptionUpdateParamsPendingInvoiceItemInterval" + ] + """ + Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval. + """ + prebilling: NotRequired["SubscriptionUpdateParamsPrebilling"] + """ + If specified, the invoicing for the given billing cycle iterations will be processed now. + """ + proration_behavior: NotRequired[ + Literal["always_invoice", "create_prorations", "none"] + ] + """ + Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`. + """ + proration_date: NotRequired[int] + """ + If set, prorations will be calculated as though the subscription was updated at the given time. This can be used to apply exactly the same prorations that were previewed with the [create preview](https://stripe.com/docs/api/invoices/create_preview) endpoint. `proration_date` can also be used to implement custom proration logic, such as prorating by day instead of by second, by providing the time that you wish to use for proration calculations. + """ + transfer_data: NotRequired[ + "Literal['']|SubscriptionUpdateParamsTransferData" + ] + """ + If specified, the funds from the subscription's invoices will be transferred to the destination and the ID of the resulting transfers will be found on the resulting charges. This will be unset if you POST an empty value. + """ + trial_end: NotRequired["Literal['now']|int"] + """ + Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. If set, `trial_end` will override the default trial period of the plan the customer is being subscribed to. The `billing_cycle_anchor` will be updated to the `trial_end` value. The special value `now` can be provided to end the customer's trial immediately. Can be at most two years from `billing_cycle_anchor`. + """ + trial_from_plan: NotRequired[bool] + """ + Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. + """ + trial_settings: NotRequired["SubscriptionUpdateParamsTrialSettings"] + """ + Settings related to subscription trials. + """ + + +class SubscriptionUpdateParamsAddInvoiceItem(TypedDict): + discounts: NotRequired[ + List["SubscriptionUpdateParamsAddInvoiceItemDiscount"] + ] + """ + The coupons to redeem into discounts for the item. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + period: NotRequired["SubscriptionUpdateParamsAddInvoiceItemPeriod"] + """ + The period associated with this invoice item. If not set, `period.start.type` defaults to `max_item_period_start` and `period.end.type` defaults to `min_item_period_end`. + """ + price: NotRequired[str] + """ + The ID of the price object. One of `price` or `price_data` is required. + """ + price_data: NotRequired["SubscriptionUpdateParamsAddInvoiceItemPriceData"] + """ + Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. + """ + quantity: NotRequired[int] + """ + Quantity for this item. Defaults to 1. + """ + tax_rates: NotRequired["Literal['']|List[str]"] + """ + The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item. + """ + + +class SubscriptionUpdateParamsAddInvoiceItemDiscount(TypedDict): + coupon: NotRequired[str] + """ + ID of the coupon to create a new discount for. + """ + discount: NotRequired[str] + """ + ID of an existing discount on the object (or one of its ancestors) to reuse. + """ + discount_end: NotRequired[ + "SubscriptionUpdateParamsAddInvoiceItemDiscountDiscountEnd" + ] + """ + Details to determine how long the discount should be applied for. + """ + promotion_code: NotRequired[str] + """ + ID of the promotion code to create a new discount for. + """ + + +class SubscriptionUpdateParamsAddInvoiceItemDiscountDiscountEnd(TypedDict): + duration: NotRequired[ + "SubscriptionUpdateParamsAddInvoiceItemDiscountDiscountEndDuration" + ] + """ + Time span for the redeemed discount. + """ + timestamp: NotRequired[int] + """ + A precise Unix timestamp for the discount to end. Must be in the future. + """ + type: Literal["duration", "timestamp"] + """ + The type of calculation made to determine when the discount ends. + """ + + +class SubscriptionUpdateParamsAddInvoiceItemDiscountDiscountEndDuration( + TypedDict, +): + interval: Literal["day", "month", "week", "year"] + """ + Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + """ + interval_count: int + """ + The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + """ + + +class SubscriptionUpdateParamsAddInvoiceItemPeriod(TypedDict): + end: "SubscriptionUpdateParamsAddInvoiceItemPeriodEnd" + """ + End of the invoice item period. + """ + start: "SubscriptionUpdateParamsAddInvoiceItemPeriodStart" + """ + Start of the invoice item period. + """ + + +class SubscriptionUpdateParamsAddInvoiceItemPeriodEnd(TypedDict): + timestamp: NotRequired[int] + """ + A precise Unix timestamp for the end of the invoice item period. Must be greater than or equal to `period.start`. + """ + type: Literal["min_item_period_end", "timestamp"] + """ + Select how to calculate the end of the invoice item period. + """ + + +class SubscriptionUpdateParamsAddInvoiceItemPeriodStart(TypedDict): + timestamp: NotRequired[int] + """ + A precise Unix timestamp for the start of the invoice item period. Must be less than or equal to `period.end`. + """ + type: Literal["max_item_period_start", "now", "timestamp"] + """ + Select how to calculate the start of the invoice item period. + """ + + +class SubscriptionUpdateParamsAddInvoiceItemPriceData(TypedDict): + 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). + """ + product: str + """ + The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to. + """ + tax_behavior: NotRequired[Literal["exclusive", "inclusive", "unspecified"]] + """ + Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + """ + unit_amount: NotRequired[int] + """ + A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge or a negative integer representing the amount to credit to the customer. + """ + unit_amount_decimal: NotRequired[str] + """ + Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + """ + + +class SubscriptionUpdateParamsAutomaticTax(TypedDict): + enabled: bool + """ + Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription. + """ + liability: NotRequired["SubscriptionUpdateParamsAutomaticTaxLiability"] + """ + The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + """ + + +class SubscriptionUpdateParamsAutomaticTaxLiability(TypedDict): + account: NotRequired[str] + """ + The connected account being referenced when `type` is `account`. + """ + type: Literal["account", "self"] + """ + Type of the account referenced in the request. + """ + + +class SubscriptionUpdateParamsBillingSchedule(TypedDict): + applies_to: NotRequired[ + List["SubscriptionUpdateParamsBillingScheduleAppliesTo"] + ] + """ + Configure billing schedule differently for individual subscription items. + """ + bill_until: NotRequired["SubscriptionUpdateParamsBillingScheduleBillUntil"] + """ + The end date for the billing schedule. + """ + key: NotRequired[str] + """ + Specify a key for the billing schedule. Must be unique to this field, alphanumeric, and up to 200 characters. If not provided, a unique key will be generated. + """ + + +class SubscriptionUpdateParamsBillingScheduleAppliesTo(TypedDict): + price: NotRequired[str] + """ + The ID of the price object. + """ + type: Literal["price"] + """ + Controls which subscription items the billing schedule applies to. + """ + + +class SubscriptionUpdateParamsBillingScheduleBillUntil(TypedDict): + duration: NotRequired[ + "SubscriptionUpdateParamsBillingScheduleBillUntilDuration" + ] + """ + Specifies the billing period. + """ + timestamp: NotRequired[int] + """ + The end date of the billing schedule. + """ + type: Literal["duration", "timestamp"] + """ + Describes how the billing schedule will determine the end date. Either `duration` or `timestamp`. + """ + + +class SubscriptionUpdateParamsBillingScheduleBillUntilDuration(TypedDict): + interval: Literal["day", "month", "week", "year"] + """ + Specifies billing duration. Either `day`, `week`, `month` or `year`. + """ + interval_count: NotRequired[int] + """ + The multiplier applied to the interval. + """ + + +class SubscriptionUpdateParamsBillingThresholds(TypedDict): + amount_gte: NotRequired[int] + """ + Monetary threshold that triggers the subscription to advance to a new billing period + """ + reset_billing_cycle_anchor: NotRequired[bool] + """ + Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. + """ + + +class SubscriptionUpdateParamsCancellationDetails(TypedDict): + comment: NotRequired["Literal['']|str"] + """ + Additional comments about why the user canceled the subscription, if the subscription was canceled explicitly by the user. + """ + feedback: NotRequired[ + "Literal['']|Literal['customer_service', 'low_quality', 'missing_features', 'other', 'switched_service', 'too_complex', 'too_expensive', 'unused']" + ] + """ + The customer submitted reason for why they canceled, if the subscription was canceled explicitly by the user. + """ + + +class SubscriptionUpdateParamsDiscount(TypedDict): + coupon: NotRequired[str] + """ + ID of the coupon to create a new discount for. + """ + discount: NotRequired[str] + """ + ID of an existing discount on the object (or one of its ancestors) to reuse. + """ + discount_end: NotRequired["SubscriptionUpdateParamsDiscountDiscountEnd"] + """ + Details to determine how long the discount should be applied for. + """ + promotion_code: NotRequired[str] + """ + ID of the promotion code to create a new discount for. + """ + + +class SubscriptionUpdateParamsDiscountDiscountEnd(TypedDict): + duration: NotRequired[ + "SubscriptionUpdateParamsDiscountDiscountEndDuration" + ] + """ + Time span for the redeemed discount. + """ + timestamp: NotRequired[int] + """ + A precise Unix timestamp for the discount to end. Must be in the future. + """ + type: Literal["duration", "timestamp"] + """ + The type of calculation made to determine when the discount ends. + """ + + +class SubscriptionUpdateParamsDiscountDiscountEndDuration(TypedDict): + interval: Literal["day", "month", "week", "year"] + """ + Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + """ + interval_count: int + """ + The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + """ + + +class SubscriptionUpdateParamsInvoiceSettings(TypedDict): + account_tax_ids: NotRequired["Literal['']|List[str]"] + """ + The account tax IDs associated with the subscription. Will be set on invoices generated by the subscription. + """ + issuer: NotRequired["SubscriptionUpdateParamsInvoiceSettingsIssuer"] + """ + The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + """ + + +class SubscriptionUpdateParamsInvoiceSettingsIssuer(TypedDict): + account: NotRequired[str] + """ + The connected account being referenced when `type` is `account`. + """ + type: Literal["account", "self"] + """ + Type of the account referenced in the request. + """ + + +class SubscriptionUpdateParamsItem(TypedDict): + billing_thresholds: NotRequired[ + "Literal['']|SubscriptionUpdateParamsItemBillingThresholds" + ] + """ + Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. + """ + clear_usage: NotRequired[bool] + """ + Delete all usage for a given subscription item. You must pass this when deleting a usage records subscription item. `clear_usage` has no effect if the plan has a billing meter attached. + """ + deleted: NotRequired[bool] + """ + A flag that, if set to `true`, will delete the specified item. + """ + discounts: NotRequired[ + "Literal['']|List[SubscriptionUpdateParamsItemDiscount]" + ] + """ + The coupons to redeem into discounts for the subscription item. + """ + id: NotRequired[str] + """ + Subscription item to update. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + plan: NotRequired[str] + """ + Plan ID for this item, as a string. + """ + price: NotRequired[str] + """ + The ID of the price object. One of `price` or `price_data` is required. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided. + """ + price_data: NotRequired["SubscriptionUpdateParamsItemPriceData"] + """ + Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. + """ + quantity: NotRequired[int] + """ + Quantity for this item. + """ + tax_rates: NotRequired["Literal['']|List[str]"] + """ + A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. + """ + + +class SubscriptionUpdateParamsItemBillingThresholds(TypedDict): + usage_gte: int + """ + Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)) + """ + + +class SubscriptionUpdateParamsItemDiscount(TypedDict): + coupon: NotRequired[str] + """ + ID of the coupon to create a new discount for. + """ + discount: NotRequired[str] + """ + ID of an existing discount on the object (or one of its ancestors) to reuse. + """ + discount_end: NotRequired[ + "SubscriptionUpdateParamsItemDiscountDiscountEnd" + ] + """ + Details to determine how long the discount should be applied for. + """ + promotion_code: NotRequired[str] + """ + ID of the promotion code to create a new discount for. + """ + + +class SubscriptionUpdateParamsItemDiscountDiscountEnd(TypedDict): + duration: NotRequired[ + "SubscriptionUpdateParamsItemDiscountDiscountEndDuration" + ] + """ + Time span for the redeemed discount. + """ + timestamp: NotRequired[int] + """ + A precise Unix timestamp for the discount to end. Must be in the future. + """ + type: Literal["duration", "timestamp"] + """ + The type of calculation made to determine when the discount ends. + """ + + +class SubscriptionUpdateParamsItemDiscountDiscountEndDuration(TypedDict): + interval: Literal["day", "month", "week", "year"] + """ + Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + """ + interval_count: int + """ + The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + """ + + +class SubscriptionUpdateParamsItemPriceData(TypedDict): + 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). + """ + product: str + """ + The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to. + """ + recurring: "SubscriptionUpdateParamsItemPriceDataRecurring" + """ + The recurring components of a price such as `interval` and `interval_count`. + """ + tax_behavior: NotRequired[Literal["exclusive", "inclusive", "unspecified"]] + """ + Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + """ + unit_amount: NotRequired[int] + """ + A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + """ + unit_amount_decimal: NotRequired[str] + """ + Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + """ + + +class SubscriptionUpdateParamsItemPriceDataRecurring(TypedDict): + interval: Literal["day", "month", "week", "year"] + """ + Specifies billing frequency. Either `day`, `week`, `month` or `year`. + """ + interval_count: NotRequired[int] + """ + The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). + """ + + +class SubscriptionUpdateParamsPauseCollection(TypedDict): + behavior: Literal["keep_as_draft", "mark_uncollectible", "void"] + """ + The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. + """ + resumes_at: NotRequired[int] + """ + The time after which the subscription will resume collecting payments. + """ + + +class SubscriptionUpdateParamsPaymentSettings(TypedDict): + payment_method_options: NotRequired[ + "SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptions" + ] + """ + Payment-method-specific configuration to provide to invoices created by the subscription. + """ + payment_method_types: NotRequired[ + "Literal['']|List[Literal['ach_credit_transfer', 'ach_debit', 'acss_debit', 'affirm', 'amazon_pay', 'au_becs_debit', 'bacs_debit', 'bancontact', 'boleto', 'card', 'cashapp', 'crypto', 'custom', 'customer_balance', 'eps', 'fpx', 'giropay', 'grabpay', 'id_bank_transfer', 'ideal', 'jp_credit_transfer', 'kakao_pay', 'klarna', 'konbini', 'kr_card', 'link', 'multibanco', 'naver_pay', 'nz_bank_account', 'p24', 'payco', 'paynow', 'paypal', 'pix', 'promptpay', 'revolut_pay', 'sepa_credit_transfer', 'sepa_debit', 'sofort', 'stripe_balance', 'swish', 'upi', 'us_bank_account', 'wechat_pay']]" + ] + """ + The list of payment method types (e.g. card) to provide to the invoice's PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice's default payment method, the subscription's default payment method, the customer's default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). Should not be specified with payment_method_configuration + """ + save_default_payment_method: NotRequired[Literal["off", "on_subscription"]] + """ + Configure whether Stripe updates `subscription.default_payment_method` when payment succeeds. Defaults to `off` if unspecified. + """ + + +class SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptions(TypedDict): + acss_debit: NotRequired[ + "Literal['']|SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsAcssDebit" + ] + """ + This sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice's PaymentIntent. + """ + bancontact: NotRequired[ + "Literal['']|SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsBancontact" + ] + """ + This sub-hash contains details about the Bancontact payment method options to pass to the invoice's PaymentIntent. + """ + card: NotRequired[ + "Literal['']|SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsCard" + ] + """ + This sub-hash contains details about the Card payment method options to pass to the invoice's PaymentIntent. + """ + customer_balance: NotRequired[ + "Literal['']|SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsCustomerBalance" + ] + """ + This sub-hash contains details about the Bank transfer payment method options to pass to the invoice's PaymentIntent. + """ + id_bank_transfer: NotRequired[ + "Literal['']|SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsIdBankTransfer" + ] + """ + This sub-hash contains details about the Indonesia bank transfer payment method options to pass to the invoice's PaymentIntent. + """ + konbini: NotRequired[ + "Literal['']|SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsKonbini" + ] + """ + This sub-hash contains details about the Konbini payment method options to pass to the invoice's PaymentIntent. + """ + pix: NotRequired[ + "Literal['']|SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsPix" + ] + """ + This sub-hash contains details about the Pix payment method options to pass to the invoice's PaymentIntent. + """ + sepa_debit: NotRequired[ + "Literal['']|SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsSepaDebit" + ] + """ + This sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice's PaymentIntent. + """ + upi: NotRequired[ + "Literal['']|SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsUpi" + ] + """ + This sub-hash contains details about the UPI payment method options to pass to the invoice's PaymentIntent. + """ + us_bank_account: NotRequired[ + "Literal['']|SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsUsBankAccount" + ] + """ + This sub-hash contains details about the ACH direct debit payment method options to pass to the invoice's PaymentIntent. + """ + + +class SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsAcssDebit( + TypedDict, +): + mandate_options: NotRequired[ + "SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions" + ] + """ + Additional fields for Mandate creation + """ + verification_method: NotRequired[ + Literal["automatic", "instant", "microdeposits"] + ] + """ + Verification method for the intent + """ + + +class SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsAcssDebitMandateOptions( + TypedDict, +): + transaction_type: NotRequired[Literal["business", "personal"]] + """ + Transaction type of the mandate. + """ + + +class SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsBancontact( + TypedDict, +): + preferred_language: NotRequired[Literal["de", "en", "fr", "nl"]] + """ + Preferred language of the Bancontact authorization page that the customer is redirected to. + """ + + +class SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsCard( + TypedDict, +): + mandate_options: NotRequired[ + "SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsCardMandateOptions" + ] + """ + Configuration options for setting up an eMandate for cards issued in India. + """ + network: NotRequired[ + Literal[ + "amex", + "cartes_bancaires", + "diners", + "discover", + "eftpos_au", + "girocard", + "interac", + "jcb", + "link", + "mastercard", + "unionpay", + "unknown", + "visa", + ] + ] + """ + Selected network to process this Subscription on. Depends on the available networks of the card attached to the Subscription. Can be only set confirm-time. + """ + request_three_d_secure: NotRequired[ + Literal["any", "automatic", "challenge"] + ] + """ + We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + """ + + +class SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsCardMandateOptions( + TypedDict, +): + amount: NotRequired[int] + """ + Amount to be charged for future payments. + """ + amount_type: NotRequired[Literal["fixed", "maximum"]] + """ + One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. + """ + description: NotRequired[str] + """ + A description of the mandate or subscription that is meant to be displayed to the customer. + """ + + +class SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsCustomerBalance( + TypedDict, +): + bank_transfer: NotRequired[ + "SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransfer" + ] + """ + Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. + """ + funding_type: NotRequired[str] + """ + The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. + """ + + +class SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransfer( + TypedDict, +): + eu_bank_transfer: NotRequired[ + "SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer" + ] + """ + Configuration for eu_bank_transfer funding type. + """ + type: NotRequired[str] + """ + The bank transfer type that can be used for funding. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. + """ + + +class SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer( + TypedDict, +): + country: str + """ + The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. + """ + + +class SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsIdBankTransfer( + TypedDict, +): + pass + + +class SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsKonbini( + TypedDict, +): + pass + + +class SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsPix( + TypedDict +): + mandate_options: NotRequired[ + "SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsPixMandateOptions" + ] + """ + Configuration options for setting up a mandate + """ + + +class SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsPixMandateOptions( + TypedDict, +): + amount: NotRequired[int] + """ + Amount to be charged for future payments. If not provided, defaults to 40000. + """ + amount_includes_iof: NotRequired[Literal["always", "never"]] + """ + Determines if the amount includes the IOF tax. Defaults to `never`. + """ + end_date: NotRequired[str] + """ + Date when the mandate expires and no further payments will be charged, in `YYYY-MM-DD`. If not provided, the mandate will be active until canceled. + """ + payment_schedule: NotRequired[ + Literal["halfyearly", "monthly", "quarterly", "weekly", "yearly"] + ] + """ + Schedule at which the future payments will be charged. Defaults to `weekly`. + """ + + +class SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsSepaDebit( + TypedDict, +): + pass + + +class SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsUpi( + TypedDict +): + mandate_options: NotRequired[ + "SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsUpiMandateOptions" + ] + """ + Configuration options for setting up an eMandate + """ + + +class SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsUpiMandateOptions( + TypedDict, +): + amount: NotRequired[int] + """ + Amount to be charged for future payments. + """ + amount_type: NotRequired[Literal["fixed", "maximum"]] + """ + One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. + """ + description: NotRequired[str] + """ + A description of the mandate or subscription that is meant to be displayed to the customer. + """ + end_date: NotRequired[int] + """ + End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. + """ + + +class SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsUsBankAccount( + TypedDict, +): + financial_connections: NotRequired[ + "SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections" + ] + """ + Additional fields for Financial Connections Session creation + """ + verification_method: NotRequired[ + Literal["automatic", "instant", "microdeposits"] + ] + """ + Verification method for the intent + """ + + +class SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnections( + TypedDict, +): + filters: NotRequired[ + "SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters" + ] + """ + Provide filters for the linked accounts that the customer can select for the payment method. + """ + permissions: NotRequired[ + List[ + Literal["balances", "ownership", "payment_method", "transactions"] + ] + ] + """ + The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. + """ + prefetch: NotRequired[ + List[ + Literal[ + "balances", "inferred_balances", "ownership", "transactions" + ] + ] + ] + """ + List of data features that you would like to retrieve upon account creation. + """ + + +class SubscriptionUpdateParamsPaymentSettingsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters( + TypedDict, +): + account_subcategories: NotRequired[List[Literal["checking", "savings"]]] + """ + The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`. + """ + institution: NotRequired[str] + """ + ID of the institution to use to filter for selectable accounts. + """ + + +class SubscriptionUpdateParamsPendingInvoiceItemInterval(TypedDict): + interval: Literal["day", "month", "week", "year"] + """ + Specifies invoicing frequency. Either `day`, `week`, `month` or `year`. + """ + interval_count: NotRequired[int] + """ + The number of intervals between invoices. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). + """ + + +class SubscriptionUpdateParamsPrebilling(TypedDict): + iterations: int + """ + This is used to determine the number of billing cycles to prebill. + """ + update_behavior: NotRequired[Literal["prebill", "reset"]] + """ + Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`. + """ + + +class SubscriptionUpdateParamsTransferData(TypedDict): + amount_percent: NotRequired[float] + """ + A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. + """ + destination: str + """ + ID of an existing, connected Stripe account. + """ + + +class SubscriptionUpdateParamsTrialSettings(TypedDict): + end_behavior: "SubscriptionUpdateParamsTrialSettingsEndBehavior" + """ + Defines how the subscription should behave when the user's free trial ends. + """ + + +class SubscriptionUpdateParamsTrialSettingsEndBehavior(TypedDict): + missing_payment_method: Literal["cancel", "create_invoice", "pause"] + """ + Indicates how the subscription should change when the trial ends if the user did not provide a payment method. + """ diff --git a/stripe/params/_tax_code_list_params.py b/stripe/params/_tax_code_list_params.py new file mode 100644 index 000000000..931bee2bc --- /dev/null +++ b/stripe/params/_tax_code_list_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 TaxCodeListParams(RequestOptions): + 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. + """ diff --git a/stripe/params/_tax_code_retrieve_params.py b/stripe/params/_tax_code_retrieve_params.py new file mode 100644 index 000000000..df4670f94 --- /dev/null +++ b/stripe/params/_tax_code_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 TaxCodeRetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_tax_id_create_params.py b/stripe/params/_tax_id_create_params.py new file mode 100644 index 000000000..33d30f48c --- /dev/null +++ b/stripe/params/_tax_id_create_params.py @@ -0,0 +1,154 @@ +# -*- 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, TypedDict + + +class TaxIdCreateParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + owner: NotRequired["TaxIdCreateParamsOwner"] + """ + The account or customer the tax ID belongs to. Defaults to `owner[type]=self`. + """ + type: Literal[ + "ad_nrt", + "ae_trn", + "al_tin", + "am_tin", + "ao_tin", + "ar_cuit", + "au_abn", + "au_arn", + "aw_tin", + "az_tin", + "ba_tin", + "bb_tin", + "bd_bin", + "bf_ifu", + "bg_uic", + "bh_vat", + "bj_ifu", + "bo_tin", + "br_cnpj", + "br_cpf", + "bs_tin", + "by_tin", + "ca_bn", + "ca_gst_hst", + "ca_pst_bc", + "ca_pst_mb", + "ca_pst_sk", + "ca_qst", + "cd_nif", + "ch_uid", + "ch_vat", + "cl_tin", + "cm_niu", + "cn_tin", + "co_nit", + "cr_tin", + "cv_nif", + "de_stn", + "do_rcn", + "ec_ruc", + "eg_tin", + "es_cif", + "et_tin", + "eu_oss_vat", + "eu_vat", + "gb_vat", + "ge_vat", + "gn_nif", + "hk_br", + "hr_oib", + "hu_tin", + "id_npwp", + "il_vat", + "in_gst", + "is_vat", + "jp_cn", + "jp_rn", + "jp_trn", + "ke_pin", + "kg_tin", + "kh_tin", + "kr_brn", + "kz_bin", + "la_tin", + "li_uid", + "li_vat", + "ma_vat", + "md_vat", + "me_pib", + "mk_vat", + "mr_nif", + "mx_rfc", + "my_frp", + "my_itn", + "my_sst", + "ng_tin", + "no_vat", + "no_voec", + "np_pan", + "nz_gst", + "om_vat", + "pe_ruc", + "ph_tin", + "ro_tin", + "rs_pib", + "ru_inn", + "ru_kpp", + "sa_vat", + "sg_gst", + "sg_uen", + "si_tin", + "sn_ninea", + "sr_fin", + "sv_nit", + "th_vat", + "tj_tin", + "tr_tin", + "tw_vat", + "tz_vat", + "ua_vat", + "ug_tin", + "us_ein", + "uy_ruc", + "uz_tin", + "uz_vat", + "ve_rif", + "vn_tin", + "za_vat", + "zm_tin", + "zw_tin", + ] + """ + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `al_tin`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `aw_tin`, `az_tin`, `ba_tin`, `bb_tin`, `bd_bin`, `bf_ifu`, `bg_uic`, `bh_vat`, `bj_ifu`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cm_niu`, `cn_tin`, `co_nit`, `cr_tin`, `cv_nif`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `et_tin`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kg_tin`, `kh_tin`, `kr_brn`, `kz_bin`, `la_tin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin` + """ + value: str + """ + Value of the tax ID. + """ + + +class TaxIdCreateParamsOwner(TypedDict): + account: NotRequired[str] + """ + Account the tax ID belongs to. Required when `type=account` + """ + customer: NotRequired[str] + """ + Customer the tax ID belongs to. Required when `type=customer` + """ + customer_account: NotRequired[str] + """ + v2 Account the tax ID belongs to. Can be used in place of `customer` when `type=customer` + """ + type: Literal["account", "application", "customer", "self"] + """ + Type of owner referenced. + """ diff --git a/stripe/params/_tax_id_delete_params.py b/stripe/params/_tax_id_delete_params.py new file mode 100644 index 000000000..3428e7f61 --- /dev/null +++ b/stripe/params/_tax_id_delete_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions + + +class TaxIdDeleteParams(RequestOptions): + pass diff --git a/stripe/params/_tax_id_list_params.py b/stripe/params/_tax_id_list_params.py new file mode 100644 index 000000000..ec89e82f3 --- /dev/null +++ b/stripe/params/_tax_id_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 Literal, NotRequired, TypedDict + + +class TaxIdListParams(RequestOptions): + 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. + """ + owner: NotRequired["TaxIdListParamsOwner"] + """ + The account or customer the tax ID belongs to. Defaults to `owner[type]=self`. + """ + 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 TaxIdListParamsOwner(TypedDict): + account: NotRequired[str] + """ + Account the tax ID belongs to. Required when `type=account` + """ + customer: NotRequired[str] + """ + Customer the tax ID belongs to. Required when `type=customer` + """ + customer_account: NotRequired[str] + """ + v2 Account the tax ID belongs to. Can be used in place of `customer` when `type=customer` + """ + type: Literal["account", "application", "customer", "self"] + """ + Type of owner referenced. + """ diff --git a/stripe/params/_tax_id_retrieve_params.py b/stripe/params/_tax_id_retrieve_params.py new file mode 100644 index 000000000..6e030d656 --- /dev/null +++ b/stripe/params/_tax_id_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 TaxIdRetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_tax_rate_create_params.py b/stripe/params/_tax_rate_create_params.py new file mode 100644 index 000000000..e92785e0c --- /dev/null +++ b/stripe/params/_tax_rate_create_params.py @@ -0,0 +1,69 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import Literal, NotRequired + + +class TaxRateCreateParams(RequestOptions): + active: NotRequired[bool] + """ + Flag determining whether the tax rate is active or inactive (archived). Inactive tax rates cannot be used with new applications or Checkout Sessions, but will still work for subscriptions and invoices that already have it set. + """ + country: NotRequired[str] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + description: NotRequired[str] + """ + An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers. + """ + display_name: str + """ + The display name of the tax rate, which will be shown to users. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + inclusive: bool + """ + This specifies if the tax rate is inclusive or exclusive. + """ + jurisdiction: NotRequired[str] + """ + The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer's invoice. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + percentage: float + """ + This represents the tax rate percent out of 100. + """ + state: NotRequired[str] + """ + [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2), without country prefix. For example, "NY" for New York, United States. + """ + tax_type: NotRequired[ + Literal[ + "amusement_tax", + "communications_tax", + "gst", + "hst", + "igst", + "jct", + "lease_tax", + "pst", + "qst", + "retail_delivery_fee", + "rst", + "sales_tax", + "service_tax", + "vat", + ] + ] + """ + The high-level tax type, such as `vat` or `sales_tax`. + """ diff --git a/stripe/params/_tax_rate_list_params.py b/stripe/params/_tax_rate_list_params.py new file mode 100644 index 000000000..b4c5704a1 --- /dev/null +++ b/stripe/params/_tax_rate_list_params.py @@ -0,0 +1,55 @@ +# -*- 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 TaxRateListParams(RequestOptions): + active: NotRequired[bool] + """ + Optional flag to filter by tax rates that are either active or inactive (archived). + """ + created: NotRequired["TaxRateListParamsCreated|int"] + """ + Optional range for filtering created date. + """ + 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. + """ + inclusive: NotRequired[bool] + """ + Optional flag to filter by tax rates that are inclusive (or those that are not inclusive). + """ + 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 TaxRateListParamsCreated(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_rate_modify_params.py b/stripe/params/_tax_rate_modify_params.py new file mode 100644 index 000000000..04473b12d --- /dev/null +++ b/stripe/params/_tax_rate_modify_params.py @@ -0,0 +1,61 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import Literal, NotRequired + + +class TaxRateModifyParams(RequestOptions): + active: NotRequired[bool] + """ + Flag determining whether the tax rate is active or inactive (archived). Inactive tax rates cannot be used with new applications or Checkout Sessions, but will still work for subscriptions and invoices that already have it set. + """ + country: NotRequired[str] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + description: NotRequired[str] + """ + An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers. + """ + display_name: NotRequired[str] + """ + The display name of the tax rate, which will be shown to users. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + jurisdiction: NotRequired[str] + """ + The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer's invoice. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + state: NotRequired[str] + """ + [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2), without country prefix. For example, "NY" for New York, United States. + """ + tax_type: NotRequired[ + Literal[ + "amusement_tax", + "communications_tax", + "gst", + "hst", + "igst", + "jct", + "lease_tax", + "pst", + "qst", + "retail_delivery_fee", + "rst", + "sales_tax", + "service_tax", + "vat", + ] + ] + """ + The high-level tax type, such as `vat` or `sales_tax`. + """ diff --git a/stripe/params/_tax_rate_retrieve_params.py b/stripe/params/_tax_rate_retrieve_params.py new file mode 100644 index 000000000..374786b07 --- /dev/null +++ b/stripe/params/_tax_rate_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 TaxRateRetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_tax_rate_update_params.py b/stripe/params/_tax_rate_update_params.py new file mode 100644 index 000000000..c049176ad --- /dev/null +++ b/stripe/params/_tax_rate_update_params.py @@ -0,0 +1,60 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class TaxRateUpdateParams(TypedDict): + active: NotRequired[bool] + """ + Flag determining whether the tax rate is active or inactive (archived). Inactive tax rates cannot be used with new applications or Checkout Sessions, but will still work for subscriptions and invoices that already have it set. + """ + country: NotRequired[str] + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + description: NotRequired[str] + """ + An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers. + """ + display_name: NotRequired[str] + """ + The display name of the tax rate, which will be shown to users. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + jurisdiction: NotRequired[str] + """ + The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer's invoice. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + state: NotRequired[str] + """ + [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2), without country prefix. For example, "NY" for New York, United States. + """ + tax_type: NotRequired[ + Literal[ + "amusement_tax", + "communications_tax", + "gst", + "hst", + "igst", + "jct", + "lease_tax", + "pst", + "qst", + "retail_delivery_fee", + "rst", + "sales_tax", + "service_tax", + "vat", + ] + ] + """ + The high-level tax type, such as `vat` or `sales_tax`. + """ diff --git a/stripe/params/_token_create_params.py b/stripe/params/_token_create_params.py new file mode 100644 index 000000000..26976f7be --- /dev/null +++ b/stripe/params/_token_create_params.py @@ -0,0 +1,1179 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class TokenCreateParams(RequestOptions): + account: NotRequired["TokenCreateParamsAccount"] + """ + Information for the account this token represents. + """ + bank_account: NotRequired["TokenCreateParamsBankAccount"] + """ + The bank account this token will represent. + """ + card: NotRequired["TokenCreateParamsCard|str"] + """ + The card this token will represent. If you also pass in a customer, the card must be the ID of a card belonging to the customer. Otherwise, if you do not pass in a customer, this is a dictionary containing a user's credit card details, with the options described below. + """ + customer: NotRequired[str] + """ + Create a token for the customer, which is owned by the application's account. You can only use this with an [OAuth access token](https://stripe.com/docs/connect/standard-accounts) or [Stripe-Account header](https://stripe.com/docs/connect/authentication). Learn more about [cloning saved payment methods](https://stripe.com/docs/connect/cloning-saved-payment-methods). + """ + cvc_update: NotRequired["TokenCreateParamsCvcUpdate"] + """ + The updated CVC value this token represents. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + person: NotRequired["TokenCreateParamsPerson"] + """ + Information for the person this token represents. + """ + pii: NotRequired["TokenCreateParamsPii"] + """ + The PII this token represents. + """ + + +class TokenCreateParamsAccount(TypedDict): + business_type: NotRequired[ + Literal["company", "government_entity", "individual", "non_profit"] + ] + """ + The business type. + """ + company: NotRequired["TokenCreateParamsAccountCompany"] + """ + Information about the company or business. + """ + individual: NotRequired["TokenCreateParamsAccountIndividual"] + """ + Information about the person represented by the account. + """ + tos_shown_and_accepted: NotRequired[bool] + """ + Whether the user described by the data in the token has been shown [the Stripe Connected Account Agreement](https://docs.stripe.com/connect/account-tokens#stripe-connected-account-agreement). When creating an account token to create a new Connect account, this value must be `true`. + """ + + +class TokenCreateParamsAccountCompany(TypedDict): + address: NotRequired["TokenCreateParamsAccountCompanyAddress"] + """ + The company's primary address. + """ + address_kana: NotRequired["TokenCreateParamsAccountCompanyAddressKana"] + """ + The Kana variation of the company's primary address (Japan only). + """ + address_kanji: NotRequired["TokenCreateParamsAccountCompanyAddressKanji"] + """ + The Kanji variation of the company's primary address (Japan only). + """ + directors_provided: NotRequired[bool] + """ + Whether the company's directors have been provided. Set this Boolean to `true` after creating all the company's directors with [the Persons API](https://docs.stripe.com/api/persons) for accounts with a `relationship.director` requirement. This value is not automatically set to `true` after creating directors, so it needs to be updated to indicate all directors have been provided. + """ + directorship_declaration: NotRequired[ + "TokenCreateParamsAccountCompanyDirectorshipDeclaration" + ] + """ + This hash is used to attest that the directors information provided to Stripe is both current and correct. + """ + executives_provided: NotRequired[bool] + """ + Whether the company's executives have been provided. Set this Boolean to `true` after creating all the company's executives with [the Persons API](https://docs.stripe.com/api/persons) for accounts with a `relationship.executive` requirement. + """ + export_license_id: NotRequired[str] + """ + The export license ID number of the company, also referred as Import Export Code (India only). + """ + export_purpose_code: NotRequired[str] + """ + The purpose code to use for export transactions (India only). + """ + name: NotRequired[str] + """ + The company's legal name. + """ + name_kana: NotRequired[str] + """ + The Kana variation of the company's legal name (Japan only). + """ + name_kanji: NotRequired[str] + """ + The Kanji variation of the company's legal name (Japan only). + """ + owners_provided: NotRequired[bool] + """ + Whether the company's owners have been provided. Set this Boolean to `true` after creating all the company's owners with [the Persons API](https://docs.stripe.com/api/persons) for accounts with a `relationship.owner` requirement. + """ + ownership_declaration: NotRequired[ + "TokenCreateParamsAccountCompanyOwnershipDeclaration" + ] + """ + This hash is used to attest that the beneficial owner information provided to Stripe is both current and correct. + """ + ownership_declaration_shown_and_signed: NotRequired[bool] + """ + Whether the user described by the data in the token has been shown the Ownership Declaration and indicated that it is correct. + """ + ownership_exemption_reason: NotRequired[ + "Literal['']|Literal['qualified_entity_exceeds_ownership_threshold', 'qualifies_as_financial_institution']" + ] + """ + This value is used to determine if a business is exempt from providing ultimate beneficial owners. See [this support article](https://support.stripe.com/questions/exemption-from-providing-ownership-details) and [changelog](https://docs.stripe.com/changelog/acacia/2025-01-27/ownership-exemption-reason-accounts-api) for more details. + """ + phone: NotRequired[str] + """ + The company's phone number (used for verification). + """ + registration_date: NotRequired[ + "Literal['']|TokenCreateParamsAccountCompanyRegistrationDate" + ] + """ + When the business was incorporated or registered. + """ + registration_number: NotRequired[str] + """ + The identification number given to a company when it is registered or incorporated, if distinct from the identification number used for filing taxes. (Examples are the CIN for companies and LLP IN for partnerships in India, and the Company Registration Number in Hong Kong). + """ + structure: NotRequired[ + "Literal['']|Literal['free_zone_establishment', 'free_zone_llc', 'government_instrumentality', 'governmental_unit', 'incorporated_non_profit', 'incorporated_partnership', 'limited_liability_partnership', 'llc', 'multi_member_llc', 'private_company', 'private_corporation', 'private_partnership', 'public_company', 'public_corporation', 'public_partnership', 'registered_charity', 'single_member_llc', 'sole_establishment', 'sole_proprietorship', 'tax_exempt_government_instrumentality', 'unincorporated_association', 'unincorporated_non_profit', 'unincorporated_partnership']" + ] + """ + The category identifying the legal structure of the company or legal entity. See [Business structure](https://docs.stripe.com/connect/identity-verification#business-structure) for more details. Pass an empty string to unset this value. + """ + tax_id: NotRequired[str] + """ + The business ID number of the company, as appropriate for the company's country. (Examples are an Employer ID Number in the U.S., a Business Number in Canada, or a Company Number in the UK.) + """ + tax_id_registrar: NotRequired[str] + """ + The jurisdiction in which the `tax_id` is registered (Germany-based companies only). + """ + vat_id: NotRequired[str] + """ + The VAT number of the company. + """ + verification: NotRequired["TokenCreateParamsAccountCompanyVerification"] + """ + Information on the verification state of the company. + """ + + +class TokenCreateParamsAccountCompanyAddress(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. + """ + + +class TokenCreateParamsAccountCompanyAddressKana(TypedDict): + city: NotRequired[str] + """ + City or ward. + """ + 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] + """ + Block or building number. + """ + line2: NotRequired[str] + """ + Building details. + """ + postal_code: NotRequired[str] + """ + Postal code. + """ + state: NotRequired[str] + """ + Prefecture. + """ + town: NotRequired[str] + """ + Town or cho-me. + """ + + +class TokenCreateParamsAccountCompanyAddressKanji(TypedDict): + city: NotRequired[str] + """ + City or ward. + """ + 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] + """ + Block or building number. + """ + line2: NotRequired[str] + """ + Building details. + """ + postal_code: NotRequired[str] + """ + Postal code. + """ + state: NotRequired[str] + """ + Prefecture. + """ + town: NotRequired[str] + """ + Town or cho-me. + """ + + +class TokenCreateParamsAccountCompanyDirectorshipDeclaration(TypedDict): + date: NotRequired[int] + """ + The Unix timestamp marking when the directorship declaration attestation was made. + """ + ip: NotRequired[str] + """ + The IP address from which the directorship declaration attestation was made. + """ + user_agent: NotRequired[str] + """ + The user agent of the browser from which the directorship declaration attestation was made. + """ + + +class TokenCreateParamsAccountCompanyOwnershipDeclaration(TypedDict): + date: NotRequired[int] + """ + The Unix timestamp marking when the beneficial owner attestation was made. + """ + ip: NotRequired[str] + """ + The IP address from which the beneficial owner attestation was made. + """ + user_agent: NotRequired[str] + """ + The user agent of the browser from which the beneficial owner attestation was made. + """ + + +class TokenCreateParamsAccountCompanyRegistrationDate(TypedDict): + day: int + """ + The day of registration, between 1 and 31. + """ + month: int + """ + The month of registration, between 1 and 12. + """ + year: int + """ + The four-digit year of registration. + """ + + +class TokenCreateParamsAccountCompanyVerification(TypedDict): + document: NotRequired[ + "TokenCreateParamsAccountCompanyVerificationDocument" + ] + """ + A document verifying the business. + """ + + +class TokenCreateParamsAccountCompanyVerificationDocument(TypedDict): + back: NotRequired[str] + """ + The back of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + """ + front: NotRequired[str] + """ + The front of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + """ + + +class TokenCreateParamsAccountIndividual(TypedDict): + address: NotRequired["TokenCreateParamsAccountIndividualAddress"] + """ + The individual's primary address. + """ + address_kana: NotRequired["TokenCreateParamsAccountIndividualAddressKana"] + """ + The Kana variation of the individual's primary address (Japan only). + """ + address_kanji: NotRequired[ + "TokenCreateParamsAccountIndividualAddressKanji" + ] + """ + The Kanji variation of the individual's primary address (Japan only). + """ + dob: NotRequired["Literal['']|TokenCreateParamsAccountIndividualDob"] + """ + The individual's date of birth. + """ + email: NotRequired[str] + """ + The individual's email address. + """ + first_name: NotRequired[str] + """ + The individual's first name. + """ + first_name_kana: NotRequired[str] + """ + The Kana variation of the individual's first name (Japan only). + """ + first_name_kanji: NotRequired[str] + """ + The Kanji variation of the individual's first name (Japan only). + """ + full_name_aliases: NotRequired["Literal['']|List[str]"] + """ + A list of alternate names or aliases that the individual is known by. + """ + gender: NotRequired[str] + """ + The individual's gender + """ + id_number: NotRequired[str] + """ + The government-issued ID number of the individual, as appropriate for the representative's country. (Examples are a Social Security Number in the U.S., or a Social Insurance Number in Canada). Instead of the number itself, you can also provide a [PII token created with Stripe.js](https://docs.stripe.com/js/tokens/create_token?type=pii). + """ + id_number_secondary: NotRequired[str] + """ + The government-issued secondary ID number of the individual, as appropriate for the representative's country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token created with Stripe.js](https://docs.stripe.com/js/tokens/create_token?type=pii). + """ + last_name: NotRequired[str] + """ + The individual's last name. + """ + last_name_kana: NotRequired[str] + """ + The Kana variation of the individual's last name (Japan only). + """ + last_name_kanji: NotRequired[str] + """ + The Kanji variation of the individual's last name (Japan only). + """ + maiden_name: NotRequired[str] + """ + The individual's maiden name. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + phone: NotRequired[str] + """ + The individual's phone number. + """ + political_exposure: NotRequired[Literal["existing", "none"]] + """ + Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. + """ + registered_address: NotRequired[ + "TokenCreateParamsAccountIndividualRegisteredAddress" + ] + """ + The individual's registered address. + """ + relationship: NotRequired["TokenCreateParamsAccountIndividualRelationship"] + """ + Describes the person's relationship to the account. + """ + ssn_last_4: NotRequired[str] + """ + The last four digits of the individual's Social Security Number (U.S. only). + """ + verification: NotRequired["TokenCreateParamsAccountIndividualVerification"] + """ + The individual's verification document information. + """ + + +class TokenCreateParamsAccountIndividualAddress(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. + """ + + +class TokenCreateParamsAccountIndividualAddressKana(TypedDict): + city: NotRequired[str] + """ + City or ward. + """ + 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] + """ + Block or building number. + """ + line2: NotRequired[str] + """ + Building details. + """ + postal_code: NotRequired[str] + """ + Postal code. + """ + state: NotRequired[str] + """ + Prefecture. + """ + town: NotRequired[str] + """ + Town or cho-me. + """ + + +class TokenCreateParamsAccountIndividualAddressKanji(TypedDict): + city: NotRequired[str] + """ + City or ward. + """ + 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] + """ + Block or building number. + """ + line2: NotRequired[str] + """ + Building details. + """ + postal_code: NotRequired[str] + """ + Postal code. + """ + state: NotRequired[str] + """ + Prefecture. + """ + town: NotRequired[str] + """ + Town or cho-me. + """ + + +class TokenCreateParamsAccountIndividualDob(TypedDict): + day: int + """ + The day of birth, between 1 and 31. + """ + month: int + """ + The month of birth, between 1 and 12. + """ + year: int + """ + The four-digit year of birth. + """ + + +class TokenCreateParamsAccountIndividualRegisteredAddress(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. + """ + + +class TokenCreateParamsAccountIndividualRelationship(TypedDict): + director: NotRequired[bool] + """ + Whether the person is a director of the account's legal entity. Directors are typically members of the governing board of the company, or responsible for ensuring the company meets its regulatory obligations. + """ + executive: NotRequired[bool] + """ + Whether the person has significant responsibility to control, manage, or direct the organization. + """ + owner: NotRequired[bool] + """ + Whether the person is an owner of the account's legal entity. + """ + percent_ownership: NotRequired["Literal['']|float"] + """ + The percent owned by the person of the account's legal entity. + """ + title: NotRequired[str] + """ + The person's title (e.g., CEO, Support Engineer). + """ + + +class TokenCreateParamsAccountIndividualVerification(TypedDict): + additional_document: NotRequired[ + "TokenCreateParamsAccountIndividualVerificationAdditionalDocument" + ] + """ + A document showing address, either a passport, local ID card, or utility bill from a well-known utility company. + """ + document: NotRequired[ + "TokenCreateParamsAccountIndividualVerificationDocument" + ] + """ + An identifying document, either a passport or local ID card. + """ + + +class TokenCreateParamsAccountIndividualVerificationAdditionalDocument( + TypedDict, +): + back: NotRequired[str] + """ + The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + """ + front: NotRequired[str] + """ + The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + """ + + +class TokenCreateParamsAccountIndividualVerificationDocument(TypedDict): + back: NotRequired[str] + """ + The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + """ + front: NotRequired[str] + """ + The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + """ + + +class TokenCreateParamsBankAccount(TypedDict): + account_holder_name: NotRequired[str] + """ + The name of the person or business that owns the bank account. This field is required when attaching the bank account to a `Customer` object. + """ + account_holder_type: NotRequired[Literal["company", "individual"]] + """ + The type of entity that holds the account. It can be `company` or `individual`. This field is required when attaching the bank account to a `Customer` object. + """ + account_number: str + """ + The account number for the bank account, in string form. Must be a checking account. + """ + account_type: NotRequired[Literal["checking", "futsu", "savings", "toza"]] + """ + The bank account type. This can only be `checking` or `savings` in most countries. In Japan, this can only be `futsu` or `toza`. + """ + country: str + """ + The country in which the bank account is located. + """ + currency: NotRequired[str] + """ + The currency the bank account is in. This must be a country/currency pairing that [Stripe supports.](https://stripe.com/docs/payouts) + """ + payment_method: NotRequired[str] + """ + The ID of a Payment Method with a `type` of `us_bank_account`. The Payment Method's bank account information will be copied and returned as a Bank Account Token. This parameter is exclusive with respect to all other parameters in the `bank_account` hash. You must include the top-level `customer` parameter if the Payment Method is attached to a `Customer` object. If the Payment Method is not attached to a `Customer` object, it will be consumed and cannot be used again. You may not use Payment Methods which were created by a Setup Intent with `attach_to_self=true`. + """ + routing_number: NotRequired[str] + """ + The routing number, sort code, or other country-appropriate institution number for the bank account. For US bank accounts, this is required and should be the ACH routing number, not the wire routing number. If you are providing an IBAN for `account_number`, this field is not required. + """ + + +class TokenCreateParamsCard(TypedDict): + address_city: NotRequired[str] + """ + City / District / Suburb / Town / Village. + """ + address_country: NotRequired[str] + """ + Billing address country, if provided. + """ + address_line1: NotRequired[str] + """ + Address line 1 (Street address / PO Box / Company name). + """ + address_line2: NotRequired[str] + """ + Address line 2 (Apartment / Suite / Unit / Building). + """ + address_state: NotRequired[str] + """ + State / County / Province / Region. + """ + address_zip: NotRequired[str] + """ + ZIP or postal code. + """ + currency: NotRequired[str] + """ + Required in order to add the card to an account; in all other cases, this parameter is not used. When added to an account, the card (which must be a debit card) can be used as a transfer destination for funds in this currency. + """ + cvc: NotRequired[str] + """ + Card security code. Highly recommended to always include this value. + """ + exp_month: str + """ + Two-digit number representing the card's expiration month. + """ + exp_year: str + """ + Two- or four-digit number representing the card's expiration year. + """ + name: NotRequired[str] + """ + Cardholder's full name. + """ + networks: NotRequired["TokenCreateParamsCardNetworks"] + """ + Contains information about card networks used to process the payment. + """ + number: str + """ + The card number, as a string without any separators. + """ + + +class TokenCreateParamsCardNetworks(TypedDict): + preferred: NotRequired[Literal["cartes_bancaires", "mastercard", "visa"]] + """ + The customer's preferred card network for co-branded cards. Supports `cartes_bancaires`, `mastercard`, or `visa`. Selection of a network that does not apply to the card will be stored as `invalid_preference` on the card. + """ + + +class TokenCreateParamsCvcUpdate(TypedDict): + cvc: str + """ + The CVC value, in string form. + """ + + +class TokenCreateParamsPerson(TypedDict): + additional_tos_acceptances: NotRequired[ + "TokenCreateParamsPersonAdditionalTosAcceptances" + ] + """ + Details on the legal guardian's or authorizer's acceptance of the required Stripe agreements. + """ + address: NotRequired["TokenCreateParamsPersonAddress"] + """ + The person's address. + """ + address_kana: NotRequired["TokenCreateParamsPersonAddressKana"] + """ + The Kana variation of the person's address (Japan only). + """ + address_kanji: NotRequired["TokenCreateParamsPersonAddressKanji"] + """ + The Kanji variation of the person's address (Japan only). + """ + dob: NotRequired["Literal['']|TokenCreateParamsPersonDob"] + """ + The person's date of birth. + """ + documents: NotRequired["TokenCreateParamsPersonDocuments"] + """ + Documents that may be submitted to satisfy various informational requests. + """ + email: NotRequired[str] + """ + The person's email address. + """ + first_name: NotRequired[str] + """ + The person's first name. + """ + first_name_kana: NotRequired[str] + """ + The Kana variation of the person's first name (Japan only). + """ + first_name_kanji: NotRequired[str] + """ + The Kanji variation of the person's first name (Japan only). + """ + full_name_aliases: NotRequired["Literal['']|List[str]"] + """ + A list of alternate names or aliases that the person is known by. + """ + gender: NotRequired[str] + """ + The person's gender (International regulations require either "male" or "female"). + """ + id_number: NotRequired[str] + """ + The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://docs.stripe.com/js/tokens/create_token?type=pii). + """ + id_number_secondary: NotRequired[str] + """ + The person's secondary ID number, as appropriate for their country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://docs.stripe.com/js/tokens/create_token?type=pii). + """ + last_name: NotRequired[str] + """ + The person's last name. + """ + last_name_kana: NotRequired[str] + """ + The Kana variation of the person's last name (Japan only). + """ + last_name_kanji: NotRequired[str] + """ + The Kanji variation of the person's last name (Japan only). + """ + maiden_name: NotRequired[str] + """ + The person's maiden name. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + nationality: NotRequired[str] + """ + The country where the person is a national. Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)), or "XX" if unavailable. + """ + phone: NotRequired[str] + """ + The person's phone number. + """ + political_exposure: NotRequired[Literal["existing", "none"]] + """ + Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. + """ + registered_address: NotRequired["TokenCreateParamsPersonRegisteredAddress"] + """ + The person's registered address. + """ + relationship: NotRequired["TokenCreateParamsPersonRelationship"] + """ + The relationship that this person has with the account's legal entity. + """ + ssn_last_4: NotRequired[str] + """ + The last four digits of the person's Social Security number (U.S. only). + """ + us_cfpb_data: NotRequired["TokenCreateParamsPersonUsCfpbData"] + """ + Demographic data related to the person. + """ + verification: NotRequired["TokenCreateParamsPersonVerification"] + """ + The person's verification status. + """ + + +class TokenCreateParamsPersonAdditionalTosAcceptances(TypedDict): + account: NotRequired[ + "TokenCreateParamsPersonAdditionalTosAcceptancesAccount" + ] + """ + Details on the legal guardian's acceptance of the main Stripe service agreement. + """ + + +class TokenCreateParamsPersonAdditionalTosAcceptancesAccount(TypedDict): + date: NotRequired[int] + """ + The Unix timestamp marking when the account representative accepted the service agreement. + """ + ip: NotRequired[str] + """ + The IP address from which the account representative accepted the service agreement. + """ + user_agent: NotRequired["Literal['']|str"] + """ + The user agent of the browser from which the account representative accepted the service agreement. + """ + + +class TokenCreateParamsPersonAddress(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. + """ + + +class TokenCreateParamsPersonAddressKana(TypedDict): + city: NotRequired[str] + """ + City or ward. + """ + 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] + """ + Block or building number. + """ + line2: NotRequired[str] + """ + Building details. + """ + postal_code: NotRequired[str] + """ + Postal code. + """ + state: NotRequired[str] + """ + Prefecture. + """ + town: NotRequired[str] + """ + Town or cho-me. + """ + + +class TokenCreateParamsPersonAddressKanji(TypedDict): + city: NotRequired[str] + """ + City or ward. + """ + 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] + """ + Block or building number. + """ + line2: NotRequired[str] + """ + Building details. + """ + postal_code: NotRequired[str] + """ + Postal code. + """ + state: NotRequired[str] + """ + Prefecture. + """ + town: NotRequired[str] + """ + Town or cho-me. + """ + + +class TokenCreateParamsPersonDob(TypedDict): + day: int + """ + The day of birth, between 1 and 31. + """ + month: int + """ + The month of birth, between 1 and 12. + """ + year: int + """ + The four-digit year of birth. + """ + + +class TokenCreateParamsPersonDocuments(TypedDict): + company_authorization: NotRequired[ + "TokenCreateParamsPersonDocumentsCompanyAuthorization" + ] + """ + One or more documents that demonstrate proof that this person is authorized to represent the company. + """ + passport: NotRequired["TokenCreateParamsPersonDocumentsPassport"] + """ + One or more documents showing the person's passport page with photo and personal data. + """ + visa: NotRequired["TokenCreateParamsPersonDocumentsVisa"] + """ + One or more documents showing the person's visa required for living in the country where they are residing. + """ + + +class TokenCreateParamsPersonDocumentsCompanyAuthorization(TypedDict): + files: NotRequired[List[str]] + """ + One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + """ + + +class TokenCreateParamsPersonDocumentsPassport(TypedDict): + files: NotRequired[List[str]] + """ + One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + """ + + +class TokenCreateParamsPersonDocumentsVisa(TypedDict): + files: NotRequired[List[str]] + """ + One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + """ + + +class TokenCreateParamsPersonRegisteredAddress(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. + """ + + +class TokenCreateParamsPersonRelationship(TypedDict): + authorizer: NotRequired[bool] + """ + Whether the person is the authorizer of the account's representative. + """ + director: NotRequired[bool] + """ + Whether the person is a director of the account's legal entity. Directors are typically members of the governing board of the company, or responsible for ensuring the company meets its regulatory obligations. + """ + executive: NotRequired[bool] + """ + Whether the person has significant responsibility to control, manage, or direct the organization. + """ + legal_guardian: NotRequired[bool] + """ + Whether the person is the legal guardian of the account's representative. + """ + owner: NotRequired[bool] + """ + Whether the person is an owner of the account's legal entity. + """ + percent_ownership: NotRequired["Literal['']|float"] + """ + The percent owned by the person of the account's legal entity. + """ + representative: NotRequired[bool] + """ + Whether the person is authorized as the primary representative of the account. This is the person nominated by the business to provide information about themselves, and general information about the account. There can only be one representative at any given time. At the time the account is created, this person should be set to the person responsible for opening the account. + """ + title: NotRequired[str] + """ + The person's title (e.g., CEO, Support Engineer). + """ + + +class TokenCreateParamsPersonUsCfpbData(TypedDict): + ethnicity_details: NotRequired[ + "TokenCreateParamsPersonUsCfpbDataEthnicityDetails" + ] + """ + The persons ethnicity details + """ + race_details: NotRequired["TokenCreateParamsPersonUsCfpbDataRaceDetails"] + """ + The persons race details + """ + self_identified_gender: NotRequired[str] + """ + The persons self-identified gender + """ + + +class TokenCreateParamsPersonUsCfpbDataEthnicityDetails(TypedDict): + ethnicity: NotRequired[ + List[ + Literal[ + "cuban", + "hispanic_or_latino", + "mexican", + "not_hispanic_or_latino", + "other_hispanic_or_latino", + "prefer_not_to_answer", + "puerto_rican", + ] + ] + ] + """ + The persons ethnicity + """ + ethnicity_other: NotRequired[str] + """ + Please specify your origin, when other is selected. + """ + + +class TokenCreateParamsPersonUsCfpbDataRaceDetails(TypedDict): + race: NotRequired[ + List[ + Literal[ + "african_american", + "american_indian_or_alaska_native", + "asian", + "asian_indian", + "black_or_african_american", + "chinese", + "ethiopian", + "filipino", + "guamanian_or_chamorro", + "haitian", + "jamaican", + "japanese", + "korean", + "native_hawaiian", + "native_hawaiian_or_other_pacific_islander", + "nigerian", + "other_asian", + "other_black_or_african_american", + "other_pacific_islander", + "prefer_not_to_answer", + "samoan", + "somali", + "vietnamese", + "white", + ] + ] + ] + """ + The persons race. + """ + race_other: NotRequired[str] + """ + Please specify your race, when other is selected. + """ + + +class TokenCreateParamsPersonVerification(TypedDict): + additional_document: NotRequired[ + "TokenCreateParamsPersonVerificationAdditionalDocument" + ] + """ + A document showing address, either a passport, local ID card, or utility bill from a well-known utility company. + """ + document: NotRequired["TokenCreateParamsPersonVerificationDocument"] + """ + An identifying document, either a passport or local ID card. + """ + + +class TokenCreateParamsPersonVerificationAdditionalDocument(TypedDict): + back: NotRequired[str] + """ + The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + """ + front: NotRequired[str] + """ + The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + """ + + +class TokenCreateParamsPersonVerificationDocument(TypedDict): + back: NotRequired[str] + """ + The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + """ + front: NotRequired[str] + """ + The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + """ + + +class TokenCreateParamsPii(TypedDict): + id_number: NotRequired[str] + """ + The `id_number` for the PII, in string form. + """ diff --git a/stripe/params/_token_retrieve_params.py b/stripe/params/_token_retrieve_params.py new file mode 100644 index 000000000..a8e659fc6 --- /dev/null +++ b/stripe/params/_token_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 TokenRetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_topup_cancel_params.py b/stripe/params/_topup_cancel_params.py new file mode 100644 index 000000000..619d448a2 --- /dev/null +++ b/stripe/params/_topup_cancel_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 TopupCancelParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_topup_create_params.py b/stripe/params/_topup_create_params.py new file mode 100644 index 000000000..e7d682ace --- /dev/null +++ b/stripe/params/_topup_create_params.py @@ -0,0 +1,40 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import Literal, NotRequired + + +class TopupCreateParams(RequestOptions): + amount: int + """ + A positive integer representing how much to transfer. + """ + 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). + """ + description: NotRequired[str] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + source: NotRequired[str] + """ + The ID of a source to transfer funds from. For most users, this should be left unspecified which will use the bank account that was set up in the dashboard for the specified currency. In test mode, this can be a test bank token (see [Testing Top-ups](https://stripe.com/docs/connect/testing#testing-top-ups)). + """ + statement_descriptor: NotRequired[str] + """ + Extra information about a top-up for the source's bank statement. Limited to 15 ASCII characters. + """ + transfer_group: NotRequired[str] + """ + A string that identifies this top-up as part of a group. + """ diff --git a/stripe/params/_topup_list_params.py b/stripe/params/_topup_list_params.py new file mode 100644 index 000000000..1bac955d2 --- /dev/null +++ b/stripe/params/_topup_list_params.py @@ -0,0 +1,74 @@ +# -*- 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, TypedDict + + +class TopupListParams(RequestOptions): + amount: NotRequired["TopupListParamsAmount|int"] + """ + A positive integer representing how much to transfer. + """ + created: NotRequired["TopupListParamsCreated|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. + """ + status: NotRequired[Literal["canceled", "failed", "pending", "succeeded"]] + """ + Only return top-ups that have the given status. One of `canceled`, `failed`, `pending` or `succeeded`. + """ + + +class TopupListParamsAmount(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) + """ + + +class TopupListParamsCreated(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/_topup_modify_params.py b/stripe/params/_topup_modify_params.py new file mode 100644 index 000000000..1886a84fc --- /dev/null +++ b/stripe/params/_topup_modify_params.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import Literal, NotRequired + + +class TopupModifyParams(RequestOptions): + description: NotRequired[str] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ diff --git a/stripe/params/_topup_retrieve_params.py b/stripe/params/_topup_retrieve_params.py new file mode 100644 index 000000000..6ae1b2bf4 --- /dev/null +++ b/stripe/params/_topup_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 TopupRetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_topup_update_params.py b/stripe/params/_topup_update_params.py new file mode 100644 index 000000000..e4f803fda --- /dev/null +++ b/stripe/params/_topup_update_params.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class TopupUpdateParams(TypedDict): + description: NotRequired[str] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ diff --git a/stripe/params/_transfer_create_params.py b/stripe/params/_transfer_create_params.py new file mode 100644 index 000000000..a56657799 --- /dev/null +++ b/stripe/params/_transfer_create_params.py @@ -0,0 +1,48 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import Literal, NotRequired + + +class TransferCreateParams(RequestOptions): + amount: NotRequired[int] + """ + A positive integer in cents (or local equivalent) representing how much to transfer. + """ + currency: str + """ + Three-letter [ISO code for currency](https://www.iso.org/iso-4217-currency-codes.html) in lowercase. Must be a [supported currency](https://docs.stripe.com/currencies). + """ + description: NotRequired[str] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ + destination: str + """ + The ID of a connected Stripe account. [See the Connect documentation](https://docs.stripe.com/docs/connect/separate-charges-and-transfers) for details. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + fx_quote: NotRequired[str] + """ + The FX rate in the quote is validated and used to convert the transfer amount to the destination currency. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + source_transaction: NotRequired[str] + """ + You can use this parameter to transfer funds from a charge before they are added to your available balance. A pending balance will transfer immediately but the funds will not become available until the original charge becomes available. [See the Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-availability) for details. + """ + source_type: NotRequired[Literal["bank_account", "card", "fpx"]] + """ + The source balance to use for this transfer. One of `bank_account`, `card`, or `fpx`. For most users, this will default to `card`. + """ + transfer_group: NotRequired[str] + """ + A string that identifies this transaction as part of a group. See the [Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-options) for details. + """ diff --git a/stripe/params/_transfer_create_reversal_params.py b/stripe/params/_transfer_create_reversal_params.py new file mode 100644 index 000000000..e59069fd1 --- /dev/null +++ b/stripe/params/_transfer_create_reversal_params.py @@ -0,0 +1,28 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import Literal, NotRequired + + +class TransferCreateReversalParams(RequestOptions): + amount: NotRequired[int] + """ + A positive integer in cents (or local equivalent) representing how much of this transfer to reverse. Can only reverse up to the unreversed amount remaining of the transfer. Partial transfer reversals are only allowed for transfers to Stripe Accounts. Defaults to the entire transfer amount. + """ + description: NotRequired[str] + """ + An arbitrary string which you can attach to a reversal object. This will be unset if you POST an empty value. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + refund_application_fee: NotRequired[bool] + """ + Boolean indicating whether the application fee should be refunded when reversing this transfer. If a full transfer reversal is given, the full application fee will be refunded. Otherwise, the application fee will be refunded with an amount proportional to the amount of the transfer reversed. + """ diff --git a/stripe/params/_transfer_list_params.py b/stripe/params/_transfer_list_params.py new file mode 100644 index 000000000..e131cd5a0 --- /dev/null +++ b/stripe/params/_transfer_list_params.py @@ -0,0 +1,55 @@ +# -*- 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 TransferListParams(RequestOptions): + created: NotRequired["TransferListParamsCreated|int"] + """ + Only return transfers that were created during the given date interval. + """ + destination: NotRequired[str] + """ + Only return transfers for the destination specified by this account ID. + """ + 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. + """ + transfer_group: NotRequired[str] + """ + Only return transfers with the specified transfer group. + """ + + +class TransferListParamsCreated(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/_transfer_list_reversals_params.py b/stripe/params/_transfer_list_reversals_params.py new file mode 100644 index 000000000..f5aeb8eff --- /dev/null +++ b/stripe/params/_transfer_list_reversals_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 TransferListReversalsParams(RequestOptions): + 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. + """ diff --git a/stripe/params/_transfer_modify_params.py b/stripe/params/_transfer_modify_params.py new file mode 100644 index 000000000..bfee1cecb --- /dev/null +++ b/stripe/params/_transfer_modify_params.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import Literal, NotRequired + + +class TransferModifyParams(RequestOptions): + description: NotRequired[str] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ diff --git a/stripe/params/_transfer_modify_reversal_params.py b/stripe/params/_transfer_modify_reversal_params.py new file mode 100644 index 000000000..ab2b0d271 --- /dev/null +++ b/stripe/params/_transfer_modify_reversal_params.py @@ -0,0 +1,16 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import Literal, NotRequired + + +class TransferModifyReversalParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ diff --git a/stripe/params/_transfer_retrieve_params.py b/stripe/params/_transfer_retrieve_params.py new file mode 100644 index 000000000..21daaac71 --- /dev/null +++ b/stripe/params/_transfer_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 TransferRetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_transfer_retrieve_reversal_params.py b/stripe/params/_transfer_retrieve_reversal_params.py new file mode 100644 index 000000000..d827a4847 --- /dev/null +++ b/stripe/params/_transfer_retrieve_reversal_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 TransferRetrieveReversalParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_transfer_reversal_create_params.py b/stripe/params/_transfer_reversal_create_params.py new file mode 100644 index 000000000..50268c857 --- /dev/null +++ b/stripe/params/_transfer_reversal_create_params.py @@ -0,0 +1,27 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class TransferReversalCreateParams(TypedDict): + amount: NotRequired[int] + """ + A positive integer in cents (or local equivalent) representing how much of this transfer to reverse. Can only reverse up to the unreversed amount remaining of the transfer. Partial transfer reversals are only allowed for transfers to Stripe Accounts. Defaults to the entire transfer amount. + """ + description: NotRequired[str] + """ + An arbitrary string which you can attach to a reversal object. This will be unset if you POST an empty value. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + refund_application_fee: NotRequired[bool] + """ + Boolean indicating whether the application fee should be refunded when reversing this transfer. If a full transfer reversal is given, the full application fee will be refunded. Otherwise, the application fee will be refunded with an amount proportional to the amount of the transfer reversed. + """ diff --git a/stripe/params/_transfer_reversal_list_params.py b/stripe/params/_transfer_reversal_list_params.py new file mode 100644 index 000000000..61cb435f6 --- /dev/null +++ b/stripe/params/_transfer_reversal_list_params.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import NotRequired, TypedDict + + +class TransferReversalListParams(TypedDict): + 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. + """ diff --git a/stripe/params/_transfer_reversal_retrieve_params.py b/stripe/params/_transfer_reversal_retrieve_params.py new file mode 100644 index 000000000..8cabccb57 --- /dev/null +++ b/stripe/params/_transfer_reversal_retrieve_params.py @@ -0,0 +1,11 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import NotRequired, TypedDict + + +class TransferReversalRetrieveParams(TypedDict): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_transfer_reversal_update_params.py b/stripe/params/_transfer_reversal_update_params.py new file mode 100644 index 000000000..aebe79cc1 --- /dev/null +++ b/stripe/params/_transfer_reversal_update_params.py @@ -0,0 +1,15 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class TransferReversalUpdateParams(TypedDict): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ diff --git a/stripe/params/_transfer_update_params.py b/stripe/params/_transfer_update_params.py new file mode 100644 index 000000000..4d0452546 --- /dev/null +++ b/stripe/params/_transfer_update_params.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class TransferUpdateParams(TypedDict): + description: NotRequired[str] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ diff --git a/stripe/params/_webhook_endpoint_create_params.py b/stripe/params/_webhook_endpoint_create_params.py new file mode 100644 index 000000000..c1867e846 --- /dev/null +++ b/stripe/params/_webhook_endpoint_create_params.py @@ -0,0 +1,447 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import Literal, NotRequired + + +class WebhookEndpointCreateParams(RequestOptions): + api_version: NotRequired[ + Literal[ + "2011-01-01", + "2011-06-21", + "2011-06-28", + "2011-08-01", + "2011-09-15", + "2011-11-17", + "2012-02-23", + "2012-03-25", + "2012-06-18", + "2012-06-28", + "2012-07-09", + "2012-09-24", + "2012-10-26", + "2012-11-07", + "2013-02-11", + "2013-02-13", + "2013-07-05", + "2013-08-12", + "2013-08-13", + "2013-10-29", + "2013-12-03", + "2014-01-31", + "2014-03-13", + "2014-03-28", + "2014-05-19", + "2014-06-13", + "2014-06-17", + "2014-07-22", + "2014-07-26", + "2014-08-04", + "2014-08-20", + "2014-09-08", + "2014-10-07", + "2014-11-05", + "2014-11-20", + "2014-12-08", + "2014-12-17", + "2014-12-22", + "2015-01-11", + "2015-01-26", + "2015-02-10", + "2015-02-16", + "2015-02-18", + "2015-03-24", + "2015-04-07", + "2015-06-15", + "2015-07-07", + "2015-07-13", + "2015-07-28", + "2015-08-07", + "2015-08-19", + "2015-09-03", + "2015-09-08", + "2015-09-23", + "2015-10-01", + "2015-10-12", + "2015-10-16", + "2016-02-03", + "2016-02-19", + "2016-02-22", + "2016-02-23", + "2016-02-29", + "2016-03-07", + "2016-06-15", + "2016-07-06", + "2016-10-19", + "2017-01-27", + "2017-02-14", + "2017-04-06", + "2017-05-25", + "2017-06-05", + "2017-08-15", + "2017-12-14", + "2018-01-23", + "2018-02-05", + "2018-02-06", + "2018-02-28", + "2018-05-21", + "2018-07-27", + "2018-08-23", + "2018-09-06", + "2018-09-24", + "2018-10-31", + "2018-11-08", + "2019-02-11", + "2019-02-19", + "2019-03-14", + "2019-05-16", + "2019-08-14", + "2019-09-09", + "2019-10-08", + "2019-10-17", + "2019-11-05", + "2019-12-03", + "2020-03-02", + "2020-08-27", + "2022-08-01", + "2022-11-15", + "2023-08-16", + "2023-10-16", + "2024-04-10", + "2024-06-20", + "2024-09-30.acacia", + "2024-10-28.acacia", + "2024-11-20.acacia", + "2024-12-18.acacia", + "2025-01-27.acacia", + "2025-02-24.acacia", + "2025-03-01.dashboard", + "2025-03-31.basil", + "2025-04-30.basil", + "2025-05-28.basil", + "2025-06-30.basil", + "2025-07-30.basil", + "2025-08-27.basil", + "2025-09-30.clover", + ] + ] + """ + Events sent to this endpoint will be generated with this Stripe Version instead of your account's default Stripe Version. + """ + connect: NotRequired[bool] + """ + Whether this endpoint should receive events from connected accounts (`true`), or from your account (`false`). Defaults to `false`. + """ + description: NotRequired["Literal['']|str"] + """ + An optional description of what the webhook is used for. + """ + enabled_events: List[ + Literal[ + "*", + "account.application.authorized", + "account.application.deauthorized", + "account.external_account.created", + "account.external_account.deleted", + "account.external_account.updated", + "account.updated", + "account_notice.created", + "account_notice.updated", + "application_fee.created", + "application_fee.refund.updated", + "application_fee.refunded", + "balance.available", + "balance_settings.updated", + "billing.alert.triggered", + "billing_portal.configuration.created", + "billing_portal.configuration.updated", + "billing_portal.session.created", + "capability.updated", + "capital.financing_offer.accepted", + "capital.financing_offer.canceled", + "capital.financing_offer.created", + "capital.financing_offer.expired", + "capital.financing_offer.fully_repaid", + "capital.financing_offer.paid_out", + "capital.financing_offer.rejected", + "capital.financing_offer.replacement_created", + "capital.financing_transaction.created", + "cash_balance.funds_available", + "charge.captured", + "charge.dispute.closed", + "charge.dispute.created", + "charge.dispute.funds_reinstated", + "charge.dispute.funds_withdrawn", + "charge.dispute.updated", + "charge.expired", + "charge.failed", + "charge.pending", + "charge.refund.updated", + "charge.refunded", + "charge.succeeded", + "charge.updated", + "checkout.session.async_payment_failed", + "checkout.session.async_payment_succeeded", + "checkout.session.completed", + "checkout.session.expired", + "climate.order.canceled", + "climate.order.created", + "climate.order.delayed", + "climate.order.delivered", + "climate.order.product_substituted", + "climate.product.created", + "climate.product.pricing_updated", + "coupon.created", + "coupon.deleted", + "coupon.updated", + "credit_note.created", + "credit_note.updated", + "credit_note.voided", + "customer.created", + "customer.deleted", + "customer.discount.created", + "customer.discount.deleted", + "customer.discount.updated", + "customer.source.created", + "customer.source.deleted", + "customer.source.expiring", + "customer.source.updated", + "customer.subscription.collection_paused", + "customer.subscription.collection_resumed", + "customer.subscription.created", + "customer.subscription.custom_event", + "customer.subscription.deleted", + "customer.subscription.paused", + "customer.subscription.pending_update_applied", + "customer.subscription.pending_update_expired", + "customer.subscription.price_migration_failed", + "customer.subscription.resumed", + "customer.subscription.trial_will_end", + "customer.subscription.updated", + "customer.tax_id.created", + "customer.tax_id.deleted", + "customer.tax_id.updated", + "customer.updated", + "customer_cash_balance_transaction.created", + "entitlements.active_entitlement_summary.updated", + "file.created", + "financial_connections.account.created", + "financial_connections.account.deactivated", + "financial_connections.account.disconnected", + "financial_connections.account.reactivated", + "financial_connections.account.refreshed_balance", + "financial_connections.account.refreshed_inferred_balances", + "financial_connections.account.refreshed_ownership", + "financial_connections.account.refreshed_transactions", + "financial_connections.session.updated", + "fx_quote.expired", + "identity.verification_session.canceled", + "identity.verification_session.created", + "identity.verification_session.processing", + "identity.verification_session.redacted", + "identity.verification_session.requires_input", + "identity.verification_session.verified", + "invoice.created", + "invoice.deleted", + "invoice.finalization_failed", + "invoice.finalized", + "invoice.marked_uncollectible", + "invoice.overdue", + "invoice.overpaid", + "invoice.paid", + "invoice.payment.overpaid", + "invoice.payment_action_required", + "invoice.payment_attempt_required", + "invoice.payment_failed", + "invoice.payment_succeeded", + "invoice.sent", + "invoice.upcoming", + "invoice.updated", + "invoice.voided", + "invoice.will_be_due", + "invoice_payment.paid", + "invoiceitem.created", + "invoiceitem.deleted", + "issuing_authorization.created", + "issuing_authorization.request", + "issuing_authorization.updated", + "issuing_card.created", + "issuing_card.updated", + "issuing_cardholder.created", + "issuing_cardholder.updated", + "issuing_dispute.closed", + "issuing_dispute.created", + "issuing_dispute.funds_reinstated", + "issuing_dispute.funds_rescinded", + "issuing_dispute.submitted", + "issuing_dispute.updated", + "issuing_dispute_settlement_detail.created", + "issuing_dispute_settlement_detail.updated", + "issuing_fraud_liability_debit.created", + "issuing_personalization_design.activated", + "issuing_personalization_design.deactivated", + "issuing_personalization_design.rejected", + "issuing_personalization_design.updated", + "issuing_settlement.created", + "issuing_settlement.updated", + "issuing_token.created", + "issuing_token.updated", + "issuing_transaction.created", + "issuing_transaction.purchase_details_receipt_updated", + "issuing_transaction.updated", + "mandate.updated", + "payment_intent.amount_capturable_updated", + "payment_intent.canceled", + "payment_intent.created", + "payment_intent.partially_funded", + "payment_intent.payment_failed", + "payment_intent.processing", + "payment_intent.requires_action", + "payment_intent.succeeded", + "payment_link.created", + "payment_link.updated", + "payment_method.attached", + "payment_method.automatically_updated", + "payment_method.detached", + "payment_method.updated", + "payout.canceled", + "payout.created", + "payout.failed", + "payout.paid", + "payout.reconciliation_completed", + "payout.updated", + "person.created", + "person.deleted", + "person.updated", + "plan.created", + "plan.deleted", + "plan.updated", + "price.created", + "price.deleted", + "price.updated", + "privacy.redaction_job.canceled", + "privacy.redaction_job.created", + "privacy.redaction_job.ready", + "privacy.redaction_job.succeeded", + "privacy.redaction_job.validation_error", + "product.created", + "product.deleted", + "product.updated", + "promotion_code.created", + "promotion_code.updated", + "quote.accept_failed", + "quote.accepted", + "quote.accepting", + "quote.canceled", + "quote.created", + "quote.draft", + "quote.finalized", + "quote.reestimate_failed", + "quote.reestimated", + "quote.stale", + "radar.early_fraud_warning.created", + "radar.early_fraud_warning.updated", + "refund.created", + "refund.failed", + "refund.updated", + "reporting.report_run.failed", + "reporting.report_run.succeeded", + "reporting.report_type.updated", + "review.closed", + "review.opened", + "setup_intent.canceled", + "setup_intent.created", + "setup_intent.requires_action", + "setup_intent.setup_failed", + "setup_intent.succeeded", + "sigma.scheduled_query_run.created", + "source.canceled", + "source.chargeable", + "source.failed", + "source.mandate_notification", + "source.refund_attributes_required", + "source.transaction.created", + "source.transaction.updated", + "subscription_schedule.aborted", + "subscription_schedule.canceled", + "subscription_schedule.completed", + "subscription_schedule.created", + "subscription_schedule.expiring", + "subscription_schedule.price_migration_failed", + "subscription_schedule.released", + "subscription_schedule.updated", + "tax.form.updated", + "tax.settings.updated", + "tax_rate.created", + "tax_rate.updated", + "terminal.reader.action_failed", + "terminal.reader.action_succeeded", + "terminal.reader.action_updated", + "test_helpers.test_clock.advancing", + "test_helpers.test_clock.created", + "test_helpers.test_clock.deleted", + "test_helpers.test_clock.internal_failure", + "test_helpers.test_clock.ready", + "topup.canceled", + "topup.created", + "topup.failed", + "topup.reversed", + "topup.succeeded", + "transfer.created", + "transfer.reversed", + "transfer.updated", + "treasury.credit_reversal.created", + "treasury.credit_reversal.posted", + "treasury.debit_reversal.completed", + "treasury.debit_reversal.created", + "treasury.debit_reversal.initial_credit_granted", + "treasury.financial_account.closed", + "treasury.financial_account.created", + "treasury.financial_account.features_status_updated", + "treasury.inbound_transfer.canceled", + "treasury.inbound_transfer.created", + "treasury.inbound_transfer.failed", + "treasury.inbound_transfer.succeeded", + "treasury.outbound_payment.canceled", + "treasury.outbound_payment.created", + "treasury.outbound_payment.expected_arrival_date_updated", + "treasury.outbound_payment.failed", + "treasury.outbound_payment.posted", + "treasury.outbound_payment.returned", + "treasury.outbound_payment.tracking_details_updated", + "treasury.outbound_transfer.canceled", + "treasury.outbound_transfer.created", + "treasury.outbound_transfer.expected_arrival_date_updated", + "treasury.outbound_transfer.failed", + "treasury.outbound_transfer.posted", + "treasury.outbound_transfer.returned", + "treasury.outbound_transfer.tracking_details_updated", + "treasury.received_credit.created", + "treasury.received_credit.failed", + "treasury.received_credit.succeeded", + "treasury.received_debit.created", + "billing.credit_balance_transaction.created", + "billing.credit_grant.created", + "billing.credit_grant.updated", + "billing.meter.created", + "billing.meter.deactivated", + "billing.meter.reactivated", + "billing.meter.updated", + ] + ] + """ + The list of events to enable for this endpoint. You may specify `['*']` to enable all events, except those that require explicit selection. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + url: str + """ + The URL of the webhook endpoint. + """ diff --git a/stripe/params/_webhook_endpoint_delete_params.py b/stripe/params/_webhook_endpoint_delete_params.py new file mode 100644 index 000000000..8c17a5d89 --- /dev/null +++ b/stripe/params/_webhook_endpoint_delete_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions + + +class WebhookEndpointDeleteParams(RequestOptions): + pass diff --git a/stripe/params/_webhook_endpoint_list_params.py b/stripe/params/_webhook_endpoint_list_params.py new file mode 100644 index 000000000..837e62fdb --- /dev/null +++ b/stripe/params/_webhook_endpoint_list_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 WebhookEndpointListParams(RequestOptions): + 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. + """ diff --git a/stripe/params/_webhook_endpoint_modify_params.py b/stripe/params/_webhook_endpoint_modify_params.py new file mode 100644 index 000000000..4ad000b7e --- /dev/null +++ b/stripe/params/_webhook_endpoint_modify_params.py @@ -0,0 +1,326 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import Literal, NotRequired + + +class WebhookEndpointModifyParams(RequestOptions): + description: NotRequired["Literal['']|str"] + """ + An optional description of what the webhook is used for. + """ + disabled: NotRequired[bool] + """ + Disable the webhook endpoint if set to true. + """ + enabled_events: NotRequired[ + List[ + Literal[ + "*", + "account.application.authorized", + "account.application.deauthorized", + "account.external_account.created", + "account.external_account.deleted", + "account.external_account.updated", + "account.updated", + "account_notice.created", + "account_notice.updated", + "application_fee.created", + "application_fee.refund.updated", + "application_fee.refunded", + "balance.available", + "balance_settings.updated", + "billing.alert.triggered", + "billing_portal.configuration.created", + "billing_portal.configuration.updated", + "billing_portal.session.created", + "capability.updated", + "capital.financing_offer.accepted", + "capital.financing_offer.canceled", + "capital.financing_offer.created", + "capital.financing_offer.expired", + "capital.financing_offer.fully_repaid", + "capital.financing_offer.paid_out", + "capital.financing_offer.rejected", + "capital.financing_offer.replacement_created", + "capital.financing_transaction.created", + "cash_balance.funds_available", + "charge.captured", + "charge.dispute.closed", + "charge.dispute.created", + "charge.dispute.funds_reinstated", + "charge.dispute.funds_withdrawn", + "charge.dispute.updated", + "charge.expired", + "charge.failed", + "charge.pending", + "charge.refund.updated", + "charge.refunded", + "charge.succeeded", + "charge.updated", + "checkout.session.async_payment_failed", + "checkout.session.async_payment_succeeded", + "checkout.session.completed", + "checkout.session.expired", + "climate.order.canceled", + "climate.order.created", + "climate.order.delayed", + "climate.order.delivered", + "climate.order.product_substituted", + "climate.product.created", + "climate.product.pricing_updated", + "coupon.created", + "coupon.deleted", + "coupon.updated", + "credit_note.created", + "credit_note.updated", + "credit_note.voided", + "customer.created", + "customer.deleted", + "customer.discount.created", + "customer.discount.deleted", + "customer.discount.updated", + "customer.source.created", + "customer.source.deleted", + "customer.source.expiring", + "customer.source.updated", + "customer.subscription.collection_paused", + "customer.subscription.collection_resumed", + "customer.subscription.created", + "customer.subscription.custom_event", + "customer.subscription.deleted", + "customer.subscription.paused", + "customer.subscription.pending_update_applied", + "customer.subscription.pending_update_expired", + "customer.subscription.price_migration_failed", + "customer.subscription.resumed", + "customer.subscription.trial_will_end", + "customer.subscription.updated", + "customer.tax_id.created", + "customer.tax_id.deleted", + "customer.tax_id.updated", + "customer.updated", + "customer_cash_balance_transaction.created", + "entitlements.active_entitlement_summary.updated", + "file.created", + "financial_connections.account.created", + "financial_connections.account.deactivated", + "financial_connections.account.disconnected", + "financial_connections.account.reactivated", + "financial_connections.account.refreshed_balance", + "financial_connections.account.refreshed_inferred_balances", + "financial_connections.account.refreshed_ownership", + "financial_connections.account.refreshed_transactions", + "financial_connections.session.updated", + "fx_quote.expired", + "identity.verification_session.canceled", + "identity.verification_session.created", + "identity.verification_session.processing", + "identity.verification_session.redacted", + "identity.verification_session.requires_input", + "identity.verification_session.verified", + "invoice.created", + "invoice.deleted", + "invoice.finalization_failed", + "invoice.finalized", + "invoice.marked_uncollectible", + "invoice.overdue", + "invoice.overpaid", + "invoice.paid", + "invoice.payment.overpaid", + "invoice.payment_action_required", + "invoice.payment_attempt_required", + "invoice.payment_failed", + "invoice.payment_succeeded", + "invoice.sent", + "invoice.upcoming", + "invoice.updated", + "invoice.voided", + "invoice.will_be_due", + "invoice_payment.paid", + "invoiceitem.created", + "invoiceitem.deleted", + "issuing_authorization.created", + "issuing_authorization.request", + "issuing_authorization.updated", + "issuing_card.created", + "issuing_card.updated", + "issuing_cardholder.created", + "issuing_cardholder.updated", + "issuing_dispute.closed", + "issuing_dispute.created", + "issuing_dispute.funds_reinstated", + "issuing_dispute.funds_rescinded", + "issuing_dispute.submitted", + "issuing_dispute.updated", + "issuing_dispute_settlement_detail.created", + "issuing_dispute_settlement_detail.updated", + "issuing_fraud_liability_debit.created", + "issuing_personalization_design.activated", + "issuing_personalization_design.deactivated", + "issuing_personalization_design.rejected", + "issuing_personalization_design.updated", + "issuing_settlement.created", + "issuing_settlement.updated", + "issuing_token.created", + "issuing_token.updated", + "issuing_transaction.created", + "issuing_transaction.purchase_details_receipt_updated", + "issuing_transaction.updated", + "mandate.updated", + "payment_intent.amount_capturable_updated", + "payment_intent.canceled", + "payment_intent.created", + "payment_intent.partially_funded", + "payment_intent.payment_failed", + "payment_intent.processing", + "payment_intent.requires_action", + "payment_intent.succeeded", + "payment_link.created", + "payment_link.updated", + "payment_method.attached", + "payment_method.automatically_updated", + "payment_method.detached", + "payment_method.updated", + "payout.canceled", + "payout.created", + "payout.failed", + "payout.paid", + "payout.reconciliation_completed", + "payout.updated", + "person.created", + "person.deleted", + "person.updated", + "plan.created", + "plan.deleted", + "plan.updated", + "price.created", + "price.deleted", + "price.updated", + "privacy.redaction_job.canceled", + "privacy.redaction_job.created", + "privacy.redaction_job.ready", + "privacy.redaction_job.succeeded", + "privacy.redaction_job.validation_error", + "product.created", + "product.deleted", + "product.updated", + "promotion_code.created", + "promotion_code.updated", + "quote.accept_failed", + "quote.accepted", + "quote.accepting", + "quote.canceled", + "quote.created", + "quote.draft", + "quote.finalized", + "quote.reestimate_failed", + "quote.reestimated", + "quote.stale", + "radar.early_fraud_warning.created", + "radar.early_fraud_warning.updated", + "refund.created", + "refund.failed", + "refund.updated", + "reporting.report_run.failed", + "reporting.report_run.succeeded", + "reporting.report_type.updated", + "review.closed", + "review.opened", + "setup_intent.canceled", + "setup_intent.created", + "setup_intent.requires_action", + "setup_intent.setup_failed", + "setup_intent.succeeded", + "sigma.scheduled_query_run.created", + "source.canceled", + "source.chargeable", + "source.failed", + "source.mandate_notification", + "source.refund_attributes_required", + "source.transaction.created", + "source.transaction.updated", + "subscription_schedule.aborted", + "subscription_schedule.canceled", + "subscription_schedule.completed", + "subscription_schedule.created", + "subscription_schedule.expiring", + "subscription_schedule.price_migration_failed", + "subscription_schedule.released", + "subscription_schedule.updated", + "tax.form.updated", + "tax.settings.updated", + "tax_rate.created", + "tax_rate.updated", + "terminal.reader.action_failed", + "terminal.reader.action_succeeded", + "terminal.reader.action_updated", + "test_helpers.test_clock.advancing", + "test_helpers.test_clock.created", + "test_helpers.test_clock.deleted", + "test_helpers.test_clock.internal_failure", + "test_helpers.test_clock.ready", + "topup.canceled", + "topup.created", + "topup.failed", + "topup.reversed", + "topup.succeeded", + "transfer.created", + "transfer.reversed", + "transfer.updated", + "treasury.credit_reversal.created", + "treasury.credit_reversal.posted", + "treasury.debit_reversal.completed", + "treasury.debit_reversal.created", + "treasury.debit_reversal.initial_credit_granted", + "treasury.financial_account.closed", + "treasury.financial_account.created", + "treasury.financial_account.features_status_updated", + "treasury.inbound_transfer.canceled", + "treasury.inbound_transfer.created", + "treasury.inbound_transfer.failed", + "treasury.inbound_transfer.succeeded", + "treasury.outbound_payment.canceled", + "treasury.outbound_payment.created", + "treasury.outbound_payment.expected_arrival_date_updated", + "treasury.outbound_payment.failed", + "treasury.outbound_payment.posted", + "treasury.outbound_payment.returned", + "treasury.outbound_payment.tracking_details_updated", + "treasury.outbound_transfer.canceled", + "treasury.outbound_transfer.created", + "treasury.outbound_transfer.expected_arrival_date_updated", + "treasury.outbound_transfer.failed", + "treasury.outbound_transfer.posted", + "treasury.outbound_transfer.returned", + "treasury.outbound_transfer.tracking_details_updated", + "treasury.received_credit.created", + "treasury.received_credit.failed", + "treasury.received_credit.succeeded", + "treasury.received_debit.created", + "billing.credit_balance_transaction.created", + "billing.credit_grant.created", + "billing.credit_grant.updated", + "billing.meter.created", + "billing.meter.deactivated", + "billing.meter.reactivated", + "billing.meter.updated", + ] + ] + ] + """ + The list of events to enable for this endpoint. You may specify `['*']` to enable all events, except those that require explicit selection. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + url: NotRequired[str] + """ + The URL of the webhook endpoint. + """ diff --git a/stripe/params/_webhook_endpoint_retrieve_params.py b/stripe/params/_webhook_endpoint_retrieve_params.py new file mode 100644 index 000000000..3387b0f27 --- /dev/null +++ b/stripe/params/_webhook_endpoint_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 WebhookEndpointRetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/_webhook_endpoint_update_params.py b/stripe/params/_webhook_endpoint_update_params.py new file mode 100644 index 000000000..aba2f6d80 --- /dev/null +++ b/stripe/params/_webhook_endpoint_update_params.py @@ -0,0 +1,325 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class WebhookEndpointUpdateParams(TypedDict): + description: NotRequired["Literal['']|str"] + """ + An optional description of what the webhook is used for. + """ + disabled: NotRequired[bool] + """ + Disable the webhook endpoint if set to true. + """ + enabled_events: NotRequired[ + List[ + Literal[ + "*", + "account.application.authorized", + "account.application.deauthorized", + "account.external_account.created", + "account.external_account.deleted", + "account.external_account.updated", + "account.updated", + "account_notice.created", + "account_notice.updated", + "application_fee.created", + "application_fee.refund.updated", + "application_fee.refunded", + "balance.available", + "balance_settings.updated", + "billing.alert.triggered", + "billing_portal.configuration.created", + "billing_portal.configuration.updated", + "billing_portal.session.created", + "capability.updated", + "capital.financing_offer.accepted", + "capital.financing_offer.canceled", + "capital.financing_offer.created", + "capital.financing_offer.expired", + "capital.financing_offer.fully_repaid", + "capital.financing_offer.paid_out", + "capital.financing_offer.rejected", + "capital.financing_offer.replacement_created", + "capital.financing_transaction.created", + "cash_balance.funds_available", + "charge.captured", + "charge.dispute.closed", + "charge.dispute.created", + "charge.dispute.funds_reinstated", + "charge.dispute.funds_withdrawn", + "charge.dispute.updated", + "charge.expired", + "charge.failed", + "charge.pending", + "charge.refund.updated", + "charge.refunded", + "charge.succeeded", + "charge.updated", + "checkout.session.async_payment_failed", + "checkout.session.async_payment_succeeded", + "checkout.session.completed", + "checkout.session.expired", + "climate.order.canceled", + "climate.order.created", + "climate.order.delayed", + "climate.order.delivered", + "climate.order.product_substituted", + "climate.product.created", + "climate.product.pricing_updated", + "coupon.created", + "coupon.deleted", + "coupon.updated", + "credit_note.created", + "credit_note.updated", + "credit_note.voided", + "customer.created", + "customer.deleted", + "customer.discount.created", + "customer.discount.deleted", + "customer.discount.updated", + "customer.source.created", + "customer.source.deleted", + "customer.source.expiring", + "customer.source.updated", + "customer.subscription.collection_paused", + "customer.subscription.collection_resumed", + "customer.subscription.created", + "customer.subscription.custom_event", + "customer.subscription.deleted", + "customer.subscription.paused", + "customer.subscription.pending_update_applied", + "customer.subscription.pending_update_expired", + "customer.subscription.price_migration_failed", + "customer.subscription.resumed", + "customer.subscription.trial_will_end", + "customer.subscription.updated", + "customer.tax_id.created", + "customer.tax_id.deleted", + "customer.tax_id.updated", + "customer.updated", + "customer_cash_balance_transaction.created", + "entitlements.active_entitlement_summary.updated", + "file.created", + "financial_connections.account.created", + "financial_connections.account.deactivated", + "financial_connections.account.disconnected", + "financial_connections.account.reactivated", + "financial_connections.account.refreshed_balance", + "financial_connections.account.refreshed_inferred_balances", + "financial_connections.account.refreshed_ownership", + "financial_connections.account.refreshed_transactions", + "financial_connections.session.updated", + "fx_quote.expired", + "identity.verification_session.canceled", + "identity.verification_session.created", + "identity.verification_session.processing", + "identity.verification_session.redacted", + "identity.verification_session.requires_input", + "identity.verification_session.verified", + "invoice.created", + "invoice.deleted", + "invoice.finalization_failed", + "invoice.finalized", + "invoice.marked_uncollectible", + "invoice.overdue", + "invoice.overpaid", + "invoice.paid", + "invoice.payment.overpaid", + "invoice.payment_action_required", + "invoice.payment_attempt_required", + "invoice.payment_failed", + "invoice.payment_succeeded", + "invoice.sent", + "invoice.upcoming", + "invoice.updated", + "invoice.voided", + "invoice.will_be_due", + "invoice_payment.paid", + "invoiceitem.created", + "invoiceitem.deleted", + "issuing_authorization.created", + "issuing_authorization.request", + "issuing_authorization.updated", + "issuing_card.created", + "issuing_card.updated", + "issuing_cardholder.created", + "issuing_cardholder.updated", + "issuing_dispute.closed", + "issuing_dispute.created", + "issuing_dispute.funds_reinstated", + "issuing_dispute.funds_rescinded", + "issuing_dispute.submitted", + "issuing_dispute.updated", + "issuing_dispute_settlement_detail.created", + "issuing_dispute_settlement_detail.updated", + "issuing_fraud_liability_debit.created", + "issuing_personalization_design.activated", + "issuing_personalization_design.deactivated", + "issuing_personalization_design.rejected", + "issuing_personalization_design.updated", + "issuing_settlement.created", + "issuing_settlement.updated", + "issuing_token.created", + "issuing_token.updated", + "issuing_transaction.created", + "issuing_transaction.purchase_details_receipt_updated", + "issuing_transaction.updated", + "mandate.updated", + "payment_intent.amount_capturable_updated", + "payment_intent.canceled", + "payment_intent.created", + "payment_intent.partially_funded", + "payment_intent.payment_failed", + "payment_intent.processing", + "payment_intent.requires_action", + "payment_intent.succeeded", + "payment_link.created", + "payment_link.updated", + "payment_method.attached", + "payment_method.automatically_updated", + "payment_method.detached", + "payment_method.updated", + "payout.canceled", + "payout.created", + "payout.failed", + "payout.paid", + "payout.reconciliation_completed", + "payout.updated", + "person.created", + "person.deleted", + "person.updated", + "plan.created", + "plan.deleted", + "plan.updated", + "price.created", + "price.deleted", + "price.updated", + "privacy.redaction_job.canceled", + "privacy.redaction_job.created", + "privacy.redaction_job.ready", + "privacy.redaction_job.succeeded", + "privacy.redaction_job.validation_error", + "product.created", + "product.deleted", + "product.updated", + "promotion_code.created", + "promotion_code.updated", + "quote.accept_failed", + "quote.accepted", + "quote.accepting", + "quote.canceled", + "quote.created", + "quote.draft", + "quote.finalized", + "quote.reestimate_failed", + "quote.reestimated", + "quote.stale", + "radar.early_fraud_warning.created", + "radar.early_fraud_warning.updated", + "refund.created", + "refund.failed", + "refund.updated", + "reporting.report_run.failed", + "reporting.report_run.succeeded", + "reporting.report_type.updated", + "review.closed", + "review.opened", + "setup_intent.canceled", + "setup_intent.created", + "setup_intent.requires_action", + "setup_intent.setup_failed", + "setup_intent.succeeded", + "sigma.scheduled_query_run.created", + "source.canceled", + "source.chargeable", + "source.failed", + "source.mandate_notification", + "source.refund_attributes_required", + "source.transaction.created", + "source.transaction.updated", + "subscription_schedule.aborted", + "subscription_schedule.canceled", + "subscription_schedule.completed", + "subscription_schedule.created", + "subscription_schedule.expiring", + "subscription_schedule.price_migration_failed", + "subscription_schedule.released", + "subscription_schedule.updated", + "tax.form.updated", + "tax.settings.updated", + "tax_rate.created", + "tax_rate.updated", + "terminal.reader.action_failed", + "terminal.reader.action_succeeded", + "terminal.reader.action_updated", + "test_helpers.test_clock.advancing", + "test_helpers.test_clock.created", + "test_helpers.test_clock.deleted", + "test_helpers.test_clock.internal_failure", + "test_helpers.test_clock.ready", + "topup.canceled", + "topup.created", + "topup.failed", + "topup.reversed", + "topup.succeeded", + "transfer.created", + "transfer.reversed", + "transfer.updated", + "treasury.credit_reversal.created", + "treasury.credit_reversal.posted", + "treasury.debit_reversal.completed", + "treasury.debit_reversal.created", + "treasury.debit_reversal.initial_credit_granted", + "treasury.financial_account.closed", + "treasury.financial_account.created", + "treasury.financial_account.features_status_updated", + "treasury.inbound_transfer.canceled", + "treasury.inbound_transfer.created", + "treasury.inbound_transfer.failed", + "treasury.inbound_transfer.succeeded", + "treasury.outbound_payment.canceled", + "treasury.outbound_payment.created", + "treasury.outbound_payment.expected_arrival_date_updated", + "treasury.outbound_payment.failed", + "treasury.outbound_payment.posted", + "treasury.outbound_payment.returned", + "treasury.outbound_payment.tracking_details_updated", + "treasury.outbound_transfer.canceled", + "treasury.outbound_transfer.created", + "treasury.outbound_transfer.expected_arrival_date_updated", + "treasury.outbound_transfer.failed", + "treasury.outbound_transfer.posted", + "treasury.outbound_transfer.returned", + "treasury.outbound_transfer.tracking_details_updated", + "treasury.received_credit.created", + "treasury.received_credit.failed", + "treasury.received_credit.succeeded", + "treasury.received_debit.created", + "billing.credit_balance_transaction.created", + "billing.credit_grant.created", + "billing.credit_grant.updated", + "billing.meter.created", + "billing.meter.deactivated", + "billing.meter.reactivated", + "billing.meter.updated", + ] + ] + ] + """ + The list of events to enable for this endpoint. You may specify `['*']` to enable all events, except those that require explicit selection. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + url: NotRequired[str] + """ + The URL of the webhook endpoint. + """ diff --git a/stripe/params/apps/__init__.py b/stripe/params/apps/__init__.py new file mode 100644 index 000000000..357ad6f63 --- /dev/null +++ b/stripe/params/apps/__init__.py @@ -0,0 +1,14 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe.params.apps._secret_create_params import ( + SecretCreateParams as SecretCreateParams, +) +from stripe.params.apps._secret_delete_where_params import ( + SecretDeleteWhereParams as SecretDeleteWhereParams, +) +from stripe.params.apps._secret_find_params import ( + SecretFindParams as SecretFindParams, +) +from stripe.params.apps._secret_list_params import ( + SecretListParams as SecretListParams, +) diff --git a/stripe/params/apps/_secret_create_params.py b/stripe/params/apps/_secret_create_params.py new file mode 100644 index 000000000..8fe08f4bd --- /dev/null +++ b/stripe/params/apps/_secret_create_params.py @@ -0,0 +1,39 @@ +# -*- 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, TypedDict + + +class SecretCreateParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + expires_at: NotRequired[int] + """ + The Unix timestamp for the expiry time of the secret, after which the secret deletes. + """ + name: str + """ + A name for the secret that's unique within the scope. + """ + payload: str + """ + The plaintext secret value to be stored. + """ + scope: "SecretCreateParamsScope" + """ + Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user. + """ + + +class SecretCreateParamsScope(TypedDict): + type: Literal["account", "user"] + """ + The secret scope type. + """ + user: NotRequired[str] + """ + The user ID. This field is required if `type` is set to `user`, and should not be provided if `type` is set to `account`. + """ diff --git a/stripe/params/apps/_secret_delete_where_params.py b/stripe/params/apps/_secret_delete_where_params.py new file mode 100644 index 000000000..ad26f74b7 --- /dev/null +++ b/stripe/params/apps/_secret_delete_where_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 Literal, NotRequired, TypedDict + + +class SecretDeleteWhereParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + name: str + """ + A name for the secret that's unique within the scope. + """ + scope: "SecretDeleteWhereParamsScope" + """ + Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user. + """ + + +class SecretDeleteWhereParamsScope(TypedDict): + type: Literal["account", "user"] + """ + The secret scope type. + """ + user: NotRequired[str] + """ + The user ID. This field is required if `type` is set to `user`, and should not be provided if `type` is set to `account`. + """ diff --git a/stripe/params/apps/_secret_find_params.py b/stripe/params/apps/_secret_find_params.py new file mode 100644 index 000000000..4f47911bc --- /dev/null +++ b/stripe/params/apps/_secret_find_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 Literal, NotRequired, TypedDict + + +class SecretFindParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + name: str + """ + A name for the secret that's unique within the scope. + """ + scope: "SecretFindParamsScope" + """ + Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user. + """ + + +class SecretFindParamsScope(TypedDict): + type: Literal["account", "user"] + """ + The secret scope type. + """ + user: NotRequired[str] + """ + The user ID. This field is required if `type` is set to `user`, and should not be provided if `type` is set to `account`. + """ diff --git a/stripe/params/apps/_secret_list_params.py b/stripe/params/apps/_secret_list_params.py new file mode 100644 index 000000000..b3856e859 --- /dev/null +++ b/stripe/params/apps/_secret_list_params.py @@ -0,0 +1,39 @@ +# -*- 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, TypedDict + + +class SecretListParams(RequestOptions): + 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. + """ + scope: "SecretListParamsScope" + """ + Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user. + """ + 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 SecretListParamsScope(TypedDict): + type: Literal["account", "user"] + """ + The secret scope type. + """ + user: NotRequired[str] + """ + The user ID. This field is required if `type` is set to `user`, and should not be provided if `type` is set to `account`. + """ diff --git a/stripe/params/billing/__init__.py b/stripe/params/billing/__init__.py new file mode 100644 index 000000000..ca3402bb8 --- /dev/null +++ b/stripe/params/billing/__init__.py @@ -0,0 +1,84 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe.params.billing import analytics as analytics +from stripe.params.billing._alert_activate_params import ( + AlertActivateParams as AlertActivateParams, +) +from stripe.params.billing._alert_archive_params import ( + AlertArchiveParams as AlertArchiveParams, +) +from stripe.params.billing._alert_create_params import ( + AlertCreateParams as AlertCreateParams, +) +from stripe.params.billing._alert_deactivate_params import ( + AlertDeactivateParams as AlertDeactivateParams, +) +from stripe.params.billing._alert_list_params import ( + AlertListParams as AlertListParams, +) +from stripe.params.billing._alert_retrieve_params import ( + AlertRetrieveParams as AlertRetrieveParams, +) +from stripe.params.billing._credit_balance_summary_retrieve_params import ( + CreditBalanceSummaryRetrieveParams as CreditBalanceSummaryRetrieveParams, +) +from stripe.params.billing._credit_balance_transaction_list_params import ( + CreditBalanceTransactionListParams as CreditBalanceTransactionListParams, +) +from stripe.params.billing._credit_balance_transaction_retrieve_params import ( + CreditBalanceTransactionRetrieveParams as CreditBalanceTransactionRetrieveParams, +) +from stripe.params.billing._credit_grant_create_params import ( + CreditGrantCreateParams as CreditGrantCreateParams, +) +from stripe.params.billing._credit_grant_expire_params import ( + CreditGrantExpireParams as CreditGrantExpireParams, +) +from stripe.params.billing._credit_grant_list_params import ( + CreditGrantListParams as CreditGrantListParams, +) +from stripe.params.billing._credit_grant_modify_params import ( + CreditGrantModifyParams as CreditGrantModifyParams, +) +from stripe.params.billing._credit_grant_retrieve_params import ( + CreditGrantRetrieveParams as CreditGrantRetrieveParams, +) +from stripe.params.billing._credit_grant_update_params import ( + CreditGrantUpdateParams as CreditGrantUpdateParams, +) +from stripe.params.billing._credit_grant_void_grant_params import ( + CreditGrantVoidGrantParams as CreditGrantVoidGrantParams, +) +from stripe.params.billing._meter_create_params import ( + MeterCreateParams as MeterCreateParams, +) +from stripe.params.billing._meter_deactivate_params import ( + MeterDeactivateParams as MeterDeactivateParams, +) +from stripe.params.billing._meter_event_adjustment_create_params import ( + MeterEventAdjustmentCreateParams as MeterEventAdjustmentCreateParams, +) +from stripe.params.billing._meter_event_create_params import ( + MeterEventCreateParams as MeterEventCreateParams, +) +from stripe.params.billing._meter_event_summary_list_params import ( + MeterEventSummaryListParams as MeterEventSummaryListParams, +) +from stripe.params.billing._meter_list_event_summaries_params import ( + MeterListEventSummariesParams as MeterListEventSummariesParams, +) +from stripe.params.billing._meter_list_params import ( + MeterListParams as MeterListParams, +) +from stripe.params.billing._meter_modify_params import ( + MeterModifyParams as MeterModifyParams, +) +from stripe.params.billing._meter_reactivate_params import ( + MeterReactivateParams as MeterReactivateParams, +) +from stripe.params.billing._meter_retrieve_params import ( + MeterRetrieveParams as MeterRetrieveParams, +) +from stripe.params.billing._meter_update_params import ( + MeterUpdateParams as MeterUpdateParams, +) diff --git a/stripe/params/billing/_alert_activate_params.py b/stripe/params/billing/_alert_activate_params.py new file mode 100644 index 000000000..f68a2b712 --- /dev/null +++ b/stripe/params/billing/_alert_activate_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 AlertActivateParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/billing/_alert_archive_params.py b/stripe/params/billing/_alert_archive_params.py new file mode 100644 index 000000000..3213ed47f --- /dev/null +++ b/stripe/params/billing/_alert_archive_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 AlertArchiveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/billing/_alert_create_params.py b/stripe/params/billing/_alert_create_params.py new file mode 100644 index 000000000..f962c3eb5 --- /dev/null +++ b/stripe/params/billing/_alert_create_params.py @@ -0,0 +1,186 @@ +# -*- 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, TypedDict + + +class AlertCreateParams(RequestOptions): + alert_type: Literal["credit_balance_threshold", "usage_threshold"] + """ + The type of alert to create. + """ + credit_balance_threshold: NotRequired[ + "AlertCreateParamsCreditBalanceThreshold" + ] + """ + The configuration of the credit balance threshold. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + title: str + """ + The title of the alert. + """ + usage_threshold: NotRequired["AlertCreateParamsUsageThreshold"] + """ + The configuration of the usage threshold. + """ + + +class AlertCreateParamsCreditBalanceThreshold(TypedDict): + filters: NotRequired[List["AlertCreateParamsCreditBalanceThresholdFilter"]] + """ + The filters allows limiting the scope of this credit balance alert. You must specify a customer filter at this time. + """ + lte: "AlertCreateParamsCreditBalanceThresholdLte" + """ + Defines at which value the alert will fire. + """ + + +class AlertCreateParamsCreditBalanceThresholdFilter(TypedDict): + credit_grants: NotRequired[ + "AlertCreateParamsCreditBalanceThresholdFilterCreditGrants" + ] + """ + The credit grants for which to configure the credit balance alert. + """ + customer: NotRequired[str] + """ + Limit the scope to this credit balance alert only to this customer. + """ + type: Literal["customer", "tenant"] + """ + What type of filter is being applied to this credit balance alert. + """ + + +class AlertCreateParamsCreditBalanceThresholdFilterCreditGrants(TypedDict): + applicability_config: "AlertCreateParamsCreditBalanceThresholdFilterCreditGrantsApplicabilityConfig" + """ + The applicability configuration for this credit grants filter. + """ + + +class AlertCreateParamsCreditBalanceThresholdFilterCreditGrantsApplicabilityConfig( + TypedDict, +): + scope: "AlertCreateParamsCreditBalanceThresholdFilterCreditGrantsApplicabilityConfigScope" + """ + Specify the scope of this applicability config. + """ + + +class AlertCreateParamsCreditBalanceThresholdFilterCreditGrantsApplicabilityConfigScope( + TypedDict, +): + billable_items: NotRequired[ + List[ + "AlertCreateParamsCreditBalanceThresholdFilterCreditGrantsApplicabilityConfigScopeBillableItem" + ] + ] + """ + A list of billable items that the credit grant can apply to. We currently only support metered billable items. Cannot be used in combination with `price_type` or `prices`. + """ + price_type: NotRequired[Literal["metered"]] + """ + The price type that credit grants can apply to. We currently only support the `metered` price type. Cannot be used in combination with `prices`. + """ + prices: NotRequired[ + List[ + "AlertCreateParamsCreditBalanceThresholdFilterCreditGrantsApplicabilityConfigScopePrice" + ] + ] + """ + A list of prices that the credit grant can apply to. We currently only support the `metered` prices. Cannot be used in combination with `price_type`. + """ + + +class AlertCreateParamsCreditBalanceThresholdFilterCreditGrantsApplicabilityConfigScopeBillableItem( + TypedDict, +): + id: str + """ + The billable item ID this credit grant should apply to. + """ + + +class AlertCreateParamsCreditBalanceThresholdFilterCreditGrantsApplicabilityConfigScopePrice( + TypedDict, +): + id: str + """ + The price ID this credit grant should apply to. + """ + + +class AlertCreateParamsCreditBalanceThresholdLte(TypedDict): + balance_type: Literal["custom_pricing_unit", "monetary"] + """ + Specify the type of this balance. We currently only support `monetary` billing credits. + """ + custom_pricing_unit: NotRequired[ + "AlertCreateParamsCreditBalanceThresholdLteCustomPricingUnit" + ] + """ + The custom pricing unit amount. + """ + monetary: NotRequired["AlertCreateParamsCreditBalanceThresholdLteMonetary"] + """ + The monetary amount. + """ + + +class AlertCreateParamsCreditBalanceThresholdLteCustomPricingUnit(TypedDict): + id: str + """ + The ID of the custom pricing unit. + """ + value: str + """ + A positive decimal string representing the amount of the custom pricing unit threshold. + """ + + +class AlertCreateParamsCreditBalanceThresholdLteMonetary(TypedDict): + currency: str + """ + Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) of the `value` parameter. + """ + value: int + """ + An integer representing the amount of the threshold. + """ + + +class AlertCreateParamsUsageThreshold(TypedDict): + filters: NotRequired[List["AlertCreateParamsUsageThresholdFilter"]] + """ + The filters allows limiting the scope of this usage alert. You can only specify up to one filter at this time. + """ + gte: int + """ + Defines at which value the alert will fire. + """ + meter: str + """ + The [Billing Meter](https://docs.stripe.com/api/billing/meter) ID whose usage is monitored. + """ + recurrence: Literal["one_time"] + """ + Defines how the alert will behave. + """ + + +class AlertCreateParamsUsageThresholdFilter(TypedDict): + customer: NotRequired[str] + """ + Limit the scope to this usage alert only to this customer. + """ + type: Literal["customer"] + """ + What type of filter is being applied to this usage alert. + """ diff --git a/stripe/params/billing/_alert_deactivate_params.py b/stripe/params/billing/_alert_deactivate_params.py new file mode 100644 index 000000000..b69f8cbbe --- /dev/null +++ b/stripe/params/billing/_alert_deactivate_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 AlertDeactivateParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/billing/_alert_list_params.py b/stripe/params/billing/_alert_list_params.py new file mode 100644 index 000000000..fbf5360f9 --- /dev/null +++ b/stripe/params/billing/_alert_list_params.py @@ -0,0 +1,38 @@ +# -*- 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 AlertListParams(RequestOptions): + alert_type: NotRequired[ + Literal["credit_balance_threshold", "usage_threshold"] + ] + """ + Filter results to only include this type of alert. + """ + customer: NotRequired[str] + """ + Filter results to only include alerts for the given customer. + """ + 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. + """ + meter: NotRequired[str] + """ + Filter results to only include alerts with the given meter. + """ + 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. + """ diff --git a/stripe/params/billing/_alert_retrieve_params.py b/stripe/params/billing/_alert_retrieve_params.py new file mode 100644 index 000000000..92df807cb --- /dev/null +++ b/stripe/params/billing/_alert_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 AlertRetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/billing/_credit_balance_summary_retrieve_params.py b/stripe/params/billing/_credit_balance_summary_retrieve_params.py new file mode 100644 index 000000000..439ad71d3 --- /dev/null +++ b/stripe/params/billing/_credit_balance_summary_retrieve_params.py @@ -0,0 +1,80 @@ +# -*- 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, TypedDict + + +class CreditBalanceSummaryRetrieveParams(RequestOptions): + customer: NotRequired[str] + """ + The customer for which to fetch credit balance summary. + """ + customer_account: NotRequired[str] + """ + The account for which to fetch credit balance summary. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + filter: "CreditBalanceSummaryRetrieveParamsFilter" + """ + The filter criteria for the credit balance summary. + """ + + +class CreditBalanceSummaryRetrieveParamsFilter(TypedDict): + applicability_scope: NotRequired[ + "CreditBalanceSummaryRetrieveParamsFilterApplicabilityScope" + ] + """ + The billing credit applicability scope for which to fetch credit balance summary. + """ + credit_grant: NotRequired[str] + """ + The credit grant for which to fetch credit balance summary. + """ + type: Literal["applicability_scope", "credit_grant"] + """ + Specify the type of this filter. + """ + + +class CreditBalanceSummaryRetrieveParamsFilterApplicabilityScope(TypedDict): + billable_items: NotRequired[ + List[ + "CreditBalanceSummaryRetrieveParamsFilterApplicabilityScopeBillableItem" + ] + ] + """ + A list of billable items that the credit grant can apply to. We currently only support metered billable items. Cannot be used in combination with `price_type` or `prices`. + """ + price_type: NotRequired[Literal["metered"]] + """ + The price type that credit grants can apply to. We currently only support the `metered` price type. Cannot be used in combination with `prices`. + """ + prices: NotRequired[ + List["CreditBalanceSummaryRetrieveParamsFilterApplicabilityScopePrice"] + ] + """ + A list of prices that the credit grant can apply to. We currently only support the `metered` prices. Cannot be used in combination with `price_type`. + """ + + +class CreditBalanceSummaryRetrieveParamsFilterApplicabilityScopeBillableItem( + TypedDict, +): + id: str + """ + The billable item ID this credit grant should apply to. + """ + + +class CreditBalanceSummaryRetrieveParamsFilterApplicabilityScopePrice( + TypedDict, +): + id: str + """ + The price ID this credit grant should apply to. + """ diff --git a/stripe/params/billing/_credit_balance_transaction_list_params.py b/stripe/params/billing/_credit_balance_transaction_list_params.py new file mode 100644 index 000000000..b3c5ef43c --- /dev/null +++ b/stripe/params/billing/_credit_balance_transaction_list_params.py @@ -0,0 +1,36 @@ +# -*- 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 CreditBalanceTransactionListParams(RequestOptions): + credit_grant: NotRequired[str] + """ + The credit grant for which to fetch credit balance transactions. + """ + customer: NotRequired[str] + """ + The customer for which to fetch credit balance transactions. + """ + customer_account: NotRequired[str] + """ + The account for which to fetch credit balance transactions. + """ + 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. + """ diff --git a/stripe/params/billing/_credit_balance_transaction_retrieve_params.py b/stripe/params/billing/_credit_balance_transaction_retrieve_params.py new file mode 100644 index 000000000..2a5506825 --- /dev/null +++ b/stripe/params/billing/_credit_balance_transaction_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 CreditBalanceTransactionRetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/billing/_credit_grant_create_params.py b/stripe/params/billing/_credit_grant_create_params.py new file mode 100644 index 000000000..c402c4bcc --- /dev/null +++ b/stripe/params/billing/_credit_grant_create_params.py @@ -0,0 +1,131 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class CreditGrantCreateParams(RequestOptions): + amount: "CreditGrantCreateParamsAmount" + """ + Amount of this credit grant. + """ + applicability_config: "CreditGrantCreateParamsApplicabilityConfig" + """ + Configuration specifying what this credit grant applies to. We currently only support `metered` prices that have a [Billing Meter](https://docs.stripe.com/api/billing/meter) attached to them. + """ + category: Literal["paid", "promotional"] + """ + The category of this credit grant. + """ + customer: NotRequired[str] + """ + ID of the customer to receive the billing credits. + """ + customer_account: NotRequired[str] + """ + ID of the account to receive the billing credits. + """ + effective_at: NotRequired[int] + """ + The time when the billing credits become effective-when they're eligible for use. It defaults to the current timestamp if not specified. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + expires_at: NotRequired[int] + """ + The time when the billing credits expire. If not specified, the billing credits don't expire. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of key-value pairs that you can attach to an object. You can use this to store additional information about the object (for example, cost basis) in a structured format. + """ + name: NotRequired[str] + """ + A descriptive name shown in the Dashboard. + """ + priority: NotRequired[int] + """ + The desired priority for applying this credit grant. If not specified, it will be set to the default value of 50. The highest priority is 0 and the lowest is 100. + """ + + +class CreditGrantCreateParamsAmount(TypedDict): + custom_pricing_unit: NotRequired[ + "CreditGrantCreateParamsAmountCustomPricingUnit" + ] + """ + The custom pricing unit amount. + """ + monetary: NotRequired["CreditGrantCreateParamsAmountMonetary"] + """ + The monetary amount. + """ + type: Literal["custom_pricing_unit", "monetary"] + """ + The type of this amount. We currently only support `monetary` billing credits. + """ + + +class CreditGrantCreateParamsAmountCustomPricingUnit(TypedDict): + id: str + """ + The ID of the custom pricing unit. + """ + value: str + """ + A positive integer representing the amount of the credit grant. + """ + + +class CreditGrantCreateParamsAmountMonetary(TypedDict): + currency: str + """ + Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) of the `value` parameter. + """ + value: int + """ + A positive integer representing the amount of the credit grant. + """ + + +class CreditGrantCreateParamsApplicabilityConfig(TypedDict): + scope: "CreditGrantCreateParamsApplicabilityConfigScope" + """ + Specify the scope of this applicability config. + """ + + +class CreditGrantCreateParamsApplicabilityConfigScope(TypedDict): + billable_items: NotRequired[ + List["CreditGrantCreateParamsApplicabilityConfigScopeBillableItem"] + ] + """ + A list of billable items that the credit grant can apply to. We currently only support metered billable items. Cannot be used in combination with `price_type` or `prices`. + """ + price_type: NotRequired[Literal["metered"]] + """ + The price type that credit grants can apply to. We currently only support the `metered` price type. Cannot be used in combination with `prices`. + """ + prices: NotRequired[ + List["CreditGrantCreateParamsApplicabilityConfigScopePrice"] + ] + """ + A list of prices that the credit grant can apply to. We currently only support the `metered` prices. Cannot be used in combination with `price_type`. + """ + + +class CreditGrantCreateParamsApplicabilityConfigScopeBillableItem(TypedDict): + id: str + """ + The billable item ID this credit grant should apply to. + """ + + +class CreditGrantCreateParamsApplicabilityConfigScopePrice(TypedDict): + id: str + """ + The price ID this credit grant should apply to. + """ diff --git a/stripe/params/billing/_credit_grant_expire_params.py b/stripe/params/billing/_credit_grant_expire_params.py new file mode 100644 index 000000000..a2e4fa63f --- /dev/null +++ b/stripe/params/billing/_credit_grant_expire_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 CreditGrantExpireParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/billing/_credit_grant_list_params.py b/stripe/params/billing/_credit_grant_list_params.py new file mode 100644 index 000000000..e95b6e945 --- /dev/null +++ b/stripe/params/billing/_credit_grant_list_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 NotRequired + + +class CreditGrantListParams(RequestOptions): + customer: NotRequired[str] + """ + Only return credit grants for this customer. + """ + customer_account: NotRequired[str] + """ + Only return credit grants for this account. + """ + 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. + """ diff --git a/stripe/params/billing/_credit_grant_modify_params.py b/stripe/params/billing/_credit_grant_modify_params.py new file mode 100644 index 000000000..4c02e3542 --- /dev/null +++ b/stripe/params/billing/_credit_grant_modify_params.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import Literal, NotRequired + + +class CreditGrantModifyParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + expires_at: NotRequired["Literal['']|int"] + """ + The time when the billing credits created by this credit grant expire. If set to empty, the billing credits never expire. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of key-value pairs you can attach to an object. You can use this to store additional information about the object (for example, cost basis) in a structured format. + """ diff --git a/stripe/params/billing/_credit_grant_retrieve_params.py b/stripe/params/billing/_credit_grant_retrieve_params.py new file mode 100644 index 000000000..5c0418e65 --- /dev/null +++ b/stripe/params/billing/_credit_grant_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 CreditGrantRetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/billing/_credit_grant_update_params.py b/stripe/params/billing/_credit_grant_update_params.py new file mode 100644 index 000000000..fc5c4e401 --- /dev/null +++ b/stripe/params/billing/_credit_grant_update_params.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class CreditGrantUpdateParams(TypedDict): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + expires_at: NotRequired["Literal['']|int"] + """ + The time when the billing credits created by this credit grant expire. If set to empty, the billing credits never expire. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of key-value pairs you can attach to an object. You can use this to store additional information about the object (for example, cost basis) in a structured format. + """ diff --git a/stripe/params/billing/_credit_grant_void_grant_params.py b/stripe/params/billing/_credit_grant_void_grant_params.py new file mode 100644 index 000000000..9a411106c --- /dev/null +++ b/stripe/params/billing/_credit_grant_void_grant_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 CreditGrantVoidGrantParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/billing/_meter_create_params.py b/stripe/params/billing/_meter_create_params.py new file mode 100644 index 000000000..d1b7aeb47 --- /dev/null +++ b/stripe/params/billing/_meter_create_params.py @@ -0,0 +1,61 @@ +# -*- 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, TypedDict + + +class MeterCreateParams(RequestOptions): + customer_mapping: NotRequired["MeterCreateParamsCustomerMapping"] + """ + Fields that specify how to map a meter event to a customer. + """ + default_aggregation: "MeterCreateParamsDefaultAggregation" + """ + The default settings to aggregate a meter's events with. + """ + display_name: str + """ + The meter's name. Not visible to the customer. + """ + event_name: str + """ + The name of the meter event to record usage for. Corresponds with the `event_name` field on meter events. + """ + event_time_window: NotRequired[Literal["day", "hour"]] + """ + The time window which meter events have been pre-aggregated for, if any. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + value_settings: NotRequired["MeterCreateParamsValueSettings"] + """ + Fields that specify how to calculate a meter event's value. + """ + + +class MeterCreateParamsCustomerMapping(TypedDict): + event_payload_key: str + """ + The key in the meter event payload to use for mapping the event to a customer. + """ + type: Literal["by_id"] + """ + The method for mapping a meter event to a customer. Must be `by_id`. + """ + + +class MeterCreateParamsDefaultAggregation(TypedDict): + formula: Literal["count", "last", "sum"] + """ + Specifies how events are aggregated. Allowed values are `count` to count the number of events, `sum` to sum each event's value and `last` to take the last event's value in the window. + """ + + +class MeterCreateParamsValueSettings(TypedDict): + event_payload_key: str + """ + The key in the usage event payload to use as the value for this meter. For example, if the event payload contains usage on a `bytes_used` field, then set the event_payload_key to "bytes_used". + """ diff --git a/stripe/params/billing/_meter_deactivate_params.py b/stripe/params/billing/_meter_deactivate_params.py new file mode 100644 index 000000000..9ad26f4bb --- /dev/null +++ b/stripe/params/billing/_meter_deactivate_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 MeterDeactivateParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/billing/_meter_event_adjustment_create_params.py b/stripe/params/billing/_meter_event_adjustment_create_params.py new file mode 100644 index 000000000..fd7595b11 --- /dev/null +++ b/stripe/params/billing/_meter_event_adjustment_create_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 Literal, NotRequired, TypedDict + + +class MeterEventAdjustmentCreateParams(RequestOptions): + cancel: NotRequired["MeterEventAdjustmentCreateParamsCancel"] + """ + Specifies which event to cancel. + """ + event_name: str + """ + The name of the meter event. Corresponds with the `event_name` field on a meter. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + type: Literal["cancel"] + """ + Specifies whether to cancel a single event or a range of events for a time period. Time period cancellation is not supported yet. + """ + + +class MeterEventAdjustmentCreateParamsCancel(TypedDict): + identifier: NotRequired[str] + """ + Unique identifier for the event. You can only cancel events within 24 hours of Stripe receiving them. + """ diff --git a/stripe/params/billing/_meter_event_create_params.py b/stripe/params/billing/_meter_event_create_params.py new file mode 100644 index 000000000..6a65963e3 --- /dev/null +++ b/stripe/params/billing/_meter_event_create_params.py @@ -0,0 +1,28 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import NotRequired + + +class MeterEventCreateParams(RequestOptions): + event_name: str + """ + The name of the meter event. Corresponds with the `event_name` field on a meter. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + identifier: NotRequired[str] + """ + A unique identifier for the event. If not provided, one is generated. We recommend using UUID-like identifiers. We will enforce uniqueness within a rolling period of at least 24 hours. The enforcement of uniqueness primarily addresses issues arising from accidental retries or other problems occurring within extremely brief time intervals. This approach helps prevent duplicate entries and ensures data integrity in high-frequency operations. + """ + payload: Dict[str, str] + """ + The payload of the event. This must contain the fields corresponding to a meter's `customer_mapping.event_payload_key` (default is `stripe_customer_id`) and `value_settings.event_payload_key` (default is `value`). Read more about the [payload](https://docs.stripe.com/billing/subscriptions/usage-based/recording-usage#payload-key-overrides). + """ + timestamp: NotRequired[int] + """ + The time of the event. Measured in seconds since the Unix epoch. Must be within the past 35 calendar days or up to 5 minutes in the future. Defaults to current timestamp if not specified. + """ diff --git a/stripe/params/billing/_meter_event_summary_list_params.py b/stripe/params/billing/_meter_event_summary_list_params.py new file mode 100644 index 000000000..3c5d49a64 --- /dev/null +++ b/stripe/params/billing/_meter_event_summary_list_params.py @@ -0,0 +1,39 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import Literal, NotRequired, TypedDict + + +class MeterEventSummaryListParams(TypedDict): + customer: str + """ + The customer for which to fetch event summaries. + """ + end_time: int + """ + The timestamp from when to stop aggregating meter events (exclusive). Must be aligned with minute boundaries. + """ + 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. + """ + start_time: int + """ + The timestamp from when to start aggregating meter events (inclusive). Must be aligned with minute boundaries. + """ + 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. + """ + value_grouping_window: NotRequired[Literal["day", "hour"]] + """ + Specifies what granularity to use when generating event summaries. If not specified, a single event summary would be returned for the specified time range. For hourly granularity, start and end times must align with hour boundaries (e.g., 00:00, 01:00, ..., 23:00). For daily granularity, start and end times must align with UTC day boundaries (00:00 UTC). + """ diff --git a/stripe/params/billing/_meter_list_event_summaries_params.py b/stripe/params/billing/_meter_list_event_summaries_params.py new file mode 100644 index 000000000..ac858160e --- /dev/null +++ b/stripe/params/billing/_meter_list_event_summaries_params.py @@ -0,0 +1,40 @@ +# -*- 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 MeterListEventSummariesParams(RequestOptions): + customer: str + """ + The customer for which to fetch event summaries. + """ + end_time: int + """ + The timestamp from when to stop aggregating meter events (exclusive). Must be aligned with minute boundaries. + """ + 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. + """ + start_time: int + """ + The timestamp from when to start aggregating meter events (inclusive). Must be aligned with minute boundaries. + """ + 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. + """ + value_grouping_window: NotRequired[Literal["day", "hour"]] + """ + Specifies what granularity to use when generating event summaries. If not specified, a single event summary would be returned for the specified time range. For hourly granularity, start and end times must align with hour boundaries (e.g., 00:00, 01:00, ..., 23:00). For daily granularity, start and end times must align with UTC day boundaries (00:00 UTC). + """ diff --git a/stripe/params/billing/_meter_list_params.py b/stripe/params/billing/_meter_list_params.py new file mode 100644 index 000000000..4de12600d --- /dev/null +++ b/stripe/params/billing/_meter_list_params.py @@ -0,0 +1,28 @@ +# -*- 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 MeterListParams(RequestOptions): + 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. + """ + status: NotRequired[Literal["active", "inactive"]] + """ + Filter results to only include meters with the given status. + """ diff --git a/stripe/params/billing/_meter_modify_params.py b/stripe/params/billing/_meter_modify_params.py new file mode 100644 index 000000000..1a6251ba6 --- /dev/null +++ b/stripe/params/billing/_meter_modify_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 MeterModifyParams(RequestOptions): + display_name: NotRequired[str] + """ + The meter's name. Not visible to the customer. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/billing/_meter_reactivate_params.py b/stripe/params/billing/_meter_reactivate_params.py new file mode 100644 index 000000000..fba5db176 --- /dev/null +++ b/stripe/params/billing/_meter_reactivate_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 MeterReactivateParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/billing/_meter_retrieve_params.py b/stripe/params/billing/_meter_retrieve_params.py new file mode 100644 index 000000000..0c1bb88e1 --- /dev/null +++ b/stripe/params/billing/_meter_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 MeterRetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/billing/_meter_update_params.py b/stripe/params/billing/_meter_update_params.py new file mode 100644 index 000000000..8d8c0069d --- /dev/null +++ b/stripe/params/billing/_meter_update_params.py @@ -0,0 +1,15 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import NotRequired, TypedDict + + +class MeterUpdateParams(TypedDict): + display_name: NotRequired[str] + """ + The meter's name. Not visible to the customer. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/billing/analytics/__init__.py b/stripe/params/billing/analytics/__init__.py new file mode 100644 index 000000000..e4abe3b18 --- /dev/null +++ b/stripe/params/billing/analytics/__init__.py @@ -0,0 +1,5 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe.params.billing.analytics._meter_usage_retrieve_params import ( + MeterUsageRetrieveParams as MeterUsageRetrieveParams, +) diff --git a/stripe/params/billing/analytics/_meter_usage_retrieve_params.py b/stripe/params/billing/analytics/_meter_usage_retrieve_params.py new file mode 100644 index 000000000..74aae66e9 --- /dev/null +++ b/stripe/params/billing/analytics/_meter_usage_retrieve_params.py @@ -0,0 +1,657 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class MeterUsageRetrieveParams(RequestOptions): + customer: str + """ + The customer id to fetch meter usage data for. + """ + ends_at: int + """ + The timestamp from when to stop aggregating meter events (exclusive). Must be aligned with minute boundaries. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + meters: NotRequired[List["MeterUsageRetrieveParamsMeter"]] + """ + An array of meter parameters to specify which meters to include in the usage data. If not specified, usage across all meters for the customer is included. + """ + starts_at: int + """ + The timestamp from when to start aggregating meter events (inclusive). Must be aligned with minute boundaries. + """ + timezone: NotRequired[ + Literal[ + "Africa/Abidjan", + "Africa/Accra", + "Africa/Addis_Ababa", + "Africa/Algiers", + "Africa/Asmara", + "Africa/Asmera", + "Africa/Bamako", + "Africa/Bangui", + "Africa/Banjul", + "Africa/Bissau", + "Africa/Blantyre", + "Africa/Brazzaville", + "Africa/Bujumbura", + "Africa/Cairo", + "Africa/Casablanca", + "Africa/Ceuta", + "Africa/Conakry", + "Africa/Dakar", + "Africa/Dar_es_Salaam", + "Africa/Djibouti", + "Africa/Douala", + "Africa/El_Aaiun", + "Africa/Freetown", + "Africa/Gaborone", + "Africa/Harare", + "Africa/Johannesburg", + "Africa/Juba", + "Africa/Kampala", + "Africa/Khartoum", + "Africa/Kigali", + "Africa/Kinshasa", + "Africa/Lagos", + "Africa/Libreville", + "Africa/Lome", + "Africa/Luanda", + "Africa/Lubumbashi", + "Africa/Lusaka", + "Africa/Malabo", + "Africa/Maputo", + "Africa/Maseru", + "Africa/Mbabane", + "Africa/Mogadishu", + "Africa/Monrovia", + "Africa/Nairobi", + "Africa/Ndjamena", + "Africa/Niamey", + "Africa/Nouakchott", + "Africa/Ouagadougou", + "Africa/Porto-Novo", + "Africa/Sao_Tome", + "Africa/Timbuktu", + "Africa/Tripoli", + "Africa/Tunis", + "Africa/Windhoek", + "America/Adak", + "America/Anchorage", + "America/Anguilla", + "America/Antigua", + "America/Araguaina", + "America/Argentina/Buenos_Aires", + "America/Argentina/Catamarca", + "America/Argentina/ComodRivadavia", + "America/Argentina/Cordoba", + "America/Argentina/Jujuy", + "America/Argentina/La_Rioja", + "America/Argentina/Mendoza", + "America/Argentina/Rio_Gallegos", + "America/Argentina/Salta", + "America/Argentina/San_Juan", + "America/Argentina/San_Luis", + "America/Argentina/Tucuman", + "America/Argentina/Ushuaia", + "America/Aruba", + "America/Asuncion", + "America/Atikokan", + "America/Atka", + "America/Bahia", + "America/Bahia_Banderas", + "America/Barbados", + "America/Belem", + "America/Belize", + "America/Blanc-Sablon", + "America/Boa_Vista", + "America/Bogota", + "America/Boise", + "America/Buenos_Aires", + "America/Cambridge_Bay", + "America/Campo_Grande", + "America/Cancun", + "America/Caracas", + "America/Catamarca", + "America/Cayenne", + "America/Cayman", + "America/Chicago", + "America/Chihuahua", + "America/Ciudad_Juarez", + "America/Coral_Harbour", + "America/Cordoba", + "America/Costa_Rica", + "America/Coyhaique", + "America/Creston", + "America/Cuiaba", + "America/Curacao", + "America/Danmarkshavn", + "America/Dawson", + "America/Dawson_Creek", + "America/Denver", + "America/Detroit", + "America/Dominica", + "America/Edmonton", + "America/Eirunepe", + "America/El_Salvador", + "America/Ensenada", + "America/Fort_Nelson", + "America/Fort_Wayne", + "America/Fortaleza", + "America/Glace_Bay", + "America/Godthab", + "America/Goose_Bay", + "America/Grand_Turk", + "America/Grenada", + "America/Guadeloupe", + "America/Guatemala", + "America/Guayaquil", + "America/Guyana", + "America/Halifax", + "America/Havana", + "America/Hermosillo", + "America/Indiana/Indianapolis", + "America/Indiana/Knox", + "America/Indiana/Marengo", + "America/Indiana/Petersburg", + "America/Indiana/Tell_City", + "America/Indiana/Vevay", + "America/Indiana/Vincennes", + "America/Indiana/Winamac", + "America/Indianapolis", + "America/Inuvik", + "America/Iqaluit", + "America/Jamaica", + "America/Jujuy", + "America/Juneau", + "America/Kentucky/Louisville", + "America/Kentucky/Monticello", + "America/Knox_IN", + "America/Kralendijk", + "America/La_Paz", + "America/Lima", + "America/Los_Angeles", + "America/Louisville", + "America/Lower_Princes", + "America/Maceio", + "America/Managua", + "America/Manaus", + "America/Marigot", + "America/Martinique", + "America/Matamoros", + "America/Mazatlan", + "America/Mendoza", + "America/Menominee", + "America/Merida", + "America/Metlakatla", + "America/Mexico_City", + "America/Miquelon", + "America/Moncton", + "America/Monterrey", + "America/Montevideo", + "America/Montreal", + "America/Montserrat", + "America/Nassau", + "America/New_York", + "America/Nipigon", + "America/Nome", + "America/Noronha", + "America/North_Dakota/Beulah", + "America/North_Dakota/Center", + "America/North_Dakota/New_Salem", + "America/Nuuk", + "America/Ojinaga", + "America/Panama", + "America/Pangnirtung", + "America/Paramaribo", + "America/Phoenix", + "America/Port-au-Prince", + "America/Port_of_Spain", + "America/Porto_Acre", + "America/Porto_Velho", + "America/Puerto_Rico", + "America/Punta_Arenas", + "America/Rainy_River", + "America/Rankin_Inlet", + "America/Recife", + "America/Regina", + "America/Resolute", + "America/Rio_Branco", + "America/Rosario", + "America/Santa_Isabel", + "America/Santarem", + "America/Santiago", + "America/Santo_Domingo", + "America/Sao_Paulo", + "America/Scoresbysund", + "America/Shiprock", + "America/Sitka", + "America/St_Barthelemy", + "America/St_Johns", + "America/St_Kitts", + "America/St_Lucia", + "America/St_Thomas", + "America/St_Vincent", + "America/Swift_Current", + "America/Tegucigalpa", + "America/Thule", + "America/Thunder_Bay", + "America/Tijuana", + "America/Toronto", + "America/Tortola", + "America/Vancouver", + "America/Virgin", + "America/Whitehorse", + "America/Winnipeg", + "America/Yakutat", + "America/Yellowknife", + "Antarctica/Casey", + "Antarctica/Davis", + "Antarctica/DumontDUrville", + "Antarctica/Macquarie", + "Antarctica/Mawson", + "Antarctica/McMurdo", + "Antarctica/Palmer", + "Antarctica/Rothera", + "Antarctica/South_Pole", + "Antarctica/Syowa", + "Antarctica/Troll", + "Antarctica/Vostok", + "Arctic/Longyearbyen", + "Asia/Aden", + "Asia/Almaty", + "Asia/Amman", + "Asia/Anadyr", + "Asia/Aqtau", + "Asia/Aqtobe", + "Asia/Ashgabat", + "Asia/Ashkhabad", + "Asia/Atyrau", + "Asia/Baghdad", + "Asia/Bahrain", + "Asia/Baku", + "Asia/Bangkok", + "Asia/Barnaul", + "Asia/Beirut", + "Asia/Bishkek", + "Asia/Brunei", + "Asia/Calcutta", + "Asia/Chita", + "Asia/Choibalsan", + "Asia/Chongqing", + "Asia/Chungking", + "Asia/Colombo", + "Asia/Dacca", + "Asia/Damascus", + "Asia/Dhaka", + "Asia/Dili", + "Asia/Dubai", + "Asia/Dushanbe", + "Asia/Famagusta", + "Asia/Gaza", + "Asia/Harbin", + "Asia/Hebron", + "Asia/Ho_Chi_Minh", + "Asia/Hong_Kong", + "Asia/Hovd", + "Asia/Irkutsk", + "Asia/Istanbul", + "Asia/Jakarta", + "Asia/Jayapura", + "Asia/Jerusalem", + "Asia/Kabul", + "Asia/Kamchatka", + "Asia/Karachi", + "Asia/Kashgar", + "Asia/Kathmandu", + "Asia/Katmandu", + "Asia/Khandyga", + "Asia/Kolkata", + "Asia/Krasnoyarsk", + "Asia/Kuala_Lumpur", + "Asia/Kuching", + "Asia/Kuwait", + "Asia/Macao", + "Asia/Macau", + "Asia/Magadan", + "Asia/Makassar", + "Asia/Manila", + "Asia/Muscat", + "Asia/Nicosia", + "Asia/Novokuznetsk", + "Asia/Novosibirsk", + "Asia/Omsk", + "Asia/Oral", + "Asia/Phnom_Penh", + "Asia/Pontianak", + "Asia/Pyongyang", + "Asia/Qatar", + "Asia/Qostanay", + "Asia/Qyzylorda", + "Asia/Rangoon", + "Asia/Riyadh", + "Asia/Saigon", + "Asia/Sakhalin", + "Asia/Samarkand", + "Asia/Seoul", + "Asia/Shanghai", + "Asia/Singapore", + "Asia/Srednekolymsk", + "Asia/Taipei", + "Asia/Tashkent", + "Asia/Tbilisi", + "Asia/Tehran", + "Asia/Tel_Aviv", + "Asia/Thimbu", + "Asia/Thimphu", + "Asia/Tokyo", + "Asia/Tomsk", + "Asia/Ujung_Pandang", + "Asia/Ulaanbaatar", + "Asia/Ulan_Bator", + "Asia/Urumqi", + "Asia/Ust-Nera", + "Asia/Vientiane", + "Asia/Vladivostok", + "Asia/Yakutsk", + "Asia/Yangon", + "Asia/Yekaterinburg", + "Asia/Yerevan", + "Atlantic/Azores", + "Atlantic/Bermuda", + "Atlantic/Canary", + "Atlantic/Cape_Verde", + "Atlantic/Faeroe", + "Atlantic/Faroe", + "Atlantic/Jan_Mayen", + "Atlantic/Madeira", + "Atlantic/Reykjavik", + "Atlantic/South_Georgia", + "Atlantic/St_Helena", + "Atlantic/Stanley", + "Australia/ACT", + "Australia/Adelaide", + "Australia/Brisbane", + "Australia/Broken_Hill", + "Australia/Canberra", + "Australia/Currie", + "Australia/Darwin", + "Australia/Eucla", + "Australia/Hobart", + "Australia/LHI", + "Australia/Lindeman", + "Australia/Lord_Howe", + "Australia/Melbourne", + "Australia/NSW", + "Australia/North", + "Australia/Perth", + "Australia/Queensland", + "Australia/South", + "Australia/Sydney", + "Australia/Tasmania", + "Australia/Victoria", + "Australia/West", + "Australia/Yancowinna", + "Brazil/Acre", + "Brazil/DeNoronha", + "Brazil/East", + "Brazil/West", + "CET", + "CST6CDT", + "Canada/Atlantic", + "Canada/Central", + "Canada/Eastern", + "Canada/Mountain", + "Canada/Newfoundland", + "Canada/Pacific", + "Canada/Saskatchewan", + "Canada/Yukon", + "Chile/Continental", + "Chile/EasterIsland", + "Cuba", + "EET", + "EST", + "EST5EDT", + "Egypt", + "Eire", + "Etc/GMT", + "Etc/GMT+0", + "Etc/GMT+1", + "Etc/GMT+10", + "Etc/GMT+11", + "Etc/GMT+12", + "Etc/GMT+2", + "Etc/GMT+3", + "Etc/GMT+4", + "Etc/GMT+5", + "Etc/GMT+6", + "Etc/GMT+7", + "Etc/GMT+8", + "Etc/GMT+9", + "Etc/GMT-0", + "Etc/GMT-1", + "Etc/GMT-10", + "Etc/GMT-11", + "Etc/GMT-12", + "Etc/GMT-13", + "Etc/GMT-14", + "Etc/GMT-2", + "Etc/GMT-3", + "Etc/GMT-4", + "Etc/GMT-5", + "Etc/GMT-6", + "Etc/GMT-7", + "Etc/GMT-8", + "Etc/GMT-9", + "Etc/GMT0", + "Etc/Greenwich", + "Etc/UCT", + "Etc/UTC", + "Etc/Universal", + "Etc/Zulu", + "Europe/Amsterdam", + "Europe/Andorra", + "Europe/Astrakhan", + "Europe/Athens", + "Europe/Belfast", + "Europe/Belgrade", + "Europe/Berlin", + "Europe/Bratislava", + "Europe/Brussels", + "Europe/Bucharest", + "Europe/Budapest", + "Europe/Busingen", + "Europe/Chisinau", + "Europe/Copenhagen", + "Europe/Dublin", + "Europe/Gibraltar", + "Europe/Guernsey", + "Europe/Helsinki", + "Europe/Isle_of_Man", + "Europe/Istanbul", + "Europe/Jersey", + "Europe/Kaliningrad", + "Europe/Kiev", + "Europe/Kirov", + "Europe/Kyiv", + "Europe/Lisbon", + "Europe/Ljubljana", + "Europe/London", + "Europe/Luxembourg", + "Europe/Madrid", + "Europe/Malta", + "Europe/Mariehamn", + "Europe/Minsk", + "Europe/Monaco", + "Europe/Moscow", + "Europe/Nicosia", + "Europe/Oslo", + "Europe/Paris", + "Europe/Podgorica", + "Europe/Prague", + "Europe/Riga", + "Europe/Rome", + "Europe/Samara", + "Europe/San_Marino", + "Europe/Sarajevo", + "Europe/Saratov", + "Europe/Simferopol", + "Europe/Skopje", + "Europe/Sofia", + "Europe/Stockholm", + "Europe/Tallinn", + "Europe/Tirane", + "Europe/Tiraspol", + "Europe/Ulyanovsk", + "Europe/Uzhgorod", + "Europe/Vaduz", + "Europe/Vatican", + "Europe/Vienna", + "Europe/Vilnius", + "Europe/Volgograd", + "Europe/Warsaw", + "Europe/Zagreb", + "Europe/Zaporozhye", + "Europe/Zurich", + "Factory", + "GB", + "GB-Eire", + "GMT", + "GMT+0", + "GMT-0", + "GMT0", + "Greenwich", + "HST", + "Hongkong", + "Iceland", + "Indian/Antananarivo", + "Indian/Chagos", + "Indian/Christmas", + "Indian/Cocos", + "Indian/Comoro", + "Indian/Kerguelen", + "Indian/Mahe", + "Indian/Maldives", + "Indian/Mauritius", + "Indian/Mayotte", + "Indian/Reunion", + "Iran", + "Israel", + "Jamaica", + "Japan", + "Kwajalein", + "Libya", + "MET", + "MST", + "MST7MDT", + "Mexico/BajaNorte", + "Mexico/BajaSur", + "Mexico/General", + "NZ", + "NZ-CHAT", + "Navajo", + "PRC", + "PST8PDT", + "Pacific/Apia", + "Pacific/Auckland", + "Pacific/Bougainville", + "Pacific/Chatham", + "Pacific/Chuuk", + "Pacific/Easter", + "Pacific/Efate", + "Pacific/Enderbury", + "Pacific/Fakaofo", + "Pacific/Fiji", + "Pacific/Funafuti", + "Pacific/Galapagos", + "Pacific/Gambier", + "Pacific/Guadalcanal", + "Pacific/Guam", + "Pacific/Honolulu", + "Pacific/Johnston", + "Pacific/Kanton", + "Pacific/Kiritimati", + "Pacific/Kosrae", + "Pacific/Kwajalein", + "Pacific/Majuro", + "Pacific/Marquesas", + "Pacific/Midway", + "Pacific/Nauru", + "Pacific/Niue", + "Pacific/Norfolk", + "Pacific/Noumea", + "Pacific/Pago_Pago", + "Pacific/Palau", + "Pacific/Pitcairn", + "Pacific/Pohnpei", + "Pacific/Ponape", + "Pacific/Port_Moresby", + "Pacific/Rarotonga", + "Pacific/Saipan", + "Pacific/Samoa", + "Pacific/Tahiti", + "Pacific/Tarawa", + "Pacific/Tongatapu", + "Pacific/Truk", + "Pacific/Wake", + "Pacific/Wallis", + "Pacific/Yap", + "Poland", + "Portugal", + "ROC", + "ROK", + "Singapore", + "Turkey", + "UCT", + "US/Alaska", + "US/Aleutian", + "US/Arizona", + "US/Central", + "US/East-Indiana", + "US/Eastern", + "US/Hawaii", + "US/Indiana-Starke", + "US/Michigan", + "US/Mountain", + "US/Pacific", + "US/Pacific-New", + "US/Samoa", + "UTC", + "Universal", + "W-SU", + "WET", + "Zulu", + ] + ] + """ + The timezone to use for the start and end times. Defaults to UTC if not specified. + """ + value_grouping_window: NotRequired[Literal["day", "hour", "month", "week"]] + """ + Specifies what granularity to use when aggregating meter usage events. If not specified, a single event would be returned for the specified time range. + """ + + +class MeterUsageRetrieveParamsMeter(TypedDict): + dimension_filters: NotRequired[Dict[str, str]] + """ + Key-value pairs used to filter usage events by meter dimension values. If specified, usage will be filtered for matching usage events. + """ + dimension_group_by_keys: NotRequired[List[str]] + """ + List of meter dimension keys to group by. If specified, usage events will be grouped by the given meter dimension key's values. + """ + meter: str + """ + Meter id to query usage for. + """ + tenant_filters: NotRequired[Dict[str, str]] + """ + Key-value pairs used to filter usage events by high cardinality tenant dimension values. If specified, usage will be filtered for matching usage events. + """ diff --git a/stripe/params/billing_portal/__init__.py b/stripe/params/billing_portal/__init__.py new file mode 100644 index 000000000..5fc34d130 --- /dev/null +++ b/stripe/params/billing_portal/__init__.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe.params.billing_portal._configuration_create_params import ( + ConfigurationCreateParams as ConfigurationCreateParams, +) +from stripe.params.billing_portal._configuration_list_params import ( + ConfigurationListParams as ConfigurationListParams, +) +from stripe.params.billing_portal._configuration_modify_params import ( + ConfigurationModifyParams as ConfigurationModifyParams, +) +from stripe.params.billing_portal._configuration_retrieve_params import ( + ConfigurationRetrieveParams as ConfigurationRetrieveParams, +) +from stripe.params.billing_portal._configuration_update_params import ( + ConfigurationUpdateParams as ConfigurationUpdateParams, +) +from stripe.params.billing_portal._session_create_params import ( + SessionCreateParams as SessionCreateParams, +) diff --git a/stripe/params/billing_portal/_configuration_create_params.py b/stripe/params/billing_portal/_configuration_create_params.py new file mode 100644 index 000000000..54501c2df --- /dev/null +++ b/stripe/params/billing_portal/_configuration_create_params.py @@ -0,0 +1,259 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List, Union +from typing_extensions import Literal, NotRequired, TypedDict + + +class ConfigurationCreateParams(RequestOptions): + business_profile: NotRequired["ConfigurationCreateParamsBusinessProfile"] + """ + The business information shown to customers in the portal. + """ + default_return_url: NotRequired["Literal['']|str"] + """ + The default URL to redirect customers to when they click on the portal's link to return to your website. This can be [overriden](https://stripe.com/docs/api/customer_portal/sessions/create#create_portal_session-return_url) when creating the session. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + features: "ConfigurationCreateParamsFeatures" + """ + Information about the features available in the portal. + """ + login_page: NotRequired["ConfigurationCreateParamsLoginPage"] + """ + The hosted login page for this configuration. Learn more about the portal login page in our [integration docs](https://stripe.com/docs/billing/subscriptions/integrating-customer-portal#share). + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + name: NotRequired["Literal['']|str"] + """ + The name of the configuration. + """ + + +class ConfigurationCreateParamsBusinessProfile(TypedDict): + headline: NotRequired["Literal['']|str"] + """ + The messaging shown to customers in the portal. + """ + privacy_policy_url: NotRequired[str] + """ + A link to the business's publicly available privacy policy. + """ + terms_of_service_url: NotRequired[str] + """ + A link to the business's publicly available terms of service. + """ + + +class ConfigurationCreateParamsFeatures(TypedDict): + customer_update: NotRequired[ + "ConfigurationCreateParamsFeaturesCustomerUpdate" + ] + """ + Information about updating the customer details in the portal. + """ + invoice_history: NotRequired[ + "ConfigurationCreateParamsFeaturesInvoiceHistory" + ] + """ + Information about showing the billing history in the portal. + """ + payment_method_update: NotRequired[ + "ConfigurationCreateParamsFeaturesPaymentMethodUpdate" + ] + """ + Information about updating payment methods in the portal. + """ + subscription_cancel: NotRequired[ + "ConfigurationCreateParamsFeaturesSubscriptionCancel" + ] + """ + Information about canceling subscriptions in the portal. + """ + subscription_update: NotRequired[ + "ConfigurationCreateParamsFeaturesSubscriptionUpdate" + ] + """ + Information about updating subscriptions in the portal. + """ + + +class ConfigurationCreateParamsFeaturesCustomerUpdate(TypedDict): + allowed_updates: NotRequired[ + "Literal['']|List[Literal['address', 'email', 'name', 'phone', 'shipping', 'tax_id']]" + ] + """ + The types of customer updates that are supported. When empty, customers are not updateable. + """ + enabled: bool + """ + Whether the feature is enabled. + """ + + +class ConfigurationCreateParamsFeaturesInvoiceHistory(TypedDict): + enabled: bool + """ + Whether the feature is enabled. + """ + + +class ConfigurationCreateParamsFeaturesPaymentMethodUpdate(TypedDict): + enabled: bool + """ + Whether the feature is enabled. + """ + + +class ConfigurationCreateParamsFeaturesSubscriptionCancel(TypedDict): + cancellation_reason: NotRequired[ + "ConfigurationCreateParamsFeaturesSubscriptionCancelCancellationReason" + ] + """ + Whether the cancellation reasons will be collected in the portal and which options are exposed to the customer + """ + enabled: bool + """ + Whether the feature is enabled. + """ + mode: NotRequired[Literal["at_period_end", "immediately"]] + """ + Whether to cancel subscriptions immediately or at the end of the billing period. + """ + proration_behavior: NotRequired[ + Literal["always_invoice", "create_prorations", "none"] + ] + """ + Whether to create prorations when canceling subscriptions. Possible values are `none` and `create_prorations`, which is only compatible with `mode=immediately`. Passing `always_invoice` will result in an error. No prorations are generated when canceling a subscription at the end of its natural billing period. + """ + + +class ConfigurationCreateParamsFeaturesSubscriptionCancelCancellationReason( + TypedDict, +): + enabled: bool + """ + Whether the feature is enabled. + """ + options: Union[ + Literal[""], + List[ + Literal[ + "customer_service", + "low_quality", + "missing_features", + "other", + "switched_service", + "too_complex", + "too_expensive", + "unused", + ] + ], + ] + """ + Which cancellation reasons will be given as options to the customer. + """ + + +class ConfigurationCreateParamsFeaturesSubscriptionUpdate(TypedDict): + default_allowed_updates: NotRequired[ + "Literal['']|List[Literal['price', 'promotion_code', 'quantity']]" + ] + """ + The types of subscription updates that are supported. When empty, subscriptions are not updateable. + """ + enabled: bool + """ + Whether the feature is enabled. + """ + products: NotRequired[ + "Literal['']|List[ConfigurationCreateParamsFeaturesSubscriptionUpdateProduct]" + ] + """ + The list of up to 10 products that support subscription updates. + """ + proration_behavior: NotRequired[ + Literal["always_invoice", "create_prorations", "none"] + ] + """ + Determines how to handle prorations resulting from subscription updates. Valid values are `none`, `create_prorations`, and `always_invoice`. + """ + schedule_at_period_end: NotRequired[ + "ConfigurationCreateParamsFeaturesSubscriptionUpdateScheduleAtPeriodEnd" + ] + """ + Setting to control when an update should be scheduled at the end of the period instead of applying immediately. + """ + trial_update_behavior: NotRequired[Literal["continue_trial", "end_trial"]] + """ + The behavior when updating a subscription that is trialing. + """ + + +class ConfigurationCreateParamsFeaturesSubscriptionUpdateProduct(TypedDict): + adjustable_quantity: NotRequired[ + "ConfigurationCreateParamsFeaturesSubscriptionUpdateProductAdjustableQuantity" + ] + """ + Control whether the quantity of the product can be adjusted. + """ + prices: List[str] + """ + The list of price IDs for the product that a subscription can be updated to. + """ + product: str + """ + The product id. + """ + + +class ConfigurationCreateParamsFeaturesSubscriptionUpdateProductAdjustableQuantity( + TypedDict, +): + enabled: bool + """ + Set to true if the quantity can be adjusted to any non-negative integer. + """ + maximum: NotRequired[int] + """ + The maximum quantity that can be set for the product. + """ + minimum: NotRequired[int] + """ + The minimum quantity that can be set for the product. + """ + + +class ConfigurationCreateParamsFeaturesSubscriptionUpdateScheduleAtPeriodEnd( + TypedDict, +): + conditions: NotRequired[ + List[ + "ConfigurationCreateParamsFeaturesSubscriptionUpdateScheduleAtPeriodEndCondition" + ] + ] + """ + List of conditions. When any condition is true, the update will be scheduled at the end of the current period. + """ + + +class ConfigurationCreateParamsFeaturesSubscriptionUpdateScheduleAtPeriodEndCondition( + TypedDict, +): + type: Literal["decreasing_item_amount", "shortening_interval"] + """ + The type of condition. + """ + + +class ConfigurationCreateParamsLoginPage(TypedDict): + enabled: bool + """ + Set to `true` to generate a shareable URL [`login_page.url`](https://stripe.com/docs/api/customer_portal/configuration#portal_configuration_object-login_page-url) that will take your customers to a hosted login page for the customer portal. + """ diff --git a/stripe/params/billing_portal/_configuration_list_params.py b/stripe/params/billing_portal/_configuration_list_params.py new file mode 100644 index 000000000..e1566f7c5 --- /dev/null +++ b/stripe/params/billing_portal/_configuration_list_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 NotRequired + + +class ConfigurationListParams(RequestOptions): + active: NotRequired[bool] + """ + Only return configurations that are active or inactive (e.g., pass `true` to only list active configurations). + """ + 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. + """ + is_default: NotRequired[bool] + """ + Only return the default or non-default configurations (e.g., pass `true` to only list the default configuration). + """ + 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. + """ diff --git a/stripe/params/billing_portal/_configuration_modify_params.py b/stripe/params/billing_portal/_configuration_modify_params.py new file mode 100644 index 000000000..8b48f3425 --- /dev/null +++ b/stripe/params/billing_portal/_configuration_modify_params.py @@ -0,0 +1,251 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class ConfigurationModifyParams(RequestOptions): + active: NotRequired[bool] + """ + Whether the configuration is active and can be used to create portal sessions. + """ + business_profile: NotRequired["ConfigurationModifyParamsBusinessProfile"] + """ + The business information shown to customers in the portal. + """ + default_return_url: NotRequired["Literal['']|str"] + """ + The default URL to redirect customers to when they click on the portal's link to return to your website. This can be [overriden](https://stripe.com/docs/api/customer_portal/sessions/create#create_portal_session-return_url) when creating the session. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + features: NotRequired["ConfigurationModifyParamsFeatures"] + """ + Information about the features available in the portal. + """ + login_page: NotRequired["ConfigurationModifyParamsLoginPage"] + """ + The hosted login page for this configuration. Learn more about the portal login page in our [integration docs](https://stripe.com/docs/billing/subscriptions/integrating-customer-portal#share). + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + name: NotRequired["Literal['']|str"] + """ + The name of the configuration. + """ + + +class ConfigurationModifyParamsBusinessProfile(TypedDict): + headline: NotRequired["Literal['']|str"] + """ + The messaging shown to customers in the portal. + """ + privacy_policy_url: NotRequired["Literal['']|str"] + """ + A link to the business's publicly available privacy policy. + """ + terms_of_service_url: NotRequired["Literal['']|str"] + """ + A link to the business's publicly available terms of service. + """ + + +class ConfigurationModifyParamsFeatures(TypedDict): + customer_update: NotRequired[ + "ConfigurationModifyParamsFeaturesCustomerUpdate" + ] + """ + Information about updating the customer details in the portal. + """ + invoice_history: NotRequired[ + "ConfigurationModifyParamsFeaturesInvoiceHistory" + ] + """ + Information about showing the billing history in the portal. + """ + payment_method_update: NotRequired[ + "ConfigurationModifyParamsFeaturesPaymentMethodUpdate" + ] + """ + Information about updating payment methods in the portal. + """ + subscription_cancel: NotRequired[ + "ConfigurationModifyParamsFeaturesSubscriptionCancel" + ] + """ + Information about canceling subscriptions in the portal. + """ + subscription_update: NotRequired[ + "ConfigurationModifyParamsFeaturesSubscriptionUpdate" + ] + """ + Information about updating subscriptions in the portal. + """ + + +class ConfigurationModifyParamsFeaturesCustomerUpdate(TypedDict): + allowed_updates: NotRequired[ + "Literal['']|List[Literal['address', 'email', 'name', 'phone', 'shipping', 'tax_id']]" + ] + """ + The types of customer updates that are supported. When empty, customers are not updateable. + """ + enabled: NotRequired[bool] + """ + Whether the feature is enabled. + """ + + +class ConfigurationModifyParamsFeaturesInvoiceHistory(TypedDict): + enabled: bool + """ + Whether the feature is enabled. + """ + + +class ConfigurationModifyParamsFeaturesPaymentMethodUpdate(TypedDict): + enabled: bool + """ + Whether the feature is enabled. + """ + + +class ConfigurationModifyParamsFeaturesSubscriptionCancel(TypedDict): + cancellation_reason: NotRequired[ + "ConfigurationModifyParamsFeaturesSubscriptionCancelCancellationReason" + ] + """ + Whether the cancellation reasons will be collected in the portal and which options are exposed to the customer + """ + enabled: NotRequired[bool] + """ + Whether the feature is enabled. + """ + mode: NotRequired[Literal["at_period_end", "immediately"]] + """ + Whether to cancel subscriptions immediately or at the end of the billing period. + """ + proration_behavior: NotRequired[ + Literal["always_invoice", "create_prorations", "none"] + ] + """ + Whether to create prorations when canceling subscriptions. Possible values are `none` and `create_prorations`, which is only compatible with `mode=immediately`. Passing `always_invoice` will result in an error. No prorations are generated when canceling a subscription at the end of its natural billing period. + """ + + +class ConfigurationModifyParamsFeaturesSubscriptionCancelCancellationReason( + TypedDict, +): + enabled: bool + """ + Whether the feature is enabled. + """ + options: NotRequired[ + "Literal['']|List[Literal['customer_service', 'low_quality', 'missing_features', 'other', 'switched_service', 'too_complex', 'too_expensive', 'unused']]" + ] + """ + Which cancellation reasons will be given as options to the customer. + """ + + +class ConfigurationModifyParamsFeaturesSubscriptionUpdate(TypedDict): + default_allowed_updates: NotRequired[ + "Literal['']|List[Literal['price', 'promotion_code', 'quantity']]" + ] + """ + The types of subscription updates that are supported. When empty, subscriptions are not updateable. + """ + enabled: NotRequired[bool] + """ + Whether the feature is enabled. + """ + products: NotRequired[ + "Literal['']|List[ConfigurationModifyParamsFeaturesSubscriptionUpdateProduct]" + ] + """ + The list of up to 10 products that support subscription updates. + """ + proration_behavior: NotRequired[ + Literal["always_invoice", "create_prorations", "none"] + ] + """ + Determines how to handle prorations resulting from subscription updates. Valid values are `none`, `create_prorations`, and `always_invoice`. + """ + schedule_at_period_end: NotRequired[ + "ConfigurationModifyParamsFeaturesSubscriptionUpdateScheduleAtPeriodEnd" + ] + """ + Setting to control when an update should be scheduled at the end of the period instead of applying immediately. + """ + trial_update_behavior: NotRequired[Literal["continue_trial", "end_trial"]] + """ + The behavior when updating a subscription that is trialing. + """ + + +class ConfigurationModifyParamsFeaturesSubscriptionUpdateProduct(TypedDict): + adjustable_quantity: NotRequired[ + "ConfigurationModifyParamsFeaturesSubscriptionUpdateProductAdjustableQuantity" + ] + """ + Control whether the quantity of the product can be adjusted. + """ + prices: List[str] + """ + The list of price IDs for the product that a subscription can be updated to. + """ + product: str + """ + The product id. + """ + + +class ConfigurationModifyParamsFeaturesSubscriptionUpdateProductAdjustableQuantity( + TypedDict, +): + enabled: bool + """ + Set to true if the quantity can be adjusted to any non-negative integer. + """ + maximum: NotRequired[int] + """ + The maximum quantity that can be set for the product. + """ + minimum: NotRequired[int] + """ + The minimum quantity that can be set for the product. + """ + + +class ConfigurationModifyParamsFeaturesSubscriptionUpdateScheduleAtPeriodEnd( + TypedDict, +): + conditions: NotRequired[ + "Literal['']|List[ConfigurationModifyParamsFeaturesSubscriptionUpdateScheduleAtPeriodEndCondition]" + ] + """ + List of conditions. When any condition is true, the update will be scheduled at the end of the current period. + """ + + +class ConfigurationModifyParamsFeaturesSubscriptionUpdateScheduleAtPeriodEndCondition( + TypedDict, +): + type: Literal["decreasing_item_amount", "shortening_interval"] + """ + The type of condition. + """ + + +class ConfigurationModifyParamsLoginPage(TypedDict): + enabled: bool + """ + Set to `true` to generate a shareable URL [`login_page.url`](https://stripe.com/docs/api/customer_portal/configuration#portal_configuration_object-login_page-url) that will take your customers to a hosted login page for the customer portal. + + Set to `false` to deactivate the `login_page.url`. + """ diff --git a/stripe/params/billing_portal/_configuration_retrieve_params.py b/stripe/params/billing_portal/_configuration_retrieve_params.py new file mode 100644 index 000000000..95f024ac8 --- /dev/null +++ b/stripe/params/billing_portal/_configuration_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 ConfigurationRetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/billing_portal/_configuration_update_params.py b/stripe/params/billing_portal/_configuration_update_params.py new file mode 100644 index 000000000..f8ab8ae22 --- /dev/null +++ b/stripe/params/billing_portal/_configuration_update_params.py @@ -0,0 +1,250 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class ConfigurationUpdateParams(TypedDict): + active: NotRequired[bool] + """ + Whether the configuration is active and can be used to create portal sessions. + """ + business_profile: NotRequired["ConfigurationUpdateParamsBusinessProfile"] + """ + The business information shown to customers in the portal. + """ + default_return_url: NotRequired["Literal['']|str"] + """ + The default URL to redirect customers to when they click on the portal's link to return to your website. This can be [overriden](https://stripe.com/docs/api/customer_portal/sessions/create#create_portal_session-return_url) when creating the session. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + features: NotRequired["ConfigurationUpdateParamsFeatures"] + """ + Information about the features available in the portal. + """ + login_page: NotRequired["ConfigurationUpdateParamsLoginPage"] + """ + The hosted login page for this configuration. Learn more about the portal login page in our [integration docs](https://stripe.com/docs/billing/subscriptions/integrating-customer-portal#share). + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + name: NotRequired["Literal['']|str"] + """ + The name of the configuration. + """ + + +class ConfigurationUpdateParamsBusinessProfile(TypedDict): + headline: NotRequired["Literal['']|str"] + """ + The messaging shown to customers in the portal. + """ + privacy_policy_url: NotRequired["Literal['']|str"] + """ + A link to the business's publicly available privacy policy. + """ + terms_of_service_url: NotRequired["Literal['']|str"] + """ + A link to the business's publicly available terms of service. + """ + + +class ConfigurationUpdateParamsFeatures(TypedDict): + customer_update: NotRequired[ + "ConfigurationUpdateParamsFeaturesCustomerUpdate" + ] + """ + Information about updating the customer details in the portal. + """ + invoice_history: NotRequired[ + "ConfigurationUpdateParamsFeaturesInvoiceHistory" + ] + """ + Information about showing the billing history in the portal. + """ + payment_method_update: NotRequired[ + "ConfigurationUpdateParamsFeaturesPaymentMethodUpdate" + ] + """ + Information about updating payment methods in the portal. + """ + subscription_cancel: NotRequired[ + "ConfigurationUpdateParamsFeaturesSubscriptionCancel" + ] + """ + Information about canceling subscriptions in the portal. + """ + subscription_update: NotRequired[ + "ConfigurationUpdateParamsFeaturesSubscriptionUpdate" + ] + """ + Information about updating subscriptions in the portal. + """ + + +class ConfigurationUpdateParamsFeaturesCustomerUpdate(TypedDict): + allowed_updates: NotRequired[ + "Literal['']|List[Literal['address', 'email', 'name', 'phone', 'shipping', 'tax_id']]" + ] + """ + The types of customer updates that are supported. When empty, customers are not updateable. + """ + enabled: NotRequired[bool] + """ + Whether the feature is enabled. + """ + + +class ConfigurationUpdateParamsFeaturesInvoiceHistory(TypedDict): + enabled: bool + """ + Whether the feature is enabled. + """ + + +class ConfigurationUpdateParamsFeaturesPaymentMethodUpdate(TypedDict): + enabled: bool + """ + Whether the feature is enabled. + """ + + +class ConfigurationUpdateParamsFeaturesSubscriptionCancel(TypedDict): + cancellation_reason: NotRequired[ + "ConfigurationUpdateParamsFeaturesSubscriptionCancelCancellationReason" + ] + """ + Whether the cancellation reasons will be collected in the portal and which options are exposed to the customer + """ + enabled: NotRequired[bool] + """ + Whether the feature is enabled. + """ + mode: NotRequired[Literal["at_period_end", "immediately"]] + """ + Whether to cancel subscriptions immediately or at the end of the billing period. + """ + proration_behavior: NotRequired[ + Literal["always_invoice", "create_prorations", "none"] + ] + """ + Whether to create prorations when canceling subscriptions. Possible values are `none` and `create_prorations`, which is only compatible with `mode=immediately`. Passing `always_invoice` will result in an error. No prorations are generated when canceling a subscription at the end of its natural billing period. + """ + + +class ConfigurationUpdateParamsFeaturesSubscriptionCancelCancellationReason( + TypedDict, +): + enabled: bool + """ + Whether the feature is enabled. + """ + options: NotRequired[ + "Literal['']|List[Literal['customer_service', 'low_quality', 'missing_features', 'other', 'switched_service', 'too_complex', 'too_expensive', 'unused']]" + ] + """ + Which cancellation reasons will be given as options to the customer. + """ + + +class ConfigurationUpdateParamsFeaturesSubscriptionUpdate(TypedDict): + default_allowed_updates: NotRequired[ + "Literal['']|List[Literal['price', 'promotion_code', 'quantity']]" + ] + """ + The types of subscription updates that are supported. When empty, subscriptions are not updateable. + """ + enabled: NotRequired[bool] + """ + Whether the feature is enabled. + """ + products: NotRequired[ + "Literal['']|List[ConfigurationUpdateParamsFeaturesSubscriptionUpdateProduct]" + ] + """ + The list of up to 10 products that support subscription updates. + """ + proration_behavior: NotRequired[ + Literal["always_invoice", "create_prorations", "none"] + ] + """ + Determines how to handle prorations resulting from subscription updates. Valid values are `none`, `create_prorations`, and `always_invoice`. + """ + schedule_at_period_end: NotRequired[ + "ConfigurationUpdateParamsFeaturesSubscriptionUpdateScheduleAtPeriodEnd" + ] + """ + Setting to control when an update should be scheduled at the end of the period instead of applying immediately. + """ + trial_update_behavior: NotRequired[Literal["continue_trial", "end_trial"]] + """ + The behavior when updating a subscription that is trialing. + """ + + +class ConfigurationUpdateParamsFeaturesSubscriptionUpdateProduct(TypedDict): + adjustable_quantity: NotRequired[ + "ConfigurationUpdateParamsFeaturesSubscriptionUpdateProductAdjustableQuantity" + ] + """ + Control whether the quantity of the product can be adjusted. + """ + prices: List[str] + """ + The list of price IDs for the product that a subscription can be updated to. + """ + product: str + """ + The product id. + """ + + +class ConfigurationUpdateParamsFeaturesSubscriptionUpdateProductAdjustableQuantity( + TypedDict, +): + enabled: bool + """ + Set to true if the quantity can be adjusted to any non-negative integer. + """ + maximum: NotRequired[int] + """ + The maximum quantity that can be set for the product. + """ + minimum: NotRequired[int] + """ + The minimum quantity that can be set for the product. + """ + + +class ConfigurationUpdateParamsFeaturesSubscriptionUpdateScheduleAtPeriodEnd( + TypedDict, +): + conditions: NotRequired[ + "Literal['']|List[ConfigurationUpdateParamsFeaturesSubscriptionUpdateScheduleAtPeriodEndCondition]" + ] + """ + List of conditions. When any condition is true, the update will be scheduled at the end of the current period. + """ + + +class ConfigurationUpdateParamsFeaturesSubscriptionUpdateScheduleAtPeriodEndCondition( + TypedDict, +): + type: Literal["decreasing_item_amount", "shortening_interval"] + """ + The type of condition. + """ + + +class ConfigurationUpdateParamsLoginPage(TypedDict): + enabled: bool + """ + Set to `true` to generate a shareable URL [`login_page.url`](https://stripe.com/docs/api/customer_portal/configuration#portal_configuration_object-login_page-url) that will take your customers to a hosted login page for the customer portal. + + Set to `false` to deactivate the `login_page.url`. + """ diff --git a/stripe/params/billing_portal/_session_create_params.py b/stripe/params/billing_portal/_session_create_params.py new file mode 100644 index 000000000..56e3179fc --- /dev/null +++ b/stripe/params/billing_portal/_session_create_params.py @@ -0,0 +1,240 @@ +# -*- 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, TypedDict + + +class SessionCreateParams(RequestOptions): + configuration: NotRequired[str] + """ + The ID of an existing [configuration](https://stripe.com/docs/api/customer_portal/configuration) to use for this session, describing its functionality and features. If not specified, the session uses the default configuration. + """ + customer: NotRequired[str] + """ + The ID of an existing customer. + """ + customer_account: NotRequired[str] + """ + The ID of an existing account. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + flow_data: NotRequired["SessionCreateParamsFlowData"] + """ + Information about a specific flow for the customer to go through. See the [docs](https://stripe.com/docs/customer-management/portal-deep-links) to learn more about using customer portal deep links and flows. + """ + locale: NotRequired[ + Literal[ + "auto", + "bg", + "cs", + "da", + "de", + "el", + "en", + "en-AU", + "en-CA", + "en-GB", + "en-IE", + "en-IN", + "en-NZ", + "en-SG", + "es", + "es-419", + "et", + "fi", + "fil", + "fr", + "fr-CA", + "hr", + "hu", + "id", + "it", + "ja", + "ko", + "lt", + "lv", + "ms", + "mt", + "nb", + "nl", + "pl", + "pt", + "pt-BR", + "ro", + "ru", + "sk", + "sl", + "sv", + "th", + "tr", + "vi", + "zh", + "zh-HK", + "zh-TW", + ] + ] + """ + The IETF language tag of the locale customer portal is displayed in. If blank or auto, the customer's `preferred_locales` or browser's locale is used. + """ + on_behalf_of: NotRequired[str] + """ + The `on_behalf_of` account to use for this session. When specified, only subscriptions and invoices with this `on_behalf_of` account appear in the portal. For more information, see the [docs](https://stripe.com/docs/connect/separate-charges-and-transfers#settlement-merchant). Use the [Accounts API](https://stripe.com/docs/api/accounts/object#account_object-settings-branding) to modify the `on_behalf_of` account's branding settings, which the portal displays. + """ + return_url: NotRequired[str] + """ + The default URL to redirect customers to when they click on the portal's link to return to your website. + """ + + +class SessionCreateParamsFlowData(TypedDict): + after_completion: NotRequired["SessionCreateParamsFlowDataAfterCompletion"] + """ + Behavior after the flow is completed. + """ + subscription_cancel: NotRequired[ + "SessionCreateParamsFlowDataSubscriptionCancel" + ] + """ + Configuration when `flow_data.type=subscription_cancel`. + """ + subscription_update: NotRequired[ + "SessionCreateParamsFlowDataSubscriptionUpdate" + ] + """ + Configuration when `flow_data.type=subscription_update`. + """ + subscription_update_confirm: NotRequired[ + "SessionCreateParamsFlowDataSubscriptionUpdateConfirm" + ] + """ + Configuration when `flow_data.type=subscription_update_confirm`. + """ + type: Literal[ + "payment_method_update", + "subscription_cancel", + "subscription_update", + "subscription_update_confirm", + ] + """ + Type of flow that the customer will go through. + """ + + +class SessionCreateParamsFlowDataAfterCompletion(TypedDict): + hosted_confirmation: NotRequired[ + "SessionCreateParamsFlowDataAfterCompletionHostedConfirmation" + ] + """ + Configuration when `after_completion.type=hosted_confirmation`. + """ + redirect: NotRequired["SessionCreateParamsFlowDataAfterCompletionRedirect"] + """ + Configuration when `after_completion.type=redirect`. + """ + type: Literal["hosted_confirmation", "portal_homepage", "redirect"] + """ + The specified behavior after the flow is completed. + """ + + +class SessionCreateParamsFlowDataAfterCompletionHostedConfirmation(TypedDict): + custom_message: NotRequired[str] + """ + A custom message to display to the customer after the flow is completed. + """ + + +class SessionCreateParamsFlowDataAfterCompletionRedirect(TypedDict): + return_url: str + """ + The URL the customer will be redirected to after the flow is completed. + """ + + +class SessionCreateParamsFlowDataSubscriptionCancel(TypedDict): + retention: NotRequired[ + "SessionCreateParamsFlowDataSubscriptionCancelRetention" + ] + """ + Specify a retention strategy to be used in the cancellation flow. + """ + subscription: str + """ + The ID of the subscription to be canceled. + """ + + +class SessionCreateParamsFlowDataSubscriptionCancelRetention(TypedDict): + coupon_offer: ( + "SessionCreateParamsFlowDataSubscriptionCancelRetentionCouponOffer" + ) + """ + Configuration when `retention.type=coupon_offer`. + """ + type: Literal["coupon_offer"] + """ + Type of retention strategy to use with the customer. + """ + + +class SessionCreateParamsFlowDataSubscriptionCancelRetentionCouponOffer( + TypedDict, +): + coupon: str + """ + The ID of the coupon to be offered. + """ + + +class SessionCreateParamsFlowDataSubscriptionUpdate(TypedDict): + subscription: str + """ + The ID of the subscription to be updated. + """ + + +class SessionCreateParamsFlowDataSubscriptionUpdateConfirm(TypedDict): + discounts: NotRequired[ + List["SessionCreateParamsFlowDataSubscriptionUpdateConfirmDiscount"] + ] + """ + The coupon or promotion code to apply to this subscription update. + """ + items: List["SessionCreateParamsFlowDataSubscriptionUpdateConfirmItem"] + """ + The [subscription item](https://stripe.com/docs/api/subscription_items) to be updated through this flow. Currently, only up to one may be specified and subscriptions with multiple items are not updatable. + """ + subscription: str + """ + The ID of the subscription to be updated. + """ + + +class SessionCreateParamsFlowDataSubscriptionUpdateConfirmDiscount(TypedDict): + coupon: NotRequired[str] + """ + The ID of the coupon to apply to this subscription update. + """ + promotion_code: NotRequired[str] + """ + The ID of a promotion code to apply to this subscription update. + """ + + +class SessionCreateParamsFlowDataSubscriptionUpdateConfirmItem(TypedDict): + id: str + """ + The ID of the [subscription item](https://stripe.com/docs/api/subscriptions/object#subscription_object-items-data-id) to be updated. + """ + price: NotRequired[str] + """ + The price the customer should subscribe to through this flow. The price must also be included in the configuration's [`features.subscription_update.products`](https://stripe.com/docs/api/customer_portal/configuration#portal_configuration_object-features-subscription_update-products). + """ + quantity: NotRequired[int] + """ + [Quantity](https://stripe.com/docs/subscriptions/quantities) for this item that the customer should subscribe to through this flow. + """ diff --git a/stripe/params/capital/__init__.py b/stripe/params/capital/__init__.py new file mode 100644 index 000000000..e363ddda7 --- /dev/null +++ b/stripe/params/capital/__init__.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe.params.capital._financing_offer_list_params import ( + FinancingOfferListParams as FinancingOfferListParams, +) +from stripe.params.capital._financing_offer_mark_delivered_params import ( + FinancingOfferMarkDeliveredParams as FinancingOfferMarkDeliveredParams, +) +from stripe.params.capital._financing_offer_retrieve_params import ( + FinancingOfferRetrieveParams as FinancingOfferRetrieveParams, +) +from stripe.params.capital._financing_summary_retrieve_params import ( + FinancingSummaryRetrieveParams as FinancingSummaryRetrieveParams, +) +from stripe.params.capital._financing_transaction_list_params import ( + FinancingTransactionListParams as FinancingTransactionListParams, +) +from stripe.params.capital._financing_transaction_retrieve_params import ( + FinancingTransactionRetrieveParams as FinancingTransactionRetrieveParams, +) diff --git a/stripe/params/capital/_financing_offer_list_params.py b/stripe/params/capital/_financing_offer_list_params.py new file mode 100644 index 000000000..9ff4ba5cb --- /dev/null +++ b/stripe/params/capital/_financing_offer_list_params.py @@ -0,0 +1,68 @@ +# -*- 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, TypedDict + + +class FinancingOfferListParams(RequestOptions): + connected_account: NotRequired[str] + """ + limit list to offers belonging to given connected account + """ + created: NotRequired["FinancingOfferListParamsCreated|int"] + """ + Only return offers that were created during the given date interval. + """ + 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. + """ + status: NotRequired[ + Literal[ + "accepted", + "canceled", + "completed", + "delivered", + "expired", + "fully_repaid", + "paid_out", + "rejected", + "revoked", + "undelivered", + ] + ] + """ + limit list to offers with given status + """ + + +class FinancingOfferListParamsCreated(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/capital/_financing_offer_mark_delivered_params.py b/stripe/params/capital/_financing_offer_mark_delivered_params.py new file mode 100644 index 000000000..e662a5681 --- /dev/null +++ b/stripe/params/capital/_financing_offer_mark_delivered_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 FinancingOfferMarkDeliveredParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/capital/_financing_offer_retrieve_params.py b/stripe/params/capital/_financing_offer_retrieve_params.py new file mode 100644 index 000000000..fb554bcf3 --- /dev/null +++ b/stripe/params/capital/_financing_offer_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 FinancingOfferRetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/capital/_financing_summary_retrieve_params.py b/stripe/params/capital/_financing_summary_retrieve_params.py new file mode 100644 index 000000000..8b6b54ec6 --- /dev/null +++ b/stripe/params/capital/_financing_summary_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 FinancingSummaryRetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/capital/_financing_transaction_list_params.py b/stripe/params/capital/_financing_transaction_list_params.py new file mode 100644 index 000000000..8cb2f017f --- /dev/null +++ b/stripe/params/capital/_financing_transaction_list_params.py @@ -0,0 +1,40 @@ +# -*- 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 FinancingTransactionListParams(RequestOptions): + charge: NotRequired[str] + """ + For transactions of type `paydown` and reason `automatic_withholding` only, only returns transactions that were created as a result of this charge. + """ + 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. + """ + financing_offer: NotRequired[str] + """ + Returns transactions that were created that apply to this financing offer ID. + """ + 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. + """ + reversed_transaction: NotRequired[str] + """ + Only returns transactions that are responsible for reversing this financing transaction ID. + """ + 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. + """ + treasury_transaction: NotRequired[str] + """ + For transactions of type `paydown` and reason `automatic_withholding` only, only returns transactions that were created as a result of this Treasury Transaction. + """ diff --git a/stripe/params/capital/_financing_transaction_retrieve_params.py b/stripe/params/capital/_financing_transaction_retrieve_params.py new file mode 100644 index 000000000..af7f0a1d7 --- /dev/null +++ b/stripe/params/capital/_financing_transaction_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 FinancingTransactionRetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/checkout/__init__.py b/stripe/params/checkout/__init__.py new file mode 100644 index 000000000..48634f0ab --- /dev/null +++ b/stripe/params/checkout/__init__.py @@ -0,0 +1,26 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe.params.checkout._session_create_params import ( + SessionCreateParams as SessionCreateParams, +) +from stripe.params.checkout._session_expire_params import ( + SessionExpireParams as SessionExpireParams, +) +from stripe.params.checkout._session_line_item_list_params import ( + SessionLineItemListParams as SessionLineItemListParams, +) +from stripe.params.checkout._session_list_line_items_params import ( + SessionListLineItemsParams as SessionListLineItemsParams, +) +from stripe.params.checkout._session_list_params import ( + SessionListParams as SessionListParams, +) +from stripe.params.checkout._session_modify_params import ( + SessionModifyParams as SessionModifyParams, +) +from stripe.params.checkout._session_retrieve_params import ( + SessionRetrieveParams as SessionRetrieveParams, +) +from stripe.params.checkout._session_update_params import ( + SessionUpdateParams as SessionUpdateParams, +) diff --git a/stripe/params/checkout/_session_create_params.py b/stripe/params/checkout/_session_create_params.py new file mode 100644 index 000000000..987c988a4 --- /dev/null +++ b/stripe/params/checkout/_session_create_params.py @@ -0,0 +1,3147 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class SessionCreateParams(RequestOptions): + adaptive_pricing: NotRequired["SessionCreateParamsAdaptivePricing"] + """ + Settings for price localization with [Adaptive Pricing](https://docs.stripe.com/payments/checkout/adaptive-pricing). + """ + after_expiration: NotRequired["SessionCreateParamsAfterExpiration"] + """ + Configure actions after a Checkout Session has expired. + """ + allow_promotion_codes: NotRequired[bool] + """ + Enables user redeemable promotion codes. + """ + automatic_tax: NotRequired["SessionCreateParamsAutomaticTax"] + """ + Settings for automatic tax lookup for this session and resulting payments, invoices, and subscriptions. + """ + billing_address_collection: NotRequired[Literal["auto", "required"]] + """ + Specify whether Checkout should collect the customer's billing address. Defaults to `auto`. + """ + branding_settings: NotRequired["SessionCreateParamsBrandingSettings"] + """ + The branding settings for the Checkout Session. This parameter is not allowed if ui_mode is `custom`. + """ + cancel_url: NotRequired[str] + """ + If set, Checkout displays a back button and customers will be directed to this URL if they decide to cancel payment and return to your website. This parameter is not allowed if ui_mode is `embedded` or `custom`. + """ + client_reference_id: NotRequired[str] + """ + A unique string to reference the Checkout Session. This can be a + customer ID, a cart ID, or similar, and can be used to reconcile the + session with your internal systems. + """ + consent_collection: NotRequired["SessionCreateParamsConsentCollection"] + """ + Configure fields for the Checkout Session to gather active consent from customers. + """ + currency: NotRequired[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). Required in `setup` mode when `payment_method_types` is not set. + """ + custom_fields: NotRequired[List["SessionCreateParamsCustomField"]] + """ + Collect additional information from your customer using custom fields. Up to 3 fields are supported. + """ + custom_text: NotRequired["SessionCreateParamsCustomText"] + """ + Display additional text for your customers using custom text. + """ + customer: NotRequired[str] + """ + ID of an existing Customer, if one exists. In `payment` mode, the customer's most recently saved card + payment method will be used to prefill the email, name, card details, and billing address + on the Checkout page. In `subscription` mode, the customer's [default payment method](https://stripe.com/docs/api/customers/update#update_customer-invoice_settings-default_payment_method) + will be used if it's a card, otherwise the most recently saved card will be used. A valid billing address, billing name and billing email are required on the payment method for Checkout to prefill the customer's card details. + + If the Customer already has a valid [email](https://stripe.com/docs/api/customers/object#customer_object-email) set, the email will be prefilled and not editable in Checkout. + If the Customer does not have a valid `email`, Checkout will set the email entered during the session on the Customer. + + If blank for Checkout Sessions in `subscription` mode or with `customer_creation` set as `always` in `payment` mode, Checkout will create a new Customer object based on information provided during the payment flow. + + You can set [`payment_intent_data.setup_future_usage`](https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-payment_intent_data-setup_future_usage) to have Checkout automatically attach the payment method to the Customer you pass in for future reuse. + """ + customer_account: NotRequired[str] + """ + ID of an existing Account, if one exists. Has the same behavior as `customer`. + """ + customer_creation: NotRequired[Literal["always", "if_required"]] + """ + Configure whether a Checkout Session creates a [Customer](https://stripe.com/docs/api/customers) during Session confirmation. + + When a Customer is not created, you can still retrieve email, address, and other customer data entered in Checkout + with [customer_details](https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-customer_details). + + Sessions that don't create Customers instead are grouped by [guest customers](https://stripe.com/docs/payments/checkout/guest-customers) + in the Dashboard. Promotion codes limited to first time customers will return invalid for these Sessions. + + Can only be set in `payment` and `setup` mode. + """ + customer_email: NotRequired[str] + """ + If provided, this value will be used when the Customer object is created. + If not provided, customers will be asked to enter their email address. + Use this parameter to prefill customer data if you already have an email + on file. To access information about the customer once a session is + complete, use the `customer` field. + """ + customer_update: NotRequired["SessionCreateParamsCustomerUpdate"] + """ + Controls what fields on Customer can be updated by the Checkout Session. Can only be provided when `customer` is provided. + """ + discounts: NotRequired[List["SessionCreateParamsDiscount"]] + """ + The coupon or promotion code to apply to this Session. Currently, only up to one may be specified. + """ + excluded_payment_method_types: NotRequired[ + List[ + Literal[ + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "alma", + "amazon_pay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "billie", + "blik", + "boleto", + "card", + "cashapp", + "crypto", + "customer_balance", + "eps", + "fpx", + "giropay", + "gopay", + "grabpay", + "ideal", + "kakao_pay", + "klarna", + "konbini", + "kr_card", + "mb_way", + "mobilepay", + "multibanco", + "naver_pay", + "nz_bank_account", + "oxxo", + "p24", + "pay_by_bank", + "payco", + "paynow", + "paypal", + "paypay", + "payto", + "pix", + "promptpay", + "qris", + "rechnung", + "revolut_pay", + "samsung_pay", + "satispay", + "sepa_debit", + "shopeepay", + "sofort", + "swish", + "twint", + "us_bank_account", + "wechat_pay", + "zip", + ] + ] + ] + """ + A list of the types of payment methods (e.g., `card`) that should be excluded from this Checkout Session. This should only be used when payment methods for this Checkout Session are managed through the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + expires_at: NotRequired[int] + """ + The Epoch time in seconds at which the Checkout Session will expire. It can be anywhere from 30 minutes to 24 hours after Checkout Session creation. By default, this value is 24 hours from creation. + """ + invoice_creation: NotRequired["SessionCreateParamsInvoiceCreation"] + """ + Generate a post-purchase Invoice for one-time payments. + """ + line_items: NotRequired[List["SessionCreateParamsLineItem"]] + """ + A list of items the customer is purchasing. Use this parameter to pass one-time or recurring [Prices](https://stripe.com/docs/api/prices). The parameter is required for `payment` and `subscription` mode. + + For `payment` mode, there is a maximum of 100 line items, however it is recommended to consolidate line items if there are more than a few dozen. + + For `subscription` mode, there is a maximum of 20 line items with recurring Prices and 20 line items with one-time Prices. Line items with one-time Prices will be on the initial invoice only. + """ + locale: NotRequired[ + Literal[ + "auto", + "bg", + "cs", + "da", + "de", + "el", + "en", + "en-GB", + "es", + "es-419", + "et", + "fi", + "fil", + "fr", + "fr-CA", + "hr", + "hu", + "id", + "it", + "ja", + "ko", + "lt", + "lv", + "ms", + "mt", + "nb", + "nl", + "pl", + "pt", + "pt-BR", + "ro", + "ru", + "sk", + "sl", + "sv", + "th", + "tr", + "vi", + "zh", + "zh-HK", + "zh-TW", + ] + ] + """ + The IETF language tag of the locale Checkout is displayed in. If blank or `auto`, the browser's locale is used. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + mode: NotRequired[Literal["payment", "setup", "subscription"]] + """ + The mode of the Checkout Session. Pass `subscription` if the Checkout Session includes at least one recurring item. + """ + name_collection: NotRequired["SessionCreateParamsNameCollection"] + """ + Controls name collection settings for the session. + + You can configure Checkout to collect your customers' business names, individual names, or both. Each name field can be either required or optional. + + If a [Customer](https://stripe.com/docs/api/customers) is created or provided, the names can be saved to the Customer object as well. + """ + optional_items: NotRequired[List["SessionCreateParamsOptionalItem"]] + """ + A list of optional items the customer can add to their order at checkout. Use this parameter to pass one-time or recurring [Prices](https://stripe.com/docs/api/prices). + + There is a maximum of 10 optional items allowed on a Checkout Session, and the existing limits on the number of line items allowed on a Checkout Session apply to the combined number of line items and optional items. + + For `payment` mode, there is a maximum of 100 combined line items and optional items, however it is recommended to consolidate items if there are more than a few dozen. + + For `subscription` mode, there is a maximum of 20 line items and optional items with recurring Prices and 20 line items and optional items with one-time Prices. + """ + origin_context: NotRequired[Literal["mobile_app", "web"]] + """ + Where the user is coming from. This informs the optimizations that are applied to the session. + """ + payment_intent_data: NotRequired["SessionCreateParamsPaymentIntentData"] + """ + A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in `payment` mode. + """ + payment_method_collection: NotRequired[Literal["always", "if_required"]] + """ + Specify whether Checkout should collect a payment method. When set to `if_required`, Checkout will not collect a payment method when the total due for the session is 0. + This may occur if the Checkout Session includes a free trial or a discount. + + Can only be set in `subscription` mode. Defaults to `always`. + + If you'd like information on how to collect a payment method outside of Checkout, read the guide on configuring [subscriptions with a free trial](https://stripe.com/docs/payments/checkout/free-trials). + """ + payment_method_configuration: NotRequired[str] + """ + The ID of the payment method configuration to use with this Checkout session. + """ + payment_method_data: NotRequired["SessionCreateParamsPaymentMethodData"] + """ + This parameter allows you to set some attributes on the payment method created during a Checkout session. + """ + payment_method_options: NotRequired[ + "SessionCreateParamsPaymentMethodOptions" + ] + """ + Payment-method-specific configuration. + """ + payment_method_types: NotRequired[ + List[ + Literal[ + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "alma", + "amazon_pay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "billie", + "blik", + "boleto", + "card", + "cashapp", + "crypto", + "customer_balance", + "eps", + "fpx", + "giropay", + "gopay", + "grabpay", + "ideal", + "kakao_pay", + "klarna", + "konbini", + "kr_card", + "link", + "mb_way", + "mobilepay", + "multibanco", + "naver_pay", + "nz_bank_account", + "oxxo", + "p24", + "pay_by_bank", + "payco", + "paynow", + "paypal", + "paypay", + "payto", + "pix", + "promptpay", + "qris", + "rechnung", + "revolut_pay", + "samsung_pay", + "satispay", + "sepa_debit", + "shopeepay", + "sofort", + "swish", + "twint", + "us_bank_account", + "wechat_pay", + "zip", + ] + ] + ] + """ + A list of the types of payment methods (e.g., `card`) this Checkout Session can accept. + + You can omit this attribute to manage your payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). + See [Dynamic Payment Methods](https://stripe.com/docs/payments/payment-methods/integration-options#using-dynamic-payment-methods) for more details. + + Read more about the supported payment methods and their requirements in our [payment + method details guide](https://docs.stripe.com/docs/payments/checkout/payment-methods). + + If multiple payment methods are passed, Checkout will dynamically reorder them to + prioritize the most relevant payment methods based on the customer's location and + other characteristics. + """ + permissions: NotRequired["SessionCreateParamsPermissions"] + """ + This property is used to set up permissions for various actions (e.g., update) on the CheckoutSession object. Can only be set when creating `embedded` or `custom` sessions. + + For specific permissions, please refer to their dedicated subsections, such as `permissions.update_shipping_details`. + """ + phone_number_collection: NotRequired[ + "SessionCreateParamsPhoneNumberCollection" + ] + """ + Controls phone number collection settings for the session. + + We recommend that you review your privacy policy and check with your legal contacts + before using this feature. Learn more about [collecting phone numbers with Checkout](https://stripe.com/docs/payments/checkout/phone-numbers). + """ + redirect_on_completion: NotRequired[ + Literal["always", "if_required", "never"] + ] + """ + This parameter applies to `ui_mode: embedded`. Learn more about the [redirect behavior](https://stripe.com/docs/payments/checkout/custom-success-page?payment-ui=embedded-form) of embedded sessions. Defaults to `always`. + """ + return_url: NotRequired[str] + """ + The URL to redirect your customer back to after they authenticate or cancel their payment on the + payment method's app or site. This parameter is required if `ui_mode` is `embedded` or `custom` + and redirect-based payment methods are enabled on the session. + """ + saved_payment_method_options: NotRequired[ + "SessionCreateParamsSavedPaymentMethodOptions" + ] + """ + Controls saved payment method settings for the session. Only available in `payment` and `subscription` mode. + """ + setup_intent_data: NotRequired["SessionCreateParamsSetupIntentData"] + """ + A subset of parameters to be passed to SetupIntent creation for Checkout Sessions in `setup` mode. + """ + shipping_address_collection: NotRequired[ + "SessionCreateParamsShippingAddressCollection" + ] + """ + When set, provides configuration for Checkout to collect a shipping address from a customer. + """ + shipping_options: NotRequired[List["SessionCreateParamsShippingOption"]] + """ + The shipping rate options to apply to this Session. Up to a maximum of 5. + """ + submit_type: NotRequired[ + Literal["auto", "book", "donate", "pay", "subscribe"] + ] + """ + Describes the type of transaction being performed by Checkout in order + to customize relevant text on the page, such as the submit button. + `submit_type` can only be specified on Checkout Sessions in + `payment` or `subscription` mode. If blank or `auto`, `pay` is used. + """ + subscription_data: NotRequired["SessionCreateParamsSubscriptionData"] + """ + A subset of parameters to be passed to subscription creation for Checkout Sessions in `subscription` mode. + """ + success_url: NotRequired[str] + """ + The URL to which Stripe should send customers when payment or setup + is complete. + This parameter is not allowed if ui_mode is `embedded` or `custom`. If you'd like to use + information from the successful Checkout Session on your page, read the + guide on [customizing your success page](https://stripe.com/docs/payments/checkout/custom-success-page). + """ + tax_id_collection: NotRequired["SessionCreateParamsTaxIdCollection"] + """ + Controls tax ID collection during checkout. + """ + ui_mode: NotRequired[Literal["custom", "embedded", "hosted"]] + """ + The UI mode of the Session. Defaults to `hosted`. + """ + wallet_options: NotRequired["SessionCreateParamsWalletOptions"] + """ + Wallet-specific configuration. + """ + checkout_items: NotRequired[List["SessionCreateParamsCheckoutItem"]] + + +class SessionCreateParamsAdaptivePricing(TypedDict): + enabled: NotRequired[bool] + """ + If set to `true`, Adaptive Pricing is available on [eligible sessions](https://docs.stripe.com/payments/currencies/localize-prices/adaptive-pricing?payment-ui=stripe-hosted#restrictions). Defaults to your [dashboard setting](https://dashboard.stripe.com/settings/adaptive-pricing). + """ + + +class SessionCreateParamsAfterExpiration(TypedDict): + recovery: NotRequired["SessionCreateParamsAfterExpirationRecovery"] + """ + Configure a Checkout Session that can be used to recover an expired session. + """ + + +class SessionCreateParamsAfterExpirationRecovery(TypedDict): + allow_promotion_codes: NotRequired[bool] + """ + Enables user redeemable promotion codes on the recovered Checkout Sessions. Defaults to `false` + """ + enabled: bool + """ + If `true`, a recovery URL will be generated to recover this Checkout Session if it + expires before a successful transaction is completed. It will be attached to the + Checkout Session object upon expiration. + """ + + +class SessionCreateParamsAutomaticTax(TypedDict): + enabled: bool + """ + Set to `true` to [calculate tax automatically](https://docs.stripe.com/tax) using the customer's location. + + Enabling this parameter causes Checkout to collect any billing address information necessary for tax calculation. + """ + liability: NotRequired["SessionCreateParamsAutomaticTaxLiability"] + """ + The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + """ + + +class SessionCreateParamsAutomaticTaxLiability(TypedDict): + account: NotRequired[str] + """ + The connected account being referenced when `type` is `account`. + """ + type: Literal["account", "self"] + """ + Type of the account referenced in the request. + """ + + +class SessionCreateParamsBrandingSettings(TypedDict): + background_color: NotRequired["Literal['']|str"] + """ + A hex color value starting with `#` representing the background color for the Checkout Session. + """ + border_style: NotRequired[ + "Literal['']|Literal['pill', 'rectangular', 'rounded']" + ] + """ + The border style for the Checkout Session. + """ + button_color: NotRequired["Literal['']|str"] + """ + A hex color value starting with `#` representing the button color for the Checkout Session. + """ + display_name: NotRequired[str] + """ + A string to override the business name shown on the Checkout Session. + """ + font_family: NotRequired[ + "Literal['']|Literal['be_vietnam_pro', 'bitter', 'chakra_petch', 'default', 'hahmlet', 'inconsolata', 'inter', 'lato', 'lora', 'm_plus_1_code', 'montserrat', 'noto_sans', 'noto_sans_jp', 'noto_serif', 'nunito', 'open_sans', 'pridi', 'pt_sans', 'pt_serif', 'raleway', 'roboto', 'roboto_slab', 'source_sans_pro', 'titillium_web', 'ubuntu_mono', 'zen_maru_gothic']" + ] + """ + The font family for the Checkout Session corresponding to one of the [supported font families](https://docs.stripe.com/payments/checkout/customization/appearance?payment-ui=stripe-hosted#font-compatibility). + """ + icon: NotRequired["SessionCreateParamsBrandingSettingsIcon"] + """ + The icon for the Checkout Session. You cannot set both `logo` and `icon`. + """ + logo: NotRequired["SessionCreateParamsBrandingSettingsLogo"] + """ + The logo for the Checkout Session. You cannot set both `logo` and `icon`. + """ + + +class SessionCreateParamsBrandingSettingsIcon(TypedDict): + file: NotRequired[str] + """ + The ID of a [File upload](https://stripe.com/docs/api/files) representing the icon. Purpose must be `business_icon`. Required if `type` is `file` and disallowed otherwise. + """ + type: Literal["file", "url"] + """ + The type of image for the icon. Must be one of `file` or `url`. + """ + url: NotRequired[str] + """ + The URL of the image. Required if `type` is `url` and disallowed otherwise. + """ + + +class SessionCreateParamsBrandingSettingsLogo(TypedDict): + file: NotRequired[str] + """ + The ID of a [File upload](https://stripe.com/docs/api/files) representing the logo. Purpose must be `business_logo`. Required if `type` is `file` and disallowed otherwise. + """ + type: Literal["file", "url"] + """ + The type of image for the logo. Must be one of `file` or `url`. + """ + url: NotRequired[str] + """ + The URL of the image. Required if `type` is `url` and disallowed otherwise. + """ + + +class SessionCreateParamsConsentCollection(TypedDict): + payment_method_reuse_agreement: NotRequired[ + "SessionCreateParamsConsentCollectionPaymentMethodReuseAgreement" + ] + """ + Determines the display of payment method reuse agreement text in the UI. If set to `hidden`, it will hide legal text related to the reuse of a payment method. + """ + promotions: NotRequired[Literal["auto", "none"]] + """ + If set to `auto`, enables the collection of customer consent for promotional communications. The Checkout + Session will determine whether to display an option to opt into promotional communication + from the merchant depending on the customer's locale. Only available to US merchants. + """ + terms_of_service: NotRequired[Literal["none", "required"]] + """ + If set to `required`, it requires customers to check a terms of service checkbox before being able to pay. + There must be a valid terms of service URL set in your [Dashboard settings](https://dashboard.stripe.com/settings/public). + """ + + +class SessionCreateParamsConsentCollectionPaymentMethodReuseAgreement( + TypedDict, +): + position: Literal["auto", "hidden"] + """ + Determines the position and visibility of the payment method reuse agreement in the UI. When set to `auto`, Stripe's + defaults will be used. When set to `hidden`, the payment method reuse agreement text will always be hidden in the UI. + """ + + +class SessionCreateParamsCustomField(TypedDict): + dropdown: NotRequired["SessionCreateParamsCustomFieldDropdown"] + """ + Configuration for `type=dropdown` fields. + """ + key: str + """ + String of your choice that your integration can use to reconcile this field. Must be unique to this field, alphanumeric, and up to 200 characters. + """ + label: "SessionCreateParamsCustomFieldLabel" + """ + The label for the field, displayed to the customer. + """ + numeric: NotRequired["SessionCreateParamsCustomFieldNumeric"] + """ + Configuration for `type=numeric` fields. + """ + optional: NotRequired[bool] + """ + Whether the customer is required to complete the field before completing the Checkout Session. Defaults to `false`. + """ + text: NotRequired["SessionCreateParamsCustomFieldText"] + """ + Configuration for `type=text` fields. + """ + type: Literal["dropdown", "numeric", "text"] + """ + The type of the field. + """ + + +class SessionCreateParamsCustomFieldDropdown(TypedDict): + default_value: NotRequired[str] + """ + The value that will pre-fill the field on the payment page.Must match a `value` in the `options` array. + """ + options: List["SessionCreateParamsCustomFieldDropdownOption"] + """ + The options available for the customer to select. Up to 200 options allowed. + """ + + +class SessionCreateParamsCustomFieldDropdownOption(TypedDict): + label: str + """ + The label for the option, displayed to the customer. Up to 100 characters. + """ + value: str + """ + The value for this option, not displayed to the customer, used by your integration to reconcile the option selected by the customer. Must be unique to this option, alphanumeric, and up to 100 characters. + """ + + +class SessionCreateParamsCustomFieldLabel(TypedDict): + custom: str + """ + Custom text for the label, displayed to the customer. Up to 50 characters. + """ + type: Literal["custom"] + """ + The type of the label. + """ + + +class SessionCreateParamsCustomFieldNumeric(TypedDict): + default_value: NotRequired[str] + """ + The value that will pre-fill the field on the payment page. + """ + maximum_length: NotRequired[int] + """ + The maximum character length constraint for the customer's input. + """ + minimum_length: NotRequired[int] + """ + The minimum character length requirement for the customer's input. + """ + + +class SessionCreateParamsCustomFieldText(TypedDict): + default_value: NotRequired[str] + """ + The value that will pre-fill the field on the payment page. + """ + maximum_length: NotRequired[int] + """ + The maximum character length constraint for the customer's input. + """ + minimum_length: NotRequired[int] + """ + The minimum character length requirement for the customer's input. + """ + + +class SessionCreateParamsCustomText(TypedDict): + after_submit: NotRequired[ + "Literal['']|SessionCreateParamsCustomTextAfterSubmit" + ] + """ + Custom text that should be displayed after the payment confirmation button. + """ + shipping_address: NotRequired[ + "Literal['']|SessionCreateParamsCustomTextShippingAddress" + ] + """ + Custom text that should be displayed alongside shipping address collection. + """ + submit: NotRequired["Literal['']|SessionCreateParamsCustomTextSubmit"] + """ + Custom text that should be displayed alongside the payment confirmation button. + """ + terms_of_service_acceptance: NotRequired[ + "Literal['']|SessionCreateParamsCustomTextTermsOfServiceAcceptance" + ] + """ + Custom text that should be displayed in place of the default terms of service agreement text. + """ + + +class SessionCreateParamsCustomTextAfterSubmit(TypedDict): + message: str + """ + Text may be up to 1200 characters in length. + """ + + +class SessionCreateParamsCustomTextShippingAddress(TypedDict): + message: str + """ + Text may be up to 1200 characters in length. + """ + + +class SessionCreateParamsCustomTextSubmit(TypedDict): + message: str + """ + Text may be up to 1200 characters in length. + """ + + +class SessionCreateParamsCustomTextTermsOfServiceAcceptance(TypedDict): + message: str + """ + Text may be up to 1200 characters in length. + """ + + +class SessionCreateParamsCustomerUpdate(TypedDict): + address: NotRequired[Literal["auto", "never"]] + """ + Describes whether Checkout saves the billing address onto `customer.address`. + To always collect a full billing address, use `billing_address_collection`. Defaults to `never`. + """ + name: NotRequired[Literal["auto", "never"]] + """ + Describes whether Checkout saves the name onto `customer.name`. Defaults to `never`. + """ + shipping: NotRequired[Literal["auto", "never"]] + """ + Describes whether Checkout saves shipping information onto `customer.shipping`. + To collect shipping information, use `shipping_address_collection`. Defaults to `never`. + """ + + +class SessionCreateParamsDiscount(TypedDict): + coupon: NotRequired[str] + """ + The ID of the coupon to apply to this Session. + """ + coupon_data: NotRequired["SessionCreateParamsDiscountCouponData"] + """ + Data used to generate a new [Coupon](https://stripe.com/docs/api/coupon) object inline. One of `coupon` or `coupon_data` is required when updating discounts. + """ + promotion_code: NotRequired[str] + """ + The ID of a promotion code to apply to this Session. + """ + + +class SessionCreateParamsDiscountCouponData(TypedDict): + amount_off: NotRequired[int] + """ + A positive integer representing the amount to subtract from an invoice total (required if `percent_off` is not passed). + """ + currency: NotRequired[str] + """ + Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) of the `amount_off` parameter (required if `amount_off` is passed). + """ + duration: NotRequired[Literal["forever", "once", "repeating"]] + """ + Specifies how long the discount will be in effect if used on a subscription. Defaults to `once`. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + name: NotRequired[str] + """ + Name of the coupon displayed to customers on, for instance invoices, or receipts. By default the `id` is shown if `name` is not set. + """ + percent_off: NotRequired[float] + """ + A positive float larger than 0, and smaller or equal to 100, that represents the discount the coupon will apply (required if `amount_off` is not passed). + """ + + +class SessionCreateParamsInvoiceCreation(TypedDict): + enabled: bool + """ + Set to `true` to enable invoice creation. + """ + invoice_data: NotRequired["SessionCreateParamsInvoiceCreationInvoiceData"] + """ + Parameters passed when creating invoices for payment-mode Checkout Sessions. + """ + + +class SessionCreateParamsInvoiceCreationInvoiceData(TypedDict): + account_tax_ids: NotRequired["Literal['']|List[str]"] + """ + The account tax IDs associated with the invoice. + """ + custom_fields: NotRequired[ + "Literal['']|List[SessionCreateParamsInvoiceCreationInvoiceDataCustomField]" + ] + """ + Default custom fields to be displayed on invoices for this customer. + """ + description: NotRequired[str] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ + footer: NotRequired[str] + """ + Default footer to be displayed on invoices for this customer. + """ + issuer: NotRequired["SessionCreateParamsInvoiceCreationInvoiceDataIssuer"] + """ + The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + rendering_options: NotRequired[ + "Literal['']|SessionCreateParamsInvoiceCreationInvoiceDataRenderingOptions" + ] + """ + Default options for invoice PDF rendering for this customer. + """ + + +class SessionCreateParamsInvoiceCreationInvoiceDataCustomField(TypedDict): + name: str + """ + The name of the custom field. This may be up to 40 characters. + """ + value: str + """ + The value of the custom field. This may be up to 140 characters. + """ + + +class SessionCreateParamsInvoiceCreationInvoiceDataIssuer(TypedDict): + account: NotRequired[str] + """ + The connected account being referenced when `type` is `account`. + """ + type: Literal["account", "self"] + """ + Type of the account referenced in the request. + """ + + +class SessionCreateParamsInvoiceCreationInvoiceDataRenderingOptions(TypedDict): + amount_tax_display: NotRequired[ + "Literal['']|Literal['exclude_tax', 'include_inclusive_tax']" + ] + """ + How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One of `exclude_tax` or `include_inclusive_tax`. `include_inclusive_tax` will include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. `exclude_tax` will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts. + """ + template: NotRequired[str] + """ + ID of the invoice rendering template to use for this invoice. + """ + + +class SessionCreateParamsLineItem(TypedDict): + adjustable_quantity: NotRequired[ + "SessionCreateParamsLineItemAdjustableQuantity" + ] + """ + When set, provides configuration for this item's quantity to be adjusted by the customer during Checkout. + """ + dynamic_tax_rates: NotRequired[List[str]] + """ + The [tax rates](https://stripe.com/docs/api/tax_rates) that will be applied to this line item depending on the customer's billing/shipping address. We currently support the following countries: US, GB, AU, and all countries in the EU. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + price: NotRequired[str] + """ + The ID of the [Price](https://stripe.com/docs/api/prices) or [Plan](https://stripe.com/docs/api/plans) object. One of `price` or `price_data` is required. + """ + price_data: NotRequired["SessionCreateParamsLineItemPriceData"] + """ + Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. + """ + quantity: NotRequired[int] + """ + The quantity of the line item being purchased. Quantity should not be defined when `recurring.usage_type=metered`. + """ + tax_rates: NotRequired[List[str]] + """ + The [tax rates](https://stripe.com/docs/api/tax_rates) which apply to this line item. + """ + + +class SessionCreateParamsLineItemAdjustableQuantity(TypedDict): + enabled: bool + """ + Set to true if the quantity can be adjusted to any non-negative integer. + """ + maximum: NotRequired[int] + """ + The maximum quantity the customer can purchase for the Checkout Session. By default this value is 99. You can specify a value up to 999999. + """ + minimum: NotRequired[int] + """ + The minimum quantity the customer must purchase for the Checkout Session. By default this value is 0. + """ + + +class SessionCreateParamsLineItemPriceData(TypedDict): + 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). + """ + product: NotRequired[str] + """ + The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to. One of `product` or `product_data` is required. + """ + product_data: NotRequired[ + "SessionCreateParamsLineItemPriceDataProductData" + ] + """ + Data used to generate a new [Product](https://docs.stripe.com/api/products) object inline. One of `product` or `product_data` is required. + """ + recurring: NotRequired["SessionCreateParamsLineItemPriceDataRecurring"] + """ + The recurring components of a price such as `interval` and `interval_count`. + """ + tax_behavior: NotRequired[Literal["exclusive", "inclusive", "unspecified"]] + """ + Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + """ + unit_amount: NotRequired[int] + """ + A non-negative integer in cents (or local equivalent) representing how much to charge. One of `unit_amount` or `unit_amount_decimal` is required. + """ + unit_amount_decimal: NotRequired[str] + """ + Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + """ + + +class SessionCreateParamsLineItemPriceDataProductData(TypedDict): + description: NotRequired[str] + """ + The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. + """ + images: NotRequired[List[str]] + """ + A list of up to 8 URLs of images for this product, meant to be displayable to the customer. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + name: str + """ + The product's name, meant to be displayable to the customer. + """ + tax_code: NotRequired[str] + """ + A [tax code](https://stripe.com/docs/tax/tax-categories) ID. + """ + unit_label: NotRequired[str] + """ + A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal. + """ + + +class SessionCreateParamsLineItemPriceDataRecurring(TypedDict): + interval: Literal["day", "month", "week", "year"] + """ + Specifies billing frequency. Either `day`, `week`, `month` or `year`. + """ + interval_count: NotRequired[int] + """ + The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). + """ + + +class SessionCreateParamsNameCollection(TypedDict): + business: NotRequired["SessionCreateParamsNameCollectionBusiness"] + """ + Controls settings applied for collecting the customer's business name on the session. + """ + individual: NotRequired["SessionCreateParamsNameCollectionIndividual"] + """ + Controls settings applied for collecting the customer's individual name on the session. + """ + + +class SessionCreateParamsNameCollectionBusiness(TypedDict): + enabled: bool + """ + Enable business name collection on the Checkout Session. Defaults to `false`. + """ + optional: NotRequired[bool] + """ + Whether the customer is required to provide a business name before completing the Checkout Session. Defaults to `false`. + """ + + +class SessionCreateParamsNameCollectionIndividual(TypedDict): + enabled: bool + """ + Enable individual name collection on the Checkout Session. Defaults to `false`. + """ + optional: NotRequired[bool] + """ + Whether the customer is required to provide their name before completing the Checkout Session. Defaults to `false`. + """ + + +class SessionCreateParamsOptionalItem(TypedDict): + adjustable_quantity: NotRequired[ + "SessionCreateParamsOptionalItemAdjustableQuantity" + ] + """ + When set, provides configuration for the customer to adjust the quantity of the line item created when a customer chooses to add this optional item to their order. + """ + price: str + """ + The ID of the [Price](https://stripe.com/docs/api/prices) or [Plan](https://stripe.com/docs/api/plans) object. + """ + quantity: int + """ + The initial quantity of the line item created when a customer chooses to add this optional item to their order. + """ + + +class SessionCreateParamsOptionalItemAdjustableQuantity(TypedDict): + enabled: bool + """ + Set to true if the quantity can be adjusted to any non-negative integer. + """ + maximum: NotRequired[int] + """ + The maximum quantity of this item the customer can purchase. By default this value is 99. You can specify a value up to 999999. + """ + minimum: NotRequired[int] + """ + The minimum quantity of this item the customer must purchase, if they choose to purchase it. Because this item is optional, the customer will always be able to remove it from their order, even if the `minimum` configured here is greater than 0. By default this value is 0. + """ + + +class SessionCreateParamsPaymentIntentData(TypedDict): + application_fee_amount: NotRequired[int] + """ + The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total amount captured. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + """ + capture_method: NotRequired[ + Literal["automatic", "automatic_async", "manual"] + ] + """ + Controls when the funds will be captured from the customer's account. + """ + description: NotRequired[str] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + on_behalf_of: NotRequired[str] + """ + The Stripe account ID for which these funds are intended. For details, + see the PaymentIntents [use case for connected + accounts](https://docs.stripe.com/docs/payments/connected-accounts). + """ + receipt_email: NotRequired[str] + """ + Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). + """ + setup_future_usage: NotRequired[Literal["off_session", "on_session"]] + """ + Indicates that you intend to [make future payments](https://stripe.com/docs/payments/payment-intents#future-usage) with the payment + method collected by this Checkout Session. + + When setting this to `on_session`, Checkout will show a notice to the + customer that their payment details will be saved. + + When setting this to `off_session`, Checkout will show a notice to the + customer that their payment details will be saved and used for future + payments. + + If a Customer has been provided or Checkout creates a new Customer, + Checkout will attach the payment method to the Customer. + + If Checkout does not create a Customer, the payment method is not attached + to a Customer. To reuse the payment method, you can retrieve it from the + Checkout Session's PaymentIntent. + + When processing card payments, Checkout also uses `setup_future_usage` + to dynamically optimize your payment flow and comply with regional + legislation and network rules, such as SCA. + """ + shipping: NotRequired["SessionCreateParamsPaymentIntentDataShipping"] + """ + Shipping information for this payment. + """ + statement_descriptor: NotRequired[str] + """ + Text that appears on the customer's statement as the statement descriptor for a non-card charge. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see [the Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors). + + Setting this value for a card charge returns an error. For card charges, set the [statement_descriptor_suffix](https://docs.stripe.com/get-started/account/statement-descriptors#dynamic) instead. + """ + statement_descriptor_suffix: NotRequired[str] + """ + Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. + """ + transfer_data: NotRequired[ + "SessionCreateParamsPaymentIntentDataTransferData" + ] + """ + The parameters used to automatically create a Transfer when the payment succeeds. + For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + """ + transfer_group: NotRequired[str] + """ + A string that identifies the resulting payment as part of a group. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/connect/separate-charges-and-transfers) for details. + """ + + +class SessionCreateParamsPaymentIntentDataShipping(TypedDict): + address: "SessionCreateParamsPaymentIntentDataShippingAddress" + """ + Shipping address. + """ + carrier: NotRequired[str] + """ + The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. + """ + name: str + """ + Recipient name. + """ + phone: NotRequired[str] + """ + Recipient phone (including extension). + """ + tracking_number: NotRequired[str] + """ + The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. + """ + + +class SessionCreateParamsPaymentIntentDataShippingAddress(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: 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. + """ + + +class SessionCreateParamsPaymentIntentDataTransferData(TypedDict): + amount: NotRequired[int] + """ + The amount that will be transferred automatically when a charge succeeds. + """ + destination: str + """ + If specified, successful charges will be attributed to the destination + account for tax reporting, and the funds from charges will be transferred + to the destination account. The ID of the resulting transfer will be + returned on the successful charge's `transfer` field. + """ + + +class SessionCreateParamsPaymentMethodData(TypedDict): + allow_redisplay: NotRequired[Literal["always", "limited", "unspecified"]] + """ + Allow redisplay will be set on the payment method on confirmation and indicates whether this payment method can be shown again to the customer in a checkout flow. Only set this field if you wish to override the allow_redisplay value determined by Checkout. + """ + + +class SessionCreateParamsPaymentMethodOptions(TypedDict): + acss_debit: NotRequired["SessionCreateParamsPaymentMethodOptionsAcssDebit"] + """ + contains details about the ACSS Debit payment method options. + """ + affirm: NotRequired["SessionCreateParamsPaymentMethodOptionsAffirm"] + """ + contains details about the Affirm payment method options. + """ + afterpay_clearpay: NotRequired[ + "SessionCreateParamsPaymentMethodOptionsAfterpayClearpay" + ] + """ + contains details about the Afterpay Clearpay payment method options. + """ + alipay: NotRequired["SessionCreateParamsPaymentMethodOptionsAlipay"] + """ + contains details about the Alipay payment method options. + """ + alma: NotRequired["SessionCreateParamsPaymentMethodOptionsAlma"] + """ + contains details about the Alma payment method options. + """ + amazon_pay: NotRequired["SessionCreateParamsPaymentMethodOptionsAmazonPay"] + """ + contains details about the AmazonPay payment method options. + """ + au_becs_debit: NotRequired[ + "SessionCreateParamsPaymentMethodOptionsAuBecsDebit" + ] + """ + contains details about the AU Becs Debit payment method options. + """ + bacs_debit: NotRequired["SessionCreateParamsPaymentMethodOptionsBacsDebit"] + """ + contains details about the Bacs Debit payment method options. + """ + bancontact: NotRequired[ + "SessionCreateParamsPaymentMethodOptionsBancontact" + ] + """ + contains details about the Bancontact payment method options. + """ + billie: NotRequired["SessionCreateParamsPaymentMethodOptionsBillie"] + """ + contains details about the Billie payment method options. + """ + boleto: NotRequired["SessionCreateParamsPaymentMethodOptionsBoleto"] + """ + contains details about the Boleto payment method options. + """ + card: NotRequired["SessionCreateParamsPaymentMethodOptionsCard"] + """ + contains details about the Card payment method options. + """ + cashapp: NotRequired["SessionCreateParamsPaymentMethodOptionsCashapp"] + """ + contains details about the Cashapp Pay payment method options. + """ + customer_balance: NotRequired[ + "SessionCreateParamsPaymentMethodOptionsCustomerBalance" + ] + """ + contains details about the Customer Balance payment method options. + """ + demo_pay: NotRequired["SessionCreateParamsPaymentMethodOptionsDemoPay"] + """ + contains details about the DemoPay payment method options. + """ + eps: NotRequired["SessionCreateParamsPaymentMethodOptionsEps"] + """ + contains details about the EPS payment method options. + """ + fpx: NotRequired["SessionCreateParamsPaymentMethodOptionsFpx"] + """ + contains details about the FPX payment method options. + """ + giropay: NotRequired["SessionCreateParamsPaymentMethodOptionsGiropay"] + """ + contains details about the Giropay payment method options. + """ + grabpay: NotRequired["SessionCreateParamsPaymentMethodOptionsGrabpay"] + """ + contains details about the Grabpay payment method options. + """ + ideal: NotRequired["SessionCreateParamsPaymentMethodOptionsIdeal"] + """ + contains details about the Ideal payment method options. + """ + kakao_pay: NotRequired["SessionCreateParamsPaymentMethodOptionsKakaoPay"] + """ + contains details about the Kakao Pay payment method options. + """ + klarna: NotRequired["SessionCreateParamsPaymentMethodOptionsKlarna"] + """ + contains details about the Klarna payment method options. + """ + konbini: NotRequired["SessionCreateParamsPaymentMethodOptionsKonbini"] + """ + contains details about the Konbini payment method options. + """ + kr_card: NotRequired["SessionCreateParamsPaymentMethodOptionsKrCard"] + """ + contains details about the Korean card payment method options. + """ + link: NotRequired["SessionCreateParamsPaymentMethodOptionsLink"] + """ + contains details about the Link payment method options. + """ + mobilepay: NotRequired["SessionCreateParamsPaymentMethodOptionsMobilepay"] + """ + contains details about the Mobilepay payment method options. + """ + multibanco: NotRequired[ + "SessionCreateParamsPaymentMethodOptionsMultibanco" + ] + """ + contains details about the Multibanco payment method options. + """ + naver_pay: NotRequired["SessionCreateParamsPaymentMethodOptionsNaverPay"] + """ + contains details about the Naver Pay payment method options. + """ + oxxo: NotRequired["SessionCreateParamsPaymentMethodOptionsOxxo"] + """ + contains details about the OXXO payment method options. + """ + p24: NotRequired["SessionCreateParamsPaymentMethodOptionsP24"] + """ + contains details about the P24 payment method options. + """ + pay_by_bank: NotRequired[ + "SessionCreateParamsPaymentMethodOptionsPayByBank" + ] + """ + contains details about the Pay By Bank payment method options. + """ + payco: NotRequired["SessionCreateParamsPaymentMethodOptionsPayco"] + """ + contains details about the PAYCO payment method options. + """ + paynow: NotRequired["SessionCreateParamsPaymentMethodOptionsPaynow"] + """ + contains details about the PayNow payment method options. + """ + paypal: NotRequired["SessionCreateParamsPaymentMethodOptionsPaypal"] + """ + contains details about the PayPal payment method options. + """ + payto: NotRequired["SessionCreateParamsPaymentMethodOptionsPayto"] + """ + contains details about the PayTo payment method options. + """ + pix: NotRequired["SessionCreateParamsPaymentMethodOptionsPix"] + """ + contains details about the Pix payment method options. + """ + revolut_pay: NotRequired[ + "SessionCreateParamsPaymentMethodOptionsRevolutPay" + ] + """ + contains details about the RevolutPay payment method options. + """ + samsung_pay: NotRequired[ + "SessionCreateParamsPaymentMethodOptionsSamsungPay" + ] + """ + contains details about the Samsung Pay payment method options. + """ + satispay: NotRequired["SessionCreateParamsPaymentMethodOptionsSatispay"] + """ + contains details about the Satispay payment method options. + """ + sepa_debit: NotRequired["SessionCreateParamsPaymentMethodOptionsSepaDebit"] + """ + contains details about the Sepa Debit payment method options. + """ + sofort: NotRequired["SessionCreateParamsPaymentMethodOptionsSofort"] + """ + contains details about the Sofort payment method options. + """ + swish: NotRequired["SessionCreateParamsPaymentMethodOptionsSwish"] + """ + contains details about the Swish payment method options. + """ + us_bank_account: NotRequired[ + "SessionCreateParamsPaymentMethodOptionsUsBankAccount" + ] + """ + contains details about the Us Bank Account payment method options. + """ + wechat_pay: NotRequired["SessionCreateParamsPaymentMethodOptionsWechatPay"] + """ + contains details about the WeChat Pay payment method options. + """ + + +class SessionCreateParamsPaymentMethodOptionsAcssDebit(TypedDict): + currency: NotRequired[Literal["cad", "usd"]] + """ + 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). This is only accepted for Checkout Sessions in `setup` mode. + """ + mandate_options: NotRequired[ + "SessionCreateParamsPaymentMethodOptionsAcssDebitMandateOptions" + ] + """ + Additional fields for Mandate creation + """ + setup_future_usage: NotRequired[ + Literal["none", "off_session", "on_session"] + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + """ + target_date: NotRequired[str] + """ + Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + """ + verification_method: NotRequired[ + Literal["automatic", "instant", "microdeposits"] + ] + """ + Verification method for the intent + """ + + +class SessionCreateParamsPaymentMethodOptionsAcssDebitMandateOptions( + TypedDict +): + custom_mandate_url: NotRequired["Literal['']|str"] + """ + A URL for custom mandate text to render during confirmation step. + The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent, + or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent. + """ + default_for: NotRequired[List[Literal["invoice", "subscription"]]] + """ + List of Stripe products where this mandate can be selected automatically. Only usable in `setup` mode. + """ + interval_description: NotRequired[str] + """ + Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'. + """ + payment_schedule: NotRequired[Literal["combined", "interval", "sporadic"]] + """ + Payment schedule for the mandate. + """ + transaction_type: NotRequired[Literal["business", "personal"]] + """ + Transaction type of the mandate. + """ + + +class SessionCreateParamsPaymentMethodOptionsAffirm(TypedDict): + capture_method: NotRequired[Literal["manual"]] + """ + Controls when the funds will be captured from the customer's account. + """ + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + """ + + +class SessionCreateParamsPaymentMethodOptionsAfterpayClearpay(TypedDict): + capture_method: NotRequired[Literal["manual"]] + """ + Controls when the funds will be captured from the customer's account. + """ + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + """ + + +class SessionCreateParamsPaymentMethodOptionsAlipay(TypedDict): + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + """ + + +class SessionCreateParamsPaymentMethodOptionsAlma(TypedDict): + capture_method: NotRequired[Literal["manual"]] + """ + Controls when the funds will be captured from the customer's account. + """ + + +class SessionCreateParamsPaymentMethodOptionsAmazonPay(TypedDict): + capture_method: NotRequired[Literal["manual"]] + """ + Controls when the funds will be captured from the customer's account. + """ + setup_future_usage: NotRequired[Literal["none", "off_session"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + """ + + +class SessionCreateParamsPaymentMethodOptionsAuBecsDebit(TypedDict): + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + """ + target_date: NotRequired[str] + """ + Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + """ + + +class SessionCreateParamsPaymentMethodOptionsBacsDebit(TypedDict): + mandate_options: NotRequired[ + "SessionCreateParamsPaymentMethodOptionsBacsDebitMandateOptions" + ] + """ + Additional fields for Mandate creation + """ + setup_future_usage: NotRequired[ + Literal["none", "off_session", "on_session"] + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + """ + target_date: NotRequired[str] + """ + Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + """ + + +class SessionCreateParamsPaymentMethodOptionsBacsDebitMandateOptions( + TypedDict +): + reference_prefix: NotRequired["Literal['']|str"] + """ + Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'. + """ + + +class SessionCreateParamsPaymentMethodOptionsBancontact(TypedDict): + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + """ + + +class SessionCreateParamsPaymentMethodOptionsBillie(TypedDict): + capture_method: NotRequired[Literal["manual"]] + """ + Controls when the funds will be captured from the customer's account. + """ + + +class SessionCreateParamsPaymentMethodOptionsBoleto(TypedDict): + expires_after_days: NotRequired[int] + """ + The number of calendar days before a Boleto voucher expires. For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto invoice will expire on Wednesday at 23:59 America/Sao_Paulo time. + """ + setup_future_usage: NotRequired[ + Literal["none", "off_session", "on_session"] + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + """ + + +class SessionCreateParamsPaymentMethodOptionsCard(TypedDict): + capture_method: NotRequired[Literal["manual"]] + """ + Controls when the funds will be captured from the customer's account. + """ + installments: NotRequired[ + "SessionCreateParamsPaymentMethodOptionsCardInstallments" + ] + """ + Installment options for card payments + """ + request_decremental_authorization: NotRequired[ + Literal["if_available", "never"] + ] + """ + Request ability to [capture beyond the standard authorization validity window](https://docs.stripe.com/payments/extended-authorization) for this CheckoutSession. + """ + request_extended_authorization: NotRequired[ + Literal["if_available", "never"] + ] + """ + Request ability to [capture beyond the standard authorization validity window](https://docs.stripe.com/payments/extended-authorization) for this CheckoutSession. + """ + request_incremental_authorization: NotRequired[ + Literal["if_available", "never"] + ] + """ + Request ability to [increment the authorization](https://docs.stripe.com/payments/incremental-authorization) for this CheckoutSession. + """ + request_multicapture: NotRequired[Literal["if_available", "never"]] + """ + Request ability to make [multiple captures](https://docs.stripe.com/payments/multicapture) for this CheckoutSession. + """ + request_overcapture: NotRequired[Literal["if_available", "never"]] + """ + Request ability to [overcapture](https://docs.stripe.com/payments/overcapture) for this CheckoutSession. + """ + request_three_d_secure: NotRequired[ + Literal["any", "automatic", "challenge"] + ] + """ + We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + """ + restrictions: NotRequired[ + "SessionCreateParamsPaymentMethodOptionsCardRestrictions" + ] + """ + Restrictions to apply to the card payment method. For example, you can block specific card brands. + """ + setup_future_usage: NotRequired[Literal["off_session", "on_session"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + """ + statement_descriptor_suffix_kana: NotRequired[str] + """ + Provides information about a card payment that customers see on their statements. Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor that's set on the account to form the complete statement descriptor. Maximum 22 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 22 characters. + """ + statement_descriptor_suffix_kanji: NotRequired[str] + """ + Provides information about a card payment that customers see on their statements. Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement descriptor that's set on the account to form the complete statement descriptor. Maximum 17 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 17 characters. + """ + + +class SessionCreateParamsPaymentMethodOptionsCardInstallments(TypedDict): + enabled: NotRequired[bool] + """ + Setting to true enables installments for this Checkout Session. + Setting to false will prevent any installment plan from applying to a payment. + """ + + +class SessionCreateParamsPaymentMethodOptionsCardRestrictions(TypedDict): + brands_blocked: NotRequired[ + List[ + Literal[ + "american_express", + "discover_global_network", + "mastercard", + "visa", + ] + ] + ] + """ + Specify the card brands to block in the Checkout Session. If a customer enters or selects a card belonging to a blocked brand, they can't complete the Session. + """ + + +class SessionCreateParamsPaymentMethodOptionsCashapp(TypedDict): + capture_method: NotRequired[Literal["manual"]] + """ + Controls when the funds will be captured from the customer's account. + """ + setup_future_usage: NotRequired[ + Literal["none", "off_session", "on_session"] + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + """ + + +class SessionCreateParamsPaymentMethodOptionsCustomerBalance(TypedDict): + bank_transfer: NotRequired[ + "SessionCreateParamsPaymentMethodOptionsCustomerBalanceBankTransfer" + ] + """ + Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. + """ + funding_type: NotRequired[Literal["bank_transfer"]] + """ + The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. + """ + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + """ + + +class SessionCreateParamsPaymentMethodOptionsCustomerBalanceBankTransfer( + TypedDict, +): + eu_bank_transfer: NotRequired[ + "SessionCreateParamsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer" + ] + """ + Configuration for eu_bank_transfer funding type. + """ + requested_address_types: NotRequired[ + List[ + Literal[ + "aba", "iban", "sepa", "sort_code", "spei", "swift", "zengin" + ] + ] + ] + """ + List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned. + + Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`. + """ + type: Literal[ + "eu_bank_transfer", + "gb_bank_transfer", + "jp_bank_transfer", + "mx_bank_transfer", + "us_bank_transfer", + ] + """ + The list of bank transfer types that this PaymentIntent is allowed to use for funding. + """ + + +class SessionCreateParamsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer( + TypedDict, +): + country: str + """ + The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. + """ + + +class SessionCreateParamsPaymentMethodOptionsDemoPay(TypedDict): + setup_future_usage: NotRequired[Literal["none", "off_session"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + """ + + +class SessionCreateParamsPaymentMethodOptionsEps(TypedDict): + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + """ + + +class SessionCreateParamsPaymentMethodOptionsFpx(TypedDict): + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + """ + + +class SessionCreateParamsPaymentMethodOptionsGiropay(TypedDict): + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + """ + + +class SessionCreateParamsPaymentMethodOptionsGrabpay(TypedDict): + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + """ + + +class SessionCreateParamsPaymentMethodOptionsIdeal(TypedDict): + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + """ + + +class SessionCreateParamsPaymentMethodOptionsKakaoPay(TypedDict): + capture_method: NotRequired[Literal["manual"]] + """ + Controls when the funds will be captured from the customer's account. + """ + setup_future_usage: NotRequired[Literal["none", "off_session"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + """ + + +class SessionCreateParamsPaymentMethodOptionsKlarna(TypedDict): + capture_method: NotRequired[Literal["manual"]] + """ + Controls when the funds will be captured from the customer's account. + """ + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + """ + subscriptions: NotRequired[ + "Literal['']|List[SessionCreateParamsPaymentMethodOptionsKlarnaSubscription]" + ] + """ + Subscription details if the Checkout Session sets up a future subscription. + """ + + +class SessionCreateParamsPaymentMethodOptionsKlarnaSubscription(TypedDict): + interval: Literal["day", "month", "week", "year"] + """ + Unit of time between subscription charges. + """ + interval_count: NotRequired[int] + """ + The number of intervals (specified in the `interval` attribute) between subscription charges. For example, `interval=month` and `interval_count=3` charges every 3 months. + """ + name: NotRequired[str] + """ + Name for subscription. + """ + next_billing: ( + "SessionCreateParamsPaymentMethodOptionsKlarnaSubscriptionNextBilling" + ) + """ + Describes the upcoming charge for this subscription. + """ + reference: str + """ + A non-customer-facing reference to correlate subscription charges in the Klarna app. Use a value that persists across subscription charges. + """ + + +class SessionCreateParamsPaymentMethodOptionsKlarnaSubscriptionNextBilling( + TypedDict, +): + amount: int + """ + The amount of the next charge for the subscription. + """ + date: str + """ + The date of the next charge for the subscription in YYYY-MM-DD format. + """ + + +class SessionCreateParamsPaymentMethodOptionsKonbini(TypedDict): + expires_after_days: NotRequired[int] + """ + The number of calendar days (between 1 and 60) after which Konbini payment instructions will expire. For example, if a PaymentIntent is confirmed with Konbini and `expires_after_days` set to 2 on Monday JST, the instructions will expire on Wednesday 23:59:59 JST. Defaults to 3 days. + """ + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + """ + + +class SessionCreateParamsPaymentMethodOptionsKrCard(TypedDict): + capture_method: NotRequired[Literal["manual"]] + """ + Controls when the funds will be captured from the customer's account. + """ + setup_future_usage: NotRequired[Literal["none", "off_session"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + """ + + +class SessionCreateParamsPaymentMethodOptionsLink(TypedDict): + capture_method: NotRequired[Literal["manual"]] + """ + Controls when the funds will be captured from the customer's account. + """ + setup_future_usage: NotRequired[Literal["none", "off_session"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + """ + + +class SessionCreateParamsPaymentMethodOptionsMobilepay(TypedDict): + capture_method: NotRequired[Literal["manual"]] + """ + Controls when the funds will be captured from the customer's account. + """ + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + """ + + +class SessionCreateParamsPaymentMethodOptionsMultibanco(TypedDict): + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + """ + + +class SessionCreateParamsPaymentMethodOptionsNaverPay(TypedDict): + capture_method: NotRequired[Literal["manual"]] + """ + Controls when the funds will be captured from the customer's account. + """ + setup_future_usage: NotRequired[Literal["none", "off_session"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + """ + + +class SessionCreateParamsPaymentMethodOptionsOxxo(TypedDict): + expires_after_days: NotRequired[int] + """ + The number of calendar days before an OXXO voucher expires. For example, if you create an OXXO voucher on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time. + """ + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + """ + + +class SessionCreateParamsPaymentMethodOptionsP24(TypedDict): + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + """ + tos_shown_and_accepted: NotRequired[bool] + """ + Confirm that the payer has accepted the P24 terms and conditions. + """ + + +class SessionCreateParamsPaymentMethodOptionsPayByBank(TypedDict): + pass + + +class SessionCreateParamsPaymentMethodOptionsPayco(TypedDict): + capture_method: NotRequired[Literal["manual"]] + """ + Controls when the funds will be captured from the customer's account. + """ + + +class SessionCreateParamsPaymentMethodOptionsPaynow(TypedDict): + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + """ + + +class SessionCreateParamsPaymentMethodOptionsPaypal(TypedDict): + capture_method: NotRequired["Literal['']|Literal['manual']"] + """ + Controls when the funds will be captured from the customer's account. + """ + preferred_locale: NotRequired[ + Literal[ + "cs-CZ", + "da-DK", + "de-AT", + "de-DE", + "de-LU", + "el-GR", + "en-GB", + "en-US", + "es-ES", + "fi-FI", + "fr-BE", + "fr-FR", + "fr-LU", + "hu-HU", + "it-IT", + "nl-BE", + "nl-NL", + "pl-PL", + "pt-PT", + "sk-SK", + "sv-SE", + ] + ] + """ + [Preferred locale](https://stripe.com/docs/payments/paypal/supported-locales) of the PayPal checkout page that the customer is redirected to. + """ + reference: NotRequired[str] + """ + A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. + """ + reference_id: NotRequired[str] + """ + A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. + """ + risk_correlation_id: NotRequired[str] + """ + The risk correlation ID for an on-session payment using a saved PayPal payment method. + """ + setup_future_usage: NotRequired[ + "Literal['']|Literal['none', 'off_session']" + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + + If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + """ + subsellers: NotRequired[List[str]] + """ + The Stripe connected account IDs of the sellers on the platform for this transaction (optional). Only allowed when [separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) are used. + """ + + +class SessionCreateParamsPaymentMethodOptionsPayto(TypedDict): + mandate_options: NotRequired[ + "SessionCreateParamsPaymentMethodOptionsPaytoMandateOptions" + ] + """ + Additional fields for Mandate creation + """ + setup_future_usage: NotRequired[Literal["none", "off_session"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + """ + + +class SessionCreateParamsPaymentMethodOptionsPaytoMandateOptions(TypedDict): + amount: NotRequired[int] + """ + Amount that will be collected. It is required when `amount_type` is `fixed`. + """ + amount_type: NotRequired[Literal["fixed", "maximum"]] + """ + The type of amount that will be collected. The amount charged must be exact or up to the value of `amount` param for `fixed` or `maximum` type respectively. + """ + end_date: NotRequired[str] + """ + Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no end date. + """ + payment_schedule: NotRequired[ + Literal[ + "adhoc", + "annual", + "daily", + "fortnightly", + "monthly", + "quarterly", + "semi_annual", + "weekly", + ] + ] + """ + The periodicity at which payments will be collected. + """ + payments_per_period: NotRequired[int] + """ + The number of payments that will be made during a payment period. Defaults to 1 except for when `payment_schedule` is `adhoc`. In that case, it defaults to no limit. + """ + purpose: NotRequired[ + Literal[ + "dependant_support", + "government", + "loan", + "mortgage", + "other", + "pension", + "personal", + "retail", + "salary", + "tax", + "utility", + ] + ] + """ + The purpose for which payments are made. Defaults to retail. + """ + start_date: NotRequired[str] + """ + Date, in YYYY-MM-DD format, from which payments will be collected. Defaults to confirmation time. + """ + + +class SessionCreateParamsPaymentMethodOptionsPix(TypedDict): + amount_includes_iof: NotRequired[Literal["always", "never"]] + """ + Determines if the amount includes the IOF tax. Defaults to `never`. + """ + expires_after_seconds: NotRequired[int] + """ + The number of seconds (between 10 and 1209600) after which Pix payment will expire. Defaults to 86400 seconds. + """ + mandate_options: NotRequired[ + "SessionCreateParamsPaymentMethodOptionsPixMandateOptions" + ] + """ + Additional fields for mandate creation. + """ + setup_future_usage: NotRequired[Literal["none", "off_session"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + """ + + +class SessionCreateParamsPaymentMethodOptionsPixMandateOptions(TypedDict): + amount: NotRequired[int] + """ + Amount to be charged for future payments. Required when `amount_type=fixed`. If not provided for `amount_type=maximum`, defaults to 40000. + """ + amount_includes_iof: NotRequired[Literal["always", "never"]] + """ + Determines if the amount includes the IOF tax. Defaults to `never`. + """ + amount_type: NotRequired[Literal["fixed", "maximum"]] + """ + Type of amount. Defaults to `maximum`. + """ + currency: NotRequired[str] + """ + Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Only `brl` is supported currently. + """ + end_date: NotRequired[str] + """ + Date when the mandate expires and no further payments will be charged, in `YYYY-MM-DD`. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. + """ + payment_schedule: NotRequired[ + Literal["halfyearly", "monthly", "quarterly", "weekly", "yearly"] + ] + """ + Schedule at which the future payments will be charged. Defaults to `weekly`. + """ + reference: NotRequired[str] + """ + Subscription name displayed to buyers in their bank app. Defaults to the displayable business name. + """ + start_date: NotRequired[str] + """ + Start date of the mandate, in `YYYY-MM-DD`. Start date should be at least 3 days in the future. Defaults to 3 days after the current date. + """ + + +class SessionCreateParamsPaymentMethodOptionsRevolutPay(TypedDict): + capture_method: NotRequired[Literal["manual"]] + """ + Controls when the funds will be captured from the customer's account. + """ + setup_future_usage: NotRequired[Literal["none", "off_session"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + """ + + +class SessionCreateParamsPaymentMethodOptionsSamsungPay(TypedDict): + capture_method: NotRequired[Literal["manual"]] + """ + Controls when the funds will be captured from the customer's account. + """ + + +class SessionCreateParamsPaymentMethodOptionsSatispay(TypedDict): + capture_method: NotRequired[Literal["manual"]] + """ + Controls when the funds will be captured from the customer's account. + """ + + +class SessionCreateParamsPaymentMethodOptionsSepaDebit(TypedDict): + mandate_options: NotRequired[ + "SessionCreateParamsPaymentMethodOptionsSepaDebitMandateOptions" + ] + """ + Additional fields for Mandate creation + """ + setup_future_usage: NotRequired[ + Literal["none", "off_session", "on_session"] + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + """ + target_date: NotRequired[str] + """ + Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + """ + + +class SessionCreateParamsPaymentMethodOptionsSepaDebitMandateOptions( + TypedDict +): + reference_prefix: NotRequired["Literal['']|str"] + """ + Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'. + """ + + +class SessionCreateParamsPaymentMethodOptionsSofort(TypedDict): + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + """ + + +class SessionCreateParamsPaymentMethodOptionsSwish(TypedDict): + reference: NotRequired[str] + """ + The order reference that will be displayed to customers in the Swish application. Defaults to the `id` of the Payment Intent. + """ + + +class SessionCreateParamsPaymentMethodOptionsUsBankAccount(TypedDict): + financial_connections: NotRequired[ + "SessionCreateParamsPaymentMethodOptionsUsBankAccountFinancialConnections" + ] + """ + Additional fields for Financial Connections Session creation + """ + setup_future_usage: NotRequired[ + Literal["none", "off_session", "on_session"] + ] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + """ + target_date: NotRequired[str] + """ + Controls when Stripe will attempt to debit the funds from the customer's account. The date must be a string in YYYY-MM-DD format. The date must be in the future and between 3 and 15 calendar days from now. + """ + verification_method: NotRequired[Literal["automatic", "instant"]] + """ + Verification method for the intent + """ + + +class SessionCreateParamsPaymentMethodOptionsUsBankAccountFinancialConnections( + TypedDict, +): + permissions: NotRequired[ + List[ + Literal["balances", "ownership", "payment_method", "transactions"] + ] + ] + """ + The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. + """ + prefetch: NotRequired[ + List[ + Literal[ + "balances", "inferred_balances", "ownership", "transactions" + ] + ] + ] + """ + List of data features that you would like to retrieve upon account creation. + """ + + +class SessionCreateParamsPaymentMethodOptionsWechatPay(TypedDict): + app_id: NotRequired[str] + """ + The app ID registered with WeChat Pay. Only required when client is ios or android. + """ + client: Literal["android", "ios", "web"] + """ + The client type that the end customer will pay from + """ + setup_future_usage: NotRequired[Literal["none"]] + """ + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](https://docs.stripe.com/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](https://docs.stripe.com/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + + If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + + When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](https://docs.stripe.com/strong-customer-authentication). + """ + + +class SessionCreateParamsPermissions(TypedDict): + update: NotRequired["SessionCreateParamsPermissionsUpdate"] + """ + Permissions for updating the Checkout Session. + """ + update_discounts: NotRequired[Literal["client_only", "server_only"]] + """ + Determines which entity is allowed to update the discounts (coupons or promotion codes) that apply to this session. + + Default is `client_only`. Stripe Checkout client will automatically handle discount updates. If set to `server_only`, only your server is allowed to update discounts. + """ + update_line_items: NotRequired[Literal["client_only", "server_only"]] + """ + Determines which entity is allowed to update the line items. + + Default is `client_only`. Stripe Checkout client will automatically update the line items. If set to `server_only`, only your server is allowed to update the line items. + + When set to `server_only`, you must add the onLineItemsChange event handler when initializing the Stripe Checkout client and manually update the line items from your server using the Stripe API. + """ + update_shipping_details: NotRequired[Literal["client_only", "server_only"]] + """ + Determines which entity is allowed to update the shipping details. + + Default is `client_only`. Stripe Checkout client will automatically update the shipping details. If set to `server_only`, only your server is allowed to update the shipping details. + + When set to `server_only`, you must add the onShippingDetailsChange event handler when initializing the Stripe Checkout client and manually update the shipping details from your server using the Stripe API. + """ + + +class SessionCreateParamsPermissionsUpdate(TypedDict): + line_items: NotRequired[Literal["client_only", "server_only"]] + """ + Determines which entity is allowed to update the line items. + + Default is `client_only`. Stripe Checkout client will automatically update the line items. If set to `server_only`, only your server is allowed to update the line items. + + When set to `server_only`, you must add the onLineItemsChange event handler when initializing the Stripe Checkout client and manually update the line items from your server using the Stripe API. + """ + shipping_details: NotRequired[Literal["client_only", "server_only"]] + """ + Determines which entity is allowed to update the shipping details. + + Default is `client_only`. Stripe Checkout client will automatically update the shipping details. If set to `server_only`, only your server is allowed to update the shipping details. + + When set to `server_only`, you must add the onShippingDetailsChange event handler when initializing the Stripe Checkout client and manually update the shipping details from your server using the Stripe API. + """ + + +class SessionCreateParamsPhoneNumberCollection(TypedDict): + enabled: bool + """ + Set to `true` to enable phone number collection. + + Can only be set in `payment` and `subscription` mode. + """ + + +class SessionCreateParamsSavedPaymentMethodOptions(TypedDict): + allow_redisplay_filters: NotRequired[ + List[Literal["always", "limited", "unspecified"]] + ] + """ + Uses the `allow_redisplay` value of each saved payment method to filter the set presented to a returning customer. By default, only saved payment methods with 'allow_redisplay: ‘always' are shown in Checkout. + """ + payment_method_remove: NotRequired[Literal["disabled", "enabled"]] + """ + Enable customers to choose if they wish to remove their saved payment methods. Disabled by default. + """ + payment_method_save: NotRequired[Literal["disabled", "enabled"]] + """ + Enable customers to choose if they wish to save their payment method for future use. Disabled by default. + """ + + +class SessionCreateParamsSetupIntentData(TypedDict): + description: NotRequired[str] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + on_behalf_of: NotRequired[str] + """ + The Stripe account for which the setup is intended. + """ + + +class SessionCreateParamsShippingAddressCollection(TypedDict): + allowed_countries: List[ + Literal[ + "AC", + "AD", + "AE", + "AF", + "AG", + "AI", + "AL", + "AM", + "AO", + "AQ", + "AR", + "AT", + "AU", + "AW", + "AX", + "AZ", + "BA", + "BB", + "BD", + "BE", + "BF", + "BG", + "BH", + "BI", + "BJ", + "BL", + "BM", + "BN", + "BO", + "BQ", + "BR", + "BS", + "BT", + "BV", + "BW", + "BY", + "BZ", + "CA", + "CD", + "CF", + "CG", + "CH", + "CI", + "CK", + "CL", + "CM", + "CN", + "CO", + "CR", + "CV", + "CW", + "CY", + "CZ", + "DE", + "DJ", + "DK", + "DM", + "DO", + "DZ", + "EC", + "EE", + "EG", + "EH", + "ER", + "ES", + "ET", + "FI", + "FJ", + "FK", + "FO", + "FR", + "GA", + "GB", + "GD", + "GE", + "GF", + "GG", + "GH", + "GI", + "GL", + "GM", + "GN", + "GP", + "GQ", + "GR", + "GS", + "GT", + "GU", + "GW", + "GY", + "HK", + "HN", + "HR", + "HT", + "HU", + "ID", + "IE", + "IL", + "IM", + "IN", + "IO", + "IQ", + "IS", + "IT", + "JE", + "JM", + "JO", + "JP", + "KE", + "KG", + "KH", + "KI", + "KM", + "KN", + "KR", + "KW", + "KY", + "KZ", + "LA", + "LB", + "LC", + "LI", + "LK", + "LR", + "LS", + "LT", + "LU", + "LV", + "LY", + "MA", + "MC", + "MD", + "ME", + "MF", + "MG", + "MK", + "ML", + "MM", + "MN", + "MO", + "MQ", + "MR", + "MS", + "MT", + "MU", + "MV", + "MW", + "MX", + "MY", + "MZ", + "NA", + "NC", + "NE", + "NG", + "NI", + "NL", + "NO", + "NP", + "NR", + "NU", + "NZ", + "OM", + "PA", + "PE", + "PF", + "PG", + "PH", + "PK", + "PL", + "PM", + "PN", + "PR", + "PS", + "PT", + "PY", + "QA", + "RE", + "RO", + "RS", + "RU", + "RW", + "SA", + "SB", + "SC", + "SD", + "SE", + "SG", + "SH", + "SI", + "SJ", + "SK", + "SL", + "SM", + "SN", + "SO", + "SR", + "SS", + "ST", + "SV", + "SX", + "SZ", + "TA", + "TC", + "TD", + "TF", + "TG", + "TH", + "TJ", + "TK", + "TL", + "TM", + "TN", + "TO", + "TR", + "TT", + "TV", + "TW", + "TZ", + "UA", + "UG", + "US", + "UY", + "UZ", + "VA", + "VC", + "VE", + "VG", + "VN", + "VU", + "WF", + "WS", + "XK", + "YE", + "YT", + "ZA", + "ZM", + "ZW", + "ZZ", + ] + ] + """ + An array of two-letter ISO country codes representing which countries Checkout should provide as options for + shipping locations. + """ + + +class SessionCreateParamsShippingOption(TypedDict): + shipping_rate: NotRequired[str] + """ + The ID of the Shipping Rate to use for this shipping option. + """ + shipping_rate_data: NotRequired[ + "SessionCreateParamsShippingOptionShippingRateData" + ] + """ + Parameters to be passed to Shipping Rate creation for this shipping option. + """ + + +class SessionCreateParamsShippingOptionShippingRateData(TypedDict): + delivery_estimate: NotRequired[ + "SessionCreateParamsShippingOptionShippingRateDataDeliveryEstimate" + ] + """ + The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions. + """ + display_name: str + """ + The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions. + """ + fixed_amount: NotRequired[ + "SessionCreateParamsShippingOptionShippingRateDataFixedAmount" + ] + """ + Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + tax_behavior: NotRequired[Literal["exclusive", "inclusive", "unspecified"]] + """ + Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + """ + tax_code: NotRequired[str] + """ + A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`. + """ + type: NotRequired[Literal["fixed_amount"]] + """ + The type of calculation to use on the shipping rate. + """ + + +class SessionCreateParamsShippingOptionShippingRateDataDeliveryEstimate( + TypedDict, +): + maximum: NotRequired[ + "SessionCreateParamsShippingOptionShippingRateDataDeliveryEstimateMaximum" + ] + """ + The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite. + """ + minimum: NotRequired[ + "SessionCreateParamsShippingOptionShippingRateDataDeliveryEstimateMinimum" + ] + """ + The lower bound of the estimated range. If empty, represents no lower bound. + """ + + +class SessionCreateParamsShippingOptionShippingRateDataDeliveryEstimateMaximum( + TypedDict, +): + unit: Literal["business_day", "day", "hour", "month", "week"] + """ + A unit of time. + """ + value: int + """ + Must be greater than 0. + """ + + +class SessionCreateParamsShippingOptionShippingRateDataDeliveryEstimateMinimum( + TypedDict, +): + unit: Literal["business_day", "day", "hour", "month", "week"] + """ + A unit of time. + """ + value: int + """ + Must be greater than 0. + """ + + +class SessionCreateParamsShippingOptionShippingRateDataFixedAmount(TypedDict): + amount: int + """ + A non-negative integer in cents representing how much to charge. + """ + 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). + """ + currency_options: NotRequired[ + Dict[ + str, + "SessionCreateParamsShippingOptionShippingRateDataFixedAmountCurrencyOptions", + ] + ] + """ + Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). + """ + + +class SessionCreateParamsShippingOptionShippingRateDataFixedAmountCurrencyOptions( + TypedDict, +): + amount: int + """ + A non-negative integer in cents representing how much to charge. + """ + tax_behavior: NotRequired[Literal["exclusive", "inclusive", "unspecified"]] + """ + Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + """ + + +class SessionCreateParamsSubscriptionData(TypedDict): + application_fee_percent: NotRequired[float] + """ + A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. To use an application fee percent, the request must be made on behalf of another account, using the `Stripe-Account` header or an OAuth key. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). + """ + billing_cycle_anchor: NotRequired[int] + """ + A future timestamp to anchor the subscription's billing cycle for new subscriptions. + """ + billing_mode: NotRequired["SessionCreateParamsSubscriptionDataBillingMode"] + """ + Controls how prorations and invoices for subscriptions are calculated and orchestrated. + """ + default_tax_rates: NotRequired[List[str]] + """ + The tax rates that will apply to any subscription item that does not have + `tax_rates` set. Invoices created will have their `default_tax_rates` populated + from the subscription. + """ + description: NotRequired[str] + """ + The subscription's description, meant to be displayable to the customer. + Use this field to optionally store an explanation of the subscription + for rendering in the [customer portal](https://stripe.com/docs/customer-management). + """ + invoice_settings: NotRequired[ + "SessionCreateParamsSubscriptionDataInvoiceSettings" + ] + """ + All invoices will be billed using the specified settings. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + on_behalf_of: NotRequired[str] + """ + The account on behalf of which to charge, for each of the subscription's invoices. + """ + proration_behavior: NotRequired[Literal["create_prorations", "none"]] + """ + Determines how to handle prorations resulting from the `billing_cycle_anchor`. If no value is passed, the default is `create_prorations`. + """ + transfer_data: NotRequired[ + "SessionCreateParamsSubscriptionDataTransferData" + ] + """ + If specified, the funds from the subscription's invoices will be transferred to the destination and the ID of the resulting transfers will be found on the resulting charges. + """ + trial_end: NotRequired[int] + """ + Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. Has to be at least 48 hours in the future. + """ + trial_period_days: NotRequired[int] + """ + Integer representing the number of trial period days before the customer is charged for the first time. Has to be at least 1. + """ + trial_settings: NotRequired[ + "SessionCreateParamsSubscriptionDataTrialSettings" + ] + """ + Settings related to subscription trials. + """ + + +class SessionCreateParamsSubscriptionDataBillingMode(TypedDict): + flexible: NotRequired[ + "SessionCreateParamsSubscriptionDataBillingModeFlexible" + ] + """ + Configure behavior for flexible billing mode. + """ + type: Literal["classic", "flexible"] + """ + Controls the calculation and orchestration of prorations and invoices for subscriptions. If no value is passed, the default is `flexible`. + """ + + +class SessionCreateParamsSubscriptionDataBillingModeFlexible(TypedDict): + proration_discounts: NotRequired[Literal["included", "itemized"]] + """ + Controls how invoices and invoice items display proration amounts and discount amounts. + """ + + +class SessionCreateParamsSubscriptionDataInvoiceSettings(TypedDict): + issuer: NotRequired[ + "SessionCreateParamsSubscriptionDataInvoiceSettingsIssuer" + ] + """ + The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + """ + + +class SessionCreateParamsSubscriptionDataInvoiceSettingsIssuer(TypedDict): + account: NotRequired[str] + """ + The connected account being referenced when `type` is `account`. + """ + type: Literal["account", "self"] + """ + Type of the account referenced in the request. + """ + + +class SessionCreateParamsSubscriptionDataTransferData(TypedDict): + amount_percent: NotRequired[float] + """ + A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. + """ + destination: str + """ + ID of an existing, connected Stripe account. + """ + + +class SessionCreateParamsSubscriptionDataTrialSettings(TypedDict): + end_behavior: "SessionCreateParamsSubscriptionDataTrialSettingsEndBehavior" + """ + Defines how the subscription should behave when the user's free trial ends. + """ + + +class SessionCreateParamsSubscriptionDataTrialSettingsEndBehavior(TypedDict): + missing_payment_method: Literal["cancel", "create_invoice", "pause"] + """ + Indicates how the subscription should change when the trial ends if the user did not provide a payment method. + """ + + +class SessionCreateParamsTaxIdCollection(TypedDict): + enabled: bool + """ + Enable tax ID collection during checkout. Defaults to `false`. + """ + required: NotRequired[Literal["if_supported", "never"]] + """ + Describes whether a tax ID is required during checkout. Defaults to `never`. + """ + + +class SessionCreateParamsWalletOptions(TypedDict): + link: NotRequired["SessionCreateParamsWalletOptionsLink"] + """ + contains details about the Link wallet options. + """ + + +class SessionCreateParamsWalletOptionsLink(TypedDict): + display: NotRequired[Literal["auto", "never"]] + """ + Specifies whether Checkout should display Link as a payment option. By default, Checkout will display all the supported wallets that the Checkout Session was created with. This is the `auto` behavior, and it is the default choice. + """ + + +class SessionCreateParamsCheckoutItem(TypedDict): + type: Literal[ + "rate_card_subscription_item", "pricing_plan_subscription_item" + ] + rate_card_subscription_item: NotRequired[ + "SessionCreateParamsCheckoutItemRateCardSubscriptionItem" + ] + pricing_plan_subscription_item: NotRequired[ + "SessionCreateParamsCheckoutItemPricingPlanSubscriptionItem" + ] + + +class SessionCreateParamsCheckoutItemRateCardSubscriptionItem(TypedDict): + rate_card: str + metadata: NotRequired[Dict[str, str]] + rate_card_version: NotRequired[str] + + +class SessionCreateParamsCheckoutItemPricingPlanSubscriptionItem(TypedDict): + pricing_plan: str + pricing_plan_version: NotRequired[str] + metadata: NotRequired[Dict[str, str]] + component_configurations: NotRequired[ + Dict[ + str, + "SessionCreateParamsCheckoutItemPricingPlanSubscriptionItemComponentConfigurations", + ] + ] + + +class SessionCreateParamsCheckoutItemPricingPlanSubscriptionItemComponentConfigurations( + TypedDict, +): + type: Literal["license_fee_component"] + license_fee_component: NotRequired[ + "SessionCreateParamsCheckoutItemPricingPlanSubscriptionItemComponentConfigurationsLicenseFeeComponent" + ] + + +class SessionCreateParamsCheckoutItemPricingPlanSubscriptionItemComponentConfigurationsLicenseFeeComponent( + TypedDict, +): + quantity: int diff --git a/stripe/params/checkout/_session_expire_params.py b/stripe/params/checkout/_session_expire_params.py new file mode 100644 index 000000000..090460b1b --- /dev/null +++ b/stripe/params/checkout/_session_expire_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 SessionExpireParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/checkout/_session_line_item_list_params.py b/stripe/params/checkout/_session_line_item_list_params.py new file mode 100644 index 000000000..29666f0c4 --- /dev/null +++ b/stripe/params/checkout/_session_line_item_list_params.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import NotRequired, TypedDict + + +class SessionLineItemListParams(TypedDict): + 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. + """ diff --git a/stripe/params/checkout/_session_list_line_items_params.py b/stripe/params/checkout/_session_list_line_items_params.py new file mode 100644 index 000000000..35895af27 --- /dev/null +++ b/stripe/params/checkout/_session_list_line_items_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 SessionListLineItemsParams(RequestOptions): + 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. + """ diff --git a/stripe/params/checkout/_session_list_params.py b/stripe/params/checkout/_session_list_params.py new file mode 100644 index 000000000..1bd82256d --- /dev/null +++ b/stripe/params/checkout/_session_list_params.py @@ -0,0 +1,82 @@ +# -*- 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, TypedDict + + +class SessionListParams(RequestOptions): + created: NotRequired["SessionListParamsCreated|int"] + """ + Only return Checkout Sessions that were created during the given date interval. + """ + customer: NotRequired[str] + """ + Only return the Checkout Sessions for the Customer specified. + """ + customer_account: NotRequired[str] + """ + Only return the Checkout Sessions for the Account specified. + """ + customer_details: NotRequired["SessionListParamsCustomerDetails"] + """ + Only return the Checkout Sessions for the Customer details specified. + """ + 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. + """ + payment_intent: NotRequired[str] + """ + Only return the Checkout Session for the PaymentIntent specified. + """ + payment_link: NotRequired[str] + """ + Only return the Checkout Sessions for the Payment Link specified. + """ + 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. + """ + status: NotRequired[Literal["complete", "expired", "open"]] + """ + Only return the Checkout Sessions matching the given status. + """ + subscription: NotRequired[str] + """ + Only return the Checkout Session for the subscription specified. + """ + + +class SessionListParamsCreated(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) + """ + + +class SessionListParamsCustomerDetails(TypedDict): + email: str + """ + Customer's email address. + """ diff --git a/stripe/params/checkout/_session_modify_params.py b/stripe/params/checkout/_session_modify_params.py new file mode 100644 index 000000000..838e8ba67 --- /dev/null +++ b/stripe/params/checkout/_session_modify_params.py @@ -0,0 +1,468 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class SessionModifyParams(RequestOptions): + automatic_tax: NotRequired["SessionModifyParamsAutomaticTax"] + """ + Settings for automatic tax lookup for this session and resulting payments, invoices, and subscriptions. + """ + collected_information: NotRequired[ + "SessionModifyParamsCollectedInformation" + ] + """ + Information about the customer collected within the Checkout Session. Can only be set when updating `embedded` or `custom` sessions. + """ + discounts: NotRequired["Literal['']|List[SessionModifyParamsDiscount]"] + """ + List of coupons and promotion codes attached to the Checkout Session. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + invoice_creation: NotRequired["SessionModifyParamsInvoiceCreation"] + """ + Generate a post-purchase Invoice for one-time payments. + """ + line_items: NotRequired[List["SessionModifyParamsLineItem"]] + """ + A list of items the customer is purchasing. + + When updating line items, you must retransmit the entire array of line items. + + To retain an existing line item, specify its `id`. + + To update an existing line item, specify its `id` along with the new values of the fields to update. + + To add a new line item, specify one of `price` or `price_data` and `quantity`. + + To remove an existing line item, omit the line item's ID from the retransmitted array. + + To reorder a line item, specify it at the desired position in the retransmitted array. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + shipping_options: NotRequired[ + "Literal['']|List[SessionModifyParamsShippingOption]" + ] + """ + The shipping rate options to apply to this Session. Up to a maximum of 5. + """ + subscription_data: NotRequired["SessionModifyParamsSubscriptionData"] + """ + A subset of parameters to be passed to subscription creation for Checkout Sessions in `subscription` mode. + """ + + +class SessionModifyParamsAutomaticTax(TypedDict): + liability: NotRequired["SessionModifyParamsAutomaticTaxLiability"] + """ + The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + """ + + +class SessionModifyParamsAutomaticTaxLiability(TypedDict): + account: NotRequired[str] + """ + The connected account being referenced when `type` is `account`. + """ + type: Literal["account", "self"] + """ + Type of the account referenced in the request. + """ + + +class SessionModifyParamsCollectedInformation(TypedDict): + shipping_details: NotRequired[ + "SessionModifyParamsCollectedInformationShippingDetails" + ] + """ + The shipping details to apply to this Session. + """ + + +class SessionModifyParamsCollectedInformationShippingDetails(TypedDict): + address: "SessionModifyParamsCollectedInformationShippingDetailsAddress" + """ + The address of the customer + """ + name: str + """ + The name of customer + """ + + +class SessionModifyParamsCollectedInformationShippingDetailsAddress(TypedDict): + city: NotRequired[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: 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. + """ + + +class SessionModifyParamsDiscount(TypedDict): + coupon: NotRequired[str] + """ + The ID of the [Coupon](https://stripe.com/docs/api/coupons) to apply to this Session. One of `coupon` or `coupon_data` is required when updating discounts. + """ + coupon_data: NotRequired["SessionModifyParamsDiscountCouponData"] + """ + Data used to generate a new [Coupon](https://stripe.com/docs/api/coupon) object inline. One of `coupon` or `coupon_data` is required when updating discounts. + """ + + +class SessionModifyParamsDiscountCouponData(TypedDict): + amount_off: NotRequired[int] + """ + A positive integer representing the amount to subtract from an invoice total (required if `percent_off` is not passed). + """ + currency: NotRequired[str] + """ + Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) of the `amount_off` parameter (required if `amount_off` is passed). + """ + duration: NotRequired[Literal["forever", "once", "repeating"]] + """ + Specifies how long the discount will be in effect if used on a subscription. Defaults to `once`. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + name: NotRequired[str] + """ + Name of the coupon displayed to customers on, for instance invoices, or receipts. By default the `id` is shown if `name` is not set. + """ + percent_off: NotRequired[float] + """ + A positive float larger than 0, and smaller or equal to 100, that represents the discount the coupon will apply (required if `amount_off` is not passed). + """ + + +class SessionModifyParamsInvoiceCreation(TypedDict): + invoice_data: NotRequired["SessionModifyParamsInvoiceCreationInvoiceData"] + """ + Parameters passed when creating invoices for payment-mode Checkout Sessions. + """ + + +class SessionModifyParamsInvoiceCreationInvoiceData(TypedDict): + issuer: NotRequired["SessionModifyParamsInvoiceCreationInvoiceDataIssuer"] + """ + The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + """ + + +class SessionModifyParamsInvoiceCreationInvoiceDataIssuer(TypedDict): + account: NotRequired[str] + """ + The connected account being referenced when `type` is `account`. + """ + type: Literal["account", "self"] + """ + Type of the account referenced in the request. + """ + + +class SessionModifyParamsLineItem(TypedDict): + adjustable_quantity: NotRequired[ + "SessionModifyParamsLineItemAdjustableQuantity" + ] + """ + When set, provides configuration for this item's quantity to be adjusted by the customer during Checkout. + """ + id: NotRequired[str] + """ + ID of an existing line item. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + price: NotRequired[str] + """ + The ID of the [Price](https://stripe.com/docs/api/prices). One of `price` or `price_data` is required when creating a new line item. + """ + price_data: NotRequired["SessionModifyParamsLineItemPriceData"] + """ + Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required when creating a new line item. + """ + quantity: NotRequired[int] + """ + The quantity of the line item being purchased. Quantity should not be defined when `recurring.usage_type=metered`. + """ + tax_rates: NotRequired["Literal['']|List[str]"] + """ + The [tax rates](https://stripe.com/docs/api/tax_rates) which apply to this line item. + """ + + +class SessionModifyParamsLineItemAdjustableQuantity(TypedDict): + enabled: bool + """ + Set to true if the quantity can be adjusted to any positive integer. Setting to false will remove any previously specified constraints on quantity. + """ + maximum: NotRequired[int] + """ + The maximum quantity the customer can purchase for the Checkout Session. By default this value is 99. You can specify a value up to 999999. + """ + minimum: NotRequired[int] + """ + The minimum quantity the customer must purchase for the Checkout Session. By default this value is 0. + """ + + +class SessionModifyParamsLineItemPriceData(TypedDict): + 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). + """ + product: NotRequired[str] + """ + The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to. One of `product` or `product_data` is required. + """ + product_data: NotRequired[ + "SessionModifyParamsLineItemPriceDataProductData" + ] + """ + Data used to generate a new [Product](https://docs.stripe.com/api/products) object inline. One of `product` or `product_data` is required. + """ + recurring: NotRequired["SessionModifyParamsLineItemPriceDataRecurring"] + """ + The recurring components of a price such as `interval` and `interval_count`. + """ + tax_behavior: NotRequired[Literal["exclusive", "inclusive", "unspecified"]] + """ + Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + """ + unit_amount: NotRequired[int] + """ + A non-negative integer in cents (or local equivalent) representing how much to charge. One of `unit_amount` or `unit_amount_decimal` is required. + """ + unit_amount_decimal: NotRequired[str] + """ + Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + """ + + +class SessionModifyParamsLineItemPriceDataProductData(TypedDict): + description: NotRequired[str] + """ + The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. + """ + images: NotRequired[List[str]] + """ + A list of up to 8 URLs of images for this product, meant to be displayable to the customer. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + name: str + """ + The product's name, meant to be displayable to the customer. + """ + tax_code: NotRequired[str] + """ + A [tax code](https://stripe.com/docs/tax/tax-categories) ID. + """ + unit_label: NotRequired[str] + """ + A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal. + """ + + +class SessionModifyParamsLineItemPriceDataRecurring(TypedDict): + interval: Literal["day", "month", "week", "year"] + """ + Specifies billing frequency. Either `day`, `week`, `month` or `year`. + """ + interval_count: NotRequired[int] + """ + The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). + """ + + +class SessionModifyParamsShippingOption(TypedDict): + shipping_rate: NotRequired[str] + """ + The ID of the Shipping Rate to use for this shipping option. + """ + shipping_rate_data: NotRequired[ + "SessionModifyParamsShippingOptionShippingRateData" + ] + """ + Parameters to be passed to Shipping Rate creation for this shipping option. + """ + + +class SessionModifyParamsShippingOptionShippingRateData(TypedDict): + delivery_estimate: NotRequired[ + "SessionModifyParamsShippingOptionShippingRateDataDeliveryEstimate" + ] + """ + The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions. + """ + display_name: str + """ + The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions. + """ + fixed_amount: NotRequired[ + "SessionModifyParamsShippingOptionShippingRateDataFixedAmount" + ] + """ + Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + tax_behavior: NotRequired[Literal["exclusive", "inclusive", "unspecified"]] + """ + Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + """ + tax_code: NotRequired[str] + """ + A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`. + """ + type: NotRequired[Literal["fixed_amount"]] + """ + The type of calculation to use on the shipping rate. + """ + + +class SessionModifyParamsShippingOptionShippingRateDataDeliveryEstimate( + TypedDict, +): + maximum: NotRequired[ + "SessionModifyParamsShippingOptionShippingRateDataDeliveryEstimateMaximum" + ] + """ + The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite. + """ + minimum: NotRequired[ + "SessionModifyParamsShippingOptionShippingRateDataDeliveryEstimateMinimum" + ] + """ + The lower bound of the estimated range. If empty, represents no lower bound. + """ + + +class SessionModifyParamsShippingOptionShippingRateDataDeliveryEstimateMaximum( + TypedDict, +): + unit: Literal["business_day", "day", "hour", "month", "week"] + """ + A unit of time. + """ + value: int + """ + Must be greater than 0. + """ + + +class SessionModifyParamsShippingOptionShippingRateDataDeliveryEstimateMinimum( + TypedDict, +): + unit: Literal["business_day", "day", "hour", "month", "week"] + """ + A unit of time. + """ + value: int + """ + Must be greater than 0. + """ + + +class SessionModifyParamsShippingOptionShippingRateDataFixedAmount(TypedDict): + amount: int + """ + A non-negative integer in cents representing how much to charge. + """ + 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). + """ + currency_options: NotRequired[ + Dict[ + str, + "SessionModifyParamsShippingOptionShippingRateDataFixedAmountCurrencyOptions", + ] + ] + """ + Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). + """ + + +class SessionModifyParamsShippingOptionShippingRateDataFixedAmountCurrencyOptions( + TypedDict, +): + amount: int + """ + A non-negative integer in cents representing how much to charge. + """ + tax_behavior: NotRequired[Literal["exclusive", "inclusive", "unspecified"]] + """ + Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + """ + + +class SessionModifyParamsSubscriptionData(TypedDict): + invoice_settings: NotRequired[ + "SessionModifyParamsSubscriptionDataInvoiceSettings" + ] + """ + All invoices will be billed using the specified settings. + """ + trial_end: NotRequired[int] + """ + Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. Has to be at least 48 hours in the future. + """ + trial_period_days: NotRequired["Literal['']|int"] + """ + Integer representing the number of trial period days before the customer is charged for the first time. Has to be at least 1. + """ + + +class SessionModifyParamsSubscriptionDataInvoiceSettings(TypedDict): + issuer: NotRequired[ + "SessionModifyParamsSubscriptionDataInvoiceSettingsIssuer" + ] + """ + The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + """ + + +class SessionModifyParamsSubscriptionDataInvoiceSettingsIssuer(TypedDict): + account: NotRequired[str] + """ + The connected account being referenced when `type` is `account`. + """ + type: Literal["account", "self"] + """ + Type of the account referenced in the request. + """ diff --git a/stripe/params/checkout/_session_retrieve_params.py b/stripe/params/checkout/_session_retrieve_params.py new file mode 100644 index 000000000..fc641db91 --- /dev/null +++ b/stripe/params/checkout/_session_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 SessionRetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/checkout/_session_update_params.py b/stripe/params/checkout/_session_update_params.py new file mode 100644 index 000000000..3da860a16 --- /dev/null +++ b/stripe/params/checkout/_session_update_params.py @@ -0,0 +1,467 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class SessionUpdateParams(TypedDict): + automatic_tax: NotRequired["SessionUpdateParamsAutomaticTax"] + """ + Settings for automatic tax lookup for this session and resulting payments, invoices, and subscriptions. + """ + collected_information: NotRequired[ + "SessionUpdateParamsCollectedInformation" + ] + """ + Information about the customer collected within the Checkout Session. Can only be set when updating `embedded` or `custom` sessions. + """ + discounts: NotRequired["Literal['']|List[SessionUpdateParamsDiscount]"] + """ + List of coupons and promotion codes attached to the Checkout Session. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + invoice_creation: NotRequired["SessionUpdateParamsInvoiceCreation"] + """ + Generate a post-purchase Invoice for one-time payments. + """ + line_items: NotRequired[List["SessionUpdateParamsLineItem"]] + """ + A list of items the customer is purchasing. + + When updating line items, you must retransmit the entire array of line items. + + To retain an existing line item, specify its `id`. + + To update an existing line item, specify its `id` along with the new values of the fields to update. + + To add a new line item, specify one of `price` or `price_data` and `quantity`. + + To remove an existing line item, omit the line item's ID from the retransmitted array. + + To reorder a line item, specify it at the desired position in the retransmitted array. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + shipping_options: NotRequired[ + "Literal['']|List[SessionUpdateParamsShippingOption]" + ] + """ + The shipping rate options to apply to this Session. Up to a maximum of 5. + """ + subscription_data: NotRequired["SessionUpdateParamsSubscriptionData"] + """ + A subset of parameters to be passed to subscription creation for Checkout Sessions in `subscription` mode. + """ + + +class SessionUpdateParamsAutomaticTax(TypedDict): + liability: NotRequired["SessionUpdateParamsAutomaticTaxLiability"] + """ + The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + """ + + +class SessionUpdateParamsAutomaticTaxLiability(TypedDict): + account: NotRequired[str] + """ + The connected account being referenced when `type` is `account`. + """ + type: Literal["account", "self"] + """ + Type of the account referenced in the request. + """ + + +class SessionUpdateParamsCollectedInformation(TypedDict): + shipping_details: NotRequired[ + "SessionUpdateParamsCollectedInformationShippingDetails" + ] + """ + The shipping details to apply to this Session. + """ + + +class SessionUpdateParamsCollectedInformationShippingDetails(TypedDict): + address: "SessionUpdateParamsCollectedInformationShippingDetailsAddress" + """ + The address of the customer + """ + name: str + """ + The name of customer + """ + + +class SessionUpdateParamsCollectedInformationShippingDetailsAddress(TypedDict): + city: NotRequired[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: 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. + """ + + +class SessionUpdateParamsDiscount(TypedDict): + coupon: NotRequired[str] + """ + The ID of the [Coupon](https://stripe.com/docs/api/coupons) to apply to this Session. One of `coupon` or `coupon_data` is required when updating discounts. + """ + coupon_data: NotRequired["SessionUpdateParamsDiscountCouponData"] + """ + Data used to generate a new [Coupon](https://stripe.com/docs/api/coupon) object inline. One of `coupon` or `coupon_data` is required when updating discounts. + """ + + +class SessionUpdateParamsDiscountCouponData(TypedDict): + amount_off: NotRequired[int] + """ + A positive integer representing the amount to subtract from an invoice total (required if `percent_off` is not passed). + """ + currency: NotRequired[str] + """ + Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) of the `amount_off` parameter (required if `amount_off` is passed). + """ + duration: NotRequired[Literal["forever", "once", "repeating"]] + """ + Specifies how long the discount will be in effect if used on a subscription. Defaults to `once`. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + name: NotRequired[str] + """ + Name of the coupon displayed to customers on, for instance invoices, or receipts. By default the `id` is shown if `name` is not set. + """ + percent_off: NotRequired[float] + """ + A positive float larger than 0, and smaller or equal to 100, that represents the discount the coupon will apply (required if `amount_off` is not passed). + """ + + +class SessionUpdateParamsInvoiceCreation(TypedDict): + invoice_data: NotRequired["SessionUpdateParamsInvoiceCreationInvoiceData"] + """ + Parameters passed when creating invoices for payment-mode Checkout Sessions. + """ + + +class SessionUpdateParamsInvoiceCreationInvoiceData(TypedDict): + issuer: NotRequired["SessionUpdateParamsInvoiceCreationInvoiceDataIssuer"] + """ + The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + """ + + +class SessionUpdateParamsInvoiceCreationInvoiceDataIssuer(TypedDict): + account: NotRequired[str] + """ + The connected account being referenced when `type` is `account`. + """ + type: Literal["account", "self"] + """ + Type of the account referenced in the request. + """ + + +class SessionUpdateParamsLineItem(TypedDict): + adjustable_quantity: NotRequired[ + "SessionUpdateParamsLineItemAdjustableQuantity" + ] + """ + When set, provides configuration for this item's quantity to be adjusted by the customer during Checkout. + """ + id: NotRequired[str] + """ + ID of an existing line item. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + price: NotRequired[str] + """ + The ID of the [Price](https://stripe.com/docs/api/prices). One of `price` or `price_data` is required when creating a new line item. + """ + price_data: NotRequired["SessionUpdateParamsLineItemPriceData"] + """ + Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required when creating a new line item. + """ + quantity: NotRequired[int] + """ + The quantity of the line item being purchased. Quantity should not be defined when `recurring.usage_type=metered`. + """ + tax_rates: NotRequired["Literal['']|List[str]"] + """ + The [tax rates](https://stripe.com/docs/api/tax_rates) which apply to this line item. + """ + + +class SessionUpdateParamsLineItemAdjustableQuantity(TypedDict): + enabled: bool + """ + Set to true if the quantity can be adjusted to any positive integer. Setting to false will remove any previously specified constraints on quantity. + """ + maximum: NotRequired[int] + """ + The maximum quantity the customer can purchase for the Checkout Session. By default this value is 99. You can specify a value up to 999999. + """ + minimum: NotRequired[int] + """ + The minimum quantity the customer must purchase for the Checkout Session. By default this value is 0. + """ + + +class SessionUpdateParamsLineItemPriceData(TypedDict): + 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). + """ + product: NotRequired[str] + """ + The ID of the [Product](https://docs.stripe.com/api/products) that this [Price](https://docs.stripe.com/api/prices) will belong to. One of `product` or `product_data` is required. + """ + product_data: NotRequired[ + "SessionUpdateParamsLineItemPriceDataProductData" + ] + """ + Data used to generate a new [Product](https://docs.stripe.com/api/products) object inline. One of `product` or `product_data` is required. + """ + recurring: NotRequired["SessionUpdateParamsLineItemPriceDataRecurring"] + """ + The recurring components of a price such as `interval` and `interval_count`. + """ + tax_behavior: NotRequired[Literal["exclusive", "inclusive", "unspecified"]] + """ + Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + """ + unit_amount: NotRequired[int] + """ + A non-negative integer in cents (or local equivalent) representing how much to charge. One of `unit_amount` or `unit_amount_decimal` is required. + """ + unit_amount_decimal: NotRequired[str] + """ + Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + """ + + +class SessionUpdateParamsLineItemPriceDataProductData(TypedDict): + description: NotRequired[str] + """ + The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. + """ + images: NotRequired[List[str]] + """ + A list of up to 8 URLs of images for this product, meant to be displayable to the customer. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + name: str + """ + The product's name, meant to be displayable to the customer. + """ + tax_code: NotRequired[str] + """ + A [tax code](https://stripe.com/docs/tax/tax-categories) ID. + """ + unit_label: NotRequired[str] + """ + A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal. + """ + + +class SessionUpdateParamsLineItemPriceDataRecurring(TypedDict): + interval: Literal["day", "month", "week", "year"] + """ + Specifies billing frequency. Either `day`, `week`, `month` or `year`. + """ + interval_count: NotRequired[int] + """ + The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). + """ + + +class SessionUpdateParamsShippingOption(TypedDict): + shipping_rate: NotRequired[str] + """ + The ID of the Shipping Rate to use for this shipping option. + """ + shipping_rate_data: NotRequired[ + "SessionUpdateParamsShippingOptionShippingRateData" + ] + """ + Parameters to be passed to Shipping Rate creation for this shipping option. + """ + + +class SessionUpdateParamsShippingOptionShippingRateData(TypedDict): + delivery_estimate: NotRequired[ + "SessionUpdateParamsShippingOptionShippingRateDataDeliveryEstimate" + ] + """ + The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions. + """ + display_name: str + """ + The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions. + """ + fixed_amount: NotRequired[ + "SessionUpdateParamsShippingOptionShippingRateDataFixedAmount" + ] + """ + Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + tax_behavior: NotRequired[Literal["exclusive", "inclusive", "unspecified"]] + """ + Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + """ + tax_code: NotRequired[str] + """ + A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`. + """ + type: NotRequired[Literal["fixed_amount"]] + """ + The type of calculation to use on the shipping rate. + """ + + +class SessionUpdateParamsShippingOptionShippingRateDataDeliveryEstimate( + TypedDict, +): + maximum: NotRequired[ + "SessionUpdateParamsShippingOptionShippingRateDataDeliveryEstimateMaximum" + ] + """ + The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite. + """ + minimum: NotRequired[ + "SessionUpdateParamsShippingOptionShippingRateDataDeliveryEstimateMinimum" + ] + """ + The lower bound of the estimated range. If empty, represents no lower bound. + """ + + +class SessionUpdateParamsShippingOptionShippingRateDataDeliveryEstimateMaximum( + TypedDict, +): + unit: Literal["business_day", "day", "hour", "month", "week"] + """ + A unit of time. + """ + value: int + """ + Must be greater than 0. + """ + + +class SessionUpdateParamsShippingOptionShippingRateDataDeliveryEstimateMinimum( + TypedDict, +): + unit: Literal["business_day", "day", "hour", "month", "week"] + """ + A unit of time. + """ + value: int + """ + Must be greater than 0. + """ + + +class SessionUpdateParamsShippingOptionShippingRateDataFixedAmount(TypedDict): + amount: int + """ + A non-negative integer in cents representing how much to charge. + """ + 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). + """ + currency_options: NotRequired[ + Dict[ + str, + "SessionUpdateParamsShippingOptionShippingRateDataFixedAmountCurrencyOptions", + ] + ] + """ + Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). + """ + + +class SessionUpdateParamsShippingOptionShippingRateDataFixedAmountCurrencyOptions( + TypedDict, +): + amount: int + """ + A non-negative integer in cents representing how much to charge. + """ + tax_behavior: NotRequired[Literal["exclusive", "inclusive", "unspecified"]] + """ + Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + """ + + +class SessionUpdateParamsSubscriptionData(TypedDict): + invoice_settings: NotRequired[ + "SessionUpdateParamsSubscriptionDataInvoiceSettings" + ] + """ + All invoices will be billed using the specified settings. + """ + trial_end: NotRequired[int] + """ + Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. Has to be at least 48 hours in the future. + """ + trial_period_days: NotRequired["Literal['']|int"] + """ + Integer representing the number of trial period days before the customer is charged for the first time. Has to be at least 1. + """ + + +class SessionUpdateParamsSubscriptionDataInvoiceSettings(TypedDict): + issuer: NotRequired[ + "SessionUpdateParamsSubscriptionDataInvoiceSettingsIssuer" + ] + """ + The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + """ + + +class SessionUpdateParamsSubscriptionDataInvoiceSettingsIssuer(TypedDict): + account: NotRequired[str] + """ + The connected account being referenced when `type` is `account`. + """ + type: Literal["account", "self"] + """ + Type of the account referenced in the request. + """ diff --git a/stripe/params/climate/__init__.py b/stripe/params/climate/__init__.py new file mode 100644 index 000000000..fcdc03421 --- /dev/null +++ b/stripe/params/climate/__init__.py @@ -0,0 +1,32 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe.params.climate._order_cancel_params import ( + OrderCancelParams as OrderCancelParams, +) +from stripe.params.climate._order_create_params import ( + OrderCreateParams as OrderCreateParams, +) +from stripe.params.climate._order_list_params import ( + OrderListParams as OrderListParams, +) +from stripe.params.climate._order_modify_params import ( + OrderModifyParams as OrderModifyParams, +) +from stripe.params.climate._order_retrieve_params import ( + OrderRetrieveParams as OrderRetrieveParams, +) +from stripe.params.climate._order_update_params import ( + OrderUpdateParams as OrderUpdateParams, +) +from stripe.params.climate._product_list_params import ( + ProductListParams as ProductListParams, +) +from stripe.params.climate._product_retrieve_params import ( + ProductRetrieveParams as ProductRetrieveParams, +) +from stripe.params.climate._supplier_list_params import ( + SupplierListParams as SupplierListParams, +) +from stripe.params.climate._supplier_retrieve_params import ( + SupplierRetrieveParams as SupplierRetrieveParams, +) diff --git a/stripe/params/climate/_order_cancel_params.py b/stripe/params/climate/_order_cancel_params.py new file mode 100644 index 000000000..ba99988d5 --- /dev/null +++ b/stripe/params/climate/_order_cancel_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 OrderCancelParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/climate/_order_create_params.py b/stripe/params/climate/_order_create_params.py new file mode 100644 index 000000000..45ca42955 --- /dev/null +++ b/stripe/params/climate/_order_create_params.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import NotRequired, TypedDict + + +class OrderCreateParams(RequestOptions): + amount: NotRequired[int] + """ + Requested amount of carbon removal units. Either this or `metric_tons` must be specified. + """ + beneficiary: NotRequired["OrderCreateParamsBeneficiary"] + """ + Publicly sharable reference for the end beneficiary of carbon removal. Assumed to be the Stripe account if not set. + """ + currency: NotRequired[str] + """ + Request currency for the order as a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a supported [settlement currency for your account](https://stripe.com/docs/currencies). If omitted, the account's default currency will be used. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + metric_tons: NotRequired[str] + """ + Requested number of tons for the order. Either this or `amount` must be specified. + """ + product: str + """ + Unique identifier of the Climate product. + """ + + +class OrderCreateParamsBeneficiary(TypedDict): + public_name: str + """ + Publicly displayable name for the end beneficiary of carbon removal. + """ diff --git a/stripe/params/climate/_order_list_params.py b/stripe/params/climate/_order_list_params.py new file mode 100644 index 000000000..c17bfa64f --- /dev/null +++ b/stripe/params/climate/_order_list_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 OrderListParams(RequestOptions): + 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. + """ diff --git a/stripe/params/climate/_order_modify_params.py b/stripe/params/climate/_order_modify_params.py new file mode 100644 index 000000000..af4371473 --- /dev/null +++ b/stripe/params/climate/_order_modify_params.py @@ -0,0 +1,27 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List, Union +from typing_extensions import Literal, NotRequired, TypedDict + + +class OrderModifyParams(RequestOptions): + beneficiary: NotRequired["Literal['']|OrderModifyParamsBeneficiary"] + """ + Publicly sharable reference for the end beneficiary of carbon removal. Assumed to be the Stripe account if not set. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + + +class OrderModifyParamsBeneficiary(TypedDict): + public_name: Union[Literal[""], str] + """ + Publicly displayable name for the end beneficiary of carbon removal. + """ diff --git a/stripe/params/climate/_order_retrieve_params.py b/stripe/params/climate/_order_retrieve_params.py new file mode 100644 index 000000000..9364635f9 --- /dev/null +++ b/stripe/params/climate/_order_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 OrderRetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/climate/_order_update_params.py b/stripe/params/climate/_order_update_params.py new file mode 100644 index 000000000..05a947f03 --- /dev/null +++ b/stripe/params/climate/_order_update_params.py @@ -0,0 +1,26 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import Dict, List, Union +from typing_extensions import Literal, NotRequired, TypedDict + + +class OrderUpdateParams(TypedDict): + beneficiary: NotRequired["Literal['']|OrderUpdateParamsBeneficiary"] + """ + Publicly sharable reference for the end beneficiary of carbon removal. Assumed to be the Stripe account if not set. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + + +class OrderUpdateParamsBeneficiary(TypedDict): + public_name: Union[Literal[""], str] + """ + Publicly displayable name for the end beneficiary of carbon removal. + """ diff --git a/stripe/params/climate/_product_list_params.py b/stripe/params/climate/_product_list_params.py new file mode 100644 index 000000000..504998abe --- /dev/null +++ b/stripe/params/climate/_product_list_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 ProductListParams(RequestOptions): + 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. + """ diff --git a/stripe/params/climate/_product_retrieve_params.py b/stripe/params/climate/_product_retrieve_params.py new file mode 100644 index 000000000..c9cc1bd6b --- /dev/null +++ b/stripe/params/climate/_product_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 ProductRetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/climate/_supplier_list_params.py b/stripe/params/climate/_supplier_list_params.py new file mode 100644 index 000000000..93e5b97aa --- /dev/null +++ b/stripe/params/climate/_supplier_list_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 SupplierListParams(RequestOptions): + 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. + """ diff --git a/stripe/params/climate/_supplier_retrieve_params.py b/stripe/params/climate/_supplier_retrieve_params.py new file mode 100644 index 000000000..262e8b954 --- /dev/null +++ b/stripe/params/climate/_supplier_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 SupplierRetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/entitlements/__init__.py b/stripe/params/entitlements/__init__.py new file mode 100644 index 000000000..c6c7ad3c5 --- /dev/null +++ b/stripe/params/entitlements/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe.params.entitlements._active_entitlement_list_params import ( + ActiveEntitlementListParams as ActiveEntitlementListParams, +) +from stripe.params.entitlements._active_entitlement_retrieve_params import ( + ActiveEntitlementRetrieveParams as ActiveEntitlementRetrieveParams, +) +from stripe.params.entitlements._feature_create_params import ( + FeatureCreateParams as FeatureCreateParams, +) +from stripe.params.entitlements._feature_list_params import ( + FeatureListParams as FeatureListParams, +) +from stripe.params.entitlements._feature_modify_params import ( + FeatureModifyParams as FeatureModifyParams, +) +from stripe.params.entitlements._feature_retrieve_params import ( + FeatureRetrieveParams as FeatureRetrieveParams, +) +from stripe.params.entitlements._feature_update_params import ( + FeatureUpdateParams as FeatureUpdateParams, +) diff --git a/stripe/params/entitlements/_active_entitlement_list_params.py b/stripe/params/entitlements/_active_entitlement_list_params.py new file mode 100644 index 000000000..0964edb0a --- /dev/null +++ b/stripe/params/entitlements/_active_entitlement_list_params.py @@ -0,0 +1,28 @@ +# -*- 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 ActiveEntitlementListParams(RequestOptions): + customer: str + """ + The ID of the customer. + """ + 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. + """ diff --git a/stripe/params/entitlements/_active_entitlement_retrieve_params.py b/stripe/params/entitlements/_active_entitlement_retrieve_params.py new file mode 100644 index 000000000..c8d0020ed --- /dev/null +++ b/stripe/params/entitlements/_active_entitlement_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 ActiveEntitlementRetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/entitlements/_feature_create_params.py b/stripe/params/entitlements/_feature_create_params.py new file mode 100644 index 000000000..58338e5f4 --- /dev/null +++ b/stripe/params/entitlements/_feature_create_params.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import NotRequired + + +class FeatureCreateParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + lookup_key: str + """ + A unique key you provide as your own system identifier. This may be up to 80 characters. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + """ + name: str + """ + The feature's name, for your own purpose, not meant to be displayable to the customer. + """ diff --git a/stripe/params/entitlements/_feature_list_params.py b/stripe/params/entitlements/_feature_list_params.py new file mode 100644 index 000000000..d57a686c2 --- /dev/null +++ b/stripe/params/entitlements/_feature_list_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 NotRequired + + +class FeatureListParams(RequestOptions): + archived: NotRequired[bool] + """ + If set, filter results to only include features with the given archive status. + """ + 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. + """ + lookup_key: NotRequired[str] + """ + If set, filter results to only include features with the given lookup_key. + """ + 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. + """ diff --git a/stripe/params/entitlements/_feature_modify_params.py b/stripe/params/entitlements/_feature_modify_params.py new file mode 100644 index 000000000..59158e75d --- /dev/null +++ b/stripe/params/entitlements/_feature_modify_params.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import Literal, NotRequired + + +class FeatureModifyParams(RequestOptions): + active: NotRequired[bool] + """ + Inactive features cannot be attached to new products and will not be returned from the features list endpoint. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + """ + name: NotRequired[str] + """ + The feature's name, for your own purpose, not meant to be displayable to the customer. + """ diff --git a/stripe/params/entitlements/_feature_retrieve_params.py b/stripe/params/entitlements/_feature_retrieve_params.py new file mode 100644 index 000000000..5933235c2 --- /dev/null +++ b/stripe/params/entitlements/_feature_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 FeatureRetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/entitlements/_feature_update_params.py b/stripe/params/entitlements/_feature_update_params.py new file mode 100644 index 000000000..cbc29b19a --- /dev/null +++ b/stripe/params/entitlements/_feature_update_params.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class FeatureUpdateParams(TypedDict): + active: NotRequired[bool] + """ + Inactive features cannot be attached to new products and will not be returned from the features list endpoint. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + """ + name: NotRequired[str] + """ + The feature's name, for your own purpose, not meant to be displayable to the customer. + """ diff --git a/stripe/params/financial_connections/__init__.py b/stripe/params/financial_connections/__init__.py new file mode 100644 index 000000000..05713334f --- /dev/null +++ b/stripe/params/financial_connections/__init__.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe.params.financial_connections._account_disconnect_params import ( + AccountDisconnectParams as AccountDisconnectParams, +) +from stripe.params.financial_connections._account_inferred_balance_list_params import ( + AccountInferredBalanceListParams as AccountInferredBalanceListParams, +) +from stripe.params.financial_connections._account_list_inferred_balances_params import ( + AccountListInferredBalancesParams as AccountListInferredBalancesParams, +) +from stripe.params.financial_connections._account_list_owners_params import ( + AccountListOwnersParams as AccountListOwnersParams, +) +from stripe.params.financial_connections._account_list_params import ( + AccountListParams as AccountListParams, +) +from stripe.params.financial_connections._account_owner_list_params import ( + AccountOwnerListParams as AccountOwnerListParams, +) +from stripe.params.financial_connections._account_refresh_account_params import ( + AccountRefreshAccountParams as AccountRefreshAccountParams, +) +from stripe.params.financial_connections._account_refresh_params import ( + AccountRefreshParams as AccountRefreshParams, +) +from stripe.params.financial_connections._account_retrieve_params import ( + AccountRetrieveParams as AccountRetrieveParams, +) +from stripe.params.financial_connections._account_subscribe_params import ( + AccountSubscribeParams as AccountSubscribeParams, +) +from stripe.params.financial_connections._account_unsubscribe_params import ( + AccountUnsubscribeParams as AccountUnsubscribeParams, +) +from stripe.params.financial_connections._institution_list_params import ( + InstitutionListParams as InstitutionListParams, +) +from stripe.params.financial_connections._institution_retrieve_params import ( + InstitutionRetrieveParams as InstitutionRetrieveParams, +) +from stripe.params.financial_connections._session_create_params import ( + SessionCreateParams as SessionCreateParams, +) +from stripe.params.financial_connections._session_retrieve_params import ( + SessionRetrieveParams as SessionRetrieveParams, +) +from stripe.params.financial_connections._transaction_list_params import ( + TransactionListParams as TransactionListParams, +) +from stripe.params.financial_connections._transaction_retrieve_params import ( + TransactionRetrieveParams as TransactionRetrieveParams, +) diff --git a/stripe/params/financial_connections/_account_disconnect_params.py b/stripe/params/financial_connections/_account_disconnect_params.py new file mode 100644 index 000000000..45ca66ce0 --- /dev/null +++ b/stripe/params/financial_connections/_account_disconnect_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 AccountDisconnectParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/financial_connections/_account_inferred_balance_list_params.py b/stripe/params/financial_connections/_account_inferred_balance_list_params.py new file mode 100644 index 000000000..24106a4dc --- /dev/null +++ b/stripe/params/financial_connections/_account_inferred_balance_list_params.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import NotRequired, TypedDict + + +class AccountInferredBalanceListParams(TypedDict): + 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. + """ diff --git a/stripe/params/financial_connections/_account_list_inferred_balances_params.py b/stripe/params/financial_connections/_account_list_inferred_balances_params.py new file mode 100644 index 000000000..d36ad9553 --- /dev/null +++ b/stripe/params/financial_connections/_account_list_inferred_balances_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 AccountListInferredBalancesParams(RequestOptions): + 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. + """ diff --git a/stripe/params/financial_connections/_account_list_owners_params.py b/stripe/params/financial_connections/_account_list_owners_params.py new file mode 100644 index 000000000..a185d56c2 --- /dev/null +++ b/stripe/params/financial_connections/_account_list_owners_params.py @@ -0,0 +1,28 @@ +# -*- 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 AccountListOwnersParams(RequestOptions): + 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. + """ + ownership: str + """ + The ID of the ownership object to fetch owners from. + """ + 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. + """ diff --git a/stripe/params/financial_connections/_account_list_params.py b/stripe/params/financial_connections/_account_list_params.py new file mode 100644 index 000000000..897d4e10d --- /dev/null +++ b/stripe/params/financial_connections/_account_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 AccountListParams(RequestOptions): + account_holder: NotRequired["AccountListParamsAccountHolder"] + """ + If present, only return accounts that belong to the specified account holder. `account_holder[customer]` and `account_holder[account]` are mutually exclusive. + """ + 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. + """ + session: NotRequired[str] + """ + If present, only return accounts that were collected as part of the given session. + """ + 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 AccountListParamsAccountHolder(TypedDict): + account: NotRequired[str] + """ + The ID of the Stripe account whose accounts will be retrieved. + """ + customer: NotRequired[str] + """ + The ID of the Stripe customer whose accounts will be retrieved. + """ + customer_account: NotRequired[str] + """ + The Account ID of the Stripe customer whose accounts will be retrieved. + """ diff --git a/stripe/params/financial_connections/_account_owner_list_params.py b/stripe/params/financial_connections/_account_owner_list_params.py new file mode 100644 index 000000000..d2ea5e2f1 --- /dev/null +++ b/stripe/params/financial_connections/_account_owner_list_params.py @@ -0,0 +1,27 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import NotRequired, TypedDict + + +class AccountOwnerListParams(TypedDict): + 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. + """ + ownership: str + """ + The ID of the ownership object to fetch owners from. + """ + 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. + """ diff --git a/stripe/params/financial_connections/_account_refresh_account_params.py b/stripe/params/financial_connections/_account_refresh_account_params.py new file mode 100644 index 000000000..257cd29cd --- /dev/null +++ b/stripe/params/financial_connections/_account_refresh_account_params.py @@ -0,0 +1,18 @@ +# -*- 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 AccountRefreshAccountParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + features: List[ + Literal["balance", "inferred_balances", "ownership", "transactions"] + ] + """ + The list of account features that you would like to refresh. + """ diff --git a/stripe/params/financial_connections/_account_refresh_params.py b/stripe/params/financial_connections/_account_refresh_params.py new file mode 100644 index 000000000..e4c8a982a --- /dev/null +++ b/stripe/params/financial_connections/_account_refresh_params.py @@ -0,0 +1,17 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import Literal, NotRequired, TypedDict + + +class AccountRefreshParams(TypedDict): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + features: List[ + Literal["balance", "inferred_balances", "ownership", "transactions"] + ] + """ + The list of account features that you would like to refresh. + """ diff --git a/stripe/params/financial_connections/_account_retrieve_params.py b/stripe/params/financial_connections/_account_retrieve_params.py new file mode 100644 index 000000000..02d5a379c --- /dev/null +++ b/stripe/params/financial_connections/_account_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 AccountRetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/financial_connections/_account_subscribe_params.py b/stripe/params/financial_connections/_account_subscribe_params.py new file mode 100644 index 000000000..1ab376be3 --- /dev/null +++ b/stripe/params/financial_connections/_account_subscribe_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 Literal, NotRequired + + +class AccountSubscribeParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + features: List[Literal["balance", "inferred_balances", "transactions"]] + """ + The list of account features to which you would like to subscribe. + """ diff --git a/stripe/params/financial_connections/_account_unsubscribe_params.py b/stripe/params/financial_connections/_account_unsubscribe_params.py new file mode 100644 index 000000000..6035ae614 --- /dev/null +++ b/stripe/params/financial_connections/_account_unsubscribe_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 Literal, NotRequired + + +class AccountUnsubscribeParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + features: List[Literal["balance", "inferred_balances", "transactions"]] + """ + The list of account features from which you would like to unsubscribe. + """ diff --git a/stripe/params/financial_connections/_institution_list_params.py b/stripe/params/financial_connections/_institution_list_params.py new file mode 100644 index 000000000..d6294d9f0 --- /dev/null +++ b/stripe/params/financial_connections/_institution_list_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 InstitutionListParams(RequestOptions): + 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. + """ diff --git a/stripe/params/financial_connections/_institution_retrieve_params.py b/stripe/params/financial_connections/_institution_retrieve_params.py new file mode 100644 index 000000000..f791467db --- /dev/null +++ b/stripe/params/financial_connections/_institution_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 InstitutionRetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/financial_connections/_session_create_params.py b/stripe/params/financial_connections/_session_create_params.py new file mode 100644 index 000000000..320a267cf --- /dev/null +++ b/stripe/params/financial_connections/_session_create_params.py @@ -0,0 +1,108 @@ +# -*- 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, TypedDict + + +class SessionCreateParams(RequestOptions): + account_holder: "SessionCreateParamsAccountHolder" + """ + The account holder to link accounts for. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + filters: NotRequired["SessionCreateParamsFilters"] + """ + Filters to restrict the kinds of accounts to collect. + """ + limits: NotRequired["SessionCreateParamsLimits"] + """ + Settings for configuring Session-specific limits. + """ + manual_entry: NotRequired["SessionCreateParamsManualEntry"] + """ + Customize manual entry behavior + """ + permissions: List[ + Literal["balances", "ownership", "payment_method", "transactions"] + ] + """ + List of data features that you would like to request access to. + + Possible values are `balances`, `transactions`, `ownership`, and `payment_method`. + """ + prefetch: NotRequired[ + List[ + Literal[ + "balances", "inferred_balances", "ownership", "transactions" + ] + ] + ] + """ + List of data features that you would like to retrieve upon account creation. + """ + return_url: NotRequired[str] + """ + For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. + """ + + +class SessionCreateParamsAccountHolder(TypedDict): + account: NotRequired[str] + """ + The ID of the Stripe account whose accounts will be retrieved. Should only be present if `type` is `account`. + """ + customer: NotRequired[str] + """ + The ID of the Stripe customer whose accounts will be retrieved. Should only be present if `type` is `customer`. + """ + customer_account: NotRequired[str] + """ + The ID of the Stripe customer Account whose accounts will be retrieved. Should only be present if `type` is `customer`. + """ + type: Literal["account", "customer"] + """ + Type of account holder to collect accounts for. + """ + + +class SessionCreateParamsFilters(TypedDict): + account_subcategories: NotRequired[ + List[ + Literal[ + "checking", + "credit_card", + "line_of_credit", + "mortgage", + "savings", + ] + ] + ] + """ + Restricts the Session to subcategories of accounts that can be linked. Valid subcategories are: `checking`, `savings`, `mortgage`, `line_of_credit`, `credit_card`. + """ + countries: NotRequired[List[str]] + """ + List of countries from which to collect accounts. + """ + institution: NotRequired[str] + """ + Stripe ID of the institution with which the customer should be directed to log in. + """ + + +class SessionCreateParamsLimits(TypedDict): + accounts: int + """ + The number of accounts that can be linked in this Session. + """ + + +class SessionCreateParamsManualEntry(TypedDict): + mode: NotRequired[Literal["automatic", "custom"]] + """ + Whether manual entry will be handled by Stripe during the Session. + """ diff --git a/stripe/params/financial_connections/_session_retrieve_params.py b/stripe/params/financial_connections/_session_retrieve_params.py new file mode 100644 index 000000000..fc641db91 --- /dev/null +++ b/stripe/params/financial_connections/_session_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 SessionRetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/financial_connections/_transaction_list_params.py b/stripe/params/financial_connections/_transaction_list_params.py new file mode 100644 index 000000000..3290ec94c --- /dev/null +++ b/stripe/params/financial_connections/_transaction_list_params.py @@ -0,0 +1,62 @@ +# -*- 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 TransactionListParams(RequestOptions): + account: str + """ + The ID of the Financial Connections Account whose transactions will be retrieved. + """ + 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. + """ + transacted_at: NotRequired["TransactionListParamsTransactedAt|int"] + """ + A filter on the list based on the object `transacted_at` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with the following options: + """ + transaction_refresh: NotRequired["TransactionListParamsTransactionRefresh"] + """ + A filter on the list based on the object `transaction_refresh` field. The value can be a dictionary with the following options: + """ + + +class TransactionListParamsTransactedAt(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) + """ + + +class TransactionListParamsTransactionRefresh(TypedDict): + after: str + """ + Return results where the transactions were created or updated by a refresh that took place after this refresh (non-inclusive). + """ diff --git a/stripe/params/financial_connections/_transaction_retrieve_params.py b/stripe/params/financial_connections/_transaction_retrieve_params.py new file mode 100644 index 000000000..07744dd96 --- /dev/null +++ b/stripe/params/financial_connections/_transaction_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 TransactionRetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/forwarding/__init__.py b/stripe/params/forwarding/__init__.py new file mode 100644 index 000000000..e12bd9cee --- /dev/null +++ b/stripe/params/forwarding/__init__.py @@ -0,0 +1,11 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe.params.forwarding._request_create_params import ( + RequestCreateParams as RequestCreateParams, +) +from stripe.params.forwarding._request_list_params import ( + RequestListParams as RequestListParams, +) +from stripe.params.forwarding._request_retrieve_params import ( + RequestRetrieveParams as RequestRetrieveParams, +) diff --git a/stripe/params/forwarding/_request_create_params.py b/stripe/params/forwarding/_request_create_params.py new file mode 100644 index 000000000..e35ebfc51 --- /dev/null +++ b/stripe/params/forwarding/_request_create_params.py @@ -0,0 +1,62 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class RequestCreateParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + payment_method: str + """ + The PaymentMethod to insert into the forwarded request. Forwarding previously consumed PaymentMethods is allowed. + """ + replacements: List[ + Literal[ + "card_cvc", + "card_expiry", + "card_number", + "cardholder_name", + "request_signature", + ] + ] + """ + The field kinds to be replaced in the forwarded request. + """ + request: "RequestCreateParamsRequest" + """ + The request body and headers to be sent to the destination endpoint. + """ + url: str + """ + The destination URL for the forwarded request. Must be supported by the config. + """ + + +class RequestCreateParamsRequest(TypedDict): + body: NotRequired[str] + """ + The body payload to send to the destination endpoint. + """ + headers: NotRequired[List["RequestCreateParamsRequestHeader"]] + """ + The headers to include in the forwarded request. Can be omitted if no additional headers (excluding Stripe-generated ones such as the Content-Type header) should be included. + """ + + +class RequestCreateParamsRequestHeader(TypedDict): + name: str + """ + The header name. + """ + value: str + """ + The header value. + """ diff --git a/stripe/params/forwarding/_request_list_params.py b/stripe/params/forwarding/_request_list_params.py new file mode 100644 index 000000000..6c79d6318 --- /dev/null +++ b/stripe/params/forwarding/_request_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 RequestListParams(RequestOptions): + created: NotRequired["RequestListParamsCreated"] + """ + Similar to other List endpoints, filters results based on created timestamp. You can pass gt, gte, lt, and lte timestamp values. + """ + ending_before: NotRequired[str] + """ + A pagination cursor to fetch the previous page of the list. The value must be a ForwardingRequest ID. + """ + 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 pagination cursor to fetch the next page of the list. The value must be a ForwardingRequest ID. + """ + + +class RequestListParamsCreated(TypedDict): + gt: NotRequired[int] + """ + Return results where the `created` field is greater than this value. + """ + gte: NotRequired[int] + """ + Return results where the `created` field is greater than or equal to this value. + """ + lt: NotRequired[int] + """ + Return results where the `created` field is less than this value. + """ + lte: NotRequired[int] + """ + Return results where the `created` field is less than or equal to this value. + """ diff --git a/stripe/params/forwarding/_request_retrieve_params.py b/stripe/params/forwarding/_request_retrieve_params.py new file mode 100644 index 000000000..988b7d6a4 --- /dev/null +++ b/stripe/params/forwarding/_request_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 RequestRetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/identity/__init__.py b/stripe/params/identity/__init__.py new file mode 100644 index 000000000..2ba55f00f --- /dev/null +++ b/stripe/params/identity/__init__.py @@ -0,0 +1,29 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe.params.identity._verification_report_list_params import ( + VerificationReportListParams as VerificationReportListParams, +) +from stripe.params.identity._verification_report_retrieve_params import ( + VerificationReportRetrieveParams as VerificationReportRetrieveParams, +) +from stripe.params.identity._verification_session_cancel_params import ( + VerificationSessionCancelParams as VerificationSessionCancelParams, +) +from stripe.params.identity._verification_session_create_params import ( + VerificationSessionCreateParams as VerificationSessionCreateParams, +) +from stripe.params.identity._verification_session_list_params import ( + VerificationSessionListParams as VerificationSessionListParams, +) +from stripe.params.identity._verification_session_modify_params import ( + VerificationSessionModifyParams as VerificationSessionModifyParams, +) +from stripe.params.identity._verification_session_redact_params import ( + VerificationSessionRedactParams as VerificationSessionRedactParams, +) +from stripe.params.identity._verification_session_retrieve_params import ( + VerificationSessionRetrieveParams as VerificationSessionRetrieveParams, +) +from stripe.params.identity._verification_session_update_params import ( + VerificationSessionUpdateParams as VerificationSessionUpdateParams, +) diff --git a/stripe/params/identity/_verification_report_list_params.py b/stripe/params/identity/_verification_report_list_params.py new file mode 100644 index 000000000..e02d3b364 --- /dev/null +++ b/stripe/params/identity/_verification_report_list_params.py @@ -0,0 +1,59 @@ +# -*- 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, TypedDict + + +class VerificationReportListParams(RequestOptions): + client_reference_id: NotRequired[str] + """ + A string to reference this user. This can be a customer ID, a session ID, or similar, and can be used to reconcile this verification with your internal systems. + """ + created: NotRequired["VerificationReportListParamsCreated|int"] + """ + Only return VerificationReports that were created during the given date interval. + """ + 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. + """ + type: NotRequired[Literal["document", "id_number"]] + """ + Only return VerificationReports of this type + """ + verification_session: NotRequired[str] + """ + Only return VerificationReports created by this VerificationSession ID. It is allowed to provide a VerificationIntent ID. + """ + + +class VerificationReportListParamsCreated(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/identity/_verification_report_retrieve_params.py b/stripe/params/identity/_verification_report_retrieve_params.py new file mode 100644 index 000000000..a289cedde --- /dev/null +++ b/stripe/params/identity/_verification_report_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 VerificationReportRetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/identity/_verification_session_cancel_params.py b/stripe/params/identity/_verification_session_cancel_params.py new file mode 100644 index 000000000..3c43c7a9f --- /dev/null +++ b/stripe/params/identity/_verification_session_cancel_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 VerificationSessionCancelParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/identity/_verification_session_create_params.py b/stripe/params/identity/_verification_session_create_params.py new file mode 100644 index 000000000..72a7e8568 --- /dev/null +++ b/stripe/params/identity/_verification_session_create_params.py @@ -0,0 +1,106 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class VerificationSessionCreateParams(RequestOptions): + client_reference_id: NotRequired[str] + """ + A string to reference this user. This can be a customer ID, a session ID, or similar, and can be used to reconcile this verification with your internal systems. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + options: NotRequired["VerificationSessionCreateParamsOptions"] + """ + A set of options for the session's verification checks. + """ + provided_details: NotRequired[ + "VerificationSessionCreateParamsProvidedDetails" + ] + """ + Details provided about the user being verified. These details may be shown to the user. + """ + related_customer: NotRequired[str] + """ + Customer ID + """ + related_customer_account: NotRequired[str] + """ + Token referencing a Customer Account resource. + """ + related_person: NotRequired["VerificationSessionCreateParamsRelatedPerson"] + """ + Tokens referencing a Person resource and it's associated account. + """ + return_url: NotRequired[str] + """ + The URL that the user will be redirected to upon completing the verification flow. + """ + type: NotRequired[Literal["document", "id_number"]] + """ + The type of [verification check](https://stripe.com/docs/identity/verification-checks) to be performed. You must provide a `type` if not passing `verification_flow`. + """ + verification_flow: NotRequired[str] + """ + The ID of a verification flow from the Dashboard. See https://docs.stripe.com/identity/verification-flows. + """ + + +class VerificationSessionCreateParamsOptions(TypedDict): + document: NotRequired[ + "Literal['']|VerificationSessionCreateParamsOptionsDocument" + ] + """ + Options that apply to the [document check](https://stripe.com/docs/identity/verification-checks?type=document). + """ + + +class VerificationSessionCreateParamsOptionsDocument(TypedDict): + allowed_types: NotRequired[ + List[Literal["driving_license", "id_card", "passport"]] + ] + """ + Array of strings of allowed identity document types. If the provided identity document isn't one of the allowed types, the verification check will fail with a document_type_not_allowed error code. + """ + require_id_number: NotRequired[bool] + """ + Collect an ID number and perform an [ID number check](https://stripe.com/docs/identity/verification-checks?type=id-number) with the document's extracted name and date of birth. + """ + require_live_capture: NotRequired[bool] + """ + Disable image uploads, identity document images have to be captured using the device's camera. + """ + require_matching_selfie: NotRequired[bool] + """ + Capture a face image and perform a [selfie check](https://stripe.com/docs/identity/verification-checks?type=selfie) comparing a photo ID and a picture of your user's face. [Learn more](https://stripe.com/docs/identity/selfie). + """ + + +class VerificationSessionCreateParamsProvidedDetails(TypedDict): + email: NotRequired[str] + """ + Email of user being verified + """ + phone: NotRequired[str] + """ + Phone number of user being verified + """ + + +class VerificationSessionCreateParamsRelatedPerson(TypedDict): + account: str + """ + A token representing a connected account. If provided, the person parameter is also required and must be associated with the account. + """ + person: str + """ + A token referencing a Person resource that this verification is being used to verify. + """ diff --git a/stripe/params/identity/_verification_session_list_params.py b/stripe/params/identity/_verification_session_list_params.py new file mode 100644 index 000000000..fd67dec42 --- /dev/null +++ b/stripe/params/identity/_verification_session_list_params.py @@ -0,0 +1,59 @@ +# -*- 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, TypedDict + + +class VerificationSessionListParams(RequestOptions): + client_reference_id: NotRequired[str] + """ + A string to reference this user. This can be a customer ID, a session ID, or similar, and can be used to reconcile this verification with your internal systems. + """ + created: NotRequired["VerificationSessionListParamsCreated|int"] + """ + Only return VerificationSessions that were created during the given date interval. + """ + 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. + """ + related_customer: NotRequired[str] + related_customer_account: NotRequired[str] + 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. + """ + status: NotRequired[ + Literal["canceled", "processing", "requires_input", "verified"] + ] + """ + Only return VerificationSessions with this status. [Learn more about the lifecycle of sessions](https://stripe.com/docs/identity/how-sessions-work). + """ + + +class VerificationSessionListParamsCreated(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/identity/_verification_session_modify_params.py b/stripe/params/identity/_verification_session_modify_params.py new file mode 100644 index 000000000..ec4fb2c11 --- /dev/null +++ b/stripe/params/identity/_verification_session_modify_params.py @@ -0,0 +1,71 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class VerificationSessionModifyParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + options: NotRequired["VerificationSessionModifyParamsOptions"] + """ + A set of options for the session's verification checks. + """ + provided_details: NotRequired[ + "VerificationSessionModifyParamsProvidedDetails" + ] + """ + Details provided about the user being verified. These details may be shown to the user. + """ + type: NotRequired[Literal["document", "id_number"]] + """ + The type of [verification check](https://stripe.com/docs/identity/verification-checks) to be performed. + """ + + +class VerificationSessionModifyParamsOptions(TypedDict): + document: NotRequired[ + "Literal['']|VerificationSessionModifyParamsOptionsDocument" + ] + """ + Options that apply to the [document check](https://stripe.com/docs/identity/verification-checks?type=document). + """ + + +class VerificationSessionModifyParamsOptionsDocument(TypedDict): + allowed_types: NotRequired[ + List[Literal["driving_license", "id_card", "passport"]] + ] + """ + Array of strings of allowed identity document types. If the provided identity document isn't one of the allowed types, the verification check will fail with a document_type_not_allowed error code. + """ + require_id_number: NotRequired[bool] + """ + Collect an ID number and perform an [ID number check](https://stripe.com/docs/identity/verification-checks?type=id-number) with the document's extracted name and date of birth. + """ + require_live_capture: NotRequired[bool] + """ + Disable image uploads, identity document images have to be captured using the device's camera. + """ + require_matching_selfie: NotRequired[bool] + """ + Capture a face image and perform a [selfie check](https://stripe.com/docs/identity/verification-checks?type=selfie) comparing a photo ID and a picture of your user's face. [Learn more](https://stripe.com/docs/identity/selfie). + """ + + +class VerificationSessionModifyParamsProvidedDetails(TypedDict): + email: NotRequired[str] + """ + Email of user being verified + """ + phone: NotRequired[str] + """ + Phone number of user being verified + """ diff --git a/stripe/params/identity/_verification_session_redact_params.py b/stripe/params/identity/_verification_session_redact_params.py new file mode 100644 index 000000000..a624950ff --- /dev/null +++ b/stripe/params/identity/_verification_session_redact_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 VerificationSessionRedactParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/identity/_verification_session_retrieve_params.py b/stripe/params/identity/_verification_session_retrieve_params.py new file mode 100644 index 000000000..f696500f6 --- /dev/null +++ b/stripe/params/identity/_verification_session_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 VerificationSessionRetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/identity/_verification_session_update_params.py b/stripe/params/identity/_verification_session_update_params.py new file mode 100644 index 000000000..6fe2b7271 --- /dev/null +++ b/stripe/params/identity/_verification_session_update_params.py @@ -0,0 +1,70 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class VerificationSessionUpdateParams(TypedDict): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + options: NotRequired["VerificationSessionUpdateParamsOptions"] + """ + A set of options for the session's verification checks. + """ + provided_details: NotRequired[ + "VerificationSessionUpdateParamsProvidedDetails" + ] + """ + Details provided about the user being verified. These details may be shown to the user. + """ + type: NotRequired[Literal["document", "id_number"]] + """ + The type of [verification check](https://stripe.com/docs/identity/verification-checks) to be performed. + """ + + +class VerificationSessionUpdateParamsOptions(TypedDict): + document: NotRequired[ + "Literal['']|VerificationSessionUpdateParamsOptionsDocument" + ] + """ + Options that apply to the [document check](https://stripe.com/docs/identity/verification-checks?type=document). + """ + + +class VerificationSessionUpdateParamsOptionsDocument(TypedDict): + allowed_types: NotRequired[ + List[Literal["driving_license", "id_card", "passport"]] + ] + """ + Array of strings of allowed identity document types. If the provided identity document isn't one of the allowed types, the verification check will fail with a document_type_not_allowed error code. + """ + require_id_number: NotRequired[bool] + """ + Collect an ID number and perform an [ID number check](https://stripe.com/docs/identity/verification-checks?type=id-number) with the document's extracted name and date of birth. + """ + require_live_capture: NotRequired[bool] + """ + Disable image uploads, identity document images have to be captured using the device's camera. + """ + require_matching_selfie: NotRequired[bool] + """ + Capture a face image and perform a [selfie check](https://stripe.com/docs/identity/verification-checks?type=selfie) comparing a photo ID and a picture of your user's face. [Learn more](https://stripe.com/docs/identity/selfie). + """ + + +class VerificationSessionUpdateParamsProvidedDetails(TypedDict): + email: NotRequired[str] + """ + Email of user being verified + """ + phone: NotRequired[str] + """ + Phone number of user being verified + """ diff --git a/stripe/params/issuing/__init__.py b/stripe/params/issuing/__init__.py new file mode 100644 index 000000000..7db81ca88 --- /dev/null +++ b/stripe/params/issuing/__init__.py @@ -0,0 +1,197 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe.params.issuing._authorization_approve_params import ( + AuthorizationApproveParams as AuthorizationApproveParams, +) +from stripe.params.issuing._authorization_capture_params import ( + AuthorizationCaptureParams as AuthorizationCaptureParams, +) +from stripe.params.issuing._authorization_create_params import ( + AuthorizationCreateParams as AuthorizationCreateParams, +) +from stripe.params.issuing._authorization_decline_params import ( + AuthorizationDeclineParams as AuthorizationDeclineParams, +) +from stripe.params.issuing._authorization_expire_params import ( + AuthorizationExpireParams as AuthorizationExpireParams, +) +from stripe.params.issuing._authorization_finalize_amount_params import ( + AuthorizationFinalizeAmountParams as AuthorizationFinalizeAmountParams, +) +from stripe.params.issuing._authorization_increment_params import ( + AuthorizationIncrementParams as AuthorizationIncrementParams, +) +from stripe.params.issuing._authorization_list_params import ( + AuthorizationListParams as AuthorizationListParams, +) +from stripe.params.issuing._authorization_modify_params import ( + AuthorizationModifyParams as AuthorizationModifyParams, +) +from stripe.params.issuing._authorization_respond_params import ( + AuthorizationRespondParams as AuthorizationRespondParams, +) +from stripe.params.issuing._authorization_retrieve_params import ( + AuthorizationRetrieveParams as AuthorizationRetrieveParams, +) +from stripe.params.issuing._authorization_reverse_params import ( + AuthorizationReverseParams as AuthorizationReverseParams, +) +from stripe.params.issuing._authorization_update_params import ( + AuthorizationUpdateParams as AuthorizationUpdateParams, +) +from stripe.params.issuing._card_create_params import ( + CardCreateParams as CardCreateParams, +) +from stripe.params.issuing._card_deliver_card_params import ( + CardDeliverCardParams as CardDeliverCardParams, +) +from stripe.params.issuing._card_fail_card_params import ( + CardFailCardParams as CardFailCardParams, +) +from stripe.params.issuing._card_list_params import ( + CardListParams as CardListParams, +) +from stripe.params.issuing._card_modify_params import ( + CardModifyParams as CardModifyParams, +) +from stripe.params.issuing._card_retrieve_params import ( + CardRetrieveParams as CardRetrieveParams, +) +from stripe.params.issuing._card_return_card_params import ( + CardReturnCardParams as CardReturnCardParams, +) +from stripe.params.issuing._card_ship_card_params import ( + CardShipCardParams as CardShipCardParams, +) +from stripe.params.issuing._card_submit_card_params import ( + CardSubmitCardParams as CardSubmitCardParams, +) +from stripe.params.issuing._card_update_params import ( + CardUpdateParams as CardUpdateParams, +) +from stripe.params.issuing._cardholder_create_params import ( + CardholderCreateParams as CardholderCreateParams, +) +from stripe.params.issuing._cardholder_list_params import ( + CardholderListParams as CardholderListParams, +) +from stripe.params.issuing._cardholder_modify_params import ( + CardholderModifyParams as CardholderModifyParams, +) +from stripe.params.issuing._cardholder_retrieve_params import ( + CardholderRetrieveParams as CardholderRetrieveParams, +) +from stripe.params.issuing._cardholder_update_params import ( + CardholderUpdateParams as CardholderUpdateParams, +) +from stripe.params.issuing._credit_underwriting_record_correct_params import ( + CreditUnderwritingRecordCorrectParams as CreditUnderwritingRecordCorrectParams, +) +from stripe.params.issuing._credit_underwriting_record_create_from_application_params import ( + CreditUnderwritingRecordCreateFromApplicationParams as CreditUnderwritingRecordCreateFromApplicationParams, +) +from stripe.params.issuing._credit_underwriting_record_create_from_proactive_review_params import ( + CreditUnderwritingRecordCreateFromProactiveReviewParams as CreditUnderwritingRecordCreateFromProactiveReviewParams, +) +from stripe.params.issuing._credit_underwriting_record_list_params import ( + CreditUnderwritingRecordListParams as CreditUnderwritingRecordListParams, +) +from stripe.params.issuing._credit_underwriting_record_report_decision_params import ( + CreditUnderwritingRecordReportDecisionParams as CreditUnderwritingRecordReportDecisionParams, +) +from stripe.params.issuing._credit_underwriting_record_retrieve_params import ( + CreditUnderwritingRecordRetrieveParams as CreditUnderwritingRecordRetrieveParams, +) +from stripe.params.issuing._dispute_create_params import ( + DisputeCreateParams as DisputeCreateParams, +) +from stripe.params.issuing._dispute_list_params import ( + DisputeListParams as DisputeListParams, +) +from stripe.params.issuing._dispute_modify_params import ( + DisputeModifyParams as DisputeModifyParams, +) +from stripe.params.issuing._dispute_retrieve_params import ( + DisputeRetrieveParams as DisputeRetrieveParams, +) +from stripe.params.issuing._dispute_settlement_detail_list_params import ( + DisputeSettlementDetailListParams as DisputeSettlementDetailListParams, +) +from stripe.params.issuing._dispute_settlement_detail_retrieve_params import ( + DisputeSettlementDetailRetrieveParams as DisputeSettlementDetailRetrieveParams, +) +from stripe.params.issuing._dispute_submit_params import ( + DisputeSubmitParams as DisputeSubmitParams, +) +from stripe.params.issuing._dispute_update_params import ( + DisputeUpdateParams as DisputeUpdateParams, +) +from stripe.params.issuing._fraud_liability_debit_list_params import ( + FraudLiabilityDebitListParams as FraudLiabilityDebitListParams, +) +from stripe.params.issuing._fraud_liability_debit_retrieve_params import ( + FraudLiabilityDebitRetrieveParams as FraudLiabilityDebitRetrieveParams, +) +from stripe.params.issuing._personalization_design_activate_params import ( + PersonalizationDesignActivateParams as PersonalizationDesignActivateParams, +) +from stripe.params.issuing._personalization_design_create_params import ( + PersonalizationDesignCreateParams as PersonalizationDesignCreateParams, +) +from stripe.params.issuing._personalization_design_deactivate_params import ( + PersonalizationDesignDeactivateParams as PersonalizationDesignDeactivateParams, +) +from stripe.params.issuing._personalization_design_list_params import ( + PersonalizationDesignListParams as PersonalizationDesignListParams, +) +from stripe.params.issuing._personalization_design_modify_params import ( + PersonalizationDesignModifyParams as PersonalizationDesignModifyParams, +) +from stripe.params.issuing._personalization_design_reject_params import ( + PersonalizationDesignRejectParams as PersonalizationDesignRejectParams, +) +from stripe.params.issuing._personalization_design_retrieve_params import ( + PersonalizationDesignRetrieveParams as PersonalizationDesignRetrieveParams, +) +from stripe.params.issuing._personalization_design_update_params import ( + PersonalizationDesignUpdateParams as PersonalizationDesignUpdateParams, +) +from stripe.params.issuing._physical_bundle_list_params import ( + PhysicalBundleListParams as PhysicalBundleListParams, +) +from stripe.params.issuing._physical_bundle_retrieve_params import ( + PhysicalBundleRetrieveParams as PhysicalBundleRetrieveParams, +) +from stripe.params.issuing._token_list_params import ( + TokenListParams as TokenListParams, +) +from stripe.params.issuing._token_modify_params import ( + TokenModifyParams as TokenModifyParams, +) +from stripe.params.issuing._token_retrieve_params import ( + TokenRetrieveParams as TokenRetrieveParams, +) +from stripe.params.issuing._token_update_params import ( + TokenUpdateParams as TokenUpdateParams, +) +from stripe.params.issuing._transaction_create_force_capture_params import ( + TransactionCreateForceCaptureParams as TransactionCreateForceCaptureParams, +) +from stripe.params.issuing._transaction_create_unlinked_refund_params import ( + TransactionCreateUnlinkedRefundParams as TransactionCreateUnlinkedRefundParams, +) +from stripe.params.issuing._transaction_list_params import ( + TransactionListParams as TransactionListParams, +) +from stripe.params.issuing._transaction_modify_params import ( + TransactionModifyParams as TransactionModifyParams, +) +from stripe.params.issuing._transaction_refund_params import ( + TransactionRefundParams as TransactionRefundParams, +) +from stripe.params.issuing._transaction_retrieve_params import ( + TransactionRetrieveParams as TransactionRetrieveParams, +) +from stripe.params.issuing._transaction_update_params import ( + TransactionUpdateParams as TransactionUpdateParams, +) diff --git a/stripe/params/issuing/_authorization_approve_params.py b/stripe/params/issuing/_authorization_approve_params.py new file mode 100644 index 000000000..f21d353f1 --- /dev/null +++ b/stripe/params/issuing/_authorization_approve_params.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import Literal, NotRequired + + +class AuthorizationApproveParams(RequestOptions): + amount: NotRequired[int] + """ + If the authorization's `pending_request.is_amount_controllable` property is `true`, you may provide this value to control how much to hold for the authorization. Must be positive (use [`decline`](https://stripe.com/docs/api/issuing/authorizations/decline) to decline an authorization request). + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ diff --git a/stripe/params/issuing/_authorization_capture_params.py b/stripe/params/issuing/_authorization_capture_params.py new file mode 100644 index 000000000..79049f779 --- /dev/null +++ b/stripe/params/issuing/_authorization_capture_params.py @@ -0,0 +1,273 @@ +# -*- 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, TypedDict + + +class AuthorizationCaptureParams(RequestOptions): + capture_amount: NotRequired[int] + """ + The amount to capture from the authorization. If not provided, the full amount of the authorization will be captured. This amount is in the authorization currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + """ + close_authorization: NotRequired[bool] + """ + Whether to close the authorization after capture. Defaults to true. Set to false to enable multi-capture flows. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + purchase_details: NotRequired["AuthorizationCaptureParamsPurchaseDetails"] + """ + Additional purchase information that is optionally provided by the merchant. + """ + + +class AuthorizationCaptureParamsPurchaseDetails(TypedDict): + fleet: NotRequired["AuthorizationCaptureParamsPurchaseDetailsFleet"] + """ + Fleet-specific information for transactions using Fleet cards. + """ + flight: NotRequired["AuthorizationCaptureParamsPurchaseDetailsFlight"] + """ + Information about the flight that was purchased with this transaction. + """ + fuel: NotRequired["AuthorizationCaptureParamsPurchaseDetailsFuel"] + """ + Information about fuel that was purchased with this transaction. + """ + lodging: NotRequired["AuthorizationCaptureParamsPurchaseDetailsLodging"] + """ + Information about lodging that was purchased with this transaction. + """ + receipt: NotRequired[ + List["AuthorizationCaptureParamsPurchaseDetailsReceipt"] + ] + """ + The line items in the purchase. + """ + reference: NotRequired[str] + """ + A merchant-specific order number. + """ + + +class AuthorizationCaptureParamsPurchaseDetailsFleet(TypedDict): + cardholder_prompt_data: NotRequired[ + "AuthorizationCaptureParamsPurchaseDetailsFleetCardholderPromptData" + ] + """ + Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry. + """ + purchase_type: NotRequired[ + Literal[ + "fuel_and_non_fuel_purchase", "fuel_purchase", "non_fuel_purchase" + ] + ] + """ + The type of purchase. One of `fuel_purchase`, `non_fuel_purchase`, or `fuel_and_non_fuel_purchase`. + """ + reported_breakdown: NotRequired[ + "AuthorizationCaptureParamsPurchaseDetailsFleetReportedBreakdown" + ] + """ + More information about the total amount. This information is not guaranteed to be accurate as some merchants may provide unreliable data. + """ + service_type: NotRequired[ + Literal["full_service", "non_fuel_transaction", "self_service"] + ] + """ + The type of fuel service. One of `non_fuel_transaction`, `full_service`, or `self_service`. + """ + + +class AuthorizationCaptureParamsPurchaseDetailsFleetCardholderPromptData( + TypedDict, +): + driver_id: NotRequired[str] + """ + Driver ID. + """ + odometer: NotRequired[int] + """ + Odometer reading. + """ + unspecified_id: NotRequired[str] + """ + An alphanumeric ID. This field is used when a vehicle ID, driver ID, or generic ID is entered by the cardholder, but the merchant or card network did not specify the prompt type. + """ + user_id: NotRequired[str] + """ + User ID. + """ + vehicle_number: NotRequired[str] + """ + Vehicle number. + """ + + +class AuthorizationCaptureParamsPurchaseDetailsFleetReportedBreakdown( + TypedDict, +): + fuel: NotRequired[ + "AuthorizationCaptureParamsPurchaseDetailsFleetReportedBreakdownFuel" + ] + """ + Breakdown of fuel portion of the purchase. + """ + non_fuel: NotRequired[ + "AuthorizationCaptureParamsPurchaseDetailsFleetReportedBreakdownNonFuel" + ] + """ + Breakdown of non-fuel portion of the purchase. + """ + tax: NotRequired[ + "AuthorizationCaptureParamsPurchaseDetailsFleetReportedBreakdownTax" + ] + """ + Information about tax included in this transaction. + """ + + +class AuthorizationCaptureParamsPurchaseDetailsFleetReportedBreakdownFuel( + TypedDict, +): + gross_amount_decimal: NotRequired[str] + """ + Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive of taxes. + """ + + +class AuthorizationCaptureParamsPurchaseDetailsFleetReportedBreakdownNonFuel( + TypedDict, +): + gross_amount_decimal: NotRequired[str] + """ + Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes. + """ + + +class AuthorizationCaptureParamsPurchaseDetailsFleetReportedBreakdownTax( + TypedDict, +): + local_amount_decimal: NotRequired[str] + """ + Amount of state or provincial Sales Tax included in the transaction amount. Null if not reported by merchant or not subject to tax. + """ + national_amount_decimal: NotRequired[str] + """ + Amount of national Sales Tax or VAT included in the transaction amount. Null if not reported by merchant or not subject to tax. + """ + + +class AuthorizationCaptureParamsPurchaseDetailsFlight(TypedDict): + departure_at: NotRequired[int] + """ + The time that the flight departed. + """ + passenger_name: NotRequired[str] + """ + The name of the passenger. + """ + refundable: NotRequired[bool] + """ + Whether the ticket is refundable. + """ + segments: NotRequired[ + List["AuthorizationCaptureParamsPurchaseDetailsFlightSegment"] + ] + """ + The legs of the trip. + """ + travel_agency: NotRequired[str] + """ + The travel agency that issued the ticket. + """ + + +class AuthorizationCaptureParamsPurchaseDetailsFlightSegment(TypedDict): + arrival_airport_code: NotRequired[str] + """ + The three-letter IATA airport code of the flight's destination. + """ + carrier: NotRequired[str] + """ + The airline carrier code. + """ + departure_airport_code: NotRequired[str] + """ + The three-letter IATA airport code that the flight departed from. + """ + flight_number: NotRequired[str] + """ + The flight number. + """ + service_class: NotRequired[str] + """ + The flight's service class. + """ + stopover_allowed: NotRequired[bool] + """ + Whether a stopover is allowed on this flight. + """ + + +class AuthorizationCaptureParamsPurchaseDetailsFuel(TypedDict): + industry_product_code: NotRequired[str] + """ + [Conexxus Payment System Product Code](https://www.conexxus.org/conexxus-payment-system-product-codes) identifying the primary fuel product purchased. + """ + quantity_decimal: NotRequired[str] + """ + The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places. + """ + type: NotRequired[ + Literal[ + "diesel", + "other", + "unleaded_plus", + "unleaded_regular", + "unleaded_super", + ] + ] + """ + The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`. + """ + unit: NotRequired[ + Literal[ + "charging_minute", + "imperial_gallon", + "kilogram", + "kilowatt_hour", + "liter", + "other", + "pound", + "us_gallon", + ] + ] + """ + The units for `quantity_decimal`. One of `charging_minute`, `imperial_gallon`, `kilogram`, `kilowatt_hour`, `liter`, `pound`, `us_gallon`, or `other`. + """ + unit_cost_decimal: NotRequired[str] + """ + The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places. + """ + + +class AuthorizationCaptureParamsPurchaseDetailsLodging(TypedDict): + check_in_at: NotRequired[int] + """ + The time of checking into the lodging. + """ + nights: NotRequired[int] + """ + The number of nights stayed at the lodging. + """ + + +class AuthorizationCaptureParamsPurchaseDetailsReceipt(TypedDict): + description: NotRequired[str] + quantity: NotRequired[str] + total: NotRequired[int] + unit_cost: NotRequired[int] diff --git a/stripe/params/issuing/_authorization_create_params.py b/stripe/params/issuing/_authorization_create_params.py new file mode 100644 index 000000000..c5831f78c --- /dev/null +++ b/stripe/params/issuing/_authorization_create_params.py @@ -0,0 +1,674 @@ +# -*- 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, TypedDict + + +class AuthorizationCreateParams(RequestOptions): + amount: NotRequired[int] + """ + The total amount to attempt to authorize. This amount is in the provided currency, or defaults to the card's currency, and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + """ + amount_details: NotRequired["AuthorizationCreateParamsAmountDetails"] + """ + Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + """ + authorization_method: NotRequired[ + Literal["chip", "contactless", "keyed_in", "online", "swipe"] + ] + """ + How the card details were provided. Defaults to online. + """ + card: str + """ + Card associated with this authorization. + """ + currency: NotRequired[str] + """ + The currency of the authorization. If not provided, defaults to the currency of the card. 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. + """ + fleet: NotRequired["AuthorizationCreateParamsFleet"] + """ + Fleet-specific information for authorizations using Fleet cards. + """ + fraud_disputability_likelihood: NotRequired[ + Literal["neutral", "unknown", "very_likely", "very_unlikely"] + ] + """ + Probability that this transaction can be disputed in the event of fraud. Assessed by comparing the characteristics of the authorization to card network rules. + """ + fuel: NotRequired["AuthorizationCreateParamsFuel"] + """ + Information about fuel that was purchased with this transaction. + """ + is_amount_controllable: NotRequired[bool] + """ + If set `true`, you may provide [amount](https://stripe.com/docs/api/issuing/authorizations/approve#approve_issuing_authorization-amount) to control how much to hold for the authorization. + """ + merchant_amount: NotRequired[int] + """ + The total amount to attempt to authorize. This amount is in the provided merchant currency, and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + """ + merchant_currency: NotRequired[str] + """ + The currency of the authorization. If not provided, defaults to the currency of the card. 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). + """ + merchant_data: NotRequired["AuthorizationCreateParamsMerchantData"] + """ + Details about the seller (grocery store, e-commerce website, etc.) where the card authorization happened. + """ + network_data: NotRequired["AuthorizationCreateParamsNetworkData"] + """ + Details about the authorization, such as identifiers, set by the card network. + """ + risk_assessment: NotRequired["AuthorizationCreateParamsRiskAssessment"] + """ + Stripe's assessment of the fraud risk for this authorization. + """ + verification_data: NotRequired["AuthorizationCreateParamsVerificationData"] + """ + Verifications that Stripe performed on information that the cardholder provided to the merchant. + """ + wallet: NotRequired[Literal["apple_pay", "google_pay", "samsung_pay"]] + """ + The digital wallet used for this transaction. One of `apple_pay`, `google_pay`, or `samsung_pay`. Will populate as `null` when no digital wallet was utilized. + """ + + +class AuthorizationCreateParamsAmountDetails(TypedDict): + atm_fee: NotRequired[int] + """ + The ATM withdrawal fee. + """ + cashback_amount: NotRequired[int] + """ + The amount of cash requested by the cardholder. + """ + + +class AuthorizationCreateParamsFleet(TypedDict): + cardholder_prompt_data: NotRequired[ + "AuthorizationCreateParamsFleetCardholderPromptData" + ] + """ + Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry. + """ + purchase_type: NotRequired[ + Literal[ + "fuel_and_non_fuel_purchase", "fuel_purchase", "non_fuel_purchase" + ] + ] + """ + The type of purchase. One of `fuel_purchase`, `non_fuel_purchase`, or `fuel_and_non_fuel_purchase`. + """ + reported_breakdown: NotRequired[ + "AuthorizationCreateParamsFleetReportedBreakdown" + ] + """ + More information about the total amount. This information is not guaranteed to be accurate as some merchants may provide unreliable data. + """ + service_type: NotRequired[ + Literal["full_service", "non_fuel_transaction", "self_service"] + ] + """ + The type of fuel service. One of `non_fuel_transaction`, `full_service`, or `self_service`. + """ + + +class AuthorizationCreateParamsFleetCardholderPromptData(TypedDict): + driver_id: NotRequired[str] + """ + Driver ID. + """ + odometer: NotRequired[int] + """ + Odometer reading. + """ + unspecified_id: NotRequired[str] + """ + An alphanumeric ID. This field is used when a vehicle ID, driver ID, or generic ID is entered by the cardholder, but the merchant or card network did not specify the prompt type. + """ + user_id: NotRequired[str] + """ + User ID. + """ + vehicle_number: NotRequired[str] + """ + Vehicle number. + """ + + +class AuthorizationCreateParamsFleetReportedBreakdown(TypedDict): + fuel: NotRequired["AuthorizationCreateParamsFleetReportedBreakdownFuel"] + """ + Breakdown of fuel portion of the purchase. + """ + non_fuel: NotRequired[ + "AuthorizationCreateParamsFleetReportedBreakdownNonFuel" + ] + """ + Breakdown of non-fuel portion of the purchase. + """ + tax: NotRequired["AuthorizationCreateParamsFleetReportedBreakdownTax"] + """ + Information about tax included in this transaction. + """ + + +class AuthorizationCreateParamsFleetReportedBreakdownFuel(TypedDict): + gross_amount_decimal: NotRequired[str] + """ + Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive of taxes. + """ + + +class AuthorizationCreateParamsFleetReportedBreakdownNonFuel(TypedDict): + gross_amount_decimal: NotRequired[str] + """ + Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes. + """ + + +class AuthorizationCreateParamsFleetReportedBreakdownTax(TypedDict): + local_amount_decimal: NotRequired[str] + """ + Amount of state or provincial Sales Tax included in the transaction amount. Null if not reported by merchant or not subject to tax. + """ + national_amount_decimal: NotRequired[str] + """ + Amount of national Sales Tax or VAT included in the transaction amount. Null if not reported by merchant or not subject to tax. + """ + + +class AuthorizationCreateParamsFuel(TypedDict): + industry_product_code: NotRequired[str] + """ + [Conexxus Payment System Product Code](https://www.conexxus.org/conexxus-payment-system-product-codes) identifying the primary fuel product purchased. + """ + quantity_decimal: NotRequired[str] + """ + The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places. + """ + type: NotRequired[ + Literal[ + "diesel", + "other", + "unleaded_plus", + "unleaded_regular", + "unleaded_super", + ] + ] + """ + The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`. + """ + unit: NotRequired[ + Literal[ + "charging_minute", + "imperial_gallon", + "kilogram", + "kilowatt_hour", + "liter", + "other", + "pound", + "us_gallon", + ] + ] + """ + The units for `quantity_decimal`. One of `charging_minute`, `imperial_gallon`, `kilogram`, `kilowatt_hour`, `liter`, `pound`, `us_gallon`, or `other`. + """ + unit_cost_decimal: NotRequired[str] + """ + The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places. + """ + + +class AuthorizationCreateParamsMerchantData(TypedDict): + category: NotRequired[ + Literal[ + "ac_refrigeration_repair", + "accounting_bookkeeping_services", + "advertising_services", + "agricultural_cooperative", + "airlines_air_carriers", + "airports_flying_fields", + "ambulance_services", + "amusement_parks_carnivals", + "antique_reproductions", + "antique_shops", + "aquariums", + "architectural_surveying_services", + "art_dealers_and_galleries", + "artists_supply_and_craft_shops", + "auto_and_home_supply_stores", + "auto_body_repair_shops", + "auto_paint_shops", + "auto_service_shops", + "automated_cash_disburse", + "automated_fuel_dispensers", + "automobile_associations", + "automotive_parts_and_accessories_stores", + "automotive_tire_stores", + "bail_and_bond_payments", + "bakeries", + "bands_orchestras", + "barber_and_beauty_shops", + "betting_casino_gambling", + "bicycle_shops", + "billiard_pool_establishments", + "boat_dealers", + "boat_rentals_and_leases", + "book_stores", + "books_periodicals_and_newspapers", + "bowling_alleys", + "bus_lines", + "business_secretarial_schools", + "buying_shopping_services", + "cable_satellite_and_other_pay_television_and_radio", + "camera_and_photographic_supply_stores", + "candy_nut_and_confectionery_stores", + "car_and_truck_dealers_new_used", + "car_and_truck_dealers_used_only", + "car_rental_agencies", + "car_washes", + "carpentry_services", + "carpet_upholstery_cleaning", + "caterers", + "charitable_and_social_service_organizations_fundraising", + "chemicals_and_allied_products", + "child_care_services", + "childrens_and_infants_wear_stores", + "chiropodists_podiatrists", + "chiropractors", + "cigar_stores_and_stands", + "civic_social_fraternal_associations", + "cleaning_and_maintenance", + "clothing_rental", + "colleges_universities", + "commercial_equipment", + "commercial_footwear", + "commercial_photography_art_and_graphics", + "commuter_transport_and_ferries", + "computer_network_services", + "computer_programming", + "computer_repair", + "computer_software_stores", + "computers_peripherals_and_software", + "concrete_work_services", + "construction_materials", + "consulting_public_relations", + "correspondence_schools", + "cosmetic_stores", + "counseling_services", + "country_clubs", + "courier_services", + "court_costs", + "credit_reporting_agencies", + "cruise_lines", + "dairy_products_stores", + "dance_hall_studios_schools", + "dating_escort_services", + "dentists_orthodontists", + "department_stores", + "detective_agencies", + "digital_goods_applications", + "digital_goods_games", + "digital_goods_large_volume", + "digital_goods_media", + "direct_marketing_catalog_merchant", + "direct_marketing_combination_catalog_and_retail_merchant", + "direct_marketing_inbound_telemarketing", + "direct_marketing_insurance_services", + "direct_marketing_other", + "direct_marketing_outbound_telemarketing", + "direct_marketing_subscription", + "direct_marketing_travel", + "discount_stores", + "doctors", + "door_to_door_sales", + "drapery_window_covering_and_upholstery_stores", + "drinking_places", + "drug_stores_and_pharmacies", + "drugs_drug_proprietaries_and_druggist_sundries", + "dry_cleaners", + "durable_goods", + "duty_free_stores", + "eating_places_restaurants", + "educational_services", + "electric_razor_stores", + "electric_vehicle_charging", + "electrical_parts_and_equipment", + "electrical_services", + "electronics_repair_shops", + "electronics_stores", + "elementary_secondary_schools", + "emergency_services_gcas_visa_use_only", + "employment_temp_agencies", + "equipment_rental", + "exterminating_services", + "family_clothing_stores", + "fast_food_restaurants", + "financial_institutions", + "fines_government_administrative_entities", + "fireplace_fireplace_screens_and_accessories_stores", + "floor_covering_stores", + "florists", + "florists_supplies_nursery_stock_and_flowers", + "freezer_and_locker_meat_provisioners", + "fuel_dealers_non_automotive", + "funeral_services_crematories", + "furniture_home_furnishings_and_equipment_stores_except_appliances", + "furniture_repair_refinishing", + "furriers_and_fur_shops", + "general_services", + "gift_card_novelty_and_souvenir_shops", + "glass_paint_and_wallpaper_stores", + "glassware_crystal_stores", + "golf_courses_public", + "government_licensed_horse_dog_racing_us_region_only", + "government_licensed_online_casions_online_gambling_us_region_only", + "government_owned_lotteries_non_us_region", + "government_owned_lotteries_us_region_only", + "government_services", + "grocery_stores_supermarkets", + "hardware_equipment_and_supplies", + "hardware_stores", + "health_and_beauty_spas", + "hearing_aids_sales_and_supplies", + "heating_plumbing_a_c", + "hobby_toy_and_game_shops", + "home_supply_warehouse_stores", + "hospitals", + "hotels_motels_and_resorts", + "household_appliance_stores", + "industrial_supplies", + "information_retrieval_services", + "insurance_default", + "insurance_underwriting_premiums", + "intra_company_purchases", + "jewelry_stores_watches_clocks_and_silverware_stores", + "landscaping_services", + "laundries", + "laundry_cleaning_services", + "legal_services_attorneys", + "luggage_and_leather_goods_stores", + "lumber_building_materials_stores", + "manual_cash_disburse", + "marinas_service_and_supplies", + "marketplaces", + "masonry_stonework_and_plaster", + "massage_parlors", + "medical_and_dental_labs", + "medical_dental_ophthalmic_and_hospital_equipment_and_supplies", + "medical_services", + "membership_organizations", + "mens_and_boys_clothing_and_accessories_stores", + "mens_womens_clothing_stores", + "metal_service_centers", + "miscellaneous_apparel_and_accessory_shops", + "miscellaneous_auto_dealers", + "miscellaneous_business_services", + "miscellaneous_food_stores", + "miscellaneous_general_merchandise", + "miscellaneous_general_services", + "miscellaneous_home_furnishing_specialty_stores", + "miscellaneous_publishing_and_printing", + "miscellaneous_recreation_services", + "miscellaneous_repair_shops", + "miscellaneous_specialty_retail", + "mobile_home_dealers", + "motion_picture_theaters", + "motor_freight_carriers_and_trucking", + "motor_homes_dealers", + "motor_vehicle_supplies_and_new_parts", + "motorcycle_shops_and_dealers", + "motorcycle_shops_dealers", + "music_stores_musical_instruments_pianos_and_sheet_music", + "news_dealers_and_newsstands", + "non_fi_money_orders", + "non_fi_stored_value_card_purchase_load", + "nondurable_goods", + "nurseries_lawn_and_garden_supply_stores", + "nursing_personal_care", + "office_and_commercial_furniture", + "opticians_eyeglasses", + "optometrists_ophthalmologist", + "orthopedic_goods_prosthetic_devices", + "osteopaths", + "package_stores_beer_wine_and_liquor", + "paints_varnishes_and_supplies", + "parking_lots_garages", + "passenger_railways", + "pawn_shops", + "pet_shops_pet_food_and_supplies", + "petroleum_and_petroleum_products", + "photo_developing", + "photographic_photocopy_microfilm_equipment_and_supplies", + "photographic_studios", + "picture_video_production", + "piece_goods_notions_and_other_dry_goods", + "plumbing_heating_equipment_and_supplies", + "political_organizations", + "postal_services_government_only", + "precious_stones_and_metals_watches_and_jewelry", + "professional_services", + "public_warehousing_and_storage", + "quick_copy_repro_and_blueprint", + "railroads", + "real_estate_agents_and_managers_rentals", + "record_stores", + "recreational_vehicle_rentals", + "religious_goods_stores", + "religious_organizations", + "roofing_siding_sheet_metal", + "secretarial_support_services", + "security_brokers_dealers", + "service_stations", + "sewing_needlework_fabric_and_piece_goods_stores", + "shoe_repair_hat_cleaning", + "shoe_stores", + "small_appliance_repair", + "snowmobile_dealers", + "special_trade_services", + "specialty_cleaning", + "sporting_goods_stores", + "sporting_recreation_camps", + "sports_and_riding_apparel_stores", + "sports_clubs_fields", + "stamp_and_coin_stores", + "stationary_office_supplies_printing_and_writing_paper", + "stationery_stores_office_and_school_supply_stores", + "swimming_pools_sales", + "t_ui_travel_germany", + "tailors_alterations", + "tax_payments_government_agencies", + "tax_preparation_services", + "taxicabs_limousines", + "telecommunication_equipment_and_telephone_sales", + "telecommunication_services", + "telegraph_services", + "tent_and_awning_shops", + "testing_laboratories", + "theatrical_ticket_agencies", + "timeshares", + "tire_retreading_and_repair", + "tolls_bridge_fees", + "tourist_attractions_and_exhibits", + "towing_services", + "trailer_parks_campgrounds", + "transportation_services", + "travel_agencies_tour_operators", + "truck_stop_iteration", + "truck_utility_trailer_rentals", + "typesetting_plate_making_and_related_services", + "typewriter_stores", + "u_s_federal_government_agencies_or_departments", + "uniforms_commercial_clothing", + "used_merchandise_and_secondhand_stores", + "utilities", + "variety_stores", + "veterinary_services", + "video_amusement_game_supplies", + "video_game_arcades", + "video_tape_rental_stores", + "vocational_trade_schools", + "watch_jewelry_repair", + "welding_repair", + "wholesale_clubs", + "wig_and_toupee_stores", + "wires_money_orders", + "womens_accessory_and_specialty_shops", + "womens_ready_to_wear_stores", + "wrecking_and_salvage_yards", + ] + ] + """ + A categorization of the seller's type of business. See our [merchant categories guide](https://stripe.com/docs/issuing/merchant-categories) for a list of possible values. + """ + city: NotRequired[str] + """ + City where the seller is located + """ + country: NotRequired[str] + """ + Country where the seller is located + """ + name: NotRequired[str] + """ + Name of the seller + """ + network_id: NotRequired[str] + """ + Identifier assigned to the seller by the card network. Different card networks may assign different network_id fields to the same merchant. + """ + postal_code: NotRequired[str] + """ + Postal code where the seller is located + """ + state: NotRequired[str] + """ + State where the seller is located + """ + terminal_id: NotRequired[str] + """ + An ID assigned by the seller to the location of the sale. + """ + url: NotRequired[str] + """ + URL provided by the merchant on a 3DS request + """ + + +class AuthorizationCreateParamsNetworkData(TypedDict): + acquiring_institution_id: NotRequired[str] + """ + Identifier assigned to the acquirer by the card network. + """ + + +class AuthorizationCreateParamsRiskAssessment(TypedDict): + card_testing_risk: NotRequired[ + "AuthorizationCreateParamsRiskAssessmentCardTestingRisk" + ] + """ + Stripe's assessment of this authorization's likelihood of being card testing activity. + """ + merchant_dispute_risk: NotRequired[ + "AuthorizationCreateParamsRiskAssessmentMerchantDisputeRisk" + ] + """ + The dispute risk of the merchant (the seller on a purchase) on an authorization based on all Stripe Issuing activity. + """ + + +class AuthorizationCreateParamsRiskAssessmentCardTestingRisk(TypedDict): + invalid_account_number_decline_rate_past_hour: NotRequired[int] + """ + The % of declines due to a card number not existing in the past hour, taking place at the same merchant. Higher rates correspond to a greater probability of card testing activity, meaning bad actors may be attempting different card number combinations to guess a correct one. Takes on values between 0 and 100. + """ + invalid_credentials_decline_rate_past_hour: NotRequired[int] + """ + The % of declines due to incorrect verification data (like CVV or expiry) in the past hour, taking place at the same merchant. Higher rates correspond to a greater probability of bad actors attempting to utilize valid card credentials at merchants with verification requirements. Takes on values between 0 and 100. + """ + risk_level: Literal[ + "elevated", "highest", "low", "normal", "not_assessed", "unknown" + ] + """ + The likelihood that this authorization is associated with card testing activity. This is assessed by evaluating decline activity over the last hour. + """ + + +class AuthorizationCreateParamsRiskAssessmentMerchantDisputeRisk(TypedDict): + dispute_rate: NotRequired[int] + """ + The dispute rate observed across all Stripe Issuing authorizations for this merchant. For example, a value of 50 means 50% of authorizations from this merchant on Stripe Issuing have resulted in a dispute. Higher values mean a higher likelihood the authorization is disputed. Takes on values between 0 and 100. + """ + risk_level: Literal[ + "elevated", "highest", "low", "normal", "not_assessed", "unknown" + ] + """ + The likelihood that authorizations from this merchant will result in a dispute based on their history on Stripe Issuing. + """ + + +class AuthorizationCreateParamsVerificationData(TypedDict): + address_line1_check: NotRequired[ + Literal["match", "mismatch", "not_provided"] + ] + """ + Whether the cardholder provided an address first line and if it matched the cardholder's `billing.address.line1`. + """ + address_postal_code_check: NotRequired[ + Literal["match", "mismatch", "not_provided"] + ] + """ + Whether the cardholder provided a postal code and if it matched the cardholder's `billing.address.postal_code`. + """ + authentication_exemption: NotRequired[ + "AuthorizationCreateParamsVerificationDataAuthenticationExemption" + ] + """ + The exemption applied to this authorization. + """ + cvc_check: NotRequired[Literal["match", "mismatch", "not_provided"]] + """ + Whether the cardholder provided a CVC and if it matched Stripe's record. + """ + expiry_check: NotRequired[Literal["match", "mismatch", "not_provided"]] + """ + Whether the cardholder provided an expiry date and if it matched Stripe's record. + """ + three_d_secure: NotRequired[ + "AuthorizationCreateParamsVerificationDataThreeDSecure" + ] + """ + 3D Secure details. + """ + + +class AuthorizationCreateParamsVerificationDataAuthenticationExemption( + TypedDict, +): + claimed_by: Literal["acquirer", "issuer"] + """ + The entity that requested the exemption, either the acquiring merchant or the Issuing user. + """ + type: Literal[ + "low_value_transaction", "transaction_risk_analysis", "unknown" + ] + """ + The specific exemption claimed for this authorization. + """ + + +class AuthorizationCreateParamsVerificationDataThreeDSecure(TypedDict): + result: Literal[ + "attempt_acknowledged", "authenticated", "failed", "required" + ] + """ + The outcome of the 3D Secure authentication request. + """ diff --git a/stripe/params/issuing/_authorization_decline_params.py b/stripe/params/issuing/_authorization_decline_params.py new file mode 100644 index 000000000..d746a8a1c --- /dev/null +++ b/stripe/params/issuing/_authorization_decline_params.py @@ -0,0 +1,16 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import Literal, NotRequired + + +class AuthorizationDeclineParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ diff --git a/stripe/params/issuing/_authorization_expire_params.py b/stripe/params/issuing/_authorization_expire_params.py new file mode 100644 index 000000000..46a5aa04c --- /dev/null +++ b/stripe/params/issuing/_authorization_expire_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 AuthorizationExpireParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/issuing/_authorization_finalize_amount_params.py b/stripe/params/issuing/_authorization_finalize_amount_params.py new file mode 100644 index 000000000..a15604fa9 --- /dev/null +++ b/stripe/params/issuing/_authorization_finalize_amount_params.py @@ -0,0 +1,166 @@ +# -*- 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, TypedDict + + +class AuthorizationFinalizeAmountParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + final_amount: int + """ + The final authorization amount that will be captured by the merchant. This amount is in the authorization currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + """ + fleet: NotRequired["AuthorizationFinalizeAmountParamsFleet"] + """ + Fleet-specific information for authorizations using Fleet cards. + """ + fuel: NotRequired["AuthorizationFinalizeAmountParamsFuel"] + """ + Information about fuel that was purchased with this transaction. + """ + + +class AuthorizationFinalizeAmountParamsFleet(TypedDict): + cardholder_prompt_data: NotRequired[ + "AuthorizationFinalizeAmountParamsFleetCardholderPromptData" + ] + """ + Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry. + """ + purchase_type: NotRequired[ + Literal[ + "fuel_and_non_fuel_purchase", "fuel_purchase", "non_fuel_purchase" + ] + ] + """ + The type of purchase. One of `fuel_purchase`, `non_fuel_purchase`, or `fuel_and_non_fuel_purchase`. + """ + reported_breakdown: NotRequired[ + "AuthorizationFinalizeAmountParamsFleetReportedBreakdown" + ] + """ + More information about the total amount. This information is not guaranteed to be accurate as some merchants may provide unreliable data. + """ + service_type: NotRequired[ + Literal["full_service", "non_fuel_transaction", "self_service"] + ] + """ + The type of fuel service. One of `non_fuel_transaction`, `full_service`, or `self_service`. + """ + + +class AuthorizationFinalizeAmountParamsFleetCardholderPromptData(TypedDict): + driver_id: NotRequired[str] + """ + Driver ID. + """ + odometer: NotRequired[int] + """ + Odometer reading. + """ + unspecified_id: NotRequired[str] + """ + An alphanumeric ID. This field is used when a vehicle ID, driver ID, or generic ID is entered by the cardholder, but the merchant or card network did not specify the prompt type. + """ + user_id: NotRequired[str] + """ + User ID. + """ + vehicle_number: NotRequired[str] + """ + Vehicle number. + """ + + +class AuthorizationFinalizeAmountParamsFleetReportedBreakdown(TypedDict): + fuel: NotRequired[ + "AuthorizationFinalizeAmountParamsFleetReportedBreakdownFuel" + ] + """ + Breakdown of fuel portion of the purchase. + """ + non_fuel: NotRequired[ + "AuthorizationFinalizeAmountParamsFleetReportedBreakdownNonFuel" + ] + """ + Breakdown of non-fuel portion of the purchase. + """ + tax: NotRequired[ + "AuthorizationFinalizeAmountParamsFleetReportedBreakdownTax" + ] + """ + Information about tax included in this transaction. + """ + + +class AuthorizationFinalizeAmountParamsFleetReportedBreakdownFuel(TypedDict): + gross_amount_decimal: NotRequired[str] + """ + Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive of taxes. + """ + + +class AuthorizationFinalizeAmountParamsFleetReportedBreakdownNonFuel( + TypedDict +): + gross_amount_decimal: NotRequired[str] + """ + Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes. + """ + + +class AuthorizationFinalizeAmountParamsFleetReportedBreakdownTax(TypedDict): + local_amount_decimal: NotRequired[str] + """ + Amount of state or provincial Sales Tax included in the transaction amount. Null if not reported by merchant or not subject to tax. + """ + national_amount_decimal: NotRequired[str] + """ + Amount of national Sales Tax or VAT included in the transaction amount. Null if not reported by merchant or not subject to tax. + """ + + +class AuthorizationFinalizeAmountParamsFuel(TypedDict): + industry_product_code: NotRequired[str] + """ + [Conexxus Payment System Product Code](https://www.conexxus.org/conexxus-payment-system-product-codes) identifying the primary fuel product purchased. + """ + quantity_decimal: NotRequired[str] + """ + The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places. + """ + type: NotRequired[ + Literal[ + "diesel", + "other", + "unleaded_plus", + "unleaded_regular", + "unleaded_super", + ] + ] + """ + The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`. + """ + unit: NotRequired[ + Literal[ + "charging_minute", + "imperial_gallon", + "kilogram", + "kilowatt_hour", + "liter", + "other", + "pound", + "us_gallon", + ] + ] + """ + The units for `quantity_decimal`. One of `charging_minute`, `imperial_gallon`, `kilogram`, `kilowatt_hour`, `liter`, `pound`, `us_gallon`, or `other`. + """ + unit_cost_decimal: NotRequired[str] + """ + The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places. + """ diff --git a/stripe/params/issuing/_authorization_increment_params.py b/stripe/params/issuing/_authorization_increment_params.py new file mode 100644 index 000000000..30fe7ede7 --- /dev/null +++ b/stripe/params/issuing/_authorization_increment_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 AuthorizationIncrementParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + increment_amount: int + """ + The amount to increment the authorization by. This amount is in the authorization currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + """ + is_amount_controllable: NotRequired[bool] + """ + If set `true`, you may provide [amount](https://stripe.com/docs/api/issuing/authorizations/approve#approve_issuing_authorization-amount) to control how much to hold for the authorization. + """ diff --git a/stripe/params/issuing/_authorization_list_params.py b/stripe/params/issuing/_authorization_list_params.py new file mode 100644 index 000000000..ccea33632 --- /dev/null +++ b/stripe/params/issuing/_authorization_list_params.py @@ -0,0 +1,59 @@ +# -*- 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, TypedDict + + +class AuthorizationListParams(RequestOptions): + card: NotRequired[str] + """ + Only return authorizations that belong to the given card. + """ + cardholder: NotRequired[str] + """ + Only return authorizations that belong to the given cardholder. + """ + created: NotRequired["AuthorizationListParamsCreated|int"] + """ + Only return authorizations that were created during the given date interval. + """ + 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. + """ + status: NotRequired[Literal["closed", "expired", "pending", "reversed"]] + """ + Only return authorizations with the given status. One of `pending`, `closed`, or `reversed`. + """ + + +class AuthorizationListParamsCreated(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/issuing/_authorization_modify_params.py b/stripe/params/issuing/_authorization_modify_params.py new file mode 100644 index 000000000..af0629823 --- /dev/null +++ b/stripe/params/issuing/_authorization_modify_params.py @@ -0,0 +1,16 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import Literal, NotRequired + + +class AuthorizationModifyParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ diff --git a/stripe/params/issuing/_authorization_respond_params.py b/stripe/params/issuing/_authorization_respond_params.py new file mode 100644 index 000000000..885fdda9f --- /dev/null +++ b/stripe/params/issuing/_authorization_respond_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 AuthorizationRespondParams(RequestOptions): + confirmed: bool + """ + Whether to simulate the user confirming that the transaction was legitimate (true) or telling Stripe that it was fraudulent (false). + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/issuing/_authorization_retrieve_params.py b/stripe/params/issuing/_authorization_retrieve_params.py new file mode 100644 index 000000000..58e557b8e --- /dev/null +++ b/stripe/params/issuing/_authorization_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 AuthorizationRetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/issuing/_authorization_reverse_params.py b/stripe/params/issuing/_authorization_reverse_params.py new file mode 100644 index 000000000..5788d84fd --- /dev/null +++ b/stripe/params/issuing/_authorization_reverse_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 AuthorizationReverseParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + reverse_amount: NotRequired[int] + """ + The amount to reverse from the authorization. If not provided, the full amount of the authorization will be reversed. This amount is in the authorization currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + """ diff --git a/stripe/params/issuing/_authorization_update_params.py b/stripe/params/issuing/_authorization_update_params.py new file mode 100644 index 000000000..6734372bf --- /dev/null +++ b/stripe/params/issuing/_authorization_update_params.py @@ -0,0 +1,15 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class AuthorizationUpdateParams(TypedDict): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ diff --git a/stripe/params/issuing/_card_create_params.py b/stripe/params/issuing/_card_create_params.py new file mode 100644 index 000000000..6b5059c9a --- /dev/null +++ b/stripe/params/issuing/_card_create_params.py @@ -0,0 +1,1103 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class CardCreateParams(RequestOptions): + cardholder: NotRequired[str] + """ + The [Cardholder](https://stripe.com/docs/api#issuing_cardholder_object) object with which the card will be associated. + """ + currency: str + """ + The currency for the card. + """ + exp_month: NotRequired[int] + """ + The desired expiration month (1-12) for this card if [specifying a custom expiration date](https://docs.stripe.com/issuing/cards/virtual/issue-cards?testing-method=with-code#exp-dates). + """ + exp_year: NotRequired[int] + """ + The desired 4-digit expiration year for this card if [specifying a custom expiration date](https://docs.stripe.com/issuing/cards/virtual/issue-cards?testing-method=with-code#exp-dates). + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + financial_account: NotRequired[str] + """ + The new financial account ID the card will be associated with. This field allows a card to be reassigned to a different financial account. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + personalization_design: NotRequired[str] + """ + The personalization design object belonging to this card. + """ + pin: NotRequired["CardCreateParamsPin"] + """ + The desired PIN for this card. + """ + replacement_for: NotRequired[str] + """ + The card this is meant to be a replacement for (if any). + """ + replacement_reason: NotRequired[ + Literal["damaged", "expired", "lost", "stolen"] + ] + """ + If `replacement_for` is specified, this should indicate why that card is being replaced. + """ + second_line: NotRequired["Literal['']|str"] + """ + The second line to print on the card. Max length: 24 characters. + """ + shipping: NotRequired["CardCreateParamsShipping"] + """ + The address where the card will be shipped. + """ + spending_controls: NotRequired["CardCreateParamsSpendingControls"] + """ + Rules that control spending for this card. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details. + """ + status: NotRequired[Literal["active", "inactive"]] + """ + Whether authorizations can be approved on this card. May be blocked from activating cards depending on past-due Cardholder requirements. Defaults to `inactive`. + """ + type: Literal["physical", "virtual"] + """ + The type of card to issue. Possible values are `physical` or `virtual`. + """ + + +class CardCreateParamsPin(TypedDict): + encrypted_number: NotRequired[str] + """ + The card's desired new PIN, encrypted under Stripe's public key. + """ + + +class CardCreateParamsShipping(TypedDict): + address: "CardCreateParamsShippingAddress" + """ + The address that the card is shipped to. + """ + address_validation: NotRequired[ + "CardCreateParamsShippingAddressValidation" + ] + """ + Address validation settings. + """ + customs: NotRequired["CardCreateParamsShippingCustoms"] + """ + Customs information for the shipment. + """ + name: str + """ + The name printed on the shipping label when shipping the card. + """ + phone_number: NotRequired[str] + """ + Phone number of the recipient of the shipment. + """ + require_signature: NotRequired[bool] + """ + Whether a signature is required for card delivery. + """ + service: NotRequired[Literal["express", "priority", "standard"]] + """ + Shipment service. + """ + type: NotRequired[Literal["bulk", "individual"]] + """ + Packaging options. + """ + + +class CardCreateParamsShippingAddress(TypedDict): + city: 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: 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: str + """ + ZIP or postal code. + """ + state: NotRequired[str] + """ + State, county, province, or region. + """ + + +class CardCreateParamsShippingAddressValidation(TypedDict): + mode: Literal[ + "disabled", "normalization_only", "validation_and_normalization" + ] + """ + The address validation capabilities to use. + """ + + +class CardCreateParamsShippingCustoms(TypedDict): + eori_number: NotRequired[str] + """ + The Economic Operators Registration and Identification (EORI) number to use for Customs. Required for bulk shipments to Europe. + """ + + +class CardCreateParamsSpendingControls(TypedDict): + allowed_categories: NotRequired[ + List[ + Literal[ + "ac_refrigeration_repair", + "accounting_bookkeeping_services", + "advertising_services", + "agricultural_cooperative", + "airlines_air_carriers", + "airports_flying_fields", + "ambulance_services", + "amusement_parks_carnivals", + "antique_reproductions", + "antique_shops", + "aquariums", + "architectural_surveying_services", + "art_dealers_and_galleries", + "artists_supply_and_craft_shops", + "auto_and_home_supply_stores", + "auto_body_repair_shops", + "auto_paint_shops", + "auto_service_shops", + "automated_cash_disburse", + "automated_fuel_dispensers", + "automobile_associations", + "automotive_parts_and_accessories_stores", + "automotive_tire_stores", + "bail_and_bond_payments", + "bakeries", + "bands_orchestras", + "barber_and_beauty_shops", + "betting_casino_gambling", + "bicycle_shops", + "billiard_pool_establishments", + "boat_dealers", + "boat_rentals_and_leases", + "book_stores", + "books_periodicals_and_newspapers", + "bowling_alleys", + "bus_lines", + "business_secretarial_schools", + "buying_shopping_services", + "cable_satellite_and_other_pay_television_and_radio", + "camera_and_photographic_supply_stores", + "candy_nut_and_confectionery_stores", + "car_and_truck_dealers_new_used", + "car_and_truck_dealers_used_only", + "car_rental_agencies", + "car_washes", + "carpentry_services", + "carpet_upholstery_cleaning", + "caterers", + "charitable_and_social_service_organizations_fundraising", + "chemicals_and_allied_products", + "child_care_services", + "childrens_and_infants_wear_stores", + "chiropodists_podiatrists", + "chiropractors", + "cigar_stores_and_stands", + "civic_social_fraternal_associations", + "cleaning_and_maintenance", + "clothing_rental", + "colleges_universities", + "commercial_equipment", + "commercial_footwear", + "commercial_photography_art_and_graphics", + "commuter_transport_and_ferries", + "computer_network_services", + "computer_programming", + "computer_repair", + "computer_software_stores", + "computers_peripherals_and_software", + "concrete_work_services", + "construction_materials", + "consulting_public_relations", + "correspondence_schools", + "cosmetic_stores", + "counseling_services", + "country_clubs", + "courier_services", + "court_costs", + "credit_reporting_agencies", + "cruise_lines", + "dairy_products_stores", + "dance_hall_studios_schools", + "dating_escort_services", + "dentists_orthodontists", + "department_stores", + "detective_agencies", + "digital_goods_applications", + "digital_goods_games", + "digital_goods_large_volume", + "digital_goods_media", + "direct_marketing_catalog_merchant", + "direct_marketing_combination_catalog_and_retail_merchant", + "direct_marketing_inbound_telemarketing", + "direct_marketing_insurance_services", + "direct_marketing_other", + "direct_marketing_outbound_telemarketing", + "direct_marketing_subscription", + "direct_marketing_travel", + "discount_stores", + "doctors", + "door_to_door_sales", + "drapery_window_covering_and_upholstery_stores", + "drinking_places", + "drug_stores_and_pharmacies", + "drugs_drug_proprietaries_and_druggist_sundries", + "dry_cleaners", + "durable_goods", + "duty_free_stores", + "eating_places_restaurants", + "educational_services", + "electric_razor_stores", + "electric_vehicle_charging", + "electrical_parts_and_equipment", + "electrical_services", + "electronics_repair_shops", + "electronics_stores", + "elementary_secondary_schools", + "emergency_services_gcas_visa_use_only", + "employment_temp_agencies", + "equipment_rental", + "exterminating_services", + "family_clothing_stores", + "fast_food_restaurants", + "financial_institutions", + "fines_government_administrative_entities", + "fireplace_fireplace_screens_and_accessories_stores", + "floor_covering_stores", + "florists", + "florists_supplies_nursery_stock_and_flowers", + "freezer_and_locker_meat_provisioners", + "fuel_dealers_non_automotive", + "funeral_services_crematories", + "furniture_home_furnishings_and_equipment_stores_except_appliances", + "furniture_repair_refinishing", + "furriers_and_fur_shops", + "general_services", + "gift_card_novelty_and_souvenir_shops", + "glass_paint_and_wallpaper_stores", + "glassware_crystal_stores", + "golf_courses_public", + "government_licensed_horse_dog_racing_us_region_only", + "government_licensed_online_casions_online_gambling_us_region_only", + "government_owned_lotteries_non_us_region", + "government_owned_lotteries_us_region_only", + "government_services", + "grocery_stores_supermarkets", + "hardware_equipment_and_supplies", + "hardware_stores", + "health_and_beauty_spas", + "hearing_aids_sales_and_supplies", + "heating_plumbing_a_c", + "hobby_toy_and_game_shops", + "home_supply_warehouse_stores", + "hospitals", + "hotels_motels_and_resorts", + "household_appliance_stores", + "industrial_supplies", + "information_retrieval_services", + "insurance_default", + "insurance_underwriting_premiums", + "intra_company_purchases", + "jewelry_stores_watches_clocks_and_silverware_stores", + "landscaping_services", + "laundries", + "laundry_cleaning_services", + "legal_services_attorneys", + "luggage_and_leather_goods_stores", + "lumber_building_materials_stores", + "manual_cash_disburse", + "marinas_service_and_supplies", + "marketplaces", + "masonry_stonework_and_plaster", + "massage_parlors", + "medical_and_dental_labs", + "medical_dental_ophthalmic_and_hospital_equipment_and_supplies", + "medical_services", + "membership_organizations", + "mens_and_boys_clothing_and_accessories_stores", + "mens_womens_clothing_stores", + "metal_service_centers", + "miscellaneous", + "miscellaneous_apparel_and_accessory_shops", + "miscellaneous_auto_dealers", + "miscellaneous_business_services", + "miscellaneous_food_stores", + "miscellaneous_general_merchandise", + "miscellaneous_general_services", + "miscellaneous_home_furnishing_specialty_stores", + "miscellaneous_publishing_and_printing", + "miscellaneous_recreation_services", + "miscellaneous_repair_shops", + "miscellaneous_specialty_retail", + "mobile_home_dealers", + "motion_picture_theaters", + "motor_freight_carriers_and_trucking", + "motor_homes_dealers", + "motor_vehicle_supplies_and_new_parts", + "motorcycle_shops_and_dealers", + "motorcycle_shops_dealers", + "music_stores_musical_instruments_pianos_and_sheet_music", + "news_dealers_and_newsstands", + "non_fi_money_orders", + "non_fi_stored_value_card_purchase_load", + "nondurable_goods", + "nurseries_lawn_and_garden_supply_stores", + "nursing_personal_care", + "office_and_commercial_furniture", + "opticians_eyeglasses", + "optometrists_ophthalmologist", + "orthopedic_goods_prosthetic_devices", + "osteopaths", + "package_stores_beer_wine_and_liquor", + "paints_varnishes_and_supplies", + "parking_lots_garages", + "passenger_railways", + "pawn_shops", + "pet_shops_pet_food_and_supplies", + "petroleum_and_petroleum_products", + "photo_developing", + "photographic_photocopy_microfilm_equipment_and_supplies", + "photographic_studios", + "picture_video_production", + "piece_goods_notions_and_other_dry_goods", + "plumbing_heating_equipment_and_supplies", + "political_organizations", + "postal_services_government_only", + "precious_stones_and_metals_watches_and_jewelry", + "professional_services", + "public_warehousing_and_storage", + "quick_copy_repro_and_blueprint", + "railroads", + "real_estate_agents_and_managers_rentals", + "record_stores", + "recreational_vehicle_rentals", + "religious_goods_stores", + "religious_organizations", + "roofing_siding_sheet_metal", + "secretarial_support_services", + "security_brokers_dealers", + "service_stations", + "sewing_needlework_fabric_and_piece_goods_stores", + "shoe_repair_hat_cleaning", + "shoe_stores", + "small_appliance_repair", + "snowmobile_dealers", + "special_trade_services", + "specialty_cleaning", + "sporting_goods_stores", + "sporting_recreation_camps", + "sports_and_riding_apparel_stores", + "sports_clubs_fields", + "stamp_and_coin_stores", + "stationary_office_supplies_printing_and_writing_paper", + "stationery_stores_office_and_school_supply_stores", + "swimming_pools_sales", + "t_ui_travel_germany", + "tailors_alterations", + "tax_payments_government_agencies", + "tax_preparation_services", + "taxicabs_limousines", + "telecommunication_equipment_and_telephone_sales", + "telecommunication_services", + "telegraph_services", + "tent_and_awning_shops", + "testing_laboratories", + "theatrical_ticket_agencies", + "timeshares", + "tire_retreading_and_repair", + "tolls_bridge_fees", + "tourist_attractions_and_exhibits", + "towing_services", + "trailer_parks_campgrounds", + "transportation_services", + "travel_agencies_tour_operators", + "truck_stop_iteration", + "truck_utility_trailer_rentals", + "typesetting_plate_making_and_related_services", + "typewriter_stores", + "u_s_federal_government_agencies_or_departments", + "uniforms_commercial_clothing", + "used_merchandise_and_secondhand_stores", + "utilities", + "variety_stores", + "veterinary_services", + "video_amusement_game_supplies", + "video_game_arcades", + "video_tape_rental_stores", + "vocational_trade_schools", + "watch_jewelry_repair", + "welding_repair", + "wholesale_clubs", + "wig_and_toupee_stores", + "wires_money_orders", + "womens_accessory_and_specialty_shops", + "womens_ready_to_wear_stores", + "wrecking_and_salvage_yards", + ] + ] + ] + """ + Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to allow. All other categories will be blocked. Cannot be set with `blocked_categories`. + """ + allowed_merchant_countries: NotRequired[List[str]] + """ + Array of strings containing representing countries from which authorizations will be allowed. Authorizations from merchants in all other countries will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `blocked_merchant_countries`. Provide an empty value to unset this control. + """ + blocked_categories: NotRequired[ + List[ + Literal[ + "ac_refrigeration_repair", + "accounting_bookkeeping_services", + "advertising_services", + "agricultural_cooperative", + "airlines_air_carriers", + "airports_flying_fields", + "ambulance_services", + "amusement_parks_carnivals", + "antique_reproductions", + "antique_shops", + "aquariums", + "architectural_surveying_services", + "art_dealers_and_galleries", + "artists_supply_and_craft_shops", + "auto_and_home_supply_stores", + "auto_body_repair_shops", + "auto_paint_shops", + "auto_service_shops", + "automated_cash_disburse", + "automated_fuel_dispensers", + "automobile_associations", + "automotive_parts_and_accessories_stores", + "automotive_tire_stores", + "bail_and_bond_payments", + "bakeries", + "bands_orchestras", + "barber_and_beauty_shops", + "betting_casino_gambling", + "bicycle_shops", + "billiard_pool_establishments", + "boat_dealers", + "boat_rentals_and_leases", + "book_stores", + "books_periodicals_and_newspapers", + "bowling_alleys", + "bus_lines", + "business_secretarial_schools", + "buying_shopping_services", + "cable_satellite_and_other_pay_television_and_radio", + "camera_and_photographic_supply_stores", + "candy_nut_and_confectionery_stores", + "car_and_truck_dealers_new_used", + "car_and_truck_dealers_used_only", + "car_rental_agencies", + "car_washes", + "carpentry_services", + "carpet_upholstery_cleaning", + "caterers", + "charitable_and_social_service_organizations_fundraising", + "chemicals_and_allied_products", + "child_care_services", + "childrens_and_infants_wear_stores", + "chiropodists_podiatrists", + "chiropractors", + "cigar_stores_and_stands", + "civic_social_fraternal_associations", + "cleaning_and_maintenance", + "clothing_rental", + "colleges_universities", + "commercial_equipment", + "commercial_footwear", + "commercial_photography_art_and_graphics", + "commuter_transport_and_ferries", + "computer_network_services", + "computer_programming", + "computer_repair", + "computer_software_stores", + "computers_peripherals_and_software", + "concrete_work_services", + "construction_materials", + "consulting_public_relations", + "correspondence_schools", + "cosmetic_stores", + "counseling_services", + "country_clubs", + "courier_services", + "court_costs", + "credit_reporting_agencies", + "cruise_lines", + "dairy_products_stores", + "dance_hall_studios_schools", + "dating_escort_services", + "dentists_orthodontists", + "department_stores", + "detective_agencies", + "digital_goods_applications", + "digital_goods_games", + "digital_goods_large_volume", + "digital_goods_media", + "direct_marketing_catalog_merchant", + "direct_marketing_combination_catalog_and_retail_merchant", + "direct_marketing_inbound_telemarketing", + "direct_marketing_insurance_services", + "direct_marketing_other", + "direct_marketing_outbound_telemarketing", + "direct_marketing_subscription", + "direct_marketing_travel", + "discount_stores", + "doctors", + "door_to_door_sales", + "drapery_window_covering_and_upholstery_stores", + "drinking_places", + "drug_stores_and_pharmacies", + "drugs_drug_proprietaries_and_druggist_sundries", + "dry_cleaners", + "durable_goods", + "duty_free_stores", + "eating_places_restaurants", + "educational_services", + "electric_razor_stores", + "electric_vehicle_charging", + "electrical_parts_and_equipment", + "electrical_services", + "electronics_repair_shops", + "electronics_stores", + "elementary_secondary_schools", + "emergency_services_gcas_visa_use_only", + "employment_temp_agencies", + "equipment_rental", + "exterminating_services", + "family_clothing_stores", + "fast_food_restaurants", + "financial_institutions", + "fines_government_administrative_entities", + "fireplace_fireplace_screens_and_accessories_stores", + "floor_covering_stores", + "florists", + "florists_supplies_nursery_stock_and_flowers", + "freezer_and_locker_meat_provisioners", + "fuel_dealers_non_automotive", + "funeral_services_crematories", + "furniture_home_furnishings_and_equipment_stores_except_appliances", + "furniture_repair_refinishing", + "furriers_and_fur_shops", + "general_services", + "gift_card_novelty_and_souvenir_shops", + "glass_paint_and_wallpaper_stores", + "glassware_crystal_stores", + "golf_courses_public", + "government_licensed_horse_dog_racing_us_region_only", + "government_licensed_online_casions_online_gambling_us_region_only", + "government_owned_lotteries_non_us_region", + "government_owned_lotteries_us_region_only", + "government_services", + "grocery_stores_supermarkets", + "hardware_equipment_and_supplies", + "hardware_stores", + "health_and_beauty_spas", + "hearing_aids_sales_and_supplies", + "heating_plumbing_a_c", + "hobby_toy_and_game_shops", + "home_supply_warehouse_stores", + "hospitals", + "hotels_motels_and_resorts", + "household_appliance_stores", + "industrial_supplies", + "information_retrieval_services", + "insurance_default", + "insurance_underwriting_premiums", + "intra_company_purchases", + "jewelry_stores_watches_clocks_and_silverware_stores", + "landscaping_services", + "laundries", + "laundry_cleaning_services", + "legal_services_attorneys", + "luggage_and_leather_goods_stores", + "lumber_building_materials_stores", + "manual_cash_disburse", + "marinas_service_and_supplies", + "marketplaces", + "masonry_stonework_and_plaster", + "massage_parlors", + "medical_and_dental_labs", + "medical_dental_ophthalmic_and_hospital_equipment_and_supplies", + "medical_services", + "membership_organizations", + "mens_and_boys_clothing_and_accessories_stores", + "mens_womens_clothing_stores", + "metal_service_centers", + "miscellaneous", + "miscellaneous_apparel_and_accessory_shops", + "miscellaneous_auto_dealers", + "miscellaneous_business_services", + "miscellaneous_food_stores", + "miscellaneous_general_merchandise", + "miscellaneous_general_services", + "miscellaneous_home_furnishing_specialty_stores", + "miscellaneous_publishing_and_printing", + "miscellaneous_recreation_services", + "miscellaneous_repair_shops", + "miscellaneous_specialty_retail", + "mobile_home_dealers", + "motion_picture_theaters", + "motor_freight_carriers_and_trucking", + "motor_homes_dealers", + "motor_vehicle_supplies_and_new_parts", + "motorcycle_shops_and_dealers", + "motorcycle_shops_dealers", + "music_stores_musical_instruments_pianos_and_sheet_music", + "news_dealers_and_newsstands", + "non_fi_money_orders", + "non_fi_stored_value_card_purchase_load", + "nondurable_goods", + "nurseries_lawn_and_garden_supply_stores", + "nursing_personal_care", + "office_and_commercial_furniture", + "opticians_eyeglasses", + "optometrists_ophthalmologist", + "orthopedic_goods_prosthetic_devices", + "osteopaths", + "package_stores_beer_wine_and_liquor", + "paints_varnishes_and_supplies", + "parking_lots_garages", + "passenger_railways", + "pawn_shops", + "pet_shops_pet_food_and_supplies", + "petroleum_and_petroleum_products", + "photo_developing", + "photographic_photocopy_microfilm_equipment_and_supplies", + "photographic_studios", + "picture_video_production", + "piece_goods_notions_and_other_dry_goods", + "plumbing_heating_equipment_and_supplies", + "political_organizations", + "postal_services_government_only", + "precious_stones_and_metals_watches_and_jewelry", + "professional_services", + "public_warehousing_and_storage", + "quick_copy_repro_and_blueprint", + "railroads", + "real_estate_agents_and_managers_rentals", + "record_stores", + "recreational_vehicle_rentals", + "religious_goods_stores", + "religious_organizations", + "roofing_siding_sheet_metal", + "secretarial_support_services", + "security_brokers_dealers", + "service_stations", + "sewing_needlework_fabric_and_piece_goods_stores", + "shoe_repair_hat_cleaning", + "shoe_stores", + "small_appliance_repair", + "snowmobile_dealers", + "special_trade_services", + "specialty_cleaning", + "sporting_goods_stores", + "sporting_recreation_camps", + "sports_and_riding_apparel_stores", + "sports_clubs_fields", + "stamp_and_coin_stores", + "stationary_office_supplies_printing_and_writing_paper", + "stationery_stores_office_and_school_supply_stores", + "swimming_pools_sales", + "t_ui_travel_germany", + "tailors_alterations", + "tax_payments_government_agencies", + "tax_preparation_services", + "taxicabs_limousines", + "telecommunication_equipment_and_telephone_sales", + "telecommunication_services", + "telegraph_services", + "tent_and_awning_shops", + "testing_laboratories", + "theatrical_ticket_agencies", + "timeshares", + "tire_retreading_and_repair", + "tolls_bridge_fees", + "tourist_attractions_and_exhibits", + "towing_services", + "trailer_parks_campgrounds", + "transportation_services", + "travel_agencies_tour_operators", + "truck_stop_iteration", + "truck_utility_trailer_rentals", + "typesetting_plate_making_and_related_services", + "typewriter_stores", + "u_s_federal_government_agencies_or_departments", + "uniforms_commercial_clothing", + "used_merchandise_and_secondhand_stores", + "utilities", + "variety_stores", + "veterinary_services", + "video_amusement_game_supplies", + "video_game_arcades", + "video_tape_rental_stores", + "vocational_trade_schools", + "watch_jewelry_repair", + "welding_repair", + "wholesale_clubs", + "wig_and_toupee_stores", + "wires_money_orders", + "womens_accessory_and_specialty_shops", + "womens_ready_to_wear_stores", + "wrecking_and_salvage_yards", + ] + ] + ] + """ + Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to decline. All other categories will be allowed. Cannot be set with `allowed_categories`. + """ + blocked_merchant_countries: NotRequired[List[str]] + """ + Array of strings containing representing countries from which authorizations will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `allowed_merchant_countries`. Provide an empty value to unset this control. + """ + spending_limits: NotRequired[ + List["CardCreateParamsSpendingControlsSpendingLimit"] + ] + """ + Limit spending with amount-based rules that apply across any cards this card replaced (i.e., its `replacement_for` card and _that_ card's `replacement_for` card, up the chain). + """ + + +class CardCreateParamsSpendingControlsSpendingLimit(TypedDict): + amount: int + """ + Maximum amount allowed to spend per interval. + """ + categories: NotRequired[ + List[ + Literal[ + "ac_refrigeration_repair", + "accounting_bookkeeping_services", + "advertising_services", + "agricultural_cooperative", + "airlines_air_carriers", + "airports_flying_fields", + "ambulance_services", + "amusement_parks_carnivals", + "antique_reproductions", + "antique_shops", + "aquariums", + "architectural_surveying_services", + "art_dealers_and_galleries", + "artists_supply_and_craft_shops", + "auto_and_home_supply_stores", + "auto_body_repair_shops", + "auto_paint_shops", + "auto_service_shops", + "automated_cash_disburse", + "automated_fuel_dispensers", + "automobile_associations", + "automotive_parts_and_accessories_stores", + "automotive_tire_stores", + "bail_and_bond_payments", + "bakeries", + "bands_orchestras", + "barber_and_beauty_shops", + "betting_casino_gambling", + "bicycle_shops", + "billiard_pool_establishments", + "boat_dealers", + "boat_rentals_and_leases", + "book_stores", + "books_periodicals_and_newspapers", + "bowling_alleys", + "bus_lines", + "business_secretarial_schools", + "buying_shopping_services", + "cable_satellite_and_other_pay_television_and_radio", + "camera_and_photographic_supply_stores", + "candy_nut_and_confectionery_stores", + "car_and_truck_dealers_new_used", + "car_and_truck_dealers_used_only", + "car_rental_agencies", + "car_washes", + "carpentry_services", + "carpet_upholstery_cleaning", + "caterers", + "charitable_and_social_service_organizations_fundraising", + "chemicals_and_allied_products", + "child_care_services", + "childrens_and_infants_wear_stores", + "chiropodists_podiatrists", + "chiropractors", + "cigar_stores_and_stands", + "civic_social_fraternal_associations", + "cleaning_and_maintenance", + "clothing_rental", + "colleges_universities", + "commercial_equipment", + "commercial_footwear", + "commercial_photography_art_and_graphics", + "commuter_transport_and_ferries", + "computer_network_services", + "computer_programming", + "computer_repair", + "computer_software_stores", + "computers_peripherals_and_software", + "concrete_work_services", + "construction_materials", + "consulting_public_relations", + "correspondence_schools", + "cosmetic_stores", + "counseling_services", + "country_clubs", + "courier_services", + "court_costs", + "credit_reporting_agencies", + "cruise_lines", + "dairy_products_stores", + "dance_hall_studios_schools", + "dating_escort_services", + "dentists_orthodontists", + "department_stores", + "detective_agencies", + "digital_goods_applications", + "digital_goods_games", + "digital_goods_large_volume", + "digital_goods_media", + "direct_marketing_catalog_merchant", + "direct_marketing_combination_catalog_and_retail_merchant", + "direct_marketing_inbound_telemarketing", + "direct_marketing_insurance_services", + "direct_marketing_other", + "direct_marketing_outbound_telemarketing", + "direct_marketing_subscription", + "direct_marketing_travel", + "discount_stores", + "doctors", + "door_to_door_sales", + "drapery_window_covering_and_upholstery_stores", + "drinking_places", + "drug_stores_and_pharmacies", + "drugs_drug_proprietaries_and_druggist_sundries", + "dry_cleaners", + "durable_goods", + "duty_free_stores", + "eating_places_restaurants", + "educational_services", + "electric_razor_stores", + "electric_vehicle_charging", + "electrical_parts_and_equipment", + "electrical_services", + "electronics_repair_shops", + "electronics_stores", + "elementary_secondary_schools", + "emergency_services_gcas_visa_use_only", + "employment_temp_agencies", + "equipment_rental", + "exterminating_services", + "family_clothing_stores", + "fast_food_restaurants", + "financial_institutions", + "fines_government_administrative_entities", + "fireplace_fireplace_screens_and_accessories_stores", + "floor_covering_stores", + "florists", + "florists_supplies_nursery_stock_and_flowers", + "freezer_and_locker_meat_provisioners", + "fuel_dealers_non_automotive", + "funeral_services_crematories", + "furniture_home_furnishings_and_equipment_stores_except_appliances", + "furniture_repair_refinishing", + "furriers_and_fur_shops", + "general_services", + "gift_card_novelty_and_souvenir_shops", + "glass_paint_and_wallpaper_stores", + "glassware_crystal_stores", + "golf_courses_public", + "government_licensed_horse_dog_racing_us_region_only", + "government_licensed_online_casions_online_gambling_us_region_only", + "government_owned_lotteries_non_us_region", + "government_owned_lotteries_us_region_only", + "government_services", + "grocery_stores_supermarkets", + "hardware_equipment_and_supplies", + "hardware_stores", + "health_and_beauty_spas", + "hearing_aids_sales_and_supplies", + "heating_plumbing_a_c", + "hobby_toy_and_game_shops", + "home_supply_warehouse_stores", + "hospitals", + "hotels_motels_and_resorts", + "household_appliance_stores", + "industrial_supplies", + "information_retrieval_services", + "insurance_default", + "insurance_underwriting_premiums", + "intra_company_purchases", + "jewelry_stores_watches_clocks_and_silverware_stores", + "landscaping_services", + "laundries", + "laundry_cleaning_services", + "legal_services_attorneys", + "luggage_and_leather_goods_stores", + "lumber_building_materials_stores", + "manual_cash_disburse", + "marinas_service_and_supplies", + "marketplaces", + "masonry_stonework_and_plaster", + "massage_parlors", + "medical_and_dental_labs", + "medical_dental_ophthalmic_and_hospital_equipment_and_supplies", + "medical_services", + "membership_organizations", + "mens_and_boys_clothing_and_accessories_stores", + "mens_womens_clothing_stores", + "metal_service_centers", + "miscellaneous", + "miscellaneous_apparel_and_accessory_shops", + "miscellaneous_auto_dealers", + "miscellaneous_business_services", + "miscellaneous_food_stores", + "miscellaneous_general_merchandise", + "miscellaneous_general_services", + "miscellaneous_home_furnishing_specialty_stores", + "miscellaneous_publishing_and_printing", + "miscellaneous_recreation_services", + "miscellaneous_repair_shops", + "miscellaneous_specialty_retail", + "mobile_home_dealers", + "motion_picture_theaters", + "motor_freight_carriers_and_trucking", + "motor_homes_dealers", + "motor_vehicle_supplies_and_new_parts", + "motorcycle_shops_and_dealers", + "motorcycle_shops_dealers", + "music_stores_musical_instruments_pianos_and_sheet_music", + "news_dealers_and_newsstands", + "non_fi_money_orders", + "non_fi_stored_value_card_purchase_load", + "nondurable_goods", + "nurseries_lawn_and_garden_supply_stores", + "nursing_personal_care", + "office_and_commercial_furniture", + "opticians_eyeglasses", + "optometrists_ophthalmologist", + "orthopedic_goods_prosthetic_devices", + "osteopaths", + "package_stores_beer_wine_and_liquor", + "paints_varnishes_and_supplies", + "parking_lots_garages", + "passenger_railways", + "pawn_shops", + "pet_shops_pet_food_and_supplies", + "petroleum_and_petroleum_products", + "photo_developing", + "photographic_photocopy_microfilm_equipment_and_supplies", + "photographic_studios", + "picture_video_production", + "piece_goods_notions_and_other_dry_goods", + "plumbing_heating_equipment_and_supplies", + "political_organizations", + "postal_services_government_only", + "precious_stones_and_metals_watches_and_jewelry", + "professional_services", + "public_warehousing_and_storage", + "quick_copy_repro_and_blueprint", + "railroads", + "real_estate_agents_and_managers_rentals", + "record_stores", + "recreational_vehicle_rentals", + "religious_goods_stores", + "religious_organizations", + "roofing_siding_sheet_metal", + "secretarial_support_services", + "security_brokers_dealers", + "service_stations", + "sewing_needlework_fabric_and_piece_goods_stores", + "shoe_repair_hat_cleaning", + "shoe_stores", + "small_appliance_repair", + "snowmobile_dealers", + "special_trade_services", + "specialty_cleaning", + "sporting_goods_stores", + "sporting_recreation_camps", + "sports_and_riding_apparel_stores", + "sports_clubs_fields", + "stamp_and_coin_stores", + "stationary_office_supplies_printing_and_writing_paper", + "stationery_stores_office_and_school_supply_stores", + "swimming_pools_sales", + "t_ui_travel_germany", + "tailors_alterations", + "tax_payments_government_agencies", + "tax_preparation_services", + "taxicabs_limousines", + "telecommunication_equipment_and_telephone_sales", + "telecommunication_services", + "telegraph_services", + "tent_and_awning_shops", + "testing_laboratories", + "theatrical_ticket_agencies", + "timeshares", + "tire_retreading_and_repair", + "tolls_bridge_fees", + "tourist_attractions_and_exhibits", + "towing_services", + "trailer_parks_campgrounds", + "transportation_services", + "travel_agencies_tour_operators", + "truck_stop_iteration", + "truck_utility_trailer_rentals", + "typesetting_plate_making_and_related_services", + "typewriter_stores", + "u_s_federal_government_agencies_or_departments", + "uniforms_commercial_clothing", + "used_merchandise_and_secondhand_stores", + "utilities", + "variety_stores", + "veterinary_services", + "video_amusement_game_supplies", + "video_game_arcades", + "video_tape_rental_stores", + "vocational_trade_schools", + "watch_jewelry_repair", + "welding_repair", + "wholesale_clubs", + "wig_and_toupee_stores", + "wires_money_orders", + "womens_accessory_and_specialty_shops", + "womens_ready_to_wear_stores", + "wrecking_and_salvage_yards", + ] + ] + ] + """ + Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories. + """ + interval: Literal[ + "all_time", "daily", "monthly", "per_authorization", "weekly", "yearly" + ] + """ + Interval (or event) to which the amount applies. + """ diff --git a/stripe/params/issuing/_card_deliver_card_params.py b/stripe/params/issuing/_card_deliver_card_params.py new file mode 100644 index 000000000..4c5883138 --- /dev/null +++ b/stripe/params/issuing/_card_deliver_card_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 CardDeliverCardParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/issuing/_card_fail_card_params.py b/stripe/params/issuing/_card_fail_card_params.py new file mode 100644 index 000000000..5ef9da9a0 --- /dev/null +++ b/stripe/params/issuing/_card_fail_card_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 CardFailCardParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/issuing/_card_list_params.py b/stripe/params/issuing/_card_list_params.py new file mode 100644 index 000000000..ebc0d470c --- /dev/null +++ b/stripe/params/issuing/_card_list_params.py @@ -0,0 +1,72 @@ +# -*- 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, TypedDict + + +class CardListParams(RequestOptions): + cardholder: NotRequired[str] + """ + Only return cards belonging to the Cardholder with the provided ID. + """ + created: NotRequired["CardListParamsCreated|int"] + """ + Only return cards that were issued during the given date interval. + """ + 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. + """ + exp_month: NotRequired[int] + """ + Only return cards that have the given expiration month. + """ + exp_year: NotRequired[int] + """ + Only return cards that have the given expiration year. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + last4: NotRequired[str] + """ + Only return cards that have the given last four digits. + """ + 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. + """ + personalization_design: NotRequired[str] + 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. + """ + status: NotRequired[Literal["active", "canceled", "inactive"]] + """ + Only return cards that have the given status. One of `active`, `inactive`, or `canceled`. + """ + type: NotRequired[Literal["physical", "virtual"]] + """ + Only return cards that have the given type. One of `virtual` or `physical`. + """ + + +class CardListParamsCreated(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/issuing/_card_modify_params.py b/stripe/params/issuing/_card_modify_params.py new file mode 100644 index 000000000..f635f349d --- /dev/null +++ b/stripe/params/issuing/_card_modify_params.py @@ -0,0 +1,1066 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class CardModifyParams(RequestOptions): + cancellation_reason: NotRequired[Literal["lost", "stolen"]] + """ + Reason why the `status` of this card is `canceled`. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + personalization_design: NotRequired[str] + pin: NotRequired["CardModifyParamsPin"] + """ + The desired new PIN for this card. + """ + shipping: NotRequired["CardModifyParamsShipping"] + """ + Updated shipping information for the card. + """ + spending_controls: NotRequired["CardModifyParamsSpendingControls"] + """ + Rules that control spending for this card. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details. + """ + status: NotRequired[Literal["active", "canceled", "inactive"]] + """ + Dictates whether authorizations can be approved on this card. May be blocked from activating cards depending on past-due Cardholder requirements. Defaults to `inactive`. If this card is being canceled because it was lost or stolen, this information should be provided as `cancellation_reason`. + """ + + +class CardModifyParamsPin(TypedDict): + encrypted_number: NotRequired[str] + """ + The card's desired new PIN, encrypted under Stripe's public key. + """ + + +class CardModifyParamsShipping(TypedDict): + address: "CardModifyParamsShippingAddress" + """ + The address that the card is shipped to. + """ + address_validation: NotRequired[ + "CardModifyParamsShippingAddressValidation" + ] + """ + Address validation settings. + """ + customs: NotRequired["CardModifyParamsShippingCustoms"] + """ + Customs information for the shipment. + """ + name: str + """ + The name printed on the shipping label when shipping the card. + """ + phone_number: NotRequired[str] + """ + Phone number of the recipient of the shipment. + """ + require_signature: NotRequired[bool] + """ + Whether a signature is required for card delivery. + """ + service: NotRequired[Literal["express", "priority", "standard"]] + """ + Shipment service. + """ + type: NotRequired[Literal["bulk", "individual"]] + """ + Packaging options. + """ + + +class CardModifyParamsShippingAddress(TypedDict): + city: 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: 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: str + """ + ZIP or postal code. + """ + state: NotRequired[str] + """ + State, county, province, or region. + """ + + +class CardModifyParamsShippingAddressValidation(TypedDict): + mode: Literal[ + "disabled", "normalization_only", "validation_and_normalization" + ] + """ + The address validation capabilities to use. + """ + + +class CardModifyParamsShippingCustoms(TypedDict): + eori_number: NotRequired[str] + """ + The Economic Operators Registration and Identification (EORI) number to use for Customs. Required for bulk shipments to Europe. + """ + + +class CardModifyParamsSpendingControls(TypedDict): + allowed_categories: NotRequired[ + List[ + Literal[ + "ac_refrigeration_repair", + "accounting_bookkeeping_services", + "advertising_services", + "agricultural_cooperative", + "airlines_air_carriers", + "airports_flying_fields", + "ambulance_services", + "amusement_parks_carnivals", + "antique_reproductions", + "antique_shops", + "aquariums", + "architectural_surveying_services", + "art_dealers_and_galleries", + "artists_supply_and_craft_shops", + "auto_and_home_supply_stores", + "auto_body_repair_shops", + "auto_paint_shops", + "auto_service_shops", + "automated_cash_disburse", + "automated_fuel_dispensers", + "automobile_associations", + "automotive_parts_and_accessories_stores", + "automotive_tire_stores", + "bail_and_bond_payments", + "bakeries", + "bands_orchestras", + "barber_and_beauty_shops", + "betting_casino_gambling", + "bicycle_shops", + "billiard_pool_establishments", + "boat_dealers", + "boat_rentals_and_leases", + "book_stores", + "books_periodicals_and_newspapers", + "bowling_alleys", + "bus_lines", + "business_secretarial_schools", + "buying_shopping_services", + "cable_satellite_and_other_pay_television_and_radio", + "camera_and_photographic_supply_stores", + "candy_nut_and_confectionery_stores", + "car_and_truck_dealers_new_used", + "car_and_truck_dealers_used_only", + "car_rental_agencies", + "car_washes", + "carpentry_services", + "carpet_upholstery_cleaning", + "caterers", + "charitable_and_social_service_organizations_fundraising", + "chemicals_and_allied_products", + "child_care_services", + "childrens_and_infants_wear_stores", + "chiropodists_podiatrists", + "chiropractors", + "cigar_stores_and_stands", + "civic_social_fraternal_associations", + "cleaning_and_maintenance", + "clothing_rental", + "colleges_universities", + "commercial_equipment", + "commercial_footwear", + "commercial_photography_art_and_graphics", + "commuter_transport_and_ferries", + "computer_network_services", + "computer_programming", + "computer_repair", + "computer_software_stores", + "computers_peripherals_and_software", + "concrete_work_services", + "construction_materials", + "consulting_public_relations", + "correspondence_schools", + "cosmetic_stores", + "counseling_services", + "country_clubs", + "courier_services", + "court_costs", + "credit_reporting_agencies", + "cruise_lines", + "dairy_products_stores", + "dance_hall_studios_schools", + "dating_escort_services", + "dentists_orthodontists", + "department_stores", + "detective_agencies", + "digital_goods_applications", + "digital_goods_games", + "digital_goods_large_volume", + "digital_goods_media", + "direct_marketing_catalog_merchant", + "direct_marketing_combination_catalog_and_retail_merchant", + "direct_marketing_inbound_telemarketing", + "direct_marketing_insurance_services", + "direct_marketing_other", + "direct_marketing_outbound_telemarketing", + "direct_marketing_subscription", + "direct_marketing_travel", + "discount_stores", + "doctors", + "door_to_door_sales", + "drapery_window_covering_and_upholstery_stores", + "drinking_places", + "drug_stores_and_pharmacies", + "drugs_drug_proprietaries_and_druggist_sundries", + "dry_cleaners", + "durable_goods", + "duty_free_stores", + "eating_places_restaurants", + "educational_services", + "electric_razor_stores", + "electric_vehicle_charging", + "electrical_parts_and_equipment", + "electrical_services", + "electronics_repair_shops", + "electronics_stores", + "elementary_secondary_schools", + "emergency_services_gcas_visa_use_only", + "employment_temp_agencies", + "equipment_rental", + "exterminating_services", + "family_clothing_stores", + "fast_food_restaurants", + "financial_institutions", + "fines_government_administrative_entities", + "fireplace_fireplace_screens_and_accessories_stores", + "floor_covering_stores", + "florists", + "florists_supplies_nursery_stock_and_flowers", + "freezer_and_locker_meat_provisioners", + "fuel_dealers_non_automotive", + "funeral_services_crematories", + "furniture_home_furnishings_and_equipment_stores_except_appliances", + "furniture_repair_refinishing", + "furriers_and_fur_shops", + "general_services", + "gift_card_novelty_and_souvenir_shops", + "glass_paint_and_wallpaper_stores", + "glassware_crystal_stores", + "golf_courses_public", + "government_licensed_horse_dog_racing_us_region_only", + "government_licensed_online_casions_online_gambling_us_region_only", + "government_owned_lotteries_non_us_region", + "government_owned_lotteries_us_region_only", + "government_services", + "grocery_stores_supermarkets", + "hardware_equipment_and_supplies", + "hardware_stores", + "health_and_beauty_spas", + "hearing_aids_sales_and_supplies", + "heating_plumbing_a_c", + "hobby_toy_and_game_shops", + "home_supply_warehouse_stores", + "hospitals", + "hotels_motels_and_resorts", + "household_appliance_stores", + "industrial_supplies", + "information_retrieval_services", + "insurance_default", + "insurance_underwriting_premiums", + "intra_company_purchases", + "jewelry_stores_watches_clocks_and_silverware_stores", + "landscaping_services", + "laundries", + "laundry_cleaning_services", + "legal_services_attorneys", + "luggage_and_leather_goods_stores", + "lumber_building_materials_stores", + "manual_cash_disburse", + "marinas_service_and_supplies", + "marketplaces", + "masonry_stonework_and_plaster", + "massage_parlors", + "medical_and_dental_labs", + "medical_dental_ophthalmic_and_hospital_equipment_and_supplies", + "medical_services", + "membership_organizations", + "mens_and_boys_clothing_and_accessories_stores", + "mens_womens_clothing_stores", + "metal_service_centers", + "miscellaneous", + "miscellaneous_apparel_and_accessory_shops", + "miscellaneous_auto_dealers", + "miscellaneous_business_services", + "miscellaneous_food_stores", + "miscellaneous_general_merchandise", + "miscellaneous_general_services", + "miscellaneous_home_furnishing_specialty_stores", + "miscellaneous_publishing_and_printing", + "miscellaneous_recreation_services", + "miscellaneous_repair_shops", + "miscellaneous_specialty_retail", + "mobile_home_dealers", + "motion_picture_theaters", + "motor_freight_carriers_and_trucking", + "motor_homes_dealers", + "motor_vehicle_supplies_and_new_parts", + "motorcycle_shops_and_dealers", + "motorcycle_shops_dealers", + "music_stores_musical_instruments_pianos_and_sheet_music", + "news_dealers_and_newsstands", + "non_fi_money_orders", + "non_fi_stored_value_card_purchase_load", + "nondurable_goods", + "nurseries_lawn_and_garden_supply_stores", + "nursing_personal_care", + "office_and_commercial_furniture", + "opticians_eyeglasses", + "optometrists_ophthalmologist", + "orthopedic_goods_prosthetic_devices", + "osteopaths", + "package_stores_beer_wine_and_liquor", + "paints_varnishes_and_supplies", + "parking_lots_garages", + "passenger_railways", + "pawn_shops", + "pet_shops_pet_food_and_supplies", + "petroleum_and_petroleum_products", + "photo_developing", + "photographic_photocopy_microfilm_equipment_and_supplies", + "photographic_studios", + "picture_video_production", + "piece_goods_notions_and_other_dry_goods", + "plumbing_heating_equipment_and_supplies", + "political_organizations", + "postal_services_government_only", + "precious_stones_and_metals_watches_and_jewelry", + "professional_services", + "public_warehousing_and_storage", + "quick_copy_repro_and_blueprint", + "railroads", + "real_estate_agents_and_managers_rentals", + "record_stores", + "recreational_vehicle_rentals", + "religious_goods_stores", + "religious_organizations", + "roofing_siding_sheet_metal", + "secretarial_support_services", + "security_brokers_dealers", + "service_stations", + "sewing_needlework_fabric_and_piece_goods_stores", + "shoe_repair_hat_cleaning", + "shoe_stores", + "small_appliance_repair", + "snowmobile_dealers", + "special_trade_services", + "specialty_cleaning", + "sporting_goods_stores", + "sporting_recreation_camps", + "sports_and_riding_apparel_stores", + "sports_clubs_fields", + "stamp_and_coin_stores", + "stationary_office_supplies_printing_and_writing_paper", + "stationery_stores_office_and_school_supply_stores", + "swimming_pools_sales", + "t_ui_travel_germany", + "tailors_alterations", + "tax_payments_government_agencies", + "tax_preparation_services", + "taxicabs_limousines", + "telecommunication_equipment_and_telephone_sales", + "telecommunication_services", + "telegraph_services", + "tent_and_awning_shops", + "testing_laboratories", + "theatrical_ticket_agencies", + "timeshares", + "tire_retreading_and_repair", + "tolls_bridge_fees", + "tourist_attractions_and_exhibits", + "towing_services", + "trailer_parks_campgrounds", + "transportation_services", + "travel_agencies_tour_operators", + "truck_stop_iteration", + "truck_utility_trailer_rentals", + "typesetting_plate_making_and_related_services", + "typewriter_stores", + "u_s_federal_government_agencies_or_departments", + "uniforms_commercial_clothing", + "used_merchandise_and_secondhand_stores", + "utilities", + "variety_stores", + "veterinary_services", + "video_amusement_game_supplies", + "video_game_arcades", + "video_tape_rental_stores", + "vocational_trade_schools", + "watch_jewelry_repair", + "welding_repair", + "wholesale_clubs", + "wig_and_toupee_stores", + "wires_money_orders", + "womens_accessory_and_specialty_shops", + "womens_ready_to_wear_stores", + "wrecking_and_salvage_yards", + ] + ] + ] + """ + Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to allow. All other categories will be blocked. Cannot be set with `blocked_categories`. + """ + allowed_merchant_countries: NotRequired[List[str]] + """ + Array of strings containing representing countries from which authorizations will be allowed. Authorizations from merchants in all other countries will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `blocked_merchant_countries`. Provide an empty value to unset this control. + """ + blocked_categories: NotRequired[ + List[ + Literal[ + "ac_refrigeration_repair", + "accounting_bookkeeping_services", + "advertising_services", + "agricultural_cooperative", + "airlines_air_carriers", + "airports_flying_fields", + "ambulance_services", + "amusement_parks_carnivals", + "antique_reproductions", + "antique_shops", + "aquariums", + "architectural_surveying_services", + "art_dealers_and_galleries", + "artists_supply_and_craft_shops", + "auto_and_home_supply_stores", + "auto_body_repair_shops", + "auto_paint_shops", + "auto_service_shops", + "automated_cash_disburse", + "automated_fuel_dispensers", + "automobile_associations", + "automotive_parts_and_accessories_stores", + "automotive_tire_stores", + "bail_and_bond_payments", + "bakeries", + "bands_orchestras", + "barber_and_beauty_shops", + "betting_casino_gambling", + "bicycle_shops", + "billiard_pool_establishments", + "boat_dealers", + "boat_rentals_and_leases", + "book_stores", + "books_periodicals_and_newspapers", + "bowling_alleys", + "bus_lines", + "business_secretarial_schools", + "buying_shopping_services", + "cable_satellite_and_other_pay_television_and_radio", + "camera_and_photographic_supply_stores", + "candy_nut_and_confectionery_stores", + "car_and_truck_dealers_new_used", + "car_and_truck_dealers_used_only", + "car_rental_agencies", + "car_washes", + "carpentry_services", + "carpet_upholstery_cleaning", + "caterers", + "charitable_and_social_service_organizations_fundraising", + "chemicals_and_allied_products", + "child_care_services", + "childrens_and_infants_wear_stores", + "chiropodists_podiatrists", + "chiropractors", + "cigar_stores_and_stands", + "civic_social_fraternal_associations", + "cleaning_and_maintenance", + "clothing_rental", + "colleges_universities", + "commercial_equipment", + "commercial_footwear", + "commercial_photography_art_and_graphics", + "commuter_transport_and_ferries", + "computer_network_services", + "computer_programming", + "computer_repair", + "computer_software_stores", + "computers_peripherals_and_software", + "concrete_work_services", + "construction_materials", + "consulting_public_relations", + "correspondence_schools", + "cosmetic_stores", + "counseling_services", + "country_clubs", + "courier_services", + "court_costs", + "credit_reporting_agencies", + "cruise_lines", + "dairy_products_stores", + "dance_hall_studios_schools", + "dating_escort_services", + "dentists_orthodontists", + "department_stores", + "detective_agencies", + "digital_goods_applications", + "digital_goods_games", + "digital_goods_large_volume", + "digital_goods_media", + "direct_marketing_catalog_merchant", + "direct_marketing_combination_catalog_and_retail_merchant", + "direct_marketing_inbound_telemarketing", + "direct_marketing_insurance_services", + "direct_marketing_other", + "direct_marketing_outbound_telemarketing", + "direct_marketing_subscription", + "direct_marketing_travel", + "discount_stores", + "doctors", + "door_to_door_sales", + "drapery_window_covering_and_upholstery_stores", + "drinking_places", + "drug_stores_and_pharmacies", + "drugs_drug_proprietaries_and_druggist_sundries", + "dry_cleaners", + "durable_goods", + "duty_free_stores", + "eating_places_restaurants", + "educational_services", + "electric_razor_stores", + "electric_vehicle_charging", + "electrical_parts_and_equipment", + "electrical_services", + "electronics_repair_shops", + "electronics_stores", + "elementary_secondary_schools", + "emergency_services_gcas_visa_use_only", + "employment_temp_agencies", + "equipment_rental", + "exterminating_services", + "family_clothing_stores", + "fast_food_restaurants", + "financial_institutions", + "fines_government_administrative_entities", + "fireplace_fireplace_screens_and_accessories_stores", + "floor_covering_stores", + "florists", + "florists_supplies_nursery_stock_and_flowers", + "freezer_and_locker_meat_provisioners", + "fuel_dealers_non_automotive", + "funeral_services_crematories", + "furniture_home_furnishings_and_equipment_stores_except_appliances", + "furniture_repair_refinishing", + "furriers_and_fur_shops", + "general_services", + "gift_card_novelty_and_souvenir_shops", + "glass_paint_and_wallpaper_stores", + "glassware_crystal_stores", + "golf_courses_public", + "government_licensed_horse_dog_racing_us_region_only", + "government_licensed_online_casions_online_gambling_us_region_only", + "government_owned_lotteries_non_us_region", + "government_owned_lotteries_us_region_only", + "government_services", + "grocery_stores_supermarkets", + "hardware_equipment_and_supplies", + "hardware_stores", + "health_and_beauty_spas", + "hearing_aids_sales_and_supplies", + "heating_plumbing_a_c", + "hobby_toy_and_game_shops", + "home_supply_warehouse_stores", + "hospitals", + "hotels_motels_and_resorts", + "household_appliance_stores", + "industrial_supplies", + "information_retrieval_services", + "insurance_default", + "insurance_underwriting_premiums", + "intra_company_purchases", + "jewelry_stores_watches_clocks_and_silverware_stores", + "landscaping_services", + "laundries", + "laundry_cleaning_services", + "legal_services_attorneys", + "luggage_and_leather_goods_stores", + "lumber_building_materials_stores", + "manual_cash_disburse", + "marinas_service_and_supplies", + "marketplaces", + "masonry_stonework_and_plaster", + "massage_parlors", + "medical_and_dental_labs", + "medical_dental_ophthalmic_and_hospital_equipment_and_supplies", + "medical_services", + "membership_organizations", + "mens_and_boys_clothing_and_accessories_stores", + "mens_womens_clothing_stores", + "metal_service_centers", + "miscellaneous", + "miscellaneous_apparel_and_accessory_shops", + "miscellaneous_auto_dealers", + "miscellaneous_business_services", + "miscellaneous_food_stores", + "miscellaneous_general_merchandise", + "miscellaneous_general_services", + "miscellaneous_home_furnishing_specialty_stores", + "miscellaneous_publishing_and_printing", + "miscellaneous_recreation_services", + "miscellaneous_repair_shops", + "miscellaneous_specialty_retail", + "mobile_home_dealers", + "motion_picture_theaters", + "motor_freight_carriers_and_trucking", + "motor_homes_dealers", + "motor_vehicle_supplies_and_new_parts", + "motorcycle_shops_and_dealers", + "motorcycle_shops_dealers", + "music_stores_musical_instruments_pianos_and_sheet_music", + "news_dealers_and_newsstands", + "non_fi_money_orders", + "non_fi_stored_value_card_purchase_load", + "nondurable_goods", + "nurseries_lawn_and_garden_supply_stores", + "nursing_personal_care", + "office_and_commercial_furniture", + "opticians_eyeglasses", + "optometrists_ophthalmologist", + "orthopedic_goods_prosthetic_devices", + "osteopaths", + "package_stores_beer_wine_and_liquor", + "paints_varnishes_and_supplies", + "parking_lots_garages", + "passenger_railways", + "pawn_shops", + "pet_shops_pet_food_and_supplies", + "petroleum_and_petroleum_products", + "photo_developing", + "photographic_photocopy_microfilm_equipment_and_supplies", + "photographic_studios", + "picture_video_production", + "piece_goods_notions_and_other_dry_goods", + "plumbing_heating_equipment_and_supplies", + "political_organizations", + "postal_services_government_only", + "precious_stones_and_metals_watches_and_jewelry", + "professional_services", + "public_warehousing_and_storage", + "quick_copy_repro_and_blueprint", + "railroads", + "real_estate_agents_and_managers_rentals", + "record_stores", + "recreational_vehicle_rentals", + "religious_goods_stores", + "religious_organizations", + "roofing_siding_sheet_metal", + "secretarial_support_services", + "security_brokers_dealers", + "service_stations", + "sewing_needlework_fabric_and_piece_goods_stores", + "shoe_repair_hat_cleaning", + "shoe_stores", + "small_appliance_repair", + "snowmobile_dealers", + "special_trade_services", + "specialty_cleaning", + "sporting_goods_stores", + "sporting_recreation_camps", + "sports_and_riding_apparel_stores", + "sports_clubs_fields", + "stamp_and_coin_stores", + "stationary_office_supplies_printing_and_writing_paper", + "stationery_stores_office_and_school_supply_stores", + "swimming_pools_sales", + "t_ui_travel_germany", + "tailors_alterations", + "tax_payments_government_agencies", + "tax_preparation_services", + "taxicabs_limousines", + "telecommunication_equipment_and_telephone_sales", + "telecommunication_services", + "telegraph_services", + "tent_and_awning_shops", + "testing_laboratories", + "theatrical_ticket_agencies", + "timeshares", + "tire_retreading_and_repair", + "tolls_bridge_fees", + "tourist_attractions_and_exhibits", + "towing_services", + "trailer_parks_campgrounds", + "transportation_services", + "travel_agencies_tour_operators", + "truck_stop_iteration", + "truck_utility_trailer_rentals", + "typesetting_plate_making_and_related_services", + "typewriter_stores", + "u_s_federal_government_agencies_or_departments", + "uniforms_commercial_clothing", + "used_merchandise_and_secondhand_stores", + "utilities", + "variety_stores", + "veterinary_services", + "video_amusement_game_supplies", + "video_game_arcades", + "video_tape_rental_stores", + "vocational_trade_schools", + "watch_jewelry_repair", + "welding_repair", + "wholesale_clubs", + "wig_and_toupee_stores", + "wires_money_orders", + "womens_accessory_and_specialty_shops", + "womens_ready_to_wear_stores", + "wrecking_and_salvage_yards", + ] + ] + ] + """ + Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to decline. All other categories will be allowed. Cannot be set with `allowed_categories`. + """ + blocked_merchant_countries: NotRequired[List[str]] + """ + Array of strings containing representing countries from which authorizations will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `allowed_merchant_countries`. Provide an empty value to unset this control. + """ + spending_limits: NotRequired[ + List["CardModifyParamsSpendingControlsSpendingLimit"] + ] + """ + Limit spending with amount-based rules that apply across any cards this card replaced (i.e., its `replacement_for` card and _that_ card's `replacement_for` card, up the chain). + """ + + +class CardModifyParamsSpendingControlsSpendingLimit(TypedDict): + amount: int + """ + Maximum amount allowed to spend per interval. + """ + categories: NotRequired[ + List[ + Literal[ + "ac_refrigeration_repair", + "accounting_bookkeeping_services", + "advertising_services", + "agricultural_cooperative", + "airlines_air_carriers", + "airports_flying_fields", + "ambulance_services", + "amusement_parks_carnivals", + "antique_reproductions", + "antique_shops", + "aquariums", + "architectural_surveying_services", + "art_dealers_and_galleries", + "artists_supply_and_craft_shops", + "auto_and_home_supply_stores", + "auto_body_repair_shops", + "auto_paint_shops", + "auto_service_shops", + "automated_cash_disburse", + "automated_fuel_dispensers", + "automobile_associations", + "automotive_parts_and_accessories_stores", + "automotive_tire_stores", + "bail_and_bond_payments", + "bakeries", + "bands_orchestras", + "barber_and_beauty_shops", + "betting_casino_gambling", + "bicycle_shops", + "billiard_pool_establishments", + "boat_dealers", + "boat_rentals_and_leases", + "book_stores", + "books_periodicals_and_newspapers", + "bowling_alleys", + "bus_lines", + "business_secretarial_schools", + "buying_shopping_services", + "cable_satellite_and_other_pay_television_and_radio", + "camera_and_photographic_supply_stores", + "candy_nut_and_confectionery_stores", + "car_and_truck_dealers_new_used", + "car_and_truck_dealers_used_only", + "car_rental_agencies", + "car_washes", + "carpentry_services", + "carpet_upholstery_cleaning", + "caterers", + "charitable_and_social_service_organizations_fundraising", + "chemicals_and_allied_products", + "child_care_services", + "childrens_and_infants_wear_stores", + "chiropodists_podiatrists", + "chiropractors", + "cigar_stores_and_stands", + "civic_social_fraternal_associations", + "cleaning_and_maintenance", + "clothing_rental", + "colleges_universities", + "commercial_equipment", + "commercial_footwear", + "commercial_photography_art_and_graphics", + "commuter_transport_and_ferries", + "computer_network_services", + "computer_programming", + "computer_repair", + "computer_software_stores", + "computers_peripherals_and_software", + "concrete_work_services", + "construction_materials", + "consulting_public_relations", + "correspondence_schools", + "cosmetic_stores", + "counseling_services", + "country_clubs", + "courier_services", + "court_costs", + "credit_reporting_agencies", + "cruise_lines", + "dairy_products_stores", + "dance_hall_studios_schools", + "dating_escort_services", + "dentists_orthodontists", + "department_stores", + "detective_agencies", + "digital_goods_applications", + "digital_goods_games", + "digital_goods_large_volume", + "digital_goods_media", + "direct_marketing_catalog_merchant", + "direct_marketing_combination_catalog_and_retail_merchant", + "direct_marketing_inbound_telemarketing", + "direct_marketing_insurance_services", + "direct_marketing_other", + "direct_marketing_outbound_telemarketing", + "direct_marketing_subscription", + "direct_marketing_travel", + "discount_stores", + "doctors", + "door_to_door_sales", + "drapery_window_covering_and_upholstery_stores", + "drinking_places", + "drug_stores_and_pharmacies", + "drugs_drug_proprietaries_and_druggist_sundries", + "dry_cleaners", + "durable_goods", + "duty_free_stores", + "eating_places_restaurants", + "educational_services", + "electric_razor_stores", + "electric_vehicle_charging", + "electrical_parts_and_equipment", + "electrical_services", + "electronics_repair_shops", + "electronics_stores", + "elementary_secondary_schools", + "emergency_services_gcas_visa_use_only", + "employment_temp_agencies", + "equipment_rental", + "exterminating_services", + "family_clothing_stores", + "fast_food_restaurants", + "financial_institutions", + "fines_government_administrative_entities", + "fireplace_fireplace_screens_and_accessories_stores", + "floor_covering_stores", + "florists", + "florists_supplies_nursery_stock_and_flowers", + "freezer_and_locker_meat_provisioners", + "fuel_dealers_non_automotive", + "funeral_services_crematories", + "furniture_home_furnishings_and_equipment_stores_except_appliances", + "furniture_repair_refinishing", + "furriers_and_fur_shops", + "general_services", + "gift_card_novelty_and_souvenir_shops", + "glass_paint_and_wallpaper_stores", + "glassware_crystal_stores", + "golf_courses_public", + "government_licensed_horse_dog_racing_us_region_only", + "government_licensed_online_casions_online_gambling_us_region_only", + "government_owned_lotteries_non_us_region", + "government_owned_lotteries_us_region_only", + "government_services", + "grocery_stores_supermarkets", + "hardware_equipment_and_supplies", + "hardware_stores", + "health_and_beauty_spas", + "hearing_aids_sales_and_supplies", + "heating_plumbing_a_c", + "hobby_toy_and_game_shops", + "home_supply_warehouse_stores", + "hospitals", + "hotels_motels_and_resorts", + "household_appliance_stores", + "industrial_supplies", + "information_retrieval_services", + "insurance_default", + "insurance_underwriting_premiums", + "intra_company_purchases", + "jewelry_stores_watches_clocks_and_silverware_stores", + "landscaping_services", + "laundries", + "laundry_cleaning_services", + "legal_services_attorneys", + "luggage_and_leather_goods_stores", + "lumber_building_materials_stores", + "manual_cash_disburse", + "marinas_service_and_supplies", + "marketplaces", + "masonry_stonework_and_plaster", + "massage_parlors", + "medical_and_dental_labs", + "medical_dental_ophthalmic_and_hospital_equipment_and_supplies", + "medical_services", + "membership_organizations", + "mens_and_boys_clothing_and_accessories_stores", + "mens_womens_clothing_stores", + "metal_service_centers", + "miscellaneous", + "miscellaneous_apparel_and_accessory_shops", + "miscellaneous_auto_dealers", + "miscellaneous_business_services", + "miscellaneous_food_stores", + "miscellaneous_general_merchandise", + "miscellaneous_general_services", + "miscellaneous_home_furnishing_specialty_stores", + "miscellaneous_publishing_and_printing", + "miscellaneous_recreation_services", + "miscellaneous_repair_shops", + "miscellaneous_specialty_retail", + "mobile_home_dealers", + "motion_picture_theaters", + "motor_freight_carriers_and_trucking", + "motor_homes_dealers", + "motor_vehicle_supplies_and_new_parts", + "motorcycle_shops_and_dealers", + "motorcycle_shops_dealers", + "music_stores_musical_instruments_pianos_and_sheet_music", + "news_dealers_and_newsstands", + "non_fi_money_orders", + "non_fi_stored_value_card_purchase_load", + "nondurable_goods", + "nurseries_lawn_and_garden_supply_stores", + "nursing_personal_care", + "office_and_commercial_furniture", + "opticians_eyeglasses", + "optometrists_ophthalmologist", + "orthopedic_goods_prosthetic_devices", + "osteopaths", + "package_stores_beer_wine_and_liquor", + "paints_varnishes_and_supplies", + "parking_lots_garages", + "passenger_railways", + "pawn_shops", + "pet_shops_pet_food_and_supplies", + "petroleum_and_petroleum_products", + "photo_developing", + "photographic_photocopy_microfilm_equipment_and_supplies", + "photographic_studios", + "picture_video_production", + "piece_goods_notions_and_other_dry_goods", + "plumbing_heating_equipment_and_supplies", + "political_organizations", + "postal_services_government_only", + "precious_stones_and_metals_watches_and_jewelry", + "professional_services", + "public_warehousing_and_storage", + "quick_copy_repro_and_blueprint", + "railroads", + "real_estate_agents_and_managers_rentals", + "record_stores", + "recreational_vehicle_rentals", + "religious_goods_stores", + "religious_organizations", + "roofing_siding_sheet_metal", + "secretarial_support_services", + "security_brokers_dealers", + "service_stations", + "sewing_needlework_fabric_and_piece_goods_stores", + "shoe_repair_hat_cleaning", + "shoe_stores", + "small_appliance_repair", + "snowmobile_dealers", + "special_trade_services", + "specialty_cleaning", + "sporting_goods_stores", + "sporting_recreation_camps", + "sports_and_riding_apparel_stores", + "sports_clubs_fields", + "stamp_and_coin_stores", + "stationary_office_supplies_printing_and_writing_paper", + "stationery_stores_office_and_school_supply_stores", + "swimming_pools_sales", + "t_ui_travel_germany", + "tailors_alterations", + "tax_payments_government_agencies", + "tax_preparation_services", + "taxicabs_limousines", + "telecommunication_equipment_and_telephone_sales", + "telecommunication_services", + "telegraph_services", + "tent_and_awning_shops", + "testing_laboratories", + "theatrical_ticket_agencies", + "timeshares", + "tire_retreading_and_repair", + "tolls_bridge_fees", + "tourist_attractions_and_exhibits", + "towing_services", + "trailer_parks_campgrounds", + "transportation_services", + "travel_agencies_tour_operators", + "truck_stop_iteration", + "truck_utility_trailer_rentals", + "typesetting_plate_making_and_related_services", + "typewriter_stores", + "u_s_federal_government_agencies_or_departments", + "uniforms_commercial_clothing", + "used_merchandise_and_secondhand_stores", + "utilities", + "variety_stores", + "veterinary_services", + "video_amusement_game_supplies", + "video_game_arcades", + "video_tape_rental_stores", + "vocational_trade_schools", + "watch_jewelry_repair", + "welding_repair", + "wholesale_clubs", + "wig_and_toupee_stores", + "wires_money_orders", + "womens_accessory_and_specialty_shops", + "womens_ready_to_wear_stores", + "wrecking_and_salvage_yards", + ] + ] + ] + """ + Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories. + """ + interval: Literal[ + "all_time", "daily", "monthly", "per_authorization", "weekly", "yearly" + ] + """ + Interval (or event) to which the amount applies. + """ diff --git a/stripe/params/issuing/_card_retrieve_params.py b/stripe/params/issuing/_card_retrieve_params.py new file mode 100644 index 000000000..4c3afad9a --- /dev/null +++ b/stripe/params/issuing/_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 CardRetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/issuing/_card_return_card_params.py b/stripe/params/issuing/_card_return_card_params.py new file mode 100644 index 000000000..1f18e8e18 --- /dev/null +++ b/stripe/params/issuing/_card_return_card_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 CardReturnCardParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/issuing/_card_ship_card_params.py b/stripe/params/issuing/_card_ship_card_params.py new file mode 100644 index 000000000..6071008df --- /dev/null +++ b/stripe/params/issuing/_card_ship_card_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 CardShipCardParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/issuing/_card_submit_card_params.py b/stripe/params/issuing/_card_submit_card_params.py new file mode 100644 index 000000000..d31646696 --- /dev/null +++ b/stripe/params/issuing/_card_submit_card_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 CardSubmitCardParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/issuing/_card_update_params.py b/stripe/params/issuing/_card_update_params.py new file mode 100644 index 000000000..74a6a9d98 --- /dev/null +++ b/stripe/params/issuing/_card_update_params.py @@ -0,0 +1,1065 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class CardUpdateParams(TypedDict): + cancellation_reason: NotRequired[Literal["lost", "stolen"]] + """ + Reason why the `status` of this card is `canceled`. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + personalization_design: NotRequired[str] + pin: NotRequired["CardUpdateParamsPin"] + """ + The desired new PIN for this card. + """ + shipping: NotRequired["CardUpdateParamsShipping"] + """ + Updated shipping information for the card. + """ + spending_controls: NotRequired["CardUpdateParamsSpendingControls"] + """ + Rules that control spending for this card. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details. + """ + status: NotRequired[Literal["active", "canceled", "inactive"]] + """ + Dictates whether authorizations can be approved on this card. May be blocked from activating cards depending on past-due Cardholder requirements. Defaults to `inactive`. If this card is being canceled because it was lost or stolen, this information should be provided as `cancellation_reason`. + """ + + +class CardUpdateParamsPin(TypedDict): + encrypted_number: NotRequired[str] + """ + The card's desired new PIN, encrypted under Stripe's public key. + """ + + +class CardUpdateParamsShipping(TypedDict): + address: "CardUpdateParamsShippingAddress" + """ + The address that the card is shipped to. + """ + address_validation: NotRequired[ + "CardUpdateParamsShippingAddressValidation" + ] + """ + Address validation settings. + """ + customs: NotRequired["CardUpdateParamsShippingCustoms"] + """ + Customs information for the shipment. + """ + name: str + """ + The name printed on the shipping label when shipping the card. + """ + phone_number: NotRequired[str] + """ + Phone number of the recipient of the shipment. + """ + require_signature: NotRequired[bool] + """ + Whether a signature is required for card delivery. + """ + service: NotRequired[Literal["express", "priority", "standard"]] + """ + Shipment service. + """ + type: NotRequired[Literal["bulk", "individual"]] + """ + Packaging options. + """ + + +class CardUpdateParamsShippingAddress(TypedDict): + city: 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: 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: str + """ + ZIP or postal code. + """ + state: NotRequired[str] + """ + State, county, province, or region. + """ + + +class CardUpdateParamsShippingAddressValidation(TypedDict): + mode: Literal[ + "disabled", "normalization_only", "validation_and_normalization" + ] + """ + The address validation capabilities to use. + """ + + +class CardUpdateParamsShippingCustoms(TypedDict): + eori_number: NotRequired[str] + """ + The Economic Operators Registration and Identification (EORI) number to use for Customs. Required for bulk shipments to Europe. + """ + + +class CardUpdateParamsSpendingControls(TypedDict): + allowed_categories: NotRequired[ + List[ + Literal[ + "ac_refrigeration_repair", + "accounting_bookkeeping_services", + "advertising_services", + "agricultural_cooperative", + "airlines_air_carriers", + "airports_flying_fields", + "ambulance_services", + "amusement_parks_carnivals", + "antique_reproductions", + "antique_shops", + "aquariums", + "architectural_surveying_services", + "art_dealers_and_galleries", + "artists_supply_and_craft_shops", + "auto_and_home_supply_stores", + "auto_body_repair_shops", + "auto_paint_shops", + "auto_service_shops", + "automated_cash_disburse", + "automated_fuel_dispensers", + "automobile_associations", + "automotive_parts_and_accessories_stores", + "automotive_tire_stores", + "bail_and_bond_payments", + "bakeries", + "bands_orchestras", + "barber_and_beauty_shops", + "betting_casino_gambling", + "bicycle_shops", + "billiard_pool_establishments", + "boat_dealers", + "boat_rentals_and_leases", + "book_stores", + "books_periodicals_and_newspapers", + "bowling_alleys", + "bus_lines", + "business_secretarial_schools", + "buying_shopping_services", + "cable_satellite_and_other_pay_television_and_radio", + "camera_and_photographic_supply_stores", + "candy_nut_and_confectionery_stores", + "car_and_truck_dealers_new_used", + "car_and_truck_dealers_used_only", + "car_rental_agencies", + "car_washes", + "carpentry_services", + "carpet_upholstery_cleaning", + "caterers", + "charitable_and_social_service_organizations_fundraising", + "chemicals_and_allied_products", + "child_care_services", + "childrens_and_infants_wear_stores", + "chiropodists_podiatrists", + "chiropractors", + "cigar_stores_and_stands", + "civic_social_fraternal_associations", + "cleaning_and_maintenance", + "clothing_rental", + "colleges_universities", + "commercial_equipment", + "commercial_footwear", + "commercial_photography_art_and_graphics", + "commuter_transport_and_ferries", + "computer_network_services", + "computer_programming", + "computer_repair", + "computer_software_stores", + "computers_peripherals_and_software", + "concrete_work_services", + "construction_materials", + "consulting_public_relations", + "correspondence_schools", + "cosmetic_stores", + "counseling_services", + "country_clubs", + "courier_services", + "court_costs", + "credit_reporting_agencies", + "cruise_lines", + "dairy_products_stores", + "dance_hall_studios_schools", + "dating_escort_services", + "dentists_orthodontists", + "department_stores", + "detective_agencies", + "digital_goods_applications", + "digital_goods_games", + "digital_goods_large_volume", + "digital_goods_media", + "direct_marketing_catalog_merchant", + "direct_marketing_combination_catalog_and_retail_merchant", + "direct_marketing_inbound_telemarketing", + "direct_marketing_insurance_services", + "direct_marketing_other", + "direct_marketing_outbound_telemarketing", + "direct_marketing_subscription", + "direct_marketing_travel", + "discount_stores", + "doctors", + "door_to_door_sales", + "drapery_window_covering_and_upholstery_stores", + "drinking_places", + "drug_stores_and_pharmacies", + "drugs_drug_proprietaries_and_druggist_sundries", + "dry_cleaners", + "durable_goods", + "duty_free_stores", + "eating_places_restaurants", + "educational_services", + "electric_razor_stores", + "electric_vehicle_charging", + "electrical_parts_and_equipment", + "electrical_services", + "electronics_repair_shops", + "electronics_stores", + "elementary_secondary_schools", + "emergency_services_gcas_visa_use_only", + "employment_temp_agencies", + "equipment_rental", + "exterminating_services", + "family_clothing_stores", + "fast_food_restaurants", + "financial_institutions", + "fines_government_administrative_entities", + "fireplace_fireplace_screens_and_accessories_stores", + "floor_covering_stores", + "florists", + "florists_supplies_nursery_stock_and_flowers", + "freezer_and_locker_meat_provisioners", + "fuel_dealers_non_automotive", + "funeral_services_crematories", + "furniture_home_furnishings_and_equipment_stores_except_appliances", + "furniture_repair_refinishing", + "furriers_and_fur_shops", + "general_services", + "gift_card_novelty_and_souvenir_shops", + "glass_paint_and_wallpaper_stores", + "glassware_crystal_stores", + "golf_courses_public", + "government_licensed_horse_dog_racing_us_region_only", + "government_licensed_online_casions_online_gambling_us_region_only", + "government_owned_lotteries_non_us_region", + "government_owned_lotteries_us_region_only", + "government_services", + "grocery_stores_supermarkets", + "hardware_equipment_and_supplies", + "hardware_stores", + "health_and_beauty_spas", + "hearing_aids_sales_and_supplies", + "heating_plumbing_a_c", + "hobby_toy_and_game_shops", + "home_supply_warehouse_stores", + "hospitals", + "hotels_motels_and_resorts", + "household_appliance_stores", + "industrial_supplies", + "information_retrieval_services", + "insurance_default", + "insurance_underwriting_premiums", + "intra_company_purchases", + "jewelry_stores_watches_clocks_and_silverware_stores", + "landscaping_services", + "laundries", + "laundry_cleaning_services", + "legal_services_attorneys", + "luggage_and_leather_goods_stores", + "lumber_building_materials_stores", + "manual_cash_disburse", + "marinas_service_and_supplies", + "marketplaces", + "masonry_stonework_and_plaster", + "massage_parlors", + "medical_and_dental_labs", + "medical_dental_ophthalmic_and_hospital_equipment_and_supplies", + "medical_services", + "membership_organizations", + "mens_and_boys_clothing_and_accessories_stores", + "mens_womens_clothing_stores", + "metal_service_centers", + "miscellaneous", + "miscellaneous_apparel_and_accessory_shops", + "miscellaneous_auto_dealers", + "miscellaneous_business_services", + "miscellaneous_food_stores", + "miscellaneous_general_merchandise", + "miscellaneous_general_services", + "miscellaneous_home_furnishing_specialty_stores", + "miscellaneous_publishing_and_printing", + "miscellaneous_recreation_services", + "miscellaneous_repair_shops", + "miscellaneous_specialty_retail", + "mobile_home_dealers", + "motion_picture_theaters", + "motor_freight_carriers_and_trucking", + "motor_homes_dealers", + "motor_vehicle_supplies_and_new_parts", + "motorcycle_shops_and_dealers", + "motorcycle_shops_dealers", + "music_stores_musical_instruments_pianos_and_sheet_music", + "news_dealers_and_newsstands", + "non_fi_money_orders", + "non_fi_stored_value_card_purchase_load", + "nondurable_goods", + "nurseries_lawn_and_garden_supply_stores", + "nursing_personal_care", + "office_and_commercial_furniture", + "opticians_eyeglasses", + "optometrists_ophthalmologist", + "orthopedic_goods_prosthetic_devices", + "osteopaths", + "package_stores_beer_wine_and_liquor", + "paints_varnishes_and_supplies", + "parking_lots_garages", + "passenger_railways", + "pawn_shops", + "pet_shops_pet_food_and_supplies", + "petroleum_and_petroleum_products", + "photo_developing", + "photographic_photocopy_microfilm_equipment_and_supplies", + "photographic_studios", + "picture_video_production", + "piece_goods_notions_and_other_dry_goods", + "plumbing_heating_equipment_and_supplies", + "political_organizations", + "postal_services_government_only", + "precious_stones_and_metals_watches_and_jewelry", + "professional_services", + "public_warehousing_and_storage", + "quick_copy_repro_and_blueprint", + "railroads", + "real_estate_agents_and_managers_rentals", + "record_stores", + "recreational_vehicle_rentals", + "religious_goods_stores", + "religious_organizations", + "roofing_siding_sheet_metal", + "secretarial_support_services", + "security_brokers_dealers", + "service_stations", + "sewing_needlework_fabric_and_piece_goods_stores", + "shoe_repair_hat_cleaning", + "shoe_stores", + "small_appliance_repair", + "snowmobile_dealers", + "special_trade_services", + "specialty_cleaning", + "sporting_goods_stores", + "sporting_recreation_camps", + "sports_and_riding_apparel_stores", + "sports_clubs_fields", + "stamp_and_coin_stores", + "stationary_office_supplies_printing_and_writing_paper", + "stationery_stores_office_and_school_supply_stores", + "swimming_pools_sales", + "t_ui_travel_germany", + "tailors_alterations", + "tax_payments_government_agencies", + "tax_preparation_services", + "taxicabs_limousines", + "telecommunication_equipment_and_telephone_sales", + "telecommunication_services", + "telegraph_services", + "tent_and_awning_shops", + "testing_laboratories", + "theatrical_ticket_agencies", + "timeshares", + "tire_retreading_and_repair", + "tolls_bridge_fees", + "tourist_attractions_and_exhibits", + "towing_services", + "trailer_parks_campgrounds", + "transportation_services", + "travel_agencies_tour_operators", + "truck_stop_iteration", + "truck_utility_trailer_rentals", + "typesetting_plate_making_and_related_services", + "typewriter_stores", + "u_s_federal_government_agencies_or_departments", + "uniforms_commercial_clothing", + "used_merchandise_and_secondhand_stores", + "utilities", + "variety_stores", + "veterinary_services", + "video_amusement_game_supplies", + "video_game_arcades", + "video_tape_rental_stores", + "vocational_trade_schools", + "watch_jewelry_repair", + "welding_repair", + "wholesale_clubs", + "wig_and_toupee_stores", + "wires_money_orders", + "womens_accessory_and_specialty_shops", + "womens_ready_to_wear_stores", + "wrecking_and_salvage_yards", + ] + ] + ] + """ + Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to allow. All other categories will be blocked. Cannot be set with `blocked_categories`. + """ + allowed_merchant_countries: NotRequired[List[str]] + """ + Array of strings containing representing countries from which authorizations will be allowed. Authorizations from merchants in all other countries will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `blocked_merchant_countries`. Provide an empty value to unset this control. + """ + blocked_categories: NotRequired[ + List[ + Literal[ + "ac_refrigeration_repair", + "accounting_bookkeeping_services", + "advertising_services", + "agricultural_cooperative", + "airlines_air_carriers", + "airports_flying_fields", + "ambulance_services", + "amusement_parks_carnivals", + "antique_reproductions", + "antique_shops", + "aquariums", + "architectural_surveying_services", + "art_dealers_and_galleries", + "artists_supply_and_craft_shops", + "auto_and_home_supply_stores", + "auto_body_repair_shops", + "auto_paint_shops", + "auto_service_shops", + "automated_cash_disburse", + "automated_fuel_dispensers", + "automobile_associations", + "automotive_parts_and_accessories_stores", + "automotive_tire_stores", + "bail_and_bond_payments", + "bakeries", + "bands_orchestras", + "barber_and_beauty_shops", + "betting_casino_gambling", + "bicycle_shops", + "billiard_pool_establishments", + "boat_dealers", + "boat_rentals_and_leases", + "book_stores", + "books_periodicals_and_newspapers", + "bowling_alleys", + "bus_lines", + "business_secretarial_schools", + "buying_shopping_services", + "cable_satellite_and_other_pay_television_and_radio", + "camera_and_photographic_supply_stores", + "candy_nut_and_confectionery_stores", + "car_and_truck_dealers_new_used", + "car_and_truck_dealers_used_only", + "car_rental_agencies", + "car_washes", + "carpentry_services", + "carpet_upholstery_cleaning", + "caterers", + "charitable_and_social_service_organizations_fundraising", + "chemicals_and_allied_products", + "child_care_services", + "childrens_and_infants_wear_stores", + "chiropodists_podiatrists", + "chiropractors", + "cigar_stores_and_stands", + "civic_social_fraternal_associations", + "cleaning_and_maintenance", + "clothing_rental", + "colleges_universities", + "commercial_equipment", + "commercial_footwear", + "commercial_photography_art_and_graphics", + "commuter_transport_and_ferries", + "computer_network_services", + "computer_programming", + "computer_repair", + "computer_software_stores", + "computers_peripherals_and_software", + "concrete_work_services", + "construction_materials", + "consulting_public_relations", + "correspondence_schools", + "cosmetic_stores", + "counseling_services", + "country_clubs", + "courier_services", + "court_costs", + "credit_reporting_agencies", + "cruise_lines", + "dairy_products_stores", + "dance_hall_studios_schools", + "dating_escort_services", + "dentists_orthodontists", + "department_stores", + "detective_agencies", + "digital_goods_applications", + "digital_goods_games", + "digital_goods_large_volume", + "digital_goods_media", + "direct_marketing_catalog_merchant", + "direct_marketing_combination_catalog_and_retail_merchant", + "direct_marketing_inbound_telemarketing", + "direct_marketing_insurance_services", + "direct_marketing_other", + "direct_marketing_outbound_telemarketing", + "direct_marketing_subscription", + "direct_marketing_travel", + "discount_stores", + "doctors", + "door_to_door_sales", + "drapery_window_covering_and_upholstery_stores", + "drinking_places", + "drug_stores_and_pharmacies", + "drugs_drug_proprietaries_and_druggist_sundries", + "dry_cleaners", + "durable_goods", + "duty_free_stores", + "eating_places_restaurants", + "educational_services", + "electric_razor_stores", + "electric_vehicle_charging", + "electrical_parts_and_equipment", + "electrical_services", + "electronics_repair_shops", + "electronics_stores", + "elementary_secondary_schools", + "emergency_services_gcas_visa_use_only", + "employment_temp_agencies", + "equipment_rental", + "exterminating_services", + "family_clothing_stores", + "fast_food_restaurants", + "financial_institutions", + "fines_government_administrative_entities", + "fireplace_fireplace_screens_and_accessories_stores", + "floor_covering_stores", + "florists", + "florists_supplies_nursery_stock_and_flowers", + "freezer_and_locker_meat_provisioners", + "fuel_dealers_non_automotive", + "funeral_services_crematories", + "furniture_home_furnishings_and_equipment_stores_except_appliances", + "furniture_repair_refinishing", + "furriers_and_fur_shops", + "general_services", + "gift_card_novelty_and_souvenir_shops", + "glass_paint_and_wallpaper_stores", + "glassware_crystal_stores", + "golf_courses_public", + "government_licensed_horse_dog_racing_us_region_only", + "government_licensed_online_casions_online_gambling_us_region_only", + "government_owned_lotteries_non_us_region", + "government_owned_lotteries_us_region_only", + "government_services", + "grocery_stores_supermarkets", + "hardware_equipment_and_supplies", + "hardware_stores", + "health_and_beauty_spas", + "hearing_aids_sales_and_supplies", + "heating_plumbing_a_c", + "hobby_toy_and_game_shops", + "home_supply_warehouse_stores", + "hospitals", + "hotels_motels_and_resorts", + "household_appliance_stores", + "industrial_supplies", + "information_retrieval_services", + "insurance_default", + "insurance_underwriting_premiums", + "intra_company_purchases", + "jewelry_stores_watches_clocks_and_silverware_stores", + "landscaping_services", + "laundries", + "laundry_cleaning_services", + "legal_services_attorneys", + "luggage_and_leather_goods_stores", + "lumber_building_materials_stores", + "manual_cash_disburse", + "marinas_service_and_supplies", + "marketplaces", + "masonry_stonework_and_plaster", + "massage_parlors", + "medical_and_dental_labs", + "medical_dental_ophthalmic_and_hospital_equipment_and_supplies", + "medical_services", + "membership_organizations", + "mens_and_boys_clothing_and_accessories_stores", + "mens_womens_clothing_stores", + "metal_service_centers", + "miscellaneous", + "miscellaneous_apparel_and_accessory_shops", + "miscellaneous_auto_dealers", + "miscellaneous_business_services", + "miscellaneous_food_stores", + "miscellaneous_general_merchandise", + "miscellaneous_general_services", + "miscellaneous_home_furnishing_specialty_stores", + "miscellaneous_publishing_and_printing", + "miscellaneous_recreation_services", + "miscellaneous_repair_shops", + "miscellaneous_specialty_retail", + "mobile_home_dealers", + "motion_picture_theaters", + "motor_freight_carriers_and_trucking", + "motor_homes_dealers", + "motor_vehicle_supplies_and_new_parts", + "motorcycle_shops_and_dealers", + "motorcycle_shops_dealers", + "music_stores_musical_instruments_pianos_and_sheet_music", + "news_dealers_and_newsstands", + "non_fi_money_orders", + "non_fi_stored_value_card_purchase_load", + "nondurable_goods", + "nurseries_lawn_and_garden_supply_stores", + "nursing_personal_care", + "office_and_commercial_furniture", + "opticians_eyeglasses", + "optometrists_ophthalmologist", + "orthopedic_goods_prosthetic_devices", + "osteopaths", + "package_stores_beer_wine_and_liquor", + "paints_varnishes_and_supplies", + "parking_lots_garages", + "passenger_railways", + "pawn_shops", + "pet_shops_pet_food_and_supplies", + "petroleum_and_petroleum_products", + "photo_developing", + "photographic_photocopy_microfilm_equipment_and_supplies", + "photographic_studios", + "picture_video_production", + "piece_goods_notions_and_other_dry_goods", + "plumbing_heating_equipment_and_supplies", + "political_organizations", + "postal_services_government_only", + "precious_stones_and_metals_watches_and_jewelry", + "professional_services", + "public_warehousing_and_storage", + "quick_copy_repro_and_blueprint", + "railroads", + "real_estate_agents_and_managers_rentals", + "record_stores", + "recreational_vehicle_rentals", + "religious_goods_stores", + "religious_organizations", + "roofing_siding_sheet_metal", + "secretarial_support_services", + "security_brokers_dealers", + "service_stations", + "sewing_needlework_fabric_and_piece_goods_stores", + "shoe_repair_hat_cleaning", + "shoe_stores", + "small_appliance_repair", + "snowmobile_dealers", + "special_trade_services", + "specialty_cleaning", + "sporting_goods_stores", + "sporting_recreation_camps", + "sports_and_riding_apparel_stores", + "sports_clubs_fields", + "stamp_and_coin_stores", + "stationary_office_supplies_printing_and_writing_paper", + "stationery_stores_office_and_school_supply_stores", + "swimming_pools_sales", + "t_ui_travel_germany", + "tailors_alterations", + "tax_payments_government_agencies", + "tax_preparation_services", + "taxicabs_limousines", + "telecommunication_equipment_and_telephone_sales", + "telecommunication_services", + "telegraph_services", + "tent_and_awning_shops", + "testing_laboratories", + "theatrical_ticket_agencies", + "timeshares", + "tire_retreading_and_repair", + "tolls_bridge_fees", + "tourist_attractions_and_exhibits", + "towing_services", + "trailer_parks_campgrounds", + "transportation_services", + "travel_agencies_tour_operators", + "truck_stop_iteration", + "truck_utility_trailer_rentals", + "typesetting_plate_making_and_related_services", + "typewriter_stores", + "u_s_federal_government_agencies_or_departments", + "uniforms_commercial_clothing", + "used_merchandise_and_secondhand_stores", + "utilities", + "variety_stores", + "veterinary_services", + "video_amusement_game_supplies", + "video_game_arcades", + "video_tape_rental_stores", + "vocational_trade_schools", + "watch_jewelry_repair", + "welding_repair", + "wholesale_clubs", + "wig_and_toupee_stores", + "wires_money_orders", + "womens_accessory_and_specialty_shops", + "womens_ready_to_wear_stores", + "wrecking_and_salvage_yards", + ] + ] + ] + """ + Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to decline. All other categories will be allowed. Cannot be set with `allowed_categories`. + """ + blocked_merchant_countries: NotRequired[List[str]] + """ + Array of strings containing representing countries from which authorizations will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `allowed_merchant_countries`. Provide an empty value to unset this control. + """ + spending_limits: NotRequired[ + List["CardUpdateParamsSpendingControlsSpendingLimit"] + ] + """ + Limit spending with amount-based rules that apply across any cards this card replaced (i.e., its `replacement_for` card and _that_ card's `replacement_for` card, up the chain). + """ + + +class CardUpdateParamsSpendingControlsSpendingLimit(TypedDict): + amount: int + """ + Maximum amount allowed to spend per interval. + """ + categories: NotRequired[ + List[ + Literal[ + "ac_refrigeration_repair", + "accounting_bookkeeping_services", + "advertising_services", + "agricultural_cooperative", + "airlines_air_carriers", + "airports_flying_fields", + "ambulance_services", + "amusement_parks_carnivals", + "antique_reproductions", + "antique_shops", + "aquariums", + "architectural_surveying_services", + "art_dealers_and_galleries", + "artists_supply_and_craft_shops", + "auto_and_home_supply_stores", + "auto_body_repair_shops", + "auto_paint_shops", + "auto_service_shops", + "automated_cash_disburse", + "automated_fuel_dispensers", + "automobile_associations", + "automotive_parts_and_accessories_stores", + "automotive_tire_stores", + "bail_and_bond_payments", + "bakeries", + "bands_orchestras", + "barber_and_beauty_shops", + "betting_casino_gambling", + "bicycle_shops", + "billiard_pool_establishments", + "boat_dealers", + "boat_rentals_and_leases", + "book_stores", + "books_periodicals_and_newspapers", + "bowling_alleys", + "bus_lines", + "business_secretarial_schools", + "buying_shopping_services", + "cable_satellite_and_other_pay_television_and_radio", + "camera_and_photographic_supply_stores", + "candy_nut_and_confectionery_stores", + "car_and_truck_dealers_new_used", + "car_and_truck_dealers_used_only", + "car_rental_agencies", + "car_washes", + "carpentry_services", + "carpet_upholstery_cleaning", + "caterers", + "charitable_and_social_service_organizations_fundraising", + "chemicals_and_allied_products", + "child_care_services", + "childrens_and_infants_wear_stores", + "chiropodists_podiatrists", + "chiropractors", + "cigar_stores_and_stands", + "civic_social_fraternal_associations", + "cleaning_and_maintenance", + "clothing_rental", + "colleges_universities", + "commercial_equipment", + "commercial_footwear", + "commercial_photography_art_and_graphics", + "commuter_transport_and_ferries", + "computer_network_services", + "computer_programming", + "computer_repair", + "computer_software_stores", + "computers_peripherals_and_software", + "concrete_work_services", + "construction_materials", + "consulting_public_relations", + "correspondence_schools", + "cosmetic_stores", + "counseling_services", + "country_clubs", + "courier_services", + "court_costs", + "credit_reporting_agencies", + "cruise_lines", + "dairy_products_stores", + "dance_hall_studios_schools", + "dating_escort_services", + "dentists_orthodontists", + "department_stores", + "detective_agencies", + "digital_goods_applications", + "digital_goods_games", + "digital_goods_large_volume", + "digital_goods_media", + "direct_marketing_catalog_merchant", + "direct_marketing_combination_catalog_and_retail_merchant", + "direct_marketing_inbound_telemarketing", + "direct_marketing_insurance_services", + "direct_marketing_other", + "direct_marketing_outbound_telemarketing", + "direct_marketing_subscription", + "direct_marketing_travel", + "discount_stores", + "doctors", + "door_to_door_sales", + "drapery_window_covering_and_upholstery_stores", + "drinking_places", + "drug_stores_and_pharmacies", + "drugs_drug_proprietaries_and_druggist_sundries", + "dry_cleaners", + "durable_goods", + "duty_free_stores", + "eating_places_restaurants", + "educational_services", + "electric_razor_stores", + "electric_vehicle_charging", + "electrical_parts_and_equipment", + "electrical_services", + "electronics_repair_shops", + "electronics_stores", + "elementary_secondary_schools", + "emergency_services_gcas_visa_use_only", + "employment_temp_agencies", + "equipment_rental", + "exterminating_services", + "family_clothing_stores", + "fast_food_restaurants", + "financial_institutions", + "fines_government_administrative_entities", + "fireplace_fireplace_screens_and_accessories_stores", + "floor_covering_stores", + "florists", + "florists_supplies_nursery_stock_and_flowers", + "freezer_and_locker_meat_provisioners", + "fuel_dealers_non_automotive", + "funeral_services_crematories", + "furniture_home_furnishings_and_equipment_stores_except_appliances", + "furniture_repair_refinishing", + "furriers_and_fur_shops", + "general_services", + "gift_card_novelty_and_souvenir_shops", + "glass_paint_and_wallpaper_stores", + "glassware_crystal_stores", + "golf_courses_public", + "government_licensed_horse_dog_racing_us_region_only", + "government_licensed_online_casions_online_gambling_us_region_only", + "government_owned_lotteries_non_us_region", + "government_owned_lotteries_us_region_only", + "government_services", + "grocery_stores_supermarkets", + "hardware_equipment_and_supplies", + "hardware_stores", + "health_and_beauty_spas", + "hearing_aids_sales_and_supplies", + "heating_plumbing_a_c", + "hobby_toy_and_game_shops", + "home_supply_warehouse_stores", + "hospitals", + "hotels_motels_and_resorts", + "household_appliance_stores", + "industrial_supplies", + "information_retrieval_services", + "insurance_default", + "insurance_underwriting_premiums", + "intra_company_purchases", + "jewelry_stores_watches_clocks_and_silverware_stores", + "landscaping_services", + "laundries", + "laundry_cleaning_services", + "legal_services_attorneys", + "luggage_and_leather_goods_stores", + "lumber_building_materials_stores", + "manual_cash_disburse", + "marinas_service_and_supplies", + "marketplaces", + "masonry_stonework_and_plaster", + "massage_parlors", + "medical_and_dental_labs", + "medical_dental_ophthalmic_and_hospital_equipment_and_supplies", + "medical_services", + "membership_organizations", + "mens_and_boys_clothing_and_accessories_stores", + "mens_womens_clothing_stores", + "metal_service_centers", + "miscellaneous", + "miscellaneous_apparel_and_accessory_shops", + "miscellaneous_auto_dealers", + "miscellaneous_business_services", + "miscellaneous_food_stores", + "miscellaneous_general_merchandise", + "miscellaneous_general_services", + "miscellaneous_home_furnishing_specialty_stores", + "miscellaneous_publishing_and_printing", + "miscellaneous_recreation_services", + "miscellaneous_repair_shops", + "miscellaneous_specialty_retail", + "mobile_home_dealers", + "motion_picture_theaters", + "motor_freight_carriers_and_trucking", + "motor_homes_dealers", + "motor_vehicle_supplies_and_new_parts", + "motorcycle_shops_and_dealers", + "motorcycle_shops_dealers", + "music_stores_musical_instruments_pianos_and_sheet_music", + "news_dealers_and_newsstands", + "non_fi_money_orders", + "non_fi_stored_value_card_purchase_load", + "nondurable_goods", + "nurseries_lawn_and_garden_supply_stores", + "nursing_personal_care", + "office_and_commercial_furniture", + "opticians_eyeglasses", + "optometrists_ophthalmologist", + "orthopedic_goods_prosthetic_devices", + "osteopaths", + "package_stores_beer_wine_and_liquor", + "paints_varnishes_and_supplies", + "parking_lots_garages", + "passenger_railways", + "pawn_shops", + "pet_shops_pet_food_and_supplies", + "petroleum_and_petroleum_products", + "photo_developing", + "photographic_photocopy_microfilm_equipment_and_supplies", + "photographic_studios", + "picture_video_production", + "piece_goods_notions_and_other_dry_goods", + "plumbing_heating_equipment_and_supplies", + "political_organizations", + "postal_services_government_only", + "precious_stones_and_metals_watches_and_jewelry", + "professional_services", + "public_warehousing_and_storage", + "quick_copy_repro_and_blueprint", + "railroads", + "real_estate_agents_and_managers_rentals", + "record_stores", + "recreational_vehicle_rentals", + "religious_goods_stores", + "religious_organizations", + "roofing_siding_sheet_metal", + "secretarial_support_services", + "security_brokers_dealers", + "service_stations", + "sewing_needlework_fabric_and_piece_goods_stores", + "shoe_repair_hat_cleaning", + "shoe_stores", + "small_appliance_repair", + "snowmobile_dealers", + "special_trade_services", + "specialty_cleaning", + "sporting_goods_stores", + "sporting_recreation_camps", + "sports_and_riding_apparel_stores", + "sports_clubs_fields", + "stamp_and_coin_stores", + "stationary_office_supplies_printing_and_writing_paper", + "stationery_stores_office_and_school_supply_stores", + "swimming_pools_sales", + "t_ui_travel_germany", + "tailors_alterations", + "tax_payments_government_agencies", + "tax_preparation_services", + "taxicabs_limousines", + "telecommunication_equipment_and_telephone_sales", + "telecommunication_services", + "telegraph_services", + "tent_and_awning_shops", + "testing_laboratories", + "theatrical_ticket_agencies", + "timeshares", + "tire_retreading_and_repair", + "tolls_bridge_fees", + "tourist_attractions_and_exhibits", + "towing_services", + "trailer_parks_campgrounds", + "transportation_services", + "travel_agencies_tour_operators", + "truck_stop_iteration", + "truck_utility_trailer_rentals", + "typesetting_plate_making_and_related_services", + "typewriter_stores", + "u_s_federal_government_agencies_or_departments", + "uniforms_commercial_clothing", + "used_merchandise_and_secondhand_stores", + "utilities", + "variety_stores", + "veterinary_services", + "video_amusement_game_supplies", + "video_game_arcades", + "video_tape_rental_stores", + "vocational_trade_schools", + "watch_jewelry_repair", + "welding_repair", + "wholesale_clubs", + "wig_and_toupee_stores", + "wires_money_orders", + "womens_accessory_and_specialty_shops", + "womens_ready_to_wear_stores", + "wrecking_and_salvage_yards", + ] + ] + ] + """ + Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories. + """ + interval: Literal[ + "all_time", "daily", "monthly", "per_authorization", "weekly", "yearly" + ] + """ + Interval (or event) to which the amount applies. + """ diff --git a/stripe/params/issuing/_cardholder_create_params.py b/stripe/params/issuing/_cardholder_create_params.py new file mode 100644 index 000000000..d4a022525 --- /dev/null +++ b/stripe/params/issuing/_cardholder_create_params.py @@ -0,0 +1,1129 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class CardholderCreateParams(RequestOptions): + billing: "CardholderCreateParamsBilling" + """ + The cardholder's billing address. + """ + company: NotRequired["CardholderCreateParamsCompany"] + """ + Additional information about a `company` cardholder. + """ + email: NotRequired[str] + """ + The cardholder's email address. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + individual: NotRequired["CardholderCreateParamsIndividual"] + """ + Additional information about an `individual` cardholder. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + name: str + """ + The cardholder's name. This will be printed on cards issued to them. The maximum length of this field is 24 characters. This field cannot contain any special characters or numbers. + """ + phone_number: NotRequired[str] + """ + The cardholder's phone number. This will be transformed to [E.164](https://en.wikipedia.org/wiki/E.164) if it is not provided in that format already. This is required for all cardholders who will be creating EU cards. + While phone number is optional if the cardholder will not be creating EU cards, note that this cardholder will not be eligible for 3DS without a phone number. See the [3D Secure documentation](https://stripe.com/docs/issuing/3d-secure#when-is-3d-secure-applied) for more details. + """ + preferred_locales: NotRequired[List[Literal["de", "en", "es", "fr", "it"]]] + """ + The cardholder's preferred locales (languages), ordered by preference. Locales can be `de`, `en`, `es`, `fr`, or `it`. + This changes the language of the [3D Secure flow](https://stripe.com/docs/issuing/3d-secure) and one-time password messages sent to the cardholder. + """ + spending_controls: NotRequired["CardholderCreateParamsSpendingControls"] + """ + Rules that control spending across this cardholder's cards. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details. + """ + status: NotRequired[Literal["active", "inactive"]] + """ + Specifies whether to permit authorizations on this cardholder's cards. Defaults to `active`. + """ + type: NotRequired[Literal["company", "individual"]] + """ + One of `individual` or `company`. See [Choose a cardholder type](https://stripe.com/docs/issuing/other/choose-cardholder) for more details. + """ + + +class CardholderCreateParamsBilling(TypedDict): + address: "CardholderCreateParamsBillingAddress" + """ + The cardholder's billing address. + """ + + +class CardholderCreateParamsBillingAddress(TypedDict): + city: 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: 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: str + """ + ZIP or postal code. + """ + state: NotRequired[str] + """ + State, county, province, or region. + """ + + +class CardholderCreateParamsCompany(TypedDict): + tax_id: NotRequired[str] + """ + The entity's business ID number. + """ + + +class CardholderCreateParamsIndividual(TypedDict): + card_issuing: NotRequired["CardholderCreateParamsIndividualCardIssuing"] + """ + Information related to the card_issuing program for this cardholder. + """ + dob: NotRequired["CardholderCreateParamsIndividualDob"] + """ + The date of birth of this cardholder. Cardholders must be older than 13 years old. + """ + first_name: NotRequired[str] + """ + The first name of this cardholder. Required before activating Cards. This field cannot contain any numbers, special characters (except periods, commas, hyphens, spaces and apostrophes) or non-latin letters. + """ + last_name: NotRequired[str] + """ + The last name of this cardholder. Required before activating Cards. This field cannot contain any numbers, special characters (except periods, commas, hyphens, spaces and apostrophes) or non-latin letters. + """ + verification: NotRequired["CardholderCreateParamsIndividualVerification"] + """ + Government-issued ID document for this cardholder. + """ + + +class CardholderCreateParamsIndividualCardIssuing(TypedDict): + user_terms_acceptance: NotRequired[ + "CardholderCreateParamsIndividualCardIssuingUserTermsAcceptance" + ] + """ + Information about cardholder acceptance of Celtic [Authorized User Terms](https://stripe.com/docs/issuing/cards#accept-authorized-user-terms). Required for cards backed by a Celtic program. + """ + + +class CardholderCreateParamsIndividualCardIssuingUserTermsAcceptance( + TypedDict +): + date: NotRequired[int] + """ + The Unix timestamp marking when the cardholder accepted the Authorized User Terms. Required for Celtic Spend Card users. + """ + ip: NotRequired[str] + """ + The IP address from which the cardholder accepted the Authorized User Terms. Required for Celtic Spend Card users. + """ + user_agent: NotRequired["Literal['']|str"] + """ + The user agent of the browser from which the cardholder accepted the Authorized User Terms. + """ + + +class CardholderCreateParamsIndividualDob(TypedDict): + day: int + """ + The day of birth, between 1 and 31. + """ + month: int + """ + The month of birth, between 1 and 12. + """ + year: int + """ + The four-digit year of birth. + """ + + +class CardholderCreateParamsIndividualVerification(TypedDict): + document: NotRequired[ + "CardholderCreateParamsIndividualVerificationDocument" + ] + """ + An identifying document, either a passport or local ID card. + """ + + +class CardholderCreateParamsIndividualVerificationDocument(TypedDict): + back: NotRequired[str] + """ + The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. + """ + front: NotRequired[str] + """ + The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. + """ + + +class CardholderCreateParamsSpendingControls(TypedDict): + allowed_categories: NotRequired[ + List[ + Literal[ + "ac_refrigeration_repair", + "accounting_bookkeeping_services", + "advertising_services", + "agricultural_cooperative", + "airlines_air_carriers", + "airports_flying_fields", + "ambulance_services", + "amusement_parks_carnivals", + "antique_reproductions", + "antique_shops", + "aquariums", + "architectural_surveying_services", + "art_dealers_and_galleries", + "artists_supply_and_craft_shops", + "auto_and_home_supply_stores", + "auto_body_repair_shops", + "auto_paint_shops", + "auto_service_shops", + "automated_cash_disburse", + "automated_fuel_dispensers", + "automobile_associations", + "automotive_parts_and_accessories_stores", + "automotive_tire_stores", + "bail_and_bond_payments", + "bakeries", + "bands_orchestras", + "barber_and_beauty_shops", + "betting_casino_gambling", + "bicycle_shops", + "billiard_pool_establishments", + "boat_dealers", + "boat_rentals_and_leases", + "book_stores", + "books_periodicals_and_newspapers", + "bowling_alleys", + "bus_lines", + "business_secretarial_schools", + "buying_shopping_services", + "cable_satellite_and_other_pay_television_and_radio", + "camera_and_photographic_supply_stores", + "candy_nut_and_confectionery_stores", + "car_and_truck_dealers_new_used", + "car_and_truck_dealers_used_only", + "car_rental_agencies", + "car_washes", + "carpentry_services", + "carpet_upholstery_cleaning", + "caterers", + "charitable_and_social_service_organizations_fundraising", + "chemicals_and_allied_products", + "child_care_services", + "childrens_and_infants_wear_stores", + "chiropodists_podiatrists", + "chiropractors", + "cigar_stores_and_stands", + "civic_social_fraternal_associations", + "cleaning_and_maintenance", + "clothing_rental", + "colleges_universities", + "commercial_equipment", + "commercial_footwear", + "commercial_photography_art_and_graphics", + "commuter_transport_and_ferries", + "computer_network_services", + "computer_programming", + "computer_repair", + "computer_software_stores", + "computers_peripherals_and_software", + "concrete_work_services", + "construction_materials", + "consulting_public_relations", + "correspondence_schools", + "cosmetic_stores", + "counseling_services", + "country_clubs", + "courier_services", + "court_costs", + "credit_reporting_agencies", + "cruise_lines", + "dairy_products_stores", + "dance_hall_studios_schools", + "dating_escort_services", + "dentists_orthodontists", + "department_stores", + "detective_agencies", + "digital_goods_applications", + "digital_goods_games", + "digital_goods_large_volume", + "digital_goods_media", + "direct_marketing_catalog_merchant", + "direct_marketing_combination_catalog_and_retail_merchant", + "direct_marketing_inbound_telemarketing", + "direct_marketing_insurance_services", + "direct_marketing_other", + "direct_marketing_outbound_telemarketing", + "direct_marketing_subscription", + "direct_marketing_travel", + "discount_stores", + "doctors", + "door_to_door_sales", + "drapery_window_covering_and_upholstery_stores", + "drinking_places", + "drug_stores_and_pharmacies", + "drugs_drug_proprietaries_and_druggist_sundries", + "dry_cleaners", + "durable_goods", + "duty_free_stores", + "eating_places_restaurants", + "educational_services", + "electric_razor_stores", + "electric_vehicle_charging", + "electrical_parts_and_equipment", + "electrical_services", + "electronics_repair_shops", + "electronics_stores", + "elementary_secondary_schools", + "emergency_services_gcas_visa_use_only", + "employment_temp_agencies", + "equipment_rental", + "exterminating_services", + "family_clothing_stores", + "fast_food_restaurants", + "financial_institutions", + "fines_government_administrative_entities", + "fireplace_fireplace_screens_and_accessories_stores", + "floor_covering_stores", + "florists", + "florists_supplies_nursery_stock_and_flowers", + "freezer_and_locker_meat_provisioners", + "fuel_dealers_non_automotive", + "funeral_services_crematories", + "furniture_home_furnishings_and_equipment_stores_except_appliances", + "furniture_repair_refinishing", + "furriers_and_fur_shops", + "general_services", + "gift_card_novelty_and_souvenir_shops", + "glass_paint_and_wallpaper_stores", + "glassware_crystal_stores", + "golf_courses_public", + "government_licensed_horse_dog_racing_us_region_only", + "government_licensed_online_casions_online_gambling_us_region_only", + "government_owned_lotteries_non_us_region", + "government_owned_lotteries_us_region_only", + "government_services", + "grocery_stores_supermarkets", + "hardware_equipment_and_supplies", + "hardware_stores", + "health_and_beauty_spas", + "hearing_aids_sales_and_supplies", + "heating_plumbing_a_c", + "hobby_toy_and_game_shops", + "home_supply_warehouse_stores", + "hospitals", + "hotels_motels_and_resorts", + "household_appliance_stores", + "industrial_supplies", + "information_retrieval_services", + "insurance_default", + "insurance_underwriting_premiums", + "intra_company_purchases", + "jewelry_stores_watches_clocks_and_silverware_stores", + "landscaping_services", + "laundries", + "laundry_cleaning_services", + "legal_services_attorneys", + "luggage_and_leather_goods_stores", + "lumber_building_materials_stores", + "manual_cash_disburse", + "marinas_service_and_supplies", + "marketplaces", + "masonry_stonework_and_plaster", + "massage_parlors", + "medical_and_dental_labs", + "medical_dental_ophthalmic_and_hospital_equipment_and_supplies", + "medical_services", + "membership_organizations", + "mens_and_boys_clothing_and_accessories_stores", + "mens_womens_clothing_stores", + "metal_service_centers", + "miscellaneous", + "miscellaneous_apparel_and_accessory_shops", + "miscellaneous_auto_dealers", + "miscellaneous_business_services", + "miscellaneous_food_stores", + "miscellaneous_general_merchandise", + "miscellaneous_general_services", + "miscellaneous_home_furnishing_specialty_stores", + "miscellaneous_publishing_and_printing", + "miscellaneous_recreation_services", + "miscellaneous_repair_shops", + "miscellaneous_specialty_retail", + "mobile_home_dealers", + "motion_picture_theaters", + "motor_freight_carriers_and_trucking", + "motor_homes_dealers", + "motor_vehicle_supplies_and_new_parts", + "motorcycle_shops_and_dealers", + "motorcycle_shops_dealers", + "music_stores_musical_instruments_pianos_and_sheet_music", + "news_dealers_and_newsstands", + "non_fi_money_orders", + "non_fi_stored_value_card_purchase_load", + "nondurable_goods", + "nurseries_lawn_and_garden_supply_stores", + "nursing_personal_care", + "office_and_commercial_furniture", + "opticians_eyeglasses", + "optometrists_ophthalmologist", + "orthopedic_goods_prosthetic_devices", + "osteopaths", + "package_stores_beer_wine_and_liquor", + "paints_varnishes_and_supplies", + "parking_lots_garages", + "passenger_railways", + "pawn_shops", + "pet_shops_pet_food_and_supplies", + "petroleum_and_petroleum_products", + "photo_developing", + "photographic_photocopy_microfilm_equipment_and_supplies", + "photographic_studios", + "picture_video_production", + "piece_goods_notions_and_other_dry_goods", + "plumbing_heating_equipment_and_supplies", + "political_organizations", + "postal_services_government_only", + "precious_stones_and_metals_watches_and_jewelry", + "professional_services", + "public_warehousing_and_storage", + "quick_copy_repro_and_blueprint", + "railroads", + "real_estate_agents_and_managers_rentals", + "record_stores", + "recreational_vehicle_rentals", + "religious_goods_stores", + "religious_organizations", + "roofing_siding_sheet_metal", + "secretarial_support_services", + "security_brokers_dealers", + "service_stations", + "sewing_needlework_fabric_and_piece_goods_stores", + "shoe_repair_hat_cleaning", + "shoe_stores", + "small_appliance_repair", + "snowmobile_dealers", + "special_trade_services", + "specialty_cleaning", + "sporting_goods_stores", + "sporting_recreation_camps", + "sports_and_riding_apparel_stores", + "sports_clubs_fields", + "stamp_and_coin_stores", + "stationary_office_supplies_printing_and_writing_paper", + "stationery_stores_office_and_school_supply_stores", + "swimming_pools_sales", + "t_ui_travel_germany", + "tailors_alterations", + "tax_payments_government_agencies", + "tax_preparation_services", + "taxicabs_limousines", + "telecommunication_equipment_and_telephone_sales", + "telecommunication_services", + "telegraph_services", + "tent_and_awning_shops", + "testing_laboratories", + "theatrical_ticket_agencies", + "timeshares", + "tire_retreading_and_repair", + "tolls_bridge_fees", + "tourist_attractions_and_exhibits", + "towing_services", + "trailer_parks_campgrounds", + "transportation_services", + "travel_agencies_tour_operators", + "truck_stop_iteration", + "truck_utility_trailer_rentals", + "typesetting_plate_making_and_related_services", + "typewriter_stores", + "u_s_federal_government_agencies_or_departments", + "uniforms_commercial_clothing", + "used_merchandise_and_secondhand_stores", + "utilities", + "variety_stores", + "veterinary_services", + "video_amusement_game_supplies", + "video_game_arcades", + "video_tape_rental_stores", + "vocational_trade_schools", + "watch_jewelry_repair", + "welding_repair", + "wholesale_clubs", + "wig_and_toupee_stores", + "wires_money_orders", + "womens_accessory_and_specialty_shops", + "womens_ready_to_wear_stores", + "wrecking_and_salvage_yards", + ] + ] + ] + """ + Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to allow. All other categories will be blocked. Cannot be set with `blocked_categories`. + """ + allowed_merchant_countries: NotRequired[List[str]] + """ + Array of strings containing representing countries from which authorizations will be allowed. Authorizations from merchants in all other countries will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `blocked_merchant_countries`. Provide an empty value to unset this control. + """ + blocked_categories: NotRequired[ + List[ + Literal[ + "ac_refrigeration_repair", + "accounting_bookkeeping_services", + "advertising_services", + "agricultural_cooperative", + "airlines_air_carriers", + "airports_flying_fields", + "ambulance_services", + "amusement_parks_carnivals", + "antique_reproductions", + "antique_shops", + "aquariums", + "architectural_surveying_services", + "art_dealers_and_galleries", + "artists_supply_and_craft_shops", + "auto_and_home_supply_stores", + "auto_body_repair_shops", + "auto_paint_shops", + "auto_service_shops", + "automated_cash_disburse", + "automated_fuel_dispensers", + "automobile_associations", + "automotive_parts_and_accessories_stores", + "automotive_tire_stores", + "bail_and_bond_payments", + "bakeries", + "bands_orchestras", + "barber_and_beauty_shops", + "betting_casino_gambling", + "bicycle_shops", + "billiard_pool_establishments", + "boat_dealers", + "boat_rentals_and_leases", + "book_stores", + "books_periodicals_and_newspapers", + "bowling_alleys", + "bus_lines", + "business_secretarial_schools", + "buying_shopping_services", + "cable_satellite_and_other_pay_television_and_radio", + "camera_and_photographic_supply_stores", + "candy_nut_and_confectionery_stores", + "car_and_truck_dealers_new_used", + "car_and_truck_dealers_used_only", + "car_rental_agencies", + "car_washes", + "carpentry_services", + "carpet_upholstery_cleaning", + "caterers", + "charitable_and_social_service_organizations_fundraising", + "chemicals_and_allied_products", + "child_care_services", + "childrens_and_infants_wear_stores", + "chiropodists_podiatrists", + "chiropractors", + "cigar_stores_and_stands", + "civic_social_fraternal_associations", + "cleaning_and_maintenance", + "clothing_rental", + "colleges_universities", + "commercial_equipment", + "commercial_footwear", + "commercial_photography_art_and_graphics", + "commuter_transport_and_ferries", + "computer_network_services", + "computer_programming", + "computer_repair", + "computer_software_stores", + "computers_peripherals_and_software", + "concrete_work_services", + "construction_materials", + "consulting_public_relations", + "correspondence_schools", + "cosmetic_stores", + "counseling_services", + "country_clubs", + "courier_services", + "court_costs", + "credit_reporting_agencies", + "cruise_lines", + "dairy_products_stores", + "dance_hall_studios_schools", + "dating_escort_services", + "dentists_orthodontists", + "department_stores", + "detective_agencies", + "digital_goods_applications", + "digital_goods_games", + "digital_goods_large_volume", + "digital_goods_media", + "direct_marketing_catalog_merchant", + "direct_marketing_combination_catalog_and_retail_merchant", + "direct_marketing_inbound_telemarketing", + "direct_marketing_insurance_services", + "direct_marketing_other", + "direct_marketing_outbound_telemarketing", + "direct_marketing_subscription", + "direct_marketing_travel", + "discount_stores", + "doctors", + "door_to_door_sales", + "drapery_window_covering_and_upholstery_stores", + "drinking_places", + "drug_stores_and_pharmacies", + "drugs_drug_proprietaries_and_druggist_sundries", + "dry_cleaners", + "durable_goods", + "duty_free_stores", + "eating_places_restaurants", + "educational_services", + "electric_razor_stores", + "electric_vehicle_charging", + "electrical_parts_and_equipment", + "electrical_services", + "electronics_repair_shops", + "electronics_stores", + "elementary_secondary_schools", + "emergency_services_gcas_visa_use_only", + "employment_temp_agencies", + "equipment_rental", + "exterminating_services", + "family_clothing_stores", + "fast_food_restaurants", + "financial_institutions", + "fines_government_administrative_entities", + "fireplace_fireplace_screens_and_accessories_stores", + "floor_covering_stores", + "florists", + "florists_supplies_nursery_stock_and_flowers", + "freezer_and_locker_meat_provisioners", + "fuel_dealers_non_automotive", + "funeral_services_crematories", + "furniture_home_furnishings_and_equipment_stores_except_appliances", + "furniture_repair_refinishing", + "furriers_and_fur_shops", + "general_services", + "gift_card_novelty_and_souvenir_shops", + "glass_paint_and_wallpaper_stores", + "glassware_crystal_stores", + "golf_courses_public", + "government_licensed_horse_dog_racing_us_region_only", + "government_licensed_online_casions_online_gambling_us_region_only", + "government_owned_lotteries_non_us_region", + "government_owned_lotteries_us_region_only", + "government_services", + "grocery_stores_supermarkets", + "hardware_equipment_and_supplies", + "hardware_stores", + "health_and_beauty_spas", + "hearing_aids_sales_and_supplies", + "heating_plumbing_a_c", + "hobby_toy_and_game_shops", + "home_supply_warehouse_stores", + "hospitals", + "hotels_motels_and_resorts", + "household_appliance_stores", + "industrial_supplies", + "information_retrieval_services", + "insurance_default", + "insurance_underwriting_premiums", + "intra_company_purchases", + "jewelry_stores_watches_clocks_and_silverware_stores", + "landscaping_services", + "laundries", + "laundry_cleaning_services", + "legal_services_attorneys", + "luggage_and_leather_goods_stores", + "lumber_building_materials_stores", + "manual_cash_disburse", + "marinas_service_and_supplies", + "marketplaces", + "masonry_stonework_and_plaster", + "massage_parlors", + "medical_and_dental_labs", + "medical_dental_ophthalmic_and_hospital_equipment_and_supplies", + "medical_services", + "membership_organizations", + "mens_and_boys_clothing_and_accessories_stores", + "mens_womens_clothing_stores", + "metal_service_centers", + "miscellaneous", + "miscellaneous_apparel_and_accessory_shops", + "miscellaneous_auto_dealers", + "miscellaneous_business_services", + "miscellaneous_food_stores", + "miscellaneous_general_merchandise", + "miscellaneous_general_services", + "miscellaneous_home_furnishing_specialty_stores", + "miscellaneous_publishing_and_printing", + "miscellaneous_recreation_services", + "miscellaneous_repair_shops", + "miscellaneous_specialty_retail", + "mobile_home_dealers", + "motion_picture_theaters", + "motor_freight_carriers_and_trucking", + "motor_homes_dealers", + "motor_vehicle_supplies_and_new_parts", + "motorcycle_shops_and_dealers", + "motorcycle_shops_dealers", + "music_stores_musical_instruments_pianos_and_sheet_music", + "news_dealers_and_newsstands", + "non_fi_money_orders", + "non_fi_stored_value_card_purchase_load", + "nondurable_goods", + "nurseries_lawn_and_garden_supply_stores", + "nursing_personal_care", + "office_and_commercial_furniture", + "opticians_eyeglasses", + "optometrists_ophthalmologist", + "orthopedic_goods_prosthetic_devices", + "osteopaths", + "package_stores_beer_wine_and_liquor", + "paints_varnishes_and_supplies", + "parking_lots_garages", + "passenger_railways", + "pawn_shops", + "pet_shops_pet_food_and_supplies", + "petroleum_and_petroleum_products", + "photo_developing", + "photographic_photocopy_microfilm_equipment_and_supplies", + "photographic_studios", + "picture_video_production", + "piece_goods_notions_and_other_dry_goods", + "plumbing_heating_equipment_and_supplies", + "political_organizations", + "postal_services_government_only", + "precious_stones_and_metals_watches_and_jewelry", + "professional_services", + "public_warehousing_and_storage", + "quick_copy_repro_and_blueprint", + "railroads", + "real_estate_agents_and_managers_rentals", + "record_stores", + "recreational_vehicle_rentals", + "religious_goods_stores", + "religious_organizations", + "roofing_siding_sheet_metal", + "secretarial_support_services", + "security_brokers_dealers", + "service_stations", + "sewing_needlework_fabric_and_piece_goods_stores", + "shoe_repair_hat_cleaning", + "shoe_stores", + "small_appliance_repair", + "snowmobile_dealers", + "special_trade_services", + "specialty_cleaning", + "sporting_goods_stores", + "sporting_recreation_camps", + "sports_and_riding_apparel_stores", + "sports_clubs_fields", + "stamp_and_coin_stores", + "stationary_office_supplies_printing_and_writing_paper", + "stationery_stores_office_and_school_supply_stores", + "swimming_pools_sales", + "t_ui_travel_germany", + "tailors_alterations", + "tax_payments_government_agencies", + "tax_preparation_services", + "taxicabs_limousines", + "telecommunication_equipment_and_telephone_sales", + "telecommunication_services", + "telegraph_services", + "tent_and_awning_shops", + "testing_laboratories", + "theatrical_ticket_agencies", + "timeshares", + "tire_retreading_and_repair", + "tolls_bridge_fees", + "tourist_attractions_and_exhibits", + "towing_services", + "trailer_parks_campgrounds", + "transportation_services", + "travel_agencies_tour_operators", + "truck_stop_iteration", + "truck_utility_trailer_rentals", + "typesetting_plate_making_and_related_services", + "typewriter_stores", + "u_s_federal_government_agencies_or_departments", + "uniforms_commercial_clothing", + "used_merchandise_and_secondhand_stores", + "utilities", + "variety_stores", + "veterinary_services", + "video_amusement_game_supplies", + "video_game_arcades", + "video_tape_rental_stores", + "vocational_trade_schools", + "watch_jewelry_repair", + "welding_repair", + "wholesale_clubs", + "wig_and_toupee_stores", + "wires_money_orders", + "womens_accessory_and_specialty_shops", + "womens_ready_to_wear_stores", + "wrecking_and_salvage_yards", + ] + ] + ] + """ + Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to decline. All other categories will be allowed. Cannot be set with `allowed_categories`. + """ + blocked_merchant_countries: NotRequired[List[str]] + """ + Array of strings containing representing countries from which authorizations will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `allowed_merchant_countries`. Provide an empty value to unset this control. + """ + spending_limits: NotRequired[ + List["CardholderCreateParamsSpendingControlsSpendingLimit"] + ] + """ + Limit spending with amount-based rules that apply across this cardholder's cards. + """ + spending_limits_currency: NotRequired[str] + """ + Currency of amounts within `spending_limits`. Defaults to your merchant country's currency. + """ + + +class CardholderCreateParamsSpendingControlsSpendingLimit(TypedDict): + amount: int + """ + Maximum amount allowed to spend per interval. + """ + categories: NotRequired[ + List[ + Literal[ + "ac_refrigeration_repair", + "accounting_bookkeeping_services", + "advertising_services", + "agricultural_cooperative", + "airlines_air_carriers", + "airports_flying_fields", + "ambulance_services", + "amusement_parks_carnivals", + "antique_reproductions", + "antique_shops", + "aquariums", + "architectural_surveying_services", + "art_dealers_and_galleries", + "artists_supply_and_craft_shops", + "auto_and_home_supply_stores", + "auto_body_repair_shops", + "auto_paint_shops", + "auto_service_shops", + "automated_cash_disburse", + "automated_fuel_dispensers", + "automobile_associations", + "automotive_parts_and_accessories_stores", + "automotive_tire_stores", + "bail_and_bond_payments", + "bakeries", + "bands_orchestras", + "barber_and_beauty_shops", + "betting_casino_gambling", + "bicycle_shops", + "billiard_pool_establishments", + "boat_dealers", + "boat_rentals_and_leases", + "book_stores", + "books_periodicals_and_newspapers", + "bowling_alleys", + "bus_lines", + "business_secretarial_schools", + "buying_shopping_services", + "cable_satellite_and_other_pay_television_and_radio", + "camera_and_photographic_supply_stores", + "candy_nut_and_confectionery_stores", + "car_and_truck_dealers_new_used", + "car_and_truck_dealers_used_only", + "car_rental_agencies", + "car_washes", + "carpentry_services", + "carpet_upholstery_cleaning", + "caterers", + "charitable_and_social_service_organizations_fundraising", + "chemicals_and_allied_products", + "child_care_services", + "childrens_and_infants_wear_stores", + "chiropodists_podiatrists", + "chiropractors", + "cigar_stores_and_stands", + "civic_social_fraternal_associations", + "cleaning_and_maintenance", + "clothing_rental", + "colleges_universities", + "commercial_equipment", + "commercial_footwear", + "commercial_photography_art_and_graphics", + "commuter_transport_and_ferries", + "computer_network_services", + "computer_programming", + "computer_repair", + "computer_software_stores", + "computers_peripherals_and_software", + "concrete_work_services", + "construction_materials", + "consulting_public_relations", + "correspondence_schools", + "cosmetic_stores", + "counseling_services", + "country_clubs", + "courier_services", + "court_costs", + "credit_reporting_agencies", + "cruise_lines", + "dairy_products_stores", + "dance_hall_studios_schools", + "dating_escort_services", + "dentists_orthodontists", + "department_stores", + "detective_agencies", + "digital_goods_applications", + "digital_goods_games", + "digital_goods_large_volume", + "digital_goods_media", + "direct_marketing_catalog_merchant", + "direct_marketing_combination_catalog_and_retail_merchant", + "direct_marketing_inbound_telemarketing", + "direct_marketing_insurance_services", + "direct_marketing_other", + "direct_marketing_outbound_telemarketing", + "direct_marketing_subscription", + "direct_marketing_travel", + "discount_stores", + "doctors", + "door_to_door_sales", + "drapery_window_covering_and_upholstery_stores", + "drinking_places", + "drug_stores_and_pharmacies", + "drugs_drug_proprietaries_and_druggist_sundries", + "dry_cleaners", + "durable_goods", + "duty_free_stores", + "eating_places_restaurants", + "educational_services", + "electric_razor_stores", + "electric_vehicle_charging", + "electrical_parts_and_equipment", + "electrical_services", + "electronics_repair_shops", + "electronics_stores", + "elementary_secondary_schools", + "emergency_services_gcas_visa_use_only", + "employment_temp_agencies", + "equipment_rental", + "exterminating_services", + "family_clothing_stores", + "fast_food_restaurants", + "financial_institutions", + "fines_government_administrative_entities", + "fireplace_fireplace_screens_and_accessories_stores", + "floor_covering_stores", + "florists", + "florists_supplies_nursery_stock_and_flowers", + "freezer_and_locker_meat_provisioners", + "fuel_dealers_non_automotive", + "funeral_services_crematories", + "furniture_home_furnishings_and_equipment_stores_except_appliances", + "furniture_repair_refinishing", + "furriers_and_fur_shops", + "general_services", + "gift_card_novelty_and_souvenir_shops", + "glass_paint_and_wallpaper_stores", + "glassware_crystal_stores", + "golf_courses_public", + "government_licensed_horse_dog_racing_us_region_only", + "government_licensed_online_casions_online_gambling_us_region_only", + "government_owned_lotteries_non_us_region", + "government_owned_lotteries_us_region_only", + "government_services", + "grocery_stores_supermarkets", + "hardware_equipment_and_supplies", + "hardware_stores", + "health_and_beauty_spas", + "hearing_aids_sales_and_supplies", + "heating_plumbing_a_c", + "hobby_toy_and_game_shops", + "home_supply_warehouse_stores", + "hospitals", + "hotels_motels_and_resorts", + "household_appliance_stores", + "industrial_supplies", + "information_retrieval_services", + "insurance_default", + "insurance_underwriting_premiums", + "intra_company_purchases", + "jewelry_stores_watches_clocks_and_silverware_stores", + "landscaping_services", + "laundries", + "laundry_cleaning_services", + "legal_services_attorneys", + "luggage_and_leather_goods_stores", + "lumber_building_materials_stores", + "manual_cash_disburse", + "marinas_service_and_supplies", + "marketplaces", + "masonry_stonework_and_plaster", + "massage_parlors", + "medical_and_dental_labs", + "medical_dental_ophthalmic_and_hospital_equipment_and_supplies", + "medical_services", + "membership_organizations", + "mens_and_boys_clothing_and_accessories_stores", + "mens_womens_clothing_stores", + "metal_service_centers", + "miscellaneous", + "miscellaneous_apparel_and_accessory_shops", + "miscellaneous_auto_dealers", + "miscellaneous_business_services", + "miscellaneous_food_stores", + "miscellaneous_general_merchandise", + "miscellaneous_general_services", + "miscellaneous_home_furnishing_specialty_stores", + "miscellaneous_publishing_and_printing", + "miscellaneous_recreation_services", + "miscellaneous_repair_shops", + "miscellaneous_specialty_retail", + "mobile_home_dealers", + "motion_picture_theaters", + "motor_freight_carriers_and_trucking", + "motor_homes_dealers", + "motor_vehicle_supplies_and_new_parts", + "motorcycle_shops_and_dealers", + "motorcycle_shops_dealers", + "music_stores_musical_instruments_pianos_and_sheet_music", + "news_dealers_and_newsstands", + "non_fi_money_orders", + "non_fi_stored_value_card_purchase_load", + "nondurable_goods", + "nurseries_lawn_and_garden_supply_stores", + "nursing_personal_care", + "office_and_commercial_furniture", + "opticians_eyeglasses", + "optometrists_ophthalmologist", + "orthopedic_goods_prosthetic_devices", + "osteopaths", + "package_stores_beer_wine_and_liquor", + "paints_varnishes_and_supplies", + "parking_lots_garages", + "passenger_railways", + "pawn_shops", + "pet_shops_pet_food_and_supplies", + "petroleum_and_petroleum_products", + "photo_developing", + "photographic_photocopy_microfilm_equipment_and_supplies", + "photographic_studios", + "picture_video_production", + "piece_goods_notions_and_other_dry_goods", + "plumbing_heating_equipment_and_supplies", + "political_organizations", + "postal_services_government_only", + "precious_stones_and_metals_watches_and_jewelry", + "professional_services", + "public_warehousing_and_storage", + "quick_copy_repro_and_blueprint", + "railroads", + "real_estate_agents_and_managers_rentals", + "record_stores", + "recreational_vehicle_rentals", + "religious_goods_stores", + "religious_organizations", + "roofing_siding_sheet_metal", + "secretarial_support_services", + "security_brokers_dealers", + "service_stations", + "sewing_needlework_fabric_and_piece_goods_stores", + "shoe_repair_hat_cleaning", + "shoe_stores", + "small_appliance_repair", + "snowmobile_dealers", + "special_trade_services", + "specialty_cleaning", + "sporting_goods_stores", + "sporting_recreation_camps", + "sports_and_riding_apparel_stores", + "sports_clubs_fields", + "stamp_and_coin_stores", + "stationary_office_supplies_printing_and_writing_paper", + "stationery_stores_office_and_school_supply_stores", + "swimming_pools_sales", + "t_ui_travel_germany", + "tailors_alterations", + "tax_payments_government_agencies", + "tax_preparation_services", + "taxicabs_limousines", + "telecommunication_equipment_and_telephone_sales", + "telecommunication_services", + "telegraph_services", + "tent_and_awning_shops", + "testing_laboratories", + "theatrical_ticket_agencies", + "timeshares", + "tire_retreading_and_repair", + "tolls_bridge_fees", + "tourist_attractions_and_exhibits", + "towing_services", + "trailer_parks_campgrounds", + "transportation_services", + "travel_agencies_tour_operators", + "truck_stop_iteration", + "truck_utility_trailer_rentals", + "typesetting_plate_making_and_related_services", + "typewriter_stores", + "u_s_federal_government_agencies_or_departments", + "uniforms_commercial_clothing", + "used_merchandise_and_secondhand_stores", + "utilities", + "variety_stores", + "veterinary_services", + "video_amusement_game_supplies", + "video_game_arcades", + "video_tape_rental_stores", + "vocational_trade_schools", + "watch_jewelry_repair", + "welding_repair", + "wholesale_clubs", + "wig_and_toupee_stores", + "wires_money_orders", + "womens_accessory_and_specialty_shops", + "womens_ready_to_wear_stores", + "wrecking_and_salvage_yards", + ] + ] + ] + """ + Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories. + """ + interval: Literal[ + "all_time", "daily", "monthly", "per_authorization", "weekly", "yearly" + ] + """ + Interval (or event) to which the amount applies. + """ diff --git a/stripe/params/issuing/_cardholder_list_params.py b/stripe/params/issuing/_cardholder_list_params.py new file mode 100644 index 000000000..00fc05d23 --- /dev/null +++ b/stripe/params/issuing/_cardholder_list_params.py @@ -0,0 +1,63 @@ +# -*- 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, TypedDict + + +class CardholderListParams(RequestOptions): + created: NotRequired["CardholderListParamsCreated|int"] + """ + Only return cardholders that were created during the given date interval. + """ + email: NotRequired[str] + """ + Only return cardholders that have the given email address. + """ + 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. + """ + phone_number: NotRequired[str] + """ + Only return cardholders that have the given phone number. + """ + 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. + """ + status: NotRequired[Literal["active", "blocked", "inactive"]] + """ + Only return cardholders that have the given status. One of `active`, `inactive`, or `blocked`. + """ + type: NotRequired[Literal["company", "individual"]] + """ + Only return cardholders that have the given type. One of `individual` or `company`. + """ + + +class CardholderListParamsCreated(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/issuing/_cardholder_modify_params.py b/stripe/params/issuing/_cardholder_modify_params.py new file mode 100644 index 000000000..74bfc8406 --- /dev/null +++ b/stripe/params/issuing/_cardholder_modify_params.py @@ -0,0 +1,1120 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class CardholderModifyParams(RequestOptions): + billing: NotRequired["CardholderModifyParamsBilling"] + """ + The cardholder's billing address. + """ + company: NotRequired["CardholderModifyParamsCompany"] + """ + Additional information about a `company` cardholder. + """ + email: NotRequired[str] + """ + The cardholder's email address. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + individual: NotRequired["CardholderModifyParamsIndividual"] + """ + Additional information about an `individual` cardholder. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + phone_number: NotRequired[str] + """ + The cardholder's phone number. This is required for all cardholders who will be creating EU cards. See the [3D Secure documentation](https://stripe.com/docs/issuing/3d-secure) for more details. + """ + preferred_locales: NotRequired[List[Literal["de", "en", "es", "fr", "it"]]] + """ + The cardholder's preferred locales (languages), ordered by preference. Locales can be `de`, `en`, `es`, `fr`, or `it`. + This changes the language of the [3D Secure flow](https://stripe.com/docs/issuing/3d-secure) and one-time password messages sent to the cardholder. + """ + spending_controls: NotRequired["CardholderModifyParamsSpendingControls"] + """ + Rules that control spending across this cardholder's cards. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details. + """ + status: NotRequired[Literal["active", "inactive"]] + """ + Specifies whether to permit authorizations on this cardholder's cards. + """ + + +class CardholderModifyParamsBilling(TypedDict): + address: "CardholderModifyParamsBillingAddress" + """ + The cardholder's billing address. + """ + + +class CardholderModifyParamsBillingAddress(TypedDict): + city: 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: 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: str + """ + ZIP or postal code. + """ + state: NotRequired[str] + """ + State, county, province, or region. + """ + + +class CardholderModifyParamsCompany(TypedDict): + tax_id: NotRequired[str] + """ + The entity's business ID number. + """ + + +class CardholderModifyParamsIndividual(TypedDict): + card_issuing: NotRequired["CardholderModifyParamsIndividualCardIssuing"] + """ + Information related to the card_issuing program for this cardholder. + """ + dob: NotRequired["CardholderModifyParamsIndividualDob"] + """ + The date of birth of this cardholder. Cardholders must be older than 13 years old. + """ + first_name: NotRequired[str] + """ + The first name of this cardholder. Required before activating Cards. This field cannot contain any numbers, special characters (except periods, commas, hyphens, spaces and apostrophes) or non-latin letters. + """ + last_name: NotRequired[str] + """ + The last name of this cardholder. Required before activating Cards. This field cannot contain any numbers, special characters (except periods, commas, hyphens, spaces and apostrophes) or non-latin letters. + """ + verification: NotRequired["CardholderModifyParamsIndividualVerification"] + """ + Government-issued ID document for this cardholder. + """ + + +class CardholderModifyParamsIndividualCardIssuing(TypedDict): + user_terms_acceptance: NotRequired[ + "CardholderModifyParamsIndividualCardIssuingUserTermsAcceptance" + ] + """ + Information about cardholder acceptance of Celtic [Authorized User Terms](https://stripe.com/docs/issuing/cards#accept-authorized-user-terms). Required for cards backed by a Celtic program. + """ + + +class CardholderModifyParamsIndividualCardIssuingUserTermsAcceptance( + TypedDict +): + date: NotRequired[int] + """ + The Unix timestamp marking when the cardholder accepted the Authorized User Terms. Required for Celtic Spend Card users. + """ + ip: NotRequired[str] + """ + The IP address from which the cardholder accepted the Authorized User Terms. Required for Celtic Spend Card users. + """ + user_agent: NotRequired["Literal['']|str"] + """ + The user agent of the browser from which the cardholder accepted the Authorized User Terms. + """ + + +class CardholderModifyParamsIndividualDob(TypedDict): + day: int + """ + The day of birth, between 1 and 31. + """ + month: int + """ + The month of birth, between 1 and 12. + """ + year: int + """ + The four-digit year of birth. + """ + + +class CardholderModifyParamsIndividualVerification(TypedDict): + document: NotRequired[ + "CardholderModifyParamsIndividualVerificationDocument" + ] + """ + An identifying document, either a passport or local ID card. + """ + + +class CardholderModifyParamsIndividualVerificationDocument(TypedDict): + back: NotRequired[str] + """ + The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. + """ + front: NotRequired[str] + """ + The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. + """ + + +class CardholderModifyParamsSpendingControls(TypedDict): + allowed_categories: NotRequired[ + List[ + Literal[ + "ac_refrigeration_repair", + "accounting_bookkeeping_services", + "advertising_services", + "agricultural_cooperative", + "airlines_air_carriers", + "airports_flying_fields", + "ambulance_services", + "amusement_parks_carnivals", + "antique_reproductions", + "antique_shops", + "aquariums", + "architectural_surveying_services", + "art_dealers_and_galleries", + "artists_supply_and_craft_shops", + "auto_and_home_supply_stores", + "auto_body_repair_shops", + "auto_paint_shops", + "auto_service_shops", + "automated_cash_disburse", + "automated_fuel_dispensers", + "automobile_associations", + "automotive_parts_and_accessories_stores", + "automotive_tire_stores", + "bail_and_bond_payments", + "bakeries", + "bands_orchestras", + "barber_and_beauty_shops", + "betting_casino_gambling", + "bicycle_shops", + "billiard_pool_establishments", + "boat_dealers", + "boat_rentals_and_leases", + "book_stores", + "books_periodicals_and_newspapers", + "bowling_alleys", + "bus_lines", + "business_secretarial_schools", + "buying_shopping_services", + "cable_satellite_and_other_pay_television_and_radio", + "camera_and_photographic_supply_stores", + "candy_nut_and_confectionery_stores", + "car_and_truck_dealers_new_used", + "car_and_truck_dealers_used_only", + "car_rental_agencies", + "car_washes", + "carpentry_services", + "carpet_upholstery_cleaning", + "caterers", + "charitable_and_social_service_organizations_fundraising", + "chemicals_and_allied_products", + "child_care_services", + "childrens_and_infants_wear_stores", + "chiropodists_podiatrists", + "chiropractors", + "cigar_stores_and_stands", + "civic_social_fraternal_associations", + "cleaning_and_maintenance", + "clothing_rental", + "colleges_universities", + "commercial_equipment", + "commercial_footwear", + "commercial_photography_art_and_graphics", + "commuter_transport_and_ferries", + "computer_network_services", + "computer_programming", + "computer_repair", + "computer_software_stores", + "computers_peripherals_and_software", + "concrete_work_services", + "construction_materials", + "consulting_public_relations", + "correspondence_schools", + "cosmetic_stores", + "counseling_services", + "country_clubs", + "courier_services", + "court_costs", + "credit_reporting_agencies", + "cruise_lines", + "dairy_products_stores", + "dance_hall_studios_schools", + "dating_escort_services", + "dentists_orthodontists", + "department_stores", + "detective_agencies", + "digital_goods_applications", + "digital_goods_games", + "digital_goods_large_volume", + "digital_goods_media", + "direct_marketing_catalog_merchant", + "direct_marketing_combination_catalog_and_retail_merchant", + "direct_marketing_inbound_telemarketing", + "direct_marketing_insurance_services", + "direct_marketing_other", + "direct_marketing_outbound_telemarketing", + "direct_marketing_subscription", + "direct_marketing_travel", + "discount_stores", + "doctors", + "door_to_door_sales", + "drapery_window_covering_and_upholstery_stores", + "drinking_places", + "drug_stores_and_pharmacies", + "drugs_drug_proprietaries_and_druggist_sundries", + "dry_cleaners", + "durable_goods", + "duty_free_stores", + "eating_places_restaurants", + "educational_services", + "electric_razor_stores", + "electric_vehicle_charging", + "electrical_parts_and_equipment", + "electrical_services", + "electronics_repair_shops", + "electronics_stores", + "elementary_secondary_schools", + "emergency_services_gcas_visa_use_only", + "employment_temp_agencies", + "equipment_rental", + "exterminating_services", + "family_clothing_stores", + "fast_food_restaurants", + "financial_institutions", + "fines_government_administrative_entities", + "fireplace_fireplace_screens_and_accessories_stores", + "floor_covering_stores", + "florists", + "florists_supplies_nursery_stock_and_flowers", + "freezer_and_locker_meat_provisioners", + "fuel_dealers_non_automotive", + "funeral_services_crematories", + "furniture_home_furnishings_and_equipment_stores_except_appliances", + "furniture_repair_refinishing", + "furriers_and_fur_shops", + "general_services", + "gift_card_novelty_and_souvenir_shops", + "glass_paint_and_wallpaper_stores", + "glassware_crystal_stores", + "golf_courses_public", + "government_licensed_horse_dog_racing_us_region_only", + "government_licensed_online_casions_online_gambling_us_region_only", + "government_owned_lotteries_non_us_region", + "government_owned_lotteries_us_region_only", + "government_services", + "grocery_stores_supermarkets", + "hardware_equipment_and_supplies", + "hardware_stores", + "health_and_beauty_spas", + "hearing_aids_sales_and_supplies", + "heating_plumbing_a_c", + "hobby_toy_and_game_shops", + "home_supply_warehouse_stores", + "hospitals", + "hotels_motels_and_resorts", + "household_appliance_stores", + "industrial_supplies", + "information_retrieval_services", + "insurance_default", + "insurance_underwriting_premiums", + "intra_company_purchases", + "jewelry_stores_watches_clocks_and_silverware_stores", + "landscaping_services", + "laundries", + "laundry_cleaning_services", + "legal_services_attorneys", + "luggage_and_leather_goods_stores", + "lumber_building_materials_stores", + "manual_cash_disburse", + "marinas_service_and_supplies", + "marketplaces", + "masonry_stonework_and_plaster", + "massage_parlors", + "medical_and_dental_labs", + "medical_dental_ophthalmic_and_hospital_equipment_and_supplies", + "medical_services", + "membership_organizations", + "mens_and_boys_clothing_and_accessories_stores", + "mens_womens_clothing_stores", + "metal_service_centers", + "miscellaneous", + "miscellaneous_apparel_and_accessory_shops", + "miscellaneous_auto_dealers", + "miscellaneous_business_services", + "miscellaneous_food_stores", + "miscellaneous_general_merchandise", + "miscellaneous_general_services", + "miscellaneous_home_furnishing_specialty_stores", + "miscellaneous_publishing_and_printing", + "miscellaneous_recreation_services", + "miscellaneous_repair_shops", + "miscellaneous_specialty_retail", + "mobile_home_dealers", + "motion_picture_theaters", + "motor_freight_carriers_and_trucking", + "motor_homes_dealers", + "motor_vehicle_supplies_and_new_parts", + "motorcycle_shops_and_dealers", + "motorcycle_shops_dealers", + "music_stores_musical_instruments_pianos_and_sheet_music", + "news_dealers_and_newsstands", + "non_fi_money_orders", + "non_fi_stored_value_card_purchase_load", + "nondurable_goods", + "nurseries_lawn_and_garden_supply_stores", + "nursing_personal_care", + "office_and_commercial_furniture", + "opticians_eyeglasses", + "optometrists_ophthalmologist", + "orthopedic_goods_prosthetic_devices", + "osteopaths", + "package_stores_beer_wine_and_liquor", + "paints_varnishes_and_supplies", + "parking_lots_garages", + "passenger_railways", + "pawn_shops", + "pet_shops_pet_food_and_supplies", + "petroleum_and_petroleum_products", + "photo_developing", + "photographic_photocopy_microfilm_equipment_and_supplies", + "photographic_studios", + "picture_video_production", + "piece_goods_notions_and_other_dry_goods", + "plumbing_heating_equipment_and_supplies", + "political_organizations", + "postal_services_government_only", + "precious_stones_and_metals_watches_and_jewelry", + "professional_services", + "public_warehousing_and_storage", + "quick_copy_repro_and_blueprint", + "railroads", + "real_estate_agents_and_managers_rentals", + "record_stores", + "recreational_vehicle_rentals", + "religious_goods_stores", + "religious_organizations", + "roofing_siding_sheet_metal", + "secretarial_support_services", + "security_brokers_dealers", + "service_stations", + "sewing_needlework_fabric_and_piece_goods_stores", + "shoe_repair_hat_cleaning", + "shoe_stores", + "small_appliance_repair", + "snowmobile_dealers", + "special_trade_services", + "specialty_cleaning", + "sporting_goods_stores", + "sporting_recreation_camps", + "sports_and_riding_apparel_stores", + "sports_clubs_fields", + "stamp_and_coin_stores", + "stationary_office_supplies_printing_and_writing_paper", + "stationery_stores_office_and_school_supply_stores", + "swimming_pools_sales", + "t_ui_travel_germany", + "tailors_alterations", + "tax_payments_government_agencies", + "tax_preparation_services", + "taxicabs_limousines", + "telecommunication_equipment_and_telephone_sales", + "telecommunication_services", + "telegraph_services", + "tent_and_awning_shops", + "testing_laboratories", + "theatrical_ticket_agencies", + "timeshares", + "tire_retreading_and_repair", + "tolls_bridge_fees", + "tourist_attractions_and_exhibits", + "towing_services", + "trailer_parks_campgrounds", + "transportation_services", + "travel_agencies_tour_operators", + "truck_stop_iteration", + "truck_utility_trailer_rentals", + "typesetting_plate_making_and_related_services", + "typewriter_stores", + "u_s_federal_government_agencies_or_departments", + "uniforms_commercial_clothing", + "used_merchandise_and_secondhand_stores", + "utilities", + "variety_stores", + "veterinary_services", + "video_amusement_game_supplies", + "video_game_arcades", + "video_tape_rental_stores", + "vocational_trade_schools", + "watch_jewelry_repair", + "welding_repair", + "wholesale_clubs", + "wig_and_toupee_stores", + "wires_money_orders", + "womens_accessory_and_specialty_shops", + "womens_ready_to_wear_stores", + "wrecking_and_salvage_yards", + ] + ] + ] + """ + Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to allow. All other categories will be blocked. Cannot be set with `blocked_categories`. + """ + allowed_merchant_countries: NotRequired[List[str]] + """ + Array of strings containing representing countries from which authorizations will be allowed. Authorizations from merchants in all other countries will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `blocked_merchant_countries`. Provide an empty value to unset this control. + """ + blocked_categories: NotRequired[ + List[ + Literal[ + "ac_refrigeration_repair", + "accounting_bookkeeping_services", + "advertising_services", + "agricultural_cooperative", + "airlines_air_carriers", + "airports_flying_fields", + "ambulance_services", + "amusement_parks_carnivals", + "antique_reproductions", + "antique_shops", + "aquariums", + "architectural_surveying_services", + "art_dealers_and_galleries", + "artists_supply_and_craft_shops", + "auto_and_home_supply_stores", + "auto_body_repair_shops", + "auto_paint_shops", + "auto_service_shops", + "automated_cash_disburse", + "automated_fuel_dispensers", + "automobile_associations", + "automotive_parts_and_accessories_stores", + "automotive_tire_stores", + "bail_and_bond_payments", + "bakeries", + "bands_orchestras", + "barber_and_beauty_shops", + "betting_casino_gambling", + "bicycle_shops", + "billiard_pool_establishments", + "boat_dealers", + "boat_rentals_and_leases", + "book_stores", + "books_periodicals_and_newspapers", + "bowling_alleys", + "bus_lines", + "business_secretarial_schools", + "buying_shopping_services", + "cable_satellite_and_other_pay_television_and_radio", + "camera_and_photographic_supply_stores", + "candy_nut_and_confectionery_stores", + "car_and_truck_dealers_new_used", + "car_and_truck_dealers_used_only", + "car_rental_agencies", + "car_washes", + "carpentry_services", + "carpet_upholstery_cleaning", + "caterers", + "charitable_and_social_service_organizations_fundraising", + "chemicals_and_allied_products", + "child_care_services", + "childrens_and_infants_wear_stores", + "chiropodists_podiatrists", + "chiropractors", + "cigar_stores_and_stands", + "civic_social_fraternal_associations", + "cleaning_and_maintenance", + "clothing_rental", + "colleges_universities", + "commercial_equipment", + "commercial_footwear", + "commercial_photography_art_and_graphics", + "commuter_transport_and_ferries", + "computer_network_services", + "computer_programming", + "computer_repair", + "computer_software_stores", + "computers_peripherals_and_software", + "concrete_work_services", + "construction_materials", + "consulting_public_relations", + "correspondence_schools", + "cosmetic_stores", + "counseling_services", + "country_clubs", + "courier_services", + "court_costs", + "credit_reporting_agencies", + "cruise_lines", + "dairy_products_stores", + "dance_hall_studios_schools", + "dating_escort_services", + "dentists_orthodontists", + "department_stores", + "detective_agencies", + "digital_goods_applications", + "digital_goods_games", + "digital_goods_large_volume", + "digital_goods_media", + "direct_marketing_catalog_merchant", + "direct_marketing_combination_catalog_and_retail_merchant", + "direct_marketing_inbound_telemarketing", + "direct_marketing_insurance_services", + "direct_marketing_other", + "direct_marketing_outbound_telemarketing", + "direct_marketing_subscription", + "direct_marketing_travel", + "discount_stores", + "doctors", + "door_to_door_sales", + "drapery_window_covering_and_upholstery_stores", + "drinking_places", + "drug_stores_and_pharmacies", + "drugs_drug_proprietaries_and_druggist_sundries", + "dry_cleaners", + "durable_goods", + "duty_free_stores", + "eating_places_restaurants", + "educational_services", + "electric_razor_stores", + "electric_vehicle_charging", + "electrical_parts_and_equipment", + "electrical_services", + "electronics_repair_shops", + "electronics_stores", + "elementary_secondary_schools", + "emergency_services_gcas_visa_use_only", + "employment_temp_agencies", + "equipment_rental", + "exterminating_services", + "family_clothing_stores", + "fast_food_restaurants", + "financial_institutions", + "fines_government_administrative_entities", + "fireplace_fireplace_screens_and_accessories_stores", + "floor_covering_stores", + "florists", + "florists_supplies_nursery_stock_and_flowers", + "freezer_and_locker_meat_provisioners", + "fuel_dealers_non_automotive", + "funeral_services_crematories", + "furniture_home_furnishings_and_equipment_stores_except_appliances", + "furniture_repair_refinishing", + "furriers_and_fur_shops", + "general_services", + "gift_card_novelty_and_souvenir_shops", + "glass_paint_and_wallpaper_stores", + "glassware_crystal_stores", + "golf_courses_public", + "government_licensed_horse_dog_racing_us_region_only", + "government_licensed_online_casions_online_gambling_us_region_only", + "government_owned_lotteries_non_us_region", + "government_owned_lotteries_us_region_only", + "government_services", + "grocery_stores_supermarkets", + "hardware_equipment_and_supplies", + "hardware_stores", + "health_and_beauty_spas", + "hearing_aids_sales_and_supplies", + "heating_plumbing_a_c", + "hobby_toy_and_game_shops", + "home_supply_warehouse_stores", + "hospitals", + "hotels_motels_and_resorts", + "household_appliance_stores", + "industrial_supplies", + "information_retrieval_services", + "insurance_default", + "insurance_underwriting_premiums", + "intra_company_purchases", + "jewelry_stores_watches_clocks_and_silverware_stores", + "landscaping_services", + "laundries", + "laundry_cleaning_services", + "legal_services_attorneys", + "luggage_and_leather_goods_stores", + "lumber_building_materials_stores", + "manual_cash_disburse", + "marinas_service_and_supplies", + "marketplaces", + "masonry_stonework_and_plaster", + "massage_parlors", + "medical_and_dental_labs", + "medical_dental_ophthalmic_and_hospital_equipment_and_supplies", + "medical_services", + "membership_organizations", + "mens_and_boys_clothing_and_accessories_stores", + "mens_womens_clothing_stores", + "metal_service_centers", + "miscellaneous", + "miscellaneous_apparel_and_accessory_shops", + "miscellaneous_auto_dealers", + "miscellaneous_business_services", + "miscellaneous_food_stores", + "miscellaneous_general_merchandise", + "miscellaneous_general_services", + "miscellaneous_home_furnishing_specialty_stores", + "miscellaneous_publishing_and_printing", + "miscellaneous_recreation_services", + "miscellaneous_repair_shops", + "miscellaneous_specialty_retail", + "mobile_home_dealers", + "motion_picture_theaters", + "motor_freight_carriers_and_trucking", + "motor_homes_dealers", + "motor_vehicle_supplies_and_new_parts", + "motorcycle_shops_and_dealers", + "motorcycle_shops_dealers", + "music_stores_musical_instruments_pianos_and_sheet_music", + "news_dealers_and_newsstands", + "non_fi_money_orders", + "non_fi_stored_value_card_purchase_load", + "nondurable_goods", + "nurseries_lawn_and_garden_supply_stores", + "nursing_personal_care", + "office_and_commercial_furniture", + "opticians_eyeglasses", + "optometrists_ophthalmologist", + "orthopedic_goods_prosthetic_devices", + "osteopaths", + "package_stores_beer_wine_and_liquor", + "paints_varnishes_and_supplies", + "parking_lots_garages", + "passenger_railways", + "pawn_shops", + "pet_shops_pet_food_and_supplies", + "petroleum_and_petroleum_products", + "photo_developing", + "photographic_photocopy_microfilm_equipment_and_supplies", + "photographic_studios", + "picture_video_production", + "piece_goods_notions_and_other_dry_goods", + "plumbing_heating_equipment_and_supplies", + "political_organizations", + "postal_services_government_only", + "precious_stones_and_metals_watches_and_jewelry", + "professional_services", + "public_warehousing_and_storage", + "quick_copy_repro_and_blueprint", + "railroads", + "real_estate_agents_and_managers_rentals", + "record_stores", + "recreational_vehicle_rentals", + "religious_goods_stores", + "religious_organizations", + "roofing_siding_sheet_metal", + "secretarial_support_services", + "security_brokers_dealers", + "service_stations", + "sewing_needlework_fabric_and_piece_goods_stores", + "shoe_repair_hat_cleaning", + "shoe_stores", + "small_appliance_repair", + "snowmobile_dealers", + "special_trade_services", + "specialty_cleaning", + "sporting_goods_stores", + "sporting_recreation_camps", + "sports_and_riding_apparel_stores", + "sports_clubs_fields", + "stamp_and_coin_stores", + "stationary_office_supplies_printing_and_writing_paper", + "stationery_stores_office_and_school_supply_stores", + "swimming_pools_sales", + "t_ui_travel_germany", + "tailors_alterations", + "tax_payments_government_agencies", + "tax_preparation_services", + "taxicabs_limousines", + "telecommunication_equipment_and_telephone_sales", + "telecommunication_services", + "telegraph_services", + "tent_and_awning_shops", + "testing_laboratories", + "theatrical_ticket_agencies", + "timeshares", + "tire_retreading_and_repair", + "tolls_bridge_fees", + "tourist_attractions_and_exhibits", + "towing_services", + "trailer_parks_campgrounds", + "transportation_services", + "travel_agencies_tour_operators", + "truck_stop_iteration", + "truck_utility_trailer_rentals", + "typesetting_plate_making_and_related_services", + "typewriter_stores", + "u_s_federal_government_agencies_or_departments", + "uniforms_commercial_clothing", + "used_merchandise_and_secondhand_stores", + "utilities", + "variety_stores", + "veterinary_services", + "video_amusement_game_supplies", + "video_game_arcades", + "video_tape_rental_stores", + "vocational_trade_schools", + "watch_jewelry_repair", + "welding_repair", + "wholesale_clubs", + "wig_and_toupee_stores", + "wires_money_orders", + "womens_accessory_and_specialty_shops", + "womens_ready_to_wear_stores", + "wrecking_and_salvage_yards", + ] + ] + ] + """ + Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to decline. All other categories will be allowed. Cannot be set with `allowed_categories`. + """ + blocked_merchant_countries: NotRequired[List[str]] + """ + Array of strings containing representing countries from which authorizations will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `allowed_merchant_countries`. Provide an empty value to unset this control. + """ + spending_limits: NotRequired[ + List["CardholderModifyParamsSpendingControlsSpendingLimit"] + ] + """ + Limit spending with amount-based rules that apply across this cardholder's cards. + """ + spending_limits_currency: NotRequired[str] + """ + Currency of amounts within `spending_limits`. Defaults to your merchant country's currency. + """ + + +class CardholderModifyParamsSpendingControlsSpendingLimit(TypedDict): + amount: int + """ + Maximum amount allowed to spend per interval. + """ + categories: NotRequired[ + List[ + Literal[ + "ac_refrigeration_repair", + "accounting_bookkeeping_services", + "advertising_services", + "agricultural_cooperative", + "airlines_air_carriers", + "airports_flying_fields", + "ambulance_services", + "amusement_parks_carnivals", + "antique_reproductions", + "antique_shops", + "aquariums", + "architectural_surveying_services", + "art_dealers_and_galleries", + "artists_supply_and_craft_shops", + "auto_and_home_supply_stores", + "auto_body_repair_shops", + "auto_paint_shops", + "auto_service_shops", + "automated_cash_disburse", + "automated_fuel_dispensers", + "automobile_associations", + "automotive_parts_and_accessories_stores", + "automotive_tire_stores", + "bail_and_bond_payments", + "bakeries", + "bands_orchestras", + "barber_and_beauty_shops", + "betting_casino_gambling", + "bicycle_shops", + "billiard_pool_establishments", + "boat_dealers", + "boat_rentals_and_leases", + "book_stores", + "books_periodicals_and_newspapers", + "bowling_alleys", + "bus_lines", + "business_secretarial_schools", + "buying_shopping_services", + "cable_satellite_and_other_pay_television_and_radio", + "camera_and_photographic_supply_stores", + "candy_nut_and_confectionery_stores", + "car_and_truck_dealers_new_used", + "car_and_truck_dealers_used_only", + "car_rental_agencies", + "car_washes", + "carpentry_services", + "carpet_upholstery_cleaning", + "caterers", + "charitable_and_social_service_organizations_fundraising", + "chemicals_and_allied_products", + "child_care_services", + "childrens_and_infants_wear_stores", + "chiropodists_podiatrists", + "chiropractors", + "cigar_stores_and_stands", + "civic_social_fraternal_associations", + "cleaning_and_maintenance", + "clothing_rental", + "colleges_universities", + "commercial_equipment", + "commercial_footwear", + "commercial_photography_art_and_graphics", + "commuter_transport_and_ferries", + "computer_network_services", + "computer_programming", + "computer_repair", + "computer_software_stores", + "computers_peripherals_and_software", + "concrete_work_services", + "construction_materials", + "consulting_public_relations", + "correspondence_schools", + "cosmetic_stores", + "counseling_services", + "country_clubs", + "courier_services", + "court_costs", + "credit_reporting_agencies", + "cruise_lines", + "dairy_products_stores", + "dance_hall_studios_schools", + "dating_escort_services", + "dentists_orthodontists", + "department_stores", + "detective_agencies", + "digital_goods_applications", + "digital_goods_games", + "digital_goods_large_volume", + "digital_goods_media", + "direct_marketing_catalog_merchant", + "direct_marketing_combination_catalog_and_retail_merchant", + "direct_marketing_inbound_telemarketing", + "direct_marketing_insurance_services", + "direct_marketing_other", + "direct_marketing_outbound_telemarketing", + "direct_marketing_subscription", + "direct_marketing_travel", + "discount_stores", + "doctors", + "door_to_door_sales", + "drapery_window_covering_and_upholstery_stores", + "drinking_places", + "drug_stores_and_pharmacies", + "drugs_drug_proprietaries_and_druggist_sundries", + "dry_cleaners", + "durable_goods", + "duty_free_stores", + "eating_places_restaurants", + "educational_services", + "electric_razor_stores", + "electric_vehicle_charging", + "electrical_parts_and_equipment", + "electrical_services", + "electronics_repair_shops", + "electronics_stores", + "elementary_secondary_schools", + "emergency_services_gcas_visa_use_only", + "employment_temp_agencies", + "equipment_rental", + "exterminating_services", + "family_clothing_stores", + "fast_food_restaurants", + "financial_institutions", + "fines_government_administrative_entities", + "fireplace_fireplace_screens_and_accessories_stores", + "floor_covering_stores", + "florists", + "florists_supplies_nursery_stock_and_flowers", + "freezer_and_locker_meat_provisioners", + "fuel_dealers_non_automotive", + "funeral_services_crematories", + "furniture_home_furnishings_and_equipment_stores_except_appliances", + "furniture_repair_refinishing", + "furriers_and_fur_shops", + "general_services", + "gift_card_novelty_and_souvenir_shops", + "glass_paint_and_wallpaper_stores", + "glassware_crystal_stores", + "golf_courses_public", + "government_licensed_horse_dog_racing_us_region_only", + "government_licensed_online_casions_online_gambling_us_region_only", + "government_owned_lotteries_non_us_region", + "government_owned_lotteries_us_region_only", + "government_services", + "grocery_stores_supermarkets", + "hardware_equipment_and_supplies", + "hardware_stores", + "health_and_beauty_spas", + "hearing_aids_sales_and_supplies", + "heating_plumbing_a_c", + "hobby_toy_and_game_shops", + "home_supply_warehouse_stores", + "hospitals", + "hotels_motels_and_resorts", + "household_appliance_stores", + "industrial_supplies", + "information_retrieval_services", + "insurance_default", + "insurance_underwriting_premiums", + "intra_company_purchases", + "jewelry_stores_watches_clocks_and_silverware_stores", + "landscaping_services", + "laundries", + "laundry_cleaning_services", + "legal_services_attorneys", + "luggage_and_leather_goods_stores", + "lumber_building_materials_stores", + "manual_cash_disburse", + "marinas_service_and_supplies", + "marketplaces", + "masonry_stonework_and_plaster", + "massage_parlors", + "medical_and_dental_labs", + "medical_dental_ophthalmic_and_hospital_equipment_and_supplies", + "medical_services", + "membership_organizations", + "mens_and_boys_clothing_and_accessories_stores", + "mens_womens_clothing_stores", + "metal_service_centers", + "miscellaneous", + "miscellaneous_apparel_and_accessory_shops", + "miscellaneous_auto_dealers", + "miscellaneous_business_services", + "miscellaneous_food_stores", + "miscellaneous_general_merchandise", + "miscellaneous_general_services", + "miscellaneous_home_furnishing_specialty_stores", + "miscellaneous_publishing_and_printing", + "miscellaneous_recreation_services", + "miscellaneous_repair_shops", + "miscellaneous_specialty_retail", + "mobile_home_dealers", + "motion_picture_theaters", + "motor_freight_carriers_and_trucking", + "motor_homes_dealers", + "motor_vehicle_supplies_and_new_parts", + "motorcycle_shops_and_dealers", + "motorcycle_shops_dealers", + "music_stores_musical_instruments_pianos_and_sheet_music", + "news_dealers_and_newsstands", + "non_fi_money_orders", + "non_fi_stored_value_card_purchase_load", + "nondurable_goods", + "nurseries_lawn_and_garden_supply_stores", + "nursing_personal_care", + "office_and_commercial_furniture", + "opticians_eyeglasses", + "optometrists_ophthalmologist", + "orthopedic_goods_prosthetic_devices", + "osteopaths", + "package_stores_beer_wine_and_liquor", + "paints_varnishes_and_supplies", + "parking_lots_garages", + "passenger_railways", + "pawn_shops", + "pet_shops_pet_food_and_supplies", + "petroleum_and_petroleum_products", + "photo_developing", + "photographic_photocopy_microfilm_equipment_and_supplies", + "photographic_studios", + "picture_video_production", + "piece_goods_notions_and_other_dry_goods", + "plumbing_heating_equipment_and_supplies", + "political_organizations", + "postal_services_government_only", + "precious_stones_and_metals_watches_and_jewelry", + "professional_services", + "public_warehousing_and_storage", + "quick_copy_repro_and_blueprint", + "railroads", + "real_estate_agents_and_managers_rentals", + "record_stores", + "recreational_vehicle_rentals", + "religious_goods_stores", + "religious_organizations", + "roofing_siding_sheet_metal", + "secretarial_support_services", + "security_brokers_dealers", + "service_stations", + "sewing_needlework_fabric_and_piece_goods_stores", + "shoe_repair_hat_cleaning", + "shoe_stores", + "small_appliance_repair", + "snowmobile_dealers", + "special_trade_services", + "specialty_cleaning", + "sporting_goods_stores", + "sporting_recreation_camps", + "sports_and_riding_apparel_stores", + "sports_clubs_fields", + "stamp_and_coin_stores", + "stationary_office_supplies_printing_and_writing_paper", + "stationery_stores_office_and_school_supply_stores", + "swimming_pools_sales", + "t_ui_travel_germany", + "tailors_alterations", + "tax_payments_government_agencies", + "tax_preparation_services", + "taxicabs_limousines", + "telecommunication_equipment_and_telephone_sales", + "telecommunication_services", + "telegraph_services", + "tent_and_awning_shops", + "testing_laboratories", + "theatrical_ticket_agencies", + "timeshares", + "tire_retreading_and_repair", + "tolls_bridge_fees", + "tourist_attractions_and_exhibits", + "towing_services", + "trailer_parks_campgrounds", + "transportation_services", + "travel_agencies_tour_operators", + "truck_stop_iteration", + "truck_utility_trailer_rentals", + "typesetting_plate_making_and_related_services", + "typewriter_stores", + "u_s_federal_government_agencies_or_departments", + "uniforms_commercial_clothing", + "used_merchandise_and_secondhand_stores", + "utilities", + "variety_stores", + "veterinary_services", + "video_amusement_game_supplies", + "video_game_arcades", + "video_tape_rental_stores", + "vocational_trade_schools", + "watch_jewelry_repair", + "welding_repair", + "wholesale_clubs", + "wig_and_toupee_stores", + "wires_money_orders", + "womens_accessory_and_specialty_shops", + "womens_ready_to_wear_stores", + "wrecking_and_salvage_yards", + ] + ] + ] + """ + Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories. + """ + interval: Literal[ + "all_time", "daily", "monthly", "per_authorization", "weekly", "yearly" + ] + """ + Interval (or event) to which the amount applies. + """ diff --git a/stripe/params/issuing/_cardholder_retrieve_params.py b/stripe/params/issuing/_cardholder_retrieve_params.py new file mode 100644 index 000000000..43bdef06d --- /dev/null +++ b/stripe/params/issuing/_cardholder_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 CardholderRetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/issuing/_cardholder_update_params.py b/stripe/params/issuing/_cardholder_update_params.py new file mode 100644 index 000000000..ffc9c2898 --- /dev/null +++ b/stripe/params/issuing/_cardholder_update_params.py @@ -0,0 +1,1119 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class CardholderUpdateParams(TypedDict): + billing: NotRequired["CardholderUpdateParamsBilling"] + """ + The cardholder's billing address. + """ + company: NotRequired["CardholderUpdateParamsCompany"] + """ + Additional information about a `company` cardholder. + """ + email: NotRequired[str] + """ + The cardholder's email address. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + individual: NotRequired["CardholderUpdateParamsIndividual"] + """ + Additional information about an `individual` cardholder. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + phone_number: NotRequired[str] + """ + The cardholder's phone number. This is required for all cardholders who will be creating EU cards. See the [3D Secure documentation](https://stripe.com/docs/issuing/3d-secure) for more details. + """ + preferred_locales: NotRequired[List[Literal["de", "en", "es", "fr", "it"]]] + """ + The cardholder's preferred locales (languages), ordered by preference. Locales can be `de`, `en`, `es`, `fr`, or `it`. + This changes the language of the [3D Secure flow](https://stripe.com/docs/issuing/3d-secure) and one-time password messages sent to the cardholder. + """ + spending_controls: NotRequired["CardholderUpdateParamsSpendingControls"] + """ + Rules that control spending across this cardholder's cards. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details. + """ + status: NotRequired[Literal["active", "inactive"]] + """ + Specifies whether to permit authorizations on this cardholder's cards. + """ + + +class CardholderUpdateParamsBilling(TypedDict): + address: "CardholderUpdateParamsBillingAddress" + """ + The cardholder's billing address. + """ + + +class CardholderUpdateParamsBillingAddress(TypedDict): + city: 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: 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: str + """ + ZIP or postal code. + """ + state: NotRequired[str] + """ + State, county, province, or region. + """ + + +class CardholderUpdateParamsCompany(TypedDict): + tax_id: NotRequired[str] + """ + The entity's business ID number. + """ + + +class CardholderUpdateParamsIndividual(TypedDict): + card_issuing: NotRequired["CardholderUpdateParamsIndividualCardIssuing"] + """ + Information related to the card_issuing program for this cardholder. + """ + dob: NotRequired["CardholderUpdateParamsIndividualDob"] + """ + The date of birth of this cardholder. Cardholders must be older than 13 years old. + """ + first_name: NotRequired[str] + """ + The first name of this cardholder. Required before activating Cards. This field cannot contain any numbers, special characters (except periods, commas, hyphens, spaces and apostrophes) or non-latin letters. + """ + last_name: NotRequired[str] + """ + The last name of this cardholder. Required before activating Cards. This field cannot contain any numbers, special characters (except periods, commas, hyphens, spaces and apostrophes) or non-latin letters. + """ + verification: NotRequired["CardholderUpdateParamsIndividualVerification"] + """ + Government-issued ID document for this cardholder. + """ + + +class CardholderUpdateParamsIndividualCardIssuing(TypedDict): + user_terms_acceptance: NotRequired[ + "CardholderUpdateParamsIndividualCardIssuingUserTermsAcceptance" + ] + """ + Information about cardholder acceptance of Celtic [Authorized User Terms](https://stripe.com/docs/issuing/cards#accept-authorized-user-terms). Required for cards backed by a Celtic program. + """ + + +class CardholderUpdateParamsIndividualCardIssuingUserTermsAcceptance( + TypedDict +): + date: NotRequired[int] + """ + The Unix timestamp marking when the cardholder accepted the Authorized User Terms. Required for Celtic Spend Card users. + """ + ip: NotRequired[str] + """ + The IP address from which the cardholder accepted the Authorized User Terms. Required for Celtic Spend Card users. + """ + user_agent: NotRequired["Literal['']|str"] + """ + The user agent of the browser from which the cardholder accepted the Authorized User Terms. + """ + + +class CardholderUpdateParamsIndividualDob(TypedDict): + day: int + """ + The day of birth, between 1 and 31. + """ + month: int + """ + The month of birth, between 1 and 12. + """ + year: int + """ + The four-digit year of birth. + """ + + +class CardholderUpdateParamsIndividualVerification(TypedDict): + document: NotRequired[ + "CardholderUpdateParamsIndividualVerificationDocument" + ] + """ + An identifying document, either a passport or local ID card. + """ + + +class CardholderUpdateParamsIndividualVerificationDocument(TypedDict): + back: NotRequired[str] + """ + The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. + """ + front: NotRequired[str] + """ + The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. + """ + + +class CardholderUpdateParamsSpendingControls(TypedDict): + allowed_categories: NotRequired[ + List[ + Literal[ + "ac_refrigeration_repair", + "accounting_bookkeeping_services", + "advertising_services", + "agricultural_cooperative", + "airlines_air_carriers", + "airports_flying_fields", + "ambulance_services", + "amusement_parks_carnivals", + "antique_reproductions", + "antique_shops", + "aquariums", + "architectural_surveying_services", + "art_dealers_and_galleries", + "artists_supply_and_craft_shops", + "auto_and_home_supply_stores", + "auto_body_repair_shops", + "auto_paint_shops", + "auto_service_shops", + "automated_cash_disburse", + "automated_fuel_dispensers", + "automobile_associations", + "automotive_parts_and_accessories_stores", + "automotive_tire_stores", + "bail_and_bond_payments", + "bakeries", + "bands_orchestras", + "barber_and_beauty_shops", + "betting_casino_gambling", + "bicycle_shops", + "billiard_pool_establishments", + "boat_dealers", + "boat_rentals_and_leases", + "book_stores", + "books_periodicals_and_newspapers", + "bowling_alleys", + "bus_lines", + "business_secretarial_schools", + "buying_shopping_services", + "cable_satellite_and_other_pay_television_and_radio", + "camera_and_photographic_supply_stores", + "candy_nut_and_confectionery_stores", + "car_and_truck_dealers_new_used", + "car_and_truck_dealers_used_only", + "car_rental_agencies", + "car_washes", + "carpentry_services", + "carpet_upholstery_cleaning", + "caterers", + "charitable_and_social_service_organizations_fundraising", + "chemicals_and_allied_products", + "child_care_services", + "childrens_and_infants_wear_stores", + "chiropodists_podiatrists", + "chiropractors", + "cigar_stores_and_stands", + "civic_social_fraternal_associations", + "cleaning_and_maintenance", + "clothing_rental", + "colleges_universities", + "commercial_equipment", + "commercial_footwear", + "commercial_photography_art_and_graphics", + "commuter_transport_and_ferries", + "computer_network_services", + "computer_programming", + "computer_repair", + "computer_software_stores", + "computers_peripherals_and_software", + "concrete_work_services", + "construction_materials", + "consulting_public_relations", + "correspondence_schools", + "cosmetic_stores", + "counseling_services", + "country_clubs", + "courier_services", + "court_costs", + "credit_reporting_agencies", + "cruise_lines", + "dairy_products_stores", + "dance_hall_studios_schools", + "dating_escort_services", + "dentists_orthodontists", + "department_stores", + "detective_agencies", + "digital_goods_applications", + "digital_goods_games", + "digital_goods_large_volume", + "digital_goods_media", + "direct_marketing_catalog_merchant", + "direct_marketing_combination_catalog_and_retail_merchant", + "direct_marketing_inbound_telemarketing", + "direct_marketing_insurance_services", + "direct_marketing_other", + "direct_marketing_outbound_telemarketing", + "direct_marketing_subscription", + "direct_marketing_travel", + "discount_stores", + "doctors", + "door_to_door_sales", + "drapery_window_covering_and_upholstery_stores", + "drinking_places", + "drug_stores_and_pharmacies", + "drugs_drug_proprietaries_and_druggist_sundries", + "dry_cleaners", + "durable_goods", + "duty_free_stores", + "eating_places_restaurants", + "educational_services", + "electric_razor_stores", + "electric_vehicle_charging", + "electrical_parts_and_equipment", + "electrical_services", + "electronics_repair_shops", + "electronics_stores", + "elementary_secondary_schools", + "emergency_services_gcas_visa_use_only", + "employment_temp_agencies", + "equipment_rental", + "exterminating_services", + "family_clothing_stores", + "fast_food_restaurants", + "financial_institutions", + "fines_government_administrative_entities", + "fireplace_fireplace_screens_and_accessories_stores", + "floor_covering_stores", + "florists", + "florists_supplies_nursery_stock_and_flowers", + "freezer_and_locker_meat_provisioners", + "fuel_dealers_non_automotive", + "funeral_services_crematories", + "furniture_home_furnishings_and_equipment_stores_except_appliances", + "furniture_repair_refinishing", + "furriers_and_fur_shops", + "general_services", + "gift_card_novelty_and_souvenir_shops", + "glass_paint_and_wallpaper_stores", + "glassware_crystal_stores", + "golf_courses_public", + "government_licensed_horse_dog_racing_us_region_only", + "government_licensed_online_casions_online_gambling_us_region_only", + "government_owned_lotteries_non_us_region", + "government_owned_lotteries_us_region_only", + "government_services", + "grocery_stores_supermarkets", + "hardware_equipment_and_supplies", + "hardware_stores", + "health_and_beauty_spas", + "hearing_aids_sales_and_supplies", + "heating_plumbing_a_c", + "hobby_toy_and_game_shops", + "home_supply_warehouse_stores", + "hospitals", + "hotels_motels_and_resorts", + "household_appliance_stores", + "industrial_supplies", + "information_retrieval_services", + "insurance_default", + "insurance_underwriting_premiums", + "intra_company_purchases", + "jewelry_stores_watches_clocks_and_silverware_stores", + "landscaping_services", + "laundries", + "laundry_cleaning_services", + "legal_services_attorneys", + "luggage_and_leather_goods_stores", + "lumber_building_materials_stores", + "manual_cash_disburse", + "marinas_service_and_supplies", + "marketplaces", + "masonry_stonework_and_plaster", + "massage_parlors", + "medical_and_dental_labs", + "medical_dental_ophthalmic_and_hospital_equipment_and_supplies", + "medical_services", + "membership_organizations", + "mens_and_boys_clothing_and_accessories_stores", + "mens_womens_clothing_stores", + "metal_service_centers", + "miscellaneous", + "miscellaneous_apparel_and_accessory_shops", + "miscellaneous_auto_dealers", + "miscellaneous_business_services", + "miscellaneous_food_stores", + "miscellaneous_general_merchandise", + "miscellaneous_general_services", + "miscellaneous_home_furnishing_specialty_stores", + "miscellaneous_publishing_and_printing", + "miscellaneous_recreation_services", + "miscellaneous_repair_shops", + "miscellaneous_specialty_retail", + "mobile_home_dealers", + "motion_picture_theaters", + "motor_freight_carriers_and_trucking", + "motor_homes_dealers", + "motor_vehicle_supplies_and_new_parts", + "motorcycle_shops_and_dealers", + "motorcycle_shops_dealers", + "music_stores_musical_instruments_pianos_and_sheet_music", + "news_dealers_and_newsstands", + "non_fi_money_orders", + "non_fi_stored_value_card_purchase_load", + "nondurable_goods", + "nurseries_lawn_and_garden_supply_stores", + "nursing_personal_care", + "office_and_commercial_furniture", + "opticians_eyeglasses", + "optometrists_ophthalmologist", + "orthopedic_goods_prosthetic_devices", + "osteopaths", + "package_stores_beer_wine_and_liquor", + "paints_varnishes_and_supplies", + "parking_lots_garages", + "passenger_railways", + "pawn_shops", + "pet_shops_pet_food_and_supplies", + "petroleum_and_petroleum_products", + "photo_developing", + "photographic_photocopy_microfilm_equipment_and_supplies", + "photographic_studios", + "picture_video_production", + "piece_goods_notions_and_other_dry_goods", + "plumbing_heating_equipment_and_supplies", + "political_organizations", + "postal_services_government_only", + "precious_stones_and_metals_watches_and_jewelry", + "professional_services", + "public_warehousing_and_storage", + "quick_copy_repro_and_blueprint", + "railroads", + "real_estate_agents_and_managers_rentals", + "record_stores", + "recreational_vehicle_rentals", + "religious_goods_stores", + "religious_organizations", + "roofing_siding_sheet_metal", + "secretarial_support_services", + "security_brokers_dealers", + "service_stations", + "sewing_needlework_fabric_and_piece_goods_stores", + "shoe_repair_hat_cleaning", + "shoe_stores", + "small_appliance_repair", + "snowmobile_dealers", + "special_trade_services", + "specialty_cleaning", + "sporting_goods_stores", + "sporting_recreation_camps", + "sports_and_riding_apparel_stores", + "sports_clubs_fields", + "stamp_and_coin_stores", + "stationary_office_supplies_printing_and_writing_paper", + "stationery_stores_office_and_school_supply_stores", + "swimming_pools_sales", + "t_ui_travel_germany", + "tailors_alterations", + "tax_payments_government_agencies", + "tax_preparation_services", + "taxicabs_limousines", + "telecommunication_equipment_and_telephone_sales", + "telecommunication_services", + "telegraph_services", + "tent_and_awning_shops", + "testing_laboratories", + "theatrical_ticket_agencies", + "timeshares", + "tire_retreading_and_repair", + "tolls_bridge_fees", + "tourist_attractions_and_exhibits", + "towing_services", + "trailer_parks_campgrounds", + "transportation_services", + "travel_agencies_tour_operators", + "truck_stop_iteration", + "truck_utility_trailer_rentals", + "typesetting_plate_making_and_related_services", + "typewriter_stores", + "u_s_federal_government_agencies_or_departments", + "uniforms_commercial_clothing", + "used_merchandise_and_secondhand_stores", + "utilities", + "variety_stores", + "veterinary_services", + "video_amusement_game_supplies", + "video_game_arcades", + "video_tape_rental_stores", + "vocational_trade_schools", + "watch_jewelry_repair", + "welding_repair", + "wholesale_clubs", + "wig_and_toupee_stores", + "wires_money_orders", + "womens_accessory_and_specialty_shops", + "womens_ready_to_wear_stores", + "wrecking_and_salvage_yards", + ] + ] + ] + """ + Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to allow. All other categories will be blocked. Cannot be set with `blocked_categories`. + """ + allowed_merchant_countries: NotRequired[List[str]] + """ + Array of strings containing representing countries from which authorizations will be allowed. Authorizations from merchants in all other countries will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `blocked_merchant_countries`. Provide an empty value to unset this control. + """ + blocked_categories: NotRequired[ + List[ + Literal[ + "ac_refrigeration_repair", + "accounting_bookkeeping_services", + "advertising_services", + "agricultural_cooperative", + "airlines_air_carriers", + "airports_flying_fields", + "ambulance_services", + "amusement_parks_carnivals", + "antique_reproductions", + "antique_shops", + "aquariums", + "architectural_surveying_services", + "art_dealers_and_galleries", + "artists_supply_and_craft_shops", + "auto_and_home_supply_stores", + "auto_body_repair_shops", + "auto_paint_shops", + "auto_service_shops", + "automated_cash_disburse", + "automated_fuel_dispensers", + "automobile_associations", + "automotive_parts_and_accessories_stores", + "automotive_tire_stores", + "bail_and_bond_payments", + "bakeries", + "bands_orchestras", + "barber_and_beauty_shops", + "betting_casino_gambling", + "bicycle_shops", + "billiard_pool_establishments", + "boat_dealers", + "boat_rentals_and_leases", + "book_stores", + "books_periodicals_and_newspapers", + "bowling_alleys", + "bus_lines", + "business_secretarial_schools", + "buying_shopping_services", + "cable_satellite_and_other_pay_television_and_radio", + "camera_and_photographic_supply_stores", + "candy_nut_and_confectionery_stores", + "car_and_truck_dealers_new_used", + "car_and_truck_dealers_used_only", + "car_rental_agencies", + "car_washes", + "carpentry_services", + "carpet_upholstery_cleaning", + "caterers", + "charitable_and_social_service_organizations_fundraising", + "chemicals_and_allied_products", + "child_care_services", + "childrens_and_infants_wear_stores", + "chiropodists_podiatrists", + "chiropractors", + "cigar_stores_and_stands", + "civic_social_fraternal_associations", + "cleaning_and_maintenance", + "clothing_rental", + "colleges_universities", + "commercial_equipment", + "commercial_footwear", + "commercial_photography_art_and_graphics", + "commuter_transport_and_ferries", + "computer_network_services", + "computer_programming", + "computer_repair", + "computer_software_stores", + "computers_peripherals_and_software", + "concrete_work_services", + "construction_materials", + "consulting_public_relations", + "correspondence_schools", + "cosmetic_stores", + "counseling_services", + "country_clubs", + "courier_services", + "court_costs", + "credit_reporting_agencies", + "cruise_lines", + "dairy_products_stores", + "dance_hall_studios_schools", + "dating_escort_services", + "dentists_orthodontists", + "department_stores", + "detective_agencies", + "digital_goods_applications", + "digital_goods_games", + "digital_goods_large_volume", + "digital_goods_media", + "direct_marketing_catalog_merchant", + "direct_marketing_combination_catalog_and_retail_merchant", + "direct_marketing_inbound_telemarketing", + "direct_marketing_insurance_services", + "direct_marketing_other", + "direct_marketing_outbound_telemarketing", + "direct_marketing_subscription", + "direct_marketing_travel", + "discount_stores", + "doctors", + "door_to_door_sales", + "drapery_window_covering_and_upholstery_stores", + "drinking_places", + "drug_stores_and_pharmacies", + "drugs_drug_proprietaries_and_druggist_sundries", + "dry_cleaners", + "durable_goods", + "duty_free_stores", + "eating_places_restaurants", + "educational_services", + "electric_razor_stores", + "electric_vehicle_charging", + "electrical_parts_and_equipment", + "electrical_services", + "electronics_repair_shops", + "electronics_stores", + "elementary_secondary_schools", + "emergency_services_gcas_visa_use_only", + "employment_temp_agencies", + "equipment_rental", + "exterminating_services", + "family_clothing_stores", + "fast_food_restaurants", + "financial_institutions", + "fines_government_administrative_entities", + "fireplace_fireplace_screens_and_accessories_stores", + "floor_covering_stores", + "florists", + "florists_supplies_nursery_stock_and_flowers", + "freezer_and_locker_meat_provisioners", + "fuel_dealers_non_automotive", + "funeral_services_crematories", + "furniture_home_furnishings_and_equipment_stores_except_appliances", + "furniture_repair_refinishing", + "furriers_and_fur_shops", + "general_services", + "gift_card_novelty_and_souvenir_shops", + "glass_paint_and_wallpaper_stores", + "glassware_crystal_stores", + "golf_courses_public", + "government_licensed_horse_dog_racing_us_region_only", + "government_licensed_online_casions_online_gambling_us_region_only", + "government_owned_lotteries_non_us_region", + "government_owned_lotteries_us_region_only", + "government_services", + "grocery_stores_supermarkets", + "hardware_equipment_and_supplies", + "hardware_stores", + "health_and_beauty_spas", + "hearing_aids_sales_and_supplies", + "heating_plumbing_a_c", + "hobby_toy_and_game_shops", + "home_supply_warehouse_stores", + "hospitals", + "hotels_motels_and_resorts", + "household_appliance_stores", + "industrial_supplies", + "information_retrieval_services", + "insurance_default", + "insurance_underwriting_premiums", + "intra_company_purchases", + "jewelry_stores_watches_clocks_and_silverware_stores", + "landscaping_services", + "laundries", + "laundry_cleaning_services", + "legal_services_attorneys", + "luggage_and_leather_goods_stores", + "lumber_building_materials_stores", + "manual_cash_disburse", + "marinas_service_and_supplies", + "marketplaces", + "masonry_stonework_and_plaster", + "massage_parlors", + "medical_and_dental_labs", + "medical_dental_ophthalmic_and_hospital_equipment_and_supplies", + "medical_services", + "membership_organizations", + "mens_and_boys_clothing_and_accessories_stores", + "mens_womens_clothing_stores", + "metal_service_centers", + "miscellaneous", + "miscellaneous_apparel_and_accessory_shops", + "miscellaneous_auto_dealers", + "miscellaneous_business_services", + "miscellaneous_food_stores", + "miscellaneous_general_merchandise", + "miscellaneous_general_services", + "miscellaneous_home_furnishing_specialty_stores", + "miscellaneous_publishing_and_printing", + "miscellaneous_recreation_services", + "miscellaneous_repair_shops", + "miscellaneous_specialty_retail", + "mobile_home_dealers", + "motion_picture_theaters", + "motor_freight_carriers_and_trucking", + "motor_homes_dealers", + "motor_vehicle_supplies_and_new_parts", + "motorcycle_shops_and_dealers", + "motorcycle_shops_dealers", + "music_stores_musical_instruments_pianos_and_sheet_music", + "news_dealers_and_newsstands", + "non_fi_money_orders", + "non_fi_stored_value_card_purchase_load", + "nondurable_goods", + "nurseries_lawn_and_garden_supply_stores", + "nursing_personal_care", + "office_and_commercial_furniture", + "opticians_eyeglasses", + "optometrists_ophthalmologist", + "orthopedic_goods_prosthetic_devices", + "osteopaths", + "package_stores_beer_wine_and_liquor", + "paints_varnishes_and_supplies", + "parking_lots_garages", + "passenger_railways", + "pawn_shops", + "pet_shops_pet_food_and_supplies", + "petroleum_and_petroleum_products", + "photo_developing", + "photographic_photocopy_microfilm_equipment_and_supplies", + "photographic_studios", + "picture_video_production", + "piece_goods_notions_and_other_dry_goods", + "plumbing_heating_equipment_and_supplies", + "political_organizations", + "postal_services_government_only", + "precious_stones_and_metals_watches_and_jewelry", + "professional_services", + "public_warehousing_and_storage", + "quick_copy_repro_and_blueprint", + "railroads", + "real_estate_agents_and_managers_rentals", + "record_stores", + "recreational_vehicle_rentals", + "religious_goods_stores", + "religious_organizations", + "roofing_siding_sheet_metal", + "secretarial_support_services", + "security_brokers_dealers", + "service_stations", + "sewing_needlework_fabric_and_piece_goods_stores", + "shoe_repair_hat_cleaning", + "shoe_stores", + "small_appliance_repair", + "snowmobile_dealers", + "special_trade_services", + "specialty_cleaning", + "sporting_goods_stores", + "sporting_recreation_camps", + "sports_and_riding_apparel_stores", + "sports_clubs_fields", + "stamp_and_coin_stores", + "stationary_office_supplies_printing_and_writing_paper", + "stationery_stores_office_and_school_supply_stores", + "swimming_pools_sales", + "t_ui_travel_germany", + "tailors_alterations", + "tax_payments_government_agencies", + "tax_preparation_services", + "taxicabs_limousines", + "telecommunication_equipment_and_telephone_sales", + "telecommunication_services", + "telegraph_services", + "tent_and_awning_shops", + "testing_laboratories", + "theatrical_ticket_agencies", + "timeshares", + "tire_retreading_and_repair", + "tolls_bridge_fees", + "tourist_attractions_and_exhibits", + "towing_services", + "trailer_parks_campgrounds", + "transportation_services", + "travel_agencies_tour_operators", + "truck_stop_iteration", + "truck_utility_trailer_rentals", + "typesetting_plate_making_and_related_services", + "typewriter_stores", + "u_s_federal_government_agencies_or_departments", + "uniforms_commercial_clothing", + "used_merchandise_and_secondhand_stores", + "utilities", + "variety_stores", + "veterinary_services", + "video_amusement_game_supplies", + "video_game_arcades", + "video_tape_rental_stores", + "vocational_trade_schools", + "watch_jewelry_repair", + "welding_repair", + "wholesale_clubs", + "wig_and_toupee_stores", + "wires_money_orders", + "womens_accessory_and_specialty_shops", + "womens_ready_to_wear_stores", + "wrecking_and_salvage_yards", + ] + ] + ] + """ + Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to decline. All other categories will be allowed. Cannot be set with `allowed_categories`. + """ + blocked_merchant_countries: NotRequired[List[str]] + """ + Array of strings containing representing countries from which authorizations will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `allowed_merchant_countries`. Provide an empty value to unset this control. + """ + spending_limits: NotRequired[ + List["CardholderUpdateParamsSpendingControlsSpendingLimit"] + ] + """ + Limit spending with amount-based rules that apply across this cardholder's cards. + """ + spending_limits_currency: NotRequired[str] + """ + Currency of amounts within `spending_limits`. Defaults to your merchant country's currency. + """ + + +class CardholderUpdateParamsSpendingControlsSpendingLimit(TypedDict): + amount: int + """ + Maximum amount allowed to spend per interval. + """ + categories: NotRequired[ + List[ + Literal[ + "ac_refrigeration_repair", + "accounting_bookkeeping_services", + "advertising_services", + "agricultural_cooperative", + "airlines_air_carriers", + "airports_flying_fields", + "ambulance_services", + "amusement_parks_carnivals", + "antique_reproductions", + "antique_shops", + "aquariums", + "architectural_surveying_services", + "art_dealers_and_galleries", + "artists_supply_and_craft_shops", + "auto_and_home_supply_stores", + "auto_body_repair_shops", + "auto_paint_shops", + "auto_service_shops", + "automated_cash_disburse", + "automated_fuel_dispensers", + "automobile_associations", + "automotive_parts_and_accessories_stores", + "automotive_tire_stores", + "bail_and_bond_payments", + "bakeries", + "bands_orchestras", + "barber_and_beauty_shops", + "betting_casino_gambling", + "bicycle_shops", + "billiard_pool_establishments", + "boat_dealers", + "boat_rentals_and_leases", + "book_stores", + "books_periodicals_and_newspapers", + "bowling_alleys", + "bus_lines", + "business_secretarial_schools", + "buying_shopping_services", + "cable_satellite_and_other_pay_television_and_radio", + "camera_and_photographic_supply_stores", + "candy_nut_and_confectionery_stores", + "car_and_truck_dealers_new_used", + "car_and_truck_dealers_used_only", + "car_rental_agencies", + "car_washes", + "carpentry_services", + "carpet_upholstery_cleaning", + "caterers", + "charitable_and_social_service_organizations_fundraising", + "chemicals_and_allied_products", + "child_care_services", + "childrens_and_infants_wear_stores", + "chiropodists_podiatrists", + "chiropractors", + "cigar_stores_and_stands", + "civic_social_fraternal_associations", + "cleaning_and_maintenance", + "clothing_rental", + "colleges_universities", + "commercial_equipment", + "commercial_footwear", + "commercial_photography_art_and_graphics", + "commuter_transport_and_ferries", + "computer_network_services", + "computer_programming", + "computer_repair", + "computer_software_stores", + "computers_peripherals_and_software", + "concrete_work_services", + "construction_materials", + "consulting_public_relations", + "correspondence_schools", + "cosmetic_stores", + "counseling_services", + "country_clubs", + "courier_services", + "court_costs", + "credit_reporting_agencies", + "cruise_lines", + "dairy_products_stores", + "dance_hall_studios_schools", + "dating_escort_services", + "dentists_orthodontists", + "department_stores", + "detective_agencies", + "digital_goods_applications", + "digital_goods_games", + "digital_goods_large_volume", + "digital_goods_media", + "direct_marketing_catalog_merchant", + "direct_marketing_combination_catalog_and_retail_merchant", + "direct_marketing_inbound_telemarketing", + "direct_marketing_insurance_services", + "direct_marketing_other", + "direct_marketing_outbound_telemarketing", + "direct_marketing_subscription", + "direct_marketing_travel", + "discount_stores", + "doctors", + "door_to_door_sales", + "drapery_window_covering_and_upholstery_stores", + "drinking_places", + "drug_stores_and_pharmacies", + "drugs_drug_proprietaries_and_druggist_sundries", + "dry_cleaners", + "durable_goods", + "duty_free_stores", + "eating_places_restaurants", + "educational_services", + "electric_razor_stores", + "electric_vehicle_charging", + "electrical_parts_and_equipment", + "electrical_services", + "electronics_repair_shops", + "electronics_stores", + "elementary_secondary_schools", + "emergency_services_gcas_visa_use_only", + "employment_temp_agencies", + "equipment_rental", + "exterminating_services", + "family_clothing_stores", + "fast_food_restaurants", + "financial_institutions", + "fines_government_administrative_entities", + "fireplace_fireplace_screens_and_accessories_stores", + "floor_covering_stores", + "florists", + "florists_supplies_nursery_stock_and_flowers", + "freezer_and_locker_meat_provisioners", + "fuel_dealers_non_automotive", + "funeral_services_crematories", + "furniture_home_furnishings_and_equipment_stores_except_appliances", + "furniture_repair_refinishing", + "furriers_and_fur_shops", + "general_services", + "gift_card_novelty_and_souvenir_shops", + "glass_paint_and_wallpaper_stores", + "glassware_crystal_stores", + "golf_courses_public", + "government_licensed_horse_dog_racing_us_region_only", + "government_licensed_online_casions_online_gambling_us_region_only", + "government_owned_lotteries_non_us_region", + "government_owned_lotteries_us_region_only", + "government_services", + "grocery_stores_supermarkets", + "hardware_equipment_and_supplies", + "hardware_stores", + "health_and_beauty_spas", + "hearing_aids_sales_and_supplies", + "heating_plumbing_a_c", + "hobby_toy_and_game_shops", + "home_supply_warehouse_stores", + "hospitals", + "hotels_motels_and_resorts", + "household_appliance_stores", + "industrial_supplies", + "information_retrieval_services", + "insurance_default", + "insurance_underwriting_premiums", + "intra_company_purchases", + "jewelry_stores_watches_clocks_and_silverware_stores", + "landscaping_services", + "laundries", + "laundry_cleaning_services", + "legal_services_attorneys", + "luggage_and_leather_goods_stores", + "lumber_building_materials_stores", + "manual_cash_disburse", + "marinas_service_and_supplies", + "marketplaces", + "masonry_stonework_and_plaster", + "massage_parlors", + "medical_and_dental_labs", + "medical_dental_ophthalmic_and_hospital_equipment_and_supplies", + "medical_services", + "membership_organizations", + "mens_and_boys_clothing_and_accessories_stores", + "mens_womens_clothing_stores", + "metal_service_centers", + "miscellaneous", + "miscellaneous_apparel_and_accessory_shops", + "miscellaneous_auto_dealers", + "miscellaneous_business_services", + "miscellaneous_food_stores", + "miscellaneous_general_merchandise", + "miscellaneous_general_services", + "miscellaneous_home_furnishing_specialty_stores", + "miscellaneous_publishing_and_printing", + "miscellaneous_recreation_services", + "miscellaneous_repair_shops", + "miscellaneous_specialty_retail", + "mobile_home_dealers", + "motion_picture_theaters", + "motor_freight_carriers_and_trucking", + "motor_homes_dealers", + "motor_vehicle_supplies_and_new_parts", + "motorcycle_shops_and_dealers", + "motorcycle_shops_dealers", + "music_stores_musical_instruments_pianos_and_sheet_music", + "news_dealers_and_newsstands", + "non_fi_money_orders", + "non_fi_stored_value_card_purchase_load", + "nondurable_goods", + "nurseries_lawn_and_garden_supply_stores", + "nursing_personal_care", + "office_and_commercial_furniture", + "opticians_eyeglasses", + "optometrists_ophthalmologist", + "orthopedic_goods_prosthetic_devices", + "osteopaths", + "package_stores_beer_wine_and_liquor", + "paints_varnishes_and_supplies", + "parking_lots_garages", + "passenger_railways", + "pawn_shops", + "pet_shops_pet_food_and_supplies", + "petroleum_and_petroleum_products", + "photo_developing", + "photographic_photocopy_microfilm_equipment_and_supplies", + "photographic_studios", + "picture_video_production", + "piece_goods_notions_and_other_dry_goods", + "plumbing_heating_equipment_and_supplies", + "political_organizations", + "postal_services_government_only", + "precious_stones_and_metals_watches_and_jewelry", + "professional_services", + "public_warehousing_and_storage", + "quick_copy_repro_and_blueprint", + "railroads", + "real_estate_agents_and_managers_rentals", + "record_stores", + "recreational_vehicle_rentals", + "religious_goods_stores", + "religious_organizations", + "roofing_siding_sheet_metal", + "secretarial_support_services", + "security_brokers_dealers", + "service_stations", + "sewing_needlework_fabric_and_piece_goods_stores", + "shoe_repair_hat_cleaning", + "shoe_stores", + "small_appliance_repair", + "snowmobile_dealers", + "special_trade_services", + "specialty_cleaning", + "sporting_goods_stores", + "sporting_recreation_camps", + "sports_and_riding_apparel_stores", + "sports_clubs_fields", + "stamp_and_coin_stores", + "stationary_office_supplies_printing_and_writing_paper", + "stationery_stores_office_and_school_supply_stores", + "swimming_pools_sales", + "t_ui_travel_germany", + "tailors_alterations", + "tax_payments_government_agencies", + "tax_preparation_services", + "taxicabs_limousines", + "telecommunication_equipment_and_telephone_sales", + "telecommunication_services", + "telegraph_services", + "tent_and_awning_shops", + "testing_laboratories", + "theatrical_ticket_agencies", + "timeshares", + "tire_retreading_and_repair", + "tolls_bridge_fees", + "tourist_attractions_and_exhibits", + "towing_services", + "trailer_parks_campgrounds", + "transportation_services", + "travel_agencies_tour_operators", + "truck_stop_iteration", + "truck_utility_trailer_rentals", + "typesetting_plate_making_and_related_services", + "typewriter_stores", + "u_s_federal_government_agencies_or_departments", + "uniforms_commercial_clothing", + "used_merchandise_and_secondhand_stores", + "utilities", + "variety_stores", + "veterinary_services", + "video_amusement_game_supplies", + "video_game_arcades", + "video_tape_rental_stores", + "vocational_trade_schools", + "watch_jewelry_repair", + "welding_repair", + "wholesale_clubs", + "wig_and_toupee_stores", + "wires_money_orders", + "womens_accessory_and_specialty_shops", + "womens_ready_to_wear_stores", + "wrecking_and_salvage_yards", + ] + ] + ] + """ + Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories. + """ + interval: Literal[ + "all_time", "daily", "monthly", "per_authorization", "weekly", "yearly" + ] + """ + Interval (or event) to which the amount applies. + """ diff --git a/stripe/params/issuing/_credit_underwriting_record_correct_params.py b/stripe/params/issuing/_credit_underwriting_record_correct_params.py new file mode 100644 index 000000000..4bc3447c8 --- /dev/null +++ b/stripe/params/issuing/_credit_underwriting_record_correct_params.py @@ -0,0 +1,402 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class CreditUnderwritingRecordCorrectParams(RequestOptions): + application: NotRequired[ + "CreditUnderwritingRecordCorrectParamsApplication" + ] + """ + Details about the application submission. + """ + credit_user: NotRequired["CreditUnderwritingRecordCorrectParamsCreditUser"] + """ + Information about the company or person applying or holding the account. + """ + decided_at: NotRequired[int] + """ + Date when a decision was made. + """ + decision: NotRequired["CreditUnderwritingRecordCorrectParamsDecision"] + """ + Details about the decision. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + regulatory_reporting_file: NotRequired[str] + """ + File containing regulatory reporting data for the decision. Required if you are subject to this [reporting requirement](https://stripe.com/docs/issuing/credit/report-required-regulatory-data-for-credit-decisions). Optional if previously provided and no changes are needed. + """ + underwriting_exception: NotRequired[ + "CreditUnderwritingRecordCorrectParamsUnderwritingException" + ] + """ + If an exception to the usual underwriting criteria was made for this decision, details about the exception must be provided. Exceptions should only be granted in rare circumstances, in consultation with Stripe Compliance. + """ + + +class CreditUnderwritingRecordCorrectParamsApplication(TypedDict): + application_method: NotRequired[ + Literal["in_person", "mail", "online", "phone"] + ] + """ + The channel through which the applicant has submitted their application. Defaults to `online`. + """ + purpose: Literal["credit_limit_increase", "credit_line_opening"] + """ + Scope of demand made by the applicant. + """ + submitted_at: int + """ + Date when the applicant submitted their application. + """ + + +class CreditUnderwritingRecordCorrectParamsCreditUser(TypedDict): + email: str + """ + Email of the applicant or accountholder. + """ + name: str + """ + Full name of the company or person. + """ + + +class CreditUnderwritingRecordCorrectParamsDecision(TypedDict): + application_rejected: NotRequired[ + "CreditUnderwritingRecordCorrectParamsDecisionApplicationRejected" + ] + """ + Details about the application rejection. + """ + credit_limit_approved: NotRequired[ + "CreditUnderwritingRecordCorrectParamsDecisionCreditLimitApproved" + ] + """ + Details about the credit limit approved. An approved credit limit is required before you can set a `credit_limit_amount` in the [CreditPolicy API](https://stripe.com/docs/api/issuing/credit_policy/) + """ + credit_limit_decreased: NotRequired[ + "CreditUnderwritingRecordCorrectParamsDecisionCreditLimitDecreased" + ] + """ + Details about the credit limit decreased. + """ + credit_line_closed: NotRequired[ + "CreditUnderwritingRecordCorrectParamsDecisionCreditLineClosed" + ] + """ + Details about the credit line closed. + """ + type: Literal[ + "additional_information_requested", + "application_rejected", + "credit_limit_approved", + "credit_limit_decreased", + "credit_line_closed", + "no_changes", + "withdrawn_by_applicant", + ] + """ + Outcome of the decision. + """ + + +class CreditUnderwritingRecordCorrectParamsDecisionApplicationRejected( + TypedDict, +): + reason_other_explanation: NotRequired[str] + """ + Details about the `reasons.other` when present. + """ + reasons: List[ + Literal[ + "applicant_is_not_beneficial_owner", + "applicant_too_young", + "application_is_not_beneficial_owner", + "bankruptcy", + "business_size_too_small", + "current_account_tier_ineligible", + "customer_already_exists", + "customer_requested_account_closure", + "debt_to_cash_balance_ratio_too_high", + "debt_to_equity_ratio_too_high", + "delinquent_credit_obligations", + "dispute_rate_too_high", + "duration_of_residence", + "excessive_income_or_revenue_obligations", + "expenses_to_cash_balance_ratio_too_high", + "foreclosure_or_repossession", + "frozen_file_at_credit_bureau", + "garnishment_or_attachment", + "government_loan_program_criteria", + "high_concentration_of_clients", + "high_risk_industry", + "incomplete_application", + "inconsistent_monthly_revenues", + "insufficient_account_history_with_platform", + "insufficient_bank_account_history", + "insufficient_cash_balance", + "insufficient_cash_flow", + "insufficient_collateral", + "insufficient_credit_experience", + "insufficient_deposits", + "insufficient_income", + "insufficient_margin_ratio", + "insufficient_operating_profit", + "insufficient_period_in_operation", + "insufficient_reserves", + "insufficient_revenue", + "insufficient_social_media_performance", + "insufficient_time_in_network", + "insufficient_trade_credit_insurance", + "invalid_business_license", + "lacking_cash_account", + "late_payment_history_reported_to_bureau", + "lien_collection_action_or_judgement", + "negative_public_information", + "no_credit_file", + "other", + "outside_supported_country", + "outside_supported_state", + "poor_payment_history_with_platform", + "prior_or_current_legal_action", + "prohibited_industry", + "rate_of_cash_balance_fluctuation_too_high", + "recent_inquiries_on_business_credit_report", + "removal_of_bank_account_connection", + "revenue_discrepancy", + "runway_too_short", + "suspected_fraud", + "too_many_non_sufficient_funds_or_overdrafts", + "unable_to_verify_address", + "unable_to_verify_identity", + "unable_to_verify_income_or_revenue", + "unprofitable", + "unsupportable_business_type", + ] + ] + """ + List of reasons why the application was rejected, up to 4 reasons, in order of importance. + """ + + +class CreditUnderwritingRecordCorrectParamsDecisionCreditLimitApproved( + TypedDict, +): + amount: int + """ + The credit approved, in the currency of the account and [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + """ + currency: NotRequired[str] + """ + The currency of the credit approved, will default to the Account's Issuing currency. + """ + + +class CreditUnderwritingRecordCorrectParamsDecisionCreditLimitDecreased( + TypedDict, +): + amount: int + """ + The credit approved, in the currency of the account and [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + """ + currency: NotRequired[str] + """ + The currency of the credit approved, will default to the Account's Issuing currency. + """ + reason_other_explanation: NotRequired[str] + """ + Details about the `reasons.other` when present. + """ + reasons: List[ + Literal[ + "applicant_is_not_beneficial_owner", + "applicant_too_young", + "application_is_not_beneficial_owner", + "bankruptcy", + "business_size_too_small", + "change_in_financial_state", + "change_in_utilization_of_credit_line", + "current_account_tier_ineligible", + "customer_already_exists", + "customer_requested_account_closure", + "debt_to_cash_balance_ratio_too_high", + "debt_to_equity_ratio_too_high", + "decrease_in_income_to_expense_ratio", + "decrease_in_social_media_performance", + "delinquent_credit_obligations", + "dispute_rate_too_high", + "duration_of_residence", + "exceeds_acceptable_platform_exposure", + "excessive_income_or_revenue_obligations", + "expenses_to_cash_balance_ratio_too_high", + "foreclosure_or_repossession", + "frozen_file_at_credit_bureau", + "garnishment_or_attachment", + "government_loan_program_criteria", + "has_recent_credit_limit_increase", + "high_concentration_of_clients", + "high_risk_industry", + "incomplete_application", + "inconsistent_monthly_revenues", + "insufficient_account_history_with_platform", + "insufficient_bank_account_history", + "insufficient_cash_balance", + "insufficient_cash_flow", + "insufficient_collateral", + "insufficient_credit_experience", + "insufficient_credit_utilization", + "insufficient_deposits", + "insufficient_income", + "insufficient_margin_ratio", + "insufficient_operating_profit", + "insufficient_period_in_operation", + "insufficient_reserves", + "insufficient_revenue", + "insufficient_social_media_performance", + "insufficient_time_in_network", + "insufficient_trade_credit_insurance", + "insufficient_usage_as_qualified_expenses", + "invalid_business_license", + "lacking_cash_account", + "late_payment_history_reported_to_bureau", + "lien_collection_action_or_judgement", + "negative_public_information", + "no_credit_file", + "other", + "outside_supported_country", + "outside_supported_state", + "poor_payment_history_with_platform", + "prior_or_current_legal_action", + "prohibited_industry", + "rate_of_cash_balance_fluctuation_too_high", + "recent_inquiries_on_business_credit_report", + "removal_of_bank_account_connection", + "revenue_discrepancy", + "runway_too_short", + "suspected_fraud", + "too_many_non_sufficient_funds_or_overdrafts", + "unable_to_verify_address", + "unable_to_verify_identity", + "unable_to_verify_income_or_revenue", + "unprofitable", + "unsupportable_business_type", + ] + ] + """ + List of reasons why the existing credit was decreased, up to 4 reasons, in order of importance. + """ + + +class CreditUnderwritingRecordCorrectParamsDecisionCreditLineClosed(TypedDict): + reason_other_explanation: NotRequired[str] + """ + Details about the `reasons.other` when present. + """ + reasons: List[ + Literal[ + "applicant_is_not_beneficial_owner", + "applicant_too_young", + "application_is_not_beneficial_owner", + "bankruptcy", + "business_size_too_small", + "change_in_financial_state", + "change_in_utilization_of_credit_line", + "current_account_tier_ineligible", + "customer_already_exists", + "customer_requested_account_closure", + "debt_to_cash_balance_ratio_too_high", + "debt_to_equity_ratio_too_high", + "decrease_in_income_to_expense_ratio", + "decrease_in_social_media_performance", + "delinquent_credit_obligations", + "dispute_rate_too_high", + "duration_of_residence", + "exceeds_acceptable_platform_exposure", + "excessive_income_or_revenue_obligations", + "expenses_to_cash_balance_ratio_too_high", + "foreclosure_or_repossession", + "frozen_file_at_credit_bureau", + "garnishment_or_attachment", + "government_loan_program_criteria", + "has_recent_credit_limit_increase", + "high_concentration_of_clients", + "high_risk_industry", + "incomplete_application", + "inconsistent_monthly_revenues", + "insufficient_account_history_with_platform", + "insufficient_bank_account_history", + "insufficient_cash_balance", + "insufficient_cash_flow", + "insufficient_collateral", + "insufficient_credit_experience", + "insufficient_credit_utilization", + "insufficient_deposits", + "insufficient_income", + "insufficient_margin_ratio", + "insufficient_operating_profit", + "insufficient_period_in_operation", + "insufficient_reserves", + "insufficient_revenue", + "insufficient_social_media_performance", + "insufficient_time_in_network", + "insufficient_trade_credit_insurance", + "insufficient_usage_as_qualified_expenses", + "invalid_business_license", + "lacking_cash_account", + "late_payment_history_reported_to_bureau", + "lien_collection_action_or_judgement", + "negative_public_information", + "no_credit_file", + "other", + "outside_supported_country", + "outside_supported_state", + "poor_payment_history_with_platform", + "prior_or_current_legal_action", + "prohibited_industry", + "rate_of_cash_balance_fluctuation_too_high", + "recent_inquiries_on_business_credit_report", + "removal_of_bank_account_connection", + "revenue_discrepancy", + "runway_too_short", + "suspected_fraud", + "too_many_non_sufficient_funds_or_overdrafts", + "unable_to_verify_address", + "unable_to_verify_identity", + "unable_to_verify_income_or_revenue", + "unprofitable", + "unsupportable_business_type", + ] + ] + """ + List of reasons why the credit line was closed, up to 4 reasons, in order of importance. + """ + + +class CreditUnderwritingRecordCorrectParamsUnderwritingException(TypedDict): + explanation: str + """ + Written explanation for the exception. + """ + original_decision_type: Literal[ + "additional_information_requested", + "application_rejected", + "credit_limit_approved", + "credit_limit_decreased", + "credit_line_closed", + "no_changes", + "withdrawn_by_applicant", + ] + """ + The decision before the exception was applied. + """ diff --git a/stripe/params/issuing/_credit_underwriting_record_create_from_application_params.py b/stripe/params/issuing/_credit_underwriting_record_create_from_application_params.py new file mode 100644 index 000000000..1ebee048d --- /dev/null +++ b/stripe/params/issuing/_credit_underwriting_record_create_from_application_params.py @@ -0,0 +1,58 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class CreditUnderwritingRecordCreateFromApplicationParams(RequestOptions): + application: ( + "CreditUnderwritingRecordCreateFromApplicationParamsApplication" + ) + """ + Details about the application submission. + """ + credit_user: ( + "CreditUnderwritingRecordCreateFromApplicationParamsCreditUser" + ) + """ + Information about the company or person applying or holding the account. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + + +class CreditUnderwritingRecordCreateFromApplicationParamsApplication( + TypedDict +): + application_method: NotRequired[ + Literal["in_person", "mail", "online", "phone"] + ] + """ + The channel through which the applicant has submitted their application. Defaults to `online`. + """ + purpose: Literal["credit_limit_increase", "credit_line_opening"] + """ + Scope of demand made by the applicant. + """ + submitted_at: int + """ + Date when the applicant submitted their application. + """ + + +class CreditUnderwritingRecordCreateFromApplicationParamsCreditUser(TypedDict): + email: str + """ + Email of the applicant or accountholder. + """ + name: str + """ + Full name of the company or person. + """ diff --git a/stripe/params/issuing/_credit_underwriting_record_create_from_proactive_review_params.py b/stripe/params/issuing/_credit_underwriting_record_create_from_proactive_review_params.py new file mode 100644 index 000000000..5326c8b44 --- /dev/null +++ b/stripe/params/issuing/_credit_underwriting_record_create_from_proactive_review_params.py @@ -0,0 +1,301 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class CreditUnderwritingRecordCreateFromProactiveReviewParams(RequestOptions): + credit_user: ( + "CreditUnderwritingRecordCreateFromProactiveReviewParamsCreditUser" + ) + """ + Information about the company or person applying or holding the account. + """ + decided_at: int + """ + Date when a decision was made. + """ + decision: "CreditUnderwritingRecordCreateFromProactiveReviewParamsDecision" + """ + Details about the decision. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + regulatory_reporting_file: NotRequired[str] + """ + File containing regulatory reporting data for the decision. Required if you are subject to this [reporting requirement](https://stripe.com/docs/issuing/credit/report-required-regulatory-data-for-credit-decisions). + """ + underwriting_exception: NotRequired[ + "CreditUnderwritingRecordCreateFromProactiveReviewParamsUnderwritingException" + ] + """ + If an exception to the usual underwriting criteria was made for this decision, details about the exception must be provided. Exceptions should only be granted in rare circumstances, in consultation with Stripe Compliance. + """ + + +class CreditUnderwritingRecordCreateFromProactiveReviewParamsCreditUser( + TypedDict, +): + email: str + """ + Email of the applicant or accountholder. + """ + name: str + """ + Full name of the company or person. + """ + + +class CreditUnderwritingRecordCreateFromProactiveReviewParamsDecision( + TypedDict, +): + credit_limit_approved: NotRequired[ + "CreditUnderwritingRecordCreateFromProactiveReviewParamsDecisionCreditLimitApproved" + ] + """ + Details about the credit limit approved. An approved credit limit is required before you can set a `credit_limit_amount` in the [CreditPolicy API](https://stripe.com/docs/api/issuing/credit_policy/) + """ + credit_limit_decreased: NotRequired[ + "CreditUnderwritingRecordCreateFromProactiveReviewParamsDecisionCreditLimitDecreased" + ] + """ + Details about the credit limit decreased. + """ + credit_line_closed: NotRequired[ + "CreditUnderwritingRecordCreateFromProactiveReviewParamsDecisionCreditLineClosed" + ] + """ + Details about the credit line closed. + """ + type: Literal[ + "credit_limit_approved", + "credit_limit_decreased", + "credit_line_closed", + "no_changes", + ] + """ + Outcome of the decision. + """ + + +class CreditUnderwritingRecordCreateFromProactiveReviewParamsDecisionCreditLimitApproved( + TypedDict, +): + amount: int + """ + The credit approved, in the currency of the account and [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + """ + currency: NotRequired[str] + """ + The currency of the credit approved, will default to the Account's Issuing currency. + """ + + +class CreditUnderwritingRecordCreateFromProactiveReviewParamsDecisionCreditLimitDecreased( + TypedDict, +): + amount: int + """ + The credit approved, in the currency of the account and [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + """ + currency: NotRequired[str] + """ + The currency of the credit approved, will default to the Account's Issuing currency. + """ + reason_other_explanation: NotRequired[str] + """ + Details about the `reasons.other` when present. + """ + reasons: List[ + Literal[ + "applicant_is_not_beneficial_owner", + "applicant_too_young", + "application_is_not_beneficial_owner", + "bankruptcy", + "business_size_too_small", + "change_in_financial_state", + "change_in_utilization_of_credit_line", + "current_account_tier_ineligible", + "customer_already_exists", + "customer_requested_account_closure", + "debt_to_cash_balance_ratio_too_high", + "debt_to_equity_ratio_too_high", + "decrease_in_income_to_expense_ratio", + "decrease_in_social_media_performance", + "delinquent_credit_obligations", + "dispute_rate_too_high", + "duration_of_residence", + "exceeds_acceptable_platform_exposure", + "excessive_income_or_revenue_obligations", + "expenses_to_cash_balance_ratio_too_high", + "foreclosure_or_repossession", + "frozen_file_at_credit_bureau", + "garnishment_or_attachment", + "government_loan_program_criteria", + "has_recent_credit_limit_increase", + "high_concentration_of_clients", + "high_risk_industry", + "incomplete_application", + "inconsistent_monthly_revenues", + "insufficient_account_history_with_platform", + "insufficient_bank_account_history", + "insufficient_cash_balance", + "insufficient_cash_flow", + "insufficient_collateral", + "insufficient_credit_experience", + "insufficient_credit_utilization", + "insufficient_deposits", + "insufficient_income", + "insufficient_margin_ratio", + "insufficient_operating_profit", + "insufficient_period_in_operation", + "insufficient_reserves", + "insufficient_revenue", + "insufficient_social_media_performance", + "insufficient_time_in_network", + "insufficient_trade_credit_insurance", + "insufficient_usage_as_qualified_expenses", + "invalid_business_license", + "lacking_cash_account", + "late_payment_history_reported_to_bureau", + "lien_collection_action_or_judgement", + "negative_public_information", + "no_credit_file", + "other", + "outside_supported_country", + "outside_supported_state", + "poor_payment_history_with_platform", + "prior_or_current_legal_action", + "prohibited_industry", + "rate_of_cash_balance_fluctuation_too_high", + "recent_inquiries_on_business_credit_report", + "removal_of_bank_account_connection", + "revenue_discrepancy", + "runway_too_short", + "suspected_fraud", + "too_many_non_sufficient_funds_or_overdrafts", + "unable_to_verify_address", + "unable_to_verify_identity", + "unable_to_verify_income_or_revenue", + "unprofitable", + "unsupportable_business_type", + ] + ] + """ + List of reasons why the existing credit was decreased, up to 4 reasons, in order of importance. + """ + + +class CreditUnderwritingRecordCreateFromProactiveReviewParamsDecisionCreditLineClosed( + TypedDict, +): + reason_other_explanation: NotRequired[str] + """ + Details about the `reasons.other` when present. + """ + reasons: List[ + Literal[ + "applicant_is_not_beneficial_owner", + "applicant_too_young", + "application_is_not_beneficial_owner", + "bankruptcy", + "business_size_too_small", + "change_in_financial_state", + "change_in_utilization_of_credit_line", + "current_account_tier_ineligible", + "customer_already_exists", + "customer_requested_account_closure", + "debt_to_cash_balance_ratio_too_high", + "debt_to_equity_ratio_too_high", + "decrease_in_income_to_expense_ratio", + "decrease_in_social_media_performance", + "delinquent_credit_obligations", + "dispute_rate_too_high", + "duration_of_residence", + "exceeds_acceptable_platform_exposure", + "excessive_income_or_revenue_obligations", + "expenses_to_cash_balance_ratio_too_high", + "foreclosure_or_repossession", + "frozen_file_at_credit_bureau", + "garnishment_or_attachment", + "government_loan_program_criteria", + "has_recent_credit_limit_increase", + "high_concentration_of_clients", + "high_risk_industry", + "incomplete_application", + "inconsistent_monthly_revenues", + "insufficient_account_history_with_platform", + "insufficient_bank_account_history", + "insufficient_cash_balance", + "insufficient_cash_flow", + "insufficient_collateral", + "insufficient_credit_experience", + "insufficient_credit_utilization", + "insufficient_deposits", + "insufficient_income", + "insufficient_margin_ratio", + "insufficient_operating_profit", + "insufficient_period_in_operation", + "insufficient_reserves", + "insufficient_revenue", + "insufficient_social_media_performance", + "insufficient_time_in_network", + "insufficient_trade_credit_insurance", + "insufficient_usage_as_qualified_expenses", + "invalid_business_license", + "lacking_cash_account", + "late_payment_history_reported_to_bureau", + "lien_collection_action_or_judgement", + "negative_public_information", + "no_credit_file", + "other", + "outside_supported_country", + "outside_supported_state", + "poor_payment_history_with_platform", + "prior_or_current_legal_action", + "prohibited_industry", + "rate_of_cash_balance_fluctuation_too_high", + "recent_inquiries_on_business_credit_report", + "removal_of_bank_account_connection", + "revenue_discrepancy", + "runway_too_short", + "suspected_fraud", + "too_many_non_sufficient_funds_or_overdrafts", + "unable_to_verify_address", + "unable_to_verify_identity", + "unable_to_verify_income_or_revenue", + "unprofitable", + "unsupportable_business_type", + ] + ] + """ + List of reasons why the credit line was closed, up to 4 reasons, in order of importance. + """ + + +class CreditUnderwritingRecordCreateFromProactiveReviewParamsUnderwritingException( + TypedDict, +): + explanation: str + """ + Written explanation for the exception. + """ + original_decision_type: Literal[ + "additional_information_requested", + "application_rejected", + "credit_limit_approved", + "credit_limit_decreased", + "credit_line_closed", + "no_changes", + "withdrawn_by_applicant", + ] + """ + The decision before the exception was applied. + """ diff --git a/stripe/params/issuing/_credit_underwriting_record_list_params.py b/stripe/params/issuing/_credit_underwriting_record_list_params.py new file mode 100644 index 000000000..af075200f --- /dev/null +++ b/stripe/params/issuing/_credit_underwriting_record_list_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 CreditUnderwritingRecordListParams(RequestOptions): + 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. + """ diff --git a/stripe/params/issuing/_credit_underwriting_record_report_decision_params.py b/stripe/params/issuing/_credit_underwriting_record_report_decision_params.py new file mode 100644 index 000000000..b23139b3c --- /dev/null +++ b/stripe/params/issuing/_credit_underwriting_record_report_decision_params.py @@ -0,0 +1,171 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class CreditUnderwritingRecordReportDecisionParams(RequestOptions): + decided_at: int + """ + Date when a decision was made. + """ + decision: "CreditUnderwritingRecordReportDecisionParamsDecision" + """ + Details about the decision. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + regulatory_reporting_file: NotRequired[str] + """ + File containing regulatory reporting data for the decision. Required if you are subject to this [reporting requirement](https://stripe.com/docs/issuing/credit/report-required-regulatory-data-for-credit-decisions). + """ + underwriting_exception: NotRequired[ + "CreditUnderwritingRecordReportDecisionParamsUnderwritingException" + ] + """ + If an exception to the usual underwriting criteria was made for this decision, details about the exception must be provided. Exceptions should only be granted in rare circumstances, in consultation with Stripe Compliance. + """ + + +class CreditUnderwritingRecordReportDecisionParamsDecision(TypedDict): + application_rejected: NotRequired[ + "CreditUnderwritingRecordReportDecisionParamsDecisionApplicationRejected" + ] + """ + Details about the application rejection. + """ + credit_limit_approved: NotRequired[ + "CreditUnderwritingRecordReportDecisionParamsDecisionCreditLimitApproved" + ] + """ + Details about the credit limit approved. An approved credit limit is required before you can set a `credit_limit_amount` in the [CreditPolicy API](https://stripe.com/docs/api/issuing/credit_policy/) + """ + type: Literal[ + "additional_information_requested", + "application_rejected", + "credit_limit_approved", + "withdrawn_by_applicant", + ] + """ + Outcome of the decision. + """ + + +class CreditUnderwritingRecordReportDecisionParamsDecisionApplicationRejected( + TypedDict, +): + reason_other_explanation: NotRequired[str] + """ + Details about the `reasons.other` when present. + """ + reasons: List[ + Literal[ + "applicant_is_not_beneficial_owner", + "applicant_too_young", + "application_is_not_beneficial_owner", + "bankruptcy", + "business_size_too_small", + "current_account_tier_ineligible", + "customer_already_exists", + "customer_requested_account_closure", + "debt_to_cash_balance_ratio_too_high", + "debt_to_equity_ratio_too_high", + "delinquent_credit_obligations", + "dispute_rate_too_high", + "duration_of_residence", + "excessive_income_or_revenue_obligations", + "expenses_to_cash_balance_ratio_too_high", + "foreclosure_or_repossession", + "frozen_file_at_credit_bureau", + "garnishment_or_attachment", + "government_loan_program_criteria", + "high_concentration_of_clients", + "high_risk_industry", + "incomplete_application", + "inconsistent_monthly_revenues", + "insufficient_account_history_with_platform", + "insufficient_bank_account_history", + "insufficient_cash_balance", + "insufficient_cash_flow", + "insufficient_collateral", + "insufficient_credit_experience", + "insufficient_deposits", + "insufficient_income", + "insufficient_margin_ratio", + "insufficient_operating_profit", + "insufficient_period_in_operation", + "insufficient_reserves", + "insufficient_revenue", + "insufficient_social_media_performance", + "insufficient_time_in_network", + "insufficient_trade_credit_insurance", + "invalid_business_license", + "lacking_cash_account", + "late_payment_history_reported_to_bureau", + "lien_collection_action_or_judgement", + "negative_public_information", + "no_credit_file", + "other", + "outside_supported_country", + "outside_supported_state", + "poor_payment_history_with_platform", + "prior_or_current_legal_action", + "prohibited_industry", + "rate_of_cash_balance_fluctuation_too_high", + "recent_inquiries_on_business_credit_report", + "removal_of_bank_account_connection", + "revenue_discrepancy", + "runway_too_short", + "suspected_fraud", + "too_many_non_sufficient_funds_or_overdrafts", + "unable_to_verify_address", + "unable_to_verify_identity", + "unable_to_verify_income_or_revenue", + "unprofitable", + "unsupportable_business_type", + ] + ] + """ + List of reasons why the application was rejected, up to 4 reasons, in order of importance. + """ + + +class CreditUnderwritingRecordReportDecisionParamsDecisionCreditLimitApproved( + TypedDict, +): + amount: int + """ + The credit approved, in the currency of the account and [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + """ + currency: NotRequired[str] + """ + The currency of the credit approved, will default to the Account's Issuing currency. + """ + + +class CreditUnderwritingRecordReportDecisionParamsUnderwritingException( + TypedDict, +): + explanation: str + """ + Written explanation for the exception. + """ + original_decision_type: Literal[ + "additional_information_requested", + "application_rejected", + "credit_limit_approved", + "credit_limit_decreased", + "credit_line_closed", + "no_changes", + "withdrawn_by_applicant", + ] + """ + The decision before the exception was applied. + """ diff --git a/stripe/params/issuing/_credit_underwriting_record_retrieve_params.py b/stripe/params/issuing/_credit_underwriting_record_retrieve_params.py new file mode 100644 index 000000000..7671b0950 --- /dev/null +++ b/stripe/params/issuing/_credit_underwriting_record_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 CreditUnderwritingRecordRetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/issuing/_dispute_create_params.py b/stripe/params/issuing/_dispute_create_params.py new file mode 100644 index 000000000..4fdc92093 --- /dev/null +++ b/stripe/params/issuing/_dispute_create_params.py @@ -0,0 +1,287 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class DisputeCreateParams(RequestOptions): + amount: NotRequired[int] + """ + The dispute amount in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). If not set, defaults to the full transaction amount. + """ + evidence: NotRequired["DisputeCreateParamsEvidence"] + """ + Evidence provided for the dispute. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + transaction: NotRequired[str] + """ + The ID of the issuing transaction to create a dispute for. For transaction on Treasury FinancialAccounts, use `treasury.received_debit`. + """ + treasury: NotRequired["DisputeCreateParamsTreasury"] + """ + Params for disputes related to Treasury FinancialAccounts + """ + + +class DisputeCreateParamsEvidence(TypedDict): + canceled: NotRequired["Literal['']|DisputeCreateParamsEvidenceCanceled"] + """ + Evidence provided when `reason` is 'canceled'. + """ + duplicate: NotRequired["Literal['']|DisputeCreateParamsEvidenceDuplicate"] + """ + Evidence provided when `reason` is 'duplicate'. + """ + fraudulent: NotRequired[ + "Literal['']|DisputeCreateParamsEvidenceFraudulent" + ] + """ + Evidence provided when `reason` is 'fraudulent'. + """ + merchandise_not_as_described: NotRequired[ + "Literal['']|DisputeCreateParamsEvidenceMerchandiseNotAsDescribed" + ] + """ + Evidence provided when `reason` is 'merchandise_not_as_described'. + """ + no_valid_authorization: NotRequired[ + "Literal['']|DisputeCreateParamsEvidenceNoValidAuthorization" + ] + """ + Evidence provided when `reason` is 'no_valid_authorization'. + """ + not_received: NotRequired[ + "Literal['']|DisputeCreateParamsEvidenceNotReceived" + ] + """ + Evidence provided when `reason` is 'not_received'. + """ + other: NotRequired["Literal['']|DisputeCreateParamsEvidenceOther"] + """ + Evidence provided when `reason` is 'other'. + """ + reason: NotRequired[ + Literal[ + "canceled", + "duplicate", + "fraudulent", + "merchandise_not_as_described", + "no_valid_authorization", + "not_received", + "other", + "service_not_as_described", + ] + ] + """ + The reason for filing the dispute. The evidence should be submitted in the field of the same name. + """ + service_not_as_described: NotRequired[ + "Literal['']|DisputeCreateParamsEvidenceServiceNotAsDescribed" + ] + """ + Evidence provided when `reason` is 'service_not_as_described'. + """ + + +class DisputeCreateParamsEvidenceCanceled(TypedDict): + additional_documentation: NotRequired["Literal['']|str"] + """ + (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + """ + canceled_at: NotRequired["Literal['']|int"] + """ + Date when order was canceled. + """ + cancellation_policy_provided: NotRequired["Literal['']|bool"] + """ + Whether the cardholder was provided with a cancellation policy. + """ + cancellation_reason: NotRequired["Literal['']|str"] + """ + Reason for canceling the order. + """ + expected_at: NotRequired["Literal['']|int"] + """ + Date when the cardholder expected to receive the product. + """ + explanation: NotRequired["Literal['']|str"] + """ + Explanation of why the cardholder is disputing this transaction. + """ + product_description: NotRequired["Literal['']|str"] + """ + Description of the merchandise or service that was purchased. + """ + product_type: NotRequired["Literal['']|Literal['merchandise', 'service']"] + """ + Whether the product was a merchandise or service. + """ + return_status: NotRequired[ + "Literal['']|Literal['merchant_rejected', 'successful']" + ] + """ + Result of cardholder's attempt to return the product. + """ + returned_at: NotRequired["Literal['']|int"] + """ + Date when the product was returned or attempted to be returned. + """ + + +class DisputeCreateParamsEvidenceDuplicate(TypedDict): + additional_documentation: NotRequired["Literal['']|str"] + """ + (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + """ + card_statement: NotRequired["Literal['']|str"] + """ + (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Copy of the card statement showing that the product had already been paid for. + """ + cash_receipt: NotRequired["Literal['']|str"] + """ + (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Copy of the receipt showing that the product had been paid for in cash. + """ + check_image: NotRequired["Literal['']|str"] + """ + (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Image of the front and back of the check that was used to pay for the product. + """ + explanation: NotRequired["Literal['']|str"] + """ + Explanation of why the cardholder is disputing this transaction. + """ + original_transaction: NotRequired[str] + """ + Transaction (e.g., ipi_...) that the disputed transaction is a duplicate of. Of the two or more transactions that are copies of each other, this is original undisputed one. + """ + + +class DisputeCreateParamsEvidenceFraudulent(TypedDict): + additional_documentation: NotRequired["Literal['']|str"] + """ + (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + """ + explanation: NotRequired["Literal['']|str"] + """ + Explanation of why the cardholder is disputing this transaction. + """ + + +class DisputeCreateParamsEvidenceMerchandiseNotAsDescribed(TypedDict): + additional_documentation: NotRequired["Literal['']|str"] + """ + (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + """ + explanation: NotRequired["Literal['']|str"] + """ + Explanation of why the cardholder is disputing this transaction. + """ + received_at: NotRequired["Literal['']|int"] + """ + Date when the product was received. + """ + return_description: NotRequired["Literal['']|str"] + """ + Description of the cardholder's attempt to return the product. + """ + return_status: NotRequired[ + "Literal['']|Literal['merchant_rejected', 'successful']" + ] + """ + Result of cardholder's attempt to return the product. + """ + returned_at: NotRequired["Literal['']|int"] + """ + Date when the product was returned or attempted to be returned. + """ + + +class DisputeCreateParamsEvidenceNoValidAuthorization(TypedDict): + additional_documentation: NotRequired["Literal['']|str"] + """ + (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + """ + explanation: NotRequired["Literal['']|str"] + """ + Explanation of why the cardholder is disputing this transaction. + """ + + +class DisputeCreateParamsEvidenceNotReceived(TypedDict): + additional_documentation: NotRequired["Literal['']|str"] + """ + (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + """ + expected_at: NotRequired["Literal['']|int"] + """ + Date when the cardholder expected to receive the product. + """ + explanation: NotRequired["Literal['']|str"] + """ + Explanation of why the cardholder is disputing this transaction. + """ + product_description: NotRequired["Literal['']|str"] + """ + Description of the merchandise or service that was purchased. + """ + product_type: NotRequired["Literal['']|Literal['merchandise', 'service']"] + """ + Whether the product was a merchandise or service. + """ + + +class DisputeCreateParamsEvidenceOther(TypedDict): + additional_documentation: NotRequired["Literal['']|str"] + """ + (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + """ + explanation: NotRequired["Literal['']|str"] + """ + Explanation of why the cardholder is disputing this transaction. + """ + product_description: NotRequired["Literal['']|str"] + """ + Description of the merchandise or service that was purchased. + """ + product_type: NotRequired["Literal['']|Literal['merchandise', 'service']"] + """ + Whether the product was a merchandise or service. + """ + + +class DisputeCreateParamsEvidenceServiceNotAsDescribed(TypedDict): + additional_documentation: NotRequired["Literal['']|str"] + """ + (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + """ + canceled_at: NotRequired["Literal['']|int"] + """ + Date when order was canceled. + """ + cancellation_reason: NotRequired["Literal['']|str"] + """ + Reason for canceling the order. + """ + explanation: NotRequired["Literal['']|str"] + """ + Explanation of why the cardholder is disputing this transaction. + """ + received_at: NotRequired["Literal['']|int"] + """ + Date when the product was received. + """ + + +class DisputeCreateParamsTreasury(TypedDict): + received_debit: str + """ + The ID of the ReceivedDebit to initiate an Issuings dispute for. + """ diff --git a/stripe/params/issuing/_dispute_list_params.py b/stripe/params/issuing/_dispute_list_params.py new file mode 100644 index 000000000..f613beba0 --- /dev/null +++ b/stripe/params/issuing/_dispute_list_params.py @@ -0,0 +1,57 @@ +# -*- 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, TypedDict + + +class DisputeListParams(RequestOptions): + created: NotRequired["DisputeListParamsCreated|int"] + """ + Only return Issuing disputes that were created during the given date interval. + """ + 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. + """ + status: NotRequired[ + Literal["expired", "lost", "submitted", "unsubmitted", "won"] + ] + """ + Select Issuing disputes with the given status. + """ + transaction: NotRequired[str] + """ + Select the Issuing dispute for the given transaction. + """ + + +class DisputeListParamsCreated(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/issuing/_dispute_modify_params.py b/stripe/params/issuing/_dispute_modify_params.py new file mode 100644 index 000000000..2843be9cd --- /dev/null +++ b/stripe/params/issuing/_dispute_modify_params.py @@ -0,0 +1,272 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class DisputeModifyParams(RequestOptions): + amount: NotRequired[int] + """ + The dispute amount in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + """ + evidence: NotRequired["DisputeModifyParamsEvidence"] + """ + Evidence provided for the dispute. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + + +class DisputeModifyParamsEvidence(TypedDict): + canceled: NotRequired["Literal['']|DisputeModifyParamsEvidenceCanceled"] + """ + Evidence provided when `reason` is 'canceled'. + """ + duplicate: NotRequired["Literal['']|DisputeModifyParamsEvidenceDuplicate"] + """ + Evidence provided when `reason` is 'duplicate'. + """ + fraudulent: NotRequired[ + "Literal['']|DisputeModifyParamsEvidenceFraudulent" + ] + """ + Evidence provided when `reason` is 'fraudulent'. + """ + merchandise_not_as_described: NotRequired[ + "Literal['']|DisputeModifyParamsEvidenceMerchandiseNotAsDescribed" + ] + """ + Evidence provided when `reason` is 'merchandise_not_as_described'. + """ + no_valid_authorization: NotRequired[ + "Literal['']|DisputeModifyParamsEvidenceNoValidAuthorization" + ] + """ + Evidence provided when `reason` is 'no_valid_authorization'. + """ + not_received: NotRequired[ + "Literal['']|DisputeModifyParamsEvidenceNotReceived" + ] + """ + Evidence provided when `reason` is 'not_received'. + """ + other: NotRequired["Literal['']|DisputeModifyParamsEvidenceOther"] + """ + Evidence provided when `reason` is 'other'. + """ + reason: NotRequired[ + Literal[ + "canceled", + "duplicate", + "fraudulent", + "merchandise_not_as_described", + "no_valid_authorization", + "not_received", + "other", + "service_not_as_described", + ] + ] + """ + The reason for filing the dispute. The evidence should be submitted in the field of the same name. + """ + service_not_as_described: NotRequired[ + "Literal['']|DisputeModifyParamsEvidenceServiceNotAsDescribed" + ] + """ + Evidence provided when `reason` is 'service_not_as_described'. + """ + + +class DisputeModifyParamsEvidenceCanceled(TypedDict): + additional_documentation: NotRequired["Literal['']|str"] + """ + (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + """ + canceled_at: NotRequired["Literal['']|int"] + """ + Date when order was canceled. + """ + cancellation_policy_provided: NotRequired["Literal['']|bool"] + """ + Whether the cardholder was provided with a cancellation policy. + """ + cancellation_reason: NotRequired["Literal['']|str"] + """ + Reason for canceling the order. + """ + expected_at: NotRequired["Literal['']|int"] + """ + Date when the cardholder expected to receive the product. + """ + explanation: NotRequired["Literal['']|str"] + """ + Explanation of why the cardholder is disputing this transaction. + """ + product_description: NotRequired["Literal['']|str"] + """ + Description of the merchandise or service that was purchased. + """ + product_type: NotRequired["Literal['']|Literal['merchandise', 'service']"] + """ + Whether the product was a merchandise or service. + """ + return_status: NotRequired[ + "Literal['']|Literal['merchant_rejected', 'successful']" + ] + """ + Result of cardholder's attempt to return the product. + """ + returned_at: NotRequired["Literal['']|int"] + """ + Date when the product was returned or attempted to be returned. + """ + + +class DisputeModifyParamsEvidenceDuplicate(TypedDict): + additional_documentation: NotRequired["Literal['']|str"] + """ + (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + """ + card_statement: NotRequired["Literal['']|str"] + """ + (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Copy of the card statement showing that the product had already been paid for. + """ + cash_receipt: NotRequired["Literal['']|str"] + """ + (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Copy of the receipt showing that the product had been paid for in cash. + """ + check_image: NotRequired["Literal['']|str"] + """ + (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Image of the front and back of the check that was used to pay for the product. + """ + explanation: NotRequired["Literal['']|str"] + """ + Explanation of why the cardholder is disputing this transaction. + """ + original_transaction: NotRequired[str] + """ + Transaction (e.g., ipi_...) that the disputed transaction is a duplicate of. Of the two or more transactions that are copies of each other, this is original undisputed one. + """ + + +class DisputeModifyParamsEvidenceFraudulent(TypedDict): + additional_documentation: NotRequired["Literal['']|str"] + """ + (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + """ + explanation: NotRequired["Literal['']|str"] + """ + Explanation of why the cardholder is disputing this transaction. + """ + + +class DisputeModifyParamsEvidenceMerchandiseNotAsDescribed(TypedDict): + additional_documentation: NotRequired["Literal['']|str"] + """ + (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + """ + explanation: NotRequired["Literal['']|str"] + """ + Explanation of why the cardholder is disputing this transaction. + """ + received_at: NotRequired["Literal['']|int"] + """ + Date when the product was received. + """ + return_description: NotRequired["Literal['']|str"] + """ + Description of the cardholder's attempt to return the product. + """ + return_status: NotRequired[ + "Literal['']|Literal['merchant_rejected', 'successful']" + ] + """ + Result of cardholder's attempt to return the product. + """ + returned_at: NotRequired["Literal['']|int"] + """ + Date when the product was returned or attempted to be returned. + """ + + +class DisputeModifyParamsEvidenceNoValidAuthorization(TypedDict): + additional_documentation: NotRequired["Literal['']|str"] + """ + (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + """ + explanation: NotRequired["Literal['']|str"] + """ + Explanation of why the cardholder is disputing this transaction. + """ + + +class DisputeModifyParamsEvidenceNotReceived(TypedDict): + additional_documentation: NotRequired["Literal['']|str"] + """ + (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + """ + expected_at: NotRequired["Literal['']|int"] + """ + Date when the cardholder expected to receive the product. + """ + explanation: NotRequired["Literal['']|str"] + """ + Explanation of why the cardholder is disputing this transaction. + """ + product_description: NotRequired["Literal['']|str"] + """ + Description of the merchandise or service that was purchased. + """ + product_type: NotRequired["Literal['']|Literal['merchandise', 'service']"] + """ + Whether the product was a merchandise or service. + """ + + +class DisputeModifyParamsEvidenceOther(TypedDict): + additional_documentation: NotRequired["Literal['']|str"] + """ + (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + """ + explanation: NotRequired["Literal['']|str"] + """ + Explanation of why the cardholder is disputing this transaction. + """ + product_description: NotRequired["Literal['']|str"] + """ + Description of the merchandise or service that was purchased. + """ + product_type: NotRequired["Literal['']|Literal['merchandise', 'service']"] + """ + Whether the product was a merchandise or service. + """ + + +class DisputeModifyParamsEvidenceServiceNotAsDescribed(TypedDict): + additional_documentation: NotRequired["Literal['']|str"] + """ + (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + """ + canceled_at: NotRequired["Literal['']|int"] + """ + Date when order was canceled. + """ + cancellation_reason: NotRequired["Literal['']|str"] + """ + Reason for canceling the order. + """ + explanation: NotRequired["Literal['']|str"] + """ + Explanation of why the cardholder is disputing this transaction. + """ + received_at: NotRequired["Literal['']|int"] + """ + Date when the product was received. + """ diff --git a/stripe/params/issuing/_dispute_retrieve_params.py b/stripe/params/issuing/_dispute_retrieve_params.py new file mode 100644 index 000000000..5d350dc83 --- /dev/null +++ b/stripe/params/issuing/_dispute_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 DisputeRetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/issuing/_dispute_settlement_detail_list_params.py b/stripe/params/issuing/_dispute_settlement_detail_list_params.py new file mode 100644 index 000000000..6e6a476b4 --- /dev/null +++ b/stripe/params/issuing/_dispute_settlement_detail_list_params.py @@ -0,0 +1,28 @@ +# -*- 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 DisputeSettlementDetailListParams(RequestOptions): + 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. + """ + settlement: NotRequired[str] + """ + Select the Issuing dispute settlement details for the given settlement. + """ + 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. + """ diff --git a/stripe/params/issuing/_dispute_settlement_detail_retrieve_params.py b/stripe/params/issuing/_dispute_settlement_detail_retrieve_params.py new file mode 100644 index 000000000..313bb7905 --- /dev/null +++ b/stripe/params/issuing/_dispute_settlement_detail_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 DisputeSettlementDetailRetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/issuing/_dispute_submit_params.py b/stripe/params/issuing/_dispute_submit_params.py new file mode 100644 index 000000000..3f504f2dc --- /dev/null +++ b/stripe/params/issuing/_dispute_submit_params.py @@ -0,0 +1,16 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import Literal, NotRequired + + +class DisputeSubmitParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ diff --git a/stripe/params/issuing/_dispute_update_params.py b/stripe/params/issuing/_dispute_update_params.py new file mode 100644 index 000000000..3a7d33188 --- /dev/null +++ b/stripe/params/issuing/_dispute_update_params.py @@ -0,0 +1,271 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class DisputeUpdateParams(TypedDict): + amount: NotRequired[int] + """ + The dispute amount in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + """ + evidence: NotRequired["DisputeUpdateParamsEvidence"] + """ + Evidence provided for the dispute. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + + +class DisputeUpdateParamsEvidence(TypedDict): + canceled: NotRequired["Literal['']|DisputeUpdateParamsEvidenceCanceled"] + """ + Evidence provided when `reason` is 'canceled'. + """ + duplicate: NotRequired["Literal['']|DisputeUpdateParamsEvidenceDuplicate"] + """ + Evidence provided when `reason` is 'duplicate'. + """ + fraudulent: NotRequired[ + "Literal['']|DisputeUpdateParamsEvidenceFraudulent" + ] + """ + Evidence provided when `reason` is 'fraudulent'. + """ + merchandise_not_as_described: NotRequired[ + "Literal['']|DisputeUpdateParamsEvidenceMerchandiseNotAsDescribed" + ] + """ + Evidence provided when `reason` is 'merchandise_not_as_described'. + """ + no_valid_authorization: NotRequired[ + "Literal['']|DisputeUpdateParamsEvidenceNoValidAuthorization" + ] + """ + Evidence provided when `reason` is 'no_valid_authorization'. + """ + not_received: NotRequired[ + "Literal['']|DisputeUpdateParamsEvidenceNotReceived" + ] + """ + Evidence provided when `reason` is 'not_received'. + """ + other: NotRequired["Literal['']|DisputeUpdateParamsEvidenceOther"] + """ + Evidence provided when `reason` is 'other'. + """ + reason: NotRequired[ + Literal[ + "canceled", + "duplicate", + "fraudulent", + "merchandise_not_as_described", + "no_valid_authorization", + "not_received", + "other", + "service_not_as_described", + ] + ] + """ + The reason for filing the dispute. The evidence should be submitted in the field of the same name. + """ + service_not_as_described: NotRequired[ + "Literal['']|DisputeUpdateParamsEvidenceServiceNotAsDescribed" + ] + """ + Evidence provided when `reason` is 'service_not_as_described'. + """ + + +class DisputeUpdateParamsEvidenceCanceled(TypedDict): + additional_documentation: NotRequired["Literal['']|str"] + """ + (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + """ + canceled_at: NotRequired["Literal['']|int"] + """ + Date when order was canceled. + """ + cancellation_policy_provided: NotRequired["Literal['']|bool"] + """ + Whether the cardholder was provided with a cancellation policy. + """ + cancellation_reason: NotRequired["Literal['']|str"] + """ + Reason for canceling the order. + """ + expected_at: NotRequired["Literal['']|int"] + """ + Date when the cardholder expected to receive the product. + """ + explanation: NotRequired["Literal['']|str"] + """ + Explanation of why the cardholder is disputing this transaction. + """ + product_description: NotRequired["Literal['']|str"] + """ + Description of the merchandise or service that was purchased. + """ + product_type: NotRequired["Literal['']|Literal['merchandise', 'service']"] + """ + Whether the product was a merchandise or service. + """ + return_status: NotRequired[ + "Literal['']|Literal['merchant_rejected', 'successful']" + ] + """ + Result of cardholder's attempt to return the product. + """ + returned_at: NotRequired["Literal['']|int"] + """ + Date when the product was returned or attempted to be returned. + """ + + +class DisputeUpdateParamsEvidenceDuplicate(TypedDict): + additional_documentation: NotRequired["Literal['']|str"] + """ + (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + """ + card_statement: NotRequired["Literal['']|str"] + """ + (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Copy of the card statement showing that the product had already been paid for. + """ + cash_receipt: NotRequired["Literal['']|str"] + """ + (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Copy of the receipt showing that the product had been paid for in cash. + """ + check_image: NotRequired["Literal['']|str"] + """ + (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Image of the front and back of the check that was used to pay for the product. + """ + explanation: NotRequired["Literal['']|str"] + """ + Explanation of why the cardholder is disputing this transaction. + """ + original_transaction: NotRequired[str] + """ + Transaction (e.g., ipi_...) that the disputed transaction is a duplicate of. Of the two or more transactions that are copies of each other, this is original undisputed one. + """ + + +class DisputeUpdateParamsEvidenceFraudulent(TypedDict): + additional_documentation: NotRequired["Literal['']|str"] + """ + (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + """ + explanation: NotRequired["Literal['']|str"] + """ + Explanation of why the cardholder is disputing this transaction. + """ + + +class DisputeUpdateParamsEvidenceMerchandiseNotAsDescribed(TypedDict): + additional_documentation: NotRequired["Literal['']|str"] + """ + (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + """ + explanation: NotRequired["Literal['']|str"] + """ + Explanation of why the cardholder is disputing this transaction. + """ + received_at: NotRequired["Literal['']|int"] + """ + Date when the product was received. + """ + return_description: NotRequired["Literal['']|str"] + """ + Description of the cardholder's attempt to return the product. + """ + return_status: NotRequired[ + "Literal['']|Literal['merchant_rejected', 'successful']" + ] + """ + Result of cardholder's attempt to return the product. + """ + returned_at: NotRequired["Literal['']|int"] + """ + Date when the product was returned or attempted to be returned. + """ + + +class DisputeUpdateParamsEvidenceNoValidAuthorization(TypedDict): + additional_documentation: NotRequired["Literal['']|str"] + """ + (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + """ + explanation: NotRequired["Literal['']|str"] + """ + Explanation of why the cardholder is disputing this transaction. + """ + + +class DisputeUpdateParamsEvidenceNotReceived(TypedDict): + additional_documentation: NotRequired["Literal['']|str"] + """ + (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + """ + expected_at: NotRequired["Literal['']|int"] + """ + Date when the cardholder expected to receive the product. + """ + explanation: NotRequired["Literal['']|str"] + """ + Explanation of why the cardholder is disputing this transaction. + """ + product_description: NotRequired["Literal['']|str"] + """ + Description of the merchandise or service that was purchased. + """ + product_type: NotRequired["Literal['']|Literal['merchandise', 'service']"] + """ + Whether the product was a merchandise or service. + """ + + +class DisputeUpdateParamsEvidenceOther(TypedDict): + additional_documentation: NotRequired["Literal['']|str"] + """ + (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + """ + explanation: NotRequired["Literal['']|str"] + """ + Explanation of why the cardholder is disputing this transaction. + """ + product_description: NotRequired["Literal['']|str"] + """ + Description of the merchandise or service that was purchased. + """ + product_type: NotRequired["Literal['']|Literal['merchandise', 'service']"] + """ + Whether the product was a merchandise or service. + """ + + +class DisputeUpdateParamsEvidenceServiceNotAsDescribed(TypedDict): + additional_documentation: NotRequired["Literal['']|str"] + """ + (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + """ + canceled_at: NotRequired["Literal['']|int"] + """ + Date when order was canceled. + """ + cancellation_reason: NotRequired["Literal['']|str"] + """ + Reason for canceling the order. + """ + explanation: NotRequired["Literal['']|str"] + """ + Explanation of why the cardholder is disputing this transaction. + """ + received_at: NotRequired["Literal['']|int"] + """ + Date when the product was received. + """ diff --git a/stripe/params/issuing/_fraud_liability_debit_list_params.py b/stripe/params/issuing/_fraud_liability_debit_list_params.py new file mode 100644 index 000000000..dde07192e --- /dev/null +++ b/stripe/params/issuing/_fraud_liability_debit_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 FraudLiabilityDebitListParams(RequestOptions): + created: NotRequired["FraudLiabilityDebitListParamsCreated|int"] + """ + Only return Issuing Fraud Liability Debits that were created during the given date interval. + """ + 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 FraudLiabilityDebitListParamsCreated(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/issuing/_fraud_liability_debit_retrieve_params.py b/stripe/params/issuing/_fraud_liability_debit_retrieve_params.py new file mode 100644 index 000000000..173a91b23 --- /dev/null +++ b/stripe/params/issuing/_fraud_liability_debit_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 FraudLiabilityDebitRetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/issuing/_personalization_design_activate_params.py b/stripe/params/issuing/_personalization_design_activate_params.py new file mode 100644 index 000000000..90467a013 --- /dev/null +++ b/stripe/params/issuing/_personalization_design_activate_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 PersonalizationDesignActivateParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/issuing/_personalization_design_create_params.py b/stripe/params/issuing/_personalization_design_create_params.py new file mode 100644 index 000000000..39fd71913 --- /dev/null +++ b/stripe/params/issuing/_personalization_design_create_params.py @@ -0,0 +1,70 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class PersonalizationDesignCreateParams(RequestOptions): + card_logo: NotRequired[str] + """ + The file for the card logo, for use with physical bundles that support card logos. Must have a `purpose` value of `issuing_logo`. + """ + carrier_text: NotRequired["PersonalizationDesignCreateParamsCarrierText"] + """ + Hash containing carrier text, for use with physical bundles that support carrier text. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + lookup_key: NotRequired[str] + """ + A lookup key used to retrieve personalization designs dynamically from a static string. This may be up to 200 characters. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + name: NotRequired[str] + """ + Friendly display name. + """ + physical_bundle: str + """ + The physical bundle object belonging to this personalization design. + """ + preferences: NotRequired["PersonalizationDesignCreateParamsPreferences"] + """ + Information on whether this personalization design is used to create cards when one is not specified. + """ + transfer_lookup_key: NotRequired[bool] + """ + If set to true, will atomically remove the lookup key from the existing personalization design, and assign it to this personalization design. + """ + + +class PersonalizationDesignCreateParamsCarrierText(TypedDict): + footer_body: NotRequired["Literal['']|str"] + """ + The footer body text of the carrier letter. + """ + footer_title: NotRequired["Literal['']|str"] + """ + The footer title text of the carrier letter. + """ + header_body: NotRequired["Literal['']|str"] + """ + The header body text of the carrier letter. + """ + header_title: NotRequired["Literal['']|str"] + """ + The header title text of the carrier letter. + """ + + +class PersonalizationDesignCreateParamsPreferences(TypedDict): + is_default: bool + """ + Whether we use this personalization design to create cards when one isn't specified. A connected account uses the Connect platform's default design if no personalization design is set as the default design. + """ diff --git a/stripe/params/issuing/_personalization_design_deactivate_params.py b/stripe/params/issuing/_personalization_design_deactivate_params.py new file mode 100644 index 000000000..8871eb27a --- /dev/null +++ b/stripe/params/issuing/_personalization_design_deactivate_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 PersonalizationDesignDeactivateParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/issuing/_personalization_design_list_params.py b/stripe/params/issuing/_personalization_design_list_params.py new file mode 100644 index 000000000..a212083f6 --- /dev/null +++ b/stripe/params/issuing/_personalization_design_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 Literal, NotRequired, TypedDict + + +class PersonalizationDesignListParams(RequestOptions): + 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. + """ + lookup_keys: NotRequired[List[str]] + """ + Only return personalization designs with the given lookup keys. + """ + preferences: NotRequired["PersonalizationDesignListParamsPreferences"] + """ + Only return personalization designs with the given preferences. + """ + 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. + """ + status: NotRequired[Literal["active", "inactive", "rejected", "review"]] + """ + Only return personalization designs with the given status. + """ + + +class PersonalizationDesignListParamsPreferences(TypedDict): + is_default: NotRequired[bool] + """ + Only return the personalization design that's set as the default. A connected account uses the Connect platform's default design if no personalization design is set as the default. + """ + is_platform_default: NotRequired[bool] + """ + Only return the personalization design that is set as the Connect platform's default. This parameter is only applicable to connected accounts. + """ diff --git a/stripe/params/issuing/_personalization_design_modify_params.py b/stripe/params/issuing/_personalization_design_modify_params.py new file mode 100644 index 000000000..1c57a9dfc --- /dev/null +++ b/stripe/params/issuing/_personalization_design_modify_params.py @@ -0,0 +1,72 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class PersonalizationDesignModifyParams(RequestOptions): + card_logo: NotRequired["Literal['']|str"] + """ + The file for the card logo, for use with physical bundles that support card logos. Must have a `purpose` value of `issuing_logo`. + """ + carrier_text: NotRequired[ + "Literal['']|PersonalizationDesignModifyParamsCarrierText" + ] + """ + Hash containing carrier text, for use with physical bundles that support carrier text. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + lookup_key: NotRequired["Literal['']|str"] + """ + A lookup key used to retrieve personalization designs dynamically from a static string. This may be up to 200 characters. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + name: NotRequired["Literal['']|str"] + """ + Friendly display name. Providing an empty string will set the field to null. + """ + physical_bundle: NotRequired[str] + """ + The physical bundle object belonging to this personalization design. + """ + preferences: NotRequired["PersonalizationDesignModifyParamsPreferences"] + """ + Information on whether this personalization design is used to create cards when one is not specified. + """ + transfer_lookup_key: NotRequired[bool] + """ + If set to true, will atomically remove the lookup key from the existing personalization design, and assign it to this personalization design. + """ + + +class PersonalizationDesignModifyParamsCarrierText(TypedDict): + footer_body: NotRequired["Literal['']|str"] + """ + The footer body text of the carrier letter. + """ + footer_title: NotRequired["Literal['']|str"] + """ + The footer title text of the carrier letter. + """ + header_body: NotRequired["Literal['']|str"] + """ + The header body text of the carrier letter. + """ + header_title: NotRequired["Literal['']|str"] + """ + The header title text of the carrier letter. + """ + + +class PersonalizationDesignModifyParamsPreferences(TypedDict): + is_default: bool + """ + Whether we use this personalization design to create cards when one isn't specified. A connected account uses the Connect platform's default design if no personalization design is set as the default design. + """ diff --git a/stripe/params/issuing/_personalization_design_reject_params.py b/stripe/params/issuing/_personalization_design_reject_params.py new file mode 100644 index 000000000..ced5adae7 --- /dev/null +++ b/stripe/params/issuing/_personalization_design_reject_params.py @@ -0,0 +1,52 @@ +# -*- 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, TypedDict + + +class PersonalizationDesignRejectParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + rejection_reasons: "PersonalizationDesignRejectParamsRejectionReasons" + """ + The reason(s) the personalization design was rejected. + """ + + +class PersonalizationDesignRejectParamsRejectionReasons(TypedDict): + card_logo: NotRequired[ + List[ + Literal[ + "geographic_location", + "inappropriate", + "network_name", + "non_binary_image", + "non_fiat_currency", + "other", + "other_entity", + "promotional_material", + ] + ] + ] + """ + The reason(s) the card logo was rejected. + """ + carrier_text: NotRequired[ + List[ + Literal[ + "geographic_location", + "inappropriate", + "network_name", + "non_fiat_currency", + "other", + "other_entity", + "promotional_material", + ] + ] + ] + """ + The reason(s) the carrier text was rejected. + """ diff --git a/stripe/params/issuing/_personalization_design_retrieve_params.py b/stripe/params/issuing/_personalization_design_retrieve_params.py new file mode 100644 index 000000000..02e8577f0 --- /dev/null +++ b/stripe/params/issuing/_personalization_design_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 PersonalizationDesignRetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/issuing/_personalization_design_update_params.py b/stripe/params/issuing/_personalization_design_update_params.py new file mode 100644 index 000000000..d5f3f57b5 --- /dev/null +++ b/stripe/params/issuing/_personalization_design_update_params.py @@ -0,0 +1,71 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class PersonalizationDesignUpdateParams(TypedDict): + card_logo: NotRequired["Literal['']|str"] + """ + The file for the card logo, for use with physical bundles that support card logos. Must have a `purpose` value of `issuing_logo`. + """ + carrier_text: NotRequired[ + "Literal['']|PersonalizationDesignUpdateParamsCarrierText" + ] + """ + Hash containing carrier text, for use with physical bundles that support carrier text. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + lookup_key: NotRequired["Literal['']|str"] + """ + A lookup key used to retrieve personalization designs dynamically from a static string. This may be up to 200 characters. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + name: NotRequired["Literal['']|str"] + """ + Friendly display name. Providing an empty string will set the field to null. + """ + physical_bundle: NotRequired[str] + """ + The physical bundle object belonging to this personalization design. + """ + preferences: NotRequired["PersonalizationDesignUpdateParamsPreferences"] + """ + Information on whether this personalization design is used to create cards when one is not specified. + """ + transfer_lookup_key: NotRequired[bool] + """ + If set to true, will atomically remove the lookup key from the existing personalization design, and assign it to this personalization design. + """ + + +class PersonalizationDesignUpdateParamsCarrierText(TypedDict): + footer_body: NotRequired["Literal['']|str"] + """ + The footer body text of the carrier letter. + """ + footer_title: NotRequired["Literal['']|str"] + """ + The footer title text of the carrier letter. + """ + header_body: NotRequired["Literal['']|str"] + """ + The header body text of the carrier letter. + """ + header_title: NotRequired["Literal['']|str"] + """ + The header title text of the carrier letter. + """ + + +class PersonalizationDesignUpdateParamsPreferences(TypedDict): + is_default: bool + """ + Whether we use this personalization design to create cards when one isn't specified. A connected account uses the Connect platform's default design if no personalization design is set as the default design. + """ diff --git a/stripe/params/issuing/_physical_bundle_list_params.py b/stripe/params/issuing/_physical_bundle_list_params.py new file mode 100644 index 000000000..5193d4872 --- /dev/null +++ b/stripe/params/issuing/_physical_bundle_list_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 PhysicalBundleListParams(RequestOptions): + 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. + """ + status: NotRequired[Literal["active", "inactive", "review"]] + """ + Only return physical bundles with the given status. + """ + type: NotRequired[Literal["custom", "standard"]] + """ + Only return physical bundles with the given type. + """ diff --git a/stripe/params/issuing/_physical_bundle_retrieve_params.py b/stripe/params/issuing/_physical_bundle_retrieve_params.py new file mode 100644 index 000000000..9a21a41d9 --- /dev/null +++ b/stripe/params/issuing/_physical_bundle_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 PhysicalBundleRetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/issuing/_token_list_params.py b/stripe/params/issuing/_token_list_params.py new file mode 100644 index 000000000..fa43b1dd0 --- /dev/null +++ b/stripe/params/issuing/_token_list_params.py @@ -0,0 +1,55 @@ +# -*- 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, TypedDict + + +class TokenListParams(RequestOptions): + card: str + """ + The Issuing card identifier to list tokens for. + """ + created: NotRequired["TokenListParamsCreated|int"] + """ + Only return Issuing tokens that were created during the given date interval. + """ + 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. + """ + status: NotRequired[Literal["active", "deleted", "requested", "suspended"]] + """ + Select Issuing tokens with the given status. + """ + + +class TokenListParamsCreated(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/issuing/_token_modify_params.py b/stripe/params/issuing/_token_modify_params.py new file mode 100644 index 000000000..d8cbd4b20 --- /dev/null +++ b/stripe/params/issuing/_token_modify_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 Literal, NotRequired + + +class TokenModifyParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + status: Literal["active", "deleted", "suspended"] + """ + Specifies which status the token should be updated to. + """ diff --git a/stripe/params/issuing/_token_retrieve_params.py b/stripe/params/issuing/_token_retrieve_params.py new file mode 100644 index 000000000..a8e659fc6 --- /dev/null +++ b/stripe/params/issuing/_token_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 TokenRetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/issuing/_token_update_params.py b/stripe/params/issuing/_token_update_params.py new file mode 100644 index 000000000..3b78cc084 --- /dev/null +++ b/stripe/params/issuing/_token_update_params.py @@ -0,0 +1,15 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import Literal, NotRequired, TypedDict + + +class TokenUpdateParams(TypedDict): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + status: Literal["active", "deleted", "suspended"] + """ + Specifies which status the token should be updated to. + """ diff --git a/stripe/params/issuing/_transaction_create_force_capture_params.py b/stripe/params/issuing/_transaction_create_force_capture_params.py new file mode 100644 index 000000000..d9f6709a9 --- /dev/null +++ b/stripe/params/issuing/_transaction_create_force_capture_params.py @@ -0,0 +1,629 @@ +# -*- 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, TypedDict + + +class TransactionCreateForceCaptureParams(RequestOptions): + amount: int + """ + The total amount to attempt to capture. This amount is in the provided currency, or defaults to the cards currency, and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + """ + card: str + """ + Card associated with this transaction. + """ + currency: NotRequired[str] + """ + The currency of the capture. If not provided, defaults to the currency of the card. 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. + """ + merchant_data: NotRequired[ + "TransactionCreateForceCaptureParamsMerchantData" + ] + """ + Details about the seller (grocery store, e-commerce website, etc.) where the card authorization happened. + """ + purchase_details: NotRequired[ + "TransactionCreateForceCaptureParamsPurchaseDetails" + ] + """ + Additional purchase information that is optionally provided by the merchant. + """ + + +class TransactionCreateForceCaptureParamsMerchantData(TypedDict): + category: NotRequired[ + Literal[ + "ac_refrigeration_repair", + "accounting_bookkeeping_services", + "advertising_services", + "agricultural_cooperative", + "airlines_air_carriers", + "airports_flying_fields", + "ambulance_services", + "amusement_parks_carnivals", + "antique_reproductions", + "antique_shops", + "aquariums", + "architectural_surveying_services", + "art_dealers_and_galleries", + "artists_supply_and_craft_shops", + "auto_and_home_supply_stores", + "auto_body_repair_shops", + "auto_paint_shops", + "auto_service_shops", + "automated_cash_disburse", + "automated_fuel_dispensers", + "automobile_associations", + "automotive_parts_and_accessories_stores", + "automotive_tire_stores", + "bail_and_bond_payments", + "bakeries", + "bands_orchestras", + "barber_and_beauty_shops", + "betting_casino_gambling", + "bicycle_shops", + "billiard_pool_establishments", + "boat_dealers", + "boat_rentals_and_leases", + "book_stores", + "books_periodicals_and_newspapers", + "bowling_alleys", + "bus_lines", + "business_secretarial_schools", + "buying_shopping_services", + "cable_satellite_and_other_pay_television_and_radio", + "camera_and_photographic_supply_stores", + "candy_nut_and_confectionery_stores", + "car_and_truck_dealers_new_used", + "car_and_truck_dealers_used_only", + "car_rental_agencies", + "car_washes", + "carpentry_services", + "carpet_upholstery_cleaning", + "caterers", + "charitable_and_social_service_organizations_fundraising", + "chemicals_and_allied_products", + "child_care_services", + "childrens_and_infants_wear_stores", + "chiropodists_podiatrists", + "chiropractors", + "cigar_stores_and_stands", + "civic_social_fraternal_associations", + "cleaning_and_maintenance", + "clothing_rental", + "colleges_universities", + "commercial_equipment", + "commercial_footwear", + "commercial_photography_art_and_graphics", + "commuter_transport_and_ferries", + "computer_network_services", + "computer_programming", + "computer_repair", + "computer_software_stores", + "computers_peripherals_and_software", + "concrete_work_services", + "construction_materials", + "consulting_public_relations", + "correspondence_schools", + "cosmetic_stores", + "counseling_services", + "country_clubs", + "courier_services", + "court_costs", + "credit_reporting_agencies", + "cruise_lines", + "dairy_products_stores", + "dance_hall_studios_schools", + "dating_escort_services", + "dentists_orthodontists", + "department_stores", + "detective_agencies", + "digital_goods_applications", + "digital_goods_games", + "digital_goods_large_volume", + "digital_goods_media", + "direct_marketing_catalog_merchant", + "direct_marketing_combination_catalog_and_retail_merchant", + "direct_marketing_inbound_telemarketing", + "direct_marketing_insurance_services", + "direct_marketing_other", + "direct_marketing_outbound_telemarketing", + "direct_marketing_subscription", + "direct_marketing_travel", + "discount_stores", + "doctors", + "door_to_door_sales", + "drapery_window_covering_and_upholstery_stores", + "drinking_places", + "drug_stores_and_pharmacies", + "drugs_drug_proprietaries_and_druggist_sundries", + "dry_cleaners", + "durable_goods", + "duty_free_stores", + "eating_places_restaurants", + "educational_services", + "electric_razor_stores", + "electric_vehicle_charging", + "electrical_parts_and_equipment", + "electrical_services", + "electronics_repair_shops", + "electronics_stores", + "elementary_secondary_schools", + "emergency_services_gcas_visa_use_only", + "employment_temp_agencies", + "equipment_rental", + "exterminating_services", + "family_clothing_stores", + "fast_food_restaurants", + "financial_institutions", + "fines_government_administrative_entities", + "fireplace_fireplace_screens_and_accessories_stores", + "floor_covering_stores", + "florists", + "florists_supplies_nursery_stock_and_flowers", + "freezer_and_locker_meat_provisioners", + "fuel_dealers_non_automotive", + "funeral_services_crematories", + "furniture_home_furnishings_and_equipment_stores_except_appliances", + "furniture_repair_refinishing", + "furriers_and_fur_shops", + "general_services", + "gift_card_novelty_and_souvenir_shops", + "glass_paint_and_wallpaper_stores", + "glassware_crystal_stores", + "golf_courses_public", + "government_licensed_horse_dog_racing_us_region_only", + "government_licensed_online_casions_online_gambling_us_region_only", + "government_owned_lotteries_non_us_region", + "government_owned_lotteries_us_region_only", + "government_services", + "grocery_stores_supermarkets", + "hardware_equipment_and_supplies", + "hardware_stores", + "health_and_beauty_spas", + "hearing_aids_sales_and_supplies", + "heating_plumbing_a_c", + "hobby_toy_and_game_shops", + "home_supply_warehouse_stores", + "hospitals", + "hotels_motels_and_resorts", + "household_appliance_stores", + "industrial_supplies", + "information_retrieval_services", + "insurance_default", + "insurance_underwriting_premiums", + "intra_company_purchases", + "jewelry_stores_watches_clocks_and_silverware_stores", + "landscaping_services", + "laundries", + "laundry_cleaning_services", + "legal_services_attorneys", + "luggage_and_leather_goods_stores", + "lumber_building_materials_stores", + "manual_cash_disburse", + "marinas_service_and_supplies", + "marketplaces", + "masonry_stonework_and_plaster", + "massage_parlors", + "medical_and_dental_labs", + "medical_dental_ophthalmic_and_hospital_equipment_and_supplies", + "medical_services", + "membership_organizations", + "mens_and_boys_clothing_and_accessories_stores", + "mens_womens_clothing_stores", + "metal_service_centers", + "miscellaneous_apparel_and_accessory_shops", + "miscellaneous_auto_dealers", + "miscellaneous_business_services", + "miscellaneous_food_stores", + "miscellaneous_general_merchandise", + "miscellaneous_general_services", + "miscellaneous_home_furnishing_specialty_stores", + "miscellaneous_publishing_and_printing", + "miscellaneous_recreation_services", + "miscellaneous_repair_shops", + "miscellaneous_specialty_retail", + "mobile_home_dealers", + "motion_picture_theaters", + "motor_freight_carriers_and_trucking", + "motor_homes_dealers", + "motor_vehicle_supplies_and_new_parts", + "motorcycle_shops_and_dealers", + "motorcycle_shops_dealers", + "music_stores_musical_instruments_pianos_and_sheet_music", + "news_dealers_and_newsstands", + "non_fi_money_orders", + "non_fi_stored_value_card_purchase_load", + "nondurable_goods", + "nurseries_lawn_and_garden_supply_stores", + "nursing_personal_care", + "office_and_commercial_furniture", + "opticians_eyeglasses", + "optometrists_ophthalmologist", + "orthopedic_goods_prosthetic_devices", + "osteopaths", + "package_stores_beer_wine_and_liquor", + "paints_varnishes_and_supplies", + "parking_lots_garages", + "passenger_railways", + "pawn_shops", + "pet_shops_pet_food_and_supplies", + "petroleum_and_petroleum_products", + "photo_developing", + "photographic_photocopy_microfilm_equipment_and_supplies", + "photographic_studios", + "picture_video_production", + "piece_goods_notions_and_other_dry_goods", + "plumbing_heating_equipment_and_supplies", + "political_organizations", + "postal_services_government_only", + "precious_stones_and_metals_watches_and_jewelry", + "professional_services", + "public_warehousing_and_storage", + "quick_copy_repro_and_blueprint", + "railroads", + "real_estate_agents_and_managers_rentals", + "record_stores", + "recreational_vehicle_rentals", + "religious_goods_stores", + "religious_organizations", + "roofing_siding_sheet_metal", + "secretarial_support_services", + "security_brokers_dealers", + "service_stations", + "sewing_needlework_fabric_and_piece_goods_stores", + "shoe_repair_hat_cleaning", + "shoe_stores", + "small_appliance_repair", + "snowmobile_dealers", + "special_trade_services", + "specialty_cleaning", + "sporting_goods_stores", + "sporting_recreation_camps", + "sports_and_riding_apparel_stores", + "sports_clubs_fields", + "stamp_and_coin_stores", + "stationary_office_supplies_printing_and_writing_paper", + "stationery_stores_office_and_school_supply_stores", + "swimming_pools_sales", + "t_ui_travel_germany", + "tailors_alterations", + "tax_payments_government_agencies", + "tax_preparation_services", + "taxicabs_limousines", + "telecommunication_equipment_and_telephone_sales", + "telecommunication_services", + "telegraph_services", + "tent_and_awning_shops", + "testing_laboratories", + "theatrical_ticket_agencies", + "timeshares", + "tire_retreading_and_repair", + "tolls_bridge_fees", + "tourist_attractions_and_exhibits", + "towing_services", + "trailer_parks_campgrounds", + "transportation_services", + "travel_agencies_tour_operators", + "truck_stop_iteration", + "truck_utility_trailer_rentals", + "typesetting_plate_making_and_related_services", + "typewriter_stores", + "u_s_federal_government_agencies_or_departments", + "uniforms_commercial_clothing", + "used_merchandise_and_secondhand_stores", + "utilities", + "variety_stores", + "veterinary_services", + "video_amusement_game_supplies", + "video_game_arcades", + "video_tape_rental_stores", + "vocational_trade_schools", + "watch_jewelry_repair", + "welding_repair", + "wholesale_clubs", + "wig_and_toupee_stores", + "wires_money_orders", + "womens_accessory_and_specialty_shops", + "womens_ready_to_wear_stores", + "wrecking_and_salvage_yards", + ] + ] + """ + A categorization of the seller's type of business. See our [merchant categories guide](https://stripe.com/docs/issuing/merchant-categories) for a list of possible values. + """ + city: NotRequired[str] + """ + City where the seller is located + """ + country: NotRequired[str] + """ + Country where the seller is located + """ + name: NotRequired[str] + """ + Name of the seller + """ + network_id: NotRequired[str] + """ + Identifier assigned to the seller by the card network. Different card networks may assign different network_id fields to the same merchant. + """ + postal_code: NotRequired[str] + """ + Postal code where the seller is located + """ + state: NotRequired[str] + """ + State where the seller is located + """ + terminal_id: NotRequired[str] + """ + An ID assigned by the seller to the location of the sale. + """ + url: NotRequired[str] + """ + URL provided by the merchant on a 3DS request + """ + + +class TransactionCreateForceCaptureParamsPurchaseDetails(TypedDict): + fleet: NotRequired[ + "TransactionCreateForceCaptureParamsPurchaseDetailsFleet" + ] + """ + Fleet-specific information for transactions using Fleet cards. + """ + flight: NotRequired[ + "TransactionCreateForceCaptureParamsPurchaseDetailsFlight" + ] + """ + Information about the flight that was purchased with this transaction. + """ + fuel: NotRequired["TransactionCreateForceCaptureParamsPurchaseDetailsFuel"] + """ + Information about fuel that was purchased with this transaction. + """ + lodging: NotRequired[ + "TransactionCreateForceCaptureParamsPurchaseDetailsLodging" + ] + """ + Information about lodging that was purchased with this transaction. + """ + receipt: NotRequired[ + List["TransactionCreateForceCaptureParamsPurchaseDetailsReceipt"] + ] + """ + The line items in the purchase. + """ + reference: NotRequired[str] + """ + A merchant-specific order number. + """ + + +class TransactionCreateForceCaptureParamsPurchaseDetailsFleet(TypedDict): + cardholder_prompt_data: NotRequired[ + "TransactionCreateForceCaptureParamsPurchaseDetailsFleetCardholderPromptData" + ] + """ + Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry. + """ + purchase_type: NotRequired[ + Literal[ + "fuel_and_non_fuel_purchase", "fuel_purchase", "non_fuel_purchase" + ] + ] + """ + The type of purchase. One of `fuel_purchase`, `non_fuel_purchase`, or `fuel_and_non_fuel_purchase`. + """ + reported_breakdown: NotRequired[ + "TransactionCreateForceCaptureParamsPurchaseDetailsFleetReportedBreakdown" + ] + """ + More information about the total amount. This information is not guaranteed to be accurate as some merchants may provide unreliable data. + """ + service_type: NotRequired[ + Literal["full_service", "non_fuel_transaction", "self_service"] + ] + """ + The type of fuel service. One of `non_fuel_transaction`, `full_service`, or `self_service`. + """ + + +class TransactionCreateForceCaptureParamsPurchaseDetailsFleetCardholderPromptData( + TypedDict, +): + driver_id: NotRequired[str] + """ + Driver ID. + """ + odometer: NotRequired[int] + """ + Odometer reading. + """ + unspecified_id: NotRequired[str] + """ + An alphanumeric ID. This field is used when a vehicle ID, driver ID, or generic ID is entered by the cardholder, but the merchant or card network did not specify the prompt type. + """ + user_id: NotRequired[str] + """ + User ID. + """ + vehicle_number: NotRequired[str] + """ + Vehicle number. + """ + + +class TransactionCreateForceCaptureParamsPurchaseDetailsFleetReportedBreakdown( + TypedDict, +): + fuel: NotRequired[ + "TransactionCreateForceCaptureParamsPurchaseDetailsFleetReportedBreakdownFuel" + ] + """ + Breakdown of fuel portion of the purchase. + """ + non_fuel: NotRequired[ + "TransactionCreateForceCaptureParamsPurchaseDetailsFleetReportedBreakdownNonFuel" + ] + """ + Breakdown of non-fuel portion of the purchase. + """ + tax: NotRequired[ + "TransactionCreateForceCaptureParamsPurchaseDetailsFleetReportedBreakdownTax" + ] + """ + Information about tax included in this transaction. + """ + + +class TransactionCreateForceCaptureParamsPurchaseDetailsFleetReportedBreakdownFuel( + TypedDict, +): + gross_amount_decimal: NotRequired[str] + """ + Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive of taxes. + """ + + +class TransactionCreateForceCaptureParamsPurchaseDetailsFleetReportedBreakdownNonFuel( + TypedDict, +): + gross_amount_decimal: NotRequired[str] + """ + Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes. + """ + + +class TransactionCreateForceCaptureParamsPurchaseDetailsFleetReportedBreakdownTax( + TypedDict, +): + local_amount_decimal: NotRequired[str] + """ + Amount of state or provincial Sales Tax included in the transaction amount. Null if not reported by merchant or not subject to tax. + """ + national_amount_decimal: NotRequired[str] + """ + Amount of national Sales Tax or VAT included in the transaction amount. Null if not reported by merchant or not subject to tax. + """ + + +class TransactionCreateForceCaptureParamsPurchaseDetailsFlight(TypedDict): + departure_at: NotRequired[int] + """ + The time that the flight departed. + """ + passenger_name: NotRequired[str] + """ + The name of the passenger. + """ + refundable: NotRequired[bool] + """ + Whether the ticket is refundable. + """ + segments: NotRequired[ + List["TransactionCreateForceCaptureParamsPurchaseDetailsFlightSegment"] + ] + """ + The legs of the trip. + """ + travel_agency: NotRequired[str] + """ + The travel agency that issued the ticket. + """ + + +class TransactionCreateForceCaptureParamsPurchaseDetailsFlightSegment( + TypedDict, +): + arrival_airport_code: NotRequired[str] + """ + The three-letter IATA airport code of the flight's destination. + """ + carrier: NotRequired[str] + """ + The airline carrier code. + """ + departure_airport_code: NotRequired[str] + """ + The three-letter IATA airport code that the flight departed from. + """ + flight_number: NotRequired[str] + """ + The flight number. + """ + service_class: NotRequired[str] + """ + The flight's service class. + """ + stopover_allowed: NotRequired[bool] + """ + Whether a stopover is allowed on this flight. + """ + + +class TransactionCreateForceCaptureParamsPurchaseDetailsFuel(TypedDict): + industry_product_code: NotRequired[str] + """ + [Conexxus Payment System Product Code](https://www.conexxus.org/conexxus-payment-system-product-codes) identifying the primary fuel product purchased. + """ + quantity_decimal: NotRequired[str] + """ + The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places. + """ + type: NotRequired[ + Literal[ + "diesel", + "other", + "unleaded_plus", + "unleaded_regular", + "unleaded_super", + ] + ] + """ + The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`. + """ + unit: NotRequired[ + Literal[ + "charging_minute", + "imperial_gallon", + "kilogram", + "kilowatt_hour", + "liter", + "other", + "pound", + "us_gallon", + ] + ] + """ + The units for `quantity_decimal`. One of `charging_minute`, `imperial_gallon`, `kilogram`, `kilowatt_hour`, `liter`, `pound`, `us_gallon`, or `other`. + """ + unit_cost_decimal: NotRequired[str] + """ + The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places. + """ + + +class TransactionCreateForceCaptureParamsPurchaseDetailsLodging(TypedDict): + check_in_at: NotRequired[int] + """ + The time of checking into the lodging. + """ + nights: NotRequired[int] + """ + The number of nights stayed at the lodging. + """ + + +class TransactionCreateForceCaptureParamsPurchaseDetailsReceipt(TypedDict): + description: NotRequired[str] + quantity: NotRequired[str] + total: NotRequired[int] + unit_cost: NotRequired[int] diff --git a/stripe/params/issuing/_transaction_create_unlinked_refund_params.py b/stripe/params/issuing/_transaction_create_unlinked_refund_params.py new file mode 100644 index 000000000..8a0d378f9 --- /dev/null +++ b/stripe/params/issuing/_transaction_create_unlinked_refund_params.py @@ -0,0 +1,633 @@ +# -*- 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, TypedDict + + +class TransactionCreateUnlinkedRefundParams(RequestOptions): + amount: int + """ + The total amount to attempt to refund. This amount is in the provided currency, or defaults to the cards currency, and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + """ + card: str + """ + Card associated with this unlinked refund transaction. + """ + currency: NotRequired[str] + """ + The currency of the unlinked refund. If not provided, defaults to the currency of the card. 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. + """ + merchant_data: NotRequired[ + "TransactionCreateUnlinkedRefundParamsMerchantData" + ] + """ + Details about the seller (grocery store, e-commerce website, etc.) where the card authorization happened. + """ + purchase_details: NotRequired[ + "TransactionCreateUnlinkedRefundParamsPurchaseDetails" + ] + """ + Additional purchase information that is optionally provided by the merchant. + """ + + +class TransactionCreateUnlinkedRefundParamsMerchantData(TypedDict): + category: NotRequired[ + Literal[ + "ac_refrigeration_repair", + "accounting_bookkeeping_services", + "advertising_services", + "agricultural_cooperative", + "airlines_air_carriers", + "airports_flying_fields", + "ambulance_services", + "amusement_parks_carnivals", + "antique_reproductions", + "antique_shops", + "aquariums", + "architectural_surveying_services", + "art_dealers_and_galleries", + "artists_supply_and_craft_shops", + "auto_and_home_supply_stores", + "auto_body_repair_shops", + "auto_paint_shops", + "auto_service_shops", + "automated_cash_disburse", + "automated_fuel_dispensers", + "automobile_associations", + "automotive_parts_and_accessories_stores", + "automotive_tire_stores", + "bail_and_bond_payments", + "bakeries", + "bands_orchestras", + "barber_and_beauty_shops", + "betting_casino_gambling", + "bicycle_shops", + "billiard_pool_establishments", + "boat_dealers", + "boat_rentals_and_leases", + "book_stores", + "books_periodicals_and_newspapers", + "bowling_alleys", + "bus_lines", + "business_secretarial_schools", + "buying_shopping_services", + "cable_satellite_and_other_pay_television_and_radio", + "camera_and_photographic_supply_stores", + "candy_nut_and_confectionery_stores", + "car_and_truck_dealers_new_used", + "car_and_truck_dealers_used_only", + "car_rental_agencies", + "car_washes", + "carpentry_services", + "carpet_upholstery_cleaning", + "caterers", + "charitable_and_social_service_organizations_fundraising", + "chemicals_and_allied_products", + "child_care_services", + "childrens_and_infants_wear_stores", + "chiropodists_podiatrists", + "chiropractors", + "cigar_stores_and_stands", + "civic_social_fraternal_associations", + "cleaning_and_maintenance", + "clothing_rental", + "colleges_universities", + "commercial_equipment", + "commercial_footwear", + "commercial_photography_art_and_graphics", + "commuter_transport_and_ferries", + "computer_network_services", + "computer_programming", + "computer_repair", + "computer_software_stores", + "computers_peripherals_and_software", + "concrete_work_services", + "construction_materials", + "consulting_public_relations", + "correspondence_schools", + "cosmetic_stores", + "counseling_services", + "country_clubs", + "courier_services", + "court_costs", + "credit_reporting_agencies", + "cruise_lines", + "dairy_products_stores", + "dance_hall_studios_schools", + "dating_escort_services", + "dentists_orthodontists", + "department_stores", + "detective_agencies", + "digital_goods_applications", + "digital_goods_games", + "digital_goods_large_volume", + "digital_goods_media", + "direct_marketing_catalog_merchant", + "direct_marketing_combination_catalog_and_retail_merchant", + "direct_marketing_inbound_telemarketing", + "direct_marketing_insurance_services", + "direct_marketing_other", + "direct_marketing_outbound_telemarketing", + "direct_marketing_subscription", + "direct_marketing_travel", + "discount_stores", + "doctors", + "door_to_door_sales", + "drapery_window_covering_and_upholstery_stores", + "drinking_places", + "drug_stores_and_pharmacies", + "drugs_drug_proprietaries_and_druggist_sundries", + "dry_cleaners", + "durable_goods", + "duty_free_stores", + "eating_places_restaurants", + "educational_services", + "electric_razor_stores", + "electric_vehicle_charging", + "electrical_parts_and_equipment", + "electrical_services", + "electronics_repair_shops", + "electronics_stores", + "elementary_secondary_schools", + "emergency_services_gcas_visa_use_only", + "employment_temp_agencies", + "equipment_rental", + "exterminating_services", + "family_clothing_stores", + "fast_food_restaurants", + "financial_institutions", + "fines_government_administrative_entities", + "fireplace_fireplace_screens_and_accessories_stores", + "floor_covering_stores", + "florists", + "florists_supplies_nursery_stock_and_flowers", + "freezer_and_locker_meat_provisioners", + "fuel_dealers_non_automotive", + "funeral_services_crematories", + "furniture_home_furnishings_and_equipment_stores_except_appliances", + "furniture_repair_refinishing", + "furriers_and_fur_shops", + "general_services", + "gift_card_novelty_and_souvenir_shops", + "glass_paint_and_wallpaper_stores", + "glassware_crystal_stores", + "golf_courses_public", + "government_licensed_horse_dog_racing_us_region_only", + "government_licensed_online_casions_online_gambling_us_region_only", + "government_owned_lotteries_non_us_region", + "government_owned_lotteries_us_region_only", + "government_services", + "grocery_stores_supermarkets", + "hardware_equipment_and_supplies", + "hardware_stores", + "health_and_beauty_spas", + "hearing_aids_sales_and_supplies", + "heating_plumbing_a_c", + "hobby_toy_and_game_shops", + "home_supply_warehouse_stores", + "hospitals", + "hotels_motels_and_resorts", + "household_appliance_stores", + "industrial_supplies", + "information_retrieval_services", + "insurance_default", + "insurance_underwriting_premiums", + "intra_company_purchases", + "jewelry_stores_watches_clocks_and_silverware_stores", + "landscaping_services", + "laundries", + "laundry_cleaning_services", + "legal_services_attorneys", + "luggage_and_leather_goods_stores", + "lumber_building_materials_stores", + "manual_cash_disburse", + "marinas_service_and_supplies", + "marketplaces", + "masonry_stonework_and_plaster", + "massage_parlors", + "medical_and_dental_labs", + "medical_dental_ophthalmic_and_hospital_equipment_and_supplies", + "medical_services", + "membership_organizations", + "mens_and_boys_clothing_and_accessories_stores", + "mens_womens_clothing_stores", + "metal_service_centers", + "miscellaneous_apparel_and_accessory_shops", + "miscellaneous_auto_dealers", + "miscellaneous_business_services", + "miscellaneous_food_stores", + "miscellaneous_general_merchandise", + "miscellaneous_general_services", + "miscellaneous_home_furnishing_specialty_stores", + "miscellaneous_publishing_and_printing", + "miscellaneous_recreation_services", + "miscellaneous_repair_shops", + "miscellaneous_specialty_retail", + "mobile_home_dealers", + "motion_picture_theaters", + "motor_freight_carriers_and_trucking", + "motor_homes_dealers", + "motor_vehicle_supplies_and_new_parts", + "motorcycle_shops_and_dealers", + "motorcycle_shops_dealers", + "music_stores_musical_instruments_pianos_and_sheet_music", + "news_dealers_and_newsstands", + "non_fi_money_orders", + "non_fi_stored_value_card_purchase_load", + "nondurable_goods", + "nurseries_lawn_and_garden_supply_stores", + "nursing_personal_care", + "office_and_commercial_furniture", + "opticians_eyeglasses", + "optometrists_ophthalmologist", + "orthopedic_goods_prosthetic_devices", + "osteopaths", + "package_stores_beer_wine_and_liquor", + "paints_varnishes_and_supplies", + "parking_lots_garages", + "passenger_railways", + "pawn_shops", + "pet_shops_pet_food_and_supplies", + "petroleum_and_petroleum_products", + "photo_developing", + "photographic_photocopy_microfilm_equipment_and_supplies", + "photographic_studios", + "picture_video_production", + "piece_goods_notions_and_other_dry_goods", + "plumbing_heating_equipment_and_supplies", + "political_organizations", + "postal_services_government_only", + "precious_stones_and_metals_watches_and_jewelry", + "professional_services", + "public_warehousing_and_storage", + "quick_copy_repro_and_blueprint", + "railroads", + "real_estate_agents_and_managers_rentals", + "record_stores", + "recreational_vehicle_rentals", + "religious_goods_stores", + "religious_organizations", + "roofing_siding_sheet_metal", + "secretarial_support_services", + "security_brokers_dealers", + "service_stations", + "sewing_needlework_fabric_and_piece_goods_stores", + "shoe_repair_hat_cleaning", + "shoe_stores", + "small_appliance_repair", + "snowmobile_dealers", + "special_trade_services", + "specialty_cleaning", + "sporting_goods_stores", + "sporting_recreation_camps", + "sports_and_riding_apparel_stores", + "sports_clubs_fields", + "stamp_and_coin_stores", + "stationary_office_supplies_printing_and_writing_paper", + "stationery_stores_office_and_school_supply_stores", + "swimming_pools_sales", + "t_ui_travel_germany", + "tailors_alterations", + "tax_payments_government_agencies", + "tax_preparation_services", + "taxicabs_limousines", + "telecommunication_equipment_and_telephone_sales", + "telecommunication_services", + "telegraph_services", + "tent_and_awning_shops", + "testing_laboratories", + "theatrical_ticket_agencies", + "timeshares", + "tire_retreading_and_repair", + "tolls_bridge_fees", + "tourist_attractions_and_exhibits", + "towing_services", + "trailer_parks_campgrounds", + "transportation_services", + "travel_agencies_tour_operators", + "truck_stop_iteration", + "truck_utility_trailer_rentals", + "typesetting_plate_making_and_related_services", + "typewriter_stores", + "u_s_federal_government_agencies_or_departments", + "uniforms_commercial_clothing", + "used_merchandise_and_secondhand_stores", + "utilities", + "variety_stores", + "veterinary_services", + "video_amusement_game_supplies", + "video_game_arcades", + "video_tape_rental_stores", + "vocational_trade_schools", + "watch_jewelry_repair", + "welding_repair", + "wholesale_clubs", + "wig_and_toupee_stores", + "wires_money_orders", + "womens_accessory_and_specialty_shops", + "womens_ready_to_wear_stores", + "wrecking_and_salvage_yards", + ] + ] + """ + A categorization of the seller's type of business. See our [merchant categories guide](https://stripe.com/docs/issuing/merchant-categories) for a list of possible values. + """ + city: NotRequired[str] + """ + City where the seller is located + """ + country: NotRequired[str] + """ + Country where the seller is located + """ + name: NotRequired[str] + """ + Name of the seller + """ + network_id: NotRequired[str] + """ + Identifier assigned to the seller by the card network. Different card networks may assign different network_id fields to the same merchant. + """ + postal_code: NotRequired[str] + """ + Postal code where the seller is located + """ + state: NotRequired[str] + """ + State where the seller is located + """ + terminal_id: NotRequired[str] + """ + An ID assigned by the seller to the location of the sale. + """ + url: NotRequired[str] + """ + URL provided by the merchant on a 3DS request + """ + + +class TransactionCreateUnlinkedRefundParamsPurchaseDetails(TypedDict): + fleet: NotRequired[ + "TransactionCreateUnlinkedRefundParamsPurchaseDetailsFleet" + ] + """ + Fleet-specific information for transactions using Fleet cards. + """ + flight: NotRequired[ + "TransactionCreateUnlinkedRefundParamsPurchaseDetailsFlight" + ] + """ + Information about the flight that was purchased with this transaction. + """ + fuel: NotRequired[ + "TransactionCreateUnlinkedRefundParamsPurchaseDetailsFuel" + ] + """ + Information about fuel that was purchased with this transaction. + """ + lodging: NotRequired[ + "TransactionCreateUnlinkedRefundParamsPurchaseDetailsLodging" + ] + """ + Information about lodging that was purchased with this transaction. + """ + receipt: NotRequired[ + List["TransactionCreateUnlinkedRefundParamsPurchaseDetailsReceipt"] + ] + """ + The line items in the purchase. + """ + reference: NotRequired[str] + """ + A merchant-specific order number. + """ + + +class TransactionCreateUnlinkedRefundParamsPurchaseDetailsFleet(TypedDict): + cardholder_prompt_data: NotRequired[ + "TransactionCreateUnlinkedRefundParamsPurchaseDetailsFleetCardholderPromptData" + ] + """ + Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry. + """ + purchase_type: NotRequired[ + Literal[ + "fuel_and_non_fuel_purchase", "fuel_purchase", "non_fuel_purchase" + ] + ] + """ + The type of purchase. One of `fuel_purchase`, `non_fuel_purchase`, or `fuel_and_non_fuel_purchase`. + """ + reported_breakdown: NotRequired[ + "TransactionCreateUnlinkedRefundParamsPurchaseDetailsFleetReportedBreakdown" + ] + """ + More information about the total amount. This information is not guaranteed to be accurate as some merchants may provide unreliable data. + """ + service_type: NotRequired[ + Literal["full_service", "non_fuel_transaction", "self_service"] + ] + """ + The type of fuel service. One of `non_fuel_transaction`, `full_service`, or `self_service`. + """ + + +class TransactionCreateUnlinkedRefundParamsPurchaseDetailsFleetCardholderPromptData( + TypedDict, +): + driver_id: NotRequired[str] + """ + Driver ID. + """ + odometer: NotRequired[int] + """ + Odometer reading. + """ + unspecified_id: NotRequired[str] + """ + An alphanumeric ID. This field is used when a vehicle ID, driver ID, or generic ID is entered by the cardholder, but the merchant or card network did not specify the prompt type. + """ + user_id: NotRequired[str] + """ + User ID. + """ + vehicle_number: NotRequired[str] + """ + Vehicle number. + """ + + +class TransactionCreateUnlinkedRefundParamsPurchaseDetailsFleetReportedBreakdown( + TypedDict, +): + fuel: NotRequired[ + "TransactionCreateUnlinkedRefundParamsPurchaseDetailsFleetReportedBreakdownFuel" + ] + """ + Breakdown of fuel portion of the purchase. + """ + non_fuel: NotRequired[ + "TransactionCreateUnlinkedRefundParamsPurchaseDetailsFleetReportedBreakdownNonFuel" + ] + """ + Breakdown of non-fuel portion of the purchase. + """ + tax: NotRequired[ + "TransactionCreateUnlinkedRefundParamsPurchaseDetailsFleetReportedBreakdownTax" + ] + """ + Information about tax included in this transaction. + """ + + +class TransactionCreateUnlinkedRefundParamsPurchaseDetailsFleetReportedBreakdownFuel( + TypedDict, +): + gross_amount_decimal: NotRequired[str] + """ + Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive of taxes. + """ + + +class TransactionCreateUnlinkedRefundParamsPurchaseDetailsFleetReportedBreakdownNonFuel( + TypedDict, +): + gross_amount_decimal: NotRequired[str] + """ + Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes. + """ + + +class TransactionCreateUnlinkedRefundParamsPurchaseDetailsFleetReportedBreakdownTax( + TypedDict, +): + local_amount_decimal: NotRequired[str] + """ + Amount of state or provincial Sales Tax included in the transaction amount. Null if not reported by merchant or not subject to tax. + """ + national_amount_decimal: NotRequired[str] + """ + Amount of national Sales Tax or VAT included in the transaction amount. Null if not reported by merchant or not subject to tax. + """ + + +class TransactionCreateUnlinkedRefundParamsPurchaseDetailsFlight(TypedDict): + departure_at: NotRequired[int] + """ + The time that the flight departed. + """ + passenger_name: NotRequired[str] + """ + The name of the passenger. + """ + refundable: NotRequired[bool] + """ + Whether the ticket is refundable. + """ + segments: NotRequired[ + List[ + "TransactionCreateUnlinkedRefundParamsPurchaseDetailsFlightSegment" + ] + ] + """ + The legs of the trip. + """ + travel_agency: NotRequired[str] + """ + The travel agency that issued the ticket. + """ + + +class TransactionCreateUnlinkedRefundParamsPurchaseDetailsFlightSegment( + TypedDict, +): + arrival_airport_code: NotRequired[str] + """ + The three-letter IATA airport code of the flight's destination. + """ + carrier: NotRequired[str] + """ + The airline carrier code. + """ + departure_airport_code: NotRequired[str] + """ + The three-letter IATA airport code that the flight departed from. + """ + flight_number: NotRequired[str] + """ + The flight number. + """ + service_class: NotRequired[str] + """ + The flight's service class. + """ + stopover_allowed: NotRequired[bool] + """ + Whether a stopover is allowed on this flight. + """ + + +class TransactionCreateUnlinkedRefundParamsPurchaseDetailsFuel(TypedDict): + industry_product_code: NotRequired[str] + """ + [Conexxus Payment System Product Code](https://www.conexxus.org/conexxus-payment-system-product-codes) identifying the primary fuel product purchased. + """ + quantity_decimal: NotRequired[str] + """ + The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places. + """ + type: NotRequired[ + Literal[ + "diesel", + "other", + "unleaded_plus", + "unleaded_regular", + "unleaded_super", + ] + ] + """ + The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`. + """ + unit: NotRequired[ + Literal[ + "charging_minute", + "imperial_gallon", + "kilogram", + "kilowatt_hour", + "liter", + "other", + "pound", + "us_gallon", + ] + ] + """ + The units for `quantity_decimal`. One of `charging_minute`, `imperial_gallon`, `kilogram`, `kilowatt_hour`, `liter`, `pound`, `us_gallon`, or `other`. + """ + unit_cost_decimal: NotRequired[str] + """ + The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places. + """ + + +class TransactionCreateUnlinkedRefundParamsPurchaseDetailsLodging(TypedDict): + check_in_at: NotRequired[int] + """ + The time of checking into the lodging. + """ + nights: NotRequired[int] + """ + The number of nights stayed at the lodging. + """ + + +class TransactionCreateUnlinkedRefundParamsPurchaseDetailsReceipt(TypedDict): + description: NotRequired[str] + quantity: NotRequired[str] + total: NotRequired[int] + unit_cost: NotRequired[int] diff --git a/stripe/params/issuing/_transaction_list_params.py b/stripe/params/issuing/_transaction_list_params.py new file mode 100644 index 000000000..ad985c220 --- /dev/null +++ b/stripe/params/issuing/_transaction_list_params.py @@ -0,0 +1,63 @@ +# -*- 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, TypedDict + + +class TransactionListParams(RequestOptions): + card: NotRequired[str] + """ + Only return transactions that belong to the given card. + """ + cardholder: NotRequired[str] + """ + Only return transactions that belong to the given cardholder. + """ + created: NotRequired["TransactionListParamsCreated|int"] + """ + Only return transactions that were created during the given date interval. + """ + 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. + """ + settlement: NotRequired[str] + """ + Only return transactions that are associated with the given settlement. + """ + 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. + """ + type: NotRequired[Literal["capture", "refund"]] + """ + Only return transactions that have the given type. One of `capture` or `refund`. + """ + + +class TransactionListParamsCreated(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/issuing/_transaction_modify_params.py b/stripe/params/issuing/_transaction_modify_params.py new file mode 100644 index 000000000..ba255b790 --- /dev/null +++ b/stripe/params/issuing/_transaction_modify_params.py @@ -0,0 +1,16 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import Literal, NotRequired + + +class TransactionModifyParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ diff --git a/stripe/params/issuing/_transaction_refund_params.py b/stripe/params/issuing/_transaction_refund_params.py new file mode 100644 index 000000000..0953e1baa --- /dev/null +++ b/stripe/params/issuing/_transaction_refund_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 TransactionRefundParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + refund_amount: NotRequired[int] + """ + The total amount to attempt to refund. This amount is in the provided currency, or defaults to the cards currency, and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + """ diff --git a/stripe/params/issuing/_transaction_retrieve_params.py b/stripe/params/issuing/_transaction_retrieve_params.py new file mode 100644 index 000000000..07744dd96 --- /dev/null +++ b/stripe/params/issuing/_transaction_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 TransactionRetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/issuing/_transaction_update_params.py b/stripe/params/issuing/_transaction_update_params.py new file mode 100644 index 000000000..8cb955c53 --- /dev/null +++ b/stripe/params/issuing/_transaction_update_params.py @@ -0,0 +1,15 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class TransactionUpdateParams(TypedDict): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ diff --git a/stripe/params/privacy/__init__.py b/stripe/params/privacy/__init__.py new file mode 100644 index 000000000..0ae48dd27 --- /dev/null +++ b/stripe/params/privacy/__init__.py @@ -0,0 +1,32 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe.params.privacy._redaction_job_cancel_params import ( + RedactionJobCancelParams as RedactionJobCancelParams, +) +from stripe.params.privacy._redaction_job_create_params import ( + RedactionJobCreateParams as RedactionJobCreateParams, +) +from stripe.params.privacy._redaction_job_list_params import ( + RedactionJobListParams as RedactionJobListParams, +) +from stripe.params.privacy._redaction_job_list_validation_errors_params import ( + RedactionJobListValidationErrorsParams as RedactionJobListValidationErrorsParams, +) +from stripe.params.privacy._redaction_job_modify_params import ( + RedactionJobModifyParams as RedactionJobModifyParams, +) +from stripe.params.privacy._redaction_job_retrieve_params import ( + RedactionJobRetrieveParams as RedactionJobRetrieveParams, +) +from stripe.params.privacy._redaction_job_run_params import ( + RedactionJobRunParams as RedactionJobRunParams, +) +from stripe.params.privacy._redaction_job_update_params import ( + RedactionJobUpdateParams as RedactionJobUpdateParams, +) +from stripe.params.privacy._redaction_job_validate_params import ( + RedactionJobValidateParams as RedactionJobValidateParams, +) +from stripe.params.privacy._redaction_job_validation_error_list_params import ( + RedactionJobValidationErrorListParams as RedactionJobValidationErrorListParams, +) diff --git a/stripe/params/privacy/_redaction_job_cancel_params.py b/stripe/params/privacy/_redaction_job_cancel_params.py new file mode 100644 index 000000000..e029d00c0 --- /dev/null +++ b/stripe/params/privacy/_redaction_job_cancel_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 RedactionJobCancelParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/privacy/_redaction_job_create_params.py b/stripe/params/privacy/_redaction_job_create_params.py new file mode 100644 index 000000000..2b4a7f4de --- /dev/null +++ b/stripe/params/privacy/_redaction_job_create_params.py @@ -0,0 +1,33 @@ +# -*- 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, TypedDict + + +class RedactionJobCreateParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + objects: "RedactionJobCreateParamsObjects" + """ + The objects to redact. These root objects and their related ones will be validated for redaction. + """ + validation_behavior: NotRequired[Literal["error", "fix"]] + """ + Determines the validation behavior of the job. Default is `error`. + """ + + +class RedactionJobCreateParamsObjects(TypedDict): + charges: NotRequired[List[str]] + checkout_sessions: NotRequired[List[str]] + customers: NotRequired[List[str]] + identity_verification_sessions: NotRequired[List[str]] + invoices: NotRequired[List[str]] + issuing_cardholders: NotRequired[List[str]] + issuing_cards: NotRequired[List[str]] + payment_intents: NotRequired[List[str]] + radar_value_list_items: NotRequired[List[str]] + setup_intents: NotRequired[List[str]] diff --git a/stripe/params/privacy/_redaction_job_list_params.py b/stripe/params/privacy/_redaction_job_list_params.py new file mode 100644 index 000000000..96aa8a231 --- /dev/null +++ b/stripe/params/privacy/_redaction_job_list_params.py @@ -0,0 +1,36 @@ +# -*- 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 RedactionJobListParams(RequestOptions): + 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. + """ + status: NotRequired[ + Literal[ + "canceled", + "canceling", + "created", + "failed", + "ready", + "redacting", + "succeeded", + "validating", + ] + ] diff --git a/stripe/params/privacy/_redaction_job_list_validation_errors_params.py b/stripe/params/privacy/_redaction_job_list_validation_errors_params.py new file mode 100644 index 000000000..42669cacc --- /dev/null +++ b/stripe/params/privacy/_redaction_job_list_validation_errors_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 RedactionJobListValidationErrorsParams(RequestOptions): + 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. + """ diff --git a/stripe/params/privacy/_redaction_job_modify_params.py b/stripe/params/privacy/_redaction_job_modify_params.py new file mode 100644 index 000000000..424eeeea6 --- /dev/null +++ b/stripe/params/privacy/_redaction_job_modify_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 Literal, NotRequired + + +class RedactionJobModifyParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + validation_behavior: NotRequired[Literal["error", "fix"]] + """ + Determines the validation behavior of the job. Default is `error`. + """ diff --git a/stripe/params/privacy/_redaction_job_retrieve_params.py b/stripe/params/privacy/_redaction_job_retrieve_params.py new file mode 100644 index 000000000..afa1cdcc5 --- /dev/null +++ b/stripe/params/privacy/_redaction_job_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 RedactionJobRetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/privacy/_redaction_job_run_params.py b/stripe/params/privacy/_redaction_job_run_params.py new file mode 100644 index 000000000..0ef368c31 --- /dev/null +++ b/stripe/params/privacy/_redaction_job_run_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 RedactionJobRunParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/privacy/_redaction_job_update_params.py b/stripe/params/privacy/_redaction_job_update_params.py new file mode 100644 index 000000000..1a499c55e --- /dev/null +++ b/stripe/params/privacy/_redaction_job_update_params.py @@ -0,0 +1,15 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import Literal, NotRequired, TypedDict + + +class RedactionJobUpdateParams(TypedDict): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + validation_behavior: NotRequired[Literal["error", "fix"]] + """ + Determines the validation behavior of the job. Default is `error`. + """ diff --git a/stripe/params/privacy/_redaction_job_validate_params.py b/stripe/params/privacy/_redaction_job_validate_params.py new file mode 100644 index 000000000..48b0148f6 --- /dev/null +++ b/stripe/params/privacy/_redaction_job_validate_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 RedactionJobValidateParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/privacy/_redaction_job_validation_error_list_params.py b/stripe/params/privacy/_redaction_job_validation_error_list_params.py new file mode 100644 index 000000000..7fb54be41 --- /dev/null +++ b/stripe/params/privacy/_redaction_job_validation_error_list_params.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import NotRequired, TypedDict + + +class RedactionJobValidationErrorListParams(TypedDict): + 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. + """ diff --git a/stripe/params/radar/__init__.py b/stripe/params/radar/__init__.py new file mode 100644 index 000000000..3b4c1e795 --- /dev/null +++ b/stripe/params/radar/__init__.py @@ -0,0 +1,38 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe.params.radar._early_fraud_warning_list_params import ( + EarlyFraudWarningListParams as EarlyFraudWarningListParams, +) +from stripe.params.radar._early_fraud_warning_retrieve_params import ( + EarlyFraudWarningRetrieveParams as EarlyFraudWarningRetrieveParams, +) +from stripe.params.radar._value_list_create_params import ( + ValueListCreateParams as ValueListCreateParams, +) +from stripe.params.radar._value_list_delete_params import ( + ValueListDeleteParams as ValueListDeleteParams, +) +from stripe.params.radar._value_list_item_create_params import ( + ValueListItemCreateParams as ValueListItemCreateParams, +) +from stripe.params.radar._value_list_item_delete_params import ( + ValueListItemDeleteParams as ValueListItemDeleteParams, +) +from stripe.params.radar._value_list_item_list_params import ( + ValueListItemListParams as ValueListItemListParams, +) +from stripe.params.radar._value_list_item_retrieve_params import ( + ValueListItemRetrieveParams as ValueListItemRetrieveParams, +) +from stripe.params.radar._value_list_list_params import ( + ValueListListParams as ValueListListParams, +) +from stripe.params.radar._value_list_modify_params import ( + ValueListModifyParams as ValueListModifyParams, +) +from stripe.params.radar._value_list_retrieve_params import ( + ValueListRetrieveParams as ValueListRetrieveParams, +) +from stripe.params.radar._value_list_update_params import ( + ValueListUpdateParams as ValueListUpdateParams, +) diff --git a/stripe/params/radar/_early_fraud_warning_list_params.py b/stripe/params/radar/_early_fraud_warning_list_params.py new file mode 100644 index 000000000..9a16bf6c0 --- /dev/null +++ b/stripe/params/radar/_early_fraud_warning_list_params.py @@ -0,0 +1,55 @@ +# -*- 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 EarlyFraudWarningListParams(RequestOptions): + charge: NotRequired[str] + """ + Only return early fraud warnings for the charge specified by this charge ID. + """ + created: NotRequired["EarlyFraudWarningListParamsCreated|int"] + """ + Only return early fraud warnings that were created during the given date interval. + """ + 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. + """ + payment_intent: NotRequired[str] + """ + Only return early fraud warnings for charges that were created by the PaymentIntent specified by this PaymentIntent ID. + """ + 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 EarlyFraudWarningListParamsCreated(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/radar/_early_fraud_warning_retrieve_params.py b/stripe/params/radar/_early_fraud_warning_retrieve_params.py new file mode 100644 index 000000000..b218981ed --- /dev/null +++ b/stripe/params/radar/_early_fraud_warning_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 EarlyFraudWarningRetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/radar/_value_list_create_params.py b/stripe/params/radar/_value_list_create_params.py new file mode 100644 index 000000000..1299e35db --- /dev/null +++ b/stripe/params/radar/_value_list_create_params.py @@ -0,0 +1,41 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import Literal, NotRequired + + +class ValueListCreateParams(RequestOptions): + alias: str + """ + The name of the value list for use in rules. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + item_type: NotRequired[ + Literal[ + "card_bin", + "card_fingerprint", + "case_sensitive_string", + "country", + "customer_id", + "email", + "ip_address", + "sepa_debit_fingerprint", + "string", + "us_bank_account_fingerprint", + ] + ] + """ + Type of the items in the value list. One of `card_fingerprint`, `card_bin`, `email`, `ip_address`, `country`, `string`, `case_sensitive_string`, `customer_id`, `sepa_debit_fingerprint`, or `us_bank_account_fingerprint`. Use `string` if the item type is unknown or mixed. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + name: str + """ + The human-readable name of the value list. + """ diff --git a/stripe/params/radar/_value_list_delete_params.py b/stripe/params/radar/_value_list_delete_params.py new file mode 100644 index 000000000..448eeaa3c --- /dev/null +++ b/stripe/params/radar/_value_list_delete_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions + + +class ValueListDeleteParams(RequestOptions): + pass diff --git a/stripe/params/radar/_value_list_item_create_params.py b/stripe/params/radar/_value_list_item_create_params.py new file mode 100644 index 000000000..d9be1d858 --- /dev/null +++ b/stripe/params/radar/_value_list_item_create_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 ValueListItemCreateParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + value: str + """ + The value of the item (whose type must match the type of the parent value list). + """ + value_list: str + """ + The identifier of the value list which the created item will be added to. + """ diff --git a/stripe/params/radar/_value_list_item_delete_params.py b/stripe/params/radar/_value_list_item_delete_params.py new file mode 100644 index 000000000..6f7b8a6b7 --- /dev/null +++ b/stripe/params/radar/_value_list_item_delete_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions + + +class ValueListItemDeleteParams(RequestOptions): + pass diff --git a/stripe/params/radar/_value_list_item_list_params.py b/stripe/params/radar/_value_list_item_list_params.py new file mode 100644 index 000000000..5a76612db --- /dev/null +++ b/stripe/params/radar/_value_list_item_list_params.py @@ -0,0 +1,55 @@ +# -*- 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 ValueListItemListParams(RequestOptions): + created: NotRequired["ValueListItemListParamsCreated|int"] + """ + Only return items that were created during the given date interval. + """ + 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. + """ + value: NotRequired[str] + """ + Return items belonging to the parent list whose value matches the specified value (using an "is like" match). + """ + value_list: str + """ + Identifier for the parent value list this item belongs to. + """ + + +class ValueListItemListParamsCreated(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/radar/_value_list_item_retrieve_params.py b/stripe/params/radar/_value_list_item_retrieve_params.py new file mode 100644 index 000000000..746958c63 --- /dev/null +++ b/stripe/params/radar/_value_list_item_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 ValueListItemRetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/radar/_value_list_list_params.py b/stripe/params/radar/_value_list_list_params.py new file mode 100644 index 000000000..911490ef8 --- /dev/null +++ b/stripe/params/radar/_value_list_list_params.py @@ -0,0 +1,55 @@ +# -*- 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 ValueListListParams(RequestOptions): + alias: NotRequired[str] + """ + The alias used to reference the value list when writing rules. + """ + contains: NotRequired[str] + """ + A value contained within a value list - returns all value lists containing this value. + """ + created: NotRequired["ValueListListParamsCreated|int"] + """ + Only return value lists that were created during the given date interval. + """ + 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 ValueListListParamsCreated(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/radar/_value_list_modify_params.py b/stripe/params/radar/_value_list_modify_params.py new file mode 100644 index 000000000..31a60cbc3 --- /dev/null +++ b/stripe/params/radar/_value_list_modify_params.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import NotRequired + + +class ValueListModifyParams(RequestOptions): + alias: NotRequired[str] + """ + The name of the value list for use in rules. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + name: NotRequired[str] + """ + The human-readable name of the value list. + """ diff --git a/stripe/params/radar/_value_list_retrieve_params.py b/stripe/params/radar/_value_list_retrieve_params.py new file mode 100644 index 000000000..f7b2434f2 --- /dev/null +++ b/stripe/params/radar/_value_list_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 ValueListRetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/radar/_value_list_update_params.py b/stripe/params/radar/_value_list_update_params.py new file mode 100644 index 000000000..e8cbd9f18 --- /dev/null +++ b/stripe/params/radar/_value_list_update_params.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import Dict, List +from typing_extensions import NotRequired, TypedDict + + +class ValueListUpdateParams(TypedDict): + alias: NotRequired[str] + """ + The name of the value list for use in rules. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + name: NotRequired[str] + """ + The human-readable name of the value list. + """ diff --git a/stripe/params/reporting/__init__.py b/stripe/params/reporting/__init__.py new file mode 100644 index 000000000..90d29b148 --- /dev/null +++ b/stripe/params/reporting/__init__.py @@ -0,0 +1,17 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe.params.reporting._report_run_create_params import ( + ReportRunCreateParams as ReportRunCreateParams, +) +from stripe.params.reporting._report_run_list_params import ( + ReportRunListParams as ReportRunListParams, +) +from stripe.params.reporting._report_run_retrieve_params import ( + ReportRunRetrieveParams as ReportRunRetrieveParams, +) +from stripe.params.reporting._report_type_list_params import ( + ReportTypeListParams as ReportTypeListParams, +) +from stripe.params.reporting._report_type_retrieve_params import ( + ReportTypeRetrieveParams as ReportTypeRetrieveParams, +) diff --git a/stripe/params/reporting/_report_run_create_params.py b/stripe/params/reporting/_report_run_create_params.py new file mode 100644 index 000000000..d3f0dabb3 --- /dev/null +++ b/stripe/params/reporting/_report_run_create_params.py @@ -0,0 +1,697 @@ +# -*- 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, TypedDict + + +class ReportRunCreateParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + parameters: NotRequired["ReportRunCreateParamsParameters"] + """ + Parameters specifying how the report should be run. Different Report Types have different required and optional parameters, listed in the [API Access to Reports](https://stripe.com/docs/reporting/statements/api) documentation. + """ + report_type: str + """ + The ID of the [report type](https://stripe.com/docs/reporting/statements/api#report-types) to run, such as `"balance.summary.1"`. + """ + + +class ReportRunCreateParamsParameters(TypedDict): + columns: NotRequired[List[str]] + """ + The set of report columns to include in the report output. If omitted, the Report Type is run with its default column set. + """ + connected_account: NotRequired[str] + """ + Connected account ID to filter for in the report run. + """ + currency: NotRequired[str] + """ + Currency of objects to be included in the report run. + """ + interval_end: NotRequired[int] + """ + Ending timestamp of data to be included in the report run (exclusive). + """ + interval_start: NotRequired[int] + """ + Starting timestamp of data to be included in the report run. + """ + payout: NotRequired[str] + """ + Payout ID by which to filter the report run. + """ + reporting_category: NotRequired[ + Literal[ + "advance", + "advance_funding", + "anticipation_repayment", + "charge", + "charge_failure", + "climate_order_purchase", + "climate_order_refund", + "connect_collection_transfer", + "connect_reserved_funds", + "contribution", + "dispute", + "dispute_reversal", + "fee", + "financing_paydown", + "financing_paydown_reversal", + "financing_payout", + "financing_payout_reversal", + "issuing_authorization_hold", + "issuing_authorization_release", + "issuing_dispute", + "issuing_transaction", + "network_cost", + "other_adjustment", + "partial_capture_reversal", + "payout", + "payout_reversal", + "platform_earning", + "platform_earning_refund", + "refund", + "refund_failure", + "risk_reserved_funds", + "tax", + "topup", + "topup_reversal", + "transfer", + "transfer_reversal", + "unreconciled_customer_funds", + ] + ] + """ + Category of balance transactions to be included in the report run. + """ + timezone: NotRequired[ + Literal[ + "Africa/Abidjan", + "Africa/Accra", + "Africa/Addis_Ababa", + "Africa/Algiers", + "Africa/Asmara", + "Africa/Asmera", + "Africa/Bamako", + "Africa/Bangui", + "Africa/Banjul", + "Africa/Bissau", + "Africa/Blantyre", + "Africa/Brazzaville", + "Africa/Bujumbura", + "Africa/Cairo", + "Africa/Casablanca", + "Africa/Ceuta", + "Africa/Conakry", + "Africa/Dakar", + "Africa/Dar_es_Salaam", + "Africa/Djibouti", + "Africa/Douala", + "Africa/El_Aaiun", + "Africa/Freetown", + "Africa/Gaborone", + "Africa/Harare", + "Africa/Johannesburg", + "Africa/Juba", + "Africa/Kampala", + "Africa/Khartoum", + "Africa/Kigali", + "Africa/Kinshasa", + "Africa/Lagos", + "Africa/Libreville", + "Africa/Lome", + "Africa/Luanda", + "Africa/Lubumbashi", + "Africa/Lusaka", + "Africa/Malabo", + "Africa/Maputo", + "Africa/Maseru", + "Africa/Mbabane", + "Africa/Mogadishu", + "Africa/Monrovia", + "Africa/Nairobi", + "Africa/Ndjamena", + "Africa/Niamey", + "Africa/Nouakchott", + "Africa/Ouagadougou", + "Africa/Porto-Novo", + "Africa/Sao_Tome", + "Africa/Timbuktu", + "Africa/Tripoli", + "Africa/Tunis", + "Africa/Windhoek", + "America/Adak", + "America/Anchorage", + "America/Anguilla", + "America/Antigua", + "America/Araguaina", + "America/Argentina/Buenos_Aires", + "America/Argentina/Catamarca", + "America/Argentina/ComodRivadavia", + "America/Argentina/Cordoba", + "America/Argentina/Jujuy", + "America/Argentina/La_Rioja", + "America/Argentina/Mendoza", + "America/Argentina/Rio_Gallegos", + "America/Argentina/Salta", + "America/Argentina/San_Juan", + "America/Argentina/San_Luis", + "America/Argentina/Tucuman", + "America/Argentina/Ushuaia", + "America/Aruba", + "America/Asuncion", + "America/Atikokan", + "America/Atka", + "America/Bahia", + "America/Bahia_Banderas", + "America/Barbados", + "America/Belem", + "America/Belize", + "America/Blanc-Sablon", + "America/Boa_Vista", + "America/Bogota", + "America/Boise", + "America/Buenos_Aires", + "America/Cambridge_Bay", + "America/Campo_Grande", + "America/Cancun", + "America/Caracas", + "America/Catamarca", + "America/Cayenne", + "America/Cayman", + "America/Chicago", + "America/Chihuahua", + "America/Ciudad_Juarez", + "America/Coral_Harbour", + "America/Cordoba", + "America/Costa_Rica", + "America/Coyhaique", + "America/Creston", + "America/Cuiaba", + "America/Curacao", + "America/Danmarkshavn", + "America/Dawson", + "America/Dawson_Creek", + "America/Denver", + "America/Detroit", + "America/Dominica", + "America/Edmonton", + "America/Eirunepe", + "America/El_Salvador", + "America/Ensenada", + "America/Fort_Nelson", + "America/Fort_Wayne", + "America/Fortaleza", + "America/Glace_Bay", + "America/Godthab", + "America/Goose_Bay", + "America/Grand_Turk", + "America/Grenada", + "America/Guadeloupe", + "America/Guatemala", + "America/Guayaquil", + "America/Guyana", + "America/Halifax", + "America/Havana", + "America/Hermosillo", + "America/Indiana/Indianapolis", + "America/Indiana/Knox", + "America/Indiana/Marengo", + "America/Indiana/Petersburg", + "America/Indiana/Tell_City", + "America/Indiana/Vevay", + "America/Indiana/Vincennes", + "America/Indiana/Winamac", + "America/Indianapolis", + "America/Inuvik", + "America/Iqaluit", + "America/Jamaica", + "America/Jujuy", + "America/Juneau", + "America/Kentucky/Louisville", + "America/Kentucky/Monticello", + "America/Knox_IN", + "America/Kralendijk", + "America/La_Paz", + "America/Lima", + "America/Los_Angeles", + "America/Louisville", + "America/Lower_Princes", + "America/Maceio", + "America/Managua", + "America/Manaus", + "America/Marigot", + "America/Martinique", + "America/Matamoros", + "America/Mazatlan", + "America/Mendoza", + "America/Menominee", + "America/Merida", + "America/Metlakatla", + "America/Mexico_City", + "America/Miquelon", + "America/Moncton", + "America/Monterrey", + "America/Montevideo", + "America/Montreal", + "America/Montserrat", + "America/Nassau", + "America/New_York", + "America/Nipigon", + "America/Nome", + "America/Noronha", + "America/North_Dakota/Beulah", + "America/North_Dakota/Center", + "America/North_Dakota/New_Salem", + "America/Nuuk", + "America/Ojinaga", + "America/Panama", + "America/Pangnirtung", + "America/Paramaribo", + "America/Phoenix", + "America/Port-au-Prince", + "America/Port_of_Spain", + "America/Porto_Acre", + "America/Porto_Velho", + "America/Puerto_Rico", + "America/Punta_Arenas", + "America/Rainy_River", + "America/Rankin_Inlet", + "America/Recife", + "America/Regina", + "America/Resolute", + "America/Rio_Branco", + "America/Rosario", + "America/Santa_Isabel", + "America/Santarem", + "America/Santiago", + "America/Santo_Domingo", + "America/Sao_Paulo", + "America/Scoresbysund", + "America/Shiprock", + "America/Sitka", + "America/St_Barthelemy", + "America/St_Johns", + "America/St_Kitts", + "America/St_Lucia", + "America/St_Thomas", + "America/St_Vincent", + "America/Swift_Current", + "America/Tegucigalpa", + "America/Thule", + "America/Thunder_Bay", + "America/Tijuana", + "America/Toronto", + "America/Tortola", + "America/Vancouver", + "America/Virgin", + "America/Whitehorse", + "America/Winnipeg", + "America/Yakutat", + "America/Yellowknife", + "Antarctica/Casey", + "Antarctica/Davis", + "Antarctica/DumontDUrville", + "Antarctica/Macquarie", + "Antarctica/Mawson", + "Antarctica/McMurdo", + "Antarctica/Palmer", + "Antarctica/Rothera", + "Antarctica/South_Pole", + "Antarctica/Syowa", + "Antarctica/Troll", + "Antarctica/Vostok", + "Arctic/Longyearbyen", + "Asia/Aden", + "Asia/Almaty", + "Asia/Amman", + "Asia/Anadyr", + "Asia/Aqtau", + "Asia/Aqtobe", + "Asia/Ashgabat", + "Asia/Ashkhabad", + "Asia/Atyrau", + "Asia/Baghdad", + "Asia/Bahrain", + "Asia/Baku", + "Asia/Bangkok", + "Asia/Barnaul", + "Asia/Beirut", + "Asia/Bishkek", + "Asia/Brunei", + "Asia/Calcutta", + "Asia/Chita", + "Asia/Choibalsan", + "Asia/Chongqing", + "Asia/Chungking", + "Asia/Colombo", + "Asia/Dacca", + "Asia/Damascus", + "Asia/Dhaka", + "Asia/Dili", + "Asia/Dubai", + "Asia/Dushanbe", + "Asia/Famagusta", + "Asia/Gaza", + "Asia/Harbin", + "Asia/Hebron", + "Asia/Ho_Chi_Minh", + "Asia/Hong_Kong", + "Asia/Hovd", + "Asia/Irkutsk", + "Asia/Istanbul", + "Asia/Jakarta", + "Asia/Jayapura", + "Asia/Jerusalem", + "Asia/Kabul", + "Asia/Kamchatka", + "Asia/Karachi", + "Asia/Kashgar", + "Asia/Kathmandu", + "Asia/Katmandu", + "Asia/Khandyga", + "Asia/Kolkata", + "Asia/Krasnoyarsk", + "Asia/Kuala_Lumpur", + "Asia/Kuching", + "Asia/Kuwait", + "Asia/Macao", + "Asia/Macau", + "Asia/Magadan", + "Asia/Makassar", + "Asia/Manila", + "Asia/Muscat", + "Asia/Nicosia", + "Asia/Novokuznetsk", + "Asia/Novosibirsk", + "Asia/Omsk", + "Asia/Oral", + "Asia/Phnom_Penh", + "Asia/Pontianak", + "Asia/Pyongyang", + "Asia/Qatar", + "Asia/Qostanay", + "Asia/Qyzylorda", + "Asia/Rangoon", + "Asia/Riyadh", + "Asia/Saigon", + "Asia/Sakhalin", + "Asia/Samarkand", + "Asia/Seoul", + "Asia/Shanghai", + "Asia/Singapore", + "Asia/Srednekolymsk", + "Asia/Taipei", + "Asia/Tashkent", + "Asia/Tbilisi", + "Asia/Tehran", + "Asia/Tel_Aviv", + "Asia/Thimbu", + "Asia/Thimphu", + "Asia/Tokyo", + "Asia/Tomsk", + "Asia/Ujung_Pandang", + "Asia/Ulaanbaatar", + "Asia/Ulan_Bator", + "Asia/Urumqi", + "Asia/Ust-Nera", + "Asia/Vientiane", + "Asia/Vladivostok", + "Asia/Yakutsk", + "Asia/Yangon", + "Asia/Yekaterinburg", + "Asia/Yerevan", + "Atlantic/Azores", + "Atlantic/Bermuda", + "Atlantic/Canary", + "Atlantic/Cape_Verde", + "Atlantic/Faeroe", + "Atlantic/Faroe", + "Atlantic/Jan_Mayen", + "Atlantic/Madeira", + "Atlantic/Reykjavik", + "Atlantic/South_Georgia", + "Atlantic/St_Helena", + "Atlantic/Stanley", + "Australia/ACT", + "Australia/Adelaide", + "Australia/Brisbane", + "Australia/Broken_Hill", + "Australia/Canberra", + "Australia/Currie", + "Australia/Darwin", + "Australia/Eucla", + "Australia/Hobart", + "Australia/LHI", + "Australia/Lindeman", + "Australia/Lord_Howe", + "Australia/Melbourne", + "Australia/NSW", + "Australia/North", + "Australia/Perth", + "Australia/Queensland", + "Australia/South", + "Australia/Sydney", + "Australia/Tasmania", + "Australia/Victoria", + "Australia/West", + "Australia/Yancowinna", + "Brazil/Acre", + "Brazil/DeNoronha", + "Brazil/East", + "Brazil/West", + "CET", + "CST6CDT", + "Canada/Atlantic", + "Canada/Central", + "Canada/Eastern", + "Canada/Mountain", + "Canada/Newfoundland", + "Canada/Pacific", + "Canada/Saskatchewan", + "Canada/Yukon", + "Chile/Continental", + "Chile/EasterIsland", + "Cuba", + "EET", + "EST", + "EST5EDT", + "Egypt", + "Eire", + "Etc/GMT", + "Etc/GMT+0", + "Etc/GMT+1", + "Etc/GMT+10", + "Etc/GMT+11", + "Etc/GMT+12", + "Etc/GMT+2", + "Etc/GMT+3", + "Etc/GMT+4", + "Etc/GMT+5", + "Etc/GMT+6", + "Etc/GMT+7", + "Etc/GMT+8", + "Etc/GMT+9", + "Etc/GMT-0", + "Etc/GMT-1", + "Etc/GMT-10", + "Etc/GMT-11", + "Etc/GMT-12", + "Etc/GMT-13", + "Etc/GMT-14", + "Etc/GMT-2", + "Etc/GMT-3", + "Etc/GMT-4", + "Etc/GMT-5", + "Etc/GMT-6", + "Etc/GMT-7", + "Etc/GMT-8", + "Etc/GMT-9", + "Etc/GMT0", + "Etc/Greenwich", + "Etc/UCT", + "Etc/UTC", + "Etc/Universal", + "Etc/Zulu", + "Europe/Amsterdam", + "Europe/Andorra", + "Europe/Astrakhan", + "Europe/Athens", + "Europe/Belfast", + "Europe/Belgrade", + "Europe/Berlin", + "Europe/Bratislava", + "Europe/Brussels", + "Europe/Bucharest", + "Europe/Budapest", + "Europe/Busingen", + "Europe/Chisinau", + "Europe/Copenhagen", + "Europe/Dublin", + "Europe/Gibraltar", + "Europe/Guernsey", + "Europe/Helsinki", + "Europe/Isle_of_Man", + "Europe/Istanbul", + "Europe/Jersey", + "Europe/Kaliningrad", + "Europe/Kiev", + "Europe/Kirov", + "Europe/Kyiv", + "Europe/Lisbon", + "Europe/Ljubljana", + "Europe/London", + "Europe/Luxembourg", + "Europe/Madrid", + "Europe/Malta", + "Europe/Mariehamn", + "Europe/Minsk", + "Europe/Monaco", + "Europe/Moscow", + "Europe/Nicosia", + "Europe/Oslo", + "Europe/Paris", + "Europe/Podgorica", + "Europe/Prague", + "Europe/Riga", + "Europe/Rome", + "Europe/Samara", + "Europe/San_Marino", + "Europe/Sarajevo", + "Europe/Saratov", + "Europe/Simferopol", + "Europe/Skopje", + "Europe/Sofia", + "Europe/Stockholm", + "Europe/Tallinn", + "Europe/Tirane", + "Europe/Tiraspol", + "Europe/Ulyanovsk", + "Europe/Uzhgorod", + "Europe/Vaduz", + "Europe/Vatican", + "Europe/Vienna", + "Europe/Vilnius", + "Europe/Volgograd", + "Europe/Warsaw", + "Europe/Zagreb", + "Europe/Zaporozhye", + "Europe/Zurich", + "Factory", + "GB", + "GB-Eire", + "GMT", + "GMT+0", + "GMT-0", + "GMT0", + "Greenwich", + "HST", + "Hongkong", + "Iceland", + "Indian/Antananarivo", + "Indian/Chagos", + "Indian/Christmas", + "Indian/Cocos", + "Indian/Comoro", + "Indian/Kerguelen", + "Indian/Mahe", + "Indian/Maldives", + "Indian/Mauritius", + "Indian/Mayotte", + "Indian/Reunion", + "Iran", + "Israel", + "Jamaica", + "Japan", + "Kwajalein", + "Libya", + "MET", + "MST", + "MST7MDT", + "Mexico/BajaNorte", + "Mexico/BajaSur", + "Mexico/General", + "NZ", + "NZ-CHAT", + "Navajo", + "PRC", + "PST8PDT", + "Pacific/Apia", + "Pacific/Auckland", + "Pacific/Bougainville", + "Pacific/Chatham", + "Pacific/Chuuk", + "Pacific/Easter", + "Pacific/Efate", + "Pacific/Enderbury", + "Pacific/Fakaofo", + "Pacific/Fiji", + "Pacific/Funafuti", + "Pacific/Galapagos", + "Pacific/Gambier", + "Pacific/Guadalcanal", + "Pacific/Guam", + "Pacific/Honolulu", + "Pacific/Johnston", + "Pacific/Kanton", + "Pacific/Kiritimati", + "Pacific/Kosrae", + "Pacific/Kwajalein", + "Pacific/Majuro", + "Pacific/Marquesas", + "Pacific/Midway", + "Pacific/Nauru", + "Pacific/Niue", + "Pacific/Norfolk", + "Pacific/Noumea", + "Pacific/Pago_Pago", + "Pacific/Palau", + "Pacific/Pitcairn", + "Pacific/Pohnpei", + "Pacific/Ponape", + "Pacific/Port_Moresby", + "Pacific/Rarotonga", + "Pacific/Saipan", + "Pacific/Samoa", + "Pacific/Tahiti", + "Pacific/Tarawa", + "Pacific/Tongatapu", + "Pacific/Truk", + "Pacific/Wake", + "Pacific/Wallis", + "Pacific/Yap", + "Poland", + "Portugal", + "ROC", + "ROK", + "Singapore", + "Turkey", + "UCT", + "US/Alaska", + "US/Aleutian", + "US/Arizona", + "US/Central", + "US/East-Indiana", + "US/Eastern", + "US/Hawaii", + "US/Indiana-Starke", + "US/Michigan", + "US/Mountain", + "US/Pacific", + "US/Pacific-New", + "US/Samoa", + "UTC", + "Universal", + "W-SU", + "WET", + "Zulu", + ] + ] + """ + Defaults to `Etc/UTC`. The output timezone for all timestamps in the report. A list of possible time zone values is maintained at the [IANA Time Zone Database](http://www.iana.org/time-zones). Has no effect on `interval_start` or `interval_end`. + """ diff --git a/stripe/params/reporting/_report_run_list_params.py b/stripe/params/reporting/_report_run_list_params.py new file mode 100644 index 000000000..befc905ef --- /dev/null +++ b/stripe/params/reporting/_report_run_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 ReportRunListParams(RequestOptions): + created: NotRequired["ReportRunListParamsCreated|int"] + """ + Only return Report Runs that were created during the given date interval. + """ + 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 ReportRunListParamsCreated(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/reporting/_report_run_retrieve_params.py b/stripe/params/reporting/_report_run_retrieve_params.py new file mode 100644 index 000000000..f17591ac4 --- /dev/null +++ b/stripe/params/reporting/_report_run_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 ReportRunRetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/reporting/_report_type_list_params.py b/stripe/params/reporting/_report_type_list_params.py new file mode 100644 index 000000000..ebfb226fc --- /dev/null +++ b/stripe/params/reporting/_report_type_list_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 ReportTypeListParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/reporting/_report_type_retrieve_params.py b/stripe/params/reporting/_report_type_retrieve_params.py new file mode 100644 index 000000000..e35a36bae --- /dev/null +++ b/stripe/params/reporting/_report_type_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 ReportTypeRetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/sigma/__init__.py b/stripe/params/sigma/__init__.py new file mode 100644 index 000000000..4ff3eb3d4 --- /dev/null +++ b/stripe/params/sigma/__init__.py @@ -0,0 +1,8 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe.params.sigma._scheduled_query_run_list_params import ( + ScheduledQueryRunListParams as ScheduledQueryRunListParams, +) +from stripe.params.sigma._scheduled_query_run_retrieve_params import ( + ScheduledQueryRunRetrieveParams as ScheduledQueryRunRetrieveParams, +) diff --git a/stripe/params/sigma/_scheduled_query_run_list_params.py b/stripe/params/sigma/_scheduled_query_run_list_params.py new file mode 100644 index 000000000..22dc4fc20 --- /dev/null +++ b/stripe/params/sigma/_scheduled_query_run_list_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 ScheduledQueryRunListParams(RequestOptions): + 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. + """ diff --git a/stripe/params/sigma/_scheduled_query_run_retrieve_params.py b/stripe/params/sigma/_scheduled_query_run_retrieve_params.py new file mode 100644 index 000000000..439adc13b --- /dev/null +++ b/stripe/params/sigma/_scheduled_query_run_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 ScheduledQueryRunRetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/tax/__init__.py b/stripe/params/tax/__init__.py new file mode 100644 index 000000000..18fd0d0af --- /dev/null +++ b/stripe/params/tax/__init__.py @@ -0,0 +1,63 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe.params.tax._association_find_params import ( + AssociationFindParams as AssociationFindParams, +) +from stripe.params.tax._calculation_create_params import ( + CalculationCreateParams as CalculationCreateParams, +) +from stripe.params.tax._calculation_line_item_list_params import ( + CalculationLineItemListParams as CalculationLineItemListParams, +) +from stripe.params.tax._calculation_list_line_items_params import ( + CalculationListLineItemsParams as CalculationListLineItemsParams, +) +from stripe.params.tax._calculation_retrieve_params import ( + CalculationRetrieveParams as CalculationRetrieveParams, +) +from stripe.params.tax._form_list_params import ( + FormListParams as FormListParams, +) +from stripe.params.tax._form_pdf_params import FormPdfParams as FormPdfParams +from stripe.params.tax._form_retrieve_params import ( + FormRetrieveParams as FormRetrieveParams, +) +from stripe.params.tax._registration_create_params import ( + RegistrationCreateParams as RegistrationCreateParams, +) +from stripe.params.tax._registration_list_params import ( + RegistrationListParams as RegistrationListParams, +) +from stripe.params.tax._registration_modify_params import ( + RegistrationModifyParams as RegistrationModifyParams, +) +from stripe.params.tax._registration_retrieve_params import ( + RegistrationRetrieveParams as RegistrationRetrieveParams, +) +from stripe.params.tax._registration_update_params import ( + RegistrationUpdateParams as RegistrationUpdateParams, +) +from stripe.params.tax._settings_modify_params import ( + SettingsModifyParams as SettingsModifyParams, +) +from stripe.params.tax._settings_retrieve_params import ( + SettingsRetrieveParams as SettingsRetrieveParams, +) +from stripe.params.tax._settings_update_params import ( + SettingsUpdateParams as SettingsUpdateParams, +) +from stripe.params.tax._transaction_create_from_calculation_params import ( + TransactionCreateFromCalculationParams as TransactionCreateFromCalculationParams, +) +from stripe.params.tax._transaction_create_reversal_params import ( + TransactionCreateReversalParams as TransactionCreateReversalParams, +) +from stripe.params.tax._transaction_line_item_list_params import ( + TransactionLineItemListParams as TransactionLineItemListParams, +) +from stripe.params.tax._transaction_list_line_items_params import ( + TransactionListLineItemsParams as TransactionListLineItemsParams, +) +from stripe.params.tax._transaction_retrieve_params import ( + TransactionRetrieveParams as TransactionRetrieveParams, +) diff --git a/stripe/params/tax/_association_find_params.py b/stripe/params/tax/_association_find_params.py new file mode 100644 index 000000000..8da73d00f --- /dev/null +++ b/stripe/params/tax/_association_find_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 AssociationFindParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + payment_intent: str + """ + Valid [PaymentIntent](https://stripe.com/docs/api/payment_intents/object) id + """ diff --git a/stripe/params/tax/_calculation_create_params.py b/stripe/params/tax/_calculation_create_params.py new file mode 100644 index 000000000..f1815268a --- /dev/null +++ b/stripe/params/tax/_calculation_create_params.py @@ -0,0 +1,299 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class CalculationCreateParams(RequestOptions): + 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). + """ + customer: NotRequired[str] + """ + The ID of an existing customer to use for this calculation. If provided, the customer's address and tax IDs are copied to `customer_details`. + """ + customer_details: NotRequired["CalculationCreateParamsCustomerDetails"] + """ + Details about the customer, including address and tax IDs. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + line_items: List["CalculationCreateParamsLineItem"] + """ + A list of items the customer is purchasing. + """ + ship_from_details: NotRequired["CalculationCreateParamsShipFromDetails"] + """ + Details about the address from which the goods are being shipped. + """ + shipping_cost: NotRequired["CalculationCreateParamsShippingCost"] + """ + Shipping cost details to be used for the calculation. + """ + tax_date: NotRequired[int] + """ + Timestamp of date at which the tax rules and rates in effect applies for the calculation. Measured in seconds since the Unix epoch. Can be up to 48 hours in the past, and up to 48 hours in the future. + """ + + +class CalculationCreateParamsCustomerDetails(TypedDict): + address: NotRequired["CalculationCreateParamsCustomerDetailsAddress"] + """ + The customer's postal address (for example, home or business location). + """ + address_source: NotRequired[Literal["billing", "shipping"]] + """ + The type of customer address provided. + """ + ip_address: NotRequired[str] + """ + The customer's IP address (IPv4 or IPv6). + """ + tax_ids: NotRequired[List["CalculationCreateParamsCustomerDetailsTaxId"]] + """ + The customer's tax IDs. Stripe Tax might consider a transaction with applicable tax IDs to be B2B, which might affect the tax calculation result. Stripe Tax doesn't validate tax IDs for correctness. + """ + taxability_override: NotRequired[ + Literal["customer_exempt", "none", "reverse_charge"] + ] + """ + Overrides the tax calculation result to allow you to not collect tax from your customer. Use this if you've manually checked your customer's tax exemptions. Prefer providing the customer's `tax_ids` where possible, which automatically determines whether `reverse_charge` applies. + """ + + +class CalculationCreateParamsCustomerDetailsAddress(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, county, province, or region. We recommend sending [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) subdivision code value when possible. + """ + + +class CalculationCreateParamsCustomerDetailsTaxId(TypedDict): + type: Literal[ + "ad_nrt", + "ae_trn", + "al_tin", + "am_tin", + "ao_tin", + "ar_cuit", + "au_abn", + "au_arn", + "aw_tin", + "az_tin", + "ba_tin", + "bb_tin", + "bd_bin", + "bf_ifu", + "bg_uic", + "bh_vat", + "bj_ifu", + "bo_tin", + "br_cnpj", + "br_cpf", + "bs_tin", + "by_tin", + "ca_bn", + "ca_gst_hst", + "ca_pst_bc", + "ca_pst_mb", + "ca_pst_sk", + "ca_qst", + "cd_nif", + "ch_uid", + "ch_vat", + "cl_tin", + "cm_niu", + "cn_tin", + "co_nit", + "cr_tin", + "cv_nif", + "de_stn", + "do_rcn", + "ec_ruc", + "eg_tin", + "es_cif", + "et_tin", + "eu_oss_vat", + "eu_vat", + "gb_vat", + "ge_vat", + "gn_nif", + "hk_br", + "hr_oib", + "hu_tin", + "id_npwp", + "il_vat", + "in_gst", + "is_vat", + "jp_cn", + "jp_rn", + "jp_trn", + "ke_pin", + "kg_tin", + "kh_tin", + "kr_brn", + "kz_bin", + "la_tin", + "li_uid", + "li_vat", + "ma_vat", + "md_vat", + "me_pib", + "mk_vat", + "mr_nif", + "mx_rfc", + "my_frp", + "my_itn", + "my_sst", + "ng_tin", + "no_vat", + "no_voec", + "np_pan", + "nz_gst", + "om_vat", + "pe_ruc", + "ph_tin", + "ro_tin", + "rs_pib", + "ru_inn", + "ru_kpp", + "sa_vat", + "sg_gst", + "sg_uen", + "si_tin", + "sn_ninea", + "sr_fin", + "sv_nit", + "th_vat", + "tj_tin", + "tr_tin", + "tw_vat", + "tz_vat", + "ua_vat", + "ug_tin", + "us_ein", + "uy_ruc", + "uz_tin", + "uz_vat", + "ve_rif", + "vn_tin", + "za_vat", + "zm_tin", + "zw_tin", + ] + """ + Type of the tax ID, one of `ad_nrt`, `ae_trn`, `al_tin`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `aw_tin`, `az_tin`, `ba_tin`, `bb_tin`, `bd_bin`, `bf_ifu`, `bg_uic`, `bh_vat`, `bj_ifu`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cm_niu`, `cn_tin`, `co_nit`, `cr_tin`, `cv_nif`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `et_tin`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kg_tin`, `kh_tin`, `kr_brn`, `kz_bin`, `la_tin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin` + """ + value: str + """ + Value of the tax ID. + """ + + +class CalculationCreateParamsLineItem(TypedDict): + amount: int + """ + A positive integer representing the line item's total price in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + If `tax_behavior=inclusive`, then this amount includes taxes. Otherwise, taxes are calculated on top of this amount. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + """ + product: NotRequired[str] + """ + If provided, the product's `tax_code` will be used as the line item's `tax_code`. + """ + quantity: NotRequired[int] + """ + The number of units of the item being purchased. Used to calculate the per-unit price from the total `amount` for the line. For example, if `amount=100` and `quantity=4`, the calculated unit price is 25. + """ + reference: NotRequired[str] + """ + A custom identifier for this line item, which must be unique across the line items in the calculation. The reference helps identify each line item in exported [tax reports](https://stripe.com/docs/tax/reports). + """ + tax_behavior: NotRequired[Literal["exclusive", "inclusive"]] + """ + Specifies whether the `amount` includes taxes. Defaults to `exclusive`. + """ + tax_code: NotRequired[str] + """ + A [tax code](https://stripe.com/docs/tax/tax-categories) ID to use for this line item. If not provided, we will use the tax code from the provided `product` param. If neither `tax_code` nor `product` is provided, we will use the default tax code from your Tax Settings. + """ + + +class CalculationCreateParamsShipFromDetails(TypedDict): + address: "CalculationCreateParamsShipFromDetailsAddress" + """ + The address from which the goods are being shipped from. + """ + + +class CalculationCreateParamsShipFromDetailsAddress(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 CalculationCreateParamsShippingCost(TypedDict): + amount: NotRequired[int] + """ + A positive integer in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) representing the shipping charge. If `tax_behavior=inclusive`, then this amount includes taxes. Otherwise, taxes are calculated on top of this amount. + """ + shipping_rate: NotRequired[str] + """ + If provided, the [shipping rate](https://stripe.com/docs/api/shipping_rates/object)'s `amount`, `tax_code` and `tax_behavior` are used. If you provide a shipping rate, then you cannot pass the `amount`, `tax_code`, or `tax_behavior` parameters. + """ + tax_behavior: NotRequired[Literal["exclusive", "inclusive"]] + """ + Specifies whether the `amount` includes taxes. If `tax_behavior=inclusive`, then the amount includes taxes. Defaults to `exclusive`. + """ + tax_code: NotRequired[str] + """ + The [tax code](https://stripe.com/docs/tax/tax-categories) used to calculate tax on shipping. If not provided, the default shipping tax code from your [Tax Settings](https://dashboard.stripe.com/settings/tax) is used. + """ diff --git a/stripe/params/tax/_calculation_line_item_list_params.py b/stripe/params/tax/_calculation_line_item_list_params.py new file mode 100644 index 000000000..8c988d49a --- /dev/null +++ b/stripe/params/tax/_calculation_line_item_list_params.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import NotRequired, TypedDict + + +class CalculationLineItemListParams(TypedDict): + 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. + """ diff --git a/stripe/params/tax/_calculation_list_line_items_params.py b/stripe/params/tax/_calculation_list_line_items_params.py new file mode 100644 index 000000000..f2f7ea58a --- /dev/null +++ b/stripe/params/tax/_calculation_list_line_items_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 CalculationListLineItemsParams(RequestOptions): + 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. + """ diff --git a/stripe/params/tax/_calculation_retrieve_params.py b/stripe/params/tax/_calculation_retrieve_params.py new file mode 100644 index 000000000..ac247ea4d --- /dev/null +++ b/stripe/params/tax/_calculation_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 CalculationRetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/tax/_form_list_params.py b/stripe/params/tax/_form_list_params.py new file mode 100644 index 000000000..19ba1fafb --- /dev/null +++ b/stripe/params/tax/_form_list_params.py @@ -0,0 +1,58 @@ +# -*- 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, TypedDict + + +class FormListParams(RequestOptions): + 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. + """ + payee: "FormListParamsPayee" + """ + The payee whose volume is represented on the tax form. + """ + 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. + """ + type: NotRequired[ + Literal[ + "au_serr", + "ca_mrdp", + "eu_dac7", + "gb_mrdp", + "nz_mrdp", + "us_1099_k", + "us_1099_misc", + "us_1099_nec", + ] + ] + """ + An optional filter on the list, based on the object `type` field. Without the filter, the list includes all current and future tax form types. If your integration expects only one type of tax form in the response, make sure to provide a type value in the request. + """ + + +class FormListParamsPayee(TypedDict): + account: NotRequired[str] + """ + The ID of the Stripe account whose forms will be retrieved. + """ + external_reference: NotRequired[str] + """ + The external reference to the payee whose forms will be retrieved. + """ + type: NotRequired[Literal["account", "external_reference"]] + """ + Specifies the payee type. Either `account` or `external_reference`. + """ diff --git a/stripe/params/tax/_form_pdf_params.py b/stripe/params/tax/_form_pdf_params.py new file mode 100644 index 000000000..3569951b8 --- /dev/null +++ b/stripe/params/tax/_form_pdf_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 FormPdfParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/tax/_form_retrieve_params.py b/stripe/params/tax/_form_retrieve_params.py new file mode 100644 index 000000000..ed2727b6b --- /dev/null +++ b/stripe/params/tax/_form_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 FormRetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/tax/_registration_create_params.py b/stripe/params/tax/_registration_create_params.py new file mode 100644 index 000000000..2ea18e073 --- /dev/null +++ b/stripe/params/tax/_registration_create_params.py @@ -0,0 +1,1881 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import List, Union +from typing_extensions import Literal, NotRequired, TypedDict + + +class RegistrationCreateParams(RequestOptions): + active_from: Union[Literal["now"], int] + """ + Time at which the Tax Registration becomes active. It can be either `now` to indicate the current time, or a future timestamp measured in seconds since the Unix epoch. + """ + country: str + """ + Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + country_options: "RegistrationCreateParamsCountryOptions" + """ + Specific options for a registration in the specified `country`. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + expires_at: NotRequired[int] + """ + If set, the Tax Registration stops being active at this time. If not set, the Tax Registration will be active indefinitely. Timestamp measured in seconds since the Unix epoch. + """ + + +_RegistrationCreateParamsCountryOptionsBase = TypedDict( + "RegistrationCreateParamsCountryOptions", + { + "in": NotRequired["RegistrationCreateParamsCountryOptionsIn"], + "is": NotRequired["RegistrationCreateParamsCountryOptionsIs"], + }, +) + + +class RegistrationCreateParamsCountryOptions( + _RegistrationCreateParamsCountryOptionsBase, +): + ae: NotRequired["RegistrationCreateParamsCountryOptionsAe"] + """ + Options for the registration in AE. + """ + al: NotRequired["RegistrationCreateParamsCountryOptionsAl"] + """ + Options for the registration in AL. + """ + am: NotRequired["RegistrationCreateParamsCountryOptionsAm"] + """ + Options for the registration in AM. + """ + ao: NotRequired["RegistrationCreateParamsCountryOptionsAo"] + """ + Options for the registration in AO. + """ + at: NotRequired["RegistrationCreateParamsCountryOptionsAt"] + """ + Options for the registration in AT. + """ + au: NotRequired["RegistrationCreateParamsCountryOptionsAu"] + """ + Options for the registration in AU. + """ + aw: NotRequired["RegistrationCreateParamsCountryOptionsAw"] + """ + Options for the registration in AW. + """ + az: NotRequired["RegistrationCreateParamsCountryOptionsAz"] + """ + Options for the registration in AZ. + """ + ba: NotRequired["RegistrationCreateParamsCountryOptionsBa"] + """ + Options for the registration in BA. + """ + bb: NotRequired["RegistrationCreateParamsCountryOptionsBb"] + """ + Options for the registration in BB. + """ + bd: NotRequired["RegistrationCreateParamsCountryOptionsBd"] + """ + Options for the registration in BD. + """ + be: NotRequired["RegistrationCreateParamsCountryOptionsBe"] + """ + Options for the registration in BE. + """ + bf: NotRequired["RegistrationCreateParamsCountryOptionsBf"] + """ + Options for the registration in BF. + """ + bg: NotRequired["RegistrationCreateParamsCountryOptionsBg"] + """ + Options for the registration in BG. + """ + bh: NotRequired["RegistrationCreateParamsCountryOptionsBh"] + """ + Options for the registration in BH. + """ + bj: NotRequired["RegistrationCreateParamsCountryOptionsBj"] + """ + Options for the registration in BJ. + """ + bs: NotRequired["RegistrationCreateParamsCountryOptionsBs"] + """ + Options for the registration in BS. + """ + by: NotRequired["RegistrationCreateParamsCountryOptionsBy"] + """ + Options for the registration in BY. + """ + ca: NotRequired["RegistrationCreateParamsCountryOptionsCa"] + """ + Options for the registration in CA. + """ + cd: NotRequired["RegistrationCreateParamsCountryOptionsCd"] + """ + Options for the registration in CD. + """ + ch: NotRequired["RegistrationCreateParamsCountryOptionsCh"] + """ + Options for the registration in CH. + """ + cl: NotRequired["RegistrationCreateParamsCountryOptionsCl"] + """ + Options for the registration in CL. + """ + cm: NotRequired["RegistrationCreateParamsCountryOptionsCm"] + """ + Options for the registration in CM. + """ + co: NotRequired["RegistrationCreateParamsCountryOptionsCo"] + """ + Options for the registration in CO. + """ + cr: NotRequired["RegistrationCreateParamsCountryOptionsCr"] + """ + Options for the registration in CR. + """ + cv: NotRequired["RegistrationCreateParamsCountryOptionsCv"] + """ + Options for the registration in CV. + """ + cy: NotRequired["RegistrationCreateParamsCountryOptionsCy"] + """ + Options for the registration in CY. + """ + cz: NotRequired["RegistrationCreateParamsCountryOptionsCz"] + """ + Options for the registration in CZ. + """ + de: NotRequired["RegistrationCreateParamsCountryOptionsDe"] + """ + Options for the registration in DE. + """ + dk: NotRequired["RegistrationCreateParamsCountryOptionsDk"] + """ + Options for the registration in DK. + """ + ec: NotRequired["RegistrationCreateParamsCountryOptionsEc"] + """ + Options for the registration in EC. + """ + ee: NotRequired["RegistrationCreateParamsCountryOptionsEe"] + """ + Options for the registration in EE. + """ + eg: NotRequired["RegistrationCreateParamsCountryOptionsEg"] + """ + Options for the registration in EG. + """ + es: NotRequired["RegistrationCreateParamsCountryOptionsEs"] + """ + Options for the registration in ES. + """ + et: NotRequired["RegistrationCreateParamsCountryOptionsEt"] + """ + Options for the registration in ET. + """ + fi: NotRequired["RegistrationCreateParamsCountryOptionsFi"] + """ + Options for the registration in FI. + """ + fr: NotRequired["RegistrationCreateParamsCountryOptionsFr"] + """ + Options for the registration in FR. + """ + gb: NotRequired["RegistrationCreateParamsCountryOptionsGb"] + """ + Options for the registration in GB. + """ + ge: NotRequired["RegistrationCreateParamsCountryOptionsGe"] + """ + Options for the registration in GE. + """ + gn: NotRequired["RegistrationCreateParamsCountryOptionsGn"] + """ + Options for the registration in GN. + """ + gr: NotRequired["RegistrationCreateParamsCountryOptionsGr"] + """ + Options for the registration in GR. + """ + hr: NotRequired["RegistrationCreateParamsCountryOptionsHr"] + """ + Options for the registration in HR. + """ + hu: NotRequired["RegistrationCreateParamsCountryOptionsHu"] + """ + Options for the registration in HU. + """ + id: NotRequired["RegistrationCreateParamsCountryOptionsId"] + """ + Options for the registration in ID. + """ + ie: NotRequired["RegistrationCreateParamsCountryOptionsIe"] + """ + Options for the registration in IE. + """ + it: NotRequired["RegistrationCreateParamsCountryOptionsIt"] + """ + Options for the registration in IT. + """ + jp: NotRequired["RegistrationCreateParamsCountryOptionsJp"] + """ + Options for the registration in JP. + """ + ke: NotRequired["RegistrationCreateParamsCountryOptionsKe"] + """ + Options for the registration in KE. + """ + kg: NotRequired["RegistrationCreateParamsCountryOptionsKg"] + """ + Options for the registration in KG. + """ + kh: NotRequired["RegistrationCreateParamsCountryOptionsKh"] + """ + Options for the registration in KH. + """ + kr: NotRequired["RegistrationCreateParamsCountryOptionsKr"] + """ + Options for the registration in KR. + """ + kz: NotRequired["RegistrationCreateParamsCountryOptionsKz"] + """ + Options for the registration in KZ. + """ + la: NotRequired["RegistrationCreateParamsCountryOptionsLa"] + """ + Options for the registration in LA. + """ + lt: NotRequired["RegistrationCreateParamsCountryOptionsLt"] + """ + Options for the registration in LT. + """ + lu: NotRequired["RegistrationCreateParamsCountryOptionsLu"] + """ + Options for the registration in LU. + """ + lv: NotRequired["RegistrationCreateParamsCountryOptionsLv"] + """ + Options for the registration in LV. + """ + ma: NotRequired["RegistrationCreateParamsCountryOptionsMa"] + """ + Options for the registration in MA. + """ + md: NotRequired["RegistrationCreateParamsCountryOptionsMd"] + """ + Options for the registration in MD. + """ + me: NotRequired["RegistrationCreateParamsCountryOptionsMe"] + """ + Options for the registration in ME. + """ + mk: NotRequired["RegistrationCreateParamsCountryOptionsMk"] + """ + Options for the registration in MK. + """ + mr: NotRequired["RegistrationCreateParamsCountryOptionsMr"] + """ + Options for the registration in MR. + """ + mt: NotRequired["RegistrationCreateParamsCountryOptionsMt"] + """ + Options for the registration in MT. + """ + mx: NotRequired["RegistrationCreateParamsCountryOptionsMx"] + """ + Options for the registration in MX. + """ + my: NotRequired["RegistrationCreateParamsCountryOptionsMy"] + """ + Options for the registration in MY. + """ + ng: NotRequired["RegistrationCreateParamsCountryOptionsNg"] + """ + Options for the registration in NG. + """ + nl: NotRequired["RegistrationCreateParamsCountryOptionsNl"] + """ + Options for the registration in NL. + """ + no: NotRequired["RegistrationCreateParamsCountryOptionsNo"] + """ + Options for the registration in NO. + """ + np: NotRequired["RegistrationCreateParamsCountryOptionsNp"] + """ + Options for the registration in NP. + """ + nz: NotRequired["RegistrationCreateParamsCountryOptionsNz"] + """ + Options for the registration in NZ. + """ + om: NotRequired["RegistrationCreateParamsCountryOptionsOm"] + """ + Options for the registration in OM. + """ + pe: NotRequired["RegistrationCreateParamsCountryOptionsPe"] + """ + Options for the registration in PE. + """ + ph: NotRequired["RegistrationCreateParamsCountryOptionsPh"] + """ + Options for the registration in PH. + """ + pl: NotRequired["RegistrationCreateParamsCountryOptionsPl"] + """ + Options for the registration in PL. + """ + pt: NotRequired["RegistrationCreateParamsCountryOptionsPt"] + """ + Options for the registration in PT. + """ + ro: NotRequired["RegistrationCreateParamsCountryOptionsRo"] + """ + Options for the registration in RO. + """ + rs: NotRequired["RegistrationCreateParamsCountryOptionsRs"] + """ + Options for the registration in RS. + """ + ru: NotRequired["RegistrationCreateParamsCountryOptionsRu"] + """ + Options for the registration in RU. + """ + sa: NotRequired["RegistrationCreateParamsCountryOptionsSa"] + """ + Options for the registration in SA. + """ + se: NotRequired["RegistrationCreateParamsCountryOptionsSe"] + """ + Options for the registration in SE. + """ + sg: NotRequired["RegistrationCreateParamsCountryOptionsSg"] + """ + Options for the registration in SG. + """ + si: NotRequired["RegistrationCreateParamsCountryOptionsSi"] + """ + Options for the registration in SI. + """ + sk: NotRequired["RegistrationCreateParamsCountryOptionsSk"] + """ + Options for the registration in SK. + """ + sn: NotRequired["RegistrationCreateParamsCountryOptionsSn"] + """ + Options for the registration in SN. + """ + sr: NotRequired["RegistrationCreateParamsCountryOptionsSr"] + """ + Options for the registration in SR. + """ + th: NotRequired["RegistrationCreateParamsCountryOptionsTh"] + """ + Options for the registration in TH. + """ + tj: NotRequired["RegistrationCreateParamsCountryOptionsTj"] + """ + Options for the registration in TJ. + """ + tr: NotRequired["RegistrationCreateParamsCountryOptionsTr"] + """ + Options for the registration in TR. + """ + tz: NotRequired["RegistrationCreateParamsCountryOptionsTz"] + """ + Options for the registration in TZ. + """ + ua: NotRequired["RegistrationCreateParamsCountryOptionsUa"] + """ + Options for the registration in UA. + """ + ug: NotRequired["RegistrationCreateParamsCountryOptionsUg"] + """ + Options for the registration in UG. + """ + us: NotRequired["RegistrationCreateParamsCountryOptionsUs"] + """ + Options for the registration in US. + """ + uy: NotRequired["RegistrationCreateParamsCountryOptionsUy"] + """ + Options for the registration in UY. + """ + uz: NotRequired["RegistrationCreateParamsCountryOptionsUz"] + """ + Options for the registration in UZ. + """ + vn: NotRequired["RegistrationCreateParamsCountryOptionsVn"] + """ + Options for the registration in VN. + """ + za: NotRequired["RegistrationCreateParamsCountryOptionsZa"] + """ + Options for the registration in ZA. + """ + zm: NotRequired["RegistrationCreateParamsCountryOptionsZm"] + """ + Options for the registration in ZM. + """ + zw: NotRequired["RegistrationCreateParamsCountryOptionsZw"] + """ + Options for the registration in ZW. + """ + + +class RegistrationCreateParamsCountryOptionsAe(TypedDict): + standard: NotRequired["RegistrationCreateParamsCountryOptionsAeStandard"] + """ + Options for the standard registration. + """ + type: Literal["standard"] + """ + Type of registration to be created in `country`. + """ + + +class RegistrationCreateParamsCountryOptionsAeStandard(TypedDict): + place_of_supply_scheme: NotRequired[Literal["inbound_goods", "standard"]] + """ + Place of supply scheme used in an standard registration. + """ + + +class RegistrationCreateParamsCountryOptionsAl(TypedDict): + standard: NotRequired["RegistrationCreateParamsCountryOptionsAlStandard"] + """ + Options for the standard registration. + """ + type: Literal["standard"] + """ + Type of registration to be created in `country`. + """ + + +class RegistrationCreateParamsCountryOptionsAlStandard(TypedDict): + place_of_supply_scheme: NotRequired[Literal["inbound_goods", "standard"]] + """ + Place of supply scheme used in an standard registration. + """ + + +class RegistrationCreateParamsCountryOptionsAm(TypedDict): + type: Literal["simplified"] + """ + Type of registration to be created in `country`. + """ + + +class RegistrationCreateParamsCountryOptionsAo(TypedDict): + standard: NotRequired["RegistrationCreateParamsCountryOptionsAoStandard"] + """ + Options for the standard registration. + """ + type: Literal["standard"] + """ + Type of registration to be created in `country`. + """ + + +class RegistrationCreateParamsCountryOptionsAoStandard(TypedDict): + place_of_supply_scheme: NotRequired[Literal["inbound_goods", "standard"]] + """ + Place of supply scheme used in an standard registration. + """ + + +class RegistrationCreateParamsCountryOptionsAt(TypedDict): + standard: NotRequired["RegistrationCreateParamsCountryOptionsAtStandard"] + """ + Options for the standard registration. + """ + type: Literal["ioss", "oss_non_union", "oss_union", "standard"] + """ + Type of registration to be created in an EU country. + """ + + +class RegistrationCreateParamsCountryOptionsAtStandard(TypedDict): + place_of_supply_scheme: Literal[ + "inbound_goods", "small_seller", "standard" + ] + """ + Place of supply scheme used in an EU standard registration. + """ + + +class RegistrationCreateParamsCountryOptionsAu(TypedDict): + standard: NotRequired["RegistrationCreateParamsCountryOptionsAuStandard"] + """ + Options for the standard registration. + """ + type: Literal["standard"] + """ + Type of registration to be created in `country`. + """ + + +class RegistrationCreateParamsCountryOptionsAuStandard(TypedDict): + place_of_supply_scheme: NotRequired[Literal["inbound_goods", "standard"]] + """ + Place of supply scheme used in an standard registration. + """ + + +class RegistrationCreateParamsCountryOptionsAw(TypedDict): + standard: NotRequired["RegistrationCreateParamsCountryOptionsAwStandard"] + """ + Options for the standard registration. + """ + type: Literal["standard"] + """ + Type of registration to be created in `country`. + """ + + +class RegistrationCreateParamsCountryOptionsAwStandard(TypedDict): + place_of_supply_scheme: NotRequired[Literal["inbound_goods", "standard"]] + """ + Place of supply scheme used in an standard registration. + """ + + +class RegistrationCreateParamsCountryOptionsAz(TypedDict): + type: Literal["simplified"] + """ + Type of registration to be created in `country`. + """ + + +class RegistrationCreateParamsCountryOptionsBa(TypedDict): + standard: NotRequired["RegistrationCreateParamsCountryOptionsBaStandard"] + """ + Options for the standard registration. + """ + type: Literal["standard"] + """ + Type of registration to be created in `country`. + """ + + +class RegistrationCreateParamsCountryOptionsBaStandard(TypedDict): + place_of_supply_scheme: NotRequired[Literal["inbound_goods", "standard"]] + """ + Place of supply scheme used in an standard registration. + """ + + +class RegistrationCreateParamsCountryOptionsBb(TypedDict): + standard: NotRequired["RegistrationCreateParamsCountryOptionsBbStandard"] + """ + Options for the standard registration. + """ + type: Literal["standard"] + """ + Type of registration to be created in `country`. + """ + + +class RegistrationCreateParamsCountryOptionsBbStandard(TypedDict): + place_of_supply_scheme: NotRequired[Literal["inbound_goods", "standard"]] + """ + Place of supply scheme used in an standard registration. + """ + + +class RegistrationCreateParamsCountryOptionsBd(TypedDict): + standard: NotRequired["RegistrationCreateParamsCountryOptionsBdStandard"] + """ + Options for the standard registration. + """ + type: Literal["standard"] + """ + Type of registration to be created in `country`. + """ + + +class RegistrationCreateParamsCountryOptionsBdStandard(TypedDict): + place_of_supply_scheme: NotRequired[Literal["inbound_goods", "standard"]] + """ + Place of supply scheme used in an standard registration. + """ + + +class RegistrationCreateParamsCountryOptionsBe(TypedDict): + standard: NotRequired["RegistrationCreateParamsCountryOptionsBeStandard"] + """ + Options for the standard registration. + """ + type: Literal["ioss", "oss_non_union", "oss_union", "standard"] + """ + Type of registration to be created in an EU country. + """ + + +class RegistrationCreateParamsCountryOptionsBeStandard(TypedDict): + place_of_supply_scheme: Literal[ + "inbound_goods", "small_seller", "standard" + ] + """ + Place of supply scheme used in an EU standard registration. + """ + + +class RegistrationCreateParamsCountryOptionsBf(TypedDict): + standard: NotRequired["RegistrationCreateParamsCountryOptionsBfStandard"] + """ + Options for the standard registration. + """ + type: Literal["standard"] + """ + Type of registration to be created in `country`. + """ + + +class RegistrationCreateParamsCountryOptionsBfStandard(TypedDict): + place_of_supply_scheme: NotRequired[Literal["inbound_goods", "standard"]] + """ + Place of supply scheme used in an standard registration. + """ + + +class RegistrationCreateParamsCountryOptionsBg(TypedDict): + standard: NotRequired["RegistrationCreateParamsCountryOptionsBgStandard"] + """ + Options for the standard registration. + """ + type: Literal["ioss", "oss_non_union", "oss_union", "standard"] + """ + Type of registration to be created in an EU country. + """ + + +class RegistrationCreateParamsCountryOptionsBgStandard(TypedDict): + place_of_supply_scheme: Literal[ + "inbound_goods", "small_seller", "standard" + ] + """ + Place of supply scheme used in an EU standard registration. + """ + + +class RegistrationCreateParamsCountryOptionsBh(TypedDict): + standard: NotRequired["RegistrationCreateParamsCountryOptionsBhStandard"] + """ + Options for the standard registration. + """ + type: Literal["standard"] + """ + Type of registration to be created in `country`. + """ + + +class RegistrationCreateParamsCountryOptionsBhStandard(TypedDict): + place_of_supply_scheme: NotRequired[Literal["inbound_goods", "standard"]] + """ + Place of supply scheme used in an standard registration. + """ + + +class RegistrationCreateParamsCountryOptionsBj(TypedDict): + type: Literal["simplified"] + """ + Type of registration to be created in `country`. + """ + + +class RegistrationCreateParamsCountryOptionsBs(TypedDict): + standard: NotRequired["RegistrationCreateParamsCountryOptionsBsStandard"] + """ + Options for the standard registration. + """ + type: Literal["standard"] + """ + Type of registration to be created in `country`. + """ + + +class RegistrationCreateParamsCountryOptionsBsStandard(TypedDict): + place_of_supply_scheme: NotRequired[Literal["inbound_goods", "standard"]] + """ + Place of supply scheme used in an standard registration. + """ + + +class RegistrationCreateParamsCountryOptionsBy(TypedDict): + type: Literal["simplified"] + """ + Type of registration to be created in `country`. + """ + + +class RegistrationCreateParamsCountryOptionsCa(TypedDict): + province_standard: NotRequired[ + "RegistrationCreateParamsCountryOptionsCaProvinceStandard" + ] + """ + Options for the provincial tax registration. + """ + type: Literal["province_standard", "simplified", "standard"] + """ + Type of registration to be created in Canada. + """ + + +class RegistrationCreateParamsCountryOptionsCaProvinceStandard(TypedDict): + province: str + """ + Two-letter CA province code ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)). + """ + + +class RegistrationCreateParamsCountryOptionsCd(TypedDict): + standard: NotRequired["RegistrationCreateParamsCountryOptionsCdStandard"] + """ + Options for the standard registration. + """ + type: Literal["standard"] + """ + Type of registration to be created in `country`. + """ + + +class RegistrationCreateParamsCountryOptionsCdStandard(TypedDict): + place_of_supply_scheme: NotRequired[Literal["inbound_goods", "standard"]] + """ + Place of supply scheme used in an standard registration. + """ + + +class RegistrationCreateParamsCountryOptionsCh(TypedDict): + standard: NotRequired["RegistrationCreateParamsCountryOptionsChStandard"] + """ + Options for the standard registration. + """ + type: Literal["standard"] + """ + Type of registration to be created in `country`. + """ + + +class RegistrationCreateParamsCountryOptionsChStandard(TypedDict): + place_of_supply_scheme: NotRequired[Literal["inbound_goods", "standard"]] + """ + Place of supply scheme used in an standard registration. + """ + + +class RegistrationCreateParamsCountryOptionsCl(TypedDict): + type: Literal["simplified"] + """ + Type of registration to be created in `country`. + """ + + +class RegistrationCreateParamsCountryOptionsCm(TypedDict): + type: Literal["simplified"] + """ + Type of registration to be created in `country`. + """ + + +class RegistrationCreateParamsCountryOptionsCo(TypedDict): + type: Literal["simplified"] + """ + Type of registration to be created in `country`. + """ + + +class RegistrationCreateParamsCountryOptionsCr(TypedDict): + type: Literal["simplified"] + """ + Type of registration to be created in `country`. + """ + + +class RegistrationCreateParamsCountryOptionsCv(TypedDict): + type: Literal["simplified"] + """ + Type of registration to be created in `country`. + """ + + +class RegistrationCreateParamsCountryOptionsCy(TypedDict): + standard: NotRequired["RegistrationCreateParamsCountryOptionsCyStandard"] + """ + Options for the standard registration. + """ + type: Literal["ioss", "oss_non_union", "oss_union", "standard"] + """ + Type of registration to be created in an EU country. + """ + + +class RegistrationCreateParamsCountryOptionsCyStandard(TypedDict): + place_of_supply_scheme: Literal[ + "inbound_goods", "small_seller", "standard" + ] + """ + Place of supply scheme used in an EU standard registration. + """ + + +class RegistrationCreateParamsCountryOptionsCz(TypedDict): + standard: NotRequired["RegistrationCreateParamsCountryOptionsCzStandard"] + """ + Options for the standard registration. + """ + type: Literal["ioss", "oss_non_union", "oss_union", "standard"] + """ + Type of registration to be created in an EU country. + """ + + +class RegistrationCreateParamsCountryOptionsCzStandard(TypedDict): + place_of_supply_scheme: Literal[ + "inbound_goods", "small_seller", "standard" + ] + """ + Place of supply scheme used in an EU standard registration. + """ + + +class RegistrationCreateParamsCountryOptionsDe(TypedDict): + standard: NotRequired["RegistrationCreateParamsCountryOptionsDeStandard"] + """ + Options for the standard registration. + """ + type: Literal["ioss", "oss_non_union", "oss_union", "standard"] + """ + Type of registration to be created in an EU country. + """ + + +class RegistrationCreateParamsCountryOptionsDeStandard(TypedDict): + place_of_supply_scheme: Literal[ + "inbound_goods", "small_seller", "standard" + ] + """ + Place of supply scheme used in an EU standard registration. + """ + + +class RegistrationCreateParamsCountryOptionsDk(TypedDict): + standard: NotRequired["RegistrationCreateParamsCountryOptionsDkStandard"] + """ + Options for the standard registration. + """ + type: Literal["ioss", "oss_non_union", "oss_union", "standard"] + """ + Type of registration to be created in an EU country. + """ + + +class RegistrationCreateParamsCountryOptionsDkStandard(TypedDict): + place_of_supply_scheme: Literal[ + "inbound_goods", "small_seller", "standard" + ] + """ + Place of supply scheme used in an EU standard registration. + """ + + +class RegistrationCreateParamsCountryOptionsEc(TypedDict): + type: Literal["simplified"] + """ + Type of registration to be created in `country`. + """ + + +class RegistrationCreateParamsCountryOptionsEe(TypedDict): + standard: NotRequired["RegistrationCreateParamsCountryOptionsEeStandard"] + """ + Options for the standard registration. + """ + type: Literal["ioss", "oss_non_union", "oss_union", "standard"] + """ + Type of registration to be created in an EU country. + """ + + +class RegistrationCreateParamsCountryOptionsEeStandard(TypedDict): + place_of_supply_scheme: Literal[ + "inbound_goods", "small_seller", "standard" + ] + """ + Place of supply scheme used in an EU standard registration. + """ + + +class RegistrationCreateParamsCountryOptionsEg(TypedDict): + type: Literal["simplified"] + """ + Type of registration to be created in `country`. + """ + + +class RegistrationCreateParamsCountryOptionsEs(TypedDict): + standard: NotRequired["RegistrationCreateParamsCountryOptionsEsStandard"] + """ + Options for the standard registration. + """ + type: Literal["ioss", "oss_non_union", "oss_union", "standard"] + """ + Type of registration to be created in an EU country. + """ + + +class RegistrationCreateParamsCountryOptionsEsStandard(TypedDict): + place_of_supply_scheme: Literal[ + "inbound_goods", "small_seller", "standard" + ] + """ + Place of supply scheme used in an EU standard registration. + """ + + +class RegistrationCreateParamsCountryOptionsEt(TypedDict): + standard: NotRequired["RegistrationCreateParamsCountryOptionsEtStandard"] + """ + Options for the standard registration. + """ + type: Literal["standard"] + """ + Type of registration to be created in `country`. + """ + + +class RegistrationCreateParamsCountryOptionsEtStandard(TypedDict): + place_of_supply_scheme: NotRequired[Literal["inbound_goods", "standard"]] + """ + Place of supply scheme used in an standard registration. + """ + + +class RegistrationCreateParamsCountryOptionsFi(TypedDict): + standard: NotRequired["RegistrationCreateParamsCountryOptionsFiStandard"] + """ + Options for the standard registration. + """ + type: Literal["ioss", "oss_non_union", "oss_union", "standard"] + """ + Type of registration to be created in an EU country. + """ + + +class RegistrationCreateParamsCountryOptionsFiStandard(TypedDict): + place_of_supply_scheme: Literal[ + "inbound_goods", "small_seller", "standard" + ] + """ + Place of supply scheme used in an EU standard registration. + """ + + +class RegistrationCreateParamsCountryOptionsFr(TypedDict): + standard: NotRequired["RegistrationCreateParamsCountryOptionsFrStandard"] + """ + Options for the standard registration. + """ + type: Literal["ioss", "oss_non_union", "oss_union", "standard"] + """ + Type of registration to be created in an EU country. + """ + + +class RegistrationCreateParamsCountryOptionsFrStandard(TypedDict): + place_of_supply_scheme: Literal[ + "inbound_goods", "small_seller", "standard" + ] + """ + Place of supply scheme used in an EU standard registration. + """ + + +class RegistrationCreateParamsCountryOptionsGb(TypedDict): + standard: NotRequired["RegistrationCreateParamsCountryOptionsGbStandard"] + """ + Options for the standard registration. + """ + type: Literal["standard"] + """ + Type of registration to be created in `country`. + """ + + +class RegistrationCreateParamsCountryOptionsGbStandard(TypedDict): + place_of_supply_scheme: NotRequired[Literal["inbound_goods", "standard"]] + """ + Place of supply scheme used in an standard registration. + """ + + +class RegistrationCreateParamsCountryOptionsGe(TypedDict): + type: Literal["simplified"] + """ + Type of registration to be created in `country`. + """ + + +class RegistrationCreateParamsCountryOptionsGn(TypedDict): + standard: NotRequired["RegistrationCreateParamsCountryOptionsGnStandard"] + """ + Options for the standard registration. + """ + type: Literal["standard"] + """ + Type of registration to be created in `country`. + """ + + +class RegistrationCreateParamsCountryOptionsGnStandard(TypedDict): + place_of_supply_scheme: NotRequired[Literal["inbound_goods", "standard"]] + """ + Place of supply scheme used in an standard registration. + """ + + +class RegistrationCreateParamsCountryOptionsGr(TypedDict): + standard: NotRequired["RegistrationCreateParamsCountryOptionsGrStandard"] + """ + Options for the standard registration. + """ + type: Literal["ioss", "oss_non_union", "oss_union", "standard"] + """ + Type of registration to be created in an EU country. + """ + + +class RegistrationCreateParamsCountryOptionsGrStandard(TypedDict): + place_of_supply_scheme: Literal[ + "inbound_goods", "small_seller", "standard" + ] + """ + Place of supply scheme used in an EU standard registration. + """ + + +class RegistrationCreateParamsCountryOptionsHr(TypedDict): + standard: NotRequired["RegistrationCreateParamsCountryOptionsHrStandard"] + """ + Options for the standard registration. + """ + type: Literal["ioss", "oss_non_union", "oss_union", "standard"] + """ + Type of registration to be created in an EU country. + """ + + +class RegistrationCreateParamsCountryOptionsHrStandard(TypedDict): + place_of_supply_scheme: Literal[ + "inbound_goods", "small_seller", "standard" + ] + """ + Place of supply scheme used in an EU standard registration. + """ + + +class RegistrationCreateParamsCountryOptionsHu(TypedDict): + standard: NotRequired["RegistrationCreateParamsCountryOptionsHuStandard"] + """ + Options for the standard registration. + """ + type: Literal["ioss", "oss_non_union", "oss_union", "standard"] + """ + Type of registration to be created in an EU country. + """ + + +class RegistrationCreateParamsCountryOptionsHuStandard(TypedDict): + place_of_supply_scheme: Literal[ + "inbound_goods", "small_seller", "standard" + ] + """ + Place of supply scheme used in an EU standard registration. + """ + + +class RegistrationCreateParamsCountryOptionsId(TypedDict): + type: Literal["simplified"] + """ + Type of registration to be created in `country`. + """ + + +class RegistrationCreateParamsCountryOptionsIe(TypedDict): + standard: NotRequired["RegistrationCreateParamsCountryOptionsIeStandard"] + """ + Options for the standard registration. + """ + type: Literal["ioss", "oss_non_union", "oss_union", "standard"] + """ + Type of registration to be created in an EU country. + """ + + +class RegistrationCreateParamsCountryOptionsIeStandard(TypedDict): + place_of_supply_scheme: Literal[ + "inbound_goods", "small_seller", "standard" + ] + """ + Place of supply scheme used in an EU standard registration. + """ + + +class RegistrationCreateParamsCountryOptionsIn(TypedDict): + type: Literal["simplified"] + """ + Type of registration to be created in `country`. + """ + + +class RegistrationCreateParamsCountryOptionsIs(TypedDict): + standard: NotRequired["RegistrationCreateParamsCountryOptionsIsStandard"] + """ + Options for the standard registration. + """ + type: Literal["standard"] + """ + Type of registration to be created in `country`. + """ + + +class RegistrationCreateParamsCountryOptionsIsStandard(TypedDict): + place_of_supply_scheme: NotRequired[Literal["inbound_goods", "standard"]] + """ + Place of supply scheme used in an standard registration. + """ + + +class RegistrationCreateParamsCountryOptionsIt(TypedDict): + standard: NotRequired["RegistrationCreateParamsCountryOptionsItStandard"] + """ + Options for the standard registration. + """ + type: Literal["ioss", "oss_non_union", "oss_union", "standard"] + """ + Type of registration to be created in an EU country. + """ + + +class RegistrationCreateParamsCountryOptionsItStandard(TypedDict): + place_of_supply_scheme: Literal[ + "inbound_goods", "small_seller", "standard" + ] + """ + Place of supply scheme used in an EU standard registration. + """ + + +class RegistrationCreateParamsCountryOptionsJp(TypedDict): + standard: NotRequired["RegistrationCreateParamsCountryOptionsJpStandard"] + """ + Options for the standard registration. + """ + type: Literal["standard"] + """ + Type of registration to be created in `country`. + """ + + +class RegistrationCreateParamsCountryOptionsJpStandard(TypedDict): + place_of_supply_scheme: NotRequired[Literal["inbound_goods", "standard"]] + """ + Place of supply scheme used in an standard registration. + """ + + +class RegistrationCreateParamsCountryOptionsKe(TypedDict): + type: Literal["simplified"] + """ + Type of registration to be created in `country`. + """ + + +class RegistrationCreateParamsCountryOptionsKg(TypedDict): + type: Literal["simplified"] + """ + Type of registration to be created in `country`. + """ + + +class RegistrationCreateParamsCountryOptionsKh(TypedDict): + type: Literal["simplified"] + """ + Type of registration to be created in `country`. + """ + + +class RegistrationCreateParamsCountryOptionsKr(TypedDict): + type: Literal["simplified"] + """ + Type of registration to be created in `country`. + """ + + +class RegistrationCreateParamsCountryOptionsKz(TypedDict): + type: Literal["simplified"] + """ + Type of registration to be created in `country`. + """ + + +class RegistrationCreateParamsCountryOptionsLa(TypedDict): + type: Literal["simplified"] + """ + Type of registration to be created in `country`. + """ + + +class RegistrationCreateParamsCountryOptionsLt(TypedDict): + standard: NotRequired["RegistrationCreateParamsCountryOptionsLtStandard"] + """ + Options for the standard registration. + """ + type: Literal["ioss", "oss_non_union", "oss_union", "standard"] + """ + Type of registration to be created in an EU country. + """ + + +class RegistrationCreateParamsCountryOptionsLtStandard(TypedDict): + place_of_supply_scheme: Literal[ + "inbound_goods", "small_seller", "standard" + ] + """ + Place of supply scheme used in an EU standard registration. + """ + + +class RegistrationCreateParamsCountryOptionsLu(TypedDict): + standard: NotRequired["RegistrationCreateParamsCountryOptionsLuStandard"] + """ + Options for the standard registration. + """ + type: Literal["ioss", "oss_non_union", "oss_union", "standard"] + """ + Type of registration to be created in an EU country. + """ + + +class RegistrationCreateParamsCountryOptionsLuStandard(TypedDict): + place_of_supply_scheme: Literal[ + "inbound_goods", "small_seller", "standard" + ] + """ + Place of supply scheme used in an EU standard registration. + """ + + +class RegistrationCreateParamsCountryOptionsLv(TypedDict): + standard: NotRequired["RegistrationCreateParamsCountryOptionsLvStandard"] + """ + Options for the standard registration. + """ + type: Literal["ioss", "oss_non_union", "oss_union", "standard"] + """ + Type of registration to be created in an EU country. + """ + + +class RegistrationCreateParamsCountryOptionsLvStandard(TypedDict): + place_of_supply_scheme: Literal[ + "inbound_goods", "small_seller", "standard" + ] + """ + Place of supply scheme used in an EU standard registration. + """ + + +class RegistrationCreateParamsCountryOptionsMa(TypedDict): + type: Literal["simplified"] + """ + Type of registration to be created in `country`. + """ + + +class RegistrationCreateParamsCountryOptionsMd(TypedDict): + type: Literal["simplified"] + """ + Type of registration to be created in `country`. + """ + + +class RegistrationCreateParamsCountryOptionsMe(TypedDict): + standard: NotRequired["RegistrationCreateParamsCountryOptionsMeStandard"] + """ + Options for the standard registration. + """ + type: Literal["standard"] + """ + Type of registration to be created in `country`. + """ + + +class RegistrationCreateParamsCountryOptionsMeStandard(TypedDict): + place_of_supply_scheme: NotRequired[Literal["inbound_goods", "standard"]] + """ + Place of supply scheme used in an standard registration. + """ + + +class RegistrationCreateParamsCountryOptionsMk(TypedDict): + standard: NotRequired["RegistrationCreateParamsCountryOptionsMkStandard"] + """ + Options for the standard registration. + """ + type: Literal["standard"] + """ + Type of registration to be created in `country`. + """ + + +class RegistrationCreateParamsCountryOptionsMkStandard(TypedDict): + place_of_supply_scheme: NotRequired[Literal["inbound_goods", "standard"]] + """ + Place of supply scheme used in an standard registration. + """ + + +class RegistrationCreateParamsCountryOptionsMr(TypedDict): + standard: NotRequired["RegistrationCreateParamsCountryOptionsMrStandard"] + """ + Options for the standard registration. + """ + type: Literal["standard"] + """ + Type of registration to be created in `country`. + """ + + +class RegistrationCreateParamsCountryOptionsMrStandard(TypedDict): + place_of_supply_scheme: NotRequired[Literal["inbound_goods", "standard"]] + """ + Place of supply scheme used in an standard registration. + """ + + +class RegistrationCreateParamsCountryOptionsMt(TypedDict): + standard: NotRequired["RegistrationCreateParamsCountryOptionsMtStandard"] + """ + Options for the standard registration. + """ + type: Literal["ioss", "oss_non_union", "oss_union", "standard"] + """ + Type of registration to be created in an EU country. + """ + + +class RegistrationCreateParamsCountryOptionsMtStandard(TypedDict): + place_of_supply_scheme: Literal[ + "inbound_goods", "small_seller", "standard" + ] + """ + Place of supply scheme used in an EU standard registration. + """ + + +class RegistrationCreateParamsCountryOptionsMx(TypedDict): + type: Literal["simplified"] + """ + Type of registration to be created in `country`. + """ + + +class RegistrationCreateParamsCountryOptionsMy(TypedDict): + type: Literal["simplified"] + """ + Type of registration to be created in `country`. + """ + + +class RegistrationCreateParamsCountryOptionsNg(TypedDict): + type: Literal["simplified"] + """ + Type of registration to be created in `country`. + """ + + +class RegistrationCreateParamsCountryOptionsNl(TypedDict): + standard: NotRequired["RegistrationCreateParamsCountryOptionsNlStandard"] + """ + Options for the standard registration. + """ + type: Literal["ioss", "oss_non_union", "oss_union", "standard"] + """ + Type of registration to be created in an EU country. + """ + + +class RegistrationCreateParamsCountryOptionsNlStandard(TypedDict): + place_of_supply_scheme: Literal[ + "inbound_goods", "small_seller", "standard" + ] + """ + Place of supply scheme used in an EU standard registration. + """ + + +class RegistrationCreateParamsCountryOptionsNo(TypedDict): + standard: NotRequired["RegistrationCreateParamsCountryOptionsNoStandard"] + """ + Options for the standard registration. + """ + type: Literal["standard"] + """ + Type of registration to be created in `country`. + """ + + +class RegistrationCreateParamsCountryOptionsNoStandard(TypedDict): + place_of_supply_scheme: NotRequired[Literal["inbound_goods", "standard"]] + """ + Place of supply scheme used in an standard registration. + """ + + +class RegistrationCreateParamsCountryOptionsNp(TypedDict): + type: Literal["simplified"] + """ + Type of registration to be created in `country`. + """ + + +class RegistrationCreateParamsCountryOptionsNz(TypedDict): + standard: NotRequired["RegistrationCreateParamsCountryOptionsNzStandard"] + """ + Options for the standard registration. + """ + type: Literal["standard"] + """ + Type of registration to be created in `country`. + """ + + +class RegistrationCreateParamsCountryOptionsNzStandard(TypedDict): + place_of_supply_scheme: NotRequired[Literal["inbound_goods", "standard"]] + """ + Place of supply scheme used in an standard registration. + """ + + +class RegistrationCreateParamsCountryOptionsOm(TypedDict): + standard: NotRequired["RegistrationCreateParamsCountryOptionsOmStandard"] + """ + Options for the standard registration. + """ + type: Literal["standard"] + """ + Type of registration to be created in `country`. + """ + + +class RegistrationCreateParamsCountryOptionsOmStandard(TypedDict): + place_of_supply_scheme: NotRequired[Literal["inbound_goods", "standard"]] + """ + Place of supply scheme used in an standard registration. + """ + + +class RegistrationCreateParamsCountryOptionsPe(TypedDict): + type: Literal["simplified"] + """ + Type of registration to be created in `country`. + """ + + +class RegistrationCreateParamsCountryOptionsPh(TypedDict): + type: Literal["simplified"] + """ + Type of registration to be created in `country`. + """ + + +class RegistrationCreateParamsCountryOptionsPl(TypedDict): + standard: NotRequired["RegistrationCreateParamsCountryOptionsPlStandard"] + """ + Options for the standard registration. + """ + type: Literal["ioss", "oss_non_union", "oss_union", "standard"] + """ + Type of registration to be created in an EU country. + """ + + +class RegistrationCreateParamsCountryOptionsPlStandard(TypedDict): + place_of_supply_scheme: Literal[ + "inbound_goods", "small_seller", "standard" + ] + """ + Place of supply scheme used in an EU standard registration. + """ + + +class RegistrationCreateParamsCountryOptionsPt(TypedDict): + standard: NotRequired["RegistrationCreateParamsCountryOptionsPtStandard"] + """ + Options for the standard registration. + """ + type: Literal["ioss", "oss_non_union", "oss_union", "standard"] + """ + Type of registration to be created in an EU country. + """ + + +class RegistrationCreateParamsCountryOptionsPtStandard(TypedDict): + place_of_supply_scheme: Literal[ + "inbound_goods", "small_seller", "standard" + ] + """ + Place of supply scheme used in an EU standard registration. + """ + + +class RegistrationCreateParamsCountryOptionsRo(TypedDict): + standard: NotRequired["RegistrationCreateParamsCountryOptionsRoStandard"] + """ + Options for the standard registration. + """ + type: Literal["ioss", "oss_non_union", "oss_union", "standard"] + """ + Type of registration to be created in an EU country. + """ + + +class RegistrationCreateParamsCountryOptionsRoStandard(TypedDict): + place_of_supply_scheme: Literal[ + "inbound_goods", "small_seller", "standard" + ] + """ + Place of supply scheme used in an EU standard registration. + """ + + +class RegistrationCreateParamsCountryOptionsRs(TypedDict): + standard: NotRequired["RegistrationCreateParamsCountryOptionsRsStandard"] + """ + Options for the standard registration. + """ + type: Literal["standard"] + """ + Type of registration to be created in `country`. + """ + + +class RegistrationCreateParamsCountryOptionsRsStandard(TypedDict): + place_of_supply_scheme: NotRequired[Literal["inbound_goods", "standard"]] + """ + Place of supply scheme used in an standard registration. + """ + + +class RegistrationCreateParamsCountryOptionsRu(TypedDict): + type: Literal["simplified"] + """ + Type of registration to be created in `country`. + """ + + +class RegistrationCreateParamsCountryOptionsSa(TypedDict): + type: Literal["simplified"] + """ + Type of registration to be created in `country`. + """ + + +class RegistrationCreateParamsCountryOptionsSe(TypedDict): + standard: NotRequired["RegistrationCreateParamsCountryOptionsSeStandard"] + """ + Options for the standard registration. + """ + type: Literal["ioss", "oss_non_union", "oss_union", "standard"] + """ + Type of registration to be created in an EU country. + """ + + +class RegistrationCreateParamsCountryOptionsSeStandard(TypedDict): + place_of_supply_scheme: Literal[ + "inbound_goods", "small_seller", "standard" + ] + """ + Place of supply scheme used in an EU standard registration. + """ + + +class RegistrationCreateParamsCountryOptionsSg(TypedDict): + standard: NotRequired["RegistrationCreateParamsCountryOptionsSgStandard"] + """ + Options for the standard registration. + """ + type: Literal["standard"] + """ + Type of registration to be created in `country`. + """ + + +class RegistrationCreateParamsCountryOptionsSgStandard(TypedDict): + place_of_supply_scheme: NotRequired[Literal["inbound_goods", "standard"]] + """ + Place of supply scheme used in an standard registration. + """ + + +class RegistrationCreateParamsCountryOptionsSi(TypedDict): + standard: NotRequired["RegistrationCreateParamsCountryOptionsSiStandard"] + """ + Options for the standard registration. + """ + type: Literal["ioss", "oss_non_union", "oss_union", "standard"] + """ + Type of registration to be created in an EU country. + """ + + +class RegistrationCreateParamsCountryOptionsSiStandard(TypedDict): + place_of_supply_scheme: Literal[ + "inbound_goods", "small_seller", "standard" + ] + """ + Place of supply scheme used in an EU standard registration. + """ + + +class RegistrationCreateParamsCountryOptionsSk(TypedDict): + standard: NotRequired["RegistrationCreateParamsCountryOptionsSkStandard"] + """ + Options for the standard registration. + """ + type: Literal["ioss", "oss_non_union", "oss_union", "standard"] + """ + Type of registration to be created in an EU country. + """ + + +class RegistrationCreateParamsCountryOptionsSkStandard(TypedDict): + place_of_supply_scheme: Literal[ + "inbound_goods", "small_seller", "standard" + ] + """ + Place of supply scheme used in an EU standard registration. + """ + + +class RegistrationCreateParamsCountryOptionsSn(TypedDict): + type: Literal["simplified"] + """ + Type of registration to be created in `country`. + """ + + +class RegistrationCreateParamsCountryOptionsSr(TypedDict): + standard: NotRequired["RegistrationCreateParamsCountryOptionsSrStandard"] + """ + Options for the standard registration. + """ + type: Literal["standard"] + """ + Type of registration to be created in `country`. + """ + + +class RegistrationCreateParamsCountryOptionsSrStandard(TypedDict): + place_of_supply_scheme: NotRequired[Literal["inbound_goods", "standard"]] + """ + Place of supply scheme used in an standard registration. + """ + + +class RegistrationCreateParamsCountryOptionsTh(TypedDict): + type: Literal["simplified"] + """ + Type of registration to be created in `country`. + """ + + +class RegistrationCreateParamsCountryOptionsTj(TypedDict): + type: Literal["simplified"] + """ + Type of registration to be created in `country`. + """ + + +class RegistrationCreateParamsCountryOptionsTr(TypedDict): + type: Literal["simplified"] + """ + Type of registration to be created in `country`. + """ + + +class RegistrationCreateParamsCountryOptionsTz(TypedDict): + type: Literal["simplified"] + """ + Type of registration to be created in `country`. + """ + + +class RegistrationCreateParamsCountryOptionsUa(TypedDict): + type: Literal["simplified"] + """ + Type of registration to be created in `country`. + """ + + +class RegistrationCreateParamsCountryOptionsUg(TypedDict): + type: Literal["simplified"] + """ + Type of registration to be created in `country`. + """ + + +class RegistrationCreateParamsCountryOptionsUs(TypedDict): + local_amusement_tax: NotRequired[ + "RegistrationCreateParamsCountryOptionsUsLocalAmusementTax" + ] + """ + Options for the local amusement tax registration. + """ + local_lease_tax: NotRequired[ + "RegistrationCreateParamsCountryOptionsUsLocalLeaseTax" + ] + """ + Options for the local lease tax registration. + """ + state: str + """ + Two-letter US state code ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)). + """ + state_sales_tax: NotRequired[ + "RegistrationCreateParamsCountryOptionsUsStateSalesTax" + ] + """ + Options for the state sales tax registration. + """ + type: Literal[ + "local_amusement_tax", + "local_lease_tax", + "state_communications_tax", + "state_retail_delivery_fee", + "state_sales_tax", + ] + """ + Type of registration to be created in the US. + """ + + +class RegistrationCreateParamsCountryOptionsUsLocalAmusementTax(TypedDict): + jurisdiction: str + """ + A [FIPS code](https://www.census.gov/library/reference/code-lists/ansi.html) representing the local jurisdiction. Supported FIPS codes are: `14000` (Chicago), `06613` (Bloomington), `21696` (East Dundee), `24582` (Evanston), `45421` (Lynwood), `48892` (Midlothian), `64343` (River Grove), and `68081` (Schiller Park). + """ + + +class RegistrationCreateParamsCountryOptionsUsLocalLeaseTax(TypedDict): + jurisdiction: str + """ + A [FIPS code](https://www.census.gov/library/reference/code-lists/ansi.html) representing the local jurisdiction. Supported FIPS codes are: `14000` (Chicago). + """ + + +class RegistrationCreateParamsCountryOptionsUsStateSalesTax(TypedDict): + elections: List[ + "RegistrationCreateParamsCountryOptionsUsStateSalesTaxElection" + ] + """ + Elections for the state sales tax registration. + """ + + +class RegistrationCreateParamsCountryOptionsUsStateSalesTaxElection(TypedDict): + jurisdiction: NotRequired[str] + """ + A [FIPS code](https://www.census.gov/library/reference/code-lists/ansi.html) representing the local jurisdiction. Supported FIPS codes are: `003` (Allegheny County) and `60000` (Philadelphia City). + """ + type: Literal[ + "local_use_tax", "simplified_sellers_use_tax", "single_local_use_tax" + ] + """ + The type of the election for the state sales tax registration. + """ + + +class RegistrationCreateParamsCountryOptionsUy(TypedDict): + standard: NotRequired["RegistrationCreateParamsCountryOptionsUyStandard"] + """ + Options for the standard registration. + """ + type: Literal["standard"] + """ + Type of registration to be created in `country`. + """ + + +class RegistrationCreateParamsCountryOptionsUyStandard(TypedDict): + place_of_supply_scheme: NotRequired[Literal["inbound_goods", "standard"]] + """ + Place of supply scheme used in an standard registration. + """ + + +class RegistrationCreateParamsCountryOptionsUz(TypedDict): + type: Literal["simplified"] + """ + Type of registration to be created in `country`. + """ + + +class RegistrationCreateParamsCountryOptionsVn(TypedDict): + type: Literal["simplified"] + """ + Type of registration to be created in `country`. + """ + + +class RegistrationCreateParamsCountryOptionsZa(TypedDict): + standard: NotRequired["RegistrationCreateParamsCountryOptionsZaStandard"] + """ + Options for the standard registration. + """ + type: Literal["standard"] + """ + Type of registration to be created in `country`. + """ + + +class RegistrationCreateParamsCountryOptionsZaStandard(TypedDict): + place_of_supply_scheme: NotRequired[Literal["inbound_goods", "standard"]] + """ + Place of supply scheme used in an standard registration. + """ + + +class RegistrationCreateParamsCountryOptionsZm(TypedDict): + type: Literal["simplified"] + """ + Type of registration to be created in `country`. + """ + + +class RegistrationCreateParamsCountryOptionsZw(TypedDict): + standard: NotRequired["RegistrationCreateParamsCountryOptionsZwStandard"] + """ + Options for the standard registration. + """ + type: Literal["standard"] + """ + Type of registration to be created in `country`. + """ + + +class RegistrationCreateParamsCountryOptionsZwStandard(TypedDict): + place_of_supply_scheme: NotRequired[Literal["inbound_goods", "standard"]] + """ + Place of supply scheme used in an standard registration. + """ diff --git a/stripe/params/tax/_registration_list_params.py b/stripe/params/tax/_registration_list_params.py new file mode 100644 index 000000000..7573e1e6b --- /dev/null +++ b/stripe/params/tax/_registration_list_params.py @@ -0,0 +1,28 @@ +# -*- 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 RegistrationListParams(RequestOptions): + 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. + """ + status: NotRequired[Literal["active", "all", "expired", "scheduled"]] + """ + The status of the Tax Registration. + """ diff --git a/stripe/params/tax/_registration_modify_params.py b/stripe/params/tax/_registration_modify_params.py new file mode 100644 index 000000000..30bbc04ff --- /dev/null +++ b/stripe/params/tax/_registration_modify_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 RegistrationModifyParams(RequestOptions): + active_from: NotRequired["Literal['now']|int"] + """ + Time at which the registration becomes active. It can be either `now` to indicate the current time, or a timestamp measured in seconds since the Unix epoch. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + expires_at: NotRequired["Literal['']|Literal['now']|int"] + """ + If set, the registration stops being active at this time. If not set, the registration will be active indefinitely. It can be either `now` to indicate the current time, or a timestamp measured in seconds since the Unix epoch. + """ diff --git a/stripe/params/tax/_registration_retrieve_params.py b/stripe/params/tax/_registration_retrieve_params.py new file mode 100644 index 000000000..63ce76072 --- /dev/null +++ b/stripe/params/tax/_registration_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 RegistrationRetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/tax/_registration_update_params.py b/stripe/params/tax/_registration_update_params.py new file mode 100644 index 000000000..4d8240076 --- /dev/null +++ b/stripe/params/tax/_registration_update_params.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import Literal, NotRequired, TypedDict + + +class RegistrationUpdateParams(TypedDict): + active_from: NotRequired["Literal['now']|int"] + """ + Time at which the registration becomes active. It can be either `now` to indicate the current time, or a timestamp measured in seconds since the Unix epoch. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + expires_at: NotRequired["Literal['']|Literal['now']|int"] + """ + If set, the registration stops being active at this time. If not set, the registration will be active indefinitely. It can be either `now` to indicate the current time, or a timestamp measured in seconds since the Unix epoch. + """ diff --git a/stripe/params/tax/_settings_modify_params.py b/stripe/params/tax/_settings_modify_params.py new file mode 100644 index 000000000..52f9780f1 --- /dev/null +++ b/stripe/params/tax/_settings_modify_params.py @@ -0,0 +1,67 @@ +# -*- 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, TypedDict + + +class SettingsModifyParams(RequestOptions): + defaults: NotRequired["SettingsModifyParamsDefaults"] + """ + Default configuration to be used on Stripe Tax calculations. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + head_office: NotRequired["SettingsModifyParamsHeadOffice"] + """ + The place where your business is located. + """ + + +class SettingsModifyParamsDefaults(TypedDict): + tax_behavior: NotRequired[ + Literal["exclusive", "inclusive", "inferred_by_currency"] + ] + """ + Specifies the default [tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#tax-behavior) to be used when the item's price has unspecified tax behavior. One of inclusive, exclusive, or inferred_by_currency. Once specified, it cannot be changed back to null. + """ + tax_code: NotRequired[str] + """ + A [tax code](https://stripe.com/docs/tax/tax-categories) ID. + """ + + +class SettingsModifyParamsHeadOffice(TypedDict): + address: "SettingsModifyParamsHeadOfficeAddress" + """ + The location of the business for tax purposes. + """ + + +class SettingsModifyParamsHeadOfficeAddress(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/province as an [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) subdivision code, without country prefix, such as "NY" or "TX". + """ diff --git a/stripe/params/tax/_settings_retrieve_params.py b/stripe/params/tax/_settings_retrieve_params.py new file mode 100644 index 000000000..2d136233d --- /dev/null +++ b/stripe/params/tax/_settings_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 SettingsRetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/tax/_settings_update_params.py b/stripe/params/tax/_settings_update_params.py new file mode 100644 index 000000000..1d0bb94a1 --- /dev/null +++ b/stripe/params/tax/_settings_update_params.py @@ -0,0 +1,66 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import Literal, NotRequired, TypedDict + + +class SettingsUpdateParams(TypedDict): + defaults: NotRequired["SettingsUpdateParamsDefaults"] + """ + Default configuration to be used on Stripe Tax calculations. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + head_office: NotRequired["SettingsUpdateParamsHeadOffice"] + """ + The place where your business is located. + """ + + +class SettingsUpdateParamsDefaults(TypedDict): + tax_behavior: NotRequired[ + Literal["exclusive", "inclusive", "inferred_by_currency"] + ] + """ + Specifies the default [tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#tax-behavior) to be used when the item's price has unspecified tax behavior. One of inclusive, exclusive, or inferred_by_currency. Once specified, it cannot be changed back to null. + """ + tax_code: NotRequired[str] + """ + A [tax code](https://stripe.com/docs/tax/tax-categories) ID. + """ + + +class SettingsUpdateParamsHeadOffice(TypedDict): + address: "SettingsUpdateParamsHeadOfficeAddress" + """ + The location of the business for tax purposes. + """ + + +class SettingsUpdateParamsHeadOfficeAddress(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/province as an [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) subdivision code, without country prefix, such as "NY" or "TX". + """ diff --git a/stripe/params/tax/_transaction_create_from_calculation_params.py b/stripe/params/tax/_transaction_create_from_calculation_params.py new file mode 100644 index 000000000..233bb0f08 --- /dev/null +++ b/stripe/params/tax/_transaction_create_from_calculation_params.py @@ -0,0 +1,28 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import NotRequired + + +class TransactionCreateFromCalculationParams(RequestOptions): + calculation: str + """ + Tax Calculation ID to be used as input when creating the transaction. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + posted_at: NotRequired[int] + """ + The Unix timestamp representing when the tax liability is assumed or reduced, which determines the liability posting period and handling in tax liability reports. The timestamp must fall within the `tax_date` and the current time, unless the `tax_date` is scheduled in advance. Defaults to the current time. + """ + reference: str + """ + A custom order or sale identifier, such as 'myOrder_123'. Must be unique across all transactions, including reversals. + """ diff --git a/stripe/params/tax/_transaction_create_reversal_params.py b/stripe/params/tax/_transaction_create_reversal_params.py new file mode 100644 index 000000000..a86a4b2cd --- /dev/null +++ b/stripe/params/tax/_transaction_create_reversal_params.py @@ -0,0 +1,78 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class TransactionCreateReversalParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + flat_amount: NotRequired[int] + """ + A flat amount to reverse across the entire transaction, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) in negative. This value represents the total amount to refund from the transaction, including taxes. + """ + line_items: NotRequired[List["TransactionCreateReversalParamsLineItem"]] + """ + The line item amounts to reverse. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + mode: Literal["full", "partial"] + """ + If `partial`, the provided line item or shipping cost amounts are reversed. If `full`, the original transaction is fully reversed. + """ + original_transaction: str + """ + The ID of the Transaction to partially or fully reverse. + """ + reference: str + """ + A custom identifier for this reversal, such as `myOrder_123-refund_1`, which must be unique across all transactions. The reference helps identify this reversal transaction in exported [tax reports](https://stripe.com/docs/tax/reports). + """ + shipping_cost: NotRequired["TransactionCreateReversalParamsShippingCost"] + """ + The shipping cost to reverse. + """ + + +class TransactionCreateReversalParamsLineItem(TypedDict): + amount: int + """ + The amount to reverse, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) in negative. + """ + amount_tax: int + """ + The amount of tax to reverse, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) in negative. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + """ + original_line_item: str + """ + The `id` of the line item to reverse in the original transaction. + """ + quantity: NotRequired[int] + """ + The quantity reversed. Appears in [tax exports](https://stripe.com/docs/tax/reports), but does not affect the amount of tax reversed. + """ + reference: str + """ + A custom identifier for this line item in the reversal transaction, such as 'L1-refund'. + """ + + +class TransactionCreateReversalParamsShippingCost(TypedDict): + amount: int + """ + The amount to reverse, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) in negative. + """ + amount_tax: int + """ + The amount of tax to reverse, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) in negative. + """ diff --git a/stripe/params/tax/_transaction_line_item_list_params.py b/stripe/params/tax/_transaction_line_item_list_params.py new file mode 100644 index 000000000..03900a6e5 --- /dev/null +++ b/stripe/params/tax/_transaction_line_item_list_params.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import NotRequired, TypedDict + + +class TransactionLineItemListParams(TypedDict): + 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. + """ diff --git a/stripe/params/tax/_transaction_list_line_items_params.py b/stripe/params/tax/_transaction_list_line_items_params.py new file mode 100644 index 000000000..bd1d9ab6f --- /dev/null +++ b/stripe/params/tax/_transaction_list_line_items_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 TransactionListLineItemsParams(RequestOptions): + 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. + """ diff --git a/stripe/params/tax/_transaction_retrieve_params.py b/stripe/params/tax/_transaction_retrieve_params.py new file mode 100644 index 000000000..07744dd96 --- /dev/null +++ b/stripe/params/tax/_transaction_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 TransactionRetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/terminal/__init__.py b/stripe/params/terminal/__init__.py new file mode 100644 index 000000000..00a874686 --- /dev/null +++ b/stripe/params/terminal/__init__.py @@ -0,0 +1,98 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe.params.terminal._configuration_create_params import ( + ConfigurationCreateParams as ConfigurationCreateParams, +) +from stripe.params.terminal._configuration_delete_params import ( + ConfigurationDeleteParams as ConfigurationDeleteParams, +) +from stripe.params.terminal._configuration_list_params import ( + ConfigurationListParams as ConfigurationListParams, +) +from stripe.params.terminal._configuration_modify_params import ( + ConfigurationModifyParams as ConfigurationModifyParams, +) +from stripe.params.terminal._configuration_retrieve_params import ( + ConfigurationRetrieveParams as ConfigurationRetrieveParams, +) +from stripe.params.terminal._configuration_update_params import ( + ConfigurationUpdateParams as ConfigurationUpdateParams, +) +from stripe.params.terminal._connection_token_create_params import ( + ConnectionTokenCreateParams as ConnectionTokenCreateParams, +) +from stripe.params.terminal._location_create_params import ( + LocationCreateParams as LocationCreateParams, +) +from stripe.params.terminal._location_delete_params import ( + LocationDeleteParams as LocationDeleteParams, +) +from stripe.params.terminal._location_list_params import ( + LocationListParams as LocationListParams, +) +from stripe.params.terminal._location_modify_params import ( + LocationModifyParams as LocationModifyParams, +) +from stripe.params.terminal._location_retrieve_params import ( + LocationRetrieveParams as LocationRetrieveParams, +) +from stripe.params.terminal._location_update_params import ( + LocationUpdateParams as LocationUpdateParams, +) +from stripe.params.terminal._onboarding_link_create_params import ( + OnboardingLinkCreateParams as OnboardingLinkCreateParams, +) +from stripe.params.terminal._reader_cancel_action_params import ( + ReaderCancelActionParams as ReaderCancelActionParams, +) +from stripe.params.terminal._reader_collect_inputs_params import ( + ReaderCollectInputsParams as ReaderCollectInputsParams, +) +from stripe.params.terminal._reader_collect_payment_method_params import ( + ReaderCollectPaymentMethodParams as ReaderCollectPaymentMethodParams, +) +from stripe.params.terminal._reader_collected_data_retrieve_params import ( + ReaderCollectedDataRetrieveParams as ReaderCollectedDataRetrieveParams, +) +from stripe.params.terminal._reader_confirm_payment_intent_params import ( + ReaderConfirmPaymentIntentParams as ReaderConfirmPaymentIntentParams, +) +from stripe.params.terminal._reader_create_params import ( + ReaderCreateParams as ReaderCreateParams, +) +from stripe.params.terminal._reader_delete_params import ( + ReaderDeleteParams as ReaderDeleteParams, +) +from stripe.params.terminal._reader_list_params import ( + ReaderListParams as ReaderListParams, +) +from stripe.params.terminal._reader_modify_params import ( + ReaderModifyParams as ReaderModifyParams, +) +from stripe.params.terminal._reader_present_payment_method_params import ( + ReaderPresentPaymentMethodParams as ReaderPresentPaymentMethodParams, +) +from stripe.params.terminal._reader_process_payment_intent_params import ( + ReaderProcessPaymentIntentParams as ReaderProcessPaymentIntentParams, +) +from stripe.params.terminal._reader_process_setup_intent_params import ( + ReaderProcessSetupIntentParams as ReaderProcessSetupIntentParams, +) +from stripe.params.terminal._reader_refund_payment_params import ( + ReaderRefundPaymentParams as ReaderRefundPaymentParams, +) +from stripe.params.terminal._reader_retrieve_params import ( + ReaderRetrieveParams as ReaderRetrieveParams, +) +from stripe.params.terminal._reader_set_reader_display_params import ( + ReaderSetReaderDisplayParams as ReaderSetReaderDisplayParams, +) +from stripe.params.terminal._reader_succeed_input_collection_params import ( + ReaderSucceedInputCollectionParams as ReaderSucceedInputCollectionParams, +) +from stripe.params.terminal._reader_timeout_input_collection_params import ( + ReaderTimeoutInputCollectionParams as ReaderTimeoutInputCollectionParams, +) +from stripe.params.terminal._reader_update_params import ( + ReaderUpdateParams as ReaderUpdateParams, +) diff --git a/stripe/params/terminal/_configuration_create_params.py b/stripe/params/terminal/_configuration_create_params.py new file mode 100644 index 000000000..82fd97f3e --- /dev/null +++ b/stripe/params/terminal/_configuration_create_params.py @@ -0,0 +1,585 @@ +# -*- 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, TypedDict + + +class ConfigurationCreateParams(RequestOptions): + bbpos_wisepad3: NotRequired["ConfigurationCreateParamsBbposWisepad3"] + """ + An object containing device type specific settings for BBPOS WisePad 3 readers + """ + bbpos_wisepos_e: NotRequired["ConfigurationCreateParamsBbposWiseposE"] + """ + An object containing device type specific settings for BBPOS WisePOS E readers + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + name: NotRequired[str] + """ + Name of the configuration + """ + offline: NotRequired["Literal['']|ConfigurationCreateParamsOffline"] + """ + Configurations for collecting transactions offline. + """ + reader_security: NotRequired[ + "Literal['']|ConfigurationCreateParamsReaderSecurity" + ] + """ + Configurations for reader security settings. + """ + reboot_window: NotRequired["ConfigurationCreateParamsRebootWindow"] + """ + Reboot time settings for readers that support customized reboot time configuration. + """ + stripe_s700: NotRequired["ConfigurationCreateParamsStripeS700"] + """ + An object containing device type specific settings for Stripe S700 readers + """ + tipping: NotRequired["Literal['']|ConfigurationCreateParamsTipping"] + """ + Tipping configurations for readers supporting on-reader tips + """ + verifone_p400: NotRequired["ConfigurationCreateParamsVerifoneP400"] + """ + An object containing device type specific settings for Verifone P400 readers + """ + wifi: NotRequired["Literal['']|ConfigurationCreateParamsWifi"] + """ + Configurations for connecting to a WiFi network. + """ + + +class ConfigurationCreateParamsBbposWisepad3(TypedDict): + splashscreen: NotRequired["Literal['']|str"] + """ + A File ID representing an image you would like displayed on the reader. + """ + + +class ConfigurationCreateParamsBbposWiseposE(TypedDict): + splashscreen: NotRequired["Literal['']|str"] + """ + A File ID representing an image to display on the reader + """ + + +class ConfigurationCreateParamsOffline(TypedDict): + enabled: bool + """ + Determines whether to allow transactions to be collected while reader is offline. Defaults to false. + """ + + +class ConfigurationCreateParamsReaderSecurity(TypedDict): + admin_menu_passcode: NotRequired["Literal['']|str"] + """ + Passcode used to access a reader's admin menu. + """ + + +class ConfigurationCreateParamsRebootWindow(TypedDict): + end_hour: int + """ + Integer between 0 to 23 that represents the end hour of the reboot time window. The value must be different than the start_hour. + """ + start_hour: int + """ + Integer between 0 to 23 that represents the start hour of the reboot time window. + """ + + +class ConfigurationCreateParamsStripeS700(TypedDict): + splashscreen: NotRequired["Literal['']|str"] + """ + A File ID representing an image you would like displayed on the reader. + """ + + +class ConfigurationCreateParamsTipping(TypedDict): + aed: NotRequired["ConfigurationCreateParamsTippingAed"] + """ + Tipping configuration for AED + """ + aud: NotRequired["ConfigurationCreateParamsTippingAud"] + """ + Tipping configuration for AUD + """ + bgn: NotRequired["ConfigurationCreateParamsTippingBgn"] + """ + Tipping configuration for BGN + """ + cad: NotRequired["ConfigurationCreateParamsTippingCad"] + """ + Tipping configuration for CAD + """ + chf: NotRequired["ConfigurationCreateParamsTippingChf"] + """ + Tipping configuration for CHF + """ + czk: NotRequired["ConfigurationCreateParamsTippingCzk"] + """ + Tipping configuration for CZK + """ + dkk: NotRequired["ConfigurationCreateParamsTippingDkk"] + """ + Tipping configuration for DKK + """ + eur: NotRequired["ConfigurationCreateParamsTippingEur"] + """ + Tipping configuration for EUR + """ + gbp: NotRequired["ConfigurationCreateParamsTippingGbp"] + """ + Tipping configuration for GBP + """ + hkd: NotRequired["ConfigurationCreateParamsTippingHkd"] + """ + Tipping configuration for HKD + """ + huf: NotRequired["ConfigurationCreateParamsTippingHuf"] + """ + Tipping configuration for HUF + """ + jpy: NotRequired["ConfigurationCreateParamsTippingJpy"] + """ + Tipping configuration for JPY + """ + mxn: NotRequired["ConfigurationCreateParamsTippingMxn"] + """ + Tipping configuration for MXN + """ + myr: NotRequired["ConfigurationCreateParamsTippingMyr"] + """ + Tipping configuration for MYR + """ + nok: NotRequired["ConfigurationCreateParamsTippingNok"] + """ + Tipping configuration for NOK + """ + nzd: NotRequired["ConfigurationCreateParamsTippingNzd"] + """ + Tipping configuration for NZD + """ + pln: NotRequired["ConfigurationCreateParamsTippingPln"] + """ + Tipping configuration for PLN + """ + ron: NotRequired["ConfigurationCreateParamsTippingRon"] + """ + Tipping configuration for RON + """ + sek: NotRequired["ConfigurationCreateParamsTippingSek"] + """ + Tipping configuration for SEK + """ + sgd: NotRequired["ConfigurationCreateParamsTippingSgd"] + """ + Tipping configuration for SGD + """ + usd: NotRequired["ConfigurationCreateParamsTippingUsd"] + """ + Tipping configuration for USD + """ + + +class ConfigurationCreateParamsTippingAed(TypedDict): + fixed_amounts: NotRequired[List[int]] + """ + Fixed amounts displayed when collecting a tip + """ + percentages: NotRequired[List[int]] + """ + Percentages displayed when collecting a tip + """ + smart_tip_threshold: NotRequired[int] + """ + Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + """ + + +class ConfigurationCreateParamsTippingAud(TypedDict): + fixed_amounts: NotRequired[List[int]] + """ + Fixed amounts displayed when collecting a tip + """ + percentages: NotRequired[List[int]] + """ + Percentages displayed when collecting a tip + """ + smart_tip_threshold: NotRequired[int] + """ + Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + """ + + +class ConfigurationCreateParamsTippingBgn(TypedDict): + fixed_amounts: NotRequired[List[int]] + """ + Fixed amounts displayed when collecting a tip + """ + percentages: NotRequired[List[int]] + """ + Percentages displayed when collecting a tip + """ + smart_tip_threshold: NotRequired[int] + """ + Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + """ + + +class ConfigurationCreateParamsTippingCad(TypedDict): + fixed_amounts: NotRequired[List[int]] + """ + Fixed amounts displayed when collecting a tip + """ + percentages: NotRequired[List[int]] + """ + Percentages displayed when collecting a tip + """ + smart_tip_threshold: NotRequired[int] + """ + Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + """ + + +class ConfigurationCreateParamsTippingChf(TypedDict): + fixed_amounts: NotRequired[List[int]] + """ + Fixed amounts displayed when collecting a tip + """ + percentages: NotRequired[List[int]] + """ + Percentages displayed when collecting a tip + """ + smart_tip_threshold: NotRequired[int] + """ + Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + """ + + +class ConfigurationCreateParamsTippingCzk(TypedDict): + fixed_amounts: NotRequired[List[int]] + """ + Fixed amounts displayed when collecting a tip + """ + percentages: NotRequired[List[int]] + """ + Percentages displayed when collecting a tip + """ + smart_tip_threshold: NotRequired[int] + """ + Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + """ + + +class ConfigurationCreateParamsTippingDkk(TypedDict): + fixed_amounts: NotRequired[List[int]] + """ + Fixed amounts displayed when collecting a tip + """ + percentages: NotRequired[List[int]] + """ + Percentages displayed when collecting a tip + """ + smart_tip_threshold: NotRequired[int] + """ + Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + """ + + +class ConfigurationCreateParamsTippingEur(TypedDict): + fixed_amounts: NotRequired[List[int]] + """ + Fixed amounts displayed when collecting a tip + """ + percentages: NotRequired[List[int]] + """ + Percentages displayed when collecting a tip + """ + smart_tip_threshold: NotRequired[int] + """ + Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + """ + + +class ConfigurationCreateParamsTippingGbp(TypedDict): + fixed_amounts: NotRequired[List[int]] + """ + Fixed amounts displayed when collecting a tip + """ + percentages: NotRequired[List[int]] + """ + Percentages displayed when collecting a tip + """ + smart_tip_threshold: NotRequired[int] + """ + Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + """ + + +class ConfigurationCreateParamsTippingHkd(TypedDict): + fixed_amounts: NotRequired[List[int]] + """ + Fixed amounts displayed when collecting a tip + """ + percentages: NotRequired[List[int]] + """ + Percentages displayed when collecting a tip + """ + smart_tip_threshold: NotRequired[int] + """ + Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + """ + + +class ConfigurationCreateParamsTippingHuf(TypedDict): + fixed_amounts: NotRequired[List[int]] + """ + Fixed amounts displayed when collecting a tip + """ + percentages: NotRequired[List[int]] + """ + Percentages displayed when collecting a tip + """ + smart_tip_threshold: NotRequired[int] + """ + Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + """ + + +class ConfigurationCreateParamsTippingJpy(TypedDict): + fixed_amounts: NotRequired[List[int]] + """ + Fixed amounts displayed when collecting a tip + """ + percentages: NotRequired[List[int]] + """ + Percentages displayed when collecting a tip + """ + smart_tip_threshold: NotRequired[int] + """ + Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + """ + + +class ConfigurationCreateParamsTippingMxn(TypedDict): + fixed_amounts: NotRequired[List[int]] + """ + Fixed amounts displayed when collecting a tip + """ + percentages: NotRequired[List[int]] + """ + Percentages displayed when collecting a tip + """ + smart_tip_threshold: NotRequired[int] + """ + Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + """ + + +class ConfigurationCreateParamsTippingMyr(TypedDict): + fixed_amounts: NotRequired[List[int]] + """ + Fixed amounts displayed when collecting a tip + """ + percentages: NotRequired[List[int]] + """ + Percentages displayed when collecting a tip + """ + smart_tip_threshold: NotRequired[int] + """ + Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + """ + + +class ConfigurationCreateParamsTippingNok(TypedDict): + fixed_amounts: NotRequired[List[int]] + """ + Fixed amounts displayed when collecting a tip + """ + percentages: NotRequired[List[int]] + """ + Percentages displayed when collecting a tip + """ + smart_tip_threshold: NotRequired[int] + """ + Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + """ + + +class ConfigurationCreateParamsTippingNzd(TypedDict): + fixed_amounts: NotRequired[List[int]] + """ + Fixed amounts displayed when collecting a tip + """ + percentages: NotRequired[List[int]] + """ + Percentages displayed when collecting a tip + """ + smart_tip_threshold: NotRequired[int] + """ + Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + """ + + +class ConfigurationCreateParamsTippingPln(TypedDict): + fixed_amounts: NotRequired[List[int]] + """ + Fixed amounts displayed when collecting a tip + """ + percentages: NotRequired[List[int]] + """ + Percentages displayed when collecting a tip + """ + smart_tip_threshold: NotRequired[int] + """ + Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + """ + + +class ConfigurationCreateParamsTippingRon(TypedDict): + fixed_amounts: NotRequired[List[int]] + """ + Fixed amounts displayed when collecting a tip + """ + percentages: NotRequired[List[int]] + """ + Percentages displayed when collecting a tip + """ + smart_tip_threshold: NotRequired[int] + """ + Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + """ + + +class ConfigurationCreateParamsTippingSek(TypedDict): + fixed_amounts: NotRequired[List[int]] + """ + Fixed amounts displayed when collecting a tip + """ + percentages: NotRequired[List[int]] + """ + Percentages displayed when collecting a tip + """ + smart_tip_threshold: NotRequired[int] + """ + Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + """ + + +class ConfigurationCreateParamsTippingSgd(TypedDict): + fixed_amounts: NotRequired[List[int]] + """ + Fixed amounts displayed when collecting a tip + """ + percentages: NotRequired[List[int]] + """ + Percentages displayed when collecting a tip + """ + smart_tip_threshold: NotRequired[int] + """ + Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + """ + + +class ConfigurationCreateParamsTippingUsd(TypedDict): + fixed_amounts: NotRequired[List[int]] + """ + Fixed amounts displayed when collecting a tip + """ + percentages: NotRequired[List[int]] + """ + Percentages displayed when collecting a tip + """ + smart_tip_threshold: NotRequired[int] + """ + Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + """ + + +class ConfigurationCreateParamsVerifoneP400(TypedDict): + splashscreen: NotRequired["Literal['']|str"] + """ + A File ID representing an image you would like displayed on the reader. + """ + + +class ConfigurationCreateParamsWifi(TypedDict): + enterprise_eap_peap: NotRequired[ + "ConfigurationCreateParamsWifiEnterpriseEapPeap" + ] + """ + Credentials for a WPA-Enterprise WiFi network using the EAP-PEAP authentication method. + """ + enterprise_eap_tls: NotRequired[ + "ConfigurationCreateParamsWifiEnterpriseEapTls" + ] + """ + Credentials for a WPA-Enterprise WiFi network using the EAP-TLS authentication method. + """ + personal_psk: NotRequired["ConfigurationCreateParamsWifiPersonalPsk"] + """ + Credentials for a WPA-Personal WiFi network. + """ + type: Literal["enterprise_eap_peap", "enterprise_eap_tls", "personal_psk"] + """ + Security type of the WiFi network. Fill out the hash with the corresponding name to provide the set of credentials for this security type. + """ + + +class ConfigurationCreateParamsWifiEnterpriseEapPeap(TypedDict): + ca_certificate_file: NotRequired[str] + """ + A File ID representing a PEM file containing the server certificate + """ + password: str + """ + Password for connecting to the WiFi network + """ + ssid: str + """ + Name of the WiFi network + """ + username: str + """ + Username for connecting to the WiFi network + """ + + +class ConfigurationCreateParamsWifiEnterpriseEapTls(TypedDict): + ca_certificate_file: NotRequired[str] + """ + A File ID representing a PEM file containing the server certificate + """ + client_certificate_file: str + """ + A File ID representing a PEM file containing the client certificate + """ + private_key_file: str + """ + A File ID representing a PEM file containing the client RSA private key + """ + private_key_file_password: NotRequired[str] + """ + Password for the private key file + """ + ssid: str + """ + Name of the WiFi network + """ + + +class ConfigurationCreateParamsWifiPersonalPsk(TypedDict): + password: str + """ + Password for connecting to the WiFi network + """ + ssid: str + """ + Name of the WiFi network + """ diff --git a/stripe/params/terminal/_configuration_delete_params.py b/stripe/params/terminal/_configuration_delete_params.py new file mode 100644 index 000000000..e9d95e0b0 --- /dev/null +++ b/stripe/params/terminal/_configuration_delete_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions + + +class ConfigurationDeleteParams(RequestOptions): + pass diff --git a/stripe/params/terminal/_configuration_list_params.py b/stripe/params/terminal/_configuration_list_params.py new file mode 100644 index 000000000..c9e68efcf --- /dev/null +++ b/stripe/params/terminal/_configuration_list_params.py @@ -0,0 +1,28 @@ +# -*- 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 ConfigurationListParams(RequestOptions): + 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. + """ + is_account_default: NotRequired[bool] + """ + if present, only return the account default or non-default configurations. + """ + 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. + """ diff --git a/stripe/params/terminal/_configuration_modify_params.py b/stripe/params/terminal/_configuration_modify_params.py new file mode 100644 index 000000000..fa5e50c48 --- /dev/null +++ b/stripe/params/terminal/_configuration_modify_params.py @@ -0,0 +1,593 @@ +# -*- 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, TypedDict + + +class ConfigurationModifyParams(RequestOptions): + bbpos_wisepad3: NotRequired[ + "Literal['']|ConfigurationModifyParamsBbposWisepad3" + ] + """ + An object containing device type specific settings for BBPOS WisePad 3 readers + """ + bbpos_wisepos_e: NotRequired[ + "Literal['']|ConfigurationModifyParamsBbposWiseposE" + ] + """ + An object containing device type specific settings for BBPOS WisePOS E readers + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + name: NotRequired[str] + """ + Name of the configuration + """ + offline: NotRequired["Literal['']|ConfigurationModifyParamsOffline"] + """ + Configurations for collecting transactions offline. + """ + reader_security: NotRequired[ + "Literal['']|ConfigurationModifyParamsReaderSecurity" + ] + """ + Configurations for reader security settings. + """ + reboot_window: NotRequired[ + "Literal['']|ConfigurationModifyParamsRebootWindow" + ] + """ + Reboot time settings for readers that support customized reboot time configuration. + """ + stripe_s700: NotRequired["Literal['']|ConfigurationModifyParamsStripeS700"] + """ + An object containing device type specific settings for Stripe S700 readers + """ + tipping: NotRequired["Literal['']|ConfigurationModifyParamsTipping"] + """ + Tipping configurations for readers supporting on-reader tips + """ + verifone_p400: NotRequired[ + "Literal['']|ConfigurationModifyParamsVerifoneP400" + ] + """ + An object containing device type specific settings for Verifone P400 readers + """ + wifi: NotRequired["Literal['']|ConfigurationModifyParamsWifi"] + """ + Configurations for connecting to a WiFi network. + """ + + +class ConfigurationModifyParamsBbposWisepad3(TypedDict): + splashscreen: NotRequired["Literal['']|str"] + """ + A File ID representing an image you would like displayed on the reader. + """ + + +class ConfigurationModifyParamsBbposWiseposE(TypedDict): + splashscreen: NotRequired["Literal['']|str"] + """ + A File ID representing an image to display on the reader + """ + + +class ConfigurationModifyParamsOffline(TypedDict): + enabled: bool + """ + Determines whether to allow transactions to be collected while reader is offline. Defaults to false. + """ + + +class ConfigurationModifyParamsReaderSecurity(TypedDict): + admin_menu_passcode: NotRequired["Literal['']|str"] + """ + Passcode used to access a reader's admin menu. + """ + + +class ConfigurationModifyParamsRebootWindow(TypedDict): + end_hour: int + """ + Integer between 0 to 23 that represents the end hour of the reboot time window. The value must be different than the start_hour. + """ + start_hour: int + """ + Integer between 0 to 23 that represents the start hour of the reboot time window. + """ + + +class ConfigurationModifyParamsStripeS700(TypedDict): + splashscreen: NotRequired["Literal['']|str"] + """ + A File ID representing an image you would like displayed on the reader. + """ + + +class ConfigurationModifyParamsTipping(TypedDict): + aed: NotRequired["ConfigurationModifyParamsTippingAed"] + """ + Tipping configuration for AED + """ + aud: NotRequired["ConfigurationModifyParamsTippingAud"] + """ + Tipping configuration for AUD + """ + bgn: NotRequired["ConfigurationModifyParamsTippingBgn"] + """ + Tipping configuration for BGN + """ + cad: NotRequired["ConfigurationModifyParamsTippingCad"] + """ + Tipping configuration for CAD + """ + chf: NotRequired["ConfigurationModifyParamsTippingChf"] + """ + Tipping configuration for CHF + """ + czk: NotRequired["ConfigurationModifyParamsTippingCzk"] + """ + Tipping configuration for CZK + """ + dkk: NotRequired["ConfigurationModifyParamsTippingDkk"] + """ + Tipping configuration for DKK + """ + eur: NotRequired["ConfigurationModifyParamsTippingEur"] + """ + Tipping configuration for EUR + """ + gbp: NotRequired["ConfigurationModifyParamsTippingGbp"] + """ + Tipping configuration for GBP + """ + hkd: NotRequired["ConfigurationModifyParamsTippingHkd"] + """ + Tipping configuration for HKD + """ + huf: NotRequired["ConfigurationModifyParamsTippingHuf"] + """ + Tipping configuration for HUF + """ + jpy: NotRequired["ConfigurationModifyParamsTippingJpy"] + """ + Tipping configuration for JPY + """ + mxn: NotRequired["ConfigurationModifyParamsTippingMxn"] + """ + Tipping configuration for MXN + """ + myr: NotRequired["ConfigurationModifyParamsTippingMyr"] + """ + Tipping configuration for MYR + """ + nok: NotRequired["ConfigurationModifyParamsTippingNok"] + """ + Tipping configuration for NOK + """ + nzd: NotRequired["ConfigurationModifyParamsTippingNzd"] + """ + Tipping configuration for NZD + """ + pln: NotRequired["ConfigurationModifyParamsTippingPln"] + """ + Tipping configuration for PLN + """ + ron: NotRequired["ConfigurationModifyParamsTippingRon"] + """ + Tipping configuration for RON + """ + sek: NotRequired["ConfigurationModifyParamsTippingSek"] + """ + Tipping configuration for SEK + """ + sgd: NotRequired["ConfigurationModifyParamsTippingSgd"] + """ + Tipping configuration for SGD + """ + usd: NotRequired["ConfigurationModifyParamsTippingUsd"] + """ + Tipping configuration for USD + """ + + +class ConfigurationModifyParamsTippingAed(TypedDict): + fixed_amounts: NotRequired[List[int]] + """ + Fixed amounts displayed when collecting a tip + """ + percentages: NotRequired[List[int]] + """ + Percentages displayed when collecting a tip + """ + smart_tip_threshold: NotRequired[int] + """ + Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + """ + + +class ConfigurationModifyParamsTippingAud(TypedDict): + fixed_amounts: NotRequired[List[int]] + """ + Fixed amounts displayed when collecting a tip + """ + percentages: NotRequired[List[int]] + """ + Percentages displayed when collecting a tip + """ + smart_tip_threshold: NotRequired[int] + """ + Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + """ + + +class ConfigurationModifyParamsTippingBgn(TypedDict): + fixed_amounts: NotRequired[List[int]] + """ + Fixed amounts displayed when collecting a tip + """ + percentages: NotRequired[List[int]] + """ + Percentages displayed when collecting a tip + """ + smart_tip_threshold: NotRequired[int] + """ + Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + """ + + +class ConfigurationModifyParamsTippingCad(TypedDict): + fixed_amounts: NotRequired[List[int]] + """ + Fixed amounts displayed when collecting a tip + """ + percentages: NotRequired[List[int]] + """ + Percentages displayed when collecting a tip + """ + smart_tip_threshold: NotRequired[int] + """ + Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + """ + + +class ConfigurationModifyParamsTippingChf(TypedDict): + fixed_amounts: NotRequired[List[int]] + """ + Fixed amounts displayed when collecting a tip + """ + percentages: NotRequired[List[int]] + """ + Percentages displayed when collecting a tip + """ + smart_tip_threshold: NotRequired[int] + """ + Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + """ + + +class ConfigurationModifyParamsTippingCzk(TypedDict): + fixed_amounts: NotRequired[List[int]] + """ + Fixed amounts displayed when collecting a tip + """ + percentages: NotRequired[List[int]] + """ + Percentages displayed when collecting a tip + """ + smart_tip_threshold: NotRequired[int] + """ + Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + """ + + +class ConfigurationModifyParamsTippingDkk(TypedDict): + fixed_amounts: NotRequired[List[int]] + """ + Fixed amounts displayed when collecting a tip + """ + percentages: NotRequired[List[int]] + """ + Percentages displayed when collecting a tip + """ + smart_tip_threshold: NotRequired[int] + """ + Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + """ + + +class ConfigurationModifyParamsTippingEur(TypedDict): + fixed_amounts: NotRequired[List[int]] + """ + Fixed amounts displayed when collecting a tip + """ + percentages: NotRequired[List[int]] + """ + Percentages displayed when collecting a tip + """ + smart_tip_threshold: NotRequired[int] + """ + Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + """ + + +class ConfigurationModifyParamsTippingGbp(TypedDict): + fixed_amounts: NotRequired[List[int]] + """ + Fixed amounts displayed when collecting a tip + """ + percentages: NotRequired[List[int]] + """ + Percentages displayed when collecting a tip + """ + smart_tip_threshold: NotRequired[int] + """ + Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + """ + + +class ConfigurationModifyParamsTippingHkd(TypedDict): + fixed_amounts: NotRequired[List[int]] + """ + Fixed amounts displayed when collecting a tip + """ + percentages: NotRequired[List[int]] + """ + Percentages displayed when collecting a tip + """ + smart_tip_threshold: NotRequired[int] + """ + Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + """ + + +class ConfigurationModifyParamsTippingHuf(TypedDict): + fixed_amounts: NotRequired[List[int]] + """ + Fixed amounts displayed when collecting a tip + """ + percentages: NotRequired[List[int]] + """ + Percentages displayed when collecting a tip + """ + smart_tip_threshold: NotRequired[int] + """ + Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + """ + + +class ConfigurationModifyParamsTippingJpy(TypedDict): + fixed_amounts: NotRequired[List[int]] + """ + Fixed amounts displayed when collecting a tip + """ + percentages: NotRequired[List[int]] + """ + Percentages displayed when collecting a tip + """ + smart_tip_threshold: NotRequired[int] + """ + Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + """ + + +class ConfigurationModifyParamsTippingMxn(TypedDict): + fixed_amounts: NotRequired[List[int]] + """ + Fixed amounts displayed when collecting a tip + """ + percentages: NotRequired[List[int]] + """ + Percentages displayed when collecting a tip + """ + smart_tip_threshold: NotRequired[int] + """ + Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + """ + + +class ConfigurationModifyParamsTippingMyr(TypedDict): + fixed_amounts: NotRequired[List[int]] + """ + Fixed amounts displayed when collecting a tip + """ + percentages: NotRequired[List[int]] + """ + Percentages displayed when collecting a tip + """ + smart_tip_threshold: NotRequired[int] + """ + Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + """ + + +class ConfigurationModifyParamsTippingNok(TypedDict): + fixed_amounts: NotRequired[List[int]] + """ + Fixed amounts displayed when collecting a tip + """ + percentages: NotRequired[List[int]] + """ + Percentages displayed when collecting a tip + """ + smart_tip_threshold: NotRequired[int] + """ + Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + """ + + +class ConfigurationModifyParamsTippingNzd(TypedDict): + fixed_amounts: NotRequired[List[int]] + """ + Fixed amounts displayed when collecting a tip + """ + percentages: NotRequired[List[int]] + """ + Percentages displayed when collecting a tip + """ + smart_tip_threshold: NotRequired[int] + """ + Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + """ + + +class ConfigurationModifyParamsTippingPln(TypedDict): + fixed_amounts: NotRequired[List[int]] + """ + Fixed amounts displayed when collecting a tip + """ + percentages: NotRequired[List[int]] + """ + Percentages displayed when collecting a tip + """ + smart_tip_threshold: NotRequired[int] + """ + Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + """ + + +class ConfigurationModifyParamsTippingRon(TypedDict): + fixed_amounts: NotRequired[List[int]] + """ + Fixed amounts displayed when collecting a tip + """ + percentages: NotRequired[List[int]] + """ + Percentages displayed when collecting a tip + """ + smart_tip_threshold: NotRequired[int] + """ + Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + """ + + +class ConfigurationModifyParamsTippingSek(TypedDict): + fixed_amounts: NotRequired[List[int]] + """ + Fixed amounts displayed when collecting a tip + """ + percentages: NotRequired[List[int]] + """ + Percentages displayed when collecting a tip + """ + smart_tip_threshold: NotRequired[int] + """ + Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + """ + + +class ConfigurationModifyParamsTippingSgd(TypedDict): + fixed_amounts: NotRequired[List[int]] + """ + Fixed amounts displayed when collecting a tip + """ + percentages: NotRequired[List[int]] + """ + Percentages displayed when collecting a tip + """ + smart_tip_threshold: NotRequired[int] + """ + Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + """ + + +class ConfigurationModifyParamsTippingUsd(TypedDict): + fixed_amounts: NotRequired[List[int]] + """ + Fixed amounts displayed when collecting a tip + """ + percentages: NotRequired[List[int]] + """ + Percentages displayed when collecting a tip + """ + smart_tip_threshold: NotRequired[int] + """ + Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + """ + + +class ConfigurationModifyParamsVerifoneP400(TypedDict): + splashscreen: NotRequired["Literal['']|str"] + """ + A File ID representing an image you would like displayed on the reader. + """ + + +class ConfigurationModifyParamsWifi(TypedDict): + enterprise_eap_peap: NotRequired[ + "ConfigurationModifyParamsWifiEnterpriseEapPeap" + ] + """ + Credentials for a WPA-Enterprise WiFi network using the EAP-PEAP authentication method. + """ + enterprise_eap_tls: NotRequired[ + "ConfigurationModifyParamsWifiEnterpriseEapTls" + ] + """ + Credentials for a WPA-Enterprise WiFi network using the EAP-TLS authentication method. + """ + personal_psk: NotRequired["ConfigurationModifyParamsWifiPersonalPsk"] + """ + Credentials for a WPA-Personal WiFi network. + """ + type: Literal["enterprise_eap_peap", "enterprise_eap_tls", "personal_psk"] + """ + Security type of the WiFi network. Fill out the hash with the corresponding name to provide the set of credentials for this security type. + """ + + +class ConfigurationModifyParamsWifiEnterpriseEapPeap(TypedDict): + ca_certificate_file: NotRequired[str] + """ + A File ID representing a PEM file containing the server certificate + """ + password: str + """ + Password for connecting to the WiFi network + """ + ssid: str + """ + Name of the WiFi network + """ + username: str + """ + Username for connecting to the WiFi network + """ + + +class ConfigurationModifyParamsWifiEnterpriseEapTls(TypedDict): + ca_certificate_file: NotRequired[str] + """ + A File ID representing a PEM file containing the server certificate + """ + client_certificate_file: str + """ + A File ID representing a PEM file containing the client certificate + """ + private_key_file: str + """ + A File ID representing a PEM file containing the client RSA private key + """ + private_key_file_password: NotRequired[str] + """ + Password for the private key file + """ + ssid: str + """ + Name of the WiFi network + """ + + +class ConfigurationModifyParamsWifiPersonalPsk(TypedDict): + password: str + """ + Password for connecting to the WiFi network + """ + ssid: str + """ + Name of the WiFi network + """ diff --git a/stripe/params/terminal/_configuration_retrieve_params.py b/stripe/params/terminal/_configuration_retrieve_params.py new file mode 100644 index 000000000..95f024ac8 --- /dev/null +++ b/stripe/params/terminal/_configuration_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 ConfigurationRetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/terminal/_configuration_update_params.py b/stripe/params/terminal/_configuration_update_params.py new file mode 100644 index 000000000..6e0785a0b --- /dev/null +++ b/stripe/params/terminal/_configuration_update_params.py @@ -0,0 +1,592 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import Literal, NotRequired, TypedDict + + +class ConfigurationUpdateParams(TypedDict): + bbpos_wisepad3: NotRequired[ + "Literal['']|ConfigurationUpdateParamsBbposWisepad3" + ] + """ + An object containing device type specific settings for BBPOS WisePad 3 readers + """ + bbpos_wisepos_e: NotRequired[ + "Literal['']|ConfigurationUpdateParamsBbposWiseposE" + ] + """ + An object containing device type specific settings for BBPOS WisePOS E readers + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + name: NotRequired[str] + """ + Name of the configuration + """ + offline: NotRequired["Literal['']|ConfigurationUpdateParamsOffline"] + """ + Configurations for collecting transactions offline. + """ + reader_security: NotRequired[ + "Literal['']|ConfigurationUpdateParamsReaderSecurity" + ] + """ + Configurations for reader security settings. + """ + reboot_window: NotRequired[ + "Literal['']|ConfigurationUpdateParamsRebootWindow" + ] + """ + Reboot time settings for readers that support customized reboot time configuration. + """ + stripe_s700: NotRequired["Literal['']|ConfigurationUpdateParamsStripeS700"] + """ + An object containing device type specific settings for Stripe S700 readers + """ + tipping: NotRequired["Literal['']|ConfigurationUpdateParamsTipping"] + """ + Tipping configurations for readers supporting on-reader tips + """ + verifone_p400: NotRequired[ + "Literal['']|ConfigurationUpdateParamsVerifoneP400" + ] + """ + An object containing device type specific settings for Verifone P400 readers + """ + wifi: NotRequired["Literal['']|ConfigurationUpdateParamsWifi"] + """ + Configurations for connecting to a WiFi network. + """ + + +class ConfigurationUpdateParamsBbposWisepad3(TypedDict): + splashscreen: NotRequired["Literal['']|str"] + """ + A File ID representing an image you would like displayed on the reader. + """ + + +class ConfigurationUpdateParamsBbposWiseposE(TypedDict): + splashscreen: NotRequired["Literal['']|str"] + """ + A File ID representing an image to display on the reader + """ + + +class ConfigurationUpdateParamsOffline(TypedDict): + enabled: bool + """ + Determines whether to allow transactions to be collected while reader is offline. Defaults to false. + """ + + +class ConfigurationUpdateParamsReaderSecurity(TypedDict): + admin_menu_passcode: NotRequired["Literal['']|str"] + """ + Passcode used to access a reader's admin menu. + """ + + +class ConfigurationUpdateParamsRebootWindow(TypedDict): + end_hour: int + """ + Integer between 0 to 23 that represents the end hour of the reboot time window. The value must be different than the start_hour. + """ + start_hour: int + """ + Integer between 0 to 23 that represents the start hour of the reboot time window. + """ + + +class ConfigurationUpdateParamsStripeS700(TypedDict): + splashscreen: NotRequired["Literal['']|str"] + """ + A File ID representing an image you would like displayed on the reader. + """ + + +class ConfigurationUpdateParamsTipping(TypedDict): + aed: NotRequired["ConfigurationUpdateParamsTippingAed"] + """ + Tipping configuration for AED + """ + aud: NotRequired["ConfigurationUpdateParamsTippingAud"] + """ + Tipping configuration for AUD + """ + bgn: NotRequired["ConfigurationUpdateParamsTippingBgn"] + """ + Tipping configuration for BGN + """ + cad: NotRequired["ConfigurationUpdateParamsTippingCad"] + """ + Tipping configuration for CAD + """ + chf: NotRequired["ConfigurationUpdateParamsTippingChf"] + """ + Tipping configuration for CHF + """ + czk: NotRequired["ConfigurationUpdateParamsTippingCzk"] + """ + Tipping configuration for CZK + """ + dkk: NotRequired["ConfigurationUpdateParamsTippingDkk"] + """ + Tipping configuration for DKK + """ + eur: NotRequired["ConfigurationUpdateParamsTippingEur"] + """ + Tipping configuration for EUR + """ + gbp: NotRequired["ConfigurationUpdateParamsTippingGbp"] + """ + Tipping configuration for GBP + """ + hkd: NotRequired["ConfigurationUpdateParamsTippingHkd"] + """ + Tipping configuration for HKD + """ + huf: NotRequired["ConfigurationUpdateParamsTippingHuf"] + """ + Tipping configuration for HUF + """ + jpy: NotRequired["ConfigurationUpdateParamsTippingJpy"] + """ + Tipping configuration for JPY + """ + mxn: NotRequired["ConfigurationUpdateParamsTippingMxn"] + """ + Tipping configuration for MXN + """ + myr: NotRequired["ConfigurationUpdateParamsTippingMyr"] + """ + Tipping configuration for MYR + """ + nok: NotRequired["ConfigurationUpdateParamsTippingNok"] + """ + Tipping configuration for NOK + """ + nzd: NotRequired["ConfigurationUpdateParamsTippingNzd"] + """ + Tipping configuration for NZD + """ + pln: NotRequired["ConfigurationUpdateParamsTippingPln"] + """ + Tipping configuration for PLN + """ + ron: NotRequired["ConfigurationUpdateParamsTippingRon"] + """ + Tipping configuration for RON + """ + sek: NotRequired["ConfigurationUpdateParamsTippingSek"] + """ + Tipping configuration for SEK + """ + sgd: NotRequired["ConfigurationUpdateParamsTippingSgd"] + """ + Tipping configuration for SGD + """ + usd: NotRequired["ConfigurationUpdateParamsTippingUsd"] + """ + Tipping configuration for USD + """ + + +class ConfigurationUpdateParamsTippingAed(TypedDict): + fixed_amounts: NotRequired[List[int]] + """ + Fixed amounts displayed when collecting a tip + """ + percentages: NotRequired[List[int]] + """ + Percentages displayed when collecting a tip + """ + smart_tip_threshold: NotRequired[int] + """ + Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + """ + + +class ConfigurationUpdateParamsTippingAud(TypedDict): + fixed_amounts: NotRequired[List[int]] + """ + Fixed amounts displayed when collecting a tip + """ + percentages: NotRequired[List[int]] + """ + Percentages displayed when collecting a tip + """ + smart_tip_threshold: NotRequired[int] + """ + Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + """ + + +class ConfigurationUpdateParamsTippingBgn(TypedDict): + fixed_amounts: NotRequired[List[int]] + """ + Fixed amounts displayed when collecting a tip + """ + percentages: NotRequired[List[int]] + """ + Percentages displayed when collecting a tip + """ + smart_tip_threshold: NotRequired[int] + """ + Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + """ + + +class ConfigurationUpdateParamsTippingCad(TypedDict): + fixed_amounts: NotRequired[List[int]] + """ + Fixed amounts displayed when collecting a tip + """ + percentages: NotRequired[List[int]] + """ + Percentages displayed when collecting a tip + """ + smart_tip_threshold: NotRequired[int] + """ + Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + """ + + +class ConfigurationUpdateParamsTippingChf(TypedDict): + fixed_amounts: NotRequired[List[int]] + """ + Fixed amounts displayed when collecting a tip + """ + percentages: NotRequired[List[int]] + """ + Percentages displayed when collecting a tip + """ + smart_tip_threshold: NotRequired[int] + """ + Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + """ + + +class ConfigurationUpdateParamsTippingCzk(TypedDict): + fixed_amounts: NotRequired[List[int]] + """ + Fixed amounts displayed when collecting a tip + """ + percentages: NotRequired[List[int]] + """ + Percentages displayed when collecting a tip + """ + smart_tip_threshold: NotRequired[int] + """ + Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + """ + + +class ConfigurationUpdateParamsTippingDkk(TypedDict): + fixed_amounts: NotRequired[List[int]] + """ + Fixed amounts displayed when collecting a tip + """ + percentages: NotRequired[List[int]] + """ + Percentages displayed when collecting a tip + """ + smart_tip_threshold: NotRequired[int] + """ + Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + """ + + +class ConfigurationUpdateParamsTippingEur(TypedDict): + fixed_amounts: NotRequired[List[int]] + """ + Fixed amounts displayed when collecting a tip + """ + percentages: NotRequired[List[int]] + """ + Percentages displayed when collecting a tip + """ + smart_tip_threshold: NotRequired[int] + """ + Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + """ + + +class ConfigurationUpdateParamsTippingGbp(TypedDict): + fixed_amounts: NotRequired[List[int]] + """ + Fixed amounts displayed when collecting a tip + """ + percentages: NotRequired[List[int]] + """ + Percentages displayed when collecting a tip + """ + smart_tip_threshold: NotRequired[int] + """ + Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + """ + + +class ConfigurationUpdateParamsTippingHkd(TypedDict): + fixed_amounts: NotRequired[List[int]] + """ + Fixed amounts displayed when collecting a tip + """ + percentages: NotRequired[List[int]] + """ + Percentages displayed when collecting a tip + """ + smart_tip_threshold: NotRequired[int] + """ + Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + """ + + +class ConfigurationUpdateParamsTippingHuf(TypedDict): + fixed_amounts: NotRequired[List[int]] + """ + Fixed amounts displayed when collecting a tip + """ + percentages: NotRequired[List[int]] + """ + Percentages displayed when collecting a tip + """ + smart_tip_threshold: NotRequired[int] + """ + Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + """ + + +class ConfigurationUpdateParamsTippingJpy(TypedDict): + fixed_amounts: NotRequired[List[int]] + """ + Fixed amounts displayed when collecting a tip + """ + percentages: NotRequired[List[int]] + """ + Percentages displayed when collecting a tip + """ + smart_tip_threshold: NotRequired[int] + """ + Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + """ + + +class ConfigurationUpdateParamsTippingMxn(TypedDict): + fixed_amounts: NotRequired[List[int]] + """ + Fixed amounts displayed when collecting a tip + """ + percentages: NotRequired[List[int]] + """ + Percentages displayed when collecting a tip + """ + smart_tip_threshold: NotRequired[int] + """ + Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + """ + + +class ConfigurationUpdateParamsTippingMyr(TypedDict): + fixed_amounts: NotRequired[List[int]] + """ + Fixed amounts displayed when collecting a tip + """ + percentages: NotRequired[List[int]] + """ + Percentages displayed when collecting a tip + """ + smart_tip_threshold: NotRequired[int] + """ + Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + """ + + +class ConfigurationUpdateParamsTippingNok(TypedDict): + fixed_amounts: NotRequired[List[int]] + """ + Fixed amounts displayed when collecting a tip + """ + percentages: NotRequired[List[int]] + """ + Percentages displayed when collecting a tip + """ + smart_tip_threshold: NotRequired[int] + """ + Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + """ + + +class ConfigurationUpdateParamsTippingNzd(TypedDict): + fixed_amounts: NotRequired[List[int]] + """ + Fixed amounts displayed when collecting a tip + """ + percentages: NotRequired[List[int]] + """ + Percentages displayed when collecting a tip + """ + smart_tip_threshold: NotRequired[int] + """ + Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + """ + + +class ConfigurationUpdateParamsTippingPln(TypedDict): + fixed_amounts: NotRequired[List[int]] + """ + Fixed amounts displayed when collecting a tip + """ + percentages: NotRequired[List[int]] + """ + Percentages displayed when collecting a tip + """ + smart_tip_threshold: NotRequired[int] + """ + Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + """ + + +class ConfigurationUpdateParamsTippingRon(TypedDict): + fixed_amounts: NotRequired[List[int]] + """ + Fixed amounts displayed when collecting a tip + """ + percentages: NotRequired[List[int]] + """ + Percentages displayed when collecting a tip + """ + smart_tip_threshold: NotRequired[int] + """ + Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + """ + + +class ConfigurationUpdateParamsTippingSek(TypedDict): + fixed_amounts: NotRequired[List[int]] + """ + Fixed amounts displayed when collecting a tip + """ + percentages: NotRequired[List[int]] + """ + Percentages displayed when collecting a tip + """ + smart_tip_threshold: NotRequired[int] + """ + Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + """ + + +class ConfigurationUpdateParamsTippingSgd(TypedDict): + fixed_amounts: NotRequired[List[int]] + """ + Fixed amounts displayed when collecting a tip + """ + percentages: NotRequired[List[int]] + """ + Percentages displayed when collecting a tip + """ + smart_tip_threshold: NotRequired[int] + """ + Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + """ + + +class ConfigurationUpdateParamsTippingUsd(TypedDict): + fixed_amounts: NotRequired[List[int]] + """ + Fixed amounts displayed when collecting a tip + """ + percentages: NotRequired[List[int]] + """ + Percentages displayed when collecting a tip + """ + smart_tip_threshold: NotRequired[int] + """ + Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + """ + + +class ConfigurationUpdateParamsVerifoneP400(TypedDict): + splashscreen: NotRequired["Literal['']|str"] + """ + A File ID representing an image you would like displayed on the reader. + """ + + +class ConfigurationUpdateParamsWifi(TypedDict): + enterprise_eap_peap: NotRequired[ + "ConfigurationUpdateParamsWifiEnterpriseEapPeap" + ] + """ + Credentials for a WPA-Enterprise WiFi network using the EAP-PEAP authentication method. + """ + enterprise_eap_tls: NotRequired[ + "ConfigurationUpdateParamsWifiEnterpriseEapTls" + ] + """ + Credentials for a WPA-Enterprise WiFi network using the EAP-TLS authentication method. + """ + personal_psk: NotRequired["ConfigurationUpdateParamsWifiPersonalPsk"] + """ + Credentials for a WPA-Personal WiFi network. + """ + type: Literal["enterprise_eap_peap", "enterprise_eap_tls", "personal_psk"] + """ + Security type of the WiFi network. Fill out the hash with the corresponding name to provide the set of credentials for this security type. + """ + + +class ConfigurationUpdateParamsWifiEnterpriseEapPeap(TypedDict): + ca_certificate_file: NotRequired[str] + """ + A File ID representing a PEM file containing the server certificate + """ + password: str + """ + Password for connecting to the WiFi network + """ + ssid: str + """ + Name of the WiFi network + """ + username: str + """ + Username for connecting to the WiFi network + """ + + +class ConfigurationUpdateParamsWifiEnterpriseEapTls(TypedDict): + ca_certificate_file: NotRequired[str] + """ + A File ID representing a PEM file containing the server certificate + """ + client_certificate_file: str + """ + A File ID representing a PEM file containing the client certificate + """ + private_key_file: str + """ + A File ID representing a PEM file containing the client RSA private key + """ + private_key_file_password: NotRequired[str] + """ + Password for the private key file + """ + ssid: str + """ + Name of the WiFi network + """ + + +class ConfigurationUpdateParamsWifiPersonalPsk(TypedDict): + password: str + """ + Password for connecting to the WiFi network + """ + ssid: str + """ + Name of the WiFi network + """ diff --git a/stripe/params/terminal/_connection_token_create_params.py b/stripe/params/terminal/_connection_token_create_params.py new file mode 100644 index 000000000..5035f7e4b --- /dev/null +++ b/stripe/params/terminal/_connection_token_create_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 ConnectionTokenCreateParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + location: NotRequired[str] + """ + The id of the location that this connection token is scoped to. If specified the connection token will only be usable with readers assigned to that location, otherwise the connection token will be usable with all readers. Note that location scoping only applies to internet-connected readers. For more details, see [the docs on scoping connection tokens](https://docs.stripe.com/terminal/fleet/locations-and-zones?dashboard-or-api=api#connection-tokens). + """ diff --git a/stripe/params/terminal/_location_create_params.py b/stripe/params/terminal/_location_create_params.py new file mode 100644 index 000000000..72a484005 --- /dev/null +++ b/stripe/params/terminal/_location_create_params.py @@ -0,0 +1,137 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class LocationCreateParams(RequestOptions): + address: NotRequired["LocationCreateParamsAddress"] + """ + The full address of the location. + """ + address_kana: NotRequired["LocationCreateParamsAddressKana"] + """ + The Kana variation of the full address of the location (Japan only). + """ + address_kanji: NotRequired["LocationCreateParamsAddressKanji"] + """ + The Kanji variation of the full address of the location (Japan only). + """ + configuration_overrides: NotRequired[str] + """ + The ID of a configuration that will be used to customize all readers in this location. + """ + display_name: NotRequired[str] + """ + A name for the location. Maximum length is 1000 characters. + """ + display_name_kana: NotRequired[str] + """ + The Kana variation of the name for the location (Japan only). Maximum length is 1000 characters. + """ + display_name_kanji: NotRequired[str] + """ + The Kanji variation of the name for the location (Japan only). Maximum length is 1000 characters. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + phone: NotRequired[str] + """ + The phone number for the location. + """ + + +class LocationCreateParamsAddress(TypedDict): + city: NotRequired[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[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. + """ + + +class LocationCreateParamsAddressKana(TypedDict): + city: NotRequired[str] + """ + City or ward. + """ + 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] + """ + Block or building number. + """ + line2: NotRequired[str] + """ + Building details. + """ + postal_code: NotRequired[str] + """ + Postal code. + """ + state: NotRequired[str] + """ + Prefecture. + """ + town: NotRequired[str] + """ + Town or cho-me. + """ + + +class LocationCreateParamsAddressKanji(TypedDict): + city: NotRequired[str] + """ + City or ward. + """ + 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] + """ + Block or building number. + """ + line2: NotRequired[str] + """ + Building details. + """ + postal_code: NotRequired[str] + """ + Postal code. + """ + state: NotRequired[str] + """ + Prefecture. + """ + town: NotRequired[str] + """ + Town or cho-me. + """ diff --git a/stripe/params/terminal/_location_delete_params.py b/stripe/params/terminal/_location_delete_params.py new file mode 100644 index 000000000..d7f8582ca --- /dev/null +++ b/stripe/params/terminal/_location_delete_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions + + +class LocationDeleteParams(RequestOptions): + pass diff --git a/stripe/params/terminal/_location_list_params.py b/stripe/params/terminal/_location_list_params.py new file mode 100644 index 000000000..44de1fd82 --- /dev/null +++ b/stripe/params/terminal/_location_list_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 LocationListParams(RequestOptions): + 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. + """ diff --git a/stripe/params/terminal/_location_modify_params.py b/stripe/params/terminal/_location_modify_params.py new file mode 100644 index 000000000..f4c76e275 --- /dev/null +++ b/stripe/params/terminal/_location_modify_params.py @@ -0,0 +1,137 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class LocationModifyParams(RequestOptions): + address: NotRequired["LocationModifyParamsAddress"] + """ + The full address of the location. You can't change the location's `country`. If you need to modify the `country` field, create a new `Location` object and re-register any existing readers to that location. + """ + address_kana: NotRequired["LocationModifyParamsAddressKana"] + """ + The Kana variation of the full address of the location (Japan only). + """ + address_kanji: NotRequired["LocationModifyParamsAddressKanji"] + """ + The Kanji variation of the full address of the location (Japan only). + """ + configuration_overrides: NotRequired["Literal['']|str"] + """ + The ID of a configuration that will be used to customize all readers in this location. + """ + display_name: NotRequired["Literal['']|str"] + """ + A name for the location. + """ + display_name_kana: NotRequired["Literal['']|str"] + """ + The Kana variation of the name for the location (Japan only). + """ + display_name_kanji: NotRequired["Literal['']|str"] + """ + The Kanji variation of the name for the location (Japan only). + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + phone: NotRequired["Literal['']|str"] + """ + The phone number for the location. + """ + + +class LocationModifyParamsAddress(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. + """ + + +class LocationModifyParamsAddressKana(TypedDict): + city: NotRequired[str] + """ + City or ward. + """ + 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] + """ + Block or building number. + """ + line2: NotRequired[str] + """ + Building details. + """ + postal_code: NotRequired[str] + """ + Postal code. + """ + state: NotRequired[str] + """ + Prefecture. + """ + town: NotRequired[str] + """ + Town or cho-me. + """ + + +class LocationModifyParamsAddressKanji(TypedDict): + city: NotRequired[str] + """ + City or ward. + """ + 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] + """ + Block or building number. + """ + line2: NotRequired[str] + """ + Building details. + """ + postal_code: NotRequired[str] + """ + Postal code. + """ + state: NotRequired[str] + """ + Prefecture. + """ + town: NotRequired[str] + """ + Town or cho-me. + """ diff --git a/stripe/params/terminal/_location_retrieve_params.py b/stripe/params/terminal/_location_retrieve_params.py new file mode 100644 index 000000000..107563bb5 --- /dev/null +++ b/stripe/params/terminal/_location_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 LocationRetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/terminal/_location_update_params.py b/stripe/params/terminal/_location_update_params.py new file mode 100644 index 000000000..bd0083cbb --- /dev/null +++ b/stripe/params/terminal/_location_update_params.py @@ -0,0 +1,136 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class LocationUpdateParams(TypedDict): + address: NotRequired["LocationUpdateParamsAddress"] + """ + The full address of the location. You can't change the location's `country`. If you need to modify the `country` field, create a new `Location` object and re-register any existing readers to that location. + """ + address_kana: NotRequired["LocationUpdateParamsAddressKana"] + """ + The Kana variation of the full address of the location (Japan only). + """ + address_kanji: NotRequired["LocationUpdateParamsAddressKanji"] + """ + The Kanji variation of the full address of the location (Japan only). + """ + configuration_overrides: NotRequired["Literal['']|str"] + """ + The ID of a configuration that will be used to customize all readers in this location. + """ + display_name: NotRequired["Literal['']|str"] + """ + A name for the location. + """ + display_name_kana: NotRequired["Literal['']|str"] + """ + The Kana variation of the name for the location (Japan only). + """ + display_name_kanji: NotRequired["Literal['']|str"] + """ + The Kanji variation of the name for the location (Japan only). + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + phone: NotRequired["Literal['']|str"] + """ + The phone number for the location. + """ + + +class LocationUpdateParamsAddress(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. + """ + + +class LocationUpdateParamsAddressKana(TypedDict): + city: NotRequired[str] + """ + City or ward. + """ + 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] + """ + Block or building number. + """ + line2: NotRequired[str] + """ + Building details. + """ + postal_code: NotRequired[str] + """ + Postal code. + """ + state: NotRequired[str] + """ + Prefecture. + """ + town: NotRequired[str] + """ + Town or cho-me. + """ + + +class LocationUpdateParamsAddressKanji(TypedDict): + city: NotRequired[str] + """ + City or ward. + """ + 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] + """ + Block or building number. + """ + line2: NotRequired[str] + """ + Building details. + """ + postal_code: NotRequired[str] + """ + Postal code. + """ + state: NotRequired[str] + """ + Prefecture. + """ + town: NotRequired[str] + """ + Town or cho-me. + """ diff --git a/stripe/params/terminal/_onboarding_link_create_params.py b/stripe/params/terminal/_onboarding_link_create_params.py new file mode 100644 index 000000000..d16ca8505 --- /dev/null +++ b/stripe/params/terminal/_onboarding_link_create_params.py @@ -0,0 +1,44 @@ +# -*- 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, TypedDict + + +class OnboardingLinkCreateParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + link_options: "OnboardingLinkCreateParamsLinkOptions" + """ + Specific fields needed to generate the desired link type. + """ + link_type: Literal["apple_terms_and_conditions"] + """ + The type of link being generated. + """ + on_behalf_of: NotRequired[str] + """ + Stripe account ID to generate the link for. + """ + + +class OnboardingLinkCreateParamsLinkOptions(TypedDict): + apple_terms_and_conditions: NotRequired[ + "OnboardingLinkCreateParamsLinkOptionsAppleTermsAndConditions" + ] + """ + The options associated with the Apple Terms and Conditions link type. + """ + + +class OnboardingLinkCreateParamsLinkOptionsAppleTermsAndConditions(TypedDict): + allow_relinking: NotRequired[bool] + """ + Whether the link should also support users relinking their Apple account. + """ + merchant_display_name: str + """ + The business name of the merchant accepting Apple's Terms and Conditions. + """ diff --git a/stripe/params/terminal/_reader_cancel_action_params.py b/stripe/params/terminal/_reader_cancel_action_params.py new file mode 100644 index 000000000..13541d52a --- /dev/null +++ b/stripe/params/terminal/_reader_cancel_action_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 ReaderCancelActionParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/terminal/_reader_collect_inputs_params.py b/stripe/params/terminal/_reader_collect_inputs_params.py new file mode 100644 index 000000000..90ca68798 --- /dev/null +++ b/stripe/params/terminal/_reader_collect_inputs_params.py @@ -0,0 +1,101 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class ReaderCollectInputsParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + inputs: List["ReaderCollectInputsParamsInput"] + """ + List of inputs to be collected using the Reader + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + + +class ReaderCollectInputsParamsInput(TypedDict): + custom_text: "ReaderCollectInputsParamsInputCustomText" + """ + Customize the text which will be displayed while collecting this input + """ + required: NotRequired[bool] + """ + Indicate that this input is required, disabling the skip button + """ + selection: NotRequired["ReaderCollectInputsParamsInputSelection"] + """ + Options for the `selection` input + """ + toggles: NotRequired[List["ReaderCollectInputsParamsInputToggle"]] + """ + List of toggles to be displayed and customization for the toggles + """ + type: Literal[ + "email", "numeric", "phone", "selection", "signature", "text" + ] + """ + The type of input to collect + """ + + +class ReaderCollectInputsParamsInputCustomText(TypedDict): + description: NotRequired[str] + """ + The description which will be displayed when collecting this input + """ + skip_button: NotRequired[str] + """ + The skip button text + """ + submit_button: NotRequired[str] + """ + The submit button text + """ + title: str + """ + The title which will be displayed when collecting this input + """ + + +class ReaderCollectInputsParamsInputSelection(TypedDict): + choices: List["ReaderCollectInputsParamsInputSelectionChoice"] + """ + List of choices for the `selection` input + """ + + +class ReaderCollectInputsParamsInputSelectionChoice(TypedDict): + id: str + """ + The unique identifier for this choice + """ + style: NotRequired[Literal["primary", "secondary"]] + """ + The style of the button which will be shown for this choice + """ + text: str + """ + The text which will be shown on the button for this choice + """ + + +class ReaderCollectInputsParamsInputToggle(TypedDict): + default_value: NotRequired[Literal["disabled", "enabled"]] + """ + The default value of the toggle + """ + description: NotRequired[str] + """ + The description which will be displayed for the toggle + """ + title: NotRequired[str] + """ + The title which will be displayed for the toggle + """ diff --git a/stripe/params/terminal/_reader_collect_payment_method_params.py b/stripe/params/terminal/_reader_collect_payment_method_params.py new file mode 100644 index 000000000..f6572c95e --- /dev/null +++ b/stripe/params/terminal/_reader_collect_payment_method_params.py @@ -0,0 +1,50 @@ +# -*- 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, TypedDict + + +class ReaderCollectPaymentMethodParams(RequestOptions): + collect_config: NotRequired[ + "ReaderCollectPaymentMethodParamsCollectConfig" + ] + """ + Configuration overrides. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + payment_intent: str + """ + PaymentIntent ID. + """ + + +class ReaderCollectPaymentMethodParamsCollectConfig(TypedDict): + allow_redisplay: NotRequired[Literal["always", "limited", "unspecified"]] + """ + This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. + """ + enable_customer_cancellation: NotRequired[bool] + """ + Enables cancel button on transaction screens. + """ + skip_tipping: NotRequired[bool] + """ + Override showing a tipping selection screen on this transaction. + """ + tipping: NotRequired[ + "ReaderCollectPaymentMethodParamsCollectConfigTipping" + ] + """ + Tipping configuration for this transaction. + """ + + +class ReaderCollectPaymentMethodParamsCollectConfigTipping(TypedDict): + amount_eligible: NotRequired[int] + """ + Amount used to calculate tip suggestions on tipping selection screen for this transaction. Must be a positive integer in the smallest currency unit (e.g., 100 cents to represent $1.00 or 100 to represent ¥100, a zero-decimal currency). + """ diff --git a/stripe/params/terminal/_reader_collected_data_retrieve_params.py b/stripe/params/terminal/_reader_collected_data_retrieve_params.py new file mode 100644 index 000000000..4172306d0 --- /dev/null +++ b/stripe/params/terminal/_reader_collected_data_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 ReaderCollectedDataRetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/terminal/_reader_confirm_payment_intent_params.py b/stripe/params/terminal/_reader_confirm_payment_intent_params.py new file mode 100644 index 000000000..47785c3fa --- /dev/null +++ b/stripe/params/terminal/_reader_confirm_payment_intent_params.py @@ -0,0 +1,29 @@ +# -*- 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 ReaderConfirmPaymentIntentParams(RequestOptions): + confirm_config: NotRequired[ + "ReaderConfirmPaymentIntentParamsConfirmConfig" + ] + """ + Configuration overrides. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + payment_intent: str + """ + PaymentIntent ID. + """ + + +class ReaderConfirmPaymentIntentParamsConfirmConfig(TypedDict): + return_url: NotRequired[str] + """ + The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. + """ diff --git a/stripe/params/terminal/_reader_create_params.py b/stripe/params/terminal/_reader_create_params.py new file mode 100644 index 000000000..6e6d550d7 --- /dev/null +++ b/stripe/params/terminal/_reader_create_params.py @@ -0,0 +1,28 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import Literal, NotRequired + + +class ReaderCreateParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + label: NotRequired[str] + """ + Custom label given to the reader for easier identification. If no label is specified, the registration code will be used. + """ + location: NotRequired[str] + """ + The location to assign the reader to. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + registration_code: str + """ + A code generated by the reader used for registering to an account. + """ diff --git a/stripe/params/terminal/_reader_delete_params.py b/stripe/params/terminal/_reader_delete_params.py new file mode 100644 index 000000000..a9ac7242c --- /dev/null +++ b/stripe/params/terminal/_reader_delete_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions + + +class ReaderDeleteParams(RequestOptions): + pass diff --git a/stripe/params/terminal/_reader_list_params.py b/stripe/params/terminal/_reader_list_params.py new file mode 100644 index 000000000..6f77b07ab --- /dev/null +++ b/stripe/params/terminal/_reader_list_params.py @@ -0,0 +1,52 @@ +# -*- 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 ReaderListParams(RequestOptions): + device_type: NotRequired[ + Literal[ + "bbpos_chipper2x", + "bbpos_wisepad3", + "bbpos_wisepos_e", + "mobile_phone_reader", + "simulated_stripe_s700", + "simulated_wisepos_e", + "stripe_m2", + "stripe_s700", + "verifone_P400", + ] + ] + """ + Filters readers by device type + """ + 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. + """ + location: NotRequired[str] + """ + A location ID to filter the response list to only readers at the specific location + """ + serial_number: NotRequired[str] + """ + Filters readers by serial number + """ + 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. + """ + status: NotRequired[Literal["offline", "online"]] + """ + A status filter to filter readers to only offline or online readers + """ diff --git a/stripe/params/terminal/_reader_modify_params.py b/stripe/params/terminal/_reader_modify_params.py new file mode 100644 index 000000000..da2d79c97 --- /dev/null +++ b/stripe/params/terminal/_reader_modify_params.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import Literal, NotRequired + + +class ReaderModifyParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + label: NotRequired["Literal['']|str"] + """ + The new label of the reader. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ diff --git a/stripe/params/terminal/_reader_present_payment_method_params.py b/stripe/params/terminal/_reader_present_payment_method_params.py new file mode 100644 index 000000000..c73ce6ea1 --- /dev/null +++ b/stripe/params/terminal/_reader_present_payment_method_params.py @@ -0,0 +1,67 @@ +# -*- 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, TypedDict + + +class ReaderPresentPaymentMethodParams(RequestOptions): + amount_tip: NotRequired[int] + """ + Simulated on-reader tip amount. + """ + card: NotRequired["ReaderPresentPaymentMethodParamsCard"] + """ + Simulated data for the card payment method. + """ + card_present: NotRequired["ReaderPresentPaymentMethodParamsCardPresent"] + """ + Simulated data for the card_present payment method. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + interac_present: NotRequired[ + "ReaderPresentPaymentMethodParamsInteracPresent" + ] + """ + Simulated data for the interac_present payment method. + """ + type: NotRequired[Literal["card", "card_present", "interac_present"]] + """ + Simulated payment type. + """ + + +class ReaderPresentPaymentMethodParamsCard(TypedDict): + cvc: NotRequired[str] + """ + Card security code. + """ + exp_month: int + """ + Two-digit number representing the card's expiration month. + """ + exp_year: int + """ + Two- or four-digit number representing the card's expiration year. + """ + number: str + """ + The card number, as a string without any separators. + """ + + +class ReaderPresentPaymentMethodParamsCardPresent(TypedDict): + number: NotRequired[str] + """ + The card number, as a string without any separators. + """ + + +class ReaderPresentPaymentMethodParamsInteracPresent(TypedDict): + number: NotRequired[str] + """ + Card Number + """ diff --git a/stripe/params/terminal/_reader_process_payment_intent_params.py b/stripe/params/terminal/_reader_process_payment_intent_params.py new file mode 100644 index 000000000..e1207d8ae --- /dev/null +++ b/stripe/params/terminal/_reader_process_payment_intent_params.py @@ -0,0 +1,54 @@ +# -*- 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, TypedDict + + +class ReaderProcessPaymentIntentParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + payment_intent: str + """ + PaymentIntent ID + """ + process_config: NotRequired[ + "ReaderProcessPaymentIntentParamsProcessConfig" + ] + """ + Configuration overrides + """ + + +class ReaderProcessPaymentIntentParamsProcessConfig(TypedDict): + allow_redisplay: NotRequired[Literal["always", "limited", "unspecified"]] + """ + This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. + """ + enable_customer_cancellation: NotRequired[bool] + """ + Enables cancel button on transaction screens. + """ + return_url: NotRequired[str] + """ + The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. + """ + skip_tipping: NotRequired[bool] + """ + Override showing a tipping selection screen on this transaction. + """ + tipping: NotRequired[ + "ReaderProcessPaymentIntentParamsProcessConfigTipping" + ] + """ + Tipping configuration for this transaction. + """ + + +class ReaderProcessPaymentIntentParamsProcessConfigTipping(TypedDict): + amount_eligible: NotRequired[int] + """ + Amount used to calculate tip suggestions on tipping selection screen for this transaction. Must be a positive integer in the smallest currency unit (e.g., 100 cents to represent $1.00 or 100 to represent ¥100, a zero-decimal currency). + """ diff --git a/stripe/params/terminal/_reader_process_setup_intent_params.py b/stripe/params/terminal/_reader_process_setup_intent_params.py new file mode 100644 index 000000000..0f98f8bb1 --- /dev/null +++ b/stripe/params/terminal/_reader_process_setup_intent_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 Literal, NotRequired, TypedDict + + +class ReaderProcessSetupIntentParams(RequestOptions): + allow_redisplay: Literal["always", "limited", "unspecified"] + """ + This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + process_config: NotRequired["ReaderProcessSetupIntentParamsProcessConfig"] + """ + Configuration overrides + """ + setup_intent: str + """ + SetupIntent ID + """ + + +class ReaderProcessSetupIntentParamsProcessConfig(TypedDict): + enable_customer_cancellation: NotRequired[bool] + """ + Enables cancel button on transaction screens. + """ diff --git a/stripe/params/terminal/_reader_refund_payment_params.py b/stripe/params/terminal/_reader_refund_payment_params.py new file mode 100644 index 000000000..2cb33c244 --- /dev/null +++ b/stripe/params/terminal/_reader_refund_payment_params.py @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import NotRequired, TypedDict + + +class ReaderRefundPaymentParams(RequestOptions): + amount: NotRequired[int] + """ + A positive integer in __cents__ representing how much of this charge to refund. + """ + charge: NotRequired[str] + """ + ID of the Charge to refund. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + payment_intent: NotRequired[str] + """ + ID of the PaymentIntent to refund. + """ + refund_application_fee: NotRequired[bool] + """ + Boolean indicating whether the application fee should be refunded when refunding this charge. If a full charge refund is given, the full application fee will be refunded. Otherwise, the application fee will be refunded in an amount proportional to the amount of the charge refunded. An application fee can be refunded only by the application that created the charge. + """ + refund_payment_config: NotRequired[ + "ReaderRefundPaymentParamsRefundPaymentConfig" + ] + """ + Configuration overrides + """ + reverse_transfer: NotRequired[bool] + """ + Boolean indicating whether the transfer should be reversed when refunding this charge. The transfer will be reversed proportionally to the amount being refunded (either the entire or partial amount). A transfer can be reversed only by the application that created the charge. + """ + + +class ReaderRefundPaymentParamsRefundPaymentConfig(TypedDict): + enable_customer_cancellation: NotRequired[bool] + """ + Enables cancel button on transaction screens. + """ diff --git a/stripe/params/terminal/_reader_retrieve_params.py b/stripe/params/terminal/_reader_retrieve_params.py new file mode 100644 index 000000000..172fa8d8e --- /dev/null +++ b/stripe/params/terminal/_reader_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 ReaderRetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/terminal/_reader_set_reader_display_params.py b/stripe/params/terminal/_reader_set_reader_display_params.py new file mode 100644 index 000000000..bc4b3f77c --- /dev/null +++ b/stripe/params/terminal/_reader_set_reader_display_params.py @@ -0,0 +1,54 @@ +# -*- 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, TypedDict + + +class ReaderSetReaderDisplayParams(RequestOptions): + cart: NotRequired["ReaderSetReaderDisplayParamsCart"] + """ + Cart + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + type: Literal["cart"] + """ + Type + """ + + +class ReaderSetReaderDisplayParamsCart(TypedDict): + 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). + """ + line_items: List["ReaderSetReaderDisplayParamsCartLineItem"] + """ + Array of line items that were purchased. + """ + tax: NotRequired[int] + """ + The amount of tax in cents. + """ + total: int + """ + Total balance of cart due in cents. + """ + + +class ReaderSetReaderDisplayParamsCartLineItem(TypedDict): + amount: int + """ + The price of the item in cents. + """ + description: str + """ + The description or name of the item. + """ + quantity: int + """ + The quantity of the line item being purchased. + """ diff --git a/stripe/params/terminal/_reader_succeed_input_collection_params.py b/stripe/params/terminal/_reader_succeed_input_collection_params.py new file mode 100644 index 000000000..0872d72aa --- /dev/null +++ b/stripe/params/terminal/_reader_succeed_input_collection_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 Literal, NotRequired + + +class ReaderSucceedInputCollectionParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + skip_non_required_inputs: NotRequired[Literal["all", "none"]] + """ + This parameter defines the skip behavior for input collection. + """ diff --git a/stripe/params/terminal/_reader_timeout_input_collection_params.py b/stripe/params/terminal/_reader_timeout_input_collection_params.py new file mode 100644 index 000000000..4a25a66bd --- /dev/null +++ b/stripe/params/terminal/_reader_timeout_input_collection_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 ReaderTimeoutInputCollectionParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/terminal/_reader_update_params.py b/stripe/params/terminal/_reader_update_params.py new file mode 100644 index 000000000..25b94dc25 --- /dev/null +++ b/stripe/params/terminal/_reader_update_params.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class ReaderUpdateParams(TypedDict): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + label: NotRequired["Literal['']|str"] + """ + The new label of the reader. + """ + metadata: NotRequired["Literal['']|Dict[str, str]"] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ diff --git a/stripe/params/test_helpers/__init__.py b/stripe/params/test_helpers/__init__.py new file mode 100644 index 000000000..614d61c29 --- /dev/null +++ b/stripe/params/test_helpers/__init__.py @@ -0,0 +1,31 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe.params.test_helpers import ( + issuing as issuing, + terminal as terminal, + treasury as treasury, +) +from stripe.params.test_helpers._confirmation_token_create_params import ( + ConfirmationTokenCreateParams as ConfirmationTokenCreateParams, +) +from stripe.params.test_helpers._customer_fund_cash_balance_params import ( + CustomerFundCashBalanceParams as CustomerFundCashBalanceParams, +) +from stripe.params.test_helpers._refund_expire_params import ( + RefundExpireParams as RefundExpireParams, +) +from stripe.params.test_helpers._test_clock_advance_params import ( + TestClockAdvanceParams as TestClockAdvanceParams, +) +from stripe.params.test_helpers._test_clock_create_params import ( + TestClockCreateParams as TestClockCreateParams, +) +from stripe.params.test_helpers._test_clock_delete_params import ( + TestClockDeleteParams as TestClockDeleteParams, +) +from stripe.params.test_helpers._test_clock_list_params import ( + TestClockListParams as TestClockListParams, +) +from stripe.params.test_helpers._test_clock_retrieve_params import ( + TestClockRetrieveParams as TestClockRetrieveParams, +) diff --git a/stripe/params/test_helpers/_confirmation_token_create_params.py b/stripe/params/test_helpers/_confirmation_token_create_params.py new file mode 100644 index 000000000..8686a1915 --- /dev/null +++ b/stripe/params/test_helpers/_confirmation_token_create_params.py @@ -0,0 +1,1044 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class ConfirmationTokenCreateParams(TypedDict): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + payment_method: NotRequired[str] + """ + ID of an existing PaymentMethod. + """ + payment_method_data: NotRequired[ + "ConfirmationTokenCreateParamsPaymentMethodData" + ] + """ + If provided, this hash will be used to create a PaymentMethod. + """ + payment_method_options: NotRequired[ + "ConfirmationTokenCreateParamsPaymentMethodOptions" + ] + """ + Payment-method-specific configuration for this ConfirmationToken. + """ + return_url: NotRequired[str] + """ + Return URL used to confirm the Intent. + """ + setup_future_usage: NotRequired[Literal["off_session", "on_session"]] + """ + Indicates that you intend to make future payments with this ConfirmationToken's payment method. + + The presence of this property will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. + """ + shipping: NotRequired["ConfirmationTokenCreateParamsShipping"] + """ + Shipping information for this ConfirmationToken. + """ + + +class ConfirmationTokenCreateParamsPaymentMethodData(TypedDict): + acss_debit: NotRequired[ + "ConfirmationTokenCreateParamsPaymentMethodDataAcssDebit" + ] + """ + If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method. + """ + affirm: NotRequired["ConfirmationTokenCreateParamsPaymentMethodDataAffirm"] + """ + If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method. + """ + afterpay_clearpay: NotRequired[ + "ConfirmationTokenCreateParamsPaymentMethodDataAfterpayClearpay" + ] + """ + If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method. + """ + alipay: NotRequired["ConfirmationTokenCreateParamsPaymentMethodDataAlipay"] + """ + If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. + """ + allow_redisplay: NotRequired[Literal["always", "limited", "unspecified"]] + """ + This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`. + """ + alma: NotRequired["ConfirmationTokenCreateParamsPaymentMethodDataAlma"] + """ + If this is a Alma PaymentMethod, this hash contains details about the Alma payment method. + """ + amazon_pay: NotRequired[ + "ConfirmationTokenCreateParamsPaymentMethodDataAmazonPay" + ] + """ + If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method. + """ + au_becs_debit: NotRequired[ + "ConfirmationTokenCreateParamsPaymentMethodDataAuBecsDebit" + ] + """ + If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. + """ + bacs_debit: NotRequired[ + "ConfirmationTokenCreateParamsPaymentMethodDataBacsDebit" + ] + """ + If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account. + """ + bancontact: NotRequired[ + "ConfirmationTokenCreateParamsPaymentMethodDataBancontact" + ] + """ + If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method. + """ + billie: NotRequired["ConfirmationTokenCreateParamsPaymentMethodDataBillie"] + """ + If this is a `billie` PaymentMethod, this hash contains details about the Billie payment method. + """ + billing_details: NotRequired[ + "ConfirmationTokenCreateParamsPaymentMethodDataBillingDetails" + ] + """ + Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. + """ + blik: NotRequired["ConfirmationTokenCreateParamsPaymentMethodDataBlik"] + """ + If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method. + """ + boleto: NotRequired["ConfirmationTokenCreateParamsPaymentMethodDataBoleto"] + """ + If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method. + """ + cashapp: NotRequired[ + "ConfirmationTokenCreateParamsPaymentMethodDataCashapp" + ] + """ + If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. + """ + crypto: NotRequired["ConfirmationTokenCreateParamsPaymentMethodDataCrypto"] + """ + If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment method. + """ + customer_balance: NotRequired[ + "ConfirmationTokenCreateParamsPaymentMethodDataCustomerBalance" + ] + """ + If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. + """ + eps: NotRequired["ConfirmationTokenCreateParamsPaymentMethodDataEps"] + """ + If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. + """ + fpx: NotRequired["ConfirmationTokenCreateParamsPaymentMethodDataFpx"] + """ + If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method. + """ + giropay: NotRequired[ + "ConfirmationTokenCreateParamsPaymentMethodDataGiropay" + ] + """ + If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method. + """ + gopay: NotRequired["ConfirmationTokenCreateParamsPaymentMethodDataGopay"] + """ + If this is a Gopay PaymentMethod, this hash contains details about the Gopay payment method. + """ + grabpay: NotRequired[ + "ConfirmationTokenCreateParamsPaymentMethodDataGrabpay" + ] + """ + If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method. + """ + id_bank_transfer: NotRequired[ + "ConfirmationTokenCreateParamsPaymentMethodDataIdBankTransfer" + ] + """ + If this is an `IdBankTransfer` PaymentMethod, this hash contains details about the IdBankTransfer payment method. + """ + ideal: NotRequired["ConfirmationTokenCreateParamsPaymentMethodDataIdeal"] + """ + If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. + """ + interac_present: NotRequired[ + "ConfirmationTokenCreateParamsPaymentMethodDataInteracPresent" + ] + """ + If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. + """ + kakao_pay: NotRequired[ + "ConfirmationTokenCreateParamsPaymentMethodDataKakaoPay" + ] + """ + If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method. + """ + klarna: NotRequired["ConfirmationTokenCreateParamsPaymentMethodDataKlarna"] + """ + If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method. + """ + konbini: NotRequired[ + "ConfirmationTokenCreateParamsPaymentMethodDataKonbini" + ] + """ + If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. + """ + kr_card: NotRequired[ + "ConfirmationTokenCreateParamsPaymentMethodDataKrCard" + ] + """ + If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method. + """ + link: NotRequired["ConfirmationTokenCreateParamsPaymentMethodDataLink"] + """ + If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. + """ + mb_way: NotRequired["ConfirmationTokenCreateParamsPaymentMethodDataMbWay"] + """ + If this is a MB WAY PaymentMethod, this hash contains details about the MB WAY payment method. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + mobilepay: NotRequired[ + "ConfirmationTokenCreateParamsPaymentMethodDataMobilepay" + ] + """ + If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method. + """ + multibanco: NotRequired[ + "ConfirmationTokenCreateParamsPaymentMethodDataMultibanco" + ] + """ + If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method. + """ + naver_pay: NotRequired[ + "ConfirmationTokenCreateParamsPaymentMethodDataNaverPay" + ] + """ + If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method. + """ + nz_bank_account: NotRequired[ + "ConfirmationTokenCreateParamsPaymentMethodDataNzBankAccount" + ] + """ + If this is an nz_bank_account PaymentMethod, this hash contains details about the nz_bank_account payment method. + """ + oxxo: NotRequired["ConfirmationTokenCreateParamsPaymentMethodDataOxxo"] + """ + If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. + """ + p24: NotRequired["ConfirmationTokenCreateParamsPaymentMethodDataP24"] + """ + If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. + """ + pay_by_bank: NotRequired[ + "ConfirmationTokenCreateParamsPaymentMethodDataPayByBank" + ] + """ + If this is a `pay_by_bank` PaymentMethod, this hash contains details about the PayByBank payment method. + """ + payco: NotRequired["ConfirmationTokenCreateParamsPaymentMethodDataPayco"] + """ + If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method. + """ + paynow: NotRequired["ConfirmationTokenCreateParamsPaymentMethodDataPaynow"] + """ + If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method. + """ + paypal: NotRequired["ConfirmationTokenCreateParamsPaymentMethodDataPaypal"] + """ + If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method. + """ + paypay: NotRequired["ConfirmationTokenCreateParamsPaymentMethodDataPaypay"] + """ + If this is a `paypay` PaymentMethod, this hash contains details about the PayPay payment method. + """ + payto: NotRequired["ConfirmationTokenCreateParamsPaymentMethodDataPayto"] + """ + If this is a `payto` PaymentMethod, this hash contains details about the PayTo payment method. + """ + pix: NotRequired["ConfirmationTokenCreateParamsPaymentMethodDataPix"] + """ + If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method. + """ + promptpay: NotRequired[ + "ConfirmationTokenCreateParamsPaymentMethodDataPromptpay" + ] + """ + If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method. + """ + qris: NotRequired["ConfirmationTokenCreateParamsPaymentMethodDataQris"] + """ + If this is a `qris` PaymentMethod, this hash contains details about the QRIS payment method. + """ + radar_options: NotRequired[ + "ConfirmationTokenCreateParamsPaymentMethodDataRadarOptions" + ] + """ + Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. + """ + rechnung: NotRequired[ + "ConfirmationTokenCreateParamsPaymentMethodDataRechnung" + ] + """ + If this is a `rechnung` PaymentMethod, this hash contains details about the Rechnung payment method. + """ + revolut_pay: NotRequired[ + "ConfirmationTokenCreateParamsPaymentMethodDataRevolutPay" + ] + """ + If this is a `revolut_pay` PaymentMethod, this hash contains details about the Revolut Pay payment method. + """ + samsung_pay: NotRequired[ + "ConfirmationTokenCreateParamsPaymentMethodDataSamsungPay" + ] + """ + If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method. + """ + satispay: NotRequired[ + "ConfirmationTokenCreateParamsPaymentMethodDataSatispay" + ] + """ + If this is a `satispay` PaymentMethod, this hash contains details about the Satispay payment method. + """ + sepa_debit: NotRequired[ + "ConfirmationTokenCreateParamsPaymentMethodDataSepaDebit" + ] + """ + If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. + """ + shopeepay: NotRequired[ + "ConfirmationTokenCreateParamsPaymentMethodDataShopeepay" + ] + """ + If this is a Shopeepay PaymentMethod, this hash contains details about the Shopeepay payment method. + """ + sofort: NotRequired["ConfirmationTokenCreateParamsPaymentMethodDataSofort"] + """ + If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. + """ + stripe_balance: NotRequired[ + "ConfirmationTokenCreateParamsPaymentMethodDataStripeBalance" + ] + """ + This hash contains details about the Stripe balance payment method. + """ + swish: NotRequired["ConfirmationTokenCreateParamsPaymentMethodDataSwish"] + """ + If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method. + """ + twint: NotRequired["ConfirmationTokenCreateParamsPaymentMethodDataTwint"] + """ + If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method. + """ + type: Literal[ + "acss_debit", + "affirm", + "afterpay_clearpay", + "alipay", + "alma", + "amazon_pay", + "au_becs_debit", + "bacs_debit", + "bancontact", + "billie", + "blik", + "boleto", + "cashapp", + "crypto", + "customer_balance", + "eps", + "fpx", + "giropay", + "gopay", + "grabpay", + "id_bank_transfer", + "ideal", + "kakao_pay", + "klarna", + "konbini", + "kr_card", + "link", + "mb_way", + "mobilepay", + "multibanco", + "naver_pay", + "nz_bank_account", + "oxxo", + "p24", + "pay_by_bank", + "payco", + "paynow", + "paypal", + "paypay", + "payto", + "pix", + "promptpay", + "qris", + "rechnung", + "revolut_pay", + "samsung_pay", + "satispay", + "sepa_debit", + "shopeepay", + "sofort", + "stripe_balance", + "swish", + "twint", + "us_bank_account", + "wechat_pay", + "zip", + ] + """ + The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. + """ + us_bank_account: NotRequired[ + "ConfirmationTokenCreateParamsPaymentMethodDataUsBankAccount" + ] + """ + If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. + """ + wechat_pay: NotRequired[ + "ConfirmationTokenCreateParamsPaymentMethodDataWechatPay" + ] + """ + If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method. + """ + zip: NotRequired["ConfirmationTokenCreateParamsPaymentMethodDataZip"] + """ + If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method. + """ + + +class ConfirmationTokenCreateParamsPaymentMethodDataAcssDebit(TypedDict): + account_number: str + """ + Customer's bank account number. + """ + institution_number: str + """ + Institution number of the customer's bank. + """ + transit_number: str + """ + Transit number of the customer's bank. + """ + + +class ConfirmationTokenCreateParamsPaymentMethodDataAffirm(TypedDict): + pass + + +class ConfirmationTokenCreateParamsPaymentMethodDataAfterpayClearpay( + TypedDict +): + pass + + +class ConfirmationTokenCreateParamsPaymentMethodDataAlipay(TypedDict): + pass + + +class ConfirmationTokenCreateParamsPaymentMethodDataAlma(TypedDict): + pass + + +class ConfirmationTokenCreateParamsPaymentMethodDataAmazonPay(TypedDict): + pass + + +class ConfirmationTokenCreateParamsPaymentMethodDataAuBecsDebit(TypedDict): + account_number: str + """ + The account number for the bank account. + """ + bsb_number: str + """ + Bank-State-Branch number of the bank account. + """ + + +class ConfirmationTokenCreateParamsPaymentMethodDataBacsDebit(TypedDict): + account_number: NotRequired[str] + """ + Account number of the bank account that the funds will be debited from. + """ + sort_code: NotRequired[str] + """ + Sort code of the bank account. (e.g., `10-20-30`) + """ + + +class ConfirmationTokenCreateParamsPaymentMethodDataBancontact(TypedDict): + pass + + +class ConfirmationTokenCreateParamsPaymentMethodDataBillie(TypedDict): + pass + + +class ConfirmationTokenCreateParamsPaymentMethodDataBillingDetails(TypedDict): + address: NotRequired[ + "Literal['']|ConfirmationTokenCreateParamsPaymentMethodDataBillingDetailsAddress" + ] + """ + Billing address. + """ + email: NotRequired["Literal['']|str"] + """ + Email address. + """ + name: NotRequired["Literal['']|str"] + """ + Full name. + """ + phone: NotRequired["Literal['']|str"] + """ + Billing phone number (including extension). + """ + tax_id: NotRequired[str] + """ + Taxpayer identification number. Used only for transactions between LATAM buyers and non-LATAM sellers. + """ + + +class ConfirmationTokenCreateParamsPaymentMethodDataBillingDetailsAddress( + 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. + """ + + +class ConfirmationTokenCreateParamsPaymentMethodDataBlik(TypedDict): + pass + + +class ConfirmationTokenCreateParamsPaymentMethodDataBoleto(TypedDict): + tax_id: str + """ + The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers) + """ + + +class ConfirmationTokenCreateParamsPaymentMethodDataCashapp(TypedDict): + pass + + +class ConfirmationTokenCreateParamsPaymentMethodDataCrypto(TypedDict): + pass + + +class ConfirmationTokenCreateParamsPaymentMethodDataCustomerBalance(TypedDict): + pass + + +class ConfirmationTokenCreateParamsPaymentMethodDataEps(TypedDict): + bank: NotRequired[ + Literal[ + "arzte_und_apotheker_bank", + "austrian_anadi_bank_ag", + "bank_austria", + "bankhaus_carl_spangler", + "bankhaus_schelhammer_und_schattera_ag", + "bawag_psk_ag", + "bks_bank_ag", + "brull_kallmus_bank_ag", + "btv_vier_lander_bank", + "capital_bank_grawe_gruppe_ag", + "deutsche_bank_ag", + "dolomitenbank", + "easybank_ag", + "erste_bank_und_sparkassen", + "hypo_alpeadriabank_international_ag", + "hypo_bank_burgenland_aktiengesellschaft", + "hypo_noe_lb_fur_niederosterreich_u_wien", + "hypo_oberosterreich_salzburg_steiermark", + "hypo_tirol_bank_ag", + "hypo_vorarlberg_bank_ag", + "marchfelder_bank", + "oberbank_ag", + "raiffeisen_bankengruppe_osterreich", + "schoellerbank_ag", + "sparda_bank_wien", + "volksbank_gruppe", + "volkskreditbank_ag", + "vr_bank_braunau", + ] + ] + """ + The customer's bank. + """ + + +class ConfirmationTokenCreateParamsPaymentMethodDataFpx(TypedDict): + account_holder_type: NotRequired[Literal["company", "individual"]] + """ + Account holder type for FPX transaction + """ + bank: Literal[ + "affin_bank", + "agrobank", + "alliance_bank", + "ambank", + "bank_islam", + "bank_muamalat", + "bank_of_china", + "bank_rakyat", + "bsn", + "cimb", + "deutsche_bank", + "hong_leong_bank", + "hsbc", + "kfh", + "maybank2e", + "maybank2u", + "ocbc", + "pb_enterprise", + "public_bank", + "rhb", + "standard_chartered", + "uob", + ] + """ + The customer's bank. + """ + + +class ConfirmationTokenCreateParamsPaymentMethodDataGiropay(TypedDict): + pass + + +class ConfirmationTokenCreateParamsPaymentMethodDataGopay(TypedDict): + pass + + +class ConfirmationTokenCreateParamsPaymentMethodDataGrabpay(TypedDict): + pass + + +class ConfirmationTokenCreateParamsPaymentMethodDataIdBankTransfer(TypedDict): + bank: NotRequired[Literal["bca", "bni", "bri", "cimb", "permata"]] + """ + Bank where the account is held. + """ + + +class ConfirmationTokenCreateParamsPaymentMethodDataIdeal(TypedDict): + bank: NotRequired[ + Literal[ + "abn_amro", + "asn_bank", + "bunq", + "buut", + "handelsbanken", + "ing", + "knab", + "moneyou", + "n26", + "nn", + "rabobank", + "regiobank", + "revolut", + "sns_bank", + "triodos_bank", + "van_lanschot", + "yoursafe", + ] + ] + """ + The customer's bank. Only use this parameter for existing customers. Don't use it for new customers. + """ + + +class ConfirmationTokenCreateParamsPaymentMethodDataInteracPresent(TypedDict): + pass + + +class ConfirmationTokenCreateParamsPaymentMethodDataKakaoPay(TypedDict): + pass + + +class ConfirmationTokenCreateParamsPaymentMethodDataKlarna(TypedDict): + dob: NotRequired["ConfirmationTokenCreateParamsPaymentMethodDataKlarnaDob"] + """ + Customer's date of birth + """ + + +class ConfirmationTokenCreateParamsPaymentMethodDataKlarnaDob(TypedDict): + day: int + """ + The day of birth, between 1 and 31. + """ + month: int + """ + The month of birth, between 1 and 12. + """ + year: int + """ + The four-digit year of birth. + """ + + +class ConfirmationTokenCreateParamsPaymentMethodDataKonbini(TypedDict): + pass + + +class ConfirmationTokenCreateParamsPaymentMethodDataKrCard(TypedDict): + pass + + +class ConfirmationTokenCreateParamsPaymentMethodDataLink(TypedDict): + pass + + +class ConfirmationTokenCreateParamsPaymentMethodDataMbWay(TypedDict): + pass + + +class ConfirmationTokenCreateParamsPaymentMethodDataMobilepay(TypedDict): + pass + + +class ConfirmationTokenCreateParamsPaymentMethodDataMultibanco(TypedDict): + pass + + +class ConfirmationTokenCreateParamsPaymentMethodDataNaverPay(TypedDict): + funding: NotRequired[Literal["card", "points"]] + """ + Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`. + """ + + +class ConfirmationTokenCreateParamsPaymentMethodDataNzBankAccount(TypedDict): + account_holder_name: NotRequired[str] + """ + The name on the bank account. Only required if the account holder name is different from the name of the authorized signatory collected in the PaymentMethod's billing details. + """ + account_number: str + """ + The account number for the bank account. + """ + bank_code: str + """ + The numeric code for the bank account's bank. + """ + branch_code: str + """ + The numeric code for the bank account's bank branch. + """ + reference: NotRequired[str] + suffix: str + """ + The suffix of the bank account number. + """ + + +class ConfirmationTokenCreateParamsPaymentMethodDataOxxo(TypedDict): + pass + + +class ConfirmationTokenCreateParamsPaymentMethodDataP24(TypedDict): + bank: NotRequired[ + Literal[ + "alior_bank", + "bank_millennium", + "bank_nowy_bfg_sa", + "bank_pekao_sa", + "banki_spbdzielcze", + "blik", + "bnp_paribas", + "boz", + "citi_handlowy", + "credit_agricole", + "envelobank", + "etransfer_pocztowy24", + "getin_bank", + "ideabank", + "ing", + "inteligo", + "mbank_mtransfer", + "nest_przelew", + "noble_pay", + "pbac_z_ipko", + "plus_bank", + "santander_przelew24", + "tmobile_usbugi_bankowe", + "toyota_bank", + "velobank", + "volkswagen_bank", + ] + ] + """ + The customer's bank. + """ + + +class ConfirmationTokenCreateParamsPaymentMethodDataPayByBank(TypedDict): + pass + + +class ConfirmationTokenCreateParamsPaymentMethodDataPayco(TypedDict): + pass + + +class ConfirmationTokenCreateParamsPaymentMethodDataPaynow(TypedDict): + pass + + +class ConfirmationTokenCreateParamsPaymentMethodDataPaypal(TypedDict): + pass + + +class ConfirmationTokenCreateParamsPaymentMethodDataPaypay(TypedDict): + pass + + +class ConfirmationTokenCreateParamsPaymentMethodDataPayto(TypedDict): + account_number: NotRequired[str] + """ + The account number for the bank account. + """ + bsb_number: NotRequired[str] + """ + Bank-State-Branch number of the bank account. + """ + pay_id: NotRequired[str] + """ + The PayID alias for the bank account. + """ + + +class ConfirmationTokenCreateParamsPaymentMethodDataPix(TypedDict): + pass + + +class ConfirmationTokenCreateParamsPaymentMethodDataPromptpay(TypedDict): + pass + + +class ConfirmationTokenCreateParamsPaymentMethodDataQris(TypedDict): + pass + + +class ConfirmationTokenCreateParamsPaymentMethodDataRadarOptions(TypedDict): + session: NotRequired[str] + """ + A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. + """ + + +class ConfirmationTokenCreateParamsPaymentMethodDataRechnung(TypedDict): + dob: "ConfirmationTokenCreateParamsPaymentMethodDataRechnungDob" + """ + Customer's date of birth + """ + + +class ConfirmationTokenCreateParamsPaymentMethodDataRechnungDob(TypedDict): + day: int + """ + The day of birth, between 1 and 31. + """ + month: int + """ + The month of birth, between 1 and 12. + """ + year: int + """ + The four-digit year of birth. + """ + + +class ConfirmationTokenCreateParamsPaymentMethodDataRevolutPay(TypedDict): + pass + + +class ConfirmationTokenCreateParamsPaymentMethodDataSamsungPay(TypedDict): + pass + + +class ConfirmationTokenCreateParamsPaymentMethodDataSatispay(TypedDict): + pass + + +class ConfirmationTokenCreateParamsPaymentMethodDataSepaDebit(TypedDict): + iban: str + """ + IBAN of the bank account. + """ + + +class ConfirmationTokenCreateParamsPaymentMethodDataShopeepay(TypedDict): + pass + + +class ConfirmationTokenCreateParamsPaymentMethodDataSofort(TypedDict): + country: Literal["AT", "BE", "DE", "ES", "IT", "NL"] + """ + Two-letter ISO code representing the country the bank account is located in. + """ + + +class ConfirmationTokenCreateParamsPaymentMethodDataStripeBalance(TypedDict): + account: NotRequired[str] + """ + The connected account ID whose Stripe balance to use as the source of payment + """ + source_type: NotRequired[Literal["bank_account", "card", "fpx"]] + """ + The [source_type](https://docs.stripe.com/api/balance/balance_object#balance_object-available-source_types) of the balance + """ + + +class ConfirmationTokenCreateParamsPaymentMethodDataSwish(TypedDict): + pass + + +class ConfirmationTokenCreateParamsPaymentMethodDataTwint(TypedDict): + pass + + +class ConfirmationTokenCreateParamsPaymentMethodDataUsBankAccount(TypedDict): + account_holder_type: NotRequired[Literal["company", "individual"]] + """ + Account holder type: individual or company. + """ + account_number: NotRequired[str] + """ + Account number of the bank account. + """ + account_type: NotRequired[Literal["checking", "savings"]] + """ + Account type: checkings or savings. Defaults to checking if omitted. + """ + financial_connections_account: NotRequired[str] + """ + The ID of a Financial Connections Account to use as a payment method. + """ + routing_number: NotRequired[str] + """ + Routing number of the bank account. + """ + + +class ConfirmationTokenCreateParamsPaymentMethodDataWechatPay(TypedDict): + pass + + +class ConfirmationTokenCreateParamsPaymentMethodDataZip(TypedDict): + pass + + +class ConfirmationTokenCreateParamsPaymentMethodOptions(TypedDict): + card: NotRequired["ConfirmationTokenCreateParamsPaymentMethodOptionsCard"] + """ + Configuration for any card payments confirmed using this ConfirmationToken. + """ + + +class ConfirmationTokenCreateParamsPaymentMethodOptionsCard(TypedDict): + installments: NotRequired[ + "ConfirmationTokenCreateParamsPaymentMethodOptionsCardInstallments" + ] + """ + Installment configuration for payments confirmed using this ConfirmationToken. + """ + + +class ConfirmationTokenCreateParamsPaymentMethodOptionsCardInstallments( + TypedDict, +): + plan: ( + "ConfirmationTokenCreateParamsPaymentMethodOptionsCardInstallmentsPlan" + ) + """ + The selected installment plan to use for this payment attempt. + This parameter can only be provided during confirmation. + """ + + +class ConfirmationTokenCreateParamsPaymentMethodOptionsCardInstallmentsPlan( + TypedDict, +): + count: NotRequired[int] + """ + For `fixed_count` installment plans, this is required. It represents the number of installment payments your customer will make to their credit card. + """ + interval: NotRequired[Literal["month"]] + """ + For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card. + One of `month`. + """ + type: Literal["bonus", "fixed_count", "revolving"] + """ + Type of installment plan, one of `fixed_count`, `bonus`, or `revolving`. + """ + + +class ConfirmationTokenCreateParamsShipping(TypedDict): + address: "ConfirmationTokenCreateParamsShippingAddress" + """ + Shipping address + """ + name: str + """ + Recipient name. + """ + phone: NotRequired["Literal['']|str"] + """ + Recipient phone (including extension) + """ + + +class ConfirmationTokenCreateParamsShippingAddress(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. + """ diff --git a/stripe/params/test_helpers/_customer_fund_cash_balance_params.py b/stripe/params/test_helpers/_customer_fund_cash_balance_params.py new file mode 100644 index 000000000..dde8f3e4a --- /dev/null +++ b/stripe/params/test_helpers/_customer_fund_cash_balance_params.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import NotRequired, TypedDict + + +class CustomerFundCashBalanceParams(TypedDict): + amount: int + """ + Amount to be used for this test cash balance transaction. A positive integer representing how much to fund in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to fund $1.00 or 100 to fund ¥100, a zero-decimal currency). + """ + 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. + """ + reference: NotRequired[str] + """ + A description of the test funding. This simulates free-text references supplied by customers when making bank transfers to their cash balance. You can use this to test how Stripe's [reconciliation algorithm](https://stripe.com/docs/payments/customer-balance/reconciliation) applies to different user inputs. + """ diff --git a/stripe/params/test_helpers/_refund_expire_params.py b/stripe/params/test_helpers/_refund_expire_params.py new file mode 100644 index 000000000..4aa861465 --- /dev/null +++ b/stripe/params/test_helpers/_refund_expire_params.py @@ -0,0 +1,11 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import NotRequired, TypedDict + + +class RefundExpireParams(TypedDict): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/test_helpers/_test_clock_advance_params.py b/stripe/params/test_helpers/_test_clock_advance_params.py new file mode 100644 index 000000000..94bf0dc10 --- /dev/null +++ b/stripe/params/test_helpers/_test_clock_advance_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 TestClockAdvanceParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + frozen_time: int + """ + The time to advance the test clock. Must be after the test clock's current frozen time. Cannot be more than two intervals in the future from the shortest subscription in this test clock. If there are no subscriptions in this test clock, it cannot be more than two years in the future. + """ diff --git a/stripe/params/test_helpers/_test_clock_create_params.py b/stripe/params/test_helpers/_test_clock_create_params.py new file mode 100644 index 000000000..9375ca502 --- /dev/null +++ b/stripe/params/test_helpers/_test_clock_create_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 TestClockCreateParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + frozen_time: int + """ + The initial frozen time for this test clock. + """ + name: NotRequired[str] + """ + The name for this test clock. + """ diff --git a/stripe/params/test_helpers/_test_clock_delete_params.py b/stripe/params/test_helpers/_test_clock_delete_params.py new file mode 100644 index 000000000..f8e96c11f --- /dev/null +++ b/stripe/params/test_helpers/_test_clock_delete_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions + + +class TestClockDeleteParams(RequestOptions): + pass diff --git a/stripe/params/test_helpers/_test_clock_list_params.py b/stripe/params/test_helpers/_test_clock_list_params.py new file mode 100644 index 000000000..666d2be2c --- /dev/null +++ b/stripe/params/test_helpers/_test_clock_list_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 TestClockListParams(RequestOptions): + 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. + """ diff --git a/stripe/params/test_helpers/_test_clock_retrieve_params.py b/stripe/params/test_helpers/_test_clock_retrieve_params.py new file mode 100644 index 000000000..d87ea3cec --- /dev/null +++ b/stripe/params/test_helpers/_test_clock_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 TestClockRetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/test_helpers/issuing/__init__.py b/stripe/params/test_helpers/issuing/__init__.py new file mode 100644 index 000000000..bceef1870 --- /dev/null +++ b/stripe/params/test_helpers/issuing/__init__.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe.params.test_helpers.issuing._authorization_capture_params import ( + AuthorizationCaptureParams as AuthorizationCaptureParams, +) +from stripe.params.test_helpers.issuing._authorization_create_params import ( + AuthorizationCreateParams as AuthorizationCreateParams, +) +from stripe.params.test_helpers.issuing._authorization_expire_params import ( + AuthorizationExpireParams as AuthorizationExpireParams, +) +from stripe.params.test_helpers.issuing._authorization_finalize_amount_params import ( + AuthorizationFinalizeAmountParams as AuthorizationFinalizeAmountParams, +) +from stripe.params.test_helpers.issuing._authorization_increment_params import ( + AuthorizationIncrementParams as AuthorizationIncrementParams, +) +from stripe.params.test_helpers.issuing._authorization_respond_params import ( + AuthorizationRespondParams as AuthorizationRespondParams, +) +from stripe.params.test_helpers.issuing._authorization_reverse_params import ( + AuthorizationReverseParams as AuthorizationReverseParams, +) +from stripe.params.test_helpers.issuing._card_deliver_card_params import ( + CardDeliverCardParams as CardDeliverCardParams, +) +from stripe.params.test_helpers.issuing._card_fail_card_params import ( + CardFailCardParams as CardFailCardParams, +) +from stripe.params.test_helpers.issuing._card_return_card_params import ( + CardReturnCardParams as CardReturnCardParams, +) +from stripe.params.test_helpers.issuing._card_ship_card_params import ( + CardShipCardParams as CardShipCardParams, +) +from stripe.params.test_helpers.issuing._card_submit_card_params import ( + CardSubmitCardParams as CardSubmitCardParams, +) +from stripe.params.test_helpers.issuing._personalization_design_activate_params import ( + PersonalizationDesignActivateParams as PersonalizationDesignActivateParams, +) +from stripe.params.test_helpers.issuing._personalization_design_deactivate_params import ( + PersonalizationDesignDeactivateParams as PersonalizationDesignDeactivateParams, +) +from stripe.params.test_helpers.issuing._personalization_design_reject_params import ( + PersonalizationDesignRejectParams as PersonalizationDesignRejectParams, +) +from stripe.params.test_helpers.issuing._transaction_create_force_capture_params import ( + TransactionCreateForceCaptureParams as TransactionCreateForceCaptureParams, +) +from stripe.params.test_helpers.issuing._transaction_create_unlinked_refund_params import ( + TransactionCreateUnlinkedRefundParams as TransactionCreateUnlinkedRefundParams, +) +from stripe.params.test_helpers.issuing._transaction_refund_params import ( + TransactionRefundParams as TransactionRefundParams, +) diff --git a/stripe/params/test_helpers/issuing/_authorization_capture_params.py b/stripe/params/test_helpers/issuing/_authorization_capture_params.py new file mode 100644 index 000000000..a18365064 --- /dev/null +++ b/stripe/params/test_helpers/issuing/_authorization_capture_params.py @@ -0,0 +1,272 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import Literal, NotRequired, TypedDict + + +class AuthorizationCaptureParams(TypedDict): + capture_amount: NotRequired[int] + """ + The amount to capture from the authorization. If not provided, the full amount of the authorization will be captured. This amount is in the authorization currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + """ + close_authorization: NotRequired[bool] + """ + Whether to close the authorization after capture. Defaults to true. Set to false to enable multi-capture flows. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + purchase_details: NotRequired["AuthorizationCaptureParamsPurchaseDetails"] + """ + Additional purchase information that is optionally provided by the merchant. + """ + + +class AuthorizationCaptureParamsPurchaseDetails(TypedDict): + fleet: NotRequired["AuthorizationCaptureParamsPurchaseDetailsFleet"] + """ + Fleet-specific information for transactions using Fleet cards. + """ + flight: NotRequired["AuthorizationCaptureParamsPurchaseDetailsFlight"] + """ + Information about the flight that was purchased with this transaction. + """ + fuel: NotRequired["AuthorizationCaptureParamsPurchaseDetailsFuel"] + """ + Information about fuel that was purchased with this transaction. + """ + lodging: NotRequired["AuthorizationCaptureParamsPurchaseDetailsLodging"] + """ + Information about lodging that was purchased with this transaction. + """ + receipt: NotRequired[ + List["AuthorizationCaptureParamsPurchaseDetailsReceipt"] + ] + """ + The line items in the purchase. + """ + reference: NotRequired[str] + """ + A merchant-specific order number. + """ + + +class AuthorizationCaptureParamsPurchaseDetailsFleet(TypedDict): + cardholder_prompt_data: NotRequired[ + "AuthorizationCaptureParamsPurchaseDetailsFleetCardholderPromptData" + ] + """ + Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry. + """ + purchase_type: NotRequired[ + Literal[ + "fuel_and_non_fuel_purchase", "fuel_purchase", "non_fuel_purchase" + ] + ] + """ + The type of purchase. One of `fuel_purchase`, `non_fuel_purchase`, or `fuel_and_non_fuel_purchase`. + """ + reported_breakdown: NotRequired[ + "AuthorizationCaptureParamsPurchaseDetailsFleetReportedBreakdown" + ] + """ + More information about the total amount. This information is not guaranteed to be accurate as some merchants may provide unreliable data. + """ + service_type: NotRequired[ + Literal["full_service", "non_fuel_transaction", "self_service"] + ] + """ + The type of fuel service. One of `non_fuel_transaction`, `full_service`, or `self_service`. + """ + + +class AuthorizationCaptureParamsPurchaseDetailsFleetCardholderPromptData( + TypedDict, +): + driver_id: NotRequired[str] + """ + Driver ID. + """ + odometer: NotRequired[int] + """ + Odometer reading. + """ + unspecified_id: NotRequired[str] + """ + An alphanumeric ID. This field is used when a vehicle ID, driver ID, or generic ID is entered by the cardholder, but the merchant or card network did not specify the prompt type. + """ + user_id: NotRequired[str] + """ + User ID. + """ + vehicle_number: NotRequired[str] + """ + Vehicle number. + """ + + +class AuthorizationCaptureParamsPurchaseDetailsFleetReportedBreakdown( + TypedDict, +): + fuel: NotRequired[ + "AuthorizationCaptureParamsPurchaseDetailsFleetReportedBreakdownFuel" + ] + """ + Breakdown of fuel portion of the purchase. + """ + non_fuel: NotRequired[ + "AuthorizationCaptureParamsPurchaseDetailsFleetReportedBreakdownNonFuel" + ] + """ + Breakdown of non-fuel portion of the purchase. + """ + tax: NotRequired[ + "AuthorizationCaptureParamsPurchaseDetailsFleetReportedBreakdownTax" + ] + """ + Information about tax included in this transaction. + """ + + +class AuthorizationCaptureParamsPurchaseDetailsFleetReportedBreakdownFuel( + TypedDict, +): + gross_amount_decimal: NotRequired[str] + """ + Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive of taxes. + """ + + +class AuthorizationCaptureParamsPurchaseDetailsFleetReportedBreakdownNonFuel( + TypedDict, +): + gross_amount_decimal: NotRequired[str] + """ + Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes. + """ + + +class AuthorizationCaptureParamsPurchaseDetailsFleetReportedBreakdownTax( + TypedDict, +): + local_amount_decimal: NotRequired[str] + """ + Amount of state or provincial Sales Tax included in the transaction amount. Null if not reported by merchant or not subject to tax. + """ + national_amount_decimal: NotRequired[str] + """ + Amount of national Sales Tax or VAT included in the transaction amount. Null if not reported by merchant or not subject to tax. + """ + + +class AuthorizationCaptureParamsPurchaseDetailsFlight(TypedDict): + departure_at: NotRequired[int] + """ + The time that the flight departed. + """ + passenger_name: NotRequired[str] + """ + The name of the passenger. + """ + refundable: NotRequired[bool] + """ + Whether the ticket is refundable. + """ + segments: NotRequired[ + List["AuthorizationCaptureParamsPurchaseDetailsFlightSegment"] + ] + """ + The legs of the trip. + """ + travel_agency: NotRequired[str] + """ + The travel agency that issued the ticket. + """ + + +class AuthorizationCaptureParamsPurchaseDetailsFlightSegment(TypedDict): + arrival_airport_code: NotRequired[str] + """ + The three-letter IATA airport code of the flight's destination. + """ + carrier: NotRequired[str] + """ + The airline carrier code. + """ + departure_airport_code: NotRequired[str] + """ + The three-letter IATA airport code that the flight departed from. + """ + flight_number: NotRequired[str] + """ + The flight number. + """ + service_class: NotRequired[str] + """ + The flight's service class. + """ + stopover_allowed: NotRequired[bool] + """ + Whether a stopover is allowed on this flight. + """ + + +class AuthorizationCaptureParamsPurchaseDetailsFuel(TypedDict): + industry_product_code: NotRequired[str] + """ + [Conexxus Payment System Product Code](https://www.conexxus.org/conexxus-payment-system-product-codes) identifying the primary fuel product purchased. + """ + quantity_decimal: NotRequired[str] + """ + The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places. + """ + type: NotRequired[ + Literal[ + "diesel", + "other", + "unleaded_plus", + "unleaded_regular", + "unleaded_super", + ] + ] + """ + The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`. + """ + unit: NotRequired[ + Literal[ + "charging_minute", + "imperial_gallon", + "kilogram", + "kilowatt_hour", + "liter", + "other", + "pound", + "us_gallon", + ] + ] + """ + The units for `quantity_decimal`. One of `charging_minute`, `imperial_gallon`, `kilogram`, `kilowatt_hour`, `liter`, `pound`, `us_gallon`, or `other`. + """ + unit_cost_decimal: NotRequired[str] + """ + The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places. + """ + + +class AuthorizationCaptureParamsPurchaseDetailsLodging(TypedDict): + check_in_at: NotRequired[int] + """ + The time of checking into the lodging. + """ + nights: NotRequired[int] + """ + The number of nights stayed at the lodging. + """ + + +class AuthorizationCaptureParamsPurchaseDetailsReceipt(TypedDict): + description: NotRequired[str] + quantity: NotRequired[str] + total: NotRequired[int] + unit_cost: NotRequired[int] diff --git a/stripe/params/test_helpers/issuing/_authorization_create_params.py b/stripe/params/test_helpers/issuing/_authorization_create_params.py new file mode 100644 index 000000000..42e6321a2 --- /dev/null +++ b/stripe/params/test_helpers/issuing/_authorization_create_params.py @@ -0,0 +1,673 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import Literal, NotRequired, TypedDict + + +class AuthorizationCreateParams(TypedDict): + amount: NotRequired[int] + """ + The total amount to attempt to authorize. This amount is in the provided currency, or defaults to the card's currency, and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + """ + amount_details: NotRequired["AuthorizationCreateParamsAmountDetails"] + """ + Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + """ + authorization_method: NotRequired[ + Literal["chip", "contactless", "keyed_in", "online", "swipe"] + ] + """ + How the card details were provided. Defaults to online. + """ + card: str + """ + Card associated with this authorization. + """ + currency: NotRequired[str] + """ + The currency of the authorization. If not provided, defaults to the currency of the card. 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. + """ + fleet: NotRequired["AuthorizationCreateParamsFleet"] + """ + Fleet-specific information for authorizations using Fleet cards. + """ + fraud_disputability_likelihood: NotRequired[ + Literal["neutral", "unknown", "very_likely", "very_unlikely"] + ] + """ + Probability that this transaction can be disputed in the event of fraud. Assessed by comparing the characteristics of the authorization to card network rules. + """ + fuel: NotRequired["AuthorizationCreateParamsFuel"] + """ + Information about fuel that was purchased with this transaction. + """ + is_amount_controllable: NotRequired[bool] + """ + If set `true`, you may provide [amount](https://stripe.com/docs/api/issuing/authorizations/approve#approve_issuing_authorization-amount) to control how much to hold for the authorization. + """ + merchant_amount: NotRequired[int] + """ + The total amount to attempt to authorize. This amount is in the provided merchant currency, and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + """ + merchant_currency: NotRequired[str] + """ + The currency of the authorization. If not provided, defaults to the currency of the card. 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). + """ + merchant_data: NotRequired["AuthorizationCreateParamsMerchantData"] + """ + Details about the seller (grocery store, e-commerce website, etc.) where the card authorization happened. + """ + network_data: NotRequired["AuthorizationCreateParamsNetworkData"] + """ + Details about the authorization, such as identifiers, set by the card network. + """ + risk_assessment: NotRequired["AuthorizationCreateParamsRiskAssessment"] + """ + Stripe's assessment of the fraud risk for this authorization. + """ + verification_data: NotRequired["AuthorizationCreateParamsVerificationData"] + """ + Verifications that Stripe performed on information that the cardholder provided to the merchant. + """ + wallet: NotRequired[Literal["apple_pay", "google_pay", "samsung_pay"]] + """ + The digital wallet used for this transaction. One of `apple_pay`, `google_pay`, or `samsung_pay`. Will populate as `null` when no digital wallet was utilized. + """ + + +class AuthorizationCreateParamsAmountDetails(TypedDict): + atm_fee: NotRequired[int] + """ + The ATM withdrawal fee. + """ + cashback_amount: NotRequired[int] + """ + The amount of cash requested by the cardholder. + """ + + +class AuthorizationCreateParamsFleet(TypedDict): + cardholder_prompt_data: NotRequired[ + "AuthorizationCreateParamsFleetCardholderPromptData" + ] + """ + Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry. + """ + purchase_type: NotRequired[ + Literal[ + "fuel_and_non_fuel_purchase", "fuel_purchase", "non_fuel_purchase" + ] + ] + """ + The type of purchase. One of `fuel_purchase`, `non_fuel_purchase`, or `fuel_and_non_fuel_purchase`. + """ + reported_breakdown: NotRequired[ + "AuthorizationCreateParamsFleetReportedBreakdown" + ] + """ + More information about the total amount. This information is not guaranteed to be accurate as some merchants may provide unreliable data. + """ + service_type: NotRequired[ + Literal["full_service", "non_fuel_transaction", "self_service"] + ] + """ + The type of fuel service. One of `non_fuel_transaction`, `full_service`, or `self_service`. + """ + + +class AuthorizationCreateParamsFleetCardholderPromptData(TypedDict): + driver_id: NotRequired[str] + """ + Driver ID. + """ + odometer: NotRequired[int] + """ + Odometer reading. + """ + unspecified_id: NotRequired[str] + """ + An alphanumeric ID. This field is used when a vehicle ID, driver ID, or generic ID is entered by the cardholder, but the merchant or card network did not specify the prompt type. + """ + user_id: NotRequired[str] + """ + User ID. + """ + vehicle_number: NotRequired[str] + """ + Vehicle number. + """ + + +class AuthorizationCreateParamsFleetReportedBreakdown(TypedDict): + fuel: NotRequired["AuthorizationCreateParamsFleetReportedBreakdownFuel"] + """ + Breakdown of fuel portion of the purchase. + """ + non_fuel: NotRequired[ + "AuthorizationCreateParamsFleetReportedBreakdownNonFuel" + ] + """ + Breakdown of non-fuel portion of the purchase. + """ + tax: NotRequired["AuthorizationCreateParamsFleetReportedBreakdownTax"] + """ + Information about tax included in this transaction. + """ + + +class AuthorizationCreateParamsFleetReportedBreakdownFuel(TypedDict): + gross_amount_decimal: NotRequired[str] + """ + Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive of taxes. + """ + + +class AuthorizationCreateParamsFleetReportedBreakdownNonFuel(TypedDict): + gross_amount_decimal: NotRequired[str] + """ + Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes. + """ + + +class AuthorizationCreateParamsFleetReportedBreakdownTax(TypedDict): + local_amount_decimal: NotRequired[str] + """ + Amount of state or provincial Sales Tax included in the transaction amount. Null if not reported by merchant or not subject to tax. + """ + national_amount_decimal: NotRequired[str] + """ + Amount of national Sales Tax or VAT included in the transaction amount. Null if not reported by merchant or not subject to tax. + """ + + +class AuthorizationCreateParamsFuel(TypedDict): + industry_product_code: NotRequired[str] + """ + [Conexxus Payment System Product Code](https://www.conexxus.org/conexxus-payment-system-product-codes) identifying the primary fuel product purchased. + """ + quantity_decimal: NotRequired[str] + """ + The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places. + """ + type: NotRequired[ + Literal[ + "diesel", + "other", + "unleaded_plus", + "unleaded_regular", + "unleaded_super", + ] + ] + """ + The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`. + """ + unit: NotRequired[ + Literal[ + "charging_minute", + "imperial_gallon", + "kilogram", + "kilowatt_hour", + "liter", + "other", + "pound", + "us_gallon", + ] + ] + """ + The units for `quantity_decimal`. One of `charging_minute`, `imperial_gallon`, `kilogram`, `kilowatt_hour`, `liter`, `pound`, `us_gallon`, or `other`. + """ + unit_cost_decimal: NotRequired[str] + """ + The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places. + """ + + +class AuthorizationCreateParamsMerchantData(TypedDict): + category: NotRequired[ + Literal[ + "ac_refrigeration_repair", + "accounting_bookkeeping_services", + "advertising_services", + "agricultural_cooperative", + "airlines_air_carriers", + "airports_flying_fields", + "ambulance_services", + "amusement_parks_carnivals", + "antique_reproductions", + "antique_shops", + "aquariums", + "architectural_surveying_services", + "art_dealers_and_galleries", + "artists_supply_and_craft_shops", + "auto_and_home_supply_stores", + "auto_body_repair_shops", + "auto_paint_shops", + "auto_service_shops", + "automated_cash_disburse", + "automated_fuel_dispensers", + "automobile_associations", + "automotive_parts_and_accessories_stores", + "automotive_tire_stores", + "bail_and_bond_payments", + "bakeries", + "bands_orchestras", + "barber_and_beauty_shops", + "betting_casino_gambling", + "bicycle_shops", + "billiard_pool_establishments", + "boat_dealers", + "boat_rentals_and_leases", + "book_stores", + "books_periodicals_and_newspapers", + "bowling_alleys", + "bus_lines", + "business_secretarial_schools", + "buying_shopping_services", + "cable_satellite_and_other_pay_television_and_radio", + "camera_and_photographic_supply_stores", + "candy_nut_and_confectionery_stores", + "car_and_truck_dealers_new_used", + "car_and_truck_dealers_used_only", + "car_rental_agencies", + "car_washes", + "carpentry_services", + "carpet_upholstery_cleaning", + "caterers", + "charitable_and_social_service_organizations_fundraising", + "chemicals_and_allied_products", + "child_care_services", + "childrens_and_infants_wear_stores", + "chiropodists_podiatrists", + "chiropractors", + "cigar_stores_and_stands", + "civic_social_fraternal_associations", + "cleaning_and_maintenance", + "clothing_rental", + "colleges_universities", + "commercial_equipment", + "commercial_footwear", + "commercial_photography_art_and_graphics", + "commuter_transport_and_ferries", + "computer_network_services", + "computer_programming", + "computer_repair", + "computer_software_stores", + "computers_peripherals_and_software", + "concrete_work_services", + "construction_materials", + "consulting_public_relations", + "correspondence_schools", + "cosmetic_stores", + "counseling_services", + "country_clubs", + "courier_services", + "court_costs", + "credit_reporting_agencies", + "cruise_lines", + "dairy_products_stores", + "dance_hall_studios_schools", + "dating_escort_services", + "dentists_orthodontists", + "department_stores", + "detective_agencies", + "digital_goods_applications", + "digital_goods_games", + "digital_goods_large_volume", + "digital_goods_media", + "direct_marketing_catalog_merchant", + "direct_marketing_combination_catalog_and_retail_merchant", + "direct_marketing_inbound_telemarketing", + "direct_marketing_insurance_services", + "direct_marketing_other", + "direct_marketing_outbound_telemarketing", + "direct_marketing_subscription", + "direct_marketing_travel", + "discount_stores", + "doctors", + "door_to_door_sales", + "drapery_window_covering_and_upholstery_stores", + "drinking_places", + "drug_stores_and_pharmacies", + "drugs_drug_proprietaries_and_druggist_sundries", + "dry_cleaners", + "durable_goods", + "duty_free_stores", + "eating_places_restaurants", + "educational_services", + "electric_razor_stores", + "electric_vehicle_charging", + "electrical_parts_and_equipment", + "electrical_services", + "electronics_repair_shops", + "electronics_stores", + "elementary_secondary_schools", + "emergency_services_gcas_visa_use_only", + "employment_temp_agencies", + "equipment_rental", + "exterminating_services", + "family_clothing_stores", + "fast_food_restaurants", + "financial_institutions", + "fines_government_administrative_entities", + "fireplace_fireplace_screens_and_accessories_stores", + "floor_covering_stores", + "florists", + "florists_supplies_nursery_stock_and_flowers", + "freezer_and_locker_meat_provisioners", + "fuel_dealers_non_automotive", + "funeral_services_crematories", + "furniture_home_furnishings_and_equipment_stores_except_appliances", + "furniture_repair_refinishing", + "furriers_and_fur_shops", + "general_services", + "gift_card_novelty_and_souvenir_shops", + "glass_paint_and_wallpaper_stores", + "glassware_crystal_stores", + "golf_courses_public", + "government_licensed_horse_dog_racing_us_region_only", + "government_licensed_online_casions_online_gambling_us_region_only", + "government_owned_lotteries_non_us_region", + "government_owned_lotteries_us_region_only", + "government_services", + "grocery_stores_supermarkets", + "hardware_equipment_and_supplies", + "hardware_stores", + "health_and_beauty_spas", + "hearing_aids_sales_and_supplies", + "heating_plumbing_a_c", + "hobby_toy_and_game_shops", + "home_supply_warehouse_stores", + "hospitals", + "hotels_motels_and_resorts", + "household_appliance_stores", + "industrial_supplies", + "information_retrieval_services", + "insurance_default", + "insurance_underwriting_premiums", + "intra_company_purchases", + "jewelry_stores_watches_clocks_and_silverware_stores", + "landscaping_services", + "laundries", + "laundry_cleaning_services", + "legal_services_attorneys", + "luggage_and_leather_goods_stores", + "lumber_building_materials_stores", + "manual_cash_disburse", + "marinas_service_and_supplies", + "marketplaces", + "masonry_stonework_and_plaster", + "massage_parlors", + "medical_and_dental_labs", + "medical_dental_ophthalmic_and_hospital_equipment_and_supplies", + "medical_services", + "membership_organizations", + "mens_and_boys_clothing_and_accessories_stores", + "mens_womens_clothing_stores", + "metal_service_centers", + "miscellaneous_apparel_and_accessory_shops", + "miscellaneous_auto_dealers", + "miscellaneous_business_services", + "miscellaneous_food_stores", + "miscellaneous_general_merchandise", + "miscellaneous_general_services", + "miscellaneous_home_furnishing_specialty_stores", + "miscellaneous_publishing_and_printing", + "miscellaneous_recreation_services", + "miscellaneous_repair_shops", + "miscellaneous_specialty_retail", + "mobile_home_dealers", + "motion_picture_theaters", + "motor_freight_carriers_and_trucking", + "motor_homes_dealers", + "motor_vehicle_supplies_and_new_parts", + "motorcycle_shops_and_dealers", + "motorcycle_shops_dealers", + "music_stores_musical_instruments_pianos_and_sheet_music", + "news_dealers_and_newsstands", + "non_fi_money_orders", + "non_fi_stored_value_card_purchase_load", + "nondurable_goods", + "nurseries_lawn_and_garden_supply_stores", + "nursing_personal_care", + "office_and_commercial_furniture", + "opticians_eyeglasses", + "optometrists_ophthalmologist", + "orthopedic_goods_prosthetic_devices", + "osteopaths", + "package_stores_beer_wine_and_liquor", + "paints_varnishes_and_supplies", + "parking_lots_garages", + "passenger_railways", + "pawn_shops", + "pet_shops_pet_food_and_supplies", + "petroleum_and_petroleum_products", + "photo_developing", + "photographic_photocopy_microfilm_equipment_and_supplies", + "photographic_studios", + "picture_video_production", + "piece_goods_notions_and_other_dry_goods", + "plumbing_heating_equipment_and_supplies", + "political_organizations", + "postal_services_government_only", + "precious_stones_and_metals_watches_and_jewelry", + "professional_services", + "public_warehousing_and_storage", + "quick_copy_repro_and_blueprint", + "railroads", + "real_estate_agents_and_managers_rentals", + "record_stores", + "recreational_vehicle_rentals", + "religious_goods_stores", + "religious_organizations", + "roofing_siding_sheet_metal", + "secretarial_support_services", + "security_brokers_dealers", + "service_stations", + "sewing_needlework_fabric_and_piece_goods_stores", + "shoe_repair_hat_cleaning", + "shoe_stores", + "small_appliance_repair", + "snowmobile_dealers", + "special_trade_services", + "specialty_cleaning", + "sporting_goods_stores", + "sporting_recreation_camps", + "sports_and_riding_apparel_stores", + "sports_clubs_fields", + "stamp_and_coin_stores", + "stationary_office_supplies_printing_and_writing_paper", + "stationery_stores_office_and_school_supply_stores", + "swimming_pools_sales", + "t_ui_travel_germany", + "tailors_alterations", + "tax_payments_government_agencies", + "tax_preparation_services", + "taxicabs_limousines", + "telecommunication_equipment_and_telephone_sales", + "telecommunication_services", + "telegraph_services", + "tent_and_awning_shops", + "testing_laboratories", + "theatrical_ticket_agencies", + "timeshares", + "tire_retreading_and_repair", + "tolls_bridge_fees", + "tourist_attractions_and_exhibits", + "towing_services", + "trailer_parks_campgrounds", + "transportation_services", + "travel_agencies_tour_operators", + "truck_stop_iteration", + "truck_utility_trailer_rentals", + "typesetting_plate_making_and_related_services", + "typewriter_stores", + "u_s_federal_government_agencies_or_departments", + "uniforms_commercial_clothing", + "used_merchandise_and_secondhand_stores", + "utilities", + "variety_stores", + "veterinary_services", + "video_amusement_game_supplies", + "video_game_arcades", + "video_tape_rental_stores", + "vocational_trade_schools", + "watch_jewelry_repair", + "welding_repair", + "wholesale_clubs", + "wig_and_toupee_stores", + "wires_money_orders", + "womens_accessory_and_specialty_shops", + "womens_ready_to_wear_stores", + "wrecking_and_salvage_yards", + ] + ] + """ + A categorization of the seller's type of business. See our [merchant categories guide](https://stripe.com/docs/issuing/merchant-categories) for a list of possible values. + """ + city: NotRequired[str] + """ + City where the seller is located + """ + country: NotRequired[str] + """ + Country where the seller is located + """ + name: NotRequired[str] + """ + Name of the seller + """ + network_id: NotRequired[str] + """ + Identifier assigned to the seller by the card network. Different card networks may assign different network_id fields to the same merchant. + """ + postal_code: NotRequired[str] + """ + Postal code where the seller is located + """ + state: NotRequired[str] + """ + State where the seller is located + """ + terminal_id: NotRequired[str] + """ + An ID assigned by the seller to the location of the sale. + """ + url: NotRequired[str] + """ + URL provided by the merchant on a 3DS request + """ + + +class AuthorizationCreateParamsNetworkData(TypedDict): + acquiring_institution_id: NotRequired[str] + """ + Identifier assigned to the acquirer by the card network. + """ + + +class AuthorizationCreateParamsRiskAssessment(TypedDict): + card_testing_risk: NotRequired[ + "AuthorizationCreateParamsRiskAssessmentCardTestingRisk" + ] + """ + Stripe's assessment of this authorization's likelihood of being card testing activity. + """ + merchant_dispute_risk: NotRequired[ + "AuthorizationCreateParamsRiskAssessmentMerchantDisputeRisk" + ] + """ + The dispute risk of the merchant (the seller on a purchase) on an authorization based on all Stripe Issuing activity. + """ + + +class AuthorizationCreateParamsRiskAssessmentCardTestingRisk(TypedDict): + invalid_account_number_decline_rate_past_hour: NotRequired[int] + """ + The % of declines due to a card number not existing in the past hour, taking place at the same merchant. Higher rates correspond to a greater probability of card testing activity, meaning bad actors may be attempting different card number combinations to guess a correct one. Takes on values between 0 and 100. + """ + invalid_credentials_decline_rate_past_hour: NotRequired[int] + """ + The % of declines due to incorrect verification data (like CVV or expiry) in the past hour, taking place at the same merchant. Higher rates correspond to a greater probability of bad actors attempting to utilize valid card credentials at merchants with verification requirements. Takes on values between 0 and 100. + """ + risk_level: Literal[ + "elevated", "highest", "low", "normal", "not_assessed", "unknown" + ] + """ + The likelihood that this authorization is associated with card testing activity. This is assessed by evaluating decline activity over the last hour. + """ + + +class AuthorizationCreateParamsRiskAssessmentMerchantDisputeRisk(TypedDict): + dispute_rate: NotRequired[int] + """ + The dispute rate observed across all Stripe Issuing authorizations for this merchant. For example, a value of 50 means 50% of authorizations from this merchant on Stripe Issuing have resulted in a dispute. Higher values mean a higher likelihood the authorization is disputed. Takes on values between 0 and 100. + """ + risk_level: Literal[ + "elevated", "highest", "low", "normal", "not_assessed", "unknown" + ] + """ + The likelihood that authorizations from this merchant will result in a dispute based on their history on Stripe Issuing. + """ + + +class AuthorizationCreateParamsVerificationData(TypedDict): + address_line1_check: NotRequired[ + Literal["match", "mismatch", "not_provided"] + ] + """ + Whether the cardholder provided an address first line and if it matched the cardholder's `billing.address.line1`. + """ + address_postal_code_check: NotRequired[ + Literal["match", "mismatch", "not_provided"] + ] + """ + Whether the cardholder provided a postal code and if it matched the cardholder's `billing.address.postal_code`. + """ + authentication_exemption: NotRequired[ + "AuthorizationCreateParamsVerificationDataAuthenticationExemption" + ] + """ + The exemption applied to this authorization. + """ + cvc_check: NotRequired[Literal["match", "mismatch", "not_provided"]] + """ + Whether the cardholder provided a CVC and if it matched Stripe's record. + """ + expiry_check: NotRequired[Literal["match", "mismatch", "not_provided"]] + """ + Whether the cardholder provided an expiry date and if it matched Stripe's record. + """ + three_d_secure: NotRequired[ + "AuthorizationCreateParamsVerificationDataThreeDSecure" + ] + """ + 3D Secure details. + """ + + +class AuthorizationCreateParamsVerificationDataAuthenticationExemption( + TypedDict, +): + claimed_by: Literal["acquirer", "issuer"] + """ + The entity that requested the exemption, either the acquiring merchant or the Issuing user. + """ + type: Literal[ + "low_value_transaction", "transaction_risk_analysis", "unknown" + ] + """ + The specific exemption claimed for this authorization. + """ + + +class AuthorizationCreateParamsVerificationDataThreeDSecure(TypedDict): + result: Literal[ + "attempt_acknowledged", "authenticated", "failed", "required" + ] + """ + The outcome of the 3D Secure authentication request. + """ diff --git a/stripe/params/test_helpers/issuing/_authorization_expire_params.py b/stripe/params/test_helpers/issuing/_authorization_expire_params.py new file mode 100644 index 000000000..cd6f2a853 --- /dev/null +++ b/stripe/params/test_helpers/issuing/_authorization_expire_params.py @@ -0,0 +1,11 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import NotRequired, TypedDict + + +class AuthorizationExpireParams(TypedDict): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/test_helpers/issuing/_authorization_finalize_amount_params.py b/stripe/params/test_helpers/issuing/_authorization_finalize_amount_params.py new file mode 100644 index 000000000..233ee6b26 --- /dev/null +++ b/stripe/params/test_helpers/issuing/_authorization_finalize_amount_params.py @@ -0,0 +1,165 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import Literal, NotRequired, TypedDict + + +class AuthorizationFinalizeAmountParams(TypedDict): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + final_amount: int + """ + The final authorization amount that will be captured by the merchant. This amount is in the authorization currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + """ + fleet: NotRequired["AuthorizationFinalizeAmountParamsFleet"] + """ + Fleet-specific information for authorizations using Fleet cards. + """ + fuel: NotRequired["AuthorizationFinalizeAmountParamsFuel"] + """ + Information about fuel that was purchased with this transaction. + """ + + +class AuthorizationFinalizeAmountParamsFleet(TypedDict): + cardholder_prompt_data: NotRequired[ + "AuthorizationFinalizeAmountParamsFleetCardholderPromptData" + ] + """ + Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry. + """ + purchase_type: NotRequired[ + Literal[ + "fuel_and_non_fuel_purchase", "fuel_purchase", "non_fuel_purchase" + ] + ] + """ + The type of purchase. One of `fuel_purchase`, `non_fuel_purchase`, or `fuel_and_non_fuel_purchase`. + """ + reported_breakdown: NotRequired[ + "AuthorizationFinalizeAmountParamsFleetReportedBreakdown" + ] + """ + More information about the total amount. This information is not guaranteed to be accurate as some merchants may provide unreliable data. + """ + service_type: NotRequired[ + Literal["full_service", "non_fuel_transaction", "self_service"] + ] + """ + The type of fuel service. One of `non_fuel_transaction`, `full_service`, or `self_service`. + """ + + +class AuthorizationFinalizeAmountParamsFleetCardholderPromptData(TypedDict): + driver_id: NotRequired[str] + """ + Driver ID. + """ + odometer: NotRequired[int] + """ + Odometer reading. + """ + unspecified_id: NotRequired[str] + """ + An alphanumeric ID. This field is used when a vehicle ID, driver ID, or generic ID is entered by the cardholder, but the merchant or card network did not specify the prompt type. + """ + user_id: NotRequired[str] + """ + User ID. + """ + vehicle_number: NotRequired[str] + """ + Vehicle number. + """ + + +class AuthorizationFinalizeAmountParamsFleetReportedBreakdown(TypedDict): + fuel: NotRequired[ + "AuthorizationFinalizeAmountParamsFleetReportedBreakdownFuel" + ] + """ + Breakdown of fuel portion of the purchase. + """ + non_fuel: NotRequired[ + "AuthorizationFinalizeAmountParamsFleetReportedBreakdownNonFuel" + ] + """ + Breakdown of non-fuel portion of the purchase. + """ + tax: NotRequired[ + "AuthorizationFinalizeAmountParamsFleetReportedBreakdownTax" + ] + """ + Information about tax included in this transaction. + """ + + +class AuthorizationFinalizeAmountParamsFleetReportedBreakdownFuel(TypedDict): + gross_amount_decimal: NotRequired[str] + """ + Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive of taxes. + """ + + +class AuthorizationFinalizeAmountParamsFleetReportedBreakdownNonFuel( + TypedDict +): + gross_amount_decimal: NotRequired[str] + """ + Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes. + """ + + +class AuthorizationFinalizeAmountParamsFleetReportedBreakdownTax(TypedDict): + local_amount_decimal: NotRequired[str] + """ + Amount of state or provincial Sales Tax included in the transaction amount. Null if not reported by merchant or not subject to tax. + """ + national_amount_decimal: NotRequired[str] + """ + Amount of national Sales Tax or VAT included in the transaction amount. Null if not reported by merchant or not subject to tax. + """ + + +class AuthorizationFinalizeAmountParamsFuel(TypedDict): + industry_product_code: NotRequired[str] + """ + [Conexxus Payment System Product Code](https://www.conexxus.org/conexxus-payment-system-product-codes) identifying the primary fuel product purchased. + """ + quantity_decimal: NotRequired[str] + """ + The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places. + """ + type: NotRequired[ + Literal[ + "diesel", + "other", + "unleaded_plus", + "unleaded_regular", + "unleaded_super", + ] + ] + """ + The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`. + """ + unit: NotRequired[ + Literal[ + "charging_minute", + "imperial_gallon", + "kilogram", + "kilowatt_hour", + "liter", + "other", + "pound", + "us_gallon", + ] + ] + """ + The units for `quantity_decimal`. One of `charging_minute`, `imperial_gallon`, `kilogram`, `kilowatt_hour`, `liter`, `pound`, `us_gallon`, or `other`. + """ + unit_cost_decimal: NotRequired[str] + """ + The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places. + """ diff --git a/stripe/params/test_helpers/issuing/_authorization_increment_params.py b/stripe/params/test_helpers/issuing/_authorization_increment_params.py new file mode 100644 index 000000000..6190a1399 --- /dev/null +++ b/stripe/params/test_helpers/issuing/_authorization_increment_params.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import NotRequired, TypedDict + + +class AuthorizationIncrementParams(TypedDict): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + increment_amount: int + """ + The amount to increment the authorization by. This amount is in the authorization currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + """ + is_amount_controllable: NotRequired[bool] + """ + If set `true`, you may provide [amount](https://stripe.com/docs/api/issuing/authorizations/approve#approve_issuing_authorization-amount) to control how much to hold for the authorization. + """ diff --git a/stripe/params/test_helpers/issuing/_authorization_respond_params.py b/stripe/params/test_helpers/issuing/_authorization_respond_params.py new file mode 100644 index 000000000..e3a9b0b7d --- /dev/null +++ b/stripe/params/test_helpers/issuing/_authorization_respond_params.py @@ -0,0 +1,15 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import NotRequired, TypedDict + + +class AuthorizationRespondParams(TypedDict): + confirmed: bool + """ + Whether to simulate the user confirming that the transaction was legitimate (true) or telling Stripe that it was fraudulent (false). + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/test_helpers/issuing/_authorization_reverse_params.py b/stripe/params/test_helpers/issuing/_authorization_reverse_params.py new file mode 100644 index 000000000..34241359a --- /dev/null +++ b/stripe/params/test_helpers/issuing/_authorization_reverse_params.py @@ -0,0 +1,15 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import NotRequired, TypedDict + + +class AuthorizationReverseParams(TypedDict): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + reverse_amount: NotRequired[int] + """ + The amount to reverse from the authorization. If not provided, the full amount of the authorization will be reversed. This amount is in the authorization currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + """ diff --git a/stripe/params/test_helpers/issuing/_card_deliver_card_params.py b/stripe/params/test_helpers/issuing/_card_deliver_card_params.py new file mode 100644 index 000000000..7d3c7cee5 --- /dev/null +++ b/stripe/params/test_helpers/issuing/_card_deliver_card_params.py @@ -0,0 +1,11 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import NotRequired, TypedDict + + +class CardDeliverCardParams(TypedDict): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/test_helpers/issuing/_card_fail_card_params.py b/stripe/params/test_helpers/issuing/_card_fail_card_params.py new file mode 100644 index 000000000..b93b5e4f3 --- /dev/null +++ b/stripe/params/test_helpers/issuing/_card_fail_card_params.py @@ -0,0 +1,11 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import NotRequired, TypedDict + + +class CardFailCardParams(TypedDict): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/test_helpers/issuing/_card_return_card_params.py b/stripe/params/test_helpers/issuing/_card_return_card_params.py new file mode 100644 index 000000000..795890f52 --- /dev/null +++ b/stripe/params/test_helpers/issuing/_card_return_card_params.py @@ -0,0 +1,11 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import NotRequired, TypedDict + + +class CardReturnCardParams(TypedDict): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/test_helpers/issuing/_card_ship_card_params.py b/stripe/params/test_helpers/issuing/_card_ship_card_params.py new file mode 100644 index 000000000..f4fa20be2 --- /dev/null +++ b/stripe/params/test_helpers/issuing/_card_ship_card_params.py @@ -0,0 +1,11 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import NotRequired, TypedDict + + +class CardShipCardParams(TypedDict): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/test_helpers/issuing/_card_submit_card_params.py b/stripe/params/test_helpers/issuing/_card_submit_card_params.py new file mode 100644 index 000000000..4497eaa99 --- /dev/null +++ b/stripe/params/test_helpers/issuing/_card_submit_card_params.py @@ -0,0 +1,11 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import NotRequired, TypedDict + + +class CardSubmitCardParams(TypedDict): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/test_helpers/issuing/_personalization_design_activate_params.py b/stripe/params/test_helpers/issuing/_personalization_design_activate_params.py new file mode 100644 index 000000000..7ec377620 --- /dev/null +++ b/stripe/params/test_helpers/issuing/_personalization_design_activate_params.py @@ -0,0 +1,11 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import NotRequired, TypedDict + + +class PersonalizationDesignActivateParams(TypedDict): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/test_helpers/issuing/_personalization_design_deactivate_params.py b/stripe/params/test_helpers/issuing/_personalization_design_deactivate_params.py new file mode 100644 index 000000000..933677224 --- /dev/null +++ b/stripe/params/test_helpers/issuing/_personalization_design_deactivate_params.py @@ -0,0 +1,11 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import NotRequired, TypedDict + + +class PersonalizationDesignDeactivateParams(TypedDict): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/test_helpers/issuing/_personalization_design_reject_params.py b/stripe/params/test_helpers/issuing/_personalization_design_reject_params.py new file mode 100644 index 000000000..36e4cad3b --- /dev/null +++ b/stripe/params/test_helpers/issuing/_personalization_design_reject_params.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import Literal, NotRequired, TypedDict + + +class PersonalizationDesignRejectParams(TypedDict): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + rejection_reasons: "PersonalizationDesignRejectParamsRejectionReasons" + """ + The reason(s) the personalization design was rejected. + """ + + +class PersonalizationDesignRejectParamsRejectionReasons(TypedDict): + card_logo: NotRequired[ + List[ + Literal[ + "geographic_location", + "inappropriate", + "network_name", + "non_binary_image", + "non_fiat_currency", + "other", + "other_entity", + "promotional_material", + ] + ] + ] + """ + The reason(s) the card logo was rejected. + """ + carrier_text: NotRequired[ + List[ + Literal[ + "geographic_location", + "inappropriate", + "network_name", + "non_fiat_currency", + "other", + "other_entity", + "promotional_material", + ] + ] + ] + """ + The reason(s) the carrier text was rejected. + """ diff --git a/stripe/params/test_helpers/issuing/_transaction_create_force_capture_params.py b/stripe/params/test_helpers/issuing/_transaction_create_force_capture_params.py new file mode 100644 index 000000000..e2818f727 --- /dev/null +++ b/stripe/params/test_helpers/issuing/_transaction_create_force_capture_params.py @@ -0,0 +1,628 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import Literal, NotRequired, TypedDict + + +class TransactionCreateForceCaptureParams(TypedDict): + amount: int + """ + The total amount to attempt to capture. This amount is in the provided currency, or defaults to the cards currency, and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + """ + card: str + """ + Card associated with this transaction. + """ + currency: NotRequired[str] + """ + The currency of the capture. If not provided, defaults to the currency of the card. 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. + """ + merchant_data: NotRequired[ + "TransactionCreateForceCaptureParamsMerchantData" + ] + """ + Details about the seller (grocery store, e-commerce website, etc.) where the card authorization happened. + """ + purchase_details: NotRequired[ + "TransactionCreateForceCaptureParamsPurchaseDetails" + ] + """ + Additional purchase information that is optionally provided by the merchant. + """ + + +class TransactionCreateForceCaptureParamsMerchantData(TypedDict): + category: NotRequired[ + Literal[ + "ac_refrigeration_repair", + "accounting_bookkeeping_services", + "advertising_services", + "agricultural_cooperative", + "airlines_air_carriers", + "airports_flying_fields", + "ambulance_services", + "amusement_parks_carnivals", + "antique_reproductions", + "antique_shops", + "aquariums", + "architectural_surveying_services", + "art_dealers_and_galleries", + "artists_supply_and_craft_shops", + "auto_and_home_supply_stores", + "auto_body_repair_shops", + "auto_paint_shops", + "auto_service_shops", + "automated_cash_disburse", + "automated_fuel_dispensers", + "automobile_associations", + "automotive_parts_and_accessories_stores", + "automotive_tire_stores", + "bail_and_bond_payments", + "bakeries", + "bands_orchestras", + "barber_and_beauty_shops", + "betting_casino_gambling", + "bicycle_shops", + "billiard_pool_establishments", + "boat_dealers", + "boat_rentals_and_leases", + "book_stores", + "books_periodicals_and_newspapers", + "bowling_alleys", + "bus_lines", + "business_secretarial_schools", + "buying_shopping_services", + "cable_satellite_and_other_pay_television_and_radio", + "camera_and_photographic_supply_stores", + "candy_nut_and_confectionery_stores", + "car_and_truck_dealers_new_used", + "car_and_truck_dealers_used_only", + "car_rental_agencies", + "car_washes", + "carpentry_services", + "carpet_upholstery_cleaning", + "caterers", + "charitable_and_social_service_organizations_fundraising", + "chemicals_and_allied_products", + "child_care_services", + "childrens_and_infants_wear_stores", + "chiropodists_podiatrists", + "chiropractors", + "cigar_stores_and_stands", + "civic_social_fraternal_associations", + "cleaning_and_maintenance", + "clothing_rental", + "colleges_universities", + "commercial_equipment", + "commercial_footwear", + "commercial_photography_art_and_graphics", + "commuter_transport_and_ferries", + "computer_network_services", + "computer_programming", + "computer_repair", + "computer_software_stores", + "computers_peripherals_and_software", + "concrete_work_services", + "construction_materials", + "consulting_public_relations", + "correspondence_schools", + "cosmetic_stores", + "counseling_services", + "country_clubs", + "courier_services", + "court_costs", + "credit_reporting_agencies", + "cruise_lines", + "dairy_products_stores", + "dance_hall_studios_schools", + "dating_escort_services", + "dentists_orthodontists", + "department_stores", + "detective_agencies", + "digital_goods_applications", + "digital_goods_games", + "digital_goods_large_volume", + "digital_goods_media", + "direct_marketing_catalog_merchant", + "direct_marketing_combination_catalog_and_retail_merchant", + "direct_marketing_inbound_telemarketing", + "direct_marketing_insurance_services", + "direct_marketing_other", + "direct_marketing_outbound_telemarketing", + "direct_marketing_subscription", + "direct_marketing_travel", + "discount_stores", + "doctors", + "door_to_door_sales", + "drapery_window_covering_and_upholstery_stores", + "drinking_places", + "drug_stores_and_pharmacies", + "drugs_drug_proprietaries_and_druggist_sundries", + "dry_cleaners", + "durable_goods", + "duty_free_stores", + "eating_places_restaurants", + "educational_services", + "electric_razor_stores", + "electric_vehicle_charging", + "electrical_parts_and_equipment", + "electrical_services", + "electronics_repair_shops", + "electronics_stores", + "elementary_secondary_schools", + "emergency_services_gcas_visa_use_only", + "employment_temp_agencies", + "equipment_rental", + "exterminating_services", + "family_clothing_stores", + "fast_food_restaurants", + "financial_institutions", + "fines_government_administrative_entities", + "fireplace_fireplace_screens_and_accessories_stores", + "floor_covering_stores", + "florists", + "florists_supplies_nursery_stock_and_flowers", + "freezer_and_locker_meat_provisioners", + "fuel_dealers_non_automotive", + "funeral_services_crematories", + "furniture_home_furnishings_and_equipment_stores_except_appliances", + "furniture_repair_refinishing", + "furriers_and_fur_shops", + "general_services", + "gift_card_novelty_and_souvenir_shops", + "glass_paint_and_wallpaper_stores", + "glassware_crystal_stores", + "golf_courses_public", + "government_licensed_horse_dog_racing_us_region_only", + "government_licensed_online_casions_online_gambling_us_region_only", + "government_owned_lotteries_non_us_region", + "government_owned_lotteries_us_region_only", + "government_services", + "grocery_stores_supermarkets", + "hardware_equipment_and_supplies", + "hardware_stores", + "health_and_beauty_spas", + "hearing_aids_sales_and_supplies", + "heating_plumbing_a_c", + "hobby_toy_and_game_shops", + "home_supply_warehouse_stores", + "hospitals", + "hotels_motels_and_resorts", + "household_appliance_stores", + "industrial_supplies", + "information_retrieval_services", + "insurance_default", + "insurance_underwriting_premiums", + "intra_company_purchases", + "jewelry_stores_watches_clocks_and_silverware_stores", + "landscaping_services", + "laundries", + "laundry_cleaning_services", + "legal_services_attorneys", + "luggage_and_leather_goods_stores", + "lumber_building_materials_stores", + "manual_cash_disburse", + "marinas_service_and_supplies", + "marketplaces", + "masonry_stonework_and_plaster", + "massage_parlors", + "medical_and_dental_labs", + "medical_dental_ophthalmic_and_hospital_equipment_and_supplies", + "medical_services", + "membership_organizations", + "mens_and_boys_clothing_and_accessories_stores", + "mens_womens_clothing_stores", + "metal_service_centers", + "miscellaneous_apparel_and_accessory_shops", + "miscellaneous_auto_dealers", + "miscellaneous_business_services", + "miscellaneous_food_stores", + "miscellaneous_general_merchandise", + "miscellaneous_general_services", + "miscellaneous_home_furnishing_specialty_stores", + "miscellaneous_publishing_and_printing", + "miscellaneous_recreation_services", + "miscellaneous_repair_shops", + "miscellaneous_specialty_retail", + "mobile_home_dealers", + "motion_picture_theaters", + "motor_freight_carriers_and_trucking", + "motor_homes_dealers", + "motor_vehicle_supplies_and_new_parts", + "motorcycle_shops_and_dealers", + "motorcycle_shops_dealers", + "music_stores_musical_instruments_pianos_and_sheet_music", + "news_dealers_and_newsstands", + "non_fi_money_orders", + "non_fi_stored_value_card_purchase_load", + "nondurable_goods", + "nurseries_lawn_and_garden_supply_stores", + "nursing_personal_care", + "office_and_commercial_furniture", + "opticians_eyeglasses", + "optometrists_ophthalmologist", + "orthopedic_goods_prosthetic_devices", + "osteopaths", + "package_stores_beer_wine_and_liquor", + "paints_varnishes_and_supplies", + "parking_lots_garages", + "passenger_railways", + "pawn_shops", + "pet_shops_pet_food_and_supplies", + "petroleum_and_petroleum_products", + "photo_developing", + "photographic_photocopy_microfilm_equipment_and_supplies", + "photographic_studios", + "picture_video_production", + "piece_goods_notions_and_other_dry_goods", + "plumbing_heating_equipment_and_supplies", + "political_organizations", + "postal_services_government_only", + "precious_stones_and_metals_watches_and_jewelry", + "professional_services", + "public_warehousing_and_storage", + "quick_copy_repro_and_blueprint", + "railroads", + "real_estate_agents_and_managers_rentals", + "record_stores", + "recreational_vehicle_rentals", + "religious_goods_stores", + "religious_organizations", + "roofing_siding_sheet_metal", + "secretarial_support_services", + "security_brokers_dealers", + "service_stations", + "sewing_needlework_fabric_and_piece_goods_stores", + "shoe_repair_hat_cleaning", + "shoe_stores", + "small_appliance_repair", + "snowmobile_dealers", + "special_trade_services", + "specialty_cleaning", + "sporting_goods_stores", + "sporting_recreation_camps", + "sports_and_riding_apparel_stores", + "sports_clubs_fields", + "stamp_and_coin_stores", + "stationary_office_supplies_printing_and_writing_paper", + "stationery_stores_office_and_school_supply_stores", + "swimming_pools_sales", + "t_ui_travel_germany", + "tailors_alterations", + "tax_payments_government_agencies", + "tax_preparation_services", + "taxicabs_limousines", + "telecommunication_equipment_and_telephone_sales", + "telecommunication_services", + "telegraph_services", + "tent_and_awning_shops", + "testing_laboratories", + "theatrical_ticket_agencies", + "timeshares", + "tire_retreading_and_repair", + "tolls_bridge_fees", + "tourist_attractions_and_exhibits", + "towing_services", + "trailer_parks_campgrounds", + "transportation_services", + "travel_agencies_tour_operators", + "truck_stop_iteration", + "truck_utility_trailer_rentals", + "typesetting_plate_making_and_related_services", + "typewriter_stores", + "u_s_federal_government_agencies_or_departments", + "uniforms_commercial_clothing", + "used_merchandise_and_secondhand_stores", + "utilities", + "variety_stores", + "veterinary_services", + "video_amusement_game_supplies", + "video_game_arcades", + "video_tape_rental_stores", + "vocational_trade_schools", + "watch_jewelry_repair", + "welding_repair", + "wholesale_clubs", + "wig_and_toupee_stores", + "wires_money_orders", + "womens_accessory_and_specialty_shops", + "womens_ready_to_wear_stores", + "wrecking_and_salvage_yards", + ] + ] + """ + A categorization of the seller's type of business. See our [merchant categories guide](https://stripe.com/docs/issuing/merchant-categories) for a list of possible values. + """ + city: NotRequired[str] + """ + City where the seller is located + """ + country: NotRequired[str] + """ + Country where the seller is located + """ + name: NotRequired[str] + """ + Name of the seller + """ + network_id: NotRequired[str] + """ + Identifier assigned to the seller by the card network. Different card networks may assign different network_id fields to the same merchant. + """ + postal_code: NotRequired[str] + """ + Postal code where the seller is located + """ + state: NotRequired[str] + """ + State where the seller is located + """ + terminal_id: NotRequired[str] + """ + An ID assigned by the seller to the location of the sale. + """ + url: NotRequired[str] + """ + URL provided by the merchant on a 3DS request + """ + + +class TransactionCreateForceCaptureParamsPurchaseDetails(TypedDict): + fleet: NotRequired[ + "TransactionCreateForceCaptureParamsPurchaseDetailsFleet" + ] + """ + Fleet-specific information for transactions using Fleet cards. + """ + flight: NotRequired[ + "TransactionCreateForceCaptureParamsPurchaseDetailsFlight" + ] + """ + Information about the flight that was purchased with this transaction. + """ + fuel: NotRequired["TransactionCreateForceCaptureParamsPurchaseDetailsFuel"] + """ + Information about fuel that was purchased with this transaction. + """ + lodging: NotRequired[ + "TransactionCreateForceCaptureParamsPurchaseDetailsLodging" + ] + """ + Information about lodging that was purchased with this transaction. + """ + receipt: NotRequired[ + List["TransactionCreateForceCaptureParamsPurchaseDetailsReceipt"] + ] + """ + The line items in the purchase. + """ + reference: NotRequired[str] + """ + A merchant-specific order number. + """ + + +class TransactionCreateForceCaptureParamsPurchaseDetailsFleet(TypedDict): + cardholder_prompt_data: NotRequired[ + "TransactionCreateForceCaptureParamsPurchaseDetailsFleetCardholderPromptData" + ] + """ + Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry. + """ + purchase_type: NotRequired[ + Literal[ + "fuel_and_non_fuel_purchase", "fuel_purchase", "non_fuel_purchase" + ] + ] + """ + The type of purchase. One of `fuel_purchase`, `non_fuel_purchase`, or `fuel_and_non_fuel_purchase`. + """ + reported_breakdown: NotRequired[ + "TransactionCreateForceCaptureParamsPurchaseDetailsFleetReportedBreakdown" + ] + """ + More information about the total amount. This information is not guaranteed to be accurate as some merchants may provide unreliable data. + """ + service_type: NotRequired[ + Literal["full_service", "non_fuel_transaction", "self_service"] + ] + """ + The type of fuel service. One of `non_fuel_transaction`, `full_service`, or `self_service`. + """ + + +class TransactionCreateForceCaptureParamsPurchaseDetailsFleetCardholderPromptData( + TypedDict, +): + driver_id: NotRequired[str] + """ + Driver ID. + """ + odometer: NotRequired[int] + """ + Odometer reading. + """ + unspecified_id: NotRequired[str] + """ + An alphanumeric ID. This field is used when a vehicle ID, driver ID, or generic ID is entered by the cardholder, but the merchant or card network did not specify the prompt type. + """ + user_id: NotRequired[str] + """ + User ID. + """ + vehicle_number: NotRequired[str] + """ + Vehicle number. + """ + + +class TransactionCreateForceCaptureParamsPurchaseDetailsFleetReportedBreakdown( + TypedDict, +): + fuel: NotRequired[ + "TransactionCreateForceCaptureParamsPurchaseDetailsFleetReportedBreakdownFuel" + ] + """ + Breakdown of fuel portion of the purchase. + """ + non_fuel: NotRequired[ + "TransactionCreateForceCaptureParamsPurchaseDetailsFleetReportedBreakdownNonFuel" + ] + """ + Breakdown of non-fuel portion of the purchase. + """ + tax: NotRequired[ + "TransactionCreateForceCaptureParamsPurchaseDetailsFleetReportedBreakdownTax" + ] + """ + Information about tax included in this transaction. + """ + + +class TransactionCreateForceCaptureParamsPurchaseDetailsFleetReportedBreakdownFuel( + TypedDict, +): + gross_amount_decimal: NotRequired[str] + """ + Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive of taxes. + """ + + +class TransactionCreateForceCaptureParamsPurchaseDetailsFleetReportedBreakdownNonFuel( + TypedDict, +): + gross_amount_decimal: NotRequired[str] + """ + Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes. + """ + + +class TransactionCreateForceCaptureParamsPurchaseDetailsFleetReportedBreakdownTax( + TypedDict, +): + local_amount_decimal: NotRequired[str] + """ + Amount of state or provincial Sales Tax included in the transaction amount. Null if not reported by merchant or not subject to tax. + """ + national_amount_decimal: NotRequired[str] + """ + Amount of national Sales Tax or VAT included in the transaction amount. Null if not reported by merchant or not subject to tax. + """ + + +class TransactionCreateForceCaptureParamsPurchaseDetailsFlight(TypedDict): + departure_at: NotRequired[int] + """ + The time that the flight departed. + """ + passenger_name: NotRequired[str] + """ + The name of the passenger. + """ + refundable: NotRequired[bool] + """ + Whether the ticket is refundable. + """ + segments: NotRequired[ + List["TransactionCreateForceCaptureParamsPurchaseDetailsFlightSegment"] + ] + """ + The legs of the trip. + """ + travel_agency: NotRequired[str] + """ + The travel agency that issued the ticket. + """ + + +class TransactionCreateForceCaptureParamsPurchaseDetailsFlightSegment( + TypedDict, +): + arrival_airport_code: NotRequired[str] + """ + The three-letter IATA airport code of the flight's destination. + """ + carrier: NotRequired[str] + """ + The airline carrier code. + """ + departure_airport_code: NotRequired[str] + """ + The three-letter IATA airport code that the flight departed from. + """ + flight_number: NotRequired[str] + """ + The flight number. + """ + service_class: NotRequired[str] + """ + The flight's service class. + """ + stopover_allowed: NotRequired[bool] + """ + Whether a stopover is allowed on this flight. + """ + + +class TransactionCreateForceCaptureParamsPurchaseDetailsFuel(TypedDict): + industry_product_code: NotRequired[str] + """ + [Conexxus Payment System Product Code](https://www.conexxus.org/conexxus-payment-system-product-codes) identifying the primary fuel product purchased. + """ + quantity_decimal: NotRequired[str] + """ + The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places. + """ + type: NotRequired[ + Literal[ + "diesel", + "other", + "unleaded_plus", + "unleaded_regular", + "unleaded_super", + ] + ] + """ + The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`. + """ + unit: NotRequired[ + Literal[ + "charging_minute", + "imperial_gallon", + "kilogram", + "kilowatt_hour", + "liter", + "other", + "pound", + "us_gallon", + ] + ] + """ + The units for `quantity_decimal`. One of `charging_minute`, `imperial_gallon`, `kilogram`, `kilowatt_hour`, `liter`, `pound`, `us_gallon`, or `other`. + """ + unit_cost_decimal: NotRequired[str] + """ + The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places. + """ + + +class TransactionCreateForceCaptureParamsPurchaseDetailsLodging(TypedDict): + check_in_at: NotRequired[int] + """ + The time of checking into the lodging. + """ + nights: NotRequired[int] + """ + The number of nights stayed at the lodging. + """ + + +class TransactionCreateForceCaptureParamsPurchaseDetailsReceipt(TypedDict): + description: NotRequired[str] + quantity: NotRequired[str] + total: NotRequired[int] + unit_cost: NotRequired[int] diff --git a/stripe/params/test_helpers/issuing/_transaction_create_unlinked_refund_params.py b/stripe/params/test_helpers/issuing/_transaction_create_unlinked_refund_params.py new file mode 100644 index 000000000..1fa13fae8 --- /dev/null +++ b/stripe/params/test_helpers/issuing/_transaction_create_unlinked_refund_params.py @@ -0,0 +1,632 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import Literal, NotRequired, TypedDict + + +class TransactionCreateUnlinkedRefundParams(TypedDict): + amount: int + """ + The total amount to attempt to refund. This amount is in the provided currency, or defaults to the cards currency, and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + """ + card: str + """ + Card associated with this unlinked refund transaction. + """ + currency: NotRequired[str] + """ + The currency of the unlinked refund. If not provided, defaults to the currency of the card. 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. + """ + merchant_data: NotRequired[ + "TransactionCreateUnlinkedRefundParamsMerchantData" + ] + """ + Details about the seller (grocery store, e-commerce website, etc.) where the card authorization happened. + """ + purchase_details: NotRequired[ + "TransactionCreateUnlinkedRefundParamsPurchaseDetails" + ] + """ + Additional purchase information that is optionally provided by the merchant. + """ + + +class TransactionCreateUnlinkedRefundParamsMerchantData(TypedDict): + category: NotRequired[ + Literal[ + "ac_refrigeration_repair", + "accounting_bookkeeping_services", + "advertising_services", + "agricultural_cooperative", + "airlines_air_carriers", + "airports_flying_fields", + "ambulance_services", + "amusement_parks_carnivals", + "antique_reproductions", + "antique_shops", + "aquariums", + "architectural_surveying_services", + "art_dealers_and_galleries", + "artists_supply_and_craft_shops", + "auto_and_home_supply_stores", + "auto_body_repair_shops", + "auto_paint_shops", + "auto_service_shops", + "automated_cash_disburse", + "automated_fuel_dispensers", + "automobile_associations", + "automotive_parts_and_accessories_stores", + "automotive_tire_stores", + "bail_and_bond_payments", + "bakeries", + "bands_orchestras", + "barber_and_beauty_shops", + "betting_casino_gambling", + "bicycle_shops", + "billiard_pool_establishments", + "boat_dealers", + "boat_rentals_and_leases", + "book_stores", + "books_periodicals_and_newspapers", + "bowling_alleys", + "bus_lines", + "business_secretarial_schools", + "buying_shopping_services", + "cable_satellite_and_other_pay_television_and_radio", + "camera_and_photographic_supply_stores", + "candy_nut_and_confectionery_stores", + "car_and_truck_dealers_new_used", + "car_and_truck_dealers_used_only", + "car_rental_agencies", + "car_washes", + "carpentry_services", + "carpet_upholstery_cleaning", + "caterers", + "charitable_and_social_service_organizations_fundraising", + "chemicals_and_allied_products", + "child_care_services", + "childrens_and_infants_wear_stores", + "chiropodists_podiatrists", + "chiropractors", + "cigar_stores_and_stands", + "civic_social_fraternal_associations", + "cleaning_and_maintenance", + "clothing_rental", + "colleges_universities", + "commercial_equipment", + "commercial_footwear", + "commercial_photography_art_and_graphics", + "commuter_transport_and_ferries", + "computer_network_services", + "computer_programming", + "computer_repair", + "computer_software_stores", + "computers_peripherals_and_software", + "concrete_work_services", + "construction_materials", + "consulting_public_relations", + "correspondence_schools", + "cosmetic_stores", + "counseling_services", + "country_clubs", + "courier_services", + "court_costs", + "credit_reporting_agencies", + "cruise_lines", + "dairy_products_stores", + "dance_hall_studios_schools", + "dating_escort_services", + "dentists_orthodontists", + "department_stores", + "detective_agencies", + "digital_goods_applications", + "digital_goods_games", + "digital_goods_large_volume", + "digital_goods_media", + "direct_marketing_catalog_merchant", + "direct_marketing_combination_catalog_and_retail_merchant", + "direct_marketing_inbound_telemarketing", + "direct_marketing_insurance_services", + "direct_marketing_other", + "direct_marketing_outbound_telemarketing", + "direct_marketing_subscription", + "direct_marketing_travel", + "discount_stores", + "doctors", + "door_to_door_sales", + "drapery_window_covering_and_upholstery_stores", + "drinking_places", + "drug_stores_and_pharmacies", + "drugs_drug_proprietaries_and_druggist_sundries", + "dry_cleaners", + "durable_goods", + "duty_free_stores", + "eating_places_restaurants", + "educational_services", + "electric_razor_stores", + "electric_vehicle_charging", + "electrical_parts_and_equipment", + "electrical_services", + "electronics_repair_shops", + "electronics_stores", + "elementary_secondary_schools", + "emergency_services_gcas_visa_use_only", + "employment_temp_agencies", + "equipment_rental", + "exterminating_services", + "family_clothing_stores", + "fast_food_restaurants", + "financial_institutions", + "fines_government_administrative_entities", + "fireplace_fireplace_screens_and_accessories_stores", + "floor_covering_stores", + "florists", + "florists_supplies_nursery_stock_and_flowers", + "freezer_and_locker_meat_provisioners", + "fuel_dealers_non_automotive", + "funeral_services_crematories", + "furniture_home_furnishings_and_equipment_stores_except_appliances", + "furniture_repair_refinishing", + "furriers_and_fur_shops", + "general_services", + "gift_card_novelty_and_souvenir_shops", + "glass_paint_and_wallpaper_stores", + "glassware_crystal_stores", + "golf_courses_public", + "government_licensed_horse_dog_racing_us_region_only", + "government_licensed_online_casions_online_gambling_us_region_only", + "government_owned_lotteries_non_us_region", + "government_owned_lotteries_us_region_only", + "government_services", + "grocery_stores_supermarkets", + "hardware_equipment_and_supplies", + "hardware_stores", + "health_and_beauty_spas", + "hearing_aids_sales_and_supplies", + "heating_plumbing_a_c", + "hobby_toy_and_game_shops", + "home_supply_warehouse_stores", + "hospitals", + "hotels_motels_and_resorts", + "household_appliance_stores", + "industrial_supplies", + "information_retrieval_services", + "insurance_default", + "insurance_underwriting_premiums", + "intra_company_purchases", + "jewelry_stores_watches_clocks_and_silverware_stores", + "landscaping_services", + "laundries", + "laundry_cleaning_services", + "legal_services_attorneys", + "luggage_and_leather_goods_stores", + "lumber_building_materials_stores", + "manual_cash_disburse", + "marinas_service_and_supplies", + "marketplaces", + "masonry_stonework_and_plaster", + "massage_parlors", + "medical_and_dental_labs", + "medical_dental_ophthalmic_and_hospital_equipment_and_supplies", + "medical_services", + "membership_organizations", + "mens_and_boys_clothing_and_accessories_stores", + "mens_womens_clothing_stores", + "metal_service_centers", + "miscellaneous_apparel_and_accessory_shops", + "miscellaneous_auto_dealers", + "miscellaneous_business_services", + "miscellaneous_food_stores", + "miscellaneous_general_merchandise", + "miscellaneous_general_services", + "miscellaneous_home_furnishing_specialty_stores", + "miscellaneous_publishing_and_printing", + "miscellaneous_recreation_services", + "miscellaneous_repair_shops", + "miscellaneous_specialty_retail", + "mobile_home_dealers", + "motion_picture_theaters", + "motor_freight_carriers_and_trucking", + "motor_homes_dealers", + "motor_vehicle_supplies_and_new_parts", + "motorcycle_shops_and_dealers", + "motorcycle_shops_dealers", + "music_stores_musical_instruments_pianos_and_sheet_music", + "news_dealers_and_newsstands", + "non_fi_money_orders", + "non_fi_stored_value_card_purchase_load", + "nondurable_goods", + "nurseries_lawn_and_garden_supply_stores", + "nursing_personal_care", + "office_and_commercial_furniture", + "opticians_eyeglasses", + "optometrists_ophthalmologist", + "orthopedic_goods_prosthetic_devices", + "osteopaths", + "package_stores_beer_wine_and_liquor", + "paints_varnishes_and_supplies", + "parking_lots_garages", + "passenger_railways", + "pawn_shops", + "pet_shops_pet_food_and_supplies", + "petroleum_and_petroleum_products", + "photo_developing", + "photographic_photocopy_microfilm_equipment_and_supplies", + "photographic_studios", + "picture_video_production", + "piece_goods_notions_and_other_dry_goods", + "plumbing_heating_equipment_and_supplies", + "political_organizations", + "postal_services_government_only", + "precious_stones_and_metals_watches_and_jewelry", + "professional_services", + "public_warehousing_and_storage", + "quick_copy_repro_and_blueprint", + "railroads", + "real_estate_agents_and_managers_rentals", + "record_stores", + "recreational_vehicle_rentals", + "religious_goods_stores", + "religious_organizations", + "roofing_siding_sheet_metal", + "secretarial_support_services", + "security_brokers_dealers", + "service_stations", + "sewing_needlework_fabric_and_piece_goods_stores", + "shoe_repair_hat_cleaning", + "shoe_stores", + "small_appliance_repair", + "snowmobile_dealers", + "special_trade_services", + "specialty_cleaning", + "sporting_goods_stores", + "sporting_recreation_camps", + "sports_and_riding_apparel_stores", + "sports_clubs_fields", + "stamp_and_coin_stores", + "stationary_office_supplies_printing_and_writing_paper", + "stationery_stores_office_and_school_supply_stores", + "swimming_pools_sales", + "t_ui_travel_germany", + "tailors_alterations", + "tax_payments_government_agencies", + "tax_preparation_services", + "taxicabs_limousines", + "telecommunication_equipment_and_telephone_sales", + "telecommunication_services", + "telegraph_services", + "tent_and_awning_shops", + "testing_laboratories", + "theatrical_ticket_agencies", + "timeshares", + "tire_retreading_and_repair", + "tolls_bridge_fees", + "tourist_attractions_and_exhibits", + "towing_services", + "trailer_parks_campgrounds", + "transportation_services", + "travel_agencies_tour_operators", + "truck_stop_iteration", + "truck_utility_trailer_rentals", + "typesetting_plate_making_and_related_services", + "typewriter_stores", + "u_s_federal_government_agencies_or_departments", + "uniforms_commercial_clothing", + "used_merchandise_and_secondhand_stores", + "utilities", + "variety_stores", + "veterinary_services", + "video_amusement_game_supplies", + "video_game_arcades", + "video_tape_rental_stores", + "vocational_trade_schools", + "watch_jewelry_repair", + "welding_repair", + "wholesale_clubs", + "wig_and_toupee_stores", + "wires_money_orders", + "womens_accessory_and_specialty_shops", + "womens_ready_to_wear_stores", + "wrecking_and_salvage_yards", + ] + ] + """ + A categorization of the seller's type of business. See our [merchant categories guide](https://stripe.com/docs/issuing/merchant-categories) for a list of possible values. + """ + city: NotRequired[str] + """ + City where the seller is located + """ + country: NotRequired[str] + """ + Country where the seller is located + """ + name: NotRequired[str] + """ + Name of the seller + """ + network_id: NotRequired[str] + """ + Identifier assigned to the seller by the card network. Different card networks may assign different network_id fields to the same merchant. + """ + postal_code: NotRequired[str] + """ + Postal code where the seller is located + """ + state: NotRequired[str] + """ + State where the seller is located + """ + terminal_id: NotRequired[str] + """ + An ID assigned by the seller to the location of the sale. + """ + url: NotRequired[str] + """ + URL provided by the merchant on a 3DS request + """ + + +class TransactionCreateUnlinkedRefundParamsPurchaseDetails(TypedDict): + fleet: NotRequired[ + "TransactionCreateUnlinkedRefundParamsPurchaseDetailsFleet" + ] + """ + Fleet-specific information for transactions using Fleet cards. + """ + flight: NotRequired[ + "TransactionCreateUnlinkedRefundParamsPurchaseDetailsFlight" + ] + """ + Information about the flight that was purchased with this transaction. + """ + fuel: NotRequired[ + "TransactionCreateUnlinkedRefundParamsPurchaseDetailsFuel" + ] + """ + Information about fuel that was purchased with this transaction. + """ + lodging: NotRequired[ + "TransactionCreateUnlinkedRefundParamsPurchaseDetailsLodging" + ] + """ + Information about lodging that was purchased with this transaction. + """ + receipt: NotRequired[ + List["TransactionCreateUnlinkedRefundParamsPurchaseDetailsReceipt"] + ] + """ + The line items in the purchase. + """ + reference: NotRequired[str] + """ + A merchant-specific order number. + """ + + +class TransactionCreateUnlinkedRefundParamsPurchaseDetailsFleet(TypedDict): + cardholder_prompt_data: NotRequired[ + "TransactionCreateUnlinkedRefundParamsPurchaseDetailsFleetCardholderPromptData" + ] + """ + Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry. + """ + purchase_type: NotRequired[ + Literal[ + "fuel_and_non_fuel_purchase", "fuel_purchase", "non_fuel_purchase" + ] + ] + """ + The type of purchase. One of `fuel_purchase`, `non_fuel_purchase`, or `fuel_and_non_fuel_purchase`. + """ + reported_breakdown: NotRequired[ + "TransactionCreateUnlinkedRefundParamsPurchaseDetailsFleetReportedBreakdown" + ] + """ + More information about the total amount. This information is not guaranteed to be accurate as some merchants may provide unreliable data. + """ + service_type: NotRequired[ + Literal["full_service", "non_fuel_transaction", "self_service"] + ] + """ + The type of fuel service. One of `non_fuel_transaction`, `full_service`, or `self_service`. + """ + + +class TransactionCreateUnlinkedRefundParamsPurchaseDetailsFleetCardholderPromptData( + TypedDict, +): + driver_id: NotRequired[str] + """ + Driver ID. + """ + odometer: NotRequired[int] + """ + Odometer reading. + """ + unspecified_id: NotRequired[str] + """ + An alphanumeric ID. This field is used when a vehicle ID, driver ID, or generic ID is entered by the cardholder, but the merchant or card network did not specify the prompt type. + """ + user_id: NotRequired[str] + """ + User ID. + """ + vehicle_number: NotRequired[str] + """ + Vehicle number. + """ + + +class TransactionCreateUnlinkedRefundParamsPurchaseDetailsFleetReportedBreakdown( + TypedDict, +): + fuel: NotRequired[ + "TransactionCreateUnlinkedRefundParamsPurchaseDetailsFleetReportedBreakdownFuel" + ] + """ + Breakdown of fuel portion of the purchase. + """ + non_fuel: NotRequired[ + "TransactionCreateUnlinkedRefundParamsPurchaseDetailsFleetReportedBreakdownNonFuel" + ] + """ + Breakdown of non-fuel portion of the purchase. + """ + tax: NotRequired[ + "TransactionCreateUnlinkedRefundParamsPurchaseDetailsFleetReportedBreakdownTax" + ] + """ + Information about tax included in this transaction. + """ + + +class TransactionCreateUnlinkedRefundParamsPurchaseDetailsFleetReportedBreakdownFuel( + TypedDict, +): + gross_amount_decimal: NotRequired[str] + """ + Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive of taxes. + """ + + +class TransactionCreateUnlinkedRefundParamsPurchaseDetailsFleetReportedBreakdownNonFuel( + TypedDict, +): + gross_amount_decimal: NotRequired[str] + """ + Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes. + """ + + +class TransactionCreateUnlinkedRefundParamsPurchaseDetailsFleetReportedBreakdownTax( + TypedDict, +): + local_amount_decimal: NotRequired[str] + """ + Amount of state or provincial Sales Tax included in the transaction amount. Null if not reported by merchant or not subject to tax. + """ + national_amount_decimal: NotRequired[str] + """ + Amount of national Sales Tax or VAT included in the transaction amount. Null if not reported by merchant or not subject to tax. + """ + + +class TransactionCreateUnlinkedRefundParamsPurchaseDetailsFlight(TypedDict): + departure_at: NotRequired[int] + """ + The time that the flight departed. + """ + passenger_name: NotRequired[str] + """ + The name of the passenger. + """ + refundable: NotRequired[bool] + """ + Whether the ticket is refundable. + """ + segments: NotRequired[ + List[ + "TransactionCreateUnlinkedRefundParamsPurchaseDetailsFlightSegment" + ] + ] + """ + The legs of the trip. + """ + travel_agency: NotRequired[str] + """ + The travel agency that issued the ticket. + """ + + +class TransactionCreateUnlinkedRefundParamsPurchaseDetailsFlightSegment( + TypedDict, +): + arrival_airport_code: NotRequired[str] + """ + The three-letter IATA airport code of the flight's destination. + """ + carrier: NotRequired[str] + """ + The airline carrier code. + """ + departure_airport_code: NotRequired[str] + """ + The three-letter IATA airport code that the flight departed from. + """ + flight_number: NotRequired[str] + """ + The flight number. + """ + service_class: NotRequired[str] + """ + The flight's service class. + """ + stopover_allowed: NotRequired[bool] + """ + Whether a stopover is allowed on this flight. + """ + + +class TransactionCreateUnlinkedRefundParamsPurchaseDetailsFuel(TypedDict): + industry_product_code: NotRequired[str] + """ + [Conexxus Payment System Product Code](https://www.conexxus.org/conexxus-payment-system-product-codes) identifying the primary fuel product purchased. + """ + quantity_decimal: NotRequired[str] + """ + The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places. + """ + type: NotRequired[ + Literal[ + "diesel", + "other", + "unleaded_plus", + "unleaded_regular", + "unleaded_super", + ] + ] + """ + The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`. + """ + unit: NotRequired[ + Literal[ + "charging_minute", + "imperial_gallon", + "kilogram", + "kilowatt_hour", + "liter", + "other", + "pound", + "us_gallon", + ] + ] + """ + The units for `quantity_decimal`. One of `charging_minute`, `imperial_gallon`, `kilogram`, `kilowatt_hour`, `liter`, `pound`, `us_gallon`, or `other`. + """ + unit_cost_decimal: NotRequired[str] + """ + The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places. + """ + + +class TransactionCreateUnlinkedRefundParamsPurchaseDetailsLodging(TypedDict): + check_in_at: NotRequired[int] + """ + The time of checking into the lodging. + """ + nights: NotRequired[int] + """ + The number of nights stayed at the lodging. + """ + + +class TransactionCreateUnlinkedRefundParamsPurchaseDetailsReceipt(TypedDict): + description: NotRequired[str] + quantity: NotRequired[str] + total: NotRequired[int] + unit_cost: NotRequired[int] diff --git a/stripe/params/test_helpers/issuing/_transaction_refund_params.py b/stripe/params/test_helpers/issuing/_transaction_refund_params.py new file mode 100644 index 000000000..d488f1d6a --- /dev/null +++ b/stripe/params/test_helpers/issuing/_transaction_refund_params.py @@ -0,0 +1,15 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import NotRequired, TypedDict + + +class TransactionRefundParams(TypedDict): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + refund_amount: NotRequired[int] + """ + The total amount to attempt to refund. This amount is in the provided currency, or defaults to the cards currency, and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + """ diff --git a/stripe/params/test_helpers/terminal/__init__.py b/stripe/params/test_helpers/terminal/__init__.py new file mode 100644 index 000000000..6d3da2fd8 --- /dev/null +++ b/stripe/params/test_helpers/terminal/__init__.py @@ -0,0 +1,11 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe.params.test_helpers.terminal._reader_present_payment_method_params import ( + ReaderPresentPaymentMethodParams as ReaderPresentPaymentMethodParams, +) +from stripe.params.test_helpers.terminal._reader_succeed_input_collection_params import ( + ReaderSucceedInputCollectionParams as ReaderSucceedInputCollectionParams, +) +from stripe.params.test_helpers.terminal._reader_timeout_input_collection_params import ( + ReaderTimeoutInputCollectionParams as ReaderTimeoutInputCollectionParams, +) diff --git a/stripe/params/test_helpers/terminal/_reader_present_payment_method_params.py b/stripe/params/test_helpers/terminal/_reader_present_payment_method_params.py new file mode 100644 index 000000000..333fcb456 --- /dev/null +++ b/stripe/params/test_helpers/terminal/_reader_present_payment_method_params.py @@ -0,0 +1,66 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import Literal, NotRequired, TypedDict + + +class ReaderPresentPaymentMethodParams(TypedDict): + amount_tip: NotRequired[int] + """ + Simulated on-reader tip amount. + """ + card: NotRequired["ReaderPresentPaymentMethodParamsCard"] + """ + Simulated data for the card payment method. + """ + card_present: NotRequired["ReaderPresentPaymentMethodParamsCardPresent"] + """ + Simulated data for the card_present payment method. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + interac_present: NotRequired[ + "ReaderPresentPaymentMethodParamsInteracPresent" + ] + """ + Simulated data for the interac_present payment method. + """ + type: NotRequired[Literal["card", "card_present", "interac_present"]] + """ + Simulated payment type. + """ + + +class ReaderPresentPaymentMethodParamsCard(TypedDict): + cvc: NotRequired[str] + """ + Card security code. + """ + exp_month: int + """ + Two-digit number representing the card's expiration month. + """ + exp_year: int + """ + Two- or four-digit number representing the card's expiration year. + """ + number: str + """ + The card number, as a string without any separators. + """ + + +class ReaderPresentPaymentMethodParamsCardPresent(TypedDict): + number: NotRequired[str] + """ + The card number, as a string without any separators. + """ + + +class ReaderPresentPaymentMethodParamsInteracPresent(TypedDict): + number: NotRequired[str] + """ + Card Number + """ diff --git a/stripe/params/test_helpers/terminal/_reader_succeed_input_collection_params.py b/stripe/params/test_helpers/terminal/_reader_succeed_input_collection_params.py new file mode 100644 index 000000000..8d3fd43d6 --- /dev/null +++ b/stripe/params/test_helpers/terminal/_reader_succeed_input_collection_params.py @@ -0,0 +1,15 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import Literal, NotRequired, TypedDict + + +class ReaderSucceedInputCollectionParams(TypedDict): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + skip_non_required_inputs: NotRequired[Literal["all", "none"]] + """ + This parameter defines the skip behavior for input collection. + """ diff --git a/stripe/params/test_helpers/terminal/_reader_timeout_input_collection_params.py b/stripe/params/test_helpers/terminal/_reader_timeout_input_collection_params.py new file mode 100644 index 000000000..8fbd7604e --- /dev/null +++ b/stripe/params/test_helpers/terminal/_reader_timeout_input_collection_params.py @@ -0,0 +1,11 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import NotRequired, TypedDict + + +class ReaderTimeoutInputCollectionParams(TypedDict): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/test_helpers/treasury/__init__.py b/stripe/params/test_helpers/treasury/__init__.py new file mode 100644 index 000000000..36382d1d5 --- /dev/null +++ b/stripe/params/test_helpers/treasury/__init__.py @@ -0,0 +1,41 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe.params.test_helpers.treasury._inbound_transfer_fail_params import ( + InboundTransferFailParams as InboundTransferFailParams, +) +from stripe.params.test_helpers.treasury._inbound_transfer_return_inbound_transfer_params import ( + InboundTransferReturnInboundTransferParams as InboundTransferReturnInboundTransferParams, +) +from stripe.params.test_helpers.treasury._inbound_transfer_succeed_params import ( + InboundTransferSucceedParams as InboundTransferSucceedParams, +) +from stripe.params.test_helpers.treasury._outbound_payment_fail_params import ( + OutboundPaymentFailParams as OutboundPaymentFailParams, +) +from stripe.params.test_helpers.treasury._outbound_payment_post_params import ( + OutboundPaymentPostParams as OutboundPaymentPostParams, +) +from stripe.params.test_helpers.treasury._outbound_payment_return_outbound_payment_params import ( + OutboundPaymentReturnOutboundPaymentParams as OutboundPaymentReturnOutboundPaymentParams, +) +from stripe.params.test_helpers.treasury._outbound_payment_update_params import ( + OutboundPaymentUpdateParams as OutboundPaymentUpdateParams, +) +from stripe.params.test_helpers.treasury._outbound_transfer_fail_params import ( + OutboundTransferFailParams as OutboundTransferFailParams, +) +from stripe.params.test_helpers.treasury._outbound_transfer_post_params import ( + OutboundTransferPostParams as OutboundTransferPostParams, +) +from stripe.params.test_helpers.treasury._outbound_transfer_return_outbound_transfer_params import ( + OutboundTransferReturnOutboundTransferParams as OutboundTransferReturnOutboundTransferParams, +) +from stripe.params.test_helpers.treasury._outbound_transfer_update_params import ( + OutboundTransferUpdateParams as OutboundTransferUpdateParams, +) +from stripe.params.test_helpers.treasury._received_credit_create_params import ( + ReceivedCreditCreateParams as ReceivedCreditCreateParams, +) +from stripe.params.test_helpers.treasury._received_debit_create_params import ( + ReceivedDebitCreateParams as ReceivedDebitCreateParams, +) diff --git a/stripe/params/test_helpers/treasury/_inbound_transfer_fail_params.py b/stripe/params/test_helpers/treasury/_inbound_transfer_fail_params.py new file mode 100644 index 000000000..5e5877d44 --- /dev/null +++ b/stripe/params/test_helpers/treasury/_inbound_transfer_fail_params.py @@ -0,0 +1,38 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import Literal, NotRequired, TypedDict + + +class InboundTransferFailParams(TypedDict): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + failure_details: NotRequired["InboundTransferFailParamsFailureDetails"] + """ + Details about a failed InboundTransfer. + """ + + +class InboundTransferFailParamsFailureDetails(TypedDict): + code: NotRequired[ + Literal[ + "account_closed", + "account_frozen", + "bank_account_restricted", + "bank_ownership_changed", + "debit_not_authorized", + "incorrect_account_holder_address", + "incorrect_account_holder_name", + "incorrect_account_holder_tax_id", + "insufficient_funds", + "invalid_account_number", + "invalid_currency", + "no_account", + "other", + ] + ] + """ + Reason for the failure. + """ diff --git a/stripe/params/test_helpers/treasury/_inbound_transfer_return_inbound_transfer_params.py b/stripe/params/test_helpers/treasury/_inbound_transfer_return_inbound_transfer_params.py new file mode 100644 index 000000000..1a61dde96 --- /dev/null +++ b/stripe/params/test_helpers/treasury/_inbound_transfer_return_inbound_transfer_params.py @@ -0,0 +1,11 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import NotRequired, TypedDict + + +class InboundTransferReturnInboundTransferParams(TypedDict): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/test_helpers/treasury/_inbound_transfer_succeed_params.py b/stripe/params/test_helpers/treasury/_inbound_transfer_succeed_params.py new file mode 100644 index 000000000..08a9bd06c --- /dev/null +++ b/stripe/params/test_helpers/treasury/_inbound_transfer_succeed_params.py @@ -0,0 +1,11 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import NotRequired, TypedDict + + +class InboundTransferSucceedParams(TypedDict): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/test_helpers/treasury/_outbound_payment_fail_params.py b/stripe/params/test_helpers/treasury/_outbound_payment_fail_params.py new file mode 100644 index 000000000..62e1640fd --- /dev/null +++ b/stripe/params/test_helpers/treasury/_outbound_payment_fail_params.py @@ -0,0 +1,11 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import NotRequired, TypedDict + + +class OutboundPaymentFailParams(TypedDict): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/test_helpers/treasury/_outbound_payment_post_params.py b/stripe/params/test_helpers/treasury/_outbound_payment_post_params.py new file mode 100644 index 000000000..290792b24 --- /dev/null +++ b/stripe/params/test_helpers/treasury/_outbound_payment_post_params.py @@ -0,0 +1,11 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import NotRequired, TypedDict + + +class OutboundPaymentPostParams(TypedDict): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/test_helpers/treasury/_outbound_payment_return_outbound_payment_params.py b/stripe/params/test_helpers/treasury/_outbound_payment_return_outbound_payment_params.py new file mode 100644 index 000000000..1c3a426e9 --- /dev/null +++ b/stripe/params/test_helpers/treasury/_outbound_payment_return_outbound_payment_params.py @@ -0,0 +1,37 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import Literal, NotRequired, TypedDict + + +class OutboundPaymentReturnOutboundPaymentParams(TypedDict): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + returned_details: NotRequired[ + "OutboundPaymentReturnOutboundPaymentParamsReturnedDetails" + ] + """ + Optional hash to set the return code. + """ + + +class OutboundPaymentReturnOutboundPaymentParamsReturnedDetails(TypedDict): + code: NotRequired[ + Literal[ + "account_closed", + "account_frozen", + "bank_account_restricted", + "bank_ownership_changed", + "declined", + "incorrect_account_holder_name", + "invalid_account_number", + "invalid_currency", + "no_account", + "other", + ] + ] + """ + The return code to be set on the OutboundPayment object. + """ diff --git a/stripe/params/test_helpers/treasury/_outbound_payment_update_params.py b/stripe/params/test_helpers/treasury/_outbound_payment_update_params.py new file mode 100644 index 000000000..53de8373a --- /dev/null +++ b/stripe/params/test_helpers/treasury/_outbound_payment_update_params.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import Literal, NotRequired, TypedDict + + +class OutboundPaymentUpdateParams(TypedDict): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + tracking_details: "OutboundPaymentUpdateParamsTrackingDetails" + """ + Details about network-specific tracking information. + """ + + +class OutboundPaymentUpdateParamsTrackingDetails(TypedDict): + ach: NotRequired["OutboundPaymentUpdateParamsTrackingDetailsAch"] + """ + ACH network tracking details. + """ + type: Literal["ach", "us_domestic_wire"] + """ + The US bank account network used to send funds. + """ + us_domestic_wire: NotRequired[ + "OutboundPaymentUpdateParamsTrackingDetailsUsDomesticWire" + ] + """ + US domestic wire network tracking details. + """ + + +class OutboundPaymentUpdateParamsTrackingDetailsAch(TypedDict): + trace_id: str + """ + ACH trace ID for funds sent over the `ach` network. + """ + + +class OutboundPaymentUpdateParamsTrackingDetailsUsDomesticWire(TypedDict): + chips: NotRequired[str] + """ + CHIPS System Sequence Number (SSN) for funds sent over the `us_domestic_wire` network. + """ + imad: NotRequired[str] + """ + IMAD for funds sent over the `us_domestic_wire` network. + """ + omad: NotRequired[str] + """ + OMAD for funds sent over the `us_domestic_wire` network. + """ diff --git a/stripe/params/test_helpers/treasury/_outbound_transfer_fail_params.py b/stripe/params/test_helpers/treasury/_outbound_transfer_fail_params.py new file mode 100644 index 000000000..b85611888 --- /dev/null +++ b/stripe/params/test_helpers/treasury/_outbound_transfer_fail_params.py @@ -0,0 +1,11 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import NotRequired, TypedDict + + +class OutboundTransferFailParams(TypedDict): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/test_helpers/treasury/_outbound_transfer_post_params.py b/stripe/params/test_helpers/treasury/_outbound_transfer_post_params.py new file mode 100644 index 000000000..f432ec9c5 --- /dev/null +++ b/stripe/params/test_helpers/treasury/_outbound_transfer_post_params.py @@ -0,0 +1,11 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import NotRequired, TypedDict + + +class OutboundTransferPostParams(TypedDict): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/test_helpers/treasury/_outbound_transfer_return_outbound_transfer_params.py b/stripe/params/test_helpers/treasury/_outbound_transfer_return_outbound_transfer_params.py new file mode 100644 index 000000000..ba555bef2 --- /dev/null +++ b/stripe/params/test_helpers/treasury/_outbound_transfer_return_outbound_transfer_params.py @@ -0,0 +1,37 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import Literal, NotRequired, TypedDict + + +class OutboundTransferReturnOutboundTransferParams(TypedDict): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + returned_details: NotRequired[ + "OutboundTransferReturnOutboundTransferParamsReturnedDetails" + ] + """ + Details about a returned OutboundTransfer. + """ + + +class OutboundTransferReturnOutboundTransferParamsReturnedDetails(TypedDict): + code: NotRequired[ + Literal[ + "account_closed", + "account_frozen", + "bank_account_restricted", + "bank_ownership_changed", + "declined", + "incorrect_account_holder_name", + "invalid_account_number", + "invalid_currency", + "no_account", + "other", + ] + ] + """ + Reason for the return. + """ diff --git a/stripe/params/test_helpers/treasury/_outbound_transfer_update_params.py b/stripe/params/test_helpers/treasury/_outbound_transfer_update_params.py new file mode 100644 index 000000000..69a268fee --- /dev/null +++ b/stripe/params/test_helpers/treasury/_outbound_transfer_update_params.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import Literal, NotRequired, TypedDict + + +class OutboundTransferUpdateParams(TypedDict): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + tracking_details: "OutboundTransferUpdateParamsTrackingDetails" + """ + Details about network-specific tracking information. + """ + + +class OutboundTransferUpdateParamsTrackingDetails(TypedDict): + ach: NotRequired["OutboundTransferUpdateParamsTrackingDetailsAch"] + """ + ACH network tracking details. + """ + type: Literal["ach", "us_domestic_wire"] + """ + The US bank account network used to send funds. + """ + us_domestic_wire: NotRequired[ + "OutboundTransferUpdateParamsTrackingDetailsUsDomesticWire" + ] + """ + US domestic wire network tracking details. + """ + + +class OutboundTransferUpdateParamsTrackingDetailsAch(TypedDict): + trace_id: str + """ + ACH trace ID for funds sent over the `ach` network. + """ + + +class OutboundTransferUpdateParamsTrackingDetailsUsDomesticWire(TypedDict): + chips: NotRequired[str] + """ + CHIPS System Sequence Number (SSN) for funds sent over the `us_domestic_wire` network. + """ + imad: NotRequired[str] + """ + IMAD for funds sent over the `us_domestic_wire` network. + """ + omad: NotRequired[str] + """ + OMAD for funds sent over the `us_domestic_wire` network. + """ diff --git a/stripe/params/test_helpers/treasury/_received_credit_create_params.py b/stripe/params/test_helpers/treasury/_received_credit_create_params.py new file mode 100644 index 000000000..6be1e5063 --- /dev/null +++ b/stripe/params/test_helpers/treasury/_received_credit_create_params.py @@ -0,0 +1,89 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import Literal, NotRequired, TypedDict + + +class ReceivedCreditCreateParams(TypedDict): + amount: int + """ + Amount (in cents) to be transferred. + """ + 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). + """ + description: NotRequired[str] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + financial_account: str + """ + The FinancialAccount to send funds to. + """ + initiating_payment_method_details: NotRequired[ + "ReceivedCreditCreateParamsInitiatingPaymentMethodDetails" + ] + """ + Initiating payment method details for the object. + """ + network: Literal["ach", "us_domestic_wire"] + """ + Specifies the network rails to be used. If not set, will default to the PaymentMethod's preferred network. See the [docs](https://stripe.com/docs/treasury/money-movement/timelines) to learn more about money movement timelines for each network type. + """ + network_details: NotRequired["ReceivedCreditCreateParamsNetworkDetails"] + """ + Details about the network used for the ReceivedCredit. + """ + + +class ReceivedCreditCreateParamsInitiatingPaymentMethodDetails(TypedDict): + type: Literal["us_bank_account"] + """ + The source type. + """ + us_bank_account: NotRequired[ + "ReceivedCreditCreateParamsInitiatingPaymentMethodDetailsUsBankAccount" + ] + """ + Optional fields for `us_bank_account`. + """ + + +class ReceivedCreditCreateParamsInitiatingPaymentMethodDetailsUsBankAccount( + TypedDict, +): + account_holder_name: NotRequired[str] + """ + The bank account holder's name. + """ + account_number: NotRequired[str] + """ + The bank account number. + """ + routing_number: NotRequired[str] + """ + The bank account's routing number. + """ + + +class ReceivedCreditCreateParamsNetworkDetails(TypedDict): + ach: NotRequired["ReceivedCreditCreateParamsNetworkDetailsAch"] + """ + Optional fields for `ach`. + """ + type: Literal["ach"] + """ + The type of flow that originated the ReceivedCredit. + """ + + +class ReceivedCreditCreateParamsNetworkDetailsAch(TypedDict): + addenda: NotRequired[str] + """ + ACH Addenda record + """ diff --git a/stripe/params/test_helpers/treasury/_received_debit_create_params.py b/stripe/params/test_helpers/treasury/_received_debit_create_params.py new file mode 100644 index 000000000..7b4906a88 --- /dev/null +++ b/stripe/params/test_helpers/treasury/_received_debit_create_params.py @@ -0,0 +1,89 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import Literal, NotRequired, TypedDict + + +class ReceivedDebitCreateParams(TypedDict): + amount: int + """ + Amount (in cents) to be transferred. + """ + 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). + """ + description: NotRequired[str] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + financial_account: str + """ + The FinancialAccount to pull funds from. + """ + initiating_payment_method_details: NotRequired[ + "ReceivedDebitCreateParamsInitiatingPaymentMethodDetails" + ] + """ + Initiating payment method details for the object. + """ + network: Literal["ach"] + """ + Specifies the network rails to be used. If not set, will default to the PaymentMethod's preferred network. See the [docs](https://stripe.com/docs/treasury/money-movement/timelines) to learn more about money movement timelines for each network type. + """ + network_details: NotRequired["ReceivedDebitCreateParamsNetworkDetails"] + """ + Details about the network used for the ReceivedDebit. + """ + + +class ReceivedDebitCreateParamsInitiatingPaymentMethodDetails(TypedDict): + type: Literal["us_bank_account"] + """ + The source type. + """ + us_bank_account: NotRequired[ + "ReceivedDebitCreateParamsInitiatingPaymentMethodDetailsUsBankAccount" + ] + """ + Optional fields for `us_bank_account`. + """ + + +class ReceivedDebitCreateParamsInitiatingPaymentMethodDetailsUsBankAccount( + TypedDict, +): + account_holder_name: NotRequired[str] + """ + The bank account holder's name. + """ + account_number: NotRequired[str] + """ + The bank account number. + """ + routing_number: NotRequired[str] + """ + The bank account's routing number. + """ + + +class ReceivedDebitCreateParamsNetworkDetails(TypedDict): + ach: NotRequired["ReceivedDebitCreateParamsNetworkDetailsAch"] + """ + Optional fields for `ach`. + """ + type: Literal["ach"] + """ + The type of flow that originated the ReceivedDebit. + """ + + +class ReceivedDebitCreateParamsNetworkDetailsAch(TypedDict): + addenda: NotRequired[str] + """ + Addenda record data associated with this ReceivedDebit. + """ diff --git a/stripe/params/treasury/__init__.py b/stripe/params/treasury/__init__.py new file mode 100644 index 000000000..bb72bfe70 --- /dev/null +++ b/stripe/params/treasury/__init__.py @@ -0,0 +1,149 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe.params.treasury._credit_reversal_create_params import ( + CreditReversalCreateParams as CreditReversalCreateParams, +) +from stripe.params.treasury._credit_reversal_list_params import ( + CreditReversalListParams as CreditReversalListParams, +) +from stripe.params.treasury._credit_reversal_retrieve_params import ( + CreditReversalRetrieveParams as CreditReversalRetrieveParams, +) +from stripe.params.treasury._debit_reversal_create_params import ( + DebitReversalCreateParams as DebitReversalCreateParams, +) +from stripe.params.treasury._debit_reversal_list_params import ( + DebitReversalListParams as DebitReversalListParams, +) +from stripe.params.treasury._debit_reversal_retrieve_params import ( + DebitReversalRetrieveParams as DebitReversalRetrieveParams, +) +from stripe.params.treasury._financial_account_close_params import ( + FinancialAccountCloseParams as FinancialAccountCloseParams, +) +from stripe.params.treasury._financial_account_create_params import ( + FinancialAccountCreateParams as FinancialAccountCreateParams, +) +from stripe.params.treasury._financial_account_features_retrieve_params import ( + FinancialAccountFeaturesRetrieveParams as FinancialAccountFeaturesRetrieveParams, +) +from stripe.params.treasury._financial_account_features_update_params import ( + FinancialAccountFeaturesUpdateParams as FinancialAccountFeaturesUpdateParams, +) +from stripe.params.treasury._financial_account_list_params import ( + FinancialAccountListParams as FinancialAccountListParams, +) +from stripe.params.treasury._financial_account_modify_params import ( + FinancialAccountModifyParams as FinancialAccountModifyParams, +) +from stripe.params.treasury._financial_account_retrieve_features_params import ( + FinancialAccountRetrieveFeaturesParams as FinancialAccountRetrieveFeaturesParams, +) +from stripe.params.treasury._financial_account_retrieve_params import ( + FinancialAccountRetrieveParams as FinancialAccountRetrieveParams, +) +from stripe.params.treasury._financial_account_update_features_params import ( + FinancialAccountUpdateFeaturesParams as FinancialAccountUpdateFeaturesParams, +) +from stripe.params.treasury._financial_account_update_params import ( + FinancialAccountUpdateParams as FinancialAccountUpdateParams, +) +from stripe.params.treasury._inbound_transfer_cancel_params import ( + InboundTransferCancelParams as InboundTransferCancelParams, +) +from stripe.params.treasury._inbound_transfer_create_params import ( + InboundTransferCreateParams as InboundTransferCreateParams, +) +from stripe.params.treasury._inbound_transfer_fail_params import ( + InboundTransferFailParams as InboundTransferFailParams, +) +from stripe.params.treasury._inbound_transfer_list_params import ( + InboundTransferListParams as InboundTransferListParams, +) +from stripe.params.treasury._inbound_transfer_retrieve_params import ( + InboundTransferRetrieveParams as InboundTransferRetrieveParams, +) +from stripe.params.treasury._inbound_transfer_return_inbound_transfer_params import ( + InboundTransferReturnInboundTransferParams as InboundTransferReturnInboundTransferParams, +) +from stripe.params.treasury._inbound_transfer_succeed_params import ( + InboundTransferSucceedParams as InboundTransferSucceedParams, +) +from stripe.params.treasury._outbound_payment_cancel_params import ( + OutboundPaymentCancelParams as OutboundPaymentCancelParams, +) +from stripe.params.treasury._outbound_payment_create_params import ( + OutboundPaymentCreateParams as OutboundPaymentCreateParams, +) +from stripe.params.treasury._outbound_payment_fail_params import ( + OutboundPaymentFailParams as OutboundPaymentFailParams, +) +from stripe.params.treasury._outbound_payment_list_params import ( + OutboundPaymentListParams as OutboundPaymentListParams, +) +from stripe.params.treasury._outbound_payment_post_params import ( + OutboundPaymentPostParams as OutboundPaymentPostParams, +) +from stripe.params.treasury._outbound_payment_retrieve_params import ( + OutboundPaymentRetrieveParams as OutboundPaymentRetrieveParams, +) +from stripe.params.treasury._outbound_payment_return_outbound_payment_params import ( + OutboundPaymentReturnOutboundPaymentParams as OutboundPaymentReturnOutboundPaymentParams, +) +from stripe.params.treasury._outbound_payment_update_params import ( + OutboundPaymentUpdateParams as OutboundPaymentUpdateParams, +) +from stripe.params.treasury._outbound_transfer_cancel_params import ( + OutboundTransferCancelParams as OutboundTransferCancelParams, +) +from stripe.params.treasury._outbound_transfer_create_params import ( + OutboundTransferCreateParams as OutboundTransferCreateParams, +) +from stripe.params.treasury._outbound_transfer_fail_params import ( + OutboundTransferFailParams as OutboundTransferFailParams, +) +from stripe.params.treasury._outbound_transfer_list_params import ( + OutboundTransferListParams as OutboundTransferListParams, +) +from stripe.params.treasury._outbound_transfer_post_params import ( + OutboundTransferPostParams as OutboundTransferPostParams, +) +from stripe.params.treasury._outbound_transfer_retrieve_params import ( + OutboundTransferRetrieveParams as OutboundTransferRetrieveParams, +) +from stripe.params.treasury._outbound_transfer_return_outbound_transfer_params import ( + OutboundTransferReturnOutboundTransferParams as OutboundTransferReturnOutboundTransferParams, +) +from stripe.params.treasury._outbound_transfer_update_params import ( + OutboundTransferUpdateParams as OutboundTransferUpdateParams, +) +from stripe.params.treasury._received_credit_create_params import ( + ReceivedCreditCreateParams as ReceivedCreditCreateParams, +) +from stripe.params.treasury._received_credit_list_params import ( + ReceivedCreditListParams as ReceivedCreditListParams, +) +from stripe.params.treasury._received_credit_retrieve_params import ( + ReceivedCreditRetrieveParams as ReceivedCreditRetrieveParams, +) +from stripe.params.treasury._received_debit_create_params import ( + ReceivedDebitCreateParams as ReceivedDebitCreateParams, +) +from stripe.params.treasury._received_debit_list_params import ( + ReceivedDebitListParams as ReceivedDebitListParams, +) +from stripe.params.treasury._received_debit_retrieve_params import ( + ReceivedDebitRetrieveParams as ReceivedDebitRetrieveParams, +) +from stripe.params.treasury._transaction_entry_list_params import ( + TransactionEntryListParams as TransactionEntryListParams, +) +from stripe.params.treasury._transaction_entry_retrieve_params import ( + TransactionEntryRetrieveParams as TransactionEntryRetrieveParams, +) +from stripe.params.treasury._transaction_list_params import ( + TransactionListParams as TransactionListParams, +) +from stripe.params.treasury._transaction_retrieve_params import ( + TransactionRetrieveParams as TransactionRetrieveParams, +) diff --git a/stripe/params/treasury/_credit_reversal_create_params.py b/stripe/params/treasury/_credit_reversal_create_params.py new file mode 100644 index 000000000..96ad037e2 --- /dev/null +++ b/stripe/params/treasury/_credit_reversal_create_params.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import NotRequired + + +class CreditReversalCreateParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + received_credit: str + """ + The ReceivedCredit to reverse. + """ diff --git a/stripe/params/treasury/_credit_reversal_list_params.py b/stripe/params/treasury/_credit_reversal_list_params.py new file mode 100644 index 000000000..33b3b7359 --- /dev/null +++ b/stripe/params/treasury/_credit_reversal_list_params.py @@ -0,0 +1,36 @@ +# -*- 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 CreditReversalListParams(RequestOptions): + 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. + """ + financial_account: str + """ + Returns objects associated with this FinancialAccount. + """ + 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. + """ + received_credit: NotRequired[str] + """ + Only return CreditReversals for the ReceivedCredit ID. + """ + 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. + """ + status: NotRequired[Literal["canceled", "posted", "processing"]] + """ + Only return CreditReversals for a given status. + """ diff --git a/stripe/params/treasury/_credit_reversal_retrieve_params.py b/stripe/params/treasury/_credit_reversal_retrieve_params.py new file mode 100644 index 000000000..5e0b9c2e6 --- /dev/null +++ b/stripe/params/treasury/_credit_reversal_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 CreditReversalRetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/treasury/_debit_reversal_create_params.py b/stripe/params/treasury/_debit_reversal_create_params.py new file mode 100644 index 000000000..aa873103c --- /dev/null +++ b/stripe/params/treasury/_debit_reversal_create_params.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import NotRequired + + +class DebitReversalCreateParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + received_debit: str + """ + The ReceivedDebit to reverse. + """ diff --git a/stripe/params/treasury/_debit_reversal_list_params.py b/stripe/params/treasury/_debit_reversal_list_params.py new file mode 100644 index 000000000..66dad5062 --- /dev/null +++ b/stripe/params/treasury/_debit_reversal_list_params.py @@ -0,0 +1,40 @@ +# -*- 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 DebitReversalListParams(RequestOptions): + 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. + """ + financial_account: str + """ + Returns objects associated with this FinancialAccount. + """ + 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. + """ + received_debit: NotRequired[str] + """ + Only return DebitReversals for the ReceivedDebit ID. + """ + resolution: NotRequired[Literal["lost", "won"]] + """ + Only return DebitReversals for a given resolution. + """ + 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. + """ + status: NotRequired[Literal["canceled", "completed", "processing"]] + """ + Only return DebitReversals for a given status. + """ diff --git a/stripe/params/treasury/_debit_reversal_retrieve_params.py b/stripe/params/treasury/_debit_reversal_retrieve_params.py new file mode 100644 index 000000000..c818ddc3c --- /dev/null +++ b/stripe/params/treasury/_debit_reversal_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 DebitReversalRetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/treasury/_financial_account_close_params.py b/stripe/params/treasury/_financial_account_close_params.py new file mode 100644 index 000000000..cff6fa7b2 --- /dev/null +++ b/stripe/params/treasury/_financial_account_close_params.py @@ -0,0 +1,33 @@ +# -*- 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, TypedDict + + +class FinancialAccountCloseParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + forwarding_settings: NotRequired[ + "FinancialAccountCloseParamsForwardingSettings" + ] + """ + A different bank account where funds can be deposited/debited in order to get the closing FA's balance to $0 + """ + + +class FinancialAccountCloseParamsForwardingSettings(TypedDict): + financial_account: NotRequired[str] + """ + The financial_account id + """ + payment_method: NotRequired[str] + """ + The payment_method or bank account id. This needs to be a verified bank account. + """ + type: Literal["financial_account", "payment_method"] + """ + The type of the bank account provided. This can be either "financial_account" or "payment_method" + """ diff --git a/stripe/params/treasury/_financial_account_create_params.py b/stripe/params/treasury/_financial_account_create_params.py new file mode 100644 index 000000000..2112d4da1 --- /dev/null +++ b/stripe/params/treasury/_financial_account_create_params.py @@ -0,0 +1,209 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class FinancialAccountCreateParams(RequestOptions): + display_name: NotRequired["Literal['']|str"] + """ + The display name for the FinancialAccount. Use this field to customize the names of the FinancialAccounts for your connected accounts. Unlike the `nickname` field, `display_name` is not internal metadata and will be exposed to connected accounts. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + features: NotRequired["FinancialAccountCreateParamsFeatures"] + """ + Encodes whether a FinancialAccount has access to a particular feature. Stripe or the platform can control features via the requested field. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + nickname: NotRequired["Literal['']|str"] + """ + The nickname for the FinancialAccount. + """ + platform_restrictions: NotRequired[ + "FinancialAccountCreateParamsPlatformRestrictions" + ] + """ + The set of functionalities that the platform can restrict on the FinancialAccount. + """ + supported_currencies: List[str] + """ + The currencies the FinancialAccount can hold a balance in. + """ + + +class FinancialAccountCreateParamsFeatures(TypedDict): + card_issuing: NotRequired[ + "FinancialAccountCreateParamsFeaturesCardIssuing" + ] + """ + Encodes the FinancialAccount's ability to be used with the Issuing product, including attaching cards to and drawing funds from the FinancialAccount. + """ + deposit_insurance: NotRequired[ + "FinancialAccountCreateParamsFeaturesDepositInsurance" + ] + """ + Represents whether this FinancialAccount is eligible for deposit insurance. Various factors determine the insurance amount. + """ + financial_addresses: NotRequired[ + "FinancialAccountCreateParamsFeaturesFinancialAddresses" + ] + """ + Contains Features that add FinancialAddresses to the FinancialAccount. + """ + inbound_transfers: NotRequired[ + "FinancialAccountCreateParamsFeaturesInboundTransfers" + ] + """ + Contains settings related to adding funds to a FinancialAccount from another Account with the same owner. + """ + intra_stripe_flows: NotRequired[ + "FinancialAccountCreateParamsFeaturesIntraStripeFlows" + ] + """ + Represents the ability for the FinancialAccount to send money to, or receive money from other FinancialAccounts (for example, via OutboundPayment). + """ + outbound_payments: NotRequired[ + "FinancialAccountCreateParamsFeaturesOutboundPayments" + ] + """ + Includes Features related to initiating money movement out of the FinancialAccount to someone else's bucket of money. + """ + outbound_transfers: NotRequired[ + "FinancialAccountCreateParamsFeaturesOutboundTransfers" + ] + """ + Contains a Feature and settings related to moving money out of the FinancialAccount into another Account with the same owner. + """ + + +class FinancialAccountCreateParamsFeaturesCardIssuing(TypedDict): + requested: bool + """ + Whether the FinancialAccount should have the Feature. + """ + + +class FinancialAccountCreateParamsFeaturesDepositInsurance(TypedDict): + requested: bool + """ + Whether the FinancialAccount should have the Feature. + """ + + +class FinancialAccountCreateParamsFeaturesFinancialAddresses(TypedDict): + aba: NotRequired[ + "FinancialAccountCreateParamsFeaturesFinancialAddressesAba" + ] + """ + Adds an ABA FinancialAddress to the FinancialAccount. + """ + + +class FinancialAccountCreateParamsFeaturesFinancialAddressesAba(TypedDict): + bank: NotRequired[Literal["evolve", "fifth_third", "goldman_sachs"]] + """ + Requested bank partner + """ + requested: bool + """ + Whether the FinancialAccount should have the Feature. + """ + + +class FinancialAccountCreateParamsFeaturesInboundTransfers(TypedDict): + ach: NotRequired["FinancialAccountCreateParamsFeaturesInboundTransfersAch"] + """ + Enables ACH Debits via the InboundTransfers API. + """ + + +class FinancialAccountCreateParamsFeaturesInboundTransfersAch(TypedDict): + requested: bool + """ + Whether the FinancialAccount should have the Feature. + """ + + +class FinancialAccountCreateParamsFeaturesIntraStripeFlows(TypedDict): + requested: bool + """ + Whether the FinancialAccount should have the Feature. + """ + + +class FinancialAccountCreateParamsFeaturesOutboundPayments(TypedDict): + ach: NotRequired["FinancialAccountCreateParamsFeaturesOutboundPaymentsAch"] + """ + Enables ACH transfers via the OutboundPayments API. + """ + us_domestic_wire: NotRequired[ + "FinancialAccountCreateParamsFeaturesOutboundPaymentsUsDomesticWire" + ] + """ + Enables US domestic wire transfers via the OutboundPayments API. + """ + + +class FinancialAccountCreateParamsFeaturesOutboundPaymentsAch(TypedDict): + requested: bool + """ + Whether the FinancialAccount should have the Feature. + """ + + +class FinancialAccountCreateParamsFeaturesOutboundPaymentsUsDomesticWire( + TypedDict, +): + requested: bool + """ + Whether the FinancialAccount should have the Feature. + """ + + +class FinancialAccountCreateParamsFeaturesOutboundTransfers(TypedDict): + ach: NotRequired[ + "FinancialAccountCreateParamsFeaturesOutboundTransfersAch" + ] + """ + Enables ACH transfers via the OutboundTransfers API. + """ + us_domestic_wire: NotRequired[ + "FinancialAccountCreateParamsFeaturesOutboundTransfersUsDomesticWire" + ] + """ + Enables US domestic wire transfers via the OutboundTransfers API. + """ + + +class FinancialAccountCreateParamsFeaturesOutboundTransfersAch(TypedDict): + requested: bool + """ + Whether the FinancialAccount should have the Feature. + """ + + +class FinancialAccountCreateParamsFeaturesOutboundTransfersUsDomesticWire( + TypedDict, +): + requested: bool + """ + Whether the FinancialAccount should have the Feature. + """ + + +class FinancialAccountCreateParamsPlatformRestrictions(TypedDict): + inbound_flows: NotRequired[Literal["restricted", "unrestricted"]] + """ + Restricts all inbound money movement. + """ + outbound_flows: NotRequired[Literal["restricted", "unrestricted"]] + """ + Restricts all outbound money movement. + """ diff --git a/stripe/params/treasury/_financial_account_features_retrieve_params.py b/stripe/params/treasury/_financial_account_features_retrieve_params.py new file mode 100644 index 000000000..005ff4997 --- /dev/null +++ b/stripe/params/treasury/_financial_account_features_retrieve_params.py @@ -0,0 +1,11 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import NotRequired, TypedDict + + +class FinancialAccountFeaturesRetrieveParams(TypedDict): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/treasury/_financial_account_features_update_params.py b/stripe/params/treasury/_financial_account_features_update_params.py new file mode 100644 index 000000000..994ffd966 --- /dev/null +++ b/stripe/params/treasury/_financial_account_features_update_params.py @@ -0,0 +1,168 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import Literal, NotRequired, TypedDict + + +class FinancialAccountFeaturesUpdateParams(TypedDict): + card_issuing: NotRequired[ + "FinancialAccountFeaturesUpdateParamsCardIssuing" + ] + """ + Encodes the FinancialAccount's ability to be used with the Issuing product, including attaching cards to and drawing funds from the FinancialAccount. + """ + deposit_insurance: NotRequired[ + "FinancialAccountFeaturesUpdateParamsDepositInsurance" + ] + """ + Represents whether this FinancialAccount is eligible for deposit insurance. Various factors determine the insurance amount. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + financial_addresses: NotRequired[ + "FinancialAccountFeaturesUpdateParamsFinancialAddresses" + ] + """ + Contains Features that add FinancialAddresses to the FinancialAccount. + """ + inbound_transfers: NotRequired[ + "FinancialAccountFeaturesUpdateParamsInboundTransfers" + ] + """ + Contains settings related to adding funds to a FinancialAccount from another Account with the same owner. + """ + intra_stripe_flows: NotRequired[ + "FinancialAccountFeaturesUpdateParamsIntraStripeFlows" + ] + """ + Represents the ability for the FinancialAccount to send money to, or receive money from other FinancialAccounts (for example, via OutboundPayment). + """ + outbound_payments: NotRequired[ + "FinancialAccountFeaturesUpdateParamsOutboundPayments" + ] + """ + Includes Features related to initiating money movement out of the FinancialAccount to someone else's bucket of money. + """ + outbound_transfers: NotRequired[ + "FinancialAccountFeaturesUpdateParamsOutboundTransfers" + ] + """ + Contains a Feature and settings related to moving money out of the FinancialAccount into another Account with the same owner. + """ + + +class FinancialAccountFeaturesUpdateParamsCardIssuing(TypedDict): + requested: bool + """ + Whether the FinancialAccount should have the Feature. + """ + + +class FinancialAccountFeaturesUpdateParamsDepositInsurance(TypedDict): + requested: bool + """ + Whether the FinancialAccount should have the Feature. + """ + + +class FinancialAccountFeaturesUpdateParamsFinancialAddresses(TypedDict): + aba: NotRequired[ + "FinancialAccountFeaturesUpdateParamsFinancialAddressesAba" + ] + """ + Adds an ABA FinancialAddress to the FinancialAccount. + """ + + +class FinancialAccountFeaturesUpdateParamsFinancialAddressesAba(TypedDict): + bank: NotRequired[Literal["evolve", "fifth_third", "goldman_sachs"]] + """ + Requested bank partner + """ + requested: bool + """ + Whether the FinancialAccount should have the Feature. + """ + + +class FinancialAccountFeaturesUpdateParamsInboundTransfers(TypedDict): + ach: NotRequired["FinancialAccountFeaturesUpdateParamsInboundTransfersAch"] + """ + Enables ACH Debits via the InboundTransfers API. + """ + + +class FinancialAccountFeaturesUpdateParamsInboundTransfersAch(TypedDict): + requested: bool + """ + Whether the FinancialAccount should have the Feature. + """ + + +class FinancialAccountFeaturesUpdateParamsIntraStripeFlows(TypedDict): + requested: bool + """ + Whether the FinancialAccount should have the Feature. + """ + + +class FinancialAccountFeaturesUpdateParamsOutboundPayments(TypedDict): + ach: NotRequired["FinancialAccountFeaturesUpdateParamsOutboundPaymentsAch"] + """ + Enables ACH transfers via the OutboundPayments API. + """ + us_domestic_wire: NotRequired[ + "FinancialAccountFeaturesUpdateParamsOutboundPaymentsUsDomesticWire" + ] + """ + Enables US domestic wire transfers via the OutboundPayments API. + """ + + +class FinancialAccountFeaturesUpdateParamsOutboundPaymentsAch(TypedDict): + requested: bool + """ + Whether the FinancialAccount should have the Feature. + """ + + +class FinancialAccountFeaturesUpdateParamsOutboundPaymentsUsDomesticWire( + TypedDict, +): + requested: bool + """ + Whether the FinancialAccount should have the Feature. + """ + + +class FinancialAccountFeaturesUpdateParamsOutboundTransfers(TypedDict): + ach: NotRequired[ + "FinancialAccountFeaturesUpdateParamsOutboundTransfersAch" + ] + """ + Enables ACH transfers via the OutboundTransfers API. + """ + us_domestic_wire: NotRequired[ + "FinancialAccountFeaturesUpdateParamsOutboundTransfersUsDomesticWire" + ] + """ + Enables US domestic wire transfers via the OutboundTransfers API. + """ + + +class FinancialAccountFeaturesUpdateParamsOutboundTransfersAch(TypedDict): + requested: bool + """ + Whether the FinancialAccount should have the Feature. + """ + + +class FinancialAccountFeaturesUpdateParamsOutboundTransfersUsDomesticWire( + TypedDict, +): + requested: bool + """ + Whether the FinancialAccount should have the Feature. + """ diff --git a/stripe/params/treasury/_financial_account_list_params.py b/stripe/params/treasury/_financial_account_list_params.py new file mode 100644 index 000000000..fdcc9de14 --- /dev/null +++ b/stripe/params/treasury/_financial_account_list_params.py @@ -0,0 +1,51 @@ +# -*- 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, TypedDict + + +class FinancialAccountListParams(RequestOptions): + created: NotRequired["FinancialAccountListParamsCreated|int"] + """ + Only return FinancialAccounts that were created during the given date interval. + """ + ending_before: NotRequired[str] + """ + An object ID cursor for use in pagination. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + limit: NotRequired[int] + """ + A limit ranging from 1 to 100 (defaults to 10). + """ + starting_after: NotRequired[str] + """ + An object ID cursor for use in pagination. + """ + status: NotRequired[Literal["closed", "open"]] + """ + Only return FinancialAccounts that have the given status: `open` or `closed` + """ + + +class FinancialAccountListParamsCreated(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/treasury/_financial_account_modify_params.py b/stripe/params/treasury/_financial_account_modify_params.py new file mode 100644 index 000000000..f82b6a4bb --- /dev/null +++ b/stripe/params/treasury/_financial_account_modify_params.py @@ -0,0 +1,226 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class FinancialAccountModifyParams(RequestOptions): + display_name: NotRequired["Literal['']|str"] + """ + The display name for the FinancialAccount. Use this field to customize the names of the FinancialAccounts for your connected accounts. Unlike the `nickname` field, `display_name` is not internal metadata and will be exposed to connected accounts. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + features: NotRequired["FinancialAccountModifyParamsFeatures"] + """ + Encodes whether a FinancialAccount has access to a particular feature, with a status enum and associated `status_details`. Stripe or the platform may control features via the requested field. + """ + forwarding_settings: NotRequired[ + "FinancialAccountModifyParamsForwardingSettings" + ] + """ + A different bank account where funds can be deposited/debited in order to get the closing FA's balance to $0 + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + nickname: NotRequired["Literal['']|str"] + """ + The nickname for the FinancialAccount. + """ + platform_restrictions: NotRequired[ + "FinancialAccountModifyParamsPlatformRestrictions" + ] + """ + The set of functionalities that the platform can restrict on the FinancialAccount. + """ + + +class FinancialAccountModifyParamsFeatures(TypedDict): + card_issuing: NotRequired[ + "FinancialAccountModifyParamsFeaturesCardIssuing" + ] + """ + Encodes the FinancialAccount's ability to be used with the Issuing product, including attaching cards to and drawing funds from the FinancialAccount. + """ + deposit_insurance: NotRequired[ + "FinancialAccountModifyParamsFeaturesDepositInsurance" + ] + """ + Represents whether this FinancialAccount is eligible for deposit insurance. Various factors determine the insurance amount. + """ + financial_addresses: NotRequired[ + "FinancialAccountModifyParamsFeaturesFinancialAddresses" + ] + """ + Contains Features that add FinancialAddresses to the FinancialAccount. + """ + inbound_transfers: NotRequired[ + "FinancialAccountModifyParamsFeaturesInboundTransfers" + ] + """ + Contains settings related to adding funds to a FinancialAccount from another Account with the same owner. + """ + intra_stripe_flows: NotRequired[ + "FinancialAccountModifyParamsFeaturesIntraStripeFlows" + ] + """ + Represents the ability for the FinancialAccount to send money to, or receive money from other FinancialAccounts (for example, via OutboundPayment). + """ + outbound_payments: NotRequired[ + "FinancialAccountModifyParamsFeaturesOutboundPayments" + ] + """ + Includes Features related to initiating money movement out of the FinancialAccount to someone else's bucket of money. + """ + outbound_transfers: NotRequired[ + "FinancialAccountModifyParamsFeaturesOutboundTransfers" + ] + """ + Contains a Feature and settings related to moving money out of the FinancialAccount into another Account with the same owner. + """ + + +class FinancialAccountModifyParamsFeaturesCardIssuing(TypedDict): + requested: bool + """ + Whether the FinancialAccount should have the Feature. + """ + + +class FinancialAccountModifyParamsFeaturesDepositInsurance(TypedDict): + requested: bool + """ + Whether the FinancialAccount should have the Feature. + """ + + +class FinancialAccountModifyParamsFeaturesFinancialAddresses(TypedDict): + aba: NotRequired[ + "FinancialAccountModifyParamsFeaturesFinancialAddressesAba" + ] + """ + Adds an ABA FinancialAddress to the FinancialAccount. + """ + + +class FinancialAccountModifyParamsFeaturesFinancialAddressesAba(TypedDict): + bank: NotRequired[Literal["evolve", "fifth_third", "goldman_sachs"]] + """ + Requested bank partner + """ + requested: bool + """ + Whether the FinancialAccount should have the Feature. + """ + + +class FinancialAccountModifyParamsFeaturesInboundTransfers(TypedDict): + ach: NotRequired["FinancialAccountModifyParamsFeaturesInboundTransfersAch"] + """ + Enables ACH Debits via the InboundTransfers API. + """ + + +class FinancialAccountModifyParamsFeaturesInboundTransfersAch(TypedDict): + requested: bool + """ + Whether the FinancialAccount should have the Feature. + """ + + +class FinancialAccountModifyParamsFeaturesIntraStripeFlows(TypedDict): + requested: bool + """ + Whether the FinancialAccount should have the Feature. + """ + + +class FinancialAccountModifyParamsFeaturesOutboundPayments(TypedDict): + ach: NotRequired["FinancialAccountModifyParamsFeaturesOutboundPaymentsAch"] + """ + Enables ACH transfers via the OutboundPayments API. + """ + us_domestic_wire: NotRequired[ + "FinancialAccountModifyParamsFeaturesOutboundPaymentsUsDomesticWire" + ] + """ + Enables US domestic wire transfers via the OutboundPayments API. + """ + + +class FinancialAccountModifyParamsFeaturesOutboundPaymentsAch(TypedDict): + requested: bool + """ + Whether the FinancialAccount should have the Feature. + """ + + +class FinancialAccountModifyParamsFeaturesOutboundPaymentsUsDomesticWire( + TypedDict, +): + requested: bool + """ + Whether the FinancialAccount should have the Feature. + """ + + +class FinancialAccountModifyParamsFeaturesOutboundTransfers(TypedDict): + ach: NotRequired[ + "FinancialAccountModifyParamsFeaturesOutboundTransfersAch" + ] + """ + Enables ACH transfers via the OutboundTransfers API. + """ + us_domestic_wire: NotRequired[ + "FinancialAccountModifyParamsFeaturesOutboundTransfersUsDomesticWire" + ] + """ + Enables US domestic wire transfers via the OutboundTransfers API. + """ + + +class FinancialAccountModifyParamsFeaturesOutboundTransfersAch(TypedDict): + requested: bool + """ + Whether the FinancialAccount should have the Feature. + """ + + +class FinancialAccountModifyParamsFeaturesOutboundTransfersUsDomesticWire( + TypedDict, +): + requested: bool + """ + Whether the FinancialAccount should have the Feature. + """ + + +class FinancialAccountModifyParamsForwardingSettings(TypedDict): + financial_account: NotRequired[str] + """ + The financial_account id + """ + payment_method: NotRequired[str] + """ + The payment_method or bank account id. This needs to be a verified bank account. + """ + type: Literal["financial_account", "payment_method"] + """ + The type of the bank account provided. This can be either "financial_account" or "payment_method" + """ + + +class FinancialAccountModifyParamsPlatformRestrictions(TypedDict): + inbound_flows: NotRequired[Literal["restricted", "unrestricted"]] + """ + Restricts all inbound money movement. + """ + outbound_flows: NotRequired[Literal["restricted", "unrestricted"]] + """ + Restricts all outbound money movement. + """ diff --git a/stripe/params/treasury/_financial_account_retrieve_features_params.py b/stripe/params/treasury/_financial_account_retrieve_features_params.py new file mode 100644 index 000000000..0d65da2a9 --- /dev/null +++ b/stripe/params/treasury/_financial_account_retrieve_features_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 FinancialAccountRetrieveFeaturesParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/treasury/_financial_account_retrieve_params.py b/stripe/params/treasury/_financial_account_retrieve_params.py new file mode 100644 index 000000000..0f57a048f --- /dev/null +++ b/stripe/params/treasury/_financial_account_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 FinancialAccountRetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/treasury/_financial_account_update_features_params.py b/stripe/params/treasury/_financial_account_update_features_params.py new file mode 100644 index 000000000..434a5a3c6 --- /dev/null +++ b/stripe/params/treasury/_financial_account_update_features_params.py @@ -0,0 +1,169 @@ +# -*- 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, TypedDict + + +class FinancialAccountUpdateFeaturesParams(RequestOptions): + card_issuing: NotRequired[ + "FinancialAccountUpdateFeaturesParamsCardIssuing" + ] + """ + Encodes the FinancialAccount's ability to be used with the Issuing product, including attaching cards to and drawing funds from the FinancialAccount. + """ + deposit_insurance: NotRequired[ + "FinancialAccountUpdateFeaturesParamsDepositInsurance" + ] + """ + Represents whether this FinancialAccount is eligible for deposit insurance. Various factors determine the insurance amount. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + financial_addresses: NotRequired[ + "FinancialAccountUpdateFeaturesParamsFinancialAddresses" + ] + """ + Contains Features that add FinancialAddresses to the FinancialAccount. + """ + inbound_transfers: NotRequired[ + "FinancialAccountUpdateFeaturesParamsInboundTransfers" + ] + """ + Contains settings related to adding funds to a FinancialAccount from another Account with the same owner. + """ + intra_stripe_flows: NotRequired[ + "FinancialAccountUpdateFeaturesParamsIntraStripeFlows" + ] + """ + Represents the ability for the FinancialAccount to send money to, or receive money from other FinancialAccounts (for example, via OutboundPayment). + """ + outbound_payments: NotRequired[ + "FinancialAccountUpdateFeaturesParamsOutboundPayments" + ] + """ + Includes Features related to initiating money movement out of the FinancialAccount to someone else's bucket of money. + """ + outbound_transfers: NotRequired[ + "FinancialAccountUpdateFeaturesParamsOutboundTransfers" + ] + """ + Contains a Feature and settings related to moving money out of the FinancialAccount into another Account with the same owner. + """ + + +class FinancialAccountUpdateFeaturesParamsCardIssuing(TypedDict): + requested: bool + """ + Whether the FinancialAccount should have the Feature. + """ + + +class FinancialAccountUpdateFeaturesParamsDepositInsurance(TypedDict): + requested: bool + """ + Whether the FinancialAccount should have the Feature. + """ + + +class FinancialAccountUpdateFeaturesParamsFinancialAddresses(TypedDict): + aba: NotRequired[ + "FinancialAccountUpdateFeaturesParamsFinancialAddressesAba" + ] + """ + Adds an ABA FinancialAddress to the FinancialAccount. + """ + + +class FinancialAccountUpdateFeaturesParamsFinancialAddressesAba(TypedDict): + bank: NotRequired[Literal["evolve", "fifth_third", "goldman_sachs"]] + """ + Requested bank partner + """ + requested: bool + """ + Whether the FinancialAccount should have the Feature. + """ + + +class FinancialAccountUpdateFeaturesParamsInboundTransfers(TypedDict): + ach: NotRequired["FinancialAccountUpdateFeaturesParamsInboundTransfersAch"] + """ + Enables ACH Debits via the InboundTransfers API. + """ + + +class FinancialAccountUpdateFeaturesParamsInboundTransfersAch(TypedDict): + requested: bool + """ + Whether the FinancialAccount should have the Feature. + """ + + +class FinancialAccountUpdateFeaturesParamsIntraStripeFlows(TypedDict): + requested: bool + """ + Whether the FinancialAccount should have the Feature. + """ + + +class FinancialAccountUpdateFeaturesParamsOutboundPayments(TypedDict): + ach: NotRequired["FinancialAccountUpdateFeaturesParamsOutboundPaymentsAch"] + """ + Enables ACH transfers via the OutboundPayments API. + """ + us_domestic_wire: NotRequired[ + "FinancialAccountUpdateFeaturesParamsOutboundPaymentsUsDomesticWire" + ] + """ + Enables US domestic wire transfers via the OutboundPayments API. + """ + + +class FinancialAccountUpdateFeaturesParamsOutboundPaymentsAch(TypedDict): + requested: bool + """ + Whether the FinancialAccount should have the Feature. + """ + + +class FinancialAccountUpdateFeaturesParamsOutboundPaymentsUsDomesticWire( + TypedDict, +): + requested: bool + """ + Whether the FinancialAccount should have the Feature. + """ + + +class FinancialAccountUpdateFeaturesParamsOutboundTransfers(TypedDict): + ach: NotRequired[ + "FinancialAccountUpdateFeaturesParamsOutboundTransfersAch" + ] + """ + Enables ACH transfers via the OutboundTransfers API. + """ + us_domestic_wire: NotRequired[ + "FinancialAccountUpdateFeaturesParamsOutboundTransfersUsDomesticWire" + ] + """ + Enables US domestic wire transfers via the OutboundTransfers API. + """ + + +class FinancialAccountUpdateFeaturesParamsOutboundTransfersAch(TypedDict): + requested: bool + """ + Whether the FinancialAccount should have the Feature. + """ + + +class FinancialAccountUpdateFeaturesParamsOutboundTransfersUsDomesticWire( + TypedDict, +): + requested: bool + """ + Whether the FinancialAccount should have the Feature. + """ diff --git a/stripe/params/treasury/_financial_account_update_params.py b/stripe/params/treasury/_financial_account_update_params.py new file mode 100644 index 000000000..fd163a01c --- /dev/null +++ b/stripe/params/treasury/_financial_account_update_params.py @@ -0,0 +1,225 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class FinancialAccountUpdateParams(TypedDict): + display_name: NotRequired["Literal['']|str"] + """ + The display name for the FinancialAccount. Use this field to customize the names of the FinancialAccounts for your connected accounts. Unlike the `nickname` field, `display_name` is not internal metadata and will be exposed to connected accounts. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + features: NotRequired["FinancialAccountUpdateParamsFeatures"] + """ + Encodes whether a FinancialAccount has access to a particular feature, with a status enum and associated `status_details`. Stripe or the platform may control features via the requested field. + """ + forwarding_settings: NotRequired[ + "FinancialAccountUpdateParamsForwardingSettings" + ] + """ + A different bank account where funds can be deposited/debited in order to get the closing FA's balance to $0 + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + nickname: NotRequired["Literal['']|str"] + """ + The nickname for the FinancialAccount. + """ + platform_restrictions: NotRequired[ + "FinancialAccountUpdateParamsPlatformRestrictions" + ] + """ + The set of functionalities that the platform can restrict on the FinancialAccount. + """ + + +class FinancialAccountUpdateParamsFeatures(TypedDict): + card_issuing: NotRequired[ + "FinancialAccountUpdateParamsFeaturesCardIssuing" + ] + """ + Encodes the FinancialAccount's ability to be used with the Issuing product, including attaching cards to and drawing funds from the FinancialAccount. + """ + deposit_insurance: NotRequired[ + "FinancialAccountUpdateParamsFeaturesDepositInsurance" + ] + """ + Represents whether this FinancialAccount is eligible for deposit insurance. Various factors determine the insurance amount. + """ + financial_addresses: NotRequired[ + "FinancialAccountUpdateParamsFeaturesFinancialAddresses" + ] + """ + Contains Features that add FinancialAddresses to the FinancialAccount. + """ + inbound_transfers: NotRequired[ + "FinancialAccountUpdateParamsFeaturesInboundTransfers" + ] + """ + Contains settings related to adding funds to a FinancialAccount from another Account with the same owner. + """ + intra_stripe_flows: NotRequired[ + "FinancialAccountUpdateParamsFeaturesIntraStripeFlows" + ] + """ + Represents the ability for the FinancialAccount to send money to, or receive money from other FinancialAccounts (for example, via OutboundPayment). + """ + outbound_payments: NotRequired[ + "FinancialAccountUpdateParamsFeaturesOutboundPayments" + ] + """ + Includes Features related to initiating money movement out of the FinancialAccount to someone else's bucket of money. + """ + outbound_transfers: NotRequired[ + "FinancialAccountUpdateParamsFeaturesOutboundTransfers" + ] + """ + Contains a Feature and settings related to moving money out of the FinancialAccount into another Account with the same owner. + """ + + +class FinancialAccountUpdateParamsFeaturesCardIssuing(TypedDict): + requested: bool + """ + Whether the FinancialAccount should have the Feature. + """ + + +class FinancialAccountUpdateParamsFeaturesDepositInsurance(TypedDict): + requested: bool + """ + Whether the FinancialAccount should have the Feature. + """ + + +class FinancialAccountUpdateParamsFeaturesFinancialAddresses(TypedDict): + aba: NotRequired[ + "FinancialAccountUpdateParamsFeaturesFinancialAddressesAba" + ] + """ + Adds an ABA FinancialAddress to the FinancialAccount. + """ + + +class FinancialAccountUpdateParamsFeaturesFinancialAddressesAba(TypedDict): + bank: NotRequired[Literal["evolve", "fifth_third", "goldman_sachs"]] + """ + Requested bank partner + """ + requested: bool + """ + Whether the FinancialAccount should have the Feature. + """ + + +class FinancialAccountUpdateParamsFeaturesInboundTransfers(TypedDict): + ach: NotRequired["FinancialAccountUpdateParamsFeaturesInboundTransfersAch"] + """ + Enables ACH Debits via the InboundTransfers API. + """ + + +class FinancialAccountUpdateParamsFeaturesInboundTransfersAch(TypedDict): + requested: bool + """ + Whether the FinancialAccount should have the Feature. + """ + + +class FinancialAccountUpdateParamsFeaturesIntraStripeFlows(TypedDict): + requested: bool + """ + Whether the FinancialAccount should have the Feature. + """ + + +class FinancialAccountUpdateParamsFeaturesOutboundPayments(TypedDict): + ach: NotRequired["FinancialAccountUpdateParamsFeaturesOutboundPaymentsAch"] + """ + Enables ACH transfers via the OutboundPayments API. + """ + us_domestic_wire: NotRequired[ + "FinancialAccountUpdateParamsFeaturesOutboundPaymentsUsDomesticWire" + ] + """ + Enables US domestic wire transfers via the OutboundPayments API. + """ + + +class FinancialAccountUpdateParamsFeaturesOutboundPaymentsAch(TypedDict): + requested: bool + """ + Whether the FinancialAccount should have the Feature. + """ + + +class FinancialAccountUpdateParamsFeaturesOutboundPaymentsUsDomesticWire( + TypedDict, +): + requested: bool + """ + Whether the FinancialAccount should have the Feature. + """ + + +class FinancialAccountUpdateParamsFeaturesOutboundTransfers(TypedDict): + ach: NotRequired[ + "FinancialAccountUpdateParamsFeaturesOutboundTransfersAch" + ] + """ + Enables ACH transfers via the OutboundTransfers API. + """ + us_domestic_wire: NotRequired[ + "FinancialAccountUpdateParamsFeaturesOutboundTransfersUsDomesticWire" + ] + """ + Enables US domestic wire transfers via the OutboundTransfers API. + """ + + +class FinancialAccountUpdateParamsFeaturesOutboundTransfersAch(TypedDict): + requested: bool + """ + Whether the FinancialAccount should have the Feature. + """ + + +class FinancialAccountUpdateParamsFeaturesOutboundTransfersUsDomesticWire( + TypedDict, +): + requested: bool + """ + Whether the FinancialAccount should have the Feature. + """ + + +class FinancialAccountUpdateParamsForwardingSettings(TypedDict): + financial_account: NotRequired[str] + """ + The financial_account id + """ + payment_method: NotRequired[str] + """ + The payment_method or bank account id. This needs to be a verified bank account. + """ + type: Literal["financial_account", "payment_method"] + """ + The type of the bank account provided. This can be either "financial_account" or "payment_method" + """ + + +class FinancialAccountUpdateParamsPlatformRestrictions(TypedDict): + inbound_flows: NotRequired[Literal["restricted", "unrestricted"]] + """ + Restricts all inbound money movement. + """ + outbound_flows: NotRequired[Literal["restricted", "unrestricted"]] + """ + Restricts all outbound money movement. + """ diff --git a/stripe/params/treasury/_inbound_transfer_cancel_params.py b/stripe/params/treasury/_inbound_transfer_cancel_params.py new file mode 100644 index 000000000..39ba9fcac --- /dev/null +++ b/stripe/params/treasury/_inbound_transfer_cancel_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 InboundTransferCancelParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/treasury/_inbound_transfer_create_params.py b/stripe/params/treasury/_inbound_transfer_create_params.py new file mode 100644 index 000000000..efc92248e --- /dev/null +++ b/stripe/params/treasury/_inbound_transfer_create_params.py @@ -0,0 +1,40 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import NotRequired + + +class InboundTransferCreateParams(RequestOptions): + amount: int + """ + Amount (in cents) to be transferred. + """ + 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). + """ + description: NotRequired[str] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + financial_account: str + """ + The FinancialAccount to send funds to. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + origin_payment_method: str + """ + The origin payment method to be debited for the InboundTransfer. + """ + statement_descriptor: NotRequired[str] + """ + The complete description that appears on your customers' statements. Maximum 10 characters. + """ diff --git a/stripe/params/treasury/_inbound_transfer_fail_params.py b/stripe/params/treasury/_inbound_transfer_fail_params.py new file mode 100644 index 000000000..8f220ed16 --- /dev/null +++ b/stripe/params/treasury/_inbound_transfer_fail_params.py @@ -0,0 +1,39 @@ +# -*- 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, TypedDict + + +class InboundTransferFailParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + failure_details: NotRequired["InboundTransferFailParamsFailureDetails"] + """ + Details about a failed InboundTransfer. + """ + + +class InboundTransferFailParamsFailureDetails(TypedDict): + code: NotRequired[ + Literal[ + "account_closed", + "account_frozen", + "bank_account_restricted", + "bank_ownership_changed", + "debit_not_authorized", + "incorrect_account_holder_address", + "incorrect_account_holder_name", + "incorrect_account_holder_tax_id", + "insufficient_funds", + "invalid_account_number", + "invalid_currency", + "no_account", + "other", + ] + ] + """ + Reason for the failure. + """ diff --git a/stripe/params/treasury/_inbound_transfer_list_params.py b/stripe/params/treasury/_inbound_transfer_list_params.py new file mode 100644 index 000000000..709a65820 --- /dev/null +++ b/stripe/params/treasury/_inbound_transfer_list_params.py @@ -0,0 +1,34 @@ +# -*- 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 InboundTransferListParams(RequestOptions): + 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. + """ + financial_account: str + """ + Returns objects associated with this FinancialAccount. + """ + 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. + """ + status: NotRequired[ + Literal["canceled", "failed", "processing", "succeeded"] + ] + """ + Only return InboundTransfers that have the given status: `processing`, `succeeded`, `failed` or `canceled`. + """ diff --git a/stripe/params/treasury/_inbound_transfer_retrieve_params.py b/stripe/params/treasury/_inbound_transfer_retrieve_params.py new file mode 100644 index 000000000..e588e70cc --- /dev/null +++ b/stripe/params/treasury/_inbound_transfer_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 InboundTransferRetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/treasury/_inbound_transfer_return_inbound_transfer_params.py b/stripe/params/treasury/_inbound_transfer_return_inbound_transfer_params.py new file mode 100644 index 000000000..ada9cdfae --- /dev/null +++ b/stripe/params/treasury/_inbound_transfer_return_inbound_transfer_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 InboundTransferReturnInboundTransferParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/treasury/_inbound_transfer_succeed_params.py b/stripe/params/treasury/_inbound_transfer_succeed_params.py new file mode 100644 index 000000000..e88a1730c --- /dev/null +++ b/stripe/params/treasury/_inbound_transfer_succeed_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 InboundTransferSucceedParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/treasury/_outbound_payment_cancel_params.py b/stripe/params/treasury/_outbound_payment_cancel_params.py new file mode 100644 index 000000000..e94e9d25e --- /dev/null +++ b/stripe/params/treasury/_outbound_payment_cancel_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 OutboundPaymentCancelParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/treasury/_outbound_payment_create_params.py b/stripe/params/treasury/_outbound_payment_create_params.py new file mode 100644 index 000000000..89cdf5685 --- /dev/null +++ b/stripe/params/treasury/_outbound_payment_create_params.py @@ -0,0 +1,193 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class OutboundPaymentCreateParams(RequestOptions): + amount: int + """ + Amount (in cents) to be transferred. + """ + 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). + """ + customer: NotRequired[str] + """ + ID of the customer to whom the OutboundPayment is sent. Must match the Customer attached to the `destination_payment_method` passed in. + """ + description: NotRequired[str] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ + destination_payment_method: NotRequired[str] + """ + The PaymentMethod to use as the payment instrument for the OutboundPayment. Exclusive with `destination_payment_method_data`. + """ + destination_payment_method_data: NotRequired[ + "OutboundPaymentCreateParamsDestinationPaymentMethodData" + ] + """ + Hash used to generate the PaymentMethod to be used for this OutboundPayment. Exclusive with `destination_payment_method`. + """ + destination_payment_method_options: NotRequired[ + "OutboundPaymentCreateParamsDestinationPaymentMethodOptions" + ] + """ + Payment method-specific configuration for this OutboundPayment. + """ + end_user_details: NotRequired["OutboundPaymentCreateParamsEndUserDetails"] + """ + End user details. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + financial_account: str + """ + The FinancialAccount to pull funds from. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + statement_descriptor: NotRequired[str] + """ + The description that appears on the receiving end for this OutboundPayment (for example, bank statement for external bank transfer). Maximum 10 characters for `ach` payments, 140 characters for `us_domestic_wire` payments, or 500 characters for `stripe` network transfers. The default value is "payment". + """ + + +class OutboundPaymentCreateParamsDestinationPaymentMethodData(TypedDict): + billing_details: NotRequired[ + "OutboundPaymentCreateParamsDestinationPaymentMethodDataBillingDetails" + ] + """ + Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. + """ + financial_account: NotRequired[str] + """ + Required if type is set to `financial_account`. The FinancialAccount ID to send funds to. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + type: Literal["financial_account", "us_bank_account"] + """ + The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. + """ + us_bank_account: NotRequired[ + "OutboundPaymentCreateParamsDestinationPaymentMethodDataUsBankAccount" + ] + """ + Required hash if type is set to `us_bank_account`. + """ + + +class OutboundPaymentCreateParamsDestinationPaymentMethodDataBillingDetails( + TypedDict, +): + address: NotRequired[ + "Literal['']|OutboundPaymentCreateParamsDestinationPaymentMethodDataBillingDetailsAddress" + ] + """ + Billing address. + """ + email: NotRequired["Literal['']|str"] + """ + Email address. + """ + name: NotRequired["Literal['']|str"] + """ + Full name. + """ + phone: NotRequired["Literal['']|str"] + """ + Billing phone number (including extension). + """ + + +class OutboundPaymentCreateParamsDestinationPaymentMethodDataBillingDetailsAddress( + 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. + """ + + +class OutboundPaymentCreateParamsDestinationPaymentMethodDataUsBankAccount( + TypedDict, +): + account_holder_type: NotRequired[Literal["company", "individual"]] + """ + Account holder type: individual or company. + """ + account_number: NotRequired[str] + """ + Account number of the bank account. + """ + account_type: NotRequired[Literal["checking", "savings"]] + """ + Account type: checkings or savings. Defaults to checking if omitted. + """ + financial_connections_account: NotRequired[str] + """ + The ID of a Financial Connections Account to use as a payment method. + """ + routing_number: NotRequired[str] + """ + Routing number of the bank account. + """ + + +class OutboundPaymentCreateParamsDestinationPaymentMethodOptions(TypedDict): + us_bank_account: NotRequired[ + "Literal['']|OutboundPaymentCreateParamsDestinationPaymentMethodOptionsUsBankAccount" + ] + """ + Optional fields for `us_bank_account`. + """ + + +class OutboundPaymentCreateParamsDestinationPaymentMethodOptionsUsBankAccount( + TypedDict, +): + network: NotRequired[Literal["ach", "us_domestic_wire"]] + """ + Specifies the network rails to be used. If not set, will default to the PaymentMethod's preferred network. See the [docs](https://stripe.com/docs/treasury/money-movement/timelines) to learn more about money movement timelines for each network type. + """ + + +class OutboundPaymentCreateParamsEndUserDetails(TypedDict): + ip_address: NotRequired[str] + """ + IP address of the user initiating the OutboundPayment. Must be supplied if `present` is set to `true`. + """ + present: bool + """ + `True` if the OutboundPayment creation request is being made on behalf of an end user by a platform. Otherwise, `false`. + """ diff --git a/stripe/params/treasury/_outbound_payment_fail_params.py b/stripe/params/treasury/_outbound_payment_fail_params.py new file mode 100644 index 000000000..ec3d79c76 --- /dev/null +++ b/stripe/params/treasury/_outbound_payment_fail_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 OutboundPaymentFailParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/treasury/_outbound_payment_list_params.py b/stripe/params/treasury/_outbound_payment_list_params.py new file mode 100644 index 000000000..6c663d073 --- /dev/null +++ b/stripe/params/treasury/_outbound_payment_list_params.py @@ -0,0 +1,61 @@ +# -*- 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, TypedDict + + +class OutboundPaymentListParams(RequestOptions): + created: NotRequired["OutboundPaymentListParamsCreated|int"] + """ + Only return OutboundPayments that were created during the given date interval. + """ + customer: NotRequired[str] + """ + Only return OutboundPayments sent to this customer. + """ + 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. + """ + financial_account: str + """ + Returns objects associated with this FinancialAccount. + """ + 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. + """ + status: NotRequired[ + Literal["canceled", "failed", "posted", "processing", "returned"] + ] + """ + Only return OutboundPayments that have the given status: `processing`, `failed`, `posted`, `returned`, or `canceled`. + """ + + +class OutboundPaymentListParamsCreated(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/treasury/_outbound_payment_post_params.py b/stripe/params/treasury/_outbound_payment_post_params.py new file mode 100644 index 000000000..308e0cf8f --- /dev/null +++ b/stripe/params/treasury/_outbound_payment_post_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 OutboundPaymentPostParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/treasury/_outbound_payment_retrieve_params.py b/stripe/params/treasury/_outbound_payment_retrieve_params.py new file mode 100644 index 000000000..8fc79e2dd --- /dev/null +++ b/stripe/params/treasury/_outbound_payment_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 OutboundPaymentRetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/treasury/_outbound_payment_return_outbound_payment_params.py b/stripe/params/treasury/_outbound_payment_return_outbound_payment_params.py new file mode 100644 index 000000000..b5bd84265 --- /dev/null +++ b/stripe/params/treasury/_outbound_payment_return_outbound_payment_params.py @@ -0,0 +1,38 @@ +# -*- 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, TypedDict + + +class OutboundPaymentReturnOutboundPaymentParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + returned_details: NotRequired[ + "OutboundPaymentReturnOutboundPaymentParamsReturnedDetails" + ] + """ + Optional hash to set the return code. + """ + + +class OutboundPaymentReturnOutboundPaymentParamsReturnedDetails(TypedDict): + code: NotRequired[ + Literal[ + "account_closed", + "account_frozen", + "bank_account_restricted", + "bank_ownership_changed", + "declined", + "incorrect_account_holder_name", + "invalid_account_number", + "invalid_currency", + "no_account", + "other", + ] + ] + """ + The return code to be set on the OutboundPayment object. + """ diff --git a/stripe/params/treasury/_outbound_payment_update_params.py b/stripe/params/treasury/_outbound_payment_update_params.py new file mode 100644 index 000000000..301b4e96d --- /dev/null +++ b/stripe/params/treasury/_outbound_payment_update_params.py @@ -0,0 +1,55 @@ +# -*- 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, TypedDict + + +class OutboundPaymentUpdateParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + tracking_details: "OutboundPaymentUpdateParamsTrackingDetails" + """ + Details about network-specific tracking information. + """ + + +class OutboundPaymentUpdateParamsTrackingDetails(TypedDict): + ach: NotRequired["OutboundPaymentUpdateParamsTrackingDetailsAch"] + """ + ACH network tracking details. + """ + type: Literal["ach", "us_domestic_wire"] + """ + The US bank account network used to send funds. + """ + us_domestic_wire: NotRequired[ + "OutboundPaymentUpdateParamsTrackingDetailsUsDomesticWire" + ] + """ + US domestic wire network tracking details. + """ + + +class OutboundPaymentUpdateParamsTrackingDetailsAch(TypedDict): + trace_id: str + """ + ACH trace ID for funds sent over the `ach` network. + """ + + +class OutboundPaymentUpdateParamsTrackingDetailsUsDomesticWire(TypedDict): + chips: NotRequired[str] + """ + CHIPS System Sequence Number (SSN) for funds sent over the `us_domestic_wire` network. + """ + imad: NotRequired[str] + """ + IMAD for funds sent over the `us_domestic_wire` network. + """ + omad: NotRequired[str] + """ + OMAD for funds sent over the `us_domestic_wire` network. + """ diff --git a/stripe/params/treasury/_outbound_transfer_cancel_params.py b/stripe/params/treasury/_outbound_transfer_cancel_params.py new file mode 100644 index 000000000..d9e88a78f --- /dev/null +++ b/stripe/params/treasury/_outbound_transfer_cancel_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 OutboundTransferCancelParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/treasury/_outbound_transfer_create_params.py b/stripe/params/treasury/_outbound_transfer_create_params.py new file mode 100644 index 000000000..b616b4e95 --- /dev/null +++ b/stripe/params/treasury/_outbound_transfer_create_params.py @@ -0,0 +1,103 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe._request_options import RequestOptions +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class OutboundTransferCreateParams(RequestOptions): + amount: int + """ + Amount (in cents) to be transferred. + """ + 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). + """ + description: NotRequired[str] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ + destination_payment_method: NotRequired[str] + """ + The PaymentMethod to use as the payment instrument for the OutboundTransfer. + """ + destination_payment_method_data: NotRequired[ + "OutboundTransferCreateParamsDestinationPaymentMethodData" + ] + """ + Hash used to generate the PaymentMethod to be used for this OutboundTransfer. Exclusive with `destination_payment_method`. + """ + destination_payment_method_options: NotRequired[ + "OutboundTransferCreateParamsDestinationPaymentMethodOptions" + ] + """ + Hash describing payment method configuration details. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + financial_account: str + """ + The FinancialAccount to pull funds from. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + """ + network_details: NotRequired["OutboundTransferCreateParamsNetworkDetails"] + """ + Details about the network used for the OutboundTransfer. + """ + statement_descriptor: NotRequired[str] + """ + Statement descriptor to be shown on the receiving end of an OutboundTransfer. Maximum 10 characters for `ach` transfers or 140 characters for `us_domestic_wire` transfers. The default value is "transfer". + """ + + +class OutboundTransferCreateParamsDestinationPaymentMethodData(TypedDict): + financial_account: NotRequired[str] + """ + Required if type is set to `financial_account`. The FinancialAccount ID to send funds to. + """ + type: Literal["financial_account"] + """ + The type of the destination. + """ + + +class OutboundTransferCreateParamsDestinationPaymentMethodOptions(TypedDict): + us_bank_account: NotRequired[ + "Literal['']|OutboundTransferCreateParamsDestinationPaymentMethodOptionsUsBankAccount" + ] + """ + Optional fields for `us_bank_account`. + """ + + +class OutboundTransferCreateParamsDestinationPaymentMethodOptionsUsBankAccount( + TypedDict, +): + network: NotRequired[Literal["ach", "us_domestic_wire"]] + """ + Specifies the network rails to be used. If not set, will default to the PaymentMethod's preferred network. See the [docs](https://stripe.com/docs/treasury/money-movement/timelines) to learn more about money movement timelines for each network type. + """ + + +class OutboundTransferCreateParamsNetworkDetails(TypedDict): + ach: NotRequired["OutboundTransferCreateParamsNetworkDetailsAch"] + """ + Optional fields for `ach`. + """ + type: Literal["ach"] + """ + The type of flow that originated the OutboundTransfer. + """ + + +class OutboundTransferCreateParamsNetworkDetailsAch(TypedDict): + addenda: NotRequired[str] + """ + Addenda record data associated with this OutboundTransfer. + """ diff --git a/stripe/params/treasury/_outbound_transfer_fail_params.py b/stripe/params/treasury/_outbound_transfer_fail_params.py new file mode 100644 index 000000000..2da8070b0 --- /dev/null +++ b/stripe/params/treasury/_outbound_transfer_fail_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 OutboundTransferFailParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/treasury/_outbound_transfer_list_params.py b/stripe/params/treasury/_outbound_transfer_list_params.py new file mode 100644 index 000000000..6f9e24782 --- /dev/null +++ b/stripe/params/treasury/_outbound_transfer_list_params.py @@ -0,0 +1,34 @@ +# -*- 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 OutboundTransferListParams(RequestOptions): + 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. + """ + financial_account: str + """ + Returns objects associated with this FinancialAccount. + """ + 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. + """ + status: NotRequired[ + Literal["canceled", "failed", "posted", "processing", "returned"] + ] + """ + Only return OutboundTransfers that have the given status: `processing`, `canceled`, `failed`, `posted`, or `returned`. + """ diff --git a/stripe/params/treasury/_outbound_transfer_post_params.py b/stripe/params/treasury/_outbound_transfer_post_params.py new file mode 100644 index 000000000..f6372b085 --- /dev/null +++ b/stripe/params/treasury/_outbound_transfer_post_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 OutboundTransferPostParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/treasury/_outbound_transfer_retrieve_params.py b/stripe/params/treasury/_outbound_transfer_retrieve_params.py new file mode 100644 index 000000000..cec275132 --- /dev/null +++ b/stripe/params/treasury/_outbound_transfer_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 OutboundTransferRetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/treasury/_outbound_transfer_return_outbound_transfer_params.py b/stripe/params/treasury/_outbound_transfer_return_outbound_transfer_params.py new file mode 100644 index 000000000..dd73d7e87 --- /dev/null +++ b/stripe/params/treasury/_outbound_transfer_return_outbound_transfer_params.py @@ -0,0 +1,38 @@ +# -*- 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, TypedDict + + +class OutboundTransferReturnOutboundTransferParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + returned_details: NotRequired[ + "OutboundTransferReturnOutboundTransferParamsReturnedDetails" + ] + """ + Details about a returned OutboundTransfer. + """ + + +class OutboundTransferReturnOutboundTransferParamsReturnedDetails(TypedDict): + code: NotRequired[ + Literal[ + "account_closed", + "account_frozen", + "bank_account_restricted", + "bank_ownership_changed", + "declined", + "incorrect_account_holder_name", + "invalid_account_number", + "invalid_currency", + "no_account", + "other", + ] + ] + """ + Reason for the return. + """ diff --git a/stripe/params/treasury/_outbound_transfer_update_params.py b/stripe/params/treasury/_outbound_transfer_update_params.py new file mode 100644 index 000000000..dcee93420 --- /dev/null +++ b/stripe/params/treasury/_outbound_transfer_update_params.py @@ -0,0 +1,55 @@ +# -*- 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, TypedDict + + +class OutboundTransferUpdateParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + tracking_details: "OutboundTransferUpdateParamsTrackingDetails" + """ + Details about network-specific tracking information. + """ + + +class OutboundTransferUpdateParamsTrackingDetails(TypedDict): + ach: NotRequired["OutboundTransferUpdateParamsTrackingDetailsAch"] + """ + ACH network tracking details. + """ + type: Literal["ach", "us_domestic_wire"] + """ + The US bank account network used to send funds. + """ + us_domestic_wire: NotRequired[ + "OutboundTransferUpdateParamsTrackingDetailsUsDomesticWire" + ] + """ + US domestic wire network tracking details. + """ + + +class OutboundTransferUpdateParamsTrackingDetailsAch(TypedDict): + trace_id: str + """ + ACH trace ID for funds sent over the `ach` network. + """ + + +class OutboundTransferUpdateParamsTrackingDetailsUsDomesticWire(TypedDict): + chips: NotRequired[str] + """ + CHIPS System Sequence Number (SSN) for funds sent over the `us_domestic_wire` network. + """ + imad: NotRequired[str] + """ + IMAD for funds sent over the `us_domestic_wire` network. + """ + omad: NotRequired[str] + """ + OMAD for funds sent over the `us_domestic_wire` network. + """ diff --git a/stripe/params/treasury/_received_credit_create_params.py b/stripe/params/treasury/_received_credit_create_params.py new file mode 100644 index 000000000..e20083783 --- /dev/null +++ b/stripe/params/treasury/_received_credit_create_params.py @@ -0,0 +1,90 @@ +# -*- 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, TypedDict + + +class ReceivedCreditCreateParams(RequestOptions): + amount: int + """ + Amount (in cents) to be transferred. + """ + 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). + """ + description: NotRequired[str] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + financial_account: str + """ + The FinancialAccount to send funds to. + """ + initiating_payment_method_details: NotRequired[ + "ReceivedCreditCreateParamsInitiatingPaymentMethodDetails" + ] + """ + Initiating payment method details for the object. + """ + network: Literal["ach", "us_domestic_wire"] + """ + Specifies the network rails to be used. If not set, will default to the PaymentMethod's preferred network. See the [docs](https://stripe.com/docs/treasury/money-movement/timelines) to learn more about money movement timelines for each network type. + """ + network_details: NotRequired["ReceivedCreditCreateParamsNetworkDetails"] + """ + Details about the network used for the ReceivedCredit. + """ + + +class ReceivedCreditCreateParamsInitiatingPaymentMethodDetails(TypedDict): + type: Literal["us_bank_account"] + """ + The source type. + """ + us_bank_account: NotRequired[ + "ReceivedCreditCreateParamsInitiatingPaymentMethodDetailsUsBankAccount" + ] + """ + Optional fields for `us_bank_account`. + """ + + +class ReceivedCreditCreateParamsInitiatingPaymentMethodDetailsUsBankAccount( + TypedDict, +): + account_holder_name: NotRequired[str] + """ + The bank account holder's name. + """ + account_number: NotRequired[str] + """ + The bank account number. + """ + routing_number: NotRequired[str] + """ + The bank account's routing number. + """ + + +class ReceivedCreditCreateParamsNetworkDetails(TypedDict): + ach: NotRequired["ReceivedCreditCreateParamsNetworkDetailsAch"] + """ + Optional fields for `ach`. + """ + type: Literal["ach"] + """ + The type of flow that originated the ReceivedCredit. + """ + + +class ReceivedCreditCreateParamsNetworkDetailsAch(TypedDict): + addenda: NotRequired[str] + """ + ACH Addenda record + """ diff --git a/stripe/params/treasury/_received_credit_list_params.py b/stripe/params/treasury/_received_credit_list_params.py new file mode 100644 index 000000000..7f0965463 --- /dev/null +++ b/stripe/params/treasury/_received_credit_list_params.py @@ -0,0 +1,49 @@ +# -*- 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, TypedDict + + +class ReceivedCreditListParams(RequestOptions): + 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. + """ + financial_account: str + """ + The FinancialAccount that received the funds. + """ + 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. + """ + linked_flows: NotRequired["ReceivedCreditListParamsLinkedFlows"] + """ + Only return ReceivedCredits described by the flow. + """ + 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. + """ + status: NotRequired[Literal["failed", "succeeded"]] + """ + Only return ReceivedCredits that have the given status: `succeeded` or `failed`. + """ + + +class ReceivedCreditListParamsLinkedFlows(TypedDict): + source_flow_type: Literal[ + "credit_reversal", + "other", + "outbound_payment", + "outbound_transfer", + "payout", + ] + """ + The source flow type. + """ diff --git a/stripe/params/treasury/_received_credit_retrieve_params.py b/stripe/params/treasury/_received_credit_retrieve_params.py new file mode 100644 index 000000000..552cc933d --- /dev/null +++ b/stripe/params/treasury/_received_credit_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 ReceivedCreditRetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/treasury/_received_debit_create_params.py b/stripe/params/treasury/_received_debit_create_params.py new file mode 100644 index 000000000..24d6d3698 --- /dev/null +++ b/stripe/params/treasury/_received_debit_create_params.py @@ -0,0 +1,90 @@ +# -*- 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, TypedDict + + +class ReceivedDebitCreateParams(RequestOptions): + amount: int + """ + Amount (in cents) to be transferred. + """ + 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). + """ + description: NotRequired[str] + """ + An arbitrary string attached to the object. Often useful for displaying to users. + """ + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ + financial_account: str + """ + The FinancialAccount to pull funds from. + """ + initiating_payment_method_details: NotRequired[ + "ReceivedDebitCreateParamsInitiatingPaymentMethodDetails" + ] + """ + Initiating payment method details for the object. + """ + network: Literal["ach"] + """ + Specifies the network rails to be used. If not set, will default to the PaymentMethod's preferred network. See the [docs](https://stripe.com/docs/treasury/money-movement/timelines) to learn more about money movement timelines for each network type. + """ + network_details: NotRequired["ReceivedDebitCreateParamsNetworkDetails"] + """ + Details about the network used for the ReceivedDebit. + """ + + +class ReceivedDebitCreateParamsInitiatingPaymentMethodDetails(TypedDict): + type: Literal["us_bank_account"] + """ + The source type. + """ + us_bank_account: NotRequired[ + "ReceivedDebitCreateParamsInitiatingPaymentMethodDetailsUsBankAccount" + ] + """ + Optional fields for `us_bank_account`. + """ + + +class ReceivedDebitCreateParamsInitiatingPaymentMethodDetailsUsBankAccount( + TypedDict, +): + account_holder_name: NotRequired[str] + """ + The bank account holder's name. + """ + account_number: NotRequired[str] + """ + The bank account number. + """ + routing_number: NotRequired[str] + """ + The bank account's routing number. + """ + + +class ReceivedDebitCreateParamsNetworkDetails(TypedDict): + ach: NotRequired["ReceivedDebitCreateParamsNetworkDetailsAch"] + """ + Optional fields for `ach`. + """ + type: Literal["ach"] + """ + The type of flow that originated the ReceivedDebit. + """ + + +class ReceivedDebitCreateParamsNetworkDetailsAch(TypedDict): + addenda: NotRequired[str] + """ + Addenda record data associated with this ReceivedDebit. + """ diff --git a/stripe/params/treasury/_received_debit_list_params.py b/stripe/params/treasury/_received_debit_list_params.py new file mode 100644 index 000000000..cd32d32f8 --- /dev/null +++ b/stripe/params/treasury/_received_debit_list_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 ReceivedDebitListParams(RequestOptions): + 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. + """ + financial_account: str + """ + The FinancialAccount that funds were pulled from. + """ + 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. + """ + status: NotRequired[Literal["failed", "succeeded"]] + """ + Only return ReceivedDebits that have the given status: `succeeded` or `failed`. + """ diff --git a/stripe/params/treasury/_received_debit_retrieve_params.py b/stripe/params/treasury/_received_debit_retrieve_params.py new file mode 100644 index 000000000..88be7910a --- /dev/null +++ b/stripe/params/treasury/_received_debit_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 ReceivedDebitRetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/treasury/_transaction_entry_list_params.py b/stripe/params/treasury/_transaction_entry_list_params.py new file mode 100644 index 000000000..c6b8d011a --- /dev/null +++ b/stripe/params/treasury/_transaction_entry_list_params.py @@ -0,0 +1,79 @@ +# -*- 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, TypedDict + + +class TransactionEntryListParams(RequestOptions): + created: NotRequired["TransactionEntryListParamsCreated|int"] + """ + Only return TransactionEntries that were created during the given date interval. + """ + effective_at: NotRequired["TransactionEntryListParamsEffectiveAt|int"] + 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. + """ + financial_account: str + """ + Returns objects associated with this FinancialAccount. + """ + 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. + """ + order_by: NotRequired[Literal["created", "effective_at"]] + """ + The results are in reverse chronological order by `created` or `effective_at`. The default is `created`. + """ + 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. + """ + transaction: NotRequired[str] + """ + Only return TransactionEntries associated with this Transaction. + """ + + +class TransactionEntryListParamsCreated(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) + """ + + +class TransactionEntryListParamsEffectiveAt(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/treasury/_transaction_entry_retrieve_params.py b/stripe/params/treasury/_transaction_entry_retrieve_params.py new file mode 100644 index 000000000..fb32213da --- /dev/null +++ b/stripe/params/treasury/_transaction_entry_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 TransactionEntryRetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/treasury/_transaction_list_params.py b/stripe/params/treasury/_transaction_list_params.py new file mode 100644 index 000000000..6b5afe1e7 --- /dev/null +++ b/stripe/params/treasury/_transaction_list_params.py @@ -0,0 +1,91 @@ +# -*- 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, TypedDict + + +class TransactionListParams(RequestOptions): + created: NotRequired["TransactionListParamsCreated|int"] + """ + Only return Transactions that were created during the given date interval. + """ + 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. + """ + financial_account: str + """ + Returns objects associated with this FinancialAccount. + """ + 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. + """ + order_by: NotRequired[Literal["created", "posted_at"]] + """ + The results are in reverse chronological order by `created` or `posted_at`. The default is `created`. + """ + 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. + """ + status: NotRequired[Literal["open", "posted", "void"]] + """ + Only return Transactions that have the given status: `open`, `posted`, or `void`. + """ + status_transitions: NotRequired["TransactionListParamsStatusTransitions"] + """ + A filter for the `status_transitions.posted_at` timestamp. When using this filter, `status=posted` and `order_by=posted_at` must also be specified. + """ + + +class TransactionListParamsCreated(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) + """ + + +class TransactionListParamsStatusTransitions(TypedDict): + posted_at: NotRequired[ + "TransactionListParamsStatusTransitionsPostedAt|int" + ] + """ + Returns Transactions with `posted_at` within the specified range. + """ + + +class TransactionListParamsStatusTransitionsPostedAt(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/treasury/_transaction_retrieve_params.py b/stripe/params/treasury/_transaction_retrieve_params.py new file mode 100644 index 000000000..07744dd96 --- /dev/null +++ b/stripe/params/treasury/_transaction_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 TransactionRetrieveParams(RequestOptions): + expand: NotRequired[List[str]] + """ + Specifies which fields in the response should be expanded. + """ diff --git a/stripe/params/v2/__init__.py b/stripe/params/v2/__init__.py new file mode 100644 index 000000000..d4beb9124 --- /dev/null +++ b/stripe/params/v2/__init__.py @@ -0,0 +1,10 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe.params.v2 import ( + billing as billing, + core as core, + money_management as money_management, + payments as payments, + tax as tax, + test_helpers as test_helpers, +) diff --git a/stripe/params/v2/billing/__init__.py b/stripe/params/v2/billing/__init__.py new file mode 100644 index 000000000..f32421b77 --- /dev/null +++ b/stripe/params/v2/billing/__init__.py @@ -0,0 +1,202 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe.params.v2.billing import ( + bill_settings as bill_settings, + collection_settings as collection_settings, + intents as intents, + license_fees as license_fees, + pricing_plans as pricing_plans, + rate_cards as rate_cards, +) +from stripe.params.v2.billing._bill_setting_create_params import ( + BillSettingCreateParams as BillSettingCreateParams, +) +from stripe.params.v2.billing._bill_setting_list_params import ( + BillSettingListParams as BillSettingListParams, +) +from stripe.params.v2.billing._bill_setting_retrieve_params import ( + BillSettingRetrieveParams as BillSettingRetrieveParams, +) +from stripe.params.v2.billing._bill_setting_update_params import ( + BillSettingUpdateParams as BillSettingUpdateParams, +) +from stripe.params.v2.billing._cadence_cancel_params import ( + CadenceCancelParams as CadenceCancelParams, +) +from stripe.params.v2.billing._cadence_create_params import ( + CadenceCreateParams as CadenceCreateParams, +) +from stripe.params.v2.billing._cadence_list_params import ( + CadenceListParams as CadenceListParams, +) +from stripe.params.v2.billing._cadence_retrieve_params import ( + CadenceRetrieveParams as CadenceRetrieveParams, +) +from stripe.params.v2.billing._cadence_update_params import ( + CadenceUpdateParams as CadenceUpdateParams, +) +from stripe.params.v2.billing._collection_setting_create_params import ( + CollectionSettingCreateParams as CollectionSettingCreateParams, +) +from stripe.params.v2.billing._collection_setting_list_params import ( + CollectionSettingListParams as CollectionSettingListParams, +) +from stripe.params.v2.billing._collection_setting_retrieve_params import ( + CollectionSettingRetrieveParams as CollectionSettingRetrieveParams, +) +from stripe.params.v2.billing._collection_setting_update_params import ( + CollectionSettingUpdateParams as CollectionSettingUpdateParams, +) +from stripe.params.v2.billing._custom_pricing_unit_create_params import ( + CustomPricingUnitCreateParams as CustomPricingUnitCreateParams, +) +from stripe.params.v2.billing._custom_pricing_unit_list_params import ( + CustomPricingUnitListParams as CustomPricingUnitListParams, +) +from stripe.params.v2.billing._custom_pricing_unit_retrieve_params import ( + CustomPricingUnitRetrieveParams as CustomPricingUnitRetrieveParams, +) +from stripe.params.v2.billing._custom_pricing_unit_update_params import ( + CustomPricingUnitUpdateParams as CustomPricingUnitUpdateParams, +) +from stripe.params.v2.billing._intent_cancel_params import ( + IntentCancelParams as IntentCancelParams, +) +from stripe.params.v2.billing._intent_commit_params import ( + IntentCommitParams as IntentCommitParams, +) +from stripe.params.v2.billing._intent_create_params import ( + IntentCreateParams as IntentCreateParams, +) +from stripe.params.v2.billing._intent_list_params import ( + IntentListParams as IntentListParams, +) +from stripe.params.v2.billing._intent_release_reservation_params import ( + IntentReleaseReservationParams as IntentReleaseReservationParams, +) +from stripe.params.v2.billing._intent_reserve_params import ( + IntentReserveParams as IntentReserveParams, +) +from stripe.params.v2.billing._intent_retrieve_params import ( + IntentRetrieveParams as IntentRetrieveParams, +) +from stripe.params.v2.billing._license_fee_create_params import ( + LicenseFeeCreateParams as LicenseFeeCreateParams, +) +from stripe.params.v2.billing._license_fee_list_params import ( + LicenseFeeListParams as LicenseFeeListParams, +) +from stripe.params.v2.billing._license_fee_retrieve_params import ( + LicenseFeeRetrieveParams as LicenseFeeRetrieveParams, +) +from stripe.params.v2.billing._license_fee_subscription_retrieve_params import ( + LicenseFeeSubscriptionRetrieveParams as LicenseFeeSubscriptionRetrieveParams, +) +from stripe.params.v2.billing._license_fee_update_params import ( + LicenseFeeUpdateParams as LicenseFeeUpdateParams, +) +from stripe.params.v2.billing._licensed_item_create_params import ( + LicensedItemCreateParams as LicensedItemCreateParams, +) +from stripe.params.v2.billing._licensed_item_list_params import ( + LicensedItemListParams as LicensedItemListParams, +) +from stripe.params.v2.billing._licensed_item_retrieve_params import ( + LicensedItemRetrieveParams as LicensedItemRetrieveParams, +) +from stripe.params.v2.billing._licensed_item_update_params import ( + LicensedItemUpdateParams as LicensedItemUpdateParams, +) +from stripe.params.v2.billing._meter_event_adjustment_create_params import ( + MeterEventAdjustmentCreateParams as MeterEventAdjustmentCreateParams, +) +from stripe.params.v2.billing._meter_event_create_params import ( + MeterEventCreateParams as MeterEventCreateParams, +) +from stripe.params.v2.billing._meter_event_session_create_params import ( + MeterEventSessionCreateParams as MeterEventSessionCreateParams, +) +from stripe.params.v2.billing._meter_event_stream_create_params import ( + MeterEventStreamCreateParams as MeterEventStreamCreateParams, +) +from stripe.params.v2.billing._metered_item_create_params import ( + MeteredItemCreateParams as MeteredItemCreateParams, +) +from stripe.params.v2.billing._metered_item_list_params import ( + MeteredItemListParams as MeteredItemListParams, +) +from stripe.params.v2.billing._metered_item_retrieve_params import ( + MeteredItemRetrieveParams as MeteredItemRetrieveParams, +) +from stripe.params.v2.billing._metered_item_update_params import ( + MeteredItemUpdateParams as MeteredItemUpdateParams, +) +from stripe.params.v2.billing._pricing_plan_create_params import ( + PricingPlanCreateParams as PricingPlanCreateParams, +) +from stripe.params.v2.billing._pricing_plan_list_params import ( + PricingPlanListParams as PricingPlanListParams, +) +from stripe.params.v2.billing._pricing_plan_retrieve_params import ( + PricingPlanRetrieveParams as PricingPlanRetrieveParams, +) +from stripe.params.v2.billing._pricing_plan_subscription_list_params import ( + PricingPlanSubscriptionListParams as PricingPlanSubscriptionListParams, +) +from stripe.params.v2.billing._pricing_plan_subscription_retrieve_params import ( + PricingPlanSubscriptionRetrieveParams as PricingPlanSubscriptionRetrieveParams, +) +from stripe.params.v2.billing._pricing_plan_subscription_update_params import ( + PricingPlanSubscriptionUpdateParams as PricingPlanSubscriptionUpdateParams, +) +from stripe.params.v2.billing._pricing_plan_update_params import ( + PricingPlanUpdateParams as PricingPlanUpdateParams, +) +from stripe.params.v2.billing._profile_create_params import ( + ProfileCreateParams as ProfileCreateParams, +) +from stripe.params.v2.billing._profile_list_params import ( + ProfileListParams as ProfileListParams, +) +from stripe.params.v2.billing._profile_retrieve_params import ( + ProfileRetrieveParams as ProfileRetrieveParams, +) +from stripe.params.v2.billing._profile_update_params import ( + ProfileUpdateParams as ProfileUpdateParams, +) +from stripe.params.v2.billing._rate_card_create_params import ( + RateCardCreateParams as RateCardCreateParams, +) +from stripe.params.v2.billing._rate_card_list_params import ( + RateCardListParams as RateCardListParams, +) +from stripe.params.v2.billing._rate_card_retrieve_params import ( + RateCardRetrieveParams as RateCardRetrieveParams, +) +from stripe.params.v2.billing._rate_card_subscription_cancel_params import ( + RateCardSubscriptionCancelParams as RateCardSubscriptionCancelParams, +) +from stripe.params.v2.billing._rate_card_subscription_create_params import ( + RateCardSubscriptionCreateParams as RateCardSubscriptionCreateParams, +) +from stripe.params.v2.billing._rate_card_subscription_list_params import ( + RateCardSubscriptionListParams as RateCardSubscriptionListParams, +) +from stripe.params.v2.billing._rate_card_subscription_retrieve_params import ( + RateCardSubscriptionRetrieveParams as RateCardSubscriptionRetrieveParams, +) +from stripe.params.v2.billing._rate_card_subscription_update_params import ( + RateCardSubscriptionUpdateParams as RateCardSubscriptionUpdateParams, +) +from stripe.params.v2.billing._rate_card_update_params import ( + RateCardUpdateParams as RateCardUpdateParams, +) +from stripe.params.v2.billing._service_action_create_params import ( + ServiceActionCreateParams as ServiceActionCreateParams, +) +from stripe.params.v2.billing._service_action_retrieve_params import ( + ServiceActionRetrieveParams as ServiceActionRetrieveParams, +) +from stripe.params.v2.billing._service_action_update_params import ( + ServiceActionUpdateParams as ServiceActionUpdateParams, +) diff --git a/stripe/params/v2/billing/_bill_setting_create_params.py b/stripe/params/v2/billing/_bill_setting_create_params.py new file mode 100644 index 000000000..809fee5b1 --- /dev/null +++ b/stripe/params/v2/billing/_bill_setting_create_params.py @@ -0,0 +1,61 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import Literal, NotRequired, TypedDict + + +class BillSettingCreateParams(TypedDict): + calculation: NotRequired["BillSettingCreateParamsCalculation"] + """ + Settings related to calculating a bill. + """ + display_name: NotRequired[str] + """ + An optional customer-facing display name for the CollectionSetting object. + Maximum length of 250 characters. + """ + invoice: NotRequired["BillSettingCreateParamsInvoice"] + """ + Settings related to invoice behavior. + """ + invoice_rendering_template: NotRequired[str] + """ + The ID of the invoice rendering template to be used when generating invoices. + """ + lookup_key: NotRequired[str] + """ + A lookup key used to retrieve settings dynamically from a static string. + This may be up to 200 characters. + """ + + +class BillSettingCreateParamsCalculation(TypedDict): + tax: NotRequired["BillSettingCreateParamsCalculationTax"] + """ + Settings for calculating tax. + """ + + +class BillSettingCreateParamsCalculationTax(TypedDict): + type: Literal["automatic", "manual"] + """ + Determines if tax will be calculated automatically based on a PTC or manually based on rules defined by the merchant. Defaults to "manual". + """ + + +class BillSettingCreateParamsInvoice(TypedDict): + time_until_due: NotRequired["BillSettingCreateParamsInvoiceTimeUntilDue"] + """ + The amount of time until the invoice will be overdue for payment. + """ + + +class BillSettingCreateParamsInvoiceTimeUntilDue(TypedDict): + interval: Literal["day", "month", "week", "year"] + """ + The interval unit for the time until due. + """ + interval_count: int + """ + The number of interval units. For example, if interval=day and interval_count=30, + the invoice will be due in 30 days. + """ diff --git a/stripe/params/v2/billing/_bill_setting_list_params.py b/stripe/params/v2/billing/_bill_setting_list_params.py new file mode 100644 index 000000000..24cc73a54 --- /dev/null +++ b/stripe/params/v2/billing/_bill_setting_list_params.py @@ -0,0 +1,16 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import NotRequired, TypedDict + + +class BillSettingListParams(TypedDict): + limit: NotRequired[int] + """ + Optionally set the maximum number of results per page. Defaults to 20. + """ + lookup_keys: NotRequired[List[str]] + """ + Only return the settings with these lookup_keys, if any exist. + You can specify up to 10 lookup_keys. + """ diff --git a/stripe/params/v2/billing/_bill_setting_retrieve_params.py b/stripe/params/v2/billing/_bill_setting_retrieve_params.py new file mode 100644 index 000000000..6ac0d05db --- /dev/null +++ b/stripe/params/v2/billing/_bill_setting_retrieve_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class BillSettingRetrieveParams(TypedDict): + pass diff --git a/stripe/params/v2/billing/_bill_setting_update_params.py b/stripe/params/v2/billing/_bill_setting_update_params.py new file mode 100644 index 000000000..60a6cd9aa --- /dev/null +++ b/stripe/params/v2/billing/_bill_setting_update_params.py @@ -0,0 +1,67 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import Literal, NotRequired, TypedDict + + +class BillSettingUpdateParams(TypedDict): + calculation: NotRequired["BillSettingUpdateParamsCalculation"] + """ + Settings related to calculating a bill. + """ + display_name: NotRequired[str] + """ + An optional customer-facing display name for the BillSetting object. + To remove the display name, set it to an empty string in the request. + Maximum length of 250 characters. + """ + invoice: NotRequired["BillSettingUpdateParamsInvoice"] + """ + Settings related to invoice behavior. + """ + invoice_rendering_template: NotRequired[str] + """ + The ID of the invoice rendering template to be used when generating invoices. + """ + live_version: NotRequired[str] + """ + Optionally change the live version of the BillSetting. Providing `live_version = "latest"` will set the + BillSetting' `live_version` to its latest version. + """ + lookup_key: NotRequired[str] + """ + A lookup key used to retrieve settings dynamically from a static string. + This may be up to 200 characters. + """ + + +class BillSettingUpdateParamsCalculation(TypedDict): + tax: NotRequired["BillSettingUpdateParamsCalculationTax"] + """ + Settings for calculating tax. + """ + + +class BillSettingUpdateParamsCalculationTax(TypedDict): + type: Literal["automatic", "manual"] + """ + Determines if tax will be calculated automatically based on a PTC or manually based on rules defined by the merchant. Defaults to "manual". + """ + + +class BillSettingUpdateParamsInvoice(TypedDict): + time_until_due: NotRequired["BillSettingUpdateParamsInvoiceTimeUntilDue"] + """ + The amount of time until the invoice will be overdue for payment. + """ + + +class BillSettingUpdateParamsInvoiceTimeUntilDue(TypedDict): + interval: Literal["day", "month", "week", "year"] + """ + The interval unit for the time until due. + """ + interval_count: int + """ + The number of interval units. For example, if interval=day and interval_count=30, + the invoice will be due in 30 days. + """ diff --git a/stripe/params/v2/billing/_cadence_cancel_params.py b/stripe/params/v2/billing/_cadence_cancel_params.py new file mode 100644 index 000000000..8c2e327b5 --- /dev/null +++ b/stripe/params/v2/billing/_cadence_cancel_params.py @@ -0,0 +1,13 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import Literal, NotRequired, TypedDict + + +class CadenceCancelParams(TypedDict): + include: NotRequired[ + List[Literal["invoice_discount_rules", "settings_data"]] + ] + """ + Additional resource to include in the response. + """ diff --git a/stripe/params/v2/billing/_cadence_create_params.py b/stripe/params/v2/billing/_cadence_create_params.py new file mode 100644 index 000000000..1b726efbb --- /dev/null +++ b/stripe/params/v2/billing/_cadence_create_params.py @@ -0,0 +1,253 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class CadenceCreateParams(TypedDict): + billing_cycle: "CadenceCreateParamsBillingCycle" + """ + The billing cycle is the object that defines future billing cycle dates. + """ + include: NotRequired[ + List[Literal["invoice_discount_rules", "settings_data"]] + ] + """ + Additional resource to include in the response. + """ + lookup_key: NotRequired[str] + """ + A lookup key used to retrieve cadences dynamically from a static string. Maximum length of 200 characters. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://docs.stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + """ + payer: "CadenceCreateParamsPayer" + """ + The payer determines the entity financially responsible for the bill. + """ + settings: NotRequired["CadenceCreateParamsSettings"] + """ + The settings associated with the cadence. + """ + + +class CadenceCreateParamsBillingCycle(TypedDict): + interval_count: NotRequired[int] + """ + The number of intervals (specified in the interval attribute) between + cadence billings. For example, type=month and interval_count=3 bills every + 3 months. If this is not provided, it will default to 1. + """ + type: Literal["day", "month", "week", "year"] + """ + The frequency at which a cadence bills. + """ + day: NotRequired["CadenceCreateParamsBillingCycleDay"] + """ + Specific configuration for determining billing dates when type=day. + """ + month: NotRequired["CadenceCreateParamsBillingCycleMonth"] + """ + Specific configuration for determining billing dates when type=month. + """ + week: NotRequired["CadenceCreateParamsBillingCycleWeek"] + """ + Specific configuration for determining billing dates when type=week. + """ + year: NotRequired["CadenceCreateParamsBillingCycleYear"] + """ + Specific configuration for determining billing dates when type=year. + """ + + +class CadenceCreateParamsBillingCycleDay(TypedDict): + time: NotRequired["CadenceCreateParamsBillingCycleDayTime"] + """ + The time at which the billing cycle ends. + This field is optional, and if not provided, it will default to + the time at which the cadence was created in UTC timezone. + """ + + +class CadenceCreateParamsBillingCycleDayTime(TypedDict): + hour: int + """ + The hour at which the billing cycle ends. + This must be an integer between 0 and 23, inclusive. + 0 represents midnight, and 23 represents 11 PM. + """ + minute: int + """ + The minute at which the billing cycle ends. + Must be an integer between 0 and 59, inclusive. + """ + second: int + """ + The second at which the billing cycle ends. + Must be an integer between 0 and 59, inclusive. + """ + + +class CadenceCreateParamsBillingCycleMonth(TypedDict): + day_of_month: int + """ + The day to anchor the billing on for a type="month" billing cycle from + 1-31. If this number is greater than the number of days in the month being + billed, this will anchor to the last day of the month. If not provided, + this will default to the day the cadence was created. + """ + month_of_year: NotRequired[int] + """ + The month to anchor the billing on for a type="month" billing cycle from + 1-12. If not provided, this will default to the month the cadence was created. + This setting can only be used for monthly billing cycles with `interval_count` of 2, 3, 4 or 6. + All occurrences will be calculated from month provided. + """ + time: NotRequired["CadenceCreateParamsBillingCycleMonthTime"] + """ + The time at which the billing cycle ends. + This field is optional, and if not provided, it will default to + the time at which the cadence was created in UTC timezone. + """ + + +class CadenceCreateParamsBillingCycleMonthTime(TypedDict): + hour: int + """ + The hour at which the billing cycle ends. + This must be an integer between 0 and 23, inclusive. + 0 represents midnight, and 23 represents 11 PM. + """ + minute: int + """ + The minute at which the billing cycle ends. + Must be an integer between 0 and 59, inclusive. + """ + second: int + """ + The second at which the billing cycle ends. + Must be an integer between 0 and 59, inclusive. + """ + + +class CadenceCreateParamsBillingCycleWeek(TypedDict): + day_of_week: int + """ + The day of the week to bill the type=week billing cycle on. + Numbered from 1-7 for Monday to Sunday respectively, based on the ISO-8601 + week day numbering. If not provided, this will default to the day the + cadence was created. + """ + time: NotRequired["CadenceCreateParamsBillingCycleWeekTime"] + """ + The time at which the billing cycle ends. + This field is optional, and if not provided, it will default to + the time at which the cadence was created in UTC timezone. + """ + + +class CadenceCreateParamsBillingCycleWeekTime(TypedDict): + hour: int + """ + The hour at which the billing cycle ends. + This must be an integer between 0 and 23, inclusive. + 0 represents midnight, and 23 represents 11 PM. + """ + minute: int + """ + The minute at which the billing cycle ends. + Must be an integer between 0 and 59, inclusive. + """ + second: int + """ + The second at which the billing cycle ends. + Must be an integer between 0 and 59, inclusive. + """ + + +class CadenceCreateParamsBillingCycleYear(TypedDict): + day_of_month: NotRequired[int] + """ + The day to anchor the billing on for a type="month" billing cycle from + 1-31. If this number is greater than the number of days in the month being + billed, this will anchor to the last day of the month. If not provided, + this will default to the day the cadence was created. + """ + month_of_year: NotRequired[int] + """ + The month to bill on from 1-12. If not provided, this will default to the + month the cadence was created. + """ + time: NotRequired["CadenceCreateParamsBillingCycleYearTime"] + """ + The time at which the billing cycle ends. + This field is optional, and if not provided, it will default to + the time at which the cadence was created in UTC timezone. + """ + + +class CadenceCreateParamsBillingCycleYearTime(TypedDict): + hour: int + """ + The hour at which the billing cycle ends. + This must be an integer between 0 and 23, inclusive. + 0 represents midnight, and 23 represents 11 PM. + """ + minute: int + """ + The minute at which the billing cycle ends. + Must be an integer between 0 and 59, inclusive. + """ + second: int + """ + The second at which the billing cycle ends. + Must be an integer between 0 and 59, inclusive. + """ + + +class CadenceCreateParamsPayer(TypedDict): + billing_profile: str + """ + The ID of the Billing Profile object which determines how a bill will be paid. + """ + + +class CadenceCreateParamsSettings(TypedDict): + bill: NotRequired["CadenceCreateParamsSettingsBill"] + """ + Settings that configure bill generation, which includes calculating totals, tax, and presenting invoices. + If no setting is provided here, the settings from the customer referenced on the payer will be used. + If no customer settings are present, the merchant default settings will be used. + """ + collection: NotRequired["CadenceCreateParamsSettingsCollection"] + """ + Settings that configure and manage the behavior of collecting payments. + If no setting is provided here, the settings from the customer referenced from the payer will be used if they exist. + If no customer settings are present, the merchant default settings will be used. + """ + + +class CadenceCreateParamsSettingsBill(TypedDict): + id: str + """ + The ID of the referenced settings object. + """ + version: NotRequired[str] + """ + An optional field to specify the version of the Settings to use. + If not provided, this will always default to the live version any time the settings are used. + """ + + +class CadenceCreateParamsSettingsCollection(TypedDict): + id: str + """ + The ID of the referenced settings object. + """ + version: NotRequired[str] + """ + An optional field to specify the version of the Settings to use. + If not provided, this will always default to the live version any time the settings are used. + """ diff --git a/stripe/params/v2/billing/_cadence_list_params.py b/stripe/params/v2/billing/_cadence_list_params.py new file mode 100644 index 000000000..7fd0d9e8d --- /dev/null +++ b/stripe/params/v2/billing/_cadence_list_params.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import Literal, NotRequired, TypedDict + + +class CadenceListParams(TypedDict): + include: NotRequired[ + List[Literal["invoice_discount_rules", "settings_data"]] + ] + """ + Additional resource to include in the response. + """ + limit: NotRequired[int] + """ + Optionally set the maximum number of results per page. Defaults to 20. + """ + lookup_keys: NotRequired[List[str]] + """ + Only return the cadences with these lookup_keys, if any exist. You can specify up to 10 lookup_keys. + Mutually exclusive with `test_clock` and `payer`. + """ + payer: NotRequired["CadenceListParamsPayer"] + """ + If provided, only cadences that specifically reference the payer will be returned. Mutually exclusive with `test_clock` and `lookup_keys`. + """ + test_clock: NotRequired[str] + """ + If provided, only cadences that specifically reference the provided test clock ID (via the + customer's test clock) will be returned. + Mutually exclusive with `payer`. + """ + + +class CadenceListParamsPayer(TypedDict): + customer: NotRequired[str] + """ + The ID of the Customer object. If provided, only cadences that specifically reference the provided customer ID will be returned. + """ + type: Literal["customer"] + """ + A string identifying the type of the payer. Currently the only supported value is `customer`. + """ diff --git a/stripe/params/v2/billing/_cadence_retrieve_params.py b/stripe/params/v2/billing/_cadence_retrieve_params.py new file mode 100644 index 000000000..f269a46aa --- /dev/null +++ b/stripe/params/v2/billing/_cadence_retrieve_params.py @@ -0,0 +1,13 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import Literal, NotRequired, TypedDict + + +class CadenceRetrieveParams(TypedDict): + include: NotRequired[ + List[Literal["invoice_discount_rules", "settings_data"]] + ] + """ + Additional resource to include in the response. + """ diff --git a/stripe/params/v2/billing/_cadence_update_params.py b/stripe/params/v2/billing/_cadence_update_params.py new file mode 100644 index 000000000..da0a8ea30 --- /dev/null +++ b/stripe/params/v2/billing/_cadence_update_params.py @@ -0,0 +1,75 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import Dict, List, Optional +from typing_extensions import Literal, NotRequired, TypedDict + + +class CadenceUpdateParams(TypedDict): + include: NotRequired[ + List[Literal["invoice_discount_rules", "settings_data"]] + ] + """ + Additional resource to include in the response. + """ + lookup_key: NotRequired[str] + """ + A lookup key used to retrieve cadences dynamically from a static string. Maximum length of 200 characters. + """ + metadata: NotRequired[Dict[str, Optional[str]]] + """ + Set of [key-value pairs](https://docs.stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + """ + payer: NotRequired["CadenceUpdateParamsPayer"] + """ + The payer determines the entity financially responsible for the bill. + """ + settings: NotRequired["CadenceUpdateParamsSettings"] + """ + The settings associated with the cadence. + """ + + +class CadenceUpdateParamsPayer(TypedDict): + billing_profile: NotRequired[str] + """ + The ID of the Billing Profile object which determines how a bill will be paid. + """ + + +class CadenceUpdateParamsSettings(TypedDict): + bill: NotRequired["CadenceUpdateParamsSettingsBill"] + """ + Settings that configure bills generation, which includes calculating totals, tax, and presenting invoices. If null is provided, the current bill settings will be removed from the billing cadence. + """ + collection: NotRequired["CadenceUpdateParamsSettingsCollection"] + """ + Settings that configure and manage the behavior of collecting payments. If null is provided, the current collection settings will be removed from the billing cadence. + """ + + +class CadenceUpdateParamsSettingsBill(TypedDict): + id: str + """ + The ID of the referenced settings object. + """ + version: NotRequired[str] + """ + An optional field to specify the version of Settings to use. + If not provided, this will always default to the `live_version` specified on the setting, any time the settings are used. + Using a specific version here will prevent the settings from updating, and is discouraged for cadences. + To clear a pinned version, set the version to null. + """ + + +class CadenceUpdateParamsSettingsCollection(TypedDict): + id: str + """ + The ID of the referenced settings object. + """ + version: NotRequired[str] + """ + An optional field to specify the version of Settings to use. + If not provided, this will always default to the `live_version` specified on the setting, any time the settings are used. + Using a specific version here will prevent the settings from updating, and is discouraged for cadences. + To clear a pinned version, set the version to null. + """ diff --git a/stripe/params/v2/billing/_collection_setting_create_params.py b/stripe/params/v2/billing/_collection_setting_create_params.py new file mode 100644 index 000000000..8272685fa --- /dev/null +++ b/stripe/params/v2/billing/_collection_setting_create_params.py @@ -0,0 +1,261 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import Any, Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class CollectionSettingCreateParams(TypedDict): + collection_method: NotRequired[Literal["automatic", "send_invoice"]] + """ + Either automatic, or send_invoice. When charging automatically, Stripe will attempt to pay this + bill at the end of the period using the payment method attached to the payer profile. When sending an invoice, + Stripe will email your payer profile an invoice with payment instructions. + Defaults to automatic. + """ + display_name: NotRequired[str] + """ + An optional customer-facing display name for the CollectionSetting object. + Maximum length of 250 characters. + """ + email_delivery: NotRequired["CollectionSettingCreateParamsEmailDelivery"] + """ + Email delivery setting. + """ + lookup_key: NotRequired[str] + """ + A lookup key used to retrieve settings dynamically from a static string. + This may be up to 200 characters. + """ + payment_method_configuration: NotRequired[str] + """ + The ID of the PaymentMethodConfiguration object, which controls which payment methods are displayed to your customers. + """ + payment_method_options: NotRequired[ + "CollectionSettingCreateParamsPaymentMethodOptions" + ] + """ + Payment Method specific configuration to be stored on the object. + """ + + +class CollectionSettingCreateParamsEmailDelivery(TypedDict): + payment_due: NotRequired[ + "CollectionSettingCreateParamsEmailDeliveryPaymentDue" + ] + """ + Controls emails for when the payment is due. For example after the invoice is finilized and transition to Open state. + """ + + +class CollectionSettingCreateParamsEmailDeliveryPaymentDue(TypedDict): + enabled: bool + """ + If true an email for the invoice would be generated and sent out. + """ + include_payment_link: bool + """ + If true the payment link to hosted invocie page would be included in email and PDF of the invoice. + """ + + +class CollectionSettingCreateParamsPaymentMethodOptions(TypedDict): + acss_debit: NotRequired[ + "CollectionSettingCreateParamsPaymentMethodOptionsAcssDebit" + ] + """ + This sub-hash contains details about the Canadian pre-authorized debit payment method options. + """ + bancontact: NotRequired[ + "CollectionSettingCreateParamsPaymentMethodOptionsBancontact" + ] + """ + This sub-hash contains details about the Bancontact payment method. + """ + card: NotRequired["CollectionSettingCreateParamsPaymentMethodOptionsCard"] + """ + This sub-hash contains details about the Card payment method options. + """ + customer_balance: NotRequired[ + "CollectionSettingCreateParamsPaymentMethodOptionsCustomerBalance" + ] + """ + This sub-hash contains details about the Bank transfer payment method options. + """ + konbini: NotRequired[Dict[str, Any]] + """ + This sub-hash contains details about the Konbini payment method options. + """ + sepa_debit: NotRequired[Dict[str, Any]] + """ + This sub-hash contains details about the SEPA Direct Debit payment method options. + """ + us_bank_account: NotRequired[ + "CollectionSettingCreateParamsPaymentMethodOptionsUsBankAccount" + ] + """ + This sub-hash contains details about the ACH direct debit payment method options. + """ + + +class CollectionSettingCreateParamsPaymentMethodOptionsAcssDebit(TypedDict): + mandate_options: NotRequired[ + "CollectionSettingCreateParamsPaymentMethodOptionsAcssDebitMandateOptions" + ] + """ + Additional fields for Mandate creation. + """ + verification_method: NotRequired[ + Literal["automatic", "instant", "microdeposits"] + ] + """ + Verification method. + """ + + +class CollectionSettingCreateParamsPaymentMethodOptionsAcssDebitMandateOptions( + TypedDict, +): + transaction_type: NotRequired[Literal["business", "personal"]] + """ + Transaction type of the mandate. + """ + + +class CollectionSettingCreateParamsPaymentMethodOptionsBancontact(TypedDict): + preferred_language: NotRequired[Literal["de", "en", "fr", "nl"]] + """ + Preferred language of the Bancontact authorization page that the customer is redirected to. + """ + + +class CollectionSettingCreateParamsPaymentMethodOptionsCard(TypedDict): + mandate_options: NotRequired[ + "CollectionSettingCreateParamsPaymentMethodOptionsCardMandateOptions" + ] + """ + Configuration options for setting up an eMandate for cards issued in India. + """ + network: NotRequired[str] + """ + Selected network to process the payment on. Depends on the available networks of the card. + """ + request_three_d_secure: NotRequired[ + Literal["any", "automatic", "challenge"] + ] + """ + An advanced option 3D Secure. We strongly recommend that you rely on our SCA Engine to automatically prompt your customers + for authentication based on risk level and [other requirements](https://docs.corp.stripe.com/strong-customer-authentication). + However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. + Read our guide on [manually requesting 3D Secure](https://docs.corp.stripe.com/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + """ + + +class CollectionSettingCreateParamsPaymentMethodOptionsCardMandateOptions( + TypedDict, +): + amount: NotRequired[int] + """ + Amount to be charged for future payments. + """ + amount_type: NotRequired[Literal["fixed", "maximum"]] + """ + The AmountType for the mandate. One of `fixed` or `maximum`. + """ + description: NotRequired[str] + """ + A description of the mandate that is meant to be displayed to the customer. + """ + + +class CollectionSettingCreateParamsPaymentMethodOptionsCustomerBalance( + TypedDict, +): + bank_transfer: NotRequired[ + "CollectionSettingCreateParamsPaymentMethodOptionsCustomerBalanceBankTransfer" + ] + """ + Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. + """ + funding_type: NotRequired[Literal["bank_transfer"]] + """ + The funding method type to be used when there are not enough funds in the customer balance. Currently the only supported value is `bank_transfer`. + """ + + +class CollectionSettingCreateParamsPaymentMethodOptionsCustomerBalanceBankTransfer( + TypedDict, +): + eu_bank_transfer: NotRequired[ + "CollectionSettingCreateParamsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer" + ] + """ + Configuration for `eu_bank_transfer` funding type. Required if `type` is `eu_bank_transfer`. + """ + type: NotRequired[ + Literal[ + "eu_bank_transfer", + "gb_bank_transfer", + "jp_bank_transfer", + "mx_bank_transfer", + "us_bank_transfer", + ] + ] + """ + The bank transfer type that can be used for funding. + """ + + +class CollectionSettingCreateParamsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer( + TypedDict, +): + country: Literal["BE", "DE", "ES", "FR", "IE", "NL"] + """ + The desired country code of the bank account information. + """ + + +class CollectionSettingCreateParamsPaymentMethodOptionsUsBankAccount( + TypedDict +): + financial_connections: "CollectionSettingCreateParamsPaymentMethodOptionsUsBankAccountFinancialConnections" + """ + Additional fields for Financial Connections Session creation. + """ + verification_method: Literal["automatic", "instant", "microdeposits"] + """ + Verification method. + """ + + +class CollectionSettingCreateParamsPaymentMethodOptionsUsBankAccountFinancialConnections( + TypedDict, +): + filters: NotRequired[ + "CollectionSettingCreateParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters" + ] + """ + Provide filters for the linked accounts that the customer can select for the payment method. + """ + permissions: NotRequired[ + List[ + Literal["balances", "ownership", "payment_method", "transactions"] + ] + ] + """ + The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. + """ + prefetch: NotRequired[ + List[Literal["balances", "ownership", "transactions"]] + ] + """ + List of data features that you would like to retrieve upon account creation. + """ + + +class CollectionSettingCreateParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters( + TypedDict, +): + account_subcategories: NotRequired[List[Literal["checking", "savings"]]] + """ + The account subcategories to use to filter for selectable accounts. + """ diff --git a/stripe/params/v2/billing/_collection_setting_list_params.py b/stripe/params/v2/billing/_collection_setting_list_params.py new file mode 100644 index 000000000..abe1d361f --- /dev/null +++ b/stripe/params/v2/billing/_collection_setting_list_params.py @@ -0,0 +1,16 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import NotRequired, TypedDict + + +class CollectionSettingListParams(TypedDict): + limit: NotRequired[int] + """ + Optionally set the maximum number of results per page. Defaults to 20. + """ + lookup_keys: NotRequired[List[str]] + """ + Only return the settings with these lookup_keys, if any exist. + You can specify up to 10 lookup_keys. + """ diff --git a/stripe/params/v2/billing/_collection_setting_retrieve_params.py b/stripe/params/v2/billing/_collection_setting_retrieve_params.py new file mode 100644 index 000000000..37f15a024 --- /dev/null +++ b/stripe/params/v2/billing/_collection_setting_retrieve_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class CollectionSettingRetrieveParams(TypedDict): + pass diff --git a/stripe/params/v2/billing/_collection_setting_update_params.py b/stripe/params/v2/billing/_collection_setting_update_params.py new file mode 100644 index 000000000..4b365f768 --- /dev/null +++ b/stripe/params/v2/billing/_collection_setting_update_params.py @@ -0,0 +1,267 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import Any, Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class CollectionSettingUpdateParams(TypedDict): + collection_method: NotRequired[Literal["automatic", "send_invoice"]] + """ + Either automatic, or send_invoice. When charging automatically, Stripe will attempt to pay this + bill at the end of the period using the payment method attached to the payer profile. When sending an invoice, + Stripe will email your payer profile an invoice with payment instructions. + """ + display_name: NotRequired[str] + """ + An optional customer-facing display name for the CollectionSetting object. + To remove the display name, set it to an empty string in the request. + Maximum length of 250 characters. + """ + email_delivery: NotRequired["CollectionSettingUpdateParamsEmailDelivery"] + """ + Email delivery settings. + """ + live_version: NotRequired[str] + """ + Optionally change the live version of the CollectionSetting. Billing Cadences and other objects that refer to this + CollectionSetting will use this version when no overrides are set. Providing `live_version = "latest"` will set the + CollectionSetting's `live_version` to its latest version. + """ + lookup_key: NotRequired[str] + """ + A lookup key used to retrieve settings dynamically from a static string. + This may be up to 200 characters. + """ + payment_method_configuration: NotRequired[str] + """ + The ID of the PaymentMethodConfiguration object, which controls which payment methods are displayed to your customers. + """ + payment_method_options: NotRequired[ + "CollectionSettingUpdateParamsPaymentMethodOptions" + ] + """ + Payment Method specific configuration to be stored on the object. + """ + + +class CollectionSettingUpdateParamsEmailDelivery(TypedDict): + payment_due: NotRequired[ + "CollectionSettingUpdateParamsEmailDeliveryPaymentDue" + ] + """ + Controls emails for when the payment is due. For example after the invoice is finilized and transition to Open state. + """ + + +class CollectionSettingUpdateParamsEmailDeliveryPaymentDue(TypedDict): + enabled: bool + """ + If true an email for the invoice would be generated and sent out. + """ + include_payment_link: bool + """ + If true the payment link to hosted invocie page would be included in email and PDF of the invoice. + """ + + +class CollectionSettingUpdateParamsPaymentMethodOptions(TypedDict): + acss_debit: NotRequired[ + "CollectionSettingUpdateParamsPaymentMethodOptionsAcssDebit" + ] + """ + This sub-hash contains details about the Canadian pre-authorized debit payment method options. + """ + bancontact: NotRequired[ + "CollectionSettingUpdateParamsPaymentMethodOptionsBancontact" + ] + """ + This sub-hash contains details about the Bancontact payment method. + """ + card: NotRequired["CollectionSettingUpdateParamsPaymentMethodOptionsCard"] + """ + This sub-hash contains details about the Card payment method options. + """ + customer_balance: NotRequired[ + "CollectionSettingUpdateParamsPaymentMethodOptionsCustomerBalance" + ] + """ + This sub-hash contains details about the Bank transfer payment method options. + """ + konbini: NotRequired[Dict[str, Any]] + """ + This sub-hash contains details about the Konbini payment method options. + """ + sepa_debit: NotRequired[Dict[str, Any]] + """ + This sub-hash contains details about the SEPA Direct Debit payment method options. + """ + us_bank_account: NotRequired[ + "CollectionSettingUpdateParamsPaymentMethodOptionsUsBankAccount" + ] + """ + This sub-hash contains details about the ACH direct debit payment method options. + """ + + +class CollectionSettingUpdateParamsPaymentMethodOptionsAcssDebit(TypedDict): + mandate_options: NotRequired[ + "CollectionSettingUpdateParamsPaymentMethodOptionsAcssDebitMandateOptions" + ] + """ + Additional fields for Mandate creation. + """ + verification_method: NotRequired[ + Literal["automatic", "instant", "microdeposits"] + ] + """ + Verification method. + """ + + +class CollectionSettingUpdateParamsPaymentMethodOptionsAcssDebitMandateOptions( + TypedDict, +): + transaction_type: NotRequired[Literal["business", "personal"]] + """ + Transaction type of the mandate. + """ + + +class CollectionSettingUpdateParamsPaymentMethodOptionsBancontact(TypedDict): + preferred_language: NotRequired[Literal["de", "en", "fr", "nl"]] + """ + Preferred language of the Bancontact authorization page that the customer is redirected to. + """ + + +class CollectionSettingUpdateParamsPaymentMethodOptionsCard(TypedDict): + mandate_options: NotRequired[ + "CollectionSettingUpdateParamsPaymentMethodOptionsCardMandateOptions" + ] + """ + Configuration options for setting up an eMandate for cards issued in India. + """ + network: NotRequired[str] + """ + Selected network to process the payment on. Depends on the available networks of the card. + """ + request_three_d_secure: NotRequired[ + Literal["any", "automatic", "challenge"] + ] + """ + An advanced option 3D Secure. We strongly recommend that you rely on our SCA Engine to automatically prompt your customers + for authentication based on risk level and [other requirements](https://docs.corp.stripe.com/strong-customer-authentication). + However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. + Read our guide on [manually requesting 3D Secure](https://docs.corp.stripe.com/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + """ + + +class CollectionSettingUpdateParamsPaymentMethodOptionsCardMandateOptions( + TypedDict, +): + amount: NotRequired[int] + """ + Amount to be charged for future payments. + """ + amount_type: NotRequired[Literal["fixed", "maximum"]] + """ + The AmountType for the mandate. One of `fixed` or `maximum`. + """ + description: NotRequired[str] + """ + A description of the mandate that is meant to be displayed to the customer. + """ + + +class CollectionSettingUpdateParamsPaymentMethodOptionsCustomerBalance( + TypedDict, +): + bank_transfer: NotRequired[ + "CollectionSettingUpdateParamsPaymentMethodOptionsCustomerBalanceBankTransfer" + ] + """ + Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. + """ + funding_type: NotRequired[Literal["bank_transfer"]] + """ + The funding method type to be used when there are not enough funds in the customer balance. Currently the only supported value is `bank_transfer`. + """ + + +class CollectionSettingUpdateParamsPaymentMethodOptionsCustomerBalanceBankTransfer( + TypedDict, +): + eu_bank_transfer: NotRequired[ + "CollectionSettingUpdateParamsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer" + ] + """ + Configuration for `eu_bank_transfer` funding type. Required if `type` is `eu_bank_transfer`. + """ + type: NotRequired[ + Literal[ + "eu_bank_transfer", + "gb_bank_transfer", + "jp_bank_transfer", + "mx_bank_transfer", + "us_bank_transfer", + ] + ] + """ + The bank transfer type that can be used for funding. + """ + + +class CollectionSettingUpdateParamsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer( + TypedDict, +): + country: Literal["BE", "DE", "ES", "FR", "IE", "NL"] + """ + The desired country code of the bank account information. + """ + + +class CollectionSettingUpdateParamsPaymentMethodOptionsUsBankAccount( + TypedDict +): + financial_connections: "CollectionSettingUpdateParamsPaymentMethodOptionsUsBankAccountFinancialConnections" + """ + Additional fields for Financial Connections Session creation. + """ + verification_method: Literal["automatic", "instant", "microdeposits"] + """ + Verification method. + """ + + +class CollectionSettingUpdateParamsPaymentMethodOptionsUsBankAccountFinancialConnections( + TypedDict, +): + filters: NotRequired[ + "CollectionSettingUpdateParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters" + ] + """ + Provide filters for the linked accounts that the customer can select for the payment method. + """ + permissions: NotRequired[ + List[ + Literal["balances", "ownership", "payment_method", "transactions"] + ] + ] + """ + The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. + """ + prefetch: NotRequired[ + List[Literal["balances", "ownership", "transactions"]] + ] + """ + List of data features that you would like to retrieve upon account creation. + """ + + +class CollectionSettingUpdateParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters( + TypedDict, +): + account_subcategories: NotRequired[List[Literal["checking", "savings"]]] + """ + The account subcategories to use to filter for selectable accounts. + """ diff --git a/stripe/params/v2/billing/_custom_pricing_unit_create_params.py b/stripe/params/v2/billing/_custom_pricing_unit_create_params.py new file mode 100644 index 000000000..8e9ab455a --- /dev/null +++ b/stripe/params/v2/billing/_custom_pricing_unit_create_params.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import Dict +from typing_extensions import NotRequired, TypedDict + + +class CustomPricingUnitCreateParams(TypedDict): + display_name: str + """ + Description that customers will see in the invoice line item. + Maximum length of 10 characters. + """ + lookup_key: NotRequired[str] + """ + An internal key you can use to search for a particular custom pricing unit item. + Must be unique among items. + Maximum length of 200 characters. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://docs.stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + """ diff --git a/stripe/params/v2/billing/_custom_pricing_unit_list_params.py b/stripe/params/v2/billing/_custom_pricing_unit_list_params.py new file mode 100644 index 000000000..f70af86ee --- /dev/null +++ b/stripe/params/v2/billing/_custom_pricing_unit_list_params.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import NotRequired, TypedDict + + +class CustomPricingUnitListParams(TypedDict): + active: NotRequired[bool] + """ + Filter for active/inactive custom pricing units. Mutually exclusive with `lookup_keys`. + """ + limit: NotRequired[int] + """ + Optionally set the maximum number of results per page. Defaults to 20. + """ + lookup_keys: NotRequired[List[str]] + """ + Filter by lookup keys. Mutually exclusive with `active`. + You can specify up to 10 lookup keys. + """ diff --git a/stripe/params/v2/billing/_custom_pricing_unit_retrieve_params.py b/stripe/params/v2/billing/_custom_pricing_unit_retrieve_params.py new file mode 100644 index 000000000..26c746a39 --- /dev/null +++ b/stripe/params/v2/billing/_custom_pricing_unit_retrieve_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class CustomPricingUnitRetrieveParams(TypedDict): + pass diff --git a/stripe/params/v2/billing/_custom_pricing_unit_update_params.py b/stripe/params/v2/billing/_custom_pricing_unit_update_params.py new file mode 100644 index 000000000..a31d1bb54 --- /dev/null +++ b/stripe/params/v2/billing/_custom_pricing_unit_update_params.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import Dict, Optional +from typing_extensions import NotRequired, TypedDict + + +class CustomPricingUnitUpdateParams(TypedDict): + active: NotRequired[bool] + """ + Whether the Custom Pricing Unit is active. + """ + display_name: NotRequired[str] + """ + Description that customers will see in the invoice line item. + """ + lookup_key: NotRequired[str] + """ + An internal key you can use to search for a particular CustomPricingUnit item. + """ + metadata: NotRequired[Dict[str, Optional[str]]] + """ + Set of key-value pairs that you can attach to an object. + """ diff --git a/stripe/params/v2/billing/_intent_cancel_params.py b/stripe/params/v2/billing/_intent_cancel_params.py new file mode 100644 index 000000000..6ccb595e8 --- /dev/null +++ b/stripe/params/v2/billing/_intent_cancel_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class IntentCancelParams(TypedDict): + pass diff --git a/stripe/params/v2/billing/_intent_commit_params.py b/stripe/params/v2/billing/_intent_commit_params.py new file mode 100644 index 000000000..2c7ff1cf4 --- /dev/null +++ b/stripe/params/v2/billing/_intent_commit_params.py @@ -0,0 +1,10 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import NotRequired, TypedDict + + +class IntentCommitParams(TypedDict): + payment_intent: NotRequired[str] + """ + ID of the PaymentIntent associated with this commit. + """ diff --git a/stripe/params/v2/billing/_intent_create_params.py b/stripe/params/v2/billing/_intent_create_params.py new file mode 100644 index 000000000..51c90ea76 --- /dev/null +++ b/stripe/params/v2/billing/_intent_create_params.py @@ -0,0 +1,375 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class IntentCreateParams(TypedDict): + actions: List["IntentCreateParamsAction"] + """ + Actions to be performed by this Billing Intent. + """ + currency: str + """ + Three-letter ISO currency code, in lowercase. Must be a supported currency. + """ + cadence: NotRequired[str] + """ + ID of an existing Cadence to use. + """ + + +class IntentCreateParamsAction(TypedDict): + type: Literal["apply", "deactivate", "modify", "remove", "subscribe"] + """ + Type of the Billing Intent action. + """ + apply: NotRequired["IntentCreateParamsActionApply"] + """ + Details for an apply action. + """ + deactivate: NotRequired["IntentCreateParamsActionDeactivate"] + """ + Details for a deactivate action. + """ + modify: NotRequired["IntentCreateParamsActionModify"] + """ + Details for a modify action. + """ + remove: NotRequired["IntentCreateParamsActionRemove"] + """ + Details for a remove action. + """ + subscribe: NotRequired["IntentCreateParamsActionSubscribe"] + """ + Details for a subscribe action. + """ + + +class IntentCreateParamsActionApply(TypedDict): + type: Literal["invoice_discount_rule"] + """ + Type of the apply action details. + """ + invoice_discount_rule: NotRequired[ + "IntentCreateParamsActionApplyInvoiceDiscountRule" + ] + """ + Details for applying a discount rule to future invoices. + """ + + +class IntentCreateParamsActionApplyInvoiceDiscountRule(TypedDict): + applies_to: Literal["cadence"] + """ + The entity that the discount rule applies to, for example, the cadence. + """ + type: Literal["percent_off"] + """ + Type of the discount rule. + """ + percent_off: NotRequired[ + "IntentCreateParamsActionApplyInvoiceDiscountRulePercentOff" + ] + """ + Configuration for percentage off discount. + """ + + +class IntentCreateParamsActionApplyInvoiceDiscountRulePercentOff(TypedDict): + maximum_applications: "IntentCreateParamsActionApplyInvoiceDiscountRulePercentOffMaximumApplications" + """ + The maximum number of times this discount can be applied for this cadence. + """ + percent_off: str + """ + Percent that will be taken off of the amount. For example, percent_off of 50.0 will make $100 amount $50 instead. + """ + + +class IntentCreateParamsActionApplyInvoiceDiscountRulePercentOffMaximumApplications( + TypedDict, +): + type: Literal["indefinite"] + """ + The type of maximum applications configuration. + """ + + +class IntentCreateParamsActionDeactivate(TypedDict): + billing_details: NotRequired[ + "IntentCreateParamsActionDeactivateBillingDetails" + ] + """ + Configuration for the billing details. + """ + effective_at: NotRequired["IntentCreateParamsActionDeactivateEffectiveAt"] + """ + When the deactivate action will take effect. If not specified, the default behavior is on_reserve. + """ + pricing_plan_subscription_details: ( + "IntentCreateParamsActionDeactivatePricingPlanSubscriptionDetails" + ) + """ + Details for deactivating a pricing plan subscription. + """ + type: Literal[ + "pricing_plan_subscription_details", "v1_subscription_details" + ] + """ + Type of the action details. + """ + + +class IntentCreateParamsActionDeactivateBillingDetails(TypedDict): + proration_behavior: NotRequired[ + Literal["no_adjustment", "prorated_adjustment"] + ] + """ + This controls the proration adjustment for the partial servicing period. + """ + + +class IntentCreateParamsActionDeactivateEffectiveAt(TypedDict): + timestamp: NotRequired[str] + """ + The timestamp at which the deactivate action will take effect. Only present if type is timestamp. + """ + type: Literal[ + "current_billing_period_end", + "current_billing_period_start", + "on_reserve", + "timestamp", + ] + """ + When the deactivate action will take effect. + """ + + +class IntentCreateParamsActionDeactivatePricingPlanSubscriptionDetails( + TypedDict, +): + pricing_plan_subscription: str + """ + ID of the pricing plan subscription to deactivate. + """ + + +class IntentCreateParamsActionModify(TypedDict): + billing_details: NotRequired[ + "IntentCreateParamsActionModifyBillingDetails" + ] + """ + Configuration for the billing details. + """ + effective_at: NotRequired["IntentCreateParamsActionModifyEffectiveAt"] + """ + When the modify action will take effect. If not specified, the default behavior is on_reserve. + """ + pricing_plan_subscription_details: ( + "IntentCreateParamsActionModifyPricingPlanSubscriptionDetails" + ) + """ + Details for modifying a pricing plan subscription. + """ + type: Literal[ + "pricing_plan_subscription_details", "v1_subscription_details" + ] + """ + Type of the action details. + """ + + +class IntentCreateParamsActionModifyBillingDetails(TypedDict): + proration_behavior: NotRequired[ + Literal["no_adjustment", "prorated_adjustment"] + ] + """ + This controls the proration adjustment for the partial servicing period. + """ + + +class IntentCreateParamsActionModifyEffectiveAt(TypedDict): + timestamp: NotRequired[str] + """ + The timestamp at which the modify action will take effect. Only present if type is timestamp. + """ + type: Literal["current_billing_period_start", "on_reserve", "timestamp"] + """ + When the modify action will take effect. + """ + + +class IntentCreateParamsActionModifyPricingPlanSubscriptionDetails(TypedDict): + component_configurations: NotRequired[ + List[ + "IntentCreateParamsActionModifyPricingPlanSubscriptionDetailsComponentConfiguration" + ] + ] + """ + New configurations for the components of the pricing plan. + """ + new_pricing_plan: NotRequired[str] + """ + The ID of the new Pricing Plan, if changing plans. + """ + new_pricing_plan_version: NotRequired[str] + """ + The ID of the new Pricing Plan Version to use. + """ + pricing_plan_subscription: str + """ + The ID of the Pricing Plan Subscription to modify. + """ + + +class IntentCreateParamsActionModifyPricingPlanSubscriptionDetailsComponentConfiguration( + TypedDict, +): + quantity: NotRequired[int] + """ + Quantity of the component to be used. + """ + lookup_key: NotRequired[str] + """ + Lookup key for the pricing plan component. + """ + pricing_plan_component: NotRequired[str] + """ + ID of the pricing plan component. + """ + + +class IntentCreateParamsActionRemove(TypedDict): + type: Literal["invoice_discount_rule"] + """ + Type of the remove action. + """ + invoice_discount_rule: NotRequired[str] + """ + The ID of the discount rule to remove for future invoices. + """ + + +class IntentCreateParamsActionSubscribe(TypedDict): + billing_details: NotRequired[ + "IntentCreateParamsActionSubscribeBillingDetails" + ] + """ + Configuration for the billing details. If not specified, see the default behavior for individual attributes. + """ + effective_at: NotRequired["IntentCreateParamsActionSubscribeEffectiveAt"] + """ + When the subscribe action will take effect. If not specified, the default behavior is on_reserve. + """ + type: Literal[ + "pricing_plan_subscription_details", "v1_subscription_details" + ] + """ + Type of the action details. + """ + pricing_plan_subscription_details: NotRequired[ + "IntentCreateParamsActionSubscribePricingPlanSubscriptionDetails" + ] + """ + Details for subscribing to a pricing plan. + """ + v1_subscription_details: NotRequired[ + "IntentCreateParamsActionSubscribeV1SubscriptionDetails" + ] + """ + Details for subscribing to a v1 subscription. + """ + + +class IntentCreateParamsActionSubscribeBillingDetails(TypedDict): + proration_behavior: NotRequired[ + Literal["no_adjustment", "prorated_adjustment"] + ] + """ + This controls the proration adjustment for the partial servicing period. + """ + + +class IntentCreateParamsActionSubscribeEffectiveAt(TypedDict): + timestamp: NotRequired[str] + """ + The timestamp at which the subscribe action will take effect. Only present if type is timestamp. + """ + type: Literal["current_billing_period_start", "on_reserve", "timestamp"] + """ + When the subscribe action will take effect. + """ + + +class IntentCreateParamsActionSubscribePricingPlanSubscriptionDetails( + TypedDict, +): + component_configurations: NotRequired[ + List[ + "IntentCreateParamsActionSubscribePricingPlanSubscriptionDetailsComponentConfiguration" + ] + ] + """ + Configurations for the components of the pricing plan. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://docs.stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + """ + pricing_plan: str + """ + ID of the Pricing Plan to subscribe to. + """ + pricing_plan_version: str + """ + Version of the Pricing Plan to use. + """ + + +class IntentCreateParamsActionSubscribePricingPlanSubscriptionDetailsComponentConfiguration( + TypedDict, +): + quantity: NotRequired[int] + """ + Quantity of the component to be used. + """ + lookup_key: NotRequired[str] + """ + Lookup key for the pricing plan component. + """ + pricing_plan_component: NotRequired[str] + """ + ID of the pricing plan component. + """ + + +class IntentCreateParamsActionSubscribeV1SubscriptionDetails(TypedDict): + description: NotRequired[str] + """ + The subscription's description, meant to be displayable to the customer. + Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. + """ + items: List["IntentCreateParamsActionSubscribeV1SubscriptionDetailsItem"] + """ + A list of up to 20 subscription items, each with an attached price. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + """ + + +class IntentCreateParamsActionSubscribeV1SubscriptionDetailsItem(TypedDict): + metadata: NotRequired[Dict[str, str]] + """ + Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + """ + price: str + """ + The ID of the price object. + """ + quantity: NotRequired[int] + """ + Quantity for this item. If not provided, will default to 1. + """ diff --git a/stripe/params/v2/billing/_intent_list_params.py b/stripe/params/v2/billing/_intent_list_params.py new file mode 100644 index 000000000..ea1703f10 --- /dev/null +++ b/stripe/params/v2/billing/_intent_list_params.py @@ -0,0 +1,10 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import NotRequired, TypedDict + + +class IntentListParams(TypedDict): + limit: NotRequired[int] + """ + Optionally set the maximum number of results per page. Defaults to 10. + """ diff --git a/stripe/params/v2/billing/_intent_release_reservation_params.py b/stripe/params/v2/billing/_intent_release_reservation_params.py new file mode 100644 index 000000000..de10626ae --- /dev/null +++ b/stripe/params/v2/billing/_intent_release_reservation_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class IntentReleaseReservationParams(TypedDict): + pass diff --git a/stripe/params/v2/billing/_intent_reserve_params.py b/stripe/params/v2/billing/_intent_reserve_params.py new file mode 100644 index 000000000..f7f6f5f24 --- /dev/null +++ b/stripe/params/v2/billing/_intent_reserve_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class IntentReserveParams(TypedDict): + pass diff --git a/stripe/params/v2/billing/_intent_retrieve_params.py b/stripe/params/v2/billing/_intent_retrieve_params.py new file mode 100644 index 000000000..a1730e72c --- /dev/null +++ b/stripe/params/v2/billing/_intent_retrieve_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class IntentRetrieveParams(TypedDict): + pass diff --git a/stripe/params/v2/billing/_license_fee_create_params.py b/stripe/params/v2/billing/_license_fee_create_params.py new file mode 100644 index 000000000..fd06d8feb --- /dev/null +++ b/stripe/params/v2/billing/_license_fee_create_params.py @@ -0,0 +1,96 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class LicenseFeeCreateParams(TypedDict): + currency: str + """ + Three-letter ISO currency code, in lowercase. Must be a supported currency. + """ + display_name: str + """ + A customer-facing name for the License Fee. + This name is used in Stripe-hosted products like the Customer Portal and Checkout. It does not show up on Invoices. + Maximum length of 250 characters. + """ + licensed_item: str + """ + The Licensed Item that this License Fee binds to. + """ + lookup_key: NotRequired[str] + """ + An internal key you can use to search for a particular license fee. Maximum length of 200 characters. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://docs.stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + """ + service_interval: Literal["day", "month", "week", "year"] + """ + The interval for assessing service. For example, a monthly license fee with a rate of $1 for the first 10 "workloads" + and $2 thereafter means "$1 per workload up to 10 workloads during a month of service." This is similar to but + distinct from billing interval; the service interval deals with the rate at which the customer accumulates fees, + while the billing interval in Cadence deals with the rate the customer is billed. + """ + service_interval_count: int + """ + The length of the interval for assessing service. For example, set this to 3 and `service_interval` to `"month"` in + order to specify quarterly service. + """ + tax_behavior: Literal["exclusive", "inclusive"] + """ + The Stripe Tax tax behavior - whether the license fee is inclusive or exclusive of tax. + """ + tiering_mode: NotRequired[Literal["graduated", "volume"]] + """ + Defines whether the tiered price should be graduated or volume-based. In volume-based tiering, the maximum + quantity within a period determines the per-unit price. In graduated tiering, the pricing changes as the quantity + grows into new tiers. Can only be set if `tiers` is set. + """ + tiers: NotRequired[List["LicenseFeeCreateParamsTier"]] + """ + Each element represents a pricing tier. Cannot be set if `unit_amount` is provided. + """ + transform_quantity: NotRequired["LicenseFeeCreateParamsTransformQuantity"] + """ + Apply a transformation to the reported usage or set quantity before computing the amount billed. + """ + unit_amount: NotRequired[str] + """ + The per-unit amount to be charged, represented as a decimal string in minor currency units with at most 12 decimal + places. Cannot be set if `tiers` is provided. + """ + + +class LicenseFeeCreateParamsTier(TypedDict): + flat_amount: NotRequired[str] + """ + Price for the entire tier, represented as a decimal string in minor currency units with at most 12 decimal places. + """ + unit_amount: NotRequired[str] + """ + Per-unit price for units included in this tier, represented as a decimal string in minor currency units with at + most 12 decimal places. + """ + up_to_decimal: NotRequired[str] + """ + Up to and including this quantity will be contained in the tier. Only one of `up_to_decimal` and `up_to_inf` may + be set. + """ + up_to_inf: NotRequired[Literal["inf"]] + """ + No upper bound to this tier. Only one of `up_to_decimal` and `up_to_inf` may be set. + """ + + +class LicenseFeeCreateParamsTransformQuantity(TypedDict): + divide_by: int + """ + Divide usage by this number. + """ + round: Literal["down", "up"] + """ + After division, round the result up or down. + """ diff --git a/stripe/params/v2/billing/_license_fee_list_params.py b/stripe/params/v2/billing/_license_fee_list_params.py new file mode 100644 index 000000000..7041959e2 --- /dev/null +++ b/stripe/params/v2/billing/_license_fee_list_params.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import NotRequired, TypedDict + + +class LicenseFeeListParams(TypedDict): + licensed_item: NotRequired[str] + """ + Filter by licensed item. + """ + limit: NotRequired[int] + """ + Optionally set the maximum number of results per page. Defaults to 20. + """ + lookup_keys: List[str] + """ + Filter by lookup keys. + You can specify up to 10 lookup keys. + """ diff --git a/stripe/params/v2/billing/_license_fee_retrieve_params.py b/stripe/params/v2/billing/_license_fee_retrieve_params.py new file mode 100644 index 000000000..e851fe619 --- /dev/null +++ b/stripe/params/v2/billing/_license_fee_retrieve_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class LicenseFeeRetrieveParams(TypedDict): + pass diff --git a/stripe/params/v2/billing/_license_fee_subscription_retrieve_params.py b/stripe/params/v2/billing/_license_fee_subscription_retrieve_params.py new file mode 100644 index 000000000..b80857680 --- /dev/null +++ b/stripe/params/v2/billing/_license_fee_subscription_retrieve_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class LicenseFeeSubscriptionRetrieveParams(TypedDict): + pass diff --git a/stripe/params/v2/billing/_license_fee_update_params.py b/stripe/params/v2/billing/_license_fee_update_params.py new file mode 100644 index 000000000..c374536da --- /dev/null +++ b/stripe/params/v2/billing/_license_fee_update_params.py @@ -0,0 +1,77 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import Dict, List, Optional +from typing_extensions import Literal, NotRequired, TypedDict + + +class LicenseFeeUpdateParams(TypedDict): + display_name: NotRequired[str] + """ + A customer-facing name for the License Fee. + This name is used in Stripe-hosted products like the Customer Portal and Checkout. It does not show up on Invoices. + Maximum length of 250 characters. + """ + live_version: NotRequired[str] + """ + Changes the version that new license fee will use. Providing `live_version = "latest"` will set the + license fee's `live_version` to its latest version. + """ + lookup_key: NotRequired[str] + """ + An internal key you can use to search for a particular license fee. Maximum length of 200 characters. + """ + metadata: NotRequired[Dict[str, Optional[str]]] + """ + Set of [key-value pairs](https://docs.stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + """ + tiering_mode: NotRequired[Literal["graduated", "volume"]] + """ + Defines whether the tiered price should be graduated or volume-based. In volume-based tiering, the maximum + quantity within a period determines the per-unit price. In graduated tiering, the pricing changes as the quantity + grows into new tiers. Can only be set if `tiers` is set. + """ + tiers: NotRequired[List["LicenseFeeUpdateParamsTier"]] + """ + Each element represents a pricing tier. Cannot be set if `unit_amount` is provided. + """ + transform_quantity: NotRequired["LicenseFeeUpdateParamsTransformQuantity"] + """ + Apply a transformation to the reported usage or set quantity before computing the amount billed. + """ + unit_amount: NotRequired[str] + """ + The per-unit amount to be charged, represented as a decimal string in minor currency units with at most 12 decimal + places. Cannot be set if `tiers` is provided. + """ + + +class LicenseFeeUpdateParamsTier(TypedDict): + flat_amount: NotRequired[str] + """ + Price for the entire tier, represented as a decimal string in minor currency units with at most 12 decimal places. + """ + unit_amount: NotRequired[str] + """ + Per-unit price for units included in this tier, represented as a decimal string in minor currency units with at + most 12 decimal places. + """ + up_to_decimal: NotRequired[str] + """ + Up to and including this quantity will be contained in the tier. Only one of `up_to_decimal` and `up_to_inf` may + be set. + """ + up_to_inf: NotRequired[Literal["inf"]] + """ + No upper bound to this tier. Only one of `up_to_decimal` and `up_to_inf` may be set. + """ + + +class LicenseFeeUpdateParamsTransformQuantity(TypedDict): + divide_by: int + """ + Divide usage by this number. + """ + round: Literal["down", "up"] + """ + After division, round the result up or down. + """ diff --git a/stripe/params/v2/billing/_licensed_item_create_params.py b/stripe/params/v2/billing/_licensed_item_create_params.py new file mode 100644 index 000000000..80307e900 --- /dev/null +++ b/stripe/params/v2/billing/_licensed_item_create_params.py @@ -0,0 +1,39 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import Dict +from typing_extensions import NotRequired, TypedDict + + +class LicensedItemCreateParams(TypedDict): + display_name: str + """ + Description that customers will see in the invoice line item. + Maximum length of 250 characters. + """ + lookup_key: NotRequired[str] + """ + An internal key you can use to search for a particular billable item. + Must be unique among billable items. + Maximum length of 200 characters. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://docs.stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + """ + tax_details: NotRequired["LicensedItemCreateParamsTaxDetails"] + """ + Stripe Tax details. + """ + unit_label: NotRequired[str] + """ + The unit to use when displaying prices for this billable item in places like Checkout. For example, set this field + to "seat" for Checkout to display "(price) per seat", or "environment" to display "(price) per environment". + Maximum length of 100 characters. + """ + + +class LicensedItemCreateParamsTaxDetails(TypedDict): + tax_code: str + """ + Product tax code (PTC). + """ diff --git a/stripe/params/v2/billing/_licensed_item_list_params.py b/stripe/params/v2/billing/_licensed_item_list_params.py new file mode 100644 index 000000000..29a29ca3c --- /dev/null +++ b/stripe/params/v2/billing/_licensed_item_list_params.py @@ -0,0 +1,16 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import NotRequired, TypedDict + + +class LicensedItemListParams(TypedDict): + limit: NotRequired[int] + """ + Optionally set the maximum number of results per page. Defaults to 20. + """ + lookup_keys: NotRequired[List[str]] + """ + Filter by lookup keys. + You can specify up to 10 lookup keys. + """ diff --git a/stripe/params/v2/billing/_licensed_item_retrieve_params.py b/stripe/params/v2/billing/_licensed_item_retrieve_params.py new file mode 100644 index 000000000..85baca86f --- /dev/null +++ b/stripe/params/v2/billing/_licensed_item_retrieve_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class LicensedItemRetrieveParams(TypedDict): + pass diff --git a/stripe/params/v2/billing/_licensed_item_update_params.py b/stripe/params/v2/billing/_licensed_item_update_params.py new file mode 100644 index 000000000..ea3a5d17a --- /dev/null +++ b/stripe/params/v2/billing/_licensed_item_update_params.py @@ -0,0 +1,39 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import Dict, Optional +from typing_extensions import NotRequired, TypedDict + + +class LicensedItemUpdateParams(TypedDict): + display_name: NotRequired[str] + """ + Description that customers will see in the invoice line item. + Maximum length of 250 characters. + """ + lookup_key: NotRequired[str] + """ + An internal key you can use to search for a particular billable item. + Maximum length of 200 characters. + To remove the lookup_key from the object, set it to null in the request. + """ + metadata: NotRequired[Dict[str, Optional[str]]] + """ + Set of [key-value pairs](https://docs.stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + """ + tax_details: NotRequired["LicensedItemUpdateParamsTaxDetails"] + """ + Stripe Tax details. + """ + unit_label: NotRequired[str] + """ + The unit to use when displaying prices for this billable item in places like Checkout. For example, set this field + to "seat" for Checkout to display "(price) per seat", or "environment" to display "(price) per environment". + Maximum length of 100 characters. + """ + + +class LicensedItemUpdateParamsTaxDetails(TypedDict): + tax_code: str + """ + Product tax code (PTC). + """ diff --git a/stripe/params/v2/billing/_meter_event_adjustment_create_params.py b/stripe/params/v2/billing/_meter_event_adjustment_create_params.py new file mode 100644 index 000000000..ee1dd55e6 --- /dev/null +++ b/stripe/params/v2/billing/_meter_event_adjustment_create_params.py @@ -0,0 +1,25 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import Literal, TypedDict + + +class MeterEventAdjustmentCreateParams(TypedDict): + cancel: "MeterEventAdjustmentCreateParamsCancel" + """ + Specifies which event to cancel. + """ + event_name: str + """ + The name of the meter event. Corresponds with the `event_name` field on a meter. + """ + type: Literal["cancel"] + """ + Specifies whether to cancel a single event or a range of events for a time period. Time period cancellation is not supported yet. + """ + + +class MeterEventAdjustmentCreateParamsCancel(TypedDict): + identifier: str + """ + Unique identifier for the event. You can only cancel events within 24 hours of Stripe receiving them. + """ diff --git a/stripe/params/v2/billing/_meter_event_create_params.py b/stripe/params/v2/billing/_meter_event_create_params.py new file mode 100644 index 000000000..1084d505d --- /dev/null +++ b/stripe/params/v2/billing/_meter_event_create_params.py @@ -0,0 +1,30 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import Dict +from typing_extensions import NotRequired, TypedDict + + +class MeterEventCreateParams(TypedDict): + event_name: str + """ + The name of the meter event. Corresponds with the `event_name` field on a meter. + """ + identifier: NotRequired[str] + """ + A unique identifier for the event. If not provided, one will be generated. + We recommend using a globally unique identifier for this. We'll enforce + uniqueness within a rolling 24 hour period. + """ + payload: Dict[str, str] + """ + The payload of the event. This must contain the fields corresponding to a meter's + `customer_mapping.event_payload_key` (default is `stripe_customer_id`) and + `value_settings.event_payload_key` (default is `value`). Read more about + the + [payload](https://docs.stripe.com/billing/subscriptions/usage-based/recording-usage#payload-key-overrides). + """ + timestamp: NotRequired[str] + """ + The time of the event. Must be within the past 35 calendar days or up to + 5 minutes in the future. Defaults to current timestamp if not specified. + """ diff --git a/stripe/params/v2/billing/_meter_event_session_create_params.py b/stripe/params/v2/billing/_meter_event_session_create_params.py new file mode 100644 index 000000000..24bc63e9c --- /dev/null +++ b/stripe/params/v2/billing/_meter_event_session_create_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class MeterEventSessionCreateParams(TypedDict): + pass diff --git a/stripe/params/v2/billing/_meter_event_stream_create_params.py b/stripe/params/v2/billing/_meter_event_stream_create_params.py new file mode 100644 index 000000000..6fbba915d --- /dev/null +++ b/stripe/params/v2/billing/_meter_event_stream_create_params.py @@ -0,0 +1,37 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import Dict, List +from typing_extensions import NotRequired, TypedDict + + +class MeterEventStreamCreateParams(TypedDict): + events: List["MeterEventStreamCreateParamsEvent"] + """ + List of meter events to include in the request. Supports up to 100 events per request. + """ + + +class MeterEventStreamCreateParamsEvent(TypedDict): + event_name: str + """ + The name of the meter event. Corresponds with the `event_name` field on a meter. + """ + identifier: NotRequired[str] + """ + A unique identifier for the event. If not provided, one will be generated. + We recommend using a globally unique identifier for this. We'll enforce + uniqueness within a rolling 24 hour period. + """ + payload: Dict[str, str] + """ + The payload of the event. This must contain the fields corresponding to a meter's + `customer_mapping.event_payload_key` (default is `stripe_customer_id`) and + `value_settings.event_payload_key` (default is `value`). Read more about + the + [payload](https://docs.stripe.com/billing/subscriptions/usage-based/recording-usage#payload-key-overrides). + """ + timestamp: NotRequired[str] + """ + The time of the event. Must be within the past 35 calendar days or up to + 5 minutes in the future. Defaults to current timestamp if not specified. + """ diff --git a/stripe/params/v2/billing/_metered_item_create_params.py b/stripe/params/v2/billing/_metered_item_create_params.py new file mode 100644 index 000000000..91b819d27 --- /dev/null +++ b/stripe/params/v2/billing/_metered_item_create_params.py @@ -0,0 +1,65 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import Dict, List +from typing_extensions import NotRequired, TypedDict + + +class MeteredItemCreateParams(TypedDict): + display_name: str + """ + Description that customers will see in the invoice line item. + Maximum length of 250 characters. + """ + invoice_presentation_dimensions: NotRequired[List[str]] + """ + Optional array of Meter dimensions to group event dimension keys for invoice line items. + """ + lookup_key: NotRequired[str] + """ + An internal key you can use to search for a particular billable item. + Must be unique among billable items. + Maximum length of 200 characters. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://docs.stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + """ + meter: str + """ + ID of the Meter that measures usage for this Metered Item. + """ + meter_segment_conditions: NotRequired[ + List["MeteredItemCreateParamsMeterSegmentCondition"] + ] + """ + Optional array of Meter segments to filter event dimension keys for billing. + """ + tax_details: NotRequired["MeteredItemCreateParamsTaxDetails"] + """ + Stripe Tax details. + """ + unit_label: NotRequired[str] + """ + The unit to use when displaying prices for this billable item in places like Checkout. For example, set this field + to "CPU-hour" for Checkout to display "(price) per CPU-hour", or "1 million events" to display "(price) per 1 + million events". + Maximum length of 100 characters. + """ + + +class MeteredItemCreateParamsMeterSegmentCondition(TypedDict): + dimension: str + """ + A Meter dimension. + """ + value: str + """ + To count usage towards this metered item, the dimension must have this value. + """ + + +class MeteredItemCreateParamsTaxDetails(TypedDict): + tax_code: str + """ + Product tax code (PTC). + """ diff --git a/stripe/params/v2/billing/_metered_item_list_params.py b/stripe/params/v2/billing/_metered_item_list_params.py new file mode 100644 index 000000000..4bd9d665b --- /dev/null +++ b/stripe/params/v2/billing/_metered_item_list_params.py @@ -0,0 +1,16 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import NotRequired, TypedDict + + +class MeteredItemListParams(TypedDict): + limit: NotRequired[int] + """ + Optionally set the maximum number of results per page. Defaults to 20. + """ + lookup_keys: NotRequired[List[str]] + """ + Filter by lookup keys. + You can specify up to 10 lookup keys. + """ diff --git a/stripe/params/v2/billing/_metered_item_retrieve_params.py b/stripe/params/v2/billing/_metered_item_retrieve_params.py new file mode 100644 index 000000000..2d39252d1 --- /dev/null +++ b/stripe/params/v2/billing/_metered_item_retrieve_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class MeteredItemRetrieveParams(TypedDict): + pass diff --git a/stripe/params/v2/billing/_metered_item_update_params.py b/stripe/params/v2/billing/_metered_item_update_params.py new file mode 100644 index 000000000..862d5ab4d --- /dev/null +++ b/stripe/params/v2/billing/_metered_item_update_params.py @@ -0,0 +1,41 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import Dict, Optional +from typing_extensions import NotRequired, TypedDict + + +class MeteredItemUpdateParams(TypedDict): + display_name: NotRequired[str] + """ + Description that customers will see in the invoice line item. + Maximum length of 250 characters. + """ + lookup_key: NotRequired[str] + """ + An internal key you can use to search for a particular billable item. + Maximum length of 200 characters. + To remove the lookup_key from the object, set it to null in the request. + """ + metadata: NotRequired[Dict[str, Optional[str]]] + """ + Set of [key-value pairs](https://docs.stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + """ + tax_details: NotRequired["MeteredItemUpdateParamsTaxDetails"] + """ + Stripe Tax details. + """ + unit_label: NotRequired[str] + """ + The unit to use when displaying prices for this billable item in places like Checkout. For example, set this field + to "CPU-hour" for Checkout to display "(price) per CPU-hour", or "1 million events" to display "(price) per 1 + million events". + Maximum length of 100 characters. + To remove the unit_label from the object, set it to null in the request. + """ + + +class MeteredItemUpdateParamsTaxDetails(TypedDict): + tax_code: str + """ + Product tax code (PTC). + """ diff --git a/stripe/params/v2/billing/_pricing_plan_create_params.py b/stripe/params/v2/billing/_pricing_plan_create_params.py new file mode 100644 index 000000000..cd07bbc76 --- /dev/null +++ b/stripe/params/v2/billing/_pricing_plan_create_params.py @@ -0,0 +1,31 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import Dict +from typing_extensions import Literal, NotRequired, TypedDict + + +class PricingPlanCreateParams(TypedDict): + currency: str + """ + The currency of the PricingPlan. + """ + description: NotRequired[str] + """ + Description of pricing plan subscription. + """ + display_name: str + """ + Display name of the PricingPlan. Maximum 250 characters. + """ + lookup_key: NotRequired[str] + """ + An internal key you can use to search for a particular PricingPlan. Maximum length of 200 characters. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://docs.stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + """ + tax_behavior: Literal["exclusive", "inclusive"] + """ + The Stripe Tax tax behavior - whether the PricingPlan is inclusive or exclusive of tax. + """ diff --git a/stripe/params/v2/billing/_pricing_plan_list_params.py b/stripe/params/v2/billing/_pricing_plan_list_params.py new file mode 100644 index 000000000..be924e642 --- /dev/null +++ b/stripe/params/v2/billing/_pricing_plan_list_params.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import NotRequired, TypedDict + + +class PricingPlanListParams(TypedDict): + active: NotRequired[bool] + """ + Filter for active/inactive PricingPlans. Mutually exclusive with `lookup_keys`. + """ + limit: NotRequired[int] + """ + Optionally set the maximum number of results per page. Defaults to 20. + """ + lookup_keys: NotRequired[List[str]] + """ + Filter by lookup keys. Mutually exclusive with `active`. + You can specify up to 10 lookup keys. + """ diff --git a/stripe/params/v2/billing/_pricing_plan_retrieve_params.py b/stripe/params/v2/billing/_pricing_plan_retrieve_params.py new file mode 100644 index 000000000..a18c23e49 --- /dev/null +++ b/stripe/params/v2/billing/_pricing_plan_retrieve_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class PricingPlanRetrieveParams(TypedDict): + pass diff --git a/stripe/params/v2/billing/_pricing_plan_subscription_list_params.py b/stripe/params/v2/billing/_pricing_plan_subscription_list_params.py new file mode 100644 index 000000000..efe0ee391 --- /dev/null +++ b/stripe/params/v2/billing/_pricing_plan_subscription_list_params.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import Literal, NotRequired, TypedDict + + +class PricingPlanSubscriptionListParams(TypedDict): + billing_cadence: NotRequired[str] + """ + Filter by Billing Cadence ID. Mutually exclusive with `payer`, `pricing_plan`, and `pricing_plan_version`. + """ + limit: NotRequired[int] + """ + Optionally set the maximum number of results per page. Defaults to 20. + """ + payer: NotRequired["PricingPlanSubscriptionListParamsPayer"] + """ + Filter by payer. Mutually exclusive with `billing_cadence`, `pricing_plan`, and `pricing_plan_version`. + """ + pricing_plan: NotRequired[str] + """ + Filter by PricingPlan ID. Mutually exlcusive with `billing_cadence`, `payer`, and `pricing_plan_version`. + """ + pricing_plan_version: NotRequired[str] + """ + Filter by Pricing Plan Version ID. Mutually exlcusive with `billing_cadence`, `payer`, and `pricing_plan`. + """ + servicing_status: NotRequired[ + Literal["active", "canceled", "paused", "pending"] + ] + """ + Filter by servicing status. + """ + + +class PricingPlanSubscriptionListParamsPayer(TypedDict): + customer: NotRequired[str] + """ + The ID of the Customer object. If provided, only Pricing Plan Subscriptions that are subscribed on the cadences with the specified payer will be returned. + """ + type: Literal["customer"] + """ + A string identifying the type of the payer. Currently the only supported value is `customer`. + """ diff --git a/stripe/params/v2/billing/_pricing_plan_subscription_retrieve_params.py b/stripe/params/v2/billing/_pricing_plan_subscription_retrieve_params.py new file mode 100644 index 000000000..a72b497be --- /dev/null +++ b/stripe/params/v2/billing/_pricing_plan_subscription_retrieve_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class PricingPlanSubscriptionRetrieveParams(TypedDict): + pass diff --git a/stripe/params/v2/billing/_pricing_plan_subscription_update_params.py b/stripe/params/v2/billing/_pricing_plan_subscription_update_params.py new file mode 100644 index 000000000..007c88657 --- /dev/null +++ b/stripe/params/v2/billing/_pricing_plan_subscription_update_params.py @@ -0,0 +1,15 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import Dict, Optional +from typing_extensions import NotRequired, TypedDict + + +class PricingPlanSubscriptionUpdateParams(TypedDict): + clear_cancel_at: NotRequired[bool] + """ + When set to true, the `servicing_status_transition.will_cancel_at` field will be cleared. + """ + metadata: NotRequired[Dict[str, Optional[str]]] + """ + Set of [key-value pairs](https://docs.stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + """ diff --git a/stripe/params/v2/billing/_pricing_plan_update_params.py b/stripe/params/v2/billing/_pricing_plan_update_params.py new file mode 100644 index 000000000..11a7fd6b3 --- /dev/null +++ b/stripe/params/v2/billing/_pricing_plan_update_params.py @@ -0,0 +1,31 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import Dict, Optional +from typing_extensions import NotRequired, TypedDict + + +class PricingPlanUpdateParams(TypedDict): + active: NotRequired[bool] + """ + Whether the PricingPlan is active. + """ + description: NotRequired[str] + """ + Description of pricing plan subscription. + """ + display_name: NotRequired[str] + """ + Display name of the PricingPlan. Maximum 250 characters. + """ + live_version: NotRequired[str] + """ + The ID of the live version of the PricingPlan. + """ + lookup_key: NotRequired[str] + """ + An internal key you can use to search for a particular PricingPlan. Maximum length of 200 characters. + """ + metadata: NotRequired[Dict[str, Optional[str]]] + """ + Set of key-value pairs that you can attach to an object. + """ diff --git a/stripe/params/v2/billing/_profile_create_params.py b/stripe/params/v2/billing/_profile_create_params.py new file mode 100644 index 000000000..a84b4f981 --- /dev/null +++ b/stripe/params/v2/billing/_profile_create_params.py @@ -0,0 +1,29 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import Dict +from typing_extensions import NotRequired, TypedDict + + +class ProfileCreateParams(TypedDict): + customer: str + """ + The ID of the customer object. + """ + default_payment_method: NotRequired[str] + """ + The ID of the payment method object. + """ + display_name: NotRequired[str] + """ + A customer-facing name for the billing profile. + Maximum length of 250 characters. + """ + lookup_key: NotRequired[str] + """ + An internal key you can use to search for a particular billing profile. It must be unique among billing profiles for a given customer. + Maximum length of 200 characters. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + """ diff --git a/stripe/params/v2/billing/_profile_list_params.py b/stripe/params/v2/billing/_profile_list_params.py new file mode 100644 index 000000000..56d9c6222 --- /dev/null +++ b/stripe/params/v2/billing/_profile_list_params.py @@ -0,0 +1,32 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import Literal, NotRequired, TypedDict + + +class ProfileListParams(TypedDict): + customer: NotRequired[str] + """ + Filter billing profiles by a customer. Mutually exclusive + with `lookup_keys` and `default_payment_method`. + """ + default_payment_method: NotRequired[str] + """ + Filter billing profiles by a default payment method. Mutually exclusive + with `customer` and `lookup_keys`. + """ + limit: NotRequired[int] + """ + Optionally set the maximum number of results per page. Defaults to 10. + """ + lookup_keys: List[str] + """ + Filter billing profiles by lookup keys. Mutually exclusive + with `customer` and `default_payment_method`. + You can specify up to 10 lookup_keys. + """ + status: NotRequired[Literal["active", "inactive"]] + """ + Filter billing profiles by status. Can be combined + with all other filters. If not provided, all billing profiles will be returned. + """ diff --git a/stripe/params/v2/billing/_profile_retrieve_params.py b/stripe/params/v2/billing/_profile_retrieve_params.py new file mode 100644 index 000000000..2ad1762da --- /dev/null +++ b/stripe/params/v2/billing/_profile_retrieve_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class ProfileRetrieveParams(TypedDict): + pass diff --git a/stripe/params/v2/billing/_profile_update_params.py b/stripe/params/v2/billing/_profile_update_params.py new file mode 100644 index 000000000..78be3cc81 --- /dev/null +++ b/stripe/params/v2/billing/_profile_update_params.py @@ -0,0 +1,27 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import Dict, Optional +from typing_extensions import NotRequired, TypedDict + + +class ProfileUpdateParams(TypedDict): + default_payment_method: NotRequired[str] + """ + The ID of the payment method object. + """ + display_name: NotRequired[str] + """ + A customer-facing name for the billing profile. + Maximum length of 250 characters. + To remove the display_name from the object, set it to null in the request. + """ + lookup_key: NotRequired[str] + """ + An internal key you can use to search for a particular billing profile. It must be unique among billing profiles for a given customer. + Maximum length of 200 characters. + To remove the lookup_key from the object, set it to null in the request. + """ + metadata: NotRequired[Dict[str, Optional[str]]] + """ + Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + """ diff --git a/stripe/params/v2/billing/_rate_card_create_params.py b/stripe/params/v2/billing/_rate_card_create_params.py new file mode 100644 index 000000000..d8fc677dc --- /dev/null +++ b/stripe/params/v2/billing/_rate_card_create_params.py @@ -0,0 +1,41 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import Dict +from typing_extensions import Literal, NotRequired, TypedDict + + +class RateCardCreateParams(TypedDict): + currency: str + """ + The currency of this RateCard. + """ + display_name: str + """ + A customer-facing name for the RateCard. + This name is used in Stripe-hosted products like the Customer Portal and Checkout. It does not show up on Invoices. + Maximum length of 250 characters. + """ + lookup_key: NotRequired[str] + """ + An internal key you can use to search for a particular RateCard. Maximum length of 200 characters. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://docs.stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + """ + service_interval: Literal["day", "month", "week", "year"] + """ + The interval for assessing service. For example, a monthly RateCard with a rate of $1 for the first 10 "workloads" + and $2 thereafter means "$1 per workload up to 10 workloads during a month of service." This is similar to but + distinct from billing interval; the service interval deals with the rate at which the customer accumulates fees, + while the billing interval in Cadence deals with the rate the customer is billed. + """ + service_interval_count: int + """ + The length of the interval for assessing service. For example, set this to 3 and `service_interval` to `"month"` in + order to specify quarterly service. + """ + tax_behavior: Literal["exclusive", "inclusive"] + """ + The Stripe Tax tax behavior - whether the rates are inclusive or exclusive of tax. + """ diff --git a/stripe/params/v2/billing/_rate_card_list_params.py b/stripe/params/v2/billing/_rate_card_list_params.py new file mode 100644 index 000000000..d2f003f35 --- /dev/null +++ b/stripe/params/v2/billing/_rate_card_list_params.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import NotRequired, TypedDict + + +class RateCardListParams(TypedDict): + active: NotRequired[bool] + """ + Optionally filter to active/inactive RateCards. + """ + limit: NotRequired[int] + """ + Optionally set the maximum number of results per page. Defaults to 20. + """ + lookup_keys: NotRequired[List[str]] + """ + Filter by lookup keys. + You can specify up to 10 lookup keys. + """ diff --git a/stripe/params/v2/billing/_rate_card_retrieve_params.py b/stripe/params/v2/billing/_rate_card_retrieve_params.py new file mode 100644 index 000000000..35ad9dcb3 --- /dev/null +++ b/stripe/params/v2/billing/_rate_card_retrieve_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class RateCardRetrieveParams(TypedDict): + pass diff --git a/stripe/params/v2/billing/_rate_card_subscription_cancel_params.py b/stripe/params/v2/billing/_rate_card_subscription_cancel_params.py new file mode 100644 index 000000000..8ac44432e --- /dev/null +++ b/stripe/params/v2/billing/_rate_card_subscription_cancel_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class RateCardSubscriptionCancelParams(TypedDict): + pass diff --git a/stripe/params/v2/billing/_rate_card_subscription_create_params.py b/stripe/params/v2/billing/_rate_card_subscription_create_params.py new file mode 100644 index 000000000..9dc24a943 --- /dev/null +++ b/stripe/params/v2/billing/_rate_card_subscription_create_params.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import Dict +from typing_extensions import NotRequired, TypedDict + + +class RateCardSubscriptionCreateParams(TypedDict): + billing_cadence: str + """ + The ID of the Billing Cadence. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://docs.stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + """ + rate_card: str + """ + The ID of the Rate Card. + """ + rate_card_version: NotRequired[str] + """ + The ID of the Rate Card Version. If not specified, defaults to the "live_version" of the Rate Card at the time of creation. + """ diff --git a/stripe/params/v2/billing/_rate_card_subscription_list_params.py b/stripe/params/v2/billing/_rate_card_subscription_list_params.py new file mode 100644 index 000000000..5338d8f6f --- /dev/null +++ b/stripe/params/v2/billing/_rate_card_subscription_list_params.py @@ -0,0 +1,44 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import Literal, NotRequired, TypedDict + + +class RateCardSubscriptionListParams(TypedDict): + billing_cadence: NotRequired[str] + """ + Optionally filter by a BillingCadence. Mutually exclusive with `payers`, `rate_card`, and `rate_card_version`. + """ + limit: NotRequired[int] + """ + The page size limit, if not provided the default is 20. + """ + payer: NotRequired["RateCardSubscriptionListParamsPayer"] + """ + Optionally filter by the payer associated with Billing Cadences which the Rate Card Subscriptions are subscribed to. + Mutually exclusive with `billing_cadence`, `rate_card`, and `rate_card_version`. + """ + rate_card: NotRequired[str] + """ + Optionally filter by a RateCard. Mutually exclusive with `billing_cadence`, `payers`, and `rate_card_version`. + """ + rate_card_version: NotRequired[str] + """ + Optionally filter by a RateCard version. Mutually exclusive with `billing_cadence`, `payers`, and `rate_card`. + """ + servicing_status: NotRequired[ + Literal["active", "canceled", "paused", "pending"] + ] + """ + Optionally filter by servicing status. + """ + + +class RateCardSubscriptionListParamsPayer(TypedDict): + customer: NotRequired[str] + """ + The ID of the Customer object. If provided, only the Rate Card Subscriptions that are subscribed on the Billing Cadences with the specified payer will be returned. + """ + type: Literal["customer"] + """ + A string identifying the type of the payer. Currently the only supported value is `customer`. + """ diff --git a/stripe/params/v2/billing/_rate_card_subscription_retrieve_params.py b/stripe/params/v2/billing/_rate_card_subscription_retrieve_params.py new file mode 100644 index 000000000..a51e76457 --- /dev/null +++ b/stripe/params/v2/billing/_rate_card_subscription_retrieve_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class RateCardSubscriptionRetrieveParams(TypedDict): + pass diff --git a/stripe/params/v2/billing/_rate_card_subscription_update_params.py b/stripe/params/v2/billing/_rate_card_subscription_update_params.py new file mode 100644 index 000000000..a5d850211 --- /dev/null +++ b/stripe/params/v2/billing/_rate_card_subscription_update_params.py @@ -0,0 +1,11 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import Dict, Optional +from typing_extensions import NotRequired, TypedDict + + +class RateCardSubscriptionUpdateParams(TypedDict): + metadata: NotRequired[Dict[str, Optional[str]]] + """ + Set of [key-value pairs](https://docs.stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + """ diff --git a/stripe/params/v2/billing/_rate_card_update_params.py b/stripe/params/v2/billing/_rate_card_update_params.py new file mode 100644 index 000000000..6271562b2 --- /dev/null +++ b/stripe/params/v2/billing/_rate_card_update_params.py @@ -0,0 +1,30 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import Dict, Optional +from typing_extensions import NotRequired, TypedDict + + +class RateCardUpdateParams(TypedDict): + active: NotRequired[bool] + """ + Sets whether the RateCard is active. Inactive RateCards cannot be used in new activations or have new rates added. + """ + display_name: NotRequired[str] + """ + A customer-facing name for the RateCard. + This name is used in Stripe-hosted products like the Customer Portal and Checkout. It does not show up on Invoices. + Maximum length of 250 characters. + """ + live_version: NotRequired[str] + """ + Changes the version that new RateCard activations will use. Providing `live_version = "latest"` will set the + RateCard's `live_version` to its latest version. + """ + lookup_key: NotRequired[str] + """ + An internal key you can use to search for a particular RateCard. Maximum length of 200 characters. + """ + metadata: NotRequired[Dict[str, Optional[str]]] + """ + Set of [key-value pairs](https://docs.stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + """ diff --git a/stripe/params/v2/billing/_service_action_create_params.py b/stripe/params/v2/billing/_service_action_create_params.py new file mode 100644 index 000000000..8402775ae --- /dev/null +++ b/stripe/params/v2/billing/_service_action_create_params.py @@ -0,0 +1,264 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe.v2._amount import AmountParam +from typing import List +from typing_extensions import Literal, NotRequired, TypedDict + + +class ServiceActionCreateParams(TypedDict): + lookup_key: NotRequired[str] + """ + An internal key you can use to search for this service action. Maximum length of 200 characters. + """ + service_interval: Literal["day", "month", "week", "year"] + """ + The interval for assessing service. + """ + service_interval_count: int + """ + The length of the interval for assessing service. + """ + type: Literal["credit_grant", "credit_grant_per_tenant"] + """ + The type of the service action. + """ + credit_grant: NotRequired["ServiceActionCreateParamsCreditGrant"] + """ + Details for the credit grant. Required if `type` is `credit_grant`. + """ + credit_grant_per_tenant: NotRequired[ + "ServiceActionCreateParamsCreditGrantPerTenant" + ] + """ + Details for the credit grant per tenant. Required if `type` is `credit_grant_per_tenant`. + """ + + +class ServiceActionCreateParamsCreditGrant(TypedDict): + amount: "ServiceActionCreateParamsCreditGrantAmount" + """ + The amount of the credit grant. + """ + applicability_config: ( + "ServiceActionCreateParamsCreditGrantApplicabilityConfig" + ) + """ + Defines the scope where the credit grant is applicable. + """ + category: NotRequired[Literal["paid", "promotional"]] + """ + The category of the credit grant. + """ + expiry_config: "ServiceActionCreateParamsCreditGrantExpiryConfig" + """ + The expiry configuration for the credit grant. + """ + name: str + """ + A descriptive name shown in dashboard. + """ + priority: NotRequired[int] + """ + The desired priority for applying this credit grant. If not specified, it will be set to the default value of 50. The highest priority is 0 and the lowest is 100. + """ + + +class ServiceActionCreateParamsCreditGrantAmount(TypedDict): + type: Literal["custom_pricing_unit", "monetary"] + """ + The type of the credit grant amount. We currently support `monetary` and `custom_pricing_unit` billing credits. + """ + custom_pricing_unit: NotRequired[ + "ServiceActionCreateParamsCreditGrantAmountCustomPricingUnit" + ] + """ + The custom pricing unit amount of the credit grant. Required if `type` is `custom_pricing_unit`. + """ + monetary: NotRequired[AmountParam] + """ + The monetary amount of the credit grant. Required if `type` is `monetary`. + """ + + +class ServiceActionCreateParamsCreditGrantAmountCustomPricingUnit(TypedDict): + id: str + """ + The id of the custom pricing unit. + """ + value: str + """ + The value of the credit grant, decimal value represented as a string. + """ + + +class ServiceActionCreateParamsCreditGrantApplicabilityConfig(TypedDict): + scope: "ServiceActionCreateParamsCreditGrantApplicabilityConfigScope" + """ + The applicability scope of the credit grant. + """ + + +class ServiceActionCreateParamsCreditGrantApplicabilityConfigScope(TypedDict): + billable_items: NotRequired[List[str]] + """ + The billable items to apply the credit grant to. + """ + price_type: NotRequired[Literal["metered"]] + """ + The price type that credit grants can apply to. We currently only support the `metered` price type. This will apply to metered prices and rate cards. Cannot be used in combination with `billable_items`. + """ + + +class ServiceActionCreateParamsCreditGrantExpiryConfig(TypedDict): + type: Literal["end_of_service_period"] + """ + The type of the expiry configuration. We currently support `end_of_service_period`. + """ + + +class ServiceActionCreateParamsCreditGrantPerTenant(TypedDict): + amount: "ServiceActionCreateParamsCreditGrantPerTenantAmount" + """ + The amount of the credit grant. + """ + applicability_config: ( + "ServiceActionCreateParamsCreditGrantPerTenantApplicabilityConfig" + ) + """ + Defines the scope where the credit grant is applicable. + """ + category: NotRequired[Literal["paid", "promotional"]] + """ + The category of the credit grant. + """ + expiry_config: "ServiceActionCreateParamsCreditGrantPerTenantExpiryConfig" + """ + The expiry configuration for the credit grant. + """ + grant_condition: ( + "ServiceActionCreateParamsCreditGrantPerTenantGrantCondition" + ) + """ + The grant condition for the credit grant. + """ + name: str + """ + Customer-facing name for the credit grant. + """ + priority: NotRequired[int] + """ + The desired priority for applying this credit grant. If not specified, it will be set to the default value of 50. The highest priority is 0 and the lowest is 100. + """ + + +class ServiceActionCreateParamsCreditGrantPerTenantAmount(TypedDict): + type: Literal["custom_pricing_unit", "monetary"] + """ + The type of the credit grant amount. We currently support `monetary` and `custom_pricing_unit` billing credits. + """ + custom_pricing_unit: NotRequired[ + "ServiceActionCreateParamsCreditGrantPerTenantAmountCustomPricingUnit" + ] + """ + The custom pricing unit amount of the credit grant. Required if `type` is `custom_pricing_unit`. + """ + monetary: NotRequired[AmountParam] + """ + The monetary amount of the credit grant. Required if `type` is `monetary`. + """ + + +class ServiceActionCreateParamsCreditGrantPerTenantAmountCustomPricingUnit( + TypedDict, +): + id: str + """ + The id of the custom pricing unit. + """ + value: str + """ + The value of the credit grant, decimal value represented as a string. + """ + + +class ServiceActionCreateParamsCreditGrantPerTenantApplicabilityConfig( + TypedDict, +): + scope: ( + "ServiceActionCreateParamsCreditGrantPerTenantApplicabilityConfigScope" + ) + """ + The applicability scope of the credit grant. + """ + + +class ServiceActionCreateParamsCreditGrantPerTenantApplicabilityConfigScope( + TypedDict, +): + billable_items: NotRequired[List[str]] + """ + The billable items to apply the credit grant to. + """ + price_type: NotRequired[Literal["metered"]] + """ + The price type that credit grants can apply to. We currently only support the `metered` price type. This will apply to metered prices and rate cards. Cannot be used in combination with `billable_items`. + """ + + +class ServiceActionCreateParamsCreditGrantPerTenantExpiryConfig(TypedDict): + type: Literal["end_of_service_period"] + """ + The type of the expiry configuration. We currently support `end_of_service_period`. + """ + + +class ServiceActionCreateParamsCreditGrantPerTenantGrantCondition(TypedDict): + type: Literal["meter_event_first_per_period"] + """ + The type of the grant condition. We currently support `meter_event_first_per_period`. + """ + meter_event_first_per_period: NotRequired[ + "ServiceActionCreateParamsCreditGrantPerTenantGrantConditionMeterEventFirstPerPeriod" + ] + """ + The grant condition for the meter event first per period. + """ + + +class ServiceActionCreateParamsCreditGrantPerTenantGrantConditionMeterEventFirstPerPeriod( + TypedDict, +): + meter_segment_conditions: List[ + "ServiceActionCreateParamsCreditGrantPerTenantGrantConditionMeterEventFirstPerPeriodMeterSegmentCondition" + ] + """ + The meter segment conditions for the grant condition. + """ + + +class ServiceActionCreateParamsCreditGrantPerTenantGrantConditionMeterEventFirstPerPeriodMeterSegmentCondition( + TypedDict, +): + type: Literal["dimension"] + """ + The type of the meter segment condition. We currently support `dimension`. + """ + dimension: NotRequired[ + "ServiceActionCreateParamsCreditGrantPerTenantGrantConditionMeterEventFirstPerPeriodMeterSegmentConditionDimension" + ] + """ + Dimension-based meter segment condition. + """ + + +class ServiceActionCreateParamsCreditGrantPerTenantGrantConditionMeterEventFirstPerPeriodMeterSegmentConditionDimension( + TypedDict, +): + payload_key: str + """ + The payload key for the dimension. + """ + value: str + """ + The value for the dimension. + """ diff --git a/stripe/params/v2/billing/_service_action_retrieve_params.py b/stripe/params/v2/billing/_service_action_retrieve_params.py new file mode 100644 index 000000000..994894145 --- /dev/null +++ b/stripe/params/v2/billing/_service_action_retrieve_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class ServiceActionRetrieveParams(TypedDict): + pass diff --git a/stripe/params/v2/billing/_service_action_update_params.py b/stripe/params/v2/billing/_service_action_update_params.py new file mode 100644 index 000000000..76a2695b7 --- /dev/null +++ b/stripe/params/v2/billing/_service_action_update_params.py @@ -0,0 +1,34 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import NotRequired, TypedDict + + +class ServiceActionUpdateParams(TypedDict): + lookup_key: NotRequired[str] + """ + An internal key you can use to search for this service action. Maximum length of 200 characters. + """ + credit_grant: NotRequired["ServiceActionUpdateParamsCreditGrant"] + """ + Details for the credit grant. Can only be set if the service action's `type` is `credit_grant`. + """ + credit_grant_per_tenant: NotRequired[ + "ServiceActionUpdateParamsCreditGrantPerTenant" + ] + """ + Details for the credit grant per tenant. Can only be set if the service action's `type` is `credit_grant_per_tenant`. + """ + + +class ServiceActionUpdateParamsCreditGrant(TypedDict): + name: NotRequired[str] + """ + A descriptive name shown in dashboard. + """ + + +class ServiceActionUpdateParamsCreditGrantPerTenant(TypedDict): + name: NotRequired[str] + """ + A descriptive name shown in dashboard. + """ diff --git a/stripe/params/v2/billing/bill_settings/__init__.py b/stripe/params/v2/billing/bill_settings/__init__.py new file mode 100644 index 000000000..c24929d31 --- /dev/null +++ b/stripe/params/v2/billing/bill_settings/__init__.py @@ -0,0 +1,8 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe.params.v2.billing.bill_settings._version_list_params import ( + VersionListParams as VersionListParams, +) +from stripe.params.v2.billing.bill_settings._version_retrieve_params import ( + VersionRetrieveParams as VersionRetrieveParams, +) diff --git a/stripe/params/v2/billing/bill_settings/_version_list_params.py b/stripe/params/v2/billing/bill_settings/_version_list_params.py new file mode 100644 index 000000000..9add19809 --- /dev/null +++ b/stripe/params/v2/billing/bill_settings/_version_list_params.py @@ -0,0 +1,10 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import NotRequired, TypedDict + + +class VersionListParams(TypedDict): + limit: NotRequired[int] + """ + Optionally set the maximum number of results per page. Defaults to 20. + """ diff --git a/stripe/params/v2/billing/bill_settings/_version_retrieve_params.py b/stripe/params/v2/billing/bill_settings/_version_retrieve_params.py new file mode 100644 index 000000000..5c36a13fb --- /dev/null +++ b/stripe/params/v2/billing/bill_settings/_version_retrieve_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class VersionRetrieveParams(TypedDict): + pass diff --git a/stripe/params/v2/billing/collection_settings/__init__.py b/stripe/params/v2/billing/collection_settings/__init__.py new file mode 100644 index 000000000..c780feaaa --- /dev/null +++ b/stripe/params/v2/billing/collection_settings/__init__.py @@ -0,0 +1,8 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe.params.v2.billing.collection_settings._version_list_params import ( + VersionListParams as VersionListParams, +) +from stripe.params.v2.billing.collection_settings._version_retrieve_params import ( + VersionRetrieveParams as VersionRetrieveParams, +) diff --git a/stripe/params/v2/billing/collection_settings/_version_list_params.py b/stripe/params/v2/billing/collection_settings/_version_list_params.py new file mode 100644 index 000000000..9add19809 --- /dev/null +++ b/stripe/params/v2/billing/collection_settings/_version_list_params.py @@ -0,0 +1,10 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import NotRequired, TypedDict + + +class VersionListParams(TypedDict): + limit: NotRequired[int] + """ + Optionally set the maximum number of results per page. Defaults to 20. + """ diff --git a/stripe/params/v2/billing/collection_settings/_version_retrieve_params.py b/stripe/params/v2/billing/collection_settings/_version_retrieve_params.py new file mode 100644 index 000000000..5c36a13fb --- /dev/null +++ b/stripe/params/v2/billing/collection_settings/_version_retrieve_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class VersionRetrieveParams(TypedDict): + pass diff --git a/stripe/params/v2/billing/intents/__init__.py b/stripe/params/v2/billing/intents/__init__.py new file mode 100644 index 000000000..6b46a2f34 --- /dev/null +++ b/stripe/params/v2/billing/intents/__init__.py @@ -0,0 +1,8 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe.params.v2.billing.intents._action_list_params import ( + ActionListParams as ActionListParams, +) +from stripe.params.v2.billing.intents._action_retrieve_params import ( + ActionRetrieveParams as ActionRetrieveParams, +) diff --git a/stripe/params/v2/billing/intents/_action_list_params.py b/stripe/params/v2/billing/intents/_action_list_params.py new file mode 100644 index 000000000..80e53660f --- /dev/null +++ b/stripe/params/v2/billing/intents/_action_list_params.py @@ -0,0 +1,10 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import NotRequired, TypedDict + + +class ActionListParams(TypedDict): + limit: NotRequired[int] + """ + Optionally set the maximum number of results per page. Defaults to 10. + """ diff --git a/stripe/params/v2/billing/intents/_action_retrieve_params.py b/stripe/params/v2/billing/intents/_action_retrieve_params.py new file mode 100644 index 000000000..bbc847801 --- /dev/null +++ b/stripe/params/v2/billing/intents/_action_retrieve_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class ActionRetrieveParams(TypedDict): + pass diff --git a/stripe/params/v2/billing/license_fees/__init__.py b/stripe/params/v2/billing/license_fees/__init__.py new file mode 100644 index 000000000..045231993 --- /dev/null +++ b/stripe/params/v2/billing/license_fees/__init__.py @@ -0,0 +1,8 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe.params.v2.billing.license_fees._version_list_params import ( + VersionListParams as VersionListParams, +) +from stripe.params.v2.billing.license_fees._version_retrieve_params import ( + VersionRetrieveParams as VersionRetrieveParams, +) diff --git a/stripe/params/v2/billing/license_fees/_version_list_params.py b/stripe/params/v2/billing/license_fees/_version_list_params.py new file mode 100644 index 000000000..9add19809 --- /dev/null +++ b/stripe/params/v2/billing/license_fees/_version_list_params.py @@ -0,0 +1,10 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import NotRequired, TypedDict + + +class VersionListParams(TypedDict): + limit: NotRequired[int] + """ + Optionally set the maximum number of results per page. Defaults to 20. + """ diff --git a/stripe/params/v2/billing/license_fees/_version_retrieve_params.py b/stripe/params/v2/billing/license_fees/_version_retrieve_params.py new file mode 100644 index 000000000..5c36a13fb --- /dev/null +++ b/stripe/params/v2/billing/license_fees/_version_retrieve_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class VersionRetrieveParams(TypedDict): + pass diff --git a/stripe/params/v2/billing/pricing_plans/__init__.py b/stripe/params/v2/billing/pricing_plans/__init__.py new file mode 100644 index 000000000..9684e375b --- /dev/null +++ b/stripe/params/v2/billing/pricing_plans/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe.params.v2.billing.pricing_plans._component_create_params import ( + ComponentCreateParams as ComponentCreateParams, +) +from stripe.params.v2.billing.pricing_plans._component_delete_params import ( + ComponentDeleteParams as ComponentDeleteParams, +) +from stripe.params.v2.billing.pricing_plans._component_list_params import ( + ComponentListParams as ComponentListParams, +) +from stripe.params.v2.billing.pricing_plans._component_retrieve_params import ( + ComponentRetrieveParams as ComponentRetrieveParams, +) +from stripe.params.v2.billing.pricing_plans._component_update_params import ( + ComponentUpdateParams as ComponentUpdateParams, +) +from stripe.params.v2.billing.pricing_plans._version_list_params import ( + VersionListParams as VersionListParams, +) +from stripe.params.v2.billing.pricing_plans._version_retrieve_params import ( + VersionRetrieveParams as VersionRetrieveParams, +) diff --git a/stripe/params/v2/billing/pricing_plans/_component_create_params.py b/stripe/params/v2/billing/pricing_plans/_component_create_params.py new file mode 100644 index 000000000..77704145b --- /dev/null +++ b/stripe/params/v2/billing/pricing_plans/_component_create_params.py @@ -0,0 +1,60 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import Dict +from typing_extensions import Literal, NotRequired, TypedDict + + +class ComponentCreateParams(TypedDict): + lookup_key: NotRequired[str] + """ + An identifier that can be used to find this component. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://docs.stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + """ + type: Literal["license_fee", "rate_card", "service_action"] + """ + The type of the PricingPlanComponent. + """ + license_fee: NotRequired["ComponentCreateParamsLicenseFee"] + """ + Details if this component is a License Fee. + """ + rate_card: NotRequired["ComponentCreateParamsRateCard"] + """ + Details if this component is a Rate Card. + """ + service_action: NotRequired["ComponentCreateParamsServiceAction"] + """ + Details if this component is a Service Action. + """ + + +class ComponentCreateParamsLicenseFee(TypedDict): + id: str + """ + The ID of the License Fee. + """ + version: NotRequired[str] + """ + The version of the LicenseFee. Defaults to 'latest', if not specified. + """ + + +class ComponentCreateParamsRateCard(TypedDict): + id: str + """ + The ID of the Rate Card. + """ + version: NotRequired[str] + """ + The version of the RateCard. Defaults to 'latest', if not specified. + """ + + +class ComponentCreateParamsServiceAction(TypedDict): + id: str + """ + The ID of the service action. + """ diff --git a/stripe/params/v2/billing/pricing_plans/_component_delete_params.py b/stripe/params/v2/billing/pricing_plans/_component_delete_params.py new file mode 100644 index 000000000..590e12699 --- /dev/null +++ b/stripe/params/v2/billing/pricing_plans/_component_delete_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class ComponentDeleteParams(TypedDict): + pass diff --git a/stripe/params/v2/billing/pricing_plans/_component_list_params.py b/stripe/params/v2/billing/pricing_plans/_component_list_params.py new file mode 100644 index 000000000..ca7963078 --- /dev/null +++ b/stripe/params/v2/billing/pricing_plans/_component_list_params.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import NotRequired, TypedDict + + +class ComponentListParams(TypedDict): + limit: NotRequired[int] + """ + Optionally set the maximum number of results per page. Defaults to 20. + """ + lookup_keys: NotRequired[List[str]] + """ + Filter by lookup keys. Mutually exclusive with `pricing_plan_version`. + You can specify up to 10 lookup keys. + """ + pricing_plan_version: NotRequired[str] + """ + The ID of the Pricing Plan Version to list components for. Will use the latest version if not provided. + Mutually exclusive with `lookup_keys`. + """ diff --git a/stripe/params/v2/billing/pricing_plans/_component_retrieve_params.py b/stripe/params/v2/billing/pricing_plans/_component_retrieve_params.py new file mode 100644 index 000000000..8b2ee5530 --- /dev/null +++ b/stripe/params/v2/billing/pricing_plans/_component_retrieve_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class ComponentRetrieveParams(TypedDict): + pass diff --git a/stripe/params/v2/billing/pricing_plans/_component_update_params.py b/stripe/params/v2/billing/pricing_plans/_component_update_params.py new file mode 100644 index 000000000..95187c09f --- /dev/null +++ b/stripe/params/v2/billing/pricing_plans/_component_update_params.py @@ -0,0 +1,15 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import Dict, Optional +from typing_extensions import NotRequired, TypedDict + + +class ComponentUpdateParams(TypedDict): + lookup_key: NotRequired[str] + """ + An identifier that can be used to find this component. Maximum length of 200 characters. + """ + metadata: NotRequired[Dict[str, Optional[str]]] + """ + Set of key-value pairs that you can attach to an object. + """ diff --git a/stripe/params/v2/billing/pricing_plans/_version_list_params.py b/stripe/params/v2/billing/pricing_plans/_version_list_params.py new file mode 100644 index 000000000..9add19809 --- /dev/null +++ b/stripe/params/v2/billing/pricing_plans/_version_list_params.py @@ -0,0 +1,10 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import NotRequired, TypedDict + + +class VersionListParams(TypedDict): + limit: NotRequired[int] + """ + Optionally set the maximum number of results per page. Defaults to 20. + """ diff --git a/stripe/params/v2/billing/pricing_plans/_version_retrieve_params.py b/stripe/params/v2/billing/pricing_plans/_version_retrieve_params.py new file mode 100644 index 000000000..5c36a13fb --- /dev/null +++ b/stripe/params/v2/billing/pricing_plans/_version_retrieve_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class VersionRetrieveParams(TypedDict): + pass diff --git a/stripe/params/v2/billing/rate_cards/__init__.py b/stripe/params/v2/billing/rate_cards/__init__.py new file mode 100644 index 000000000..ab3fdb3be --- /dev/null +++ b/stripe/params/v2/billing/rate_cards/__init__.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe.params.v2.billing.rate_cards._rate_create_params import ( + RateCreateParams as RateCreateParams, +) +from stripe.params.v2.billing.rate_cards._rate_delete_params import ( + RateDeleteParams as RateDeleteParams, +) +from stripe.params.v2.billing.rate_cards._rate_list_params import ( + RateListParams as RateListParams, +) +from stripe.params.v2.billing.rate_cards._rate_retrieve_params import ( + RateRetrieveParams as RateRetrieveParams, +) +from stripe.params.v2.billing.rate_cards._version_list_params import ( + VersionListParams as VersionListParams, +) +from stripe.params.v2.billing.rate_cards._version_retrieve_params import ( + VersionRetrieveParams as VersionRetrieveParams, +) diff --git a/stripe/params/v2/billing/rate_cards/_rate_create_params.py b/stripe/params/v2/billing/rate_cards/_rate_create_params.py new file mode 100644 index 000000000..e802f410d --- /dev/null +++ b/stripe/params/v2/billing/rate_cards/_rate_create_params.py @@ -0,0 +1,83 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class RateCreateParams(TypedDict): + custom_pricing_unit_amount: NotRequired[ + "RateCreateParamsCustomPricingUnitAmount" + ] + """ + The custom pricing unit that this rate binds to. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of [key-value pairs](https://docs.stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + """ + metered_item: NotRequired[str] + """ + The Metered Item that this rate binds to. + """ + tiering_mode: NotRequired[Literal["graduated", "volume"]] + """ + Defines whether the tiered price should be graduated or volume-based. In volume-based tiering, the maximum + quantity within a period determines the per-unit price. In graduated tiering, the pricing changes as the quantity + grows into new tiers. Can only be set if `tiers` is set. + """ + tiers: NotRequired[List["RateCreateParamsTier"]] + """ + Each element represents a pricing tier. Cannot be set if `unit_amount` is provided. + """ + transform_quantity: NotRequired["RateCreateParamsTransformQuantity"] + """ + Apply a transformation to the reported usage or set quantity before computing the amount billed. + """ + unit_amount: NotRequired[str] + """ + The per-unit amount to be charged, represented as a decimal string in minor currency units with at most 12 decimal + places. Cannot be set if `tiers` is provided. + """ + + +class RateCreateParamsCustomPricingUnitAmount(TypedDict): + id: str + """ + The id of the custom pricing unit. + """ + value: str + """ + The unit value for the custom pricing unit, as a string. + """ + + +class RateCreateParamsTier(TypedDict): + flat_amount: NotRequired[str] + """ + Price for the entire tier, represented as a decimal string in minor currency units with at most 12 decimal places. + """ + unit_amount: NotRequired[str] + """ + Per-unit price for units included in this tier, represented as a decimal string in minor currency units with at + most 12 decimal places. + """ + up_to_decimal: NotRequired[str] + """ + Up to and including this quantity will be contained in the tier. Only one of `up_to_decimal` and `up_to_inf` may + be set. + """ + up_to_inf: NotRequired[Literal["inf"]] + """ + No upper bound to this tier. Only one of `up_to_decimal` and `up_to_inf` may be set. + """ + + +class RateCreateParamsTransformQuantity(TypedDict): + divide_by: int + """ + Divide usage by this number. + """ + round: Literal["down", "up"] + """ + After division, round the result up or down. + """ diff --git a/stripe/params/v2/billing/rate_cards/_rate_delete_params.py b/stripe/params/v2/billing/rate_cards/_rate_delete_params.py new file mode 100644 index 000000000..5ea8d57d4 --- /dev/null +++ b/stripe/params/v2/billing/rate_cards/_rate_delete_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class RateDeleteParams(TypedDict): + pass diff --git a/stripe/params/v2/billing/rate_cards/_rate_list_params.py b/stripe/params/v2/billing/rate_cards/_rate_list_params.py new file mode 100644 index 000000000..be16fe3a1 --- /dev/null +++ b/stripe/params/v2/billing/rate_cards/_rate_list_params.py @@ -0,0 +1,18 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import NotRequired, TypedDict + + +class RateListParams(TypedDict): + limit: NotRequired[int] + """ + Optionally set the maximum number of results per page. Defaults to 20. + """ + metered_item: NotRequired[str] + """ + Optionally filter by a Metered Item. + """ + rate_card_version: NotRequired[str] + """ + Optionally filter by a RateCard version. If not specified, defaults to the latest version. + """ diff --git a/stripe/params/v2/billing/rate_cards/_rate_retrieve_params.py b/stripe/params/v2/billing/rate_cards/_rate_retrieve_params.py new file mode 100644 index 000000000..014b166bc --- /dev/null +++ b/stripe/params/v2/billing/rate_cards/_rate_retrieve_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class RateRetrieveParams(TypedDict): + pass diff --git a/stripe/params/v2/billing/rate_cards/_version_list_params.py b/stripe/params/v2/billing/rate_cards/_version_list_params.py new file mode 100644 index 000000000..9add19809 --- /dev/null +++ b/stripe/params/v2/billing/rate_cards/_version_list_params.py @@ -0,0 +1,10 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import NotRequired, TypedDict + + +class VersionListParams(TypedDict): + limit: NotRequired[int] + """ + Optionally set the maximum number of results per page. Defaults to 20. + """ diff --git a/stripe/params/v2/billing/rate_cards/_version_retrieve_params.py b/stripe/params/v2/billing/rate_cards/_version_retrieve_params.py new file mode 100644 index 000000000..5c36a13fb --- /dev/null +++ b/stripe/params/v2/billing/rate_cards/_version_retrieve_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class VersionRetrieveParams(TypedDict): + pass diff --git a/stripe/params/v2/core/__init__.py b/stripe/params/v2/core/__init__.py new file mode 100644 index 000000000..9f9859353 --- /dev/null +++ b/stripe/params/v2/core/__init__.py @@ -0,0 +1,57 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe.params.v2.core import accounts as accounts, vault as vault +from stripe.params.v2.core._account_close_params import ( + AccountCloseParams as AccountCloseParams, +) +from stripe.params.v2.core._account_create_params import ( + AccountCreateParams as AccountCreateParams, +) +from stripe.params.v2.core._account_link_create_params import ( + AccountLinkCreateParams as AccountLinkCreateParams, +) +from stripe.params.v2.core._account_list_params import ( + AccountListParams as AccountListParams, +) +from stripe.params.v2.core._account_retrieve_params import ( + AccountRetrieveParams as AccountRetrieveParams, +) +from stripe.params.v2.core._account_update_params import ( + AccountUpdateParams as AccountUpdateParams, +) +from stripe.params.v2.core._claimable_sandbox_create_params import ( + ClaimableSandboxCreateParams as ClaimableSandboxCreateParams, +) +from stripe.params.v2.core._claimable_sandbox_retrieve_params import ( + ClaimableSandboxRetrieveParams as ClaimableSandboxRetrieveParams, +) +from stripe.params.v2.core._event_destination_create_params import ( + EventDestinationCreateParams as EventDestinationCreateParams, +) +from stripe.params.v2.core._event_destination_delete_params import ( + EventDestinationDeleteParams as EventDestinationDeleteParams, +) +from stripe.params.v2.core._event_destination_disable_params import ( + EventDestinationDisableParams as EventDestinationDisableParams, +) +from stripe.params.v2.core._event_destination_enable_params import ( + EventDestinationEnableParams as EventDestinationEnableParams, +) +from stripe.params.v2.core._event_destination_list_params import ( + EventDestinationListParams as EventDestinationListParams, +) +from stripe.params.v2.core._event_destination_ping_params import ( + EventDestinationPingParams as EventDestinationPingParams, +) +from stripe.params.v2.core._event_destination_retrieve_params import ( + EventDestinationRetrieveParams as EventDestinationRetrieveParams, +) +from stripe.params.v2.core._event_destination_update_params import ( + EventDestinationUpdateParams as EventDestinationUpdateParams, +) +from stripe.params.v2.core._event_list_params import ( + EventListParams as EventListParams, +) +from stripe.params.v2.core._event_retrieve_params import ( + EventRetrieveParams as EventRetrieveParams, +) diff --git a/stripe/params/v2/core/_account_close_params.py b/stripe/params/v2/core/_account_close_params.py new file mode 100644 index 000000000..d9c94dae4 --- /dev/null +++ b/stripe/params/v2/core/_account_close_params.py @@ -0,0 +1,13 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import Literal, NotRequired, TypedDict + + +class AccountCloseParams(TypedDict): + applied_configurations: NotRequired[ + List[Literal["customer", "merchant", "recipient", "storer"]] + ] + """ + Configurations on the Account to be closed. All configurations on the Account must be passed in for this request to succeed. + """ diff --git a/stripe/params/v2/core/_account_create_params.py b/stripe/params/v2/core/_account_create_params.py new file mode 100644 index 000000000..04dd81c15 --- /dev/null +++ b/stripe/params/v2/core/_account_create_params.py @@ -0,0 +1,2658 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe.v2._amount import AmountParam +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class AccountCreateParams(TypedDict): + configuration: NotRequired["AccountCreateParamsConfiguration"] + """ + An Account Configuration which allows the Account to take on a key persona across Stripe products. + """ + contact_email: NotRequired[str] + """ + The default contact email address for the Account. Required when configuring the account as a merchant or recipient. + """ + dashboard: NotRequired[Literal["express", "full", "none"]] + """ + A value indicating the Stripe dashboard this Account has access to. This will depend on which configurations are enabled for this account. + """ + defaults: NotRequired["AccountCreateParamsDefaults"] + """ + Default values to be used on Account Configurations. + """ + display_name: NotRequired[str] + """ + A descriptive name for the Account. This name will be surfaced in the Stripe Dashboard and on any invoices sent to the Account. + """ + identity: NotRequired["AccountCreateParamsIdentity"] + """ + Information about the company, individual, and business represented by the Account. + """ + include: NotRequired[ + List[ + Literal[ + "configuration.customer", + "configuration.merchant", + "configuration.recipient", + "configuration.storer", + "defaults", + "identity", + "requirements", + ] + ] + ] + """ + Additional fields to include in the response. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + """ + + +class AccountCreateParamsConfiguration(TypedDict): + customer: NotRequired["AccountCreateParamsConfigurationCustomer"] + """ + The Customer Configuration allows the Account to be used in inbound payment flows. + """ + merchant: NotRequired["AccountCreateParamsConfigurationMerchant"] + """ + The Merchant configuration allows the Account to act as a connected account and collect payments facilitated by a Connect platform. You can add this configuration to your connected accounts only if you've completed onboarding as a Connect platform. + """ + recipient: NotRequired["AccountCreateParamsConfigurationRecipient"] + """ + The Recipient Configuration allows the Account to receive funds. + """ + storer: NotRequired["AccountCreateParamsConfigurationStorer"] + """ + The Storer Configuration allows the Account to store and move funds using stored-value FinancialAccounts. + """ + + +class AccountCreateParamsConfigurationCustomer(TypedDict): + automatic_indirect_tax: NotRequired[ + "AccountCreateParamsConfigurationCustomerAutomaticIndirectTax" + ] + """ + Automatic indirect tax settings to be used when automatic tax calculation is enabled on the customer's invoices, subscriptions, checkout sessions, or payment links. Surfaces if automatic tax calculation is possible given the current customer location information. + """ + billing: NotRequired["AccountCreateParamsConfigurationCustomerBilling"] + """ + Billing settings - default settings used for this customer in Billing flows such as Invoices and Subscriptions. + """ + capabilities: NotRequired[ + "AccountCreateParamsConfigurationCustomerCapabilities" + ] + """ + Capabilities that have been requested on the Customer Configuration. + """ + shipping: NotRequired["AccountCreateParamsConfigurationCustomerShipping"] + """ + The customer's shipping information. Appears on invoices emailed to this customer. + """ + test_clock: NotRequired[str] + """ + ID of the test clock to attach to the customer. Can only be set on testmode Accounts, and when the Customer Configuration is first set on an Account. + """ + + +class AccountCreateParamsConfigurationCustomerAutomaticIndirectTax(TypedDict): + exempt: NotRequired[Literal["exempt", "none", "reverse"]] + """ + Describes the customer's tax exemption status, which is `none`, `exempt`, or `reverse`. When set to reverse, invoice and receipt PDFs include the following text: “Reverse charge”. + """ + ip_address: NotRequired[str] + """ + A recent IP address of the customer used for tax reporting and tax location inference. + """ + location_source: NotRequired[ + Literal["identity_address", "ip_address", "shipping_address"] + ] + """ + The data source used to identify the customer's tax location - defaults to 'identity_address'. Will only be used for automatic tax calculation on the customer's Invoices and Subscriptions. + """ + + +class AccountCreateParamsConfigurationCustomerBilling(TypedDict): + invoice: NotRequired[ + "AccountCreateParamsConfigurationCustomerBillingInvoice" + ] + """ + Default settings used on invoices for this customer. + """ + + +class AccountCreateParamsConfigurationCustomerBillingInvoice(TypedDict): + custom_fields: NotRequired[ + List[ + "AccountCreateParamsConfigurationCustomerBillingInvoiceCustomField" + ] + ] + """ + The list of up to 4 default custom fields to be displayed on invoices for this customer. + """ + footer: NotRequired[str] + """ + Default footer to be displayed on invoices for this customer. + """ + next_sequence: NotRequired[int] + """ + The sequence to be used on the customer's next invoice. Defaults to 1. + """ + prefix: NotRequired[str] + """ + The prefix for the customer used to generate unique invoice numbers. Must be 3–12 uppercase letters or numbers. + """ + rendering: NotRequired[ + "AccountCreateParamsConfigurationCustomerBillingInvoiceRendering" + ] + """ + Default options for invoice PDF rendering for this customer. + """ + + +class AccountCreateParamsConfigurationCustomerBillingInvoiceCustomField( + TypedDict, +): + name: str + """ + The name of the custom field. This may be up to 40 characters. + """ + value: str + """ + The value of the custom field. This may be up to 140 characters. When updating, pass an empty string to remove previously-defined values. + """ + + +class AccountCreateParamsConfigurationCustomerBillingInvoiceRendering( + TypedDict, +): + amount_tax_display: NotRequired[ + Literal["exclude_tax", "include_inclusive_tax"] + ] + """ + How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One of exclude_tax or include_inclusive_tax. include_inclusive_tax will include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. exclude_tax will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts. + """ + template: NotRequired[str] + """ + ID of the invoice rendering template to use for future invoices. + """ + + +class AccountCreateParamsConfigurationCustomerCapabilities(TypedDict): + automatic_indirect_tax: NotRequired[ + "AccountCreateParamsConfigurationCustomerCapabilitiesAutomaticIndirectTax" + ] + """ + Generates requirements for enabling automatic indirect tax calculation on this customer's invoices or subscriptions. Recommended to request this capability if planning to enable automatic tax calculation on this customer's invoices or subscriptions. Uses the `location_source` field. + """ + + +class AccountCreateParamsConfigurationCustomerCapabilitiesAutomaticIndirectTax( + TypedDict, +): + requested: bool + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountCreateParamsConfigurationCustomerShipping(TypedDict): + address: NotRequired[ + "AccountCreateParamsConfigurationCustomerShippingAddress" + ] + """ + Customer shipping address. + """ + name: NotRequired[str] + """ + Customer name. + """ + phone: NotRequired[str] + """ + Customer phone (including extension). + """ + + +class AccountCreateParamsConfigurationCustomerShippingAddress(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 (e.g., street, PO Box, or company name). + """ + line2: NotRequired[str] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ + postal_code: NotRequired[str] + """ + ZIP or postal code. + """ + state: NotRequired[str] + """ + State, county, province, or region. + """ + + +class AccountCreateParamsConfigurationMerchant(TypedDict): + bacs_debit_payments: NotRequired[ + "AccountCreateParamsConfigurationMerchantBacsDebitPayments" + ] + """ + Settings used for Bacs debit payments. + """ + branding: NotRequired["AccountCreateParamsConfigurationMerchantBranding"] + """ + Settings used to apply the merchant's branding to email receipts, invoices, Checkout, and other products. + """ + capabilities: NotRequired[ + "AccountCreateParamsConfigurationMerchantCapabilities" + ] + """ + Capabilities to request on the Merchant Configuration. + """ + card_payments: NotRequired[ + "AccountCreateParamsConfigurationMerchantCardPayments" + ] + """ + Card payments settings. + """ + mcc: NotRequired[str] + """ + The merchant category code for the Merchant Configuration. MCCs are used to classify businesses based on the goods or services they provide. + """ + statement_descriptor: NotRequired[ + "AccountCreateParamsConfigurationMerchantStatementDescriptor" + ] + """ + Statement descriptor. + """ + support: NotRequired["AccountCreateParamsConfigurationMerchantSupport"] + """ + Publicly available contact information for sending support issues to. + """ + + +class AccountCreateParamsConfigurationMerchantBacsDebitPayments(TypedDict): + display_name: NotRequired[str] + """ + Display name for Bacs debit payments. + """ + + +class AccountCreateParamsConfigurationMerchantBranding(TypedDict): + icon: NotRequired[str] + """ + ID of a [file upload](https://docs.stripe.com/api/persons/update#create_file): An icon for the merchant. Must be square and at least 128px x 128px. + """ + logo: NotRequired[str] + """ + ID of a [file upload](https://docs.stripe.com/api/persons/update#create_file): A logo for the merchant that will be used in Checkout instead of the icon and without the merchant's name next to it if provided. Must be at least 128px x 128px. + """ + primary_color: NotRequired[str] + """ + A CSS hex color value representing the primary branding color for the merchant. + """ + secondary_color: NotRequired[str] + """ + A CSS hex color value representing the secondary branding color for the merchant. + """ + + +class AccountCreateParamsConfigurationMerchantCapabilities(TypedDict): + ach_debit_payments: NotRequired[ + "AccountCreateParamsConfigurationMerchantCapabilitiesAchDebitPayments" + ] + """ + Allow the merchant to process ACH debit payments. + """ + acss_debit_payments: NotRequired[ + "AccountCreateParamsConfigurationMerchantCapabilitiesAcssDebitPayments" + ] + """ + Allow the merchant to process ACSS debit payments. + """ + affirm_payments: NotRequired[ + "AccountCreateParamsConfigurationMerchantCapabilitiesAffirmPayments" + ] + """ + Allow the merchant to process Affirm payments. + """ + afterpay_clearpay_payments: NotRequired[ + "AccountCreateParamsConfigurationMerchantCapabilitiesAfterpayClearpayPayments" + ] + """ + Allow the merchant to process Afterpay/Clearpay payments. + """ + alma_payments: NotRequired[ + "AccountCreateParamsConfigurationMerchantCapabilitiesAlmaPayments" + ] + """ + Allow the merchant to process Alma payments. + """ + amazon_pay_payments: NotRequired[ + "AccountCreateParamsConfigurationMerchantCapabilitiesAmazonPayPayments" + ] + """ + Allow the merchant to process Amazon Pay payments. + """ + au_becs_debit_payments: NotRequired[ + "AccountCreateParamsConfigurationMerchantCapabilitiesAuBecsDebitPayments" + ] + """ + Allow the merchant to process Australian BECS Direct Debit payments. + """ + bacs_debit_payments: NotRequired[ + "AccountCreateParamsConfigurationMerchantCapabilitiesBacsDebitPayments" + ] + """ + Allow the merchant to process BACS Direct Debit payments. + """ + bancontact_payments: NotRequired[ + "AccountCreateParamsConfigurationMerchantCapabilitiesBancontactPayments" + ] + """ + Allow the merchant to process Bancontact payments. + """ + blik_payments: NotRequired[ + "AccountCreateParamsConfigurationMerchantCapabilitiesBlikPayments" + ] + """ + Allow the merchant to process BLIK payments. + """ + boleto_payments: NotRequired[ + "AccountCreateParamsConfigurationMerchantCapabilitiesBoletoPayments" + ] + """ + Allow the merchant to process Boleto payments. + """ + card_payments: NotRequired[ + "AccountCreateParamsConfigurationMerchantCapabilitiesCardPayments" + ] + """ + Allow the merchant to collect card payments. + """ + cartes_bancaires_payments: NotRequired[ + "AccountCreateParamsConfigurationMerchantCapabilitiesCartesBancairesPayments" + ] + """ + Allow the merchant to process Cartes Bancaires payments. + """ + cashapp_payments: NotRequired[ + "AccountCreateParamsConfigurationMerchantCapabilitiesCashappPayments" + ] + """ + Allow the merchant to process Cash App payments. + """ + eps_payments: NotRequired[ + "AccountCreateParamsConfigurationMerchantCapabilitiesEpsPayments" + ] + """ + Allow the merchant to process EPS payments. + """ + fpx_payments: NotRequired[ + "AccountCreateParamsConfigurationMerchantCapabilitiesFpxPayments" + ] + """ + Allow the merchant to process FPX payments. + """ + gb_bank_transfer_payments: NotRequired[ + "AccountCreateParamsConfigurationMerchantCapabilitiesGbBankTransferPayments" + ] + """ + Allow the merchant to process UK bank transfer payments. + """ + grabpay_payments: NotRequired[ + "AccountCreateParamsConfigurationMerchantCapabilitiesGrabpayPayments" + ] + """ + Allow the merchant to process GrabPay payments. + """ + ideal_payments: NotRequired[ + "AccountCreateParamsConfigurationMerchantCapabilitiesIdealPayments" + ] + """ + Allow the merchant to process iDEAL payments. + """ + jcb_payments: NotRequired[ + "AccountCreateParamsConfigurationMerchantCapabilitiesJcbPayments" + ] + """ + Allow the merchant to process JCB card payments. + """ + jp_bank_transfer_payments: NotRequired[ + "AccountCreateParamsConfigurationMerchantCapabilitiesJpBankTransferPayments" + ] + """ + Allow the merchant to process Japanese bank transfer payments. + """ + kakao_pay_payments: NotRequired[ + "AccountCreateParamsConfigurationMerchantCapabilitiesKakaoPayPayments" + ] + """ + Allow the merchant to process Kakao Pay payments. + """ + klarna_payments: NotRequired[ + "AccountCreateParamsConfigurationMerchantCapabilitiesKlarnaPayments" + ] + """ + Allow the merchant to process Klarna payments. + """ + konbini_payments: NotRequired[ + "AccountCreateParamsConfigurationMerchantCapabilitiesKonbiniPayments" + ] + """ + Allow the merchant to process Konbini convenience store payments. + """ + kr_card_payments: NotRequired[ + "AccountCreateParamsConfigurationMerchantCapabilitiesKrCardPayments" + ] + """ + Allow the merchant to process Korean card payments. + """ + link_payments: NotRequired[ + "AccountCreateParamsConfigurationMerchantCapabilitiesLinkPayments" + ] + """ + Allow the merchant to process Link payments. + """ + mobilepay_payments: NotRequired[ + "AccountCreateParamsConfigurationMerchantCapabilitiesMobilepayPayments" + ] + """ + Allow the merchant to process MobilePay payments. + """ + multibanco_payments: NotRequired[ + "AccountCreateParamsConfigurationMerchantCapabilitiesMultibancoPayments" + ] + """ + Allow the merchant to process Multibanco payments. + """ + mx_bank_transfer_payments: NotRequired[ + "AccountCreateParamsConfigurationMerchantCapabilitiesMxBankTransferPayments" + ] + """ + Allow the merchant to process Mexican bank transfer payments. + """ + naver_pay_payments: NotRequired[ + "AccountCreateParamsConfigurationMerchantCapabilitiesNaverPayPayments" + ] + """ + Allow the merchant to process Naver Pay payments. + """ + oxxo_payments: NotRequired[ + "AccountCreateParamsConfigurationMerchantCapabilitiesOxxoPayments" + ] + """ + Allow the merchant to process OXXO payments. + """ + p24_payments: NotRequired[ + "AccountCreateParamsConfigurationMerchantCapabilitiesP24Payments" + ] + """ + Allow the merchant to process Przelewy24 (P24) payments. + """ + pay_by_bank_payments: NotRequired[ + "AccountCreateParamsConfigurationMerchantCapabilitiesPayByBankPayments" + ] + """ + Allow the merchant to process Pay by Bank payments. + """ + payco_payments: NotRequired[ + "AccountCreateParamsConfigurationMerchantCapabilitiesPaycoPayments" + ] + """ + Allow the merchant to process PAYCO payments. + """ + paynow_payments: NotRequired[ + "AccountCreateParamsConfigurationMerchantCapabilitiesPaynowPayments" + ] + """ + Allow the merchant to process PayNow payments. + """ + promptpay_payments: NotRequired[ + "AccountCreateParamsConfigurationMerchantCapabilitiesPromptpayPayments" + ] + """ + Allow the merchant to process PromptPay payments. + """ + revolut_pay_payments: NotRequired[ + "AccountCreateParamsConfigurationMerchantCapabilitiesRevolutPayPayments" + ] + """ + Allow the merchant to process Revolut Pay payments. + """ + samsung_pay_payments: NotRequired[ + "AccountCreateParamsConfigurationMerchantCapabilitiesSamsungPayPayments" + ] + """ + Allow the merchant to process Samsung Pay payments. + """ + sepa_bank_transfer_payments: NotRequired[ + "AccountCreateParamsConfigurationMerchantCapabilitiesSepaBankTransferPayments" + ] + """ + Allow the merchant to process SEPA bank transfer payments. + """ + sepa_debit_payments: NotRequired[ + "AccountCreateParamsConfigurationMerchantCapabilitiesSepaDebitPayments" + ] + """ + Allow the merchant to process SEPA Direct Debit payments. + """ + swish_payments: NotRequired[ + "AccountCreateParamsConfigurationMerchantCapabilitiesSwishPayments" + ] + """ + Allow the merchant to process Swish payments. + """ + twint_payments: NotRequired[ + "AccountCreateParamsConfigurationMerchantCapabilitiesTwintPayments" + ] + """ + Allow the merchant to process TWINT payments. + """ + us_bank_transfer_payments: NotRequired[ + "AccountCreateParamsConfigurationMerchantCapabilitiesUsBankTransferPayments" + ] + """ + Allow the merchant to process US bank transfer payments. + """ + zip_payments: NotRequired[ + "AccountCreateParamsConfigurationMerchantCapabilitiesZipPayments" + ] + """ + Allow the merchant to process Zip payments. + """ + + +class AccountCreateParamsConfigurationMerchantCapabilitiesAchDebitPayments( + TypedDict, +): + requested: bool + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountCreateParamsConfigurationMerchantCapabilitiesAcssDebitPayments( + TypedDict, +): + requested: bool + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountCreateParamsConfigurationMerchantCapabilitiesAffirmPayments( + TypedDict, +): + requested: bool + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountCreateParamsConfigurationMerchantCapabilitiesAfterpayClearpayPayments( + TypedDict, +): + requested: bool + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountCreateParamsConfigurationMerchantCapabilitiesAlmaPayments( + TypedDict, +): + requested: bool + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountCreateParamsConfigurationMerchantCapabilitiesAmazonPayPayments( + TypedDict, +): + requested: bool + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountCreateParamsConfigurationMerchantCapabilitiesAuBecsDebitPayments( + TypedDict, +): + requested: bool + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountCreateParamsConfigurationMerchantCapabilitiesBacsDebitPayments( + TypedDict, +): + requested: bool + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountCreateParamsConfigurationMerchantCapabilitiesBancontactPayments( + TypedDict, +): + requested: bool + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountCreateParamsConfigurationMerchantCapabilitiesBlikPayments( + TypedDict, +): + requested: bool + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountCreateParamsConfigurationMerchantCapabilitiesBoletoPayments( + TypedDict, +): + requested: bool + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountCreateParamsConfigurationMerchantCapabilitiesCardPayments( + TypedDict, +): + requested: bool + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountCreateParamsConfigurationMerchantCapabilitiesCartesBancairesPayments( + TypedDict, +): + requested: bool + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountCreateParamsConfigurationMerchantCapabilitiesCashappPayments( + TypedDict, +): + requested: bool + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountCreateParamsConfigurationMerchantCapabilitiesEpsPayments( + TypedDict, +): + requested: bool + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountCreateParamsConfigurationMerchantCapabilitiesFpxPayments( + TypedDict, +): + requested: bool + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountCreateParamsConfigurationMerchantCapabilitiesGbBankTransferPayments( + TypedDict, +): + requested: bool + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountCreateParamsConfigurationMerchantCapabilitiesGrabpayPayments( + TypedDict, +): + requested: bool + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountCreateParamsConfigurationMerchantCapabilitiesIdealPayments( + TypedDict, +): + requested: bool + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountCreateParamsConfigurationMerchantCapabilitiesJcbPayments( + TypedDict, +): + requested: bool + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountCreateParamsConfigurationMerchantCapabilitiesJpBankTransferPayments( + TypedDict, +): + requested: bool + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountCreateParamsConfigurationMerchantCapabilitiesKakaoPayPayments( + TypedDict, +): + requested: bool + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountCreateParamsConfigurationMerchantCapabilitiesKlarnaPayments( + TypedDict, +): + requested: bool + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountCreateParamsConfigurationMerchantCapabilitiesKonbiniPayments( + TypedDict, +): + requested: bool + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountCreateParamsConfigurationMerchantCapabilitiesKrCardPayments( + TypedDict, +): + requested: bool + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountCreateParamsConfigurationMerchantCapabilitiesLinkPayments( + TypedDict, +): + requested: bool + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountCreateParamsConfigurationMerchantCapabilitiesMobilepayPayments( + TypedDict, +): + requested: bool + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountCreateParamsConfigurationMerchantCapabilitiesMultibancoPayments( + TypedDict, +): + requested: bool + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountCreateParamsConfigurationMerchantCapabilitiesMxBankTransferPayments( + TypedDict, +): + requested: bool + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountCreateParamsConfigurationMerchantCapabilitiesNaverPayPayments( + TypedDict, +): + requested: bool + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountCreateParamsConfigurationMerchantCapabilitiesOxxoPayments( + TypedDict, +): + requested: bool + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountCreateParamsConfigurationMerchantCapabilitiesP24Payments( + TypedDict, +): + requested: bool + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountCreateParamsConfigurationMerchantCapabilitiesPayByBankPayments( + TypedDict, +): + requested: bool + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountCreateParamsConfigurationMerchantCapabilitiesPaycoPayments( + TypedDict, +): + requested: bool + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountCreateParamsConfigurationMerchantCapabilitiesPaynowPayments( + TypedDict, +): + requested: bool + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountCreateParamsConfigurationMerchantCapabilitiesPromptpayPayments( + TypedDict, +): + requested: bool + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountCreateParamsConfigurationMerchantCapabilitiesRevolutPayPayments( + TypedDict, +): + requested: bool + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountCreateParamsConfigurationMerchantCapabilitiesSamsungPayPayments( + TypedDict, +): + requested: bool + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountCreateParamsConfigurationMerchantCapabilitiesSepaBankTransferPayments( + TypedDict, +): + requested: bool + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountCreateParamsConfigurationMerchantCapabilitiesSepaDebitPayments( + TypedDict, +): + requested: bool + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountCreateParamsConfigurationMerchantCapabilitiesSwishPayments( + TypedDict, +): + requested: bool + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountCreateParamsConfigurationMerchantCapabilitiesTwintPayments( + TypedDict, +): + requested: bool + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountCreateParamsConfigurationMerchantCapabilitiesUsBankTransferPayments( + TypedDict, +): + requested: bool + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountCreateParamsConfigurationMerchantCapabilitiesZipPayments( + TypedDict, +): + requested: bool + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountCreateParamsConfigurationMerchantCardPayments(TypedDict): + decline_on: NotRequired[ + "AccountCreateParamsConfigurationMerchantCardPaymentsDeclineOn" + ] + """ + Automatically declines certain charge types regardless of whether the card issuer accepted or declined the charge. + """ + + +class AccountCreateParamsConfigurationMerchantCardPaymentsDeclineOn(TypedDict): + avs_failure: NotRequired[bool] + """ + Whether Stripe automatically declines charges with an incorrect ZIP or postal code. This setting only applies when a ZIP or postal code is provided and they fail bank verification. + """ + cvc_failure: NotRequired[bool] + """ + Whether Stripe automatically declines charges with an incorrect CVC. This setting only applies when a CVC is provided and it fails bank verification. + """ + + +class AccountCreateParamsConfigurationMerchantStatementDescriptor(TypedDict): + descriptor: NotRequired[str] + """ + The default text that appears on statements for non-card charges outside of Japan. For card charges, if you don't set a statement_descriptor_prefix, this text is also used as the statement descriptor prefix. In that case, if concatenating the statement descriptor suffix causes the combined statement descriptor to exceed 22 characters, we truncate the statement_descriptor text to limit the full descriptor to 22 characters. For more information about statement descriptors and their requirements, see the Merchant Configuration settings documentation. + """ + prefix: NotRequired[str] + """ + Default text that appears on statements for card charges outside of Japan, prefixing any dynamic statement_descriptor_suffix specified on the charge. To maximize space for the dynamic part of the descriptor, keep this text short. If you don't specify this value, statement_descriptor is used as the prefix. For more information about statement descriptors and their requirements, see the Merchant Configuration settings documentation. + """ + + +class AccountCreateParamsConfigurationMerchantSupport(TypedDict): + address: NotRequired[ + "AccountCreateParamsConfigurationMerchantSupportAddress" + ] + """ + A publicly available mailing address for sending support issues to. + """ + email: NotRequired[str] + """ + A publicly available email address for sending support issues to. + """ + phone: NotRequired[str] + """ + A publicly available phone number to call with support issues. + """ + url: NotRequired[str] + """ + A publicly available website for handling support issues. + """ + + +class AccountCreateParamsConfigurationMerchantSupportAddress(TypedDict): + city: NotRequired[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[str] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ + line2: NotRequired[str] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ + postal_code: NotRequired[str] + """ + ZIP or postal code. + """ + state: NotRequired[str] + """ + State, county, province, or region. + """ + town: NotRequired[str] + """ + Town or cho-me. + """ + + +class AccountCreateParamsConfigurationRecipient(TypedDict): + capabilities: NotRequired[ + "AccountCreateParamsConfigurationRecipientCapabilities" + ] + """ + Capabilities to be requested on the Recipient Configuration. + """ + + +class AccountCreateParamsConfigurationRecipientCapabilities(TypedDict): + bank_accounts: NotRequired[ + "AccountCreateParamsConfigurationRecipientCapabilitiesBankAccounts" + ] + """ + Capabilities that enable OutboundPayments to a bank account linked to this Account. + """ + cards: NotRequired[ + "AccountCreateParamsConfigurationRecipientCapabilitiesCards" + ] + """ + Capabilities that enable OutboundPayments to a card linked to this Account. + """ + crypto_wallets: NotRequired[ + "AccountCreateParamsConfigurationRecipientCapabilitiesCryptoWallets" + ] + """ + Capabilities that enable OutboundPayments to a crypto wallet linked to this Account. + """ + stripe_balance: NotRequired[ + "AccountCreateParamsConfigurationRecipientCapabilitiesStripeBalance" + ] + """ + Capabilities that enable the recipient to manage their Stripe Balance (/v1/balance). + """ + + +class AccountCreateParamsConfigurationRecipientCapabilitiesBankAccounts( + TypedDict, +): + local: NotRequired[ + "AccountCreateParamsConfigurationRecipientCapabilitiesBankAccountsLocal" + ] + """ + Enables this Account to receive OutboundPayments to linked bank accounts over local networks. + """ + wire: NotRequired[ + "AccountCreateParamsConfigurationRecipientCapabilitiesBankAccountsWire" + ] + """ + Enables this Account to receive OutboundPayments to linked bank accounts over wire. + """ + + +class AccountCreateParamsConfigurationRecipientCapabilitiesBankAccountsLocal( + TypedDict, +): + requested: bool + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountCreateParamsConfigurationRecipientCapabilitiesBankAccountsWire( + TypedDict, +): + requested: bool + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountCreateParamsConfigurationRecipientCapabilitiesCards(TypedDict): + requested: bool + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountCreateParamsConfigurationRecipientCapabilitiesCryptoWallets( + TypedDict, +): + requested: bool + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountCreateParamsConfigurationRecipientCapabilitiesStripeBalance( + TypedDict, +): + stripe_transfers: NotRequired[ + "AccountCreateParamsConfigurationRecipientCapabilitiesStripeBalanceStripeTransfers" + ] + """ + Allows the account to receive /v1/transfers into their Stripe Balance (/v1/balance). + """ + + +class AccountCreateParamsConfigurationRecipientCapabilitiesStripeBalanceStripeTransfers( + TypedDict, +): + requested: bool + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountCreateParamsConfigurationStorer(TypedDict): + capabilities: NotRequired[ + "AccountCreateParamsConfigurationStorerCapabilities" + ] + """ + Capabilities to request on the Storer Configuration. + """ + + +class AccountCreateParamsConfigurationStorerCapabilities(TypedDict): + financial_addresses: NotRequired[ + "AccountCreateParamsConfigurationStorerCapabilitiesFinancialAddresses" + ] + """ + Can provision a financial address to credit/debit a FinancialAccount. + """ + holds_currencies: NotRequired[ + "AccountCreateParamsConfigurationStorerCapabilitiesHoldsCurrencies" + ] + """ + Can hold storage-type funds on Stripe. + """ + inbound_transfers: NotRequired[ + "AccountCreateParamsConfigurationStorerCapabilitiesInboundTransfers" + ] + """ + Can pull funds from an external source, owned by yourself, to a FinancialAccount. + """ + outbound_payments: NotRequired[ + "AccountCreateParamsConfigurationStorerCapabilitiesOutboundPayments" + ] + """ + Can send funds from a FinancialAccount to a destination owned by someone else. + """ + outbound_transfers: NotRequired[ + "AccountCreateParamsConfigurationStorerCapabilitiesOutboundTransfers" + ] + """ + Can send funds from a FinancialAccount to a destination owned by yourself. + """ + + +class AccountCreateParamsConfigurationStorerCapabilitiesFinancialAddresses( + TypedDict, +): + bank_accounts: NotRequired[ + "AccountCreateParamsConfigurationStorerCapabilitiesFinancialAddressesBankAccounts" + ] + """ + Can provision a bank-account-like financial address (VBAN) to credit/debit a FinancialAccount. + """ + + +class AccountCreateParamsConfigurationStorerCapabilitiesFinancialAddressesBankAccounts( + TypedDict, +): + requested: bool + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountCreateParamsConfigurationStorerCapabilitiesHoldsCurrencies( + TypedDict, +): + gbp: NotRequired[ + "AccountCreateParamsConfigurationStorerCapabilitiesHoldsCurrenciesGbp" + ] + """ + Can hold storage-type funds on Stripe in GBP. + """ + + +class AccountCreateParamsConfigurationStorerCapabilitiesHoldsCurrenciesGbp( + TypedDict, +): + requested: bool + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountCreateParamsConfigurationStorerCapabilitiesInboundTransfers( + TypedDict, +): + bank_accounts: NotRequired[ + "AccountCreateParamsConfigurationStorerCapabilitiesInboundTransfersBankAccounts" + ] + """ + Can pull funds from an external bank account owned by yourself to a FinancialAccount. + """ + + +class AccountCreateParamsConfigurationStorerCapabilitiesInboundTransfersBankAccounts( + TypedDict, +): + requested: bool + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountCreateParamsConfigurationStorerCapabilitiesOutboundPayments( + TypedDict, +): + bank_accounts: NotRequired[ + "AccountCreateParamsConfigurationStorerCapabilitiesOutboundPaymentsBankAccounts" + ] + """ + Can send funds from a FinancialAccount to a bank account owned by someone else. + """ + cards: NotRequired[ + "AccountCreateParamsConfigurationStorerCapabilitiesOutboundPaymentsCards" + ] + """ + Can send funds from a FinancialAccount to a debit card owned by someone else. + """ + financial_accounts: NotRequired[ + "AccountCreateParamsConfigurationStorerCapabilitiesOutboundPaymentsFinancialAccounts" + ] + """ + Can send funds from a FinancialAccount to another FinancialAccount owned by someone else. + """ + + +class AccountCreateParamsConfigurationStorerCapabilitiesOutboundPaymentsBankAccounts( + TypedDict, +): + requested: bool + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountCreateParamsConfigurationStorerCapabilitiesOutboundPaymentsCards( + TypedDict, +): + requested: bool + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountCreateParamsConfigurationStorerCapabilitiesOutboundPaymentsFinancialAccounts( + TypedDict, +): + requested: bool + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountCreateParamsConfigurationStorerCapabilitiesOutboundTransfers( + TypedDict, +): + bank_accounts: NotRequired[ + "AccountCreateParamsConfigurationStorerCapabilitiesOutboundTransfersBankAccounts" + ] + """ + Can send funds from a FinancialAccount to a bank account owned by yourself. + """ + financial_accounts: NotRequired[ + "AccountCreateParamsConfigurationStorerCapabilitiesOutboundTransfersFinancialAccounts" + ] + """ + Can send funds from a FinancialAccount to another FinancialAccount owned by yourself. + """ + + +class AccountCreateParamsConfigurationStorerCapabilitiesOutboundTransfersBankAccounts( + TypedDict, +): + requested: bool + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountCreateParamsConfigurationStorerCapabilitiesOutboundTransfersFinancialAccounts( + TypedDict, +): + requested: bool + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountCreateParamsDefaults(TypedDict): + currency: NotRequired[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). + """ + locales: NotRequired[ + List[ + Literal[ + "ar-SA", + "bg", + "bg-BG", + "cs", + "cs-CZ", + "da", + "da-DK", + "de", + "de-DE", + "el", + "el-GR", + "en", + "en-AU", + "en-CA", + "en-GB", + "en-IE", + "en-IN", + "en-NZ", + "en-SG", + "en-US", + "es", + "es-419", + "es-ES", + "et", + "et-EE", + "fi", + "fil", + "fil-PH", + "fi-FI", + "fr", + "fr-CA", + "fr-FR", + "he-IL", + "hr", + "hr-HR", + "hu", + "hu-HU", + "id", + "id-ID", + "it", + "it-IT", + "ja", + "ja-JP", + "ko", + "ko-KR", + "lt", + "lt-LT", + "lv", + "lv-LV", + "ms", + "ms-MY", + "mt", + "mt-MT", + "nb", + "nb-NO", + "nl", + "nl-NL", + "pl", + "pl-PL", + "pt", + "pt-BR", + "pt-PT", + "ro", + "ro-RO", + "ru", + "ru-RU", + "sk", + "sk-SK", + "sl", + "sl-SI", + "sv", + "sv-SE", + "th", + "th-TH", + "tr", + "tr-TR", + "vi", + "vi-VN", + "zh", + "zh-Hans", + "zh-Hant-HK", + "zh-Hant-TW", + "zh-HK", + "zh-TW", + ] + ] + ] + """ + The Account's preferred locales (languages), ordered by preference. + """ + profile: NotRequired["AccountCreateParamsDefaultsProfile"] + """ + Account profile information. + """ + responsibilities: NotRequired[ + "AccountCreateParamsDefaultsResponsibilities" + ] + """ + Default responsibilities held by either Stripe or the platform. + """ + + +class AccountCreateParamsDefaultsProfile(TypedDict): + business_url: NotRequired[str] + """ + The business's publicly-available website. + """ + doing_business_as: NotRequired[str] + """ + The name which is used by the business. + """ + product_description: NotRequired[str] + """ + Internal-only description of the product sold or service provided by the business. It's used by Stripe for risk and underwriting purposes. + """ + + +class AccountCreateParamsDefaultsResponsibilities(TypedDict): + fees_collector: Literal["application", "stripe"] + """ + A value indicating the party responsible for collecting fees from this account. + """ + losses_collector: Literal["application", "stripe"] + """ + A value indicating who is responsible for losses when this Account can't pay back negative balances from payments. + """ + + +class AccountCreateParamsIdentity(TypedDict): + attestations: NotRequired["AccountCreateParamsIdentityAttestations"] + """ + Attestations from the identity's key people, e.g. owners, executives, directors. + """ + business_details: NotRequired["AccountCreateParamsIdentityBusinessDetails"] + """ + Information about the company or business. + """ + country: NotRequired[str] + """ + The country in which the account holder resides, or in which the business is legally established. This should be an [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code. + """ + entity_type: NotRequired[ + Literal["company", "government_entity", "individual", "non_profit"] + ] + """ + The entity type. + """ + individual: NotRequired["AccountCreateParamsIdentityIndividual"] + """ + Information about the person represented by the account. + """ + + +class AccountCreateParamsIdentityAttestations(TypedDict): + directorship_declaration: NotRequired[ + "AccountCreateParamsIdentityAttestationsDirectorshipDeclaration" + ] + """ + This hash is used to attest that the directors information provided to Stripe is both current and correct. + """ + ownership_declaration: NotRequired[ + "AccountCreateParamsIdentityAttestationsOwnershipDeclaration" + ] + """ + This hash is used to attest that the beneficial owner information provided to Stripe is both current and correct. + """ + persons_provided: NotRequired[ + "AccountCreateParamsIdentityAttestationsPersonsProvided" + ] + """ + Attestation that all Persons with a specific Relationship value have been provided. + """ + terms_of_service: NotRequired[ + "AccountCreateParamsIdentityAttestationsTermsOfService" + ] + """ + Attestations of accepted terms of service agreements. + """ + + +class AccountCreateParamsIdentityAttestationsDirectorshipDeclaration( + TypedDict +): + date: NotRequired[str] + """ + The time marking when the director attestation was made. Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: 2022-09-18T13:22:18.123Z. + """ + ip: NotRequired[str] + """ + The IP address from which the director attestation was made. + """ + user_agent: NotRequired[str] + """ + The user agent of the browser from which the director attestation was made. + """ + + +class AccountCreateParamsIdentityAttestationsOwnershipDeclaration(TypedDict): + date: NotRequired[str] + """ + The time marking when the beneficial owner attestation was made. Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: 2022-09-18T13:22:18.123Z. + """ + ip: NotRequired[str] + """ + The IP address from which the beneficial owner attestation was made. + """ + user_agent: NotRequired[str] + """ + The user agent of the browser from which the beneficial owner attestation was made. + """ + + +class AccountCreateParamsIdentityAttestationsPersonsProvided(TypedDict): + directors: NotRequired[bool] + """ + Whether the company's directors have been provided. Set this Boolean to true after creating all the company's directors with the [Persons API](https://docs.stripe.com/api/v2/core/accounts/createperson). + """ + executives: NotRequired[bool] + """ + Whether the company's executives have been provided. Set this Boolean to true after creating all the company's executives with the [Persons API](https://docs.stripe.com/api/v2/core/accounts/createperson). + """ + owners: NotRequired[bool] + """ + Whether the company's owners have been provided. Set this Boolean to true after creating all the company's owners with the [Persons API](https://docs.stripe.com/api/v2/core/accounts/createperson). + """ + ownership_exemption_reason: NotRequired[ + Literal[ + "qualified_entity_exceeds_ownership_threshold", + "qualifies_as_financial_institution", + ] + ] + """ + Reason for why the company is exempt from providing ownership information. + """ + + +class AccountCreateParamsIdentityAttestationsTermsOfService(TypedDict): + account: NotRequired[ + "AccountCreateParamsIdentityAttestationsTermsOfServiceAccount" + ] + """ + Details on the Account's acceptance of the [Stripe Services Agreement](https://docs.stripe.com/connect/updating-accounts#tos-acceptance). + """ + storer: NotRequired[ + "AccountCreateParamsIdentityAttestationsTermsOfServiceStorer" + ] + """ + Details on the Account's acceptance of Treasury-specific terms of service. + """ + + +class AccountCreateParamsIdentityAttestationsTermsOfServiceAccount(TypedDict): + date: str + """ + The time when the Account's representative accepted the terms of service. Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: 2022-09-18T13:22:18.123Z. + """ + ip: str + """ + The IP address from which the Account's representative accepted the terms of service. + """ + user_agent: NotRequired[str] + """ + The user agent of the browser from which the Account's representative accepted the terms of service. + """ + + +class AccountCreateParamsIdentityAttestationsTermsOfServiceStorer(TypedDict): + date: str + """ + The time when the Account's representative accepted the terms of service. Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: 2022-09-18T13:22:18.123Z. + """ + ip: str + """ + The IP address from which the Account's representative accepted the terms of service. + """ + user_agent: NotRequired[str] + """ + The user agent of the browser from which the Account's representative accepted the terms of service. + """ + + +class AccountCreateParamsIdentityBusinessDetails(TypedDict): + address: NotRequired["AccountCreateParamsIdentityBusinessDetailsAddress"] + """ + The business registration address of the business entity. + """ + annual_revenue: NotRequired[ + "AccountCreateParamsIdentityBusinessDetailsAnnualRevenue" + ] + """ + The business gross annual revenue for its preceding fiscal year. + """ + documents: NotRequired[ + "AccountCreateParamsIdentityBusinessDetailsDocuments" + ] + """ + A document verifying the business. + """ + estimated_worker_count: NotRequired[int] + """ + An estimated upper bound of employees, contractors, vendors, etc. currently working for the business. + """ + id_numbers: NotRequired[ + List["AccountCreateParamsIdentityBusinessDetailsIdNumber"] + ] + """ + The ID numbers of a business entity. + """ + monthly_estimated_revenue: NotRequired[ + "AccountCreateParamsIdentityBusinessDetailsMonthlyEstimatedRevenue" + ] + """ + An estimate of the monthly revenue of the business. + """ + phone: NotRequired[str] + """ + The phone number of the Business Entity. + """ + registered_name: NotRequired[str] + """ + The business legal name. + """ + script_addresses: NotRequired[ + "AccountCreateParamsIdentityBusinessDetailsScriptAddresses" + ] + """ + The business registration address of the business entity in non latin script. + """ + script_names: NotRequired[ + "AccountCreateParamsIdentityBusinessDetailsScriptNames" + ] + """ + The business legal name in non latin script. + """ + structure: NotRequired[ + Literal[ + "cooperative", + "free_zone_establishment", + "free_zone_llc", + "governmental_unit", + "government_instrumentality", + "incorporated_association", + "incorporated_non_profit", + "incorporated_partnership", + "limited_liability_partnership", + "llc", + "multi_member_llc", + "private_company", + "private_corporation", + "private_partnership", + "public_company", + "public_corporation", + "public_listed_corporation", + "public_partnership", + "registered_charity", + "single_member_llc", + "sole_establishment", + "sole_proprietorship", + "tax_exempt_government_instrumentality", + "trust", + "unincorporated_association", + "unincorporated_non_profit", + "unincorporated_partnership", + ] + ] + """ + The category identifying the legal structure of the business. + """ + + +class AccountCreateParamsIdentityBusinessDetailsAddress(TypedDict): + city: NotRequired[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[str] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ + line2: NotRequired[str] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ + postal_code: NotRequired[str] + """ + ZIP or postal code. + """ + state: NotRequired[str] + """ + State, county, province, or region. + """ + town: NotRequired[str] + """ + Town or cho-me. + """ + + +class AccountCreateParamsIdentityBusinessDetailsAnnualRevenue(TypedDict): + amount: NotRequired[AmountParam] + """ + A non-negative integer representing the amount in the smallest currency unit. + """ + fiscal_year_end: NotRequired[str] + """ + The close-out date of the preceding fiscal year in ISO 8601 format. E.g. 2023-12-31 for the 31st of December, 2023. + """ + + +class AccountCreateParamsIdentityBusinessDetailsDocuments(TypedDict): + bank_account_ownership_verification: NotRequired[ + "AccountCreateParamsIdentityBusinessDetailsDocumentsBankAccountOwnershipVerification" + ] + """ + One or more documents that support the bank account ownership verification requirement. Must be a document associated with the account's primary active bank account that displays the last 4 digits of the account number, either a statement or a check. + """ + company_license: NotRequired[ + "AccountCreateParamsIdentityBusinessDetailsDocumentsCompanyLicense" + ] + """ + One or more documents that demonstrate proof of a company's license to operate. + """ + company_memorandum_of_association: NotRequired[ + "AccountCreateParamsIdentityBusinessDetailsDocumentsCompanyMemorandumOfAssociation" + ] + """ + One or more documents showing the company's Memorandum of Association. + """ + company_ministerial_decree: NotRequired[ + "AccountCreateParamsIdentityBusinessDetailsDocumentsCompanyMinisterialDecree" + ] + """ + Certain countries only: One or more documents showing the ministerial decree legalizing the company's establishment. + """ + company_registration_verification: NotRequired[ + "AccountCreateParamsIdentityBusinessDetailsDocumentsCompanyRegistrationVerification" + ] + """ + One or more documents that demonstrate proof of a company's registration with the appropriate local authorities. + """ + company_tax_id_verification: NotRequired[ + "AccountCreateParamsIdentityBusinessDetailsDocumentsCompanyTaxIdVerification" + ] + """ + One or more documents that demonstrate proof of a company's tax ID. + """ + primary_verification: NotRequired[ + "AccountCreateParamsIdentityBusinessDetailsDocumentsPrimaryVerification" + ] + """ + A document verifying the business. + """ + proof_of_address: NotRequired[ + "AccountCreateParamsIdentityBusinessDetailsDocumentsProofOfAddress" + ] + """ + One or more documents that demonstrate proof of address. + """ + proof_of_registration: NotRequired[ + "AccountCreateParamsIdentityBusinessDetailsDocumentsProofOfRegistration" + ] + """ + One or more documents showing the company's proof of registration with the national business registry. + """ + proof_of_ultimate_beneficial_ownership: NotRequired[ + "AccountCreateParamsIdentityBusinessDetailsDocumentsProofOfUltimateBeneficialOwnership" + ] + """ + One or more documents that demonstrate proof of ultimate beneficial ownership. + """ + + +class AccountCreateParamsIdentityBusinessDetailsDocumentsBankAccountOwnershipVerification( + TypedDict, +): + files: List[str] + """ + One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. + """ + type: Literal["files"] + """ + The format of the document. Currently supports `files` only. + """ + + +class AccountCreateParamsIdentityBusinessDetailsDocumentsCompanyLicense( + TypedDict, +): + files: List[str] + """ + One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. + """ + type: Literal["files"] + """ + The format of the document. Currently supports `files` only. + """ + + +class AccountCreateParamsIdentityBusinessDetailsDocumentsCompanyMemorandumOfAssociation( + TypedDict, +): + files: List[str] + """ + One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. + """ + type: Literal["files"] + """ + The format of the document. Currently supports `files` only. + """ + + +class AccountCreateParamsIdentityBusinessDetailsDocumentsCompanyMinisterialDecree( + TypedDict, +): + files: List[str] + """ + One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. + """ + type: Literal["files"] + """ + The format of the document. Currently supports `files` only. + """ + + +class AccountCreateParamsIdentityBusinessDetailsDocumentsCompanyRegistrationVerification( + TypedDict, +): + files: List[str] + """ + One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. + """ + type: Literal["files"] + """ + The format of the document. Currently supports `files` only. + """ + + +class AccountCreateParamsIdentityBusinessDetailsDocumentsCompanyTaxIdVerification( + TypedDict, +): + files: List[str] + """ + One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. + """ + type: Literal["files"] + """ + The format of the document. Currently supports `files` only. + """ + + +class AccountCreateParamsIdentityBusinessDetailsDocumentsPrimaryVerification( + TypedDict, +): + front_back: "AccountCreateParamsIdentityBusinessDetailsDocumentsPrimaryVerificationFrontBack" + """ + The [file upload](https://docs.stripe.com/api/persons/update#create_file) tokens referring to each side of the document. + """ + type: Literal["front_back"] + """ + The format of the verification document. Currently supports `front_back` only. + """ + + +class AccountCreateParamsIdentityBusinessDetailsDocumentsPrimaryVerificationFrontBack( + TypedDict, +): + back: NotRequired[str] + """ + A [file upload](https://docs.stripe.com/api/persons/update#create_file) token representing the back of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + """ + front: str + """ + A [file upload](https://docs.stripe.com/api/persons/update#create_file) token representing the front of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + """ + + +class AccountCreateParamsIdentityBusinessDetailsDocumentsProofOfAddress( + TypedDict, +): + files: List[str] + """ + One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. + """ + type: Literal["files"] + """ + The format of the document. Currently supports `files` only. + """ + + +class AccountCreateParamsIdentityBusinessDetailsDocumentsProofOfRegistration( + TypedDict, +): + files: List[str] + """ + One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. + """ + type: Literal["files"] + """ + The format of the document. Currently supports `files` only. + """ + + +class AccountCreateParamsIdentityBusinessDetailsDocumentsProofOfUltimateBeneficialOwnership( + TypedDict, +): + files: List[str] + """ + One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. + """ + type: Literal["files"] + """ + The format of the document. Currently supports `files` only. + """ + + +class AccountCreateParamsIdentityBusinessDetailsIdNumber(TypedDict): + registrar: NotRequired[str] + """ + The registrar of the ID number (Only valid for DE ID number types). + """ + type: Literal[ + "ae_crn", + "ae_vat", + "ao_nif", + "at_fn", + "au_abn", + "au_acn", + "au_in", + "az_tin", + "bd_etin", + "be_cbe", + "bg_uic", + "br_cnpj", + "ca_cn", + "ca_crarr", + "ca_neq", + "ca_rid", + "ch_chid", + "ch_uid", + "cr_cpj", + "cr_nite", + "cy_tic", + "cz_ico", + "de_hrn", + "de_vat", + "dk_cvr", + "do_rcn", + "ee_rk", + "es_cif", + "fi_yt", + "fr_siren", + "fr_vat", + "gb_crn", + "gi_crn", + "gr_gemi", + "gt_nit", + "hk_br", + "hk_cr", + "hk_mbs", + "hu_cjs", + "ie_crn", + "it_rea", + "it_vat", + "jp_cn", + "kz_bin", + "li_uid", + "lt_ccrn", + "lu_rcs", + "lv_urn", + "mt_crn", + "mx_rfc", + "my_brn", + "my_coid", + "my_sst", + "mz_nuit", + "nl_kvk", + "no_orgnr", + "nz_bn", + "pe_ruc", + "pk_ntn", + "pl_regon", + "pt_vat", + "ro_cui", + "sa_crn", + "sa_tin", + "se_orgnr", + "sg_uen", + "si_msp", + "sk_ico", + "th_crn", + "th_prn", + "th_tin", + "us_ein", + ] + """ + Open Enum. The ID number type of a business entity. + """ + value: str + """ + The value of the ID number. + """ + + +class AccountCreateParamsIdentityBusinessDetailsMonthlyEstimatedRevenue( + TypedDict, +): + amount: NotRequired[AmountParam] + """ + A non-negative integer representing the amount in the smallest currency unit. + """ + + +class AccountCreateParamsIdentityBusinessDetailsScriptAddresses(TypedDict): + kana: NotRequired[ + "AccountCreateParamsIdentityBusinessDetailsScriptAddressesKana" + ] + """ + Kana Address. + """ + kanji: NotRequired[ + "AccountCreateParamsIdentityBusinessDetailsScriptAddressesKanji" + ] + """ + Kanji Address. + """ + + +class AccountCreateParamsIdentityBusinessDetailsScriptAddressesKana(TypedDict): + city: NotRequired[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[str] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ + line2: NotRequired[str] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ + postal_code: NotRequired[str] + """ + ZIP or postal code. + """ + state: NotRequired[str] + """ + State, county, province, or region. + """ + town: NotRequired[str] + """ + Town or cho-me. + """ + + +class AccountCreateParamsIdentityBusinessDetailsScriptAddressesKanji( + TypedDict +): + city: NotRequired[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[str] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ + line2: NotRequired[str] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ + postal_code: NotRequired[str] + """ + ZIP or postal code. + """ + state: NotRequired[str] + """ + State, county, province, or region. + """ + town: NotRequired[str] + """ + Town or cho-me. + """ + + +class AccountCreateParamsIdentityBusinessDetailsScriptNames(TypedDict): + kana: NotRequired[ + "AccountCreateParamsIdentityBusinessDetailsScriptNamesKana" + ] + """ + Kana name. + """ + kanji: NotRequired[ + "AccountCreateParamsIdentityBusinessDetailsScriptNamesKanji" + ] + """ + Kanji name. + """ + + +class AccountCreateParamsIdentityBusinessDetailsScriptNamesKana(TypedDict): + registered_name: NotRequired[str] + """ + Registered name of the business. + """ + + +class AccountCreateParamsIdentityBusinessDetailsScriptNamesKanji(TypedDict): + registered_name: NotRequired[str] + """ + Registered name of the business. + """ + + +class AccountCreateParamsIdentityIndividual(TypedDict): + additional_addresses: NotRequired[ + List["AccountCreateParamsIdentityIndividualAdditionalAddress"] + ] + """ + Additional addresses associated with the individual. + """ + additional_names: NotRequired[ + List["AccountCreateParamsIdentityIndividualAdditionalName"] + ] + """ + Additional names (e.g. aliases) associated with the individual. + """ + address: NotRequired["AccountCreateParamsIdentityIndividualAddress"] + """ + The individual's residential address. + """ + date_of_birth: NotRequired[ + "AccountCreateParamsIdentityIndividualDateOfBirth" + ] + """ + The individual's date of birth. + """ + documents: NotRequired["AccountCreateParamsIdentityIndividualDocuments"] + """ + Documents that may be submitted to satisfy various informational requests. + """ + email: NotRequired[str] + """ + The individual's email address. + """ + given_name: NotRequired[str] + """ + The individual's first name. + """ + id_numbers: NotRequired[ + List["AccountCreateParamsIdentityIndividualIdNumber"] + ] + """ + The identification numbers (e.g., SSN) associated with the individual. + """ + legal_gender: NotRequired[Literal["female", "male"]] + """ + The individual's gender (International regulations require either "male" or "female"). + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + """ + nationalities: NotRequired[List[str]] + """ + The countries where the individual is a national. Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + phone: NotRequired[str] + """ + The individual's phone number. + """ + political_exposure: NotRequired[Literal["existing", "none"]] + """ + The individual's political exposure. + """ + relationship: NotRequired[ + "AccountCreateParamsIdentityIndividualRelationship" + ] + """ + The relationship that this individual has with the account's identity. + """ + script_addresses: NotRequired[ + "AccountCreateParamsIdentityIndividualScriptAddresses" + ] + """ + The script addresses (e.g., non-Latin characters) associated with the individual. + """ + script_names: NotRequired[ + "AccountCreateParamsIdentityIndividualScriptNames" + ] + """ + The individuals primary name in non latin script. + """ + surname: NotRequired[str] + """ + The individual's last name. + """ + + +class AccountCreateParamsIdentityIndividualAdditionalAddress(TypedDict): + city: NotRequired[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[str] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ + line2: NotRequired[str] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ + postal_code: NotRequired[str] + """ + ZIP or postal code. + """ + purpose: Literal["registered"] + """ + Purpose of additional address. + """ + state: NotRequired[str] + """ + State, county, province, or region. + """ + town: NotRequired[str] + """ + Town or cho-me. + """ + + +class AccountCreateParamsIdentityIndividualAdditionalName(TypedDict): + full_name: NotRequired[str] + """ + The person's full name. + """ + given_name: NotRequired[str] + """ + The person's first or given name. + """ + purpose: Literal["alias", "maiden"] + """ + The purpose or type of the additional name. + """ + surname: NotRequired[str] + """ + The person's last or family name. + """ + + +class AccountCreateParamsIdentityIndividualAddress(TypedDict): + city: NotRequired[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[str] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ + line2: NotRequired[str] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ + postal_code: NotRequired[str] + """ + ZIP or postal code. + """ + state: NotRequired[str] + """ + State, county, province, or region. + """ + town: NotRequired[str] + """ + Town or cho-me. + """ + + +class AccountCreateParamsIdentityIndividualDateOfBirth(TypedDict): + day: int + """ + The day of birth. + """ + month: int + """ + The month of birth. + """ + year: int + """ + The year of birth. + """ + + +class AccountCreateParamsIdentityIndividualDocuments(TypedDict): + company_authorization: NotRequired[ + "AccountCreateParamsIdentityIndividualDocumentsCompanyAuthorization" + ] + """ + One or more documents that demonstrate proof that this person is authorized to represent the company. + """ + passport: NotRequired[ + "AccountCreateParamsIdentityIndividualDocumentsPassport" + ] + """ + One or more documents showing the person's passport page with photo and personal data. + """ + primary_verification: NotRequired[ + "AccountCreateParamsIdentityIndividualDocumentsPrimaryVerification" + ] + """ + An identifying document showing the person's name, either a passport or local ID card. + """ + secondary_verification: NotRequired[ + "AccountCreateParamsIdentityIndividualDocumentsSecondaryVerification" + ] + """ + A document showing address, either a passport, local ID card, or utility bill from a well-known utility company. + """ + visa: NotRequired["AccountCreateParamsIdentityIndividualDocumentsVisa"] + """ + One or more documents showing the person's visa required for living in the country where they are residing. + """ + + +class AccountCreateParamsIdentityIndividualDocumentsCompanyAuthorization( + TypedDict, +): + files: List[str] + """ + One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. + """ + type: Literal["files"] + """ + The format of the document. Currently supports `files` only. + """ + + +class AccountCreateParamsIdentityIndividualDocumentsPassport(TypedDict): + files: List[str] + """ + One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. + """ + type: Literal["files"] + """ + The format of the document. Currently supports `files` only. + """ + + +class AccountCreateParamsIdentityIndividualDocumentsPrimaryVerification( + TypedDict, +): + front_back: "AccountCreateParamsIdentityIndividualDocumentsPrimaryVerificationFrontBack" + """ + The [file upload](https://docs.stripe.com/api/persons/update#create_file) tokens referring to each side of the document. + """ + type: Literal["front_back"] + """ + The format of the verification document. Currently supports `front_back` only. + """ + + +class AccountCreateParamsIdentityIndividualDocumentsPrimaryVerificationFrontBack( + TypedDict, +): + back: NotRequired[str] + """ + A [file upload](https://docs.stripe.com/api/persons/update#create_file) token representing the back of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + """ + front: str + """ + A [file upload](https://docs.stripe.com/api/persons/update#create_file) token representing the front of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + """ + + +class AccountCreateParamsIdentityIndividualDocumentsSecondaryVerification( + TypedDict, +): + front_back: "AccountCreateParamsIdentityIndividualDocumentsSecondaryVerificationFrontBack" + """ + The [file upload](https://docs.stripe.com/api/persons/update#create_file) tokens referring to each side of the document. + """ + type: Literal["front_back"] + """ + The format of the verification document. Currently supports `front_back` only. + """ + + +class AccountCreateParamsIdentityIndividualDocumentsSecondaryVerificationFrontBack( + TypedDict, +): + back: NotRequired[str] + """ + A [file upload](https://docs.stripe.com/api/persons/update#create_file) token representing the back of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + """ + front: str + """ + A [file upload](https://docs.stripe.com/api/persons/update#create_file) token representing the front of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + """ + + +class AccountCreateParamsIdentityIndividualDocumentsVisa(TypedDict): + files: List[str] + """ + One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. + """ + type: Literal["files"] + """ + The format of the document. Currently supports `files` only. + """ + + +class AccountCreateParamsIdentityIndividualIdNumber(TypedDict): + type: Literal[ + "ae_eid", + "ao_nif", + "az_tin", + "bd_brc", + "bd_etin", + "bd_nid", + "br_cpf", + "cr_cpf", + "cr_dimex", + "cr_nite", + "de_stn", + "do_rcn", + "gt_nit", + "hk_id", + "kz_iin", + "mx_rfc", + "my_nric", + "mz_nuit", + "nl_bsn", + "pe_dni", + "pk_cnic", + "pk_snic", + "sa_tin", + "sg_fin", + "sg_nric", + "th_lc", + "th_pin", + "us_itin", + "us_itin_last_4", + "us_ssn", + "us_ssn_last_4", + ] + """ + The ID number type of an individual. + """ + value: str + """ + The value of the ID number. + """ + + +class AccountCreateParamsIdentityIndividualRelationship(TypedDict): + director: NotRequired[bool] + """ + Whether the person is a director of the account's identity. Directors are typically members of the governing board of the company, or responsible for ensuring the company meets its regulatory obligations. + """ + executive: NotRequired[bool] + """ + Whether the person has significant responsibility to control, manage, or direct the organization. + """ + owner: NotRequired[bool] + """ + Whether the person is an owner of the account's identity. + """ + percent_ownership: NotRequired[str] + """ + The percent owned by the person of the account's legal entity. + """ + title: NotRequired[str] + """ + The person's title (e.g., CEO, Support Engineer). + """ + + +class AccountCreateParamsIdentityIndividualScriptAddresses(TypedDict): + kana: NotRequired[ + "AccountCreateParamsIdentityIndividualScriptAddressesKana" + ] + """ + Kana Address. + """ + kanji: NotRequired[ + "AccountCreateParamsIdentityIndividualScriptAddressesKanji" + ] + """ + Kanji Address. + """ + + +class AccountCreateParamsIdentityIndividualScriptAddressesKana(TypedDict): + city: NotRequired[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[str] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ + line2: NotRequired[str] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ + postal_code: NotRequired[str] + """ + ZIP or postal code. + """ + state: NotRequired[str] + """ + State, county, province, or region. + """ + town: NotRequired[str] + """ + Town or cho-me. + """ + + +class AccountCreateParamsIdentityIndividualScriptAddressesKanji(TypedDict): + city: NotRequired[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[str] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ + line2: NotRequired[str] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ + postal_code: NotRequired[str] + """ + ZIP or postal code. + """ + state: NotRequired[str] + """ + State, county, province, or region. + """ + town: NotRequired[str] + """ + Town or cho-me. + """ + + +class AccountCreateParamsIdentityIndividualScriptNames(TypedDict): + kana: NotRequired["AccountCreateParamsIdentityIndividualScriptNamesKana"] + """ + Persons name in kana script. + """ + kanji: NotRequired["AccountCreateParamsIdentityIndividualScriptNamesKanji"] + """ + Persons name in kanji script. + """ + + +class AccountCreateParamsIdentityIndividualScriptNamesKana(TypedDict): + given_name: NotRequired[str] + """ + The person's first or given name. + """ + surname: NotRequired[str] + """ + The person's last or family name. + """ + + +class AccountCreateParamsIdentityIndividualScriptNamesKanji(TypedDict): + given_name: NotRequired[str] + """ + The person's first or given name. + """ + surname: NotRequired[str] + """ + The person's last or family name. + """ diff --git a/stripe/params/v2/core/_account_link_create_params.py b/stripe/params/v2/core/_account_link_create_params.py new file mode 100644 index 000000000..47ff6149c --- /dev/null +++ b/stripe/params/v2/core/_account_link_create_params.py @@ -0,0 +1,102 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import Literal, NotRequired, TypedDict + + +class AccountLinkCreateParams(TypedDict): + account: str + """ + The ID of the Account to create link for. + """ + use_case: "AccountLinkCreateParamsUseCase" + """ + The use case of the AccountLink. + """ + + +class AccountLinkCreateParamsUseCase(TypedDict): + type: Literal["account_onboarding", "account_update"] + """ + Open Enum. The type of AccountLink the user is requesting. + """ + account_onboarding: NotRequired[ + "AccountLinkCreateParamsUseCaseAccountOnboarding" + ] + """ + Indicates that the AccountLink provided should onboard an account. + """ + account_update: NotRequired["AccountLinkCreateParamsUseCaseAccountUpdate"] + """ + Indicates that the AccountLink provided should update a previously onboarded account. + """ + + +class AccountLinkCreateParamsUseCaseAccountOnboarding(TypedDict): + collection_options: NotRequired[ + "AccountLinkCreateParamsUseCaseAccountOnboardingCollectionOptions" + ] + """ + Specifies the requirements that Stripe collects from v2/core/accounts in the Onboarding flow. + """ + configurations: List[ + Literal["customer", "merchant", "recipient", "storer"] + ] + """ + Open Enum. A v2/core/account can be configured to enable certain functionality. The configuration param targets the v2/core/account_link to collect information for the specified v2/core/account configuration/s. + """ + refresh_url: str + """ + The URL the user will be redirected to if the AccountLink is expired, has been used, or is otherwise invalid. The URL you specify should attempt to generate a new AccountLink with the same parameters used to create the original AccountLink, then redirect the user to the new AccountLink's URL so they can continue the flow. If a new AccountLink cannot be generated or the redirect fails you should display a useful error to the user. Please make sure to implement authentication before redirecting the user in case this URL is leaked to a third party. + """ + return_url: NotRequired[str] + """ + The URL that the user will be redirected to upon completing the linked flow. + """ + + +class AccountLinkCreateParamsUseCaseAccountOnboardingCollectionOptions( + TypedDict, +): + fields: NotRequired[Literal["currently_due", "eventually_due"]] + """ + Specifies whether the platform collects only currently_due requirements (`currently_due`) or both currently_due and eventually_due requirements (`eventually_due`). If you don't specify collection_options, the default value is currently_due. + """ + future_requirements: NotRequired[Literal["include", "omit"]] + """ + Specifies whether the platform collects future_requirements in addition to requirements in Connect Onboarding. The default value is `omit`. + """ + + +class AccountLinkCreateParamsUseCaseAccountUpdate(TypedDict): + collection_options: NotRequired[ + "AccountLinkCreateParamsUseCaseAccountUpdateCollectionOptions" + ] + """ + Specifies the requirements that Stripe collects from v2/core/accounts in the Onboarding flow. + """ + configurations: List[ + Literal["customer", "merchant", "recipient", "storer"] + ] + """ + Open Enum. A v2/account can be configured to enable certain functionality. The configuration param targets the v2/account_link to collect information for the specified v2/account configuration/s. + """ + refresh_url: str + """ + The URL the user will be redirected to if the AccountLink is expired, has been used, or is otherwise invalid. The URL you specify should attempt to generate a new AccountLink with the same parameters used to create the original AccountLink, then redirect the user to the new AccountLink's URL so they can continue the flow. If a new AccountLink cannot be generated or the redirect fails you should display a useful error to the user. Please make sure to implement authentication before redirecting the user in case this URL is leaked to a third party. + """ + return_url: NotRequired[str] + """ + The URL that the user will be redirected to upon completing the linked flow. + """ + + +class AccountLinkCreateParamsUseCaseAccountUpdateCollectionOptions(TypedDict): + fields: NotRequired[Literal["currently_due", "eventually_due"]] + """ + Specifies whether the platform collects only currently_due requirements (`currently_due`) or both currently_due and eventually_due requirements (`eventually_due`). If you don't specify collection_options, the default value is currently_due. + """ + future_requirements: NotRequired[Literal["include", "omit"]] + """ + Specifies whether the platform collects future_requirements in addition to requirements in Connect Onboarding. The default value is `omit`. + """ diff --git a/stripe/params/v2/core/_account_list_params.py b/stripe/params/v2/core/_account_list_params.py new file mode 100644 index 000000000..18b4dee2d --- /dev/null +++ b/stripe/params/v2/core/_account_list_params.py @@ -0,0 +1,15 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import NotRequired, TypedDict + + +class AccountListParams(TypedDict): + applied_configurations: NotRequired[List[str]] + """ + Filter only accounts that have all of the configurations specified. If omitted, returns all accounts regardless of which configurations they have. + """ + limit: NotRequired[int] + """ + The upper limit on the number of accounts returned by the List Account request. + """ diff --git a/stripe/params/v2/core/_account_retrieve_params.py b/stripe/params/v2/core/_account_retrieve_params.py new file mode 100644 index 000000000..ccbfd208b --- /dev/null +++ b/stripe/params/v2/core/_account_retrieve_params.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import Literal, NotRequired, TypedDict + + +class AccountRetrieveParams(TypedDict): + include: NotRequired[ + List[ + Literal[ + "configuration.customer", + "configuration.merchant", + "configuration.recipient", + "configuration.storer", + "defaults", + "identity", + "requirements", + ] + ] + ] + """ + Additional fields to include in the response. + """ diff --git a/stripe/params/v2/core/_account_update_params.py b/stripe/params/v2/core/_account_update_params.py new file mode 100644 index 000000000..85de38400 --- /dev/null +++ b/stripe/params/v2/core/_account_update_params.py @@ -0,0 +1,2686 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe.v2._amount import AmountParam +from typing import Dict, List, Optional +from typing_extensions import Literal, NotRequired, TypedDict + + +class AccountUpdateParams(TypedDict): + configuration: NotRequired["AccountUpdateParamsConfiguration"] + """ + An Account Configuration which allows the Account to take on a key persona across Stripe products. + """ + contact_email: NotRequired[str] + """ + The default contact email address for the Account. Required when configuring the account as a merchant or recipient. + """ + dashboard: NotRequired[Literal["express", "full", "none"]] + """ + A value indicating the Stripe dashboard this Account has access to. This will depend on which configurations are enabled for this account. + """ + defaults: NotRequired["AccountUpdateParamsDefaults"] + """ + Default values to be used on Account Configurations. + """ + display_name: NotRequired[str] + """ + A descriptive name for the Account. This name will be surfaced in the Stripe Dashboard and on any invoices sent to the Account. + """ + identity: NotRequired["AccountUpdateParamsIdentity"] + """ + Information about the company, individual, and business represented by the Account. + """ + include: NotRequired[ + List[ + Literal[ + "configuration.customer", + "configuration.merchant", + "configuration.recipient", + "configuration.storer", + "defaults", + "identity", + "requirements", + ] + ] + ] + """ + Additional fields to include in the response. + """ + metadata: NotRequired[Dict[str, Optional[str]]] + """ + Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + """ + + +class AccountUpdateParamsConfiguration(TypedDict): + customer: NotRequired["AccountUpdateParamsConfigurationCustomer"] + """ + The Customer Configuration allows the Account to be charged. + """ + merchant: NotRequired["AccountUpdateParamsConfigurationMerchant"] + """ + The Merchant configuration allows the Account to act as a connected account and collect payments facilitated by a Connect platform. You can add this configuration to your connected accounts only if you've completed onboarding as a Connect platform. + """ + recipient: NotRequired["AccountUpdateParamsConfigurationRecipient"] + """ + The Recipient Configuration allows the Account to receive funds. + """ + storer: NotRequired["AccountUpdateParamsConfigurationStorer"] + """ + The Storer Configuration allows the Account to store and move funds using stored-value FinancialAccounts. + """ + + +class AccountUpdateParamsConfigurationCustomer(TypedDict): + applied: NotRequired[bool] + """ + Represents the state of the configuration, and can be updated to deactivate or re-apply a configuration. + """ + automatic_indirect_tax: NotRequired[ + "AccountUpdateParamsConfigurationCustomerAutomaticIndirectTax" + ] + """ + Automatic indirect tax settings to be used when automatic tax calculation is enabled on the customer's invoices, subscriptions, checkout sessions, or payment links. Surfaces if automatic tax calculation is possible given the current customer location information. + """ + billing: NotRequired["AccountUpdateParamsConfigurationCustomerBilling"] + """ + Billing settings - default settings used for this customer in Billing flows such as Invoices and Subscriptions. + """ + capabilities: NotRequired[ + "AccountUpdateParamsConfigurationCustomerCapabilities" + ] + """ + Capabilities that have been requested on the Customer Configuration. + """ + shipping: NotRequired["AccountUpdateParamsConfigurationCustomerShipping"] + """ + The customer's shipping information. Appears on invoices emailed to this customer. + """ + test_clock: NotRequired[str] + """ + ID of the test clock to attach to the customer. Can only be set on testmode Accounts, and when the Customer Configuration is first set on an Account. + """ + + +class AccountUpdateParamsConfigurationCustomerAutomaticIndirectTax(TypedDict): + exempt: NotRequired[Literal["exempt", "none", "reverse"]] + """ + Describes the customer's tax exemption status, which is `none`, `exempt`, or `reverse`. When set to reverse, invoice and receipt PDFs include the following text: “Reverse charge”. + """ + ip_address: NotRequired[str] + """ + A recent IP address of the customer used for tax reporting and tax location inference. + """ + location_source: NotRequired[ + Literal["identity_address", "ip_address", "shipping_address"] + ] + """ + The data source used to identify the customer's tax location - defaults to 'identity_address'. Will only be used for automatic tax calculation on the customer's Invoices and Subscriptions. + """ + validate_location: NotRequired[Literal["auto", "deferred", "immediately"]] + """ + A per-request flag that indicates when Stripe should validate the customer tax location - defaults to 'auto'. + """ + + +class AccountUpdateParamsConfigurationCustomerBilling(TypedDict): + default_payment_method: NotRequired[str] + """ + ID of a payment method that's attached to the customer, to be used as the customer's default payment method for invoices and subscriptions. + """ + invoice: NotRequired[ + "AccountUpdateParamsConfigurationCustomerBillingInvoice" + ] + """ + Default settings used on invoices for this customer. + """ + + +class AccountUpdateParamsConfigurationCustomerBillingInvoice(TypedDict): + custom_fields: NotRequired[ + List[ + "AccountUpdateParamsConfigurationCustomerBillingInvoiceCustomField" + ] + ] + """ + The list of up to 4 default custom fields to be displayed on invoices for this customer. + """ + footer: NotRequired[str] + """ + Default footer to be displayed on invoices for this customer. + """ + next_sequence: NotRequired[int] + """ + The sequence to be used on the customer's next invoice. Defaults to 1. + """ + prefix: NotRequired[str] + """ + The prefix for the customer used to generate unique invoice numbers. Must be 3–12 uppercase letters or numbers. + """ + rendering: NotRequired[ + "AccountUpdateParamsConfigurationCustomerBillingInvoiceRendering" + ] + """ + Default options for invoice PDF rendering for this customer. + """ + + +class AccountUpdateParamsConfigurationCustomerBillingInvoiceCustomField( + TypedDict, +): + name: str + """ + The name of the custom field. This may be up to 40 characters. + """ + value: str + """ + The value of the custom field. This may be up to 140 characters. When updating, pass an empty string to remove previously-defined values. + """ + + +class AccountUpdateParamsConfigurationCustomerBillingInvoiceRendering( + TypedDict, +): + amount_tax_display: NotRequired[ + Literal["exclude_tax", "include_inclusive_tax"] + ] + """ + How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One of exclude_tax or include_inclusive_tax. include_inclusive_tax will include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. exclude_tax will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts. + """ + template: NotRequired[str] + """ + ID of the invoice rendering template to use for future invoices. + """ + + +class AccountUpdateParamsConfigurationCustomerCapabilities(TypedDict): + automatic_indirect_tax: NotRequired[ + "AccountUpdateParamsConfigurationCustomerCapabilitiesAutomaticIndirectTax" + ] + """ + Generates requirements for enabling automatic indirect tax calculation on this customer's invoices or subscriptions. Recommended to request this capability if planning to enable automatic tax calculation on this customer's invoices or subscriptions. Uses the `location_source` field. + """ + + +class AccountUpdateParamsConfigurationCustomerCapabilitiesAutomaticIndirectTax( + TypedDict, +): + requested: NotRequired[bool] + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountUpdateParamsConfigurationCustomerShipping(TypedDict): + address: NotRequired[ + "AccountUpdateParamsConfigurationCustomerShippingAddress" + ] + """ + Customer shipping address. + """ + name: NotRequired[str] + """ + Customer name. + """ + phone: NotRequired[str] + """ + Customer phone (including extension). + """ + + +class AccountUpdateParamsConfigurationCustomerShippingAddress(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 (e.g., street, PO Box, or company name). + """ + line2: NotRequired[str] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ + postal_code: NotRequired[str] + """ + ZIP or postal code. + """ + state: NotRequired[str] + """ + State, county, province, or region. + """ + + +class AccountUpdateParamsConfigurationMerchant(TypedDict): + applied: NotRequired[bool] + """ + Represents the state of the configuration, and can be updated to deactivate or re-apply a configuration. + """ + bacs_debit_payments: NotRequired[ + "AccountUpdateParamsConfigurationMerchantBacsDebitPayments" + ] + """ + Settings used for Bacs debit payments. + """ + branding: NotRequired["AccountUpdateParamsConfigurationMerchantBranding"] + """ + Settings used to apply the merchant's branding to email receipts, invoices, Checkout, and other products. + """ + capabilities: NotRequired[ + "AccountUpdateParamsConfigurationMerchantCapabilities" + ] + """ + Capabilities to request on the Merchant Configuration. + """ + card_payments: NotRequired[ + "AccountUpdateParamsConfigurationMerchantCardPayments" + ] + """ + Card payments settings. + """ + mcc: NotRequired[str] + """ + The merchant category code for the merchant. MCCs are used to classify businesses based on the goods or services they provide. + """ + statement_descriptor: NotRequired[ + "AccountUpdateParamsConfigurationMerchantStatementDescriptor" + ] + """ + Statement descriptor. + """ + support: NotRequired["AccountUpdateParamsConfigurationMerchantSupport"] + """ + Publicly available contact information for sending support issues to. + """ + + +class AccountUpdateParamsConfigurationMerchantBacsDebitPayments(TypedDict): + display_name: NotRequired[str] + """ + Display name for Bacs debit payments. + """ + + +class AccountUpdateParamsConfigurationMerchantBranding(TypedDict): + icon: NotRequired[str] + """ + ID of a [file upload](https://docs.stripe.com/api/persons/update#create_file): An icon for the merchant. Must be square and at least 128px x 128px. + """ + logo: NotRequired[str] + """ + ID of a [file upload](https://docs.stripe.com/api/persons/update#create_file): A logo for the merchant that will be used in Checkout instead of the icon and without the merchant's name next to it if provided. Must be at least 128px x 128px. + """ + primary_color: NotRequired[str] + """ + A CSS hex color value representing the primary branding color for the merchant. + """ + secondary_color: NotRequired[str] + """ + A CSS hex color value representing the secondary branding color for the merchant. + """ + + +class AccountUpdateParamsConfigurationMerchantCapabilities(TypedDict): + ach_debit_payments: NotRequired[ + "AccountUpdateParamsConfigurationMerchantCapabilitiesAchDebitPayments" + ] + """ + Allow the merchant to process ACH debit payments. + """ + acss_debit_payments: NotRequired[ + "AccountUpdateParamsConfigurationMerchantCapabilitiesAcssDebitPayments" + ] + """ + Allow the merchant to process ACSS debit payments. + """ + affirm_payments: NotRequired[ + "AccountUpdateParamsConfigurationMerchantCapabilitiesAffirmPayments" + ] + """ + Allow the merchant to process Affirm payments. + """ + afterpay_clearpay_payments: NotRequired[ + "AccountUpdateParamsConfigurationMerchantCapabilitiesAfterpayClearpayPayments" + ] + """ + Allow the merchant to process Afterpay/Clearpay payments. + """ + alma_payments: NotRequired[ + "AccountUpdateParamsConfigurationMerchantCapabilitiesAlmaPayments" + ] + """ + Allow the merchant to process Alma payments. + """ + amazon_pay_payments: NotRequired[ + "AccountUpdateParamsConfigurationMerchantCapabilitiesAmazonPayPayments" + ] + """ + Allow the merchant to process Amazon Pay payments. + """ + au_becs_debit_payments: NotRequired[ + "AccountUpdateParamsConfigurationMerchantCapabilitiesAuBecsDebitPayments" + ] + """ + Allow the merchant to process Australian BECS Direct Debit payments. + """ + bacs_debit_payments: NotRequired[ + "AccountUpdateParamsConfigurationMerchantCapabilitiesBacsDebitPayments" + ] + """ + Allow the merchant to process BACS Direct Debit payments. + """ + bancontact_payments: NotRequired[ + "AccountUpdateParamsConfigurationMerchantCapabilitiesBancontactPayments" + ] + """ + Allow the merchant to process Bancontact payments. + """ + blik_payments: NotRequired[ + "AccountUpdateParamsConfigurationMerchantCapabilitiesBlikPayments" + ] + """ + Allow the merchant to process BLIK payments. + """ + boleto_payments: NotRequired[ + "AccountUpdateParamsConfigurationMerchantCapabilitiesBoletoPayments" + ] + """ + Allow the merchant to process Boleto payments. + """ + card_payments: NotRequired[ + "AccountUpdateParamsConfigurationMerchantCapabilitiesCardPayments" + ] + """ + Allow the merchant to collect card payments. + """ + cartes_bancaires_payments: NotRequired[ + "AccountUpdateParamsConfigurationMerchantCapabilitiesCartesBancairesPayments" + ] + """ + Allow the merchant to process Cartes Bancaires payments. + """ + cashapp_payments: NotRequired[ + "AccountUpdateParamsConfigurationMerchantCapabilitiesCashappPayments" + ] + """ + Allow the merchant to process Cash App payments. + """ + eps_payments: NotRequired[ + "AccountUpdateParamsConfigurationMerchantCapabilitiesEpsPayments" + ] + """ + Allow the merchant to process EPS payments. + """ + fpx_payments: NotRequired[ + "AccountUpdateParamsConfigurationMerchantCapabilitiesFpxPayments" + ] + """ + Allow the merchant to process FPX payments. + """ + gb_bank_transfer_payments: NotRequired[ + "AccountUpdateParamsConfigurationMerchantCapabilitiesGbBankTransferPayments" + ] + """ + Allow the merchant to process UK bank transfer payments. + """ + grabpay_payments: NotRequired[ + "AccountUpdateParamsConfigurationMerchantCapabilitiesGrabpayPayments" + ] + """ + Allow the merchant to process GrabPay payments. + """ + ideal_payments: NotRequired[ + "AccountUpdateParamsConfigurationMerchantCapabilitiesIdealPayments" + ] + """ + Allow the merchant to process iDEAL payments. + """ + jcb_payments: NotRequired[ + "AccountUpdateParamsConfigurationMerchantCapabilitiesJcbPayments" + ] + """ + Allow the merchant to process JCB card payments. + """ + jp_bank_transfer_payments: NotRequired[ + "AccountUpdateParamsConfigurationMerchantCapabilitiesJpBankTransferPayments" + ] + """ + Allow the merchant to process Japanese bank transfer payments. + """ + kakao_pay_payments: NotRequired[ + "AccountUpdateParamsConfigurationMerchantCapabilitiesKakaoPayPayments" + ] + """ + Allow the merchant to process Kakao Pay payments. + """ + klarna_payments: NotRequired[ + "AccountUpdateParamsConfigurationMerchantCapabilitiesKlarnaPayments" + ] + """ + Allow the merchant to process Klarna payments. + """ + konbini_payments: NotRequired[ + "AccountUpdateParamsConfigurationMerchantCapabilitiesKonbiniPayments" + ] + """ + Allow the merchant to process Konbini convenience store payments. + """ + kr_card_payments: NotRequired[ + "AccountUpdateParamsConfigurationMerchantCapabilitiesKrCardPayments" + ] + """ + Allow the merchant to process Korean card payments. + """ + link_payments: NotRequired[ + "AccountUpdateParamsConfigurationMerchantCapabilitiesLinkPayments" + ] + """ + Allow the merchant to process Link payments. + """ + mobilepay_payments: NotRequired[ + "AccountUpdateParamsConfigurationMerchantCapabilitiesMobilepayPayments" + ] + """ + Allow the merchant to process MobilePay payments. + """ + multibanco_payments: NotRequired[ + "AccountUpdateParamsConfigurationMerchantCapabilitiesMultibancoPayments" + ] + """ + Allow the merchant to process Multibanco payments. + """ + mx_bank_transfer_payments: NotRequired[ + "AccountUpdateParamsConfigurationMerchantCapabilitiesMxBankTransferPayments" + ] + """ + Allow the merchant to process Mexican bank transfer payments. + """ + naver_pay_payments: NotRequired[ + "AccountUpdateParamsConfigurationMerchantCapabilitiesNaverPayPayments" + ] + """ + Allow the merchant to process Naver Pay payments. + """ + oxxo_payments: NotRequired[ + "AccountUpdateParamsConfigurationMerchantCapabilitiesOxxoPayments" + ] + """ + Allow the merchant to process OXXO payments. + """ + p24_payments: NotRequired[ + "AccountUpdateParamsConfigurationMerchantCapabilitiesP24Payments" + ] + """ + Allow the merchant to process Przelewy24 (P24) payments. + """ + pay_by_bank_payments: NotRequired[ + "AccountUpdateParamsConfigurationMerchantCapabilitiesPayByBankPayments" + ] + """ + Allow the merchant to process Pay by Bank payments. + """ + payco_payments: NotRequired[ + "AccountUpdateParamsConfigurationMerchantCapabilitiesPaycoPayments" + ] + """ + Allow the merchant to process PAYCO payments. + """ + paynow_payments: NotRequired[ + "AccountUpdateParamsConfigurationMerchantCapabilitiesPaynowPayments" + ] + """ + Allow the merchant to process PayNow payments. + """ + promptpay_payments: NotRequired[ + "AccountUpdateParamsConfigurationMerchantCapabilitiesPromptpayPayments" + ] + """ + Allow the merchant to process PromptPay payments. + """ + revolut_pay_payments: NotRequired[ + "AccountUpdateParamsConfigurationMerchantCapabilitiesRevolutPayPayments" + ] + """ + Allow the merchant to process Revolut Pay payments. + """ + samsung_pay_payments: NotRequired[ + "AccountUpdateParamsConfigurationMerchantCapabilitiesSamsungPayPayments" + ] + """ + Allow the merchant to process Samsung Pay payments. + """ + sepa_bank_transfer_payments: NotRequired[ + "AccountUpdateParamsConfigurationMerchantCapabilitiesSepaBankTransferPayments" + ] + """ + Allow the merchant to process SEPA bank transfer payments. + """ + sepa_debit_payments: NotRequired[ + "AccountUpdateParamsConfigurationMerchantCapabilitiesSepaDebitPayments" + ] + """ + Allow the merchant to process SEPA Direct Debit payments. + """ + swish_payments: NotRequired[ + "AccountUpdateParamsConfigurationMerchantCapabilitiesSwishPayments" + ] + """ + Allow the merchant to process Swish payments. + """ + twint_payments: NotRequired[ + "AccountUpdateParamsConfigurationMerchantCapabilitiesTwintPayments" + ] + """ + Allow the merchant to process TWINT payments. + """ + us_bank_transfer_payments: NotRequired[ + "AccountUpdateParamsConfigurationMerchantCapabilitiesUsBankTransferPayments" + ] + """ + Allow the merchant to process US bank transfer payments. + """ + zip_payments: NotRequired[ + "AccountUpdateParamsConfigurationMerchantCapabilitiesZipPayments" + ] + """ + Allow the merchant to process Zip payments. + """ + + +class AccountUpdateParamsConfigurationMerchantCapabilitiesAchDebitPayments( + TypedDict, +): + requested: NotRequired[bool] + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountUpdateParamsConfigurationMerchantCapabilitiesAcssDebitPayments( + TypedDict, +): + requested: NotRequired[bool] + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountUpdateParamsConfigurationMerchantCapabilitiesAffirmPayments( + TypedDict, +): + requested: NotRequired[bool] + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountUpdateParamsConfigurationMerchantCapabilitiesAfterpayClearpayPayments( + TypedDict, +): + requested: NotRequired[bool] + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountUpdateParamsConfigurationMerchantCapabilitiesAlmaPayments( + TypedDict, +): + requested: NotRequired[bool] + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountUpdateParamsConfigurationMerchantCapabilitiesAmazonPayPayments( + TypedDict, +): + requested: NotRequired[bool] + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountUpdateParamsConfigurationMerchantCapabilitiesAuBecsDebitPayments( + TypedDict, +): + requested: NotRequired[bool] + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountUpdateParamsConfigurationMerchantCapabilitiesBacsDebitPayments( + TypedDict, +): + requested: NotRequired[bool] + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountUpdateParamsConfigurationMerchantCapabilitiesBancontactPayments( + TypedDict, +): + requested: NotRequired[bool] + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountUpdateParamsConfigurationMerchantCapabilitiesBlikPayments( + TypedDict, +): + requested: NotRequired[bool] + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountUpdateParamsConfigurationMerchantCapabilitiesBoletoPayments( + TypedDict, +): + requested: NotRequired[bool] + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountUpdateParamsConfigurationMerchantCapabilitiesCardPayments( + TypedDict, +): + requested: NotRequired[bool] + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountUpdateParamsConfigurationMerchantCapabilitiesCartesBancairesPayments( + TypedDict, +): + requested: NotRequired[bool] + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountUpdateParamsConfigurationMerchantCapabilitiesCashappPayments( + TypedDict, +): + requested: NotRequired[bool] + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountUpdateParamsConfigurationMerchantCapabilitiesEpsPayments( + TypedDict, +): + requested: NotRequired[bool] + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountUpdateParamsConfigurationMerchantCapabilitiesFpxPayments( + TypedDict, +): + requested: NotRequired[bool] + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountUpdateParamsConfigurationMerchantCapabilitiesGbBankTransferPayments( + TypedDict, +): + requested: NotRequired[bool] + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountUpdateParamsConfigurationMerchantCapabilitiesGrabpayPayments( + TypedDict, +): + requested: NotRequired[bool] + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountUpdateParamsConfigurationMerchantCapabilitiesIdealPayments( + TypedDict, +): + requested: NotRequired[bool] + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountUpdateParamsConfigurationMerchantCapabilitiesJcbPayments( + TypedDict, +): + requested: NotRequired[bool] + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountUpdateParamsConfigurationMerchantCapabilitiesJpBankTransferPayments( + TypedDict, +): + requested: NotRequired[bool] + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountUpdateParamsConfigurationMerchantCapabilitiesKakaoPayPayments( + TypedDict, +): + requested: NotRequired[bool] + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountUpdateParamsConfigurationMerchantCapabilitiesKlarnaPayments( + TypedDict, +): + requested: NotRequired[bool] + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountUpdateParamsConfigurationMerchantCapabilitiesKonbiniPayments( + TypedDict, +): + requested: NotRequired[bool] + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountUpdateParamsConfigurationMerchantCapabilitiesKrCardPayments( + TypedDict, +): + requested: NotRequired[bool] + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountUpdateParamsConfigurationMerchantCapabilitiesLinkPayments( + TypedDict, +): + requested: NotRequired[bool] + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountUpdateParamsConfigurationMerchantCapabilitiesMobilepayPayments( + TypedDict, +): + requested: NotRequired[bool] + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountUpdateParamsConfigurationMerchantCapabilitiesMultibancoPayments( + TypedDict, +): + requested: NotRequired[bool] + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountUpdateParamsConfigurationMerchantCapabilitiesMxBankTransferPayments( + TypedDict, +): + requested: NotRequired[bool] + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountUpdateParamsConfigurationMerchantCapabilitiesNaverPayPayments( + TypedDict, +): + requested: NotRequired[bool] + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountUpdateParamsConfigurationMerchantCapabilitiesOxxoPayments( + TypedDict, +): + requested: NotRequired[bool] + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountUpdateParamsConfigurationMerchantCapabilitiesP24Payments( + TypedDict, +): + requested: NotRequired[bool] + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountUpdateParamsConfigurationMerchantCapabilitiesPayByBankPayments( + TypedDict, +): + requested: NotRequired[bool] + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountUpdateParamsConfigurationMerchantCapabilitiesPaycoPayments( + TypedDict, +): + requested: NotRequired[bool] + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountUpdateParamsConfigurationMerchantCapabilitiesPaynowPayments( + TypedDict, +): + requested: NotRequired[bool] + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountUpdateParamsConfigurationMerchantCapabilitiesPromptpayPayments( + TypedDict, +): + requested: NotRequired[bool] + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountUpdateParamsConfigurationMerchantCapabilitiesRevolutPayPayments( + TypedDict, +): + requested: NotRequired[bool] + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountUpdateParamsConfigurationMerchantCapabilitiesSamsungPayPayments( + TypedDict, +): + requested: NotRequired[bool] + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountUpdateParamsConfigurationMerchantCapabilitiesSepaBankTransferPayments( + TypedDict, +): + requested: NotRequired[bool] + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountUpdateParamsConfigurationMerchantCapabilitiesSepaDebitPayments( + TypedDict, +): + requested: NotRequired[bool] + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountUpdateParamsConfigurationMerchantCapabilitiesSwishPayments( + TypedDict, +): + requested: NotRequired[bool] + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountUpdateParamsConfigurationMerchantCapabilitiesTwintPayments( + TypedDict, +): + requested: NotRequired[bool] + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountUpdateParamsConfigurationMerchantCapabilitiesUsBankTransferPayments( + TypedDict, +): + requested: NotRequired[bool] + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountUpdateParamsConfigurationMerchantCapabilitiesZipPayments( + TypedDict, +): + requested: NotRequired[bool] + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountUpdateParamsConfigurationMerchantCardPayments(TypedDict): + decline_on: NotRequired[ + "AccountUpdateParamsConfigurationMerchantCardPaymentsDeclineOn" + ] + """ + Automatically declines certain charge types regardless of whether the card issuer accepted or declined the charge. + """ + + +class AccountUpdateParamsConfigurationMerchantCardPaymentsDeclineOn(TypedDict): + avs_failure: NotRequired[bool] + """ + Whether Stripe automatically declines charges with an incorrect ZIP or postal code. This setting only applies when a ZIP or postal code is provided and they fail bank verification. + """ + cvc_failure: NotRequired[bool] + """ + Whether Stripe automatically declines charges with an incorrect CVC. This setting only applies when a CVC is provided and it fails bank verification. + """ + + +class AccountUpdateParamsConfigurationMerchantStatementDescriptor(TypedDict): + descriptor: NotRequired[str] + """ + The default text that appears on statements for non-card charges outside of Japan. For card charges, if you don't set a statement_descriptor_prefix, this text is also used as the statement descriptor prefix. In that case, if concatenating the statement descriptor suffix causes the combined statement descriptor to exceed 22 characters, we truncate the statement_descriptor text to limit the full descriptor to 22 characters. For more information about statement descriptors and their requirements, see the Merchant Configuration settings documentation. + """ + prefix: NotRequired[str] + """ + Default text that appears on statements for card charges outside of Japan, prefixing any dynamic statement_descriptor_suffix specified on the charge. To maximize space for the dynamic part of the descriptor, keep this text short. If you don't specify this value, statement_descriptor is used as the prefix. For more information about statement descriptors and their requirements, see the Merchant Configuration settings documentation. + """ + + +class AccountUpdateParamsConfigurationMerchantSupport(TypedDict): + address: NotRequired[ + "AccountUpdateParamsConfigurationMerchantSupportAddress" + ] + """ + A publicly available mailing address for sending support issues to. + """ + email: NotRequired[str] + """ + A publicly available email address for sending support issues to. + """ + phone: NotRequired[str] + """ + A publicly available phone number to call with support issues. + """ + url: NotRequired[str] + """ + A publicly available website for handling support issues. + """ + + +class AccountUpdateParamsConfigurationMerchantSupportAddress(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 (e.g., street, PO Box, or company name). + """ + line2: NotRequired[str] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ + postal_code: NotRequired[str] + """ + ZIP or postal code. + """ + state: NotRequired[str] + """ + State, county, province, or region. + """ + town: NotRequired[str] + """ + Town or cho-me. + """ + + +class AccountUpdateParamsConfigurationRecipient(TypedDict): + applied: NotRequired[bool] + """ + Represents the state of the configuration, and can be updated to deactivate or re-apply a configuration. + """ + capabilities: NotRequired[ + "AccountUpdateParamsConfigurationRecipientCapabilities" + ] + """ + Capabilities to request on the Recipient Configuration. + """ + default_outbound_destination: NotRequired[str] + """ + The payout method id to be used as a default outbound destination. This will allow the PayoutMethod to be omitted on OutboundPayments made through API or sending payouts via dashboard. Can also be explicitly set to `null` to clear the existing default outbound destination. For further details about creating an Outbound Destination, see [Collect recipient's payment details](https://docs.corp.stripe.com/global-payouts-private-preview/quickstart?dashboard-or-api=api#collect-bank-account-details). + """ + + +class AccountUpdateParamsConfigurationRecipientCapabilities(TypedDict): + bank_accounts: NotRequired[ + "AccountUpdateParamsConfigurationRecipientCapabilitiesBankAccounts" + ] + """ + Capabilities that enable OutboundPayments to a bank account linked to this Account. + """ + cards: NotRequired[ + "AccountUpdateParamsConfigurationRecipientCapabilitiesCards" + ] + """ + Capability that enable OutboundPayments to a debit card linked to this Account. + """ + crypto_wallets: NotRequired[ + "AccountUpdateParamsConfigurationRecipientCapabilitiesCryptoWallets" + ] + """ + Capabilities that enable OutboundPayments to a crypto wallet linked to this Account. + """ + stripe_balance: NotRequired[ + "AccountUpdateParamsConfigurationRecipientCapabilitiesStripeBalance" + ] + """ + Capabilities that enable the recipient to manage their Stripe Balance (/v1/balance). + """ + + +class AccountUpdateParamsConfigurationRecipientCapabilitiesBankAccounts( + TypedDict, +): + local: NotRequired[ + "AccountUpdateParamsConfigurationRecipientCapabilitiesBankAccountsLocal" + ] + """ + Enables this Account to receive OutboundPayments to linked bank accounts over local networks. + """ + wire: NotRequired[ + "AccountUpdateParamsConfigurationRecipientCapabilitiesBankAccountsWire" + ] + """ + Enables this Account to receive OutboundPayments to linked bank accounts over wire. + """ + + +class AccountUpdateParamsConfigurationRecipientCapabilitiesBankAccountsLocal( + TypedDict, +): + requested: NotRequired[bool] + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountUpdateParamsConfigurationRecipientCapabilitiesBankAccountsWire( + TypedDict, +): + requested: NotRequired[bool] + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountUpdateParamsConfigurationRecipientCapabilitiesCards(TypedDict): + requested: NotRequired[bool] + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountUpdateParamsConfigurationRecipientCapabilitiesCryptoWallets( + TypedDict, +): + requested: NotRequired[bool] + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountUpdateParamsConfigurationRecipientCapabilitiesStripeBalance( + TypedDict, +): + stripe_transfers: NotRequired[ + "AccountUpdateParamsConfigurationRecipientCapabilitiesStripeBalanceStripeTransfers" + ] + """ + Allows the account to receive /v1/transfers into their Stripe Balance (/v1/balance). + """ + + +class AccountUpdateParamsConfigurationRecipientCapabilitiesStripeBalanceStripeTransfers( + TypedDict, +): + requested: NotRequired[bool] + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountUpdateParamsConfigurationStorer(TypedDict): + applied: NotRequired[bool] + """ + Represents the state of the configuration, and can be updated to deactivate or re-apply a configuration. + """ + capabilities: NotRequired[ + "AccountUpdateParamsConfigurationStorerCapabilities" + ] + """ + Capabilities to request on the Storer Configuration. + """ + + +class AccountUpdateParamsConfigurationStorerCapabilities(TypedDict): + financial_addresses: NotRequired[ + "AccountUpdateParamsConfigurationStorerCapabilitiesFinancialAddresses" + ] + """ + Can provision a financial address to credit/debit a FinancialAccount. + """ + holds_currencies: NotRequired[ + "AccountUpdateParamsConfigurationStorerCapabilitiesHoldsCurrencies" + ] + """ + Can hold storage-type funds on Stripe. + """ + inbound_transfers: NotRequired[ + "AccountUpdateParamsConfigurationStorerCapabilitiesInboundTransfers" + ] + """ + Can pull funds from an external source, owned by yourself, to a FinancialAccount. + """ + outbound_payments: NotRequired[ + "AccountUpdateParamsConfigurationStorerCapabilitiesOutboundPayments" + ] + """ + Can send funds from a FinancialAccount to a destination owned by someone else. + """ + outbound_transfers: NotRequired[ + "AccountUpdateParamsConfigurationStorerCapabilitiesOutboundTransfers" + ] + """ + Can send funds from a FinancialAccount to a destination owned by yourself. + """ + + +class AccountUpdateParamsConfigurationStorerCapabilitiesFinancialAddresses( + TypedDict, +): + bank_accounts: NotRequired[ + "AccountUpdateParamsConfigurationStorerCapabilitiesFinancialAddressesBankAccounts" + ] + """ + Can provision a bank-account-like financial address (VBAN) to credit/debit a FinancialAccount. + """ + + +class AccountUpdateParamsConfigurationStorerCapabilitiesFinancialAddressesBankAccounts( + TypedDict, +): + requested: NotRequired[bool] + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountUpdateParamsConfigurationStorerCapabilitiesHoldsCurrencies( + TypedDict, +): + gbp: NotRequired[ + "AccountUpdateParamsConfigurationStorerCapabilitiesHoldsCurrenciesGbp" + ] + """ + Can hold storage-type funds on Stripe in GBP. + """ + + +class AccountUpdateParamsConfigurationStorerCapabilitiesHoldsCurrenciesGbp( + TypedDict, +): + requested: NotRequired[bool] + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountUpdateParamsConfigurationStorerCapabilitiesInboundTransfers( + TypedDict, +): + bank_accounts: NotRequired[ + "AccountUpdateParamsConfigurationStorerCapabilitiesInboundTransfersBankAccounts" + ] + """ + Can pull funds from an external bank account owned by yourself to a FinancialAccount. + """ + + +class AccountUpdateParamsConfigurationStorerCapabilitiesInboundTransfersBankAccounts( + TypedDict, +): + requested: NotRequired[bool] + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountUpdateParamsConfigurationStorerCapabilitiesOutboundPayments( + TypedDict, +): + bank_accounts: NotRequired[ + "AccountUpdateParamsConfigurationStorerCapabilitiesOutboundPaymentsBankAccounts" + ] + """ + Can send funds from a FinancialAccount to a bank account owned by someone else. + """ + cards: NotRequired[ + "AccountUpdateParamsConfigurationStorerCapabilitiesOutboundPaymentsCards" + ] + """ + Can send funds from a FinancialAccount to a debit card owned by someone else. + """ + financial_accounts: NotRequired[ + "AccountUpdateParamsConfigurationStorerCapabilitiesOutboundPaymentsFinancialAccounts" + ] + """ + Can send funds from a FinancialAccount to another FinancialAccount owned by someone else. + """ + + +class AccountUpdateParamsConfigurationStorerCapabilitiesOutboundPaymentsBankAccounts( + TypedDict, +): + requested: NotRequired[bool] + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountUpdateParamsConfigurationStorerCapabilitiesOutboundPaymentsCards( + TypedDict, +): + requested: NotRequired[bool] + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountUpdateParamsConfigurationStorerCapabilitiesOutboundPaymentsFinancialAccounts( + TypedDict, +): + requested: NotRequired[bool] + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountUpdateParamsConfigurationStorerCapabilitiesOutboundTransfers( + TypedDict, +): + bank_accounts: NotRequired[ + "AccountUpdateParamsConfigurationStorerCapabilitiesOutboundTransfersBankAccounts" + ] + """ + Can send funds from a FinancialAccount to a bank account owned by yourself. + """ + financial_accounts: NotRequired[ + "AccountUpdateParamsConfigurationStorerCapabilitiesOutboundTransfersFinancialAccounts" + ] + """ + Can send funds from a FinancialAccount to another FinancialAccount owned by yourself. + """ + + +class AccountUpdateParamsConfigurationStorerCapabilitiesOutboundTransfersBankAccounts( + TypedDict, +): + requested: NotRequired[bool] + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountUpdateParamsConfigurationStorerCapabilitiesOutboundTransfersFinancialAccounts( + TypedDict, +): + requested: NotRequired[bool] + """ + To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. + """ + + +class AccountUpdateParamsDefaults(TypedDict): + currency: NotRequired[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). + """ + locales: NotRequired[ + List[ + Literal[ + "ar-SA", + "bg", + "bg-BG", + "cs", + "cs-CZ", + "da", + "da-DK", + "de", + "de-DE", + "el", + "el-GR", + "en", + "en-AU", + "en-CA", + "en-GB", + "en-IE", + "en-IN", + "en-NZ", + "en-SG", + "en-US", + "es", + "es-419", + "es-ES", + "et", + "et-EE", + "fi", + "fil", + "fil-PH", + "fi-FI", + "fr", + "fr-CA", + "fr-FR", + "he-IL", + "hr", + "hr-HR", + "hu", + "hu-HU", + "id", + "id-ID", + "it", + "it-IT", + "ja", + "ja-JP", + "ko", + "ko-KR", + "lt", + "lt-LT", + "lv", + "lv-LV", + "ms", + "ms-MY", + "mt", + "mt-MT", + "nb", + "nb-NO", + "nl", + "nl-NL", + "pl", + "pl-PL", + "pt", + "pt-BR", + "pt-PT", + "ro", + "ro-RO", + "ru", + "ru-RU", + "sk", + "sk-SK", + "sl", + "sl-SI", + "sv", + "sv-SE", + "th", + "th-TH", + "tr", + "tr-TR", + "vi", + "vi-VN", + "zh", + "zh-Hans", + "zh-Hant-HK", + "zh-Hant-TW", + "zh-HK", + "zh-TW", + ] + ] + ] + """ + The Account's preferred locales (languages), ordered by preference. + """ + profile: NotRequired["AccountUpdateParamsDefaultsProfile"] + """ + Account profile information. + """ + responsibilities: NotRequired[ + "AccountUpdateParamsDefaultsResponsibilities" + ] + """ + Default responsibilities held by either Stripe or the platform. + """ + + +class AccountUpdateParamsDefaultsProfile(TypedDict): + business_url: NotRequired[str] + """ + The business's publicly-available website. + """ + doing_business_as: NotRequired[str] + """ + The name which is used by the business. + """ + product_description: NotRequired[str] + """ + Internal-only description of the product sold or service provided by the business. It's used by Stripe for risk and underwriting purposes. + """ + + +class AccountUpdateParamsDefaultsResponsibilities(TypedDict): + fees_collector: Literal["application", "stripe"] + """ + A value indicating the party responsible for collecting fees from this account. + """ + losses_collector: Literal["application", "stripe"] + """ + A value indicating who is responsible for losses when this Account can't pay back negative balances from payments. + """ + + +class AccountUpdateParamsIdentity(TypedDict): + attestations: NotRequired["AccountUpdateParamsIdentityAttestations"] + """ + Attestations from the identity's key people, e.g. owners, executives, directors. + """ + business_details: NotRequired["AccountUpdateParamsIdentityBusinessDetails"] + """ + Information about the company or business. + """ + country: NotRequired[str] + """ + The country in which the account holder resides, or in which the business is legally established. This should be an [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code. + """ + entity_type: NotRequired[ + Literal["company", "government_entity", "individual", "non_profit"] + ] + """ + The entity type. + """ + individual: NotRequired["AccountUpdateParamsIdentityIndividual"] + """ + Information about the individual represented by the Account. This property is `null` unless `entity_type` is set to `individual`. + """ + + +class AccountUpdateParamsIdentityAttestations(TypedDict): + directorship_declaration: NotRequired[ + "AccountUpdateParamsIdentityAttestationsDirectorshipDeclaration" + ] + """ + This hash is used to attest that the directors information provided to Stripe is both current and correct. + """ + ownership_declaration: NotRequired[ + "AccountUpdateParamsIdentityAttestationsOwnershipDeclaration" + ] + """ + This hash is used to attest that the beneficial owner information provided to Stripe is both current and correct. + """ + persons_provided: NotRequired[ + "AccountUpdateParamsIdentityAttestationsPersonsProvided" + ] + """ + Attestation that all Persons with a specific Relationship value have been provided. + """ + terms_of_service: NotRequired[ + "AccountUpdateParamsIdentityAttestationsTermsOfService" + ] + """ + Attestations of accepted terms of service agreements. + """ + + +class AccountUpdateParamsIdentityAttestationsDirectorshipDeclaration( + TypedDict +): + date: NotRequired[str] + """ + The time marking when the director attestation was made. Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: 2022-09-18T13:22:18.123Z. + """ + ip: NotRequired[str] + """ + The IP address from which the director attestation was made. + """ + user_agent: NotRequired[str] + """ + The user agent of the browser from which the director attestation was made. + """ + + +class AccountUpdateParamsIdentityAttestationsOwnershipDeclaration(TypedDict): + date: NotRequired[str] + """ + The time marking when the beneficial owner attestation was made. Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: 2022-09-18T13:22:18.123Z. + """ + ip: NotRequired[str] + """ + The IP address from which the beneficial owner attestation was made. + """ + user_agent: NotRequired[str] + """ + The user agent of the browser from which the beneficial owner attestation was made. + """ + + +class AccountUpdateParamsIdentityAttestationsPersonsProvided(TypedDict): + directors: NotRequired[bool] + """ + Whether the company's directors have been provided. Set this Boolean to true after creating all the company's directors with the [Persons API](https://docs.stripe.com/api/v2/core/accounts/createperson). + """ + executives: NotRequired[bool] + """ + Whether the company's executives have been provided. Set this Boolean to true after creating all the company's executives with the [Persons API](https://docs.stripe.com/api/v2/core/accounts/createperson). + """ + owners: NotRequired[bool] + """ + Whether the company's owners have been provided. Set this Boolean to true after creating all the company's owners with the [Persons API](https://docs.stripe.com/api/v2/core/accounts/createperson). + """ + ownership_exemption_reason: NotRequired[ + Literal[ + "qualified_entity_exceeds_ownership_threshold", + "qualifies_as_financial_institution", + ] + ] + """ + Reason for why the company is exempt from providing ownership information. + """ + + +class AccountUpdateParamsIdentityAttestationsTermsOfService(TypedDict): + account: NotRequired[ + "AccountUpdateParamsIdentityAttestationsTermsOfServiceAccount" + ] + """ + Details on the Account's acceptance of the [Stripe Services Agreement](https://docs.stripe.com/connect/updating-accounts#tos-acceptance). + """ + storer: NotRequired[ + "AccountUpdateParamsIdentityAttestationsTermsOfServiceStorer" + ] + """ + Details on the Account's acceptance of Treasury-specific terms of service. + """ + + +class AccountUpdateParamsIdentityAttestationsTermsOfServiceAccount(TypedDict): + date: NotRequired[str] + """ + The time when the Account's representative accepted the terms of service. Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: 2022-09-18T13:22:18.123Z. + """ + ip: NotRequired[str] + """ + The IP address from which the Account's representative accepted the terms of service. + """ + user_agent: NotRequired[str] + """ + The user agent of the browser from which the Account's representative accepted the terms of service. + """ + + +class AccountUpdateParamsIdentityAttestationsTermsOfServiceStorer(TypedDict): + date: NotRequired[str] + """ + The time when the Account's representative accepted the terms of service. Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: 2022-09-18T13:22:18.123Z. + """ + ip: NotRequired[str] + """ + The IP address from which the Account's representative accepted the terms of service. + """ + user_agent: NotRequired[str] + """ + The user agent of the browser from which the Account's representative accepted the terms of service. + """ + + +class AccountUpdateParamsIdentityBusinessDetails(TypedDict): + address: NotRequired["AccountUpdateParamsIdentityBusinessDetailsAddress"] + """ + The business registration address of the business entity. + """ + annual_revenue: NotRequired[ + "AccountUpdateParamsIdentityBusinessDetailsAnnualRevenue" + ] + """ + The business gross annual revenue for its preceding fiscal year. + """ + documents: NotRequired[ + "AccountUpdateParamsIdentityBusinessDetailsDocuments" + ] + """ + A document verifying the business. + """ + estimated_worker_count: NotRequired[int] + """ + An estimated upper bound of employees, contractors, vendors, etc. currently working for the business. + """ + id_numbers: NotRequired[ + List["AccountUpdateParamsIdentityBusinessDetailsIdNumber"] + ] + """ + The ID numbers of a business entity. + """ + monthly_estimated_revenue: NotRequired[ + "AccountUpdateParamsIdentityBusinessDetailsMonthlyEstimatedRevenue" + ] + """ + An estimate of the monthly revenue of the business. + """ + phone: NotRequired[str] + """ + The phone number of the Business Entity. + """ + registered_name: NotRequired[str] + """ + The business legal name. + """ + script_addresses: NotRequired[ + "AccountUpdateParamsIdentityBusinessDetailsScriptAddresses" + ] + """ + The business registration address of the business entity in non latin script. + """ + script_names: NotRequired[ + "AccountUpdateParamsIdentityBusinessDetailsScriptNames" + ] + """ + The business legal name in non latin script. + """ + structure: NotRequired[ + Literal[ + "cooperative", + "free_zone_establishment", + "free_zone_llc", + "governmental_unit", + "government_instrumentality", + "incorporated_association", + "incorporated_non_profit", + "incorporated_partnership", + "limited_liability_partnership", + "llc", + "multi_member_llc", + "private_company", + "private_corporation", + "private_partnership", + "public_company", + "public_corporation", + "public_listed_corporation", + "public_partnership", + "registered_charity", + "single_member_llc", + "sole_establishment", + "sole_proprietorship", + "tax_exempt_government_instrumentality", + "trust", + "unincorporated_association", + "unincorporated_non_profit", + "unincorporated_partnership", + ] + ] + """ + The category identifying the legal structure of the business. + """ + + +class AccountUpdateParamsIdentityBusinessDetailsAddress(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 (e.g., street, PO Box, or company name). + """ + line2: NotRequired[str] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ + postal_code: NotRequired[str] + """ + ZIP or postal code. + """ + state: NotRequired[str] + """ + State, county, province, or region. + """ + town: NotRequired[str] + """ + Town or cho-me. + """ + + +class AccountUpdateParamsIdentityBusinessDetailsAnnualRevenue(TypedDict): + amount: NotRequired[AmountParam] + """ + A non-negative integer representing the amount in the smallest currency unit. + """ + fiscal_year_end: NotRequired[str] + """ + The close-out date of the preceding fiscal year in ISO 8601 format. E.g. 2023-12-31 for the 31st of December, 2023. + """ + + +class AccountUpdateParamsIdentityBusinessDetailsDocuments(TypedDict): + bank_account_ownership_verification: NotRequired[ + "AccountUpdateParamsIdentityBusinessDetailsDocumentsBankAccountOwnershipVerification" + ] + """ + One or more documents that support the bank account ownership verification requirement. Must be a document associated with the account's primary active bank account that displays the last 4 digits of the account number, either a statement or a check. + """ + company_license: NotRequired[ + "AccountUpdateParamsIdentityBusinessDetailsDocumentsCompanyLicense" + ] + """ + One or more documents that demonstrate proof of a company's license to operate. + """ + company_memorandum_of_association: NotRequired[ + "AccountUpdateParamsIdentityBusinessDetailsDocumentsCompanyMemorandumOfAssociation" + ] + """ + One or more documents showing the company's Memorandum of Association. + """ + company_ministerial_decree: NotRequired[ + "AccountUpdateParamsIdentityBusinessDetailsDocumentsCompanyMinisterialDecree" + ] + """ + Certain countries only: One or more documents showing the ministerial decree legalizing the company's establishment. + """ + company_registration_verification: NotRequired[ + "AccountUpdateParamsIdentityBusinessDetailsDocumentsCompanyRegistrationVerification" + ] + """ + One or more documents that demonstrate proof of a company's registration with the appropriate local authorities. + """ + company_tax_id_verification: NotRequired[ + "AccountUpdateParamsIdentityBusinessDetailsDocumentsCompanyTaxIdVerification" + ] + """ + One or more documents that demonstrate proof of a company's tax ID. + """ + primary_verification: NotRequired[ + "AccountUpdateParamsIdentityBusinessDetailsDocumentsPrimaryVerification" + ] + """ + A document verifying the business. + """ + proof_of_address: NotRequired[ + "AccountUpdateParamsIdentityBusinessDetailsDocumentsProofOfAddress" + ] + """ + One or more documents that demonstrate proof of address. + """ + proof_of_registration: NotRequired[ + "AccountUpdateParamsIdentityBusinessDetailsDocumentsProofOfRegistration" + ] + """ + One or more documents showing the company's proof of registration with the national business registry. + """ + proof_of_ultimate_beneficial_ownership: NotRequired[ + "AccountUpdateParamsIdentityBusinessDetailsDocumentsProofOfUltimateBeneficialOwnership" + ] + """ + One or more documents that demonstrate proof of ultimate beneficial ownership. + """ + + +class AccountUpdateParamsIdentityBusinessDetailsDocumentsBankAccountOwnershipVerification( + TypedDict, +): + files: List[str] + """ + One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. + """ + type: Literal["files"] + """ + The format of the document. Currently supports `files` only. + """ + + +class AccountUpdateParamsIdentityBusinessDetailsDocumentsCompanyLicense( + TypedDict, +): + files: List[str] + """ + One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. + """ + type: Literal["files"] + """ + The format of the document. Currently supports `files` only. + """ + + +class AccountUpdateParamsIdentityBusinessDetailsDocumentsCompanyMemorandumOfAssociation( + TypedDict, +): + files: List[str] + """ + One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. + """ + type: Literal["files"] + """ + The format of the document. Currently supports `files` only. + """ + + +class AccountUpdateParamsIdentityBusinessDetailsDocumentsCompanyMinisterialDecree( + TypedDict, +): + files: List[str] + """ + One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. + """ + type: Literal["files"] + """ + The format of the document. Currently supports `files` only. + """ + + +class AccountUpdateParamsIdentityBusinessDetailsDocumentsCompanyRegistrationVerification( + TypedDict, +): + files: List[str] + """ + One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. + """ + type: Literal["files"] + """ + The format of the document. Currently supports `files` only. + """ + + +class AccountUpdateParamsIdentityBusinessDetailsDocumentsCompanyTaxIdVerification( + TypedDict, +): + files: List[str] + """ + One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. + """ + type: Literal["files"] + """ + The format of the document. Currently supports `files` only. + """ + + +class AccountUpdateParamsIdentityBusinessDetailsDocumentsPrimaryVerification( + TypedDict, +): + front_back: "AccountUpdateParamsIdentityBusinessDetailsDocumentsPrimaryVerificationFrontBack" + """ + The [file upload](https://docs.stripe.com/api/persons/update#create_file) tokens referring to each side of the document. + """ + type: Literal["front_back"] + """ + The format of the verification document. Currently supports `front_back` only. + """ + + +class AccountUpdateParamsIdentityBusinessDetailsDocumentsPrimaryVerificationFrontBack( + TypedDict, +): + back: NotRequired[str] + """ + A [file upload](https://docs.stripe.com/api/persons/update#create_file) token representing the back of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + """ + front: NotRequired[str] + """ + A [file upload](https://docs.stripe.com/api/persons/update#create_file) token representing the front of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + """ + + +class AccountUpdateParamsIdentityBusinessDetailsDocumentsProofOfAddress( + TypedDict, +): + files: List[str] + """ + One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. + """ + type: Literal["files"] + """ + The format of the document. Currently supports `files` only. + """ + + +class AccountUpdateParamsIdentityBusinessDetailsDocumentsProofOfRegistration( + TypedDict, +): + files: List[str] + """ + One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. + """ + type: Literal["files"] + """ + The format of the document. Currently supports `files` only. + """ + + +class AccountUpdateParamsIdentityBusinessDetailsDocumentsProofOfUltimateBeneficialOwnership( + TypedDict, +): + files: List[str] + """ + One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. + """ + type: Literal["files"] + """ + The format of the document. Currently supports `files` only. + """ + + +class AccountUpdateParamsIdentityBusinessDetailsIdNumber(TypedDict): + registrar: NotRequired[str] + """ + The registrar of the ID number (Only valid for DE ID number types). + """ + type: Literal[ + "ae_crn", + "ae_vat", + "ao_nif", + "at_fn", + "au_abn", + "au_acn", + "au_in", + "az_tin", + "bd_etin", + "be_cbe", + "bg_uic", + "br_cnpj", + "ca_cn", + "ca_crarr", + "ca_neq", + "ca_rid", + "ch_chid", + "ch_uid", + "cr_cpj", + "cr_nite", + "cy_tic", + "cz_ico", + "de_hrn", + "de_vat", + "dk_cvr", + "do_rcn", + "ee_rk", + "es_cif", + "fi_yt", + "fr_siren", + "fr_vat", + "gb_crn", + "gi_crn", + "gr_gemi", + "gt_nit", + "hk_br", + "hk_cr", + "hk_mbs", + "hu_cjs", + "ie_crn", + "it_rea", + "it_vat", + "jp_cn", + "kz_bin", + "li_uid", + "lt_ccrn", + "lu_rcs", + "lv_urn", + "mt_crn", + "mx_rfc", + "my_brn", + "my_coid", + "my_sst", + "mz_nuit", + "nl_kvk", + "no_orgnr", + "nz_bn", + "pe_ruc", + "pk_ntn", + "pl_regon", + "pt_vat", + "ro_cui", + "sa_crn", + "sa_tin", + "se_orgnr", + "sg_uen", + "si_msp", + "sk_ico", + "th_crn", + "th_prn", + "th_tin", + "us_ein", + ] + """ + Open Enum. The ID number type of a business entity. + """ + value: str + """ + The value of the ID number. + """ + + +class AccountUpdateParamsIdentityBusinessDetailsMonthlyEstimatedRevenue( + TypedDict, +): + amount: NotRequired[AmountParam] + """ + A non-negative integer representing the amount in the smallest currency unit. + """ + + +class AccountUpdateParamsIdentityBusinessDetailsScriptAddresses(TypedDict): + kana: NotRequired[ + "AccountUpdateParamsIdentityBusinessDetailsScriptAddressesKana" + ] + """ + Kana Address. + """ + kanji: NotRequired[ + "AccountUpdateParamsIdentityBusinessDetailsScriptAddressesKanji" + ] + """ + Kanji Address. + """ + + +class AccountUpdateParamsIdentityBusinessDetailsScriptAddressesKana(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 (e.g., street, PO Box, or company name). + """ + line2: NotRequired[str] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ + postal_code: NotRequired[str] + """ + ZIP or postal code. + """ + state: NotRequired[str] + """ + State, county, province, or region. + """ + town: NotRequired[str] + """ + Town or cho-me. + """ + + +class AccountUpdateParamsIdentityBusinessDetailsScriptAddressesKanji( + 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 (e.g., street, PO Box, or company name). + """ + line2: NotRequired[str] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ + postal_code: NotRequired[str] + """ + ZIP or postal code. + """ + state: NotRequired[str] + """ + State, county, province, or region. + """ + town: NotRequired[str] + """ + Town or cho-me. + """ + + +class AccountUpdateParamsIdentityBusinessDetailsScriptNames(TypedDict): + kana: NotRequired[ + "AccountUpdateParamsIdentityBusinessDetailsScriptNamesKana" + ] + """ + Kana name. + """ + kanji: NotRequired[ + "AccountUpdateParamsIdentityBusinessDetailsScriptNamesKanji" + ] + """ + Kanji name. + """ + + +class AccountUpdateParamsIdentityBusinessDetailsScriptNamesKana(TypedDict): + registered_name: NotRequired[str] + """ + Registered name of the business. + """ + + +class AccountUpdateParamsIdentityBusinessDetailsScriptNamesKanji(TypedDict): + registered_name: NotRequired[str] + """ + Registered name of the business. + """ + + +class AccountUpdateParamsIdentityIndividual(TypedDict): + additional_addresses: NotRequired[ + List["AccountUpdateParamsIdentityIndividualAdditionalAddress"] + ] + """ + Additional addresses associated with the individual. + """ + additional_names: NotRequired[ + List["AccountUpdateParamsIdentityIndividualAdditionalName"] + ] + """ + Additional names (e.g. aliases) associated with the individual. + """ + address: NotRequired["AccountUpdateParamsIdentityIndividualAddress"] + """ + The individual's residential address. + """ + date_of_birth: NotRequired[ + "AccountUpdateParamsIdentityIndividualDateOfBirth" + ] + """ + The individual's date of birth. + """ + documents: NotRequired["AccountUpdateParamsIdentityIndividualDocuments"] + """ + Documents that may be submitted to satisfy various informational requests. + """ + email: NotRequired[str] + """ + The individual's email address. + """ + given_name: NotRequired[str] + """ + The individual's first name. + """ + id_numbers: NotRequired[ + List["AccountUpdateParamsIdentityIndividualIdNumber"] + ] + """ + The identification numbers (e.g., SSN) associated with the individual. + """ + legal_gender: NotRequired[Literal["female", "male"]] + """ + The individual's gender (International regulations require either "male" or "female"). + """ + metadata: NotRequired[Dict[str, Optional[str]]] + """ + Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + """ + nationalities: NotRequired[List[str]] + """ + The countries where the individual is a national. Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + phone: NotRequired[str] + """ + The individual's phone number. + """ + political_exposure: NotRequired[Literal["existing", "none"]] + """ + The individual's political exposure. + """ + relationship: NotRequired[ + "AccountUpdateParamsIdentityIndividualRelationship" + ] + """ + The relationship that this individual has with the account's identity. + """ + script_addresses: NotRequired[ + "AccountUpdateParamsIdentityIndividualScriptAddresses" + ] + """ + The script addresses (e.g., non-Latin characters) associated with the individual. + """ + script_names: NotRequired[ + "AccountUpdateParamsIdentityIndividualScriptNames" + ] + """ + The individuals primary name in non latin script. + """ + surname: NotRequired[str] + """ + The individual's last name. + """ + + +class AccountUpdateParamsIdentityIndividualAdditionalAddress(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 (e.g., street, PO Box, or company name). + """ + line2: NotRequired[str] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ + postal_code: NotRequired[str] + """ + ZIP or postal code. + """ + purpose: Literal["registered"] + """ + Purpose of additional address. + """ + state: NotRequired[str] + """ + State, county, province, or region. + """ + town: NotRequired[str] + """ + Town or cho-me. + """ + + +class AccountUpdateParamsIdentityIndividualAdditionalName(TypedDict): + full_name: NotRequired[str] + """ + The person's full name. + """ + given_name: NotRequired[str] + """ + The person's first or given name. + """ + purpose: Literal["alias", "maiden"] + """ + The purpose or type of the additional name. + """ + surname: NotRequired[str] + """ + The person's last or family name. + """ + + +class AccountUpdateParamsIdentityIndividualAddress(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 (e.g., street, PO Box, or company name). + """ + line2: NotRequired[str] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ + postal_code: NotRequired[str] + """ + ZIP or postal code. + """ + state: NotRequired[str] + """ + State, county, province, or region. + """ + town: NotRequired[str] + """ + Town or cho-me. + """ + + +class AccountUpdateParamsIdentityIndividualDateOfBirth(TypedDict): + day: int + """ + The day of the birth. + """ + month: int + """ + The month of birth. + """ + year: int + """ + The year of birth. + """ + + +class AccountUpdateParamsIdentityIndividualDocuments(TypedDict): + company_authorization: NotRequired[ + "AccountUpdateParamsIdentityIndividualDocumentsCompanyAuthorization" + ] + """ + One or more documents that demonstrate proof that this person is authorized to represent the company. + """ + passport: NotRequired[ + "AccountUpdateParamsIdentityIndividualDocumentsPassport" + ] + """ + One or more documents showing the person's passport page with photo and personal data. + """ + primary_verification: NotRequired[ + "AccountUpdateParamsIdentityIndividualDocumentsPrimaryVerification" + ] + """ + An identifying document showing the person's name, either a passport or local ID card. + """ + secondary_verification: NotRequired[ + "AccountUpdateParamsIdentityIndividualDocumentsSecondaryVerification" + ] + """ + A document showing address, either a passport, local ID card, or utility bill from a well-known utility company. + """ + visa: NotRequired["AccountUpdateParamsIdentityIndividualDocumentsVisa"] + """ + One or more documents showing the person's visa required for living in the country where they are residing. + """ + + +class AccountUpdateParamsIdentityIndividualDocumentsCompanyAuthorization( + TypedDict, +): + files: List[str] + """ + One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. + """ + type: Literal["files"] + """ + The format of the document. Currently supports `files` only. + """ + + +class AccountUpdateParamsIdentityIndividualDocumentsPassport(TypedDict): + files: List[str] + """ + One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. + """ + type: Literal["files"] + """ + The format of the document. Currently supports `files` only. + """ + + +class AccountUpdateParamsIdentityIndividualDocumentsPrimaryVerification( + TypedDict, +): + front_back: "AccountUpdateParamsIdentityIndividualDocumentsPrimaryVerificationFrontBack" + """ + The [file upload](https://docs.stripe.com/api/persons/update#create_file) tokens referring to each side of the document. + """ + type: Literal["front_back"] + """ + The format of the verification document. Currently supports `front_back` only. + """ + + +class AccountUpdateParamsIdentityIndividualDocumentsPrimaryVerificationFrontBack( + TypedDict, +): + back: NotRequired[str] + """ + A [file upload](https://docs.stripe.com/api/persons/update#create_file) token representing the back of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + """ + front: NotRequired[str] + """ + A [file upload](https://docs.stripe.com/api/persons/update#create_file) token representing the front of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + """ + + +class AccountUpdateParamsIdentityIndividualDocumentsSecondaryVerification( + TypedDict, +): + front_back: "AccountUpdateParamsIdentityIndividualDocumentsSecondaryVerificationFrontBack" + """ + The [file upload](https://docs.stripe.com/api/persons/update#create_file) tokens referring to each side of the document. + """ + type: Literal["front_back"] + """ + The format of the verification document. Currently supports `front_back` only. + """ + + +class AccountUpdateParamsIdentityIndividualDocumentsSecondaryVerificationFrontBack( + TypedDict, +): + back: NotRequired[str] + """ + A [file upload](https://docs.stripe.com/api/persons/update#create_file) token representing the back of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + """ + front: NotRequired[str] + """ + A [file upload](https://docs.stripe.com/api/persons/update#create_file) token representing the front of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + """ + + +class AccountUpdateParamsIdentityIndividualDocumentsVisa(TypedDict): + files: List[str] + """ + One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. + """ + type: Literal["files"] + """ + The format of the document. Currently supports `files` only. + """ + + +class AccountUpdateParamsIdentityIndividualIdNumber(TypedDict): + type: Literal[ + "ae_eid", + "ao_nif", + "az_tin", + "bd_brc", + "bd_etin", + "bd_nid", + "br_cpf", + "cr_cpf", + "cr_dimex", + "cr_nite", + "de_stn", + "do_rcn", + "gt_nit", + "hk_id", + "kz_iin", + "mx_rfc", + "my_nric", + "mz_nuit", + "nl_bsn", + "pe_dni", + "pk_cnic", + "pk_snic", + "sa_tin", + "sg_fin", + "sg_nric", + "th_lc", + "th_pin", + "us_itin", + "us_itin_last_4", + "us_ssn", + "us_ssn_last_4", + ] + """ + The ID number type of an individual. + """ + value: str + """ + The value of the ID number. + """ + + +class AccountUpdateParamsIdentityIndividualRelationship(TypedDict): + director: NotRequired[bool] + """ + Whether the person is a director of the account's identity. Directors are typically members of the governing board of the company, or responsible for ensuring the company meets its regulatory obligations. + """ + executive: NotRequired[bool] + """ + Whether the person has significant responsibility to control, manage, or direct the organization. + """ + owner: NotRequired[bool] + """ + Whether the person is an owner of the account's identity. + """ + percent_ownership: NotRequired[str] + """ + The percent owned by the person of the account's legal entity. + """ + title: NotRequired[str] + """ + The person's title (e.g., CEO, Support Engineer). + """ + + +class AccountUpdateParamsIdentityIndividualScriptAddresses(TypedDict): + kana: NotRequired[ + "AccountUpdateParamsIdentityIndividualScriptAddressesKana" + ] + """ + Kana Address. + """ + kanji: NotRequired[ + "AccountUpdateParamsIdentityIndividualScriptAddressesKanji" + ] + """ + Kanji Address. + """ + + +class AccountUpdateParamsIdentityIndividualScriptAddressesKana(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 (e.g., street, PO Box, or company name). + """ + line2: NotRequired[str] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ + postal_code: NotRequired[str] + """ + ZIP or postal code. + """ + state: NotRequired[str] + """ + State, county, province, or region. + """ + town: NotRequired[str] + """ + Town or cho-me. + """ + + +class AccountUpdateParamsIdentityIndividualScriptAddressesKanji(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 (e.g., street, PO Box, or company name). + """ + line2: NotRequired[str] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ + postal_code: NotRequired[str] + """ + ZIP or postal code. + """ + state: NotRequired[str] + """ + State, county, province, or region. + """ + town: NotRequired[str] + """ + Town or cho-me. + """ + + +class AccountUpdateParamsIdentityIndividualScriptNames(TypedDict): + kana: NotRequired["AccountUpdateParamsIdentityIndividualScriptNamesKana"] + """ + Persons name in kana script. + """ + kanji: NotRequired["AccountUpdateParamsIdentityIndividualScriptNamesKanji"] + """ + Persons name in kanji script. + """ + + +class AccountUpdateParamsIdentityIndividualScriptNamesKana(TypedDict): + given_name: NotRequired[str] + """ + The person's first or given name. + """ + surname: NotRequired[str] + """ + The person's last or family name. + """ + + +class AccountUpdateParamsIdentityIndividualScriptNamesKanji(TypedDict): + given_name: NotRequired[str] + """ + The person's first or given name. + """ + surname: NotRequired[str] + """ + The person's last or family name. + """ diff --git a/stripe/params/v2/core/_claimable_sandbox_create_params.py b/stripe/params/v2/core/_claimable_sandbox_create_params.py new file mode 100644 index 000000000..f4eba5be0 --- /dev/null +++ b/stripe/params/v2/core/_claimable_sandbox_create_params.py @@ -0,0 +1,31 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import NotRequired, TypedDict + + +class ClaimableSandboxCreateParams(TypedDict): + enable_mcp_access: bool + """ + If true, returns a key that can be used with [Stripe's MCP server](https://docs.stripe.com/mcp). + """ + prefill: "ClaimableSandboxCreateParamsPrefill" + """ + Values that are prefilled when a user claims the sandbox. When a user claims the sandbox, they will be able to update these values. + """ + + +class ClaimableSandboxCreateParamsPrefill(TypedDict): + country: str + """ + Country in which the account holder resides, or in which the business is legally established. + Use two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + """ + email: str + """ + Email that this sandbox is meant to be claimed by. Stripe will + notify this email address before the sandbox expires. + """ + name: NotRequired[str] + """ + Name for the sandbox. If not provided, this will be generated. + """ diff --git a/stripe/params/v2/core/_claimable_sandbox_retrieve_params.py b/stripe/params/v2/core/_claimable_sandbox_retrieve_params.py new file mode 100644 index 000000000..63b9337d5 --- /dev/null +++ b/stripe/params/v2/core/_claimable_sandbox_retrieve_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class ClaimableSandboxRetrieveParams(TypedDict): + pass diff --git a/stripe/params/v2/core/_event_destination_create_params.py b/stripe/params/v2/core/_event_destination_create_params.py new file mode 100644 index 000000000..63aee13ee --- /dev/null +++ b/stripe/params/v2/core/_event_destination_create_params.py @@ -0,0 +1,77 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class EventDestinationCreateParams(TypedDict): + description: NotRequired[str] + """ + An optional description of what the event destination is used for. + """ + enabled_events: List[str] + """ + The list of events to enable for this endpoint. + """ + event_payload: Literal["snapshot", "thin"] + """ + Payload type of events being subscribed to. + """ + events_from: NotRequired[List[Literal["other_accounts", "self"]]] + """ + Where events should be routed from. + """ + include: NotRequired[ + List[ + Literal["webhook_endpoint.signing_secret", "webhook_endpoint.url"] + ] + ] + """ + Additional fields to include in the response. + """ + metadata: NotRequired[Dict[str, str]] + """ + Metadata. + """ + name: str + """ + Event destination name. + """ + snapshot_api_version: NotRequired[str] + """ + If using the snapshot event payload, the API version events are rendered as. + """ + type: Literal["amazon_eventbridge", "webhook_endpoint"] + """ + Event destination type. + """ + amazon_eventbridge: NotRequired[ + "EventDestinationCreateParamsAmazonEventbridge" + ] + """ + Amazon EventBridge configuration. + """ + webhook_endpoint: NotRequired[ + "EventDestinationCreateParamsWebhookEndpoint" + ] + """ + Webhook endpoint configuration. + """ + + +class EventDestinationCreateParamsAmazonEventbridge(TypedDict): + aws_account_id: str + """ + The AWS account ID. + """ + aws_region: str + """ + The region of the AWS event source. + """ + + +class EventDestinationCreateParamsWebhookEndpoint(TypedDict): + url: str + """ + The URL of the webhook endpoint. + """ diff --git a/stripe/params/v2/core/_event_destination_delete_params.py b/stripe/params/v2/core/_event_destination_delete_params.py new file mode 100644 index 000000000..d8393ade7 --- /dev/null +++ b/stripe/params/v2/core/_event_destination_delete_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class EventDestinationDeleteParams(TypedDict): + pass diff --git a/stripe/params/v2/core/_event_destination_disable_params.py b/stripe/params/v2/core/_event_destination_disable_params.py new file mode 100644 index 000000000..e5c8fd247 --- /dev/null +++ b/stripe/params/v2/core/_event_destination_disable_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class EventDestinationDisableParams(TypedDict): + pass diff --git a/stripe/params/v2/core/_event_destination_enable_params.py b/stripe/params/v2/core/_event_destination_enable_params.py new file mode 100644 index 000000000..8da0fc3ae --- /dev/null +++ b/stripe/params/v2/core/_event_destination_enable_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class EventDestinationEnableParams(TypedDict): + pass diff --git a/stripe/params/v2/core/_event_destination_list_params.py b/stripe/params/v2/core/_event_destination_list_params.py new file mode 100644 index 000000000..c0320468a --- /dev/null +++ b/stripe/params/v2/core/_event_destination_list_params.py @@ -0,0 +1,15 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import Literal, NotRequired, TypedDict + + +class EventDestinationListParams(TypedDict): + include: NotRequired[List[Literal["webhook_endpoint.url"]]] + """ + Additional fields to include in the response. Currently supports `webhook_endpoint.url`. + """ + limit: NotRequired[int] + """ + The page size. + """ diff --git a/stripe/params/v2/core/_event_destination_ping_params.py b/stripe/params/v2/core/_event_destination_ping_params.py new file mode 100644 index 000000000..745aa1ec0 --- /dev/null +++ b/stripe/params/v2/core/_event_destination_ping_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class EventDestinationPingParams(TypedDict): + pass diff --git a/stripe/params/v2/core/_event_destination_retrieve_params.py b/stripe/params/v2/core/_event_destination_retrieve_params.py new file mode 100644 index 000000000..d43606b1d --- /dev/null +++ b/stripe/params/v2/core/_event_destination_retrieve_params.py @@ -0,0 +1,11 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import Literal, NotRequired, TypedDict + + +class EventDestinationRetrieveParams(TypedDict): + include: NotRequired[List[Literal["webhook_endpoint.url"]]] + """ + Additional fields to include in the response. + """ diff --git a/stripe/params/v2/core/_event_destination_update_params.py b/stripe/params/v2/core/_event_destination_update_params.py new file mode 100644 index 000000000..6bd71e403 --- /dev/null +++ b/stripe/params/v2/core/_event_destination_update_params.py @@ -0,0 +1,40 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import Dict, List, Optional +from typing_extensions import Literal, NotRequired, TypedDict + + +class EventDestinationUpdateParams(TypedDict): + description: NotRequired[str] + """ + An optional description of what the event destination is used for. + """ + enabled_events: NotRequired[List[str]] + """ + The list of events to enable for this endpoint. + """ + include: NotRequired[List[Literal["webhook_endpoint.url"]]] + """ + Additional fields to include in the response. Currently supports `webhook_endpoint.url`. + """ + metadata: NotRequired[Dict[str, Optional[str]]] + """ + Metadata. + """ + name: NotRequired[str] + """ + Event destination name. + """ + webhook_endpoint: NotRequired[ + "EventDestinationUpdateParamsWebhookEndpoint" + ] + """ + Webhook endpoint configuration. + """ + + +class EventDestinationUpdateParamsWebhookEndpoint(TypedDict): + url: str + """ + The URL of the webhook endpoint. + """ diff --git a/stripe/params/v2/core/_event_list_params.py b/stripe/params/v2/core/_event_list_params.py new file mode 100644 index 000000000..364815d48 --- /dev/null +++ b/stripe/params/v2/core/_event_list_params.py @@ -0,0 +1,14 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import NotRequired, TypedDict + + +class EventListParams(TypedDict): + limit: NotRequired[int] + """ + The page size. + """ + object_id: str + """ + Primary object ID used to retrieve related events. + """ diff --git a/stripe/params/v2/core/_event_retrieve_params.py b/stripe/params/v2/core/_event_retrieve_params.py new file mode 100644 index 000000000..4684f39bf --- /dev/null +++ b/stripe/params/v2/core/_event_retrieve_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class EventRetrieveParams(TypedDict): + pass diff --git a/stripe/params/v2/core/accounts/__init__.py b/stripe/params/v2/core/accounts/__init__.py new file mode 100644 index 000000000..45f6180f1 --- /dev/null +++ b/stripe/params/v2/core/accounts/__init__.py @@ -0,0 +1,17 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe.params.v2.core.accounts._person_create_params import ( + PersonCreateParams as PersonCreateParams, +) +from stripe.params.v2.core.accounts._person_delete_params import ( + PersonDeleteParams as PersonDeleteParams, +) +from stripe.params.v2.core.accounts._person_list_params import ( + PersonListParams as PersonListParams, +) +from stripe.params.v2.core.accounts._person_retrieve_params import ( + PersonRetrieveParams as PersonRetrieveParams, +) +from stripe.params.v2.core.accounts._person_update_params import ( + PersonUpdateParams as PersonUpdateParams, +) diff --git a/stripe/params/v2/core/accounts/_person_create_params.py b/stripe/params/v2/core/accounts/_person_create_params.py new file mode 100644 index 000000000..0429995d7 --- /dev/null +++ b/stripe/params/v2/core/accounts/_person_create_params.py @@ -0,0 +1,495 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class PersonCreateParams(TypedDict): + additional_addresses: NotRequired[ + List["PersonCreateParamsAdditionalAddress"] + ] + """ + Additional addresses associated with the person. + """ + additional_names: NotRequired[List["PersonCreateParamsAdditionalName"]] + """ + Additional names (e.g. aliases) associated with the person. + """ + additional_terms_of_service: NotRequired[ + "PersonCreateParamsAdditionalTermsOfService" + ] + """ + Attestations of accepted terms of service agreements. + """ + address: NotRequired["PersonCreateParamsAddress"] + """ + The person's residential address. + """ + date_of_birth: NotRequired["PersonCreateParamsDateOfBirth"] + """ + The person's date of birth. + """ + documents: NotRequired["PersonCreateParamsDocuments"] + """ + Documents that may be submitted to satisfy various informational requests. + """ + email: NotRequired[str] + """ + Email. + """ + given_name: NotRequired[str] + """ + The person's first name. + """ + id_numbers: NotRequired[List["PersonCreateParamsIdNumber"]] + """ + The identification numbers (e.g., SSN) associated with the person. + """ + legal_gender: NotRequired[Literal["female", "male"]] + """ + The person's gender (International regulations require either "male" or "female"). + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + """ + nationalities: NotRequired[List[str]] + """ + The nationalities (countries) this person is associated with. + """ + phone: NotRequired[str] + """ + The phone number for this person. + """ + political_exposure: NotRequired[Literal["existing", "none"]] + """ + The person's political exposure. + """ + relationship: NotRequired["PersonCreateParamsRelationship"] + """ + The relationship that this person has with the Account's business or legal entity. + """ + script_addresses: NotRequired["PersonCreateParamsScriptAddresses"] + """ + The script addresses (e.g., non-Latin characters) associated with the person. + """ + script_names: NotRequired["PersonCreateParamsScriptNames"] + """ + The script names (e.g. non-Latin characters) associated with the person. + """ + surname: NotRequired[str] + """ + The person's last name. + """ + + +class PersonCreateParamsAdditionalAddress(TypedDict): + city: NotRequired[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[str] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ + line2: NotRequired[str] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ + postal_code: NotRequired[str] + """ + ZIP or postal code. + """ + purpose: Literal["registered"] + """ + Purpose of additional address. + """ + state: NotRequired[str] + """ + State, county, province, or region. + """ + town: NotRequired[str] + """ + Town or cho-me. + """ + + +class PersonCreateParamsAdditionalName(TypedDict): + full_name: NotRequired[str] + """ + The person's full name. + """ + given_name: NotRequired[str] + """ + The person's first or given name. + """ + purpose: Literal["alias", "maiden"] + """ + The purpose or type of the additional name. + """ + surname: NotRequired[str] + """ + The person's last or family name. + """ + + +class PersonCreateParamsAdditionalTermsOfService(TypedDict): + account: NotRequired["PersonCreateParamsAdditionalTermsOfServiceAccount"] + """ + Stripe terms of service agreement. + """ + + +class PersonCreateParamsAdditionalTermsOfServiceAccount(TypedDict): + date: str + """ + The time when the Account's representative accepted the terms of service. Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: 2022-09-18T13:22:18.123Z. + """ + ip: str + """ + The IP address from which the Account's representative accepted the terms of service. + """ + user_agent: NotRequired[str] + """ + The user agent of the browser from which the Account's representative accepted the terms of service. + """ + + +class PersonCreateParamsAddress(TypedDict): + city: NotRequired[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[str] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ + line2: NotRequired[str] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ + postal_code: NotRequired[str] + """ + ZIP or postal code. + """ + state: NotRequired[str] + """ + State, county, province, or region. + """ + town: NotRequired[str] + """ + Town or cho-me. + """ + + +class PersonCreateParamsDateOfBirth(TypedDict): + day: int + """ + The day of birth. + """ + month: int + """ + The month of birth. + """ + year: int + """ + The year of birth. + """ + + +class PersonCreateParamsDocuments(TypedDict): + company_authorization: NotRequired[ + "PersonCreateParamsDocumentsCompanyAuthorization" + ] + """ + One or more documents that demonstrate proof that this person is authorized to represent the company. + """ + passport: NotRequired["PersonCreateParamsDocumentsPassport"] + """ + One or more documents showing the person's passport page with photo and personal data. + """ + primary_verification: NotRequired[ + "PersonCreateParamsDocumentsPrimaryVerification" + ] + """ + An identifying document showing the person's name, either a passport or local ID card. + """ + secondary_verification: NotRequired[ + "PersonCreateParamsDocumentsSecondaryVerification" + ] + """ + A document showing address, either a passport, local ID card, or utility bill from a well-known utility company. + """ + visa: NotRequired["PersonCreateParamsDocumentsVisa"] + """ + One or more documents showing the person's visa required for living in the country where they are residing. + """ + + +class PersonCreateParamsDocumentsCompanyAuthorization(TypedDict): + files: List[str] + """ + One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. + """ + type: Literal["files"] + """ + The format of the document. Currently supports `files` only. + """ + + +class PersonCreateParamsDocumentsPassport(TypedDict): + files: List[str] + """ + One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. + """ + type: Literal["files"] + """ + The format of the document. Currently supports `files` only. + """ + + +class PersonCreateParamsDocumentsPrimaryVerification(TypedDict): + front_back: "PersonCreateParamsDocumentsPrimaryVerificationFrontBack" + """ + The [file upload](https://docs.stripe.com/api/persons/update#create_file) tokens referring to each side of the document. + """ + type: Literal["front_back"] + """ + The format of the verification document. Currently supports `front_back` only. + """ + + +class PersonCreateParamsDocumentsPrimaryVerificationFrontBack(TypedDict): + back: NotRequired[str] + """ + A [file upload](https://docs.stripe.com/api/persons/update#create_file) token representing the back of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + """ + front: str + """ + A [file upload](https://docs.stripe.com/api/persons/update#create_file) token representing the front of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + """ + + +class PersonCreateParamsDocumentsSecondaryVerification(TypedDict): + front_back: "PersonCreateParamsDocumentsSecondaryVerificationFrontBack" + """ + The [file upload](https://docs.stripe.com/api/persons/update#create_file) tokens referring to each side of the document. + """ + type: Literal["front_back"] + """ + The format of the verification document. Currently supports `front_back` only. + """ + + +class PersonCreateParamsDocumentsSecondaryVerificationFrontBack(TypedDict): + back: NotRequired[str] + """ + A [file upload](https://docs.stripe.com/api/persons/update#create_file) token representing the back of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + """ + front: str + """ + A [file upload](https://docs.stripe.com/api/persons/update#create_file) token representing the front of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + """ + + +class PersonCreateParamsDocumentsVisa(TypedDict): + files: List[str] + """ + One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. + """ + type: Literal["files"] + """ + The format of the document. Currently supports `files` only. + """ + + +class PersonCreateParamsIdNumber(TypedDict): + type: Literal[ + "ae_eid", + "ao_nif", + "az_tin", + "bd_brc", + "bd_etin", + "bd_nid", + "br_cpf", + "cr_cpf", + "cr_dimex", + "cr_nite", + "de_stn", + "do_rcn", + "gt_nit", + "hk_id", + "kz_iin", + "mx_rfc", + "my_nric", + "mz_nuit", + "nl_bsn", + "pe_dni", + "pk_cnic", + "pk_snic", + "sa_tin", + "sg_fin", + "sg_nric", + "th_lc", + "th_pin", + "us_itin", + "us_itin_last_4", + "us_ssn", + "us_ssn_last_4", + ] + """ + The ID number type of an individual. + """ + value: str + """ + The value of the ID number. + """ + + +class PersonCreateParamsRelationship(TypedDict): + authorizer: NotRequired[bool] + """ + Whether the individual is an authorizer of the Account's legal entity. + """ + director: NotRequired[bool] + """ + Indicates whether the person is a director of the associated legal entity. + """ + executive: NotRequired[bool] + """ + Indicates whether the person is an executive of the associated legal entity. + """ + legal_guardian: NotRequired[bool] + """ + Indicates whether the person is a legal guardian of the associated legal entity. + """ + owner: NotRequired[bool] + """ + Indicates whether the person is an owner of the associated legal entity. + """ + percent_ownership: NotRequired[str] + """ + The percentage of ownership the person has in the associated legal entity. + """ + representative: NotRequired[bool] + """ + Indicates whether the person is a representative of the associated legal entity. + """ + title: NotRequired[str] + """ + The title or position the person holds in the associated legal entity. + """ + + +class PersonCreateParamsScriptAddresses(TypedDict): + kana: NotRequired["PersonCreateParamsScriptAddressesKana"] + """ + Kana Address. + """ + kanji: NotRequired["PersonCreateParamsScriptAddressesKanji"] + """ + Kanji Address. + """ + + +class PersonCreateParamsScriptAddressesKana(TypedDict): + city: NotRequired[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[str] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ + line2: NotRequired[str] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ + postal_code: NotRequired[str] + """ + ZIP or postal code. + """ + state: NotRequired[str] + """ + State, county, province, or region. + """ + town: NotRequired[str] + """ + Town or cho-me. + """ + + +class PersonCreateParamsScriptAddressesKanji(TypedDict): + city: NotRequired[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[str] + """ + Address line 1 (e.g., street, PO Box, or company name). + """ + line2: NotRequired[str] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ + postal_code: NotRequired[str] + """ + ZIP or postal code. + """ + state: NotRequired[str] + """ + State, county, province, or region. + """ + town: NotRequired[str] + """ + Town or cho-me. + """ + + +class PersonCreateParamsScriptNames(TypedDict): + kana: NotRequired["PersonCreateParamsScriptNamesKana"] + """ + Persons name in kana script. + """ + kanji: NotRequired["PersonCreateParamsScriptNamesKanji"] + """ + Persons name in kanji script. + """ + + +class PersonCreateParamsScriptNamesKana(TypedDict): + given_name: NotRequired[str] + """ + The person's first or given name. + """ + surname: NotRequired[str] + """ + The person's last or family name. + """ + + +class PersonCreateParamsScriptNamesKanji(TypedDict): + given_name: NotRequired[str] + """ + The person's first or given name. + """ + surname: NotRequired[str] + """ + The person's last or family name. + """ diff --git a/stripe/params/v2/core/accounts/_person_delete_params.py b/stripe/params/v2/core/accounts/_person_delete_params.py new file mode 100644 index 000000000..1dbea64d3 --- /dev/null +++ b/stripe/params/v2/core/accounts/_person_delete_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class PersonDeleteParams(TypedDict): + pass diff --git a/stripe/params/v2/core/accounts/_person_list_params.py b/stripe/params/v2/core/accounts/_person_list_params.py new file mode 100644 index 000000000..3c881ec02 --- /dev/null +++ b/stripe/params/v2/core/accounts/_person_list_params.py @@ -0,0 +1,10 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import NotRequired, TypedDict + + +class PersonListParams(TypedDict): + limit: NotRequired[int] + """ + The upper limit on the number of accounts returned by the List Account request. + """ diff --git a/stripe/params/v2/core/accounts/_person_retrieve_params.py b/stripe/params/v2/core/accounts/_person_retrieve_params.py new file mode 100644 index 000000000..e34d217ce --- /dev/null +++ b/stripe/params/v2/core/accounts/_person_retrieve_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class PersonRetrieveParams(TypedDict): + pass diff --git a/stripe/params/v2/core/accounts/_person_update_params.py b/stripe/params/v2/core/accounts/_person_update_params.py new file mode 100644 index 000000000..bca73555c --- /dev/null +++ b/stripe/params/v2/core/accounts/_person_update_params.py @@ -0,0 +1,495 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import Dict, List, Optional +from typing_extensions import Literal, NotRequired, TypedDict + + +class PersonUpdateParams(TypedDict): + additional_addresses: NotRequired[ + List["PersonUpdateParamsAdditionalAddress"] + ] + """ + Additional addresses associated with the person. + """ + additional_names: NotRequired[List["PersonUpdateParamsAdditionalName"]] + """ + Additional names (e.g. aliases) associated with the person. + """ + additional_terms_of_service: NotRequired[ + "PersonUpdateParamsAdditionalTermsOfService" + ] + """ + Attestations of accepted terms of service agreements. + """ + address: NotRequired["PersonUpdateParamsAddress"] + """ + The primary address associated with the person. + """ + date_of_birth: NotRequired["PersonUpdateParamsDateOfBirth"] + """ + The person's date of birth. + """ + documents: NotRequired["PersonUpdateParamsDocuments"] + """ + Documents that may be submitted to satisfy various informational requests. + """ + email: NotRequired[str] + """ + Email. + """ + given_name: NotRequired[str] + """ + The person's first name. + """ + id_numbers: NotRequired[List["PersonUpdateParamsIdNumber"]] + """ + The identification numbers (e.g., SSN) associated with the person. + """ + legal_gender: NotRequired[Literal["female", "male"]] + """ + The person's gender (International regulations require either "male" or "female"). + """ + metadata: NotRequired[Dict[str, Optional[str]]] + """ + Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + """ + nationalities: NotRequired[List[str]] + """ + The nationalities (countries) this person is associated with. + """ + phone: NotRequired[str] + """ + The phone number for this person. + """ + political_exposure: NotRequired[Literal["existing", "none"]] + """ + The person's political exposure. + """ + relationship: NotRequired["PersonUpdateParamsRelationship"] + """ + The relationship that this person has with the Account's business or legal entity. + """ + script_addresses: NotRequired["PersonUpdateParamsScriptAddresses"] + """ + The script addresses (e.g., non-Latin characters) associated with the person. + """ + script_names: NotRequired["PersonUpdateParamsScriptNames"] + """ + The script names (e.g. non-Latin characters) associated with the person. + """ + surname: NotRequired[str] + """ + The person's last name. + """ + + +class PersonUpdateParamsAdditionalAddress(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 (e.g., street, PO Box, or company name). + """ + line2: NotRequired[str] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ + postal_code: NotRequired[str] + """ + ZIP or postal code. + """ + purpose: Literal["registered"] + """ + Purpose of additional address. + """ + state: NotRequired[str] + """ + State, county, province, or region. + """ + town: NotRequired[str] + """ + Town or cho-me. + """ + + +class PersonUpdateParamsAdditionalName(TypedDict): + full_name: NotRequired[str] + """ + The person's full name. + """ + given_name: NotRequired[str] + """ + The person's first or given name. + """ + purpose: Literal["alias", "maiden"] + """ + The purpose or type of the additional name. + """ + surname: NotRequired[str] + """ + The person's last or family name. + """ + + +class PersonUpdateParamsAdditionalTermsOfService(TypedDict): + account: NotRequired["PersonUpdateParamsAdditionalTermsOfServiceAccount"] + """ + Stripe terms of service agreement. + """ + + +class PersonUpdateParamsAdditionalTermsOfServiceAccount(TypedDict): + date: NotRequired[str] + """ + The time when the Account's representative accepted the terms of service. Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: 2022-09-18T13:22:18.123Z. + """ + ip: NotRequired[str] + """ + The IP address from which the Account's representative accepted the terms of service. + """ + user_agent: NotRequired[str] + """ + The user agent of the browser from which the Account's representative accepted the terms of service. + """ + + +class PersonUpdateParamsAddress(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 (e.g., street, PO Box, or company name). + """ + line2: NotRequired[str] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ + postal_code: NotRequired[str] + """ + ZIP or postal code. + """ + state: NotRequired[str] + """ + State, county, province, or region. + """ + town: NotRequired[str] + """ + Town or cho-me. + """ + + +class PersonUpdateParamsDateOfBirth(TypedDict): + day: int + """ + The day of the birth. + """ + month: int + """ + The month of birth. + """ + year: int + """ + The year of birth. + """ + + +class PersonUpdateParamsDocuments(TypedDict): + company_authorization: NotRequired[ + "PersonUpdateParamsDocumentsCompanyAuthorization" + ] + """ + One or more documents that demonstrate proof that this person is authorized to represent the company. + """ + passport: NotRequired["PersonUpdateParamsDocumentsPassport"] + """ + One or more documents showing the person's passport page with photo and personal data. + """ + primary_verification: NotRequired[ + "PersonUpdateParamsDocumentsPrimaryVerification" + ] + """ + An identifying document showing the person's name, either a passport or local ID card. + """ + secondary_verification: NotRequired[ + "PersonUpdateParamsDocumentsSecondaryVerification" + ] + """ + A document showing address, either a passport, local ID card, or utility bill from a well-known utility company. + """ + visa: NotRequired["PersonUpdateParamsDocumentsVisa"] + """ + One or more documents showing the person's visa required for living in the country where they are residing. + """ + + +class PersonUpdateParamsDocumentsCompanyAuthorization(TypedDict): + files: List[str] + """ + One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. + """ + type: Literal["files"] + """ + The format of the document. Currently supports `files` only. + """ + + +class PersonUpdateParamsDocumentsPassport(TypedDict): + files: List[str] + """ + One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. + """ + type: Literal["files"] + """ + The format of the document. Currently supports `files` only. + """ + + +class PersonUpdateParamsDocumentsPrimaryVerification(TypedDict): + front_back: "PersonUpdateParamsDocumentsPrimaryVerificationFrontBack" + """ + The [file upload](https://docs.stripe.com/api/persons/update#create_file) tokens referring to each side of the document. + """ + type: Literal["front_back"] + """ + The format of the verification document. Currently supports `front_back` only. + """ + + +class PersonUpdateParamsDocumentsPrimaryVerificationFrontBack(TypedDict): + back: NotRequired[str] + """ + A [file upload](https://docs.stripe.com/api/persons/update#create_file) token representing the back of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + """ + front: NotRequired[str] + """ + A [file upload](https://docs.stripe.com/api/persons/update#create_file) token representing the front of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + """ + + +class PersonUpdateParamsDocumentsSecondaryVerification(TypedDict): + front_back: "PersonUpdateParamsDocumentsSecondaryVerificationFrontBack" + """ + The [file upload](https://docs.stripe.com/api/persons/update#create_file) tokens referring to each side of the document. + """ + type: Literal["front_back"] + """ + The format of the verification document. Currently supports `front_back` only. + """ + + +class PersonUpdateParamsDocumentsSecondaryVerificationFrontBack(TypedDict): + back: NotRequired[str] + """ + A [file upload](https://docs.stripe.com/api/persons/update#create_file) token representing the back of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + """ + front: NotRequired[str] + """ + A [file upload](https://docs.stripe.com/api/persons/update#create_file) token representing the front of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + """ + + +class PersonUpdateParamsDocumentsVisa(TypedDict): + files: List[str] + """ + One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. + """ + type: Literal["files"] + """ + The format of the document. Currently supports `files` only. + """ + + +class PersonUpdateParamsIdNumber(TypedDict): + type: Literal[ + "ae_eid", + "ao_nif", + "az_tin", + "bd_brc", + "bd_etin", + "bd_nid", + "br_cpf", + "cr_cpf", + "cr_dimex", + "cr_nite", + "de_stn", + "do_rcn", + "gt_nit", + "hk_id", + "kz_iin", + "mx_rfc", + "my_nric", + "mz_nuit", + "nl_bsn", + "pe_dni", + "pk_cnic", + "pk_snic", + "sa_tin", + "sg_fin", + "sg_nric", + "th_lc", + "th_pin", + "us_itin", + "us_itin_last_4", + "us_ssn", + "us_ssn_last_4", + ] + """ + The ID number type of an individual. + """ + value: str + """ + The value of the ID number. + """ + + +class PersonUpdateParamsRelationship(TypedDict): + authorizer: NotRequired[bool] + """ + Whether the individual is an authorizer of the Account's legal entity. + """ + director: NotRequired[bool] + """ + Indicates whether the person is a director of the associated legal entity. + """ + executive: NotRequired[bool] + """ + Indicates whether the person is an executive of the associated legal entity. + """ + legal_guardian: NotRequired[bool] + """ + Indicates whether the person is a legal guardian of the associated legal entity. + """ + owner: NotRequired[bool] + """ + Indicates whether the person is an owner of the associated legal entity. + """ + percent_ownership: NotRequired[str] + """ + The percentage of ownership the person has in the associated legal entity. + """ + representative: NotRequired[bool] + """ + Indicates whether the person is a representative of the associated legal entity. + """ + title: NotRequired[str] + """ + The title or position the person holds in the associated legal entity. + """ + + +class PersonUpdateParamsScriptAddresses(TypedDict): + kana: NotRequired["PersonUpdateParamsScriptAddressesKana"] + """ + Kana Address. + """ + kanji: NotRequired["PersonUpdateParamsScriptAddressesKanji"] + """ + Kanji Address. + """ + + +class PersonUpdateParamsScriptAddressesKana(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 (e.g., street, PO Box, or company name). + """ + line2: NotRequired[str] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ + postal_code: NotRequired[str] + """ + ZIP or postal code. + """ + state: NotRequired[str] + """ + State, county, province, or region. + """ + town: NotRequired[str] + """ + Town or cho-me. + """ + + +class PersonUpdateParamsScriptAddressesKanji(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 (e.g., street, PO Box, or company name). + """ + line2: NotRequired[str] + """ + Address line 2 (e.g., apartment, suite, unit, or building). + """ + postal_code: NotRequired[str] + """ + ZIP or postal code. + """ + state: NotRequired[str] + """ + State, county, province, or region. + """ + town: NotRequired[str] + """ + Town or cho-me. + """ + + +class PersonUpdateParamsScriptNames(TypedDict): + kana: NotRequired["PersonUpdateParamsScriptNamesKana"] + """ + Persons name in kana script. + """ + kanji: NotRequired["PersonUpdateParamsScriptNamesKanji"] + """ + Persons name in kanji script. + """ + + +class PersonUpdateParamsScriptNamesKana(TypedDict): + given_name: NotRequired[str] + """ + The person's first or given name. + """ + surname: NotRequired[str] + """ + The person's last or family name. + """ + + +class PersonUpdateParamsScriptNamesKanji(TypedDict): + given_name: NotRequired[str] + """ + The person's first or given name. + """ + surname: NotRequired[str] + """ + The person's last or family name. + """ diff --git a/stripe/params/v2/core/vault/__init__.py b/stripe/params/v2/core/vault/__init__.py new file mode 100644 index 000000000..36706b7aa --- /dev/null +++ b/stripe/params/v2/core/vault/__init__.py @@ -0,0 +1,29 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe.params.v2.core.vault._gb_bank_account_acknowledge_confirmation_of_payee_params import ( + GbBankAccountAcknowledgeConfirmationOfPayeeParams as GbBankAccountAcknowledgeConfirmationOfPayeeParams, +) +from stripe.params.v2.core.vault._gb_bank_account_archive_params import ( + GbBankAccountArchiveParams as GbBankAccountArchiveParams, +) +from stripe.params.v2.core.vault._gb_bank_account_create_params import ( + GbBankAccountCreateParams as GbBankAccountCreateParams, +) +from stripe.params.v2.core.vault._gb_bank_account_initiate_confirmation_of_payee_params import ( + GbBankAccountInitiateConfirmationOfPayeeParams as GbBankAccountInitiateConfirmationOfPayeeParams, +) +from stripe.params.v2.core.vault._gb_bank_account_retrieve_params import ( + GbBankAccountRetrieveParams as GbBankAccountRetrieveParams, +) +from stripe.params.v2.core.vault._us_bank_account_archive_params import ( + UsBankAccountArchiveParams as UsBankAccountArchiveParams, +) +from stripe.params.v2.core.vault._us_bank_account_create_params import ( + UsBankAccountCreateParams as UsBankAccountCreateParams, +) +from stripe.params.v2.core.vault._us_bank_account_retrieve_params import ( + UsBankAccountRetrieveParams as UsBankAccountRetrieveParams, +) +from stripe.params.v2.core.vault._us_bank_account_update_params import ( + UsBankAccountUpdateParams as UsBankAccountUpdateParams, +) diff --git a/stripe/params/v2/core/vault/_gb_bank_account_acknowledge_confirmation_of_payee_params.py b/stripe/params/v2/core/vault/_gb_bank_account_acknowledge_confirmation_of_payee_params.py new file mode 100644 index 000000000..7db9a3f15 --- /dev/null +++ b/stripe/params/v2/core/vault/_gb_bank_account_acknowledge_confirmation_of_payee_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class GbBankAccountAcknowledgeConfirmationOfPayeeParams(TypedDict): + pass diff --git a/stripe/params/v2/core/vault/_gb_bank_account_archive_params.py b/stripe/params/v2/core/vault/_gb_bank_account_archive_params.py new file mode 100644 index 000000000..e9edefe83 --- /dev/null +++ b/stripe/params/v2/core/vault/_gb_bank_account_archive_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class GbBankAccountArchiveParams(TypedDict): + pass diff --git a/stripe/params/v2/core/vault/_gb_bank_account_create_params.py b/stripe/params/v2/core/vault/_gb_bank_account_create_params.py new file mode 100644 index 000000000..9fc659bc2 --- /dev/null +++ b/stripe/params/v2/core/vault/_gb_bank_account_create_params.py @@ -0,0 +1,42 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import Literal, NotRequired, TypedDict + + +class GbBankAccountCreateParams(TypedDict): + account_number: str + """ + The Account Number of the bank account. + """ + bank_account_type: NotRequired[Literal["checking", "savings"]] + """ + Closed Enum. The type of the bank account (checking or savings). + """ + confirmation_of_payee: NotRequired[ + "GbBankAccountCreateParamsConfirmationOfPayee" + ] + """ + Whether or not to automatically perform Confirmation of Payee to verify the users information + against what was provided by the bank. Doing so is required for all bank accounts not owned + by you before making domestic UK OutboundPayments. + """ + sort_code: str + """ + The Sort Code of the bank account. + """ + + +class GbBankAccountCreateParamsConfirmationOfPayee(TypedDict): + business_type: NotRequired[Literal["business", "personal"]] + """ + The business type to be checked against. Legal entity information will be used if unspecified. + Closed enum. + """ + initiate: bool + """ + User specifies whether Confirmation of Payee is automatically initiated when creating the bank account. + """ + name: NotRequired[str] + """ + The name to be checked against. Legal entity information will be used if unspecified. + """ diff --git a/stripe/params/v2/core/vault/_gb_bank_account_initiate_confirmation_of_payee_params.py b/stripe/params/v2/core/vault/_gb_bank_account_initiate_confirmation_of_payee_params.py new file mode 100644 index 000000000..b717e626f --- /dev/null +++ b/stripe/params/v2/core/vault/_gb_bank_account_initiate_confirmation_of_payee_params.py @@ -0,0 +1,14 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import Literal, NotRequired, TypedDict + + +class GbBankAccountInitiateConfirmationOfPayeeParams(TypedDict): + business_type: NotRequired[Literal["business", "personal"]] + """ + The business type to be checked against. Legal entity information will be used if unspecified. + """ + name: NotRequired[str] + """ + The name of the user to be checked against. Legal entity information will be used if unspecified. + """ diff --git a/stripe/params/v2/core/vault/_gb_bank_account_retrieve_params.py b/stripe/params/v2/core/vault/_gb_bank_account_retrieve_params.py new file mode 100644 index 000000000..a3289ca98 --- /dev/null +++ b/stripe/params/v2/core/vault/_gb_bank_account_retrieve_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class GbBankAccountRetrieveParams(TypedDict): + pass diff --git a/stripe/params/v2/core/vault/_us_bank_account_archive_params.py b/stripe/params/v2/core/vault/_us_bank_account_archive_params.py new file mode 100644 index 000000000..d67268aca --- /dev/null +++ b/stripe/params/v2/core/vault/_us_bank_account_archive_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class UsBankAccountArchiveParams(TypedDict): + pass diff --git a/stripe/params/v2/core/vault/_us_bank_account_create_params.py b/stripe/params/v2/core/vault/_us_bank_account_create_params.py new file mode 100644 index 000000000..b319c3f32 --- /dev/null +++ b/stripe/params/v2/core/vault/_us_bank_account_create_params.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import Literal, NotRequired, TypedDict + + +class UsBankAccountCreateParams(TypedDict): + account_number: str + """ + The account number of the bank account. + """ + bank_account_type: NotRequired[Literal["checking", "savings"]] + """ + Closed Enum. The type of the bank account (checking or savings). + """ + fedwire_routing_number: NotRequired[str] + """ + The fedwire routing number of the bank account. Note that certain banks have the same ACH and wire routing number. + """ + routing_number: NotRequired[str] + """ + The ACH routing number of the bank account. Note that certain banks have the same ACH and wire routing number. + """ diff --git a/stripe/params/v2/core/vault/_us_bank_account_retrieve_params.py b/stripe/params/v2/core/vault/_us_bank_account_retrieve_params.py new file mode 100644 index 000000000..05b62c9c4 --- /dev/null +++ b/stripe/params/v2/core/vault/_us_bank_account_retrieve_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class UsBankAccountRetrieveParams(TypedDict): + pass diff --git a/stripe/params/v2/core/vault/_us_bank_account_update_params.py b/stripe/params/v2/core/vault/_us_bank_account_update_params.py new file mode 100644 index 000000000..a75aa9eac --- /dev/null +++ b/stripe/params/v2/core/vault/_us_bank_account_update_params.py @@ -0,0 +1,14 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import NotRequired, TypedDict + + +class UsBankAccountUpdateParams(TypedDict): + fedwire_routing_number: NotRequired[str] + """ + The bank account's fedwire routing number can be provided for update it was were empty previously. + """ + routing_number: NotRequired[str] + """ + The bank account's ACH routing number can be provided for update if it was empty previously. + """ diff --git a/stripe/params/v2/money_management/__init__.py b/stripe/params/v2/money_management/__init__.py new file mode 100644 index 000000000..9ab6a541f --- /dev/null +++ b/stripe/params/v2/money_management/__init__.py @@ -0,0 +1,131 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe.params.v2.money_management._adjustment_list_params import ( + AdjustmentListParams as AdjustmentListParams, +) +from stripe.params.v2.money_management._adjustment_retrieve_params import ( + AdjustmentRetrieveParams as AdjustmentRetrieveParams, +) +from stripe.params.v2.money_management._financial_account_close_params import ( + FinancialAccountCloseParams as FinancialAccountCloseParams, +) +from stripe.params.v2.money_management._financial_account_create_params import ( + FinancialAccountCreateParams as FinancialAccountCreateParams, +) +from stripe.params.v2.money_management._financial_account_list_params import ( + FinancialAccountListParams as FinancialAccountListParams, +) +from stripe.params.v2.money_management._financial_account_retrieve_params import ( + FinancialAccountRetrieveParams as FinancialAccountRetrieveParams, +) +from stripe.params.v2.money_management._financial_address_create_params import ( + FinancialAddressCreateParams as FinancialAddressCreateParams, +) +from stripe.params.v2.money_management._financial_address_list_params import ( + FinancialAddressListParams as FinancialAddressListParams, +) +from stripe.params.v2.money_management._financial_address_retrieve_params import ( + FinancialAddressRetrieveParams as FinancialAddressRetrieveParams, +) +from stripe.params.v2.money_management._inbound_transfer_create_params import ( + InboundTransferCreateParams as InboundTransferCreateParams, +) +from stripe.params.v2.money_management._inbound_transfer_list_params import ( + InboundTransferListParams as InboundTransferListParams, +) +from stripe.params.v2.money_management._inbound_transfer_retrieve_params import ( + InboundTransferRetrieveParams as InboundTransferRetrieveParams, +) +from stripe.params.v2.money_management._outbound_payment_cancel_params import ( + OutboundPaymentCancelParams as OutboundPaymentCancelParams, +) +from stripe.params.v2.money_management._outbound_payment_create_params import ( + OutboundPaymentCreateParams as OutboundPaymentCreateParams, +) +from stripe.params.v2.money_management._outbound_payment_list_params import ( + OutboundPaymentListParams as OutboundPaymentListParams, +) +from stripe.params.v2.money_management._outbound_payment_quote_create_params import ( + OutboundPaymentQuoteCreateParams as OutboundPaymentQuoteCreateParams, +) +from stripe.params.v2.money_management._outbound_payment_quote_retrieve_params import ( + OutboundPaymentQuoteRetrieveParams as OutboundPaymentQuoteRetrieveParams, +) +from stripe.params.v2.money_management._outbound_payment_retrieve_params import ( + OutboundPaymentRetrieveParams as OutboundPaymentRetrieveParams, +) +from stripe.params.v2.money_management._outbound_setup_intent_cancel_params import ( + OutboundSetupIntentCancelParams as OutboundSetupIntentCancelParams, +) +from stripe.params.v2.money_management._outbound_setup_intent_create_params import ( + OutboundSetupIntentCreateParams as OutboundSetupIntentCreateParams, +) +from stripe.params.v2.money_management._outbound_setup_intent_list_params import ( + OutboundSetupIntentListParams as OutboundSetupIntentListParams, +) +from stripe.params.v2.money_management._outbound_setup_intent_retrieve_params import ( + OutboundSetupIntentRetrieveParams as OutboundSetupIntentRetrieveParams, +) +from stripe.params.v2.money_management._outbound_setup_intent_update_params import ( + OutboundSetupIntentUpdateParams as OutboundSetupIntentUpdateParams, +) +from stripe.params.v2.money_management._outbound_transfer_cancel_params import ( + OutboundTransferCancelParams as OutboundTransferCancelParams, +) +from stripe.params.v2.money_management._outbound_transfer_create_params import ( + OutboundTransferCreateParams as OutboundTransferCreateParams, +) +from stripe.params.v2.money_management._outbound_transfer_list_params import ( + OutboundTransferListParams as OutboundTransferListParams, +) +from stripe.params.v2.money_management._outbound_transfer_retrieve_params import ( + OutboundTransferRetrieveParams as OutboundTransferRetrieveParams, +) +from stripe.params.v2.money_management._payout_method_archive_params import ( + PayoutMethodArchiveParams as PayoutMethodArchiveParams, +) +from stripe.params.v2.money_management._payout_method_list_params import ( + PayoutMethodListParams as PayoutMethodListParams, +) +from stripe.params.v2.money_management._payout_method_retrieve_params import ( + PayoutMethodRetrieveParams as PayoutMethodRetrieveParams, +) +from stripe.params.v2.money_management._payout_method_unarchive_params import ( + PayoutMethodUnarchiveParams as PayoutMethodUnarchiveParams, +) +from stripe.params.v2.money_management._payout_methods_bank_account_spec_retrieve_params import ( + PayoutMethodsBankAccountSpecRetrieveParams as PayoutMethodsBankAccountSpecRetrieveParams, +) +from stripe.params.v2.money_management._received_credit_list_params import ( + ReceivedCreditListParams as ReceivedCreditListParams, +) +from stripe.params.v2.money_management._received_credit_retrieve_params import ( + ReceivedCreditRetrieveParams as ReceivedCreditRetrieveParams, +) +from stripe.params.v2.money_management._received_debit_list_params import ( + ReceivedDebitListParams as ReceivedDebitListParams, +) +from stripe.params.v2.money_management._received_debit_retrieve_params import ( + ReceivedDebitRetrieveParams as ReceivedDebitRetrieveParams, +) +from stripe.params.v2.money_management._recipient_verification_acknowledge_params import ( + RecipientVerificationAcknowledgeParams as RecipientVerificationAcknowledgeParams, +) +from stripe.params.v2.money_management._recipient_verification_create_params import ( + RecipientVerificationCreateParams as RecipientVerificationCreateParams, +) +from stripe.params.v2.money_management._recipient_verification_retrieve_params import ( + RecipientVerificationRetrieveParams as RecipientVerificationRetrieveParams, +) +from stripe.params.v2.money_management._transaction_entry_list_params import ( + TransactionEntryListParams as TransactionEntryListParams, +) +from stripe.params.v2.money_management._transaction_entry_retrieve_params import ( + TransactionEntryRetrieveParams as TransactionEntryRetrieveParams, +) +from stripe.params.v2.money_management._transaction_list_params import ( + TransactionListParams as TransactionListParams, +) +from stripe.params.v2.money_management._transaction_retrieve_params import ( + TransactionRetrieveParams as TransactionRetrieveParams, +) diff --git a/stripe/params/v2/money_management/_adjustment_list_params.py b/stripe/params/v2/money_management/_adjustment_list_params.py new file mode 100644 index 000000000..1a7715c28 --- /dev/null +++ b/stripe/params/v2/money_management/_adjustment_list_params.py @@ -0,0 +1,39 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import NotRequired, TypedDict + + +class AdjustmentListParams(TypedDict): + adjusted_flow: NotRequired[str] + """ + Filter for Adjustments linked to a Flow. + """ + created: NotRequired[str] + """ + Filter for objects created at the specified timestamp. + Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. + """ + created_gt: NotRequired[str] + """ + Filter for objects created after the specified timestamp. + Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. + """ + created_gte: NotRequired[str] + """ + Filter for objects created on or after the specified timestamp. + Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. + """ + created_lt: NotRequired[str] + """ + Filter for objects created before the specified timestamp. + Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. + """ + created_lte: NotRequired[str] + """ + 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. + """ + limit: NotRequired[int] + """ + The page limit. + """ diff --git a/stripe/params/v2/money_management/_adjustment_retrieve_params.py b/stripe/params/v2/money_management/_adjustment_retrieve_params.py new file mode 100644 index 000000000..7c2480a4f --- /dev/null +++ b/stripe/params/v2/money_management/_adjustment_retrieve_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class AdjustmentRetrieveParams(TypedDict): + pass diff --git a/stripe/params/v2/money_management/_financial_account_close_params.py b/stripe/params/v2/money_management/_financial_account_close_params.py new file mode 100644 index 000000000..6f86592eb --- /dev/null +++ b/stripe/params/v2/money_management/_financial_account_close_params.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import NotRequired, TypedDict + + +class FinancialAccountCloseParams(TypedDict): + forwarding_settings: NotRequired[ + "FinancialAccountCloseParamsForwardingSettings" + ] + """ + The addresses to forward any incoming transactions to. + """ + + +class FinancialAccountCloseParamsForwardingSettings(TypedDict): + payment_method: NotRequired[str] + """ + The address to send forwarded payments to. + """ + payout_method: NotRequired[str] + """ + The address to send forwarded payouts to. + """ diff --git a/stripe/params/v2/money_management/_financial_account_create_params.py b/stripe/params/v2/money_management/_financial_account_create_params.py new file mode 100644 index 000000000..0389cbe23 --- /dev/null +++ b/stripe/params/v2/money_management/_financial_account_create_params.py @@ -0,0 +1,30 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class FinancialAccountCreateParams(TypedDict): + display_name: NotRequired[str] + """ + A descriptive name for the FinancialAccount, up to 50 characters long. This name will be used in the Stripe Dashboard and embedded components. + """ + metadata: NotRequired[Dict[str, str]] + """ + Metadata associated with the FinancialAccount. + """ + storage: NotRequired["FinancialAccountCreateParamsStorage"] + """ + Parameters specific to creating `storage` type FinancialAccounts. + """ + type: Literal["storage"] + """ + The type of FinancialAccount to create. + """ + + +class FinancialAccountCreateParamsStorage(TypedDict): + holds_currencies: List[str] + """ + The currencies that this FinancialAccount can hold. + """ diff --git a/stripe/params/v2/money_management/_financial_account_list_params.py b/stripe/params/v2/money_management/_financial_account_list_params.py new file mode 100644 index 000000000..95949bc87 --- /dev/null +++ b/stripe/params/v2/money_management/_financial_account_list_params.py @@ -0,0 +1,14 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import Literal, NotRequired, TypedDict + + +class FinancialAccountListParams(TypedDict): + limit: NotRequired[int] + """ + The page limit. + """ + status: NotRequired[Literal["closed", "open", "pending"]] + """ + The status of the FinancialAccount to filter by. By default, closed FinancialAccounts are not returned. + """ diff --git a/stripe/params/v2/money_management/_financial_account_retrieve_params.py b/stripe/params/v2/money_management/_financial_account_retrieve_params.py new file mode 100644 index 000000000..40b1615fb --- /dev/null +++ b/stripe/params/v2/money_management/_financial_account_retrieve_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class FinancialAccountRetrieveParams(TypedDict): + pass diff --git a/stripe/params/v2/money_management/_financial_address_create_params.py b/stripe/params/v2/money_management/_financial_address_create_params.py new file mode 100644 index 000000000..db8be7391 --- /dev/null +++ b/stripe/params/v2/money_management/_financial_address_create_params.py @@ -0,0 +1,27 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import Literal, NotRequired, TypedDict + + +class FinancialAddressCreateParams(TypedDict): + financial_account: str + """ + The ID of the FinancialAccount the new FinancialAddress should be associated with. + """ + sepa_bank_account: NotRequired[ + "FinancialAddressCreateParamsSepaBankAccount" + ] + """ + Optional SEPA Bank account options, used to configure the type of SEPA Bank account to create, such as the originating country. + """ + type: Literal["gb_bank_account", "sepa_bank_account", "us_bank_account"] + """ + The type of FinancialAddress details to provision. + """ + + +class FinancialAddressCreateParamsSepaBankAccount(TypedDict): + country: str + """ + The originating country of the SEPA Bank account. + """ diff --git a/stripe/params/v2/money_management/_financial_address_list_params.py b/stripe/params/v2/money_management/_financial_address_list_params.py new file mode 100644 index 000000000..b504d8ece --- /dev/null +++ b/stripe/params/v2/money_management/_financial_address_list_params.py @@ -0,0 +1,27 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import Literal, NotRequired, TypedDict + + +class FinancialAddressListParams(TypedDict): + financial_account: NotRequired[str] + """ + The ID of the FinancialAccount for which FinancialAddresses are to be returned. + """ + include: NotRequired[ + List[ + Literal[ + "credentials.gb_bank_account.account_number", + "credentials.sepa_bank_account.iban", + "credentials.us_bank_account.account_number", + ] + ] + ] + """ + Open Enum. A list of fields to reveal in the FinancialAddresses returned. + """ + limit: NotRequired[int] + """ + The page limit. + """ diff --git a/stripe/params/v2/money_management/_financial_address_retrieve_params.py b/stripe/params/v2/money_management/_financial_address_retrieve_params.py new file mode 100644 index 000000000..18a0f46fb --- /dev/null +++ b/stripe/params/v2/money_management/_financial_address_retrieve_params.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import Literal, NotRequired, TypedDict + + +class FinancialAddressRetrieveParams(TypedDict): + include: NotRequired[ + List[ + Literal[ + "credentials.gb_bank_account.account_number", + "credentials.sepa_bank_account.iban", + "credentials.us_bank_account.account_number", + ] + ] + ] + """ + Open Enum. A list of fields to reveal in the FinancialAddresses returned. + """ diff --git a/stripe/params/v2/money_management/_inbound_transfer_create_params.py b/stripe/params/v2/money_management/_inbound_transfer_create_params.py new file mode 100644 index 000000000..db5250ed2 --- /dev/null +++ b/stripe/params/v2/money_management/_inbound_transfer_create_params.py @@ -0,0 +1,47 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe.v2._amount import AmountParam +from typing_extensions import NotRequired, TypedDict + +_InboundTransferCreateParamsBase = TypedDict( + "InboundTransferCreateParams", + {"from": "InboundTransferCreateParamsFrom"}, +) + + +class InboundTransferCreateParams(_InboundTransferCreateParamsBase): + amount: AmountParam + """ + The amount, in specified currency, by which the FinancialAccount balance will increase due to the InboundTransfer. + """ + description: NotRequired[str] + """ + An optional, freeform description field intended to store metadata. + """ + to: "InboundTransferCreateParamsTo" + """ + Object containing details about where the funds will land. + """ + + +class InboundTransferCreateParamsFrom(TypedDict): + currency: NotRequired[str] + """ + An optional currency field used to specify which currency is debited from the Payment Method. + Since many Payment Methods support only one currency, this field is optional. + """ + payment_method: str + """ + ID of the Payment Method using which IBT will be made. + """ + + +class InboundTransferCreateParamsTo(TypedDict): + currency: str + """ + The currency in which funds will land in. + """ + financial_account: str + """ + The FinancialAccount that funds will land in. + """ diff --git a/stripe/params/v2/money_management/_inbound_transfer_list_params.py b/stripe/params/v2/money_management/_inbound_transfer_list_params.py new file mode 100644 index 000000000..5f1cf063f --- /dev/null +++ b/stripe/params/v2/money_management/_inbound_transfer_list_params.py @@ -0,0 +1,35 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import NotRequired, TypedDict + + +class InboundTransferListParams(TypedDict): + created: NotRequired[str] + """ + Filter for objects created at the specified timestamp. + Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. + """ + created_gt: NotRequired[str] + """ + Filter for objects created after the specified timestamp. + Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. + """ + created_gte: NotRequired[str] + """ + Filter for objects created on or after the specified timestamp. + Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. + """ + created_lt: NotRequired[str] + """ + Filter for objects created before the specified timestamp. + Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. + """ + created_lte: NotRequired[str] + """ + 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. + """ + limit: NotRequired[int] + """ + The page limit. + """ diff --git a/stripe/params/v2/money_management/_inbound_transfer_retrieve_params.py b/stripe/params/v2/money_management/_inbound_transfer_retrieve_params.py new file mode 100644 index 000000000..541671578 --- /dev/null +++ b/stripe/params/v2/money_management/_inbound_transfer_retrieve_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class InboundTransferRetrieveParams(TypedDict): + pass diff --git a/stripe/params/v2/money_management/_outbound_payment_cancel_params.py b/stripe/params/v2/money_management/_outbound_payment_cancel_params.py new file mode 100644 index 000000000..dda6b31b3 --- /dev/null +++ b/stripe/params/v2/money_management/_outbound_payment_cancel_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class OutboundPaymentCancelParams(TypedDict): + pass diff --git a/stripe/params/v2/money_management/_outbound_payment_create_params.py b/stripe/params/v2/money_management/_outbound_payment_create_params.py new file mode 100644 index 000000000..4ce845f13 --- /dev/null +++ b/stripe/params/v2/money_management/_outbound_payment_create_params.py @@ -0,0 +1,94 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe.v2._amount import AmountParam +from typing import Dict +from typing_extensions import Literal, NotRequired, TypedDict + +_OutboundPaymentCreateParamsBase = TypedDict( + "OutboundPaymentCreateParams", + {"from": "OutboundPaymentCreateParamsFrom"}, +) + + +class OutboundPaymentCreateParams(_OutboundPaymentCreateParamsBase): + amount: AmountParam + """ + The "presentment amount" to be sent to the recipient. + """ + delivery_options: NotRequired["OutboundPaymentCreateParamsDeliveryOptions"] + """ + Delivery options to be used to send the OutboundPayment. + """ + description: NotRequired[str] + """ + An arbitrary string attached to the OutboundPayment. Often useful for displaying to users. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + """ + outbound_payment_quote: NotRequired[str] + """ + The quote for this OutboundPayment. Only required for countries with regulatory mandates to display fee estimates before OutboundPayment creation. + """ + recipient_notification: NotRequired[ + "OutboundPaymentCreateParamsRecipientNotification" + ] + """ + Details about the notification settings for the OutboundPayment recipient. + """ + recipient_verification: NotRequired[str] + """ + The recipient verification id for this OutboundPayment. Only required for countries with regulatory mandates to verify recipient names before OutboundPayment creation. + """ + to: "OutboundPaymentCreateParamsTo" + """ + To which payout method to send the OutboundPayment. + """ + + +class OutboundPaymentCreateParamsDeliveryOptions(TypedDict): + bank_account: NotRequired[Literal["automatic", "local", "wire"]] + """ + Open Enum. Method for bank account. + """ + + +class OutboundPaymentCreateParamsFrom(TypedDict): + currency: str + """ + Describes the FinancialAmount's currency drawn from. + """ + financial_account: str + """ + The FinancialAccount that funds were pulled from. + """ + + +class OutboundPaymentCreateParamsRecipientNotification(TypedDict): + setting: Literal["configured", "none"] + """ + Closed Enum. Configuration option to enable or disable notifications to recipients. + Do not send notifications when setting is NONE. Default to account setting when setting is CONFIGURED or not set. + """ + + +class OutboundPaymentCreateParamsTo(TypedDict): + currency: NotRequired[str] + """ + Describes the currency to send to the recipient. + If included, this currency must match a currency supported by the destination. + Can be omitted in the following cases: + - destination only supports one currency + - destination supports multiple currencies and one of the currencies matches the FA currency + - destination supports multiple currencies and one of the currencies matches the presentment currency + Note - when both FA currency and presentment currency are supported, we pick the FA currency to minimize FX. + """ + payout_method: NotRequired[str] + """ + The payout method which the OutboundPayment uses to send payout. + """ + recipient: str + """ + To which account the OutboundPayment is sent. + """ diff --git a/stripe/params/v2/money_management/_outbound_payment_list_params.py b/stripe/params/v2/money_management/_outbound_payment_list_params.py new file mode 100644 index 000000000..88e278ef6 --- /dev/null +++ b/stripe/params/v2/money_management/_outbound_payment_list_params.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import Literal, NotRequired, TypedDict + + +class OutboundPaymentListParams(TypedDict): + created: NotRequired[str] + """ + Filter for objects created at the specified timestamp. + Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. + """ + created_gt: NotRequired[str] + """ + Filter for objects created after the specified timestamp. + Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. + """ + created_gte: NotRequired[str] + """ + Filter for objects created on or after the specified timestamp. + Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. + """ + created_lt: NotRequired[str] + """ + Filter for objects created before the specified timestamp. + Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. + """ + created_lte: NotRequired[str] + """ + 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. + """ + limit: NotRequired[int] + """ + The maximum number of results to return. + """ + recipient: NotRequired[str] + """ + Only return OutboundPayments sent to this recipient. + """ + status: NotRequired[ + List[Literal["canceled", "failed", "posted", "processing", "returned"]] + ] + """ + Closed Enum. Only return OutboundPayments with this status. + """ diff --git a/stripe/params/v2/money_management/_outbound_payment_quote_create_params.py b/stripe/params/v2/money_management/_outbound_payment_quote_create_params.py new file mode 100644 index 000000000..dda1272cd --- /dev/null +++ b/stripe/params/v2/money_management/_outbound_payment_quote_create_params.py @@ -0,0 +1,65 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe.v2._amount import AmountParam +from typing_extensions import Literal, NotRequired, TypedDict + +_OutboundPaymentQuoteCreateParamsBase = TypedDict( + "OutboundPaymentQuoteCreateParams", + {"from": "OutboundPaymentQuoteCreateParamsFrom"}, +) + + +class OutboundPaymentQuoteCreateParams(_OutboundPaymentQuoteCreateParamsBase): + amount: AmountParam + """ + The "presentment amount" to be sent to the recipient. + """ + delivery_options: NotRequired[ + "OutboundPaymentQuoteCreateParamsDeliveryOptions" + ] + """ + Method to be used to send the OutboundPayment. + """ + to: "OutboundPaymentQuoteCreateParamsTo" + """ + Request details about the recipient of an OutboundPaymentQuote. + """ + + +class OutboundPaymentQuoteCreateParamsDeliveryOptions(TypedDict): + bank_account: NotRequired[Literal["automatic", "local", "wire"]] + """ + Open Enum. Method for bank account. + """ + + +class OutboundPaymentQuoteCreateParamsFrom(TypedDict): + currency: str + """ + Describes the FinancialAccount's currency drawn from. + """ + financial_account: str + """ + The FinancialAccount that funds were pulled from. + """ + + +class OutboundPaymentQuoteCreateParamsTo(TypedDict): + currency: NotRequired[str] + """ + Describes the currency to send to the recipient. + If included, this currency must match a currency supported by the destination. + Can be omitted in the following cases: + - destination only supports one currency + - destination supports multiple currencies and one of the currencies matches the FA currency + - destination supports multiple currencies and one of the currencies matches the presentment currency + Note - when both FA currency and presentment currency are supported, we pick the FA currency to minimize FX. + """ + payout_method: NotRequired[str] + """ + The payout method which the OutboundPayment uses to send payout. + """ + recipient: str + """ + To which account the OutboundPayment is sent. + """ diff --git a/stripe/params/v2/money_management/_outbound_payment_quote_retrieve_params.py b/stripe/params/v2/money_management/_outbound_payment_quote_retrieve_params.py new file mode 100644 index 000000000..766472a71 --- /dev/null +++ b/stripe/params/v2/money_management/_outbound_payment_quote_retrieve_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class OutboundPaymentQuoteRetrieveParams(TypedDict): + pass diff --git a/stripe/params/v2/money_management/_outbound_payment_retrieve_params.py b/stripe/params/v2/money_management/_outbound_payment_retrieve_params.py new file mode 100644 index 000000000..bb7d9ff1c --- /dev/null +++ b/stripe/params/v2/money_management/_outbound_payment_retrieve_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class OutboundPaymentRetrieveParams(TypedDict): + pass diff --git a/stripe/params/v2/money_management/_outbound_setup_intent_cancel_params.py b/stripe/params/v2/money_management/_outbound_setup_intent_cancel_params.py new file mode 100644 index 000000000..14014f778 --- /dev/null +++ b/stripe/params/v2/money_management/_outbound_setup_intent_cancel_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class OutboundSetupIntentCancelParams(TypedDict): + pass diff --git a/stripe/params/v2/money_management/_outbound_setup_intent_create_params.py b/stripe/params/v2/money_management/_outbound_setup_intent_create_params.py new file mode 100644 index 000000000..f8db2551c --- /dev/null +++ b/stripe/params/v2/money_management/_outbound_setup_intent_create_params.py @@ -0,0 +1,112 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import Literal, NotRequired, TypedDict + + +class OutboundSetupIntentCreateParams(TypedDict): + payout_method: NotRequired[str] + """ + If provided, the existing payout method resource to link to this setup intent. + Any payout_method_data provided is used to update information on this linked payout method resource. + """ + payout_method_data: NotRequired[ + "OutboundSetupIntentCreateParamsPayoutMethodData" + ] + """ + If no payout_method provided, used to create the underlying credential that is set up for outbound money movement. + If a payout_method provided, used to update data on the credential linked to this setup intent. + """ + usage_intent: NotRequired[Literal["payment", "transfer"]] + """ + Specify which type of outbound money movement this credential should be set up for (payment | transfer). + If not provided, defaults to payment. + """ + + +class OutboundSetupIntentCreateParamsPayoutMethodData(TypedDict): + type: Literal["bank_account", "card", "crypto_wallet"] + """ + Closed Enum. The type of payout method to be created. + """ + bank_account: NotRequired[ + "OutboundSetupIntentCreateParamsPayoutMethodDataBankAccount" + ] + """ + The type specific details of the bank account payout method. + """ + card: NotRequired["OutboundSetupIntentCreateParamsPayoutMethodDataCard"] + """ + The type specific details of the card payout method. + """ + crypto_wallet: NotRequired[ + "OutboundSetupIntentCreateParamsPayoutMethodDataCryptoWallet" + ] + """ + The type specific details of the crypto wallet payout method. + """ + + +class OutboundSetupIntentCreateParamsPayoutMethodDataBankAccount(TypedDict): + account_number: str + """ + The account number or IBAN of the bank account. + """ + bank_account_type: NotRequired[Literal["checking", "savings"]] + """ + Closed Enum. The type of the bank account (checking or savings). + """ + branch_number: NotRequired[str] + """ + The branch number of the bank account, if present. + """ + country: str + """ + The country code of the bank account. + """ + routing_number: NotRequired[str] + """ + The routing number of the bank account, if present. + """ + swift_code: NotRequired[str] + """ + The swift code of the bank account, if present. + """ + + +class OutboundSetupIntentCreateParamsPayoutMethodDataCard(TypedDict): + exp_month: str + """ + The expiration month of the card. + """ + exp_year: str + """ + The expiration year of the card. + """ + number: str + """ + The card number. + """ + + +class OutboundSetupIntentCreateParamsPayoutMethodDataCryptoWallet(TypedDict): + address: str + """ + Crypto wallet address. + """ + memo: NotRequired[str] + """ + Optional field, required if network supports memos (only "stellar" currently). + """ + network: Literal[ + "arbitrum", + "avalanche_c_chain", + "base", + "ethereum", + "optimism", + "polygon", + "solana", + "stellar", + ] + """ + Which rail we should use to make an Outbound money movement to this wallet. + """ diff --git a/stripe/params/v2/money_management/_outbound_setup_intent_list_params.py b/stripe/params/v2/money_management/_outbound_setup_intent_list_params.py new file mode 100644 index 000000000..a33979a61 --- /dev/null +++ b/stripe/params/v2/money_management/_outbound_setup_intent_list_params.py @@ -0,0 +1,10 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import NotRequired, TypedDict + + +class OutboundSetupIntentListParams(TypedDict): + limit: NotRequired[int] + """ + The page size. + """ diff --git a/stripe/params/v2/money_management/_outbound_setup_intent_retrieve_params.py b/stripe/params/v2/money_management/_outbound_setup_intent_retrieve_params.py new file mode 100644 index 000000000..e3bb1a65f --- /dev/null +++ b/stripe/params/v2/money_management/_outbound_setup_intent_retrieve_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class OutboundSetupIntentRetrieveParams(TypedDict): + pass diff --git a/stripe/params/v2/money_management/_outbound_setup_intent_update_params.py b/stripe/params/v2/money_management/_outbound_setup_intent_update_params.py new file mode 100644 index 000000000..ab465e10f --- /dev/null +++ b/stripe/params/v2/money_management/_outbound_setup_intent_update_params.py @@ -0,0 +1,76 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import Literal, NotRequired, TypedDict + + +class OutboundSetupIntentUpdateParams(TypedDict): + payout_method: NotRequired[str] + """ + If provided, the existing payout method resource to link to this outbound setup intent. + """ + payout_method_data: NotRequired[ + "OutboundSetupIntentUpdateParamsPayoutMethodData" + ] + """ + If no payout_method provided, used to create the underlying credential that is set up for outbound money movement. + If a payout_method provided, used to update data on the credential linked to this setup intent. + """ + + +class OutboundSetupIntentUpdateParamsPayoutMethodData(TypedDict): + type: Literal["bank_account", "card", "crypto_wallet"] + """ + Closed Enum. The type of payout method to be created/updated. + """ + bank_account: NotRequired[ + "OutboundSetupIntentUpdateParamsPayoutMethodDataBankAccount" + ] + """ + The type specific details of the bank account payout method. + """ + card: NotRequired["OutboundSetupIntentUpdateParamsPayoutMethodDataCard"] + """ + The type specific details of the card payout method. + """ + + +class OutboundSetupIntentUpdateParamsPayoutMethodDataBankAccount(TypedDict): + account_number: str + """ + The account number or IBAN of the bank account. + """ + bank_account_type: NotRequired[Literal["checking", "savings"]] + """ + Closed Enum. The type of the bank account (checking or savings). + """ + branch_number: NotRequired[str] + """ + The branch number of the bank account, if present. + """ + country: str + """ + The country code of the bank account. + """ + routing_number: NotRequired[str] + """ + The routing number of the bank account, if present. + """ + swift_code: NotRequired[str] + """ + The swift code of the bank account, if present. + """ + + +class OutboundSetupIntentUpdateParamsPayoutMethodDataCard(TypedDict): + exp_month: NotRequired[str] + """ + The expiration month of the card. + """ + exp_year: NotRequired[str] + """ + The expiration year of the card. + """ + number: NotRequired[str] + """ + The card number. This can only be passed when creating a new credential on an outbound setup intent in the requires_payout_method state. + """ diff --git a/stripe/params/v2/money_management/_outbound_transfer_cancel_params.py b/stripe/params/v2/money_management/_outbound_transfer_cancel_params.py new file mode 100644 index 000000000..746402c21 --- /dev/null +++ b/stripe/params/v2/money_management/_outbound_transfer_cancel_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class OutboundTransferCancelParams(TypedDict): + pass diff --git a/stripe/params/v2/money_management/_outbound_transfer_create_params.py b/stripe/params/v2/money_management/_outbound_transfer_create_params.py new file mode 100644 index 000000000..ff999ef3f --- /dev/null +++ b/stripe/params/v2/money_management/_outbound_transfer_create_params.py @@ -0,0 +1,74 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe.v2._amount import AmountParam +from typing import Dict +from typing_extensions import Literal, NotRequired, TypedDict + +_OutboundTransferCreateParamsBase = TypedDict( + "OutboundTransferCreateParams", + {"from": "OutboundTransferCreateParamsFrom"}, +) + + +class OutboundTransferCreateParams(_OutboundTransferCreateParamsBase): + amount: AmountParam + """ + The "presentment amount" for the OutboundPayment. + """ + delivery_options: NotRequired[ + "OutboundTransferCreateParamsDeliveryOptions" + ] + """ + Delivery options to be used to send the OutboundTransfer. + """ + description: NotRequired[str] + """ + An arbitrary string attached to the OutboundTransfer. Often useful for displaying to users. + """ + metadata: NotRequired[Dict[str, str]] + """ + Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + """ + recipient_verification: NotRequired[str] + """ + The recipient verification id for this OutboundTransfer. Only required for countries with regulatory mandates to verify recipient names before OutboundTransfer creation. + """ + to: "OutboundTransferCreateParamsTo" + """ + To which payout method to send the OutboundTransfer. + """ + + +class OutboundTransferCreateParamsDeliveryOptions(TypedDict): + bank_account: NotRequired[Literal["automatic", "local", "wire"]] + """ + Open Enum. Method for bank account. + """ + + +class OutboundTransferCreateParamsFrom(TypedDict): + currency: str + """ + Describes the FinancialAmount's currency drawn from. + """ + financial_account: str + """ + The FinancialAccount that funds were pulled from. + """ + + +class OutboundTransferCreateParamsTo(TypedDict): + currency: NotRequired[str] + """ + Describes the currency to send to the recipient. + If included, this currency must match a currency supported by the destination. + Can be omitted in the following cases: + - destination only supports one currency + - destination supports multiple currencies and one of the currencies matches the FA currency + - destination supports multiple currencies and one of the currencies matches the presentment currency + Note - when both FA currency and presentment currency are supported, we pick the FA currency to minimize FX. + """ + payout_method: str + """ + The payout method which the OutboundTransfer uses to send payout. + """ diff --git a/stripe/params/v2/money_management/_outbound_transfer_list_params.py b/stripe/params/v2/money_management/_outbound_transfer_list_params.py new file mode 100644 index 000000000..1111eb926 --- /dev/null +++ b/stripe/params/v2/money_management/_outbound_transfer_list_params.py @@ -0,0 +1,42 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import Literal, NotRequired, TypedDict + + +class OutboundTransferListParams(TypedDict): + created: NotRequired[str] + """ + Filter for objects created at the specified timestamp. + Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. + """ + created_gt: NotRequired[str] + """ + Filter for objects created after the specified timestamp. + Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. + """ + created_gte: NotRequired[str] + """ + Filter for objects created on or after the specified timestamp. + Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. + """ + created_lt: NotRequired[str] + """ + Filter for objects created before the specified timestamp. + Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. + """ + created_lte: NotRequired[str] + """ + 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. + """ + limit: NotRequired[int] + """ + The maximum number of results to return. + """ + status: NotRequired[ + List[Literal["canceled", "failed", "posted", "processing", "returned"]] + ] + """ + Closed Enum. Only return OutboundTransfers with this status. + """ diff --git a/stripe/params/v2/money_management/_outbound_transfer_retrieve_params.py b/stripe/params/v2/money_management/_outbound_transfer_retrieve_params.py new file mode 100644 index 000000000..5bbd67e63 --- /dev/null +++ b/stripe/params/v2/money_management/_outbound_transfer_retrieve_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class OutboundTransferRetrieveParams(TypedDict): + pass diff --git a/stripe/params/v2/money_management/_payout_method_archive_params.py b/stripe/params/v2/money_management/_payout_method_archive_params.py new file mode 100644 index 000000000..18c1af2a7 --- /dev/null +++ b/stripe/params/v2/money_management/_payout_method_archive_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class PayoutMethodArchiveParams(TypedDict): + pass diff --git a/stripe/params/v2/money_management/_payout_method_list_params.py b/stripe/params/v2/money_management/_payout_method_list_params.py new file mode 100644 index 000000000..13ebc5890 --- /dev/null +++ b/stripe/params/v2/money_management/_payout_method_list_params.py @@ -0,0 +1,30 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import Literal, NotRequired, TypedDict + + +class PayoutMethodListParams(TypedDict): + limit: NotRequired[int] + """ + The page size. + """ + usage_status: NotRequired["PayoutMethodListParamsUsageStatus"] + """ + Usage status filter. + """ + + +class PayoutMethodListParamsUsageStatus(TypedDict): + payments: NotRequired[ + List[Literal["eligible", "invalid", "requires_action"]] + ] + """ + List of payments status to filter by. + """ + transfers: NotRequired[ + List[Literal["eligible", "invalid", "requires_action"]] + ] + """ + List of transfers status to filter by. + """ diff --git a/stripe/params/v2/money_management/_payout_method_retrieve_params.py b/stripe/params/v2/money_management/_payout_method_retrieve_params.py new file mode 100644 index 000000000..27b86fb68 --- /dev/null +++ b/stripe/params/v2/money_management/_payout_method_retrieve_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class PayoutMethodRetrieveParams(TypedDict): + pass diff --git a/stripe/params/v2/money_management/_payout_method_unarchive_params.py b/stripe/params/v2/money_management/_payout_method_unarchive_params.py new file mode 100644 index 000000000..8b9cca601 --- /dev/null +++ b/stripe/params/v2/money_management/_payout_method_unarchive_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class PayoutMethodUnarchiveParams(TypedDict): + pass diff --git a/stripe/params/v2/money_management/_payout_methods_bank_account_spec_retrieve_params.py b/stripe/params/v2/money_management/_payout_methods_bank_account_spec_retrieve_params.py new file mode 100644 index 000000000..c7f24039c --- /dev/null +++ b/stripe/params/v2/money_management/_payout_methods_bank_account_spec_retrieve_params.py @@ -0,0 +1,11 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import List +from typing_extensions import NotRequired, TypedDict + + +class PayoutMethodsBankAccountSpecRetrieveParams(TypedDict): + countries: NotRequired[List[str]] + """ + The countries to fetch the bank account spec for. + """ diff --git a/stripe/params/v2/money_management/_received_credit_list_params.py b/stripe/params/v2/money_management/_received_credit_list_params.py new file mode 100644 index 000000000..dc189bfce --- /dev/null +++ b/stripe/params/v2/money_management/_received_credit_list_params.py @@ -0,0 +1,35 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import NotRequired, TypedDict + + +class ReceivedCreditListParams(TypedDict): + created: NotRequired[str] + """ + Filter for objects created at the specified timestamp. + Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. + """ + created_gt: NotRequired[str] + """ + Filter for objects created after the specified timestamp. + Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. + """ + created_gte: NotRequired[str] + """ + Filter for objects created on or after the specified timestamp. + Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. + """ + created_lt: NotRequired[str] + """ + Filter for objects created before the specified timestamp. + Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. + """ + created_lte: NotRequired[str] + """ + 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. + """ + limit: NotRequired[int] + """ + The page limit. + """ diff --git a/stripe/params/v2/money_management/_received_credit_retrieve_params.py b/stripe/params/v2/money_management/_received_credit_retrieve_params.py new file mode 100644 index 000000000..cb73914a7 --- /dev/null +++ b/stripe/params/v2/money_management/_received_credit_retrieve_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class ReceivedCreditRetrieveParams(TypedDict): + pass diff --git a/stripe/params/v2/money_management/_received_debit_list_params.py b/stripe/params/v2/money_management/_received_debit_list_params.py new file mode 100644 index 000000000..043e8e2b6 --- /dev/null +++ b/stripe/params/v2/money_management/_received_debit_list_params.py @@ -0,0 +1,10 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import NotRequired, TypedDict + + +class ReceivedDebitListParams(TypedDict): + limit: NotRequired[int] + """ + The page limit. + """ diff --git a/stripe/params/v2/money_management/_received_debit_retrieve_params.py b/stripe/params/v2/money_management/_received_debit_retrieve_params.py new file mode 100644 index 000000000..bc6278957 --- /dev/null +++ b/stripe/params/v2/money_management/_received_debit_retrieve_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class ReceivedDebitRetrieveParams(TypedDict): + pass diff --git a/stripe/params/v2/money_management/_recipient_verification_acknowledge_params.py b/stripe/params/v2/money_management/_recipient_verification_acknowledge_params.py new file mode 100644 index 000000000..1ab6dd220 --- /dev/null +++ b/stripe/params/v2/money_management/_recipient_verification_acknowledge_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class RecipientVerificationAcknowledgeParams(TypedDict): + pass diff --git a/stripe/params/v2/money_management/_recipient_verification_create_params.py b/stripe/params/v2/money_management/_recipient_verification_create_params.py new file mode 100644 index 000000000..ac081f2f5 --- /dev/null +++ b/stripe/params/v2/money_management/_recipient_verification_create_params.py @@ -0,0 +1,14 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import NotRequired, TypedDict + + +class RecipientVerificationCreateParams(TypedDict): + payout_method: str + """ + ID of the payout method. + """ + recipient: NotRequired[str] + """ + ID of the recipient account. Required if the recipient distinct from the sender. Leave empty if the recipient and sender are the same entity (i.e. for me-to-me payouts). + """ diff --git a/stripe/params/v2/money_management/_recipient_verification_retrieve_params.py b/stripe/params/v2/money_management/_recipient_verification_retrieve_params.py new file mode 100644 index 000000000..9f4e4cfba --- /dev/null +++ b/stripe/params/v2/money_management/_recipient_verification_retrieve_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class RecipientVerificationRetrieveParams(TypedDict): + pass diff --git a/stripe/params/v2/money_management/_transaction_entry_list_params.py b/stripe/params/v2/money_management/_transaction_entry_list_params.py new file mode 100644 index 000000000..4b1511b96 --- /dev/null +++ b/stripe/params/v2/money_management/_transaction_entry_list_params.py @@ -0,0 +1,34 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import NotRequired, TypedDict + + +class TransactionEntryListParams(TypedDict): + created: NotRequired[str] + """ + Filter for Transactions created at an exact time. + """ + created_gt: NotRequired[str] + """ + Filter for Transactions created after the specified timestamp. + """ + created_gte: NotRequired[str] + """ + Filter for Transactions created at or after the specified timestamp. + """ + created_lt: NotRequired[str] + """ + Filter for Transactions created before the specified timestamp. + """ + created_lte: NotRequired[str] + """ + Filter for Transactions created at or before the specified timestamp. + """ + limit: NotRequired[int] + """ + The page limit. + """ + transaction: NotRequired[str] + """ + Filter for TransactionEntries belonging to a Transaction. + """ diff --git a/stripe/params/v2/money_management/_transaction_entry_retrieve_params.py b/stripe/params/v2/money_management/_transaction_entry_retrieve_params.py new file mode 100644 index 000000000..3a13c9d20 --- /dev/null +++ b/stripe/params/v2/money_management/_transaction_entry_retrieve_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class TransactionEntryRetrieveParams(TypedDict): + pass diff --git a/stripe/params/v2/money_management/_transaction_list_params.py b/stripe/params/v2/money_management/_transaction_list_params.py new file mode 100644 index 000000000..1391fcfc3 --- /dev/null +++ b/stripe/params/v2/money_management/_transaction_list_params.py @@ -0,0 +1,38 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import NotRequired, TypedDict + + +class TransactionListParams(TypedDict): + created: NotRequired[str] + """ + Filter for Transactions created at an exact time. + """ + created_gt: NotRequired[str] + """ + Filter for Transactions created after the specified timestamp. + """ + created_gte: NotRequired[str] + """ + Filter for Transactions created at or after the specified timestamp. + """ + created_lt: NotRequired[str] + """ + Filter for Transactions created before the specified timestamp. + """ + created_lte: NotRequired[str] + """ + Filter for Transactions created at or before the specified timestamp. + """ + financial_account: NotRequired[str] + """ + Filter for Transactions belonging to a FinancialAccount. + """ + flow: NotRequired[str] + """ + Filter for Transactions corresponding to a Flow. + """ + limit: NotRequired[int] + """ + The page limit. + """ diff --git a/stripe/params/v2/money_management/_transaction_retrieve_params.py b/stripe/params/v2/money_management/_transaction_retrieve_params.py new file mode 100644 index 000000000..e12e85e70 --- /dev/null +++ b/stripe/params/v2/money_management/_transaction_retrieve_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class TransactionRetrieveParams(TypedDict): + pass diff --git a/stripe/params/v2/payments/__init__.py b/stripe/params/v2/payments/__init__.py new file mode 100644 index 000000000..b375448a2 --- /dev/null +++ b/stripe/params/v2/payments/__init__.py @@ -0,0 +1,17 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe.params.v2.payments._off_session_payment_cancel_params import ( + OffSessionPaymentCancelParams as OffSessionPaymentCancelParams, +) +from stripe.params.v2.payments._off_session_payment_capture_params import ( + OffSessionPaymentCaptureParams as OffSessionPaymentCaptureParams, +) +from stripe.params.v2.payments._off_session_payment_create_params import ( + OffSessionPaymentCreateParams as OffSessionPaymentCreateParams, +) +from stripe.params.v2.payments._off_session_payment_list_params import ( + OffSessionPaymentListParams as OffSessionPaymentListParams, +) +from stripe.params.v2.payments._off_session_payment_retrieve_params import ( + OffSessionPaymentRetrieveParams as OffSessionPaymentRetrieveParams, +) diff --git a/stripe/params/v2/payments/_off_session_payment_cancel_params.py b/stripe/params/v2/payments/_off_session_payment_cancel_params.py new file mode 100644 index 000000000..0d2f87851 --- /dev/null +++ b/stripe/params/v2/payments/_off_session_payment_cancel_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class OffSessionPaymentCancelParams(TypedDict): + pass diff --git a/stripe/params/v2/payments/_off_session_payment_capture_params.py b/stripe/params/v2/payments/_off_session_payment_capture_params.py new file mode 100644 index 000000000..b89bffd41 --- /dev/null +++ b/stripe/params/v2/payments/_off_session_payment_capture_params.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing import Dict +from typing_extensions import NotRequired, TypedDict + + +class OffSessionPaymentCaptureParams(TypedDict): + amount_to_capture: int + """ + The amount to capture. + """ + metadata: Dict[str, str] + """ + Set of [key-value pairs](https://docs.corp.stripe.com/api/metadata) that you can + attach to an object. This can be useful for storing additional information about + the object in a structured format. Learn more about + [storing information in metadata](https://docs.corp.stripe.com/payments/payment-intents#storing-information-in-metadata). + """ + statement_descriptor: NotRequired[str] + """ + Text that appears on the customer's statement as the statement descriptor for a + non-card charge. This value overrides the account's default statement descriptor. + For information about requirements, including the 22-character limit, see the + [Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors). + """ + statement_descriptor_suffix: NotRequired[str] + """ + Provides information about a card charge. Concatenated to the account's + [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) + to form the complete statement descriptor that appears on the customer's statement. + """ + transfer_data: NotRequired["OffSessionPaymentCaptureParamsTransferData"] + """ + The data that automatically creates a Transfer after the payment finalizes. Learn more about the use case for [connected accounts](https://docs.corp.stripe.com/payments/connected-accounts). + """ + + +class OffSessionPaymentCaptureParamsTransferData(TypedDict): + amount: NotRequired[int] + """ + The amount transferred to the destination account. This transfer will occur + automatically after the payment succeeds. If no amount is specified, by default + the entire payment amount is transferred to the destination account. The amount + must be less than or equal to the + [amount_requested](https://docs.corp.stripe.com/api/v2/off-session-payments/object?api-version=2025-05-28.preview#v2_off_session_payment_object-amount_requested), + and must be a positive integer representing how much to transfer in the smallest + currency unit (e.g., 100 cents to charge $1.00). + """ + destination: str + """ + The account (if any) that the payment is attributed to for tax reporting, and + where funds from the payment are transferred to after payment success. + """ diff --git a/stripe/params/v2/payments/_off_session_payment_create_params.py b/stripe/params/v2/payments/_off_session_payment_create_params.py new file mode 100644 index 000000000..575e13832 --- /dev/null +++ b/stripe/params/v2/payments/_off_session_payment_create_params.py @@ -0,0 +1,221 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe.v2._amount import AmountParam +from typing import Dict, List +from typing_extensions import Literal, NotRequired, TypedDict + + +class OffSessionPaymentCreateParams(TypedDict): + amount: AmountParam + """ + The “presentment amount” to be collected from the customer. + """ + amount_details: NotRequired["OffSessionPaymentCreateParamsAmountDetails"] + """ + Provides industry-specific information about the amount. + """ + cadence: Literal["recurring", "unscheduled"] + """ + The frequency of the underlying payment. + """ + capture: NotRequired["OffSessionPaymentCreateParamsCapture"] + """ + Details about the capture configuration for the OffSessionPayment. + """ + capture_method: NotRequired[Literal["automatic", "manual"]] + """ + Whether the OffSessionPayment should be captured automatically or manually. + """ + customer: str + """ + ID of the Customer to which this OffSessionPayment belongs. + """ + metadata: Dict[str, str] + """ + Set of [key-value pairs](https://docs.corp.stripe.com/api/metadata) that you can + attach to an object. This can be useful for storing additional information about + the object in a structured format. Learn more about + [storing information in metadata](https://docs.corp.stripe.com/payments/payment-intents#storing-information-in-metadata). + """ + on_behalf_of: NotRequired[str] + """ + The account (if any) for which the funds of the OffSessionPayment are intended. + """ + payment_method: str + """ + ID of the payment method used in this OffSessionPayment. + """ + payment_method_options: NotRequired[ + "OffSessionPaymentCreateParamsPaymentMethodOptions" + ] + """ + Payment method options for the off-session payment. + """ + payments_orchestration: NotRequired[ + "OffSessionPaymentCreateParamsPaymentsOrchestration" + ] + """ + Details about the payments orchestration configuration. + """ + retry_details: NotRequired["OffSessionPaymentCreateParamsRetryDetails"] + """ + Details about the OffSessionPayment retries. + """ + statement_descriptor: NotRequired[str] + """ + Text that appears on the customer's statement as the statement descriptor for a + non-card charge. This value overrides the account's default statement descriptor. + For information about requirements, including the 22-character limit, see the + [Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors). + """ + statement_descriptor_suffix: NotRequired[str] + """ + Provides information about a card charge. Concatenated to the account's + [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) + to form the complete statement descriptor that appears on the customer's statement. + """ + test_clock: NotRequired[str] + """ + Test clock that can be used to advance the retry attempts in a sandbox. + """ + transfer_data: NotRequired["OffSessionPaymentCreateParamsTransferData"] + """ + The data that automatically creates a Transfer after the payment finalizes. Learn more about the use case for [connected accounts](https://docs.corp.stripe.com/payments/connected-accounts). + """ + + +class OffSessionPaymentCreateParamsAmountDetails(TypedDict): + discount_amount: NotRequired[int] + """ + The amount the total transaction was discounted for. + """ + line_items: List["OffSessionPaymentCreateParamsAmountDetailsLineItem"] + """ + A list of line items, each containing information about a product in the PaymentIntent. There is a maximum of 100 line items. + """ + shipping: NotRequired["OffSessionPaymentCreateParamsAmountDetailsShipping"] + """ + Contains information about the shipping portion of the amount. + """ + tax: NotRequired["OffSessionPaymentCreateParamsAmountDetailsTax"] + """ + Contains information about the tax portion of the amount. + """ + + +class OffSessionPaymentCreateParamsAmountDetailsLineItem(TypedDict): + discount_amount: NotRequired[int] + """ + The amount an item was discounted for. Positive integer. + """ + product_code: NotRequired[str] + """ + Unique identifier of the product. At most 12 characters long. + """ + product_name: str + """ + Name of the product. At most 100 characters long. + """ + quantity: int + """ + Number of items of the product. Positive integer. + """ + tax: NotRequired["OffSessionPaymentCreateParamsAmountDetailsLineItemTax"] + """ + Contains information about the tax on the item. + """ + unit_cost: int + """ + Cost of the product. Non-negative integer. + """ + + +class OffSessionPaymentCreateParamsAmountDetailsLineItemTax(TypedDict): + total_tax_amount: NotRequired[int] + """ + Total portion of the amount that is for tax. + """ + + +class OffSessionPaymentCreateParamsAmountDetailsShipping(TypedDict): + amount: NotRequired[int] + """ + Portion of the amount that is for shipping. + """ + from_postal_code: NotRequired[str] + """ + The postal code that represents the shipping source. + """ + to_postal_code: NotRequired[str] + """ + The postal code that represents the shipping destination. + """ + + +class OffSessionPaymentCreateParamsAmountDetailsTax(TypedDict): + total_tax_amount: NotRequired[int] + """ + Total portion of the amount that is for tax. + """ + + +class OffSessionPaymentCreateParamsCapture(TypedDict): + capture_method: Literal["automatic", "manual"] + """ + The method to use to capture the payment. + """ + + +class OffSessionPaymentCreateParamsPaymentMethodOptions(TypedDict): + card: NotRequired["OffSessionPaymentCreateParamsPaymentMethodOptionsCard"] + """ + Payment method options for the card payment type. + """ + + +class OffSessionPaymentCreateParamsPaymentMethodOptionsCard(TypedDict): + network_transaction_id: str + """ + If you are making a Credential On File transaction with a previously saved card, you should pass the Network Transaction ID + from a prior initial authorization on Stripe (from a successful SetupIntent or a PaymentIntent with `setup_future_usage` set), + or one that you have obtained from another payment processor. This is a token from the network which uniquely identifies the transaction. + Visa calls this the Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the Acquirer Reference Data. + Note that you should pass in a Network Transaction ID if you have one, regardless of whether this is a + Customer-Initiated Transaction (CIT) or a Merchant-Initiated Transaction (MIT). + """ + + +class OffSessionPaymentCreateParamsPaymentsOrchestration(TypedDict): + enabled: bool + """ + True when you want to enable payments orchestration for this off-session payment. False otherwise. + """ + + +class OffSessionPaymentCreateParamsRetryDetails(TypedDict): + retry_policy: NotRequired[str] + """ + The pre-configured retry policy to use for the payment. + """ + retry_strategy: Literal["heuristic", "none", "scheduled", "smart"] + """ + Indicates the strategy for how you want Stripe to retry the payment. + """ + + +class OffSessionPaymentCreateParamsTransferData(TypedDict): + amount: NotRequired[int] + """ + The amount transferred to the destination account. This transfer will occur + automatically after the payment succeeds. If no amount is specified, by default + the entire payment amount is transferred to the destination account. The amount + must be less than or equal to the + [amount_requested](https://docs.corp.stripe.com/api/v2/off-session-payments/object?api-version=2025-05-28.preview#v2_off_session_payment_object-amount_requested), + and must be a positive integer representing how much to transfer in the smallest + currency unit (e.g., 100 cents to charge $1.00). + """ + destination: str + """ + The account (if any) that the payment is attributed to for tax reporting, and + where funds from the payment are transferred to after payment success. + """ diff --git a/stripe/params/v2/payments/_off_session_payment_list_params.py b/stripe/params/v2/payments/_off_session_payment_list_params.py new file mode 100644 index 000000000..101b2f87c --- /dev/null +++ b/stripe/params/v2/payments/_off_session_payment_list_params.py @@ -0,0 +1,10 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import NotRequired, TypedDict + + +class OffSessionPaymentListParams(TypedDict): + limit: NotRequired[int] + """ + The page size limit. If not provided, the default is 20. + """ diff --git a/stripe/params/v2/payments/_off_session_payment_retrieve_params.py b/stripe/params/v2/payments/_off_session_payment_retrieve_params.py new file mode 100644 index 000000000..eed6abfff --- /dev/null +++ b/stripe/params/v2/payments/_off_session_payment_retrieve_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class OffSessionPaymentRetrieveParams(TypedDict): + pass diff --git a/stripe/params/v2/tax/__init__.py b/stripe/params/v2/tax/__init__.py new file mode 100644 index 000000000..9a8e9da17 --- /dev/null +++ b/stripe/params/v2/tax/__init__.py @@ -0,0 +1,17 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe.params.v2.tax._automatic_rule_create_params import ( + AutomaticRuleCreateParams as AutomaticRuleCreateParams, +) +from stripe.params.v2.tax._automatic_rule_deactivate_params import ( + AutomaticRuleDeactivateParams as AutomaticRuleDeactivateParams, +) +from stripe.params.v2.tax._automatic_rule_find_params import ( + AutomaticRuleFindParams as AutomaticRuleFindParams, +) +from stripe.params.v2.tax._automatic_rule_retrieve_params import ( + AutomaticRuleRetrieveParams as AutomaticRuleRetrieveParams, +) +from stripe.params.v2.tax._automatic_rule_update_params import ( + AutomaticRuleUpdateParams as AutomaticRuleUpdateParams, +) diff --git a/stripe/params/v2/tax/_automatic_rule_create_params.py b/stripe/params/v2/tax/_automatic_rule_create_params.py new file mode 100644 index 000000000..392da6e14 --- /dev/null +++ b/stripe/params/v2/tax/_automatic_rule_create_params.py @@ -0,0 +1,14 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class AutomaticRuleCreateParams(TypedDict): + billable_item: str + """ + The BillableItem ID to set automatic Tax configuration for. + """ + tax_code: str + """ + The TaxCode object to be used for automatic tax calculations. + """ diff --git a/stripe/params/v2/tax/_automatic_rule_deactivate_params.py b/stripe/params/v2/tax/_automatic_rule_deactivate_params.py new file mode 100644 index 000000000..ae5ad8606 --- /dev/null +++ b/stripe/params/v2/tax/_automatic_rule_deactivate_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class AutomaticRuleDeactivateParams(TypedDict): + pass diff --git a/stripe/params/v2/tax/_automatic_rule_find_params.py b/stripe/params/v2/tax/_automatic_rule_find_params.py new file mode 100644 index 000000000..82a048bbb --- /dev/null +++ b/stripe/params/v2/tax/_automatic_rule_find_params.py @@ -0,0 +1,10 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class AutomaticRuleFindParams(TypedDict): + billable_item: str + """ + The BillableItem ID to search by. + """ diff --git a/stripe/params/v2/tax/_automatic_rule_retrieve_params.py b/stripe/params/v2/tax/_automatic_rule_retrieve_params.py new file mode 100644 index 000000000..fcaa2b9de --- /dev/null +++ b/stripe/params/v2/tax/_automatic_rule_retrieve_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class AutomaticRuleRetrieveParams(TypedDict): + pass diff --git a/stripe/params/v2/tax/_automatic_rule_update_params.py b/stripe/params/v2/tax/_automatic_rule_update_params.py new file mode 100644 index 000000000..b2d67eebb --- /dev/null +++ b/stripe/params/v2/tax/_automatic_rule_update_params.py @@ -0,0 +1,10 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class AutomaticRuleUpdateParams(TypedDict): + tax_code: str + """ + The TaxCode object to be used for automatic tax calculations. + """ diff --git a/stripe/params/v2/test_helpers/__init__.py b/stripe/params/v2/test_helpers/__init__.py new file mode 100644 index 000000000..55c601d77 --- /dev/null +++ b/stripe/params/v2/test_helpers/__init__.py @@ -0,0 +1,11 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe.params.v2.test_helpers._financial_address_credit_params import ( + FinancialAddressCreditParams as FinancialAddressCreditParams, +) +from stripe.params.v2.test_helpers._financial_address_generate_microdeposits_params import ( + FinancialAddressGenerateMicrodepositsParams as FinancialAddressGenerateMicrodepositsParams, +) +from stripe.params.v2.test_helpers._money_management_recipient_verifications_params import ( + MoneyManagementRecipientVerificationsParams as MoneyManagementRecipientVerificationsParams, +) diff --git a/stripe/params/v2/test_helpers/_financial_address_credit_params.py b/stripe/params/v2/test_helpers/_financial_address_credit_params.py new file mode 100644 index 000000000..72931ad01 --- /dev/null +++ b/stripe/params/v2/test_helpers/_financial_address_credit_params.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from stripe.v2._amount import AmountParam +from typing_extensions import Literal, NotRequired, TypedDict + + +class FinancialAddressCreditParams(TypedDict): + amount: AmountParam + """ + Object containing the amount value and currency to credit. + """ + network: Literal["ach", "fps", "rtp", "sepa_credit_transfer", "wire"] + """ + Open Enum. The network to use in simulating the funds flow. This will be the reflected in the resulting ReceivedCredit. + """ + statement_descriptor: NotRequired[str] + """ + String explaining funds flow. Use this field to populate the statement descriptor of the ReceivedCredit created as an eventual result of this simulation. + """ diff --git a/stripe/params/v2/test_helpers/_financial_address_generate_microdeposits_params.py b/stripe/params/v2/test_helpers/_financial_address_generate_microdeposits_params.py new file mode 100644 index 000000000..192306c02 --- /dev/null +++ b/stripe/params/v2/test_helpers/_financial_address_generate_microdeposits_params.py @@ -0,0 +1,7 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import TypedDict + + +class FinancialAddressGenerateMicrodepositsParams(TypedDict): + pass diff --git a/stripe/params/v2/test_helpers/_money_management_recipient_verifications_params.py b/stripe/params/v2/test_helpers/_money_management_recipient_verifications_params.py new file mode 100644 index 000000000..10c5b179d --- /dev/null +++ b/stripe/params/v2/test_helpers/_money_management_recipient_verifications_params.py @@ -0,0 +1,18 @@ +# -*- coding: utf-8 -*- +# File generated from our OpenAPI spec +from typing_extensions import Literal, NotRequired, TypedDict + + +class MoneyManagementRecipientVerificationsParams(TypedDict): + match_result: Literal["close_match", "match", "no_match", "unavailable"] + """ + Expected match level of the RecipientVerification to be created: `match`, `close_match`, `no_match`, `unavailable`. + """ + payout_method: str + """ + ID of the payout method. + """ + recipient: NotRequired[str] + """ + ID of the recipient account. Required if the recipient distinct from the sender. Leave empty if the recipient and sender are the same entity (i.e. for me-to-me payouts). + """ diff --git a/stripe/privacy/_redaction_job.py b/stripe/privacy/_redaction_job.py index 1b388158a..33ed842cb 100644 --- a/stripe/privacy/_redaction_job.py +++ b/stripe/privacy/_redaction_job.py @@ -4,20 +4,37 @@ from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource from stripe._nested_resource_class_methods import nested_resource_class_methods -from stripe._request_options import RequestOptions from stripe._stripe_object import StripeObject from stripe._updateable_api_resource import UpdateableAPIResource from stripe._util import class_method_variant, sanitize_id from typing import ClassVar, List, Optional, cast, overload -from typing_extensions import ( - Literal, - NotRequired, - TypedDict, - Unpack, - TYPE_CHECKING, -) +from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: + from stripe.params.privacy._redaction_job_cancel_params import ( + RedactionJobCancelParams, + ) + from stripe.params.privacy._redaction_job_create_params import ( + RedactionJobCreateParams, + ) + from stripe.params.privacy._redaction_job_list_params import ( + RedactionJobListParams, + ) + from stripe.params.privacy._redaction_job_list_validation_errors_params import ( + RedactionJobListValidationErrorsParams, + ) + from stripe.params.privacy._redaction_job_modify_params import ( + RedactionJobModifyParams, + ) + from stripe.params.privacy._redaction_job_retrieve_params import ( + RedactionJobRetrieveParams, + ) + from stripe.params.privacy._redaction_job_run_params import ( + RedactionJobRunParams, + ) + from stripe.params.privacy._redaction_job_validate_params import ( + RedactionJobValidateParams, + ) from stripe.privacy._redaction_job_validation_error import ( RedactionJobValidationError, ) @@ -78,114 +95,6 @@ class Objects(StripeObject): SetupIntent object identifiers starting with `seti_` """ - class CancelParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class CreateParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - objects: "RedactionJob.CreateParamsObjects" - """ - The objects to redact. These root objects and their related ones will be validated for redaction. - """ - validation_behavior: NotRequired[Literal["error", "fix"]] - """ - Determines the validation behavior of the job. Default is `error`. - """ - - class CreateParamsObjects(TypedDict): - charges: NotRequired[List[str]] - checkout_sessions: NotRequired[List[str]] - customers: NotRequired[List[str]] - identity_verification_sessions: NotRequired[List[str]] - invoices: NotRequired[List[str]] - issuing_cardholders: NotRequired[List[str]] - issuing_cards: NotRequired[List[str]] - payment_intents: NotRequired[List[str]] - radar_value_list_items: NotRequired[List[str]] - setup_intents: NotRequired[List[str]] - - class ListParams(RequestOptions): - 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. - """ - status: NotRequired[ - Literal[ - "canceled", - "canceling", - "created", - "failed", - "ready", - "redacting", - "succeeded", - "validating", - ] - ] - - class ListValidationErrorsParams(RequestOptions): - 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 ModifyParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - validation_behavior: NotRequired[Literal["error", "fix"]] - """ - Determines the validation behavior of the job. Default is `error`. - """ - - class RetrieveParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class RunParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class ValidateParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - created: int """ Time at which the object was created. Measured in seconds since the Unix epoch. @@ -226,7 +135,7 @@ class ValidateParams(RequestOptions): @classmethod def _cls_cancel( - cls, job: str, **params: Unpack["RedactionJob.CancelParams"] + cls, job: str, **params: Unpack["RedactionJobCancelParams"] ) -> "RedactionJob": """ You can cancel a redaction job when it's in one of these statuses: ready, failed. @@ -247,7 +156,7 @@ def _cls_cancel( @overload @staticmethod def cancel( - job: str, **params: Unpack["RedactionJob.CancelParams"] + job: str, **params: Unpack["RedactionJobCancelParams"] ) -> "RedactionJob": """ You can cancel a redaction job when it's in one of these statuses: ready, failed. @@ -258,7 +167,7 @@ def cancel( @overload def cancel( - self, **params: Unpack["RedactionJob.CancelParams"] + self, **params: Unpack["RedactionJobCancelParams"] ) -> "RedactionJob": """ You can cancel a redaction job when it's in one of these statuses: ready, failed. @@ -269,7 +178,7 @@ def cancel( @class_method_variant("_cls_cancel") def cancel( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["RedactionJob.CancelParams"] + self, **params: Unpack["RedactionJobCancelParams"] ) -> "RedactionJob": """ You can cancel a redaction job when it's in one of these statuses: ready, failed. @@ -289,7 +198,7 @@ def cancel( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_cancel_async( - cls, job: str, **params: Unpack["RedactionJob.CancelParams"] + cls, job: str, **params: Unpack["RedactionJobCancelParams"] ) -> "RedactionJob": """ You can cancel a redaction job when it's in one of these statuses: ready, failed. @@ -310,7 +219,7 @@ async def _cls_cancel_async( @overload @staticmethod async def cancel_async( - job: str, **params: Unpack["RedactionJob.CancelParams"] + job: str, **params: Unpack["RedactionJobCancelParams"] ) -> "RedactionJob": """ You can cancel a redaction job when it's in one of these statuses: ready, failed. @@ -321,7 +230,7 @@ async def cancel_async( @overload async def cancel_async( - self, **params: Unpack["RedactionJob.CancelParams"] + self, **params: Unpack["RedactionJobCancelParams"] ) -> "RedactionJob": """ You can cancel a redaction job when it's in one of these statuses: ready, failed. @@ -332,7 +241,7 @@ async def cancel_async( @class_method_variant("_cls_cancel_async") async def cancel_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["RedactionJob.CancelParams"] + self, **params: Unpack["RedactionJobCancelParams"] ) -> "RedactionJob": """ You can cancel a redaction job when it's in one of these statuses: ready, failed. @@ -352,7 +261,7 @@ async def cancel_async( # pyright: ignore[reportGeneralTypeIssues] @classmethod def create( - cls, **params: Unpack["RedactionJob.CreateParams"] + cls, **params: Unpack["RedactionJobCreateParams"] ) -> "RedactionJob": """ Creates a redaction job. When a job is created, it will start to validate. @@ -368,7 +277,7 @@ def create( @classmethod async def create_async( - cls, **params: Unpack["RedactionJob.CreateParams"] + cls, **params: Unpack["RedactionJobCreateParams"] ) -> "RedactionJob": """ Creates a redaction job. When a job is created, it will start to validate. @@ -384,7 +293,7 @@ async def create_async( @classmethod def list( - cls, **params: Unpack["RedactionJob.ListParams"] + cls, **params: Unpack["RedactionJobListParams"] ) -> ListObject["RedactionJob"]: """ Returns a list of redaction jobs. @@ -404,7 +313,7 @@ def list( @classmethod async def list_async( - cls, **params: Unpack["RedactionJob.ListParams"] + cls, **params: Unpack["RedactionJobListParams"] ) -> ListObject["RedactionJob"]: """ Returns a list of redaction jobs. @@ -424,7 +333,7 @@ async def list_async( @classmethod def modify( - cls, id: str, **params: Unpack["RedactionJob.ModifyParams"] + cls, id: str, **params: Unpack["RedactionJobModifyParams"] ) -> "RedactionJob": """ Updates the properties of a redaction job without running or canceling the job. @@ -443,7 +352,7 @@ def modify( @classmethod async def modify_async( - cls, id: str, **params: Unpack["RedactionJob.ModifyParams"] + cls, id: str, **params: Unpack["RedactionJobModifyParams"] ) -> "RedactionJob": """ Updates the properties of a redaction job without running or canceling the job. @@ -462,7 +371,7 @@ async def modify_async( @classmethod def retrieve( - cls, id: str, **params: Unpack["RedactionJob.RetrieveParams"] + cls, id: str, **params: Unpack["RedactionJobRetrieveParams"] ) -> "RedactionJob": """ Retrieves the details of a previously created redaction job. @@ -473,7 +382,7 @@ def retrieve( @classmethod async def retrieve_async( - cls, id: str, **params: Unpack["RedactionJob.RetrieveParams"] + cls, id: str, **params: Unpack["RedactionJobRetrieveParams"] ) -> "RedactionJob": """ Retrieves the details of a previously created redaction job. @@ -484,7 +393,7 @@ async def retrieve_async( @classmethod def _cls_run( - cls, job: str, **params: Unpack["RedactionJob.RunParams"] + cls, job: str, **params: Unpack["RedactionJobRunParams"] ) -> "RedactionJob": """ Run a redaction job in a ready status. @@ -507,7 +416,7 @@ def _cls_run( @overload @staticmethod def run( - job: str, **params: Unpack["RedactionJob.RunParams"] + job: str, **params: Unpack["RedactionJobRunParams"] ) -> "RedactionJob": """ Run a redaction job in a ready status. @@ -519,9 +428,7 @@ def run( ... @overload - def run( - self, **params: Unpack["RedactionJob.RunParams"] - ) -> "RedactionJob": + def run(self, **params: Unpack["RedactionJobRunParams"]) -> "RedactionJob": """ Run a redaction job in a ready status. @@ -533,7 +440,7 @@ def run( @class_method_variant("_cls_run") def run( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["RedactionJob.RunParams"] + self, **params: Unpack["RedactionJobRunParams"] ) -> "RedactionJob": """ Run a redaction job in a ready status. @@ -555,7 +462,7 @@ def run( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_run_async( - cls, job: str, **params: Unpack["RedactionJob.RunParams"] + cls, job: str, **params: Unpack["RedactionJobRunParams"] ) -> "RedactionJob": """ Run a redaction job in a ready status. @@ -578,7 +485,7 @@ async def _cls_run_async( @overload @staticmethod async def run_async( - job: str, **params: Unpack["RedactionJob.RunParams"] + job: str, **params: Unpack["RedactionJobRunParams"] ) -> "RedactionJob": """ Run a redaction job in a ready status. @@ -591,7 +498,7 @@ async def run_async( @overload async def run_async( - self, **params: Unpack["RedactionJob.RunParams"] + self, **params: Unpack["RedactionJobRunParams"] ) -> "RedactionJob": """ Run a redaction job in a ready status. @@ -604,7 +511,7 @@ async def run_async( @class_method_variant("_cls_run_async") async def run_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["RedactionJob.RunParams"] + self, **params: Unpack["RedactionJobRunParams"] ) -> "RedactionJob": """ Run a redaction job in a ready status. @@ -626,7 +533,7 @@ async def run_async( # pyright: ignore[reportGeneralTypeIssues] @classmethod def _cls_validate( - cls, job: str, **params: Unpack["RedactionJob.ValidateParams"] + cls, job: str, **params: Unpack["RedactionJobValidateParams"] ) -> "RedactionJob": """ Validate a redaction job when it is in a failed status. @@ -649,7 +556,7 @@ def _cls_validate( @overload @staticmethod def validate( - job: str, **params: Unpack["RedactionJob.ValidateParams"] + job: str, **params: Unpack["RedactionJobValidateParams"] ) -> "RedactionJob": """ Validate a redaction job when it is in a failed status. @@ -662,7 +569,7 @@ def validate( @overload def validate( - self, **params: Unpack["RedactionJob.ValidateParams"] + self, **params: Unpack["RedactionJobValidateParams"] ) -> "RedactionJob": """ Validate a redaction job when it is in a failed status. @@ -675,7 +582,7 @@ def validate( @class_method_variant("_cls_validate") def validate( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["RedactionJob.ValidateParams"] + self, **params: Unpack["RedactionJobValidateParams"] ) -> "RedactionJob": """ Validate a redaction job when it is in a failed status. @@ -697,7 +604,7 @@ def validate( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_validate_async( - cls, job: str, **params: Unpack["RedactionJob.ValidateParams"] + cls, job: str, **params: Unpack["RedactionJobValidateParams"] ) -> "RedactionJob": """ Validate a redaction job when it is in a failed status. @@ -720,7 +627,7 @@ async def _cls_validate_async( @overload @staticmethod async def validate_async( - job: str, **params: Unpack["RedactionJob.ValidateParams"] + job: str, **params: Unpack["RedactionJobValidateParams"] ) -> "RedactionJob": """ Validate a redaction job when it is in a failed status. @@ -733,7 +640,7 @@ async def validate_async( @overload async def validate_async( - self, **params: Unpack["RedactionJob.ValidateParams"] + self, **params: Unpack["RedactionJobValidateParams"] ) -> "RedactionJob": """ Validate a redaction job when it is in a failed status. @@ -746,7 +653,7 @@ async def validate_async( @class_method_variant("_cls_validate_async") async def validate_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["RedactionJob.ValidateParams"] + self, **params: Unpack["RedactionJobValidateParams"] ) -> "RedactionJob": """ Validate a redaction job when it is in a failed status. @@ -770,7 +677,7 @@ async def validate_async( # pyright: ignore[reportGeneralTypeIssues] def list_validation_errors( cls, job: str, - **params: Unpack["RedactionJob.ListValidationErrorsParams"], + **params: Unpack["RedactionJobListValidationErrorsParams"], ) -> ListObject["RedactionJobValidationError"]: """ Returns a list of validation errors for the specified redaction job. @@ -790,7 +697,7 @@ def list_validation_errors( async def list_validation_errors_async( cls, job: str, - **params: Unpack["RedactionJob.ListValidationErrorsParams"], + **params: Unpack["RedactionJobListValidationErrorsParams"], ) -> ListObject["RedactionJobValidationError"]: """ Returns a list of validation errors for the specified redaction job. diff --git a/stripe/privacy/_redaction_job_service.py b/stripe/privacy/_redaction_job_service.py index 6b05096a5..4e86ae430 100644 --- a/stripe/privacy/_redaction_job_service.py +++ b/stripe/privacy/_redaction_job_service.py @@ -8,8 +8,31 @@ from stripe.privacy._redaction_job_validation_error_service import ( RedactionJobValidationErrorService, ) -from typing import List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params.privacy._redaction_job_cancel_params import ( + RedactionJobCancelParams, + ) + from stripe.params.privacy._redaction_job_create_params import ( + RedactionJobCreateParams, + ) + from stripe.params.privacy._redaction_job_list_params import ( + RedactionJobListParams, + ) + from stripe.params.privacy._redaction_job_retrieve_params import ( + RedactionJobRetrieveParams, + ) + from stripe.params.privacy._redaction_job_run_params import ( + RedactionJobRunParams, + ) + from stripe.params.privacy._redaction_job_update_params import ( + RedactionJobUpdateParams, + ) + from stripe.params.privacy._redaction_job_validate_params import ( + RedactionJobValidateParams, + ) class RedactionJobService(StripeService): @@ -19,99 +42,9 @@ def __init__(self, requestor): self._requestor, ) - class CancelParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class CreateParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - objects: "RedactionJobService.CreateParamsObjects" - """ - The objects to redact. These root objects and their related ones will be validated for redaction. - """ - validation_behavior: NotRequired[Literal["error", "fix"]] - """ - Determines the validation behavior of the job. Default is `error`. - """ - - class CreateParamsObjects(TypedDict): - charges: NotRequired[List[str]] - checkout_sessions: NotRequired[List[str]] - customers: NotRequired[List[str]] - identity_verification_sessions: NotRequired[List[str]] - invoices: NotRequired[List[str]] - issuing_cardholders: NotRequired[List[str]] - issuing_cards: NotRequired[List[str]] - payment_intents: NotRequired[List[str]] - radar_value_list_items: NotRequired[List[str]] - setup_intents: NotRequired[List[str]] - - class ListParams(TypedDict): - 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. - """ - status: NotRequired[ - Literal[ - "canceled", - "canceling", - "created", - "failed", - "ready", - "redacting", - "succeeded", - "validating", - ] - ] - - class RetrieveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class RunParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class UpdateParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - validation_behavior: NotRequired[Literal["error", "fix"]] - """ - Determines the validation behavior of the job. Default is `error`. - """ - - class ValidateParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - def list( self, - params: Optional["RedactionJobService.ListParams"] = None, + params: Optional["RedactionJobListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[RedactionJob]: """ @@ -130,7 +63,7 @@ def list( async def list_async( self, - params: Optional["RedactionJobService.ListParams"] = None, + params: Optional["RedactionJobListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[RedactionJob]: """ @@ -149,7 +82,7 @@ async def list_async( def create( self, - params: "RedactionJobService.CreateParams", + params: "RedactionJobCreateParams", options: Optional[RequestOptions] = None, ) -> RedactionJob: """ @@ -168,7 +101,7 @@ def create( async def create_async( self, - params: "RedactionJobService.CreateParams", + params: "RedactionJobCreateParams", options: Optional[RequestOptions] = None, ) -> RedactionJob: """ @@ -188,7 +121,7 @@ async def create_async( def retrieve( self, job: str, - params: Optional["RedactionJobService.RetrieveParams"] = None, + params: Optional["RedactionJobRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> RedactionJob: """ @@ -210,7 +143,7 @@ def retrieve( async def retrieve_async( self, job: str, - params: Optional["RedactionJobService.RetrieveParams"] = None, + params: Optional["RedactionJobRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> RedactionJob: """ @@ -232,7 +165,7 @@ async def retrieve_async( def update( self, job: str, - params: Optional["RedactionJobService.UpdateParams"] = None, + params: Optional["RedactionJobUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> RedactionJob: """ @@ -256,7 +189,7 @@ def update( async def update_async( self, job: str, - params: Optional["RedactionJobService.UpdateParams"] = None, + params: Optional["RedactionJobUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> RedactionJob: """ @@ -280,7 +213,7 @@ async def update_async( def cancel( self, job: str, - params: Optional["RedactionJobService.CancelParams"] = None, + params: Optional["RedactionJobCancelParams"] = None, options: Optional[RequestOptions] = None, ) -> RedactionJob: """ @@ -304,7 +237,7 @@ def cancel( async def cancel_async( self, job: str, - params: Optional["RedactionJobService.CancelParams"] = None, + params: Optional["RedactionJobCancelParams"] = None, options: Optional[RequestOptions] = None, ) -> RedactionJob: """ @@ -328,7 +261,7 @@ async def cancel_async( def run( self, job: str, - params: Optional["RedactionJobService.RunParams"] = None, + params: Optional["RedactionJobRunParams"] = None, options: Optional[RequestOptions] = None, ) -> RedactionJob: """ @@ -354,7 +287,7 @@ def run( async def run_async( self, job: str, - params: Optional["RedactionJobService.RunParams"] = None, + params: Optional["RedactionJobRunParams"] = None, options: Optional[RequestOptions] = None, ) -> RedactionJob: """ @@ -380,7 +313,7 @@ async def run_async( def validate( self, job: str, - params: Optional["RedactionJobService.ValidateParams"] = None, + params: Optional["RedactionJobValidateParams"] = None, options: Optional[RequestOptions] = None, ) -> RedactionJob: """ @@ -406,7 +339,7 @@ def validate( async def validate_async( self, job: str, - params: Optional["RedactionJobService.ValidateParams"] = None, + params: Optional["RedactionJobValidateParams"] = None, options: Optional[RequestOptions] = None, ) -> RedactionJob: """ diff --git a/stripe/privacy/_redaction_job_validation_error_service.py b/stripe/privacy/_redaction_job_validation_error_service.py index 402d06fef..7396199ba 100644 --- a/stripe/privacy/_redaction_job_validation_error_service.py +++ b/stripe/privacy/_redaction_job_validation_error_service.py @@ -7,35 +7,20 @@ from stripe.privacy._redaction_job_validation_error import ( RedactionJobValidationError, ) -from typing import List, Optional, cast -from typing_extensions import NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params.privacy._redaction_job_validation_error_list_params import ( + RedactionJobValidationErrorListParams, + ) -class RedactionJobValidationErrorService(StripeService): - class ListParams(TypedDict): - 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 RedactionJobValidationErrorService(StripeService): def list( self, job: str, - params: Optional[ - "RedactionJobValidationErrorService.ListParams" - ] = None, + params: Optional["RedactionJobValidationErrorListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[RedactionJobValidationError]: """ @@ -57,9 +42,7 @@ def list( async def list_async( self, job: str, - params: Optional[ - "RedactionJobValidationErrorService.ListParams" - ] = None, + params: Optional["RedactionJobValidationErrorListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[RedactionJobValidationError]: """ diff --git a/stripe/radar/_early_fraud_warning.py b/stripe/radar/_early_fraud_warning.py index 5240ef9f7..14d60429d 100644 --- a/stripe/radar/_early_fraud_warning.py +++ b/stripe/radar/_early_fraud_warning.py @@ -3,19 +3,18 @@ from stripe._expandable_field import ExpandableField from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource -from stripe._request_options import RequestOptions -from typing import ClassVar, List, Optional -from typing_extensions import ( - Literal, - NotRequired, - TypedDict, - Unpack, - TYPE_CHECKING, -) +from typing import ClassVar, Optional +from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: from stripe._charge import Charge from stripe._payment_intent import PaymentIntent + from stripe.params.radar._early_fraud_warning_list_params import ( + EarlyFraudWarningListParams, + ) + from stripe.params.radar._early_fraud_warning_retrieve_params import ( + EarlyFraudWarningRetrieveParams, + ) class EarlyFraudWarning(ListableAPIResource["EarlyFraudWarning"]): @@ -29,61 +28,6 @@ class EarlyFraudWarning(ListableAPIResource["EarlyFraudWarning"]): OBJECT_NAME: ClassVar[Literal["radar.early_fraud_warning"]] = ( "radar.early_fraud_warning" ) - - class ListParams(RequestOptions): - charge: NotRequired[str] - """ - Only return early fraud warnings for the charge specified by this charge ID. - """ - created: NotRequired["EarlyFraudWarning.ListParamsCreated|int"] - """ - Only return early fraud warnings that were created during the given date interval. - """ - 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. - """ - payment_intent: NotRequired[str] - """ - Only return early fraud warnings for charges that were created by the PaymentIntent specified by this PaymentIntent ID. - """ - 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 ListParamsCreated(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) - """ - - class RetrieveParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - actionable: bool """ An EFW is actionable if it has not received a dispute and has not been fully refunded. You may wish to proactively refund a charge that receives an EFW, in order to avoid receiving a dispute later. @@ -119,7 +63,7 @@ class RetrieveParams(RequestOptions): @classmethod def list( - cls, **params: Unpack["EarlyFraudWarning.ListParams"] + cls, **params: Unpack["EarlyFraudWarningListParams"] ) -> ListObject["EarlyFraudWarning"]: """ Returns a list of early fraud warnings. @@ -139,7 +83,7 @@ def list( @classmethod async def list_async( - cls, **params: Unpack["EarlyFraudWarning.ListParams"] + cls, **params: Unpack["EarlyFraudWarningListParams"] ) -> ListObject["EarlyFraudWarning"]: """ Returns a list of early fraud warnings. @@ -159,7 +103,7 @@ async def list_async( @classmethod def retrieve( - cls, id: str, **params: Unpack["EarlyFraudWarning.RetrieveParams"] + cls, id: str, **params: Unpack["EarlyFraudWarningRetrieveParams"] ) -> "EarlyFraudWarning": """ Retrieves the details of an early fraud warning that has previously been created. @@ -172,7 +116,7 @@ def retrieve( @classmethod async def retrieve_async( - cls, id: str, **params: Unpack["EarlyFraudWarning.RetrieveParams"] + cls, id: str, **params: Unpack["EarlyFraudWarningRetrieveParams"] ) -> "EarlyFraudWarning": """ Retrieves the details of an early fraud warning that has previously been created. diff --git a/stripe/radar/_early_fraud_warning_service.py b/stripe/radar/_early_fraud_warning_service.py index a58ec5fd6..20f3ef6d7 100644 --- a/stripe/radar/_early_fraud_warning_service.py +++ b/stripe/radar/_early_fraud_warning_service.py @@ -5,68 +5,22 @@ from stripe._stripe_service import StripeService from stripe._util import sanitize_id from stripe.radar._early_fraud_warning import EarlyFraudWarning -from typing import List, Optional, cast -from typing_extensions import NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params.radar._early_fraud_warning_list_params import ( + EarlyFraudWarningListParams, + ) + from stripe.params.radar._early_fraud_warning_retrieve_params import ( + EarlyFraudWarningRetrieveParams, + ) -class EarlyFraudWarningService(StripeService): - class ListParams(TypedDict): - charge: NotRequired[str] - """ - Only return early fraud warnings for the charge specified by this charge ID. - """ - created: NotRequired["EarlyFraudWarningService.ListParamsCreated|int"] - """ - Only return early fraud warnings that were created during the given date interval. - """ - 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. - """ - payment_intent: NotRequired[str] - """ - Only return early fraud warnings for charges that were created by the PaymentIntent specified by this PaymentIntent ID. - """ - 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 ListParamsCreated(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) - """ - - class RetrieveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ +class EarlyFraudWarningService(StripeService): def list( self, - params: Optional["EarlyFraudWarningService.ListParams"] = None, + params: Optional["EarlyFraudWarningListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[EarlyFraudWarning]: """ @@ -85,7 +39,7 @@ def list( async def list_async( self, - params: Optional["EarlyFraudWarningService.ListParams"] = None, + params: Optional["EarlyFraudWarningListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[EarlyFraudWarning]: """ @@ -105,7 +59,7 @@ async def list_async( def retrieve( self, early_fraud_warning: str, - params: Optional["EarlyFraudWarningService.RetrieveParams"] = None, + params: Optional["EarlyFraudWarningRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> EarlyFraudWarning: """ @@ -129,7 +83,7 @@ def retrieve( async def retrieve_async( self, early_fraud_warning: str, - params: Optional["EarlyFraudWarningService.RetrieveParams"] = None, + params: Optional["EarlyFraudWarningRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> EarlyFraudWarning: """ diff --git a/stripe/radar/_value_list.py b/stripe/radar/_value_list.py index 66176699b..eb9623d1a 100644 --- a/stripe/radar/_value_list.py +++ b/stripe/radar/_value_list.py @@ -4,19 +4,25 @@ from stripe._deletable_api_resource import DeletableAPIResource from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource -from stripe._request_options import RequestOptions from stripe._updateable_api_resource import UpdateableAPIResource from stripe._util import class_method_variant, sanitize_id -from typing import ClassVar, Dict, List, Optional, cast, overload -from typing_extensions import ( - Literal, - NotRequired, - TypedDict, - Unpack, - TYPE_CHECKING, -) +from typing import ClassVar, Dict, Optional, cast, overload +from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: + from stripe.params.radar._value_list_create_params import ( + ValueListCreateParams, + ) + from stripe.params.radar._value_list_delete_params import ( + ValueListDeleteParams, + ) + from stripe.params.radar._value_list_list_params import ValueListListParams + from stripe.params.radar._value_list_modify_params import ( + ValueListModifyParams, + ) + from stripe.params.radar._value_list_retrieve_params import ( + ValueListRetrieveParams, + ) from stripe.radar._value_list_item import ValueListItem @@ -33,117 +39,6 @@ class ValueList( """ OBJECT_NAME: ClassVar[Literal["radar.value_list"]] = "radar.value_list" - - class CreateParams(RequestOptions): - alias: str - """ - The name of the value list for use in rules. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - item_type: NotRequired[ - Literal[ - "card_bin", - "card_fingerprint", - "case_sensitive_string", - "country", - "customer_id", - "email", - "ip_address", - "sepa_debit_fingerprint", - "string", - "us_bank_account_fingerprint", - ] - ] - """ - Type of the items in the value list. One of `card_fingerprint`, `card_bin`, `email`, `ip_address`, `country`, `string`, `case_sensitive_string`, `customer_id`, `sepa_debit_fingerprint`, or `us_bank_account_fingerprint`. Use `string` if the item type is unknown or mixed. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - name: str - """ - The human-readable name of the value list. - """ - - class DeleteParams(RequestOptions): - pass - - class ListParams(RequestOptions): - alias: NotRequired[str] - """ - The alias used to reference the value list when writing rules. - """ - contains: NotRequired[str] - """ - A value contained within a value list - returns all value lists containing this value. - """ - created: NotRequired["ValueList.ListParamsCreated|int"] - """ - Only return value lists that were created during the given date interval. - """ - 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 ListParamsCreated(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) - """ - - class ModifyParams(RequestOptions): - alias: NotRequired[str] - """ - The name of the value list for use in rules. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - name: NotRequired[str] - """ - The human-readable name of the value list. - """ - - class RetrieveParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - alias: str """ The name of the value list for use in rules. @@ -201,7 +96,7 @@ class RetrieveParams(RequestOptions): """ @classmethod - def create(cls, **params: Unpack["ValueList.CreateParams"]) -> "ValueList": + def create(cls, **params: Unpack["ValueListCreateParams"]) -> "ValueList": """ Creates a new ValueList object, which can then be referenced in rules. """ @@ -216,7 +111,7 @@ def create(cls, **params: Unpack["ValueList.CreateParams"]) -> "ValueList": @classmethod async def create_async( - cls, **params: Unpack["ValueList.CreateParams"] + cls, **params: Unpack["ValueListCreateParams"] ) -> "ValueList": """ Creates a new ValueList object, which can then be referenced in rules. @@ -232,7 +127,7 @@ async def create_async( @classmethod def _cls_delete( - cls, sid: str, **params: Unpack["ValueList.DeleteParams"] + cls, sid: str, **params: Unpack["ValueListDeleteParams"] ) -> "ValueList": """ Deletes a ValueList object, also deleting any items contained within the value list. To be deleted, a value list must not be referenced in any rules. @@ -250,7 +145,7 @@ def _cls_delete( @overload @staticmethod def delete( - sid: str, **params: Unpack["ValueList.DeleteParams"] + sid: str, **params: Unpack["ValueListDeleteParams"] ) -> "ValueList": """ Deletes a ValueList object, also deleting any items contained within the value list. To be deleted, a value list must not be referenced in any rules. @@ -258,9 +153,7 @@ def delete( ... @overload - def delete( - self, **params: Unpack["ValueList.DeleteParams"] - ) -> "ValueList": + def delete(self, **params: Unpack["ValueListDeleteParams"]) -> "ValueList": """ Deletes a ValueList object, also deleting any items contained within the value list. To be deleted, a value list must not be referenced in any rules. """ @@ -268,7 +161,7 @@ def delete( @class_method_variant("_cls_delete") def delete( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["ValueList.DeleteParams"] + self, **params: Unpack["ValueListDeleteParams"] ) -> "ValueList": """ Deletes a ValueList object, also deleting any items contained within the value list. To be deleted, a value list must not be referenced in any rules. @@ -281,7 +174,7 @@ def delete( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_delete_async( - cls, sid: str, **params: Unpack["ValueList.DeleteParams"] + cls, sid: str, **params: Unpack["ValueListDeleteParams"] ) -> "ValueList": """ Deletes a ValueList object, also deleting any items contained within the value list. To be deleted, a value list must not be referenced in any rules. @@ -299,7 +192,7 @@ async def _cls_delete_async( @overload @staticmethod async def delete_async( - sid: str, **params: Unpack["ValueList.DeleteParams"] + sid: str, **params: Unpack["ValueListDeleteParams"] ) -> "ValueList": """ Deletes a ValueList object, also deleting any items contained within the value list. To be deleted, a value list must not be referenced in any rules. @@ -308,7 +201,7 @@ async def delete_async( @overload async def delete_async( - self, **params: Unpack["ValueList.DeleteParams"] + self, **params: Unpack["ValueListDeleteParams"] ) -> "ValueList": """ Deletes a ValueList object, also deleting any items contained within the value list. To be deleted, a value list must not be referenced in any rules. @@ -317,7 +210,7 @@ async def delete_async( @class_method_variant("_cls_delete_async") async def delete_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["ValueList.DeleteParams"] + self, **params: Unpack["ValueListDeleteParams"] ) -> "ValueList": """ Deletes a ValueList object, also deleting any items contained within the value list. To be deleted, a value list must not be referenced in any rules. @@ -330,7 +223,7 @@ async def delete_async( # pyright: ignore[reportGeneralTypeIssues] @classmethod def list( - cls, **params: Unpack["ValueList.ListParams"] + cls, **params: Unpack["ValueListListParams"] ) -> ListObject["ValueList"]: """ Returns a list of ValueList objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first. @@ -350,7 +243,7 @@ def list( @classmethod async def list_async( - cls, **params: Unpack["ValueList.ListParams"] + cls, **params: Unpack["ValueListListParams"] ) -> ListObject["ValueList"]: """ Returns a list of ValueList objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first. @@ -370,7 +263,7 @@ async def list_async( @classmethod def modify( - cls, id: str, **params: Unpack["ValueList.ModifyParams"] + cls, id: str, **params: Unpack["ValueListModifyParams"] ) -> "ValueList": """ Updates a ValueList object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. Note that item_type is immutable. @@ -387,7 +280,7 @@ def modify( @classmethod async def modify_async( - cls, id: str, **params: Unpack["ValueList.ModifyParams"] + cls, id: str, **params: Unpack["ValueListModifyParams"] ) -> "ValueList": """ Updates a ValueList object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. Note that item_type is immutable. @@ -404,7 +297,7 @@ async def modify_async( @classmethod def retrieve( - cls, id: str, **params: Unpack["ValueList.RetrieveParams"] + cls, id: str, **params: Unpack["ValueListRetrieveParams"] ) -> "ValueList": """ Retrieves a ValueList object. @@ -415,7 +308,7 @@ def retrieve( @classmethod async def retrieve_async( - cls, id: str, **params: Unpack["ValueList.RetrieveParams"] + cls, id: str, **params: Unpack["ValueListRetrieveParams"] ) -> "ValueList": """ Retrieves a ValueList object. diff --git a/stripe/radar/_value_list_item.py b/stripe/radar/_value_list_item.py index bac22806e..6ef11fe6f 100644 --- a/stripe/radar/_value_list_item.py +++ b/stripe/radar/_value_list_item.py @@ -4,10 +4,23 @@ from stripe._deletable_api_resource import DeletableAPIResource from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource -from stripe._request_options import RequestOptions from stripe._util import class_method_variant, sanitize_id -from typing import ClassVar, List, Optional, cast, overload -from typing_extensions import Literal, NotRequired, TypedDict, Unpack +from typing import ClassVar, Optional, cast, overload +from typing_extensions import Literal, Unpack, TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params.radar._value_list_item_create_params import ( + ValueListItemCreateParams, + ) + from stripe.params.radar._value_list_item_delete_params import ( + ValueListItemDeleteParams, + ) + from stripe.params.radar._value_list_item_list_params import ( + ValueListItemListParams, + ) + from stripe.params.radar._value_list_item_retrieve_params import ( + ValueListItemRetrieveParams, + ) class ValueListItem( @@ -24,78 +37,6 @@ class ValueListItem( OBJECT_NAME: ClassVar[Literal["radar.value_list_item"]] = ( "radar.value_list_item" ) - - class CreateParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - value: str - """ - The value of the item (whose type must match the type of the parent value list). - """ - value_list: str - """ - The identifier of the value list which the created item will be added to. - """ - - class DeleteParams(RequestOptions): - pass - - class ListParams(RequestOptions): - created: NotRequired["ValueListItem.ListParamsCreated|int"] - """ - Only return items that were created during the given date interval. - """ - 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. - """ - value: NotRequired[str] - """ - Return items belonging to the parent list whose value matches the specified value (using an "is like" match). - """ - value_list: str - """ - Identifier for the parent value list this item belongs to. - """ - - class ListParamsCreated(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) - """ - - class RetrieveParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - created: int """ Time at which the object was created. Measured in seconds since the Unix epoch. @@ -131,7 +72,7 @@ class RetrieveParams(RequestOptions): @classmethod def create( - cls, **params: Unpack["ValueListItem.CreateParams"] + cls, **params: Unpack["ValueListItemCreateParams"] ) -> "ValueListItem": """ Creates a new ValueListItem object, which is added to the specified parent value list. @@ -147,7 +88,7 @@ def create( @classmethod async def create_async( - cls, **params: Unpack["ValueListItem.CreateParams"] + cls, **params: Unpack["ValueListItemCreateParams"] ) -> "ValueListItem": """ Creates a new ValueListItem object, which is added to the specified parent value list. @@ -163,7 +104,7 @@ async def create_async( @classmethod def _cls_delete( - cls, sid: str, **params: Unpack["ValueListItem.DeleteParams"] + cls, sid: str, **params: Unpack["ValueListItemDeleteParams"] ) -> "ValueListItem": """ Deletes a ValueListItem object, removing it from its parent value list. @@ -181,7 +122,7 @@ def _cls_delete( @overload @staticmethod def delete( - sid: str, **params: Unpack["ValueListItem.DeleteParams"] + sid: str, **params: Unpack["ValueListItemDeleteParams"] ) -> "ValueListItem": """ Deletes a ValueListItem object, removing it from its parent value list. @@ -190,7 +131,7 @@ def delete( @overload def delete( - self, **params: Unpack["ValueListItem.DeleteParams"] + self, **params: Unpack["ValueListItemDeleteParams"] ) -> "ValueListItem": """ Deletes a ValueListItem object, removing it from its parent value list. @@ -199,7 +140,7 @@ def delete( @class_method_variant("_cls_delete") def delete( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["ValueListItem.DeleteParams"] + self, **params: Unpack["ValueListItemDeleteParams"] ) -> "ValueListItem": """ Deletes a ValueListItem object, removing it from its parent value list. @@ -212,7 +153,7 @@ def delete( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_delete_async( - cls, sid: str, **params: Unpack["ValueListItem.DeleteParams"] + cls, sid: str, **params: Unpack["ValueListItemDeleteParams"] ) -> "ValueListItem": """ Deletes a ValueListItem object, removing it from its parent value list. @@ -230,7 +171,7 @@ async def _cls_delete_async( @overload @staticmethod async def delete_async( - sid: str, **params: Unpack["ValueListItem.DeleteParams"] + sid: str, **params: Unpack["ValueListItemDeleteParams"] ) -> "ValueListItem": """ Deletes a ValueListItem object, removing it from its parent value list. @@ -239,7 +180,7 @@ async def delete_async( @overload async def delete_async( - self, **params: Unpack["ValueListItem.DeleteParams"] + self, **params: Unpack["ValueListItemDeleteParams"] ) -> "ValueListItem": """ Deletes a ValueListItem object, removing it from its parent value list. @@ -248,7 +189,7 @@ async def delete_async( @class_method_variant("_cls_delete_async") async def delete_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["ValueListItem.DeleteParams"] + self, **params: Unpack["ValueListItemDeleteParams"] ) -> "ValueListItem": """ Deletes a ValueListItem object, removing it from its parent value list. @@ -261,7 +202,7 @@ async def delete_async( # pyright: ignore[reportGeneralTypeIssues] @classmethod def list( - cls, **params: Unpack["ValueListItem.ListParams"] + cls, **params: Unpack["ValueListItemListParams"] ) -> ListObject["ValueListItem"]: """ Returns a list of ValueListItem objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first. @@ -281,7 +222,7 @@ def list( @classmethod async def list_async( - cls, **params: Unpack["ValueListItem.ListParams"] + cls, **params: Unpack["ValueListItemListParams"] ) -> ListObject["ValueListItem"]: """ Returns a list of ValueListItem objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first. @@ -301,7 +242,7 @@ async def list_async( @classmethod def retrieve( - cls, id: str, **params: Unpack["ValueListItem.RetrieveParams"] + cls, id: str, **params: Unpack["ValueListItemRetrieveParams"] ) -> "ValueListItem": """ Retrieves a ValueListItem object. @@ -312,7 +253,7 @@ def retrieve( @classmethod async def retrieve_async( - cls, id: str, **params: Unpack["ValueListItem.RetrieveParams"] + cls, id: str, **params: Unpack["ValueListItemRetrieveParams"] ) -> "ValueListItem": """ Retrieves a ValueListItem object. diff --git a/stripe/radar/_value_list_item_service.py b/stripe/radar/_value_list_item_service.py index bc846f1a6..3d1868bd5 100644 --- a/stripe/radar/_value_list_item_service.py +++ b/stripe/radar/_value_list_item_service.py @@ -5,86 +5,29 @@ from stripe._stripe_service import StripeService from stripe._util import sanitize_id from stripe.radar._value_list_item import ValueListItem -from typing import List, Optional, cast -from typing_extensions import NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params.radar._value_list_item_create_params import ( + ValueListItemCreateParams, + ) + from stripe.params.radar._value_list_item_delete_params import ( + ValueListItemDeleteParams, + ) + from stripe.params.radar._value_list_item_list_params import ( + ValueListItemListParams, + ) + from stripe.params.radar._value_list_item_retrieve_params import ( + ValueListItemRetrieveParams, + ) -class ValueListItemService(StripeService): - class CreateParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - value: str - """ - The value of the item (whose type must match the type of the parent value list). - """ - value_list: str - """ - The identifier of the value list which the created item will be added to. - """ - - class DeleteParams(TypedDict): - pass - - class ListParams(TypedDict): - created: NotRequired["ValueListItemService.ListParamsCreated|int"] - """ - Only return items that were created during the given date interval. - """ - 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. - """ - value: NotRequired[str] - """ - Return items belonging to the parent list whose value matches the specified value (using an "is like" match). - """ - value_list: str - """ - Identifier for the parent value list this item belongs to. - """ - - class ListParamsCreated(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) - """ - - class RetrieveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ +class ValueListItemService(StripeService): def delete( self, item: str, - params: Optional["ValueListItemService.DeleteParams"] = None, + params: Optional["ValueListItemDeleteParams"] = None, options: Optional[RequestOptions] = None, ) -> ValueListItem: """ @@ -106,7 +49,7 @@ def delete( async def delete_async( self, item: str, - params: Optional["ValueListItemService.DeleteParams"] = None, + params: Optional["ValueListItemDeleteParams"] = None, options: Optional[RequestOptions] = None, ) -> ValueListItem: """ @@ -128,7 +71,7 @@ async def delete_async( def retrieve( self, item: str, - params: Optional["ValueListItemService.RetrieveParams"] = None, + params: Optional["ValueListItemRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> ValueListItem: """ @@ -150,7 +93,7 @@ def retrieve( async def retrieve_async( self, item: str, - params: Optional["ValueListItemService.RetrieveParams"] = None, + params: Optional["ValueListItemRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> ValueListItem: """ @@ -171,7 +114,7 @@ async def retrieve_async( def list( self, - params: "ValueListItemService.ListParams", + params: "ValueListItemListParams", options: Optional[RequestOptions] = None, ) -> ListObject[ValueListItem]: """ @@ -190,7 +133,7 @@ def list( async def list_async( self, - params: "ValueListItemService.ListParams", + params: "ValueListItemListParams", options: Optional[RequestOptions] = None, ) -> ListObject[ValueListItem]: """ @@ -209,7 +152,7 @@ async def list_async( def create( self, - params: "ValueListItemService.CreateParams", + params: "ValueListItemCreateParams", options: Optional[RequestOptions] = None, ) -> ValueListItem: """ @@ -228,7 +171,7 @@ def create( async def create_async( self, - params: "ValueListItemService.CreateParams", + params: "ValueListItemCreateParams", options: Optional[RequestOptions] = None, ) -> ValueListItem: """ diff --git a/stripe/radar/_value_list_service.py b/stripe/radar/_value_list_service.py index 0471ea1ed..83d292431 100644 --- a/stripe/radar/_value_list_service.py +++ b/stripe/radar/_value_list_service.py @@ -5,125 +5,30 @@ from stripe._stripe_service import StripeService from stripe._util import sanitize_id from stripe.radar._value_list import ValueList -from typing import Dict, List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params.radar._value_list_create_params import ( + ValueListCreateParams, + ) + from stripe.params.radar._value_list_delete_params import ( + ValueListDeleteParams, + ) + from stripe.params.radar._value_list_list_params import ValueListListParams + from stripe.params.radar._value_list_retrieve_params import ( + ValueListRetrieveParams, + ) + from stripe.params.radar._value_list_update_params import ( + ValueListUpdateParams, + ) class ValueListService(StripeService): - class CreateParams(TypedDict): - alias: str - """ - The name of the value list for use in rules. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - item_type: NotRequired[ - Literal[ - "card_bin", - "card_fingerprint", - "case_sensitive_string", - "country", - "customer_id", - "email", - "ip_address", - "sepa_debit_fingerprint", - "string", - "us_bank_account_fingerprint", - ] - ] - """ - Type of the items in the value list. One of `card_fingerprint`, `card_bin`, `email`, `ip_address`, `country`, `string`, `case_sensitive_string`, `customer_id`, `sepa_debit_fingerprint`, or `us_bank_account_fingerprint`. Use `string` if the item type is unknown or mixed. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - name: str - """ - The human-readable name of the value list. - """ - - class DeleteParams(TypedDict): - pass - - class ListParams(TypedDict): - alias: NotRequired[str] - """ - The alias used to reference the value list when writing rules. - """ - contains: NotRequired[str] - """ - A value contained within a value list - returns all value lists containing this value. - """ - created: NotRequired["ValueListService.ListParamsCreated|int"] - """ - Only return value lists that were created during the given date interval. - """ - 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 ListParamsCreated(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) - """ - - class RetrieveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class UpdateParams(TypedDict): - alias: NotRequired[str] - """ - The name of the value list for use in rules. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - name: NotRequired[str] - """ - The human-readable name of the value list. - """ - def delete( self, value_list: str, - params: Optional["ValueListService.DeleteParams"] = None, + params: Optional["ValueListDeleteParams"] = None, options: Optional[RequestOptions] = None, ) -> ValueList: """ @@ -145,7 +50,7 @@ def delete( async def delete_async( self, value_list: str, - params: Optional["ValueListService.DeleteParams"] = None, + params: Optional["ValueListDeleteParams"] = None, options: Optional[RequestOptions] = None, ) -> ValueList: """ @@ -167,7 +72,7 @@ async def delete_async( def retrieve( self, value_list: str, - params: Optional["ValueListService.RetrieveParams"] = None, + params: Optional["ValueListRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> ValueList: """ @@ -189,7 +94,7 @@ def retrieve( async def retrieve_async( self, value_list: str, - params: Optional["ValueListService.RetrieveParams"] = None, + params: Optional["ValueListRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> ValueList: """ @@ -211,7 +116,7 @@ async def retrieve_async( def update( self, value_list: str, - params: Optional["ValueListService.UpdateParams"] = None, + params: Optional["ValueListUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> ValueList: """ @@ -233,7 +138,7 @@ def update( async def update_async( self, value_list: str, - params: Optional["ValueListService.UpdateParams"] = None, + params: Optional["ValueListUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> ValueList: """ @@ -254,7 +159,7 @@ async def update_async( def list( self, - params: Optional["ValueListService.ListParams"] = None, + params: Optional["ValueListListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[ValueList]: """ @@ -273,7 +178,7 @@ def list( async def list_async( self, - params: Optional["ValueListService.ListParams"] = None, + params: Optional["ValueListListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[ValueList]: """ @@ -292,7 +197,7 @@ async def list_async( def create( self, - params: "ValueListService.CreateParams", + params: "ValueListCreateParams", options: Optional[RequestOptions] = None, ) -> ValueList: """ @@ -311,7 +216,7 @@ def create( async def create_async( self, - params: "ValueListService.CreateParams", + params: "ValueListCreateParams", options: Optional[RequestOptions] = None, ) -> ValueList: """ diff --git a/stripe/reporting/_report_run.py b/stripe/reporting/_report_run.py index 49495e3c3..aba84bc9a 100644 --- a/stripe/reporting/_report_run.py +++ b/stripe/reporting/_report_run.py @@ -3,19 +3,21 @@ from stripe._createable_api_resource import CreateableAPIResource from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource -from stripe._request_options import RequestOptions from stripe._stripe_object import StripeObject from typing import ClassVar, List, Optional, cast -from typing_extensions import ( - Literal, - NotRequired, - TypedDict, - Unpack, - TYPE_CHECKING, -) +from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: from stripe._file import File + from stripe.params.reporting._report_run_create_params import ( + ReportRunCreateParams, + ) + from stripe.params.reporting._report_run_list_params import ( + ReportRunListParams, + ) + from stripe.params.reporting._report_run_retrieve_params import ( + ReportRunRetrieveParams, + ) class ReportRun( @@ -71,742 +73,6 @@ class Parameters(StripeObject): Defaults to `Etc/UTC`. The output timezone for all timestamps in the report. A list of possible time zone values is maintained at the [IANA Time Zone Database](http://www.iana.org/time-zones). Has no effect on `interval_start` or `interval_end`. """ - class CreateParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - parameters: NotRequired["ReportRun.CreateParamsParameters"] - """ - Parameters specifying how the report should be run. Different Report Types have different required and optional parameters, listed in the [API Access to Reports](https://stripe.com/docs/reporting/statements/api) documentation. - """ - report_type: str - """ - The ID of the [report type](https://stripe.com/docs/reporting/statements/api#report-types) to run, such as `"balance.summary.1"`. - """ - - class CreateParamsParameters(TypedDict): - columns: NotRequired[List[str]] - """ - The set of report columns to include in the report output. If omitted, the Report Type is run with its default column set. - """ - connected_account: NotRequired[str] - """ - Connected account ID to filter for in the report run. - """ - currency: NotRequired[str] - """ - Currency of objects to be included in the report run. - """ - interval_end: NotRequired[int] - """ - Ending timestamp of data to be included in the report run (exclusive). - """ - interval_start: NotRequired[int] - """ - Starting timestamp of data to be included in the report run. - """ - payout: NotRequired[str] - """ - Payout ID by which to filter the report run. - """ - reporting_category: NotRequired[ - Literal[ - "advance", - "advance_funding", - "anticipation_repayment", - "charge", - "charge_failure", - "climate_order_purchase", - "climate_order_refund", - "connect_collection_transfer", - "connect_reserved_funds", - "contribution", - "dispute", - "dispute_reversal", - "fee", - "financing_paydown", - "financing_paydown_reversal", - "financing_payout", - "financing_payout_reversal", - "issuing_authorization_hold", - "issuing_authorization_release", - "issuing_dispute", - "issuing_transaction", - "network_cost", - "other_adjustment", - "partial_capture_reversal", - "payout", - "payout_reversal", - "platform_earning", - "platform_earning_refund", - "refund", - "refund_failure", - "risk_reserved_funds", - "tax", - "topup", - "topup_reversal", - "transfer", - "transfer_reversal", - "unreconciled_customer_funds", - ] - ] - """ - Category of balance transactions to be included in the report run. - """ - timezone: NotRequired[ - Literal[ - "Africa/Abidjan", - "Africa/Accra", - "Africa/Addis_Ababa", - "Africa/Algiers", - "Africa/Asmara", - "Africa/Asmera", - "Africa/Bamako", - "Africa/Bangui", - "Africa/Banjul", - "Africa/Bissau", - "Africa/Blantyre", - "Africa/Brazzaville", - "Africa/Bujumbura", - "Africa/Cairo", - "Africa/Casablanca", - "Africa/Ceuta", - "Africa/Conakry", - "Africa/Dakar", - "Africa/Dar_es_Salaam", - "Africa/Djibouti", - "Africa/Douala", - "Africa/El_Aaiun", - "Africa/Freetown", - "Africa/Gaborone", - "Africa/Harare", - "Africa/Johannesburg", - "Africa/Juba", - "Africa/Kampala", - "Africa/Khartoum", - "Africa/Kigali", - "Africa/Kinshasa", - "Africa/Lagos", - "Africa/Libreville", - "Africa/Lome", - "Africa/Luanda", - "Africa/Lubumbashi", - "Africa/Lusaka", - "Africa/Malabo", - "Africa/Maputo", - "Africa/Maseru", - "Africa/Mbabane", - "Africa/Mogadishu", - "Africa/Monrovia", - "Africa/Nairobi", - "Africa/Ndjamena", - "Africa/Niamey", - "Africa/Nouakchott", - "Africa/Ouagadougou", - "Africa/Porto-Novo", - "Africa/Sao_Tome", - "Africa/Timbuktu", - "Africa/Tripoli", - "Africa/Tunis", - "Africa/Windhoek", - "America/Adak", - "America/Anchorage", - "America/Anguilla", - "America/Antigua", - "America/Araguaina", - "America/Argentina/Buenos_Aires", - "America/Argentina/Catamarca", - "America/Argentina/ComodRivadavia", - "America/Argentina/Cordoba", - "America/Argentina/Jujuy", - "America/Argentina/La_Rioja", - "America/Argentina/Mendoza", - "America/Argentina/Rio_Gallegos", - "America/Argentina/Salta", - "America/Argentina/San_Juan", - "America/Argentina/San_Luis", - "America/Argentina/Tucuman", - "America/Argentina/Ushuaia", - "America/Aruba", - "America/Asuncion", - "America/Atikokan", - "America/Atka", - "America/Bahia", - "America/Bahia_Banderas", - "America/Barbados", - "America/Belem", - "America/Belize", - "America/Blanc-Sablon", - "America/Boa_Vista", - "America/Bogota", - "America/Boise", - "America/Buenos_Aires", - "America/Cambridge_Bay", - "America/Campo_Grande", - "America/Cancun", - "America/Caracas", - "America/Catamarca", - "America/Cayenne", - "America/Cayman", - "America/Chicago", - "America/Chihuahua", - "America/Ciudad_Juarez", - "America/Coral_Harbour", - "America/Cordoba", - "America/Costa_Rica", - "America/Coyhaique", - "America/Creston", - "America/Cuiaba", - "America/Curacao", - "America/Danmarkshavn", - "America/Dawson", - "America/Dawson_Creek", - "America/Denver", - "America/Detroit", - "America/Dominica", - "America/Edmonton", - "America/Eirunepe", - "America/El_Salvador", - "America/Ensenada", - "America/Fort_Nelson", - "America/Fort_Wayne", - "America/Fortaleza", - "America/Glace_Bay", - "America/Godthab", - "America/Goose_Bay", - "America/Grand_Turk", - "America/Grenada", - "America/Guadeloupe", - "America/Guatemala", - "America/Guayaquil", - "America/Guyana", - "America/Halifax", - "America/Havana", - "America/Hermosillo", - "America/Indiana/Indianapolis", - "America/Indiana/Knox", - "America/Indiana/Marengo", - "America/Indiana/Petersburg", - "America/Indiana/Tell_City", - "America/Indiana/Vevay", - "America/Indiana/Vincennes", - "America/Indiana/Winamac", - "America/Indianapolis", - "America/Inuvik", - "America/Iqaluit", - "America/Jamaica", - "America/Jujuy", - "America/Juneau", - "America/Kentucky/Louisville", - "America/Kentucky/Monticello", - "America/Knox_IN", - "America/Kralendijk", - "America/La_Paz", - "America/Lima", - "America/Los_Angeles", - "America/Louisville", - "America/Lower_Princes", - "America/Maceio", - "America/Managua", - "America/Manaus", - "America/Marigot", - "America/Martinique", - "America/Matamoros", - "America/Mazatlan", - "America/Mendoza", - "America/Menominee", - "America/Merida", - "America/Metlakatla", - "America/Mexico_City", - "America/Miquelon", - "America/Moncton", - "America/Monterrey", - "America/Montevideo", - "America/Montreal", - "America/Montserrat", - "America/Nassau", - "America/New_York", - "America/Nipigon", - "America/Nome", - "America/Noronha", - "America/North_Dakota/Beulah", - "America/North_Dakota/Center", - "America/North_Dakota/New_Salem", - "America/Nuuk", - "America/Ojinaga", - "America/Panama", - "America/Pangnirtung", - "America/Paramaribo", - "America/Phoenix", - "America/Port-au-Prince", - "America/Port_of_Spain", - "America/Porto_Acre", - "America/Porto_Velho", - "America/Puerto_Rico", - "America/Punta_Arenas", - "America/Rainy_River", - "America/Rankin_Inlet", - "America/Recife", - "America/Regina", - "America/Resolute", - "America/Rio_Branco", - "America/Rosario", - "America/Santa_Isabel", - "America/Santarem", - "America/Santiago", - "America/Santo_Domingo", - "America/Sao_Paulo", - "America/Scoresbysund", - "America/Shiprock", - "America/Sitka", - "America/St_Barthelemy", - "America/St_Johns", - "America/St_Kitts", - "America/St_Lucia", - "America/St_Thomas", - "America/St_Vincent", - "America/Swift_Current", - "America/Tegucigalpa", - "America/Thule", - "America/Thunder_Bay", - "America/Tijuana", - "America/Toronto", - "America/Tortola", - "America/Vancouver", - "America/Virgin", - "America/Whitehorse", - "America/Winnipeg", - "America/Yakutat", - "America/Yellowknife", - "Antarctica/Casey", - "Antarctica/Davis", - "Antarctica/DumontDUrville", - "Antarctica/Macquarie", - "Antarctica/Mawson", - "Antarctica/McMurdo", - "Antarctica/Palmer", - "Antarctica/Rothera", - "Antarctica/South_Pole", - "Antarctica/Syowa", - "Antarctica/Troll", - "Antarctica/Vostok", - "Arctic/Longyearbyen", - "Asia/Aden", - "Asia/Almaty", - "Asia/Amman", - "Asia/Anadyr", - "Asia/Aqtau", - "Asia/Aqtobe", - "Asia/Ashgabat", - "Asia/Ashkhabad", - "Asia/Atyrau", - "Asia/Baghdad", - "Asia/Bahrain", - "Asia/Baku", - "Asia/Bangkok", - "Asia/Barnaul", - "Asia/Beirut", - "Asia/Bishkek", - "Asia/Brunei", - "Asia/Calcutta", - "Asia/Chita", - "Asia/Choibalsan", - "Asia/Chongqing", - "Asia/Chungking", - "Asia/Colombo", - "Asia/Dacca", - "Asia/Damascus", - "Asia/Dhaka", - "Asia/Dili", - "Asia/Dubai", - "Asia/Dushanbe", - "Asia/Famagusta", - "Asia/Gaza", - "Asia/Harbin", - "Asia/Hebron", - "Asia/Ho_Chi_Minh", - "Asia/Hong_Kong", - "Asia/Hovd", - "Asia/Irkutsk", - "Asia/Istanbul", - "Asia/Jakarta", - "Asia/Jayapura", - "Asia/Jerusalem", - "Asia/Kabul", - "Asia/Kamchatka", - "Asia/Karachi", - "Asia/Kashgar", - "Asia/Kathmandu", - "Asia/Katmandu", - "Asia/Khandyga", - "Asia/Kolkata", - "Asia/Krasnoyarsk", - "Asia/Kuala_Lumpur", - "Asia/Kuching", - "Asia/Kuwait", - "Asia/Macao", - "Asia/Macau", - "Asia/Magadan", - "Asia/Makassar", - "Asia/Manila", - "Asia/Muscat", - "Asia/Nicosia", - "Asia/Novokuznetsk", - "Asia/Novosibirsk", - "Asia/Omsk", - "Asia/Oral", - "Asia/Phnom_Penh", - "Asia/Pontianak", - "Asia/Pyongyang", - "Asia/Qatar", - "Asia/Qostanay", - "Asia/Qyzylorda", - "Asia/Rangoon", - "Asia/Riyadh", - "Asia/Saigon", - "Asia/Sakhalin", - "Asia/Samarkand", - "Asia/Seoul", - "Asia/Shanghai", - "Asia/Singapore", - "Asia/Srednekolymsk", - "Asia/Taipei", - "Asia/Tashkent", - "Asia/Tbilisi", - "Asia/Tehran", - "Asia/Tel_Aviv", - "Asia/Thimbu", - "Asia/Thimphu", - "Asia/Tokyo", - "Asia/Tomsk", - "Asia/Ujung_Pandang", - "Asia/Ulaanbaatar", - "Asia/Ulan_Bator", - "Asia/Urumqi", - "Asia/Ust-Nera", - "Asia/Vientiane", - "Asia/Vladivostok", - "Asia/Yakutsk", - "Asia/Yangon", - "Asia/Yekaterinburg", - "Asia/Yerevan", - "Atlantic/Azores", - "Atlantic/Bermuda", - "Atlantic/Canary", - "Atlantic/Cape_Verde", - "Atlantic/Faeroe", - "Atlantic/Faroe", - "Atlantic/Jan_Mayen", - "Atlantic/Madeira", - "Atlantic/Reykjavik", - "Atlantic/South_Georgia", - "Atlantic/St_Helena", - "Atlantic/Stanley", - "Australia/ACT", - "Australia/Adelaide", - "Australia/Brisbane", - "Australia/Broken_Hill", - "Australia/Canberra", - "Australia/Currie", - "Australia/Darwin", - "Australia/Eucla", - "Australia/Hobart", - "Australia/LHI", - "Australia/Lindeman", - "Australia/Lord_Howe", - "Australia/Melbourne", - "Australia/NSW", - "Australia/North", - "Australia/Perth", - "Australia/Queensland", - "Australia/South", - "Australia/Sydney", - "Australia/Tasmania", - "Australia/Victoria", - "Australia/West", - "Australia/Yancowinna", - "Brazil/Acre", - "Brazil/DeNoronha", - "Brazil/East", - "Brazil/West", - "CET", - "CST6CDT", - "Canada/Atlantic", - "Canada/Central", - "Canada/Eastern", - "Canada/Mountain", - "Canada/Newfoundland", - "Canada/Pacific", - "Canada/Saskatchewan", - "Canada/Yukon", - "Chile/Continental", - "Chile/EasterIsland", - "Cuba", - "EET", - "EST", - "EST5EDT", - "Egypt", - "Eire", - "Etc/GMT", - "Etc/GMT+0", - "Etc/GMT+1", - "Etc/GMT+10", - "Etc/GMT+11", - "Etc/GMT+12", - "Etc/GMT+2", - "Etc/GMT+3", - "Etc/GMT+4", - "Etc/GMT+5", - "Etc/GMT+6", - "Etc/GMT+7", - "Etc/GMT+8", - "Etc/GMT+9", - "Etc/GMT-0", - "Etc/GMT-1", - "Etc/GMT-10", - "Etc/GMT-11", - "Etc/GMT-12", - "Etc/GMT-13", - "Etc/GMT-14", - "Etc/GMT-2", - "Etc/GMT-3", - "Etc/GMT-4", - "Etc/GMT-5", - "Etc/GMT-6", - "Etc/GMT-7", - "Etc/GMT-8", - "Etc/GMT-9", - "Etc/GMT0", - "Etc/Greenwich", - "Etc/UCT", - "Etc/UTC", - "Etc/Universal", - "Etc/Zulu", - "Europe/Amsterdam", - "Europe/Andorra", - "Europe/Astrakhan", - "Europe/Athens", - "Europe/Belfast", - "Europe/Belgrade", - "Europe/Berlin", - "Europe/Bratislava", - "Europe/Brussels", - "Europe/Bucharest", - "Europe/Budapest", - "Europe/Busingen", - "Europe/Chisinau", - "Europe/Copenhagen", - "Europe/Dublin", - "Europe/Gibraltar", - "Europe/Guernsey", - "Europe/Helsinki", - "Europe/Isle_of_Man", - "Europe/Istanbul", - "Europe/Jersey", - "Europe/Kaliningrad", - "Europe/Kiev", - "Europe/Kirov", - "Europe/Kyiv", - "Europe/Lisbon", - "Europe/Ljubljana", - "Europe/London", - "Europe/Luxembourg", - "Europe/Madrid", - "Europe/Malta", - "Europe/Mariehamn", - "Europe/Minsk", - "Europe/Monaco", - "Europe/Moscow", - "Europe/Nicosia", - "Europe/Oslo", - "Europe/Paris", - "Europe/Podgorica", - "Europe/Prague", - "Europe/Riga", - "Europe/Rome", - "Europe/Samara", - "Europe/San_Marino", - "Europe/Sarajevo", - "Europe/Saratov", - "Europe/Simferopol", - "Europe/Skopje", - "Europe/Sofia", - "Europe/Stockholm", - "Europe/Tallinn", - "Europe/Tirane", - "Europe/Tiraspol", - "Europe/Ulyanovsk", - "Europe/Uzhgorod", - "Europe/Vaduz", - "Europe/Vatican", - "Europe/Vienna", - "Europe/Vilnius", - "Europe/Volgograd", - "Europe/Warsaw", - "Europe/Zagreb", - "Europe/Zaporozhye", - "Europe/Zurich", - "Factory", - "GB", - "GB-Eire", - "GMT", - "GMT+0", - "GMT-0", - "GMT0", - "Greenwich", - "HST", - "Hongkong", - "Iceland", - "Indian/Antananarivo", - "Indian/Chagos", - "Indian/Christmas", - "Indian/Cocos", - "Indian/Comoro", - "Indian/Kerguelen", - "Indian/Mahe", - "Indian/Maldives", - "Indian/Mauritius", - "Indian/Mayotte", - "Indian/Reunion", - "Iran", - "Israel", - "Jamaica", - "Japan", - "Kwajalein", - "Libya", - "MET", - "MST", - "MST7MDT", - "Mexico/BajaNorte", - "Mexico/BajaSur", - "Mexico/General", - "NZ", - "NZ-CHAT", - "Navajo", - "PRC", - "PST8PDT", - "Pacific/Apia", - "Pacific/Auckland", - "Pacific/Bougainville", - "Pacific/Chatham", - "Pacific/Chuuk", - "Pacific/Easter", - "Pacific/Efate", - "Pacific/Enderbury", - "Pacific/Fakaofo", - "Pacific/Fiji", - "Pacific/Funafuti", - "Pacific/Galapagos", - "Pacific/Gambier", - "Pacific/Guadalcanal", - "Pacific/Guam", - "Pacific/Honolulu", - "Pacific/Johnston", - "Pacific/Kanton", - "Pacific/Kiritimati", - "Pacific/Kosrae", - "Pacific/Kwajalein", - "Pacific/Majuro", - "Pacific/Marquesas", - "Pacific/Midway", - "Pacific/Nauru", - "Pacific/Niue", - "Pacific/Norfolk", - "Pacific/Noumea", - "Pacific/Pago_Pago", - "Pacific/Palau", - "Pacific/Pitcairn", - "Pacific/Pohnpei", - "Pacific/Ponape", - "Pacific/Port_Moresby", - "Pacific/Rarotonga", - "Pacific/Saipan", - "Pacific/Samoa", - "Pacific/Tahiti", - "Pacific/Tarawa", - "Pacific/Tongatapu", - "Pacific/Truk", - "Pacific/Wake", - "Pacific/Wallis", - "Pacific/Yap", - "Poland", - "Portugal", - "ROC", - "ROK", - "Singapore", - "Turkey", - "UCT", - "US/Alaska", - "US/Aleutian", - "US/Arizona", - "US/Central", - "US/East-Indiana", - "US/Eastern", - "US/Hawaii", - "US/Indiana-Starke", - "US/Michigan", - "US/Mountain", - "US/Pacific", - "US/Pacific-New", - "US/Samoa", - "UTC", - "Universal", - "W-SU", - "WET", - "Zulu", - ] - ] - """ - Defaults to `Etc/UTC`. The output timezone for all timestamps in the report. A list of possible time zone values is maintained at the [IANA Time Zone Database](http://www.iana.org/time-zones). Has no effect on `interval_start` or `interval_end`. - """ - - class ListParams(RequestOptions): - created: NotRequired["ReportRun.ListParamsCreated|int"] - """ - Only return Report Runs that were created during the given date interval. - """ - 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 ListParamsCreated(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) - """ - - class RetrieveParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - created: int """ Time at which the object was created. Measured in seconds since the Unix epoch. @@ -851,7 +117,7 @@ class RetrieveParams(RequestOptions): """ @classmethod - def create(cls, **params: Unpack["ReportRun.CreateParams"]) -> "ReportRun": + def create(cls, **params: Unpack["ReportRunCreateParams"]) -> "ReportRun": """ Creates a new object and begin running the report. (Certain report types require a [live-mode API key](https://stripe.com/docs/keys#test-live-modes).) """ @@ -866,7 +132,7 @@ def create(cls, **params: Unpack["ReportRun.CreateParams"]) -> "ReportRun": @classmethod async def create_async( - cls, **params: Unpack["ReportRun.CreateParams"] + cls, **params: Unpack["ReportRunCreateParams"] ) -> "ReportRun": """ Creates a new object and begin running the report. (Certain report types require a [live-mode API key](https://stripe.com/docs/keys#test-live-modes).) @@ -882,7 +148,7 @@ async def create_async( @classmethod def list( - cls, **params: Unpack["ReportRun.ListParams"] + cls, **params: Unpack["ReportRunListParams"] ) -> ListObject["ReportRun"]: """ Returns a list of Report Runs, with the most recent appearing first. @@ -902,7 +168,7 @@ def list( @classmethod async def list_async( - cls, **params: Unpack["ReportRun.ListParams"] + cls, **params: Unpack["ReportRunListParams"] ) -> ListObject["ReportRun"]: """ Returns a list of Report Runs, with the most recent appearing first. @@ -922,7 +188,7 @@ async def list_async( @classmethod def retrieve( - cls, id: str, **params: Unpack["ReportRun.RetrieveParams"] + cls, id: str, **params: Unpack["ReportRunRetrieveParams"] ) -> "ReportRun": """ Retrieves the details of an existing Report Run. @@ -933,7 +199,7 @@ def retrieve( @classmethod async def retrieve_async( - cls, id: str, **params: Unpack["ReportRun.RetrieveParams"] + cls, id: str, **params: Unpack["ReportRunRetrieveParams"] ) -> "ReportRun": """ Retrieves the details of an existing Report Run. diff --git a/stripe/reporting/_report_run_service.py b/stripe/reporting/_report_run_service.py index 87524ecd8..e1a028e01 100644 --- a/stripe/reporting/_report_run_service.py +++ b/stripe/reporting/_report_run_service.py @@ -5,750 +5,25 @@ from stripe._stripe_service import StripeService from stripe._util import sanitize_id from stripe.reporting._report_run import ReportRun -from typing import List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params.reporting._report_run_create_params import ( + ReportRunCreateParams, + ) + from stripe.params.reporting._report_run_list_params import ( + ReportRunListParams, + ) + from stripe.params.reporting._report_run_retrieve_params import ( + ReportRunRetrieveParams, + ) -class ReportRunService(StripeService): - class CreateParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - parameters: NotRequired["ReportRunService.CreateParamsParameters"] - """ - Parameters specifying how the report should be run. Different Report Types have different required and optional parameters, listed in the [API Access to Reports](https://stripe.com/docs/reporting/statements/api) documentation. - """ - report_type: str - """ - The ID of the [report type](https://stripe.com/docs/reporting/statements/api#report-types) to run, such as `"balance.summary.1"`. - """ - - class CreateParamsParameters(TypedDict): - columns: NotRequired[List[str]] - """ - The set of report columns to include in the report output. If omitted, the Report Type is run with its default column set. - """ - connected_account: NotRequired[str] - """ - Connected account ID to filter for in the report run. - """ - currency: NotRequired[str] - """ - Currency of objects to be included in the report run. - """ - interval_end: NotRequired[int] - """ - Ending timestamp of data to be included in the report run (exclusive). - """ - interval_start: NotRequired[int] - """ - Starting timestamp of data to be included in the report run. - """ - payout: NotRequired[str] - """ - Payout ID by which to filter the report run. - """ - reporting_category: NotRequired[ - Literal[ - "advance", - "advance_funding", - "anticipation_repayment", - "charge", - "charge_failure", - "climate_order_purchase", - "climate_order_refund", - "connect_collection_transfer", - "connect_reserved_funds", - "contribution", - "dispute", - "dispute_reversal", - "fee", - "financing_paydown", - "financing_paydown_reversal", - "financing_payout", - "financing_payout_reversal", - "issuing_authorization_hold", - "issuing_authorization_release", - "issuing_dispute", - "issuing_transaction", - "network_cost", - "other_adjustment", - "partial_capture_reversal", - "payout", - "payout_reversal", - "platform_earning", - "platform_earning_refund", - "refund", - "refund_failure", - "risk_reserved_funds", - "tax", - "topup", - "topup_reversal", - "transfer", - "transfer_reversal", - "unreconciled_customer_funds", - ] - ] - """ - Category of balance transactions to be included in the report run. - """ - timezone: NotRequired[ - Literal[ - "Africa/Abidjan", - "Africa/Accra", - "Africa/Addis_Ababa", - "Africa/Algiers", - "Africa/Asmara", - "Africa/Asmera", - "Africa/Bamako", - "Africa/Bangui", - "Africa/Banjul", - "Africa/Bissau", - "Africa/Blantyre", - "Africa/Brazzaville", - "Africa/Bujumbura", - "Africa/Cairo", - "Africa/Casablanca", - "Africa/Ceuta", - "Africa/Conakry", - "Africa/Dakar", - "Africa/Dar_es_Salaam", - "Africa/Djibouti", - "Africa/Douala", - "Africa/El_Aaiun", - "Africa/Freetown", - "Africa/Gaborone", - "Africa/Harare", - "Africa/Johannesburg", - "Africa/Juba", - "Africa/Kampala", - "Africa/Khartoum", - "Africa/Kigali", - "Africa/Kinshasa", - "Africa/Lagos", - "Africa/Libreville", - "Africa/Lome", - "Africa/Luanda", - "Africa/Lubumbashi", - "Africa/Lusaka", - "Africa/Malabo", - "Africa/Maputo", - "Africa/Maseru", - "Africa/Mbabane", - "Africa/Mogadishu", - "Africa/Monrovia", - "Africa/Nairobi", - "Africa/Ndjamena", - "Africa/Niamey", - "Africa/Nouakchott", - "Africa/Ouagadougou", - "Africa/Porto-Novo", - "Africa/Sao_Tome", - "Africa/Timbuktu", - "Africa/Tripoli", - "Africa/Tunis", - "Africa/Windhoek", - "America/Adak", - "America/Anchorage", - "America/Anguilla", - "America/Antigua", - "America/Araguaina", - "America/Argentina/Buenos_Aires", - "America/Argentina/Catamarca", - "America/Argentina/ComodRivadavia", - "America/Argentina/Cordoba", - "America/Argentina/Jujuy", - "America/Argentina/La_Rioja", - "America/Argentina/Mendoza", - "America/Argentina/Rio_Gallegos", - "America/Argentina/Salta", - "America/Argentina/San_Juan", - "America/Argentina/San_Luis", - "America/Argentina/Tucuman", - "America/Argentina/Ushuaia", - "America/Aruba", - "America/Asuncion", - "America/Atikokan", - "America/Atka", - "America/Bahia", - "America/Bahia_Banderas", - "America/Barbados", - "America/Belem", - "America/Belize", - "America/Blanc-Sablon", - "America/Boa_Vista", - "America/Bogota", - "America/Boise", - "America/Buenos_Aires", - "America/Cambridge_Bay", - "America/Campo_Grande", - "America/Cancun", - "America/Caracas", - "America/Catamarca", - "America/Cayenne", - "America/Cayman", - "America/Chicago", - "America/Chihuahua", - "America/Ciudad_Juarez", - "America/Coral_Harbour", - "America/Cordoba", - "America/Costa_Rica", - "America/Coyhaique", - "America/Creston", - "America/Cuiaba", - "America/Curacao", - "America/Danmarkshavn", - "America/Dawson", - "America/Dawson_Creek", - "America/Denver", - "America/Detroit", - "America/Dominica", - "America/Edmonton", - "America/Eirunepe", - "America/El_Salvador", - "America/Ensenada", - "America/Fort_Nelson", - "America/Fort_Wayne", - "America/Fortaleza", - "America/Glace_Bay", - "America/Godthab", - "America/Goose_Bay", - "America/Grand_Turk", - "America/Grenada", - "America/Guadeloupe", - "America/Guatemala", - "America/Guayaquil", - "America/Guyana", - "America/Halifax", - "America/Havana", - "America/Hermosillo", - "America/Indiana/Indianapolis", - "America/Indiana/Knox", - "America/Indiana/Marengo", - "America/Indiana/Petersburg", - "America/Indiana/Tell_City", - "America/Indiana/Vevay", - "America/Indiana/Vincennes", - "America/Indiana/Winamac", - "America/Indianapolis", - "America/Inuvik", - "America/Iqaluit", - "America/Jamaica", - "America/Jujuy", - "America/Juneau", - "America/Kentucky/Louisville", - "America/Kentucky/Monticello", - "America/Knox_IN", - "America/Kralendijk", - "America/La_Paz", - "America/Lima", - "America/Los_Angeles", - "America/Louisville", - "America/Lower_Princes", - "America/Maceio", - "America/Managua", - "America/Manaus", - "America/Marigot", - "America/Martinique", - "America/Matamoros", - "America/Mazatlan", - "America/Mendoza", - "America/Menominee", - "America/Merida", - "America/Metlakatla", - "America/Mexico_City", - "America/Miquelon", - "America/Moncton", - "America/Monterrey", - "America/Montevideo", - "America/Montreal", - "America/Montserrat", - "America/Nassau", - "America/New_York", - "America/Nipigon", - "America/Nome", - "America/Noronha", - "America/North_Dakota/Beulah", - "America/North_Dakota/Center", - "America/North_Dakota/New_Salem", - "America/Nuuk", - "America/Ojinaga", - "America/Panama", - "America/Pangnirtung", - "America/Paramaribo", - "America/Phoenix", - "America/Port-au-Prince", - "America/Port_of_Spain", - "America/Porto_Acre", - "America/Porto_Velho", - "America/Puerto_Rico", - "America/Punta_Arenas", - "America/Rainy_River", - "America/Rankin_Inlet", - "America/Recife", - "America/Regina", - "America/Resolute", - "America/Rio_Branco", - "America/Rosario", - "America/Santa_Isabel", - "America/Santarem", - "America/Santiago", - "America/Santo_Domingo", - "America/Sao_Paulo", - "America/Scoresbysund", - "America/Shiprock", - "America/Sitka", - "America/St_Barthelemy", - "America/St_Johns", - "America/St_Kitts", - "America/St_Lucia", - "America/St_Thomas", - "America/St_Vincent", - "America/Swift_Current", - "America/Tegucigalpa", - "America/Thule", - "America/Thunder_Bay", - "America/Tijuana", - "America/Toronto", - "America/Tortola", - "America/Vancouver", - "America/Virgin", - "America/Whitehorse", - "America/Winnipeg", - "America/Yakutat", - "America/Yellowknife", - "Antarctica/Casey", - "Antarctica/Davis", - "Antarctica/DumontDUrville", - "Antarctica/Macquarie", - "Antarctica/Mawson", - "Antarctica/McMurdo", - "Antarctica/Palmer", - "Antarctica/Rothera", - "Antarctica/South_Pole", - "Antarctica/Syowa", - "Antarctica/Troll", - "Antarctica/Vostok", - "Arctic/Longyearbyen", - "Asia/Aden", - "Asia/Almaty", - "Asia/Amman", - "Asia/Anadyr", - "Asia/Aqtau", - "Asia/Aqtobe", - "Asia/Ashgabat", - "Asia/Ashkhabad", - "Asia/Atyrau", - "Asia/Baghdad", - "Asia/Bahrain", - "Asia/Baku", - "Asia/Bangkok", - "Asia/Barnaul", - "Asia/Beirut", - "Asia/Bishkek", - "Asia/Brunei", - "Asia/Calcutta", - "Asia/Chita", - "Asia/Choibalsan", - "Asia/Chongqing", - "Asia/Chungking", - "Asia/Colombo", - "Asia/Dacca", - "Asia/Damascus", - "Asia/Dhaka", - "Asia/Dili", - "Asia/Dubai", - "Asia/Dushanbe", - "Asia/Famagusta", - "Asia/Gaza", - "Asia/Harbin", - "Asia/Hebron", - "Asia/Ho_Chi_Minh", - "Asia/Hong_Kong", - "Asia/Hovd", - "Asia/Irkutsk", - "Asia/Istanbul", - "Asia/Jakarta", - "Asia/Jayapura", - "Asia/Jerusalem", - "Asia/Kabul", - "Asia/Kamchatka", - "Asia/Karachi", - "Asia/Kashgar", - "Asia/Kathmandu", - "Asia/Katmandu", - "Asia/Khandyga", - "Asia/Kolkata", - "Asia/Krasnoyarsk", - "Asia/Kuala_Lumpur", - "Asia/Kuching", - "Asia/Kuwait", - "Asia/Macao", - "Asia/Macau", - "Asia/Magadan", - "Asia/Makassar", - "Asia/Manila", - "Asia/Muscat", - "Asia/Nicosia", - "Asia/Novokuznetsk", - "Asia/Novosibirsk", - "Asia/Omsk", - "Asia/Oral", - "Asia/Phnom_Penh", - "Asia/Pontianak", - "Asia/Pyongyang", - "Asia/Qatar", - "Asia/Qostanay", - "Asia/Qyzylorda", - "Asia/Rangoon", - "Asia/Riyadh", - "Asia/Saigon", - "Asia/Sakhalin", - "Asia/Samarkand", - "Asia/Seoul", - "Asia/Shanghai", - "Asia/Singapore", - "Asia/Srednekolymsk", - "Asia/Taipei", - "Asia/Tashkent", - "Asia/Tbilisi", - "Asia/Tehran", - "Asia/Tel_Aviv", - "Asia/Thimbu", - "Asia/Thimphu", - "Asia/Tokyo", - "Asia/Tomsk", - "Asia/Ujung_Pandang", - "Asia/Ulaanbaatar", - "Asia/Ulan_Bator", - "Asia/Urumqi", - "Asia/Ust-Nera", - "Asia/Vientiane", - "Asia/Vladivostok", - "Asia/Yakutsk", - "Asia/Yangon", - "Asia/Yekaterinburg", - "Asia/Yerevan", - "Atlantic/Azores", - "Atlantic/Bermuda", - "Atlantic/Canary", - "Atlantic/Cape_Verde", - "Atlantic/Faeroe", - "Atlantic/Faroe", - "Atlantic/Jan_Mayen", - "Atlantic/Madeira", - "Atlantic/Reykjavik", - "Atlantic/South_Georgia", - "Atlantic/St_Helena", - "Atlantic/Stanley", - "Australia/ACT", - "Australia/Adelaide", - "Australia/Brisbane", - "Australia/Broken_Hill", - "Australia/Canberra", - "Australia/Currie", - "Australia/Darwin", - "Australia/Eucla", - "Australia/Hobart", - "Australia/LHI", - "Australia/Lindeman", - "Australia/Lord_Howe", - "Australia/Melbourne", - "Australia/NSW", - "Australia/North", - "Australia/Perth", - "Australia/Queensland", - "Australia/South", - "Australia/Sydney", - "Australia/Tasmania", - "Australia/Victoria", - "Australia/West", - "Australia/Yancowinna", - "Brazil/Acre", - "Brazil/DeNoronha", - "Brazil/East", - "Brazil/West", - "CET", - "CST6CDT", - "Canada/Atlantic", - "Canada/Central", - "Canada/Eastern", - "Canada/Mountain", - "Canada/Newfoundland", - "Canada/Pacific", - "Canada/Saskatchewan", - "Canada/Yukon", - "Chile/Continental", - "Chile/EasterIsland", - "Cuba", - "EET", - "EST", - "EST5EDT", - "Egypt", - "Eire", - "Etc/GMT", - "Etc/GMT+0", - "Etc/GMT+1", - "Etc/GMT+10", - "Etc/GMT+11", - "Etc/GMT+12", - "Etc/GMT+2", - "Etc/GMT+3", - "Etc/GMT+4", - "Etc/GMT+5", - "Etc/GMT+6", - "Etc/GMT+7", - "Etc/GMT+8", - "Etc/GMT+9", - "Etc/GMT-0", - "Etc/GMT-1", - "Etc/GMT-10", - "Etc/GMT-11", - "Etc/GMT-12", - "Etc/GMT-13", - "Etc/GMT-14", - "Etc/GMT-2", - "Etc/GMT-3", - "Etc/GMT-4", - "Etc/GMT-5", - "Etc/GMT-6", - "Etc/GMT-7", - "Etc/GMT-8", - "Etc/GMT-9", - "Etc/GMT0", - "Etc/Greenwich", - "Etc/UCT", - "Etc/UTC", - "Etc/Universal", - "Etc/Zulu", - "Europe/Amsterdam", - "Europe/Andorra", - "Europe/Astrakhan", - "Europe/Athens", - "Europe/Belfast", - "Europe/Belgrade", - "Europe/Berlin", - "Europe/Bratislava", - "Europe/Brussels", - "Europe/Bucharest", - "Europe/Budapest", - "Europe/Busingen", - "Europe/Chisinau", - "Europe/Copenhagen", - "Europe/Dublin", - "Europe/Gibraltar", - "Europe/Guernsey", - "Europe/Helsinki", - "Europe/Isle_of_Man", - "Europe/Istanbul", - "Europe/Jersey", - "Europe/Kaliningrad", - "Europe/Kiev", - "Europe/Kirov", - "Europe/Kyiv", - "Europe/Lisbon", - "Europe/Ljubljana", - "Europe/London", - "Europe/Luxembourg", - "Europe/Madrid", - "Europe/Malta", - "Europe/Mariehamn", - "Europe/Minsk", - "Europe/Monaco", - "Europe/Moscow", - "Europe/Nicosia", - "Europe/Oslo", - "Europe/Paris", - "Europe/Podgorica", - "Europe/Prague", - "Europe/Riga", - "Europe/Rome", - "Europe/Samara", - "Europe/San_Marino", - "Europe/Sarajevo", - "Europe/Saratov", - "Europe/Simferopol", - "Europe/Skopje", - "Europe/Sofia", - "Europe/Stockholm", - "Europe/Tallinn", - "Europe/Tirane", - "Europe/Tiraspol", - "Europe/Ulyanovsk", - "Europe/Uzhgorod", - "Europe/Vaduz", - "Europe/Vatican", - "Europe/Vienna", - "Europe/Vilnius", - "Europe/Volgograd", - "Europe/Warsaw", - "Europe/Zagreb", - "Europe/Zaporozhye", - "Europe/Zurich", - "Factory", - "GB", - "GB-Eire", - "GMT", - "GMT+0", - "GMT-0", - "GMT0", - "Greenwich", - "HST", - "Hongkong", - "Iceland", - "Indian/Antananarivo", - "Indian/Chagos", - "Indian/Christmas", - "Indian/Cocos", - "Indian/Comoro", - "Indian/Kerguelen", - "Indian/Mahe", - "Indian/Maldives", - "Indian/Mauritius", - "Indian/Mayotte", - "Indian/Reunion", - "Iran", - "Israel", - "Jamaica", - "Japan", - "Kwajalein", - "Libya", - "MET", - "MST", - "MST7MDT", - "Mexico/BajaNorte", - "Mexico/BajaSur", - "Mexico/General", - "NZ", - "NZ-CHAT", - "Navajo", - "PRC", - "PST8PDT", - "Pacific/Apia", - "Pacific/Auckland", - "Pacific/Bougainville", - "Pacific/Chatham", - "Pacific/Chuuk", - "Pacific/Easter", - "Pacific/Efate", - "Pacific/Enderbury", - "Pacific/Fakaofo", - "Pacific/Fiji", - "Pacific/Funafuti", - "Pacific/Galapagos", - "Pacific/Gambier", - "Pacific/Guadalcanal", - "Pacific/Guam", - "Pacific/Honolulu", - "Pacific/Johnston", - "Pacific/Kanton", - "Pacific/Kiritimati", - "Pacific/Kosrae", - "Pacific/Kwajalein", - "Pacific/Majuro", - "Pacific/Marquesas", - "Pacific/Midway", - "Pacific/Nauru", - "Pacific/Niue", - "Pacific/Norfolk", - "Pacific/Noumea", - "Pacific/Pago_Pago", - "Pacific/Palau", - "Pacific/Pitcairn", - "Pacific/Pohnpei", - "Pacific/Ponape", - "Pacific/Port_Moresby", - "Pacific/Rarotonga", - "Pacific/Saipan", - "Pacific/Samoa", - "Pacific/Tahiti", - "Pacific/Tarawa", - "Pacific/Tongatapu", - "Pacific/Truk", - "Pacific/Wake", - "Pacific/Wallis", - "Pacific/Yap", - "Poland", - "Portugal", - "ROC", - "ROK", - "Singapore", - "Turkey", - "UCT", - "US/Alaska", - "US/Aleutian", - "US/Arizona", - "US/Central", - "US/East-Indiana", - "US/Eastern", - "US/Hawaii", - "US/Indiana-Starke", - "US/Michigan", - "US/Mountain", - "US/Pacific", - "US/Pacific-New", - "US/Samoa", - "UTC", - "Universal", - "W-SU", - "WET", - "Zulu", - ] - ] - """ - Defaults to `Etc/UTC`. The output timezone for all timestamps in the report. A list of possible time zone values is maintained at the [IANA Time Zone Database](http://www.iana.org/time-zones). Has no effect on `interval_start` or `interval_end`. - """ - - class ListParams(TypedDict): - created: NotRequired["ReportRunService.ListParamsCreated|int"] - """ - Only return Report Runs that were created during the given date interval. - """ - 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 ListParamsCreated(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) - """ - - class RetrieveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ +class ReportRunService(StripeService): def list( self, - params: Optional["ReportRunService.ListParams"] = None, + params: Optional["ReportRunListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[ReportRun]: """ @@ -767,7 +42,7 @@ def list( async def list_async( self, - params: Optional["ReportRunService.ListParams"] = None, + params: Optional["ReportRunListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[ReportRun]: """ @@ -786,7 +61,7 @@ async def list_async( def create( self, - params: "ReportRunService.CreateParams", + params: "ReportRunCreateParams", options: Optional[RequestOptions] = None, ) -> ReportRun: """ @@ -805,7 +80,7 @@ def create( async def create_async( self, - params: "ReportRunService.CreateParams", + params: "ReportRunCreateParams", options: Optional[RequestOptions] = None, ) -> ReportRun: """ @@ -825,7 +100,7 @@ async def create_async( def retrieve( self, report_run: str, - params: Optional["ReportRunService.RetrieveParams"] = None, + params: Optional["ReportRunRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> ReportRun: """ @@ -847,7 +122,7 @@ def retrieve( async def retrieve_async( self, report_run: str, - params: Optional["ReportRunService.RetrieveParams"] = None, + params: Optional["ReportRunRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> ReportRun: """ diff --git a/stripe/reporting/_report_type.py b/stripe/reporting/_report_type.py index af722ea57..8d765a769 100644 --- a/stripe/reporting/_report_type.py +++ b/stripe/reporting/_report_type.py @@ -2,9 +2,16 @@ # File generated from our OpenAPI spec from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource -from stripe._request_options import RequestOptions from typing import ClassVar, List, Optional -from typing_extensions import Literal, NotRequired, Unpack +from typing_extensions import Literal, Unpack, TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params.reporting._report_type_list_params import ( + ReportTypeListParams, + ) + from stripe.params.reporting._report_type_retrieve_params import ( + ReportTypeRetrieveParams, + ) class ReportType(ListableAPIResource["ReportType"]): @@ -22,19 +29,6 @@ class ReportType(ListableAPIResource["ReportType"]): OBJECT_NAME: ClassVar[Literal["reporting.report_type"]] = ( "reporting.report_type" ) - - class ListParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class RetrieveParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - data_available_end: int """ Most recent time for which this Report Type is available. Measured in seconds since the Unix epoch. @@ -74,7 +68,7 @@ class RetrieveParams(RequestOptions): @classmethod def list( - cls, **params: Unpack["ReportType.ListParams"] + cls, **params: Unpack["ReportTypeListParams"] ) -> ListObject["ReportType"]: """ Returns a full list of Report Types. @@ -94,7 +88,7 @@ def list( @classmethod async def list_async( - cls, **params: Unpack["ReportType.ListParams"] + cls, **params: Unpack["ReportTypeListParams"] ) -> ListObject["ReportType"]: """ Returns a full list of Report Types. @@ -114,7 +108,7 @@ async def list_async( @classmethod def retrieve( - cls, id: str, **params: Unpack["ReportType.RetrieveParams"] + cls, id: str, **params: Unpack["ReportTypeRetrieveParams"] ) -> "ReportType": """ Retrieves the details of a Report Type. (Certain report types require a [live-mode API key](https://stripe.com/docs/keys#test-live-modes).) @@ -125,7 +119,7 @@ def retrieve( @classmethod async def retrieve_async( - cls, id: str, **params: Unpack["ReportType.RetrieveParams"] + cls, id: str, **params: Unpack["ReportTypeRetrieveParams"] ) -> "ReportType": """ Retrieves the details of a Report Type. (Certain report types require a [live-mode API key](https://stripe.com/docs/keys#test-live-modes).) diff --git a/stripe/reporting/_report_type_service.py b/stripe/reporting/_report_type_service.py index c8a058197..1cc909988 100644 --- a/stripe/reporting/_report_type_service.py +++ b/stripe/reporting/_report_type_service.py @@ -5,26 +5,22 @@ from stripe._stripe_service import StripeService from stripe._util import sanitize_id from stripe.reporting._report_type import ReportType -from typing import List, Optional, cast -from typing_extensions import NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params.reporting._report_type_list_params import ( + ReportTypeListParams, + ) + from stripe.params.reporting._report_type_retrieve_params import ( + ReportTypeRetrieveParams, + ) -class ReportTypeService(StripeService): - class ListParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class RetrieveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ +class ReportTypeService(StripeService): def list( self, - params: Optional["ReportTypeService.ListParams"] = None, + params: Optional["ReportTypeListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[ReportType]: """ @@ -43,7 +39,7 @@ def list( async def list_async( self, - params: Optional["ReportTypeService.ListParams"] = None, + params: Optional["ReportTypeListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[ReportType]: """ @@ -63,7 +59,7 @@ async def list_async( def retrieve( self, report_type: str, - params: Optional["ReportTypeService.RetrieveParams"] = None, + params: Optional["ReportTypeRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> ReportType: """ @@ -85,7 +81,7 @@ def retrieve( async def retrieve_async( self, report_type: str, - params: Optional["ReportTypeService.RetrieveParams"] = None, + params: Optional["ReportTypeRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> ReportType: """ diff --git a/stripe/request_metrics.py b/stripe/request_metrics.py deleted file mode 100644 index f97a4dec0..000000000 --- a/stripe/request_metrics.py +++ /dev/null @@ -1,15 +0,0 @@ -# -*- coding: utf-8 -*- -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.request_metrics package is deprecated and will become internal in the future. - """, - DeprecationWarning, -) - -if not TYPE_CHECKING: - from stripe._request_metrics import ( # noqa - RequestMetrics, - ) diff --git a/stripe/request_options.py b/stripe/request_options.py deleted file mode 100644 index cae0fe34d..000000000 --- a/stripe/request_options.py +++ /dev/null @@ -1,18 +0,0 @@ -# -*- coding: utf-8 -*- -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.request_options package is deprecated, please change your - imports to import from stripe directly. - From: - from stripe.request_options import RequestOptions - To: - from stripe import RequestOptions - """, - DeprecationWarning, -) -__deprecated__ = ["RequestOptions"] -if not TYPE_CHECKING: - from stripe._request_options import RequestOptions # noqa diff --git a/stripe/sigma/_scheduled_query_run.py b/stripe/sigma/_scheduled_query_run.py index f3c2b855e..7aa8a2f25 100644 --- a/stripe/sigma/_scheduled_query_run.py +++ b/stripe/sigma/_scheduled_query_run.py @@ -2,13 +2,18 @@ # File generated from our OpenAPI spec from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource -from stripe._request_options import RequestOptions from stripe._stripe_object import StripeObject -from typing import ClassVar, List, Optional -from typing_extensions import Literal, NotRequired, Unpack, TYPE_CHECKING +from typing import ClassVar, Optional +from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: from stripe._file import File + from stripe.params.sigma._scheduled_query_run_list_params import ( + ScheduledQueryRunListParams, + ) + from stripe.params.sigma._scheduled_query_run_retrieve_params import ( + ScheduledQueryRunRetrieveParams, + ) class ScheduledQueryRun(ListableAPIResource["ScheduledQueryRun"]): @@ -29,30 +34,6 @@ class Error(StripeObject): Information about the run failure. """ - class ListParams(RequestOptions): - 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 RetrieveParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - created: int """ Time at which the object was created. Measured in seconds since the Unix epoch. @@ -97,7 +78,7 @@ class RetrieveParams(RequestOptions): @classmethod def list( - cls, **params: Unpack["ScheduledQueryRun.ListParams"] + cls, **params: Unpack["ScheduledQueryRunListParams"] ) -> ListObject["ScheduledQueryRun"]: """ Returns a list of scheduled query runs. @@ -117,7 +98,7 @@ def list( @classmethod async def list_async( - cls, **params: Unpack["ScheduledQueryRun.ListParams"] + cls, **params: Unpack["ScheduledQueryRunListParams"] ) -> ListObject["ScheduledQueryRun"]: """ Returns a list of scheduled query runs. @@ -137,7 +118,7 @@ async def list_async( @classmethod def retrieve( - cls, id: str, **params: Unpack["ScheduledQueryRun.RetrieveParams"] + cls, id: str, **params: Unpack["ScheduledQueryRunRetrieveParams"] ) -> "ScheduledQueryRun": """ Retrieves the details of an scheduled query run. @@ -148,7 +129,7 @@ def retrieve( @classmethod async def retrieve_async( - cls, id: str, **params: Unpack["ScheduledQueryRun.RetrieveParams"] + cls, id: str, **params: Unpack["ScheduledQueryRunRetrieveParams"] ) -> "ScheduledQueryRun": """ Retrieves the details of an scheduled query run. diff --git a/stripe/sigma/_scheduled_query_run_service.py b/stripe/sigma/_scheduled_query_run_service.py index 47fa4a029..b79c861e6 100644 --- a/stripe/sigma/_scheduled_query_run_service.py +++ b/stripe/sigma/_scheduled_query_run_service.py @@ -5,38 +5,22 @@ from stripe._stripe_service import StripeService from stripe._util import sanitize_id from stripe.sigma._scheduled_query_run import ScheduledQueryRun -from typing import List, Optional, cast -from typing_extensions import NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params.sigma._scheduled_query_run_list_params import ( + ScheduledQueryRunListParams, + ) + from stripe.params.sigma._scheduled_query_run_retrieve_params import ( + ScheduledQueryRunRetrieveParams, + ) -class ScheduledQueryRunService(StripeService): - class ListParams(TypedDict): - 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 RetrieveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ +class ScheduledQueryRunService(StripeService): def list( self, - params: Optional["ScheduledQueryRunService.ListParams"] = None, + params: Optional["ScheduledQueryRunListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[ScheduledQueryRun]: """ @@ -55,7 +39,7 @@ def list( async def list_async( self, - params: Optional["ScheduledQueryRunService.ListParams"] = None, + params: Optional["ScheduledQueryRunListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[ScheduledQueryRun]: """ @@ -75,7 +59,7 @@ async def list_async( def retrieve( self, scheduled_query_run: str, - params: Optional["ScheduledQueryRunService.RetrieveParams"] = None, + params: Optional["ScheduledQueryRunRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> ScheduledQueryRun: """ @@ -97,7 +81,7 @@ def retrieve( async def retrieve_async( self, scheduled_query_run: str, - params: Optional["ScheduledQueryRunService.RetrieveParams"] = None, + params: Optional["ScheduledQueryRunRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> ScheduledQueryRun: """ diff --git a/stripe/stripe_object.py b/stripe/stripe_object.py deleted file mode 100644 index 1d0c70b8e..000000000 --- a/stripe/stripe_object.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.stripe_object package is deprecated, please change your - imports to import from stripe directly. - From: - from stripe.stripe_object import StripeObject - To: - from stripe import StripeObject - """, - DeprecationWarning, - stacklevel=2, -) - -if not TYPE_CHECKING: - from stripe._stripe_object import ( # noqa - StripeObject, - ) diff --git a/stripe/stripe_response.py b/stripe/stripe_response.py deleted file mode 100644 index da3dc4385..000000000 --- a/stripe/stripe_response.py +++ /dev/null @@ -1,20 +0,0 @@ -# -*- coding: utf-8 -*- -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.stripe_response package is deprecated, please change your - imports to import from stripe directly. - From: - from stripe.stripe_response import StripeResponse - To: - from stripe import StripeResponse - """, - DeprecationWarning, -) - -if not TYPE_CHECKING: - from stripe._stripe_response import StripeResponse # noqa: F401 - from stripe._stripe_response import StripeResponseBase # noqa: F401 - from stripe._stripe_response import StripeStreamResponse # noqa: F401 diff --git a/stripe/tax/_association.py b/stripe/tax/_association.py index c153c3cb9..5f3ef6bcc 100644 --- a/stripe/tax/_association.py +++ b/stripe/tax/_association.py @@ -1,10 +1,14 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._api_resource import APIResource -from stripe._request_options import RequestOptions from stripe._stripe_object import StripeObject from typing import ClassVar, List, Optional, cast -from typing_extensions import Literal, NotRequired, Unpack +from typing_extensions import Literal, Unpack, TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params.tax._association_find_params import ( + AssociationFindParams, + ) class Association(APIResource["Association"]): @@ -45,16 +49,6 @@ class Errored(StripeObject): """ _inner_class_types = {"committed": Committed, "errored": Errored} - class FindParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - payment_intent: str - """ - Valid [PaymentIntent](https://stripe.com/docs/api/payment_intents/object) id - """ - calculation: str """ The [Tax Calculation](https://stripe.com/docs/api/tax/calculations/object) that was included in PaymentIntent. @@ -77,7 +71,7 @@ class FindParams(RequestOptions): """ @classmethod - def find(cls, **params: Unpack["Association.FindParams"]) -> "Association": + def find(cls, **params: Unpack["AssociationFindParams"]) -> "Association": """ Finds a tax association object by PaymentIntent id. """ @@ -92,7 +86,7 @@ def find(cls, **params: Unpack["Association.FindParams"]) -> "Association": @classmethod async def find_async( - cls, **params: Unpack["Association.FindParams"] + cls, **params: Unpack["AssociationFindParams"] ) -> "Association": """ Finds a tax association object by PaymentIntent id. diff --git a/stripe/tax/_association_service.py b/stripe/tax/_association_service.py index 36b3edd1e..3b65f2b35 100644 --- a/stripe/tax/_association_service.py +++ b/stripe/tax/_association_service.py @@ -3,24 +3,19 @@ from stripe._request_options import RequestOptions from stripe._stripe_service import StripeService from stripe.tax._association import Association -from typing import List, Optional, cast -from typing_extensions import NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params.tax._association_find_params import ( + AssociationFindParams, + ) -class AssociationService(StripeService): - class FindParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - payment_intent: str - """ - Valid [PaymentIntent](https://stripe.com/docs/api/payment_intents/object) id - """ +class AssociationService(StripeService): def find( self, - params: "AssociationService.FindParams", + params: "AssociationFindParams", options: Optional[RequestOptions] = None, ) -> Association: """ @@ -39,7 +34,7 @@ def find( async def find_async( self, - params: "AssociationService.FindParams", + params: "AssociationFindParams", options: Optional[RequestOptions] = None, ) -> Association: """ diff --git a/stripe/tax/_calculation.py b/stripe/tax/_calculation.py index 163a51860..f3a19992c 100644 --- a/stripe/tax/_calculation.py +++ b/stripe/tax/_calculation.py @@ -2,19 +2,21 @@ # File generated from our OpenAPI spec from stripe._createable_api_resource import CreateableAPIResource from stripe._list_object import ListObject -from stripe._request_options import RequestOptions from stripe._stripe_object import StripeObject from stripe._util import class_method_variant, sanitize_id -from typing import ClassVar, Dict, List, Optional, cast, overload -from typing_extensions import ( - Literal, - NotRequired, - TypedDict, - Unpack, - TYPE_CHECKING, -) +from typing import ClassVar, List, Optional, cast, overload +from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: + from stripe.params.tax._calculation_create_params import ( + CalculationCreateParams, + ) + from stripe.params.tax._calculation_list_line_items_params import ( + CalculationListLineItemsParams, + ) + from stripe.params.tax._calculation_retrieve_params import ( + CalculationRetrieveParams, + ) from stripe.tax._calculation_line_item import CalculationLineItem @@ -439,322 +441,6 @@ class FlatAmount(StripeObject): """ _inner_class_types = {"tax_rate_details": TaxRateDetails} - class CreateParams(RequestOptions): - 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). - """ - customer: NotRequired[str] - """ - The ID of an existing customer to use for this calculation. If provided, the customer's address and tax IDs are copied to `customer_details`. - """ - customer_details: NotRequired[ - "Calculation.CreateParamsCustomerDetails" - ] - """ - Details about the customer, including address and tax IDs. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - line_items: List["Calculation.CreateParamsLineItem"] - """ - A list of items the customer is purchasing. - """ - ship_from_details: NotRequired[ - "Calculation.CreateParamsShipFromDetails" - ] - """ - Details about the address from which the goods are being shipped. - """ - shipping_cost: NotRequired["Calculation.CreateParamsShippingCost"] - """ - Shipping cost details to be used for the calculation. - """ - tax_date: NotRequired[int] - """ - Timestamp of date at which the tax rules and rates in effect applies for the calculation. Measured in seconds since the Unix epoch. Can be up to 48 hours in the past, and up to 48 hours in the future. - """ - - class CreateParamsCustomerDetails(TypedDict): - address: NotRequired["Calculation.CreateParamsCustomerDetailsAddress"] - """ - The customer's postal address (for example, home or business location). - """ - address_source: NotRequired[Literal["billing", "shipping"]] - """ - The type of customer address provided. - """ - ip_address: NotRequired[str] - """ - The customer's IP address (IPv4 or IPv6). - """ - tax_ids: NotRequired[ - List["Calculation.CreateParamsCustomerDetailsTaxId"] - ] - """ - The customer's tax IDs. Stripe Tax might consider a transaction with applicable tax IDs to be B2B, which might affect the tax calculation result. Stripe Tax doesn't validate tax IDs for correctness. - """ - taxability_override: NotRequired[ - Literal["customer_exempt", "none", "reverse_charge"] - ] - """ - Overrides the tax calculation result to allow you to not collect tax from your customer. Use this if you've manually checked your customer's tax exemptions. Prefer providing the customer's `tax_ids` where possible, which automatically determines whether `reverse_charge` applies. - """ - - class CreateParamsCustomerDetailsAddress(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, county, province, or region. We recommend sending [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) subdivision code value when possible. - """ - - class CreateParamsCustomerDetailsTaxId(TypedDict): - type: Literal[ - "ad_nrt", - "ae_trn", - "al_tin", - "am_tin", - "ao_tin", - "ar_cuit", - "au_abn", - "au_arn", - "aw_tin", - "az_tin", - "ba_tin", - "bb_tin", - "bd_bin", - "bf_ifu", - "bg_uic", - "bh_vat", - "bj_ifu", - "bo_tin", - "br_cnpj", - "br_cpf", - "bs_tin", - "by_tin", - "ca_bn", - "ca_gst_hst", - "ca_pst_bc", - "ca_pst_mb", - "ca_pst_sk", - "ca_qst", - "cd_nif", - "ch_uid", - "ch_vat", - "cl_tin", - "cm_niu", - "cn_tin", - "co_nit", - "cr_tin", - "cv_nif", - "de_stn", - "do_rcn", - "ec_ruc", - "eg_tin", - "es_cif", - "et_tin", - "eu_oss_vat", - "eu_vat", - "gb_vat", - "ge_vat", - "gn_nif", - "hk_br", - "hr_oib", - "hu_tin", - "id_npwp", - "il_vat", - "in_gst", - "is_vat", - "jp_cn", - "jp_rn", - "jp_trn", - "ke_pin", - "kg_tin", - "kh_tin", - "kr_brn", - "kz_bin", - "la_tin", - "li_uid", - "li_vat", - "ma_vat", - "md_vat", - "me_pib", - "mk_vat", - "mr_nif", - "mx_rfc", - "my_frp", - "my_itn", - "my_sst", - "ng_tin", - "no_vat", - "no_voec", - "np_pan", - "nz_gst", - "om_vat", - "pe_ruc", - "ph_tin", - "ro_tin", - "rs_pib", - "ru_inn", - "ru_kpp", - "sa_vat", - "sg_gst", - "sg_uen", - "si_tin", - "sn_ninea", - "sr_fin", - "sv_nit", - "th_vat", - "tj_tin", - "tr_tin", - "tw_vat", - "tz_vat", - "ua_vat", - "ug_tin", - "us_ein", - "uy_ruc", - "uz_tin", - "uz_vat", - "ve_rif", - "vn_tin", - "za_vat", - "zm_tin", - "zw_tin", - ] - """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `al_tin`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `aw_tin`, `az_tin`, `ba_tin`, `bb_tin`, `bd_bin`, `bf_ifu`, `bg_uic`, `bh_vat`, `bj_ifu`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cm_niu`, `cn_tin`, `co_nit`, `cr_tin`, `cv_nif`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `et_tin`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kg_tin`, `kh_tin`, `kr_brn`, `kz_bin`, `la_tin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin` - """ - value: str - """ - Value of the tax ID. - """ - - class CreateParamsLineItem(TypedDict): - amount: int - """ - A positive integer representing the line item's total price in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). - If `tax_behavior=inclusive`, then this amount includes taxes. Otherwise, taxes are calculated on top of this amount. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. - """ - product: NotRequired[str] - """ - If provided, the product's `tax_code` will be used as the line item's `tax_code`. - """ - quantity: NotRequired[int] - """ - The number of units of the item being purchased. Used to calculate the per-unit price from the total `amount` for the line. For example, if `amount=100` and `quantity=4`, the calculated unit price is 25. - """ - reference: NotRequired[str] - """ - A custom identifier for this line item, which must be unique across the line items in the calculation. The reference helps identify each line item in exported [tax reports](https://stripe.com/docs/tax/reports). - """ - tax_behavior: NotRequired[Literal["exclusive", "inclusive"]] - """ - Specifies whether the `amount` includes taxes. Defaults to `exclusive`. - """ - tax_code: NotRequired[str] - """ - A [tax code](https://stripe.com/docs/tax/tax-categories) ID to use for this line item. If not provided, we will use the tax code from the provided `product` param. If neither `tax_code` nor `product` is provided, we will use the default tax code from your Tax Settings. - """ - - class CreateParamsShipFromDetails(TypedDict): - address: "Calculation.CreateParamsShipFromDetailsAddress" - """ - The address from which the goods are being shipped from. - """ - - class CreateParamsShipFromDetailsAddress(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 CreateParamsShippingCost(TypedDict): - amount: NotRequired[int] - """ - A positive integer in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) representing the shipping charge. If `tax_behavior=inclusive`, then this amount includes taxes. Otherwise, taxes are calculated on top of this amount. - """ - shipping_rate: NotRequired[str] - """ - If provided, the [shipping rate](https://stripe.com/docs/api/shipping_rates/object)'s `amount`, `tax_code` and `tax_behavior` are used. If you provide a shipping rate, then you cannot pass the `amount`, `tax_code`, or `tax_behavior` parameters. - """ - tax_behavior: NotRequired[Literal["exclusive", "inclusive"]] - """ - Specifies whether the `amount` includes taxes. If `tax_behavior=inclusive`, then the amount includes taxes. Defaults to `exclusive`. - """ - tax_code: NotRequired[str] - """ - The [tax code](https://stripe.com/docs/tax/tax-categories) used to calculate tax on shipping. If not provided, the default shipping tax code from your [Tax Settings](https://dashboard.stripe.com/settings/tax) is used. - """ - - class ListLineItemsParams(RequestOptions): - 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 RetrieveParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - amount_total: int """ Total amount after taxes in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). @@ -815,7 +501,7 @@ class RetrieveParams(RequestOptions): @classmethod def create( - cls, **params: Unpack["Calculation.CreateParams"] + cls, **params: Unpack["CalculationCreateParams"] ) -> "Calculation": """ Calculates tax based on the input and returns a Tax Calculation object. @@ -831,7 +517,7 @@ def create( @classmethod async def create_async( - cls, **params: Unpack["Calculation.CreateParams"] + cls, **params: Unpack["CalculationCreateParams"] ) -> "Calculation": """ Calculates tax based on the input and returns a Tax Calculation object. @@ -849,7 +535,7 @@ async def create_async( def _cls_list_line_items( cls, calculation: str, - **params: Unpack["Calculation.ListLineItemsParams"], + **params: Unpack["CalculationListLineItemsParams"], ) -> ListObject["CalculationLineItem"]: """ Retrieves the line items of a tax calculation as a collection, if the calculation hasn't expired. @@ -868,7 +554,7 @@ def _cls_list_line_items( @overload @staticmethod def list_line_items( - calculation: str, **params: Unpack["Calculation.ListLineItemsParams"] + calculation: str, **params: Unpack["CalculationListLineItemsParams"] ) -> ListObject["CalculationLineItem"]: """ Retrieves the line items of a tax calculation as a collection, if the calculation hasn't expired. @@ -877,7 +563,7 @@ def list_line_items( @overload def list_line_items( - self, **params: Unpack["Calculation.ListLineItemsParams"] + self, **params: Unpack["CalculationListLineItemsParams"] ) -> ListObject["CalculationLineItem"]: """ Retrieves the line items of a tax calculation as a collection, if the calculation hasn't expired. @@ -886,7 +572,7 @@ def list_line_items( @class_method_variant("_cls_list_line_items") def list_line_items( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Calculation.ListLineItemsParams"] + self, **params: Unpack["CalculationListLineItemsParams"] ) -> ListObject["CalculationLineItem"]: """ Retrieves the line items of a tax calculation as a collection, if the calculation hasn't expired. @@ -906,7 +592,7 @@ def list_line_items( # pyright: ignore[reportGeneralTypeIssues] async def _cls_list_line_items_async( cls, calculation: str, - **params: Unpack["Calculation.ListLineItemsParams"], + **params: Unpack["CalculationListLineItemsParams"], ) -> ListObject["CalculationLineItem"]: """ Retrieves the line items of a tax calculation as a collection, if the calculation hasn't expired. @@ -925,7 +611,7 @@ async def _cls_list_line_items_async( @overload @staticmethod async def list_line_items_async( - calculation: str, **params: Unpack["Calculation.ListLineItemsParams"] + calculation: str, **params: Unpack["CalculationListLineItemsParams"] ) -> ListObject["CalculationLineItem"]: """ Retrieves the line items of a tax calculation as a collection, if the calculation hasn't expired. @@ -934,7 +620,7 @@ async def list_line_items_async( @overload async def list_line_items_async( - self, **params: Unpack["Calculation.ListLineItemsParams"] + self, **params: Unpack["CalculationListLineItemsParams"] ) -> ListObject["CalculationLineItem"]: """ Retrieves the line items of a tax calculation as a collection, if the calculation hasn't expired. @@ -943,7 +629,7 @@ async def list_line_items_async( @class_method_variant("_cls_list_line_items_async") async def list_line_items_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Calculation.ListLineItemsParams"] + self, **params: Unpack["CalculationListLineItemsParams"] ) -> ListObject["CalculationLineItem"]: """ Retrieves the line items of a tax calculation as a collection, if the calculation hasn't expired. @@ -961,7 +647,7 @@ async def list_line_items_async( # pyright: ignore[reportGeneralTypeIssues] @classmethod def retrieve( - cls, id: str, **params: Unpack["Calculation.RetrieveParams"] + cls, id: str, **params: Unpack["CalculationRetrieveParams"] ) -> "Calculation": """ Retrieves a Tax Calculation object, if the calculation hasn't expired. @@ -972,7 +658,7 @@ def retrieve( @classmethod async def retrieve_async( - cls, id: str, **params: Unpack["Calculation.RetrieveParams"] + cls, id: str, **params: Unpack["CalculationRetrieveParams"] ) -> "Calculation": """ Retrieves a Tax Calculation object, if the calculation hasn't expired. diff --git a/stripe/tax/_calculation_line_item_service.py b/stripe/tax/_calculation_line_item_service.py index c4718e359..f2ccdc142 100644 --- a/stripe/tax/_calculation_line_item_service.py +++ b/stripe/tax/_calculation_line_item_service.py @@ -5,33 +5,20 @@ from stripe._stripe_service import StripeService from stripe._util import sanitize_id from stripe.tax._calculation_line_item import CalculationLineItem -from typing import List, Optional, cast -from typing_extensions import NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params.tax._calculation_line_item_list_params import ( + CalculationLineItemListParams, + ) -class CalculationLineItemService(StripeService): - class ListParams(TypedDict): - 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 CalculationLineItemService(StripeService): def list( self, calculation: str, - params: Optional["CalculationLineItemService.ListParams"] = None, + params: Optional["CalculationLineItemListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[CalculationLineItem]: """ @@ -53,7 +40,7 @@ def list( async def list_async( self, calculation: str, - params: Optional["CalculationLineItemService.ListParams"] = None, + params: Optional["CalculationLineItemListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[CalculationLineItem]: """ diff --git a/stripe/tax/_calculation_service.py b/stripe/tax/_calculation_service.py index 39165d7a9..c038acf79 100644 --- a/stripe/tax/_calculation_service.py +++ b/stripe/tax/_calculation_service.py @@ -7,8 +7,16 @@ from stripe.tax._calculation_line_item_service import ( CalculationLineItemService, ) -from typing import Dict, List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params.tax._calculation_create_params import ( + CalculationCreateParams, + ) + from stripe.params.tax._calculation_retrieve_params import ( + CalculationRetrieveParams, + ) class CalculationService(StripeService): @@ -16,312 +24,10 @@ def __init__(self, requestor): super().__init__(requestor) self.line_items = CalculationLineItemService(self._requestor) - class CreateParams(TypedDict): - 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). - """ - customer: NotRequired[str] - """ - The ID of an existing customer to use for this calculation. If provided, the customer's address and tax IDs are copied to `customer_details`. - """ - customer_details: NotRequired[ - "CalculationService.CreateParamsCustomerDetails" - ] - """ - Details about the customer, including address and tax IDs. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - line_items: List["CalculationService.CreateParamsLineItem"] - """ - A list of items the customer is purchasing. - """ - ship_from_details: NotRequired[ - "CalculationService.CreateParamsShipFromDetails" - ] - """ - Details about the address from which the goods are being shipped. - """ - shipping_cost: NotRequired[ - "CalculationService.CreateParamsShippingCost" - ] - """ - Shipping cost details to be used for the calculation. - """ - tax_date: NotRequired[int] - """ - Timestamp of date at which the tax rules and rates in effect applies for the calculation. Measured in seconds since the Unix epoch. Can be up to 48 hours in the past, and up to 48 hours in the future. - """ - - class CreateParamsCustomerDetails(TypedDict): - address: NotRequired[ - "CalculationService.CreateParamsCustomerDetailsAddress" - ] - """ - The customer's postal address (for example, home or business location). - """ - address_source: NotRequired[Literal["billing", "shipping"]] - """ - The type of customer address provided. - """ - ip_address: NotRequired[str] - """ - The customer's IP address (IPv4 or IPv6). - """ - tax_ids: NotRequired[ - List["CalculationService.CreateParamsCustomerDetailsTaxId"] - ] - """ - The customer's tax IDs. Stripe Tax might consider a transaction with applicable tax IDs to be B2B, which might affect the tax calculation result. Stripe Tax doesn't validate tax IDs for correctness. - """ - taxability_override: NotRequired[ - Literal["customer_exempt", "none", "reverse_charge"] - ] - """ - Overrides the tax calculation result to allow you to not collect tax from your customer. Use this if you've manually checked your customer's tax exemptions. Prefer providing the customer's `tax_ids` where possible, which automatically determines whether `reverse_charge` applies. - """ - - class CreateParamsCustomerDetailsAddress(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, county, province, or region. We recommend sending [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) subdivision code value when possible. - """ - - class CreateParamsCustomerDetailsTaxId(TypedDict): - type: Literal[ - "ad_nrt", - "ae_trn", - "al_tin", - "am_tin", - "ao_tin", - "ar_cuit", - "au_abn", - "au_arn", - "aw_tin", - "az_tin", - "ba_tin", - "bb_tin", - "bd_bin", - "bf_ifu", - "bg_uic", - "bh_vat", - "bj_ifu", - "bo_tin", - "br_cnpj", - "br_cpf", - "bs_tin", - "by_tin", - "ca_bn", - "ca_gst_hst", - "ca_pst_bc", - "ca_pst_mb", - "ca_pst_sk", - "ca_qst", - "cd_nif", - "ch_uid", - "ch_vat", - "cl_tin", - "cm_niu", - "cn_tin", - "co_nit", - "cr_tin", - "cv_nif", - "de_stn", - "do_rcn", - "ec_ruc", - "eg_tin", - "es_cif", - "et_tin", - "eu_oss_vat", - "eu_vat", - "gb_vat", - "ge_vat", - "gn_nif", - "hk_br", - "hr_oib", - "hu_tin", - "id_npwp", - "il_vat", - "in_gst", - "is_vat", - "jp_cn", - "jp_rn", - "jp_trn", - "ke_pin", - "kg_tin", - "kh_tin", - "kr_brn", - "kz_bin", - "la_tin", - "li_uid", - "li_vat", - "ma_vat", - "md_vat", - "me_pib", - "mk_vat", - "mr_nif", - "mx_rfc", - "my_frp", - "my_itn", - "my_sst", - "ng_tin", - "no_vat", - "no_voec", - "np_pan", - "nz_gst", - "om_vat", - "pe_ruc", - "ph_tin", - "ro_tin", - "rs_pib", - "ru_inn", - "ru_kpp", - "sa_vat", - "sg_gst", - "sg_uen", - "si_tin", - "sn_ninea", - "sr_fin", - "sv_nit", - "th_vat", - "tj_tin", - "tr_tin", - "tw_vat", - "tz_vat", - "ua_vat", - "ug_tin", - "us_ein", - "uy_ruc", - "uz_tin", - "uz_vat", - "ve_rif", - "vn_tin", - "za_vat", - "zm_tin", - "zw_tin", - ] - """ - Type of the tax ID, one of `ad_nrt`, `ae_trn`, `al_tin`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `aw_tin`, `az_tin`, `ba_tin`, `bb_tin`, `bd_bin`, `bf_ifu`, `bg_uic`, `bh_vat`, `bj_ifu`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cm_niu`, `cn_tin`, `co_nit`, `cr_tin`, `cv_nif`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `et_tin`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kg_tin`, `kh_tin`, `kr_brn`, `kz_bin`, `la_tin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin` - """ - value: str - """ - Value of the tax ID. - """ - - class CreateParamsLineItem(TypedDict): - amount: int - """ - A positive integer representing the line item's total price in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). - If `tax_behavior=inclusive`, then this amount includes taxes. Otherwise, taxes are calculated on top of this amount. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. - """ - product: NotRequired[str] - """ - If provided, the product's `tax_code` will be used as the line item's `tax_code`. - """ - quantity: NotRequired[int] - """ - The number of units of the item being purchased. Used to calculate the per-unit price from the total `amount` for the line. For example, if `amount=100` and `quantity=4`, the calculated unit price is 25. - """ - reference: NotRequired[str] - """ - A custom identifier for this line item, which must be unique across the line items in the calculation. The reference helps identify each line item in exported [tax reports](https://stripe.com/docs/tax/reports). - """ - tax_behavior: NotRequired[Literal["exclusive", "inclusive"]] - """ - Specifies whether the `amount` includes taxes. Defaults to `exclusive`. - """ - tax_code: NotRequired[str] - """ - A [tax code](https://stripe.com/docs/tax/tax-categories) ID to use for this line item. If not provided, we will use the tax code from the provided `product` param. If neither `tax_code` nor `product` is provided, we will use the default tax code from your Tax Settings. - """ - - class CreateParamsShipFromDetails(TypedDict): - address: "CalculationService.CreateParamsShipFromDetailsAddress" - """ - The address from which the goods are being shipped from. - """ - - class CreateParamsShipFromDetailsAddress(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 CreateParamsShippingCost(TypedDict): - amount: NotRequired[int] - """ - A positive integer in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) representing the shipping charge. If `tax_behavior=inclusive`, then this amount includes taxes. Otherwise, taxes are calculated on top of this amount. - """ - shipping_rate: NotRequired[str] - """ - If provided, the [shipping rate](https://stripe.com/docs/api/shipping_rates/object)'s `amount`, `tax_code` and `tax_behavior` are used. If you provide a shipping rate, then you cannot pass the `amount`, `tax_code`, or `tax_behavior` parameters. - """ - tax_behavior: NotRequired[Literal["exclusive", "inclusive"]] - """ - Specifies whether the `amount` includes taxes. If `tax_behavior=inclusive`, then the amount includes taxes. Defaults to `exclusive`. - """ - tax_code: NotRequired[str] - """ - The [tax code](https://stripe.com/docs/tax/tax-categories) used to calculate tax on shipping. If not provided, the default shipping tax code from your [Tax Settings](https://dashboard.stripe.com/settings/tax) is used. - """ - - class RetrieveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - def retrieve( self, calculation: str, - params: Optional["CalculationService.RetrieveParams"] = None, + params: Optional["CalculationRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Calculation: """ @@ -343,7 +49,7 @@ def retrieve( async def retrieve_async( self, calculation: str, - params: Optional["CalculationService.RetrieveParams"] = None, + params: Optional["CalculationRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Calculation: """ @@ -364,7 +70,7 @@ async def retrieve_async( def create( self, - params: "CalculationService.CreateParams", + params: "CalculationCreateParams", options: Optional[RequestOptions] = None, ) -> Calculation: """ @@ -383,7 +89,7 @@ def create( async def create_async( self, - params: "CalculationService.CreateParams", + params: "CalculationCreateParams", options: Optional[RequestOptions] = None, ) -> Calculation: """ diff --git a/stripe/tax/_form.py b/stripe/tax/_form.py index eefc88f98..f00726af7 100644 --- a/stripe/tax/_form.py +++ b/stripe/tax/_form.py @@ -3,20 +3,16 @@ from stripe._expandable_field import ExpandableField from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource -from stripe._request_options import RequestOptions from stripe._stripe_object import StripeObject from stripe._util import class_method_variant, sanitize_id from typing import Any, ClassVar, List, Optional, cast, overload -from typing_extensions import ( - Literal, - NotRequired, - TypedDict, - Unpack, - TYPE_CHECKING, -) +from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: from stripe._account import Account + from stripe.params.tax._form_list_params import FormListParams + from stripe.params.tax._form_pdf_params import FormPdfParams + from stripe.params.tax._form_retrieve_params import FormRetrieveParams class Form(ListableAPIResource["Form"]): @@ -136,69 +132,6 @@ class Us1099Nec(StripeObject): Year represented by the information reported on the tax form. """ - class ListParams(RequestOptions): - 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. - """ - payee: "Form.ListParamsPayee" - """ - The payee whose volume is represented on the tax form. - """ - 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. - """ - type: NotRequired[ - Literal[ - "au_serr", - "ca_mrdp", - "eu_dac7", - "gb_mrdp", - "nz_mrdp", - "us_1099_k", - "us_1099_misc", - "us_1099_nec", - ] - ] - """ - An optional filter on the list, based on the object `type` field. Without the filter, the list includes all current and future tax form types. If your integration expects only one type of tax form in the response, make sure to provide a type value in the request. - """ - - class ListParamsPayee(TypedDict): - account: NotRequired[str] - """ - The ID of the Stripe account whose forms will be retrieved. - """ - external_reference: NotRequired[str] - """ - The external reference to the payee whose forms will be retrieved. - """ - type: NotRequired[Literal["account", "external_reference"]] - """ - Specifies the payee type. Either `account` or `external_reference`. - """ - - class PdfParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class RetrieveParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - au_serr: Optional[AuSerr] ca_mrdp: Optional[CaMrdp] corrected_by: Optional[ExpandableField["Form"]] @@ -247,7 +180,7 @@ class RetrieveParams(RequestOptions): us_1099_nec: Optional[Us1099Nec] @classmethod - def list(cls, **params: Unpack["Form.ListParams"]) -> ListObject["Form"]: + def list(cls, **params: Unpack["FormListParams"]) -> ListObject["Form"]: """ Returns a list of tax forms which were previously created. The tax forms are returned in sorted order, with the oldest tax forms appearing first. """ @@ -266,7 +199,7 @@ def list(cls, **params: Unpack["Form.ListParams"]) -> ListObject["Form"]: @classmethod async def list_async( - cls, **params: Unpack["Form.ListParams"] + cls, **params: Unpack["FormListParams"] ) -> ListObject["Form"]: """ Returns a list of tax forms which were previously created. The tax forms are returned in sorted order, with the oldest tax forms appearing first. @@ -285,7 +218,7 @@ async def list_async( return result @classmethod - def _cls_pdf(cls, id: str, **params: Unpack["Form.PdfParams"]) -> Any: + def _cls_pdf(cls, id: str, **params: Unpack["FormPdfParams"]) -> Any: """ Download the PDF for a tax form. """ @@ -301,14 +234,14 @@ def _cls_pdf(cls, id: str, **params: Unpack["Form.PdfParams"]) -> Any: @overload @staticmethod - def pdf(id: str, **params: Unpack["Form.PdfParams"]) -> Any: + def pdf(id: str, **params: Unpack["FormPdfParams"]) -> Any: """ Download the PDF for a tax form. """ ... @overload - def pdf(self, **params: Unpack["Form.PdfParams"]) -> Any: + def pdf(self, **params: Unpack["FormPdfParams"]) -> Any: """ Download the PDF for a tax form. """ @@ -316,7 +249,7 @@ def pdf(self, **params: Unpack["Form.PdfParams"]) -> Any: @class_method_variant("_cls_pdf") def pdf( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Form.PdfParams"] + self, **params: Unpack["FormPdfParams"] ) -> Any: """ Download the PDF for a tax form. @@ -335,7 +268,7 @@ def pdf( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_pdf_async( - cls, id: str, **params: Unpack["Form.PdfParams"] + cls, id: str, **params: Unpack["FormPdfParams"] ) -> Any: """ Download the PDF for a tax form. @@ -352,14 +285,14 @@ async def _cls_pdf_async( @overload @staticmethod - async def pdf_async(id: str, **params: Unpack["Form.PdfParams"]) -> Any: + async def pdf_async(id: str, **params: Unpack["FormPdfParams"]) -> Any: """ Download the PDF for a tax form. """ ... @overload - async def pdf_async(self, **params: Unpack["Form.PdfParams"]) -> Any: + async def pdf_async(self, **params: Unpack["FormPdfParams"]) -> Any: """ Download the PDF for a tax form. """ @@ -367,7 +300,7 @@ async def pdf_async(self, **params: Unpack["Form.PdfParams"]) -> Any: @class_method_variant("_cls_pdf_async") async def pdf_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Form.PdfParams"] + self, **params: Unpack["FormPdfParams"] ) -> Any: """ Download the PDF for a tax form. @@ -386,7 +319,7 @@ async def pdf_async( # pyright: ignore[reportGeneralTypeIssues] @classmethod def retrieve( - cls, id: str, **params: Unpack["Form.RetrieveParams"] + cls, id: str, **params: Unpack["FormRetrieveParams"] ) -> "Form": """ Retrieves the details of a tax form that has previously been created. Supply the unique tax form ID that was returned from your previous request, and Stripe will return the corresponding tax form information. @@ -397,7 +330,7 @@ def retrieve( @classmethod async def retrieve_async( - cls, id: str, **params: Unpack["Form.RetrieveParams"] + cls, id: str, **params: Unpack["FormRetrieveParams"] ) -> "Form": """ Retrieves the details of a tax form that has previously been created. Supply the unique tax form ID that was returned from your previous request, and Stripe will return the corresponding tax form information. diff --git a/stripe/tax/_form_service.py b/stripe/tax/_form_service.py index 524e30b89..d16652762 100644 --- a/stripe/tax/_form_service.py +++ b/stripe/tax/_form_service.py @@ -5,77 +5,19 @@ from stripe._stripe_service import StripeService from stripe._util import sanitize_id from stripe.tax._form import Form -from typing import Any, List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Any, Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params.tax._form_list_params import FormListParams + from stripe.params.tax._form_pdf_params import FormPdfParams + from stripe.params.tax._form_retrieve_params import FormRetrieveParams -class FormService(StripeService): - class ListParams(TypedDict): - 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. - """ - payee: "FormService.ListParamsPayee" - """ - The payee whose volume is represented on the tax form. - """ - 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. - """ - type: NotRequired[ - Literal[ - "au_serr", - "ca_mrdp", - "eu_dac7", - "gb_mrdp", - "nz_mrdp", - "us_1099_k", - "us_1099_misc", - "us_1099_nec", - ] - ] - """ - An optional filter on the list, based on the object `type` field. Without the filter, the list includes all current and future tax form types. If your integration expects only one type of tax form in the response, make sure to provide a type value in the request. - """ - - class ListParamsPayee(TypedDict): - account: NotRequired[str] - """ - The ID of the Stripe account whose forms will be retrieved. - """ - external_reference: NotRequired[str] - """ - The external reference to the payee whose forms will be retrieved. - """ - type: NotRequired[Literal["account", "external_reference"]] - """ - Specifies the payee type. Either `account` or `external_reference`. - """ - - class PdfParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class RetrieveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ +class FormService(StripeService): def list( self, - params: "FormService.ListParams", + params: "FormListParams", options: Optional[RequestOptions] = None, ) -> ListObject[Form]: """ @@ -94,7 +36,7 @@ def list( async def list_async( self, - params: "FormService.ListParams", + params: "FormListParams", options: Optional[RequestOptions] = None, ) -> ListObject[Form]: """ @@ -114,7 +56,7 @@ async def list_async( def retrieve( self, id: str, - params: Optional["FormService.RetrieveParams"] = None, + params: Optional["FormRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Form: """ @@ -134,7 +76,7 @@ def retrieve( async def retrieve_async( self, id: str, - params: Optional["FormService.RetrieveParams"] = None, + params: Optional["FormRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Form: """ @@ -154,7 +96,7 @@ async def retrieve_async( def pdf( self, id: str, - params: Optional["FormService.PdfParams"] = None, + params: Optional["FormPdfParams"] = None, options: Optional[RequestOptions] = None, ) -> Any: """ @@ -174,7 +116,7 @@ def pdf( async def pdf_async( self, id: str, - params: Optional["FormService.PdfParams"] = None, + params: Optional["FormPdfParams"] = None, options: Optional[RequestOptions] = None, ) -> Any: """ diff --git a/stripe/tax/_registration.py b/stripe/tax/_registration.py index 5d57edf20..f4a56e526 100644 --- a/stripe/tax/_registration.py +++ b/stripe/tax/_registration.py @@ -3,12 +3,25 @@ from stripe._createable_api_resource import CreateableAPIResource from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource -from stripe._request_options import RequestOptions from stripe._stripe_object import StripeObject from stripe._updateable_api_resource import UpdateableAPIResource from stripe._util import sanitize_id -from typing import ClassVar, List, Optional, Union, cast -from typing_extensions import Literal, NotRequired, TypedDict, Unpack +from typing import ClassVar, List, Optional, cast +from typing_extensions import Literal, Unpack, TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params.tax._registration_create_params import ( + RegistrationCreateParams, + ) + from stripe.params.tax._registration_list_params import ( + RegistrationListParams, + ) + from stripe.params.tax._registration_modify_params import ( + RegistrationModifyParams, + ) + from stripe.params.tax._registration_retrieve_params import ( + RegistrationRetrieveParams, + ) class Registration( @@ -1216,1934 +1229,6 @@ class Zw(StripeObject): } _field_remappings = {"in_": "in", "is_": "is"} - class CreateParams(RequestOptions): - active_from: Union[Literal["now"], int] - """ - Time at which the Tax Registration becomes active. It can be either `now` to indicate the current time, or a future timestamp measured in seconds since the Unix epoch. - """ - country: str - """ - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - """ - country_options: "Registration.CreateParamsCountryOptions" - """ - Specific options for a registration in the specified `country`. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - expires_at: NotRequired[int] - """ - If set, the Tax Registration stops being active at this time. If not set, the Tax Registration will be active indefinitely. Timestamp measured in seconds since the Unix epoch. - """ - - _CreateParamsCountryOptionsBase = TypedDict( - "CreateParamsCountryOptions", - { - "in": NotRequired["Registration.CreateParamsCountryOptionsIn"], - "is": NotRequired["Registration.CreateParamsCountryOptionsIs"], - }, - ) - - class CreateParamsCountryOptions(_CreateParamsCountryOptionsBase): - ae: NotRequired["Registration.CreateParamsCountryOptionsAe"] - """ - Options for the registration in AE. - """ - al: NotRequired["Registration.CreateParamsCountryOptionsAl"] - """ - Options for the registration in AL. - """ - am: NotRequired["Registration.CreateParamsCountryOptionsAm"] - """ - Options for the registration in AM. - """ - ao: NotRequired["Registration.CreateParamsCountryOptionsAo"] - """ - Options for the registration in AO. - """ - at: NotRequired["Registration.CreateParamsCountryOptionsAt"] - """ - Options for the registration in AT. - """ - au: NotRequired["Registration.CreateParamsCountryOptionsAu"] - """ - Options for the registration in AU. - """ - aw: NotRequired["Registration.CreateParamsCountryOptionsAw"] - """ - Options for the registration in AW. - """ - az: NotRequired["Registration.CreateParamsCountryOptionsAz"] - """ - Options for the registration in AZ. - """ - ba: NotRequired["Registration.CreateParamsCountryOptionsBa"] - """ - Options for the registration in BA. - """ - bb: NotRequired["Registration.CreateParamsCountryOptionsBb"] - """ - Options for the registration in BB. - """ - bd: NotRequired["Registration.CreateParamsCountryOptionsBd"] - """ - Options for the registration in BD. - """ - be: NotRequired["Registration.CreateParamsCountryOptionsBe"] - """ - Options for the registration in BE. - """ - bf: NotRequired["Registration.CreateParamsCountryOptionsBf"] - """ - Options for the registration in BF. - """ - bg: NotRequired["Registration.CreateParamsCountryOptionsBg"] - """ - Options for the registration in BG. - """ - bh: NotRequired["Registration.CreateParamsCountryOptionsBh"] - """ - Options for the registration in BH. - """ - bj: NotRequired["Registration.CreateParamsCountryOptionsBj"] - """ - Options for the registration in BJ. - """ - bs: NotRequired["Registration.CreateParamsCountryOptionsBs"] - """ - Options for the registration in BS. - """ - by: NotRequired["Registration.CreateParamsCountryOptionsBy"] - """ - Options for the registration in BY. - """ - ca: NotRequired["Registration.CreateParamsCountryOptionsCa"] - """ - Options for the registration in CA. - """ - cd: NotRequired["Registration.CreateParamsCountryOptionsCd"] - """ - Options for the registration in CD. - """ - ch: NotRequired["Registration.CreateParamsCountryOptionsCh"] - """ - Options for the registration in CH. - """ - cl: NotRequired["Registration.CreateParamsCountryOptionsCl"] - """ - Options for the registration in CL. - """ - cm: NotRequired["Registration.CreateParamsCountryOptionsCm"] - """ - Options for the registration in CM. - """ - co: NotRequired["Registration.CreateParamsCountryOptionsCo"] - """ - Options for the registration in CO. - """ - cr: NotRequired["Registration.CreateParamsCountryOptionsCr"] - """ - Options for the registration in CR. - """ - cv: NotRequired["Registration.CreateParamsCountryOptionsCv"] - """ - Options for the registration in CV. - """ - cy: NotRequired["Registration.CreateParamsCountryOptionsCy"] - """ - Options for the registration in CY. - """ - cz: NotRequired["Registration.CreateParamsCountryOptionsCz"] - """ - Options for the registration in CZ. - """ - de: NotRequired["Registration.CreateParamsCountryOptionsDe"] - """ - Options for the registration in DE. - """ - dk: NotRequired["Registration.CreateParamsCountryOptionsDk"] - """ - Options for the registration in DK. - """ - ec: NotRequired["Registration.CreateParamsCountryOptionsEc"] - """ - Options for the registration in EC. - """ - ee: NotRequired["Registration.CreateParamsCountryOptionsEe"] - """ - Options for the registration in EE. - """ - eg: NotRequired["Registration.CreateParamsCountryOptionsEg"] - """ - Options for the registration in EG. - """ - es: NotRequired["Registration.CreateParamsCountryOptionsEs"] - """ - Options for the registration in ES. - """ - et: NotRequired["Registration.CreateParamsCountryOptionsEt"] - """ - Options for the registration in ET. - """ - fi: NotRequired["Registration.CreateParamsCountryOptionsFi"] - """ - Options for the registration in FI. - """ - fr: NotRequired["Registration.CreateParamsCountryOptionsFr"] - """ - Options for the registration in FR. - """ - gb: NotRequired["Registration.CreateParamsCountryOptionsGb"] - """ - Options for the registration in GB. - """ - ge: NotRequired["Registration.CreateParamsCountryOptionsGe"] - """ - Options for the registration in GE. - """ - gn: NotRequired["Registration.CreateParamsCountryOptionsGn"] - """ - Options for the registration in GN. - """ - gr: NotRequired["Registration.CreateParamsCountryOptionsGr"] - """ - Options for the registration in GR. - """ - hr: NotRequired["Registration.CreateParamsCountryOptionsHr"] - """ - Options for the registration in HR. - """ - hu: NotRequired["Registration.CreateParamsCountryOptionsHu"] - """ - Options for the registration in HU. - """ - id: NotRequired["Registration.CreateParamsCountryOptionsId"] - """ - Options for the registration in ID. - """ - ie: NotRequired["Registration.CreateParamsCountryOptionsIe"] - """ - Options for the registration in IE. - """ - it: NotRequired["Registration.CreateParamsCountryOptionsIt"] - """ - Options for the registration in IT. - """ - jp: NotRequired["Registration.CreateParamsCountryOptionsJp"] - """ - Options for the registration in JP. - """ - ke: NotRequired["Registration.CreateParamsCountryOptionsKe"] - """ - Options for the registration in KE. - """ - kg: NotRequired["Registration.CreateParamsCountryOptionsKg"] - """ - Options for the registration in KG. - """ - kh: NotRequired["Registration.CreateParamsCountryOptionsKh"] - """ - Options for the registration in KH. - """ - kr: NotRequired["Registration.CreateParamsCountryOptionsKr"] - """ - Options for the registration in KR. - """ - kz: NotRequired["Registration.CreateParamsCountryOptionsKz"] - """ - Options for the registration in KZ. - """ - la: NotRequired["Registration.CreateParamsCountryOptionsLa"] - """ - Options for the registration in LA. - """ - lt: NotRequired["Registration.CreateParamsCountryOptionsLt"] - """ - Options for the registration in LT. - """ - lu: NotRequired["Registration.CreateParamsCountryOptionsLu"] - """ - Options for the registration in LU. - """ - lv: NotRequired["Registration.CreateParamsCountryOptionsLv"] - """ - Options for the registration in LV. - """ - ma: NotRequired["Registration.CreateParamsCountryOptionsMa"] - """ - Options for the registration in MA. - """ - md: NotRequired["Registration.CreateParamsCountryOptionsMd"] - """ - Options for the registration in MD. - """ - me: NotRequired["Registration.CreateParamsCountryOptionsMe"] - """ - Options for the registration in ME. - """ - mk: NotRequired["Registration.CreateParamsCountryOptionsMk"] - """ - Options for the registration in MK. - """ - mr: NotRequired["Registration.CreateParamsCountryOptionsMr"] - """ - Options for the registration in MR. - """ - mt: NotRequired["Registration.CreateParamsCountryOptionsMt"] - """ - Options for the registration in MT. - """ - mx: NotRequired["Registration.CreateParamsCountryOptionsMx"] - """ - Options for the registration in MX. - """ - my: NotRequired["Registration.CreateParamsCountryOptionsMy"] - """ - Options for the registration in MY. - """ - ng: NotRequired["Registration.CreateParamsCountryOptionsNg"] - """ - Options for the registration in NG. - """ - nl: NotRequired["Registration.CreateParamsCountryOptionsNl"] - """ - Options for the registration in NL. - """ - no: NotRequired["Registration.CreateParamsCountryOptionsNo"] - """ - Options for the registration in NO. - """ - np: NotRequired["Registration.CreateParamsCountryOptionsNp"] - """ - Options for the registration in NP. - """ - nz: NotRequired["Registration.CreateParamsCountryOptionsNz"] - """ - Options for the registration in NZ. - """ - om: NotRequired["Registration.CreateParamsCountryOptionsOm"] - """ - Options for the registration in OM. - """ - pe: NotRequired["Registration.CreateParamsCountryOptionsPe"] - """ - Options for the registration in PE. - """ - ph: NotRequired["Registration.CreateParamsCountryOptionsPh"] - """ - Options for the registration in PH. - """ - pl: NotRequired["Registration.CreateParamsCountryOptionsPl"] - """ - Options for the registration in PL. - """ - pt: NotRequired["Registration.CreateParamsCountryOptionsPt"] - """ - Options for the registration in PT. - """ - ro: NotRequired["Registration.CreateParamsCountryOptionsRo"] - """ - Options for the registration in RO. - """ - rs: NotRequired["Registration.CreateParamsCountryOptionsRs"] - """ - Options for the registration in RS. - """ - ru: NotRequired["Registration.CreateParamsCountryOptionsRu"] - """ - Options for the registration in RU. - """ - sa: NotRequired["Registration.CreateParamsCountryOptionsSa"] - """ - Options for the registration in SA. - """ - se: NotRequired["Registration.CreateParamsCountryOptionsSe"] - """ - Options for the registration in SE. - """ - sg: NotRequired["Registration.CreateParamsCountryOptionsSg"] - """ - Options for the registration in SG. - """ - si: NotRequired["Registration.CreateParamsCountryOptionsSi"] - """ - Options for the registration in SI. - """ - sk: NotRequired["Registration.CreateParamsCountryOptionsSk"] - """ - Options for the registration in SK. - """ - sn: NotRequired["Registration.CreateParamsCountryOptionsSn"] - """ - Options for the registration in SN. - """ - sr: NotRequired["Registration.CreateParamsCountryOptionsSr"] - """ - Options for the registration in SR. - """ - th: NotRequired["Registration.CreateParamsCountryOptionsTh"] - """ - Options for the registration in TH. - """ - tj: NotRequired["Registration.CreateParamsCountryOptionsTj"] - """ - Options for the registration in TJ. - """ - tr: NotRequired["Registration.CreateParamsCountryOptionsTr"] - """ - Options for the registration in TR. - """ - tz: NotRequired["Registration.CreateParamsCountryOptionsTz"] - """ - Options for the registration in TZ. - """ - ua: NotRequired["Registration.CreateParamsCountryOptionsUa"] - """ - Options for the registration in UA. - """ - ug: NotRequired["Registration.CreateParamsCountryOptionsUg"] - """ - Options for the registration in UG. - """ - us: NotRequired["Registration.CreateParamsCountryOptionsUs"] - """ - Options for the registration in US. - """ - uy: NotRequired["Registration.CreateParamsCountryOptionsUy"] - """ - Options for the registration in UY. - """ - uz: NotRequired["Registration.CreateParamsCountryOptionsUz"] - """ - Options for the registration in UZ. - """ - vn: NotRequired["Registration.CreateParamsCountryOptionsVn"] - """ - Options for the registration in VN. - """ - za: NotRequired["Registration.CreateParamsCountryOptionsZa"] - """ - Options for the registration in ZA. - """ - zm: NotRequired["Registration.CreateParamsCountryOptionsZm"] - """ - Options for the registration in ZM. - """ - zw: NotRequired["Registration.CreateParamsCountryOptionsZw"] - """ - Options for the registration in ZW. - """ - - class CreateParamsCountryOptionsAe(TypedDict): - standard: NotRequired[ - "Registration.CreateParamsCountryOptionsAeStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["standard"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsAeStandard(TypedDict): - place_of_supply_scheme: NotRequired[ - Literal["inbound_goods", "standard"] - ] - """ - Place of supply scheme used in an standard registration. - """ - - class CreateParamsCountryOptionsAl(TypedDict): - standard: NotRequired[ - "Registration.CreateParamsCountryOptionsAlStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["standard"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsAlStandard(TypedDict): - place_of_supply_scheme: NotRequired[ - Literal["inbound_goods", "standard"] - ] - """ - Place of supply scheme used in an standard registration. - """ - - class CreateParamsCountryOptionsAm(TypedDict): - type: Literal["simplified"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsAo(TypedDict): - standard: NotRequired[ - "Registration.CreateParamsCountryOptionsAoStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["standard"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsAoStandard(TypedDict): - place_of_supply_scheme: NotRequired[ - Literal["inbound_goods", "standard"] - ] - """ - Place of supply scheme used in an standard registration. - """ - - class CreateParamsCountryOptionsAt(TypedDict): - standard: NotRequired[ - "Registration.CreateParamsCountryOptionsAtStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] - """ - Type of registration to be created in an EU country. - """ - - class CreateParamsCountryOptionsAtStandard(TypedDict): - place_of_supply_scheme: Literal[ - "inbound_goods", "small_seller", "standard" - ] - """ - Place of supply scheme used in an EU standard registration. - """ - - class CreateParamsCountryOptionsAu(TypedDict): - standard: NotRequired[ - "Registration.CreateParamsCountryOptionsAuStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["standard"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsAuStandard(TypedDict): - place_of_supply_scheme: NotRequired[ - Literal["inbound_goods", "standard"] - ] - """ - Place of supply scheme used in an standard registration. - """ - - class CreateParamsCountryOptionsAw(TypedDict): - standard: NotRequired[ - "Registration.CreateParamsCountryOptionsAwStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["standard"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsAwStandard(TypedDict): - place_of_supply_scheme: NotRequired[ - Literal["inbound_goods", "standard"] - ] - """ - Place of supply scheme used in an standard registration. - """ - - class CreateParamsCountryOptionsAz(TypedDict): - type: Literal["simplified"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsBa(TypedDict): - standard: NotRequired[ - "Registration.CreateParamsCountryOptionsBaStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["standard"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsBaStandard(TypedDict): - place_of_supply_scheme: NotRequired[ - Literal["inbound_goods", "standard"] - ] - """ - Place of supply scheme used in an standard registration. - """ - - class CreateParamsCountryOptionsBb(TypedDict): - standard: NotRequired[ - "Registration.CreateParamsCountryOptionsBbStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["standard"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsBbStandard(TypedDict): - place_of_supply_scheme: NotRequired[ - Literal["inbound_goods", "standard"] - ] - """ - Place of supply scheme used in an standard registration. - """ - - class CreateParamsCountryOptionsBd(TypedDict): - standard: NotRequired[ - "Registration.CreateParamsCountryOptionsBdStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["standard"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsBdStandard(TypedDict): - place_of_supply_scheme: NotRequired[ - Literal["inbound_goods", "standard"] - ] - """ - Place of supply scheme used in an standard registration. - """ - - class CreateParamsCountryOptionsBe(TypedDict): - standard: NotRequired[ - "Registration.CreateParamsCountryOptionsBeStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] - """ - Type of registration to be created in an EU country. - """ - - class CreateParamsCountryOptionsBeStandard(TypedDict): - place_of_supply_scheme: Literal[ - "inbound_goods", "small_seller", "standard" - ] - """ - Place of supply scheme used in an EU standard registration. - """ - - class CreateParamsCountryOptionsBf(TypedDict): - standard: NotRequired[ - "Registration.CreateParamsCountryOptionsBfStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["standard"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsBfStandard(TypedDict): - place_of_supply_scheme: NotRequired[ - Literal["inbound_goods", "standard"] - ] - """ - Place of supply scheme used in an standard registration. - """ - - class CreateParamsCountryOptionsBg(TypedDict): - standard: NotRequired[ - "Registration.CreateParamsCountryOptionsBgStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] - """ - Type of registration to be created in an EU country. - """ - - class CreateParamsCountryOptionsBgStandard(TypedDict): - place_of_supply_scheme: Literal[ - "inbound_goods", "small_seller", "standard" - ] - """ - Place of supply scheme used in an EU standard registration. - """ - - class CreateParamsCountryOptionsBh(TypedDict): - standard: NotRequired[ - "Registration.CreateParamsCountryOptionsBhStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["standard"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsBhStandard(TypedDict): - place_of_supply_scheme: NotRequired[ - Literal["inbound_goods", "standard"] - ] - """ - Place of supply scheme used in an standard registration. - """ - - class CreateParamsCountryOptionsBj(TypedDict): - type: Literal["simplified"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsBs(TypedDict): - standard: NotRequired[ - "Registration.CreateParamsCountryOptionsBsStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["standard"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsBsStandard(TypedDict): - place_of_supply_scheme: NotRequired[ - Literal["inbound_goods", "standard"] - ] - """ - Place of supply scheme used in an standard registration. - """ - - class CreateParamsCountryOptionsBy(TypedDict): - type: Literal["simplified"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsCa(TypedDict): - province_standard: NotRequired[ - "Registration.CreateParamsCountryOptionsCaProvinceStandard" - ] - """ - Options for the provincial tax registration. - """ - type: Literal["province_standard", "simplified", "standard"] - """ - Type of registration to be created in Canada. - """ - - class CreateParamsCountryOptionsCaProvinceStandard(TypedDict): - province: str - """ - Two-letter CA province code ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)). - """ - - class CreateParamsCountryOptionsCd(TypedDict): - standard: NotRequired[ - "Registration.CreateParamsCountryOptionsCdStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["standard"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsCdStandard(TypedDict): - place_of_supply_scheme: NotRequired[ - Literal["inbound_goods", "standard"] - ] - """ - Place of supply scheme used in an standard registration. - """ - - class CreateParamsCountryOptionsCh(TypedDict): - standard: NotRequired[ - "Registration.CreateParamsCountryOptionsChStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["standard"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsChStandard(TypedDict): - place_of_supply_scheme: NotRequired[ - Literal["inbound_goods", "standard"] - ] - """ - Place of supply scheme used in an standard registration. - """ - - class CreateParamsCountryOptionsCl(TypedDict): - type: Literal["simplified"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsCm(TypedDict): - type: Literal["simplified"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsCo(TypedDict): - type: Literal["simplified"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsCr(TypedDict): - type: Literal["simplified"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsCv(TypedDict): - type: Literal["simplified"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsCy(TypedDict): - standard: NotRequired[ - "Registration.CreateParamsCountryOptionsCyStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] - """ - Type of registration to be created in an EU country. - """ - - class CreateParamsCountryOptionsCyStandard(TypedDict): - place_of_supply_scheme: Literal[ - "inbound_goods", "small_seller", "standard" - ] - """ - Place of supply scheme used in an EU standard registration. - """ - - class CreateParamsCountryOptionsCz(TypedDict): - standard: NotRequired[ - "Registration.CreateParamsCountryOptionsCzStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] - """ - Type of registration to be created in an EU country. - """ - - class CreateParamsCountryOptionsCzStandard(TypedDict): - place_of_supply_scheme: Literal[ - "inbound_goods", "small_seller", "standard" - ] - """ - Place of supply scheme used in an EU standard registration. - """ - - class CreateParamsCountryOptionsDe(TypedDict): - standard: NotRequired[ - "Registration.CreateParamsCountryOptionsDeStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] - """ - Type of registration to be created in an EU country. - """ - - class CreateParamsCountryOptionsDeStandard(TypedDict): - place_of_supply_scheme: Literal[ - "inbound_goods", "small_seller", "standard" - ] - """ - Place of supply scheme used in an EU standard registration. - """ - - class CreateParamsCountryOptionsDk(TypedDict): - standard: NotRequired[ - "Registration.CreateParamsCountryOptionsDkStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] - """ - Type of registration to be created in an EU country. - """ - - class CreateParamsCountryOptionsDkStandard(TypedDict): - place_of_supply_scheme: Literal[ - "inbound_goods", "small_seller", "standard" - ] - """ - Place of supply scheme used in an EU standard registration. - """ - - class CreateParamsCountryOptionsEc(TypedDict): - type: Literal["simplified"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsEe(TypedDict): - standard: NotRequired[ - "Registration.CreateParamsCountryOptionsEeStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] - """ - Type of registration to be created in an EU country. - """ - - class CreateParamsCountryOptionsEeStandard(TypedDict): - place_of_supply_scheme: Literal[ - "inbound_goods", "small_seller", "standard" - ] - """ - Place of supply scheme used in an EU standard registration. - """ - - class CreateParamsCountryOptionsEg(TypedDict): - type: Literal["simplified"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsEs(TypedDict): - standard: NotRequired[ - "Registration.CreateParamsCountryOptionsEsStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] - """ - Type of registration to be created in an EU country. - """ - - class CreateParamsCountryOptionsEsStandard(TypedDict): - place_of_supply_scheme: Literal[ - "inbound_goods", "small_seller", "standard" - ] - """ - Place of supply scheme used in an EU standard registration. - """ - - class CreateParamsCountryOptionsEt(TypedDict): - standard: NotRequired[ - "Registration.CreateParamsCountryOptionsEtStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["standard"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsEtStandard(TypedDict): - place_of_supply_scheme: NotRequired[ - Literal["inbound_goods", "standard"] - ] - """ - Place of supply scheme used in an standard registration. - """ - - class CreateParamsCountryOptionsFi(TypedDict): - standard: NotRequired[ - "Registration.CreateParamsCountryOptionsFiStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] - """ - Type of registration to be created in an EU country. - """ - - class CreateParamsCountryOptionsFiStandard(TypedDict): - place_of_supply_scheme: Literal[ - "inbound_goods", "small_seller", "standard" - ] - """ - Place of supply scheme used in an EU standard registration. - """ - - class CreateParamsCountryOptionsFr(TypedDict): - standard: NotRequired[ - "Registration.CreateParamsCountryOptionsFrStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] - """ - Type of registration to be created in an EU country. - """ - - class CreateParamsCountryOptionsFrStandard(TypedDict): - place_of_supply_scheme: Literal[ - "inbound_goods", "small_seller", "standard" - ] - """ - Place of supply scheme used in an EU standard registration. - """ - - class CreateParamsCountryOptionsGb(TypedDict): - standard: NotRequired[ - "Registration.CreateParamsCountryOptionsGbStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["standard"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsGbStandard(TypedDict): - place_of_supply_scheme: NotRequired[ - Literal["inbound_goods", "standard"] - ] - """ - Place of supply scheme used in an standard registration. - """ - - class CreateParamsCountryOptionsGe(TypedDict): - type: Literal["simplified"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsGn(TypedDict): - standard: NotRequired[ - "Registration.CreateParamsCountryOptionsGnStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["standard"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsGnStandard(TypedDict): - place_of_supply_scheme: NotRequired[ - Literal["inbound_goods", "standard"] - ] - """ - Place of supply scheme used in an standard registration. - """ - - class CreateParamsCountryOptionsGr(TypedDict): - standard: NotRequired[ - "Registration.CreateParamsCountryOptionsGrStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] - """ - Type of registration to be created in an EU country. - """ - - class CreateParamsCountryOptionsGrStandard(TypedDict): - place_of_supply_scheme: Literal[ - "inbound_goods", "small_seller", "standard" - ] - """ - Place of supply scheme used in an EU standard registration. - """ - - class CreateParamsCountryOptionsHr(TypedDict): - standard: NotRequired[ - "Registration.CreateParamsCountryOptionsHrStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] - """ - Type of registration to be created in an EU country. - """ - - class CreateParamsCountryOptionsHrStandard(TypedDict): - place_of_supply_scheme: Literal[ - "inbound_goods", "small_seller", "standard" - ] - """ - Place of supply scheme used in an EU standard registration. - """ - - class CreateParamsCountryOptionsHu(TypedDict): - standard: NotRequired[ - "Registration.CreateParamsCountryOptionsHuStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] - """ - Type of registration to be created in an EU country. - """ - - class CreateParamsCountryOptionsHuStandard(TypedDict): - place_of_supply_scheme: Literal[ - "inbound_goods", "small_seller", "standard" - ] - """ - Place of supply scheme used in an EU standard registration. - """ - - class CreateParamsCountryOptionsId(TypedDict): - type: Literal["simplified"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsIe(TypedDict): - standard: NotRequired[ - "Registration.CreateParamsCountryOptionsIeStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] - """ - Type of registration to be created in an EU country. - """ - - class CreateParamsCountryOptionsIeStandard(TypedDict): - place_of_supply_scheme: Literal[ - "inbound_goods", "small_seller", "standard" - ] - """ - Place of supply scheme used in an EU standard registration. - """ - - class CreateParamsCountryOptionsIn(TypedDict): - type: Literal["simplified"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsIs(TypedDict): - standard: NotRequired[ - "Registration.CreateParamsCountryOptionsIsStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["standard"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsIsStandard(TypedDict): - place_of_supply_scheme: NotRequired[ - Literal["inbound_goods", "standard"] - ] - """ - Place of supply scheme used in an standard registration. - """ - - class CreateParamsCountryOptionsIt(TypedDict): - standard: NotRequired[ - "Registration.CreateParamsCountryOptionsItStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] - """ - Type of registration to be created in an EU country. - """ - - class CreateParamsCountryOptionsItStandard(TypedDict): - place_of_supply_scheme: Literal[ - "inbound_goods", "small_seller", "standard" - ] - """ - Place of supply scheme used in an EU standard registration. - """ - - class CreateParamsCountryOptionsJp(TypedDict): - standard: NotRequired[ - "Registration.CreateParamsCountryOptionsJpStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["standard"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsJpStandard(TypedDict): - place_of_supply_scheme: NotRequired[ - Literal["inbound_goods", "standard"] - ] - """ - Place of supply scheme used in an standard registration. - """ - - class CreateParamsCountryOptionsKe(TypedDict): - type: Literal["simplified"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsKg(TypedDict): - type: Literal["simplified"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsKh(TypedDict): - type: Literal["simplified"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsKr(TypedDict): - type: Literal["simplified"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsKz(TypedDict): - type: Literal["simplified"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsLa(TypedDict): - type: Literal["simplified"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsLt(TypedDict): - standard: NotRequired[ - "Registration.CreateParamsCountryOptionsLtStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] - """ - Type of registration to be created in an EU country. - """ - - class CreateParamsCountryOptionsLtStandard(TypedDict): - place_of_supply_scheme: Literal[ - "inbound_goods", "small_seller", "standard" - ] - """ - Place of supply scheme used in an EU standard registration. - """ - - class CreateParamsCountryOptionsLu(TypedDict): - standard: NotRequired[ - "Registration.CreateParamsCountryOptionsLuStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] - """ - Type of registration to be created in an EU country. - """ - - class CreateParamsCountryOptionsLuStandard(TypedDict): - place_of_supply_scheme: Literal[ - "inbound_goods", "small_seller", "standard" - ] - """ - Place of supply scheme used in an EU standard registration. - """ - - class CreateParamsCountryOptionsLv(TypedDict): - standard: NotRequired[ - "Registration.CreateParamsCountryOptionsLvStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] - """ - Type of registration to be created in an EU country. - """ - - class CreateParamsCountryOptionsLvStandard(TypedDict): - place_of_supply_scheme: Literal[ - "inbound_goods", "small_seller", "standard" - ] - """ - Place of supply scheme used in an EU standard registration. - """ - - class CreateParamsCountryOptionsMa(TypedDict): - type: Literal["simplified"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsMd(TypedDict): - type: Literal["simplified"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsMe(TypedDict): - standard: NotRequired[ - "Registration.CreateParamsCountryOptionsMeStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["standard"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsMeStandard(TypedDict): - place_of_supply_scheme: NotRequired[ - Literal["inbound_goods", "standard"] - ] - """ - Place of supply scheme used in an standard registration. - """ - - class CreateParamsCountryOptionsMk(TypedDict): - standard: NotRequired[ - "Registration.CreateParamsCountryOptionsMkStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["standard"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsMkStandard(TypedDict): - place_of_supply_scheme: NotRequired[ - Literal["inbound_goods", "standard"] - ] - """ - Place of supply scheme used in an standard registration. - """ - - class CreateParamsCountryOptionsMr(TypedDict): - standard: NotRequired[ - "Registration.CreateParamsCountryOptionsMrStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["standard"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsMrStandard(TypedDict): - place_of_supply_scheme: NotRequired[ - Literal["inbound_goods", "standard"] - ] - """ - Place of supply scheme used in an standard registration. - """ - - class CreateParamsCountryOptionsMt(TypedDict): - standard: NotRequired[ - "Registration.CreateParamsCountryOptionsMtStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] - """ - Type of registration to be created in an EU country. - """ - - class CreateParamsCountryOptionsMtStandard(TypedDict): - place_of_supply_scheme: Literal[ - "inbound_goods", "small_seller", "standard" - ] - """ - Place of supply scheme used in an EU standard registration. - """ - - class CreateParamsCountryOptionsMx(TypedDict): - type: Literal["simplified"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsMy(TypedDict): - type: Literal["simplified"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsNg(TypedDict): - type: Literal["simplified"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsNl(TypedDict): - standard: NotRequired[ - "Registration.CreateParamsCountryOptionsNlStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] - """ - Type of registration to be created in an EU country. - """ - - class CreateParamsCountryOptionsNlStandard(TypedDict): - place_of_supply_scheme: Literal[ - "inbound_goods", "small_seller", "standard" - ] - """ - Place of supply scheme used in an EU standard registration. - """ - - class CreateParamsCountryOptionsNo(TypedDict): - standard: NotRequired[ - "Registration.CreateParamsCountryOptionsNoStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["standard"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsNoStandard(TypedDict): - place_of_supply_scheme: NotRequired[ - Literal["inbound_goods", "standard"] - ] - """ - Place of supply scheme used in an standard registration. - """ - - class CreateParamsCountryOptionsNp(TypedDict): - type: Literal["simplified"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsNz(TypedDict): - standard: NotRequired[ - "Registration.CreateParamsCountryOptionsNzStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["standard"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsNzStandard(TypedDict): - place_of_supply_scheme: NotRequired[ - Literal["inbound_goods", "standard"] - ] - """ - Place of supply scheme used in an standard registration. - """ - - class CreateParamsCountryOptionsOm(TypedDict): - standard: NotRequired[ - "Registration.CreateParamsCountryOptionsOmStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["standard"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsOmStandard(TypedDict): - place_of_supply_scheme: NotRequired[ - Literal["inbound_goods", "standard"] - ] - """ - Place of supply scheme used in an standard registration. - """ - - class CreateParamsCountryOptionsPe(TypedDict): - type: Literal["simplified"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsPh(TypedDict): - type: Literal["simplified"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsPl(TypedDict): - standard: NotRequired[ - "Registration.CreateParamsCountryOptionsPlStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] - """ - Type of registration to be created in an EU country. - """ - - class CreateParamsCountryOptionsPlStandard(TypedDict): - place_of_supply_scheme: Literal[ - "inbound_goods", "small_seller", "standard" - ] - """ - Place of supply scheme used in an EU standard registration. - """ - - class CreateParamsCountryOptionsPt(TypedDict): - standard: NotRequired[ - "Registration.CreateParamsCountryOptionsPtStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] - """ - Type of registration to be created in an EU country. - """ - - class CreateParamsCountryOptionsPtStandard(TypedDict): - place_of_supply_scheme: Literal[ - "inbound_goods", "small_seller", "standard" - ] - """ - Place of supply scheme used in an EU standard registration. - """ - - class CreateParamsCountryOptionsRo(TypedDict): - standard: NotRequired[ - "Registration.CreateParamsCountryOptionsRoStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] - """ - Type of registration to be created in an EU country. - """ - - class CreateParamsCountryOptionsRoStandard(TypedDict): - place_of_supply_scheme: Literal[ - "inbound_goods", "small_seller", "standard" - ] - """ - Place of supply scheme used in an EU standard registration. - """ - - class CreateParamsCountryOptionsRs(TypedDict): - standard: NotRequired[ - "Registration.CreateParamsCountryOptionsRsStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["standard"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsRsStandard(TypedDict): - place_of_supply_scheme: NotRequired[ - Literal["inbound_goods", "standard"] - ] - """ - Place of supply scheme used in an standard registration. - """ - - class CreateParamsCountryOptionsRu(TypedDict): - type: Literal["simplified"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsSa(TypedDict): - type: Literal["simplified"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsSe(TypedDict): - standard: NotRequired[ - "Registration.CreateParamsCountryOptionsSeStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] - """ - Type of registration to be created in an EU country. - """ - - class CreateParamsCountryOptionsSeStandard(TypedDict): - place_of_supply_scheme: Literal[ - "inbound_goods", "small_seller", "standard" - ] - """ - Place of supply scheme used in an EU standard registration. - """ - - class CreateParamsCountryOptionsSg(TypedDict): - standard: NotRequired[ - "Registration.CreateParamsCountryOptionsSgStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["standard"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsSgStandard(TypedDict): - place_of_supply_scheme: NotRequired[ - Literal["inbound_goods", "standard"] - ] - """ - Place of supply scheme used in an standard registration. - """ - - class CreateParamsCountryOptionsSi(TypedDict): - standard: NotRequired[ - "Registration.CreateParamsCountryOptionsSiStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] - """ - Type of registration to be created in an EU country. - """ - - class CreateParamsCountryOptionsSiStandard(TypedDict): - place_of_supply_scheme: Literal[ - "inbound_goods", "small_seller", "standard" - ] - """ - Place of supply scheme used in an EU standard registration. - """ - - class CreateParamsCountryOptionsSk(TypedDict): - standard: NotRequired[ - "Registration.CreateParamsCountryOptionsSkStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] - """ - Type of registration to be created in an EU country. - """ - - class CreateParamsCountryOptionsSkStandard(TypedDict): - place_of_supply_scheme: Literal[ - "inbound_goods", "small_seller", "standard" - ] - """ - Place of supply scheme used in an EU standard registration. - """ - - class CreateParamsCountryOptionsSn(TypedDict): - type: Literal["simplified"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsSr(TypedDict): - standard: NotRequired[ - "Registration.CreateParamsCountryOptionsSrStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["standard"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsSrStandard(TypedDict): - place_of_supply_scheme: NotRequired[ - Literal["inbound_goods", "standard"] - ] - """ - Place of supply scheme used in an standard registration. - """ - - class CreateParamsCountryOptionsTh(TypedDict): - type: Literal["simplified"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsTj(TypedDict): - type: Literal["simplified"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsTr(TypedDict): - type: Literal["simplified"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsTz(TypedDict): - type: Literal["simplified"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsUa(TypedDict): - type: Literal["simplified"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsUg(TypedDict): - type: Literal["simplified"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsUs(TypedDict): - local_amusement_tax: NotRequired[ - "Registration.CreateParamsCountryOptionsUsLocalAmusementTax" - ] - """ - Options for the local amusement tax registration. - """ - local_lease_tax: NotRequired[ - "Registration.CreateParamsCountryOptionsUsLocalLeaseTax" - ] - """ - Options for the local lease tax registration. - """ - state: str - """ - Two-letter US state code ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)). - """ - state_sales_tax: NotRequired[ - "Registration.CreateParamsCountryOptionsUsStateSalesTax" - ] - """ - Options for the state sales tax registration. - """ - type: Literal[ - "local_amusement_tax", - "local_lease_tax", - "state_communications_tax", - "state_retail_delivery_fee", - "state_sales_tax", - ] - """ - Type of registration to be created in the US. - """ - - class CreateParamsCountryOptionsUsLocalAmusementTax(TypedDict): - jurisdiction: str - """ - A [FIPS code](https://www.census.gov/library/reference/code-lists/ansi.html) representing the local jurisdiction. Supported FIPS codes are: `14000` (Chicago), `06613` (Bloomington), `21696` (East Dundee), `24582` (Evanston), `45421` (Lynwood), `48892` (Midlothian), `64343` (River Grove), and `68081` (Schiller Park). - """ - - class CreateParamsCountryOptionsUsLocalLeaseTax(TypedDict): - jurisdiction: str - """ - A [FIPS code](https://www.census.gov/library/reference/code-lists/ansi.html) representing the local jurisdiction. Supported FIPS codes are: `14000` (Chicago). - """ - - class CreateParamsCountryOptionsUsStateSalesTax(TypedDict): - elections: List[ - "Registration.CreateParamsCountryOptionsUsStateSalesTaxElection" - ] - """ - Elections for the state sales tax registration. - """ - - class CreateParamsCountryOptionsUsStateSalesTaxElection(TypedDict): - jurisdiction: NotRequired[str] - """ - A [FIPS code](https://www.census.gov/library/reference/code-lists/ansi.html) representing the local jurisdiction. Supported FIPS codes are: `003` (Allegheny County) and `60000` (Philadelphia City). - """ - type: Literal[ - "local_use_tax", - "simplified_sellers_use_tax", - "single_local_use_tax", - ] - """ - The type of the election for the state sales tax registration. - """ - - class CreateParamsCountryOptionsUy(TypedDict): - standard: NotRequired[ - "Registration.CreateParamsCountryOptionsUyStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["standard"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsUyStandard(TypedDict): - place_of_supply_scheme: NotRequired[ - Literal["inbound_goods", "standard"] - ] - """ - Place of supply scheme used in an standard registration. - """ - - class CreateParamsCountryOptionsUz(TypedDict): - type: Literal["simplified"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsVn(TypedDict): - type: Literal["simplified"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsZa(TypedDict): - standard: NotRequired[ - "Registration.CreateParamsCountryOptionsZaStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["standard"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsZaStandard(TypedDict): - place_of_supply_scheme: NotRequired[ - Literal["inbound_goods", "standard"] - ] - """ - Place of supply scheme used in an standard registration. - """ - - class CreateParamsCountryOptionsZm(TypedDict): - type: Literal["simplified"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsZw(TypedDict): - standard: NotRequired[ - "Registration.CreateParamsCountryOptionsZwStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["standard"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsZwStandard(TypedDict): - place_of_supply_scheme: NotRequired[ - Literal["inbound_goods", "standard"] - ] - """ - Place of supply scheme used in an standard registration. - """ - - class ListParams(RequestOptions): - 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. - """ - status: NotRequired[Literal["active", "all", "expired", "scheduled"]] - """ - The status of the Tax Registration. - """ - - class ModifyParams(RequestOptions): - active_from: NotRequired["Literal['now']|int"] - """ - Time at which the registration becomes active. It can be either `now` to indicate the current time, or a timestamp measured in seconds since the Unix epoch. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - expires_at: NotRequired["Literal['']|Literal['now']|int"] - """ - If set, the registration stops being active at this time. If not set, the registration will be active indefinitely. It can be either `now` to indicate the current time, or a timestamp measured in seconds since the Unix epoch. - """ - - class RetrieveParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - active_from: int """ Time at which the registration becomes active. Measured in seconds since the Unix epoch. @@ -3180,7 +1265,7 @@ class RetrieveParams(RequestOptions): @classmethod def create( - cls, **params: Unpack["Registration.CreateParams"] + cls, **params: Unpack["RegistrationCreateParams"] ) -> "Registration": """ Creates a new Tax Registration object. @@ -3196,7 +1281,7 @@ def create( @classmethod async def create_async( - cls, **params: Unpack["Registration.CreateParams"] + cls, **params: Unpack["RegistrationCreateParams"] ) -> "Registration": """ Creates a new Tax Registration object. @@ -3212,7 +1297,7 @@ async def create_async( @classmethod def list( - cls, **params: Unpack["Registration.ListParams"] + cls, **params: Unpack["RegistrationListParams"] ) -> ListObject["Registration"]: """ Returns a list of Tax Registration objects. @@ -3232,7 +1317,7 @@ def list( @classmethod async def list_async( - cls, **params: Unpack["Registration.ListParams"] + cls, **params: Unpack["RegistrationListParams"] ) -> ListObject["Registration"]: """ Returns a list of Tax Registration objects. @@ -3252,7 +1337,7 @@ async def list_async( @classmethod def modify( - cls, id: str, **params: Unpack["Registration.ModifyParams"] + cls, id: str, **params: Unpack["RegistrationModifyParams"] ) -> "Registration": """ Updates an existing Tax Registration object. @@ -3271,7 +1356,7 @@ def modify( @classmethod async def modify_async( - cls, id: str, **params: Unpack["Registration.ModifyParams"] + cls, id: str, **params: Unpack["RegistrationModifyParams"] ) -> "Registration": """ Updates an existing Tax Registration object. @@ -3290,7 +1375,7 @@ async def modify_async( @classmethod def retrieve( - cls, id: str, **params: Unpack["Registration.RetrieveParams"] + cls, id: str, **params: Unpack["RegistrationRetrieveParams"] ) -> "Registration": """ Returns a Tax Registration object. @@ -3301,7 +1386,7 @@ def retrieve( @classmethod async def retrieve_async( - cls, id: str, **params: Unpack["Registration.RetrieveParams"] + cls, id: str, **params: Unpack["RegistrationRetrieveParams"] ) -> "Registration": """ Returns a Tax Registration object. diff --git a/stripe/tax/_registration_service.py b/stripe/tax/_registration_service.py index 1dee2416b..88367ceb4 100644 --- a/stripe/tax/_registration_service.py +++ b/stripe/tax/_registration_service.py @@ -5,1946 +5,28 @@ from stripe._stripe_service import StripeService from stripe._util import sanitize_id from stripe.tax._registration import Registration -from typing import List, Optional, Union, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING - -class RegistrationService(StripeService): - class CreateParams(TypedDict): - active_from: Union[Literal["now"], int] - """ - Time at which the Tax Registration becomes active. It can be either `now` to indicate the current time, or a future timestamp measured in seconds since the Unix epoch. - """ - country: str - """ - Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - """ - country_options: "RegistrationService.CreateParamsCountryOptions" - """ - Specific options for a registration in the specified `country`. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - expires_at: NotRequired[int] - """ - If set, the Tax Registration stops being active at this time. If not set, the Tax Registration will be active indefinitely. Timestamp measured in seconds since the Unix epoch. - """ - - _CreateParamsCountryOptionsBase = TypedDict( - "CreateParamsCountryOptions", - { - "in": NotRequired[ - "RegistrationService.CreateParamsCountryOptionsIn" - ], - "is": NotRequired[ - "RegistrationService.CreateParamsCountryOptionsIs" - ], - }, +if TYPE_CHECKING: + from stripe.params.tax._registration_create_params import ( + RegistrationCreateParams, + ) + from stripe.params.tax._registration_list_params import ( + RegistrationListParams, + ) + from stripe.params.tax._registration_retrieve_params import ( + RegistrationRetrieveParams, + ) + from stripe.params.tax._registration_update_params import ( + RegistrationUpdateParams, ) - class CreateParamsCountryOptions(_CreateParamsCountryOptionsBase): - ae: NotRequired["RegistrationService.CreateParamsCountryOptionsAe"] - """ - Options for the registration in AE. - """ - al: NotRequired["RegistrationService.CreateParamsCountryOptionsAl"] - """ - Options for the registration in AL. - """ - am: NotRequired["RegistrationService.CreateParamsCountryOptionsAm"] - """ - Options for the registration in AM. - """ - ao: NotRequired["RegistrationService.CreateParamsCountryOptionsAo"] - """ - Options for the registration in AO. - """ - at: NotRequired["RegistrationService.CreateParamsCountryOptionsAt"] - """ - Options for the registration in AT. - """ - au: NotRequired["RegistrationService.CreateParamsCountryOptionsAu"] - """ - Options for the registration in AU. - """ - aw: NotRequired["RegistrationService.CreateParamsCountryOptionsAw"] - """ - Options for the registration in AW. - """ - az: NotRequired["RegistrationService.CreateParamsCountryOptionsAz"] - """ - Options for the registration in AZ. - """ - ba: NotRequired["RegistrationService.CreateParamsCountryOptionsBa"] - """ - Options for the registration in BA. - """ - bb: NotRequired["RegistrationService.CreateParamsCountryOptionsBb"] - """ - Options for the registration in BB. - """ - bd: NotRequired["RegistrationService.CreateParamsCountryOptionsBd"] - """ - Options for the registration in BD. - """ - be: NotRequired["RegistrationService.CreateParamsCountryOptionsBe"] - """ - Options for the registration in BE. - """ - bf: NotRequired["RegistrationService.CreateParamsCountryOptionsBf"] - """ - Options for the registration in BF. - """ - bg: NotRequired["RegistrationService.CreateParamsCountryOptionsBg"] - """ - Options for the registration in BG. - """ - bh: NotRequired["RegistrationService.CreateParamsCountryOptionsBh"] - """ - Options for the registration in BH. - """ - bj: NotRequired["RegistrationService.CreateParamsCountryOptionsBj"] - """ - Options for the registration in BJ. - """ - bs: NotRequired["RegistrationService.CreateParamsCountryOptionsBs"] - """ - Options for the registration in BS. - """ - by: NotRequired["RegistrationService.CreateParamsCountryOptionsBy"] - """ - Options for the registration in BY. - """ - ca: NotRequired["RegistrationService.CreateParamsCountryOptionsCa"] - """ - Options for the registration in CA. - """ - cd: NotRequired["RegistrationService.CreateParamsCountryOptionsCd"] - """ - Options for the registration in CD. - """ - ch: NotRequired["RegistrationService.CreateParamsCountryOptionsCh"] - """ - Options for the registration in CH. - """ - cl: NotRequired["RegistrationService.CreateParamsCountryOptionsCl"] - """ - Options for the registration in CL. - """ - cm: NotRequired["RegistrationService.CreateParamsCountryOptionsCm"] - """ - Options for the registration in CM. - """ - co: NotRequired["RegistrationService.CreateParamsCountryOptionsCo"] - """ - Options for the registration in CO. - """ - cr: NotRequired["RegistrationService.CreateParamsCountryOptionsCr"] - """ - Options for the registration in CR. - """ - cv: NotRequired["RegistrationService.CreateParamsCountryOptionsCv"] - """ - Options for the registration in CV. - """ - cy: NotRequired["RegistrationService.CreateParamsCountryOptionsCy"] - """ - Options for the registration in CY. - """ - cz: NotRequired["RegistrationService.CreateParamsCountryOptionsCz"] - """ - Options for the registration in CZ. - """ - de: NotRequired["RegistrationService.CreateParamsCountryOptionsDe"] - """ - Options for the registration in DE. - """ - dk: NotRequired["RegistrationService.CreateParamsCountryOptionsDk"] - """ - Options for the registration in DK. - """ - ec: NotRequired["RegistrationService.CreateParamsCountryOptionsEc"] - """ - Options for the registration in EC. - """ - ee: NotRequired["RegistrationService.CreateParamsCountryOptionsEe"] - """ - Options for the registration in EE. - """ - eg: NotRequired["RegistrationService.CreateParamsCountryOptionsEg"] - """ - Options for the registration in EG. - """ - es: NotRequired["RegistrationService.CreateParamsCountryOptionsEs"] - """ - Options for the registration in ES. - """ - et: NotRequired["RegistrationService.CreateParamsCountryOptionsEt"] - """ - Options for the registration in ET. - """ - fi: NotRequired["RegistrationService.CreateParamsCountryOptionsFi"] - """ - Options for the registration in FI. - """ - fr: NotRequired["RegistrationService.CreateParamsCountryOptionsFr"] - """ - Options for the registration in FR. - """ - gb: NotRequired["RegistrationService.CreateParamsCountryOptionsGb"] - """ - Options for the registration in GB. - """ - ge: NotRequired["RegistrationService.CreateParamsCountryOptionsGe"] - """ - Options for the registration in GE. - """ - gn: NotRequired["RegistrationService.CreateParamsCountryOptionsGn"] - """ - Options for the registration in GN. - """ - gr: NotRequired["RegistrationService.CreateParamsCountryOptionsGr"] - """ - Options for the registration in GR. - """ - hr: NotRequired["RegistrationService.CreateParamsCountryOptionsHr"] - """ - Options for the registration in HR. - """ - hu: NotRequired["RegistrationService.CreateParamsCountryOptionsHu"] - """ - Options for the registration in HU. - """ - id: NotRequired["RegistrationService.CreateParamsCountryOptionsId"] - """ - Options for the registration in ID. - """ - ie: NotRequired["RegistrationService.CreateParamsCountryOptionsIe"] - """ - Options for the registration in IE. - """ - it: NotRequired["RegistrationService.CreateParamsCountryOptionsIt"] - """ - Options for the registration in IT. - """ - jp: NotRequired["RegistrationService.CreateParamsCountryOptionsJp"] - """ - Options for the registration in JP. - """ - ke: NotRequired["RegistrationService.CreateParamsCountryOptionsKe"] - """ - Options for the registration in KE. - """ - kg: NotRequired["RegistrationService.CreateParamsCountryOptionsKg"] - """ - Options for the registration in KG. - """ - kh: NotRequired["RegistrationService.CreateParamsCountryOptionsKh"] - """ - Options for the registration in KH. - """ - kr: NotRequired["RegistrationService.CreateParamsCountryOptionsKr"] - """ - Options for the registration in KR. - """ - kz: NotRequired["RegistrationService.CreateParamsCountryOptionsKz"] - """ - Options for the registration in KZ. - """ - la: NotRequired["RegistrationService.CreateParamsCountryOptionsLa"] - """ - Options for the registration in LA. - """ - lt: NotRequired["RegistrationService.CreateParamsCountryOptionsLt"] - """ - Options for the registration in LT. - """ - lu: NotRequired["RegistrationService.CreateParamsCountryOptionsLu"] - """ - Options for the registration in LU. - """ - lv: NotRequired["RegistrationService.CreateParamsCountryOptionsLv"] - """ - Options for the registration in LV. - """ - ma: NotRequired["RegistrationService.CreateParamsCountryOptionsMa"] - """ - Options for the registration in MA. - """ - md: NotRequired["RegistrationService.CreateParamsCountryOptionsMd"] - """ - Options for the registration in MD. - """ - me: NotRequired["RegistrationService.CreateParamsCountryOptionsMe"] - """ - Options for the registration in ME. - """ - mk: NotRequired["RegistrationService.CreateParamsCountryOptionsMk"] - """ - Options for the registration in MK. - """ - mr: NotRequired["RegistrationService.CreateParamsCountryOptionsMr"] - """ - Options for the registration in MR. - """ - mt: NotRequired["RegistrationService.CreateParamsCountryOptionsMt"] - """ - Options for the registration in MT. - """ - mx: NotRequired["RegistrationService.CreateParamsCountryOptionsMx"] - """ - Options for the registration in MX. - """ - my: NotRequired["RegistrationService.CreateParamsCountryOptionsMy"] - """ - Options for the registration in MY. - """ - ng: NotRequired["RegistrationService.CreateParamsCountryOptionsNg"] - """ - Options for the registration in NG. - """ - nl: NotRequired["RegistrationService.CreateParamsCountryOptionsNl"] - """ - Options for the registration in NL. - """ - no: NotRequired["RegistrationService.CreateParamsCountryOptionsNo"] - """ - Options for the registration in NO. - """ - np: NotRequired["RegistrationService.CreateParamsCountryOptionsNp"] - """ - Options for the registration in NP. - """ - nz: NotRequired["RegistrationService.CreateParamsCountryOptionsNz"] - """ - Options for the registration in NZ. - """ - om: NotRequired["RegistrationService.CreateParamsCountryOptionsOm"] - """ - Options for the registration in OM. - """ - pe: NotRequired["RegistrationService.CreateParamsCountryOptionsPe"] - """ - Options for the registration in PE. - """ - ph: NotRequired["RegistrationService.CreateParamsCountryOptionsPh"] - """ - Options for the registration in PH. - """ - pl: NotRequired["RegistrationService.CreateParamsCountryOptionsPl"] - """ - Options for the registration in PL. - """ - pt: NotRequired["RegistrationService.CreateParamsCountryOptionsPt"] - """ - Options for the registration in PT. - """ - ro: NotRequired["RegistrationService.CreateParamsCountryOptionsRo"] - """ - Options for the registration in RO. - """ - rs: NotRequired["RegistrationService.CreateParamsCountryOptionsRs"] - """ - Options for the registration in RS. - """ - ru: NotRequired["RegistrationService.CreateParamsCountryOptionsRu"] - """ - Options for the registration in RU. - """ - sa: NotRequired["RegistrationService.CreateParamsCountryOptionsSa"] - """ - Options for the registration in SA. - """ - se: NotRequired["RegistrationService.CreateParamsCountryOptionsSe"] - """ - Options for the registration in SE. - """ - sg: NotRequired["RegistrationService.CreateParamsCountryOptionsSg"] - """ - Options for the registration in SG. - """ - si: NotRequired["RegistrationService.CreateParamsCountryOptionsSi"] - """ - Options for the registration in SI. - """ - sk: NotRequired["RegistrationService.CreateParamsCountryOptionsSk"] - """ - Options for the registration in SK. - """ - sn: NotRequired["RegistrationService.CreateParamsCountryOptionsSn"] - """ - Options for the registration in SN. - """ - sr: NotRequired["RegistrationService.CreateParamsCountryOptionsSr"] - """ - Options for the registration in SR. - """ - th: NotRequired["RegistrationService.CreateParamsCountryOptionsTh"] - """ - Options for the registration in TH. - """ - tj: NotRequired["RegistrationService.CreateParamsCountryOptionsTj"] - """ - Options for the registration in TJ. - """ - tr: NotRequired["RegistrationService.CreateParamsCountryOptionsTr"] - """ - Options for the registration in TR. - """ - tz: NotRequired["RegistrationService.CreateParamsCountryOptionsTz"] - """ - Options for the registration in TZ. - """ - ua: NotRequired["RegistrationService.CreateParamsCountryOptionsUa"] - """ - Options for the registration in UA. - """ - ug: NotRequired["RegistrationService.CreateParamsCountryOptionsUg"] - """ - Options for the registration in UG. - """ - us: NotRequired["RegistrationService.CreateParamsCountryOptionsUs"] - """ - Options for the registration in US. - """ - uy: NotRequired["RegistrationService.CreateParamsCountryOptionsUy"] - """ - Options for the registration in UY. - """ - uz: NotRequired["RegistrationService.CreateParamsCountryOptionsUz"] - """ - Options for the registration in UZ. - """ - vn: NotRequired["RegistrationService.CreateParamsCountryOptionsVn"] - """ - Options for the registration in VN. - """ - za: NotRequired["RegistrationService.CreateParamsCountryOptionsZa"] - """ - Options for the registration in ZA. - """ - zm: NotRequired["RegistrationService.CreateParamsCountryOptionsZm"] - """ - Options for the registration in ZM. - """ - zw: NotRequired["RegistrationService.CreateParamsCountryOptionsZw"] - """ - Options for the registration in ZW. - """ - - class CreateParamsCountryOptionsAe(TypedDict): - standard: NotRequired[ - "RegistrationService.CreateParamsCountryOptionsAeStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["standard"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsAeStandard(TypedDict): - place_of_supply_scheme: NotRequired[ - Literal["inbound_goods", "standard"] - ] - """ - Place of supply scheme used in an standard registration. - """ - - class CreateParamsCountryOptionsAl(TypedDict): - standard: NotRequired[ - "RegistrationService.CreateParamsCountryOptionsAlStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["standard"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsAlStandard(TypedDict): - place_of_supply_scheme: NotRequired[ - Literal["inbound_goods", "standard"] - ] - """ - Place of supply scheme used in an standard registration. - """ - - class CreateParamsCountryOptionsAm(TypedDict): - type: Literal["simplified"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsAo(TypedDict): - standard: NotRequired[ - "RegistrationService.CreateParamsCountryOptionsAoStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["standard"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsAoStandard(TypedDict): - place_of_supply_scheme: NotRequired[ - Literal["inbound_goods", "standard"] - ] - """ - Place of supply scheme used in an standard registration. - """ - - class CreateParamsCountryOptionsAt(TypedDict): - standard: NotRequired[ - "RegistrationService.CreateParamsCountryOptionsAtStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] - """ - Type of registration to be created in an EU country. - """ - - class CreateParamsCountryOptionsAtStandard(TypedDict): - place_of_supply_scheme: Literal[ - "inbound_goods", "small_seller", "standard" - ] - """ - Place of supply scheme used in an EU standard registration. - """ - - class CreateParamsCountryOptionsAu(TypedDict): - standard: NotRequired[ - "RegistrationService.CreateParamsCountryOptionsAuStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["standard"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsAuStandard(TypedDict): - place_of_supply_scheme: NotRequired[ - Literal["inbound_goods", "standard"] - ] - """ - Place of supply scheme used in an standard registration. - """ - - class CreateParamsCountryOptionsAw(TypedDict): - standard: NotRequired[ - "RegistrationService.CreateParamsCountryOptionsAwStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["standard"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsAwStandard(TypedDict): - place_of_supply_scheme: NotRequired[ - Literal["inbound_goods", "standard"] - ] - """ - Place of supply scheme used in an standard registration. - """ - - class CreateParamsCountryOptionsAz(TypedDict): - type: Literal["simplified"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsBa(TypedDict): - standard: NotRequired[ - "RegistrationService.CreateParamsCountryOptionsBaStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["standard"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsBaStandard(TypedDict): - place_of_supply_scheme: NotRequired[ - Literal["inbound_goods", "standard"] - ] - """ - Place of supply scheme used in an standard registration. - """ - - class CreateParamsCountryOptionsBb(TypedDict): - standard: NotRequired[ - "RegistrationService.CreateParamsCountryOptionsBbStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["standard"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsBbStandard(TypedDict): - place_of_supply_scheme: NotRequired[ - Literal["inbound_goods", "standard"] - ] - """ - Place of supply scheme used in an standard registration. - """ - - class CreateParamsCountryOptionsBd(TypedDict): - standard: NotRequired[ - "RegistrationService.CreateParamsCountryOptionsBdStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["standard"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsBdStandard(TypedDict): - place_of_supply_scheme: NotRequired[ - Literal["inbound_goods", "standard"] - ] - """ - Place of supply scheme used in an standard registration. - """ - - class CreateParamsCountryOptionsBe(TypedDict): - standard: NotRequired[ - "RegistrationService.CreateParamsCountryOptionsBeStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] - """ - Type of registration to be created in an EU country. - """ - - class CreateParamsCountryOptionsBeStandard(TypedDict): - place_of_supply_scheme: Literal[ - "inbound_goods", "small_seller", "standard" - ] - """ - Place of supply scheme used in an EU standard registration. - """ - - class CreateParamsCountryOptionsBf(TypedDict): - standard: NotRequired[ - "RegistrationService.CreateParamsCountryOptionsBfStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["standard"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsBfStandard(TypedDict): - place_of_supply_scheme: NotRequired[ - Literal["inbound_goods", "standard"] - ] - """ - Place of supply scheme used in an standard registration. - """ - - class CreateParamsCountryOptionsBg(TypedDict): - standard: NotRequired[ - "RegistrationService.CreateParamsCountryOptionsBgStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] - """ - Type of registration to be created in an EU country. - """ - - class CreateParamsCountryOptionsBgStandard(TypedDict): - place_of_supply_scheme: Literal[ - "inbound_goods", "small_seller", "standard" - ] - """ - Place of supply scheme used in an EU standard registration. - """ - - class CreateParamsCountryOptionsBh(TypedDict): - standard: NotRequired[ - "RegistrationService.CreateParamsCountryOptionsBhStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["standard"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsBhStandard(TypedDict): - place_of_supply_scheme: NotRequired[ - Literal["inbound_goods", "standard"] - ] - """ - Place of supply scheme used in an standard registration. - """ - - class CreateParamsCountryOptionsBj(TypedDict): - type: Literal["simplified"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsBs(TypedDict): - standard: NotRequired[ - "RegistrationService.CreateParamsCountryOptionsBsStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["standard"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsBsStandard(TypedDict): - place_of_supply_scheme: NotRequired[ - Literal["inbound_goods", "standard"] - ] - """ - Place of supply scheme used in an standard registration. - """ - - class CreateParamsCountryOptionsBy(TypedDict): - type: Literal["simplified"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsCa(TypedDict): - province_standard: NotRequired[ - "RegistrationService.CreateParamsCountryOptionsCaProvinceStandard" - ] - """ - Options for the provincial tax registration. - """ - type: Literal["province_standard", "simplified", "standard"] - """ - Type of registration to be created in Canada. - """ - - class CreateParamsCountryOptionsCaProvinceStandard(TypedDict): - province: str - """ - Two-letter CA province code ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)). - """ - - class CreateParamsCountryOptionsCd(TypedDict): - standard: NotRequired[ - "RegistrationService.CreateParamsCountryOptionsCdStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["standard"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsCdStandard(TypedDict): - place_of_supply_scheme: NotRequired[ - Literal["inbound_goods", "standard"] - ] - """ - Place of supply scheme used in an standard registration. - """ - - class CreateParamsCountryOptionsCh(TypedDict): - standard: NotRequired[ - "RegistrationService.CreateParamsCountryOptionsChStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["standard"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsChStandard(TypedDict): - place_of_supply_scheme: NotRequired[ - Literal["inbound_goods", "standard"] - ] - """ - Place of supply scheme used in an standard registration. - """ - - class CreateParamsCountryOptionsCl(TypedDict): - type: Literal["simplified"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsCm(TypedDict): - type: Literal["simplified"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsCo(TypedDict): - type: Literal["simplified"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsCr(TypedDict): - type: Literal["simplified"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsCv(TypedDict): - type: Literal["simplified"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsCy(TypedDict): - standard: NotRequired[ - "RegistrationService.CreateParamsCountryOptionsCyStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] - """ - Type of registration to be created in an EU country. - """ - - class CreateParamsCountryOptionsCyStandard(TypedDict): - place_of_supply_scheme: Literal[ - "inbound_goods", "small_seller", "standard" - ] - """ - Place of supply scheme used in an EU standard registration. - """ - - class CreateParamsCountryOptionsCz(TypedDict): - standard: NotRequired[ - "RegistrationService.CreateParamsCountryOptionsCzStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] - """ - Type of registration to be created in an EU country. - """ - - class CreateParamsCountryOptionsCzStandard(TypedDict): - place_of_supply_scheme: Literal[ - "inbound_goods", "small_seller", "standard" - ] - """ - Place of supply scheme used in an EU standard registration. - """ - - class CreateParamsCountryOptionsDe(TypedDict): - standard: NotRequired[ - "RegistrationService.CreateParamsCountryOptionsDeStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] - """ - Type of registration to be created in an EU country. - """ - - class CreateParamsCountryOptionsDeStandard(TypedDict): - place_of_supply_scheme: Literal[ - "inbound_goods", "small_seller", "standard" - ] - """ - Place of supply scheme used in an EU standard registration. - """ - - class CreateParamsCountryOptionsDk(TypedDict): - standard: NotRequired[ - "RegistrationService.CreateParamsCountryOptionsDkStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] - """ - Type of registration to be created in an EU country. - """ - - class CreateParamsCountryOptionsDkStandard(TypedDict): - place_of_supply_scheme: Literal[ - "inbound_goods", "small_seller", "standard" - ] - """ - Place of supply scheme used in an EU standard registration. - """ - - class CreateParamsCountryOptionsEc(TypedDict): - type: Literal["simplified"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsEe(TypedDict): - standard: NotRequired[ - "RegistrationService.CreateParamsCountryOptionsEeStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] - """ - Type of registration to be created in an EU country. - """ - - class CreateParamsCountryOptionsEeStandard(TypedDict): - place_of_supply_scheme: Literal[ - "inbound_goods", "small_seller", "standard" - ] - """ - Place of supply scheme used in an EU standard registration. - """ - - class CreateParamsCountryOptionsEg(TypedDict): - type: Literal["simplified"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsEs(TypedDict): - standard: NotRequired[ - "RegistrationService.CreateParamsCountryOptionsEsStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] - """ - Type of registration to be created in an EU country. - """ - - class CreateParamsCountryOptionsEsStandard(TypedDict): - place_of_supply_scheme: Literal[ - "inbound_goods", "small_seller", "standard" - ] - """ - Place of supply scheme used in an EU standard registration. - """ - - class CreateParamsCountryOptionsEt(TypedDict): - standard: NotRequired[ - "RegistrationService.CreateParamsCountryOptionsEtStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["standard"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsEtStandard(TypedDict): - place_of_supply_scheme: NotRequired[ - Literal["inbound_goods", "standard"] - ] - """ - Place of supply scheme used in an standard registration. - """ - - class CreateParamsCountryOptionsFi(TypedDict): - standard: NotRequired[ - "RegistrationService.CreateParamsCountryOptionsFiStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] - """ - Type of registration to be created in an EU country. - """ - - class CreateParamsCountryOptionsFiStandard(TypedDict): - place_of_supply_scheme: Literal[ - "inbound_goods", "small_seller", "standard" - ] - """ - Place of supply scheme used in an EU standard registration. - """ - - class CreateParamsCountryOptionsFr(TypedDict): - standard: NotRequired[ - "RegistrationService.CreateParamsCountryOptionsFrStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] - """ - Type of registration to be created in an EU country. - """ - - class CreateParamsCountryOptionsFrStandard(TypedDict): - place_of_supply_scheme: Literal[ - "inbound_goods", "small_seller", "standard" - ] - """ - Place of supply scheme used in an EU standard registration. - """ - - class CreateParamsCountryOptionsGb(TypedDict): - standard: NotRequired[ - "RegistrationService.CreateParamsCountryOptionsGbStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["standard"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsGbStandard(TypedDict): - place_of_supply_scheme: NotRequired[ - Literal["inbound_goods", "standard"] - ] - """ - Place of supply scheme used in an standard registration. - """ - - class CreateParamsCountryOptionsGe(TypedDict): - type: Literal["simplified"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsGn(TypedDict): - standard: NotRequired[ - "RegistrationService.CreateParamsCountryOptionsGnStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["standard"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsGnStandard(TypedDict): - place_of_supply_scheme: NotRequired[ - Literal["inbound_goods", "standard"] - ] - """ - Place of supply scheme used in an standard registration. - """ - - class CreateParamsCountryOptionsGr(TypedDict): - standard: NotRequired[ - "RegistrationService.CreateParamsCountryOptionsGrStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] - """ - Type of registration to be created in an EU country. - """ - - class CreateParamsCountryOptionsGrStandard(TypedDict): - place_of_supply_scheme: Literal[ - "inbound_goods", "small_seller", "standard" - ] - """ - Place of supply scheme used in an EU standard registration. - """ - - class CreateParamsCountryOptionsHr(TypedDict): - standard: NotRequired[ - "RegistrationService.CreateParamsCountryOptionsHrStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] - """ - Type of registration to be created in an EU country. - """ - - class CreateParamsCountryOptionsHrStandard(TypedDict): - place_of_supply_scheme: Literal[ - "inbound_goods", "small_seller", "standard" - ] - """ - Place of supply scheme used in an EU standard registration. - """ - - class CreateParamsCountryOptionsHu(TypedDict): - standard: NotRequired[ - "RegistrationService.CreateParamsCountryOptionsHuStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] - """ - Type of registration to be created in an EU country. - """ - - class CreateParamsCountryOptionsHuStandard(TypedDict): - place_of_supply_scheme: Literal[ - "inbound_goods", "small_seller", "standard" - ] - """ - Place of supply scheme used in an EU standard registration. - """ - - class CreateParamsCountryOptionsId(TypedDict): - type: Literal["simplified"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsIe(TypedDict): - standard: NotRequired[ - "RegistrationService.CreateParamsCountryOptionsIeStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] - """ - Type of registration to be created in an EU country. - """ - - class CreateParamsCountryOptionsIeStandard(TypedDict): - place_of_supply_scheme: Literal[ - "inbound_goods", "small_seller", "standard" - ] - """ - Place of supply scheme used in an EU standard registration. - """ - - class CreateParamsCountryOptionsIn(TypedDict): - type: Literal["simplified"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsIs(TypedDict): - standard: NotRequired[ - "RegistrationService.CreateParamsCountryOptionsIsStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["standard"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsIsStandard(TypedDict): - place_of_supply_scheme: NotRequired[ - Literal["inbound_goods", "standard"] - ] - """ - Place of supply scheme used in an standard registration. - """ - - class CreateParamsCountryOptionsIt(TypedDict): - standard: NotRequired[ - "RegistrationService.CreateParamsCountryOptionsItStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] - """ - Type of registration to be created in an EU country. - """ - - class CreateParamsCountryOptionsItStandard(TypedDict): - place_of_supply_scheme: Literal[ - "inbound_goods", "small_seller", "standard" - ] - """ - Place of supply scheme used in an EU standard registration. - """ - - class CreateParamsCountryOptionsJp(TypedDict): - standard: NotRequired[ - "RegistrationService.CreateParamsCountryOptionsJpStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["standard"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsJpStandard(TypedDict): - place_of_supply_scheme: NotRequired[ - Literal["inbound_goods", "standard"] - ] - """ - Place of supply scheme used in an standard registration. - """ - - class CreateParamsCountryOptionsKe(TypedDict): - type: Literal["simplified"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsKg(TypedDict): - type: Literal["simplified"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsKh(TypedDict): - type: Literal["simplified"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsKr(TypedDict): - type: Literal["simplified"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsKz(TypedDict): - type: Literal["simplified"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsLa(TypedDict): - type: Literal["simplified"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsLt(TypedDict): - standard: NotRequired[ - "RegistrationService.CreateParamsCountryOptionsLtStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] - """ - Type of registration to be created in an EU country. - """ - - class CreateParamsCountryOptionsLtStandard(TypedDict): - place_of_supply_scheme: Literal[ - "inbound_goods", "small_seller", "standard" - ] - """ - Place of supply scheme used in an EU standard registration. - """ - - class CreateParamsCountryOptionsLu(TypedDict): - standard: NotRequired[ - "RegistrationService.CreateParamsCountryOptionsLuStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] - """ - Type of registration to be created in an EU country. - """ - - class CreateParamsCountryOptionsLuStandard(TypedDict): - place_of_supply_scheme: Literal[ - "inbound_goods", "small_seller", "standard" - ] - """ - Place of supply scheme used in an EU standard registration. - """ - - class CreateParamsCountryOptionsLv(TypedDict): - standard: NotRequired[ - "RegistrationService.CreateParamsCountryOptionsLvStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] - """ - Type of registration to be created in an EU country. - """ - - class CreateParamsCountryOptionsLvStandard(TypedDict): - place_of_supply_scheme: Literal[ - "inbound_goods", "small_seller", "standard" - ] - """ - Place of supply scheme used in an EU standard registration. - """ - - class CreateParamsCountryOptionsMa(TypedDict): - type: Literal["simplified"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsMd(TypedDict): - type: Literal["simplified"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsMe(TypedDict): - standard: NotRequired[ - "RegistrationService.CreateParamsCountryOptionsMeStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["standard"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsMeStandard(TypedDict): - place_of_supply_scheme: NotRequired[ - Literal["inbound_goods", "standard"] - ] - """ - Place of supply scheme used in an standard registration. - """ - - class CreateParamsCountryOptionsMk(TypedDict): - standard: NotRequired[ - "RegistrationService.CreateParamsCountryOptionsMkStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["standard"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsMkStandard(TypedDict): - place_of_supply_scheme: NotRequired[ - Literal["inbound_goods", "standard"] - ] - """ - Place of supply scheme used in an standard registration. - """ - - class CreateParamsCountryOptionsMr(TypedDict): - standard: NotRequired[ - "RegistrationService.CreateParamsCountryOptionsMrStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["standard"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsMrStandard(TypedDict): - place_of_supply_scheme: NotRequired[ - Literal["inbound_goods", "standard"] - ] - """ - Place of supply scheme used in an standard registration. - """ - - class CreateParamsCountryOptionsMt(TypedDict): - standard: NotRequired[ - "RegistrationService.CreateParamsCountryOptionsMtStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] - """ - Type of registration to be created in an EU country. - """ - - class CreateParamsCountryOptionsMtStandard(TypedDict): - place_of_supply_scheme: Literal[ - "inbound_goods", "small_seller", "standard" - ] - """ - Place of supply scheme used in an EU standard registration. - """ - - class CreateParamsCountryOptionsMx(TypedDict): - type: Literal["simplified"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsMy(TypedDict): - type: Literal["simplified"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsNg(TypedDict): - type: Literal["simplified"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsNl(TypedDict): - standard: NotRequired[ - "RegistrationService.CreateParamsCountryOptionsNlStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] - """ - Type of registration to be created in an EU country. - """ - - class CreateParamsCountryOptionsNlStandard(TypedDict): - place_of_supply_scheme: Literal[ - "inbound_goods", "small_seller", "standard" - ] - """ - Place of supply scheme used in an EU standard registration. - """ - - class CreateParamsCountryOptionsNo(TypedDict): - standard: NotRequired[ - "RegistrationService.CreateParamsCountryOptionsNoStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["standard"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsNoStandard(TypedDict): - place_of_supply_scheme: NotRequired[ - Literal["inbound_goods", "standard"] - ] - """ - Place of supply scheme used in an standard registration. - """ - - class CreateParamsCountryOptionsNp(TypedDict): - type: Literal["simplified"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsNz(TypedDict): - standard: NotRequired[ - "RegistrationService.CreateParamsCountryOptionsNzStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["standard"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsNzStandard(TypedDict): - place_of_supply_scheme: NotRequired[ - Literal["inbound_goods", "standard"] - ] - """ - Place of supply scheme used in an standard registration. - """ - - class CreateParamsCountryOptionsOm(TypedDict): - standard: NotRequired[ - "RegistrationService.CreateParamsCountryOptionsOmStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["standard"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsOmStandard(TypedDict): - place_of_supply_scheme: NotRequired[ - Literal["inbound_goods", "standard"] - ] - """ - Place of supply scheme used in an standard registration. - """ - - class CreateParamsCountryOptionsPe(TypedDict): - type: Literal["simplified"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsPh(TypedDict): - type: Literal["simplified"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsPl(TypedDict): - standard: NotRequired[ - "RegistrationService.CreateParamsCountryOptionsPlStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] - """ - Type of registration to be created in an EU country. - """ - - class CreateParamsCountryOptionsPlStandard(TypedDict): - place_of_supply_scheme: Literal[ - "inbound_goods", "small_seller", "standard" - ] - """ - Place of supply scheme used in an EU standard registration. - """ - - class CreateParamsCountryOptionsPt(TypedDict): - standard: NotRequired[ - "RegistrationService.CreateParamsCountryOptionsPtStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] - """ - Type of registration to be created in an EU country. - """ - - class CreateParamsCountryOptionsPtStandard(TypedDict): - place_of_supply_scheme: Literal[ - "inbound_goods", "small_seller", "standard" - ] - """ - Place of supply scheme used in an EU standard registration. - """ - - class CreateParamsCountryOptionsRo(TypedDict): - standard: NotRequired[ - "RegistrationService.CreateParamsCountryOptionsRoStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] - """ - Type of registration to be created in an EU country. - """ - - class CreateParamsCountryOptionsRoStandard(TypedDict): - place_of_supply_scheme: Literal[ - "inbound_goods", "small_seller", "standard" - ] - """ - Place of supply scheme used in an EU standard registration. - """ - - class CreateParamsCountryOptionsRs(TypedDict): - standard: NotRequired[ - "RegistrationService.CreateParamsCountryOptionsRsStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["standard"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsRsStandard(TypedDict): - place_of_supply_scheme: NotRequired[ - Literal["inbound_goods", "standard"] - ] - """ - Place of supply scheme used in an standard registration. - """ - - class CreateParamsCountryOptionsRu(TypedDict): - type: Literal["simplified"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsSa(TypedDict): - type: Literal["simplified"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsSe(TypedDict): - standard: NotRequired[ - "RegistrationService.CreateParamsCountryOptionsSeStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] - """ - Type of registration to be created in an EU country. - """ - - class CreateParamsCountryOptionsSeStandard(TypedDict): - place_of_supply_scheme: Literal[ - "inbound_goods", "small_seller", "standard" - ] - """ - Place of supply scheme used in an EU standard registration. - """ - - class CreateParamsCountryOptionsSg(TypedDict): - standard: NotRequired[ - "RegistrationService.CreateParamsCountryOptionsSgStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["standard"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsSgStandard(TypedDict): - place_of_supply_scheme: NotRequired[ - Literal["inbound_goods", "standard"] - ] - """ - Place of supply scheme used in an standard registration. - """ - - class CreateParamsCountryOptionsSi(TypedDict): - standard: NotRequired[ - "RegistrationService.CreateParamsCountryOptionsSiStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] - """ - Type of registration to be created in an EU country. - """ - - class CreateParamsCountryOptionsSiStandard(TypedDict): - place_of_supply_scheme: Literal[ - "inbound_goods", "small_seller", "standard" - ] - """ - Place of supply scheme used in an EU standard registration. - """ - - class CreateParamsCountryOptionsSk(TypedDict): - standard: NotRequired[ - "RegistrationService.CreateParamsCountryOptionsSkStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["ioss", "oss_non_union", "oss_union", "standard"] - """ - Type of registration to be created in an EU country. - """ - - class CreateParamsCountryOptionsSkStandard(TypedDict): - place_of_supply_scheme: Literal[ - "inbound_goods", "small_seller", "standard" - ] - """ - Place of supply scheme used in an EU standard registration. - """ - - class CreateParamsCountryOptionsSn(TypedDict): - type: Literal["simplified"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsSr(TypedDict): - standard: NotRequired[ - "RegistrationService.CreateParamsCountryOptionsSrStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["standard"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsSrStandard(TypedDict): - place_of_supply_scheme: NotRequired[ - Literal["inbound_goods", "standard"] - ] - """ - Place of supply scheme used in an standard registration. - """ - - class CreateParamsCountryOptionsTh(TypedDict): - type: Literal["simplified"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsTj(TypedDict): - type: Literal["simplified"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsTr(TypedDict): - type: Literal["simplified"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsTz(TypedDict): - type: Literal["simplified"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsUa(TypedDict): - type: Literal["simplified"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsUg(TypedDict): - type: Literal["simplified"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsUs(TypedDict): - local_amusement_tax: NotRequired[ - "RegistrationService.CreateParamsCountryOptionsUsLocalAmusementTax" - ] - """ - Options for the local amusement tax registration. - """ - local_lease_tax: NotRequired[ - "RegistrationService.CreateParamsCountryOptionsUsLocalLeaseTax" - ] - """ - Options for the local lease tax registration. - """ - state: str - """ - Two-letter US state code ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)). - """ - state_sales_tax: NotRequired[ - "RegistrationService.CreateParamsCountryOptionsUsStateSalesTax" - ] - """ - Options for the state sales tax registration. - """ - type: Literal[ - "local_amusement_tax", - "local_lease_tax", - "state_communications_tax", - "state_retail_delivery_fee", - "state_sales_tax", - ] - """ - Type of registration to be created in the US. - """ - - class CreateParamsCountryOptionsUsLocalAmusementTax(TypedDict): - jurisdiction: str - """ - A [FIPS code](https://www.census.gov/library/reference/code-lists/ansi.html) representing the local jurisdiction. Supported FIPS codes are: `14000` (Chicago), `06613` (Bloomington), `21696` (East Dundee), `24582` (Evanston), `45421` (Lynwood), `48892` (Midlothian), `64343` (River Grove), and `68081` (Schiller Park). - """ - - class CreateParamsCountryOptionsUsLocalLeaseTax(TypedDict): - jurisdiction: str - """ - A [FIPS code](https://www.census.gov/library/reference/code-lists/ansi.html) representing the local jurisdiction. Supported FIPS codes are: `14000` (Chicago). - """ - - class CreateParamsCountryOptionsUsStateSalesTax(TypedDict): - elections: List[ - "RegistrationService.CreateParamsCountryOptionsUsStateSalesTaxElection" - ] - """ - Elections for the state sales tax registration. - """ - - class CreateParamsCountryOptionsUsStateSalesTaxElection(TypedDict): - jurisdiction: NotRequired[str] - """ - A [FIPS code](https://www.census.gov/library/reference/code-lists/ansi.html) representing the local jurisdiction. Supported FIPS codes are: `003` (Allegheny County) and `60000` (Philadelphia City). - """ - type: Literal[ - "local_use_tax", - "simplified_sellers_use_tax", - "single_local_use_tax", - ] - """ - The type of the election for the state sales tax registration. - """ - - class CreateParamsCountryOptionsUy(TypedDict): - standard: NotRequired[ - "RegistrationService.CreateParamsCountryOptionsUyStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["standard"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsUyStandard(TypedDict): - place_of_supply_scheme: NotRequired[ - Literal["inbound_goods", "standard"] - ] - """ - Place of supply scheme used in an standard registration. - """ - - class CreateParamsCountryOptionsUz(TypedDict): - type: Literal["simplified"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsVn(TypedDict): - type: Literal["simplified"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsZa(TypedDict): - standard: NotRequired[ - "RegistrationService.CreateParamsCountryOptionsZaStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["standard"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsZaStandard(TypedDict): - place_of_supply_scheme: NotRequired[ - Literal["inbound_goods", "standard"] - ] - """ - Place of supply scheme used in an standard registration. - """ - - class CreateParamsCountryOptionsZm(TypedDict): - type: Literal["simplified"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsZw(TypedDict): - standard: NotRequired[ - "RegistrationService.CreateParamsCountryOptionsZwStandard" - ] - """ - Options for the standard registration. - """ - type: Literal["standard"] - """ - Type of registration to be created in `country`. - """ - - class CreateParamsCountryOptionsZwStandard(TypedDict): - place_of_supply_scheme: NotRequired[ - Literal["inbound_goods", "standard"] - ] - """ - Place of supply scheme used in an standard registration. - """ - - class ListParams(TypedDict): - 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. - """ - status: NotRequired[Literal["active", "all", "expired", "scheduled"]] - """ - The status of the Tax Registration. - """ - - class RetrieveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class UpdateParams(TypedDict): - active_from: NotRequired["Literal['now']|int"] - """ - Time at which the registration becomes active. It can be either `now` to indicate the current time, or a timestamp measured in seconds since the Unix epoch. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - expires_at: NotRequired["Literal['']|Literal['now']|int"] - """ - If set, the registration stops being active at this time. If not set, the registration will be active indefinitely. It can be either `now` to indicate the current time, or a timestamp measured in seconds since the Unix epoch. - """ +class RegistrationService(StripeService): def list( self, - params: Optional["RegistrationService.ListParams"] = None, + params: Optional["RegistrationListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[Registration]: """ @@ -1963,7 +45,7 @@ def list( async def list_async( self, - params: Optional["RegistrationService.ListParams"] = None, + params: Optional["RegistrationListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[Registration]: """ @@ -1982,7 +64,7 @@ async def list_async( def create( self, - params: "RegistrationService.CreateParams", + params: "RegistrationCreateParams", options: Optional[RequestOptions] = None, ) -> Registration: """ @@ -2001,7 +83,7 @@ def create( async def create_async( self, - params: "RegistrationService.CreateParams", + params: "RegistrationCreateParams", options: Optional[RequestOptions] = None, ) -> Registration: """ @@ -2021,7 +103,7 @@ async def create_async( def retrieve( self, id: str, - params: Optional["RegistrationService.RetrieveParams"] = None, + params: Optional["RegistrationRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Registration: """ @@ -2041,7 +123,7 @@ def retrieve( async def retrieve_async( self, id: str, - params: Optional["RegistrationService.RetrieveParams"] = None, + params: Optional["RegistrationRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Registration: """ @@ -2061,7 +143,7 @@ async def retrieve_async( def update( self, id: str, - params: Optional["RegistrationService.UpdateParams"] = None, + params: Optional["RegistrationUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> Registration: """ @@ -2083,7 +165,7 @@ def update( async def update_async( self, id: str, - params: Optional["RegistrationService.UpdateParams"] = None, + params: Optional["RegistrationUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> Registration: """ diff --git a/stripe/tax/_settings.py b/stripe/tax/_settings.py index fd6b9921f..c67ed2f99 100644 --- a/stripe/tax/_settings.py +++ b/stripe/tax/_settings.py @@ -1,11 +1,16 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec -from stripe._request_options import RequestOptions from stripe._singleton_api_resource import SingletonAPIResource from stripe._stripe_object import StripeObject from stripe._updateable_api_resource import UpdateableAPIResource from typing import ClassVar, List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict, Unpack +from typing_extensions import Literal, Unpack, TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params.tax._settings_modify_params import SettingsModifyParams + from stripe.params.tax._settings_retrieve_params import ( + SettingsRetrieveParams, + ) class Settings( @@ -80,70 +85,6 @@ class Pending(StripeObject): pending: Optional[Pending] _inner_class_types = {"active": Active, "pending": Pending} - class ModifyParams(RequestOptions): - defaults: NotRequired["Settings.ModifyParamsDefaults"] - """ - Default configuration to be used on Stripe Tax calculations. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - head_office: NotRequired["Settings.ModifyParamsHeadOffice"] - """ - The place where your business is located. - """ - - class ModifyParamsDefaults(TypedDict): - tax_behavior: NotRequired[ - Literal["exclusive", "inclusive", "inferred_by_currency"] - ] - """ - Specifies the default [tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#tax-behavior) to be used when the item's price has unspecified tax behavior. One of inclusive, exclusive, or inferred_by_currency. Once specified, it cannot be changed back to null. - """ - tax_code: NotRequired[str] - """ - A [tax code](https://stripe.com/docs/tax/tax-categories) ID. - """ - - class ModifyParamsHeadOffice(TypedDict): - address: "Settings.ModifyParamsHeadOfficeAddress" - """ - The location of the business for tax purposes. - """ - - class ModifyParamsHeadOfficeAddress(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/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 RetrieveParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - defaults: Defaults head_office: Optional[HeadOffice] """ @@ -164,7 +105,7 @@ class RetrieveParams(RequestOptions): status_details: StatusDetails @classmethod - def modify(cls, **params: Unpack["Settings.ModifyParams"]) -> "Settings": + def modify(cls, **params: Unpack["SettingsModifyParams"]) -> "Settings": """ Updates Tax Settings parameters used in tax calculations. All parameters are editable but none can be removed once set. """ @@ -179,7 +120,7 @@ def modify(cls, **params: Unpack["Settings.ModifyParams"]) -> "Settings": @classmethod async def modify_async( - cls, **params: Unpack["Settings.ModifyParams"] + cls, **params: Unpack["SettingsModifyParams"] ) -> "Settings": """ Updates Tax Settings parameters used in tax calculations. All parameters are editable but none can be removed once set. @@ -195,7 +136,7 @@ async def modify_async( @classmethod def retrieve( - cls, **params: Unpack["Settings.RetrieveParams"] + cls, **params: Unpack["SettingsRetrieveParams"] ) -> "Settings": """ Retrieves Tax Settings for a merchant. @@ -206,7 +147,7 @@ def retrieve( @classmethod async def retrieve_async( - cls, **params: Unpack["Settings.RetrieveParams"] + cls, **params: Unpack["SettingsRetrieveParams"] ) -> "Settings": """ Retrieves Tax Settings for a merchant. diff --git a/stripe/tax/_settings_service.py b/stripe/tax/_settings_service.py index f8c3f917b..2d2db2631 100644 --- a/stripe/tax/_settings_service.py +++ b/stripe/tax/_settings_service.py @@ -3,78 +3,20 @@ from stripe._request_options import RequestOptions from stripe._stripe_service import StripeService from stripe.tax._settings import Settings -from typing import List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params.tax._settings_retrieve_params import ( + SettingsRetrieveParams, + ) + from stripe.params.tax._settings_update_params import SettingsUpdateParams -class SettingsService(StripeService): - class RetrieveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class UpdateParams(TypedDict): - defaults: NotRequired["SettingsService.UpdateParamsDefaults"] - """ - Default configuration to be used on Stripe Tax calculations. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - head_office: NotRequired["SettingsService.UpdateParamsHeadOffice"] - """ - The place where your business is located. - """ - - class UpdateParamsDefaults(TypedDict): - tax_behavior: NotRequired[ - Literal["exclusive", "inclusive", "inferred_by_currency"] - ] - """ - Specifies the default [tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#tax-behavior) to be used when the item's price has unspecified tax behavior. One of inclusive, exclusive, or inferred_by_currency. Once specified, it cannot be changed back to null. - """ - tax_code: NotRequired[str] - """ - A [tax code](https://stripe.com/docs/tax/tax-categories) ID. - """ - - class UpdateParamsHeadOffice(TypedDict): - address: "SettingsService.UpdateParamsHeadOfficeAddress" - """ - The location of the business for tax purposes. - """ - - class UpdateParamsHeadOfficeAddress(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/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 SettingsService(StripeService): def retrieve( self, - params: Optional["SettingsService.RetrieveParams"] = None, + params: Optional["SettingsRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Settings: """ @@ -93,7 +35,7 @@ def retrieve( async def retrieve_async( self, - params: Optional["SettingsService.RetrieveParams"] = None, + params: Optional["SettingsRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Settings: """ @@ -112,7 +54,7 @@ async def retrieve_async( def update( self, - params: Optional["SettingsService.UpdateParams"] = None, + params: Optional["SettingsUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> Settings: """ @@ -131,7 +73,7 @@ def update( async def update_async( self, - params: Optional["SettingsService.UpdateParams"] = None, + params: Optional["SettingsUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> Settings: """ diff --git a/stripe/tax/_transaction.py b/stripe/tax/_transaction.py index 91016c0a4..d2851fee2 100644 --- a/stripe/tax/_transaction.py +++ b/stripe/tax/_transaction.py @@ -2,19 +2,24 @@ # File generated from our OpenAPI spec from stripe._api_resource import APIResource from stripe._list_object import ListObject -from stripe._request_options import RequestOptions from stripe._stripe_object import StripeObject from stripe._util import class_method_variant, sanitize_id from typing import ClassVar, Dict, List, Optional, cast, overload -from typing_extensions import ( - Literal, - NotRequired, - TypedDict, - Unpack, - TYPE_CHECKING, -) +from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: + from stripe.params.tax._transaction_create_from_calculation_params import ( + TransactionCreateFromCalculationParams, + ) + from stripe.params.tax._transaction_create_reversal_params import ( + TransactionCreateReversalParams, + ) + from stripe.params.tax._transaction_list_line_items_params import ( + TransactionListLineItemsParams, + ) + from stripe.params.tax._transaction_retrieve_params import ( + TransactionRetrieveParams, + ) from stripe.tax._transaction_line_item import TransactionLineItem @@ -355,126 +360,6 @@ class TaxRateDetails(StripeObject): """ _inner_class_types = {"tax_breakdown": TaxBreakdown} - class CreateFromCalculationParams(RequestOptions): - calculation: str - """ - Tax Calculation ID to be used as input when creating the transaction. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - posted_at: NotRequired[int] - """ - The Unix timestamp representing when the tax liability is assumed or reduced, which determines the liability posting period and handling in tax liability reports. The timestamp must fall within the `tax_date` and the current time, unless the `tax_date` is scheduled in advance. Defaults to the current time. - """ - reference: str - """ - A custom order or sale identifier, such as 'myOrder_123'. Must be unique across all transactions, including reversals. - """ - - class CreateReversalParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - flat_amount: NotRequired[int] - """ - A flat amount to reverse across the entire transaction, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) in negative. This value represents the total amount to refund from the transaction, including taxes. - """ - line_items: NotRequired[ - List["Transaction.CreateReversalParamsLineItem"] - ] - """ - The line item amounts to reverse. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - mode: Literal["full", "partial"] - """ - If `partial`, the provided line item or shipping cost amounts are reversed. If `full`, the original transaction is fully reversed. - """ - original_transaction: str - """ - The ID of the Transaction to partially or fully reverse. - """ - reference: str - """ - A custom identifier for this reversal, such as `myOrder_123-refund_1`, which must be unique across all transactions. The reference helps identify this reversal transaction in exported [tax reports](https://stripe.com/docs/tax/reports). - """ - shipping_cost: NotRequired[ - "Transaction.CreateReversalParamsShippingCost" - ] - """ - The shipping cost to reverse. - """ - - class CreateReversalParamsLineItem(TypedDict): - amount: int - """ - The amount to reverse, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) in negative. - """ - amount_tax: int - """ - The amount of tax to reverse, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) in negative. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. - """ - original_line_item: str - """ - The `id` of the line item to reverse in the original transaction. - """ - quantity: NotRequired[int] - """ - The quantity reversed. Appears in [tax exports](https://stripe.com/docs/tax/reports), but does not affect the amount of tax reversed. - """ - reference: str - """ - A custom identifier for this line item in the reversal transaction, such as 'L1-refund'. - """ - - class CreateReversalParamsShippingCost(TypedDict): - amount: int - """ - The amount to reverse, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) in negative. - """ - amount_tax: int - """ - The amount of tax to reverse, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) in negative. - """ - - class ListLineItemsParams(RequestOptions): - 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 RetrieveParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - created: int """ Time at which the object was created. Measured in seconds since the Unix epoch. @@ -539,7 +424,7 @@ class RetrieveParams(RequestOptions): @classmethod def create_from_calculation( - cls, **params: Unpack["Transaction.CreateFromCalculationParams"] + cls, **params: Unpack["TransactionCreateFromCalculationParams"] ) -> "Transaction": """ Creates a Tax Transaction from a calculation, if that calculation hasn't expired. Calculations expire after 90 days. @@ -555,7 +440,7 @@ def create_from_calculation( @classmethod async def create_from_calculation_async( - cls, **params: Unpack["Transaction.CreateFromCalculationParams"] + cls, **params: Unpack["TransactionCreateFromCalculationParams"] ) -> "Transaction": """ Creates a Tax Transaction from a calculation, if that calculation hasn't expired. Calculations expire after 90 days. @@ -571,7 +456,7 @@ async def create_from_calculation_async( @classmethod def create_reversal( - cls, **params: Unpack["Transaction.CreateReversalParams"] + cls, **params: Unpack["TransactionCreateReversalParams"] ) -> "Transaction": """ Partially or fully reverses a previously created Transaction. @@ -587,7 +472,7 @@ def create_reversal( @classmethod async def create_reversal_async( - cls, **params: Unpack["Transaction.CreateReversalParams"] + cls, **params: Unpack["TransactionCreateReversalParams"] ) -> "Transaction": """ Partially or fully reverses a previously created Transaction. @@ -605,7 +490,7 @@ async def create_reversal_async( def _cls_list_line_items( cls, transaction: str, - **params: Unpack["Transaction.ListLineItemsParams"], + **params: Unpack["TransactionListLineItemsParams"], ) -> ListObject["TransactionLineItem"]: """ Retrieves the line items of a committed standalone transaction as a collection. @@ -624,7 +509,7 @@ def _cls_list_line_items( @overload @staticmethod def list_line_items( - transaction: str, **params: Unpack["Transaction.ListLineItemsParams"] + transaction: str, **params: Unpack["TransactionListLineItemsParams"] ) -> ListObject["TransactionLineItem"]: """ Retrieves the line items of a committed standalone transaction as a collection. @@ -633,7 +518,7 @@ def list_line_items( @overload def list_line_items( - self, **params: Unpack["Transaction.ListLineItemsParams"] + self, **params: Unpack["TransactionListLineItemsParams"] ) -> ListObject["TransactionLineItem"]: """ Retrieves the line items of a committed standalone transaction as a collection. @@ -642,7 +527,7 @@ def list_line_items( @class_method_variant("_cls_list_line_items") def list_line_items( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Transaction.ListLineItemsParams"] + self, **params: Unpack["TransactionListLineItemsParams"] ) -> ListObject["TransactionLineItem"]: """ Retrieves the line items of a committed standalone transaction as a collection. @@ -662,7 +547,7 @@ def list_line_items( # pyright: ignore[reportGeneralTypeIssues] async def _cls_list_line_items_async( cls, transaction: str, - **params: Unpack["Transaction.ListLineItemsParams"], + **params: Unpack["TransactionListLineItemsParams"], ) -> ListObject["TransactionLineItem"]: """ Retrieves the line items of a committed standalone transaction as a collection. @@ -681,7 +566,7 @@ async def _cls_list_line_items_async( @overload @staticmethod async def list_line_items_async( - transaction: str, **params: Unpack["Transaction.ListLineItemsParams"] + transaction: str, **params: Unpack["TransactionListLineItemsParams"] ) -> ListObject["TransactionLineItem"]: """ Retrieves the line items of a committed standalone transaction as a collection. @@ -690,7 +575,7 @@ async def list_line_items_async( @overload async def list_line_items_async( - self, **params: Unpack["Transaction.ListLineItemsParams"] + self, **params: Unpack["TransactionListLineItemsParams"] ) -> ListObject["TransactionLineItem"]: """ Retrieves the line items of a committed standalone transaction as a collection. @@ -699,7 +584,7 @@ async def list_line_items_async( @class_method_variant("_cls_list_line_items_async") async def list_line_items_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Transaction.ListLineItemsParams"] + self, **params: Unpack["TransactionListLineItemsParams"] ) -> ListObject["TransactionLineItem"]: """ Retrieves the line items of a committed standalone transaction as a collection. @@ -717,7 +602,7 @@ async def list_line_items_async( # pyright: ignore[reportGeneralTypeIssues] @classmethod def retrieve( - cls, id: str, **params: Unpack["Transaction.RetrieveParams"] + cls, id: str, **params: Unpack["TransactionRetrieveParams"] ) -> "Transaction": """ Retrieves a Tax Transaction object. @@ -728,7 +613,7 @@ def retrieve( @classmethod async def retrieve_async( - cls, id: str, **params: Unpack["Transaction.RetrieveParams"] + cls, id: str, **params: Unpack["TransactionRetrieveParams"] ) -> "Transaction": """ Retrieves a Tax Transaction object. diff --git a/stripe/tax/_transaction_line_item_service.py b/stripe/tax/_transaction_line_item_service.py index 7fc5be384..f1762c07b 100644 --- a/stripe/tax/_transaction_line_item_service.py +++ b/stripe/tax/_transaction_line_item_service.py @@ -5,33 +5,20 @@ from stripe._stripe_service import StripeService from stripe._util import sanitize_id from stripe.tax._transaction_line_item import TransactionLineItem -from typing import List, Optional, cast -from typing_extensions import NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params.tax._transaction_line_item_list_params import ( + TransactionLineItemListParams, + ) -class TransactionLineItemService(StripeService): - class ListParams(TypedDict): - 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 TransactionLineItemService(StripeService): def list( self, transaction: str, - params: Optional["TransactionLineItemService.ListParams"] = None, + params: Optional["TransactionLineItemListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[TransactionLineItem]: """ @@ -53,7 +40,7 @@ def list( async def list_async( self, transaction: str, - params: Optional["TransactionLineItemService.ListParams"] = None, + params: Optional["TransactionLineItemListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[TransactionLineItem]: """ diff --git a/stripe/tax/_transaction_service.py b/stripe/tax/_transaction_service.py index 85c9c1596..812c4ed48 100644 --- a/stripe/tax/_transaction_service.py +++ b/stripe/tax/_transaction_service.py @@ -7,8 +7,19 @@ from stripe.tax._transaction_line_item_service import ( TransactionLineItemService, ) -from typing import Dict, List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params.tax._transaction_create_from_calculation_params import ( + TransactionCreateFromCalculationParams, + ) + from stripe.params.tax._transaction_create_reversal_params import ( + TransactionCreateReversalParams, + ) + from stripe.params.tax._transaction_retrieve_params import ( + TransactionRetrieveParams, + ) class TransactionService(StripeService): @@ -16,112 +27,10 @@ def __init__(self, requestor): super().__init__(requestor) self.line_items = TransactionLineItemService(self._requestor) - class CreateFromCalculationParams(TypedDict): - calculation: str - """ - Tax Calculation ID to be used as input when creating the transaction. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - posted_at: NotRequired[int] - """ - The Unix timestamp representing when the tax liability is assumed or reduced, which determines the liability posting period and handling in tax liability reports. The timestamp must fall within the `tax_date` and the current time, unless the `tax_date` is scheduled in advance. Defaults to the current time. - """ - reference: str - """ - A custom order or sale identifier, such as 'myOrder_123'. Must be unique across all transactions, including reversals. - """ - - class CreateReversalParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - flat_amount: NotRequired[int] - """ - A flat amount to reverse across the entire transaction, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) in negative. This value represents the total amount to refund from the transaction, including taxes. - """ - line_items: NotRequired[ - List["TransactionService.CreateReversalParamsLineItem"] - ] - """ - The line item amounts to reverse. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - mode: Literal["full", "partial"] - """ - If `partial`, the provided line item or shipping cost amounts are reversed. If `full`, the original transaction is fully reversed. - """ - original_transaction: str - """ - The ID of the Transaction to partially or fully reverse. - """ - reference: str - """ - A custom identifier for this reversal, such as `myOrder_123-refund_1`, which must be unique across all transactions. The reference helps identify this reversal transaction in exported [tax reports](https://stripe.com/docs/tax/reports). - """ - shipping_cost: NotRequired[ - "TransactionService.CreateReversalParamsShippingCost" - ] - """ - The shipping cost to reverse. - """ - - class CreateReversalParamsLineItem(TypedDict): - amount: int - """ - The amount to reverse, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) in negative. - """ - amount_tax: int - """ - The amount of tax to reverse, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) in negative. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. - """ - original_line_item: str - """ - The `id` of the line item to reverse in the original transaction. - """ - quantity: NotRequired[int] - """ - The quantity reversed. Appears in [tax exports](https://stripe.com/docs/tax/reports), but does not affect the amount of tax reversed. - """ - reference: str - """ - A custom identifier for this line item in the reversal transaction, such as 'L1-refund'. - """ - - class CreateReversalParamsShippingCost(TypedDict): - amount: int - """ - The amount to reverse, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) in negative. - """ - amount_tax: int - """ - The amount of tax to reverse, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) in negative. - """ - - class RetrieveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - def retrieve( self, transaction: str, - params: Optional["TransactionService.RetrieveParams"] = None, + params: Optional["TransactionRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Transaction: """ @@ -143,7 +52,7 @@ def retrieve( async def retrieve_async( self, transaction: str, - params: Optional["TransactionService.RetrieveParams"] = None, + params: Optional["TransactionRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Transaction: """ @@ -164,7 +73,7 @@ async def retrieve_async( def create_from_calculation( self, - params: "TransactionService.CreateFromCalculationParams", + params: "TransactionCreateFromCalculationParams", options: Optional[RequestOptions] = None, ) -> Transaction: """ @@ -183,7 +92,7 @@ def create_from_calculation( async def create_from_calculation_async( self, - params: "TransactionService.CreateFromCalculationParams", + params: "TransactionCreateFromCalculationParams", options: Optional[RequestOptions] = None, ) -> Transaction: """ @@ -202,7 +111,7 @@ async def create_from_calculation_async( def create_reversal( self, - params: "TransactionService.CreateReversalParams", + params: "TransactionCreateReversalParams", options: Optional[RequestOptions] = None, ) -> Transaction: """ @@ -221,7 +130,7 @@ def create_reversal( async def create_reversal_async( self, - params: "TransactionService.CreateReversalParams", + params: "TransactionCreateReversalParams", options: Optional[RequestOptions] = None, ) -> Transaction: """ diff --git a/stripe/terminal/_configuration.py b/stripe/terminal/_configuration.py index 3ddbbc3f1..326a722c3 100644 --- a/stripe/terminal/_configuration.py +++ b/stripe/terminal/_configuration.py @@ -5,21 +5,29 @@ from stripe._expandable_field import ExpandableField from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource -from stripe._request_options import RequestOptions from stripe._stripe_object import StripeObject from stripe._updateable_api_resource import UpdateableAPIResource from stripe._util import class_method_variant, sanitize_id from typing import ClassVar, List, Optional, cast, overload -from typing_extensions import ( - Literal, - NotRequired, - TypedDict, - Unpack, - TYPE_CHECKING, -) +from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: from stripe._file import File + from stripe.params.terminal._configuration_create_params import ( + ConfigurationCreateParams, + ) + from stripe.params.terminal._configuration_delete_params import ( + ConfigurationDeleteParams, + ) + from stripe.params.terminal._configuration_list_params import ( + ConfigurationListParams, + ) + from stripe.params.terminal._configuration_modify_params import ( + ConfigurationModifyParams, + ) + from stripe.params.terminal._configuration_retrieve_params import ( + ConfigurationRetrieveParams, + ) class Configuration( @@ -489,1143 +497,6 @@ class PersonalPsk(StripeObject): "personal_psk": PersonalPsk, } - class CreateParams(RequestOptions): - bbpos_wisepad3: NotRequired["Configuration.CreateParamsBbposWisepad3"] - """ - An object containing device type specific settings for BBPOS WisePad 3 readers - """ - bbpos_wisepos_e: NotRequired["Configuration.CreateParamsBbposWiseposE"] - """ - An object containing device type specific settings for BBPOS WisePOS E readers - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - name: NotRequired[str] - """ - Name of the configuration - """ - offline: NotRequired["Literal['']|Configuration.CreateParamsOffline"] - """ - Configurations for collecting transactions offline. - """ - reader_security: NotRequired[ - "Literal['']|Configuration.CreateParamsReaderSecurity" - ] - """ - Configurations for reader security settings. - """ - reboot_window: NotRequired["Configuration.CreateParamsRebootWindow"] - """ - Reboot time settings for readers that support customized reboot time configuration. - """ - stripe_s700: NotRequired["Configuration.CreateParamsStripeS700"] - """ - An object containing device type specific settings for Stripe S700 readers - """ - tipping: NotRequired["Literal['']|Configuration.CreateParamsTipping"] - """ - Tipping configurations for readers supporting on-reader tips - """ - verifone_p400: NotRequired["Configuration.CreateParamsVerifoneP400"] - """ - An object containing device type specific settings for Verifone P400 readers - """ - wifi: NotRequired["Literal['']|Configuration.CreateParamsWifi"] - """ - Configurations for connecting to a WiFi network. - """ - - class CreateParamsBbposWisepad3(TypedDict): - splashscreen: NotRequired["Literal['']|str"] - """ - A File ID representing an image you would like displayed on the reader. - """ - - class CreateParamsBbposWiseposE(TypedDict): - splashscreen: NotRequired["Literal['']|str"] - """ - A File ID representing an image to display on the reader - """ - - class CreateParamsOffline(TypedDict): - enabled: bool - """ - Determines whether to allow transactions to be collected while reader is offline. Defaults to false. - """ - - class CreateParamsReaderSecurity(TypedDict): - admin_menu_passcode: NotRequired["Literal['']|str"] - """ - Passcode used to access a reader's admin menu. - """ - - class CreateParamsRebootWindow(TypedDict): - end_hour: int - """ - Integer between 0 to 23 that represents the end hour of the reboot time window. The value must be different than the start_hour. - """ - start_hour: int - """ - Integer between 0 to 23 that represents the start hour of the reboot time window. - """ - - class CreateParamsStripeS700(TypedDict): - splashscreen: NotRequired["Literal['']|str"] - """ - A File ID representing an image you would like displayed on the reader. - """ - - class CreateParamsTipping(TypedDict): - aed: NotRequired["Configuration.CreateParamsTippingAed"] - """ - Tipping configuration for AED - """ - aud: NotRequired["Configuration.CreateParamsTippingAud"] - """ - Tipping configuration for AUD - """ - bgn: NotRequired["Configuration.CreateParamsTippingBgn"] - """ - Tipping configuration for BGN - """ - cad: NotRequired["Configuration.CreateParamsTippingCad"] - """ - Tipping configuration for CAD - """ - chf: NotRequired["Configuration.CreateParamsTippingChf"] - """ - Tipping configuration for CHF - """ - czk: NotRequired["Configuration.CreateParamsTippingCzk"] - """ - Tipping configuration for CZK - """ - dkk: NotRequired["Configuration.CreateParamsTippingDkk"] - """ - Tipping configuration for DKK - """ - eur: NotRequired["Configuration.CreateParamsTippingEur"] - """ - Tipping configuration for EUR - """ - gbp: NotRequired["Configuration.CreateParamsTippingGbp"] - """ - Tipping configuration for GBP - """ - hkd: NotRequired["Configuration.CreateParamsTippingHkd"] - """ - Tipping configuration for HKD - """ - huf: NotRequired["Configuration.CreateParamsTippingHuf"] - """ - Tipping configuration for HUF - """ - jpy: NotRequired["Configuration.CreateParamsTippingJpy"] - """ - Tipping configuration for JPY - """ - mxn: NotRequired["Configuration.CreateParamsTippingMxn"] - """ - Tipping configuration for MXN - """ - myr: NotRequired["Configuration.CreateParamsTippingMyr"] - """ - Tipping configuration for MYR - """ - nok: NotRequired["Configuration.CreateParamsTippingNok"] - """ - Tipping configuration for NOK - """ - nzd: NotRequired["Configuration.CreateParamsTippingNzd"] - """ - Tipping configuration for NZD - """ - pln: NotRequired["Configuration.CreateParamsTippingPln"] - """ - Tipping configuration for PLN - """ - ron: NotRequired["Configuration.CreateParamsTippingRon"] - """ - Tipping configuration for RON - """ - sek: NotRequired["Configuration.CreateParamsTippingSek"] - """ - Tipping configuration for SEK - """ - sgd: NotRequired["Configuration.CreateParamsTippingSgd"] - """ - Tipping configuration for SGD - """ - usd: NotRequired["Configuration.CreateParamsTippingUsd"] - """ - Tipping configuration for USD - """ - - class CreateParamsTippingAed(TypedDict): - fixed_amounts: NotRequired[List[int]] - """ - Fixed amounts displayed when collecting a tip - """ - percentages: NotRequired[List[int]] - """ - Percentages displayed when collecting a tip - """ - smart_tip_threshold: NotRequired[int] - """ - Below this amount, fixed amounts will be displayed; above it, percentages will be displayed - """ - - class CreateParamsTippingAud(TypedDict): - fixed_amounts: NotRequired[List[int]] - """ - Fixed amounts displayed when collecting a tip - """ - percentages: NotRequired[List[int]] - """ - Percentages displayed when collecting a tip - """ - smart_tip_threshold: NotRequired[int] - """ - Below this amount, fixed amounts will be displayed; above it, percentages will be displayed - """ - - class CreateParamsTippingBgn(TypedDict): - fixed_amounts: NotRequired[List[int]] - """ - Fixed amounts displayed when collecting a tip - """ - percentages: NotRequired[List[int]] - """ - Percentages displayed when collecting a tip - """ - smart_tip_threshold: NotRequired[int] - """ - Below this amount, fixed amounts will be displayed; above it, percentages will be displayed - """ - - class CreateParamsTippingCad(TypedDict): - fixed_amounts: NotRequired[List[int]] - """ - Fixed amounts displayed when collecting a tip - """ - percentages: NotRequired[List[int]] - """ - Percentages displayed when collecting a tip - """ - smart_tip_threshold: NotRequired[int] - """ - Below this amount, fixed amounts will be displayed; above it, percentages will be displayed - """ - - class CreateParamsTippingChf(TypedDict): - fixed_amounts: NotRequired[List[int]] - """ - Fixed amounts displayed when collecting a tip - """ - percentages: NotRequired[List[int]] - """ - Percentages displayed when collecting a tip - """ - smart_tip_threshold: NotRequired[int] - """ - Below this amount, fixed amounts will be displayed; above it, percentages will be displayed - """ - - class CreateParamsTippingCzk(TypedDict): - fixed_amounts: NotRequired[List[int]] - """ - Fixed amounts displayed when collecting a tip - """ - percentages: NotRequired[List[int]] - """ - Percentages displayed when collecting a tip - """ - smart_tip_threshold: NotRequired[int] - """ - Below this amount, fixed amounts will be displayed; above it, percentages will be displayed - """ - - class CreateParamsTippingDkk(TypedDict): - fixed_amounts: NotRequired[List[int]] - """ - Fixed amounts displayed when collecting a tip - """ - percentages: NotRequired[List[int]] - """ - Percentages displayed when collecting a tip - """ - smart_tip_threshold: NotRequired[int] - """ - Below this amount, fixed amounts will be displayed; above it, percentages will be displayed - """ - - class CreateParamsTippingEur(TypedDict): - fixed_amounts: NotRequired[List[int]] - """ - Fixed amounts displayed when collecting a tip - """ - percentages: NotRequired[List[int]] - """ - Percentages displayed when collecting a tip - """ - smart_tip_threshold: NotRequired[int] - """ - Below this amount, fixed amounts will be displayed; above it, percentages will be displayed - """ - - class CreateParamsTippingGbp(TypedDict): - fixed_amounts: NotRequired[List[int]] - """ - Fixed amounts displayed when collecting a tip - """ - percentages: NotRequired[List[int]] - """ - Percentages displayed when collecting a tip - """ - smart_tip_threshold: NotRequired[int] - """ - Below this amount, fixed amounts will be displayed; above it, percentages will be displayed - """ - - class CreateParamsTippingHkd(TypedDict): - fixed_amounts: NotRequired[List[int]] - """ - Fixed amounts displayed when collecting a tip - """ - percentages: NotRequired[List[int]] - """ - Percentages displayed when collecting a tip - """ - smart_tip_threshold: NotRequired[int] - """ - Below this amount, fixed amounts will be displayed; above it, percentages will be displayed - """ - - class CreateParamsTippingHuf(TypedDict): - fixed_amounts: NotRequired[List[int]] - """ - Fixed amounts displayed when collecting a tip - """ - percentages: NotRequired[List[int]] - """ - Percentages displayed when collecting a tip - """ - smart_tip_threshold: NotRequired[int] - """ - Below this amount, fixed amounts will be displayed; above it, percentages will be displayed - """ - - class CreateParamsTippingJpy(TypedDict): - fixed_amounts: NotRequired[List[int]] - """ - Fixed amounts displayed when collecting a tip - """ - percentages: NotRequired[List[int]] - """ - Percentages displayed when collecting a tip - """ - smart_tip_threshold: NotRequired[int] - """ - Below this amount, fixed amounts will be displayed; above it, percentages will be displayed - """ - - class CreateParamsTippingMxn(TypedDict): - fixed_amounts: NotRequired[List[int]] - """ - Fixed amounts displayed when collecting a tip - """ - percentages: NotRequired[List[int]] - """ - Percentages displayed when collecting a tip - """ - smart_tip_threshold: NotRequired[int] - """ - Below this amount, fixed amounts will be displayed; above it, percentages will be displayed - """ - - class CreateParamsTippingMyr(TypedDict): - fixed_amounts: NotRequired[List[int]] - """ - Fixed amounts displayed when collecting a tip - """ - percentages: NotRequired[List[int]] - """ - Percentages displayed when collecting a tip - """ - smart_tip_threshold: NotRequired[int] - """ - Below this amount, fixed amounts will be displayed; above it, percentages will be displayed - """ - - class CreateParamsTippingNok(TypedDict): - fixed_amounts: NotRequired[List[int]] - """ - Fixed amounts displayed when collecting a tip - """ - percentages: NotRequired[List[int]] - """ - Percentages displayed when collecting a tip - """ - smart_tip_threshold: NotRequired[int] - """ - Below this amount, fixed amounts will be displayed; above it, percentages will be displayed - """ - - class CreateParamsTippingNzd(TypedDict): - fixed_amounts: NotRequired[List[int]] - """ - Fixed amounts displayed when collecting a tip - """ - percentages: NotRequired[List[int]] - """ - Percentages displayed when collecting a tip - """ - smart_tip_threshold: NotRequired[int] - """ - Below this amount, fixed amounts will be displayed; above it, percentages will be displayed - """ - - class CreateParamsTippingPln(TypedDict): - fixed_amounts: NotRequired[List[int]] - """ - Fixed amounts displayed when collecting a tip - """ - percentages: NotRequired[List[int]] - """ - Percentages displayed when collecting a tip - """ - smart_tip_threshold: NotRequired[int] - """ - Below this amount, fixed amounts will be displayed; above it, percentages will be displayed - """ - - class CreateParamsTippingRon(TypedDict): - fixed_amounts: NotRequired[List[int]] - """ - Fixed amounts displayed when collecting a tip - """ - percentages: NotRequired[List[int]] - """ - Percentages displayed when collecting a tip - """ - smart_tip_threshold: NotRequired[int] - """ - Below this amount, fixed amounts will be displayed; above it, percentages will be displayed - """ - - class CreateParamsTippingSek(TypedDict): - fixed_amounts: NotRequired[List[int]] - """ - Fixed amounts displayed when collecting a tip - """ - percentages: NotRequired[List[int]] - """ - Percentages displayed when collecting a tip - """ - smart_tip_threshold: NotRequired[int] - """ - Below this amount, fixed amounts will be displayed; above it, percentages will be displayed - """ - - class CreateParamsTippingSgd(TypedDict): - fixed_amounts: NotRequired[List[int]] - """ - Fixed amounts displayed when collecting a tip - """ - percentages: NotRequired[List[int]] - """ - Percentages displayed when collecting a tip - """ - smart_tip_threshold: NotRequired[int] - """ - Below this amount, fixed amounts will be displayed; above it, percentages will be displayed - """ - - class CreateParamsTippingUsd(TypedDict): - fixed_amounts: NotRequired[List[int]] - """ - Fixed amounts displayed when collecting a tip - """ - percentages: NotRequired[List[int]] - """ - Percentages displayed when collecting a tip - """ - smart_tip_threshold: NotRequired[int] - """ - Below this amount, fixed amounts will be displayed; above it, percentages will be displayed - """ - - class CreateParamsVerifoneP400(TypedDict): - splashscreen: NotRequired["Literal['']|str"] - """ - A File ID representing an image you would like displayed on the reader. - """ - - class CreateParamsWifi(TypedDict): - enterprise_eap_peap: NotRequired[ - "Configuration.CreateParamsWifiEnterpriseEapPeap" - ] - """ - Credentials for a WPA-Enterprise WiFi network using the EAP-PEAP authentication method. - """ - enterprise_eap_tls: NotRequired[ - "Configuration.CreateParamsWifiEnterpriseEapTls" - ] - """ - Credentials for a WPA-Enterprise WiFi network using the EAP-TLS authentication method. - """ - personal_psk: NotRequired["Configuration.CreateParamsWifiPersonalPsk"] - """ - Credentials for a WPA-Personal WiFi network. - """ - type: Literal[ - "enterprise_eap_peap", "enterprise_eap_tls", "personal_psk" - ] - """ - Security type of the WiFi network. Fill out the hash with the corresponding name to provide the set of credentials for this security type. - """ - - class CreateParamsWifiEnterpriseEapPeap(TypedDict): - ca_certificate_file: NotRequired[str] - """ - A File ID representing a PEM file containing the server certificate - """ - password: str - """ - Password for connecting to the WiFi network - """ - ssid: str - """ - Name of the WiFi network - """ - username: str - """ - Username for connecting to the WiFi network - """ - - class CreateParamsWifiEnterpriseEapTls(TypedDict): - ca_certificate_file: NotRequired[str] - """ - A File ID representing a PEM file containing the server certificate - """ - client_certificate_file: str - """ - A File ID representing a PEM file containing the client certificate - """ - private_key_file: str - """ - A File ID representing a PEM file containing the client RSA private key - """ - private_key_file_password: NotRequired[str] - """ - Password for the private key file - """ - ssid: str - """ - Name of the WiFi network - """ - - class CreateParamsWifiPersonalPsk(TypedDict): - password: str - """ - Password for connecting to the WiFi network - """ - ssid: str - """ - Name of the WiFi network - """ - - class DeleteParams(RequestOptions): - pass - - class ListParams(RequestOptions): - 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. - """ - is_account_default: NotRequired[bool] - """ - if present, only return the account default or non-default configurations. - """ - 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 ModifyParams(RequestOptions): - bbpos_wisepad3: NotRequired[ - "Literal['']|Configuration.ModifyParamsBbposWisepad3" - ] - """ - An object containing device type specific settings for BBPOS WisePad 3 readers - """ - bbpos_wisepos_e: NotRequired[ - "Literal['']|Configuration.ModifyParamsBbposWiseposE" - ] - """ - An object containing device type specific settings for BBPOS WisePOS E readers - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - name: NotRequired[str] - """ - Name of the configuration - """ - offline: NotRequired["Literal['']|Configuration.ModifyParamsOffline"] - """ - Configurations for collecting transactions offline. - """ - reader_security: NotRequired[ - "Literal['']|Configuration.ModifyParamsReaderSecurity" - ] - """ - Configurations for reader security settings. - """ - reboot_window: NotRequired[ - "Literal['']|Configuration.ModifyParamsRebootWindow" - ] - """ - Reboot time settings for readers that support customized reboot time configuration. - """ - stripe_s700: NotRequired[ - "Literal['']|Configuration.ModifyParamsStripeS700" - ] - """ - An object containing device type specific settings for Stripe S700 readers - """ - tipping: NotRequired["Literal['']|Configuration.ModifyParamsTipping"] - """ - Tipping configurations for readers supporting on-reader tips - """ - verifone_p400: NotRequired[ - "Literal['']|Configuration.ModifyParamsVerifoneP400" - ] - """ - An object containing device type specific settings for Verifone P400 readers - """ - wifi: NotRequired["Literal['']|Configuration.ModifyParamsWifi"] - """ - Configurations for connecting to a WiFi network. - """ - - class ModifyParamsBbposWisepad3(TypedDict): - splashscreen: NotRequired["Literal['']|str"] - """ - A File ID representing an image you would like displayed on the reader. - """ - - class ModifyParamsBbposWiseposE(TypedDict): - splashscreen: NotRequired["Literal['']|str"] - """ - A File ID representing an image to display on the reader - """ - - class ModifyParamsOffline(TypedDict): - enabled: bool - """ - Determines whether to allow transactions to be collected while reader is offline. Defaults to false. - """ - - class ModifyParamsReaderSecurity(TypedDict): - admin_menu_passcode: NotRequired["Literal['']|str"] - """ - Passcode used to access a reader's admin menu. - """ - - class ModifyParamsRebootWindow(TypedDict): - end_hour: int - """ - Integer between 0 to 23 that represents the end hour of the reboot time window. The value must be different than the start_hour. - """ - start_hour: int - """ - Integer between 0 to 23 that represents the start hour of the reboot time window. - """ - - class ModifyParamsStripeS700(TypedDict): - splashscreen: NotRequired["Literal['']|str"] - """ - A File ID representing an image you would like displayed on the reader. - """ - - class ModifyParamsTipping(TypedDict): - aed: NotRequired["Configuration.ModifyParamsTippingAed"] - """ - Tipping configuration for AED - """ - aud: NotRequired["Configuration.ModifyParamsTippingAud"] - """ - Tipping configuration for AUD - """ - bgn: NotRequired["Configuration.ModifyParamsTippingBgn"] - """ - Tipping configuration for BGN - """ - cad: NotRequired["Configuration.ModifyParamsTippingCad"] - """ - Tipping configuration for CAD - """ - chf: NotRequired["Configuration.ModifyParamsTippingChf"] - """ - Tipping configuration for CHF - """ - czk: NotRequired["Configuration.ModifyParamsTippingCzk"] - """ - Tipping configuration for CZK - """ - dkk: NotRequired["Configuration.ModifyParamsTippingDkk"] - """ - Tipping configuration for DKK - """ - eur: NotRequired["Configuration.ModifyParamsTippingEur"] - """ - Tipping configuration for EUR - """ - gbp: NotRequired["Configuration.ModifyParamsTippingGbp"] - """ - Tipping configuration for GBP - """ - hkd: NotRequired["Configuration.ModifyParamsTippingHkd"] - """ - Tipping configuration for HKD - """ - huf: NotRequired["Configuration.ModifyParamsTippingHuf"] - """ - Tipping configuration for HUF - """ - jpy: NotRequired["Configuration.ModifyParamsTippingJpy"] - """ - Tipping configuration for JPY - """ - mxn: NotRequired["Configuration.ModifyParamsTippingMxn"] - """ - Tipping configuration for MXN - """ - myr: NotRequired["Configuration.ModifyParamsTippingMyr"] - """ - Tipping configuration for MYR - """ - nok: NotRequired["Configuration.ModifyParamsTippingNok"] - """ - Tipping configuration for NOK - """ - nzd: NotRequired["Configuration.ModifyParamsTippingNzd"] - """ - Tipping configuration for NZD - """ - pln: NotRequired["Configuration.ModifyParamsTippingPln"] - """ - Tipping configuration for PLN - """ - ron: NotRequired["Configuration.ModifyParamsTippingRon"] - """ - Tipping configuration for RON - """ - sek: NotRequired["Configuration.ModifyParamsTippingSek"] - """ - Tipping configuration for SEK - """ - sgd: NotRequired["Configuration.ModifyParamsTippingSgd"] - """ - Tipping configuration for SGD - """ - usd: NotRequired["Configuration.ModifyParamsTippingUsd"] - """ - Tipping configuration for USD - """ - - class ModifyParamsTippingAed(TypedDict): - fixed_amounts: NotRequired[List[int]] - """ - Fixed amounts displayed when collecting a tip - """ - percentages: NotRequired[List[int]] - """ - Percentages displayed when collecting a tip - """ - smart_tip_threshold: NotRequired[int] - """ - Below this amount, fixed amounts will be displayed; above it, percentages will be displayed - """ - - class ModifyParamsTippingAud(TypedDict): - fixed_amounts: NotRequired[List[int]] - """ - Fixed amounts displayed when collecting a tip - """ - percentages: NotRequired[List[int]] - """ - Percentages displayed when collecting a tip - """ - smart_tip_threshold: NotRequired[int] - """ - Below this amount, fixed amounts will be displayed; above it, percentages will be displayed - """ - - class ModifyParamsTippingBgn(TypedDict): - fixed_amounts: NotRequired[List[int]] - """ - Fixed amounts displayed when collecting a tip - """ - percentages: NotRequired[List[int]] - """ - Percentages displayed when collecting a tip - """ - smart_tip_threshold: NotRequired[int] - """ - Below this amount, fixed amounts will be displayed; above it, percentages will be displayed - """ - - class ModifyParamsTippingCad(TypedDict): - fixed_amounts: NotRequired[List[int]] - """ - Fixed amounts displayed when collecting a tip - """ - percentages: NotRequired[List[int]] - """ - Percentages displayed when collecting a tip - """ - smart_tip_threshold: NotRequired[int] - """ - Below this amount, fixed amounts will be displayed; above it, percentages will be displayed - """ - - class ModifyParamsTippingChf(TypedDict): - fixed_amounts: NotRequired[List[int]] - """ - Fixed amounts displayed when collecting a tip - """ - percentages: NotRequired[List[int]] - """ - Percentages displayed when collecting a tip - """ - smart_tip_threshold: NotRequired[int] - """ - Below this amount, fixed amounts will be displayed; above it, percentages will be displayed - """ - - class ModifyParamsTippingCzk(TypedDict): - fixed_amounts: NotRequired[List[int]] - """ - Fixed amounts displayed when collecting a tip - """ - percentages: NotRequired[List[int]] - """ - Percentages displayed when collecting a tip - """ - smart_tip_threshold: NotRequired[int] - """ - Below this amount, fixed amounts will be displayed; above it, percentages will be displayed - """ - - class ModifyParamsTippingDkk(TypedDict): - fixed_amounts: NotRequired[List[int]] - """ - Fixed amounts displayed when collecting a tip - """ - percentages: NotRequired[List[int]] - """ - Percentages displayed when collecting a tip - """ - smart_tip_threshold: NotRequired[int] - """ - Below this amount, fixed amounts will be displayed; above it, percentages will be displayed - """ - - class ModifyParamsTippingEur(TypedDict): - fixed_amounts: NotRequired[List[int]] - """ - Fixed amounts displayed when collecting a tip - """ - percentages: NotRequired[List[int]] - """ - Percentages displayed when collecting a tip - """ - smart_tip_threshold: NotRequired[int] - """ - Below this amount, fixed amounts will be displayed; above it, percentages will be displayed - """ - - class ModifyParamsTippingGbp(TypedDict): - fixed_amounts: NotRequired[List[int]] - """ - Fixed amounts displayed when collecting a tip - """ - percentages: NotRequired[List[int]] - """ - Percentages displayed when collecting a tip - """ - smart_tip_threshold: NotRequired[int] - """ - Below this amount, fixed amounts will be displayed; above it, percentages will be displayed - """ - - class ModifyParamsTippingHkd(TypedDict): - fixed_amounts: NotRequired[List[int]] - """ - Fixed amounts displayed when collecting a tip - """ - percentages: NotRequired[List[int]] - """ - Percentages displayed when collecting a tip - """ - smart_tip_threshold: NotRequired[int] - """ - Below this amount, fixed amounts will be displayed; above it, percentages will be displayed - """ - - class ModifyParamsTippingHuf(TypedDict): - fixed_amounts: NotRequired[List[int]] - """ - Fixed amounts displayed when collecting a tip - """ - percentages: NotRequired[List[int]] - """ - Percentages displayed when collecting a tip - """ - smart_tip_threshold: NotRequired[int] - """ - Below this amount, fixed amounts will be displayed; above it, percentages will be displayed - """ - - class ModifyParamsTippingJpy(TypedDict): - fixed_amounts: NotRequired[List[int]] - """ - Fixed amounts displayed when collecting a tip - """ - percentages: NotRequired[List[int]] - """ - Percentages displayed when collecting a tip - """ - smart_tip_threshold: NotRequired[int] - """ - Below this amount, fixed amounts will be displayed; above it, percentages will be displayed - """ - - class ModifyParamsTippingMxn(TypedDict): - fixed_amounts: NotRequired[List[int]] - """ - Fixed amounts displayed when collecting a tip - """ - percentages: NotRequired[List[int]] - """ - Percentages displayed when collecting a tip - """ - smart_tip_threshold: NotRequired[int] - """ - Below this amount, fixed amounts will be displayed; above it, percentages will be displayed - """ - - class ModifyParamsTippingMyr(TypedDict): - fixed_amounts: NotRequired[List[int]] - """ - Fixed amounts displayed when collecting a tip - """ - percentages: NotRequired[List[int]] - """ - Percentages displayed when collecting a tip - """ - smart_tip_threshold: NotRequired[int] - """ - Below this amount, fixed amounts will be displayed; above it, percentages will be displayed - """ - - class ModifyParamsTippingNok(TypedDict): - fixed_amounts: NotRequired[List[int]] - """ - Fixed amounts displayed when collecting a tip - """ - percentages: NotRequired[List[int]] - """ - Percentages displayed when collecting a tip - """ - smart_tip_threshold: NotRequired[int] - """ - Below this amount, fixed amounts will be displayed; above it, percentages will be displayed - """ - - class ModifyParamsTippingNzd(TypedDict): - fixed_amounts: NotRequired[List[int]] - """ - Fixed amounts displayed when collecting a tip - """ - percentages: NotRequired[List[int]] - """ - Percentages displayed when collecting a tip - """ - smart_tip_threshold: NotRequired[int] - """ - Below this amount, fixed amounts will be displayed; above it, percentages will be displayed - """ - - class ModifyParamsTippingPln(TypedDict): - fixed_amounts: NotRequired[List[int]] - """ - Fixed amounts displayed when collecting a tip - """ - percentages: NotRequired[List[int]] - """ - Percentages displayed when collecting a tip - """ - smart_tip_threshold: NotRequired[int] - """ - Below this amount, fixed amounts will be displayed; above it, percentages will be displayed - """ - - class ModifyParamsTippingRon(TypedDict): - fixed_amounts: NotRequired[List[int]] - """ - Fixed amounts displayed when collecting a tip - """ - percentages: NotRequired[List[int]] - """ - Percentages displayed when collecting a tip - """ - smart_tip_threshold: NotRequired[int] - """ - Below this amount, fixed amounts will be displayed; above it, percentages will be displayed - """ - - class ModifyParamsTippingSek(TypedDict): - fixed_amounts: NotRequired[List[int]] - """ - Fixed amounts displayed when collecting a tip - """ - percentages: NotRequired[List[int]] - """ - Percentages displayed when collecting a tip - """ - smart_tip_threshold: NotRequired[int] - """ - Below this amount, fixed amounts will be displayed; above it, percentages will be displayed - """ - - class ModifyParamsTippingSgd(TypedDict): - fixed_amounts: NotRequired[List[int]] - """ - Fixed amounts displayed when collecting a tip - """ - percentages: NotRequired[List[int]] - """ - Percentages displayed when collecting a tip - """ - smart_tip_threshold: NotRequired[int] - """ - Below this amount, fixed amounts will be displayed; above it, percentages will be displayed - """ - - class ModifyParamsTippingUsd(TypedDict): - fixed_amounts: NotRequired[List[int]] - """ - Fixed amounts displayed when collecting a tip - """ - percentages: NotRequired[List[int]] - """ - Percentages displayed when collecting a tip - """ - smart_tip_threshold: NotRequired[int] - """ - Below this amount, fixed amounts will be displayed; above it, percentages will be displayed - """ - - class ModifyParamsVerifoneP400(TypedDict): - splashscreen: NotRequired["Literal['']|str"] - """ - A File ID representing an image you would like displayed on the reader. - """ - - class ModifyParamsWifi(TypedDict): - enterprise_eap_peap: NotRequired[ - "Configuration.ModifyParamsWifiEnterpriseEapPeap" - ] - """ - Credentials for a WPA-Enterprise WiFi network using the EAP-PEAP authentication method. - """ - enterprise_eap_tls: NotRequired[ - "Configuration.ModifyParamsWifiEnterpriseEapTls" - ] - """ - Credentials for a WPA-Enterprise WiFi network using the EAP-TLS authentication method. - """ - personal_psk: NotRequired["Configuration.ModifyParamsWifiPersonalPsk"] - """ - Credentials for a WPA-Personal WiFi network. - """ - type: Literal[ - "enterprise_eap_peap", "enterprise_eap_tls", "personal_psk" - ] - """ - Security type of the WiFi network. Fill out the hash with the corresponding name to provide the set of credentials for this security type. - """ - - class ModifyParamsWifiEnterpriseEapPeap(TypedDict): - ca_certificate_file: NotRequired[str] - """ - A File ID representing a PEM file containing the server certificate - """ - password: str - """ - Password for connecting to the WiFi network - """ - ssid: str - """ - Name of the WiFi network - """ - username: str - """ - Username for connecting to the WiFi network - """ - - class ModifyParamsWifiEnterpriseEapTls(TypedDict): - ca_certificate_file: NotRequired[str] - """ - A File ID representing a PEM file containing the server certificate - """ - client_certificate_file: str - """ - A File ID representing a PEM file containing the client certificate - """ - private_key_file: str - """ - A File ID representing a PEM file containing the client RSA private key - """ - private_key_file_password: NotRequired[str] - """ - Password for the private key file - """ - ssid: str - """ - Name of the WiFi network - """ - - class ModifyParamsWifiPersonalPsk(TypedDict): - password: str - """ - Password for connecting to the WiFi network - """ - ssid: str - """ - Name of the WiFi network - """ - - class RetrieveParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - bbpos_wisepad3: Optional[BbposWisepad3] bbpos_wisepos_e: Optional[BbposWiseposE] deleted: Optional[Literal[True]] @@ -1662,7 +533,7 @@ class RetrieveParams(RequestOptions): @classmethod def create( - cls, **params: Unpack["Configuration.CreateParams"] + cls, **params: Unpack["ConfigurationCreateParams"] ) -> "Configuration": """ Creates a new Configuration object. @@ -1678,7 +549,7 @@ def create( @classmethod async def create_async( - cls, **params: Unpack["Configuration.CreateParams"] + cls, **params: Unpack["ConfigurationCreateParams"] ) -> "Configuration": """ Creates a new Configuration object. @@ -1694,7 +565,7 @@ async def create_async( @classmethod def _cls_delete( - cls, sid: str, **params: Unpack["Configuration.DeleteParams"] + cls, sid: str, **params: Unpack["ConfigurationDeleteParams"] ) -> "Configuration": """ Deletes a Configuration object. @@ -1712,7 +583,7 @@ def _cls_delete( @overload @staticmethod def delete( - sid: str, **params: Unpack["Configuration.DeleteParams"] + sid: str, **params: Unpack["ConfigurationDeleteParams"] ) -> "Configuration": """ Deletes a Configuration object. @@ -1721,7 +592,7 @@ def delete( @overload def delete( - self, **params: Unpack["Configuration.DeleteParams"] + self, **params: Unpack["ConfigurationDeleteParams"] ) -> "Configuration": """ Deletes a Configuration object. @@ -1730,7 +601,7 @@ def delete( @class_method_variant("_cls_delete") def delete( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Configuration.DeleteParams"] + self, **params: Unpack["ConfigurationDeleteParams"] ) -> "Configuration": """ Deletes a Configuration object. @@ -1743,7 +614,7 @@ def delete( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_delete_async( - cls, sid: str, **params: Unpack["Configuration.DeleteParams"] + cls, sid: str, **params: Unpack["ConfigurationDeleteParams"] ) -> "Configuration": """ Deletes a Configuration object. @@ -1761,7 +632,7 @@ async def _cls_delete_async( @overload @staticmethod async def delete_async( - sid: str, **params: Unpack["Configuration.DeleteParams"] + sid: str, **params: Unpack["ConfigurationDeleteParams"] ) -> "Configuration": """ Deletes a Configuration object. @@ -1770,7 +641,7 @@ async def delete_async( @overload async def delete_async( - self, **params: Unpack["Configuration.DeleteParams"] + self, **params: Unpack["ConfigurationDeleteParams"] ) -> "Configuration": """ Deletes a Configuration object. @@ -1779,7 +650,7 @@ async def delete_async( @class_method_variant("_cls_delete_async") async def delete_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Configuration.DeleteParams"] + self, **params: Unpack["ConfigurationDeleteParams"] ) -> "Configuration": """ Deletes a Configuration object. @@ -1792,7 +663,7 @@ async def delete_async( # pyright: ignore[reportGeneralTypeIssues] @classmethod def list( - cls, **params: Unpack["Configuration.ListParams"] + cls, **params: Unpack["ConfigurationListParams"] ) -> ListObject["Configuration"]: """ Returns a list of Configuration objects. @@ -1812,7 +683,7 @@ def list( @classmethod async def list_async( - cls, **params: Unpack["Configuration.ListParams"] + cls, **params: Unpack["ConfigurationListParams"] ) -> ListObject["Configuration"]: """ Returns a list of Configuration objects. @@ -1832,7 +703,7 @@ async def list_async( @classmethod def modify( - cls, id: str, **params: Unpack["Configuration.ModifyParams"] + cls, id: str, **params: Unpack["ConfigurationModifyParams"] ) -> "Configuration": """ Updates a new Configuration object. @@ -1849,7 +720,7 @@ def modify( @classmethod async def modify_async( - cls, id: str, **params: Unpack["Configuration.ModifyParams"] + cls, id: str, **params: Unpack["ConfigurationModifyParams"] ) -> "Configuration": """ Updates a new Configuration object. @@ -1866,7 +737,7 @@ async def modify_async( @classmethod def retrieve( - cls, id: str, **params: Unpack["Configuration.RetrieveParams"] + cls, id: str, **params: Unpack["ConfigurationRetrieveParams"] ) -> "Configuration": """ Retrieves a Configuration object. @@ -1877,7 +748,7 @@ def retrieve( @classmethod async def retrieve_async( - cls, id: str, **params: Unpack["Configuration.RetrieveParams"] + cls, id: str, **params: Unpack["ConfigurationRetrieveParams"] ) -> "Configuration": """ Retrieves a Configuration object. diff --git a/stripe/terminal/_configuration_service.py b/stripe/terminal/_configuration_service.py index f08998eca..f7f3350c2 100644 --- a/stripe/terminal/_configuration_service.py +++ b/stripe/terminal/_configuration_service.py @@ -5,1172 +5,32 @@ from stripe._stripe_service import StripeService from stripe._util import sanitize_id from stripe.terminal._configuration import Configuration -from typing import List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params.terminal._configuration_create_params import ( + ConfigurationCreateParams, + ) + from stripe.params.terminal._configuration_delete_params import ( + ConfigurationDeleteParams, + ) + from stripe.params.terminal._configuration_list_params import ( + ConfigurationListParams, + ) + from stripe.params.terminal._configuration_retrieve_params import ( + ConfigurationRetrieveParams, + ) + from stripe.params.terminal._configuration_update_params import ( + ConfigurationUpdateParams, + ) class ConfigurationService(StripeService): - class CreateParams(TypedDict): - bbpos_wisepad3: NotRequired[ - "ConfigurationService.CreateParamsBbposWisepad3" - ] - """ - An object containing device type specific settings for BBPOS WisePad 3 readers - """ - bbpos_wisepos_e: NotRequired[ - "ConfigurationService.CreateParamsBbposWiseposE" - ] - """ - An object containing device type specific settings for BBPOS WisePOS E readers - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - name: NotRequired[str] - """ - Name of the configuration - """ - offline: NotRequired[ - "Literal['']|ConfigurationService.CreateParamsOffline" - ] - """ - Configurations for collecting transactions offline. - """ - reader_security: NotRequired[ - "Literal['']|ConfigurationService.CreateParamsReaderSecurity" - ] - """ - Configurations for reader security settings. - """ - reboot_window: NotRequired[ - "ConfigurationService.CreateParamsRebootWindow" - ] - """ - Reboot time settings for readers that support customized reboot time configuration. - """ - stripe_s700: NotRequired["ConfigurationService.CreateParamsStripeS700"] - """ - An object containing device type specific settings for Stripe S700 readers - """ - tipping: NotRequired[ - "Literal['']|ConfigurationService.CreateParamsTipping" - ] - """ - Tipping configurations for readers supporting on-reader tips - """ - verifone_p400: NotRequired[ - "ConfigurationService.CreateParamsVerifoneP400" - ] - """ - An object containing device type specific settings for Verifone P400 readers - """ - wifi: NotRequired["Literal['']|ConfigurationService.CreateParamsWifi"] - """ - Configurations for connecting to a WiFi network. - """ - - class CreateParamsBbposWisepad3(TypedDict): - splashscreen: NotRequired["Literal['']|str"] - """ - A File ID representing an image you would like displayed on the reader. - """ - - class CreateParamsBbposWiseposE(TypedDict): - splashscreen: NotRequired["Literal['']|str"] - """ - A File ID representing an image to display on the reader - """ - - class CreateParamsOffline(TypedDict): - enabled: bool - """ - Determines whether to allow transactions to be collected while reader is offline. Defaults to false. - """ - - class CreateParamsReaderSecurity(TypedDict): - admin_menu_passcode: NotRequired["Literal['']|str"] - """ - Passcode used to access a reader's admin menu. - """ - - class CreateParamsRebootWindow(TypedDict): - end_hour: int - """ - Integer between 0 to 23 that represents the end hour of the reboot time window. The value must be different than the start_hour. - """ - start_hour: int - """ - Integer between 0 to 23 that represents the start hour of the reboot time window. - """ - - class CreateParamsStripeS700(TypedDict): - splashscreen: NotRequired["Literal['']|str"] - """ - A File ID representing an image you would like displayed on the reader. - """ - - class CreateParamsTipping(TypedDict): - aed: NotRequired["ConfigurationService.CreateParamsTippingAed"] - """ - Tipping configuration for AED - """ - aud: NotRequired["ConfigurationService.CreateParamsTippingAud"] - """ - Tipping configuration for AUD - """ - bgn: NotRequired["ConfigurationService.CreateParamsTippingBgn"] - """ - Tipping configuration for BGN - """ - cad: NotRequired["ConfigurationService.CreateParamsTippingCad"] - """ - Tipping configuration for CAD - """ - chf: NotRequired["ConfigurationService.CreateParamsTippingChf"] - """ - Tipping configuration for CHF - """ - czk: NotRequired["ConfigurationService.CreateParamsTippingCzk"] - """ - Tipping configuration for CZK - """ - dkk: NotRequired["ConfigurationService.CreateParamsTippingDkk"] - """ - Tipping configuration for DKK - """ - eur: NotRequired["ConfigurationService.CreateParamsTippingEur"] - """ - Tipping configuration for EUR - """ - gbp: NotRequired["ConfigurationService.CreateParamsTippingGbp"] - """ - Tipping configuration for GBP - """ - hkd: NotRequired["ConfigurationService.CreateParamsTippingHkd"] - """ - Tipping configuration for HKD - """ - huf: NotRequired["ConfigurationService.CreateParamsTippingHuf"] - """ - Tipping configuration for HUF - """ - jpy: NotRequired["ConfigurationService.CreateParamsTippingJpy"] - """ - Tipping configuration for JPY - """ - mxn: NotRequired["ConfigurationService.CreateParamsTippingMxn"] - """ - Tipping configuration for MXN - """ - myr: NotRequired["ConfigurationService.CreateParamsTippingMyr"] - """ - Tipping configuration for MYR - """ - nok: NotRequired["ConfigurationService.CreateParamsTippingNok"] - """ - Tipping configuration for NOK - """ - nzd: NotRequired["ConfigurationService.CreateParamsTippingNzd"] - """ - Tipping configuration for NZD - """ - pln: NotRequired["ConfigurationService.CreateParamsTippingPln"] - """ - Tipping configuration for PLN - """ - ron: NotRequired["ConfigurationService.CreateParamsTippingRon"] - """ - Tipping configuration for RON - """ - sek: NotRequired["ConfigurationService.CreateParamsTippingSek"] - """ - Tipping configuration for SEK - """ - sgd: NotRequired["ConfigurationService.CreateParamsTippingSgd"] - """ - Tipping configuration for SGD - """ - usd: NotRequired["ConfigurationService.CreateParamsTippingUsd"] - """ - Tipping configuration for USD - """ - - class CreateParamsTippingAed(TypedDict): - fixed_amounts: NotRequired[List[int]] - """ - Fixed amounts displayed when collecting a tip - """ - percentages: NotRequired[List[int]] - """ - Percentages displayed when collecting a tip - """ - smart_tip_threshold: NotRequired[int] - """ - Below this amount, fixed amounts will be displayed; above it, percentages will be displayed - """ - - class CreateParamsTippingAud(TypedDict): - fixed_amounts: NotRequired[List[int]] - """ - Fixed amounts displayed when collecting a tip - """ - percentages: NotRequired[List[int]] - """ - Percentages displayed when collecting a tip - """ - smart_tip_threshold: NotRequired[int] - """ - Below this amount, fixed amounts will be displayed; above it, percentages will be displayed - """ - - class CreateParamsTippingBgn(TypedDict): - fixed_amounts: NotRequired[List[int]] - """ - Fixed amounts displayed when collecting a tip - """ - percentages: NotRequired[List[int]] - """ - Percentages displayed when collecting a tip - """ - smart_tip_threshold: NotRequired[int] - """ - Below this amount, fixed amounts will be displayed; above it, percentages will be displayed - """ - - class CreateParamsTippingCad(TypedDict): - fixed_amounts: NotRequired[List[int]] - """ - Fixed amounts displayed when collecting a tip - """ - percentages: NotRequired[List[int]] - """ - Percentages displayed when collecting a tip - """ - smart_tip_threshold: NotRequired[int] - """ - Below this amount, fixed amounts will be displayed; above it, percentages will be displayed - """ - - class CreateParamsTippingChf(TypedDict): - fixed_amounts: NotRequired[List[int]] - """ - Fixed amounts displayed when collecting a tip - """ - percentages: NotRequired[List[int]] - """ - Percentages displayed when collecting a tip - """ - smart_tip_threshold: NotRequired[int] - """ - Below this amount, fixed amounts will be displayed; above it, percentages will be displayed - """ - - class CreateParamsTippingCzk(TypedDict): - fixed_amounts: NotRequired[List[int]] - """ - Fixed amounts displayed when collecting a tip - """ - percentages: NotRequired[List[int]] - """ - Percentages displayed when collecting a tip - """ - smart_tip_threshold: NotRequired[int] - """ - Below this amount, fixed amounts will be displayed; above it, percentages will be displayed - """ - - class CreateParamsTippingDkk(TypedDict): - fixed_amounts: NotRequired[List[int]] - """ - Fixed amounts displayed when collecting a tip - """ - percentages: NotRequired[List[int]] - """ - Percentages displayed when collecting a tip - """ - smart_tip_threshold: NotRequired[int] - """ - Below this amount, fixed amounts will be displayed; above it, percentages will be displayed - """ - - class CreateParamsTippingEur(TypedDict): - fixed_amounts: NotRequired[List[int]] - """ - Fixed amounts displayed when collecting a tip - """ - percentages: NotRequired[List[int]] - """ - Percentages displayed when collecting a tip - """ - smart_tip_threshold: NotRequired[int] - """ - Below this amount, fixed amounts will be displayed; above it, percentages will be displayed - """ - - class CreateParamsTippingGbp(TypedDict): - fixed_amounts: NotRequired[List[int]] - """ - Fixed amounts displayed when collecting a tip - """ - percentages: NotRequired[List[int]] - """ - Percentages displayed when collecting a tip - """ - smart_tip_threshold: NotRequired[int] - """ - Below this amount, fixed amounts will be displayed; above it, percentages will be displayed - """ - - class CreateParamsTippingHkd(TypedDict): - fixed_amounts: NotRequired[List[int]] - """ - Fixed amounts displayed when collecting a tip - """ - percentages: NotRequired[List[int]] - """ - Percentages displayed when collecting a tip - """ - smart_tip_threshold: NotRequired[int] - """ - Below this amount, fixed amounts will be displayed; above it, percentages will be displayed - """ - - class CreateParamsTippingHuf(TypedDict): - fixed_amounts: NotRequired[List[int]] - """ - Fixed amounts displayed when collecting a tip - """ - percentages: NotRequired[List[int]] - """ - Percentages displayed when collecting a tip - """ - smart_tip_threshold: NotRequired[int] - """ - Below this amount, fixed amounts will be displayed; above it, percentages will be displayed - """ - - class CreateParamsTippingJpy(TypedDict): - fixed_amounts: NotRequired[List[int]] - """ - Fixed amounts displayed when collecting a tip - """ - percentages: NotRequired[List[int]] - """ - Percentages displayed when collecting a tip - """ - smart_tip_threshold: NotRequired[int] - """ - Below this amount, fixed amounts will be displayed; above it, percentages will be displayed - """ - - class CreateParamsTippingMxn(TypedDict): - fixed_amounts: NotRequired[List[int]] - """ - Fixed amounts displayed when collecting a tip - """ - percentages: NotRequired[List[int]] - """ - Percentages displayed when collecting a tip - """ - smart_tip_threshold: NotRequired[int] - """ - Below this amount, fixed amounts will be displayed; above it, percentages will be displayed - """ - - class CreateParamsTippingMyr(TypedDict): - fixed_amounts: NotRequired[List[int]] - """ - Fixed amounts displayed when collecting a tip - """ - percentages: NotRequired[List[int]] - """ - Percentages displayed when collecting a tip - """ - smart_tip_threshold: NotRequired[int] - """ - Below this amount, fixed amounts will be displayed; above it, percentages will be displayed - """ - - class CreateParamsTippingNok(TypedDict): - fixed_amounts: NotRequired[List[int]] - """ - Fixed amounts displayed when collecting a tip - """ - percentages: NotRequired[List[int]] - """ - Percentages displayed when collecting a tip - """ - smart_tip_threshold: NotRequired[int] - """ - Below this amount, fixed amounts will be displayed; above it, percentages will be displayed - """ - - class CreateParamsTippingNzd(TypedDict): - fixed_amounts: NotRequired[List[int]] - """ - Fixed amounts displayed when collecting a tip - """ - percentages: NotRequired[List[int]] - """ - Percentages displayed when collecting a tip - """ - smart_tip_threshold: NotRequired[int] - """ - Below this amount, fixed amounts will be displayed; above it, percentages will be displayed - """ - - class CreateParamsTippingPln(TypedDict): - fixed_amounts: NotRequired[List[int]] - """ - Fixed amounts displayed when collecting a tip - """ - percentages: NotRequired[List[int]] - """ - Percentages displayed when collecting a tip - """ - smart_tip_threshold: NotRequired[int] - """ - Below this amount, fixed amounts will be displayed; above it, percentages will be displayed - """ - - class CreateParamsTippingRon(TypedDict): - fixed_amounts: NotRequired[List[int]] - """ - Fixed amounts displayed when collecting a tip - """ - percentages: NotRequired[List[int]] - """ - Percentages displayed when collecting a tip - """ - smart_tip_threshold: NotRequired[int] - """ - Below this amount, fixed amounts will be displayed; above it, percentages will be displayed - """ - - class CreateParamsTippingSek(TypedDict): - fixed_amounts: NotRequired[List[int]] - """ - Fixed amounts displayed when collecting a tip - """ - percentages: NotRequired[List[int]] - """ - Percentages displayed when collecting a tip - """ - smart_tip_threshold: NotRequired[int] - """ - Below this amount, fixed amounts will be displayed; above it, percentages will be displayed - """ - - class CreateParamsTippingSgd(TypedDict): - fixed_amounts: NotRequired[List[int]] - """ - Fixed amounts displayed when collecting a tip - """ - percentages: NotRequired[List[int]] - """ - Percentages displayed when collecting a tip - """ - smart_tip_threshold: NotRequired[int] - """ - Below this amount, fixed amounts will be displayed; above it, percentages will be displayed - """ - - class CreateParamsTippingUsd(TypedDict): - fixed_amounts: NotRequired[List[int]] - """ - Fixed amounts displayed when collecting a tip - """ - percentages: NotRequired[List[int]] - """ - Percentages displayed when collecting a tip - """ - smart_tip_threshold: NotRequired[int] - """ - Below this amount, fixed amounts will be displayed; above it, percentages will be displayed - """ - - class CreateParamsVerifoneP400(TypedDict): - splashscreen: NotRequired["Literal['']|str"] - """ - A File ID representing an image you would like displayed on the reader. - """ - - class CreateParamsWifi(TypedDict): - enterprise_eap_peap: NotRequired[ - "ConfigurationService.CreateParamsWifiEnterpriseEapPeap" - ] - """ - Credentials for a WPA-Enterprise WiFi network using the EAP-PEAP authentication method. - """ - enterprise_eap_tls: NotRequired[ - "ConfigurationService.CreateParamsWifiEnterpriseEapTls" - ] - """ - Credentials for a WPA-Enterprise WiFi network using the EAP-TLS authentication method. - """ - personal_psk: NotRequired[ - "ConfigurationService.CreateParamsWifiPersonalPsk" - ] - """ - Credentials for a WPA-Personal WiFi network. - """ - type: Literal[ - "enterprise_eap_peap", "enterprise_eap_tls", "personal_psk" - ] - """ - Security type of the WiFi network. Fill out the hash with the corresponding name to provide the set of credentials for this security type. - """ - - class CreateParamsWifiEnterpriseEapPeap(TypedDict): - ca_certificate_file: NotRequired[str] - """ - A File ID representing a PEM file containing the server certificate - """ - password: str - """ - Password for connecting to the WiFi network - """ - ssid: str - """ - Name of the WiFi network - """ - username: str - """ - Username for connecting to the WiFi network - """ - - class CreateParamsWifiEnterpriseEapTls(TypedDict): - ca_certificate_file: NotRequired[str] - """ - A File ID representing a PEM file containing the server certificate - """ - client_certificate_file: str - """ - A File ID representing a PEM file containing the client certificate - """ - private_key_file: str - """ - A File ID representing a PEM file containing the client RSA private key - """ - private_key_file_password: NotRequired[str] - """ - Password for the private key file - """ - ssid: str - """ - Name of the WiFi network - """ - - class CreateParamsWifiPersonalPsk(TypedDict): - password: str - """ - Password for connecting to the WiFi network - """ - ssid: str - """ - Name of the WiFi network - """ - - class DeleteParams(TypedDict): - pass - - class ListParams(TypedDict): - 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. - """ - is_account_default: NotRequired[bool] - """ - if present, only return the account default or non-default configurations. - """ - 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 RetrieveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class UpdateParams(TypedDict): - bbpos_wisepad3: NotRequired[ - "Literal['']|ConfigurationService.UpdateParamsBbposWisepad3" - ] - """ - An object containing device type specific settings for BBPOS WisePad 3 readers - """ - bbpos_wisepos_e: NotRequired[ - "Literal['']|ConfigurationService.UpdateParamsBbposWiseposE" - ] - """ - An object containing device type specific settings for BBPOS WisePOS E readers - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - name: NotRequired[str] - """ - Name of the configuration - """ - offline: NotRequired[ - "Literal['']|ConfigurationService.UpdateParamsOffline" - ] - """ - Configurations for collecting transactions offline. - """ - reader_security: NotRequired[ - "Literal['']|ConfigurationService.UpdateParamsReaderSecurity" - ] - """ - Configurations for reader security settings. - """ - reboot_window: NotRequired[ - "Literal['']|ConfigurationService.UpdateParamsRebootWindow" - ] - """ - Reboot time settings for readers that support customized reboot time configuration. - """ - stripe_s700: NotRequired[ - "Literal['']|ConfigurationService.UpdateParamsStripeS700" - ] - """ - An object containing device type specific settings for Stripe S700 readers - """ - tipping: NotRequired[ - "Literal['']|ConfigurationService.UpdateParamsTipping" - ] - """ - Tipping configurations for readers supporting on-reader tips - """ - verifone_p400: NotRequired[ - "Literal['']|ConfigurationService.UpdateParamsVerifoneP400" - ] - """ - An object containing device type specific settings for Verifone P400 readers - """ - wifi: NotRequired["Literal['']|ConfigurationService.UpdateParamsWifi"] - """ - Configurations for connecting to a WiFi network. - """ - - class UpdateParamsBbposWisepad3(TypedDict): - splashscreen: NotRequired["Literal['']|str"] - """ - A File ID representing an image you would like displayed on the reader. - """ - - class UpdateParamsBbposWiseposE(TypedDict): - splashscreen: NotRequired["Literal['']|str"] - """ - A File ID representing an image to display on the reader - """ - - class UpdateParamsOffline(TypedDict): - enabled: bool - """ - Determines whether to allow transactions to be collected while reader is offline. Defaults to false. - """ - - class UpdateParamsReaderSecurity(TypedDict): - admin_menu_passcode: NotRequired["Literal['']|str"] - """ - Passcode used to access a reader's admin menu. - """ - - class UpdateParamsRebootWindow(TypedDict): - end_hour: int - """ - Integer between 0 to 23 that represents the end hour of the reboot time window. The value must be different than the start_hour. - """ - start_hour: int - """ - Integer between 0 to 23 that represents the start hour of the reboot time window. - """ - - class UpdateParamsStripeS700(TypedDict): - splashscreen: NotRequired["Literal['']|str"] - """ - A File ID representing an image you would like displayed on the reader. - """ - - class UpdateParamsTipping(TypedDict): - aed: NotRequired["ConfigurationService.UpdateParamsTippingAed"] - """ - Tipping configuration for AED - """ - aud: NotRequired["ConfigurationService.UpdateParamsTippingAud"] - """ - Tipping configuration for AUD - """ - bgn: NotRequired["ConfigurationService.UpdateParamsTippingBgn"] - """ - Tipping configuration for BGN - """ - cad: NotRequired["ConfigurationService.UpdateParamsTippingCad"] - """ - Tipping configuration for CAD - """ - chf: NotRequired["ConfigurationService.UpdateParamsTippingChf"] - """ - Tipping configuration for CHF - """ - czk: NotRequired["ConfigurationService.UpdateParamsTippingCzk"] - """ - Tipping configuration for CZK - """ - dkk: NotRequired["ConfigurationService.UpdateParamsTippingDkk"] - """ - Tipping configuration for DKK - """ - eur: NotRequired["ConfigurationService.UpdateParamsTippingEur"] - """ - Tipping configuration for EUR - """ - gbp: NotRequired["ConfigurationService.UpdateParamsTippingGbp"] - """ - Tipping configuration for GBP - """ - hkd: NotRequired["ConfigurationService.UpdateParamsTippingHkd"] - """ - Tipping configuration for HKD - """ - huf: NotRequired["ConfigurationService.UpdateParamsTippingHuf"] - """ - Tipping configuration for HUF - """ - jpy: NotRequired["ConfigurationService.UpdateParamsTippingJpy"] - """ - Tipping configuration for JPY - """ - mxn: NotRequired["ConfigurationService.UpdateParamsTippingMxn"] - """ - Tipping configuration for MXN - """ - myr: NotRequired["ConfigurationService.UpdateParamsTippingMyr"] - """ - Tipping configuration for MYR - """ - nok: NotRequired["ConfigurationService.UpdateParamsTippingNok"] - """ - Tipping configuration for NOK - """ - nzd: NotRequired["ConfigurationService.UpdateParamsTippingNzd"] - """ - Tipping configuration for NZD - """ - pln: NotRequired["ConfigurationService.UpdateParamsTippingPln"] - """ - Tipping configuration for PLN - """ - ron: NotRequired["ConfigurationService.UpdateParamsTippingRon"] - """ - Tipping configuration for RON - """ - sek: NotRequired["ConfigurationService.UpdateParamsTippingSek"] - """ - Tipping configuration for SEK - """ - sgd: NotRequired["ConfigurationService.UpdateParamsTippingSgd"] - """ - Tipping configuration for SGD - """ - usd: NotRequired["ConfigurationService.UpdateParamsTippingUsd"] - """ - Tipping configuration for USD - """ - - class UpdateParamsTippingAed(TypedDict): - fixed_amounts: NotRequired[List[int]] - """ - Fixed amounts displayed when collecting a tip - """ - percentages: NotRequired[List[int]] - """ - Percentages displayed when collecting a tip - """ - smart_tip_threshold: NotRequired[int] - """ - Below this amount, fixed amounts will be displayed; above it, percentages will be displayed - """ - - class UpdateParamsTippingAud(TypedDict): - fixed_amounts: NotRequired[List[int]] - """ - Fixed amounts displayed when collecting a tip - """ - percentages: NotRequired[List[int]] - """ - Percentages displayed when collecting a tip - """ - smart_tip_threshold: NotRequired[int] - """ - Below this amount, fixed amounts will be displayed; above it, percentages will be displayed - """ - - class UpdateParamsTippingBgn(TypedDict): - fixed_amounts: NotRequired[List[int]] - """ - Fixed amounts displayed when collecting a tip - """ - percentages: NotRequired[List[int]] - """ - Percentages displayed when collecting a tip - """ - smart_tip_threshold: NotRequired[int] - """ - Below this amount, fixed amounts will be displayed; above it, percentages will be displayed - """ - - class UpdateParamsTippingCad(TypedDict): - fixed_amounts: NotRequired[List[int]] - """ - Fixed amounts displayed when collecting a tip - """ - percentages: NotRequired[List[int]] - """ - Percentages displayed when collecting a tip - """ - smart_tip_threshold: NotRequired[int] - """ - Below this amount, fixed amounts will be displayed; above it, percentages will be displayed - """ - - class UpdateParamsTippingChf(TypedDict): - fixed_amounts: NotRequired[List[int]] - """ - Fixed amounts displayed when collecting a tip - """ - percentages: NotRequired[List[int]] - """ - Percentages displayed when collecting a tip - """ - smart_tip_threshold: NotRequired[int] - """ - Below this amount, fixed amounts will be displayed; above it, percentages will be displayed - """ - - class UpdateParamsTippingCzk(TypedDict): - fixed_amounts: NotRequired[List[int]] - """ - Fixed amounts displayed when collecting a tip - """ - percentages: NotRequired[List[int]] - """ - Percentages displayed when collecting a tip - """ - smart_tip_threshold: NotRequired[int] - """ - Below this amount, fixed amounts will be displayed; above it, percentages will be displayed - """ - - class UpdateParamsTippingDkk(TypedDict): - fixed_amounts: NotRequired[List[int]] - """ - Fixed amounts displayed when collecting a tip - """ - percentages: NotRequired[List[int]] - """ - Percentages displayed when collecting a tip - """ - smart_tip_threshold: NotRequired[int] - """ - Below this amount, fixed amounts will be displayed; above it, percentages will be displayed - """ - - class UpdateParamsTippingEur(TypedDict): - fixed_amounts: NotRequired[List[int]] - """ - Fixed amounts displayed when collecting a tip - """ - percentages: NotRequired[List[int]] - """ - Percentages displayed when collecting a tip - """ - smart_tip_threshold: NotRequired[int] - """ - Below this amount, fixed amounts will be displayed; above it, percentages will be displayed - """ - - class UpdateParamsTippingGbp(TypedDict): - fixed_amounts: NotRequired[List[int]] - """ - Fixed amounts displayed when collecting a tip - """ - percentages: NotRequired[List[int]] - """ - Percentages displayed when collecting a tip - """ - smart_tip_threshold: NotRequired[int] - """ - Below this amount, fixed amounts will be displayed; above it, percentages will be displayed - """ - - class UpdateParamsTippingHkd(TypedDict): - fixed_amounts: NotRequired[List[int]] - """ - Fixed amounts displayed when collecting a tip - """ - percentages: NotRequired[List[int]] - """ - Percentages displayed when collecting a tip - """ - smart_tip_threshold: NotRequired[int] - """ - Below this amount, fixed amounts will be displayed; above it, percentages will be displayed - """ - - class UpdateParamsTippingHuf(TypedDict): - fixed_amounts: NotRequired[List[int]] - """ - Fixed amounts displayed when collecting a tip - """ - percentages: NotRequired[List[int]] - """ - Percentages displayed when collecting a tip - """ - smart_tip_threshold: NotRequired[int] - """ - Below this amount, fixed amounts will be displayed; above it, percentages will be displayed - """ - - class UpdateParamsTippingJpy(TypedDict): - fixed_amounts: NotRequired[List[int]] - """ - Fixed amounts displayed when collecting a tip - """ - percentages: NotRequired[List[int]] - """ - Percentages displayed when collecting a tip - """ - smart_tip_threshold: NotRequired[int] - """ - Below this amount, fixed amounts will be displayed; above it, percentages will be displayed - """ - - class UpdateParamsTippingMxn(TypedDict): - fixed_amounts: NotRequired[List[int]] - """ - Fixed amounts displayed when collecting a tip - """ - percentages: NotRequired[List[int]] - """ - Percentages displayed when collecting a tip - """ - smart_tip_threshold: NotRequired[int] - """ - Below this amount, fixed amounts will be displayed; above it, percentages will be displayed - """ - - class UpdateParamsTippingMyr(TypedDict): - fixed_amounts: NotRequired[List[int]] - """ - Fixed amounts displayed when collecting a tip - """ - percentages: NotRequired[List[int]] - """ - Percentages displayed when collecting a tip - """ - smart_tip_threshold: NotRequired[int] - """ - Below this amount, fixed amounts will be displayed; above it, percentages will be displayed - """ - - class UpdateParamsTippingNok(TypedDict): - fixed_amounts: NotRequired[List[int]] - """ - Fixed amounts displayed when collecting a tip - """ - percentages: NotRequired[List[int]] - """ - Percentages displayed when collecting a tip - """ - smart_tip_threshold: NotRequired[int] - """ - Below this amount, fixed amounts will be displayed; above it, percentages will be displayed - """ - - class UpdateParamsTippingNzd(TypedDict): - fixed_amounts: NotRequired[List[int]] - """ - Fixed amounts displayed when collecting a tip - """ - percentages: NotRequired[List[int]] - """ - Percentages displayed when collecting a tip - """ - smart_tip_threshold: NotRequired[int] - """ - Below this amount, fixed amounts will be displayed; above it, percentages will be displayed - """ - - class UpdateParamsTippingPln(TypedDict): - fixed_amounts: NotRequired[List[int]] - """ - Fixed amounts displayed when collecting a tip - """ - percentages: NotRequired[List[int]] - """ - Percentages displayed when collecting a tip - """ - smart_tip_threshold: NotRequired[int] - """ - Below this amount, fixed amounts will be displayed; above it, percentages will be displayed - """ - - class UpdateParamsTippingRon(TypedDict): - fixed_amounts: NotRequired[List[int]] - """ - Fixed amounts displayed when collecting a tip - """ - percentages: NotRequired[List[int]] - """ - Percentages displayed when collecting a tip - """ - smart_tip_threshold: NotRequired[int] - """ - Below this amount, fixed amounts will be displayed; above it, percentages will be displayed - """ - - class UpdateParamsTippingSek(TypedDict): - fixed_amounts: NotRequired[List[int]] - """ - Fixed amounts displayed when collecting a tip - """ - percentages: NotRequired[List[int]] - """ - Percentages displayed when collecting a tip - """ - smart_tip_threshold: NotRequired[int] - """ - Below this amount, fixed amounts will be displayed; above it, percentages will be displayed - """ - - class UpdateParamsTippingSgd(TypedDict): - fixed_amounts: NotRequired[List[int]] - """ - Fixed amounts displayed when collecting a tip - """ - percentages: NotRequired[List[int]] - """ - Percentages displayed when collecting a tip - """ - smart_tip_threshold: NotRequired[int] - """ - Below this amount, fixed amounts will be displayed; above it, percentages will be displayed - """ - - class UpdateParamsTippingUsd(TypedDict): - fixed_amounts: NotRequired[List[int]] - """ - Fixed amounts displayed when collecting a tip - """ - percentages: NotRequired[List[int]] - """ - Percentages displayed when collecting a tip - """ - smart_tip_threshold: NotRequired[int] - """ - Below this amount, fixed amounts will be displayed; above it, percentages will be displayed - """ - - class UpdateParamsVerifoneP400(TypedDict): - splashscreen: NotRequired["Literal['']|str"] - """ - A File ID representing an image you would like displayed on the reader. - """ - - class UpdateParamsWifi(TypedDict): - enterprise_eap_peap: NotRequired[ - "ConfigurationService.UpdateParamsWifiEnterpriseEapPeap" - ] - """ - Credentials for a WPA-Enterprise WiFi network using the EAP-PEAP authentication method. - """ - enterprise_eap_tls: NotRequired[ - "ConfigurationService.UpdateParamsWifiEnterpriseEapTls" - ] - """ - Credentials for a WPA-Enterprise WiFi network using the EAP-TLS authentication method. - """ - personal_psk: NotRequired[ - "ConfigurationService.UpdateParamsWifiPersonalPsk" - ] - """ - Credentials for a WPA-Personal WiFi network. - """ - type: Literal[ - "enterprise_eap_peap", "enterprise_eap_tls", "personal_psk" - ] - """ - Security type of the WiFi network. Fill out the hash with the corresponding name to provide the set of credentials for this security type. - """ - - class UpdateParamsWifiEnterpriseEapPeap(TypedDict): - ca_certificate_file: NotRequired[str] - """ - A File ID representing a PEM file containing the server certificate - """ - password: str - """ - Password for connecting to the WiFi network - """ - ssid: str - """ - Name of the WiFi network - """ - username: str - """ - Username for connecting to the WiFi network - """ - - class UpdateParamsWifiEnterpriseEapTls(TypedDict): - ca_certificate_file: NotRequired[str] - """ - A File ID representing a PEM file containing the server certificate - """ - client_certificate_file: str - """ - A File ID representing a PEM file containing the client certificate - """ - private_key_file: str - """ - A File ID representing a PEM file containing the client RSA private key - """ - private_key_file_password: NotRequired[str] - """ - Password for the private key file - """ - ssid: str - """ - Name of the WiFi network - """ - - class UpdateParamsWifiPersonalPsk(TypedDict): - password: str - """ - Password for connecting to the WiFi network - """ - ssid: str - """ - Name of the WiFi network - """ - def delete( self, configuration: str, - params: Optional["ConfigurationService.DeleteParams"] = None, + params: Optional["ConfigurationDeleteParams"] = None, options: Optional[RequestOptions] = None, ) -> Configuration: """ @@ -1192,7 +52,7 @@ def delete( async def delete_async( self, configuration: str, - params: Optional["ConfigurationService.DeleteParams"] = None, + params: Optional["ConfigurationDeleteParams"] = None, options: Optional[RequestOptions] = None, ) -> Configuration: """ @@ -1214,7 +74,7 @@ async def delete_async( def retrieve( self, configuration: str, - params: Optional["ConfigurationService.RetrieveParams"] = None, + params: Optional["ConfigurationRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Configuration: """ @@ -1236,7 +96,7 @@ def retrieve( async def retrieve_async( self, configuration: str, - params: Optional["ConfigurationService.RetrieveParams"] = None, + params: Optional["ConfigurationRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Configuration: """ @@ -1258,7 +118,7 @@ async def retrieve_async( def update( self, configuration: str, - params: Optional["ConfigurationService.UpdateParams"] = None, + params: Optional["ConfigurationUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> Configuration: """ @@ -1280,7 +140,7 @@ def update( async def update_async( self, configuration: str, - params: Optional["ConfigurationService.UpdateParams"] = None, + params: Optional["ConfigurationUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> Configuration: """ @@ -1301,7 +161,7 @@ async def update_async( def list( self, - params: Optional["ConfigurationService.ListParams"] = None, + params: Optional["ConfigurationListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[Configuration]: """ @@ -1320,7 +180,7 @@ def list( async def list_async( self, - params: Optional["ConfigurationService.ListParams"] = None, + params: Optional["ConfigurationListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[Configuration]: """ @@ -1339,7 +199,7 @@ async def list_async( def create( self, - params: Optional["ConfigurationService.CreateParams"] = None, + params: Optional["ConfigurationCreateParams"] = None, options: Optional[RequestOptions] = None, ) -> Configuration: """ @@ -1358,7 +218,7 @@ def create( async def create_async( self, - params: Optional["ConfigurationService.CreateParams"] = None, + params: Optional["ConfigurationCreateParams"] = None, options: Optional[RequestOptions] = None, ) -> Configuration: """ diff --git a/stripe/terminal/_connection_token.py b/stripe/terminal/_connection_token.py index 4500eefe1..0804333cb 100644 --- a/stripe/terminal/_connection_token.py +++ b/stripe/terminal/_connection_token.py @@ -1,9 +1,13 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._createable_api_resource import CreateableAPIResource -from stripe._request_options import RequestOptions -from typing import ClassVar, List, Optional, cast -from typing_extensions import Literal, NotRequired, Unpack +from typing import ClassVar, Optional, cast +from typing_extensions import Literal, Unpack, TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params.terminal._connection_token_create_params import ( + ConnectionTokenCreateParams, + ) class ConnectionToken(CreateableAPIResource["ConnectionToken"]): @@ -16,17 +20,6 @@ class ConnectionToken(CreateableAPIResource["ConnectionToken"]): OBJECT_NAME: ClassVar[Literal["terminal.connection_token"]] = ( "terminal.connection_token" ) - - class CreateParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - location: NotRequired[str] - """ - The id of the location that this connection token is scoped to. If specified the connection token will only be usable with readers assigned to that location, otherwise the connection token will be usable with all readers. Note that location scoping only applies to internet-connected readers. For more details, see [the docs on scoping connection tokens](https://docs.stripe.com/terminal/fleet/locations-and-zones?dashboard-or-api=api#connection-tokens). - """ - location: Optional[str] """ The id of the location that this connection token is scoped to. Note that location scoping only applies to internet-connected readers. For more details, see [the docs on scoping connection tokens](https://docs.stripe.com/terminal/fleet/locations-and-zones?dashboard-or-api=api#connection-tokens). @@ -42,7 +35,7 @@ class CreateParams(RequestOptions): @classmethod def create( - cls, **params: Unpack["ConnectionToken.CreateParams"] + cls, **params: Unpack["ConnectionTokenCreateParams"] ) -> "ConnectionToken": """ To connect to a reader the Stripe Terminal SDK needs to retrieve a short-lived connection token from Stripe, proxied through your server. On your backend, add an endpoint that creates and returns a connection token. @@ -58,7 +51,7 @@ def create( @classmethod async def create_async( - cls, **params: Unpack["ConnectionToken.CreateParams"] + cls, **params: Unpack["ConnectionTokenCreateParams"] ) -> "ConnectionToken": """ To connect to a reader the Stripe Terminal SDK needs to retrieve a short-lived connection token from Stripe, proxied through your server. On your backend, add an endpoint that creates and returns a connection token. diff --git a/stripe/terminal/_connection_token_service.py b/stripe/terminal/_connection_token_service.py index 0cd94935a..c7649e1e4 100644 --- a/stripe/terminal/_connection_token_service.py +++ b/stripe/terminal/_connection_token_service.py @@ -3,24 +3,19 @@ from stripe._request_options import RequestOptions from stripe._stripe_service import StripeService from stripe.terminal._connection_token import ConnectionToken -from typing import List, Optional, cast -from typing_extensions import NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params.terminal._connection_token_create_params import ( + ConnectionTokenCreateParams, + ) -class ConnectionTokenService(StripeService): - class CreateParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - location: NotRequired[str] - """ - The id of the location that this connection token is scoped to. If specified the connection token will only be usable with readers assigned to that location, otherwise the connection token will be usable with all readers. Note that location scoping only applies to internet-connected readers. For more details, see [the docs on scoping connection tokens](https://docs.stripe.com/terminal/fleet/locations-and-zones?dashboard-or-api=api#connection-tokens). - """ +class ConnectionTokenService(StripeService): def create( self, - params: Optional["ConnectionTokenService.CreateParams"] = None, + params: Optional["ConnectionTokenCreateParams"] = None, options: Optional[RequestOptions] = None, ) -> ConnectionToken: """ @@ -39,7 +34,7 @@ def create( async def create_async( self, - params: Optional["ConnectionTokenService.CreateParams"] = None, + params: Optional["ConnectionTokenCreateParams"] = None, options: Optional[RequestOptions] = None, ) -> ConnectionToken: """ diff --git a/stripe/terminal/_location.py b/stripe/terminal/_location.py index 5804f88eb..d7d44b6b7 100644 --- a/stripe/terminal/_location.py +++ b/stripe/terminal/_location.py @@ -4,12 +4,26 @@ from stripe._deletable_api_resource import DeletableAPIResource from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource -from stripe._request_options import RequestOptions from stripe._stripe_object import StripeObject from stripe._updateable_api_resource import UpdateableAPIResource from stripe._util import class_method_variant, sanitize_id -from typing import ClassVar, Dict, List, Optional, cast, overload -from typing_extensions import Literal, NotRequired, TypedDict, Unpack +from typing import ClassVar, Dict, Optional, cast, overload +from typing_extensions import Literal, Unpack, TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params.terminal._location_create_params import ( + LocationCreateParams, + ) + from stripe.params.terminal._location_delete_params import ( + LocationDeleteParams, + ) + from stripe.params.terminal._location_list_params import LocationListParams + from stripe.params.terminal._location_modify_params import ( + LocationModifyParams, + ) + from stripe.params.terminal._location_retrieve_params import ( + LocationRetrieveParams, + ) class Location( @@ -112,289 +126,6 @@ class AddressKanji(StripeObject): Town/cho-me. """ - class CreateParams(RequestOptions): - address: NotRequired["Location.CreateParamsAddress"] - """ - The full address of the location. - """ - address_kana: NotRequired["Location.CreateParamsAddressKana"] - """ - The Kana variation of the full address of the location (Japan only). - """ - address_kanji: NotRequired["Location.CreateParamsAddressKanji"] - """ - The Kanji variation of the full address of the location (Japan only). - """ - configuration_overrides: NotRequired[str] - """ - The ID of a configuration that will be used to customize all readers in this location. - """ - display_name: NotRequired[str] - """ - A name for the location. Maximum length is 1000 characters. - """ - display_name_kana: NotRequired[str] - """ - The Kana variation of the name for the location (Japan only). Maximum length is 1000 characters. - """ - display_name_kanji: NotRequired[str] - """ - The Kanji variation of the name for the location (Japan only). Maximum length is 1000 characters. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - phone: NotRequired[str] - """ - The phone number for the location. - """ - - class CreateParamsAddress(TypedDict): - city: NotRequired[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[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. - """ - - class CreateParamsAddressKana(TypedDict): - city: NotRequired[str] - """ - City or ward. - """ - 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] - """ - Block or building number. - """ - line2: NotRequired[str] - """ - Building details. - """ - postal_code: NotRequired[str] - """ - Postal code. - """ - state: NotRequired[str] - """ - Prefecture. - """ - town: NotRequired[str] - """ - Town or cho-me. - """ - - class CreateParamsAddressKanji(TypedDict): - city: NotRequired[str] - """ - City or ward. - """ - 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] - """ - Block or building number. - """ - line2: NotRequired[str] - """ - Building details. - """ - postal_code: NotRequired[str] - """ - Postal code. - """ - state: NotRequired[str] - """ - Prefecture. - """ - town: NotRequired[str] - """ - Town or cho-me. - """ - - class DeleteParams(RequestOptions): - pass - - class ListParams(RequestOptions): - 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 ModifyParams(RequestOptions): - address: NotRequired["Location.ModifyParamsAddress"] - """ - The full address of the location. You can't change the location's `country`. If you need to modify the `country` field, create a new `Location` object and re-register any existing readers to that location. - """ - address_kana: NotRequired["Location.ModifyParamsAddressKana"] - """ - The Kana variation of the full address of the location (Japan only). - """ - address_kanji: NotRequired["Location.ModifyParamsAddressKanji"] - """ - The Kanji variation of the full address of the location (Japan only). - """ - configuration_overrides: NotRequired["Literal['']|str"] - """ - The ID of a configuration that will be used to customize all readers in this location. - """ - display_name: NotRequired["Literal['']|str"] - """ - A name for the location. - """ - display_name_kana: NotRequired["Literal['']|str"] - """ - The Kana variation of the name for the location (Japan only). - """ - display_name_kanji: NotRequired["Literal['']|str"] - """ - The Kanji variation of the name for the location (Japan only). - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - phone: NotRequired["Literal['']|str"] - """ - The phone number for the location. - """ - - class ModifyParamsAddress(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. - """ - - class ModifyParamsAddressKana(TypedDict): - city: NotRequired[str] - """ - City or ward. - """ - 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] - """ - Block or building number. - """ - line2: NotRequired[str] - """ - Building details. - """ - postal_code: NotRequired[str] - """ - Postal code. - """ - state: NotRequired[str] - """ - Prefecture. - """ - town: NotRequired[str] - """ - Town or cho-me. - """ - - class ModifyParamsAddressKanji(TypedDict): - city: NotRequired[str] - """ - City or ward. - """ - 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] - """ - Block or building number. - """ - line2: NotRequired[str] - """ - Building details. - """ - postal_code: NotRequired[str] - """ - Postal code. - """ - state: NotRequired[str] - """ - Prefecture. - """ - town: NotRequired[str] - """ - Town or cho-me. - """ - - class RetrieveParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - address: Address address_kana: Optional[AddressKana] address_kanji: Optional[AddressKanji] @@ -440,7 +171,7 @@ class RetrieveParams(RequestOptions): """ @classmethod - def create(cls, **params: Unpack["Location.CreateParams"]) -> "Location": + def create(cls, **params: Unpack["LocationCreateParams"]) -> "Location": """ Creates a new Location object. For further details, including which address fields are required in each country, see the [Manage locations](https://docs.stripe.com/docs/terminal/fleet/locations) guide. @@ -456,7 +187,7 @@ def create(cls, **params: Unpack["Location.CreateParams"]) -> "Location": @classmethod async def create_async( - cls, **params: Unpack["Location.CreateParams"] + cls, **params: Unpack["LocationCreateParams"] ) -> "Location": """ Creates a new Location object. @@ -473,7 +204,7 @@ async def create_async( @classmethod def _cls_delete( - cls, sid: str, **params: Unpack["Location.DeleteParams"] + cls, sid: str, **params: Unpack["LocationDeleteParams"] ) -> "Location": """ Deletes a Location object. @@ -491,7 +222,7 @@ def _cls_delete( @overload @staticmethod def delete( - sid: str, **params: Unpack["Location.DeleteParams"] + sid: str, **params: Unpack["LocationDeleteParams"] ) -> "Location": """ Deletes a Location object. @@ -499,7 +230,7 @@ def delete( ... @overload - def delete(self, **params: Unpack["Location.DeleteParams"]) -> "Location": + def delete(self, **params: Unpack["LocationDeleteParams"]) -> "Location": """ Deletes a Location object. """ @@ -507,7 +238,7 @@ def delete(self, **params: Unpack["Location.DeleteParams"]) -> "Location": @class_method_variant("_cls_delete") def delete( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Location.DeleteParams"] + self, **params: Unpack["LocationDeleteParams"] ) -> "Location": """ Deletes a Location object. @@ -520,7 +251,7 @@ def delete( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_delete_async( - cls, sid: str, **params: Unpack["Location.DeleteParams"] + cls, sid: str, **params: Unpack["LocationDeleteParams"] ) -> "Location": """ Deletes a Location object. @@ -538,7 +269,7 @@ async def _cls_delete_async( @overload @staticmethod async def delete_async( - sid: str, **params: Unpack["Location.DeleteParams"] + sid: str, **params: Unpack["LocationDeleteParams"] ) -> "Location": """ Deletes a Location object. @@ -547,7 +278,7 @@ async def delete_async( @overload async def delete_async( - self, **params: Unpack["Location.DeleteParams"] + self, **params: Unpack["LocationDeleteParams"] ) -> "Location": """ Deletes a Location object. @@ -556,7 +287,7 @@ async def delete_async( @class_method_variant("_cls_delete_async") async def delete_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Location.DeleteParams"] + self, **params: Unpack["LocationDeleteParams"] ) -> "Location": """ Deletes a Location object. @@ -569,7 +300,7 @@ async def delete_async( # pyright: ignore[reportGeneralTypeIssues] @classmethod def list( - cls, **params: Unpack["Location.ListParams"] + cls, **params: Unpack["LocationListParams"] ) -> ListObject["Location"]: """ Returns a list of Location objects. @@ -589,7 +320,7 @@ def list( @classmethod async def list_async( - cls, **params: Unpack["Location.ListParams"] + cls, **params: Unpack["LocationListParams"] ) -> ListObject["Location"]: """ Returns a list of Location objects. @@ -609,7 +340,7 @@ async def list_async( @classmethod def modify( - cls, id: str, **params: Unpack["Location.ModifyParams"] + cls, id: str, **params: Unpack["LocationModifyParams"] ) -> "Location": """ Updates a Location object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. @@ -626,7 +357,7 @@ def modify( @classmethod async def modify_async( - cls, id: str, **params: Unpack["Location.ModifyParams"] + cls, id: str, **params: Unpack["LocationModifyParams"] ) -> "Location": """ Updates a Location object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. @@ -643,7 +374,7 @@ async def modify_async( @classmethod def retrieve( - cls, id: str, **params: Unpack["Location.RetrieveParams"] + cls, id: str, **params: Unpack["LocationRetrieveParams"] ) -> "Location": """ Retrieves a Location object. @@ -654,7 +385,7 @@ def retrieve( @classmethod async def retrieve_async( - cls, id: str, **params: Unpack["Location.RetrieveParams"] + cls, id: str, **params: Unpack["LocationRetrieveParams"] ) -> "Location": """ Retrieves a Location object. diff --git a/stripe/terminal/_location_service.py b/stripe/terminal/_location_service.py index 8b382c801..2a32f51cf 100644 --- a/stripe/terminal/_location_service.py +++ b/stripe/terminal/_location_service.py @@ -5,298 +5,30 @@ from stripe._stripe_service import StripeService from stripe._util import sanitize_id from stripe.terminal._location import Location -from typing import Dict, List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params.terminal._location_create_params import ( + LocationCreateParams, + ) + from stripe.params.terminal._location_delete_params import ( + LocationDeleteParams, + ) + from stripe.params.terminal._location_list_params import LocationListParams + from stripe.params.terminal._location_retrieve_params import ( + LocationRetrieveParams, + ) + from stripe.params.terminal._location_update_params import ( + LocationUpdateParams, + ) class LocationService(StripeService): - class CreateParams(TypedDict): - address: NotRequired["LocationService.CreateParamsAddress"] - """ - The full address of the location. - """ - address_kana: NotRequired["LocationService.CreateParamsAddressKana"] - """ - The Kana variation of the full address of the location (Japan only). - """ - address_kanji: NotRequired["LocationService.CreateParamsAddressKanji"] - """ - The Kanji variation of the full address of the location (Japan only). - """ - configuration_overrides: NotRequired[str] - """ - The ID of a configuration that will be used to customize all readers in this location. - """ - display_name: NotRequired[str] - """ - A name for the location. Maximum length is 1000 characters. - """ - display_name_kana: NotRequired[str] - """ - The Kana variation of the name for the location (Japan only). Maximum length is 1000 characters. - """ - display_name_kanji: NotRequired[str] - """ - The Kanji variation of the name for the location (Japan only). Maximum length is 1000 characters. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - phone: NotRequired[str] - """ - The phone number for the location. - """ - - class CreateParamsAddress(TypedDict): - city: NotRequired[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[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. - """ - - class CreateParamsAddressKana(TypedDict): - city: NotRequired[str] - """ - City or ward. - """ - 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] - """ - Block or building number. - """ - line2: NotRequired[str] - """ - Building details. - """ - postal_code: NotRequired[str] - """ - Postal code. - """ - state: NotRequired[str] - """ - Prefecture. - """ - town: NotRequired[str] - """ - Town or cho-me. - """ - - class CreateParamsAddressKanji(TypedDict): - city: NotRequired[str] - """ - City or ward. - """ - 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] - """ - Block or building number. - """ - line2: NotRequired[str] - """ - Building details. - """ - postal_code: NotRequired[str] - """ - Postal code. - """ - state: NotRequired[str] - """ - Prefecture. - """ - town: NotRequired[str] - """ - Town or cho-me. - """ - - class DeleteParams(TypedDict): - pass - - class ListParams(TypedDict): - 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 RetrieveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class UpdateParams(TypedDict): - address: NotRequired["LocationService.UpdateParamsAddress"] - """ - The full address of the location. You can't change the location's `country`. If you need to modify the `country` field, create a new `Location` object and re-register any existing readers to that location. - """ - address_kana: NotRequired["LocationService.UpdateParamsAddressKana"] - """ - The Kana variation of the full address of the location (Japan only). - """ - address_kanji: NotRequired["LocationService.UpdateParamsAddressKanji"] - """ - The Kanji variation of the full address of the location (Japan only). - """ - configuration_overrides: NotRequired["Literal['']|str"] - """ - The ID of a configuration that will be used to customize all readers in this location. - """ - display_name: NotRequired["Literal['']|str"] - """ - A name for the location. - """ - display_name_kana: NotRequired["Literal['']|str"] - """ - The Kana variation of the name for the location (Japan only). - """ - display_name_kanji: NotRequired["Literal['']|str"] - """ - The Kanji variation of the name for the location (Japan only). - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - phone: NotRequired["Literal['']|str"] - """ - The phone number for the location. - """ - - class UpdateParamsAddress(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. - """ - - class UpdateParamsAddressKana(TypedDict): - city: NotRequired[str] - """ - City or ward. - """ - 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] - """ - Block or building number. - """ - line2: NotRequired[str] - """ - Building details. - """ - postal_code: NotRequired[str] - """ - Postal code. - """ - state: NotRequired[str] - """ - Prefecture. - """ - town: NotRequired[str] - """ - Town or cho-me. - """ - - class UpdateParamsAddressKanji(TypedDict): - city: NotRequired[str] - """ - City or ward. - """ - 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] - """ - Block or building number. - """ - line2: NotRequired[str] - """ - Building details. - """ - postal_code: NotRequired[str] - """ - Postal code. - """ - state: NotRequired[str] - """ - Prefecture. - """ - town: NotRequired[str] - """ - Town or cho-me. - """ - def delete( self, location: str, - params: Optional["LocationService.DeleteParams"] = None, + params: Optional["LocationDeleteParams"] = None, options: Optional[RequestOptions] = None, ) -> Location: """ @@ -318,7 +50,7 @@ def delete( async def delete_async( self, location: str, - params: Optional["LocationService.DeleteParams"] = None, + params: Optional["LocationDeleteParams"] = None, options: Optional[RequestOptions] = None, ) -> Location: """ @@ -340,7 +72,7 @@ async def delete_async( def retrieve( self, location: str, - params: Optional["LocationService.RetrieveParams"] = None, + params: Optional["LocationRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Location: """ @@ -362,7 +94,7 @@ def retrieve( async def retrieve_async( self, location: str, - params: Optional["LocationService.RetrieveParams"] = None, + params: Optional["LocationRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Location: """ @@ -384,7 +116,7 @@ async def retrieve_async( def update( self, location: str, - params: Optional["LocationService.UpdateParams"] = None, + params: Optional["LocationUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> Location: """ @@ -406,7 +138,7 @@ def update( async def update_async( self, location: str, - params: Optional["LocationService.UpdateParams"] = None, + params: Optional["LocationUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> Location: """ @@ -427,7 +159,7 @@ async def update_async( def list( self, - params: Optional["LocationService.ListParams"] = None, + params: Optional["LocationListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[Location]: """ @@ -446,7 +178,7 @@ def list( async def list_async( self, - params: Optional["LocationService.ListParams"] = None, + params: Optional["LocationListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[Location]: """ @@ -465,7 +197,7 @@ async def list_async( def create( self, - params: Optional["LocationService.CreateParams"] = None, + params: Optional["LocationCreateParams"] = None, options: Optional[RequestOptions] = None, ) -> Location: """ @@ -485,7 +217,7 @@ def create( async def create_async( self, - params: Optional["LocationService.CreateParams"] = None, + params: Optional["LocationCreateParams"] = None, options: Optional[RequestOptions] = None, ) -> Location: """ diff --git a/stripe/terminal/_onboarding_link.py b/stripe/terminal/_onboarding_link.py index 38e49f1a3..64cc092e9 100644 --- a/stripe/terminal/_onboarding_link.py +++ b/stripe/terminal/_onboarding_link.py @@ -1,10 +1,14 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._createable_api_resource import CreateableAPIResource -from stripe._request_options import RequestOptions from stripe._stripe_object import StripeObject -from typing import ClassVar, List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict, Unpack +from typing import ClassVar, Optional, cast +from typing_extensions import Literal, Unpack, TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params.terminal._onboarding_link_create_params import ( + OnboardingLinkCreateParams, + ) class OnboardingLink(CreateableAPIResource["OnboardingLink"]): @@ -35,42 +39,6 @@ class AppleTermsAndConditions(StripeObject): "apple_terms_and_conditions": AppleTermsAndConditions, } - class CreateParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - link_options: "OnboardingLink.CreateParamsLinkOptions" - """ - Specific fields needed to generate the desired link type. - """ - link_type: Literal["apple_terms_and_conditions"] - """ - The type of link being generated. - """ - on_behalf_of: NotRequired[str] - """ - Stripe account ID to generate the link for. - """ - - class CreateParamsLinkOptions(TypedDict): - apple_terms_and_conditions: NotRequired[ - "OnboardingLink.CreateParamsLinkOptionsAppleTermsAndConditions" - ] - """ - The options associated with the Apple Terms and Conditions link type. - """ - - class CreateParamsLinkOptionsAppleTermsAndConditions(TypedDict): - allow_relinking: NotRequired[bool] - """ - Whether the link should also support users relinking their Apple account. - """ - merchant_display_name: str - """ - The business name of the merchant accepting Apple's Terms and Conditions. - """ - link_options: LinkOptions """ Link type options associated with the current onboarding link object. @@ -91,7 +59,7 @@ class CreateParamsLinkOptionsAppleTermsAndConditions(TypedDict): @classmethod def create( - cls, **params: Unpack["OnboardingLink.CreateParams"] + cls, **params: Unpack["OnboardingLinkCreateParams"] ) -> "OnboardingLink": """ Creates a new OnboardingLink object that contains a redirect_url used for onboarding onto Tap to Pay on iPhone. @@ -107,7 +75,7 @@ def create( @classmethod async def create_async( - cls, **params: Unpack["OnboardingLink.CreateParams"] + cls, **params: Unpack["OnboardingLinkCreateParams"] ) -> "OnboardingLink": """ Creates a new OnboardingLink object that contains a redirect_url used for onboarding onto Tap to Pay on iPhone. diff --git a/stripe/terminal/_onboarding_link_service.py b/stripe/terminal/_onboarding_link_service.py index c3d197c88..2aa093766 100644 --- a/stripe/terminal/_onboarding_link_service.py +++ b/stripe/terminal/_onboarding_link_service.py @@ -3,50 +3,19 @@ from stripe._request_options import RequestOptions from stripe._stripe_service import StripeService from stripe.terminal._onboarding_link import OnboardingLink -from typing import List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params.terminal._onboarding_link_create_params import ( + OnboardingLinkCreateParams, + ) -class OnboardingLinkService(StripeService): - class CreateParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - link_options: "OnboardingLinkService.CreateParamsLinkOptions" - """ - Specific fields needed to generate the desired link type. - """ - link_type: Literal["apple_terms_and_conditions"] - """ - The type of link being generated. - """ - on_behalf_of: NotRequired[str] - """ - Stripe account ID to generate the link for. - """ - - class CreateParamsLinkOptions(TypedDict): - apple_terms_and_conditions: NotRequired[ - "OnboardingLinkService.CreateParamsLinkOptionsAppleTermsAndConditions" - ] - """ - The options associated with the Apple Terms and Conditions link type. - """ - - class CreateParamsLinkOptionsAppleTermsAndConditions(TypedDict): - allow_relinking: NotRequired[bool] - """ - Whether the link should also support users relinking their Apple account. - """ - merchant_display_name: str - """ - The business name of the merchant accepting Apple's Terms and Conditions. - """ +class OnboardingLinkService(StripeService): def create( self, - params: "OnboardingLinkService.CreateParams", + params: "OnboardingLinkCreateParams", options: Optional[RequestOptions] = None, ) -> OnboardingLink: """ @@ -65,7 +34,7 @@ def create( async def create_async( self, - params: "OnboardingLinkService.CreateParams", + params: "OnboardingLinkCreateParams", options: Optional[RequestOptions] = None, ) -> OnboardingLink: """ diff --git a/stripe/terminal/_reader.py b/stripe/terminal/_reader.py index 54c2fdd3e..2b6297685 100644 --- a/stripe/terminal/_reader.py +++ b/stripe/terminal/_reader.py @@ -5,20 +5,12 @@ from stripe._expandable_field import ExpandableField from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource -from stripe._request_options import RequestOptions from stripe._stripe_object import StripeObject from stripe._test_helpers import APIResourceTestHelpers from stripe._updateable_api_resource import UpdateableAPIResource from stripe._util import class_method_variant, sanitize_id from typing import ClassVar, Dict, List, Optional, cast, overload -from typing_extensions import ( - Literal, - NotRequired, - Type, - TypedDict, - Unpack, - TYPE_CHECKING, -) +from typing_extensions import Literal, Type, Unpack, TYPE_CHECKING if TYPE_CHECKING: from stripe._charge import Charge @@ -26,6 +18,46 @@ from stripe._payment_method import PaymentMethod from stripe._refund import Refund from stripe._setup_intent import SetupIntent + from stripe.params.terminal._reader_cancel_action_params import ( + ReaderCancelActionParams, + ) + from stripe.params.terminal._reader_collect_inputs_params import ( + ReaderCollectInputsParams, + ) + from stripe.params.terminal._reader_collect_payment_method_params import ( + ReaderCollectPaymentMethodParams, + ) + from stripe.params.terminal._reader_confirm_payment_intent_params import ( + ReaderConfirmPaymentIntentParams, + ) + from stripe.params.terminal._reader_create_params import ReaderCreateParams + from stripe.params.terminal._reader_delete_params import ReaderDeleteParams + from stripe.params.terminal._reader_list_params import ReaderListParams + from stripe.params.terminal._reader_modify_params import ReaderModifyParams + from stripe.params.terminal._reader_present_payment_method_params import ( + ReaderPresentPaymentMethodParams, + ) + from stripe.params.terminal._reader_process_payment_intent_params import ( + ReaderProcessPaymentIntentParams, + ) + from stripe.params.terminal._reader_process_setup_intent_params import ( + ReaderProcessSetupIntentParams, + ) + from stripe.params.terminal._reader_refund_payment_params import ( + ReaderRefundPaymentParams, + ) + from stripe.params.terminal._reader_retrieve_params import ( + ReaderRetrieveParams, + ) + from stripe.params.terminal._reader_set_reader_display_params import ( + ReaderSetReaderDisplayParams, + ) + from stripe.params.terminal._reader_succeed_input_collection_params import ( + ReaderSucceedInputCollectionParams, + ) + from stripe.params.terminal._reader_timeout_input_collection_params import ( + ReaderTimeoutInputCollectionParams, + ) from stripe.terminal._location import Location @@ -496,497 +528,6 @@ class LineItem(StripeObject): "set_reader_display": SetReaderDisplay, } - class CancelActionParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class CollectInputsParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - inputs: List["Reader.CollectInputsParamsInput"] - """ - List of inputs to be collected using the Reader - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - - class CollectInputsParamsInput(TypedDict): - custom_text: "Reader.CollectInputsParamsInputCustomText" - """ - Customize the text which will be displayed while collecting this input - """ - required: NotRequired[bool] - """ - Indicate that this input is required, disabling the skip button - """ - selection: NotRequired["Reader.CollectInputsParamsInputSelection"] - """ - Options for the `selection` input - """ - toggles: NotRequired[List["Reader.CollectInputsParamsInputToggle"]] - """ - List of toggles to be displayed and customization for the toggles - """ - type: Literal[ - "email", "numeric", "phone", "selection", "signature", "text" - ] - """ - The type of input to collect - """ - - class CollectInputsParamsInputCustomText(TypedDict): - description: NotRequired[str] - """ - The description which will be displayed when collecting this input - """ - skip_button: NotRequired[str] - """ - The skip button text - """ - submit_button: NotRequired[str] - """ - The submit button text - """ - title: str - """ - The title which will be displayed when collecting this input - """ - - class CollectInputsParamsInputSelection(TypedDict): - choices: List["Reader.CollectInputsParamsInputSelectionChoice"] - """ - List of choices for the `selection` input - """ - - class CollectInputsParamsInputSelectionChoice(TypedDict): - id: str - """ - The unique identifier for this choice - """ - style: NotRequired[Literal["primary", "secondary"]] - """ - The style of the button which will be shown for this choice - """ - text: str - """ - The text which will be shown on the button for this choice - """ - - class CollectInputsParamsInputToggle(TypedDict): - default_value: NotRequired[Literal["disabled", "enabled"]] - """ - The default value of the toggle - """ - description: NotRequired[str] - """ - The description which will be displayed for the toggle - """ - title: NotRequired[str] - """ - The title which will be displayed for the toggle - """ - - class CollectPaymentMethodParams(RequestOptions): - collect_config: NotRequired[ - "Reader.CollectPaymentMethodParamsCollectConfig" - ] - """ - Configuration overrides. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - payment_intent: str - """ - PaymentIntent ID. - """ - - class CollectPaymentMethodParamsCollectConfig(TypedDict): - allow_redisplay: NotRequired[ - Literal["always", "limited", "unspecified"] - ] - """ - This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. - """ - enable_customer_cancellation: NotRequired[bool] - """ - Enables cancel button on transaction screens. - """ - skip_tipping: NotRequired[bool] - """ - Override showing a tipping selection screen on this transaction. - """ - tipping: NotRequired[ - "Reader.CollectPaymentMethodParamsCollectConfigTipping" - ] - """ - Tipping configuration for this transaction. - """ - - class CollectPaymentMethodParamsCollectConfigTipping(TypedDict): - amount_eligible: NotRequired[int] - """ - Amount used to calculate tip suggestions on tipping selection screen for this transaction. Must be a positive integer in the smallest currency unit (e.g., 100 cents to represent $1.00 or 100 to represent ¥100, a zero-decimal currency). - """ - - class ConfirmPaymentIntentParams(RequestOptions): - confirm_config: NotRequired[ - "Reader.ConfirmPaymentIntentParamsConfirmConfig" - ] - """ - Configuration overrides. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - payment_intent: str - """ - PaymentIntent ID. - """ - - class ConfirmPaymentIntentParamsConfirmConfig(TypedDict): - return_url: NotRequired[str] - """ - The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. - """ - - class CreateParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - label: NotRequired[str] - """ - Custom label given to the reader for easier identification. If no label is specified, the registration code will be used. - """ - location: NotRequired[str] - """ - The location to assign the reader to. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - registration_code: str - """ - A code generated by the reader used for registering to an account. - """ - - class DeleteParams(RequestOptions): - pass - - class ListParams(RequestOptions): - device_type: NotRequired[ - Literal[ - "bbpos_chipper2x", - "bbpos_wisepad3", - "bbpos_wisepos_e", - "mobile_phone_reader", - "simulated_stripe_s700", - "simulated_wisepos_e", - "stripe_m2", - "stripe_s700", - "verifone_P400", - ] - ] - """ - Filters readers by device type - """ - 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. - """ - location: NotRequired[str] - """ - A location ID to filter the response list to only readers at the specific location - """ - serial_number: NotRequired[str] - """ - Filters readers by serial number - """ - 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. - """ - status: NotRequired[Literal["offline", "online"]] - """ - A status filter to filter readers to only offline or online readers - """ - - class ModifyParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - label: NotRequired["Literal['']|str"] - """ - The new label of the reader. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - - class PresentPaymentMethodParams(RequestOptions): - amount_tip: NotRequired[int] - """ - Simulated on-reader tip amount. - """ - card: NotRequired["Reader.PresentPaymentMethodParamsCard"] - """ - Simulated data for the card payment method. - """ - card_present: NotRequired[ - "Reader.PresentPaymentMethodParamsCardPresent" - ] - """ - Simulated data for the card_present payment method. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - interac_present: NotRequired[ - "Reader.PresentPaymentMethodParamsInteracPresent" - ] - """ - Simulated data for the interac_present payment method. - """ - type: NotRequired[Literal["card", "card_present", "interac_present"]] - """ - Simulated payment type. - """ - - class PresentPaymentMethodParamsCard(TypedDict): - cvc: NotRequired[str] - """ - Card security code. - """ - exp_month: int - """ - Two-digit number representing the card's expiration month. - """ - exp_year: int - """ - Two- or four-digit number representing the card's expiration year. - """ - number: str - """ - The card number, as a string without any separators. - """ - - class PresentPaymentMethodParamsCardPresent(TypedDict): - number: NotRequired[str] - """ - The card number, as a string without any separators. - """ - - class PresentPaymentMethodParamsInteracPresent(TypedDict): - number: NotRequired[str] - """ - Card Number - """ - - class ProcessPaymentIntentParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - payment_intent: str - """ - PaymentIntent ID - """ - process_config: NotRequired[ - "Reader.ProcessPaymentIntentParamsProcessConfig" - ] - """ - Configuration overrides - """ - - class ProcessPaymentIntentParamsProcessConfig(TypedDict): - allow_redisplay: NotRequired[ - Literal["always", "limited", "unspecified"] - ] - """ - This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. - """ - enable_customer_cancellation: NotRequired[bool] - """ - Enables cancel button on transaction screens. - """ - return_url: NotRequired[str] - """ - The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. - """ - skip_tipping: NotRequired[bool] - """ - Override showing a tipping selection screen on this transaction. - """ - tipping: NotRequired[ - "Reader.ProcessPaymentIntentParamsProcessConfigTipping" - ] - """ - Tipping configuration for this transaction. - """ - - class ProcessPaymentIntentParamsProcessConfigTipping(TypedDict): - amount_eligible: NotRequired[int] - """ - Amount used to calculate tip suggestions on tipping selection screen for this transaction. Must be a positive integer in the smallest currency unit (e.g., 100 cents to represent $1.00 or 100 to represent ¥100, a zero-decimal currency). - """ - - class ProcessSetupIntentParams(RequestOptions): - allow_redisplay: Literal["always", "limited", "unspecified"] - """ - This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - process_config: NotRequired[ - "Reader.ProcessSetupIntentParamsProcessConfig" - ] - """ - Configuration overrides - """ - setup_intent: str - """ - SetupIntent ID - """ - - class ProcessSetupIntentParamsProcessConfig(TypedDict): - enable_customer_cancellation: NotRequired[bool] - """ - Enables cancel button on transaction screens. - """ - - class RefundPaymentParams(RequestOptions): - amount: NotRequired[int] - """ - A positive integer in __cents__ representing how much of this charge to refund. - """ - charge: NotRequired[str] - """ - ID of the Charge to refund. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - payment_intent: NotRequired[str] - """ - ID of the PaymentIntent to refund. - """ - refund_application_fee: NotRequired[bool] - """ - Boolean indicating whether the application fee should be refunded when refunding this charge. If a full charge refund is given, the full application fee will be refunded. Otherwise, the application fee will be refunded in an amount proportional to the amount of the charge refunded. An application fee can be refunded only by the application that created the charge. - """ - refund_payment_config: NotRequired[ - "Reader.RefundPaymentParamsRefundPaymentConfig" - ] - """ - Configuration overrides - """ - reverse_transfer: NotRequired[bool] - """ - Boolean indicating whether the transfer should be reversed when refunding this charge. The transfer will be reversed proportionally to the amount being refunded (either the entire or partial amount). A transfer can be reversed only by the application that created the charge. - """ - - class RefundPaymentParamsRefundPaymentConfig(TypedDict): - enable_customer_cancellation: NotRequired[bool] - """ - Enables cancel button on transaction screens. - """ - - class RetrieveParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class SetReaderDisplayParams(RequestOptions): - cart: NotRequired["Reader.SetReaderDisplayParamsCart"] - """ - Cart - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - type: Literal["cart"] - """ - Type - """ - - class SetReaderDisplayParamsCart(TypedDict): - 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). - """ - line_items: List["Reader.SetReaderDisplayParamsCartLineItem"] - """ - Array of line items that were purchased. - """ - tax: NotRequired[int] - """ - The amount of tax in cents. - """ - total: int - """ - Total balance of cart due in cents. - """ - - class SetReaderDisplayParamsCartLineItem(TypedDict): - amount: int - """ - The price of the item in cents. - """ - description: str - """ - The description or name of the item. - """ - quantity: int - """ - The quantity of the line item being purchased. - """ - - class SucceedInputCollectionParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - skip_non_required_inputs: NotRequired[Literal["all", "none"]] - """ - This parameter defines the skip behavior for input collection. - """ - - class TimeoutInputCollectionParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - action: Optional[Action] """ The most recent action performed by the reader. @@ -1052,7 +593,7 @@ class TimeoutInputCollectionParams(RequestOptions): @classmethod def _cls_cancel_action( - cls, reader: str, **params: Unpack["Reader.CancelActionParams"] + cls, reader: str, **params: Unpack["ReaderCancelActionParams"] ) -> "Reader": """ Cancels the current reader action. @@ -1071,7 +612,7 @@ def _cls_cancel_action( @overload @staticmethod def cancel_action( - reader: str, **params: Unpack["Reader.CancelActionParams"] + reader: str, **params: Unpack["ReaderCancelActionParams"] ) -> "Reader": """ Cancels the current reader action. @@ -1080,7 +621,7 @@ def cancel_action( @overload def cancel_action( - self, **params: Unpack["Reader.CancelActionParams"] + self, **params: Unpack["ReaderCancelActionParams"] ) -> "Reader": """ Cancels the current reader action. @@ -1089,7 +630,7 @@ def cancel_action( @class_method_variant("_cls_cancel_action") def cancel_action( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Reader.CancelActionParams"] + self, **params: Unpack["ReaderCancelActionParams"] ) -> "Reader": """ Cancels the current reader action. @@ -1107,7 +648,7 @@ def cancel_action( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_cancel_action_async( - cls, reader: str, **params: Unpack["Reader.CancelActionParams"] + cls, reader: str, **params: Unpack["ReaderCancelActionParams"] ) -> "Reader": """ Cancels the current reader action. @@ -1126,7 +667,7 @@ async def _cls_cancel_action_async( @overload @staticmethod async def cancel_action_async( - reader: str, **params: Unpack["Reader.CancelActionParams"] + reader: str, **params: Unpack["ReaderCancelActionParams"] ) -> "Reader": """ Cancels the current reader action. @@ -1135,7 +676,7 @@ async def cancel_action_async( @overload async def cancel_action_async( - self, **params: Unpack["Reader.CancelActionParams"] + self, **params: Unpack["ReaderCancelActionParams"] ) -> "Reader": """ Cancels the current reader action. @@ -1144,7 +685,7 @@ async def cancel_action_async( @class_method_variant("_cls_cancel_action_async") async def cancel_action_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Reader.CancelActionParams"] + self, **params: Unpack["ReaderCancelActionParams"] ) -> "Reader": """ Cancels the current reader action. @@ -1162,7 +703,7 @@ async def cancel_action_async( # pyright: ignore[reportGeneralTypeIssues] @classmethod def _cls_collect_inputs( - cls, reader: str, **params: Unpack["Reader.CollectInputsParams"] + cls, reader: str, **params: Unpack["ReaderCollectInputsParams"] ) -> "Reader": """ Initiates an input collection flow on a Reader. @@ -1181,7 +722,7 @@ def _cls_collect_inputs( @overload @staticmethod def collect_inputs( - reader: str, **params: Unpack["Reader.CollectInputsParams"] + reader: str, **params: Unpack["ReaderCollectInputsParams"] ) -> "Reader": """ Initiates an input collection flow on a Reader. @@ -1190,7 +731,7 @@ def collect_inputs( @overload def collect_inputs( - self, **params: Unpack["Reader.CollectInputsParams"] + self, **params: Unpack["ReaderCollectInputsParams"] ) -> "Reader": """ Initiates an input collection flow on a Reader. @@ -1199,7 +740,7 @@ def collect_inputs( @class_method_variant("_cls_collect_inputs") def collect_inputs( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Reader.CollectInputsParams"] + self, **params: Unpack["ReaderCollectInputsParams"] ) -> "Reader": """ Initiates an input collection flow on a Reader. @@ -1217,7 +758,7 @@ def collect_inputs( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_collect_inputs_async( - cls, reader: str, **params: Unpack["Reader.CollectInputsParams"] + cls, reader: str, **params: Unpack["ReaderCollectInputsParams"] ) -> "Reader": """ Initiates an input collection flow on a Reader. @@ -1236,7 +777,7 @@ async def _cls_collect_inputs_async( @overload @staticmethod async def collect_inputs_async( - reader: str, **params: Unpack["Reader.CollectInputsParams"] + reader: str, **params: Unpack["ReaderCollectInputsParams"] ) -> "Reader": """ Initiates an input collection flow on a Reader. @@ -1245,7 +786,7 @@ async def collect_inputs_async( @overload async def collect_inputs_async( - self, **params: Unpack["Reader.CollectInputsParams"] + self, **params: Unpack["ReaderCollectInputsParams"] ) -> "Reader": """ Initiates an input collection flow on a Reader. @@ -1254,7 +795,7 @@ async def collect_inputs_async( @class_method_variant("_cls_collect_inputs_async") async def collect_inputs_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Reader.CollectInputsParams"] + self, **params: Unpack["ReaderCollectInputsParams"] ) -> "Reader": """ Initiates an input collection flow on a Reader. @@ -1272,7 +813,7 @@ async def collect_inputs_async( # pyright: ignore[reportGeneralTypeIssues] @classmethod def _cls_collect_payment_method( - cls, reader: str, **params: Unpack["Reader.CollectPaymentMethodParams"] + cls, reader: str, **params: Unpack["ReaderCollectPaymentMethodParams"] ) -> "Reader": """ Initiates a payment flow on a Reader and updates the PaymentIntent with card details before manual confirmation. @@ -1291,7 +832,7 @@ def _cls_collect_payment_method( @overload @staticmethod def collect_payment_method( - reader: str, **params: Unpack["Reader.CollectPaymentMethodParams"] + reader: str, **params: Unpack["ReaderCollectPaymentMethodParams"] ) -> "Reader": """ Initiates a payment flow on a Reader and updates the PaymentIntent with card details before manual confirmation. @@ -1300,7 +841,7 @@ def collect_payment_method( @overload def collect_payment_method( - self, **params: Unpack["Reader.CollectPaymentMethodParams"] + self, **params: Unpack["ReaderCollectPaymentMethodParams"] ) -> "Reader": """ Initiates a payment flow on a Reader and updates the PaymentIntent with card details before manual confirmation. @@ -1309,7 +850,7 @@ def collect_payment_method( @class_method_variant("_cls_collect_payment_method") def collect_payment_method( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Reader.CollectPaymentMethodParams"] + self, **params: Unpack["ReaderCollectPaymentMethodParams"] ) -> "Reader": """ Initiates a payment flow on a Reader and updates the PaymentIntent with card details before manual confirmation. @@ -1327,7 +868,7 @@ def collect_payment_method( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_collect_payment_method_async( - cls, reader: str, **params: Unpack["Reader.CollectPaymentMethodParams"] + cls, reader: str, **params: Unpack["ReaderCollectPaymentMethodParams"] ) -> "Reader": """ Initiates a payment flow on a Reader and updates the PaymentIntent with card details before manual confirmation. @@ -1346,7 +887,7 @@ async def _cls_collect_payment_method_async( @overload @staticmethod async def collect_payment_method_async( - reader: str, **params: Unpack["Reader.CollectPaymentMethodParams"] + reader: str, **params: Unpack["ReaderCollectPaymentMethodParams"] ) -> "Reader": """ Initiates a payment flow on a Reader and updates the PaymentIntent with card details before manual confirmation. @@ -1355,7 +896,7 @@ async def collect_payment_method_async( @overload async def collect_payment_method_async( - self, **params: Unpack["Reader.CollectPaymentMethodParams"] + self, **params: Unpack["ReaderCollectPaymentMethodParams"] ) -> "Reader": """ Initiates a payment flow on a Reader and updates the PaymentIntent with card details before manual confirmation. @@ -1364,7 +905,7 @@ async def collect_payment_method_async( @class_method_variant("_cls_collect_payment_method_async") async def collect_payment_method_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Reader.CollectPaymentMethodParams"] + self, **params: Unpack["ReaderCollectPaymentMethodParams"] ) -> "Reader": """ Initiates a payment flow on a Reader and updates the PaymentIntent with card details before manual confirmation. @@ -1382,7 +923,7 @@ async def collect_payment_method_async( # pyright: ignore[reportGeneralTypeIssu @classmethod def _cls_confirm_payment_intent( - cls, reader: str, **params: Unpack["Reader.ConfirmPaymentIntentParams"] + cls, reader: str, **params: Unpack["ReaderConfirmPaymentIntentParams"] ) -> "Reader": """ Finalizes a payment on a Reader. @@ -1401,7 +942,7 @@ def _cls_confirm_payment_intent( @overload @staticmethod def confirm_payment_intent( - reader: str, **params: Unpack["Reader.ConfirmPaymentIntentParams"] + reader: str, **params: Unpack["ReaderConfirmPaymentIntentParams"] ) -> "Reader": """ Finalizes a payment on a Reader. @@ -1410,7 +951,7 @@ def confirm_payment_intent( @overload def confirm_payment_intent( - self, **params: Unpack["Reader.ConfirmPaymentIntentParams"] + self, **params: Unpack["ReaderConfirmPaymentIntentParams"] ) -> "Reader": """ Finalizes a payment on a Reader. @@ -1419,7 +960,7 @@ def confirm_payment_intent( @class_method_variant("_cls_confirm_payment_intent") def confirm_payment_intent( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Reader.ConfirmPaymentIntentParams"] + self, **params: Unpack["ReaderConfirmPaymentIntentParams"] ) -> "Reader": """ Finalizes a payment on a Reader. @@ -1437,7 +978,7 @@ def confirm_payment_intent( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_confirm_payment_intent_async( - cls, reader: str, **params: Unpack["Reader.ConfirmPaymentIntentParams"] + cls, reader: str, **params: Unpack["ReaderConfirmPaymentIntentParams"] ) -> "Reader": """ Finalizes a payment on a Reader. @@ -1456,7 +997,7 @@ async def _cls_confirm_payment_intent_async( @overload @staticmethod async def confirm_payment_intent_async( - reader: str, **params: Unpack["Reader.ConfirmPaymentIntentParams"] + reader: str, **params: Unpack["ReaderConfirmPaymentIntentParams"] ) -> "Reader": """ Finalizes a payment on a Reader. @@ -1465,7 +1006,7 @@ async def confirm_payment_intent_async( @overload async def confirm_payment_intent_async( - self, **params: Unpack["Reader.ConfirmPaymentIntentParams"] + self, **params: Unpack["ReaderConfirmPaymentIntentParams"] ) -> "Reader": """ Finalizes a payment on a Reader. @@ -1474,7 +1015,7 @@ async def confirm_payment_intent_async( @class_method_variant("_cls_confirm_payment_intent_async") async def confirm_payment_intent_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Reader.ConfirmPaymentIntentParams"] + self, **params: Unpack["ReaderConfirmPaymentIntentParams"] ) -> "Reader": """ Finalizes a payment on a Reader. @@ -1491,7 +1032,7 @@ async def confirm_payment_intent_async( # pyright: ignore[reportGeneralTypeIssu ) @classmethod - def create(cls, **params: Unpack["Reader.CreateParams"]) -> "Reader": + def create(cls, **params: Unpack["ReaderCreateParams"]) -> "Reader": """ Creates a new Reader object. """ @@ -1506,7 +1047,7 @@ def create(cls, **params: Unpack["Reader.CreateParams"]) -> "Reader": @classmethod async def create_async( - cls, **params: Unpack["Reader.CreateParams"] + cls, **params: Unpack["ReaderCreateParams"] ) -> "Reader": """ Creates a new Reader object. @@ -1522,7 +1063,7 @@ async def create_async( @classmethod def _cls_delete( - cls, sid: str, **params: Unpack["Reader.DeleteParams"] + cls, sid: str, **params: Unpack["ReaderDeleteParams"] ) -> "Reader": """ Deletes a Reader object. @@ -1539,14 +1080,14 @@ def _cls_delete( @overload @staticmethod - def delete(sid: str, **params: Unpack["Reader.DeleteParams"]) -> "Reader": + def delete(sid: str, **params: Unpack["ReaderDeleteParams"]) -> "Reader": """ Deletes a Reader object. """ ... @overload - def delete(self, **params: Unpack["Reader.DeleteParams"]) -> "Reader": + def delete(self, **params: Unpack["ReaderDeleteParams"]) -> "Reader": """ Deletes a Reader object. """ @@ -1554,7 +1095,7 @@ def delete(self, **params: Unpack["Reader.DeleteParams"]) -> "Reader": @class_method_variant("_cls_delete") def delete( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Reader.DeleteParams"] + self, **params: Unpack["ReaderDeleteParams"] ) -> "Reader": """ Deletes a Reader object. @@ -1567,7 +1108,7 @@ def delete( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_delete_async( - cls, sid: str, **params: Unpack["Reader.DeleteParams"] + cls, sid: str, **params: Unpack["ReaderDeleteParams"] ) -> "Reader": """ Deletes a Reader object. @@ -1585,7 +1126,7 @@ async def _cls_delete_async( @overload @staticmethod async def delete_async( - sid: str, **params: Unpack["Reader.DeleteParams"] + sid: str, **params: Unpack["ReaderDeleteParams"] ) -> "Reader": """ Deletes a Reader object. @@ -1594,7 +1135,7 @@ async def delete_async( @overload async def delete_async( - self, **params: Unpack["Reader.DeleteParams"] + self, **params: Unpack["ReaderDeleteParams"] ) -> "Reader": """ Deletes a Reader object. @@ -1603,7 +1144,7 @@ async def delete_async( @class_method_variant("_cls_delete_async") async def delete_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Reader.DeleteParams"] + self, **params: Unpack["ReaderDeleteParams"] ) -> "Reader": """ Deletes a Reader object. @@ -1616,7 +1157,7 @@ async def delete_async( # pyright: ignore[reportGeneralTypeIssues] @classmethod def list( - cls, **params: Unpack["Reader.ListParams"] + cls, **params: Unpack["ReaderListParams"] ) -> ListObject["Reader"]: """ Returns a list of Reader objects. @@ -1636,7 +1177,7 @@ def list( @classmethod async def list_async( - cls, **params: Unpack["Reader.ListParams"] + cls, **params: Unpack["ReaderListParams"] ) -> ListObject["Reader"]: """ Returns a list of Reader objects. @@ -1656,7 +1197,7 @@ async def list_async( @classmethod def modify( - cls, id: str, **params: Unpack["Reader.ModifyParams"] + cls, id: str, **params: Unpack["ReaderModifyParams"] ) -> "Reader": """ Updates a Reader object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. @@ -1673,7 +1214,7 @@ def modify( @classmethod async def modify_async( - cls, id: str, **params: Unpack["Reader.ModifyParams"] + cls, id: str, **params: Unpack["ReaderModifyParams"] ) -> "Reader": """ Updates a Reader object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. @@ -1690,7 +1231,7 @@ async def modify_async( @classmethod def _cls_process_payment_intent( - cls, reader: str, **params: Unpack["Reader.ProcessPaymentIntentParams"] + cls, reader: str, **params: Unpack["ReaderProcessPaymentIntentParams"] ) -> "Reader": """ Initiates a payment flow on a Reader. @@ -1709,7 +1250,7 @@ def _cls_process_payment_intent( @overload @staticmethod def process_payment_intent( - reader: str, **params: Unpack["Reader.ProcessPaymentIntentParams"] + reader: str, **params: Unpack["ReaderProcessPaymentIntentParams"] ) -> "Reader": """ Initiates a payment flow on a Reader. @@ -1718,7 +1259,7 @@ def process_payment_intent( @overload def process_payment_intent( - self, **params: Unpack["Reader.ProcessPaymentIntentParams"] + self, **params: Unpack["ReaderProcessPaymentIntentParams"] ) -> "Reader": """ Initiates a payment flow on a Reader. @@ -1727,7 +1268,7 @@ def process_payment_intent( @class_method_variant("_cls_process_payment_intent") def process_payment_intent( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Reader.ProcessPaymentIntentParams"] + self, **params: Unpack["ReaderProcessPaymentIntentParams"] ) -> "Reader": """ Initiates a payment flow on a Reader. @@ -1745,7 +1286,7 @@ def process_payment_intent( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_process_payment_intent_async( - cls, reader: str, **params: Unpack["Reader.ProcessPaymentIntentParams"] + cls, reader: str, **params: Unpack["ReaderProcessPaymentIntentParams"] ) -> "Reader": """ Initiates a payment flow on a Reader. @@ -1764,7 +1305,7 @@ async def _cls_process_payment_intent_async( @overload @staticmethod async def process_payment_intent_async( - reader: str, **params: Unpack["Reader.ProcessPaymentIntentParams"] + reader: str, **params: Unpack["ReaderProcessPaymentIntentParams"] ) -> "Reader": """ Initiates a payment flow on a Reader. @@ -1773,7 +1314,7 @@ async def process_payment_intent_async( @overload async def process_payment_intent_async( - self, **params: Unpack["Reader.ProcessPaymentIntentParams"] + self, **params: Unpack["ReaderProcessPaymentIntentParams"] ) -> "Reader": """ Initiates a payment flow on a Reader. @@ -1782,7 +1323,7 @@ async def process_payment_intent_async( @class_method_variant("_cls_process_payment_intent_async") async def process_payment_intent_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Reader.ProcessPaymentIntentParams"] + self, **params: Unpack["ReaderProcessPaymentIntentParams"] ) -> "Reader": """ Initiates a payment flow on a Reader. @@ -1800,7 +1341,7 @@ async def process_payment_intent_async( # pyright: ignore[reportGeneralTypeIssu @classmethod def _cls_process_setup_intent( - cls, reader: str, **params: Unpack["Reader.ProcessSetupIntentParams"] + cls, reader: str, **params: Unpack["ReaderProcessSetupIntentParams"] ) -> "Reader": """ Initiates a setup intent flow on a Reader. @@ -1819,7 +1360,7 @@ def _cls_process_setup_intent( @overload @staticmethod def process_setup_intent( - reader: str, **params: Unpack["Reader.ProcessSetupIntentParams"] + reader: str, **params: Unpack["ReaderProcessSetupIntentParams"] ) -> "Reader": """ Initiates a setup intent flow on a Reader. @@ -1828,7 +1369,7 @@ def process_setup_intent( @overload def process_setup_intent( - self, **params: Unpack["Reader.ProcessSetupIntentParams"] + self, **params: Unpack["ReaderProcessSetupIntentParams"] ) -> "Reader": """ Initiates a setup intent flow on a Reader. @@ -1837,7 +1378,7 @@ def process_setup_intent( @class_method_variant("_cls_process_setup_intent") def process_setup_intent( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Reader.ProcessSetupIntentParams"] + self, **params: Unpack["ReaderProcessSetupIntentParams"] ) -> "Reader": """ Initiates a setup intent flow on a Reader. @@ -1855,7 +1396,7 @@ def process_setup_intent( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_process_setup_intent_async( - cls, reader: str, **params: Unpack["Reader.ProcessSetupIntentParams"] + cls, reader: str, **params: Unpack["ReaderProcessSetupIntentParams"] ) -> "Reader": """ Initiates a setup intent flow on a Reader. @@ -1874,7 +1415,7 @@ async def _cls_process_setup_intent_async( @overload @staticmethod async def process_setup_intent_async( - reader: str, **params: Unpack["Reader.ProcessSetupIntentParams"] + reader: str, **params: Unpack["ReaderProcessSetupIntentParams"] ) -> "Reader": """ Initiates a setup intent flow on a Reader. @@ -1883,7 +1424,7 @@ async def process_setup_intent_async( @overload async def process_setup_intent_async( - self, **params: Unpack["Reader.ProcessSetupIntentParams"] + self, **params: Unpack["ReaderProcessSetupIntentParams"] ) -> "Reader": """ Initiates a setup intent flow on a Reader. @@ -1892,7 +1433,7 @@ async def process_setup_intent_async( @class_method_variant("_cls_process_setup_intent_async") async def process_setup_intent_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Reader.ProcessSetupIntentParams"] + self, **params: Unpack["ReaderProcessSetupIntentParams"] ) -> "Reader": """ Initiates a setup intent flow on a Reader. @@ -1910,7 +1451,7 @@ async def process_setup_intent_async( # pyright: ignore[reportGeneralTypeIssues @classmethod def _cls_refund_payment( - cls, reader: str, **params: Unpack["Reader.RefundPaymentParams"] + cls, reader: str, **params: Unpack["ReaderRefundPaymentParams"] ) -> "Reader": """ Initiates a refund on a Reader @@ -1929,7 +1470,7 @@ def _cls_refund_payment( @overload @staticmethod def refund_payment( - reader: str, **params: Unpack["Reader.RefundPaymentParams"] + reader: str, **params: Unpack["ReaderRefundPaymentParams"] ) -> "Reader": """ Initiates a refund on a Reader @@ -1938,7 +1479,7 @@ def refund_payment( @overload def refund_payment( - self, **params: Unpack["Reader.RefundPaymentParams"] + self, **params: Unpack["ReaderRefundPaymentParams"] ) -> "Reader": """ Initiates a refund on a Reader @@ -1947,7 +1488,7 @@ def refund_payment( @class_method_variant("_cls_refund_payment") def refund_payment( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Reader.RefundPaymentParams"] + self, **params: Unpack["ReaderRefundPaymentParams"] ) -> "Reader": """ Initiates a refund on a Reader @@ -1965,7 +1506,7 @@ def refund_payment( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_refund_payment_async( - cls, reader: str, **params: Unpack["Reader.RefundPaymentParams"] + cls, reader: str, **params: Unpack["ReaderRefundPaymentParams"] ) -> "Reader": """ Initiates a refund on a Reader @@ -1984,7 +1525,7 @@ async def _cls_refund_payment_async( @overload @staticmethod async def refund_payment_async( - reader: str, **params: Unpack["Reader.RefundPaymentParams"] + reader: str, **params: Unpack["ReaderRefundPaymentParams"] ) -> "Reader": """ Initiates a refund on a Reader @@ -1993,7 +1534,7 @@ async def refund_payment_async( @overload async def refund_payment_async( - self, **params: Unpack["Reader.RefundPaymentParams"] + self, **params: Unpack["ReaderRefundPaymentParams"] ) -> "Reader": """ Initiates a refund on a Reader @@ -2002,7 +1543,7 @@ async def refund_payment_async( @class_method_variant("_cls_refund_payment_async") async def refund_payment_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Reader.RefundPaymentParams"] + self, **params: Unpack["ReaderRefundPaymentParams"] ) -> "Reader": """ Initiates a refund on a Reader @@ -2020,7 +1561,7 @@ async def refund_payment_async( # pyright: ignore[reportGeneralTypeIssues] @classmethod def retrieve( - cls, id: str, **params: Unpack["Reader.RetrieveParams"] + cls, id: str, **params: Unpack["ReaderRetrieveParams"] ) -> "Reader": """ Retrieves a Reader object. @@ -2031,7 +1572,7 @@ def retrieve( @classmethod async def retrieve_async( - cls, id: str, **params: Unpack["Reader.RetrieveParams"] + cls, id: str, **params: Unpack["ReaderRetrieveParams"] ) -> "Reader": """ Retrieves a Reader object. @@ -2042,7 +1583,7 @@ async def retrieve_async( @classmethod def _cls_set_reader_display( - cls, reader: str, **params: Unpack["Reader.SetReaderDisplayParams"] + cls, reader: str, **params: Unpack["ReaderSetReaderDisplayParams"] ) -> "Reader": """ Sets reader display to show cart details. @@ -2061,7 +1602,7 @@ def _cls_set_reader_display( @overload @staticmethod def set_reader_display( - reader: str, **params: Unpack["Reader.SetReaderDisplayParams"] + reader: str, **params: Unpack["ReaderSetReaderDisplayParams"] ) -> "Reader": """ Sets reader display to show cart details. @@ -2070,7 +1611,7 @@ def set_reader_display( @overload def set_reader_display( - self, **params: Unpack["Reader.SetReaderDisplayParams"] + self, **params: Unpack["ReaderSetReaderDisplayParams"] ) -> "Reader": """ Sets reader display to show cart details. @@ -2079,7 +1620,7 @@ def set_reader_display( @class_method_variant("_cls_set_reader_display") def set_reader_display( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Reader.SetReaderDisplayParams"] + self, **params: Unpack["ReaderSetReaderDisplayParams"] ) -> "Reader": """ Sets reader display to show cart details. @@ -2097,7 +1638,7 @@ def set_reader_display( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_set_reader_display_async( - cls, reader: str, **params: Unpack["Reader.SetReaderDisplayParams"] + cls, reader: str, **params: Unpack["ReaderSetReaderDisplayParams"] ) -> "Reader": """ Sets reader display to show cart details. @@ -2116,7 +1657,7 @@ async def _cls_set_reader_display_async( @overload @staticmethod async def set_reader_display_async( - reader: str, **params: Unpack["Reader.SetReaderDisplayParams"] + reader: str, **params: Unpack["ReaderSetReaderDisplayParams"] ) -> "Reader": """ Sets reader display to show cart details. @@ -2125,7 +1666,7 @@ async def set_reader_display_async( @overload async def set_reader_display_async( - self, **params: Unpack["Reader.SetReaderDisplayParams"] + self, **params: Unpack["ReaderSetReaderDisplayParams"] ) -> "Reader": """ Sets reader display to show cart details. @@ -2134,7 +1675,7 @@ async def set_reader_display_async( @class_method_variant("_cls_set_reader_display_async") async def set_reader_display_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Reader.SetReaderDisplayParams"] + self, **params: Unpack["ReaderSetReaderDisplayParams"] ) -> "Reader": """ Sets reader display to show cart details. @@ -2157,7 +1698,7 @@ class TestHelpers(APIResourceTestHelpers["Reader"]): def _cls_present_payment_method( cls, reader: str, - **params: Unpack["Reader.PresentPaymentMethodParams"], + **params: Unpack["ReaderPresentPaymentMethodParams"], ) -> "Reader": """ Presents a payment method on a simulated reader. Can be used to simulate accepting a payment, saving a card or refunding a transaction. @@ -2176,7 +1717,7 @@ def _cls_present_payment_method( @overload @staticmethod def present_payment_method( - reader: str, **params: Unpack["Reader.PresentPaymentMethodParams"] + reader: str, **params: Unpack["ReaderPresentPaymentMethodParams"] ) -> "Reader": """ Presents a payment method on a simulated reader. Can be used to simulate accepting a payment, saving a card or refunding a transaction. @@ -2185,7 +1726,7 @@ def present_payment_method( @overload def present_payment_method( - self, **params: Unpack["Reader.PresentPaymentMethodParams"] + self, **params: Unpack["ReaderPresentPaymentMethodParams"] ) -> "Reader": """ Presents a payment method on a simulated reader. Can be used to simulate accepting a payment, saving a card or refunding a transaction. @@ -2194,7 +1735,7 @@ def present_payment_method( @class_method_variant("_cls_present_payment_method") def present_payment_method( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Reader.PresentPaymentMethodParams"] + self, **params: Unpack["ReaderPresentPaymentMethodParams"] ) -> "Reader": """ Presents a payment method on a simulated reader. Can be used to simulate accepting a payment, saving a card or refunding a transaction. @@ -2214,7 +1755,7 @@ def present_payment_method( # pyright: ignore[reportGeneralTypeIssues] async def _cls_present_payment_method_async( cls, reader: str, - **params: Unpack["Reader.PresentPaymentMethodParams"], + **params: Unpack["ReaderPresentPaymentMethodParams"], ) -> "Reader": """ Presents a payment method on a simulated reader. Can be used to simulate accepting a payment, saving a card or refunding a transaction. @@ -2233,7 +1774,7 @@ async def _cls_present_payment_method_async( @overload @staticmethod async def present_payment_method_async( - reader: str, **params: Unpack["Reader.PresentPaymentMethodParams"] + reader: str, **params: Unpack["ReaderPresentPaymentMethodParams"] ) -> "Reader": """ Presents a payment method on a simulated reader. Can be used to simulate accepting a payment, saving a card or refunding a transaction. @@ -2242,7 +1783,7 @@ async def present_payment_method_async( @overload async def present_payment_method_async( - self, **params: Unpack["Reader.PresentPaymentMethodParams"] + self, **params: Unpack["ReaderPresentPaymentMethodParams"] ) -> "Reader": """ Presents a payment method on a simulated reader. Can be used to simulate accepting a payment, saving a card or refunding a transaction. @@ -2251,7 +1792,7 @@ async def present_payment_method_async( @class_method_variant("_cls_present_payment_method_async") async def present_payment_method_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Reader.PresentPaymentMethodParams"] + self, **params: Unpack["ReaderPresentPaymentMethodParams"] ) -> "Reader": """ Presents a payment method on a simulated reader. Can be used to simulate accepting a payment, saving a card or refunding a transaction. @@ -2271,7 +1812,7 @@ async def present_payment_method_async( # pyright: ignore[reportGeneralTypeIssu def _cls_succeed_input_collection( cls, reader: str, - **params: Unpack["Reader.SucceedInputCollectionParams"], + **params: Unpack["ReaderSucceedInputCollectionParams"], ) -> "Reader": """ Use this endpoint to trigger a successful input collection on a simulated reader. @@ -2290,8 +1831,7 @@ def _cls_succeed_input_collection( @overload @staticmethod def succeed_input_collection( - reader: str, - **params: Unpack["Reader.SucceedInputCollectionParams"], + reader: str, **params: Unpack["ReaderSucceedInputCollectionParams"] ) -> "Reader": """ Use this endpoint to trigger a successful input collection on a simulated reader. @@ -2300,7 +1840,7 @@ def succeed_input_collection( @overload def succeed_input_collection( - self, **params: Unpack["Reader.SucceedInputCollectionParams"] + self, **params: Unpack["ReaderSucceedInputCollectionParams"] ) -> "Reader": """ Use this endpoint to trigger a successful input collection on a simulated reader. @@ -2309,7 +1849,7 @@ def succeed_input_collection( @class_method_variant("_cls_succeed_input_collection") def succeed_input_collection( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Reader.SucceedInputCollectionParams"] + self, **params: Unpack["ReaderSucceedInputCollectionParams"] ) -> "Reader": """ Use this endpoint to trigger a successful input collection on a simulated reader. @@ -2329,7 +1869,7 @@ def succeed_input_collection( # pyright: ignore[reportGeneralTypeIssues] async def _cls_succeed_input_collection_async( cls, reader: str, - **params: Unpack["Reader.SucceedInputCollectionParams"], + **params: Unpack["ReaderSucceedInputCollectionParams"], ) -> "Reader": """ Use this endpoint to trigger a successful input collection on a simulated reader. @@ -2348,8 +1888,7 @@ async def _cls_succeed_input_collection_async( @overload @staticmethod async def succeed_input_collection_async( - reader: str, - **params: Unpack["Reader.SucceedInputCollectionParams"], + reader: str, **params: Unpack["ReaderSucceedInputCollectionParams"] ) -> "Reader": """ Use this endpoint to trigger a successful input collection on a simulated reader. @@ -2358,7 +1897,7 @@ async def succeed_input_collection_async( @overload async def succeed_input_collection_async( - self, **params: Unpack["Reader.SucceedInputCollectionParams"] + self, **params: Unpack["ReaderSucceedInputCollectionParams"] ) -> "Reader": """ Use this endpoint to trigger a successful input collection on a simulated reader. @@ -2367,7 +1906,7 @@ async def succeed_input_collection_async( @class_method_variant("_cls_succeed_input_collection_async") async def succeed_input_collection_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Reader.SucceedInputCollectionParams"] + self, **params: Unpack["ReaderSucceedInputCollectionParams"] ) -> "Reader": """ Use this endpoint to trigger a successful input collection on a simulated reader. @@ -2387,7 +1926,7 @@ async def succeed_input_collection_async( # pyright: ignore[reportGeneralTypeIs def _cls_timeout_input_collection( cls, reader: str, - **params: Unpack["Reader.TimeoutInputCollectionParams"], + **params: Unpack["ReaderTimeoutInputCollectionParams"], ) -> "Reader": """ Use this endpoint to complete an input collection with a timeout error on a simulated reader. @@ -2406,8 +1945,7 @@ def _cls_timeout_input_collection( @overload @staticmethod def timeout_input_collection( - reader: str, - **params: Unpack["Reader.TimeoutInputCollectionParams"], + reader: str, **params: Unpack["ReaderTimeoutInputCollectionParams"] ) -> "Reader": """ Use this endpoint to complete an input collection with a timeout error on a simulated reader. @@ -2416,7 +1954,7 @@ def timeout_input_collection( @overload def timeout_input_collection( - self, **params: Unpack["Reader.TimeoutInputCollectionParams"] + self, **params: Unpack["ReaderTimeoutInputCollectionParams"] ) -> "Reader": """ Use this endpoint to complete an input collection with a timeout error on a simulated reader. @@ -2425,7 +1963,7 @@ def timeout_input_collection( @class_method_variant("_cls_timeout_input_collection") def timeout_input_collection( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Reader.TimeoutInputCollectionParams"] + self, **params: Unpack["ReaderTimeoutInputCollectionParams"] ) -> "Reader": """ Use this endpoint to complete an input collection with a timeout error on a simulated reader. @@ -2445,7 +1983,7 @@ def timeout_input_collection( # pyright: ignore[reportGeneralTypeIssues] async def _cls_timeout_input_collection_async( cls, reader: str, - **params: Unpack["Reader.TimeoutInputCollectionParams"], + **params: Unpack["ReaderTimeoutInputCollectionParams"], ) -> "Reader": """ Use this endpoint to complete an input collection with a timeout error on a simulated reader. @@ -2464,8 +2002,7 @@ async def _cls_timeout_input_collection_async( @overload @staticmethod async def timeout_input_collection_async( - reader: str, - **params: Unpack["Reader.TimeoutInputCollectionParams"], + reader: str, **params: Unpack["ReaderTimeoutInputCollectionParams"] ) -> "Reader": """ Use this endpoint to complete an input collection with a timeout error on a simulated reader. @@ -2474,7 +2011,7 @@ async def timeout_input_collection_async( @overload async def timeout_input_collection_async( - self, **params: Unpack["Reader.TimeoutInputCollectionParams"] + self, **params: Unpack["ReaderTimeoutInputCollectionParams"] ) -> "Reader": """ Use this endpoint to complete an input collection with a timeout error on a simulated reader. @@ -2483,7 +2020,7 @@ async def timeout_input_collection_async( @class_method_variant("_cls_timeout_input_collection_async") async def timeout_input_collection_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["Reader.TimeoutInputCollectionParams"] + self, **params: Unpack["ReaderTimeoutInputCollectionParams"] ) -> "Reader": """ Use this endpoint to complete an input collection with a timeout error on a simulated reader. diff --git a/stripe/terminal/_reader_collected_data.py b/stripe/terminal/_reader_collected_data.py index b825e7f5d..68d348e85 100644 --- a/stripe/terminal/_reader_collected_data.py +++ b/stripe/terminal/_reader_collected_data.py @@ -1,10 +1,14 @@ # -*- coding: utf-8 -*- # File generated from our OpenAPI spec from stripe._api_resource import APIResource -from stripe._request_options import RequestOptions from stripe._stripe_object import StripeObject -from typing import ClassVar, List, Optional -from typing_extensions import Literal, NotRequired, Unpack +from typing import ClassVar, Optional +from typing_extensions import Literal, Unpack, TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params.terminal._reader_collected_data_retrieve_params import ( + ReaderCollectedDataRetrieveParams, + ) class ReaderCollectedData(APIResource["ReaderCollectedData"]): @@ -22,12 +26,6 @@ class Magstripe(StripeObject): The raw magstripe data collected by the reader. """ - class RetrieveParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - created: int """ Time at which the object was created. Measured in seconds since the Unix epoch. @@ -55,7 +53,7 @@ class RetrieveParams(RequestOptions): @classmethod def retrieve( - cls, id: str, **params: Unpack["ReaderCollectedData.RetrieveParams"] + cls, id: str, **params: Unpack["ReaderCollectedDataRetrieveParams"] ) -> "ReaderCollectedData": """ Retrieve data collected using Reader hardware. @@ -66,7 +64,7 @@ def retrieve( @classmethod async def retrieve_async( - cls, id: str, **params: Unpack["ReaderCollectedData.RetrieveParams"] + cls, id: str, **params: Unpack["ReaderCollectedDataRetrieveParams"] ) -> "ReaderCollectedData": """ Retrieve data collected using Reader hardware. diff --git a/stripe/terminal/_reader_collected_data_service.py b/stripe/terminal/_reader_collected_data_service.py index a22a0fbc3..69fbfc5a4 100644 --- a/stripe/terminal/_reader_collected_data_service.py +++ b/stripe/terminal/_reader_collected_data_service.py @@ -4,21 +4,20 @@ from stripe._stripe_service import StripeService from stripe._util import sanitize_id from stripe.terminal._reader_collected_data import ReaderCollectedData -from typing import List, Optional, cast -from typing_extensions import NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params.terminal._reader_collected_data_retrieve_params import ( + ReaderCollectedDataRetrieveParams, + ) -class ReaderCollectedDataService(StripeService): - class RetrieveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ +class ReaderCollectedDataService(StripeService): def retrieve( self, reader_collected_data: str, - params: Optional["ReaderCollectedDataService.RetrieveParams"] = None, + params: Optional["ReaderCollectedDataRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> ReaderCollectedData: """ @@ -40,7 +39,7 @@ def retrieve( async def retrieve_async( self, reader_collected_data: str, - params: Optional["ReaderCollectedDataService.RetrieveParams"] = None, + params: Optional["ReaderCollectedDataRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> ReaderCollectedData: """ diff --git a/stripe/terminal/_reader_service.py b/stripe/terminal/_reader_service.py index 1ec6c8d57..ff9eabaaf 100644 --- a/stripe/terminal/_reader_service.py +++ b/stripe/terminal/_reader_service.py @@ -5,434 +5,48 @@ from stripe._stripe_service import StripeService from stripe._util import sanitize_id from stripe.terminal._reader import Reader -from typing import Dict, List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params.terminal._reader_cancel_action_params import ( + ReaderCancelActionParams, + ) + from stripe.params.terminal._reader_collect_inputs_params import ( + ReaderCollectInputsParams, + ) + from stripe.params.terminal._reader_collect_payment_method_params import ( + ReaderCollectPaymentMethodParams, + ) + from stripe.params.terminal._reader_confirm_payment_intent_params import ( + ReaderConfirmPaymentIntentParams, + ) + from stripe.params.terminal._reader_create_params import ReaderCreateParams + from stripe.params.terminal._reader_delete_params import ReaderDeleteParams + from stripe.params.terminal._reader_list_params import ReaderListParams + from stripe.params.terminal._reader_process_payment_intent_params import ( + ReaderProcessPaymentIntentParams, + ) + from stripe.params.terminal._reader_process_setup_intent_params import ( + ReaderProcessSetupIntentParams, + ) + from stripe.params.terminal._reader_refund_payment_params import ( + ReaderRefundPaymentParams, + ) + from stripe.params.terminal._reader_retrieve_params import ( + ReaderRetrieveParams, + ) + from stripe.params.terminal._reader_set_reader_display_params import ( + ReaderSetReaderDisplayParams, + ) + from stripe.params.terminal._reader_update_params import ReaderUpdateParams class ReaderService(StripeService): - class CancelActionParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class CollectInputsParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - inputs: List["ReaderService.CollectInputsParamsInput"] - """ - List of inputs to be collected using the Reader - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - - class CollectInputsParamsInput(TypedDict): - custom_text: "ReaderService.CollectInputsParamsInputCustomText" - """ - Customize the text which will be displayed while collecting this input - """ - required: NotRequired[bool] - """ - Indicate that this input is required, disabling the skip button - """ - selection: NotRequired[ - "ReaderService.CollectInputsParamsInputSelection" - ] - """ - Options for the `selection` input - """ - toggles: NotRequired[ - List["ReaderService.CollectInputsParamsInputToggle"] - ] - """ - List of toggles to be displayed and customization for the toggles - """ - type: Literal[ - "email", "numeric", "phone", "selection", "signature", "text" - ] - """ - The type of input to collect - """ - - class CollectInputsParamsInputCustomText(TypedDict): - description: NotRequired[str] - """ - The description which will be displayed when collecting this input - """ - skip_button: NotRequired[str] - """ - The skip button text - """ - submit_button: NotRequired[str] - """ - The submit button text - """ - title: str - """ - The title which will be displayed when collecting this input - """ - - class CollectInputsParamsInputSelection(TypedDict): - choices: List["ReaderService.CollectInputsParamsInputSelectionChoice"] - """ - List of choices for the `selection` input - """ - - class CollectInputsParamsInputSelectionChoice(TypedDict): - id: str - """ - The unique identifier for this choice - """ - style: NotRequired[Literal["primary", "secondary"]] - """ - The style of the button which will be shown for this choice - """ - text: str - """ - The text which will be shown on the button for this choice - """ - - class CollectInputsParamsInputToggle(TypedDict): - default_value: NotRequired[Literal["disabled", "enabled"]] - """ - The default value of the toggle - """ - description: NotRequired[str] - """ - The description which will be displayed for the toggle - """ - title: NotRequired[str] - """ - The title which will be displayed for the toggle - """ - - class CollectPaymentMethodParams(TypedDict): - collect_config: NotRequired[ - "ReaderService.CollectPaymentMethodParamsCollectConfig" - ] - """ - Configuration overrides. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - payment_intent: str - """ - PaymentIntent ID. - """ - - class CollectPaymentMethodParamsCollectConfig(TypedDict): - allow_redisplay: NotRequired[ - Literal["always", "limited", "unspecified"] - ] - """ - This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. - """ - enable_customer_cancellation: NotRequired[bool] - """ - Enables cancel button on transaction screens. - """ - skip_tipping: NotRequired[bool] - """ - Override showing a tipping selection screen on this transaction. - """ - tipping: NotRequired[ - "ReaderService.CollectPaymentMethodParamsCollectConfigTipping" - ] - """ - Tipping configuration for this transaction. - """ - - class CollectPaymentMethodParamsCollectConfigTipping(TypedDict): - amount_eligible: NotRequired[int] - """ - Amount used to calculate tip suggestions on tipping selection screen for this transaction. Must be a positive integer in the smallest currency unit (e.g., 100 cents to represent $1.00 or 100 to represent ¥100, a zero-decimal currency). - """ - - class ConfirmPaymentIntentParams(TypedDict): - confirm_config: NotRequired[ - "ReaderService.ConfirmPaymentIntentParamsConfirmConfig" - ] - """ - Configuration overrides. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - payment_intent: str - """ - PaymentIntent ID. - """ - - class ConfirmPaymentIntentParamsConfirmConfig(TypedDict): - return_url: NotRequired[str] - """ - The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. - """ - - class CreateParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - label: NotRequired[str] - """ - Custom label given to the reader for easier identification. If no label is specified, the registration code will be used. - """ - location: NotRequired[str] - """ - The location to assign the reader to. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - registration_code: str - """ - A code generated by the reader used for registering to an account. - """ - - class DeleteParams(TypedDict): - pass - - class ListParams(TypedDict): - device_type: NotRequired[ - Literal[ - "bbpos_chipper2x", - "bbpos_wisepad3", - "bbpos_wisepos_e", - "mobile_phone_reader", - "simulated_stripe_s700", - "simulated_wisepos_e", - "stripe_m2", - "stripe_s700", - "verifone_P400", - ] - ] - """ - Filters readers by device type - """ - 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. - """ - location: NotRequired[str] - """ - A location ID to filter the response list to only readers at the specific location - """ - serial_number: NotRequired[str] - """ - Filters readers by serial number - """ - 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. - """ - status: NotRequired[Literal["offline", "online"]] - """ - A status filter to filter readers to only offline or online readers - """ - - class ProcessPaymentIntentParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - payment_intent: str - """ - PaymentIntent ID - """ - process_config: NotRequired[ - "ReaderService.ProcessPaymentIntentParamsProcessConfig" - ] - """ - Configuration overrides - """ - - class ProcessPaymentIntentParamsProcessConfig(TypedDict): - allow_redisplay: NotRequired[ - Literal["always", "limited", "unspecified"] - ] - """ - This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. - """ - enable_customer_cancellation: NotRequired[bool] - """ - Enables cancel button on transaction screens. - """ - return_url: NotRequired[str] - """ - The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. - """ - skip_tipping: NotRequired[bool] - """ - Override showing a tipping selection screen on this transaction. - """ - tipping: NotRequired[ - "ReaderService.ProcessPaymentIntentParamsProcessConfigTipping" - ] - """ - Tipping configuration for this transaction. - """ - - class ProcessPaymentIntentParamsProcessConfigTipping(TypedDict): - amount_eligible: NotRequired[int] - """ - Amount used to calculate tip suggestions on tipping selection screen for this transaction. Must be a positive integer in the smallest currency unit (e.g., 100 cents to represent $1.00 or 100 to represent ¥100, a zero-decimal currency). - """ - - class ProcessSetupIntentParams(TypedDict): - allow_redisplay: Literal["always", "limited", "unspecified"] - """ - This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - process_config: NotRequired[ - "ReaderService.ProcessSetupIntentParamsProcessConfig" - ] - """ - Configuration overrides - """ - setup_intent: str - """ - SetupIntent ID - """ - - class ProcessSetupIntentParamsProcessConfig(TypedDict): - enable_customer_cancellation: NotRequired[bool] - """ - Enables cancel button on transaction screens. - """ - - class RefundPaymentParams(TypedDict): - amount: NotRequired[int] - """ - A positive integer in __cents__ representing how much of this charge to refund. - """ - charge: NotRequired[str] - """ - ID of the Charge to refund. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - payment_intent: NotRequired[str] - """ - ID of the PaymentIntent to refund. - """ - refund_application_fee: NotRequired[bool] - """ - Boolean indicating whether the application fee should be refunded when refunding this charge. If a full charge refund is given, the full application fee will be refunded. Otherwise, the application fee will be refunded in an amount proportional to the amount of the charge refunded. An application fee can be refunded only by the application that created the charge. - """ - refund_payment_config: NotRequired[ - "ReaderService.RefundPaymentParamsRefundPaymentConfig" - ] - """ - Configuration overrides - """ - reverse_transfer: NotRequired[bool] - """ - Boolean indicating whether the transfer should be reversed when refunding this charge. The transfer will be reversed proportionally to the amount being refunded (either the entire or partial amount). A transfer can be reversed only by the application that created the charge. - """ - - class RefundPaymentParamsRefundPaymentConfig(TypedDict): - enable_customer_cancellation: NotRequired[bool] - """ - Enables cancel button on transaction screens. - """ - - class RetrieveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class SetReaderDisplayParams(TypedDict): - cart: NotRequired["ReaderService.SetReaderDisplayParamsCart"] - """ - Cart - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - type: Literal["cart"] - """ - Type - """ - - class SetReaderDisplayParamsCart(TypedDict): - 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). - """ - line_items: List["ReaderService.SetReaderDisplayParamsCartLineItem"] - """ - Array of line items that were purchased. - """ - tax: NotRequired[int] - """ - The amount of tax in cents. - """ - total: int - """ - Total balance of cart due in cents. - """ - - class SetReaderDisplayParamsCartLineItem(TypedDict): - amount: int - """ - The price of the item in cents. - """ - description: str - """ - The description or name of the item. - """ - quantity: int - """ - The quantity of the line item being purchased. - """ - - class UpdateParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - label: NotRequired["Literal['']|str"] - """ - The new label of the reader. - """ - metadata: NotRequired["Literal['']|Dict[str, str]"] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - def delete( self, reader: str, - params: Optional["ReaderService.DeleteParams"] = None, + params: Optional["ReaderDeleteParams"] = None, options: Optional[RequestOptions] = None, ) -> Reader: """ @@ -454,7 +68,7 @@ def delete( async def delete_async( self, reader: str, - params: Optional["ReaderService.DeleteParams"] = None, + params: Optional["ReaderDeleteParams"] = None, options: Optional[RequestOptions] = None, ) -> Reader: """ @@ -476,7 +90,7 @@ async def delete_async( def retrieve( self, reader: str, - params: Optional["ReaderService.RetrieveParams"] = None, + params: Optional["ReaderRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Reader: """ @@ -498,7 +112,7 @@ def retrieve( async def retrieve_async( self, reader: str, - params: Optional["ReaderService.RetrieveParams"] = None, + params: Optional["ReaderRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Reader: """ @@ -520,7 +134,7 @@ async def retrieve_async( def update( self, reader: str, - params: Optional["ReaderService.UpdateParams"] = None, + params: Optional["ReaderUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> Reader: """ @@ -542,7 +156,7 @@ def update( async def update_async( self, reader: str, - params: Optional["ReaderService.UpdateParams"] = None, + params: Optional["ReaderUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> Reader: """ @@ -563,7 +177,7 @@ async def update_async( def list( self, - params: Optional["ReaderService.ListParams"] = None, + params: Optional["ReaderListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[Reader]: """ @@ -582,7 +196,7 @@ def list( async def list_async( self, - params: Optional["ReaderService.ListParams"] = None, + params: Optional["ReaderListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[Reader]: """ @@ -601,7 +215,7 @@ async def list_async( def create( self, - params: "ReaderService.CreateParams", + params: "ReaderCreateParams", options: Optional[RequestOptions] = None, ) -> Reader: """ @@ -620,7 +234,7 @@ def create( async def create_async( self, - params: "ReaderService.CreateParams", + params: "ReaderCreateParams", options: Optional[RequestOptions] = None, ) -> Reader: """ @@ -640,7 +254,7 @@ async def create_async( def cancel_action( self, reader: str, - params: Optional["ReaderService.CancelActionParams"] = None, + params: Optional["ReaderCancelActionParams"] = None, options: Optional[RequestOptions] = None, ) -> Reader: """ @@ -662,7 +276,7 @@ def cancel_action( async def cancel_action_async( self, reader: str, - params: Optional["ReaderService.CancelActionParams"] = None, + params: Optional["ReaderCancelActionParams"] = None, options: Optional[RequestOptions] = None, ) -> Reader: """ @@ -684,7 +298,7 @@ async def cancel_action_async( def collect_inputs( self, reader: str, - params: "ReaderService.CollectInputsParams", + params: "ReaderCollectInputsParams", options: Optional[RequestOptions] = None, ) -> Reader: """ @@ -706,7 +320,7 @@ def collect_inputs( async def collect_inputs_async( self, reader: str, - params: "ReaderService.CollectInputsParams", + params: "ReaderCollectInputsParams", options: Optional[RequestOptions] = None, ) -> Reader: """ @@ -728,7 +342,7 @@ async def collect_inputs_async( def collect_payment_method( self, reader: str, - params: "ReaderService.CollectPaymentMethodParams", + params: "ReaderCollectPaymentMethodParams", options: Optional[RequestOptions] = None, ) -> Reader: """ @@ -750,7 +364,7 @@ def collect_payment_method( async def collect_payment_method_async( self, reader: str, - params: "ReaderService.CollectPaymentMethodParams", + params: "ReaderCollectPaymentMethodParams", options: Optional[RequestOptions] = None, ) -> Reader: """ @@ -772,7 +386,7 @@ async def collect_payment_method_async( def confirm_payment_intent( self, reader: str, - params: "ReaderService.ConfirmPaymentIntentParams", + params: "ReaderConfirmPaymentIntentParams", options: Optional[RequestOptions] = None, ) -> Reader: """ @@ -794,7 +408,7 @@ def confirm_payment_intent( async def confirm_payment_intent_async( self, reader: str, - params: "ReaderService.ConfirmPaymentIntentParams", + params: "ReaderConfirmPaymentIntentParams", options: Optional[RequestOptions] = None, ) -> Reader: """ @@ -816,7 +430,7 @@ async def confirm_payment_intent_async( def process_payment_intent( self, reader: str, - params: "ReaderService.ProcessPaymentIntentParams", + params: "ReaderProcessPaymentIntentParams", options: Optional[RequestOptions] = None, ) -> Reader: """ @@ -838,7 +452,7 @@ def process_payment_intent( async def process_payment_intent_async( self, reader: str, - params: "ReaderService.ProcessPaymentIntentParams", + params: "ReaderProcessPaymentIntentParams", options: Optional[RequestOptions] = None, ) -> Reader: """ @@ -860,7 +474,7 @@ async def process_payment_intent_async( def process_setup_intent( self, reader: str, - params: "ReaderService.ProcessSetupIntentParams", + params: "ReaderProcessSetupIntentParams", options: Optional[RequestOptions] = None, ) -> Reader: """ @@ -882,7 +496,7 @@ def process_setup_intent( async def process_setup_intent_async( self, reader: str, - params: "ReaderService.ProcessSetupIntentParams", + params: "ReaderProcessSetupIntentParams", options: Optional[RequestOptions] = None, ) -> Reader: """ @@ -904,7 +518,7 @@ async def process_setup_intent_async( def refund_payment( self, reader: str, - params: Optional["ReaderService.RefundPaymentParams"] = None, + params: Optional["ReaderRefundPaymentParams"] = None, options: Optional[RequestOptions] = None, ) -> Reader: """ @@ -926,7 +540,7 @@ def refund_payment( async def refund_payment_async( self, reader: str, - params: Optional["ReaderService.RefundPaymentParams"] = None, + params: Optional["ReaderRefundPaymentParams"] = None, options: Optional[RequestOptions] = None, ) -> Reader: """ @@ -948,7 +562,7 @@ async def refund_payment_async( def set_reader_display( self, reader: str, - params: "ReaderService.SetReaderDisplayParams", + params: "ReaderSetReaderDisplayParams", options: Optional[RequestOptions] = None, ) -> Reader: """ @@ -970,7 +584,7 @@ def set_reader_display( async def set_reader_display_async( self, reader: str, - params: "ReaderService.SetReaderDisplayParams", + params: "ReaderSetReaderDisplayParams", options: Optional[RequestOptions] = None, ) -> Reader: """ diff --git a/stripe/test_helpers/_confirmation_token_service.py b/stripe/test_helpers/_confirmation_token_service.py index b28a1d3df..84d2730dc 100644 --- a/stripe/test_helpers/_confirmation_token_service.py +++ b/stripe/test_helpers/_confirmation_token_service.py @@ -3,1036 +3,19 @@ from stripe._confirmation_token import ConfirmationToken from stripe._request_options import RequestOptions from stripe._stripe_service import StripeService -from typing import Dict, List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params.test_helpers._confirmation_token_create_params import ( + ConfirmationTokenCreateParams, + ) -class ConfirmationTokenService(StripeService): - class CreateParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - payment_method: NotRequired[str] - """ - ID of an existing PaymentMethod. - """ - payment_method_data: NotRequired[ - "ConfirmationTokenService.CreateParamsPaymentMethodData" - ] - """ - If provided, this hash will be used to create a PaymentMethod. - """ - payment_method_options: NotRequired[ - "ConfirmationTokenService.CreateParamsPaymentMethodOptions" - ] - """ - Payment-method-specific configuration for this ConfirmationToken. - """ - return_url: NotRequired[str] - """ - Return URL used to confirm the Intent. - """ - setup_future_usage: NotRequired[Literal["off_session", "on_session"]] - """ - Indicates that you intend to make future payments with this ConfirmationToken's payment method. - - The presence of this property will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. - """ - shipping: NotRequired["ConfirmationTokenService.CreateParamsShipping"] - """ - Shipping information for this ConfirmationToken. - """ - - class CreateParamsPaymentMethodData(TypedDict): - acss_debit: NotRequired[ - "ConfirmationTokenService.CreateParamsPaymentMethodDataAcssDebit" - ] - """ - If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method. - """ - affirm: NotRequired[ - "ConfirmationTokenService.CreateParamsPaymentMethodDataAffirm" - ] - """ - If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method. - """ - afterpay_clearpay: NotRequired[ - "ConfirmationTokenService.CreateParamsPaymentMethodDataAfterpayClearpay" - ] - """ - If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method. - """ - alipay: NotRequired[ - "ConfirmationTokenService.CreateParamsPaymentMethodDataAlipay" - ] - """ - If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. - """ - allow_redisplay: NotRequired[ - Literal["always", "limited", "unspecified"] - ] - """ - This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`. - """ - alma: NotRequired[ - "ConfirmationTokenService.CreateParamsPaymentMethodDataAlma" - ] - """ - If this is a Alma PaymentMethod, this hash contains details about the Alma payment method. - """ - amazon_pay: NotRequired[ - "ConfirmationTokenService.CreateParamsPaymentMethodDataAmazonPay" - ] - """ - If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method. - """ - au_becs_debit: NotRequired[ - "ConfirmationTokenService.CreateParamsPaymentMethodDataAuBecsDebit" - ] - """ - If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. - """ - bacs_debit: NotRequired[ - "ConfirmationTokenService.CreateParamsPaymentMethodDataBacsDebit" - ] - """ - If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account. - """ - bancontact: NotRequired[ - "ConfirmationTokenService.CreateParamsPaymentMethodDataBancontact" - ] - """ - If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method. - """ - billie: NotRequired[ - "ConfirmationTokenService.CreateParamsPaymentMethodDataBillie" - ] - """ - If this is a `billie` PaymentMethod, this hash contains details about the Billie payment method. - """ - billing_details: NotRequired[ - "ConfirmationTokenService.CreateParamsPaymentMethodDataBillingDetails" - ] - """ - Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. - """ - blik: NotRequired[ - "ConfirmationTokenService.CreateParamsPaymentMethodDataBlik" - ] - """ - If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method. - """ - boleto: NotRequired[ - "ConfirmationTokenService.CreateParamsPaymentMethodDataBoleto" - ] - """ - If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method. - """ - cashapp: NotRequired[ - "ConfirmationTokenService.CreateParamsPaymentMethodDataCashapp" - ] - """ - If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. - """ - crypto: NotRequired[ - "ConfirmationTokenService.CreateParamsPaymentMethodDataCrypto" - ] - """ - If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment method. - """ - customer_balance: NotRequired[ - "ConfirmationTokenService.CreateParamsPaymentMethodDataCustomerBalance" - ] - """ - If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. - """ - eps: NotRequired[ - "ConfirmationTokenService.CreateParamsPaymentMethodDataEps" - ] - """ - If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. - """ - fpx: NotRequired[ - "ConfirmationTokenService.CreateParamsPaymentMethodDataFpx" - ] - """ - If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method. - """ - giropay: NotRequired[ - "ConfirmationTokenService.CreateParamsPaymentMethodDataGiropay" - ] - """ - If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method. - """ - gopay: NotRequired[ - "ConfirmationTokenService.CreateParamsPaymentMethodDataGopay" - ] - """ - If this is a Gopay PaymentMethod, this hash contains details about the Gopay payment method. - """ - grabpay: NotRequired[ - "ConfirmationTokenService.CreateParamsPaymentMethodDataGrabpay" - ] - """ - If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method. - """ - id_bank_transfer: NotRequired[ - "ConfirmationTokenService.CreateParamsPaymentMethodDataIdBankTransfer" - ] - """ - If this is an `IdBankTransfer` PaymentMethod, this hash contains details about the IdBankTransfer payment method. - """ - ideal: NotRequired[ - "ConfirmationTokenService.CreateParamsPaymentMethodDataIdeal" - ] - """ - If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. - """ - interac_present: NotRequired[ - "ConfirmationTokenService.CreateParamsPaymentMethodDataInteracPresent" - ] - """ - If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. - """ - kakao_pay: NotRequired[ - "ConfirmationTokenService.CreateParamsPaymentMethodDataKakaoPay" - ] - """ - If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method. - """ - klarna: NotRequired[ - "ConfirmationTokenService.CreateParamsPaymentMethodDataKlarna" - ] - """ - If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method. - """ - konbini: NotRequired[ - "ConfirmationTokenService.CreateParamsPaymentMethodDataKonbini" - ] - """ - If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. - """ - kr_card: NotRequired[ - "ConfirmationTokenService.CreateParamsPaymentMethodDataKrCard" - ] - """ - If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method. - """ - link: NotRequired[ - "ConfirmationTokenService.CreateParamsPaymentMethodDataLink" - ] - """ - If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. - """ - mb_way: NotRequired[ - "ConfirmationTokenService.CreateParamsPaymentMethodDataMbWay" - ] - """ - If this is a MB WAY PaymentMethod, this hash contains details about the MB WAY payment method. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - mobilepay: NotRequired[ - "ConfirmationTokenService.CreateParamsPaymentMethodDataMobilepay" - ] - """ - If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method. - """ - multibanco: NotRequired[ - "ConfirmationTokenService.CreateParamsPaymentMethodDataMultibanco" - ] - """ - If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method. - """ - naver_pay: NotRequired[ - "ConfirmationTokenService.CreateParamsPaymentMethodDataNaverPay" - ] - """ - If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method. - """ - nz_bank_account: NotRequired[ - "ConfirmationTokenService.CreateParamsPaymentMethodDataNzBankAccount" - ] - """ - If this is an nz_bank_account PaymentMethod, this hash contains details about the nz_bank_account payment method. - """ - oxxo: NotRequired[ - "ConfirmationTokenService.CreateParamsPaymentMethodDataOxxo" - ] - """ - If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. - """ - p24: NotRequired[ - "ConfirmationTokenService.CreateParamsPaymentMethodDataP24" - ] - """ - If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. - """ - pay_by_bank: NotRequired[ - "ConfirmationTokenService.CreateParamsPaymentMethodDataPayByBank" - ] - """ - If this is a `pay_by_bank` PaymentMethod, this hash contains details about the PayByBank payment method. - """ - payco: NotRequired[ - "ConfirmationTokenService.CreateParamsPaymentMethodDataPayco" - ] - """ - If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method. - """ - paynow: NotRequired[ - "ConfirmationTokenService.CreateParamsPaymentMethodDataPaynow" - ] - """ - If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method. - """ - paypal: NotRequired[ - "ConfirmationTokenService.CreateParamsPaymentMethodDataPaypal" - ] - """ - If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method. - """ - paypay: NotRequired[ - "ConfirmationTokenService.CreateParamsPaymentMethodDataPaypay" - ] - """ - If this is a `paypay` PaymentMethod, this hash contains details about the PayPay payment method. - """ - payto: NotRequired[ - "ConfirmationTokenService.CreateParamsPaymentMethodDataPayto" - ] - """ - If this is a `payto` PaymentMethod, this hash contains details about the PayTo payment method. - """ - pix: NotRequired[ - "ConfirmationTokenService.CreateParamsPaymentMethodDataPix" - ] - """ - If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method. - """ - promptpay: NotRequired[ - "ConfirmationTokenService.CreateParamsPaymentMethodDataPromptpay" - ] - """ - If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method. - """ - qris: NotRequired[ - "ConfirmationTokenService.CreateParamsPaymentMethodDataQris" - ] - """ - If this is a `qris` PaymentMethod, this hash contains details about the QRIS payment method. - """ - radar_options: NotRequired[ - "ConfirmationTokenService.CreateParamsPaymentMethodDataRadarOptions" - ] - """ - Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. - """ - rechnung: NotRequired[ - "ConfirmationTokenService.CreateParamsPaymentMethodDataRechnung" - ] - """ - If this is a `rechnung` PaymentMethod, this hash contains details about the Rechnung payment method. - """ - revolut_pay: NotRequired[ - "ConfirmationTokenService.CreateParamsPaymentMethodDataRevolutPay" - ] - """ - If this is a `revolut_pay` PaymentMethod, this hash contains details about the Revolut Pay payment method. - """ - samsung_pay: NotRequired[ - "ConfirmationTokenService.CreateParamsPaymentMethodDataSamsungPay" - ] - """ - If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method. - """ - satispay: NotRequired[ - "ConfirmationTokenService.CreateParamsPaymentMethodDataSatispay" - ] - """ - If this is a `satispay` PaymentMethod, this hash contains details about the Satispay payment method. - """ - sepa_debit: NotRequired[ - "ConfirmationTokenService.CreateParamsPaymentMethodDataSepaDebit" - ] - """ - If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. - """ - shopeepay: NotRequired[ - "ConfirmationTokenService.CreateParamsPaymentMethodDataShopeepay" - ] - """ - If this is a Shopeepay PaymentMethod, this hash contains details about the Shopeepay payment method. - """ - sofort: NotRequired[ - "ConfirmationTokenService.CreateParamsPaymentMethodDataSofort" - ] - """ - If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. - """ - stripe_balance: NotRequired[ - "ConfirmationTokenService.CreateParamsPaymentMethodDataStripeBalance" - ] - """ - This hash contains details about the Stripe balance payment method. - """ - swish: NotRequired[ - "ConfirmationTokenService.CreateParamsPaymentMethodDataSwish" - ] - """ - If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method. - """ - twint: NotRequired[ - "ConfirmationTokenService.CreateParamsPaymentMethodDataTwint" - ] - """ - If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method. - """ - type: Literal[ - "acss_debit", - "affirm", - "afterpay_clearpay", - "alipay", - "alma", - "amazon_pay", - "au_becs_debit", - "bacs_debit", - "bancontact", - "billie", - "blik", - "boleto", - "cashapp", - "crypto", - "customer_balance", - "eps", - "fpx", - "giropay", - "gopay", - "grabpay", - "id_bank_transfer", - "ideal", - "kakao_pay", - "klarna", - "konbini", - "kr_card", - "link", - "mb_way", - "mobilepay", - "multibanco", - "naver_pay", - "nz_bank_account", - "oxxo", - "p24", - "pay_by_bank", - "payco", - "paynow", - "paypal", - "paypay", - "payto", - "pix", - "promptpay", - "qris", - "rechnung", - "revolut_pay", - "samsung_pay", - "satispay", - "sepa_debit", - "shopeepay", - "sofort", - "stripe_balance", - "swish", - "twint", - "us_bank_account", - "wechat_pay", - "zip", - ] - """ - The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. - """ - us_bank_account: NotRequired[ - "ConfirmationTokenService.CreateParamsPaymentMethodDataUsBankAccount" - ] - """ - If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. - """ - wechat_pay: NotRequired[ - "ConfirmationTokenService.CreateParamsPaymentMethodDataWechatPay" - ] - """ - If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method. - """ - zip: NotRequired[ - "ConfirmationTokenService.CreateParamsPaymentMethodDataZip" - ] - """ - If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method. - """ - - class CreateParamsPaymentMethodDataAcssDebit(TypedDict): - account_number: str - """ - Customer's bank account number. - """ - institution_number: str - """ - Institution number of the customer's bank. - """ - transit_number: str - """ - Transit number of the customer's bank. - """ - - class CreateParamsPaymentMethodDataAffirm(TypedDict): - pass - - class CreateParamsPaymentMethodDataAfterpayClearpay(TypedDict): - pass - - class CreateParamsPaymentMethodDataAlipay(TypedDict): - pass - - class CreateParamsPaymentMethodDataAlma(TypedDict): - pass - - class CreateParamsPaymentMethodDataAmazonPay(TypedDict): - pass - - class CreateParamsPaymentMethodDataAuBecsDebit(TypedDict): - account_number: str - """ - The account number for the bank account. - """ - bsb_number: str - """ - Bank-State-Branch number of the bank account. - """ - - class CreateParamsPaymentMethodDataBacsDebit(TypedDict): - account_number: NotRequired[str] - """ - Account number of the bank account that the funds will be debited from. - """ - sort_code: NotRequired[str] - """ - Sort code of the bank account. (e.g., `10-20-30`) - """ - - class CreateParamsPaymentMethodDataBancontact(TypedDict): - pass - - class CreateParamsPaymentMethodDataBillie(TypedDict): - pass - - class CreateParamsPaymentMethodDataBillingDetails(TypedDict): - address: NotRequired[ - "Literal['']|ConfirmationTokenService.CreateParamsPaymentMethodDataBillingDetailsAddress" - ] - """ - Billing address. - """ - email: NotRequired["Literal['']|str"] - """ - Email address. - """ - name: NotRequired["Literal['']|str"] - """ - Full name. - """ - phone: NotRequired["Literal['']|str"] - """ - Billing phone number (including extension). - """ - tax_id: NotRequired[str] - """ - Taxpayer identification number. Used only for transactions between LATAM buyers and non-LATAM sellers. - """ - - class CreateParamsPaymentMethodDataBillingDetailsAddress(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. - """ - - class CreateParamsPaymentMethodDataBlik(TypedDict): - pass - - class CreateParamsPaymentMethodDataBoleto(TypedDict): - tax_id: str - """ - The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers) - """ - - class CreateParamsPaymentMethodDataCashapp(TypedDict): - pass - - class CreateParamsPaymentMethodDataCrypto(TypedDict): - pass - - class CreateParamsPaymentMethodDataCustomerBalance(TypedDict): - pass - - class CreateParamsPaymentMethodDataEps(TypedDict): - bank: NotRequired[ - Literal[ - "arzte_und_apotheker_bank", - "austrian_anadi_bank_ag", - "bank_austria", - "bankhaus_carl_spangler", - "bankhaus_schelhammer_und_schattera_ag", - "bawag_psk_ag", - "bks_bank_ag", - "brull_kallmus_bank_ag", - "btv_vier_lander_bank", - "capital_bank_grawe_gruppe_ag", - "deutsche_bank_ag", - "dolomitenbank", - "easybank_ag", - "erste_bank_und_sparkassen", - "hypo_alpeadriabank_international_ag", - "hypo_bank_burgenland_aktiengesellschaft", - "hypo_noe_lb_fur_niederosterreich_u_wien", - "hypo_oberosterreich_salzburg_steiermark", - "hypo_tirol_bank_ag", - "hypo_vorarlberg_bank_ag", - "marchfelder_bank", - "oberbank_ag", - "raiffeisen_bankengruppe_osterreich", - "schoellerbank_ag", - "sparda_bank_wien", - "volksbank_gruppe", - "volkskreditbank_ag", - "vr_bank_braunau", - ] - ] - """ - The customer's bank. - """ - - class CreateParamsPaymentMethodDataFpx(TypedDict): - account_holder_type: NotRequired[Literal["company", "individual"]] - """ - Account holder type for FPX transaction - """ - bank: Literal[ - "affin_bank", - "agrobank", - "alliance_bank", - "ambank", - "bank_islam", - "bank_muamalat", - "bank_of_china", - "bank_rakyat", - "bsn", - "cimb", - "deutsche_bank", - "hong_leong_bank", - "hsbc", - "kfh", - "maybank2e", - "maybank2u", - "ocbc", - "pb_enterprise", - "public_bank", - "rhb", - "standard_chartered", - "uob", - ] - """ - The customer's bank. - """ - - class CreateParamsPaymentMethodDataGiropay(TypedDict): - pass - - class CreateParamsPaymentMethodDataGopay(TypedDict): - pass - - class CreateParamsPaymentMethodDataGrabpay(TypedDict): - pass - - class CreateParamsPaymentMethodDataIdBankTransfer(TypedDict): - bank: NotRequired[Literal["bca", "bni", "bri", "cimb", "permata"]] - """ - Bank where the account is held. - """ - - class CreateParamsPaymentMethodDataIdeal(TypedDict): - bank: NotRequired[ - Literal[ - "abn_amro", - "asn_bank", - "bunq", - "buut", - "handelsbanken", - "ing", - "knab", - "moneyou", - "n26", - "nn", - "rabobank", - "regiobank", - "revolut", - "sns_bank", - "triodos_bank", - "van_lanschot", - "yoursafe", - ] - ] - """ - The customer's bank. Only use this parameter for existing customers. Don't use it for new customers. - """ - - class CreateParamsPaymentMethodDataInteracPresent(TypedDict): - pass - - class CreateParamsPaymentMethodDataKakaoPay(TypedDict): - pass - - class CreateParamsPaymentMethodDataKlarna(TypedDict): - dob: NotRequired[ - "ConfirmationTokenService.CreateParamsPaymentMethodDataKlarnaDob" - ] - """ - Customer's date of birth - """ - - class CreateParamsPaymentMethodDataKlarnaDob(TypedDict): - day: int - """ - The day of birth, between 1 and 31. - """ - month: int - """ - The month of birth, between 1 and 12. - """ - year: int - """ - The four-digit year of birth. - """ - - class CreateParamsPaymentMethodDataKonbini(TypedDict): - pass - - class CreateParamsPaymentMethodDataKrCard(TypedDict): - pass - - class CreateParamsPaymentMethodDataLink(TypedDict): - pass - - class CreateParamsPaymentMethodDataMbWay(TypedDict): - pass - - class CreateParamsPaymentMethodDataMobilepay(TypedDict): - pass - - class CreateParamsPaymentMethodDataMultibanco(TypedDict): - pass - - class CreateParamsPaymentMethodDataNaverPay(TypedDict): - funding: NotRequired[Literal["card", "points"]] - """ - Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`. - """ - - class CreateParamsPaymentMethodDataNzBankAccount(TypedDict): - account_holder_name: NotRequired[str] - """ - The name on the bank account. Only required if the account holder name is different from the name of the authorized signatory collected in the PaymentMethod's billing details. - """ - account_number: str - """ - The account number for the bank account. - """ - bank_code: str - """ - The numeric code for the bank account's bank. - """ - branch_code: str - """ - The numeric code for the bank account's bank branch. - """ - reference: NotRequired[str] - suffix: str - """ - The suffix of the bank account number. - """ - - class CreateParamsPaymentMethodDataOxxo(TypedDict): - pass - - class CreateParamsPaymentMethodDataP24(TypedDict): - bank: NotRequired[ - Literal[ - "alior_bank", - "bank_millennium", - "bank_nowy_bfg_sa", - "bank_pekao_sa", - "banki_spbdzielcze", - "blik", - "bnp_paribas", - "boz", - "citi_handlowy", - "credit_agricole", - "envelobank", - "etransfer_pocztowy24", - "getin_bank", - "ideabank", - "ing", - "inteligo", - "mbank_mtransfer", - "nest_przelew", - "noble_pay", - "pbac_z_ipko", - "plus_bank", - "santander_przelew24", - "tmobile_usbugi_bankowe", - "toyota_bank", - "velobank", - "volkswagen_bank", - ] - ] - """ - The customer's bank. - """ - - class CreateParamsPaymentMethodDataPayByBank(TypedDict): - pass - - class CreateParamsPaymentMethodDataPayco(TypedDict): - pass - - class CreateParamsPaymentMethodDataPaynow(TypedDict): - pass - - class CreateParamsPaymentMethodDataPaypal(TypedDict): - pass - - class CreateParamsPaymentMethodDataPaypay(TypedDict): - pass - - class CreateParamsPaymentMethodDataPayto(TypedDict): - account_number: NotRequired[str] - """ - The account number for the bank account. - """ - bsb_number: NotRequired[str] - """ - Bank-State-Branch number of the bank account. - """ - pay_id: NotRequired[str] - """ - The PayID alias for the bank account. - """ - - class CreateParamsPaymentMethodDataPix(TypedDict): - pass - - class CreateParamsPaymentMethodDataPromptpay(TypedDict): - pass - - class CreateParamsPaymentMethodDataQris(TypedDict): - pass - - class CreateParamsPaymentMethodDataRadarOptions(TypedDict): - session: NotRequired[str] - """ - A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. - """ - - class CreateParamsPaymentMethodDataRechnung(TypedDict): - dob: ( - "ConfirmationTokenService.CreateParamsPaymentMethodDataRechnungDob" - ) - """ - Customer's date of birth - """ - - class CreateParamsPaymentMethodDataRechnungDob(TypedDict): - day: int - """ - The day of birth, between 1 and 31. - """ - month: int - """ - The month of birth, between 1 and 12. - """ - year: int - """ - The four-digit year of birth. - """ - - class CreateParamsPaymentMethodDataRevolutPay(TypedDict): - pass - - class CreateParamsPaymentMethodDataSamsungPay(TypedDict): - pass - - class CreateParamsPaymentMethodDataSatispay(TypedDict): - pass - - class CreateParamsPaymentMethodDataSepaDebit(TypedDict): - iban: str - """ - IBAN of the bank account. - """ - - class CreateParamsPaymentMethodDataShopeepay(TypedDict): - pass - - class CreateParamsPaymentMethodDataSofort(TypedDict): - country: Literal["AT", "BE", "DE", "ES", "IT", "NL"] - """ - Two-letter ISO code representing the country the bank account is located in. - """ - - class CreateParamsPaymentMethodDataStripeBalance(TypedDict): - account: NotRequired[str] - """ - The connected account ID whose Stripe balance to use as the source of payment - """ - source_type: NotRequired[Literal["bank_account", "card", "fpx"]] - """ - The [source_type](https://docs.stripe.com/api/balance/balance_object#balance_object-available-source_types) of the balance - """ - - class CreateParamsPaymentMethodDataSwish(TypedDict): - pass - - class CreateParamsPaymentMethodDataTwint(TypedDict): - pass - - class CreateParamsPaymentMethodDataUsBankAccount(TypedDict): - account_holder_type: NotRequired[Literal["company", "individual"]] - """ - Account holder type: individual or company. - """ - account_number: NotRequired[str] - """ - Account number of the bank account. - """ - account_type: NotRequired[Literal["checking", "savings"]] - """ - Account type: checkings or savings. Defaults to checking if omitted. - """ - financial_connections_account: NotRequired[str] - """ - The ID of a Financial Connections Account to use as a payment method. - """ - routing_number: NotRequired[str] - """ - Routing number of the bank account. - """ - - class CreateParamsPaymentMethodDataWechatPay(TypedDict): - pass - - class CreateParamsPaymentMethodDataZip(TypedDict): - pass - - class CreateParamsPaymentMethodOptions(TypedDict): - card: NotRequired[ - "ConfirmationTokenService.CreateParamsPaymentMethodOptionsCard" - ] - """ - Configuration for any card payments confirmed using this ConfirmationToken. - """ - - class CreateParamsPaymentMethodOptionsCard(TypedDict): - installments: NotRequired[ - "ConfirmationTokenService.CreateParamsPaymentMethodOptionsCardInstallments" - ] - """ - Installment configuration for payments confirmed using this ConfirmationToken. - """ - - class CreateParamsPaymentMethodOptionsCardInstallments(TypedDict): - plan: "ConfirmationTokenService.CreateParamsPaymentMethodOptionsCardInstallmentsPlan" - """ - The selected installment plan to use for this payment attempt. - This parameter can only be provided during confirmation. - """ - - class CreateParamsPaymentMethodOptionsCardInstallmentsPlan(TypedDict): - count: NotRequired[int] - """ - For `fixed_count` installment plans, this is required. It represents the number of installment payments your customer will make to their credit card. - """ - interval: NotRequired[Literal["month"]] - """ - For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card. - One of `month`. - """ - type: Literal["bonus", "fixed_count", "revolving"] - """ - Type of installment plan, one of `fixed_count`, `bonus`, or `revolving`. - """ - - class CreateParamsShipping(TypedDict): - address: "ConfirmationTokenService.CreateParamsShippingAddress" - """ - Shipping address - """ - name: str - """ - Recipient name. - """ - phone: NotRequired["Literal['']|str"] - """ - Recipient phone (including extension) - """ - - class CreateParamsShippingAddress(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. - """ +class ConfirmationTokenService(StripeService): def create( self, - params: Optional["ConfirmationTokenService.CreateParams"] = None, + params: Optional["ConfirmationTokenCreateParams"] = None, options: Optional[RequestOptions] = None, ) -> ConfirmationToken: """ @@ -1051,7 +34,7 @@ def create( async def create_async( self, - params: Optional["ConfirmationTokenService.CreateParams"] = None, + params: Optional["ConfirmationTokenCreateParams"] = None, options: Optional[RequestOptions] = None, ) -> ConfirmationToken: """ diff --git a/stripe/test_helpers/_customer_service.py b/stripe/test_helpers/_customer_service.py index c0a884d96..ee3fd2888 100644 --- a/stripe/test_helpers/_customer_service.py +++ b/stripe/test_helpers/_customer_service.py @@ -6,33 +6,20 @@ from stripe._request_options import RequestOptions from stripe._stripe_service import StripeService from stripe._util import sanitize_id -from typing import List, Optional, cast -from typing_extensions import NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params.test_helpers._customer_fund_cash_balance_params import ( + CustomerFundCashBalanceParams, + ) -class CustomerService(StripeService): - class FundCashBalanceParams(TypedDict): - amount: int - """ - Amount to be used for this test cash balance transaction. A positive integer representing how much to fund in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to fund $1.00 or 100 to fund ¥100, a zero-decimal currency). - """ - 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. - """ - reference: NotRequired[str] - """ - A description of the test funding. This simulates free-text references supplied by customers when making bank transfers to their cash balance. You can use this to test how Stripe's [reconciliation algorithm](https://stripe.com/docs/payments/customer-balance/reconciliation) applies to different user inputs. - """ +class CustomerService(StripeService): def fund_cash_balance( self, customer: str, - params: "CustomerService.FundCashBalanceParams", + params: "CustomerFundCashBalanceParams", options: Optional[RequestOptions] = None, ) -> CustomerCashBalanceTransaction: """ @@ -54,7 +41,7 @@ def fund_cash_balance( async def fund_cash_balance_async( self, customer: str, - params: "CustomerService.FundCashBalanceParams", + params: "CustomerFundCashBalanceParams", options: Optional[RequestOptions] = None, ) -> CustomerCashBalanceTransaction: """ diff --git a/stripe/test_helpers/_refund_service.py b/stripe/test_helpers/_refund_service.py index e8f1f5a63..6c8297e01 100644 --- a/stripe/test_helpers/_refund_service.py +++ b/stripe/test_helpers/_refund_service.py @@ -4,21 +4,20 @@ from stripe._request_options import RequestOptions from stripe._stripe_service import StripeService from stripe._util import sanitize_id -from typing import List, Optional, cast -from typing_extensions import NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params.test_helpers._refund_expire_params import ( + RefundExpireParams, + ) -class RefundService(StripeService): - class ExpireParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ +class RefundService(StripeService): def expire( self, refund: str, - params: Optional["RefundService.ExpireParams"] = None, + params: Optional["RefundExpireParams"] = None, options: Optional[RequestOptions] = None, ) -> Refund: """ @@ -40,7 +39,7 @@ def expire( async def expire_async( self, refund: str, - params: Optional["RefundService.ExpireParams"] = None, + params: Optional["RefundExpireParams"] = None, options: Optional[RequestOptions] = None, ) -> Refund: """ diff --git a/stripe/test_helpers/_test_clock.py b/stripe/test_helpers/_test_clock.py index df06b4e03..ebc506b42 100644 --- a/stripe/test_helpers/_test_clock.py +++ b/stripe/test_helpers/_test_clock.py @@ -4,11 +4,27 @@ from stripe._deletable_api_resource import DeletableAPIResource from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource -from stripe._request_options import RequestOptions from stripe._stripe_object import StripeObject from stripe._util import class_method_variant, sanitize_id -from typing import ClassVar, List, Optional, cast, overload -from typing_extensions import Literal, NotRequired, Unpack +from typing import ClassVar, Optional, cast, overload +from typing_extensions import Literal, Unpack, TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params.test_helpers._test_clock_advance_params import ( + TestClockAdvanceParams, + ) + from stripe.params.test_helpers._test_clock_create_params import ( + TestClockCreateParams, + ) + from stripe.params.test_helpers._test_clock_delete_params import ( + TestClockDeleteParams, + ) + from stripe.params.test_helpers._test_clock_list_params import ( + TestClockListParams, + ) + from stripe.params.test_helpers._test_clock_retrieve_params import ( + TestClockRetrieveParams, + ) class TestClock( @@ -36,57 +52,6 @@ class Advancing(StripeObject): advancing: Optional[Advancing] _inner_class_types = {"advancing": Advancing} - class AdvanceParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - frozen_time: int - """ - The time to advance the test clock. Must be after the test clock's current frozen time. Cannot be more than two intervals in the future from the shortest subscription in this test clock. If there are no subscriptions in this test clock, it cannot be more than two years in the future. - """ - - class CreateParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - frozen_time: int - """ - The initial frozen time for this test clock. - """ - name: NotRequired[str] - """ - The name for this test clock. - """ - - class DeleteParams(RequestOptions): - pass - - class ListParams(RequestOptions): - 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 RetrieveParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - created: int """ Time at which the object was created. Measured in seconds since the Unix epoch. @@ -127,7 +92,7 @@ class RetrieveParams(RequestOptions): @classmethod def _cls_advance( - cls, test_clock: str, **params: Unpack["TestClock.AdvanceParams"] + cls, test_clock: str, **params: Unpack["TestClockAdvanceParams"] ) -> "TestClock": """ Starts advancing a test clock to a specified time in the future. Advancement is done when status changes to Ready. @@ -146,7 +111,7 @@ def _cls_advance( @overload @staticmethod def advance( - test_clock: str, **params: Unpack["TestClock.AdvanceParams"] + test_clock: str, **params: Unpack["TestClockAdvanceParams"] ) -> "TestClock": """ Starts advancing a test clock to a specified time in the future. Advancement is done when status changes to Ready. @@ -155,7 +120,7 @@ def advance( @overload def advance( - self, **params: Unpack["TestClock.AdvanceParams"] + self, **params: Unpack["TestClockAdvanceParams"] ) -> "TestClock": """ Starts advancing a test clock to a specified time in the future. Advancement is done when status changes to Ready. @@ -164,7 +129,7 @@ def advance( @class_method_variant("_cls_advance") def advance( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["TestClock.AdvanceParams"] + self, **params: Unpack["TestClockAdvanceParams"] ) -> "TestClock": """ Starts advancing a test clock to a specified time in the future. Advancement is done when status changes to Ready. @@ -182,7 +147,7 @@ def advance( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_advance_async( - cls, test_clock: str, **params: Unpack["TestClock.AdvanceParams"] + cls, test_clock: str, **params: Unpack["TestClockAdvanceParams"] ) -> "TestClock": """ Starts advancing a test clock to a specified time in the future. Advancement is done when status changes to Ready. @@ -201,7 +166,7 @@ async def _cls_advance_async( @overload @staticmethod async def advance_async( - test_clock: str, **params: Unpack["TestClock.AdvanceParams"] + test_clock: str, **params: Unpack["TestClockAdvanceParams"] ) -> "TestClock": """ Starts advancing a test clock to a specified time in the future. Advancement is done when status changes to Ready. @@ -210,7 +175,7 @@ async def advance_async( @overload async def advance_async( - self, **params: Unpack["TestClock.AdvanceParams"] + self, **params: Unpack["TestClockAdvanceParams"] ) -> "TestClock": """ Starts advancing a test clock to a specified time in the future. Advancement is done when status changes to Ready. @@ -219,7 +184,7 @@ async def advance_async( @class_method_variant("_cls_advance_async") async def advance_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["TestClock.AdvanceParams"] + self, **params: Unpack["TestClockAdvanceParams"] ) -> "TestClock": """ Starts advancing a test clock to a specified time in the future. Advancement is done when status changes to Ready. @@ -236,7 +201,7 @@ async def advance_async( # pyright: ignore[reportGeneralTypeIssues] ) @classmethod - def create(cls, **params: Unpack["TestClock.CreateParams"]) -> "TestClock": + def create(cls, **params: Unpack["TestClockCreateParams"]) -> "TestClock": """ Creates a new test clock that can be attached to new customers and quotes. """ @@ -251,7 +216,7 @@ def create(cls, **params: Unpack["TestClock.CreateParams"]) -> "TestClock": @classmethod async def create_async( - cls, **params: Unpack["TestClock.CreateParams"] + cls, **params: Unpack["TestClockCreateParams"] ) -> "TestClock": """ Creates a new test clock that can be attached to new customers and quotes. @@ -267,7 +232,7 @@ async def create_async( @classmethod def _cls_delete( - cls, sid: str, **params: Unpack["TestClock.DeleteParams"] + cls, sid: str, **params: Unpack["TestClockDeleteParams"] ) -> "TestClock": """ Deletes a test clock. @@ -285,7 +250,7 @@ def _cls_delete( @overload @staticmethod def delete( - sid: str, **params: Unpack["TestClock.DeleteParams"] + sid: str, **params: Unpack["TestClockDeleteParams"] ) -> "TestClock": """ Deletes a test clock. @@ -293,9 +258,7 @@ def delete( ... @overload - def delete( - self, **params: Unpack["TestClock.DeleteParams"] - ) -> "TestClock": + def delete(self, **params: Unpack["TestClockDeleteParams"]) -> "TestClock": """ Deletes a test clock. """ @@ -303,7 +266,7 @@ def delete( @class_method_variant("_cls_delete") def delete( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["TestClock.DeleteParams"] + self, **params: Unpack["TestClockDeleteParams"] ) -> "TestClock": """ Deletes a test clock. @@ -316,7 +279,7 @@ def delete( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_delete_async( - cls, sid: str, **params: Unpack["TestClock.DeleteParams"] + cls, sid: str, **params: Unpack["TestClockDeleteParams"] ) -> "TestClock": """ Deletes a test clock. @@ -334,7 +297,7 @@ async def _cls_delete_async( @overload @staticmethod async def delete_async( - sid: str, **params: Unpack["TestClock.DeleteParams"] + sid: str, **params: Unpack["TestClockDeleteParams"] ) -> "TestClock": """ Deletes a test clock. @@ -343,7 +306,7 @@ async def delete_async( @overload async def delete_async( - self, **params: Unpack["TestClock.DeleteParams"] + self, **params: Unpack["TestClockDeleteParams"] ) -> "TestClock": """ Deletes a test clock. @@ -352,7 +315,7 @@ async def delete_async( @class_method_variant("_cls_delete_async") async def delete_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["TestClock.DeleteParams"] + self, **params: Unpack["TestClockDeleteParams"] ) -> "TestClock": """ Deletes a test clock. @@ -365,7 +328,7 @@ async def delete_async( # pyright: ignore[reportGeneralTypeIssues] @classmethod def list( - cls, **params: Unpack["TestClock.ListParams"] + cls, **params: Unpack["TestClockListParams"] ) -> ListObject["TestClock"]: """ Returns a list of your test clocks. @@ -385,7 +348,7 @@ def list( @classmethod async def list_async( - cls, **params: Unpack["TestClock.ListParams"] + cls, **params: Unpack["TestClockListParams"] ) -> ListObject["TestClock"]: """ Returns a list of your test clocks. @@ -405,7 +368,7 @@ async def list_async( @classmethod def retrieve( - cls, id: str, **params: Unpack["TestClock.RetrieveParams"] + cls, id: str, **params: Unpack["TestClockRetrieveParams"] ) -> "TestClock": """ Retrieves a test clock. @@ -416,7 +379,7 @@ def retrieve( @classmethod async def retrieve_async( - cls, id: str, **params: Unpack["TestClock.RetrieveParams"] + cls, id: str, **params: Unpack["TestClockRetrieveParams"] ) -> "TestClock": """ Retrieves a test clock. diff --git a/stripe/test_helpers/_test_clock_service.py b/stripe/test_helpers/_test_clock_service.py index f632a09e0..988b51425 100644 --- a/stripe/test_helpers/_test_clock_service.py +++ b/stripe/test_helpers/_test_clock_service.py @@ -5,66 +5,32 @@ from stripe._stripe_service import StripeService from stripe._util import sanitize_id from stripe.test_helpers._test_clock import TestClock -from typing import List, Optional, cast -from typing_extensions import NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params.test_helpers._test_clock_advance_params import ( + TestClockAdvanceParams, + ) + from stripe.params.test_helpers._test_clock_create_params import ( + TestClockCreateParams, + ) + from stripe.params.test_helpers._test_clock_delete_params import ( + TestClockDeleteParams, + ) + from stripe.params.test_helpers._test_clock_list_params import ( + TestClockListParams, + ) + from stripe.params.test_helpers._test_clock_retrieve_params import ( + TestClockRetrieveParams, + ) class TestClockService(StripeService): - class AdvanceParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - frozen_time: int - """ - The time to advance the test clock. Must be after the test clock's current frozen time. Cannot be more than two intervals in the future from the shortest subscription in this test clock. If there are no subscriptions in this test clock, it cannot be more than two years in the future. - """ - - class CreateParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - frozen_time: int - """ - The initial frozen time for this test clock. - """ - name: NotRequired[str] - """ - The name for this test clock. - """ - - class DeleteParams(TypedDict): - pass - - class ListParams(TypedDict): - 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 RetrieveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - def delete( self, test_clock: str, - params: Optional["TestClockService.DeleteParams"] = None, + params: Optional["TestClockDeleteParams"] = None, options: Optional[RequestOptions] = None, ) -> TestClock: """ @@ -86,7 +52,7 @@ def delete( async def delete_async( self, test_clock: str, - params: Optional["TestClockService.DeleteParams"] = None, + params: Optional["TestClockDeleteParams"] = None, options: Optional[RequestOptions] = None, ) -> TestClock: """ @@ -108,7 +74,7 @@ async def delete_async( def retrieve( self, test_clock: str, - params: Optional["TestClockService.RetrieveParams"] = None, + params: Optional["TestClockRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> TestClock: """ @@ -130,7 +96,7 @@ def retrieve( async def retrieve_async( self, test_clock: str, - params: Optional["TestClockService.RetrieveParams"] = None, + params: Optional["TestClockRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> TestClock: """ @@ -151,7 +117,7 @@ async def retrieve_async( def list( self, - params: Optional["TestClockService.ListParams"] = None, + params: Optional["TestClockListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[TestClock]: """ @@ -170,7 +136,7 @@ def list( async def list_async( self, - params: Optional["TestClockService.ListParams"] = None, + params: Optional["TestClockListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[TestClock]: """ @@ -189,7 +155,7 @@ async def list_async( def create( self, - params: "TestClockService.CreateParams", + params: "TestClockCreateParams", options: Optional[RequestOptions] = None, ) -> TestClock: """ @@ -208,7 +174,7 @@ def create( async def create_async( self, - params: "TestClockService.CreateParams", + params: "TestClockCreateParams", options: Optional[RequestOptions] = None, ) -> TestClock: """ @@ -228,7 +194,7 @@ async def create_async( def advance( self, test_clock: str, - params: "TestClockService.AdvanceParams", + params: "TestClockAdvanceParams", options: Optional[RequestOptions] = None, ) -> TestClock: """ @@ -250,7 +216,7 @@ def advance( async def advance_async( self, test_clock: str, - params: "TestClockService.AdvanceParams", + params: "TestClockAdvanceParams", options: Optional[RequestOptions] = None, ) -> TestClock: """ diff --git a/stripe/test_helpers/issuing/_authorization_service.py b/stripe/test_helpers/issuing/_authorization_service.py index 49aa4ae7a..7d42926c7 100644 --- a/stripe/test_helpers/issuing/_authorization_service.py +++ b/stripe/test_helpers/issuing/_authorization_service.py @@ -4,1132 +4,37 @@ from stripe._stripe_service import StripeService from stripe._util import sanitize_id from stripe.issuing._authorization import Authorization -from typing import List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params.test_helpers.issuing._authorization_capture_params import ( + AuthorizationCaptureParams, + ) + from stripe.params.test_helpers.issuing._authorization_create_params import ( + AuthorizationCreateParams, + ) + from stripe.params.test_helpers.issuing._authorization_expire_params import ( + AuthorizationExpireParams, + ) + from stripe.params.test_helpers.issuing._authorization_finalize_amount_params import ( + AuthorizationFinalizeAmountParams, + ) + from stripe.params.test_helpers.issuing._authorization_increment_params import ( + AuthorizationIncrementParams, + ) + from stripe.params.test_helpers.issuing._authorization_respond_params import ( + AuthorizationRespondParams, + ) + from stripe.params.test_helpers.issuing._authorization_reverse_params import ( + AuthorizationReverseParams, + ) class AuthorizationService(StripeService): - class CaptureParams(TypedDict): - capture_amount: NotRequired[int] - """ - The amount to capture from the authorization. If not provided, the full amount of the authorization will be captured. This amount is in the authorization currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). - """ - close_authorization: NotRequired[bool] - """ - Whether to close the authorization after capture. Defaults to true. Set to false to enable multi-capture flows. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - purchase_details: NotRequired[ - "AuthorizationService.CaptureParamsPurchaseDetails" - ] - """ - Additional purchase information that is optionally provided by the merchant. - """ - - class CaptureParamsPurchaseDetails(TypedDict): - fleet: NotRequired[ - "AuthorizationService.CaptureParamsPurchaseDetailsFleet" - ] - """ - Fleet-specific information for transactions using Fleet cards. - """ - flight: NotRequired[ - "AuthorizationService.CaptureParamsPurchaseDetailsFlight" - ] - """ - Information about the flight that was purchased with this transaction. - """ - fuel: NotRequired[ - "AuthorizationService.CaptureParamsPurchaseDetailsFuel" - ] - """ - Information about fuel that was purchased with this transaction. - """ - lodging: NotRequired[ - "AuthorizationService.CaptureParamsPurchaseDetailsLodging" - ] - """ - Information about lodging that was purchased with this transaction. - """ - receipt: NotRequired[ - List["AuthorizationService.CaptureParamsPurchaseDetailsReceipt"] - ] - """ - The line items in the purchase. - """ - reference: NotRequired[str] - """ - A merchant-specific order number. - """ - - class CaptureParamsPurchaseDetailsFleet(TypedDict): - cardholder_prompt_data: NotRequired[ - "AuthorizationService.CaptureParamsPurchaseDetailsFleetCardholderPromptData" - ] - """ - Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry. - """ - purchase_type: NotRequired[ - Literal[ - "fuel_and_non_fuel_purchase", - "fuel_purchase", - "non_fuel_purchase", - ] - ] - """ - The type of purchase. One of `fuel_purchase`, `non_fuel_purchase`, or `fuel_and_non_fuel_purchase`. - """ - reported_breakdown: NotRequired[ - "AuthorizationService.CaptureParamsPurchaseDetailsFleetReportedBreakdown" - ] - """ - More information about the total amount. This information is not guaranteed to be accurate as some merchants may provide unreliable data. - """ - service_type: NotRequired[ - Literal["full_service", "non_fuel_transaction", "self_service"] - ] - """ - The type of fuel service. One of `non_fuel_transaction`, `full_service`, or `self_service`. - """ - - class CaptureParamsPurchaseDetailsFleetCardholderPromptData(TypedDict): - driver_id: NotRequired[str] - """ - Driver ID. - """ - odometer: NotRequired[int] - """ - Odometer reading. - """ - unspecified_id: NotRequired[str] - """ - An alphanumeric ID. This field is used when a vehicle ID, driver ID, or generic ID is entered by the cardholder, but the merchant or card network did not specify the prompt type. - """ - user_id: NotRequired[str] - """ - User ID. - """ - vehicle_number: NotRequired[str] - """ - Vehicle number. - """ - - class CaptureParamsPurchaseDetailsFleetReportedBreakdown(TypedDict): - fuel: NotRequired[ - "AuthorizationService.CaptureParamsPurchaseDetailsFleetReportedBreakdownFuel" - ] - """ - Breakdown of fuel portion of the purchase. - """ - non_fuel: NotRequired[ - "AuthorizationService.CaptureParamsPurchaseDetailsFleetReportedBreakdownNonFuel" - ] - """ - Breakdown of non-fuel portion of the purchase. - """ - tax: NotRequired[ - "AuthorizationService.CaptureParamsPurchaseDetailsFleetReportedBreakdownTax" - ] - """ - Information about tax included in this transaction. - """ - - class CaptureParamsPurchaseDetailsFleetReportedBreakdownFuel(TypedDict): - gross_amount_decimal: NotRequired[str] - """ - Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive of taxes. - """ - - class CaptureParamsPurchaseDetailsFleetReportedBreakdownNonFuel(TypedDict): - gross_amount_decimal: NotRequired[str] - """ - Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes. - """ - - class CaptureParamsPurchaseDetailsFleetReportedBreakdownTax(TypedDict): - local_amount_decimal: NotRequired[str] - """ - Amount of state or provincial Sales Tax included in the transaction amount. Null if not reported by merchant or not subject to tax. - """ - national_amount_decimal: NotRequired[str] - """ - Amount of national Sales Tax or VAT included in the transaction amount. Null if not reported by merchant or not subject to tax. - """ - - class CaptureParamsPurchaseDetailsFlight(TypedDict): - departure_at: NotRequired[int] - """ - The time that the flight departed. - """ - passenger_name: NotRequired[str] - """ - The name of the passenger. - """ - refundable: NotRequired[bool] - """ - Whether the ticket is refundable. - """ - segments: NotRequired[ - List[ - "AuthorizationService.CaptureParamsPurchaseDetailsFlightSegment" - ] - ] - """ - The legs of the trip. - """ - travel_agency: NotRequired[str] - """ - The travel agency that issued the ticket. - """ - - class CaptureParamsPurchaseDetailsFlightSegment(TypedDict): - arrival_airport_code: NotRequired[str] - """ - The three-letter IATA airport code of the flight's destination. - """ - carrier: NotRequired[str] - """ - The airline carrier code. - """ - departure_airport_code: NotRequired[str] - """ - The three-letter IATA airport code that the flight departed from. - """ - flight_number: NotRequired[str] - """ - The flight number. - """ - service_class: NotRequired[str] - """ - The flight's service class. - """ - stopover_allowed: NotRequired[bool] - """ - Whether a stopover is allowed on this flight. - """ - - class CaptureParamsPurchaseDetailsFuel(TypedDict): - industry_product_code: NotRequired[str] - """ - [Conexxus Payment System Product Code](https://www.conexxus.org/conexxus-payment-system-product-codes) identifying the primary fuel product purchased. - """ - quantity_decimal: NotRequired[str] - """ - The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places. - """ - type: NotRequired[ - Literal[ - "diesel", - "other", - "unleaded_plus", - "unleaded_regular", - "unleaded_super", - ] - ] - """ - The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`. - """ - unit: NotRequired[ - Literal[ - "charging_minute", - "imperial_gallon", - "kilogram", - "kilowatt_hour", - "liter", - "other", - "pound", - "us_gallon", - ] - ] - """ - The units for `quantity_decimal`. One of `charging_minute`, `imperial_gallon`, `kilogram`, `kilowatt_hour`, `liter`, `pound`, `us_gallon`, or `other`. - """ - unit_cost_decimal: NotRequired[str] - """ - The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places. - """ - - class CaptureParamsPurchaseDetailsLodging(TypedDict): - check_in_at: NotRequired[int] - """ - The time of checking into the lodging. - """ - nights: NotRequired[int] - """ - The number of nights stayed at the lodging. - """ - - class CaptureParamsPurchaseDetailsReceipt(TypedDict): - description: NotRequired[str] - quantity: NotRequired[str] - total: NotRequired[int] - unit_cost: NotRequired[int] - - class CreateParams(TypedDict): - amount: NotRequired[int] - """ - The total amount to attempt to authorize. This amount is in the provided currency, or defaults to the card's currency, and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). - """ - amount_details: NotRequired[ - "AuthorizationService.CreateParamsAmountDetails" - ] - """ - Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). - """ - authorization_method: NotRequired[ - Literal["chip", "contactless", "keyed_in", "online", "swipe"] - ] - """ - How the card details were provided. Defaults to online. - """ - card: str - """ - Card associated with this authorization. - """ - currency: NotRequired[str] - """ - The currency of the authorization. If not provided, defaults to the currency of the card. 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. - """ - fleet: NotRequired["AuthorizationService.CreateParamsFleet"] - """ - Fleet-specific information for authorizations using Fleet cards. - """ - fraud_disputability_likelihood: NotRequired[ - Literal["neutral", "unknown", "very_likely", "very_unlikely"] - ] - """ - Probability that this transaction can be disputed in the event of fraud. Assessed by comparing the characteristics of the authorization to card network rules. - """ - fuel: NotRequired["AuthorizationService.CreateParamsFuel"] - """ - Information about fuel that was purchased with this transaction. - """ - is_amount_controllable: NotRequired[bool] - """ - If set `true`, you may provide [amount](https://stripe.com/docs/api/issuing/authorizations/approve#approve_issuing_authorization-amount) to control how much to hold for the authorization. - """ - merchant_amount: NotRequired[int] - """ - The total amount to attempt to authorize. This amount is in the provided merchant currency, and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). - """ - merchant_currency: NotRequired[str] - """ - The currency of the authorization. If not provided, defaults to the currency of the card. 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). - """ - merchant_data: NotRequired[ - "AuthorizationService.CreateParamsMerchantData" - ] - """ - Details about the seller (grocery store, e-commerce website, etc.) where the card authorization happened. - """ - network_data: NotRequired[ - "AuthorizationService.CreateParamsNetworkData" - ] - """ - Details about the authorization, such as identifiers, set by the card network. - """ - risk_assessment: NotRequired[ - "AuthorizationService.CreateParamsRiskAssessment" - ] - """ - Stripe's assessment of the fraud risk for this authorization. - """ - verification_data: NotRequired[ - "AuthorizationService.CreateParamsVerificationData" - ] - """ - Verifications that Stripe performed on information that the cardholder provided to the merchant. - """ - wallet: NotRequired[Literal["apple_pay", "google_pay", "samsung_pay"]] - """ - The digital wallet used for this transaction. One of `apple_pay`, `google_pay`, or `samsung_pay`. Will populate as `null` when no digital wallet was utilized. - """ - - class CreateParamsAmountDetails(TypedDict): - atm_fee: NotRequired[int] - """ - The ATM withdrawal fee. - """ - cashback_amount: NotRequired[int] - """ - The amount of cash requested by the cardholder. - """ - - class CreateParamsFleet(TypedDict): - cardholder_prompt_data: NotRequired[ - "AuthorizationService.CreateParamsFleetCardholderPromptData" - ] - """ - Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry. - """ - purchase_type: NotRequired[ - Literal[ - "fuel_and_non_fuel_purchase", - "fuel_purchase", - "non_fuel_purchase", - ] - ] - """ - The type of purchase. One of `fuel_purchase`, `non_fuel_purchase`, or `fuel_and_non_fuel_purchase`. - """ - reported_breakdown: NotRequired[ - "AuthorizationService.CreateParamsFleetReportedBreakdown" - ] - """ - More information about the total amount. This information is not guaranteed to be accurate as some merchants may provide unreliable data. - """ - service_type: NotRequired[ - Literal["full_service", "non_fuel_transaction", "self_service"] - ] - """ - The type of fuel service. One of `non_fuel_transaction`, `full_service`, or `self_service`. - """ - - class CreateParamsFleetCardholderPromptData(TypedDict): - driver_id: NotRequired[str] - """ - Driver ID. - """ - odometer: NotRequired[int] - """ - Odometer reading. - """ - unspecified_id: NotRequired[str] - """ - An alphanumeric ID. This field is used when a vehicle ID, driver ID, or generic ID is entered by the cardholder, but the merchant or card network did not specify the prompt type. - """ - user_id: NotRequired[str] - """ - User ID. - """ - vehicle_number: NotRequired[str] - """ - Vehicle number. - """ - - class CreateParamsFleetReportedBreakdown(TypedDict): - fuel: NotRequired[ - "AuthorizationService.CreateParamsFleetReportedBreakdownFuel" - ] - """ - Breakdown of fuel portion of the purchase. - """ - non_fuel: NotRequired[ - "AuthorizationService.CreateParamsFleetReportedBreakdownNonFuel" - ] - """ - Breakdown of non-fuel portion of the purchase. - """ - tax: NotRequired[ - "AuthorizationService.CreateParamsFleetReportedBreakdownTax" - ] - """ - Information about tax included in this transaction. - """ - - class CreateParamsFleetReportedBreakdownFuel(TypedDict): - gross_amount_decimal: NotRequired[str] - """ - Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive of taxes. - """ - - class CreateParamsFleetReportedBreakdownNonFuel(TypedDict): - gross_amount_decimal: NotRequired[str] - """ - Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes. - """ - - class CreateParamsFleetReportedBreakdownTax(TypedDict): - local_amount_decimal: NotRequired[str] - """ - Amount of state or provincial Sales Tax included in the transaction amount. Null if not reported by merchant or not subject to tax. - """ - national_amount_decimal: NotRequired[str] - """ - Amount of national Sales Tax or VAT included in the transaction amount. Null if not reported by merchant or not subject to tax. - """ - - class CreateParamsFuel(TypedDict): - industry_product_code: NotRequired[str] - """ - [Conexxus Payment System Product Code](https://www.conexxus.org/conexxus-payment-system-product-codes) identifying the primary fuel product purchased. - """ - quantity_decimal: NotRequired[str] - """ - The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places. - """ - type: NotRequired[ - Literal[ - "diesel", - "other", - "unleaded_plus", - "unleaded_regular", - "unleaded_super", - ] - ] - """ - The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`. - """ - unit: NotRequired[ - Literal[ - "charging_minute", - "imperial_gallon", - "kilogram", - "kilowatt_hour", - "liter", - "other", - "pound", - "us_gallon", - ] - ] - """ - The units for `quantity_decimal`. One of `charging_minute`, `imperial_gallon`, `kilogram`, `kilowatt_hour`, `liter`, `pound`, `us_gallon`, or `other`. - """ - unit_cost_decimal: NotRequired[str] - """ - The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places. - """ - - class CreateParamsMerchantData(TypedDict): - category: NotRequired[ - Literal[ - "ac_refrigeration_repair", - "accounting_bookkeeping_services", - "advertising_services", - "agricultural_cooperative", - "airlines_air_carriers", - "airports_flying_fields", - "ambulance_services", - "amusement_parks_carnivals", - "antique_reproductions", - "antique_shops", - "aquariums", - "architectural_surveying_services", - "art_dealers_and_galleries", - "artists_supply_and_craft_shops", - "auto_and_home_supply_stores", - "auto_body_repair_shops", - "auto_paint_shops", - "auto_service_shops", - "automated_cash_disburse", - "automated_fuel_dispensers", - "automobile_associations", - "automotive_parts_and_accessories_stores", - "automotive_tire_stores", - "bail_and_bond_payments", - "bakeries", - "bands_orchestras", - "barber_and_beauty_shops", - "betting_casino_gambling", - "bicycle_shops", - "billiard_pool_establishments", - "boat_dealers", - "boat_rentals_and_leases", - "book_stores", - "books_periodicals_and_newspapers", - "bowling_alleys", - "bus_lines", - "business_secretarial_schools", - "buying_shopping_services", - "cable_satellite_and_other_pay_television_and_radio", - "camera_and_photographic_supply_stores", - "candy_nut_and_confectionery_stores", - "car_and_truck_dealers_new_used", - "car_and_truck_dealers_used_only", - "car_rental_agencies", - "car_washes", - "carpentry_services", - "carpet_upholstery_cleaning", - "caterers", - "charitable_and_social_service_organizations_fundraising", - "chemicals_and_allied_products", - "child_care_services", - "childrens_and_infants_wear_stores", - "chiropodists_podiatrists", - "chiropractors", - "cigar_stores_and_stands", - "civic_social_fraternal_associations", - "cleaning_and_maintenance", - "clothing_rental", - "colleges_universities", - "commercial_equipment", - "commercial_footwear", - "commercial_photography_art_and_graphics", - "commuter_transport_and_ferries", - "computer_network_services", - "computer_programming", - "computer_repair", - "computer_software_stores", - "computers_peripherals_and_software", - "concrete_work_services", - "construction_materials", - "consulting_public_relations", - "correspondence_schools", - "cosmetic_stores", - "counseling_services", - "country_clubs", - "courier_services", - "court_costs", - "credit_reporting_agencies", - "cruise_lines", - "dairy_products_stores", - "dance_hall_studios_schools", - "dating_escort_services", - "dentists_orthodontists", - "department_stores", - "detective_agencies", - "digital_goods_applications", - "digital_goods_games", - "digital_goods_large_volume", - "digital_goods_media", - "direct_marketing_catalog_merchant", - "direct_marketing_combination_catalog_and_retail_merchant", - "direct_marketing_inbound_telemarketing", - "direct_marketing_insurance_services", - "direct_marketing_other", - "direct_marketing_outbound_telemarketing", - "direct_marketing_subscription", - "direct_marketing_travel", - "discount_stores", - "doctors", - "door_to_door_sales", - "drapery_window_covering_and_upholstery_stores", - "drinking_places", - "drug_stores_and_pharmacies", - "drugs_drug_proprietaries_and_druggist_sundries", - "dry_cleaners", - "durable_goods", - "duty_free_stores", - "eating_places_restaurants", - "educational_services", - "electric_razor_stores", - "electric_vehicle_charging", - "electrical_parts_and_equipment", - "electrical_services", - "electronics_repair_shops", - "electronics_stores", - "elementary_secondary_schools", - "emergency_services_gcas_visa_use_only", - "employment_temp_agencies", - "equipment_rental", - "exterminating_services", - "family_clothing_stores", - "fast_food_restaurants", - "financial_institutions", - "fines_government_administrative_entities", - "fireplace_fireplace_screens_and_accessories_stores", - "floor_covering_stores", - "florists", - "florists_supplies_nursery_stock_and_flowers", - "freezer_and_locker_meat_provisioners", - "fuel_dealers_non_automotive", - "funeral_services_crematories", - "furniture_home_furnishings_and_equipment_stores_except_appliances", - "furniture_repair_refinishing", - "furriers_and_fur_shops", - "general_services", - "gift_card_novelty_and_souvenir_shops", - "glass_paint_and_wallpaper_stores", - "glassware_crystal_stores", - "golf_courses_public", - "government_licensed_horse_dog_racing_us_region_only", - "government_licensed_online_casions_online_gambling_us_region_only", - "government_owned_lotteries_non_us_region", - "government_owned_lotteries_us_region_only", - "government_services", - "grocery_stores_supermarkets", - "hardware_equipment_and_supplies", - "hardware_stores", - "health_and_beauty_spas", - "hearing_aids_sales_and_supplies", - "heating_plumbing_a_c", - "hobby_toy_and_game_shops", - "home_supply_warehouse_stores", - "hospitals", - "hotels_motels_and_resorts", - "household_appliance_stores", - "industrial_supplies", - "information_retrieval_services", - "insurance_default", - "insurance_underwriting_premiums", - "intra_company_purchases", - "jewelry_stores_watches_clocks_and_silverware_stores", - "landscaping_services", - "laundries", - "laundry_cleaning_services", - "legal_services_attorneys", - "luggage_and_leather_goods_stores", - "lumber_building_materials_stores", - "manual_cash_disburse", - "marinas_service_and_supplies", - "marketplaces", - "masonry_stonework_and_plaster", - "massage_parlors", - "medical_and_dental_labs", - "medical_dental_ophthalmic_and_hospital_equipment_and_supplies", - "medical_services", - "membership_organizations", - "mens_and_boys_clothing_and_accessories_stores", - "mens_womens_clothing_stores", - "metal_service_centers", - "miscellaneous_apparel_and_accessory_shops", - "miscellaneous_auto_dealers", - "miscellaneous_business_services", - "miscellaneous_food_stores", - "miscellaneous_general_merchandise", - "miscellaneous_general_services", - "miscellaneous_home_furnishing_specialty_stores", - "miscellaneous_publishing_and_printing", - "miscellaneous_recreation_services", - "miscellaneous_repair_shops", - "miscellaneous_specialty_retail", - "mobile_home_dealers", - "motion_picture_theaters", - "motor_freight_carriers_and_trucking", - "motor_homes_dealers", - "motor_vehicle_supplies_and_new_parts", - "motorcycle_shops_and_dealers", - "motorcycle_shops_dealers", - "music_stores_musical_instruments_pianos_and_sheet_music", - "news_dealers_and_newsstands", - "non_fi_money_orders", - "non_fi_stored_value_card_purchase_load", - "nondurable_goods", - "nurseries_lawn_and_garden_supply_stores", - "nursing_personal_care", - "office_and_commercial_furniture", - "opticians_eyeglasses", - "optometrists_ophthalmologist", - "orthopedic_goods_prosthetic_devices", - "osteopaths", - "package_stores_beer_wine_and_liquor", - "paints_varnishes_and_supplies", - "parking_lots_garages", - "passenger_railways", - "pawn_shops", - "pet_shops_pet_food_and_supplies", - "petroleum_and_petroleum_products", - "photo_developing", - "photographic_photocopy_microfilm_equipment_and_supplies", - "photographic_studios", - "picture_video_production", - "piece_goods_notions_and_other_dry_goods", - "plumbing_heating_equipment_and_supplies", - "political_organizations", - "postal_services_government_only", - "precious_stones_and_metals_watches_and_jewelry", - "professional_services", - "public_warehousing_and_storage", - "quick_copy_repro_and_blueprint", - "railroads", - "real_estate_agents_and_managers_rentals", - "record_stores", - "recreational_vehicle_rentals", - "religious_goods_stores", - "religious_organizations", - "roofing_siding_sheet_metal", - "secretarial_support_services", - "security_brokers_dealers", - "service_stations", - "sewing_needlework_fabric_and_piece_goods_stores", - "shoe_repair_hat_cleaning", - "shoe_stores", - "small_appliance_repair", - "snowmobile_dealers", - "special_trade_services", - "specialty_cleaning", - "sporting_goods_stores", - "sporting_recreation_camps", - "sports_and_riding_apparel_stores", - "sports_clubs_fields", - "stamp_and_coin_stores", - "stationary_office_supplies_printing_and_writing_paper", - "stationery_stores_office_and_school_supply_stores", - "swimming_pools_sales", - "t_ui_travel_germany", - "tailors_alterations", - "tax_payments_government_agencies", - "tax_preparation_services", - "taxicabs_limousines", - "telecommunication_equipment_and_telephone_sales", - "telecommunication_services", - "telegraph_services", - "tent_and_awning_shops", - "testing_laboratories", - "theatrical_ticket_agencies", - "timeshares", - "tire_retreading_and_repair", - "tolls_bridge_fees", - "tourist_attractions_and_exhibits", - "towing_services", - "trailer_parks_campgrounds", - "transportation_services", - "travel_agencies_tour_operators", - "truck_stop_iteration", - "truck_utility_trailer_rentals", - "typesetting_plate_making_and_related_services", - "typewriter_stores", - "u_s_federal_government_agencies_or_departments", - "uniforms_commercial_clothing", - "used_merchandise_and_secondhand_stores", - "utilities", - "variety_stores", - "veterinary_services", - "video_amusement_game_supplies", - "video_game_arcades", - "video_tape_rental_stores", - "vocational_trade_schools", - "watch_jewelry_repair", - "welding_repair", - "wholesale_clubs", - "wig_and_toupee_stores", - "wires_money_orders", - "womens_accessory_and_specialty_shops", - "womens_ready_to_wear_stores", - "wrecking_and_salvage_yards", - ] - ] - """ - A categorization of the seller's type of business. See our [merchant categories guide](https://stripe.com/docs/issuing/merchant-categories) for a list of possible values. - """ - city: NotRequired[str] - """ - City where the seller is located - """ - country: NotRequired[str] - """ - Country where the seller is located - """ - name: NotRequired[str] - """ - Name of the seller - """ - network_id: NotRequired[str] - """ - Identifier assigned to the seller by the card network. Different card networks may assign different network_id fields to the same merchant. - """ - postal_code: NotRequired[str] - """ - Postal code where the seller is located - """ - state: NotRequired[str] - """ - State where the seller is located - """ - terminal_id: NotRequired[str] - """ - An ID assigned by the seller to the location of the sale. - """ - url: NotRequired[str] - """ - URL provided by the merchant on a 3DS request - """ - - class CreateParamsNetworkData(TypedDict): - acquiring_institution_id: NotRequired[str] - """ - Identifier assigned to the acquirer by the card network. - """ - - class CreateParamsRiskAssessment(TypedDict): - card_testing_risk: NotRequired[ - "AuthorizationService.CreateParamsRiskAssessmentCardTestingRisk" - ] - """ - Stripe's assessment of this authorization's likelihood of being card testing activity. - """ - merchant_dispute_risk: NotRequired[ - "AuthorizationService.CreateParamsRiskAssessmentMerchantDisputeRisk" - ] - """ - The dispute risk of the merchant (the seller on a purchase) on an authorization based on all Stripe Issuing activity. - """ - - class CreateParamsRiskAssessmentCardTestingRisk(TypedDict): - invalid_account_number_decline_rate_past_hour: NotRequired[int] - """ - The % of declines due to a card number not existing in the past hour, taking place at the same merchant. Higher rates correspond to a greater probability of card testing activity, meaning bad actors may be attempting different card number combinations to guess a correct one. Takes on values between 0 and 100. - """ - invalid_credentials_decline_rate_past_hour: NotRequired[int] - """ - The % of declines due to incorrect verification data (like CVV or expiry) in the past hour, taking place at the same merchant. Higher rates correspond to a greater probability of bad actors attempting to utilize valid card credentials at merchants with verification requirements. Takes on values between 0 and 100. - """ - risk_level: Literal[ - "elevated", "highest", "low", "normal", "not_assessed", "unknown" - ] - """ - The likelihood that this authorization is associated with card testing activity. This is assessed by evaluating decline activity over the last hour. - """ - - class CreateParamsRiskAssessmentMerchantDisputeRisk(TypedDict): - dispute_rate: NotRequired[int] - """ - The dispute rate observed across all Stripe Issuing authorizations for this merchant. For example, a value of 50 means 50% of authorizations from this merchant on Stripe Issuing have resulted in a dispute. Higher values mean a higher likelihood the authorization is disputed. Takes on values between 0 and 100. - """ - risk_level: Literal[ - "elevated", "highest", "low", "normal", "not_assessed", "unknown" - ] - """ - The likelihood that authorizations from this merchant will result in a dispute based on their history on Stripe Issuing. - """ - - class CreateParamsVerificationData(TypedDict): - address_line1_check: NotRequired[ - Literal["match", "mismatch", "not_provided"] - ] - """ - Whether the cardholder provided an address first line and if it matched the cardholder's `billing.address.line1`. - """ - address_postal_code_check: NotRequired[ - Literal["match", "mismatch", "not_provided"] - ] - """ - Whether the cardholder provided a postal code and if it matched the cardholder's `billing.address.postal_code`. - """ - authentication_exemption: NotRequired[ - "AuthorizationService.CreateParamsVerificationDataAuthenticationExemption" - ] - """ - The exemption applied to this authorization. - """ - cvc_check: NotRequired[Literal["match", "mismatch", "not_provided"]] - """ - Whether the cardholder provided a CVC and if it matched Stripe's record. - """ - expiry_check: NotRequired[Literal["match", "mismatch", "not_provided"]] - """ - Whether the cardholder provided an expiry date and if it matched Stripe's record. - """ - three_d_secure: NotRequired[ - "AuthorizationService.CreateParamsVerificationDataThreeDSecure" - ] - """ - 3D Secure details. - """ - - class CreateParamsVerificationDataAuthenticationExemption(TypedDict): - claimed_by: Literal["acquirer", "issuer"] - """ - The entity that requested the exemption, either the acquiring merchant or the Issuing user. - """ - type: Literal[ - "low_value_transaction", "transaction_risk_analysis", "unknown" - ] - """ - The specific exemption claimed for this authorization. - """ - - class CreateParamsVerificationDataThreeDSecure(TypedDict): - result: Literal[ - "attempt_acknowledged", "authenticated", "failed", "required" - ] - """ - The outcome of the 3D Secure authentication request. - """ - - class ExpireParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class FinalizeAmountParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - final_amount: int - """ - The final authorization amount that will be captured by the merchant. This amount is in the authorization currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). - """ - fleet: NotRequired["AuthorizationService.FinalizeAmountParamsFleet"] - """ - Fleet-specific information for authorizations using Fleet cards. - """ - fuel: NotRequired["AuthorizationService.FinalizeAmountParamsFuel"] - """ - Information about fuel that was purchased with this transaction. - """ - - class FinalizeAmountParamsFleet(TypedDict): - cardholder_prompt_data: NotRequired[ - "AuthorizationService.FinalizeAmountParamsFleetCardholderPromptData" - ] - """ - Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry. - """ - purchase_type: NotRequired[ - Literal[ - "fuel_and_non_fuel_purchase", - "fuel_purchase", - "non_fuel_purchase", - ] - ] - """ - The type of purchase. One of `fuel_purchase`, `non_fuel_purchase`, or `fuel_and_non_fuel_purchase`. - """ - reported_breakdown: NotRequired[ - "AuthorizationService.FinalizeAmountParamsFleetReportedBreakdown" - ] - """ - More information about the total amount. This information is not guaranteed to be accurate as some merchants may provide unreliable data. - """ - service_type: NotRequired[ - Literal["full_service", "non_fuel_transaction", "self_service"] - ] - """ - The type of fuel service. One of `non_fuel_transaction`, `full_service`, or `self_service`. - """ - - class FinalizeAmountParamsFleetCardholderPromptData(TypedDict): - driver_id: NotRequired[str] - """ - Driver ID. - """ - odometer: NotRequired[int] - """ - Odometer reading. - """ - unspecified_id: NotRequired[str] - """ - An alphanumeric ID. This field is used when a vehicle ID, driver ID, or generic ID is entered by the cardholder, but the merchant or card network did not specify the prompt type. - """ - user_id: NotRequired[str] - """ - User ID. - """ - vehicle_number: NotRequired[str] - """ - Vehicle number. - """ - - class FinalizeAmountParamsFleetReportedBreakdown(TypedDict): - fuel: NotRequired[ - "AuthorizationService.FinalizeAmountParamsFleetReportedBreakdownFuel" - ] - """ - Breakdown of fuel portion of the purchase. - """ - non_fuel: NotRequired[ - "AuthorizationService.FinalizeAmountParamsFleetReportedBreakdownNonFuel" - ] - """ - Breakdown of non-fuel portion of the purchase. - """ - tax: NotRequired[ - "AuthorizationService.FinalizeAmountParamsFleetReportedBreakdownTax" - ] - """ - Information about tax included in this transaction. - """ - - class FinalizeAmountParamsFleetReportedBreakdownFuel(TypedDict): - gross_amount_decimal: NotRequired[str] - """ - Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive of taxes. - """ - - class FinalizeAmountParamsFleetReportedBreakdownNonFuel(TypedDict): - gross_amount_decimal: NotRequired[str] - """ - Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes. - """ - - class FinalizeAmountParamsFleetReportedBreakdownTax(TypedDict): - local_amount_decimal: NotRequired[str] - """ - Amount of state or provincial Sales Tax included in the transaction amount. Null if not reported by merchant or not subject to tax. - """ - national_amount_decimal: NotRequired[str] - """ - Amount of national Sales Tax or VAT included in the transaction amount. Null if not reported by merchant or not subject to tax. - """ - - class FinalizeAmountParamsFuel(TypedDict): - industry_product_code: NotRequired[str] - """ - [Conexxus Payment System Product Code](https://www.conexxus.org/conexxus-payment-system-product-codes) identifying the primary fuel product purchased. - """ - quantity_decimal: NotRequired[str] - """ - The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places. - """ - type: NotRequired[ - Literal[ - "diesel", - "other", - "unleaded_plus", - "unleaded_regular", - "unleaded_super", - ] - ] - """ - The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`. - """ - unit: NotRequired[ - Literal[ - "charging_minute", - "imperial_gallon", - "kilogram", - "kilowatt_hour", - "liter", - "other", - "pound", - "us_gallon", - ] - ] - """ - The units for `quantity_decimal`. One of `charging_minute`, `imperial_gallon`, `kilogram`, `kilowatt_hour`, `liter`, `pound`, `us_gallon`, or `other`. - """ - unit_cost_decimal: NotRequired[str] - """ - The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places. - """ - - class IncrementParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - increment_amount: int - """ - The amount to increment the authorization by. This amount is in the authorization currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). - """ - is_amount_controllable: NotRequired[bool] - """ - If set `true`, you may provide [amount](https://stripe.com/docs/api/issuing/authorizations/approve#approve_issuing_authorization-amount) to control how much to hold for the authorization. - """ - - class RespondParams(TypedDict): - confirmed: bool - """ - Whether to simulate the user confirming that the transaction was legitimate (true) or telling Stripe that it was fraudulent (false). - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class ReverseParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - reverse_amount: NotRequired[int] - """ - The amount to reverse from the authorization. If not provided, the full amount of the authorization will be reversed. This amount is in the authorization currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). - """ - def create( self, - params: "AuthorizationService.CreateParams", + params: "AuthorizationCreateParams", options: Optional[RequestOptions] = None, ) -> Authorization: """ @@ -1148,7 +53,7 @@ def create( async def create_async( self, - params: "AuthorizationService.CreateParams", + params: "AuthorizationCreateParams", options: Optional[RequestOptions] = None, ) -> Authorization: """ @@ -1168,7 +73,7 @@ async def create_async( def capture( self, authorization: str, - params: Optional["AuthorizationService.CaptureParams"] = None, + params: Optional["AuthorizationCaptureParams"] = None, options: Optional[RequestOptions] = None, ) -> Authorization: """ @@ -1190,7 +95,7 @@ def capture( async def capture_async( self, authorization: str, - params: Optional["AuthorizationService.CaptureParams"] = None, + params: Optional["AuthorizationCaptureParams"] = None, options: Optional[RequestOptions] = None, ) -> Authorization: """ @@ -1212,7 +117,7 @@ async def capture_async( def expire( self, authorization: str, - params: Optional["AuthorizationService.ExpireParams"] = None, + params: Optional["AuthorizationExpireParams"] = None, options: Optional[RequestOptions] = None, ) -> Authorization: """ @@ -1234,7 +139,7 @@ def expire( async def expire_async( self, authorization: str, - params: Optional["AuthorizationService.ExpireParams"] = None, + params: Optional["AuthorizationExpireParams"] = None, options: Optional[RequestOptions] = None, ) -> Authorization: """ @@ -1256,7 +161,7 @@ async def expire_async( def finalize_amount( self, authorization: str, - params: "AuthorizationService.FinalizeAmountParams", + params: "AuthorizationFinalizeAmountParams", options: Optional[RequestOptions] = None, ) -> Authorization: """ @@ -1278,7 +183,7 @@ def finalize_amount( async def finalize_amount_async( self, authorization: str, - params: "AuthorizationService.FinalizeAmountParams", + params: "AuthorizationFinalizeAmountParams", options: Optional[RequestOptions] = None, ) -> Authorization: """ @@ -1300,7 +205,7 @@ async def finalize_amount_async( def respond( self, authorization: str, - params: "AuthorizationService.RespondParams", + params: "AuthorizationRespondParams", options: Optional[RequestOptions] = None, ) -> Authorization: """ @@ -1322,7 +227,7 @@ def respond( async def respond_async( self, authorization: str, - params: "AuthorizationService.RespondParams", + params: "AuthorizationRespondParams", options: Optional[RequestOptions] = None, ) -> Authorization: """ @@ -1344,7 +249,7 @@ async def respond_async( def increment( self, authorization: str, - params: "AuthorizationService.IncrementParams", + params: "AuthorizationIncrementParams", options: Optional[RequestOptions] = None, ) -> Authorization: """ @@ -1366,7 +271,7 @@ def increment( async def increment_async( self, authorization: str, - params: "AuthorizationService.IncrementParams", + params: "AuthorizationIncrementParams", options: Optional[RequestOptions] = None, ) -> Authorization: """ @@ -1388,7 +293,7 @@ async def increment_async( def reverse( self, authorization: str, - params: Optional["AuthorizationService.ReverseParams"] = None, + params: Optional["AuthorizationReverseParams"] = None, options: Optional[RequestOptions] = None, ) -> Authorization: """ @@ -1410,7 +315,7 @@ def reverse( async def reverse_async( self, authorization: str, - params: Optional["AuthorizationService.ReverseParams"] = None, + params: Optional["AuthorizationReverseParams"] = None, options: Optional[RequestOptions] = None, ) -> Authorization: """ diff --git a/stripe/test_helpers/issuing/_card_service.py b/stripe/test_helpers/issuing/_card_service.py index d6b64c08b..d6f1ecf21 100644 --- a/stripe/test_helpers/issuing/_card_service.py +++ b/stripe/test_helpers/issuing/_card_service.py @@ -4,45 +4,32 @@ from stripe._stripe_service import StripeService from stripe._util import sanitize_id from stripe.issuing._card import Card -from typing import List, Optional, cast -from typing_extensions import NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params.test_helpers.issuing._card_deliver_card_params import ( + CardDeliverCardParams, + ) + from stripe.params.test_helpers.issuing._card_fail_card_params import ( + CardFailCardParams, + ) + from stripe.params.test_helpers.issuing._card_return_card_params import ( + CardReturnCardParams, + ) + from stripe.params.test_helpers.issuing._card_ship_card_params import ( + CardShipCardParams, + ) + from stripe.params.test_helpers.issuing._card_submit_card_params import ( + CardSubmitCardParams, + ) class CardService(StripeService): - class DeliverCardParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class FailCardParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class ReturnCardParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class ShipCardParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class SubmitCardParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - def deliver_card( self, card: str, - params: Optional["CardService.DeliverCardParams"] = None, + params: Optional["CardDeliverCardParams"] = None, options: Optional[RequestOptions] = None, ) -> Card: """ @@ -64,7 +51,7 @@ def deliver_card( async def deliver_card_async( self, card: str, - params: Optional["CardService.DeliverCardParams"] = None, + params: Optional["CardDeliverCardParams"] = None, options: Optional[RequestOptions] = None, ) -> Card: """ @@ -86,7 +73,7 @@ async def deliver_card_async( def fail_card( self, card: str, - params: Optional["CardService.FailCardParams"] = None, + params: Optional["CardFailCardParams"] = None, options: Optional[RequestOptions] = None, ) -> Card: """ @@ -108,7 +95,7 @@ def fail_card( async def fail_card_async( self, card: str, - params: Optional["CardService.FailCardParams"] = None, + params: Optional["CardFailCardParams"] = None, options: Optional[RequestOptions] = None, ) -> Card: """ @@ -130,7 +117,7 @@ async def fail_card_async( def return_card( self, card: str, - params: Optional["CardService.ReturnCardParams"] = None, + params: Optional["CardReturnCardParams"] = None, options: Optional[RequestOptions] = None, ) -> Card: """ @@ -152,7 +139,7 @@ def return_card( async def return_card_async( self, card: str, - params: Optional["CardService.ReturnCardParams"] = None, + params: Optional["CardReturnCardParams"] = None, options: Optional[RequestOptions] = None, ) -> Card: """ @@ -174,7 +161,7 @@ async def return_card_async( def ship_card( self, card: str, - params: Optional["CardService.ShipCardParams"] = None, + params: Optional["CardShipCardParams"] = None, options: Optional[RequestOptions] = None, ) -> Card: """ @@ -196,7 +183,7 @@ def ship_card( async def ship_card_async( self, card: str, - params: Optional["CardService.ShipCardParams"] = None, + params: Optional["CardShipCardParams"] = None, options: Optional[RequestOptions] = None, ) -> Card: """ @@ -218,7 +205,7 @@ async def ship_card_async( def submit_card( self, card: str, - params: Optional["CardService.SubmitCardParams"] = None, + params: Optional["CardSubmitCardParams"] = None, options: Optional[RequestOptions] = None, ) -> Card: """ @@ -240,7 +227,7 @@ def submit_card( async def submit_card_async( self, card: str, - params: Optional["CardService.SubmitCardParams"] = None, + params: Optional["CardSubmitCardParams"] = None, options: Optional[RequestOptions] = None, ) -> Card: """ diff --git a/stripe/test_helpers/issuing/_personalization_design_service.py b/stripe/test_helpers/issuing/_personalization_design_service.py index c902f1771..a448dd457 100644 --- a/stripe/test_helpers/issuing/_personalization_design_service.py +++ b/stripe/test_helpers/issuing/_personalization_design_service.py @@ -4,74 +4,26 @@ from stripe._stripe_service import StripeService from stripe._util import sanitize_id from stripe.issuing._personalization_design import PersonalizationDesign -from typing import List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params.test_helpers.issuing._personalization_design_activate_params import ( + PersonalizationDesignActivateParams, + ) + from stripe.params.test_helpers.issuing._personalization_design_deactivate_params import ( + PersonalizationDesignDeactivateParams, + ) + from stripe.params.test_helpers.issuing._personalization_design_reject_params import ( + PersonalizationDesignRejectParams, + ) -class PersonalizationDesignService(StripeService): - class ActivateParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class DeactivateParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class RejectParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - rejection_reasons: ( - "PersonalizationDesignService.RejectParamsRejectionReasons" - ) - """ - The reason(s) the personalization design was rejected. - """ - - class RejectParamsRejectionReasons(TypedDict): - card_logo: NotRequired[ - List[ - Literal[ - "geographic_location", - "inappropriate", - "network_name", - "non_binary_image", - "non_fiat_currency", - "other", - "other_entity", - "promotional_material", - ] - ] - ] - """ - The reason(s) the card logo was rejected. - """ - carrier_text: NotRequired[ - List[ - Literal[ - "geographic_location", - "inappropriate", - "network_name", - "non_fiat_currency", - "other", - "other_entity", - "promotional_material", - ] - ] - ] - """ - The reason(s) the carrier text was rejected. - """ +class PersonalizationDesignService(StripeService): def activate( self, personalization_design: str, - params: Optional["PersonalizationDesignService.ActivateParams"] = None, + params: Optional["PersonalizationDesignActivateParams"] = None, options: Optional[RequestOptions] = None, ) -> PersonalizationDesign: """ @@ -93,7 +45,7 @@ def activate( async def activate_async( self, personalization_design: str, - params: Optional["PersonalizationDesignService.ActivateParams"] = None, + params: Optional["PersonalizationDesignActivateParams"] = None, options: Optional[RequestOptions] = None, ) -> PersonalizationDesign: """ @@ -115,9 +67,7 @@ async def activate_async( def deactivate( self, personalization_design: str, - params: Optional[ - "PersonalizationDesignService.DeactivateParams" - ] = None, + params: Optional["PersonalizationDesignDeactivateParams"] = None, options: Optional[RequestOptions] = None, ) -> PersonalizationDesign: """ @@ -139,9 +89,7 @@ def deactivate( async def deactivate_async( self, personalization_design: str, - params: Optional[ - "PersonalizationDesignService.DeactivateParams" - ] = None, + params: Optional["PersonalizationDesignDeactivateParams"] = None, options: Optional[RequestOptions] = None, ) -> PersonalizationDesign: """ @@ -163,7 +111,7 @@ async def deactivate_async( def reject( self, personalization_design: str, - params: "PersonalizationDesignService.RejectParams", + params: "PersonalizationDesignRejectParams", options: Optional[RequestOptions] = None, ) -> PersonalizationDesign: """ @@ -185,7 +133,7 @@ def reject( async def reject_async( self, personalization_design: str, - params: "PersonalizationDesignService.RejectParams", + params: "PersonalizationDesignRejectParams", options: Optional[RequestOptions] = None, ) -> PersonalizationDesign: """ diff --git a/stripe/test_helpers/issuing/_transaction_service.py b/stripe/test_helpers/issuing/_transaction_service.py index 4a65f6522..52217cba2 100644 --- a/stripe/test_helpers/issuing/_transaction_service.py +++ b/stripe/test_helpers/issuing/_transaction_service.py @@ -4,1257 +4,26 @@ from stripe._stripe_service import StripeService from stripe._util import sanitize_id from stripe.issuing._transaction import Transaction -from typing import List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params.test_helpers.issuing._transaction_create_force_capture_params import ( + TransactionCreateForceCaptureParams, + ) + from stripe.params.test_helpers.issuing._transaction_create_unlinked_refund_params import ( + TransactionCreateUnlinkedRefundParams, + ) + from stripe.params.test_helpers.issuing._transaction_refund_params import ( + TransactionRefundParams, + ) -class TransactionService(StripeService): - class CreateForceCaptureParams(TypedDict): - amount: int - """ - The total amount to attempt to capture. This amount is in the provided currency, or defaults to the cards currency, and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). - """ - card: str - """ - Card associated with this transaction. - """ - currency: NotRequired[str] - """ - The currency of the capture. If not provided, defaults to the currency of the card. 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. - """ - merchant_data: NotRequired[ - "TransactionService.CreateForceCaptureParamsMerchantData" - ] - """ - Details about the seller (grocery store, e-commerce website, etc.) where the card authorization happened. - """ - purchase_details: NotRequired[ - "TransactionService.CreateForceCaptureParamsPurchaseDetails" - ] - """ - Additional purchase information that is optionally provided by the merchant. - """ - - class CreateForceCaptureParamsMerchantData(TypedDict): - category: NotRequired[ - Literal[ - "ac_refrigeration_repair", - "accounting_bookkeeping_services", - "advertising_services", - "agricultural_cooperative", - "airlines_air_carriers", - "airports_flying_fields", - "ambulance_services", - "amusement_parks_carnivals", - "antique_reproductions", - "antique_shops", - "aquariums", - "architectural_surveying_services", - "art_dealers_and_galleries", - "artists_supply_and_craft_shops", - "auto_and_home_supply_stores", - "auto_body_repair_shops", - "auto_paint_shops", - "auto_service_shops", - "automated_cash_disburse", - "automated_fuel_dispensers", - "automobile_associations", - "automotive_parts_and_accessories_stores", - "automotive_tire_stores", - "bail_and_bond_payments", - "bakeries", - "bands_orchestras", - "barber_and_beauty_shops", - "betting_casino_gambling", - "bicycle_shops", - "billiard_pool_establishments", - "boat_dealers", - "boat_rentals_and_leases", - "book_stores", - "books_periodicals_and_newspapers", - "bowling_alleys", - "bus_lines", - "business_secretarial_schools", - "buying_shopping_services", - "cable_satellite_and_other_pay_television_and_radio", - "camera_and_photographic_supply_stores", - "candy_nut_and_confectionery_stores", - "car_and_truck_dealers_new_used", - "car_and_truck_dealers_used_only", - "car_rental_agencies", - "car_washes", - "carpentry_services", - "carpet_upholstery_cleaning", - "caterers", - "charitable_and_social_service_organizations_fundraising", - "chemicals_and_allied_products", - "child_care_services", - "childrens_and_infants_wear_stores", - "chiropodists_podiatrists", - "chiropractors", - "cigar_stores_and_stands", - "civic_social_fraternal_associations", - "cleaning_and_maintenance", - "clothing_rental", - "colleges_universities", - "commercial_equipment", - "commercial_footwear", - "commercial_photography_art_and_graphics", - "commuter_transport_and_ferries", - "computer_network_services", - "computer_programming", - "computer_repair", - "computer_software_stores", - "computers_peripherals_and_software", - "concrete_work_services", - "construction_materials", - "consulting_public_relations", - "correspondence_schools", - "cosmetic_stores", - "counseling_services", - "country_clubs", - "courier_services", - "court_costs", - "credit_reporting_agencies", - "cruise_lines", - "dairy_products_stores", - "dance_hall_studios_schools", - "dating_escort_services", - "dentists_orthodontists", - "department_stores", - "detective_agencies", - "digital_goods_applications", - "digital_goods_games", - "digital_goods_large_volume", - "digital_goods_media", - "direct_marketing_catalog_merchant", - "direct_marketing_combination_catalog_and_retail_merchant", - "direct_marketing_inbound_telemarketing", - "direct_marketing_insurance_services", - "direct_marketing_other", - "direct_marketing_outbound_telemarketing", - "direct_marketing_subscription", - "direct_marketing_travel", - "discount_stores", - "doctors", - "door_to_door_sales", - "drapery_window_covering_and_upholstery_stores", - "drinking_places", - "drug_stores_and_pharmacies", - "drugs_drug_proprietaries_and_druggist_sundries", - "dry_cleaners", - "durable_goods", - "duty_free_stores", - "eating_places_restaurants", - "educational_services", - "electric_razor_stores", - "electric_vehicle_charging", - "electrical_parts_and_equipment", - "electrical_services", - "electronics_repair_shops", - "electronics_stores", - "elementary_secondary_schools", - "emergency_services_gcas_visa_use_only", - "employment_temp_agencies", - "equipment_rental", - "exterminating_services", - "family_clothing_stores", - "fast_food_restaurants", - "financial_institutions", - "fines_government_administrative_entities", - "fireplace_fireplace_screens_and_accessories_stores", - "floor_covering_stores", - "florists", - "florists_supplies_nursery_stock_and_flowers", - "freezer_and_locker_meat_provisioners", - "fuel_dealers_non_automotive", - "funeral_services_crematories", - "furniture_home_furnishings_and_equipment_stores_except_appliances", - "furniture_repair_refinishing", - "furriers_and_fur_shops", - "general_services", - "gift_card_novelty_and_souvenir_shops", - "glass_paint_and_wallpaper_stores", - "glassware_crystal_stores", - "golf_courses_public", - "government_licensed_horse_dog_racing_us_region_only", - "government_licensed_online_casions_online_gambling_us_region_only", - "government_owned_lotteries_non_us_region", - "government_owned_lotteries_us_region_only", - "government_services", - "grocery_stores_supermarkets", - "hardware_equipment_and_supplies", - "hardware_stores", - "health_and_beauty_spas", - "hearing_aids_sales_and_supplies", - "heating_plumbing_a_c", - "hobby_toy_and_game_shops", - "home_supply_warehouse_stores", - "hospitals", - "hotels_motels_and_resorts", - "household_appliance_stores", - "industrial_supplies", - "information_retrieval_services", - "insurance_default", - "insurance_underwriting_premiums", - "intra_company_purchases", - "jewelry_stores_watches_clocks_and_silverware_stores", - "landscaping_services", - "laundries", - "laundry_cleaning_services", - "legal_services_attorneys", - "luggage_and_leather_goods_stores", - "lumber_building_materials_stores", - "manual_cash_disburse", - "marinas_service_and_supplies", - "marketplaces", - "masonry_stonework_and_plaster", - "massage_parlors", - "medical_and_dental_labs", - "medical_dental_ophthalmic_and_hospital_equipment_and_supplies", - "medical_services", - "membership_organizations", - "mens_and_boys_clothing_and_accessories_stores", - "mens_womens_clothing_stores", - "metal_service_centers", - "miscellaneous_apparel_and_accessory_shops", - "miscellaneous_auto_dealers", - "miscellaneous_business_services", - "miscellaneous_food_stores", - "miscellaneous_general_merchandise", - "miscellaneous_general_services", - "miscellaneous_home_furnishing_specialty_stores", - "miscellaneous_publishing_and_printing", - "miscellaneous_recreation_services", - "miscellaneous_repair_shops", - "miscellaneous_specialty_retail", - "mobile_home_dealers", - "motion_picture_theaters", - "motor_freight_carriers_and_trucking", - "motor_homes_dealers", - "motor_vehicle_supplies_and_new_parts", - "motorcycle_shops_and_dealers", - "motorcycle_shops_dealers", - "music_stores_musical_instruments_pianos_and_sheet_music", - "news_dealers_and_newsstands", - "non_fi_money_orders", - "non_fi_stored_value_card_purchase_load", - "nondurable_goods", - "nurseries_lawn_and_garden_supply_stores", - "nursing_personal_care", - "office_and_commercial_furniture", - "opticians_eyeglasses", - "optometrists_ophthalmologist", - "orthopedic_goods_prosthetic_devices", - "osteopaths", - "package_stores_beer_wine_and_liquor", - "paints_varnishes_and_supplies", - "parking_lots_garages", - "passenger_railways", - "pawn_shops", - "pet_shops_pet_food_and_supplies", - "petroleum_and_petroleum_products", - "photo_developing", - "photographic_photocopy_microfilm_equipment_and_supplies", - "photographic_studios", - "picture_video_production", - "piece_goods_notions_and_other_dry_goods", - "plumbing_heating_equipment_and_supplies", - "political_organizations", - "postal_services_government_only", - "precious_stones_and_metals_watches_and_jewelry", - "professional_services", - "public_warehousing_and_storage", - "quick_copy_repro_and_blueprint", - "railroads", - "real_estate_agents_and_managers_rentals", - "record_stores", - "recreational_vehicle_rentals", - "religious_goods_stores", - "religious_organizations", - "roofing_siding_sheet_metal", - "secretarial_support_services", - "security_brokers_dealers", - "service_stations", - "sewing_needlework_fabric_and_piece_goods_stores", - "shoe_repair_hat_cleaning", - "shoe_stores", - "small_appliance_repair", - "snowmobile_dealers", - "special_trade_services", - "specialty_cleaning", - "sporting_goods_stores", - "sporting_recreation_camps", - "sports_and_riding_apparel_stores", - "sports_clubs_fields", - "stamp_and_coin_stores", - "stationary_office_supplies_printing_and_writing_paper", - "stationery_stores_office_and_school_supply_stores", - "swimming_pools_sales", - "t_ui_travel_germany", - "tailors_alterations", - "tax_payments_government_agencies", - "tax_preparation_services", - "taxicabs_limousines", - "telecommunication_equipment_and_telephone_sales", - "telecommunication_services", - "telegraph_services", - "tent_and_awning_shops", - "testing_laboratories", - "theatrical_ticket_agencies", - "timeshares", - "tire_retreading_and_repair", - "tolls_bridge_fees", - "tourist_attractions_and_exhibits", - "towing_services", - "trailer_parks_campgrounds", - "transportation_services", - "travel_agencies_tour_operators", - "truck_stop_iteration", - "truck_utility_trailer_rentals", - "typesetting_plate_making_and_related_services", - "typewriter_stores", - "u_s_federal_government_agencies_or_departments", - "uniforms_commercial_clothing", - "used_merchandise_and_secondhand_stores", - "utilities", - "variety_stores", - "veterinary_services", - "video_amusement_game_supplies", - "video_game_arcades", - "video_tape_rental_stores", - "vocational_trade_schools", - "watch_jewelry_repair", - "welding_repair", - "wholesale_clubs", - "wig_and_toupee_stores", - "wires_money_orders", - "womens_accessory_and_specialty_shops", - "womens_ready_to_wear_stores", - "wrecking_and_salvage_yards", - ] - ] - """ - A categorization of the seller's type of business. See our [merchant categories guide](https://stripe.com/docs/issuing/merchant-categories) for a list of possible values. - """ - city: NotRequired[str] - """ - City where the seller is located - """ - country: NotRequired[str] - """ - Country where the seller is located - """ - name: NotRequired[str] - """ - Name of the seller - """ - network_id: NotRequired[str] - """ - Identifier assigned to the seller by the card network. Different card networks may assign different network_id fields to the same merchant. - """ - postal_code: NotRequired[str] - """ - Postal code where the seller is located - """ - state: NotRequired[str] - """ - State where the seller is located - """ - terminal_id: NotRequired[str] - """ - An ID assigned by the seller to the location of the sale. - """ - url: NotRequired[str] - """ - URL provided by the merchant on a 3DS request - """ - - class CreateForceCaptureParamsPurchaseDetails(TypedDict): - fleet: NotRequired[ - "TransactionService.CreateForceCaptureParamsPurchaseDetailsFleet" - ] - """ - Fleet-specific information for transactions using Fleet cards. - """ - flight: NotRequired[ - "TransactionService.CreateForceCaptureParamsPurchaseDetailsFlight" - ] - """ - Information about the flight that was purchased with this transaction. - """ - fuel: NotRequired[ - "TransactionService.CreateForceCaptureParamsPurchaseDetailsFuel" - ] - """ - Information about fuel that was purchased with this transaction. - """ - lodging: NotRequired[ - "TransactionService.CreateForceCaptureParamsPurchaseDetailsLodging" - ] - """ - Information about lodging that was purchased with this transaction. - """ - receipt: NotRequired[ - List[ - "TransactionService.CreateForceCaptureParamsPurchaseDetailsReceipt" - ] - ] - """ - The line items in the purchase. - """ - reference: NotRequired[str] - """ - A merchant-specific order number. - """ - - class CreateForceCaptureParamsPurchaseDetailsFleet(TypedDict): - cardholder_prompt_data: NotRequired[ - "TransactionService.CreateForceCaptureParamsPurchaseDetailsFleetCardholderPromptData" - ] - """ - Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry. - """ - purchase_type: NotRequired[ - Literal[ - "fuel_and_non_fuel_purchase", - "fuel_purchase", - "non_fuel_purchase", - ] - ] - """ - The type of purchase. One of `fuel_purchase`, `non_fuel_purchase`, or `fuel_and_non_fuel_purchase`. - """ - reported_breakdown: NotRequired[ - "TransactionService.CreateForceCaptureParamsPurchaseDetailsFleetReportedBreakdown" - ] - """ - More information about the total amount. This information is not guaranteed to be accurate as some merchants may provide unreliable data. - """ - service_type: NotRequired[ - Literal["full_service", "non_fuel_transaction", "self_service"] - ] - """ - The type of fuel service. One of `non_fuel_transaction`, `full_service`, or `self_service`. - """ - - class CreateForceCaptureParamsPurchaseDetailsFleetCardholderPromptData( - TypedDict, - ): - driver_id: NotRequired[str] - """ - Driver ID. - """ - odometer: NotRequired[int] - """ - Odometer reading. - """ - unspecified_id: NotRequired[str] - """ - An alphanumeric ID. This field is used when a vehicle ID, driver ID, or generic ID is entered by the cardholder, but the merchant or card network did not specify the prompt type. - """ - user_id: NotRequired[str] - """ - User ID. - """ - vehicle_number: NotRequired[str] - """ - Vehicle number. - """ - - class CreateForceCaptureParamsPurchaseDetailsFleetReportedBreakdown( - TypedDict, - ): - fuel: NotRequired[ - "TransactionService.CreateForceCaptureParamsPurchaseDetailsFleetReportedBreakdownFuel" - ] - """ - Breakdown of fuel portion of the purchase. - """ - non_fuel: NotRequired[ - "TransactionService.CreateForceCaptureParamsPurchaseDetailsFleetReportedBreakdownNonFuel" - ] - """ - Breakdown of non-fuel portion of the purchase. - """ - tax: NotRequired[ - "TransactionService.CreateForceCaptureParamsPurchaseDetailsFleetReportedBreakdownTax" - ] - """ - Information about tax included in this transaction. - """ - - class CreateForceCaptureParamsPurchaseDetailsFleetReportedBreakdownFuel( - TypedDict, - ): - gross_amount_decimal: NotRequired[str] - """ - Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive of taxes. - """ - - class CreateForceCaptureParamsPurchaseDetailsFleetReportedBreakdownNonFuel( - TypedDict, - ): - gross_amount_decimal: NotRequired[str] - """ - Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes. - """ - - class CreateForceCaptureParamsPurchaseDetailsFleetReportedBreakdownTax( - TypedDict, - ): - local_amount_decimal: NotRequired[str] - """ - Amount of state or provincial Sales Tax included in the transaction amount. Null if not reported by merchant or not subject to tax. - """ - national_amount_decimal: NotRequired[str] - """ - Amount of national Sales Tax or VAT included in the transaction amount. Null if not reported by merchant or not subject to tax. - """ - - class CreateForceCaptureParamsPurchaseDetailsFlight(TypedDict): - departure_at: NotRequired[int] - """ - The time that the flight departed. - """ - passenger_name: NotRequired[str] - """ - The name of the passenger. - """ - refundable: NotRequired[bool] - """ - Whether the ticket is refundable. - """ - segments: NotRequired[ - List[ - "TransactionService.CreateForceCaptureParamsPurchaseDetailsFlightSegment" - ] - ] - """ - The legs of the trip. - """ - travel_agency: NotRequired[str] - """ - The travel agency that issued the ticket. - """ - - class CreateForceCaptureParamsPurchaseDetailsFlightSegment(TypedDict): - arrival_airport_code: NotRequired[str] - """ - The three-letter IATA airport code of the flight's destination. - """ - carrier: NotRequired[str] - """ - The airline carrier code. - """ - departure_airport_code: NotRequired[str] - """ - The three-letter IATA airport code that the flight departed from. - """ - flight_number: NotRequired[str] - """ - The flight number. - """ - service_class: NotRequired[str] - """ - The flight's service class. - """ - stopover_allowed: NotRequired[bool] - """ - Whether a stopover is allowed on this flight. - """ - - class CreateForceCaptureParamsPurchaseDetailsFuel(TypedDict): - industry_product_code: NotRequired[str] - """ - [Conexxus Payment System Product Code](https://www.conexxus.org/conexxus-payment-system-product-codes) identifying the primary fuel product purchased. - """ - quantity_decimal: NotRequired[str] - """ - The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places. - """ - type: NotRequired[ - Literal[ - "diesel", - "other", - "unleaded_plus", - "unleaded_regular", - "unleaded_super", - ] - ] - """ - The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`. - """ - unit: NotRequired[ - Literal[ - "charging_minute", - "imperial_gallon", - "kilogram", - "kilowatt_hour", - "liter", - "other", - "pound", - "us_gallon", - ] - ] - """ - The units for `quantity_decimal`. One of `charging_minute`, `imperial_gallon`, `kilogram`, `kilowatt_hour`, `liter`, `pound`, `us_gallon`, or `other`. - """ - unit_cost_decimal: NotRequired[str] - """ - The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places. - """ - - class CreateForceCaptureParamsPurchaseDetailsLodging(TypedDict): - check_in_at: NotRequired[int] - """ - The time of checking into the lodging. - """ - nights: NotRequired[int] - """ - The number of nights stayed at the lodging. - """ - - class CreateForceCaptureParamsPurchaseDetailsReceipt(TypedDict): - description: NotRequired[str] - quantity: NotRequired[str] - total: NotRequired[int] - unit_cost: NotRequired[int] - - class CreateUnlinkedRefundParams(TypedDict): - amount: int - """ - The total amount to attempt to refund. This amount is in the provided currency, or defaults to the cards currency, and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). - """ - card: str - """ - Card associated with this unlinked refund transaction. - """ - currency: NotRequired[str] - """ - The currency of the unlinked refund. If not provided, defaults to the currency of the card. 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. - """ - merchant_data: NotRequired[ - "TransactionService.CreateUnlinkedRefundParamsMerchantData" - ] - """ - Details about the seller (grocery store, e-commerce website, etc.) where the card authorization happened. - """ - purchase_details: NotRequired[ - "TransactionService.CreateUnlinkedRefundParamsPurchaseDetails" - ] - """ - Additional purchase information that is optionally provided by the merchant. - """ - - class CreateUnlinkedRefundParamsMerchantData(TypedDict): - category: NotRequired[ - Literal[ - "ac_refrigeration_repair", - "accounting_bookkeeping_services", - "advertising_services", - "agricultural_cooperative", - "airlines_air_carriers", - "airports_flying_fields", - "ambulance_services", - "amusement_parks_carnivals", - "antique_reproductions", - "antique_shops", - "aquariums", - "architectural_surveying_services", - "art_dealers_and_galleries", - "artists_supply_and_craft_shops", - "auto_and_home_supply_stores", - "auto_body_repair_shops", - "auto_paint_shops", - "auto_service_shops", - "automated_cash_disburse", - "automated_fuel_dispensers", - "automobile_associations", - "automotive_parts_and_accessories_stores", - "automotive_tire_stores", - "bail_and_bond_payments", - "bakeries", - "bands_orchestras", - "barber_and_beauty_shops", - "betting_casino_gambling", - "bicycle_shops", - "billiard_pool_establishments", - "boat_dealers", - "boat_rentals_and_leases", - "book_stores", - "books_periodicals_and_newspapers", - "bowling_alleys", - "bus_lines", - "business_secretarial_schools", - "buying_shopping_services", - "cable_satellite_and_other_pay_television_and_radio", - "camera_and_photographic_supply_stores", - "candy_nut_and_confectionery_stores", - "car_and_truck_dealers_new_used", - "car_and_truck_dealers_used_only", - "car_rental_agencies", - "car_washes", - "carpentry_services", - "carpet_upholstery_cleaning", - "caterers", - "charitable_and_social_service_organizations_fundraising", - "chemicals_and_allied_products", - "child_care_services", - "childrens_and_infants_wear_stores", - "chiropodists_podiatrists", - "chiropractors", - "cigar_stores_and_stands", - "civic_social_fraternal_associations", - "cleaning_and_maintenance", - "clothing_rental", - "colleges_universities", - "commercial_equipment", - "commercial_footwear", - "commercial_photography_art_and_graphics", - "commuter_transport_and_ferries", - "computer_network_services", - "computer_programming", - "computer_repair", - "computer_software_stores", - "computers_peripherals_and_software", - "concrete_work_services", - "construction_materials", - "consulting_public_relations", - "correspondence_schools", - "cosmetic_stores", - "counseling_services", - "country_clubs", - "courier_services", - "court_costs", - "credit_reporting_agencies", - "cruise_lines", - "dairy_products_stores", - "dance_hall_studios_schools", - "dating_escort_services", - "dentists_orthodontists", - "department_stores", - "detective_agencies", - "digital_goods_applications", - "digital_goods_games", - "digital_goods_large_volume", - "digital_goods_media", - "direct_marketing_catalog_merchant", - "direct_marketing_combination_catalog_and_retail_merchant", - "direct_marketing_inbound_telemarketing", - "direct_marketing_insurance_services", - "direct_marketing_other", - "direct_marketing_outbound_telemarketing", - "direct_marketing_subscription", - "direct_marketing_travel", - "discount_stores", - "doctors", - "door_to_door_sales", - "drapery_window_covering_and_upholstery_stores", - "drinking_places", - "drug_stores_and_pharmacies", - "drugs_drug_proprietaries_and_druggist_sundries", - "dry_cleaners", - "durable_goods", - "duty_free_stores", - "eating_places_restaurants", - "educational_services", - "electric_razor_stores", - "electric_vehicle_charging", - "electrical_parts_and_equipment", - "electrical_services", - "electronics_repair_shops", - "electronics_stores", - "elementary_secondary_schools", - "emergency_services_gcas_visa_use_only", - "employment_temp_agencies", - "equipment_rental", - "exterminating_services", - "family_clothing_stores", - "fast_food_restaurants", - "financial_institutions", - "fines_government_administrative_entities", - "fireplace_fireplace_screens_and_accessories_stores", - "floor_covering_stores", - "florists", - "florists_supplies_nursery_stock_and_flowers", - "freezer_and_locker_meat_provisioners", - "fuel_dealers_non_automotive", - "funeral_services_crematories", - "furniture_home_furnishings_and_equipment_stores_except_appliances", - "furniture_repair_refinishing", - "furriers_and_fur_shops", - "general_services", - "gift_card_novelty_and_souvenir_shops", - "glass_paint_and_wallpaper_stores", - "glassware_crystal_stores", - "golf_courses_public", - "government_licensed_horse_dog_racing_us_region_only", - "government_licensed_online_casions_online_gambling_us_region_only", - "government_owned_lotteries_non_us_region", - "government_owned_lotteries_us_region_only", - "government_services", - "grocery_stores_supermarkets", - "hardware_equipment_and_supplies", - "hardware_stores", - "health_and_beauty_spas", - "hearing_aids_sales_and_supplies", - "heating_plumbing_a_c", - "hobby_toy_and_game_shops", - "home_supply_warehouse_stores", - "hospitals", - "hotels_motels_and_resorts", - "household_appliance_stores", - "industrial_supplies", - "information_retrieval_services", - "insurance_default", - "insurance_underwriting_premiums", - "intra_company_purchases", - "jewelry_stores_watches_clocks_and_silverware_stores", - "landscaping_services", - "laundries", - "laundry_cleaning_services", - "legal_services_attorneys", - "luggage_and_leather_goods_stores", - "lumber_building_materials_stores", - "manual_cash_disburse", - "marinas_service_and_supplies", - "marketplaces", - "masonry_stonework_and_plaster", - "massage_parlors", - "medical_and_dental_labs", - "medical_dental_ophthalmic_and_hospital_equipment_and_supplies", - "medical_services", - "membership_organizations", - "mens_and_boys_clothing_and_accessories_stores", - "mens_womens_clothing_stores", - "metal_service_centers", - "miscellaneous_apparel_and_accessory_shops", - "miscellaneous_auto_dealers", - "miscellaneous_business_services", - "miscellaneous_food_stores", - "miscellaneous_general_merchandise", - "miscellaneous_general_services", - "miscellaneous_home_furnishing_specialty_stores", - "miscellaneous_publishing_and_printing", - "miscellaneous_recreation_services", - "miscellaneous_repair_shops", - "miscellaneous_specialty_retail", - "mobile_home_dealers", - "motion_picture_theaters", - "motor_freight_carriers_and_trucking", - "motor_homes_dealers", - "motor_vehicle_supplies_and_new_parts", - "motorcycle_shops_and_dealers", - "motorcycle_shops_dealers", - "music_stores_musical_instruments_pianos_and_sheet_music", - "news_dealers_and_newsstands", - "non_fi_money_orders", - "non_fi_stored_value_card_purchase_load", - "nondurable_goods", - "nurseries_lawn_and_garden_supply_stores", - "nursing_personal_care", - "office_and_commercial_furniture", - "opticians_eyeglasses", - "optometrists_ophthalmologist", - "orthopedic_goods_prosthetic_devices", - "osteopaths", - "package_stores_beer_wine_and_liquor", - "paints_varnishes_and_supplies", - "parking_lots_garages", - "passenger_railways", - "pawn_shops", - "pet_shops_pet_food_and_supplies", - "petroleum_and_petroleum_products", - "photo_developing", - "photographic_photocopy_microfilm_equipment_and_supplies", - "photographic_studios", - "picture_video_production", - "piece_goods_notions_and_other_dry_goods", - "plumbing_heating_equipment_and_supplies", - "political_organizations", - "postal_services_government_only", - "precious_stones_and_metals_watches_and_jewelry", - "professional_services", - "public_warehousing_and_storage", - "quick_copy_repro_and_blueprint", - "railroads", - "real_estate_agents_and_managers_rentals", - "record_stores", - "recreational_vehicle_rentals", - "religious_goods_stores", - "religious_organizations", - "roofing_siding_sheet_metal", - "secretarial_support_services", - "security_brokers_dealers", - "service_stations", - "sewing_needlework_fabric_and_piece_goods_stores", - "shoe_repair_hat_cleaning", - "shoe_stores", - "small_appliance_repair", - "snowmobile_dealers", - "special_trade_services", - "specialty_cleaning", - "sporting_goods_stores", - "sporting_recreation_camps", - "sports_and_riding_apparel_stores", - "sports_clubs_fields", - "stamp_and_coin_stores", - "stationary_office_supplies_printing_and_writing_paper", - "stationery_stores_office_and_school_supply_stores", - "swimming_pools_sales", - "t_ui_travel_germany", - "tailors_alterations", - "tax_payments_government_agencies", - "tax_preparation_services", - "taxicabs_limousines", - "telecommunication_equipment_and_telephone_sales", - "telecommunication_services", - "telegraph_services", - "tent_and_awning_shops", - "testing_laboratories", - "theatrical_ticket_agencies", - "timeshares", - "tire_retreading_and_repair", - "tolls_bridge_fees", - "tourist_attractions_and_exhibits", - "towing_services", - "trailer_parks_campgrounds", - "transportation_services", - "travel_agencies_tour_operators", - "truck_stop_iteration", - "truck_utility_trailer_rentals", - "typesetting_plate_making_and_related_services", - "typewriter_stores", - "u_s_federal_government_agencies_or_departments", - "uniforms_commercial_clothing", - "used_merchandise_and_secondhand_stores", - "utilities", - "variety_stores", - "veterinary_services", - "video_amusement_game_supplies", - "video_game_arcades", - "video_tape_rental_stores", - "vocational_trade_schools", - "watch_jewelry_repair", - "welding_repair", - "wholesale_clubs", - "wig_and_toupee_stores", - "wires_money_orders", - "womens_accessory_and_specialty_shops", - "womens_ready_to_wear_stores", - "wrecking_and_salvage_yards", - ] - ] - """ - A categorization of the seller's type of business. See our [merchant categories guide](https://stripe.com/docs/issuing/merchant-categories) for a list of possible values. - """ - city: NotRequired[str] - """ - City where the seller is located - """ - country: NotRequired[str] - """ - Country where the seller is located - """ - name: NotRequired[str] - """ - Name of the seller - """ - network_id: NotRequired[str] - """ - Identifier assigned to the seller by the card network. Different card networks may assign different network_id fields to the same merchant. - """ - postal_code: NotRequired[str] - """ - Postal code where the seller is located - """ - state: NotRequired[str] - """ - State where the seller is located - """ - terminal_id: NotRequired[str] - """ - An ID assigned by the seller to the location of the sale. - """ - url: NotRequired[str] - """ - URL provided by the merchant on a 3DS request - """ - - class CreateUnlinkedRefundParamsPurchaseDetails(TypedDict): - fleet: NotRequired[ - "TransactionService.CreateUnlinkedRefundParamsPurchaseDetailsFleet" - ] - """ - Fleet-specific information for transactions using Fleet cards. - """ - flight: NotRequired[ - "TransactionService.CreateUnlinkedRefundParamsPurchaseDetailsFlight" - ] - """ - Information about the flight that was purchased with this transaction. - """ - fuel: NotRequired[ - "TransactionService.CreateUnlinkedRefundParamsPurchaseDetailsFuel" - ] - """ - Information about fuel that was purchased with this transaction. - """ - lodging: NotRequired[ - "TransactionService.CreateUnlinkedRefundParamsPurchaseDetailsLodging" - ] - """ - Information about lodging that was purchased with this transaction. - """ - receipt: NotRequired[ - List[ - "TransactionService.CreateUnlinkedRefundParamsPurchaseDetailsReceipt" - ] - ] - """ - The line items in the purchase. - """ - reference: NotRequired[str] - """ - A merchant-specific order number. - """ - - class CreateUnlinkedRefundParamsPurchaseDetailsFleet(TypedDict): - cardholder_prompt_data: NotRequired[ - "TransactionService.CreateUnlinkedRefundParamsPurchaseDetailsFleetCardholderPromptData" - ] - """ - Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry. - """ - purchase_type: NotRequired[ - Literal[ - "fuel_and_non_fuel_purchase", - "fuel_purchase", - "non_fuel_purchase", - ] - ] - """ - The type of purchase. One of `fuel_purchase`, `non_fuel_purchase`, or `fuel_and_non_fuel_purchase`. - """ - reported_breakdown: NotRequired[ - "TransactionService.CreateUnlinkedRefundParamsPurchaseDetailsFleetReportedBreakdown" - ] - """ - More information about the total amount. This information is not guaranteed to be accurate as some merchants may provide unreliable data. - """ - service_type: NotRequired[ - Literal["full_service", "non_fuel_transaction", "self_service"] - ] - """ - The type of fuel service. One of `non_fuel_transaction`, `full_service`, or `self_service`. - """ - - class CreateUnlinkedRefundParamsPurchaseDetailsFleetCardholderPromptData( - TypedDict, - ): - driver_id: NotRequired[str] - """ - Driver ID. - """ - odometer: NotRequired[int] - """ - Odometer reading. - """ - unspecified_id: NotRequired[str] - """ - An alphanumeric ID. This field is used when a vehicle ID, driver ID, or generic ID is entered by the cardholder, but the merchant or card network did not specify the prompt type. - """ - user_id: NotRequired[str] - """ - User ID. - """ - vehicle_number: NotRequired[str] - """ - Vehicle number. - """ - - class CreateUnlinkedRefundParamsPurchaseDetailsFleetReportedBreakdown( - TypedDict, - ): - fuel: NotRequired[ - "TransactionService.CreateUnlinkedRefundParamsPurchaseDetailsFleetReportedBreakdownFuel" - ] - """ - Breakdown of fuel portion of the purchase. - """ - non_fuel: NotRequired[ - "TransactionService.CreateUnlinkedRefundParamsPurchaseDetailsFleetReportedBreakdownNonFuel" - ] - """ - Breakdown of non-fuel portion of the purchase. - """ - tax: NotRequired[ - "TransactionService.CreateUnlinkedRefundParamsPurchaseDetailsFleetReportedBreakdownTax" - ] - """ - Information about tax included in this transaction. - """ - - class CreateUnlinkedRefundParamsPurchaseDetailsFleetReportedBreakdownFuel( - TypedDict, - ): - gross_amount_decimal: NotRequired[str] - """ - Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive of taxes. - """ - - class CreateUnlinkedRefundParamsPurchaseDetailsFleetReportedBreakdownNonFuel( - TypedDict, - ): - gross_amount_decimal: NotRequired[str] - """ - Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes. - """ - - class CreateUnlinkedRefundParamsPurchaseDetailsFleetReportedBreakdownTax( - TypedDict, - ): - local_amount_decimal: NotRequired[str] - """ - Amount of state or provincial Sales Tax included in the transaction amount. Null if not reported by merchant or not subject to tax. - """ - national_amount_decimal: NotRequired[str] - """ - Amount of national Sales Tax or VAT included in the transaction amount. Null if not reported by merchant or not subject to tax. - """ - - class CreateUnlinkedRefundParamsPurchaseDetailsFlight(TypedDict): - departure_at: NotRequired[int] - """ - The time that the flight departed. - """ - passenger_name: NotRequired[str] - """ - The name of the passenger. - """ - refundable: NotRequired[bool] - """ - Whether the ticket is refundable. - """ - segments: NotRequired[ - List[ - "TransactionService.CreateUnlinkedRefundParamsPurchaseDetailsFlightSegment" - ] - ] - """ - The legs of the trip. - """ - travel_agency: NotRequired[str] - """ - The travel agency that issued the ticket. - """ - - class CreateUnlinkedRefundParamsPurchaseDetailsFlightSegment(TypedDict): - arrival_airport_code: NotRequired[str] - """ - The three-letter IATA airport code of the flight's destination. - """ - carrier: NotRequired[str] - """ - The airline carrier code. - """ - departure_airport_code: NotRequired[str] - """ - The three-letter IATA airport code that the flight departed from. - """ - flight_number: NotRequired[str] - """ - The flight number. - """ - service_class: NotRequired[str] - """ - The flight's service class. - """ - stopover_allowed: NotRequired[bool] - """ - Whether a stopover is allowed on this flight. - """ - - class CreateUnlinkedRefundParamsPurchaseDetailsFuel(TypedDict): - industry_product_code: NotRequired[str] - """ - [Conexxus Payment System Product Code](https://www.conexxus.org/conexxus-payment-system-product-codes) identifying the primary fuel product purchased. - """ - quantity_decimal: NotRequired[str] - """ - The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places. - """ - type: NotRequired[ - Literal[ - "diesel", - "other", - "unleaded_plus", - "unleaded_regular", - "unleaded_super", - ] - ] - """ - The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`. - """ - unit: NotRequired[ - Literal[ - "charging_minute", - "imperial_gallon", - "kilogram", - "kilowatt_hour", - "liter", - "other", - "pound", - "us_gallon", - ] - ] - """ - The units for `quantity_decimal`. One of `charging_minute`, `imperial_gallon`, `kilogram`, `kilowatt_hour`, `liter`, `pound`, `us_gallon`, or `other`. - """ - unit_cost_decimal: NotRequired[str] - """ - The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places. - """ - - class CreateUnlinkedRefundParamsPurchaseDetailsLodging(TypedDict): - check_in_at: NotRequired[int] - """ - The time of checking into the lodging. - """ - nights: NotRequired[int] - """ - The number of nights stayed at the lodging. - """ - - class CreateUnlinkedRefundParamsPurchaseDetailsReceipt(TypedDict): - description: NotRequired[str] - quantity: NotRequired[str] - total: NotRequired[int] - unit_cost: NotRequired[int] - - class RefundParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - refund_amount: NotRequired[int] - """ - The total amount to attempt to refund. This amount is in the provided currency, or defaults to the cards currency, and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). - """ +class TransactionService(StripeService): def refund( self, transaction: str, - params: Optional["TransactionService.RefundParams"] = None, + params: Optional["TransactionRefundParams"] = None, options: Optional[RequestOptions] = None, ) -> Transaction: """ @@ -1276,7 +45,7 @@ def refund( async def refund_async( self, transaction: str, - params: Optional["TransactionService.RefundParams"] = None, + params: Optional["TransactionRefundParams"] = None, options: Optional[RequestOptions] = None, ) -> Transaction: """ @@ -1297,7 +66,7 @@ async def refund_async( def create_force_capture( self, - params: "TransactionService.CreateForceCaptureParams", + params: "TransactionCreateForceCaptureParams", options: Optional[RequestOptions] = None, ) -> Transaction: """ @@ -1316,7 +85,7 @@ def create_force_capture( async def create_force_capture_async( self, - params: "TransactionService.CreateForceCaptureParams", + params: "TransactionCreateForceCaptureParams", options: Optional[RequestOptions] = None, ) -> Transaction: """ @@ -1335,7 +104,7 @@ async def create_force_capture_async( def create_unlinked_refund( self, - params: "TransactionService.CreateUnlinkedRefundParams", + params: "TransactionCreateUnlinkedRefundParams", options: Optional[RequestOptions] = None, ) -> Transaction: """ @@ -1354,7 +123,7 @@ def create_unlinked_refund( async def create_unlinked_refund_async( self, - params: "TransactionService.CreateUnlinkedRefundParams", + params: "TransactionCreateUnlinkedRefundParams", options: Optional[RequestOptions] = None, ) -> Transaction: """ diff --git a/stripe/test_helpers/terminal/_reader_service.py b/stripe/test_helpers/terminal/_reader_service.py index 03eace73a..ac9ed1734 100644 --- a/stripe/test_helpers/terminal/_reader_service.py +++ b/stripe/test_helpers/terminal/_reader_service.py @@ -4,91 +4,26 @@ from stripe._stripe_service import StripeService from stripe._util import sanitize_id from stripe.terminal._reader import Reader -from typing import List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params.test_helpers.terminal._reader_present_payment_method_params import ( + ReaderPresentPaymentMethodParams, + ) + from stripe.params.test_helpers.terminal._reader_succeed_input_collection_params import ( + ReaderSucceedInputCollectionParams, + ) + from stripe.params.test_helpers.terminal._reader_timeout_input_collection_params import ( + ReaderTimeoutInputCollectionParams, + ) -class ReaderService(StripeService): - class PresentPaymentMethodParams(TypedDict): - amount_tip: NotRequired[int] - """ - Simulated on-reader tip amount. - """ - card: NotRequired["ReaderService.PresentPaymentMethodParamsCard"] - """ - Simulated data for the card payment method. - """ - card_present: NotRequired[ - "ReaderService.PresentPaymentMethodParamsCardPresent" - ] - """ - Simulated data for the card_present payment method. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - interac_present: NotRequired[ - "ReaderService.PresentPaymentMethodParamsInteracPresent" - ] - """ - Simulated data for the interac_present payment method. - """ - type: NotRequired[Literal["card", "card_present", "interac_present"]] - """ - Simulated payment type. - """ - - class PresentPaymentMethodParamsCard(TypedDict): - cvc: NotRequired[str] - """ - Card security code. - """ - exp_month: int - """ - Two-digit number representing the card's expiration month. - """ - exp_year: int - """ - Two- or four-digit number representing the card's expiration year. - """ - number: str - """ - The card number, as a string without any separators. - """ - - class PresentPaymentMethodParamsCardPresent(TypedDict): - number: NotRequired[str] - """ - The card number, as a string without any separators. - """ - - class PresentPaymentMethodParamsInteracPresent(TypedDict): - number: NotRequired[str] - """ - Card Number - """ - - class SucceedInputCollectionParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - skip_non_required_inputs: NotRequired[Literal["all", "none"]] - """ - This parameter defines the skip behavior for input collection. - """ - - class TimeoutInputCollectionParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ +class ReaderService(StripeService): def present_payment_method( self, reader: str, - params: Optional["ReaderService.PresentPaymentMethodParams"] = None, + params: Optional["ReaderPresentPaymentMethodParams"] = None, options: Optional[RequestOptions] = None, ) -> Reader: """ @@ -110,7 +45,7 @@ def present_payment_method( async def present_payment_method_async( self, reader: str, - params: Optional["ReaderService.PresentPaymentMethodParams"] = None, + params: Optional["ReaderPresentPaymentMethodParams"] = None, options: Optional[RequestOptions] = None, ) -> Reader: """ @@ -132,7 +67,7 @@ async def present_payment_method_async( def succeed_input_collection( self, reader: str, - params: Optional["ReaderService.SucceedInputCollectionParams"] = None, + params: Optional["ReaderSucceedInputCollectionParams"] = None, options: Optional[RequestOptions] = None, ) -> Reader: """ @@ -154,7 +89,7 @@ def succeed_input_collection( async def succeed_input_collection_async( self, reader: str, - params: Optional["ReaderService.SucceedInputCollectionParams"] = None, + params: Optional["ReaderSucceedInputCollectionParams"] = None, options: Optional[RequestOptions] = None, ) -> Reader: """ @@ -176,7 +111,7 @@ async def succeed_input_collection_async( def timeout_input_collection( self, reader: str, - params: Optional["ReaderService.TimeoutInputCollectionParams"] = None, + params: Optional["ReaderTimeoutInputCollectionParams"] = None, options: Optional[RequestOptions] = None, ) -> Reader: """ @@ -198,7 +133,7 @@ def timeout_input_collection( async def timeout_input_collection_async( self, reader: str, - params: Optional["ReaderService.TimeoutInputCollectionParams"] = None, + params: Optional["ReaderTimeoutInputCollectionParams"] = None, options: Optional[RequestOptions] = None, ) -> Reader: """ diff --git a/stripe/test_helpers/treasury/_inbound_transfer_service.py b/stripe/test_helpers/treasury/_inbound_transfer_service.py index f3b343b2a..fc4bbd8fc 100644 --- a/stripe/test_helpers/treasury/_inbound_transfer_service.py +++ b/stripe/test_helpers/treasury/_inbound_transfer_service.py @@ -4,61 +4,26 @@ from stripe._stripe_service import StripeService from stripe._util import sanitize_id from stripe.treasury._inbound_transfer import InboundTransfer -from typing import List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params.test_helpers.treasury._inbound_transfer_fail_params import ( + InboundTransferFailParams, + ) + from stripe.params.test_helpers.treasury._inbound_transfer_return_inbound_transfer_params import ( + InboundTransferReturnInboundTransferParams, + ) + from stripe.params.test_helpers.treasury._inbound_transfer_succeed_params import ( + InboundTransferSucceedParams, + ) -class InboundTransferService(StripeService): - class FailParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - failure_details: NotRequired[ - "InboundTransferService.FailParamsFailureDetails" - ] - """ - Details about a failed InboundTransfer. - """ - - class FailParamsFailureDetails(TypedDict): - code: NotRequired[ - Literal[ - "account_closed", - "account_frozen", - "bank_account_restricted", - "bank_ownership_changed", - "debit_not_authorized", - "incorrect_account_holder_address", - "incorrect_account_holder_name", - "incorrect_account_holder_tax_id", - "insufficient_funds", - "invalid_account_number", - "invalid_currency", - "no_account", - "other", - ] - ] - """ - Reason for the failure. - """ - - class ReturnInboundTransferParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class SucceedParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ +class InboundTransferService(StripeService): def fail( self, id: str, - params: Optional["InboundTransferService.FailParams"] = None, + params: Optional["InboundTransferFailParams"] = None, options: Optional[RequestOptions] = None, ) -> InboundTransfer: """ @@ -80,7 +45,7 @@ def fail( async def fail_async( self, id: str, - params: Optional["InboundTransferService.FailParams"] = None, + params: Optional["InboundTransferFailParams"] = None, options: Optional[RequestOptions] = None, ) -> InboundTransfer: """ @@ -102,9 +67,7 @@ async def fail_async( def return_inbound_transfer( self, id: str, - params: Optional[ - "InboundTransferService.ReturnInboundTransferParams" - ] = None, + params: Optional["InboundTransferReturnInboundTransferParams"] = None, options: Optional[RequestOptions] = None, ) -> InboundTransfer: """ @@ -126,9 +89,7 @@ def return_inbound_transfer( async def return_inbound_transfer_async( self, id: str, - params: Optional[ - "InboundTransferService.ReturnInboundTransferParams" - ] = None, + params: Optional["InboundTransferReturnInboundTransferParams"] = None, options: Optional[RequestOptions] = None, ) -> InboundTransfer: """ @@ -150,7 +111,7 @@ async def return_inbound_transfer_async( def succeed( self, id: str, - params: Optional["InboundTransferService.SucceedParams"] = None, + params: Optional["InboundTransferSucceedParams"] = None, options: Optional[RequestOptions] = None, ) -> InboundTransfer: """ @@ -172,7 +133,7 @@ def succeed( async def succeed_async( self, id: str, - params: Optional["InboundTransferService.SucceedParams"] = None, + params: Optional["InboundTransferSucceedParams"] = None, options: Optional[RequestOptions] = None, ) -> InboundTransfer: """ diff --git a/stripe/test_helpers/treasury/_outbound_payment_service.py b/stripe/test_helpers/treasury/_outbound_payment_service.py index e60f567ee..08220c5d8 100644 --- a/stripe/test_helpers/treasury/_outbound_payment_service.py +++ b/stripe/test_helpers/treasury/_outbound_payment_service.py @@ -4,106 +4,29 @@ from stripe._stripe_service import StripeService from stripe._util import sanitize_id from stripe.treasury._outbound_payment import OutboundPayment -from typing import List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params.test_helpers.treasury._outbound_payment_fail_params import ( + OutboundPaymentFailParams, + ) + from stripe.params.test_helpers.treasury._outbound_payment_post_params import ( + OutboundPaymentPostParams, + ) + from stripe.params.test_helpers.treasury._outbound_payment_return_outbound_payment_params import ( + OutboundPaymentReturnOutboundPaymentParams, + ) + from stripe.params.test_helpers.treasury._outbound_payment_update_params import ( + OutboundPaymentUpdateParams, + ) class OutboundPaymentService(StripeService): - class FailParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class PostParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class ReturnOutboundPaymentParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - returned_details: NotRequired[ - "OutboundPaymentService.ReturnOutboundPaymentParamsReturnedDetails" - ] - """ - Optional hash to set the return code. - """ - - class ReturnOutboundPaymentParamsReturnedDetails(TypedDict): - code: NotRequired[ - Literal[ - "account_closed", - "account_frozen", - "bank_account_restricted", - "bank_ownership_changed", - "declined", - "incorrect_account_holder_name", - "invalid_account_number", - "invalid_currency", - "no_account", - "other", - ] - ] - """ - The return code to be set on the OutboundPayment object. - """ - - class UpdateParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - tracking_details: "OutboundPaymentService.UpdateParamsTrackingDetails" - """ - Details about network-specific tracking information. - """ - - class UpdateParamsTrackingDetails(TypedDict): - ach: NotRequired[ - "OutboundPaymentService.UpdateParamsTrackingDetailsAch" - ] - """ - ACH network tracking details. - """ - type: Literal["ach", "us_domestic_wire"] - """ - The US bank account network used to send funds. - """ - us_domestic_wire: NotRequired[ - "OutboundPaymentService.UpdateParamsTrackingDetailsUsDomesticWire" - ] - """ - US domestic wire network tracking details. - """ - - class UpdateParamsTrackingDetailsAch(TypedDict): - trace_id: str - """ - ACH trace ID for funds sent over the `ach` network. - """ - - class UpdateParamsTrackingDetailsUsDomesticWire(TypedDict): - chips: NotRequired[str] - """ - CHIPS System Sequence Number (SSN) for funds sent over the `us_domestic_wire` network. - """ - imad: NotRequired[str] - """ - IMAD for funds sent over the `us_domestic_wire` network. - """ - omad: NotRequired[str] - """ - OMAD for funds sent over the `us_domestic_wire` network. - """ - def update( self, id: str, - params: "OutboundPaymentService.UpdateParams", + params: "OutboundPaymentUpdateParams", options: Optional[RequestOptions] = None, ) -> OutboundPayment: """ @@ -125,7 +48,7 @@ def update( async def update_async( self, id: str, - params: "OutboundPaymentService.UpdateParams", + params: "OutboundPaymentUpdateParams", options: Optional[RequestOptions] = None, ) -> OutboundPayment: """ @@ -147,7 +70,7 @@ async def update_async( def fail( self, id: str, - params: Optional["OutboundPaymentService.FailParams"] = None, + params: Optional["OutboundPaymentFailParams"] = None, options: Optional[RequestOptions] = None, ) -> OutboundPayment: """ @@ -169,7 +92,7 @@ def fail( async def fail_async( self, id: str, - params: Optional["OutboundPaymentService.FailParams"] = None, + params: Optional["OutboundPaymentFailParams"] = None, options: Optional[RequestOptions] = None, ) -> OutboundPayment: """ @@ -191,7 +114,7 @@ async def fail_async( def post( self, id: str, - params: Optional["OutboundPaymentService.PostParams"] = None, + params: Optional["OutboundPaymentPostParams"] = None, options: Optional[RequestOptions] = None, ) -> OutboundPayment: """ @@ -213,7 +136,7 @@ def post( async def post_async( self, id: str, - params: Optional["OutboundPaymentService.PostParams"] = None, + params: Optional["OutboundPaymentPostParams"] = None, options: Optional[RequestOptions] = None, ) -> OutboundPayment: """ @@ -235,9 +158,7 @@ async def post_async( def return_outbound_payment( self, id: str, - params: Optional[ - "OutboundPaymentService.ReturnOutboundPaymentParams" - ] = None, + params: Optional["OutboundPaymentReturnOutboundPaymentParams"] = None, options: Optional[RequestOptions] = None, ) -> OutboundPayment: """ @@ -259,9 +180,7 @@ def return_outbound_payment( async def return_outbound_payment_async( self, id: str, - params: Optional[ - "OutboundPaymentService.ReturnOutboundPaymentParams" - ] = None, + params: Optional["OutboundPaymentReturnOutboundPaymentParams"] = None, options: Optional[RequestOptions] = None, ) -> OutboundPayment: """ diff --git a/stripe/test_helpers/treasury/_outbound_transfer_service.py b/stripe/test_helpers/treasury/_outbound_transfer_service.py index d47a78c4e..6c1f1c9f7 100644 --- a/stripe/test_helpers/treasury/_outbound_transfer_service.py +++ b/stripe/test_helpers/treasury/_outbound_transfer_service.py @@ -4,106 +4,29 @@ from stripe._stripe_service import StripeService from stripe._util import sanitize_id from stripe.treasury._outbound_transfer import OutboundTransfer -from typing import List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params.test_helpers.treasury._outbound_transfer_fail_params import ( + OutboundTransferFailParams, + ) + from stripe.params.test_helpers.treasury._outbound_transfer_post_params import ( + OutboundTransferPostParams, + ) + from stripe.params.test_helpers.treasury._outbound_transfer_return_outbound_transfer_params import ( + OutboundTransferReturnOutboundTransferParams, + ) + from stripe.params.test_helpers.treasury._outbound_transfer_update_params import ( + OutboundTransferUpdateParams, + ) class OutboundTransferService(StripeService): - class FailParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class PostParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class ReturnOutboundTransferParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - returned_details: NotRequired[ - "OutboundTransferService.ReturnOutboundTransferParamsReturnedDetails" - ] - """ - Details about a returned OutboundTransfer. - """ - - class ReturnOutboundTransferParamsReturnedDetails(TypedDict): - code: NotRequired[ - Literal[ - "account_closed", - "account_frozen", - "bank_account_restricted", - "bank_ownership_changed", - "declined", - "incorrect_account_holder_name", - "invalid_account_number", - "invalid_currency", - "no_account", - "other", - ] - ] - """ - Reason for the return. - """ - - class UpdateParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - tracking_details: "OutboundTransferService.UpdateParamsTrackingDetails" - """ - Details about network-specific tracking information. - """ - - class UpdateParamsTrackingDetails(TypedDict): - ach: NotRequired[ - "OutboundTransferService.UpdateParamsTrackingDetailsAch" - ] - """ - ACH network tracking details. - """ - type: Literal["ach", "us_domestic_wire"] - """ - The US bank account network used to send funds. - """ - us_domestic_wire: NotRequired[ - "OutboundTransferService.UpdateParamsTrackingDetailsUsDomesticWire" - ] - """ - US domestic wire network tracking details. - """ - - class UpdateParamsTrackingDetailsAch(TypedDict): - trace_id: str - """ - ACH trace ID for funds sent over the `ach` network. - """ - - class UpdateParamsTrackingDetailsUsDomesticWire(TypedDict): - chips: NotRequired[str] - """ - CHIPS System Sequence Number (SSN) for funds sent over the `us_domestic_wire` network. - """ - imad: NotRequired[str] - """ - IMAD for funds sent over the `us_domestic_wire` network. - """ - omad: NotRequired[str] - """ - OMAD for funds sent over the `us_domestic_wire` network. - """ - def update( self, outbound_transfer: str, - params: "OutboundTransferService.UpdateParams", + params: "OutboundTransferUpdateParams", options: Optional[RequestOptions] = None, ) -> OutboundTransfer: """ @@ -125,7 +48,7 @@ def update( async def update_async( self, outbound_transfer: str, - params: "OutboundTransferService.UpdateParams", + params: "OutboundTransferUpdateParams", options: Optional[RequestOptions] = None, ) -> OutboundTransfer: """ @@ -147,7 +70,7 @@ async def update_async( def fail( self, outbound_transfer: str, - params: Optional["OutboundTransferService.FailParams"] = None, + params: Optional["OutboundTransferFailParams"] = None, options: Optional[RequestOptions] = None, ) -> OutboundTransfer: """ @@ -169,7 +92,7 @@ def fail( async def fail_async( self, outbound_transfer: str, - params: Optional["OutboundTransferService.FailParams"] = None, + params: Optional["OutboundTransferFailParams"] = None, options: Optional[RequestOptions] = None, ) -> OutboundTransfer: """ @@ -191,7 +114,7 @@ async def fail_async( def post( self, outbound_transfer: str, - params: Optional["OutboundTransferService.PostParams"] = None, + params: Optional["OutboundTransferPostParams"] = None, options: Optional[RequestOptions] = None, ) -> OutboundTransfer: """ @@ -213,7 +136,7 @@ def post( async def post_async( self, outbound_transfer: str, - params: Optional["OutboundTransferService.PostParams"] = None, + params: Optional["OutboundTransferPostParams"] = None, options: Optional[RequestOptions] = None, ) -> OutboundTransfer: """ @@ -236,7 +159,7 @@ def return_outbound_transfer( self, outbound_transfer: str, params: Optional[ - "OutboundTransferService.ReturnOutboundTransferParams" + "OutboundTransferReturnOutboundTransferParams" ] = None, options: Optional[RequestOptions] = None, ) -> OutboundTransfer: @@ -260,7 +183,7 @@ async def return_outbound_transfer_async( self, outbound_transfer: str, params: Optional[ - "OutboundTransferService.ReturnOutboundTransferParams" + "OutboundTransferReturnOutboundTransferParams" ] = None, options: Optional[RequestOptions] = None, ) -> OutboundTransfer: diff --git a/stripe/test_helpers/treasury/_received_credit_service.py b/stripe/test_helpers/treasury/_received_credit_service.py index e2cff56a3..7fbc53426 100644 --- a/stripe/test_helpers/treasury/_received_credit_service.py +++ b/stripe/test_helpers/treasury/_received_credit_service.py @@ -3,94 +3,19 @@ from stripe._request_options import RequestOptions from stripe._stripe_service import StripeService from stripe.treasury._received_credit import ReceivedCredit -from typing import List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params.test_helpers.treasury._received_credit_create_params import ( + ReceivedCreditCreateParams, + ) -class ReceivedCreditService(StripeService): - class CreateParams(TypedDict): - amount: int - """ - Amount (in cents) to be transferred. - """ - 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). - """ - description: NotRequired[str] - """ - An arbitrary string attached to the object. Often useful for displaying to users. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - financial_account: str - """ - The FinancialAccount to send funds to. - """ - initiating_payment_method_details: NotRequired[ - "ReceivedCreditService.CreateParamsInitiatingPaymentMethodDetails" - ] - """ - Initiating payment method details for the object. - """ - network: Literal["ach", "us_domestic_wire"] - """ - Specifies the network rails to be used. If not set, will default to the PaymentMethod's preferred network. See the [docs](https://stripe.com/docs/treasury/money-movement/timelines) to learn more about money movement timelines for each network type. - """ - network_details: NotRequired[ - "ReceivedCreditService.CreateParamsNetworkDetails" - ] - """ - Details about the network used for the ReceivedCredit. - """ - - class CreateParamsInitiatingPaymentMethodDetails(TypedDict): - type: Literal["us_bank_account"] - """ - The source type. - """ - us_bank_account: NotRequired[ - "ReceivedCreditService.CreateParamsInitiatingPaymentMethodDetailsUsBankAccount" - ] - """ - Optional fields for `us_bank_account`. - """ - - class CreateParamsInitiatingPaymentMethodDetailsUsBankAccount(TypedDict): - account_holder_name: NotRequired[str] - """ - The bank account holder's name. - """ - account_number: NotRequired[str] - """ - The bank account number. - """ - routing_number: NotRequired[str] - """ - The bank account's routing number. - """ - - class CreateParamsNetworkDetails(TypedDict): - ach: NotRequired["ReceivedCreditService.CreateParamsNetworkDetailsAch"] - """ - Optional fields for `ach`. - """ - type: Literal["ach"] - """ - The type of flow that originated the ReceivedCredit. - """ - - class CreateParamsNetworkDetailsAch(TypedDict): - addenda: NotRequired[str] - """ - ACH Addenda record - """ +class ReceivedCreditService(StripeService): def create( self, - params: "ReceivedCreditService.CreateParams", + params: "ReceivedCreditCreateParams", options: Optional[RequestOptions] = None, ) -> ReceivedCredit: """ @@ -109,7 +34,7 @@ def create( async def create_async( self, - params: "ReceivedCreditService.CreateParams", + params: "ReceivedCreditCreateParams", options: Optional[RequestOptions] = None, ) -> ReceivedCredit: """ diff --git a/stripe/test_helpers/treasury/_received_debit_service.py b/stripe/test_helpers/treasury/_received_debit_service.py index 7d8684fe3..9a26ae89b 100644 --- a/stripe/test_helpers/treasury/_received_debit_service.py +++ b/stripe/test_helpers/treasury/_received_debit_service.py @@ -3,94 +3,19 @@ from stripe._request_options import RequestOptions from stripe._stripe_service import StripeService from stripe.treasury._received_debit import ReceivedDebit -from typing import List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params.test_helpers.treasury._received_debit_create_params import ( + ReceivedDebitCreateParams, + ) -class ReceivedDebitService(StripeService): - class CreateParams(TypedDict): - amount: int - """ - Amount (in cents) to be transferred. - """ - 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). - """ - description: NotRequired[str] - """ - An arbitrary string attached to the object. Often useful for displaying to users. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - financial_account: str - """ - The FinancialAccount to pull funds from. - """ - initiating_payment_method_details: NotRequired[ - "ReceivedDebitService.CreateParamsInitiatingPaymentMethodDetails" - ] - """ - Initiating payment method details for the object. - """ - network: Literal["ach"] - """ - Specifies the network rails to be used. If not set, will default to the PaymentMethod's preferred network. See the [docs](https://stripe.com/docs/treasury/money-movement/timelines) to learn more about money movement timelines for each network type. - """ - network_details: NotRequired[ - "ReceivedDebitService.CreateParamsNetworkDetails" - ] - """ - Details about the network used for the ReceivedDebit. - """ - - class CreateParamsInitiatingPaymentMethodDetails(TypedDict): - type: Literal["us_bank_account"] - """ - The source type. - """ - us_bank_account: NotRequired[ - "ReceivedDebitService.CreateParamsInitiatingPaymentMethodDetailsUsBankAccount" - ] - """ - Optional fields for `us_bank_account`. - """ - - class CreateParamsInitiatingPaymentMethodDetailsUsBankAccount(TypedDict): - account_holder_name: NotRequired[str] - """ - The bank account holder's name. - """ - account_number: NotRequired[str] - """ - The bank account number. - """ - routing_number: NotRequired[str] - """ - The bank account's routing number. - """ - - class CreateParamsNetworkDetails(TypedDict): - ach: NotRequired["ReceivedDebitService.CreateParamsNetworkDetailsAch"] - """ - Optional fields for `ach`. - """ - type: Literal["ach"] - """ - The type of flow that originated the ReceivedDebit. - """ - - class CreateParamsNetworkDetailsAch(TypedDict): - addenda: NotRequired[str] - """ - Addenda record data associated with this ReceivedDebit. - """ +class ReceivedDebitService(StripeService): def create( self, - params: "ReceivedDebitService.CreateParams", + params: "ReceivedDebitCreateParams", options: Optional[RequestOptions] = None, ) -> ReceivedDebit: """ @@ -109,7 +34,7 @@ def create( async def create_async( self, - params: "ReceivedDebitService.CreateParams", + params: "ReceivedDebitCreateParams", options: Optional[RequestOptions] = None, ) -> ReceivedDebit: """ diff --git a/stripe/treasury/_credit_reversal.py b/stripe/treasury/_credit_reversal.py index f8d64de25..4ed324cb6 100644 --- a/stripe/treasury/_credit_reversal.py +++ b/stripe/treasury/_credit_reversal.py @@ -4,12 +4,20 @@ from stripe._expandable_field import ExpandableField from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource -from stripe._request_options import RequestOptions from stripe._stripe_object import StripeObject -from typing import ClassVar, Dict, List, Optional, cast -from typing_extensions import Literal, NotRequired, Unpack, TYPE_CHECKING +from typing import ClassVar, Dict, Optional, cast +from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: + from stripe.params.treasury._credit_reversal_create_params import ( + CreditReversalCreateParams, + ) + from stripe.params.treasury._credit_reversal_list_params import ( + CreditReversalListParams, + ) + from stripe.params.treasury._credit_reversal_retrieve_params import ( + CreditReversalRetrieveParams, + ) from stripe.treasury._transaction import Transaction @@ -31,56 +39,6 @@ class StatusTransitions(StripeObject): Timestamp describing when the CreditReversal changed status to `posted` """ - class CreateParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - received_credit: str - """ - The ReceivedCredit to reverse. - """ - - class ListParams(RequestOptions): - 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. - """ - financial_account: str - """ - Returns objects associated with this FinancialAccount. - """ - 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. - """ - received_credit: NotRequired[str] - """ - Only return CreditReversals for the ReceivedCredit ID. - """ - 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. - """ - status: NotRequired[Literal["canceled", "posted", "processing"]] - """ - Only return CreditReversals for a given status. - """ - - class RetrieveParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - amount: int """ Amount (in cents) transferred. @@ -137,7 +95,7 @@ class RetrieveParams(RequestOptions): @classmethod def create( - cls, **params: Unpack["CreditReversal.CreateParams"] + cls, **params: Unpack["CreditReversalCreateParams"] ) -> "CreditReversal": """ Reverses a ReceivedCredit and creates a CreditReversal object. @@ -153,7 +111,7 @@ def create( @classmethod async def create_async( - cls, **params: Unpack["CreditReversal.CreateParams"] + cls, **params: Unpack["CreditReversalCreateParams"] ) -> "CreditReversal": """ Reverses a ReceivedCredit and creates a CreditReversal object. @@ -169,7 +127,7 @@ async def create_async( @classmethod def list( - cls, **params: Unpack["CreditReversal.ListParams"] + cls, **params: Unpack["CreditReversalListParams"] ) -> ListObject["CreditReversal"]: """ Returns a list of CreditReversals. @@ -189,7 +147,7 @@ def list( @classmethod async def list_async( - cls, **params: Unpack["CreditReversal.ListParams"] + cls, **params: Unpack["CreditReversalListParams"] ) -> ListObject["CreditReversal"]: """ Returns a list of CreditReversals. @@ -209,7 +167,7 @@ async def list_async( @classmethod def retrieve( - cls, id: str, **params: Unpack["CreditReversal.RetrieveParams"] + cls, id: str, **params: Unpack["CreditReversalRetrieveParams"] ) -> "CreditReversal": """ Retrieves the details of an existing CreditReversal by passing the unique CreditReversal ID from either the CreditReversal creation request or CreditReversal list @@ -220,7 +178,7 @@ def retrieve( @classmethod async def retrieve_async( - cls, id: str, **params: Unpack["CreditReversal.RetrieveParams"] + cls, id: str, **params: Unpack["CreditReversalRetrieveParams"] ) -> "CreditReversal": """ Retrieves the details of an existing CreditReversal by passing the unique CreditReversal ID from either the CreditReversal creation request or CreditReversal list diff --git a/stripe/treasury/_credit_reversal_service.py b/stripe/treasury/_credit_reversal_service.py index e19163717..3d92114d2 100644 --- a/stripe/treasury/_credit_reversal_service.py +++ b/stripe/treasury/_credit_reversal_service.py @@ -5,64 +5,25 @@ from stripe._stripe_service import StripeService from stripe._util import sanitize_id from stripe.treasury._credit_reversal import CreditReversal -from typing import Dict, List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params.treasury._credit_reversal_create_params import ( + CreditReversalCreateParams, + ) + from stripe.params.treasury._credit_reversal_list_params import ( + CreditReversalListParams, + ) + from stripe.params.treasury._credit_reversal_retrieve_params import ( + CreditReversalRetrieveParams, + ) -class CreditReversalService(StripeService): - class CreateParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - received_credit: str - """ - The ReceivedCredit to reverse. - """ - - class ListParams(TypedDict): - 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. - """ - financial_account: str - """ - Returns objects associated with this FinancialAccount. - """ - 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. - """ - received_credit: NotRequired[str] - """ - Only return CreditReversals for the ReceivedCredit ID. - """ - 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. - """ - status: NotRequired[Literal["canceled", "posted", "processing"]] - """ - Only return CreditReversals for a given status. - """ - - class RetrieveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ +class CreditReversalService(StripeService): def list( self, - params: "CreditReversalService.ListParams", + params: "CreditReversalListParams", options: Optional[RequestOptions] = None, ) -> ListObject[CreditReversal]: """ @@ -81,7 +42,7 @@ def list( async def list_async( self, - params: "CreditReversalService.ListParams", + params: "CreditReversalListParams", options: Optional[RequestOptions] = None, ) -> ListObject[CreditReversal]: """ @@ -100,7 +61,7 @@ async def list_async( def create( self, - params: "CreditReversalService.CreateParams", + params: "CreditReversalCreateParams", options: Optional[RequestOptions] = None, ) -> CreditReversal: """ @@ -119,7 +80,7 @@ def create( async def create_async( self, - params: "CreditReversalService.CreateParams", + params: "CreditReversalCreateParams", options: Optional[RequestOptions] = None, ) -> CreditReversal: """ @@ -139,7 +100,7 @@ async def create_async( def retrieve( self, credit_reversal: str, - params: Optional["CreditReversalService.RetrieveParams"] = None, + params: Optional["CreditReversalRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> CreditReversal: """ @@ -161,7 +122,7 @@ def retrieve( async def retrieve_async( self, credit_reversal: str, - params: Optional["CreditReversalService.RetrieveParams"] = None, + params: Optional["CreditReversalRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> CreditReversal: """ diff --git a/stripe/treasury/_debit_reversal.py b/stripe/treasury/_debit_reversal.py index dbc042bd1..ff98a4e23 100644 --- a/stripe/treasury/_debit_reversal.py +++ b/stripe/treasury/_debit_reversal.py @@ -4,12 +4,20 @@ from stripe._expandable_field import ExpandableField from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource -from stripe._request_options import RequestOptions from stripe._stripe_object import StripeObject -from typing import ClassVar, Dict, List, Optional, cast -from typing_extensions import Literal, NotRequired, Unpack, TYPE_CHECKING +from typing import ClassVar, Dict, Optional, cast +from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: + from stripe.params.treasury._debit_reversal_create_params import ( + DebitReversalCreateParams, + ) + from stripe.params.treasury._debit_reversal_list_params import ( + DebitReversalListParams, + ) + from stripe.params.treasury._debit_reversal_retrieve_params import ( + DebitReversalRetrieveParams, + ) from stripe.treasury._transaction import Transaction @@ -37,60 +45,6 @@ class StatusTransitions(StripeObject): Timestamp describing when the DebitReversal changed status to `completed`. """ - class CreateParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - received_debit: str - """ - The ReceivedDebit to reverse. - """ - - class ListParams(RequestOptions): - 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. - """ - financial_account: str - """ - Returns objects associated with this FinancialAccount. - """ - 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. - """ - received_debit: NotRequired[str] - """ - Only return DebitReversals for the ReceivedDebit ID. - """ - resolution: NotRequired[Literal["lost", "won"]] - """ - Only return DebitReversals for a given resolution. - """ - 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. - """ - status: NotRequired[Literal["canceled", "completed", "processing"]] - """ - Only return DebitReversals for a given status. - """ - - class RetrieveParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - amount: int """ Amount (in cents) transferred. @@ -151,7 +105,7 @@ class RetrieveParams(RequestOptions): @classmethod def create( - cls, **params: Unpack["DebitReversal.CreateParams"] + cls, **params: Unpack["DebitReversalCreateParams"] ) -> "DebitReversal": """ Reverses a ReceivedDebit and creates a DebitReversal object. @@ -167,7 +121,7 @@ def create( @classmethod async def create_async( - cls, **params: Unpack["DebitReversal.CreateParams"] + cls, **params: Unpack["DebitReversalCreateParams"] ) -> "DebitReversal": """ Reverses a ReceivedDebit and creates a DebitReversal object. @@ -183,7 +137,7 @@ async def create_async( @classmethod def list( - cls, **params: Unpack["DebitReversal.ListParams"] + cls, **params: Unpack["DebitReversalListParams"] ) -> ListObject["DebitReversal"]: """ Returns a list of DebitReversals. @@ -203,7 +157,7 @@ def list( @classmethod async def list_async( - cls, **params: Unpack["DebitReversal.ListParams"] + cls, **params: Unpack["DebitReversalListParams"] ) -> ListObject["DebitReversal"]: """ Returns a list of DebitReversals. @@ -223,7 +177,7 @@ async def list_async( @classmethod def retrieve( - cls, id: str, **params: Unpack["DebitReversal.RetrieveParams"] + cls, id: str, **params: Unpack["DebitReversalRetrieveParams"] ) -> "DebitReversal": """ Retrieves a DebitReversal object. @@ -234,7 +188,7 @@ def retrieve( @classmethod async def retrieve_async( - cls, id: str, **params: Unpack["DebitReversal.RetrieveParams"] + cls, id: str, **params: Unpack["DebitReversalRetrieveParams"] ) -> "DebitReversal": """ Retrieves a DebitReversal object. diff --git a/stripe/treasury/_debit_reversal_service.py b/stripe/treasury/_debit_reversal_service.py index a8ee61bb8..be0e1865f 100644 --- a/stripe/treasury/_debit_reversal_service.py +++ b/stripe/treasury/_debit_reversal_service.py @@ -5,68 +5,25 @@ from stripe._stripe_service import StripeService from stripe._util import sanitize_id from stripe.treasury._debit_reversal import DebitReversal -from typing import Dict, List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params.treasury._debit_reversal_create_params import ( + DebitReversalCreateParams, + ) + from stripe.params.treasury._debit_reversal_list_params import ( + DebitReversalListParams, + ) + from stripe.params.treasury._debit_reversal_retrieve_params import ( + DebitReversalRetrieveParams, + ) -class DebitReversalService(StripeService): - class CreateParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - received_debit: str - """ - The ReceivedDebit to reverse. - """ - - class ListParams(TypedDict): - 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. - """ - financial_account: str - """ - Returns objects associated with this FinancialAccount. - """ - 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. - """ - received_debit: NotRequired[str] - """ - Only return DebitReversals for the ReceivedDebit ID. - """ - resolution: NotRequired[Literal["lost", "won"]] - """ - Only return DebitReversals for a given resolution. - """ - 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. - """ - status: NotRequired[Literal["canceled", "completed", "processing"]] - """ - Only return DebitReversals for a given status. - """ - - class RetrieveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ +class DebitReversalService(StripeService): def list( self, - params: "DebitReversalService.ListParams", + params: "DebitReversalListParams", options: Optional[RequestOptions] = None, ) -> ListObject[DebitReversal]: """ @@ -85,7 +42,7 @@ def list( async def list_async( self, - params: "DebitReversalService.ListParams", + params: "DebitReversalListParams", options: Optional[RequestOptions] = None, ) -> ListObject[DebitReversal]: """ @@ -104,7 +61,7 @@ async def list_async( def create( self, - params: "DebitReversalService.CreateParams", + params: "DebitReversalCreateParams", options: Optional[RequestOptions] = None, ) -> DebitReversal: """ @@ -123,7 +80,7 @@ def create( async def create_async( self, - params: "DebitReversalService.CreateParams", + params: "DebitReversalCreateParams", options: Optional[RequestOptions] = None, ) -> DebitReversal: """ @@ -143,7 +100,7 @@ async def create_async( def retrieve( self, debit_reversal: str, - params: Optional["DebitReversalService.RetrieveParams"] = None, + params: Optional["DebitReversalRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> DebitReversal: """ @@ -165,7 +122,7 @@ def retrieve( async def retrieve_async( self, debit_reversal: str, - params: Optional["DebitReversalService.RetrieveParams"] = None, + params: Optional["DebitReversalRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> DebitReversal: """ diff --git a/stripe/treasury/_financial_account.py b/stripe/treasury/_financial_account.py index 366f9e70f..340bd7621 100644 --- a/stripe/treasury/_financial_account.py +++ b/stripe/treasury/_financial_account.py @@ -3,20 +3,34 @@ from stripe._createable_api_resource import CreateableAPIResource from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource -from stripe._request_options import RequestOptions from stripe._stripe_object import StripeObject from stripe._updateable_api_resource import UpdateableAPIResource from stripe._util import class_method_variant, sanitize_id from typing import ClassVar, Dict, List, Optional, cast, overload -from typing_extensions import ( - Literal, - NotRequired, - TypedDict, - Unpack, - TYPE_CHECKING, -) +from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: + from stripe.params.treasury._financial_account_close_params import ( + FinancialAccountCloseParams, + ) + from stripe.params.treasury._financial_account_create_params import ( + FinancialAccountCreateParams, + ) + from stripe.params.treasury._financial_account_list_params import ( + FinancialAccountListParams, + ) + from stripe.params.treasury._financial_account_modify_params import ( + FinancialAccountModifyParams, + ) + from stripe.params.treasury._financial_account_retrieve_features_params import ( + FinancialAccountRetrieveFeaturesParams, + ) + from stripe.params.treasury._financial_account_retrieve_params import ( + FinancialAccountRetrieveParams, + ) + from stripe.params.treasury._financial_account_update_features_params import ( + FinancialAccountUpdateFeaturesParams, + ) from stripe.treasury._financial_account_features import ( FinancialAccountFeatures, ) @@ -112,630 +126,6 @@ class Closed(StripeObject): """ _inner_class_types = {"closed": Closed} - class CloseParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - forwarding_settings: NotRequired[ - "FinancialAccount.CloseParamsForwardingSettings" - ] - """ - A different bank account where funds can be deposited/debited in order to get the closing FA's balance to $0 - """ - - class CloseParamsForwardingSettings(TypedDict): - financial_account: NotRequired[str] - """ - The financial_account id - """ - payment_method: NotRequired[str] - """ - The payment_method or bank account id. This needs to be a verified bank account. - """ - type: Literal["financial_account", "payment_method"] - """ - The type of the bank account provided. This can be either "financial_account" or "payment_method" - """ - - class CreateParams(RequestOptions): - display_name: NotRequired["Literal['']|str"] - """ - The display name for the FinancialAccount. Use this field to customize the names of the FinancialAccounts for your connected accounts. Unlike the `nickname` field, `display_name` is not internal metadata and will be exposed to connected accounts. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - features: NotRequired["FinancialAccount.CreateParamsFeatures"] - """ - Encodes whether a FinancialAccount has access to a particular feature. Stripe or the platform can control features via the requested field. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - nickname: NotRequired["Literal['']|str"] - """ - The nickname for the FinancialAccount. - """ - platform_restrictions: NotRequired[ - "FinancialAccount.CreateParamsPlatformRestrictions" - ] - """ - The set of functionalities that the platform can restrict on the FinancialAccount. - """ - supported_currencies: List[str] - """ - The currencies the FinancialAccount can hold a balance in. - """ - - class CreateParamsFeatures(TypedDict): - card_issuing: NotRequired[ - "FinancialAccount.CreateParamsFeaturesCardIssuing" - ] - """ - Encodes the FinancialAccount's ability to be used with the Issuing product, including attaching cards to and drawing funds from the FinancialAccount. - """ - deposit_insurance: NotRequired[ - "FinancialAccount.CreateParamsFeaturesDepositInsurance" - ] - """ - Represents whether this FinancialAccount is eligible for deposit insurance. Various factors determine the insurance amount. - """ - financial_addresses: NotRequired[ - "FinancialAccount.CreateParamsFeaturesFinancialAddresses" - ] - """ - Contains Features that add FinancialAddresses to the FinancialAccount. - """ - inbound_transfers: NotRequired[ - "FinancialAccount.CreateParamsFeaturesInboundTransfers" - ] - """ - Contains settings related to adding funds to a FinancialAccount from another Account with the same owner. - """ - intra_stripe_flows: NotRequired[ - "FinancialAccount.CreateParamsFeaturesIntraStripeFlows" - ] - """ - Represents the ability for the FinancialAccount to send money to, or receive money from other FinancialAccounts (for example, via OutboundPayment). - """ - outbound_payments: NotRequired[ - "FinancialAccount.CreateParamsFeaturesOutboundPayments" - ] - """ - Includes Features related to initiating money movement out of the FinancialAccount to someone else's bucket of money. - """ - outbound_transfers: NotRequired[ - "FinancialAccount.CreateParamsFeaturesOutboundTransfers" - ] - """ - Contains a Feature and settings related to moving money out of the FinancialAccount into another Account with the same owner. - """ - - class CreateParamsFeaturesCardIssuing(TypedDict): - requested: bool - """ - Whether the FinancialAccount should have the Feature. - """ - - class CreateParamsFeaturesDepositInsurance(TypedDict): - requested: bool - """ - Whether the FinancialAccount should have the Feature. - """ - - class CreateParamsFeaturesFinancialAddresses(TypedDict): - aba: NotRequired[ - "FinancialAccount.CreateParamsFeaturesFinancialAddressesAba" - ] - """ - Adds an ABA FinancialAddress to the FinancialAccount. - """ - - class CreateParamsFeaturesFinancialAddressesAba(TypedDict): - bank: NotRequired[Literal["evolve", "fifth_third", "goldman_sachs"]] - """ - Requested bank partner - """ - requested: bool - """ - Whether the FinancialAccount should have the Feature. - """ - - class CreateParamsFeaturesInboundTransfers(TypedDict): - ach: NotRequired[ - "FinancialAccount.CreateParamsFeaturesInboundTransfersAch" - ] - """ - Enables ACH Debits via the InboundTransfers API. - """ - - class CreateParamsFeaturesInboundTransfersAch(TypedDict): - requested: bool - """ - Whether the FinancialAccount should have the Feature. - """ - - class CreateParamsFeaturesIntraStripeFlows(TypedDict): - requested: bool - """ - Whether the FinancialAccount should have the Feature. - """ - - class CreateParamsFeaturesOutboundPayments(TypedDict): - ach: NotRequired[ - "FinancialAccount.CreateParamsFeaturesOutboundPaymentsAch" - ] - """ - Enables ACH transfers via the OutboundPayments API. - """ - us_domestic_wire: NotRequired[ - "FinancialAccount.CreateParamsFeaturesOutboundPaymentsUsDomesticWire" - ] - """ - Enables US domestic wire transfers via the OutboundPayments API. - """ - - class CreateParamsFeaturesOutboundPaymentsAch(TypedDict): - requested: bool - """ - Whether the FinancialAccount should have the Feature. - """ - - class CreateParamsFeaturesOutboundPaymentsUsDomesticWire(TypedDict): - requested: bool - """ - Whether the FinancialAccount should have the Feature. - """ - - class CreateParamsFeaturesOutboundTransfers(TypedDict): - ach: NotRequired[ - "FinancialAccount.CreateParamsFeaturesOutboundTransfersAch" - ] - """ - Enables ACH transfers via the OutboundTransfers API. - """ - us_domestic_wire: NotRequired[ - "FinancialAccount.CreateParamsFeaturesOutboundTransfersUsDomesticWire" - ] - """ - Enables US domestic wire transfers via the OutboundTransfers API. - """ - - class CreateParamsFeaturesOutboundTransfersAch(TypedDict): - requested: bool - """ - Whether the FinancialAccount should have the Feature. - """ - - class CreateParamsFeaturesOutboundTransfersUsDomesticWire(TypedDict): - requested: bool - """ - Whether the FinancialAccount should have the Feature. - """ - - class CreateParamsPlatformRestrictions(TypedDict): - inbound_flows: NotRequired[Literal["restricted", "unrestricted"]] - """ - Restricts all inbound money movement. - """ - outbound_flows: NotRequired[Literal["restricted", "unrestricted"]] - """ - Restricts all outbound money movement. - """ - - class ListParams(RequestOptions): - created: NotRequired["FinancialAccount.ListParamsCreated|int"] - """ - Only return FinancialAccounts that were created during the given date interval. - """ - ending_before: NotRequired[str] - """ - An object ID cursor for use in pagination. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - limit: NotRequired[int] - """ - A limit ranging from 1 to 100 (defaults to 10). - """ - starting_after: NotRequired[str] - """ - An object ID cursor for use in pagination. - """ - status: NotRequired[Literal["closed", "open"]] - """ - Only return FinancialAccounts that have the given status: `open` or `closed` - """ - - class ListParamsCreated(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) - """ - - class ModifyParams(RequestOptions): - display_name: NotRequired["Literal['']|str"] - """ - The display name for the FinancialAccount. Use this field to customize the names of the FinancialAccounts for your connected accounts. Unlike the `nickname` field, `display_name` is not internal metadata and will be exposed to connected accounts. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - features: NotRequired["FinancialAccount.ModifyParamsFeatures"] - """ - Encodes whether a FinancialAccount has access to a particular feature, with a status enum and associated `status_details`. Stripe or the platform may control features via the requested field. - """ - forwarding_settings: NotRequired[ - "FinancialAccount.ModifyParamsForwardingSettings" - ] - """ - A different bank account where funds can be deposited/debited in order to get the closing FA's balance to $0 - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - nickname: NotRequired["Literal['']|str"] - """ - The nickname for the FinancialAccount. - """ - platform_restrictions: NotRequired[ - "FinancialAccount.ModifyParamsPlatformRestrictions" - ] - """ - The set of functionalities that the platform can restrict on the FinancialAccount. - """ - - class ModifyParamsFeatures(TypedDict): - card_issuing: NotRequired[ - "FinancialAccount.ModifyParamsFeaturesCardIssuing" - ] - """ - Encodes the FinancialAccount's ability to be used with the Issuing product, including attaching cards to and drawing funds from the FinancialAccount. - """ - deposit_insurance: NotRequired[ - "FinancialAccount.ModifyParamsFeaturesDepositInsurance" - ] - """ - Represents whether this FinancialAccount is eligible for deposit insurance. Various factors determine the insurance amount. - """ - financial_addresses: NotRequired[ - "FinancialAccount.ModifyParamsFeaturesFinancialAddresses" - ] - """ - Contains Features that add FinancialAddresses to the FinancialAccount. - """ - inbound_transfers: NotRequired[ - "FinancialAccount.ModifyParamsFeaturesInboundTransfers" - ] - """ - Contains settings related to adding funds to a FinancialAccount from another Account with the same owner. - """ - intra_stripe_flows: NotRequired[ - "FinancialAccount.ModifyParamsFeaturesIntraStripeFlows" - ] - """ - Represents the ability for the FinancialAccount to send money to, or receive money from other FinancialAccounts (for example, via OutboundPayment). - """ - outbound_payments: NotRequired[ - "FinancialAccount.ModifyParamsFeaturesOutboundPayments" - ] - """ - Includes Features related to initiating money movement out of the FinancialAccount to someone else's bucket of money. - """ - outbound_transfers: NotRequired[ - "FinancialAccount.ModifyParamsFeaturesOutboundTransfers" - ] - """ - Contains a Feature and settings related to moving money out of the FinancialAccount into another Account with the same owner. - """ - - class ModifyParamsFeaturesCardIssuing(TypedDict): - requested: bool - """ - Whether the FinancialAccount should have the Feature. - """ - - class ModifyParamsFeaturesDepositInsurance(TypedDict): - requested: bool - """ - Whether the FinancialAccount should have the Feature. - """ - - class ModifyParamsFeaturesFinancialAddresses(TypedDict): - aba: NotRequired[ - "FinancialAccount.ModifyParamsFeaturesFinancialAddressesAba" - ] - """ - Adds an ABA FinancialAddress to the FinancialAccount. - """ - - class ModifyParamsFeaturesFinancialAddressesAba(TypedDict): - bank: NotRequired[Literal["evolve", "fifth_third", "goldman_sachs"]] - """ - Requested bank partner - """ - requested: bool - """ - Whether the FinancialAccount should have the Feature. - """ - - class ModifyParamsFeaturesInboundTransfers(TypedDict): - ach: NotRequired[ - "FinancialAccount.ModifyParamsFeaturesInboundTransfersAch" - ] - """ - Enables ACH Debits via the InboundTransfers API. - """ - - class ModifyParamsFeaturesInboundTransfersAch(TypedDict): - requested: bool - """ - Whether the FinancialAccount should have the Feature. - """ - - class ModifyParamsFeaturesIntraStripeFlows(TypedDict): - requested: bool - """ - Whether the FinancialAccount should have the Feature. - """ - - class ModifyParamsFeaturesOutboundPayments(TypedDict): - ach: NotRequired[ - "FinancialAccount.ModifyParamsFeaturesOutboundPaymentsAch" - ] - """ - Enables ACH transfers via the OutboundPayments API. - """ - us_domestic_wire: NotRequired[ - "FinancialAccount.ModifyParamsFeaturesOutboundPaymentsUsDomesticWire" - ] - """ - Enables US domestic wire transfers via the OutboundPayments API. - """ - - class ModifyParamsFeaturesOutboundPaymentsAch(TypedDict): - requested: bool - """ - Whether the FinancialAccount should have the Feature. - """ - - class ModifyParamsFeaturesOutboundPaymentsUsDomesticWire(TypedDict): - requested: bool - """ - Whether the FinancialAccount should have the Feature. - """ - - class ModifyParamsFeaturesOutboundTransfers(TypedDict): - ach: NotRequired[ - "FinancialAccount.ModifyParamsFeaturesOutboundTransfersAch" - ] - """ - Enables ACH transfers via the OutboundTransfers API. - """ - us_domestic_wire: NotRequired[ - "FinancialAccount.ModifyParamsFeaturesOutboundTransfersUsDomesticWire" - ] - """ - Enables US domestic wire transfers via the OutboundTransfers API. - """ - - class ModifyParamsFeaturesOutboundTransfersAch(TypedDict): - requested: bool - """ - Whether the FinancialAccount should have the Feature. - """ - - class ModifyParamsFeaturesOutboundTransfersUsDomesticWire(TypedDict): - requested: bool - """ - Whether the FinancialAccount should have the Feature. - """ - - class ModifyParamsForwardingSettings(TypedDict): - financial_account: NotRequired[str] - """ - The financial_account id - """ - payment_method: NotRequired[str] - """ - The payment_method or bank account id. This needs to be a verified bank account. - """ - type: Literal["financial_account", "payment_method"] - """ - The type of the bank account provided. This can be either "financial_account" or "payment_method" - """ - - class ModifyParamsPlatformRestrictions(TypedDict): - inbound_flows: NotRequired[Literal["restricted", "unrestricted"]] - """ - Restricts all inbound money movement. - """ - outbound_flows: NotRequired[Literal["restricted", "unrestricted"]] - """ - Restricts all outbound money movement. - """ - - class RetrieveFeaturesParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class RetrieveParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class UpdateFeaturesParams(RequestOptions): - card_issuing: NotRequired[ - "FinancialAccount.UpdateFeaturesParamsCardIssuing" - ] - """ - Encodes the FinancialAccount's ability to be used with the Issuing product, including attaching cards to and drawing funds from the FinancialAccount. - """ - deposit_insurance: NotRequired[ - "FinancialAccount.UpdateFeaturesParamsDepositInsurance" - ] - """ - Represents whether this FinancialAccount is eligible for deposit insurance. Various factors determine the insurance amount. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - financial_addresses: NotRequired[ - "FinancialAccount.UpdateFeaturesParamsFinancialAddresses" - ] - """ - Contains Features that add FinancialAddresses to the FinancialAccount. - """ - inbound_transfers: NotRequired[ - "FinancialAccount.UpdateFeaturesParamsInboundTransfers" - ] - """ - Contains settings related to adding funds to a FinancialAccount from another Account with the same owner. - """ - intra_stripe_flows: NotRequired[ - "FinancialAccount.UpdateFeaturesParamsIntraStripeFlows" - ] - """ - Represents the ability for the FinancialAccount to send money to, or receive money from other FinancialAccounts (for example, via OutboundPayment). - """ - outbound_payments: NotRequired[ - "FinancialAccount.UpdateFeaturesParamsOutboundPayments" - ] - """ - Includes Features related to initiating money movement out of the FinancialAccount to someone else's bucket of money. - """ - outbound_transfers: NotRequired[ - "FinancialAccount.UpdateFeaturesParamsOutboundTransfers" - ] - """ - Contains a Feature and settings related to moving money out of the FinancialAccount into another Account with the same owner. - """ - - class UpdateFeaturesParamsCardIssuing(TypedDict): - requested: bool - """ - Whether the FinancialAccount should have the Feature. - """ - - class UpdateFeaturesParamsDepositInsurance(TypedDict): - requested: bool - """ - Whether the FinancialAccount should have the Feature. - """ - - class UpdateFeaturesParamsFinancialAddresses(TypedDict): - aba: NotRequired[ - "FinancialAccount.UpdateFeaturesParamsFinancialAddressesAba" - ] - """ - Adds an ABA FinancialAddress to the FinancialAccount. - """ - - class UpdateFeaturesParamsFinancialAddressesAba(TypedDict): - bank: NotRequired[Literal["evolve", "fifth_third", "goldman_sachs"]] - """ - Requested bank partner - """ - requested: bool - """ - Whether the FinancialAccount should have the Feature. - """ - - class UpdateFeaturesParamsInboundTransfers(TypedDict): - ach: NotRequired[ - "FinancialAccount.UpdateFeaturesParamsInboundTransfersAch" - ] - """ - Enables ACH Debits via the InboundTransfers API. - """ - - class UpdateFeaturesParamsInboundTransfersAch(TypedDict): - requested: bool - """ - Whether the FinancialAccount should have the Feature. - """ - - class UpdateFeaturesParamsIntraStripeFlows(TypedDict): - requested: bool - """ - Whether the FinancialAccount should have the Feature. - """ - - class UpdateFeaturesParamsOutboundPayments(TypedDict): - ach: NotRequired[ - "FinancialAccount.UpdateFeaturesParamsOutboundPaymentsAch" - ] - """ - Enables ACH transfers via the OutboundPayments API. - """ - us_domestic_wire: NotRequired[ - "FinancialAccount.UpdateFeaturesParamsOutboundPaymentsUsDomesticWire" - ] - """ - Enables US domestic wire transfers via the OutboundPayments API. - """ - - class UpdateFeaturesParamsOutboundPaymentsAch(TypedDict): - requested: bool - """ - Whether the FinancialAccount should have the Feature. - """ - - class UpdateFeaturesParamsOutboundPaymentsUsDomesticWire(TypedDict): - requested: bool - """ - Whether the FinancialAccount should have the Feature. - """ - - class UpdateFeaturesParamsOutboundTransfers(TypedDict): - ach: NotRequired[ - "FinancialAccount.UpdateFeaturesParamsOutboundTransfersAch" - ] - """ - Enables ACH transfers via the OutboundTransfers API. - """ - us_domestic_wire: NotRequired[ - "FinancialAccount.UpdateFeaturesParamsOutboundTransfersUsDomesticWire" - ] - """ - Enables US domestic wire transfers via the OutboundTransfers API. - """ - - class UpdateFeaturesParamsOutboundTransfersAch(TypedDict): - requested: bool - """ - Whether the FinancialAccount should have the Feature. - """ - - class UpdateFeaturesParamsOutboundTransfersUsDomesticWire(TypedDict): - requested: bool - """ - Whether the FinancialAccount should have the Feature. - """ - active_features: Optional[ List[ Literal[ @@ -860,7 +250,7 @@ class UpdateFeaturesParamsOutboundTransfersUsDomesticWire(TypedDict): def _cls_close( cls, financial_account: str, - **params: Unpack["FinancialAccount.CloseParams"], + **params: Unpack["FinancialAccountCloseParams"], ) -> "FinancialAccount": """ Closes a FinancialAccount. A FinancialAccount can only be closed if it has a zero balance, has no pending InboundTransfers, and has canceled all attached Issuing cards. @@ -879,8 +269,7 @@ def _cls_close( @overload @staticmethod def close( - financial_account: str, - **params: Unpack["FinancialAccount.CloseParams"], + financial_account: str, **params: Unpack["FinancialAccountCloseParams"] ) -> "FinancialAccount": """ Closes a FinancialAccount. A FinancialAccount can only be closed if it has a zero balance, has no pending InboundTransfers, and has canceled all attached Issuing cards. @@ -889,7 +278,7 @@ def close( @overload def close( - self, **params: Unpack["FinancialAccount.CloseParams"] + self, **params: Unpack["FinancialAccountCloseParams"] ) -> "FinancialAccount": """ Closes a FinancialAccount. A FinancialAccount can only be closed if it has a zero balance, has no pending InboundTransfers, and has canceled all attached Issuing cards. @@ -898,7 +287,7 @@ def close( @class_method_variant("_cls_close") def close( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["FinancialAccount.CloseParams"] + self, **params: Unpack["FinancialAccountCloseParams"] ) -> "FinancialAccount": """ Closes a FinancialAccount. A FinancialAccount can only be closed if it has a zero balance, has no pending InboundTransfers, and has canceled all attached Issuing cards. @@ -918,7 +307,7 @@ def close( # pyright: ignore[reportGeneralTypeIssues] async def _cls_close_async( cls, financial_account: str, - **params: Unpack["FinancialAccount.CloseParams"], + **params: Unpack["FinancialAccountCloseParams"], ) -> "FinancialAccount": """ Closes a FinancialAccount. A FinancialAccount can only be closed if it has a zero balance, has no pending InboundTransfers, and has canceled all attached Issuing cards. @@ -937,8 +326,7 @@ async def _cls_close_async( @overload @staticmethod async def close_async( - financial_account: str, - **params: Unpack["FinancialAccount.CloseParams"], + financial_account: str, **params: Unpack["FinancialAccountCloseParams"] ) -> "FinancialAccount": """ Closes a FinancialAccount. A FinancialAccount can only be closed if it has a zero balance, has no pending InboundTransfers, and has canceled all attached Issuing cards. @@ -947,7 +335,7 @@ async def close_async( @overload async def close_async( - self, **params: Unpack["FinancialAccount.CloseParams"] + self, **params: Unpack["FinancialAccountCloseParams"] ) -> "FinancialAccount": """ Closes a FinancialAccount. A FinancialAccount can only be closed if it has a zero balance, has no pending InboundTransfers, and has canceled all attached Issuing cards. @@ -956,7 +344,7 @@ async def close_async( @class_method_variant("_cls_close_async") async def close_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["FinancialAccount.CloseParams"] + self, **params: Unpack["FinancialAccountCloseParams"] ) -> "FinancialAccount": """ Closes a FinancialAccount. A FinancialAccount can only be closed if it has a zero balance, has no pending InboundTransfers, and has canceled all attached Issuing cards. @@ -974,7 +362,7 @@ async def close_async( # pyright: ignore[reportGeneralTypeIssues] @classmethod def create( - cls, **params: Unpack["FinancialAccount.CreateParams"] + cls, **params: Unpack["FinancialAccountCreateParams"] ) -> "FinancialAccount": """ Creates a new FinancialAccount. Each connected account can have up to three FinancialAccounts by default. @@ -990,7 +378,7 @@ def create( @classmethod async def create_async( - cls, **params: Unpack["FinancialAccount.CreateParams"] + cls, **params: Unpack["FinancialAccountCreateParams"] ) -> "FinancialAccount": """ Creates a new FinancialAccount. Each connected account can have up to three FinancialAccounts by default. @@ -1006,7 +394,7 @@ async def create_async( @classmethod def list( - cls, **params: Unpack["FinancialAccount.ListParams"] + cls, **params: Unpack["FinancialAccountListParams"] ) -> ListObject["FinancialAccount"]: """ Returns a list of FinancialAccounts. @@ -1026,7 +414,7 @@ def list( @classmethod async def list_async( - cls, **params: Unpack["FinancialAccount.ListParams"] + cls, **params: Unpack["FinancialAccountListParams"] ) -> ListObject["FinancialAccount"]: """ Returns a list of FinancialAccounts. @@ -1046,7 +434,7 @@ async def list_async( @classmethod def modify( - cls, id: str, **params: Unpack["FinancialAccount.ModifyParams"] + cls, id: str, **params: Unpack["FinancialAccountModifyParams"] ) -> "FinancialAccount": """ Updates the details of a FinancialAccount. @@ -1063,7 +451,7 @@ def modify( @classmethod async def modify_async( - cls, id: str, **params: Unpack["FinancialAccount.ModifyParams"] + cls, id: str, **params: Unpack["FinancialAccountModifyParams"] ) -> "FinancialAccount": """ Updates the details of a FinancialAccount. @@ -1080,7 +468,7 @@ async def modify_async( @classmethod def retrieve( - cls, id: str, **params: Unpack["FinancialAccount.RetrieveParams"] + cls, id: str, **params: Unpack["FinancialAccountRetrieveParams"] ) -> "FinancialAccount": """ Retrieves the details of a FinancialAccount. @@ -1091,7 +479,7 @@ def retrieve( @classmethod async def retrieve_async( - cls, id: str, **params: Unpack["FinancialAccount.RetrieveParams"] + cls, id: str, **params: Unpack["FinancialAccountRetrieveParams"] ) -> "FinancialAccount": """ Retrieves the details of a FinancialAccount. @@ -1104,7 +492,7 @@ async def retrieve_async( def _cls_retrieve_features( cls, financial_account: str, - **params: Unpack["FinancialAccount.RetrieveFeaturesParams"], + **params: Unpack["FinancialAccountRetrieveFeaturesParams"], ) -> "FinancialAccountFeatures": """ Retrieves Features information associated with the FinancialAccount. @@ -1124,7 +512,7 @@ def _cls_retrieve_features( @staticmethod def retrieve_features( financial_account: str, - **params: Unpack["FinancialAccount.RetrieveFeaturesParams"], + **params: Unpack["FinancialAccountRetrieveFeaturesParams"], ) -> "FinancialAccountFeatures": """ Retrieves Features information associated with the FinancialAccount. @@ -1133,7 +521,7 @@ def retrieve_features( @overload def retrieve_features( - self, **params: Unpack["FinancialAccount.RetrieveFeaturesParams"] + self, **params: Unpack["FinancialAccountRetrieveFeaturesParams"] ) -> "FinancialAccountFeatures": """ Retrieves Features information associated with the FinancialAccount. @@ -1142,7 +530,7 @@ def retrieve_features( @class_method_variant("_cls_retrieve_features") def retrieve_features( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["FinancialAccount.RetrieveFeaturesParams"] + self, **params: Unpack["FinancialAccountRetrieveFeaturesParams"] ) -> "FinancialAccountFeatures": """ Retrieves Features information associated with the FinancialAccount. @@ -1162,7 +550,7 @@ def retrieve_features( # pyright: ignore[reportGeneralTypeIssues] async def _cls_retrieve_features_async( cls, financial_account: str, - **params: Unpack["FinancialAccount.RetrieveFeaturesParams"], + **params: Unpack["FinancialAccountRetrieveFeaturesParams"], ) -> "FinancialAccountFeatures": """ Retrieves Features information associated with the FinancialAccount. @@ -1182,7 +570,7 @@ async def _cls_retrieve_features_async( @staticmethod async def retrieve_features_async( financial_account: str, - **params: Unpack["FinancialAccount.RetrieveFeaturesParams"], + **params: Unpack["FinancialAccountRetrieveFeaturesParams"], ) -> "FinancialAccountFeatures": """ Retrieves Features information associated with the FinancialAccount. @@ -1191,7 +579,7 @@ async def retrieve_features_async( @overload async def retrieve_features_async( - self, **params: Unpack["FinancialAccount.RetrieveFeaturesParams"] + self, **params: Unpack["FinancialAccountRetrieveFeaturesParams"] ) -> "FinancialAccountFeatures": """ Retrieves Features information associated with the FinancialAccount. @@ -1200,7 +588,7 @@ async def retrieve_features_async( @class_method_variant("_cls_retrieve_features_async") async def retrieve_features_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["FinancialAccount.RetrieveFeaturesParams"] + self, **params: Unpack["FinancialAccountRetrieveFeaturesParams"] ) -> "FinancialAccountFeatures": """ Retrieves Features information associated with the FinancialAccount. @@ -1220,7 +608,7 @@ async def retrieve_features_async( # pyright: ignore[reportGeneralTypeIssues] def _cls_update_features( cls, financial_account: str, - **params: Unpack["FinancialAccount.UpdateFeaturesParams"], + **params: Unpack["FinancialAccountUpdateFeaturesParams"], ) -> "FinancialAccountFeatures": """ Updates the Features associated with a FinancialAccount. @@ -1240,7 +628,7 @@ def _cls_update_features( @staticmethod def update_features( financial_account: str, - **params: Unpack["FinancialAccount.UpdateFeaturesParams"], + **params: Unpack["FinancialAccountUpdateFeaturesParams"], ) -> "FinancialAccountFeatures": """ Updates the Features associated with a FinancialAccount. @@ -1249,7 +637,7 @@ def update_features( @overload def update_features( - self, **params: Unpack["FinancialAccount.UpdateFeaturesParams"] + self, **params: Unpack["FinancialAccountUpdateFeaturesParams"] ) -> "FinancialAccountFeatures": """ Updates the Features associated with a FinancialAccount. @@ -1258,7 +646,7 @@ def update_features( @class_method_variant("_cls_update_features") def update_features( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["FinancialAccount.UpdateFeaturesParams"] + self, **params: Unpack["FinancialAccountUpdateFeaturesParams"] ) -> "FinancialAccountFeatures": """ Updates the Features associated with a FinancialAccount. @@ -1278,7 +666,7 @@ def update_features( # pyright: ignore[reportGeneralTypeIssues] async def _cls_update_features_async( cls, financial_account: str, - **params: Unpack["FinancialAccount.UpdateFeaturesParams"], + **params: Unpack["FinancialAccountUpdateFeaturesParams"], ) -> "FinancialAccountFeatures": """ Updates the Features associated with a FinancialAccount. @@ -1298,7 +686,7 @@ async def _cls_update_features_async( @staticmethod async def update_features_async( financial_account: str, - **params: Unpack["FinancialAccount.UpdateFeaturesParams"], + **params: Unpack["FinancialAccountUpdateFeaturesParams"], ) -> "FinancialAccountFeatures": """ Updates the Features associated with a FinancialAccount. @@ -1307,7 +695,7 @@ async def update_features_async( @overload async def update_features_async( - self, **params: Unpack["FinancialAccount.UpdateFeaturesParams"] + self, **params: Unpack["FinancialAccountUpdateFeaturesParams"] ) -> "FinancialAccountFeatures": """ Updates the Features associated with a FinancialAccount. @@ -1316,7 +704,7 @@ async def update_features_async( @class_method_variant("_cls_update_features_async") async def update_features_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["FinancialAccount.UpdateFeaturesParams"] + self, **params: Unpack["FinancialAccountUpdateFeaturesParams"] ) -> "FinancialAccountFeatures": """ Updates the Features associated with a FinancialAccount. diff --git a/stripe/treasury/_financial_account_features_service.py b/stripe/treasury/_financial_account_features_service.py index d9e793a8a..28e9a0c53 100644 --- a/stripe/treasury/_financial_account_features_service.py +++ b/stripe/treasury/_financial_account_features_service.py @@ -6,173 +6,23 @@ from stripe.treasury._financial_account_features import ( FinancialAccountFeatures, ) -from typing import List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params.treasury._financial_account_features_retrieve_params import ( + FinancialAccountFeaturesRetrieveParams, + ) + from stripe.params.treasury._financial_account_features_update_params import ( + FinancialAccountFeaturesUpdateParams, + ) -class FinancialAccountFeaturesService(StripeService): - class RetrieveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class UpdateParams(TypedDict): - card_issuing: NotRequired[ - "FinancialAccountFeaturesService.UpdateParamsCardIssuing" - ] - """ - Encodes the FinancialAccount's ability to be used with the Issuing product, including attaching cards to and drawing funds from the FinancialAccount. - """ - deposit_insurance: NotRequired[ - "FinancialAccountFeaturesService.UpdateParamsDepositInsurance" - ] - """ - Represents whether this FinancialAccount is eligible for deposit insurance. Various factors determine the insurance amount. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - financial_addresses: NotRequired[ - "FinancialAccountFeaturesService.UpdateParamsFinancialAddresses" - ] - """ - Contains Features that add FinancialAddresses to the FinancialAccount. - """ - inbound_transfers: NotRequired[ - "FinancialAccountFeaturesService.UpdateParamsInboundTransfers" - ] - """ - Contains settings related to adding funds to a FinancialAccount from another Account with the same owner. - """ - intra_stripe_flows: NotRequired[ - "FinancialAccountFeaturesService.UpdateParamsIntraStripeFlows" - ] - """ - Represents the ability for the FinancialAccount to send money to, or receive money from other FinancialAccounts (for example, via OutboundPayment). - """ - outbound_payments: NotRequired[ - "FinancialAccountFeaturesService.UpdateParamsOutboundPayments" - ] - """ - Includes Features related to initiating money movement out of the FinancialAccount to someone else's bucket of money. - """ - outbound_transfers: NotRequired[ - "FinancialAccountFeaturesService.UpdateParamsOutboundTransfers" - ] - """ - Contains a Feature and settings related to moving money out of the FinancialAccount into another Account with the same owner. - """ - - class UpdateParamsCardIssuing(TypedDict): - requested: bool - """ - Whether the FinancialAccount should have the Feature. - """ - - class UpdateParamsDepositInsurance(TypedDict): - requested: bool - """ - Whether the FinancialAccount should have the Feature. - """ - - class UpdateParamsFinancialAddresses(TypedDict): - aba: NotRequired[ - "FinancialAccountFeaturesService.UpdateParamsFinancialAddressesAba" - ] - """ - Adds an ABA FinancialAddress to the FinancialAccount. - """ - - class UpdateParamsFinancialAddressesAba(TypedDict): - bank: NotRequired[Literal["evolve", "fifth_third", "goldman_sachs"]] - """ - Requested bank partner - """ - requested: bool - """ - Whether the FinancialAccount should have the Feature. - """ - - class UpdateParamsInboundTransfers(TypedDict): - ach: NotRequired[ - "FinancialAccountFeaturesService.UpdateParamsInboundTransfersAch" - ] - """ - Enables ACH Debits via the InboundTransfers API. - """ - - class UpdateParamsInboundTransfersAch(TypedDict): - requested: bool - """ - Whether the FinancialAccount should have the Feature. - """ - - class UpdateParamsIntraStripeFlows(TypedDict): - requested: bool - """ - Whether the FinancialAccount should have the Feature. - """ - - class UpdateParamsOutboundPayments(TypedDict): - ach: NotRequired[ - "FinancialAccountFeaturesService.UpdateParamsOutboundPaymentsAch" - ] - """ - Enables ACH transfers via the OutboundPayments API. - """ - us_domestic_wire: NotRequired[ - "FinancialAccountFeaturesService.UpdateParamsOutboundPaymentsUsDomesticWire" - ] - """ - Enables US domestic wire transfers via the OutboundPayments API. - """ - - class UpdateParamsOutboundPaymentsAch(TypedDict): - requested: bool - """ - Whether the FinancialAccount should have the Feature. - """ - - class UpdateParamsOutboundPaymentsUsDomesticWire(TypedDict): - requested: bool - """ - Whether the FinancialAccount should have the Feature. - """ - - class UpdateParamsOutboundTransfers(TypedDict): - ach: NotRequired[ - "FinancialAccountFeaturesService.UpdateParamsOutboundTransfersAch" - ] - """ - Enables ACH transfers via the OutboundTransfers API. - """ - us_domestic_wire: NotRequired[ - "FinancialAccountFeaturesService.UpdateParamsOutboundTransfersUsDomesticWire" - ] - """ - Enables US domestic wire transfers via the OutboundTransfers API. - """ - - class UpdateParamsOutboundTransfersAch(TypedDict): - requested: bool - """ - Whether the FinancialAccount should have the Feature. - """ - - class UpdateParamsOutboundTransfersUsDomesticWire(TypedDict): - requested: bool - """ - Whether the FinancialAccount should have the Feature. - """ +class FinancialAccountFeaturesService(StripeService): def update( self, financial_account: str, - params: Optional[ - "FinancialAccountFeaturesService.UpdateParams" - ] = None, + params: Optional["FinancialAccountFeaturesUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> FinancialAccountFeatures: """ @@ -194,9 +44,7 @@ def update( async def update_async( self, financial_account: str, - params: Optional[ - "FinancialAccountFeaturesService.UpdateParams" - ] = None, + params: Optional["FinancialAccountFeaturesUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> FinancialAccountFeatures: """ @@ -218,9 +66,7 @@ async def update_async( def retrieve( self, financial_account: str, - params: Optional[ - "FinancialAccountFeaturesService.RetrieveParams" - ] = None, + params: Optional["FinancialAccountFeaturesRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> FinancialAccountFeatures: """ @@ -242,9 +88,7 @@ def retrieve( async def retrieve_async( self, financial_account: str, - params: Optional[ - "FinancialAccountFeaturesService.RetrieveParams" - ] = None, + params: Optional["FinancialAccountFeaturesRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> FinancialAccountFeatures: """ diff --git a/stripe/treasury/_financial_account_service.py b/stripe/treasury/_financial_account_service.py index 17c23cc71..d6d910996 100644 --- a/stripe/treasury/_financial_account_service.py +++ b/stripe/treasury/_financial_account_service.py @@ -8,8 +8,25 @@ from stripe.treasury._financial_account_features_service import ( FinancialAccountFeaturesService, ) -from typing import Dict, List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params.treasury._financial_account_close_params import ( + FinancialAccountCloseParams, + ) + from stripe.params.treasury._financial_account_create_params import ( + FinancialAccountCreateParams, + ) + from stripe.params.treasury._financial_account_list_params import ( + FinancialAccountListParams, + ) + from stripe.params.treasury._financial_account_retrieve_params import ( + FinancialAccountRetrieveParams, + ) + from stripe.params.treasury._financial_account_update_params import ( + FinancialAccountUpdateParams, + ) class FinancialAccountService(StripeService): @@ -17,477 +34,9 @@ def __init__(self, requestor): super().__init__(requestor) self.features = FinancialAccountFeaturesService(self._requestor) - class CloseParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - forwarding_settings: NotRequired[ - "FinancialAccountService.CloseParamsForwardingSettings" - ] - """ - A different bank account where funds can be deposited/debited in order to get the closing FA's balance to $0 - """ - - class CloseParamsForwardingSettings(TypedDict): - financial_account: NotRequired[str] - """ - The financial_account id - """ - payment_method: NotRequired[str] - """ - The payment_method or bank account id. This needs to be a verified bank account. - """ - type: Literal["financial_account", "payment_method"] - """ - The type of the bank account provided. This can be either "financial_account" or "payment_method" - """ - - class CreateParams(TypedDict): - display_name: NotRequired["Literal['']|str"] - """ - The display name for the FinancialAccount. Use this field to customize the names of the FinancialAccounts for your connected accounts. Unlike the `nickname` field, `display_name` is not internal metadata and will be exposed to connected accounts. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - features: NotRequired["FinancialAccountService.CreateParamsFeatures"] - """ - Encodes whether a FinancialAccount has access to a particular feature. Stripe or the platform can control features via the requested field. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - nickname: NotRequired["Literal['']|str"] - """ - The nickname for the FinancialAccount. - """ - platform_restrictions: NotRequired[ - "FinancialAccountService.CreateParamsPlatformRestrictions" - ] - """ - The set of functionalities that the platform can restrict on the FinancialAccount. - """ - supported_currencies: List[str] - """ - The currencies the FinancialAccount can hold a balance in. - """ - - class CreateParamsFeatures(TypedDict): - card_issuing: NotRequired[ - "FinancialAccountService.CreateParamsFeaturesCardIssuing" - ] - """ - Encodes the FinancialAccount's ability to be used with the Issuing product, including attaching cards to and drawing funds from the FinancialAccount. - """ - deposit_insurance: NotRequired[ - "FinancialAccountService.CreateParamsFeaturesDepositInsurance" - ] - """ - Represents whether this FinancialAccount is eligible for deposit insurance. Various factors determine the insurance amount. - """ - financial_addresses: NotRequired[ - "FinancialAccountService.CreateParamsFeaturesFinancialAddresses" - ] - """ - Contains Features that add FinancialAddresses to the FinancialAccount. - """ - inbound_transfers: NotRequired[ - "FinancialAccountService.CreateParamsFeaturesInboundTransfers" - ] - """ - Contains settings related to adding funds to a FinancialAccount from another Account with the same owner. - """ - intra_stripe_flows: NotRequired[ - "FinancialAccountService.CreateParamsFeaturesIntraStripeFlows" - ] - """ - Represents the ability for the FinancialAccount to send money to, or receive money from other FinancialAccounts (for example, via OutboundPayment). - """ - outbound_payments: NotRequired[ - "FinancialAccountService.CreateParamsFeaturesOutboundPayments" - ] - """ - Includes Features related to initiating money movement out of the FinancialAccount to someone else's bucket of money. - """ - outbound_transfers: NotRequired[ - "FinancialAccountService.CreateParamsFeaturesOutboundTransfers" - ] - """ - Contains a Feature and settings related to moving money out of the FinancialAccount into another Account with the same owner. - """ - - class CreateParamsFeaturesCardIssuing(TypedDict): - requested: bool - """ - Whether the FinancialAccount should have the Feature. - """ - - class CreateParamsFeaturesDepositInsurance(TypedDict): - requested: bool - """ - Whether the FinancialAccount should have the Feature. - """ - - class CreateParamsFeaturesFinancialAddresses(TypedDict): - aba: NotRequired[ - "FinancialAccountService.CreateParamsFeaturesFinancialAddressesAba" - ] - """ - Adds an ABA FinancialAddress to the FinancialAccount. - """ - - class CreateParamsFeaturesFinancialAddressesAba(TypedDict): - bank: NotRequired[Literal["evolve", "fifth_third", "goldman_sachs"]] - """ - Requested bank partner - """ - requested: bool - """ - Whether the FinancialAccount should have the Feature. - """ - - class CreateParamsFeaturesInboundTransfers(TypedDict): - ach: NotRequired[ - "FinancialAccountService.CreateParamsFeaturesInboundTransfersAch" - ] - """ - Enables ACH Debits via the InboundTransfers API. - """ - - class CreateParamsFeaturesInboundTransfersAch(TypedDict): - requested: bool - """ - Whether the FinancialAccount should have the Feature. - """ - - class CreateParamsFeaturesIntraStripeFlows(TypedDict): - requested: bool - """ - Whether the FinancialAccount should have the Feature. - """ - - class CreateParamsFeaturesOutboundPayments(TypedDict): - ach: NotRequired[ - "FinancialAccountService.CreateParamsFeaturesOutboundPaymentsAch" - ] - """ - Enables ACH transfers via the OutboundPayments API. - """ - us_domestic_wire: NotRequired[ - "FinancialAccountService.CreateParamsFeaturesOutboundPaymentsUsDomesticWire" - ] - """ - Enables US domestic wire transfers via the OutboundPayments API. - """ - - class CreateParamsFeaturesOutboundPaymentsAch(TypedDict): - requested: bool - """ - Whether the FinancialAccount should have the Feature. - """ - - class CreateParamsFeaturesOutboundPaymentsUsDomesticWire(TypedDict): - requested: bool - """ - Whether the FinancialAccount should have the Feature. - """ - - class CreateParamsFeaturesOutboundTransfers(TypedDict): - ach: NotRequired[ - "FinancialAccountService.CreateParamsFeaturesOutboundTransfersAch" - ] - """ - Enables ACH transfers via the OutboundTransfers API. - """ - us_domestic_wire: NotRequired[ - "FinancialAccountService.CreateParamsFeaturesOutboundTransfersUsDomesticWire" - ] - """ - Enables US domestic wire transfers via the OutboundTransfers API. - """ - - class CreateParamsFeaturesOutboundTransfersAch(TypedDict): - requested: bool - """ - Whether the FinancialAccount should have the Feature. - """ - - class CreateParamsFeaturesOutboundTransfersUsDomesticWire(TypedDict): - requested: bool - """ - Whether the FinancialAccount should have the Feature. - """ - - class CreateParamsPlatformRestrictions(TypedDict): - inbound_flows: NotRequired[Literal["restricted", "unrestricted"]] - """ - Restricts all inbound money movement. - """ - outbound_flows: NotRequired[Literal["restricted", "unrestricted"]] - """ - Restricts all outbound money movement. - """ - - class ListParams(TypedDict): - created: NotRequired["FinancialAccountService.ListParamsCreated|int"] - """ - Only return FinancialAccounts that were created during the given date interval. - """ - ending_before: NotRequired[str] - """ - An object ID cursor for use in pagination. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - limit: NotRequired[int] - """ - A limit ranging from 1 to 100 (defaults to 10). - """ - starting_after: NotRequired[str] - """ - An object ID cursor for use in pagination. - """ - status: NotRequired[Literal["closed", "open"]] - """ - Only return FinancialAccounts that have the given status: `open` or `closed` - """ - - class ListParamsCreated(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) - """ - - class RetrieveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class UpdateParams(TypedDict): - display_name: NotRequired["Literal['']|str"] - """ - The display name for the FinancialAccount. Use this field to customize the names of the FinancialAccounts for your connected accounts. Unlike the `nickname` field, `display_name` is not internal metadata and will be exposed to connected accounts. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - features: NotRequired["FinancialAccountService.UpdateParamsFeatures"] - """ - Encodes whether a FinancialAccount has access to a particular feature, with a status enum and associated `status_details`. Stripe or the platform may control features via the requested field. - """ - forwarding_settings: NotRequired[ - "FinancialAccountService.UpdateParamsForwardingSettings" - ] - """ - A different bank account where funds can be deposited/debited in order to get the closing FA's balance to $0 - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - nickname: NotRequired["Literal['']|str"] - """ - The nickname for the FinancialAccount. - """ - platform_restrictions: NotRequired[ - "FinancialAccountService.UpdateParamsPlatformRestrictions" - ] - """ - The set of functionalities that the platform can restrict on the FinancialAccount. - """ - - class UpdateParamsFeatures(TypedDict): - card_issuing: NotRequired[ - "FinancialAccountService.UpdateParamsFeaturesCardIssuing" - ] - """ - Encodes the FinancialAccount's ability to be used with the Issuing product, including attaching cards to and drawing funds from the FinancialAccount. - """ - deposit_insurance: NotRequired[ - "FinancialAccountService.UpdateParamsFeaturesDepositInsurance" - ] - """ - Represents whether this FinancialAccount is eligible for deposit insurance. Various factors determine the insurance amount. - """ - financial_addresses: NotRequired[ - "FinancialAccountService.UpdateParamsFeaturesFinancialAddresses" - ] - """ - Contains Features that add FinancialAddresses to the FinancialAccount. - """ - inbound_transfers: NotRequired[ - "FinancialAccountService.UpdateParamsFeaturesInboundTransfers" - ] - """ - Contains settings related to adding funds to a FinancialAccount from another Account with the same owner. - """ - intra_stripe_flows: NotRequired[ - "FinancialAccountService.UpdateParamsFeaturesIntraStripeFlows" - ] - """ - Represents the ability for the FinancialAccount to send money to, or receive money from other FinancialAccounts (for example, via OutboundPayment). - """ - outbound_payments: NotRequired[ - "FinancialAccountService.UpdateParamsFeaturesOutboundPayments" - ] - """ - Includes Features related to initiating money movement out of the FinancialAccount to someone else's bucket of money. - """ - outbound_transfers: NotRequired[ - "FinancialAccountService.UpdateParamsFeaturesOutboundTransfers" - ] - """ - Contains a Feature and settings related to moving money out of the FinancialAccount into another Account with the same owner. - """ - - class UpdateParamsFeaturesCardIssuing(TypedDict): - requested: bool - """ - Whether the FinancialAccount should have the Feature. - """ - - class UpdateParamsFeaturesDepositInsurance(TypedDict): - requested: bool - """ - Whether the FinancialAccount should have the Feature. - """ - - class UpdateParamsFeaturesFinancialAddresses(TypedDict): - aba: NotRequired[ - "FinancialAccountService.UpdateParamsFeaturesFinancialAddressesAba" - ] - """ - Adds an ABA FinancialAddress to the FinancialAccount. - """ - - class UpdateParamsFeaturesFinancialAddressesAba(TypedDict): - bank: NotRequired[Literal["evolve", "fifth_third", "goldman_sachs"]] - """ - Requested bank partner - """ - requested: bool - """ - Whether the FinancialAccount should have the Feature. - """ - - class UpdateParamsFeaturesInboundTransfers(TypedDict): - ach: NotRequired[ - "FinancialAccountService.UpdateParamsFeaturesInboundTransfersAch" - ] - """ - Enables ACH Debits via the InboundTransfers API. - """ - - class UpdateParamsFeaturesInboundTransfersAch(TypedDict): - requested: bool - """ - Whether the FinancialAccount should have the Feature. - """ - - class UpdateParamsFeaturesIntraStripeFlows(TypedDict): - requested: bool - """ - Whether the FinancialAccount should have the Feature. - """ - - class UpdateParamsFeaturesOutboundPayments(TypedDict): - ach: NotRequired[ - "FinancialAccountService.UpdateParamsFeaturesOutboundPaymentsAch" - ] - """ - Enables ACH transfers via the OutboundPayments API. - """ - us_domestic_wire: NotRequired[ - "FinancialAccountService.UpdateParamsFeaturesOutboundPaymentsUsDomesticWire" - ] - """ - Enables US domestic wire transfers via the OutboundPayments API. - """ - - class UpdateParamsFeaturesOutboundPaymentsAch(TypedDict): - requested: bool - """ - Whether the FinancialAccount should have the Feature. - """ - - class UpdateParamsFeaturesOutboundPaymentsUsDomesticWire(TypedDict): - requested: bool - """ - Whether the FinancialAccount should have the Feature. - """ - - class UpdateParamsFeaturesOutboundTransfers(TypedDict): - ach: NotRequired[ - "FinancialAccountService.UpdateParamsFeaturesOutboundTransfersAch" - ] - """ - Enables ACH transfers via the OutboundTransfers API. - """ - us_domestic_wire: NotRequired[ - "FinancialAccountService.UpdateParamsFeaturesOutboundTransfersUsDomesticWire" - ] - """ - Enables US domestic wire transfers via the OutboundTransfers API. - """ - - class UpdateParamsFeaturesOutboundTransfersAch(TypedDict): - requested: bool - """ - Whether the FinancialAccount should have the Feature. - """ - - class UpdateParamsFeaturesOutboundTransfersUsDomesticWire(TypedDict): - requested: bool - """ - Whether the FinancialAccount should have the Feature. - """ - - class UpdateParamsForwardingSettings(TypedDict): - financial_account: NotRequired[str] - """ - The financial_account id - """ - payment_method: NotRequired[str] - """ - The payment_method or bank account id. This needs to be a verified bank account. - """ - type: Literal["financial_account", "payment_method"] - """ - The type of the bank account provided. This can be either "financial_account" or "payment_method" - """ - - class UpdateParamsPlatformRestrictions(TypedDict): - inbound_flows: NotRequired[Literal["restricted", "unrestricted"]] - """ - Restricts all inbound money movement. - """ - outbound_flows: NotRequired[Literal["restricted", "unrestricted"]] - """ - Restricts all outbound money movement. - """ - def list( self, - params: Optional["FinancialAccountService.ListParams"] = None, + params: Optional["FinancialAccountListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[FinancialAccount]: """ @@ -506,7 +55,7 @@ def list( async def list_async( self, - params: Optional["FinancialAccountService.ListParams"] = None, + params: Optional["FinancialAccountListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[FinancialAccount]: """ @@ -525,7 +74,7 @@ async def list_async( def create( self, - params: "FinancialAccountService.CreateParams", + params: "FinancialAccountCreateParams", options: Optional[RequestOptions] = None, ) -> FinancialAccount: """ @@ -544,7 +93,7 @@ def create( async def create_async( self, - params: "FinancialAccountService.CreateParams", + params: "FinancialAccountCreateParams", options: Optional[RequestOptions] = None, ) -> FinancialAccount: """ @@ -564,7 +113,7 @@ async def create_async( def retrieve( self, financial_account: str, - params: Optional["FinancialAccountService.RetrieveParams"] = None, + params: Optional["FinancialAccountRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> FinancialAccount: """ @@ -586,7 +135,7 @@ def retrieve( async def retrieve_async( self, financial_account: str, - params: Optional["FinancialAccountService.RetrieveParams"] = None, + params: Optional["FinancialAccountRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> FinancialAccount: """ @@ -608,7 +157,7 @@ async def retrieve_async( def update( self, financial_account: str, - params: Optional["FinancialAccountService.UpdateParams"] = None, + params: Optional["FinancialAccountUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> FinancialAccount: """ @@ -630,7 +179,7 @@ def update( async def update_async( self, financial_account: str, - params: Optional["FinancialAccountService.UpdateParams"] = None, + params: Optional["FinancialAccountUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> FinancialAccount: """ @@ -652,7 +201,7 @@ async def update_async( def close( self, financial_account: str, - params: Optional["FinancialAccountService.CloseParams"] = None, + params: Optional["FinancialAccountCloseParams"] = None, options: Optional[RequestOptions] = None, ) -> FinancialAccount: """ @@ -674,7 +223,7 @@ def close( async def close_async( self, financial_account: str, - params: Optional["FinancialAccountService.CloseParams"] = None, + params: Optional["FinancialAccountCloseParams"] = None, options: Optional[RequestOptions] = None, ) -> FinancialAccount: """ diff --git a/stripe/treasury/_inbound_transfer.py b/stripe/treasury/_inbound_transfer.py index 53475455f..2c06ec5fb 100644 --- a/stripe/treasury/_inbound_transfer.py +++ b/stripe/treasury/_inbound_transfer.py @@ -4,22 +4,35 @@ from stripe._expandable_field import ExpandableField from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource -from stripe._request_options import RequestOptions from stripe._stripe_object import StripeObject from stripe._test_helpers import APIResourceTestHelpers from stripe._util import class_method_variant, sanitize_id -from typing import ClassVar, Dict, List, Optional, cast, overload -from typing_extensions import ( - Literal, - NotRequired, - Type, - TypedDict, - Unpack, - TYPE_CHECKING, -) +from typing import ClassVar, Dict, Optional, cast, overload +from typing_extensions import Literal, Type, Unpack, TYPE_CHECKING if TYPE_CHECKING: from stripe._mandate import Mandate + from stripe.params.treasury._inbound_transfer_cancel_params import ( + InboundTransferCancelParams, + ) + from stripe.params.treasury._inbound_transfer_create_params import ( + InboundTransferCreateParams, + ) + from stripe.params.treasury._inbound_transfer_fail_params import ( + InboundTransferFailParams, + ) + from stripe.params.treasury._inbound_transfer_list_params import ( + InboundTransferListParams, + ) + from stripe.params.treasury._inbound_transfer_retrieve_params import ( + InboundTransferRetrieveParams, + ) + from stripe.params.treasury._inbound_transfer_return_inbound_transfer_params import ( + InboundTransferReturnInboundTransferParams, + ) + from stripe.params.treasury._inbound_transfer_succeed_params import ( + InboundTransferSucceedParams, + ) from stripe.treasury._transaction import Transaction @@ -161,126 +174,6 @@ class StatusTransitions(StripeObject): Timestamp describing when an InboundTransfer changed status to `succeeded`. """ - class CancelParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class CreateParams(RequestOptions): - amount: int - """ - Amount (in cents) to be transferred. - """ - 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). - """ - description: NotRequired[str] - """ - An arbitrary string attached to the object. Often useful for displaying to users. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - financial_account: str - """ - The FinancialAccount to send funds to. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - origin_payment_method: str - """ - The origin payment method to be debited for the InboundTransfer. - """ - statement_descriptor: NotRequired[str] - """ - The complete description that appears on your customers' statements. Maximum 10 characters. - """ - - class FailParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - failure_details: NotRequired[ - "InboundTransfer.FailParamsFailureDetails" - ] - """ - Details about a failed InboundTransfer. - """ - - class FailParamsFailureDetails(TypedDict): - code: NotRequired[ - Literal[ - "account_closed", - "account_frozen", - "bank_account_restricted", - "bank_ownership_changed", - "debit_not_authorized", - "incorrect_account_holder_address", - "incorrect_account_holder_name", - "incorrect_account_holder_tax_id", - "insufficient_funds", - "invalid_account_number", - "invalid_currency", - "no_account", - "other", - ] - ] - """ - Reason for the failure. - """ - - class ListParams(RequestOptions): - 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. - """ - financial_account: str - """ - Returns objects associated with this FinancialAccount. - """ - 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. - """ - status: NotRequired[ - Literal["canceled", "failed", "processing", "succeeded"] - ] - """ - Only return InboundTransfers that have the given status: `processing`, `succeeded`, `failed` or `canceled`. - """ - - class RetrieveParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class ReturnInboundTransferParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class SucceedParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - amount: int """ Amount (in cents) transferred. @@ -360,7 +253,7 @@ class SucceedParams(RequestOptions): def _cls_cancel( cls, inbound_transfer: str, - **params: Unpack["InboundTransfer.CancelParams"], + **params: Unpack["InboundTransferCancelParams"], ) -> "InboundTransfer": """ Cancels an InboundTransfer. @@ -379,7 +272,7 @@ def _cls_cancel( @overload @staticmethod def cancel( - inbound_transfer: str, **params: Unpack["InboundTransfer.CancelParams"] + inbound_transfer: str, **params: Unpack["InboundTransferCancelParams"] ) -> "InboundTransfer": """ Cancels an InboundTransfer. @@ -388,7 +281,7 @@ def cancel( @overload def cancel( - self, **params: Unpack["InboundTransfer.CancelParams"] + self, **params: Unpack["InboundTransferCancelParams"] ) -> "InboundTransfer": """ Cancels an InboundTransfer. @@ -397,7 +290,7 @@ def cancel( @class_method_variant("_cls_cancel") def cancel( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["InboundTransfer.CancelParams"] + self, **params: Unpack["InboundTransferCancelParams"] ) -> "InboundTransfer": """ Cancels an InboundTransfer. @@ -417,7 +310,7 @@ def cancel( # pyright: ignore[reportGeneralTypeIssues] async def _cls_cancel_async( cls, inbound_transfer: str, - **params: Unpack["InboundTransfer.CancelParams"], + **params: Unpack["InboundTransferCancelParams"], ) -> "InboundTransfer": """ Cancels an InboundTransfer. @@ -436,7 +329,7 @@ async def _cls_cancel_async( @overload @staticmethod async def cancel_async( - inbound_transfer: str, **params: Unpack["InboundTransfer.CancelParams"] + inbound_transfer: str, **params: Unpack["InboundTransferCancelParams"] ) -> "InboundTransfer": """ Cancels an InboundTransfer. @@ -445,7 +338,7 @@ async def cancel_async( @overload async def cancel_async( - self, **params: Unpack["InboundTransfer.CancelParams"] + self, **params: Unpack["InboundTransferCancelParams"] ) -> "InboundTransfer": """ Cancels an InboundTransfer. @@ -454,7 +347,7 @@ async def cancel_async( @class_method_variant("_cls_cancel_async") async def cancel_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["InboundTransfer.CancelParams"] + self, **params: Unpack["InboundTransferCancelParams"] ) -> "InboundTransfer": """ Cancels an InboundTransfer. @@ -472,7 +365,7 @@ async def cancel_async( # pyright: ignore[reportGeneralTypeIssues] @classmethod def create( - cls, **params: Unpack["InboundTransfer.CreateParams"] + cls, **params: Unpack["InboundTransferCreateParams"] ) -> "InboundTransfer": """ Creates an InboundTransfer. @@ -488,7 +381,7 @@ def create( @classmethod async def create_async( - cls, **params: Unpack["InboundTransfer.CreateParams"] + cls, **params: Unpack["InboundTransferCreateParams"] ) -> "InboundTransfer": """ Creates an InboundTransfer. @@ -504,7 +397,7 @@ async def create_async( @classmethod def list( - cls, **params: Unpack["InboundTransfer.ListParams"] + cls, **params: Unpack["InboundTransferListParams"] ) -> ListObject["InboundTransfer"]: """ Returns a list of InboundTransfers sent from the specified FinancialAccount. @@ -524,7 +417,7 @@ def list( @classmethod async def list_async( - cls, **params: Unpack["InboundTransfer.ListParams"] + cls, **params: Unpack["InboundTransferListParams"] ) -> ListObject["InboundTransfer"]: """ Returns a list of InboundTransfers sent from the specified FinancialAccount. @@ -544,7 +437,7 @@ async def list_async( @classmethod def retrieve( - cls, id: str, **params: Unpack["InboundTransfer.RetrieveParams"] + cls, id: str, **params: Unpack["InboundTransferRetrieveParams"] ) -> "InboundTransfer": """ Retrieves the details of an existing InboundTransfer. @@ -555,7 +448,7 @@ def retrieve( @classmethod async def retrieve_async( - cls, id: str, **params: Unpack["InboundTransfer.RetrieveParams"] + cls, id: str, **params: Unpack["InboundTransferRetrieveParams"] ) -> "InboundTransfer": """ Retrieves the details of an existing InboundTransfer. @@ -569,7 +462,7 @@ class TestHelpers(APIResourceTestHelpers["InboundTransfer"]): @classmethod def _cls_fail( - cls, id: str, **params: Unpack["InboundTransfer.FailParams"] + cls, id: str, **params: Unpack["InboundTransferFailParams"] ) -> "InboundTransfer": """ Transitions a test mode created InboundTransfer to the failed status. The InboundTransfer must already be in the processing state. @@ -588,7 +481,7 @@ def _cls_fail( @overload @staticmethod def fail( - id: str, **params: Unpack["InboundTransfer.FailParams"] + id: str, **params: Unpack["InboundTransferFailParams"] ) -> "InboundTransfer": """ Transitions a test mode created InboundTransfer to the failed status. The InboundTransfer must already be in the processing state. @@ -597,7 +490,7 @@ def fail( @overload def fail( - self, **params: Unpack["InboundTransfer.FailParams"] + self, **params: Unpack["InboundTransferFailParams"] ) -> "InboundTransfer": """ Transitions a test mode created InboundTransfer to the failed status. The InboundTransfer must already be in the processing state. @@ -606,7 +499,7 @@ def fail( @class_method_variant("_cls_fail") def fail( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["InboundTransfer.FailParams"] + self, **params: Unpack["InboundTransferFailParams"] ) -> "InboundTransfer": """ Transitions a test mode created InboundTransfer to the failed status. The InboundTransfer must already be in the processing state. @@ -624,7 +517,7 @@ def fail( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_fail_async( - cls, id: str, **params: Unpack["InboundTransfer.FailParams"] + cls, id: str, **params: Unpack["InboundTransferFailParams"] ) -> "InboundTransfer": """ Transitions a test mode created InboundTransfer to the failed status. The InboundTransfer must already be in the processing state. @@ -643,7 +536,7 @@ async def _cls_fail_async( @overload @staticmethod async def fail_async( - id: str, **params: Unpack["InboundTransfer.FailParams"] + id: str, **params: Unpack["InboundTransferFailParams"] ) -> "InboundTransfer": """ Transitions a test mode created InboundTransfer to the failed status. The InboundTransfer must already be in the processing state. @@ -652,7 +545,7 @@ async def fail_async( @overload async def fail_async( - self, **params: Unpack["InboundTransfer.FailParams"] + self, **params: Unpack["InboundTransferFailParams"] ) -> "InboundTransfer": """ Transitions a test mode created InboundTransfer to the failed status. The InboundTransfer must already be in the processing state. @@ -661,7 +554,7 @@ async def fail_async( @class_method_variant("_cls_fail_async") async def fail_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["InboundTransfer.FailParams"] + self, **params: Unpack["InboundTransferFailParams"] ) -> "InboundTransfer": """ Transitions a test mode created InboundTransfer to the failed status. The InboundTransfer must already be in the processing state. @@ -681,7 +574,7 @@ async def fail_async( # pyright: ignore[reportGeneralTypeIssues] def _cls_return_inbound_transfer( cls, id: str, - **params: Unpack["InboundTransfer.ReturnInboundTransferParams"], + **params: Unpack["InboundTransferReturnInboundTransferParams"], ) -> "InboundTransfer": """ Marks the test mode InboundTransfer object as returned and links the InboundTransfer to a ReceivedDebit. The InboundTransfer must already be in the succeeded state. @@ -701,7 +594,7 @@ def _cls_return_inbound_transfer( @staticmethod def return_inbound_transfer( id: str, - **params: Unpack["InboundTransfer.ReturnInboundTransferParams"], + **params: Unpack["InboundTransferReturnInboundTransferParams"], ) -> "InboundTransfer": """ Marks the test mode InboundTransfer object as returned and links the InboundTransfer to a ReceivedDebit. The InboundTransfer must already be in the succeeded state. @@ -711,7 +604,7 @@ def return_inbound_transfer( @overload def return_inbound_transfer( self, - **params: Unpack["InboundTransfer.ReturnInboundTransferParams"], + **params: Unpack["InboundTransferReturnInboundTransferParams"], ) -> "InboundTransfer": """ Marks the test mode InboundTransfer object as returned and links the InboundTransfer to a ReceivedDebit. The InboundTransfer must already be in the succeeded state. @@ -721,7 +614,7 @@ def return_inbound_transfer( @class_method_variant("_cls_return_inbound_transfer") def return_inbound_transfer( # pyright: ignore[reportGeneralTypeIssues] self, - **params: Unpack["InboundTransfer.ReturnInboundTransferParams"], + **params: Unpack["InboundTransferReturnInboundTransferParams"], ) -> "InboundTransfer": """ Marks the test mode InboundTransfer object as returned and links the InboundTransfer to a ReceivedDebit. The InboundTransfer must already be in the succeeded state. @@ -741,7 +634,7 @@ def return_inbound_transfer( # pyright: ignore[reportGeneralTypeIssues] async def _cls_return_inbound_transfer_async( cls, id: str, - **params: Unpack["InboundTransfer.ReturnInboundTransferParams"], + **params: Unpack["InboundTransferReturnInboundTransferParams"], ) -> "InboundTransfer": """ Marks the test mode InboundTransfer object as returned and links the InboundTransfer to a ReceivedDebit. The InboundTransfer must already be in the succeeded state. @@ -761,7 +654,7 @@ async def _cls_return_inbound_transfer_async( @staticmethod async def return_inbound_transfer_async( id: str, - **params: Unpack["InboundTransfer.ReturnInboundTransferParams"], + **params: Unpack["InboundTransferReturnInboundTransferParams"], ) -> "InboundTransfer": """ Marks the test mode InboundTransfer object as returned and links the InboundTransfer to a ReceivedDebit. The InboundTransfer must already be in the succeeded state. @@ -771,7 +664,7 @@ async def return_inbound_transfer_async( @overload async def return_inbound_transfer_async( self, - **params: Unpack["InboundTransfer.ReturnInboundTransferParams"], + **params: Unpack["InboundTransferReturnInboundTransferParams"], ) -> "InboundTransfer": """ Marks the test mode InboundTransfer object as returned and links the InboundTransfer to a ReceivedDebit. The InboundTransfer must already be in the succeeded state. @@ -781,7 +674,7 @@ async def return_inbound_transfer_async( @class_method_variant("_cls_return_inbound_transfer_async") async def return_inbound_transfer_async( # pyright: ignore[reportGeneralTypeIssues] self, - **params: Unpack["InboundTransfer.ReturnInboundTransferParams"], + **params: Unpack["InboundTransferReturnInboundTransferParams"], ) -> "InboundTransfer": """ Marks the test mode InboundTransfer object as returned and links the InboundTransfer to a ReceivedDebit. The InboundTransfer must already be in the succeeded state. @@ -799,7 +692,7 @@ async def return_inbound_transfer_async( # pyright: ignore[reportGeneralTypeIss @classmethod def _cls_succeed( - cls, id: str, **params: Unpack["InboundTransfer.SucceedParams"] + cls, id: str, **params: Unpack["InboundTransferSucceedParams"] ) -> "InboundTransfer": """ Transitions a test mode created InboundTransfer to the succeeded status. The InboundTransfer must already be in the processing state. @@ -818,7 +711,7 @@ def _cls_succeed( @overload @staticmethod def succeed( - id: str, **params: Unpack["InboundTransfer.SucceedParams"] + id: str, **params: Unpack["InboundTransferSucceedParams"] ) -> "InboundTransfer": """ Transitions a test mode created InboundTransfer to the succeeded status. The InboundTransfer must already be in the processing state. @@ -827,7 +720,7 @@ def succeed( @overload def succeed( - self, **params: Unpack["InboundTransfer.SucceedParams"] + self, **params: Unpack["InboundTransferSucceedParams"] ) -> "InboundTransfer": """ Transitions a test mode created InboundTransfer to the succeeded status. The InboundTransfer must already be in the processing state. @@ -836,7 +729,7 @@ def succeed( @class_method_variant("_cls_succeed") def succeed( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["InboundTransfer.SucceedParams"] + self, **params: Unpack["InboundTransferSucceedParams"] ) -> "InboundTransfer": """ Transitions a test mode created InboundTransfer to the succeeded status. The InboundTransfer must already be in the processing state. @@ -854,7 +747,7 @@ def succeed( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_succeed_async( - cls, id: str, **params: Unpack["InboundTransfer.SucceedParams"] + cls, id: str, **params: Unpack["InboundTransferSucceedParams"] ) -> "InboundTransfer": """ Transitions a test mode created InboundTransfer to the succeeded status. The InboundTransfer must already be in the processing state. @@ -873,7 +766,7 @@ async def _cls_succeed_async( @overload @staticmethod async def succeed_async( - id: str, **params: Unpack["InboundTransfer.SucceedParams"] + id: str, **params: Unpack["InboundTransferSucceedParams"] ) -> "InboundTransfer": """ Transitions a test mode created InboundTransfer to the succeeded status. The InboundTransfer must already be in the processing state. @@ -882,7 +775,7 @@ async def succeed_async( @overload async def succeed_async( - self, **params: Unpack["InboundTransfer.SucceedParams"] + self, **params: Unpack["InboundTransferSucceedParams"] ) -> "InboundTransfer": """ Transitions a test mode created InboundTransfer to the succeeded status. The InboundTransfer must already be in the processing state. @@ -891,7 +784,7 @@ async def succeed_async( @class_method_variant("_cls_succeed_async") async def succeed_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["InboundTransfer.SucceedParams"] + self, **params: Unpack["InboundTransferSucceedParams"] ) -> "InboundTransfer": """ Transitions a test mode created InboundTransfer to the succeeded status. The InboundTransfer must already be in the processing state. diff --git a/stripe/treasury/_inbound_transfer_service.py b/stripe/treasury/_inbound_transfer_service.py index 3625c9d4c..171fd7f34 100644 --- a/stripe/treasury/_inbound_transfer_service.py +++ b/stripe/treasury/_inbound_transfer_service.py @@ -5,88 +5,28 @@ from stripe._stripe_service import StripeService from stripe._util import sanitize_id from stripe.treasury._inbound_transfer import InboundTransfer -from typing import Dict, List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params.treasury._inbound_transfer_cancel_params import ( + InboundTransferCancelParams, + ) + from stripe.params.treasury._inbound_transfer_create_params import ( + InboundTransferCreateParams, + ) + from stripe.params.treasury._inbound_transfer_list_params import ( + InboundTransferListParams, + ) + from stripe.params.treasury._inbound_transfer_retrieve_params import ( + InboundTransferRetrieveParams, + ) -class InboundTransferService(StripeService): - class CancelParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class CreateParams(TypedDict): - amount: int - """ - Amount (in cents) to be transferred. - """ - 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). - """ - description: NotRequired[str] - """ - An arbitrary string attached to the object. Often useful for displaying to users. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - financial_account: str - """ - The FinancialAccount to send funds to. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - origin_payment_method: str - """ - The origin payment method to be debited for the InboundTransfer. - """ - statement_descriptor: NotRequired[str] - """ - The complete description that appears on your customers' statements. Maximum 10 characters. - """ - - class ListParams(TypedDict): - 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. - """ - financial_account: str - """ - Returns objects associated with this FinancialAccount. - """ - 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. - """ - status: NotRequired[ - Literal["canceled", "failed", "processing", "succeeded"] - ] - """ - Only return InboundTransfers that have the given status: `processing`, `succeeded`, `failed` or `canceled`. - """ - - class RetrieveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ +class InboundTransferService(StripeService): def list( self, - params: "InboundTransferService.ListParams", + params: "InboundTransferListParams", options: Optional[RequestOptions] = None, ) -> ListObject[InboundTransfer]: """ @@ -105,7 +45,7 @@ def list( async def list_async( self, - params: "InboundTransferService.ListParams", + params: "InboundTransferListParams", options: Optional[RequestOptions] = None, ) -> ListObject[InboundTransfer]: """ @@ -124,7 +64,7 @@ async def list_async( def create( self, - params: "InboundTransferService.CreateParams", + params: "InboundTransferCreateParams", options: Optional[RequestOptions] = None, ) -> InboundTransfer: """ @@ -143,7 +83,7 @@ def create( async def create_async( self, - params: "InboundTransferService.CreateParams", + params: "InboundTransferCreateParams", options: Optional[RequestOptions] = None, ) -> InboundTransfer: """ @@ -163,7 +103,7 @@ async def create_async( def retrieve( self, id: str, - params: Optional["InboundTransferService.RetrieveParams"] = None, + params: Optional["InboundTransferRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> InboundTransfer: """ @@ -185,7 +125,7 @@ def retrieve( async def retrieve_async( self, id: str, - params: Optional["InboundTransferService.RetrieveParams"] = None, + params: Optional["InboundTransferRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> InboundTransfer: """ @@ -207,7 +147,7 @@ async def retrieve_async( def cancel( self, inbound_transfer: str, - params: Optional["InboundTransferService.CancelParams"] = None, + params: Optional["InboundTransferCancelParams"] = None, options: Optional[RequestOptions] = None, ) -> InboundTransfer: """ @@ -229,7 +169,7 @@ def cancel( async def cancel_async( self, inbound_transfer: str, - params: Optional["InboundTransferService.CancelParams"] = None, + params: Optional["InboundTransferCancelParams"] = None, options: Optional[RequestOptions] = None, ) -> InboundTransfer: """ diff --git a/stripe/treasury/_outbound_payment.py b/stripe/treasury/_outbound_payment.py index 38cb5d51e..08a834cdc 100644 --- a/stripe/treasury/_outbound_payment.py +++ b/stripe/treasury/_outbound_payment.py @@ -4,22 +4,38 @@ from stripe._expandable_field import ExpandableField from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource -from stripe._request_options import RequestOptions from stripe._stripe_object import StripeObject from stripe._test_helpers import APIResourceTestHelpers from stripe._util import class_method_variant, sanitize_id -from typing import ClassVar, Dict, List, Optional, cast, overload -from typing_extensions import ( - Literal, - NotRequired, - Type, - TypedDict, - Unpack, - TYPE_CHECKING, -) +from typing import ClassVar, Dict, Optional, cast, overload +from typing_extensions import Literal, Type, Unpack, TYPE_CHECKING if TYPE_CHECKING: from stripe._mandate import Mandate + from stripe.params.treasury._outbound_payment_cancel_params import ( + OutboundPaymentCancelParams, + ) + from stripe.params.treasury._outbound_payment_create_params import ( + OutboundPaymentCreateParams, + ) + from stripe.params.treasury._outbound_payment_fail_params import ( + OutboundPaymentFailParams, + ) + from stripe.params.treasury._outbound_payment_list_params import ( + OutboundPaymentListParams, + ) + from stripe.params.treasury._outbound_payment_post_params import ( + OutboundPaymentPostParams, + ) + from stripe.params.treasury._outbound_payment_retrieve_params import ( + OutboundPaymentRetrieveParams, + ) + from stripe.params.treasury._outbound_payment_return_outbound_payment_params import ( + OutboundPaymentReturnOutboundPaymentParams, + ) + from stripe.params.treasury._outbound_payment_update_params import ( + OutboundPaymentUpdateParams, + ) from stripe.treasury._transaction import Transaction @@ -213,337 +229,6 @@ class UsDomesticWire(StripeObject): us_domestic_wire: Optional[UsDomesticWire] _inner_class_types = {"ach": Ach, "us_domestic_wire": UsDomesticWire} - class CancelParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class CreateParams(RequestOptions): - amount: int - """ - Amount (in cents) to be transferred. - """ - 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). - """ - customer: NotRequired[str] - """ - ID of the customer to whom the OutboundPayment is sent. Must match the Customer attached to the `destination_payment_method` passed in. - """ - description: NotRequired[str] - """ - An arbitrary string attached to the object. Often useful for displaying to users. - """ - destination_payment_method: NotRequired[str] - """ - The PaymentMethod to use as the payment instrument for the OutboundPayment. Exclusive with `destination_payment_method_data`. - """ - destination_payment_method_data: NotRequired[ - "OutboundPayment.CreateParamsDestinationPaymentMethodData" - ] - """ - Hash used to generate the PaymentMethod to be used for this OutboundPayment. Exclusive with `destination_payment_method`. - """ - destination_payment_method_options: NotRequired[ - "OutboundPayment.CreateParamsDestinationPaymentMethodOptions" - ] - """ - Payment method-specific configuration for this OutboundPayment. - """ - end_user_details: NotRequired[ - "OutboundPayment.CreateParamsEndUserDetails" - ] - """ - End user details. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - financial_account: str - """ - The FinancialAccount to pull funds from. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - statement_descriptor: NotRequired[str] - """ - The description that appears on the receiving end for this OutboundPayment (for example, bank statement for external bank transfer). Maximum 10 characters for `ach` payments, 140 characters for `us_domestic_wire` payments, or 500 characters for `stripe` network transfers. The default value is "payment". - """ - - class CreateParamsDestinationPaymentMethodData(TypedDict): - billing_details: NotRequired[ - "OutboundPayment.CreateParamsDestinationPaymentMethodDataBillingDetails" - ] - """ - Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. - """ - financial_account: NotRequired[str] - """ - Required if type is set to `financial_account`. The FinancialAccount ID to send funds to. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - type: Literal["financial_account", "us_bank_account"] - """ - The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. - """ - us_bank_account: NotRequired[ - "OutboundPayment.CreateParamsDestinationPaymentMethodDataUsBankAccount" - ] - """ - Required hash if type is set to `us_bank_account`. - """ - - class CreateParamsDestinationPaymentMethodDataBillingDetails(TypedDict): - address: NotRequired[ - "Literal['']|OutboundPayment.CreateParamsDestinationPaymentMethodDataBillingDetailsAddress" - ] - """ - Billing address. - """ - email: NotRequired["Literal['']|str"] - """ - Email address. - """ - name: NotRequired["Literal['']|str"] - """ - Full name. - """ - phone: NotRequired["Literal['']|str"] - """ - Billing phone number (including extension). - """ - - class CreateParamsDestinationPaymentMethodDataBillingDetailsAddress( - 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. - """ - - class CreateParamsDestinationPaymentMethodDataUsBankAccount(TypedDict): - account_holder_type: NotRequired[Literal["company", "individual"]] - """ - Account holder type: individual or company. - """ - account_number: NotRequired[str] - """ - Account number of the bank account. - """ - account_type: NotRequired[Literal["checking", "savings"]] - """ - Account type: checkings or savings. Defaults to checking if omitted. - """ - financial_connections_account: NotRequired[str] - """ - The ID of a Financial Connections Account to use as a payment method. - """ - routing_number: NotRequired[str] - """ - Routing number of the bank account. - """ - - class CreateParamsDestinationPaymentMethodOptions(TypedDict): - us_bank_account: NotRequired[ - "Literal['']|OutboundPayment.CreateParamsDestinationPaymentMethodOptionsUsBankAccount" - ] - """ - Optional fields for `us_bank_account`. - """ - - class CreateParamsDestinationPaymentMethodOptionsUsBankAccount(TypedDict): - network: NotRequired[Literal["ach", "us_domestic_wire"]] - """ - Specifies the network rails to be used. If not set, will default to the PaymentMethod's preferred network. See the [docs](https://stripe.com/docs/treasury/money-movement/timelines) to learn more about money movement timelines for each network type. - """ - - class CreateParamsEndUserDetails(TypedDict): - ip_address: NotRequired[str] - """ - IP address of the user initiating the OutboundPayment. Must be supplied if `present` is set to `true`. - """ - present: bool - """ - `True` if the OutboundPayment creation request is being made on behalf of an end user by a platform. Otherwise, `false`. - """ - - class FailParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class ListParams(RequestOptions): - created: NotRequired["OutboundPayment.ListParamsCreated|int"] - """ - Only return OutboundPayments that were created during the given date interval. - """ - customer: NotRequired[str] - """ - Only return OutboundPayments sent to this customer. - """ - 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. - """ - financial_account: str - """ - Returns objects associated with this FinancialAccount. - """ - 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. - """ - status: NotRequired[ - Literal["canceled", "failed", "posted", "processing", "returned"] - ] - """ - Only return OutboundPayments that have the given status: `processing`, `failed`, `posted`, `returned`, or `canceled`. - """ - - class ListParamsCreated(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) - """ - - class PostParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class RetrieveParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class ReturnOutboundPaymentParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - returned_details: NotRequired[ - "OutboundPayment.ReturnOutboundPaymentParamsReturnedDetails" - ] - """ - Optional hash to set the return code. - """ - - class ReturnOutboundPaymentParamsReturnedDetails(TypedDict): - code: NotRequired[ - Literal[ - "account_closed", - "account_frozen", - "bank_account_restricted", - "bank_ownership_changed", - "declined", - "incorrect_account_holder_name", - "invalid_account_number", - "invalid_currency", - "no_account", - "other", - ] - ] - """ - The return code to be set on the OutboundPayment object. - """ - - class UpdateParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - tracking_details: "OutboundPayment.UpdateParamsTrackingDetails" - """ - Details about network-specific tracking information. - """ - - class UpdateParamsTrackingDetails(TypedDict): - ach: NotRequired["OutboundPayment.UpdateParamsTrackingDetailsAch"] - """ - ACH network tracking details. - """ - type: Literal["ach", "us_domestic_wire"] - """ - The US bank account network used to send funds. - """ - us_domestic_wire: NotRequired[ - "OutboundPayment.UpdateParamsTrackingDetailsUsDomesticWire" - ] - """ - US domestic wire network tracking details. - """ - - class UpdateParamsTrackingDetailsAch(TypedDict): - trace_id: str - """ - ACH trace ID for funds sent over the `ach` network. - """ - - class UpdateParamsTrackingDetailsUsDomesticWire(TypedDict): - chips: NotRequired[str] - """ - CHIPS System Sequence Number (SSN) for funds sent over the `us_domestic_wire` network. - """ - imad: NotRequired[str] - """ - IMAD for funds sent over the `us_domestic_wire` network. - """ - omad: NotRequired[str] - """ - OMAD for funds sent over the `us_domestic_wire` network. - """ - amount: int """ Amount (in cents) transferred. @@ -634,7 +319,7 @@ class UpdateParamsTrackingDetailsUsDomesticWire(TypedDict): @classmethod def _cls_cancel( - cls, id: str, **params: Unpack["OutboundPayment.CancelParams"] + cls, id: str, **params: Unpack["OutboundPaymentCancelParams"] ) -> "OutboundPayment": """ Cancel an OutboundPayment. @@ -653,7 +338,7 @@ def _cls_cancel( @overload @staticmethod def cancel( - id: str, **params: Unpack["OutboundPayment.CancelParams"] + id: str, **params: Unpack["OutboundPaymentCancelParams"] ) -> "OutboundPayment": """ Cancel an OutboundPayment. @@ -662,7 +347,7 @@ def cancel( @overload def cancel( - self, **params: Unpack["OutboundPayment.CancelParams"] + self, **params: Unpack["OutboundPaymentCancelParams"] ) -> "OutboundPayment": """ Cancel an OutboundPayment. @@ -671,7 +356,7 @@ def cancel( @class_method_variant("_cls_cancel") def cancel( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["OutboundPayment.CancelParams"] + self, **params: Unpack["OutboundPaymentCancelParams"] ) -> "OutboundPayment": """ Cancel an OutboundPayment. @@ -689,7 +374,7 @@ def cancel( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_cancel_async( - cls, id: str, **params: Unpack["OutboundPayment.CancelParams"] + cls, id: str, **params: Unpack["OutboundPaymentCancelParams"] ) -> "OutboundPayment": """ Cancel an OutboundPayment. @@ -708,7 +393,7 @@ async def _cls_cancel_async( @overload @staticmethod async def cancel_async( - id: str, **params: Unpack["OutboundPayment.CancelParams"] + id: str, **params: Unpack["OutboundPaymentCancelParams"] ) -> "OutboundPayment": """ Cancel an OutboundPayment. @@ -717,7 +402,7 @@ async def cancel_async( @overload async def cancel_async( - self, **params: Unpack["OutboundPayment.CancelParams"] + self, **params: Unpack["OutboundPaymentCancelParams"] ) -> "OutboundPayment": """ Cancel an OutboundPayment. @@ -726,7 +411,7 @@ async def cancel_async( @class_method_variant("_cls_cancel_async") async def cancel_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["OutboundPayment.CancelParams"] + self, **params: Unpack["OutboundPaymentCancelParams"] ) -> "OutboundPayment": """ Cancel an OutboundPayment. @@ -744,7 +429,7 @@ async def cancel_async( # pyright: ignore[reportGeneralTypeIssues] @classmethod def create( - cls, **params: Unpack["OutboundPayment.CreateParams"] + cls, **params: Unpack["OutboundPaymentCreateParams"] ) -> "OutboundPayment": """ Creates an OutboundPayment. @@ -760,7 +445,7 @@ def create( @classmethod async def create_async( - cls, **params: Unpack["OutboundPayment.CreateParams"] + cls, **params: Unpack["OutboundPaymentCreateParams"] ) -> "OutboundPayment": """ Creates an OutboundPayment. @@ -776,7 +461,7 @@ async def create_async( @classmethod def list( - cls, **params: Unpack["OutboundPayment.ListParams"] + cls, **params: Unpack["OutboundPaymentListParams"] ) -> ListObject["OutboundPayment"]: """ Returns a list of OutboundPayments sent from the specified FinancialAccount. @@ -796,7 +481,7 @@ def list( @classmethod async def list_async( - cls, **params: Unpack["OutboundPayment.ListParams"] + cls, **params: Unpack["OutboundPaymentListParams"] ) -> ListObject["OutboundPayment"]: """ Returns a list of OutboundPayments sent from the specified FinancialAccount. @@ -816,7 +501,7 @@ async def list_async( @classmethod def retrieve( - cls, id: str, **params: Unpack["OutboundPayment.RetrieveParams"] + cls, id: str, **params: Unpack["OutboundPaymentRetrieveParams"] ) -> "OutboundPayment": """ Retrieves the details of an existing OutboundPayment by passing the unique OutboundPayment ID from either the OutboundPayment creation request or OutboundPayment list. @@ -827,7 +512,7 @@ def retrieve( @classmethod async def retrieve_async( - cls, id: str, **params: Unpack["OutboundPayment.RetrieveParams"] + cls, id: str, **params: Unpack["OutboundPaymentRetrieveParams"] ) -> "OutboundPayment": """ Retrieves the details of an existing OutboundPayment by passing the unique OutboundPayment ID from either the OutboundPayment creation request or OutboundPayment list. @@ -841,7 +526,7 @@ class TestHelpers(APIResourceTestHelpers["OutboundPayment"]): @classmethod def _cls_fail( - cls, id: str, **params: Unpack["OutboundPayment.FailParams"] + cls, id: str, **params: Unpack["OutboundPaymentFailParams"] ) -> "OutboundPayment": """ Transitions a test mode created OutboundPayment to the failed status. The OutboundPayment must already be in the processing state. @@ -860,7 +545,7 @@ def _cls_fail( @overload @staticmethod def fail( - id: str, **params: Unpack["OutboundPayment.FailParams"] + id: str, **params: Unpack["OutboundPaymentFailParams"] ) -> "OutboundPayment": """ Transitions a test mode created OutboundPayment to the failed status. The OutboundPayment must already be in the processing state. @@ -869,7 +554,7 @@ def fail( @overload def fail( - self, **params: Unpack["OutboundPayment.FailParams"] + self, **params: Unpack["OutboundPaymentFailParams"] ) -> "OutboundPayment": """ Transitions a test mode created OutboundPayment to the failed status. The OutboundPayment must already be in the processing state. @@ -878,7 +563,7 @@ def fail( @class_method_variant("_cls_fail") def fail( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["OutboundPayment.FailParams"] + self, **params: Unpack["OutboundPaymentFailParams"] ) -> "OutboundPayment": """ Transitions a test mode created OutboundPayment to the failed status. The OutboundPayment must already be in the processing state. @@ -896,7 +581,7 @@ def fail( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_fail_async( - cls, id: str, **params: Unpack["OutboundPayment.FailParams"] + cls, id: str, **params: Unpack["OutboundPaymentFailParams"] ) -> "OutboundPayment": """ Transitions a test mode created OutboundPayment to the failed status. The OutboundPayment must already be in the processing state. @@ -915,7 +600,7 @@ async def _cls_fail_async( @overload @staticmethod async def fail_async( - id: str, **params: Unpack["OutboundPayment.FailParams"] + id: str, **params: Unpack["OutboundPaymentFailParams"] ) -> "OutboundPayment": """ Transitions a test mode created OutboundPayment to the failed status. The OutboundPayment must already be in the processing state. @@ -924,7 +609,7 @@ async def fail_async( @overload async def fail_async( - self, **params: Unpack["OutboundPayment.FailParams"] + self, **params: Unpack["OutboundPaymentFailParams"] ) -> "OutboundPayment": """ Transitions a test mode created OutboundPayment to the failed status. The OutboundPayment must already be in the processing state. @@ -933,7 +618,7 @@ async def fail_async( @class_method_variant("_cls_fail_async") async def fail_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["OutboundPayment.FailParams"] + self, **params: Unpack["OutboundPaymentFailParams"] ) -> "OutboundPayment": """ Transitions a test mode created OutboundPayment to the failed status. The OutboundPayment must already be in the processing state. @@ -951,7 +636,7 @@ async def fail_async( # pyright: ignore[reportGeneralTypeIssues] @classmethod def _cls_post( - cls, id: str, **params: Unpack["OutboundPayment.PostParams"] + cls, id: str, **params: Unpack["OutboundPaymentPostParams"] ) -> "OutboundPayment": """ Transitions a test mode created OutboundPayment to the posted status. The OutboundPayment must already be in the processing state. @@ -970,7 +655,7 @@ def _cls_post( @overload @staticmethod def post( - id: str, **params: Unpack["OutboundPayment.PostParams"] + id: str, **params: Unpack["OutboundPaymentPostParams"] ) -> "OutboundPayment": """ Transitions a test mode created OutboundPayment to the posted status. The OutboundPayment must already be in the processing state. @@ -979,7 +664,7 @@ def post( @overload def post( - self, **params: Unpack["OutboundPayment.PostParams"] + self, **params: Unpack["OutboundPaymentPostParams"] ) -> "OutboundPayment": """ Transitions a test mode created OutboundPayment to the posted status. The OutboundPayment must already be in the processing state. @@ -988,7 +673,7 @@ def post( @class_method_variant("_cls_post") def post( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["OutboundPayment.PostParams"] + self, **params: Unpack["OutboundPaymentPostParams"] ) -> "OutboundPayment": """ Transitions a test mode created OutboundPayment to the posted status. The OutboundPayment must already be in the processing state. @@ -1006,7 +691,7 @@ def post( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_post_async( - cls, id: str, **params: Unpack["OutboundPayment.PostParams"] + cls, id: str, **params: Unpack["OutboundPaymentPostParams"] ) -> "OutboundPayment": """ Transitions a test mode created OutboundPayment to the posted status. The OutboundPayment must already be in the processing state. @@ -1025,7 +710,7 @@ async def _cls_post_async( @overload @staticmethod async def post_async( - id: str, **params: Unpack["OutboundPayment.PostParams"] + id: str, **params: Unpack["OutboundPaymentPostParams"] ) -> "OutboundPayment": """ Transitions a test mode created OutboundPayment to the posted status. The OutboundPayment must already be in the processing state. @@ -1034,7 +719,7 @@ async def post_async( @overload async def post_async( - self, **params: Unpack["OutboundPayment.PostParams"] + self, **params: Unpack["OutboundPaymentPostParams"] ) -> "OutboundPayment": """ Transitions a test mode created OutboundPayment to the posted status. The OutboundPayment must already be in the processing state. @@ -1043,7 +728,7 @@ async def post_async( @class_method_variant("_cls_post_async") async def post_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["OutboundPayment.PostParams"] + self, **params: Unpack["OutboundPaymentPostParams"] ) -> "OutboundPayment": """ Transitions a test mode created OutboundPayment to the posted status. The OutboundPayment must already be in the processing state. @@ -1063,7 +748,7 @@ async def post_async( # pyright: ignore[reportGeneralTypeIssues] def _cls_return_outbound_payment( cls, id: str, - **params: Unpack["OutboundPayment.ReturnOutboundPaymentParams"], + **params: Unpack["OutboundPaymentReturnOutboundPaymentParams"], ) -> "OutboundPayment": """ Transitions a test mode created OutboundPayment to the returned status. The OutboundPayment must already be in the processing state. @@ -1083,7 +768,7 @@ def _cls_return_outbound_payment( @staticmethod def return_outbound_payment( id: str, - **params: Unpack["OutboundPayment.ReturnOutboundPaymentParams"], + **params: Unpack["OutboundPaymentReturnOutboundPaymentParams"], ) -> "OutboundPayment": """ Transitions a test mode created OutboundPayment to the returned status. The OutboundPayment must already be in the processing state. @@ -1093,7 +778,7 @@ def return_outbound_payment( @overload def return_outbound_payment( self, - **params: Unpack["OutboundPayment.ReturnOutboundPaymentParams"], + **params: Unpack["OutboundPaymentReturnOutboundPaymentParams"], ) -> "OutboundPayment": """ Transitions a test mode created OutboundPayment to the returned status. The OutboundPayment must already be in the processing state. @@ -1103,7 +788,7 @@ def return_outbound_payment( @class_method_variant("_cls_return_outbound_payment") def return_outbound_payment( # pyright: ignore[reportGeneralTypeIssues] self, - **params: Unpack["OutboundPayment.ReturnOutboundPaymentParams"], + **params: Unpack["OutboundPaymentReturnOutboundPaymentParams"], ) -> "OutboundPayment": """ Transitions a test mode created OutboundPayment to the returned status. The OutboundPayment must already be in the processing state. @@ -1123,7 +808,7 @@ def return_outbound_payment( # pyright: ignore[reportGeneralTypeIssues] async def _cls_return_outbound_payment_async( cls, id: str, - **params: Unpack["OutboundPayment.ReturnOutboundPaymentParams"], + **params: Unpack["OutboundPaymentReturnOutboundPaymentParams"], ) -> "OutboundPayment": """ Transitions a test mode created OutboundPayment to the returned status. The OutboundPayment must already be in the processing state. @@ -1143,7 +828,7 @@ async def _cls_return_outbound_payment_async( @staticmethod async def return_outbound_payment_async( id: str, - **params: Unpack["OutboundPayment.ReturnOutboundPaymentParams"], + **params: Unpack["OutboundPaymentReturnOutboundPaymentParams"], ) -> "OutboundPayment": """ Transitions a test mode created OutboundPayment to the returned status. The OutboundPayment must already be in the processing state. @@ -1153,7 +838,7 @@ async def return_outbound_payment_async( @overload async def return_outbound_payment_async( self, - **params: Unpack["OutboundPayment.ReturnOutboundPaymentParams"], + **params: Unpack["OutboundPaymentReturnOutboundPaymentParams"], ) -> "OutboundPayment": """ Transitions a test mode created OutboundPayment to the returned status. The OutboundPayment must already be in the processing state. @@ -1163,7 +848,7 @@ async def return_outbound_payment_async( @class_method_variant("_cls_return_outbound_payment_async") async def return_outbound_payment_async( # pyright: ignore[reportGeneralTypeIssues] self, - **params: Unpack["OutboundPayment.ReturnOutboundPaymentParams"], + **params: Unpack["OutboundPaymentReturnOutboundPaymentParams"], ) -> "OutboundPayment": """ Transitions a test mode created OutboundPayment to the returned status. The OutboundPayment must already be in the processing state. @@ -1181,7 +866,7 @@ async def return_outbound_payment_async( # pyright: ignore[reportGeneralTypeIss @classmethod def _cls_update( - cls, id: str, **params: Unpack["OutboundPayment.UpdateParams"] + cls, id: str, **params: Unpack["OutboundPaymentUpdateParams"] ) -> "OutboundPayment": """ Updates a test mode created OutboundPayment with tracking details. The OutboundPayment must not be cancelable, and cannot be in the canceled or failed states. @@ -1200,7 +885,7 @@ def _cls_update( @overload @staticmethod def update( - id: str, **params: Unpack["OutboundPayment.UpdateParams"] + id: str, **params: Unpack["OutboundPaymentUpdateParams"] ) -> "OutboundPayment": """ Updates a test mode created OutboundPayment with tracking details. The OutboundPayment must not be cancelable, and cannot be in the canceled or failed states. @@ -1209,7 +894,7 @@ def update( @overload def update( - self, **params: Unpack["OutboundPayment.UpdateParams"] + self, **params: Unpack["OutboundPaymentUpdateParams"] ) -> "OutboundPayment": """ Updates a test mode created OutboundPayment with tracking details. The OutboundPayment must not be cancelable, and cannot be in the canceled or failed states. @@ -1218,7 +903,7 @@ def update( @class_method_variant("_cls_update") def update( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["OutboundPayment.UpdateParams"] + self, **params: Unpack["OutboundPaymentUpdateParams"] ) -> "OutboundPayment": """ Updates a test mode created OutboundPayment with tracking details. The OutboundPayment must not be cancelable, and cannot be in the canceled or failed states. @@ -1236,7 +921,7 @@ def update( # pyright: ignore[reportGeneralTypeIssues] @classmethod async def _cls_update_async( - cls, id: str, **params: Unpack["OutboundPayment.UpdateParams"] + cls, id: str, **params: Unpack["OutboundPaymentUpdateParams"] ) -> "OutboundPayment": """ Updates a test mode created OutboundPayment with tracking details. The OutboundPayment must not be cancelable, and cannot be in the canceled or failed states. @@ -1255,7 +940,7 @@ async def _cls_update_async( @overload @staticmethod async def update_async( - id: str, **params: Unpack["OutboundPayment.UpdateParams"] + id: str, **params: Unpack["OutboundPaymentUpdateParams"] ) -> "OutboundPayment": """ Updates a test mode created OutboundPayment with tracking details. The OutboundPayment must not be cancelable, and cannot be in the canceled or failed states. @@ -1264,7 +949,7 @@ async def update_async( @overload async def update_async( - self, **params: Unpack["OutboundPayment.UpdateParams"] + self, **params: Unpack["OutboundPaymentUpdateParams"] ) -> "OutboundPayment": """ Updates a test mode created OutboundPayment with tracking details. The OutboundPayment must not be cancelable, and cannot be in the canceled or failed states. @@ -1273,7 +958,7 @@ async def update_async( @class_method_variant("_cls_update_async") async def update_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["OutboundPayment.UpdateParams"] + self, **params: Unpack["OutboundPaymentUpdateParams"] ) -> "OutboundPayment": """ Updates a test mode created OutboundPayment with tracking details. The OutboundPayment must not be cancelable, and cannot be in the canceled or failed states. diff --git a/stripe/treasury/_outbound_payment_service.py b/stripe/treasury/_outbound_payment_service.py index b1fd1085e..678808057 100644 --- a/stripe/treasury/_outbound_payment_service.py +++ b/stripe/treasury/_outbound_payment_service.py @@ -5,256 +5,28 @@ from stripe._stripe_service import StripeService from stripe._util import sanitize_id from stripe.treasury._outbound_payment import OutboundPayment -from typing import Dict, List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params.treasury._outbound_payment_cancel_params import ( + OutboundPaymentCancelParams, + ) + from stripe.params.treasury._outbound_payment_create_params import ( + OutboundPaymentCreateParams, + ) + from stripe.params.treasury._outbound_payment_list_params import ( + OutboundPaymentListParams, + ) + from stripe.params.treasury._outbound_payment_retrieve_params import ( + OutboundPaymentRetrieveParams, + ) class OutboundPaymentService(StripeService): - class CancelParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class CreateParams(TypedDict): - amount: int - """ - Amount (in cents) to be transferred. - """ - 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). - """ - customer: NotRequired[str] - """ - ID of the customer to whom the OutboundPayment is sent. Must match the Customer attached to the `destination_payment_method` passed in. - """ - description: NotRequired[str] - """ - An arbitrary string attached to the object. Often useful for displaying to users. - """ - destination_payment_method: NotRequired[str] - """ - The PaymentMethod to use as the payment instrument for the OutboundPayment. Exclusive with `destination_payment_method_data`. - """ - destination_payment_method_data: NotRequired[ - "OutboundPaymentService.CreateParamsDestinationPaymentMethodData" - ] - """ - Hash used to generate the PaymentMethod to be used for this OutboundPayment. Exclusive with `destination_payment_method`. - """ - destination_payment_method_options: NotRequired[ - "OutboundPaymentService.CreateParamsDestinationPaymentMethodOptions" - ] - """ - Payment method-specific configuration for this OutboundPayment. - """ - end_user_details: NotRequired[ - "OutboundPaymentService.CreateParamsEndUserDetails" - ] - """ - End user details. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - financial_account: str - """ - The FinancialAccount to pull funds from. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - statement_descriptor: NotRequired[str] - """ - The description that appears on the receiving end for this OutboundPayment (for example, bank statement for external bank transfer). Maximum 10 characters for `ach` payments, 140 characters for `us_domestic_wire` payments, or 500 characters for `stripe` network transfers. The default value is "payment". - """ - - class CreateParamsDestinationPaymentMethodData(TypedDict): - billing_details: NotRequired[ - "OutboundPaymentService.CreateParamsDestinationPaymentMethodDataBillingDetails" - ] - """ - Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. - """ - financial_account: NotRequired[str] - """ - Required if type is set to `financial_account`. The FinancialAccount ID to send funds to. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - type: Literal["financial_account", "us_bank_account"] - """ - The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. - """ - us_bank_account: NotRequired[ - "OutboundPaymentService.CreateParamsDestinationPaymentMethodDataUsBankAccount" - ] - """ - Required hash if type is set to `us_bank_account`. - """ - - class CreateParamsDestinationPaymentMethodDataBillingDetails(TypedDict): - address: NotRequired[ - "Literal['']|OutboundPaymentService.CreateParamsDestinationPaymentMethodDataBillingDetailsAddress" - ] - """ - Billing address. - """ - email: NotRequired["Literal['']|str"] - """ - Email address. - """ - name: NotRequired["Literal['']|str"] - """ - Full name. - """ - phone: NotRequired["Literal['']|str"] - """ - Billing phone number (including extension). - """ - - class CreateParamsDestinationPaymentMethodDataBillingDetailsAddress( - 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. - """ - - class CreateParamsDestinationPaymentMethodDataUsBankAccount(TypedDict): - account_holder_type: NotRequired[Literal["company", "individual"]] - """ - Account holder type: individual or company. - """ - account_number: NotRequired[str] - """ - Account number of the bank account. - """ - account_type: NotRequired[Literal["checking", "savings"]] - """ - Account type: checkings or savings. Defaults to checking if omitted. - """ - financial_connections_account: NotRequired[str] - """ - The ID of a Financial Connections Account to use as a payment method. - """ - routing_number: NotRequired[str] - """ - Routing number of the bank account. - """ - - class CreateParamsDestinationPaymentMethodOptions(TypedDict): - us_bank_account: NotRequired[ - "Literal['']|OutboundPaymentService.CreateParamsDestinationPaymentMethodOptionsUsBankAccount" - ] - """ - Optional fields for `us_bank_account`. - """ - - class CreateParamsDestinationPaymentMethodOptionsUsBankAccount(TypedDict): - network: NotRequired[Literal["ach", "us_domestic_wire"]] - """ - Specifies the network rails to be used. If not set, will default to the PaymentMethod's preferred network. See the [docs](https://stripe.com/docs/treasury/money-movement/timelines) to learn more about money movement timelines for each network type. - """ - - class CreateParamsEndUserDetails(TypedDict): - ip_address: NotRequired[str] - """ - IP address of the user initiating the OutboundPayment. Must be supplied if `present` is set to `true`. - """ - present: bool - """ - `True` if the OutboundPayment creation request is being made on behalf of an end user by a platform. Otherwise, `false`. - """ - - class ListParams(TypedDict): - created: NotRequired["OutboundPaymentService.ListParamsCreated|int"] - """ - Only return OutboundPayments that were created during the given date interval. - """ - customer: NotRequired[str] - """ - Only return OutboundPayments sent to this customer. - """ - 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. - """ - financial_account: str - """ - Returns objects associated with this FinancialAccount. - """ - 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. - """ - status: NotRequired[ - Literal["canceled", "failed", "posted", "processing", "returned"] - ] - """ - Only return OutboundPayments that have the given status: `processing`, `failed`, `posted`, `returned`, or `canceled`. - """ - - class ListParamsCreated(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) - """ - - class RetrieveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - def list( self, - params: "OutboundPaymentService.ListParams", + params: "OutboundPaymentListParams", options: Optional[RequestOptions] = None, ) -> ListObject[OutboundPayment]: """ @@ -273,7 +45,7 @@ def list( async def list_async( self, - params: "OutboundPaymentService.ListParams", + params: "OutboundPaymentListParams", options: Optional[RequestOptions] = None, ) -> ListObject[OutboundPayment]: """ @@ -292,7 +64,7 @@ async def list_async( def create( self, - params: "OutboundPaymentService.CreateParams", + params: "OutboundPaymentCreateParams", options: Optional[RequestOptions] = None, ) -> OutboundPayment: """ @@ -311,7 +83,7 @@ def create( async def create_async( self, - params: "OutboundPaymentService.CreateParams", + params: "OutboundPaymentCreateParams", options: Optional[RequestOptions] = None, ) -> OutboundPayment: """ @@ -331,7 +103,7 @@ async def create_async( def retrieve( self, id: str, - params: Optional["OutboundPaymentService.RetrieveParams"] = None, + params: Optional["OutboundPaymentRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> OutboundPayment: """ @@ -353,7 +125,7 @@ def retrieve( async def retrieve_async( self, id: str, - params: Optional["OutboundPaymentService.RetrieveParams"] = None, + params: Optional["OutboundPaymentRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> OutboundPayment: """ @@ -375,7 +147,7 @@ async def retrieve_async( def cancel( self, id: str, - params: Optional["OutboundPaymentService.CancelParams"] = None, + params: Optional["OutboundPaymentCancelParams"] = None, options: Optional[RequestOptions] = None, ) -> OutboundPayment: """ @@ -397,7 +169,7 @@ def cancel( async def cancel_async( self, id: str, - params: Optional["OutboundPaymentService.CancelParams"] = None, + params: Optional["OutboundPaymentCancelParams"] = None, options: Optional[RequestOptions] = None, ) -> OutboundPayment: """ diff --git a/stripe/treasury/_outbound_transfer.py b/stripe/treasury/_outbound_transfer.py index fd11989e9..86455e582 100644 --- a/stripe/treasury/_outbound_transfer.py +++ b/stripe/treasury/_outbound_transfer.py @@ -4,22 +4,38 @@ from stripe._expandable_field import ExpandableField from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource -from stripe._request_options import RequestOptions from stripe._stripe_object import StripeObject from stripe._test_helpers import APIResourceTestHelpers from stripe._util import class_method_variant, sanitize_id -from typing import ClassVar, Dict, List, Optional, cast, overload -from typing_extensions import ( - Literal, - NotRequired, - Type, - TypedDict, - Unpack, - TYPE_CHECKING, -) +from typing import ClassVar, Dict, Optional, cast, overload +from typing_extensions import Literal, Type, Unpack, TYPE_CHECKING if TYPE_CHECKING: from stripe._mandate import Mandate + from stripe.params.treasury._outbound_transfer_cancel_params import ( + OutboundTransferCancelParams, + ) + from stripe.params.treasury._outbound_transfer_create_params import ( + OutboundTransferCreateParams, + ) + from stripe.params.treasury._outbound_transfer_fail_params import ( + OutboundTransferFailParams, + ) + from stripe.params.treasury._outbound_transfer_list_params import ( + OutboundTransferListParams, + ) + from stripe.params.treasury._outbound_transfer_post_params import ( + OutboundTransferPostParams, + ) + from stripe.params.treasury._outbound_transfer_retrieve_params import ( + OutboundTransferRetrieveParams, + ) + from stripe.params.treasury._outbound_transfer_return_outbound_transfer_params import ( + OutboundTransferReturnOutboundTransferParams, + ) + from stripe.params.treasury._outbound_transfer_update_params import ( + OutboundTransferUpdateParams, + ) from stripe.treasury._transaction import Transaction @@ -220,227 +236,6 @@ class UsDomesticWire(StripeObject): us_domestic_wire: Optional[UsDomesticWire] _inner_class_types = {"ach": Ach, "us_domestic_wire": UsDomesticWire} - class CancelParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class CreateParams(RequestOptions): - amount: int - """ - Amount (in cents) to be transferred. - """ - 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). - """ - description: NotRequired[str] - """ - An arbitrary string attached to the object. Often useful for displaying to users. - """ - destination_payment_method: NotRequired[str] - """ - The PaymentMethod to use as the payment instrument for the OutboundTransfer. - """ - destination_payment_method_data: NotRequired[ - "OutboundTransfer.CreateParamsDestinationPaymentMethodData" - ] - """ - Hash used to generate the PaymentMethod to be used for this OutboundTransfer. Exclusive with `destination_payment_method`. - """ - destination_payment_method_options: NotRequired[ - "OutboundTransfer.CreateParamsDestinationPaymentMethodOptions" - ] - """ - Hash describing payment method configuration details. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - financial_account: str - """ - The FinancialAccount to pull funds from. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - network_details: NotRequired[ - "OutboundTransfer.CreateParamsNetworkDetails" - ] - """ - Details about the network used for the OutboundTransfer. - """ - statement_descriptor: NotRequired[str] - """ - Statement descriptor to be shown on the receiving end of an OutboundTransfer. Maximum 10 characters for `ach` transfers or 140 characters for `us_domestic_wire` transfers. The default value is "transfer". - """ - - class CreateParamsDestinationPaymentMethodData(TypedDict): - financial_account: NotRequired[str] - """ - Required if type is set to `financial_account`. The FinancialAccount ID to send funds to. - """ - type: Literal["financial_account"] - """ - The type of the destination. - """ - - class CreateParamsDestinationPaymentMethodOptions(TypedDict): - us_bank_account: NotRequired[ - "Literal['']|OutboundTransfer.CreateParamsDestinationPaymentMethodOptionsUsBankAccount" - ] - """ - Optional fields for `us_bank_account`. - """ - - class CreateParamsDestinationPaymentMethodOptionsUsBankAccount(TypedDict): - network: NotRequired[Literal["ach", "us_domestic_wire"]] - """ - Specifies the network rails to be used. If not set, will default to the PaymentMethod's preferred network. See the [docs](https://stripe.com/docs/treasury/money-movement/timelines) to learn more about money movement timelines for each network type. - """ - - class CreateParamsNetworkDetails(TypedDict): - ach: NotRequired["OutboundTransfer.CreateParamsNetworkDetailsAch"] - """ - Optional fields for `ach`. - """ - type: Literal["ach"] - """ - The type of flow that originated the OutboundTransfer. - """ - - class CreateParamsNetworkDetailsAch(TypedDict): - addenda: NotRequired[str] - """ - Addenda record data associated with this OutboundTransfer. - """ - - class FailParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class ListParams(RequestOptions): - 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. - """ - financial_account: str - """ - Returns objects associated with this FinancialAccount. - """ - 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. - """ - status: NotRequired[ - Literal["canceled", "failed", "posted", "processing", "returned"] - ] - """ - Only return OutboundTransfers that have the given status: `processing`, `canceled`, `failed`, `posted`, or `returned`. - """ - - class PostParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class RetrieveParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class ReturnOutboundTransferParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - returned_details: NotRequired[ - "OutboundTransfer.ReturnOutboundTransferParamsReturnedDetails" - ] - """ - Details about a returned OutboundTransfer. - """ - - class ReturnOutboundTransferParamsReturnedDetails(TypedDict): - code: NotRequired[ - Literal[ - "account_closed", - "account_frozen", - "bank_account_restricted", - "bank_ownership_changed", - "declined", - "incorrect_account_holder_name", - "invalid_account_number", - "invalid_currency", - "no_account", - "other", - ] - ] - """ - Reason for the return. - """ - - class UpdateParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - tracking_details: "OutboundTransfer.UpdateParamsTrackingDetails" - """ - Details about network-specific tracking information. - """ - - class UpdateParamsTrackingDetails(TypedDict): - ach: NotRequired["OutboundTransfer.UpdateParamsTrackingDetailsAch"] - """ - ACH network tracking details. - """ - type: Literal["ach", "us_domestic_wire"] - """ - The US bank account network used to send funds. - """ - us_domestic_wire: NotRequired[ - "OutboundTransfer.UpdateParamsTrackingDetailsUsDomesticWire" - ] - """ - US domestic wire network tracking details. - """ - - class UpdateParamsTrackingDetailsAch(TypedDict): - trace_id: str - """ - ACH trace ID for funds sent over the `ach` network. - """ - - class UpdateParamsTrackingDetailsUsDomesticWire(TypedDict): - chips: NotRequired[str] - """ - CHIPS System Sequence Number (SSN) for funds sent over the `us_domestic_wire` network. - """ - imad: NotRequired[str] - """ - IMAD for funds sent over the `us_domestic_wire` network. - """ - omad: NotRequired[str] - """ - OMAD for funds sent over the `us_domestic_wire` network. - """ - amount: int """ Amount (in cents) transferred. @@ -524,7 +319,7 @@ class UpdateParamsTrackingDetailsUsDomesticWire(TypedDict): def _cls_cancel( cls, outbound_transfer: str, - **params: Unpack["OutboundTransfer.CancelParams"], + **params: Unpack["OutboundTransferCancelParams"], ) -> "OutboundTransfer": """ An OutboundTransfer can be canceled if the funds have not yet been paid out. @@ -544,7 +339,7 @@ def _cls_cancel( @staticmethod def cancel( outbound_transfer: str, - **params: Unpack["OutboundTransfer.CancelParams"], + **params: Unpack["OutboundTransferCancelParams"], ) -> "OutboundTransfer": """ An OutboundTransfer can be canceled if the funds have not yet been paid out. @@ -553,7 +348,7 @@ def cancel( @overload def cancel( - self, **params: Unpack["OutboundTransfer.CancelParams"] + self, **params: Unpack["OutboundTransferCancelParams"] ) -> "OutboundTransfer": """ An OutboundTransfer can be canceled if the funds have not yet been paid out. @@ -562,7 +357,7 @@ def cancel( @class_method_variant("_cls_cancel") def cancel( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["OutboundTransfer.CancelParams"] + self, **params: Unpack["OutboundTransferCancelParams"] ) -> "OutboundTransfer": """ An OutboundTransfer can be canceled if the funds have not yet been paid out. @@ -582,7 +377,7 @@ def cancel( # pyright: ignore[reportGeneralTypeIssues] async def _cls_cancel_async( cls, outbound_transfer: str, - **params: Unpack["OutboundTransfer.CancelParams"], + **params: Unpack["OutboundTransferCancelParams"], ) -> "OutboundTransfer": """ An OutboundTransfer can be canceled if the funds have not yet been paid out. @@ -602,7 +397,7 @@ async def _cls_cancel_async( @staticmethod async def cancel_async( outbound_transfer: str, - **params: Unpack["OutboundTransfer.CancelParams"], + **params: Unpack["OutboundTransferCancelParams"], ) -> "OutboundTransfer": """ An OutboundTransfer can be canceled if the funds have not yet been paid out. @@ -611,7 +406,7 @@ async def cancel_async( @overload async def cancel_async( - self, **params: Unpack["OutboundTransfer.CancelParams"] + self, **params: Unpack["OutboundTransferCancelParams"] ) -> "OutboundTransfer": """ An OutboundTransfer can be canceled if the funds have not yet been paid out. @@ -620,7 +415,7 @@ async def cancel_async( @class_method_variant("_cls_cancel_async") async def cancel_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["OutboundTransfer.CancelParams"] + self, **params: Unpack["OutboundTransferCancelParams"] ) -> "OutboundTransfer": """ An OutboundTransfer can be canceled if the funds have not yet been paid out. @@ -638,7 +433,7 @@ async def cancel_async( # pyright: ignore[reportGeneralTypeIssues] @classmethod def create( - cls, **params: Unpack["OutboundTransfer.CreateParams"] + cls, **params: Unpack["OutboundTransferCreateParams"] ) -> "OutboundTransfer": """ Creates an OutboundTransfer. @@ -654,7 +449,7 @@ def create( @classmethod async def create_async( - cls, **params: Unpack["OutboundTransfer.CreateParams"] + cls, **params: Unpack["OutboundTransferCreateParams"] ) -> "OutboundTransfer": """ Creates an OutboundTransfer. @@ -670,7 +465,7 @@ async def create_async( @classmethod def list( - cls, **params: Unpack["OutboundTransfer.ListParams"] + cls, **params: Unpack["OutboundTransferListParams"] ) -> ListObject["OutboundTransfer"]: """ Returns a list of OutboundTransfers sent from the specified FinancialAccount. @@ -690,7 +485,7 @@ def list( @classmethod async def list_async( - cls, **params: Unpack["OutboundTransfer.ListParams"] + cls, **params: Unpack["OutboundTransferListParams"] ) -> ListObject["OutboundTransfer"]: """ Returns a list of OutboundTransfers sent from the specified FinancialAccount. @@ -710,7 +505,7 @@ async def list_async( @classmethod def retrieve( - cls, id: str, **params: Unpack["OutboundTransfer.RetrieveParams"] + cls, id: str, **params: Unpack["OutboundTransferRetrieveParams"] ) -> "OutboundTransfer": """ Retrieves the details of an existing OutboundTransfer by passing the unique OutboundTransfer ID from either the OutboundTransfer creation request or OutboundTransfer list. @@ -721,7 +516,7 @@ def retrieve( @classmethod async def retrieve_async( - cls, id: str, **params: Unpack["OutboundTransfer.RetrieveParams"] + cls, id: str, **params: Unpack["OutboundTransferRetrieveParams"] ) -> "OutboundTransfer": """ Retrieves the details of an existing OutboundTransfer by passing the unique OutboundTransfer ID from either the OutboundTransfer creation request or OutboundTransfer list. @@ -737,7 +532,7 @@ class TestHelpers(APIResourceTestHelpers["OutboundTransfer"]): def _cls_fail( cls, outbound_transfer: str, - **params: Unpack["OutboundTransfer.FailParams"], + **params: Unpack["OutboundTransferFailParams"], ) -> "OutboundTransfer": """ Transitions a test mode created OutboundTransfer to the failed status. The OutboundTransfer must already be in the processing state. @@ -757,7 +552,7 @@ def _cls_fail( @staticmethod def fail( outbound_transfer: str, - **params: Unpack["OutboundTransfer.FailParams"], + **params: Unpack["OutboundTransferFailParams"], ) -> "OutboundTransfer": """ Transitions a test mode created OutboundTransfer to the failed status. The OutboundTransfer must already be in the processing state. @@ -766,7 +561,7 @@ def fail( @overload def fail( - self, **params: Unpack["OutboundTransfer.FailParams"] + self, **params: Unpack["OutboundTransferFailParams"] ) -> "OutboundTransfer": """ Transitions a test mode created OutboundTransfer to the failed status. The OutboundTransfer must already be in the processing state. @@ -775,7 +570,7 @@ def fail( @class_method_variant("_cls_fail") def fail( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["OutboundTransfer.FailParams"] + self, **params: Unpack["OutboundTransferFailParams"] ) -> "OutboundTransfer": """ Transitions a test mode created OutboundTransfer to the failed status. The OutboundTransfer must already be in the processing state. @@ -795,7 +590,7 @@ def fail( # pyright: ignore[reportGeneralTypeIssues] async def _cls_fail_async( cls, outbound_transfer: str, - **params: Unpack["OutboundTransfer.FailParams"], + **params: Unpack["OutboundTransferFailParams"], ) -> "OutboundTransfer": """ Transitions a test mode created OutboundTransfer to the failed status. The OutboundTransfer must already be in the processing state. @@ -815,7 +610,7 @@ async def _cls_fail_async( @staticmethod async def fail_async( outbound_transfer: str, - **params: Unpack["OutboundTransfer.FailParams"], + **params: Unpack["OutboundTransferFailParams"], ) -> "OutboundTransfer": """ Transitions a test mode created OutboundTransfer to the failed status. The OutboundTransfer must already be in the processing state. @@ -824,7 +619,7 @@ async def fail_async( @overload async def fail_async( - self, **params: Unpack["OutboundTransfer.FailParams"] + self, **params: Unpack["OutboundTransferFailParams"] ) -> "OutboundTransfer": """ Transitions a test mode created OutboundTransfer to the failed status. The OutboundTransfer must already be in the processing state. @@ -833,7 +628,7 @@ async def fail_async( @class_method_variant("_cls_fail_async") async def fail_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["OutboundTransfer.FailParams"] + self, **params: Unpack["OutboundTransferFailParams"] ) -> "OutboundTransfer": """ Transitions a test mode created OutboundTransfer to the failed status. The OutboundTransfer must already be in the processing state. @@ -853,7 +648,7 @@ async def fail_async( # pyright: ignore[reportGeneralTypeIssues] def _cls_post( cls, outbound_transfer: str, - **params: Unpack["OutboundTransfer.PostParams"], + **params: Unpack["OutboundTransferPostParams"], ) -> "OutboundTransfer": """ Transitions a test mode created OutboundTransfer to the posted status. The OutboundTransfer must already be in the processing state. @@ -873,7 +668,7 @@ def _cls_post( @staticmethod def post( outbound_transfer: str, - **params: Unpack["OutboundTransfer.PostParams"], + **params: Unpack["OutboundTransferPostParams"], ) -> "OutboundTransfer": """ Transitions a test mode created OutboundTransfer to the posted status. The OutboundTransfer must already be in the processing state. @@ -882,7 +677,7 @@ def post( @overload def post( - self, **params: Unpack["OutboundTransfer.PostParams"] + self, **params: Unpack["OutboundTransferPostParams"] ) -> "OutboundTransfer": """ Transitions a test mode created OutboundTransfer to the posted status. The OutboundTransfer must already be in the processing state. @@ -891,7 +686,7 @@ def post( @class_method_variant("_cls_post") def post( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["OutboundTransfer.PostParams"] + self, **params: Unpack["OutboundTransferPostParams"] ) -> "OutboundTransfer": """ Transitions a test mode created OutboundTransfer to the posted status. The OutboundTransfer must already be in the processing state. @@ -911,7 +706,7 @@ def post( # pyright: ignore[reportGeneralTypeIssues] async def _cls_post_async( cls, outbound_transfer: str, - **params: Unpack["OutboundTransfer.PostParams"], + **params: Unpack["OutboundTransferPostParams"], ) -> "OutboundTransfer": """ Transitions a test mode created OutboundTransfer to the posted status. The OutboundTransfer must already be in the processing state. @@ -931,7 +726,7 @@ async def _cls_post_async( @staticmethod async def post_async( outbound_transfer: str, - **params: Unpack["OutboundTransfer.PostParams"], + **params: Unpack["OutboundTransferPostParams"], ) -> "OutboundTransfer": """ Transitions a test mode created OutboundTransfer to the posted status. The OutboundTransfer must already be in the processing state. @@ -940,7 +735,7 @@ async def post_async( @overload async def post_async( - self, **params: Unpack["OutboundTransfer.PostParams"] + self, **params: Unpack["OutboundTransferPostParams"] ) -> "OutboundTransfer": """ Transitions a test mode created OutboundTransfer to the posted status. The OutboundTransfer must already be in the processing state. @@ -949,7 +744,7 @@ async def post_async( @class_method_variant("_cls_post_async") async def post_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["OutboundTransfer.PostParams"] + self, **params: Unpack["OutboundTransferPostParams"] ) -> "OutboundTransfer": """ Transitions a test mode created OutboundTransfer to the posted status. The OutboundTransfer must already be in the processing state. @@ -969,7 +764,7 @@ async def post_async( # pyright: ignore[reportGeneralTypeIssues] def _cls_return_outbound_transfer( cls, outbound_transfer: str, - **params: Unpack["OutboundTransfer.ReturnOutboundTransferParams"], + **params: Unpack["OutboundTransferReturnOutboundTransferParams"], ) -> "OutboundTransfer": """ Transitions a test mode created OutboundTransfer to the returned status. The OutboundTransfer must already be in the processing state. @@ -989,7 +784,7 @@ def _cls_return_outbound_transfer( @staticmethod def return_outbound_transfer( outbound_transfer: str, - **params: Unpack["OutboundTransfer.ReturnOutboundTransferParams"], + **params: Unpack["OutboundTransferReturnOutboundTransferParams"], ) -> "OutboundTransfer": """ Transitions a test mode created OutboundTransfer to the returned status. The OutboundTransfer must already be in the processing state. @@ -999,7 +794,7 @@ def return_outbound_transfer( @overload def return_outbound_transfer( self, - **params: Unpack["OutboundTransfer.ReturnOutboundTransferParams"], + **params: Unpack["OutboundTransferReturnOutboundTransferParams"], ) -> "OutboundTransfer": """ Transitions a test mode created OutboundTransfer to the returned status. The OutboundTransfer must already be in the processing state. @@ -1009,7 +804,7 @@ def return_outbound_transfer( @class_method_variant("_cls_return_outbound_transfer") def return_outbound_transfer( # pyright: ignore[reportGeneralTypeIssues] self, - **params: Unpack["OutboundTransfer.ReturnOutboundTransferParams"], + **params: Unpack["OutboundTransferReturnOutboundTransferParams"], ) -> "OutboundTransfer": """ Transitions a test mode created OutboundTransfer to the returned status. The OutboundTransfer must already be in the processing state. @@ -1029,7 +824,7 @@ def return_outbound_transfer( # pyright: ignore[reportGeneralTypeIssues] async def _cls_return_outbound_transfer_async( cls, outbound_transfer: str, - **params: Unpack["OutboundTransfer.ReturnOutboundTransferParams"], + **params: Unpack["OutboundTransferReturnOutboundTransferParams"], ) -> "OutboundTransfer": """ Transitions a test mode created OutboundTransfer to the returned status. The OutboundTransfer must already be in the processing state. @@ -1049,7 +844,7 @@ async def _cls_return_outbound_transfer_async( @staticmethod async def return_outbound_transfer_async( outbound_transfer: str, - **params: Unpack["OutboundTransfer.ReturnOutboundTransferParams"], + **params: Unpack["OutboundTransferReturnOutboundTransferParams"], ) -> "OutboundTransfer": """ Transitions a test mode created OutboundTransfer to the returned status. The OutboundTransfer must already be in the processing state. @@ -1059,7 +854,7 @@ async def return_outbound_transfer_async( @overload async def return_outbound_transfer_async( self, - **params: Unpack["OutboundTransfer.ReturnOutboundTransferParams"], + **params: Unpack["OutboundTransferReturnOutboundTransferParams"], ) -> "OutboundTransfer": """ Transitions a test mode created OutboundTransfer to the returned status. The OutboundTransfer must already be in the processing state. @@ -1069,7 +864,7 @@ async def return_outbound_transfer_async( @class_method_variant("_cls_return_outbound_transfer_async") async def return_outbound_transfer_async( # pyright: ignore[reportGeneralTypeIssues] self, - **params: Unpack["OutboundTransfer.ReturnOutboundTransferParams"], + **params: Unpack["OutboundTransferReturnOutboundTransferParams"], ) -> "OutboundTransfer": """ Transitions a test mode created OutboundTransfer to the returned status. The OutboundTransfer must already be in the processing state. @@ -1089,7 +884,7 @@ async def return_outbound_transfer_async( # pyright: ignore[reportGeneralTypeIs def _cls_update( cls, outbound_transfer: str, - **params: Unpack["OutboundTransfer.UpdateParams"], + **params: Unpack["OutboundTransferUpdateParams"], ) -> "OutboundTransfer": """ Updates a test mode created OutboundTransfer with tracking details. The OutboundTransfer must not be cancelable, and cannot be in the canceled or failed states. @@ -1109,7 +904,7 @@ def _cls_update( @staticmethod def update( outbound_transfer: str, - **params: Unpack["OutboundTransfer.UpdateParams"], + **params: Unpack["OutboundTransferUpdateParams"], ) -> "OutboundTransfer": """ Updates a test mode created OutboundTransfer with tracking details. The OutboundTransfer must not be cancelable, and cannot be in the canceled or failed states. @@ -1118,7 +913,7 @@ def update( @overload def update( - self, **params: Unpack["OutboundTransfer.UpdateParams"] + self, **params: Unpack["OutboundTransferUpdateParams"] ) -> "OutboundTransfer": """ Updates a test mode created OutboundTransfer with tracking details. The OutboundTransfer must not be cancelable, and cannot be in the canceled or failed states. @@ -1127,7 +922,7 @@ def update( @class_method_variant("_cls_update") def update( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["OutboundTransfer.UpdateParams"] + self, **params: Unpack["OutboundTransferUpdateParams"] ) -> "OutboundTransfer": """ Updates a test mode created OutboundTransfer with tracking details. The OutboundTransfer must not be cancelable, and cannot be in the canceled or failed states. @@ -1147,7 +942,7 @@ def update( # pyright: ignore[reportGeneralTypeIssues] async def _cls_update_async( cls, outbound_transfer: str, - **params: Unpack["OutboundTransfer.UpdateParams"], + **params: Unpack["OutboundTransferUpdateParams"], ) -> "OutboundTransfer": """ Updates a test mode created OutboundTransfer with tracking details. The OutboundTransfer must not be cancelable, and cannot be in the canceled or failed states. @@ -1167,7 +962,7 @@ async def _cls_update_async( @staticmethod async def update_async( outbound_transfer: str, - **params: Unpack["OutboundTransfer.UpdateParams"], + **params: Unpack["OutboundTransferUpdateParams"], ) -> "OutboundTransfer": """ Updates a test mode created OutboundTransfer with tracking details. The OutboundTransfer must not be cancelable, and cannot be in the canceled or failed states. @@ -1176,7 +971,7 @@ async def update_async( @overload async def update_async( - self, **params: Unpack["OutboundTransfer.UpdateParams"] + self, **params: Unpack["OutboundTransferUpdateParams"] ) -> "OutboundTransfer": """ Updates a test mode created OutboundTransfer with tracking details. The OutboundTransfer must not be cancelable, and cannot be in the canceled or failed states. @@ -1185,7 +980,7 @@ async def update_async( @class_method_variant("_cls_update_async") async def update_async( # pyright: ignore[reportGeneralTypeIssues] - self, **params: Unpack["OutboundTransfer.UpdateParams"] + self, **params: Unpack["OutboundTransferUpdateParams"] ) -> "OutboundTransfer": """ Updates a test mode created OutboundTransfer with tracking details. The OutboundTransfer must not be cancelable, and cannot be in the canceled or failed states. diff --git a/stripe/treasury/_outbound_transfer_service.py b/stripe/treasury/_outbound_transfer_service.py index 8e7b0366a..86ca497c3 100644 --- a/stripe/treasury/_outbound_transfer_service.py +++ b/stripe/treasury/_outbound_transfer_service.py @@ -5,148 +5,28 @@ from stripe._stripe_service import StripeService from stripe._util import sanitize_id from stripe.treasury._outbound_transfer import OutboundTransfer -from typing import Dict, List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params.treasury._outbound_transfer_cancel_params import ( + OutboundTransferCancelParams, + ) + from stripe.params.treasury._outbound_transfer_create_params import ( + OutboundTransferCreateParams, + ) + from stripe.params.treasury._outbound_transfer_list_params import ( + OutboundTransferListParams, + ) + from stripe.params.treasury._outbound_transfer_retrieve_params import ( + OutboundTransferRetrieveParams, + ) class OutboundTransferService(StripeService): - class CancelParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - - class CreateParams(TypedDict): - amount: int - """ - Amount (in cents) to be transferred. - """ - 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). - """ - description: NotRequired[str] - """ - An arbitrary string attached to the object. Often useful for displaying to users. - """ - destination_payment_method: NotRequired[str] - """ - The PaymentMethod to use as the payment instrument for the OutboundTransfer. - """ - destination_payment_method_data: NotRequired[ - "OutboundTransferService.CreateParamsDestinationPaymentMethodData" - ] - """ - Hash used to generate the PaymentMethod to be used for this OutboundTransfer. Exclusive with `destination_payment_method`. - """ - destination_payment_method_options: NotRequired[ - "OutboundTransferService.CreateParamsDestinationPaymentMethodOptions" - ] - """ - Hash describing payment method configuration details. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - financial_account: str - """ - The FinancialAccount to pull funds from. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - """ - network_details: NotRequired[ - "OutboundTransferService.CreateParamsNetworkDetails" - ] - """ - Details about the network used for the OutboundTransfer. - """ - statement_descriptor: NotRequired[str] - """ - Statement descriptor to be shown on the receiving end of an OutboundTransfer. Maximum 10 characters for `ach` transfers or 140 characters for `us_domestic_wire` transfers. The default value is "transfer". - """ - - class CreateParamsDestinationPaymentMethodData(TypedDict): - financial_account: NotRequired[str] - """ - Required if type is set to `financial_account`. The FinancialAccount ID to send funds to. - """ - type: Literal["financial_account"] - """ - The type of the destination. - """ - - class CreateParamsDestinationPaymentMethodOptions(TypedDict): - us_bank_account: NotRequired[ - "Literal['']|OutboundTransferService.CreateParamsDestinationPaymentMethodOptionsUsBankAccount" - ] - """ - Optional fields for `us_bank_account`. - """ - - class CreateParamsDestinationPaymentMethodOptionsUsBankAccount(TypedDict): - network: NotRequired[Literal["ach", "us_domestic_wire"]] - """ - Specifies the network rails to be used. If not set, will default to the PaymentMethod's preferred network. See the [docs](https://stripe.com/docs/treasury/money-movement/timelines) to learn more about money movement timelines for each network type. - """ - - class CreateParamsNetworkDetails(TypedDict): - ach: NotRequired[ - "OutboundTransferService.CreateParamsNetworkDetailsAch" - ] - """ - Optional fields for `ach`. - """ - type: Literal["ach"] - """ - The type of flow that originated the OutboundTransfer. - """ - - class CreateParamsNetworkDetailsAch(TypedDict): - addenda: NotRequired[str] - """ - Addenda record data associated with this OutboundTransfer. - """ - - class ListParams(TypedDict): - 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. - """ - financial_account: str - """ - Returns objects associated with this FinancialAccount. - """ - 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. - """ - status: NotRequired[ - Literal["canceled", "failed", "posted", "processing", "returned"] - ] - """ - Only return OutboundTransfers that have the given status: `processing`, `canceled`, `failed`, `posted`, or `returned`. - """ - - class RetrieveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - def list( self, - params: "OutboundTransferService.ListParams", + params: "OutboundTransferListParams", options: Optional[RequestOptions] = None, ) -> ListObject[OutboundTransfer]: """ @@ -165,7 +45,7 @@ def list( async def list_async( self, - params: "OutboundTransferService.ListParams", + params: "OutboundTransferListParams", options: Optional[RequestOptions] = None, ) -> ListObject[OutboundTransfer]: """ @@ -184,7 +64,7 @@ async def list_async( def create( self, - params: "OutboundTransferService.CreateParams", + params: "OutboundTransferCreateParams", options: Optional[RequestOptions] = None, ) -> OutboundTransfer: """ @@ -203,7 +83,7 @@ def create( async def create_async( self, - params: "OutboundTransferService.CreateParams", + params: "OutboundTransferCreateParams", options: Optional[RequestOptions] = None, ) -> OutboundTransfer: """ @@ -223,7 +103,7 @@ async def create_async( def retrieve( self, outbound_transfer: str, - params: Optional["OutboundTransferService.RetrieveParams"] = None, + params: Optional["OutboundTransferRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> OutboundTransfer: """ @@ -245,7 +125,7 @@ def retrieve( async def retrieve_async( self, outbound_transfer: str, - params: Optional["OutboundTransferService.RetrieveParams"] = None, + params: Optional["OutboundTransferRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> OutboundTransfer: """ @@ -267,7 +147,7 @@ async def retrieve_async( def cancel( self, outbound_transfer: str, - params: Optional["OutboundTransferService.CancelParams"] = None, + params: Optional["OutboundTransferCancelParams"] = None, options: Optional[RequestOptions] = None, ) -> OutboundTransfer: """ @@ -289,7 +169,7 @@ def cancel( async def cancel_async( self, outbound_transfer: str, - params: Optional["OutboundTransferService.CancelParams"] = None, + params: Optional["OutboundTransferCancelParams"] = None, options: Optional[RequestOptions] = None, ) -> OutboundTransfer: """ diff --git a/stripe/treasury/_received_credit.py b/stripe/treasury/_received_credit.py index 1b2b48638..375a1ab04 100644 --- a/stripe/treasury/_received_credit.py +++ b/stripe/treasury/_received_credit.py @@ -3,21 +3,22 @@ from stripe._expandable_field import ExpandableField from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource -from stripe._request_options import RequestOptions from stripe._stripe_object import StripeObject from stripe._test_helpers import APIResourceTestHelpers -from typing import ClassVar, List, Optional, cast -from typing_extensions import ( - Literal, - NotRequired, - Type, - TypedDict, - Unpack, - TYPE_CHECKING, -) +from typing import ClassVar, Optional, cast +from typing_extensions import Literal, Type, Unpack, TYPE_CHECKING if TYPE_CHECKING: from stripe._payout import Payout + from stripe.params.treasury._received_credit_create_params import ( + ReceivedCreditCreateParams, + ) + from stripe.params.treasury._received_credit_list_params import ( + ReceivedCreditListParams, + ) + from stripe.params.treasury._received_credit_retrieve_params import ( + ReceivedCreditRetrieveParams, + ) from stripe.treasury._credit_reversal import CreditReversal from stripe.treasury._outbound_payment import OutboundPayment from stripe.treasury._outbound_transfer import OutboundTransfer @@ -228,134 +229,6 @@ class ReversalDetails(StripeObject): Set if a ReceivedCredit cannot be reversed. """ - class CreateParams(RequestOptions): - amount: int - """ - Amount (in cents) to be transferred. - """ - 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). - """ - description: NotRequired[str] - """ - An arbitrary string attached to the object. Often useful for displaying to users. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - financial_account: str - """ - The FinancialAccount to send funds to. - """ - initiating_payment_method_details: NotRequired[ - "ReceivedCredit.CreateParamsInitiatingPaymentMethodDetails" - ] - """ - Initiating payment method details for the object. - """ - network: Literal["ach", "us_domestic_wire"] - """ - Specifies the network rails to be used. If not set, will default to the PaymentMethod's preferred network. See the [docs](https://stripe.com/docs/treasury/money-movement/timelines) to learn more about money movement timelines for each network type. - """ - network_details: NotRequired[ - "ReceivedCredit.CreateParamsNetworkDetails" - ] - """ - Details about the network used for the ReceivedCredit. - """ - - class CreateParamsInitiatingPaymentMethodDetails(TypedDict): - type: Literal["us_bank_account"] - """ - The source type. - """ - us_bank_account: NotRequired[ - "ReceivedCredit.CreateParamsInitiatingPaymentMethodDetailsUsBankAccount" - ] - """ - Optional fields for `us_bank_account`. - """ - - class CreateParamsInitiatingPaymentMethodDetailsUsBankAccount(TypedDict): - account_holder_name: NotRequired[str] - """ - The bank account holder's name. - """ - account_number: NotRequired[str] - """ - The bank account number. - """ - routing_number: NotRequired[str] - """ - The bank account's routing number. - """ - - class CreateParamsNetworkDetails(TypedDict): - ach: NotRequired["ReceivedCredit.CreateParamsNetworkDetailsAch"] - """ - Optional fields for `ach`. - """ - type: Literal["ach"] - """ - The type of flow that originated the ReceivedCredit. - """ - - class CreateParamsNetworkDetailsAch(TypedDict): - addenda: NotRequired[str] - """ - ACH Addenda record - """ - - class ListParams(RequestOptions): - 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. - """ - financial_account: str - """ - The FinancialAccount that received the funds. - """ - 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. - """ - linked_flows: NotRequired["ReceivedCredit.ListParamsLinkedFlows"] - """ - Only return ReceivedCredits described by the flow. - """ - 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. - """ - status: NotRequired[Literal["failed", "succeeded"]] - """ - Only return ReceivedCredits that have the given status: `succeeded` or `failed`. - """ - - class ListParamsLinkedFlows(TypedDict): - source_flow_type: Literal[ - "credit_reversal", - "other", - "outbound_payment", - "outbound_transfer", - "payout", - ] - """ - The source flow type. - """ - - class RetrieveParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - amount: int """ Amount (in cents) transferred. @@ -428,7 +301,7 @@ class RetrieveParams(RequestOptions): @classmethod def list( - cls, **params: Unpack["ReceivedCredit.ListParams"] + cls, **params: Unpack["ReceivedCreditListParams"] ) -> ListObject["ReceivedCredit"]: """ Returns a list of ReceivedCredits. @@ -448,7 +321,7 @@ def list( @classmethod async def list_async( - cls, **params: Unpack["ReceivedCredit.ListParams"] + cls, **params: Unpack["ReceivedCreditListParams"] ) -> ListObject["ReceivedCredit"]: """ Returns a list of ReceivedCredits. @@ -468,7 +341,7 @@ async def list_async( @classmethod def retrieve( - cls, id: str, **params: Unpack["ReceivedCredit.RetrieveParams"] + cls, id: str, **params: Unpack["ReceivedCreditRetrieveParams"] ) -> "ReceivedCredit": """ Retrieves the details of an existing ReceivedCredit by passing the unique ReceivedCredit ID from the ReceivedCredit list. @@ -479,7 +352,7 @@ def retrieve( @classmethod async def retrieve_async( - cls, id: str, **params: Unpack["ReceivedCredit.RetrieveParams"] + cls, id: str, **params: Unpack["ReceivedCreditRetrieveParams"] ) -> "ReceivedCredit": """ Retrieves the details of an existing ReceivedCredit by passing the unique ReceivedCredit ID from the ReceivedCredit list. @@ -493,7 +366,7 @@ class TestHelpers(APIResourceTestHelpers["ReceivedCredit"]): @classmethod def create( - cls, **params: Unpack["ReceivedCredit.CreateParams"] + cls, **params: Unpack["ReceivedCreditCreateParams"] ) -> "ReceivedCredit": """ Use this endpoint to simulate a test mode ReceivedCredit initiated by a third party. In live mode, you can't directly create ReceivedCredits initiated by third parties. @@ -509,7 +382,7 @@ def create( @classmethod async def create_async( - cls, **params: Unpack["ReceivedCredit.CreateParams"] + cls, **params: Unpack["ReceivedCreditCreateParams"] ) -> "ReceivedCredit": """ Use this endpoint to simulate a test mode ReceivedCredit initiated by a third party. In live mode, you can't directly create ReceivedCredits initiated by third parties. diff --git a/stripe/treasury/_received_credit_service.py b/stripe/treasury/_received_credit_service.py index 4b87cad2a..ab0bea3a2 100644 --- a/stripe/treasury/_received_credit_service.py +++ b/stripe/treasury/_received_credit_service.py @@ -5,64 +5,22 @@ from stripe._stripe_service import StripeService from stripe._util import sanitize_id from stripe.treasury._received_credit import ReceivedCredit -from typing import List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params.treasury._received_credit_list_params import ( + ReceivedCreditListParams, + ) + from stripe.params.treasury._received_credit_retrieve_params import ( + ReceivedCreditRetrieveParams, + ) -class ReceivedCreditService(StripeService): - class ListParams(TypedDict): - 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. - """ - financial_account: str - """ - The FinancialAccount that received the funds. - """ - 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. - """ - linked_flows: NotRequired[ - "ReceivedCreditService.ListParamsLinkedFlows" - ] - """ - Only return ReceivedCredits described by the flow. - """ - 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. - """ - status: NotRequired[Literal["failed", "succeeded"]] - """ - Only return ReceivedCredits that have the given status: `succeeded` or `failed`. - """ - - class ListParamsLinkedFlows(TypedDict): - source_flow_type: Literal[ - "credit_reversal", - "other", - "outbound_payment", - "outbound_transfer", - "payout", - ] - """ - The source flow type. - """ - - class RetrieveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ +class ReceivedCreditService(StripeService): def list( self, - params: "ReceivedCreditService.ListParams", + params: "ReceivedCreditListParams", options: Optional[RequestOptions] = None, ) -> ListObject[ReceivedCredit]: """ @@ -81,7 +39,7 @@ def list( async def list_async( self, - params: "ReceivedCreditService.ListParams", + params: "ReceivedCreditListParams", options: Optional[RequestOptions] = None, ) -> ListObject[ReceivedCredit]: """ @@ -101,7 +59,7 @@ async def list_async( def retrieve( self, id: str, - params: Optional["ReceivedCreditService.RetrieveParams"] = None, + params: Optional["ReceivedCreditRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> ReceivedCredit: """ @@ -123,7 +81,7 @@ def retrieve( async def retrieve_async( self, id: str, - params: Optional["ReceivedCreditService.RetrieveParams"] = None, + params: Optional["ReceivedCreditRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> ReceivedCredit: """ diff --git a/stripe/treasury/_received_debit.py b/stripe/treasury/_received_debit.py index cbee53e48..94a32d3f3 100644 --- a/stripe/treasury/_received_debit.py +++ b/stripe/treasury/_received_debit.py @@ -3,20 +3,21 @@ from stripe._expandable_field import ExpandableField from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource -from stripe._request_options import RequestOptions from stripe._stripe_object import StripeObject from stripe._test_helpers import APIResourceTestHelpers -from typing import ClassVar, List, Optional, cast -from typing_extensions import ( - Literal, - NotRequired, - Type, - TypedDict, - Unpack, - TYPE_CHECKING, -) +from typing import ClassVar, Optional, cast +from typing_extensions import Literal, Type, Unpack, TYPE_CHECKING if TYPE_CHECKING: + from stripe.params.treasury._received_debit_create_params import ( + ReceivedDebitCreateParams, + ) + from stripe.params.treasury._received_debit_list_params import ( + ReceivedDebitListParams, + ) + from stripe.params.treasury._received_debit_retrieve_params import ( + ReceivedDebitRetrieveParams, + ) from stripe.treasury._transaction import Transaction @@ -180,118 +181,6 @@ class ReversalDetails(StripeObject): Set if a ReceivedDebit can't be reversed. """ - class CreateParams(RequestOptions): - amount: int - """ - Amount (in cents) to be transferred. - """ - 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). - """ - description: NotRequired[str] - """ - An arbitrary string attached to the object. Often useful for displaying to users. - """ - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - financial_account: str - """ - The FinancialAccount to pull funds from. - """ - initiating_payment_method_details: NotRequired[ - "ReceivedDebit.CreateParamsInitiatingPaymentMethodDetails" - ] - """ - Initiating payment method details for the object. - """ - network: Literal["ach"] - """ - Specifies the network rails to be used. If not set, will default to the PaymentMethod's preferred network. See the [docs](https://stripe.com/docs/treasury/money-movement/timelines) to learn more about money movement timelines for each network type. - """ - network_details: NotRequired[ - "ReceivedDebit.CreateParamsNetworkDetails" - ] - """ - Details about the network used for the ReceivedDebit. - """ - - class CreateParamsInitiatingPaymentMethodDetails(TypedDict): - type: Literal["us_bank_account"] - """ - The source type. - """ - us_bank_account: NotRequired[ - "ReceivedDebit.CreateParamsInitiatingPaymentMethodDetailsUsBankAccount" - ] - """ - Optional fields for `us_bank_account`. - """ - - class CreateParamsInitiatingPaymentMethodDetailsUsBankAccount(TypedDict): - account_holder_name: NotRequired[str] - """ - The bank account holder's name. - """ - account_number: NotRequired[str] - """ - The bank account number. - """ - routing_number: NotRequired[str] - """ - The bank account's routing number. - """ - - class CreateParamsNetworkDetails(TypedDict): - ach: NotRequired["ReceivedDebit.CreateParamsNetworkDetailsAch"] - """ - Optional fields for `ach`. - """ - type: Literal["ach"] - """ - The type of flow that originated the ReceivedDebit. - """ - - class CreateParamsNetworkDetailsAch(TypedDict): - addenda: NotRequired[str] - """ - Addenda record data associated with this ReceivedDebit. - """ - - class ListParams(RequestOptions): - 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. - """ - financial_account: str - """ - The FinancialAccount that funds were pulled from. - """ - 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. - """ - status: NotRequired[Literal["failed", "succeeded"]] - """ - Only return ReceivedDebits that have the given status: `succeeded` or `failed`. - """ - - class RetrieveParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - amount: int """ Amount (in cents) transferred. @@ -365,7 +254,7 @@ class RetrieveParams(RequestOptions): @classmethod def list( - cls, **params: Unpack["ReceivedDebit.ListParams"] + cls, **params: Unpack["ReceivedDebitListParams"] ) -> ListObject["ReceivedDebit"]: """ Returns a list of ReceivedDebits. @@ -385,7 +274,7 @@ def list( @classmethod async def list_async( - cls, **params: Unpack["ReceivedDebit.ListParams"] + cls, **params: Unpack["ReceivedDebitListParams"] ) -> ListObject["ReceivedDebit"]: """ Returns a list of ReceivedDebits. @@ -405,7 +294,7 @@ async def list_async( @classmethod def retrieve( - cls, id: str, **params: Unpack["ReceivedDebit.RetrieveParams"] + cls, id: str, **params: Unpack["ReceivedDebitRetrieveParams"] ) -> "ReceivedDebit": """ Retrieves the details of an existing ReceivedDebit by passing the unique ReceivedDebit ID from the ReceivedDebit list @@ -416,7 +305,7 @@ def retrieve( @classmethod async def retrieve_async( - cls, id: str, **params: Unpack["ReceivedDebit.RetrieveParams"] + cls, id: str, **params: Unpack["ReceivedDebitRetrieveParams"] ) -> "ReceivedDebit": """ Retrieves the details of an existing ReceivedDebit by passing the unique ReceivedDebit ID from the ReceivedDebit list @@ -430,7 +319,7 @@ class TestHelpers(APIResourceTestHelpers["ReceivedDebit"]): @classmethod def create( - cls, **params: Unpack["ReceivedDebit.CreateParams"] + cls, **params: Unpack["ReceivedDebitCreateParams"] ) -> "ReceivedDebit": """ Use this endpoint to simulate a test mode ReceivedDebit initiated by a third party. In live mode, you can't directly create ReceivedDebits initiated by third parties. @@ -446,7 +335,7 @@ def create( @classmethod async def create_async( - cls, **params: Unpack["ReceivedDebit.CreateParams"] + cls, **params: Unpack["ReceivedDebitCreateParams"] ) -> "ReceivedDebit": """ Use this endpoint to simulate a test mode ReceivedDebit initiated by a third party. In live mode, you can't directly create ReceivedDebits initiated by third parties. diff --git a/stripe/treasury/_received_debit_service.py b/stripe/treasury/_received_debit_service.py index 93b0bca35..c48f44a03 100644 --- a/stripe/treasury/_received_debit_service.py +++ b/stripe/treasury/_received_debit_service.py @@ -5,46 +5,22 @@ from stripe._stripe_service import StripeService from stripe._util import sanitize_id from stripe.treasury._received_debit import ReceivedDebit -from typing import List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params.treasury._received_debit_list_params import ( + ReceivedDebitListParams, + ) + from stripe.params.treasury._received_debit_retrieve_params import ( + ReceivedDebitRetrieveParams, + ) -class ReceivedDebitService(StripeService): - class ListParams(TypedDict): - 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. - """ - financial_account: str - """ - The FinancialAccount that funds were pulled from. - """ - 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. - """ - status: NotRequired[Literal["failed", "succeeded"]] - """ - Only return ReceivedDebits that have the given status: `succeeded` or `failed`. - """ - - class RetrieveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ +class ReceivedDebitService(StripeService): def list( self, - params: "ReceivedDebitService.ListParams", + params: "ReceivedDebitListParams", options: Optional[RequestOptions] = None, ) -> ListObject[ReceivedDebit]: """ @@ -63,7 +39,7 @@ def list( async def list_async( self, - params: "ReceivedDebitService.ListParams", + params: "ReceivedDebitListParams", options: Optional[RequestOptions] = None, ) -> ListObject[ReceivedDebit]: """ @@ -83,7 +59,7 @@ async def list_async( def retrieve( self, id: str, - params: Optional["ReceivedDebitService.RetrieveParams"] = None, + params: Optional["ReceivedDebitRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> ReceivedDebit: """ @@ -103,7 +79,7 @@ def retrieve( async def retrieve_async( self, id: str, - params: Optional["ReceivedDebitService.RetrieveParams"] = None, + params: Optional["ReceivedDebitRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> ReceivedDebit: """ diff --git a/stripe/treasury/_transaction.py b/stripe/treasury/_transaction.py index 8652d29f5..3892b1764 100644 --- a/stripe/treasury/_transaction.py +++ b/stripe/treasury/_transaction.py @@ -2,19 +2,18 @@ # File generated from our OpenAPI spec from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource -from stripe._request_options import RequestOptions from stripe._stripe_object import StripeObject -from typing import ClassVar, List, Optional -from typing_extensions import ( - Literal, - NotRequired, - TypedDict, - Unpack, - TYPE_CHECKING, -) +from typing import ClassVar, Optional +from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: from stripe.issuing._authorization import Authorization + from stripe.params.treasury._transaction_list_params import ( + TransactionListParams, + ) + from stripe.params.treasury._transaction_retrieve_params import ( + TransactionRetrieveParams, + ) from stripe.treasury._credit_reversal import CreditReversal from stripe.treasury._debit_reversal import DebitReversal from stripe.treasury._inbound_transfer import InboundTransfer @@ -120,96 +119,6 @@ class StatusTransitions(StripeObject): Timestamp describing when the Transaction changed status to `void`. """ - class ListParams(RequestOptions): - created: NotRequired["Transaction.ListParamsCreated|int"] - """ - Only return Transactions that were created during the given date interval. - """ - 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. - """ - financial_account: str - """ - Returns objects associated with this FinancialAccount. - """ - 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. - """ - order_by: NotRequired[Literal["created", "posted_at"]] - """ - The results are in reverse chronological order by `created` or `posted_at`. The default is `created`. - """ - 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. - """ - status: NotRequired[Literal["open", "posted", "void"]] - """ - Only return Transactions that have the given status: `open`, `posted`, or `void`. - """ - status_transitions: NotRequired[ - "Transaction.ListParamsStatusTransitions" - ] - """ - A filter for the `status_transitions.posted_at` timestamp. When using this filter, `status=posted` and `order_by=posted_at` must also be specified. - """ - - class ListParamsCreated(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) - """ - - class ListParamsStatusTransitions(TypedDict): - posted_at: NotRequired[ - "Transaction.ListParamsStatusTransitionsPostedAt|int" - ] - """ - Returns Transactions with `posted_at` within the specified range. - """ - - class ListParamsStatusTransitionsPostedAt(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) - """ - - class RetrieveParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - amount: int """ Amount (in cents) transferred. @@ -280,7 +189,7 @@ class RetrieveParams(RequestOptions): @classmethod def list( - cls, **params: Unpack["Transaction.ListParams"] + cls, **params: Unpack["TransactionListParams"] ) -> ListObject["Transaction"]: """ Retrieves a list of Transaction objects. @@ -300,7 +209,7 @@ def list( @classmethod async def list_async( - cls, **params: Unpack["Transaction.ListParams"] + cls, **params: Unpack["TransactionListParams"] ) -> ListObject["Transaction"]: """ Retrieves a list of Transaction objects. @@ -320,7 +229,7 @@ async def list_async( @classmethod def retrieve( - cls, id: str, **params: Unpack["Transaction.RetrieveParams"] + cls, id: str, **params: Unpack["TransactionRetrieveParams"] ) -> "Transaction": """ Retrieves the details of an existing Transaction. @@ -331,7 +240,7 @@ def retrieve( @classmethod async def retrieve_async( - cls, id: str, **params: Unpack["Transaction.RetrieveParams"] + cls, id: str, **params: Unpack["TransactionRetrieveParams"] ) -> "Transaction": """ Retrieves the details of an existing Transaction. diff --git a/stripe/treasury/_transaction_entry.py b/stripe/treasury/_transaction_entry.py index 7fba8ed23..2e4012cb2 100644 --- a/stripe/treasury/_transaction_entry.py +++ b/stripe/treasury/_transaction_entry.py @@ -3,19 +3,18 @@ from stripe._expandable_field import ExpandableField from stripe._list_object import ListObject from stripe._listable_api_resource import ListableAPIResource -from stripe._request_options import RequestOptions from stripe._stripe_object import StripeObject -from typing import ClassVar, List, Optional -from typing_extensions import ( - Literal, - NotRequired, - TypedDict, - Unpack, - TYPE_CHECKING, -) +from typing import ClassVar, Optional +from typing_extensions import Literal, Unpack, TYPE_CHECKING if TYPE_CHECKING: from stripe.issuing._authorization import Authorization + from stripe.params.treasury._transaction_entry_list_params import ( + TransactionEntryListParams, + ) + from stripe.params.treasury._transaction_entry_retrieve_params import ( + TransactionEntryRetrieveParams, + ) from stripe.treasury._credit_reversal import CreditReversal from stripe.treasury._debit_reversal import DebitReversal from stripe.treasury._inbound_transfer import InboundTransfer @@ -111,83 +110,6 @@ class FlowDetails(StripeObject): Type of the flow that created the Transaction. Set to the same value as `flow_type`. """ - class ListParams(RequestOptions): - created: NotRequired["TransactionEntry.ListParamsCreated|int"] - """ - Only return TransactionEntries that were created during the given date interval. - """ - effective_at: NotRequired["TransactionEntry.ListParamsEffectiveAt|int"] - 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. - """ - financial_account: str - """ - Returns objects associated with this FinancialAccount. - """ - 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. - """ - order_by: NotRequired[Literal["created", "effective_at"]] - """ - The results are in reverse chronological order by `created` or `effective_at`. The default is `created`. - """ - 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. - """ - transaction: NotRequired[str] - """ - Only return TransactionEntries associated with this Transaction. - """ - - class ListParamsCreated(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) - """ - - class ListParamsEffectiveAt(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) - """ - - class RetrieveParams(RequestOptions): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ - balance_impact: BalanceImpact """ Change to a FinancialAccount's balance @@ -274,7 +196,7 @@ class RetrieveParams(RequestOptions): @classmethod def list( - cls, **params: Unpack["TransactionEntry.ListParams"] + cls, **params: Unpack["TransactionEntryListParams"] ) -> ListObject["TransactionEntry"]: """ Retrieves a list of TransactionEntry objects. @@ -294,7 +216,7 @@ def list( @classmethod async def list_async( - cls, **params: Unpack["TransactionEntry.ListParams"] + cls, **params: Unpack["TransactionEntryListParams"] ) -> ListObject["TransactionEntry"]: """ Retrieves a list of TransactionEntry objects. @@ -314,7 +236,7 @@ async def list_async( @classmethod def retrieve( - cls, id: str, **params: Unpack["TransactionEntry.RetrieveParams"] + cls, id: str, **params: Unpack["TransactionEntryRetrieveParams"] ) -> "TransactionEntry": """ Retrieves a TransactionEntry object. @@ -325,7 +247,7 @@ def retrieve( @classmethod async def retrieve_async( - cls, id: str, **params: Unpack["TransactionEntry.RetrieveParams"] + cls, id: str, **params: Unpack["TransactionEntryRetrieveParams"] ) -> "TransactionEntry": """ Retrieves a TransactionEntry object. diff --git a/stripe/treasury/_transaction_entry_service.py b/stripe/treasury/_transaction_entry_service.py index a8f7e12c8..618ebf1c8 100644 --- a/stripe/treasury/_transaction_entry_service.py +++ b/stripe/treasury/_transaction_entry_service.py @@ -5,93 +5,22 @@ from stripe._stripe_service import StripeService from stripe._util import sanitize_id from stripe.treasury._transaction_entry import TransactionEntry -from typing import List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params.treasury._transaction_entry_list_params import ( + TransactionEntryListParams, + ) + from stripe.params.treasury._transaction_entry_retrieve_params import ( + TransactionEntryRetrieveParams, + ) -class TransactionEntryService(StripeService): - class ListParams(TypedDict): - created: NotRequired["TransactionEntryService.ListParamsCreated|int"] - """ - Only return TransactionEntries that were created during the given date interval. - """ - effective_at: NotRequired[ - "TransactionEntryService.ListParamsEffectiveAt|int" - ] - 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. - """ - financial_account: str - """ - Returns objects associated with this FinancialAccount. - """ - 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. - """ - order_by: NotRequired[Literal["created", "effective_at"]] - """ - The results are in reverse chronological order by `created` or `effective_at`. The default is `created`. - """ - 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. - """ - transaction: NotRequired[str] - """ - Only return TransactionEntries associated with this Transaction. - """ - - class ListParamsCreated(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) - """ - - class ListParamsEffectiveAt(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) - """ - - class RetrieveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ +class TransactionEntryService(StripeService): def list( self, - params: "TransactionEntryService.ListParams", + params: "TransactionEntryListParams", options: Optional[RequestOptions] = None, ) -> ListObject[TransactionEntry]: """ @@ -110,7 +39,7 @@ def list( async def list_async( self, - params: "TransactionEntryService.ListParams", + params: "TransactionEntryListParams", options: Optional[RequestOptions] = None, ) -> ListObject[TransactionEntry]: """ @@ -130,7 +59,7 @@ async def list_async( def retrieve( self, id: str, - params: Optional["TransactionEntryService.RetrieveParams"] = None, + params: Optional["TransactionEntryRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> TransactionEntry: """ @@ -152,7 +81,7 @@ def retrieve( async def retrieve_async( self, id: str, - params: Optional["TransactionEntryService.RetrieveParams"] = None, + params: Optional["TransactionEntryRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> TransactionEntry: """ diff --git a/stripe/treasury/_transaction_service.py b/stripe/treasury/_transaction_service.py index 7d416987d..465054c1b 100644 --- a/stripe/treasury/_transaction_service.py +++ b/stripe/treasury/_transaction_service.py @@ -5,104 +5,22 @@ from stripe._stripe_service import StripeService from stripe._util import sanitize_id from stripe.treasury._transaction import Transaction -from typing import List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params.treasury._transaction_list_params import ( + TransactionListParams, + ) + from stripe.params.treasury._transaction_retrieve_params import ( + TransactionRetrieveParams, + ) -class TransactionService(StripeService): - class ListParams(TypedDict): - created: NotRequired["TransactionService.ListParamsCreated|int"] - """ - Only return Transactions that were created during the given date interval. - """ - 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. - """ - financial_account: str - """ - Returns objects associated with this FinancialAccount. - """ - 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. - """ - order_by: NotRequired[Literal["created", "posted_at"]] - """ - The results are in reverse chronological order by `created` or `posted_at`. The default is `created`. - """ - 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. - """ - status: NotRequired[Literal["open", "posted", "void"]] - """ - Only return Transactions that have the given status: `open`, `posted`, or `void`. - """ - status_transitions: NotRequired[ - "TransactionService.ListParamsStatusTransitions" - ] - """ - A filter for the `status_transitions.posted_at` timestamp. When using this filter, `status=posted` and `order_by=posted_at` must also be specified. - """ - - class ListParamsCreated(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) - """ - - class ListParamsStatusTransitions(TypedDict): - posted_at: NotRequired[ - "TransactionService.ListParamsStatusTransitionsPostedAt|int" - ] - """ - Returns Transactions with `posted_at` within the specified range. - """ - - class ListParamsStatusTransitionsPostedAt(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) - """ - - class RetrieveParams(TypedDict): - expand: NotRequired[List[str]] - """ - Specifies which fields in the response should be expanded. - """ +class TransactionService(StripeService): def list( self, - params: "TransactionService.ListParams", + params: "TransactionListParams", options: Optional[RequestOptions] = None, ) -> ListObject[Transaction]: """ @@ -121,7 +39,7 @@ def list( async def list_async( self, - params: "TransactionService.ListParams", + params: "TransactionListParams", options: Optional[RequestOptions] = None, ) -> ListObject[Transaction]: """ @@ -141,7 +59,7 @@ async def list_async( def retrieve( self, id: str, - params: Optional["TransactionService.RetrieveParams"] = None, + params: Optional["TransactionRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Transaction: """ @@ -161,7 +79,7 @@ def retrieve( async def retrieve_async( self, id: str, - params: Optional["TransactionService.RetrieveParams"] = None, + params: Optional["TransactionRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Transaction: """ diff --git a/stripe/util.py b/stripe/util.py deleted file mode 100644 index d2ea8ccfb..000000000 --- a/stripe/util.py +++ /dev/null @@ -1,19 +0,0 @@ -# -*- coding: utf-8 -*- -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.util package is deprecated, please change your - imports to import from stripe directly. - From: - from stripe.util import convert_to_stripe_object - To: - from stripe import convert_to_stripe_object - """, - DeprecationWarning, - stacklevel=2, -) - -if not TYPE_CHECKING: - from stripe._util import * # noqa diff --git a/stripe/v2/__init__.py b/stripe/v2/__init__.py index 83c8b212d..311bfc279 100644 --- a/stripe/v2/__init__.py +++ b/stripe/v2/__init__.py @@ -1,12 +1,5 @@ from stripe.v2._list_object import ListObject as ListObject from stripe.v2._amount import Amount as Amount, AmountParam as AmountParam -from stripe.v2._event import ( - EventNotification as EventNotification, - UnknownEventNotification as UnknownEventNotification, - RelatedObject as RelatedObject, - Reason as Reason, - ReasonRequest as ReasonRequest, -) # The beginning of the section generated from our OpenAPI spec @@ -21,8 +14,6 @@ from stripe.v2._billing_service import BillingService as BillingService from stripe.v2._core_service import CoreService as CoreService from stripe.v2._deleted_object import DeletedObject as DeletedObject -from stripe.v2._event import Event as Event -from stripe.v2._event_destination import EventDestination as EventDestination from stripe.v2._financial_address_credit_simulation import ( FinancialAddressCreditSimulation as FinancialAddressCreditSimulation, ) diff --git a/stripe/v2/billing/_bill_setting_service.py b/stripe/v2/billing/_bill_setting_service.py index 2ba41706b..3c5907139 100644 --- a/stripe/v2/billing/_bill_setting_service.py +++ b/stripe/v2/billing/_bill_setting_service.py @@ -6,8 +6,22 @@ from stripe.v2._list_object import ListObject from stripe.v2.billing._bill_setting import BillSetting from stripe.v2.billing.bill_settings._version_service import VersionService -from typing import List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params.v2.billing._bill_setting_create_params import ( + BillSettingCreateParams, + ) + from stripe.params.v2.billing._bill_setting_list_params import ( + BillSettingListParams, + ) + from stripe.params.v2.billing._bill_setting_retrieve_params import ( + BillSettingRetrieveParams, + ) + from stripe.params.v2.billing._bill_setting_update_params import ( + BillSettingUpdateParams, + ) class BillSettingService(StripeService): @@ -15,139 +29,9 @@ def __init__(self, requestor): super().__init__(requestor) self.versions = VersionService(self._requestor) - class CreateParams(TypedDict): - calculation: NotRequired["BillSettingService.CreateParamsCalculation"] - """ - Settings related to calculating a bill. - """ - display_name: NotRequired[str] - """ - An optional customer-facing display name for the CollectionSetting object. - Maximum length of 250 characters. - """ - invoice: NotRequired["BillSettingService.CreateParamsInvoice"] - """ - Settings related to invoice behavior. - """ - invoice_rendering_template: NotRequired[str] - """ - The ID of the invoice rendering template to be used when generating invoices. - """ - lookup_key: NotRequired[str] - """ - A lookup key used to retrieve settings dynamically from a static string. - This may be up to 200 characters. - """ - - class CreateParamsCalculation(TypedDict): - tax: NotRequired["BillSettingService.CreateParamsCalculationTax"] - """ - Settings for calculating tax. - """ - - class CreateParamsCalculationTax(TypedDict): - type: Literal["automatic", "manual"] - """ - Determines if tax will be calculated automatically based on a PTC or manually based on rules defined by the merchant. Defaults to "manual". - """ - - class CreateParamsInvoice(TypedDict): - time_until_due: NotRequired[ - "BillSettingService.CreateParamsInvoiceTimeUntilDue" - ] - """ - The amount of time until the invoice will be overdue for payment. - """ - - class CreateParamsInvoiceTimeUntilDue(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - The interval unit for the time until due. - """ - interval_count: int - """ - The number of interval units. For example, if interval=day and interval_count=30, - the invoice will be due in 30 days. - """ - - class ListParams(TypedDict): - limit: NotRequired[int] - """ - Optionally set the maximum number of results per page. Defaults to 20. - """ - lookup_keys: NotRequired[List[str]] - """ - Only return the settings with these lookup_keys, if any exist. - You can specify up to 10 lookup_keys. - """ - - class RetrieveParams(TypedDict): - pass - - class UpdateParams(TypedDict): - calculation: NotRequired["BillSettingService.UpdateParamsCalculation"] - """ - Settings related to calculating a bill. - """ - display_name: NotRequired[str] - """ - An optional customer-facing display name for the BillSetting object. - To remove the display name, set it to an empty string in the request. - Maximum length of 250 characters. - """ - invoice: NotRequired["BillSettingService.UpdateParamsInvoice"] - """ - Settings related to invoice behavior. - """ - invoice_rendering_template: NotRequired[str] - """ - The ID of the invoice rendering template to be used when generating invoices. - """ - live_version: NotRequired[str] - """ - Optionally change the live version of the BillSetting. Providing `live_version = "latest"` will set the - BillSetting' `live_version` to its latest version. - """ - lookup_key: NotRequired[str] - """ - A lookup key used to retrieve settings dynamically from a static string. - This may be up to 200 characters. - """ - - class UpdateParamsCalculation(TypedDict): - tax: NotRequired["BillSettingService.UpdateParamsCalculationTax"] - """ - Settings for calculating tax. - """ - - class UpdateParamsCalculationTax(TypedDict): - type: Literal["automatic", "manual"] - """ - Determines if tax will be calculated automatically based on a PTC or manually based on rules defined by the merchant. Defaults to "manual". - """ - - class UpdateParamsInvoice(TypedDict): - time_until_due: NotRequired[ - "BillSettingService.UpdateParamsInvoiceTimeUntilDue" - ] - """ - The amount of time until the invoice will be overdue for payment. - """ - - class UpdateParamsInvoiceTimeUntilDue(TypedDict): - interval: Literal["day", "month", "week", "year"] - """ - The interval unit for the time until due. - """ - interval_count: int - """ - The number of interval units. For example, if interval=day and interval_count=30, - the invoice will be due in 30 days. - """ - def list( self, - params: Optional["BillSettingService.ListParams"] = None, + params: Optional["BillSettingListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[BillSetting]: """ @@ -166,7 +50,7 @@ def list( async def list_async( self, - params: Optional["BillSettingService.ListParams"] = None, + params: Optional["BillSettingListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[BillSetting]: """ @@ -185,7 +69,7 @@ async def list_async( def create( self, - params: Optional["BillSettingService.CreateParams"] = None, + params: Optional["BillSettingCreateParams"] = None, options: Optional[RequestOptions] = None, ) -> BillSetting: """ @@ -204,7 +88,7 @@ def create( async def create_async( self, - params: Optional["BillSettingService.CreateParams"] = None, + params: Optional["BillSettingCreateParams"] = None, options: Optional[RequestOptions] = None, ) -> BillSetting: """ @@ -224,7 +108,7 @@ async def create_async( def retrieve( self, id: str, - params: Optional["BillSettingService.RetrieveParams"] = None, + params: Optional["BillSettingRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> BillSetting: """ @@ -244,7 +128,7 @@ def retrieve( async def retrieve_async( self, id: str, - params: Optional["BillSettingService.RetrieveParams"] = None, + params: Optional["BillSettingRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> BillSetting: """ @@ -264,7 +148,7 @@ async def retrieve_async( def update( self, id: str, - params: Optional["BillSettingService.UpdateParams"] = None, + params: Optional["BillSettingUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> BillSetting: """ @@ -284,7 +168,7 @@ def update( async def update_async( self, id: str, - params: Optional["BillSettingService.UpdateParams"] = None, + params: Optional["BillSettingUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> BillSetting: """ diff --git a/stripe/v2/billing/_cadence_service.py b/stripe/v2/billing/_cadence_service.py index cfa640745..6307bb353 100644 --- a/stripe/v2/billing/_cadence_service.py +++ b/stripe/v2/billing/_cadence_service.py @@ -5,372 +5,29 @@ from stripe._util import sanitize_id from stripe.v2._list_object import ListObject from stripe.v2.billing._cadence import Cadence -from typing import Dict, List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params.v2.billing._cadence_cancel_params import ( + CadenceCancelParams, + ) + from stripe.params.v2.billing._cadence_create_params import ( + CadenceCreateParams, + ) + from stripe.params.v2.billing._cadence_list_params import CadenceListParams + from stripe.params.v2.billing._cadence_retrieve_params import ( + CadenceRetrieveParams, + ) + from stripe.params.v2.billing._cadence_update_params import ( + CadenceUpdateParams, + ) class CadenceService(StripeService): - class CancelParams(TypedDict): - include: NotRequired[ - List[Literal["invoice_discount_rules", "settings_data"]] - ] - """ - Additional resource to include in the response. - """ - - class CreateParams(TypedDict): - billing_cycle: "CadenceService.CreateParamsBillingCycle" - """ - The billing cycle is the object that defines future billing cycle dates. - """ - include: NotRequired[ - List[Literal["invoice_discount_rules", "settings_data"]] - ] - """ - Additional resource to include in the response. - """ - lookup_key: NotRequired[str] - """ - A lookup key used to retrieve cadences dynamically from a static string. Maximum length of 200 characters. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://docs.stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. - """ - payer: "CadenceService.CreateParamsPayer" - """ - The payer determines the entity financially responsible for the bill. - """ - settings: NotRequired["CadenceService.CreateParamsSettings"] - """ - The settings associated with the cadence. - """ - - class CreateParamsBillingCycle(TypedDict): - interval_count: NotRequired[int] - """ - The number of intervals (specified in the interval attribute) between - cadence billings. For example, type=month and interval_count=3 bills every - 3 months. If this is not provided, it will default to 1. - """ - type: Literal["day", "month", "week", "year"] - """ - The frequency at which a cadence bills. - """ - day: NotRequired["CadenceService.CreateParamsBillingCycleDay"] - """ - Specific configuration for determining billing dates when type=day. - """ - month: NotRequired["CadenceService.CreateParamsBillingCycleMonth"] - """ - Specific configuration for determining billing dates when type=month. - """ - week: NotRequired["CadenceService.CreateParamsBillingCycleWeek"] - """ - Specific configuration for determining billing dates when type=week. - """ - year: NotRequired["CadenceService.CreateParamsBillingCycleYear"] - """ - Specific configuration for determining billing dates when type=year. - """ - - class CreateParamsBillingCycleDay(TypedDict): - time: NotRequired["CadenceService.CreateParamsBillingCycleDayTime"] - """ - The time at which the billing cycle ends. - This field is optional, and if not provided, it will default to - the time at which the cadence was created in UTC timezone. - """ - - class CreateParamsBillingCycleDayTime(TypedDict): - hour: int - """ - The hour at which the billing cycle ends. - This must be an integer between 0 and 23, inclusive. - 0 represents midnight, and 23 represents 11 PM. - """ - minute: int - """ - The minute at which the billing cycle ends. - Must be an integer between 0 and 59, inclusive. - """ - second: int - """ - The second at which the billing cycle ends. - Must be an integer between 0 and 59, inclusive. - """ - - class CreateParamsBillingCycleMonth(TypedDict): - day_of_month: int - """ - The day to anchor the billing on for a type="month" billing cycle from - 1-31. If this number is greater than the number of days in the month being - billed, this will anchor to the last day of the month. If not provided, - this will default to the day the cadence was created. - """ - month_of_year: NotRequired[int] - """ - The month to anchor the billing on for a type="month" billing cycle from - 1-12. If not provided, this will default to the month the cadence was created. - This setting can only be used for monthly billing cycles with `interval_count` of 2, 3, 4 or 6. - All occurrences will be calculated from month provided. - """ - time: NotRequired["CadenceService.CreateParamsBillingCycleMonthTime"] - """ - The time at which the billing cycle ends. - This field is optional, and if not provided, it will default to - the time at which the cadence was created in UTC timezone. - """ - - class CreateParamsBillingCycleMonthTime(TypedDict): - hour: int - """ - The hour at which the billing cycle ends. - This must be an integer between 0 and 23, inclusive. - 0 represents midnight, and 23 represents 11 PM. - """ - minute: int - """ - The minute at which the billing cycle ends. - Must be an integer between 0 and 59, inclusive. - """ - second: int - """ - The second at which the billing cycle ends. - Must be an integer between 0 and 59, inclusive. - """ - - class CreateParamsBillingCycleWeek(TypedDict): - day_of_week: int - """ - The day of the week to bill the type=week billing cycle on. - Numbered from 1-7 for Monday to Sunday respectively, based on the ISO-8601 - week day numbering. If not provided, this will default to the day the - cadence was created. - """ - time: NotRequired["CadenceService.CreateParamsBillingCycleWeekTime"] - """ - The time at which the billing cycle ends. - This field is optional, and if not provided, it will default to - the time at which the cadence was created in UTC timezone. - """ - - class CreateParamsBillingCycleWeekTime(TypedDict): - hour: int - """ - The hour at which the billing cycle ends. - This must be an integer between 0 and 23, inclusive. - 0 represents midnight, and 23 represents 11 PM. - """ - minute: int - """ - The minute at which the billing cycle ends. - Must be an integer between 0 and 59, inclusive. - """ - second: int - """ - The second at which the billing cycle ends. - Must be an integer between 0 and 59, inclusive. - """ - - class CreateParamsBillingCycleYear(TypedDict): - day_of_month: NotRequired[int] - """ - The day to anchor the billing on for a type="month" billing cycle from - 1-31. If this number is greater than the number of days in the month being - billed, this will anchor to the last day of the month. If not provided, - this will default to the day the cadence was created. - """ - month_of_year: NotRequired[int] - """ - The month to bill on from 1-12. If not provided, this will default to the - month the cadence was created. - """ - time: NotRequired["CadenceService.CreateParamsBillingCycleYearTime"] - """ - The time at which the billing cycle ends. - This field is optional, and if not provided, it will default to - the time at which the cadence was created in UTC timezone. - """ - - class CreateParamsBillingCycleYearTime(TypedDict): - hour: int - """ - The hour at which the billing cycle ends. - This must be an integer between 0 and 23, inclusive. - 0 represents midnight, and 23 represents 11 PM. - """ - minute: int - """ - The minute at which the billing cycle ends. - Must be an integer between 0 and 59, inclusive. - """ - second: int - """ - The second at which the billing cycle ends. - Must be an integer between 0 and 59, inclusive. - """ - - class CreateParamsPayer(TypedDict): - billing_profile: str - """ - The ID of the Billing Profile object which determines how a bill will be paid. - """ - - class CreateParamsSettings(TypedDict): - bill: NotRequired["CadenceService.CreateParamsSettingsBill"] - """ - Settings that configure bill generation, which includes calculating totals, tax, and presenting invoices. - If no setting is provided here, the settings from the customer referenced on the payer will be used. - If no customer settings are present, the merchant default settings will be used. - """ - collection: NotRequired[ - "CadenceService.CreateParamsSettingsCollection" - ] - """ - Settings that configure and manage the behavior of collecting payments. - If no setting is provided here, the settings from the customer referenced from the payer will be used if they exist. - If no customer settings are present, the merchant default settings will be used. - """ - - class CreateParamsSettingsBill(TypedDict): - id: str - """ - The ID of the referenced settings object. - """ - version: NotRequired[str] - """ - An optional field to specify the version of the Settings to use. - If not provided, this will always default to the live version any time the settings are used. - """ - - class CreateParamsSettingsCollection(TypedDict): - id: str - """ - The ID of the referenced settings object. - """ - version: NotRequired[str] - """ - An optional field to specify the version of the Settings to use. - If not provided, this will always default to the live version any time the settings are used. - """ - - class ListParams(TypedDict): - include: NotRequired[ - List[Literal["invoice_discount_rules", "settings_data"]] - ] - """ - Additional resource to include in the response. - """ - limit: NotRequired[int] - """ - Optionally set the maximum number of results per page. Defaults to 20. - """ - lookup_keys: NotRequired[List[str]] - """ - Only return the cadences with these lookup_keys, if any exist. You can specify up to 10 lookup_keys. - Mutually exclusive with `test_clock` and `payer`. - """ - payer: NotRequired["CadenceService.ListParamsPayer"] - """ - If provided, only cadences that specifically reference the payer will be returned. Mutually exclusive with `test_clock` and `lookup_keys`. - """ - test_clock: NotRequired[str] - """ - If provided, only cadences that specifically reference the provided test clock ID (via the - customer's test clock) will be returned. - Mutually exclusive with `payer`. - """ - - class ListParamsPayer(TypedDict): - customer: NotRequired[str] - """ - The ID of the Customer object. If provided, only cadences that specifically reference the provided customer ID will be returned. - """ - type: Literal["customer"] - """ - A string identifying the type of the payer. Currently the only supported value is `customer`. - """ - - class RetrieveParams(TypedDict): - include: NotRequired[ - List[Literal["invoice_discount_rules", "settings_data"]] - ] - """ - Additional resource to include in the response. - """ - - class UpdateParams(TypedDict): - include: NotRequired[ - List[Literal["invoice_discount_rules", "settings_data"]] - ] - """ - Additional resource to include in the response. - """ - lookup_key: NotRequired[str] - """ - A lookup key used to retrieve cadences dynamically from a static string. Maximum length of 200 characters. - """ - metadata: NotRequired[Dict[str, Optional[str]]] - """ - Set of [key-value pairs](https://docs.stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. - """ - payer: NotRequired["CadenceService.UpdateParamsPayer"] - """ - The payer determines the entity financially responsible for the bill. - """ - settings: NotRequired["CadenceService.UpdateParamsSettings"] - """ - The settings associated with the cadence. - """ - - class UpdateParamsPayer(TypedDict): - billing_profile: NotRequired[str] - """ - The ID of the Billing Profile object which determines how a bill will be paid. - """ - - class UpdateParamsSettings(TypedDict): - bill: NotRequired["CadenceService.UpdateParamsSettingsBill"] - """ - Settings that configure bills generation, which includes calculating totals, tax, and presenting invoices. If null is provided, the current bill settings will be removed from the billing cadence. - """ - collection: NotRequired[ - "CadenceService.UpdateParamsSettingsCollection" - ] - """ - Settings that configure and manage the behavior of collecting payments. If null is provided, the current collection settings will be removed from the billing cadence. - """ - - class UpdateParamsSettingsBill(TypedDict): - id: str - """ - The ID of the referenced settings object. - """ - version: NotRequired[str] - """ - An optional field to specify the version of Settings to use. - If not provided, this will always default to the `live_version` specified on the setting, any time the settings are used. - Using a specific version here will prevent the settings from updating, and is discouraged for cadences. - To clear a pinned version, set the version to null. - """ - - class UpdateParamsSettingsCollection(TypedDict): - id: str - """ - The ID of the referenced settings object. - """ - version: NotRequired[str] - """ - An optional field to specify the version of Settings to use. - If not provided, this will always default to the `live_version` specified on the setting, any time the settings are used. - Using a specific version here will prevent the settings from updating, and is discouraged for cadences. - To clear a pinned version, set the version to null. - """ - def list( self, - params: Optional["CadenceService.ListParams"] = None, + params: Optional["CadenceListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[Cadence]: """ @@ -389,7 +46,7 @@ def list( async def list_async( self, - params: Optional["CadenceService.ListParams"] = None, + params: Optional["CadenceListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[Cadence]: """ @@ -408,7 +65,7 @@ async def list_async( def create( self, - params: "CadenceService.CreateParams", + params: "CadenceCreateParams", options: Optional[RequestOptions] = None, ) -> Cadence: """ @@ -427,7 +84,7 @@ def create( async def create_async( self, - params: "CadenceService.CreateParams", + params: "CadenceCreateParams", options: Optional[RequestOptions] = None, ) -> Cadence: """ @@ -447,7 +104,7 @@ async def create_async( def retrieve( self, id: str, - params: Optional["CadenceService.RetrieveParams"] = None, + params: Optional["CadenceRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Cadence: """ @@ -467,7 +124,7 @@ def retrieve( async def retrieve_async( self, id: str, - params: Optional["CadenceService.RetrieveParams"] = None, + params: Optional["CadenceRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Cadence: """ @@ -487,7 +144,7 @@ async def retrieve_async( def update( self, id: str, - params: Optional["CadenceService.UpdateParams"] = None, + params: Optional["CadenceUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> Cadence: """ @@ -507,7 +164,7 @@ def update( async def update_async( self, id: str, - params: Optional["CadenceService.UpdateParams"] = None, + params: Optional["CadenceUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> Cadence: """ @@ -527,7 +184,7 @@ async def update_async( def cancel( self, id: str, - params: Optional["CadenceService.CancelParams"] = None, + params: Optional["CadenceCancelParams"] = None, options: Optional[RequestOptions] = None, ) -> Cadence: """ @@ -547,7 +204,7 @@ def cancel( async def cancel_async( self, id: str, - params: Optional["CadenceService.CancelParams"] = None, + params: Optional["CadenceCancelParams"] = None, options: Optional[RequestOptions] = None, ) -> Cadence: """ diff --git a/stripe/v2/billing/_collection_setting_service.py b/stripe/v2/billing/_collection_setting_service.py index 73e0d41dc..6fbd3ab37 100644 --- a/stripe/v2/billing/_collection_setting_service.py +++ b/stripe/v2/billing/_collection_setting_service.py @@ -8,8 +8,22 @@ from stripe.v2.billing.collection_settings._version_service import ( VersionService, ) -from typing import Any, Dict, List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params.v2.billing._collection_setting_create_params import ( + CollectionSettingCreateParams, + ) + from stripe.params.v2.billing._collection_setting_list_params import ( + CollectionSettingListParams, + ) + from stripe.params.v2.billing._collection_setting_retrieve_params import ( + CollectionSettingRetrieveParams, + ) + from stripe.params.v2.billing._collection_setting_update_params import ( + CollectionSettingUpdateParams, + ) class CollectionSettingService(StripeService): @@ -17,513 +31,9 @@ def __init__(self, requestor): super().__init__(requestor) self.versions = VersionService(self._requestor) - class CreateParams(TypedDict): - collection_method: NotRequired[Literal["automatic", "send_invoice"]] - """ - Either automatic, or send_invoice. When charging automatically, Stripe will attempt to pay this - bill at the end of the period using the payment method attached to the payer profile. When sending an invoice, - Stripe will email your payer profile an invoice with payment instructions. - Defaults to automatic. - """ - display_name: NotRequired[str] - """ - An optional customer-facing display name for the CollectionSetting object. - Maximum length of 250 characters. - """ - email_delivery: NotRequired[ - "CollectionSettingService.CreateParamsEmailDelivery" - ] - """ - Email delivery setting. - """ - lookup_key: NotRequired[str] - """ - A lookup key used to retrieve settings dynamically from a static string. - This may be up to 200 characters. - """ - payment_method_configuration: NotRequired[str] - """ - The ID of the PaymentMethodConfiguration object, which controls which payment methods are displayed to your customers. - """ - payment_method_options: NotRequired[ - "CollectionSettingService.CreateParamsPaymentMethodOptions" - ] - """ - Payment Method specific configuration to be stored on the object. - """ - - class CreateParamsEmailDelivery(TypedDict): - payment_due: NotRequired[ - "CollectionSettingService.CreateParamsEmailDeliveryPaymentDue" - ] - """ - Controls emails for when the payment is due. For example after the invoice is finilized and transition to Open state. - """ - - class CreateParamsEmailDeliveryPaymentDue(TypedDict): - enabled: bool - """ - If true an email for the invoice would be generated and sent out. - """ - include_payment_link: bool - """ - If true the payment link to hosted invocie page would be included in email and PDF of the invoice. - """ - - class CreateParamsPaymentMethodOptions(TypedDict): - acss_debit: NotRequired[ - "CollectionSettingService.CreateParamsPaymentMethodOptionsAcssDebit" - ] - """ - This sub-hash contains details about the Canadian pre-authorized debit payment method options. - """ - bancontact: NotRequired[ - "CollectionSettingService.CreateParamsPaymentMethodOptionsBancontact" - ] - """ - This sub-hash contains details about the Bancontact payment method. - """ - card: NotRequired[ - "CollectionSettingService.CreateParamsPaymentMethodOptionsCard" - ] - """ - This sub-hash contains details about the Card payment method options. - """ - customer_balance: NotRequired[ - "CollectionSettingService.CreateParamsPaymentMethodOptionsCustomerBalance" - ] - """ - This sub-hash contains details about the Bank transfer payment method options. - """ - konbini: NotRequired[Dict[str, Any]] - """ - This sub-hash contains details about the Konbini payment method options. - """ - sepa_debit: NotRequired[Dict[str, Any]] - """ - This sub-hash contains details about the SEPA Direct Debit payment method options. - """ - us_bank_account: NotRequired[ - "CollectionSettingService.CreateParamsPaymentMethodOptionsUsBankAccount" - ] - """ - This sub-hash contains details about the ACH direct debit payment method options. - """ - - class CreateParamsPaymentMethodOptionsAcssDebit(TypedDict): - mandate_options: NotRequired[ - "CollectionSettingService.CreateParamsPaymentMethodOptionsAcssDebitMandateOptions" - ] - """ - Additional fields for Mandate creation. - """ - verification_method: NotRequired[ - Literal["automatic", "instant", "microdeposits"] - ] - """ - Verification method. - """ - - class CreateParamsPaymentMethodOptionsAcssDebitMandateOptions(TypedDict): - transaction_type: NotRequired[Literal["business", "personal"]] - """ - Transaction type of the mandate. - """ - - class CreateParamsPaymentMethodOptionsBancontact(TypedDict): - preferred_language: NotRequired[Literal["de", "en", "fr", "nl"]] - """ - Preferred language of the Bancontact authorization page that the customer is redirected to. - """ - - class CreateParamsPaymentMethodOptionsCard(TypedDict): - mandate_options: NotRequired[ - "CollectionSettingService.CreateParamsPaymentMethodOptionsCardMandateOptions" - ] - """ - Configuration options for setting up an eMandate for cards issued in India. - """ - network: NotRequired[str] - """ - Selected network to process the payment on. Depends on the available networks of the card. - """ - request_three_d_secure: NotRequired[ - Literal["any", "automatic", "challenge"] - ] - """ - An advanced option 3D Secure. We strongly recommend that you rely on our SCA Engine to automatically prompt your customers - for authentication based on risk level and [other requirements](https://docs.corp.stripe.com/strong-customer-authentication). - However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. - Read our guide on [manually requesting 3D Secure](https://docs.corp.stripe.com/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. - """ - - class CreateParamsPaymentMethodOptionsCardMandateOptions(TypedDict): - amount: NotRequired[int] - """ - Amount to be charged for future payments. - """ - amount_type: NotRequired[Literal["fixed", "maximum"]] - """ - The AmountType for the mandate. One of `fixed` or `maximum`. - """ - description: NotRequired[str] - """ - A description of the mandate that is meant to be displayed to the customer. - """ - - class CreateParamsPaymentMethodOptionsCustomerBalance(TypedDict): - bank_transfer: NotRequired[ - "CollectionSettingService.CreateParamsPaymentMethodOptionsCustomerBalanceBankTransfer" - ] - """ - Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. - """ - funding_type: NotRequired[Literal["bank_transfer"]] - """ - The funding method type to be used when there are not enough funds in the customer balance. Currently the only supported value is `bank_transfer`. - """ - - class CreateParamsPaymentMethodOptionsCustomerBalanceBankTransfer( - TypedDict, - ): - eu_bank_transfer: NotRequired[ - "CollectionSettingService.CreateParamsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer" - ] - """ - Configuration for `eu_bank_transfer` funding type. Required if `type` is `eu_bank_transfer`. - """ - type: NotRequired[ - Literal[ - "eu_bank_transfer", - "gb_bank_transfer", - "jp_bank_transfer", - "mx_bank_transfer", - "us_bank_transfer", - ] - ] - """ - The bank transfer type that can be used for funding. - """ - - class CreateParamsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer( - TypedDict, - ): - country: Literal["BE", "DE", "ES", "FR", "IE", "NL"] - """ - The desired country code of the bank account information. - """ - - class CreateParamsPaymentMethodOptionsUsBankAccount(TypedDict): - financial_connections: "CollectionSettingService.CreateParamsPaymentMethodOptionsUsBankAccountFinancialConnections" - """ - Additional fields for Financial Connections Session creation. - """ - verification_method: Literal["automatic", "instant", "microdeposits"] - """ - Verification method. - """ - - class CreateParamsPaymentMethodOptionsUsBankAccountFinancialConnections( - TypedDict, - ): - filters: NotRequired[ - "CollectionSettingService.CreateParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters" - ] - """ - Provide filters for the linked accounts that the customer can select for the payment method. - """ - permissions: NotRequired[ - List[ - Literal[ - "balances", "ownership", "payment_method", "transactions" - ] - ] - ] - """ - The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. - """ - prefetch: NotRequired[ - List[Literal["balances", "ownership", "transactions"]] - ] - """ - List of data features that you would like to retrieve upon account creation. - """ - - class CreateParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters( - TypedDict, - ): - account_subcategories: NotRequired[ - List[Literal["checking", "savings"]] - ] - """ - The account subcategories to use to filter for selectable accounts. - """ - - class ListParams(TypedDict): - limit: NotRequired[int] - """ - Optionally set the maximum number of results per page. Defaults to 20. - """ - lookup_keys: NotRequired[List[str]] - """ - Only return the settings with these lookup_keys, if any exist. - You can specify up to 10 lookup_keys. - """ - - class RetrieveParams(TypedDict): - pass - - class UpdateParams(TypedDict): - collection_method: NotRequired[Literal["automatic", "send_invoice"]] - """ - Either automatic, or send_invoice. When charging automatically, Stripe will attempt to pay this - bill at the end of the period using the payment method attached to the payer profile. When sending an invoice, - Stripe will email your payer profile an invoice with payment instructions. - """ - display_name: NotRequired[str] - """ - An optional customer-facing display name for the CollectionSetting object. - To remove the display name, set it to an empty string in the request. - Maximum length of 250 characters. - """ - email_delivery: NotRequired[ - "CollectionSettingService.UpdateParamsEmailDelivery" - ] - """ - Email delivery settings. - """ - live_version: NotRequired[str] - """ - Optionally change the live version of the CollectionSetting. Billing Cadences and other objects that refer to this - CollectionSetting will use this version when no overrides are set. Providing `live_version = "latest"` will set the - CollectionSetting's `live_version` to its latest version. - """ - lookup_key: NotRequired[str] - """ - A lookup key used to retrieve settings dynamically from a static string. - This may be up to 200 characters. - """ - payment_method_configuration: NotRequired[str] - """ - The ID of the PaymentMethodConfiguration object, which controls which payment methods are displayed to your customers. - """ - payment_method_options: NotRequired[ - "CollectionSettingService.UpdateParamsPaymentMethodOptions" - ] - """ - Payment Method specific configuration to be stored on the object. - """ - - class UpdateParamsEmailDelivery(TypedDict): - payment_due: NotRequired[ - "CollectionSettingService.UpdateParamsEmailDeliveryPaymentDue" - ] - """ - Controls emails for when the payment is due. For example after the invoice is finilized and transition to Open state. - """ - - class UpdateParamsEmailDeliveryPaymentDue(TypedDict): - enabled: bool - """ - If true an email for the invoice would be generated and sent out. - """ - include_payment_link: bool - """ - If true the payment link to hosted invocie page would be included in email and PDF of the invoice. - """ - - class UpdateParamsPaymentMethodOptions(TypedDict): - acss_debit: NotRequired[ - "CollectionSettingService.UpdateParamsPaymentMethodOptionsAcssDebit" - ] - """ - This sub-hash contains details about the Canadian pre-authorized debit payment method options. - """ - bancontact: NotRequired[ - "CollectionSettingService.UpdateParamsPaymentMethodOptionsBancontact" - ] - """ - This sub-hash contains details about the Bancontact payment method. - """ - card: NotRequired[ - "CollectionSettingService.UpdateParamsPaymentMethodOptionsCard" - ] - """ - This sub-hash contains details about the Card payment method options. - """ - customer_balance: NotRequired[ - "CollectionSettingService.UpdateParamsPaymentMethodOptionsCustomerBalance" - ] - """ - This sub-hash contains details about the Bank transfer payment method options. - """ - konbini: NotRequired[Dict[str, Any]] - """ - This sub-hash contains details about the Konbini payment method options. - """ - sepa_debit: NotRequired[Dict[str, Any]] - """ - This sub-hash contains details about the SEPA Direct Debit payment method options. - """ - us_bank_account: NotRequired[ - "CollectionSettingService.UpdateParamsPaymentMethodOptionsUsBankAccount" - ] - """ - This sub-hash contains details about the ACH direct debit payment method options. - """ - - class UpdateParamsPaymentMethodOptionsAcssDebit(TypedDict): - mandate_options: NotRequired[ - "CollectionSettingService.UpdateParamsPaymentMethodOptionsAcssDebitMandateOptions" - ] - """ - Additional fields for Mandate creation. - """ - verification_method: NotRequired[ - Literal["automatic", "instant", "microdeposits"] - ] - """ - Verification method. - """ - - class UpdateParamsPaymentMethodOptionsAcssDebitMandateOptions(TypedDict): - transaction_type: NotRequired[Literal["business", "personal"]] - """ - Transaction type of the mandate. - """ - - class UpdateParamsPaymentMethodOptionsBancontact(TypedDict): - preferred_language: NotRequired[Literal["de", "en", "fr", "nl"]] - """ - Preferred language of the Bancontact authorization page that the customer is redirected to. - """ - - class UpdateParamsPaymentMethodOptionsCard(TypedDict): - mandate_options: NotRequired[ - "CollectionSettingService.UpdateParamsPaymentMethodOptionsCardMandateOptions" - ] - """ - Configuration options for setting up an eMandate for cards issued in India. - """ - network: NotRequired[str] - """ - Selected network to process the payment on. Depends on the available networks of the card. - """ - request_three_d_secure: NotRequired[ - Literal["any", "automatic", "challenge"] - ] - """ - An advanced option 3D Secure. We strongly recommend that you rely on our SCA Engine to automatically prompt your customers - for authentication based on risk level and [other requirements](https://docs.corp.stripe.com/strong-customer-authentication). - However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. - Read our guide on [manually requesting 3D Secure](https://docs.corp.stripe.com/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. - """ - - class UpdateParamsPaymentMethodOptionsCardMandateOptions(TypedDict): - amount: NotRequired[int] - """ - Amount to be charged for future payments. - """ - amount_type: NotRequired[Literal["fixed", "maximum"]] - """ - The AmountType for the mandate. One of `fixed` or `maximum`. - """ - description: NotRequired[str] - """ - A description of the mandate that is meant to be displayed to the customer. - """ - - class UpdateParamsPaymentMethodOptionsCustomerBalance(TypedDict): - bank_transfer: NotRequired[ - "CollectionSettingService.UpdateParamsPaymentMethodOptionsCustomerBalanceBankTransfer" - ] - """ - Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. - """ - funding_type: NotRequired[Literal["bank_transfer"]] - """ - The funding method type to be used when there are not enough funds in the customer balance. Currently the only supported value is `bank_transfer`. - """ - - class UpdateParamsPaymentMethodOptionsCustomerBalanceBankTransfer( - TypedDict, - ): - eu_bank_transfer: NotRequired[ - "CollectionSettingService.UpdateParamsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer" - ] - """ - Configuration for `eu_bank_transfer` funding type. Required if `type` is `eu_bank_transfer`. - """ - type: NotRequired[ - Literal[ - "eu_bank_transfer", - "gb_bank_transfer", - "jp_bank_transfer", - "mx_bank_transfer", - "us_bank_transfer", - ] - ] - """ - The bank transfer type that can be used for funding. - """ - - class UpdateParamsPaymentMethodOptionsCustomerBalanceBankTransferEuBankTransfer( - TypedDict, - ): - country: Literal["BE", "DE", "ES", "FR", "IE", "NL"] - """ - The desired country code of the bank account information. - """ - - class UpdateParamsPaymentMethodOptionsUsBankAccount(TypedDict): - financial_connections: "CollectionSettingService.UpdateParamsPaymentMethodOptionsUsBankAccountFinancialConnections" - """ - Additional fields for Financial Connections Session creation. - """ - verification_method: Literal["automatic", "instant", "microdeposits"] - """ - Verification method. - """ - - class UpdateParamsPaymentMethodOptionsUsBankAccountFinancialConnections( - TypedDict, - ): - filters: NotRequired[ - "CollectionSettingService.UpdateParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters" - ] - """ - Provide filters for the linked accounts that the customer can select for the payment method. - """ - permissions: NotRequired[ - List[ - Literal[ - "balances", "ownership", "payment_method", "transactions" - ] - ] - ] - """ - The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. - """ - prefetch: NotRequired[ - List[Literal["balances", "ownership", "transactions"]] - ] - """ - List of data features that you would like to retrieve upon account creation. - """ - - class UpdateParamsPaymentMethodOptionsUsBankAccountFinancialConnectionsFilters( - TypedDict, - ): - account_subcategories: NotRequired[ - List[Literal["checking", "savings"]] - ] - """ - The account subcategories to use to filter for selectable accounts. - """ - def list( self, - params: Optional["CollectionSettingService.ListParams"] = None, + params: Optional["CollectionSettingListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[CollectionSetting]: """ @@ -542,7 +52,7 @@ def list( async def list_async( self, - params: Optional["CollectionSettingService.ListParams"] = None, + params: Optional["CollectionSettingListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[CollectionSetting]: """ @@ -561,7 +71,7 @@ async def list_async( def create( self, - params: Optional["CollectionSettingService.CreateParams"] = None, + params: Optional["CollectionSettingCreateParams"] = None, options: Optional[RequestOptions] = None, ) -> CollectionSetting: """ @@ -580,7 +90,7 @@ def create( async def create_async( self, - params: Optional["CollectionSettingService.CreateParams"] = None, + params: Optional["CollectionSettingCreateParams"] = None, options: Optional[RequestOptions] = None, ) -> CollectionSetting: """ @@ -600,7 +110,7 @@ async def create_async( def retrieve( self, id: str, - params: Optional["CollectionSettingService.RetrieveParams"] = None, + params: Optional["CollectionSettingRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> CollectionSetting: """ @@ -622,7 +132,7 @@ def retrieve( async def retrieve_async( self, id: str, - params: Optional["CollectionSettingService.RetrieveParams"] = None, + params: Optional["CollectionSettingRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> CollectionSetting: """ @@ -644,7 +154,7 @@ async def retrieve_async( def update( self, id: str, - params: Optional["CollectionSettingService.UpdateParams"] = None, + params: Optional["CollectionSettingUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> CollectionSetting: """ @@ -666,7 +176,7 @@ def update( async def update_async( self, id: str, - params: Optional["CollectionSettingService.UpdateParams"] = None, + params: Optional["CollectionSettingUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> CollectionSetting: """ diff --git a/stripe/v2/billing/_custom_pricing_unit_service.py b/stripe/v2/billing/_custom_pricing_unit_service.py index 2a4f2b853..4961e4cda 100644 --- a/stripe/v2/billing/_custom_pricing_unit_service.py +++ b/stripe/v2/billing/_custom_pricing_unit_service.py @@ -5,67 +5,28 @@ from stripe._util import sanitize_id from stripe.v2._list_object import ListObject from stripe.v2.billing._custom_pricing_unit import CustomPricingUnit -from typing import Dict, List, Optional, cast -from typing_extensions import NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params.v2.billing._custom_pricing_unit_create_params import ( + CustomPricingUnitCreateParams, + ) + from stripe.params.v2.billing._custom_pricing_unit_list_params import ( + CustomPricingUnitListParams, + ) + from stripe.params.v2.billing._custom_pricing_unit_retrieve_params import ( + CustomPricingUnitRetrieveParams, + ) + from stripe.params.v2.billing._custom_pricing_unit_update_params import ( + CustomPricingUnitUpdateParams, + ) -class CustomPricingUnitService(StripeService): - class CreateParams(TypedDict): - display_name: str - """ - Description that customers will see in the invoice line item. - Maximum length of 10 characters. - """ - lookup_key: NotRequired[str] - """ - An internal key you can use to search for a particular custom pricing unit item. - Must be unique among items. - Maximum length of 200 characters. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://docs.stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. - """ - - class ListParams(TypedDict): - active: NotRequired[bool] - """ - Filter for active/inactive custom pricing units. Mutually exclusive with `lookup_keys`. - """ - limit: NotRequired[int] - """ - Optionally set the maximum number of results per page. Defaults to 20. - """ - lookup_keys: NotRequired[List[str]] - """ - Filter by lookup keys. Mutually exclusive with `active`. - You can specify up to 10 lookup keys. - """ - - class RetrieveParams(TypedDict): - pass - - class UpdateParams(TypedDict): - active: NotRequired[bool] - """ - Whether the Custom Pricing Unit is active. - """ - display_name: NotRequired[str] - """ - Description that customers will see in the invoice line item. - """ - lookup_key: NotRequired[str] - """ - An internal key you can use to search for a particular CustomPricingUnit item. - """ - metadata: NotRequired[Dict[str, Optional[str]]] - """ - Set of key-value pairs that you can attach to an object. - """ +class CustomPricingUnitService(StripeService): def list( self, - params: Optional["CustomPricingUnitService.ListParams"] = None, + params: Optional["CustomPricingUnitListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[CustomPricingUnit]: """ @@ -84,7 +45,7 @@ def list( async def list_async( self, - params: Optional["CustomPricingUnitService.ListParams"] = None, + params: Optional["CustomPricingUnitListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[CustomPricingUnit]: """ @@ -103,7 +64,7 @@ async def list_async( def create( self, - params: "CustomPricingUnitService.CreateParams", + params: "CustomPricingUnitCreateParams", options: Optional[RequestOptions] = None, ) -> CustomPricingUnit: """ @@ -122,7 +83,7 @@ def create( async def create_async( self, - params: "CustomPricingUnitService.CreateParams", + params: "CustomPricingUnitCreateParams", options: Optional[RequestOptions] = None, ) -> CustomPricingUnit: """ @@ -142,7 +103,7 @@ async def create_async( def retrieve( self, id: str, - params: Optional["CustomPricingUnitService.RetrieveParams"] = None, + params: Optional["CustomPricingUnitRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> CustomPricingUnit: """ @@ -164,7 +125,7 @@ def retrieve( async def retrieve_async( self, id: str, - params: Optional["CustomPricingUnitService.RetrieveParams"] = None, + params: Optional["CustomPricingUnitRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> CustomPricingUnit: """ @@ -186,7 +147,7 @@ async def retrieve_async( def update( self, id: str, - params: Optional["CustomPricingUnitService.UpdateParams"] = None, + params: Optional["CustomPricingUnitUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> CustomPricingUnit: """ @@ -208,7 +169,7 @@ def update( async def update_async( self, id: str, - params: Optional["CustomPricingUnitService.UpdateParams"] = None, + params: Optional["CustomPricingUnitUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> CustomPricingUnit: """ diff --git a/stripe/v2/billing/_intent_service.py b/stripe/v2/billing/_intent_service.py index f031c22d9..e7e14dd32 100644 --- a/stripe/v2/billing/_intent_service.py +++ b/stripe/v2/billing/_intent_service.py @@ -6,8 +6,29 @@ from stripe.v2._list_object import ListObject from stripe.v2.billing._intent import Intent from stripe.v2.billing.intents._action_service import ActionService -from typing import Dict, List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params.v2.billing._intent_cancel_params import ( + IntentCancelParams, + ) + from stripe.params.v2.billing._intent_commit_params import ( + IntentCommitParams, + ) + from stripe.params.v2.billing._intent_create_params import ( + IntentCreateParams, + ) + from stripe.params.v2.billing._intent_list_params import IntentListParams + from stripe.params.v2.billing._intent_release_reservation_params import ( + IntentReleaseReservationParams, + ) + from stripe.params.v2.billing._intent_reserve_params import ( + IntentReserveParams, + ) + from stripe.params.v2.billing._intent_retrieve_params import ( + IntentRetrieveParams, + ) class IntentService(StripeService): @@ -15,387 +36,9 @@ def __init__(self, requestor): super().__init__(requestor) self.actions = ActionService(self._requestor) - class CancelParams(TypedDict): - pass - - class CommitParams(TypedDict): - payment_intent: NotRequired[str] - """ - ID of the PaymentIntent associated with this commit. - """ - - class CreateParams(TypedDict): - actions: List["IntentService.CreateParamsAction"] - """ - Actions to be performed by this Billing Intent. - """ - currency: str - """ - Three-letter ISO currency code, in lowercase. Must be a supported currency. - """ - cadence: NotRequired[str] - """ - ID of an existing Cadence to use. - """ - - class CreateParamsAction(TypedDict): - type: Literal["apply", "deactivate", "modify", "remove", "subscribe"] - """ - Type of the Billing Intent action. - """ - apply: NotRequired["IntentService.CreateParamsActionApply"] - """ - Details for an apply action. - """ - deactivate: NotRequired["IntentService.CreateParamsActionDeactivate"] - """ - Details for a deactivate action. - """ - modify: NotRequired["IntentService.CreateParamsActionModify"] - """ - Details for a modify action. - """ - remove: NotRequired["IntentService.CreateParamsActionRemove"] - """ - Details for a remove action. - """ - subscribe: NotRequired["IntentService.CreateParamsActionSubscribe"] - """ - Details for a subscribe action. - """ - - class CreateParamsActionApply(TypedDict): - type: Literal["invoice_discount_rule"] - """ - Type of the apply action details. - """ - invoice_discount_rule: NotRequired[ - "IntentService.CreateParamsActionApplyInvoiceDiscountRule" - ] - """ - Details for applying a discount rule to future invoices. - """ - - class CreateParamsActionApplyInvoiceDiscountRule(TypedDict): - applies_to: Literal["cadence"] - """ - The entity that the discount rule applies to, for example, the cadence. - """ - type: Literal["percent_off"] - """ - Type of the discount rule. - """ - percent_off: NotRequired[ - "IntentService.CreateParamsActionApplyInvoiceDiscountRulePercentOff" - ] - """ - Configuration for percentage off discount. - """ - - class CreateParamsActionApplyInvoiceDiscountRulePercentOff(TypedDict): - maximum_applications: "IntentService.CreateParamsActionApplyInvoiceDiscountRulePercentOffMaximumApplications" - """ - The maximum number of times this discount can be applied for this cadence. - """ - percent_off: str - """ - Percent that will be taken off of the amount. For example, percent_off of 50.0 will make $100 amount $50 instead. - """ - - class CreateParamsActionApplyInvoiceDiscountRulePercentOffMaximumApplications( - TypedDict, - ): - type: Literal["indefinite"] - """ - The type of maximum applications configuration. - """ - - class CreateParamsActionDeactivate(TypedDict): - billing_details: NotRequired[ - "IntentService.CreateParamsActionDeactivateBillingDetails" - ] - """ - Configuration for the billing details. - """ - effective_at: NotRequired[ - "IntentService.CreateParamsActionDeactivateEffectiveAt" - ] - """ - When the deactivate action will take effect. If not specified, the default behavior is on_reserve. - """ - pricing_plan_subscription_details: "IntentService.CreateParamsActionDeactivatePricingPlanSubscriptionDetails" - """ - Details for deactivating a pricing plan subscription. - """ - type: Literal[ - "pricing_plan_subscription_details", "v1_subscription_details" - ] - """ - Type of the action details. - """ - - class CreateParamsActionDeactivateBillingDetails(TypedDict): - proration_behavior: NotRequired[ - Literal["no_adjustment", "prorated_adjustment"] - ] - """ - This controls the proration adjustment for the partial servicing period. - """ - - class CreateParamsActionDeactivateEffectiveAt(TypedDict): - timestamp: NotRequired[str] - """ - The timestamp at which the deactivate action will take effect. Only present if type is timestamp. - """ - type: Literal[ - "current_billing_period_end", - "current_billing_period_start", - "on_reserve", - "timestamp", - ] - """ - When the deactivate action will take effect. - """ - - class CreateParamsActionDeactivatePricingPlanSubscriptionDetails( - TypedDict - ): - pricing_plan_subscription: str - """ - ID of the pricing plan subscription to deactivate. - """ - - class CreateParamsActionModify(TypedDict): - billing_details: NotRequired[ - "IntentService.CreateParamsActionModifyBillingDetails" - ] - """ - Configuration for the billing details. - """ - effective_at: NotRequired[ - "IntentService.CreateParamsActionModifyEffectiveAt" - ] - """ - When the modify action will take effect. If not specified, the default behavior is on_reserve. - """ - pricing_plan_subscription_details: "IntentService.CreateParamsActionModifyPricingPlanSubscriptionDetails" - """ - Details for modifying a pricing plan subscription. - """ - type: Literal[ - "pricing_plan_subscription_details", "v1_subscription_details" - ] - """ - Type of the action details. - """ - - class CreateParamsActionModifyBillingDetails(TypedDict): - proration_behavior: NotRequired[ - Literal["no_adjustment", "prorated_adjustment"] - ] - """ - This controls the proration adjustment for the partial servicing period. - """ - - class CreateParamsActionModifyEffectiveAt(TypedDict): - timestamp: NotRequired[str] - """ - The timestamp at which the modify action will take effect. Only present if type is timestamp. - """ - type: Literal[ - "current_billing_period_start", "on_reserve", "timestamp" - ] - """ - When the modify action will take effect. - """ - - class CreateParamsActionModifyPricingPlanSubscriptionDetails(TypedDict): - component_configurations: NotRequired[ - List[ - "IntentService.CreateParamsActionModifyPricingPlanSubscriptionDetailsComponentConfiguration" - ] - ] - """ - New configurations for the components of the pricing plan. - """ - new_pricing_plan: NotRequired[str] - """ - The ID of the new Pricing Plan, if changing plans. - """ - new_pricing_plan_version: NotRequired[str] - """ - The ID of the new Pricing Plan Version to use. - """ - pricing_plan_subscription: str - """ - The ID of the Pricing Plan Subscription to modify. - """ - - class CreateParamsActionModifyPricingPlanSubscriptionDetailsComponentConfiguration( - TypedDict, - ): - quantity: NotRequired[int] - """ - Quantity of the component to be used. - """ - lookup_key: NotRequired[str] - """ - Lookup key for the pricing plan component. - """ - pricing_plan_component: NotRequired[str] - """ - ID of the pricing plan component. - """ - - class CreateParamsActionRemove(TypedDict): - type: Literal["invoice_discount_rule"] - """ - Type of the remove action. - """ - invoice_discount_rule: NotRequired[str] - """ - The ID of the discount rule to remove for future invoices. - """ - - class CreateParamsActionSubscribe(TypedDict): - billing_details: NotRequired[ - "IntentService.CreateParamsActionSubscribeBillingDetails" - ] - """ - Configuration for the billing details. If not specified, see the default behavior for individual attributes. - """ - effective_at: NotRequired[ - "IntentService.CreateParamsActionSubscribeEffectiveAt" - ] - """ - When the subscribe action will take effect. If not specified, the default behavior is on_reserve. - """ - type: Literal[ - "pricing_plan_subscription_details", "v1_subscription_details" - ] - """ - Type of the action details. - """ - pricing_plan_subscription_details: NotRequired[ - "IntentService.CreateParamsActionSubscribePricingPlanSubscriptionDetails" - ] - """ - Details for subscribing to a pricing plan. - """ - v1_subscription_details: NotRequired[ - "IntentService.CreateParamsActionSubscribeV1SubscriptionDetails" - ] - """ - Details for subscribing to a v1 subscription. - """ - - class CreateParamsActionSubscribeBillingDetails(TypedDict): - proration_behavior: NotRequired[ - Literal["no_adjustment", "prorated_adjustment"] - ] - """ - This controls the proration adjustment for the partial servicing period. - """ - - class CreateParamsActionSubscribeEffectiveAt(TypedDict): - timestamp: NotRequired[str] - """ - The timestamp at which the subscribe action will take effect. Only present if type is timestamp. - """ - type: Literal[ - "current_billing_period_start", "on_reserve", "timestamp" - ] - """ - When the subscribe action will take effect. - """ - - class CreateParamsActionSubscribePricingPlanSubscriptionDetails(TypedDict): - component_configurations: NotRequired[ - List[ - "IntentService.CreateParamsActionSubscribePricingPlanSubscriptionDetailsComponentConfiguration" - ] - ] - """ - Configurations for the components of the pricing plan. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://docs.stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. - """ - pricing_plan: str - """ - ID of the Pricing Plan to subscribe to. - """ - pricing_plan_version: str - """ - Version of the Pricing Plan to use. - """ - - class CreateParamsActionSubscribePricingPlanSubscriptionDetailsComponentConfiguration( - TypedDict, - ): - quantity: NotRequired[int] - """ - Quantity of the component to be used. - """ - lookup_key: NotRequired[str] - """ - Lookup key for the pricing plan component. - """ - pricing_plan_component: NotRequired[str] - """ - ID of the pricing plan component. - """ - - class CreateParamsActionSubscribeV1SubscriptionDetails(TypedDict): - description: NotRequired[str] - """ - The subscription's description, meant to be displayable to the customer. - Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. - """ - items: List[ - "IntentService.CreateParamsActionSubscribeV1SubscriptionDetailsItem" - ] - """ - A list of up to 20 subscription items, each with an attached price. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. - """ - - class CreateParamsActionSubscribeV1SubscriptionDetailsItem(TypedDict): - metadata: NotRequired[Dict[str, str]] - """ - Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. - """ - price: str - """ - The ID of the price object. - """ - quantity: NotRequired[int] - """ - Quantity for this item. If not provided, will default to 1. - """ - - class ListParams(TypedDict): - limit: NotRequired[int] - """ - Optionally set the maximum number of results per page. Defaults to 10. - """ - - class ReleaseReservationParams(TypedDict): - pass - - class ReserveParams(TypedDict): - pass - - class RetrieveParams(TypedDict): - pass - def list( self, - params: Optional["IntentService.ListParams"] = None, + params: Optional["IntentListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[Intent]: """ @@ -414,7 +57,7 @@ def list( async def list_async( self, - params: Optional["IntentService.ListParams"] = None, + params: Optional["IntentListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[Intent]: """ @@ -433,7 +76,7 @@ async def list_async( def create( self, - params: "IntentService.CreateParams", + params: "IntentCreateParams", options: Optional[RequestOptions] = None, ) -> Intent: """ @@ -452,7 +95,7 @@ def create( async def create_async( self, - params: "IntentService.CreateParams", + params: "IntentCreateParams", options: Optional[RequestOptions] = None, ) -> Intent: """ @@ -472,7 +115,7 @@ async def create_async( def retrieve( self, id: str, - params: Optional["IntentService.RetrieveParams"] = None, + params: Optional["IntentRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Intent: """ @@ -492,7 +135,7 @@ def retrieve( async def retrieve_async( self, id: str, - params: Optional["IntentService.RetrieveParams"] = None, + params: Optional["IntentRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Intent: """ @@ -512,7 +155,7 @@ async def retrieve_async( def cancel( self, id: str, - params: Optional["IntentService.CancelParams"] = None, + params: Optional["IntentCancelParams"] = None, options: Optional[RequestOptions] = None, ) -> Intent: """ @@ -532,7 +175,7 @@ def cancel( async def cancel_async( self, id: str, - params: Optional["IntentService.CancelParams"] = None, + params: Optional["IntentCancelParams"] = None, options: Optional[RequestOptions] = None, ) -> Intent: """ @@ -552,7 +195,7 @@ async def cancel_async( def commit( self, id: str, - params: Optional["IntentService.CommitParams"] = None, + params: Optional["IntentCommitParams"] = None, options: Optional[RequestOptions] = None, ) -> Intent: """ @@ -572,7 +215,7 @@ def commit( async def commit_async( self, id: str, - params: Optional["IntentService.CommitParams"] = None, + params: Optional["IntentCommitParams"] = None, options: Optional[RequestOptions] = None, ) -> Intent: """ @@ -592,7 +235,7 @@ async def commit_async( def release_reservation( self, id: str, - params: Optional["IntentService.ReleaseReservationParams"] = None, + params: Optional["IntentReleaseReservationParams"] = None, options: Optional[RequestOptions] = None, ) -> Intent: """ @@ -614,7 +257,7 @@ def release_reservation( async def release_reservation_async( self, id: str, - params: Optional["IntentService.ReleaseReservationParams"] = None, + params: Optional["IntentReleaseReservationParams"] = None, options: Optional[RequestOptions] = None, ) -> Intent: """ @@ -636,7 +279,7 @@ async def release_reservation_async( def reserve( self, id: str, - params: Optional["IntentService.ReserveParams"] = None, + params: Optional["IntentReserveParams"] = None, options: Optional[RequestOptions] = None, ) -> Intent: """ @@ -656,7 +299,7 @@ def reserve( async def reserve_async( self, id: str, - params: Optional["IntentService.ReserveParams"] = None, + params: Optional["IntentReserveParams"] = None, options: Optional[RequestOptions] = None, ) -> Intent: """ diff --git a/stripe/v2/billing/_license_fee_service.py b/stripe/v2/billing/_license_fee_service.py index bffc4b6d2..0c50a01bc 100644 --- a/stripe/v2/billing/_license_fee_service.py +++ b/stripe/v2/billing/_license_fee_service.py @@ -6,8 +6,22 @@ from stripe.v2._list_object import ListObject from stripe.v2.billing._license_fee import LicenseFee from stripe.v2.billing.license_fees._version_service import VersionService -from typing import Dict, List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params.v2.billing._license_fee_create_params import ( + LicenseFeeCreateParams, + ) + from stripe.params.v2.billing._license_fee_list_params import ( + LicenseFeeListParams, + ) + from stripe.params.v2.billing._license_fee_retrieve_params import ( + LicenseFeeRetrieveParams, + ) + from stripe.params.v2.billing._license_fee_update_params import ( + LicenseFeeUpdateParams, + ) class LicenseFeeService(StripeService): @@ -15,190 +29,9 @@ def __init__(self, requestor): super().__init__(requestor) self.versions = VersionService(self._requestor) - class CreateParams(TypedDict): - currency: str - """ - Three-letter ISO currency code, in lowercase. Must be a supported currency. - """ - display_name: str - """ - A customer-facing name for the License Fee. - This name is used in Stripe-hosted products like the Customer Portal and Checkout. It does not show up on Invoices. - Maximum length of 250 characters. - """ - licensed_item: str - """ - The Licensed Item that this License Fee binds to. - """ - lookup_key: NotRequired[str] - """ - An internal key you can use to search for a particular license fee. Maximum length of 200 characters. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://docs.stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. - """ - service_interval: Literal["day", "month", "week", "year"] - """ - The interval for assessing service. For example, a monthly license fee with a rate of $1 for the first 10 "workloads" - and $2 thereafter means "$1 per workload up to 10 workloads during a month of service." This is similar to but - distinct from billing interval; the service interval deals with the rate at which the customer accumulates fees, - while the billing interval in Cadence deals with the rate the customer is billed. - """ - service_interval_count: int - """ - The length of the interval for assessing service. For example, set this to 3 and `service_interval` to `"month"` in - order to specify quarterly service. - """ - tax_behavior: Literal["exclusive", "inclusive"] - """ - The Stripe Tax tax behavior - whether the license fee is inclusive or exclusive of tax. - """ - tiering_mode: NotRequired[Literal["graduated", "volume"]] - """ - Defines whether the tiered price should be graduated or volume-based. In volume-based tiering, the maximum - quantity within a period determines the per-unit price. In graduated tiering, the pricing changes as the quantity - grows into new tiers. Can only be set if `tiers` is set. - """ - tiers: NotRequired[List["LicenseFeeService.CreateParamsTier"]] - """ - Each element represents a pricing tier. Cannot be set if `unit_amount` is provided. - """ - transform_quantity: NotRequired[ - "LicenseFeeService.CreateParamsTransformQuantity" - ] - """ - Apply a transformation to the reported usage or set quantity before computing the amount billed. - """ - unit_amount: NotRequired[str] - """ - The per-unit amount to be charged, represented as a decimal string in minor currency units with at most 12 decimal - places. Cannot be set if `tiers` is provided. - """ - - class CreateParamsTier(TypedDict): - flat_amount: NotRequired[str] - """ - Price for the entire tier, represented as a decimal string in minor currency units with at most 12 decimal places. - """ - unit_amount: NotRequired[str] - """ - Per-unit price for units included in this tier, represented as a decimal string in minor currency units with at - most 12 decimal places. - """ - up_to_decimal: NotRequired[str] - """ - Up to and including this quantity will be contained in the tier. Only one of `up_to_decimal` and `up_to_inf` may - be set. - """ - up_to_inf: NotRequired[Literal["inf"]] - """ - No upper bound to this tier. Only one of `up_to_decimal` and `up_to_inf` may be set. - """ - - class CreateParamsTransformQuantity(TypedDict): - divide_by: int - """ - Divide usage by this number. - """ - round: Literal["down", "up"] - """ - After division, round the result up or down. - """ - - class ListParams(TypedDict): - licensed_item: NotRequired[str] - """ - Filter by licensed item. - """ - limit: NotRequired[int] - """ - Optionally set the maximum number of results per page. Defaults to 20. - """ - lookup_keys: List[str] - """ - Filter by lookup keys. - You can specify up to 10 lookup keys. - """ - - class RetrieveParams(TypedDict): - pass - - class UpdateParams(TypedDict): - display_name: NotRequired[str] - """ - A customer-facing name for the License Fee. - This name is used in Stripe-hosted products like the Customer Portal and Checkout. It does not show up on Invoices. - Maximum length of 250 characters. - """ - live_version: NotRequired[str] - """ - Changes the version that new license fee will use. Providing `live_version = "latest"` will set the - license fee's `live_version` to its latest version. - """ - lookup_key: NotRequired[str] - """ - An internal key you can use to search for a particular license fee. Maximum length of 200 characters. - """ - metadata: NotRequired[Dict[str, Optional[str]]] - """ - Set of [key-value pairs](https://docs.stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. - """ - tiering_mode: NotRequired[Literal["graduated", "volume"]] - """ - Defines whether the tiered price should be graduated or volume-based. In volume-based tiering, the maximum - quantity within a period determines the per-unit price. In graduated tiering, the pricing changes as the quantity - grows into new tiers. Can only be set if `tiers` is set. - """ - tiers: NotRequired[List["LicenseFeeService.UpdateParamsTier"]] - """ - Each element represents a pricing tier. Cannot be set if `unit_amount` is provided. - """ - transform_quantity: NotRequired[ - "LicenseFeeService.UpdateParamsTransformQuantity" - ] - """ - Apply a transformation to the reported usage or set quantity before computing the amount billed. - """ - unit_amount: NotRequired[str] - """ - The per-unit amount to be charged, represented as a decimal string in minor currency units with at most 12 decimal - places. Cannot be set if `tiers` is provided. - """ - - class UpdateParamsTier(TypedDict): - flat_amount: NotRequired[str] - """ - Price for the entire tier, represented as a decimal string in minor currency units with at most 12 decimal places. - """ - unit_amount: NotRequired[str] - """ - Per-unit price for units included in this tier, represented as a decimal string in minor currency units with at - most 12 decimal places. - """ - up_to_decimal: NotRequired[str] - """ - Up to and including this quantity will be contained in the tier. Only one of `up_to_decimal` and `up_to_inf` may - be set. - """ - up_to_inf: NotRequired[Literal["inf"]] - """ - No upper bound to this tier. Only one of `up_to_decimal` and `up_to_inf` may be set. - """ - - class UpdateParamsTransformQuantity(TypedDict): - divide_by: int - """ - Divide usage by this number. - """ - round: Literal["down", "up"] - """ - After division, round the result up or down. - """ - def list( self, - params: "LicenseFeeService.ListParams", + params: "LicenseFeeListParams", options: Optional[RequestOptions] = None, ) -> ListObject[LicenseFee]: """ @@ -217,7 +50,7 @@ def list( async def list_async( self, - params: "LicenseFeeService.ListParams", + params: "LicenseFeeListParams", options: Optional[RequestOptions] = None, ) -> ListObject[LicenseFee]: """ @@ -236,7 +69,7 @@ async def list_async( def create( self, - params: "LicenseFeeService.CreateParams", + params: "LicenseFeeCreateParams", options: Optional[RequestOptions] = None, ) -> LicenseFee: """ @@ -255,7 +88,7 @@ def create( async def create_async( self, - params: "LicenseFeeService.CreateParams", + params: "LicenseFeeCreateParams", options: Optional[RequestOptions] = None, ) -> LicenseFee: """ @@ -275,7 +108,7 @@ async def create_async( def retrieve( self, id: str, - params: Optional["LicenseFeeService.RetrieveParams"] = None, + params: Optional["LicenseFeeRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> LicenseFee: """ @@ -295,7 +128,7 @@ def retrieve( async def retrieve_async( self, id: str, - params: Optional["LicenseFeeService.RetrieveParams"] = None, + params: Optional["LicenseFeeRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> LicenseFee: """ @@ -315,7 +148,7 @@ async def retrieve_async( def update( self, id: str, - params: Optional["LicenseFeeService.UpdateParams"] = None, + params: Optional["LicenseFeeUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> LicenseFee: """ @@ -335,7 +168,7 @@ def update( async def update_async( self, id: str, - params: Optional["LicenseFeeService.UpdateParams"] = None, + params: Optional["LicenseFeeUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> LicenseFee: """ diff --git a/stripe/v2/billing/_license_fee_subscription_service.py b/stripe/v2/billing/_license_fee_subscription_service.py index a81f0ab22..86321b3d3 100644 --- a/stripe/v2/billing/_license_fee_subscription_service.py +++ b/stripe/v2/billing/_license_fee_subscription_service.py @@ -5,19 +5,19 @@ from stripe._util import sanitize_id from stripe.v2.billing._license_fee_subscription import LicenseFeeSubscription from typing import Optional, cast -from typing_extensions import TypedDict +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params.v2.billing._license_fee_subscription_retrieve_params import ( + LicenseFeeSubscriptionRetrieveParams, + ) -class LicenseFeeSubscriptionService(StripeService): - class RetrieveParams(TypedDict): - pass +class LicenseFeeSubscriptionService(StripeService): def retrieve( self, id: str, - params: Optional[ - "LicenseFeeSubscriptionService.RetrieveParams" - ] = None, + params: Optional["LicenseFeeSubscriptionRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> LicenseFeeSubscription: """ @@ -39,9 +39,7 @@ def retrieve( async def retrieve_async( self, id: str, - params: Optional[ - "LicenseFeeSubscriptionService.RetrieveParams" - ] = None, + params: Optional["LicenseFeeSubscriptionRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> LicenseFeeSubscription: """ diff --git a/stripe/v2/billing/_licensed_item_service.py b/stripe/v2/billing/_licensed_item_service.py index 1b3e81080..7fa17d934 100644 --- a/stripe/v2/billing/_licensed_item_service.py +++ b/stripe/v2/billing/_licensed_item_service.py @@ -5,94 +5,28 @@ from stripe._util import sanitize_id from stripe.v2._list_object import ListObject from stripe.v2.billing._licensed_item import LicensedItem -from typing import Dict, List, Optional, cast -from typing_extensions import NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params.v2.billing._licensed_item_create_params import ( + LicensedItemCreateParams, + ) + from stripe.params.v2.billing._licensed_item_list_params import ( + LicensedItemListParams, + ) + from stripe.params.v2.billing._licensed_item_retrieve_params import ( + LicensedItemRetrieveParams, + ) + from stripe.params.v2.billing._licensed_item_update_params import ( + LicensedItemUpdateParams, + ) -class LicensedItemService(StripeService): - class CreateParams(TypedDict): - display_name: str - """ - Description that customers will see in the invoice line item. - Maximum length of 250 characters. - """ - lookup_key: NotRequired[str] - """ - An internal key you can use to search for a particular billable item. - Must be unique among billable items. - Maximum length of 200 characters. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://docs.stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. - """ - tax_details: NotRequired["LicensedItemService.CreateParamsTaxDetails"] - """ - Stripe Tax details. - """ - unit_label: NotRequired[str] - """ - The unit to use when displaying prices for this billable item in places like Checkout. For example, set this field - to "seat" for Checkout to display "(price) per seat", or "environment" to display "(price) per environment". - Maximum length of 100 characters. - """ - - class CreateParamsTaxDetails(TypedDict): - tax_code: str - """ - Product tax code (PTC). - """ - - class ListParams(TypedDict): - limit: NotRequired[int] - """ - Optionally set the maximum number of results per page. Defaults to 20. - """ - lookup_keys: NotRequired[List[str]] - """ - Filter by lookup keys. - You can specify up to 10 lookup keys. - """ - - class RetrieveParams(TypedDict): - pass - - class UpdateParams(TypedDict): - display_name: NotRequired[str] - """ - Description that customers will see in the invoice line item. - Maximum length of 250 characters. - """ - lookup_key: NotRequired[str] - """ - An internal key you can use to search for a particular billable item. - Maximum length of 200 characters. - To remove the lookup_key from the object, set it to null in the request. - """ - metadata: NotRequired[Dict[str, Optional[str]]] - """ - Set of [key-value pairs](https://docs.stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. - """ - tax_details: NotRequired["LicensedItemService.UpdateParamsTaxDetails"] - """ - Stripe Tax details. - """ - unit_label: NotRequired[str] - """ - The unit to use when displaying prices for this billable item in places like Checkout. For example, set this field - to "seat" for Checkout to display "(price) per seat", or "environment" to display "(price) per environment". - Maximum length of 100 characters. - """ - - class UpdateParamsTaxDetails(TypedDict): - tax_code: str - """ - Product tax code (PTC). - """ +class LicensedItemService(StripeService): def list( self, - params: Optional["LicensedItemService.ListParams"] = None, + params: Optional["LicensedItemListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[LicensedItem]: """ @@ -111,7 +45,7 @@ def list( async def list_async( self, - params: Optional["LicensedItemService.ListParams"] = None, + params: Optional["LicensedItemListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[LicensedItem]: """ @@ -130,7 +64,7 @@ async def list_async( def create( self, - params: "LicensedItemService.CreateParams", + params: "LicensedItemCreateParams", options: Optional[RequestOptions] = None, ) -> LicensedItem: """ @@ -149,7 +83,7 @@ def create( async def create_async( self, - params: "LicensedItemService.CreateParams", + params: "LicensedItemCreateParams", options: Optional[RequestOptions] = None, ) -> LicensedItem: """ @@ -169,7 +103,7 @@ async def create_async( def retrieve( self, id: str, - params: Optional["LicensedItemService.RetrieveParams"] = None, + params: Optional["LicensedItemRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> LicensedItem: """ @@ -189,7 +123,7 @@ def retrieve( async def retrieve_async( self, id: str, - params: Optional["LicensedItemService.RetrieveParams"] = None, + params: Optional["LicensedItemRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> LicensedItem: """ @@ -209,7 +143,7 @@ async def retrieve_async( def update( self, id: str, - params: Optional["LicensedItemService.UpdateParams"] = None, + params: Optional["LicensedItemUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> LicensedItem: """ @@ -229,7 +163,7 @@ def update( async def update_async( self, id: str, - params: Optional["LicensedItemService.UpdateParams"] = None, + params: Optional["LicensedItemUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> LicensedItem: """ diff --git a/stripe/v2/billing/_meter_event_adjustment_service.py b/stripe/v2/billing/_meter_event_adjustment_service.py index 80ca24a3b..6394ad3ea 100644 --- a/stripe/v2/billing/_meter_event_adjustment_service.py +++ b/stripe/v2/billing/_meter_event_adjustment_service.py @@ -4,33 +4,18 @@ from stripe._stripe_service import StripeService from stripe.v2.billing._meter_event_adjustment import MeterEventAdjustment from typing import Optional, cast -from typing_extensions import Literal, TypedDict +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params.v2.billing._meter_event_adjustment_create_params import ( + MeterEventAdjustmentCreateParams, + ) -class MeterEventAdjustmentService(StripeService): - class CreateParams(TypedDict): - cancel: "MeterEventAdjustmentService.CreateParamsCancel" - """ - Specifies which event to cancel. - """ - event_name: str - """ - The name of the meter event. Corresponds with the `event_name` field on a meter. - """ - type: Literal["cancel"] - """ - Specifies whether to cancel a single event or a range of events for a time period. Time period cancellation is not supported yet. - """ - - class CreateParamsCancel(TypedDict): - identifier: str - """ - Unique identifier for the event. You can only cancel events within 24 hours of Stripe receiving them. - """ +class MeterEventAdjustmentService(StripeService): def create( self, - params: "MeterEventAdjustmentService.CreateParams", + params: "MeterEventAdjustmentCreateParams", options: Optional[RequestOptions] = None, ) -> MeterEventAdjustment: """ @@ -49,7 +34,7 @@ def create( async def create_async( self, - params: "MeterEventAdjustmentService.CreateParams", + params: "MeterEventAdjustmentCreateParams", options: Optional[RequestOptions] = None, ) -> MeterEventAdjustment: """ diff --git a/stripe/v2/billing/_meter_event_service.py b/stripe/v2/billing/_meter_event_service.py index 4b16e4e8d..e40bd4a75 100644 --- a/stripe/v2/billing/_meter_event_service.py +++ b/stripe/v2/billing/_meter_event_service.py @@ -3,39 +3,19 @@ from stripe._request_options import RequestOptions from stripe._stripe_service import StripeService from stripe.v2.billing._meter_event import MeterEvent -from typing import Dict, Optional, cast -from typing_extensions import NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params.v2.billing._meter_event_create_params import ( + MeterEventCreateParams, + ) -class MeterEventService(StripeService): - class CreateParams(TypedDict): - event_name: str - """ - The name of the meter event. Corresponds with the `event_name` field on a meter. - """ - identifier: NotRequired[str] - """ - A unique identifier for the event. If not provided, one will be generated. - We recommend using a globally unique identifier for this. We'll enforce - uniqueness within a rolling 24 hour period. - """ - payload: Dict[str, str] - """ - The payload of the event. This must contain the fields corresponding to a meter's - `customer_mapping.event_payload_key` (default is `stripe_customer_id`) and - `value_settings.event_payload_key` (default is `value`). Read more about - the - [payload](https://docs.stripe.com/billing/subscriptions/usage-based/recording-usage#payload-key-overrides). - """ - timestamp: NotRequired[str] - """ - The time of the event. Must be within the past 35 calendar days or up to - 5 minutes in the future. Defaults to current timestamp if not specified. - """ +class MeterEventService(StripeService): def create( self, - params: "MeterEventService.CreateParams", + params: "MeterEventCreateParams", options: Optional[RequestOptions] = None, ) -> MeterEvent: """ @@ -54,7 +34,7 @@ def create( async def create_async( self, - params: "MeterEventService.CreateParams", + params: "MeterEventCreateParams", options: Optional[RequestOptions] = None, ) -> MeterEvent: """ diff --git a/stripe/v2/billing/_meter_event_session_service.py b/stripe/v2/billing/_meter_event_session_service.py index 714de980a..1b1686fd3 100644 --- a/stripe/v2/billing/_meter_event_session_service.py +++ b/stripe/v2/billing/_meter_event_session_service.py @@ -4,16 +4,18 @@ from stripe._stripe_service import StripeService from stripe.v2.billing._meter_event_session import MeterEventSession from typing import Optional, cast -from typing_extensions import TypedDict +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params.v2.billing._meter_event_session_create_params import ( + MeterEventSessionCreateParams, + ) -class MeterEventSessionService(StripeService): - class CreateParams(TypedDict): - pass +class MeterEventSessionService(StripeService): def create( self, - params: Optional["MeterEventSessionService.CreateParams"] = None, + params: Optional["MeterEventSessionCreateParams"] = None, options: Optional[RequestOptions] = None, ) -> MeterEventSession: """ @@ -32,7 +34,7 @@ def create( async def create_async( self, - params: Optional["MeterEventSessionService.CreateParams"] = None, + params: Optional["MeterEventSessionCreateParams"] = None, options: Optional[RequestOptions] = None, ) -> MeterEventSession: """ diff --git a/stripe/v2/billing/_meter_event_stream_service.py b/stripe/v2/billing/_meter_event_stream_service.py index b38e7b01c..7d86d126e 100644 --- a/stripe/v2/billing/_meter_event_stream_service.py +++ b/stripe/v2/billing/_meter_event_stream_service.py @@ -2,45 +2,19 @@ # File generated from our OpenAPI spec from stripe._request_options import RequestOptions from stripe._stripe_service import StripeService -from typing import Dict, List, Optional -from typing_extensions import NotRequired, TypedDict +from typing import Optional +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params.v2.billing._meter_event_stream_create_params import ( + MeterEventStreamCreateParams, + ) -class MeterEventStreamService(StripeService): - class CreateParams(TypedDict): - events: List["MeterEventStreamService.CreateParamsEvent"] - """ - List of meter events to include in the request. Supports up to 100 events per request. - """ - - class CreateParamsEvent(TypedDict): - event_name: str - """ - The name of the meter event. Corresponds with the `event_name` field on a meter. - """ - identifier: NotRequired[str] - """ - A unique identifier for the event. If not provided, one will be generated. - We recommend using a globally unique identifier for this. We'll enforce - uniqueness within a rolling 24 hour period. - """ - payload: Dict[str, str] - """ - The payload of the event. This must contain the fields corresponding to a meter's - `customer_mapping.event_payload_key` (default is `stripe_customer_id`) and - `value_settings.event_payload_key` (default is `value`). Read more about - the - [payload](https://docs.stripe.com/billing/subscriptions/usage-based/recording-usage#payload-key-overrides). - """ - timestamp: NotRequired[str] - """ - The time of the event. Must be within the past 35 calendar days or up to - 5 minutes in the future. Defaults to current timestamp if not specified. - """ +class MeterEventStreamService(StripeService): def create( self, - params: "MeterEventStreamService.CreateParams", + params: "MeterEventStreamCreateParams", options: Optional[RequestOptions] = None, ) -> None: """ @@ -56,7 +30,7 @@ def create( async def create_async( self, - params: "MeterEventStreamService.CreateParams", + params: "MeterEventStreamCreateParams", options: Optional[RequestOptions] = None, ) -> None: """ diff --git a/stripe/v2/billing/_metered_item_service.py b/stripe/v2/billing/_metered_item_service.py index 0d91a3e79..05b8adb62 100644 --- a/stripe/v2/billing/_metered_item_service.py +++ b/stripe/v2/billing/_metered_item_service.py @@ -5,121 +5,28 @@ from stripe._util import sanitize_id from stripe.v2._list_object import ListObject from stripe.v2.billing._metered_item import MeteredItem -from typing import Dict, List, Optional, cast -from typing_extensions import NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params.v2.billing._metered_item_create_params import ( + MeteredItemCreateParams, + ) + from stripe.params.v2.billing._metered_item_list_params import ( + MeteredItemListParams, + ) + from stripe.params.v2.billing._metered_item_retrieve_params import ( + MeteredItemRetrieveParams, + ) + from stripe.params.v2.billing._metered_item_update_params import ( + MeteredItemUpdateParams, + ) class MeteredItemService(StripeService): - class CreateParams(TypedDict): - display_name: str - """ - Description that customers will see in the invoice line item. - Maximum length of 250 characters. - """ - invoice_presentation_dimensions: NotRequired[List[str]] - """ - Optional array of Meter dimensions to group event dimension keys for invoice line items. - """ - lookup_key: NotRequired[str] - """ - An internal key you can use to search for a particular billable item. - Must be unique among billable items. - Maximum length of 200 characters. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://docs.stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. - """ - meter: str - """ - ID of the Meter that measures usage for this Metered Item. - """ - meter_segment_conditions: NotRequired[ - List["MeteredItemService.CreateParamsMeterSegmentCondition"] - ] - """ - Optional array of Meter segments to filter event dimension keys for billing. - """ - tax_details: NotRequired["MeteredItemService.CreateParamsTaxDetails"] - """ - Stripe Tax details. - """ - unit_label: NotRequired[str] - """ - The unit to use when displaying prices for this billable item in places like Checkout. For example, set this field - to "CPU-hour" for Checkout to display "(price) per CPU-hour", or "1 million events" to display "(price) per 1 - million events". - Maximum length of 100 characters. - """ - - class CreateParamsMeterSegmentCondition(TypedDict): - dimension: str - """ - A Meter dimension. - """ - value: str - """ - To count usage towards this metered item, the dimension must have this value. - """ - - class CreateParamsTaxDetails(TypedDict): - tax_code: str - """ - Product tax code (PTC). - """ - - class ListParams(TypedDict): - limit: NotRequired[int] - """ - Optionally set the maximum number of results per page. Defaults to 20. - """ - lookup_keys: NotRequired[List[str]] - """ - Filter by lookup keys. - You can specify up to 10 lookup keys. - """ - - class RetrieveParams(TypedDict): - pass - - class UpdateParams(TypedDict): - display_name: NotRequired[str] - """ - Description that customers will see in the invoice line item. - Maximum length of 250 characters. - """ - lookup_key: NotRequired[str] - """ - An internal key you can use to search for a particular billable item. - Maximum length of 200 characters. - To remove the lookup_key from the object, set it to null in the request. - """ - metadata: NotRequired[Dict[str, Optional[str]]] - """ - Set of [key-value pairs](https://docs.stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. - """ - tax_details: NotRequired["MeteredItemService.UpdateParamsTaxDetails"] - """ - Stripe Tax details. - """ - unit_label: NotRequired[str] - """ - The unit to use when displaying prices for this billable item in places like Checkout. For example, set this field - to "CPU-hour" for Checkout to display "(price) per CPU-hour", or "1 million events" to display "(price) per 1 - million events". - Maximum length of 100 characters. - To remove the unit_label from the object, set it to null in the request. - """ - - class UpdateParamsTaxDetails(TypedDict): - tax_code: str - """ - Product tax code (PTC). - """ - def list( self, - params: Optional["MeteredItemService.ListParams"] = None, + params: Optional["MeteredItemListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[MeteredItem]: """ @@ -138,7 +45,7 @@ def list( async def list_async( self, - params: Optional["MeteredItemService.ListParams"] = None, + params: Optional["MeteredItemListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[MeteredItem]: """ @@ -157,7 +64,7 @@ async def list_async( def create( self, - params: "MeteredItemService.CreateParams", + params: "MeteredItemCreateParams", options: Optional[RequestOptions] = None, ) -> MeteredItem: """ @@ -176,7 +83,7 @@ def create( async def create_async( self, - params: "MeteredItemService.CreateParams", + params: "MeteredItemCreateParams", options: Optional[RequestOptions] = None, ) -> MeteredItem: """ @@ -196,7 +103,7 @@ async def create_async( def retrieve( self, id: str, - params: Optional["MeteredItemService.RetrieveParams"] = None, + params: Optional["MeteredItemRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> MeteredItem: """ @@ -216,7 +123,7 @@ def retrieve( async def retrieve_async( self, id: str, - params: Optional["MeteredItemService.RetrieveParams"] = None, + params: Optional["MeteredItemRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> MeteredItem: """ @@ -236,7 +143,7 @@ async def retrieve_async( def update( self, id: str, - params: Optional["MeteredItemService.UpdateParams"] = None, + params: Optional["MeteredItemUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> MeteredItem: """ @@ -256,7 +163,7 @@ def update( async def update_async( self, id: str, - params: Optional["MeteredItemService.UpdateParams"] = None, + params: Optional["MeteredItemUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> MeteredItem: """ diff --git a/stripe/v2/billing/_pricing_plan_service.py b/stripe/v2/billing/_pricing_plan_service.py index e2b82ef74..9a592bdfa 100644 --- a/stripe/v2/billing/_pricing_plan_service.py +++ b/stripe/v2/billing/_pricing_plan_service.py @@ -7,8 +7,22 @@ from stripe.v2.billing._pricing_plan import PricingPlan from stripe.v2.billing.pricing_plans._component_service import ComponentService from stripe.v2.billing.pricing_plans._version_service import VersionService -from typing import Dict, List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params.v2.billing._pricing_plan_create_params import ( + PricingPlanCreateParams, + ) + from stripe.params.v2.billing._pricing_plan_list_params import ( + PricingPlanListParams, + ) + from stripe.params.v2.billing._pricing_plan_retrieve_params import ( + PricingPlanRetrieveParams, + ) + from stripe.params.v2.billing._pricing_plan_update_params import ( + PricingPlanUpdateParams, + ) class PricingPlanService(StripeService): @@ -17,79 +31,9 @@ def __init__(self, requestor): self.components = ComponentService(self._requestor) self.versions = VersionService(self._requestor) - class CreateParams(TypedDict): - currency: str - """ - The currency of the PricingPlan. - """ - description: NotRequired[str] - """ - Description of pricing plan subscription. - """ - display_name: str - """ - Display name of the PricingPlan. Maximum 250 characters. - """ - lookup_key: NotRequired[str] - """ - An internal key you can use to search for a particular PricingPlan. Maximum length of 200 characters. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://docs.stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. - """ - tax_behavior: Literal["exclusive", "inclusive"] - """ - The Stripe Tax tax behavior - whether the PricingPlan is inclusive or exclusive of tax. - """ - - class ListParams(TypedDict): - active: NotRequired[bool] - """ - Filter for active/inactive PricingPlans. Mutually exclusive with `lookup_keys`. - """ - limit: NotRequired[int] - """ - Optionally set the maximum number of results per page. Defaults to 20. - """ - lookup_keys: NotRequired[List[str]] - """ - Filter by lookup keys. Mutually exclusive with `active`. - You can specify up to 10 lookup keys. - """ - - class RetrieveParams(TypedDict): - pass - - class UpdateParams(TypedDict): - active: NotRequired[bool] - """ - Whether the PricingPlan is active. - """ - description: NotRequired[str] - """ - Description of pricing plan subscription. - """ - display_name: NotRequired[str] - """ - Display name of the PricingPlan. Maximum 250 characters. - """ - live_version: NotRequired[str] - """ - The ID of the live version of the PricingPlan. - """ - lookup_key: NotRequired[str] - """ - An internal key you can use to search for a particular PricingPlan. Maximum length of 200 characters. - """ - metadata: NotRequired[Dict[str, Optional[str]]] - """ - Set of key-value pairs that you can attach to an object. - """ - def list( self, - params: Optional["PricingPlanService.ListParams"] = None, + params: Optional["PricingPlanListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[PricingPlan]: """ @@ -108,7 +52,7 @@ def list( async def list_async( self, - params: Optional["PricingPlanService.ListParams"] = None, + params: Optional["PricingPlanListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[PricingPlan]: """ @@ -127,7 +71,7 @@ async def list_async( def create( self, - params: "PricingPlanService.CreateParams", + params: "PricingPlanCreateParams", options: Optional[RequestOptions] = None, ) -> PricingPlan: """ @@ -146,7 +90,7 @@ def create( async def create_async( self, - params: "PricingPlanService.CreateParams", + params: "PricingPlanCreateParams", options: Optional[RequestOptions] = None, ) -> PricingPlan: """ @@ -166,7 +110,7 @@ async def create_async( def retrieve( self, id: str, - params: Optional["PricingPlanService.RetrieveParams"] = None, + params: Optional["PricingPlanRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> PricingPlan: """ @@ -186,7 +130,7 @@ def retrieve( async def retrieve_async( self, id: str, - params: Optional["PricingPlanService.RetrieveParams"] = None, + params: Optional["PricingPlanRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> PricingPlan: """ @@ -206,7 +150,7 @@ async def retrieve_async( def update( self, id: str, - params: Optional["PricingPlanService.UpdateParams"] = None, + params: Optional["PricingPlanUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> PricingPlan: """ @@ -226,7 +170,7 @@ def update( async def update_async( self, id: str, - params: Optional["PricingPlanService.UpdateParams"] = None, + params: Optional["PricingPlanUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> PricingPlan: """ diff --git a/stripe/v2/billing/_pricing_plan_subscription_service.py b/stripe/v2/billing/_pricing_plan_subscription_service.py index 4b5d7a8e6..f39281b34 100644 --- a/stripe/v2/billing/_pricing_plan_subscription_service.py +++ b/stripe/v2/billing/_pricing_plan_subscription_service.py @@ -7,65 +7,25 @@ from stripe.v2.billing._pricing_plan_subscription import ( PricingPlanSubscription, ) -from typing import Dict, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params.v2.billing._pricing_plan_subscription_list_params import ( + PricingPlanSubscriptionListParams, + ) + from stripe.params.v2.billing._pricing_plan_subscription_retrieve_params import ( + PricingPlanSubscriptionRetrieveParams, + ) + from stripe.params.v2.billing._pricing_plan_subscription_update_params import ( + PricingPlanSubscriptionUpdateParams, + ) -class PricingPlanSubscriptionService(StripeService): - class ListParams(TypedDict): - billing_cadence: NotRequired[str] - """ - Filter by Billing Cadence ID. Mutually exclusive with `payer`, `pricing_plan`, and `pricing_plan_version`. - """ - limit: NotRequired[int] - """ - Optionally set the maximum number of results per page. Defaults to 20. - """ - payer: NotRequired["PricingPlanSubscriptionService.ListParamsPayer"] - """ - Filter by payer. Mutually exclusive with `billing_cadence`, `pricing_plan`, and `pricing_plan_version`. - """ - pricing_plan: NotRequired[str] - """ - Filter by PricingPlan ID. Mutually exlcusive with `billing_cadence`, `payer`, and `pricing_plan_version`. - """ - pricing_plan_version: NotRequired[str] - """ - Filter by Pricing Plan Version ID. Mutually exlcusive with `billing_cadence`, `payer`, and `pricing_plan`. - """ - servicing_status: NotRequired[ - Literal["active", "canceled", "paused", "pending"] - ] - """ - Filter by servicing status. - """ - - class ListParamsPayer(TypedDict): - customer: NotRequired[str] - """ - The ID of the Customer object. If provided, only Pricing Plan Subscriptions that are subscribed on the cadences with the specified payer will be returned. - """ - type: Literal["customer"] - """ - A string identifying the type of the payer. Currently the only supported value is `customer`. - """ - - class RetrieveParams(TypedDict): - pass - - class UpdateParams(TypedDict): - clear_cancel_at: NotRequired[bool] - """ - When set to true, the `servicing_status_transition.will_cancel_at` field will be cleared. - """ - metadata: NotRequired[Dict[str, Optional[str]]] - """ - Set of [key-value pairs](https://docs.stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. - """ +class PricingPlanSubscriptionService(StripeService): def list( self, - params: Optional["PricingPlanSubscriptionService.ListParams"] = None, + params: Optional["PricingPlanSubscriptionListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[PricingPlanSubscription]: """ @@ -84,7 +44,7 @@ def list( async def list_async( self, - params: Optional["PricingPlanSubscriptionService.ListParams"] = None, + params: Optional["PricingPlanSubscriptionListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[PricingPlanSubscription]: """ @@ -104,9 +64,7 @@ async def list_async( def retrieve( self, id: str, - params: Optional[ - "PricingPlanSubscriptionService.RetrieveParams" - ] = None, + params: Optional["PricingPlanSubscriptionRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> PricingPlanSubscription: """ @@ -128,9 +86,7 @@ def retrieve( async def retrieve_async( self, id: str, - params: Optional[ - "PricingPlanSubscriptionService.RetrieveParams" - ] = None, + params: Optional["PricingPlanSubscriptionRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> PricingPlanSubscription: """ @@ -152,7 +108,7 @@ async def retrieve_async( def update( self, id: str, - params: Optional["PricingPlanSubscriptionService.UpdateParams"] = None, + params: Optional["PricingPlanSubscriptionUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> PricingPlanSubscription: """ @@ -174,7 +130,7 @@ def update( async def update_async( self, id: str, - params: Optional["PricingPlanSubscriptionService.UpdateParams"] = None, + params: Optional["PricingPlanSubscriptionUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> PricingPlanSubscription: """ diff --git a/stripe/v2/billing/_profile_service.py b/stripe/v2/billing/_profile_service.py index 18c531d57..82a6afe40 100644 --- a/stripe/v2/billing/_profile_service.py +++ b/stripe/v2/billing/_profile_service.py @@ -5,90 +5,26 @@ from stripe._util import sanitize_id from stripe.v2._list_object import ListObject from stripe.v2.billing._profile import Profile -from typing import Dict, List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params.v2.billing._profile_create_params import ( + ProfileCreateParams, + ) + from stripe.params.v2.billing._profile_list_params import ProfileListParams + from stripe.params.v2.billing._profile_retrieve_params import ( + ProfileRetrieveParams, + ) + from stripe.params.v2.billing._profile_update_params import ( + ProfileUpdateParams, + ) -class ProfileService(StripeService): - class CreateParams(TypedDict): - customer: str - """ - The ID of the customer object. - """ - default_payment_method: NotRequired[str] - """ - The ID of the payment method object. - """ - display_name: NotRequired[str] - """ - A customer-facing name for the billing profile. - Maximum length of 250 characters. - """ - lookup_key: NotRequired[str] - """ - An internal key you can use to search for a particular billing profile. It must be unique among billing profiles for a given customer. - Maximum length of 200 characters. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. - """ - - class ListParams(TypedDict): - customer: NotRequired[str] - """ - Filter billing profiles by a customer. Mutually exclusive - with `lookup_keys` and `default_payment_method`. - """ - default_payment_method: NotRequired[str] - """ - Filter billing profiles by a default payment method. Mutually exclusive - with `customer` and `lookup_keys`. - """ - limit: NotRequired[int] - """ - Optionally set the maximum number of results per page. Defaults to 10. - """ - lookup_keys: List[str] - """ - Filter billing profiles by lookup keys. Mutually exclusive - with `customer` and `default_payment_method`. - You can specify up to 10 lookup_keys. - """ - status: NotRequired[Literal["active", "inactive"]] - """ - Filter billing profiles by status. Can be combined - with all other filters. If not provided, all billing profiles will be returned. - """ - - class RetrieveParams(TypedDict): - pass - - class UpdateParams(TypedDict): - default_payment_method: NotRequired[str] - """ - The ID of the payment method object. - """ - display_name: NotRequired[str] - """ - A customer-facing name for the billing profile. - Maximum length of 250 characters. - To remove the display_name from the object, set it to null in the request. - """ - lookup_key: NotRequired[str] - """ - An internal key you can use to search for a particular billing profile. It must be unique among billing profiles for a given customer. - Maximum length of 200 characters. - To remove the lookup_key from the object, set it to null in the request. - """ - metadata: NotRequired[Dict[str, Optional[str]]] - """ - Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. - """ +class ProfileService(StripeService): def list( self, - params: "ProfileService.ListParams", + params: "ProfileListParams", options: Optional[RequestOptions] = None, ) -> ListObject[Profile]: """ @@ -107,7 +43,7 @@ def list( async def list_async( self, - params: "ProfileService.ListParams", + params: "ProfileListParams", options: Optional[RequestOptions] = None, ) -> ListObject[Profile]: """ @@ -126,7 +62,7 @@ async def list_async( def create( self, - params: "ProfileService.CreateParams", + params: "ProfileCreateParams", options: Optional[RequestOptions] = None, ) -> Profile: """ @@ -145,7 +81,7 @@ def create( async def create_async( self, - params: "ProfileService.CreateParams", + params: "ProfileCreateParams", options: Optional[RequestOptions] = None, ) -> Profile: """ @@ -165,7 +101,7 @@ async def create_async( def retrieve( self, id: str, - params: Optional["ProfileService.RetrieveParams"] = None, + params: Optional["ProfileRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Profile: """ @@ -185,7 +121,7 @@ def retrieve( async def retrieve_async( self, id: str, - params: Optional["ProfileService.RetrieveParams"] = None, + params: Optional["ProfileRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Profile: """ @@ -205,7 +141,7 @@ async def retrieve_async( def update( self, id: str, - params: Optional["ProfileService.UpdateParams"] = None, + params: Optional["ProfileUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> Profile: """ @@ -225,7 +161,7 @@ def update( async def update_async( self, id: str, - params: Optional["ProfileService.UpdateParams"] = None, + params: Optional["ProfileUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> Profile: """ diff --git a/stripe/v2/billing/_rate_card_service.py b/stripe/v2/billing/_rate_card_service.py index a9e29db93..8b364a664 100644 --- a/stripe/v2/billing/_rate_card_service.py +++ b/stripe/v2/billing/_rate_card_service.py @@ -7,8 +7,22 @@ from stripe.v2.billing._rate_card import RateCard from stripe.v2.billing.rate_cards._rate_service import RateService from stripe.v2.billing.rate_cards._version_service import VersionService -from typing import Dict, List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params.v2.billing._rate_card_create_params import ( + RateCardCreateParams, + ) + from stripe.params.v2.billing._rate_card_list_params import ( + RateCardListParams, + ) + from stripe.params.v2.billing._rate_card_retrieve_params import ( + RateCardRetrieveParams, + ) + from stripe.params.v2.billing._rate_card_update_params import ( + RateCardUpdateParams, + ) class RateCardService(StripeService): @@ -17,88 +31,9 @@ def __init__(self, requestor): self.rates = RateService(self._requestor) self.versions = VersionService(self._requestor) - class CreateParams(TypedDict): - currency: str - """ - The currency of this RateCard. - """ - display_name: str - """ - A customer-facing name for the RateCard. - This name is used in Stripe-hosted products like the Customer Portal and Checkout. It does not show up on Invoices. - Maximum length of 250 characters. - """ - lookup_key: NotRequired[str] - """ - An internal key you can use to search for a particular RateCard. Maximum length of 200 characters. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://docs.stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. - """ - service_interval: Literal["day", "month", "week", "year"] - """ - The interval for assessing service. For example, a monthly RateCard with a rate of $1 for the first 10 "workloads" - and $2 thereafter means "$1 per workload up to 10 workloads during a month of service." This is similar to but - distinct from billing interval; the service interval deals with the rate at which the customer accumulates fees, - while the billing interval in Cadence deals with the rate the customer is billed. - """ - service_interval_count: int - """ - The length of the interval for assessing service. For example, set this to 3 and `service_interval` to `"month"` in - order to specify quarterly service. - """ - tax_behavior: Literal["exclusive", "inclusive"] - """ - The Stripe Tax tax behavior - whether the rates are inclusive or exclusive of tax. - """ - - class ListParams(TypedDict): - active: NotRequired[bool] - """ - Optionally filter to active/inactive RateCards. - """ - limit: NotRequired[int] - """ - Optionally set the maximum number of results per page. Defaults to 20. - """ - lookup_keys: NotRequired[List[str]] - """ - Filter by lookup keys. - You can specify up to 10 lookup keys. - """ - - class RetrieveParams(TypedDict): - pass - - class UpdateParams(TypedDict): - active: NotRequired[bool] - """ - Sets whether the RateCard is active. Inactive RateCards cannot be used in new activations or have new rates added. - """ - display_name: NotRequired[str] - """ - A customer-facing name for the RateCard. - This name is used in Stripe-hosted products like the Customer Portal and Checkout. It does not show up on Invoices. - Maximum length of 250 characters. - """ - live_version: NotRequired[str] - """ - Changes the version that new RateCard activations will use. Providing `live_version = "latest"` will set the - RateCard's `live_version` to its latest version. - """ - lookup_key: NotRequired[str] - """ - An internal key you can use to search for a particular RateCard. Maximum length of 200 characters. - """ - metadata: NotRequired[Dict[str, Optional[str]]] - """ - Set of [key-value pairs](https://docs.stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. - """ - def list( self, - params: Optional["RateCardService.ListParams"] = None, + params: Optional["RateCardListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[RateCard]: """ @@ -117,7 +52,7 @@ def list( async def list_async( self, - params: Optional["RateCardService.ListParams"] = None, + params: Optional["RateCardListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[RateCard]: """ @@ -136,7 +71,7 @@ async def list_async( def create( self, - params: "RateCardService.CreateParams", + params: "RateCardCreateParams", options: Optional[RequestOptions] = None, ) -> RateCard: """ @@ -155,7 +90,7 @@ def create( async def create_async( self, - params: "RateCardService.CreateParams", + params: "RateCardCreateParams", options: Optional[RequestOptions] = None, ) -> RateCard: """ @@ -175,7 +110,7 @@ async def create_async( def retrieve( self, id: str, - params: Optional["RateCardService.RetrieveParams"] = None, + params: Optional["RateCardRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> RateCard: """ @@ -195,7 +130,7 @@ def retrieve( async def retrieve_async( self, id: str, - params: Optional["RateCardService.RetrieveParams"] = None, + params: Optional["RateCardRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> RateCard: """ @@ -215,7 +150,7 @@ async def retrieve_async( def update( self, id: str, - params: Optional["RateCardService.UpdateParams"] = None, + params: Optional["RateCardUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> RateCard: """ @@ -235,7 +170,7 @@ def update( async def update_async( self, id: str, - params: Optional["RateCardService.UpdateParams"] = None, + params: Optional["RateCardUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> RateCard: """ diff --git a/stripe/v2/billing/_rate_card_subscription_service.py b/stripe/v2/billing/_rate_card_subscription_service.py index 0322357e6..bc7572b61 100644 --- a/stripe/v2/billing/_rate_card_subscription_service.py +++ b/stripe/v2/billing/_rate_card_subscription_service.py @@ -5,83 +5,31 @@ from stripe._util import sanitize_id from stripe.v2._list_object import ListObject from stripe.v2.billing._rate_card_subscription import RateCardSubscription -from typing import Dict, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params.v2.billing._rate_card_subscription_cancel_params import ( + RateCardSubscriptionCancelParams, + ) + from stripe.params.v2.billing._rate_card_subscription_create_params import ( + RateCardSubscriptionCreateParams, + ) + from stripe.params.v2.billing._rate_card_subscription_list_params import ( + RateCardSubscriptionListParams, + ) + from stripe.params.v2.billing._rate_card_subscription_retrieve_params import ( + RateCardSubscriptionRetrieveParams, + ) + from stripe.params.v2.billing._rate_card_subscription_update_params import ( + RateCardSubscriptionUpdateParams, + ) class RateCardSubscriptionService(StripeService): - class CancelParams(TypedDict): - pass - - class CreateParams(TypedDict): - billing_cadence: str - """ - The ID of the Billing Cadence. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://docs.stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. - """ - rate_card: str - """ - The ID of the Rate Card. - """ - rate_card_version: NotRequired[str] - """ - The ID of the Rate Card Version. If not specified, defaults to the "live_version" of the Rate Card at the time of creation. - """ - - class ListParams(TypedDict): - billing_cadence: NotRequired[str] - """ - Optionally filter by a BillingCadence. Mutually exclusive with `payers`, `rate_card`, and `rate_card_version`. - """ - limit: NotRequired[int] - """ - The page size limit, if not provided the default is 20. - """ - payer: NotRequired["RateCardSubscriptionService.ListParamsPayer"] - """ - Optionally filter by the payer associated with Billing Cadences which the Rate Card Subscriptions are subscribed to. - Mutually exclusive with `billing_cadence`, `rate_card`, and `rate_card_version`. - """ - rate_card: NotRequired[str] - """ - Optionally filter by a RateCard. Mutually exclusive with `billing_cadence`, `payers`, and `rate_card_version`. - """ - rate_card_version: NotRequired[str] - """ - Optionally filter by a RateCard version. Mutually exclusive with `billing_cadence`, `payers`, and `rate_card`. - """ - servicing_status: NotRequired[ - Literal["active", "canceled", "paused", "pending"] - ] - """ - Optionally filter by servicing status. - """ - - class ListParamsPayer(TypedDict): - customer: NotRequired[str] - """ - The ID of the Customer object. If provided, only the Rate Card Subscriptions that are subscribed on the Billing Cadences with the specified payer will be returned. - """ - type: Literal["customer"] - """ - A string identifying the type of the payer. Currently the only supported value is `customer`. - """ - - class RetrieveParams(TypedDict): - pass - - class UpdateParams(TypedDict): - metadata: NotRequired[Dict[str, Optional[str]]] - """ - Set of [key-value pairs](https://docs.stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. - """ - def list( self, - params: Optional["RateCardSubscriptionService.ListParams"] = None, + params: Optional["RateCardSubscriptionListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[RateCardSubscription]: """ @@ -100,7 +48,7 @@ def list( async def list_async( self, - params: Optional["RateCardSubscriptionService.ListParams"] = None, + params: Optional["RateCardSubscriptionListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[RateCardSubscription]: """ @@ -119,7 +67,7 @@ async def list_async( def create( self, - params: "RateCardSubscriptionService.CreateParams", + params: "RateCardSubscriptionCreateParams", options: Optional[RequestOptions] = None, ) -> RateCardSubscription: """ @@ -138,7 +86,7 @@ def create( async def create_async( self, - params: "RateCardSubscriptionService.CreateParams", + params: "RateCardSubscriptionCreateParams", options: Optional[RequestOptions] = None, ) -> RateCardSubscription: """ @@ -158,7 +106,7 @@ async def create_async( def retrieve( self, id: str, - params: Optional["RateCardSubscriptionService.RetrieveParams"] = None, + params: Optional["RateCardSubscriptionRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> RateCardSubscription: """ @@ -180,7 +128,7 @@ def retrieve( async def retrieve_async( self, id: str, - params: Optional["RateCardSubscriptionService.RetrieveParams"] = None, + params: Optional["RateCardSubscriptionRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> RateCardSubscription: """ @@ -202,7 +150,7 @@ async def retrieve_async( def update( self, id: str, - params: Optional["RateCardSubscriptionService.UpdateParams"] = None, + params: Optional["RateCardSubscriptionUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> RateCardSubscription: """ @@ -224,7 +172,7 @@ def update( async def update_async( self, id: str, - params: Optional["RateCardSubscriptionService.UpdateParams"] = None, + params: Optional["RateCardSubscriptionUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> RateCardSubscription: """ @@ -246,7 +194,7 @@ async def update_async( def cancel( self, id: str, - params: Optional["RateCardSubscriptionService.CancelParams"] = None, + params: Optional["RateCardSubscriptionCancelParams"] = None, options: Optional[RequestOptions] = None, ) -> RateCardSubscription: """ @@ -268,7 +216,7 @@ def cancel( async def cancel_async( self, id: str, - params: Optional["RateCardSubscriptionService.CancelParams"] = None, + params: Optional["RateCardSubscriptionCancelParams"] = None, options: Optional[RequestOptions] = None, ) -> RateCardSubscription: """ diff --git a/stripe/v2/billing/_service_action_service.py b/stripe/v2/billing/_service_action_service.py index 484558700..e8fcd720e 100644 --- a/stripe/v2/billing/_service_action_service.py +++ b/stripe/v2/billing/_service_action_service.py @@ -3,285 +3,26 @@ from stripe._request_options import RequestOptions from stripe._stripe_service import StripeService from stripe._util import sanitize_id -from stripe.v2._amount import AmountParam from stripe.v2.billing._service_action import ServiceAction -from typing import List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params.v2.billing._service_action_create_params import ( + ServiceActionCreateParams, + ) + from stripe.params.v2.billing._service_action_retrieve_params import ( + ServiceActionRetrieveParams, + ) + from stripe.params.v2.billing._service_action_update_params import ( + ServiceActionUpdateParams, + ) -class ServiceActionService(StripeService): - class CreateParams(TypedDict): - lookup_key: NotRequired[str] - """ - An internal key you can use to search for this service action. Maximum length of 200 characters. - """ - service_interval: Literal["day", "month", "week", "year"] - """ - The interval for assessing service. - """ - service_interval_count: int - """ - The length of the interval for assessing service. - """ - type: Literal["credit_grant", "credit_grant_per_tenant"] - """ - The type of the service action. - """ - credit_grant: NotRequired[ - "ServiceActionService.CreateParamsCreditGrant" - ] - """ - Details for the credit grant. Required if `type` is `credit_grant`. - """ - credit_grant_per_tenant: NotRequired[ - "ServiceActionService.CreateParamsCreditGrantPerTenant" - ] - """ - Details for the credit grant per tenant. Required if `type` is `credit_grant_per_tenant`. - """ - - class CreateParamsCreditGrant(TypedDict): - amount: "ServiceActionService.CreateParamsCreditGrantAmount" - """ - The amount of the credit grant. - """ - applicability_config: ( - "ServiceActionService.CreateParamsCreditGrantApplicabilityConfig" - ) - """ - Defines the scope where the credit grant is applicable. - """ - category: NotRequired[Literal["paid", "promotional"]] - """ - The category of the credit grant. - """ - expiry_config: ( - "ServiceActionService.CreateParamsCreditGrantExpiryConfig" - ) - """ - The expiry configuration for the credit grant. - """ - name: str - """ - A descriptive name shown in dashboard. - """ - priority: NotRequired[int] - """ - The desired priority for applying this credit grant. If not specified, it will be set to the default value of 50. The highest priority is 0 and the lowest is 100. - """ - - class CreateParamsCreditGrantAmount(TypedDict): - type: Literal["custom_pricing_unit", "monetary"] - """ - The type of the credit grant amount. We currently support `monetary` and `custom_pricing_unit` billing credits. - """ - custom_pricing_unit: NotRequired[ - "ServiceActionService.CreateParamsCreditGrantAmountCustomPricingUnit" - ] - """ - The custom pricing unit amount of the credit grant. Required if `type` is `custom_pricing_unit`. - """ - monetary: NotRequired[AmountParam] - """ - The monetary amount of the credit grant. Required if `type` is `monetary`. - """ - - class CreateParamsCreditGrantAmountCustomPricingUnit(TypedDict): - id: str - """ - The id of the custom pricing unit. - """ - value: str - """ - The value of the credit grant, decimal value represented as a string. - """ - - class CreateParamsCreditGrantApplicabilityConfig(TypedDict): - scope: "ServiceActionService.CreateParamsCreditGrantApplicabilityConfigScope" - """ - The applicability scope of the credit grant. - """ - - class CreateParamsCreditGrantApplicabilityConfigScope(TypedDict): - billable_items: NotRequired[List[str]] - """ - The billable items to apply the credit grant to. - """ - price_type: NotRequired[Literal["metered"]] - """ - The price type that credit grants can apply to. We currently only support the `metered` price type. This will apply to metered prices and rate cards. Cannot be used in combination with `billable_items`. - """ - - class CreateParamsCreditGrantExpiryConfig(TypedDict): - type: Literal["end_of_service_period"] - """ - The type of the expiry configuration. We currently support `end_of_service_period`. - """ - - class CreateParamsCreditGrantPerTenant(TypedDict): - amount: "ServiceActionService.CreateParamsCreditGrantPerTenantAmount" - """ - The amount of the credit grant. - """ - applicability_config: "ServiceActionService.CreateParamsCreditGrantPerTenantApplicabilityConfig" - """ - Defines the scope where the credit grant is applicable. - """ - category: NotRequired[Literal["paid", "promotional"]] - """ - The category of the credit grant. - """ - expiry_config: ( - "ServiceActionService.CreateParamsCreditGrantPerTenantExpiryConfig" - ) - """ - The expiry configuration for the credit grant. - """ - grant_condition: "ServiceActionService.CreateParamsCreditGrantPerTenantGrantCondition" - """ - The grant condition for the credit grant. - """ - name: str - """ - Customer-facing name for the credit grant. - """ - priority: NotRequired[int] - """ - The desired priority for applying this credit grant. If not specified, it will be set to the default value of 50. The highest priority is 0 and the lowest is 100. - """ - - class CreateParamsCreditGrantPerTenantAmount(TypedDict): - type: Literal["custom_pricing_unit", "monetary"] - """ - The type of the credit grant amount. We currently support `monetary` and `custom_pricing_unit` billing credits. - """ - custom_pricing_unit: NotRequired[ - "ServiceActionService.CreateParamsCreditGrantPerTenantAmountCustomPricingUnit" - ] - """ - The custom pricing unit amount of the credit grant. Required if `type` is `custom_pricing_unit`. - """ - monetary: NotRequired[AmountParam] - """ - The monetary amount of the credit grant. Required if `type` is `monetary`. - """ - - class CreateParamsCreditGrantPerTenantAmountCustomPricingUnit(TypedDict): - id: str - """ - The id of the custom pricing unit. - """ - value: str - """ - The value of the credit grant, decimal value represented as a string. - """ - - class CreateParamsCreditGrantPerTenantApplicabilityConfig(TypedDict): - scope: "ServiceActionService.CreateParamsCreditGrantPerTenantApplicabilityConfigScope" - """ - The applicability scope of the credit grant. - """ - - class CreateParamsCreditGrantPerTenantApplicabilityConfigScope(TypedDict): - billable_items: NotRequired[List[str]] - """ - The billable items to apply the credit grant to. - """ - price_type: NotRequired[Literal["metered"]] - """ - The price type that credit grants can apply to. We currently only support the `metered` price type. This will apply to metered prices and rate cards. Cannot be used in combination with `billable_items`. - """ - - class CreateParamsCreditGrantPerTenantExpiryConfig(TypedDict): - type: Literal["end_of_service_period"] - """ - The type of the expiry configuration. We currently support `end_of_service_period`. - """ - - class CreateParamsCreditGrantPerTenantGrantCondition(TypedDict): - type: Literal["meter_event_first_per_period"] - """ - The type of the grant condition. We currently support `meter_event_first_per_period`. - """ - meter_event_first_per_period: NotRequired[ - "ServiceActionService.CreateParamsCreditGrantPerTenantGrantConditionMeterEventFirstPerPeriod" - ] - """ - The grant condition for the meter event first per period. - """ - - class CreateParamsCreditGrantPerTenantGrantConditionMeterEventFirstPerPeriod( - TypedDict, - ): - meter_segment_conditions: List[ - "ServiceActionService.CreateParamsCreditGrantPerTenantGrantConditionMeterEventFirstPerPeriodMeterSegmentCondition" - ] - """ - The meter segment conditions for the grant condition. - """ - - class CreateParamsCreditGrantPerTenantGrantConditionMeterEventFirstPerPeriodMeterSegmentCondition( - TypedDict, - ): - type: Literal["dimension"] - """ - The type of the meter segment condition. We currently support `dimension`. - """ - dimension: NotRequired[ - "ServiceActionService.CreateParamsCreditGrantPerTenantGrantConditionMeterEventFirstPerPeriodMeterSegmentConditionDimension" - ] - """ - Dimension-based meter segment condition. - """ - - class CreateParamsCreditGrantPerTenantGrantConditionMeterEventFirstPerPeriodMeterSegmentConditionDimension( - TypedDict, - ): - payload_key: str - """ - The payload key for the dimension. - """ - value: str - """ - The value for the dimension. - """ - - class RetrieveParams(TypedDict): - pass - - class UpdateParams(TypedDict): - lookup_key: NotRequired[str] - """ - An internal key you can use to search for this service action. Maximum length of 200 characters. - """ - credit_grant: NotRequired[ - "ServiceActionService.UpdateParamsCreditGrant" - ] - """ - Details for the credit grant. Can only be set if the service action's `type` is `credit_grant`. - """ - credit_grant_per_tenant: NotRequired[ - "ServiceActionService.UpdateParamsCreditGrantPerTenant" - ] - """ - Details for the credit grant per tenant. Can only be set if the service action's `type` is `credit_grant_per_tenant`. - """ - - class UpdateParamsCreditGrant(TypedDict): - name: NotRequired[str] - """ - A descriptive name shown in dashboard. - """ - - class UpdateParamsCreditGrantPerTenant(TypedDict): - name: NotRequired[str] - """ - A descriptive name shown in dashboard. - """ +class ServiceActionService(StripeService): def create( self, - params: "ServiceActionService.CreateParams", + params: "ServiceActionCreateParams", options: Optional[RequestOptions] = None, ) -> ServiceAction: """ @@ -300,7 +41,7 @@ def create( async def create_async( self, - params: "ServiceActionService.CreateParams", + params: "ServiceActionCreateParams", options: Optional[RequestOptions] = None, ) -> ServiceAction: """ @@ -320,7 +61,7 @@ async def create_async( def retrieve( self, id: str, - params: Optional["ServiceActionService.RetrieveParams"] = None, + params: Optional["ServiceActionRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> ServiceAction: """ @@ -340,7 +81,7 @@ def retrieve( async def retrieve_async( self, id: str, - params: Optional["ServiceActionService.RetrieveParams"] = None, + params: Optional["ServiceActionRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> ServiceAction: """ @@ -360,7 +101,7 @@ async def retrieve_async( def update( self, id: str, - params: Optional["ServiceActionService.UpdateParams"] = None, + params: Optional["ServiceActionUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> ServiceAction: """ @@ -380,7 +121,7 @@ def update( async def update_async( self, id: str, - params: Optional["ServiceActionService.UpdateParams"] = None, + params: Optional["ServiceActionUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> ServiceAction: """ diff --git a/stripe/v2/billing/bill_settings/_version_service.py b/stripe/v2/billing/bill_settings/_version_service.py index 4b82b11d1..e78ee0497 100644 --- a/stripe/v2/billing/bill_settings/_version_service.py +++ b/stripe/v2/billing/bill_settings/_version_service.py @@ -6,23 +6,22 @@ from stripe.v2._list_object import ListObject from stripe.v2.billing._bill_setting_version import BillSettingVersion from typing import Optional, cast -from typing_extensions import NotRequired, TypedDict +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params.v2.billing.bill_settings._version_list_params import ( + VersionListParams, + ) + from stripe.params.v2.billing.bill_settings._version_retrieve_params import ( + VersionRetrieveParams, + ) -class VersionService(StripeService): - class ListParams(TypedDict): - limit: NotRequired[int] - """ - Optionally set the maximum number of results per page. Defaults to 20. - """ - - class RetrieveParams(TypedDict): - pass +class VersionService(StripeService): def list( self, bill_setting_id: str, - params: Optional["VersionService.ListParams"] = None, + params: Optional["VersionListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[BillSettingVersion]: """ @@ -44,7 +43,7 @@ def list( async def list_async( self, bill_setting_id: str, - params: Optional["VersionService.ListParams"] = None, + params: Optional["VersionListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[BillSettingVersion]: """ @@ -67,7 +66,7 @@ def retrieve( self, bill_setting_id: str, id: str, - params: Optional["VersionService.RetrieveParams"] = None, + params: Optional["VersionRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> BillSettingVersion: """ @@ -91,7 +90,7 @@ async def retrieve_async( self, bill_setting_id: str, id: str, - params: Optional["VersionService.RetrieveParams"] = None, + params: Optional["VersionRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> BillSettingVersion: """ diff --git a/stripe/v2/billing/collection_settings/_version_service.py b/stripe/v2/billing/collection_settings/_version_service.py index 81ddfe435..881d114fd 100644 --- a/stripe/v2/billing/collection_settings/_version_service.py +++ b/stripe/v2/billing/collection_settings/_version_service.py @@ -8,23 +8,22 @@ CollectionSettingVersion, ) from typing import Optional, cast -from typing_extensions import NotRequired, TypedDict +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params.v2.billing.collection_settings._version_list_params import ( + VersionListParams, + ) + from stripe.params.v2.billing.collection_settings._version_retrieve_params import ( + VersionRetrieveParams, + ) -class VersionService(StripeService): - class ListParams(TypedDict): - limit: NotRequired[int] - """ - Optionally set the maximum number of results per page. Defaults to 20. - """ - - class RetrieveParams(TypedDict): - pass +class VersionService(StripeService): def list( self, collection_setting_id: str, - params: Optional["VersionService.ListParams"] = None, + params: Optional["VersionListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[CollectionSettingVersion]: """ @@ -46,7 +45,7 @@ def list( async def list_async( self, collection_setting_id: str, - params: Optional["VersionService.ListParams"] = None, + params: Optional["VersionListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[CollectionSettingVersion]: """ @@ -69,7 +68,7 @@ def retrieve( self, collection_setting_id: str, id: str, - params: Optional["VersionService.RetrieveParams"] = None, + params: Optional["VersionRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> CollectionSettingVersion: """ @@ -93,7 +92,7 @@ async def retrieve_async( self, collection_setting_id: str, id: str, - params: Optional["VersionService.RetrieveParams"] = None, + params: Optional["VersionRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> CollectionSettingVersion: """ diff --git a/stripe/v2/billing/intents/_action_service.py b/stripe/v2/billing/intents/_action_service.py index d26f5396b..79497bcd5 100644 --- a/stripe/v2/billing/intents/_action_service.py +++ b/stripe/v2/billing/intents/_action_service.py @@ -6,23 +6,22 @@ from stripe.v2._list_object import ListObject from stripe.v2.billing._intent_action import IntentAction from typing import Optional, cast -from typing_extensions import NotRequired, TypedDict +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params.v2.billing.intents._action_list_params import ( + ActionListParams, + ) + from stripe.params.v2.billing.intents._action_retrieve_params import ( + ActionRetrieveParams, + ) -class ActionService(StripeService): - class ListParams(TypedDict): - limit: NotRequired[int] - """ - Optionally set the maximum number of results per page. Defaults to 10. - """ - - class RetrieveParams(TypedDict): - pass +class ActionService(StripeService): def list( self, intent_id: str, - params: Optional["ActionService.ListParams"] = None, + params: Optional["ActionListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[IntentAction]: """ @@ -44,7 +43,7 @@ def list( async def list_async( self, intent_id: str, - params: Optional["ActionService.ListParams"] = None, + params: Optional["ActionListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[IntentAction]: """ @@ -67,7 +66,7 @@ def retrieve( self, intent_id: str, id: str, - params: Optional["ActionService.RetrieveParams"] = None, + params: Optional["ActionRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> IntentAction: """ @@ -91,7 +90,7 @@ async def retrieve_async( self, intent_id: str, id: str, - params: Optional["ActionService.RetrieveParams"] = None, + params: Optional["ActionRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> IntentAction: """ diff --git a/stripe/v2/billing/license_fees/_version_service.py b/stripe/v2/billing/license_fees/_version_service.py index 2e053212e..c4a5d6026 100644 --- a/stripe/v2/billing/license_fees/_version_service.py +++ b/stripe/v2/billing/license_fees/_version_service.py @@ -6,23 +6,22 @@ from stripe.v2._list_object import ListObject from stripe.v2.billing._license_fee_version import LicenseFeeVersion from typing import Optional, cast -from typing_extensions import NotRequired, TypedDict +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params.v2.billing.license_fees._version_list_params import ( + VersionListParams, + ) + from stripe.params.v2.billing.license_fees._version_retrieve_params import ( + VersionRetrieveParams, + ) -class VersionService(StripeService): - class ListParams(TypedDict): - limit: NotRequired[int] - """ - Optionally set the maximum number of results per page. Defaults to 20. - """ - - class RetrieveParams(TypedDict): - pass +class VersionService(StripeService): def list( self, license_fee_id: str, - params: Optional["VersionService.ListParams"] = None, + params: Optional["VersionListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[LicenseFeeVersion]: """ @@ -44,7 +43,7 @@ def list( async def list_async( self, license_fee_id: str, - params: Optional["VersionService.ListParams"] = None, + params: Optional["VersionListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[LicenseFeeVersion]: """ @@ -67,7 +66,7 @@ def retrieve( self, license_fee_id: str, id: str, - params: Optional["VersionService.RetrieveParams"] = None, + params: Optional["VersionRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> LicenseFeeVersion: """ @@ -91,7 +90,7 @@ async def retrieve_async( self, license_fee_id: str, id: str, - params: Optional["VersionService.RetrieveParams"] = None, + params: Optional["VersionRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> LicenseFeeVersion: """ diff --git a/stripe/v2/billing/pricing_plans/_component_service.py b/stripe/v2/billing/pricing_plans/_component_service.py index 530d295c6..1ee84378a 100644 --- a/stripe/v2/billing/pricing_plans/_component_service.py +++ b/stripe/v2/billing/pricing_plans/_component_service.py @@ -6,101 +6,32 @@ from stripe.v2._deleted_object import DeletedObject from stripe.v2._list_object import ListObject from stripe.v2.billing._pricing_plan_component import PricingPlanComponent -from typing import Dict, List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params.v2.billing.pricing_plans._component_create_params import ( + ComponentCreateParams, + ) + from stripe.params.v2.billing.pricing_plans._component_delete_params import ( + ComponentDeleteParams, + ) + from stripe.params.v2.billing.pricing_plans._component_list_params import ( + ComponentListParams, + ) + from stripe.params.v2.billing.pricing_plans._component_retrieve_params import ( + ComponentRetrieveParams, + ) + from stripe.params.v2.billing.pricing_plans._component_update_params import ( + ComponentUpdateParams, + ) -class ComponentService(StripeService): - class CreateParams(TypedDict): - lookup_key: NotRequired[str] - """ - An identifier that can be used to find this component. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://docs.stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. - """ - type: Literal["license_fee", "rate_card", "service_action"] - """ - The type of the PricingPlanComponent. - """ - license_fee: NotRequired["ComponentService.CreateParamsLicenseFee"] - """ - Details if this component is a License Fee. - """ - rate_card: NotRequired["ComponentService.CreateParamsRateCard"] - """ - Details if this component is a Rate Card. - """ - service_action: NotRequired[ - "ComponentService.CreateParamsServiceAction" - ] - """ - Details if this component is a Service Action. - """ - - class CreateParamsLicenseFee(TypedDict): - id: str - """ - The ID of the License Fee. - """ - version: NotRequired[str] - """ - The version of the LicenseFee. Defaults to 'latest', if not specified. - """ - - class CreateParamsRateCard(TypedDict): - id: str - """ - The ID of the Rate Card. - """ - version: NotRequired[str] - """ - The version of the RateCard. Defaults to 'latest', if not specified. - """ - - class CreateParamsServiceAction(TypedDict): - id: str - """ - The ID of the service action. - """ - - class DeleteParams(TypedDict): - pass - - class ListParams(TypedDict): - limit: NotRequired[int] - """ - Optionally set the maximum number of results per page. Defaults to 20. - """ - lookup_keys: NotRequired[List[str]] - """ - Filter by lookup keys. Mutually exclusive with `pricing_plan_version`. - You can specify up to 10 lookup keys. - """ - pricing_plan_version: NotRequired[str] - """ - The ID of the Pricing Plan Version to list components for. Will use the latest version if not provided. - Mutually exclusive with `lookup_keys`. - """ - - class RetrieveParams(TypedDict): - pass - - class UpdateParams(TypedDict): - lookup_key: NotRequired[str] - """ - An identifier that can be used to find this component. Maximum length of 200 characters. - """ - metadata: NotRequired[Dict[str, Optional[str]]] - """ - Set of key-value pairs that you can attach to an object. - """ +class ComponentService(StripeService): def list( self, pricing_plan_id: str, - params: Optional["ComponentService.ListParams"] = None, + params: Optional["ComponentListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[PricingPlanComponent]: """ @@ -122,7 +53,7 @@ def list( async def list_async( self, pricing_plan_id: str, - params: Optional["ComponentService.ListParams"] = None, + params: Optional["ComponentListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[PricingPlanComponent]: """ @@ -144,7 +75,7 @@ async def list_async( def create( self, pricing_plan_id: str, - params: "ComponentService.CreateParams", + params: "ComponentCreateParams", options: Optional[RequestOptions] = None, ) -> PricingPlanComponent: """ @@ -166,7 +97,7 @@ def create( async def create_async( self, pricing_plan_id: str, - params: "ComponentService.CreateParams", + params: "ComponentCreateParams", options: Optional[RequestOptions] = None, ) -> PricingPlanComponent: """ @@ -189,7 +120,7 @@ def delete( self, pricing_plan_id: str, id: str, - params: Optional["ComponentService.DeleteParams"] = None, + params: Optional["ComponentDeleteParams"] = None, options: Optional[RequestOptions] = None, ) -> DeletedObject: """ @@ -213,7 +144,7 @@ async def delete_async( self, pricing_plan_id: str, id: str, - params: Optional["ComponentService.DeleteParams"] = None, + params: Optional["ComponentDeleteParams"] = None, options: Optional[RequestOptions] = None, ) -> DeletedObject: """ @@ -237,7 +168,7 @@ def retrieve( self, pricing_plan_id: str, id: str, - params: Optional["ComponentService.RetrieveParams"] = None, + params: Optional["ComponentRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> PricingPlanComponent: """ @@ -261,7 +192,7 @@ async def retrieve_async( self, pricing_plan_id: str, id: str, - params: Optional["ComponentService.RetrieveParams"] = None, + params: Optional["ComponentRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> PricingPlanComponent: """ @@ -285,7 +216,7 @@ def update( self, pricing_plan_id: str, id: str, - params: Optional["ComponentService.UpdateParams"] = None, + params: Optional["ComponentUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> PricingPlanComponent: """ @@ -309,7 +240,7 @@ async def update_async( self, pricing_plan_id: str, id: str, - params: Optional["ComponentService.UpdateParams"] = None, + params: Optional["ComponentUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> PricingPlanComponent: """ diff --git a/stripe/v2/billing/pricing_plans/_version_service.py b/stripe/v2/billing/pricing_plans/_version_service.py index 514e04066..ec74f5986 100644 --- a/stripe/v2/billing/pricing_plans/_version_service.py +++ b/stripe/v2/billing/pricing_plans/_version_service.py @@ -6,23 +6,22 @@ from stripe.v2._list_object import ListObject from stripe.v2.billing._pricing_plan_version import PricingPlanVersion from typing import Optional, cast -from typing_extensions import NotRequired, TypedDict +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params.v2.billing.pricing_plans._version_list_params import ( + VersionListParams, + ) + from stripe.params.v2.billing.pricing_plans._version_retrieve_params import ( + VersionRetrieveParams, + ) -class VersionService(StripeService): - class ListParams(TypedDict): - limit: NotRequired[int] - """ - Optionally set the maximum number of results per page. Defaults to 20. - """ - - class RetrieveParams(TypedDict): - pass +class VersionService(StripeService): def list( self, pricing_plan_id: str, - params: Optional["VersionService.ListParams"] = None, + params: Optional["VersionListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[PricingPlanVersion]: """ @@ -44,7 +43,7 @@ def list( async def list_async( self, pricing_plan_id: str, - params: Optional["VersionService.ListParams"] = None, + params: Optional["VersionListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[PricingPlanVersion]: """ @@ -67,7 +66,7 @@ def retrieve( self, pricing_plan_id: str, id: str, - params: Optional["VersionService.RetrieveParams"] = None, + params: Optional["VersionRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> PricingPlanVersion: """ @@ -91,7 +90,7 @@ async def retrieve_async( self, pricing_plan_id: str, id: str, - params: Optional["VersionService.RetrieveParams"] = None, + params: Optional["VersionRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> PricingPlanVersion: """ diff --git a/stripe/v2/billing/rate_cards/_rate_service.py b/stripe/v2/billing/rate_cards/_rate_service.py index d19cc132d..7ded40fc6 100644 --- a/stripe/v2/billing/rate_cards/_rate_service.py +++ b/stripe/v2/billing/rate_cards/_rate_service.py @@ -6,112 +6,29 @@ from stripe.v2._deleted_object import DeletedObject from stripe.v2._list_object import ListObject from stripe.v2.billing._rate_card_rate import RateCardRate -from typing import Dict, List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params.v2.billing.rate_cards._rate_create_params import ( + RateCreateParams, + ) + from stripe.params.v2.billing.rate_cards._rate_delete_params import ( + RateDeleteParams, + ) + from stripe.params.v2.billing.rate_cards._rate_list_params import ( + RateListParams, + ) + from stripe.params.v2.billing.rate_cards._rate_retrieve_params import ( + RateRetrieveParams, + ) class RateService(StripeService): - class CreateParams(TypedDict): - custom_pricing_unit_amount: NotRequired[ - "RateService.CreateParamsCustomPricingUnitAmount" - ] - """ - The custom pricing unit that this rate binds to. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of [key-value pairs](https://docs.stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. - """ - metered_item: NotRequired[str] - """ - The Metered Item that this rate binds to. - """ - tiering_mode: NotRequired[Literal["graduated", "volume"]] - """ - Defines whether the tiered price should be graduated or volume-based. In volume-based tiering, the maximum - quantity within a period determines the per-unit price. In graduated tiering, the pricing changes as the quantity - grows into new tiers. Can only be set if `tiers` is set. - """ - tiers: NotRequired[List["RateService.CreateParamsTier"]] - """ - Each element represents a pricing tier. Cannot be set if `unit_amount` is provided. - """ - transform_quantity: NotRequired[ - "RateService.CreateParamsTransformQuantity" - ] - """ - Apply a transformation to the reported usage or set quantity before computing the amount billed. - """ - unit_amount: NotRequired[str] - """ - The per-unit amount to be charged, represented as a decimal string in minor currency units with at most 12 decimal - places. Cannot be set if `tiers` is provided. - """ - - class CreateParamsCustomPricingUnitAmount(TypedDict): - id: str - """ - The id of the custom pricing unit. - """ - value: str - """ - The unit value for the custom pricing unit, as a string. - """ - - class CreateParamsTier(TypedDict): - flat_amount: NotRequired[str] - """ - Price for the entire tier, represented as a decimal string in minor currency units with at most 12 decimal places. - """ - unit_amount: NotRequired[str] - """ - Per-unit price for units included in this tier, represented as a decimal string in minor currency units with at - most 12 decimal places. - """ - up_to_decimal: NotRequired[str] - """ - Up to and including this quantity will be contained in the tier. Only one of `up_to_decimal` and `up_to_inf` may - be set. - """ - up_to_inf: NotRequired[Literal["inf"]] - """ - No upper bound to this tier. Only one of `up_to_decimal` and `up_to_inf` may be set. - """ - - class CreateParamsTransformQuantity(TypedDict): - divide_by: int - """ - Divide usage by this number. - """ - round: Literal["down", "up"] - """ - After division, round the result up or down. - """ - - class DeleteParams(TypedDict): - pass - - class ListParams(TypedDict): - limit: NotRequired[int] - """ - Optionally set the maximum number of results per page. Defaults to 20. - """ - metered_item: NotRequired[str] - """ - Optionally filter by a Metered Item. - """ - rate_card_version: NotRequired[str] - """ - Optionally filter by a RateCard version. If not specified, defaults to the latest version. - """ - - class RetrieveParams(TypedDict): - pass - def list( self, rate_card_id: str, - params: Optional["RateService.ListParams"] = None, + params: Optional["RateListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[RateCardRate]: """ @@ -133,7 +50,7 @@ def list( async def list_async( self, rate_card_id: str, - params: Optional["RateService.ListParams"] = None, + params: Optional["RateListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[RateCardRate]: """ @@ -155,7 +72,7 @@ async def list_async( def create( self, rate_card_id: str, - params: Optional["RateService.CreateParams"] = None, + params: Optional["RateCreateParams"] = None, options: Optional[RequestOptions] = None, ) -> RateCardRate: """ @@ -178,7 +95,7 @@ def create( async def create_async( self, rate_card_id: str, - params: Optional["RateService.CreateParams"] = None, + params: Optional["RateCreateParams"] = None, options: Optional[RequestOptions] = None, ) -> RateCardRate: """ @@ -202,7 +119,7 @@ def delete( self, rate_card_id: str, id: str, - params: Optional["RateService.DeleteParams"] = None, + params: Optional["RateDeleteParams"] = None, options: Optional[RequestOptions] = None, ) -> DeletedObject: """ @@ -226,7 +143,7 @@ async def delete_async( self, rate_card_id: str, id: str, - params: Optional["RateService.DeleteParams"] = None, + params: Optional["RateDeleteParams"] = None, options: Optional[RequestOptions] = None, ) -> DeletedObject: """ @@ -250,7 +167,7 @@ def retrieve( self, rate_card_id: str, id: str, - params: Optional["RateService.RetrieveParams"] = None, + params: Optional["RateRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> RateCardRate: """ @@ -274,7 +191,7 @@ async def retrieve_async( self, rate_card_id: str, id: str, - params: Optional["RateService.RetrieveParams"] = None, + params: Optional["RateRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> RateCardRate: """ diff --git a/stripe/v2/billing/rate_cards/_version_service.py b/stripe/v2/billing/rate_cards/_version_service.py index d0f03d812..cdf7811f8 100644 --- a/stripe/v2/billing/rate_cards/_version_service.py +++ b/stripe/v2/billing/rate_cards/_version_service.py @@ -6,23 +6,22 @@ from stripe.v2._list_object import ListObject from stripe.v2.billing._rate_card_version import RateCardVersion from typing import Optional, cast -from typing_extensions import NotRequired, TypedDict +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params.v2.billing.rate_cards._version_list_params import ( + VersionListParams, + ) + from stripe.params.v2.billing.rate_cards._version_retrieve_params import ( + VersionRetrieveParams, + ) -class VersionService(StripeService): - class ListParams(TypedDict): - limit: NotRequired[int] - """ - Optionally set the maximum number of results per page. Defaults to 20. - """ - - class RetrieveParams(TypedDict): - pass +class VersionService(StripeService): def list( self, rate_card_id: str, - params: Optional["VersionService.ListParams"] = None, + params: Optional["VersionListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[RateCardVersion]: """ @@ -44,7 +43,7 @@ def list( async def list_async( self, rate_card_id: str, - params: Optional["VersionService.ListParams"] = None, + params: Optional["VersionListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[RateCardVersion]: """ @@ -67,7 +66,7 @@ def retrieve( self, rate_card_id: str, id: str, - params: Optional["VersionService.RetrieveParams"] = None, + params: Optional["VersionRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> RateCardVersion: """ @@ -91,7 +90,7 @@ async def retrieve_async( self, rate_card_id: str, id: str, - params: Optional["VersionService.RetrieveParams"] = None, + params: Optional["VersionRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> RateCardVersion: """ diff --git a/stripe/v2/core/__init__.py b/stripe/v2/core/__init__.py index 9e22208f3..82029aa4f 100644 --- a/stripe/v2/core/__init__.py +++ b/stripe/v2/core/__init__.py @@ -1,5 +1,12 @@ # -*- coding: utf-8 -*- -# File generated from our OpenAPI spec +from stripe.v2.core._event import ( + EventNotification as EventNotification, + RelatedObject as RelatedObject, + Reason as Reason, + ReasonRequest as ReasonRequest, +) + +# The beginning of the section generated from our OpenAPI spec from stripe.v2.core import accounts as accounts, vault as vault from stripe.v2.core._account import Account as Account from stripe.v2.core._account_link import AccountLink as AccountLink @@ -14,8 +21,13 @@ from stripe.v2.core._claimable_sandbox_service import ( ClaimableSandboxService as ClaimableSandboxService, ) +from stripe.v2.core._event import Event as Event +from stripe.v2.core._event_destination import ( + EventDestination as EventDestination, +) from stripe.v2.core._event_destination_service import ( EventDestinationService as EventDestinationService, ) from stripe.v2.core._event_service import EventService as EventService from stripe.v2.core._vault_service import VaultService as VaultService +# The end of the section generated from our OpenAPI spec diff --git a/stripe/v2/core/_account_link_service.py b/stripe/v2/core/_account_link_service.py index b6a0a6be2..04f8a06a6 100644 --- a/stripe/v2/core/_account_link_service.py +++ b/stripe/v2/core/_account_link_service.py @@ -3,106 +3,19 @@ from stripe._request_options import RequestOptions from stripe._stripe_service import StripeService from stripe.v2.core._account_link import AccountLink -from typing import List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params.v2.core._account_link_create_params import ( + AccountLinkCreateParams, + ) -class AccountLinkService(StripeService): - class CreateParams(TypedDict): - account: str - """ - The ID of the Account to create link for. - """ - use_case: "AccountLinkService.CreateParamsUseCase" - """ - The use case of the AccountLink. - """ - - class CreateParamsUseCase(TypedDict): - type: Literal["account_onboarding", "account_update"] - """ - Open Enum. The type of AccountLink the user is requesting. - """ - account_onboarding: NotRequired[ - "AccountLinkService.CreateParamsUseCaseAccountOnboarding" - ] - """ - Indicates that the AccountLink provided should onboard an account. - """ - account_update: NotRequired[ - "AccountLinkService.CreateParamsUseCaseAccountUpdate" - ] - """ - Indicates that the AccountLink provided should update a previously onboarded account. - """ - - class CreateParamsUseCaseAccountOnboarding(TypedDict): - collection_options: NotRequired[ - "AccountLinkService.CreateParamsUseCaseAccountOnboardingCollectionOptions" - ] - """ - Specifies the requirements that Stripe collects from v2/core/accounts in the Onboarding flow. - """ - configurations: List[ - Literal["customer", "merchant", "recipient", "storer"] - ] - """ - Open Enum. A v2/core/account can be configured to enable certain functionality. The configuration param targets the v2/core/account_link to collect information for the specified v2/core/account configuration/s. - """ - refresh_url: str - """ - The URL the user will be redirected to if the AccountLink is expired, has been used, or is otherwise invalid. The URL you specify should attempt to generate a new AccountLink with the same parameters used to create the original AccountLink, then redirect the user to the new AccountLink's URL so they can continue the flow. If a new AccountLink cannot be generated or the redirect fails you should display a useful error to the user. Please make sure to implement authentication before redirecting the user in case this URL is leaked to a third party. - """ - return_url: NotRequired[str] - """ - The URL that the user will be redirected to upon completing the linked flow. - """ - - class CreateParamsUseCaseAccountOnboardingCollectionOptions(TypedDict): - fields: NotRequired[Literal["currently_due", "eventually_due"]] - """ - Specifies whether the platform collects only currently_due requirements (`currently_due`) or both currently_due and eventually_due requirements (`eventually_due`). If you don't specify collection_options, the default value is currently_due. - """ - future_requirements: NotRequired[Literal["include", "omit"]] - """ - Specifies whether the platform collects future_requirements in addition to requirements in Connect Onboarding. The default value is `omit`. - """ - - class CreateParamsUseCaseAccountUpdate(TypedDict): - collection_options: NotRequired[ - "AccountLinkService.CreateParamsUseCaseAccountUpdateCollectionOptions" - ] - """ - Specifies the requirements that Stripe collects from v2/core/accounts in the Onboarding flow. - """ - configurations: List[ - Literal["customer", "merchant", "recipient", "storer"] - ] - """ - Open Enum. A v2/account can be configured to enable certain functionality. The configuration param targets the v2/account_link to collect information for the specified v2/account configuration/s. - """ - refresh_url: str - """ - The URL the user will be redirected to if the AccountLink is expired, has been used, or is otherwise invalid. The URL you specify should attempt to generate a new AccountLink with the same parameters used to create the original AccountLink, then redirect the user to the new AccountLink's URL so they can continue the flow. If a new AccountLink cannot be generated or the redirect fails you should display a useful error to the user. Please make sure to implement authentication before redirecting the user in case this URL is leaked to a third party. - """ - return_url: NotRequired[str] - """ - The URL that the user will be redirected to upon completing the linked flow. - """ - - class CreateParamsUseCaseAccountUpdateCollectionOptions(TypedDict): - fields: NotRequired[Literal["currently_due", "eventually_due"]] - """ - Specifies whether the platform collects only currently_due requirements (`currently_due`) or both currently_due and eventually_due requirements (`eventually_due`). If you don't specify collection_options, the default value is currently_due. - """ - future_requirements: NotRequired[Literal["include", "omit"]] - """ - Specifies whether the platform collects future_requirements in addition to requirements in Connect Onboarding. The default value is `omit`. - """ +class AccountLinkService(StripeService): def create( self, - params: "AccountLinkService.CreateParams", + params: "AccountLinkCreateParams", options: Optional[RequestOptions] = None, ) -> AccountLink: """ @@ -121,7 +34,7 @@ def create( async def create_async( self, - params: "AccountLinkService.CreateParams", + params: "AccountLinkCreateParams", options: Optional[RequestOptions] = None, ) -> AccountLink: """ diff --git a/stripe/v2/core/_account_service.py b/stripe/v2/core/_account_service.py index 7985d6839..08e48e713 100644 --- a/stripe/v2/core/_account_service.py +++ b/stripe/v2/core/_account_service.py @@ -3,12 +3,24 @@ from stripe._request_options import RequestOptions from stripe._stripe_service import StripeService from stripe._util import sanitize_id -from stripe.v2._amount import AmountParam from stripe.v2._list_object import ListObject from stripe.v2.core._account import Account from stripe.v2.core.accounts._person_service import PersonService -from typing import Dict, List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params.v2.core._account_close_params import AccountCloseParams + from stripe.params.v2.core._account_create_params import ( + AccountCreateParams, + ) + from stripe.params.v2.core._account_list_params import AccountListParams + from stripe.params.v2.core._account_retrieve_params import ( + AccountRetrieveParams, + ) + from stripe.params.v2.core._account_update_params import ( + AccountUpdateParams, + ) class AccountService(StripeService): @@ -16,5109 +28,9 @@ def __init__(self, requestor): super().__init__(requestor) self.persons = PersonService(self._requestor) - class CloseParams(TypedDict): - applied_configurations: NotRequired[ - List[Literal["customer", "merchant", "recipient", "storer"]] - ] - """ - Configurations on the Account to be closed. All configurations on the Account must be passed in for this request to succeed. - """ - - class CreateParams(TypedDict): - configuration: NotRequired["AccountService.CreateParamsConfiguration"] - """ - An Account Configuration which allows the Account to take on a key persona across Stripe products. - """ - contact_email: NotRequired[str] - """ - The default contact email address for the Account. Required when configuring the account as a merchant or recipient. - """ - dashboard: NotRequired[Literal["express", "full", "none"]] - """ - A value indicating the Stripe dashboard this Account has access to. This will depend on which configurations are enabled for this account. - """ - defaults: NotRequired["AccountService.CreateParamsDefaults"] - """ - Default values to be used on Account Configurations. - """ - display_name: NotRequired[str] - """ - A descriptive name for the Account. This name will be surfaced in the Stripe Dashboard and on any invoices sent to the Account. - """ - identity: NotRequired["AccountService.CreateParamsIdentity"] - """ - Information about the company, individual, and business represented by the Account. - """ - include: NotRequired[ - List[ - Literal[ - "configuration.customer", - "configuration.merchant", - "configuration.recipient", - "configuration.storer", - "defaults", - "identity", - "requirements", - ] - ] - ] - """ - Additional fields to include in the response. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. - """ - - class CreateParamsConfiguration(TypedDict): - customer: NotRequired[ - "AccountService.CreateParamsConfigurationCustomer" - ] - """ - The Customer Configuration allows the Account to be used in inbound payment flows. - """ - merchant: NotRequired[ - "AccountService.CreateParamsConfigurationMerchant" - ] - """ - The Merchant configuration allows the Account to act as a connected account and collect payments facilitated by a Connect platform. You can add this configuration to your connected accounts only if you've completed onboarding as a Connect platform. - """ - recipient: NotRequired[ - "AccountService.CreateParamsConfigurationRecipient" - ] - """ - The Recipient Configuration allows the Account to receive funds. - """ - storer: NotRequired["AccountService.CreateParamsConfigurationStorer"] - """ - The Storer Configuration allows the Account to store and move funds using stored-value FinancialAccounts. - """ - - class CreateParamsConfigurationCustomer(TypedDict): - automatic_indirect_tax: NotRequired[ - "AccountService.CreateParamsConfigurationCustomerAutomaticIndirectTax" - ] - """ - Automatic indirect tax settings to be used when automatic tax calculation is enabled on the customer's invoices, subscriptions, checkout sessions, or payment links. Surfaces if automatic tax calculation is possible given the current customer location information. - """ - billing: NotRequired[ - "AccountService.CreateParamsConfigurationCustomerBilling" - ] - """ - Billing settings - default settings used for this customer in Billing flows such as Invoices and Subscriptions. - """ - capabilities: NotRequired[ - "AccountService.CreateParamsConfigurationCustomerCapabilities" - ] - """ - Capabilities that have been requested on the Customer Configuration. - """ - shipping: NotRequired[ - "AccountService.CreateParamsConfigurationCustomerShipping" - ] - """ - The customer's shipping information. Appears on invoices emailed to this customer. - """ - test_clock: NotRequired[str] - """ - ID of the test clock to attach to the customer. Can only be set on testmode Accounts, and when the Customer Configuration is first set on an Account. - """ - - class CreateParamsConfigurationCustomerAutomaticIndirectTax(TypedDict): - exempt: NotRequired[Literal["exempt", "none", "reverse"]] - """ - Describes the customer's tax exemption status, which is `none`, `exempt`, or `reverse`. When set to reverse, invoice and receipt PDFs include the following text: “Reverse charge”. - """ - ip_address: NotRequired[str] - """ - A recent IP address of the customer used for tax reporting and tax location inference. - """ - location_source: NotRequired[ - Literal["identity_address", "ip_address", "shipping_address"] - ] - """ - The data source used to identify the customer's tax location - defaults to 'identity_address'. Will only be used for automatic tax calculation on the customer's Invoices and Subscriptions. - """ - - class CreateParamsConfigurationCustomerBilling(TypedDict): - invoice: NotRequired[ - "AccountService.CreateParamsConfigurationCustomerBillingInvoice" - ] - """ - Default settings used on invoices for this customer. - """ - - class CreateParamsConfigurationCustomerBillingInvoice(TypedDict): - custom_fields: NotRequired[ - List[ - "AccountService.CreateParamsConfigurationCustomerBillingInvoiceCustomField" - ] - ] - """ - The list of up to 4 default custom fields to be displayed on invoices for this customer. - """ - footer: NotRequired[str] - """ - Default footer to be displayed on invoices for this customer. - """ - next_sequence: NotRequired[int] - """ - The sequence to be used on the customer's next invoice. Defaults to 1. - """ - prefix: NotRequired[str] - """ - The prefix for the customer used to generate unique invoice numbers. Must be 3–12 uppercase letters or numbers. - """ - rendering: NotRequired[ - "AccountService.CreateParamsConfigurationCustomerBillingInvoiceRendering" - ] - """ - Default options for invoice PDF rendering for this customer. - """ - - class CreateParamsConfigurationCustomerBillingInvoiceCustomField( - TypedDict - ): - name: str - """ - The name of the custom field. This may be up to 40 characters. - """ - value: str - """ - The value of the custom field. This may be up to 140 characters. When updating, pass an empty string to remove previously-defined values. - """ - - class CreateParamsConfigurationCustomerBillingInvoiceRendering(TypedDict): - amount_tax_display: NotRequired[ - Literal["exclude_tax", "include_inclusive_tax"] - ] - """ - How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One of exclude_tax or include_inclusive_tax. include_inclusive_tax will include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. exclude_tax will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts. - """ - template: NotRequired[str] - """ - ID of the invoice rendering template to use for future invoices. - """ - - class CreateParamsConfigurationCustomerCapabilities(TypedDict): - automatic_indirect_tax: NotRequired[ - "AccountService.CreateParamsConfigurationCustomerCapabilitiesAutomaticIndirectTax" - ] - """ - Generates requirements for enabling automatic indirect tax calculation on this customer's invoices or subscriptions. Recommended to request this capability if planning to enable automatic tax calculation on this customer's invoices or subscriptions. Uses the `location_source` field. - """ - - class CreateParamsConfigurationCustomerCapabilitiesAutomaticIndirectTax( - TypedDict, - ): - requested: bool - """ - To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. - """ - - class CreateParamsConfigurationCustomerShipping(TypedDict): - address: NotRequired[ - "AccountService.CreateParamsConfigurationCustomerShippingAddress" - ] - """ - Customer shipping address. - """ - name: NotRequired[str] - """ - Customer name. - """ - phone: NotRequired[str] - """ - Customer phone (including extension). - """ - - class CreateParamsConfigurationCustomerShippingAddress(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 (e.g., street, PO Box, or company name). - """ - line2: NotRequired[str] - """ - Address line 2 (e.g., apartment, suite, unit, or building). - """ - postal_code: NotRequired[str] - """ - ZIP or postal code. - """ - state: NotRequired[str] - """ - State, county, province, or region. - """ - - class CreateParamsConfigurationMerchant(TypedDict): - bacs_debit_payments: NotRequired[ - "AccountService.CreateParamsConfigurationMerchantBacsDebitPayments" - ] - """ - Settings used for Bacs debit payments. - """ - branding: NotRequired[ - "AccountService.CreateParamsConfigurationMerchantBranding" - ] - """ - Settings used to apply the merchant's branding to email receipts, invoices, Checkout, and other products. - """ - capabilities: NotRequired[ - "AccountService.CreateParamsConfigurationMerchantCapabilities" - ] - """ - Capabilities to request on the Merchant Configuration. - """ - card_payments: NotRequired[ - "AccountService.CreateParamsConfigurationMerchantCardPayments" - ] - """ - Card payments settings. - """ - mcc: NotRequired[str] - """ - The merchant category code for the Merchant Configuration. MCCs are used to classify businesses based on the goods or services they provide. - """ - statement_descriptor: NotRequired[ - "AccountService.CreateParamsConfigurationMerchantStatementDescriptor" - ] - """ - Statement descriptor. - """ - support: NotRequired[ - "AccountService.CreateParamsConfigurationMerchantSupport" - ] - """ - Publicly available contact information for sending support issues to. - """ - - class CreateParamsConfigurationMerchantBacsDebitPayments(TypedDict): - display_name: NotRequired[str] - """ - Display name for Bacs debit payments. - """ - - class CreateParamsConfigurationMerchantBranding(TypedDict): - icon: NotRequired[str] - """ - ID of a [file upload](https://docs.stripe.com/api/persons/update#create_file): An icon for the merchant. Must be square and at least 128px x 128px. - """ - logo: NotRequired[str] - """ - ID of a [file upload](https://docs.stripe.com/api/persons/update#create_file): A logo for the merchant that will be used in Checkout instead of the icon and without the merchant's name next to it if provided. Must be at least 128px x 128px. - """ - primary_color: NotRequired[str] - """ - A CSS hex color value representing the primary branding color for the merchant. - """ - secondary_color: NotRequired[str] - """ - A CSS hex color value representing the secondary branding color for the merchant. - """ - - class CreateParamsConfigurationMerchantCapabilities(TypedDict): - ach_debit_payments: NotRequired[ - "AccountService.CreateParamsConfigurationMerchantCapabilitiesAchDebitPayments" - ] - """ - Allow the merchant to process ACH debit payments. - """ - acss_debit_payments: NotRequired[ - "AccountService.CreateParamsConfigurationMerchantCapabilitiesAcssDebitPayments" - ] - """ - Allow the merchant to process ACSS debit payments. - """ - affirm_payments: NotRequired[ - "AccountService.CreateParamsConfigurationMerchantCapabilitiesAffirmPayments" - ] - """ - Allow the merchant to process Affirm payments. - """ - afterpay_clearpay_payments: NotRequired[ - "AccountService.CreateParamsConfigurationMerchantCapabilitiesAfterpayClearpayPayments" - ] - """ - Allow the merchant to process Afterpay/Clearpay payments. - """ - alma_payments: NotRequired[ - "AccountService.CreateParamsConfigurationMerchantCapabilitiesAlmaPayments" - ] - """ - Allow the merchant to process Alma payments. - """ - amazon_pay_payments: NotRequired[ - "AccountService.CreateParamsConfigurationMerchantCapabilitiesAmazonPayPayments" - ] - """ - Allow the merchant to process Amazon Pay payments. - """ - au_becs_debit_payments: NotRequired[ - "AccountService.CreateParamsConfigurationMerchantCapabilitiesAuBecsDebitPayments" - ] - """ - Allow the merchant to process Australian BECS Direct Debit payments. - """ - bacs_debit_payments: NotRequired[ - "AccountService.CreateParamsConfigurationMerchantCapabilitiesBacsDebitPayments" - ] - """ - Allow the merchant to process BACS Direct Debit payments. - """ - bancontact_payments: NotRequired[ - "AccountService.CreateParamsConfigurationMerchantCapabilitiesBancontactPayments" - ] - """ - Allow the merchant to process Bancontact payments. - """ - blik_payments: NotRequired[ - "AccountService.CreateParamsConfigurationMerchantCapabilitiesBlikPayments" - ] - """ - Allow the merchant to process BLIK payments. - """ - boleto_payments: NotRequired[ - "AccountService.CreateParamsConfigurationMerchantCapabilitiesBoletoPayments" - ] - """ - Allow the merchant to process Boleto payments. - """ - card_payments: NotRequired[ - "AccountService.CreateParamsConfigurationMerchantCapabilitiesCardPayments" - ] - """ - Allow the merchant to collect card payments. - """ - cartes_bancaires_payments: NotRequired[ - "AccountService.CreateParamsConfigurationMerchantCapabilitiesCartesBancairesPayments" - ] - """ - Allow the merchant to process Cartes Bancaires payments. - """ - cashapp_payments: NotRequired[ - "AccountService.CreateParamsConfigurationMerchantCapabilitiesCashappPayments" - ] - """ - Allow the merchant to process Cash App payments. - """ - eps_payments: NotRequired[ - "AccountService.CreateParamsConfigurationMerchantCapabilitiesEpsPayments" - ] - """ - Allow the merchant to process EPS payments. - """ - fpx_payments: NotRequired[ - "AccountService.CreateParamsConfigurationMerchantCapabilitiesFpxPayments" - ] - """ - Allow the merchant to process FPX payments. - """ - gb_bank_transfer_payments: NotRequired[ - "AccountService.CreateParamsConfigurationMerchantCapabilitiesGbBankTransferPayments" - ] - """ - Allow the merchant to process UK bank transfer payments. - """ - grabpay_payments: NotRequired[ - "AccountService.CreateParamsConfigurationMerchantCapabilitiesGrabpayPayments" - ] - """ - Allow the merchant to process GrabPay payments. - """ - ideal_payments: NotRequired[ - "AccountService.CreateParamsConfigurationMerchantCapabilitiesIdealPayments" - ] - """ - Allow the merchant to process iDEAL payments. - """ - jcb_payments: NotRequired[ - "AccountService.CreateParamsConfigurationMerchantCapabilitiesJcbPayments" - ] - """ - Allow the merchant to process JCB card payments. - """ - jp_bank_transfer_payments: NotRequired[ - "AccountService.CreateParamsConfigurationMerchantCapabilitiesJpBankTransferPayments" - ] - """ - Allow the merchant to process Japanese bank transfer payments. - """ - kakao_pay_payments: NotRequired[ - "AccountService.CreateParamsConfigurationMerchantCapabilitiesKakaoPayPayments" - ] - """ - Allow the merchant to process Kakao Pay payments. - """ - klarna_payments: NotRequired[ - "AccountService.CreateParamsConfigurationMerchantCapabilitiesKlarnaPayments" - ] - """ - Allow the merchant to process Klarna payments. - """ - konbini_payments: NotRequired[ - "AccountService.CreateParamsConfigurationMerchantCapabilitiesKonbiniPayments" - ] - """ - Allow the merchant to process Konbini convenience store payments. - """ - kr_card_payments: NotRequired[ - "AccountService.CreateParamsConfigurationMerchantCapabilitiesKrCardPayments" - ] - """ - Allow the merchant to process Korean card payments. - """ - link_payments: NotRequired[ - "AccountService.CreateParamsConfigurationMerchantCapabilitiesLinkPayments" - ] - """ - Allow the merchant to process Link payments. - """ - mobilepay_payments: NotRequired[ - "AccountService.CreateParamsConfigurationMerchantCapabilitiesMobilepayPayments" - ] - """ - Allow the merchant to process MobilePay payments. - """ - multibanco_payments: NotRequired[ - "AccountService.CreateParamsConfigurationMerchantCapabilitiesMultibancoPayments" - ] - """ - Allow the merchant to process Multibanco payments. - """ - mx_bank_transfer_payments: NotRequired[ - "AccountService.CreateParamsConfigurationMerchantCapabilitiesMxBankTransferPayments" - ] - """ - Allow the merchant to process Mexican bank transfer payments. - """ - naver_pay_payments: NotRequired[ - "AccountService.CreateParamsConfigurationMerchantCapabilitiesNaverPayPayments" - ] - """ - Allow the merchant to process Naver Pay payments. - """ - oxxo_payments: NotRequired[ - "AccountService.CreateParamsConfigurationMerchantCapabilitiesOxxoPayments" - ] - """ - Allow the merchant to process OXXO payments. - """ - p24_payments: NotRequired[ - "AccountService.CreateParamsConfigurationMerchantCapabilitiesP24Payments" - ] - """ - Allow the merchant to process Przelewy24 (P24) payments. - """ - pay_by_bank_payments: NotRequired[ - "AccountService.CreateParamsConfigurationMerchantCapabilitiesPayByBankPayments" - ] - """ - Allow the merchant to process Pay by Bank payments. - """ - payco_payments: NotRequired[ - "AccountService.CreateParamsConfigurationMerchantCapabilitiesPaycoPayments" - ] - """ - Allow the merchant to process PAYCO payments. - """ - paynow_payments: NotRequired[ - "AccountService.CreateParamsConfigurationMerchantCapabilitiesPaynowPayments" - ] - """ - Allow the merchant to process PayNow payments. - """ - promptpay_payments: NotRequired[ - "AccountService.CreateParamsConfigurationMerchantCapabilitiesPromptpayPayments" - ] - """ - Allow the merchant to process PromptPay payments. - """ - revolut_pay_payments: NotRequired[ - "AccountService.CreateParamsConfigurationMerchantCapabilitiesRevolutPayPayments" - ] - """ - Allow the merchant to process Revolut Pay payments. - """ - samsung_pay_payments: NotRequired[ - "AccountService.CreateParamsConfigurationMerchantCapabilitiesSamsungPayPayments" - ] - """ - Allow the merchant to process Samsung Pay payments. - """ - sepa_bank_transfer_payments: NotRequired[ - "AccountService.CreateParamsConfigurationMerchantCapabilitiesSepaBankTransferPayments" - ] - """ - Allow the merchant to process SEPA bank transfer payments. - """ - sepa_debit_payments: NotRequired[ - "AccountService.CreateParamsConfigurationMerchantCapabilitiesSepaDebitPayments" - ] - """ - Allow the merchant to process SEPA Direct Debit payments. - """ - swish_payments: NotRequired[ - "AccountService.CreateParamsConfigurationMerchantCapabilitiesSwishPayments" - ] - """ - Allow the merchant to process Swish payments. - """ - twint_payments: NotRequired[ - "AccountService.CreateParamsConfigurationMerchantCapabilitiesTwintPayments" - ] - """ - Allow the merchant to process TWINT payments. - """ - us_bank_transfer_payments: NotRequired[ - "AccountService.CreateParamsConfigurationMerchantCapabilitiesUsBankTransferPayments" - ] - """ - Allow the merchant to process US bank transfer payments. - """ - zip_payments: NotRequired[ - "AccountService.CreateParamsConfigurationMerchantCapabilitiesZipPayments" - ] - """ - Allow the merchant to process Zip payments. - """ - - class CreateParamsConfigurationMerchantCapabilitiesAchDebitPayments( - TypedDict, - ): - requested: bool - """ - To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. - """ - - class CreateParamsConfigurationMerchantCapabilitiesAcssDebitPayments( - TypedDict, - ): - requested: bool - """ - To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. - """ - - class CreateParamsConfigurationMerchantCapabilitiesAffirmPayments( - TypedDict, - ): - requested: bool - """ - To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. - """ - - class CreateParamsConfigurationMerchantCapabilitiesAfterpayClearpayPayments( - TypedDict, - ): - requested: bool - """ - To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. - """ - - class CreateParamsConfigurationMerchantCapabilitiesAlmaPayments(TypedDict): - requested: bool - """ - To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. - """ - - class CreateParamsConfigurationMerchantCapabilitiesAmazonPayPayments( - TypedDict, - ): - requested: bool - """ - To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. - """ - - class CreateParamsConfigurationMerchantCapabilitiesAuBecsDebitPayments( - TypedDict, - ): - requested: bool - """ - To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. - """ - - class CreateParamsConfigurationMerchantCapabilitiesBacsDebitPayments( - TypedDict, - ): - requested: bool - """ - To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. - """ - - class CreateParamsConfigurationMerchantCapabilitiesBancontactPayments( - TypedDict, - ): - requested: bool - """ - To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. - """ - - class CreateParamsConfigurationMerchantCapabilitiesBlikPayments(TypedDict): - requested: bool - """ - To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. - """ - - class CreateParamsConfigurationMerchantCapabilitiesBoletoPayments( - TypedDict, - ): - requested: bool - """ - To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. - """ - - class CreateParamsConfigurationMerchantCapabilitiesCardPayments(TypedDict): - requested: bool - """ - To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. - """ - - class CreateParamsConfigurationMerchantCapabilitiesCartesBancairesPayments( - TypedDict, - ): - requested: bool - """ - To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. - """ - - class CreateParamsConfigurationMerchantCapabilitiesCashappPayments( - TypedDict, - ): - requested: bool - """ - To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. - """ - - class CreateParamsConfigurationMerchantCapabilitiesEpsPayments(TypedDict): - requested: bool - """ - To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. - """ - - class CreateParamsConfigurationMerchantCapabilitiesFpxPayments(TypedDict): - requested: bool - """ - To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. - """ - - class CreateParamsConfigurationMerchantCapabilitiesGbBankTransferPayments( - TypedDict, - ): - requested: bool - """ - To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. - """ - - class CreateParamsConfigurationMerchantCapabilitiesGrabpayPayments( - TypedDict, - ): - requested: bool - """ - To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. - """ - - class CreateParamsConfigurationMerchantCapabilitiesIdealPayments( - TypedDict - ): - requested: bool - """ - To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. - """ - - class CreateParamsConfigurationMerchantCapabilitiesJcbPayments(TypedDict): - requested: bool - """ - To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. - """ - - class CreateParamsConfigurationMerchantCapabilitiesJpBankTransferPayments( - TypedDict, - ): - requested: bool - """ - To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. - """ - - class CreateParamsConfigurationMerchantCapabilitiesKakaoPayPayments( - TypedDict, - ): - requested: bool - """ - To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. - """ - - class CreateParamsConfigurationMerchantCapabilitiesKlarnaPayments( - TypedDict, - ): - requested: bool - """ - To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. - """ - - class CreateParamsConfigurationMerchantCapabilitiesKonbiniPayments( - TypedDict, - ): - requested: bool - """ - To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. - """ - - class CreateParamsConfigurationMerchantCapabilitiesKrCardPayments( - TypedDict, - ): - requested: bool - """ - To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. - """ - - class CreateParamsConfigurationMerchantCapabilitiesLinkPayments(TypedDict): - requested: bool - """ - To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. - """ - - class CreateParamsConfigurationMerchantCapabilitiesMobilepayPayments( - TypedDict, - ): - requested: bool - """ - To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. - """ - - class CreateParamsConfigurationMerchantCapabilitiesMultibancoPayments( - TypedDict, - ): - requested: bool - """ - To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. - """ - - class CreateParamsConfigurationMerchantCapabilitiesMxBankTransferPayments( - TypedDict, - ): - requested: bool - """ - To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. - """ - - class CreateParamsConfigurationMerchantCapabilitiesNaverPayPayments( - TypedDict, - ): - requested: bool - """ - To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. - """ - - class CreateParamsConfigurationMerchantCapabilitiesOxxoPayments(TypedDict): - requested: bool - """ - To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. - """ - - class CreateParamsConfigurationMerchantCapabilitiesP24Payments(TypedDict): - requested: bool - """ - To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. - """ - - class CreateParamsConfigurationMerchantCapabilitiesPayByBankPayments( - TypedDict, - ): - requested: bool - """ - To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. - """ - - class CreateParamsConfigurationMerchantCapabilitiesPaycoPayments( - TypedDict - ): - requested: bool - """ - To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. - """ - - class CreateParamsConfigurationMerchantCapabilitiesPaynowPayments( - TypedDict, - ): - requested: bool - """ - To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. - """ - - class CreateParamsConfigurationMerchantCapabilitiesPromptpayPayments( - TypedDict, - ): - requested: bool - """ - To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. - """ - - class CreateParamsConfigurationMerchantCapabilitiesRevolutPayPayments( - TypedDict, - ): - requested: bool - """ - To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. - """ - - class CreateParamsConfigurationMerchantCapabilitiesSamsungPayPayments( - TypedDict, - ): - requested: bool - """ - To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. - """ - - class CreateParamsConfigurationMerchantCapabilitiesSepaBankTransferPayments( - TypedDict, - ): - requested: bool - """ - To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. - """ - - class CreateParamsConfigurationMerchantCapabilitiesSepaDebitPayments( - TypedDict, - ): - requested: bool - """ - To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. - """ - - class CreateParamsConfigurationMerchantCapabilitiesSwishPayments( - TypedDict - ): - requested: bool - """ - To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. - """ - - class CreateParamsConfigurationMerchantCapabilitiesTwintPayments( - TypedDict - ): - requested: bool - """ - To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. - """ - - class CreateParamsConfigurationMerchantCapabilitiesUsBankTransferPayments( - TypedDict, - ): - requested: bool - """ - To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. - """ - - class CreateParamsConfigurationMerchantCapabilitiesZipPayments(TypedDict): - requested: bool - """ - To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. - """ - - class CreateParamsConfigurationMerchantCardPayments(TypedDict): - decline_on: NotRequired[ - "AccountService.CreateParamsConfigurationMerchantCardPaymentsDeclineOn" - ] - """ - Automatically declines certain charge types regardless of whether the card issuer accepted or declined the charge. - """ - - class CreateParamsConfigurationMerchantCardPaymentsDeclineOn(TypedDict): - avs_failure: NotRequired[bool] - """ - Whether Stripe automatically declines charges with an incorrect ZIP or postal code. This setting only applies when a ZIP or postal code is provided and they fail bank verification. - """ - cvc_failure: NotRequired[bool] - """ - Whether Stripe automatically declines charges with an incorrect CVC. This setting only applies when a CVC is provided and it fails bank verification. - """ - - class CreateParamsConfigurationMerchantStatementDescriptor(TypedDict): - descriptor: NotRequired[str] - """ - The default text that appears on statements for non-card charges outside of Japan. For card charges, if you don't set a statement_descriptor_prefix, this text is also used as the statement descriptor prefix. In that case, if concatenating the statement descriptor suffix causes the combined statement descriptor to exceed 22 characters, we truncate the statement_descriptor text to limit the full descriptor to 22 characters. For more information about statement descriptors and their requirements, see the Merchant Configuration settings documentation. - """ - prefix: NotRequired[str] - """ - Default text that appears on statements for card charges outside of Japan, prefixing any dynamic statement_descriptor_suffix specified on the charge. To maximize space for the dynamic part of the descriptor, keep this text short. If you don't specify this value, statement_descriptor is used as the prefix. For more information about statement descriptors and their requirements, see the Merchant Configuration settings documentation. - """ - - class CreateParamsConfigurationMerchantSupport(TypedDict): - address: NotRequired[ - "AccountService.CreateParamsConfigurationMerchantSupportAddress" - ] - """ - A publicly available mailing address for sending support issues to. - """ - email: NotRequired[str] - """ - A publicly available email address for sending support issues to. - """ - phone: NotRequired[str] - """ - A publicly available phone number to call with support issues. - """ - url: NotRequired[str] - """ - A publicly available website for handling support issues. - """ - - class CreateParamsConfigurationMerchantSupportAddress(TypedDict): - city: NotRequired[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[str] - """ - Address line 1 (e.g., street, PO Box, or company name). - """ - line2: NotRequired[str] - """ - Address line 2 (e.g., apartment, suite, unit, or building). - """ - postal_code: NotRequired[str] - """ - ZIP or postal code. - """ - state: NotRequired[str] - """ - State, county, province, or region. - """ - town: NotRequired[str] - """ - Town or cho-me. - """ - - class CreateParamsConfigurationRecipient(TypedDict): - capabilities: NotRequired[ - "AccountService.CreateParamsConfigurationRecipientCapabilities" - ] - """ - Capabilities to be requested on the Recipient Configuration. - """ - - class CreateParamsConfigurationRecipientCapabilities(TypedDict): - bank_accounts: NotRequired[ - "AccountService.CreateParamsConfigurationRecipientCapabilitiesBankAccounts" - ] - """ - Capabilities that enable OutboundPayments to a bank account linked to this Account. - """ - cards: NotRequired[ - "AccountService.CreateParamsConfigurationRecipientCapabilitiesCards" - ] - """ - Capabilities that enable OutboundPayments to a card linked to this Account. - """ - crypto_wallets: NotRequired[ - "AccountService.CreateParamsConfigurationRecipientCapabilitiesCryptoWallets" - ] - """ - Capabilities that enable OutboundPayments to a crypto wallet linked to this Account. - """ - stripe_balance: NotRequired[ - "AccountService.CreateParamsConfigurationRecipientCapabilitiesStripeBalance" - ] - """ - Capabilities that enable the recipient to manage their Stripe Balance (/v1/balance). - """ - - class CreateParamsConfigurationRecipientCapabilitiesBankAccounts( - TypedDict - ): - local: NotRequired[ - "AccountService.CreateParamsConfigurationRecipientCapabilitiesBankAccountsLocal" - ] - """ - Enables this Account to receive OutboundPayments to linked bank accounts over local networks. - """ - wire: NotRequired[ - "AccountService.CreateParamsConfigurationRecipientCapabilitiesBankAccountsWire" - ] - """ - Enables this Account to receive OutboundPayments to linked bank accounts over wire. - """ - - class CreateParamsConfigurationRecipientCapabilitiesBankAccountsLocal( - TypedDict, - ): - requested: bool - """ - To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. - """ - - class CreateParamsConfigurationRecipientCapabilitiesBankAccountsWire( - TypedDict, - ): - requested: bool - """ - To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. - """ - - class CreateParamsConfigurationRecipientCapabilitiesCards(TypedDict): - requested: bool - """ - To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. - """ - - class CreateParamsConfigurationRecipientCapabilitiesCryptoWallets( - TypedDict, - ): - requested: bool - """ - To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. - """ - - class CreateParamsConfigurationRecipientCapabilitiesStripeBalance( - TypedDict, - ): - stripe_transfers: NotRequired[ - "AccountService.CreateParamsConfigurationRecipientCapabilitiesStripeBalanceStripeTransfers" - ] - """ - Allows the account to receive /v1/transfers into their Stripe Balance (/v1/balance). - """ - - class CreateParamsConfigurationRecipientCapabilitiesStripeBalanceStripeTransfers( - TypedDict, - ): - requested: bool - """ - To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. - """ - - class CreateParamsConfigurationStorer(TypedDict): - capabilities: NotRequired[ - "AccountService.CreateParamsConfigurationStorerCapabilities" - ] - """ - Capabilities to request on the Storer Configuration. - """ - - class CreateParamsConfigurationStorerCapabilities(TypedDict): - financial_addresses: NotRequired[ - "AccountService.CreateParamsConfigurationStorerCapabilitiesFinancialAddresses" - ] - """ - Can provision a financial address to credit/debit a FinancialAccount. - """ - holds_currencies: NotRequired[ - "AccountService.CreateParamsConfigurationStorerCapabilitiesHoldsCurrencies" - ] - """ - Can hold storage-type funds on Stripe. - """ - inbound_transfers: NotRequired[ - "AccountService.CreateParamsConfigurationStorerCapabilitiesInboundTransfers" - ] - """ - Can pull funds from an external source, owned by yourself, to a FinancialAccount. - """ - outbound_payments: NotRequired[ - "AccountService.CreateParamsConfigurationStorerCapabilitiesOutboundPayments" - ] - """ - Can send funds from a FinancialAccount to a destination owned by someone else. - """ - outbound_transfers: NotRequired[ - "AccountService.CreateParamsConfigurationStorerCapabilitiesOutboundTransfers" - ] - """ - Can send funds from a FinancialAccount to a destination owned by yourself. - """ - - class CreateParamsConfigurationStorerCapabilitiesFinancialAddresses( - TypedDict, - ): - bank_accounts: NotRequired[ - "AccountService.CreateParamsConfigurationStorerCapabilitiesFinancialAddressesBankAccounts" - ] - """ - Can provision a bank-account-like financial address (VBAN) to credit/debit a FinancialAccount. - """ - - class CreateParamsConfigurationStorerCapabilitiesFinancialAddressesBankAccounts( - TypedDict, - ): - requested: bool - """ - To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. - """ - - class CreateParamsConfigurationStorerCapabilitiesHoldsCurrencies( - TypedDict - ): - gbp: NotRequired[ - "AccountService.CreateParamsConfigurationStorerCapabilitiesHoldsCurrenciesGbp" - ] - """ - Can hold storage-type funds on Stripe in GBP. - """ - - class CreateParamsConfigurationStorerCapabilitiesHoldsCurrenciesGbp( - TypedDict, - ): - requested: bool - """ - To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. - """ - - class CreateParamsConfigurationStorerCapabilitiesInboundTransfers( - TypedDict, - ): - bank_accounts: NotRequired[ - "AccountService.CreateParamsConfigurationStorerCapabilitiesInboundTransfersBankAccounts" - ] - """ - Can pull funds from an external bank account owned by yourself to a FinancialAccount. - """ - - class CreateParamsConfigurationStorerCapabilitiesInboundTransfersBankAccounts( - TypedDict, - ): - requested: bool - """ - To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. - """ - - class CreateParamsConfigurationStorerCapabilitiesOutboundPayments( - TypedDict, - ): - bank_accounts: NotRequired[ - "AccountService.CreateParamsConfigurationStorerCapabilitiesOutboundPaymentsBankAccounts" - ] - """ - Can send funds from a FinancialAccount to a bank account owned by someone else. - """ - cards: NotRequired[ - "AccountService.CreateParamsConfigurationStorerCapabilitiesOutboundPaymentsCards" - ] - """ - Can send funds from a FinancialAccount to a debit card owned by someone else. - """ - financial_accounts: NotRequired[ - "AccountService.CreateParamsConfigurationStorerCapabilitiesOutboundPaymentsFinancialAccounts" - ] - """ - Can send funds from a FinancialAccount to another FinancialAccount owned by someone else. - """ - - class CreateParamsConfigurationStorerCapabilitiesOutboundPaymentsBankAccounts( - TypedDict, - ): - requested: bool - """ - To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. - """ - - class CreateParamsConfigurationStorerCapabilitiesOutboundPaymentsCards( - TypedDict, - ): - requested: bool - """ - To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. - """ - - class CreateParamsConfigurationStorerCapabilitiesOutboundPaymentsFinancialAccounts( - TypedDict, - ): - requested: bool - """ - To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. - """ - - class CreateParamsConfigurationStorerCapabilitiesOutboundTransfers( - TypedDict, - ): - bank_accounts: NotRequired[ - "AccountService.CreateParamsConfigurationStorerCapabilitiesOutboundTransfersBankAccounts" - ] - """ - Can send funds from a FinancialAccount to a bank account owned by yourself. - """ - financial_accounts: NotRequired[ - "AccountService.CreateParamsConfigurationStorerCapabilitiesOutboundTransfersFinancialAccounts" - ] - """ - Can send funds from a FinancialAccount to another FinancialAccount owned by yourself. - """ - - class CreateParamsConfigurationStorerCapabilitiesOutboundTransfersBankAccounts( - TypedDict, - ): - requested: bool - """ - To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. - """ - - class CreateParamsConfigurationStorerCapabilitiesOutboundTransfersFinancialAccounts( - TypedDict, - ): - requested: bool - """ - To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. - """ - - class CreateParamsDefaults(TypedDict): - currency: NotRequired[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). - """ - locales: NotRequired[ - List[ - Literal[ - "ar-SA", - "bg", - "bg-BG", - "cs", - "cs-CZ", - "da", - "da-DK", - "de", - "de-DE", - "el", - "el-GR", - "en", - "en-AU", - "en-CA", - "en-GB", - "en-IE", - "en-IN", - "en-NZ", - "en-SG", - "en-US", - "es", - "es-419", - "es-ES", - "et", - "et-EE", - "fi", - "fil", - "fil-PH", - "fi-FI", - "fr", - "fr-CA", - "fr-FR", - "he-IL", - "hr", - "hr-HR", - "hu", - "hu-HU", - "id", - "id-ID", - "it", - "it-IT", - "ja", - "ja-JP", - "ko", - "ko-KR", - "lt", - "lt-LT", - "lv", - "lv-LV", - "ms", - "ms-MY", - "mt", - "mt-MT", - "nb", - "nb-NO", - "nl", - "nl-NL", - "pl", - "pl-PL", - "pt", - "pt-BR", - "pt-PT", - "ro", - "ro-RO", - "ru", - "ru-RU", - "sk", - "sk-SK", - "sl", - "sl-SI", - "sv", - "sv-SE", - "th", - "th-TH", - "tr", - "tr-TR", - "vi", - "vi-VN", - "zh", - "zh-Hans", - "zh-Hant-HK", - "zh-Hant-TW", - "zh-HK", - "zh-TW", - ] - ] - ] - """ - The Account's preferred locales (languages), ordered by preference. - """ - profile: NotRequired["AccountService.CreateParamsDefaultsProfile"] - """ - Account profile information. - """ - responsibilities: NotRequired[ - "AccountService.CreateParamsDefaultsResponsibilities" - ] - """ - Default responsibilities held by either Stripe or the platform. - """ - - class CreateParamsDefaultsProfile(TypedDict): - business_url: NotRequired[str] - """ - The business's publicly-available website. - """ - doing_business_as: NotRequired[str] - """ - The name which is used by the business. - """ - product_description: NotRequired[str] - """ - Internal-only description of the product sold or service provided by the business. It's used by Stripe for risk and underwriting purposes. - """ - - class CreateParamsDefaultsResponsibilities(TypedDict): - fees_collector: Literal["application", "stripe"] - """ - A value indicating the party responsible for collecting fees from this account. - """ - losses_collector: Literal["application", "stripe"] - """ - A value indicating who is responsible for losses when this Account can't pay back negative balances from payments. - """ - - class CreateParamsIdentity(TypedDict): - attestations: NotRequired[ - "AccountService.CreateParamsIdentityAttestations" - ] - """ - Attestations from the identity's key people, e.g. owners, executives, directors. - """ - business_details: NotRequired[ - "AccountService.CreateParamsIdentityBusinessDetails" - ] - """ - Information about the company or business. - """ - country: NotRequired[str] - """ - The country in which the account holder resides, or in which the business is legally established. This should be an [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code. - """ - entity_type: NotRequired[ - Literal["company", "government_entity", "individual", "non_profit"] - ] - """ - The entity type. - """ - individual: NotRequired[ - "AccountService.CreateParamsIdentityIndividual" - ] - """ - Information about the person represented by the account. - """ - - class CreateParamsIdentityAttestations(TypedDict): - directorship_declaration: NotRequired[ - "AccountService.CreateParamsIdentityAttestationsDirectorshipDeclaration" - ] - """ - This hash is used to attest that the directors information provided to Stripe is both current and correct. - """ - ownership_declaration: NotRequired[ - "AccountService.CreateParamsIdentityAttestationsOwnershipDeclaration" - ] - """ - This hash is used to attest that the beneficial owner information provided to Stripe is both current and correct. - """ - persons_provided: NotRequired[ - "AccountService.CreateParamsIdentityAttestationsPersonsProvided" - ] - """ - Attestation that all Persons with a specific Relationship value have been provided. - """ - terms_of_service: NotRequired[ - "AccountService.CreateParamsIdentityAttestationsTermsOfService" - ] - """ - Attestations of accepted terms of service agreements. - """ - - class CreateParamsIdentityAttestationsDirectorshipDeclaration(TypedDict): - date: NotRequired[str] - """ - The time marking when the director attestation was made. Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: 2022-09-18T13:22:18.123Z. - """ - ip: NotRequired[str] - """ - The IP address from which the director attestation was made. - """ - user_agent: NotRequired[str] - """ - The user agent of the browser from which the director attestation was made. - """ - - class CreateParamsIdentityAttestationsOwnershipDeclaration(TypedDict): - date: NotRequired[str] - """ - The time marking when the beneficial owner attestation was made. Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: 2022-09-18T13:22:18.123Z. - """ - ip: NotRequired[str] - """ - The IP address from which the beneficial owner attestation was made. - """ - user_agent: NotRequired[str] - """ - The user agent of the browser from which the beneficial owner attestation was made. - """ - - class CreateParamsIdentityAttestationsPersonsProvided(TypedDict): - directors: NotRequired[bool] - """ - Whether the company's directors have been provided. Set this Boolean to true after creating all the company's directors with the [Persons API](https://docs.stripe.com/api/v2/core/accounts/createperson). - """ - executives: NotRequired[bool] - """ - Whether the company's executives have been provided. Set this Boolean to true after creating all the company's executives with the [Persons API](https://docs.stripe.com/api/v2/core/accounts/createperson). - """ - owners: NotRequired[bool] - """ - Whether the company's owners have been provided. Set this Boolean to true after creating all the company's owners with the [Persons API](https://docs.stripe.com/api/v2/core/accounts/createperson). - """ - ownership_exemption_reason: NotRequired[ - Literal[ - "qualified_entity_exceeds_ownership_threshold", - "qualifies_as_financial_institution", - ] - ] - """ - Reason for why the company is exempt from providing ownership information. - """ - - class CreateParamsIdentityAttestationsTermsOfService(TypedDict): - account: NotRequired[ - "AccountService.CreateParamsIdentityAttestationsTermsOfServiceAccount" - ] - """ - Details on the Account's acceptance of the [Stripe Services Agreement](https://docs.stripe.com/connect/updating-accounts#tos-acceptance). - """ - storer: NotRequired[ - "AccountService.CreateParamsIdentityAttestationsTermsOfServiceStorer" - ] - """ - Details on the Account's acceptance of Treasury-specific terms of service. - """ - - class CreateParamsIdentityAttestationsTermsOfServiceAccount(TypedDict): - date: str - """ - The time when the Account's representative accepted the terms of service. Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: 2022-09-18T13:22:18.123Z. - """ - ip: str - """ - The IP address from which the Account's representative accepted the terms of service. - """ - user_agent: NotRequired[str] - """ - The user agent of the browser from which the Account's representative accepted the terms of service. - """ - - class CreateParamsIdentityAttestationsTermsOfServiceStorer(TypedDict): - date: str - """ - The time when the Account's representative accepted the terms of service. Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: 2022-09-18T13:22:18.123Z. - """ - ip: str - """ - The IP address from which the Account's representative accepted the terms of service. - """ - user_agent: NotRequired[str] - """ - The user agent of the browser from which the Account's representative accepted the terms of service. - """ - - class CreateParamsIdentityBusinessDetails(TypedDict): - address: NotRequired[ - "AccountService.CreateParamsIdentityBusinessDetailsAddress" - ] - """ - The business registration address of the business entity. - """ - annual_revenue: NotRequired[ - "AccountService.CreateParamsIdentityBusinessDetailsAnnualRevenue" - ] - """ - The business gross annual revenue for its preceding fiscal year. - """ - documents: NotRequired[ - "AccountService.CreateParamsIdentityBusinessDetailsDocuments" - ] - """ - A document verifying the business. - """ - estimated_worker_count: NotRequired[int] - """ - An estimated upper bound of employees, contractors, vendors, etc. currently working for the business. - """ - id_numbers: NotRequired[ - List["AccountService.CreateParamsIdentityBusinessDetailsIdNumber"] - ] - """ - The ID numbers of a business entity. - """ - monthly_estimated_revenue: NotRequired[ - "AccountService.CreateParamsIdentityBusinessDetailsMonthlyEstimatedRevenue" - ] - """ - An estimate of the monthly revenue of the business. - """ - phone: NotRequired[str] - """ - The phone number of the Business Entity. - """ - registered_name: NotRequired[str] - """ - The business legal name. - """ - script_addresses: NotRequired[ - "AccountService.CreateParamsIdentityBusinessDetailsScriptAddresses" - ] - """ - The business registration address of the business entity in non latin script. - """ - script_names: NotRequired[ - "AccountService.CreateParamsIdentityBusinessDetailsScriptNames" - ] - """ - The business legal name in non latin script. - """ - structure: NotRequired[ - Literal[ - "cooperative", - "free_zone_establishment", - "free_zone_llc", - "governmental_unit", - "government_instrumentality", - "incorporated_association", - "incorporated_non_profit", - "incorporated_partnership", - "limited_liability_partnership", - "llc", - "multi_member_llc", - "private_company", - "private_corporation", - "private_partnership", - "public_company", - "public_corporation", - "public_listed_corporation", - "public_partnership", - "registered_charity", - "single_member_llc", - "sole_establishment", - "sole_proprietorship", - "tax_exempt_government_instrumentality", - "trust", - "unincorporated_association", - "unincorporated_non_profit", - "unincorporated_partnership", - ] - ] - """ - The category identifying the legal structure of the business. - """ - - class CreateParamsIdentityBusinessDetailsAddress(TypedDict): - city: NotRequired[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[str] - """ - Address line 1 (e.g., street, PO Box, or company name). - """ - line2: NotRequired[str] - """ - Address line 2 (e.g., apartment, suite, unit, or building). - """ - postal_code: NotRequired[str] - """ - ZIP or postal code. - """ - state: NotRequired[str] - """ - State, county, province, or region. - """ - town: NotRequired[str] - """ - Town or cho-me. - """ - - class CreateParamsIdentityBusinessDetailsAnnualRevenue(TypedDict): - amount: NotRequired[AmountParam] - """ - A non-negative integer representing the amount in the smallest currency unit. - """ - fiscal_year_end: NotRequired[str] - """ - The close-out date of the preceding fiscal year in ISO 8601 format. E.g. 2023-12-31 for the 31st of December, 2023. - """ - - class CreateParamsIdentityBusinessDetailsDocuments(TypedDict): - bank_account_ownership_verification: NotRequired[ - "AccountService.CreateParamsIdentityBusinessDetailsDocumentsBankAccountOwnershipVerification" - ] - """ - One or more documents that support the bank account ownership verification requirement. Must be a document associated with the account's primary active bank account that displays the last 4 digits of the account number, either a statement or a check. - """ - company_license: NotRequired[ - "AccountService.CreateParamsIdentityBusinessDetailsDocumentsCompanyLicense" - ] - """ - One or more documents that demonstrate proof of a company's license to operate. - """ - company_memorandum_of_association: NotRequired[ - "AccountService.CreateParamsIdentityBusinessDetailsDocumentsCompanyMemorandumOfAssociation" - ] - """ - One or more documents showing the company's Memorandum of Association. - """ - company_ministerial_decree: NotRequired[ - "AccountService.CreateParamsIdentityBusinessDetailsDocumentsCompanyMinisterialDecree" - ] - """ - Certain countries only: One or more documents showing the ministerial decree legalizing the company's establishment. - """ - company_registration_verification: NotRequired[ - "AccountService.CreateParamsIdentityBusinessDetailsDocumentsCompanyRegistrationVerification" - ] - """ - One or more documents that demonstrate proof of a company's registration with the appropriate local authorities. - """ - company_tax_id_verification: NotRequired[ - "AccountService.CreateParamsIdentityBusinessDetailsDocumentsCompanyTaxIdVerification" - ] - """ - One or more documents that demonstrate proof of a company's tax ID. - """ - primary_verification: NotRequired[ - "AccountService.CreateParamsIdentityBusinessDetailsDocumentsPrimaryVerification" - ] - """ - A document verifying the business. - """ - proof_of_address: NotRequired[ - "AccountService.CreateParamsIdentityBusinessDetailsDocumentsProofOfAddress" - ] - """ - One or more documents that demonstrate proof of address. - """ - proof_of_registration: NotRequired[ - "AccountService.CreateParamsIdentityBusinessDetailsDocumentsProofOfRegistration" - ] - """ - One or more documents showing the company's proof of registration with the national business registry. - """ - proof_of_ultimate_beneficial_ownership: NotRequired[ - "AccountService.CreateParamsIdentityBusinessDetailsDocumentsProofOfUltimateBeneficialOwnership" - ] - """ - One or more documents that demonstrate proof of ultimate beneficial ownership. - """ - - class CreateParamsIdentityBusinessDetailsDocumentsBankAccountOwnershipVerification( - TypedDict, - ): - files: List[str] - """ - One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. - """ - type: Literal["files"] - """ - The format of the document. Currently supports `files` only. - """ - - class CreateParamsIdentityBusinessDetailsDocumentsCompanyLicense( - TypedDict - ): - files: List[str] - """ - One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. - """ - type: Literal["files"] - """ - The format of the document. Currently supports `files` only. - """ - - class CreateParamsIdentityBusinessDetailsDocumentsCompanyMemorandumOfAssociation( - TypedDict, - ): - files: List[str] - """ - One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. - """ - type: Literal["files"] - """ - The format of the document. Currently supports `files` only. - """ - - class CreateParamsIdentityBusinessDetailsDocumentsCompanyMinisterialDecree( - TypedDict, - ): - files: List[str] - """ - One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. - """ - type: Literal["files"] - """ - The format of the document. Currently supports `files` only. - """ - - class CreateParamsIdentityBusinessDetailsDocumentsCompanyRegistrationVerification( - TypedDict, - ): - files: List[str] - """ - One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. - """ - type: Literal["files"] - """ - The format of the document. Currently supports `files` only. - """ - - class CreateParamsIdentityBusinessDetailsDocumentsCompanyTaxIdVerification( - TypedDict, - ): - files: List[str] - """ - One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. - """ - type: Literal["files"] - """ - The format of the document. Currently supports `files` only. - """ - - class CreateParamsIdentityBusinessDetailsDocumentsPrimaryVerification( - TypedDict, - ): - front_back: "AccountService.CreateParamsIdentityBusinessDetailsDocumentsPrimaryVerificationFrontBack" - """ - The [file upload](https://docs.stripe.com/api/persons/update#create_file) tokens referring to each side of the document. - """ - type: Literal["front_back"] - """ - The format of the verification document. Currently supports `front_back` only. - """ - - class CreateParamsIdentityBusinessDetailsDocumentsPrimaryVerificationFrontBack( - TypedDict, - ): - back: NotRequired[str] - """ - A [file upload](https://docs.stripe.com/api/persons/update#create_file) token representing the back of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. - """ - front: str - """ - A [file upload](https://docs.stripe.com/api/persons/update#create_file) token representing the front of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. - """ - - class CreateParamsIdentityBusinessDetailsDocumentsProofOfAddress( - TypedDict - ): - files: List[str] - """ - One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. - """ - type: Literal["files"] - """ - The format of the document. Currently supports `files` only. - """ - - class CreateParamsIdentityBusinessDetailsDocumentsProofOfRegistration( - TypedDict, - ): - files: List[str] - """ - One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. - """ - type: Literal["files"] - """ - The format of the document. Currently supports `files` only. - """ - - class CreateParamsIdentityBusinessDetailsDocumentsProofOfUltimateBeneficialOwnership( - TypedDict, - ): - files: List[str] - """ - One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. - """ - type: Literal["files"] - """ - The format of the document. Currently supports `files` only. - """ - - class CreateParamsIdentityBusinessDetailsIdNumber(TypedDict): - registrar: NotRequired[str] - """ - The registrar of the ID number (Only valid for DE ID number types). - """ - type: Literal[ - "ae_crn", - "ae_vat", - "ao_nif", - "at_fn", - "au_abn", - "au_acn", - "au_in", - "az_tin", - "bd_etin", - "be_cbe", - "bg_uic", - "br_cnpj", - "ca_cn", - "ca_crarr", - "ca_neq", - "ca_rid", - "ch_chid", - "ch_uid", - "cr_cpj", - "cr_nite", - "cy_tic", - "cz_ico", - "de_hrn", - "de_vat", - "dk_cvr", - "do_rcn", - "ee_rk", - "es_cif", - "fi_yt", - "fr_siren", - "fr_vat", - "gb_crn", - "gi_crn", - "gr_gemi", - "gt_nit", - "hk_br", - "hk_cr", - "hk_mbs", - "hu_cjs", - "ie_crn", - "it_rea", - "it_vat", - "jp_cn", - "kz_bin", - "li_uid", - "lt_ccrn", - "lu_rcs", - "lv_urn", - "mt_crn", - "mx_rfc", - "my_brn", - "my_coid", - "my_sst", - "mz_nuit", - "nl_kvk", - "no_orgnr", - "nz_bn", - "pe_ruc", - "pk_ntn", - "pl_regon", - "pt_vat", - "ro_cui", - "sa_crn", - "sa_tin", - "se_orgnr", - "sg_uen", - "si_msp", - "sk_ico", - "th_crn", - "th_prn", - "th_tin", - "us_ein", - ] - """ - Open Enum. The ID number type of a business entity. - """ - value: str - """ - The value of the ID number. - """ - - class CreateParamsIdentityBusinessDetailsMonthlyEstimatedRevenue( - TypedDict - ): - amount: NotRequired[AmountParam] - """ - A non-negative integer representing the amount in the smallest currency unit. - """ - - class CreateParamsIdentityBusinessDetailsScriptAddresses(TypedDict): - kana: NotRequired[ - "AccountService.CreateParamsIdentityBusinessDetailsScriptAddressesKana" - ] - """ - Kana Address. - """ - kanji: NotRequired[ - "AccountService.CreateParamsIdentityBusinessDetailsScriptAddressesKanji" - ] - """ - Kanji Address. - """ - - class CreateParamsIdentityBusinessDetailsScriptAddressesKana(TypedDict): - city: NotRequired[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[str] - """ - Address line 1 (e.g., street, PO Box, or company name). - """ - line2: NotRequired[str] - """ - Address line 2 (e.g., apartment, suite, unit, or building). - """ - postal_code: NotRequired[str] - """ - ZIP or postal code. - """ - state: NotRequired[str] - """ - State, county, province, or region. - """ - town: NotRequired[str] - """ - Town or cho-me. - """ - - class CreateParamsIdentityBusinessDetailsScriptAddressesKanji(TypedDict): - city: NotRequired[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[str] - """ - Address line 1 (e.g., street, PO Box, or company name). - """ - line2: NotRequired[str] - """ - Address line 2 (e.g., apartment, suite, unit, or building). - """ - postal_code: NotRequired[str] - """ - ZIP or postal code. - """ - state: NotRequired[str] - """ - State, county, province, or region. - """ - town: NotRequired[str] - """ - Town or cho-me. - """ - - class CreateParamsIdentityBusinessDetailsScriptNames(TypedDict): - kana: NotRequired[ - "AccountService.CreateParamsIdentityBusinessDetailsScriptNamesKana" - ] - """ - Kana name. - """ - kanji: NotRequired[ - "AccountService.CreateParamsIdentityBusinessDetailsScriptNamesKanji" - ] - """ - Kanji name. - """ - - class CreateParamsIdentityBusinessDetailsScriptNamesKana(TypedDict): - registered_name: NotRequired[str] - """ - Registered name of the business. - """ - - class CreateParamsIdentityBusinessDetailsScriptNamesKanji(TypedDict): - registered_name: NotRequired[str] - """ - Registered name of the business. - """ - - class CreateParamsIdentityIndividual(TypedDict): - additional_addresses: NotRequired[ - List[ - "AccountService.CreateParamsIdentityIndividualAdditionalAddress" - ] - ] - """ - Additional addresses associated with the individual. - """ - additional_names: NotRequired[ - List["AccountService.CreateParamsIdentityIndividualAdditionalName"] - ] - """ - Additional names (e.g. aliases) associated with the individual. - """ - address: NotRequired[ - "AccountService.CreateParamsIdentityIndividualAddress" - ] - """ - The individual's residential address. - """ - date_of_birth: NotRequired[ - "AccountService.CreateParamsIdentityIndividualDateOfBirth" - ] - """ - The individual's date of birth. - """ - documents: NotRequired[ - "AccountService.CreateParamsIdentityIndividualDocuments" - ] - """ - Documents that may be submitted to satisfy various informational requests. - """ - email: NotRequired[str] - """ - The individual's email address. - """ - given_name: NotRequired[str] - """ - The individual's first name. - """ - id_numbers: NotRequired[ - List["AccountService.CreateParamsIdentityIndividualIdNumber"] - ] - """ - The identification numbers (e.g., SSN) associated with the individual. - """ - legal_gender: NotRequired[Literal["female", "male"]] - """ - The individual's gender (International regulations require either "male" or "female"). - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. - """ - nationalities: NotRequired[List[str]] - """ - The countries where the individual is a national. Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - """ - phone: NotRequired[str] - """ - The individual's phone number. - """ - political_exposure: NotRequired[Literal["existing", "none"]] - """ - The individual's political exposure. - """ - relationship: NotRequired[ - "AccountService.CreateParamsIdentityIndividualRelationship" - ] - """ - The relationship that this individual has with the account's identity. - """ - script_addresses: NotRequired[ - "AccountService.CreateParamsIdentityIndividualScriptAddresses" - ] - """ - The script addresses (e.g., non-Latin characters) associated with the individual. - """ - script_names: NotRequired[ - "AccountService.CreateParamsIdentityIndividualScriptNames" - ] - """ - The individuals primary name in non latin script. - """ - surname: NotRequired[str] - """ - The individual's last name. - """ - - class CreateParamsIdentityIndividualAdditionalAddress(TypedDict): - city: NotRequired[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[str] - """ - Address line 1 (e.g., street, PO Box, or company name). - """ - line2: NotRequired[str] - """ - Address line 2 (e.g., apartment, suite, unit, or building). - """ - postal_code: NotRequired[str] - """ - ZIP or postal code. - """ - purpose: Literal["registered"] - """ - Purpose of additional address. - """ - state: NotRequired[str] - """ - State, county, province, or region. - """ - town: NotRequired[str] - """ - Town or cho-me. - """ - - class CreateParamsIdentityIndividualAdditionalName(TypedDict): - full_name: NotRequired[str] - """ - The person's full name. - """ - given_name: NotRequired[str] - """ - The person's first or given name. - """ - purpose: Literal["alias", "maiden"] - """ - The purpose or type of the additional name. - """ - surname: NotRequired[str] - """ - The person's last or family name. - """ - - class CreateParamsIdentityIndividualAddress(TypedDict): - city: NotRequired[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[str] - """ - Address line 1 (e.g., street, PO Box, or company name). - """ - line2: NotRequired[str] - """ - Address line 2 (e.g., apartment, suite, unit, or building). - """ - postal_code: NotRequired[str] - """ - ZIP or postal code. - """ - state: NotRequired[str] - """ - State, county, province, or region. - """ - town: NotRequired[str] - """ - Town or cho-me. - """ - - class CreateParamsIdentityIndividualDateOfBirth(TypedDict): - day: int - """ - The day of birth. - """ - month: int - """ - The month of birth. - """ - year: int - """ - The year of birth. - """ - - class CreateParamsIdentityIndividualDocuments(TypedDict): - company_authorization: NotRequired[ - "AccountService.CreateParamsIdentityIndividualDocumentsCompanyAuthorization" - ] - """ - One or more documents that demonstrate proof that this person is authorized to represent the company. - """ - passport: NotRequired[ - "AccountService.CreateParamsIdentityIndividualDocumentsPassport" - ] - """ - One or more documents showing the person's passport page with photo and personal data. - """ - primary_verification: NotRequired[ - "AccountService.CreateParamsIdentityIndividualDocumentsPrimaryVerification" - ] - """ - An identifying document showing the person's name, either a passport or local ID card. - """ - secondary_verification: NotRequired[ - "AccountService.CreateParamsIdentityIndividualDocumentsSecondaryVerification" - ] - """ - A document showing address, either a passport, local ID card, or utility bill from a well-known utility company. - """ - visa: NotRequired[ - "AccountService.CreateParamsIdentityIndividualDocumentsVisa" - ] - """ - One or more documents showing the person's visa required for living in the country where they are residing. - """ - - class CreateParamsIdentityIndividualDocumentsCompanyAuthorization( - TypedDict, - ): - files: List[str] - """ - One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. - """ - type: Literal["files"] - """ - The format of the document. Currently supports `files` only. - """ - - class CreateParamsIdentityIndividualDocumentsPassport(TypedDict): - files: List[str] - """ - One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. - """ - type: Literal["files"] - """ - The format of the document. Currently supports `files` only. - """ - - class CreateParamsIdentityIndividualDocumentsPrimaryVerification( - TypedDict - ): - front_back: "AccountService.CreateParamsIdentityIndividualDocumentsPrimaryVerificationFrontBack" - """ - The [file upload](https://docs.stripe.com/api/persons/update#create_file) tokens referring to each side of the document. - """ - type: Literal["front_back"] - """ - The format of the verification document. Currently supports `front_back` only. - """ - - class CreateParamsIdentityIndividualDocumentsPrimaryVerificationFrontBack( - TypedDict, - ): - back: NotRequired[str] - """ - A [file upload](https://docs.stripe.com/api/persons/update#create_file) token representing the back of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. - """ - front: str - """ - A [file upload](https://docs.stripe.com/api/persons/update#create_file) token representing the front of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. - """ - - class CreateParamsIdentityIndividualDocumentsSecondaryVerification( - TypedDict, - ): - front_back: "AccountService.CreateParamsIdentityIndividualDocumentsSecondaryVerificationFrontBack" - """ - The [file upload](https://docs.stripe.com/api/persons/update#create_file) tokens referring to each side of the document. - """ - type: Literal["front_back"] - """ - The format of the verification document. Currently supports `front_back` only. - """ - - class CreateParamsIdentityIndividualDocumentsSecondaryVerificationFrontBack( - TypedDict, - ): - back: NotRequired[str] - """ - A [file upload](https://docs.stripe.com/api/persons/update#create_file) token representing the back of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. - """ - front: str - """ - A [file upload](https://docs.stripe.com/api/persons/update#create_file) token representing the front of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. - """ - - class CreateParamsIdentityIndividualDocumentsVisa(TypedDict): - files: List[str] - """ - One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. - """ - type: Literal["files"] - """ - The format of the document. Currently supports `files` only. - """ - - class CreateParamsIdentityIndividualIdNumber(TypedDict): - type: Literal[ - "ae_eid", - "ao_nif", - "az_tin", - "bd_brc", - "bd_etin", - "bd_nid", - "br_cpf", - "cr_cpf", - "cr_dimex", - "cr_nite", - "de_stn", - "do_rcn", - "gt_nit", - "hk_id", - "kz_iin", - "mx_rfc", - "my_nric", - "mz_nuit", - "nl_bsn", - "pe_dni", - "pk_cnic", - "pk_snic", - "sa_tin", - "sg_fin", - "sg_nric", - "th_lc", - "th_pin", - "us_itin", - "us_itin_last_4", - "us_ssn", - "us_ssn_last_4", - ] - """ - The ID number type of an individual. - """ - value: str - """ - The value of the ID number. - """ - - class CreateParamsIdentityIndividualRelationship(TypedDict): - director: NotRequired[bool] - """ - Whether the person is a director of the account's identity. Directors are typically members of the governing board of the company, or responsible for ensuring the company meets its regulatory obligations. - """ - executive: NotRequired[bool] - """ - Whether the person has significant responsibility to control, manage, or direct the organization. - """ - owner: NotRequired[bool] - """ - Whether the person is an owner of the account's identity. - """ - percent_ownership: NotRequired[str] - """ - The percent owned by the person of the account's legal entity. - """ - title: NotRequired[str] - """ - The person's title (e.g., CEO, Support Engineer). - """ - - class CreateParamsIdentityIndividualScriptAddresses(TypedDict): - kana: NotRequired[ - "AccountService.CreateParamsIdentityIndividualScriptAddressesKana" - ] - """ - Kana Address. - """ - kanji: NotRequired[ - "AccountService.CreateParamsIdentityIndividualScriptAddressesKanji" - ] - """ - Kanji Address. - """ - - class CreateParamsIdentityIndividualScriptAddressesKana(TypedDict): - city: NotRequired[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[str] - """ - Address line 1 (e.g., street, PO Box, or company name). - """ - line2: NotRequired[str] - """ - Address line 2 (e.g., apartment, suite, unit, or building). - """ - postal_code: NotRequired[str] - """ - ZIP or postal code. - """ - state: NotRequired[str] - """ - State, county, province, or region. - """ - town: NotRequired[str] - """ - Town or cho-me. - """ - - class CreateParamsIdentityIndividualScriptAddressesKanji(TypedDict): - city: NotRequired[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[str] - """ - Address line 1 (e.g., street, PO Box, or company name). - """ - line2: NotRequired[str] - """ - Address line 2 (e.g., apartment, suite, unit, or building). - """ - postal_code: NotRequired[str] - """ - ZIP or postal code. - """ - state: NotRequired[str] - """ - State, county, province, or region. - """ - town: NotRequired[str] - """ - Town or cho-me. - """ - - class CreateParamsIdentityIndividualScriptNames(TypedDict): - kana: NotRequired[ - "AccountService.CreateParamsIdentityIndividualScriptNamesKana" - ] - """ - Persons name in kana script. - """ - kanji: NotRequired[ - "AccountService.CreateParamsIdentityIndividualScriptNamesKanji" - ] - """ - Persons name in kanji script. - """ - - class CreateParamsIdentityIndividualScriptNamesKana(TypedDict): - given_name: NotRequired[str] - """ - The person's first or given name. - """ - surname: NotRequired[str] - """ - The person's last or family name. - """ - - class CreateParamsIdentityIndividualScriptNamesKanji(TypedDict): - given_name: NotRequired[str] - """ - The person's first or given name. - """ - surname: NotRequired[str] - """ - The person's last or family name. - """ - - class ListParams(TypedDict): - applied_configurations: NotRequired[List[str]] - """ - Filter only accounts that have all of the configurations specified. If omitted, returns all accounts regardless of which configurations they have. - """ - limit: NotRequired[int] - """ - The upper limit on the number of accounts returned by the List Account request. - """ - - class RetrieveParams(TypedDict): - include: NotRequired[ - List[ - Literal[ - "configuration.customer", - "configuration.merchant", - "configuration.recipient", - "configuration.storer", - "defaults", - "identity", - "requirements", - ] - ] - ] - """ - Additional fields to include in the response. - """ - - class UpdateParams(TypedDict): - configuration: NotRequired["AccountService.UpdateParamsConfiguration"] - """ - An Account Configuration which allows the Account to take on a key persona across Stripe products. - """ - contact_email: NotRequired[str] - """ - The default contact email address for the Account. Required when configuring the account as a merchant or recipient. - """ - dashboard: NotRequired[Literal["express", "full", "none"]] - """ - A value indicating the Stripe dashboard this Account has access to. This will depend on which configurations are enabled for this account. - """ - defaults: NotRequired["AccountService.UpdateParamsDefaults"] - """ - Default values to be used on Account Configurations. - """ - display_name: NotRequired[str] - """ - A descriptive name for the Account. This name will be surfaced in the Stripe Dashboard and on any invoices sent to the Account. - """ - identity: NotRequired["AccountService.UpdateParamsIdentity"] - """ - Information about the company, individual, and business represented by the Account. - """ - include: NotRequired[ - List[ - Literal[ - "configuration.customer", - "configuration.merchant", - "configuration.recipient", - "configuration.storer", - "defaults", - "identity", - "requirements", - ] - ] - ] - """ - Additional fields to include in the response. - """ - metadata: NotRequired[Dict[str, Optional[str]]] - """ - Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. - """ - - class UpdateParamsConfiguration(TypedDict): - customer: NotRequired[ - "AccountService.UpdateParamsConfigurationCustomer" - ] - """ - The Customer Configuration allows the Account to be charged. - """ - merchant: NotRequired[ - "AccountService.UpdateParamsConfigurationMerchant" - ] - """ - The Merchant configuration allows the Account to act as a connected account and collect payments facilitated by a Connect platform. You can add this configuration to your connected accounts only if you've completed onboarding as a Connect platform. - """ - recipient: NotRequired[ - "AccountService.UpdateParamsConfigurationRecipient" - ] - """ - The Recipient Configuration allows the Account to receive funds. - """ - storer: NotRequired["AccountService.UpdateParamsConfigurationStorer"] - """ - The Storer Configuration allows the Account to store and move funds using stored-value FinancialAccounts. - """ - - class UpdateParamsConfigurationCustomer(TypedDict): - applied: NotRequired[bool] - """ - Represents the state of the configuration, and can be updated to deactivate or re-apply a configuration. - """ - automatic_indirect_tax: NotRequired[ - "AccountService.UpdateParamsConfigurationCustomerAutomaticIndirectTax" - ] - """ - Automatic indirect tax settings to be used when automatic tax calculation is enabled on the customer's invoices, subscriptions, checkout sessions, or payment links. Surfaces if automatic tax calculation is possible given the current customer location information. - """ - billing: NotRequired[ - "AccountService.UpdateParamsConfigurationCustomerBilling" - ] - """ - Billing settings - default settings used for this customer in Billing flows such as Invoices and Subscriptions. - """ - capabilities: NotRequired[ - "AccountService.UpdateParamsConfigurationCustomerCapabilities" - ] - """ - Capabilities that have been requested on the Customer Configuration. - """ - shipping: NotRequired[ - "AccountService.UpdateParamsConfigurationCustomerShipping" - ] - """ - The customer's shipping information. Appears on invoices emailed to this customer. - """ - test_clock: NotRequired[str] - """ - ID of the test clock to attach to the customer. Can only be set on testmode Accounts, and when the Customer Configuration is first set on an Account. - """ - - class UpdateParamsConfigurationCustomerAutomaticIndirectTax(TypedDict): - exempt: NotRequired[Literal["exempt", "none", "reverse"]] - """ - Describes the customer's tax exemption status, which is `none`, `exempt`, or `reverse`. When set to reverse, invoice and receipt PDFs include the following text: “Reverse charge”. - """ - ip_address: NotRequired[str] - """ - A recent IP address of the customer used for tax reporting and tax location inference. - """ - location_source: NotRequired[ - Literal["identity_address", "ip_address", "shipping_address"] - ] - """ - The data source used to identify the customer's tax location - defaults to 'identity_address'. Will only be used for automatic tax calculation on the customer's Invoices and Subscriptions. - """ - validate_location: NotRequired[ - Literal["auto", "deferred", "immediately"] - ] - """ - A per-request flag that indicates when Stripe should validate the customer tax location - defaults to 'auto'. - """ - - class UpdateParamsConfigurationCustomerBilling(TypedDict): - default_payment_method: NotRequired[str] - """ - ID of a payment method that's attached to the customer, to be used as the customer's default payment method for invoices and subscriptions. - """ - invoice: NotRequired[ - "AccountService.UpdateParamsConfigurationCustomerBillingInvoice" - ] - """ - Default settings used on invoices for this customer. - """ - - class UpdateParamsConfigurationCustomerBillingInvoice(TypedDict): - custom_fields: NotRequired[ - List[ - "AccountService.UpdateParamsConfigurationCustomerBillingInvoiceCustomField" - ] - ] - """ - The list of up to 4 default custom fields to be displayed on invoices for this customer. - """ - footer: NotRequired[str] - """ - Default footer to be displayed on invoices for this customer. - """ - next_sequence: NotRequired[int] - """ - The sequence to be used on the customer's next invoice. Defaults to 1. - """ - prefix: NotRequired[str] - """ - The prefix for the customer used to generate unique invoice numbers. Must be 3–12 uppercase letters or numbers. - """ - rendering: NotRequired[ - "AccountService.UpdateParamsConfigurationCustomerBillingInvoiceRendering" - ] - """ - Default options for invoice PDF rendering for this customer. - """ - - class UpdateParamsConfigurationCustomerBillingInvoiceCustomField( - TypedDict - ): - name: str - """ - The name of the custom field. This may be up to 40 characters. - """ - value: str - """ - The value of the custom field. This may be up to 140 characters. When updating, pass an empty string to remove previously-defined values. - """ - - class UpdateParamsConfigurationCustomerBillingInvoiceRendering(TypedDict): - amount_tax_display: NotRequired[ - Literal["exclude_tax", "include_inclusive_tax"] - ] - """ - How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One of exclude_tax or include_inclusive_tax. include_inclusive_tax will include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. exclude_tax will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts. - """ - template: NotRequired[str] - """ - ID of the invoice rendering template to use for future invoices. - """ - - class UpdateParamsConfigurationCustomerCapabilities(TypedDict): - automatic_indirect_tax: NotRequired[ - "AccountService.UpdateParamsConfigurationCustomerCapabilitiesAutomaticIndirectTax" - ] - """ - Generates requirements for enabling automatic indirect tax calculation on this customer's invoices or subscriptions. Recommended to request this capability if planning to enable automatic tax calculation on this customer's invoices or subscriptions. Uses the `location_source` field. - """ - - class UpdateParamsConfigurationCustomerCapabilitiesAutomaticIndirectTax( - TypedDict, - ): - requested: NotRequired[bool] - """ - To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. - """ - - class UpdateParamsConfigurationCustomerShipping(TypedDict): - address: NotRequired[ - "AccountService.UpdateParamsConfigurationCustomerShippingAddress" - ] - """ - Customer shipping address. - """ - name: NotRequired[str] - """ - Customer name. - """ - phone: NotRequired[str] - """ - Customer phone (including extension). - """ - - class UpdateParamsConfigurationCustomerShippingAddress(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 (e.g., street, PO Box, or company name). - """ - line2: NotRequired[str] - """ - Address line 2 (e.g., apartment, suite, unit, or building). - """ - postal_code: NotRequired[str] - """ - ZIP or postal code. - """ - state: NotRequired[str] - """ - State, county, province, or region. - """ - - class UpdateParamsConfigurationMerchant(TypedDict): - applied: NotRequired[bool] - """ - Represents the state of the configuration, and can be updated to deactivate or re-apply a configuration. - """ - bacs_debit_payments: NotRequired[ - "AccountService.UpdateParamsConfigurationMerchantBacsDebitPayments" - ] - """ - Settings used for Bacs debit payments. - """ - branding: NotRequired[ - "AccountService.UpdateParamsConfigurationMerchantBranding" - ] - """ - Settings used to apply the merchant's branding to email receipts, invoices, Checkout, and other products. - """ - capabilities: NotRequired[ - "AccountService.UpdateParamsConfigurationMerchantCapabilities" - ] - """ - Capabilities to request on the Merchant Configuration. - """ - card_payments: NotRequired[ - "AccountService.UpdateParamsConfigurationMerchantCardPayments" - ] - """ - Card payments settings. - """ - mcc: NotRequired[str] - """ - The merchant category code for the merchant. MCCs are used to classify businesses based on the goods or services they provide. - """ - statement_descriptor: NotRequired[ - "AccountService.UpdateParamsConfigurationMerchantStatementDescriptor" - ] - """ - Statement descriptor. - """ - support: NotRequired[ - "AccountService.UpdateParamsConfigurationMerchantSupport" - ] - """ - Publicly available contact information for sending support issues to. - """ - - class UpdateParamsConfigurationMerchantBacsDebitPayments(TypedDict): - display_name: NotRequired[str] - """ - Display name for Bacs debit payments. - """ - - class UpdateParamsConfigurationMerchantBranding(TypedDict): - icon: NotRequired[str] - """ - ID of a [file upload](https://docs.stripe.com/api/persons/update#create_file): An icon for the merchant. Must be square and at least 128px x 128px. - """ - logo: NotRequired[str] - """ - ID of a [file upload](https://docs.stripe.com/api/persons/update#create_file): A logo for the merchant that will be used in Checkout instead of the icon and without the merchant's name next to it if provided. Must be at least 128px x 128px. - """ - primary_color: NotRequired[str] - """ - A CSS hex color value representing the primary branding color for the merchant. - """ - secondary_color: NotRequired[str] - """ - A CSS hex color value representing the secondary branding color for the merchant. - """ - - class UpdateParamsConfigurationMerchantCapabilities(TypedDict): - ach_debit_payments: NotRequired[ - "AccountService.UpdateParamsConfigurationMerchantCapabilitiesAchDebitPayments" - ] - """ - Allow the merchant to process ACH debit payments. - """ - acss_debit_payments: NotRequired[ - "AccountService.UpdateParamsConfigurationMerchantCapabilitiesAcssDebitPayments" - ] - """ - Allow the merchant to process ACSS debit payments. - """ - affirm_payments: NotRequired[ - "AccountService.UpdateParamsConfigurationMerchantCapabilitiesAffirmPayments" - ] - """ - Allow the merchant to process Affirm payments. - """ - afterpay_clearpay_payments: NotRequired[ - "AccountService.UpdateParamsConfigurationMerchantCapabilitiesAfterpayClearpayPayments" - ] - """ - Allow the merchant to process Afterpay/Clearpay payments. - """ - alma_payments: NotRequired[ - "AccountService.UpdateParamsConfigurationMerchantCapabilitiesAlmaPayments" - ] - """ - Allow the merchant to process Alma payments. - """ - amazon_pay_payments: NotRequired[ - "AccountService.UpdateParamsConfigurationMerchantCapabilitiesAmazonPayPayments" - ] - """ - Allow the merchant to process Amazon Pay payments. - """ - au_becs_debit_payments: NotRequired[ - "AccountService.UpdateParamsConfigurationMerchantCapabilitiesAuBecsDebitPayments" - ] - """ - Allow the merchant to process Australian BECS Direct Debit payments. - """ - bacs_debit_payments: NotRequired[ - "AccountService.UpdateParamsConfigurationMerchantCapabilitiesBacsDebitPayments" - ] - """ - Allow the merchant to process BACS Direct Debit payments. - """ - bancontact_payments: NotRequired[ - "AccountService.UpdateParamsConfigurationMerchantCapabilitiesBancontactPayments" - ] - """ - Allow the merchant to process Bancontact payments. - """ - blik_payments: NotRequired[ - "AccountService.UpdateParamsConfigurationMerchantCapabilitiesBlikPayments" - ] - """ - Allow the merchant to process BLIK payments. - """ - boleto_payments: NotRequired[ - "AccountService.UpdateParamsConfigurationMerchantCapabilitiesBoletoPayments" - ] - """ - Allow the merchant to process Boleto payments. - """ - card_payments: NotRequired[ - "AccountService.UpdateParamsConfigurationMerchantCapabilitiesCardPayments" - ] - """ - Allow the merchant to collect card payments. - """ - cartes_bancaires_payments: NotRequired[ - "AccountService.UpdateParamsConfigurationMerchantCapabilitiesCartesBancairesPayments" - ] - """ - Allow the merchant to process Cartes Bancaires payments. - """ - cashapp_payments: NotRequired[ - "AccountService.UpdateParamsConfigurationMerchantCapabilitiesCashappPayments" - ] - """ - Allow the merchant to process Cash App payments. - """ - eps_payments: NotRequired[ - "AccountService.UpdateParamsConfigurationMerchantCapabilitiesEpsPayments" - ] - """ - Allow the merchant to process EPS payments. - """ - fpx_payments: NotRequired[ - "AccountService.UpdateParamsConfigurationMerchantCapabilitiesFpxPayments" - ] - """ - Allow the merchant to process FPX payments. - """ - gb_bank_transfer_payments: NotRequired[ - "AccountService.UpdateParamsConfigurationMerchantCapabilitiesGbBankTransferPayments" - ] - """ - Allow the merchant to process UK bank transfer payments. - """ - grabpay_payments: NotRequired[ - "AccountService.UpdateParamsConfigurationMerchantCapabilitiesGrabpayPayments" - ] - """ - Allow the merchant to process GrabPay payments. - """ - ideal_payments: NotRequired[ - "AccountService.UpdateParamsConfigurationMerchantCapabilitiesIdealPayments" - ] - """ - Allow the merchant to process iDEAL payments. - """ - jcb_payments: NotRequired[ - "AccountService.UpdateParamsConfigurationMerchantCapabilitiesJcbPayments" - ] - """ - Allow the merchant to process JCB card payments. - """ - jp_bank_transfer_payments: NotRequired[ - "AccountService.UpdateParamsConfigurationMerchantCapabilitiesJpBankTransferPayments" - ] - """ - Allow the merchant to process Japanese bank transfer payments. - """ - kakao_pay_payments: NotRequired[ - "AccountService.UpdateParamsConfigurationMerchantCapabilitiesKakaoPayPayments" - ] - """ - Allow the merchant to process Kakao Pay payments. - """ - klarna_payments: NotRequired[ - "AccountService.UpdateParamsConfigurationMerchantCapabilitiesKlarnaPayments" - ] - """ - Allow the merchant to process Klarna payments. - """ - konbini_payments: NotRequired[ - "AccountService.UpdateParamsConfigurationMerchantCapabilitiesKonbiniPayments" - ] - """ - Allow the merchant to process Konbini convenience store payments. - """ - kr_card_payments: NotRequired[ - "AccountService.UpdateParamsConfigurationMerchantCapabilitiesKrCardPayments" - ] - """ - Allow the merchant to process Korean card payments. - """ - link_payments: NotRequired[ - "AccountService.UpdateParamsConfigurationMerchantCapabilitiesLinkPayments" - ] - """ - Allow the merchant to process Link payments. - """ - mobilepay_payments: NotRequired[ - "AccountService.UpdateParamsConfigurationMerchantCapabilitiesMobilepayPayments" - ] - """ - Allow the merchant to process MobilePay payments. - """ - multibanco_payments: NotRequired[ - "AccountService.UpdateParamsConfigurationMerchantCapabilitiesMultibancoPayments" - ] - """ - Allow the merchant to process Multibanco payments. - """ - mx_bank_transfer_payments: NotRequired[ - "AccountService.UpdateParamsConfigurationMerchantCapabilitiesMxBankTransferPayments" - ] - """ - Allow the merchant to process Mexican bank transfer payments. - """ - naver_pay_payments: NotRequired[ - "AccountService.UpdateParamsConfigurationMerchantCapabilitiesNaverPayPayments" - ] - """ - Allow the merchant to process Naver Pay payments. - """ - oxxo_payments: NotRequired[ - "AccountService.UpdateParamsConfigurationMerchantCapabilitiesOxxoPayments" - ] - """ - Allow the merchant to process OXXO payments. - """ - p24_payments: NotRequired[ - "AccountService.UpdateParamsConfigurationMerchantCapabilitiesP24Payments" - ] - """ - Allow the merchant to process Przelewy24 (P24) payments. - """ - pay_by_bank_payments: NotRequired[ - "AccountService.UpdateParamsConfigurationMerchantCapabilitiesPayByBankPayments" - ] - """ - Allow the merchant to process Pay by Bank payments. - """ - payco_payments: NotRequired[ - "AccountService.UpdateParamsConfigurationMerchantCapabilitiesPaycoPayments" - ] - """ - Allow the merchant to process PAYCO payments. - """ - paynow_payments: NotRequired[ - "AccountService.UpdateParamsConfigurationMerchantCapabilitiesPaynowPayments" - ] - """ - Allow the merchant to process PayNow payments. - """ - promptpay_payments: NotRequired[ - "AccountService.UpdateParamsConfigurationMerchantCapabilitiesPromptpayPayments" - ] - """ - Allow the merchant to process PromptPay payments. - """ - revolut_pay_payments: NotRequired[ - "AccountService.UpdateParamsConfigurationMerchantCapabilitiesRevolutPayPayments" - ] - """ - Allow the merchant to process Revolut Pay payments. - """ - samsung_pay_payments: NotRequired[ - "AccountService.UpdateParamsConfigurationMerchantCapabilitiesSamsungPayPayments" - ] - """ - Allow the merchant to process Samsung Pay payments. - """ - sepa_bank_transfer_payments: NotRequired[ - "AccountService.UpdateParamsConfigurationMerchantCapabilitiesSepaBankTransferPayments" - ] - """ - Allow the merchant to process SEPA bank transfer payments. - """ - sepa_debit_payments: NotRequired[ - "AccountService.UpdateParamsConfigurationMerchantCapabilitiesSepaDebitPayments" - ] - """ - Allow the merchant to process SEPA Direct Debit payments. - """ - swish_payments: NotRequired[ - "AccountService.UpdateParamsConfigurationMerchantCapabilitiesSwishPayments" - ] - """ - Allow the merchant to process Swish payments. - """ - twint_payments: NotRequired[ - "AccountService.UpdateParamsConfigurationMerchantCapabilitiesTwintPayments" - ] - """ - Allow the merchant to process TWINT payments. - """ - us_bank_transfer_payments: NotRequired[ - "AccountService.UpdateParamsConfigurationMerchantCapabilitiesUsBankTransferPayments" - ] - """ - Allow the merchant to process US bank transfer payments. - """ - zip_payments: NotRequired[ - "AccountService.UpdateParamsConfigurationMerchantCapabilitiesZipPayments" - ] - """ - Allow the merchant to process Zip payments. - """ - - class UpdateParamsConfigurationMerchantCapabilitiesAchDebitPayments( - TypedDict, - ): - requested: NotRequired[bool] - """ - To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. - """ - - class UpdateParamsConfigurationMerchantCapabilitiesAcssDebitPayments( - TypedDict, - ): - requested: NotRequired[bool] - """ - To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. - """ - - class UpdateParamsConfigurationMerchantCapabilitiesAffirmPayments( - TypedDict, - ): - requested: NotRequired[bool] - """ - To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. - """ - - class UpdateParamsConfigurationMerchantCapabilitiesAfterpayClearpayPayments( - TypedDict, - ): - requested: NotRequired[bool] - """ - To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. - """ - - class UpdateParamsConfigurationMerchantCapabilitiesAlmaPayments(TypedDict): - requested: NotRequired[bool] - """ - To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. - """ - - class UpdateParamsConfigurationMerchantCapabilitiesAmazonPayPayments( - TypedDict, - ): - requested: NotRequired[bool] - """ - To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. - """ - - class UpdateParamsConfigurationMerchantCapabilitiesAuBecsDebitPayments( - TypedDict, - ): - requested: NotRequired[bool] - """ - To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. - """ - - class UpdateParamsConfigurationMerchantCapabilitiesBacsDebitPayments( - TypedDict, - ): - requested: NotRequired[bool] - """ - To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. - """ - - class UpdateParamsConfigurationMerchantCapabilitiesBancontactPayments( - TypedDict, - ): - requested: NotRequired[bool] - """ - To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. - """ - - class UpdateParamsConfigurationMerchantCapabilitiesBlikPayments(TypedDict): - requested: NotRequired[bool] - """ - To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. - """ - - class UpdateParamsConfigurationMerchantCapabilitiesBoletoPayments( - TypedDict, - ): - requested: NotRequired[bool] - """ - To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. - """ - - class UpdateParamsConfigurationMerchantCapabilitiesCardPayments(TypedDict): - requested: NotRequired[bool] - """ - To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. - """ - - class UpdateParamsConfigurationMerchantCapabilitiesCartesBancairesPayments( - TypedDict, - ): - requested: NotRequired[bool] - """ - To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. - """ - - class UpdateParamsConfigurationMerchantCapabilitiesCashappPayments( - TypedDict, - ): - requested: NotRequired[bool] - """ - To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. - """ - - class UpdateParamsConfigurationMerchantCapabilitiesEpsPayments(TypedDict): - requested: NotRequired[bool] - """ - To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. - """ - - class UpdateParamsConfigurationMerchantCapabilitiesFpxPayments(TypedDict): - requested: NotRequired[bool] - """ - To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. - """ - - class UpdateParamsConfigurationMerchantCapabilitiesGbBankTransferPayments( - TypedDict, - ): - requested: NotRequired[bool] - """ - To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. - """ - - class UpdateParamsConfigurationMerchantCapabilitiesGrabpayPayments( - TypedDict, - ): - requested: NotRequired[bool] - """ - To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. - """ - - class UpdateParamsConfigurationMerchantCapabilitiesIdealPayments( - TypedDict - ): - requested: NotRequired[bool] - """ - To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. - """ - - class UpdateParamsConfigurationMerchantCapabilitiesJcbPayments(TypedDict): - requested: NotRequired[bool] - """ - To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. - """ - - class UpdateParamsConfigurationMerchantCapabilitiesJpBankTransferPayments( - TypedDict, - ): - requested: NotRequired[bool] - """ - To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. - """ - - class UpdateParamsConfigurationMerchantCapabilitiesKakaoPayPayments( - TypedDict, - ): - requested: NotRequired[bool] - """ - To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. - """ - - class UpdateParamsConfigurationMerchantCapabilitiesKlarnaPayments( - TypedDict, - ): - requested: NotRequired[bool] - """ - To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. - """ - - class UpdateParamsConfigurationMerchantCapabilitiesKonbiniPayments( - TypedDict, - ): - requested: NotRequired[bool] - """ - To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. - """ - - class UpdateParamsConfigurationMerchantCapabilitiesKrCardPayments( - TypedDict, - ): - requested: NotRequired[bool] - """ - To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. - """ - - class UpdateParamsConfigurationMerchantCapabilitiesLinkPayments(TypedDict): - requested: NotRequired[bool] - """ - To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. - """ - - class UpdateParamsConfigurationMerchantCapabilitiesMobilepayPayments( - TypedDict, - ): - requested: NotRequired[bool] - """ - To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. - """ - - class UpdateParamsConfigurationMerchantCapabilitiesMultibancoPayments( - TypedDict, - ): - requested: NotRequired[bool] - """ - To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. - """ - - class UpdateParamsConfigurationMerchantCapabilitiesMxBankTransferPayments( - TypedDict, - ): - requested: NotRequired[bool] - """ - To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. - """ - - class UpdateParamsConfigurationMerchantCapabilitiesNaverPayPayments( - TypedDict, - ): - requested: NotRequired[bool] - """ - To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. - """ - - class UpdateParamsConfigurationMerchantCapabilitiesOxxoPayments(TypedDict): - requested: NotRequired[bool] - """ - To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. - """ - - class UpdateParamsConfigurationMerchantCapabilitiesP24Payments(TypedDict): - requested: NotRequired[bool] - """ - To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. - """ - - class UpdateParamsConfigurationMerchantCapabilitiesPayByBankPayments( - TypedDict, - ): - requested: NotRequired[bool] - """ - To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. - """ - - class UpdateParamsConfigurationMerchantCapabilitiesPaycoPayments( - TypedDict - ): - requested: NotRequired[bool] - """ - To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. - """ - - class UpdateParamsConfigurationMerchantCapabilitiesPaynowPayments( - TypedDict, - ): - requested: NotRequired[bool] - """ - To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. - """ - - class UpdateParamsConfigurationMerchantCapabilitiesPromptpayPayments( - TypedDict, - ): - requested: NotRequired[bool] - """ - To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. - """ - - class UpdateParamsConfigurationMerchantCapabilitiesRevolutPayPayments( - TypedDict, - ): - requested: NotRequired[bool] - """ - To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. - """ - - class UpdateParamsConfigurationMerchantCapabilitiesSamsungPayPayments( - TypedDict, - ): - requested: NotRequired[bool] - """ - To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. - """ - - class UpdateParamsConfigurationMerchantCapabilitiesSepaBankTransferPayments( - TypedDict, - ): - requested: NotRequired[bool] - """ - To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. - """ - - class UpdateParamsConfigurationMerchantCapabilitiesSepaDebitPayments( - TypedDict, - ): - requested: NotRequired[bool] - """ - To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. - """ - - class UpdateParamsConfigurationMerchantCapabilitiesSwishPayments( - TypedDict - ): - requested: NotRequired[bool] - """ - To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. - """ - - class UpdateParamsConfigurationMerchantCapabilitiesTwintPayments( - TypedDict - ): - requested: NotRequired[bool] - """ - To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. - """ - - class UpdateParamsConfigurationMerchantCapabilitiesUsBankTransferPayments( - TypedDict, - ): - requested: NotRequired[bool] - """ - To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. - """ - - class UpdateParamsConfigurationMerchantCapabilitiesZipPayments(TypedDict): - requested: NotRequired[bool] - """ - To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. - """ - - class UpdateParamsConfigurationMerchantCardPayments(TypedDict): - decline_on: NotRequired[ - "AccountService.UpdateParamsConfigurationMerchantCardPaymentsDeclineOn" - ] - """ - Automatically declines certain charge types regardless of whether the card issuer accepted or declined the charge. - """ - - class UpdateParamsConfigurationMerchantCardPaymentsDeclineOn(TypedDict): - avs_failure: NotRequired[bool] - """ - Whether Stripe automatically declines charges with an incorrect ZIP or postal code. This setting only applies when a ZIP or postal code is provided and they fail bank verification. - """ - cvc_failure: NotRequired[bool] - """ - Whether Stripe automatically declines charges with an incorrect CVC. This setting only applies when a CVC is provided and it fails bank verification. - """ - - class UpdateParamsConfigurationMerchantStatementDescriptor(TypedDict): - descriptor: NotRequired[str] - """ - The default text that appears on statements for non-card charges outside of Japan. For card charges, if you don't set a statement_descriptor_prefix, this text is also used as the statement descriptor prefix. In that case, if concatenating the statement descriptor suffix causes the combined statement descriptor to exceed 22 characters, we truncate the statement_descriptor text to limit the full descriptor to 22 characters. For more information about statement descriptors and their requirements, see the Merchant Configuration settings documentation. - """ - prefix: NotRequired[str] - """ - Default text that appears on statements for card charges outside of Japan, prefixing any dynamic statement_descriptor_suffix specified on the charge. To maximize space for the dynamic part of the descriptor, keep this text short. If you don't specify this value, statement_descriptor is used as the prefix. For more information about statement descriptors and their requirements, see the Merchant Configuration settings documentation. - """ - - class UpdateParamsConfigurationMerchantSupport(TypedDict): - address: NotRequired[ - "AccountService.UpdateParamsConfigurationMerchantSupportAddress" - ] - """ - A publicly available mailing address for sending support issues to. - """ - email: NotRequired[str] - """ - A publicly available email address for sending support issues to. - """ - phone: NotRequired[str] - """ - A publicly available phone number to call with support issues. - """ - url: NotRequired[str] - """ - A publicly available website for handling support issues. - """ - - class UpdateParamsConfigurationMerchantSupportAddress(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 (e.g., street, PO Box, or company name). - """ - line2: NotRequired[str] - """ - Address line 2 (e.g., apartment, suite, unit, or building). - """ - postal_code: NotRequired[str] - """ - ZIP or postal code. - """ - state: NotRequired[str] - """ - State, county, province, or region. - """ - town: NotRequired[str] - """ - Town or cho-me. - """ - - class UpdateParamsConfigurationRecipient(TypedDict): - applied: NotRequired[bool] - """ - Represents the state of the configuration, and can be updated to deactivate or re-apply a configuration. - """ - capabilities: NotRequired[ - "AccountService.UpdateParamsConfigurationRecipientCapabilities" - ] - """ - Capabilities to request on the Recipient Configuration. - """ - default_outbound_destination: NotRequired[str] - """ - The payout method id to be used as a default outbound destination. This will allow the PayoutMethod to be omitted on OutboundPayments made through API or sending payouts via dashboard. Can also be explicitly set to `null` to clear the existing default outbound destination. For further details about creating an Outbound Destination, see [Collect recipient's payment details](https://docs.corp.stripe.com/global-payouts-private-preview/quickstart?dashboard-or-api=api#collect-bank-account-details). - """ - - class UpdateParamsConfigurationRecipientCapabilities(TypedDict): - bank_accounts: NotRequired[ - "AccountService.UpdateParamsConfigurationRecipientCapabilitiesBankAccounts" - ] - """ - Capabilities that enable OutboundPayments to a bank account linked to this Account. - """ - cards: NotRequired[ - "AccountService.UpdateParamsConfigurationRecipientCapabilitiesCards" - ] - """ - Capability that enable OutboundPayments to a debit card linked to this Account. - """ - crypto_wallets: NotRequired[ - "AccountService.UpdateParamsConfigurationRecipientCapabilitiesCryptoWallets" - ] - """ - Capabilities that enable OutboundPayments to a crypto wallet linked to this Account. - """ - stripe_balance: NotRequired[ - "AccountService.UpdateParamsConfigurationRecipientCapabilitiesStripeBalance" - ] - """ - Capabilities that enable the recipient to manage their Stripe Balance (/v1/balance). - """ - - class UpdateParamsConfigurationRecipientCapabilitiesBankAccounts( - TypedDict - ): - local: NotRequired[ - "AccountService.UpdateParamsConfigurationRecipientCapabilitiesBankAccountsLocal" - ] - """ - Enables this Account to receive OutboundPayments to linked bank accounts over local networks. - """ - wire: NotRequired[ - "AccountService.UpdateParamsConfigurationRecipientCapabilitiesBankAccountsWire" - ] - """ - Enables this Account to receive OutboundPayments to linked bank accounts over wire. - """ - - class UpdateParamsConfigurationRecipientCapabilitiesBankAccountsLocal( - TypedDict, - ): - requested: NotRequired[bool] - """ - To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. - """ - - class UpdateParamsConfigurationRecipientCapabilitiesBankAccountsWire( - TypedDict, - ): - requested: NotRequired[bool] - """ - To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. - """ - - class UpdateParamsConfigurationRecipientCapabilitiesCards(TypedDict): - requested: NotRequired[bool] - """ - To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. - """ - - class UpdateParamsConfigurationRecipientCapabilitiesCryptoWallets( - TypedDict, - ): - requested: NotRequired[bool] - """ - To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. - """ - - class UpdateParamsConfigurationRecipientCapabilitiesStripeBalance( - TypedDict, - ): - stripe_transfers: NotRequired[ - "AccountService.UpdateParamsConfigurationRecipientCapabilitiesStripeBalanceStripeTransfers" - ] - """ - Allows the account to receive /v1/transfers into their Stripe Balance (/v1/balance). - """ - - class UpdateParamsConfigurationRecipientCapabilitiesStripeBalanceStripeTransfers( - TypedDict, - ): - requested: NotRequired[bool] - """ - To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. - """ - - class UpdateParamsConfigurationStorer(TypedDict): - applied: NotRequired[bool] - """ - Represents the state of the configuration, and can be updated to deactivate or re-apply a configuration. - """ - capabilities: NotRequired[ - "AccountService.UpdateParamsConfigurationStorerCapabilities" - ] - """ - Capabilities to request on the Storer Configuration. - """ - - class UpdateParamsConfigurationStorerCapabilities(TypedDict): - financial_addresses: NotRequired[ - "AccountService.UpdateParamsConfigurationStorerCapabilitiesFinancialAddresses" - ] - """ - Can provision a financial address to credit/debit a FinancialAccount. - """ - holds_currencies: NotRequired[ - "AccountService.UpdateParamsConfigurationStorerCapabilitiesHoldsCurrencies" - ] - """ - Can hold storage-type funds on Stripe. - """ - inbound_transfers: NotRequired[ - "AccountService.UpdateParamsConfigurationStorerCapabilitiesInboundTransfers" - ] - """ - Can pull funds from an external source, owned by yourself, to a FinancialAccount. - """ - outbound_payments: NotRequired[ - "AccountService.UpdateParamsConfigurationStorerCapabilitiesOutboundPayments" - ] - """ - Can send funds from a FinancialAccount to a destination owned by someone else. - """ - outbound_transfers: NotRequired[ - "AccountService.UpdateParamsConfigurationStorerCapabilitiesOutboundTransfers" - ] - """ - Can send funds from a FinancialAccount to a destination owned by yourself. - """ - - class UpdateParamsConfigurationStorerCapabilitiesFinancialAddresses( - TypedDict, - ): - bank_accounts: NotRequired[ - "AccountService.UpdateParamsConfigurationStorerCapabilitiesFinancialAddressesBankAccounts" - ] - """ - Can provision a bank-account-like financial address (VBAN) to credit/debit a FinancialAccount. - """ - - class UpdateParamsConfigurationStorerCapabilitiesFinancialAddressesBankAccounts( - TypedDict, - ): - requested: NotRequired[bool] - """ - To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. - """ - - class UpdateParamsConfigurationStorerCapabilitiesHoldsCurrencies( - TypedDict - ): - gbp: NotRequired[ - "AccountService.UpdateParamsConfigurationStorerCapabilitiesHoldsCurrenciesGbp" - ] - """ - Can hold storage-type funds on Stripe in GBP. - """ - - class UpdateParamsConfigurationStorerCapabilitiesHoldsCurrenciesGbp( - TypedDict, - ): - requested: NotRequired[bool] - """ - To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. - """ - - class UpdateParamsConfigurationStorerCapabilitiesInboundTransfers( - TypedDict, - ): - bank_accounts: NotRequired[ - "AccountService.UpdateParamsConfigurationStorerCapabilitiesInboundTransfersBankAccounts" - ] - """ - Can pull funds from an external bank account owned by yourself to a FinancialAccount. - """ - - class UpdateParamsConfigurationStorerCapabilitiesInboundTransfersBankAccounts( - TypedDict, - ): - requested: NotRequired[bool] - """ - To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. - """ - - class UpdateParamsConfigurationStorerCapabilitiesOutboundPayments( - TypedDict, - ): - bank_accounts: NotRequired[ - "AccountService.UpdateParamsConfigurationStorerCapabilitiesOutboundPaymentsBankAccounts" - ] - """ - Can send funds from a FinancialAccount to a bank account owned by someone else. - """ - cards: NotRequired[ - "AccountService.UpdateParamsConfigurationStorerCapabilitiesOutboundPaymentsCards" - ] - """ - Can send funds from a FinancialAccount to a debit card owned by someone else. - """ - financial_accounts: NotRequired[ - "AccountService.UpdateParamsConfigurationStorerCapabilitiesOutboundPaymentsFinancialAccounts" - ] - """ - Can send funds from a FinancialAccount to another FinancialAccount owned by someone else. - """ - - class UpdateParamsConfigurationStorerCapabilitiesOutboundPaymentsBankAccounts( - TypedDict, - ): - requested: NotRequired[bool] - """ - To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. - """ - - class UpdateParamsConfigurationStorerCapabilitiesOutboundPaymentsCards( - TypedDict, - ): - requested: NotRequired[bool] - """ - To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. - """ - - class UpdateParamsConfigurationStorerCapabilitiesOutboundPaymentsFinancialAccounts( - TypedDict, - ): - requested: NotRequired[bool] - """ - To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. - """ - - class UpdateParamsConfigurationStorerCapabilitiesOutboundTransfers( - TypedDict, - ): - bank_accounts: NotRequired[ - "AccountService.UpdateParamsConfigurationStorerCapabilitiesOutboundTransfersBankAccounts" - ] - """ - Can send funds from a FinancialAccount to a bank account owned by yourself. - """ - financial_accounts: NotRequired[ - "AccountService.UpdateParamsConfigurationStorerCapabilitiesOutboundTransfersFinancialAccounts" - ] - """ - Can send funds from a FinancialAccount to another FinancialAccount owned by yourself. - """ - - class UpdateParamsConfigurationStorerCapabilitiesOutboundTransfersBankAccounts( - TypedDict, - ): - requested: NotRequired[bool] - """ - To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. - """ - - class UpdateParamsConfigurationStorerCapabilitiesOutboundTransfersFinancialAccounts( - TypedDict, - ): - requested: NotRequired[bool] - """ - To request a new Capability for an account, pass true. There can be a delay before the requested Capability becomes active. - """ - - class UpdateParamsDefaults(TypedDict): - currency: NotRequired[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). - """ - locales: NotRequired[ - List[ - Literal[ - "ar-SA", - "bg", - "bg-BG", - "cs", - "cs-CZ", - "da", - "da-DK", - "de", - "de-DE", - "el", - "el-GR", - "en", - "en-AU", - "en-CA", - "en-GB", - "en-IE", - "en-IN", - "en-NZ", - "en-SG", - "en-US", - "es", - "es-419", - "es-ES", - "et", - "et-EE", - "fi", - "fil", - "fil-PH", - "fi-FI", - "fr", - "fr-CA", - "fr-FR", - "he-IL", - "hr", - "hr-HR", - "hu", - "hu-HU", - "id", - "id-ID", - "it", - "it-IT", - "ja", - "ja-JP", - "ko", - "ko-KR", - "lt", - "lt-LT", - "lv", - "lv-LV", - "ms", - "ms-MY", - "mt", - "mt-MT", - "nb", - "nb-NO", - "nl", - "nl-NL", - "pl", - "pl-PL", - "pt", - "pt-BR", - "pt-PT", - "ro", - "ro-RO", - "ru", - "ru-RU", - "sk", - "sk-SK", - "sl", - "sl-SI", - "sv", - "sv-SE", - "th", - "th-TH", - "tr", - "tr-TR", - "vi", - "vi-VN", - "zh", - "zh-Hans", - "zh-Hant-HK", - "zh-Hant-TW", - "zh-HK", - "zh-TW", - ] - ] - ] - """ - The Account's preferred locales (languages), ordered by preference. - """ - profile: NotRequired["AccountService.UpdateParamsDefaultsProfile"] - """ - Account profile information. - """ - responsibilities: NotRequired[ - "AccountService.UpdateParamsDefaultsResponsibilities" - ] - """ - Default responsibilities held by either Stripe or the platform. - """ - - class UpdateParamsDefaultsProfile(TypedDict): - business_url: NotRequired[str] - """ - The business's publicly-available website. - """ - doing_business_as: NotRequired[str] - """ - The name which is used by the business. - """ - product_description: NotRequired[str] - """ - Internal-only description of the product sold or service provided by the business. It's used by Stripe for risk and underwriting purposes. - """ - - class UpdateParamsDefaultsResponsibilities(TypedDict): - fees_collector: Literal["application", "stripe"] - """ - A value indicating the party responsible for collecting fees from this account. - """ - losses_collector: Literal["application", "stripe"] - """ - A value indicating who is responsible for losses when this Account can't pay back negative balances from payments. - """ - - class UpdateParamsIdentity(TypedDict): - attestations: NotRequired[ - "AccountService.UpdateParamsIdentityAttestations" - ] - """ - Attestations from the identity's key people, e.g. owners, executives, directors. - """ - business_details: NotRequired[ - "AccountService.UpdateParamsIdentityBusinessDetails" - ] - """ - Information about the company or business. - """ - country: NotRequired[str] - """ - The country in which the account holder resides, or in which the business is legally established. This should be an [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code. - """ - entity_type: NotRequired[ - Literal["company", "government_entity", "individual", "non_profit"] - ] - """ - The entity type. - """ - individual: NotRequired[ - "AccountService.UpdateParamsIdentityIndividual" - ] - """ - Information about the individual represented by the Account. This property is `null` unless `entity_type` is set to `individual`. - """ - - class UpdateParamsIdentityAttestations(TypedDict): - directorship_declaration: NotRequired[ - "AccountService.UpdateParamsIdentityAttestationsDirectorshipDeclaration" - ] - """ - This hash is used to attest that the directors information provided to Stripe is both current and correct. - """ - ownership_declaration: NotRequired[ - "AccountService.UpdateParamsIdentityAttestationsOwnershipDeclaration" - ] - """ - This hash is used to attest that the beneficial owner information provided to Stripe is both current and correct. - """ - persons_provided: NotRequired[ - "AccountService.UpdateParamsIdentityAttestationsPersonsProvided" - ] - """ - Attestation that all Persons with a specific Relationship value have been provided. - """ - terms_of_service: NotRequired[ - "AccountService.UpdateParamsIdentityAttestationsTermsOfService" - ] - """ - Attestations of accepted terms of service agreements. - """ - - class UpdateParamsIdentityAttestationsDirectorshipDeclaration(TypedDict): - date: NotRequired[str] - """ - The time marking when the director attestation was made. Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: 2022-09-18T13:22:18.123Z. - """ - ip: NotRequired[str] - """ - The IP address from which the director attestation was made. - """ - user_agent: NotRequired[str] - """ - The user agent of the browser from which the director attestation was made. - """ - - class UpdateParamsIdentityAttestationsOwnershipDeclaration(TypedDict): - date: NotRequired[str] - """ - The time marking when the beneficial owner attestation was made. Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: 2022-09-18T13:22:18.123Z. - """ - ip: NotRequired[str] - """ - The IP address from which the beneficial owner attestation was made. - """ - user_agent: NotRequired[str] - """ - The user agent of the browser from which the beneficial owner attestation was made. - """ - - class UpdateParamsIdentityAttestationsPersonsProvided(TypedDict): - directors: NotRequired[bool] - """ - Whether the company's directors have been provided. Set this Boolean to true after creating all the company's directors with the [Persons API](https://docs.stripe.com/api/v2/core/accounts/createperson). - """ - executives: NotRequired[bool] - """ - Whether the company's executives have been provided. Set this Boolean to true after creating all the company's executives with the [Persons API](https://docs.stripe.com/api/v2/core/accounts/createperson). - """ - owners: NotRequired[bool] - """ - Whether the company's owners have been provided. Set this Boolean to true after creating all the company's owners with the [Persons API](https://docs.stripe.com/api/v2/core/accounts/createperson). - """ - ownership_exemption_reason: NotRequired[ - Literal[ - "qualified_entity_exceeds_ownership_threshold", - "qualifies_as_financial_institution", - ] - ] - """ - Reason for why the company is exempt from providing ownership information. - """ - - class UpdateParamsIdentityAttestationsTermsOfService(TypedDict): - account: NotRequired[ - "AccountService.UpdateParamsIdentityAttestationsTermsOfServiceAccount" - ] - """ - Details on the Account's acceptance of the [Stripe Services Agreement](https://docs.stripe.com/connect/updating-accounts#tos-acceptance). - """ - storer: NotRequired[ - "AccountService.UpdateParamsIdentityAttestationsTermsOfServiceStorer" - ] - """ - Details on the Account's acceptance of Treasury-specific terms of service. - """ - - class UpdateParamsIdentityAttestationsTermsOfServiceAccount(TypedDict): - date: NotRequired[str] - """ - The time when the Account's representative accepted the terms of service. Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: 2022-09-18T13:22:18.123Z. - """ - ip: NotRequired[str] - """ - The IP address from which the Account's representative accepted the terms of service. - """ - user_agent: NotRequired[str] - """ - The user agent of the browser from which the Account's representative accepted the terms of service. - """ - - class UpdateParamsIdentityAttestationsTermsOfServiceStorer(TypedDict): - date: NotRequired[str] - """ - The time when the Account's representative accepted the terms of service. Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: 2022-09-18T13:22:18.123Z. - """ - ip: NotRequired[str] - """ - The IP address from which the Account's representative accepted the terms of service. - """ - user_agent: NotRequired[str] - """ - The user agent of the browser from which the Account's representative accepted the terms of service. - """ - - class UpdateParamsIdentityBusinessDetails(TypedDict): - address: NotRequired[ - "AccountService.UpdateParamsIdentityBusinessDetailsAddress" - ] - """ - The business registration address of the business entity. - """ - annual_revenue: NotRequired[ - "AccountService.UpdateParamsIdentityBusinessDetailsAnnualRevenue" - ] - """ - The business gross annual revenue for its preceding fiscal year. - """ - documents: NotRequired[ - "AccountService.UpdateParamsIdentityBusinessDetailsDocuments" - ] - """ - A document verifying the business. - """ - estimated_worker_count: NotRequired[int] - """ - An estimated upper bound of employees, contractors, vendors, etc. currently working for the business. - """ - id_numbers: NotRequired[ - List["AccountService.UpdateParamsIdentityBusinessDetailsIdNumber"] - ] - """ - The ID numbers of a business entity. - """ - monthly_estimated_revenue: NotRequired[ - "AccountService.UpdateParamsIdentityBusinessDetailsMonthlyEstimatedRevenue" - ] - """ - An estimate of the monthly revenue of the business. - """ - phone: NotRequired[str] - """ - The phone number of the Business Entity. - """ - registered_name: NotRequired[str] - """ - The business legal name. - """ - script_addresses: NotRequired[ - "AccountService.UpdateParamsIdentityBusinessDetailsScriptAddresses" - ] - """ - The business registration address of the business entity in non latin script. - """ - script_names: NotRequired[ - "AccountService.UpdateParamsIdentityBusinessDetailsScriptNames" - ] - """ - The business legal name in non latin script. - """ - structure: NotRequired[ - Literal[ - "cooperative", - "free_zone_establishment", - "free_zone_llc", - "governmental_unit", - "government_instrumentality", - "incorporated_association", - "incorporated_non_profit", - "incorporated_partnership", - "limited_liability_partnership", - "llc", - "multi_member_llc", - "private_company", - "private_corporation", - "private_partnership", - "public_company", - "public_corporation", - "public_listed_corporation", - "public_partnership", - "registered_charity", - "single_member_llc", - "sole_establishment", - "sole_proprietorship", - "tax_exempt_government_instrumentality", - "trust", - "unincorporated_association", - "unincorporated_non_profit", - "unincorporated_partnership", - ] - ] - """ - The category identifying the legal structure of the business. - """ - - class UpdateParamsIdentityBusinessDetailsAddress(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 (e.g., street, PO Box, or company name). - """ - line2: NotRequired[str] - """ - Address line 2 (e.g., apartment, suite, unit, or building). - """ - postal_code: NotRequired[str] - """ - ZIP or postal code. - """ - state: NotRequired[str] - """ - State, county, province, or region. - """ - town: NotRequired[str] - """ - Town or cho-me. - """ - - class UpdateParamsIdentityBusinessDetailsAnnualRevenue(TypedDict): - amount: NotRequired[AmountParam] - """ - A non-negative integer representing the amount in the smallest currency unit. - """ - fiscal_year_end: NotRequired[str] - """ - The close-out date of the preceding fiscal year in ISO 8601 format. E.g. 2023-12-31 for the 31st of December, 2023. - """ - - class UpdateParamsIdentityBusinessDetailsDocuments(TypedDict): - bank_account_ownership_verification: NotRequired[ - "AccountService.UpdateParamsIdentityBusinessDetailsDocumentsBankAccountOwnershipVerification" - ] - """ - One or more documents that support the bank account ownership verification requirement. Must be a document associated with the account's primary active bank account that displays the last 4 digits of the account number, either a statement or a check. - """ - company_license: NotRequired[ - "AccountService.UpdateParamsIdentityBusinessDetailsDocumentsCompanyLicense" - ] - """ - One or more documents that demonstrate proof of a company's license to operate. - """ - company_memorandum_of_association: NotRequired[ - "AccountService.UpdateParamsIdentityBusinessDetailsDocumentsCompanyMemorandumOfAssociation" - ] - """ - One or more documents showing the company's Memorandum of Association. - """ - company_ministerial_decree: NotRequired[ - "AccountService.UpdateParamsIdentityBusinessDetailsDocumentsCompanyMinisterialDecree" - ] - """ - Certain countries only: One or more documents showing the ministerial decree legalizing the company's establishment. - """ - company_registration_verification: NotRequired[ - "AccountService.UpdateParamsIdentityBusinessDetailsDocumentsCompanyRegistrationVerification" - ] - """ - One or more documents that demonstrate proof of a company's registration with the appropriate local authorities. - """ - company_tax_id_verification: NotRequired[ - "AccountService.UpdateParamsIdentityBusinessDetailsDocumentsCompanyTaxIdVerification" - ] - """ - One or more documents that demonstrate proof of a company's tax ID. - """ - primary_verification: NotRequired[ - "AccountService.UpdateParamsIdentityBusinessDetailsDocumentsPrimaryVerification" - ] - """ - A document verifying the business. - """ - proof_of_address: NotRequired[ - "AccountService.UpdateParamsIdentityBusinessDetailsDocumentsProofOfAddress" - ] - """ - One or more documents that demonstrate proof of address. - """ - proof_of_registration: NotRequired[ - "AccountService.UpdateParamsIdentityBusinessDetailsDocumentsProofOfRegistration" - ] - """ - One or more documents showing the company's proof of registration with the national business registry. - """ - proof_of_ultimate_beneficial_ownership: NotRequired[ - "AccountService.UpdateParamsIdentityBusinessDetailsDocumentsProofOfUltimateBeneficialOwnership" - ] - """ - One or more documents that demonstrate proof of ultimate beneficial ownership. - """ - - class UpdateParamsIdentityBusinessDetailsDocumentsBankAccountOwnershipVerification( - TypedDict, - ): - files: List[str] - """ - One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. - """ - type: Literal["files"] - """ - The format of the document. Currently supports `files` only. - """ - - class UpdateParamsIdentityBusinessDetailsDocumentsCompanyLicense( - TypedDict - ): - files: List[str] - """ - One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. - """ - type: Literal["files"] - """ - The format of the document. Currently supports `files` only. - """ - - class UpdateParamsIdentityBusinessDetailsDocumentsCompanyMemorandumOfAssociation( - TypedDict, - ): - files: List[str] - """ - One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. - """ - type: Literal["files"] - """ - The format of the document. Currently supports `files` only. - """ - - class UpdateParamsIdentityBusinessDetailsDocumentsCompanyMinisterialDecree( - TypedDict, - ): - files: List[str] - """ - One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. - """ - type: Literal["files"] - """ - The format of the document. Currently supports `files` only. - """ - - class UpdateParamsIdentityBusinessDetailsDocumentsCompanyRegistrationVerification( - TypedDict, - ): - files: List[str] - """ - One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. - """ - type: Literal["files"] - """ - The format of the document. Currently supports `files` only. - """ - - class UpdateParamsIdentityBusinessDetailsDocumentsCompanyTaxIdVerification( - TypedDict, - ): - files: List[str] - """ - One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. - """ - type: Literal["files"] - """ - The format of the document. Currently supports `files` only. - """ - - class UpdateParamsIdentityBusinessDetailsDocumentsPrimaryVerification( - TypedDict, - ): - front_back: "AccountService.UpdateParamsIdentityBusinessDetailsDocumentsPrimaryVerificationFrontBack" - """ - The [file upload](https://docs.stripe.com/api/persons/update#create_file) tokens referring to each side of the document. - """ - type: Literal["front_back"] - """ - The format of the verification document. Currently supports `front_back` only. - """ - - class UpdateParamsIdentityBusinessDetailsDocumentsPrimaryVerificationFrontBack( - TypedDict, - ): - back: NotRequired[str] - """ - A [file upload](https://docs.stripe.com/api/persons/update#create_file) token representing the back of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. - """ - front: NotRequired[str] - """ - A [file upload](https://docs.stripe.com/api/persons/update#create_file) token representing the front of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. - """ - - class UpdateParamsIdentityBusinessDetailsDocumentsProofOfAddress( - TypedDict - ): - files: List[str] - """ - One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. - """ - type: Literal["files"] - """ - The format of the document. Currently supports `files` only. - """ - - class UpdateParamsIdentityBusinessDetailsDocumentsProofOfRegistration( - TypedDict, - ): - files: List[str] - """ - One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. - """ - type: Literal["files"] - """ - The format of the document. Currently supports `files` only. - """ - - class UpdateParamsIdentityBusinessDetailsDocumentsProofOfUltimateBeneficialOwnership( - TypedDict, - ): - files: List[str] - """ - One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. - """ - type: Literal["files"] - """ - The format of the document. Currently supports `files` only. - """ - - class UpdateParamsIdentityBusinessDetailsIdNumber(TypedDict): - registrar: NotRequired[str] - """ - The registrar of the ID number (Only valid for DE ID number types). - """ - type: Literal[ - "ae_crn", - "ae_vat", - "ao_nif", - "at_fn", - "au_abn", - "au_acn", - "au_in", - "az_tin", - "bd_etin", - "be_cbe", - "bg_uic", - "br_cnpj", - "ca_cn", - "ca_crarr", - "ca_neq", - "ca_rid", - "ch_chid", - "ch_uid", - "cr_cpj", - "cr_nite", - "cy_tic", - "cz_ico", - "de_hrn", - "de_vat", - "dk_cvr", - "do_rcn", - "ee_rk", - "es_cif", - "fi_yt", - "fr_siren", - "fr_vat", - "gb_crn", - "gi_crn", - "gr_gemi", - "gt_nit", - "hk_br", - "hk_cr", - "hk_mbs", - "hu_cjs", - "ie_crn", - "it_rea", - "it_vat", - "jp_cn", - "kz_bin", - "li_uid", - "lt_ccrn", - "lu_rcs", - "lv_urn", - "mt_crn", - "mx_rfc", - "my_brn", - "my_coid", - "my_sst", - "mz_nuit", - "nl_kvk", - "no_orgnr", - "nz_bn", - "pe_ruc", - "pk_ntn", - "pl_regon", - "pt_vat", - "ro_cui", - "sa_crn", - "sa_tin", - "se_orgnr", - "sg_uen", - "si_msp", - "sk_ico", - "th_crn", - "th_prn", - "th_tin", - "us_ein", - ] - """ - Open Enum. The ID number type of a business entity. - """ - value: str - """ - The value of the ID number. - """ - - class UpdateParamsIdentityBusinessDetailsMonthlyEstimatedRevenue( - TypedDict - ): - amount: NotRequired[AmountParam] - """ - A non-negative integer representing the amount in the smallest currency unit. - """ - - class UpdateParamsIdentityBusinessDetailsScriptAddresses(TypedDict): - kana: NotRequired[ - "AccountService.UpdateParamsIdentityBusinessDetailsScriptAddressesKana" - ] - """ - Kana Address. - """ - kanji: NotRequired[ - "AccountService.UpdateParamsIdentityBusinessDetailsScriptAddressesKanji" - ] - """ - Kanji Address. - """ - - class UpdateParamsIdentityBusinessDetailsScriptAddressesKana(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 (e.g., street, PO Box, or company name). - """ - line2: NotRequired[str] - """ - Address line 2 (e.g., apartment, suite, unit, or building). - """ - postal_code: NotRequired[str] - """ - ZIP or postal code. - """ - state: NotRequired[str] - """ - State, county, province, or region. - """ - town: NotRequired[str] - """ - Town or cho-me. - """ - - class UpdateParamsIdentityBusinessDetailsScriptAddressesKanji(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 (e.g., street, PO Box, or company name). - """ - line2: NotRequired[str] - """ - Address line 2 (e.g., apartment, suite, unit, or building). - """ - postal_code: NotRequired[str] - """ - ZIP or postal code. - """ - state: NotRequired[str] - """ - State, county, province, or region. - """ - town: NotRequired[str] - """ - Town or cho-me. - """ - - class UpdateParamsIdentityBusinessDetailsScriptNames(TypedDict): - kana: NotRequired[ - "AccountService.UpdateParamsIdentityBusinessDetailsScriptNamesKana" - ] - """ - Kana name. - """ - kanji: NotRequired[ - "AccountService.UpdateParamsIdentityBusinessDetailsScriptNamesKanji" - ] - """ - Kanji name. - """ - - class UpdateParamsIdentityBusinessDetailsScriptNamesKana(TypedDict): - registered_name: NotRequired[str] - """ - Registered name of the business. - """ - - class UpdateParamsIdentityBusinessDetailsScriptNamesKanji(TypedDict): - registered_name: NotRequired[str] - """ - Registered name of the business. - """ - - class UpdateParamsIdentityIndividual(TypedDict): - additional_addresses: NotRequired[ - List[ - "AccountService.UpdateParamsIdentityIndividualAdditionalAddress" - ] - ] - """ - Additional addresses associated with the individual. - """ - additional_names: NotRequired[ - List["AccountService.UpdateParamsIdentityIndividualAdditionalName"] - ] - """ - Additional names (e.g. aliases) associated with the individual. - """ - address: NotRequired[ - "AccountService.UpdateParamsIdentityIndividualAddress" - ] - """ - The individual's residential address. - """ - date_of_birth: NotRequired[ - "AccountService.UpdateParamsIdentityIndividualDateOfBirth" - ] - """ - The individual's date of birth. - """ - documents: NotRequired[ - "AccountService.UpdateParamsIdentityIndividualDocuments" - ] - """ - Documents that may be submitted to satisfy various informational requests. - """ - email: NotRequired[str] - """ - The individual's email address. - """ - given_name: NotRequired[str] - """ - The individual's first name. - """ - id_numbers: NotRequired[ - List["AccountService.UpdateParamsIdentityIndividualIdNumber"] - ] - """ - The identification numbers (e.g., SSN) associated with the individual. - """ - legal_gender: NotRequired[Literal["female", "male"]] - """ - The individual's gender (International regulations require either "male" or "female"). - """ - metadata: NotRequired[Dict[str, Optional[str]]] - """ - Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. - """ - nationalities: NotRequired[List[str]] - """ - The countries where the individual is a national. Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - """ - phone: NotRequired[str] - """ - The individual's phone number. - """ - political_exposure: NotRequired[Literal["existing", "none"]] - """ - The individual's political exposure. - """ - relationship: NotRequired[ - "AccountService.UpdateParamsIdentityIndividualRelationship" - ] - """ - The relationship that this individual has with the account's identity. - """ - script_addresses: NotRequired[ - "AccountService.UpdateParamsIdentityIndividualScriptAddresses" - ] - """ - The script addresses (e.g., non-Latin characters) associated with the individual. - """ - script_names: NotRequired[ - "AccountService.UpdateParamsIdentityIndividualScriptNames" - ] - """ - The individuals primary name in non latin script. - """ - surname: NotRequired[str] - """ - The individual's last name. - """ - - class UpdateParamsIdentityIndividualAdditionalAddress(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 (e.g., street, PO Box, or company name). - """ - line2: NotRequired[str] - """ - Address line 2 (e.g., apartment, suite, unit, or building). - """ - postal_code: NotRequired[str] - """ - ZIP or postal code. - """ - purpose: Literal["registered"] - """ - Purpose of additional address. - """ - state: NotRequired[str] - """ - State, county, province, or region. - """ - town: NotRequired[str] - """ - Town or cho-me. - """ - - class UpdateParamsIdentityIndividualAdditionalName(TypedDict): - full_name: NotRequired[str] - """ - The person's full name. - """ - given_name: NotRequired[str] - """ - The person's first or given name. - """ - purpose: Literal["alias", "maiden"] - """ - The purpose or type of the additional name. - """ - surname: NotRequired[str] - """ - The person's last or family name. - """ - - class UpdateParamsIdentityIndividualAddress(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 (e.g., street, PO Box, or company name). - """ - line2: NotRequired[str] - """ - Address line 2 (e.g., apartment, suite, unit, or building). - """ - postal_code: NotRequired[str] - """ - ZIP or postal code. - """ - state: NotRequired[str] - """ - State, county, province, or region. - """ - town: NotRequired[str] - """ - Town or cho-me. - """ - - class UpdateParamsIdentityIndividualDateOfBirth(TypedDict): - day: int - """ - The day of the birth. - """ - month: int - """ - The month of birth. - """ - year: int - """ - The year of birth. - """ - - class UpdateParamsIdentityIndividualDocuments(TypedDict): - company_authorization: NotRequired[ - "AccountService.UpdateParamsIdentityIndividualDocumentsCompanyAuthorization" - ] - """ - One or more documents that demonstrate proof that this person is authorized to represent the company. - """ - passport: NotRequired[ - "AccountService.UpdateParamsIdentityIndividualDocumentsPassport" - ] - """ - One or more documents showing the person's passport page with photo and personal data. - """ - primary_verification: NotRequired[ - "AccountService.UpdateParamsIdentityIndividualDocumentsPrimaryVerification" - ] - """ - An identifying document showing the person's name, either a passport or local ID card. - """ - secondary_verification: NotRequired[ - "AccountService.UpdateParamsIdentityIndividualDocumentsSecondaryVerification" - ] - """ - A document showing address, either a passport, local ID card, or utility bill from a well-known utility company. - """ - visa: NotRequired[ - "AccountService.UpdateParamsIdentityIndividualDocumentsVisa" - ] - """ - One or more documents showing the person's visa required for living in the country where they are residing. - """ - - class UpdateParamsIdentityIndividualDocumentsCompanyAuthorization( - TypedDict, - ): - files: List[str] - """ - One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. - """ - type: Literal["files"] - """ - The format of the document. Currently supports `files` only. - """ - - class UpdateParamsIdentityIndividualDocumentsPassport(TypedDict): - files: List[str] - """ - One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. - """ - type: Literal["files"] - """ - The format of the document. Currently supports `files` only. - """ - - class UpdateParamsIdentityIndividualDocumentsPrimaryVerification( - TypedDict - ): - front_back: "AccountService.UpdateParamsIdentityIndividualDocumentsPrimaryVerificationFrontBack" - """ - The [file upload](https://docs.stripe.com/api/persons/update#create_file) tokens referring to each side of the document. - """ - type: Literal["front_back"] - """ - The format of the verification document. Currently supports `front_back` only. - """ - - class UpdateParamsIdentityIndividualDocumentsPrimaryVerificationFrontBack( - TypedDict, - ): - back: NotRequired[str] - """ - A [file upload](https://docs.stripe.com/api/persons/update#create_file) token representing the back of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. - """ - front: NotRequired[str] - """ - A [file upload](https://docs.stripe.com/api/persons/update#create_file) token representing the front of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. - """ - - class UpdateParamsIdentityIndividualDocumentsSecondaryVerification( - TypedDict, - ): - front_back: "AccountService.UpdateParamsIdentityIndividualDocumentsSecondaryVerificationFrontBack" - """ - The [file upload](https://docs.stripe.com/api/persons/update#create_file) tokens referring to each side of the document. - """ - type: Literal["front_back"] - """ - The format of the verification document. Currently supports `front_back` only. - """ - - class UpdateParamsIdentityIndividualDocumentsSecondaryVerificationFrontBack( - TypedDict, - ): - back: NotRequired[str] - """ - A [file upload](https://docs.stripe.com/api/persons/update#create_file) token representing the back of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. - """ - front: NotRequired[str] - """ - A [file upload](https://docs.stripe.com/api/persons/update#create_file) token representing the front of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. - """ - - class UpdateParamsIdentityIndividualDocumentsVisa(TypedDict): - files: List[str] - """ - One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. - """ - type: Literal["files"] - """ - The format of the document. Currently supports `files` only. - """ - - class UpdateParamsIdentityIndividualIdNumber(TypedDict): - type: Literal[ - "ae_eid", - "ao_nif", - "az_tin", - "bd_brc", - "bd_etin", - "bd_nid", - "br_cpf", - "cr_cpf", - "cr_dimex", - "cr_nite", - "de_stn", - "do_rcn", - "gt_nit", - "hk_id", - "kz_iin", - "mx_rfc", - "my_nric", - "mz_nuit", - "nl_bsn", - "pe_dni", - "pk_cnic", - "pk_snic", - "sa_tin", - "sg_fin", - "sg_nric", - "th_lc", - "th_pin", - "us_itin", - "us_itin_last_4", - "us_ssn", - "us_ssn_last_4", - ] - """ - The ID number type of an individual. - """ - value: str - """ - The value of the ID number. - """ - - class UpdateParamsIdentityIndividualRelationship(TypedDict): - director: NotRequired[bool] - """ - Whether the person is a director of the account's identity. Directors are typically members of the governing board of the company, or responsible for ensuring the company meets its regulatory obligations. - """ - executive: NotRequired[bool] - """ - Whether the person has significant responsibility to control, manage, or direct the organization. - """ - owner: NotRequired[bool] - """ - Whether the person is an owner of the account's identity. - """ - percent_ownership: NotRequired[str] - """ - The percent owned by the person of the account's legal entity. - """ - title: NotRequired[str] - """ - The person's title (e.g., CEO, Support Engineer). - """ - - class UpdateParamsIdentityIndividualScriptAddresses(TypedDict): - kana: NotRequired[ - "AccountService.UpdateParamsIdentityIndividualScriptAddressesKana" - ] - """ - Kana Address. - """ - kanji: NotRequired[ - "AccountService.UpdateParamsIdentityIndividualScriptAddressesKanji" - ] - """ - Kanji Address. - """ - - class UpdateParamsIdentityIndividualScriptAddressesKana(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 (e.g., street, PO Box, or company name). - """ - line2: NotRequired[str] - """ - Address line 2 (e.g., apartment, suite, unit, or building). - """ - postal_code: NotRequired[str] - """ - ZIP or postal code. - """ - state: NotRequired[str] - """ - State, county, province, or region. - """ - town: NotRequired[str] - """ - Town or cho-me. - """ - - class UpdateParamsIdentityIndividualScriptAddressesKanji(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 (e.g., street, PO Box, or company name). - """ - line2: NotRequired[str] - """ - Address line 2 (e.g., apartment, suite, unit, or building). - """ - postal_code: NotRequired[str] - """ - ZIP or postal code. - """ - state: NotRequired[str] - """ - State, county, province, or region. - """ - town: NotRequired[str] - """ - Town or cho-me. - """ - - class UpdateParamsIdentityIndividualScriptNames(TypedDict): - kana: NotRequired[ - "AccountService.UpdateParamsIdentityIndividualScriptNamesKana" - ] - """ - Persons name in kana script. - """ - kanji: NotRequired[ - "AccountService.UpdateParamsIdentityIndividualScriptNamesKanji" - ] - """ - Persons name in kanji script. - """ - - class UpdateParamsIdentityIndividualScriptNamesKana(TypedDict): - given_name: NotRequired[str] - """ - The person's first or given name. - """ - surname: NotRequired[str] - """ - The person's last or family name. - """ - - class UpdateParamsIdentityIndividualScriptNamesKanji(TypedDict): - given_name: NotRequired[str] - """ - The person's first or given name. - """ - surname: NotRequired[str] - """ - The person's last or family name. - """ - def list( self, - params: Optional["AccountService.ListParams"] = None, + params: Optional["AccountListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[Account]: """ @@ -5137,7 +49,7 @@ def list( async def list_async( self, - params: Optional["AccountService.ListParams"] = None, + params: Optional["AccountListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[Account]: """ @@ -5156,7 +68,7 @@ async def list_async( def create( self, - params: Optional["AccountService.CreateParams"] = None, + params: Optional["AccountCreateParams"] = None, options: Optional[RequestOptions] = None, ) -> Account: """ @@ -5175,7 +87,7 @@ def create( async def create_async( self, - params: Optional["AccountService.CreateParams"] = None, + params: Optional["AccountCreateParams"] = None, options: Optional[RequestOptions] = None, ) -> Account: """ @@ -5195,7 +107,7 @@ async def create_async( def retrieve( self, id: str, - params: Optional["AccountService.RetrieveParams"] = None, + params: Optional["AccountRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Account: """ @@ -5215,7 +127,7 @@ def retrieve( async def retrieve_async( self, id: str, - params: Optional["AccountService.RetrieveParams"] = None, + params: Optional["AccountRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Account: """ @@ -5235,7 +147,7 @@ async def retrieve_async( def update( self, id: str, - params: Optional["AccountService.UpdateParams"] = None, + params: Optional["AccountUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> Account: """ @@ -5255,7 +167,7 @@ def update( async def update_async( self, id: str, - params: Optional["AccountService.UpdateParams"] = None, + params: Optional["AccountUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> Account: """ @@ -5275,7 +187,7 @@ async def update_async( def close( self, id: str, - params: Optional["AccountService.CloseParams"] = None, + params: Optional["AccountCloseParams"] = None, options: Optional[RequestOptions] = None, ) -> Account: """ @@ -5295,7 +207,7 @@ def close( async def close_async( self, id: str, - params: Optional["AccountService.CloseParams"] = None, + params: Optional["AccountCloseParams"] = None, options: Optional[RequestOptions] = None, ) -> Account: """ diff --git a/stripe/v2/core/_claimable_sandbox_service.py b/stripe/v2/core/_claimable_sandbox_service.py index 5e791fcd4..17c8b943c 100644 --- a/stripe/v2/core/_claimable_sandbox_service.py +++ b/stripe/v2/core/_claimable_sandbox_service.py @@ -5,42 +5,21 @@ from stripe._util import sanitize_id from stripe.v2.core._claimable_sandbox import ClaimableSandbox from typing import Optional, cast -from typing_extensions import NotRequired, TypedDict +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params.v2.core._claimable_sandbox_create_params import ( + ClaimableSandboxCreateParams, + ) + from stripe.params.v2.core._claimable_sandbox_retrieve_params import ( + ClaimableSandboxRetrieveParams, + ) -class ClaimableSandboxService(StripeService): - class CreateParams(TypedDict): - enable_mcp_access: bool - """ - If true, returns a key that can be used with [Stripe's MCP server](https://docs.stripe.com/mcp). - """ - prefill: "ClaimableSandboxService.CreateParamsPrefill" - """ - Values that are prefilled when a user claims the sandbox. When a user claims the sandbox, they will be able to update these values. - """ - - class CreateParamsPrefill(TypedDict): - country: str - """ - Country in which the account holder resides, or in which the business is legally established. - Use two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - """ - email: str - """ - Email that this sandbox is meant to be claimed by. Stripe will - notify this email address before the sandbox expires. - """ - name: NotRequired[str] - """ - Name for the sandbox. If not provided, this will be generated. - """ - - class RetrieveParams(TypedDict): - pass +class ClaimableSandboxService(StripeService): def create( self, - params: "ClaimableSandboxService.CreateParams", + params: "ClaimableSandboxCreateParams", options: Optional[RequestOptions] = None, ) -> ClaimableSandbox: """ @@ -60,7 +39,7 @@ def create( async def create_async( self, - params: "ClaimableSandboxService.CreateParams", + params: "ClaimableSandboxCreateParams", options: Optional[RequestOptions] = None, ) -> ClaimableSandbox: """ @@ -81,7 +60,7 @@ async def create_async( def retrieve( self, id: str, - params: Optional["ClaimableSandboxService.RetrieveParams"] = None, + params: Optional["ClaimableSandboxRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> ClaimableSandbox: """ @@ -103,7 +82,7 @@ def retrieve( async def retrieve_async( self, id: str, - params: Optional["ClaimableSandboxService.RetrieveParams"] = None, + params: Optional["ClaimableSandboxRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> ClaimableSandbox: """ diff --git a/stripe/v2/_event.py b/stripe/v2/core/_event.py similarity index 100% rename from stripe/v2/_event.py rename to stripe/v2/core/_event.py diff --git a/stripe/v2/_event_destination.py b/stripe/v2/core/_event_destination.py similarity index 100% rename from stripe/v2/_event_destination.py rename to stripe/v2/core/_event_destination.py diff --git a/stripe/v2/core/_event_destination_service.py b/stripe/v2/core/_event_destination_service.py index b165189e5..b72b61f00 100644 --- a/stripe/v2/core/_event_destination_service.py +++ b/stripe/v2/core/_event_destination_service.py @@ -4,151 +4,43 @@ from stripe._stripe_service import StripeService from stripe._util import sanitize_id from stripe.v2._deleted_object import DeletedObject -from stripe.v2._event import Event -from stripe.v2._event_destination import EventDestination from stripe.v2._list_object import ListObject -from typing import Dict, List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from stripe.v2.core._event import Event +from stripe.v2.core._event_destination import EventDestination +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params.v2.core._event_destination_create_params import ( + EventDestinationCreateParams, + ) + from stripe.params.v2.core._event_destination_delete_params import ( + EventDestinationDeleteParams, + ) + from stripe.params.v2.core._event_destination_disable_params import ( + EventDestinationDisableParams, + ) + from stripe.params.v2.core._event_destination_enable_params import ( + EventDestinationEnableParams, + ) + from stripe.params.v2.core._event_destination_list_params import ( + EventDestinationListParams, + ) + from stripe.params.v2.core._event_destination_ping_params import ( + EventDestinationPingParams, + ) + from stripe.params.v2.core._event_destination_retrieve_params import ( + EventDestinationRetrieveParams, + ) + from stripe.params.v2.core._event_destination_update_params import ( + EventDestinationUpdateParams, + ) -class EventDestinationService(StripeService): - class CreateParams(TypedDict): - description: NotRequired[str] - """ - An optional description of what the event destination is used for. - """ - enabled_events: List[str] - """ - The list of events to enable for this endpoint. - """ - event_payload: Literal["snapshot", "thin"] - """ - Payload type of events being subscribed to. - """ - events_from: NotRequired[List[Literal["other_accounts", "self"]]] - """ - Where events should be routed from. - """ - include: NotRequired[ - List[ - Literal[ - "webhook_endpoint.signing_secret", "webhook_endpoint.url" - ] - ] - ] - """ - Additional fields to include in the response. - """ - metadata: NotRequired[Dict[str, str]] - """ - Metadata. - """ - name: str - """ - Event destination name. - """ - snapshot_api_version: NotRequired[str] - """ - If using the snapshot event payload, the API version events are rendered as. - """ - type: Literal["amazon_eventbridge", "webhook_endpoint"] - """ - Event destination type. - """ - amazon_eventbridge: NotRequired[ - "EventDestinationService.CreateParamsAmazonEventbridge" - ] - """ - Amazon EventBridge configuration. - """ - webhook_endpoint: NotRequired[ - "EventDestinationService.CreateParamsWebhookEndpoint" - ] - """ - Webhook endpoint configuration. - """ - - class CreateParamsAmazonEventbridge(TypedDict): - aws_account_id: str - """ - The AWS account ID. - """ - aws_region: str - """ - The region of the AWS event source. - """ - - class CreateParamsWebhookEndpoint(TypedDict): - url: str - """ - The URL of the webhook endpoint. - """ - - class DeleteParams(TypedDict): - pass - - class DisableParams(TypedDict): - pass - - class EnableParams(TypedDict): - pass - - class ListParams(TypedDict): - include: NotRequired[List[Literal["webhook_endpoint.url"]]] - """ - Additional fields to include in the response. Currently supports `webhook_endpoint.url`. - """ - limit: NotRequired[int] - """ - The page size. - """ - - class PingParams(TypedDict): - pass - - class RetrieveParams(TypedDict): - include: NotRequired[List[Literal["webhook_endpoint.url"]]] - """ - Additional fields to include in the response. - """ - - class UpdateParams(TypedDict): - description: NotRequired[str] - """ - An optional description of what the event destination is used for. - """ - enabled_events: NotRequired[List[str]] - """ - The list of events to enable for this endpoint. - """ - include: NotRequired[List[Literal["webhook_endpoint.url"]]] - """ - Additional fields to include in the response. Currently supports `webhook_endpoint.url`. - """ - metadata: NotRequired[Dict[str, Optional[str]]] - """ - Metadata. - """ - name: NotRequired[str] - """ - Event destination name. - """ - webhook_endpoint: NotRequired[ - "EventDestinationService.UpdateParamsWebhookEndpoint" - ] - """ - Webhook endpoint configuration. - """ - - class UpdateParamsWebhookEndpoint(TypedDict): - url: str - """ - The URL of the webhook endpoint. - """ +class EventDestinationService(StripeService): def list( self, - params: Optional["EventDestinationService.ListParams"] = None, + params: Optional["EventDestinationListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[EventDestination]: """ @@ -167,7 +59,7 @@ def list( async def list_async( self, - params: Optional["EventDestinationService.ListParams"] = None, + params: Optional["EventDestinationListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[EventDestination]: """ @@ -186,7 +78,7 @@ async def list_async( def create( self, - params: "EventDestinationService.CreateParams", + params: "EventDestinationCreateParams", options: Optional[RequestOptions] = None, ) -> EventDestination: """ @@ -205,7 +97,7 @@ def create( async def create_async( self, - params: "EventDestinationService.CreateParams", + params: "EventDestinationCreateParams", options: Optional[RequestOptions] = None, ) -> EventDestination: """ @@ -225,7 +117,7 @@ async def create_async( def delete( self, id: str, - params: Optional["EventDestinationService.DeleteParams"] = None, + params: Optional["EventDestinationDeleteParams"] = None, options: Optional[RequestOptions] = None, ) -> DeletedObject: """ @@ -245,7 +137,7 @@ def delete( async def delete_async( self, id: str, - params: Optional["EventDestinationService.DeleteParams"] = None, + params: Optional["EventDestinationDeleteParams"] = None, options: Optional[RequestOptions] = None, ) -> DeletedObject: """ @@ -265,7 +157,7 @@ async def delete_async( def retrieve( self, id: str, - params: Optional["EventDestinationService.RetrieveParams"] = None, + params: Optional["EventDestinationRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> EventDestination: """ @@ -285,7 +177,7 @@ def retrieve( async def retrieve_async( self, id: str, - params: Optional["EventDestinationService.RetrieveParams"] = None, + params: Optional["EventDestinationRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> EventDestination: """ @@ -305,7 +197,7 @@ async def retrieve_async( def update( self, id: str, - params: Optional["EventDestinationService.UpdateParams"] = None, + params: Optional["EventDestinationUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> EventDestination: """ @@ -325,7 +217,7 @@ def update( async def update_async( self, id: str, - params: Optional["EventDestinationService.UpdateParams"] = None, + params: Optional["EventDestinationUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> EventDestination: """ @@ -345,7 +237,7 @@ async def update_async( def disable( self, id: str, - params: Optional["EventDestinationService.DisableParams"] = None, + params: Optional["EventDestinationDisableParams"] = None, options: Optional[RequestOptions] = None, ) -> EventDestination: """ @@ -367,7 +259,7 @@ def disable( async def disable_async( self, id: str, - params: Optional["EventDestinationService.DisableParams"] = None, + params: Optional["EventDestinationDisableParams"] = None, options: Optional[RequestOptions] = None, ) -> EventDestination: """ @@ -389,7 +281,7 @@ async def disable_async( def enable( self, id: str, - params: Optional["EventDestinationService.EnableParams"] = None, + params: Optional["EventDestinationEnableParams"] = None, options: Optional[RequestOptions] = None, ) -> EventDestination: """ @@ -411,7 +303,7 @@ def enable( async def enable_async( self, id: str, - params: Optional["EventDestinationService.EnableParams"] = None, + params: Optional["EventDestinationEnableParams"] = None, options: Optional[RequestOptions] = None, ) -> EventDestination: """ @@ -433,7 +325,7 @@ async def enable_async( def ping( self, id: str, - params: Optional["EventDestinationService.PingParams"] = None, + params: Optional["EventDestinationPingParams"] = None, options: Optional[RequestOptions] = None, ) -> Event: """ @@ -455,7 +347,7 @@ def ping( async def ping_async( self, id: str, - params: Optional["EventDestinationService.PingParams"] = None, + params: Optional["EventDestinationPingParams"] = None, options: Optional[RequestOptions] = None, ) -> Event: """ diff --git a/stripe/v2/core/_event_service.py b/stripe/v2/core/_event_service.py index 91bce1873..907f7dca7 100644 --- a/stripe/v2/core/_event_service.py +++ b/stripe/v2/core/_event_service.py @@ -3,29 +3,22 @@ from stripe._request_options import RequestOptions from stripe._stripe_service import StripeService from stripe._util import sanitize_id -from stripe.v2._event import Event from stripe.v2._list_object import ListObject +from stripe.v2.core._event import Event from typing import Optional, cast -from typing_extensions import NotRequired, TypedDict +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params.v2.core._event_list_params import EventListParams + from stripe.params.v2.core._event_retrieve_params import ( + EventRetrieveParams, + ) -class EventService(StripeService): - class ListParams(TypedDict): - limit: NotRequired[int] - """ - The page size. - """ - object_id: str - """ - Primary object ID used to retrieve related events. - """ - - class RetrieveParams(TypedDict): - pass +class EventService(StripeService): def list( self, - params: "EventService.ListParams", + params: "EventListParams", options: Optional[RequestOptions] = None, ) -> ListObject[Event]: """ @@ -44,7 +37,7 @@ def list( async def list_async( self, - params: "EventService.ListParams", + params: "EventListParams", options: Optional[RequestOptions] = None, ) -> ListObject[Event]: """ @@ -64,7 +57,7 @@ async def list_async( def retrieve( self, id: str, - params: Optional["EventService.RetrieveParams"] = None, + params: Optional["EventRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Event: """ @@ -84,7 +77,7 @@ def retrieve( async def retrieve_async( self, id: str, - params: Optional["EventService.RetrieveParams"] = None, + params: Optional["EventRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Event: """ diff --git a/stripe/v2/core/accounts/_person_service.py b/stripe/v2/core/accounts/_person_service.py index 0b182d0ec..4eebecc25 100644 --- a/stripe/v2/core/accounts/_person_service.py +++ b/stripe/v2/core/accounts/_person_service.py @@ -6,983 +6,32 @@ from stripe.v2._deleted_object import DeletedObject from stripe.v2._list_object import ListObject from stripe.v2.core._account_person import AccountPerson -from typing import Dict, List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params.v2.core.accounts._person_create_params import ( + PersonCreateParams, + ) + from stripe.params.v2.core.accounts._person_delete_params import ( + PersonDeleteParams, + ) + from stripe.params.v2.core.accounts._person_list_params import ( + PersonListParams, + ) + from stripe.params.v2.core.accounts._person_retrieve_params import ( + PersonRetrieveParams, + ) + from stripe.params.v2.core.accounts._person_update_params import ( + PersonUpdateParams, + ) class PersonService(StripeService): - class CreateParams(TypedDict): - additional_addresses: NotRequired[ - List["PersonService.CreateParamsAdditionalAddress"] - ] - """ - Additional addresses associated with the person. - """ - additional_names: NotRequired[ - List["PersonService.CreateParamsAdditionalName"] - ] - """ - Additional names (e.g. aliases) associated with the person. - """ - additional_terms_of_service: NotRequired[ - "PersonService.CreateParamsAdditionalTermsOfService" - ] - """ - Attestations of accepted terms of service agreements. - """ - address: NotRequired["PersonService.CreateParamsAddress"] - """ - The person's residential address. - """ - date_of_birth: NotRequired["PersonService.CreateParamsDateOfBirth"] - """ - The person's date of birth. - """ - documents: NotRequired["PersonService.CreateParamsDocuments"] - """ - Documents that may be submitted to satisfy various informational requests. - """ - email: NotRequired[str] - """ - Email. - """ - given_name: NotRequired[str] - """ - The person's first name. - """ - id_numbers: NotRequired[List["PersonService.CreateParamsIdNumber"]] - """ - The identification numbers (e.g., SSN) associated with the person. - """ - legal_gender: NotRequired[Literal["female", "male"]] - """ - The person's gender (International regulations require either "male" or "female"). - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. - """ - nationalities: NotRequired[List[str]] - """ - The nationalities (countries) this person is associated with. - """ - phone: NotRequired[str] - """ - The phone number for this person. - """ - political_exposure: NotRequired[Literal["existing", "none"]] - """ - The person's political exposure. - """ - relationship: NotRequired["PersonService.CreateParamsRelationship"] - """ - The relationship that this person has with the Account's business or legal entity. - """ - script_addresses: NotRequired[ - "PersonService.CreateParamsScriptAddresses" - ] - """ - The script addresses (e.g., non-Latin characters) associated with the person. - """ - script_names: NotRequired["PersonService.CreateParamsScriptNames"] - """ - The script names (e.g. non-Latin characters) associated with the person. - """ - surname: NotRequired[str] - """ - The person's last name. - """ - - class CreateParamsAdditionalAddress(TypedDict): - city: NotRequired[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[str] - """ - Address line 1 (e.g., street, PO Box, or company name). - """ - line2: NotRequired[str] - """ - Address line 2 (e.g., apartment, suite, unit, or building). - """ - postal_code: NotRequired[str] - """ - ZIP or postal code. - """ - purpose: Literal["registered"] - """ - Purpose of additional address. - """ - state: NotRequired[str] - """ - State, county, province, or region. - """ - town: NotRequired[str] - """ - Town or cho-me. - """ - - class CreateParamsAdditionalName(TypedDict): - full_name: NotRequired[str] - """ - The person's full name. - """ - given_name: NotRequired[str] - """ - The person's first or given name. - """ - purpose: Literal["alias", "maiden"] - """ - The purpose or type of the additional name. - """ - surname: NotRequired[str] - """ - The person's last or family name. - """ - - class CreateParamsAdditionalTermsOfService(TypedDict): - account: NotRequired[ - "PersonService.CreateParamsAdditionalTermsOfServiceAccount" - ] - """ - Stripe terms of service agreement. - """ - - class CreateParamsAdditionalTermsOfServiceAccount(TypedDict): - date: str - """ - The time when the Account's representative accepted the terms of service. Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: 2022-09-18T13:22:18.123Z. - """ - ip: str - """ - The IP address from which the Account's representative accepted the terms of service. - """ - user_agent: NotRequired[str] - """ - The user agent of the browser from which the Account's representative accepted the terms of service. - """ - - class CreateParamsAddress(TypedDict): - city: NotRequired[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[str] - """ - Address line 1 (e.g., street, PO Box, or company name). - """ - line2: NotRequired[str] - """ - Address line 2 (e.g., apartment, suite, unit, or building). - """ - postal_code: NotRequired[str] - """ - ZIP or postal code. - """ - state: NotRequired[str] - """ - State, county, province, or region. - """ - town: NotRequired[str] - """ - Town or cho-me. - """ - - class CreateParamsDateOfBirth(TypedDict): - day: int - """ - The day of birth. - """ - month: int - """ - The month of birth. - """ - year: int - """ - The year of birth. - """ - - class CreateParamsDocuments(TypedDict): - company_authorization: NotRequired[ - "PersonService.CreateParamsDocumentsCompanyAuthorization" - ] - """ - One or more documents that demonstrate proof that this person is authorized to represent the company. - """ - passport: NotRequired["PersonService.CreateParamsDocumentsPassport"] - """ - One or more documents showing the person's passport page with photo and personal data. - """ - primary_verification: NotRequired[ - "PersonService.CreateParamsDocumentsPrimaryVerification" - ] - """ - An identifying document showing the person's name, either a passport or local ID card. - """ - secondary_verification: NotRequired[ - "PersonService.CreateParamsDocumentsSecondaryVerification" - ] - """ - A document showing address, either a passport, local ID card, or utility bill from a well-known utility company. - """ - visa: NotRequired["PersonService.CreateParamsDocumentsVisa"] - """ - One or more documents showing the person's visa required for living in the country where they are residing. - """ - - class CreateParamsDocumentsCompanyAuthorization(TypedDict): - files: List[str] - """ - One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. - """ - type: Literal["files"] - """ - The format of the document. Currently supports `files` only. - """ - - class CreateParamsDocumentsPassport(TypedDict): - files: List[str] - """ - One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. - """ - type: Literal["files"] - """ - The format of the document. Currently supports `files` only. - """ - - class CreateParamsDocumentsPrimaryVerification(TypedDict): - front_back: ( - "PersonService.CreateParamsDocumentsPrimaryVerificationFrontBack" - ) - """ - The [file upload](https://docs.stripe.com/api/persons/update#create_file) tokens referring to each side of the document. - """ - type: Literal["front_back"] - """ - The format of the verification document. Currently supports `front_back` only. - """ - - class CreateParamsDocumentsPrimaryVerificationFrontBack(TypedDict): - back: NotRequired[str] - """ - A [file upload](https://docs.stripe.com/api/persons/update#create_file) token representing the back of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. - """ - front: str - """ - A [file upload](https://docs.stripe.com/api/persons/update#create_file) token representing the front of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. - """ - - class CreateParamsDocumentsSecondaryVerification(TypedDict): - front_back: ( - "PersonService.CreateParamsDocumentsSecondaryVerificationFrontBack" - ) - """ - The [file upload](https://docs.stripe.com/api/persons/update#create_file) tokens referring to each side of the document. - """ - type: Literal["front_back"] - """ - The format of the verification document. Currently supports `front_back` only. - """ - - class CreateParamsDocumentsSecondaryVerificationFrontBack(TypedDict): - back: NotRequired[str] - """ - A [file upload](https://docs.stripe.com/api/persons/update#create_file) token representing the back of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. - """ - front: str - """ - A [file upload](https://docs.stripe.com/api/persons/update#create_file) token representing the front of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. - """ - - class CreateParamsDocumentsVisa(TypedDict): - files: List[str] - """ - One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. - """ - type: Literal["files"] - """ - The format of the document. Currently supports `files` only. - """ - - class CreateParamsIdNumber(TypedDict): - type: Literal[ - "ae_eid", - "ao_nif", - "az_tin", - "bd_brc", - "bd_etin", - "bd_nid", - "br_cpf", - "cr_cpf", - "cr_dimex", - "cr_nite", - "de_stn", - "do_rcn", - "gt_nit", - "hk_id", - "kz_iin", - "mx_rfc", - "my_nric", - "mz_nuit", - "nl_bsn", - "pe_dni", - "pk_cnic", - "pk_snic", - "sa_tin", - "sg_fin", - "sg_nric", - "th_lc", - "th_pin", - "us_itin", - "us_itin_last_4", - "us_ssn", - "us_ssn_last_4", - ] - """ - The ID number type of an individual. - """ - value: str - """ - The value of the ID number. - """ - - class CreateParamsRelationship(TypedDict): - authorizer: NotRequired[bool] - """ - Whether the individual is an authorizer of the Account's legal entity. - """ - director: NotRequired[bool] - """ - Indicates whether the person is a director of the associated legal entity. - """ - executive: NotRequired[bool] - """ - Indicates whether the person is an executive of the associated legal entity. - """ - legal_guardian: NotRequired[bool] - """ - Indicates whether the person is a legal guardian of the associated legal entity. - """ - owner: NotRequired[bool] - """ - Indicates whether the person is an owner of the associated legal entity. - """ - percent_ownership: NotRequired[str] - """ - The percentage of ownership the person has in the associated legal entity. - """ - representative: NotRequired[bool] - """ - Indicates whether the person is a representative of the associated legal entity. - """ - title: NotRequired[str] - """ - The title or position the person holds in the associated legal entity. - """ - - class CreateParamsScriptAddresses(TypedDict): - kana: NotRequired["PersonService.CreateParamsScriptAddressesKana"] - """ - Kana Address. - """ - kanji: NotRequired["PersonService.CreateParamsScriptAddressesKanji"] - """ - Kanji Address. - """ - - class CreateParamsScriptAddressesKana(TypedDict): - city: NotRequired[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[str] - """ - Address line 1 (e.g., street, PO Box, or company name). - """ - line2: NotRequired[str] - """ - Address line 2 (e.g., apartment, suite, unit, or building). - """ - postal_code: NotRequired[str] - """ - ZIP or postal code. - """ - state: NotRequired[str] - """ - State, county, province, or region. - """ - town: NotRequired[str] - """ - Town or cho-me. - """ - - class CreateParamsScriptAddressesKanji(TypedDict): - city: NotRequired[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[str] - """ - Address line 1 (e.g., street, PO Box, or company name). - """ - line2: NotRequired[str] - """ - Address line 2 (e.g., apartment, suite, unit, or building). - """ - postal_code: NotRequired[str] - """ - ZIP or postal code. - """ - state: NotRequired[str] - """ - State, county, province, or region. - """ - town: NotRequired[str] - """ - Town or cho-me. - """ - - class CreateParamsScriptNames(TypedDict): - kana: NotRequired["PersonService.CreateParamsScriptNamesKana"] - """ - Persons name in kana script. - """ - kanji: NotRequired["PersonService.CreateParamsScriptNamesKanji"] - """ - Persons name in kanji script. - """ - - class CreateParamsScriptNamesKana(TypedDict): - given_name: NotRequired[str] - """ - The person's first or given name. - """ - surname: NotRequired[str] - """ - The person's last or family name. - """ - - class CreateParamsScriptNamesKanji(TypedDict): - given_name: NotRequired[str] - """ - The person's first or given name. - """ - surname: NotRequired[str] - """ - The person's last or family name. - """ - - class DeleteParams(TypedDict): - pass - - class ListParams(TypedDict): - limit: NotRequired[int] - """ - The upper limit on the number of accounts returned by the List Account request. - """ - - class RetrieveParams(TypedDict): - pass - - class UpdateParams(TypedDict): - additional_addresses: NotRequired[ - List["PersonService.UpdateParamsAdditionalAddress"] - ] - """ - Additional addresses associated with the person. - """ - additional_names: NotRequired[ - List["PersonService.UpdateParamsAdditionalName"] - ] - """ - Additional names (e.g. aliases) associated with the person. - """ - additional_terms_of_service: NotRequired[ - "PersonService.UpdateParamsAdditionalTermsOfService" - ] - """ - Attestations of accepted terms of service agreements. - """ - address: NotRequired["PersonService.UpdateParamsAddress"] - """ - The primary address associated with the person. - """ - date_of_birth: NotRequired["PersonService.UpdateParamsDateOfBirth"] - """ - The person's date of birth. - """ - documents: NotRequired["PersonService.UpdateParamsDocuments"] - """ - Documents that may be submitted to satisfy various informational requests. - """ - email: NotRequired[str] - """ - Email. - """ - given_name: NotRequired[str] - """ - The person's first name. - """ - id_numbers: NotRequired[List["PersonService.UpdateParamsIdNumber"]] - """ - The identification numbers (e.g., SSN) associated with the person. - """ - legal_gender: NotRequired[Literal["female", "male"]] - """ - The person's gender (International regulations require either "male" or "female"). - """ - metadata: NotRequired[Dict[str, Optional[str]]] - """ - Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. - """ - nationalities: NotRequired[List[str]] - """ - The nationalities (countries) this person is associated with. - """ - phone: NotRequired[str] - """ - The phone number for this person. - """ - political_exposure: NotRequired[Literal["existing", "none"]] - """ - The person's political exposure. - """ - relationship: NotRequired["PersonService.UpdateParamsRelationship"] - """ - The relationship that this person has with the Account's business or legal entity. - """ - script_addresses: NotRequired[ - "PersonService.UpdateParamsScriptAddresses" - ] - """ - The script addresses (e.g., non-Latin characters) associated with the person. - """ - script_names: NotRequired["PersonService.UpdateParamsScriptNames"] - """ - The script names (e.g. non-Latin characters) associated with the person. - """ - surname: NotRequired[str] - """ - The person's last name. - """ - - class UpdateParamsAdditionalAddress(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 (e.g., street, PO Box, or company name). - """ - line2: NotRequired[str] - """ - Address line 2 (e.g., apartment, suite, unit, or building). - """ - postal_code: NotRequired[str] - """ - ZIP or postal code. - """ - purpose: Literal["registered"] - """ - Purpose of additional address. - """ - state: NotRequired[str] - """ - State, county, province, or region. - """ - town: NotRequired[str] - """ - Town or cho-me. - """ - - class UpdateParamsAdditionalName(TypedDict): - full_name: NotRequired[str] - """ - The person's full name. - """ - given_name: NotRequired[str] - """ - The person's first or given name. - """ - purpose: Literal["alias", "maiden"] - """ - The purpose or type of the additional name. - """ - surname: NotRequired[str] - """ - The person's last or family name. - """ - - class UpdateParamsAdditionalTermsOfService(TypedDict): - account: NotRequired[ - "PersonService.UpdateParamsAdditionalTermsOfServiceAccount" - ] - """ - Stripe terms of service agreement. - """ - - class UpdateParamsAdditionalTermsOfServiceAccount(TypedDict): - date: NotRequired[str] - """ - The time when the Account's representative accepted the terms of service. Represented as a RFC 3339 date & time UTC value in millisecond precision, for example: 2022-09-18T13:22:18.123Z. - """ - ip: NotRequired[str] - """ - The IP address from which the Account's representative accepted the terms of service. - """ - user_agent: NotRequired[str] - """ - The user agent of the browser from which the Account's representative accepted the terms of service. - """ - - class UpdateParamsAddress(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 (e.g., street, PO Box, or company name). - """ - line2: NotRequired[str] - """ - Address line 2 (e.g., apartment, suite, unit, or building). - """ - postal_code: NotRequired[str] - """ - ZIP or postal code. - """ - state: NotRequired[str] - """ - State, county, province, or region. - """ - town: NotRequired[str] - """ - Town or cho-me. - """ - - class UpdateParamsDateOfBirth(TypedDict): - day: int - """ - The day of the birth. - """ - month: int - """ - The month of birth. - """ - year: int - """ - The year of birth. - """ - - class UpdateParamsDocuments(TypedDict): - company_authorization: NotRequired[ - "PersonService.UpdateParamsDocumentsCompanyAuthorization" - ] - """ - One or more documents that demonstrate proof that this person is authorized to represent the company. - """ - passport: NotRequired["PersonService.UpdateParamsDocumentsPassport"] - """ - One or more documents showing the person's passport page with photo and personal data. - """ - primary_verification: NotRequired[ - "PersonService.UpdateParamsDocumentsPrimaryVerification" - ] - """ - An identifying document showing the person's name, either a passport or local ID card. - """ - secondary_verification: NotRequired[ - "PersonService.UpdateParamsDocumentsSecondaryVerification" - ] - """ - A document showing address, either a passport, local ID card, or utility bill from a well-known utility company. - """ - visa: NotRequired["PersonService.UpdateParamsDocumentsVisa"] - """ - One or more documents showing the person's visa required for living in the country where they are residing. - """ - - class UpdateParamsDocumentsCompanyAuthorization(TypedDict): - files: List[str] - """ - One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. - """ - type: Literal["files"] - """ - The format of the document. Currently supports `files` only. - """ - - class UpdateParamsDocumentsPassport(TypedDict): - files: List[str] - """ - One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. - """ - type: Literal["files"] - """ - The format of the document. Currently supports `files` only. - """ - - class UpdateParamsDocumentsPrimaryVerification(TypedDict): - front_back: ( - "PersonService.UpdateParamsDocumentsPrimaryVerificationFrontBack" - ) - """ - The [file upload](https://docs.stripe.com/api/persons/update#create_file) tokens referring to each side of the document. - """ - type: Literal["front_back"] - """ - The format of the verification document. Currently supports `front_back` only. - """ - - class UpdateParamsDocumentsPrimaryVerificationFrontBack(TypedDict): - back: NotRequired[str] - """ - A [file upload](https://docs.stripe.com/api/persons/update#create_file) token representing the back of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. - """ - front: NotRequired[str] - """ - A [file upload](https://docs.stripe.com/api/persons/update#create_file) token representing the front of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. - """ - - class UpdateParamsDocumentsSecondaryVerification(TypedDict): - front_back: ( - "PersonService.UpdateParamsDocumentsSecondaryVerificationFrontBack" - ) - """ - The [file upload](https://docs.stripe.com/api/persons/update#create_file) tokens referring to each side of the document. - """ - type: Literal["front_back"] - """ - The format of the verification document. Currently supports `front_back` only. - """ - - class UpdateParamsDocumentsSecondaryVerificationFrontBack(TypedDict): - back: NotRequired[str] - """ - A [file upload](https://docs.stripe.com/api/persons/update#create_file) token representing the back of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. - """ - front: NotRequired[str] - """ - A [file upload](https://docs.stripe.com/api/persons/update#create_file) token representing the front of the verification document. The purpose of the uploaded file should be 'identity_document'. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. - """ - - class UpdateParamsDocumentsVisa(TypedDict): - files: List[str] - """ - One or more document IDs returned by a [file upload](https://docs.stripe.com/api/persons/update#create_file) with a purpose value of `account_requirement`. - """ - type: Literal["files"] - """ - The format of the document. Currently supports `files` only. - """ - - class UpdateParamsIdNumber(TypedDict): - type: Literal[ - "ae_eid", - "ao_nif", - "az_tin", - "bd_brc", - "bd_etin", - "bd_nid", - "br_cpf", - "cr_cpf", - "cr_dimex", - "cr_nite", - "de_stn", - "do_rcn", - "gt_nit", - "hk_id", - "kz_iin", - "mx_rfc", - "my_nric", - "mz_nuit", - "nl_bsn", - "pe_dni", - "pk_cnic", - "pk_snic", - "sa_tin", - "sg_fin", - "sg_nric", - "th_lc", - "th_pin", - "us_itin", - "us_itin_last_4", - "us_ssn", - "us_ssn_last_4", - ] - """ - The ID number type of an individual. - """ - value: str - """ - The value of the ID number. - """ - - class UpdateParamsRelationship(TypedDict): - authorizer: NotRequired[bool] - """ - Whether the individual is an authorizer of the Account's legal entity. - """ - director: NotRequired[bool] - """ - Indicates whether the person is a director of the associated legal entity. - """ - executive: NotRequired[bool] - """ - Indicates whether the person is an executive of the associated legal entity. - """ - legal_guardian: NotRequired[bool] - """ - Indicates whether the person is a legal guardian of the associated legal entity. - """ - owner: NotRequired[bool] - """ - Indicates whether the person is an owner of the associated legal entity. - """ - percent_ownership: NotRequired[str] - """ - The percentage of ownership the person has in the associated legal entity. - """ - representative: NotRequired[bool] - """ - Indicates whether the person is a representative of the associated legal entity. - """ - title: NotRequired[str] - """ - The title or position the person holds in the associated legal entity. - """ - - class UpdateParamsScriptAddresses(TypedDict): - kana: NotRequired["PersonService.UpdateParamsScriptAddressesKana"] - """ - Kana Address. - """ - kanji: NotRequired["PersonService.UpdateParamsScriptAddressesKanji"] - """ - Kanji Address. - """ - - class UpdateParamsScriptAddressesKana(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 (e.g., street, PO Box, or company name). - """ - line2: NotRequired[str] - """ - Address line 2 (e.g., apartment, suite, unit, or building). - """ - postal_code: NotRequired[str] - """ - ZIP or postal code. - """ - state: NotRequired[str] - """ - State, county, province, or region. - """ - town: NotRequired[str] - """ - Town or cho-me. - """ - - class UpdateParamsScriptAddressesKanji(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 (e.g., street, PO Box, or company name). - """ - line2: NotRequired[str] - """ - Address line 2 (e.g., apartment, suite, unit, or building). - """ - postal_code: NotRequired[str] - """ - ZIP or postal code. - """ - state: NotRequired[str] - """ - State, county, province, or region. - """ - town: NotRequired[str] - """ - Town or cho-me. - """ - - class UpdateParamsScriptNames(TypedDict): - kana: NotRequired["PersonService.UpdateParamsScriptNamesKana"] - """ - Persons name in kana script. - """ - kanji: NotRequired["PersonService.UpdateParamsScriptNamesKanji"] - """ - Persons name in kanji script. - """ - - class UpdateParamsScriptNamesKana(TypedDict): - given_name: NotRequired[str] - """ - The person's first or given name. - """ - surname: NotRequired[str] - """ - The person's last or family name. - """ - - class UpdateParamsScriptNamesKanji(TypedDict): - given_name: NotRequired[str] - """ - The person's first or given name. - """ - surname: NotRequired[str] - """ - The person's last or family name. - """ - def list( self, account_id: str, - params: Optional["PersonService.ListParams"] = None, + params: Optional["PersonListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[AccountPerson]: """ @@ -1004,7 +53,7 @@ def list( async def list_async( self, account_id: str, - params: Optional["PersonService.ListParams"] = None, + params: Optional["PersonListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[AccountPerson]: """ @@ -1026,7 +75,7 @@ async def list_async( def create( self, account_id: str, - params: Optional["PersonService.CreateParams"] = None, + params: Optional["PersonCreateParams"] = None, options: Optional[RequestOptions] = None, ) -> AccountPerson: """ @@ -1048,7 +97,7 @@ def create( async def create_async( self, account_id: str, - params: Optional["PersonService.CreateParams"] = None, + params: Optional["PersonCreateParams"] = None, options: Optional[RequestOptions] = None, ) -> AccountPerson: """ @@ -1071,7 +120,7 @@ def delete( self, account_id: str, id: str, - params: Optional["PersonService.DeleteParams"] = None, + params: Optional["PersonDeleteParams"] = None, options: Optional[RequestOptions] = None, ) -> DeletedObject: """ @@ -1095,7 +144,7 @@ async def delete_async( self, account_id: str, id: str, - params: Optional["PersonService.DeleteParams"] = None, + params: Optional["PersonDeleteParams"] = None, options: Optional[RequestOptions] = None, ) -> DeletedObject: """ @@ -1119,7 +168,7 @@ def retrieve( self, account_id: str, id: str, - params: Optional["PersonService.RetrieveParams"] = None, + params: Optional["PersonRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> AccountPerson: """ @@ -1143,7 +192,7 @@ async def retrieve_async( self, account_id: str, id: str, - params: Optional["PersonService.RetrieveParams"] = None, + params: Optional["PersonRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> AccountPerson: """ @@ -1167,7 +216,7 @@ def update( self, account_id: str, id: str, - params: Optional["PersonService.UpdateParams"] = None, + params: Optional["PersonUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> AccountPerson: """ @@ -1191,7 +240,7 @@ async def update_async( self, account_id: str, id: str, - params: Optional["PersonService.UpdateParams"] = None, + params: Optional["PersonUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> AccountPerson: """ diff --git a/stripe/v2/core/vault/_gb_bank_account_service.py b/stripe/v2/core/vault/_gb_bank_account_service.py index f5ba1ec2c..f7fbba95c 100644 --- a/stripe/v2/core/vault/_gb_bank_account_service.py +++ b/stripe/v2/core/vault/_gb_bank_account_service.py @@ -5,69 +5,30 @@ from stripe._util import sanitize_id from stripe.v2.core.vault._gb_bank_account import GbBankAccount from typing import Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params.v2.core.vault._gb_bank_account_acknowledge_confirmation_of_payee_params import ( + GbBankAccountAcknowledgeConfirmationOfPayeeParams, + ) + from stripe.params.v2.core.vault._gb_bank_account_archive_params import ( + GbBankAccountArchiveParams, + ) + from stripe.params.v2.core.vault._gb_bank_account_create_params import ( + GbBankAccountCreateParams, + ) + from stripe.params.v2.core.vault._gb_bank_account_initiate_confirmation_of_payee_params import ( + GbBankAccountInitiateConfirmationOfPayeeParams, + ) + from stripe.params.v2.core.vault._gb_bank_account_retrieve_params import ( + GbBankAccountRetrieveParams, + ) -class GbBankAccountService(StripeService): - class AcknowledgeConfirmationOfPayeeParams(TypedDict): - pass - - class ArchiveParams(TypedDict): - pass - - class CreateParams(TypedDict): - account_number: str - """ - The Account Number of the bank account. - """ - bank_account_type: NotRequired[Literal["checking", "savings"]] - """ - Closed Enum. The type of the bank account (checking or savings). - """ - confirmation_of_payee: NotRequired[ - "GbBankAccountService.CreateParamsConfirmationOfPayee" - ] - """ - Whether or not to automatically perform Confirmation of Payee to verify the users information - against what was provided by the bank. Doing so is required for all bank accounts not owned - by you before making domestic UK OutboundPayments. - """ - sort_code: str - """ - The Sort Code of the bank account. - """ - - class CreateParamsConfirmationOfPayee(TypedDict): - business_type: NotRequired[Literal["business", "personal"]] - """ - The business type to be checked against. Legal entity information will be used if unspecified. - Closed enum. - """ - initiate: bool - """ - User specifies whether Confirmation of Payee is automatically initiated when creating the bank account. - """ - name: NotRequired[str] - """ - The name to be checked against. Legal entity information will be used if unspecified. - """ - - class InitiateConfirmationOfPayeeParams(TypedDict): - business_type: NotRequired[Literal["business", "personal"]] - """ - The business type to be checked against. Legal entity information will be used if unspecified. - """ - name: NotRequired[str] - """ - The name of the user to be checked against. Legal entity information will be used if unspecified. - """ - - class RetrieveParams(TypedDict): - pass +class GbBankAccountService(StripeService): def create( self, - params: "GbBankAccountService.CreateParams", + params: "GbBankAccountCreateParams", options: Optional[RequestOptions] = None, ) -> GbBankAccount: """ @@ -86,7 +47,7 @@ def create( async def create_async( self, - params: "GbBankAccountService.CreateParams", + params: "GbBankAccountCreateParams", options: Optional[RequestOptions] = None, ) -> GbBankAccount: """ @@ -106,7 +67,7 @@ async def create_async( def retrieve( self, id: str, - params: Optional["GbBankAccountService.RetrieveParams"] = None, + params: Optional["GbBankAccountRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> GbBankAccount: """ @@ -128,7 +89,7 @@ def retrieve( async def retrieve_async( self, id: str, - params: Optional["GbBankAccountService.RetrieveParams"] = None, + params: Optional["GbBankAccountRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> GbBankAccount: """ @@ -151,7 +112,7 @@ def acknowledge_confirmation_of_payee( self, id: str, params: Optional[ - "GbBankAccountService.AcknowledgeConfirmationOfPayeeParams" + "GbBankAccountAcknowledgeConfirmationOfPayeeParams" ] = None, options: Optional[RequestOptions] = None, ) -> GbBankAccount: @@ -178,7 +139,7 @@ async def acknowledge_confirmation_of_payee_async( self, id: str, params: Optional[ - "GbBankAccountService.AcknowledgeConfirmationOfPayeeParams" + "GbBankAccountAcknowledgeConfirmationOfPayeeParams" ] = None, options: Optional[RequestOptions] = None, ) -> GbBankAccount: @@ -204,7 +165,7 @@ async def acknowledge_confirmation_of_payee_async( def archive( self, id: str, - params: Optional["GbBankAccountService.ArchiveParams"] = None, + params: Optional["GbBankAccountArchiveParams"] = None, options: Optional[RequestOptions] = None, ) -> GbBankAccount: """ @@ -227,7 +188,7 @@ def archive( async def archive_async( self, id: str, - params: Optional["GbBankAccountService.ArchiveParams"] = None, + params: Optional["GbBankAccountArchiveParams"] = None, options: Optional[RequestOptions] = None, ) -> GbBankAccount: """ @@ -251,7 +212,7 @@ def initiate_confirmation_of_payee( self, id: str, params: Optional[ - "GbBankAccountService.InitiateConfirmationOfPayeeParams" + "GbBankAccountInitiateConfirmationOfPayeeParams" ] = None, options: Optional[RequestOptions] = None, ) -> GbBankAccount: @@ -278,7 +239,7 @@ async def initiate_confirmation_of_payee_async( self, id: str, params: Optional[ - "GbBankAccountService.InitiateConfirmationOfPayeeParams" + "GbBankAccountInitiateConfirmationOfPayeeParams" ] = None, options: Optional[RequestOptions] = None, ) -> GbBankAccount: diff --git a/stripe/v2/core/vault/_us_bank_account_service.py b/stripe/v2/core/vault/_us_bank_account_service.py index bd71f072a..0be98c31d 100644 --- a/stripe/v2/core/vault/_us_bank_account_service.py +++ b/stripe/v2/core/vault/_us_bank_account_service.py @@ -5,47 +5,27 @@ from stripe._util import sanitize_id from stripe.v2.core.vault._us_bank_account import UsBankAccount from typing import Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params.v2.core.vault._us_bank_account_archive_params import ( + UsBankAccountArchiveParams, + ) + from stripe.params.v2.core.vault._us_bank_account_create_params import ( + UsBankAccountCreateParams, + ) + from stripe.params.v2.core.vault._us_bank_account_retrieve_params import ( + UsBankAccountRetrieveParams, + ) + from stripe.params.v2.core.vault._us_bank_account_update_params import ( + UsBankAccountUpdateParams, + ) -class UsBankAccountService(StripeService): - class ArchiveParams(TypedDict): - pass - - class CreateParams(TypedDict): - account_number: str - """ - The account number of the bank account. - """ - bank_account_type: NotRequired[Literal["checking", "savings"]] - """ - Closed Enum. The type of the bank account (checking or savings). - """ - fedwire_routing_number: NotRequired[str] - """ - The fedwire routing number of the bank account. Note that certain banks have the same ACH and wire routing number. - """ - routing_number: NotRequired[str] - """ - The ACH routing number of the bank account. Note that certain banks have the same ACH and wire routing number. - """ - - class RetrieveParams(TypedDict): - pass - - class UpdateParams(TypedDict): - fedwire_routing_number: NotRequired[str] - """ - The bank account's fedwire routing number can be provided for update it was were empty previously. - """ - routing_number: NotRequired[str] - """ - The bank account's ACH routing number can be provided for update if it was empty previously. - """ +class UsBankAccountService(StripeService): def create( self, - params: "UsBankAccountService.CreateParams", + params: "UsBankAccountCreateParams", options: Optional[RequestOptions] = None, ) -> UsBankAccount: """ @@ -64,7 +44,7 @@ def create( async def create_async( self, - params: "UsBankAccountService.CreateParams", + params: "UsBankAccountCreateParams", options: Optional[RequestOptions] = None, ) -> UsBankAccount: """ @@ -84,7 +64,7 @@ async def create_async( def retrieve( self, id: str, - params: Optional["UsBankAccountService.RetrieveParams"] = None, + params: Optional["UsBankAccountRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> UsBankAccount: """ @@ -106,7 +86,7 @@ def retrieve( async def retrieve_async( self, id: str, - params: Optional["UsBankAccountService.RetrieveParams"] = None, + params: Optional["UsBankAccountRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> UsBankAccount: """ @@ -128,7 +108,7 @@ async def retrieve_async( def update( self, id: str, - params: Optional["UsBankAccountService.UpdateParams"] = None, + params: Optional["UsBankAccountUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> UsBankAccount: """ @@ -150,7 +130,7 @@ def update( async def update_async( self, id: str, - params: Optional["UsBankAccountService.UpdateParams"] = None, + params: Optional["UsBankAccountUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> UsBankAccount: """ @@ -172,7 +152,7 @@ async def update_async( def archive( self, id: str, - params: Optional["UsBankAccountService.ArchiveParams"] = None, + params: Optional["UsBankAccountArchiveParams"] = None, options: Optional[RequestOptions] = None, ) -> UsBankAccount: """ @@ -196,7 +176,7 @@ def archive( async def archive_async( self, id: str, - params: Optional["UsBankAccountService.ArchiveParams"] = None, + params: Optional["UsBankAccountArchiveParams"] = None, options: Optional[RequestOptions] = None, ) -> UsBankAccount: """ diff --git a/stripe/v2/money_management/_adjustment_service.py b/stripe/v2/money_management/_adjustment_service.py index fd8504659..caac27d30 100644 --- a/stripe/v2/money_management/_adjustment_service.py +++ b/stripe/v2/money_management/_adjustment_service.py @@ -6,51 +6,21 @@ from stripe.v2._list_object import ListObject from stripe.v2.money_management._adjustment import Adjustment from typing import Optional, cast -from typing_extensions import NotRequired, TypedDict +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params.v2.money_management._adjustment_list_params import ( + AdjustmentListParams, + ) + from stripe.params.v2.money_management._adjustment_retrieve_params import ( + AdjustmentRetrieveParams, + ) -class AdjustmentService(StripeService): - class ListParams(TypedDict): - adjusted_flow: NotRequired[str] - """ - Filter for Adjustments linked to a Flow. - """ - created: NotRequired[str] - """ - Filter for objects created at the specified timestamp. - Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. - """ - created_gt: NotRequired[str] - """ - Filter for objects created after the specified timestamp. - Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. - """ - created_gte: NotRequired[str] - """ - Filter for objects created on or after the specified timestamp. - Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. - """ - created_lt: NotRequired[str] - """ - Filter for objects created before the specified timestamp. - Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. - """ - created_lte: NotRequired[str] - """ - 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. - """ - limit: NotRequired[int] - """ - The page limit. - """ - - class RetrieveParams(TypedDict): - pass +class AdjustmentService(StripeService): def list( self, - params: Optional["AdjustmentService.ListParams"] = None, + params: Optional["AdjustmentListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[Adjustment]: """ @@ -69,7 +39,7 @@ def list( async def list_async( self, - params: Optional["AdjustmentService.ListParams"] = None, + params: Optional["AdjustmentListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[Adjustment]: """ @@ -89,7 +59,7 @@ async def list_async( def retrieve( self, id: str, - params: Optional["AdjustmentService.RetrieveParams"] = None, + params: Optional["AdjustmentRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Adjustment: """ @@ -111,7 +81,7 @@ def retrieve( async def retrieve_async( self, id: str, - params: Optional["AdjustmentService.RetrieveParams"] = None, + params: Optional["AdjustmentRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Adjustment: """ diff --git a/stripe/v2/money_management/_financial_account_service.py b/stripe/v2/money_management/_financial_account_service.py index 181a9ce4b..a6f8312eb 100644 --- a/stripe/v2/money_management/_financial_account_service.py +++ b/stripe/v2/money_management/_financial_account_service.py @@ -5,69 +5,28 @@ from stripe._util import sanitize_id from stripe.v2._list_object import ListObject from stripe.v2.money_management._financial_account import FinancialAccount -from typing import Dict, List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params.v2.money_management._financial_account_close_params import ( + FinancialAccountCloseParams, + ) + from stripe.params.v2.money_management._financial_account_create_params import ( + FinancialAccountCreateParams, + ) + from stripe.params.v2.money_management._financial_account_list_params import ( + FinancialAccountListParams, + ) + from stripe.params.v2.money_management._financial_account_retrieve_params import ( + FinancialAccountRetrieveParams, + ) -class FinancialAccountService(StripeService): - class CloseParams(TypedDict): - forwarding_settings: NotRequired[ - "FinancialAccountService.CloseParamsForwardingSettings" - ] - """ - The addresses to forward any incoming transactions to. - """ - - class CloseParamsForwardingSettings(TypedDict): - payment_method: NotRequired[str] - """ - The address to send forwarded payments to. - """ - payout_method: NotRequired[str] - """ - The address to send forwarded payouts to. - """ - - class CreateParams(TypedDict): - display_name: NotRequired[str] - """ - A descriptive name for the FinancialAccount, up to 50 characters long. This name will be used in the Stripe Dashboard and embedded components. - """ - metadata: NotRequired[Dict[str, str]] - """ - Metadata associated with the FinancialAccount. - """ - storage: NotRequired["FinancialAccountService.CreateParamsStorage"] - """ - Parameters specific to creating `storage` type FinancialAccounts. - """ - type: Literal["storage"] - """ - The type of FinancialAccount to create. - """ - - class CreateParamsStorage(TypedDict): - holds_currencies: List[str] - """ - The currencies that this FinancialAccount can hold. - """ - - class ListParams(TypedDict): - limit: NotRequired[int] - """ - The page limit. - """ - status: NotRequired[Literal["closed", "open", "pending"]] - """ - The status of the FinancialAccount to filter by. By default, closed FinancialAccounts are not returned. - """ - - class RetrieveParams(TypedDict): - pass +class FinancialAccountService(StripeService): def list( self, - params: Optional["FinancialAccountService.ListParams"] = None, + params: Optional["FinancialAccountListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[FinancialAccount]: """ @@ -86,7 +45,7 @@ def list( async def list_async( self, - params: Optional["FinancialAccountService.ListParams"] = None, + params: Optional["FinancialAccountListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[FinancialAccount]: """ @@ -105,7 +64,7 @@ async def list_async( def create( self, - params: "FinancialAccountService.CreateParams", + params: "FinancialAccountCreateParams", options: Optional[RequestOptions] = None, ) -> FinancialAccount: """ @@ -124,7 +83,7 @@ def create( async def create_async( self, - params: "FinancialAccountService.CreateParams", + params: "FinancialAccountCreateParams", options: Optional[RequestOptions] = None, ) -> FinancialAccount: """ @@ -144,7 +103,7 @@ async def create_async( def retrieve( self, id: str, - params: Optional["FinancialAccountService.RetrieveParams"] = None, + params: Optional["FinancialAccountRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> FinancialAccount: """ @@ -166,7 +125,7 @@ def retrieve( async def retrieve_async( self, id: str, - params: Optional["FinancialAccountService.RetrieveParams"] = None, + params: Optional["FinancialAccountRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> FinancialAccount: """ @@ -188,7 +147,7 @@ async def retrieve_async( def close( self, id: str, - params: Optional["FinancialAccountService.CloseParams"] = None, + params: Optional["FinancialAccountCloseParams"] = None, options: Optional[RequestOptions] = None, ) -> FinancialAccount: """ @@ -210,7 +169,7 @@ def close( async def close_async( self, id: str, - params: Optional["FinancialAccountService.CloseParams"] = None, + params: Optional["FinancialAccountCloseParams"] = None, options: Optional[RequestOptions] = None, ) -> FinancialAccount: """ diff --git a/stripe/v2/money_management/_financial_address_service.py b/stripe/v2/money_management/_financial_address_service.py index 1a7e7d8d5..f424c8d48 100644 --- a/stripe/v2/money_management/_financial_address_service.py +++ b/stripe/v2/money_management/_financial_address_service.py @@ -5,74 +5,25 @@ from stripe._util import sanitize_id from stripe.v2._list_object import ListObject from stripe.v2.money_management._financial_address import FinancialAddress -from typing import List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params.v2.money_management._financial_address_create_params import ( + FinancialAddressCreateParams, + ) + from stripe.params.v2.money_management._financial_address_list_params import ( + FinancialAddressListParams, + ) + from stripe.params.v2.money_management._financial_address_retrieve_params import ( + FinancialAddressRetrieveParams, + ) -class FinancialAddressService(StripeService): - class CreateParams(TypedDict): - financial_account: str - """ - The ID of the FinancialAccount the new FinancialAddress should be associated with. - """ - sepa_bank_account: NotRequired[ - "FinancialAddressService.CreateParamsSepaBankAccount" - ] - """ - Optional SEPA Bank account options, used to configure the type of SEPA Bank account to create, such as the originating country. - """ - type: Literal[ - "gb_bank_account", "sepa_bank_account", "us_bank_account" - ] - """ - The type of FinancialAddress details to provision. - """ - - class CreateParamsSepaBankAccount(TypedDict): - country: str - """ - The originating country of the SEPA Bank account. - """ - - class ListParams(TypedDict): - financial_account: NotRequired[str] - """ - The ID of the FinancialAccount for which FinancialAddresses are to be returned. - """ - include: NotRequired[ - List[ - Literal[ - "credentials.gb_bank_account.account_number", - "credentials.sepa_bank_account.iban", - "credentials.us_bank_account.account_number", - ] - ] - ] - """ - Open Enum. A list of fields to reveal in the FinancialAddresses returned. - """ - limit: NotRequired[int] - """ - The page limit. - """ - - class RetrieveParams(TypedDict): - include: NotRequired[ - List[ - Literal[ - "credentials.gb_bank_account.account_number", - "credentials.sepa_bank_account.iban", - "credentials.us_bank_account.account_number", - ] - ] - ] - """ - Open Enum. A list of fields to reveal in the FinancialAddresses returned. - """ +class FinancialAddressService(StripeService): def list( self, - params: Optional["FinancialAddressService.ListParams"] = None, + params: Optional["FinancialAddressListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[FinancialAddress]: """ @@ -91,7 +42,7 @@ def list( async def list_async( self, - params: Optional["FinancialAddressService.ListParams"] = None, + params: Optional["FinancialAddressListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[FinancialAddress]: """ @@ -110,7 +61,7 @@ async def list_async( def create( self, - params: "FinancialAddressService.CreateParams", + params: "FinancialAddressCreateParams", options: Optional[RequestOptions] = None, ) -> FinancialAddress: """ @@ -129,7 +80,7 @@ def create( async def create_async( self, - params: "FinancialAddressService.CreateParams", + params: "FinancialAddressCreateParams", options: Optional[RequestOptions] = None, ) -> FinancialAddress: """ @@ -149,7 +100,7 @@ async def create_async( def retrieve( self, id: str, - params: Optional["FinancialAddressService.RetrieveParams"] = None, + params: Optional["FinancialAddressRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> FinancialAddress: """ @@ -171,7 +122,7 @@ def retrieve( async def retrieve_async( self, id: str, - params: Optional["FinancialAddressService.RetrieveParams"] = None, + params: Optional["FinancialAddressRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> FinancialAddress: """ diff --git a/stripe/v2/money_management/_inbound_transfer_service.py b/stripe/v2/money_management/_inbound_transfer_service.py index ff6e0fd46..3fcc39feb 100644 --- a/stripe/v2/money_management/_inbound_transfer_service.py +++ b/stripe/v2/money_management/_inbound_transfer_service.py @@ -3,91 +3,27 @@ from stripe._request_options import RequestOptions from stripe._stripe_service import StripeService from stripe._util import sanitize_id -from stripe.v2._amount import AmountParam from stripe.v2._list_object import ListObject from stripe.v2.money_management._inbound_transfer import InboundTransfer from typing import Optional, cast -from typing_extensions import NotRequired, TypedDict +from typing_extensions import TYPE_CHECKING - -class InboundTransferService(StripeService): - _CreateParamsBase = TypedDict( - "CreateParams", - {"from": "InboundTransferService.CreateParamsFrom"}, +if TYPE_CHECKING: + from stripe.params.v2.money_management._inbound_transfer_create_params import ( + InboundTransferCreateParams, + ) + from stripe.params.v2.money_management._inbound_transfer_list_params import ( + InboundTransferListParams, + ) + from stripe.params.v2.money_management._inbound_transfer_retrieve_params import ( + InboundTransferRetrieveParams, ) - class CreateParams(_CreateParamsBase): - amount: AmountParam - """ - The amount, in specified currency, by which the FinancialAccount balance will increase due to the InboundTransfer. - """ - description: NotRequired[str] - """ - An optional, freeform description field intended to store metadata. - """ - to: "InboundTransferService.CreateParamsTo" - """ - Object containing details about where the funds will land. - """ - - class CreateParamsFrom(TypedDict): - currency: NotRequired[str] - """ - An optional currency field used to specify which currency is debited from the Payment Method. - Since many Payment Methods support only one currency, this field is optional. - """ - payment_method: str - """ - ID of the Payment Method using which IBT will be made. - """ - - class CreateParamsTo(TypedDict): - currency: str - """ - The currency in which funds will land in. - """ - financial_account: str - """ - The FinancialAccount that funds will land in. - """ - - class ListParams(TypedDict): - created: NotRequired[str] - """ - Filter for objects created at the specified timestamp. - Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. - """ - created_gt: NotRequired[str] - """ - Filter for objects created after the specified timestamp. - Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. - """ - created_gte: NotRequired[str] - """ - Filter for objects created on or after the specified timestamp. - Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. - """ - created_lt: NotRequired[str] - """ - Filter for objects created before the specified timestamp. - Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. - """ - created_lte: NotRequired[str] - """ - 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. - """ - limit: NotRequired[int] - """ - The page limit. - """ - - class RetrieveParams(TypedDict): - pass +class InboundTransferService(StripeService): def list( self, - params: Optional["InboundTransferService.ListParams"] = None, + params: Optional["InboundTransferListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[InboundTransfer]: """ @@ -106,7 +42,7 @@ def list( async def list_async( self, - params: Optional["InboundTransferService.ListParams"] = None, + params: Optional["InboundTransferListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[InboundTransfer]: """ @@ -125,7 +61,7 @@ async def list_async( def create( self, - params: "InboundTransferService.CreateParams", + params: "InboundTransferCreateParams", options: Optional[RequestOptions] = None, ) -> InboundTransfer: """ @@ -144,7 +80,7 @@ def create( async def create_async( self, - params: "InboundTransferService.CreateParams", + params: "InboundTransferCreateParams", options: Optional[RequestOptions] = None, ) -> InboundTransfer: """ @@ -164,7 +100,7 @@ async def create_async( def retrieve( self, id: str, - params: Optional["InboundTransferService.RetrieveParams"] = None, + params: Optional["InboundTransferRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> InboundTransfer: """ @@ -186,7 +122,7 @@ def retrieve( async def retrieve_async( self, id: str, - params: Optional["InboundTransferService.RetrieveParams"] = None, + params: Optional["InboundTransferRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> InboundTransfer: """ diff --git a/stripe/v2/money_management/_outbound_payment_quote_service.py b/stripe/v2/money_management/_outbound_payment_quote_service.py index 6b613bb90..7ba22b57a 100644 --- a/stripe/v2/money_management/_outbound_payment_quote_service.py +++ b/stripe/v2/money_management/_outbound_payment_quote_service.py @@ -3,78 +3,25 @@ from stripe._request_options import RequestOptions from stripe._stripe_service import StripeService from stripe._util import sanitize_id -from stripe.v2._amount import AmountParam from stripe.v2.money_management._outbound_payment_quote import ( OutboundPaymentQuote, ) from typing import Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing_extensions import TYPE_CHECKING - -class OutboundPaymentQuoteService(StripeService): - _CreateParamsBase = TypedDict( - "CreateParams", - {"from": "OutboundPaymentQuoteService.CreateParamsFrom"}, +if TYPE_CHECKING: + from stripe.params.v2.money_management._outbound_payment_quote_create_params import ( + OutboundPaymentQuoteCreateParams, + ) + from stripe.params.v2.money_management._outbound_payment_quote_retrieve_params import ( + OutboundPaymentQuoteRetrieveParams, ) - class CreateParams(_CreateParamsBase): - amount: AmountParam - """ - The "presentment amount" to be sent to the recipient. - """ - delivery_options: NotRequired[ - "OutboundPaymentQuoteService.CreateParamsDeliveryOptions" - ] - """ - Method to be used to send the OutboundPayment. - """ - to: "OutboundPaymentQuoteService.CreateParamsTo" - """ - Request details about the recipient of an OutboundPaymentQuote. - """ - - class CreateParamsDeliveryOptions(TypedDict): - bank_account: NotRequired[Literal["automatic", "local", "wire"]] - """ - Open Enum. Method for bank account. - """ - - class CreateParamsFrom(TypedDict): - currency: str - """ - Describes the FinancialAccount's currency drawn from. - """ - financial_account: str - """ - The FinancialAccount that funds were pulled from. - """ - - class CreateParamsTo(TypedDict): - currency: NotRequired[str] - """ - Describes the currency to send to the recipient. - If included, this currency must match a currency supported by the destination. - Can be omitted in the following cases: - - destination only supports one currency - - destination supports multiple currencies and one of the currencies matches the FA currency - - destination supports multiple currencies and one of the currencies matches the presentment currency - Note - when both FA currency and presentment currency are supported, we pick the FA currency to minimize FX. - """ - payout_method: NotRequired[str] - """ - The payout method which the OutboundPayment uses to send payout. - """ - recipient: str - """ - To which account the OutboundPayment is sent. - """ - - class RetrieveParams(TypedDict): - pass +class OutboundPaymentQuoteService(StripeService): def create( self, - params: "OutboundPaymentQuoteService.CreateParams", + params: "OutboundPaymentQuoteCreateParams", options: Optional[RequestOptions] = None, ) -> OutboundPaymentQuote: """ @@ -93,7 +40,7 @@ def create( async def create_async( self, - params: "OutboundPaymentQuoteService.CreateParams", + params: "OutboundPaymentQuoteCreateParams", options: Optional[RequestOptions] = None, ) -> OutboundPaymentQuote: """ @@ -113,7 +60,7 @@ async def create_async( def retrieve( self, id: str, - params: Optional["OutboundPaymentQuoteService.RetrieveParams"] = None, + params: Optional["OutboundPaymentQuoteRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> OutboundPaymentQuote: """ @@ -135,7 +82,7 @@ def retrieve( async def retrieve_async( self, id: str, - params: Optional["OutboundPaymentQuoteService.RetrieveParams"] = None, + params: Optional["OutboundPaymentQuoteRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> OutboundPaymentQuote: """ diff --git a/stripe/v2/money_management/_outbound_payment_service.py b/stripe/v2/money_management/_outbound_payment_service.py index 126039dac..4a371d60f 100644 --- a/stripe/v2/money_management/_outbound_payment_service.py +++ b/stripe/v2/money_management/_outbound_payment_service.py @@ -3,154 +3,30 @@ from stripe._request_options import RequestOptions from stripe._stripe_service import StripeService from stripe._util import sanitize_id -from stripe.v2._amount import AmountParam from stripe.v2._list_object import ListObject from stripe.v2.money_management._outbound_payment import OutboundPayment -from typing import Dict, List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING - -class OutboundPaymentService(StripeService): - class CancelParams(TypedDict): - pass - - _CreateParamsBase = TypedDict( - "CreateParams", - {"from": "OutboundPaymentService.CreateParamsFrom"}, +if TYPE_CHECKING: + from stripe.params.v2.money_management._outbound_payment_cancel_params import ( + OutboundPaymentCancelParams, + ) + from stripe.params.v2.money_management._outbound_payment_create_params import ( + OutboundPaymentCreateParams, + ) + from stripe.params.v2.money_management._outbound_payment_list_params import ( + OutboundPaymentListParams, + ) + from stripe.params.v2.money_management._outbound_payment_retrieve_params import ( + OutboundPaymentRetrieveParams, ) - class CreateParams(_CreateParamsBase): - amount: AmountParam - """ - The "presentment amount" to be sent to the recipient. - """ - delivery_options: NotRequired[ - "OutboundPaymentService.CreateParamsDeliveryOptions" - ] - """ - Delivery options to be used to send the OutboundPayment. - """ - description: NotRequired[str] - """ - An arbitrary string attached to the OutboundPayment. Often useful for displaying to users. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. - """ - outbound_payment_quote: NotRequired[str] - """ - The quote for this OutboundPayment. Only required for countries with regulatory mandates to display fee estimates before OutboundPayment creation. - """ - recipient_notification: NotRequired[ - "OutboundPaymentService.CreateParamsRecipientNotification" - ] - """ - Details about the notification settings for the OutboundPayment recipient. - """ - recipient_verification: NotRequired[str] - """ - The recipient verification id for this OutboundPayment. Only required for countries with regulatory mandates to verify recipient names before OutboundPayment creation. - """ - to: "OutboundPaymentService.CreateParamsTo" - """ - To which payout method to send the OutboundPayment. - """ - - class CreateParamsDeliveryOptions(TypedDict): - bank_account: NotRequired[Literal["automatic", "local", "wire"]] - """ - Open Enum. Method for bank account. - """ - - class CreateParamsFrom(TypedDict): - currency: str - """ - Describes the FinancialAmount's currency drawn from. - """ - financial_account: str - """ - The FinancialAccount that funds were pulled from. - """ - - class CreateParamsRecipientNotification(TypedDict): - setting: Literal["configured", "none"] - """ - Closed Enum. Configuration option to enable or disable notifications to recipients. - Do not send notifications when setting is NONE. Default to account setting when setting is CONFIGURED or not set. - """ - - class CreateParamsTo(TypedDict): - currency: NotRequired[str] - """ - Describes the currency to send to the recipient. - If included, this currency must match a currency supported by the destination. - Can be omitted in the following cases: - - destination only supports one currency - - destination supports multiple currencies and one of the currencies matches the FA currency - - destination supports multiple currencies and one of the currencies matches the presentment currency - Note - when both FA currency and presentment currency are supported, we pick the FA currency to minimize FX. - """ - payout_method: NotRequired[str] - """ - The payout method which the OutboundPayment uses to send payout. - """ - recipient: str - """ - To which account the OutboundPayment is sent. - """ - - class ListParams(TypedDict): - created: NotRequired[str] - """ - Filter for objects created at the specified timestamp. - Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. - """ - created_gt: NotRequired[str] - """ - Filter for objects created after the specified timestamp. - Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. - """ - created_gte: NotRequired[str] - """ - Filter for objects created on or after the specified timestamp. - Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. - """ - created_lt: NotRequired[str] - """ - Filter for objects created before the specified timestamp. - Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. - """ - created_lte: NotRequired[str] - """ - 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. - """ - limit: NotRequired[int] - """ - The maximum number of results to return. - """ - recipient: NotRequired[str] - """ - Only return OutboundPayments sent to this recipient. - """ - status: NotRequired[ - List[ - Literal[ - "canceled", "failed", "posted", "processing", "returned" - ] - ] - ] - """ - Closed Enum. Only return OutboundPayments with this status. - """ - - class RetrieveParams(TypedDict): - pass +class OutboundPaymentService(StripeService): def list( self, - params: Optional["OutboundPaymentService.ListParams"] = None, + params: Optional["OutboundPaymentListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[OutboundPayment]: """ @@ -169,7 +45,7 @@ def list( async def list_async( self, - params: Optional["OutboundPaymentService.ListParams"] = None, + params: Optional["OutboundPaymentListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[OutboundPayment]: """ @@ -188,7 +64,7 @@ async def list_async( def create( self, - params: "OutboundPaymentService.CreateParams", + params: "OutboundPaymentCreateParams", options: Optional[RequestOptions] = None, ) -> OutboundPayment: """ @@ -207,7 +83,7 @@ def create( async def create_async( self, - params: "OutboundPaymentService.CreateParams", + params: "OutboundPaymentCreateParams", options: Optional[RequestOptions] = None, ) -> OutboundPayment: """ @@ -227,7 +103,7 @@ async def create_async( def retrieve( self, id: str, - params: Optional["OutboundPaymentService.RetrieveParams"] = None, + params: Optional["OutboundPaymentRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> OutboundPayment: """ @@ -249,7 +125,7 @@ def retrieve( async def retrieve_async( self, id: str, - params: Optional["OutboundPaymentService.RetrieveParams"] = None, + params: Optional["OutboundPaymentRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> OutboundPayment: """ @@ -271,7 +147,7 @@ async def retrieve_async( def cancel( self, id: str, - params: Optional["OutboundPaymentService.CancelParams"] = None, + params: Optional["OutboundPaymentCancelParams"] = None, options: Optional[RequestOptions] = None, ) -> OutboundPayment: """ @@ -293,7 +169,7 @@ def cancel( async def cancel_async( self, id: str, - params: Optional["OutboundPaymentService.CancelParams"] = None, + params: Optional["OutboundPaymentCancelParams"] = None, options: Optional[RequestOptions] = None, ) -> OutboundPayment: """ diff --git a/stripe/v2/money_management/_outbound_setup_intent_service.py b/stripe/v2/money_management/_outbound_setup_intent_service.py index 408237452..cdc3e1f6a 100644 --- a/stripe/v2/money_management/_outbound_setup_intent_service.py +++ b/stripe/v2/money_management/_outbound_setup_intent_service.py @@ -8,202 +8,30 @@ OutboundSetupIntent, ) from typing import Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params.v2.money_management._outbound_setup_intent_cancel_params import ( + OutboundSetupIntentCancelParams, + ) + from stripe.params.v2.money_management._outbound_setup_intent_create_params import ( + OutboundSetupIntentCreateParams, + ) + from stripe.params.v2.money_management._outbound_setup_intent_list_params import ( + OutboundSetupIntentListParams, + ) + from stripe.params.v2.money_management._outbound_setup_intent_retrieve_params import ( + OutboundSetupIntentRetrieveParams, + ) + from stripe.params.v2.money_management._outbound_setup_intent_update_params import ( + OutboundSetupIntentUpdateParams, + ) class OutboundSetupIntentService(StripeService): - class CancelParams(TypedDict): - pass - - class CreateParams(TypedDict): - payout_method: NotRequired[str] - """ - If provided, the existing payout method resource to link to this setup intent. - Any payout_method_data provided is used to update information on this linked payout method resource. - """ - payout_method_data: NotRequired[ - "OutboundSetupIntentService.CreateParamsPayoutMethodData" - ] - """ - If no payout_method provided, used to create the underlying credential that is set up for outbound money movement. - If a payout_method provided, used to update data on the credential linked to this setup intent. - """ - usage_intent: NotRequired[Literal["payment", "transfer"]] - """ - Specify which type of outbound money movement this credential should be set up for (payment | transfer). - If not provided, defaults to payment. - """ - - class CreateParamsPayoutMethodData(TypedDict): - type: Literal["bank_account", "card", "crypto_wallet"] - """ - Closed Enum. The type of payout method to be created. - """ - bank_account: NotRequired[ - "OutboundSetupIntentService.CreateParamsPayoutMethodDataBankAccount" - ] - """ - The type specific details of the bank account payout method. - """ - card: NotRequired[ - "OutboundSetupIntentService.CreateParamsPayoutMethodDataCard" - ] - """ - The type specific details of the card payout method. - """ - crypto_wallet: NotRequired[ - "OutboundSetupIntentService.CreateParamsPayoutMethodDataCryptoWallet" - ] - """ - The type specific details of the crypto wallet payout method. - """ - - class CreateParamsPayoutMethodDataBankAccount(TypedDict): - account_number: str - """ - The account number or IBAN of the bank account. - """ - bank_account_type: NotRequired[Literal["checking", "savings"]] - """ - Closed Enum. The type of the bank account (checking or savings). - """ - branch_number: NotRequired[str] - """ - The branch number of the bank account, if present. - """ - country: str - """ - The country code of the bank account. - """ - routing_number: NotRequired[str] - """ - The routing number of the bank account, if present. - """ - swift_code: NotRequired[str] - """ - The swift code of the bank account, if present. - """ - - class CreateParamsPayoutMethodDataCard(TypedDict): - exp_month: str - """ - The expiration month of the card. - """ - exp_year: str - """ - The expiration year of the card. - """ - number: str - """ - The card number. - """ - - class CreateParamsPayoutMethodDataCryptoWallet(TypedDict): - address: str - """ - Crypto wallet address. - """ - memo: NotRequired[str] - """ - Optional field, required if network supports memos (only "stellar" currently). - """ - network: Literal[ - "arbitrum", - "avalanche_c_chain", - "base", - "ethereum", - "optimism", - "polygon", - "solana", - "stellar", - ] - """ - Which rail we should use to make an Outbound money movement to this wallet. - """ - - class ListParams(TypedDict): - limit: NotRequired[int] - """ - The page size. - """ - - class RetrieveParams(TypedDict): - pass - - class UpdateParams(TypedDict): - payout_method: NotRequired[str] - """ - If provided, the existing payout method resource to link to this outbound setup intent. - """ - payout_method_data: NotRequired[ - "OutboundSetupIntentService.UpdateParamsPayoutMethodData" - ] - """ - If no payout_method provided, used to create the underlying credential that is set up for outbound money movement. - If a payout_method provided, used to update data on the credential linked to this setup intent. - """ - - class UpdateParamsPayoutMethodData(TypedDict): - type: Literal["bank_account", "card", "crypto_wallet"] - """ - Closed Enum. The type of payout method to be created/updated. - """ - bank_account: NotRequired[ - "OutboundSetupIntentService.UpdateParamsPayoutMethodDataBankAccount" - ] - """ - The type specific details of the bank account payout method. - """ - card: NotRequired[ - "OutboundSetupIntentService.UpdateParamsPayoutMethodDataCard" - ] - """ - The type specific details of the card payout method. - """ - - class UpdateParamsPayoutMethodDataBankAccount(TypedDict): - account_number: str - """ - The account number or IBAN of the bank account. - """ - bank_account_type: NotRequired[Literal["checking", "savings"]] - """ - Closed Enum. The type of the bank account (checking or savings). - """ - branch_number: NotRequired[str] - """ - The branch number of the bank account, if present. - """ - country: str - """ - The country code of the bank account. - """ - routing_number: NotRequired[str] - """ - The routing number of the bank account, if present. - """ - swift_code: NotRequired[str] - """ - The swift code of the bank account, if present. - """ - - class UpdateParamsPayoutMethodDataCard(TypedDict): - exp_month: NotRequired[str] - """ - The expiration month of the card. - """ - exp_year: NotRequired[str] - """ - The expiration year of the card. - """ - number: NotRequired[str] - """ - The card number. This can only be passed when creating a new credential on an outbound setup intent in the requires_payout_method state. - """ - def list( self, - params: Optional["OutboundSetupIntentService.ListParams"] = None, + params: Optional["OutboundSetupIntentListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[OutboundSetupIntent]: """ @@ -222,7 +50,7 @@ def list( async def list_async( self, - params: Optional["OutboundSetupIntentService.ListParams"] = None, + params: Optional["OutboundSetupIntentListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[OutboundSetupIntent]: """ @@ -241,7 +69,7 @@ async def list_async( def create( self, - params: Optional["OutboundSetupIntentService.CreateParams"] = None, + params: Optional["OutboundSetupIntentCreateParams"] = None, options: Optional[RequestOptions] = None, ) -> OutboundSetupIntent: """ @@ -260,7 +88,7 @@ def create( async def create_async( self, - params: Optional["OutboundSetupIntentService.CreateParams"] = None, + params: Optional["OutboundSetupIntentCreateParams"] = None, options: Optional[RequestOptions] = None, ) -> OutboundSetupIntent: """ @@ -280,7 +108,7 @@ async def create_async( def retrieve( self, id: str, - params: Optional["OutboundSetupIntentService.RetrieveParams"] = None, + params: Optional["OutboundSetupIntentRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> OutboundSetupIntent: """ @@ -302,7 +130,7 @@ def retrieve( async def retrieve_async( self, id: str, - params: Optional["OutboundSetupIntentService.RetrieveParams"] = None, + params: Optional["OutboundSetupIntentRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> OutboundSetupIntent: """ @@ -324,7 +152,7 @@ async def retrieve_async( def update( self, id: str, - params: Optional["OutboundSetupIntentService.UpdateParams"] = None, + params: Optional["OutboundSetupIntentUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> OutboundSetupIntent: """ @@ -346,7 +174,7 @@ def update( async def update_async( self, id: str, - params: Optional["OutboundSetupIntentService.UpdateParams"] = None, + params: Optional["OutboundSetupIntentUpdateParams"] = None, options: Optional[RequestOptions] = None, ) -> OutboundSetupIntent: """ @@ -368,7 +196,7 @@ async def update_async( def cancel( self, id: str, - params: Optional["OutboundSetupIntentService.CancelParams"] = None, + params: Optional["OutboundSetupIntentCancelParams"] = None, options: Optional[RequestOptions] = None, ) -> OutboundSetupIntent: """ @@ -390,7 +218,7 @@ def cancel( async def cancel_async( self, id: str, - params: Optional["OutboundSetupIntentService.CancelParams"] = None, + params: Optional["OutboundSetupIntentCancelParams"] = None, options: Optional[RequestOptions] = None, ) -> OutboundSetupIntent: """ diff --git a/stripe/v2/money_management/_outbound_transfer_service.py b/stripe/v2/money_management/_outbound_transfer_service.py index 8dfdd1588..e91b24ed4 100644 --- a/stripe/v2/money_management/_outbound_transfer_service.py +++ b/stripe/v2/money_management/_outbound_transfer_service.py @@ -3,129 +3,30 @@ from stripe._request_options import RequestOptions from stripe._stripe_service import StripeService from stripe._util import sanitize_id -from stripe.v2._amount import AmountParam from stripe.v2._list_object import ListObject from stripe.v2.money_management._outbound_transfer import OutboundTransfer -from typing import Dict, List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING - -class OutboundTransferService(StripeService): - class CancelParams(TypedDict): - pass - - _CreateParamsBase = TypedDict( - "CreateParams", - {"from": "OutboundTransferService.CreateParamsFrom"}, +if TYPE_CHECKING: + from stripe.params.v2.money_management._outbound_transfer_cancel_params import ( + OutboundTransferCancelParams, + ) + from stripe.params.v2.money_management._outbound_transfer_create_params import ( + OutboundTransferCreateParams, + ) + from stripe.params.v2.money_management._outbound_transfer_list_params import ( + OutboundTransferListParams, + ) + from stripe.params.v2.money_management._outbound_transfer_retrieve_params import ( + OutboundTransferRetrieveParams, ) - class CreateParams(_CreateParamsBase): - amount: AmountParam - """ - The "presentment amount" for the OutboundPayment. - """ - delivery_options: NotRequired[ - "OutboundTransferService.CreateParamsDeliveryOptions" - ] - """ - Delivery options to be used to send the OutboundTransfer. - """ - description: NotRequired[str] - """ - An arbitrary string attached to the OutboundTransfer. Often useful for displaying to users. - """ - metadata: NotRequired[Dict[str, str]] - """ - Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. - """ - recipient_verification: NotRequired[str] - """ - The recipient verification id for this OutboundTransfer. Only required for countries with regulatory mandates to verify recipient names before OutboundTransfer creation. - """ - to: "OutboundTransferService.CreateParamsTo" - """ - To which payout method to send the OutboundTransfer. - """ - - class CreateParamsDeliveryOptions(TypedDict): - bank_account: NotRequired[Literal["automatic", "local", "wire"]] - """ - Open Enum. Method for bank account. - """ - - class CreateParamsFrom(TypedDict): - currency: str - """ - Describes the FinancialAmount's currency drawn from. - """ - financial_account: str - """ - The FinancialAccount that funds were pulled from. - """ - - class CreateParamsTo(TypedDict): - currency: NotRequired[str] - """ - Describes the currency to send to the recipient. - If included, this currency must match a currency supported by the destination. - Can be omitted in the following cases: - - destination only supports one currency - - destination supports multiple currencies and one of the currencies matches the FA currency - - destination supports multiple currencies and one of the currencies matches the presentment currency - Note - when both FA currency and presentment currency are supported, we pick the FA currency to minimize FX. - """ - payout_method: str - """ - The payout method which the OutboundTransfer uses to send payout. - """ - - class ListParams(TypedDict): - created: NotRequired[str] - """ - Filter for objects created at the specified timestamp. - Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. - """ - created_gt: NotRequired[str] - """ - Filter for objects created after the specified timestamp. - Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. - """ - created_gte: NotRequired[str] - """ - Filter for objects created on or after the specified timestamp. - Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. - """ - created_lt: NotRequired[str] - """ - Filter for objects created before the specified timestamp. - Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. - """ - created_lte: NotRequired[str] - """ - 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. - """ - limit: NotRequired[int] - """ - The maximum number of results to return. - """ - status: NotRequired[ - List[ - Literal[ - "canceled", "failed", "posted", "processing", "returned" - ] - ] - ] - """ - Closed Enum. Only return OutboundTransfers with this status. - """ - - class RetrieveParams(TypedDict): - pass +class OutboundTransferService(StripeService): def list( self, - params: Optional["OutboundTransferService.ListParams"] = None, + params: Optional["OutboundTransferListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[OutboundTransfer]: """ @@ -144,7 +45,7 @@ def list( async def list_async( self, - params: Optional["OutboundTransferService.ListParams"] = None, + params: Optional["OutboundTransferListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[OutboundTransfer]: """ @@ -163,7 +64,7 @@ async def list_async( def create( self, - params: "OutboundTransferService.CreateParams", + params: "OutboundTransferCreateParams", options: Optional[RequestOptions] = None, ) -> OutboundTransfer: """ @@ -182,7 +83,7 @@ def create( async def create_async( self, - params: "OutboundTransferService.CreateParams", + params: "OutboundTransferCreateParams", options: Optional[RequestOptions] = None, ) -> OutboundTransfer: """ @@ -202,7 +103,7 @@ async def create_async( def retrieve( self, id: str, - params: Optional["OutboundTransferService.RetrieveParams"] = None, + params: Optional["OutboundTransferRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> OutboundTransfer: """ @@ -224,7 +125,7 @@ def retrieve( async def retrieve_async( self, id: str, - params: Optional["OutboundTransferService.RetrieveParams"] = None, + params: Optional["OutboundTransferRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> OutboundTransfer: """ @@ -246,7 +147,7 @@ async def retrieve_async( def cancel( self, id: str, - params: Optional["OutboundTransferService.CancelParams"] = None, + params: Optional["OutboundTransferCancelParams"] = None, options: Optional[RequestOptions] = None, ) -> OutboundTransfer: """ @@ -268,7 +169,7 @@ def cancel( async def cancel_async( self, id: str, - params: Optional["OutboundTransferService.CancelParams"] = None, + params: Optional["OutboundTransferCancelParams"] = None, options: Optional[RequestOptions] = None, ) -> OutboundTransfer: """ diff --git a/stripe/v2/money_management/_payout_method_service.py b/stripe/v2/money_management/_payout_method_service.py index 0adc00a38..912c7a3fe 100644 --- a/stripe/v2/money_management/_payout_method_service.py +++ b/stripe/v2/money_management/_payout_method_service.py @@ -5,47 +5,28 @@ from stripe._util import sanitize_id from stripe.v2._list_object import ListObject from stripe.v2.money_management._payout_method import PayoutMethod -from typing import List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params.v2.money_management._payout_method_archive_params import ( + PayoutMethodArchiveParams, + ) + from stripe.params.v2.money_management._payout_method_list_params import ( + PayoutMethodListParams, + ) + from stripe.params.v2.money_management._payout_method_retrieve_params import ( + PayoutMethodRetrieveParams, + ) + from stripe.params.v2.money_management._payout_method_unarchive_params import ( + PayoutMethodUnarchiveParams, + ) -class PayoutMethodService(StripeService): - class ArchiveParams(TypedDict): - pass - - class ListParams(TypedDict): - limit: NotRequired[int] - """ - The page size. - """ - usage_status: NotRequired["PayoutMethodService.ListParamsUsageStatus"] - """ - Usage status filter. - """ - - class ListParamsUsageStatus(TypedDict): - payments: NotRequired[ - List[Literal["eligible", "invalid", "requires_action"]] - ] - """ - List of payments status to filter by. - """ - transfers: NotRequired[ - List[Literal["eligible", "invalid", "requires_action"]] - ] - """ - List of transfers status to filter by. - """ - - class RetrieveParams(TypedDict): - pass - - class UnarchiveParams(TypedDict): - pass +class PayoutMethodService(StripeService): def list( self, - params: Optional["PayoutMethodService.ListParams"] = None, + params: Optional["PayoutMethodListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[PayoutMethod]: """ @@ -64,7 +45,7 @@ def list( async def list_async( self, - params: Optional["PayoutMethodService.ListParams"] = None, + params: Optional["PayoutMethodListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[PayoutMethod]: """ @@ -84,7 +65,7 @@ async def list_async( def retrieve( self, id: str, - params: Optional["PayoutMethodService.RetrieveParams"] = None, + params: Optional["PayoutMethodRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> PayoutMethod: """ @@ -106,7 +87,7 @@ def retrieve( async def retrieve_async( self, id: str, - params: Optional["PayoutMethodService.RetrieveParams"] = None, + params: Optional["PayoutMethodRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> PayoutMethod: """ @@ -128,7 +109,7 @@ async def retrieve_async( def archive( self, id: str, - params: Optional["PayoutMethodService.ArchiveParams"] = None, + params: Optional["PayoutMethodArchiveParams"] = None, options: Optional[RequestOptions] = None, ) -> PayoutMethod: """ @@ -151,7 +132,7 @@ def archive( async def archive_async( self, id: str, - params: Optional["PayoutMethodService.ArchiveParams"] = None, + params: Optional["PayoutMethodArchiveParams"] = None, options: Optional[RequestOptions] = None, ) -> PayoutMethod: """ @@ -174,7 +155,7 @@ async def archive_async( def unarchive( self, id: str, - params: Optional["PayoutMethodService.UnarchiveParams"] = None, + params: Optional["PayoutMethodUnarchiveParams"] = None, options: Optional[RequestOptions] = None, ) -> PayoutMethod: """ @@ -196,7 +177,7 @@ def unarchive( async def unarchive_async( self, id: str, - params: Optional["PayoutMethodService.UnarchiveParams"] = None, + params: Optional["PayoutMethodUnarchiveParams"] = None, options: Optional[RequestOptions] = None, ) -> PayoutMethod: """ diff --git a/stripe/v2/money_management/_payout_methods_bank_account_spec_service.py b/stripe/v2/money_management/_payout_methods_bank_account_spec_service.py index b0413e5b6..bb4ff1e8e 100644 --- a/stripe/v2/money_management/_payout_methods_bank_account_spec_service.py +++ b/stripe/v2/money_management/_payout_methods_bank_account_spec_service.py @@ -5,22 +5,19 @@ from stripe.v2.money_management._payout_methods_bank_account_spec import ( PayoutMethodsBankAccountSpec, ) -from typing import List, Optional, cast -from typing_extensions import NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params.v2.money_management._payout_methods_bank_account_spec_retrieve_params import ( + PayoutMethodsBankAccountSpecRetrieveParams, + ) -class PayoutMethodsBankAccountSpecService(StripeService): - class RetrieveParams(TypedDict): - countries: NotRequired[List[str]] - """ - The countries to fetch the bank account spec for. - """ +class PayoutMethodsBankAccountSpecService(StripeService): def retrieve( self, - params: Optional[ - "PayoutMethodsBankAccountSpecService.RetrieveParams" - ] = None, + params: Optional["PayoutMethodsBankAccountSpecRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> PayoutMethodsBankAccountSpec: """ @@ -41,9 +38,7 @@ def retrieve( async def retrieve_async( self, - params: Optional[ - "PayoutMethodsBankAccountSpecService.RetrieveParams" - ] = None, + params: Optional["PayoutMethodsBankAccountSpecRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> PayoutMethodsBankAccountSpec: """ diff --git a/stripe/v2/money_management/_received_credit_service.py b/stripe/v2/money_management/_received_credit_service.py index 8e8979011..fa3a3a0cb 100644 --- a/stripe/v2/money_management/_received_credit_service.py +++ b/stripe/v2/money_management/_received_credit_service.py @@ -6,47 +6,21 @@ from stripe.v2._list_object import ListObject from stripe.v2.money_management._received_credit import ReceivedCredit from typing import Optional, cast -from typing_extensions import NotRequired, TypedDict +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params.v2.money_management._received_credit_list_params import ( + ReceivedCreditListParams, + ) + from stripe.params.v2.money_management._received_credit_retrieve_params import ( + ReceivedCreditRetrieveParams, + ) -class ReceivedCreditService(StripeService): - class ListParams(TypedDict): - created: NotRequired[str] - """ - Filter for objects created at the specified timestamp. - Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. - """ - created_gt: NotRequired[str] - """ - Filter for objects created after the specified timestamp. - Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. - """ - created_gte: NotRequired[str] - """ - Filter for objects created on or after the specified timestamp. - Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. - """ - created_lt: NotRequired[str] - """ - Filter for objects created before the specified timestamp. - Must be an RFC 3339 date & time value, for example: 2022-09-18T13:22:00Z. - """ - created_lte: NotRequired[str] - """ - 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. - """ - limit: NotRequired[int] - """ - The page limit. - """ - - class RetrieveParams(TypedDict): - pass +class ReceivedCreditService(StripeService): def list( self, - params: Optional["ReceivedCreditService.ListParams"] = None, + params: Optional["ReceivedCreditListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[ReceivedCredit]: """ @@ -65,7 +39,7 @@ def list( async def list_async( self, - params: Optional["ReceivedCreditService.ListParams"] = None, + params: Optional["ReceivedCreditListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[ReceivedCredit]: """ @@ -85,7 +59,7 @@ async def list_async( def retrieve( self, id: str, - params: Optional["ReceivedCreditService.RetrieveParams"] = None, + params: Optional["ReceivedCreditRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> ReceivedCredit: """ @@ -107,7 +81,7 @@ def retrieve( async def retrieve_async( self, id: str, - params: Optional["ReceivedCreditService.RetrieveParams"] = None, + params: Optional["ReceivedCreditRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> ReceivedCredit: """ diff --git a/stripe/v2/money_management/_received_debit_service.py b/stripe/v2/money_management/_received_debit_service.py index e3c9c8ae8..25f5148c4 100644 --- a/stripe/v2/money_management/_received_debit_service.py +++ b/stripe/v2/money_management/_received_debit_service.py @@ -6,22 +6,21 @@ from stripe.v2._list_object import ListObject from stripe.v2.money_management._received_debit import ReceivedDebit from typing import Optional, cast -from typing_extensions import NotRequired, TypedDict +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params.v2.money_management._received_debit_list_params import ( + ReceivedDebitListParams, + ) + from stripe.params.v2.money_management._received_debit_retrieve_params import ( + ReceivedDebitRetrieveParams, + ) -class ReceivedDebitService(StripeService): - class ListParams(TypedDict): - limit: NotRequired[int] - """ - The page limit. - """ - - class RetrieveParams(TypedDict): - pass +class ReceivedDebitService(StripeService): def list( self, - params: Optional["ReceivedDebitService.ListParams"] = None, + params: Optional["ReceivedDebitListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[ReceivedDebit]: """ @@ -40,7 +39,7 @@ def list( async def list_async( self, - params: Optional["ReceivedDebitService.ListParams"] = None, + params: Optional["ReceivedDebitListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[ReceivedDebit]: """ @@ -60,7 +59,7 @@ async def list_async( def retrieve( self, id: str, - params: Optional["ReceivedDebitService.RetrieveParams"] = None, + params: Optional["ReceivedDebitRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> ReceivedDebit: """ @@ -82,7 +81,7 @@ def retrieve( async def retrieve_async( self, id: str, - params: Optional["ReceivedDebitService.RetrieveParams"] = None, + params: Optional["ReceivedDebitRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> ReceivedDebit: """ diff --git a/stripe/v2/money_management/_recipient_verification_service.py b/stripe/v2/money_management/_recipient_verification_service.py index 5bec9e818..1f81853e1 100644 --- a/stripe/v2/money_management/_recipient_verification_service.py +++ b/stripe/v2/money_management/_recipient_verification_service.py @@ -7,29 +7,24 @@ RecipientVerification, ) from typing import Optional, cast -from typing_extensions import NotRequired, TypedDict +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params.v2.money_management._recipient_verification_acknowledge_params import ( + RecipientVerificationAcknowledgeParams, + ) + from stripe.params.v2.money_management._recipient_verification_create_params import ( + RecipientVerificationCreateParams, + ) + from stripe.params.v2.money_management._recipient_verification_retrieve_params import ( + RecipientVerificationRetrieveParams, + ) -class RecipientVerificationService(StripeService): - class AcknowledgeParams(TypedDict): - pass - - class CreateParams(TypedDict): - payout_method: str - """ - ID of the payout method. - """ - recipient: NotRequired[str] - """ - ID of the recipient account. Required if the recipient distinct from the sender. Leave empty if the recipient and sender are the same entity (i.e. for me-to-me payouts). - """ - - class RetrieveParams(TypedDict): - pass +class RecipientVerificationService(StripeService): def create( self, - params: "RecipientVerificationService.CreateParams", + params: "RecipientVerificationCreateParams", options: Optional[RequestOptions] = None, ) -> RecipientVerification: """ @@ -48,7 +43,7 @@ def create( async def create_async( self, - params: "RecipientVerificationService.CreateParams", + params: "RecipientVerificationCreateParams", options: Optional[RequestOptions] = None, ) -> RecipientVerification: """ @@ -68,7 +63,7 @@ async def create_async( def retrieve( self, id: str, - params: Optional["RecipientVerificationService.RetrieveParams"] = None, + params: Optional["RecipientVerificationRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> RecipientVerification: """ @@ -90,7 +85,7 @@ def retrieve( async def retrieve_async( self, id: str, - params: Optional["RecipientVerificationService.RetrieveParams"] = None, + params: Optional["RecipientVerificationRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> RecipientVerification: """ @@ -112,9 +107,7 @@ async def retrieve_async( def acknowledge( self, id: str, - params: Optional[ - "RecipientVerificationService.AcknowledgeParams" - ] = None, + params: Optional["RecipientVerificationAcknowledgeParams"] = None, options: Optional[RequestOptions] = None, ) -> RecipientVerification: """ @@ -136,9 +129,7 @@ def acknowledge( async def acknowledge_async( self, id: str, - params: Optional[ - "RecipientVerificationService.AcknowledgeParams" - ] = None, + params: Optional["RecipientVerificationAcknowledgeParams"] = None, options: Optional[RequestOptions] = None, ) -> RecipientVerification: """ diff --git a/stripe/v2/money_management/_transaction_entry_service.py b/stripe/v2/money_management/_transaction_entry_service.py index 8f393a91f..c2f773a5d 100644 --- a/stripe/v2/money_management/_transaction_entry_service.py +++ b/stripe/v2/money_management/_transaction_entry_service.py @@ -6,46 +6,21 @@ from stripe.v2._list_object import ListObject from stripe.v2.money_management._transaction_entry import TransactionEntry from typing import Optional, cast -from typing_extensions import NotRequired, TypedDict +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params.v2.money_management._transaction_entry_list_params import ( + TransactionEntryListParams, + ) + from stripe.params.v2.money_management._transaction_entry_retrieve_params import ( + TransactionEntryRetrieveParams, + ) -class TransactionEntryService(StripeService): - class ListParams(TypedDict): - created: NotRequired[str] - """ - Filter for Transactions created at an exact time. - """ - created_gt: NotRequired[str] - """ - Filter for Transactions created after the specified timestamp. - """ - created_gte: NotRequired[str] - """ - Filter for Transactions created at or after the specified timestamp. - """ - created_lt: NotRequired[str] - """ - Filter for Transactions created before the specified timestamp. - """ - created_lte: NotRequired[str] - """ - Filter for Transactions created at or before the specified timestamp. - """ - limit: NotRequired[int] - """ - The page limit. - """ - transaction: NotRequired[str] - """ - Filter for TransactionEntries belonging to a Transaction. - """ - - class RetrieveParams(TypedDict): - pass +class TransactionEntryService(StripeService): def list( self, - params: Optional["TransactionEntryService.ListParams"] = None, + params: Optional["TransactionEntryListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[TransactionEntry]: """ @@ -64,7 +39,7 @@ def list( async def list_async( self, - params: Optional["TransactionEntryService.ListParams"] = None, + params: Optional["TransactionEntryListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[TransactionEntry]: """ @@ -84,7 +59,7 @@ async def list_async( def retrieve( self, id: str, - params: Optional["TransactionEntryService.RetrieveParams"] = None, + params: Optional["TransactionEntryRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> TransactionEntry: """ @@ -106,7 +81,7 @@ def retrieve( async def retrieve_async( self, id: str, - params: Optional["TransactionEntryService.RetrieveParams"] = None, + params: Optional["TransactionEntryRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> TransactionEntry: """ diff --git a/stripe/v2/money_management/_transaction_service.py b/stripe/v2/money_management/_transaction_service.py index e421d376b..40f69e477 100644 --- a/stripe/v2/money_management/_transaction_service.py +++ b/stripe/v2/money_management/_transaction_service.py @@ -6,50 +6,21 @@ from stripe.v2._list_object import ListObject from stripe.v2.money_management._transaction import Transaction from typing import Optional, cast -from typing_extensions import NotRequired, TypedDict +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params.v2.money_management._transaction_list_params import ( + TransactionListParams, + ) + from stripe.params.v2.money_management._transaction_retrieve_params import ( + TransactionRetrieveParams, + ) -class TransactionService(StripeService): - class ListParams(TypedDict): - created: NotRequired[str] - """ - Filter for Transactions created at an exact time. - """ - created_gt: NotRequired[str] - """ - Filter for Transactions created after the specified timestamp. - """ - created_gte: NotRequired[str] - """ - Filter for Transactions created at or after the specified timestamp. - """ - created_lt: NotRequired[str] - """ - Filter for Transactions created before the specified timestamp. - """ - created_lte: NotRequired[str] - """ - Filter for Transactions created at or before the specified timestamp. - """ - financial_account: NotRequired[str] - """ - Filter for Transactions belonging to a FinancialAccount. - """ - flow: NotRequired[str] - """ - Filter for Transactions corresponding to a Flow. - """ - limit: NotRequired[int] - """ - The page limit. - """ - - class RetrieveParams(TypedDict): - pass +class TransactionService(StripeService): def list( self, - params: Optional["TransactionService.ListParams"] = None, + params: Optional["TransactionListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[Transaction]: """ @@ -68,7 +39,7 @@ def list( async def list_async( self, - params: Optional["TransactionService.ListParams"] = None, + params: Optional["TransactionListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[Transaction]: """ @@ -88,7 +59,7 @@ async def list_async( def retrieve( self, id: str, - params: Optional["TransactionService.RetrieveParams"] = None, + params: Optional["TransactionRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Transaction: """ @@ -110,7 +81,7 @@ def retrieve( async def retrieve_async( self, id: str, - params: Optional["TransactionService.RetrieveParams"] = None, + params: Optional["TransactionRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> Transaction: """ diff --git a/stripe/v2/payments/_off_session_payment_service.py b/stripe/v2/payments/_off_session_payment_service.py index 4c8100654..fb1281151 100644 --- a/stripe/v2/payments/_off_session_payment_service.py +++ b/stripe/v2/payments/_off_session_payment_service.py @@ -3,298 +3,33 @@ from stripe._request_options import RequestOptions from stripe._stripe_service import StripeService from stripe._util import sanitize_id -from stripe.v2._amount import AmountParam from stripe.v2._list_object import ListObject from stripe.v2.payments._off_session_payment import OffSessionPayment -from typing import Dict, List, Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing import Optional, cast +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params.v2.payments._off_session_payment_cancel_params import ( + OffSessionPaymentCancelParams, + ) + from stripe.params.v2.payments._off_session_payment_capture_params import ( + OffSessionPaymentCaptureParams, + ) + from stripe.params.v2.payments._off_session_payment_create_params import ( + OffSessionPaymentCreateParams, + ) + from stripe.params.v2.payments._off_session_payment_list_params import ( + OffSessionPaymentListParams, + ) + from stripe.params.v2.payments._off_session_payment_retrieve_params import ( + OffSessionPaymentRetrieveParams, + ) class OffSessionPaymentService(StripeService): - class CancelParams(TypedDict): - pass - - class CaptureParams(TypedDict): - amount_to_capture: int - """ - The amount to capture. - """ - metadata: Dict[str, str] - """ - Set of [key-value pairs](https://docs.corp.stripe.com/api/metadata) that you can - attach to an object. This can be useful for storing additional information about - the object in a structured format. Learn more about - [storing information in metadata](https://docs.corp.stripe.com/payments/payment-intents#storing-information-in-metadata). - """ - statement_descriptor: NotRequired[str] - """ - Text that appears on the customer's statement as the statement descriptor for a - non-card charge. This value overrides the account's default statement descriptor. - For information about requirements, including the 22-character limit, see the - [Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors). - """ - statement_descriptor_suffix: NotRequired[str] - """ - Provides information about a card charge. Concatenated to the account's - [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) - to form the complete statement descriptor that appears on the customer's statement. - """ - transfer_data: NotRequired[ - "OffSessionPaymentService.CaptureParamsTransferData" - ] - """ - The data that automatically creates a Transfer after the payment finalizes. Learn more about the use case for [connected accounts](https://docs.corp.stripe.com/payments/connected-accounts). - """ - - class CaptureParamsTransferData(TypedDict): - amount: NotRequired[int] - """ - The amount transferred to the destination account. This transfer will occur - automatically after the payment succeeds. If no amount is specified, by default - the entire payment amount is transferred to the destination account. The amount - must be less than or equal to the - [amount_requested](https://docs.corp.stripe.com/api/v2/off-session-payments/object?api-version=2025-05-28.preview#v2_off_session_payment_object-amount_requested), - and must be a positive integer representing how much to transfer in the smallest - currency unit (e.g., 100 cents to charge $1.00). - """ - destination: str - """ - The account (if any) that the payment is attributed to for tax reporting, and - where funds from the payment are transferred to after payment success. - """ - - class CreateParams(TypedDict): - amount: AmountParam - """ - The “presentment amount” to be collected from the customer. - """ - amount_details: NotRequired[ - "OffSessionPaymentService.CreateParamsAmountDetails" - ] - """ - Provides industry-specific information about the amount. - """ - cadence: Literal["recurring", "unscheduled"] - """ - The frequency of the underlying payment. - """ - capture: NotRequired["OffSessionPaymentService.CreateParamsCapture"] - """ - Details about the capture configuration for the OffSessionPayment. - """ - capture_method: NotRequired[Literal["automatic", "manual"]] - """ - Whether the OffSessionPayment should be captured automatically or manually. - """ - customer: str - """ - ID of the Customer to which this OffSessionPayment belongs. - """ - metadata: Dict[str, str] - """ - Set of [key-value pairs](https://docs.corp.stripe.com/api/metadata) that you can - attach to an object. This can be useful for storing additional information about - the object in a structured format. Learn more about - [storing information in metadata](https://docs.corp.stripe.com/payments/payment-intents#storing-information-in-metadata). - """ - on_behalf_of: NotRequired[str] - """ - The account (if any) for which the funds of the OffSessionPayment are intended. - """ - payment_method: str - """ - ID of the payment method used in this OffSessionPayment. - """ - payment_method_options: NotRequired[ - "OffSessionPaymentService.CreateParamsPaymentMethodOptions" - ] - """ - Payment method options for the off-session payment. - """ - payments_orchestration: NotRequired[ - "OffSessionPaymentService.CreateParamsPaymentsOrchestration" - ] - """ - Details about the payments orchestration configuration. - """ - retry_details: NotRequired[ - "OffSessionPaymentService.CreateParamsRetryDetails" - ] - """ - Details about the OffSessionPayment retries. - """ - statement_descriptor: NotRequired[str] - """ - Text that appears on the customer's statement as the statement descriptor for a - non-card charge. This value overrides the account's default statement descriptor. - For information about requirements, including the 22-character limit, see the - [Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors). - """ - statement_descriptor_suffix: NotRequired[str] - """ - Provides information about a card charge. Concatenated to the account's - [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) - to form the complete statement descriptor that appears on the customer's statement. - """ - test_clock: NotRequired[str] - """ - Test clock that can be used to advance the retry attempts in a sandbox. - """ - transfer_data: NotRequired[ - "OffSessionPaymentService.CreateParamsTransferData" - ] - """ - The data that automatically creates a Transfer after the payment finalizes. Learn more about the use case for [connected accounts](https://docs.corp.stripe.com/payments/connected-accounts). - """ - - class CreateParamsAmountDetails(TypedDict): - discount_amount: NotRequired[int] - """ - The amount the total transaction was discounted for. - """ - line_items: List[ - "OffSessionPaymentService.CreateParamsAmountDetailsLineItem" - ] - """ - A list of line items, each containing information about a product in the PaymentIntent. There is a maximum of 100 line items. - """ - shipping: NotRequired[ - "OffSessionPaymentService.CreateParamsAmountDetailsShipping" - ] - """ - Contains information about the shipping portion of the amount. - """ - tax: NotRequired[ - "OffSessionPaymentService.CreateParamsAmountDetailsTax" - ] - """ - Contains information about the tax portion of the amount. - """ - - class CreateParamsAmountDetailsLineItem(TypedDict): - discount_amount: NotRequired[int] - """ - The amount an item was discounted for. Positive integer. - """ - product_code: NotRequired[str] - """ - Unique identifier of the product. At most 12 characters long. - """ - product_name: str - """ - Name of the product. At most 100 characters long. - """ - quantity: int - """ - Number of items of the product. Positive integer. - """ - tax: NotRequired[ - "OffSessionPaymentService.CreateParamsAmountDetailsLineItemTax" - ] - """ - Contains information about the tax on the item. - """ - unit_cost: int - """ - Cost of the product. Non-negative integer. - """ - - class CreateParamsAmountDetailsLineItemTax(TypedDict): - total_tax_amount: NotRequired[int] - """ - Total portion of the amount that is for tax. - """ - - class CreateParamsAmountDetailsShipping(TypedDict): - amount: NotRequired[int] - """ - Portion of the amount that is for shipping. - """ - from_postal_code: NotRequired[str] - """ - The postal code that represents the shipping source. - """ - to_postal_code: NotRequired[str] - """ - The postal code that represents the shipping destination. - """ - - class CreateParamsAmountDetailsTax(TypedDict): - total_tax_amount: NotRequired[int] - """ - Total portion of the amount that is for tax. - """ - - class CreateParamsCapture(TypedDict): - capture_method: Literal["automatic", "manual"] - """ - The method to use to capture the payment. - """ - - class CreateParamsPaymentMethodOptions(TypedDict): - card: NotRequired[ - "OffSessionPaymentService.CreateParamsPaymentMethodOptionsCard" - ] - """ - Payment method options for the card payment type. - """ - - class CreateParamsPaymentMethodOptionsCard(TypedDict): - network_transaction_id: str - """ - If you are making a Credential On File transaction with a previously saved card, you should pass the Network Transaction ID - from a prior initial authorization on Stripe (from a successful SetupIntent or a PaymentIntent with `setup_future_usage` set), - or one that you have obtained from another payment processor. This is a token from the network which uniquely identifies the transaction. - Visa calls this the Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the Acquirer Reference Data. - Note that you should pass in a Network Transaction ID if you have one, regardless of whether this is a - Customer-Initiated Transaction (CIT) or a Merchant-Initiated Transaction (MIT). - """ - - class CreateParamsPaymentsOrchestration(TypedDict): - enabled: bool - """ - True when you want to enable payments orchestration for this off-session payment. False otherwise. - """ - - class CreateParamsRetryDetails(TypedDict): - retry_policy: NotRequired[str] - """ - The pre-configured retry policy to use for the payment. - """ - retry_strategy: Literal["heuristic", "none", "scheduled", "smart"] - """ - Indicates the strategy for how you want Stripe to retry the payment. - """ - - class CreateParamsTransferData(TypedDict): - amount: NotRequired[int] - """ - The amount transferred to the destination account. This transfer will occur - automatically after the payment succeeds. If no amount is specified, by default - the entire payment amount is transferred to the destination account. The amount - must be less than or equal to the - [amount_requested](https://docs.corp.stripe.com/api/v2/off-session-payments/object?api-version=2025-05-28.preview#v2_off_session_payment_object-amount_requested), - and must be a positive integer representing how much to transfer in the smallest - currency unit (e.g., 100 cents to charge $1.00). - """ - destination: str - """ - The account (if any) that the payment is attributed to for tax reporting, and - where funds from the payment are transferred to after payment success. - """ - - class ListParams(TypedDict): - limit: NotRequired[int] - """ - The page size limit. If not provided, the default is 20. - """ - - class RetrieveParams(TypedDict): - pass - def list( self, - params: Optional["OffSessionPaymentService.ListParams"] = None, + params: Optional["OffSessionPaymentListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[OffSessionPayment]: """ @@ -313,7 +48,7 @@ def list( async def list_async( self, - params: Optional["OffSessionPaymentService.ListParams"] = None, + params: Optional["OffSessionPaymentListParams"] = None, options: Optional[RequestOptions] = None, ) -> ListObject[OffSessionPayment]: """ @@ -332,7 +67,7 @@ async def list_async( def create( self, - params: "OffSessionPaymentService.CreateParams", + params: "OffSessionPaymentCreateParams", options: Optional[RequestOptions] = None, ) -> OffSessionPayment: """ @@ -351,7 +86,7 @@ def create( async def create_async( self, - params: "OffSessionPaymentService.CreateParams", + params: "OffSessionPaymentCreateParams", options: Optional[RequestOptions] = None, ) -> OffSessionPayment: """ @@ -371,7 +106,7 @@ async def create_async( def retrieve( self, id: str, - params: Optional["OffSessionPaymentService.RetrieveParams"] = None, + params: Optional["OffSessionPaymentRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> OffSessionPayment: """ @@ -393,7 +128,7 @@ def retrieve( async def retrieve_async( self, id: str, - params: Optional["OffSessionPaymentService.RetrieveParams"] = None, + params: Optional["OffSessionPaymentRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> OffSessionPayment: """ @@ -415,7 +150,7 @@ async def retrieve_async( def cancel( self, id: str, - params: Optional["OffSessionPaymentService.CancelParams"] = None, + params: Optional["OffSessionPaymentCancelParams"] = None, options: Optional[RequestOptions] = None, ) -> OffSessionPayment: """ @@ -437,7 +172,7 @@ def cancel( async def cancel_async( self, id: str, - params: Optional["OffSessionPaymentService.CancelParams"] = None, + params: Optional["OffSessionPaymentCancelParams"] = None, options: Optional[RequestOptions] = None, ) -> OffSessionPayment: """ @@ -459,7 +194,7 @@ async def cancel_async( def capture( self, id: str, - params: "OffSessionPaymentService.CaptureParams", + params: "OffSessionPaymentCaptureParams", options: Optional[RequestOptions] = None, ) -> OffSessionPayment: """ @@ -481,7 +216,7 @@ def capture( async def capture_async( self, id: str, - params: "OffSessionPaymentService.CaptureParams", + params: "OffSessionPaymentCaptureParams", options: Optional[RequestOptions] = None, ) -> OffSessionPayment: """ diff --git a/stripe/v2/tax/_automatic_rule_service.py b/stripe/v2/tax/_automatic_rule_service.py index da917a078..11ca19751 100644 --- a/stripe/v2/tax/_automatic_rule_service.py +++ b/stripe/v2/tax/_automatic_rule_service.py @@ -5,41 +5,30 @@ from stripe._util import sanitize_id from stripe.v2.tax._automatic_rule import AutomaticRule from typing import Optional, cast -from typing_extensions import TypedDict +from typing_extensions import TYPE_CHECKING + +if TYPE_CHECKING: + from stripe.params.v2.tax._automatic_rule_create_params import ( + AutomaticRuleCreateParams, + ) + from stripe.params.v2.tax._automatic_rule_deactivate_params import ( + AutomaticRuleDeactivateParams, + ) + from stripe.params.v2.tax._automatic_rule_find_params import ( + AutomaticRuleFindParams, + ) + from stripe.params.v2.tax._automatic_rule_retrieve_params import ( + AutomaticRuleRetrieveParams, + ) + from stripe.params.v2.tax._automatic_rule_update_params import ( + AutomaticRuleUpdateParams, + ) class AutomaticRuleService(StripeService): - class CreateParams(TypedDict): - billable_item: str - """ - The BillableItem ID to set automatic Tax configuration for. - """ - tax_code: str - """ - The TaxCode object to be used for automatic tax calculations. - """ - - class DeactivateParams(TypedDict): - pass - - class FindParams(TypedDict): - billable_item: str - """ - The BillableItem ID to search by. - """ - - class RetrieveParams(TypedDict): - pass - - class UpdateParams(TypedDict): - tax_code: str - """ - The TaxCode object to be used for automatic tax calculations. - """ - def create( self, - params: "AutomaticRuleService.CreateParams", + params: "AutomaticRuleCreateParams", options: Optional[RequestOptions] = None, ) -> AutomaticRule: """ @@ -58,7 +47,7 @@ def create( async def create_async( self, - params: "AutomaticRuleService.CreateParams", + params: "AutomaticRuleCreateParams", options: Optional[RequestOptions] = None, ) -> AutomaticRule: """ @@ -77,7 +66,7 @@ async def create_async( def find( self, - params: "AutomaticRuleService.FindParams", + params: "AutomaticRuleFindParams", options: Optional[RequestOptions] = None, ) -> AutomaticRule: """ @@ -96,7 +85,7 @@ def find( async def find_async( self, - params: "AutomaticRuleService.FindParams", + params: "AutomaticRuleFindParams", options: Optional[RequestOptions] = None, ) -> AutomaticRule: """ @@ -116,7 +105,7 @@ async def find_async( def retrieve( self, id: str, - params: Optional["AutomaticRuleService.RetrieveParams"] = None, + params: Optional["AutomaticRuleRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> AutomaticRule: """ @@ -136,7 +125,7 @@ def retrieve( async def retrieve_async( self, id: str, - params: Optional["AutomaticRuleService.RetrieveParams"] = None, + params: Optional["AutomaticRuleRetrieveParams"] = None, options: Optional[RequestOptions] = None, ) -> AutomaticRule: """ @@ -156,7 +145,7 @@ async def retrieve_async( def update( self, id: str, - params: "AutomaticRuleService.UpdateParams", + params: "AutomaticRuleUpdateParams", options: Optional[RequestOptions] = None, ) -> AutomaticRule: """ @@ -176,7 +165,7 @@ def update( async def update_async( self, id: str, - params: "AutomaticRuleService.UpdateParams", + params: "AutomaticRuleUpdateParams", options: Optional[RequestOptions] = None, ) -> AutomaticRule: """ @@ -196,7 +185,7 @@ async def update_async( def deactivate( self, id: str, - params: Optional["AutomaticRuleService.DeactivateParams"] = None, + params: Optional["AutomaticRuleDeactivateParams"] = None, options: Optional[RequestOptions] = None, ) -> AutomaticRule: """ @@ -218,7 +207,7 @@ def deactivate( async def deactivate_async( self, id: str, - params: Optional["AutomaticRuleService.DeactivateParams"] = None, + params: Optional["AutomaticRuleDeactivateParams"] = None, options: Optional[RequestOptions] = None, ) -> AutomaticRule: """ diff --git a/stripe/v2/test_helpers/_financial_address_service.py b/stripe/v2/test_helpers/_financial_address_service.py index 7059e4eab..09c77180f 100644 --- a/stripe/v2/test_helpers/_financial_address_service.py +++ b/stripe/v2/test_helpers/_financial_address_service.py @@ -3,7 +3,6 @@ from stripe._request_options import RequestOptions from stripe._stripe_service import StripeService from stripe._util import sanitize_id -from stripe.v2._amount import AmountParam from stripe.v2._financial_address_credit_simulation import ( FinancialAddressCreditSimulation, ) @@ -11,31 +10,22 @@ FinancialAddressGeneratedMicrodeposits, ) from typing import Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params.v2.test_helpers._financial_address_credit_params import ( + FinancialAddressCreditParams, + ) + from stripe.params.v2.test_helpers._financial_address_generate_microdeposits_params import ( + FinancialAddressGenerateMicrodepositsParams, + ) -class FinancialAddressService(StripeService): - class CreditParams(TypedDict): - amount: AmountParam - """ - Object containing the amount value and currency to credit. - """ - network: Literal["ach", "fps", "rtp", "sepa_credit_transfer", "wire"] - """ - Open Enum. The network to use in simulating the funds flow. This will be the reflected in the resulting ReceivedCredit. - """ - statement_descriptor: NotRequired[str] - """ - String explaining funds flow. Use this field to populate the statement descriptor of the ReceivedCredit created as an eventual result of this simulation. - """ - - class GenerateMicrodepositsParams(TypedDict): - pass +class FinancialAddressService(StripeService): def credit( self, id: str, - params: "FinancialAddressService.CreditParams", + params: "FinancialAddressCreditParams", options: Optional[RequestOptions] = None, ) -> FinancialAddressCreditSimulation: """ @@ -57,7 +47,7 @@ def credit( async def credit_async( self, id: str, - params: "FinancialAddressService.CreditParams", + params: "FinancialAddressCreditParams", options: Optional[RequestOptions] = None, ) -> FinancialAddressCreditSimulation: """ @@ -79,9 +69,7 @@ async def credit_async( def generate_microdeposits( self, id: str, - params: Optional[ - "FinancialAddressService.GenerateMicrodepositsParams" - ] = None, + params: Optional["FinancialAddressGenerateMicrodepositsParams"] = None, options: Optional[RequestOptions] = None, ) -> FinancialAddressGeneratedMicrodeposits: """ @@ -103,9 +91,7 @@ def generate_microdeposits( async def generate_microdeposits_async( self, id: str, - params: Optional[ - "FinancialAddressService.GenerateMicrodepositsParams" - ] = None, + params: Optional["FinancialAddressGenerateMicrodepositsParams"] = None, options: Optional[RequestOptions] = None, ) -> FinancialAddressGeneratedMicrodeposits: """ diff --git a/stripe/v2/test_helpers/_money_management_service.py b/stripe/v2/test_helpers/_money_management_service.py index 4f7644116..9b0a4c678 100644 --- a/stripe/v2/test_helpers/_money_management_service.py +++ b/stripe/v2/test_helpers/_money_management_service.py @@ -6,29 +6,18 @@ RecipientVerification, ) from typing import Optional, cast -from typing_extensions import Literal, NotRequired, TypedDict +from typing_extensions import TYPE_CHECKING +if TYPE_CHECKING: + from stripe.params.v2.test_helpers._money_management_recipient_verifications_params import ( + MoneyManagementRecipientVerificationsParams, + ) -class MoneyManagementService(StripeService): - class RecipientVerificationsParams(TypedDict): - match_result: Literal[ - "close_match", "match", "no_match", "unavailable" - ] - """ - Expected match level of the RecipientVerification to be created: `match`, `close_match`, `no_match`, `unavailable`. - """ - payout_method: str - """ - ID of the payout method. - """ - recipient: NotRequired[str] - """ - ID of the recipient account. Required if the recipient distinct from the sender. Leave empty if the recipient and sender are the same entity (i.e. for me-to-me payouts). - """ +class MoneyManagementService(StripeService): def recipient_verifications( self, - params: "MoneyManagementService.RecipientVerificationsParams", + params: "MoneyManagementRecipientVerificationsParams", options: Optional[RequestOptions] = None, ) -> RecipientVerification: """ @@ -47,7 +36,7 @@ def recipient_verifications( async def recipient_verifications_async( self, - params: "MoneyManagementService.RecipientVerificationsParams", + params: "MoneyManagementRecipientVerificationsParams", options: Optional[RequestOptions] = None, ) -> RecipientVerification: """ diff --git a/stripe/version.py b/stripe/version.py deleted file mode 100644 index 68df71d94..000000000 --- a/stripe/version.py +++ /dev/null @@ -1,16 +0,0 @@ -# -*- coding: utf-8 -*- -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.version package is deprecated and will become internal in the future. - Pleasse access the version via stripe.VERSION. - """, - DeprecationWarning, -) - -if not TYPE_CHECKING: - from stripe._version import ( # noqa - VERSION, - ) diff --git a/stripe/webhook.py b/stripe/webhook.py deleted file mode 100644 index 3cd41ebe6..000000000 --- a/stripe/webhook.py +++ /dev/null @@ -1,22 +0,0 @@ -# -*- coding: utf-8 -*- -from typing_extensions import TYPE_CHECKING -from warnings import warn - -warn( - """ - The stripe.webhook package is deprecated, please change your - imports to import from stripe directly. - From: - from stripe.webhook import Webhook - To: - from stripe import Webhook - """, - DeprecationWarning, - stacklevel=2, -) - -if not TYPE_CHECKING: - from stripe._webhook import ( # noqa - Webhook, - WebhookSignature, - ) diff --git a/tests/api_resources/abstract/test_api_resource.py b/tests/api_resources/abstract/test_api_resource.py index 005309f20..ef64f4af2 100644 --- a/tests/api_resources/abstract/test_api_resource.py +++ b/tests/api_resources/abstract/test_api_resource.py @@ -1,6 +1,9 @@ import pytest import stripe +from stripe._util import convert_to_stripe_object +from stripe._stripe_object import StripeObject +from stripe._error import InvalidRequestError class TestAPIResource(object): @@ -94,12 +97,12 @@ def test_convert_to_stripe_object(self): "alist": [{"object": "customer", "name": "chilango"}], } - converted = stripe.util.convert_to_stripe_object( + converted = convert_to_stripe_object( sample, "akey", None, None, api_mode="V1" ) # Types - assert isinstance(converted, stripe.stripe_object.StripeObject) + assert isinstance(converted, StripeObject) assert isinstance(converted.adict, stripe.Charge) assert len(converted.alist) == 1 assert isinstance(converted.alist[0], stripe.Customer) @@ -115,7 +118,7 @@ def test_convert_to_stripe_object(self): def test_raise_on_incorrect_id_type(self): for obj in [None, 1, 3.14, dict(), list(), set(), tuple(), object()]: - with pytest.raises(stripe.error.InvalidRequestError): + with pytest.raises(InvalidRequestError): self.MyResource.retrieve(obj) def test_class_methods_use_global_options(self, http_client_mock): diff --git a/tests/api_resources/abstract/test_createable_api_resource.py b/tests/api_resources/abstract/test_createable_api_resource.py index db58810c8..1affefa7e 100644 --- a/tests/api_resources/abstract/test_createable_api_resource.py +++ b/tests/api_resources/abstract/test_createable_api_resource.py @@ -1,8 +1,9 @@ -import stripe +from stripe._createable_api_resource import CreateableAPIResource +from stripe._charge import Charge class TestCreateableAPIResource(object): - class MyCreatable(stripe.api_resources.abstract.CreateableAPIResource): + class MyCreatable(CreateableAPIResource): OBJECT_NAME = "mycreatable" def test_create(self, http_client_mock): @@ -18,7 +19,7 @@ def test_create(self, http_client_mock): http_client_mock.assert_requested( "post", path="/v1/mycreatables", post_data="" ) - assert isinstance(res, stripe.Charge) + assert isinstance(res, Charge) assert res.foo == "bar" assert res.last_response is not None @@ -40,5 +41,5 @@ def test_idempotent_create(self, http_client_mock): post_data="", idempotency_key="foo", ) - assert isinstance(res, stripe.Charge) + assert isinstance(res, Charge) assert res.foo == "bar" diff --git a/tests/api_resources/abstract/test_custom_method.py b/tests/api_resources/abstract/test_custom_method.py index 01aa84356..71fc51322 100644 --- a/tests/api_resources/abstract/test_custom_method.py +++ b/tests/api_resources/abstract/test_custom_method.py @@ -1,21 +1,21 @@ -import stripe -from stripe import util +import io +from stripe._api_resource import APIResource +from stripe._custom_method import custom_method +from stripe._util import class_method_variant, sanitize_id class TestCustomMethod(object): - @stripe.api_resources.abstract.custom_method( - "do_stuff", http_verb="post", http_path="do_the_thing" - ) - @stripe.api_resources.abstract.custom_method( + @custom_method("do_stuff", http_verb="post", http_path="do_the_thing") + @custom_method( "do_list_stuff", http_verb="get", http_path="do_the_list_thing" ) - @stripe.api_resources.abstract.custom_method( + @custom_method( "do_stream_stuff", http_verb="post", http_path="do_the_stream_thing", is_streaming=True, ) - class MyResource(stripe.api_resources.abstract.APIResource): + class MyResource(APIResource): OBJECT_NAME = "myresource" def do_stuff(self, idempotency_key=None, **params): @@ -35,18 +35,16 @@ def do_stream_stuff(self, idempotency_key=None, **params): def _cls_do_stuff_new_codegen(cls, id, **params): return cls._static_request( "post", - "/v1/myresources/{id}/do_the_thing".format( - id=util.sanitize_id(id) - ), + "/v1/myresources/{id}/do_the_thing".format(id=sanitize_id(id)), params=params, ) - @util.class_method_variant("_cls_do_stuff_new_codegen") + @class_method_variant("_cls_do_stuff_new_codegen") def do_stuff_new_codegen(self, **params): return self._request( "post", "/v1/myresources/{id}/do_the_thing".format( - id=util.sanitize_id(self.get("id")) + id=sanitize_id(self.get("id")) ), params=params, ) @@ -113,7 +111,7 @@ def test_call_custom_stream_method_class(self, http_client_mock): http_client_mock.stub_request( "post", path="/v1/myresources/mid/do_the_stream_thing", - rbody=util.io.BytesIO(str.encode("response body")), + rbody=io.BytesIO(str.encode("response body")), rheaders={"request-id": "req_id"}, ) @@ -155,7 +153,7 @@ def test_call_custom_stream_method_class_with_object( http_client_mock.stub_request( "post", path="/v1/myresources/mid/do_the_stream_thing", - rbody=util.io.BytesIO(str.encode("response body")), + rbody=io.BytesIO(str.encode("response body")), rheaders={"request-id": "req_id"}, ) @@ -196,7 +194,7 @@ def test_call_custom_stream_method_instance(self, http_client_mock): http_client_mock.stub_request( "post", path="/v1/myresources/mid/do_the_stream_thing", - rbody=util.io.BytesIO(str.encode("response body")), + rbody=io.BytesIO(str.encode("response body")), rheaders={"request-id": "req_id"}, ) diff --git a/tests/api_resources/abstract/test_deletable_api_resource.py b/tests/api_resources/abstract/test_deletable_api_resource.py index 68900b86e..b11d9e698 100644 --- a/tests/api_resources/abstract/test_deletable_api_resource.py +++ b/tests/api_resources/abstract/test_deletable_api_resource.py @@ -1,8 +1,8 @@ -import stripe +from stripe._deletable_api_resource import DeletableAPIResource class TestDeletableAPIResource(object): - class MyDeletable(stripe.api_resources.abstract.DeletableAPIResource): + class MyDeletable(DeletableAPIResource): OBJECT_NAME = "mydeletable" def test_delete_class(self, http_client_mock): diff --git a/tests/api_resources/abstract/test_listable_api_resource.py b/tests/api_resources/abstract/test_listable_api_resource.py index edc9b5849..8b0732ffa 100644 --- a/tests/api_resources/abstract/test_listable_api_resource.py +++ b/tests/api_resources/abstract/test_listable_api_resource.py @@ -1,8 +1,9 @@ -import stripe +from stripe._listable_api_resource import ListableAPIResource +from stripe._charge import Charge class TestListableAPIResource(object): - class MyListable(stripe.api_resources.abstract.ListableAPIResource): + class MyListable(ListableAPIResource): OBJECT_NAME = "mylistable" def test_all(self, http_client_mock): @@ -18,7 +19,7 @@ def test_all(self, http_client_mock): "get", path="/v1/mylistables", query_string="" ) assert len(res.data) == 2 - assert all(isinstance(obj, stripe.Charge) for obj in res.data) + assert all(isinstance(obj, Charge) for obj in res.data) assert res.data[0].name == "jose" assert res.data[1].name == "curly" diff --git a/tests/api_resources/abstract/test_nested_resource_class_methods.py b/tests/api_resources/abstract/test_nested_resource_class_methods.py index 2ca7d4a4f..a21c8ba0f 100644 --- a/tests/api_resources/abstract/test_nested_resource_class_methods.py +++ b/tests/api_resources/abstract/test_nested_resource_class_methods.py @@ -1,11 +1,12 @@ -import stripe +from stripe._nested_resource_class_methods import nested_resource_class_methods +from stripe._api_resource import APIResource class TestNestedResourceClassMethods(object): - @stripe.api_resources.abstract.nested_resource_class_methods( + @nested_resource_class_methods( "nested", operations=["create", "retrieve", "update", "delete", "list"] ) - class MainResource(stripe.api_resources.abstract.APIResource): + class MainResource(APIResource): OBJECT_NAME = "mainresource" def test_create_nested(self, http_client_mock): diff --git a/tests/api_resources/abstract/test_searchable_api_resource.py b/tests/api_resources/abstract/test_searchable_api_resource.py index 320858249..7e74bbc39 100644 --- a/tests/api_resources/abstract/test_searchable_api_resource.py +++ b/tests/api_resources/abstract/test_searchable_api_resource.py @@ -1,8 +1,9 @@ -import stripe +from stripe._searchable_api_resource import SearchableAPIResource +from stripe._charge import Charge class TestSearchableAPIResource(object): - class MySearchable(stripe.api_resources.abstract.SearchableAPIResource): + class MySearchable(SearchableAPIResource): OBJECT_NAME = "mysearchable" @classmethod @@ -27,7 +28,7 @@ def test_search(self, http_client_mock): "get", path=path, query_string=query_string ) assert len(res.data) == 2 - assert all(isinstance(obj, stripe.Charge) for obj in res.data) + assert all(isinstance(obj, Charge) for obj in res.data) assert res.data[0].name == "jose" assert res.data[1].name == "curly" @@ -70,5 +71,5 @@ def test_search_multiple_pages(self, http_client_mock): ) assert len(res2.data) == 1 - assert all(isinstance(obj, stripe.Charge) for obj in res2.data) + assert all(isinstance(obj, Charge) for obj in res2.data) assert res2.data[0].name == "test" diff --git a/tests/api_resources/abstract/test_singleton_api_resource.py b/tests/api_resources/abstract/test_singleton_api_resource.py index db55ab422..d9a194af2 100644 --- a/tests/api_resources/abstract/test_singleton_api_resource.py +++ b/tests/api_resources/abstract/test_singleton_api_resource.py @@ -1,8 +1,8 @@ -import stripe +from stripe._singleton_api_resource import SingletonAPIResource class TestSingletonAPIResource(object): - class MySingleton(stripe.api_resources.abstract.SingletonAPIResource): + class MySingleton(SingletonAPIResource): OBJECT_NAME = "mysingleton" def test_retrieve(self, http_client_mock): diff --git a/tests/api_resources/abstract/test_test_helpers_api_resource.py b/tests/api_resources/abstract/test_test_helpers_api_resource.py index f0c6d6466..426aa569c 100644 --- a/tests/api_resources/abstract/test_test_helpers_api_resource.py +++ b/tests/api_resources/abstract/test_test_helpers_api_resource.py @@ -1,14 +1,13 @@ -import stripe from stripe._test_helpers import APIResourceTestHelpers +from stripe._custom_method import custom_method +from stripe._api_resource import APIResource class TestTestHelperAPIResource(object): - class MyTestHelpersResource(stripe.api_resources.abstract.APIResource): + class MyTestHelpersResource(APIResource): OBJECT_NAME = "myresource" - @stripe.api_resources.abstract.custom_method( - "do_stuff", http_verb="post", http_path="do_the_thing" - ) + @custom_method("do_stuff", http_verb="post", http_path="do_the_thing") class TestHelpers(APIResourceTestHelpers): def __init__(self, resource): self.resource = resource diff --git a/tests/api_resources/abstract/test_updateable_api_resource.py b/tests/api_resources/abstract/test_updateable_api_resource.py index e14ae1a82..fe4194972 100644 --- a/tests/api_resources/abstract/test_updateable_api_resource.py +++ b/tests/api_resources/abstract/test_updateable_api_resource.py @@ -1,11 +1,11 @@ import pytest import json -import stripe +from stripe._updateable_api_resource import UpdateableAPIResource class TestUpdateableAPIResource(object): - class MyUpdateable(stripe.api_resources.abstract.UpdateableAPIResource): + class MyUpdateable(UpdateableAPIResource): OBJECT_NAME = "myupdateable" @pytest.fixture diff --git a/tests/api_resources/test_file.py b/tests/api_resources/test_file.py index 4e43655f0..4494f543e 100644 --- a/tests/api_resources/test_file.py +++ b/tests/api_resources/test_file.py @@ -3,6 +3,8 @@ import pytest import stripe +from stripe._multipart_data_generator import MultipartDataGenerator +from stripe._util import convert_to_stripe_object TEST_RESOURCE_ID = "file_123" @@ -31,9 +33,7 @@ def test_is_retrievable(self, http_client_mock): assert isinstance(resource, stripe.File) def test_is_creatable(self, setup_upload_api_base, http_client_mock): - stripe.multipart_data_generator.MultipartDataGenerator._initialize_boundary = ( - lambda self: 1234567890 - ) + MultipartDataGenerator._initialize_boundary = lambda self: 1234567890 test_file = tempfile.TemporaryFile() resource = stripe.File.create( purpose="dispute_evidence", @@ -79,13 +79,11 @@ def test_create_respects_api_version( ) def test_deserializes_from_file(self): - obj = stripe.util.convert_to_stripe_object( - {"object": "file"}, api_mode="V1" - ) + obj = convert_to_stripe_object({"object": "file"}, api_mode="V1") assert isinstance(obj, stripe.File) def test_deserializes_from_file_upload(self): - obj = stripe.util.convert_to_stripe_object( + obj = convert_to_stripe_object( {"object": "file_upload"}, api_mode="V1" ) assert isinstance(obj, stripe.File) diff --git a/tests/api_resources/test_file_upload.py b/tests/api_resources/test_file_upload.py index fb696d636..8e52cf103 100644 --- a/tests/api_resources/test_file_upload.py +++ b/tests/api_resources/test_file_upload.py @@ -3,6 +3,9 @@ import pytest import stripe +from stripe import File +from stripe._multipart_data_generator import MultipartDataGenerator +from stripe._util import convert_to_stripe_object TEST_RESOURCE_ID = "file_123" @@ -18,24 +21,22 @@ def setup_upload_api_base(self): stripe.upload_api_base = "https://files.stripe.com" def test_is_listable(self, http_client_mock): - resources = stripe.FileUpload.list() + resources = File.list() http_client_mock.assert_requested("get", path="/v1/files") assert isinstance(resources.data, list) - assert isinstance(resources.data[0], stripe.FileUpload) + assert isinstance(resources.data[0], File) def test_is_retrievable(self, http_client_mock): - resource = stripe.FileUpload.retrieve(TEST_RESOURCE_ID) + resource = File.retrieve(TEST_RESOURCE_ID) http_client_mock.assert_requested( "get", path="/v1/files/%s" % TEST_RESOURCE_ID ) - assert isinstance(resource, stripe.FileUpload) + assert isinstance(resource, File) def test_is_creatable(self, setup_upload_api_base, http_client_mock): - stripe.multipart_data_generator.MultipartDataGenerator._initialize_boundary = ( - lambda self: 1234567890 - ) + MultipartDataGenerator._initialize_boundary = lambda self: 1234567890 test_file = tempfile.TemporaryFile() - resource = stripe.FileUpload.create( + resource = File.create( purpose="dispute_evidence", file=test_file, file_link_data={"create": True}, @@ -46,16 +47,14 @@ def test_is_creatable(self, setup_upload_api_base, http_client_mock): path="/v1/files", content_type="multipart/form-data; boundary=1234567890", ) - assert isinstance(resource, stripe.FileUpload) + assert isinstance(resource, File) def test_deserializes_from_file(self): - obj = stripe.util.convert_to_stripe_object( - {"object": "file"}, api_mode="V1" - ) - assert isinstance(obj, stripe.FileUpload) + obj = convert_to_stripe_object({"object": "file"}, api_mode="V1") + assert isinstance(obj, File) def test_deserializes_from_file_upload(self): - obj = stripe.util.convert_to_stripe_object( + obj = convert_to_stripe_object( {"object": "file_upload"}, api_mode="V1" ) - assert isinstance(obj, stripe.FileUpload) + assert isinstance(obj, File) diff --git a/tests/api_resources/test_invoice_line_item.py b/tests/api_resources/test_invoice_line_item.py index 31d928379..4ef07d7b6 100644 --- a/tests/api_resources/test_invoice_line_item.py +++ b/tests/api_resources/test_invoice_line_item.py @@ -2,6 +2,7 @@ TEST_INVOICE_ID = "in_123" +TEST_LINE_ITEM_ID = "il_123" class TestInvoiceLineItem(object): @@ -9,3 +10,16 @@ def test_deserialize(self): invoice = stripe.Invoice.retrieve(TEST_INVOICE_ID) assert isinstance(invoice.lines.data, list) assert isinstance(invoice.lines.data[0], stripe.InvoiceLineItem) + + def test_is_modifiable(self, http_client_mock): + resource = stripe.InvoiceLineItem.modify( + TEST_INVOICE_ID, TEST_LINE_ITEM_ID, metadata={"key": "value"} + ) + + http_client_mock.assert_requested( + "post", + path="/v1/invoices/%s/lines/%s" + % (TEST_INVOICE_ID, TEST_LINE_ITEM_ID), + post_data="metadata[key]=value", + ) + assert isinstance(resource, stripe.InvoiceLineItem) diff --git a/tests/api_resources/test_list_object.py b/tests/api_resources/test_list_object.py index 8174e9398..37ab96fe1 100644 --- a/tests/api_resources/test_list_object.py +++ b/tests/api_resources/test_list_object.py @@ -3,6 +3,8 @@ import pytest import stripe +from stripe._util import convert_to_stripe_object +from stripe._stripe_object import StripeObject class TestListObject(object): @@ -95,15 +97,13 @@ def test_empty_list(self): def test_iter(self): arr = [{"id": 1}, {"id": 2}, {"id": 3}] - expected = stripe.util.convert_to_stripe_object(arr, api_mode="V1") + expected = convert_to_stripe_object(arr, api_mode="V1") lo = stripe.ListObject.construct_from({"data": arr}, None) assert list(lo) == expected def test_iter_reversed(self): arr = [{"id": 1}, {"id": 2}, {"id": 3}] - expected = stripe.util.convert_to_stripe_object( - list(reversed(arr)), api_mode="V1" - ) + expected = convert_to_stripe_object(list(reversed(arr)), api_mode="V1") lo = stripe.ListObject.construct_from({"data": arr}, None) assert list(reversed(lo)) == expected @@ -242,11 +242,9 @@ def test_serialize_nested_empty_list(self): empty = stripe.ListObject.construct_from( {"object": "list", "data": []}, "mykey" ) - obj = stripe.stripe_object.StripeObject.construct_from( - {"nested": empty}, "mykey" - ) + obj = StripeObject.construct_from({"nested": empty}, "mykey") serialized = str(obj) - deserialized = stripe.stripe_object.StripeObject.construct_from( + deserialized = StripeObject.construct_from( json.loads(serialized), "mykey" ) assert deserialized.nested == empty diff --git a/tests/api_resources/test_list_object_v2.py b/tests/api_resources/test_list_object_v2.py index d86ed54c5..7767b6a36 100644 --- a/tests/api_resources/test_list_object_v2.py +++ b/tests/api_resources/test_list_object_v2.py @@ -7,6 +7,7 @@ import stripe from stripe.v2._list_object import ListObject from tests.http_client_mock import HTTPClientMock +from stripe._util import convert_to_stripe_object class TestListObjectV2(object): @@ -23,7 +24,7 @@ def list_object(self): def test_iter(self): arr = ["a", "b", "c"] - expected = stripe.util.convert_to_stripe_object(arr, api_mode="V2") + expected = convert_to_stripe_object(arr, api_mode="V2") lo = ListObject.construct_from({"data": arr}, None) assert list(lo) == expected diff --git a/tests/api_resources/test_search_result_object.py b/tests/api_resources/test_search_result_object.py index 83266f0b9..9db977921 100644 --- a/tests/api_resources/test_search_result_object.py +++ b/tests/api_resources/test_search_result_object.py @@ -3,6 +3,8 @@ import pytest import stripe +from stripe._util import convert_to_stripe_object +from stripe._stripe_object import StripeObject class TestSearchResultObject(object): @@ -82,7 +84,7 @@ def test_empty_search_result(self): def test_iter(self): arr = [{"id": 1}, {"id": 2}, {"id": 3}] - expected = stripe.util.convert_to_stripe_object(arr, api_mode="V1") + expected = convert_to_stripe_object(arr, api_mode="V1") sro = stripe.SearchResultObject.construct_from({"data": arr}, None) assert list(sro) == expected @@ -195,11 +197,9 @@ def test_serialize_nested_empty_search_result(self): empty = stripe.SearchResultObject.construct_from( {"object": "search_result", "data": []}, "mykey" ) - obj = stripe.stripe_object.StripeObject.construct_from( - {"nested": empty}, "mykey" - ) + obj = StripeObject.construct_from({"nested": empty}, "mykey") serialized = str(obj) - deserialized = stripe.stripe_object.StripeObject.construct_from( + deserialized = StripeObject.construct_from( json.loads(serialized), "mykey" ) assert deserialized.nested == empty diff --git a/tests/api_resources/test_source.py b/tests/api_resources/test_source.py index af26db6b2..e377e4dd9 100644 --- a/tests/api_resources/test_source.py +++ b/tests/api_resources/test_source.py @@ -1,6 +1,7 @@ import pytest import stripe +from stripe._error import InvalidRequestError TEST_RESOURCE_ID = "src_123" @@ -60,7 +61,7 @@ def test_is_detachable_when_attached(self, http_client_mock): def test_is_not_detachable_when_unattached(self, http_client_mock): resource = stripe.Source.retrieve(TEST_RESOURCE_ID) - with pytest.raises(stripe.error.InvalidRequestError): + with pytest.raises(InvalidRequestError): resource.detach() def test_is_verifiable(self, http_client_mock): diff --git a/tests/conftest.py b/tests/conftest.py index df2af0e17..c07e9c167 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -9,6 +9,7 @@ from tests.stripe_mock import StripeMock from tests.http_client_mock import HTTPClientMock +from stripe._http_client import new_default_http_client pytest_plugins = ("anyio",) @@ -70,7 +71,7 @@ def setup_stripe(): "client_id": stripe.client_id, "default_http_client": stripe.default_http_client, } - http_client = stripe.http_client.new_default_http_client() + http_client = new_default_http_client() stripe.api_base = MOCK_API_BASE stripe.upload_api_base = MOCK_API_BASE stripe.api_key = MOCK_API_KEY diff --git a/tests/http_client_mock.py b/tests/http_client_mock.py index 0f0163305..da7c07966 100644 --- a/tests/http_client_mock.py +++ b/tests/http_client_mock.py @@ -1,10 +1,13 @@ from __future__ import absolute_import, division, print_function from typing import List -import stripe from urllib.parse import urlsplit, urlencode, parse_qsl import json from unittest.mock import Mock +from stripe._http_client import ( + new_default_http_client, + new_http_client_async_fallback, +) def parse_and_sort(query_string, strict_parsing=False): @@ -217,8 +220,8 @@ def assert_post_data(self, expected, is_json=False): class HTTPClientMock(object): def __init__(self, mocker): self.mock_client = mocker.Mock( - wraps=stripe.http_client.new_default_http_client( - async_fallback_client=stripe.http_client.new_http_client_async_fallback() + wraps=new_default_http_client( + async_fallback_client=new_http_client_async_fallback() ) ) diff --git a/tests/services/test_file_upload.py b/tests/services/test_file_upload.py index b1088ed80..cae1c79b7 100644 --- a/tests/services/test_file_upload.py +++ b/tests/services/test_file_upload.py @@ -3,6 +3,8 @@ import tempfile import stripe +from stripe._file import File +from stripe._multipart_data_generator import MultipartDataGenerator TEST_RESOURCE_ID = "file_123" @@ -13,23 +15,21 @@ def test_is_listable(self, http_client_mock, stripe_mock_stripe_client): resources = stripe_mock_stripe_client.files.list() http_client_mock.assert_requested("get", path="/v1/files") assert isinstance(resources.data, list) - assert isinstance(resources.data[0], stripe.FileUpload) + assert isinstance(resources.data[0], File) def test_is_retrievable(self, http_client_mock, stripe_mock_stripe_client): resource = stripe_mock_stripe_client.files.retrieve(TEST_RESOURCE_ID) http_client_mock.assert_requested( "get", path="/v1/files/%s" % TEST_RESOURCE_ID ) - assert isinstance(resource, stripe.FileUpload) + assert isinstance(resource, File) def test_is_creatable( self, file_stripe_mock_stripe_client, http_client_mock, ): - stripe.multipart_data_generator.MultipartDataGenerator._initialize_boundary = ( - lambda self: 1234567890 - ) + MultipartDataGenerator._initialize_boundary = lambda self: 1234567890 test_file = tempfile.TemporaryFile() # We create a new client here instead of re-using the stripe_mock_stripe_client fixture @@ -48,4 +48,4 @@ def test_is_creatable( path="/v1/files", content_type="multipart/form-data; boundary=1234567890", ) - assert isinstance(resource, stripe.FileUpload) + assert isinstance(resource, File) diff --git a/tests/test_api_requestor.py b/tests/test_api_requestor.py index 4c997f605..bd9999030 100644 --- a/tests/test_api_requestor.py +++ b/tests/test_api_requestor.py @@ -9,7 +9,7 @@ import urllib3 import stripe -from stripe import util +import io from stripe._api_requestor import _api_encode, _APIRequestor from stripe._customer import Customer from stripe._request_options import RequestOptions @@ -363,7 +363,7 @@ def test_empty_methods_streaming_response( http_client_mock.stub_request( meth, path=self.v1_path, - rbody=util.io.BytesIO(b"thisisdata"), + rbody=io.BytesIO(b"thisisdata"), rcode=200, ) @@ -443,7 +443,7 @@ def test_methods_with_params_and_streaming_response( method, path=self.v1_path, query_string=encoded if method != "post" else "", - rbody=util.io.BytesIO(b'{"foo": "bar", "baz": 6}'), + rbody=io.BytesIO(b'{"foo": "bar", "baz": 6}'), rcode=200, ) @@ -653,9 +653,7 @@ def test_uses_instance_context(self, http_client_mock): def test_sets_default_http_client(self, mocker): assert not stripe.default_http_client - _APIRequestor( - client=mocker.Mock(stripe.http_client.HTTPClient) - )._get_http_client() + _APIRequestor(client=mocker.Mock(stripe.HTTPClient))._get_http_client() # default_http_client is not populated if a client is provided assert not stripe.default_http_client @@ -814,7 +812,7 @@ def test_skips_generates_default_idempotency_key_for_v1_delete( def test_fails_without_api_key(self, requestor): stripe.api_key = None - with pytest.raises(stripe.error.AuthenticationError): + with pytest.raises(stripe.AuthenticationError): requestor.request("get", self.v1_path, {}, base_address="api") def test_invalid_request_error_404(self, requestor, http_client_mock): @@ -822,7 +820,7 @@ def test_invalid_request_error_404(self, requestor, http_client_mock): "get", path=self.v1_path, rbody='{"error": {}}', rcode=404 ) - with pytest.raises(stripe.error.InvalidRequestError): + with pytest.raises(stripe.InvalidRequestError): requestor.request("get", self.v1_path, {}, base_address="api") def test_invalid_request_error_400(self, requestor, http_client_mock): @@ -830,7 +828,7 @@ def test_invalid_request_error_400(self, requestor, http_client_mock): "get", path=self.v1_path, rbody='{"error": {}}', rcode=400 ) - with pytest.raises(stripe.error.InvalidRequestError): + with pytest.raises(stripe.InvalidRequestError): requestor.request("get", self.v1_path, {}, base_address="api") def test_idempotency_error(self, requestor, http_client_mock): @@ -841,7 +839,7 @@ def test_idempotency_error(self, requestor, http_client_mock): rcode=400, ) - with pytest.raises(stripe.error.IdempotencyError): + with pytest.raises(stripe.IdempotencyError): requestor.request("get", self.v1_path, {}, base_address="api") def test_authentication_error(self, requestor, http_client_mock): @@ -849,7 +847,7 @@ def test_authentication_error(self, requestor, http_client_mock): "get", path=self.v1_path, rbody='{"error": {}}', rcode=401 ) - with pytest.raises(stripe.error.AuthenticationError): + with pytest.raises(stripe.AuthenticationError): requestor.request("get", self.v1_path, {}, base_address="api") def test_permissions_error(self, requestor, http_client_mock): @@ -857,7 +855,7 @@ def test_permissions_error(self, requestor, http_client_mock): "get", path=self.v1_path, rbody='{"error": {}}', rcode=403 ) - with pytest.raises(stripe.error.PermissionError): + with pytest.raises(stripe.PermissionError): requestor.request("get", self.v1_path, {}, base_address="api") def test_card_error(self, requestor, http_client_mock): @@ -868,7 +866,7 @@ def test_card_error(self, requestor, http_client_mock): rcode=402, ) - with pytest.raises(stripe.error.CardError) as excinfo: + with pytest.raises(stripe.CardError) as excinfo: requestor.request("get", self.v1_path, {}, base_address="api") assert excinfo.value.code == "invalid_expiry_year" @@ -877,7 +875,7 @@ def test_rate_limit_error(self, requestor, http_client_mock): "get", path=self.v1_path, rbody='{"error": {}}', rcode=429 ) - with pytest.raises(stripe.error.RateLimitError): + with pytest.raises(stripe.RateLimitError): requestor.request("get", self.v1_path, {}, base_address="api") def test_old_rate_limit_error(self, requestor, http_client_mock): @@ -891,7 +889,7 @@ def test_old_rate_limit_error(self, requestor, http_client_mock): rcode=400, ) - with pytest.raises(stripe.error.RateLimitError): + with pytest.raises(stripe.RateLimitError): requestor.request("get", self.v1_path, {}, base_address="api") def test_server_error(self, requestor, http_client_mock): @@ -899,7 +897,7 @@ def test_server_error(self, requestor, http_client_mock): "get", path=self.v1_path, rbody='{"error": {}}', rcode=500 ) - with pytest.raises(stripe.error.APIError): + with pytest.raises(stripe.APIError): requestor.request("get", self.v1_path, {}, base_address="api") def test_invalid_json(self, requestor, http_client_mock): @@ -907,11 +905,11 @@ def test_invalid_json(self, requestor, http_client_mock): "get", path=self.v1_path, rbody="{", rcode=200 ) - with pytest.raises(stripe.error.APIError): + with pytest.raises(stripe.APIError): requestor.request("get", self.v1_path, {}, base_address="api") def test_invalid_method(self, requestor): - with pytest.raises(stripe.error.APIConnectionError): + with pytest.raises(stripe.APIConnectionError): requestor.request("foo", "bar", base_address="api") def test_oauth_invalid_requestor_error(self, requestor, http_client_mock): @@ -953,7 +951,7 @@ def test_extract_error_from_stream_request_for_bytes( http_client_mock.stub_request( "get", path=self.v1_path, - rbody=util.io.BytesIO(b'{"error": "invalid_grant"}'), + rbody=io.BytesIO(b'{"error": "invalid_grant"}'), rcode=400, ) @@ -970,7 +968,7 @@ def test_extract_error_from_stream_request_for_response( "get", path=self.v1_path, rbody=urllib3.response.HTTPResponse( - body=util.io.BytesIO(b'{"error": "invalid_grant"}'), + body=io.BytesIO(b'{"error": "invalid_grant"}'), preload_content=False, ), rcode=400, diff --git a/tests/test_error.py b/tests/test_error.py index fe0e4a45b..f8cfc404f 100644 --- a/tests/test_error.py +++ b/tests/test_error.py @@ -2,28 +2,29 @@ import json -from stripe import error + +from stripe._error import StripeError, CardError, APIConnectionError class TestStripeError(object): def test_formatting(self): - err = error.StripeError("öre") + err = StripeError("öre") assert str(err) == "öre" def test_formatting_with_request_id(self): - err = error.StripeError("öre", headers={"request-id": "123"}) + err = StripeError("öre", headers={"request-id": "123"}) assert str(err) == "Request 123: öre" def test_formatting_with_none(self): - err = error.StripeError(None, headers={"request-id": "123"}) + err = StripeError(None, headers={"request-id": "123"}) assert str(err) == "Request 123: " def test_formatting_with_message_none_and_request_id_none(self): - err = error.StripeError(None) + err = StripeError(None) assert str(err) == "" def test_repr(self): - err = error.StripeError("öre", headers={"request-id": "123"}) + err = StripeError("öre", headers={"request-id": "123"}) assert ( repr(err) == "StripeError(message='öre', http_status=None, " "request_id='123')" @@ -31,7 +32,7 @@ def test_repr(self): def test_error_string_body(self): http_body = '{"error": {"code": "some_error"}}' - err = error.StripeError( + err = StripeError( "message", http_body=http_body, json_body=json.loads(http_body) ) assert err.http_body is not None @@ -39,14 +40,14 @@ def test_error_string_body(self): def test_error_bytes_body(self): http_body = '{"error": {"code": "some_error"}}'.encode("utf-8") - err = error.StripeError( + err = StripeError( "message", http_body=http_body, json_body=json.loads(http_body) ) assert err.http_body is not None assert err.http_body == json.dumps(err.json_body) def test_error_object(self): - err = error.StripeError( + err = StripeError( "message", json_body={"error": {"code": "some_error"}} ) assert err.error is not None @@ -54,13 +55,13 @@ def test_error_object(self): assert err.error.charge is None def test_error_object_not_dict(self): - err = error.StripeError("message", json_body={"error": "not a dict"}) + err = StripeError("message", json_body={"error": "not a dict"}) assert err.error is None class TestStripeErrorWithParamCode(object): def test_repr(self): - err = error.CardError( + err = CardError( "öre", param="cparam", code="ccode", @@ -76,8 +77,8 @@ def test_repr(self): class TestApiConnectionError(object): def test_default_no_retry(self): - err = error.APIConnectionError("msg") + err = APIConnectionError("msg") assert err.should_retry is False - err = error.APIConnectionError("msg", should_retry=True) + err = APIConnectionError("msg", should_retry=True) assert err.should_retry diff --git a/tests/test_exports.py b/tests/test_exports.py index 307529e85..93d3f77f9 100644 --- a/tests/test_exports.py +++ b/tests/test_exports.py @@ -1,6 +1,5 @@ # pyright: strict # we specifically test various import patterns -from typing import Any import stripe import subprocess import sys @@ -22,372 +21,80 @@ def assert_output(code: str, expected: str) -> None: assert output == expected -def test_can_import_stripe_object() -> None: - # fmt: off - from stripe.stripe_object import StripeObject as StripeObjectFromStripeStripeObject # type: ignore - # fmt: on - from stripe import ( - StripeObject as StripeObjectFromStripe, - ) - - # fmt: off - assert stripe.stripe_object.StripeObject is StripeObjectFromStripeStripeObject # type: ignore - # fmt: on - assert stripe.StripeObject is StripeObjectFromStripeStripeObject - assert StripeObjectFromStripe is StripeObjectFromStripeStripeObject - - def test_can_import_request_options() -> None: - # fmt: off - from stripe.request_options import RequestOptions as RequestOptionsStripeRequestOptions # type: ignore - # fmt: on - - from stripe import ( - RequestOptions as RequestOptionsFromStripe, - ) - - assert stripe.RequestOptions is RequestOptionsStripeRequestOptions - assert RequestOptionsFromStripe is RequestOptionsStripeRequestOptions + from stripe import RequestOptions # pyright: ignore[reportUnusedImport] def test_can_import_http_client() -> None: - from stripe.http_client import HTTPClient as HTTPClientFromStripeHTTPClient # type: ignore - - # fmt: off - from stripe.http_client import PycurlClient as PycurlClientFromStripeHTTPClient # type: ignore - from stripe.http_client import RequestsClient as RequestsClientFromStripeHTTPClient # type: ignore - from stripe.http_client import UrlFetchClient as UrlFetchClientFromStripeHTTPClient # type: ignore - from stripe.http_client import new_default_http_client as new_default_http_clientFromStripeHTTPClient # type: ignore - # fmt: on - from stripe import ( - HTTPClient as HTTPClientFromStripe, - PycurlClient as PycurlClientFromStripe, - RequestsClient as RequestsClientFromStripe, - UrlFetchClient as UrlFetchClientFromStripe, - new_default_http_client as new_default_http_clientFromStripe, - ) - - assert HTTPClientFromStripe is HTTPClientFromStripeHTTPClient - assert PycurlClientFromStripe is PycurlClientFromStripeHTTPClient - assert RequestsClientFromStripe is RequestsClientFromStripeHTTPClient - assert UrlFetchClientFromStripe is UrlFetchClientFromStripeHTTPClient - assert ( - new_default_http_clientFromStripe - is new_default_http_clientFromStripeHTTPClient - ) - - assert stripe.HTTPClient is HTTPClientFromStripeHTTPClient - assert stripe.PycurlClient is PycurlClientFromStripeHTTPClient - assert stripe.RequestsClient is RequestsClientFromStripeHTTPClient - assert stripe.UrlFetchClient is UrlFetchClientFromStripeHTTPClient - assert ( - stripe.new_default_http_client - is new_default_http_clientFromStripeHTTPClient + HTTPClient, # pyright: ignore[reportUnusedImport] + PycurlClient, # pyright: ignore[reportUnusedImport] + RequestsClient, # pyright: ignore[reportUnusedImport] + UrlFetchClient, # pyright: ignore[reportUnusedImport] + new_default_http_client, # pyright: ignore[reportUnusedImport] ) def test_can_import_webhook_members() -> None: - from stripe.webhook import Webhook as WebhookFromStripeWebhook # type: ignore - - # fmt: off - from stripe.webhook import WebhookSignature as WebhookSignatureFromStripeWebhook # type: ignore - # fmt: on - from stripe import ( - Webhook, - WebhookSignature, + Webhook, # pyright: ignore[reportUnusedImport] + WebhookSignature, # pyright: ignore[reportUnusedImport] ) - assert Webhook is not None - assert WebhookSignature is not None - - assert WebhookFromStripeWebhook is Webhook - assert WebhookSignatureFromStripeWebhook is WebhookSignature - - -def test_can_import_list_search_objects() -> None: - # This import has to be single line, mypy and pyright are producing errors - # on different lines of multiline import - # fmt: off - from stripe.api_resources import ListObject as ListObjectFromResources # type: ignore - from stripe import ListObject as LOFromStripe - from stripe.api_resources import SearchResultObject as SearchObjectFromResources # type: ignore - from stripe import SearchResultObject as SOFromStripe - # fmt: on - - from stripe import StripeObject - - assert ( - ListObjectFromResources[StripeObject] - == stripe.ListObject[StripeObject] - ) - assert ( - SearchObjectFromResources[StripeObject] - == stripe.SearchResultObject[StripeObject] - ) - assert ListObjectFromResources[StripeObject] == LOFromStripe[StripeObject] - assert ( - SearchObjectFromResources[StripeObject] == SOFromStripe[StripeObject] - ) - - -def test_can_import_misc_resources() -> None: - from stripe.api_resources import ErrorObject, OAuthErrorObject # type: ignore - from stripe import ( - ErrorObject as ErrorObjectFromStripe, - OAuthErrorObject as OAuthErrorObjectFromStripe, - ) - - # fmt: off - from stripe.api_resources.error_object import ErrorObject as ErrorObjectFromStripeApiResources # type: ignore - from stripe.api_resources.error_object import OAuthErrorObject as OAuthErrorObjectFromStripeApiResources # type: ignore - # fmt: on - - # FileUpload is an old alias for File, time to hide it - from stripe.api_resources import FileUpload as FileUploadFromApiResources # type: ignore - from stripe import FileUpload as FileUploadFromStripe # type: ignore - - assert ErrorObject is stripe.ErrorObject - assert ErrorObjectFromStripe is stripe.ErrorObject - assert ErrorObjectFromStripe is ErrorObjectFromStripeApiResources - - assert OAuthErrorObject is stripe.OAuthErrorObject - assert OAuthErrorObjectFromStripe is stripe.OAuthErrorObject - assert OAuthErrorObject is OAuthErrorObjectFromStripeApiResources - - assert FileUploadFromApiResources is stripe.FileUpload # type: ignore - assert FileUploadFromApiResources is FileUploadFromStripe - - assert_output("stripe.error is not None", "True") - def test_can_import_abstract() -> None: - # fmt: off - from stripe.api_resources.abstract import APIResource as APIResourceFromAbstract # type: ignore - from stripe.api_resources.abstract import SingletonAPIResource as SingletonFromAbstract # type: ignore - from stripe.api_resources.abstract import CreateableAPIResource as CreateableFromAbstract # type: ignore - from stripe.api_resources.abstract import UpdateableAPIResource as UpdateableFromAbstract # type: ignore - from stripe.api_resources.abstract import DeletableAPIResource as DeletableFromAbstract # type: ignore - from stripe.api_resources.abstract import ListableAPIResource as ListableFromAbstract # type: ignore - from stripe.api_resources.abstract import SearchableAPIResource as SearchableFromAbstract # type: ignore - from stripe.api_resources.abstract import VerifyMixin as VerifyMixinFromAbstract # type: ignore - from stripe.api_resources.abstract import APIResourceTestHelpers as APIResourceTestHelpersFromAbstract # type: ignore - from stripe.api_resources.abstract import custom_method as custom_methodFromAbstract - from stripe.api_resources.abstract import nested_resource_class_methods as nested_resource_class_methodsFromAbstract - from stripe import APIResource as APIResourceFromStripe - from stripe import SingletonAPIResource as SingletonFromStripe - from stripe import CreateableAPIResource as CreateableFromStripe - from stripe import UpdateableAPIResource as UpdateableFromStripe - from stripe import DeletableAPIResource as DeletableFromStripe - from stripe import ListableAPIResource as ListableFromStripe - from stripe import SearchableAPIResource as SearchableFromStripe - from stripe import VerifyMixin as VerifyMixinFromStripe - from stripe import APIResourceTestHelpers as APIResourceTestHelpersFromStripe - from stripe import custom_method as custom_methodFromStripe # pyright: ignore[reportDeprecated] - from stripe import nested_resource_class_methods as nested_resource_class_methodsFromStripe - # fmt: on - - from stripe.stripe_object import StripeObject # type: ignore - - assert ( - APIResourceFromAbstract[StripeObject] - == stripe.abstract.APIResource[StripeObject] # type: ignore - ) - assert ( - stripe.abstract.SingletonAPIResource[StripeObject] # type: ignore - == SingletonFromAbstract[StripeObject] - ) - assert ( - stripe.abstract.CreateableAPIResource[StripeObject] # type: ignore - == CreateableFromAbstract[StripeObject] - ) - assert ( - stripe.abstract.UpdateableAPIResource[StripeObject] # type: ignore - == UpdateableFromAbstract[StripeObject] - ) - assert ( - stripe.abstract.DeletableAPIResource[StripeObject] # type: ignore - == DeletableFromAbstract[StripeObject] - ) - assert ( - stripe.abstract.ListableAPIResource[StripeObject] # type: ignore - == ListableFromAbstract[StripeObject] - ) - assert ( - stripe.abstract.SearchableAPIResource[StripeObject] # type: ignore - == SearchableFromAbstract[StripeObject] - ) - assert stripe.abstract.VerifyMixin is VerifyMixinFromAbstract # type: ignore - assert ( - stripe.abstract.custom_method is custom_methodFromAbstract # type: ignore - ) - assert ( - stripe.abstract.APIResourceTestHelpers[Any] # type: ignore - is APIResourceTestHelpersFromAbstract[Any] - ) - assert ( - stripe.abstract.nested_resource_class_methods # type: ignore - is nested_resource_class_methodsFromAbstract - ) - - assert APIResourceFromStripe is APIResourceFromAbstract - assert SingletonFromStripe is SingletonFromAbstract - assert CreateableFromStripe is CreateableFromAbstract - assert UpdateableFromStripe is UpdateableFromAbstract - assert DeletableFromStripe is DeletableFromAbstract - assert ListableFromStripe is ListableFromAbstract - assert SearchableFromStripe is SearchableFromAbstract - assert VerifyMixinFromStripe is VerifyMixinFromAbstract - assert ( - APIResourceTestHelpersFromStripe is APIResourceTestHelpersFromAbstract - ) - assert custom_methodFromStripe is custom_methodFromAbstract - assert ( - nested_resource_class_methodsFromStripe - is nested_resource_class_methodsFromAbstract + from stripe import ( + APIResource, # pyright: ignore[reportUnusedImport] + SingletonAPIResource, # pyright: ignore[reportUnusedImport] + CreateableAPIResource, # pyright: ignore[reportUnusedImport] + UpdateableAPIResource, # pyright: ignore[reportUnusedImport] + DeletableAPIResource, # pyright: ignore[reportUnusedImport] + ListableAPIResource, # pyright: ignore[reportUnusedImport] + SearchableAPIResource, # pyright: ignore[reportUnusedImport] + VerifyMixin, # pyright: ignore[reportUnusedImport] + APIResourceTestHelpers, # pyright: ignore[reportUnusedImport] + custom_method, # pyright: ignore[reportDeprecated, reportUnusedImport] + nested_resource_class_methods, # pyright: ignore[reportUnusedImport] ) def test_can_import_app_info() -> None: - from stripe.app_info import AppInfo as AppInfoFromStripeAppInfo # type: ignore - from stripe import AppInfo as AppInfoFromStripe - - assert AppInfoFromStripeAppInfo is AppInfoFromStripe - assert AppInfoFromStripeAppInfo is stripe.AppInfo + from stripe import AppInfo # pyright: ignore[reportUnusedImport] def test_can_import_stripe_response() -> None: - # fmt: off - from stripe.stripe_response import StripeResponse as StripeResponseFromStripeResponse # type: ignore - from stripe.stripe_response import StripeResponseBase as StripeResponseBaseFromStripeResponse # type: ignore - from stripe.stripe_response import StripeStreamResponse as StripeStreamResponseFromStripeResponse # type: ignore - # fmt: on - from stripe import ( - StripeResponse as StripeResponseFromStripe, - StripeResponseBase as StripeResponseBaseFromStripe, - StripeStreamResponse as StripeStreamResponseFromStripe, + StripeResponse, # pyright: ignore[reportUnusedImport] + StripeResponseBase, # pyright: ignore[reportUnusedImport] + StripeStreamResponse, # pyright: ignore[reportUnusedImport] ) - assert ( - StripeResponseFromStripeResponse - is stripe.stripe_response.StripeResponse # type: ignore - ) - - assert StripeResponseFromStripe is StripeResponseFromStripeResponse - - assert StripeResponseFromStripe is stripe.StripeResponse - - assert StripeResponseBaseFromStripe is StripeResponseBaseFromStripeResponse - - assert StripeResponseBaseFromStripe is stripe.StripeResponseBase - - assert ( - StripeStreamResponseFromStripe - is StripeStreamResponseFromStripeResponse - ) - - assert StripeStreamResponseFromStripe is stripe.StripeStreamResponse - def test_can_import_oauth_members() -> None: - from stripe.oauth import OAuth as OAuthFromStripeOAuth # type: ignore - from stripe import ( - OAuth, - ) + from stripe import OAuth assert OAuth is not None - assert OAuthFromStripeOAuth is OAuth - assert OAuthFromStripeOAuth is stripe.OAuth def test_can_import_util() -> None: - # fmt: off - from stripe.util import convert_to_stripe_object as convert_to_stripe_objectFromStripeUtil # type: ignore - # fmt: on - - from stripe import ( - convert_to_stripe_object as convert_to_stripe_objectFromStripe, - ) - - assert ( - stripe.convert_to_stripe_object is convert_to_stripe_objectFromStripe - ) - assert ( - convert_to_stripe_objectFromStripe - is convert_to_stripe_objectFromStripeUtil - ) - assert stripe.util.io is not None # type: ignore - assert_output("stripe.util is not None", "True") + from stripe import convert_to_stripe_object # pyright: ignore[reportUnusedImport] def test_can_import_errors() -> None: # fmt: off - from stripe.error import StripeError as StripeErrorFromStripeError # type: ignore - from stripe.error import APIError as APIErrorFromStripeError # type: ignore - from stripe.error import APIConnectionError as APIConnectionErrorFromStripeError # type: ignore - from stripe.error import StripeErrorWithParamCode as StripeErrorWithParamCodeFromStripeError # type: ignore - from stripe.error import CardError as CardErrorFromStripeError # type: ignore - from stripe.error import IdempotencyError as IdempotencyErrorFromStripeError # type: ignore - from stripe.error import InvalidRequestError as InvalidRequestErrorFromStripeError # type: ignore - from stripe.error import AuthenticationError as AuthenticationErrorFromStripeError # type: ignore - from stripe.error import PermissionError as PermissionErrorFromStripeError # type: ignore - from stripe.error import RateLimitError as RateLimitErrorFromStripeError # type: ignore - from stripe.error import SignatureVerificationError as SignatureVerificationErrorFromStripeError # type: ignore + from stripe import StripeError # pyright: ignore[reportUnusedImport] + from stripe import APIError # pyright: ignore[reportUnusedImport] + from stripe import APIConnectionError # pyright: ignore[reportUnusedImport] + from stripe import StripeErrorWithParamCode # pyright: ignore[reportUnusedImport] + from stripe import CardError # pyright: ignore[reportUnusedImport] + from stripe import IdempotencyError # pyright: ignore[reportUnusedImport] + from stripe import InvalidRequestError # pyright: ignore[reportUnusedImport] + from stripe import AuthenticationError # pyright: ignore[reportUnusedImport] + from stripe import PermissionError # pyright: ignore[reportUnusedImport] + from stripe import RateLimitError # pyright: ignore[reportUnusedImport] + from stripe import SignatureVerificationError # pyright: ignore[reportUnusedImport] # fmt: on - from stripe import StripeError as StripeErrorFromStripe - from stripe import APIError as APIErrorFromStripe - from stripe import APIConnectionError as APIConnectionErrorFromStripe - from stripe import ( - StripeErrorWithParamCode as StripeErrorWithParamCodeFromStripe, - ) - from stripe import CardError as CardErrorFromStripe - from stripe import IdempotencyError as IdempotencyErrorFromStripe - from stripe import InvalidRequestError as InvalidRequestErrorFromStripe - from stripe import AuthenticationError as AuthenticationErrorFromStripe - from stripe import PermissionError as PermissionErrorFromStripe - from stripe import RateLimitError as RateLimitErrorFromStripe - from stripe import ( - SignatureVerificationError as SignatureVerificationErrorFromStripe, - ) - - assert StripeErrorFromStripeError is StripeErrorFromStripe - assert APIErrorFromStripeError is APIErrorFromStripe - assert APIConnectionErrorFromStripeError is APIConnectionErrorFromStripe - assert ( - StripeErrorWithParamCodeFromStripeError - is StripeErrorWithParamCodeFromStripe - ) - assert CardErrorFromStripeError is CardErrorFromStripe - assert IdempotencyErrorFromStripeError is IdempotencyErrorFromStripe - assert InvalidRequestErrorFromStripeError is InvalidRequestErrorFromStripe - assert AuthenticationErrorFromStripeError is AuthenticationErrorFromStripe - assert PermissionErrorFromStripeError is PermissionErrorFromStripe - assert RateLimitErrorFromStripeError is RateLimitErrorFromStripe - assert ( - SignatureVerificationErrorFromStripeError - is SignatureVerificationErrorFromStripe - ) - - -def test_can_import_top_level_resource() -> None: - from stripe import Account as AccountFromStripe - from stripe.api_resources import Account as AccountFromStripeResources # type: ignore - - # This import has to be single line, mypy and pyright are producing errors - # on different lines of multiline import - from stripe.api_resources.account import Account as AccFromModule # type: ignore - - assert stripe.Account == AccountFromStripe - assert AccountFromStripe == AccountFromStripeResources - assert AccFromModule == AccountFromStripeResources - - assert_output("stripe.api_resources.Account is not None", "True") - assert_output("stripe.api_resources.account is not None", "True") - assert_output("stripe.api_resources.account.Account is not None", "True") - def test_can_import_namespaced_resource() -> None: from stripe import tax as TaxPackage @@ -395,21 +102,9 @@ def test_can_import_namespaced_resource() -> None: Calculation as CalculationFromStripe, ) - # This import has to be single line, mypy and pyright are producing errors - # on different lines of multiline import - from stripe.api_resources.tax import Calculation as CalcFromResources # type: ignore - - # This import has to be single line, mypy and pyright are producing errors - # on different lines of multiline import - # fmt: off - from stripe.api_resources.tax.calculation import Calculation as CalcFromModule # type: ignore - # fmt: on - assert stripe.tax is TaxPackage assert stripe.tax.Calculation is CalculationFromStripe assert stripe.tax.Calculation is TaxPackage.Calculation - assert stripe.tax.Calculation is CalcFromResources - assert CalcFromResources is CalcFromModule assert_output("stripe.tax is not None", "True") assert_output("stripe.tax.Calculation is not None", "True") diff --git a/tests/test_http_client.py b/tests/test_http_client.py index af295337a..2f183498c 100644 --- a/tests/test_http_client.py +++ b/tests/test_http_client.py @@ -1,3 +1,4 @@ +import io import base64 import json import sys @@ -17,7 +18,7 @@ import urllib3 import stripe -from stripe import APIConnectionError, _http_client, _util +from stripe import APIConnectionError, _http_client from stripe._encode import _api_encode from stripe._http_client import ( AIOHTTPClient, @@ -636,7 +637,7 @@ def _mock_response(mock, body, code): result.status_code = code result.headers = {} result.raw = urllib3.response.HTTPResponse( - body=_util.io.BytesIO(str.encode(body)), + body=io.BytesIO(str.encode(body)), preload_content=False, status=code, ) @@ -723,7 +724,7 @@ def response(code=200, headers=None): result.status_code = code result.headers = headers or {} result.raw = urllib3.response.HTTPResponse( - body=_util.io.BytesIO(str.encode(result.content)), + body=io.BytesIO(str.encode(result.content)), preload_content=False, status=code, ) @@ -1081,7 +1082,7 @@ def request_mock(self, mocker, mocked_request_lib, curl_mock): @pytest.fixture def bio_mock(self, mocker): - bio_patcher = mocker.patch("stripe.util.io.BytesIO") + bio_patcher = mocker.patch("stripe._http_client.BytesIO") bio_mock = Mock() bio_patcher.return_value = bio_mock return bio_mock diff --git a/tests/test_integration.py b/tests/test_integration.py index d40bb9340..b5adcb97e 100644 --- a/tests/test_integration.py +++ b/tests/test_integration.py @@ -14,6 +14,7 @@ from typing import List, Dict, Tuple, Optional from stripe._stripe_client import StripeClient +from stripe._http_client import new_default_http_client if platform.python_implementation() == "PyPy": pytest.skip("skip integration tests with PyPy", allow_module_level=True) @@ -191,7 +192,7 @@ class MockServerRequestHandler(MyTestHandler): client = stripe.StripeClient( "sk_test_123", - http_client=stripe.http_client.new_default_http_client( + http_client=new_default_http_client( proxy="http://localhost:%s" % self.mock_server_port ), base_addresses={"api": "http://localhost:12111"}, diff --git a/tests/test_stripe_client.py b/tests/test_stripe_client.py index 16a5d53bc..13097b219 100644 --- a/tests/test_stripe_client.py +++ b/tests/test_stripe_client.py @@ -2,11 +2,12 @@ import stripe import pytest -from stripe.v2._event import Event +from stripe.v2.core._event import Event from stripe._http_client import new_default_http_client from stripe.events._v1_billing_meter_error_report_triggered_event import ( V1BillingMeterErrorReportTriggeredEvent, ) +from stripe._error import AuthenticationError class TestStripeClient(object): @@ -59,7 +60,7 @@ def test_v2_events_retrieve(self, http_client_mock): assert isinstance(event, V1BillingMeterErrorReportTriggeredEvent) def test_no_api_key(self): - with pytest.raises(stripe.error.AuthenticationError): + with pytest.raises(AuthenticationError): stripe.StripeClient(None) # type: ignore def test_http_client_and_options_overlap(self): diff --git a/tests/test_stripe_context.py b/tests/test_stripe_context.py index 543961373..a06d16dd6 100644 --- a/tests/test_stripe_context.py +++ b/tests/test_stripe_context.py @@ -3,7 +3,7 @@ from stripe import _api_requestor from stripe._request_options import RequestOptions, merge_options from stripe._requestor_options import RequestorOptions -from stripe.v2._event import EventNotification +from stripe.v2.core._event import EventNotification from unittest.mock import Mock import pytest diff --git a/tests/test_stripe_object.py b/tests/test_stripe_object.py index be893167a..c6356d672 100644 --- a/tests/test_stripe_object.py +++ b/tests/test_stripe_object.py @@ -6,6 +6,7 @@ import pytest import stripe +from stripe._stripe_object import StripeObject # We use this because it has a map, "restriction.currency_options" from string -> CurrencyOptions nested class. SAMPLE_PROMOTION_CODE = json.loads( @@ -79,15 +80,13 @@ class TestStripeObject(object): def test_initializes_with_parameters(self): - obj = stripe.stripe_object.StripeObject( - "foo", "bar", myparam=5, yourparam="boo" - ) + obj = StripeObject("foo", "bar", myparam=5, yourparam="boo") assert obj.id == "foo" assert obj.api_key == "bar" def test_access(self): - obj = stripe.stripe_object.StripeObject("myid", "mykey", myparam=5) + obj = StripeObject("myid", "mykey", myparam=5) # Empty with pytest.raises(AttributeError): @@ -117,7 +116,7 @@ def test_access(self): obj.foo = "" def test_refresh_from(self, mocker): - obj = stripe.stripe_object.StripeObject.construct_from( + obj = StripeObject.construct_from( {"foo": "bar", "trans": "me"}, "mykey" ) @@ -154,7 +153,7 @@ def test_refresh_from(self, mocker): assert obj.trans == 4 def test_passing_nested_refresh(self): - obj = stripe.stripe_object.StripeObject.construct_from( + obj = StripeObject.construct_from( {"foos": {"type": "list", "data": [{"id": "nested"}]}}, "key", stripe_account="acct_foo", @@ -204,9 +203,7 @@ def test_refresh_from_nested_object_can_be_paged(self): assert seen == ["sli_xyz"] assert isinstance(obj.lines.data[0], stripe.InvoiceLineItem) - assert isinstance( - obj.lines.data[0].price, stripe.stripe_object.StripeObject - ) + assert isinstance(obj.lines.data[0].price, StripeObject) assert isinstance(obj.lines.data[0].price, stripe.Price) assert obj.lines.data[0].price.billing_scheme == "per_unit" @@ -219,7 +216,7 @@ def test_refresh_on_map_to_nested_object(self): ) assert not isinstance( obj.restrictions.currency_options, - stripe.stripe_object.StripeObject, + StripeObject, ) assert isinstance( obj.restrictions.currency_options["gbp"], @@ -227,9 +224,7 @@ def test_refresh_on_map_to_nested_object(self): ) def test_to_json(self): - obj = stripe.stripe_object.StripeObject.construct_from( - SAMPLE_INVOICE, "key" - ) + obj = StripeObject.construct_from(SAMPLE_INVOICE, "key") self.check_invoice_data(json.loads(str(obj))) @@ -248,7 +243,7 @@ def check_invoice_data(self, data): ) def test_repr(self): - obj = stripe.stripe_object.StripeObject("foo", "bar", myparam=5) + obj = StripeObject("foo", "bar", myparam=5) obj["object"] = "\u4e00boo\u1f00" obj.date = datetime.datetime.fromtimestamp(1511136000) @@ -260,7 +255,7 @@ def test_repr(self): assert '"date": 1511136000' in res def test_pickling(self): - obj = stripe.stripe_object.StripeObject("foo", "bar", myparam=5) + obj = StripeObject("foo", "bar", myparam=5) obj["object"] = "boo" obj.refresh_from( @@ -285,7 +280,7 @@ def test_pickling(self): assert newobj.emptystring == "" def test_deletion(self): - obj = stripe.stripe_object.StripeObject("id", "key") + obj = StripeObject("id", "key") obj.coupon = "foo" assert obj.coupon == "foo" @@ -298,7 +293,7 @@ def test_deletion(self): assert obj.coupon == "foo" def test_deletion_metadata(self): - obj = stripe.stripe_object.StripeObject.construct_from( + obj = StripeObject.construct_from( {"metadata": {"key": "value"}}, "mykey" ) @@ -309,10 +304,8 @@ def test_deletion_metadata(self): obj.metadata["key"] def test_copy(self): - nested = stripe.stripe_object.StripeObject.construct_from( - {"value": "bar"}, "mykey" - ) - obj = stripe.stripe_object.StripeObject.construct_from( + nested = StripeObject.construct_from({"value": "bar"}, "mykey") + obj = StripeObject.construct_from( {"empty": "", "value": "foo", "nested": nested}, "mykey", stripe_account="myaccount", @@ -331,10 +324,8 @@ def test_copy(self): assert id(nested) == id(copied.nested) def test_deepcopy(self): - nested = stripe.stripe_object.StripeObject.construct_from( - {"value": "bar"}, "mykey" - ) - obj = stripe.stripe_object.StripeObject.construct_from( + nested = StripeObject.construct_from({"value": "bar"}, "mykey") + obj = StripeObject.construct_from( {"empty": "", "value": "foo", "nested": nested}, "mykey", stripe_account="myaccount", @@ -353,13 +344,9 @@ def test_deepcopy(self): assert id(nested) != id(copied.nested) def test_to_dict_recursive(self): - foo = stripe.stripe_object.StripeObject.construct_from( - {"value": "foo"}, "mykey" - ) - bar = stripe.stripe_object.StripeObject.construct_from( - {"value": "bar"}, "mykey" - ) - obj = stripe.stripe_object.StripeObject.construct_from( + foo = StripeObject.construct_from({"value": "foo"}, "mykey") + bar = StripeObject.construct_from({"value": "bar"}, "mykey") + obj = StripeObject.construct_from( {"empty": "", "value": "foobar", "nested": [foo, bar]}, "mykey" ) @@ -369,36 +356,30 @@ def test_to_dict_recursive(self): "value": "foobar", "nested": [{"value": "foo"}, {"value": "bar"}], } - assert not isinstance( - d["nested"][0], stripe.stripe_object.StripeObject - ) - assert not isinstance( - d["nested"][1], stripe.stripe_object.StripeObject - ) + assert not isinstance(d["nested"][0], StripeObject) + assert not isinstance(d["nested"][1], StripeObject) def test_serialize_empty_string_unsets(self): - class SerializeToEmptyString(stripe.stripe_object.StripeObject): + class SerializeToEmptyString(StripeObject): def serialize(self, previous): return "" nested = SerializeToEmptyString.construct_from( {"value": "bar"}, "mykey" ) - obj = stripe.stripe_object.StripeObject.construct_from( - {"nested": nested}, "mykey" - ) + obj = StripeObject.construct_from({"nested": nested}, "mykey") assert obj.serialize(None) == {"nested": ""} def test_field_name_remapping(self): - class Foo(stripe.stripe_object.StripeObject): + class Foo(StripeObject): _field_remappings = {"getter_name": "data_name"} obj = Foo.construct_from({"data_name": "foo"}, "mykey") assert obj.getter_name == "foo" def test_sends_request_with_api_key(self, http_client_mock): - obj = stripe.stripe_object.StripeObject("id", "key") + obj = StripeObject("id", "key") http_client_mock.stub_request( "get", @@ -415,7 +396,7 @@ def test_sends_request_with_api_key(self, http_client_mock): @pytest.mark.anyio async def test_request_async_succeeds(self, http_client_mock): http_client_mock.stub_request("get", "/foo") - obj = stripe.stripe_object.StripeObject("id", "key") + obj = StripeObject("id", "key") await obj._request_async("get", "/foo", base_address="api") http_client_mock.assert_requested( api_key="key", @@ -423,9 +404,7 @@ async def test_request_async_succeeds(self, http_client_mock): ) def test_refresh_from_creates_new_requestor(self): - obj = stripe.stripe_object.StripeObject.construct_from( - {}, key="origkey" - ) + obj = StripeObject.construct_from({}, key="origkey") orig_requestor = obj._requestor assert obj.api_key == "origkey" @@ -438,7 +417,7 @@ def test_refresh_from_creates_new_requestor(self): assert orig_requestor.api_key == "origkey" def test_can_update_api_key(self, http_client_mock): - obj = stripe.stripe_object.StripeObject("id", "key") + obj = StripeObject("id", "key") http_client_mock.stub_request( "get", diff --git a/tests/test_util.py b/tests/test_util.py index aa01eed5d..1331dbe20 100644 --- a/tests/test_util.py +++ b/tests/test_util.py @@ -3,10 +3,19 @@ import pytest -import stripe -from stripe import util +from stripe._util import ( + dashboard_link, + convert_to_dict, + convert_to_stripe_object, + logfmt, + log_info, + log_debug, + sanitize_id, +) +from stripe import Balance from stripe._api_mode import ApiMode from stripe._util import get_api_mode +from stripe._stripe_object import StripeObject LogTestCase = namedtuple("LogTestCase", "env flag should_output") FmtTestCase = namedtuple("FmtTestCase", "props expected") @@ -17,7 +26,7 @@ class TestUtil(object): def test_test_apikey(self, mocker): mocker.patch("stripe.api_key", "sk_test_KOWobxXidxNlIx") - link = util.dashboard_link(self.DUMMY_REQ_ID) + link = dashboard_link(self.DUMMY_REQ_ID) assert ( link == "https://dashboard.stripe.com/test/logs/" + self.DUMMY_REQ_ID @@ -25,7 +34,7 @@ def test_test_apikey(self, mocker): def test_live_apikey(self, mocker): mocker.patch("stripe.api_key", "sk_live_axwITqZSgTUXSN") - link = util.dashboard_link(self.DUMMY_REQ_ID) + link = dashboard_link(self.DUMMY_REQ_ID) assert ( link == "https://dashboard.stripe.com/live/logs/" + self.DUMMY_REQ_ID @@ -33,7 +42,7 @@ def test_live_apikey(self, mocker): def test_no_apikey(self, mocker): mocker.patch("stripe.api_key", None) - link = util.dashboard_link(self.DUMMY_REQ_ID) + link = dashboard_link(self.DUMMY_REQ_ID) assert ( link == "https://dashboard.stripe.com/test/logs/" + self.DUMMY_REQ_ID @@ -41,7 +50,7 @@ def test_no_apikey(self, mocker): def test_old_apikey(self, mocker): mocker.patch("stripe.api_key", "axwITqZSgTUXSN") - link = util.dashboard_link(self.DUMMY_REQ_ID) + link = dashboard_link(self.DUMMY_REQ_ID) assert ( link == "https://dashboard.stripe.com/test/logs/" + self.DUMMY_REQ_ID @@ -82,8 +91,8 @@ def test_log_debug(self, mocker): ] self.log_test_loop( test_cases, - logging_func=util.log_debug, - logger_name="stripe.util.logger.debug", + logging_func=log_debug, + logger_name="stripe._util.logger.debug", mocker=mocker, ) @@ -102,8 +111,8 @@ def test_log_info(self, mocker): ] self.log_test_loop( test_cases, - logging_func=util.log_info, - logger_name="stripe.util.logger.info", + logging_func=log_info, + logger_name="stripe._util.logger.info", mocker=mocker, ) @@ -123,7 +132,7 @@ def test_logfmt(self): ), ] for case in cases: - result = util.logfmt(case.props) + result = logfmt(case.props) assert result == case.expected def test_convert_to_stripe_object_and_back(self): @@ -139,12 +148,12 @@ def test_convert_to_stripe_object_and_back(self): "livemode": False, } - obj = util.convert_to_stripe_object(resp, api_mode="V1") - assert isinstance(obj, stripe.Balance) + obj = convert_to_stripe_object(resp, api_mode="V1") + assert isinstance(obj, Balance) assert isinstance(obj.available, list) - assert isinstance(obj.available[0], stripe.stripe_object.StripeObject) + assert isinstance(obj.available[0], StripeObject) - d = util.convert_to_dict(obj) + d = convert_to_dict(obj) assert isinstance(d, dict) assert isinstance(d["available"], list) assert isinstance(d["available"][0], dict) @@ -152,7 +161,7 @@ def test_convert_to_stripe_object_and_back(self): assert d == resp def test_sanitize_id(self): - sanitized_id = util.sanitize_id("cu %x 123") + sanitized_id = sanitize_id("cu %x 123") if isinstance(sanitized_id, bytes): sanitized_id = sanitized_id.decode("utf-8", "strict") assert sanitized_id == "cu++%25x+123" diff --git a/tests/test_v2_error.py b/tests/test_v2_error.py index f2828c377..e470d0185 100644 --- a/tests/test_v2_error.py +++ b/tests/test_v2_error.py @@ -5,7 +5,7 @@ import pytest import stripe -from stripe import error +from stripe._error import InvalidRequestError, TemporarySessionExpiredError from tests.http_client_mock import HTTPClientMock @@ -42,7 +42,7 @@ def test_raises_v2_error( try: stripe_client.v2.core.events.retrieve("evt_123") - except error.TemporarySessionExpiredError as e: + except TemporarySessionExpiredError as e: assert e.code == "session_bad" assert e.error.code == "session_bad" assert e.error.message == "you messed up" @@ -55,47 +55,47 @@ def test_raises_v2_error( api_key="keyinfo_test_123", ) - @pytest.mark.skip("python doesn't have any errors with invalid params yet") - def test_raises_v2_error_with_field( - self, - stripe_client: stripe.StripeClient, - http_client_mock: HTTPClientMock, - ): - method = "post" - path = "/v2/payment_methods/us_bank_accounts" - - error_response = { - "error": { - "type": "invalid_payment_method", - "code": "invalid_us_bank_account", - "message": "bank account is invalid", - "invalid_param": "routing_number", - } - } - http_client_mock.stub_request( - method, - path=path, - rbody=json.dumps(error_response), - rcode=400, - rheaders={}, - ) - - try: - stripe_client.v2.payment_methods.us_bank_accounts.create( - params={"account_number": "123", "routing_number": "456"} - ) - except error.InvalidPaymentMethodError as e: - assert e.invalid_param == "routing_number" - assert e.error.code == "invalid_us_bank_account" - assert e.error.message == "bank account is invalid" - else: - assert False, "Should have raised a InvalidUsBankAccountError" - - http_client_mock.assert_requested( - method, - path=path, - api_key="keyinfo_test_123", - ) + # @pytest.mark.skip("python doesn't have any errors with invalid params yet") + # def test_raises_v2_error_with_field( + # self, + # stripe_client: stripe.StripeClient, + # http_client_mock: HTTPClientMock, + # ): + # method = "post" + # path = "/v2/payment_methods/us_bank_accounts" + + # error_response = { + # "error": { + # "type": "invalid_payment_method", + # "code": "invalid_us_bank_account", + # "message": "bank account is invalid", + # "invalid_param": "routing_number", + # } + # } + # http_client_mock.stub_request( + # method, + # path=path, + # rbody=json.dumps(error_response), + # rcode=400, + # rheaders={}, + # ) + + # try: + # stripe_client.v2.payment_methods.us_bank_accounts.create( + # params={"account_number": "123", "routing_number": "456"} + # ) + # except error.InvalidPaymentMethodError as e: + # assert e.invalid_param == "routing_number" + # assert e.error.code == "invalid_us_bank_account" + # assert e.error.message == "bank account is invalid" + # else: + # assert False, "Should have raised a InvalidUsBankAccountError" + + # http_client_mock.assert_requested( + # method, + # path=path, + # api_key="keyinfo_test_123", + # ) def test_falls_back_to_v1_error( self, @@ -124,7 +124,7 @@ def test_falls_back_to_v1_error( stripe_client.v2.billing.meter_events.create( {"event_name": "asdf", "payload": {}} ) - except error.InvalidRequestError as e: + except InvalidRequestError as e: assert e.param == "invalid_param" assert repr(e) == ( "InvalidRequestError(message='your request is invalid', " diff --git a/tests/test_v2_event.py b/tests/test_v2_event.py index ea9b0b9bc..46ddedfed 100644 --- a/tests/test_v2_event.py +++ b/tests/test_v2_event.py @@ -14,7 +14,7 @@ V1BillingMeterErrorReportTriggeredEventNotification, V1BillingMeterErrorReportTriggeredEvent, ) -from stripe.v2._event import UnknownEventNotification +from stripe.v2.core._event import UnknownEventNotification from stripe.events._event_classes import ALL_EVENT_NOTIFICATIONS from tests.test_webhook import DUMMY_WEBHOOK_SECRET, generate_header diff --git a/tests/test_webhook.py b/tests/test_webhook.py index 53389f725..cd648faa2 100644 --- a/tests/test_webhook.py +++ b/tests/test_webhook.py @@ -3,6 +3,7 @@ import pytest import stripe +from stripe._error import SignatureVerificationError DUMMY_WEBHOOK_PAYLOAD = """{ @@ -47,7 +48,7 @@ def test_raise_on_json_error(self): def test_raise_on_invalid_header(self): header = "bad_header" - with pytest.raises(stripe.error.SignatureVerificationError): + with pytest.raises(SignatureVerificationError): stripe.Webhook.construct_event( DUMMY_WEBHOOK_PAYLOAD, header, DUMMY_WEBHOOK_SECRET ) @@ -73,7 +74,7 @@ class TestWebhookSignature(object): def test_raise_on_malformed_header(self): header = "i'm not even a real signature header" with pytest.raises( - stripe.error.SignatureVerificationError, + SignatureVerificationError, match="Unable to extract timestamp and signatures from header", ): stripe.WebhookSignature.verify_header( @@ -83,7 +84,7 @@ def test_raise_on_malformed_header(self): def test_raise_on_no_signatures_with_expected_scheme(self): header = generate_header(scheme="v0") with pytest.raises( - stripe.error.SignatureVerificationError, + SignatureVerificationError, match="No signatures found with expected scheme v1", ): stripe.WebhookSignature.verify_header( @@ -93,7 +94,7 @@ def test_raise_on_no_signatures_with_expected_scheme(self): def test_raise_on_no_valid_signatures_for_payload(self): header = generate_header(signature="bad_signature") with pytest.raises( - stripe.error.SignatureVerificationError, + SignatureVerificationError, match="No signatures found matching the expected signature for payload", ): stripe.WebhookSignature.verify_header( @@ -103,7 +104,7 @@ def test_raise_on_no_valid_signatures_for_payload(self): def test_raise_on_timestamp_outside_tolerance(self): header = generate_header(timestamp=int(time.time()) - 15) with pytest.raises( - stripe.error.SignatureVerificationError, + SignatureVerificationError, match="Timestamp outside the tolerance zone", ): stripe.WebhookSignature.verify_header( @@ -150,7 +151,7 @@ def test_raise_on_json_error(self, stripe_mock_stripe_client): def test_raise_on_invalid_header(self, stripe_mock_stripe_client): header = "bad_header" - with pytest.raises(stripe.error.SignatureVerificationError): + with pytest.raises(SignatureVerificationError): stripe_mock_stripe_client.construct_event( DUMMY_WEBHOOK_PAYLOAD, header, DUMMY_WEBHOOK_SECRET )